@nika-js/onlymap 0.6.13 → 0.6.14

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.
Files changed (35) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/{LercDecode.es-DB1mYTrm.js → LercDecode.es-Bqk5xyNu.js} +1 -1
  3. package/dist/attribute-resolution.d.ts +2 -0
  4. package/dist/{basemap-CDp9EsvL.js → basemap-KDsE62YN.js} +1 -1
  5. package/dist/clip-box.d.ts +0 -32
  6. package/dist/data-layer.d.ts +0 -17
  7. package/dist/effects.d.ts +1 -0
  8. package/dist/elements/om-map.d.ts +0 -20
  9. package/dist/elements/om-story.d.ts +0 -18
  10. package/dist/expr/errors.d.ts +3 -0
  11. package/dist/field-access.d.ts +10 -0
  12. package/dist/geodesy.d.ts +11 -0
  13. package/dist/{geoparquet-CI3o8X5-.js → geoparquet-DOexUItM.js} +1 -1
  14. package/dist/{index-DMu0qL9C.js → index-BFNjPrc2.js} +1 -1
  15. package/dist/{index-Dio4lUCZ.js → index-D_EyImRx.js} +1 -1
  16. package/dist/{index-Bue-53Xo.js → index-DnsWPk6e.js} +1 -1
  17. package/dist/{index-CnKC1yuV.js → index-ESUJidEA.js} +26188 -26170
  18. package/dist/{index-BJh0t_nt.js → index-mxTk4d2L.js} +2 -2
  19. package/dist/layer-registry.d.ts +10 -0
  20. package/dist/layers/marker-icons.d.ts +0 -2
  21. package/dist/legend-spec.d.ts +1 -6
  22. package/dist/{lerc-B1LFm9ra.js → lerc-CPb8TKuv.js} +2 -2
  23. package/dist/onlymap.standalone.js +33275 -33257
  24. package/dist/onlymapjs.js +1 -1
  25. package/dist/programmatic.d.ts +0 -16
  26. package/dist/{raster-DQ1dS7mZ.js → raster-M2R7FhL7.js} +2 -2
  27. package/dist/{raster-pipeline-mXzwFf0A.js → raster-pipeline-Csa7n5SZ.js} +1 -1
  28. package/dist/react.js +215 -232
  29. package/dist/runtime-core.d.ts +34 -0
  30. package/dist/site-placement.d.ts +0 -2
  31. package/dist/version.d.ts +1 -1
  32. package/dist/{zarr-BSoVUvcs.js → zarr-tHnzENgX.js} +2 -2
  33. package/package.json +1 -1
  34. package/skills/onlymapjs/SKILL.md +1 -1
  35. package/skills/onlymapjs/references/syntax.md +2 -2
@@ -8,6 +8,31 @@ import type { LayerIR } from "./ir";
8
8
  import { type Selection } from "./selection";
9
9
  import type { ValidationEntry } from "./validation";
10
10
  import type { MapViewport } from "./basemap";
11
+ /**
12
+ * Composes the terrain + clip-box per-layer patches over a layer's own
13
+ * authored props (issue #36 — the 0.6.2 regression this replaces). The old
14
+ * inline merge fabricated an `extensions` key from the two patches ALONE
15
+ * whenever either patch OBJECT existed — and `applyTerrain` emits an identity
16
+ * patch (`extraProps: {}`) for every layer while terrain is INACTIVE, so on
17
+ * every flat map every layer got `extensions: []` spread over its authored
18
+ * array, silently unmounting PathStyleExtension (dash rendered solid) and
19
+ * DataFilterExtension (GPU filters stopped visually applying; widget stats
20
+ * stayed coherent via the CPU predicate, which is what hid it for six
21
+ * releases). Three rules restore the contract the patch builders' own tests
22
+ * already state:
23
+ *
24
+ * 1. An identity patch (no keys) is NOT a patch — authored props, extensions
25
+ * included, flow through untouched (return undefined; the constructor's
26
+ * `...layerProps` already carries them).
27
+ * 2. A patch that carries extensions already APPENDED them to the authored
28
+ * array (applyTerrain/applyClipBox both do) — never rebuild from scratch.
29
+ * 3. Both active: reference-dedup the concatenation — each patch's array
30
+ * starts with the SAME authored instances, and without the dedup a layer
31
+ * under terrain + clip box mounted every authored extension twice.
32
+ *
33
+ * Exported for direct unit testing (the lerpAngle precedent).
34
+ */
35
+ export declare function mergePatchExtraProps(authoredExtensions: unknown[] | undefined, terrainProps: Record<string, unknown> | undefined, clipProps: Record<string, unknown> | undefined): Record<string, unknown> | undefined;
11
36
  /** RouteLayer's own `onRouteResolved` report (spec: "Routing & Tracking") — a normalized Route plus its bounds. `bounds` drives `follow="fit-route"` here; the WHOLE object forwards to `RuntimeCoreCallbacks.onRouteResolved` (the `om-route-resolved` consumer event), so a page can read a provider-resolved route's geometry/distance/duration without re-fetching it. */
