@honua/app-platform 0.1.0-beta.0 → 0.1.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (381) hide show
  1. package/contract/discovery.d.ts +231 -0
  2. package/contract/discovery.d.ts.map +1 -0
  3. package/contract/discovery.js +554 -0
  4. package/contract/edit-sketch.d.ts +8 -0
  5. package/contract/edit-sketch.d.ts.map +1 -1
  6. package/contract/edit-sketch.js +15 -0
  7. package/contract/edit-snapping.d.ts +160 -0
  8. package/contract/edit-snapping.d.ts.map +1 -0
  9. package/contract/edit-snapping.js +675 -0
  10. package/contract/generated/projjson-v0.7-crs-validator.d.ts +35 -0
  11. package/contract/generated/projjson-v0.7-crs-validator.d.ts.map +1 -0
  12. package/contract/generated/projjson-v0.7-crs-validator.js +3941 -0
  13. package/contract/index.d.ts +11 -2
  14. package/contract/index.d.ts.map +1 -1
  15. package/contract/index.js +4 -1
  16. package/contract/pmtiles.d.ts +31 -0
  17. package/contract/pmtiles.d.ts.map +1 -1
  18. package/contract/pmtiles.js +60 -20
  19. package/contract/protocol-module.d.ts +70 -0
  20. package/contract/protocol-module.d.ts.map +1 -0
  21. package/contract/protocol-module.js +1 -0
  22. package/contract/schema-envelope.d.ts +26 -0
  23. package/contract/schema-envelope.d.ts.map +1 -0
  24. package/contract/schema-envelope.js +25 -0
  25. package/contract/schema.d.ts +582 -0
  26. package/contract/schema.d.ts.map +1 -0
  27. package/contract/schema.js +2483 -0
  28. package/contract/source-capability-support.d.ts +6 -0
  29. package/contract/source-capability-support.d.ts.map +1 -0
  30. package/contract/source-capability-support.js +154 -0
  31. package/contract/source.d.ts +35 -17
  32. package/contract/source.d.ts.map +1 -1
  33. package/contract/source.js +267 -71
  34. package/contract/types.d.ts +140 -4
  35. package/contract/types.d.ts.map +1 -1
  36. package/contract/types.js +6 -14
  37. package/core/bounded-json.d.ts +4 -0
  38. package/core/bounded-json.d.ts.map +1 -0
  39. package/core/bounded-json.js +38 -0
  40. package/core/cache-state.d.ts +9 -0
  41. package/core/cache-state.d.ts.map +1 -1
  42. package/core/cache-state.js +10 -0
  43. package/core/capabilities-xml.d.ts +33 -0
  44. package/core/capabilities-xml.d.ts.map +1 -0
  45. package/core/capabilities-xml.js +331 -0
  46. package/core/client.d.ts +4 -1
  47. package/core/client.d.ts.map +1 -1
  48. package/core/client.js +115 -29
  49. package/core/error-classifications.d.ts +153 -0
  50. package/core/error-classifications.d.ts.map +1 -0
  51. package/core/error-classifications.js +140 -0
  52. package/core/error-code-registry.d.ts +158 -0
  53. package/core/error-code-registry.d.ts.map +1 -0
  54. package/core/error-code-registry.js +143 -0
  55. package/core/error-envelope.d.ts +68 -0
  56. package/core/error-envelope.d.ts.map +1 -0
  57. package/core/error-envelope.js +357 -0
  58. package/core/errors.d.ts +45 -29
  59. package/core/errors.d.ts.map +1 -1
  60. package/core/errors.js +97 -50
  61. package/core/geoparquet-sql.d.ts +30 -2
  62. package/core/geoparquet-sql.d.ts.map +1 -1
  63. package/core/geoparquet-sql.js +38 -3
  64. package/core/odata-key-path.d.ts +12 -0
  65. package/core/odata-key-path.d.ts.map +1 -0
  66. package/core/odata-key-path.js +28 -0
  67. package/core/odata-write-codec.d.ts +66 -0
  68. package/core/odata-write-codec.d.ts.map +1 -0
  69. package/core/odata-write-codec.js +1083 -0
  70. package/core/odata.d.ts +59 -7
  71. package/core/odata.d.ts.map +1 -1
  72. package/core/odata.js +431 -99
  73. package/core/ogc-features.d.ts.map +1 -1
  74. package/core/ogc-features.js +3 -0
  75. package/core/ogc-maps.d.ts +7 -0
  76. package/core/ogc-maps.d.ts.map +1 -1
  77. package/core/ogc-maps.js +46 -7
  78. package/core/ogc-processes.d.ts +2 -1
  79. package/core/ogc-processes.d.ts.map +1 -1
  80. package/core/ogc-processes.js +33 -5
  81. package/core/ogc-records.d.ts +9 -0
  82. package/core/ogc-records.d.ts.map +1 -1
  83. package/core/ogc-records.js +78 -29
  84. package/core/ogc-tiles.d.ts +10 -1
  85. package/core/ogc-tiles.d.ts.map +1 -1
  86. package/core/ogc-tiles.js +56 -17
  87. package/core/path-utils.d.ts +9 -0
  88. package/core/path-utils.d.ts.map +1 -1
  89. package/core/path-utils.js +19 -0
  90. package/core/protocol-transport.d.ts +1 -0
  91. package/core/protocol-transport.d.ts.map +1 -1
  92. package/core/request-pipeline.d.ts.map +1 -1
  93. package/core/request-pipeline.js +1 -1
  94. package/core/spatial-filter.d.ts +8 -4
  95. package/core/spatial-filter.d.ts.map +1 -1
  96. package/core/spatial-filter.js +206 -16
  97. package/core/stac-static.d.ts +6 -2
  98. package/core/stac-static.d.ts.map +1 -1
  99. package/core/stac-static.js +260 -69
  100. package/core/surfaces.d.ts.map +1 -1
  101. package/core/surfaces.js +69 -5
  102. package/core/types.d.ts +125 -7
  103. package/core/types.d.ts.map +1 -1
  104. package/core/wfs-capabilities.d.ts +2 -0
  105. package/core/wfs-capabilities.d.ts.map +1 -1
  106. package/core/wfs-capabilities.js +8 -1
  107. package/core/wfs.d.ts.map +1 -1
  108. package/core/wfs.js +10 -0
  109. package/core/wms-capabilities.d.ts +56 -84
  110. package/core/wms-capabilities.d.ts.map +1 -1
  111. package/core/wms-capabilities.js +212 -509
  112. package/core/wmts-capabilities.d.ts +62 -62
  113. package/core/wmts-capabilities.d.ts.map +1 -1
  114. package/core/wmts-capabilities.js +224 -371
  115. package/esri-compat/editor.d.ts +8 -0
  116. package/esri-compat/editor.d.ts.map +1 -1
  117. package/esri-compat/editor.js +13 -0
  118. package/esri-compat/feature-layer.d.ts +2 -0
  119. package/esri-compat/feature-layer.d.ts.map +1 -1
  120. package/esri-compat/feature-layer.js +1 -0
  121. package/esri-compat/layer-list.d.ts +11 -0
  122. package/esri-compat/layer-list.d.ts.map +1 -1
  123. package/esri-compat/layer-list.js +49 -0
  124. package/esri-compat/legend.d.ts +10 -0
  125. package/esri-compat/legend.d.ts.map +1 -1
  126. package/esri-compat/legend.js +27 -0
  127. package/esri-compat/portal.d.ts +197 -0
  128. package/esri-compat/portal.d.ts.map +1 -0
  129. package/esri-compat/portal.js +251 -0
  130. package/esri-compat/renderer-objects.d.ts +40 -0
  131. package/esri-compat/renderer-objects.d.ts.map +1 -0
  132. package/esri-compat/renderer-objects.js +62 -0
  133. package/esri-compat/sketch.d.ts +43 -0
  134. package/esri-compat/sketch.d.ts.map +1 -1
  135. package/esri-compat/sketch.js +46 -0
  136. package/esri-compat/snapping.d.ts +43 -0
  137. package/esri-compat/snapping.d.ts.map +1 -0
  138. package/esri-compat/snapping.js +45 -0
  139. package/esri-compat/url.d.ts.map +1 -1
  140. package/esri-compat/url.js +1 -1
  141. package/esri-compat/widget-host.d.ts +84 -0
  142. package/esri-compat/widget-host.d.ts.map +1 -0
  143. package/esri-compat/widget-host.js +159 -0
  144. package/generated-app/errors.d.ts +18 -2
  145. package/generated-app/errors.d.ts.map +1 -1
  146. package/generated-app/errors.js +44 -11
  147. package/geocoding/index.d.ts +7 -0
  148. package/geocoding/index.d.ts.map +1 -1
  149. package/geocoding/index.js +5 -0
  150. package/geocoding/provider-http.d.ts +37 -0
  151. package/geocoding/provider-http.d.ts.map +1 -0
  152. package/geocoding/provider-http.js +91 -0
  153. package/geocoding/provider.d.ts +145 -0
  154. package/geocoding/provider.d.ts.map +1 -0
  155. package/geocoding/provider.js +41 -0
  156. package/geocoding/providers/honua.d.ts +28 -0
  157. package/geocoding/providers/honua.d.ts.map +1 -0
  158. package/geocoding/providers/honua.js +68 -0
  159. package/geocoding/providers/nominatim.d.ts +47 -0
  160. package/geocoding/providers/nominatim.d.ts.map +1 -0
  161. package/geocoding/providers/nominatim.js +105 -0
  162. package/geocoding/providers/pelias.d.ts +40 -0
  163. package/geocoding/providers/pelias.d.ts.map +1 -0
  164. package/geocoding/providers/pelias.js +115 -0
  165. package/geocoding/providers/photon.d.ts +39 -0
  166. package/geocoding/providers/photon.d.ts.map +1 -0
  167. package/geocoding/providers/photon.js +107 -0
  168. package/geometry/convert.d.ts +13 -0
  169. package/geometry/convert.d.ts.map +1 -0
  170. package/geometry/convert.js +12 -0
  171. package/geometry/index.d.ts +17 -0
  172. package/geometry/index.d.ts.map +1 -0
  173. package/geometry/index.js +15 -0
  174. package/geometry/internal.d.ts +25 -0
  175. package/geometry/internal.d.ts.map +1 -0
  176. package/geometry/internal.js +40 -0
  177. package/geometry/ops.d.ts +71 -0
  178. package/geometry/ops.d.ts.map +1 -0
  179. package/geometry/ops.js +147 -0
  180. package/geometry/project.d.ts +40 -0
  181. package/geometry/project.d.ts.map +1 -0
  182. package/geometry/project.js +88 -0
  183. package/geometry/types.d.ts +36 -0
  184. package/geometry/types.d.ts.map +1 -0
  185. package/geometry/types.js +12 -0
  186. package/map/automatic-mount-integration.d.ts +134 -0
  187. package/map/automatic-mount-integration.d.ts.map +1 -0
  188. package/map/automatic-mount-integration.js +305 -0
  189. package/map/automatic-source-strategy.d.ts +125 -0
  190. package/map/automatic-source-strategy.d.ts.map +1 -0
  191. package/map/automatic-source-strategy.js +494 -0
  192. package/map/data-to-map-bridge.d.ts +293 -0
  193. package/map/data-to-map-bridge.d.ts.map +1 -0
  194. package/map/data-to-map-bridge.js +817 -0
  195. package/map/geojson-projection.d.ts +33 -0
  196. package/map/geojson-projection.d.ts.map +1 -0
  197. package/map/geojson-projection.js +118 -0
  198. package/map/index.d.ts +14 -0
  199. package/map/index.d.ts.map +1 -1
  200. package/map/index.js +8 -0
  201. package/map/raster-source-spec.d.ts +30 -0
  202. package/map/raster-source-spec.d.ts.map +1 -0
  203. package/map/raster-source-spec.js +190 -0
  204. package/map/raster-source-strategy.d.ts +65 -0
  205. package/map/raster-source-strategy.d.ts.map +1 -0
  206. package/map/raster-source-strategy.js +232 -0
  207. package/map/source-to-maplibre.d.ts +91 -0
  208. package/map/source-to-maplibre.d.ts.map +1 -0
  209. package/map/source-to-maplibre.js +454 -0
  210. package/map/temporal-playback.d.ts +139 -0
  211. package/map/temporal-playback.d.ts.map +1 -0
  212. package/map/temporal-playback.js +247 -0
  213. package/package.json +28 -2
  214. package/query-planner/canonical.d.ts +7 -0
  215. package/query-planner/canonical.d.ts.map +1 -0
  216. package/query-planner/canonical.js +145 -0
  217. package/query-planner/cql2-json.d.ts +17 -0
  218. package/query-planner/cql2-json.d.ts.map +1 -0
  219. package/query-planner/cql2-json.js +646 -0
  220. package/query-planner/diagnostics.d.ts +35 -0
  221. package/query-planner/diagnostics.d.ts.map +1 -0
  222. package/query-planner/diagnostics.js +373 -0
  223. package/query-planner/duckdb.d.ts +79 -0
  224. package/query-planner/duckdb.d.ts.map +1 -0
  225. package/query-planner/duckdb.js +758 -0
  226. package/query-planner/execution-context.d.ts +5 -0
  227. package/query-planner/execution-context.d.ts.map +1 -0
  228. package/query-planner/execution-context.js +50 -0
  229. package/query-planner/executor.d.ts +5 -0
  230. package/query-planner/executor.d.ts.map +1 -0
  231. package/query-planner/executor.js +223 -0
  232. package/query-planner/geoservices.d.ts +91 -0
  233. package/query-planner/geoservices.d.ts.map +1 -0
  234. package/query-planner/geoservices.js +667 -0
  235. package/query-planner/grpc.d.ts +100 -0
  236. package/query-planner/grpc.d.ts.map +1 -0
  237. package/query-planner/grpc.js +736 -0
  238. package/query-planner/index.d.ts +44 -0
  239. package/query-planner/index.d.ts.map +1 -0
  240. package/query-planner/index.js +30 -0
  241. package/query-planner/ir.d.ts +20 -0
  242. package/query-planner/ir.d.ts.map +1 -0
  243. package/query-planner/ir.js +417 -0
  244. package/query-planner/local-aggregate.d.ts +5 -0
  245. package/query-planner/local-aggregate.d.ts.map +1 -0
  246. package/query-planner/local-aggregate.js +126 -0
  247. package/query-planner/odata.d.ts +48 -0
  248. package/query-planner/odata.d.ts.map +1 -0
  249. package/query-planner/odata.js +662 -0
  250. package/query-planner/ogc-compiler.d.ts +55 -0
  251. package/query-planner/ogc-compiler.d.ts.map +1 -0
  252. package/query-planner/ogc-compiler.js +480 -0
  253. package/query-planner/ogc-features.d.ts +53 -0
  254. package/query-planner/ogc-features.d.ts.map +1 -0
  255. package/query-planner/ogc-features.js +617 -0
  256. package/query-planner/planner.d.ts +17 -0
  257. package/query-planner/planner.d.ts.map +1 -0
  258. package/query-planner/planner.js +818 -0
  259. package/query-planner/resource.d.ts +94 -0
  260. package/query-planner/resource.d.ts.map +1 -0
  261. package/query-planner/resource.js +526 -0
  262. package/query-planner/semantic-canonical.d.ts +15 -0
  263. package/query-planner/semantic-canonical.d.ts.map +1 -0
  264. package/query-planner/semantic-canonical.js +62 -0
  265. package/query-planner/semantic-compat.d.ts +10 -0
  266. package/query-planner/semantic-compat.d.ts.map +1 -0
  267. package/query-planner/semantic-compat.js +35 -0
  268. package/query-planner/semantic-compiler.d.ts +64 -0
  269. package/query-planner/semantic-compiler.d.ts.map +1 -0
  270. package/query-planner/semantic-compiler.js +81 -0
  271. package/query-planner/semantic-literals.d.ts +30 -0
  272. package/query-planner/semantic-literals.d.ts.map +1 -0
  273. package/query-planner/semantic-literals.js +133 -0
  274. package/query-planner/semantic-types.d.ts +265 -0
  275. package/query-planner/semantic-types.d.ts.map +1 -0
  276. package/query-planner/semantic-types.js +1 -0
  277. package/query-planner/semantic.d.ts +54 -0
  278. package/query-planner/semantic.d.ts.map +1 -0
  279. package/query-planner/semantic.js +1421 -0
  280. package/query-planner/types.d.ts +560 -0
  281. package/query-planner/types.d.ts.map +1 -0
  282. package/query-planner/types.js +49 -0
  283. package/query-planner/wfs-semantic.d.ts +58 -0
  284. package/query-planner/wfs-semantic.d.ts.map +1 -0
  285. package/query-planner/wfs-semantic.js +547 -0
  286. package/query-planner/wfs.d.ts +6 -0
  287. package/query-planner/wfs.d.ts.map +1 -0
  288. package/query-planner/wfs.js +71 -0
  289. package/realtime/contract.d.ts +142 -0
  290. package/realtime/contract.d.ts.map +1 -0
  291. package/realtime/contract.js +154 -0
  292. package/realtime/honua-server.d.ts.map +1 -1
  293. package/realtime/honua-server.js +13 -8
  294. package/realtime/index.d.ts +19 -4
  295. package/realtime/index.d.ts.map +1 -1
  296. package/realtime/index.js +14 -4
  297. package/realtime/odata-delta.d.ts +114 -0
  298. package/realtime/odata-delta.d.ts.map +1 -0
  299. package/realtime/odata-delta.js +483 -0
  300. package/realtime/resumable-transport.d.ts +111 -0
  301. package/realtime/resumable-transport.d.ts.map +1 -0
  302. package/realtime/resumable-transport.js +406 -0
  303. package/realtime/resumable.d.ts +104 -0
  304. package/realtime/resumable.d.ts.map +1 -0
  305. package/realtime/resumable.js +632 -0
  306. package/realtime/sse.d.ts.map +1 -1
  307. package/realtime/sse.js +27 -23
  308. package/realtime/websocket.d.ts +60 -0
  309. package/realtime/websocket.d.ts.map +1 -0
  310. package/realtime/websocket.js +157 -0
  311. package/realtime/wire.d.ts +27 -0
  312. package/realtime/wire.d.ts.map +1 -0
  313. package/realtime/wire.js +57 -0
  314. package/replica-sync/errors.d.ts +2 -1
  315. package/replica-sync/errors.d.ts.map +1 -1
  316. package/replica-sync/errors.js +33 -2
  317. package/runtime/edit-snapping.d.ts +107 -0
  318. package/runtime/edit-snapping.d.ts.map +1 -0
  319. package/runtime/edit-snapping.js +190 -0
  320. package/runtime/errors.d.ts +3 -2
  321. package/runtime/errors.d.ts.map +1 -1
  322. package/runtime/errors.js +19 -2
  323. package/runtime/index.d.ts +6 -0
  324. package/runtime/index.d.ts.map +1 -1
  325. package/runtime/index.js +3 -0
  326. package/runtime/maplibre-renderer.d.ts +41 -0
  327. package/runtime/maplibre-renderer.d.ts.map +1 -0
  328. package/runtime/maplibre-renderer.js +322 -0
  329. package/runtime/query-tiles.d.ts +2 -1
  330. package/runtime/query-tiles.d.ts.map +1 -1
  331. package/runtime/query-tiles.js +6 -2
  332. package/runtime/source-bridge.d.ts +4 -4
  333. package/runtime/source-bridge.d.ts.map +1 -1
  334. package/runtime/source-bridge.js +9 -56
  335. package/runtime/style-interactions.d.ts +3 -2
  336. package/runtime/style-interactions.d.ts.map +1 -1
  337. package/runtime/style-interactions.js +11 -3
  338. package/runtime/terra-draw-sketch.d.ts +275 -0
  339. package/runtime/terra-draw-sketch.d.ts.map +1 -0
  340. package/runtime/terra-draw-sketch.js +404 -0
  341. package/scene-workspace/index.d.ts +4 -0
  342. package/scene-workspace/index.d.ts.map +1 -1
  343. package/scene-workspace/index.js +2 -0
  344. package/scene-workspace/source-to-cesium.d.ts +116 -0
  345. package/scene-workspace/source-to-cesium.d.ts.map +1 -0
  346. package/scene-workspace/source-to-cesium.js +791 -0
  347. package/scene-workspace/state-sync.d.ts +147 -0
  348. package/scene-workspace/state-sync.d.ts.map +1 -0
  349. package/scene-workspace/state-sync.js +1123 -0
  350. package/source-capability-registry.d.ts +1 -0
  351. package/source-capability-registry.js +1 -0
  352. package/source-capability-types.d.ts +186 -0
  353. package/source-capability-types.js +7 -0
  354. package/style/index.d.ts +2 -0
  355. package/style/index.d.ts.map +1 -1
  356. package/style/index.js +2 -0
  357. package/style/renderers.d.ts +326 -0
  358. package/style/renderers.d.ts.map +1 -0
  359. package/style/renderers.js +517 -0
  360. package/web-components/controller.d.ts +2 -0
  361. package/web-components/controller.d.ts.map +1 -1
  362. package/web-components/controller.js +49 -8
  363. package/web-components/elements.d.ts +95 -1
  364. package/web-components/elements.d.ts.map +1 -1
  365. package/web-components/elements.js +458 -19
  366. package/web-components/index.d.ts +8 -1
  367. package/web-components/index.d.ts.map +1 -1
  368. package/web-components/index.js +7 -0
  369. package/web-components/maplibre-renderer.d.ts.map +1 -1
  370. package/web-components/maplibre-renderer.js +87 -0
  371. package/web-components/measurement.d.ts +69 -0
  372. package/web-components/measurement.d.ts.map +1 -0
  373. package/web-components/measurement.js +523 -0
  374. package/web-components/types.d.ts +109 -0
  375. package/web-components/types.d.ts.map +1 -1
  376. package/webmap/convert-renderer.d.ts +24 -3
  377. package/webmap/convert-renderer.d.ts.map +1 -1
  378. package/webmap/convert-renderer.js +93 -112
  379. package/webmap/index.d.ts +1 -1
  380. package/webmap/index.d.ts.map +1 -1
  381. package/webmap/index.js +1 -1
