@nika-js/onlymap 0.1.1 → 0.2.1

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 (40) hide show
  1. package/.vscode/onlymap.code-snippets +4 -4
  2. package/README.md +28 -6
  3. package/dist/attribute-resolution.d.ts +39 -0
  4. package/dist/{basemap-D95W0IIA.js → basemap-COurZNDH.js} +2126 -2105
  5. package/dist/basemap-registry.d.ts +49 -0
  6. package/dist/basemap.d.ts +22 -2
  7. package/dist/html-data.d.ts +2 -2
  8. package/dist/{index-Do7hmHwi.js → index-COu-3-gN.js} +1 -1
  9. package/dist/{index-D74olQ9w.js → index-CgyAD98B.js} +1 -1
  10. package/dist/{index-CU-iOTdr.js → index-CvfuISOc.js} +14602 -14137
  11. package/dist/{index-C9w78NS9.js → index-D-X8KPA1.js} +1 -1
  12. package/dist/{index-BFjXVHly.js → index-DuvXK95V.js} +2 -2
  13. package/dist/index.d.ts +10 -0
  14. package/dist/ir-diff.d.ts +16 -0
  15. package/dist/onlymapjs.js +29 -24
  16. package/dist/onlymapjs.umd.cjs +265 -259
  17. package/dist/programmatic.d.ts +186 -0
  18. package/dist/react/context.d.ts +25 -0
  19. package/dist/react/index.d.ts +20 -0
  20. package/dist/react/om-layer.d.ts +38 -0
  21. package/dist/react/om-map.d.ts +33 -0
  22. package/dist/react/om-overlay.d.ts +27 -0
  23. package/dist/react/om-widget.d.ts +9 -0
  24. package/dist/react/use-om-map.d.ts +2 -0
  25. package/dist/react.js +280 -0
  26. package/dist/runtime-core.d.ts +34 -1
  27. package/dist/widget-registry.d.ts +2 -0
  28. package/docs/3d-assets.md +74 -0
  29. package/docs/basemaps.md +89 -0
  30. package/docs/live-data.md +83 -0
  31. package/docs/react.md +120 -0
  32. package/docs/stories.md +134 -0
  33. package/docs/testing.md +165 -0
  34. package/llms.txt +8 -4
  35. package/onlymapjs.html-data.json +57 -1
  36. package/package.json +24 -2
  37. package/skills/onlymapjs/SKILL.md +15 -3
  38. package/skills/onlymapjs/references/patterns.md +2 -2
  39. package/skills/onlymapjs/references/react.md +68 -0
  40. package/skills/onlymapjs/references/syntax.md +6 -2
