Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: v2 #729

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
module.exports = {
env: {
node: true,
browser: true,
es6: true,
jest: true,
},
extends: [
"airbnb",
"airbnb/hooks",
"plugin:perfectionist/recommended-alphabetical-legacy",
"prettier",
],
parserOptions: {
ecmaVersion: "latest",
},
plugins: ["perfectionist", "prettier"],
rules: {
"arrow-body-style": "off",
"import/no-extraneous-dependencies": [
"error",
{
devDependencies: true,
},
],
"react/sort-comp": "off",
"react/jsx-filename-extension": [
1,
{
extensions: [".js", ".jsx"],
},
],
"no-restricted-exports": "Off",
"react/forbid-prop-types": "Off",
"prettier/prettier": "error",
"jsx-a11y/no-access-key": "Off",
"react/require-default-props": "Off",
},
};
9 changes: 9 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
"(src|__mocks__)/**/*.js": [
"eslint --fix",
"prettier --write",
"yarn test --bail --findRelatedTests",
],
"package.json": ["fixpack"],
"src/**/*.{css,scss}": ["stylelint --fix"],
};
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
![Vercel](https://vercelbadge.vercel.app/api/geops/react-spatial)

This library provides React components to build web applications and to visualize real-time geographical information based on [OpenLayers](https://openlayers.org/) and [Malibre GL](https://maplibre.org/maplibre-gl-js/).
This library provides React components to build web applications and to visualize real-time geographical information based on [OpenLayers](https://openlayers.org/) and [MapLibre GL JS](https://maplibre.org/maplibre-gl-js/).

This library uses the [mobility-toolbox-js](https://mobility-toolbox-js.geops.io/) library.
This library uses the [mobility-toolbox-js](https://mobility-toolbox-js.geops.io/) library for some components.

Documentation and examples at https://react-spatial.geops.io.

Expand All @@ -16,7 +16,7 @@ Documentation and examples at https://react-spatial.geops.io.
Install the [react-spatial](https://www.npmjs.com/package/react-spatial) package:

```bash
yarn add mobility-toolbox-js mapbox-gl mapblibre-gl ol react-spatial
yarn add maplibre-gl ol mobility-toolbox-js react-spatial
```

Your build pipeline needs to support ES6 modules and SASS.
Expand Down
17 changes: 17 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
moduleNameMapper: {
"@geoblocks/ol-maplibre-layer":
"<rootDir>/node_modules/@geoblocks/ol-maplibre-layer/lib/index.js",
"\\.(jpg|jpeg|png|gif|webp|scss)$": "identity-obj-proxy",
},
setupFilesAfterEnv: ["<rootDir>/src/setupTests.js"],
snapshotSerializers: ["jest-serializer-html"],
testEnvironment: "jsdom",
testMatch: ["<rootDir>/src/**/?(*.)+(spec|test).[jt]s?(x)"],
testPathIgnorePatterns: ["<rootDir>/(build|coverage|public|doc|packages)"],
transform: {
".+\\.js$": "babel-jest",
".+\\.svg$": "jest-transformer-svg",
},
transformIgnorePatterns: [],
};
141 changes: 28 additions & 113 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,35 @@
"name": "react-spatial",
"license": "MIT",
"description": "Components to build React map apps.",
"version": "1.12.2",
"version": "2.0.0-beta.2",
"dependencies": {
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@geops/geops-ui": "0.3.4",
"@mui/icons-material": "^6.1.7",
"@mui/material": "^6.1.7",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@geops/geops-ui": "0.3.5",
"@mui/icons-material": "^6.1.10",
"@mui/material": "^6.1.10",
"re-resizable": "6.10.1",
"react-icons": "5.3.0",
"react-icons": "5.4.0",
"resize-observer-polyfill": "1.5.1"
},
"peerDependencies": {
"mapbox-gl": "^1",
"maplibre-gl": "^2",
"mobility-toolbox-js": "^2",
"ol": "^8",
"maplibre-gl": "^4",
"mobility-toolbox-js": "^3",
"ol": "^10",
"react": "^18",
"react-dom": "^18"
},
"devDependencies": {
"@babel/preset-env": "7.26.0",
"@babel/preset-react": "7.25.9",
"@babel/preset-react": "7.26.3",
"@cfaester/enzyme-adapter-react-18": "0.8.0",
"@commitlint/cli": "19.5.0",
"@commitlint/config-conventional": "19.5.0",
"@commitlint/cli": "19.6.0",
"@commitlint/config-conventional": "19.6.0",
"@svgr/plugin-jsx": "^8.1.0",
"@svgr/webpack": "8.1.0",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "6.6.3",
"@testing-library/react": "16.0.1",
"@testing-library/react": "16.1.0",
"@testing-library/user-event": "14.5.2",
"babel-jest": "29.7.0",
"babel-loader": "9.2.1",
Expand All @@ -45,16 +44,16 @@
"eslint-config-prettier": "9.1.0",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-perfectionist": "^3.9.1",
"eslint-plugin-perfectionist": "^4.2.0",
"eslint-plugin-prettier": "5.2.1",
"eslint-plugin-react": "7.37.2",
"eslint-plugin-react-hooks": "5.0.0",
"eslint-plugin-react-hooks": "5.1.0",
"file-loader": "6.2.0",
"fixpack": "4.0.0",
"generact": "0.4.0",
"husky": "9.1.6",
"husky": "9.1.7",
"identity-obj-proxy": "^3.0.0",
"is-ci": "3.0.1",
"is-ci": "4.1.0",
"jest": "29.7.0",
"jest-canvas-mock": "2.5.2",
"jest-date-mock": "1.0.10",
Expand All @@ -65,33 +64,32 @@
"jest-transformer-svg": "^2.0.2",
"jsts": "2.12.1",
"lint-staged": "15.2.10",
"mapbox-gl": "1.13.1",
"maplibre-gl": "4.7.1",
"mobility-toolbox-js": "2.4.2",
"ol": "10.2.1",
"mobility-toolbox-js": "3.0.0",
"ol": "10.3.1",
"postcss": "^8.4.49",
"prettier": "3.3.3",
"proj4": "2.14.0",
"prettier": "3.4.2",
"proj4": "2.15.0",
"prop-types": "15.8.1",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-styleguidist": "13.1.3",
"react-svg-loader": "3.0.3",
"react-test-renderer": "18.3.1",
"sass": "1.81.0",
"sass-loader": "16.0.3",
"sass": "1.82.0",
"sass-loader": "16.0.4",
"sass-migrator": "^2.2.1",
"standard-version": "9.5.0",
"stream-array": "1.1.2",
"style-loader": "4.0.0",
"stylelint": "16.10.0",
"stylelint": "16.11.0",
"stylelint-config-recommended-scss": "14.1.0",
"stylelint-config-standard": "36.0.1",
"stylelint-scss": "6.9.0",
"stylelint-scss": "6.10.0",
"terser-webpack-plugin": "^5.3.10",
"url-loader": "4.1.1",
"vinyl-fs": "4.0.0",
"webpack": "^5.96.1",
"webpack": "^5.97.1",
"xml-beautifier": "0.5.0"
},
"scripts": {
Expand Down Expand Up @@ -121,88 +119,5 @@
"not op_mini all",
"not ie <= 11",
"not android < 5"
],
"eslintConfig": {
"env": {
"node": true,
"browser": true,
"es6": true,
"jest": true
},
"extends": [
"airbnb",
"airbnb/hooks",
"plugin:perfectionist/recommended-alphabetical-legacy",
"prettier"
],
"parserOptions": {
"ecmaVersion": "latest"
},
"plugins": [
"perfectionist",
"prettier"
],
"rules": {
"arrow-body-style": "off",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": true
}
],
"react/sort-comp": "off",
"react/jsx-filename-extension": [
1,
{
"extensions": [
".js",
".jsx"
]
}
],
"no-restricted-exports": "Off",
"react/forbid-prop-types": "Off",
"prettier/prettier": "error",
"jsx-a11y/no-access-key": "Off",
"react/require-default-props": "Off"
}
},
"jest": {
"testEnvironment": "jsdom",
"transform": {
".+\\.js$": "babel-jest",
".+\\.svg$": "jest-transformer-svg"
},
"transformIgnorePatterns": [
"node_modules/(?!(color-*|jsts|ol|mobility-toolbox-js|@geops|geotiff|quick-lru|quickselect|rbush|pbf|earcut))"
],
"testMatch": [
"<rootDir>/src/**/?(*.)+(spec|test).[jt]s?(x)"
],
"moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|webp|scss)$": "identity-obj-proxy"
},
"snapshotSerializers": [
"jest-serializer-html"
],
"testPathIgnorePatterns": [
"<rootDir>/(build|coverage|public|doc|packages)"
],
"setupFilesAfterEnv": [
"<rootDir>/src/setupTests.js"
]
},
"lint-staged": {
"(src|__mocks__)/**/*.js": [
"eslint --fix",
"prettier --write",
"yarn test --bail --findRelatedTests"
],
"package.json": [
"fixpack"
],
"src/**/*.{css,scss}": [
"stylelint --fix"
]
}
]
}
Loading
Loading