@reearth/core 0.0.1
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/README.md +18 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_0.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_1.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_10.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_11.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_12.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_13.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_14.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_15.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_16.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_17.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_18.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_19.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_2.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_20.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_21.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_22.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_23.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_24.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_25.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_26.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_27.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_3.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_4.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_5.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_6.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_7.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_8.json +1 -0
- package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_9.json +1 -0
- 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 +14 -0
- 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 +1 -0
- package/dist/cesium/Assets/Textures/waterNormals.jpg +0 -0
- package/dist/cesium/Assets/Textures/waterNormalsSmall.jpg +0 -0
- package/dist/cesium/Assets/approximateTerrainHeights.json +1 -0
- package/dist/cesium/ThirdParty/Workers/package.json +1 -0
- package/dist/cesium/ThirdParty/Workers/pako_deflate.min.js +1 -0
- package/dist/cesium/ThirdParty/Workers/pako_inflate.min.js +1 -0
- package/dist/cesium/ThirdParty/Workers/z-worker-pako.js +1 -0
- 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 +1 -0
- package/dist/cesium/Widgets/Animation/Animation.css +127 -0
- package/dist/cesium/Widgets/Animation/lighter.css +70 -0
- package/dist/cesium/Widgets/BaseLayerPicker/BaseLayerPicker.css +108 -0
- package/dist/cesium/Widgets/BaseLayerPicker/lighter.css +22 -0
- package/dist/cesium/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspector.css +102 -0
- package/dist/cesium/Widgets/CesiumInspector/CesiumInspector.css +113 -0
- package/dist/cesium/Widgets/CesiumWidget/CesiumWidget.css +124 -0
- package/dist/cesium/Widgets/CesiumWidget/lighter.css +14 -0
- package/dist/cesium/Widgets/FullscreenButton/FullscreenButton.css +8 -0
- package/dist/cesium/Widgets/Geocoder/Geocoder.css +70 -0
- package/dist/cesium/Widgets/Geocoder/lighter.css +17 -0
- package/dist/cesium/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css +27 -0
- 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 +84 -0
- package/dist/cesium/Widgets/Images/NavigationHelp/MouseLeft.svg +76 -0
- package/dist/cesium/Widgets/Images/NavigationHelp/MouseMiddle.svg +76 -0
- package/dist/cesium/Widgets/Images/NavigationHelp/MouseRight.svg +76 -0
- package/dist/cesium/Widgets/Images/NavigationHelp/Touch.svg +120 -0
- package/dist/cesium/Widgets/Images/NavigationHelp/TouchDrag.svg +129 -0
- package/dist/cesium/Widgets/Images/NavigationHelp/TouchRotate.svg +76 -0
- package/dist/cesium/Widgets/Images/NavigationHelp/TouchTilt.svg +135 -0
- package/dist/cesium/Widgets/Images/NavigationHelp/TouchZoom.svg +74 -0
- 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 +92 -0
- package/dist/cesium/Widgets/InfoBox/InfoBoxDescription.css +178 -0
- package/dist/cesium/Widgets/NavigationHelpButton/NavigationHelpButton.css +93 -0
- package/dist/cesium/Widgets/NavigationHelpButton/lighter.css +38 -0
- package/dist/cesium/Widgets/PerformanceWatchdog/PerformanceWatchdog.css +15 -0
- package/dist/cesium/Widgets/ProjectionPicker/ProjectionPicker.css +38 -0
- package/dist/cesium/Widgets/SceneModePicker/SceneModePicker.css +56 -0
- package/dist/cesium/Widgets/SelectionIndicator/SelectionIndicator.css +20 -0
- package/dist/cesium/Widgets/Timeline/Timeline.css +103 -0
- package/dist/cesium/Widgets/Timeline/lighter.css +23 -0
- package/dist/cesium/Widgets/VRButton/VRButton.css +8 -0
- package/dist/cesium/Widgets/Viewer/Viewer.css +107 -0
- package/dist/cesium/Widgets/VoxelInspector/VoxelInspector.css +16 -0
- package/dist/cesium/Widgets/lighter.css +237 -0
- package/dist/cesium/Widgets/lighterShared.css +46 -0
- package/dist/cesium/Widgets/shared.css +103 -0
- package/dist/cesium/Widgets/widgets.css +1346 -0
- package/dist/cesium/Workers/chunk-2ED5WI77.js +26 -0
- package/dist/cesium/Workers/chunk-2MBPFWCP.js +26 -0
- package/dist/cesium/Workers/chunk-3C74MLG3.js +26 -0
- package/dist/cesium/Workers/chunk-45U7TTT3.js +26 -0
- package/dist/cesium/Workers/chunk-4N7SRDH5.js +26 -0
- package/dist/cesium/Workers/chunk-4T6AS6BZ.js +26 -0
- package/dist/cesium/Workers/chunk-5AG2MVRM.js +26 -0
- package/dist/cesium/Workers/chunk-5Z6L2FHX.js +26 -0
- package/dist/cesium/Workers/chunk-6AUUBDOF.js +26 -0
- package/dist/cesium/Workers/chunk-74N6MC2V.js +26 -0
- package/dist/cesium/Workers/chunk-7VJK3KHI.js +26 -0
- package/dist/cesium/Workers/chunk-7VZHIB6P.js +26 -0
- package/dist/cesium/Workers/chunk-7X2YQ6I4.js +27 -0
- package/dist/cesium/Workers/chunk-B2SKQ7LU.js +26 -0
- package/dist/cesium/Workers/chunk-B4TQDFIE.js +26 -0
- package/dist/cesium/Workers/chunk-B6TRTFAA.js +26 -0
- package/dist/cesium/Workers/chunk-BK3HCS7I.js +26 -0
- package/dist/cesium/Workers/chunk-BOPB43LN.js +26 -0
- package/dist/cesium/Workers/chunk-C6DMEJQ7.js +26 -0
- package/dist/cesium/Workers/chunk-CN7UN2OZ.js +26 -0
- package/dist/cesium/Workers/chunk-CSISXEG7.js +26 -0
- package/dist/cesium/Workers/chunk-CUOR5F7T.js +28 -0
- package/dist/cesium/Workers/chunk-DGCK3LD2.js +30 -0
- package/dist/cesium/Workers/chunk-DXEZYE3K.js +62 -0
- package/dist/cesium/Workers/chunk-EXBFEYPQ.js +26 -0
- package/dist/cesium/Workers/chunk-FK5KFB6H.js +26 -0
- package/dist/cesium/Workers/chunk-HPBHKP5S.js +26 -0
- package/dist/cesium/Workers/chunk-JCJ24DHF.js +26 -0
- package/dist/cesium/Workers/chunk-JEWHFDAA.js +26 -0
- package/dist/cesium/Workers/chunk-JZLZJJQD.js +26 -0
- package/dist/cesium/Workers/chunk-KRZBI2MU.js +26 -0
- package/dist/cesium/Workers/chunk-KTTUANTJ.js +26 -0
- package/dist/cesium/Workers/chunk-LDCAXLGS.js +26 -0
- package/dist/cesium/Workers/chunk-LOPN5R3I.js +26 -0
- package/dist/cesium/Workers/chunk-MDLPQIMP.js +26 -0
- package/dist/cesium/Workers/chunk-MRR3RGFO.js +26 -0
- package/dist/cesium/Workers/chunk-NPBZI5YA.js +26 -0
- package/dist/cesium/Workers/chunk-NUSW5B6A.js +26 -0
- package/dist/cesium/Workers/chunk-OUXRUXNB.js +26 -0
- package/dist/cesium/Workers/chunk-QPOPEH3M.js +26 -0
- package/dist/cesium/Workers/chunk-R2AN7EKC.js +26 -0
- package/dist/cesium/Workers/chunk-RURL6ZX2.js +26 -0
- package/dist/cesium/Workers/chunk-SUQM3OSW.js +28 -0
- package/dist/cesium/Workers/chunk-UBIRX2SP.js +26 -0
- package/dist/cesium/Workers/chunk-VAKC5J5C.js +26 -0
- package/dist/cesium/Workers/chunk-VHNZBQTR.js +27 -0
- package/dist/cesium/Workers/chunk-VKV642QV.js +26 -0
- package/dist/cesium/Workers/chunk-VMSXG4OA.js +26 -0
- package/dist/cesium/Workers/chunk-VQZSIOZW.js +26 -0
- package/dist/cesium/Workers/chunk-WZUWQMI7.js +26 -0
- package/dist/cesium/Workers/chunk-YBI55DLZ.js +26 -0
- package/dist/cesium/Workers/chunk-YEJWCH6C.js +26 -0
- package/dist/cesium/Workers/chunk-YPDO7SPO.js +26 -0
- package/dist/cesium/Workers/chunk-ZYWD6OQH.js +26 -0
- package/dist/cesium/Workers/combineGeometry.js +26 -0
- package/dist/cesium/Workers/createBoxGeometry.js +26 -0
- package/dist/cesium/Workers/createBoxOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/createCircleGeometry.js +26 -0
- package/dist/cesium/Workers/createCircleOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/createCoplanarPolygonGeometry.js +26 -0
- package/dist/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/createCorridorGeometry.js +26 -0
- package/dist/cesium/Workers/createCorridorOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/createCylinderGeometry.js +26 -0
- package/dist/cesium/Workers/createCylinderOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/createEllipseGeometry.js +26 -0
- package/dist/cesium/Workers/createEllipseOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/createEllipsoidGeometry.js +26 -0
- package/dist/cesium/Workers/createEllipsoidOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/createFrustumGeometry.js +26 -0
- package/dist/cesium/Workers/createFrustumOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/createGeometry.js +26 -0
- package/dist/cesium/Workers/createGroundPolylineGeometry.js +26 -0
- package/dist/cesium/Workers/createPlaneGeometry.js +26 -0
- package/dist/cesium/Workers/createPlaneOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/createPolygonGeometry.js +26 -0
- package/dist/cesium/Workers/createPolygonOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/createPolylineGeometry.js +26 -0
- package/dist/cesium/Workers/createPolylineVolumeGeometry.js +26 -0
- package/dist/cesium/Workers/createPolylineVolumeOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/createRectangleGeometry.js +26 -0
- package/dist/cesium/Workers/createRectangleOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/createSimplePolylineGeometry.js +26 -0
- package/dist/cesium/Workers/createSphereGeometry.js +26 -0
- package/dist/cesium/Workers/createSphereOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/createTaskProcessorWorker.js +26 -0
- package/dist/cesium/Workers/createVectorTileClampedPolylines.js +26 -0
- package/dist/cesium/Workers/createVectorTileGeometries.js +26 -0
- package/dist/cesium/Workers/createVectorTilePoints.js +26 -0
- package/dist/cesium/Workers/createVectorTilePolygons.js +26 -0
- package/dist/cesium/Workers/createVectorTilePolylines.js +26 -0
- package/dist/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +26 -0
- package/dist/cesium/Workers/createVerticesFromHeightmap.js +26 -0
- package/dist/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +26 -0
- package/dist/cesium/Workers/createWallGeometry.js +26 -0
- package/dist/cesium/Workers/createWallOutlineGeometry.js +26 -0
- package/dist/cesium/Workers/decodeDraco.js +26 -0
- package/dist/cesium/Workers/decodeGoogleEarthEnterprisePacket.js +26 -0
- package/dist/cesium/Workers/decodeI3S.js +26 -0
- package/dist/cesium/Workers/transcodeKTX2.js +56 -0
- package/dist/cesium/Workers/transferTypedArrayTest.js +26 -0
- package/dist/cesium/Workers/upsampleQuantizedTerrainMesh.js +26 -0
- package/dist/core.js +83397 -0
- package/dist/core.umd.cjs +6710 -0
- package/dist/index-DqatWUTw.js +3225 -0
- package/dist/index.d.ts +1760 -0
- package/package.json +115 -0
- package/src/Map/ClusteredLayers/index.tsx +106 -0
- package/src/Map/Layer/hooks.ts +180 -0
- package/src/Map/Layer/index.tsx +92 -0
- package/src/Map/Layers/hooks.test.ts +819 -0
- package/src/Map/Layers/hooks.ts +955 -0
- package/src/Map/Layers/index.test.tsx +188 -0
- package/src/Map/Layers/index.tsx +76 -0
- package/src/Map/Layers/keys.ts +51 -0
- package/src/Map/Layers/utils.test.ts +53 -0
- package/src/Map/Layers/utils.ts +37 -0
- package/src/Map/Sketch/hooks.ts +641 -0
- package/src/Map/Sketch/index.tsx +101 -0
- package/src/Map/Sketch/preset.ts +29 -0
- package/src/Map/Sketch/sketchMachine.ts +323 -0
- package/src/Map/Sketch/sketchMachine.typegen.ts +72 -0
- package/src/Map/Sketch/types.ts +52 -0
- package/src/Map/Sketch/utils.ts +24 -0
- package/src/Map/hooks.ts +127 -0
- package/src/Map/index.tsx +147 -0
- package/src/Map/ref.ts +147 -0
- package/src/Map/types/event.ts +104 -0
- package/src/Map/types/index.ts +545 -0
- package/src/Map/useTimelineManager.ts +215 -0
- package/src/Map/utils.test.ts +62 -0
- package/src/Map/utils.ts +71 -0
- package/src/Visualizer/DropHolder.tsx +41 -0
- package/src/Visualizer/Error.tsx +15 -0
- package/src/Visualizer/context.tsx +27 -0
- package/src/Visualizer/coreContext.tsx +47 -0
- package/src/Visualizer/engines.ts +7 -0
- package/src/Visualizer/featureFlags.ts +9 -0
- package/src/Visualizer/hooks.ts +403 -0
- package/src/Visualizer/index.stories.tsx +128 -0
- package/src/Visualizer/index.tsx +187 -0
- package/src/Visualizer/interactionMode.ts +25 -0
- package/src/Visualizer/useViewport.ts +74 -0
- package/src/e2eConfig.ts +20 -0
- package/src/engines/Cesium/Cluster.tsx +90 -0
- package/src/engines/Cesium/Event.tsx +15 -0
- package/src/engines/Cesium/Feature/Box/Edge.tsx +94 -0
- package/src/engines/Cesium/Feature/Box/ScalePoints.tsx +158 -0
- package/src/engines/Cesium/Feature/Box/Side.tsx +70 -0
- package/src/engines/Cesium/Feature/Box/constants.ts +63 -0
- package/src/engines/Cesium/Feature/Box/hooks/box.ts +375 -0
- package/src/engines/Cesium/Feature/Box/hooks/edge.ts +112 -0
- package/src/engines/Cesium/Feature/Box/hooks/scalePoint.ts +174 -0
- package/src/engines/Cesium/Feature/Box/hooks/side.ts +72 -0
- package/src/engines/Cesium/Feature/Box/index.tsx +156 -0
- package/src/engines/Cesium/Feature/Box/utils.ts +168 -0
- package/src/engines/Cesium/Feature/Ellipse/index.stories.tsx +48 -0
- package/src/engines/Cesium/Feature/Ellipse/index.tsx +91 -0
- package/src/engines/Cesium/Feature/Ellipsoid/index.tsx +84 -0
- package/src/engines/Cesium/Feature/Frustum/FrustumColorAppearance.ts +38 -0
- package/src/engines/Cesium/Feature/Frustum/getFieldOfView.ts +23 -0
- package/src/engines/Cesium/Feature/Frustum/index.stories.tsx +49 -0
- package/src/engines/Cesium/Feature/Frustum/index.tsx +163 -0
- package/src/engines/Cesium/Feature/Frustum/shaders/frustumAppearance.frag.glsl +31 -0
- package/src/engines/Cesium/Feature/Frustum/shaders/frustumAppearance.vert.glsl +29 -0
- package/src/engines/Cesium/Feature/HeatMap/HeatmapMesh.tsx +186 -0
- package/src/engines/Cesium/Feature/HeatMap/HeatmapMeshMaterial.ts +81 -0
- package/src/engines/Cesium/Feature/HeatMap/colorMap.ts +47 -0
- package/src/engines/Cesium/Feature/HeatMap/constants.ts +781 -0
- package/src/engines/Cesium/Feature/HeatMap/createMeshImageData.ts +108 -0
- package/src/engines/Cesium/Feature/HeatMap/index.tsx +169 -0
- package/src/engines/Cesium/Feature/HeatMap/shaders/heatmapMeshMaterial.glsl +78 -0
- package/src/engines/Cesium/Feature/HeatMap/shaders/makeContour.glsl +13 -0
- package/src/engines/Cesium/Feature/HeatMap/shaders/sampleBicubic.glsl +57 -0
- package/src/engines/Cesium/Feature/Marker/index.tsx +296 -0
- package/src/engines/Cesium/Feature/Marker/marker.svg +3 -0
- package/src/engines/Cesium/Feature/Model/index.stories.tsx +48 -0
- package/src/engines/Cesium/Feature/Model/index.tsx +223 -0
- package/src/engines/Cesium/Feature/PhotoOverlay/hooks.ts +98 -0
- package/src/engines/Cesium/Feature/PhotoOverlay/index.tsx +163 -0
- package/src/engines/Cesium/Feature/PhotoOverlay/primPhotoIcon.svg +3 -0
- package/src/engines/Cesium/Feature/Polygon/index.stories.tsx +174 -0
- package/src/engines/Cesium/Feature/Polygon/index.tsx +182 -0
- package/src/engines/Cesium/Feature/Polyline/index.tsx +98 -0
- package/src/engines/Cesium/Feature/Raster/hooks.ts +52 -0
- package/src/engines/Cesium/Feature/Raster/index.stories.tsx +77 -0
- package/src/engines/Cesium/Feature/Raster/index.tsx +37 -0
- package/src/engines/Cesium/Feature/Raster/mvt.ts +33 -0
- package/src/engines/Cesium/Feature/Raster/tiles.ts +27 -0
- package/src/engines/Cesium/Feature/Raster/tms.ts +31 -0
- package/src/engines/Cesium/Feature/Raster/types.ts +5 -0
- package/src/engines/Cesium/Feature/Raster/utils.test.ts +14 -0
- package/src/engines/Cesium/Feature/Raster/utils.ts +10 -0
- package/src/engines/Cesium/Feature/Raster/wms.ts +28 -0
- package/src/engines/Cesium/Feature/Resource/index.stories.tsx +46 -0
- package/src/engines/Cesium/Feature/Resource/index.tsx +218 -0
- package/src/engines/Cesium/Feature/Resource/utils.test.ts +69 -0
- package/src/engines/Cesium/Feature/Resource/utils.ts +377 -0
- package/src/engines/Cesium/Feature/Tileset/DrawClippingPolygon/index.tsx +77 -0
- package/src/engines/Cesium/Feature/Tileset/TilesetFeatureIndex.ts +46 -0
- package/src/engines/Cesium/Feature/Tileset/hooks.ts +793 -0
- package/src/engines/Cesium/Feature/Tileset/index.stories.tsx +41 -0
- package/src/engines/Cesium/Feature/Tileset/index.tsx +127 -0
- package/src/engines/Cesium/Feature/Tileset/types.ts +5 -0
- package/src/engines/Cesium/Feature/Tileset/useClippingBox.ts +457 -0
- package/src/engines/Cesium/Feature/Tileset/useDrawClipping.ts +200 -0
- package/src/engines/Cesium/Feature/context.ts +33 -0
- package/src/engines/Cesium/Feature/index.tsx +250 -0
- package/src/engines/Cesium/Feature/utils.test.tsx +30 -0
- package/src/engines/Cesium/Feature/utils.tsx +289 -0
- package/src/engines/Cesium/FeatureIndex.ts +15 -0
- package/src/engines/Cesium/JapanSeaLevelEllipsoid.ts +20 -0
- package/src/engines/Cesium/PostProcesses/README.md +1 -0
- package/src/engines/Cesium/PostProcesses/hbao/AmbientOcclusion.tsx +120 -0
- package/src/engines/Cesium/PostProcesses/hbao/AmbientOcclusionOutputType.ts +7 -0
- package/src/engines/Cesium/PostProcesses/hbao/README.md +3 -0
- package/src/engines/Cesium/PostProcesses/hbao/config.ts +29 -0
- package/src/engines/Cesium/PostProcesses/hbao/createAmbientOcclusionStage.ts +173 -0
- package/src/engines/Cesium/PostProcesses/hbao/createCrossBilateralFilterStage.ts +94 -0
- package/src/engines/Cesium/PostProcesses/hbao/index.ts +3 -0
- package/src/engines/Cesium/PostProcesses/hbao/shaders/ambientOcclusionGenerate.glsl +151 -0
- package/src/engines/Cesium/PostProcesses/hbao/shaders/ambientOcclusionModulate.glsl +46 -0
- package/src/engines/Cesium/PostProcesses/hbao/shaders/crossBilateralFilter.glsl +108 -0
- package/src/engines/Cesium/PostProcesses/hbao/shaders/depth.glsl +3 -0
- package/src/engines/Cesium/PostProcesses/hbao/shaders/globeDepth.glsl +15 -0
- package/src/engines/Cesium/PostProcesses/hbao/shaders/highPassRandom.glsl +28 -0
- package/src/engines/Cesium/PostProcesses/hbao/shaders/packing.glsl +7 -0
- package/src/engines/Cesium/PostProcesses/hbao/shaders/reconstructNormal.glsl +109 -0
- package/src/engines/Cesium/PostProcesses/hbao/shaders/reconstructPosition.glsl +10 -0
- package/src/engines/Cesium/PostProcesses/hbao/shaders/turboColorMap.glsl +20 -0
- package/src/engines/Cesium/PostProcesses/hbao/shaders/vogelDisk.glsl +13 -0
- package/src/engines/Cesium/Shaders/CustomShaders/NonPBRLightingShader.ts +66 -0
- package/src/engines/Cesium/Shaders/OverriddenShaders/GlobeFS/Definitions.glsl +5 -0
- package/src/engines/Cesium/Shaders/OverriddenShaders/GlobeFS/HeatmapForTerrain.glsl +13 -0
- package/src/engines/Cesium/Shaders/OverriddenShaders/GlobeFS/IBL.glsl +57 -0
- package/src/engines/Cesium/Shaders/OverriddenShaders/README.md +13 -0
- package/src/engines/Cesium/Sketch/ControlPoint.tsx +67 -0
- package/src/engines/Cesium/Sketch/Entity.tsx +43 -0
- package/src/engines/Cesium/Sketch/ExtrudedControlPoints.tsx +51 -0
- package/src/engines/Cesium/Sketch/ExtrudedMeasurement.tsx +70 -0
- package/src/engines/Cesium/Sketch/ExtrudedPolygonEntity.tsx +75 -0
- package/src/engines/Cesium/Sketch/MeasurementText.tsx +13 -0
- package/src/engines/Cesium/Sketch/PolygonEntity.tsx +48 -0
- package/src/engines/Cesium/Sketch/PolylineEntity.tsx +44 -0
- package/src/engines/Cesium/Sketch/ScreenSpaceElement.tsx +87 -0
- package/src/engines/Cesium/Sketch/SurfaceControlPoints.tsx +67 -0
- package/src/engines/Cesium/Sketch/SurfaceMeasurement.tsx +80 -0
- package/src/engines/Cesium/Sketch/createGeometry.ts +224 -0
- package/src/engines/Cesium/Sketch/index.tsx +119 -0
- package/src/engines/Cesium/Sketch/utils.ts +27 -0
- package/src/engines/Cesium/VertexTerrainElevationMaterial.ts +33 -0
- package/src/engines/Cesium/cameraLimiter.ts +256 -0
- package/src/engines/Cesium/common.test.ts +38 -0
- package/src/engines/Cesium/common.ts +901 -0
- package/src/engines/Cesium/constants.ts +25 -0
- package/src/engines/Cesium/core/Clock.tsx +58 -0
- package/src/engines/Cesium/core/Globe.tsx +136 -0
- package/src/engines/Cesium/core/Imagery.test.ts +102 -0
- package/src/engines/Cesium/core/Imagery.tsx +184 -0
- package/src/engines/Cesium/core/Indicator/Indicator.tsx +141 -0
- package/src/engines/Cesium/core/Indicator/crosshair.svg +3 -0
- package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/JapanGSIOptimalBVmapLabelImagery.tsx +321 -0
- package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/JapanGSIOptimalBVmapLabelImageryLayer.tsx +56 -0
- package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/JapanGSIOptimalBVmapLabelImageryProvider.ts +146 -0
- package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/JapanGSIOptimalBVmapVectorMapLabel.tsx +258 -0
- package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/getAnnotationType.ts +117 -0
- package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/helpers.ts +24 -0
- package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/index.ts +3 -0
- package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/types.ts +26 -0
- package/src/engines/Cesium/core/labels/LabelImageryLayers.tsx +39 -0
- package/src/engines/Cesium/core/presets.ts +95 -0
- package/src/engines/Cesium/helpers/createUniforms.ts +64 -0
- package/src/engines/Cesium/helpers/sphericalHaromic.test.ts +33 -0
- package/src/engines/Cesium/helpers/sphericalHaromic.ts +27 -0
- package/src/engines/Cesium/hooks/useInstance.ts +98 -0
- package/src/engines/Cesium/hooks/useLayerSelectWithRect.ts +157 -0
- package/src/engines/Cesium/hooks/useSceneEvent.ts +47 -0
- package/src/engines/Cesium/hooks.ts +1004 -0
- package/src/engines/Cesium/index.stories.tsx +42 -0
- package/src/engines/Cesium/index.tsx +285 -0
- package/src/engines/Cesium/pickMany.ts +310 -0
- package/src/engines/Cesium/type.d.ts +47 -0
- package/src/engines/Cesium/types.ts +24 -0
- package/src/engines/Cesium/useEngineRef.test.tsx +627 -0
- package/src/engines/Cesium/useEngineRef.ts +945 -0
- package/src/engines/Cesium/useOverrideGlobeShader.ts +322 -0
- package/src/engines/Cesium/utils/mouse.ts +16 -0
- package/src/engines/Cesium/utils/polygon.ts +48 -0
- package/src/engines/Cesium/utils/utils.ts +446 -0
- package/src/engines/Cesium/vertexTerrainElevationMaterial.glsl +25 -0
- package/src/engines/index.ts +37 -0
- package/src/env.d.ts +3 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useRefFunction.ts +10 -0
- package/src/hooks/useRefValue.ts +7 -0
- package/src/index.ts +4 -0
- package/src/mantle/README.md +7 -0
- package/src/mantle/atoms/cache.test.ts +61 -0
- package/src/mantle/atoms/cache.ts +55 -0
- package/src/mantle/atoms/compute.test.ts +794 -0
- package/src/mantle/atoms/compute.ts +344 -0
- package/src/mantle/atoms/data.test.ts +182 -0
- package/src/mantle/atoms/data.ts +114 -0
- package/src/mantle/atoms/index.ts +1 -0
- package/src/mantle/compat/backward.test.ts +368 -0
- package/src/mantle/compat/backward.ts +189 -0
- package/src/mantle/compat/forward.test.ts +688 -0
- package/src/mantle/compat/forward.ts +272 -0
- package/src/mantle/compat/index.ts +4 -0
- package/src/mantle/compat/types.ts +73 -0
- package/src/mantle/data/csv.test.ts +478 -0
- package/src/mantle/data/csv.ts +194 -0
- package/src/mantle/data/geojson.ts +72 -0
- package/src/mantle/data/georss.ts +172 -0
- package/src/mantle/data/gml.ts +244 -0
- package/src/mantle/data/gpx.test.ts +65 -0
- package/src/mantle/data/gpx.ts +551 -0
- package/src/mantle/data/gtfs.ts +116 -0
- package/src/mantle/data/gtfsReader.ts +454 -0
- package/src/mantle/data/index.test.ts +16 -0
- package/src/mantle/data/index.ts +73 -0
- package/src/mantle/data/shapefile.ts +232 -0
- package/src/mantle/data/utils.ts +21 -0
- package/src/mantle/evaluator/index.ts +40 -0
- package/src/mantle/evaluator/simple/conditionalExpression/index.ts +60 -0
- package/src/mantle/evaluator/simple/expression/constants.ts +204 -0
- package/src/mantle/evaluator/simple/expression/expression.test.ts +63 -0
- package/src/mantle/evaluator/simple/expression/expression.ts +116 -0
- package/src/mantle/evaluator/simple/expression/functions/binaryFunctions.ts +43 -0
- package/src/mantle/evaluator/simple/expression/functions/colors.ts +189 -0
- package/src/mantle/evaluator/simple/expression/functions/index.ts +3 -0
- package/src/mantle/evaluator/simple/expression/functions/unaryFunctions.ts +54 -0
- package/src/mantle/evaluator/simple/expression/index.ts +1 -0
- package/src/mantle/evaluator/simple/expression/node.ts +570 -0
- package/src/mantle/evaluator/simple/expression/runtime.ts +266 -0
- package/src/mantle/evaluator/simple/expression/variableReplacer.test.ts +54 -0
- package/src/mantle/evaluator/simple/expression/variableReplacer.ts +121 -0
- package/src/mantle/evaluator/simple/index.test.ts +656 -0
- package/src/mantle/evaluator/simple/index.ts +178 -0
- package/src/mantle/evaluator/simple/interval.test.ts +102 -0
- package/src/mantle/evaluator/simple/interval.ts +27 -0
- package/src/mantle/evaluator/simple/utils.test.ts +56 -0
- package/src/mantle/evaluator/simple/utils.ts +31 -0
- package/src/mantle/index.ts +6 -0
- package/src/mantle/types/appearance.ts +318 -0
- package/src/mantle/types/events.ts +16 -0
- package/src/mantle/types/expression.ts +9 -0
- package/src/mantle/types/index.ts +156 -0
- package/src/mantle/types/value.ts +153 -0
- package/src/mantle/utils.test.ts +74 -0
- package/src/mantle/utils.ts +53 -0
- package/src/reearthTypes.ts +64 -0
- package/src/setupTests.ts +1 -0
- package/src/test/setup.ts +40 -0
- package/src/test/utils.tsx +40 -0
- package/src/types.ts +66 -0
- package/src/utils/StringMatcher.test.ts +132 -0
- package/src/utils/StringMatcher.ts +104 -0
- package/src/utils/assertType.ts +1 -0
- package/src/utils/generate-random-string.ts +9 -0
- package/src/utils/idle.ts +22 -0
- package/src/utils/image.ts +35 -0
- package/src/utils/index.ts +11 -0
- package/src/utils/object.ts +70 -0
- package/src/utils/raf.ts +58 -0
- package/src/utils/time.ts +18 -0
- package/src/utils/use-delayed-count.test.ts +139 -0
- package/src/utils/use-delayed-count.ts +65 -0
- package/src/utils/use-dnd/drag.ts +34 -0
- package/src/utils/use-dnd/drop.ts +93 -0
- package/src/utils/use-dnd/index.tsx +20 -0
- package/src/utils/use-dnd/types.ts +47 -0
- package/src/utils/util.ts +81 -0
- package/src/utils/value.ts +260 -0
- package/src/vite-env.d.ts +1 -0
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import type { GeoJSON } from "geojson";
|
|
2
|
+
import JSZip from "jszip";
|
|
3
|
+
|
|
4
|
+
import type { Data, DataRange, Feature } from "../types";
|
|
5
|
+
|
|
6
|
+
import { processGeoJSON } from "./geojson";
|
|
7
|
+
import { f, FetchOptions } from "./utils";
|
|
8
|
+
|
|
9
|
+
export async function fetchShapefile(
|
|
10
|
+
data: Data,
|
|
11
|
+
range?: DataRange,
|
|
12
|
+
options?: FetchOptions,
|
|
13
|
+
): Promise<Feature[] | void> {
|
|
14
|
+
const arrayBuffer = data.url ? await (await f(data.url, options)).arrayBuffer() : data.value;
|
|
15
|
+
const zip = await JSZip.loadAsync(new Uint8Array(arrayBuffer));
|
|
16
|
+
|
|
17
|
+
let shpFileArrayBuffer: ArrayBuffer | undefined;
|
|
18
|
+
let dbfFileArrayBuffer: ArrayBuffer | undefined;
|
|
19
|
+
|
|
20
|
+
// Access the files inside the ZIP archive
|
|
21
|
+
const zipEntries = Object.values(zip.files);
|
|
22
|
+
for (const entry of zipEntries) {
|
|
23
|
+
const filename = entry.name;
|
|
24
|
+
if (filename.endsWith(".shp")) {
|
|
25
|
+
shpFileArrayBuffer = await entry.async("arraybuffer");
|
|
26
|
+
} else if (filename.endsWith(".dbf")) {
|
|
27
|
+
dbfFileArrayBuffer = await entry.async("arraybuffer");
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (shpFileArrayBuffer && dbfFileArrayBuffer) {
|
|
32
|
+
return processGeoJSON(await parseShapefiles(shpFileArrayBuffer, dbfFileArrayBuffer), range);
|
|
33
|
+
} else {
|
|
34
|
+
throw new Error(`Zip archive does not contain .shp and .dbf files`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export const parseShapefiles = async (
|
|
39
|
+
shpFile: ArrayBuffer,
|
|
40
|
+
dbfFile: ArrayBuffer,
|
|
41
|
+
configuration?: Configuration,
|
|
42
|
+
): Promise<GeoJSON> => {
|
|
43
|
+
return new ShapefileParser(shpFile, dbfFile, configuration).parse();
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
interface Configuration {
|
|
47
|
+
trim?: boolean;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
class ShapefileParser {
|
|
51
|
+
#shp: ArrayBuffer;
|
|
52
|
+
#dbf: ArrayBuffer;
|
|
53
|
+
#configuration?: Configuration;
|
|
54
|
+
#features: any[] = [];
|
|
55
|
+
#propertiesArray: any[] = [];
|
|
56
|
+
|
|
57
|
+
constructor(shp: ArrayBuffer, dbf: ArrayBuffer, configuration?: Configuration) {
|
|
58
|
+
this.#shp = shp;
|
|
59
|
+
this.#dbf = dbf;
|
|
60
|
+
this.#configuration = configuration;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
#parseShp() {
|
|
64
|
+
const dataView = new DataView(this.#shp);
|
|
65
|
+
let idx = 0;
|
|
66
|
+
const wordLength = dataView.getInt32((idx += 6 * 4), false);
|
|
67
|
+
const byteLength = wordLength * 2;
|
|
68
|
+
idx += 4; //version
|
|
69
|
+
idx += 4; //shapeType
|
|
70
|
+
idx += 4; //minX, minY
|
|
71
|
+
idx += 8 * 8; //min(Y, Z, M),max(X, Y, Z, M)
|
|
72
|
+
|
|
73
|
+
const features: any[] = [];
|
|
74
|
+
while (idx < byteLength) {
|
|
75
|
+
const feature: any = {};
|
|
76
|
+
const length: number = dataView.getInt32((idx += 4), false);
|
|
77
|
+
|
|
78
|
+
const type: number = dataView.getInt32((idx += 4), true);
|
|
79
|
+
let idxFeature: number = idx + 4;
|
|
80
|
+
let numberOfParts: number, nbpoints: number, numberOfPoints: number, nbpartsPoint: number[];
|
|
81
|
+
switch (type) {
|
|
82
|
+
case 1:
|
|
83
|
+
case 11:
|
|
84
|
+
case 21:
|
|
85
|
+
feature.type = "Point";
|
|
86
|
+
feature.coordinates = [
|
|
87
|
+
dataView.getFloat64(idxFeature, true),
|
|
88
|
+
dataView.getFloat64(idxFeature + 8, true),
|
|
89
|
+
];
|
|
90
|
+
break;
|
|
91
|
+
case 3:
|
|
92
|
+
case 13:
|
|
93
|
+
case 23:
|
|
94
|
+
case 5:
|
|
95
|
+
case 15:
|
|
96
|
+
case 25:
|
|
97
|
+
if (type === 3 || type === 13 || type === 23) {
|
|
98
|
+
feature.type = "MultiLineString";
|
|
99
|
+
} else if (type === 5 || type === 15 || type === 25) {
|
|
100
|
+
feature.type = "Polygon";
|
|
101
|
+
}
|
|
102
|
+
numberOfParts = dataView.getInt32(idxFeature + 32, true);
|
|
103
|
+
nbpoints = dataView.getInt32(idxFeature + 36, true);
|
|
104
|
+
idxFeature += 40;
|
|
105
|
+
nbpartsPoint = new Array(numberOfParts).fill(0).map(() => {
|
|
106
|
+
const result = dataView.getInt32(idxFeature, true);
|
|
107
|
+
idxFeature += 4;
|
|
108
|
+
return result;
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
feature.coordinates = new Array(numberOfParts).fill(0).map((_, i) => {
|
|
112
|
+
const idstart = nbpartsPoint[i];
|
|
113
|
+
const idend = (i < numberOfParts - 1 ? nbpartsPoint[i + 1] : nbpoints) - 1;
|
|
114
|
+
const part = [];
|
|
115
|
+
for (let j = idstart; j <= idend; j++) {
|
|
116
|
+
part.push([
|
|
117
|
+
dataView.getFloat64(idxFeature, true),
|
|
118
|
+
dataView.getFloat64(idxFeature + 8, true),
|
|
119
|
+
]);
|
|
120
|
+
idxFeature += 16;
|
|
121
|
+
}
|
|
122
|
+
return part;
|
|
123
|
+
});
|
|
124
|
+
break;
|
|
125
|
+
case 8:
|
|
126
|
+
case 18:
|
|
127
|
+
case 28:
|
|
128
|
+
feature.type = "MultiPoint";
|
|
129
|
+
numberOfPoints = dataView.getInt32(idxFeature + 32, true);
|
|
130
|
+
idxFeature += 36;
|
|
131
|
+
feature.coordinates = new Array(numberOfPoints).fill(0).map(() => {
|
|
132
|
+
const result = [
|
|
133
|
+
dataView.getFloat64(idxFeature, true),
|
|
134
|
+
dataView.getFloat64(idxFeature + 8, true),
|
|
135
|
+
];
|
|
136
|
+
idxFeature += 16;
|
|
137
|
+
return result;
|
|
138
|
+
});
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
idx += length * 2;
|
|
143
|
+
features.push(feature);
|
|
144
|
+
}
|
|
145
|
+
this.#features = features;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
#parseDbf() {
|
|
149
|
+
const dataView = new DataView(new Uint8Array(this.#dbf).buffer);
|
|
150
|
+
let idx = 4;
|
|
151
|
+
const numberOfRecords: number = dataView.getInt32(idx, true);
|
|
152
|
+
idx += 28;
|
|
153
|
+
let end = false;
|
|
154
|
+
const fields = [];
|
|
155
|
+
while (!end) {
|
|
156
|
+
const field: any = {};
|
|
157
|
+
const nameArray: string[] = [];
|
|
158
|
+
for (let i = 0; i < 10; i++) {
|
|
159
|
+
const letter = dataView.getUint8(idx);
|
|
160
|
+
if (letter !== 0) {
|
|
161
|
+
nameArray.push(String.fromCharCode(letter));
|
|
162
|
+
}
|
|
163
|
+
idx += 1;
|
|
164
|
+
}
|
|
165
|
+
field.name = nameArray.join("");
|
|
166
|
+
idx += 1;
|
|
167
|
+
field.type = String.fromCharCode(dataView.getUint8(idx));
|
|
168
|
+
idx += 5;
|
|
169
|
+
field.fieldLength = dataView.getUint8(idx);
|
|
170
|
+
idx += 16;
|
|
171
|
+
fields.push(field);
|
|
172
|
+
if (dataView.getUint8(idx) === 0x0d) {
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
idx += 1;
|
|
177
|
+
const propertiesArray = [];
|
|
178
|
+
for (let i = 0; i < numberOfRecords; i++) {
|
|
179
|
+
const properties: any = {};
|
|
180
|
+
if (!end) {
|
|
181
|
+
try {
|
|
182
|
+
idx += 1;
|
|
183
|
+
for (let j = 0; j < fields.length; j++) {
|
|
184
|
+
let str = "";
|
|
185
|
+
const charString = [];
|
|
186
|
+
for (let h = 0; h < fields[j].fieldLength; h++) {
|
|
187
|
+
charString.push(String.fromCharCode(dataView.getUint8(idx)));
|
|
188
|
+
idx += 1;
|
|
189
|
+
}
|
|
190
|
+
str = charString.join("");
|
|
191
|
+
// }
|
|
192
|
+
if (this.#configuration?.trim !== false) {
|
|
193
|
+
str = str.trim();
|
|
194
|
+
}
|
|
195
|
+
const number = parseFloat(str);
|
|
196
|
+
if (isNaN(number)) {
|
|
197
|
+
properties[fields[j].name] = str;
|
|
198
|
+
} else {
|
|
199
|
+
properties[fields[j].name] = number;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
} catch (err) {
|
|
203
|
+
end = true;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
propertiesArray.push(properties);
|
|
207
|
+
}
|
|
208
|
+
this.#propertiesArray = propertiesArray;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
#geoJSON() {
|
|
212
|
+
const geojson: any = {
|
|
213
|
+
type: "FeatureCollection",
|
|
214
|
+
features: [],
|
|
215
|
+
};
|
|
216
|
+
for (let i = 0; i < Math.min(this.#features.length, this.#propertiesArray.length); i++) {
|
|
217
|
+
geojson.features.push({
|
|
218
|
+
type: "Feature",
|
|
219
|
+
geometry: this.#features[i],
|
|
220
|
+
properties: this.#propertiesArray[i],
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
return geojson;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
parse(): GeoJSON {
|
|
227
|
+
this.#parseShp();
|
|
228
|
+
this.#parseDbf();
|
|
229
|
+
|
|
230
|
+
return this.#geoJSON();
|
|
231
|
+
}
|
|
232
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export { generateRandomString } from "../../utils";
|
|
2
|
+
|
|
3
|
+
export type FetchOptions = {
|
|
4
|
+
signal?: AbortSignal;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export async function f(url: string, options?: FetchOptions): Promise<Response> {
|
|
8
|
+
const res = await fetch(url, options);
|
|
9
|
+
if (res.status !== 200) {
|
|
10
|
+
throw new Error(`fetched ${url} but status code was ${res.status}`);
|
|
11
|
+
}
|
|
12
|
+
return res;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function isDefined<T>(value: T | undefined | null): value is T {
|
|
16
|
+
return value !== undefined && value !== null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function convertToCoordinates(coordinates: string) {
|
|
20
|
+
return coordinates.split(" ").map(coord => parseFloat(coord));
|
|
21
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AppearanceTypes,
|
|
3
|
+
ComputedFeature,
|
|
4
|
+
Data,
|
|
5
|
+
DataRange,
|
|
6
|
+
Feature,
|
|
7
|
+
Layer,
|
|
8
|
+
LayerSimple,
|
|
9
|
+
} from "../types";
|
|
10
|
+
|
|
11
|
+
import { evalSimpleLayerFeature, evalSimpleLayer } from "./simple";
|
|
12
|
+
|
|
13
|
+
export { clearAllExpressionCaches, evalExpression } from "./simple";
|
|
14
|
+
|
|
15
|
+
export type EvalContext = {
|
|
16
|
+
getFeatures: (d: Data, r?: DataRange) => Promise<Feature[] | undefined>;
|
|
17
|
+
getAllFeatures: (d: Data) => Promise<Feature[] | undefined>;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type EvalResult = {
|
|
21
|
+
features?: ComputedFeature[];
|
|
22
|
+
layer?: Partial<AppearanceTypes>;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export async function evalLayer(
|
|
26
|
+
layer: LayerSimple,
|
|
27
|
+
ctx: EvalContext,
|
|
28
|
+
): Promise<EvalResult | undefined> {
|
|
29
|
+
if (layer.type === "simple") {
|
|
30
|
+
return evalSimpleLayer(layer, ctx);
|
|
31
|
+
}
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function evalFeature(layer: Layer, feature: Feature): ComputedFeature | undefined {
|
|
36
|
+
if (layer.type === "simple") {
|
|
37
|
+
return evalSimpleLayerFeature(layer, feature);
|
|
38
|
+
}
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Feature, ConditionsExpression } from "../../../types";
|
|
2
|
+
import { Expression } from "../expression";
|
|
3
|
+
|
|
4
|
+
export class ConditionalExpression {
|
|
5
|
+
private _conditions: [string, string][];
|
|
6
|
+
private _runtimeConditions: Statement[];
|
|
7
|
+
private _feature?: Feature;
|
|
8
|
+
private _memoizedResult: any;
|
|
9
|
+
|
|
10
|
+
constructor(conditionsExpression: ConditionsExpression, feature?: Feature, defines?: any) {
|
|
11
|
+
this._conditions = conditionsExpression.conditions;
|
|
12
|
+
this._runtimeConditions = [];
|
|
13
|
+
this._feature = feature;
|
|
14
|
+
this._memoizedResult = undefined;
|
|
15
|
+
|
|
16
|
+
this.setRuntime(defines);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
setRuntime(defines: any) {
|
|
20
|
+
const runtimeConditions = this._conditions?.map(statement => {
|
|
21
|
+
const cond = String(statement[0]);
|
|
22
|
+
const condExpression = String(statement[1]);
|
|
23
|
+
return new Statement(
|
|
24
|
+
new Expression(cond, this._feature, defines),
|
|
25
|
+
new Expression(condExpression, this._feature, defines),
|
|
26
|
+
);
|
|
27
|
+
});
|
|
28
|
+
this._runtimeConditions = runtimeConditions ?? [];
|
|
29
|
+
this._memoizedResult = undefined;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
evaluate() {
|
|
33
|
+
if (typeof this._memoizedResult !== "undefined") {
|
|
34
|
+
return this._memoizedResult;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const conditions = this._runtimeConditions;
|
|
38
|
+
const length = conditions.length;
|
|
39
|
+
for (let i = 0; i < length; i++) {
|
|
40
|
+
const statement = conditions[i];
|
|
41
|
+
if (statement.condition.evaluate()) {
|
|
42
|
+
const result = statement.expression.evaluate();
|
|
43
|
+
this._memoizedResult = result;
|
|
44
|
+
return result;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const undefinedResult = undefined;
|
|
48
|
+
this._memoizedResult = undefinedResult;
|
|
49
|
+
return undefinedResult;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
class Statement {
|
|
54
|
+
condition: Expression;
|
|
55
|
+
expression: Expression;
|
|
56
|
+
constructor(condition: Expression, expression: Expression) {
|
|
57
|
+
this.condition = condition;
|
|
58
|
+
this.expression = expression;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
export const enum ExpressionNodeType {
|
|
2
|
+
VARIABLE,
|
|
3
|
+
UNARY,
|
|
4
|
+
BINARY,
|
|
5
|
+
TERNARY,
|
|
6
|
+
CONDITIONAL,
|
|
7
|
+
MEMBER,
|
|
8
|
+
FUNCTION_CALL,
|
|
9
|
+
ARRAY,
|
|
10
|
+
REGEX,
|
|
11
|
+
VARIABLE_IN_STRING,
|
|
12
|
+
LITERAL_NULL,
|
|
13
|
+
LITERAL_BOOLEAN,
|
|
14
|
+
LITERAL_NUMBER,
|
|
15
|
+
LITERAL_STRING,
|
|
16
|
+
LITERAL_COLOR,
|
|
17
|
+
LITERAL_VECTOR,
|
|
18
|
+
LITERAL_REGEX,
|
|
19
|
+
LITERAL_UNDEFINED,
|
|
20
|
+
BUILTIN_VARIABLE,
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const unaryOperators = ["!", "-", "+"];
|
|
24
|
+
export const binaryOperators = [
|
|
25
|
+
"+",
|
|
26
|
+
"-",
|
|
27
|
+
"*",
|
|
28
|
+
"/",
|
|
29
|
+
"%",
|
|
30
|
+
"===",
|
|
31
|
+
"!==",
|
|
32
|
+
">",
|
|
33
|
+
">=",
|
|
34
|
+
"<",
|
|
35
|
+
"<=",
|
|
36
|
+
"&&",
|
|
37
|
+
"||",
|
|
38
|
+
"!~",
|
|
39
|
+
"=~",
|
|
40
|
+
"==",
|
|
41
|
+
"!=",
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
export const backslashRegex = /\\/g;
|
|
45
|
+
export const backslashReplacement = "@#%";
|
|
46
|
+
export const replacementRegex = /@#%/g;
|
|
47
|
+
|
|
48
|
+
//#rgba
|
|
49
|
+
export const rgbaMatcher = /^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i;
|
|
50
|
+
//#rrggbbaa
|
|
51
|
+
export const rrggbbaaMatcher = /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i;
|
|
52
|
+
|
|
53
|
+
type ColorMap = {
|
|
54
|
+
[key: string]: string;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export const builtInColor: ColorMap = {
|
|
58
|
+
ALICEBLUE: "#F0F8FF",
|
|
59
|
+
ANTIQUEWHITE: "#FAEBD7",
|
|
60
|
+
AQUA: "#00FFFF",
|
|
61
|
+
AQUAMARINE: "#7FFFD4",
|
|
62
|
+
AZURE: "#F0FFFF",
|
|
63
|
+
BEIGE: "#F5F5DC",
|
|
64
|
+
BISQUE: "#FFE4C4",
|
|
65
|
+
BLACK: "#000000",
|
|
66
|
+
BLANCHEDALMOND: "#FFEBCD",
|
|
67
|
+
BLUE: "#0000FF",
|
|
68
|
+
BLUEVIOLET: "#8A2BE2",
|
|
69
|
+
BROWN: "#A52A2A",
|
|
70
|
+
BURLYWOOD: "#DEB887",
|
|
71
|
+
CADETBLUE: "#5F9EA0",
|
|
72
|
+
CHARTREUSE: "#7FFF00",
|
|
73
|
+
CHOCOLATE: "#D2691E",
|
|
74
|
+
CORAL: "#FF7F50",
|
|
75
|
+
CORNFLOWERBLUE: "#6495ED",
|
|
76
|
+
CORNSILK: "#FFF8DC",
|
|
77
|
+
CRIMSON: "#DC143C",
|
|
78
|
+
CYAN: "#00FFFF",
|
|
79
|
+
DARKBLUE: "#00008B",
|
|
80
|
+
DARKCYAN: "#008B8B",
|
|
81
|
+
DARKGOLDENROD: "#B8860B",
|
|
82
|
+
DARKGRAY: "#A9A9A9",
|
|
83
|
+
DARKGREEN: "#006400",
|
|
84
|
+
DARKGREY: "#A9A9A9",
|
|
85
|
+
DARKKHAKI: "#BDB76B",
|
|
86
|
+
DARKMAGENTA: "#8B008B",
|
|
87
|
+
DARKOLIVEGREEN: "#556B2F",
|
|
88
|
+
DARKORANGE: "#FF8C00",
|
|
89
|
+
DARKORCHID: "#9932CC",
|
|
90
|
+
DARKRED: "#8B0000",
|
|
91
|
+
DARKSALMON: "#E9967A",
|
|
92
|
+
DARKSEAGREEN: "#8FBC8F",
|
|
93
|
+
DARKSLATEBLUE: "#483D8B",
|
|
94
|
+
DARKSLATEGRAY: "#2F4F4F",
|
|
95
|
+
DARKSLATEGREY: "#2F4F4F",
|
|
96
|
+
DARKTURQUOISE: "#00CED1",
|
|
97
|
+
DARKVIOLET: "#9400D3",
|
|
98
|
+
DEEPPINK: "#FF1493",
|
|
99
|
+
DEEPSKYBLUE: "#00BFFF",
|
|
100
|
+
DIMGRAY: "#696969",
|
|
101
|
+
DIMGREY: "#696969",
|
|
102
|
+
DODGERBLUE: "#1E90FF",
|
|
103
|
+
FIREBRICK: "#B22222",
|
|
104
|
+
FLORALWHITE: "#FFFAF0",
|
|
105
|
+
FORESTGREEN: "#228B22",
|
|
106
|
+
FUCHSIA: "#FF00FF",
|
|
107
|
+
GAINSBORO: "#DCDCDC",
|
|
108
|
+
GHOSTWHITE: "#F8F8FF",
|
|
109
|
+
GOLD: "#FFD700",
|
|
110
|
+
GOLDENROD: "#DAA520",
|
|
111
|
+
GRAY: "#808080",
|
|
112
|
+
GREEN: "#008000",
|
|
113
|
+
GREENYELLOW: "#ADFF2F",
|
|
114
|
+
GREY: "#808080",
|
|
115
|
+
HONEYDEW: "#F0FFF0",
|
|
116
|
+
HOTPINK: "#FF69B4",
|
|
117
|
+
INDIANRED: "#CD5C5C",
|
|
118
|
+
INDIGO: "#4B0082",
|
|
119
|
+
IVORY: "#FFFFF0",
|
|
120
|
+
KHAKI: "#F0E68C",
|
|
121
|
+
LAVENDER: "#E6E6FA",
|
|
122
|
+
LAVENDAR_BLUSH: "#FFF0F5",
|
|
123
|
+
LAWNGREEN: "#7CFC00",
|
|
124
|
+
LEMONCHIFFON: "#FFFACD",
|
|
125
|
+
LIGHTBLUE: "#ADD8E6",
|
|
126
|
+
LIGHTCORAL: "#F08080",
|
|
127
|
+
LIGHTCYAN: "#E0FFFF",
|
|
128
|
+
LIGHTGOLDENRODYELLOW: "#FAFAD2",
|
|
129
|
+
LIGHTGRAY: "#D3D3D3",
|
|
130
|
+
LIGHTGREEN: "#90EE90",
|
|
131
|
+
LIGHTGREY: "#D3D3D3",
|
|
132
|
+
LIGHTPINK: "#FFB6C1",
|
|
133
|
+
LIGHTSEAGREEN: "#20B2AA",
|
|
134
|
+
LIGHTSKYBLUE: "#87CEFA",
|
|
135
|
+
LIGHTSLATEGRAY: "#778899",
|
|
136
|
+
LIGHTSLATEGREY: "#778899",
|
|
137
|
+
LIGHTSTEELBLUE: "#B0C4DE",
|
|
138
|
+
LIGHTYELLOW: "#FFFFE0",
|
|
139
|
+
LIME: "#00FF00",
|
|
140
|
+
LIMEGREEN: "#32CD32",
|
|
141
|
+
LINEN: "#FAF0E6",
|
|
142
|
+
MAGENTA: "#FF00FF",
|
|
143
|
+
MAROON: "#800000",
|
|
144
|
+
MEDIUMAQUAMARINE: "#66CDAA",
|
|
145
|
+
MEDIUMBLUE: "#0000CD",
|
|
146
|
+
MEDIUMORCHID: "#BA55D3",
|
|
147
|
+
MEDIUMPURPLE: "#9370DB",
|
|
148
|
+
MEDIUMSEAGREEN: "#3CB371",
|
|
149
|
+
MEDIUMSLATEBLUE: "#7B68EE",
|
|
150
|
+
MEDIUMSPRINGGREEN: "#00FA9A",
|
|
151
|
+
MEDIUMTURQUOISE: "#48D1CC",
|
|
152
|
+
MEDIUMVIOLETRED: "#C71585",
|
|
153
|
+
MIDNIGHTBLUE: "#191970",
|
|
154
|
+
MINTCREAM: "#F5FFFA",
|
|
155
|
+
MISTYROSE: "#FFE4E1",
|
|
156
|
+
MOCCASIN: "#FFE4B5",
|
|
157
|
+
NAVAJOWHITE: "#FFDEAD",
|
|
158
|
+
NAVY: "#000080",
|
|
159
|
+
OLDLACE: "#FDF5E6",
|
|
160
|
+
OLIVE: "#808000",
|
|
161
|
+
OLIVEDRAB: "#6B8E23",
|
|
162
|
+
ORANGE: "#FFA500",
|
|
163
|
+
ORANGERED: "#FF4500",
|
|
164
|
+
ORCHID: "#DA70D6",
|
|
165
|
+
PALEGOLDENROD: "#EEE8AA",
|
|
166
|
+
PALEGREEN: "#98FB98",
|
|
167
|
+
PALETURQUOISE: "#AFEEEE",
|
|
168
|
+
PALEVIOLETRED: "#DB7093",
|
|
169
|
+
PAPAYAWHIP: "#FFEFD5",
|
|
170
|
+
PEACHPUFF: "#FFDAB9",
|
|
171
|
+
PERU: "#CD853F",
|
|
172
|
+
PINK: "#FFC0CB",
|
|
173
|
+
PLUM: "#DDA0DD",
|
|
174
|
+
POWDERBLUE: "#B0E0E6",
|
|
175
|
+
PURPLE: "#800080",
|
|
176
|
+
RED: "#FF0000",
|
|
177
|
+
ROSYBROWN: "#BC8F8F",
|
|
178
|
+
ROYALBLUE: "#4169E1",
|
|
179
|
+
SADDLEBROWN: "#8B4513",
|
|
180
|
+
SALMON: "#FA8072",
|
|
181
|
+
SANDYBROWN: "#F4A460",
|
|
182
|
+
SEAGREEN: "#2E8B57",
|
|
183
|
+
SEASHELL: "#FFF5EE",
|
|
184
|
+
SIENNA: "#A0522D",
|
|
185
|
+
SILVER: "#C0C0C0",
|
|
186
|
+
SKYBLUE: "#87CEEB",
|
|
187
|
+
SLATEBLUE: "#6A5ACD",
|
|
188
|
+
SLATEGRAY: "#708090",
|
|
189
|
+
SLATEGREY: "#708090",
|
|
190
|
+
SNOW: "#FFFAFA",
|
|
191
|
+
SPRINGGREEN: "#00FF7F",
|
|
192
|
+
STEELBLUE: "#4682B4",
|
|
193
|
+
TAN: "#D2B48C",
|
|
194
|
+
TEAL: "#008080",
|
|
195
|
+
THISTLE: "#D8BFD8",
|
|
196
|
+
TOMATO: "#FF6347",
|
|
197
|
+
TURQUOISE: "#40E0D0",
|
|
198
|
+
VIOLET: "#EE82EE",
|
|
199
|
+
WHEAT: "#F5DEB3",
|
|
200
|
+
WHITE: "#FFFFFF",
|
|
201
|
+
WHITESMOKE: "#F5F5F5",
|
|
202
|
+
YELLOW: "#FFFF00",
|
|
203
|
+
YELLOWGREEN: "#9ACD32",
|
|
204
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import jsep from "jsep";
|
|
2
|
+
import { expect, test, describe, beforeEach } from "vitest";
|
|
3
|
+
|
|
4
|
+
import { Feature } from "../../../types";
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
replaceDefines,
|
|
8
|
+
removeBackslashes,
|
|
9
|
+
Expression,
|
|
10
|
+
EXPRESSION_CACHES,
|
|
11
|
+
clearExpressionCaches,
|
|
12
|
+
REPLACED_VARIABLES_CACHE,
|
|
13
|
+
} from "./expression";
|
|
14
|
+
import { createRuntimeAst } from "./runtime";
|
|
15
|
+
|
|
16
|
+
describe("replaceDefines", () => {
|
|
17
|
+
test("should replace defined placeholders with the corresponding values in the expression string", () => {
|
|
18
|
+
const result = replaceDefines("${key}", { key: "value" });
|
|
19
|
+
expect(result).toBe("(value)");
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
test("should handle multiple defined placeholders in the expression string", () => {
|
|
23
|
+
const result = replaceDefines("${key1} + ${key2}", {
|
|
24
|
+
key1: "value1",
|
|
25
|
+
key2: "value2",
|
|
26
|
+
});
|
|
27
|
+
expect(result).toBe("(value1) + (value2)");
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
describe("removeBackslashes", () => {
|
|
32
|
+
test("should remove all backslashes from the expression string", () => {
|
|
33
|
+
const result = removeBackslashes("\\");
|
|
34
|
+
expect(result).toBe("@#%");
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
test("should handle multiple backslashes in the expression string", () => {
|
|
38
|
+
const result = removeBackslashes("\\\\");
|
|
39
|
+
expect(result).toBe("@#%@#%");
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
describe("expression caches", () => {
|
|
44
|
+
beforeEach(() => {
|
|
45
|
+
EXPRESSION_CACHES.clear();
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
test("should remove caches", () => {
|
|
49
|
+
const originalExpression = "${HEIGHT} > 2 ? color('red') : color('blue')";
|
|
50
|
+
const replacedExpression = "czm_HEIGHT > 2 ? color('red') : color('blue')";
|
|
51
|
+
const feature = { properties: { HEIGHT: 1 } } as Feature;
|
|
52
|
+
const expression = new Expression(originalExpression, feature);
|
|
53
|
+
expect(REPLACED_VARIABLES_CACHE.get(originalExpression)).toEqual([replacedExpression, []]);
|
|
54
|
+
expect(EXPRESSION_CACHES.get(replacedExpression)).toEqual(
|
|
55
|
+
createRuntimeAst(expression, jsep(replacedExpression)),
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
clearExpressionCaches(originalExpression, feature, undefined);
|
|
59
|
+
|
|
60
|
+
expect(REPLACED_VARIABLES_CACHE.get(originalExpression)).toBeUndefined();
|
|
61
|
+
expect(EXPRESSION_CACHES.get(replacedExpression)).toBeUndefined();
|
|
62
|
+
});
|
|
63
|
+
});
|