@honua/react 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 +9 -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 +61 -0
- package/contract/index.d.ts.map +1 -0
- package/contract/index.js +51 -0
- package/contract/jobs.d.ts +149 -0
- package/contract/jobs.d.ts.map +1 -0
- package/contract/jobs.js +40 -0
- package/contract/source.d.ts +423 -0
- package/contract/source.d.ts.map +1 -0
- package/contract/source.js +3802 -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 +665 -0
- package/contract/types.d.ts.map +1 -0
- package/contract/types.js +175 -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/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 +577 -0
- package/core/client.d.ts.map +1 -0
- package/core/client.js +1664 -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 +107 -0
- package/core/errors.d.ts.map +1 -0
- package/core/errors.js +156 -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/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-features.d.ts +23 -0
- package/core/ogc-features.d.ts.map +1 -0
- package/core/ogc-features.js +114 -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.d.ts +55 -0
- package/core/stac.d.ts.map +1 -0
- package/core/stac.js +229 -0
- package/core/surfaces.d.ts +527 -0
- package/core/surfaces.d.ts.map +1 -0
- package/core/surfaces.js +1917 -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 +1355 -0
- package/core/types.d.ts.map +1 -0
- package/core/types.js +13 -0
- package/core/wfs-capabilities.d.ts +143 -0
- package/core/wfs-capabilities.d.ts.map +1 -0
- package/core/wfs-capabilities.js +478 -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 +219 -0
- package/core/wfs.d.ts.map +1 -0
- package/core/wfs.js +406 -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 +31 -0
- package/esri-compat/identity-manager.d.ts.map +1 -0
- package/esri-compat/identity-manager.js +115 -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 +35 -0
- package/esri-compat/oauth-info.d.ts.map +1 -0
- package/esri-compat/oauth-info.js +115 -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/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/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/package.json +37 -0
- package/react/context.d.ts +32 -0
- package/react/context.d.ts.map +1 -0
- package/react/context.js +19 -0
- package/react/honua-layer.d.ts +35 -0
- package/react/honua-layer.d.ts.map +1 -0
- package/react/honua-layer.js +47 -0
- package/react/honua-map.d.ts +83 -0
- package/react/honua-map.d.ts.map +1 -0
- package/react/honua-map.js +109 -0
- package/react/honua-popup.d.ts +26 -0
- package/react/honua-popup.d.ts.map +1 -0
- package/react/honua-popup.js +34 -0
- package/react/hooks.d.ts +127 -0
- package/react/hooks.d.ts.map +1 -0
- package/react/hooks.js +206 -0
- package/react/index.d.ts +42 -0
- package/react/index.d.ts.map +1 -0
- package/react/index.js +34 -0
- package/react/provider.d.ts +36 -0
- package/react/provider.d.ts.map +1 -0
- package/react/provider.js +35 -0
- package/react/query-cache.d.ts +76 -0
- package/react/query-cache.d.ts.map +1 -0
- package/react/query-cache.js +188 -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 +43 -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 +264 -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 +43 -0
- package/runtime/map-package-validation.d.ts.map +1 -0
- package/runtime/map-package-validation.js +269 -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/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 +401 -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/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/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,264 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `loadMapPackage` — the first-class entry point that turns a server
|
|
3
|
+
* `MapPackage` into a running MapLibre GL JS map. The caller owns the
|
|
4
|
+
* `MaplibreMap` instance (peer dependency); the runtime composes the
|
|
5
|
+
* style, resolves bindings through the shared contract, and hands the
|
|
6
|
+
* composed style to `map.setStyle`.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
import { createDataset } from "../contract/index.js";
|
|
11
|
+
import { HonuaMap } from "../map/honua-map.js";
|
|
12
|
+
import { HonuaMapPackageError } from "./errors.js";
|
|
13
|
+
import { HONUA_MAP_PACKAGE_FORMAT_V1 } from "./map-package.js";
|
|
14
|
+
import { createOgcStyleRefResolver } from "./ogc-styles.js";
|
|
15
|
+
import { HonuaMapRuntime, } from "./runtime.js";
|
|
16
|
+
import { projectSourceBindings, toHonuaSourceSpec } from "./source-bridge.js";
|
|
17
|
+
import { composeStyle } from "./style-compose.js";
|
|
18
|
+
import { throwRuntimeDiagnostics } from "./style-interactions.js";
|
|
19
|
+
import { prepareRuntimeStyleSpecValidation } from "./style-spec-validation.js";
|
|
20
|
+
/**
|
|
21
|
+
* Load a `MapPackage` onto a caller-provided `MaplibreMap`. Returns a
|
|
22
|
+
* runtime handle that exposes the operational API. Throws
|
|
23
|
+
* `HonuaMapPackageError` on binding failure. Query-time adapter errors
|
|
24
|
+
* (`HonuaHttpError`, `HonuaCapabilityNotSupportedError`, ...) continue
|
|
25
|
+
* to flow through the returned `Source` promises on `runtime.dataset`
|
|
26
|
+
* and through the shared `HonuaClient` interceptor chain.
|
|
27
|
+
*
|
|
28
|
+
* Per-source binding tolerance is governed by
|
|
29
|
+
* {@link LoadMapPackageOptions.sourceErrorPolicy} — the default
|
|
30
|
+
* `"tolerant"` policy lets a heterogeneous (mixed-protocol) composition
|
|
31
|
+
* keep rendering when one source fails by skipping the failing source
|
|
32
|
+
* (and any layers that reference it) and emitting a `source-error`
|
|
33
|
+
* runtime event plus a `source-bind` telemetry error span. Pass
|
|
34
|
+
* `"fail-fast"` to restore the historical reject-on-any-binding-failure
|
|
35
|
+
* behaviour.
|
|
36
|
+
*/
|
|
37
|
+
export async function loadMapPackage(pkg, map, options) {
|
|
38
|
+
assertPackageFormat(pkg);
|
|
39
|
+
const startedAt = Date.now();
|
|
40
|
+
options.telemetry?.before?.({
|
|
41
|
+
kind: "load",
|
|
42
|
+
packageId: pkg.mapPackageId,
|
|
43
|
+
startedAt,
|
|
44
|
+
});
|
|
45
|
+
const sourceErrorPolicy = options.sourceErrorPolicy ?? "tolerant";
|
|
46
|
+
const styleSpecValidationMode = options.styleSpecValidationMode ?? "strict";
|
|
47
|
+
// Default StyleRef resolution to the server's OGC API – Styles surface so
|
|
48
|
+
// `styleRefs.styleId` aligns with the server's canonical styleId. A
|
|
49
|
+
// caller-supplied callback overrides this for back-compat.
|
|
50
|
+
const styleRefResolver = options.resolveStyleRef ??
|
|
51
|
+
(options.disableDefaultStyleRefResolver ? undefined : createOgcStyleRefResolver({ client: options.client }));
|
|
52
|
+
throwRuntimeDiagnostics(await prepareRuntimeStyleSpecValidation(styleSpecValidationMode), "Cannot initialize MapLibre style-spec validation.");
|
|
53
|
+
const compose = async (target) => {
|
|
54
|
+
const projection = projectSourceBindings(target.mapPackageId, target.sourceBindings);
|
|
55
|
+
const dataset = createDataset({
|
|
56
|
+
id: target.mapPackageId,
|
|
57
|
+
client: options.client,
|
|
58
|
+
sources: projection.descriptors,
|
|
59
|
+
resolveSource: options.resolveSource,
|
|
60
|
+
skipCompatibilityCheck: options.skipCompatibilityCheck,
|
|
61
|
+
});
|
|
62
|
+
const honuaMap = new HonuaMap({ client: options.client });
|
|
63
|
+
const styleSources = { ...target.mapSpec.sources };
|
|
64
|
+
const failedSources = [];
|
|
65
|
+
const failedSourceIds = new Set();
|
|
66
|
+
const recordSourceFailure = (descriptor, cause) => {
|
|
67
|
+
if (sourceErrorPolicy === "fail-fast") {
|
|
68
|
+
if (cause instanceof HonuaMapPackageError)
|
|
69
|
+
throw cause;
|
|
70
|
+
throw new HonuaMapPackageError(`binding source "${descriptor.id}" failed`, {
|
|
71
|
+
packageId: target.mapPackageId,
|
|
72
|
+
stage: "source-bind",
|
|
73
|
+
detail: { sourceId: descriptor.id, protocol: descriptor.protocol },
|
|
74
|
+
cause,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
failedSourceIds.add(descriptor.id);
|
|
78
|
+
failedSources.push({ sourceId: descriptor.id, error: cause });
|
|
79
|
+
// The tolerant contract is "failed sources are dropped from
|
|
80
|
+
// composedStyle.sources". Inline `mapSpec.sources` entries that
|
|
81
|
+
// collide with a failing binding id must go too — otherwise the
|
|
82
|
+
// composed style still advertises the failed source through the
|
|
83
|
+
// predeclared spec, which contradicts the documented behaviour.
|
|
84
|
+
delete styleSources[descriptor.id];
|
|
85
|
+
};
|
|
86
|
+
for (const descriptor of projection.descriptors) {
|
|
87
|
+
try {
|
|
88
|
+
const filter = projection.filtersBySourceId.get(descriptor.id);
|
|
89
|
+
const honuaSpec = toHonuaSourceSpec(descriptor, filter);
|
|
90
|
+
// Eagerly materialize so a `resolveSource` rejection (or missing
|
|
91
|
+
// built-in resolver) surfaces at bind time rather than the first
|
|
92
|
+
// query-time call. The built-in adapter constructors are
|
|
93
|
+
// side-effect free (no HTTP), so eager resolution is cheap.
|
|
94
|
+
dataset.source(descriptor.id);
|
|
95
|
+
// Commit to honuaMap before exposing the spec on styleSources so
|
|
96
|
+
// a thrown addSource cannot leave the failed source in
|
|
97
|
+
// composedStyle.sources after the catch records the failure.
|
|
98
|
+
honuaMap.addSource(descriptor.id, honuaSpec);
|
|
99
|
+
styleSources[descriptor.id] = honuaSpec;
|
|
100
|
+
}
|
|
101
|
+
catch (cause) {
|
|
102
|
+
recordSourceFailure(descriptor, cause);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
for (const native of projection.nativeSources) {
|
|
106
|
+
styleSources[native.sourceId] = native.spec;
|
|
107
|
+
honuaMap.addSource(native.sourceId, native.spec);
|
|
108
|
+
}
|
|
109
|
+
for (const [sourceId, source] of Object.entries(styleSources)) {
|
|
110
|
+
if (!honuaMap.hasSource(sourceId))
|
|
111
|
+
honuaMap.addSource(sourceId, source);
|
|
112
|
+
}
|
|
113
|
+
const layers = filterLayersByAvailableSource(target.mapSpec.layers, failedSourceIds);
|
|
114
|
+
const preComposed = {
|
|
115
|
+
...target.mapSpec,
|
|
116
|
+
sources: styleSources,
|
|
117
|
+
layers,
|
|
118
|
+
};
|
|
119
|
+
for (const layer of preComposed.layers) {
|
|
120
|
+
if (!honuaMap.hasLayer(layer.id))
|
|
121
|
+
honuaMap.addLayer(layer);
|
|
122
|
+
}
|
|
123
|
+
const composed = await composeStyle(target, preComposed, {
|
|
124
|
+
resolveStyleRef: styleRefResolver,
|
|
125
|
+
resolveTheme: options.resolveTheme,
|
|
126
|
+
});
|
|
127
|
+
return { composed, dataset, honuaMap, failedSources };
|
|
128
|
+
};
|
|
129
|
+
try {
|
|
130
|
+
const { composed, dataset, honuaMap, failedSources } = await compose(pkg);
|
|
131
|
+
map.setStyle(composed);
|
|
132
|
+
const packageRef = { current: pkg };
|
|
133
|
+
const runtime = new HonuaMapRuntime({
|
|
134
|
+
map,
|
|
135
|
+
honuaMap,
|
|
136
|
+
dataset,
|
|
137
|
+
composedStyle: composed,
|
|
138
|
+
packageRef,
|
|
139
|
+
telemetry: options.telemetry,
|
|
140
|
+
popupFactory: options.popupFactory,
|
|
141
|
+
popupRenderer: options.popupRenderer,
|
|
142
|
+
styleSpecValidationMode,
|
|
143
|
+
reload: async (next) => {
|
|
144
|
+
const result = await compose(next);
|
|
145
|
+
for (const failed of result.failedSources) {
|
|
146
|
+
emitSourceBindFailure(options.telemetry, next.mapPackageId, failed);
|
|
147
|
+
}
|
|
148
|
+
return {
|
|
149
|
+
composed: result.composed,
|
|
150
|
+
dataset: result.dataset,
|
|
151
|
+
honuaMap: result.honuaMap,
|
|
152
|
+
failedSources: result.failedSources,
|
|
153
|
+
};
|
|
154
|
+
},
|
|
155
|
+
});
|
|
156
|
+
// Register the caller's listener before emitting initial lifecycle
|
|
157
|
+
// events so callers can observe source-ready / package-loaded once
|
|
158
|
+
// per load instead of losing them to a race before runtime.on(...).
|
|
159
|
+
if (options.onEvent) {
|
|
160
|
+
runtime.on(options.onEvent);
|
|
161
|
+
}
|
|
162
|
+
if (options.applyInitialView !== false && pkg.initialView) {
|
|
163
|
+
try {
|
|
164
|
+
runtime.setViewState({
|
|
165
|
+
...(pkg.initialView.bbox ? { bbox: pkg.initialView.bbox } : {}),
|
|
166
|
+
...(pkg.initialView.center ? { center: pkg.initialView.center } : {}),
|
|
167
|
+
...(pkg.initialView.zoom !== undefined ? { zoom: pkg.initialView.zoom } : {}),
|
|
168
|
+
...(pkg.initialView.pitch !== undefined ? { pitch: pkg.initialView.pitch } : {}),
|
|
169
|
+
...(pkg.initialView.bearing !== undefined ? { bearing: pkg.initialView.bearing } : {}),
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
catch (cause) {
|
|
173
|
+
throw new HonuaMapPackageError("applying initialView failed", {
|
|
174
|
+
packageId: pkg.mapPackageId,
|
|
175
|
+
stage: "view",
|
|
176
|
+
cause,
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
const failedIds = new Set(failedSources.map((entry) => entry.sourceId));
|
|
181
|
+
for (const sourceId of dataset.sourceIds()) {
|
|
182
|
+
if (failedIds.has(sourceId))
|
|
183
|
+
continue;
|
|
184
|
+
runtime._emit({ type: "source-ready", sourceId });
|
|
185
|
+
}
|
|
186
|
+
for (const failed of failedSources) {
|
|
187
|
+
emitSourceBindFailure(options.telemetry, pkg.mapPackageId, failed);
|
|
188
|
+
runtime._emit({ type: "source-error", sourceId: failed.sourceId, error: failed.error });
|
|
189
|
+
}
|
|
190
|
+
runtime._emit({ type: "package-loaded", packageId: pkg.mapPackageId });
|
|
191
|
+
const finishedAt = Date.now();
|
|
192
|
+
options.telemetry?.after?.({
|
|
193
|
+
kind: "load",
|
|
194
|
+
packageId: pkg.mapPackageId,
|
|
195
|
+
startedAt,
|
|
196
|
+
finishedAt,
|
|
197
|
+
durationMs: finishedAt - startedAt,
|
|
198
|
+
});
|
|
199
|
+
return runtime;
|
|
200
|
+
}
|
|
201
|
+
catch (error) {
|
|
202
|
+
const finishedAt = Date.now();
|
|
203
|
+
options.telemetry?.error?.({
|
|
204
|
+
kind: "load",
|
|
205
|
+
packageId: pkg.mapPackageId,
|
|
206
|
+
startedAt,
|
|
207
|
+
finishedAt,
|
|
208
|
+
durationMs: finishedAt - startedAt,
|
|
209
|
+
error,
|
|
210
|
+
});
|
|
211
|
+
if (error instanceof HonuaMapPackageError)
|
|
212
|
+
throw error;
|
|
213
|
+
throw new HonuaMapPackageError("loadMapPackage failed", {
|
|
214
|
+
packageId: pkg.mapPackageId,
|
|
215
|
+
stage: "load",
|
|
216
|
+
cause: error,
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
function filterLayersByAvailableSource(layers, failedSourceIds) {
|
|
221
|
+
if (failedSourceIds.size === 0)
|
|
222
|
+
return [...layers];
|
|
223
|
+
return layers.filter((layer) => {
|
|
224
|
+
const sourceId = typeof layer.source === "string" ? layer.source : undefined;
|
|
225
|
+
if (sourceId === undefined)
|
|
226
|
+
return true;
|
|
227
|
+
return !failedSourceIds.has(sourceId);
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
function emitSourceBindFailure(telemetry, packageId, failed) {
|
|
231
|
+
if (!telemetry?.error)
|
|
232
|
+
return;
|
|
233
|
+
const startedAt = Date.now();
|
|
234
|
+
telemetry.error({
|
|
235
|
+
kind: "source-bind",
|
|
236
|
+
packageId,
|
|
237
|
+
startedAt,
|
|
238
|
+
finishedAt: startedAt,
|
|
239
|
+
durationMs: 0,
|
|
240
|
+
detail: { sourceId: failed.sourceId },
|
|
241
|
+
error: failed.error,
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
function assertPackageFormat(pkg) {
|
|
245
|
+
if (pkg.format !== HONUA_MAP_PACKAGE_FORMAT_V1) {
|
|
246
|
+
throw new HonuaMapPackageError(`unsupported MapPackage format "${String(pkg.format)}"; runtime supports "${HONUA_MAP_PACKAGE_FORMAT_V1}"`, {
|
|
247
|
+
packageId: pkg.mapPackageId,
|
|
248
|
+
stage: "load",
|
|
249
|
+
detail: { received: pkg.format, expected: HONUA_MAP_PACKAGE_FORMAT_V1 },
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
if (!Array.isArray(pkg.sourceBindings)) {
|
|
253
|
+
throw new HonuaMapPackageError("MapPackage.sourceBindings must be an array", {
|
|
254
|
+
packageId: pkg.mapPackageId,
|
|
255
|
+
stage: "load",
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
if (!pkg.mapSpec || typeof pkg.mapSpec !== "object") {
|
|
259
|
+
throw new HonuaMapPackageError("MapPackage.mapSpec is required", {
|
|
260
|
+
packageId: pkg.mapPackageId,
|
|
261
|
+
stage: "load",
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type { HonuaCacheValidator } from "../core/cache-state.js";
|
|
2
|
+
import type { HonuaClient } from "../core/client.js";
|
|
3
|
+
import { type LoadMapPackageOptions } from "./load-package.js";
|
|
4
|
+
import { type HonuaMapPackageDiagnostic } from "./map-package-validation.js";
|
|
5
|
+
import type { HonuaMapPackage } from "./map-package.js";
|
|
6
|
+
import type { HonuaMapRuntime, MaplibreMap } from "./runtime.js";
|
|
7
|
+
import type { StyleRefResolver } from "./style-compose.js";
|
|
8
|
+
export declare const DEFAULT_MAP_PACKAGE_PATH_PREFIX = "/api/v1/map-packages";
|
|
9
|
+
export type MapPackageLocator = string | {
|
|
10
|
+
readonly id?: string;
|
|
11
|
+
readonly packageId?: string;
|
|
12
|
+
readonly path?: string;
|
|
13
|
+
readonly url?: string;
|
|
14
|
+
readonly href?: string;
|
|
15
|
+
};
|
|
16
|
+
export type MapPackagePathResolver = (packageId: string) => string;
|
|
17
|
+
export interface FetchMapPackageOptions {
|
|
18
|
+
readonly client: HonuaClient;
|
|
19
|
+
readonly signal?: AbortSignal;
|
|
20
|
+
readonly headers?: HeadersInit;
|
|
21
|
+
/**
|
|
22
|
+
* Override id-to-path resolution. The default is
|
|
23
|
+
* `/api/v1/map-packages/{encodeURIComponent(id)}`.
|
|
24
|
+
*/
|
|
25
|
+
readonly resolvePath?: MapPackagePathResolver;
|
|
26
|
+
/** In-memory response cache. Omit for a per-client default; pass `false` to bypass SDK validators. */
|
|
27
|
+
readonly cache?: MapPackageFetchCache | false;
|
|
28
|
+
/**
|
|
29
|
+
* Resolve out-of-band style refs and inline successful bodies into the
|
|
30
|
+
* returned package. When omitted, defaults to resolving `styleRefs.styleId`
|
|
31
|
+
* against the server's OGC API – Styles surface (`GET /ogc/styles/{styleId}`)
|
|
32
|
+
* via {@link createOgcStyleRefResolver}. Pass a callback to override that
|
|
33
|
+
* path (back-compat), or set {@link disableDefaultStyleRefResolver} to skip it.
|
|
34
|
+
*/
|
|
35
|
+
readonly resolveStyleRef?: StyleRefResolver;
|
|
36
|
+
/** Disable the default `/ogc/styles` StyleRef resolver when no callback is supplied. */
|
|
37
|
+
readonly disableDefaultStyleRefResolver?: boolean;
|
|
38
|
+
/** Treat unresolved style refs as validation errors instead of warnings. */
|
|
39
|
+
readonly requireStyleRefResolution?: boolean;
|
|
40
|
+
/** Emit a stale-package warning when the package timestamp is older than this many ms. */
|
|
41
|
+
readonly maxAgeMs?: number;
|
|
42
|
+
readonly now?: number | Date;
|
|
43
|
+
/** Return invalid packages with diagnostics instead of throwing `HonuaMapPackageError`. */
|
|
44
|
+
readonly allowInvalid?: boolean;
|
|
45
|
+
}
|
|
46
|
+
export interface MapPackageFetchCacheEntry {
|
|
47
|
+
readonly mapPackage: HonuaMapPackage;
|
|
48
|
+
readonly validator?: HonuaCacheValidator;
|
|
49
|
+
readonly cachedAtMs: number;
|
|
50
|
+
readonly sourceUpdatedAt?: string;
|
|
51
|
+
readonly fingerprint: string;
|
|
52
|
+
}
|
|
53
|
+
export type MapPackageFetchCache = Map<string, MapPackageFetchCacheEntry>;
|
|
54
|
+
/**
|
|
55
|
+
* Default entry cap for the per-client map-package fetch cache, mirroring the
|
|
56
|
+
* metadata cache's 256-entry bound.
|
|
57
|
+
*/
|
|
58
|
+
export declare const DEFAULT_MAP_PACKAGE_CACHE_LIMIT = 256;
|
|
59
|
+
/**
|
|
60
|
+
* A {@link MapPackageFetchCache} that evicts least-recently-used entries once it
|
|
61
|
+
* exceeds {@link DEFAULT_MAP_PACKAGE_CACHE_LIMIT}. The previous default cache
|
|
62
|
+
* was an unbounded `Map`, so a client that fetched many distinct packages grew
|
|
63
|
+
* it without bound (unlike the size-capped metadata cache). Callers that pass
|
|
64
|
+
* their own `cache` keep full control of eviction.
|
|
65
|
+
*/
|
|
66
|
+
export declare class BoundedMapPackageFetchCache extends Map<string, MapPackageFetchCacheEntry> {
|
|
67
|
+
private readonly limit;
|
|
68
|
+
constructor(limit?: number);
|
|
69
|
+
get(key: string): MapPackageFetchCacheEntry | undefined;
|
|
70
|
+
set(key: string, value: MapPackageFetchCacheEntry): this;
|
|
71
|
+
}
|
|
72
|
+
export type MapPackageFetchCacheStatus = "miss" | "refreshed" | "not-modified" | "bypass";
|
|
73
|
+
export interface MapPackageFetchCacheState {
|
|
74
|
+
readonly status: MapPackageFetchCacheStatus;
|
|
75
|
+
readonly key: string;
|
|
76
|
+
readonly validator?: HonuaCacheValidator;
|
|
77
|
+
readonly sourceUpdatedAt?: string;
|
|
78
|
+
readonly fetchedAt: string;
|
|
79
|
+
readonly revalidatedAt?: string;
|
|
80
|
+
}
|
|
81
|
+
export interface FetchMapPackageResult {
|
|
82
|
+
readonly mapPackage: HonuaMapPackage;
|
|
83
|
+
readonly diagnostics: readonly HonuaMapPackageDiagnostic[];
|
|
84
|
+
readonly cache: MapPackageFetchCacheState;
|
|
85
|
+
}
|
|
86
|
+
export interface LoadMapPackageFromIdOptions extends LoadMapPackageOptions {
|
|
87
|
+
readonly signal?: AbortSignal;
|
|
88
|
+
readonly headers?: HeadersInit;
|
|
89
|
+
readonly resolvePath?: MapPackagePathResolver;
|
|
90
|
+
readonly cache?: MapPackageFetchCache | false;
|
|
91
|
+
readonly requireStyleRefResolution?: boolean;
|
|
92
|
+
readonly maxAgeMs?: number;
|
|
93
|
+
readonly now?: number | Date;
|
|
94
|
+
readonly allowInvalid?: boolean;
|
|
95
|
+
}
|
|
96
|
+
export interface LoadMapPackageFromIdResult {
|
|
97
|
+
readonly runtime: HonuaMapRuntime;
|
|
98
|
+
readonly mapPackage: HonuaMapPackage;
|
|
99
|
+
readonly diagnostics: readonly HonuaMapPackageDiagnostic[];
|
|
100
|
+
readonly cache: MapPackageFetchCacheState;
|
|
101
|
+
}
|
|
102
|
+
export declare function fetchMapPackage(locator: MapPackageLocator, options: FetchMapPackageOptions): Promise<FetchMapPackageResult>;
|
|
103
|
+
export declare function loadMapPackageFromId(locator: MapPackageLocator, map: MaplibreMap, options: LoadMapPackageFromIdOptions): Promise<LoadMapPackageFromIdResult>;
|
|
104
|
+
export declare function resolveMapPackagePath(locator: MapPackageLocator, resolvePath?: MapPackagePathResolver): string;
|
|
105
|
+
export declare function defaultMapPackagePath(packageId: string): string;
|
|
106
|
+
export declare function mapPackageFingerprint(pkg: HonuaMapPackage): string;
|
|
107
|
+
//# sourceMappingURL=map-package-fetch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map-package-fetch.d.ts","sourceRoot":"","sources":["../../../src/runtime/map-package-fetch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,EAAE,KAAK,qBAAqB,EAAkB,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EACL,KAAK,yBAAyB,EAG/B,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAA8C,MAAM,kBAAkB,CAAC;AAEpG,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,eAAO,MAAM,+BAA+B,yBAAyB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