@planet/maps 11.1.0 → 11.2.0
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/Map.d.ts.map +1 -1
- package/Map.js +4 -1
- package/package.json +6 -5
package/Map.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Map.d.ts","sourceRoot":"","sources":["Map.js"],"names":[],"mappings":"AAyBA;;;;;;;;GAQG;AAEH;;GAEG;AACH,2FAFW,QAAQ,GAAG;QAAO,MAAM,GAAE,GAAG;CAAC;;;;;
|
|
1
|
+
{"version":3,"file":"Map.d.ts","sourceRoot":"","sources":["Map.js"],"names":[],"mappings":"AAyBA;;;;;;;;GAQG;AAEH;;GAEG;AACH,2FAFW,QAAQ,GAAG;QAAO,MAAM,GAAE,GAAG;CAAC;;;;;gBAkDxC;;;;;cA3Da,qBAAqB,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;;;;cACtC,KAAK,CAAC,SAAS;;;;+CACc,KAAK,KAAE,IAAI;;;;;;;;;;;;;;kBAdpC,WAAW"}
|
package/Map.js
CHANGED
|
@@ -47,6 +47,7 @@ export default function Map({
|
|
|
47
47
|
}) {
|
|
48
48
|
const targetRef = useRef(/** @type {HTMLElement?} */ (null));
|
|
49
49
|
const mapRef = useRef(/** @type {OLMap?} */ (null));
|
|
50
|
+
const oldMapPropsRef = useRef({});
|
|
50
51
|
|
|
51
52
|
const getMap = useCallback(() => {
|
|
52
53
|
// avoid creating new map when options object is different
|
|
@@ -76,7 +77,9 @@ export default function Map({
|
|
|
76
77
|
if (!mapRef.current) {
|
|
77
78
|
return;
|
|
78
79
|
}
|
|
79
|
-
|
|
80
|
+
const oldMapProps = oldMapPropsRef.current;
|
|
81
|
+
oldMapPropsRef.current = mapProps;
|
|
82
|
+
updateInstanceFromProps(map, MAP, oldMapProps, mapProps);
|
|
80
83
|
render(children, map);
|
|
81
84
|
}, [children, getMap, mapProps, ref]);
|
|
82
85
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@planet/maps",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.2.0",
|
|
4
4
|
"description": "Declarative mapping components for React",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"pretest": "npm run lint",
|
|
13
13
|
"test": "npm-run-all test:*",
|
|
14
14
|
"test:lib": "vitest run --root ./tests/lib",
|
|
15
|
+
"debug-test:lib": "vitest --inspect-brk --browser --root ./tests/lib --test-timeout=0 --no-file-parallelism",
|
|
15
16
|
"test:rendering": "playwright test --config=tests/rendering/playwright.config.js",
|
|
16
17
|
"test:unit": "vitest run --root ./tests/unit",
|
|
17
18
|
"test:types": "npx tsc --noEmit",
|
|
@@ -39,7 +40,7 @@
|
|
|
39
40
|
"@testing-library/react": "^16.0.0",
|
|
40
41
|
"@types/react": "^19.0.10",
|
|
41
42
|
"@types/react-dom": "^19.0.4",
|
|
42
|
-
"@types/react-reconciler": "^0.
|
|
43
|
+
"@types/react-reconciler": "^0.31.0",
|
|
43
44
|
"@vitest/browser": "^3.0.7",
|
|
44
45
|
"astro": "^5.1.1",
|
|
45
46
|
"es-main": "^1.2.0",
|
|
@@ -56,8 +57,8 @@
|
|
|
56
57
|
"ol": "^10.4.0",
|
|
57
58
|
"ol-mapbox-style": "^12.4.1",
|
|
58
59
|
"prop-types": "^15.8.1",
|
|
59
|
-
"react": "^19.
|
|
60
|
-
"react-dom": "^19.
|
|
60
|
+
"react": "^19.1.0",
|
|
61
|
+
"react-dom": "^19.1.0",
|
|
61
62
|
"remark-html": "^16.0.1",
|
|
62
63
|
"remark-parse": "^11.0.0",
|
|
63
64
|
"semapro": "^1.1.0",
|
|
@@ -70,6 +71,6 @@
|
|
|
70
71
|
"yargs-parser": "^21.1.1"
|
|
71
72
|
},
|
|
72
73
|
"dependencies": {
|
|
73
|
-
"react-reconciler": "^0.
|
|
74
|
+
"react-reconciler": "^0.32.0"
|
|
74
75
|
}
|
|
75
76
|
}
|