@reearth/core 0.0.7-alpha.7 → 0.0.7-alpha.70

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.
Files changed (516) hide show
  1. package/LICENSE +177 -0
  2. package/dist/core.js +71433 -61051
  3. package/dist/core.umd.cjs +666 -680
  4. package/dist/{index-DqatWUTw.js → index-CUJ6HGQn.js} +1021 -908
  5. package/dist/index.d.ts +195 -73
  6. package/package.json +88 -74
  7. package/src/Map/ClusteredLayers/index.tsx +1 -1
  8. package/src/Map/Geoid/index.tsx +68 -0
  9. package/src/Map/Geoid/types.ts +8 -0
  10. package/src/Map/Layer/hooks.ts +7 -4
  11. package/src/Map/Layer/index.tsx +3 -1
  12. package/src/Map/Layers/hooks.ts +45 -12
  13. package/src/Map/Layers/index.tsx +13 -2
  14. package/src/Map/Layers/keys.ts +1 -0
  15. package/src/Map/Sketch/hooks.ts +454 -411
  16. package/src/Map/Sketch/index.tsx +68 -21
  17. package/src/Map/Sketch/sketchMachine.ts +640 -237
  18. package/src/Map/Sketch/sketchMachine.typegen.ts +58 -1
  19. package/src/Map/Sketch/types.ts +10 -20
  20. package/src/Map/Sketch/usePluginSketchLayer.ts +105 -0
  21. package/src/Map/Sketch/useSketch.ts +558 -0
  22. package/src/Map/Sketch/useSketchFeature.ts +198 -0
  23. package/src/Map/SpatialId/constants.ts +21 -0
  24. package/src/Map/SpatialId/hooks.ts +448 -0
  25. package/src/Map/SpatialId/index.tsx +63 -0
  26. package/src/Map/SpatialId/types.ts +68 -0
  27. package/src/Map/SpatialId/utils.ts +65 -0
  28. package/src/Map/hooks.ts +54 -8
  29. package/src/Map/index.tsx +42 -9
  30. package/src/Map/ref.ts +32 -3
  31. package/src/Map/types/customProvider.ts +32 -0
  32. package/src/Map/types/index.ts +42 -3
  33. package/src/Map/types/viewerProperty.ts +12 -1
  34. package/src/Map/useTimelineManager.ts +4 -10
  35. package/src/Map/utils.ts +1 -1
  36. package/src/Visualizer/Error.tsx +4 -1
  37. package/src/Visualizer/context.tsx +5 -5
  38. package/src/Visualizer/coreContext.tsx +3 -1
  39. package/src/Visualizer/hooks.ts +56 -22
  40. package/src/Visualizer/index.stories.tsx +15 -0
  41. package/src/Visualizer/index.tsx +29 -6
  42. package/src/Visualizer/useViewport.ts +1 -1
  43. package/src/engines/Cesium/Feature/Box/hooks/box.ts +4 -4
  44. package/src/engines/Cesium/Feature/Box/hooks/edge.ts +1 -1
  45. package/src/engines/Cesium/Feature/Box/hooks/side.ts +1 -1
  46. package/src/engines/Cesium/Feature/Box/utils.ts +6 -0
  47. package/src/engines/Cesium/Feature/Ellipse/index.stories.tsx +0 -1
  48. package/src/engines/Cesium/Feature/Frustum/getFieldOfView.ts +2 -0
  49. package/src/engines/Cesium/Feature/Frustum/index.stories.tsx +0 -1
  50. package/src/engines/Cesium/Feature/HeatMap/HeatmapMesh.tsx +1 -1
  51. package/src/engines/Cesium/Feature/Marker/index.tsx +1 -1
  52. package/src/engines/Cesium/Feature/Model/index.stories.tsx +1 -2
  53. package/src/engines/Cesium/Feature/Model/index.tsx +3 -3
  54. package/src/engines/Cesium/Feature/PhotoOverlay/hooks.ts +2 -2
  55. package/src/engines/Cesium/Feature/PhotoOverlay/index.tsx +3 -1
  56. package/src/engines/Cesium/Feature/Polygon/index.stories.tsx +0 -1
  57. package/src/engines/Cesium/Feature/Polygon/index.tsx +6 -4
  58. package/src/engines/Cesium/Feature/Raster/index.stories.tsx +0 -1
  59. package/src/engines/Cesium/Feature/Raster/mvt.ts +2 -1
  60. package/src/engines/Cesium/Feature/Resource/index.stories.tsx +0 -1
  61. package/src/engines/Cesium/Feature/Resource/index.tsx +1 -27
  62. package/src/engines/Cesium/Feature/Resource/utils.ts +86 -91
  63. package/src/engines/Cesium/Feature/Tileset/hooks.ts +273 -87
  64. package/src/engines/Cesium/Feature/Tileset/index.stories.tsx +0 -1
  65. package/src/engines/Cesium/Feature/Tileset/index.tsx +7 -14
  66. package/src/engines/Cesium/Feature/Tileset/useClippingBox.ts +2 -2
  67. package/src/engines/Cesium/Feature/Tileset/useDrawClipping.ts +2 -2
  68. package/src/engines/Cesium/Feature/context.ts +3 -0
  69. package/src/engines/Cesium/Feature/index.tsx +27 -10
  70. package/src/engines/Cesium/Feature/utils.tsx +20 -12
  71. package/src/engines/Cesium/PostProcesses/hbao/AmbientOcclusion.tsx +7 -4
  72. package/src/engines/Cesium/Sketch/ControlPoint.tsx +128 -24
  73. package/src/engines/Cesium/Sketch/ExtrudedControlPoints.tsx +70 -25
  74. package/src/engines/Cesium/Sketch/ExtrudedMeasurement.tsx +3 -1
  75. package/src/engines/Cesium/Sketch/ExtrudedPolygonEntity.tsx +14 -14
  76. package/src/engines/Cesium/Sketch/PolylineEntity.tsx +7 -4
  77. package/src/engines/Cesium/Sketch/SurfaceAddingPoints.tsx +60 -0
  78. package/src/engines/Cesium/Sketch/SurfaceControlPoints.tsx +126 -35
  79. package/src/engines/Cesium/Sketch/constants.ts +5 -0
  80. package/src/engines/Cesium/Sketch/index.tsx +68 -29
  81. package/src/engines/Cesium/SpatialId/CoordinateIndicator.tsx +28 -0
  82. package/src/engines/Cesium/SpatialId/SpatialIdSpace.tsx +33 -0
  83. package/src/engines/Cesium/SpatialId/VerticalSpaceIndicator.tsx +32 -0
  84. package/src/engines/Cesium/SpatialId/index.ts +3 -0
  85. package/src/engines/Cesium/common.ts +55 -18
  86. package/src/engines/Cesium/core/Clock.tsx +1 -1
  87. package/src/engines/Cesium/core/Globe/index.tsx +69 -0
  88. package/src/engines/Cesium/core/Globe/useTerrainProviderPromise.ts +81 -0
  89. package/src/engines/Cesium/core/Imagery.test.ts +299 -42
  90. package/src/engines/Cesium/core/Imagery.tsx +282 -54
  91. package/src/engines/Cesium/core/Indicator/Indicator.tsx +2 -2
  92. package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/JapanGSIOptimalBVmapLabelImagery.tsx +13 -6
  93. package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/JapanGSIOptimalBVmapLabelImageryLayer.tsx +2 -1
  94. package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/JapanGSIOptimalBVmapLabelImageryProvider.ts +3 -4
  95. package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/JapanGSIOptimalBVmapVectorMapLabel.tsx +14 -2
  96. package/src/engines/Cesium/core/labels/JapanGSIOptimalBVmapVectorMapLabel/helpers.ts +1 -1
  97. package/src/engines/Cesium/core/labels/LabelImageryLayers.tsx +10 -1
  98. package/src/engines/Cesium/core/presets.ts +122 -48
  99. package/src/engines/Cesium/helpers/getGeometryFromEntity.ts +55 -0
  100. package/src/engines/Cesium/hooks/useCamera.ts +2 -2
  101. package/src/engines/Cesium/hooks/useCameraLimiter.ts +1 -1
  102. package/src/engines/Cesium/hooks/useEngineRef.ts +52 -5
  103. package/src/engines/Cesium/hooks/useExplicitRender.ts +2 -2
  104. package/src/engines/Cesium/hooks/useInstance.ts +1 -1
  105. package/src/engines/Cesium/hooks/useLayerDragDrop.ts +3 -3
  106. package/src/engines/Cesium/hooks/useLayerSelectWithRect.ts +2 -2
  107. package/src/engines/Cesium/hooks/useOverrideGlobeShader/useOverrideGlobeShader.ts +115 -67
  108. package/src/engines/Cesium/hooks/useViewerProperty.ts +1 -1
  109. package/src/engines/Cesium/hooks.ts +68 -17
  110. package/src/engines/Cesium/index.stories.tsx +0 -1
  111. package/src/engines/Cesium/index.tsx +38 -8
  112. package/src/engines/Cesium/pickMany.ts +2 -0
  113. package/src/engines/Cesium/types.ts +1 -1
  114. package/src/engines/Cesium/utils/mouse.ts +1 -1
  115. package/src/engines/Cesium/utils/utils.ts +1 -1
  116. package/src/mantle/atoms/compute.test.ts +4 -4
  117. package/src/mantle/atoms/compute.ts +8 -4
  118. package/src/mantle/compat/forward.ts +1 -1
  119. package/src/mantle/data/geojson.ts +49 -26
  120. package/src/mantle/data/georss.ts +2 -2
  121. package/src/mantle/data/gml.ts +2 -2
  122. package/src/mantle/data/gpx.ts +2 -2
  123. package/src/mantle/data/shapefile/parseZip.ts +1 -0
  124. package/src/mantle/evaluator/simple/expression/README.md +392 -0
  125. package/src/mantle/evaluator/simple/expression/expression.test.ts +137 -0
  126. package/src/mantle/evaluator/simple/expression/node.ts +10 -12
  127. package/src/mantle/evaluator/simple/expression/variableReplacer.test.ts +178 -0
  128. package/src/mantle/evaluator/simple/expression/variableReplacer.ts +24 -11
  129. package/src/mantle/types/appearance.ts +4 -2
  130. package/src/mantle/types/index.ts +5 -0
  131. package/src/{Visualizer → shared}/interactionMode.ts +3 -2
  132. package/src/test/setup.ts +1 -1
  133. package/src/test/utils.tsx +1 -1
  134. package/src/types/modules.d.ts +96 -0
  135. package/src/utils/StringMatcher.ts +1 -1
  136. package/src/utils/image.ts +2 -12
  137. package/src/utils/use-delayed-count.ts +1 -1
  138. package/src/utils/use-dnd/drop.ts +1 -1
  139. package/src/utils/util.ts +1 -1
  140. package/src/utils/value.ts +2 -2
  141. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_0.json +0 -1
  142. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_1.json +0 -1
  143. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_10.json +0 -1
  144. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_11.json +0 -1
  145. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_12.json +0 -1
  146. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_13.json +0 -1
  147. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_14.json +0 -1
  148. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_15.json +0 -1
  149. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_16.json +0 -1
  150. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_17.json +0 -1
  151. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_18.json +0 -1
  152. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_19.json +0 -1
  153. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_2.json +0 -1
  154. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_20.json +0 -1
  155. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_21.json +0 -1
  156. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_22.json +0 -1
  157. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_23.json +0 -1
  158. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_24.json +0 -1
  159. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_25.json +0 -1
  160. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_26.json +0 -1
  161. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_27.json +0 -1
  162. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_3.json +0 -1
  163. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_4.json +0 -1
  164. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_5.json +0 -1
  165. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_6.json +0 -1
  166. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_7.json +0 -1
  167. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_8.json +0 -1
  168. package/dist/cesium/Assets/IAU2006_XYS/IAU2006_XYS_9.json +0 -1
  169. package/dist/cesium/Assets/Images/bing_maps_credit.png +0 -0
  170. package/dist/cesium/Assets/Images/cesium_credit.png +0 -0
  171. package/dist/cesium/Assets/Images/google_earth_credit.png +0 -0
  172. package/dist/cesium/Assets/Images/ion-credit.png +0 -0
  173. package/dist/cesium/Assets/Textures/LensFlare/DirtMask.jpg +0 -0
  174. package/dist/cesium/Assets/Textures/LensFlare/StarBurst.jpg +0 -0
  175. package/dist/cesium/Assets/Textures/NaturalEarthII/0/0/0.jpg +0 -0
  176. package/dist/cesium/Assets/Textures/NaturalEarthII/0/1/0.jpg +0 -0
  177. package/dist/cesium/Assets/Textures/NaturalEarthII/1/0/0.jpg +0 -0
  178. package/dist/cesium/Assets/Textures/NaturalEarthII/1/0/1.jpg +0 -0
  179. package/dist/cesium/Assets/Textures/NaturalEarthII/1/1/0.jpg +0 -0
  180. package/dist/cesium/Assets/Textures/NaturalEarthII/1/1/1.jpg +0 -0
  181. package/dist/cesium/Assets/Textures/NaturalEarthII/1/2/0.jpg +0 -0
  182. package/dist/cesium/Assets/Textures/NaturalEarthII/1/2/1.jpg +0 -0
  183. package/dist/cesium/Assets/Textures/NaturalEarthII/1/3/0.jpg +0 -0
  184. package/dist/cesium/Assets/Textures/NaturalEarthII/1/3/1.jpg +0 -0
  185. package/dist/cesium/Assets/Textures/NaturalEarthII/2/0/0.jpg +0 -0
  186. package/dist/cesium/Assets/Textures/NaturalEarthII/2/0/1.jpg +0 -0
  187. package/dist/cesium/Assets/Textures/NaturalEarthII/2/0/2.jpg +0 -0
  188. package/dist/cesium/Assets/Textures/NaturalEarthII/2/0/3.jpg +0 -0
  189. package/dist/cesium/Assets/Textures/NaturalEarthII/2/1/0.jpg +0 -0
  190. package/dist/cesium/Assets/Textures/NaturalEarthII/2/1/1.jpg +0 -0
  191. package/dist/cesium/Assets/Textures/NaturalEarthII/2/1/2.jpg +0 -0
  192. package/dist/cesium/Assets/Textures/NaturalEarthII/2/1/3.jpg +0 -0
  193. package/dist/cesium/Assets/Textures/NaturalEarthII/2/2/0.jpg +0 -0
  194. package/dist/cesium/Assets/Textures/NaturalEarthII/2/2/1.jpg +0 -0
  195. package/dist/cesium/Assets/Textures/NaturalEarthII/2/2/2.jpg +0 -0
  196. package/dist/cesium/Assets/Textures/NaturalEarthII/2/2/3.jpg +0 -0
  197. package/dist/cesium/Assets/Textures/NaturalEarthII/2/3/0.jpg +0 -0
  198. package/dist/cesium/Assets/Textures/NaturalEarthII/2/3/1.jpg +0 -0
  199. package/dist/cesium/Assets/Textures/NaturalEarthII/2/3/2.jpg +0 -0
  200. package/dist/cesium/Assets/Textures/NaturalEarthII/2/3/3.jpg +0 -0
  201. package/dist/cesium/Assets/Textures/NaturalEarthII/2/4/0.jpg +0 -0
  202. package/dist/cesium/Assets/Textures/NaturalEarthII/2/4/1.jpg +0 -0
  203. package/dist/cesium/Assets/Textures/NaturalEarthII/2/4/2.jpg +0 -0
  204. package/dist/cesium/Assets/Textures/NaturalEarthII/2/4/3.jpg +0 -0
  205. package/dist/cesium/Assets/Textures/NaturalEarthII/2/5/0.jpg +0 -0
  206. package/dist/cesium/Assets/Textures/NaturalEarthII/2/5/1.jpg +0 -0
  207. package/dist/cesium/Assets/Textures/NaturalEarthII/2/5/2.jpg +0 -0
  208. package/dist/cesium/Assets/Textures/NaturalEarthII/2/5/3.jpg +0 -0
  209. package/dist/cesium/Assets/Textures/NaturalEarthII/2/6/0.jpg +0 -0
  210. package/dist/cesium/Assets/Textures/NaturalEarthII/2/6/1.jpg +0 -0
  211. package/dist/cesium/Assets/Textures/NaturalEarthII/2/6/2.jpg +0 -0
  212. package/dist/cesium/Assets/Textures/NaturalEarthII/2/6/3.jpg +0 -0
  213. package/dist/cesium/Assets/Textures/NaturalEarthII/2/7/0.jpg +0 -0
  214. package/dist/cesium/Assets/Textures/NaturalEarthII/2/7/1.jpg +0 -0
  215. package/dist/cesium/Assets/Textures/NaturalEarthII/2/7/2.jpg +0 -0
  216. package/dist/cesium/Assets/Textures/NaturalEarthII/2/7/3.jpg +0 -0
  217. package/dist/cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml +0 -14
  218. package/dist/cesium/Assets/Textures/SkyBox/tycho2t3_80_mx.jpg +0 -0
  219. package/dist/cesium/Assets/Textures/SkyBox/tycho2t3_80_my.jpg +0 -0
  220. package/dist/cesium/Assets/Textures/SkyBox/tycho2t3_80_mz.jpg +0 -0
  221. package/dist/cesium/Assets/Textures/SkyBox/tycho2t3_80_px.jpg +0 -0
  222. package/dist/cesium/Assets/Textures/SkyBox/tycho2t3_80_py.jpg +0 -0
  223. package/dist/cesium/Assets/Textures/SkyBox/tycho2t3_80_pz.jpg +0 -0
  224. package/dist/cesium/Assets/Textures/maki/airfield.png +0 -0
  225. package/dist/cesium/Assets/Textures/maki/airport.png +0 -0
  226. package/dist/cesium/Assets/Textures/maki/alcohol-shop.png +0 -0
  227. package/dist/cesium/Assets/Textures/maki/america-football.png +0 -0
  228. package/dist/cesium/Assets/Textures/maki/art-gallery.png +0 -0
  229. package/dist/cesium/Assets/Textures/maki/bakery.png +0 -0
  230. package/dist/cesium/Assets/Textures/maki/bank.png +0 -0
  231. package/dist/cesium/Assets/Textures/maki/bar.png +0 -0
  232. package/dist/cesium/Assets/Textures/maki/baseball.png +0 -0
  233. package/dist/cesium/Assets/Textures/maki/basketball.png +0 -0
  234. package/dist/cesium/Assets/Textures/maki/beer.png +0 -0
  235. package/dist/cesium/Assets/Textures/maki/bicycle.png +0 -0
  236. package/dist/cesium/Assets/Textures/maki/building.png +0 -0
  237. package/dist/cesium/Assets/Textures/maki/bus.png +0 -0
  238. package/dist/cesium/Assets/Textures/maki/cafe.png +0 -0
  239. package/dist/cesium/Assets/Textures/maki/camera.png +0 -0
  240. package/dist/cesium/Assets/Textures/maki/campsite.png +0 -0
  241. package/dist/cesium/Assets/Textures/maki/car.png +0 -0
  242. package/dist/cesium/Assets/Textures/maki/cemetery.png +0 -0
  243. package/dist/cesium/Assets/Textures/maki/cesium.png +0 -0
  244. package/dist/cesium/Assets/Textures/maki/chemist.png +0 -0
  245. package/dist/cesium/Assets/Textures/maki/cinema.png +0 -0
  246. package/dist/cesium/Assets/Textures/maki/circle-stroked.png +0 -0
  247. package/dist/cesium/Assets/Textures/maki/circle.png +0 -0
  248. package/dist/cesium/Assets/Textures/maki/city.png +0 -0
  249. package/dist/cesium/Assets/Textures/maki/clothing-store.png +0 -0
  250. package/dist/cesium/Assets/Textures/maki/college.png +0 -0
  251. package/dist/cesium/Assets/Textures/maki/commercial.png +0 -0
  252. package/dist/cesium/Assets/Textures/maki/cricket.png +0 -0
  253. package/dist/cesium/Assets/Textures/maki/cross.png +0 -0
  254. package/dist/cesium/Assets/Textures/maki/dam.png +0 -0
  255. package/dist/cesium/Assets/Textures/maki/danger.png +0 -0
  256. package/dist/cesium/Assets/Textures/maki/disability.png +0 -0
  257. package/dist/cesium/Assets/Textures/maki/dog-park.png +0 -0
  258. package/dist/cesium/Assets/Textures/maki/embassy.png +0 -0
  259. package/dist/cesium/Assets/Textures/maki/emergency-telephone.png +0 -0
  260. package/dist/cesium/Assets/Textures/maki/entrance.png +0 -0
  261. package/dist/cesium/Assets/Textures/maki/farm.png +0 -0
  262. package/dist/cesium/Assets/Textures/maki/fast-food.png +0 -0
  263. package/dist/cesium/Assets/Textures/maki/ferry.png +0 -0
  264. package/dist/cesium/Assets/Textures/maki/fire-station.png +0 -0
  265. package/dist/cesium/Assets/Textures/maki/fuel.png +0 -0
  266. package/dist/cesium/Assets/Textures/maki/garden.png +0 -0
  267. package/dist/cesium/Assets/Textures/maki/gift.png +0 -0
  268. package/dist/cesium/Assets/Textures/maki/golf.png +0 -0
  269. package/dist/cesium/Assets/Textures/maki/grocery.png +0 -0
  270. package/dist/cesium/Assets/Textures/maki/hairdresser.png +0 -0
  271. package/dist/cesium/Assets/Textures/maki/harbor.png +0 -0
  272. package/dist/cesium/Assets/Textures/maki/heart.png +0 -0
  273. package/dist/cesium/Assets/Textures/maki/heliport.png +0 -0
  274. package/dist/cesium/Assets/Textures/maki/hospital.png +0 -0
  275. package/dist/cesium/Assets/Textures/maki/ice-cream.png +0 -0
  276. package/dist/cesium/Assets/Textures/maki/industrial.png +0 -0
  277. package/dist/cesium/Assets/Textures/maki/land-use.png +0 -0
  278. package/dist/cesium/Assets/Textures/maki/laundry.png +0 -0
  279. package/dist/cesium/Assets/Textures/maki/library.png +0 -0
  280. package/dist/cesium/Assets/Textures/maki/lighthouse.png +0 -0
  281. package/dist/cesium/Assets/Textures/maki/lodging.png +0 -0
  282. package/dist/cesium/Assets/Textures/maki/logging.png +0 -0
  283. package/dist/cesium/Assets/Textures/maki/london-underground.png +0 -0
  284. package/dist/cesium/Assets/Textures/maki/marker-stroked.png +0 -0
  285. package/dist/cesium/Assets/Textures/maki/marker.png +0 -0
  286. package/dist/cesium/Assets/Textures/maki/minefield.png +0 -0
  287. package/dist/cesium/Assets/Textures/maki/mobilephone.png +0 -0
  288. package/dist/cesium/Assets/Textures/maki/monument.png +0 -0
  289. package/dist/cesium/Assets/Textures/maki/museum.png +0 -0
  290. package/dist/cesium/Assets/Textures/maki/music.png +0 -0
  291. package/dist/cesium/Assets/Textures/maki/oil-well.png +0 -0
  292. package/dist/cesium/Assets/Textures/maki/park.png +0 -0
  293. package/dist/cesium/Assets/Textures/maki/park2.png +0 -0
  294. package/dist/cesium/Assets/Textures/maki/parking-garage.png +0 -0
  295. package/dist/cesium/Assets/Textures/maki/parking.png +0 -0
  296. package/dist/cesium/Assets/Textures/maki/pharmacy.png +0 -0
  297. package/dist/cesium/Assets/Textures/maki/pitch.png +0 -0
  298. package/dist/cesium/Assets/Textures/maki/place-of-worship.png +0 -0
  299. package/dist/cesium/Assets/Textures/maki/playground.png +0 -0
  300. package/dist/cesium/Assets/Textures/maki/police.png +0 -0
  301. package/dist/cesium/Assets/Textures/maki/polling-place.png +0 -0
  302. package/dist/cesium/Assets/Textures/maki/post.png +0 -0
  303. package/dist/cesium/Assets/Textures/maki/prison.png +0 -0
  304. package/dist/cesium/Assets/Textures/maki/rail-above.png +0 -0
  305. package/dist/cesium/Assets/Textures/maki/rail-light.png +0 -0
  306. package/dist/cesium/Assets/Textures/maki/rail-metro.png +0 -0
  307. package/dist/cesium/Assets/Textures/maki/rail-underground.png +0 -0
  308. package/dist/cesium/Assets/Textures/maki/rail.png +0 -0
  309. package/dist/cesium/Assets/Textures/maki/religious-christian.png +0 -0
  310. package/dist/cesium/Assets/Textures/maki/religious-jewish.png +0 -0
  311. package/dist/cesium/Assets/Textures/maki/religious-muslim.png +0 -0
  312. package/dist/cesium/Assets/Textures/maki/restaurant.png +0 -0
  313. package/dist/cesium/Assets/Textures/maki/roadblock.png +0 -0
  314. package/dist/cesium/Assets/Textures/maki/rocket.png +0 -0
  315. package/dist/cesium/Assets/Textures/maki/school.png +0 -0
  316. package/dist/cesium/Assets/Textures/maki/scooter.png +0 -0
  317. package/dist/cesium/Assets/Textures/maki/shop.png +0 -0
  318. package/dist/cesium/Assets/Textures/maki/skiing.png +0 -0
  319. package/dist/cesium/Assets/Textures/maki/slaughterhouse.png +0 -0
  320. package/dist/cesium/Assets/Textures/maki/soccer.png +0 -0
  321. package/dist/cesium/Assets/Textures/maki/square-stroked.png +0 -0
  322. package/dist/cesium/Assets/Textures/maki/square.png +0 -0
  323. package/dist/cesium/Assets/Textures/maki/star-stroked.png +0 -0
  324. package/dist/cesium/Assets/Textures/maki/star.png +0 -0
  325. package/dist/cesium/Assets/Textures/maki/suitcase.png +0 -0
  326. package/dist/cesium/Assets/Textures/maki/swimming.png +0 -0
  327. package/dist/cesium/Assets/Textures/maki/telephone.png +0 -0
  328. package/dist/cesium/Assets/Textures/maki/tennis.png +0 -0
  329. package/dist/cesium/Assets/Textures/maki/theatre.png +0 -0
  330. package/dist/cesium/Assets/Textures/maki/toilets.png +0 -0
  331. package/dist/cesium/Assets/Textures/maki/town-hall.png +0 -0
  332. package/dist/cesium/Assets/Textures/maki/town.png +0 -0
  333. package/dist/cesium/Assets/Textures/maki/triangle-stroked.png +0 -0
  334. package/dist/cesium/Assets/Textures/maki/triangle.png +0 -0
  335. package/dist/cesium/Assets/Textures/maki/village.png +0 -0
  336. package/dist/cesium/Assets/Textures/maki/warehouse.png +0 -0
  337. package/dist/cesium/Assets/Textures/maki/waste-basket.png +0 -0
  338. package/dist/cesium/Assets/Textures/maki/water.png +0 -0
  339. package/dist/cesium/Assets/Textures/maki/wetland.png +0 -0
  340. package/dist/cesium/Assets/Textures/maki/zoo.png +0 -0
  341. package/dist/cesium/Assets/Textures/moonSmall.jpg +0 -0
  342. package/dist/cesium/Assets/Textures/pin.svg +0 -1
  343. package/dist/cesium/Assets/Textures/waterNormals.jpg +0 -0
  344. package/dist/cesium/Assets/Textures/waterNormalsSmall.jpg +0 -0
  345. package/dist/cesium/Assets/approximateTerrainHeights.json +0 -1
  346. package/dist/cesium/ThirdParty/Workers/package.json +0 -1
  347. package/dist/cesium/ThirdParty/Workers/pako_deflate.min.js +0 -1
  348. package/dist/cesium/ThirdParty/Workers/pako_inflate.min.js +0 -1
  349. package/dist/cesium/ThirdParty/Workers/z-worker-pako.js +0 -1
  350. package/dist/cesium/ThirdParty/basis_transcoder.wasm +0 -0
  351. package/dist/cesium/ThirdParty/draco_decoder.wasm +0 -0
  352. package/dist/cesium/ThirdParty/google-earth-dbroot-parser.js +0 -1
  353. package/dist/cesium/Widgets/Animation/Animation.css +0 -127
  354. package/dist/cesium/Widgets/Animation/lighter.css +0 -70
  355. package/dist/cesium/Widgets/BaseLayerPicker/BaseLayerPicker.css +0 -108
  356. package/dist/cesium/Widgets/BaseLayerPicker/lighter.css +0 -22
  357. package/dist/cesium/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspector.css +0 -102
  358. package/dist/cesium/Widgets/CesiumInspector/CesiumInspector.css +0 -113
  359. package/dist/cesium/Widgets/CesiumWidget/CesiumWidget.css +0 -124
  360. package/dist/cesium/Widgets/CesiumWidget/lighter.css +0 -14
  361. package/dist/cesium/Widgets/FullscreenButton/FullscreenButton.css +0 -8
  362. package/dist/cesium/Widgets/Geocoder/Geocoder.css +0 -70
  363. package/dist/cesium/Widgets/Geocoder/lighter.css +0 -17
  364. package/dist/cesium/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css +0 -27
  365. package/dist/cesium/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldHillshade.png +0 -0
  366. package/dist/cesium/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldImagery.png +0 -0
  367. package/dist/cesium/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldOcean.png +0 -0
  368. package/dist/cesium/Widgets/Images/ImageryProviders/bingAerial.png +0 -0
  369. package/dist/cesium/Widgets/Images/ImageryProviders/bingAerialLabels.png +0 -0
  370. package/dist/cesium/Widgets/Images/ImageryProviders/bingRoads.png +0 -0
  371. package/dist/cesium/Widgets/Images/ImageryProviders/blueMarble.png +0 -0
  372. package/dist/cesium/Widgets/Images/ImageryProviders/earthAtNight.png +0 -0
  373. package/dist/cesium/Widgets/Images/ImageryProviders/mapQuestOpenStreetMap.png +0 -0
  374. package/dist/cesium/Widgets/Images/ImageryProviders/mapboxSatellite.png +0 -0
  375. package/dist/cesium/Widgets/Images/ImageryProviders/mapboxStreets.png +0 -0
  376. package/dist/cesium/Widgets/Images/ImageryProviders/mapboxTerrain.png +0 -0
  377. package/dist/cesium/Widgets/Images/ImageryProviders/naturalEarthII.png +0 -0
  378. package/dist/cesium/Widgets/Images/ImageryProviders/openStreetMap.png +0 -0
  379. package/dist/cesium/Widgets/Images/ImageryProviders/sentinel-2.png +0 -0
  380. package/dist/cesium/Widgets/Images/ImageryProviders/stadiaAlidadeSmooth.png +0 -0
  381. package/dist/cesium/Widgets/Images/ImageryProviders/stadiaAlidadeSmoothDark.png +0 -0
  382. package/dist/cesium/Widgets/Images/ImageryProviders/stamenToner.png +0 -0
  383. package/dist/cesium/Widgets/Images/ImageryProviders/stamenWatercolor.png +0 -0
  384. package/dist/cesium/Widgets/Images/NavigationHelp/Mouse.svg +0 -84
  385. package/dist/cesium/Widgets/Images/NavigationHelp/MouseLeft.svg +0 -76
  386. package/dist/cesium/Widgets/Images/NavigationHelp/MouseMiddle.svg +0 -76
  387. package/dist/cesium/Widgets/Images/NavigationHelp/MouseRight.svg +0 -76
  388. package/dist/cesium/Widgets/Images/NavigationHelp/Touch.svg +0 -120
  389. package/dist/cesium/Widgets/Images/NavigationHelp/TouchDrag.svg +0 -129
  390. package/dist/cesium/Widgets/Images/NavigationHelp/TouchRotate.svg +0 -76
  391. package/dist/cesium/Widgets/Images/NavigationHelp/TouchTilt.svg +0 -135
  392. package/dist/cesium/Widgets/Images/NavigationHelp/TouchZoom.svg +0 -74
  393. package/dist/cesium/Widgets/Images/TerrainProviders/CesiumWorldTerrain.png +0 -0
  394. package/dist/cesium/Widgets/Images/TerrainProviders/Ellipsoid.png +0 -0
  395. package/dist/cesium/Widgets/Images/TimelineIcons.png +0 -0
  396. package/dist/cesium/Widgets/Images/info-loading.gif +0 -0
  397. package/dist/cesium/Widgets/InfoBox/InfoBox.css +0 -92
  398. package/dist/cesium/Widgets/InfoBox/InfoBoxDescription.css +0 -178
  399. package/dist/cesium/Widgets/NavigationHelpButton/NavigationHelpButton.css +0 -93
  400. package/dist/cesium/Widgets/NavigationHelpButton/lighter.css +0 -38
  401. package/dist/cesium/Widgets/PerformanceWatchdog/PerformanceWatchdog.css +0 -15
  402. package/dist/cesium/Widgets/ProjectionPicker/ProjectionPicker.css +0 -38
  403. package/dist/cesium/Widgets/SceneModePicker/SceneModePicker.css +0 -56
  404. package/dist/cesium/Widgets/SelectionIndicator/SelectionIndicator.css +0 -20
  405. package/dist/cesium/Widgets/Timeline/Timeline.css +0 -103
  406. package/dist/cesium/Widgets/Timeline/lighter.css +0 -23
  407. package/dist/cesium/Widgets/VRButton/VRButton.css +0 -8
  408. package/dist/cesium/Widgets/Viewer/Viewer.css +0 -107
  409. package/dist/cesium/Widgets/VoxelInspector/VoxelInspector.css +0 -16
  410. package/dist/cesium/Widgets/lighter.css +0 -237
  411. package/dist/cesium/Widgets/lighterShared.css +0 -46
  412. package/dist/cesium/Widgets/shared.css +0 -103
  413. package/dist/cesium/Widgets/widgets.css +0 -1346
  414. package/dist/cesium/Workers/chunk-2YD5QWGR.js +0 -28
  415. package/dist/cesium/Workers/chunk-3T4KR75X.js +0 -26
  416. package/dist/cesium/Workers/chunk-46KFVW24.js +0 -26
  417. package/dist/cesium/Workers/chunk-4EI6PP43.js +0 -28
  418. package/dist/cesium/Workers/chunk-4RS52VIY.js +0 -26
  419. package/dist/cesium/Workers/chunk-4YLYA3DC.js +0 -26
  420. package/dist/cesium/Workers/chunk-5ENAGXBI.js +0 -26
  421. package/dist/cesium/Workers/chunk-5VIB3TI5.js +0 -26
  422. package/dist/cesium/Workers/chunk-6NGZLDFZ.js +0 -26
  423. package/dist/cesium/Workers/chunk-6RGNWVZ2.js +0 -27
  424. package/dist/cesium/Workers/chunk-7AZZVJ52.js +0 -26
  425. package/dist/cesium/Workers/chunk-AMXAQQEL.js +0 -26
  426. package/dist/cesium/Workers/chunk-AQW44ZPC.js +0 -26
  427. package/dist/cesium/Workers/chunk-CPCMDW6Z.js +0 -26
  428. package/dist/cesium/Workers/chunk-DNL2WDRL.js +0 -26
  429. package/dist/cesium/Workers/chunk-ERW7V247.js +0 -26
  430. package/dist/cesium/Workers/chunk-EYRIA4TP.js +0 -26
  431. package/dist/cesium/Workers/chunk-F7RQIJML.js +0 -26
  432. package/dist/cesium/Workers/chunk-FPZMU6QP.js +0 -26
  433. package/dist/cesium/Workers/chunk-FZDVQW7A.js +0 -26
  434. package/dist/cesium/Workers/chunk-GAZ2U4FO.js +0 -26
  435. package/dist/cesium/Workers/chunk-I44IOOT4.js +0 -26
  436. package/dist/cesium/Workers/chunk-IALXUAD4.js +0 -26
  437. package/dist/cesium/Workers/chunk-IXBUEUZL.js +0 -26
  438. package/dist/cesium/Workers/chunk-J3GCYV5K.js +0 -26
  439. package/dist/cesium/Workers/chunk-KGSZTFHZ.js +0 -26
  440. package/dist/cesium/Workers/chunk-KKKPU2CI.js +0 -26
  441. package/dist/cesium/Workers/chunk-KTEJE5KE.js +0 -26
  442. package/dist/cesium/Workers/chunk-KYZ3DYY6.js +0 -26
  443. package/dist/cesium/Workers/chunk-L2QG4MRI.js +0 -26
  444. package/dist/cesium/Workers/chunk-MCE3KFYN.js +0 -26
  445. package/dist/cesium/Workers/chunk-MMLDGXML.js +0 -26
  446. package/dist/cesium/Workers/chunk-MTBRPBDQ.js +0 -26
  447. package/dist/cesium/Workers/chunk-OKT6VBRK.js +0 -26
  448. package/dist/cesium/Workers/chunk-PHYDKLSY.js +0 -26
  449. package/dist/cesium/Workers/chunk-PWPX3224.js +0 -26
  450. package/dist/cesium/Workers/chunk-QHOVE6WG.js +0 -26
  451. package/dist/cesium/Workers/chunk-QJ6MBL22.js +0 -26
  452. package/dist/cesium/Workers/chunk-QKO6VIG2.js +0 -26
  453. package/dist/cesium/Workers/chunk-QVEE4QL2.js +0 -26
  454. package/dist/cesium/Workers/chunk-RXQOQZ7S.js +0 -26
  455. package/dist/cesium/Workers/chunk-S3ZKQKMM.js +0 -26
  456. package/dist/cesium/Workers/chunk-SFEUMZSK.js +0 -26
  457. package/dist/cesium/Workers/chunk-T75MW4X3.js +0 -26
  458. package/dist/cesium/Workers/chunk-TVO2A75R.js +0 -66
  459. package/dist/cesium/Workers/chunk-UHR36K45.js +0 -27
  460. package/dist/cesium/Workers/chunk-UKJCDZOR.js +0 -26
  461. package/dist/cesium/Workers/chunk-VKVIYER6.js +0 -26
  462. package/dist/cesium/Workers/chunk-VPIQWTRZ.js +0 -26
  463. package/dist/cesium/Workers/chunk-XSX5HRFC.js +0 -26
  464. package/dist/cesium/Workers/chunk-Z5WQQHSL.js +0 -26
  465. package/dist/cesium/Workers/chunk-Z7B2VEL5.js +0 -26
  466. package/dist/cesium/Workers/combineGeometry.js +0 -26
  467. package/dist/cesium/Workers/createBoxGeometry.js +0 -26
  468. package/dist/cesium/Workers/createBoxOutlineGeometry.js +0 -26
  469. package/dist/cesium/Workers/createCircleGeometry.js +0 -26
  470. package/dist/cesium/Workers/createCircleOutlineGeometry.js +0 -26
  471. package/dist/cesium/Workers/createCoplanarPolygonGeometry.js +0 -26
  472. package/dist/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +0 -26
  473. package/dist/cesium/Workers/createCorridorGeometry.js +0 -26
  474. package/dist/cesium/Workers/createCorridorOutlineGeometry.js +0 -26
  475. package/dist/cesium/Workers/createCylinderGeometry.js +0 -26
  476. package/dist/cesium/Workers/createCylinderOutlineGeometry.js +0 -26
  477. package/dist/cesium/Workers/createEllipseGeometry.js +0 -26
  478. package/dist/cesium/Workers/createEllipseOutlineGeometry.js +0 -26
  479. package/dist/cesium/Workers/createEllipsoidGeometry.js +0 -26
  480. package/dist/cesium/Workers/createEllipsoidOutlineGeometry.js +0 -26
  481. package/dist/cesium/Workers/createFrustumGeometry.js +0 -26
  482. package/dist/cesium/Workers/createFrustumOutlineGeometry.js +0 -26
  483. package/dist/cesium/Workers/createGeometry.js +0 -26
  484. package/dist/cesium/Workers/createGroundPolylineGeometry.js +0 -26
  485. package/dist/cesium/Workers/createPlaneGeometry.js +0 -26
  486. package/dist/cesium/Workers/createPlaneOutlineGeometry.js +0 -26
  487. package/dist/cesium/Workers/createPolygonGeometry.js +0 -26
  488. package/dist/cesium/Workers/createPolygonOutlineGeometry.js +0 -26
  489. package/dist/cesium/Workers/createPolylineGeometry.js +0 -26
  490. package/dist/cesium/Workers/createPolylineVolumeGeometry.js +0 -26
  491. package/dist/cesium/Workers/createPolylineVolumeOutlineGeometry.js +0 -26
  492. package/dist/cesium/Workers/createRectangleGeometry.js +0 -26
  493. package/dist/cesium/Workers/createRectangleOutlineGeometry.js +0 -26
  494. package/dist/cesium/Workers/createSimplePolylineGeometry.js +0 -26
  495. package/dist/cesium/Workers/createSphereGeometry.js +0 -26
  496. package/dist/cesium/Workers/createSphereOutlineGeometry.js +0 -26
  497. package/dist/cesium/Workers/createTaskProcessorWorker.js +0 -26
  498. package/dist/cesium/Workers/createVectorTileClampedPolylines.js +0 -26
  499. package/dist/cesium/Workers/createVectorTileGeometries.js +0 -26
  500. package/dist/cesium/Workers/createVectorTilePoints.js +0 -26
  501. package/dist/cesium/Workers/createVectorTilePolygons.js +0 -26
  502. package/dist/cesium/Workers/createVectorTilePolylines.js +0 -26
  503. package/dist/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +0 -26
  504. package/dist/cesium/Workers/createVerticesFromHeightmap.js +0 -26
  505. package/dist/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +0 -26
  506. package/dist/cesium/Workers/createWallGeometry.js +0 -26
  507. package/dist/cesium/Workers/createWallOutlineGeometry.js +0 -26
  508. package/dist/cesium/Workers/decodeDraco.js +0 -26
  509. package/dist/cesium/Workers/decodeGoogleEarthEnterprisePacket.js +0 -26
  510. package/dist/cesium/Workers/decodeI3S.js +0 -26
  511. package/dist/cesium/Workers/transcodeKTX2.js +0 -56
  512. package/dist/cesium/Workers/transferTypedArrayTest.js +0 -26
  513. package/dist/cesium/Workers/upsampleQuantizedTerrainMesh.js +0 -26
  514. package/src/engines/Cesium/core/Globe.tsx +0 -104
  515. /package/src/{Visualizer → shared}/featureFlags.ts +0 -0
  516. /package/src/{Map/Sketch/utils.ts → utils/use-window-event.ts} +0 -0
