@nika-js/onlymap 0.5.12 → 0.6.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.
- package/CHANGELOG.md +19 -0
- package/LICENSE.md +2 -0
- package/README.md +19 -7
- package/THIRD-PARTY-LICENSES.md +27 -0
- package/dist/{LercDecode.es-C97NsRLr.js → LercDecode.es-CJnypw8j.js} +1 -1
- package/dist/{basemap-kc0aQNqr.js → basemap-DrQ0-eyR.js} +1 -1
- package/dist/cityjson-D_V5GY8b.js +332 -0
- package/dist/crs-Ciu7Xs7a.js +108 -0
- package/dist/crs.d.ts +50 -0
- package/dist/ctx.d.ts +8 -1
- package/dist/elements/om-map.d.ts +26 -2
- package/dist/elements/om-overlay.d.ts +1 -1
- package/dist/elements/om-widget.d.ts +4 -0
- package/dist/feature-colors.d.ts +41 -0
- package/dist/{geoparquet-Dn1BypCS.js → geoparquet-Dix4lTNy.js} +1 -1
- package/dist/html-data.d.ts +1 -1
- package/dist/ifc-Dc-TdSJr.js +877 -0
- package/dist/ifc.d.ts +406 -0
- package/dist/{index-aBiHCzy-.js → index-1UgNlfGR.js} +20944 -18922
- package/dist/{index-BoUIm-jd.js → index-BQMjW5w0.js} +1 -1
- package/dist/{index-BcG3m2rF.js → index-B_1PPJgC.js} +1 -1
- package/dist/{index-DA_aop8u.js → index-CAuT5j9Y.js} +2 -2
- package/dist/{index-Dc-ZLLo8.js → index-CXPaeisL.js} +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/layer-registry.d.ts +14 -0
- package/dist/layers/bim-layer.d.ts +104 -0
- package/dist/layers/feature-mesh-layer.d.ts +288 -0
- package/dist/layers/gltf-scene-walk.d.ts +55 -0
- package/dist/{lerc-74-SNPeU.js → lerc-CbTjQ7uI.js} +2 -2
- package/dist/license.d.ts +29 -5
- package/dist/meshopt_simplifier-Co6uRDDA.js +370 -0
- package/dist/onlymap.standalone.js +58057 -54751
- package/dist/onlymapjs.js +69 -67
- package/dist/programmatic.d.ts +22 -2
- package/dist/{raster-VyHCbPXy.js → raster-0b0nSHUh.js} +2 -2
- package/dist/{raster-pipeline-CGQTOUjw.js → raster-pipeline-D8siq7-4.js} +1 -1
- package/dist/react/om-overlay.d.ts +9 -0
- package/dist/react.js +144 -144
- package/dist/runtime-core.d.ts +110 -3
- package/dist/selection.d.ts +33 -0
- package/dist/site-placement.d.ts +85 -0
- package/dist/testing.d.ts +6 -2
- package/dist/tile3d-metadata.d.ts +185 -0
- package/dist/version.d.ts +1 -1
- package/dist/widget-registry.d.ts +11 -0
- package/dist/widgets/ifc-clash.d.ts +18 -0
- package/dist/widgets/ifc.d.ts +41 -0
- package/dist/{zarr-DddHNVim.js → zarr-DCYro_Vs.js} +79 -66
- package/docs/3d-assets.md +3 -3
- package/docs/live-data.md +2 -2
- package/docs/stories.md +1 -1
- package/docs/testing.md +2 -2
- package/llms.txt +3 -3
- package/onlymapjs.html-data.json +152 -0
- package/package.json +7 -2
- package/skills/onlymapjs/SKILL.md +4 -2
- package/skills/onlymapjs/references/react.md +1 -1
- package/skills/onlymapjs/references/syntax.md +299 -12
- package/dist/cityjson-urQeujQv.js +0 -407
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 g, aM 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 g, aM as c, aN as A, aO as m, aP as _, aQ as d, aR as p, aS as I, aT as y, aU as M, aV as u, aW as D, ao as O, aX as f, aw as N, aY as R, aZ as P, a_ as F, W as h, a$ as B, b0 as C, b1 as G, b2 as U, b3 as W, b4 as v, b5 as x, b6 as w, 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 ga, bz as ca, bA as Aa, bB as ma, bC as _a, bD as da, bE as pa, bF as Ia, bG as ya, bH as Ma, bI as ua, bJ as Da, bK as Oa, bL as fa, bM as Na, bN as Ra, bO as Pa, bP as Fa, bQ as ha, bR as Ba, bS as Ca, bT as Ga, bU as Ua, bV as Wa, bW as va, bX as xa, bY as wa, bZ as Ya, b_ as Ha, b$ as Xa, c0 as ka, c1 as Ja } from "./index-1UgNlfGR.js";
|
|
2
2
|
export {
|
|
3
3
|
e as ALL_POSITION_VALUES,
|
|
4
4
|
r as AUDIT_EXEMPTIONS,
|
|
@@ -13,21 +13,21 @@ export {
|
|
|
13
13
|
T as EDGE_TOLERANCE_PX,
|
|
14
14
|
L as FOLD_HYSTERESIS_PX,
|
|
15
15
|
g as FOLD_SIDES,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
c as GeoJsonLayer,
|
|
17
|
+
A as IconLayer,
|
|
18
|
+
m as LEGACY_POSITION_ALIASES,
|
|
19
|
+
_ as LIGHTING_PRESET_NAMES,
|
|
20
20
|
d as Layer,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
p as LayerExtension,
|
|
22
|
+
I as MANAGED_SLOTS,
|
|
23
|
+
y as MapController,
|
|
24
24
|
M as OmMap,
|
|
25
25
|
u as ScatterplotLayer,
|
|
26
26
|
D as ScenegraphLayer,
|
|
27
27
|
O as SimpleMeshLayer,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
f as Tile3DLayer,
|
|
29
|
+
N as TileLayer,
|
|
30
|
+
R as UNIT_SYSTEMS,
|
|
31
31
|
P as WGS84_MEAN_RADIUS_M,
|
|
32
32
|
F as WIDGET_STYLE_KEY_NAMES,
|
|
33
33
|
h as WebMercatorViewport,
|
|
@@ -39,61 +39,63 @@ export {
|
|
|
39
39
|
v as computeTimeline,
|
|
40
40
|
x as configureBasemap,
|
|
41
41
|
w as configureData,
|
|
42
|
-
Y as
|
|
43
|
-
H as
|
|
44
|
-
X as
|
|
45
|
-
k as
|
|
46
|
-
J as
|
|
47
|
-
K as
|
|
48
|
-
V as
|
|
49
|
-
z as
|
|
50
|
-
Q as
|
|
51
|
-
Z as
|
|
52
|
-
$ as
|
|
53
|
-
j as
|
|
54
|
-
q as
|
|
55
|
-
aa as
|
|
56
|
-
sa as
|
|
57
|
-
ea as
|
|
58
|
-
ra as
|
|
59
|
-
ta as
|
|
60
|
-
oa as
|
|
61
|
-
ba as
|
|
62
|
-
ia as
|
|
63
|
-
la as
|
|
64
|
-
na as
|
|
65
|
-
Sa as
|
|
66
|
-
Ea as
|
|
67
|
-
Ta as
|
|
68
|
-
La as
|
|
69
|
-
ga as
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
42
|
+
Y as configureIfc,
|
|
43
|
+
H as configureLicense,
|
|
44
|
+
X as configureTelemetry,
|
|
45
|
+
k as descriptorToIR,
|
|
46
|
+
J as destroySandbox,
|
|
47
|
+
K as distanceMeters,
|
|
48
|
+
V as evaluateInSandbox,
|
|
49
|
+
z as foldDrawerStyle,
|
|
50
|
+
Q as foldPanelStyle,
|
|
51
|
+
Z as foldSideForSlot,
|
|
52
|
+
$ as foldToggleSlot,
|
|
53
|
+
j as foldToggleStyle,
|
|
54
|
+
q as formatArea,
|
|
55
|
+
aa as formatLength,
|
|
56
|
+
sa as getBasemap,
|
|
57
|
+
ea as getEntitlements,
|
|
58
|
+
ra as getLayerSchema,
|
|
59
|
+
ta as getMeasureRadiusMeters,
|
|
60
|
+
oa as getTerrain,
|
|
61
|
+
ba as isBrowser,
|
|
62
|
+
ia as isColumnar,
|
|
63
|
+
la as isStoreToken,
|
|
64
|
+
na as loadIfc,
|
|
65
|
+
Sa as loadRasterModule,
|
|
66
|
+
Ea as midpoint,
|
|
67
|
+
Ta as mountForTest,
|
|
68
|
+
La as niceNumber,
|
|
69
|
+
ga as normalizeData,
|
|
70
|
+
ca as parseDurationMs,
|
|
71
|
+
Aa as parseTerrainAttrs,
|
|
72
|
+
ma as parseUnitSystem,
|
|
73
|
+
_a as parseWidgetStyle,
|
|
74
|
+
da as pathLengthMeters,
|
|
73
75
|
pa as registerAction,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
76
|
+
Ia as registerBasemap,
|
|
77
|
+
ya as registerFormat,
|
|
78
|
+
Ma as registerLayer,
|
|
79
|
+
ua as registerSource,
|
|
80
|
+
Da as registerTerrain,
|
|
81
|
+
Oa as registerWidget,
|
|
82
|
+
fa as resolveFoldBreakpointPx,
|
|
83
|
+
Na as resolveImageOverlay,
|
|
84
|
+
Ra as resolveLighting,
|
|
85
|
+
Pa as resolveSlot,
|
|
86
|
+
Fa as ringAreaMeters2,
|
|
87
|
+
ha as ringEnclosesPole,
|
|
88
|
+
Ba as ringPerimeterMeters,
|
|
89
|
+
Ca as rowAt,
|
|
90
|
+
Ga as sandboxHtml,
|
|
91
|
+
Ua as scaleBarStep,
|
|
92
|
+
Wa as setMeasureRadiusMeters,
|
|
93
|
+
va as settleLayout,
|
|
94
|
+
xa as shouldFoldAtWidth,
|
|
95
|
+
wa as slotContainerStyle,
|
|
96
|
+
Ya as slotLayout,
|
|
97
|
+
Ha as snapshotIR,
|
|
98
|
+
Xa as solarAzElDegrees,
|
|
99
|
+
ka as validateManifest,
|
|
100
|
+
Ja as validateManifestString
|
|
99
101
|
};
|
package/dist/programmatic.d.ts
CHANGED
|
@@ -114,13 +114,23 @@ export interface MapControllerOptions {
|
|
|
114
114
|
onMapPoint?: (coordinate: [number, number] | null, kind: "click" | "hover") => void;
|
|
115
115
|
/** A Tile3DLayer finished loading its root tileset — the `om-tileset-load` DOM event's twin; `tileset` is the live deck `Tileset3D`. */
|
|
116
116
|
onTilesetLoad?: (layerId: string, tileset: unknown) => void;
|
|
117
|
+
/** A `pick-features` layer decoded its property table — the DOM front-end's internal `featureTables` bookkeeping, surfaced here since `ctx.features()` depends on it (see `RuntimeCoreCallbacks.onFeatureTable`). */
|
|
118
|
+
onFeatureTable?: (layerId: string, rows: Record<string, unknown>[]) => void;
|
|
119
|
+
/** A `carriesGeoreference` layer (BIMLayer) finished loading and read its own file's georeferencing (see `RuntimeCoreCallbacks.onGeoreference`). No front end auto-applies terrain (what-you-write-is-what-you-see) — call `controller.setTerrain(...)` from here if you want a reaction. `approximatePlacement` mirrors the DOM lane's data-quality warning. */
|
|
120
|
+
onGeoreference?: (layerId: string, info: {
|
|
121
|
+
orthogonalHeight?: number;
|
|
122
|
+
hasFullMapConversion: boolean;
|
|
123
|
+
approximatePlacement: boolean;
|
|
124
|
+
}) => void;
|
|
117
125
|
/** @internal Stable React-owned hosts that place required chrome in managed slots. */
|
|
118
126
|
chromeHosts?: MandatedChromeHosts;
|
|
119
127
|
}
|
|
120
128
|
/** Descriptor → layer IR: the programmatic counterpart of one parse-manifest.ts loop iteration. */
|
|
121
129
|
export declare function descriptorToIR(desc: LayerDescriptor, onDataLoaded: () => void): LayerIR | null;
|
|
122
130
|
/** rAF-batched overlay positioning hook — same flush contract as the DOM front-end's OverlayHost. */
|
|
123
|
-
export type OverlayPositioner = (viewport: MapViewport | undefined, selection: Selection | null
|
|
131
|
+
export type OverlayPositioner = (viewport: MapViewport | undefined, selection: Selection | null,
|
|
132
|
+
/** Pointer event behind the latest pick — carries the type of an EMPTY pick (`selection` null), which the selection itself can't. */
|
|
133
|
+
pickType?: "hover" | "click") => void;
|
|
124
134
|
/**
|
|
125
135
|
* Pick stream for framework event handlers. `null` means the pointer left
|
|
126
136
|
* whatever it was hovering (deck reports an empty pick) — the "hover out"
|
|
@@ -137,8 +147,11 @@ export declare class MapController {
|
|
|
137
147
|
private core;
|
|
138
148
|
private mount;
|
|
139
149
|
private layerIRs;
|
|
150
|
+
/** Decoded property tables per pick-features layer — see RuntimeCoreCallbacks.onFeatureTable and the `<om-map>` twin's own field. */
|
|
151
|
+
private featureTables;
|
|
140
152
|
private descriptors;
|
|
141
153
|
private selection;
|
|
154
|
+
private lastPickType;
|
|
142
155
|
private watchers;
|
|
143
156
|
private pickListeners;
|
|
144
157
|
private overlayFns;
|
|
@@ -207,6 +220,13 @@ export declare class MapController {
|
|
|
207
220
|
/** Picked object, normalized to flat — same path as OmMapElement (GeoJSON properties lifted; columnar rows materialized). */
|
|
208
221
|
private resolvePickedObject;
|
|
209
222
|
private handleSelectionChange;
|
|
223
|
+
/**
|
|
224
|
+
* The pointer event behind the most recent pick — tracked separately from
|
|
225
|
+
* the selection because an EMPTY pick stores null, losing its type. What
|
|
226
|
+
* lets a `selectionType`-scoped overlay treat a click on empty space as a
|
|
227
|
+
* dismissal while ignoring hovers over empty space.
|
|
228
|
+
*/
|
|
229
|
+
getLastPickType(): "hover" | "click" | undefined;
|
|
210
230
|
getSelection(): Selection | null;
|
|
211
231
|
/** Every hover/click pick (null = hover left) — the stream framework adapters route to per-layer onClick/onHover handlers. */
|
|
212
232
|
watchPicks(listener: PickListener): () => void;
|
|
@@ -216,7 +236,7 @@ export declare class MapController {
|
|
|
216
236
|
* flattening, watcher notification, and overlay flush are same-path by
|
|
217
237
|
* construction.
|
|
218
238
|
*/
|
|
219
|
-
injectPick(selection: Selection | null): void;
|
|
239
|
+
injectPick(selection: Selection | null, pickType?: "hover" | "click"): void;
|
|
220
240
|
/**
|
|
221
241
|
* Registers an rAF-batched positioner: called with the fresh viewport +
|
|
222
242
|
* selection whenever either may have moved (spec: "Overlay Renderer" —
|
|
@@ -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-D8siq7-4.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-CbTjQ7uI.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-1UgNlfGR.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,
|
|
@@ -8,6 +8,15 @@ export interface OmOverlayProps {
|
|
|
8
8
|
anchorFrom?: "selection";
|
|
9
9
|
/** Scope a selection-anchored overlay to one layer's picks — non-matching selections don't move or re-render it. */
|
|
10
10
|
layer?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Scope a selection-anchored overlay to one PICK TYPE. A click-opened popup
|
|
13
|
+
* wants `"click"`: without it, merely hovering any pickable feature drags
|
|
14
|
+
* the popup there and re-renders it against the hovered object. With it,
|
|
15
|
+
* hover picks are inert and a click on empty space still dismisses.
|
|
16
|
+
* `"hover"` is the mirror for hover-driven overlays. Absent: every pick
|
|
17
|
+
* applies.
|
|
18
|
+
*/
|
|
19
|
+
selectionType?: "click" | "hover";
|
|
11
20
|
visible?: boolean;
|
|
12
21
|
/** Attachment point relative to the anchor (default bottom-center: content sits above the point). */
|
|
13
22
|
anchorOffset?: AnchorOffset;
|