@nika-js/onlymap 0.4.0 → 0.4.2

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/dist/onlymapjs.js CHANGED
@@ -1,59 +1,67 @@
1
- import { ay as e, az as r, aA as o, aB as t, aq as i, aC as n, aD as b, aE as l, aF as c, aG as g, aH as m, aI as p, aJ as L, aK as T, ap as y, aL as S, ax as u, W as d, aM as E, aN as M, aO as A, aP as I, aQ as f, aR as x, aS as C, aT as h, aU as B, aV as D, aW as R, aX as w, aY as v, aZ as F, a_ as G, a$ as N, b0 as O, b1 as W, b2 as _, b3 as k, b4 as z, b5 as H, b6 as J, b7 as P, b8 as V, b9 as Y, ba as j, bb as q, bc as K, bd as Q, be as U, bf as X, bg as Z, bh as $, bi as aa, bj as sa, bk as ea, bl as ra } from "./index-BoxZ3Mec.js";
1
+ import { ay as e, az as r, aA as o, aB as t, aC as i, aq as n, aD as b, aE as l, aF as S, aG as L, aH as p, aI as c, aJ as g, aK as m, aL as T, aM as y, aN as E, ap as A, aO as I, ax as u, aP as d, W as M, aQ as _, aR as C, aS as D, aT as O, aU as f, aV as x, aW as N, aX as h, aY as B, aZ as G, a_ as R, a$ as W, b0 as v, b1 as w, b2 as Y, b3 as F, b4 as P, b5 as k, b6 as z, b7 as H, b8 as J, b9 as V, ba as q, bb as K, bc as U, bd as j, be as Q, bf as X, bg as Z, bh as $, bi as aa, bj as sa, bk as ea, bl as ra, bm as oa, bn as ta, bo as ia, bp as na, bq as ba, br as la, bs as Sa, bt as La } from "./index-ULsb51al.js";
2
2
  export {
3
- e as AccessorCache,
4
- r as BitmapLayer,
5
- o as COORDINATE_SYSTEM,
6
- t as CompileError,
7
- i as CompositeLayer,
8
- n as GeoJsonLayer,
9
- b as IconLayer,
10
- l as LIGHTING_PRESET_NAMES,
11
- c as Layer,
12
- g as LayerExtension,
3
+ e as ALL_POSITION_VALUES,
4
+ r as AccessorCache,
5
+ o as BitmapLayer,
6
+ t as COORDINATE_SYSTEM,
7
+ i as CompileError,
8
+ n as CompositeLayer,
9
+ b as GeoJsonLayer,
10
+ l as IconLayer,
11
+ S as LEGACY_POSITION_ALIASES,
12
+ L as LIGHTING_PRESET_NAMES,
13
+ p as Layer,
14
+ c as LayerExtension,
15
+ g as MANAGED_SLOTS,
13
16
  m as MapController,
14
- p as OmMap,
15
- L as ScatterplotLayer,
16
- T as ScenegraphLayer,
17
- y as SimpleMeshLayer,
18
- S as Tile3DLayer,
17
+ T as OmMap,
18
+ y as ScatterplotLayer,
19
+ E as ScenegraphLayer,
20
+ A as SimpleMeshLayer,
21
+ I as Tile3DLayer,
19
22
  u as TileLayer,
20
- d as WebMercatorViewport,
21
- E as arrowTableToColumnar,
22
- M as asRows,
23
- A as compileExpression,
24
- I as compileFullJsAccessorBlockInSandbox,
23
+ d as WIDGET_STYLE_KEY_NAMES,
24
+ M as WebMercatorViewport,
25
+ _ as arrowTableToColumnar,
26
+ C as asRows,
27
+ D as compileExpression,
28
+ O as compileFullJsAccessorBlockInSandbox,
25
29
  f as computeTimeline,
26
30
  x as configureBasemap,
27
- C as configureData,
31
+ N as configureData,
28
32
  h as configureLicense,
29
33
  B as configureTelemetry,
30
- D as descriptorToIR,
34
+ G as descriptorToIR,
31
35
  R as destroySandbox,
32
- w as evaluateInSandbox,
36
+ W as evaluateInSandbox,
33
37
  v as getBasemap,
34
- F as getEntitlements,
35
- G as getLayerSchema,
36
- N as getTerrain,
37
- O as isBrowser,
38
- W as isColumnar,
39
- _ as isStoreToken,
40
- k as loadRasterModule,
41
- z as mountForTest,
42
- H as normalizeData,
43
- J as parseDurationMs,
44
- P as parseTerrainAttrs,
45
- V as registerAction,
46
- Y as registerBasemap,
47
- j as registerFormat,
48
- q as registerLayer,
49
- K as registerSource,
50
- Q as registerTerrain,
51
- U as registerWidget,
52
- X as resolveLighting,
53
- Z as rowAt,
54
- $ as sandboxHtml,
55
- aa as snapshotIR,
56
- sa as solarAzElDegrees,
57
- ea as validateManifest,
58
- ra as validateManifestString
38
+ w as getEntitlements,
39
+ Y as getLayerSchema,
40
+ F as getTerrain,
41
+ P as isBrowser,
42
+ k as isColumnar,
43
+ z as isStoreToken,
44
+ H as loadRasterModule,
45
+ J as mountForTest,
46
+ V as normalizeData,
47
+ q as parseDurationMs,
48
+ K as parseTerrainAttrs,
49
+ U as parseWidgetStyle,
50
+ j as registerAction,
51
+ Q as registerBasemap,
52
+ X as registerFormat,
53
+ Z as registerLayer,
54
+ $ as registerSource,
55
+ aa as registerTerrain,
56
+ sa as registerWidget,
57
+ ea as resolveLighting,
58
+ ra as resolveSlot,
59
+ oa as rowAt,
60
+ ta as sandboxHtml,
61
+ ia as slotContainerStyle,
62
+ na as slotLayout,
63
+ ba as snapshotIR,
64
+ la as solarAzElDegrees,
65
+ Sa as validateManifest,
66
+ La as validateManifestString
59
67
  };
