@honua/app-platform 0.0.20-alpha.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/LICENSE +201 -0
- package/README.md +11 -0
- package/app/index.d.ts +164 -0
- package/app/index.d.ts.map +1 -0
- package/app/index.js +424 -0
- package/app-controller/controller.d.ts +425 -0
- package/app-controller/controller.d.ts.map +1 -0
- package/app-controller/controller.js +1173 -0
- package/app-controller/index.d.ts +14 -0
- package/app-controller/index.d.ts.map +1 -0
- package/app-controller/index.js +12 -0
- package/app-workspace/index.d.ts +421 -0
- package/app-workspace/index.d.ts.map +1 -0
- package/app-workspace/index.js +722 -0
- package/collaboration/client.d.ts +40 -0
- package/collaboration/client.d.ts.map +1 -0
- package/collaboration/client.js +299 -0
- package/collaboration/errors.d.ts +15 -0
- package/collaboration/errors.d.ts.map +1 -0
- package/collaboration/errors.js +17 -0
- package/collaboration/fixture.d.ts +41 -0
- package/collaboration/fixture.d.ts.map +1 -0
- package/collaboration/fixture.js +362 -0
- package/collaboration/index.d.ts +18 -0
- package/collaboration/index.d.ts.map +1 -0
- package/collaboration/index.js +14 -0
- package/collaboration/types.d.ts +240 -0
- package/collaboration/types.d.ts.map +1 -0
- package/collaboration/types.js +1 -0
- package/contract/analytics-sources.d.ts +149 -0
- package/contract/analytics-sources.d.ts.map +1 -0
- package/contract/analytics-sources.js +235 -0
- package/contract/edit-session.d.ts +203 -0
- package/contract/edit-session.d.ts.map +1 -0
- package/contract/edit-session.js +760 -0
- package/contract/edit-sketch.d.ts +91 -0
- package/contract/edit-sketch.d.ts.map +1 -0
- package/contract/edit-sketch.js +281 -0
- package/contract/index.d.ts +63 -0
- package/contract/index.d.ts.map +1 -0
- package/contract/index.js +52 -0
- package/contract/jobs.d.ts +149 -0
- package/contract/jobs.d.ts.map +1 -0
- package/contract/jobs.js +40 -0
- package/contract/pmtiles.d.ts +162 -0
- package/contract/pmtiles.d.ts.map +1 -0
- package/contract/pmtiles.js +155 -0
- package/contract/source.d.ts +447 -0
- package/contract/source.d.ts.map +1 -0
- package/contract/source.js +3909 -0
- package/contract/spatial-aggregation.d.ts +336 -0
- package/contract/spatial-aggregation.d.ts.map +1 -0
- package/contract/spatial-aggregation.js +298 -0
- package/contract/temporal.d.ts +455 -0
- package/contract/temporal.d.ts.map +1 -0
- package/contract/temporal.js +146 -0
- package/contract/tiles.d.ts +370 -0
- package/contract/tiles.d.ts.map +1 -0
- package/contract/tiles.js +519 -0
- package/contract/types.d.ts +694 -0
- package/contract/types.d.ts.map +1 -0
- package/contract/types.js +183 -0
- package/contract/widget-source.d.ts +205 -0
- package/contract/widget-source.d.ts.map +1 -0
- package/contract/widget-source.js +1473 -0
- package/control-plane/client.d.ts +95 -0
- package/control-plane/client.d.ts.map +1 -0
- package/control-plane/client.js +374 -0
- package/control-plane/index.d.ts +18 -0
- package/control-plane/index.d.ts.map +1 -0
- package/control-plane/index.js +14 -0
- package/control-plane/types.d.ts +233 -0
- package/control-plane/types.d.ts.map +1 -0
- package/control-plane/types.js +7 -0
- package/controls/basemap-style-binding.d.ts +54 -0
- package/controls/basemap-style-binding.d.ts.map +1 -0
- package/controls/basemap-style-binding.js +199 -0
- package/controls/basemap-switcher.d.ts +95 -0
- package/controls/basemap-switcher.d.ts.map +1 -0
- package/controls/basemap-switcher.js +379 -0
- package/controls/element-utils.d.ts +48 -0
- package/controls/element-utils.d.ts.map +1 -0
- package/controls/element-utils.js +78 -0
- package/controls/index.d.ts +33 -0
- package/controls/index.d.ts.map +1 -0
- package/controls/index.js +30 -0
- package/controls/layer-list.d.ts +98 -0
- package/controls/layer-list.d.ts.map +1 -0
- package/controls/layer-list.js +375 -0
- package/controls/legend-derive.d.ts +53 -0
- package/controls/legend-derive.d.ts.map +1 -0
- package/controls/legend-derive.js +196 -0
- package/controls/legend.d.ts +104 -0
- package/controls/legend.d.ts.map +1 -0
- package/controls/legend.js +381 -0
- package/controls/swipe-control.d.ts +80 -0
- package/controls/swipe-control.d.ts.map +1 -0
- package/controls/swipe-control.js +368 -0
- package/controls/types.d.ts +227 -0
- package/controls/types.d.ts.map +1 -0
- package/controls/types.js +11 -0
- package/core/auth/client-credentials-provider.d.ts +51 -0
- package/core/auth/client-credentials-provider.d.ts.map +1 -0
- package/core/auth/client-credentials-provider.js +115 -0
- package/core/auth/credential-store.d.ts +52 -0
- package/core/auth/credential-store.d.ts.map +1 -0
- package/core/auth/credential-store.js +82 -0
- package/core/auth/index.d.ts +23 -0
- package/core/auth/index.d.ts.map +1 -0
- package/core/auth/index.js +20 -0
- package/core/auth/oauth2-provider.d.ts +114 -0
- package/core/auth/oauth2-provider.d.ts.map +1 -0
- package/core/auth/oauth2-provider.js +408 -0
- package/core/auth/pkce.d.ts +25 -0
- package/core/auth/pkce.d.ts.map +1 -0
- package/core/auth/pkce.js +46 -0
- package/core/auth/static-providers.d.ts +20 -0
- package/core/auth/static-providers.d.ts.map +1 -0
- package/core/auth/static-providers.js +26 -0
- package/core/auth/token-endpoint.d.ts +40 -0
- package/core/auth/token-endpoint.d.ts.map +1 -0
- package/core/auth/token-endpoint.js +133 -0
- package/core/auth/types.d.ts +144 -0
- package/core/auth/types.d.ts.map +1 -0
- package/core/auth/types.js +8 -0
- package/core/batch.d.ts +37 -0
- package/core/batch.d.ts.map +1 -0
- package/core/batch.js +79 -0
- package/core/cache-state.d.ts +79 -0
- package/core/cache-state.d.ts.map +1 -0
- package/core/cache-state.js +87 -0
- package/core/client.d.ts +607 -0
- package/core/client.d.ts.map +1 -0
- package/core/client.js +1716 -0
- package/core/compatibility.d.ts +18 -0
- package/core/compatibility.d.ts.map +1 -0
- package/core/compatibility.js +245 -0
- package/core/errors.d.ts +139 -0
- package/core/errors.d.ts.map +1 -0
- package/core/errors.js +176 -0
- package/core/esri-geojson.d.ts +66 -0
- package/core/esri-geojson.d.ts.map +1 -0
- package/core/esri-geojson.js +363 -0
- package/core/geoparquet-sql.d.ts +162 -0
- package/core/geoparquet-sql.d.ts.map +1 -0
- package/core/geoparquet-sql.js +333 -0
- package/core/geoservices.d.ts +34 -0
- package/core/geoservices.d.ts.map +1 -0
- package/core/geoservices.js +434 -0
- package/core/grpc-adapter.d.ts +23 -0
- package/core/grpc-adapter.d.ts.map +1 -0
- package/core/grpc-adapter.js +688 -0
- package/core/odata.d.ts +347 -0
- package/core/odata.d.ts.map +1 -0
- package/core/odata.js +913 -0
- package/core/ogc-conformance.d.ts +35 -0
- package/core/ogc-conformance.d.ts.map +1 -0
- package/core/ogc-conformance.js +134 -0
- package/core/ogc-endpoint-layout.d.ts +70 -0
- package/core/ogc-endpoint-layout.d.ts.map +1 -0
- package/core/ogc-endpoint-layout.js +173 -0
- package/core/ogc-features.d.ts +23 -0
- package/core/ogc-features.d.ts.map +1 -0
- package/core/ogc-features.js +129 -0
- package/core/ogc-maps.d.ts +49 -0
- package/core/ogc-maps.d.ts.map +1 -0
- package/core/ogc-maps.js +126 -0
- package/core/ogc-processes.d.ts +118 -0
- package/core/ogc-processes.d.ts.map +1 -0
- package/core/ogc-processes.js +423 -0
- package/core/ogc-records.d.ts +75 -0
- package/core/ogc-records.d.ts.map +1 -0
- package/core/ogc-records.js +251 -0
- package/core/ogc-tiles.d.ts +125 -0
- package/core/ogc-tiles.d.ts.map +1 -0
- package/core/ogc-tiles.js +183 -0
- package/core/path-utils.d.ts +69 -0
- package/core/path-utils.d.ts.map +1 -0
- package/core/path-utils.js +123 -0
- package/core/pbf-decoder.d.ts +39 -0
- package/core/pbf-decoder.d.ts.map +1 -0
- package/core/pbf-decoder.js +702 -0
- package/core/process-runner.d.ts +104 -0
- package/core/process-runner.d.ts.map +1 -0
- package/core/process-runner.js +315 -0
- package/core/protocol-transport.d.ts +76 -0
- package/core/protocol-transport.d.ts.map +1 -0
- package/core/protocol-transport.js +15 -0
- package/core/query-builder.d.ts +261 -0
- package/core/query-builder.d.ts.map +1 -0
- package/core/query-builder.js +538 -0
- package/core/request-pipeline.d.ts +88 -0
- package/core/request-pipeline.d.ts.map +1 -0
- package/core/request-pipeline.js +273 -0
- package/core/spatial-filter.d.ts +93 -0
- package/core/spatial-filter.d.ts.map +1 -0
- package/core/spatial-filter.js +153 -0
- package/core/stac-static.d.ts +51 -0
- package/core/stac-static.d.ts.map +1 -0
- package/core/stac-static.js +195 -0
- package/core/stac.d.ts +67 -0
- package/core/stac.d.ts.map +1 -0
- package/core/stac.js +259 -0
- package/core/surfaces.d.ts +540 -0
- package/core/surfaces.d.ts.map +1 -0
- package/core/surfaces.js +1964 -0
- package/core/terrain-elevation.d.ts +114 -0
- package/core/terrain-elevation.d.ts.map +1 -0
- package/core/terrain-elevation.js +150 -0
- package/core/types.d.ts +1404 -0
- package/core/types.d.ts.map +1 -0
- package/core/types.js +13 -0
- package/core/wfs-capabilities.d.ts +153 -0
- package/core/wfs-capabilities.d.ts.map +1 -0
- package/core/wfs-capabilities.js +490 -0
- package/core/wfs-filter.d.ts +118 -0
- package/core/wfs-filter.d.ts.map +1 -0
- package/core/wfs-filter.js +634 -0
- package/core/wfs.d.ts +232 -0
- package/core/wfs.d.ts.map +1 -0
- package/core/wfs.js +426 -0
- package/core/wire-shared.d.ts +32 -0
- package/core/wire-shared.d.ts.map +1 -0
- package/core/wire-shared.js +76 -0
- package/core/wms-axis.d.ts +36 -0
- package/core/wms-axis.d.ts.map +1 -0
- package/core/wms-axis.js +73 -0
- package/core/wms-capabilities.d.ts +110 -0
- package/core/wms-capabilities.d.ts.map +1 -0
- package/core/wms-capabilities.js +559 -0
- package/core/wms-types.d.ts +128 -0
- package/core/wms-types.d.ts.map +1 -0
- package/core/wms-types.js +32 -0
- package/core/wms.d.ts +144 -0
- package/core/wms.d.ts.map +1 -0
- package/core/wms.js +338 -0
- package/core/wmts-capabilities.d.ts +82 -0
- package/core/wmts-capabilities.d.ts.map +1 -0
- package/core/wmts-capabilities.js +402 -0
- package/core/wmts.d.ts +103 -0
- package/core/wmts.d.ts.map +1 -0
- package/core/wmts.js +332 -0
- package/core/xml-text.d.ts +20 -0
- package/core/xml-text.d.ts.map +1 -0
- package/core/xml-text.js +85 -0
- package/esri-compat/basemap-gallery.d.ts +38 -0
- package/esri-compat/basemap-gallery.d.ts.map +1 -0
- package/esri-compat/basemap-gallery.js +159 -0
- package/esri-compat/basemap-layer-list.d.ts +35 -0
- package/esri-compat/basemap-layer-list.d.ts.map +1 -0
- package/esri-compat/basemap-layer-list.js +139 -0
- package/esri-compat/basemap.d.ts +32 -0
- package/esri-compat/basemap.d.ts.map +1 -0
- package/esri-compat/basemap.js +84 -0
- package/esri-compat/bookmarks.d.ts +36 -0
- package/esri-compat/bookmarks.d.ts.map +1 -0
- package/esri-compat/bookmarks.js +108 -0
- package/esri-compat/class-breaks-renderer.d.ts +50 -0
- package/esri-compat/class-breaks-renderer.d.ts.map +1 -0
- package/esri-compat/class-breaks-renderer.js +164 -0
- package/esri-compat/color.d.ts +22 -0
- package/esri-compat/color.d.ts.map +1 -0
- package/esri-compat/color.js +106 -0
- package/esri-compat/controls.d.ts +174 -0
- package/esri-compat/controls.d.ts.map +1 -0
- package/esri-compat/controls.js +479 -0
- package/esri-compat/coordinate-conversion.d.ts +41 -0
- package/esri-compat/coordinate-conversion.d.ts.map +1 -0
- package/esri-compat/coordinate-conversion.js +125 -0
- package/esri-compat/directions.d.ts +45 -0
- package/esri-compat/directions.d.ts.map +1 -0
- package/esri-compat/directions.js +123 -0
- package/esri-compat/editor.d.ts +47 -0
- package/esri-compat/editor.d.ts.map +1 -0
- package/esri-compat/editor.js +170 -0
- package/esri-compat/esri-config.d.ts +16 -0
- package/esri-compat/esri-config.d.ts.map +1 -0
- package/esri-compat/esri-config.js +23 -0
- package/esri-compat/esri-request.d.ts +17 -0
- package/esri-compat/esri-request.d.ts.map +1 -0
- package/esri-compat/esri-request.js +127 -0
- package/esri-compat/event-bus.d.ts +106 -0
- package/esri-compat/event-bus.d.ts.map +1 -0
- package/esri-compat/event-bus.js +90 -0
- package/esri-compat/expand.d.ts +36 -0
- package/esri-compat/expand.d.ts.map +1 -0
- package/esri-compat/expand.js +97 -0
- package/esri-compat/extent.d.ts +43 -0
- package/esri-compat/extent.d.ts.map +1 -0
- package/esri-compat/extent.js +140 -0
- package/esri-compat/feature-filter.d.ts +55 -0
- package/esri-compat/feature-filter.d.ts.map +1 -0
- package/esri-compat/feature-filter.js +109 -0
- package/esri-compat/feature-form.d.ts +64 -0
- package/esri-compat/feature-form.d.ts.map +1 -0
- package/esri-compat/feature-form.js +137 -0
- package/esri-compat/feature-layer.d.ts +173 -0
- package/esri-compat/feature-layer.d.ts.map +1 -0
- package/esri-compat/feature-layer.js +661 -0
- package/esri-compat/feature-set.d.ts +32 -0
- package/esri-compat/feature-set.d.ts.map +1 -0
- package/esri-compat/feature-set.js +80 -0
- package/esri-compat/feature-table.d.ts +141 -0
- package/esri-compat/feature-table.d.ts.map +1 -0
- package/esri-compat/feature-table.js +500 -0
- package/esri-compat/feature-templates.d.ts +41 -0
- package/esri-compat/feature-templates.d.ts.map +1 -0
- package/esri-compat/feature-templates.js +97 -0
- package/esri-compat/feature.d.ts +33 -0
- package/esri-compat/feature.d.ts.map +1 -0
- package/esri-compat/feature.js +83 -0
- package/esri-compat/geojson-layer.d.ts +86 -0
- package/esri-compat/geojson-layer.d.ts.map +1 -0
- package/esri-compat/geojson-layer.js +191 -0
- package/esri-compat/geometry-engine.d.ts +107 -0
- package/esri-compat/geometry-engine.d.ts.map +1 -0
- package/esri-compat/geometry-engine.js +266 -0
- package/esri-compat/graphic.d.ts +46 -0
- package/esri-compat/graphic.d.ts.map +1 -0
- package/esri-compat/graphic.js +103 -0
- package/esri-compat/graphics-layer.d.ts +49 -0
- package/esri-compat/graphics-layer.d.ts.map +1 -0
- package/esri-compat/graphics-layer.js +185 -0
- package/esri-compat/group-layer.d.ts +48 -0
- package/esri-compat/group-layer.d.ts.map +1 -0
- package/esri-compat/group-layer.js +212 -0
- package/esri-compat/identify.d.ts +71 -0
- package/esri-compat/identify.d.ts.map +1 -0
- package/esri-compat/identify.js +299 -0
- package/esri-compat/identity-manager.d.ts +74 -0
- package/esri-compat/identity-manager.d.ts.map +1 -0
- package/esri-compat/identity-manager.js +245 -0
- package/esri-compat/imagery-layer.d.ts +78 -0
- package/esri-compat/imagery-layer.d.ts.map +1 -0
- package/esri-compat/imagery-layer.js +167 -0
- package/esri-compat/label-class.d.ts +31 -0
- package/esri-compat/label-class.d.ts.map +1 -0
- package/esri-compat/label-class.js +102 -0
- package/esri-compat/layer-list.d.ts +77 -0
- package/esri-compat/layer-list.d.ts.map +1 -0
- package/esri-compat/layer-list.js +342 -0
- package/esri-compat/legend.d.ts +53 -0
- package/esri-compat/legend.d.ts.map +1 -0
- package/esri-compat/legend.js +254 -0
- package/esri-compat/map-image-layer.d.ts +162 -0
- package/esri-compat/map-image-layer.d.ts.map +1 -0
- package/esri-compat/map-image-layer.js +709 -0
- package/esri-compat/map-view.d.ts +323 -0
- package/esri-compat/map-view.d.ts.map +1 -0
- package/esri-compat/map-view.js +1175 -0
- package/esri-compat/map.d.ts +47 -0
- package/esri-compat/map.d.ts.map +1 -0
- package/esri-compat/map.js +209 -0
- package/esri-compat/measurement-2d.d.ts +61 -0
- package/esri-compat/measurement-2d.d.ts.map +1 -0
- package/esri-compat/measurement-2d.js +184 -0
- package/esri-compat/measurement.d.ts +45 -0
- package/esri-compat/measurement.d.ts.map +1 -0
- package/esri-compat/measurement.js +193 -0
- package/esri-compat/oauth-info.d.ts +50 -0
- package/esri-compat/oauth-info.d.ts.map +1 -0
- package/esri-compat/oauth-info.js +142 -0
- package/esri-compat/picture-marker-symbol.d.ts +35 -0
- package/esri-compat/picture-marker-symbol.d.ts.map +1 -0
- package/esri-compat/picture-marker-symbol.js +126 -0
- package/esri-compat/point.d.ts +31 -0
- package/esri-compat/point.d.ts.map +1 -0
- package/esri-compat/point.js +102 -0
- package/esri-compat/polygon.d.ts +31 -0
- package/esri-compat/polygon.d.ts.map +1 -0
- package/esri-compat/polygon.js +107 -0
- package/esri-compat/polyline.d.ts +31 -0
- package/esri-compat/polyline.d.ts.map +1 -0
- package/esri-compat/polyline.js +107 -0
- package/esri-compat/popup-template.d.ts +55 -0
- package/esri-compat/popup-template.d.ts.map +1 -0
- package/esri-compat/popup-template.js +128 -0
- package/esri-compat/popup.d.ts +54 -0
- package/esri-compat/popup.d.ts.map +1 -0
- package/esri-compat/popup.js +312 -0
- package/esri-compat/print.d.ts +47 -0
- package/esri-compat/print.d.ts.map +1 -0
- package/esri-compat/print.js +105 -0
- package/esri-compat/query.d.ts +58 -0
- package/esri-compat/query.d.ts.map +1 -0
- package/esri-compat/query.js +128 -0
- package/esri-compat/reactive-utils.d.ts +24 -0
- package/esri-compat/reactive-utils.d.ts.map +1 -0
- package/esri-compat/reactive-utils.js +193 -0
- package/esri-compat/request.d.ts +41 -0
- package/esri-compat/request.d.ts.map +1 -0
- package/esri-compat/request.js +253 -0
- package/esri-compat/route-layer.d.ts +59 -0
- package/esri-compat/route-layer.d.ts.map +1 -0
- package/esri-compat/route-layer.js +223 -0
- package/esri-compat/route-task.d.ts +88 -0
- package/esri-compat/route-task.d.ts.map +1 -0
- package/esri-compat/route-task.js +225 -0
- package/esri-compat/scene-view.d.ts +41 -0
- package/esri-compat/scene-view.d.ts.map +1 -0
- package/esri-compat/scene-view.js +68 -0
- package/esri-compat/search.d.ts +112 -0
- package/esri-compat/search.d.ts.map +1 -0
- package/esri-compat/search.js +820 -0
- package/esri-compat/simple-fill-symbol.d.ts +27 -0
- package/esri-compat/simple-fill-symbol.d.ts.map +1 -0
- package/esri-compat/simple-fill-symbol.js +85 -0
- package/esri-compat/simple-line-symbol.d.ts +27 -0
- package/esri-compat/simple-line-symbol.d.ts.map +1 -0
- package/esri-compat/simple-line-symbol.js +85 -0
- package/esri-compat/simple-marker-symbol.d.ts +29 -0
- package/esri-compat/simple-marker-symbol.d.ts.map +1 -0
- package/esri-compat/simple-marker-symbol.js +92 -0
- package/esri-compat/simple-renderer.d.ts +29 -0
- package/esri-compat/simple-renderer.d.ts.map +1 -0
- package/esri-compat/simple-renderer.js +92 -0
- package/esri-compat/sketch.d.ts +64 -0
- package/esri-compat/sketch.d.ts.map +1 -0
- package/esri-compat/sketch.js +227 -0
- package/esri-compat/spatial-reference.d.ts +31 -0
- package/esri-compat/spatial-reference.d.ts.map +1 -0
- package/esri-compat/spatial-reference.js +102 -0
- package/esri-compat/swipe.d.ts +34 -0
- package/esri-compat/swipe.d.ts.map +1 -0
- package/esri-compat/swipe.js +93 -0
- package/esri-compat/table-list.d.ts +36 -0
- package/esri-compat/table-list.d.ts.map +1 -0
- package/esri-compat/table-list.js +126 -0
- package/esri-compat/text-symbol.d.ts +37 -0
- package/esri-compat/text-symbol.d.ts.map +1 -0
- package/esri-compat/text-symbol.js +123 -0
- package/esri-compat/tile-layer.d.ts +52 -0
- package/esri-compat/tile-layer.d.ts.map +1 -0
- package/esri-compat/tile-layer.js +168 -0
- package/esri-compat/time-slider.d.ts +70 -0
- package/esri-compat/time-slider.d.ts.map +1 -0
- package/esri-compat/time-slider.js +208 -0
- package/esri-compat/track.d.ts +51 -0
- package/esri-compat/track.d.ts.map +1 -0
- package/esri-compat/track.js +174 -0
- package/esri-compat/unique-value-renderer.d.ts +41 -0
- package/esri-compat/unique-value-renderer.d.ts.map +1 -0
- package/esri-compat/unique-value-renderer.js +127 -0
- package/esri-compat/url.d.ts +13 -0
- package/esri-compat/url.d.ts.map +1 -0
- package/esri-compat/url.js +68 -0
- package/esri-compat/vector-tile-layer.d.ts +47 -0
- package/esri-compat/vector-tile-layer.d.ts.map +1 -0
- package/esri-compat/vector-tile-layer.js +130 -0
- package/esri-compat/web-map.d.ts +14 -0
- package/esri-compat/web-map.d.ts.map +1 -0
- package/esri-compat/web-map.js +24 -0
- package/esri-compat/wfs-layer.d.ts +64 -0
- package/esri-compat/wfs-layer.d.ts.map +1 -0
- package/esri-compat/wfs-layer.js +145 -0
- package/esri-compat/wms-layer.d.ts +76 -0
- package/esri-compat/wms-layer.d.ts.map +1 -0
- package/esri-compat/wms-layer.js +157 -0
- package/exploration/context.d.ts +25 -0
- package/exploration/context.d.ts.map +1 -0
- package/exploration/context.js +396 -0
- package/exploration/index.d.ts +27 -0
- package/exploration/index.d.ts.map +1 -0
- package/exploration/index.js +24 -0
- package/exploration/presets.d.ts +27 -0
- package/exploration/presets.d.ts.map +1 -0
- package/exploration/presets.js +114 -0
- package/exploration/reducer.d.ts +23 -0
- package/exploration/reducer.d.ts.map +1 -0
- package/exploration/reducer.js +332 -0
- package/exploration/selection.d.ts +25 -0
- package/exploration/selection.d.ts.map +1 -0
- package/exploration/selection.js +34 -0
- package/exploration/selectors.d.ts +56 -0
- package/exploration/selectors.d.ts.map +1 -0
- package/exploration/selectors.js +110 -0
- package/exploration/types.d.ts +294 -0
- package/exploration/types.d.ts.map +1 -0
- package/exploration/types.js +33 -0
- package/expr/expression.d.ts +457 -0
- package/expr/expression.d.ts.map +1 -0
- package/expr/expression.js +663 -0
- package/expr/index.d.ts +32 -0
- package/expr/index.d.ts.map +1 -0
- package/expr/index.js +30 -0
- package/filter-registry/index.d.ts +145 -0
- package/filter-registry/index.d.ts.map +1 -0
- package/filter-registry/index.js +531 -0
- package/gen/honua/v1/feature_service_pb.d.ts +918 -0
- package/gen/honua/v1/feature_service_pb.d.ts.map +1 -0
- package/gen/honua/v1/feature_service_pb.js +375 -0
- package/generated-app/errors.d.ts +41 -0
- package/generated-app/errors.d.ts.map +1 -0
- package/generated-app/errors.js +41 -0
- package/generated-app/index.d.ts +17 -0
- package/generated-app/index.d.ts.map +1 -0
- package/generated-app/index.js +12 -0
- package/generated-app/manifest.d.ts +183 -0
- package/generated-app/manifest.d.ts.map +1 -0
- package/generated-app/manifest.js +14 -0
- package/generated-app/projection.d.ts +44 -0
- package/generated-app/projection.d.ts.map +1 -0
- package/generated-app/projection.js +234 -0
- package/generated-app/runtime.d.ts +215 -0
- package/generated-app/runtime.d.ts.map +1 -0
- package/generated-app/runtime.js +1196 -0
- package/geocoding/index.d.ts +106 -0
- package/geocoding/index.d.ts.map +1 -0
- package/geocoding/index.js +278 -0
- package/interactions/detail-model.d.ts +54 -0
- package/interactions/detail-model.d.ts.map +1 -0
- package/interactions/detail-model.js +105 -0
- package/interactions/exploration-bindings.d.ts +120 -0
- package/interactions/exploration-bindings.d.ts.map +1 -0
- package/interactions/exploration-bindings.js +218 -0
- package/interactions/feature-state.d.ts +144 -0
- package/interactions/feature-state.d.ts.map +1 -0
- package/interactions/feature-state.js +169 -0
- package/interactions/hit-test.d.ts +112 -0
- package/interactions/hit-test.d.ts.map +1 -0
- package/interactions/hit-test.js +291 -0
- package/interactions/index.d.ts +31 -0
- package/interactions/index.d.ts.map +1 -0
- package/interactions/index.js +24 -0
- package/interactions/share-state.d.ts +36 -0
- package/interactions/share-state.d.ts.map +1 -0
- package/interactions/share-state.js +123 -0
- package/map/feature-service-adapter.d.ts +138 -0
- package/map/feature-service-adapter.d.ts.map +1 -0
- package/map/feature-service-adapter.js +279 -0
- package/map/honua-map.d.ts +203 -0
- package/map/honua-map.d.ts.map +1 -0
- package/map/honua-map.js +347 -0
- package/map/index.d.ts +27 -0
- package/map/index.d.ts.map +1 -0
- package/map/index.js +22 -0
- package/map/maplibre-target.d.ts +103 -0
- package/map/maplibre-target.d.ts.map +1 -0
- package/map/maplibre-target.js +164 -0
- package/map/webmap-maplibre.d.ts +60 -0
- package/map/webmap-maplibre.d.ts.map +1 -0
- package/map/webmap-maplibre.js +212 -0
- package/operate/client.d.ts +94 -0
- package/operate/client.d.ts.map +1 -0
- package/operate/client.js +361 -0
- package/operate/index.d.ts +22 -0
- package/operate/index.d.ts.map +1 -0
- package/operate/index.js +19 -0
- package/operate/types.d.ts +397 -0
- package/operate/types.d.ts.map +1 -0
- package/operate/types.js +17 -0
- package/operator/client.d.ts +60 -0
- package/operator/client.d.ts.map +1 -0
- package/operator/client.js +20 -0
- package/operator/controllers/approval.d.ts +52 -0
- package/operator/controllers/approval.d.ts.map +1 -0
- package/operator/controllers/approval.js +123 -0
- package/operator/controllers/base.d.ts +27 -0
- package/operator/controllers/base.d.ts.map +1 -0
- package/operator/controllers/base.js +53 -0
- package/operator/controllers/builder-workspace.d.ts +55 -0
- package/operator/controllers/builder-workspace.d.ts.map +1 -0
- package/operator/controllers/builder-workspace.js +108 -0
- package/operator/controllers/chat.d.ts +61 -0
- package/operator/controllers/chat.d.ts.map +1 -0
- package/operator/controllers/chat.js +154 -0
- package/operator/controllers/clarification.d.ts +52 -0
- package/operator/controllers/clarification.d.ts.map +1 -0
- package/operator/controllers/clarification.js +121 -0
- package/operator/controllers/execution.d.ts +60 -0
- package/operator/controllers/execution.d.ts.map +1 -0
- package/operator/controllers/execution.js +286 -0
- package/operator/controllers/index.d.ts +23 -0
- package/operator/controllers/index.d.ts.map +1 -0
- package/operator/controllers/index.js +15 -0
- package/operator/controllers/map-workspace.d.ts +85 -0
- package/operator/controllers/map-workspace.d.ts.map +1 -0
- package/operator/controllers/map-workspace.js +296 -0
- package/operator/controllers/plan-review.d.ts +66 -0
- package/operator/controllers/plan-review.d.ts.map +1 -0
- package/operator/controllers/plan-review.js +124 -0
- package/operator/errors.d.ts +62 -0
- package/operator/errors.d.ts.map +1 -0
- package/operator/errors.js +75 -0
- package/operator/i18n/index.d.ts +10 -0
- package/operator/i18n/index.d.ts.map +1 -0
- package/operator/i18n/index.js +8 -0
- package/operator/i18n/messages.d.ts +19 -0
- package/operator/i18n/messages.d.ts.map +1 -0
- package/operator/i18n/messages.js +54 -0
- package/operator/index.d.ts +19 -0
- package/operator/index.d.ts.map +1 -0
- package/operator/index.js +15 -0
- package/operator/telemetry.d.ts +26 -0
- package/operator/telemetry.d.ts.map +1 -0
- package/operator/telemetry.js +9 -0
- package/operator/theming/index.d.ts +12 -0
- package/operator/theming/index.d.ts.map +1 -0
- package/operator/theming/index.js +9 -0
- package/operator/theming/provider.d.ts +27 -0
- package/operator/theming/provider.d.ts.map +1 -0
- package/operator/theming/provider.js +26 -0
- package/operator/theming/tokens.d.ts +28 -0
- package/operator/theming/tokens.d.ts.map +1 -0
- package/operator/theming/tokens.js +65 -0
- package/operator/workspace/events.d.ts +70 -0
- package/operator/workspace/events.d.ts.map +1 -0
- package/operator/workspace/events.js +9 -0
- package/operator/workspace/index.d.ts +12 -0
- package/operator/workspace/index.d.ts.map +1 -0
- package/operator/workspace/index.js +8 -0
- package/operator/workspace/types.d.ts +178 -0
- package/operator/workspace/types.d.ts.map +1 -0
- package/operator/workspace/types.js +47 -0
- package/operator/workspace/workspace.d.ts +58 -0
- package/operator/workspace/workspace.d.ts.map +1 -0
- package/operator/workspace/workspace.js +339 -0
- package/package.json +105 -0
- package/realtime/exploration.d.ts +16 -0
- package/realtime/exploration.d.ts.map +1 -0
- package/realtime/exploration.js +32 -0
- package/realtime/honua-server.d.ts +123 -0
- package/realtime/honua-server.d.ts.map +1 -0
- package/realtime/honua-server.js +188 -0
- package/realtime/index.d.ts +20 -0
- package/realtime/index.d.ts.map +1 -0
- package/realtime/index.js +14 -0
- package/realtime/projections.d.ts +30 -0
- package/realtime/projections.d.ts.map +1 -0
- package/realtime/projections.js +51 -0
- package/realtime/reducer.d.ts +14 -0
- package/realtime/reducer.d.ts.map +1 -0
- package/realtime/reducer.js +351 -0
- package/realtime/sse.d.ts +23 -0
- package/realtime/sse.d.ts.map +1 -0
- package/realtime/sse.js +143 -0
- package/realtime/store.d.ts +18 -0
- package/realtime/store.d.ts.map +1 -0
- package/realtime/store.js +63 -0
- package/realtime/types.d.ts +190 -0
- package/realtime/types.d.ts.map +1 -0
- package/realtime/types.js +10 -0
- package/replica-sync/client.d.ts +32 -0
- package/replica-sync/client.d.ts.map +1 -0
- package/replica-sync/client.js +52 -0
- package/replica-sync/errors.d.ts +22 -0
- package/replica-sync/errors.d.ts.map +1 -0
- package/replica-sync/errors.js +29 -0
- package/replica-sync/fixture.d.ts +40 -0
- package/replica-sync/fixture.d.ts.map +1 -0
- package/replica-sync/fixture.js +364 -0
- package/replica-sync/index.d.ts +22 -0
- package/replica-sync/index.d.ts.map +1 -0
- package/replica-sync/index.js +17 -0
- package/replica-sync/types.d.ts +270 -0
- package/replica-sync/types.d.ts.map +1 -0
- package/replica-sync/types.js +13 -0
- package/runtime/diff.d.ts +31 -0
- package/runtime/diff.d.ts.map +1 -0
- package/runtime/diff.js +143 -0
- package/runtime/errors.d.ts +40 -0
- package/runtime/errors.d.ts.map +1 -0
- package/runtime/errors.js +35 -0
- package/runtime/index.d.ts +59 -0
- package/runtime/index.d.ts.map +1 -0
- package/runtime/index.js +40 -0
- package/runtime/legend.d.ts +23 -0
- package/runtime/legend.d.ts.map +1 -0
- package/runtime/legend.js +38 -0
- package/runtime/load-package.d.ts +125 -0
- package/runtime/load-package.d.ts.map +1 -0
- package/runtime/load-package.js +272 -0
- package/runtime/map-package-fetch.d.ts +107 -0
- package/runtime/map-package-fetch.d.ts.map +1 -0
- package/runtime/map-package-fetch.js +336 -0
- package/runtime/map-package-realtime.d.ts +169 -0
- package/runtime/map-package-realtime.d.ts.map +1 -0
- package/runtime/map-package-realtime.js +350 -0
- package/runtime/map-package-validation.d.ts +30 -0
- package/runtime/map-package-validation.d.ts.map +1 -0
- package/runtime/map-package-validation.js +257 -0
- package/runtime/map-package-watch.d.ts +78 -0
- package/runtime/map-package-watch.d.ts.map +1 -0
- package/runtime/map-package-watch.js +695 -0
- package/runtime/map-package.d.ts +167 -0
- package/runtime/map-package.d.ts.map +1 -0
- package/runtime/map-package.js +15 -0
- package/runtime/ogc-styles.d.ts +110 -0
- package/runtime/ogc-styles.d.ts.map +1 -0
- package/runtime/ogc-styles.js +195 -0
- package/runtime/pmtiles-protocol.d.ts +77 -0
- package/runtime/pmtiles-protocol.d.ts.map +1 -0
- package/runtime/pmtiles-protocol.js +120 -0
- package/runtime/popups.d.ts +62 -0
- package/runtime/popups.d.ts.map +1 -0
- package/runtime/popups.js +95 -0
- package/runtime/query-tiles.d.ts +217 -0
- package/runtime/query-tiles.d.ts.map +1 -0
- package/runtime/query-tiles.js +801 -0
- package/runtime/runtime.d.ts +243 -0
- package/runtime/runtime.d.ts.map +1 -0
- package/runtime/runtime.js +1147 -0
- package/runtime/source-bridge.d.ts +99 -0
- package/runtime/source-bridge.d.ts.map +1 -0
- package/runtime/source-bridge.js +428 -0
- package/runtime/style-compose.d.ts +46 -0
- package/runtime/style-compose.d.ts.map +1 -0
- package/runtime/style-compose.js +144 -0
- package/runtime/style-interactions.d.ts +141 -0
- package/runtime/style-interactions.d.ts.map +1 -0
- package/runtime/style-interactions.js +574 -0
- package/runtime/style-spec-validation.d.ts +23 -0
- package/runtime/style-spec-validation.d.ts.map +1 -0
- package/runtime/style-spec-validation.js +357 -0
- package/scene-workspace/analysis-widgets.d.ts +334 -0
- package/scene-workspace/analysis-widgets.d.ts.map +1 -0
- package/scene-workspace/analysis-widgets.js +424 -0
- package/scene-workspace/cesium-adapter.d.ts +438 -0
- package/scene-workspace/cesium-adapter.d.ts.map +1 -0
- package/scene-workspace/cesium-adapter.js +493 -0
- package/scene-workspace/index.d.ts +21 -0
- package/scene-workspace/index.d.ts.map +1 -0
- package/scene-workspace/index.js +14 -0
- package/scene-workspace/primitives.d.ts +162 -0
- package/scene-workspace/primitives.d.ts.map +1 -0
- package/scene-workspace/primitives.js +255 -0
- package/scene-workspace/scene-discovery.d.ts +196 -0
- package/scene-workspace/scene-discovery.d.ts.map +1 -0
- package/scene-workspace/scene-discovery.js +228 -0
- package/scene-workspace/scene-view.d.ts +209 -0
- package/scene-workspace/scene-view.d.ts.map +1 -0
- package/scene-workspace/scene-view.js +267 -0
- package/scene-workspace/types.d.ts +229 -0
- package/scene-workspace/types.d.ts.map +1 -0
- package/scene-workspace/types.js +23 -0
- package/scene-workspace/workspace.d.ts +13 -0
- package/scene-workspace/workspace.d.ts.map +1 -0
- package/scene-workspace/workspace.js +391 -0
- package/share/denial.d.ts +78 -0
- package/share/denial.d.ts.map +1 -0
- package/share/denial.js +61 -0
- package/share/embed-token.d.ts +71 -0
- package/share/embed-token.d.ts.map +1 -0
- package/share/embed-token.js +99 -0
- package/share/index.d.ts +35 -0
- package/share/index.d.ts.map +1 -0
- package/share/index.js +30 -0
- package/share/open-data.d.ts +114 -0
- package/share/open-data.d.ts.map +1 -0
- package/share/open-data.js +81 -0
- package/share/types.d.ts +163 -0
- package/share/types.d.ts.map +1 -0
- package/share/types.js +17 -0
- package/studio/capability-manifest.d.ts +285 -0
- package/studio/capability-manifest.d.ts.map +1 -0
- package/studio/capability-manifest.js +59 -0
- package/studio/chart-spec.d.ts +85 -0
- package/studio/chart-spec.d.ts.map +1 -0
- package/studio/chart-spec.js +106 -0
- package/studio/index.d.ts +34 -0
- package/studio/index.d.ts.map +1 -0
- package/studio/index.js +27 -0
- package/studio/provenance.d.ts +131 -0
- package/studio/provenance.d.ts.map +1 -0
- package/studio/provenance.js +39 -0
- package/studio/publish.d.ts +64 -0
- package/studio/publish.d.ts.map +1 -0
- package/studio/publish.js +13 -0
- package/studio/types.d.ts +278 -0
- package/studio/types.d.ts.map +1 -0
- package/studio/types.js +71 -0
- package/studio/validate.d.ts +45 -0
- package/studio/validate.d.ts.map +1 -0
- package/studio/validate.js +255 -0
- package/studio/validation.d.ts +112 -0
- package/studio/validation.d.ts.map +1 -0
- package/studio/validation.js +42 -0
- package/style/factory.d.ts +30 -0
- package/style/factory.d.ts.map +1 -0
- package/style/factory.js +61 -0
- package/style/index.d.ts +25 -0
- package/style/index.d.ts.map +1 -0
- package/style/index.js +24 -0
- package/style/specification.d.ts +203 -0
- package/style/specification.d.ts.map +1 -0
- package/style/specification.js +178 -0
- package/style/wms-wmts-resolvers.d.ts +38 -0
- package/style/wms-wmts-resolvers.d.ts.map +1 -0
- package/style/wms-wmts-resolvers.js +92 -0
- package/web-components/controller.d.ts +39 -0
- package/web-components/controller.d.ts.map +1 -0
- package/web-components/controller.js +640 -0
- package/web-components/elements.d.ts +210 -0
- package/web-components/elements.d.ts.map +1 -0
- package/web-components/elements.js +1651 -0
- package/web-components/index.d.ts +24 -0
- package/web-components/index.d.ts.map +1 -0
- package/web-components/index.js +22 -0
- package/web-components/maplibre-renderer.d.ts +22 -0
- package/web-components/maplibre-renderer.d.ts.map +1 -0
- package/web-components/maplibre-renderer.js +474 -0
- package/web-components/types.d.ts +397 -0
- package/web-components/types.d.ts.map +1 -0
- package/web-components/types.js +1 -0
- package/webmap/contract.d.ts +28 -0
- package/webmap/contract.d.ts.map +1 -0
- package/webmap/contract.js +130 -0
- package/webmap/convert-basemap.d.ts +17 -0
- package/webmap/convert-basemap.d.ts.map +1 -0
- package/webmap/convert-basemap.js +78 -0
- package/webmap/convert-extent.d.ts +17 -0
- package/webmap/convert-extent.d.ts.map +1 -0
- package/webmap/convert-extent.js +114 -0
- package/webmap/convert-label.d.ts +13 -0
- package/webmap/convert-label.d.ts.map +1 -0
- package/webmap/convert-label.js +125 -0
- package/webmap/convert-layer.d.ts +22 -0
- package/webmap/convert-layer.d.ts.map +1 -0
- package/webmap/convert-layer.js +181 -0
- package/webmap/convert-popup.d.ts +34 -0
- package/webmap/convert-popup.d.ts.map +1 -0
- package/webmap/convert-popup.js +68 -0
- package/webmap/convert-renderer.d.ts +17 -0
- package/webmap/convert-renderer.d.ts.map +1 -0
- package/webmap/convert-renderer.js +161 -0
- package/webmap/convert-symbol.d.ts +17 -0
- package/webmap/convert-symbol.d.ts.map +1 -0
- package/webmap/convert-symbol.js +122 -0
- package/webmap/index.d.ts +44 -0
- package/webmap/index.d.ts.map +1 -0
- package/webmap/index.js +33 -0
- package/webmap/parse.d.ts +25 -0
- package/webmap/parse.d.ts.map +1 -0
- package/webmap/parse.js +83 -0
- package/webmap/types.d.ts +264 -0
- package/webmap/types.d.ts.map +1 -0
- package/webmap/types.js +13 -0
- package/webmap/warnings.d.ts +30 -0
- package/webmap/warnings.d.ts.map +1 -0
- package/webmap/warnings.js +37 -0
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `<honua-swipe-control>` — framework-free custom element implementing the
|
|
3
|
+
* dual-map "swipe"/compare trick (issue #279, candidate third control for the
|
|
4
|
+
* native kit, #274).
|
|
5
|
+
*
|
|
6
|
+
* Two MapLibre maps are stacked (the host positions them; the control does
|
|
7
|
+
* not own layout) and the control clips the **top** map against the **bottom**
|
|
8
|
+
* map along a draggable divider via CSS `clip-path`. Dragging the divider (or
|
|
9
|
+
* using the keyboard) reveals more or less of each map and emits a `change`
|
|
10
|
+
* event with the divider position.
|
|
11
|
+
*
|
|
12
|
+
* Like the other controls, this element imports nothing from `maplibre-gl` or
|
|
13
|
+
* the SDK core — it drives any MapLibre `Map` through the duck-typed
|
|
14
|
+
* {@link HonuaSwipeMap} interface (it only needs `getContainer()`), so the
|
|
15
|
+
* `@honua/sdk-js/controls` entry stays bundle-independent. Node imports are
|
|
16
|
+
* safe; the element no-ops without a DOM.
|
|
17
|
+
*
|
|
18
|
+
* ## Wiring
|
|
19
|
+
* - `element.topMap = map` / `element.bottomMap = map`, or
|
|
20
|
+
* `element.connect(topMap, bottomMap)`. The top map is the one that gets
|
|
21
|
+
* clipped; the bottom map shows through the revealed region.
|
|
22
|
+
*
|
|
23
|
+
* ## Attributes
|
|
24
|
+
* - `position` — divider position as a percentage 0–100 (default 50).
|
|
25
|
+
* - `orientation` — `"vertical"` (default) or `"horizontal"`.
|
|
26
|
+
* - `label` — accessible name of the divider (default "Compare maps").
|
|
27
|
+
*
|
|
28
|
+
* ## Events
|
|
29
|
+
* - `change` — `CustomEvent<HonuaSwipeChangeDetail>` (bubbles, composed)
|
|
30
|
+
* whenever the divider position changes: drag, keyboard, or programmatic
|
|
31
|
+
* `position` assignment.
|
|
32
|
+
*
|
|
33
|
+
* ## CSS parts
|
|
34
|
+
* - `divider` — the full-length divider line.
|
|
35
|
+
* - `handle` — the draggable grip on the divider.
|
|
36
|
+
*
|
|
37
|
+
* ## Accessibility
|
|
38
|
+
* The divider is an ARIA slider (`role="slider"`, `aria-valuenow/min/max`,
|
|
39
|
+
* `aria-orientation`) with arrow-key control (ArrowLeft/ArrowRight or
|
|
40
|
+
* ArrowUp/ArrowDown step by 1, Home/End jump to 0/100, with Shift = 10).
|
|
41
|
+
*
|
|
42
|
+
* @module
|
|
43
|
+
*/
|
|
44
|
+
import { HTMLElementBase, escapeAttribute, globalDom } from "./element-utils.js";
|
|
45
|
+
const DEFAULT_POSITION = 50;
|
|
46
|
+
const STEP = 1;
|
|
47
|
+
const STEP_LARGE = 10;
|
|
48
|
+
/**
|
|
49
|
+
* Custom element implementing the dual-map swipe/compare divider. Registered
|
|
50
|
+
* as `honua-swipe-control` by {@link defineHonuaSwipeControl} (which runs
|
|
51
|
+
* automatically on import when a `customElements` registry exists).
|
|
52
|
+
*/
|
|
53
|
+
export class HonuaSwipeControlElement extends HTMLElementBase {
|
|
54
|
+
static get observedAttributes() {
|
|
55
|
+
return ["position", "orientation", "label"];
|
|
56
|
+
}
|
|
57
|
+
#topMap;
|
|
58
|
+
#bottomMap;
|
|
59
|
+
#position = DEFAULT_POSITION;
|
|
60
|
+
#rendered = false;
|
|
61
|
+
#dragging = false;
|
|
62
|
+
#disposeDrag;
|
|
63
|
+
/** The clipped (overlay) map. Reapplies the clip when assigned. */
|
|
64
|
+
get topMap() {
|
|
65
|
+
return this.#topMap;
|
|
66
|
+
}
|
|
67
|
+
set topMap(map) {
|
|
68
|
+
this.#clearClip(this.#topMap);
|
|
69
|
+
this.#topMap = map;
|
|
70
|
+
this.#applyClip();
|
|
71
|
+
}
|
|
72
|
+
/** The underlying map revealed by the clip. */
|
|
73
|
+
get bottomMap() {
|
|
74
|
+
return this.#bottomMap;
|
|
75
|
+
}
|
|
76
|
+
set bottomMap(map) {
|
|
77
|
+
this.#bottomMap = map;
|
|
78
|
+
}
|
|
79
|
+
/** Wires both maps at once. The first map is clipped against the second. */
|
|
80
|
+
connect(topMap, bottomMap) {
|
|
81
|
+
this.topMap = topMap;
|
|
82
|
+
if (bottomMap)
|
|
83
|
+
this.bottomMap = bottomMap;
|
|
84
|
+
}
|
|
85
|
+
/** Divider position as a percentage 0–100. Reflects the `position` attribute. */
|
|
86
|
+
get position() {
|
|
87
|
+
return this.#position;
|
|
88
|
+
}
|
|
89
|
+
set position(value) {
|
|
90
|
+
this.#setPosition(value, true);
|
|
91
|
+
}
|
|
92
|
+
/** Divider orientation. Reflects the `orientation` attribute. */
|
|
93
|
+
get orientation() {
|
|
94
|
+
return this.#attr("orientation") === "horizontal" ? "horizontal" : "vertical";
|
|
95
|
+
}
|
|
96
|
+
set orientation(value) {
|
|
97
|
+
if (typeof this.setAttribute !== "function")
|
|
98
|
+
return;
|
|
99
|
+
this.setAttribute("orientation", value === "horizontal" ? "horizontal" : "vertical");
|
|
100
|
+
}
|
|
101
|
+
attributeChangedCallback(name, _oldValue, newValue) {
|
|
102
|
+
if (name === "position") {
|
|
103
|
+
const parsed = newValue === null ? DEFAULT_POSITION : Number(newValue);
|
|
104
|
+
if (Number.isFinite(parsed))
|
|
105
|
+
this.#setPosition(parsed, false);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
if (name === "orientation") {
|
|
109
|
+
this.#updateDividerDom();
|
|
110
|
+
this.#applyClip();
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
if (name === "label") {
|
|
114
|
+
this.#updateDividerDom();
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
connectedCallback() {
|
|
118
|
+
this.#ensureShadowRoot();
|
|
119
|
+
this.render();
|
|
120
|
+
this.#applyClip();
|
|
121
|
+
}
|
|
122
|
+
disconnectedCallback() {
|
|
123
|
+
this.#disposeDrag?.();
|
|
124
|
+
this.#disposeDrag = undefined;
|
|
125
|
+
}
|
|
126
|
+
// ── position ───────────────────────────────────────────────
|
|
127
|
+
#setPosition(value, fromProperty) {
|
|
128
|
+
const next = clampPercent(value);
|
|
129
|
+
const changed = next !== this.#position;
|
|
130
|
+
this.#position = next;
|
|
131
|
+
if (fromProperty)
|
|
132
|
+
this.#reflectPosition(next);
|
|
133
|
+
this.#updateDividerDom();
|
|
134
|
+
this.#applyClip();
|
|
135
|
+
if (changed)
|
|
136
|
+
this.#dispatchChange();
|
|
137
|
+
}
|
|
138
|
+
// ── clip-path application ──────────────────────────────────
|
|
139
|
+
#applyClip() {
|
|
140
|
+
const container = this.#topMap?.getContainer?.();
|
|
141
|
+
if (!container?.style)
|
|
142
|
+
return;
|
|
143
|
+
const pct = `${this.#position}%`;
|
|
144
|
+
// Reveal the top map only on the trailing side of the divider so the
|
|
145
|
+
// bottom map shows through on the leading side.
|
|
146
|
+
container.style.clipPath =
|
|
147
|
+
this.orientation === "horizontal"
|
|
148
|
+
? `inset(${pct} 0 0 0)` // hide the top portion above the divider
|
|
149
|
+
: `inset(0 0 0 ${pct})`; // hide the left portion before the divider
|
|
150
|
+
}
|
|
151
|
+
#clearClip(map) {
|
|
152
|
+
const container = map?.getContainer?.();
|
|
153
|
+
if (container?.style)
|
|
154
|
+
container.style.clipPath = "";
|
|
155
|
+
}
|
|
156
|
+
// ── rendering ──────────────────────────────────────────────
|
|
157
|
+
#ensureShadowRoot() {
|
|
158
|
+
if (!this.shadowRoot && typeof this.attachShadow === "function") {
|
|
159
|
+
this.attachShadow({ mode: "open" });
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
render() {
|
|
163
|
+
const root = this.shadowRoot;
|
|
164
|
+
if (!root)
|
|
165
|
+
return;
|
|
166
|
+
if (this.#rendered) {
|
|
167
|
+
this.#updateDividerDom();
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
root.innerHTML = `
|
|
171
|
+
<style>${structuralStyles()}</style>
|
|
172
|
+
<div
|
|
173
|
+
part="divider"
|
|
174
|
+
class="divider"
|
|
175
|
+
role="slider"
|
|
176
|
+
tabindex="0"
|
|
177
|
+
aria-valuemin="0"
|
|
178
|
+
aria-valuemax="100"
|
|
179
|
+
aria-valuenow="${this.#position}"
|
|
180
|
+
aria-orientation="${this.orientation}"
|
|
181
|
+
aria-label="${escapeAttribute(this.#label())}"
|
|
182
|
+
>
|
|
183
|
+
<span part="handle" class="handle" aria-hidden="true"></span>
|
|
184
|
+
</div>
|
|
185
|
+
`;
|
|
186
|
+
this.#rendered = true;
|
|
187
|
+
this.#bindDivider(root);
|
|
188
|
+
this.#updateDividerDom();
|
|
189
|
+
}
|
|
190
|
+
#divider() {
|
|
191
|
+
const root = this.shadowRoot;
|
|
192
|
+
if (!root || typeof root.querySelector !== "function")
|
|
193
|
+
return null;
|
|
194
|
+
return root.querySelector(".divider");
|
|
195
|
+
}
|
|
196
|
+
#updateDividerDom() {
|
|
197
|
+
const divider = this.#divider();
|
|
198
|
+
if (!divider?.style)
|
|
199
|
+
return;
|
|
200
|
+
const pct = `${this.#position}%`;
|
|
201
|
+
if (this.orientation === "horizontal") {
|
|
202
|
+
divider.style.left = "0";
|
|
203
|
+
divider.style.top = pct;
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
divider.style.top = "0";
|
|
207
|
+
divider.style.left = pct;
|
|
208
|
+
}
|
|
209
|
+
divider.classList?.toggle("divider-horizontal", this.orientation === "horizontal");
|
|
210
|
+
divider.setAttribute?.("aria-valuenow", String(this.#position));
|
|
211
|
+
divider.setAttribute?.("aria-orientation", this.orientation);
|
|
212
|
+
divider.setAttribute?.("aria-label", this.#label());
|
|
213
|
+
}
|
|
214
|
+
// ── interaction ────────────────────────────────────────────
|
|
215
|
+
#bindDivider(root) {
|
|
216
|
+
const divider = root.querySelector(".divider");
|
|
217
|
+
if (!divider)
|
|
218
|
+
return;
|
|
219
|
+
divider.addEventListener("pointerdown", (event) => this.#onPointerDown(event));
|
|
220
|
+
divider.addEventListener("keydown", (event) => this.#onKeyDown(event));
|
|
221
|
+
}
|
|
222
|
+
#onPointerDown(event) {
|
|
223
|
+
if (typeof this.getBoundingClientRect !== "function")
|
|
224
|
+
return;
|
|
225
|
+
this.#dragging = true;
|
|
226
|
+
const divider = this.#divider();
|
|
227
|
+
divider?.setPointerCapture?.(event.pointerId);
|
|
228
|
+
event.preventDefault?.();
|
|
229
|
+
const move = (moveEvent) => {
|
|
230
|
+
if (this.#dragging)
|
|
231
|
+
this.#setPositionFromPointer(moveEvent);
|
|
232
|
+
};
|
|
233
|
+
const up = (upEvent) => {
|
|
234
|
+
this.#dragging = false;
|
|
235
|
+
divider?.releasePointerCapture?.(upEvent.pointerId);
|
|
236
|
+
this.#disposeDrag?.();
|
|
237
|
+
this.#disposeDrag = undefined;
|
|
238
|
+
};
|
|
239
|
+
const owner = divider ?? this;
|
|
240
|
+
owner.addEventListener("pointermove", move);
|
|
241
|
+
owner.addEventListener("pointerup", up);
|
|
242
|
+
owner.addEventListener("pointercancel", up);
|
|
243
|
+
this.#disposeDrag = () => {
|
|
244
|
+
owner.removeEventListener("pointermove", move);
|
|
245
|
+
owner.removeEventListener("pointerup", up);
|
|
246
|
+
owner.removeEventListener("pointercancel", up);
|
|
247
|
+
};
|
|
248
|
+
this.#setPositionFromPointer(event);
|
|
249
|
+
}
|
|
250
|
+
#setPositionFromPointer(event) {
|
|
251
|
+
const rect = this.getBoundingClientRect();
|
|
252
|
+
if (!rect)
|
|
253
|
+
return;
|
|
254
|
+
const ratio = this.orientation === "horizontal"
|
|
255
|
+
? rect.height === 0
|
|
256
|
+
? 0
|
|
257
|
+
: (event.clientY - rect.top) / rect.height
|
|
258
|
+
: rect.width === 0
|
|
259
|
+
? 0
|
|
260
|
+
: (event.clientX - rect.left) / rect.width;
|
|
261
|
+
this.#setPosition(ratio * 100, true);
|
|
262
|
+
}
|
|
263
|
+
#onKeyDown(event) {
|
|
264
|
+
const horizontal = this.orientation === "horizontal";
|
|
265
|
+
const step = event.shiftKey ? STEP_LARGE : STEP;
|
|
266
|
+
let next;
|
|
267
|
+
switch (event.key) {
|
|
268
|
+
case "ArrowRight":
|
|
269
|
+
case "ArrowDown":
|
|
270
|
+
next = this.#position + step;
|
|
271
|
+
break;
|
|
272
|
+
case "ArrowLeft":
|
|
273
|
+
case "ArrowUp":
|
|
274
|
+
next = this.#position - step;
|
|
275
|
+
break;
|
|
276
|
+
case "Home":
|
|
277
|
+
next = horizontal ? 100 : 0;
|
|
278
|
+
break;
|
|
279
|
+
case "End":
|
|
280
|
+
next = horizontal ? 0 : 100;
|
|
281
|
+
break;
|
|
282
|
+
default:
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
event.preventDefault?.();
|
|
286
|
+
this.#setPosition(next, true);
|
|
287
|
+
}
|
|
288
|
+
// ── helpers ────────────────────────────────────────────────
|
|
289
|
+
#label() {
|
|
290
|
+
return this.#attr("label") ?? "Compare maps";
|
|
291
|
+
}
|
|
292
|
+
#attr(name) {
|
|
293
|
+
return typeof this.getAttribute === "function" ? this.getAttribute(name) : null;
|
|
294
|
+
}
|
|
295
|
+
#reflectPosition(value) {
|
|
296
|
+
if (typeof this.setAttribute !== "function" || typeof this.getAttribute !== "function")
|
|
297
|
+
return;
|
|
298
|
+
const serialized = String(value);
|
|
299
|
+
if (this.getAttribute("position") !== serialized)
|
|
300
|
+
this.setAttribute("position", serialized);
|
|
301
|
+
}
|
|
302
|
+
#dispatchChange() {
|
|
303
|
+
if (!globalDom.CustomEvent || typeof this.dispatchEvent !== "function")
|
|
304
|
+
return;
|
|
305
|
+
const detail = { position: this.#position, orientation: this.orientation };
|
|
306
|
+
this.dispatchEvent(new globalDom.CustomEvent("change", { bubbles: true, composed: true, detail }));
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Registers the swipe control custom element (`honua-swipe-control`). Invoked
|
|
311
|
+
* automatically on import when a global `customElements` registry is present;
|
|
312
|
+
* call explicitly when using a scoped registry. Skips the registration when
|
|
313
|
+
* the tag is already defined.
|
|
314
|
+
*/
|
|
315
|
+
export function defineHonuaSwipeControl(registry = globalDom.customElements) {
|
|
316
|
+
if (!registry)
|
|
317
|
+
return;
|
|
318
|
+
if (!registry.get("honua-swipe-control")) {
|
|
319
|
+
registry.define("honua-swipe-control", HonuaSwipeControlElement);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
if (globalDom.customElements) {
|
|
323
|
+
defineHonuaSwipeControl(globalDom.customElements);
|
|
324
|
+
}
|
|
325
|
+
function clampPercent(value) {
|
|
326
|
+
if (!Number.isFinite(value))
|
|
327
|
+
return DEFAULT_POSITION;
|
|
328
|
+
return Math.min(100, Math.max(0, Math.round(value)));
|
|
329
|
+
}
|
|
330
|
+
/** Structural-only styles; theme via `::part(divider)` / `::part(handle)`. */
|
|
331
|
+
function structuralStyles() {
|
|
332
|
+
return `
|
|
333
|
+
:host { position: absolute; inset: 0; pointer-events: none; display: block; }
|
|
334
|
+
.divider {
|
|
335
|
+
position: absolute;
|
|
336
|
+
top: 0;
|
|
337
|
+
block-size: 100%;
|
|
338
|
+
inline-size: 0;
|
|
339
|
+
border-inline-start: 2px solid currentColor;
|
|
340
|
+
transform: translateX(-1px);
|
|
341
|
+
cursor: ew-resize;
|
|
342
|
+
pointer-events: auto;
|
|
343
|
+
touch-action: none;
|
|
344
|
+
}
|
|
345
|
+
.divider-horizontal {
|
|
346
|
+
inline-size: 100%;
|
|
347
|
+
block-size: 0;
|
|
348
|
+
border-inline-start: none;
|
|
349
|
+
border-block-start: 2px solid currentColor;
|
|
350
|
+
transform: translateY(-1px);
|
|
351
|
+
cursor: ns-resize;
|
|
352
|
+
}
|
|
353
|
+
.handle {
|
|
354
|
+
position: absolute;
|
|
355
|
+
inset-block-start: 50%;
|
|
356
|
+
inset-inline-start: 0;
|
|
357
|
+
inline-size: 1.5em;
|
|
358
|
+
block-size: 1.5em;
|
|
359
|
+
transform: translate(-50%, -50%);
|
|
360
|
+
border-radius: 50%;
|
|
361
|
+
background: currentColor;
|
|
362
|
+
}
|
|
363
|
+
.divider-horizontal .handle {
|
|
364
|
+
inset-block-start: 0;
|
|
365
|
+
inset-inline-start: 50%;
|
|
366
|
+
}
|
|
367
|
+
`;
|
|
368
|
+
}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared types for the native Honua control kit (`@honua/sdk-js/controls`).
|
|
3
|
+
*
|
|
4
|
+
* Controls in this entry operate directly on a MapLibre `Map` instance via a
|
|
5
|
+
* duck-typed interface — they never import `maplibre-gl` and never touch the
|
|
6
|
+
* SDK core, so the entry stays bundle-independent (same packaging posture as
|
|
7
|
+
* `@honua/sdk-js/esri-compat`).
|
|
8
|
+
*
|
|
9
|
+
* @module
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* The flavor of a basemap definition. Purely descriptive metadata — the
|
|
13
|
+
* switcher treats every base the same way (a set of sources + layers that are
|
|
14
|
+
* shown exclusively). Exposed on the rendered radio as a `data-kind`
|
|
15
|
+
* attribute so hosts can style per kind.
|
|
16
|
+
*
|
|
17
|
+
* - `"vector"` — vector tile base (e.g. MVT or `pmtiles://` vector sources).
|
|
18
|
+
* - `"raster"` — raster tile base (e.g. XYZ imagery, WMTS, raster PMTiles).
|
|
19
|
+
* - `"raster-dem-composite"` — composite base that pairs layers from multiple
|
|
20
|
+
* sources, typically a vector base plus a `raster-dem` hillshade rendered
|
|
21
|
+
* together as one exclusive option (e.g. a "Terrain" base).
|
|
22
|
+
*/
|
|
23
|
+
export type HonuaBasemapKind = "vector" | "raster" | "raster-dem-composite";
|
|
24
|
+
/**
|
|
25
|
+
* A MapLibre layer specification owned by a basemap definition. The switcher
|
|
26
|
+
* only requires the `id`; everything else is passed straight through to
|
|
27
|
+
* `map.addLayer`, so any MapLibre layer type (`background`, `raster`, `fill`,
|
|
28
|
+
* `line`, `symbol`, `hillshade`, ...) is supported.
|
|
29
|
+
*/
|
|
30
|
+
export interface HonuaBasemapLayerSpecification {
|
|
31
|
+
/** Unique layer id within the map style. */
|
|
32
|
+
readonly id: string;
|
|
33
|
+
/** Remaining MapLibre layer specification properties (type, source, paint, layout, ...). */
|
|
34
|
+
readonly [key: string]: unknown;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* One exclusive basemap option: a set of MapLibre sources and layers that are
|
|
38
|
+
* added/shown together and hidden when another base is activated.
|
|
39
|
+
*
|
|
40
|
+
* The switcher is protocol-agnostic — `sources` values are passed verbatim to
|
|
41
|
+
* `map.addSource`, so `pmtiles://` vector sources, raster tile URL templates,
|
|
42
|
+
* `raster-dem` terrain sources, and inline GeoJSON all work as long as the
|
|
43
|
+
* host map can resolve them.
|
|
44
|
+
*
|
|
45
|
+
* A composite base (e.g. "Terrain" = vector base + hillshade) is simply a
|
|
46
|
+
* definition with multiple sources and multiple layers; the layers stay in
|
|
47
|
+
* the order given. Bases may share source ids and even layer ids (a shared
|
|
48
|
+
* layer stays visible while any base referencing it is active).
|
|
49
|
+
*/
|
|
50
|
+
export interface HonuaBasemapDefinition {
|
|
51
|
+
/** Stable identifier emitted in `change` events and used by `value`. */
|
|
52
|
+
readonly id: string;
|
|
53
|
+
/** Human-readable label rendered on the radio button. */
|
|
54
|
+
readonly label: string;
|
|
55
|
+
/** Descriptive base kind (see {@link HonuaBasemapKind}). */
|
|
56
|
+
readonly kind: HonuaBasemapKind;
|
|
57
|
+
/** MapLibre sources keyed by source id, passed verbatim to `map.addSource`. */
|
|
58
|
+
readonly sources: Readonly<Record<string, unknown>>;
|
|
59
|
+
/** MapLibre layers added (in order) beneath the host's overlay layers. */
|
|
60
|
+
readonly layers: readonly HonuaBasemapLayerSpecification[];
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Minimal duck-typed subset of `maplibre-gl.Map` required by the basemap
|
|
64
|
+
* switcher. Mirrors the duck-typing pattern used by `src/runtime/runtime.ts`
|
|
65
|
+
* (`MaplibreMap`) so the controls entry stays bundle-neutral: any MapLibre-GL
|
|
66
|
+
* `Map` instance satisfies this interface, and tests can pass a plain stub.
|
|
67
|
+
*/
|
|
68
|
+
export interface HonuaBasemapSwitcherMap {
|
|
69
|
+
/** Adds a source to the map style. */
|
|
70
|
+
addSource(id: string, source: unknown): void;
|
|
71
|
+
/** Removes a source; used when pruning bases that were removed from `bases`. */
|
|
72
|
+
removeSource?(id: string): void;
|
|
73
|
+
/** Returns a truthy handle when the source already exists. */
|
|
74
|
+
getSource?(id: string): unknown;
|
|
75
|
+
/** Adds a layer, optionally before an existing layer id. */
|
|
76
|
+
addLayer(layer: unknown, beforeId?: string): void;
|
|
77
|
+
/** Removes a layer; used when pruning bases that were removed from `bases`. */
|
|
78
|
+
removeLayer?(id: string): void;
|
|
79
|
+
/** Returns a truthy handle when the layer already exists. */
|
|
80
|
+
getLayer?(id: string): unknown;
|
|
81
|
+
/** Sets a layout property; used to toggle `visibility` exclusively. */
|
|
82
|
+
setLayoutProperty(layerId: string, name: string, value: unknown): void;
|
|
83
|
+
/** Used to find the insertion anchor so base layers stay beneath overlays. */
|
|
84
|
+
getStyle?(): unknown;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Detail payload of the `change` CustomEvent dispatched by
|
|
88
|
+
* `<honua-basemap-switcher>` whenever the active base changes (user
|
|
89
|
+
* interaction, programmatic `value` assignment, or initial activation).
|
|
90
|
+
*/
|
|
91
|
+
export interface HonuaBasemapSwitcherChangeDetail {
|
|
92
|
+
/** Id of the now-active base. */
|
|
93
|
+
readonly value: string;
|
|
94
|
+
/** Id of the previously active base; absent on the initial activation. */
|
|
95
|
+
readonly previousValue?: string;
|
|
96
|
+
/** Kind of the now-active base. */
|
|
97
|
+
readonly kind: HonuaBasemapKind;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* One overlay option rendered as a toggle row by `<honua-layer-list>`. An
|
|
101
|
+
* overlay groups one or more MapLibre style layer ids that are shown/hidden
|
|
102
|
+
* together (their `visibility` layout property is toggled in lock-step).
|
|
103
|
+
*/
|
|
104
|
+
export interface HonuaLayerListOverlay {
|
|
105
|
+
/** Stable identifier emitted in `change` events. */
|
|
106
|
+
readonly id: string;
|
|
107
|
+
/** Human-readable label rendered next to the checkbox. */
|
|
108
|
+
readonly label: string;
|
|
109
|
+
/** Style layer ids toggled together when the overlay is toggled. */
|
|
110
|
+
readonly layers: readonly string[];
|
|
111
|
+
/** Optional attribution text (purely descriptive; rendered as a row hint). */
|
|
112
|
+
readonly attribution?: string;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Orientation of the divider rendered by `<honua-swipe-control>`:
|
|
116
|
+
* - `"vertical"` — a vertical divider that moves left/right, clipping the top
|
|
117
|
+
* map's left edge (the default; a left/right comparison).
|
|
118
|
+
* - `"horizontal"` — a horizontal divider that moves up/down, clipping the top
|
|
119
|
+
* map's top edge (a top/bottom comparison).
|
|
120
|
+
*/
|
|
121
|
+
export type HonuaSwipeOrientation = "vertical" | "horizontal";
|
|
122
|
+
/**
|
|
123
|
+
* Detail payload of the `change` CustomEvent dispatched by
|
|
124
|
+
* `<honua-swipe-control>` whenever the divider position changes (user drag,
|
|
125
|
+
* keyboard, or programmatic `position` assignment).
|
|
126
|
+
*/
|
|
127
|
+
export interface HonuaSwipeChangeDetail {
|
|
128
|
+
/** Divider position as a percentage 0–100 of the control's width/height. */
|
|
129
|
+
readonly position: number;
|
|
130
|
+
/** Current divider orientation. */
|
|
131
|
+
readonly orientation: HonuaSwipeOrientation;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Minimal duck-typed subset of `maplibre-gl.Map` required by
|
|
135
|
+
* `<honua-layer-list>`. Any MapLibre-GL `Map` instance satisfies this
|
|
136
|
+
* interface, and tests can pass a plain stub (same posture as
|
|
137
|
+
* {@link HonuaBasemapSwitcherMap} and {@link HonuaLegendMap}).
|
|
138
|
+
*/
|
|
139
|
+
export interface HonuaLayerListMap {
|
|
140
|
+
/** Returns a truthy handle when the layer exists (drives the not-seeded state). */
|
|
141
|
+
getLayer?(id: string): unknown;
|
|
142
|
+
/** Reads a layout property; used to sync checkbox state from the map. */
|
|
143
|
+
getLayoutProperty?(layerId: string, name: string): unknown;
|
|
144
|
+
/** Sets a layout property; used to toggle `visibility` per overlay layer. */
|
|
145
|
+
setLayoutProperty(layerId: string, name: string, value: unknown): void;
|
|
146
|
+
/** Subscribes to map events; used for `auto-refresh` on `styledata`. */
|
|
147
|
+
on?(type: string, listener: (event?: unknown) => void): unknown;
|
|
148
|
+
/** Unsubscribes a listener registered with `on`. */
|
|
149
|
+
off?(type: string, listener: (event?: unknown) => void): unknown;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Detail payload of the `change` CustomEvent dispatched by
|
|
153
|
+
* `<honua-layer-list>` whenever an overlay is toggled (user interaction or
|
|
154
|
+
* programmatic `setVisible`).
|
|
155
|
+
*/
|
|
156
|
+
export interface HonuaLayerListChangeDetail {
|
|
157
|
+
/** Id of the toggled overlay. */
|
|
158
|
+
readonly id: string;
|
|
159
|
+
/** Whether the overlay's layers are now visible. */
|
|
160
|
+
readonly visible: boolean;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Minimal duck-typed subset of `maplibre-gl.Map` required by
|
|
164
|
+
* `<honua-swipe-control>`. The control only needs each map's canvas
|
|
165
|
+
* container so it can apply a CSS `clip-path` to the top map; any MapLibre-GL
|
|
166
|
+
* `Map` instance satisfies this interface, and tests can pass a plain stub
|
|
167
|
+
* (same posture as {@link HonuaBasemapSwitcherMap}).
|
|
168
|
+
*/
|
|
169
|
+
export interface HonuaSwipeMap {
|
|
170
|
+
/** Returns the map's outermost container element (clip target). */
|
|
171
|
+
getContainer(): HTMLElement;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Swatch geometry rendered for a legend entry by `<honua-legend>`:
|
|
175
|
+
* - `"fill"` — square swatch (polygon fills); supports an outline color.
|
|
176
|
+
* - `"line"` — short horizontal bar (line layers).
|
|
177
|
+
* - `"circle"` — round swatch (circle/point layers).
|
|
178
|
+
*/
|
|
179
|
+
export type HonuaLegendSwatchShape = "fill" | "line" | "circle";
|
|
180
|
+
/** Split fill/outline colors for a legend swatch (typically fill layers). */
|
|
181
|
+
export interface HonuaLegendSwatchColor {
|
|
182
|
+
/** CSS color painted as the swatch body. */
|
|
183
|
+
readonly fill?: string;
|
|
184
|
+
/** CSS color painted as the swatch border. */
|
|
185
|
+
readonly outline?: string;
|
|
186
|
+
}
|
|
187
|
+
/** One swatch+label row rendered by `<honua-legend>`. */
|
|
188
|
+
export interface HonuaLegendEntry {
|
|
189
|
+
/** Visible text carrying the entry's meaning (swatches are aria-hidden). */
|
|
190
|
+
readonly label: string;
|
|
191
|
+
/** Swatch color: a CSS color string or split `{ fill, outline }` colors. */
|
|
192
|
+
readonly color: string | HonuaLegendSwatchColor;
|
|
193
|
+
/** Swatch geometry; defaults to `"fill"`. */
|
|
194
|
+
readonly shape?: HonuaLegendSwatchShape;
|
|
195
|
+
}
|
|
196
|
+
/** A titled group of legend entries rendered by `<honua-legend>`. */
|
|
197
|
+
export interface HonuaLegendSection {
|
|
198
|
+
/** Optional section title rendered above the rows. */
|
|
199
|
+
readonly title?: string;
|
|
200
|
+
/**
|
|
201
|
+
* Style layer id this section describes. When the element has
|
|
202
|
+
* `follow-layer-visibility`, the section is hidden while the layer's
|
|
203
|
+
* `visibility` layout property is `"none"`.
|
|
204
|
+
*/
|
|
205
|
+
readonly layer?: string;
|
|
206
|
+
/** The swatch+label rows of the section. */
|
|
207
|
+
readonly entries: readonly HonuaLegendEntry[];
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Minimal duck-typed subset of `maplibre-gl.Map` required by
|
|
211
|
+
* `<honua-legend>`. Any MapLibre-GL `Map` instance satisfies this interface,
|
|
212
|
+
* and tests can pass a plain stub (same posture as
|
|
213
|
+
* {@link HonuaBasemapSwitcherMap}).
|
|
214
|
+
*/
|
|
215
|
+
export interface HonuaLegendMap {
|
|
216
|
+
/** Returns a truthy handle (with a `type`) when the layer exists. */
|
|
217
|
+
getLayer?(id: string): unknown;
|
|
218
|
+
/** Reads a paint property value as written in the style (expressions are returned verbatim). */
|
|
219
|
+
getPaintProperty?(layerId: string, name: string): unknown;
|
|
220
|
+
/** Reads a layout property; used for `follow-layer-visibility`. */
|
|
221
|
+
getLayoutProperty?(layerId: string, name: string): unknown;
|
|
222
|
+
/** Subscribes to map events; used for `auto-refresh` on `styledata`. */
|
|
223
|
+
on?(type: string, listener: (event?: unknown) => void): unknown;
|
|
224
|
+
/** Unsubscribes a listener registered with `on`. */
|
|
225
|
+
off?(type: string, listener: (event?: unknown) => void): unknown;
|
|
226
|
+
}
|
|
227
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/controls/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared types for the native Honua control kit (`@honua/sdk-js/controls`).
|
|
3
|
+
*
|
|
4
|
+
* Controls in this entry operate directly on a MapLibre `Map` instance via a
|
|
5
|
+
* duck-typed interface — they never import `maplibre-gl` and never touch the
|
|
6
|
+
* SDK core, so the entry stays bundle-independent (same packaging posture as
|
|
7
|
+
* `@honua/sdk-js/esri-compat`).
|
|
8
|
+
*
|
|
9
|
+
* @module
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OAuth2 client-credentials provider (RFC 6749 §4.4).
|
|
3
|
+
*
|
|
4
|
+
* For confidential **Node/server** clients only — the `clientSecret` must never
|
|
5
|
+
* ship to a browser. There is no interactive step; tokens are fetched from the
|
|
6
|
+
* token endpoint on demand and refreshed by re-requesting the grant when they
|
|
7
|
+
* expire (client-credentials grants do not issue refresh tokens). Refresh is
|
|
8
|
+
* single-flight so N concurrent requests share one token-endpoint round-trip.
|
|
9
|
+
*
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
*/
|
|
12
|
+
import type { HonuaAuthCredentials, HonuaAuthProviderContext } from "../types.js";
|
|
13
|
+
import type { ClientCredentialsConfig, HonuaAuthEventListener } from "./types.js";
|
|
14
|
+
/** OAuth2 client-credentials provider. Construct via {@link clientCredentials}. */
|
|
15
|
+
export declare class ClientCredentialsProvider {
|
|
16
|
+
private readonly config;
|
|
17
|
+
private readonly store;
|
|
18
|
+
private readonly serviceKey;
|
|
19
|
+
private readonly clockSkewMs;
|
|
20
|
+
private readonly fetchFn;
|
|
21
|
+
private readonly listeners;
|
|
22
|
+
private refreshInFlight;
|
|
23
|
+
constructor(config: ClientCredentialsConfig);
|
|
24
|
+
/** {@link HonuaAuthProvider.getCredentials}: fetch/refresh a bearer token. */
|
|
25
|
+
getCredentials(context?: HonuaAuthProviderContext): Promise<HonuaAuthCredentials | undefined>;
|
|
26
|
+
/** Drop the cached token; the next call re-requests the grant. */
|
|
27
|
+
signOut(): Promise<void>;
|
|
28
|
+
on(listener: HonuaAuthEventListener): {
|
|
29
|
+
remove(): void;
|
|
30
|
+
};
|
|
31
|
+
private fetchSingleFlight;
|
|
32
|
+
private fetchToken;
|
|
33
|
+
private emit;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Create an OAuth2 client-credentials {@link HonuaAuthProvider} for Node/server
|
|
37
|
+
* use. Do not use in a browser — the client secret would be exposed.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* import { clientCredentials } from "@honua/sdk-js/auth";
|
|
42
|
+
* const auth = clientCredentials({
|
|
43
|
+
* tokenEndpoint: "https://idp.example/token",
|
|
44
|
+
* clientId: process.env.CLIENT_ID!,
|
|
45
|
+
* clientSecret: process.env.CLIENT_SECRET!,
|
|
46
|
+
* scopes: ["honua.read"],
|
|
47
|
+
* });
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
export declare function clientCredentials(config: ClientCredentialsConfig): ClientCredentialsProvider;
|
|
51
|
+
//# sourceMappingURL=client-credentials-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-credentials-provider.d.ts","sourceRoot":"","sources":["../../../../src/core/auth/client-credentials-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAUlF,OAAO,KAAK,EACV,uBAAuB,EAGvB,sBAAsB,EAEvB,MAAM,YAAY,CAAC;AAEpB,mFAAmF;AACnF,qBAAa,yBAAyB;IACpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA0B;IACjD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkB;IACxC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAe;IACvC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAqC;IAC/D,OAAO,CAAC,eAAe,CAAwC;gBAE5C,MAAM,EAAE,uBAAuB;IAWlD,8EAA8E;IACjE,cAAc,CACzB,OAAO,GAAE,wBAAoE,GAC5E,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAAC;IAS5C,kEAAkE;IACrD,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAM9B,EAAE,CAAC,QAAQ,EAAE,sBAAsB,GAAG;QAAE,MAAM,IAAI,IAAI,CAAA;KAAE;IAS/D,OAAO,CAAC,iBAAiB;YAaX,UAAU;IAmBxB,OAAO,CAAC,IAAI;CASb;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,uBAAuB,GAAG,yBAAyB,CAE5F"}
|