@@ -26,6 +26,14 @@ describe("replaceDefines", () => {
26
26
  });
27
27
  expect(result).toBe("(value1) + (value2)");
28
28
  });
29
+
30
+ test("should handle Japanese text with multiple variables", () => {
31
+ const result = replaceDefines("${住所} (${人数}人)", {
32
+ 住所: "東京都渋谷区",
33
+ 人数: "5",
34
+ });
35
+ expect(result).toBe("(東京都渋谷区) ((5)人)");
36
+ });
29
37
  });
30
38
 
31
39
  describe("removeBackslashes", () => {
@@ -40,6 +48,135 @@ describe("removeBackslashes", () => {
40
48
  });
41
49
  });
42
50
 
51
+ describe("Expression evaluation", () => {
52
+ test("should evaluate Japanese expression with feature properties as string literal", () => {
53
+ const expressionString = '"${住所} (${人数}人)"';
54
+ const feature = {
55
+ properties: {
56
+ 住所: "緑町",
57
+ 人数: 2,
58
+ },
59
+ } as Feature;
60
+
61
+ const expression = new Expression(expressionString, feature);
62
+ const result = expression.evaluate();
63
+
64
+ expect(result).toBe("緑町 (2人)");
65
+ });
66
+
67
+ test("should evaluate Japanese expression with two spaces - user observation", () => {
68
+ const expressionString = '"${住所} (${人数}人)"';
69
+ const feature = {
70
+ properties: {
71
+ 住所: "緑町",
72
+ 人数: 2,
73
+ },
74
+ } as Feature;
75
+
76
+ const expression = new Expression(expressionString, feature);
77
+ const result = expression.evaluate();
78
+
79
+ expect(result).toBe("緑町 (2人)");
80
+ });
81
+
82
+ test("should evaluate expression with multiple variables", () => {
83
+ const expressionString = '"${name}: ${住所} (${人数}人) - ${status}"';
84
+ const feature = {
85
+ properties: {
86
+ name: "太郎",
87
+ 住所: "緑町",
88
+ 人数: 2,
89
+ status: "完了",
90
+ },
91
+ } as Feature;
92
+
93
+ const expression = new Expression(expressionString, feature);
94
+ const result = expression.evaluate();
95
+
96
+ expect(result).toBe("太郎: 緑町 (2人) - 完了");
97
+ });
98
+
99
+ test("should evaluate Japanese expression without quotes - shows the issue", () => {
100
+ const expressionString = "${住所} (${人数}人)";
101
+ const feature = {
102
+ properties: {
103
+ 住所: "緑町",
104
+ 人数: 2,
105
+ },
106
+ } as Feature;
107
+
108
+ expect(() => {
109
+ const expression = new Expression(expressionString, feature);
110
+ expression.evaluate();
111
+ }).toThrow('Unexpected function call "czm_住所"');
112
+ });
113
+
114
+ test("should evaluate expression with quoted property names containing spaces", () => {
115
+ const expressionString = '${"user name"}';
116
+ const feature = {
117
+ properties: {
118
+ "user name": "Alice",
119
+ "user age": 25,
120
+ },
121
+ } as Feature;
122
+
123
+ const expression = new Expression(expressionString, feature);
124
+ const result = expression.evaluate();
125
+
126
+ expect(result).toBe("Alice");
127
+ });
128
+
129
+ test("should evaluate conditional expression with quoted property names", () => {
130
+ const expressionString = '${"user score"} > 50 ? "Pass" : "Fail"';
131
+ const feature1 = {
132
+ properties: {
133
+ "user score": 75,
134
+ },
135
+ } as Feature;
136
+ const feature2 = {
137
+ properties: {
138
+ "user score": 30,
139
+ },
140
+ } as Feature;
141
+
142
+ const expression1 = new Expression(expressionString, feature1);
143
+ const expression2 = new Expression(expressionString, feature2);
144
+
145
+ expect(expression1.evaluate()).toBe("Pass");
146
+ expect(expression2.evaluate()).toBe("Fail");
147
+ });
148
+
149
+ test("should evaluate arithmetic expression with quoted property names", () => {
150
+ const expressionString = '${"item price"} * ${"item quantity"}';
151
+ const feature = {
152
+ properties: {
153
+ "item price": 10.5,
154
+ "item quantity": 3,
155
+ },
156
+ } as Feature;
157
+
158
+ const expression = new Expression(expressionString, feature);
159
+ const result = expression.evaluate();
160
+
161
+ expect(result).toBe(31.5);
162
+ });
163
+
164
+ test("should handle quoted property names with special characters", () => {
165
+ const expressionString = '${"user-info:name"} === "Bob Smith"';
166
+ const feature = {
167
+ properties: {
168
+ "user-info:name": "Bob Smith",
169
+ "email@address": "bob@example.com",
170
+ },
171
+ } as Feature;
172
+
173
+ const expression = new Expression(expressionString, feature);
174
+ const result = expression.evaluate();
175
+
176
+ expect(result).toBe(true);
177
+ });
178
+ });
179
+
43
180
  describe("expression caches", () => {
44
181
  beforeEach(() => {
45
182
  EXPRESSION_CACHES.clear();
@@ -175,18 +175,16 @@ export class Node {
175
175
  }
176
176
  _evaluateVariableString(feature?: Feature) {
177
177
  const variableRegex = /\${(.*?)}/g;
178
- let result = this._value;
179
- let match = variableRegex.exec(result);
180
- while (match !== null) {
181
- const placeholder = match[0];
182
- const variableName = match[1];
183
- let property = feature?.properties[variableName];
184
- if (typeof property === "undefined") {
185
- property = "";
186
- }
187
- result = result.replace(placeholder, property);
188
- match = variableRegex.exec(result);
189
- }
178
+ const result = this._value.replace(
179
+ variableRegex,
180
+ (_placeholder: string, variableName: string) => {
181
+ let property = feature?.properties[variableName];
182
+ if (typeof property === "undefined") {
183
+ property = "";
184
+ }
185
+ return property;
186
+ },
187
+ );
190
188
  return result;
191
189
  }
192
190
  _evaluateVariable(feature?: Feature) {
@@ -51,4 +51,182 @@ describe("replaceVariables", () => {
51
51
  const [result, _] = replaceVariables("${vari-able}");
52
52
  expect(result).toBe(`czm_vari$reearth_hyphen_$able`);
53
53
  });
54
+
55
+ test("should handle property names with spaces using bracket notation with double quotes", () => {
56
+ const [, res] = replaceVariables('${$["property name"]}', {
57
+ "property name": "value with space",
58
+ normalProperty: "normal value",
59
+ });
60
+ expect(res[0].literalValue).toBe("value with space");
61
+ });
62
+
63
+ test("should handle property names with spaces using bracket notation with single quotes", () => {
64
+ const [, res] = replaceVariables("${$['user name']}", {
65
+ "user name": "John Doe",
66
+ normalProperty: "normal value",
67
+ });
68
+ expect(res[0].literalValue).toBe("John Doe");
69
+ });
70
+
71
+ test("should handle nested property names with spaces", () => {
72
+ const [, res] = replaceVariables('${$["contact info"]["email address"]}', {
73
+ "contact info": {
74
+ "email address": "john@example.com",
75
+ "phone number": "123-456-7890",
76
+ },
77
+ });
78
+ expect(res[0].literalValue).toBe("john@example.com");
79
+ });
80
+
81
+ test("should handle array elements with property names containing spaces", () => {
82
+ const [, res] = replaceVariables('${$.items[0]["item name"]}', {
83
+ items: [
84
+ { "item name": "Product A", "item price": 100 },
85
+ { "item name": "Product B", "item price": 200 },
86
+ ],
87
+ });
88
+ expect(res[0].literalValue).toBe("Product A");
89
+ });
90
+
91
+ test("should handle array slice with property names containing spaces", () => {
92
+ const [, res] = replaceVariables('${$.items[:1]["item price"]}', {
93
+ items: [
94
+ { "item name": "Product A", "item price": 100 },
95
+ { "item name": "Product B", "item price": 200 },
96
+ ],
97
+ });
98
+ expect(res[0].literalValue).toBe(100);
99
+ });
100
+
101
+ test("should handle quoted dot notation for property names with spaces", () => {
102
+ const [, res] = replaceVariables("${$.'property name'}", {
103
+ "property name": "value with space",
104
+ });
105
+ expect(res[0].literalValue).toBe("value with space");
106
+ });
107
+
108
+ test("should handle multiple property names with spaces in one expression", () => {
109
+ const [result, res] = replaceVariables('${$["user name"]} - ${$["property name"]}', {
110
+ "user name": "John Doe",
111
+ "property name": "value with space",
112
+ });
113
+ expect(res).toHaveLength(2);
114
+ expect(res[0].literalValue).toBe("John Doe");
115
+ expect(res[1].literalValue).toBe("value with space");
116
+ expect(result).toContain(res[0].literalName);
117
+ expect(result).toContain(res[1].literalName);
118
+ });
119
+
120
+ test("should handle quoted property names with double quotes", () => {
121
+ const [result, res] = replaceVariables('${"user info"}', {
122
+ "user info": "John Doe",
123
+ normalProperty: "normal value",
124
+ });
125
+ expect(res).toHaveLength(1);
126
+ expect(res[0].literalValue).toBe("John Doe");
127
+ expect(result).toBe(res[0].literalName);
128
+ });
129
+
130
+ test("should handle quoted property names with single quotes", () => {
131
+ const [result, res] = replaceVariables("${'property name'}", {
132
+ "property name": "value with space",
133
+ normalProperty: "normal value",
134
+ });
135
+ expect(res).toHaveLength(1);
136
+ expect(res[0].literalValue).toBe("value with space");
137
+ expect(result).toBe(res[0].literalName);
138
+ });
139
+
140
+ test("should handle multiple quoted property names in one expression", () => {
141
+ const [result, res] = replaceVariables('${"user name"} - ${"user age"}', {
142
+ "user name": "John Doe",
143
+ "user age": 30,
144
+ });
145
+ expect(res).toHaveLength(2);
146
+ expect(res[0].literalValue).toBe("John Doe");
147
+ expect(res[1].literalValue).toBe(30);
148
+ expect(result).toContain(res[0].literalName);
149
+ expect(result).toContain("-");
150
+ expect(result).toContain(res[1].literalName);
151
+ });
152
+
153
+ test("should handle quoted property names with special characters", () => {
154
+ const [result, res] = replaceVariables('${"user-info:name"}', {
155
+ "user-info:name": "Jane Smith",
156
+ });
157
+ expect(res).toHaveLength(1);
158
+ expect(res[0].literalValue).toBe("Jane Smith");
159
+ expect(result).toBe(res[0].literalName);
160
+ });
161
+
162
+ test("should reject mismatched quote types (double to single)", () => {
163
+ const [result, res] = replaceVariables("${\"user info'}", {
164
+ "user info": "John Doe",
165
+ });
166
+ // Should not match the quoted pattern, should fall back to variable name
167
+ expect(result).toContain("czm_");
168
+ expect(res).toHaveLength(0);
169
+ });
170
+
171
+ test("should reject mismatched quote types (single to double)", () => {
172
+ const [result, res] = replaceVariables("${'user info\"}", {
173
+ "user info": "Jane Doe",
174
+ });
175
+ // Should not match the quoted pattern, should fall back to variable name
176
+ expect(result).toContain("czm_");
177
+ expect(res).toHaveLength(0);
178
+ });
179
+
180
+ test("should correctly handle consecutive properties with different quote types", () => {
181
+ const [result, res] = replaceVariables("${\"prop1\"} + ${'prop2'}", {
182
+ prop1: "value1",
183
+ prop2: "value2",
184
+ });
185
+ expect(res).toHaveLength(2);
186
+ expect(res[0].literalValue).toBe("value1");
187
+ expect(res[1].literalValue).toBe("value2");
188
+ expect(result).toContain(res[0].literalName);
189
+ expect(result).toContain("+");
190
+ expect(result).toContain(res[1].literalName);
191
+ });
192
+
193
+ test("should return empty string when quoted property is missing (consistent with regular variables)", () => {
194
+ const [result, res] = replaceVariables('${"missing"}', {
195
+ existing: "value",
196
+ });
197
+ // Returns empty string for missing quoted property (consistent with regular variables)
198
+ expect(res).toHaveLength(1);
199
+ expect(res[0].literalValue).toBe("");
200
+ expect(result).toBe(res[0].literalName);
201
+ });
202
+
203
+ test("should pass through regular variable name when property might be missing", () => {
204
+ const [result, res] = replaceVariables("${missing}");
205
+ // Regular variables are passed through as czm_variableName
206
+ // They will be evaluated later by Node._evaluateVariable
207
+ expect(result).toBe("czm_missing");
208
+ expect(res).toHaveLength(0);
209
+ });
210
+
211
+ test("should return empty string for missing JSONPath properties (consistent with regular variables)", () => {
212
+ const [result, res] = replaceVariables("${$.missingPath}", {
213
+ existing: "value",
214
+ });
215
+ // Returns empty string for missing JSONPath property
216
+ expect(res).toHaveLength(1);
217
+ expect(res[0].literalValue).toBe("");
218
+ expect(result).toBe(res[0].literalName);
219
+ });
220
+
221
+ test("should handle mixed existing and missing properties consistently", () => {
222
+ const [result, res] = replaceVariables('${"existing"} - ${"missing"}', {
223
+ existing: "value",
224
+ });
225
+ expect(res).toHaveLength(2);
226
+ expect(res[0].literalValue).toBe("value");
227
+ expect(res[1].literalValue).toBe(""); // Missing property returns empty string
228
+ expect(result).toContain(res[0].literalName);
229
+ expect(result).toContain("-");
230
+ expect(result).toContain(res[1].literalName);
231
+ });
54
232
  });
@@ -14,6 +14,7 @@ export function replaceVariables(expression: string, feature?: any): [string, JP
14
14
  const featureDefined = typeof feature !== "undefined";
15
15
  const jsonPathCache: Record<string, any[]> = {};
16
16
  const varExpRegex = /^\$./;
17
+ const quotedStringRegex = /^(["'])(.+)\1$/;
17
18
  while (i >= 0) {
18
19
  if (isInsideQuotes(exp, i)) {
19
20
  const closeQuote = findCloseQuote(exp, i);
@@ -24,7 +25,22 @@ export function replaceVariables(expression: string, feature?: any): [string, JP
24
25
  result += exp.slice(0, i);
25
26
  const j = getCloseBracketIndex(exp, i);
26
27
  const varExp = exp.slice(i + 2, j);
27
- if (varExpRegex.test(varExp)) {
28
+ const quotedMatch = varExp.match(quotedStringRegex);
29
+ if (quotedMatch) {
30
+ // Handle quoted property names like ${"user info"}
31
+ if (!featureDefined) {
32
+ return [result, []];
33
+ }
34
+ const propertyName = quotedMatch[2];
35
+ const propertyValue = feature[propertyName];
36
+ // Return empty string for missing properties to match regular variable behavior
37
+ const placeholderLiteral = generateRandomString(10);
38
+ literalJP.push({
39
+ literalName: placeholderLiteral,
40
+ literalValue: typeof propertyValue !== "undefined" ? propertyValue : "",
41
+ });
42
+ result += placeholderLiteral;
43
+ } else if (varExpRegex.test(varExp)) {
28
44
  if (!featureDefined) {
29
45
  return [result, []];
30
46
  }
@@ -37,16 +53,13 @@ export function replaceVariables(expression: string, feature?: any): [string, JP
37
53
  return [result, []];
38
54
  }
39
55
  }
40
- if (res.length !== 0) {
41
- const placeholderLiteral = generateRandomString(10);
42
- literalJP.push({
43
- literalName: placeholderLiteral,
44
- literalValue: res[0],
45
- });
46
- result += placeholderLiteral;
47
- } else {
48
- return ["false", []];
49
- }
56
+ // Return empty string for missing properties to match regular variable behavior
57
+ const placeholderLiteral = generateRandomString(10);
58
+ literalJP.push({
59
+ literalName: placeholderLiteral,
60
+ literalValue: res.length !== 0 ? res[0] : "",
61
+ });
62
+ result += placeholderLiteral;
50
63
  } else {
51
64
  const replacedVarExp = replaceReservedWord(varExp);
52
65
  result += `${VARIABLE_PREFIX}${replacedVarExp}`;
@@ -102,6 +102,7 @@ export type PolygonAppearance = {
102
102
  stroke?: boolean;
103
103
  strokeColor?: string;
104
104
  strokeWidth?: number;
105
+ height?: number;
105
106
  heightReference?: "none" | "clamp" | "relative";
106
107
  shadows?: "disabled" | "enabled" | "cast_only" | "receive_only";
107
108
  lineJoin?: CanvasLineJoin;
@@ -156,6 +157,7 @@ export type ModelAppearance = {
156
157
  model?: string; // For compat
157
158
  url?: string;
158
159
  heightReference?: "none" | "clamp" | "relative";
160
+ height?: number;
159
161
  heading?: number;
160
162
  pitch?: number;
161
163
  roll?: number;
@@ -191,16 +193,16 @@ export type FrustumAppearance = {
191
193
 
192
194
  export type Cesium3DTilesAppearance = {
193
195
  show?: boolean;
196
+ height?: number;
194
197
  color?: string;
195
198
  styleUrl?: string;
196
199
  shadows?: "disabled" | "enabled" | "cast_only" | "receive_only";
197
- colorBlendMode?: "highlight" | "replace" | "mix" | "default";
200
+ colorBlendMode?: "highlight" | "replace" | "mix";
198
201
  edgeWidth?: number;
199
202
  edgeColor?: string;
200
203
  selectedFeatureColor?: string; // This doesn't support expression
201
204
  disableIndexingFeature?: boolean;
202
205
  tileset?: string;
203
- apiKey?: string;
204
206
  experimental_clipping?: EXPERIMENTAL_clipping;
205
207
  pointSize?: number;
206
208
  meta?: unknown;
@@ -76,6 +76,10 @@ export type Data = {
76
76
  updateInterval?: number; // milliseconds
77
77
  parameters?: Record<string, any>;
78
78
  idProperty?: string;
79
+ provider?: string;
80
+ serviceTokens?: {
81
+ googleMapApiKey?: string;
82
+ };
79
83
  time?: {
80
84
  property?: string;
81
85
  interval?: number; // milliseconds
@@ -104,6 +108,7 @@ export type DataType =
104
108
  | "geojson"
105
109
  | "3dtiles"
106
110
  | "osm-buildings"
111
+ | "reearth-buildings"
107
112
  | "google-photorealistic"
108
113
  | "czml"
109
114
  | "csv"
@@ -1,6 +1,6 @@
1
- import { FEATURE_FLAGS } from "./featureFlags";
1
+ import { FEATURE_FLAGS } from "../shared/featureFlags";
2
2
 
3
- export type InteractionModeType = "default" | "move" | "selection" | "sketch";
3
+ export type InteractionModeType = "default" | "move" | "selection" | "sketch" | "spatialId";
4
4
 
5
5
  // If you would like enable a feature in a specific mode,
6
6
  // just set the feature's flag here to that mode.
@@ -22,4 +22,5 @@ export const INTERACTION_MODES: Record<InteractionModeType, number> = {
22
22
  FEATURE_FLAGS.CAMERA_ZOOM |
23
23
  FEATURE_FLAGS.CAMERA_TILT,
24
24
  sketch: FEATURE_FLAGS.SKETCH | FEATURE_FLAGS.CAMERA_ZOOM | FEATURE_FLAGS.CAMERA_TILT,
25
+ spatialId: FEATURE_FLAGS.CAMERA_ZOOM | FEATURE_FLAGS.CAMERA_TILT,
25
26
  };
package/src/test/setup.ts CHANGED
@@ -5,7 +5,7 @@ import { cleanup } from "@testing-library/react";
5
5
  import { afterEach, expect, vi } from "vitest";
6
6
 
7
7
  // Vitest on GitHub Actions requires TransformStream to run tests with Cesium
8
- import "web-streams-polyfill/es2018";
8
+ import "web-streams-polyfill/polyfill";
9
9
 
10
10
  declare global {
11
11
  namespace Vi {
@@ -23,7 +23,7 @@ vitest.mock("react-inlinesvg", () => {
23
23
  });
24
24
 
25
25
  const render = (
26
- ui: React.ReactElement,
26
+ ui: React.ReactElement<any>,
27
27
  // queryMocks?: readonly MockedResponse<Record<string, any>>[],
28
28
  { ...renderOptions } = {},
29
29
  ) => {
@@ -0,0 +1,96 @@
1
+ // Type declarations for modules without built-in types
2
+
3
+ declare module "protomaps" {
4
+ export interface Zxy {
5
+ z: number;
6
+ x: number;
7
+ y: number;
8
+ }
9
+
10
+ export interface Feature {
11
+ readonly geomType: number;
12
+ readonly geometry: number[][];
13
+ readonly geom: Array<Array<{ x: number; y: number }>>;
14
+ readonly id?: number | string;
15
+ readonly props: Record<string, any>;
16
+ }
17
+
18
+ export class TileCache {
19
+ constructor(cacheFunction?: any, maxCacheEntries?: number);
20
+ get(coords: Zxy): Promise<any>;
21
+ readonly tileSize: number;
22
+ }
23
+
24
+ export class ZxySource {
25
+ constructor(url: string, cache?: boolean);
26
+ }
27
+ }
28
+
29
+ declare module "@reearth/cesium-mvt-imagery-provider" {
30
+ import { ImageryProvider } from "cesium";
31
+
32
+ export class MVTImageryProvider implements ImageryProvider {
33
+ constructor(options: any);
34
+ readonly ready: boolean;
35
+ readonly rectangle: any;
36
+ readonly tileWidth: number;
37
+ readonly tileHeight: number;
38
+ readonly maximumLevel: number;
39
+ readonly minimumLevel: number;
40
+ readonly tilingScheme: any;
41
+ readonly tileDiscardPolicy: any;
42
+ readonly errorEvent: any;
43
+ readonly credit: any;
44
+ readonly proxy: any;
45
+ readonly hasAlphaChannel: boolean;
46
+ getTileCredits(x: number, y: number, level: number): any[];
47
+ requestImage(x: number, y: number, level: number, request?: any): Promise<any> | undefined;
48
+ pickFeatures(
49
+ x: number,
50
+ y: number,
51
+ level: number,
52
+ longitude: number,
53
+ latitude: number,
54
+ ): Promise<any[]> | undefined;
55
+ }
56
+ }
57
+
58
+ declare module "cesium-dnd" {
59
+ import { Viewer } from "cesium";
60
+
61
+ export interface CesiumDnDOptions {
62
+ onDrag?: (e: any, position: any, context: Context) => boolean | void;
63
+ onDrop?: (e: any, position: any) => boolean | void;
64
+ onDropError?: (error: Error) => void;
65
+ dragDelay?: number;
66
+ initialDisabled?: boolean;
67
+ }
68
+
69
+ export class Context {
70
+ constructor(viewer: Viewer, options?: CesiumDnDOptions);
71
+ disable(): void;
72
+ enable(): void;
73
+ destroy(): void;
74
+ }
75
+
76
+ const CesiumDnD: typeof Context;
77
+ export default CesiumDnD;
78
+ export type { Context };
79
+ }
80
+
81
+ declare module "@turf/ellipse" {
82
+ import { Feature, Polygon, Point, Units } from "@turf/helpers";
83
+
84
+ export default function ellipse(
85
+ center: Point | number[],
86
+ xSemiAxis: number,
87
+ ySemiAxis: number,
88
+ options?: {
89
+ angle?: number;
90
+ pivot?: Point | number[];
91
+ steps?: number;
92
+ units?: Units;
93
+ properties?: Record<string, any>;
94
+ },
95
+ ): Feature<Polygon>;
96
+ }
@@ -27,7 +27,7 @@ export class StringMatcher {
27
27
  : new RegExp(escapeStringRegexp(search), "g");
28
28
 
29
29
  const matches = [...source.matchAll(pattern)].filter(
30
- (match): match is RegExpMatchArray & { index: number } => match.index != null,
30
+ (match): match is RegExpExecArray & { index: number } => match.index != null,
31
31
  );
32
32
  if (matches == null || matches.length === 0) {
33
33
  throw new Error(`No matching codes found for: "${search}"`);
@@ -1,7 +1,7 @@
1
- import { useState, useEffect, useMemo, useRef } from "react";
1
+ import { useState, useEffect, useRef } from "react";
2
2
 
3
3
  export const useImage = (src?: string): HTMLImageElement | undefined => {
4
- const imgRef = useRef<HTMLImageElement>();
4
+ const imgRef = useRef<HTMLImageElement>(undefined);
5
5
  const [img, setImg] = useState<HTMLImageElement>();
6
6
 
7
7
  useEffect(() => {
@@ -23,13 +23,3 @@ export const useImage = (src?: string): HTMLImageElement | undefined => {
23
23
 
24
24
  return img;
25
25
  };
26
-
27
- export const useCanvas = (cb: (canvas: HTMLCanvasElement) => void): string => {
28
- const can = useMemo(() => document.createElement("canvas"), []);
29
- const [data, setData] = useState<string>("");
30
- useEffect(() => {
31
- cb(can);
32
- setData(can.toDataURL());
33
- }, [can, cb]);
34
- return data;
35
- };
@@ -9,7 +9,7 @@ export const useDelayedCount = (durations: Durations = []) => {
9
9
  const [mode, setMode] = useState(0);
10
10
  const prevMode = usePreviousDistinct(mode);
11
11
  const exit = useRef(false);
12
- const timeout = useRef<number>();
12
+ const timeout = useRef<number>(undefined);
13
13
 
14
14
  const advanceMode = useCallback(() => {
15
15
  setMode(m => Math.max(0, Math.min(durations.length + 1, m + (exit.current ? -1 : 1))));
@@ -17,7 +17,7 @@ export type DropOptions<T extends ItemType = ItemType, E extends HTMLElement = H
17
17
  drop?: (item: Item<T>, context: Context) => Dropper | undefined;
18
18
  shallow?: boolean;
19
19
  disabled?: boolean;
20
- wrapperRef?: React.RefObject<E>;
20
+ wrapperRef?: React.RefObject<E | null>;
21
21
  };
22
22
 
23
23
  export const useDrop = <T extends ItemType = ItemType, E extends HTMLElement = HTMLElement>({
package/src/utils/util.ts CHANGED
@@ -73,7 +73,7 @@ export const isEmptyString = function (text: string): boolean {
73
73
  };
74
74
 
75
75
  export function useConstant<T>(callback: () => T): T {
76
- const ref = useRef<{ value: T }>();
76
+ const ref = useRef<{ value: T }>(undefined);
77
77
  if (ref.current == null) {
78
78
  ref.current = { value: callback() };
79
79
  }
@@ -204,8 +204,8 @@ export const toCSSFont = (t?: Typography, d?: Typography) => {
204
204
  const ff = getCSSFontFamily(t?.fontFamily ?? d?.fontFamily)
205
205
  ?.replace("'", '"')
206
206
  .trim();
207
- return `${t?.italic ?? d?.italic ? "italic " : ""}${
208
- t?.bold ?? d?.bold ? "bold " : (t?.fontWeight ?? d?.fontWeight ?? "") + " "
207
+ return `${(t?.italic ?? d?.italic) ? "italic " : ""}${
208
+ (t?.bold ?? d?.bold) ? "bold " : (t?.fontWeight ?? d?.fontWeight ?? "") + " "
209
209
  }${t?.fontSize ?? d?.fontSize ?? 16}px ${
210
210
  ff ? (ff.includes(`"`) ? ff : `"${ff}"`) : "sans-serif"
211
211
  }`;