@honua/react 0.1.11-beta.0 → 0.1.13
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/connect-url-safety.d.ts +53 -0
- package/connect-url-safety.js +189 -0
- package/contract/pmtiles.d.ts +6 -5
- package/contract/pmtiles.d.ts.map +1 -1
- package/contract/pmtiles.js +30 -5
- package/control-plane/generated/admin-operations.d.ts +3 -3
- package/control-plane/generated/admin-operations.d.ts.map +1 -1
- package/control-plane/generated/admin-operations.js +3 -3
- 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 +10 -6
- 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/geocoding/index.d.ts +114 -0
- package/geocoding/index.d.ts.map +1 -0
- package/geocoding/index.js +293 -0
- package/geocoding/provider-http.d.ts +37 -0
- package/geocoding/provider-http.d.ts.map +1 -0
- package/geocoding/provider-http.js +93 -0
- package/geocoding/provider.d.ts +145 -0
- package/geocoding/provider.d.ts.map +1 -0
- package/geocoding/provider.js +41 -0
- package/geocoding/providers/honua.d.ts +28 -0
- package/geocoding/providers/honua.d.ts.map +1 -0
- package/geocoding/providers/honua.js +68 -0
- package/geocoding/providers/nominatim.d.ts +47 -0
- package/geocoding/providers/nominatim.d.ts.map +1 -0
- package/geocoding/providers/nominatim.js +105 -0
- package/geocoding/providers/pelias.d.ts +40 -0
- package/geocoding/providers/pelias.d.ts.map +1 -0
- package/geocoding/providers/pelias.js +115 -0
- package/geocoding/providers/photon.d.ts +39 -0
- package/geocoding/providers/photon.d.ts.map +1 -0
- package/geocoding/providers/photon.js +107 -0
- package/geometry/convert.d.ts +13 -0
- package/geometry/convert.d.ts.map +1 -0
- package/geometry/convert.js +12 -0
- package/geometry/index.d.ts +17 -0
- package/geometry/index.d.ts.map +1 -0
- package/geometry/index.js +15 -0
- package/geometry/internal.d.ts +25 -0
- package/geometry/internal.d.ts.map +1 -0
- package/geometry/internal.js +40 -0
- package/geometry/ops.d.ts +71 -0
- package/geometry/ops.d.ts.map +1 -0
- package/geometry/ops.js +147 -0
- package/geometry/project.d.ts +40 -0
- package/geometry/project.d.ts.map +1 -0
- package/geometry/project.js +88 -0
- package/geometry/types.d.ts +36 -0
- package/geometry/types.d.ts.map +1 -0
- package/geometry/types.js +12 -0
- package/kernel/renderer.d.ts +82 -0
- package/kernel/renderer.js +1 -0
- package/offline/digest.d.ts +15 -0
- package/offline/digest.js +58 -0
- package/offline/quota.d.ts +161 -0
- package/offline/quota.js +370 -0
- package/offline/types.d.ts +349 -0
- package/offline/types.js +75 -0
- package/package.json +14 -2
- 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":"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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O,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAYjH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,oBAAoB,GAAG,SAAS,GAAG,IAAI,CAGrF;AAmCD,qBAAa,eAAe;;IAQ1B;;;;OAIG;gBACgB,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,cAAc;IAMjF,gEAAgE;IAChE,IAAW,SAAS,IAAI,OAAO,CAE9B;IAED,6DAA6D;IAC7D,IAAW,OAAO,IAAI,sBAAsB,GAAG,SAAS,CAEvD;IAED;;;;;;;;;;OAUG;IACU,KAAK,IAAI,OAAO,CAAC,sBAAsB,GAAG,SAAS,CAAC;IAuBjE;;;;OAIG;IACU,MAAM,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,sBAAsB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAKrF,sDAAsD;IAC/C,OAAO,IAAI,IAAI;CAoCvB;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,OAAO,EAClB,QAAQ,CAAC,EAAE,cAAc,GACxB,eAAe,GAAG,SAAS,CAI7B;AAED,0FAA0F;AAC1F,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,eAAe,GAAG,SAAS,EAAE,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,IAAI,CAOrH"}
|
|
@@ -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;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AE,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,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@honua/sdk-js/geocoding` — `HonuaGeocodingClient` for forward / reverse
|
|
3
|
+
* geocoding and typeahead suggestions over a Honua-hosted GeocodeServer.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* import { HonuaGeocodingClient } from "@honua/sdk-js/geocoding";
|
|
8
|
+
*
|
|
9
|
+
* const geo = new HonuaGeocodingClient({
|
|
10
|
+
* baseUrl: "https://your-honua-server.example",
|
|
11
|
+
* locatorName: "world-geocoder",
|
|
12
|
+
* });
|
|
13
|
+
*
|
|
14
|
+
* const results = await geo.forwardGeocode("1 Honolulu Pl, HI");
|
|
15
|
+
* // reverseGeocode is latitude-first, then longitude.
|
|
16
|
+
* const here = await geo.reverseGeocode(21.30, -157.85);
|
|
17
|
+
* const hints = await geo.suggest("honol");
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @example Debounced typeahead
|
|
21
|
+
* ```ts
|
|
22
|
+
* let timer: ReturnType<typeof setTimeout> | undefined;
|
|
23
|
+
* input.addEventListener("input", (event) => {
|
|
24
|
+
* clearTimeout(timer);
|
|
25
|
+
* const text = (event.target as HTMLInputElement).value;
|
|
26
|
+
* timer = setTimeout(async () => {
|
|
27
|
+
* render(await geo.suggest(text));
|
|
28
|
+
* }, 200);
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @packageDocumentation
|
|
33
|
+
*/
|
|
34
|
+
export type { ProviderTransportOptions } from "./provider-http.js";
|
|
35
|
+
export type { CapabilityPolicy, GeocodingCapability, GeocodingProvenance, GeocodingProvider, ProviderGeocodeMatch, ProviderGeocodeOptions, ProviderReverseMatch, ProviderSuggestion, ProviderSuggestOptions, } from "./provider.js";
|
|
36
|
+
export { assertGeocodingCapability, supportsGeocodingCapability } from "./provider.js";
|
|
37
|
+
export { type HonuaGeocodingProviderOptions, honuaGeocodingProvider } from "./providers/honua.js";
|
|
38
|
+
export { type NominatimProviderOptions, nominatimGeocodingProvider } from "./providers/nominatim.js";
|
|
39
|
+
export { type PeliasProviderOptions, peliasGeocodingProvider } from "./providers/pelias.js";
|
|
40
|
+
export { type PhotonProviderOptions, photonGeocodingProvider } from "./providers/photon.js";
|
|
41
|
+
export interface GeocodingClientOptions {
|
|
42
|
+
baseUrl: string;
|
|
43
|
+
locatorName?: string;
|
|
44
|
+
apiKey?: string;
|
|
45
|
+
bearerToken?: string;
|
|
46
|
+
fetchFn?: typeof fetch;
|
|
47
|
+
timeoutMs?: number;
|
|
48
|
+
}
|
|
49
|
+
export interface ForwardGeocodeOptions {
|
|
50
|
+
maxResults?: number;
|
|
51
|
+
countryCodes?: string;
|
|
52
|
+
spatialReferenceWkid?: number;
|
|
53
|
+
}
|
|
54
|
+
export interface ReverseGeocodeOptions {
|
|
55
|
+
spatialReferenceWkid?: number;
|
|
56
|
+
}
|
|
57
|
+
export interface SuggestOptions {
|
|
58
|
+
maxSuggestions?: number;
|
|
59
|
+
countryCodes?: string;
|
|
60
|
+
}
|
|
61
|
+
export interface GeocodeResult {
|
|
62
|
+
address: string;
|
|
63
|
+
latitude: number;
|
|
64
|
+
longitude: number;
|
|
65
|
+
score: number;
|
|
66
|
+
attributes: Record<string, string | null>;
|
|
67
|
+
}
|
|
68
|
+
export interface ReverseGeocodeResult {
|
|
69
|
+
address: string;
|
|
70
|
+
latitude: number;
|
|
71
|
+
longitude: number;
|
|
72
|
+
attributes: Record<string, string | null>;
|
|
73
|
+
}
|
|
74
|
+
export interface GeocodeSuggestion {
|
|
75
|
+
text: string;
|
|
76
|
+
magicKey: string;
|
|
77
|
+
isCollection: boolean;
|
|
78
|
+
}
|
|
79
|
+
export declare class HonuaGeocodingClient {
|
|
80
|
+
private readonly baseUrl;
|
|
81
|
+
private readonly locatorName;
|
|
82
|
+
private readonly fetchFn;
|
|
83
|
+
private readonly defaultHeaders;
|
|
84
|
+
private readonly timeoutMs;
|
|
85
|
+
constructor(options: GeocodingClientOptions);
|
|
86
|
+
/**
|
|
87
|
+
* Forward-geocode a single-line address string into one or more candidate
|
|
88
|
+
* locations.
|
|
89
|
+
*/
|
|
90
|
+
forwardGeocode(address: string, options?: ForwardGeocodeOptions): Promise<GeocodeResult[]>;
|
|
91
|
+
/**
|
|
92
|
+
* Reverse-geocode a latitude/longitude pair to the nearest address.
|
|
93
|
+
* Returns `null` when the server cannot find an address for the given
|
|
94
|
+
* coordinates.
|
|
95
|
+
*/
|
|
96
|
+
reverseGeocode(latitude: number, longitude: number, options?: ReverseGeocodeOptions): Promise<ReverseGeocodeResult | null>;
|
|
97
|
+
/**
|
|
98
|
+
* Retrieve type-ahead suggestions for a partial address string.
|
|
99
|
+
*/
|
|
100
|
+
suggest(text: string, options?: SuggestOptions): Promise<GeocodeSuggestion[]>;
|
|
101
|
+
private serviceBasePath;
|
|
102
|
+
/**
|
|
103
|
+
* Fetch with `redirect: "manual"`, only following a redirect when its target
|
|
104
|
+
* stays on the configured base origin. The geocoding client attaches its API
|
|
105
|
+
* key as a custom `X-API-Key` header that the runtime does not strip across a
|
|
106
|
+
* cross-origin redirect, so auto-following one would leak the key to the
|
|
107
|
+
* redirect target's host. Cross-origin (or origin-unverifiable) redirects
|
|
108
|
+
* throw instead of replaying the credentialed request off-origin.
|
|
109
|
+
*/
|
|
110
|
+
private fetchWithSafeRedirects;
|
|
111
|
+
private geoServicesError;
|
|
112
|
+
private request;
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/geocoding/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AASH,YAAY,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACnE,YAAY,EACV,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,KAAK,6BAA6B,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAClG,OAAO,EAAE,KAAK,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,0BAA0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