@@ -1,4 +1,4 @@
1
- import { a2 as _t, a3 as Ct } from "./index-CU-iOTdr.js";
1
+ import { a2 as _t, a3 as Ct } from "./index-CvfuISOc.js";
2
2
  function Yt(e, r, t = 2, i, o = "xy") {
3
3
  const s = r && r.length, l = s ? r[0] * t : e.length;
4
4
  let c = Ut(e, 0, l, t, !0, i && i[0], o);
@@ -1,8 +1,8 @@
1
1
  var R = Object.defineProperty;
2
2
  var N = (t, e, r) => e in t ? R(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
3
  var u = (t, e, r) => N(t, typeof e != "symbol" ? e + "" : e, r);
4
- import { c as W, W as x, d as O, e as _, f as m, h as g, j as P, s as z, n as I, k as B, m as k, o as $, p as C, q as M, r as U, u as F, v as D, w as L, x as j, y as v, z as T, A as J } from "./index-CU-iOTdr.js";
5
- import { F as Ue, R as De, _ as je, B as ve, C as Je, D as qe, E as Ve, G as Ge, H as He, I as Ke, J as Qe, K as Xe, L as Ye, M as Ze, N as er, O as rr, P as tr, Q as nr, S as ar, T as sr, U as cr, V as or, X as ir, Y as ur, Z as fr } from "./index-CU-iOTdr.js";
4
+ import { c as W, W as x, d as O, e as _, f as m, h as g, j as P, s as z, n as I, k as B, m as k, o as $, p as C, q as F, r as M, u as U, v as D, w as L, x as j, y as v, z as T, A as J } from "./index-CvfuISOc.js";
5
+ import { F as Ue, R as De, _ as je, B as ve, C as Je, D as qe, E as Ve, G as Ge, H as He, I as Ke, J as Qe, K as Xe, L as Ye, M as Ze, N as er, O as rr, P as tr, Q as nr, S as ar, T as sr, U as cr, V as or, X as ir, Y as ur, Z as fr } from "./index-CvfuISOc.js";
6
6
  import { g as q, i as V } from "./table-accessors-DBjWgN0C.js";
7
7
  async function G(t, e, r = {}, n = {}) {
8
8
  const a = W(t), s = x.getWorkerFarm(r), { source: c } = r, o = { name: a, source: c };
package/dist/index.d.ts CHANGED
@@ -24,6 +24,7 @@ import { registerLayer, getLayerSchema } from "./layer-registry";
24
24
  import { registerSource, registerFormat, configureData } from "./data-layer";
25
25
  import { registerWidget } from "./widget-registry";
26
26
  import { registerAction } from "./actions";
27
+ import { registerBasemap, configureBasemap } from "./basemap-registry";
27
28
  import { validateManifestString } from "./validation";
28
29
  import { snapshotIR } from "./ir-snapshot";
29
30
  export { registerLayer, getLayerSchema } from "./layer-registry";
@@ -38,7 +39,14 @@ export { configureData } from "./data-layer";
38
39
  export type { DataRequestConfig } from "./data-layer";
39
40
  export { registerWidget } from "./widget-registry";
40
41
  export type { WidgetImpl, WidgetHost } from "./widget-registry";
42
+ export { registerBasemap, configureBasemap, getBasemap } from "./basemap-registry";
43
+ export type { BasemapPreset, BasemapStyle } from "./basemap-registry";
41
44
  export type { RuntimeContext } from "./ctx";
45
+ export { MapController, descriptorToIR } from "./programmatic";
46
+ export type { LayerDescriptor, MapControllerOptions, CameraState, OverlayPositioner, PickListener } from "./programmatic";
47
+ export type { Selection } from "./selection";
48
+ export type { CameraOptions } from "./runtime-core";
49
+ export type { MapViewport } from "./basemap";
42
50
  export { registerAction } from "./actions";
43
51
  export type { ActionHandler } from "./actions";
44
52
  export { validateManifestString, validateManifest } from "./validation";
@@ -70,6 +78,8 @@ export declare const OmMap: {
70
78
  registerAction: typeof registerAction;
71
79
  registerFormat: typeof registerFormat;
72
80
  registerSource: typeof registerSource;
81
+ registerBasemap: typeof registerBasemap;
82
+ configureBasemap: typeof configureBasemap;
73
83
  configureData: typeof configureData;
74
84
  validate: typeof validateManifestString;
75
85
  snapshotIR: typeof snapshotIR;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Reconcile-pass diff over the layer IR (spec: "Reactivity — the watch
3
+ * declaration"), shared by both front-ends (HU2): decides which narrow
4
+ * `data:<id>` watch tokens fire and whether `layers` (added/removed/
5
+ * visibility toggled) should. Reference equality only, matching the
6
+ * "stable reference" discipline used throughout — a layer's `data` array
7
+ * is the same reference across reconciles unless it genuinely reloaded.
8
+ */
9
+ import type { LayerIR } from "./ir";
10
+ export interface LayerIRDiff {
11
+ /** Layers whose `data` reference changed (or that are new) — fires `data:<id>` tokens. */
12
+ changedDataIds: Set<string>;
13
+ /** A layer was added/removed or toggled visibility — fires the `layers` token. */
14
+ layersChanged: boolean;
15
+ }
16
+ export declare function diffLayerIRs(previous: ReadonlyMap<string, LayerIR>, next: ReadonlyMap<string, LayerIR>): LayerIRDiff;
package/dist/onlymapjs.js CHANGED
@@ -1,30 +1,35 @@
1
- import { an as e, ao as r, ap as o, aq as t, ar as i, as as n, at as l, au as m, av as c, aw as p, ax as u, ay as g, az as d, aA as x, aB as S, aC as b, aD as w, aE as A, aF as C, aG as M, aH as f, aI as v, aJ as y, aK as D, aL as F, aM as I, aN as T } from "./index-CU-iOTdr.js";
1
+ import { an as e, ao as r, ap as o, aq as t, ar as i, as as n, at as l, au as m, av as c, aw as p, ax as g, ay as u, az as d, aA as x, aB as S, aC as B, aD as C, aE as M, aF as b, aG as f, aH as w, aI as A, aJ as I, aK as T, aL as v, aM as y, aN as D, aO as F, aP as R, aQ as h, aR as E, aS as L } from "./index-CvfuISOc.js";
2
2
  export {
3
3
  e as AccessorCache,
4
4
  r as CompileError,
5
- o as OmMap,
6
- t as arrowTableToColumnar,
7
- i as asRows,
8
- n as compileExpression,
9
- l as compileFullJsAccessorBlockInSandbox,
10
- m as computeTimeline,
11
- c as configureData,
12
- p as destroySandbox,
13
- u as evaluateInSandbox,
14
- g as getLayerSchema,
15
- d as isBrowser,
16
- x as isColumnar,
17
- S as mountForTest,
18
- b as normalizeData,
5
+ o as MapController,
6
+ t as OmMap,
7
+ i as arrowTableToColumnar,
8
+ n as asRows,
9
+ l as compileExpression,
10
+ m as compileFullJsAccessorBlockInSandbox,
11
+ c as computeTimeline,
12
+ p as configureBasemap,
13
+ g as configureData,
14
+ u as descriptorToIR,
15
+ d as destroySandbox,
16
+ x as evaluateInSandbox,
17
+ S as getBasemap,
18
+ B as getLayerSchema,
19
+ C as isBrowser,
20
+ M as isColumnar,
21
+ b as mountForTest,
22
+ f as normalizeData,
19
23
  w as parseDurationMs,
20
24
  A as registerAction,
21
- C as registerFormat,
22
- M as registerLayer,
23
- f as registerSource,
24
- v as registerWidget,
25
- y as rowAt,
26
- D as sandboxHtml,
27
- F as snapshotIR,
28
- I as validateManifest,
29
- T as validateManifestString
25
+ I as registerBasemap,
26
+ T as registerFormat,
27
+ v as registerLayer,
28
+ y as registerSource,
29
+ D as registerWidget,
30
+ F as rowAt,
31
+ R as sandboxHtml,
32
+ h as snapshotIR,
33
+ E as validateManifest,
34
+ L as validateManifestString
30
35
  };