@@ -0,0 +1,404 @@
1
+ /**
2
+ * terra-draw binding for edit-sketch workflows.
3
+ *
4
+ * Adapts [terra-draw](https://terradraw.io) draw modes (point, linestring,
5
+ * polygon, rectangle, circle, freehand, select) to the renderer-neutral
6
+ * {@link EditSketchWorkflowModel}, so completed and edited geometries flow
7
+ * through the contract edit-session path — undo/redo, validation, and
8
+ * `applyEdits` submission all apply unchanged.
9
+ *
10
+ * terra-draw is an OPTIONAL peer dependency. This module never imports it at
11
+ * module scope: {@link bindTerraDrawSketch} accepts a duck-typed instance the
12
+ * app constructed itself, and {@link createTerraDrawSketch} pulls in
13
+ * `terra-draw` + `terra-draw-maplibre-gl-adapter` lazily via dynamic
14
+ * `import()` the first time it is called. Importing the SDK without terra-draw
15
+ * installed stays side-effect free.
16
+ *
17
+ * Snapping bridges through terra-draw's own pointer pipeline:
18
+ * {@link createTerraDrawSnapping} produces a function with terra-draw's
19
+ * `Snapping.toCustom` shape backed by the SDK {@link SnapIndex}, so the
20
+ * linestring / polygon / polyline modes snap against SDK-indexed features.
21
+ * Modes without a `snapping` option (point, rectangle, circle, freehand) keep
22
+ * terra-draw's native behavior; that seam is documented rather than papered
23
+ * over.
24
+ *
25
+ * @module
26
+ */
27
+ import { resolveSnapCandidate, resolveSnappingConfig, } from "../contract/edit-snapping.js";
28
+ // ── Tool / mode mapping ───────────────────────────────────────
29
+ /**
30
+ * Canonical terra-draw mode for each {@link EditSketchTool}. `buffer` has no
31
+ * terra-draw equivalent (it needs geometry-service support) and maps to
32
+ * `undefined`.
33
+ *
34
+ * @experimental
35
+ */
36
+ export const TERRA_DRAW_SKETCH_TOOL_MODES = Object.freeze({
37
+ point: "point",
38
+ line: "linestring",
39
+ polygon: "polygon",
40
+ rectangle: "rectangle",
41
+ circle: "circle",
42
+ buffer: undefined,
43
+ });
44
+ const MODE_TO_TOOL = Object.freeze({
45
+ point: "point",
46
+ marker: "point",
47
+ linestring: "line",
48
+ polyline: "line",
49
+ "freehand-linestring": "line",
50
+ polygon: "polygon",
51
+ freehand: "polygon",
52
+ sector: "polygon",
53
+ sensor: "polygon",
54
+ rectangle: "rectangle",
55
+ "angled-rectangle": "rectangle",
56
+ circle: "circle",
57
+ });
58
+ /**
59
+ * Map a terra-draw mode name to the {@link EditSketchTool} it produces.
60
+ * Freehand and sector/sensor modes draw polygons; marker draws points.
61
+ * Returns `undefined` for modes with no sketch-tool equivalent (`select`,
62
+ * `render`, `static`, custom modes).
63
+ *
64
+ * @experimental
65
+ */
66
+ export function editSketchToolForTerraDrawMode(mode) {
67
+ return MODE_TO_TOOL[mode];
68
+ }
69
+ /**
70
+ * Sketch-tool capability overrides for a workflow driven by terra-draw.
71
+ *
72
+ * The contract defaults mark `rectangle` and `circle` as unsupported because
73
+ * they need renderer support; terra-draw provides it. Pass the registered
74
+ * terra-draw mode names (defaults to every canonical drawing mode) and feed
75
+ * the result to `createEditSketchWorkflow({ sketchTools })`.
76
+ *
77
+ * @experimental
78
+ */
79
+ export function terraDrawSketchToolCapabilities(modes) {
80
+ const registered = new Set(modes ?? Object.keys(MODE_TO_TOOL));
81
+ const capabilities = {};
82
+ for (const tool of ["point", "line", "polygon", "rectangle", "circle"]) {
83
+ const supported = [...registered].some((mode) => MODE_TO_TOOL[mode] === tool);
84
+ capabilities[tool] = supported
85
+ ? "supported"
86
+ : { state: "unsupported", reason: `no terra-draw mode registered for the ${tool} tool` };
87
+ }
88
+ return capabilities;
89
+ }
90
+ /**
91
+ * Bind a terra-draw instance to an {@link EditSketchWorkflowModel} (REQ-001).
92
+ *
93
+ * Every terra-draw `finish` event (freshly drawn features and select-mode
94
+ * edits: dragged features, dragged/inserted/deleted coordinates) maps the
95
+ * finishing mode to an {@link EditSketchTool} and applies the feature geometry
96
+ * through `model.setSketchGeometry`, so workflow undo/redo and validation
97
+ * cover terra-draw edits. Deleting the tracked feature stages a `null`
98
+ * geometry through the same undoable path.
99
+ *
100
+ * The caller owns the terra-draw instance lifecycle (`start`/`stop`); the
101
+ * binding only attaches listeners and detaches them in `remove()`.
102
+ *
103
+ * @example
104
+ * ```ts
105
+ * const workflow = createEditSketchWorkflow({ source, sketchTools: terraDrawSketchToolCapabilities() });
106
+ * const handle = bindTerraDrawSketch(draw, { model: workflow });
107
+ * handle.setTool("polygon"); // draw.setMode("polygon") + workflow arming
108
+ * // ... user draws; workflow.snapshot().sketch.geometry now tracks terra-draw
109
+ * handle.undo(); // workflow history, mirrored back into terra-draw
110
+ * await workflow.submit(); // edit-session applyEdits path, unchanged
111
+ * ```
112
+ *
113
+ * @experimental
114
+ */
115
+ export function bindTerraDrawSketch(draw, options) {
116
+ const { model } = options;
117
+ const toolForMode = options.toolForMode ?? editSketchToolForTerraDrawMode;
118
+ const toolsByFeature = new Map();
119
+ let activeFeatureId;
120
+ let selectedFeatureId;
121
+ let syncing = false;
122
+ const featureById = (id) => draw.getSnapshotFeature?.(id) ?? draw.getSnapshot().find((feature) => feature.id === id);
123
+ const onFinish = (id, context) => {
124
+ if (syncing)
125
+ return;
126
+ const feature = featureById(id);
127
+ const mode = modeOf(feature, context);
128
+ const tool = toolForMode(mode);
129
+ const included = feature === undefined || (options.featureFilter?.(id, feature) ?? true);
130
+ let applied = false;
131
+ let geometry = null;
132
+ if (feature && tool && included) {
133
+ const cloned = cloneJsonLike(feature.geometry);
134
+ geometry = options.transformGeometry ? options.transformGeometry(cloned) : cloned;
135
+ applied = model.setSketchGeometry(tool, geometry).toolCapability(tool).state === "supported";
136
+ if (applied) {
137
+ const previousId = activeFeatureId;
138
+ activeFeatureId = id;
139
+ toolsByFeature.set(id, tool);
140
+ if (previousId !== undefined && previousId !== id) {
141
+ // The workflow model tracks a single sketch geometry, so a newly
142
+ // finished feature replaces the previous one: drop the stale
143
+ // draw-store feature instead of letting duplicates accumulate.
144
+ // No syncing guard needed: onChange ignores deletes whose ids do
145
+ // not include the (already swapped) activeFeatureId.
146
+ toolsByFeature.delete(previousId);
147
+ if (draw.removeFeatures && featureById(previousId))
148
+ draw.removeFeatures([previousId]);
149
+ }
150
+ }
151
+ }
152
+ options.onFinish?.({ featureId: id, ...(tool ? { tool } : {}), mode, action: context.action, geometry, applied });
153
+ };
154
+ const onChange = (ids, type) => {
155
+ if (syncing || type !== "delete")
156
+ return;
157
+ if (activeFeatureId === undefined || !ids.includes(activeFeatureId))
158
+ return;
159
+ const removedId = activeFeatureId;
160
+ const tool = toolsByFeature.get(removedId) ?? model.snapshot().sketch.tool ?? "point";
161
+ model.setSketchGeometry(tool, null);
162
+ toolsByFeature.delete(removedId);
163
+ activeFeatureId = undefined;
164
+ if (selectedFeatureId === removedId)
165
+ selectedFeatureId = undefined;
166
+ options.onDelete?.(removedId);
167
+ };
168
+ const onSelect = (id) => {
169
+ selectedFeatureId = id;
170
+ options.onSelect?.(id);
171
+ };
172
+ const onDeselect = (id) => {
173
+ if (selectedFeatureId === id || selectedFeatureId === undefined)
174
+ selectedFeatureId = undefined;
175
+ options.onDeselect?.(id);
176
+ };
177
+ draw.on("finish", onFinish);
178
+ draw.on("change", onChange);
179
+ draw.on("select", onSelect);
180
+ draw.on("deselect", onDeselect);
181
+ const syncFromModel = () => {
182
+ if (!draw.removeFeatures || !draw.addFeatures)
183
+ return false;
184
+ const snapshot = model.snapshot();
185
+ const geometry = snapshot.sketch.geometry ?? null;
186
+ syncing = true;
187
+ try {
188
+ if (activeFeatureId !== undefined && featureById(activeFeatureId)) {
189
+ draw.removeFeatures([activeFeatureId]);
190
+ }
191
+ if (geometry === null) {
192
+ if (activeFeatureId !== undefined)
193
+ toolsByFeature.delete(activeFeatureId);
194
+ activeFeatureId = undefined;
195
+ return true;
196
+ }
197
+ const restored = options.restoreGeometry
198
+ ? options.restoreGeometry(cloneJsonLike(geometry))
199
+ : cloneJsonLike(geometry);
200
+ const tool = (activeFeatureId !== undefined ? toolsByFeature.get(activeFeatureId) : undefined) ?? snapshot.sketch.tool;
201
+ const mode = tool ? (TERRA_DRAW_SKETCH_TOOL_MODES[tool] ?? "polygon") : "polygon";
202
+ const restoreId = activeFeatureId;
203
+ const feature = {
204
+ ...(restoreId !== undefined ? { id: restoreId } : {}),
205
+ type: "Feature",
206
+ geometry: restored,
207
+ properties: { mode },
208
+ };
209
+ // Restoring after a delete leaves the id up to terra-draw: diff the
210
+ // snapshot to adopt the assigned id so the restored sketch stays
211
+ // tracked for later deletes/changes.
212
+ const priorIds = restoreId === undefined ? new Set(draw.getSnapshot().map((entry) => entry.id)) : undefined;
213
+ draw.addFeatures([feature]);
214
+ if (priorIds) {
215
+ const added = draw.getSnapshot().find((entry) => entry.id !== undefined && !priorIds.has(entry.id));
216
+ if (added?.id !== undefined) {
217
+ activeFeatureId = added.id;
218
+ if (tool)
219
+ toolsByFeature.set(added.id, tool);
220
+ }
221
+ }
222
+ return true;
223
+ }
224
+ finally {
225
+ syncing = false;
226
+ }
227
+ };
228
+ return {
229
+ get activeFeatureId() {
230
+ return activeFeatureId;
231
+ },
232
+ get selectedFeatureId() {
233
+ return selectedFeatureId;
234
+ },
235
+ setTool(tool) {
236
+ const capability = model.startSketch(tool);
237
+ const mode = TERRA_DRAW_SKETCH_TOOL_MODES[tool];
238
+ if (capability.state === "supported" && mode !== undefined)
239
+ draw.setMode(mode);
240
+ return capability;
241
+ },
242
+ select() {
243
+ draw.setMode("select");
244
+ },
245
+ cancel() {
246
+ draw.setMode("static");
247
+ },
248
+ undo() {
249
+ const undone = model.undo();
250
+ if (undone)
251
+ syncFromModel();
252
+ return undone;
253
+ },
254
+ redo() {
255
+ const redone = model.redo();
256
+ if (redone)
257
+ syncFromModel();
258
+ return redone;
259
+ },
260
+ syncFromModel,
261
+ remove() {
262
+ draw.off("finish", onFinish);
263
+ draw.off("change", onChange);
264
+ draw.off("select", onSelect);
265
+ draw.off("deselect", onDeselect);
266
+ },
267
+ };
268
+ }
269
+ /**
270
+ * Build a snapping function with terra-draw's `Snapping.toCustom` shape backed
271
+ * by the SDK snapping engine (REQ-004).
272
+ *
273
+ * terra-draw exposes per-mode snapping on its linestring, polygon, and
274
+ * polyline modes; pass the result as `snapping.toCustom` when constructing
275
+ * those modes and every drawn vertex snaps against the {@link SnapIndex}
276
+ * with the SDK's deterministic candidate ordering. Point, rectangle, circle,
277
+ * and freehand modes do not accept a `snapping` option in terra-draw — for
278
+ * those, terra-draw's pointer pipeline has no custom-snapping seam, so only
279
+ * terra-draw-native behavior applies.
280
+ *
281
+ * @example
282
+ * ```ts
283
+ * const snap = createTerraDrawSnapping({ index, model: workflow });
284
+ * new TerraDrawPolygonMode({ snapping: { toCustom: snap } });
285
+ * ```
286
+ *
287
+ * @experimental
288
+ */
289
+ export function createTerraDrawSnapping(options) {
290
+ const effectiveConfig = () => options.model && !options.config ? options.model.snappingConfig() : resolveSnappingConfig(options.config);
291
+ return (event, context) => {
292
+ const resolution = resolveSnapCandidate(options.index, {
293
+ point: { x: event.containerX, y: event.containerY },
294
+ position: [event.lng, event.lat],
295
+ project: (position) => context.project(position[0], position[1]),
296
+ }, effectiveConfig());
297
+ options.onResolve?.(resolution);
298
+ return resolution.candidate ? [resolution.candidate.position[0], resolution.candidate.position[1]] : undefined;
299
+ };
300
+ }
301
+ async function loadTerraDrawModules() {
302
+ let terraDraw;
303
+ try {
304
+ terraDraw = (await import("terra-draw"));
305
+ }
306
+ catch (cause) {
307
+ throw new Error("terra-draw-sketch: terra-draw is an optional peer dependency and is not installed. " +
308
+ "Install it with `npm i terra-draw terra-draw-maplibre-gl-adapter` to use createTerraDrawSketch().", { cause: cause instanceof Error ? cause : undefined });
309
+ }
310
+ let adapter;
311
+ try {
312
+ adapter = (await import("terra-draw-maplibre-gl-adapter"));
313
+ }
314
+ catch (cause) {
315
+ throw new Error("terra-draw-sketch: terra-draw-maplibre-gl-adapter is an optional peer dependency and is not installed. " +
316
+ "Install it with `npm i terra-draw-maplibre-gl-adapter` to use createTerraDrawSketch() on a MapLibre map.", { cause: cause instanceof Error ? cause : undefined });
317
+ }
318
+ return { terraDraw, adapter };
319
+ }
320
+ /** Default select-mode flags: every mode's features selectable and reshapeable. */
321
+ function defaultSelectFlags(modes) {
322
+ const flags = {};
323
+ for (const mode of modes) {
324
+ flags[mode] = {
325
+ feature: {
326
+ draggable: true,
327
+ coordinates: { draggable: true, midpoints: true, deletable: true },
328
+ },
329
+ };
330
+ }
331
+ return flags;
332
+ }
333
+ /**
334
+ * One-call terra-draw sketch setup for a MapLibre map.
335
+ *
336
+ * Dynamically imports the optional `terra-draw` and
337
+ * `terra-draw-maplibre-gl-adapter` peers (throwing a descriptive error when
338
+ * either is missing), registers the canonical drawing modes (point,
339
+ * linestring, polygon, rectangle, circle, freehand, select), wires SDK
340
+ * snapping into the modes that accept a custom snapping hook, starts the
341
+ * instance, and returns it bound to the workflow model via
342
+ * {@link bindTerraDrawSketch}.
343
+ *
344
+ * Apps that need custom mode options should construct terra-draw themselves
345
+ * and call {@link bindTerraDrawSketch} directly.
346
+ *
347
+ * @experimental
348
+ */
349
+ export async function createTerraDrawSketch(map, options) {
350
+ const { terraDraw, adapter } = await loadTerraDrawModules();
351
+ const snapping = options.snapping ? { toCustom: createTerraDrawSnapping(options.snapping) } : undefined;
352
+ const drawModes = ["point", "linestring", "polygon", "rectangle", "circle", "freehand"];
353
+ const modes = [
354
+ new terraDraw.TerraDrawPointMode(),
355
+ new terraDraw.TerraDrawLineStringMode(snapping ? { snapping } : {}),
356
+ new terraDraw.TerraDrawPolygonMode(snapping ? { snapping } : {}),
357
+ new terraDraw.TerraDrawRectangleMode(),
358
+ new terraDraw.TerraDrawCircleMode(),
359
+ new terraDraw.TerraDrawFreehandMode(),
360
+ new terraDraw.TerraDrawSelectMode({ flags: defaultSelectFlags(drawModes) }),
361
+ ];
362
+ const draw = new terraDraw.TerraDraw({
363
+ adapter: new adapter.TerraDrawMapLibreGLAdapter({ map }),
364
+ modes,
365
+ });
366
+ draw.start();
367
+ const handle = bindTerraDrawSketch(draw, options);
368
+ return {
369
+ draw,
370
+ model: options.model,
371
+ get activeFeatureId() {
372
+ return handle.activeFeatureId;
373
+ },
374
+ get selectedFeatureId() {
375
+ return handle.selectedFeatureId;
376
+ },
377
+ setTool: (tool) => handle.setTool(tool),
378
+ select: () => handle.select(),
379
+ cancel: () => handle.cancel(),
380
+ undo: () => handle.undo(),
381
+ redo: () => handle.redo(),
382
+ syncFromModel: () => handle.syncFromModel(),
383
+ remove: () => handle.remove(),
384
+ stop() {
385
+ handle.remove();
386
+ draw.stop();
387
+ },
388
+ };
389
+ }
390
+ // ── Internal helpers ──────────────────────────────────────────
391
+ function modeOf(feature, context) {
392
+ const mode = feature?.properties?.mode;
393
+ return typeof mode === "string" ? mode : context.mode;
394
+ }
395
+ function cloneJsonLike(value) {
396
+ if (value === null || typeof value !== "object")
397
+ return value;
398
+ if (Array.isArray(value))
399
+ return value.map(cloneJsonLike);
400
+ const out = {};
401
+ for (const [key, entry] of Object.entries(value))
402
+ out[key] = cloneJsonLike(entry);
403
+ return out;
404
+ }
@@ -6,9 +6,13 @@
6
6
  * @module
