@honua/app-platform 0.1.2-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
package/controls/layer-list.js
CHANGED
|
@@ -31,7 +31,10 @@
|
|
|
31
31
|
* - `overlays` — JSON array of {@link HonuaLayerListOverlay} (the `overlays`
|
|
32
32
|
* property is preferred for non-trivial configs).
|
|
33
33
|
* - `for` — id of the map-providing element, see Wiring.
|
|
34
|
-
* - `label` — accessible name of the list (default "Layers")
|
|
34
|
+
* - `label` — accessible name of the list (default "Layers"); reflects the
|
|
35
|
+
* `label` property.
|
|
36
|
+
* - `not-seeded-label` — fallback text for the disabled-row badge (default
|
|
37
|
+
* "Not seeded"); reflects `notSeededLabel`.
|
|
35
38
|
* - `auto-refresh` — boolean; see Reactivity.
|
|
36
39
|
*
|
|
37
40
|
* ## CSS parts
|
|
@@ -43,7 +46,7 @@
|
|
|
43
46
|
* Rows are real `<label>` + `<input type="checkbox">` pairs; an overlay whose
|
|
44
47
|
* style layers are all missing renders disabled with a `badge` part/slot.
|
|
45
48
|
*/
|
|
46
|
-
import { HTMLElementBase, escapeAttribute, escapeHtml, globalDom, listenForHonuaMapReady, resolveHonuaMapFromContext, } from "./element-utils.js";
|
|
49
|
+
import { HTMLElementBase, escapeAttribute, escapeHtml, globalDom, listenForHonuaMapReady, renderShadowRoot, resolveHonuaMapFromContext, } from "./element-utils.js";
|
|
47
50
|
/**
|
|
48
51
|
* Custom element implementing the overlay layer list. Registered as
|
|
49
52
|
* `honua-layer-list` by `defineHonuaControls` (which runs automatically on
|
|
@@ -51,7 +54,7 @@ import { HTMLElementBase, escapeAttribute, escapeHtml, globalDom, listenForHonua
|
|
|
51
54
|
*/
|
|
52
55
|
export class HonuaLayerListElement extends HTMLElementBase {
|
|
53
56
|
static get observedAttributes() {
|
|
54
|
-
return ["overlays", "for", "label", "auto-refresh"];
|
|
57
|
+
return ["overlays", "for", "label", "not-seeded-label", "auto-refresh"];
|
|
55
58
|
}
|
|
56
59
|
#map;
|
|
57
60
|
#overlays = [];
|
|
@@ -74,6 +77,30 @@ export class HonuaLayerListElement extends HTMLElementBase {
|
|
|
74
77
|
connect(map) {
|
|
75
78
|
this.map = map;
|
|
76
79
|
}
|
|
80
|
+
/** Accessible name of the list. Reflects the `label` attribute. */
|
|
81
|
+
get label() {
|
|
82
|
+
return this.#attr("label") ?? "Layers";
|
|
83
|
+
}
|
|
84
|
+
set label(value) {
|
|
85
|
+
if (typeof this.setAttribute !== "function")
|
|
86
|
+
return;
|
|
87
|
+
if (value === undefined)
|
|
88
|
+
this.removeAttribute?.("label");
|
|
89
|
+
else
|
|
90
|
+
this.setAttribute("label", value);
|
|
91
|
+
}
|
|
92
|
+
/** Fallback text for an overlay whose style layers are not seeded. */
|
|
93
|
+
get notSeededLabel() {
|
|
94
|
+
return this.#attr("not-seeded-label") ?? "Not seeded";
|
|
95
|
+
}
|
|
96
|
+
set notSeededLabel(value) {
|
|
97
|
+
if (typeof this.setAttribute !== "function")
|
|
98
|
+
return;
|
|
99
|
+
if (value === undefined)
|
|
100
|
+
this.removeAttribute?.("not-seeded-label");
|
|
101
|
+
else
|
|
102
|
+
this.setAttribute("not-seeded-label", value);
|
|
103
|
+
}
|
|
77
104
|
/** The registered overlay definitions. */
|
|
78
105
|
get overlays() {
|
|
79
106
|
return this.#overlays;
|
|
@@ -141,7 +168,7 @@ export class HonuaLayerListElement extends HTMLElementBase {
|
|
|
141
168
|
this.#subscribeStyledata();
|
|
142
169
|
return;
|
|
143
170
|
}
|
|
144
|
-
// "label" only
|
|
171
|
+
// "label" / "not-seeded-label" only change the rendering.
|
|
145
172
|
this.render();
|
|
146
173
|
}
|
|
147
174
|
connectedCallback() {
|
|
@@ -231,14 +258,19 @@ export class HonuaLayerListElement extends HTMLElementBase {
|
|
|
231
258
|
const root = this.shadowRoot;
|
|
232
259
|
if (!root)
|
|
233
260
|
return;
|
|
234
|
-
const
|
|
235
|
-
|
|
236
|
-
|
|
261
|
+
const focusedOverlayId = root.activeElement?.getAttribute("data-overlay-id");
|
|
262
|
+
const label = this.label;
|
|
263
|
+
renderShadowRoot(root, structuralStyles(), `
|
|
237
264
|
<div part="root" class="root" role="group" aria-label="${escapeAttribute(label)}">
|
|
238
265
|
${this.#overlays.map((overlay) => this.#renderRow(overlay)).join("")}
|
|
239
266
|
</div>
|
|
240
|
-
|
|
267
|
+
`);
|
|
241
268
|
this.#bindRows(root);
|
|
269
|
+
if (focusedOverlayId) {
|
|
270
|
+
[...root.querySelectorAll("input[data-overlay-id]")]
|
|
271
|
+
.find((input) => input.getAttribute("data-overlay-id") === focusedOverlayId)
|
|
272
|
+
?.focus({ preventScroll: true });
|
|
273
|
+
}
|
|
242
274
|
}
|
|
243
275
|
#renderRow(overlay) {
|
|
244
276
|
const seeded = this.#isSeeded(overlay);
|
|
@@ -246,7 +278,9 @@ export class HonuaLayerListElement extends HTMLElementBase {
|
|
|
246
278
|
const attribution = overlay.attribution
|
|
247
279
|
? `<span part="attribution" class="attribution">${escapeHtml(overlay.attribution)}</span>`
|
|
248
280
|
: "";
|
|
249
|
-
const badge = seeded
|
|
281
|
+
const badge = seeded
|
|
282
|
+
? ""
|
|
283
|
+
: `<span part="badge" class="badge"><slot name="not-seeded">${escapeHtml(this.notSeededLabel)}</slot></span>`;
|
|
250
284
|
return `
|
|
251
285
|
<label part="row" class="row" data-overlay-id="${escapeAttribute(overlay.id)}"${seeded ? "" : " data-not-seeded"}>
|
|
252
286
|
<input
|
|
@@ -306,10 +340,9 @@ export class HonuaLayerListElement extends HTMLElementBase {
|
|
|
306
340
|
* Unlike the other controls-kit elements, this is **opt-in** and is NOT run by
|
|
307
341
|
* the blanket `defineHonuaControls()` / module-load auto-registration. The
|
|
308
342
|
* `web-components` entry ships its own (controller-driven) `honua-layer-list`
|
|
309
|
-
* under the same tag
|
|
310
|
-
*
|
|
311
|
-
*
|
|
312
|
-
* overlay-definition-driven layer list register it explicitly:
|
|
343
|
+
* under the same tag and is that tag's canonical/default registrant (see
|
|
344
|
+
* `./catalog.js`), so callers who want the native, overlay-definition-driven
|
|
345
|
+
* layer list register it explicitly:
|
|
313
346
|
*
|
|
314
347
|
* ```ts
|
|
315
348
|
* import { defineHonuaLayerList } from "@honua/sdk-js/controls";
|
|
@@ -365,11 +398,35 @@ function cssEscape(value) {
|
|
|
365
398
|
/** Structural-only styles; theme via `::part(root)`, `::part(row)`, `::part(checkbox)`, ... */
|
|
366
399
|
function structuralStyles() {
|
|
367
400
|
return `
|
|
368
|
-
:host {
|
|
401
|
+
:host {
|
|
402
|
+
display: block;
|
|
403
|
+
box-sizing: border-box;
|
|
404
|
+
min-width: 0;
|
|
405
|
+
max-width: 100%;
|
|
406
|
+
}
|
|
369
407
|
.root { display: flex; flex-direction: column; }
|
|
370
|
-
.row {
|
|
408
|
+
.root, .row {
|
|
409
|
+
box-sizing: border-box;
|
|
410
|
+
min-width: 0;
|
|
411
|
+
max-width: 100%;
|
|
412
|
+
}
|
|
413
|
+
.row {
|
|
414
|
+
display: flex;
|
|
415
|
+
align-items: center;
|
|
416
|
+
gap: 0.5em;
|
|
417
|
+
overflow-wrap: anywhere;
|
|
418
|
+
}
|
|
371
419
|
.checkbox { flex: none; }
|
|
420
|
+
.label, .attribution, .badge {
|
|
421
|
+
min-width: 0;
|
|
422
|
+
max-width: 100%;
|
|
423
|
+
overflow-wrap: anywhere;
|
|
424
|
+
}
|
|
372
425
|
.badge { font-size: 0.75em; }
|
|
373
426
|
[data-not-seeded] { cursor: not-allowed; }
|
|
427
|
+
@media (forced-colors: active), (prefers-contrast: more) {
|
|
428
|
+
.row:has(.checkbox:checked) { outline: 2px solid CanvasText; outline-offset: 2px; }
|
|
429
|
+
.row[data-not-seeded] { color: GrayText; }
|
|
430
|
+
}
|
|
374
431
|
`;
|
|
375
432
|
}
|
package/controls/legend.d.ts
CHANGED
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
* - `for` — id of the map-providing element.
|
|
34
34
|
* - `layer` — style layer id to derive entries from.
|
|
35
35
|
* - `layer-title` — optional title rendered above the derived section.
|
|
36
|
+
* - `fallback-label` — label for a derived expression's fallback branch
|
|
37
|
+
* (default "Other"); reflects `fallbackLabel`.
|
|
36
38
|
* - `heading` — optional heading rendered above the whole legend.
|
|
37
39
|
* - `follow-layer-visibility` — boolean; hide a section while its source
|
|
38
40
|
* layer's `visibility` layout property is `"none"` (sections carry the
|
|
@@ -48,16 +50,21 @@
|
|
|
48
50
|
* presentation, with the text labels carrying the meaning.
|
|
49
51
|
*
|
|
50
52
|
* Note: the `web-components` entry also registers a (controller-driven)
|
|
51
|
-
* `honua-legend` element
|
|
52
|
-
*
|
|
53
|
-
* `@honua/sdk-js/
|
|
53
|
+
* `honua-legend` element, and is that tag's canonical/default registrant
|
|
54
|
+
* (see `./catalog.js`) — importing `@honua/sdk-js/controls` alone or
|
|
55
|
+
* alongside `@honua/sdk-js/web-components`, in either order, never registers
|
|
56
|
+
* this implementation automatically. Call {@link defineHonuaLegend} (or
|
|
57
|
+
* `registerComponent("controls.legend")` from `./registry.js`) explicitly,
|
|
58
|
+
* before anything else claims the tag, to use this map-style-derived element
|
|
59
|
+
* instead.
|
|
54
60
|
*/
|
|
55
61
|
import { HTMLElementBase } from "./element-utils.js";
|
|
56
62
|
import type { HonuaLegendEntry, HonuaLegendMap, HonuaLegendSection } from "./types.js";
|
|
57
63
|
/**
|
|
58
64
|
* Custom element implementing the legend. Registered as `honua-legend` by
|
|
59
|
-
*
|
|
60
|
-
*
|
|
65
|
+
* {@link defineHonuaLegend} (opt-in; not part of the blanket
|
|
66
|
+
* {@link defineHonuaControls} auto-registration — see that function's doc for
|
|
67
|
+
* why).
|
|
61
68
|
*/
|
|
62
69
|
export declare class HonuaLegendElement extends HTMLElementBase {
|
|
63
70
|
#private;
|
|
@@ -67,6 +74,9 @@ export declare class HonuaLegendElement extends HTMLElementBase {
|
|
|
67
74
|
set map(map: HonuaLegendMap | undefined);
|
|
68
75
|
/** Wires the legend to a MapLibre map. Equivalent to setting `.map`. */
|
|
69
76
|
connect(map: HonuaLegendMap): void;
|
|
77
|
+
/** Label for a derived expression's fallback branch. Reflects `fallback-label`. */
|
|
78
|
+
get fallbackLabel(): string;
|
|
79
|
+
set fallbackLabel(value: string | undefined);
|
|
70
80
|
/**
|
|
71
81
|
* Explicit legend content. Accepts a flat {@link HonuaLegendEntry} array
|
|
72
82
|
* (one untitled section), {@link HonuaLegendSection} groups, or a mix;
|
|
@@ -101,4 +111,21 @@ export declare class HonuaLegendElement extends HTMLElementBase {
|
|
|
101
111
|
disconnectedCallback(): void;
|
|
102
112
|
protected render(): void;
|
|
103
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* Registers the legend custom element (`honua-legend`) with the
|
|
116
|
+
* map-style-derived, framework-free implementation. Skips the registration
|
|
117
|
+
* when the tag is already defined.
|
|
118
|
+
*
|
|
119
|
+
* Like {@link defineHonuaLayerList}, this is **opt-in** and is NOT run by the
|
|
120
|
+
* blanket `defineHonuaControls()` / module-load auto-registration — the
|
|
121
|
+
* `web-components` entry ships its own (controller-driven) `honua-legend`
|
|
122
|
+
* and is that tag's canonical/default registrant, so a caller who wants this
|
|
123
|
+
* implementation instead claims the tag explicitly:
|
|
124
|
+
*
|
|
125
|
+
* ```ts
|
|
126
|
+
* import { defineHonuaLegend } from "@honua/sdk-js/controls";
|
|
127
|
+
* defineHonuaLegend();
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
export declare function defineHonuaLegend(registry?: CustomElementRegistry): void;
|
|
104
131
|
//# sourceMappingURL=legend.d.ts.map
|
package/controls/legend.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legend.d.ts","sourceRoot":"","sources":["../../../src/controls/legend.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"legend.d.ts","sourceRoot":"","sources":["../../../src/controls/legend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AAEH,OAAO,EACL,eAAe,EAOhB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,kBAAkB,EAA0B,MAAM,YAAY,CAAC;AAE/G;;;;;GAKG;AACH,qBAAa,kBAAmB,SAAQ,eAAe;;IACrD,WAAkB,kBAAkB,IAAI,MAAM,EAAE,CAE/C;IAUD,qFAAqF;IACrF,IAAW,GAAG,IAAI,cAAc,GAAG,SAAS,CAE3C;IAED,IAAW,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,SAAS,EAM7C;IAED,wEAAwE;IACjE,OAAO,CAAC,GAAG,EAAE,cAAc,GAAG,IAAI;IAIzC,mFAAmF;IACnF,IAAW,aAAa,IAAI,MAAM,CAEjC;IAED,IAAW,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAIjD;IAED;;;;OAIG;IACH,IAAW,OAAO,IAAI,SAAS,kBAAkB,EAAE,CAElD;IAED,IAAW,OAAO,CAAC,KAAK,EAAE,SAAS,CAAC,gBAAgB,GAAG,kBAAkB,CAAC,EAAE,EAG3E;IAED,0EAA0E;IAC1E,IAAW,KAAK,IAAI,MAAM,GAAG,SAAS,CAErC;IAED,IAAW,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAIzC;IAED,sFAAsF;IACtF,IAAW,qBAAqB,IAAI,OAAO,CAE1C;IAED,IAAW,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAE9C;IAED,qFAAqF;IACrF,IAAW,WAAW,IAAI,OAAO,CAEhC;IAED,IAAW,WAAW,CAAC,KAAK,EAAE,OAAO,EAEpC;IAED;;;;OAIG;IACH,IAAW,WAAW,IAAI,MAAM,GAAG,SAAS,CAE3C;IAED;;;OAGG;IACH,IAAW,QAAQ,IAAI,SAAS,kBAAkB,EAAE,CAQnD;IAED,4EAA4E;IACrE,OAAO,IAAI,IAAI;IAKf,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAkB/F,iBAAiB,IAAI,IAAI;IASzB,oBAAoB,IAAI,IAAI;IA2EnC,SAAS,CAAC,MAAM,IAAI,IAAI;CAmDzB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,wBAA2B,GAAG,IAAI,CAK3E"}
|
package/controls/legend.js
CHANGED
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
* - `for` — id of the map-providing element.
|
|
34
34
|
* - `layer` — style layer id to derive entries from.
|
|
35
35
|
* - `layer-title` — optional title rendered above the derived section.
|
|
36
|
+
* - `fallback-label` — label for a derived expression's fallback branch
|
|
37
|
+
* (default "Other"); reflects `fallbackLabel`.
|
|
36
38
|
* - `heading` — optional heading rendered above the whole legend.
|
|
37
39
|
* - `follow-layer-visibility` — boolean; hide a section while its source
|
|
38
40
|
* layer's `visibility` layout property is `"none"` (sections carry the
|
|
@@ -48,20 +50,25 @@
|
|
|
48
50
|
* presentation, with the text labels carrying the meaning.
|
|
49
51
|
*
|
|
50
52
|
* Note: the `web-components` entry also registers a (controller-driven)
|
|
51
|
-
* `honua-legend` element
|
|
52
|
-
*
|
|
53
|
-
* `@honua/sdk-js/
|
|
53
|
+
* `honua-legend` element, and is that tag's canonical/default registrant
|
|
54
|
+
* (see `./catalog.js`) — importing `@honua/sdk-js/controls` alone or
|
|
55
|
+
* alongside `@honua/sdk-js/web-components`, in either order, never registers
|
|
56
|
+
* this implementation automatically. Call {@link defineHonuaLegend} (or
|
|
57
|
+
* `registerComponent("controls.legend")` from `./registry.js`) explicitly,
|
|
58
|
+
* before anything else claims the tag, to use this map-style-derived element
|
|
59
|
+
* instead.
|
|
54
60
|
*/
|
|
55
|
-
import { HTMLElementBase, escapeAttribute, escapeHtml, listenForHonuaMapReady, resolveHonuaMapFromContext, } from "./element-utils.js";
|
|
56
|
-
import { HonuaLegendDeriveError, deriveLegendEntries } from "./legend-derive.js";
|
|
61
|
+
import { HTMLElementBase, escapeAttribute, escapeHtml, globalDom, listenForHonuaMapReady, renderShadowRoot, resolveHonuaMapFromContext, } from "./element-utils.js";
|
|
62
|
+
import { HONUA_LEGEND_FALLBACK_LABEL, HonuaLegendDeriveError, deriveLegendEntries } from "./legend-derive.js";
|
|
57
63
|
/**
|
|
58
64
|
* Custom element implementing the legend. Registered as `honua-legend` by
|
|
59
|
-
*
|
|
60
|
-
*
|
|
65
|
+
* {@link defineHonuaLegend} (opt-in; not part of the blanket
|
|
66
|
+
* {@link defineHonuaControls} auto-registration — see that function's doc for
|
|
67
|
+
* why).
|
|
61
68
|
*/
|
|
62
69
|
export class HonuaLegendElement extends HTMLElementBase {
|
|
63
70
|
static get observedAttributes() {
|
|
64
|
-
return ["for", "layer", "layer-title", "heading", "follow-layer-visibility", "auto-refresh"];
|
|
71
|
+
return ["for", "layer", "layer-title", "fallback-label", "heading", "follow-layer-visibility", "auto-refresh"];
|
|
65
72
|
}
|
|
66
73
|
#map;
|
|
67
74
|
#explicitSections = [];
|
|
@@ -86,6 +93,18 @@ export class HonuaLegendElement extends HTMLElementBase {
|
|
|
86
93
|
connect(map) {
|
|
87
94
|
this.map = map;
|
|
88
95
|
}
|
|
96
|
+
/** Label for a derived expression's fallback branch. Reflects `fallback-label`. */
|
|
97
|
+
get fallbackLabel() {
|
|
98
|
+
return this.#attr("fallback-label") ?? HONUA_LEGEND_FALLBACK_LABEL;
|
|
99
|
+
}
|
|
100
|
+
set fallbackLabel(value) {
|
|
101
|
+
if (typeof this.setAttribute !== "function")
|
|
102
|
+
return;
|
|
103
|
+
if (value === undefined)
|
|
104
|
+
this.removeAttribute?.("fallback-label");
|
|
105
|
+
else
|
|
106
|
+
this.setAttribute("fallback-label", value);
|
|
107
|
+
}
|
|
89
108
|
/**
|
|
90
109
|
* Explicit legend content. Accepts a flat {@link HonuaLegendEntry} array
|
|
91
110
|
* (one untitled section), {@link HonuaLegendSection} groups, or a mix;
|
|
@@ -156,7 +175,7 @@ export class HonuaLegendElement extends HTMLElementBase {
|
|
|
156
175
|
this.#resolveMapFromContext();
|
|
157
176
|
return;
|
|
158
177
|
}
|
|
159
|
-
if (name === "layer" || name === "layer-title") {
|
|
178
|
+
if (name === "layer" || name === "layer-title" || name === "fallback-label") {
|
|
160
179
|
this.refresh();
|
|
161
180
|
return;
|
|
162
181
|
}
|
|
@@ -194,7 +213,7 @@ export class HonuaLegendElement extends HTMLElementBase {
|
|
|
194
213
|
return;
|
|
195
214
|
}
|
|
196
215
|
try {
|
|
197
|
-
this.#derivedEntries = deriveLegendEntries(map, layerId);
|
|
216
|
+
this.#derivedEntries = deriveLegendEntries(map, layerId).map((entry) => entry.label === HONUA_LEGEND_FALLBACK_LABEL ? { ...entry, label: this.fallbackLabel } : entry);
|
|
198
217
|
this.#deriveError = undefined;
|
|
199
218
|
}
|
|
200
219
|
catch (error) {
|
|
@@ -254,13 +273,12 @@ export class HonuaLegendElement extends HTMLElementBase {
|
|
|
254
273
|
if (!root)
|
|
255
274
|
return;
|
|
256
275
|
const heading = this.#attr("heading");
|
|
257
|
-
root
|
|
258
|
-
<style>${structuralStyles()}</style>
|
|
276
|
+
renderShadowRoot(root, structuralStyles(), `
|
|
259
277
|
<div part="root" class="root">
|
|
260
278
|
${heading ? `<p part="heading" class="heading">${escapeHtml(heading)}</p>` : ""}
|
|
261
279
|
${this.sections.map((section) => this.#renderSection(section)).join("")}
|
|
262
280
|
</div>
|
|
263
|
-
|
|
281
|
+
`);
|
|
264
282
|
}
|
|
265
283
|
#renderSection(section) {
|
|
266
284
|
const hidden = this.#sectionHidden(section);
|
|
@@ -296,6 +314,29 @@ export class HonuaLegendElement extends HTMLElementBase {
|
|
|
296
314
|
this.removeAttribute?.(name);
|
|
297
315
|
}
|
|
298
316
|
}
|
|
317
|
+
/**
|
|
318
|
+
* Registers the legend custom element (`honua-legend`) with the
|
|
319
|
+
* map-style-derived, framework-free implementation. Skips the registration
|
|
320
|
+
* when the tag is already defined.
|
|
321
|
+
*
|
|
322
|
+
* Like {@link defineHonuaLayerList}, this is **opt-in** and is NOT run by the
|
|
323
|
+
* blanket `defineHonuaControls()` / module-load auto-registration — the
|
|
324
|
+
* `web-components` entry ships its own (controller-driven) `honua-legend`
|
|
325
|
+
* and is that tag's canonical/default registrant, so a caller who wants this
|
|
326
|
+
* implementation instead claims the tag explicitly:
|
|
327
|
+
*
|
|
328
|
+
* ```ts
|
|
329
|
+
* import { defineHonuaLegend } from "@honua/sdk-js/controls";
|
|
330
|
+
* defineHonuaLegend();
|
|
331
|
+
* ```
|
|
332
|
+
*/
|
|
333
|
+
export function defineHonuaLegend(registry = globalDom.customElements) {
|
|
334
|
+
if (!registry)
|
|
335
|
+
return;
|
|
336
|
+
if (!registry.get("honua-legend")) {
|
|
337
|
+
registry.define("honua-legend", HonuaLegendElement);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
299
340
|
function normalizeSections(value) {
|
|
300
341
|
const sections = [];
|
|
301
342
|
let loose = [];
|
|
@@ -348,13 +389,16 @@ function renderRow(entry) {
|
|
|
348
389
|
const fill = typeof entry.color === "string" ? entry.color : entry.color.fill;
|
|
349
390
|
const outline = typeof entry.color === "object" && entry.color !== null ? entry.color.outline : undefined;
|
|
350
391
|
const shape = entry.shape ?? "fill";
|
|
351
|
-
const
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
392
|
+
const fillAttribute = escapeAttribute(fill ?? "transparent");
|
|
393
|
+
const outlineAttribute = escapeAttribute(outline ?? "none");
|
|
394
|
+
const mark = shape === "line"
|
|
395
|
+
? `<line x1="1" y1="8" x2="15" y2="8" stroke="${fillAttribute}" stroke-width="3" />`
|
|
396
|
+
: shape === "circle"
|
|
397
|
+
? `<circle cx="8" cy="8" r="7" fill="${fillAttribute}" stroke="${outlineAttribute}" />`
|
|
398
|
+
: `<rect x="1" y="1" width="14" height="14" fill="${fillAttribute}" stroke="${outlineAttribute}" />`;
|
|
355
399
|
return `
|
|
356
400
|
<li part="row" class="row">
|
|
357
|
-
<
|
|
401
|
+
<svg part="swatch" class="swatch swatch-${shape}" aria-hidden="true" viewBox="0 0 16 16">${mark}</svg>
|
|
358
402
|
<span part="label" class="label">${escapeHtml(entry.label)}</span>
|
|
359
403
|
</li>
|
|
360
404
|
`;
|
|
@@ -362,20 +406,46 @@ function renderRow(entry) {
|
|
|
362
406
|
/** Structural-only styles; theme via `::part(root)`, `::part(row)`, `::part(swatch)`, ... */
|
|
363
407
|
function structuralStyles() {
|
|
364
408
|
return `
|
|
365
|
-
:host {
|
|
409
|
+
:host {
|
|
410
|
+
display: block;
|
|
411
|
+
box-sizing: border-box;
|
|
412
|
+
min-width: 0;
|
|
413
|
+
max-width: 100%;
|
|
414
|
+
}
|
|
415
|
+
.root, .section, .rows {
|
|
416
|
+
box-sizing: border-box;
|
|
417
|
+
min-width: 0;
|
|
418
|
+
max-width: 100%;
|
|
419
|
+
}
|
|
366
420
|
.heading, .section-title { margin: 0; }
|
|
367
421
|
.section { margin: 0; }
|
|
368
422
|
.rows { list-style: none; margin: 0; padding: 0; }
|
|
369
|
-
.row {
|
|
423
|
+
.row {
|
|
424
|
+
display: flex;
|
|
425
|
+
flex-direction: row;
|
|
426
|
+
direction: inherit;
|
|
427
|
+
align-items: center;
|
|
428
|
+
gap: 0.5em;
|
|
429
|
+
min-width: 0;
|
|
430
|
+
max-width: 100%;
|
|
431
|
+
overflow-wrap: anywhere;
|
|
432
|
+
}
|
|
433
|
+
.heading, .section-title, .label {
|
|
434
|
+
min-width: 0;
|
|
435
|
+
max-width: 100%;
|
|
436
|
+
overflow-wrap: anywhere;
|
|
437
|
+
}
|
|
438
|
+
.label { text-align: start; }
|
|
370
439
|
.swatch {
|
|
371
440
|
flex: none;
|
|
372
441
|
inline-size: 1em;
|
|
373
442
|
block-size: 1em;
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
443
|
+
overflow: visible;
|
|
444
|
+
}
|
|
445
|
+
@media (forced-colors: active), (prefers-contrast: more) {
|
|
446
|
+
.row { color: CanvasText; }
|
|
447
|
+
.swatch { color: CanvasText; forced-color-adjust: none; }
|
|
448
|
+
.swatch > * { forced-color-adjust: none; }
|
|
377
449
|
}
|
|
378
|
-
.swatch-line { block-size: 3px; border: none; }
|
|
379
|
-
.swatch-circle { border-radius: 50%; }
|
|
380
450
|
`;
|
|
381
451
|
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The **production qualification matrix** for the Honua custom-element kit
|
|
3
|
+
* (issue #683, parent epic #678; REQ-004 / REQ-005 / NFR-001).
|
|
4
|
+
*
|
|
5
|
+
* Epic #678's premise is that "production support" for a component library is
|
|
6
|
+
* not a claim anybody gets to make in prose. It is a matrix: every shipped
|
|
7
|
+
* component × every gate that matters, each cell carrying a status and, when
|
|
8
|
+
* the status is a claim of success, the automated evidence that backs it. This
|
|
9
|
+
* module is that matrix, and it extends the existing component catalog
|
|
10
|
+
* ({@link "./catalog.js"}) rather than introducing a second inventory —
|
|
11
|
+
* `HONUA_COMPONENT_CATALOG` remains the single list of shipped tags, and every
|
|
12
|
+
* catalog id must appear here exactly once (enforced by
|
|
13
|
+
* `scripts/component-qualification.mjs`).
|
|
14
|
+
*
|
|
15
|
+
* ## The honesty rules
|
|
16
|
+
*
|
|
17
|
+
* The matrix is seeded from what the test suite *actually* asserts today, not
|
|
18
|
+
* from what the components ought to do. Concretely:
|
|
19
|
+
*
|
|
20
|
+
* - `"passing"` requires at least one existing test file as evidence, and the
|
|
21
|
+
* CI verifier fails if any referenced file is missing. Deleting the test that
|
|
22
|
+
* backs a gate therefore breaks the build rather than quietly downgrading the
|
|
23
|
+
* claim.
|
|
24
|
+
* - `"failing"` is used where the requirement is *known* not to be met —
|
|
25
|
+
* including from code inspection, before an automated gate exists. It always
|
|
26
|
+
* carries a note naming the mechanism. This is deliberately more informative
|
|
27
|
+
* than `"pending"`: "we know the components hard-code English strings" is a
|
|
28
|
+
* different engineering state from "nobody has looked".
|
|
29
|
+
* - `"pending"` means no automated gate and no established verdict. It is the
|
|
30
|
+
* default, and most of this matrix is honestly in it.
|
|
31
|
+
* - `"not-applicable"` requires a note justifying why the gate cannot apply to
|
|
32
|
+
* that component — it is the only status that can silently remove work, so it
|
|
33
|
+
* is the one that most needs an argument attached.
|
|
34
|
+
*
|
|
35
|
+
* Nothing here is aspirational, and this matrix is a *different axis* from the
|
|
36
|
+
* catalog's `supportTier`. The tier records the functional maturity whichever
|
|
37
|
+
* feature issue (#680-#683) delivered on a component; this records the
|
|
38
|
+
* cross-cutting gates, which no component has cleared yet. The verifier enforces
|
|
39
|
+
* only the direction that is implied — clearing every gate requires the
|
|
40
|
+
* production tier, since gate completion is the harder bar — and surfaces every
|
|
41
|
+
* production-tier component's still-open gates rather than pretending the tier
|
|
42
|
+
* settles them. See {@link isComponentProductionQualified} and
|
|
43
|
+
* {@link listOpenQualificationGates}.
|
|
44
|
+
*
|
|
45
|
+
* ## Shape
|
|
46
|
+
*
|
|
47
|
+
* The declarations below are stored **inverted** — per gate, the groups of
|
|
48
|
+
* components that share a status and evidence — because that is how the
|
|
49
|
+
* evidence actually clusters (one test file typically proves one gate for
|
|
50
|
+
* several components) and because it keeps the reviewable diff small. The
|
|
51
|
+
* public API ({@link getComponentQualification},
|
|
52
|
+
* {@link listComponentQualifications}) expands it back into the dense
|
|
53
|
+
* per-component × per-gate matrix that consumers and the generated
|
|
54
|
+
* `config/component-qualification.v1.json` manifest want.
|
|
55
|
+
*
|
|
56
|
+
* Like `./catalog.js` this module is pure metadata: no DOM, no element classes,
|
|
57
|
+
* no registration, no `src/core` or `src/runtime` import. Importing it costs a
|
|
58
|
+
* consumer bundle nothing that NFR-001 forbids.
|
|
59
|
+
*
|
|
60
|
+
* @module
|
|
61
|
+
*/
|
|
62
|
+
import { type HonuaComponentCatalogEntry } from "./catalog.js";
|
|
63
|
+
/**
|
|
64
|
+
* Bumped whenever a gate is added/removed or a status vocabulary changes, so
|
|
65
|
+
* the generated manifest and any external consumer can detect a shape change
|
|
66
|
+
* distinctly from a routine status update.
|
|
67
|
+
*/
|
|
68
|
+
export declare const HONUA_COMPONENT_QUALIFICATION_DATA_VERSION = "1.1.0";
|
|
69
|
+
/** Which issue requirement a gate discharges. */
|
|
70
|
+
export type HonuaComponentQualificationRequirement = "REQ-004" | "REQ-005" | "NFR-001";
|
|
71
|
+
/** Closed status vocabulary. See the module doc for the honesty rules. */
|
|
72
|
+
export type HonuaComponentQualificationStatus = "passing" | "failing" | "pending" | "not-applicable";
|
|
73
|
+
/** Every status, in escalating-confidence order. */
|
|
74
|
+
export declare const HONUA_COMPONENT_QUALIFICATION_STATUSES: readonly HonuaComponentQualificationStatus[];
|
|
75
|
+
/** Stable gate ids. Never reused; adding one bumps the data version. */
|
|
76
|
+
export type HonuaComponentQualificationGateId = "keyboard-behavior" | "screen-reader-semantics" | "focus-restoration" | "reduced-motion" | "high-contrast" | "responsive-layout" | "localization" | "pseudo-locale" | "rtl" | "visual-regression" | "strict-csp" | "zero-console-error" | "deterministic-disposal" | "duplicate-listener" | "memory-leak" | "ssr-import" | "secure-export" | "bundle-budget";
|
|
77
|
+
/** One gate's definition: what it means and what would satisfy it. */
|
|
78
|
+
export interface HonuaComponentQualificationGate {
|
|
79
|
+
readonly id: HonuaComponentQualificationGateId;
|
|
80
|
+
readonly requirement: HonuaComponentQualificationRequirement;
|
|
81
|
+
readonly title: string;
|
|
82
|
+
/** What a `passing` cell asserts for this gate. */
|
|
83
|
+
readonly criterion: string;
|
|
84
|
+
}
|
|
85
|
+
/** The full gate list, in a stable order. */
|
|
86
|
+
export declare const HONUA_COMPONENT_QUALIFICATION_GATES: readonly HonuaComponentQualificationGate[];
|
|
87
|
+
/** One cell of the matrix. */
|
|
88
|
+
export interface HonuaComponentQualificationCell {
|
|
89
|
+
readonly gate: HonuaComponentQualificationGateId;
|
|
90
|
+
readonly requirement: HonuaComponentQualificationRequirement;
|
|
91
|
+
readonly status: HonuaComponentQualificationStatus;
|
|
92
|
+
/** Repo-relative files that prove a `passing` status. Empty otherwise. */
|
|
93
|
+
readonly evidence: readonly string[];
|
|
94
|
+
/** Required for `failing` and `not-applicable`; optional context otherwise. */
|
|
95
|
+
readonly note?: string;
|
|
96
|
+
}
|
|
97
|
+
/** One component's full row. */
|
|
98
|
+
export interface HonuaComponentQualification {
|
|
99
|
+
readonly id: string;
|
|
100
|
+
readonly tag: string;
|
|
101
|
+
readonly source: HonuaComponentCatalogEntry["source"];
|
|
102
|
+
readonly gates: readonly HonuaComponentQualificationCell[];
|
|
103
|
+
}
|
|
104
|
+
/** Aggregate counts for a row or for the whole matrix. */
|
|
105
|
+
export interface HonuaComponentQualificationSummary {
|
|
106
|
+
readonly passing: number;
|
|
107
|
+
readonly failing: number;
|
|
108
|
+
readonly pending: number;
|
|
109
|
+
readonly notApplicable: number;
|
|
110
|
+
/** Gates that must still reach `passing` before production tier. */
|
|
111
|
+
readonly blocking: readonly HonuaComponentQualificationGateId[];
|
|
112
|
+
}
|
|
113
|
+
/** The full matrix row for one catalog id, or `undefined` for an unknown id. */
|
|
114
|
+
export declare function getComponentQualification(id: string): HonuaComponentQualification | undefined;
|
|
115
|
+
/** The full matrix, in catalog order. */
|
|
116
|
+
export declare function listComponentQualifications(): readonly HonuaComponentQualification[];
|
|
117
|
+
/** One gate's definition. */
|
|
118
|
+
export declare function describeComponentQualificationGate(gate: HonuaComponentQualificationGateId): HonuaComponentQualificationGate | undefined;
|
|
119
|
+
/** Counts and remaining blockers for one row, or for the whole matrix when `id` is omitted. */
|
|
120
|
+
export declare function summarizeComponentQualification(id?: string): HonuaComponentQualificationSummary;
|
|
121
|
+
/**
|
|
122
|
+
* Whether a component has cleared **every** gate in this matrix.
|
|
123
|
+
*
|
|
124
|
+
* `not-applicable` cells count as cleared (that is what the status means, and
|
|
125
|
+
* why it requires a justifying note); `pending` and `failing` do not.
|
|
126
|
+
*
|
|
127
|
+
* This is deliberately *not* the same claim as the catalog's
|
|
128
|
+
* `supportTier: "production-tier"`, and conflating the two would misreport both.
|
|
129
|
+
* The catalog tier is a **functional maturity** claim owned by whichever feature
|
|
130
|
+
* issue raised the component (#680-#683): `<honua-feature-editor>` is
|
|
131
|
+
* production-tier because #680 delivered capability-aware editing, conflict
|
|
132
|
+
* handling, snapping, and attachment staging on it. This function is the
|
|
133
|
+
* **cross-cutting gate** axis, which no component has cleared yet.
|
|
134
|
+
*
|
|
135
|
+
* `scripts/component-qualification.mjs` therefore enforces only the direction
|
|
136
|
+
* that is actually implied: a component that has cleared every gate must be
|
|
137
|
+
* declared production-tier, because gate completion is strictly the harder bar.
|
|
138
|
+
* The reverse does not hold, so a production-tier component simply carries its
|
|
139
|
+
* still-open gates in the manifest's `openGates` — visible, counted, and
|
|
140
|
+
* impossible to mistake for done. See {@link listOpenQualificationGates}.
|
|
141
|
+
*/
|
|
142
|
+
export declare function isComponentProductionQualified(id: string): boolean;
|
|
143
|
+
/**
|
|
144
|
+
* The gates a component has not yet cleared (`pending` or `failing`), in gate
|
|
145
|
+
* order. Empty exactly when {@link isComponentProductionQualified} is true.
|
|
146
|
+
*
|
|
147
|
+
* This is what keeps a `production-tier` catalog claim honest: the tier says the
|
|
148
|
+
* component's *feature* work landed, and this says precisely what remains on the
|
|
149
|
+
* accessibility, localization, visual, CSP, lifecycle, and bundle axes.
|
|
150
|
+
*/
|
|
151
|
+
export declare function listOpenQualificationGates(id: string): readonly HonuaComponentQualificationGateId[];
|
|
152
|
+
//# sourceMappingURL=qualification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qualification.d.ts","sourceRoot":"","sources":["../../../src/controls/qualification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAEH,OAAO,EAA2B,KAAK,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAExF;;;;GAIG;AACH,eAAO,MAAM,0CAA0C,UAAU,CAAC;AAElE,iDAAiD;AACjD,MAAM,MAAM,sCAAsC,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAEvF,0EAA0E;AAC1E,MAAM,MAAM,iCAAiC,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,gBAAgB,CAAC;AAErG,oDAAoD;AACpD,eAAO,MAAM,sCAAsC,EAAE,SAAS,iCAAiC,EAKpF,CAAC;AAEZ,wEAAwE;AACxE,MAAM,MAAM,iCAAiC,GAEzC,mBAAmB,GACnB,yBAAyB,GACzB,mBAAmB,GACnB,gBAAgB,GAChB,eAAe,GACf,mBAAmB,GACnB,cAAc,GACd,eAAe,GACf,KAAK,GAEL,mBAAmB,GACnB,YAAY,GACZ,oBAAoB,GACpB,wBAAwB,GACxB,oBAAoB,GACpB,aAAa,GACb,YAAY,GACZ,eAAe,GACf,eAAe,CAAC;AAEpB,sEAAsE;AACtE,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,EAAE,EAAE,iCAAiC,CAAC;IAC/C,QAAQ,CAAC,WAAW,EAAE,sCAAsC,CAAC;IAC7D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,mDAAmD;IACnD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,6CAA6C;AAC7C,eAAO,MAAM,mCAAmC,EAAE,SAAS,+BAA+B,EA8H/E,CAAC;AAEZ,8BAA8B;AAC9B,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,IAAI,EAAE,iCAAiC,CAAC;IACjD,QAAQ,CAAC,WAAW,EAAE,sCAAsC,CAAC;IAC7D,QAAQ,CAAC,MAAM,EAAE,iCAAiC,CAAC;IACnD,0EAA0E;IAC1E,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,+EAA+E;IAC/E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,gCAAgC;AAChC,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,0BAA0B,CAAC,QAAQ,CAAC,CAAC;IACtD,QAAQ,CAAC,KAAK,EAAE,SAAS,+BAA+B,EAAE,CAAC;CAC5D;AAED,0DAA0D;AAC1D,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,oEAAoE;IACpE,QAAQ,CAAC,QAAQ,EAAE,SAAS,iCAAiC,EAAE,CAAC;CACjE;AA+kCD,gFAAgF;AAChF,wBAAgB,yBAAyB,CAAC,EAAE,EAAE,MAAM,GAAG,2BAA2B,GAAG,SAAS,CAS7F;AAED,yCAAyC;AACzC,wBAAgB,2BAA2B,IAAI,SAAS,2BAA2B,EAAE,CAMpF;AAED,6BAA6B;AAC7B,wBAAgB,kCAAkC,CAChD,IAAI,EAAE,iCAAiC,GACtC,+BAA+B,GAAG,SAAS,CAE7C;AAED,+FAA+F;AAC/F,wBAAgB,+BAA+B,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,kCAAkC,CAc/F;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,8BAA8B,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAIlE;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,iCAAiC,EAAE,CAMnG"}
|