@nika-js/onlymap 0.4.3 → 0.4.4

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/README.md +38 -7
  2. package/bin/onlymapjs.mjs +147 -11
  3. package/dist/{LercDecode.es-peqB7bxk.js → LercDecode.es-CgN9Gb9e.js} +1 -1
  4. package/dist/{basemap-BeKuGQJs.js → basemap-Bfn5Z__c.js} +168 -163
  5. package/dist/basemap.d.ts +3 -1
  6. package/dist/elements/om-map.d.ts +28 -0
  7. package/dist/{index-BKU3HvOO.js → index-C4cWRigY.js} +1 -1
  8. package/dist/{index-BPKvpqIk.js → index-CnitG1VX.js} +2 -2
  9. package/dist/{index-DzyVbu_T.js → index-KgO0MBqA.js} +12742 -12293
  10. package/dist/{index-DVnTYF5u.js → index-M8KfTTol.js} +1 -1
  11. package/dist/{index-Dg8SKcgV.js → index-lXrP3rPo.js} +1 -1
  12. package/dist/index.d.ts +4 -2
  13. package/dist/layout-audit.d.ts +53 -0
  14. package/dist/{lerc-DEpGyngt.js → lerc-l-QFh62d.js} +2 -2
  15. package/dist/onlymap.standalone.js +21022 -20568
  16. package/dist/onlymapjs.js +73 -62
  17. package/dist/programmatic.d.ts +3 -1
  18. package/dist/{raster-CX7Y4jtJ.js → raster-BBA_oI-d.js} +2 -2
  19. package/dist/react/context.d.ts +9 -1
  20. package/dist/react/om-map.d.ts +3 -1
  21. package/dist/react/om-widget.d.ts +3 -1
  22. package/dist/react.js +333 -202
  23. package/dist/runtime-core.d.ts +12 -1
  24. package/dist/version.d.ts +1 -1
  25. package/dist/widget-layout.d.ts +16 -0
  26. package/docs/basemaps.md +1 -1
  27. package/docs/react.md +2 -1
  28. package/docs/testing.md +10 -0
  29. package/llms.txt +1 -1
  30. package/onlymapjs.html-data.json +18 -0
  31. package/package.json +1 -1
  32. package/skills/onlymapjs/SKILL.md +2 -1
  33. package/skills/onlymapjs/references/react.md +2 -2
  34. package/skills/onlymapjs/references/syntax.md +3 -3
  35. package/skills/onlymapjs/references/testing.md +15 -0