7
7
  */
8
8
  export { createSceneWorkspace, emptySceneWorkspaceState, reduceSceneWorkspaceState, sceneWorkspaceIntentFromAdapterEvent, selectSceneDiagnosticsByStatus, selectSceneEvidenceForFeature, selectScenePrimitivesByKind, selectSceneVisibleLayers, } from "./workspace.js";
9
+ export { SCENE_STATE_SYNC_KIND, SCENE_STATE_SYNC_SLICES, SCENE_STATE_SYNC_VERSION, HonuaSceneStateSyncError, createSceneStateSynchronizer, defaultSceneStateSyncMappings, } from "./state-sync.js";
10
+ export type { CreateSceneStateSynchronizerOptions, SceneStateSyncAttributionValue, SceneStateSyncDelivery, SceneStateSyncDiagnostic, SceneStateSyncDiagnosticCode, SceneStateSyncEnvelope, SceneStateSyncErrorCode, SceneStateSyncEvent, SceneStateSyncFidelity, SceneStateSyncIdentity, SceneStateSyncInput, SceneStateSyncMapping, SceneStateSyncMappings, SceneStateSyncOrigin, SceneStateSyncPort, SceneStateSyncRealtimeValue, SceneStateSyncRenderer, SceneStateSyncSlice, SceneStateSyncSnapshot, SceneStateSyncValueMap, SceneStateSynchronizer, } from "./state-sync.js";
9
11
  export { MAPLIBRE_SCENE_CAPABILITIES, applyMapLibreScenePrimitives, createMapLibreSceneAdapter, createSceneRuntimeAdapter, diagnoseScenePrimitive, diagnoseScenePrimitives, summarizeDiagnosticStatus, toMapLibreExtrusionLayer, toMapLibreTerrainPatch, } from "./primitives.js";