@@ -1,5 +1,5 @@
1
1
  import { w as kt, t as Ni, f as Oi, m as Ri } from "./mgrs-BY9bIvp4.js";
2
- import { an as Fi, ao as zi, ap as Ks, aq as Ws, ar as Di, b as Bi, as as Ui, l as es, at as ki, d as qi, au as Ki, av as Wi, aw as Xi, ax as Xs } from "./index-BoxZ3Mec.js";
2
+ import { an as Fi, ao as zi, ap as Ks, aq as Ws, ar as Di, b as Bi, as as Ui, l as es, at as ki, d as qi, au as Ki, av as Wi, aw as Xi, ax as Xs } from "./index-ULsb51al.js";
3
3
  function Hi(t, e, s) {
4
4
  const { projectedCorners: i } = e, { topLeft: a, topRight: r, bottomRight: o, bottomLeft: n } = i, h = s(a[0], a[1]), l = s(r[0], r[1]), c = s(o[0], o[1]), u = s(n[0], n[1]), d = [
5
5
  h,
@@ -2377,7 +2377,7 @@ it.set(G.Zstd, () => import("./zstd-jXobGRcq.js").then((t) => t.decode));
2377
2377
  it.set(G.Jpeg, () => Promise.resolve(ke));
2378
2378
  it.set(G.Jpeg6, () => Promise.resolve(ke));
2379
2379
  it.set(G.Webp, () => Promise.resolve(ke));
2380
- it.set(G.Lerc, () => import("./lerc-CSc9BX_F.js").then((t) => t.l).then((t) => t.decode));
2380
+ it.set(G.Lerc, () => import("./lerc-DsrKzmOh.js").then((t) => t.l).then((t) => t.decode));
2381
2381
  async function qe(t, e, s) {
2382
2382
  const i = it.get(e);
2383
2383
  if (!i)
@@ -1,12 +1,14 @@
1
1
  import type { MapController, LayerDescriptor } from "@nika-js/onlymap";
2
- export type WidgetPosition = "top-left" | "top-right" | "bottom-left" | "bottom-right";
2
+ import type { ManagedSlot } from "@nika-js/onlymap";
3
+ /** A managed slot (spec: "Widget Layout Manager"), a legacy corner alias, or the author-styled `manual` tier. */
4
+ export type WidgetPosition = ManagedSlot | "manual" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
3
5
  export interface OmMapContextValue {
4
6
  controller: MapController;
5
7
  layers: LayerRegistry;
6
8
  /** The pane <OmOverlay> portals into — absolutely positioned above the canvas, pointer-events: none. */
7
9
  overlayPane: HTMLDivElement;
8
- /** Corner containers <OmWidget> portals into (filled as OmMap's own DOM mounts). */
9
- corners: Readonly<Record<WidgetPosition, HTMLDivElement | null>>;
10
+ /** Slot containers <OmWidget> portals into (filled as OmMap's own DOM mounts). */
11
+ corners: Readonly<Record<ManagedSlot, HTMLDivElement | null>>;
10
12
  }
11
13
  export declare const OmMapContext: import("react").Context<OmMapContextValue | null>;
12
14
  export declare function useOmMapContext(caller: string): OmMapContextValue;
@@ -18,6 +18,10 @@ export interface OmMapProps {
18
18
  width?: number;
19
19
  height?: number;
20
20
  };
21
+ /** Layout-token sugar, the `widget-style` attribute's twin: `"gap:10 opacity:0.9"` → `--om-widget-*` custom properties on the widget layer. */
22
+ widgetStyle?: string;
23
+ /** Hide-all, the `widgets-hidden` attribute's twin: hides every slot container (visibility, not removal — widget state survives). MapLibre's attribution control is outside the layer and never hides. */
24
+ widgetsHidden?: boolean;
21
25
  className?: string;
22
26
  style?: CSSProperties;
23
27
  children?: ReactNode;
@@ -1,9 +1,12 @@
1
1
  import type { CSSProperties, ReactNode } from "react";
2
2
  import { type WidgetPosition } from "./context";
3
3
  export interface OmWidgetProps {
4
+ /** A managed slot (`top-start` … `bottom-end`), a legacy corner alias, or `manual`. Default `top-start`. */
4
5
  position?: WidgetPosition;
6
+ /** Deterministic in-slot ordering (flex `order`); default is mount order. */
7
+ order?: number;
5
8
  className?: string;
6
9
  style?: CSSProperties;
7
10
  children?: ReactNode;
8
11
  }
9
- export declare function OmWidget({ position, className, style, children }: OmWidgetProps): ReactNode;
12
+ export declare function OmWidget({ position, order, className, style, children }: OmWidgetProps): ReactNode;