@honua/app-platform 0.1.1-beta.0 → 0.1.4-beta.0
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/collaboration/client.d.ts.map +1 -1
- package/connect-url-safety.d.ts +53 -0
- package/connect-url-safety.js +189 -0
- package/contract/discovery.d.ts +34 -0
- package/contract/discovery.d.ts.map +1 -1
- package/contract/index.d.ts +7 -5
- package/contract/index.d.ts.map +1 -1
- package/contract/index.js +3 -2
- package/contract/pmtiles.d.ts +10 -1
- package/contract/pmtiles.d.ts.map +1 -1
- package/contract/pmtiles.js +10 -2
- package/contract/protocol-module.d.ts +84 -9
- package/contract/protocol-module.d.ts.map +1 -1
- package/contract/query-filter-fes.d.ts +18 -0
- package/contract/query-filter-fes.d.ts.map +1 -0
- package/contract/query-filter-fes.js +122 -0
- package/contract/query-filter.d.ts +300 -0
- package/contract/query-filter.d.ts.map +1 -0
- package/contract/query-filter.js +883 -0
- package/contract/schema.d.ts +12 -0
- package/contract/schema.d.ts.map +1 -1
- package/contract/schema.js +34 -0
- package/contract/source-capability-support.d.ts.map +1 -1
- package/contract/source-capability-support.js +15 -3
- package/contract/source.d.ts +45 -25
- package/contract/source.d.ts.map +1 -1
- package/contract/source.js +719 -479
- package/contract/types.d.ts +87 -18
- package/contract/types.d.ts.map +1 -1
- package/contract/widget-source.d.ts.map +1 -1
- package/controls/basemap-switcher.d.ts +19 -11
- package/controls/basemap-switcher.d.ts.map +1 -1
- package/controls/basemap-switcher.js +58 -25
- package/controls/catalog.d.ts +105 -0
- package/controls/catalog.d.ts.map +1 -0
- package/controls/catalog.js +341 -0
- package/controls/element-utils.d.ts +9 -0
- package/controls/element-utils.d.ts.map +1 -1
- package/controls/element-utils.js +17 -0
- package/controls/index.d.ts +29 -8
- package/controls/index.d.ts.map +1 -1
- package/controls/index.js +26 -8
- package/controls/layer-list.d.ts +13 -5
- package/controls/layer-list.d.ts.map +1 -1
- package/controls/layer-list.js +72 -15
- package/controls/legend.d.ts +32 -5
- package/controls/legend.d.ts.map +1 -1
- package/controls/legend.js +95 -25
- package/controls/qualification.d.ts +152 -0
- package/controls/qualification.d.ts.map +1 -0
- package/controls/qualification.js +1265 -0
- package/controls/registry.d.ts +104 -0
- package/controls/registry.d.ts.map +1 -0
- package/controls/registry.js +150 -0
- package/controls/swipe-control.d.ts +6 -1
- package/controls/swipe-control.d.ts.map +1 -1
- package/controls/swipe-control.js +82 -20
- package/core/client.d.ts +45 -21
- package/core/client.d.ts.map +1 -1
- package/core/client.js +224 -46
- package/core/error-classifications.d.ts +6 -0
- package/core/error-classifications.d.ts.map +1 -1
- package/core/error-classifications.js +6 -0
- package/core/error-code-registry.d.ts +6 -0
- package/core/error-code-registry.d.ts.map +1 -1
- package/core/error-code-registry.js +6 -0
- package/core/error-envelope.js +2 -0
- package/core/errors.d.ts +1 -1
- package/core/errors.js +1 -1
- package/core/geoparquet-sql.d.ts +68 -4
- package/core/geoparquet-sql.d.ts.map +1 -1
- package/core/geoparquet-sql.js +325 -8
- package/core/odata-write-codec.d.ts.map +1 -1
- package/core/odata-write-codec.js +0 -1
- package/core/odata.d.ts +6 -0
- package/core/odata.d.ts.map +1 -1
- package/core/odata.js +6 -1
- package/core/ogc-processes.d.ts +182 -25
- package/core/ogc-processes.d.ts.map +1 -1
- package/core/ogc-processes.js +602 -30
- package/core/process-runner.d.ts +8 -1
- package/core/process-runner.d.ts.map +1 -1
- package/core/process-runner.js +1 -0
- package/core/protocol-transport.d.ts +2 -0
- package/core/protocol-transport.d.ts.map +1 -1
- package/core/stac.d.ts +31 -0
- package/core/stac.d.ts.map +1 -1
- package/core/stac.js +136 -19
- package/core/surfaces.d.ts.map +1 -1
- package/core/surfaces.js +273 -68
- package/core/types.d.ts +123 -9
- package/core/types.d.ts.map +1 -1
- package/core/wfs-axis-order.d.ts +18 -0
- package/core/wfs-axis-order.d.ts.map +1 -0
- package/core/wfs-axis-order.js +108 -0
- package/core/wfs-capabilities.d.ts +65 -24
- package/core/wfs-capabilities.d.ts.map +1 -1
- package/core/wfs-capabilities.js +237 -27
- package/core/wfs-filter.d.ts +26 -3
- package/core/wfs-filter.d.ts.map +1 -1
- package/core/wfs-filter.js +48 -53
- package/core/wfs-protocol-error.d.ts +12 -0
- package/core/wfs-protocol-error.d.ts.map +1 -0
- package/core/wfs-protocol-error.js +13 -0
- package/core/wfs.d.ts +53 -1
- package/core/wfs.d.ts.map +1 -1
- package/core/wfs.js +251 -29
- package/core/wms-feature-info.d.ts +92 -0
- package/core/wms-feature-info.d.ts.map +1 -0
- package/core/wms-feature-info.js +285 -0
- package/core/wms.d.ts +9 -0
- package/core/wms.d.ts.map +1 -1
- package/core/wms.js +17 -5
- package/esri-compat/event-bus.d.ts +20 -0
- package/esri-compat/event-bus.d.ts.map +1 -1
- package/esri-compat/feature-filter.d.ts +46 -1
- package/esri-compat/feature-filter.d.ts.map +1 -1
- package/esri-compat/feature-filter.js +49 -0
- package/esri-compat/geojson-layer.d.ts +4 -2
- package/esri-compat/geojson-layer.d.ts.map +1 -1
- package/esri-compat/geojson-layer.js +4 -2
- package/esri-compat/identity-manager.js +2 -2
- package/esri-compat/imagery-layer.d.ts +2 -1
- package/esri-compat/imagery-layer.d.ts.map +1 -1
- package/esri-compat/imagery-layer.js +2 -1
- package/esri-compat/layer-list.d.ts +8 -1
- package/esri-compat/layer-list.d.ts.map +1 -1
- package/esri-compat/layer-list.js +11 -4
- package/esri-compat/legend.d.ts.map +1 -1
- package/esri-compat/legend.js +1 -1
- package/esri-compat/locator.d.ts +297 -0
- package/esri-compat/locator.d.ts.map +1 -0
- package/esri-compat/locator.js +579 -0
- package/esri-compat/map-image-layer.d.ts.map +1 -1
- package/esri-compat/map-view.d.ts.map +1 -1
- package/esri-compat/map-view.js +1 -1
- package/esri-compat/scene-view.d.ts.map +1 -1
- package/esri-compat/time-slider.d.ts +29 -0
- package/esri-compat/time-slider.d.ts.map +1 -1
- package/esri-compat/time-slider.js +117 -0
- package/esri-compat/wfs-layer.d.ts +2 -1
- package/esri-compat/wfs-layer.d.ts.map +1 -1
- package/esri-compat/wfs-layer.js +2 -1
- package/esri-compat/widget-host.d.ts +42 -6
- package/esri-compat/widget-host.d.ts.map +1 -1
- package/esri-compat/widget-host.js +99 -10
- package/generated-app/projection.d.ts.map +1 -1
- package/generated-app/runtime.d.ts.map +1 -1
- package/map/data-to-map-bridge.d.ts +1 -1
- package/map/data-to-map-bridge.d.ts.map +1 -1
- package/map/data-to-map-bridge.js +1 -2
- package/map/honua-map.d.ts.map +1 -1
- package/map/honua-map.js +1 -1
- package/map/index.d.ts +2 -0
- package/map/index.d.ts.map +1 -1
- package/map/index.js +2 -0
- package/map/realtime-reconciliation-adapter.d.ts +98 -0
- package/map/realtime-reconciliation-adapter.d.ts.map +1 -0
- package/map/realtime-reconciliation-adapter.js +84 -0
- package/map/temporal-playback.d.ts +25 -0
- package/map/temporal-playback.d.ts.map +1 -1
- package/map/temporal-playback.js +29 -1
- package/operator/workspace/workspace.d.ts.map +1 -1
- package/operator/workspace/workspace.js +0 -2
- package/package.json +4 -3
- package/query-planner/canonical-filter.d.ts +30 -0
- package/query-planner/canonical-filter.d.ts.map +1 -0
- package/query-planner/canonical-filter.js +30 -0
- package/query-planner/columnar-plan.d.ts +63 -0
- package/query-planner/columnar-plan.d.ts.map +1 -0
- package/query-planner/columnar-plan.js +94 -0
- package/query-planner/diagnostics.d.ts +3 -3
- package/query-planner/diagnostics.d.ts.map +1 -1
- package/query-planner/diagnostics.js +17 -4
- package/query-planner/duckdb.d.ts.map +1 -1
- package/query-planner/duckdb.js +16 -2
- package/query-planner/execution-context.d.ts.map +1 -1
- package/query-planner/execution-context.js +3 -1
- package/query-planner/executor.d.ts.map +1 -1
- package/query-planner/executor.js +7 -1
- package/query-planner/geoservices.d.ts.map +1 -1
- package/query-planner/geoservices.js +24 -5
- package/query-planner/grpc.d.ts.map +1 -1
- package/query-planner/grpc.js +29 -5
- package/query-planner/index.d.ts +20 -5
- package/query-planner/index.d.ts.map +1 -1
- package/query-planner/index.js +16 -3
- package/query-planner/ir.d.ts +6 -1
- package/query-planner/ir.d.ts.map +1 -1
- package/query-planner/ir.js +63 -1
- package/query-planner/odata-protocol-module.d.ts +54 -0
- package/query-planner/odata-protocol-module.d.ts.map +1 -0
- package/query-planner/odata-protocol-module.js +199 -0
- package/query-planner/odata-v1.d.ts +23 -0
- package/query-planner/odata-v1.d.ts.map +1 -0
- package/query-planner/odata-v1.js +202 -0
- package/query-planner/odata.d.ts +0 -3
- package/query-planner/odata.d.ts.map +1 -1
- package/query-planner/odata.js +0 -143
- package/query-planner/ogc-features.d.ts.map +1 -1
- package/query-planner/ogc-features.js +23 -1
- package/query-planner/planner.d.ts +2 -2
- package/query-planner/planner.d.ts.map +1 -1
- package/query-planner/planner.js +146 -27
- package/query-planner/representation.d.ts +59 -0
- package/query-planner/representation.d.ts.map +1 -0
- package/query-planner/representation.js +140 -0
- package/query-planner/types.d.ts +153 -3
- package/query-planner/types.d.ts.map +1 -1
- package/query-planner/wfs-protocol-module.d.ts +57 -0
- package/query-planner/wfs-protocol-module.d.ts.map +1 -0
- package/query-planner/wfs-protocol-module.js +731 -0
- package/query-planner/wfs-v1.d.ts +41 -0
- package/query-planner/wfs-v1.d.ts.map +1 -0
- package/query-planner/wfs-v1.js +366 -0
- package/query-planner/wfs.d.ts +1 -3
- package/query-planner/wfs.d.ts.map +1 -1
- package/query-planner/wfs.js +1 -70
- package/realtime/checkpoint-store.d.ts +206 -0
- package/realtime/checkpoint-store.d.ts.map +1 -0
- package/realtime/checkpoint-store.js +504 -0
- package/realtime/honua-server.d.ts +8 -0
- package/realtime/honua-server.d.ts.map +1 -1
- package/realtime/honua-server.js +123 -14
- package/realtime/index.d.ts +4 -0
- package/realtime/index.d.ts.map +1 -1
- package/realtime/index.js +2 -0
- package/realtime/reconciliation.d.ts +245 -0
- package/realtime/reconciliation.d.ts.map +1 -0
- package/realtime/reconciliation.js +377 -0
- package/realtime/resumable-transport.d.ts.map +1 -1
- package/realtime/sse.d.ts.map +1 -1
- package/realtime/websocket.d.ts.map +1 -1
- package/realtime/wire.d.ts +2 -1
- package/realtime/wire.d.ts.map +1 -1
- package/realtime/wire.js +24 -8
- package/replica-sync/errors.d.ts +19 -1
- package/replica-sync/errors.d.ts.map +1 -1
- package/replica-sync/errors.js +16 -0
- package/replica-sync/geoservices.d.ts +260 -0
- package/replica-sync/geoservices.d.ts.map +1 -0
- package/replica-sync/geoservices.js +1093 -0
- package/replica-sync/index.d.ts +5 -1
- package/replica-sync/index.d.ts.map +1 -1
- package/replica-sync/index.js +3 -1
- package/replica-sync/transport-conformance.d.ts +58 -0
- package/replica-sync/transport-conformance.d.ts.map +1 -0
- package/replica-sync/transport-conformance.js +265 -0
- package/replica-sync/types.d.ts +22 -0
- package/replica-sync/types.d.ts.map +1 -1
- package/runtime/index.d.ts +6 -2
- package/runtime/index.d.ts.map +1 -1
- package/runtime/index.js +3 -1
- package/runtime/load-package.d.ts +24 -0
- package/runtime/load-package.d.ts.map +1 -1
- package/runtime/load-package.js +45 -1
- package/runtime/maplibre-renderer.d.ts +11 -0
- package/runtime/maplibre-renderer.d.ts.map +1 -1
- package/runtime/maplibre-renderer.js +32 -7
- package/runtime/offline-region-protocol.d.ts +73 -0
- package/runtime/offline-region-protocol.d.ts.map +1 -0
- package/runtime/offline-region-protocol.js +63 -0
- package/runtime/offline-region-style.d.ts +78 -0
- package/runtime/offline-region-style.d.ts.map +1 -0
- package/runtime/offline-region-style.js +147 -0
- package/runtime/pmtiles-protocol.d.ts +7 -8
- package/runtime/pmtiles-protocol.d.ts.map +1 -1
- package/runtime/pmtiles-protocol.js +19 -66
- package/runtime/protocol-registry.d.ts +55 -0
- package/runtime/protocol-registry.d.ts.map +1 -0
- package/runtime/protocol-registry.js +103 -0
- package/runtime/runtime.d.ts +2 -0
- package/runtime/runtime.d.ts.map +1 -1
- package/runtime/runtime.js +6 -1
- package/scene-workspace/analysis-widgets.d.ts +4 -2
- package/scene-workspace/analysis-widgets.d.ts.map +1 -1
- package/scene-workspace/analysis-widgets.js +4 -2
- package/scene-workspace/camera-correspondence.d.ts +151 -0
- package/scene-workspace/camera-correspondence.d.ts.map +1 -0
- package/scene-workspace/camera-correspondence.js +220 -0
- package/scene-workspace/cesium-adapter.d.ts +230 -29
- package/scene-workspace/cesium-adapter.d.ts.map +1 -1
- package/scene-workspace/cesium-adapter.js +741 -56
- package/scene-workspace/cesium-mount.d.ts +205 -0
- package/scene-workspace/cesium-mount.d.ts.map +1 -0
- package/scene-workspace/cesium-mount.js +392 -0
- package/scene-workspace/cesium-scene-owner.d.ts +160 -0
- package/scene-workspace/cesium-scene-owner.d.ts.map +1 -0
- package/scene-workspace/cesium-scene-owner.js +205 -0
- package/scene-workspace/cesium-state-sync.d.ts +101 -0
- package/scene-workspace/cesium-state-sync.d.ts.map +1 -0
- package/scene-workspace/cesium-state-sync.js +432 -0
- package/scene-workspace/cesium-time.d.ts +346 -0
- package/scene-workspace/cesium-time.d.ts.map +1 -0
- package/scene-workspace/cesium-time.js +403 -0
- package/scene-workspace/index.d.ts +42 -10
- package/scene-workspace/index.d.ts.map +1 -1
- package/scene-workspace/index.js +32 -7
- package/scene-workspace/maplibre-state-sync.d.ts +112 -0
- package/scene-workspace/maplibre-state-sync.d.ts.map +1 -0
- package/scene-workspace/maplibre-state-sync.js +400 -0
- package/scene-workspace/primitives.d.ts +237 -3
- package/scene-workspace/primitives.d.ts.map +1 -1
- package/scene-workspace/primitives.js +1087 -17
- package/scene-workspace/scene-discovery.d.ts +5 -2
- package/scene-workspace/scene-discovery.d.ts.map +1 -1
- package/scene-workspace/scene-discovery.js +5 -2
- package/scene-workspace/scene-view.d.ts +5 -2
- package/scene-workspace/scene-view.d.ts.map +1 -1
- package/scene-workspace/scene-view.js +5 -2
- package/scene-workspace/source-to-cesium.d.ts +141 -8
- package/scene-workspace/source-to-cesium.d.ts.map +1 -1
- package/scene-workspace/source-to-cesium.js +497 -72
- package/scene-workspace/state-sync-port-kit.d.ts +156 -0
- package/scene-workspace/state-sync-port-kit.d.ts.map +1 -0
- package/scene-workspace/state-sync-port-kit.js +319 -0
- package/scene-workspace/state-sync.d.ts +34 -1
- package/scene-workspace/state-sync.d.ts.map +1 -1
- package/scene-workspace/state-sync.js +48 -0
- package/scene-workspace/types.d.ts +8 -0
- package/scene-workspace/types.d.ts.map +1 -1
- package/scene-workspace/types.js +2 -0
- package/scene-workspace/workspace.d.ts +12 -1
- package/scene-workspace/workspace.d.ts.map +1 -1
- package/scene-workspace/workspace.js +13 -0
- package/studio/index.d.ts +24 -7
- package/studio/index.d.ts.map +1 -1
- package/studio/index.js +21 -7
- package/studio/lifecycle-client.d.ts +164 -0
- package/studio/lifecycle-client.d.ts.map +1 -0
- package/studio/lifecycle-client.js +299 -0
- package/studio/lifecycle-errors.d.ts +91 -0
- package/studio/lifecycle-errors.d.ts.map +1 -0
- package/studio/lifecycle-errors.js +77 -0
- package/studio/lifecycle-types.d.ts +321 -0
- package/studio/lifecycle-types.d.ts.map +1 -0
- package/studio/lifecycle-types.js +22 -0
- package/web-components/controller.d.ts.map +1 -1
- package/web-components/csp-styles.d.ts +6 -0
- package/web-components/csp-styles.d.ts.map +1 -0
- package/web-components/csp-styles.js +53 -0
- package/web-components/elements.d.ts +158 -2
- package/web-components/elements.d.ts.map +1 -1
- package/web-components/elements.js +1302 -215
- package/web-components/export-redaction.d.ts +252 -0
- package/web-components/export-redaction.d.ts.map +1 -0
- package/web-components/export-redaction.js +588 -0
- package/web-components/export.d.ts +417 -0
- package/web-components/export.d.ts.map +1 -0
- package/web-components/export.js +719 -0
- package/web-components/feature-editor-model.d.ts +265 -0
- package/web-components/feature-editor-model.d.ts.map +1 -0
- package/web-components/feature-editor-model.js +438 -0
- package/web-components/feature-editor-sketch.d.ts +125 -0
- package/web-components/feature-editor-sketch.d.ts.map +1 -0
- package/web-components/feature-editor-sketch.js +194 -0
- package/web-components/feature-editor-workflow.d.ts +286 -0
- package/web-components/feature-editor-workflow.d.ts.map +1 -0
- package/web-components/feature-editor-workflow.js +889 -0
- package/web-components/feature-editor.d.ts +83 -0
- package/web-components/feature-editor.d.ts.map +1 -0
- package/web-components/feature-editor.js +829 -0
- package/web-components/feature-table-engine.d.ts +465 -0
- package/web-components/feature-table-engine.d.ts.map +1 -0
- package/web-components/feature-table-engine.js +1360 -0
- package/web-components/feature-table-view.d.ts +95 -0
- package/web-components/feature-table-view.d.ts.map +1 -0
- package/web-components/feature-table-view.js +343 -0
- package/web-components/index.d.ts +34 -3
- package/web-components/index.d.ts.map +1 -1
- package/web-components/index.js +35 -2
- package/web-components/maplibre-renderer.d.ts.map +1 -1
- package/web-components/maplibre-renderer.js +13 -4
- package/web-components/measurement.d.ts +3 -1
- package/web-components/measurement.d.ts.map +1 -1
- package/web-components/measurement.js +62 -18
- package/web-components/time-slider.d.ts +122 -0
- package/web-components/time-slider.d.ts.map +1 -0
- package/web-components/time-slider.js +740 -0
- package/web-components/types.d.ts +310 -0
- package/web-components/types.d.ts.map +1 -1
- package/webmap/convert-label.js +0 -1
- package/webmap/convert-symbol.d.ts.map +1 -1
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure presentation layer for `<honua-feature-table>` (issue #681).
|
|
3
|
+
*
|
|
4
|
+
* Everything here is a string/value function over a
|
|
5
|
+
* {@link HonuaFeatureTableViewModel}, so the WAI-ARIA grid contract and the
|
|
6
|
+
* keyboard mapping are testable without mounting a custom element, and
|
|
7
|
+
* `./elements.ts` keeps only wiring.
|
|
8
|
+
*
|
|
9
|
+
* The markup implements the WAI-ARIA `grid` pattern needed for the WCAG 2.2 AA
|
|
10
|
+
* workflow (NFR-001): a single roving `tabindex`, `role="row"`/`role="gridcell"`
|
|
11
|
+
* with 1-based `aria-rowindex`/`aria-colindex` so a virtualized window still
|
|
12
|
+
* announces absolute positions, `aria-sort` per column header, `aria-rowcount`
|
|
13
|
+
* of `-1` when the total is genuinely unknown, and a polite live region that
|
|
14
|
+
* announces result truth and reconciliation conflicts.
|
|
15
|
+
*
|
|
16
|
+
* @module
|
|
17
|
+
*/
|
|
18
|
+
import type { SortSpec } from "../contract/types.js";
|
|
19
|
+
import { type HonuaFeatureTableConflict, type HonuaFeatureTableCount, type HonuaFeatureTableFocus, type HonuaFeatureTableFocusMove, type HonuaFeatureTableResolvedColumn, type HonuaFeatureTableSnapshot, type HonuaFeatureTableState, type HonuaFeatureTableWindow } from "./feature-table-engine.js";
|
|
20
|
+
import type { HonuaFeatureTableModel } from "./types.js";
|
|
21
|
+
/** One rendered row. `placeholder` rows sit inside the window but are not resident. */
|
|
22
|
+
export interface HonuaFeatureTableViewRow {
|
|
23
|
+
readonly key: string;
|
|
24
|
+
readonly sourceId: string;
|
|
25
|
+
readonly featureId: string;
|
|
26
|
+
/** 1-based absolute grid row index (header is row 1). */
|
|
27
|
+
readonly ariaRowIndex: number;
|
|
28
|
+
readonly selected: boolean;
|
|
29
|
+
readonly cells: readonly string[];
|
|
30
|
+
readonly placeholder: boolean;
|
|
31
|
+
}
|
|
32
|
+
/** Everything the renderer needs. Derived from an engine snapshot. */
|
|
33
|
+
export interface HonuaFeatureTableViewModel {
|
|
34
|
+
readonly label: string;
|
|
35
|
+
readonly state: HonuaFeatureTableState;
|
|
36
|
+
readonly columns: readonly HonuaFeatureTableResolvedColumn[];
|
|
37
|
+
readonly rows: readonly HonuaFeatureTableViewRow[];
|
|
38
|
+
readonly window: HonuaFeatureTableWindow;
|
|
39
|
+
readonly ariaRowCount: number;
|
|
40
|
+
readonly countLabel: string;
|
|
41
|
+
readonly statusLabel: string;
|
|
42
|
+
readonly sort: readonly SortSpec[];
|
|
43
|
+
readonly focus?: HonuaFeatureTableFocus;
|
|
44
|
+
readonly conflicts: readonly HonuaFeatureTableConflict[];
|
|
45
|
+
/** Row height in CSS pixels; drives the virtualization spacers. */
|
|
46
|
+
readonly rowHeight: number;
|
|
47
|
+
readonly busy: boolean;
|
|
48
|
+
}
|
|
49
|
+
/** Caller-supplied labels and announcements for `<honua-feature-table>`. */
|
|
50
|
+
export interface HonuaFeatureTableMessages {
|
|
51
|
+
readonly label?: string;
|
|
52
|
+
readonly count?: (count: HonuaFeatureTableCount) => string;
|
|
53
|
+
readonly status?: Partial<Readonly<Record<HonuaFeatureTableState, string>>>;
|
|
54
|
+
readonly state?: (state: HonuaFeatureTableState, count: HonuaFeatureTableCount, message?: string) => string;
|
|
55
|
+
}
|
|
56
|
+
/** Human/screen-reader summary of the table's lifecycle state. */
|
|
57
|
+
export declare function describeFeatureTableState(state: HonuaFeatureTableState, count: HonuaFeatureTableCount, message: string | undefined, messages?: HonuaFeatureTableMessages): string;
|
|
58
|
+
/** Project an engine snapshot onto the renderer's view model. */
|
|
59
|
+
export declare function featureTableViewModel<T>(snapshot: HonuaFeatureTableSnapshot<T>, options?: {
|
|
60
|
+
readonly label?: string;
|
|
61
|
+
readonly rowHeight?: number;
|
|
62
|
+
readonly messages?: HonuaFeatureTableMessages;
|
|
63
|
+
}): HonuaFeatureTableViewModel;
|
|
64
|
+
/**
|
|
65
|
+
* Project the legacy single-page {@link HonuaFeatureTableModel} onto the same
|
|
66
|
+
* view model, so a `<honua-feature-table>` with no bounded engine attached
|
|
67
|
+
* still renders the full accessible grid. Result truth is derived
|
|
68
|
+
* conservatively: a model that exceeded its transfer limit reports `partial`
|
|
69
|
+
* with no total, never the returned row count dressed up as one.
|
|
70
|
+
*/
|
|
71
|
+
export declare function legacyFeatureTableViewModel<T>(model: HonuaFeatureTableModel<T>, options?: {
|
|
72
|
+
readonly label?: string;
|
|
73
|
+
readonly rowHeight?: number;
|
|
74
|
+
readonly selectedFeatureId?: string;
|
|
75
|
+
readonly messages?: HonuaFeatureTableMessages;
|
|
76
|
+
}): HonuaFeatureTableViewModel;
|
|
77
|
+
/**
|
|
78
|
+
* Map a `KeyboardEvent.key` (plus modifiers) onto a grid navigation move.
|
|
79
|
+
* Returns `undefined` for keys the grid must not swallow.
|
|
80
|
+
*/
|
|
81
|
+
export declare function featureTableFocusMoveForKey(key: string, modifiers?: {
|
|
82
|
+
readonly ctrl?: boolean;
|
|
83
|
+
readonly meta?: boolean;
|
|
84
|
+
}): HonuaFeatureTableFocusMove | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* Render the accessible, virtualized grid.
|
|
87
|
+
*
|
|
88
|
+
* The window is positioned with two spacer rows sized in `rowHeight`
|
|
89
|
+
* increments, so only the resident window exists in the DOM while the scroll
|
|
90
|
+
* height still reflects the known total (REQ-002).
|
|
91
|
+
*/
|
|
92
|
+
export declare function featureTableGridHtml(model: HonuaFeatureTableViewModel): string;
|
|
93
|
+
/** Grid styles layered on top of the kit's shared `tableStyles()`. */
|
|
94
|
+
export declare function featureTableGridStyles(): string;
|
|
95
|
+
//# sourceMappingURL=feature-table-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-table-view.d.ts","sourceRoot":"","sources":["../../../src/web-components/feature-table-view.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAC/B,KAAK,+BAA+B,EAEpC,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAK7B,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAwB,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAE/E,uFAAuF;AACvF,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,yDAAyD;IACzD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,OAAO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|
|
1
|
+
/**
|
|
2
|
+
* Pure presentation layer for `<honua-feature-table>` (issue #681).
|
|
3
|
+
*
|
|
4
|
+
* Everything here is a string/value function over a
|
|
5
|
+
* {@link HonuaFeatureTableViewModel}, so the WAI-ARIA grid contract and the
|
|
6
|
+
* keyboard mapping are testable without mounting a custom element, and
|
|
7
|
+
* `./elements.ts` keeps only wiring.
|
|
8
|
+
*
|
|
9
|
+
* The markup implements the WAI-ARIA `grid` pattern needed for the WCAG 2.2 AA
|
|
10
|
+
* workflow (NFR-001): a single roving `tabindex`, `role="row"`/`role="gridcell"`
|
|
11
|
+
* with 1-based `aria-rowindex`/`aria-colindex` so a virtualized window still
|
|
12
|
+
* announces absolute positions, `aria-sort` per column header, `aria-rowcount`
|
|
13
|
+
* of `-1` when the total is genuinely unknown, and a polite live region that
|
|
14
|
+
* announces result truth and reconciliation conflicts.
|
|
15
|
+
*
|
|
16
|
+
* @module
|
|
17
|
+
*/
|
|
18
|
+
import { describeFeatureTableCount, featureTableAriaRowCount, featureTableAriaSort, formatFeatureTableCell, } from "./feature-table-engine.js";
|
|
19
|
+
/** Human/screen-reader summary of the table's lifecycle state. */
|
|
20
|
+
export function describeFeatureTableState(state, count, message, messages) {
|
|
21
|
+
if (messages?.state)
|
|
22
|
+
return messages.state(state, count, message);
|
|
23
|
+
const countLabel = messages?.count?.(count) ?? describeFeatureTableCount(count);
|
|
24
|
+
const statusLabel = messages?.status?.[state];
|
|
25
|
+
if (statusLabel !== undefined)
|
|
26
|
+
return statusLabel;
|
|
27
|
+
switch (state) {
|
|
28
|
+
case "idle":
|
|
29
|
+
return "Not loaded";
|
|
30
|
+
case "loading":
|
|
31
|
+
return "Loading rows";
|
|
32
|
+
case "ready":
|
|
33
|
+
return countLabel;
|
|
34
|
+
case "partial":
|
|
35
|
+
return `Partial results — ${countLabel}`;
|
|
36
|
+
case "stale":
|
|
37
|
+
return `Stale results — ${message ?? countLabel}`;
|
|
38
|
+
case "cancelled":
|
|
39
|
+
return message ?? "The request was cancelled";
|
|
40
|
+
case "unsupported":
|
|
41
|
+
return message ?? "This table configuration is not supported by the source";
|
|
42
|
+
default:
|
|
43
|
+
return message ?? "The table query failed";
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/** Project an engine snapshot onto the renderer's view model. */
|
|
47
|
+
export function featureTableViewModel(snapshot, options = {}) {
|
|
48
|
+
const columns = snapshot.visibleColumns.length > 0 ? snapshot.visibleColumns : snapshot.columns;
|
|
49
|
+
const rows = snapshot.rows.map((row, offset) => row ? viewRow(row, columns, snapshot.selection) : placeholderRow(snapshot.window.startIndex + offset, columns));
|
|
50
|
+
return Object.freeze({
|
|
51
|
+
label: options.label ?? options.messages?.label ?? "Features",
|
|
52
|
+
state: snapshot.state,
|
|
53
|
+
columns,
|
|
54
|
+
rows: Object.freeze(rows),
|
|
55
|
+
window: snapshot.window,
|
|
56
|
+
ariaRowCount: featureTableAriaRowCount(snapshot.count),
|
|
57
|
+
countLabel: options.messages?.count?.(snapshot.count) ?? describeFeatureTableCount(snapshot.count),
|
|
58
|
+
statusLabel: describeFeatureTableState(snapshot.state, snapshot.count, snapshot.message, options.messages),
|
|
59
|
+
sort: snapshot.sort,
|
|
60
|
+
...(snapshot.focus ? { focus: snapshot.focus } : {}),
|
|
61
|
+
conflicts: snapshot.conflicts,
|
|
62
|
+
rowHeight: options.rowHeight ?? 32,
|
|
63
|
+
busy: snapshot.state === "loading",
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Project the legacy single-page {@link HonuaFeatureTableModel} onto the same
|
|
68
|
+
* view model, so a `<honua-feature-table>` with no bounded engine attached
|
|
69
|
+
* still renders the full accessible grid. Result truth is derived
|
|
70
|
+
* conservatively: a model that exceeded its transfer limit reports `partial`
|
|
71
|
+
* with no total, never the returned row count dressed up as one.
|
|
72
|
+
*/
|
|
73
|
+
export function legacyFeatureTableViewModel(model, options = {}) {
|
|
74
|
+
const columns = resolveLegacyColumns(model.fields);
|
|
75
|
+
const partial = model.exceededTransferLimit === true;
|
|
76
|
+
const count = partial
|
|
77
|
+
? { kind: "partial", loaded: model.rows.length, evidence: "loaded-rows" }
|
|
78
|
+
: { kind: "known", value: model.totalCount, loaded: model.rows.length, evidence: "result-total-count" };
|
|
79
|
+
const state = legacyState(model.status, partial);
|
|
80
|
+
const rows = model.rows.map((row, index) => Object.freeze({
|
|
81
|
+
key: `${row.sourceId}:${String(row.id)}`,
|
|
82
|
+
sourceId: row.sourceId,
|
|
83
|
+
featureId: String(row.id),
|
|
84
|
+
ariaRowIndex: index + 2,
|
|
85
|
+
selected: options.selectedFeatureId !== undefined && options.selectedFeatureId === String(row.id),
|
|
86
|
+
cells: Object.freeze(columns.map((column) => formatFeatureTableCell(row.attributes[column.field]))),
|
|
87
|
+
placeholder: false,
|
|
88
|
+
}));
|
|
89
|
+
return Object.freeze({
|
|
90
|
+
label: options.label ?? options.messages?.label ?? "Features",
|
|
91
|
+
state,
|
|
92
|
+
columns,
|
|
93
|
+
rows: Object.freeze(rows),
|
|
94
|
+
window: Object.freeze({ startIndex: 0, endIndex: rows.length }),
|
|
95
|
+
ariaRowCount: featureTableAriaRowCount(count),
|
|
96
|
+
countLabel: options.messages?.count?.(count) ?? describeFeatureTableCount(count),
|
|
97
|
+
statusLabel: describeFeatureTableState(state, count, undefined, options.messages),
|
|
98
|
+
sort: Object.freeze([]),
|
|
99
|
+
conflicts: Object.freeze([]),
|
|
100
|
+
rowHeight: options.rowHeight ?? 32,
|
|
101
|
+
busy: model.status === "loading",
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
function legacyState(status, partial) {
|
|
105
|
+
if (status === "error")
|
|
106
|
+
return "error";
|
|
107
|
+
if (status === "unsupported")
|
|
108
|
+
return "unsupported";
|
|
109
|
+
if (status === "loading")
|
|
110
|
+
return "loading";
|
|
111
|
+
if (status === "idle")
|
|
112
|
+
return "idle";
|
|
113
|
+
return partial ? "partial" : "ready";
|
|
114
|
+
}
|
|
115
|
+
function resolveLegacyColumns(fields) {
|
|
116
|
+
return Object.freeze(fields.map((field) => Object.freeze({ field, label: field, type: "unknown", visible: true, sortable: false })));
|
|
117
|
+
}
|
|
118
|
+
function viewRow(row, columns, selection) {
|
|
119
|
+
const attributes = row.attributes;
|
|
120
|
+
return Object.freeze({
|
|
121
|
+
key: row.key,
|
|
122
|
+
sourceId: row.sourceId,
|
|
123
|
+
featureId: String(row.id),
|
|
124
|
+
ariaRowIndex: row.index + 2,
|
|
125
|
+
selected: selection.includes(row.key),
|
|
126
|
+
cells: Object.freeze(columns.map((column) => formatFeatureTableCell(attributes[column.field], column))),
|
|
127
|
+
placeholder: false,
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function placeholderRow(index, columns) {
|
|
131
|
+
return Object.freeze({
|
|
132
|
+
key: `placeholder:${index}`,
|
|
133
|
+
sourceId: "",
|
|
134
|
+
featureId: "",
|
|
135
|
+
ariaRowIndex: index + 2,
|
|
136
|
+
selected: false,
|
|
137
|
+
cells: Object.freeze(columns.map(() => "")),
|
|
138
|
+
placeholder: true,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Map a `KeyboardEvent.key` (plus modifiers) onto a grid navigation move.
|
|
143
|
+
* Returns `undefined` for keys the grid must not swallow.
|
|
144
|
+
*/
|
|
145
|
+
export function featureTableFocusMoveForKey(key, modifiers = {}) {
|
|
146
|
+
const jump = Boolean(modifiers.ctrl ?? modifiers.meta);
|
|
147
|
+
switch (key) {
|
|
148
|
+
case "ArrowUp":
|
|
149
|
+
return "up";
|
|
150
|
+
case "ArrowDown":
|
|
151
|
+
return "down";
|
|
152
|
+
case "ArrowLeft":
|
|
153
|
+
return "left";
|
|
154
|
+
case "ArrowRight":
|
|
155
|
+
return "right";
|
|
156
|
+
case "Home":
|
|
157
|
+
return jump ? "grid-start" : "row-start";
|
|
158
|
+
case "End":
|
|
159
|
+
return jump ? "grid-end" : "row-end";
|
|
160
|
+
case "PageUp":
|
|
161
|
+
return "page-up";
|
|
162
|
+
case "PageDown":
|
|
163
|
+
return "page-down";
|
|
164
|
+
default:
|
|
165
|
+
return undefined;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Render the accessible, virtualized grid.
|
|
170
|
+
*
|
|
171
|
+
* The window is positioned with two spacer rows sized in `rowHeight`
|
|
172
|
+
* increments, so only the resident window exists in the DOM while the scroll
|
|
173
|
+
* height still reflects the known total (REQ-002).
|
|
174
|
+
*/
|
|
175
|
+
export function featureTableGridHtml(model) {
|
|
176
|
+
const columnCount = Math.max(1, model.columns.length);
|
|
177
|
+
const leading = model.window.startIndex * model.rowHeight;
|
|
178
|
+
const knownRows = model.ariaRowCount > 0 ? model.ariaRowCount - 1 : model.window.endIndex;
|
|
179
|
+
const trailing = Math.max(0, (knownRows - model.window.endIndex) * model.rowHeight);
|
|
180
|
+
const focusedRow = model.focus?.rowKey;
|
|
181
|
+
const focusedField = model.focus?.field;
|
|
182
|
+
const hasFocus = model.rows.some((row) => row.key === focusedRow);
|
|
183
|
+
return `
|
|
184
|
+
<style>
|
|
185
|
+
[data-leading] { height: ${leading}px; }
|
|
186
|
+
[data-trailing] { height: ${trailing}px; }
|
|
187
|
+
</style>
|
|
188
|
+
<section class="table-panel" part="panel">
|
|
189
|
+
<div class="table-panel__bar">
|
|
190
|
+
<h2 id="honua-ft-label">${escapeHtml(model.label)}</h2>
|
|
191
|
+
<span class="count" data-count>${escapeHtml(model.countLabel)}</span>
|
|
192
|
+
</div>
|
|
193
|
+
<p class="status" data-status role="status" aria-live="polite">${escapeHtml(statusText(model))}</p>
|
|
194
|
+
<div class="table-wrap" data-scroller>
|
|
195
|
+
<div class="spacer" data-leading></div>
|
|
196
|
+
<table
|
|
197
|
+
role="grid"
|
|
198
|
+
aria-labelledby="honua-ft-label"
|
|
199
|
+
aria-rowcount="${model.ariaRowCount}"
|
|
200
|
+
aria-colcount="${columnCount}"
|
|
201
|
+
aria-busy="${String(model.busy)}"
|
|
202
|
+
data-grid
|
|
203
|
+
>
|
|
204
|
+
<thead>
|
|
205
|
+
<tr role="row" aria-rowindex="1">
|
|
206
|
+
${model.columns
|
|
207
|
+
.map((column, index) => `
|
|
208
|
+
<th
|
|
209
|
+
role="columnheader"
|
|
210
|
+
scope="col"
|
|
211
|
+
aria-colindex="${index + 1}"
|
|
212
|
+
aria-sort="${featureTableAriaSort(column.field, model.sort)}"
|
|
213
|
+
data-field="${escapeAttribute(column.field)}"
|
|
214
|
+
>
|
|
215
|
+
${column.sortable
|
|
216
|
+
? `<button type="button" data-sort-field="${escapeAttribute(column.field)}">${escapeHtml(column.label)}</button>`
|
|
217
|
+
: escapeHtml(column.label)}
|
|
218
|
+
</th>`)
|
|
219
|
+
.join("")}
|
|
220
|
+
</tr>
|
|
221
|
+
</thead>
|
|
222
|
+
<tbody>
|
|
223
|
+
${model.rows.length === 0
|
|
224
|
+
? `<tr role="row"><td role="gridcell" colspan="${columnCount}" class="empty">${escapeHtml(model.statusLabel)}</td></tr>`
|
|
225
|
+
: model.rows
|
|
226
|
+
.map((row, rowOffset) => bodyRowHtml(row, rowOffset, model, focusedRow, focusedField, hasFocus))
|
|
227
|
+
.join("")}
|
|
228
|
+
</tbody>
|
|
229
|
+
</table>
|
|
230
|
+
<div class="spacer" data-trailing></div>
|
|
231
|
+
</div>
|
|
232
|
+
</section>
|
|
233
|
+
`;
|
|
234
|
+
}
|
|
235
|
+
function bodyRowHtml(row, rowOffset, model, focusedRow, focusedField, hasFocus) {
|
|
236
|
+
// Roving tabindex: exactly one cell in the grid is tabbable. When the focused
|
|
237
|
+
// row scrolled out of the window, the first cell of the first row takes it so
|
|
238
|
+
// the grid never becomes keyboard-unreachable.
|
|
239
|
+
//
|
|
240
|
+
// Rows carry `tabindex="-1"`: programmatically focusable (so a host app — or a
|
|
241
|
+
// test — can reveal and focus a whole row, which the pre-grid markup allowed
|
|
242
|
+
// via `tabindex="0"`) while staying out of the tab sequence, which the cells
|
|
243
|
+
// own. Row-level Enter/Space still selects; see `#bindGrid`.
|
|
244
|
+
const rovingRow = hasFocus ? row.key === focusedRow : rowOffset === 0;
|
|
245
|
+
return `
|
|
246
|
+
<tr
|
|
247
|
+
role="row"
|
|
248
|
+
tabindex="-1"
|
|
249
|
+
aria-rowindex="${row.ariaRowIndex}"
|
|
250
|
+
aria-selected="${String(row.selected)}"
|
|
251
|
+
${row.placeholder ? 'data-placeholder="true"' : `data-row-key="${escapeAttribute(row.key)}"`}
|
|
252
|
+
${row.placeholder ? "" : `data-source-id="${escapeAttribute(row.sourceId)}"`}
|
|
253
|
+
${row.placeholder ? "" : `data-feature-id="${escapeAttribute(row.featureId)}"`}
|
|
254
|
+
>
|
|
255
|
+
${row.cells
|
|
256
|
+
.map((cell, cellIndex) => {
|
|
257
|
+
const column = model.columns[cellIndex];
|
|
258
|
+
const field = column?.field ?? "";
|
|
259
|
+
const roving = rovingRow && (hasFocus ? field === focusedField : cellIndex === 0);
|
|
260
|
+
// `data-cell-key` is grid-unique. The kit restores focus after
|
|
261
|
+
// a re-render by matching the active element's first `data-`
|
|
262
|
+
// attribute alphabetically, and `data-field` alone matches the
|
|
263
|
+
// same column in *every* row — which silently dragged focus to
|
|
264
|
+
// row 1. This sorts before `data-field`, so focus returns to
|
|
265
|
+
// the exact cell that had it.
|
|
266
|
+
return `<td
|
|
267
|
+
role="gridcell"
|
|
268
|
+
aria-colindex="${cellIndex + 1}"
|
|
269
|
+
tabindex="${roving ? "0" : "-1"}"
|
|
270
|
+
data-cell-key="${escapeAttribute(`${row.key}::${field}`)}"
|
|
271
|
+
data-field="${escapeAttribute(field)}"
|
|
272
|
+
>${escapeHtml(cell)}</td>`;
|
|
273
|
+
})
|
|
274
|
+
.join("")}
|
|
275
|
+
</tr>`;
|
|
276
|
+
}
|
|
277
|
+
function statusText(model) {
|
|
278
|
+
if (model.conflicts.length === 0)
|
|
279
|
+
return model.statusLabel;
|
|
280
|
+
return `${model.statusLabel}. ${model.conflicts.map((conflict) => conflict.message).join(" ")}`;
|
|
281
|
+
}
|
|
282
|
+
/** Grid styles layered on top of the kit's shared `tableStyles()`. */
|
|
283
|
+
export function featureTableGridStyles() {
|
|
284
|
+
return `
|
|
285
|
+
.table-panel { max-width: 100%; min-width: 0; }
|
|
286
|
+
.table-panel__bar { gap: 8px; min-width: 0; }
|
|
287
|
+
.table-panel__bar h2 { min-width: 0; overflow-wrap: anywhere; }
|
|
288
|
+
.table-wrap { max-width: 100%; overflow-x: auto; overflow-y: auto; }
|
|
289
|
+
.table-wrap table { min-width: 100%; width: 100%; }
|
|
290
|
+
.table-panel__bar .count { color: var(--honua-ui-muted); font-variant-numeric: tabular-nums; }
|
|
291
|
+
.status {
|
|
292
|
+
color: var(--honua-ui-muted);
|
|
293
|
+
margin: 0;
|
|
294
|
+
padding-block: 4px;
|
|
295
|
+
padding-inline: 10px;
|
|
296
|
+
}
|
|
297
|
+
.status:empty { display: none; }
|
|
298
|
+
.spacer { width: 1px; }
|
|
299
|
+
[role="columnheader"] button {
|
|
300
|
+
appearance: none;
|
|
301
|
+
background: none;
|
|
302
|
+
border: 0;
|
|
303
|
+
color: inherit;
|
|
304
|
+
cursor: pointer;
|
|
305
|
+
font: inherit;
|
|
306
|
+
font-weight: 650;
|
|
307
|
+
padding: 0;
|
|
308
|
+
text-align: start;
|
|
309
|
+
width: 100%;
|
|
310
|
+
}
|
|
311
|
+
[role="columnheader"][aria-sort="ascending"] button::after { content: " \\2191"; }
|
|
312
|
+
[role="columnheader"][aria-sort="descending"] button::after { content: " \\2193"; }
|
|
313
|
+
[role="gridcell"]:focus-visible,
|
|
314
|
+
[role="gridcell"]:focus {
|
|
315
|
+
outline: 2px solid var(--honua-ui-accent);
|
|
316
|
+
outline-offset: -2px;
|
|
317
|
+
}
|
|
318
|
+
[data-placeholder="true"] [role="gridcell"] { color: transparent; }
|
|
319
|
+
[data-placeholder="true"] [role="gridcell"]::after {
|
|
320
|
+
background: var(--honua-ui-border);
|
|
321
|
+
border-radius: 3px;
|
|
322
|
+
content: "";
|
|
323
|
+
display: block;
|
|
324
|
+
height: 8px;
|
|
325
|
+
opacity: 0.6;
|
|
326
|
+
width: 60%;
|
|
327
|
+
}
|
|
328
|
+
@media (max-width: 320px) {
|
|
329
|
+
.table-wrap th,
|
|
330
|
+
.table-wrap td {
|
|
331
|
+
overflow-wrap: anywhere;
|
|
332
|
+
text-overflow: clip;
|
|
333
|
+
white-space: normal;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
`;
|
|
337
|
+
}
|
|
338
|
+
function escapeHtml(value) {
|
|
339
|
+
return value.split("&").join("&").split("<").join("<").split(">").join(">").split('"').join(""");
|
|
340
|
+
}
|
|
341
|
+
function escapeAttribute(value) {
|
|
342
|
+
return escapeHtml(value).split("'").join("'");
|
|
343
|
+
}
|
|
@@ -19,13 +19,44 @@
|
|
|
19
19
|
* distance/area drawing on the map's pointer events, computed with
|
|
20
20
|
* `@honua/geometry` ops) — needs no external drawing provider.
|
|
21
21
|
*
|
|
22
|
+
* `<honua-legend>` and `<honua-layer-list>` are also each contested by the
|
|
23
|
+
* `controls` kit's own framework-free implementation. This kit's classes are
|
|
24
|
+
* both tags' canonical/default registrant: importing `./web-components` —
|
|
25
|
+
* alone, or alongside `@honua/sdk-js/controls` in either order — always
|
|
26
|
+
* registers these tags with the classes exported here (issue #679; see
|
|
27
|
+
* `./catalog.js` for the full ownership record and `./registry.js` for the
|
|
28
|
+
* catalog-id-addressable registration APIs re-exported below).
|
|
29
|
+
*
|
|
22
30
|
* @experimental This entrypoint is not yet covered by the SDK's semver contract
|
|
23
31
|
* — the surface may change in any minor release prior to `1.0.0`.
|
|
24
32
|
* @module
|
|
25
33
|
*/
|
|
26
|
-
import "./elements.js";
|
|
27
34
|
export { HonuaInMemoryWebComponentController, createHonuaWebComponentController, createHonuaWebComponentControllerFromRuntime, layersFromMapPackage, legendFromMapPackage, } from "./controller.js";
|
|
28
|
-
export {
|
|
35
|
+
export { HONUA_COMPONENT_CATALOG, describeDeprecatedComponentImport, getCanonicalComponentCatalogEntry, getComponentCatalogEntriesForTag, getComponentCatalogEntry, listComponentCatalogEntries, listDeprecatedComponentImports, } from "../controls/catalog.js";
|
|
36
|
+
export type { HonuaComponentCatalogEntry, HonuaComponentSource, HonuaComponentSupportTier, HonuaDeprecatedComponentDiagnostic, } from "../controls/catalog.js";
|
|
37
|
+
export { HonuaComponentCatalogError, createComponentRegistry, registerAllComponents, registerComponent, registerComponents, } from "../controls/registry.js";
|
|
38
|
+
export type { HonuaComponentCatalogId, HonuaComponentRegistrationOptions, HonuaComponentRegistry, } from "../controls/registry.js";
|
|
39
|
+
export { HonuaActionPanelElement, HonuaBasemapControlElement, HonuaBookmarksElement, HonuaChartElement, HonuaEditorElement, HonuaFeatureTableElement, HonuaLayerListElement, HonuaLegendElement, HonuaLocateControlElement, HonuaMapElement, HonuaMapStatusElement, HonuaMeasureControlElement, HonuaPrintExportElement, HonuaSearchElement, HonuaSketchControlElement, defineHonuaWebComponent, defineHonuaWebComponents, honuaExportKindFromFormat, } from "./elements.js";
|
|
40
|
+
export type { HonuaFeatureTableConflictDetail } from "./elements.js";
|
|
29
41
|
export { HonuaMeasurementElement, defineHonuaMeasurement } from "./measurement.js";
|
|
30
|
-
export
|
|
42
|
+
export { HonuaTimeSliderElement, defineHonuaTimeSlider } from "./time-slider.js";
|
|
43
|
+
export { HONUA_EXPORT_KINDS, HonuaExportError, approximateHonuaScaleLabel, assertHonuaExportProvenanceComplete, assertHonuaExportReady, buildHonuaExportProvenance, createBrowserPrintExportAdapter, createHonuaExportAdapter, runHonuaExport, } from "./export.js";
|
|
44
|
+
export type { BuildHonuaExportProvenanceOptions, CreateHonuaExportAdapterOptions, HonuaExportAdapter, HonuaExportCapabilities, HonuaExportContext, HonuaExportKind, HonuaExportOwnership, HonuaExportPayload, HonuaExportProvenance, HonuaExportRequest, HonuaExportResult, HonuaExportStatus, HonuaPrintWindowLike, HonuaSnapshotCanvasLike, HonuaSnapshotSource, } from "./export.js";
|
|
45
|
+
export { HONUA_EXPORT_REDACTED, HONUA_EXPORT_STATE_SCHEMA, HonuaExportSafetyError, assertCredentialFreeExportBytes, assertCredentialFreeExportText, containsCredentialMaterial, extractPrintableRuns, isSensitiveExportKey, projectExportEndpoint, redactHonuaExportText, sanitizeHonuaExportFilename, sanitizeHonuaExportHeaders, sanitizeHonuaExportState, } from "./export-redaction.js";
|
|
46
|
+
export type { HonuaExportEndpointProjection, HonuaExportRedaction, HonuaExportRedactionReason, HonuaExportStateSanitizationResult, HonuaSanitizedExportFilter, HonuaSanitizedExportLayer, HonuaSanitizedExportLegendItem, HonuaSanitizedExportSelection, HonuaSanitizedExportSource, HonuaSanitizedExportState, SanitizeHonuaExportFilenameOptions, SanitizeHonuaExportStateOptions, } from "./export-redaction.js";
|
|
47
|
+
export { HONUA_COMPONENT_QUALIFICATION_DATA_VERSION, HONUA_COMPONENT_QUALIFICATION_GATES, HONUA_COMPONENT_QUALIFICATION_STATUSES, describeComponentQualificationGate, getComponentQualification, isComponentProductionQualified, listOpenQualificationGates, listComponentQualifications, summarizeComponentQualification, } from "../controls/qualification.js";
|
|
48
|
+
export type { HonuaComponentQualification, HonuaComponentQualificationGate, HonuaComponentQualificationGateId, HonuaComponentQualificationRequirement, HonuaComponentQualificationStatus, HonuaComponentQualificationSummary, HonuaComponentQualificationCell, } from "../controls/qualification.js";
|
|
49
|
+
export { DEFAULT_FEATURE_TABLE_BUDGETS, createHonuaFeatureTable, describeFeatureTableCount, explorationClauseToFilterClause, filterClauseToExplorationClause, featureTableAriaRowCount, featureTableAriaSort, featureTablePageCacheKey, featureTableRowKey, featureTableWindow, featureTableWorkByTier, formatFeatureTableCell, linkFeatureTableToExploration, } from "./feature-table-engine.js";
|
|
50
|
+
export type { CreateHonuaFeatureTableOptions, HonuaFeatureTable, HonuaFeatureTableBudgetKind, HonuaFeatureTableBudgetLedger, HonuaFeatureTableBudgets, HonuaFeatureTableColumn, HonuaFeatureTableColumnType, HonuaFeatureTableConflict, HonuaFeatureTableConflictCode, HonuaFeatureTableCount, HonuaFeatureTableCountEvidence, HonuaFeatureTableExport, HonuaFeatureTableExportRequest, HonuaFeatureTableFocus, HonuaFeatureTableFocusMove, HonuaFeatureTablePageIdentity, HonuaFeatureTablePaging, HonuaFeatureTablePagingMode, HonuaFeatureTablePlanner, HonuaFeatureTableQueryEvidence, HonuaFeatureTableQuerySource, HonuaFeatureTableRealtimeDiff, HonuaFeatureTableRealtimeOutcome, HonuaFeatureTableResolvedColumn, HonuaFeatureTableRow, HonuaFeatureTableRowKey, HonuaFeatureTableScrollMetrics, HonuaFeatureTableSnapshot, HonuaFeatureTableState, HonuaFeatureTableWindow, HonuaFeatureTableWorkConcern, HonuaFeatureTableWorkItem, HonuaFeatureTableWorkTier, LinkFeatureTableToExplorationOptions, } from "./feature-table-engine.js";
|
|
51
|
+
export { describeFeatureTableState, featureTableFocusMoveForKey, featureTableGridHtml, featureTableGridStyles, featureTableViewModel, legacyFeatureTableViewModel, } from "./feature-table-view.js";
|
|
52
|
+
export type { HonuaFeatureTableMessages, HonuaFeatureTableViewModel, HonuaFeatureTableViewRow, } from "./feature-table-view.js";
|
|
53
|
+
export { HonuaFeatureEditorElement, defineHonuaFeatureEditor } from "./feature-editor.js";
|
|
54
|
+
export type { HonuaFeatureEditChangeDetail, HonuaFeatureEditCommitDetail } from "./feature-editor.js";
|
|
55
|
+
export { HonuaFeatureEditorWorkflow, createFeatureEditorWorkflow } from "./feature-editor-workflow.js";
|
|
56
|
+
export type { HonuaFeatureEditorCommit, HonuaFeatureEditorConflict, HonuaFeatureEditorConflictChoice, HonuaFeatureEditorExternalChangeOutcome, HonuaFeatureEditorFailure, HonuaFeatureEditorIdentity, HonuaFeatureEditorOptions, HonuaFeatureEditorSketchState, HonuaFeatureEditorSnapshot, HonuaFeatureEditorStatus, } from "./feature-editor-workflow.js";
|
|
57
|
+
export { buildEditorFormModel, coerceEditorFieldValue, editorControlKind, editorDomainFromSchema, editorFieldInputValue, editorFieldsFromSchema, editorOperationAvailability, hiddenEditorFieldNames, redactEditorAttachment, resolveActiveEditorSubtype, resolveEditorFields, resolveEditorOperations, } from "./feature-editor-model.js";
|
|
58
|
+
export type { BuildEditorFormModelInput, HonuaEditorAttachmentDraft, HonuaEditorAttachmentMutationLike, HonuaEditorCapabilityDecisionLike, HonuaEditorChoice, HonuaEditorControlKind, HonuaEditorFieldControl, HonuaEditorFormModel, HonuaEditorOperation, HonuaEditorOperationAvailability, HonuaEditorOperationOverride, HonuaEditorOperationOverrides, HonuaEditorSchemaDomainLike, HonuaEditorSchemaFieldLike, HonuaEditorSubtype, HonuaEditorSubtypeConfig, HonuaEditorSubtypeFieldOverride, HonuaEditorUnavailableCode, ResolveEditorOperationsInput, } from "./feature-editor-model.js";
|
|
59
|
+
export { bindEditorSketch, createTerraDrawEditorSketch, editorSnappingOptions } from "./feature-editor-sketch.js";
|
|
60
|
+
export type { CreateTerraDrawEditorSketchOptions, HonuaEditorSketchAdapter, HonuaEditorSketchOptions, HonuaEditorSnappingOptions, } from "./feature-editor-sketch.js";
|
|
61
|
+
export type { HonuaActionDetail, HonuaActionPanelAction, HonuaActionPanelMessages, HonuaBasemapChangeDetail, HonuaBasemapControlMessages, HonuaBookmark, HonuaBookmarkChangeDetail, HonuaBookmarksMessages, CreateHonuaWebComponentControllerOptions, HonuaChartDatum, HonuaChartModel, HonuaChartMessages, HonuaComponentStatus, HonuaControllerReadyDetail, HonuaControllerStateListener, HonuaControllerSubscription, HonuaEditCapabilities, HonuaEditChangeDetail, HonuaEditRequest, HonuaEditorMessages, HonuaEditorModel, HonuaExportDetail, HonuaFeatureRecord, HonuaFeatureEditorMessages, HonuaFeatureStateEntry, HonuaFeatureStateTarget, HonuaFeatureTableModel, HonuaFilterChangeDetail, HonuaFilterState, HonuaFullscreenChangeDetail, HonuaGeocodeSelectDetail, HonuaLayerListMessages, HonuaLayerModel, HonuaLayerOpacityChangeDetail, HonuaLayerOrderChangeDetail, HonuaLayerVisibilityChangeDetail, HonuaLegendItem, HonuaLegendMessages, HonuaLocateControlMessages, HonuaLocateChangeDetail, HonuaMapMessages, HonuaMapStatusMessages, HonuaMapClickDetail, HonuaMapErrorDetail, HonuaMapHoverDetail, HonuaMapInteractionDetail, HonuaMapInteractionPoint, HonuaMapReadyDetail, HonuaMeasureChangeDetail, HonuaMeasureControlMessages, HonuaMeasureMode, HonuaMeasurementMessages, HonuaPrintExportMessages, HonuaMeasureProvider, HonuaMeasureResult, HonuaMeasurementMap, HonuaQueryFeaturesOptions, HonuaSearchDetail, HonuaSearchMessages, HonuaSearchGeocodeCandidate, HonuaSearchGeocodeSuggestion, HonuaSearchGeocoderLike, HonuaSearchOptions, HonuaSearchResult, HonuaSelectionChangeDetail, HonuaSelectionState, HonuaSketchChangeDetail, HonuaSketchControlMessages, HonuaSketchMode, HonuaSketchProvider, HonuaSketchResult, HonuaTimeChangeDetail, HonuaTimePlaybackChangeDetail, HonuaTimeSliderMessages, HonuaTimeSliderPlayback, HonuaTimeSliderWindow, HonuaViewportChangeDetail, HonuaViewportState, HonuaWebComponentController, HonuaWebComponentRuntimeLike, HonuaWebComponentState, } from "./types.js";
|
|
31
62
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/web-components/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/web-components/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAaH,OAAO,EACL,mCAAmC,EACnC,iCAAiC,EACjC,4CAA4C,EAC5C,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,uBAAuB,EACvB,iCAAiC,EACjC,iCAAiC,EACjC,gCAAgC,EAChC,wBAAwB,EACxB,2BAA2B,EAC3B,8BAA8B,GAC/B,MAAM,w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3B,4BAA4B,EAC5B,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,EACjB,0BAA0B,EAC1B,mBAAmB,EACnB,uBAAuB,EACvB,0BAA0B,EAC1B,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,6BAA6B,EAC7B,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,EACzB,kBAAkB,EAClB,2BAA2B,EAC3B,4BAA4B,EAC5B,sBAAsB,GACvB,MAAM,YAAY,CAAC"}
|
package/web-components/index.js
CHANGED
|
@@ -19,11 +19,44 @@
|
|
|
19
19
|
* distance/area drawing on the map's pointer events, computed with
|
|
20
20
|
* `@honua/geometry` ops) — needs no external drawing provider.
|
|
21
21
|
*
|
|
22
|
+
* `<honua-legend>` and `<honua-layer-list>` are also each contested by the
|
|
23
|
+
* `controls` kit's own framework-free implementation. This kit's classes are
|
|
24
|
+
* both tags' canonical/default registrant: importing `./web-components` —
|
|
25
|
+
* alone, or alongside `@honua/sdk-js/controls` in either order — always
|
|
26
|
+
* registers these tags with the classes exported here (issue #679; see
|
|
27
|
+
* `./catalog.js` for the full ownership record and `./registry.js` for the
|
|
28
|
+
* catalog-id-addressable registration APIs re-exported below).
|
|
29
|
+
*
|
|
22
30
|
* @experimental This entrypoint is not yet covered by the SDK's semver contract
|
|
23
31
|
* — the surface may change in any minor release prior to `1.0.0`.
|
|
24
32
|
* @module
|
|
25
33
|
*/
|
|
26
|
-
import "./elements.js";
|
|
34
|
+
import { defineHonuaWebComponents } from "./elements.js";
|
|
35
|
+
// The blanket auto-registration side effect lives here, not in `./elements.js`
|
|
36
|
+
// (issue #679 PR review): `./elements.js` must stay side-effect-free on
|
|
37
|
+
// import so `../controls/registry.js` can dynamically `import()` it to
|
|
38
|
+
// register one tag without also claiming every tag the kit owns. This is
|
|
39
|
+
// every existing `@honua/sdk-js/web-components` consumer's actual entry
|
|
40
|
+
// point, so the observable behavior — importing this module registers all 16
|
|
41
|
+
// tags when a `customElements` registry is present — is unchanged.
|
|
42
|
+
defineHonuaWebComponents();
|
|
27
43
|
export { HonuaInMemoryWebComponentController, createHonuaWebComponentController, createHonuaWebComponentControllerFromRuntime, layersFromMapPackage, legendFromMapPackage, } from "./controller.js";
|
|
28
|
-
export {
|
|
44
|
+
export { HONUA_COMPONENT_CATALOG, describeDeprecatedComponentImport, getCanonicalComponentCatalogEntry, getComponentCatalogEntriesForTag, getComponentCatalogEntry, listComponentCatalogEntries, listDeprecatedComponentImports, } from "../controls/catalog.js";
|
|
45
|
+
export { HonuaComponentCatalogError, createComponentRegistry, registerAllComponents, registerComponent, registerComponents, } from "../controls/registry.js";
|
|
46
|
+
export { HonuaActionPanelElement, HonuaBasemapControlElement, HonuaBookmarksElement, HonuaChartElement, HonuaEditorElement, HonuaFeatureTableElement, HonuaLayerListElement, HonuaLegendElement, HonuaLocateControlElement, HonuaMapElement, HonuaMapStatusElement, HonuaMeasureControlElement, HonuaPrintExportElement, HonuaSearchElement, HonuaSketchControlElement, defineHonuaWebComponent, defineHonuaWebComponents, honuaExportKindFromFormat, } from "./elements.js";
|
|
29
47
|
export { HonuaMeasurementElement, defineHonuaMeasurement } from "./measurement.js";
|
|
48
|
+
// ── time slider over the temporal playback controller (issue #959) ───────
|
|
49
|
+
export { HonuaTimeSliderElement, defineHonuaTimeSlider } from "./time-slider.js";
|
|
50
|
+
// ── secure export contract (issue #683) ──────────────────────────────────
|
|
51
|
+
export { HONUA_EXPORT_KINDS, HonuaExportError, approximateHonuaScaleLabel, assertHonuaExportProvenanceComplete, assertHonuaExportReady, buildHonuaExportProvenance, createBrowserPrintExportAdapter, createHonuaExportAdapter, runHonuaExport, } from "./export.js";
|
|
52
|
+
export { HONUA_EXPORT_REDACTED, HONUA_EXPORT_STATE_SCHEMA, HonuaExportSafetyError, assertCredentialFreeExportBytes, assertCredentialFreeExportText, containsCredentialMaterial, extractPrintableRuns, isSensitiveExportKey, projectExportEndpoint, redactHonuaExportText, sanitizeHonuaExportFilename, sanitizeHonuaExportHeaders, sanitizeHonuaExportState, } from "./export-redaction.js";
|
|
53
|
+
// ── production qualification matrix (issue #683) ─────────────────────────
|
|
54
|
+
export { HONUA_COMPONENT_QUALIFICATION_DATA_VERSION, HONUA_COMPONENT_QUALIFICATION_GATES, HONUA_COMPONENT_QUALIFICATION_STATUSES, describeComponentQualificationGate, getComponentQualification, isComponentProductionQualified, listOpenQualificationGates, listComponentQualifications, summarizeComponentQualification, } from "../controls/qualification.js";
|
|
55
|
+
// Bounded production feature table (issue #681).
|
|
56
|
+
export { DEFAULT_FEATURE_TABLE_BUDGETS, createHonuaFeatureTable, describeFeatureTableCount, explorationClauseToFilterClause, filterClauseToExplorationClause, featureTableAriaRowCount, featureTableAriaSort, featureTablePageCacheKey, featureTableRowKey, featureTableWindow, featureTableWorkByTier, formatFeatureTableCell, linkFeatureTableToExploration, } from "./feature-table-engine.js";
|
|
57
|
+
export { describeFeatureTableState, featureTableFocusMoveForKey, featureTableGridHtml, featureTableGridStyles, featureTableViewModel, legacyFeatureTableViewModel, } from "./feature-table-view.js";
|
|
58
|
+
// ── production-tier feature editor (issue #680) ──────────────────────────
|
|
59
|
+
export { HonuaFeatureEditorElement, defineHonuaFeatureEditor } from "./feature-editor.js";
|
|
60
|
+
export { HonuaFeatureEditorWorkflow, createFeatureEditorWorkflow } from "./feature-editor-workflow.js";
|
|
61
|
+
export { buildEditorFormModel, coerceEditorFieldValue, editorControlKind, editorDomainFromSchema, editorFieldInputValue, editorFieldsFromSchema, editorOperationAvailability, hiddenEditorFieldNames, redactEditorAttachment, resolveActiveEditorSubtype, resolveEditorFields, resolveEditorOperations, } from "./feature-editor-model.js";
|
|
62
|
+
export { bindEditorSketch, createTerraDrawEditorSketch, editorSnappingOptions } from "./feature-editor-sketch.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"maplibre-renderer.d.ts","sourceRoot":"","sources":["../../../src/web-components/maplibre-renderer.ts"],"names":[],"mappings":"AACA,O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AE,sBAAsB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAkBjE,UAAU,IAAI,IAAI;CAoX1B"}
|
|
@@ -64,9 +64,13 @@ export class HonuaMapLibreRenderer {
|
|
|
64
64
|
]);
|
|
65
65
|
if (token !== this.#loadToken)
|
|
66
66
|
return;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
// MapLibre 6 is ESM-only and publishes named exports; MapLibre 5 is
|
|
68
|
+
// reachable through either shape depending on how the host bundles it.
|
|
69
|
+
// Accept both so one renderer covers the whole `^5 || ^6` peer range.
|
|
70
|
+
const MapCtor = maplibregl.Map ?? maplibregl.default?.Map;
|
|
71
|
+
if (!MapCtor) {
|
|
72
|
+
throw new Error("maplibre-gl did not export a Map constructor; install maplibre-gl 5.x or 6.x (the SDK peer range is ^5.0.0 || ^6.0.0).");
|
|
73
|
+
}
|
|
70
74
|
const map = new MapCtor({
|
|
71
75
|
container: this.#options.container,
|
|
72
76
|
style: emptyStyle(),
|
|
@@ -75,7 +79,12 @@ export class HonuaMapLibreRenderer {
|
|
|
75
79
|
bearing: mapPackage.initialView?.bearing ?? 0,
|
|
76
80
|
pitch: mapPackage.initialView?.pitch ?? 0,
|
|
77
81
|
attributionControl: false,
|
|
78
|
-
|
|
82
|
+
// WebGL context attributes moved under `canvasContextAttributes` in
|
|
83
|
+
// MapLibre 5.0 and stayed there in 6.x. A top-level
|
|
84
|
+
// `preserveDrawingBuffer` is silently ignored by both majors, which
|
|
85
|
+
// would leave `<honua-map>` snapshot export (src/web-components/export.ts)
|
|
86
|
+
// reading an unreadable canvas.
|
|
87
|
+
canvasContextAttributes: { preserveDrawingBuffer: true },
|
|
79
88
|
});
|
|
80
89
|
this.#map = map;
|
|
81
90
|
const runtime = await loadMapPackage(mapPackage, map, {
|
|
@@ -33,12 +33,14 @@
|
|
|
33
33
|
*
|
|
34
34
|
* @module
|
|
35
35
|
*/
|
|
36
|
-
import type { HonuaMeasureMode, HonuaMeasureResult, HonuaMeasurementMap } from "./types.js";
|
|
36
|
+
import type { HonuaMeasureMode, HonuaMeasureResult, HonuaMeasurementMap, HonuaMeasurementMessages } from "./types.js";
|
|
37
37
|
declare const HTMLElementBase: typeof HTMLElement;
|
|
38
38
|
type LngLat = readonly [number, number];
|
|
39
39
|
export declare class HonuaMeasurementElement extends HTMLElementBase {
|
|
40
40
|
#private;
|
|
41
41
|
static get observedAttributes(): string[];
|
|
42
|
+
get messages(): HonuaMeasurementMessages;
|
|
43
|
+
set messages(messages: HonuaMeasurementMessages | undefined);
|
|
42
44
|
/** The MapLibre map this widget draws on. */
|
|
43
45
|
get map(): HonuaMeasurementMap | undefined;
|
|
44
46
|
set map(map: HonuaMeasurementMap | undefined);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"measurement.d.ts","sourceRoot":"","sources":["../../../src/web-components/measurement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;
|
|
1
|
+
{"version":3,"file":"measurement.d.ts","sourceRoot":"","sources":["../../../src/web-components/measurement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAIH,OAAO,KAAK,EAEV,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,wBAAwB,EACzB,MAAM,YAAY,CAAC;AAQpB,QAAA,MAAM,eAAe,EAAE,OAAO,WAAkF,CAAC;AAMjH,KAAK,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAExC,qBAAa,uBAAwB,SAAQ,eAAe;;IAC1D,WAAkB,kBAAkB,IAAI,MAAM,EAAE,CAE/C;IASD,IAAW,QAAQ,IAAI,wBAAwB,CAE9C;IACD,IAAW,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,GAAG,SAAS,EAGjE;IAOD,6CAA6C;IAC7C,IAAW,GAAG,IAAI,mBAAmB,GAAG,SAAS,CAEhD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