10
12
  export { CESIUM_SCENE_CAPABILITIES, addCesium3DTileset, addCesiumModel, applyCameraStateToCesiumCamera, applyCesiumScenePrimitives, applyCesiumTerrain, applyHonua3DStyle, applyTilesetServerStyle, cameraStateToCesiumView, cesiumCameraToSceneState, createCesiumSceneAdapter, fetchHonua3DStyleSpec, honua3DStyleToCesiumStyleOptions, loadHonua3DStyle, modelLayerToCesiumPlacement, pickCesiumFeatureAttributes, readHonua3DStyleDescriptor, resolveCesiumModelScale, resolveHonua3DStyleUri, resolvePickedFeatureAttributes, setTilesetStyle, } from "./cesium-adapter.js";
11
13
  export type { AddCesium3DTilesetOptions, CesiumCameraLike, CesiumCameraView, CesiumHeadingPitchRollRadians, CesiumLayerHandle, CesiumModelLike, CesiumModelPlacement, CesiumPrimitiveCollectionLike, CesiumSceneLike, CesiumSceneRuntimeTarget, CesiumTilesetLike, Honua3DStyleConditions, Honua3DStyleDescriptor, Honua3DStyleSpec, } from "./cesium-adapter.js";
14
+ export { DEFAULT_CESIUM_ENTITY_LIMIT, HonuaCesiumEntityAdapterError, mountSourceToCesium, projectSourceToCesium, } from "./source-to-cesium.js";
15
+ export type { CesiumEntityAdapterErrorCode, CesiumEntityCollectionTarget, CesiumEntityDiagnostic, CesiumEntityDiagnosticCode, CesiumEntityGeometry, CesiumEntityInterval, CesiumEntityProjection, CesiumEntityProjectionItem, CesiumEntityRuntimeLoader, CesiumEntityRuntimeModule, CesiumEntityWorkflowState, MountedCesiumEntitySource, MountSourceToCesiumOptions, ProjectSourceToCesiumOptions, } from "./source-to-cesium.js";
12
16
  export { buildElevationProfilePath, buildLineOfSightBody, buildViewshedBody, formatMeasurementLabel, haversineMeters, measureScenePositions, pathLengthMeters, positionsToWktLineString, renderElevationProfilePolyline, renderLineOfSight, renderMeasurement, renderViewshed, requestElevationProfile, requestLineOfSight, requestViewshed, slantDistanceMeters, sphericalPolygonAreaSquareMeters, } from "./analysis-widgets.js";
