Commit
clusterMaxZoom arrondi (worker: Invalid array length) ; react retiré des devDeps ; script pack:tarball
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
modified
.gitignore
+1 −0
@@ -2,3 +2,4 @@ node_modules/ | ||
| 2 | 2 | dist/ |
| 3 | 3 | *.tsbuildinfo |
| 4 | 4 | .DS_Store |
| 5 | +*.tgz | |
modified
package-lock.json
+0 −11
@@ -14,7 +14,6 @@ | ||
| 14 | 14 | }, |
| 15 | 15 | "devDependencies": { |
| 16 | 16 | "@types/react": "^19.0.0", |
| 17 | − "react": "^19.0.0", | |
| 18 | 17 | "typescript": "^5.8.0", |
| 19 | 18 | "vitest": "^3.0.0" |
| 20 | 19 | }, |
@@ -1353,16 +1352,6 @@ | ||
| 1353 | 1352 | "node": "^10 || ^12 || >=14" |
| 1354 | 1353 | } |
| 1355 | 1354 | }, |
| 1356 | − "node_modules/react": { | |
| 1357 | − "version": "19.2.8", | |
| 1358 | − "resolved": "https://registry.npmjs.org/react/-/react-19.2.8.tgz", | |
| 1359 | − "integrity": "sha512-PWaYA1L/q9u2u7xYQi+Y3L3Yfnie7XyLeaJICV1MGD6LprsBxcAqGjYyr0eY3p+QdsA+x/Irkt4Qif8D63+Sbw==", | |
| 1360 | − "dev": true, | |
| 1361 | − "license": "MIT", | |
| 1362 | − "engines": { | |
| 1363 | − "node": ">=0.10.0" | |
| 1364 | − } | |
| 1365 | − }, | |
| 1366 | 1355 | "node_modules/rollup": { |
| 1367 | 1356 | "version": "4.62.4", |
| 1368 | 1357 | "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.62.4.tgz", |
modified
package.json
+2 −2
@@ -26,7 +26,8 @@ | ||
| 26 | 26 | "build": "tsc -p tsconfig.build.json && cp src/styles/ka-maps.css dist/ka-maps.css", |
| 27 | 27 | "typecheck": "tsc --noEmit", |
| 28 | 28 | "test": "vitest run", |
| 29 | − "test:watch": "vitest" | |
| 29 | + "test:watch": "vitest", | |
| 30 | + "pack:tarball": "npm run build && npm pack --pack-destination ." | |
| 30 | 31 | }, |
| 31 | 32 | "dependencies": { |
| 32 | 33 | "@types/geojson": "^7946.0.16", |
@@ -42,7 +43,6 @@ | ||
| 42 | 43 | }, |
| 43 | 44 | "devDependencies": { |
| 44 | 45 | "@types/react": "^19.0.0", |
| 45 | − "react": "^19.0.0", | |
| 46 | 46 | "typescript": "^5.8.0", |
| 47 | 47 | "vitest": "^3.0.0" |
| 48 | 48 | } |
modified
src/core/KaMap.ts
+3 −1
@@ -113,7 +113,9 @@ export class KaMap { | ||
| 113 | 113 | this.mode = options.mode ?? "light"; |
| 114 | 114 | this.searchMode = options.searchMode ?? "manual"; |
| 115 | 115 | this.clusterOptions = { |
| 116 | − maxZoom: options.cluster?.maxZoom ?? 14, | |
| 116 | + // entier obligatoire : supercluster fait `new Array(maxZoom + 2)` — | |
| 117 | + // une valeur fractionnaire plante le worker (Invalid array length) | |
| 118 | + maxZoom: Math.round(options.cluster?.maxZoom ?? 14), | |
| 117 | 119 | radius: options.cluster?.radius ?? 46, |
| 118 | 120 | valueClamp: options.cluster?.valueClamp, |
| 119 | 121 | }; |
modified
src/index.ts
+6 −1
@@ -49,7 +49,12 @@ export { | ||
| 49 | 49 | type KaMapTheme, |
| 50 | 50 | type MarkerStyleTokens, |
| 51 | 51 | } from "./theming/tokens.js"; |
| 52 | −export { buildKaStyle, KA_ATTRIBUTION } from "./styles/kaBaseStyle.js"; | |
| 52 | +export { | |
| 53 | + applyKaBasemapConfig, | |
| 54 | + buildKaStyle, | |
| 55 | + KA_ATTRIBUTION, | |
| 56 | + KA_STYLE_URL, | |
| 57 | +} from "./styles/kaBaseStyle.js"; | |
| 53 | 58 | export { |
| 54 | 59 | buildClusterProperties, |
| 55 | 60 | buildPropertyLayers, |
| 56 | 61 | |