@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,103 @@
|
|
|
1
|
+
import type { HonuaFeatureServiceSourceSpecification, HonuaLayerSpecification, HonuaMapServiceSourceSpecification, HonuaStyleSpecification } from "../style/specification.js";
|
|
2
|
+
/** Standard MapLibre raster source shape used by migrated tiled services. */
|
|
3
|
+
export interface HonuaMapLibreRasterSourceSpecification {
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
type: "raster";
|
|
6
|
+
tiles: string[];
|
|
7
|
+
tileSize?: number;
|
|
8
|
+
attribution?: string;
|
|
9
|
+
}
|
|
10
|
+
/** Layer/source pair consumed by {@link createHonuaMapLibreStyle}. */
|
|
11
|
+
export interface HonuaMapLibreLayerDefinition {
|
|
12
|
+
id: string;
|
|
13
|
+
sourceId: string;
|
|
14
|
+
source: HonuaFeatureServiceSourceSpecification | HonuaMapServiceSourceSpecification | HonuaMapLibreRasterSourceSpecification;
|
|
15
|
+
layer: HonuaLayerSpecification;
|
|
16
|
+
}
|
|
17
|
+
/** Shared options for migrated ArcGIS layer constructors. */
|
|
18
|
+
export interface HonuaMapLibreLayerOptionsBase {
|
|
19
|
+
id?: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
visible?: boolean;
|
|
22
|
+
opacity?: number;
|
|
23
|
+
minScale?: number;
|
|
24
|
+
maxScale?: number;
|
|
25
|
+
attribution?: string;
|
|
26
|
+
paint?: Record<string, unknown>;
|
|
27
|
+
layout?: Record<string, unknown>;
|
|
28
|
+
}
|
|
29
|
+
/** Options for an ArcGIS FeatureLayer migrated into a Honua feature-service source. */
|
|
30
|
+
export interface HonuaFeatureServiceLayerOptions extends HonuaMapLibreLayerOptionsBase {
|
|
31
|
+
url: string;
|
|
32
|
+
outFields?: string[];
|
|
33
|
+
definitionExpression?: string;
|
|
34
|
+
returnGeometry?: boolean;
|
|
35
|
+
outSR?: number;
|
|
36
|
+
layerType?: "circle" | "line" | "fill";
|
|
37
|
+
}
|
|
38
|
+
/** Options for an ArcGIS MapImageLayer migrated into a Honua map-service source. */
|
|
39
|
+
export interface HonuaMapServiceLayerOptions extends HonuaMapLibreLayerOptionsBase {
|
|
40
|
+
url: string;
|
|
41
|
+
sublayers?: unknown;
|
|
42
|
+
layers?: string;
|
|
43
|
+
dpi?: number;
|
|
44
|
+
format?: "png" | "png24" | "png32" | "jpg" | "gif";
|
|
45
|
+
transparent?: boolean;
|
|
46
|
+
}
|
|
47
|
+
/** Options for an ArcGIS TileLayer migrated into a MapLibre raster tile source. */
|
|
48
|
+
export interface HonuaTileServiceLayerOptions extends HonuaMapLibreLayerOptionsBase {
|
|
49
|
+
url: string;
|
|
50
|
+
tileSize?: number;
|
|
51
|
+
}
|
|
52
|
+
/** Options for an ArcGIS Map migrated into a MapLibre style document. */
|
|
53
|
+
export interface HonuaMapLibreStyleOptions {
|
|
54
|
+
basemap?: string;
|
|
55
|
+
layers?: readonly HonuaMapLibreLayerDefinition[];
|
|
56
|
+
name?: string;
|
|
57
|
+
center?: [number, number];
|
|
58
|
+
zoom?: number;
|
|
59
|
+
}
|
|
60
|
+
/** Options for an ArcGIS MapView migrated into MapLibre's `Map` constructor. */
|
|
61
|
+
export interface HonuaMapLibreMapOptions {
|
|
62
|
+
map?: HonuaStyleSpecification;
|
|
63
|
+
style?: HonuaStyleSpecification;
|
|
64
|
+
container?: string | HTMLElement;
|
|
65
|
+
center?: [number, number];
|
|
66
|
+
zoom?: number;
|
|
67
|
+
bearing?: number;
|
|
68
|
+
pitch?: number;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Create a Honua feature-service source and a default MapLibre render layer.
|
|
72
|
+
*
|
|
73
|
+
* The returned `source` carries the custom `honua-feature-service` type, which
|
|
74
|
+
* MapLibre's renderer does not understand on its own — adding it to a
|
|
75
|
+
* `maplibre-gl` `Map` directly is a silent no-op. To render it, run the layer's
|
|
76
|
+
* source through the MapLibre runtime adapter
|
|
77
|
+
* (`loadHonuaFeatureServiceGeoJson` / `registerHonuaFeatureServiceSources` from
|
|
78
|
+
* `@honua/sdk-js/map`), which fetches features via the SDK and produces a
|
|
79
|
+
* standard `geojson` source. This differs from
|
|
80
|
+
* {@link createHonuaTileServiceLayer}, which emits a native MapLibre `raster`
|
|
81
|
+
* source that renders without an adapter.
|
|
82
|
+
*
|
|
83
|
+
* @see loadHonuaFeatureServiceGeoJson
|
|
84
|
+
* @see registerHonuaFeatureServiceSources
|
|
85
|
+
*/
|
|
86
|
+
export declare function createHonuaFeatureServiceLayer(options: HonuaFeatureServiceLayerOptions): HonuaMapLibreLayerDefinition;
|
|
87
|
+
/**
|
|
88
|
+
* Create a Honua map-service source and a default MapLibre raster layer.
|
|
89
|
+
*/
|
|
90
|
+
export declare function createHonuaMapServiceLayer(options: HonuaMapServiceLayerOptions): HonuaMapLibreLayerDefinition;
|
|
91
|
+
/**
|
|
92
|
+
* Create a MapLibre raster source and layer for an ArcGIS tiled service.
|
|
93
|
+
*/
|
|
94
|
+
export declare function createHonuaTileServiceLayer(options: HonuaTileServiceLayerOptions): HonuaMapLibreLayerDefinition;
|
|
95
|
+
/**
|
|
96
|
+
* Create a MapLibre style document from migrated ArcGIS `Map` options.
|
|
97
|
+
*/
|
|
98
|
+
export declare function createHonuaMapLibreStyle(options?: HonuaMapLibreStyleOptions): HonuaStyleSpecification;
|
|
99
|
+
/**
|
|
100
|
+
* Create the options object passed to `new maplibregl.Map(...)`.
|
|
101
|
+
*/
|
|
102
|
+
export declare function createHonuaMapLibreMapOptions(options: HonuaMapLibreMapOptions): Record<string, unknown>;
|
|
103
|
+
//# sourceMappingURL=maplibre-target.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maplibre-target.d.ts","sourceRoot":"","sources":["../../../src/map/maplibre-target.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,sCAAsC,EACtC,uBAAuB,EACvB,kCAAkC,EAClC,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AAEnC,6EAA6E;AAC7E,MAAM,WAAW,sCAAsC;IACrD,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,sEAAsE;AACtE,MAAM,WAAW,4BAA4B;IAC3C,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EACF,sCAAsC,GACtC,kCAAkC,GAClC,sCAAsC,CAAC;IAC3C,KAAK,EAAE,uBAAuB,CAAC;CAChC;AAED,6DAA6D;AAC7D,MAAM,WAAW,6BAA6B;IAC5C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,uFAAuF;AACvF,MAAM,WAAW,+BAAgC,SAAQ,6BAA6B;IACpF,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;CACxC;AAED,oFAAoF;AACpF,MAAM,WAAW,2BAA4B,SAAQ,6BAA6B;IAChF,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK,CAAC;IACnD,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,mFAAmF;AACnF,MAAM,WAAW,4BAA6B,SAAQ,6BAA6B;IACjF,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,yEAAyE;AACzE,MAAM,WAAW,yBAAyB;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,SAAS,4BAA4B,EAAE,CAAC;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,gFAAgF;AAChF,MAAM,WAAW,uBAAuB;IACtC,GAAG,CAAC,EAAE,uBAAuB,CAAC;IAC9B,KAAK,CAAC,EAAE,uBAAuB,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;IACjC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,+BAA+B,GAAG,4BAA4B,CAmBrH;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,2BAA2B,GAAG,4BAA4B,CAkB7G;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,4BAA4B,GAAG,4BAA4B,CAgB/G;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,GAAE,yBAA8B,GAAG,uBAAuB,CAkBzG;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAUvG"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { stripQueryAndFragment, trimTrailingSlashes } from "../core/path-utils.js";
|
|
2
|
+
/**
|
|
3
|
+
* Create a Honua feature-service source and a default MapLibre render layer.
|
|
4
|
+
*
|
|
5
|
+
* The returned `source` carries the custom `honua-feature-service` type, which
|
|
6
|
+
* MapLibre's renderer does not understand on its own — adding it to a
|
|
7
|
+
* `maplibre-gl` `Map` directly is a silent no-op. To render it, run the layer's
|
|
8
|
+
* source through the MapLibre runtime adapter
|
|
9
|
+
* (`loadHonuaFeatureServiceGeoJson` / `registerHonuaFeatureServiceSources` from
|
|
10
|
+
* `@honua/sdk-js/map`), which fetches features via the SDK and produces a
|
|
11
|
+
* standard `geojson` source. This differs from
|
|
12
|
+
* {@link createHonuaTileServiceLayer}, which emits a native MapLibre `raster`
|
|
13
|
+
* source that renders without an adapter.
|
|
14
|
+
*
|
|
15
|
+
* @see loadHonuaFeatureServiceGeoJson
|
|
16
|
+
* @see registerHonuaFeatureServiceSources
|
|
17
|
+
*/
|
|
18
|
+
export function createHonuaFeatureServiceLayer(options) {
|
|
19
|
+
const sourceId = normalizeLayerId(options.id, options.title, options.url, "feature-service");
|
|
20
|
+
const layerType = options.layerType ?? "circle";
|
|
21
|
+
const source = {
|
|
22
|
+
type: "honua-feature-service",
|
|
23
|
+
url: options.url,
|
|
24
|
+
...(options.attribution ? { attribution: options.attribution } : {}),
|
|
25
|
+
...(options.definitionExpression ? { definitionExpression: options.definitionExpression } : {}),
|
|
26
|
+
...(options.outFields ? { outFields: [...options.outFields] } : {}),
|
|
27
|
+
...(options.returnGeometry !== undefined ? { returnGeometry: options.returnGeometry } : {}),
|
|
28
|
+
...(options.outSR !== undefined ? { outSR: options.outSR } : {}),
|
|
29
|
+
};
|
|
30
|
+
return {
|
|
31
|
+
id: sourceId,
|
|
32
|
+
sourceId,
|
|
33
|
+
source,
|
|
34
|
+
layer: buildLayer(sourceId, layerType, options),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Create a Honua map-service source and a default MapLibre raster layer.
|
|
39
|
+
*/
|
|
40
|
+
export function createHonuaMapServiceLayer(options) {
|
|
41
|
+
const sourceId = normalizeLayerId(options.id, options.title, options.url, "map-service");
|
|
42
|
+
const source = {
|
|
43
|
+
type: "honua-map-service",
|
|
44
|
+
url: options.url,
|
|
45
|
+
...(options.attribution ? { attribution: options.attribution } : {}),
|
|
46
|
+
...(options.layers ? { layers: options.layers } : {}),
|
|
47
|
+
...(options.dpi !== undefined ? { dpi: options.dpi } : {}),
|
|
48
|
+
...(options.format ? { format: options.format } : {}),
|
|
49
|
+
...(options.transparent !== undefined ? { transparent: options.transparent } : {}),
|
|
50
|
+
};
|
|
51
|
+
return {
|
|
52
|
+
id: sourceId,
|
|
53
|
+
sourceId,
|
|
54
|
+
source,
|
|
55
|
+
layer: buildLayer(sourceId, "raster", options),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Create a MapLibre raster source and layer for an ArcGIS tiled service.
|
|
60
|
+
*/
|
|
61
|
+
export function createHonuaTileServiceLayer(options) {
|
|
62
|
+
const sourceId = normalizeLayerId(options.id, options.title, options.url, "tile-service");
|
|
63
|
+
const baseUrl = trimTrailingSlashes(options.url);
|
|
64
|
+
const source = {
|
|
65
|
+
type: "raster",
|
|
66
|
+
tiles: [`${baseUrl}/tile/{z}/{y}/{x}`],
|
|
67
|
+
tileSize: options.tileSize ?? 256,
|
|
68
|
+
...(options.attribution ? { attribution: options.attribution } : {}),
|
|
69
|
+
};
|
|
70
|
+
return {
|
|
71
|
+
id: sourceId,
|
|
72
|
+
sourceId,
|
|
73
|
+
source,
|
|
74
|
+
layer: buildLayer(sourceId, "raster", options),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Create a MapLibre style document from migrated ArcGIS `Map` options.
|
|
79
|
+
*/
|
|
80
|
+
export function createHonuaMapLibreStyle(options = {}) {
|
|
81
|
+
const sources = {};
|
|
82
|
+
const layers = [];
|
|
83
|
+
for (const layer of options.layers ?? []) {
|
|
84
|
+
sources[layer.sourceId] = layer.source;
|
|
85
|
+
layers.push(layer.layer);
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
version: 8,
|
|
89
|
+
...(options.name ? { name: options.name } : {}),
|
|
90
|
+
...(options.center ? { center: options.center } : {}),
|
|
91
|
+
...(options.zoom !== undefined ? { zoom: options.zoom } : {}),
|
|
92
|
+
metadata: options.basemap ? { "honua:arcgis-basemap": options.basemap } : undefined,
|
|
93
|
+
sources,
|
|
94
|
+
layers,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Create the options object passed to `new maplibregl.Map(...)`.
|
|
99
|
+
*/
|
|
100
|
+
export function createHonuaMapLibreMapOptions(options) {
|
|
101
|
+
const style = options.style ?? options.map ?? createHonuaMapLibreStyle();
|
|
102
|
+
return {
|
|
103
|
+
style,
|
|
104
|
+
...(options.container !== undefined ? { container: options.container } : {}),
|
|
105
|
+
...(options.center ? { center: options.center } : {}),
|
|
106
|
+
...(options.zoom !== undefined ? { zoom: options.zoom } : {}),
|
|
107
|
+
...(options.bearing !== undefined ? { bearing: options.bearing } : {}),
|
|
108
|
+
...(options.pitch !== undefined ? { pitch: options.pitch } : {}),
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
function buildLayer(sourceId, type, options) {
|
|
112
|
+
return {
|
|
113
|
+
id: `${sourceId}-${type}`,
|
|
114
|
+
source: sourceId,
|
|
115
|
+
type,
|
|
116
|
+
...(options.visible === false ? { layout: { ...(options.layout ?? {}), visibility: "none" } } : {}),
|
|
117
|
+
...(options.visible !== false && options.layout ? { layout: options.layout } : {}),
|
|
118
|
+
...(options.paint || options.opacity !== undefined ? { paint: buildPaint(type, options) } : {}),
|
|
119
|
+
...(options.minScale !== undefined ? { minzoom: scaleToZoom(options.minScale) } : {}),
|
|
120
|
+
...(options.maxScale !== undefined ? { maxzoom: scaleToZoom(options.maxScale) } : {}),
|
|
121
|
+
metadata: {
|
|
122
|
+
...(options.title ? { title: options.title } : {}),
|
|
123
|
+
...(options.id ? { "honua:source-id": options.id } : {}),
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
function buildPaint(type, options) {
|
|
128
|
+
const paint = { ...(options.paint ?? {}) };
|
|
129
|
+
if (options.opacity === undefined) {
|
|
130
|
+
return paint;
|
|
131
|
+
}
|
|
132
|
+
if (type === "circle")
|
|
133
|
+
paint["circle-opacity"] = options.opacity;
|
|
134
|
+
if (type === "line")
|
|
135
|
+
paint["line-opacity"] = options.opacity;
|
|
136
|
+
if (type === "fill")
|
|
137
|
+
paint["fill-opacity"] = options.opacity;
|
|
138
|
+
if (type === "raster")
|
|
139
|
+
paint["raster-opacity"] = options.opacity;
|
|
140
|
+
return paint;
|
|
141
|
+
}
|
|
142
|
+
function normalizeLayerId(id, title, url, fallback) {
|
|
143
|
+
return sanitizeId(id ?? title ?? lastUrlSegment(url) ?? fallback);
|
|
144
|
+
}
|
|
145
|
+
function lastUrlSegment(url) {
|
|
146
|
+
const trimmed = trimTrailingSlashes(stripQueryAndFragment(url));
|
|
147
|
+
const segment = trimmed.slice(trimmed.lastIndexOf("/") + 1);
|
|
148
|
+
return segment || undefined;
|
|
149
|
+
}
|
|
150
|
+
function sanitizeId(value) {
|
|
151
|
+
const id = value
|
|
152
|
+
.trim()
|
|
153
|
+
.replace(/([a-z0-9])([A-Z])/g, "$1-$2")
|
|
154
|
+
.replace(/[^A-Za-z0-9_-]+/g, "-")
|
|
155
|
+
.replace(/^-+|-+$/g, "")
|
|
156
|
+
.toLowerCase();
|
|
157
|
+
return id || "layer";
|
|
158
|
+
}
|
|
159
|
+
function scaleToZoom(scale) {
|
|
160
|
+
if (!Number.isFinite(scale) || scale <= 0) {
|
|
161
|
+
return 0;
|
|
162
|
+
}
|
|
163
|
+
return Math.max(0, Math.log2(591657550.5 / scale));
|
|
164
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WebMap JSON → MapLibre style derivation for the `honua-maplibre`
|
|
3
|
+
* migration target.
|
|
4
|
+
*
|
|
5
|
+
* This module is a thin orchestrator on top of `src/webmap/parseWebMap`
|
|
6
|
+
* (which already converts basemap, operational layers, renderers, popups,
|
|
7
|
+
* labels, and extents) plus a structured-gap classifier that records the
|
|
8
|
+
* unsupported constructs the migration punch list cares about:
|
|
9
|
+
*
|
|
10
|
+
* - Arcade expressions (popupInfo.expressionInfos, label Arcade)
|
|
11
|
+
* - Unknown / unsupported renderer types (heatmap, dotDensity, …)
|
|
12
|
+
* - 3D / Scene references (ground, viewingMode, SceneServiceLayer, …)
|
|
13
|
+
* - Dashboard / ExperienceBuilder / custom-widget host shells
|
|
14
|
+
*
|
|
15
|
+
* The function is pure: callers supply the WebMap JSON, no network or
|
|
16
|
+
* disk I/O is performed.
|
|
17
|
+
*
|
|
18
|
+
* @module
|
|
19
|
+
*/
|
|
20
|
+
import type { HonuaStyleSpecification } from "../style/specification.js";
|
|
21
|
+
import type { WebMapJson } from "../webmap/types.js";
|
|
22
|
+
/** Stable taxonomy for the gaps the punch list expects callers to handle. */
|
|
23
|
+
export type WebMapMapLibreGapKind = "arcade-expression" | "unsupported-renderer" | "scene-3d" | "dashboard-reference" | "experience-builder-reference" | "custom-widget-reference" | "unsupported-symbol" | "unsupported-layer-type" | "unsupported-feature-collection" | "unsupported-webmap-version" | "other";
|
|
24
|
+
/** A single unsupported construct discovered while deriving the style. */
|
|
25
|
+
export interface WebMapMapLibreManualGap {
|
|
26
|
+
kind: WebMapMapLibreGapKind;
|
|
27
|
+
/** Human-readable explanation surfaced in reports / TODO annotations. */
|
|
28
|
+
reason: string;
|
|
29
|
+
/** Path within the WebMap JSON (e.g. `operationalLayers[2].popupInfo`). */
|
|
30
|
+
path?: string;
|
|
31
|
+
/** Operational layer id, when the gap is attributable to a specific layer. */
|
|
32
|
+
layerId?: string;
|
|
33
|
+
/** The offending Arcade expression text, when applicable. */
|
|
34
|
+
expression?: string;
|
|
35
|
+
/** Extra context (renderer type, scene layer URL, widget name, …). */
|
|
36
|
+
context?: Record<string, unknown>;
|
|
37
|
+
}
|
|
38
|
+
export interface WebMapJsonToMapLibreStyleOptions {
|
|
39
|
+
/** Whether to include the basemap in the derived style. Defaults to true. */
|
|
40
|
+
includeBasemap?: boolean;
|
|
41
|
+
}
|
|
42
|
+
export interface WebMapJsonToMapLibreStyleResult {
|
|
43
|
+
/** A MapLibre-shaped style document suitable for `map.setStyle(...)`. */
|
|
44
|
+
style: HonuaStyleSpecification;
|
|
45
|
+
/** Structured gap entries — one per unsupported construct. */
|
|
46
|
+
manualGaps: WebMapMapLibreManualGap[];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Derive a MapLibre style document from an ArcGIS WebMap JSON payload.
|
|
50
|
+
*
|
|
51
|
+
* Reuses the entire `src/webmap/*` conversion pipeline (`convertBasemap`,
|
|
52
|
+
* `convertOperationalLayer`, `convertRenderer`, `convertPopupInfo`,
|
|
53
|
+
* `convertLabelingInfo`, `convertExtent`) via `parseWebMap`. The
|
|
54
|
+
* `parseWebMap` warnings are then mapped onto the structured `manualGaps`
|
|
55
|
+
* taxonomy, and additional gaps are appended for Dashboard /
|
|
56
|
+
* ExperienceBuilder / custom-widget shell properties that the WebMap
|
|
57
|
+
* converter itself doesn't model.
|
|
58
|
+
*/
|
|
59
|
+
export declare function webmapJsonToMapLibreStyle(webmap: WebMapJson, options?: WebMapJsonToMapLibreStyleOptions): WebMapJsonToMapLibreStyleResult;
|
|
60
|
+
//# sourceMappingURL=webmap-maplibre.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webmap-maplibre.d.ts","sourceRoot":"","sources":["../../../src/map/webmap-maplibre.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,6EAA6E;AAC7E,MAAM,MAAM,qBAAqB,GAC7B,mBAAmB,GACnB,sBAAsB,GACtB,UAAU,GACV,qBAAqB,GACrB,8BAA8B,GAC9B,yBAAyB,GACzB,oBAAoB,GACpB,wBAAwB,GACxB,gCAAgC,GAChC,4BAA4B,GAC5B,OAAO,CAAC;AAEZ,0EAA0E;AAC1E,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED,MAAM,WAAW,gCAAgC;IAC/C,6EAA6E;IAC7E,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,+BAA+B;IAC9C,yEAAyE;IACzE,KAAK,EAAE,uBAAuB,CAAC;IAC/B,8DAA8D;IAC9D,UAAU,EAAE,uBAAuB,EAAE,CAAC;CACvC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,UAAU,EAClB,OAAO,GAAE,gCAAqC,GAC7C,+BAA+B,CAyBjC"}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WebMap JSON → MapLibre style derivation for the `honua-maplibre`
|
|
3
|
+
* migration target.
|
|
4
|
+
*
|
|
5
|
+
* This module is a thin orchestrator on top of `src/webmap/parseWebMap`
|
|
6
|
+
* (which already converts basemap, operational layers, renderers, popups,
|
|
7
|
+
* labels, and extents) plus a structured-gap classifier that records the
|
|
8
|
+
* unsupported constructs the migration punch list cares about:
|
|
9
|
+
*
|
|
10
|
+
* - Arcade expressions (popupInfo.expressionInfos, label Arcade)
|
|
11
|
+
* - Unknown / unsupported renderer types (heatmap, dotDensity, …)
|
|
12
|
+
* - 3D / Scene references (ground, viewingMode, SceneServiceLayer, …)
|
|
13
|
+
* - Dashboard / ExperienceBuilder / custom-widget host shells
|
|
14
|
+
*
|
|
15
|
+
* The function is pure: callers supply the WebMap JSON, no network or
|
|
16
|
+
* disk I/O is performed.
|
|
17
|
+
*
|
|
18
|
+
* @module
|
|
19
|
+
*/
|
|
20
|
+
import { parseWebMap } from "../webmap/parse.js";
|
|
21
|
+
/**
|
|
22
|
+
* Derive a MapLibre style document from an ArcGIS WebMap JSON payload.
|
|
23
|
+
*
|
|
24
|
+
* Reuses the entire `src/webmap/*` conversion pipeline (`convertBasemap`,
|
|
25
|
+
* `convertOperationalLayer`, `convertRenderer`, `convertPopupInfo`,
|
|
26
|
+
* `convertLabelingInfo`, `convertExtent`) via `parseWebMap`. The
|
|
27
|
+
* `parseWebMap` warnings are then mapped onto the structured `manualGaps`
|
|
28
|
+
* taxonomy, and additional gaps are appended for Dashboard /
|
|
29
|
+
* ExperienceBuilder / custom-widget shell properties that the WebMap
|
|
30
|
+
* converter itself doesn't model.
|
|
31
|
+
*/
|
|
32
|
+
export function webmapJsonToMapLibreStyle(webmap, options = {}) {
|
|
33
|
+
const parsed = parseWebMap(webmap, {
|
|
34
|
+
includeBasemap: options.includeBasemap !== false,
|
|
35
|
+
});
|
|
36
|
+
const manualGaps = [];
|
|
37
|
+
for (const warning of parsed.warnings) {
|
|
38
|
+
const gap = classifyWarning(warning, webmap);
|
|
39
|
+
if (gap) {
|
|
40
|
+
manualGaps.push(gap);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
// Detect Dashboard / ExperienceBuilder / custom-widget shells that
|
|
44
|
+
// `parseWebMap` does not model. These appear at the top of WebMap-
|
|
45
|
+
// adjacent application documents (Dashboards, Experience Builder
|
|
46
|
+
// configs, web-app items) and on the WebMap when authored by those
|
|
47
|
+
// apps. We never raise the renderer/popup conversion result over
|
|
48
|
+
// them — we only record a gap so the caller can replan that surface.
|
|
49
|
+
detectShellGaps(webmap, manualGaps);
|
|
50
|
+
return {
|
|
51
|
+
style: parsed.style,
|
|
52
|
+
manualGaps,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
// ── Internals ───────────────────────────────────────────────────────────
|
|
56
|
+
function classifyWarning(warning, webmap) {
|
|
57
|
+
const layerId = resolveLayerIdFromPath(warning.path, webmap);
|
|
58
|
+
const base = {
|
|
59
|
+
path: warning.path,
|
|
60
|
+
...(layerId ? { layerId } : {}),
|
|
61
|
+
...(warning.context ? { context: warning.context } : {}),
|
|
62
|
+
};
|
|
63
|
+
switch (warning.code) {
|
|
64
|
+
case "unsupported-arcade-expression":
|
|
65
|
+
case "complex-arcade":
|
|
66
|
+
case "complex-label-expression": {
|
|
67
|
+
const expression = pickStringContext(warning.context, ["expression", "value"]);
|
|
68
|
+
return {
|
|
69
|
+
kind: "arcade-expression",
|
|
70
|
+
reason: warning.message,
|
|
71
|
+
...(expression ? { expression } : {}),
|
|
72
|
+
...base,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
case "unsupported-renderer": {
|
|
76
|
+
return {
|
|
77
|
+
kind: "unsupported-renderer",
|
|
78
|
+
reason: warning.message,
|
|
79
|
+
...base,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
case "unsupported-3d-property": {
|
|
83
|
+
return {
|
|
84
|
+
kind: "scene-3d",
|
|
85
|
+
reason: warning.message,
|
|
86
|
+
...base,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
case "unsupported-symbol":
|
|
90
|
+
return { kind: "unsupported-symbol", reason: warning.message, ...base };
|
|
91
|
+
case "unsupported-layer-type":
|
|
92
|
+
return { kind: "unsupported-layer-type", reason: warning.message, ...base };
|
|
93
|
+
case "unsupported-feature-collection":
|
|
94
|
+
return { kind: "unsupported-feature-collection", reason: warning.message, ...base };
|
|
95
|
+
case "unsupported-webmap-version":
|
|
96
|
+
return { kind: "unsupported-webmap-version", reason: warning.message, ...base };
|
|
97
|
+
// Warnings the punch list does not (yet) treat as a manual gap:
|
|
98
|
+
// `sprite-required` (picture marker needs a sprite — degrades but
|
|
99
|
+
// doesn't block), `missing-field` (classBreaks misuse — caller's
|
|
100
|
+
// data error, not a target gap), `unknown-property` (forward-compat
|
|
101
|
+
// pass-through), `unsupported-viewpoint-geometry` (rare and
|
|
102
|
+
// recoverable). We deliberately do not invent gap entries for
|
|
103
|
+
// those; they remain in `parseWebMap` warnings for diagnostics.
|
|
104
|
+
case "sprite-required":
|
|
105
|
+
case "missing-field":
|
|
106
|
+
case "unknown-property":
|
|
107
|
+
case "unsupported-viewpoint-geometry":
|
|
108
|
+
return undefined;
|
|
109
|
+
default:
|
|
110
|
+
return {
|
|
111
|
+
kind: "other",
|
|
112
|
+
reason: warning.message,
|
|
113
|
+
...base,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Inspect the WebMap document for shell properties belonging to
|
|
119
|
+
* Dashboards, Experience Builder, or generic custom-widget hosts.
|
|
120
|
+
*
|
|
121
|
+
* The WebMap JSON spec doesn't model these directly — they appear on
|
|
122
|
+
* application documents that wrap a WebMap — but they often leak into
|
|
123
|
+
* WebMap payloads exported from those products. Recording a gap lets
|
|
124
|
+
* the migration report flag them instead of silently dropping them.
|
|
125
|
+
*/
|
|
126
|
+
function detectShellGaps(webmap, gaps) {
|
|
127
|
+
// Dashboard authoring metadata.
|
|
128
|
+
if (hasOwn(webmap, "dashboard") || isDashboardItemType(webmap)) {
|
|
129
|
+
gaps.push({
|
|
130
|
+
kind: "dashboard-reference",
|
|
131
|
+
reason: "WebMap payload carries Dashboard application properties; Dashboard widgets do not map to a MapLibre style and require manual reauthoring.",
|
|
132
|
+
path: hasOwn(webmap, "dashboard") ? "dashboard" : "type",
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
// Experience Builder authoring metadata.
|
|
136
|
+
if (hasOwn(webmap, "experience") || hasOwn(webmap, "experienceBuilder") || isExperienceBuilderItemType(webmap)) {
|
|
137
|
+
gaps.push({
|
|
138
|
+
kind: "experience-builder-reference",
|
|
139
|
+
reason: "WebMap payload carries Experience Builder application properties; Experience Builder pages do not map to a MapLibre style and require manual reauthoring.",
|
|
140
|
+
path: hasOwn(webmap, "experience")
|
|
141
|
+
? "experience"
|
|
142
|
+
: hasOwn(webmap, "experienceBuilder")
|
|
143
|
+
? "experienceBuilder"
|
|
144
|
+
: "type",
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
// Generic custom-widget host shells. We do NOT treat the built-in 2D
|
|
148
|
+
// widget set (Home, Compass, Zoom, …) as a gap — those have parity
|
|
149
|
+
// shims in src/esri-compat. Only widget hosts that carry a free-form
|
|
150
|
+
// `widgets`/`widgetsOnScreen` payload, which is what custom widgets
|
|
151
|
+
// and 3rd-party plugins ride on, get flagged.
|
|
152
|
+
const appProps = webmap.applicationProperties;
|
|
153
|
+
if (appProps && typeof appProps === "object") {
|
|
154
|
+
const viewing = appProps.viewing;
|
|
155
|
+
if (viewing && typeof viewing === "object" && hasOwn(viewing, "widgetsOnScreen")) {
|
|
156
|
+
gaps.push({
|
|
157
|
+
kind: "custom-widget-reference",
|
|
158
|
+
reason: "WebMap.applicationProperties.viewing.widgetsOnScreen references custom widgets that must be ported individually to MapLibre/Honua controls.",
|
|
159
|
+
path: "applicationProperties.viewing.widgetsOnScreen",
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
const customWidgets = webmap.widgets;
|
|
164
|
+
if (Array.isArray(customWidgets) && customWidgets.length > 0) {
|
|
165
|
+
gaps.push({
|
|
166
|
+
kind: "custom-widget-reference",
|
|
167
|
+
reason: "WebMap.widgets array references custom widgets that require manual MapLibre/Honua reimplementation.",
|
|
168
|
+
path: "widgets",
|
|
169
|
+
context: { count: customWidgets.length },
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
function isDashboardItemType(webmap) {
|
|
174
|
+
const value = webmap.type;
|
|
175
|
+
return typeof value === "string" && /dashboard/i.test(value);
|
|
176
|
+
}
|
|
177
|
+
function isExperienceBuilderItemType(webmap) {
|
|
178
|
+
const value = webmap.type;
|
|
179
|
+
return typeof value === "string" && /experience\s*builder|web\s*experience/i.test(value);
|
|
180
|
+
}
|
|
181
|
+
function hasOwn(obj, key) {
|
|
182
|
+
return Object.prototype.hasOwnProperty.call(obj, key);
|
|
183
|
+
}
|
|
184
|
+
function pickStringContext(context, keys) {
|
|
185
|
+
if (!context)
|
|
186
|
+
return undefined;
|
|
187
|
+
for (const key of keys) {
|
|
188
|
+
const value = context[key];
|
|
189
|
+
if (typeof value === "string" && value.length > 0) {
|
|
190
|
+
return value;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return undefined;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Best-effort `layerId` extraction from a warning path such as
|
|
197
|
+
* `operationalLayers[2].layerDefinition.drawingInfo.renderer`. Falls
|
|
198
|
+
* back to the synthesized `operational-<index>` id used by
|
|
199
|
+
* `convertOperationalLayer` when no explicit id is present.
|
|
200
|
+
*/
|
|
201
|
+
function resolveLayerIdFromPath(path, webmap) {
|
|
202
|
+
const match = path.match(/operationalLayers\[(\d+)\]/);
|
|
203
|
+
if (!match)
|
|
204
|
+
return undefined;
|
|
205
|
+
const index = Number.parseInt(match[1], 10);
|
|
206
|
+
if (!Number.isFinite(index))
|
|
207
|
+
return undefined;
|
|
208
|
+
const layer = webmap.operationalLayers?.[index];
|
|
209
|
+
if (!layer)
|
|
210
|
+
return `operational-${index}`;
|
|
211
|
+
return layer.id ?? `operational-${index}`;
|
|
212
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@honua/react",
|
|
3
|
+
"version": "0.0.20-alpha.0",
|
|
4
|
+
"description": "React bindings for the Honua SDK: provider, hooks, and map components",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./react/index.js",
|
|
8
|
+
"types": "./react/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./react/index.d.ts",
|
|
12
|
+
"default": "./react/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@maplibre/maplibre-gl-style-spec": "^24.7.0"
|
|
17
|
+
},
|
|
18
|
+
"peerDependencies": {
|
|
19
|
+
"react": "^18.2.0 || ^19.0.0",
|
|
20
|
+
"react-dom": "^18.2.0 || ^19.0.0",
|
|
21
|
+
"maplibre-gl": "^5.0.0"
|
|
22
|
+
},
|
|
23
|
+
"peerDependenciesMeta": {
|
|
24
|
+
"react": {
|
|
25
|
+
"optional": true
|
|
26
|
+
},
|
|
27
|
+
"react-dom": {
|
|
28
|
+
"optional": true
|
|
29
|
+
},
|
|
30
|
+
"maplibre-gl": {
|
|
31
|
+
"optional": true
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=20.0.0"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React contexts for `@honua/react`. Kept in a value-only module (no JSX, no
|
|
3
|
+
* `window` access) so it is safe to import during server-side rendering.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import type { HonuaClient } from "../core/client.js";
|
|
8
|
+
import type { HonuaMapRuntime, MaplibreMap } from "../runtime/index.js";
|
|
9
|
+
import type { HonuaQueryCache } from "./query-cache.js";
|
|
10
|
+
/** Value carried by {@link HonuaContext}: the active client and its query cache. */
|
|
11
|
+
export interface HonuaContextValue {
|
|
12
|
+
readonly client: HonuaClient;
|
|
13
|
+
readonly cache: HonuaQueryCache;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Root context populated by {@link HonuaProvider}. `null` when a hook is used
|
|
17
|
+
* outside a provider — hooks throw a descriptive error in that case.
|
|
18
|
+
*/
|
|
19
|
+
export declare const HonuaContext: import("react").Context<HonuaContextValue | null>;
|
|
20
|
+
/** Value carried by {@link HonuaMapContext}: the runtime owned by a `HonuaMap`. */
|
|
21
|
+
export interface HonuaMapContextValue {
|
|
22
|
+
/** `null` until `HonuaMap` has finished loading its `MapPackage`. */
|
|
23
|
+
readonly runtime: HonuaMapRuntime | null;
|
|
24
|
+
/** The underlying MapLibre map instance, or `null` before it exists. */
|
|
25
|
+
readonly map: MaplibreMap | null;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Context provided by {@link HonuaMap} to its `HonuaLayer` / `HonuaPopup`
|
|
29
|
+
* children (and consumers of {@link useMapRuntime}).
|
|
30
|
+
*/
|
|
31
|
+
export declare const HonuaMapContext: import("react").Context<HonuaMapContextValue | null>;
|
|
32
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/react/context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,oFAAoF;AACpF,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;CACjC;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,mDAAgD,CAAC;AAG1E,mFAAmF;AACnF,MAAM,WAAW,oBAAoB;IACnC,qEAAqE;IACrE,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;IACzC,wEAAwE;IACxE,QAAQ,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAAC;CAClC;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,sDAAmD,CAAC"}
|
package/react/context.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React contexts for `@honua/react`. Kept in a value-only module (no JSX, no
|
|
3
|
+
* `window` access) so it is safe to import during server-side rendering.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import { createContext } from "react";
|
|
8
|
+
/**
|
|
9
|
+
* Root context populated by {@link HonuaProvider}. `null` when a hook is used
|
|
10
|
+
* outside a provider — hooks throw a descriptive error in that case.
|
|
11
|
+
*/
|
|
12
|
+
export const HonuaContext = createContext(null);
|
|
13
|
+
HonuaContext.displayName = "HonuaContext";
|
|
14
|
+
/**
|
|
15
|
+
* Context provided by {@link HonuaMap} to its `HonuaLayer` / `HonuaPopup`
|
|
16
|
+
* children (and consumers of {@link useMapRuntime}).
|
|
17
|
+
*/
|
|
18
|
+
export const HonuaMapContext = createContext(null);
|
|
19
|
+
HonuaMapContext.displayName = "HonuaMapContext";
|