@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,251 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OGC API Records surface. Records are catalog metadata documents about
|
|
3
|
+
* resources (services, collections, maps, scenes, STAC collections, source
|
|
4
|
+
* descriptors), not STAC imagery items and not protocol-native service
|
|
5
|
+
* metadata. The wire calls live on `HonuaClient`; this class is the
|
|
6
|
+
* request-shaping layer on top.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
import { createOgcMetadataParams, mergeHeaders, normalizeCsv, normalizeStringCsv } from "./wire-shared.js";
|
|
11
|
+
const DEFAULT_RECORDS_PAGE_SIZE = 100;
|
|
12
|
+
const DEFAULT_RECORDS_MAX_PAGES = 100;
|
|
13
|
+
/** Top-level OGC API Records handle. */
|
|
14
|
+
export class HonuaOgcRecords {
|
|
15
|
+
client;
|
|
16
|
+
constructor(options) {
|
|
17
|
+
this.client = options.client;
|
|
18
|
+
}
|
|
19
|
+
collection(collectionId) {
|
|
20
|
+
return new HonuaOgcRecordCollection({ client: this.client, collectionId });
|
|
21
|
+
}
|
|
22
|
+
async landing(request = {}) {
|
|
23
|
+
return this.client.getOgcRecordsLanding(request);
|
|
24
|
+
}
|
|
25
|
+
async conformance(request = {}) {
|
|
26
|
+
return this.client.getOgcRecordsConformance(request);
|
|
27
|
+
}
|
|
28
|
+
async collections(request = {}) {
|
|
29
|
+
return this.client.listOgcRecordCollections(request);
|
|
30
|
+
}
|
|
31
|
+
async collectionMetadata(request) {
|
|
32
|
+
return this.client.getOgcRecordCollection(request);
|
|
33
|
+
}
|
|
34
|
+
async search(request) {
|
|
35
|
+
return this.client.searchOgcRecords(request);
|
|
36
|
+
}
|
|
37
|
+
async record(request) {
|
|
38
|
+
return this.client.getOgcRecord(request);
|
|
39
|
+
}
|
|
40
|
+
async rawSearch(request) {
|
|
41
|
+
return this.client.fetchOgcRecordsRaw(request);
|
|
42
|
+
}
|
|
43
|
+
async rawRecord(request) {
|
|
44
|
+
return this.client.fetchOgcRecordRaw(request);
|
|
45
|
+
}
|
|
46
|
+
async searchAll(request) {
|
|
47
|
+
const pageSize = request.pageSize ?? request.limit ?? DEFAULT_RECORDS_PAGE_SIZE;
|
|
48
|
+
const maxPages = request.maxPages ?? DEFAULT_RECORDS_MAX_PAGES;
|
|
49
|
+
const records = [];
|
|
50
|
+
let cursor = { offset: request.offset };
|
|
51
|
+
for (let page = 0; page < maxPages; page += 1) {
|
|
52
|
+
const response = await this.client.searchOgcRecords({
|
|
53
|
+
...request,
|
|
54
|
+
limit: pageSize,
|
|
55
|
+
offset: cursor.offset,
|
|
56
|
+
});
|
|
57
|
+
const pageRecords = response.features ?? [];
|
|
58
|
+
if (pageRecords.length === 0)
|
|
59
|
+
break;
|
|
60
|
+
records.push(...pageRecords);
|
|
61
|
+
cursor = nextRecordsCursor(response.links);
|
|
62
|
+
// Continuation is driven solely by the next-link cursor (and the
|
|
63
|
+
// maxPages cap). OGC API Records/Features permits a server to return
|
|
64
|
+
// fewer than `limit` records on a non-final page while still
|
|
65
|
+
// advertising a `rel=next` link, so a short page must not stop paging.
|
|
66
|
+
if (cursor.offset === undefined)
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
return records;
|
|
70
|
+
}
|
|
71
|
+
async *searchStream(request) {
|
|
72
|
+
const pageSize = request.pageSize ?? request.limit ?? DEFAULT_RECORDS_PAGE_SIZE;
|
|
73
|
+
const maxPages = request.maxPages ?? DEFAULT_RECORDS_MAX_PAGES;
|
|
74
|
+
let cursor = { offset: request.offset };
|
|
75
|
+
for (let page = 0; page < maxPages; page += 1) {
|
|
76
|
+
const response = await this.client.searchOgcRecords({
|
|
77
|
+
...request,
|
|
78
|
+
limit: pageSize,
|
|
79
|
+
offset: cursor.offset,
|
|
80
|
+
});
|
|
81
|
+
const pageRecords = response.features ?? [];
|
|
82
|
+
if (pageRecords.length === 0)
|
|
83
|
+
break;
|
|
84
|
+
yield pageRecords;
|
|
85
|
+
cursor = nextRecordsCursor(response.links);
|
|
86
|
+
// See searchAll: a short page is not a termination signal; rely on the
|
|
87
|
+
// next-link cursor and the maxPages cap.
|
|
88
|
+
if (cursor.offset === undefined)
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Bound handle for one Records catalog (`/collections/{catalogId}`). Drops
|
|
95
|
+
* the routing discriminator from per-call requests.
|
|
96
|
+
*/
|
|
97
|
+
export class HonuaOgcRecordCollection {
|
|
98
|
+
client;
|
|
99
|
+
collectionId;
|
|
100
|
+
constructor(options) {
|
|
101
|
+
this.client = options.client;
|
|
102
|
+
this.collectionId = options.collectionId;
|
|
103
|
+
}
|
|
104
|
+
async metadata(request = {}) {
|
|
105
|
+
return this.client.getOgcRecordCollection({ ...request, collectionId: this.collectionId });
|
|
106
|
+
}
|
|
107
|
+
async search(request = {}) {
|
|
108
|
+
return this.client.searchOgcRecords({ ...request, collectionId: this.collectionId });
|
|
109
|
+
}
|
|
110
|
+
async record(request) {
|
|
111
|
+
return this.client.getOgcRecord({ ...request, collectionId: this.collectionId });
|
|
112
|
+
}
|
|
113
|
+
async rawSearch(request = {}) {
|
|
114
|
+
return this.client.fetchOgcRecordsRaw({ ...request, collectionId: this.collectionId });
|
|
115
|
+
}
|
|
116
|
+
async rawRecord(request) {
|
|
117
|
+
return this.client.fetchOgcRecordRaw({ ...request, collectionId: this.collectionId });
|
|
118
|
+
}
|
|
119
|
+
async searchAll(request = {}) {
|
|
120
|
+
const root = new HonuaOgcRecords({ client: this.client });
|
|
121
|
+
return root.searchAll({ ...request, collectionId: this.collectionId });
|
|
122
|
+
}
|
|
123
|
+
searchStream(request = {}) {
|
|
124
|
+
const root = new HonuaOgcRecords({ client: this.client });
|
|
125
|
+
return root.searchStream({ ...request, collectionId: this.collectionId });
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Query-param names that may carry the next-page start offset on an OGC API
|
|
130
|
+
* `rel:"next"` link. `offset` is Honua Server's spelling; `startindex` is the
|
|
131
|
+
* OGC API – Features / Records standard name (servers also vary the casing).
|
|
132
|
+
*/
|
|
133
|
+
const RECORDS_OFFSET_PARAM_NAMES = ["offset", "startindex", "startIndex"];
|
|
134
|
+
function nextRecordsCursor(links) {
|
|
135
|
+
if (!links)
|
|
136
|
+
return {};
|
|
137
|
+
for (const link of links) {
|
|
138
|
+
if (link.rel !== "next" || typeof link.href !== "string")
|
|
139
|
+
continue;
|
|
140
|
+
try {
|
|
141
|
+
const url = new URL(link.href, "https://placeholder.test");
|
|
142
|
+
// Standards-conformant servers commonly express the next page with
|
|
143
|
+
// `startindex` rather than `offset`; honor whichever the server sent so
|
|
144
|
+
// pagination doesn't silently stop after the first page.
|
|
145
|
+
const offsetParam = readFirstParam(url.searchParams, RECORDS_OFFSET_PARAM_NAMES);
|
|
146
|
+
if (offsetParam === null)
|
|
147
|
+
continue;
|
|
148
|
+
const offset = Number(offsetParam);
|
|
149
|
+
if (Number.isFinite(offset))
|
|
150
|
+
return { offset };
|
|
151
|
+
}
|
|
152
|
+
catch {
|
|
153
|
+
// Ignore unparsable hrefs; keep scanning for a usable next link.
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return {};
|
|
157
|
+
}
|
|
158
|
+
/** Return the first non-null value among `names` from the query string. */
|
|
159
|
+
function readFirstParam(params, names) {
|
|
160
|
+
for (const name of names) {
|
|
161
|
+
const value = params.get(name);
|
|
162
|
+
if (value !== null)
|
|
163
|
+
return value;
|
|
164
|
+
}
|
|
165
|
+
return null;
|
|
166
|
+
}
|
|
167
|
+
export function createHonuaOgcRecords(client) {
|
|
168
|
+
return new HonuaOgcRecords({ client });
|
|
169
|
+
}
|
|
170
|
+
// ── OGC API Records wire methods ────────────────────────────────
|
|
171
|
+
export async function getOgcRecordsLanding(transport, request = {}) {
|
|
172
|
+
const params = createOgcMetadataParams(request);
|
|
173
|
+
return transport.requestCachedMetadataJson(`ogc-records:landing:${params.toString()}`, `/ogc/records?${params.toString()}`, request);
|
|
174
|
+
}
|
|
175
|
+
export async function getOgcRecordsConformance(transport, request = {}) {
|
|
176
|
+
const params = createOgcMetadataParams(request);
|
|
177
|
+
return transport.requestCachedMetadataJson(`ogc-records:conformance:${params.toString()}`, `/ogc/records/conformance?${params.toString()}`, request);
|
|
178
|
+
}
|
|
179
|
+
export async function listOgcRecordCollections(transport, request = {}) {
|
|
180
|
+
const params = createOgcMetadataParams(request);
|
|
181
|
+
return transport.requestCachedMetadataJson(`ogc-records:collections:${params.toString()}`, `/ogc/records/collections?${params.toString()}`, request);
|
|
182
|
+
}
|
|
183
|
+
export async function getOgcRecordCollection(transport, request) {
|
|
184
|
+
const params = createOgcMetadataParams(request);
|
|
185
|
+
const path = `/ogc/records/collections/${encodeURIComponent(String(request.collectionId))}`;
|
|
186
|
+
return transport.requestCachedMetadataJson(`ogc-records:collection:${request.collectionId}:${params.toString()}`, `${path}?${params.toString()}`, request);
|
|
187
|
+
}
|
|
188
|
+
export async function searchOgcRecords(transport, request) {
|
|
189
|
+
return transport.requestJson("GET", buildOgcRecordsSearchPath(request), undefined, request.signal);
|
|
190
|
+
}
|
|
191
|
+
export async function getOgcRecord(transport, request) {
|
|
192
|
+
return transport.requestJson("GET", buildOgcRecordPath(request), undefined, request.signal);
|
|
193
|
+
}
|
|
194
|
+
export async function fetchOgcRecordsRaw(transport, request) {
|
|
195
|
+
return transport.pipelineFetch("GET", buildOgcRecordsSearchPath(request), {
|
|
196
|
+
headers: mergeHeaders({ Accept: request.accept ?? "application/geo+json, application/json;q=0.9" }, request.headers),
|
|
197
|
+
}, request.signal);
|
|
198
|
+
}
|
|
199
|
+
export async function fetchOgcRecordRaw(transport, request) {
|
|
200
|
+
return transport.pipelineFetch("GET", buildOgcRecordPath(request), {
|
|
201
|
+
headers: mergeHeaders({ Accept: request.accept ?? "application/geo+json, application/json;q=0.9" }, request.headers),
|
|
202
|
+
}, request.signal);
|
|
203
|
+
}
|
|
204
|
+
function normalizeRecordsBbox(value) {
|
|
205
|
+
return Array.isArray(value) ? value.join(",") : String(value);
|
|
206
|
+
}
|
|
207
|
+
function buildOgcRecordsSearchPath(request) {
|
|
208
|
+
const collection = encodeURIComponent(String(request.collectionId));
|
|
209
|
+
const params = serializeOgcRecordsSearchParams(request);
|
|
210
|
+
return `/ogc/records/collections/${collection}/items?${params.toString()}`;
|
|
211
|
+
}
|
|
212
|
+
function buildOgcRecordPath(request) {
|
|
213
|
+
const collection = encodeURIComponent(String(request.collectionId));
|
|
214
|
+
const record = encodeURIComponent(String(request.recordId));
|
|
215
|
+
const params = createOgcMetadataParams(request);
|
|
216
|
+
if (request.profile !== undefined)
|
|
217
|
+
params.set("profile", normalizeStringCsv(request.profile));
|
|
218
|
+
return `/ogc/records/collections/${collection}/items/${record}?${params.toString()}`;
|
|
219
|
+
}
|
|
220
|
+
function serializeOgcRecordsSearchParams(request) {
|
|
221
|
+
const params = createOgcMetadataParams(request);
|
|
222
|
+
if (request.limit !== undefined)
|
|
223
|
+
params.set("limit", String(request.limit));
|
|
224
|
+
if (request.offset !== undefined)
|
|
225
|
+
params.set("offset", String(request.offset));
|
|
226
|
+
if (request.bbox !== undefined)
|
|
227
|
+
params.set("bbox", normalizeRecordsBbox(request.bbox));
|
|
228
|
+
if (request.datetime !== undefined)
|
|
229
|
+
params.set("datetime", request.datetime);
|
|
230
|
+
if (request.q !== undefined)
|
|
231
|
+
params.set("q", normalizeStringCsv(request.q));
|
|
232
|
+
if (request.ids !== undefined)
|
|
233
|
+
params.set("ids", normalizeCsv(request.ids));
|
|
234
|
+
if (request.type !== undefined)
|
|
235
|
+
params.set("type", normalizeStringCsv(request.type));
|
|
236
|
+
if (request.externalIds !== undefined)
|
|
237
|
+
params.set("externalIds", normalizeStringCsv(request.externalIds));
|
|
238
|
+
if (request.filter !== undefined)
|
|
239
|
+
params.set("filter", request.filter);
|
|
240
|
+
if (request.filterLang !== undefined)
|
|
241
|
+
params.set("filter-lang", request.filterLang);
|
|
242
|
+
if (request.filterCrs !== undefined)
|
|
243
|
+
params.set("filter-crs", request.filterCrs);
|
|
244
|
+
if (request.properties !== undefined)
|
|
245
|
+
params.set("properties", normalizeStringCsv(request.properties));
|
|
246
|
+
if (request.sortby !== undefined)
|
|
247
|
+
params.set("sortby", request.sortby);
|
|
248
|
+
if (request.profile !== undefined)
|
|
249
|
+
params.set("profile", normalizeStringCsv(request.profile));
|
|
250
|
+
return params;
|
|
251
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OGC API Tiles surface. Wraps the wire methods on `HonuaClient` with a
|
|
3
|
+
* tileset-discovery friendly API and a single-tile fetch helper. The
|
|
4
|
+
* conformance class identifiers are kept internal — callers see
|
|
5
|
+
* tilesets, tile-matrix-sets, and styled-tile access through the shared
|
|
6
|
+
* vocabulary, never an `OgcApiTilesPart2DatasetMap` typename.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
import type { HonuaMetadataRequestOptions } from "./cache-state.js";
|
|
11
|
+
import type { HonuaClient } from "./client.js";
|
|
12
|
+
import type { HonuaProtocolTransport } from "./protocol-transport.js";
|
|
13
|
+
import type { HonuaOgcConformanceResponse, HonuaOgcLandingResponse, HonuaOgcTileMatrixSet, HonuaOgcTileMatrixSetsResponse, HonuaOgcTileResponse, HonuaOgcTilesetMetadata, HonuaOgcTilesetsResponse, OgcMetadataRequest, OgcTileMatrixSetId, OgcTileRequest, OgcTilesetRequest, OgcTilesetsRequest } from "./types.js";
|
|
14
|
+
/** Default OGC tile-matrix-set used when none is specified (Web Mercator XYZ). */
|
|
15
|
+
export declare const DEFAULT_OGC_TILE_MATRIX_SET: OgcTileMatrixSetId;
|
|
16
|
+
export interface HonuaOgcTilesOptions {
|
|
17
|
+
client: HonuaClient;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Structural shape of a MapLibre `VectorSourceSpecification` for tiled
|
|
21
|
+
* vector data. Declared locally so the SDK does not take a runtime or type
|
|
22
|
+
* dependency on `maplibre-gl` (a peer); the object is assignable to
|
|
23
|
+
* MapLibre's `VectorSourceSpecification`.
|
|
24
|
+
*/
|
|
25
|
+
export interface MapLibreVectorSourceSpec {
|
|
26
|
+
type: "vector";
|
|
27
|
+
tiles: string[];
|
|
28
|
+
minzoom?: number;
|
|
29
|
+
maxzoom?: number;
|
|
30
|
+
scheme?: "xyz";
|
|
31
|
+
}
|
|
32
|
+
/** Options for {@link HonuaOgcTiles.getMapLibreVectorSource}. */
|
|
33
|
+
export interface HonuaMapLibreVectorSourceOptions {
|
|
34
|
+
/** Tile-matrix-set to template against. Defaults to `WebMercatorQuad`. */
|
|
35
|
+
tileMatrixSetId?: OgcTileMatrixSetId;
|
|
36
|
+
/** Override the `minzoom` of the produced source. */
|
|
37
|
+
minzoom?: number;
|
|
38
|
+
/** Override the `maxzoom` of the produced source. */
|
|
39
|
+
maxzoom?: number;
|
|
40
|
+
}
|
|
41
|
+
/** Result of {@link HonuaOgcTiles.getMapLibreConfig}. */
|
|
42
|
+
export interface HonuaMapLibreTilesConfig {
|
|
43
|
+
source: MapLibreVectorSourceSpec;
|
|
44
|
+
sourceLayer: string;
|
|
45
|
+
}
|
|
46
|
+
export interface HonuaOgcTilesetOptions {
|
|
47
|
+
client: HonuaClient;
|
|
48
|
+
collectionId: string | number;
|
|
49
|
+
tileMatrixSetId: string;
|
|
50
|
+
}
|
|
51
|
+
export type HonuaOgcCollectionTilesetRequest = Omit<OgcTilesetRequest, "collectionId" | "tileMatrixSetId">;
|
|
52
|
+
export type HonuaOgcCollectionTilesetsRequest = Omit<OgcTilesetsRequest, "collectionId">;
|
|
53
|
+
export type HonuaOgcCollectionTileRequest = Omit<OgcTileRequest, "collectionId" | "tileMatrixSetId">;
|
|
54
|
+
/**
|
|
55
|
+
* Top-level OGC API Tiles handle. Mirrors `HonuaOgcFeatures` for the
|
|
56
|
+
* tiles conformance classes.
|
|
57
|
+
*/
|
|
58
|
+
export declare class HonuaOgcTiles {
|
|
59
|
+
readonly client: HonuaClient;
|
|
60
|
+
constructor(options: HonuaOgcTilesOptions);
|
|
61
|
+
tileset(collectionId: string | number, tileMatrixSetId: string): HonuaOgcTileset;
|
|
62
|
+
landing(request?: OgcMetadataRequest): Promise<HonuaOgcLandingResponse>;
|
|
63
|
+
conformance(request?: OgcMetadataRequest): Promise<HonuaOgcConformanceResponse>;
|
|
64
|
+
tileMatrixSets(request?: OgcMetadataRequest): Promise<HonuaOgcTileMatrixSetsResponse>;
|
|
65
|
+
tileMatrixSet(tileMatrixSetId: string, request?: OgcMetadataRequest): Promise<HonuaOgcTileMatrixSet>;
|
|
66
|
+
tilesets(request: OgcTilesetsRequest): Promise<HonuaOgcTilesetsResponse>;
|
|
67
|
+
tilesetMetadata(request: OgcTilesetRequest): Promise<HonuaOgcTilesetMetadata>;
|
|
68
|
+
tile(request: OgcTileRequest): Promise<HonuaOgcTileResponse>;
|
|
69
|
+
/**
|
|
70
|
+
* Build a MapLibre-ready vector source definition for a tiled collection.
|
|
71
|
+
*
|
|
72
|
+
* Produces a `{ type: "vector", tiles: ["…/{z}/{y}/{x}"] }` object whose
|
|
73
|
+
* tile URL points at the canonical OGC API Tiles collection-tile route on
|
|
74
|
+
* the SDK's configured `baseUrl`. The MapLibre `{z}/{y}/{x}` placeholders
|
|
75
|
+
* are kept literal (the braces are not percent-encoded) while the
|
|
76
|
+
* collection / service identifier is encoded per path segment so
|
|
77
|
+
* folder-prefixed identifiers like `myFolder/parcels` serialize correctly.
|
|
78
|
+
*
|
|
79
|
+
* No network request is made; this is a pure URL-template builder. Pass
|
|
80
|
+
* `minzoom` / `maxzoom` to constrain the source, otherwise MapLibre's
|
|
81
|
+
* defaults apply.
|
|
82
|
+
*/
|
|
83
|
+
getMapLibreVectorSource(serviceId: string, options?: HonuaMapLibreVectorSourceOptions): MapLibreVectorSourceSpec;
|
|
84
|
+
/**
|
|
85
|
+
* Resolve the `source-layer` name to use in a MapLibre layer that renders
|
|
86
|
+
* the collection's vector tiles. The Honua server names the MVT layer after
|
|
87
|
+
* the collection identifier; for folder-prefixed identifiers the trailing
|
|
88
|
+
* segment is the layer name (the folder is a routing prefix, not part of
|
|
89
|
+
* the layer name baked into the tile).
|
|
90
|
+
*/
|
|
91
|
+
getDefaultSourceLayer(serviceId: string): string;
|
|
92
|
+
/**
|
|
93
|
+
* Convenience wrapper returning both the MapLibre vector {@link source}
|
|
94
|
+
* object and the {@link sourceLayer} name to wire into a layer definition.
|
|
95
|
+
*/
|
|
96
|
+
getMapLibreConfig(serviceId: string, options?: HonuaMapLibreVectorSourceOptions): HonuaMapLibreTilesConfig;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Bound handle for one (collection × tile-matrix-set) tileset. Drops the
|
|
100
|
+
* discovery params from the per-call surface so callers focus on tile
|
|
101
|
+
* coordinates. Styled-tile access (the OGC `/styles/{styleId}` route) is
|
|
102
|
+
* not exposed here because the Honua server does not currently implement
|
|
103
|
+
* that route; the tile path is the canonical collection tile route.
|
|
104
|
+
*/
|
|
105
|
+
export declare class HonuaOgcTileset {
|
|
106
|
+
readonly client: HonuaClient;
|
|
107
|
+
readonly collectionId: string | number;
|
|
108
|
+
readonly tileMatrixSetId: string;
|
|
109
|
+
constructor(options: HonuaOgcTilesetOptions);
|
|
110
|
+
metadata(request?: HonuaOgcCollectionTilesetRequest): Promise<HonuaOgcTilesetMetadata>;
|
|
111
|
+
tile(request: HonuaOgcCollectionTileRequest): Promise<HonuaOgcTileResponse>;
|
|
112
|
+
}
|
|
113
|
+
export declare function createHonuaOgcTiles(client: HonuaClient): HonuaOgcTiles;
|
|
114
|
+
export declare function getOgcTilesLanding(transport: HonuaProtocolTransport, request?: OgcMetadataRequest): Promise<HonuaOgcLandingResponse>;
|
|
115
|
+
export declare function getOgcTilesConformance(transport: HonuaProtocolTransport, request?: OgcMetadataRequest): Promise<HonuaOgcConformanceResponse>;
|
|
116
|
+
export declare function listOgcTileMatrixSets(transport: HonuaProtocolTransport, request?: OgcMetadataRequest): Promise<HonuaOgcTileMatrixSetsResponse>;
|
|
117
|
+
export declare function getOgcTileMatrixSet(transport: HonuaProtocolTransport, request: {
|
|
118
|
+
tileMatrixSetId: string;
|
|
119
|
+
responseFormat?: string;
|
|
120
|
+
extraParams?: Record<string, string | number | boolean>;
|
|
121
|
+
} & HonuaMetadataRequestOptions): Promise<HonuaOgcTileMatrixSet>;
|
|
122
|
+
export declare function listOgcCollectionTilesets(transport: HonuaProtocolTransport, request: OgcTilesetsRequest): Promise<HonuaOgcTilesetsResponse>;
|
|
123
|
+
export declare function getOgcCollectionTileset(transport: HonuaProtocolTransport, request: OgcTilesetRequest): Promise<HonuaOgcTilesetMetadata>;
|
|
124
|
+
export declare function fetchOgcTile(transport: HonuaProtocolTransport, request: OgcTileRequest): Promise<HonuaOgcTileResponse>;
|
|
125
|
+
//# sourceMappingURL=ogc-tiles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ogc-tiles.d.ts","sourceRoot":"","sources":["../../../src/core/ogc-tiles.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OGC API Tiles surface. Wraps the wire methods on `HonuaClient` with a
|
|
3
|
+
* tileset-discovery friendly API and a single-tile fetch helper. The
|
|
4
|
+
* conformance class identifiers are kept internal — callers see
|
|
5
|
+
* tilesets, tile-matrix-sets, and styled-tile access through the shared
|
|
6
|
+
* vocabulary, never an `OgcApiTilesPart2DatasetMap` typename.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
import { encodePathSegments, trimTrailingSlashes } from "./path-utils.js";
|
|
11
|
+
import { createOgcMetadataParams } from "./wire-shared.js";
|
|
12
|
+
/** Default OGC tile-matrix-set used when none is specified (Web Mercator XYZ). */
|
|
13
|
+
export const DEFAULT_OGC_TILE_MATRIX_SET = "WebMercatorQuad";
|
|
14
|
+
/**
|
|
15
|
+
* Top-level OGC API Tiles handle. Mirrors `HonuaOgcFeatures` for the
|
|
16
|
+
* tiles conformance classes.
|
|
17
|
+
*/
|
|
18
|
+
export class HonuaOgcTiles {
|
|
19
|
+
client;
|
|
20
|
+
constructor(options) {
|
|
21
|
+
this.client = options.client;
|
|
22
|
+
}
|
|
23
|
+
tileset(collectionId, tileMatrixSetId) {
|
|
24
|
+
return new HonuaOgcTileset({
|
|
25
|
+
client: this.client,
|
|
26
|
+
collectionId,
|
|
27
|
+
tileMatrixSetId,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
async landing(request = {}) {
|
|
31
|
+
return this.client.getOgcTilesLanding(request);
|
|
32
|
+
}
|
|
33
|
+
async conformance(request = {}) {
|
|
34
|
+
return this.client.getOgcTilesConformance(request);
|
|
35
|
+
}
|
|
36
|
+
async tileMatrixSets(request = {}) {
|
|
37
|
+
return this.client.listOgcTileMatrixSets(request);
|
|
38
|
+
}
|
|
39
|
+
async tileMatrixSet(tileMatrixSetId, request = {}) {
|
|
40
|
+
return this.client.getOgcTileMatrixSet({ ...request, tileMatrixSetId });
|
|
41
|
+
}
|
|
42
|
+
async tilesets(request) {
|
|
43
|
+
return this.client.listOgcCollectionTilesets(request);
|
|
44
|
+
}
|
|
45
|
+
async tilesetMetadata(request) {
|
|
46
|
+
return this.client.getOgcCollectionTileset(request);
|
|
47
|
+
}
|
|
48
|
+
async tile(request) {
|
|
49
|
+
return this.client.fetchOgcTile(request);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Build a MapLibre-ready vector source definition for a tiled collection.
|
|
53
|
+
*
|
|
54
|
+
* Produces a `{ type: "vector", tiles: ["…/{z}/{y}/{x}"] }` object whose
|
|
55
|
+
* tile URL points at the canonical OGC API Tiles collection-tile route on
|
|
56
|
+
* the SDK's configured `baseUrl`. The MapLibre `{z}/{y}/{x}` placeholders
|
|
57
|
+
* are kept literal (the braces are not percent-encoded) while the
|
|
58
|
+
* collection / service identifier is encoded per path segment so
|
|
59
|
+
* folder-prefixed identifiers like `myFolder/parcels` serialize correctly.
|
|
60
|
+
*
|
|
61
|
+
* No network request is made; this is a pure URL-template builder. Pass
|
|
62
|
+
* `minzoom` / `maxzoom` to constrain the source, otherwise MapLibre's
|
|
63
|
+
* defaults apply.
|
|
64
|
+
*/
|
|
65
|
+
getMapLibreVectorSource(serviceId, options = {}) {
|
|
66
|
+
const tileMatrixSetId = options.tileMatrixSetId ?? DEFAULT_OGC_TILE_MATRIX_SET;
|
|
67
|
+
const baseUrl = trimTrailingSlashes(this.client.serverBaseUrl);
|
|
68
|
+
const collection = encodePathSegments(serviceId);
|
|
69
|
+
const matrixSet = encodeURIComponent(tileMatrixSetId);
|
|
70
|
+
const template = `${baseUrl}/ogc/tiles/collections/${collection}/tiles/${matrixSet}/{z}/{y}/{x}`;
|
|
71
|
+
const source = {
|
|
72
|
+
type: "vector",
|
|
73
|
+
tiles: [template],
|
|
74
|
+
scheme: "xyz",
|
|
75
|
+
};
|
|
76
|
+
if (options.minzoom !== undefined)
|
|
77
|
+
source.minzoom = options.minzoom;
|
|
78
|
+
if (options.maxzoom !== undefined)
|
|
79
|
+
source.maxzoom = options.maxzoom;
|
|
80
|
+
return source;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Resolve the `source-layer` name to use in a MapLibre layer that renders
|
|
84
|
+
* the collection's vector tiles. The Honua server names the MVT layer after
|
|
85
|
+
* the collection identifier; for folder-prefixed identifiers the trailing
|
|
86
|
+
* segment is the layer name (the folder is a routing prefix, not part of
|
|
87
|
+
* the layer name baked into the tile).
|
|
88
|
+
*/
|
|
89
|
+
getDefaultSourceLayer(serviceId) {
|
|
90
|
+
const segments = serviceId.split("/");
|
|
91
|
+
return segments[segments.length - 1] ?? serviceId;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Convenience wrapper returning both the MapLibre vector {@link source}
|
|
95
|
+
* object and the {@link sourceLayer} name to wire into a layer definition.
|
|
96
|
+
*/
|
|
97
|
+
getMapLibreConfig(serviceId, options = {}) {
|
|
98
|
+
return {
|
|
99
|
+
source: this.getMapLibreVectorSource(serviceId, options),
|
|
100
|
+
sourceLayer: this.getDefaultSourceLayer(serviceId),
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Bound handle for one (collection × tile-matrix-set) tileset. Drops the
|
|
106
|
+
* discovery params from the per-call surface so callers focus on tile
|
|
107
|
+
* coordinates. Styled-tile access (the OGC `/styles/{styleId}` route) is
|
|
108
|
+
* not exposed here because the Honua server does not currently implement
|
|
109
|
+
* that route; the tile path is the canonical collection tile route.
|
|
110
|
+
*/
|
|
111
|
+
export class HonuaOgcTileset {
|
|
112
|
+
client;
|
|
113
|
+
collectionId;
|
|
114
|
+
tileMatrixSetId;
|
|
115
|
+
constructor(options) {
|
|
116
|
+
this.client = options.client;
|
|
117
|
+
this.collectionId = options.collectionId;
|
|
118
|
+
this.tileMatrixSetId = options.tileMatrixSetId;
|
|
119
|
+
}
|
|
120
|
+
async metadata(request = {}) {
|
|
121
|
+
return this.client.getOgcCollectionTileset({
|
|
122
|
+
...request,
|
|
123
|
+
collectionId: this.collectionId,
|
|
124
|
+
tileMatrixSetId: this.tileMatrixSetId,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
async tile(request) {
|
|
128
|
+
return this.client.fetchOgcTile({
|
|
129
|
+
...request,
|
|
130
|
+
collectionId: this.collectionId,
|
|
131
|
+
tileMatrixSetId: this.tileMatrixSetId,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
export function createHonuaOgcTiles(client) {
|
|
136
|
+
return new HonuaOgcTiles({ client });
|
|
137
|
+
}
|
|
138
|
+
// ── OGC API Tiles wire methods ──────────────────────────────────
|
|
139
|
+
//
|
|
140
|
+
// Concrete URL-building / param-serialization / response-handling for the
|
|
141
|
+
// OGC API Tiles endpoints, invoked against an injected transport. The client
|
|
142
|
+
// exposes thin `get*/list*/fetch*` delegators that call these.
|
|
143
|
+
export async function getOgcTilesLanding(transport, request = {}) {
|
|
144
|
+
const params = createOgcMetadataParams(request);
|
|
145
|
+
return transport.requestCachedMetadataJson(`ogc-tiles:landing:${params.toString()}`, `/ogc/tiles?${params.toString()}`, request);
|
|
146
|
+
}
|
|
147
|
+
export async function getOgcTilesConformance(transport, request = {}) {
|
|
148
|
+
const params = createOgcMetadataParams(request);
|
|
149
|
+
return transport.requestCachedMetadataJson(`ogc-tiles:conformance:${params.toString()}`, `/ogc/tiles/conformance?${params.toString()}`, request);
|
|
150
|
+
}
|
|
151
|
+
export async function listOgcTileMatrixSets(transport, request = {}) {
|
|
152
|
+
const params = createOgcMetadataParams(request);
|
|
153
|
+
return transport.requestCachedMetadataJson(`ogc-tiles:tile-matrix-sets:${params.toString()}`, `/ogc/tiles/tileMatrixSets?${params.toString()}`, request);
|
|
154
|
+
}
|
|
155
|
+
export async function getOgcTileMatrixSet(transport, request) {
|
|
156
|
+
const params = createOgcMetadataParams(request);
|
|
157
|
+
return transport.requestCachedMetadataJson(`ogc-tiles:tile-matrix-set:${request.tileMatrixSetId}:${params.toString()}`, `/ogc/tiles/tileMatrixSets/${encodeURIComponent(request.tileMatrixSetId)}?${params.toString()}`, request);
|
|
158
|
+
}
|
|
159
|
+
export async function listOgcCollectionTilesets(transport, request) {
|
|
160
|
+
const params = createOgcMetadataParams(request);
|
|
161
|
+
const path = `/ogc/tiles/collections/${encodeURIComponent(String(request.collectionId))}/tiles`;
|
|
162
|
+
return transport.requestCachedMetadataJson(`ogc-tiles:tilesets:${request.collectionId}:${params.toString()}`, `${path}?${params.toString()}`, request);
|
|
163
|
+
}
|
|
164
|
+
export async function getOgcCollectionTileset(transport, request) {
|
|
165
|
+
const params = createOgcMetadataParams(request);
|
|
166
|
+
const path = `/ogc/tiles/collections/${encodeURIComponent(String(request.collectionId))}` +
|
|
167
|
+
`/tiles/${encodeURIComponent(request.tileMatrixSetId)}`;
|
|
168
|
+
return transport.requestCachedMetadataJson(`ogc-tiles:tileset:${request.collectionId}:${request.tileMatrixSetId}:${params.toString()}`, `${path}?${params.toString()}`, request);
|
|
169
|
+
}
|
|
170
|
+
export async function fetchOgcTile(transport, request) {
|
|
171
|
+
const params = new URLSearchParams();
|
|
172
|
+
if (request.extraParams) {
|
|
173
|
+
for (const [key, value] of Object.entries(request.extraParams)) {
|
|
174
|
+
params.set(key, String(value));
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
const collection = encodeURIComponent(String(request.collectionId));
|
|
178
|
+
const matrixSet = encodeURIComponent(request.tileMatrixSetId);
|
|
179
|
+
const matrix = encodeURIComponent(String(request.tileMatrix));
|
|
180
|
+
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
181
|
+
const path = `/ogc/tiles/collections/${collection}/tiles/${matrixSet}/${matrix}/${request.tileRow}/${request.tileCol}${query}`;
|
|
182
|
+
return transport.requestBytes("GET", path, request.accept, undefined, request.signal);
|
|
183
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Linear-time string trimming helpers used for URL and path normalization.
|
|
3
|
+
*
|
|
4
|
+
* These intentionally avoid regular expressions such as `\/+$` or `^\/+`.
|
|
5
|
+
* Anchored quantifier regexes over repeated characters can exhibit
|
|
6
|
+
* super-linear (polynomial) matching on adversarial input, so the helpers
|
|
7
|
+
* below scan from the relevant end with simple index arithmetic, which is
|
|
8
|
+
* always O(n) regardless of input shape.
|
|
9
|
+
*/
|
|
10
|
+
/** Remove every trailing `/` character from `value`. */
|
|
11
|
+
export declare function trimTrailingSlashes(value: string): string;
|
|
12
|
+
/** Remove every leading `/` character from `value`. */
|
|
13
|
+
export declare function trimLeadingSlashes(value: string): string;
|
|
14
|
+
/** Remove every leading and trailing `/` character from `value`. */
|
|
15
|
+
export declare function trimSurroundingSlashes(value: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Remove leading and trailing runs of `char` from `value`.
|
|
18
|
+
*
|
|
19
|
+
* `char` must be a single-character string; only its first code unit is
|
|
20
|
+
* considered. Used for slug/identifier normalization (e.g. stripping `-`
|
|
21
|
+
* or `_` padding) without anchored `^x+|x+$` regexes.
|
|
22
|
+
*/
|
|
23
|
+
export declare function trimChar(value: string, char: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* Return `value` with any `?query` and `#fragment` suffix removed.
|
|
26
|
+
*
|
|
27
|
+
* Equivalent to `value.replace(/[?#].*$/, "")` but uses `indexOf` slicing
|
|
28
|
+
* so it stays linear and cannot backtrack.
|
|
29
|
+
*/
|
|
30
|
+
export declare function stripQueryAndFragment(value: string): string;
|
|
31
|
+
/**
|
|
32
|
+
* Return `value` with any `?query` suffix removed (the fragment, if present,
|
|
33
|
+
* is preserved). Equivalent to `value.replace(/\?.*$/, "")`.
|
|
34
|
+
*/
|
|
35
|
+
export declare function stripQuery(value: string): string;
|
|
36
|
+
/**
|
|
37
|
+
* Encode an Esri-style `serviceId` for use as a URL path segment, preserving
|
|
38
|
+
* folder structure.
|
|
39
|
+
*
|
|
40
|
+
* Esri/GeoServices services may be folder-organized, e.g.
|
|
41
|
+
* `MyFolder/MyService`. Naively passing the whole id through
|
|
42
|
+
* `encodeURIComponent` percent-encodes the `/` separator (`%2F`), collapsing
|
|
43
|
+
* the folder and service into a single path segment that the server cannot
|
|
44
|
+
* route. This helper splits on `/`, encodes each non-empty segment
|
|
45
|
+
* individually, and rejoins with `/` so the folder path is preserved while
|
|
46
|
+
* special characters within a segment (spaces, `&`, etc.) are still encoded.
|
|
47
|
+
*
|
|
48
|
+
* A plain `serviceId` without slashes behaves exactly like
|
|
49
|
+
* `encodeURIComponent(serviceId)`. Empty segments produced by leading,
|
|
50
|
+
* trailing, or doubled slashes are dropped so the result never contains
|
|
51
|
+
* stray `/` runs. Use {@link encodePathSegments} instead when empty segments
|
|
52
|
+
* must be preserved verbatim.
|
|
53
|
+
*/
|
|
54
|
+
export declare function encodeServiceIdPath(serviceId: string): string;
|
|
55
|
+
/**
|
|
56
|
+
* Percent-encode a path that may contain `/` separators, encoding each
|
|
57
|
+
* segment independently so the separators survive.
|
|
58
|
+
*
|
|
59
|
+
* `encodeURIComponent("a/b")` returns `a%2Fb`, which is wrong for
|
|
60
|
+
* folder-prefixed identifiers such as `myFolder/parcels` that must serialize
|
|
61
|
+
* as `myFolder/parcels` on the wire. Splitting on `/` and encoding each
|
|
62
|
+
* segment keeps the separators literal while still escaping reserved
|
|
63
|
+
* characters inside each segment. Empty segments (leading/trailing/double
|
|
64
|
+
* slashes) are preserved verbatim so callers retain full control over the
|
|
65
|
+
* resulting path shape. Use {@link encodeServiceIdPath} when empty segments
|
|
66
|
+
* should instead be dropped (e.g. routable Esri service ids).
|
|
67
|
+
*/
|
|
68
|
+
export declare function encodePathSegments(value: string): string;
|
|
69
|
+
//# sourceMappingURL=path-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-utils.d.ts","sourceRoot":"","sources":["../../../src/core/path-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,wDAAwD;AACxD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMzD;AAED,uDAAuD;AACvD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMxD;AAED,oEAAoE;AACpE,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAW5D;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAU3D;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGhD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAS7D;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQxD"}
|