@reearth/core 0.0.7-alpha.6 → 0.0.7-alpha.60
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 +177 -0
- package/dist/core.js +70987 -60888
- package/dist/core.umd.cjs +666 -680
- package/dist/{index-DqatWUTw.js → index-CUJ6HGQn.js} +1021 -908
- package/dist/index.d.ts +157 -71
- package/package.json +88 -74
- package/src/Map/ClusteredLayers/index.tsx +1 -1
- package/src/Map/Geoid/index.tsx +68 -0
- package/src/Map/Geoid/types.ts +8 -0
- package/src/Map/Layer/hooks.ts +7 -4
- package/src/Map/Layer/index.tsx +3 -1
- package/src/Map/Layers/hooks.ts +35 -8
- package/src/Map/Layers/index.tsx +13 -2
- package/src/Map/Layers/keys.ts +1 -0
- package/src/Map/Sketch/hooks.ts +454 -411
- package/src/Map/Sketch/index.tsx +68 -21
- package/src/Map/Sketch/sketchMachine.ts +427 -102
- package/src/Map/Sketch/sketchMachine.typegen.ts +58 -1
- package/src/Map/Sketch/types.ts +10 -20
- package/src/Map/Sketch/usePluginSketchLayer.ts +105 -0
- package/src/Map/Sketch/useSketch.ts +558 -0
- package/src/Map/Sketch/useSketchFeature.ts +198 -0
- package/src/Map/SpatialId/constants.ts +21 -0
- package/src/Map/SpatialId/hooks.ts +448 -0
- package/src/Map/SpatialId/index.tsx +63 -0
- package/src/Map/SpatialId/types.ts +68 -0
- package/src/Map/SpatialId/utils.ts +65 -0
- package/src/Map/hooks.ts +54 -8
- package/src/Map/index.tsx +42 -9
- package/src/Map/ref.ts +32 -3
- package/src/Map/types/index.ts +39 -3
- package/src/Map/types/viewerProperty.ts +10 -0
- package/src/Map/useTimelineManager.ts +4 -10
- package/src/Map/utils.ts +1 -1
- package/src/Visualizer/Error.tsx +4 -1
- package/src/Visualizer/context.tsx +5 -5
- package/src/Visualizer/coreContext.tsx +3 -1
- package/src/Visualizer/hooks.ts +56 -22
- package/src/Visualizer/index.stories.tsx +15 -0
- package/src/Visualizer/index.tsx +25 -6
- package/src/Visualizer/useViewport.ts +1 -1
- package/src/engines/Cesium/Feature/Box/hooks/box.ts +4 -4
- package/src/engines/Cesium/Feature/Box/hooks/edge.ts +1 -1
- package/src/engines/Cesium/Feature/Box/hooks/side.ts +1 -1
- package/src/engines/Cesium/Feature/Box/utils.ts +6 -0
- package/src/engines/Cesium/Feature/Ellipse/index.stories.tsx +0 -1
- package/src/engines/Cesium/Feature/Frustum/getFieldOfView.ts +2 -0
- package/src/engines/Cesium/Feature/Frustum/index.stories.tsx +0 -1
- package/src/engines/Cesium/Feature/HeatMap/HeatmapMesh.tsx +1 -1
- package/src/engines/Cesium/Feature/Marker/index.tsx +1 -1
- package/src/engines/Cesium/Feature/Model/index.stories.tsx +1 -2
- package/src/engines/Cesium/Feature/Model/index.tsx +3 -3
- package/src/engines/Cesium/Feature/PhotoOverlay/hooks.ts +2 -2
- package/src/engines/Cesium/Feature/PhotoOverlay/index.tsx +3 -1
- package/src/engines/Cesium/Feature/Polygon/index.stories.tsx +0 -1
- package/src/engines/Cesium/Feature/Polygon/index.tsx +6 -4
- package/src/engines/Cesium/Feature/Raster/index.stories.tsx +0 -1
- package/src/engines/Cesium/Feature/Raster/mvt.ts +2 -1
- package/src/engines/Cesium/Feature/Resource/index.stories.tsx +0 -1
- package/src/engines/Cesium/Feature/Resource/index.tsx +1 -27
- package/src/engines/Cesium/Feature/Resource/utils.ts +86 -91
- package/src/engines/Cesium/Feature/Tileset/hooks.ts +136 -71
- package/src/engines/Cesium/Feature/Tileset/index.stories.tsx +0 -1
- package/src/engines/Cesium/Feature/Tileset/index.tsx +1 -1
- package/src/engines/Cesium/Feature/Tileset/useClippingBox.ts +2 -2
- package/src/engines/Cesium/Feature/Tileset/useDrawClipping.ts +2 -2
- package/src/engines/Cesium/Feature/context.ts +1 -0
- package/src/engines/Cesium/Feature/index.tsx +9 -5
- package/src/engines/Cesium/Feature/utils.tsx +20 -12
- package/src/engines/Cesium/PostProcesses/hbao/AmbientOcclusion.tsx +7 -4
- package/src/engines/Cesium/Sketch/ControlPoint.tsx +128 -24
- package/src/engines/Cesium/Sketch/ExtrudedControlPoints.tsx +70 -25
- package/src/engines/Cesium/Sketch/ExtrudedMeasurement.tsx +3 -1
- package/src/engines/Cesium/Sketch/ExtrudedPolygonEntity.tsx +14 -14
- package/src/engines/Cesium/Sketch/PolylineEntity.tsx +7 -4
- package/src/engines/Cesium/Sketch/SurfaceAddingPoints.tsx +60 -0
- package/src/engines/Cesium/Sketch/SurfaceControlPoints.tsx +126 -35
- package/src/engines/Cesium/Sketch/constants.ts +5 -0
- package/src/engines/Cesium/Sketch/index.tsx +68 -29
- package/src/engines/Cesium/SpatialId/CoordinateIndicator.tsx +28 -0
- package/src/engines/Cesium/SpatialId/SpatialIdSpace.tsx +33 -0
- package/src/engines/Cesium/SpatialId/VerticalSpaceIndicator.tsx +32 -0
- package/src/engines/Cesium/SpatialId/index.ts +3 -0
- package/src/engines/Cesium/common.ts +55 -18
- package/src/engines/Cesium/core/Clock.tsx +1 -1
- package/src/engines/Cesium/core/Globe/index.tsx +73 -0
- package/src/engines/Cesium/core/Globe/useTerrainProviderPromise.ts +79 -0
- package/src/engines/Cesium/core/Imagery.test.ts +29 -11
- package/src/engines/Cesium/core/Imagery.tsx +22 -6
- package/src/engines/Cesium/core/Indicator/Indicator.tsx +2 -2
- package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/JapanGSIOptimalBVmapLabelImagery.tsx +13 -6
- package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/JapanGSIOptimalBVmapLabelImageryLayer.tsx +2 -1
- package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/JapanGSIOptimalBVmapLabelImageryProvider.ts +3 -4
- package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/JapanGSIOptimalBVmapVectorMapLabel.tsx +14 -2
- package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/helpers.ts +1 -1
- package/src/engines/Cesium/core/labels/LabelImageryLayers.tsx +10 -1
- package/src/engines/Cesium/core/presets.ts +24 -28
- package/src/engines/Cesium/helpers/getGeometryFromEntity.ts +55 -0
- package/src/engines/Cesium/hooks/useCamera.ts +2 -2
- package/src/engines/Cesium/hooks/useCameraLimiter.ts +1 -1
- package/src/engines/Cesium/hooks/useEngineRef.ts +52 -5
- package/src/engines/Cesium/hooks/useExplicitRender.ts +2 -2
- package/src/engines/Cesium/hooks/useInstance.ts +1 -1
- package/src/engines/Cesium/hooks/useLayerDragDrop.ts +3 -3
- package/src/engines/Cesium/hooks/useLayerSelectWithRect.ts +2 -2
- package/src/engines/Cesium/hooks/useOverrideGlobeShader/useOverrideGlobeShader.ts +115 -67
- package/src/engines/Cesium/hooks/useViewerProperty.ts +1 -1
- package/src/engines/Cesium/hooks.ts +55 -14
- package/src/engines/Cesium/index.stories.tsx +0 -1
- package/src/engines/Cesium/index.tsx +20 -6
- package/src/engines/Cesium/pickMany.ts +2 -0
- package/src/engines/Cesium/types.ts +1 -1
- package/src/engines/Cesium/utils/mouse.ts +1 -1
- package/src/engines/Cesium/utils/utils.ts +1 -1
- package/src/mantle/atoms/compute.test.ts +4 -4
- package/src/mantle/atoms/compute.ts +8 -4
- package/src/mantle/compat/forward.ts +1 -1
- package/src/mantle/data/geojson.ts +53 -22
- package/src/mantle/data/georss.ts +2 -2
- package/src/mantle/data/gml.ts +2 -2
- package/src/mantle/data/gpx.ts +2 -2
- package/src/mantle/data/shapefile/parseZip.ts +1 -0
- package/src/mantle/evaluator/simple/expression/expression.test.ts +72 -0
- package/src/mantle/evaluator/simple/expression/node.ts +10 -12
- package/src/mantle/types/appearance.ts +4 -2
- package/src/mantle/types/index.ts +3 -0
- package/src/{Visualizer → shared}/interactionMode.ts +3 -2
- package/src/test/setup.ts +1 -1
- package/src/test/utils.tsx +1 -1
- package/src/types/modules.d.ts +96 -0
- package/src/utils/StringMatcher.ts +1 -1
- package/src/utils/image.ts +2 -12
- package/src/utils/use-delayed-count.ts +1 -1
- package/src/utils/use-dnd/drop.ts +1 -1
- package/src/utils/util.ts +1 -1
- package/src/utils/value.ts +2 -2
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_0.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_1.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_10.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_11.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_12.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_13.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_14.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_15.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_16.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_17.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_18.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_19.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_2.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_20.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_21.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_22.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_23.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_24.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_25.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_26.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_27.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_3.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_4.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_5.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_6.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_7.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_8.json +0 -1
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_9.json +0 -1
- package/dist/cesium/Assets/Images/bing_maps_credit.png +0 -0
- package/dist/cesium/Assets/Images/cesium_credit.png +0 -0
- package/dist/cesium/Assets/Images/google_earth_credit.png +0 -0
- package/dist/cesium/Assets/Images/ion-credit.png +0 -0
- package/dist/cesium/Assets/Textures/LensFlare/DirtMask.jpg +0 -0
- package/dist/cesium/Assets/Textures/LensFlare/StarBurst.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/0/0/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/0/1/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/1/0/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/1/0/1.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/1/1/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/1/1/1.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/1/2/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/1/2/1.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/1/3/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/1/3/1.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/0/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/0/1.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/0/2.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/0/3.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/1/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/1/1.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/1/2.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/1/3.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/2/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/2/1.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/2/2.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/2/3.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/3/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/3/1.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/3/2.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/3/3.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/4/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/4/1.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/4/2.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/4/3.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/5/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/5/1.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/5/2.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/5/3.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/6/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/6/1.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/6/2.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/6/3.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/7/0.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/7/1.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/7/2.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/2/7/3.jpg +0 -0
- package/dist/cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml +0 -14
- package/dist/cesium/Assets/Textures/SkyBox/tycho2t3_80_mx.jpg +0 -0
- package/dist/cesium/Assets/Textures/SkyBox/tycho2t3_80_my.jpg +0 -0
- package/dist/cesium/Assets/Textures/SkyBox/tycho2t3_80_mz.jpg +0 -0
- package/dist/cesium/Assets/Textures/SkyBox/tycho2t3_80_px.jpg +0 -0
- package/dist/cesium/Assets/Textures/SkyBox/tycho2t3_80_py.jpg +0 -0
- package/dist/cesium/Assets/Textures/SkyBox/tycho2t3_80_pz.jpg +0 -0
- package/dist/cesium/Assets/Textures/maki/airfield.png +0 -0
- package/dist/cesium/Assets/Textures/maki/airport.png +0 -0
- package/dist/cesium/Assets/Textures/maki/alcohol-shop.png +0 -0
- package/dist/cesium/Assets/Textures/maki/america-football.png +0 -0
- package/dist/cesium/Assets/Textures/maki/art-gallery.png +0 -0
- package/dist/cesium/Assets/Textures/maki/bakery.png +0 -0
- package/dist/cesium/Assets/Textures/maki/bank.png +0 -0
- package/dist/cesium/Assets/Textures/maki/bar.png +0 -0
- package/dist/cesium/Assets/Textures/maki/baseball.png +0 -0
- package/dist/cesium/Assets/Textures/maki/basketball.png +0 -0
- package/dist/cesium/Assets/Textures/maki/beer.png +0 -0
- package/dist/cesium/Assets/Textures/maki/bicycle.png +0 -0
- package/dist/cesium/Assets/Textures/maki/building.png +0 -0
- package/dist/cesium/Assets/Textures/maki/bus.png +0 -0
- package/dist/cesium/Assets/Textures/maki/cafe.png +0 -0
- package/dist/cesium/Assets/Textures/maki/camera.png +0 -0
- package/dist/cesium/Assets/Textures/maki/campsite.png +0 -0
- package/dist/cesium/Assets/Textures/maki/car.png +0 -0
- package/dist/cesium/Assets/Textures/maki/cemetery.png +0 -0
- package/dist/cesium/Assets/Textures/maki/cesium.png +0 -0
- package/dist/cesium/Assets/Textures/maki/chemist.png +0 -0
- package/dist/cesium/Assets/Textures/maki/cinema.png +0 -0
- package/dist/cesium/Assets/Textures/maki/circle-stroked.png +0 -0
- package/dist/cesium/Assets/Textures/maki/circle.png +0 -0
- package/dist/cesium/Assets/Textures/maki/city.png +0 -0
- package/dist/cesium/Assets/Textures/maki/clothing-store.png +0 -0
- package/dist/cesium/Assets/Textures/maki/college.png +0 -0
- package/dist/cesium/Assets/Textures/maki/commercial.png +0 -0
- package/dist/cesium/Assets/Textures/maki/cricket.png +0 -0
- package/dist/cesium/Assets/Textures/maki/cross.png +0 -0
- package/dist/cesium/Assets/Textures/maki/dam.png +0 -0
- package/dist/cesium/Assets/Textures/maki/danger.png +0 -0
- package/dist/cesium/Assets/Textures/maki/disability.png +0 -0
- package/dist/cesium/Assets/Textures/maki/dog-park.png +0 -0
- package/dist/cesium/Assets/Textures/maki/embassy.png +0 -0
- package/dist/cesium/Assets/Textures/maki/emergency-telephone.png +0 -0
- package/dist/cesium/Assets/Textures/maki/entrance.png +0 -0
- package/dist/cesium/Assets/Textures/maki/farm.png +0 -0
- package/dist/cesium/Assets/Textures/maki/fast-food.png +0 -0
- package/dist/cesium/Assets/Textures/maki/ferry.png +0 -0
- package/dist/cesium/Assets/Textures/maki/fire-station.png +0 -0
- package/dist/cesium/Assets/Textures/maki/fuel.png +0 -0
- package/dist/cesium/Assets/Textures/maki/garden.png +0 -0
- package/dist/cesium/Assets/Textures/maki/gift.png +0 -0
- package/dist/cesium/Assets/Textures/maki/golf.png +0 -0
- package/dist/cesium/Assets/Textures/maki/grocery.png +0 -0
- package/dist/cesium/Assets/Textures/maki/hairdresser.png +0 -0
- package/dist/cesium/Assets/Textures/maki/harbor.png +0 -0
- package/dist/cesium/Assets/Textures/maki/heart.png +0 -0
- package/dist/cesium/Assets/Textures/maki/heliport.png +0 -0
- package/dist/cesium/Assets/Textures/maki/hospital.png +0 -0
- package/dist/cesium/Assets/Textures/maki/ice-cream.png +0 -0
- package/dist/cesium/Assets/Textures/maki/industrial.png +0 -0
- package/dist/cesium/Assets/Textures/maki/land-use.png +0 -0
- package/dist/cesium/Assets/Textures/maki/laundry.png +0 -0
- package/dist/cesium/Assets/Textures/maki/library.png +0 -0
- package/dist/cesium/Assets/Textures/maki/lighthouse.png +0 -0
- package/dist/cesium/Assets/Textures/maki/lodging.png +0 -0
- package/dist/cesium/Assets/Textures/maki/logging.png +0 -0
- package/dist/cesium/Assets/Textures/maki/london-underground.png +0 -0
- package/dist/cesium/Assets/Textures/maki/marker-stroked.png +0 -0
- package/dist/cesium/Assets/Textures/maki/marker.png +0 -0
- package/dist/cesium/Assets/Textures/maki/minefield.png +0 -0
- package/dist/cesium/Assets/Textures/maki/mobilephone.png +0 -0
- package/dist/cesium/Assets/Textures/maki/monument.png +0 -0
- package/dist/cesium/Assets/Textures/maki/museum.png +0 -0
- package/dist/cesium/Assets/Textures/maki/music.png +0 -0
- package/dist/cesium/Assets/Textures/maki/oil-well.png +0 -0
- package/dist/cesium/Assets/Textures/maki/park.png +0 -0
- package/dist/cesium/Assets/Textures/maki/park2.png +0 -0
- package/dist/cesium/Assets/Textures/maki/parking-garage.png +0 -0
- package/dist/cesium/Assets/Textures/maki/parking.png +0 -0
- package/dist/cesium/Assets/Textures/maki/pharmacy.png +0 -0
- package/dist/cesium/Assets/Textures/maki/pitch.png +0 -0
- package/dist/cesium/Assets/Textures/maki/place-of-worship.png +0 -0
- package/dist/cesium/Assets/Textures/maki/playground.png +0 -0
- package/dist/cesium/Assets/Textures/maki/police.png +0 -0
- package/dist/cesium/Assets/Textures/maki/polling-place.png +0 -0
- package/dist/cesium/Assets/Textures/maki/post.png +0 -0
- package/dist/cesium/Assets/Textures/maki/prison.png +0 -0
- package/dist/cesium/Assets/Textures/maki/rail-above.png +0 -0
- package/dist/cesium/Assets/Textures/maki/rail-light.png +0 -0
- package/dist/cesium/Assets/Textures/maki/rail-metro.png +0 -0
- package/dist/cesium/Assets/Textures/maki/rail-underground.png +0 -0
- package/dist/cesium/Assets/Textures/maki/rail.png +0 -0
- package/dist/cesium/Assets/Textures/maki/religious-christian.png +0 -0
- package/dist/cesium/Assets/Textures/maki/religious-jewish.png +0 -0
- package/dist/cesium/Assets/Textures/maki/religious-muslim.png +0 -0
- package/dist/cesium/Assets/Textures/maki/restaurant.png +0 -0
- package/dist/cesium/Assets/Textures/maki/roadblock.png +0 -0
- package/dist/cesium/Assets/Textures/maki/rocket.png +0 -0
- package/dist/cesium/Assets/Textures/maki/school.png +0 -0
- package/dist/cesium/Assets/Textures/maki/scooter.png +0 -0
- package/dist/cesium/Assets/Textures/maki/shop.png +0 -0
- package/dist/cesium/Assets/Textures/maki/skiing.png +0 -0
- package/dist/cesium/Assets/Textures/maki/slaughterhouse.png +0 -0
- package/dist/cesium/Assets/Textures/maki/soccer.png +0 -0
- package/dist/cesium/Assets/Textures/maki/square-stroked.png +0 -0
- package/dist/cesium/Assets/Textures/maki/square.png +0 -0
- package/dist/cesium/Assets/Textures/maki/star-stroked.png +0 -0
- package/dist/cesium/Assets/Textures/maki/star.png +0 -0
- package/dist/cesium/Assets/Textures/maki/suitcase.png +0 -0
- package/dist/cesium/Assets/Textures/maki/swimming.png +0 -0
- package/dist/cesium/Assets/Textures/maki/telephone.png +0 -0
- package/dist/cesium/Assets/Textures/maki/tennis.png +0 -0
- package/dist/cesium/Assets/Textures/maki/theatre.png +0 -0
- package/dist/cesium/Assets/Textures/maki/toilets.png +0 -0
- package/dist/cesium/Assets/Textures/maki/town-hall.png +0 -0
- package/dist/cesium/Assets/Textures/maki/town.png +0 -0
- package/dist/cesium/Assets/Textures/maki/triangle-stroked.png +0 -0
- package/dist/cesium/Assets/Textures/maki/triangle.png +0 -0
- package/dist/cesium/Assets/Textures/maki/village.png +0 -0
- package/dist/cesium/Assets/Textures/maki/warehouse.png +0 -0
- package/dist/cesium/Assets/Textures/maki/waste-basket.png +0 -0
- package/dist/cesium/Assets/Textures/maki/water.png +0 -0
- package/dist/cesium/Assets/Textures/maki/wetland.png +0 -0
- package/dist/cesium/Assets/Textures/maki/zoo.png +0 -0
- package/dist/cesium/Assets/Textures/moonSmall.jpg +0 -0
- package/dist/cesium/Assets/Textures/pin.svg +0 -1
- package/dist/cesium/Assets/Textures/waterNormals.jpg +0 -0
- package/dist/cesium/Assets/Textures/waterNormalsSmall.jpg +0 -0
- package/dist/cesium/Assets/approximateTerrainHeights.json +0 -1
- package/dist/cesium/ThirdParty/Workers/package.json +0 -1
- package/dist/cesium/ThirdParty/Workers/pako_deflate.min.js +0 -1
- package/dist/cesium/ThirdParty/Workers/pako_inflate.min.js +0 -1
- package/dist/cesium/ThirdParty/Workers/z-worker-pako.js +0 -1
- package/dist/cesium/ThirdParty/basis_transcoder.wasm +0 -0
- package/dist/cesium/ThirdParty/draco_decoder.wasm +0 -0
- package/dist/cesium/ThirdParty/google-earth-dbroot-parser.js +0 -1
- package/dist/cesium/Widgets/Animation/Animation.css +0 -127
- package/dist/cesium/Widgets/Animation/lighter.css +0 -70
- package/dist/cesium/Widgets/BaseLayerPicker/BaseLayerPicker.css +0 -108
- package/dist/cesium/Widgets/BaseLayerPicker/lighter.css +0 -22
- package/dist/cesium/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspector.css +0 -102
- package/dist/cesium/Widgets/CesiumInspector/CesiumInspector.css +0 -113
- package/dist/cesium/Widgets/CesiumWidget/CesiumWidget.css +0 -124
- package/dist/cesium/Widgets/CesiumWidget/lighter.css +0 -14
- package/dist/cesium/Widgets/FullscreenButton/FullscreenButton.css +0 -8
- package/dist/cesium/Widgets/Geocoder/Geocoder.css +0 -70
- package/dist/cesium/Widgets/Geocoder/lighter.css +0 -17
- package/dist/cesium/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css +0 -27
- package/dist/cesium/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldHillshade.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldImagery.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldOcean.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/bingAerial.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/bingAerialLabels.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/bingRoads.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/blueMarble.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/earthAtNight.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/mapQuestOpenStreetMap.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/mapboxSatellite.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/mapboxStreets.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/mapboxTerrain.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/naturalEarthII.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/openStreetMap.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/sentinel-2.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/stadiaAlidadeSmooth.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/stadiaAlidadeSmoothDark.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/stamenToner.png +0 -0
- package/dist/cesium/Widgets/Images/ImageryProviders/stamenWatercolor.png +0 -0
- package/dist/cesium/Widgets/Images/NavigationHelp/Mouse.svg +0 -84
- package/dist/cesium/Widgets/Images/NavigationHelp/MouseLeft.svg +0 -76
- package/dist/cesium/Widgets/Images/NavigationHelp/MouseMiddle.svg +0 -76
- package/dist/cesium/Widgets/Images/NavigationHelp/MouseRight.svg +0 -76
- package/dist/cesium/Widgets/Images/NavigationHelp/Touch.svg +0 -120
- package/dist/cesium/Widgets/Images/NavigationHelp/TouchDrag.svg +0 -129
- package/dist/cesium/Widgets/Images/NavigationHelp/TouchRotate.svg +0 -76
- package/dist/cesium/Widgets/Images/NavigationHelp/TouchTilt.svg +0 -135
- package/dist/cesium/Widgets/Images/NavigationHelp/TouchZoom.svg +0 -74
- package/dist/cesium/Widgets/Images/TerrainProviders/CesiumWorldTerrain.png +0 -0
- package/dist/cesium/Widgets/Images/TerrainProviders/Ellipsoid.png +0 -0
- package/dist/cesium/Widgets/Images/TimelineIcons.png +0 -0
- package/dist/cesium/Widgets/Images/info-loading.gif +0 -0
- package/dist/cesium/Widgets/InfoBox/InfoBox.css +0 -92
- package/dist/cesium/Widgets/InfoBox/InfoBoxDescription.css +0 -178
- package/dist/cesium/Widgets/NavigationHelpButton/NavigationHelpButton.css +0 -93
- package/dist/cesium/Widgets/NavigationHelpButton/lighter.css +0 -38
- package/dist/cesium/Widgets/PerformanceWatchdog/PerformanceWatchdog.css +0 -15
- package/dist/cesium/Widgets/ProjectionPicker/ProjectionPicker.css +0 -38
- package/dist/cesium/Widgets/SceneModePicker/SceneModePicker.css +0 -56
- package/dist/cesium/Widgets/SelectionIndicator/SelectionIndicator.css +0 -20
- package/dist/cesium/Widgets/Timeline/Timeline.css +0 -103
- package/dist/cesium/Widgets/Timeline/lighter.css +0 -23
- package/dist/cesium/Widgets/VRButton/VRButton.css +0 -8
- package/dist/cesium/Widgets/Viewer/Viewer.css +0 -107
- package/dist/cesium/Widgets/VoxelInspector/VoxelInspector.css +0 -16
- package/dist/cesium/Widgets/lighter.css +0 -237
- package/dist/cesium/Widgets/lighterShared.css +0 -46
- package/dist/cesium/Widgets/shared.css +0 -103
- package/dist/cesium/Widgets/widgets.css +0 -1346
- package/dist/cesium/Workers/chunk-2YD5QWGR.js +0 -28
- package/dist/cesium/Workers/chunk-3T4KR75X.js +0 -26
- package/dist/cesium/Workers/chunk-46KFVW24.js +0 -26
- package/dist/cesium/Workers/chunk-4EI6PP43.js +0 -28
- package/dist/cesium/Workers/chunk-4RS52VIY.js +0 -26
- package/dist/cesium/Workers/chunk-4YLYA3DC.js +0 -26
- package/dist/cesium/Workers/chunk-5ENAGXBI.js +0 -26
- package/dist/cesium/Workers/chunk-5VIB3TI5.js +0 -26
- package/dist/cesium/Workers/chunk-6NGZLDFZ.js +0 -26
- package/dist/cesium/Workers/chunk-6RGNWVZ2.js +0 -27
- package/dist/cesium/Workers/chunk-7AZZVJ52.js +0 -26
- package/dist/cesium/Workers/chunk-AMXAQQEL.js +0 -26
- package/dist/cesium/Workers/chunk-AQW44ZPC.js +0 -26
- package/dist/cesium/Workers/chunk-CPCMDW6Z.js +0 -26
- package/dist/cesium/Workers/chunk-DNL2WDRL.js +0 -26
- package/dist/cesium/Workers/chunk-ERW7V247.js +0 -26
- package/dist/cesium/Workers/chunk-EYRIA4TP.js +0 -26
- package/dist/cesium/Workers/chunk-F7RQIJML.js +0 -26
- package/dist/cesium/Workers/chunk-FPZMU6QP.js +0 -26
- package/dist/cesium/Workers/chunk-FZDVQW7A.js +0 -26
- package/dist/cesium/Workers/chunk-GAZ2U4FO.js +0 -26
- package/dist/cesium/Workers/chunk-I44IOOT4.js +0 -26
- package/dist/cesium/Workers/chunk-IALXUAD4.js +0 -26
- package/dist/cesium/Workers/chunk-IXBUEUZL.js +0 -26
- package/dist/cesium/Workers/chunk-J3GCYV5K.js +0 -26
- package/dist/cesium/Workers/chunk-KGSZTFHZ.js +0 -26
- package/dist/cesium/Workers/chunk-KKKPU2CI.js +0 -26
- package/dist/cesium/Workers/chunk-KTEJE5KE.js +0 -26
- package/dist/cesium/Workers/chunk-KYZ3DYY6.js +0 -26
- package/dist/cesium/Workers/chunk-L2QG4MRI.js +0 -26
- package/dist/cesium/Workers/chunk-MCE3KFYN.js +0 -26
- package/dist/cesium/Workers/chunk-MMLDGXML.js +0 -26
- package/dist/cesium/Workers/chunk-MTBRPBDQ.js +0 -26
- package/dist/cesium/Workers/chunk-OKT6VBRK.js +0 -26
- package/dist/cesium/Workers/chunk-PHYDKLSY.js +0 -26
- package/dist/cesium/Workers/chunk-PWPX3224.js +0 -26
- package/dist/cesium/Workers/chunk-QHOVE6WG.js +0 -26
- package/dist/cesium/Workers/chunk-QJ6MBL22.js +0 -26
- package/dist/cesium/Workers/chunk-QKO6VIG2.js +0 -26
- package/dist/cesium/Workers/chunk-QVEE4QL2.js +0 -26
- package/dist/cesium/Workers/chunk-RXQOQZ7S.js +0 -26
- package/dist/cesium/Workers/chunk-S3ZKQKMM.js +0 -26
- package/dist/cesium/Workers/chunk-SFEUMZSK.js +0 -26
- package/dist/cesium/Workers/chunk-T75MW4X3.js +0 -26
- package/dist/cesium/Workers/chunk-TVO2A75R.js +0 -66
- package/dist/cesium/Workers/chunk-UHR36K45.js +0 -27
- package/dist/cesium/Workers/chunk-UKJCDZOR.js +0 -26
- package/dist/cesium/Workers/chunk-VKVIYER6.js +0 -26
- package/dist/cesium/Workers/chunk-VPIQWTRZ.js +0 -26
- package/dist/cesium/Workers/chunk-XSX5HRFC.js +0 -26
- package/dist/cesium/Workers/chunk-Z5WQQHSL.js +0 -26
- package/dist/cesium/Workers/chunk-Z7B2VEL5.js +0 -26
- package/dist/cesium/Workers/combineGeometry.js +0 -26
- package/dist/cesium/Workers/createBoxGeometry.js +0 -26
- package/dist/cesium/Workers/createBoxOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/createCircleGeometry.js +0 -26
- package/dist/cesium/Workers/createCircleOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/createCoplanarPolygonGeometry.js +0 -26
- package/dist/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/createCorridorGeometry.js +0 -26
- package/dist/cesium/Workers/createCorridorOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/createCylinderGeometry.js +0 -26
- package/dist/cesium/Workers/createCylinderOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/createEllipseGeometry.js +0 -26
- package/dist/cesium/Workers/createEllipseOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/createEllipsoidGeometry.js +0 -26
- package/dist/cesium/Workers/createEllipsoidOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/createFrustumGeometry.js +0 -26
- package/dist/cesium/Workers/createFrustumOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/createGeometry.js +0 -26
- package/dist/cesium/Workers/createGroundPolylineGeometry.js +0 -26
- package/dist/cesium/Workers/createPlaneGeometry.js +0 -26
- package/dist/cesium/Workers/createPlaneOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/createPolygonGeometry.js +0 -26
- package/dist/cesium/Workers/createPolygonOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/createPolylineGeometry.js +0 -26
- package/dist/cesium/Workers/createPolylineVolumeGeometry.js +0 -26
- package/dist/cesium/Workers/createPolylineVolumeOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/createRectangleGeometry.js +0 -26
- package/dist/cesium/Workers/createRectangleOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/createSimplePolylineGeometry.js +0 -26
- package/dist/cesium/Workers/createSphereGeometry.js +0 -26
- package/dist/cesium/Workers/createSphereOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/createTaskProcessorWorker.js +0 -26
- package/dist/cesium/Workers/createVectorTileClampedPolylines.js +0 -26
- package/dist/cesium/Workers/createVectorTileGeometries.js +0 -26
- package/dist/cesium/Workers/createVectorTilePoints.js +0 -26
- package/dist/cesium/Workers/createVectorTilePolygons.js +0 -26
- package/dist/cesium/Workers/createVectorTilePolylines.js +0 -26
- package/dist/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +0 -26
- package/dist/cesium/Workers/createVerticesFromHeightmap.js +0 -26
- package/dist/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +0 -26
- package/dist/cesium/Workers/createWallGeometry.js +0 -26
- package/dist/cesium/Workers/createWallOutlineGeometry.js +0 -26
- package/dist/cesium/Workers/decodeDraco.js +0 -26
- package/dist/cesium/Workers/decodeGoogleEarthEnterprisePacket.js +0 -26
- package/dist/cesium/Workers/decodeI3S.js +0 -26
- package/dist/cesium/Workers/transcodeKTX2.js +0 -56
- package/dist/cesium/Workers/transferTypedArrayTest.js +0 -26
- package/dist/cesium/Workers/upsampleQuantizedTerrainMesh.js +0 -26
- package/src/engines/Cesium/core/Globe.tsx +0 -104
- /package/src/{Visualizer → shared}/featureFlags.ts +0 -0
- /package/src/{Map/Sketch/utils.ts → utils/use-window-event.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reearth/core",
|
|
3
|
-
"version": "0.0.7-alpha.
|
|
3
|
+
"version": "0.0.7-alpha.60",
|
|
4
4
|
"author": "Re:Earth contributors <community@reearth.io>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "A library that abstracts a map engine as one common API.",
|
|
@@ -21,101 +21,115 @@
|
|
|
21
21
|
"storybook": "storybook dev -p 6007",
|
|
22
22
|
"build-storybook": "storybook build",
|
|
23
23
|
"preversion": "yarn test run",
|
|
24
|
-
"version": "yarn build"
|
|
24
|
+
"version": "yarn build",
|
|
25
|
+
"sketch-typegen": "xstate typegen src/**/sketchMachine.ts"
|
|
25
26
|
},
|
|
26
27
|
"engines": {
|
|
27
28
|
"node": ">=20"
|
|
28
29
|
},
|
|
29
30
|
"peerDependencies": {
|
|
30
|
-
"cesium": "1.x",
|
|
31
|
-
"react": "^
|
|
32
|
-
"react-dom": "^
|
|
31
|
+
"cesium": "1.118.x",
|
|
32
|
+
"react": "^19.0.0",
|
|
33
|
+
"react-dom": "^19.0.0"
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
|
-
"@
|
|
36
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
37
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
38
|
+
"@radix-ui/react-icons": "^1.3.2",
|
|
39
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
40
|
+
"@radix-ui/react-separator": "^1.1.8",
|
|
41
|
+
"@radix-ui/react-slider": "^1.3.6",
|
|
42
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
43
|
+
"@radix-ui/react-switch": "^1.2.6",
|
|
44
|
+
"@radix-ui/react-toggle": "^1.1.10",
|
|
45
|
+
"@reearth/cesium-mvt-imagery-provider": "1.6.2",
|
|
46
|
+
"@reearth/spatial-id-sdk": "0.0.0",
|
|
36
47
|
"@rot1024/use-transition": "1.0.0",
|
|
37
48
|
"@seznam/compose-react-refs": "1.0.6",
|
|
38
|
-
"@turf/invariant": "
|
|
39
|
-
"@turf/turf": "
|
|
40
|
-
"@types/proj4": "2.5.5",
|
|
49
|
+
"@turf/invariant": "^7.3.3",
|
|
50
|
+
"@turf/turf": "^7.3.3",
|
|
41
51
|
"@ungap/event-target": "0.2.4",
|
|
42
|
-
"@xstate/react": "
|
|
52
|
+
"@xstate/react": "^6.1.0",
|
|
43
53
|
"cesium-dnd": "1.1.0",
|
|
44
|
-
"csv-parse": "
|
|
45
|
-
"d3": "7.9.0",
|
|
46
|
-
"fast-xml-parser": "
|
|
47
|
-
"framer-motion": "
|
|
54
|
+
"csv-parse": "^6.1.0",
|
|
55
|
+
"d3": "^7.9.0",
|
|
56
|
+
"fast-xml-parser": "^5.3.3",
|
|
57
|
+
"framer-motion": "^12.29.2",
|
|
48
58
|
"geojson": "0.5.0",
|
|
49
|
-
"jotai": "
|
|
50
|
-
"js-md5": "0.
|
|
51
|
-
"jsep": "1.
|
|
52
|
-
"jsonpath-plus": "
|
|
53
|
-
"jszip": "3.10.1",
|
|
54
|
-
"lodash-es": "4.17.
|
|
55
|
-
"lru-cache": "
|
|
56
|
-
"pbf": "
|
|
57
|
-
"proj4": "2.
|
|
58
|
-
"protomaps": "1.
|
|
59
|
+
"jotai": "^2.18.0",
|
|
60
|
+
"js-md5": "^0.8.3",
|
|
61
|
+
"jsep": "^1.4.0",
|
|
62
|
+
"jsonpath-plus": "^10.3.0",
|
|
63
|
+
"jszip": "^3.10.1",
|
|
64
|
+
"lodash-es": "^4.17.23",
|
|
65
|
+
"lru-cache": "^11.2.5",
|
|
66
|
+
"pbf": "^4.0.1",
|
|
67
|
+
"proj4": "^2.20.2",
|
|
68
|
+
"protomaps-leaflet": "^5.1.0",
|
|
59
69
|
"react-dnd": "16.0.1",
|
|
60
70
|
"react-dnd-html5-backend": "16.0.1",
|
|
61
|
-
"react-error-boundary": "
|
|
71
|
+
"react-error-boundary": "^6.1.0",
|
|
62
72
|
"react-nl2br": "1.0.4",
|
|
63
|
-
"react-use": "17.
|
|
64
|
-
"resium": "^1.
|
|
73
|
+
"react-use": "^17.6.0",
|
|
74
|
+
"resium": "^1.19.3",
|
|
65
75
|
"suspend-react": "0.1.3",
|
|
76
|
+
"tailwind-merge": "^3.5.0",
|
|
77
|
+
"tailwindcss": "^4.2.1",
|
|
78
|
+
"tailwindcss-animate": "^1.0.7",
|
|
66
79
|
"tiny-invariant": "1.3.3",
|
|
67
|
-
"use-callback-ref": "1.3.
|
|
68
|
-
"use-custom-compare": "1.
|
|
69
|
-
"uuid": "
|
|
70
|
-
"xstate": "
|
|
80
|
+
"use-callback-ref": "1.3.3",
|
|
81
|
+
"use-custom-compare": "1.5.0",
|
|
82
|
+
"uuid": "^13.0.0",
|
|
83
|
+
"xstate": "^5.28.0"
|
|
71
84
|
},
|
|
72
85
|
"devDependencies": {
|
|
73
|
-
"@apollo/client": "
|
|
74
|
-
"@chromatic-com/storybook": "^
|
|
75
|
-
"@emotion/jest": "11.
|
|
76
|
-
"@storybook/addon-
|
|
77
|
-
"@storybook/addon-
|
|
78
|
-
"@storybook/addon-
|
|
79
|
-
"@storybook/
|
|
80
|
-
"@storybook/
|
|
81
|
-
"@
|
|
82
|
-
"@
|
|
83
|
-
"@
|
|
84
|
-
"@
|
|
85
|
-
"@
|
|
86
|
-
"@types/
|
|
87
|
-
"@types/
|
|
88
|
-
"@types/
|
|
89
|
-
"@types/
|
|
90
|
-
"@types/
|
|
91
|
-
"@types/
|
|
92
|
-
"@types/
|
|
93
|
-
"@
|
|
94
|
-
"@
|
|
95
|
-
"@
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
86
|
+
"@apollo/client": "^4.1.2",
|
|
87
|
+
"@chromatic-com/storybook": "^5.0.0",
|
|
88
|
+
"@emotion/jest": "^11.14.2",
|
|
89
|
+
"@storybook/addon-docs": "^10.2.3",
|
|
90
|
+
"@storybook/addon-links": "^10.2.3",
|
|
91
|
+
"@storybook/addon-onboarding": "^10.2.3",
|
|
92
|
+
"@storybook/react": "^10.2.3",
|
|
93
|
+
"@storybook/react-vite": "^10.2.3",
|
|
94
|
+
"@testing-library/dom": "^10.4.1",
|
|
95
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
96
|
+
"@testing-library/react": "^16.3.2",
|
|
97
|
+
"@types/d3": "^7.4.3",
|
|
98
|
+
"@types/geojson": "^7946.0.16",
|
|
99
|
+
"@types/js-md5": "^0.8.0",
|
|
100
|
+
"@types/lodash-es": "^4.17.12",
|
|
101
|
+
"@types/node": "^25.0.10",
|
|
102
|
+
"@types/pbf": "^3.0.5",
|
|
103
|
+
"@types/react": "^19.2.10",
|
|
104
|
+
"@types/react-dom": "^19.2.3",
|
|
105
|
+
"@types/scheduler": "^0.26.0",
|
|
106
|
+
"@vitejs/plugin-react": "^5.1.2",
|
|
107
|
+
"@xstate/cli": "0.5.17",
|
|
108
|
+
"@tailwindcss/postcss": "^4.2.1",
|
|
109
|
+
"autoprefixer": "^10.4.23",
|
|
110
|
+
"cesium": "^1.137.0",
|
|
111
|
+
"class-variance-authority": "^0.7.1",
|
|
112
|
+
"clsx": "^2.1.1",
|
|
99
113
|
"eslint": "8.57.0",
|
|
100
114
|
"eslint-config-reearth": "0.3.0",
|
|
101
|
-
"eslint-plugin-
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"react": "
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"typescript": "5.
|
|
110
|
-
"vite": "
|
|
111
|
-
"vite-plugin-cesium": "1.2.
|
|
112
|
-
"vite-plugin-dts": "
|
|
113
|
-
"vite-plugin-svgr": "4.
|
|
114
|
-
"vite-tsconfig-paths": "^
|
|
115
|
-
"vitest": "
|
|
116
|
-
"web-streams-polyfill": "
|
|
115
|
+
"eslint-plugin-storybook": "^10.2.3",
|
|
116
|
+
"jsdom": "^28.1.0",
|
|
117
|
+
"postcss": "^8.5.6",
|
|
118
|
+
"prettier": "^3.8.1",
|
|
119
|
+
"react": "^19.2.4",
|
|
120
|
+
"react-dom": "^19.2.4",
|
|
121
|
+
"storybook": "^10.2.3",
|
|
122
|
+
"type-fest": "^5.4.2",
|
|
123
|
+
"typescript": "^5.9.3",
|
|
124
|
+
"vite": "^7.3.1",
|
|
125
|
+
"vite-plugin-cesium": "1.2.23",
|
|
126
|
+
"vite-plugin-dts": "^4.5.4",
|
|
127
|
+
"vite-plugin-svgr": "4.5.0",
|
|
128
|
+
"vite-tsconfig-paths": "^6.0.5",
|
|
129
|
+
"vitest": "^4.0.18",
|
|
130
|
+
"web-streams-polyfill": "^4.2.0"
|
|
117
131
|
},
|
|
118
132
|
"resolutions": {
|
|
119
|
-
"jackspeak": "
|
|
133
|
+
"jackspeak": "3.1.2"
|
|
120
134
|
}
|
|
121
135
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentType, useMemo, useCallback, ReactNode } from "react";
|
|
1
|
+
import { ComponentType, useMemo, useCallback, ReactNode, type JSX } from "react";
|
|
2
2
|
|
|
3
3
|
import LayerComponent, { type CommonProps, type Props as LayerProps } from "../Layer";
|
|
4
4
|
import type { Layer, Atom, Typography, DataType, ViewerProperty } from "../types";
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import {
|
|
2
|
+
forwardRef,
|
|
3
|
+
ForwardRefRenderFunction,
|
|
4
|
+
useCallback,
|
|
5
|
+
useImperativeHandle,
|
|
6
|
+
useRef,
|
|
7
|
+
} from "react";
|
|
8
|
+
|
|
9
|
+
import { GeoidServer, GeoidRef } from "./types";
|
|
10
|
+
|
|
11
|
+
export type GeoidProps = {
|
|
12
|
+
geoidServer?: GeoidServer;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const MAX_GEOID_CACHE_SIZE = 1000;
|
|
16
|
+
|
|
17
|
+
const Geoid: ForwardRefRenderFunction<GeoidRef, GeoidProps> = ({ geoidServer }, ref) => {
|
|
18
|
+
const geoidCache = useRef<Map<string, number>>(new Map());
|
|
19
|
+
|
|
20
|
+
const getGeoidHeight = useCallback(
|
|
21
|
+
async (lng?: number, lat?: number): Promise<number | undefined> => {
|
|
22
|
+
if (!geoidServer?.url || !geoidServer?.geoidProperty) {
|
|
23
|
+
console.error("Geoid: Server is not set properly");
|
|
24
|
+
return Promise.resolve(undefined);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (lat === undefined || lng === undefined) {
|
|
28
|
+
console.error("Geoid: Invalid lat or lng");
|
|
29
|
+
return Promise.resolve(undefined);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const cache = geoidCache.current.get(`${lng},${lat}`);
|
|
33
|
+
if (cache) return Promise.resolve(cache);
|
|
34
|
+
|
|
35
|
+
return fetch(
|
|
36
|
+
geoidServer.url.replace("${lng}", lng.toString()).replace("${lat}", lat.toString()),
|
|
37
|
+
)
|
|
38
|
+
.then(res => {
|
|
39
|
+
return res.json().then((result: any) => {
|
|
40
|
+
if (!result) return undefined;
|
|
41
|
+
const geoid = Number(result[geoidServer?.geoidProperty]);
|
|
42
|
+
if (!isNaN(geoid)) {
|
|
43
|
+
const cache = geoidCache.current;
|
|
44
|
+
if (cache.size > MAX_GEOID_CACHE_SIZE) {
|
|
45
|
+
const firstKey = cache.keys().next().value;
|
|
46
|
+
if (firstKey) cache.delete(firstKey);
|
|
47
|
+
}
|
|
48
|
+
cache.set(`${lng},${lat}`, geoid);
|
|
49
|
+
return geoid;
|
|
50
|
+
}
|
|
51
|
+
return undefined;
|
|
52
|
+
});
|
|
53
|
+
})
|
|
54
|
+
.catch(e => {
|
|
55
|
+
console.error("Failed to fetch geoid height", e);
|
|
56
|
+
return undefined;
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
[geoidServer?.url, geoidServer?.geoidProperty],
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
useImperativeHandle(ref, () => ({
|
|
63
|
+
getGeoidHeight,
|
|
64
|
+
}));
|
|
65
|
+
return null;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export default forwardRef(Geoid);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type GeoidServer = {
|
|
2
|
+
url: string; // URL of the geoid server. use ${lat} ${lng} for lat/lng placeholders. Example: "https://mock.com/api/altitude?lat=${lat}&lng=${lng}"
|
|
3
|
+
geoidProperty: string; // TODO: support json path
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
export type GeoidRef = {
|
|
7
|
+
getGeoidHeight: (lat?: number, lng?: number) => Promise<number | undefined>;
|
|
8
|
+
};
|
package/src/Map/Layer/hooks.ts
CHANGED
|
@@ -90,7 +90,7 @@ export default function useHooks({
|
|
|
90
90
|
});
|
|
91
91
|
}, [layer, set]);
|
|
92
92
|
|
|
93
|
-
const intervalId = useRef<number>();
|
|
93
|
+
const intervalId = useRef<number>(undefined);
|
|
94
94
|
useLayoutEffect(() => {
|
|
95
95
|
const data = layer?.type === "simple" ? layer.data : undefined;
|
|
96
96
|
|
|
@@ -107,12 +107,15 @@ export default function useHooks({
|
|
|
107
107
|
};
|
|
108
108
|
}, [layer, forceUpdateFeatures]);
|
|
109
109
|
|
|
110
|
-
const prevForceUpdatableData = useRef<Pick<Data, "csv" | "jsonProperties">>();
|
|
110
|
+
const prevForceUpdatableData = useRef<Pick<Data, "csv" | "jsonProperties" | "value">>(undefined);
|
|
111
111
|
useLayoutEffect(() => {
|
|
112
112
|
const data = layer?.type === "simple" ? layer.data : undefined;
|
|
113
|
-
const forceUpdatableData = pick(data, "csv", "jsonProperties");
|
|
113
|
+
const forceUpdatableData = pick(data, "csv", "jsonProperties", "value");
|
|
114
114
|
|
|
115
|
-
if (
|
|
115
|
+
if (
|
|
116
|
+
isEqual(forceUpdatableData, prevForceUpdatableData.current) ||
|
|
117
|
+
(!data?.url && !data?.value)
|
|
118
|
+
) {
|
|
116
119
|
return;
|
|
117
120
|
}
|
|
118
121
|
|
package/src/Map/Layer/index.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentType } from "react";
|
|
1
|
+
import { ComponentType, type JSX } from "react";
|
|
2
2
|
|
|
3
3
|
import type {
|
|
4
4
|
DataRange,
|
|
@@ -9,6 +9,7 @@ import type {
|
|
|
9
9
|
ComputedFeature,
|
|
10
10
|
LayerSimple,
|
|
11
11
|
} from "../../mantle";
|
|
12
|
+
import { SketchEditingFeature } from "../Sketch";
|
|
12
13
|
import { ViewerProperty } from "../types";
|
|
13
14
|
|
|
14
15
|
import useHooks, { type Atom, type EvalFeature } from "./hooks";
|
|
@@ -25,6 +26,7 @@ export type CommonProps = {
|
|
|
25
26
|
isHidden?: boolean;
|
|
26
27
|
isSelected?: boolean;
|
|
27
28
|
meta?: Record<string, unknown>;
|
|
29
|
+
sketchEditingFeature?: SketchEditingFeature;
|
|
28
30
|
};
|
|
29
31
|
|
|
30
32
|
export type FeatureComponentProps = {
|
package/src/Map/Layers/hooks.ts
CHANGED
|
@@ -35,6 +35,7 @@ export type { Layer, NaiveLayer } from "../../mantle";
|
|
|
35
35
|
*/
|
|
36
36
|
export type LazyLayer = Readonly<Layer> & {
|
|
37
37
|
computed?: Readonly<ComputedLayer>;
|
|
38
|
+
isTempLayer?: boolean;
|
|
38
39
|
// compat
|
|
39
40
|
pluginId?: string;
|
|
40
41
|
extensionId?: string;
|
|
@@ -53,6 +54,7 @@ export type Ref = {
|
|
|
53
54
|
deleteLayer: (...ids: string[]) => void;
|
|
54
55
|
isLayer: (obj: any) => obj is LazyLayer;
|
|
55
56
|
isComputedLayer: (obj: any) => obj is ComputedLayer;
|
|
57
|
+
isTempLayer: (layerId?: string) => boolean;
|
|
56
58
|
layers: () => LazyLayer[];
|
|
57
59
|
walk: <T>(
|
|
58
60
|
fn: (layer: LazyLayer, index: number, parents: LazyLayer[]) => T | void,
|
|
@@ -119,6 +121,7 @@ export default function useHooks({
|
|
|
119
121
|
requestingRenderMode,
|
|
120
122
|
onLayerSelect,
|
|
121
123
|
engineRef,
|
|
124
|
+
onMount,
|
|
122
125
|
}: {
|
|
123
126
|
layers?: Layer[];
|
|
124
127
|
ref?: ForwardedRef<Ref>;
|
|
@@ -136,7 +139,8 @@ export default function useHooks({
|
|
|
136
139
|
reason: LayerSelectionReason | undefined,
|
|
137
140
|
info: SelectedFeatureInfo | undefined,
|
|
138
141
|
) => void;
|
|
139
|
-
engineRef?: RefObject<EngineRef>;
|
|
142
|
+
engineRef?: RefObject<EngineRef | null>;
|
|
143
|
+
onMount?: () => void;
|
|
140
144
|
}) {
|
|
141
145
|
const layerMap = useMemo(() => new Map<string, Layer>(), []);
|
|
142
146
|
const [overriddenLayers, setOverridenLayers] = useState<OverriddenLayer[]>([]);
|
|
@@ -149,11 +153,21 @@ export default function useHooks({
|
|
|
149
153
|
[hiddenLayerIds, hiddenLayers],
|
|
150
154
|
);
|
|
151
155
|
|
|
152
|
-
const
|
|
156
|
+
const derivedLayers = useMemo(() => {
|
|
157
|
+
return layers?.map(l => {
|
|
158
|
+
const hidden = isHidden?.(l.id);
|
|
159
|
+
return {
|
|
160
|
+
...l,
|
|
161
|
+
visible: hidden ? !hidden : l.visible,
|
|
162
|
+
};
|
|
163
|
+
});
|
|
164
|
+
}, [isHidden, layers]);
|
|
165
|
+
|
|
166
|
+
const layersRef = useGet(derivedLayers);
|
|
153
167
|
const [tempLayers, setTempLayers] = useState<Layer[]>([]);
|
|
154
168
|
const tempLayersRef = useRef<Layer[]>([]);
|
|
155
169
|
const flattenedLayers = useMemo((): Layer[] => {
|
|
156
|
-
const newLayers = [...flattenLayers(
|
|
170
|
+
const newLayers = [...flattenLayers(derivedLayers ?? []), ...flattenLayers(tempLayers)];
|
|
157
171
|
// apply overrides
|
|
158
172
|
return newLayers.map(l => {
|
|
159
173
|
const ol: any = overriddenLayers.find(ll => ll.id === l.id);
|
|
@@ -175,7 +189,7 @@ export default function useHooks({
|
|
|
175
189
|
|
|
176
190
|
return res;
|
|
177
191
|
});
|
|
178
|
-
}, [
|
|
192
|
+
}, [derivedLayers, tempLayers, overriddenLayers]);
|
|
179
193
|
|
|
180
194
|
const getComputedLayer = useAtomValue(
|
|
181
195
|
useMemo(
|
|
@@ -456,6 +470,13 @@ export default function useHooks({
|
|
|
456
470
|
[lazyLayerPrototype],
|
|
457
471
|
);
|
|
458
472
|
|
|
473
|
+
const isTempLayer = useCallback(
|
|
474
|
+
(layerId?: string) => {
|
|
475
|
+
return tempLayersRef.current.some(l => l.id === layerId);
|
|
476
|
+
},
|
|
477
|
+
[tempLayersRef],
|
|
478
|
+
);
|
|
479
|
+
|
|
459
480
|
const isComputedLayer = useCallback(
|
|
460
481
|
(obj: any): obj is ComputedLayer => {
|
|
461
482
|
return typeof obj === "object" && Object.getPrototypeOf(obj) === lazyComputedLayerPrototype;
|
|
@@ -560,6 +581,7 @@ export default function useHooks({
|
|
|
560
581
|
findByIds,
|
|
561
582
|
isLayer,
|
|
562
583
|
isComputedLayer,
|
|
584
|
+
isTempLayer,
|
|
563
585
|
layers: rootLayers,
|
|
564
586
|
walk,
|
|
565
587
|
find,
|
|
@@ -585,6 +607,7 @@ export default function useHooks({
|
|
|
585
607
|
findByIds,
|
|
586
608
|
isLayer,
|
|
587
609
|
isComputedLayer,
|
|
610
|
+
isTempLayer,
|
|
588
611
|
rootLayers,
|
|
589
612
|
walk,
|
|
590
613
|
find,
|
|
@@ -602,11 +625,15 @@ export default function useHooks({
|
|
|
602
625
|
],
|
|
603
626
|
);
|
|
604
627
|
|
|
628
|
+
useEffect(() => {
|
|
629
|
+
onMount?.();
|
|
630
|
+
}, [onMount]);
|
|
631
|
+
|
|
605
632
|
const prevLayers = useRef<Layer[] | undefined>([]);
|
|
606
633
|
useLayoutEffect(() => {
|
|
607
634
|
const ids = new Set<string>();
|
|
608
635
|
|
|
609
|
-
walkLayers(
|
|
636
|
+
walkLayers(derivedLayers ?? [], l => {
|
|
610
637
|
ids.add(l.id);
|
|
611
638
|
if (!atomMap.has(l.id)) {
|
|
612
639
|
atomMap.set(l.id, computeAtom());
|
|
@@ -626,8 +653,8 @@ export default function useHooks({
|
|
|
626
653
|
overriddenLayersRef.current = updated;
|
|
627
654
|
setOverridenLayers(updated);
|
|
628
655
|
|
|
629
|
-
prevLayers.current =
|
|
630
|
-
}, [atomMap,
|
|
656
|
+
prevLayers.current = derivedLayers;
|
|
657
|
+
}, [atomMap, layerMap, lazyLayerMap, setOverridenLayers, showLayer, derivedLayers]);
|
|
631
658
|
|
|
632
659
|
useEffect(() => {
|
|
633
660
|
if (!requestingRenderMode || requestingRenderMode.current === FORCE_REQUEST_RENDER) return;
|
|
@@ -734,7 +761,7 @@ function useSelection({
|
|
|
734
761
|
reason: LayerSelectionReason | undefined,
|
|
735
762
|
info: SelectedFeatureInfo | undefined,
|
|
736
763
|
) => void;
|
|
737
|
-
engineRef?: RefObject<EngineRef>;
|
|
764
|
+
engineRef?: RefObject<EngineRef | null>;
|
|
738
765
|
updateStyle: (layerId: string) => void;
|
|
739
766
|
}) {
|
|
740
767
|
const [selectedLayer, selectedComputedFeature]: SelectedLayer = useMemo(
|
package/src/Map/Layers/index.tsx
CHANGED
|
@@ -38,7 +38,7 @@ export type Props = Omit<ClusteredLayerProps, "atomMap" | "isHidden" | "selected
|
|
|
38
38
|
hiddenLayers?: string[];
|
|
39
39
|
viewerProperty?: ViewerProperty;
|
|
40
40
|
requestingRenderMode?: MutableRefObject<RequestingRenderMode>;
|
|
41
|
-
engineRef?: RefObject<EngineRef>;
|
|
41
|
+
engineRef?: RefObject<EngineRef | null>;
|
|
42
42
|
onLayerSelect?: (
|
|
43
43
|
layerId: string | undefined,
|
|
44
44
|
featureId: string | undefined,
|
|
@@ -46,10 +46,20 @@ export type Props = Omit<ClusteredLayerProps, "atomMap" | "isHidden" | "selected
|
|
|
46
46
|
reason: LayerSelectionReason | undefined,
|
|
47
47
|
info: SelectedFeatureInfo | undefined,
|
|
48
48
|
) => void;
|
|
49
|
+
onMount?: () => void;
|
|
49
50
|
};
|
|
50
51
|
|
|
51
52
|
const Layers: ForwardRefRenderFunction<Ref, Props> = (
|
|
52
|
-
{
|
|
53
|
+
{
|
|
54
|
+
layers,
|
|
55
|
+
selectedLayer,
|
|
56
|
+
hiddenLayers,
|
|
57
|
+
requestingRenderMode,
|
|
58
|
+
engineRef,
|
|
59
|
+
onLayerSelect,
|
|
60
|
+
onMount,
|
|
61
|
+
...props
|
|
62
|
+
},
|
|
53
63
|
ref,
|
|
54
64
|
) => {
|
|
55
65
|
const { atomMap, flattenedLayers, isHidden } = useHooks({
|
|
@@ -60,6 +70,7 @@ const Layers: ForwardRefRenderFunction<Ref, Props> = (
|
|
|
60
70
|
requestingRenderMode,
|
|
61
71
|
engineRef,
|
|
62
72
|
onLayerSelect,
|
|
73
|
+
onMount,
|
|
63
74
|
});
|
|
64
75
|
|
|
65
76
|
return (
|