13
17
  export type { CesiumEntityCollectionLike, ElevationProfileRequest, ElevationProfileResult, ElevationProfileSample, LineOfSightRequest, LineOfSightResult, SceneAnalysisCesiumModule, SceneAnalysisOverlay, SceneAnalysisPosition, SceneAnalysisRequestExecutor, SceneMeasurement, ViewshedRequest, ViewshedResult, ViewshedSample, } from "./analysis-widgets.js";
14
18
  export { getScene, listScenes, normalizeScene, resolveSceneTilesetUrl, sceneCameraPrimitive, sceneLayerStates, sceneTerrainPrimitive, sceneTilesetPrimitive, sceneToRuntimePrimitives, sceneViewpointBookmarks, } from "./scene-discovery.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/scene-workspace/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,yBAAyB,EACzB,oCAAoC,EACpC,8BAA8B,EAC9B,6BAA6B,EAC7B,2BAA2B,EAC3B,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,0BAA0B,EAC1B,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EACvB,yBAAyB,EACzB,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EAClB,cAAc,EACd,8BAA8B,EAC9B,0BAA0B,EAC1B,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EACrB,gCAAgC,EAChC,gBAAgB,EAChB,2BAA2B,EAC3B,2BAA2B,EAC3B,0BAA0B,EAC1B,uBAAuB,EACvB,sBAAsB,EACtB,8BAA8B,EAC9B,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAC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,EAC1B,sBAAsB,EACtB,oBAAoB,EACpB,kCAAkC,EAClC,kBAAkB,EAClB,oBAAoB,EACpB,6BAA6B,EAC7B,4BAA4B,EAC5B,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,2BAA2B,EAC3B,gBAAgB,EAChB,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,gCAAgC,EAChC,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,wBAAwB,EACxB,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,0BAA0B,EAC1B,yBAAyB,EACzB,0BAA0B,EAC1B,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/scene-workspace/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,yBAAyB,EACzB,oCAAoC,EACpC,8BAA8B,EAC9B,6BAA6B,EAC7B,2BAA2B,EAC3B,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,mCAAmC,EACnC,8BAA8B,EAC9B,sBAAsB,EACtB,wBAAwB,EACxB,4BAA4B,EAC5B,sBAAsB,EACtB,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB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pB,iBAAiB,EACjB,mBAAmB,EACnB,wBAAwB,EACxB,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,0BAA0B,EAC1B,yBAAyB,EACzB,0BAA0B,EAC1B,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,YAAY,CAAC"}
