@nika-js/onlymap 0.4.3 → 0.4.6
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/README.md +44 -11
- package/bin/onlymapjs.mjs +160 -11
- package/dist/{LercDecode.es-peqB7bxk.js → LercDecode.es-B49qauXg.js} +1 -1
- package/dist/{basemap-BeKuGQJs.js → basemap-nJ_ODY7r.js} +168 -163
- package/dist/basemap.d.ts +3 -1
- package/dist/elements/om-map.d.ts +68 -0
- package/dist/{index-BPKvpqIk.js → index-CeOjfL2p.js} +2 -2
- package/dist/{index-DzyVbu_T.js → index-DSkgI4Oc.js} +12996 -12463
- package/dist/{index-BKU3HvOO.js → index-DjlGZov2.js} +1 -1
- package/dist/{index-DVnTYF5u.js → index-o_yRv2lD.js} +1 -1
- package/dist/{index-Dg8SKcgV.js → index-uDJbHjA9.js} +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/layer-registry.d.ts +8 -0
- package/dist/layout-audit.d.ts +53 -0
- package/dist/{lerc-DEpGyngt.js → lerc-CaQOmDCP.js} +2 -2
- package/dist/onlymap.standalone.js +22201 -21663
- package/dist/onlymapjs.js +78 -63
- package/dist/programmatic.d.ts +7 -1
- package/dist/{raster-CX7Y4jtJ.js → raster-DMq8FgiV.js} +2 -2
- package/dist/react/context.d.ts +9 -1
- package/dist/react/om-map.d.ts +3 -1
- package/dist/react/om-widget.d.ts +3 -1
- package/dist/react.js +336 -204
- package/dist/runtime-core.d.ts +20 -1
- package/dist/testing.d.ts +6 -0
- package/dist/version.d.ts +1 -1
- package/dist/widget-layout.d.ts +36 -0
- package/docs/basemaps.md +1 -1
- package/docs/react.md +2 -1
- package/docs/testing.md +13 -1
- package/llms.txt +2 -2
- package/onlymapjs.html-data.json +18 -0
- package/package.json +2 -2
- package/skills/onlymapjs/SKILL.md +3 -2
- package/skills/onlymapjs/references/react.md +2 -2
- package/skills/onlymapjs/references/syntax.md +4 -4
- package/skills/onlymapjs/references/testing.md +16 -0
package/dist/onlymapjs.js
CHANGED
|
@@ -1,67 +1,82 @@
|
|
|
1
|
-
import { ay as e, az as r, aA as o, aB as t, aC as
|
|
1
|
+
import { ay as e, az as r, aA as o, aB as t, aC as l, aD as b, aq as i, aE as n, aF as S, aG as L, aH as T, aI as E, aJ as g, aK as p, aL as y, aM as A, aN as d, aO as c, aP as m, aQ as I, aR as _, aS as D, aT as u, ap as O, aU as M, ax as f, aV as F, W as C, aW as N, aX as P, aY as x, aZ as B, a_ as R, a$ as h, b0 as G, b1 as W, b2 as v, b3 as w, b4 as H, b5 as U, b6 as Y, b7 as X, b8 as k, b9 as z, ba as J, bb as K, bc as V, bd as q, be as j, bf as Q, 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 la, bp as ba, bq as ia, br as na, bs as Sa, bt as La, bu as Ta, bv as Ea, bw as ga, bx as pa, by as ya, bz as Aa, bA as da, bB as ca, bC as ma, bD as Ia, bE as _a, bF as Da, bG as ua, bH as Oa, bI as Ma } from "./index-DSkgI4Oc.js";
|
|
2
2
|
export {
|
|
3
3
|
e as ALL_POSITION_VALUES,
|
|
4
|
-
r as
|
|
5
|
-
o as
|
|
6
|
-
t as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
S as
|
|
12
|
-
L as
|
|
13
|
-
|
|
4
|
+
r as AUDIT_EXEMPTIONS,
|
|
5
|
+
o as AccessorCache,
|
|
6
|
+
t as BitmapLayer,
|
|
7
|
+
l as COORDINATE_SYSTEM,
|
|
8
|
+
b as CompileError,
|
|
9
|
+
i as CompositeLayer,
|
|
10
|
+
n as DEFAULT_AUDIT_WIDTHS,
|
|
11
|
+
S as DEFAULT_FOLD_BREAKPOINT_PX,
|
|
12
|
+
L as EDGE_TOLERANCE_PX,
|
|
13
|
+
T as FOLD_HYSTERESIS_PX,
|
|
14
|
+
E as FOLD_SIDES,
|
|
15
|
+
g as GeoJsonLayer,
|
|
16
|
+
p as IconLayer,
|
|
17
|
+
y as LEGACY_POSITION_ALIASES,
|
|
18
|
+
A as LIGHTING_PRESET_NAMES,
|
|
19
|
+
d as Layer,
|
|
14
20
|
c as LayerExtension,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
21
|
+
m as MANAGED_SLOTS,
|
|
22
|
+
I as MapController,
|
|
23
|
+
_ as OmMap,
|
|
24
|
+
D as ScatterplotLayer,
|
|
25
|
+
u as ScenegraphLayer,
|
|
26
|
+
O as SimpleMeshLayer,
|
|
27
|
+
M as Tile3DLayer,
|
|
28
|
+
f as TileLayer,
|
|
29
|
+
F as WIDGET_STYLE_KEY_NAMES,
|
|
30
|
+
C as WebMercatorViewport,
|
|
31
|
+
N as arrowTableToColumnar,
|
|
32
|
+
P as asRows,
|
|
33
|
+
x as auditLayout,
|
|
34
|
+
B as compileExpression,
|
|
35
|
+
R as compileFullJsAccessorBlockInSandbox,
|
|
36
|
+
h as computeTimeline,
|
|
37
|
+
G as configureBasemap,
|
|
38
|
+
W as configureData,
|
|
39
|
+
v as configureLicense,
|
|
40
|
+
w as configureTelemetry,
|
|
41
|
+
H as descriptorToIR,
|
|
42
|
+
U as destroySandbox,
|
|
43
|
+
Y as evaluateInSandbox,
|
|
44
|
+
X as foldDrawerStyle,
|
|
45
|
+
k as foldPanelStyle,
|
|
46
|
+
z as foldSideForSlot,
|
|
47
|
+
J as foldToggleSlot,
|
|
48
|
+
K as foldToggleStyle,
|
|
49
|
+
V as getBasemap,
|
|
50
|
+
q as getEntitlements,
|
|
51
|
+
j as getLayerSchema,
|
|
52
|
+
Q as getTerrain,
|
|
53
|
+
Z as isBrowser,
|
|
54
|
+
$ as isColumnar,
|
|
55
|
+
aa as isStoreToken,
|
|
56
|
+
sa as loadRasterModule,
|
|
57
|
+
ea as mountForTest,
|
|
58
|
+
ra as normalizeData,
|
|
59
|
+
oa as parseDurationMs,
|
|
60
|
+
ta as parseTerrainAttrs,
|
|
61
|
+
la as parseWidgetStyle,
|
|
62
|
+
ba as registerAction,
|
|
63
|
+
ia as registerBasemap,
|
|
64
|
+
na as registerFormat,
|
|
65
|
+
Sa as registerLayer,
|
|
66
|
+
La as registerSource,
|
|
67
|
+
Ta as registerTerrain,
|
|
68
|
+
Ea as registerWidget,
|
|
69
|
+
ga as resolveFoldBreakpointPx,
|
|
70
|
+
pa as resolveLighting,
|
|
71
|
+
ya as resolveSlot,
|
|
72
|
+
Aa as rowAt,
|
|
73
|
+
da as sandboxHtml,
|
|
74
|
+
ca as settleLayout,
|
|
75
|
+
ma as shouldFoldAtWidth,
|
|
76
|
+
Ia as slotContainerStyle,
|
|
77
|
+
_a as slotLayout,
|
|
78
|
+
Da as snapshotIR,
|
|
79
|
+
ua as solarAzElDegrees,
|
|
80
|
+
Oa as validateManifest,
|
|
81
|
+
Ma as validateManifestString
|
|
67
82
|
};
|
package/dist/programmatic.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* through its own event handlers and state (spec: HU2 "the catch"), reading
|
|
15
15
|
* runtime state through the same RuntimeContext contract widgets get (HU5).
|
|
16
16
|
*/
|
|
17
|
-
import { type CameraOptions } from "./runtime-core";
|
|
17
|
+
import { type CameraOptions, type MandatedChromeHosts } from "./runtime-core";
|
|
18
18
|
import { type LightingIR, type LightingOptions } from "./scene-lighting";
|
|
19
19
|
import type { TerrainIR } from "./terrain";
|
|
20
20
|
import { type SnapshotOptions } from "./snapshot";
|
|
@@ -106,6 +106,12 @@ export interface MapControllerOptions {
|
|
|
106
106
|
onViewChange?: (view: CameraState, origin: ViewOrigin) => void;
|
|
107
107
|
/** Scene lighting (spec: "Scene Lighting") — the lighting* attributes' programmatic twin; omit for deck's default lights. */
|
|
108
108
|
lighting?: LightingOptions;
|
|
109
|
+
/** Every click/hover's map coordinate, including empty-map events — the `om-map-point` DOM event's twin (custom sketch/capture tools). */
|
|
110
|
+
onMapPoint?: (coordinate: [number, number] | null, kind: "click" | "hover") => void;
|
|
111
|
+
/** A Tile3DLayer finished loading its root tileset — the `om-tileset-load` DOM event's twin; `tileset` is the live deck `Tileset3D`. */
|
|
112
|
+
onTilesetLoad?: (layerId: string, tileset: unknown) => void;
|
|
113
|
+
/** @internal Stable React-owned hosts that place required chrome in managed slots. */
|
|
114
|
+
chromeHosts?: MandatedChromeHosts;
|
|
109
115
|
}
|
|
110
116
|
/** Descriptor → layer IR: the programmatic counterpart of one parse-manifest.ts loop iteration. */
|
|
111
117
|
export declare function descriptorToIR(desc: LayerDescriptor, onDataLoaded: () => void): LayerIR | null;
|
|
@@ -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-
|
|
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-DSkgI4Oc.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-
|
|
2380
|
+
it.set(G.Lerc, () => import("./lerc-CaQOmDCP.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)
|
package/dist/react/context.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { MapController, LayerDescriptor } from "@nika-js/onlymap";
|
|
2
|
-
import type { ManagedSlot } from "@nika-js/onlymap";
|
|
2
|
+
import type { FoldSide, ManagedSlot } from "@nika-js/onlymap";
|
|
3
3
|
/** A managed slot (spec: "Widget Layout Manager"), a legacy corner alias, or the author-styled `manual` tier. */
|
|
4
4
|
export type WidgetPosition = ManagedSlot | "manual" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
5
5
|
export interface OmMapContextValue {
|
|
@@ -9,6 +9,14 @@ export interface OmMapContextValue {
|
|
|
9
9
|
overlayPane: HTMLDivElement;
|
|
10
10
|
/** Slot containers <OmWidget> portals into (filled as OmMap's own DOM mounts). */
|
|
11
11
|
corners: Readonly<Record<ManagedSlot, HTMLDivElement | null>>;
|
|
12
|
+
/** Hide authored managed widgets without hiding mandated provider/license chrome. */
|
|
13
|
+
widgetsHidden: boolean;
|
|
14
|
+
/** Responsive map-width state shared by every positioning shell. */
|
|
15
|
+
widgetsFolded: boolean;
|
|
16
|
+
/** Per-side disclosure panels used as portal targets while folded. */
|
|
17
|
+
foldPanels: Readonly<Record<FoldSide, HTMLDivElement | null>>;
|
|
18
|
+
/** Registers whether a React widget currently needs a side drawer. */
|
|
19
|
+
registerFoldedWidget(side: FoldSide, token: string, present: boolean): void;
|
|
12
20
|
}
|
|
13
21
|
export declare const OmMapContext: import("react").Context<OmMapContextValue | null>;
|
|
14
22
|
export declare function useOmMapContext(caller: string): OmMapContextValue;
|
package/dist/react/om-map.d.ts
CHANGED
|
@@ -20,8 +20,10 @@ export interface OmMapProps {
|
|
|
20
20
|
};
|
|
21
21
|
/** Layout-token sugar, the `widget-style` attribute's twin: `"gap:10 opacity:0.9"` → `--om-widget-*` custom properties on the widget layer. */
|
|
22
22
|
widgetStyle?: string;
|
|
23
|
-
/** Hide-all, the `widgets-hidden` attribute's twin: hides
|
|
23
|
+
/** Hide-all, the `widgets-hidden` attribute's twin: hides authored managed widgets without removal; provider attribution and the license badge never hide. */
|
|
24
24
|
widgetsHidden?: boolean;
|
|
25
|
+
/** Responsive auto-fold (default true); false is the `widgets-fold="off"` twin. */
|
|
26
|
+
widgetsFold?: boolean;
|
|
25
27
|
className?: string;
|
|
26
28
|
style?: CSSProperties;
|
|
27
29
|
children?: ReactNode;
|
|
@@ -5,8 +5,10 @@ export interface OmWidgetProps {
|
|
|
5
5
|
position?: WidgetPosition;
|
|
6
6
|
/** Deterministic in-slot ordering (flex `order`); default is mount order. */
|
|
7
7
|
order?: number;
|
|
8
|
+
/** Keep this essential control outside responsive drawers. */
|
|
9
|
+
fold?: "never";
|
|
8
10
|
className?: string;
|
|
9
11
|
style?: CSSProperties;
|
|
10
12
|
children?: ReactNode;
|
|
11
13
|
}
|
|
12
|
-
export declare function OmWidget({ position, order, className, style, children }: OmWidgetProps): ReactNode;
|
|
14
|
+
export declare function OmWidget({ position, order, fold, className, style, children }: OmWidgetProps): ReactNode;
|