@honua/app-platform 0.1.12 → 0.1.14
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/columnar/apache-arrow.d.ts +17 -0
- package/columnar/apache-arrow.d.ts.map +1 -0
- package/columnar/apache-arrow.js +1036 -0
- package/columnar/batch-cache-conformance.d.ts +66 -0
- package/columnar/batch-cache-conformance.d.ts.map +1 -0
- package/columnar/batch-cache-conformance.js +317 -0
- package/columnar/batch-cache-indexeddb.d.ts +31 -0
- package/columnar/batch-cache-indexeddb.d.ts.map +1 -0
- package/columnar/batch-cache-indexeddb.js +148 -0
- package/columnar/batch-cache.d.ts +298 -0
- package/columnar/batch-cache.d.ts.map +1 -0
- package/columnar/batch-cache.js +757 -0
- package/columnar/geoarrow-aggregate.d.ts +178 -0
- package/columnar/geoarrow-aggregate.d.ts.map +1 -0
- package/columnar/geoarrow-aggregate.js +976 -0
- package/columnar/geoarrow-patch.d.ts +382 -0
- package/columnar/geoarrow-patch.d.ts.map +1 -0
- package/columnar/geoarrow-patch.js +1656 -0
- package/columnar/geoarrow-reproject.d.ts +22 -0
- package/columnar/geoarrow-reproject.d.ts.map +1 -0
- package/columnar/geoarrow-reproject.js +119 -0
- package/columnar/geoarrow-serialization.d.ts +68 -0
- package/columnar/geoarrow-serialization.d.ts.map +1 -0
- package/columnar/geoarrow-serialization.js +331 -0
- package/columnar/geoarrow-types.d.ts +271 -0
- package/columnar/geoarrow-types.d.ts.map +1 -0
- package/columnar/geoarrow-types.js +15 -0
- package/columnar/geoarrow.d.ts +52 -0
- package/columnar/geoarrow.d.ts.map +1 -0
- package/columnar/geoarrow.js +1469 -0
- package/columnar/index.d.ts +43 -0
- package/columnar/index.d.ts.map +1 -0
- package/columnar/index.js +29 -0
- package/columnar/operators.d.ts +70 -0
- package/columnar/operators.d.ts.map +1 -0
- package/columnar/operators.js +307 -0
- package/columnar/result.d.ts +369 -0
- package/columnar/result.d.ts.map +1 -0
- package/columnar/result.js +815 -0
- package/columnar/telemetry.d.ts +152 -0
- package/columnar/telemetry.d.ts.map +1 -0
- package/columnar/telemetry.js +265 -0
- package/columnar/transfer.d.ts +28 -0
- package/columnar/transfer.d.ts.map +1 -0
- package/columnar/transfer.js +669 -0
- package/columnar/types.d.ts +175 -0
- package/columnar/types.d.ts.map +1 -0
- package/columnar/types.js +22 -0
- package/columnar/worker.d.ts +157 -0
- package/columnar/worker.d.ts.map +1 -0
- package/columnar/worker.js +1059 -0
- package/contract/pmtiles.d.ts +6 -5
- package/contract/pmtiles.d.ts.map +1 -1
- package/contract/pmtiles.js +30 -5
- package/contract/source.d.ts.map +1 -1
- package/contract/source.js +11 -8
- package/controls/catalog.d.ts.map +1 -1
- package/controls/catalog.js +110 -0
- package/controls/index.d.ts +1 -1
- package/controls/index.js +1 -1
- package/controls/types.d.ts +1 -1
- package/controls/types.js +1 -1
- package/core/client.d.ts.map +1 -1
- package/core/client.js +87 -19
- package/core/deprecation-notice.d.ts +28 -0
- package/core/deprecation-notice.d.ts.map +1 -0
- package/core/deprecation-notice.js +22 -0
- package/core/esri-geojson.d.ts.map +1 -1
- package/core/esri-geojson.js +14 -8
- package/core/optional-grpc-peer.d.ts +15 -0
- package/core/optional-grpc-peer.d.ts.map +1 -0
- package/core/optional-grpc-peer.js +60 -0
- package/esri-compat/basemap-gallery.d.ts +2 -0
- package/esri-compat/basemap-gallery.d.ts.map +1 -1
- package/esri-compat/basemap-gallery.js +12 -0
- package/esri-compat/basemap.d.ts +4 -0
- package/esri-compat/basemap.d.ts.map +1 -1
- package/esri-compat/basemap.js +70 -0
- package/esri-compat/bookmarks.d.ts +2 -0
- package/esri-compat/bookmarks.d.ts.map +1 -1
- package/esri-compat/bookmarks.js +12 -0
- package/esri-compat/controls.d.ts +18 -0
- package/esri-compat/controls.d.ts.map +1 -1
- package/esri-compat/controls.js +120 -57
- package/esri-compat/directions.d.ts +4 -0
- package/esri-compat/directions.d.ts.map +1 -1
- package/esri-compat/directions.js +30 -20
- package/esri-compat/editor.d.ts +4 -0
- package/esri-compat/editor.d.ts.map +1 -1
- package/esri-compat/editor.js +16 -0
- package/esri-compat/esri-config.d.ts +2 -1
- package/esri-compat/esri-config.d.ts.map +1 -1
- package/esri-compat/feature-effect.d.ts +23 -0
- package/esri-compat/feature-effect.d.ts.map +1 -0
- package/esri-compat/feature-effect.js +12 -0
- package/esri-compat/feature-form.d.ts +6 -0
- package/esri-compat/feature-form.d.ts.map +1 -1
- package/esri-compat/feature-form.js +63 -0
- package/esri-compat/feature-layer.d.ts +21 -2
- package/esri-compat/feature-layer.d.ts.map +1 -1
- package/esri-compat/feature-layer.js +172 -1
- package/esri-compat/feature-table.d.ts +5 -0
- package/esri-compat/feature-table.d.ts.map +1 -1
- package/esri-compat/feature-table.js +23 -0
- package/esri-compat/identity-manager.d.ts +1 -1
- package/esri-compat/identity-manager.js +1 -1
- package/esri-compat/legend.d.ts +2 -0
- package/esri-compat/legend.d.ts.map +1 -1
- package/esri-compat/legend.js +98 -0
- package/esri-compat/locator.d.ts +1 -1
- package/esri-compat/locator.js +1 -1
- package/esri-compat/map-view-mount.d.ts +1 -0
- package/esri-compat/map-view-mount.d.ts.map +1 -1
- package/esri-compat/map-view-mount.js +46 -25
- package/esri-compat/map-view.d.ts +13 -0
- package/esri-compat/map-view.d.ts.map +1 -1
- package/esri-compat/map-view.js +94 -8
- package/esri-compat/map.d.ts +5 -1
- package/esri-compat/map.d.ts.map +1 -1
- package/esri-compat/map.js +10 -0
- package/esri-compat/measurement.d.ts +2 -0
- package/esri-compat/measurement.d.ts.map +1 -1
- package/esri-compat/measurement.js +14 -0
- package/esri-compat/point.d.ts +7 -0
- package/esri-compat/point.d.ts.map +1 -1
- package/esri-compat/point.js +33 -3
- package/esri-compat/popup.d.ts +2 -0
- package/esri-compat/popup.d.ts.map +1 -1
- package/esri-compat/popup.js +12 -0
- package/esri-compat/portal.d.ts +1 -1
- package/esri-compat/portal.js +1 -1
- package/esri-compat/print.d.ts +3 -0
- package/esri-compat/print.d.ts.map +1 -1
- package/esri-compat/print.js +15 -0
- package/esri-compat/search.d.ts +4 -0
- package/esri-compat/search.d.ts.map +1 -1
- package/esri-compat/search.js +25 -28
- package/esri-compat/sketch.d.ts +2 -0
- package/esri-compat/sketch.d.ts.map +1 -1
- package/esri-compat/sketch.js +12 -0
- package/esri-compat/widget-host.d.ts +46 -17
- package/esri-compat/widget-host.d.ts.map +1 -1
- package/esri-compat/widget-host.js +84 -20
- package/esri-compat/widget-shell-hosts.d.ts +61 -0
- package/esri-compat/widget-shell-hosts.d.ts.map +1 -0
- package/esri-compat/widget-shell-hosts.js +76 -0
- package/kernel/renderer.d.ts +82 -0
- package/kernel/renderer.js +1 -0
- package/offline/conflict-resolution.d.ts +183 -0
- package/offline/conflict-resolution.d.ts.map +1 -0
- package/offline/conflict-resolution.js +286 -0
- package/offline/credential-screen.d.ts +34 -0
- package/offline/credential-screen.d.ts.map +1 -0
- package/offline/credential-screen.js +78 -0
- package/offline/digest.d.ts +15 -0
- package/offline/digest.d.ts.map +1 -0
- package/offline/digest.js +58 -0
- package/offline/edit-queue.d.ts +403 -0
- package/offline/edit-queue.d.ts.map +1 -0
- package/offline/edit-queue.js +1807 -0
- package/offline/edit-replay.d.ts +116 -0
- package/offline/edit-replay.d.ts.map +1 -0
- package/offline/edit-replay.js +392 -0
- package/offline/fetch-handler.d.ts +12 -0
- package/offline/fetch-handler.d.ts.map +1 -0
- package/offline/fetch-handler.js +65 -0
- package/offline/index.d.ts +52 -0
- package/offline/index.d.ts.map +1 -0
- package/offline/index.js +34 -0
- package/offline/indexeddb.d.ts +135 -0
- package/offline/indexeddb.d.ts.map +1 -0
- package/offline/indexeddb.js +888 -0
- package/offline/memory-store.d.ts +17 -0
- package/offline/memory-store.d.ts.map +1 -0
- package/offline/memory-store.js +183 -0
- package/offline/quota.d.ts +161 -0
- package/offline/quota.d.ts.map +1 -0
- package/offline/quota.js +370 -0
- package/offline/read-gate.d.ts +175 -0
- package/offline/read-gate.d.ts.map +1 -0
- package/offline/read-gate.js +252 -0
- package/offline/read-resource.d.ts +99 -0
- package/offline/read-resource.d.ts.map +1 -0
- package/offline/read-resource.js +156 -0
- package/offline/read.d.ts +50 -0
- package/offline/read.d.ts.map +1 -0
- package/offline/read.js +65 -0
- package/offline/region.d.ts +29 -0
- package/offline/region.d.ts.map +1 -0
- package/offline/region.js +1007 -0
- package/offline/replay-conflict.d.ts +183 -0
- package/offline/replay-conflict.d.ts.map +1 -0
- package/offline/replay-conflict.js +482 -0
- package/offline/selection.d.ts +140 -0
- package/offline/selection.d.ts.map +1 -0
- package/offline/selection.js +391 -0
- package/offline/snapshot.d.ts +132 -0
- package/offline/snapshot.d.ts.map +1 -0
- package/offline/snapshot.js +312 -0
- package/offline/status.d.ts +136 -0
- package/offline/status.d.ts.map +1 -0
- package/offline/status.js +479 -0
- package/offline/store-conformance.d.ts +48 -0
- package/offline/store-conformance.d.ts.map +1 -0
- package/offline/store-conformance.js +233 -0
- package/offline/tile-protocol.d.ts +81 -0
- package/offline/tile-protocol.d.ts.map +1 -0
- package/offline/tile-protocol.js +119 -0
- package/offline/types.d.ts +349 -0
- package/offline/types.d.ts.map +1 -0
- package/offline/types.js +75 -0
- package/package.json +14 -2
- package/realtime/odata-delta.d.ts +1 -1
- package/realtime/odata-delta.d.ts.map +1 -1
- package/realtime/odata-delta.js +38 -10
- package/scene-workspace/index.d.ts +2 -2
- package/scene-workspace/index.d.ts.map +1 -1
- package/scene-workspace/index.js +1 -1
- package/scene-workspace/scene-discovery.d.ts +111 -91
- package/scene-workspace/scene-discovery.d.ts.map +1 -1
- package/scene-workspace/scene-discovery.js +340 -92
- package/scene-workspace/scene-view.d.ts +6 -6
- package/scene-workspace/scene-view.d.ts.map +1 -1
- package/scene-workspace/scene-view.js +32 -6
- package/web-components/elements.d.ts +34 -0
- package/web-components/elements.d.ts.map +1 -1
- package/web-components/elements.js +82 -8
- package/web-components/index.d.ts +2 -0
- package/web-components/index.d.ts.map +1 -1
- package/web-components/index.js +3 -1
- package/web-components/map-chrome.d.ts +103 -0
- package/web-components/map-chrome.d.ts.map +1 -0
- package/web-components/map-chrome.js +325 -0
- package/web-components/widget-shell.d.ts +68 -0
- package/web-components/widget-shell.d.ts.map +1 -0
- package/web-components/widget-shell.js +224 -0
- package/widget-capabilities.d.ts +67 -0
- package/widget-capabilities.js +152 -0
|
@@ -5,15 +5,10 @@
|
|
|
5
5
|
* renders through the shared component set instead of shim-only markup
|
|
6
6
|
* (issue #493, REQ-004).
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* registration: they never construct a host, never mount a component, and
|
|
13
|
-
* never emit the missing-kit diagnostic below. {@link expectedKitConstructor}
|
|
14
|
-
* additionally knows `honua-search` / `honua-measurement`, ready for the day
|
|
15
|
-
* `SearchCompat` / `MeasurementCompat` adopt the host; until then, do not
|
|
16
|
-
* describe the registration as something that makes "the widgets" render.
|
|
8
|
+
* Shims that construct this host delegate their container to a kit element.
|
|
9
|
+
* A shim that does not construct a host stays state-model-only. The host
|
|
10
|
+
* never imports the kit; {@link expectedKitConstructor} names the class that
|
|
11
|
+
* must own each tag.
|
|
17
12
|
*
|
|
18
13
|
* The host **never imports the web-component kit** — not even dynamically:
|
|
19
14
|
* the `/esri-compat` entrypoint is bundle-budgeted, and any intra-package
|
|
@@ -22,10 +17,15 @@
|
|
|
22
17
|
* once via {@link registerHonuaWidgetKit}:
|
|
23
18
|
*
|
|
24
19
|
* ```ts doc-test=skip reason="wiring snippet requires an application host"
|
|
20
|
+
* import { registerComponent } from "@honua/app-platform/controls";
|
|
25
21
|
* import { registerHonuaWidgetKit } from "@honua/sdk-esri-compat";
|
|
26
22
|
*
|
|
27
|
-
* //
|
|
28
|
-
*
|
|
23
|
+
* // One tag. registerComponent imports the side-effect-free elements module
|
|
24
|
+
* // and calls defineHonuaWebComponent for that catalog id only.
|
|
25
|
+
* await registerComponent("web-components.legend");
|
|
26
|
+
* registerHonuaWidgetKit({
|
|
27
|
+
* HonuaLegendElement: customElements.get("honua-legend"),
|
|
28
|
+
* });
|
|
29
29
|
* ```
|
|
30
30
|
*
|
|
31
31
|
* The host is deliberately defensive:
|
|
@@ -66,18 +66,40 @@ export interface HonuaWidgetKitLike {
|
|
|
66
66
|
HonuaSearchElement?: CustomElementConstructor;
|
|
67
67
|
HonuaMeasurementElement?: CustomElementConstructor;
|
|
68
68
|
HonuaTimeSliderElement?: CustomElementConstructor;
|
|
69
|
+
HonuaEditorElement?: CustomElementConstructor;
|
|
70
|
+
HonuaFeatureEditorElement?: CustomElementConstructor;
|
|
71
|
+
HonuaFeatureTableElement?: CustomElementConstructor;
|
|
72
|
+
HonuaBookmarksElement?: CustomElementConstructor;
|
|
73
|
+
HonuaBasemapControlElement?: CustomElementConstructor;
|
|
74
|
+
HonuaLocateControlElement?: CustomElementConstructor;
|
|
75
|
+
HonuaSketchControlElement?: CustomElementConstructor;
|
|
76
|
+
HonuaPrintExportElement?: CustomElementConstructor;
|
|
77
|
+
HonuaFeatureInspectionElement?: CustomElementConstructor;
|
|
78
|
+
HonuaZoomElement?: CustomElementConstructor;
|
|
79
|
+
HonuaHomeElement?: CustomElementConstructor;
|
|
80
|
+
HonuaScaleBarElement?: CustomElementConstructor;
|
|
81
|
+
HonuaCompassElement?: CustomElementConstructor;
|
|
82
|
+
HonuaFullscreenElement?: CustomElementConstructor;
|
|
83
|
+
HonuaAttributionElement?: CustomElementConstructor;
|
|
84
|
+
HonuaFeaturePagerElement?: CustomElementConstructor;
|
|
85
|
+
HonuaAttachmentsElement?: CustomElementConstructor;
|
|
86
|
+
HonuaScaleRangeElement?: CustomElementConstructor;
|
|
87
|
+
HonuaDirectionsElement?: CustomElementConstructor;
|
|
88
|
+
HonuaChartElement?: CustomElementConstructor;
|
|
69
89
|
defineHonuaWebComponents?: (registry?: CustomElementRegistry) => void;
|
|
70
90
|
}
|
|
71
91
|
/** A kit module object, or a (possibly async) loader for one. */
|
|
72
92
|
export type HonuaWidgetKitSource = HonuaWidgetKitLike | (() => HonuaWidgetKitLike | Promise<HonuaWidgetKitLike>);
|
|
73
93
|
/**
|
|
74
94
|
* Injects the web-component kit that {@link HonuaWidgetHost} delegates to.
|
|
75
|
-
*
|
|
76
|
-
* (
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
95
|
+
* Register one tag with `registerComponent` from `@honua/app-platform/controls`
|
|
96
|
+
* (`src/controls/registry.ts`), then pass that tag's constructor here and omit
|
|
97
|
+
* `defineHonuaWebComponents`. Importing `@honua/app-platform/web-components`
|
|
98
|
+
* runs `defineHonuaWebComponents()` for every tag. Pass `undefined` to
|
|
99
|
+
* unregister: delegating shims return to headless mode, and each host drops
|
|
100
|
+
* any element it had mounted on its next {@link HonuaWidgetHost.mount} /
|
|
101
|
+
* {@link HonuaWidgetHost.update} rather than stranding a live component that
|
|
102
|
+
* no longer receives updates.
|
|
81
103
|
*
|
|
82
104
|
* Calling this also re-arms the one-time missing-kit diagnostic: registration
|
|
83
105
|
* is exactly the state the warning asks for, so an app that later unregisters
|
|
@@ -117,4 +139,11 @@ export declare class HonuaWidgetHost {
|
|
|
117
139
|
/** Removes the mounted element from the container. */
|
|
118
140
|
destroy(): void;
|
|
119
141
|
}
|
|
142
|
+
/**
|
|
143
|
+
* Constructs a host when `container` is set and a DOM can resolve it.
|
|
144
|
+
* Headless construction returns `undefined` and does not touch a document.
|
|
145
|
+
*/
|
|
146
|
+
export declare function bindHonuaWidgetHost(tagName: string, container: unknown, eventBus?: CompatEventBus): HonuaWidgetHost | undefined;
|
|
147
|
+
/** Copies shim state onto the mounted element. Missing kit leaves the container empty. */
|
|
148
|
+
export declare function pushWidgetHostState(host: HonuaWidgetHost | undefined, state: Readonly<Record<string, unknown>>): void;
|
|
120
149
|
//# sourceMappingURL=widget-host.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget-host.d.ts","sourceRoot":"","sources":["../../../src/esri-compat/widget-host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAiBrD,oEAAoE;AACpE,MAAM,WAAW,sBAAuB,SAAQ,WAAW;IACzD,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,kBAAkB,CAAC,EAAE,wBAAwB,CAAC;IAC9C,qBAAqB,CAAC,EAAE,wBAAwB,CAAC;IACjD,kBAAkB,CAAC,EAAE,wBAAwB,CAAC;IAC9C,uBAAuB,CAAC,EAAE,wBAAwB,CAAC;IACnD,sBAAsB,CAAC,EAAE,wBAAwB,CAAC;IAClD,wBAAwB,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACvE;AAED,iEAAiE;AACjE,MAAM,MAAM,oBAAoB,GAAG,kBAAkB,GAAG,CAAC,MAAM,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAYjH
|
|
1
|
+
{"version":3,"file":"widget-host.d.ts","sourceRoot":"","sources":["../../../src/esri-compat/widget-host.ts"],"names":[],"mappings":"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"}
|
|
@@ -5,15 +5,10 @@
|
|
|
5
5
|
* renders through the shared component set instead of shim-only markup
|
|
6
6
|
* (issue #493, REQ-004).
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* registration: they never construct a host, never mount a component, and
|
|
13
|
-
* never emit the missing-kit diagnostic below. {@link expectedKitConstructor}
|
|
14
|
-
* additionally knows `honua-search` / `honua-measurement`, ready for the day
|
|
15
|
-
* `SearchCompat` / `MeasurementCompat` adopt the host; until then, do not
|
|
16
|
-
* describe the registration as something that makes "the widgets" render.
|
|
8
|
+
* Shims that construct this host delegate their container to a kit element.
|
|
9
|
+
* A shim that does not construct a host stays state-model-only. The host
|
|
10
|
+
* never imports the kit; {@link expectedKitConstructor} names the class that
|
|
11
|
+
* must own each tag.
|
|
17
12
|
*
|
|
18
13
|
* The host **never imports the web-component kit** — not even dynamically:
|
|
19
14
|
* the `/esri-compat` entrypoint is bundle-budgeted, and any intra-package
|
|
@@ -22,10 +17,15 @@
|
|
|
22
17
|
* once via {@link registerHonuaWidgetKit}:
|
|
23
18
|
*
|
|
24
19
|
* ```ts doc-test=skip reason="wiring snippet requires an application host"
|
|
20
|
+
* import { registerComponent } from "@honua/app-platform/controls";
|
|
25
21
|
* import { registerHonuaWidgetKit } from "@honua/sdk-esri-compat";
|
|
26
22
|
*
|
|
27
|
-
* //
|
|
28
|
-
*
|
|
23
|
+
* // One tag. registerComponent imports the side-effect-free elements module
|
|
24
|
+
* // and calls defineHonuaWebComponent for that catalog id only.
|
|
25
|
+
* await registerComponent("web-components.legend");
|
|
26
|
+
* registerHonuaWidgetKit({
|
|
27
|
+
* HonuaLegendElement: customElements.get("honua-legend"),
|
|
28
|
+
* });
|
|
29
29
|
* ```
|
|
30
30
|
*
|
|
31
31
|
* The host is deliberately defensive:
|
|
@@ -67,12 +67,14 @@ let widgetKitSource;
|
|
|
67
67
|
let missingWidgetKitReported = false;
|
|
68
68
|
/**
|
|
69
69
|
* Injects the web-component kit that {@link HonuaWidgetHost} delegates to.
|
|
70
|
-
*
|
|
71
|
-
* (
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
70
|
+
* Register one tag with `registerComponent` from `@honua/app-platform/controls`
|
|
71
|
+
* (`src/controls/registry.ts`), then pass that tag's constructor here and omit
|
|
72
|
+
* `defineHonuaWebComponents`. Importing `@honua/app-platform/web-components`
|
|
73
|
+
* runs `defineHonuaWebComponents()` for every tag. Pass `undefined` to
|
|
74
|
+
* unregister: delegating shims return to headless mode, and each host drops
|
|
75
|
+
* any element it had mounted on its next {@link HonuaWidgetHost.mount} /
|
|
76
|
+
* {@link HonuaWidgetHost.update} rather than stranding a live component that
|
|
77
|
+
* no longer receives updates.
|
|
76
78
|
*
|
|
77
79
|
* Calling this also re-arms the one-time missing-kit diagnostic: registration
|
|
78
80
|
* is exactly the state the warning asks for, so an app that later unregisters
|
|
@@ -87,9 +89,11 @@ function missingWidgetKitMessage(tagName) {
|
|
|
87
89
|
return [
|
|
88
90
|
`[honua/esri-compat] <${tagName}> was not mounted because no Honua widget kit is registered,`,
|
|
89
91
|
"so this widget stays state-model-only and its container renders nothing.",
|
|
90
|
-
|
|
91
|
-
"
|
|
92
|
-
|
|
92
|
+
"Call registerComponent from @honua/app-platform/controls for that one tag, then",
|
|
93
|
+
"registerHonuaWidgetKit with the registered constructor and without defineHonuaWebComponents,",
|
|
94
|
+
"once during application startup. Importing @honua/app-platform/web-components runs",
|
|
95
|
+
"defineHonuaWebComponents() for every tag. This affects the shims that construct a widget host.",
|
|
96
|
+
`See ${WIDGET_KIT_DOCS_URL}`,
|
|
93
97
|
].join(" ");
|
|
94
98
|
}
|
|
95
99
|
/**
|
|
@@ -216,6 +220,26 @@ export class HonuaWidgetHost {
|
|
|
216
220
|
return this.#kitLoad;
|
|
217
221
|
}
|
|
218
222
|
}
|
|
223
|
+
/**
|
|
224
|
+
* Constructs a host when `container` is set and a DOM can resolve it.
|
|
225
|
+
* Headless construction returns `undefined` and does not touch a document.
|
|
226
|
+
*/
|
|
227
|
+
export function bindHonuaWidgetHost(tagName, container, eventBus) {
|
|
228
|
+
if (container == null)
|
|
229
|
+
return undefined;
|
|
230
|
+
const host = new HonuaWidgetHost(tagName, container, eventBus);
|
|
231
|
+
return host.available ? host : undefined;
|
|
232
|
+
}
|
|
233
|
+
/** Copies shim state onto the mounted element. Missing kit leaves the container empty. */
|
|
234
|
+
export function pushWidgetHostState(host, state) {
|
|
235
|
+
if (!host)
|
|
236
|
+
return;
|
|
237
|
+
void host.update((element) => {
|
|
238
|
+
for (const [key, value] of Object.entries(state)) {
|
|
239
|
+
element[key] = value;
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
}
|
|
219
243
|
/** Resolves the web-components kit class that must own `tagName` for delegation. */
|
|
220
244
|
function expectedKitConstructor(kit, tagName) {
|
|
221
245
|
switch (tagName) {
|
|
@@ -229,6 +253,46 @@ function expectedKitConstructor(kit, tagName) {
|
|
|
229
253
|
return kit.HonuaMeasurementElement;
|
|
230
254
|
case "honua-time-slider":
|
|
231
255
|
return kit.HonuaTimeSliderElement;
|
|
256
|
+
case "honua-editor":
|
|
257
|
+
return kit.HonuaEditorElement;
|
|
258
|
+
case "honua-feature-editor":
|
|
259
|
+
return kit.HonuaFeatureEditorElement;
|
|
260
|
+
case "honua-feature-table":
|
|
261
|
+
return kit.HonuaFeatureTableElement;
|
|
262
|
+
case "honua-bookmarks":
|
|
263
|
+
return kit.HonuaBookmarksElement;
|
|
264
|
+
case "honua-basemap-control":
|
|
265
|
+
return kit.HonuaBasemapControlElement;
|
|
266
|
+
case "honua-locate-control":
|
|
267
|
+
return kit.HonuaLocateControlElement;
|
|
268
|
+
case "honua-sketch-control":
|
|
269
|
+
return kit.HonuaSketchControlElement;
|
|
270
|
+
case "honua-print-export":
|
|
271
|
+
return kit.HonuaPrintExportElement;
|
|
272
|
+
case "honua-feature-inspection":
|
|
273
|
+
return kit.HonuaFeatureInspectionElement;
|
|
274
|
+
case "honua-zoom":
|
|
275
|
+
return kit.HonuaZoomElement;
|
|
276
|
+
case "honua-home":
|
|
277
|
+
return kit.HonuaHomeElement;
|
|
278
|
+
case "honua-scale-bar":
|
|
279
|
+
return kit.HonuaScaleBarElement;
|
|
280
|
+
case "honua-compass":
|
|
281
|
+
return kit.HonuaCompassElement;
|
|
282
|
+
case "honua-fullscreen":
|
|
283
|
+
return kit.HonuaFullscreenElement;
|
|
284
|
+
case "honua-attribution":
|
|
285
|
+
return kit.HonuaAttributionElement;
|
|
286
|
+
case "honua-feature-pager":
|
|
287
|
+
return kit.HonuaFeaturePagerElement;
|
|
288
|
+
case "honua-attachments":
|
|
289
|
+
return kit.HonuaAttachmentsElement;
|
|
290
|
+
case "honua-scale-range":
|
|
291
|
+
return kit.HonuaScaleRangeElement;
|
|
292
|
+
case "honua-directions":
|
|
293
|
+
return kit.HonuaDirectionsElement;
|
|
294
|
+
case "honua-chart":
|
|
295
|
+
return kit.HonuaChartElement;
|
|
232
296
|
default:
|
|
233
297
|
return undefined;
|
|
234
298
|
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compat hosts for the feature pager, attachment list, and scale range.
|
|
3
|
+
* They push shim state into the kit and do not build their own widget DOM.
|
|
4
|
+
*/
|
|
5
|
+
import type { CompatEventBus } from "./event-bus.js";
|
|
6
|
+
export declare class FeaturesCompat {
|
|
7
|
+
readonly view: unknown;
|
|
8
|
+
readonly container: unknown;
|
|
9
|
+
features: readonly unknown[];
|
|
10
|
+
private widgetHost;
|
|
11
|
+
constructor(options?: {
|
|
12
|
+
view?: unknown;
|
|
13
|
+
container?: unknown;
|
|
14
|
+
features?: readonly unknown[];
|
|
15
|
+
eventBus?: CompatEventBus;
|
|
16
|
+
});
|
|
17
|
+
setFeatures(features: readonly unknown[]): void;
|
|
18
|
+
private push;
|
|
19
|
+
}
|
|
20
|
+
export declare function attachmentNamesFromQuery(response: {
|
|
21
|
+
attachmentInfos?: readonly {
|
|
22
|
+
name?: string;
|
|
23
|
+
}[];
|
|
24
|
+
attachmentGroups?: readonly {
|
|
25
|
+
attachmentInfos?: readonly {
|
|
26
|
+
name?: string;
|
|
27
|
+
}[];
|
|
28
|
+
}[];
|
|
29
|
+
}): string[];
|
|
30
|
+
export declare class AttachmentsCompat {
|
|
31
|
+
readonly container: unknown;
|
|
32
|
+
readonly layer: {
|
|
33
|
+
queryAttachments?: (options?: unknown) => Promise<Parameters<typeof attachmentNamesFromQuery>[0]>;
|
|
34
|
+
} | undefined;
|
|
35
|
+
names: readonly string[];
|
|
36
|
+
private widgetHost;
|
|
37
|
+
constructor(options?: {
|
|
38
|
+
container?: unknown;
|
|
39
|
+
layer?: AttachmentsCompat["layer"];
|
|
40
|
+
names?: readonly string[];
|
|
41
|
+
eventBus?: CompatEventBus;
|
|
42
|
+
});
|
|
43
|
+
load(): Promise<readonly string[]>;
|
|
44
|
+
private push;
|
|
45
|
+
}
|
|
46
|
+
export declare class ScaleRangeCompat {
|
|
47
|
+
readonly container: unknown;
|
|
48
|
+
readonly layer: {
|
|
49
|
+
minScale?: number;
|
|
50
|
+
maxScale?: number;
|
|
51
|
+
setScaleRange?: (min: number, max: number) => void;
|
|
52
|
+
} | undefined;
|
|
53
|
+
private widgetHost;
|
|
54
|
+
constructor(options?: {
|
|
55
|
+
container?: unknown;
|
|
56
|
+
layer?: ScaleRangeCompat["layer"];
|
|
57
|
+
eventBus?: CompatEventBus;
|
|
58
|
+
});
|
|
59
|
+
private push;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=widget-shell-hosts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget-shell-hosts.d.ts","sourceRoot":"","sources":["../../../src/esri-compat/widget-shell-hosts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGrD,qBAAa,cAAc;IACzB,SAAgB,IAAI,EAAE,OAAO,CAAC;IAC9B,SAAgB,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,EAAE,SAAS,OAAO,EAAE,CAAC;IACpC,OAAO,CAAC,UAAU,CAA8B;gBAG9C,OAAO,GAAE;QACP,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,QAAQ,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;QAC9B,QAAQ,CAAC,EAAE,cAAc,CAAC;KACtB;IASD,WAAW,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,IAAI;IAKtD,OAAO,CAAC,IAAI;CAGb;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE;IACjD,eAAe,CAAC,EAAE,SAAS;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC/C,gBAAgB,CAAC,EAAE,SAAS;QAAE,eAAe,CAAC,EAAE,SAAS;YAAE,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,EAAE,CAAA;KAAE,EAAE,CAAC;CAClF,GAAG,MAAM,EAAE,CAWX;AAED,qBAAa,iBAAiB;IAC5B,SAAgB,SAAS,EAAE,OAAO,CAAC;IACnC,SAAgB,KAAK,EACjB;QAAE,gBAAgB,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GACrG,SAAS,CAAC;IACP,KAAK,EAAE,SAAS,MAAM,EAAE,CAAM;IACrC,OAAO,CAAC,UAAU,CAA8B;gBAG9C,OAAO,GAAE;QACP,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,KAAK,CAAC,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;QACnC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;QAC1B,QAAQ,CAAC,EAAE,cAAc,CAAC;KACtB;IASK,IAAI,IAAI,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC;IAQ/C,OAAO,CAAC,IAAI;CAGb;AAED,qBAAa,gBAAgB;IAC3B,SAAgB,SAAS,EAAE,OAAO,CAAC;IACnC,SAAgB,KAAK,EACjB;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE,GAC5F,SAAS,CAAC;IACd,OAAO,CAAC,UAAU,CAA8B;gBAG9C,OAAO,GAAE;QACP,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,KAAK,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAClC,QAAQ,CAAC,EAAE,cAAc,CAAC;KACtB;IAQR,OAAO,CAAC,IAAI;CAGb"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compat hosts for the feature pager, attachment list, and scale range.
|
|
3
|
+
* They push shim state into the kit and do not build their own widget DOM.
|
|
4
|
+
*/
|
|
5
|
+
import { bindHonuaWidgetHost, pushWidgetHostState } from "./widget-host.js";
|
|
6
|
+
export class FeaturesCompat {
|
|
7
|
+
view;
|
|
8
|
+
container;
|
|
9
|
+
features;
|
|
10
|
+
widgetHost;
|
|
11
|
+
constructor(options = {}) {
|
|
12
|
+
this.view = options.view;
|
|
13
|
+
this.container = options.container;
|
|
14
|
+
this.features = options.features ?? [];
|
|
15
|
+
this.widgetHost = bindHonuaWidgetHost("honua-feature-pager", this.container, options.eventBus);
|
|
16
|
+
this.push();
|
|
17
|
+
}
|
|
18
|
+
setFeatures(features) {
|
|
19
|
+
this.features = features;
|
|
20
|
+
this.push();
|
|
21
|
+
}
|
|
22
|
+
push() {
|
|
23
|
+
pushWidgetHostState(this.widgetHost, { view: this.view, features: this.features });
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export function attachmentNamesFromQuery(response) {
|
|
27
|
+
const names = [];
|
|
28
|
+
for (const info of response.attachmentInfos ?? []) {
|
|
29
|
+
if (info.name)
|
|
30
|
+
names.push(info.name);
|
|
31
|
+
}
|
|
32
|
+
for (const group of response.attachmentGroups ?? []) {
|
|
33
|
+
for (const info of group.attachmentInfos ?? []) {
|
|
34
|
+
if (info.name)
|
|
35
|
+
names.push(info.name);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return names;
|
|
39
|
+
}
|
|
40
|
+
export class AttachmentsCompat {
|
|
41
|
+
container;
|
|
42
|
+
layer;
|
|
43
|
+
names = [];
|
|
44
|
+
widgetHost;
|
|
45
|
+
constructor(options = {}) {
|
|
46
|
+
this.container = options.container;
|
|
47
|
+
this.layer = options.layer;
|
|
48
|
+
this.names = options.names ?? [];
|
|
49
|
+
this.widgetHost = bindHonuaWidgetHost("honua-attachments", this.container, options.eventBus);
|
|
50
|
+
this.push();
|
|
51
|
+
}
|
|
52
|
+
async load() {
|
|
53
|
+
if (this.layer?.queryAttachments) {
|
|
54
|
+
this.names = attachmentNamesFromQuery(await this.layer.queryAttachments());
|
|
55
|
+
}
|
|
56
|
+
this.push();
|
|
57
|
+
return this.names;
|
|
58
|
+
}
|
|
59
|
+
push() {
|
|
60
|
+
pushWidgetHostState(this.widgetHost, { names: this.names });
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
export class ScaleRangeCompat {
|
|
64
|
+
container;
|
|
65
|
+
layer;
|
|
66
|
+
widgetHost;
|
|
67
|
+
constructor(options = {}) {
|
|
68
|
+
this.container = options.container;
|
|
69
|
+
this.layer = options.layer;
|
|
70
|
+
this.widgetHost = bindHonuaWidgetHost("honua-scale-range", this.container, options.eventBus);
|
|
71
|
+
this.push();
|
|
72
|
+
}
|
|
73
|
+
push() {
|
|
74
|
+
pushWidgetHostState(this.widgetHost, { layer: this.layer });
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { CapabilityPolicy, Query, Source, SourceId } from "../contract/types.js";
|
|
2
|
+
import type { ExecuteQueryPlanOptions, QueryExecutionPlanV1, QueryFallbackPolicy, QueryPlanCacheOptions, QueryPlanningEstimates } from "../query-planner/types.js";
|
|
3
|
+
/** Built-in renderers are conveniences; namespaced adapters may extend this vocabulary. */
|
|
4
|
+
export type RendererKind = "maplibre" | (string & {});
|
|
5
|
+
export type RendererEnvironment = "browser" | "node" | "worker";
|
|
6
|
+
export type RendererOwnership = "owned" | "borrowed";
|
|
7
|
+
export type RendererTarget = string | object;
|
|
8
|
+
/** Stable, renderer-neutral diagnostic exposed by one mounted handle. */
|
|
9
|
+
export interface RendererDiagnostic {
|
|
10
|
+
readonly code: string;
|
|
11
|
+
readonly severity: "info" | "warning" | "error";
|
|
12
|
+
readonly message: string;
|
|
13
|
+
readonly strategy?: string;
|
|
14
|
+
}
|
|
15
|
+
/** Refresh controls shared by every renderer session. */
|
|
16
|
+
export interface MountedMapRefreshOptions {
|
|
17
|
+
readonly signal?: AbortSignal;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Request passed to an injected renderer adapter.
|
|
21
|
+
*
|
|
22
|
+
* The adapter may ask for a query plan only when its existing strategy needs
|
|
23
|
+
* materialized features. Planning is memoized and performs no result I/O.
|
|
24
|
+
*/
|
|
25
|
+
export interface RendererMountRequest<T = Record<string, unknown>, TOptions = unknown> {
|
|
26
|
+
readonly source: Source<T>;
|
|
27
|
+
readonly rendererOptions?: TOptions;
|
|
28
|
+
readonly style?: "auto" | Readonly<Record<string, unknown>>;
|
|
29
|
+
readonly ownership: RendererOwnership;
|
|
30
|
+
readonly signal: AbortSignal;
|
|
31
|
+
/** Distinguishes the kernel's safe default query from caller-authored filtering intent. */
|
|
32
|
+
readonly queryIntent: "default" | "explicit";
|
|
33
|
+
readonly queryPlan?: QueryExecutionPlanV1;
|
|
34
|
+
readonly execution: ExecuteQueryPlanOptions;
|
|
35
|
+
planQuery(): Promise<QueryExecutionPlanV1>;
|
|
36
|
+
}
|
|
37
|
+
/** Renderer-owned leaf session adopted by the connection lifecycle. */
|
|
38
|
+
export interface RendererSession<TRaw = unknown> {
|
|
39
|
+
readonly raw: TRaw;
|
|
40
|
+
readonly ready: Promise<void>;
|
|
41
|
+
readonly diagnostics: readonly RendererDiagnostic[];
|
|
42
|
+
refresh(options?: MountedMapRefreshOptions): Promise<void>;
|
|
43
|
+
dispose(): void | Promise<void>;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Minimal executable renderer seam. Heavy peers are injected as values and
|
|
47
|
+
* are never imported by the kernel.
|
|
48
|
+
*/
|
|
49
|
+
export interface RendererAdapter<TKind extends RendererKind = RendererKind, TRaw = unknown, TOptions = unknown> {
|
|
50
|
+
readonly kind: TKind;
|
|
51
|
+
readonly environments: readonly RendererEnvironment[];
|
|
52
|
+
readonly peer: unknown;
|
|
53
|
+
defaultOwnership(target: RendererTarget): RendererOwnership;
|
|
54
|
+
mount<T = Record<string, unknown>>(target: RendererTarget, request: RendererMountRequest<T, TOptions>): Promise<RendererSession<TRaw>>;
|
|
55
|
+
}
|
|
56
|
+
/** Connection-level planning and renderer controls for one mount. */
|
|
57
|
+
export interface MountOptions<T = Record<string, unknown>, TKind extends RendererKind = RendererKind, TRaw = unknown, TRendererOptions = unknown> {
|
|
58
|
+
readonly renderer: RendererAdapter<TKind, TRaw, TRendererOptions>;
|
|
59
|
+
readonly sourceId?: SourceId;
|
|
60
|
+
/** A raw query is bounded before planning; an accepted plan is executed without replanning. */
|
|
61
|
+
readonly query?: Readonly<Query<T>> | QueryExecutionPlanV1;
|
|
62
|
+
readonly capabilityPolicy?: CapabilityPolicy;
|
|
63
|
+
readonly fallback?: QueryFallbackPolicy;
|
|
64
|
+
readonly estimates?: QueryPlanningEstimates;
|
|
65
|
+
readonly cache?: QueryPlanCacheOptions;
|
|
66
|
+
readonly rendererOptions?: TRendererOptions;
|
|
67
|
+
readonly style?: "auto" | Readonly<Record<string, unknown>>;
|
|
68
|
+
/** Defaults to owned for a selector/element target and borrowed for an existing host object. */
|
|
69
|
+
readonly ownership?: RendererOwnership;
|
|
70
|
+
readonly signal?: AbortSignal;
|
|
71
|
+
}
|
|
72
|
+
/** Connection-owned map lifecycle with a typed raw escape hatch. */
|
|
73
|
+
export interface MountedMap<TKind extends RendererKind = RendererKind, TRaw = unknown> extends AsyncDisposable {
|
|
74
|
+
readonly id: string;
|
|
75
|
+
readonly renderer: TKind;
|
|
76
|
+
readonly ready: Promise<void>;
|
|
77
|
+
readonly diagnostics: readonly RendererDiagnostic[];
|
|
78
|
+
raw(kind: TKind): TRaw | undefined;
|
|
79
|
+
refresh(options?: MountedMapRefreshOptions): Promise<void>;
|
|
80
|
+
dispose(): Promise<void>;
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=renderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|