@nika-js/onlymap 0.6.1 → 0.6.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.
- package/CHANGELOG.md +106 -1
- package/README.md +28 -15
- package/dist/{LercDecode.es-CJnypw8j.js → LercDecode.es-D5in29tf.js} +1 -1
- package/dist/{basemap-DrQ0-eyR.js → basemap-C0pFT3AO.js} +13 -3
- package/dist/basemap.d.ts +10 -1
- package/dist/clip-box-controller.d.ts +94 -0
- package/dist/clip-box.d.ts +109 -0
- package/dist/data-layer.d.ts +34 -4
- package/dist/draw-controller.d.ts +75 -1
- package/dist/draw.d.ts +22 -4
- package/dist/elements/om-map.d.ts +20 -0
- package/dist/elements/om-overlay.d.ts +12 -0
- package/dist/geodesy.d.ts +32 -3
- package/dist/{geoparquet-Dix4lTNy.js → geoparquet-By98JVB0.js} +1 -1
- package/dist/html-data.d.ts +2 -2
- package/dist/{index-BQMjW5w0.js → index-Bx9GFkrn.js} +1 -1
- package/dist/{index-CXPaeisL.js → index-CqC4sW_k.js} +1 -1
- package/dist/{index-1UgNlfGR.js → index-Cxo9mCw_.js} +30947 -27785
- package/dist/{index-B_1PPJgC.js → index-olfncHIq.js} +1 -1
- package/dist/{index-CAuT5j9Y.js → index-tnlYDALL.js} +2 -2
- package/dist/index.d.ts +8 -3
- package/dist/ir-snapshot.d.ts +3 -1
- package/dist/layers/bim-layer.d.ts +30 -7
- package/dist/layers/feature-mesh-layer.d.ts +1 -1
- package/dist/layers/popup-layer.d.ts +13 -0
- package/dist/legend-spec.d.ts +1 -1
- package/dist/{lerc-CbTjQ7uI.js → lerc-gKDDtc69.js} +2 -2
- package/dist/license.d.ts +25 -4
- package/dist/measure-controller.d.ts +482 -4
- package/dist/onlymap.standalone.js +53976 -50804
- package/dist/onlymapjs.js +42 -40
- package/dist/parse-manifest.d.ts +3 -0
- package/dist/programmatic.d.ts +34 -5
- package/dist/{raster-0b0nSHUh.js → raster-Cl5m3KsC.js} +2 -2
- package/dist/{raster-pipeline-D8siq7-4.js → raster-pipeline-hJGxIwYx.js} +1 -1
- package/dist/react/om-layer.d.ts +6 -1
- package/dist/react.js +167 -160
- package/dist/region-export-controller.d.ts +37 -0
- package/dist/region-export.d.ts +56 -0
- package/dist/runtime-core.d.ts +150 -0
- package/dist/selection.d.ts +11 -1
- package/dist/site-placement.d.ts +22 -0
- package/dist/snapping.d.ts +88 -0
- package/dist/terrain-heightfield.d.ts +53 -0
- package/dist/terrain-sample.d.ts +30 -0
- package/dist/terrain.d.ts +6 -1
- package/dist/units.d.ts +27 -0
- package/dist/version.d.ts +1 -1
- package/dist/volumetrics-run.d.ts +13 -0
- package/dist/volumetrics-worker.d.ts +1 -0
- package/dist/volumetrics.d.ts +201 -0
- package/dist/{zarr-DCYro_Vs.js → zarr-hRDavRGV.js} +2 -2
- package/docs/3d-assets.md +49 -1
- package/docs/live-data.md +26 -1
- package/docs/react.md +9 -1
- package/docs/testing.md +2 -0
- package/llms.txt +10 -5
- package/onlymapjs.html-data.json +161 -2
- package/package.json +4 -2
- package/skills/onlymapjs/SKILL.md +11 -1
- package/skills/onlymapjs/references/react.md +2 -2
- package/skills/onlymapjs/references/syntax.md +20 -8
- package/skills/onlymapjs/references/testing.md +6 -0
package/dist/onlymapjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aA as e, aB as r, aC as t, aD as o, aE as b, aF as i, ap as l, aG as n, aH as S, aI as E, aJ as T, aK as L, aL as
|
|
1
|
+
import { aA as e, aB as r, aC as t, aD as o, aE as b, aF as i, ap as l, aG as n, aH as S, aI as E, aJ as T, aK as L, aL as c, aM as g, aN as A, aO as p, aP as m, aQ as _, aR as d, aS as I, aT as y, aU as D, aV as M, aW as u, ao as O, aX as f, aw as N, aY as R, aZ as P, a_ as h, W as F, a$ as B, b0 as C, b1 as G, b2 as U, b3 as W, b4 as v, b5 as w, b6 as x, b7 as Y, b8 as H, b9 as X, ba as k, bb as J, bc as K, bd as V, be as z, bf as Q, bg as Z, bh as $, bi as j, bj as q, bk as aa, bl as sa, bm as ea, bn as ra, bo as ta, bp as oa, bq as ba, br as ia, bs as la, bt as na, bu as Sa, bv as Ea, bw as Ta, bx as La, by as ca, bz as ga, bA as Aa, bB as pa, bC as ma, bD as _a, bE as da, bF as Ia, bG as ya, bH as Da, bI as Ma, bJ as ua, bK as Oa, bL as fa, bM as Na, bN as Ra, bO as Pa, bP as ha, bQ as Fa, bR as Ba, bS as Ca, bT as Ga, bU as Ua, bV as Wa, bW as va, bX as wa, bY as xa, bZ as Ya, b_ as Ha, b$ as Xa, c0 as ka, c1 as Ja, c2 as Ka, c3 as Va } from "./index-Cxo9mCw_.js";
|
|
2
2
|
export {
|
|
3
3
|
e as ALL_POSITION_VALUES,
|
|
4
4
|
r as AUDIT_EXEMPTIONS,
|
|
@@ -12,33 +12,33 @@ export {
|
|
|
12
12
|
E as DRONE_SENSOR_DATABASE,
|
|
13
13
|
T as EDGE_TOLERANCE_PX,
|
|
14
14
|
L as FOLD_HYSTERESIS_PX,
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
c as FOLD_SIDES,
|
|
16
|
+
g as GeoJsonLayer,
|
|
17
17
|
A as IconLayer,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
p as LEGACY_POSITION_ALIASES,
|
|
19
|
+
m as LIGHTING_PRESET_NAMES,
|
|
20
|
+
_ as Layer,
|
|
21
|
+
d as LayerExtension,
|
|
22
22
|
I as MANAGED_SLOTS,
|
|
23
23
|
y as MapController,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
D as OmMap,
|
|
25
|
+
M as ScatterplotLayer,
|
|
26
|
+
u as ScenegraphLayer,
|
|
27
27
|
O as SimpleMeshLayer,
|
|
28
28
|
f as Tile3DLayer,
|
|
29
29
|
N as TileLayer,
|
|
30
30
|
R as UNIT_SYSTEMS,
|
|
31
31
|
P as WGS84_MEAN_RADIUS_M,
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
h as WIDGET_STYLE_KEY_NAMES,
|
|
33
|
+
F as WebMercatorViewport,
|
|
34
34
|
B as arrowTableToColumnar,
|
|
35
35
|
C as asRows,
|
|
36
36
|
G as auditLayout,
|
|
37
37
|
U as compileExpression,
|
|
38
38
|
W as compileFullJsAccessorBlockInSandbox,
|
|
39
39
|
v as computeTimeline,
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
w as configureBasemap,
|
|
41
|
+
x as configureData,
|
|
42
42
|
Y as configureIfc,
|
|
43
43
|
H as configureLicense,
|
|
44
44
|
X as configureTelemetry,
|
|
@@ -66,36 +66,38 @@ export {
|
|
|
66
66
|
Ea as midpoint,
|
|
67
67
|
Ta as mountForTest,
|
|
68
68
|
La as niceNumber,
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
ca as normalizeData,
|
|
70
|
+
ga as parseDurationMs,
|
|
71
71
|
Aa as parseTerrainAttrs,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
pa as parseUnitSystem,
|
|
73
|
+
ma as parseWidgetStyle,
|
|
74
|
+
_a as pathLengthMeters,
|
|
75
|
+
da as registerAction,
|
|
76
76
|
Ia as registerBasemap,
|
|
77
77
|
ya as registerFormat,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
Da as registerLayer,
|
|
79
|
+
Ma as registerSource,
|
|
80
|
+
ua as registerTerrain,
|
|
81
81
|
Oa as registerWidget,
|
|
82
|
-
fa as
|
|
83
|
-
Na as
|
|
84
|
-
Ra as
|
|
85
|
-
Pa as
|
|
82
|
+
fa as releaseDataOwner,
|
|
83
|
+
Na as resolveFoldBreakpointPx,
|
|
84
|
+
Ra as resolveImageOverlay,
|
|
85
|
+
Pa as resolveLighting,
|
|
86
|
+
ha as resolveSlot,
|
|
86
87
|
Fa as ringAreaMeters2,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
88
|
+
Ba as ringEnclosesPole,
|
|
89
|
+
Ca as ringPerimeterMeters,
|
|
90
|
+
Ga as rowAt,
|
|
91
|
+
Ua as sandboxHtml,
|
|
92
|
+
Wa as scaleBarStep,
|
|
93
|
+
va as setMeasureRadiusMeters,
|
|
94
|
+
wa as settleLayout,
|
|
94
95
|
xa as shouldFoldAtWidth,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
96
|
+
Ya as slotContainerStyle,
|
|
97
|
+
Ha as slotLayout,
|
|
98
|
+
Xa as snapshotDescriptorIR,
|
|
99
|
+
ka as snapshotIR,
|
|
100
|
+
Ja as solarAzElDegrees,
|
|
101
|
+
Ka as validateManifest,
|
|
102
|
+
Va as validateManifestString
|
|
101
103
|
};
|
package/dist/parse-manifest.d.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* runtime-core.ts never does.
|
|
7
7
|
*/
|
|
8
8
|
import type { LayerIR } from "./ir";
|
|
9
|
+
import { type DataTransportOwner } from "./data-layer";
|
|
9
10
|
export interface ParseManifestOptions {
|
|
10
11
|
/**
|
|
11
12
|
* IR-snapshot mode (see ir-snapshot.ts): resolve the manifest without side
|
|
@@ -15,5 +16,7 @@ export interface ParseManifestOptions {
|
|
|
15
16
|
* would evict a concurrently-running live map's compiled accessors).
|
|
16
17
|
*/
|
|
17
18
|
snapshot?: boolean;
|
|
19
|
+
/** Controller/element identity for descriptor-owned transport lifetime. */
|
|
20
|
+
dataOwner?: DataTransportOwner;
|
|
18
21
|
}
|
|
19
22
|
export declare function parseManifest(mapEl: Element, onDataLoaded: () => void, opts?: ParseManifestOptions): LayerIR[];
|
package/dist/programmatic.d.ts
CHANGED
|
@@ -22,13 +22,17 @@ import { type TokenStore, type ViewOrigin, type ViewportSnapshot, type DataVersi
|
|
|
22
22
|
import type { LayerIR } from "./ir";
|
|
23
23
|
import { type RuntimeContext } from "./ctx";
|
|
24
24
|
import type { LayerMetaSnapshot } from "./ctx";
|
|
25
|
+
import { type DataTransportOwner } from "./data-layer";
|
|
25
26
|
import type { Selection } from "./selection";
|
|
26
27
|
import type { ValidationEntry } from "./validation";
|
|
27
28
|
import type { MapViewport } from "./basemap";
|
|
29
|
+
import { type LayerIRSnapshot } from "./ir-snapshot";
|
|
28
30
|
/**
|
|
29
31
|
* A layer, declared as a typed value — the programmatic mirror of one
|
|
30
|
-
* <om-layer> element.
|
|
31
|
-
*
|
|
32
|
+
* <om-layer> element. First-party callers normally use plain JS accessor
|
|
33
|
+
* functions. A schema-declared accessor may alternatively be a restricted
|
|
34
|
+
* OnlyMap expression string; that JSON-safe form is intended for native and
|
|
35
|
+
* cross-process bridges and uses the same compiler as `get-*` attributes.
|
|
32
36
|
*/
|
|
33
37
|
export interface LayerDescriptor {
|
|
34
38
|
/** Stable identity — same contract as the `id` attribute. Required. */
|
|
@@ -68,7 +72,7 @@ export interface LayerDescriptor {
|
|
|
68
72
|
* when an accessor's output changes (the deck-idiomatic contract).
|
|
69
73
|
*/
|
|
70
74
|
updateTriggers?: Record<string, unknown>;
|
|
71
|
-
/** deck.gl props (camelCase)
|
|
75
|
+
/** deck.gl props (camelCase); accessors may be functions or restricted expression strings. */
|
|
72
76
|
props?: Record<string, unknown>;
|
|
73
77
|
/** Per-layer terrain mode (spec: "Terrain") — the `terrain` attribute's twin; absent = the type default. */
|
|
74
78
|
terrain?: "drape" | "offset" | "off";
|
|
@@ -125,8 +129,23 @@ export interface MapControllerOptions {
|
|
|
125
129
|
/** @internal Stable React-owned hosts that place required chrome in managed slots. */
|
|
126
130
|
chromeHosts?: MandatedChromeHosts;
|
|
127
131
|
}
|
|
128
|
-
/**
|
|
129
|
-
|
|
132
|
+
/**
|
|
133
|
+
* Descriptor → layer IR: the programmatic counterpart of one parse-manifest.ts
|
|
134
|
+
* loop iteration.
|
|
135
|
+
*
|
|
136
|
+
* Pass `owner` (any stable object identity — a host controller, an element) to
|
|
137
|
+
* put a URL-backed descriptor's fetch/poll/socket under descriptor-owned
|
|
138
|
+
* lifetime; `releaseDataOwner(owner)` then stops everything that owner holds.
|
|
139
|
+
* Without one the transport is un-owned: it is still shared by identity and
|
|
140
|
+
* still notifies, but it holds no reference count, so a real owner's release
|
|
141
|
+
* can stop it. `MapController` owns its own transports and does not need this.
|
|
142
|
+
*/
|
|
143
|
+
export declare function descriptorToIR(desc: LayerDescriptor, onDataLoaded: () => void, owner?: DataTransportOwner): LayerIR | null;
|
|
144
|
+
/**
|
|
145
|
+
* Resolve JSON-safe/programmatic descriptors to deterministic snapshots.
|
|
146
|
+
* URL data is represented as an empty pending layer and is never fetched.
|
|
147
|
+
*/
|
|
148
|
+
export declare function snapshotDescriptorIR(descriptors: readonly LayerDescriptor[]): LayerIRSnapshot[];
|
|
130
149
|
/** rAF-batched overlay positioning hook — same flush contract as the DOM front-end's OverlayHost. */
|
|
131
150
|
export type OverlayPositioner = (viewport: MapViewport | undefined, selection: Selection | null,
|
|
132
151
|
/** Pointer event behind the latest pick — carries the type of an EMPTY pick (`selection` null), which the selection itself can't. */
|
|
@@ -158,6 +177,8 @@ export declare class MapController {
|
|
|
158
177
|
private overlayFlushPending;
|
|
159
178
|
private commitPending;
|
|
160
179
|
private destroyed;
|
|
180
|
+
private suspended;
|
|
181
|
+
private readonly dataOwner;
|
|
161
182
|
private firstCommitDone;
|
|
162
183
|
private readonly stores;
|
|
163
184
|
/** Origin of the most recent viewport change FRAME — latched through the settle tracker for snapshot reads. */
|
|
@@ -282,6 +303,14 @@ export declare class MapController {
|
|
|
282
303
|
flyToBounds(bounds: [[number, number], [number, number]], padding?: number, opts?: CameraOptions): void;
|
|
283
304
|
setView(partial: Partial<CameraState>, opts?: CameraOptions): void;
|
|
284
305
|
getViewState(): CameraState;
|
|
306
|
+
/**
|
|
307
|
+
* Pause descriptor-owned live transports while retaining canonical map state.
|
|
308
|
+
* `retain` because this pause is meant to be reversed: `resume()` repaints the
|
|
309
|
+
* last rows immediately rather than showing an empty map while it reconnects.
|
|
310
|
+
*/
|
|
311
|
+
suspend(): void;
|
|
312
|
+
/** Reacquire current descriptor transports and reconcile after foregrounding. */
|
|
313
|
+
resume(): void;
|
|
285
314
|
/** Projects a lng/lat through the current viewport — undefined before the viewport resolves. */
|
|
286
315
|
project(lngLat: [number, number]): [number, number] | undefined;
|
|
287
316
|
destroy(): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as re, t as Ae, i as nt, a as Re, s as rt, C as ot, b as it, F as at, A as st, d as lt, R as he, e as ct, p as ut, m as dt, f as ht, g as pt, h as gt } from "./raster-pipeline-
|
|
1
|
+
import { c as re, t as Ae, i as nt, a as Re, s as rt, C as ot, b as it, F as at, A as st, d as lt, R as he, e as ct, p as ut, m as dt, f as ht, g as pt, h as gt } from "./raster-pipeline-hJGxIwYx.js";
|
|
2
2
|
import pe from "./index-CW1n5LdO.js";
|
|
3
3
|
function mt(e, t) {
|
|
4
4
|
const n = e.length / 3, r = new Uint8ClampedArray(n * 4), o = 0, i = n, a = n * 2;
|
|
@@ -1069,7 +1069,7 @@ A.set(m.Zstd, () => import("./zstd-jXobGRcq.js").then((e) => e.decode));
|
|
|
1069
1069
|
A.set(m.Jpeg, () => Promise.resolve(oe));
|
|
1070
1070
|
A.set(m.Jpeg6, () => Promise.resolve(oe));
|
|
1071
1071
|
A.set(m.Webp, () => Promise.resolve(oe));
|
|
1072
|
-
A.set(m.Lerc, () => import("./lerc-
|
|
1072
|
+
A.set(m.Lerc, () => import("./lerc-gKDDtc69.js").then((e) => e.l).then((e) => e.decode));
|
|
1073
1073
|
async function ie(e, t, n) {
|
|
1074
1074
|
const r = A.get(t);
|
|
1075
1075
|
if (!r)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { w as ae } from "./mgrs-BY9bIvp4.js";
|
|
2
|
-
import { am as ce, an as le, ao as ee, ap as te, aq as ue, b as he, ar as de, l as Z, as as fe, d as pe, at as me, au as ge, av as ve, aw as ne } from "./index-
|
|
2
|
+
import { am as ce, an as le, ao as ee, ap as te, aq as ue, b as he, ar as de, l as Z, as as fe, d as pe, at as me, au as ge, av as ve, aw as ne } from "./index-Cxo9mCw_.js";
|
|
3
3
|
function Pe(o, e, t) {
|
|
4
4
|
const { projectedCorners: n } = e, { topLeft: s, topRight: r, bottomRight: a, bottomLeft: i } = n, c = t(s[0], s[1]), u = t(r[0], r[1]), l = t(a[0], a[1]), d = t(i[0], i[1]), f = [
|
|
5
5
|
c,
|
package/dist/react/om-layer.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Selection } from "@nika-js/onlymap";
|
|
1
|
+
import type { LayerDescriptor, Selection } from "@nika-js/onlymap";
|
|
2
2
|
export interface OmLayerProps {
|
|
3
3
|
/** Stable identity — same contract as the `id` attribute. */
|
|
4
4
|
id: string;
|
|
@@ -20,6 +20,9 @@ export interface OmLayerProps {
|
|
|
20
20
|
filterSoftRange?: [number, number];
|
|
21
21
|
filterCategoryField?: string;
|
|
22
22
|
filterCategories?: unknown[];
|
|
23
|
+
/** Dashed path styling, mirroring `dash` / `dash-justified`. */
|
|
24
|
+
dash?: [number, number];
|
|
25
|
+
dashJustified?: boolean;
|
|
23
26
|
/** Stream options for ws(s):// data URLs. `streamKey` is the upsert identity field (the `key` attribute — `key` itself is reserved by React). */
|
|
24
27
|
source?: string;
|
|
25
28
|
streamKey?: string;
|
|
@@ -37,4 +40,6 @@ export interface OmLayerProps {
|
|
|
37
40
|
/** Everything else passes through as deck.gl props (camelCase): getPosition, radiusMinPixels, visible, opacity, pickable, … */
|
|
38
41
|
[deckProp: string]: unknown;
|
|
39
42
|
}
|
|
43
|
+
/** @internal Pure React-props → programmatic descriptor adapter used by parity tests. */
|
|
44
|
+
export declare function reactLayerPropsToDescriptor(props: OmLayerProps): LayerDescriptor;
|
|
40
45
|
export declare function OmLayer(props: OmLayerProps): null;
|