@@ -6,8 +6,10 @@
6
6
  * @module
7
7
  */
8
8
  export { createSceneWorkspace, emptySceneWorkspaceState, reduceSceneWorkspaceState, sceneWorkspaceIntentFromAdapterEvent, selectSceneDiagnosticsByStatus, selectSceneEvidenceForFeature, selectScenePrimitivesByKind, selectSceneVisibleLayers, } from "./workspace.js";
9
+ export { SCENE_STATE_SYNC_KIND, SCENE_STATE_SYNC_SLICES, SCENE_STATE_SYNC_VERSION, HonuaSceneStateSyncError, createSceneStateSynchronizer, defaultSceneStateSyncMappings, } from "./state-sync.js";
9
10
  export { MAPLIBRE_SCENE_CAPABILITIES, applyMapLibreScenePrimitives, createMapLibreSceneAdapter, createSceneRuntimeAdapter, diagnoseScenePrimitive, diagnoseScenePrimitives, summarizeDiagnosticStatus, toMapLibreExtrusionLayer, toMapLibreTerrainPatch, } from "./primitives.js";
10
11
  export { CESIUM_SCENE_CAPABILITIES, addCesium3DTileset, addCesiumModel, applyCameraStateToCesiumCamera, applyCesiumScenePrimitives, applyCesiumTerrain, applyHonua3DStyle, applyTilesetServerStyle, cameraStateToCesiumView, cesiumCameraToSceneState, createCesiumSceneAdapter, fetchHonua3DStyleSpec, honua3DStyleToCesiumStyleOptions, loadHonua3DStyle, modelLayerToCesiumPlacement, pickCesiumFeatureAttributes, readHonua3DStyleDescriptor, resolveCesiumModelScale, resolveHonua3DStyleUri, resolvePickedFeatureAttributes, setTilesetStyle, } from "./cesium-adapter.js";
