react-spatial 1.2.3-beta.2 → 1.2.3-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/themes/README.md +26 -0
- package/Projections.js +0 -33
- package/Projections.js.map +0 -7
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-spatial",
|
|
3
3
|
"description": "Components to build React map apps.",
|
|
4
|
-
"version": "1.2.3-beta.
|
|
4
|
+
"version": "1.2.3-beta.3",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@geops/geops-ui": "0.1.13",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"scripts": {
|
|
99
99
|
"esbuild": "esbuild src/*.js src/**/*.js src/**/**/*.js src/**/**/**/*.js --target=chrome100 --outdir=build/ --loader:.js=jsx --sourcemap=external",
|
|
100
100
|
"buble": "buble --no modules,asyncAwait -i src -o build --objectAssign Object.assign --sourcemap",
|
|
101
|
-
"build": "yarn esbuild && find build -type f -name '*.test.*' -delete && rm -rf build/styleguidist && cp package.json README.md LICENSE build && cp -rf src/images build",
|
|
101
|
+
"build": "yarn esbuild && find build -type f -name '*.test.*' -delete && rm -rf build/styleguidist && cp package.json README.md LICENSE build && cp -rf src/images build && cp -rf src/themes build",
|
|
102
102
|
"coverage": "yarn test --coverage --coverageDirectory=coverage",
|
|
103
103
|
"cp": "generact --root src/components",
|
|
104
104
|
"doc": "styleguidist build",
|
package/themes/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Themes
|
|
2
|
+
|
|
3
|
+
We are NOT a CSS library so we provide some default CSS helpers to help you start but feel free to use your own technology bootstrap or JSS or styled-compoennts.
|
|
4
|
+
|
|
5
|
+
## How to use
|
|
6
|
+
|
|
7
|
+
We provide a set of CSS variables and classes to help you start using `react-spatial` .
|
|
8
|
+
To use it just import the `index.scss` file of the `default` theme in your application:
|
|
9
|
+
|
|
10
|
+
```js
|
|
11
|
+
import 'react-spatial/themes/default/index.scss';
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
If you want to override variables just import the `default/variables.css` and the default CSS files you want, there is one CSS file by component.
|
|
15
|
+
|
|
16
|
+
## Create a new theme
|
|
17
|
+
|
|
18
|
+
Just add a folder with an `index.scss` file.
|
|
19
|
+
|
|
20
|
+
Some rules must be followed:
|
|
21
|
+
|
|
22
|
+
- no positionning css for container.
|
|
23
|
+
- no size information without using CSS variable.
|
|
24
|
+
- use `display: flex` for container when possible.
|
|
25
|
+
|
|
26
|
+
Of course those rules must be adapted depending on the component.
|
package/Projections.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
const projections = {
|
|
2
|
-
"EPSG:3857": {
|
|
3
|
-
projectionExtent: [
|
|
4
|
-
-200375083428e-4,
|
|
5
|
-
-200375083428e-4,
|
|
6
|
-
200375083428e-4,
|
|
7
|
-
200375083428e-4
|
|
8
|
-
],
|
|
9
|
-
resolutions: [
|
|
10
|
-
156543.033928,
|
|
11
|
-
78271.516964,
|
|
12
|
-
39135.758482,
|
|
13
|
-
19567.879241,
|
|
14
|
-
9783.9396205,
|
|
15
|
-
4891.96981025,
|
|
16
|
-
2445.98490513,
|
|
17
|
-
1222.99245256,
|
|
18
|
-
611.496226281,
|
|
19
|
-
305.748113141,
|
|
20
|
-
152.87405657,
|
|
21
|
-
76.4370282852,
|
|
22
|
-
38.2185141426,
|
|
23
|
-
19.1092570713,
|
|
24
|
-
9.55462853565,
|
|
25
|
-
4.77731426782,
|
|
26
|
-
2.38865713391,
|
|
27
|
-
1.19432856696,
|
|
28
|
-
0.597164283478,
|
|
29
|
-
0.298582141739
|
|
30
|
-
]
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
export default projections;
|
package/Projections.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/Projections.js"],
|
|
4
|
-
"sourcesContent": ["const projections = {\n 'EPSG:3857': {\n projectionExtent: [\n -20037508.3428, -20037508.3428, 20037508.3428, 20037508.3428,\n ],\n resolutions: [\n 156543.033928, 78271.516964, 39135.758482, 19567.879241, 9783.9396205,\n 4891.96981025, 2445.98490513, 1222.99245256, 611.496226281, 305.748113141,\n 152.87405657, 76.4370282852, 38.2185141426, 19.1092570713, 9.55462853565,\n 4.77731426782, 2.38865713391, 1.19432856696, 0.597164283478,\n 0.298582141739,\n ],\n },\n};\n\nexport default projections;\n"],
|
|
5
|
-
"mappings": "AAAA,MAAM,cAAc;AAAA,EAClB,aAAa;AAAA,IACX,kBAAkB;AAAA,MAChB;AAAA,MAAgB;AAAA,MAAgB;AAAA,MAAe;AAAA,IACjD;AAAA,IACA,aAAa;AAAA,MACX;AAAA,MAAe;AAAA,MAAc;AAAA,MAAc;AAAA,MAAc;AAAA,MACzD;AAAA,MAAe;AAAA,MAAe;AAAA,MAAe;AAAA,MAAe;AAAA,MAC5D;AAAA,MAAc;AAAA,MAAe;AAAA,MAAe;AAAA,MAAe;AAAA,MAC3D;AAAA,MAAe;AAAA,MAAe;AAAA,MAAe;AAAA,MAC7C;AAAA,IACF;AAAA,EACF;AACF;AAEA,eAAe;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|