12
37
  interface RouteResolvedInfo {
13
38
  geometry?: {
@@ -369,6 +394,15 @@ export declare class RuntimeCore {
369
394
  * (none ↔ maplibre). Reads/seeds the camera from `this.viewState`.
370
395
  */
371
396
  private initRenderer;
397
+ /**
398
+ * The five pick/drag deck callbacks, shared verbatim by the lazy MapLibre
399
+ * adapter's deckProps and the standalone `new Deck` — one place to edit the
400
+ * pick path (they had drifted into two pasted copies). `onLoad`/`onError`
401
+ * stay per-branch: the basemap path wires load through `basemap.onLoad`.
402
+ * `toSelection`'s `type` param on drag is a required tag, not meaningful —
403
+ * the behavior dispatch (om-map.ts) uses its own "drag" event name.
404
+ */
405
+ private pickCallbacks;
372
406
  /** The current lighting as a deck `effects` array — [] restores deck's default lights. */
373
407
  private buildEffects;
374
408
  /**
@@ -103,5 +103,3 @@ export declare function localOffsetToLngLat(local: readonly [number, number], or
103
103
  */
104
104
  export declare function tilesetPlacementMatrix(baked: Matrix4, p: SitePlacement): Matrix4;
105
105
  export declare function tilesetBakedFrame(url: string, onReady: () => void): Matrix4 | null | undefined;
106
- /** Test seam — the cache is process-wide and would leak between cases. */
107
- export declare function resetSitePlacementCache(): void;
package/dist/version.d.ts CHANGED
@@ -5,4 +5,4 @@
5
5
  * the build rootDir, and a `define` would need repeating across vite/vitest/
6
6
  * vite-node configs.
7
7
  */
8
- export declare const LIBRARY_VERSION = "0.6.13";
8
+ export declare const LIBRARY_VERSION = "0.6.14";
@@ -1,5 +1,5 @@
1
- import { A as ur, d as lr, R as zt, e as fr, m as dr, p as St, f as hr, g as pr, h as mr } from "./raster-pipeline-mXzwFf0A.js";
2
- import { ap as gr } from "./index-CnKC1yuV.js";
1
+ import { A as ur, d as lr, R as zt, e as fr, m as dr, p as St, f as hr, g as pr, h as mr } from "./raster-pipeline-Csa7n5SZ.js";
2
+ import { ap as gr } from "./index-ESUJidEA.js";
3
3
  import $t from "./index-CW1n5LdO.js";
4
4
  var Et;
5
5
  function h(e, t, n) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nika-js/onlymap",
3
- "version": "0.6.13",
3
+ "version": "0.6.14",
4
4
  "description": "Declarative deck.gl maps for HTML and React — interactive WebGL mapping with GeoJSON/CSV/Arrow data, MapLibre basemaps, widgets, popups, and live streams from a custom-element manifest or typed React components. TypeScript, no build step.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "publishConfig": {
@@ -23,7 +23,7 @@ Use OnlyMapJS as a declarative HTML map library. Write custom elements such as `
23
23
  </script>
24
24
  ```
25
25
 
26
- For no-build CDN pages, use the single-file standalone bundle from a raw-file CDN — `https://unpkg.com/@nika-js/onlymap@0.6.13` (the bare package URL serves `dist/onlymap.standalone.js`) — plus `<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.6.13/dist/onlymapjs.css">`. Never a rebundling CDN (esm.sh, skypack): re-bundling duplicates the deck.gl/luma.gl runtime and every layer fails shader compilation.
26
+ For no-build CDN pages, use the single-file standalone bundle from a raw-file CDN — `https://unpkg.com/@nika-js/onlymap@0.6.14` (the bare package URL serves `dist/onlymap.standalone.js`) — plus `<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.6.14/dist/onlymapjs.css">`. Never a rebundling CDN (esm.sh, skypack): re-bundling duplicates the deck.gl/luma.gl runtime and every layer fails shader compilation.
27
27
 
28
28
  ## React Projects
29
29
 
@@ -16,8 +16,8 @@ Vite/npm project:
16
16
  Static CDN page (raw-file CDNs only — unpkg/jsDelivr; never esm.sh or another rebundling CDN, which duplicates the WebGL runtime and breaks layer shaders):
17
17
 
18
18
  ```html
19
- <link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.6.13/dist/onlymapjs.css">
20
- <script type="module" src="https://unpkg.com/@nika-js/onlymap@0.6.13"></script>
19
+ <link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.6.14/dist/onlymapjs.css">
20
+ <script type="module" src="https://unpkg.com/@nika-js/onlymap@0.6.14"></script>
21
21
  ```
22
22
 
23
23
  Always include `onlymapjs.css` — it carries the MapLibre basemap styles and the no-JS fallback rules (`<om-fallback>` / default banner). For the fallback to work in script-disabled previews it must load without JavaScript: a real `<link rel="stylesheet">` or inlined `<style>` on no-build pages (a bundler-emitted stylesheet is fine in npm projects).