package/dist/basemap.d.ts CHANGED
@@ -22,8 +22,10 @@ export declare class MapLibreBasemapAdapter {
22
22
  private overlay;
23
23
  /** Our own compact attribution control (spec: "attribution becomes correct, not optional") — undefined when the author opted out. */
24
24
  private attribution?;
25
+ private attributionElement?;
25
26
  private attributionText?;
26
27
  private showAttribution;
28
+ private attributionHost?;
27
29
  /**
28
30
  * One-time "has the map initialized at least once" flag, set by the first
29
31
  * `load` event. Deliberately NOT `this.map.loaded()` — that method means
@@ -46,7 +48,7 @@ export declare class MapLibreBasemapAdapter {
46
48
  zoom: number;
47
49
  pitch?: number;
48
50
  bearing?: number;
49
- }, deckProps: DeckProps, showAttribution?: boolean);
51
+ }, deckProps: DeckProps, showAttribution?: boolean, attributionHost?: HTMLElement);
50
52
  /** Snapshot capture queue for the overlay's deck canvas — see captureComposite. */
51
53
  private deckCaptures;
52
54
  /** In-flight captureComposite rejects — destroy() settles them so a caller never hangs on a torn-down renderer. */
@@ -66,6 +66,14 @@ export declare class OmMapElement extends HTMLElementBase {
66
66
  /** Library-owned stacking layer: one absolutely-positioned flex container per managed slot, created lazily. Rendering plumbing, never authored state. */
67
67
  private widgetLayer;
68
68
  private readonly slotContainers;
69
+ private readonly mandatedChromeHosts;
70
+ private widgetResizeObserver;
71
+ private widgetsFolded;
72
+ private foldPassPending;
73
+ private inFoldPass;
74
+ private readonly foldMapId;
75
+ private readonly foldedWidgetSlots;
76
+ private readonly foldDrawers;
69
77
  /**
70
78
  * Is this node layout plumbing (the widget layer, slot containers, or
71
79
  * cluster wrappers)? Their childList churn is rendering, not manifest
@@ -84,7 +92,27 @@ export declare class OmMapElement extends HTMLElementBase {
84
92
  private readonly slotAnchors;
85
93
  /** The widget layer div — lazy, shared by slot containers AND the layout tokens (both lanes put tokens on the layer, never on an authored element). */
86
94
  private ensureWidgetLayer;
95
+ private ensureSlotContainer;
96
+ /**
97
+ * Provider attribution and the free-license badge are immutable members of
98
+ * managed slots. Their stable wrappers stay front-end-owned while renderer
99
+ * adapters mount/unmount the actual controls inside.
100
+ */
101
+ private ensureMandatedChromeHost;
87
102
  slotWidgetInternal(el: HTMLElement, slot: WidgetSlot): void;
103
+ /** Called by <om-widget> when its live `fold` attribute changes. */
104
+ refreshWidgetFoldInternal(): void;
105
+ private startWidgetFoldObserver;
106
+ private foldBreakpointPx;
107
+ private measureWidgetFold;
108
+ private updateWidgetFoldForWidth;
109
+ private scheduleFoldPass;
110
+ private shouldFoldWidget;
111
+ private ensureFoldDrawer;
112
+ private setFoldDrawerOpen;
113
+ private focusFirstIn;
114
+ private restoreFoldedWidget;
115
+ private runFoldPass;
88
116
  private clusterPassPending;
89
117
  /** Re-entry guard: the pass's own reparenting fires connect callbacks that call back into scheduleClusterPass — self-inflicted, never re-schedule. */
90
118
  private inClusterPass;
@@ -1,4 +1,4 @@
1
- import { ai as Bt, ak as Xt, al as Yt, am as Us } from "./index-DzyVbu_T.js";
1
+ import { ai as Bt, ak as Xt, al as Yt, am as Us } from "./index-KgO0MBqA.js";
2
2
  import { w as gs, t as Hs, f as Ws, m as Qs } from "./mgrs-BY9bIvp4.js";
3
3
  import { c as Xs } from "./convert-arrow-schema-DrAihRf9.js";
4
4
  import { y as Ys, A as bt, a as Ks, z as Vs, R as Zs } from "./recordbatch-Bpc0uxFn.js";
@@ -1,5 +1,5 @@
1
- import { i as E, j as S, k as R, n as N, o as h, p as w, q as O, s as W, r as x, t as I, v as B, w as _, x as P, y as k, A as $, B as z, E as v, F, H as C, I as U, J as p, K as M } from "./index-DzyVbu_T.js";
2
- import { N as $e, R as ze, _ as ve, O as Ce, P as Ue, Q as Me, S as je, T as De, U as Je, X as qe, Y as He, Z as Ve, $ as Ge, a0 as Ke, a1 as Qe, a2 as Xe, a3 as Ye, a4 as Ze, a5 as et, a6 as tt, a7 as nt, a8 as rt, a9 as at, aa as st, ab as ot } from "./index-DzyVbu_T.js";
1
+ import { i as E, j as S, k as R, n as N, o as h, p as w, q as O, s as W, r as x, t as I, v as B, w as _, x as P, y as k, A as $, B as z, E as v, F, H as C, I as U, J as p, K as M } from "./index-KgO0MBqA.js";
2
+ import { N as $e, R as ze, _ as ve, O as Ce, P as Ue, Q as Me, S as je, T as De, U as Je, X as qe, Y as He, Z as Ve, $ as Ge, a0 as Ke, a1 as Qe, a2 as Xe, a3 as Ye, a4 as Ze, a5 as et, a6 as tt, a7 as nt, a8 as rt, a9 as at, aa as st, ab as ot } from "./index-KgO0MBqA.js";
3
3
  import { g as j, i as D } from "./table-accessors-CYWTzpQI.js";
4
4
  async function J(t, e, n = {}, r = {}) {
5
5
  const a = E(t), s = S.getWorkerFarm(n), { source: o } = n, c = { name: a, source: o };