12
+ export { DEFAULT_CESIUM_ENTITY_LIMIT, HonuaCesiumEntityAdapterError, mountSourceToCesium, projectSourceToCesium, } from "./source-to-cesium.js";
11
13
  export { buildElevationProfilePath, buildLineOfSightBody, buildViewshedBody, formatMeasurementLabel, haversineMeters, measureScenePositions, pathLengthMeters, positionsToWktLineString, renderElevationProfilePolyline, renderLineOfSight, renderMeasurement, renderViewshed, requestElevationProfile, requestLineOfSight, requestViewshed, slantDistanceMeters, sphericalPolygonAreaSquareMeters, } from "./analysis-widgets.js";
12
14
  export { getScene, listScenes, normalizeScene, resolveSceneTilesetUrl, sceneCameraPrimitive, sceneLayerStates, sceneTerrainPrimitive, sceneTilesetPrimitive, sceneToRuntimePrimitives, sceneViewpointBookmarks, } from "./scene-discovery.js";
13
15
  export { SceneView } from "./scene-view.js";
@@ -0,0 +1,116 @@
1
+ /**
2
+ * Experimental accepted-plan Source -> Cesium entity workflow.
3
+ *
4
+ * The projection half is renderer-neutral and SSR safe. Cesium is resolved
5
+ * only while mounting, either through an injected module/loader or a lazy
6
+ * optional-peer import.
7
+ *
8
+ * @experimental Not covered by the pre-1.0 semver contract.
9
+ */
10
+ import type { Result, Source } from "../contract/types.js";
11
+ import { type ExecuteQueryPlanOptions, type QueryExecutionPlanV1 } from "../query-planner/types.js";
12
+ export declare const DEFAULT_CESIUM_ENTITY_LIMIT = 10000;
13
+ export type CesiumEntityWorkflowState = "ready" | "empty" | "degraded" | "disposing" | "disposed";
14
+ export type CesiumEntityDiagnosticCode = "strategy-selected" | "empty-result" | "transfer-limit" | "source-degraded" | "geometry-unsupported" | "vertical-datum-unsupported" | "attributes-unsupported" | "identity-missing" | "time-interval-invalid" | "incremental-update" | "incremental-update-failed";
15
+ export interface CesiumEntityDiagnostic {
16
+ readonly code: CesiumEntityDiagnosticCode;
17
+ readonly severity: "info" | "warning";
18
+ readonly stage: "project" | "execute" | "update" | "dispose";
19
+ readonly fidelity: "exact" | "equivalent" | "unsupported";
20
+ readonly sourceId: string;
21
+ readonly planId: string;
22
+ readonly message: string;
23
+ readonly detail?: Readonly<Record<string, unknown>>;
24
+ }
25
+ export type CesiumEntityAdapterErrorCode = "disposed" | "entity-conflict" | "entity-limit-exceeded" | "invalid-option" | "peer-unavailable" | "unsupported-crs" | "unsupported-plan" | "renderer-mutation-failed";
26
+ export declare class HonuaCesiumEntityAdapterError extends Error {
27
+ readonly code: CesiumEntityAdapterErrorCode;
28
+ readonly detail?: Readonly<Record<string, unknown>> | undefined;
29
+ constructor(code: CesiumEntityAdapterErrorCode, message: string, detail?: Readonly<Record<string, unknown>> | undefined, options?: ErrorOptions);
30
+ }
31
+ export interface CesiumEntityInterval {
32
+ readonly start: string;
33
+ readonly end: string;
34
+ }
35
+ export type CesiumEntityGeometry = {
36
+ readonly kind: "point";
37
+ readonly coordinates: readonly [number, number, number];
38
+ } | {
39
+ readonly kind: "polyline";
40
+ readonly coordinates: readonly (readonly [number, number, number])[];
41
+ } | {
42
+ readonly kind: "polygon";
43
+ readonly coordinates: readonly (readonly [number, number, number])[];
44
+ };
45
+ export interface CesiumEntityProjectionItem {
46
+ readonly id: string;
47
+ readonly featureId: string | number;
48
+ readonly properties: Readonly<Record<string, unknown>>;
49
+ readonly geometry: CesiumEntityGeometry;
50
+ readonly interval?: CesiumEntityInterval;
51
+ }
52
+ export interface ProjectSourceToCesiumOptions {
53
+ /** Attribute holding stable feature identity. Defaults to descriptor primaryKey. */
54
+ readonly featureIdField?: string;
55
+ /** Hard entity ceiling. The accepted query limit must not exceed this value. */
56
+ readonly maxEntities?: number;
57
+ /** Required before finite Z values are interpreted as Cesium ellipsoid heights. */
58
+ readonly verticalDatum?: "ellipsoidal-wgs84";
59
+ readonly time?: {
60
+ readonly startField: string;
61
+ readonly endField: string;
62
+ };
63
+ }
64
+ export interface CesiumEntityProjection {
65
+ readonly strategy: "entity-query";
66
+ readonly sourceId: string;
67
+ readonly planId: string;
68
+ readonly planFingerprint: string;
69
+ readonly sourceVersion?: string;
70
+ readonly schemaVersion?: string;
71
+ readonly authorizationScope: readonly string[];
72
+ readonly entities: readonly CesiumEntityProjectionItem[];
73
+ readonly diagnostics: readonly CesiumEntityDiagnostic[];
74
+ readonly state: Exclude<CesiumEntityWorkflowState, "disposing" | "disposed">;
75
+ }
76
+ /** Minimal Cesium EntityCollection surface; real viewer.entities satisfies it. */
77
+ export interface CesiumEntityCollectionTarget {
78
+ getById(id: string): unknown;
79
+ add(entity: Readonly<Record<string, unknown>>): unknown;
80
+ removeById(id: string): boolean;
81
+ }
82
+ /** Minimal optional Cesium peer surface used to materialize entity values. */
83
+ export interface CesiumEntityRuntimeModule {
84
+ readonly Cartesian3: {
85
+ fromDegrees(longitude: number, latitude: number, height?: number): unknown;
86
+ };
87
+ readonly JulianDate: {
88
+ fromIso8601(value: string): unknown;
89
+ };
90
+ readonly TimeInterval: new (options: {
91
+ start: unknown;
92
+ stop: unknown;
93
+ }) => unknown;
94
+ readonly TimeIntervalCollection: new (intervals?: readonly unknown[]) => unknown;
95
+ readonly PolygonHierarchy: new (positions: readonly unknown[]) => unknown;
96
+ }
97
+ export type CesiumEntityRuntimeLoader = () => Promise<CesiumEntityRuntimeModule>;
98
+ export interface MountSourceToCesiumOptions extends ProjectSourceToCesiumOptions, ExecuteQueryPlanOptions {
99
+ /** Inject the peer or a lazy loader. Omit to use `import("cesium")` at mount time. */
100
+ readonly cesium?: CesiumEntityRuntimeModule | CesiumEntityRuntimeLoader;
101
+ }
102
+ export interface MountedCesiumEntitySource {
103
+ readonly strategy: "entity-query";
104
+ readonly sourceId: string;
105
+ readonly entityIds: readonly string[];
106
+ readonly planId: string;
107
+ readonly planFingerprint: string;
108
+ readonly state: CesiumEntityWorkflowState;
109
+ readonly diagnostics: readonly CesiumEntityDiagnostic[];
110
+ refresh(options?: ExecuteQueryPlanOptions): Promise<CesiumEntityProjection>;
111
+ /** Cleanup is idempotent; a failed cleanup remains retryable. */
112
+ dispose(): void;
113
+ }
114
+ export declare function projectSourceToCesium<T>(source: Source<T>, plan: QueryExecutionPlanV1, result: Result<T>, options?: ProjectSourceToCesiumOptions): CesiumEntityProjection;
115
+ export declare function mountSourceToCesium<T>(collection: CesiumEntityCollectionTarget, source: Source<T>, plan: QueryExecutionPlanV1, options?: MountSourceToCesiumOptions): Promise<MountedCesiumEntitySource>;
116
+ //# sourceMappingURL=source-to-cesium.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-to-cesium.d.ts","sourceRoot":"","sources":["../../../src/scene-workspace/source-to-cesium.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAM3D,OAAO,EACL,KAAK,uBAAuB,EAE5B,KAAK,oBAAoB,EAC1B,MAAM,2BAA2B,CAAC;AAEnC,eAAO,MAAM,2BAA2B,QAAS,CAAC;AAElD,MAAM,MAAM,yBAAyB,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,CAAC;AAClG,MAAM,MAAM,0BAA0B,GAClC,mBAAmB,GACnB,cAAc,GACd,gBAAgB,GAChB,iBAAiB,GACjB,sBAAsB,GACtB,4BAA4B,GAC5B,wBAAwB,GACxB,kBAAkB,GAClB,uBAAuB,GACvB,oBAAoB,GACpB,2BAA2B,CAAC;AAEhC,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,0BAA0B,CAAC;IAC1C,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;IAC7D,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,YAAY,GAAG,aAAa,CAAC;IAC1D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,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