@pascal-app/editor 1.0.1 → 1.0.4

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 (498) hide show
  1. package/package.json +16 -9
  2. package/src/components/editor/action-menu-button.tsx +83 -0
  3. package/src/components/editor/bake-thumbnail.tsx +315 -4
  4. package/src/components/editor/capture-level-picker.tsx +72 -0
  5. package/src/components/editor/custom-camera-controls.tsx +221 -128
  6. package/src/components/editor/delete-confirmation-dialog.tsx +297 -7
  7. package/src/components/editor/duplicate-node.ts +244 -0
  8. package/src/components/editor/editor-layout-mobile.tsx +37 -25
  9. package/src/components/editor/editor-layout-v2.tsx +131 -58
  10. package/src/components/editor/export-manager.tsx +34 -8
  11. package/src/components/editor/first-person/build-collider-world.test.ts +51 -0
  12. package/src/components/editor/first-person/build-collider-world.ts +6 -2
  13. package/src/components/editor/first-person/mechanism-targets.test.ts +75 -0
  14. package/src/components/editor/first-person/mechanism-targets.ts +36 -0
  15. package/src/components/editor/first-person-controls.tsx +205 -2
  16. package/src/components/editor/floating-action-menu.tsx +63 -207
  17. package/src/components/editor/floor-aware-camera-controls.test.ts +442 -0
  18. package/src/components/editor/floor-aware-camera-controls.ts +324 -0
  19. package/src/components/editor/floor-openings-overlay.tsx +243 -0
  20. package/src/components/editor/floor-region-controls.tsx +846 -0
  21. package/src/components/editor/floor-region-webgpu-materials.test.ts +12 -0
  22. package/src/components/editor/floor-surface.test.ts +165 -0
  23. package/src/components/editor/floor-surface.ts +182 -0
  24. package/src/components/editor/floorplan-background-selection.test.ts +11 -2
  25. package/src/components/editor/floorplan-background-selection.ts +1 -3
  26. package/src/components/editor/floorplan-panel.tsx +536 -487
  27. package/src/components/editor/footprint-height-handle.tsx +204 -0
  28. package/src/components/editor/grid.tsx +31 -7
  29. package/src/components/editor/group-actions.ts +59 -11
  30. package/src/components/editor/group-floating-action-menu.tsx +19 -9
  31. package/src/components/editor/group-move-3d.ts +4 -6
  32. package/src/components/editor/group-rotate-handle.tsx +81 -35
  33. package/src/components/editor/group-selection-box-3d.tsx +25 -17
  34. package/src/components/editor/group-transform-shared.test.ts +126 -1
  35. package/src/components/editor/group-transform-shared.ts +79 -73
  36. package/src/components/editor/handles/handle-arrow.tsx +72 -2
  37. package/src/components/editor/handles/handle-hit-priority.test.tsx +63 -0
  38. package/src/components/editor/handles/handle-hit-priority.tsx +37 -0
  39. package/src/components/editor/handles/swallow-next-click.test.ts +28 -0
  40. package/src/components/editor/handles/use-handle-drag.ts +272 -131
  41. package/src/components/editor/index.tsx +316 -176
  42. package/src/components/editor/join-walls-pill.tsx +44 -0
  43. package/src/components/editor/node-action-menu.tsx +70 -70
  44. package/src/components/editor/node-arrow-handles.tsx +167 -14
  45. package/src/components/editor/open-wall-ends-3d-layer.tsx +273 -0
  46. package/src/components/editor/open-wall-ends-hint.tsx +89 -0
  47. package/src/components/editor/quick-measurement-hud.tsx +3 -2
  48. package/src/components/editor/registry-action-contributions.test.tsx +63 -0
  49. package/src/components/editor/registry-action-contributions.tsx +132 -0
  50. package/src/components/editor/room-controls.tsx +847 -0
  51. package/src/components/editor/room-floor-highlight.tsx +128 -0
  52. package/src/components/editor/room-handles-2d.tsx +354 -0
  53. package/src/components/editor/room-handles.tsx +675 -0
  54. package/src/components/editor/room-highlight.tsx +225 -0
  55. package/src/components/editor/room-labels.test.ts +357 -0
  56. package/src/components/editor/room-labels.tsx +990 -0
  57. package/src/components/editor/room-transform-ghost.tsx +256 -0
  58. package/src/components/editor/room-webgpu-materials.test.ts +27 -0
  59. package/src/components/editor/selection-manager.tsx +451 -317
  60. package/src/components/editor/slab-hole-highlights.tsx +3 -0
  61. package/src/components/editor/snapshot-capture-overlay.tsx +4 -0
  62. package/src/components/editor/snapshot-capture.test.ts +52 -4
  63. package/src/components/editor/snapshot-capture.ts +30 -5
  64. package/src/components/editor/thumbnail-generator.test.ts +308 -0
  65. package/src/components/editor/thumbnail-generator.tsx +1035 -229
  66. package/src/components/editor/use-floorplan-background-placement.ts +31 -11
  67. package/src/components/editor/vector-edge-extractor.tsx +121 -0
  68. package/src/components/editor/views/host-view.tsx +61 -0
  69. package/src/components/editor/views/plugins-view.tsx +670 -0
  70. package/src/components/editor/views/scene-region.tsx +59 -0
  71. package/src/components/editor/views/use-editor-views.ts +57 -0
  72. package/src/components/editor/views/view-bar.tsx +220 -0
  73. package/src/components/editor/wall-justification.test.ts +140 -0
  74. package/src/components/editor/wall-move-side-handles.tsx +114 -163
  75. package/src/components/editor/wall-opening-highlights.tsx +2 -3
  76. package/src/components/editor/wall-push-arrow.tsx +92 -0
  77. package/src/components/editor/wall-region-handles.tsx +509 -0
  78. package/src/components/editor/wall-snap-beacon-layer.tsx +3 -0
  79. package/src/components/editor-2d/floorplan-cursor-indicator-overlay.tsx +8 -4
  80. package/src/components/editor-2d/floorplan-group-move.tsx +17 -24
  81. package/src/components/editor-2d/floorplan-open-wall-ends-layer.test.tsx +86 -0
  82. package/src/components/editor-2d/floorplan-open-wall-ends-layer.tsx +290 -0
  83. package/src/components/editor-2d/floorplan-registered-tool-layer.tsx +33 -12
  84. package/src/components/editor-2d/floorplan-registry-action-menu.tsx +11 -1
  85. package/src/components/editor-2d/floorplan-registry-move-overlay.tsx +242 -126
  86. package/src/components/editor-2d/renderers/floorplan-dimension-edit-overlay.test.ts +156 -0
  87. package/src/components/editor-2d/renderers/floorplan-dimension-edit-overlay.tsx +278 -0
  88. package/src/components/editor-2d/renderers/floorplan-dimension-renderer.tsx +77 -0
  89. package/src/components/editor-2d/renderers/floorplan-draft-measurement.tsx +166 -0
  90. package/src/components/editor-2d/renderers/floorplan-geometry-renderer.tsx +4 -1
  91. package/src/components/editor-2d/renderers/floorplan-registry-layer.test.ts +87 -8
  92. package/src/components/editor-2d/renderers/floorplan-registry-layer.tsx +355 -245
  93. package/src/components/editor-2d/svg-paths.ts +12 -15
  94. package/src/components/procedural-items/inspector.tsx +40 -15
  95. package/src/components/systems/ceiling/ceiling-selection-affordance-system.test.ts +97 -14
  96. package/src/components/systems/ceiling/ceiling-selection-affordance-system.tsx +18 -18
  97. package/src/components/systems/zone/zone-system.test.ts +47 -0
  98. package/src/components/systems/zone/zone-system.tsx +31 -66
  99. package/src/components/tools/__fixtures__/hosting.ts +10 -0
  100. package/src/components/tools/item/item-surface-placement.test.ts +3 -9
  101. package/src/components/tools/item/item-surface-strategy-resolver.test.ts +3 -9
  102. package/src/components/tools/item/placement-history.test.tsx +474 -0
  103. package/src/components/tools/item/placement-strategies.ts +63 -47
  104. package/src/components/tools/item/shelf-surface-strategy-resolver.test.ts +3 -3
  105. package/src/components/tools/item/use-draft-node.test.tsx +432 -1
  106. package/src/components/tools/item/use-draft-node.ts +207 -97
  107. package/src/components/tools/item/use-placement-coordinator.tsx +251 -111
  108. package/src/components/tools/paint-region/use-paint-tint.ts +37 -0
  109. package/src/components/tools/paint-region/wall-paint-region-tool.tsx +466 -0
  110. package/src/components/tools/registry/item-surface-move.test.ts +10 -2
  111. package/src/components/tools/registry/item-surface-move.ts +46 -24
  112. package/src/components/tools/registry/item-surface-resolver.test.ts +2 -2
  113. package/src/components/tools/registry/move-registry-node-tool.tsx +26 -10
  114. package/src/components/tools/select/box-select-tool.tsx +2 -12
  115. package/src/components/tools/select/plane-box-select-tool.test.tsx +79 -0
  116. package/src/components/tools/select/plane-box-select-tool.tsx +35 -22
  117. package/src/components/tools/select/select-candidates.test.ts +37 -4
  118. package/src/components/tools/select/select-candidates.ts +15 -11
  119. package/src/components/tools/shared/affordance-dispatch.test.ts +24 -0
  120. package/src/components/tools/shared/affordance-dispatch.ts +13 -0
  121. package/src/components/tools/shared/cursor-sphere.tsx +36 -12
  122. package/src/components/tools/shared/draft-measurement-label.tsx +38 -0
  123. package/src/components/tools/shared/pointer-support-cap.test.ts +27 -0
  124. package/src/components/tools/shared/pointer-support-cap.ts +17 -5
  125. package/src/components/tools/shared/surface-rejection.test.tsx +5 -4
  126. package/src/components/tools/shared/surface-rejection.tsx +14 -0
  127. package/src/components/tools/site/site-boundary-editor.tsx +1 -2
  128. package/src/components/tools/stair/stair-defaults.ts +0 -3
  129. package/src/components/tools/stair/stair-tool.tsx +90 -42
  130. package/src/components/tools/tool-manager.tsx +82 -23
  131. package/src/components/tools/wall/wall-drafting.test.ts +19 -4
  132. package/src/components/tools/zone/zone-tool.tsx +4 -12
  133. package/src/components/ui/action-menu/action-button.tsx +3 -0
  134. package/src/components/ui/action-menu/camera-actions.tsx +2 -1
  135. package/src/components/ui/action-menu/control-modes.tsx +2 -35
  136. package/src/components/ui/action-menu/measurement-control.tsx +3 -10
  137. package/src/components/ui/build-panel/build-panel.tsx +235 -0
  138. package/src/components/ui/command-palette/editor-commands.tsx +4 -30
  139. package/src/components/ui/command-palette/index.tsx +5 -24
  140. package/src/components/ui/controls/finish-swatch.tsx +110 -0
  141. package/src/components/ui/controls/material-paint-panel.tsx +101 -91
  142. package/src/components/ui/controls/material-picker.tsx +8 -67
  143. package/src/components/ui/controls/scene-material-list.tsx +4 -32
  144. package/src/components/ui/controls/select-control.tsx +65 -0
  145. package/src/components/ui/controls/slider-control.tsx +76 -31
  146. package/src/components/ui/floating-level-selector.tsx +9 -14
  147. package/src/components/ui/helpers/building-helper.tsx +4 -1
  148. package/src/components/ui/helpers/contextual-helper-panel.tsx +154 -70
  149. package/src/components/ui/helpers/helper-manager.test.tsx +69 -0
  150. package/src/components/ui/helpers/helper-manager.tsx +348 -19
  151. package/src/components/ui/helpers/item-helper.tsx +8 -0
  152. package/src/components/ui/helpers/registered-tool-helper.tsx +10 -33
  153. package/src/components/ui/icon-ref.tsx +45 -1
  154. package/src/components/ui/item-catalog/item-catalog.tsx +5 -30
  155. package/src/components/ui/level-duplicate-dialog.tsx +1 -1
  156. package/src/components/ui/node-icon-image.tsx +16 -0
  157. package/src/components/ui/panels/collections/collections-popover.tsx +20 -14
  158. package/src/components/ui/panels/floor-foundation-panel.tsx +551 -0
  159. package/src/components/ui/panels/floor-opening-panel.tsx +143 -0
  160. package/src/components/ui/panels/mobile-panel-sheet.tsx +2 -2
  161. package/src/components/ui/panels/mobile-selection-bar.tsx +2 -2
  162. package/src/components/ui/panels/multi-field-value.test.ts +26 -3
  163. package/src/components/ui/panels/multi-field-value.ts +6 -3
  164. package/src/components/ui/panels/multi-height-mode.tsx +27 -21
  165. package/src/components/ui/panels/multi-parametric-inspector.tsx +52 -2
  166. package/src/components/ui/panels/multi-selection-panel.tsx +43 -4
  167. package/src/components/ui/panels/node-display.ts +8 -3
  168. package/src/components/ui/panels/panel-manager.tsx +103 -68
  169. package/src/components/ui/panels/panel-wrapper.tsx +78 -36
  170. package/src/components/ui/panels/parametric-field-control.tsx +1 -1
  171. package/src/components/ui/panels/parametric-inspector.tsx +7 -19
  172. package/src/components/ui/panels/reference-panel.tsx +2 -3
  173. package/src/components/ui/panels/room-construction-rows.tsx +774 -0
  174. package/src/components/ui/panels/room-name-options.test.ts +55 -0
  175. package/src/components/ui/panels/room-name-options.ts +47 -0
  176. package/src/components/ui/panels/room-openings-field.tsx +110 -0
  177. package/src/components/ui/panels/room-panel.tsx +725 -0
  178. package/src/components/ui/panels/shape-choice.tsx +58 -0
  179. package/src/components/ui/panels/wall-region-list.tsx +109 -0
  180. package/src/components/ui/primitives/color-dot.tsx +36 -24
  181. package/src/components/ui/primitives/shortcut-token.tsx +4 -0
  182. package/src/components/ui/primitives/sidebar.tsx +2 -0
  183. package/src/components/ui/right-stack.test.ts +29 -0
  184. package/src/components/ui/right-stack.tsx +145 -0
  185. package/src/components/ui/sidebar/icon-rail.tsx +5 -0
  186. package/src/components/ui/sidebar/panels/settings-panel/audio-settings-dialog.tsx +2 -2
  187. package/src/components/ui/sidebar/panels/settings-panel/index.tsx +615 -372
  188. package/src/components/ui/sidebar/panels/settings-panel/keyboard-shortcuts-dialog.tsx +7 -7
  189. package/src/components/ui/sidebar/panels/settings-panel/print-export-button.tsx +1 -1
  190. package/src/components/ui/sidebar/panels/site-panel/ceiling-tree-node.tsx +4 -4
  191. package/src/components/ui/sidebar/panels/site-panel/chimney-tree-node.tsx +1 -5
  192. package/src/components/ui/sidebar/panels/site-panel/collection-tree-node.tsx +197 -0
  193. package/src/components/ui/sidebar/panels/site-panel/column-tree-node.tsx +1 -5
  194. package/src/components/ui/sidebar/panels/site-panel/door-tree-node.tsx +1 -5
  195. package/src/components/ui/sidebar/panels/site-panel/dormer-tree-node.tsx +1 -5
  196. package/src/components/ui/sidebar/panels/site-panel/elevator-tree-node.tsx +1 -5
  197. package/src/components/ui/sidebar/panels/site-panel/fence-tree-node.tsx +24 -11
  198. package/src/components/ui/sidebar/panels/site-panel/gutter-tree-node.tsx +1 -5
  199. package/src/components/ui/sidebar/panels/site-panel/index.tsx +176 -211
  200. package/src/components/ui/sidebar/panels/site-panel/inline-rename-input.tsx +30 -8
  201. package/src/components/ui/sidebar/panels/site-panel/item-tree-node.tsx +1 -3
  202. package/src/components/ui/sidebar/panels/site-panel/level-tree-node.tsx +4 -1
  203. package/src/components/ui/sidebar/panels/site-panel/registry-tree-node.tsx +1 -3
  204. package/src/components/ui/sidebar/panels/site-panel/roof-tree-node.tsx +1 -4
  205. package/src/components/ui/sidebar/panels/site-panel/shelf-tree-node.tsx +1 -3
  206. package/src/components/ui/sidebar/panels/site-panel/slab-tree-node.tsx +21 -13
  207. package/src/components/ui/sidebar/panels/site-panel/solar-panel-tree-node.tsx +1 -5
  208. package/src/components/ui/sidebar/panels/site-panel/spawn-tree-node.tsx +1 -5
  209. package/src/components/ui/sidebar/panels/site-panel/stair-tree-node.tsx +1 -5
  210. package/src/components/ui/sidebar/panels/site-panel/tree-node.tsx +0 -27
  211. package/src/components/ui/sidebar/panels/site-panel/unit-tree-node.tsx +2 -3
  212. package/src/components/ui/sidebar/panels/site-panel/wall-tree-node.tsx +1 -5
  213. package/src/components/ui/sidebar/panels/site-panel/window-tree-node.tsx +1 -5
  214. package/src/components/ui/sidebar/panels/site-panel/zone-tree-node.tsx +9 -4
  215. package/src/components/ui/sidebar/panels/zone-panel/index.tsx +0 -2
  216. package/src/components/ui/sidebar/tab-bar.tsx +10 -0
  217. package/src/components/ui/sidebar/use-plugin-panels.tsx +15 -5
  218. package/src/components/viewer/floorplan-compass-button.tsx +9 -1
  219. package/src/components/viewer/floorplan-preview-visibility.test.ts +35 -0
  220. package/src/components/viewer/floorplan-preview-visibility.ts +19 -0
  221. package/src/components/viewer/floorplan-preview.tsx +6 -18
  222. package/src/components/viewer/viewer-hover-label.tsx +34 -0
  223. package/src/components/viewer/viewer-rooms.tsx +175 -0
  224. package/src/components/viewer/viewer-scene-header.tsx +181 -145
  225. package/src/components/viewer/viewer-selection-manager.tsx +124 -0
  226. package/src/components/viewer/viewer-stage.tsx +2 -2
  227. package/src/components/viewer-zone-system.tsx +9 -9
  228. package/src/hooks/use-auto-save.integration.test.tsx +311 -0
  229. package/src/hooks/use-auto-save.ts +55 -14
  230. package/src/hooks/use-ceiling-events.test.ts +1 -0
  231. package/src/hooks/use-ceiling-events.ts +2 -0
  232. package/src/hooks/use-grid-events.test.ts +2 -0
  233. package/src/hooks/use-grid-events.ts +16 -11
  234. package/src/hooks/use-keyboard.test.ts +182 -0
  235. package/src/hooks/use-keyboard.ts +122 -91
  236. package/src/hooks/use-open-wall-ends.test.ts +99 -0
  237. package/src/hooks/use-open-wall-ends.ts +238 -0
  238. package/src/hooks/use-placement-notice.test.ts +48 -0
  239. package/src/hooks/use-placement-notice.ts +42 -0
  240. package/src/hooks/use-selected-room.ts +143 -0
  241. package/src/index.tsx +306 -39
  242. package/src/lib/catalog-panel-model.ts +39 -0
  243. package/src/lib/catalog-selection.test.ts +27 -0
  244. package/src/lib/catalog-selection.ts +8 -0
  245. package/src/lib/ceiling-edit-session.test.ts +321 -0
  246. package/src/lib/ceiling-edit-session.ts +206 -0
  247. package/src/lib/ceiling-region-session.test.ts +179 -0
  248. package/src/lib/contextual-help.test.ts +27 -1
  249. package/src/lib/contextual-help.ts +16 -9
  250. package/src/lib/continuation.test.ts +19 -1
  251. package/src/lib/continuation.ts +25 -4
  252. package/src/lib/door-interaction.ts +14 -0
  253. package/src/lib/editor-level-display.test.ts +96 -0
  254. package/src/lib/editor-level-display.ts +48 -0
  255. package/src/lib/editor-views.ts +144 -0
  256. package/src/lib/export-geometry-wait.test.ts +90 -0
  257. package/src/lib/floor-edit-session.ts +153 -0
  258. package/src/lib/floor-footprints.test.ts +563 -0
  259. package/src/lib/floor-footprints.ts +395 -0
  260. package/src/lib/floor-foundation-support.test.ts +283 -0
  261. package/src/lib/floor-opening-draft.ts +218 -0
  262. package/src/lib/floor-openings.test.ts +216 -0
  263. package/src/lib/floor-region-geometry.ts +191 -0
  264. package/src/lib/floor-region-session.test.ts +485 -0
  265. package/src/lib/floor-region-session.ts +589 -0
  266. package/src/lib/floor-region-snap.ts +101 -0
  267. package/src/lib/floor-step-hover.test.ts +32 -0
  268. package/src/lib/floorplan/annotation-visibility.ts +17 -0
  269. package/src/lib/floorplan/dimension-drive.test.ts +360 -0
  270. package/src/lib/floorplan/dimension-drive.ts +479 -0
  271. package/src/lib/floorplan/floorplan-export.test.ts +15 -9
  272. package/src/lib/floorplan/floorplan-export.tsx +32 -8
  273. package/src/lib/floorplan/floorplan-extension.ts +48 -0
  274. package/src/lib/floorplan/floorplan-mode.test.ts +4 -0
  275. package/src/lib/floorplan/floorplan-mode.ts +2 -0
  276. package/src/lib/floorplan/floorplan-pdfkit-document.ts +339 -18
  277. package/src/lib/floorplan/floorplan-pdfkit-renderer.test.ts +138 -8
  278. package/src/lib/floorplan/floorplan-pdfkit-renderer.ts +56 -25
  279. package/src/lib/floorplan/floorplan-plugin-install.test.tsx +138 -0
  280. package/src/lib/floorplan/floorplan-readonly.ts +6 -0
  281. package/src/lib/floorplan/geometry.ts +13 -6
  282. package/src/lib/floorplan/index.ts +0 -9
  283. package/src/lib/floorplan/items.ts +5 -2
  284. package/src/lib/floorplan/marks.test.ts +213 -0
  285. package/src/lib/floorplan/marks.ts +238 -0
  286. package/src/lib/floorplan/open-wall-ends.test.ts +268 -0
  287. package/src/lib/floorplan/open-wall-ends.ts +162 -0
  288. package/src/lib/floorplan/pdf-fonts/GeistMono-Bold.ttf +0 -0
  289. package/src/lib/floorplan/pdf-fonts/GeistMono-Regular.ttf +0 -0
  290. package/src/lib/floorplan/pdf-fonts/LICENSE-GeistMono.txt +92 -0
  291. package/src/lib/floorplan/pdf-fonts/LICENSE-LiberationSans.txt +102 -0
  292. package/src/lib/floorplan/pdf-fonts/LiberationSans-Bold.ttf +0 -0
  293. package/src/lib/floorplan/pdf-fonts/LiberationSans-Regular.ttf +0 -0
  294. package/src/lib/floorplan/schedules.test.ts +189 -0
  295. package/src/lib/floorplan/schedules.ts +339 -0
  296. package/src/lib/floorplan/sheet-export.test.ts +100 -0
  297. package/src/lib/floorplan/sheet-export.ts +318 -0
  298. package/src/lib/floorplan/site-plan/build-site-plan-drawing.ts +779 -0
  299. package/src/lib/floorplan/site-plan/contours.test.ts +43 -0
  300. package/src/lib/floorplan/site-plan/contributors.ts +97 -0
  301. package/src/lib/floorplan/site-plan/coverage.ts +232 -0
  302. package/src/lib/floorplan/site-plan/drawing-type-switch.test.ts +15 -0
  303. package/src/lib/floorplan/site-plan/drawing-type-switch.tsx +86 -0
  304. package/src/lib/floorplan/site-plan/front-edge.test.ts +103 -0
  305. package/src/lib/floorplan/site-plan/front-edge.ts +156 -0
  306. package/src/lib/floorplan/site-plan/geometry.test.ts +275 -0
  307. package/src/lib/floorplan/site-plan/geometry.ts +557 -0
  308. package/src/lib/floorplan/site-plan/index.ts +71 -0
  309. package/src/lib/floorplan/site-plan/site-annotations.test.ts +366 -0
  310. package/src/lib/floorplan/site-plan/site-annotations.ts +1083 -0
  311. package/src/lib/floorplan/site-plan/site-parts.ts +379 -0
  312. package/src/lib/floorplan/site-plan/site-plan-layer.tsx +138 -0
  313. package/src/lib/floorplan/site-plan/street-name.test.ts +69 -0
  314. package/src/lib/floorplan/site-plan/street-name.ts +302 -0
  315. package/src/lib/floorplan/site-plan/yards.test.ts +69 -0
  316. package/src/lib/floorplan/types.ts +1 -27
  317. package/src/lib/fresh-planar-placement.test.ts +36 -0
  318. package/src/lib/fresh-planar-placement.ts +191 -36
  319. package/src/lib/geometry-script/author.ts +152 -0
  320. package/src/lib/geometry-script/client.ts +152 -0
  321. package/src/lib/geometry-script/protocol.ts +12 -0
  322. package/src/lib/gesture-lifecycle.test.ts +595 -0
  323. package/src/lib/gesture-lifecycle.ts +290 -0
  324. package/src/lib/glb-export-zone-holes.test.ts +41 -0
  325. package/src/lib/glb-export.test.ts +544 -16
  326. package/src/lib/glb-export.ts +256 -125
  327. package/src/lib/grid-frame.test.ts +19 -0
  328. package/src/lib/grid-frame.ts +18 -0
  329. package/src/lib/history.test.ts +6 -0
  330. package/src/lib/history.ts +7 -0
  331. package/src/lib/hud-title.ts +109 -0
  332. package/src/lib/hydration-gated-storage.ts +49 -0
  333. package/src/lib/ifc-export.test.ts +174 -0
  334. package/src/lib/ifc-export.ts +201 -0
  335. package/src/lib/ifc-parts.ts +15 -0
  336. package/src/lib/inspector-expanded.test.ts +44 -0
  337. package/src/lib/inspector-expanded.ts +36 -0
  338. package/src/lib/interaction/scope.ts +27 -1
  339. package/src/lib/keyboard-pan.test.ts +184 -0
  340. package/src/lib/keyboard-pan.ts +238 -0
  341. package/src/lib/live-gesture-round-trip.test.ts +360 -0
  342. package/src/lib/lot/__fixtures__/map-dossier-miami-shores.json +1 -0
  343. package/src/lib/lot/__fixtures__/map-dossier-stpete.json +1 -0
  344. package/src/lib/lot/clean-ring.test.ts +186 -0
  345. package/src/lib/lot/clean-ring.ts +217 -0
  346. package/src/lib/lot/dossier.test.ts +202 -0
  347. package/src/lib/lot/dossier.ts +498 -0
  348. package/src/lib/lot/drop-in.test.ts +326 -0
  349. package/src/lib/lot/drop-in.ts +407 -0
  350. package/src/lib/lot/index.ts +43 -0
  351. package/src/lib/lot/lot-patch.test.ts +340 -0
  352. package/src/lib/lot/lot-patch.ts +394 -0
  353. package/src/lib/lot/parcel-provider.ts +43 -0
  354. package/src/lib/lot/terrain.test.ts +161 -0
  355. package/src/lib/lot/terrain.ts +266 -0
  356. package/src/lib/material-catalog-model.ts +74 -0
  357. package/src/lib/material-paint-panel-model.ts +80 -0
  358. package/src/lib/material-paint.ts +4 -0
  359. package/src/lib/mezzanine-actions.test.ts +342 -0
  360. package/src/lib/mezzanine-draft.test.ts +501 -0
  361. package/src/lib/mezzanine-draft.ts +278 -0
  362. package/src/lib/mezzanine-messages.ts +26 -0
  363. package/src/lib/mezzanine-selection.test.ts +207 -0
  364. package/src/lib/mezzanine-stairs.ts +46 -0
  365. package/src/lib/model-export.ts +3 -1
  366. package/src/lib/node-action-movement.ts +17 -6
  367. package/src/lib/node-display-label.ts +37 -0
  368. package/src/lib/orbit-floor-clearance.test.ts +165 -0
  369. package/src/lib/orbit-floor-clearance.ts +106 -0
  370. package/src/lib/overlay-transform.test.ts +28 -0
  371. package/src/lib/overlay-transform.ts +12 -0
  372. package/src/lib/paint-commit-route.test.ts +37 -0
  373. package/src/lib/paint-commit-route.ts +17 -0
  374. package/src/lib/paint-eyedropper.test.tsx +165 -0
  375. package/src/lib/paint-eyedropper.ts +99 -0
  376. package/src/lib/paint-pass-through.test.ts +111 -0
  377. package/src/lib/paint-pass-through.ts +76 -0
  378. package/src/lib/paint-region-hover.ts +25 -0
  379. package/src/lib/paint-region-mode.ts +154 -0
  380. package/src/lib/paint-regions.test.ts +166 -0
  381. package/src/lib/paint-regions.ts +192 -0
  382. package/src/lib/paint-scope.test.ts +317 -35
  383. package/src/lib/paint-scope.ts +266 -25
  384. package/src/lib/panel-rows.ts +96 -0
  385. package/src/lib/panel-tool-options.test.ts +34 -0
  386. package/src/lib/panel-tool-options.ts +46 -0
  387. package/src/lib/parametric-node-update.ts +37 -0
  388. package/src/lib/plate-paint-affected.test.ts +300 -0
  389. package/src/lib/plate-paint-affected.ts +177 -0
  390. package/src/lib/plugin-chat.ts +50 -0
  391. package/src/lib/plugin-panels.test.ts +25 -0
  392. package/src/lib/plugin-panels.ts +94 -0
  393. package/src/lib/print-shell-compiler.ts +1 -0
  394. package/src/lib/registered-draft-snap.ts +12 -0
  395. package/src/lib/roof-duplication.ts +10 -2
  396. package/src/lib/room-assembly-overlay.test.ts +275 -0
  397. package/src/lib/room-assembly-overlay.ts +266 -0
  398. package/src/lib/room-built-on.test.ts +379 -0
  399. package/src/lib/room-built-on.ts +138 -0
  400. package/src/lib/room-construction-commands.ts +712 -0
  401. package/src/lib/room-construction.test.ts +746 -0
  402. package/src/lib/room-construction.ts +385 -0
  403. package/src/lib/room-controls-phase6.test.ts +630 -0
  404. package/src/lib/room-divide-session.ts +523 -0
  405. package/src/lib/room-handle-drag.ts +1068 -0
  406. package/src/lib/room-name-catalog.test.ts +90 -0
  407. package/src/lib/room-name-catalog.ts +168 -0
  408. package/src/lib/room-push-dimensions.test.ts +311 -0
  409. package/src/lib/room-push-dimensions.ts +251 -0
  410. package/src/lib/room-selection-commands.ts +62 -0
  411. package/src/lib/room-selection.test.ts +973 -0
  412. package/src/lib/room-selection.ts +417 -0
  413. package/src/lib/room-structure-commands.ts +94 -0
  414. package/src/lib/room-structure.test.ts +921 -0
  415. package/src/lib/room-transform-session.ts +570 -0
  416. package/src/lib/room-zone-routing.test.ts +294 -0
  417. package/src/lib/room-zone-routing.ts +197 -0
  418. package/src/lib/scene-clipboard.test.ts +364 -0
  419. package/src/lib/scene-clipboard.ts +229 -48
  420. package/src/lib/scene-material-refs.test.ts +79 -0
  421. package/src/lib/scene-material-refs.ts +79 -0
  422. package/src/lib/scene.test.ts +87 -0
  423. package/src/lib/scene.ts +39 -45
  424. package/src/lib/selection-routing.test.ts +129 -45
  425. package/src/lib/selection-routing.ts +53 -74
  426. package/src/lib/session-writes.test.ts +120 -0
  427. package/src/lib/session-writes.ts +205 -0
  428. package/src/lib/sidebar-panel.ts +62 -0
  429. package/src/lib/site-boundary.test.ts +4 -6
  430. package/src/lib/site-boundary.ts +1 -1
  431. package/src/lib/snapping-mode.test.ts +17 -2
  432. package/src/lib/snapping-mode.ts +19 -7
  433. package/src/lib/spatial-drag-plane.test.ts +53 -0
  434. package/src/lib/spatial-drag-plane.ts +19 -0
  435. package/src/lib/spatial-pointer-input.test.ts +72 -0
  436. package/src/lib/spatial-pointer-input.ts +62 -0
  437. package/src/lib/spatial-snap.test.ts +47 -0
  438. package/src/lib/terrace-draft.test.ts +145 -0
  439. package/src/lib/terrace-draft.ts +213 -0
  440. package/src/lib/terrain-panel-model.ts +117 -0
  441. package/src/lib/tool-cursor-icon.test.ts +16 -0
  442. package/src/lib/tool-cursor-icon.ts +11 -0
  443. package/src/lib/typing-target.ts +9 -0
  444. package/src/lib/units.ts +77 -39
  445. package/src/lib/vector-edges.test.ts +58 -0
  446. package/src/lib/vector-edges.ts +400 -0
  447. package/src/lib/viewer-selection.test.ts +577 -0
  448. package/src/lib/viewer-selection.ts +569 -0
  449. package/src/lib/wall-draw-variant.test.ts +71 -0
  450. package/src/lib/wall-draw-variant.ts +91 -0
  451. package/src/lib/wall-paint-region-session.ts +246 -0
  452. package/src/lib/wall-paint-region.test.ts +373 -0
  453. package/src/lib/wall-polygon-draft.test.ts +262 -0
  454. package/src/lib/wall-polygon-draft.ts +286 -0
  455. package/src/lib/wall-push.test.ts +453 -0
  456. package/src/lib/wall-region-face.ts +352 -0
  457. package/src/lib/wall-region-handles.test.ts +304 -0
  458. package/src/lib/wall-region-handles.ts +368 -0
  459. package/src/lib/wall-region-list.test.ts +119 -0
  460. package/src/lib/wall-region-list.ts +136 -0
  461. package/src/lib/wall-region-snap.ts +110 -0
  462. package/src/lib/window-interaction.ts +14 -0
  463. package/src/lib/world-grid-snap.test.ts +48 -0
  464. package/src/lib/world-grid-snap.ts +9 -5
  465. package/src/lib/zone-content.ts +4 -1
  466. package/src/lib/zone-name.test.ts +17 -0
  467. package/src/lib/zone-name.ts +17 -0
  468. package/src/store/opens-in-select-mode.test.ts +223 -0
  469. package/src/store/paint-mode.test.ts +188 -0
  470. package/src/store/rotation-snapping.test.ts +53 -0
  471. package/src/store/terrain-sculpt-mode.test.ts +19 -21
  472. package/src/store/tool-mode.test.ts +137 -6
  473. package/src/store/use-delete-confirmation.ts +28 -1
  474. package/src/store/use-drawing-view.test.ts +24 -3
  475. package/src/store/use-drawing-view.ts +29 -1
  476. package/src/store/use-editor.tsx +442 -323
  477. package/src/store/use-floorplan-draft-preview.ts +23 -1
  478. package/src/store/use-floorplan-marquee.ts +12 -2
  479. package/src/store/use-interaction-scope.ts +155 -6
  480. package/src/store/use-quick-measurement-hud.ts +3 -3
  481. package/src/store/use-stair-build-preview.ts +13 -5
  482. package/src/store/use-wall-move-ghosts.ts +4 -2
  483. package/src/store/use-wall-region-handles-selection.test.ts +222 -0
  484. package/src/store/use-wall-region-handles-selection.ts +139 -0
  485. package/src/store/view-layout.test.ts +175 -0
  486. package/src/store/view-layout.ts +196 -0
  487. package/src/test-utils/immediate-animation-frames.ts +16 -0
  488. package/src/test-utils/live-gesture-round-trip.ts +224 -0
  489. package/src/test-utils/selection-harness.ts +82 -0
  490. package/src/components/editor-2d/renderers/floorplan-stair-layer.tsx +0 -499
  491. package/src/components/systems/zone/zone-label-editor-system.tsx +0 -333
  492. package/src/components/tools/fence/fence-drafting.test.ts +0 -100
  493. package/src/components/tools/fence/fence-drafting.ts +0 -266
  494. package/src/components/ui/sidebar/panels/plugins-panel.tsx +0 -218
  495. package/src/components/viewer/viewer-units-panel.tsx +0 -116
  496. package/src/lib/floorplan/stairs.ts +0 -489
  497. package/src/lib/level-duplication.test.ts +0 -144
  498. package/src/lib/level-duplication.ts +0 -195
@@ -0,0 +1,360 @@
1
+ import { afterAll, afterEach, beforeEach, describe, expect, spyOn, test } from 'bun:test'
2
+ import {
3
+ type AnyNodeId,
4
+ clearSceneHistory,
5
+ createMezzanine,
6
+ createZoneDivisionContext,
7
+ generateId,
8
+ nodeRegistry,
9
+ type SlabNode,
10
+ useLiveNodeOverrides,
11
+ useScene,
12
+ type WallNode,
13
+ } from '@pascal-app/core'
14
+ import { useViewer } from '@pascal-app/viewer'
15
+ import useEditor from '../store/use-editor'
16
+ import useInteractionScope from '../store/use-interaction-scope'
17
+ import { installImmediateAnimationFrames } from '../test-utils/immediate-animation-frames'
18
+ import {
19
+ expectCancelRestores,
20
+ expectCommitIsOneUndoStep,
21
+ expectPreviewMatchesCommit,
22
+ expectRemoteEditSurvives,
23
+ type LiveGesture,
24
+ seedRoundTripScene,
25
+ } from '../test-utils/live-gesture-round-trip'
26
+ import { beginFootprintHeightPreview } from './floor-footprints'
27
+ import { cancelGestures } from './gesture-lifecycle'
28
+ import { roomRelativeFloorHeight, stepRoomFloorElevation } from './room-construction-commands'
29
+ import {
30
+ commitRoomElevation,
31
+ mezzanineEdgeHandles,
32
+ roomFloorElevation,
33
+ roomPushHandles,
34
+ runFloorplanMezzanineEdge,
35
+ runFloorplanRoomPush,
36
+ runFloorplanWallPush,
37
+ runRoomHandleDrag,
38
+ runWallPushDrag,
39
+ useRoomHandleDrag,
40
+ wallPushHandles,
41
+ } from './room-handle-drag'
42
+ import { applyRoomPlan } from './room-structure-commands'
43
+ import {
44
+ cancelRoomTransform,
45
+ commitRoomTransform,
46
+ previewRoomTransform,
47
+ startRoomTransform,
48
+ useRoomTransform,
49
+ } from './room-transform-session'
50
+
51
+ // Every live gesture that can reshape the building (walls, and the plates,
52
+ // ceilings and zones derived from them): Escape puts the scene back exactly,
53
+ // release is one undo step that the derived nodes ride. The wall tools
54
+ // mounted from the nodes package run the same harness there.
55
+
56
+ const LEVEL = 'level_live_round_trip'
57
+ const stubbed: string[] = []
58
+ let stop = () => {}
59
+ let restoreFrames = () => {}
60
+ let registry: { mockRestore: () => void } | null = null
61
+ let zoneId = ''
62
+
63
+ const nodes = () => useScene.getState().nodes
64
+ const eastWall = () =>
65
+ Object.values(nodes()).find(
66
+ (n): n is WallNode => n.type === 'wall' && n.start[0] === 6 && n.end[0] === 6,
67
+ )!
68
+ const basePlate = () =>
69
+ Object.values(nodes()).find((n): n is SlabNode => n.type === 'slab' && n.plateRole === 'base')!
70
+
71
+ function pointer(type: 'pointermove' | 'pointerup', clientX: number, clientY = 0) {
72
+ window.dispatchEvent(Object.assign(new Event(type), { clientX, clientY }))
73
+ }
74
+ function press(key: string) {
75
+ window.dispatchEvent(Object.assign(new Event('keydown', { cancelable: true }), { key }))
76
+ }
77
+ const hasOverrides = () => useLiveNodeOverrides.getState().overrides.size > 0
78
+ // Plan coordinates straight from the client point: x → plan x, y → plan z.
79
+ const toPlan = (x: number, y: number) => [x, y] as const
80
+
81
+ beforeEach(() => {
82
+ restoreFrames = installImmediateAnimationFrames()
83
+ if (!globalThis.document) {
84
+ globalThis.document = { body: { style: { cursor: '' } } } as unknown as Document
85
+ stubbed.push('document')
86
+ }
87
+ if (!globalThis.window) {
88
+ globalThis.window = new EventTarget() as Window & typeof globalThis
89
+ stubbed.push('window')
90
+ }
91
+ // The nodes package that registers walls is not loaded here.
92
+ const get = nodeRegistry.get.bind(nodeRegistry)
93
+ registry = spyOn(nodeRegistry, 'get').mockImplementation(((kind: string) =>
94
+ kind === 'wall' ? { snapProfile: 'structural' } : get(kind)) as typeof nodeRegistry.get)
95
+ cancelGestures('cancel')
96
+ useInteractionScope.getState().end()
97
+ useScene.temporal.getState().resume()
98
+ ;({ stop, zoneId } = seedRoundTripScene('building_live_round_trip', LEVEL))
99
+ useViewer.getState().setSelection({
100
+ buildingId: 'building_live_round_trip',
101
+ levelId: LEVEL,
102
+ selectedIds: [],
103
+ })
104
+ useEditor.setState({ phase: 'building', mode: 'select', gridSnapStep: 0.5 })
105
+ useEditor.getState().setSnappingMode('polygon', 'grid')
106
+ clearSceneHistory()
107
+ })
108
+
109
+ afterEach(() => {
110
+ cancelGestures('cancel')
111
+ cancelRoomTransform()
112
+ useRoomTransform.setState({ session: null })
113
+ useLiveNodeOverrides.getState().clearAll()
114
+ stop()
115
+ registry?.mockRestore()
116
+ registry = null
117
+ restoreFrames()
118
+ })
119
+
120
+ afterAll(async () => {
121
+ // Let the click-swallow timers fire before the stubs go.
122
+ await new Promise((resolve) => setTimeout(resolve, 350))
123
+ for (const key of stubbed.splice(0)) delete (globalThis as Record<string, unknown>)[key]
124
+ })
125
+
126
+ const gestures: Record<string, () => LiveGesture> = {
127
+ 'wall push arrow (3D)': () => ({
128
+ start: () => {
129
+ const handle = wallPushHandles(eastWall(), nodes()).find((h) => h.outward[0] > 0.5)!
130
+ runWallPushDrag({ handle, levelId: LEVEL, from: 0, along: (clientX) => clientX })
131
+ pointer('pointermove', 1.2)
132
+ },
133
+ previewed: hasOverrides,
134
+ cancel: () => press('Escape'),
135
+ commit: () => pointer('pointerup', 1.2),
136
+ }),
137
+ 'wall push arrow (floor plan)': () => ({
138
+ start: () => {
139
+ const toPlan = (x: number, y: number) => [x, y] as const
140
+ runFloorplanWallPush({ wallId: eastWall().id, side: 'b' }, 6.4, 2, toPlan)
141
+ pointer('pointermove', 7.6, 2)
142
+ },
143
+ previewed: hasOverrides,
144
+ cancel: () => press('Escape'),
145
+ commit: () => pointer('pointerup', 7.6, 2),
146
+ }),
147
+ 'room push chevron (floor plan)': () => ({
148
+ start: () => {
149
+ const spans = createZoneDivisionContext(nodes(), zoneId).face!.spans
150
+ const handle = roomPushHandles(nodes(), spans).find((h) => h.outward[0] > 0.5)!
151
+ const [x, z] = handle.position
152
+ runFloorplanRoomPush({ handle, levelId: LEVEL, zoneId, clientX: x, clientY: z, toPlan })
153
+ pointer('pointermove', x + 1.2, z + 0.3)
154
+ },
155
+ previewed: hasOverrides,
156
+ cancel: () => press('Escape'),
157
+ commit: () => {
158
+ const drag = useRoomHandleDrag.getState().drag
159
+ if (drag?.kind !== 'push') throw new Error('no push drag')
160
+ pointer('pointerup', drag.anchor[0] + 1.2, drag.anchor[1] + 0.3)
161
+ },
162
+ }),
163
+ 'room floor elevation': () => ({
164
+ start: () => {
165
+ let value = 0
166
+ runRoomHandleDrag({
167
+ label: 'room-elevation',
168
+ nodeId: zoneId,
169
+ zoneId,
170
+ levelId: LEVEL,
171
+ requires: [zoneId],
172
+ sample: (clientX) => clientX,
173
+ onValue: (next) => {
174
+ value = next
175
+ },
176
+ onCommit: () => commitRoomElevation(zoneId, value),
177
+ onCancel: () => {},
178
+ })
179
+ pointer('pointermove', 0.45)
180
+ },
181
+ cancel: () => press('Escape'),
182
+ commit: () => pointer('pointerup', 0.45),
183
+ }),
184
+ 'room move': () => ({
185
+ start: () => {
186
+ const zone = nodes()[zoneId as AnyNodeId] as { polygon: [number, number][] }
187
+ startRoomTransform('move', {
188
+ zoneId,
189
+ levelId: LEVEL,
190
+ outline: [zone.polygon],
191
+ walls: [],
192
+ floorY: 0,
193
+ })
194
+ previewRoomTransform([2, 1], 0)
195
+ },
196
+ previewed: () => useRoomTransform.getState().session?.valid === true,
197
+ cancel: () => press('Escape'),
198
+ commit: () => commitRoomTransform(),
199
+ }),
200
+ 'footprint height': () => {
201
+ let preview: ReturnType<typeof beginFootprintHeightPreview> | null = null
202
+ return {
203
+ start: () => {
204
+ preview = beginFootprintHeightPreview(basePlate().id)
205
+ preview.preview(0.3)
206
+ preview.preview(0.6)
207
+ },
208
+ // The preview writes the building itself, outside history.
209
+ previewed: () => (basePlate().floorHeight ?? 0) > 0.5,
210
+ cancel: () => preview?.cancel(),
211
+ commit: () => preview?.commit(0.6),
212
+ }
213
+ },
214
+ }
215
+
216
+ // A raised footprint moves its walls and room floors, not the plate outlines.
217
+ const derivedTypes: Record<string, readonly string[]> = {
218
+ 'room floor elevation': ['slab'],
219
+ 'footprint height': ['slab'],
220
+ }
221
+
222
+ // The node a collaborator edits mid-gesture: one the gesture itself writes.
223
+ const remoteTargets: Record<string, () => AnyNodeId> = {
224
+ 'room floor elevation': () => zoneId as AnyNodeId,
225
+ 'room move': () => zoneId as AnyNodeId,
226
+ 'footprint height': () => basePlate().id as AnyNodeId,
227
+ }
228
+
229
+ describe('live gestures: Escape restores exactly, release is one undo step', () => {
230
+ for (const [name, gesture] of Object.entries(gestures)) {
231
+ test(`${name}: cancel`, () => expectCancelRestores(gesture()))
232
+ test(`${name}: commit`, () => expectCommitIsOneUndoStep(gesture(), derivedTypes[name]))
233
+ test(`${name}: a collaborator's edit mid-gesture survives`, () =>
234
+ expectRemoteEditSurvives(gesture, remoteTargets[name] ?? (() => eastWall().id as AnyNodeId)))
235
+ }
236
+ for (const name of [
237
+ 'wall push arrow (3D)',
238
+ 'wall push arrow (floor plan)',
239
+ 'room push chevron (floor plan)',
240
+ ])
241
+ test(`${name}: the preview is the commit, and only what it reshapes`, () =>
242
+ expectPreviewMatchesCommit(gestures[name]!()))
243
+ })
244
+
245
+ test('the push drag’s room floor preview is drawn from overrides and rebuilt on Escape', async () => {
246
+ // Guards the harness itself: the push previews the derived room surfaces.
247
+ await expectCancelRestores({
248
+ start: () => {
249
+ const handle = wallPushHandles(eastWall(), nodes()).find((h) => h.outward[0] > 0.5)!
250
+ runWallPushDrag({ handle, levelId: LEVEL, from: 0, along: (clientX) => clientX })
251
+ pointer('pointermove', 1.2)
252
+ if (!useLiveNodeOverrides.getState().overrides.has(zoneId))
253
+ throw new Error('the push did not preview the room')
254
+ if (useRoomHandleDrag.getState().drag?.kind !== 'push') throw new Error('no push drag')
255
+ },
256
+ cancel: () => press('Escape'),
257
+ commit: () => {},
258
+ })
259
+ })
260
+
261
+ describe('the plan’s mezzanine edge arrows', () => {
262
+ let mezzanineId = ''
263
+ beforeEach(() => {
264
+ useScene.getState().updateNodes([{ id: LEVEL as AnyNodeId, data: { height: 5 } }])
265
+ const plan = createMezzanine(nodes(), {
266
+ hostZoneId: zoneId,
267
+ polygon: [
268
+ [1, 1],
269
+ [4, 1],
270
+ [4, 3],
271
+ [1, 3],
272
+ ],
273
+ mintId: generateId,
274
+ })
275
+ applyRoomPlan(plan)
276
+ mezzanineId = plan.zoneId
277
+ clearSceneHistory()
278
+ })
279
+
280
+ const edgeDrag = (): LiveGesture => ({
281
+ start: () => {
282
+ const handle = mezzanineEdgeHandles(nodes(), mezzanineId).find((h) => h.outward[0] > 0.5)!
283
+ const [x, z] = handle.position
284
+ runFloorplanMezzanineEdge({
285
+ handle,
286
+ levelId: LEVEL,
287
+ zoneId: mezzanineId,
288
+ clientX: x,
289
+ clientY: z,
290
+ toPlan,
291
+ })
292
+ pointer('pointermove', x + 1.2, z)
293
+ },
294
+ previewed: () => useRoomHandleDrag.getState().drag?.kind === 'mezzanine-edge',
295
+ cancel: () => press('Escape'),
296
+ commit: () => {
297
+ const drag = useRoomHandleDrag.getState().drag
298
+ if (drag?.kind !== 'mezzanine-edge') throw new Error('no edge drag')
299
+ pointer('pointerup', drag.anchor[0] + 1.2, drag.anchor[1])
300
+ },
301
+ })
302
+
303
+ test('cancel restores exactly', () => expectCancelRestores(edgeDrag()))
304
+ test('commit is one undo step', () => expectCommitIsOneUndoStep(edgeDrag()))
305
+ test('a collaborator’s edit mid-drag survives', () =>
306
+ expectRemoteEditSurvives(edgeDrag, () => mezzanineId as AnyNodeId))
307
+ test('the outline the drag draws is the one the release commits', () => {
308
+ const gesture = edgeDrag()
309
+ gesture.start()
310
+ const drag = useRoomHandleDrag.getState().drag
311
+ if (drag?.kind !== 'mezzanine-edge') throw new Error('no edge drag')
312
+ const outline = JSON.stringify(drag.outline)
313
+ gesture.commit()
314
+ const zone = nodes()[mezzanineId as AnyNodeId] as { polygon: unknown }
315
+ expect(JSON.stringify(zone.polygon)).toBe(outline)
316
+ })
317
+ })
318
+
319
+ describe('the plan pill’s floor height stepper', () => {
320
+ const height = () => roomRelativeFloorHeight(nodes(), zoneId)
321
+ test('steps the room floor 5 cm at a time, one undo step a click', async () => {
322
+ await expectCommitIsOneUndoStep(
323
+ {
324
+ start: () => {},
325
+ cancel: () => {},
326
+ commit: () => {
327
+ const next = stepRoomFloorElevation(nodes(), zoneId, 0.05)
328
+ if (next === null) throw new Error('refused')
329
+ commitRoomElevation(zoneId, next)
330
+ },
331
+ },
332
+ ['zone', 'slab'],
333
+ )
334
+ expect(height()).toBe(0)
335
+ commitRoomElevation(zoneId, stepRoomFloorElevation(nodes(), zoneId, 0.05)!)
336
+ commitRoomElevation(zoneId, stepRoomFloorElevation(nodes(), zoneId, 0.05)!)
337
+ expect(height()).toBeCloseTo(0.1)
338
+ commitRoomElevation(zoneId, stepRoomFloorElevation(nodes(), zoneId, -0.05)!)
339
+ expect(height()).toBeCloseTo(0.05)
340
+ })
341
+ test('an off-grid height lands on the next 5 cm step', () => {
342
+ commitRoomElevation(zoneId, roomFloorElevation(nodes(), zoneId) + 0.12)
343
+ const up = stepRoomFloorElevation(nodes(), zoneId, 0.05)!
344
+ const down = stepRoomFloorElevation(nodes(), zoneId, -0.05)!
345
+ const base = roomFloorElevation(nodes(), zoneId) - height()
346
+ expect(up - base).toBeCloseTo(0.15)
347
+ expect(down - base).toBeCloseTo(0.1)
348
+ })
349
+ test('the clamp stops it: at the highest floor the room allows, raising reports no step', () => {
350
+ let guard = 0
351
+ let next = stepRoomFloorElevation(nodes(), zoneId, 0.05)
352
+ while (next !== null && guard++ < 200) {
353
+ commitRoomElevation(zoneId, next)
354
+ next = stepRoomFloorElevation(nodes(), zoneId, 0.05)
355
+ }
356
+ expect(next).toBeNull()
357
+ expect(guard).toBeLessThan(200)
358
+ expect(height()).toBeGreaterThan(0)
359
+ })
360
+ })
@@ -0,0 +1 @@
1
+ {"object":"location","as_of":"2026-09-07T16:49:40.351Z","query":{"type":"address","address":"1247 NE 104th St, Miami Shores, FL 33138"},"point":{"lat":25.870939,"lng":-80.172112,"source":"geocoded"},"address":{"formatted":"1247 Northeast 104th Street, Miami Shores, Florida 33138, United States","precision":"rooftop"},"layers":{"parcel":{"object":"location_section","layer":"parcel","name":"Parcel","category":"property","status":"not_covered","summary":"Parcel boundaries are not carried for this area yet.","data":null,"reason":"Parcel boundaries are not carried for this area yet.","hint":"Coverage today: the 7-county Florida prototype and Orange County; statewide lands with the PostGIS plane."},"flood":{"object":"location_section","layer":"flood","name":"FEMA flood zones","category":"classification","status":"available","summary":"Moderate risk — 0.2% chance of flooding in any year (the '500-year' floodplain) (zone X).","data":{"is_in_flood_zone":false,"mapped":true,"firm_panel":{"panel":"12086C0306L","effective_date":"2009-09-11"},"zone_at_point":{"zone":"X","zone_subtype":"0.2 PCT ANNUAL CHANCE FLOOD HAZARD","description":"Moderate risk — 0.2% chance of flooding in any year (the '500-year' floodplain)","is_in_flood_zone":false,"base_flood_elevation_ft":null},"evaluated_against":"point","zones_on_parcel":null,"highest_risk_zone_on_parcel":null,"geometry":{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[-80.187444,25.854026],[-80.187367,25.854066],[-80.18689,25.854352],[-80.186433,25.854562],[-80.186203,25.854651],[-80.186058,25.854731],[-80.185949,25.854815],[-80.185824,25.854947],[-80.185672,25.855088],[-80.185506,25.855274],[-80.185298,25.855457],[-80.184826,25.855748],[-80.184394,25.855958],[-80.184104,25.856118],[-80.183995,25.856192],[-80.183785,25.856306],[-80.183726,25.856357],[-80.183705,25.85639],[-80.183688,25.856447],[-80.183689,25.856484],[-80.183717,25.856595],[-80.183895,25.856906],[-80.184039,25.857112],[-80.184304,25.857404],[-80.184599,25.857758],[-80.184752,25.857971],[-80.184859,25.858151],[-80.184886,25.858219],[-80.184907,25.858314],[-80.184915,25.85849],[-80.184911,25.858525],[-80.184878,25.858616],[-80.184857,25.858649],[-80.184798,25.858693],[-80.184736,25.858714],[-80.184675,25.858717],[-80.184607,25.858708],[-80.18451,25.858678],[-80.184364,25.858609],[-80.184057,25.858435],[-80.183931,25.858383],[-80.183866,25.85837],[-80.183758,25.858362],[-80.183655,25.858372],[-80.183589,25.858389],[-80.183427,25.858455],[-80.183365,25.858492],[-80.183301,25.858546],[-80.183069,25.858833],[-80.182854,25.859156],[-80.182785,25.859237],[-80.182697,25.859302],[-80.182661,25.85932],[-80.182596,25.859341],[-80.182494,25.859352],[-80.182391,25.85934],[-80.182262,25.859277],[-80.181946,25.85905],[-80.181786,25.858916],[-80.181716,25.858868],[-80.181676,25.85885],[-80.18161,25.858842],[-80.181539,25.858847],[-80.181262,25.858898],[-80.181165,25.858893],[-80.18113,25.85888],[-80.181043,25.85882],[-80.181002,25.858772],[-80.180973,25.858714],[-80.18093,25.858584],[-80.180923,25.858522],[-80.180922,25.858489],[-80.180955,25.858365],[-80.180947,25.85832],[-80.180913,25.858262],[-80.18073,25.858069],[-80.180616,25.857863],[-80.180547,25.857688],[-80.180501,25.857534],[-80.180473,25.857404],[-80.180445,25.857204],[-80.180397,25.857091],[-80.18033,25.857002],[-80.180271,25.85696],[-80.180141,25.856907],[-80.180054,25.856899],[-80.17986,25.856911],[-80.179728,25.85694],[-80.179652,25.856968],[-80.179556,25.857031],[-80.179314,25.857293],[-80.179136,25.857514],[-80.179079,25.857605],[-80.17901,25.857756],[-80.178864,25.857998],[-80.178803,25.858096],[-80.178687,25.858234],[-80.178426,25.858443],[-80.178078,25.858681],[-80.17773,25.858895],[-80.177608,25.858988],[-80.17751,25.85904],[-80.177411,25.85908],[-80.177234,25.859117],[-80.177001,25.859135],[-80.176884,25.859118],[-80.176786,25.859064],[-80.176661,25.85894],[-80.17661,25.858859],[-80.176549,25.858675],[-80.176501,25.858477],[-80.176505,25.858353],[-80.176584,25.857995],[-80.176622,25.857854],[-80.176693,25.857688],[-80.176768,25.857547],[-80.176956,25.857281],[-80.177083,25.857144],[-80.177388,25.856872],[-80.17751,25.856752],[-80.177709,25.856479],[-80.177788,25.856341],[-80.177812,25.856278],[-80.177839,25.856184],[-80.177864,25.856048],[-80.177912,25.855909],[-80.177938,25.855667],[-80.177933,25.855537],[-80.177918,25.85545],[-80.177845,25.855157],[-80.177804,25.855036],[-80.17766,25.854719],[-80.177621,25.854607],[-80.177581,25.85445],[-80.177573,25.85433],[-80.177598,25.854209],[-80.17766,25.854054],[-80.177736,25.853765],[-80.17777,25.853665],[-80.177834,25.853515],[-80.177943,25.853297],[-80.17802,25.853083],[-80.178078,25.852859],[-80.178112,25.85263],[-80.178172,25.852432],[-80.178278,25.852241],[-80.178346,25.852071],[-80.178378,25.851899],[-80.178387,25.851773],[-80.17838,25.851701],[-80.17831,25.85147],[-80.178296,25.851372],[-80.178312,25.851278],[-80.178356,25.851186],[-80.178387,25.851086],[-80.178388,25.850981],[-80.178374,25.850772],[-80.178383,25.850622],[-80.17841,25.850449],[-80.178471,25.850225],[-80.178502,25.850028],[-80.178515,25.849979],[-80.178588,25.849823],[-80.178765,25.849504],[-80.179234,25.848768],[-80.179388,25.848549],[-80.179405,25.848499],[-80.179422,25.848403],[-80.179423,25.848313],[-80.179416,25.848263],[-80.179396,25.848212],[-80.179345,25.848134],[-80.17919,25.847974],[-80.179029,25.847866],[-80.178973,25.847846],[-80.178865,25.847814],[-80.178537,25.847738],[-80.178431,25.847699],[-80.178384,25.847677],[-80.178294,25.847609],[-80.178187,25.847496],[-80.178102,25.84743],[-80.178006,25.847393],[-80.177951,25.847383],[-80.177901,25.847388],[-80.177866,25.847428],[-80.17786,25.847473],[-80.177857,25.847818],[-80.177841,25.847961],[-80.177801,25.8481],[-80.177756,25.848199],[-80.177713,25.848341],[-80.177712,25.848451],[-80.177748,25.8486],[-80.177762,25.848704],[-80.177766,25.848876],[-80.177758,25.848928],[-80.177731,25.849019],[-80.177616,25.84926],[-80.177552,25.849449],[-80.177518,25.849595],[-80.177446,25.850011],[-80.177449,25.850244],[-80.177468,25.850424],[-80.177478,25.85076],[-80.177461,25.850972],[-80.177401,25.851291],[-80.177387,25.851472],[-80.177402,25.851587],[-80.177476,25.851831],[-80.17748,25.851897],[-80.177462,25.852061],[-80.177442,25.852155],[-80.17736,25.852428],[-80.177262,25.852691],[-80.177234,25.852796],[-80.177225,25.852892],[-80.177234,25.853049],[-80.177223,25.853121],[-80.177183,25.853288],[-80.177114,25.853437],[-80.176779,25.854],[-80.176428,25.854538],[-80.17629,25.854798],[-80.176143,25.855042],[-80.176095,25.855155],[-80.176066,25.855274],[-80.176075,25.855436],[-80.176121,25.855546],[-80.176168,25.855607],[-80.176491,25.855919],[-80.176686,25.856154],[-80.176723,25.856226],[-80.176741,25.856285],[-80.176737,25.856376],[-80.176708,25.856449],[-80.176659,25.856534],[-80.176612,25.856584],[-80.176549,25.85663],[-80.176434,25.856666],[-80.176114,25.856688],[-80.176044,25.856703],[-80.175994,25.85672],[-80.175954,25.856744],[-80.175902,25.85681],[-80.175847,25.856938],[-80.175832,25.857006],[-80.175823,25.857106],[-80.175829,25.8573],[-80.175783,25.8575],[-80.175751,25.857563],[-80.175692,25.857639],[-80.175448,25.857873],[-80.17537,25.85798],[-80.175331,25.858069],[-80.175299,25.858168],[-80.17516,25.858747],[-80.175122,25.85885],[-80.17508,25.85894],[-80.174946,25.85917],[-80.174823,25.859357],[-80.174721,25.859537],[-80.174697,25.859598],[-80.17468,25.85968],[-80.174684,25.859746],[-80.174693,25.859779],[-80.174722,25.859834],[-80.174788,25.859908],[-80.174851,25.859959],[-80.174955,25.860024],[-80.175222,25.860163],[-80.175312,25.860221],[-80.175423,25.860326],[-80.175499,25.860443],[-80.175538,25.860543],[-80.175558,25.860663],[-80.17555,25.860905],[-80.175563,25.861043],[-80.175572,25.861098],[-80.175626,25.861251],[-80.175678,25.861334],[-80.17572,25.861382],[-80.175899,25.861547],[-80.17597,25.861623],[-80.176046,25.861736],[-80.176115,25.861883],[-80.176132,25.861944],[-80.176134,25.862015],[-80.176095,25.862306],[-80.176095,25.862371],[-80.176129,25.862494],[-80.176217,25.862672],[-80.176225,25.862707],[-80.176222,25.862775],[-80.17621,25.862807],[-80.176167,25.862849],[-80.176129,25.86286],[-80.176094,25.862856],[-80.176007,25.862817],[-80.175807,25.862674],[-80.175746,25.86265],[-80.175705,25.86265],[-80.175635,25.862665],[-80.175498,25.862738],[-80.175383,25.862817],[-80.175193,25.862984],[-80.175131,25.86302],[-80.175097,25.863033],[-80.175029,25.86303],[-80.17497,25.863008],[-80.174914,25.862966],[-80.174889,25.862933],[-80.174873,25.862893],[-80.174876,25.862794],[-80.174916,25.862703],[-80.175016,25.862542],[-80.17504,25.862476],[-80.175043,25.862442],[-80.175018,25.862294],[-80.175015,25.862227],[-80.175046,25.862019],[-80.1751,25.861854],[-80.17523,25.86153],[-80.175257,25.861425],[-80.175258,25.86134],[-80.175235,25.861284],[-80.175169,25.861214],[-80.175109,25.861182],[-80.174981,25.861146],[-80.174821,25.861152],[-80.174757,25.86118],[-80.174645,25.861262],[-80.174561,25.861363],[-80.174421,25.861569],[-80.174346,25.861722],[-80.174308,25.861833],[-80.174282,25.861974],[-80.174238,25.862355],[-80.174211,25.862518],[-80.173983,25.863537],[-80.173911,25.863758],[-80.173748,25.864147],[-80.173636,25.864374],[-80.173502,25.864691],[-80.173428,25.864843],[-80.173317,25.865032],[-80.17318,25.86523],[-80.173103,25.865359],[-80.173002,25.865576],[-80.172898,25.865882],[-80.172722,25.866207],[-80.172641,25.866407],[-80.17247,25.867021],[-80.172406,25.867343],[-80.172393,25.867504],[-80.172393,25.867603],[-80.172434,25.867818],[-80.17244,25.867928],[-80.172435,25.868038],[-80.172416,25.868136],[-80.172375,25.868229],[-80.172152,25.868543],[-80.171916,25.868897],[-80.171778,25.869132],[-80.171632,25.869408],[-80.171604,25.869507],[-80.17158,25.869645],[-80.17152,25.86986],[-80.171348,25.870344],[-80.171273,25.870583],[-80.171222,25.870917],[-80.171236,25.871039],[-80.171264,25.871098],[-80.171288,25.871124],[-80.171367,25.871177],[-80.171517,25.871212],[-80.171651,25.871228],[-80.17182,25.871227],[-80.171996,25.871197],[-80.17215,25.871146],[-80.172195,25.87114],[-80.17255,25.871115],[-80.172857,25.871126],[-80.172917,25.871105],[-80.173018,25.871023],[-80.173091,25.870913],[-80.17319,25.870721],[-80.173252,25.870646],[-80.173318,25.870591],[-80.173362,25.870541],[-80.17339,25.870493],[-80.173407,25.870434],[-80.173414,25.870373],[-80.173413,25.870215],[-80.173375,25.869879],[-80.173373,25.869718],[-80.173396,25.869347],[-80.173404,25.8689],[-80.173487,25.868384],[-80.173574,25.868021],[-80.173621,25.867896],[-80.173706,25.867706],[-80.173908,25.867389],[-80.174039,25.867225],[-80.17409,25.867181],[-80.174467,25.866911],[-80.174795,25.866727],[-80.174981,25.866601],[-80.175249,25.86636],[-80.175398,25.866202],[-80.175504,25.866075],[-80.175584,25.865967],[-80.175656,25.865845],[-80.1757,25.865793],[-80.175876,25.865635],[-80.176006,25.865498],[-80.176145,25.865399],[-80.176296,25.865319],[-80.176432,25.865275],[-80.176703,25.865206],[-80.176956,25.865191],[-80.177132,25.865203],[-80.177232,25.86523],[-80.177317,25.865276],[-80.177366,25.865323],[-80.177398,25.865373],[-80.17746,25.865524],[-80.177497,25.865663],[-80.177506,25.865735],[-80.177478,25.866295],[-80.177444,25.866521],[-80.177438,25.866689],[-80.177478,25.86698],[-80.177526,25.867122],[-80.177635,25.867324],[-80.177711,25.867438],[-80.177772,25.86751],[-80.177874,25.867615],[-80.178183,25.867832],[-80.178266,25.867908],[-80.178373,25.868045],[-80.178481,25.868259],[-80.178538,25.868345],[-80.178655,25.868486],[-80.178872,25.868687],[-80.17878,25.868461],[-80.178721,25.868277],[-80.178687,25.868139],[-80.17867,25.867994],[-80.178624,25.867894],[-80.178579,25.867812],[-80.178509,25.867708],[-80.178159,25.867306],[-80.178038,25.867156],[-80.177999,25.867093],[-80.177963,25.866992],[-80.177949,25.866861],[-80.17795,25.866721],[-80.177962,25.866649],[-80.177993,25.866539],[-80.178144,25.866302],[-80.178224,25.866225],[-80.178326,25.866144],[-80.178393,25.866111],[-80.178466,25.866091],[-80.178732,25.866058],[-80.179141,25.866055],[-80.179537,25.866035],[-80.179679,25.866058],[-80.179863,25.866127],[-80.179989,25.866181],[-80.180065,25.866223],[-80.180121,25.866264],[-80.180211,25.866365],[-80.180277,25.866467],[-80.1803,25.866525],[-80.180317,25.866605],[-80.180317,25.866767],[-80.180333,25.866862],[-80.180385,25.86697],[-80.180473,25.867059],[-80.180606,25.867114],[-80.180783,25.867155],[-80.180897,25.867156],[-80.181036,25.86714],[-80.181145,25.867112],[-80.181178,25.867092],[-80.181369,25.866924],[-80.181388,25.866897],[-80.183093,25.863243],[-80.183424,25.862799],[-80.183548,25.862615],[-80.183594,25.862513],[-80.183559,25.862503],[-80.183493,25.862509],[-80.183387,25.862532],[-80.183246,25.862577],[-80.182894,25.862811],[-80.182797,25.862854],[-80.182653,25.862875],[-80.182546,25.862879],[-80.182432,25.862854],[-80.182301,25.862761],[-80.181957,25.862385],[-80.181732,25.861944],[-80.181682,25.861864],[-80.181625,25.861824],[-80.181586,25.861808],[-80.181551,25.861798],[-80.181483,25.861803],[-80.181442,25.861825],[-80.181418,25.861851],[-80.181388,25.861906],[-80.181346,25.862011],[-80.181261,25.862295],[-80.181208,25.862674],[-80.181135,25.862964],[-80.181021,25.863227],[-80.180938,25.86337],[-80.180819,25.86353],[-80.180657,25.863718],[-80.180492,25.863879],[-80.180439,25.863921],[-80.180255,25.864037],[-80.180123,25.86407],[-80.180047,25.864071],[-80.180011,25.864061],[-80.179839,25.863993],[-80.179769,25.863957],[-80.179616,25.863832],[-80.179502,25.863708],[-80.179321,25.863556],[-80.179161,25.863456],[-80.179006,25.863381],[-80.178771,25.863291],[-80.178487,25.863203],[-80.178222,25.863171],[-80.177917,25.863154],[-80.177712,25.863113],[-80.177601,25.863049],[-80.177536,25.862997],[-80.177472,25.862919],[-80.177414,25.862807],[-80.177386,25.862739],[-80.177363,25.862637],[-80.177338,25.862464],[-80.177297,25.862266],[-80.177297,25.862176],[-80.177383,25.861522],[-80.177538,25.860863],[-80.177575,25.860739],[-80.177637,25.860574],[-80.177866,25.860011],[-80.178006,25.859763],[-80.178517,25.858923],[-80.178716,25.858579],[-80.178917,25.858265],[-80.17912,25.857919],[-80.179328,25.857601],[-80.179474,25.857361],[-80.179575,25.857236],[-80.179658,25.857158],[-80.179723,25.857118],[-80.179818,25.857084],[-80.179851,25.857083],[-80.179923,25.8571],[-80.179988,25.857134],[-80.180125,25.85732],[-80.180295,25.857665],[-80.180329,25.857807],[-80.180432,25.858048],[-80.180511,25.85816],[-80.180579,25.858235],[-80.18073,25.858368],[-80.180767,25.858422],[-80.180848,25.858601],[-80.180896,25.858747],[-80.180957,25.8589],[-80.180988,25.858956],[-80.181047,25.859032],[-80.181222,25.859216],[-80.181441,25.859368],[-80.181575,25.859436],[-80.181865,25.859525],[-80.181932,25.859572],[-80.181961,25.859634],[-80.181959,25.85967],[-80.181891,25.8599],[-80.181883,25.859956],[-80.181894,25.859983],[-80.181935,25.860026],[-80.181964,25.860035],[-80.182031,25.860038],[-80.182067,25.860031],[-80.182161,25.859995],[-80.182229,25.859955],[-80.182279,25.859912],[-80.182355,25.85982],[-80.182518,25.859653],[-80.1826,25.85958],[-80.182694,25.859525],[-80.182762,25.859498],[-80.182824,25.859454],[-80.182949,25.859313],[-80.183141,25.859024],[-80.183293,25.858821],[-80.183339,25.858771],[-80.183405,25.858723],[-80.183443,25.858705],[-80.183516,25.85868],[-80.183637,25.858662],[-80.183749,25.858659],[-80.183853,25.858671],[-80.184104,25.858752],[-80.184267,25.858854],[-80.184359,25.858903],[-80.184485,25.858938],[-80.184553,25.858943],[-80.184764,25.858933],[-80.184909,25.85891],[-80.185339,25.858777],[-80.185475,25.858716],[-80.185858,25.857881],[-80.185811,25.857796],[-80.185786,25.857769],[-80.185268,25.857258],[-80.185209,25.857173],[-80.185169,25.857091],[-80.185164,25.857057],[-80.185173,25.856981],[-80.185223,25.856904],[-80.185283,25.85685],[-80.185392,25.856799],[-80.185424,25.856791],[-80.185465,25.856794],[-80.185533,25.856815],[-80.185615,25.856859],[-80.185743,25.856962],[-80.185855,25.857035],[-80.186189,25.857161],[-80.186946,25.855512],[-80.186935,25.855502],[-80.186904,25.855502],[-80.186721,25.855568],[-80.186619,25.855617],[-80.186545,25.855664],[-80.18634,25.855768],[-80.186092,25.85588],[-80.185831,25.855985],[-80.185351,25.856222],[-80.185065,25.85633],[-80.184925,25.856358],[-80.184681,25.856363],[-80.184605,25.856344],[-80.184517,25.856306],[-80.184494,25.85628],[-80.184489,25.856239],[-80.184528,25.856193],[-80.184613,25.856138],[-80.184961,25.855943],[-80.185263,25.855744],[-80.185558,25.85559],[-80.18566,25.855525],[-80.18576,25.855418],[-80.185885,25.855201],[-80.185954,25.855112],[-80.18607,25.855018],[-80.186262,25.854897],[-80.186362,25.854842],[-80.186735,25.854677],[-80.186921,25.854606],[-80.187148,25.854548],[-80.187226,25.854518],[-80.187282,25.854483],[-80.187304,25.854458],[-80.18734,25.854371],[-80.187393,25.854153],[-80.187444,25.854026]],[[-80.178144,25.84805],[-80.178198,25.84804],[-80.17825,25.848044],[-80.178298,25.848059],[-80.178347,25.848089],[-80.178384,25.848129],[-80.178422,25.848172],[-80.178473,25.848256],[-80.178518,25.848362],[-80.178562,25.848534],[-80.178574,25.848815],[-80.178543,25.848963],[-80.178483,25.84911],[-80.178407,25.849276],[-80.178164,25.849749],[-80.178073,25.849983],[-80.178017,25.85042],[-80.177997,25.85071],[-80.178003,25.850997],[-80.178027,25.851255],[-80.178009,25.851404],[-80.178014,25.851455],[-80.178114,25.851705],[-80.178119,25.851784],[-80.1781,25.851893],[-80.177959,25.852273],[-80.177848,25.852528],[-80.177772,25.852783],[-80.17775,25.852904],[-80.177744,25.852998],[-80.177762,25.853254],[-80.177755,25.853315],[-80.177729,25.853414],[-80.177644,25.85363],[-80.177596,25.85373],[-80.177299,25.854272],[-80.177264,25.854365],[-80.177249,25.854436],[-80.177242,25.854496],[-80.177247,25.85458],[-80.177275,25.85467],[-80.177357,25.854805],[-80.177561,25.855064],[-80.177642,25.855202],[-80.177713,25.855366],[-80.177742,25.855463],[-80.177757,25.855568],[-80.177761,25.855671],[-80.177752,25.855772],[-80.177725,25.855865],[-80.177698,25.855921],[-80.177665,25.85598],[-80.177551,25.85612],[-80.177498,25.85616],[-80.177431,25.856183],[-80.177363,25.856169],[-80.177301,25.856133],[-80.177239,25.856076],[-80.177197,25.856024],[-80.176986,25.855605],[-80.176906,25.855484],[-80.176675,25.855203],[-80.176646,25.855149],[-80.176585,25.854969],[-80.176572,25.854892],[-80.176576,25.854797],[-80.176593,25.854719],[-80.176636,25.854598],[-80.176788,25.854276],[-80.176917,25.854029],[-80.177264,25.853458],[-80.177302,25.853345],[-80.177327,25.853038],[-80.177397,25.852689],[-80.177465,25.852488],[-80.177556,25.852349],[-80.177598,25.852236],[-80.177611,25.852158],[-80.177611,25.851872],[-80.177601,25.851774],[-80.177529,25.851497],[-80.17752,25.851342],[-80.177554,25.850851],[-80.177588,25.850703],[-80.177637,25.850577],[-80.177658,25.85047],[-80.177661,25.8504],[-80.177603,25.850111],[-80.177575,25.849918],[-80.177596,25.849694],[-80.177617,25.849596],[-80.177648,25.849499],[-80.177797,25.849123],[-80.177844,25.848969],[-80.177891,25.848665],[-80.177911,25.848461],[-80.177974,25.84822],[-80.177992,25.848175],[-80.178056,25.848093],[-80.178095,25.848066],[-80.178144,25.84805]]]},"properties":{"FLD_ZONE":"X","ZONE_SUBTY":"0.2 PCT ANNUAL CHANCE FLOOD HAZARD","STATIC_BFE":-9999,"SFHA_TF":"F"}}]}},"source":{"name":"FEMA National Flood Hazard Layer","kind":"official","vintage":"current federal record","attribution":"FEMA"}},"wetlands":{"object":"location_section","layer":"wetlands","name":"Wetlands (NWI)","category":"classification","status":"available","summary":"No mapped wetlands at this spot.","data":{"intersects_parcel":null,"is_on_wetland":false,"evaluated_against":"point","parcel_coverage_pct":null,"wetlands":[],"geometry":{"type":"FeatureCollection","features":[]}},"source":{"name":"USFWS National Wetlands Inventory","kind":"official","vintage":"current federal record","attribution":"U.S. Fish & Wildlife Service"}},"structures":{"object":"location_section","layer":"structures","name":"Buildings","category":"property","status":"available","summary":"No mapped building at this spot.","data":{"building_count":0,"total_footprint_m2":null,"county_record":null,"buildings":[],"structure_attributes":[],"footprint_source":"USA Structures (ML-derived)","geometry":{"type":"FeatureCollection","features":[]}},"source":{"name":"USA Structures (FEMA/ORNL) + National Structure Inventory (USACE)","kind":"official","vintage":"current federal record","attribution":"FEMA / Oak Ridge National Laboratory / US Army Corps of Engineers","note":"Footprint geometry prefers OpenStreetMap surveyed outlines when present (USA Structures ML footprints otherwise — often visibly off). NSI year-built/foundation/first-floor values are modeled estimates — not an elevation certificate or permit record."}},"soils":{"object":"location_section","layer":"soils","name":"Soils (SSURGO)","category":"classification","status":"available","summary":"Urban land, 0 to 2 percent slopes.","data":{"soil_units":[{"map_unit":"Urban land, 0 to 2 percent slopes","symbol":"15","drainage_class":null,"hydrologic_group":null,"hydric_pct":6}],"evaluated_against":"point"},"source":{"name":"USDA SSURGO (Soil Data Access)","kind":"official","vintage":"current federal record","attribution":"USDA NRCS","note":"Map-unit level data (~1:24k survey) — not a geotechnical report."}},"code_basis":{"object":"location_section","layer":"code_basis","name":"Code basis","category":"classification","status":"not_covered","summary":"Code-basis values are carried for the Tampa–Orlando region and California so far.","data":null,"reason":"Code-basis values are carried for the Tampa–Orlando region and California so far.","hint":"Statewide county wind/climate tables extend this next.","source":{"name":"ASCE 7 / FBC county wind maps, IECC, NOAA Atlas 14 + FGS subsidence reports","kind":"official","attribution":"ICC / ASCE / NOAA / Florida Geological Survey","note":"Wind speed is the county-level Risk Category II value — confirm site-specific values (and exposure) with the ATC hazard maps for permit sets. Florida subsidence records are reported incidents, not verified sinkholes or a site-specific geotechnical assessment."}},"weather":{"object":"location_section","layer":"weather","name":"Current conditions","category":"conditions","status":"available","summary":"Not raining. Partly cloudy, 31°C (87°F), wind 5 km/h from the ESE. Air quality good (AQI 45). UV index 8.","data":{"is_raining":false,"precipitation_mm":0,"precipitation_interval_seconds":900,"conditions":"Partly cloudy","temperature_c":30.8,"temperature_f":87,"humidity_pct":75,"pressure_hpa":1013.1,"cloud_cover_pct":74,"uv_index":8.1,"is_day":true,"wind_speed_kmh":4.5,"wind_speed_mph":2.8,"wind_gusts_kmh":4.7,"wind_direction_deg":104,"wind_direction":"ESE","air_quality":{"us_aqi":45,"pm2_5":7.1,"pm10":9.2,"ozone":73}},"source":{"name":"Open-Meteo","kind":"live","vintage":"live","attribution":"open-meteo.com","note":"Nearest model grid cell (~1–2 km from the point)."}},"elevation":{"object":"location_section","layer":"elevation","name":"Elevation","category":"geography","status":"available","summary":"Roughly 10 ft (3 m) above sea level — a satellite estimate, not a survey.","data":{"elevation_m":3,"elevation_ft":10,"datum":"EGM2008","model":"surface (includes buildings and canopy)","resolution_m":90,"terrain_status":"no_parcel","terrain":null},"source":{"name":"Copernicus GLO-90 DEM (via Open-Meteo) + USGS 3DEP","kind":"live","vintage":"GLO-90 / 3DEP current","attribution":"open-meteo.com / U.S. Geological Survey","note":"Point value is a ~90 m satellite SURFACE model (EGM2008) — do not compare against NAVD88 base flood elevations without a survey. Parcel terrain/contours are USGS 3DEP bare-earth (NAVD88 ft, ~10 m grid) — design-grade context, not a topographic survey."}},"boundaries":{"object":"location_section","layer":"boundaries","name":"County & ZIP","category":"geography","status":"available","summary":"Miami-Dade County, Florida · ZIP 33138.","data":{"state":"FL","county":{"name":"Miami-Dade","fips":"12086","local_code":null},"zip":"33138","precision":"boundary_file"},"source":{"name":"US Census cartographic boundaries","kind":"archive","vintage":"2020","attribution":"US Census Bureau","note":"Generalized (~50 m) boundaries — parcel data wins near edges."}},"market":{"object":"location_section","layer":"market","name":"Market observations","category":"property","status":"not_covered","summary":"Market observations bind to parcels, and no parcel plane covers this point yet.","data":null,"reason":"Market observations bind to parcels, and no parcel plane covers this point yet.","source":{"name":"Pascal market observations (Zillow via Bright Data)","kind":"archive","attribution":"Pascal","note":"Estimates are Zillow-derived signals, not appraisals."}},"tax":{"object":"location_section","layer":"tax","name":"Tax assessment","category":"property","status":"not_covered","summary":"Assessment data binds to parcels, and no parcel plane covers this point yet.","data":null,"reason":"Assessment data binds to parcels, and no parcel plane covers this point yet.","source":{"name":"Pascal market observations (Zillow via Bright Data)","kind":"archive","attribution":"Pascal","note":"Estimates are Zillow-derived signals, not appraisals."}},"zoning":{"object":"location_section","layer":"zoning","name":"Zoning","category":"classification","status":"not_available","summary":"No zoning district answered here — likely a municipality whose GIS is not connected yet (future land use: LOW DENSITY RESIDENTIAL (LDR) 2.5-6 DU/AC).","data":null,"reason":"No zoning district answered here — likely a municipality whose GIS is not connected yet (future land use: LOW DENSITY RESIDENTIAL (LDR) 2.5-6 DU/AC).","hint":"City-by-city coverage grows; the county layers only answer unincorporated land.","source":{"name":"County / city zoning GIS","kind":"official","vintage":"current jurisdiction record","attribution":"Local planning departments","note":"District comes from the jurisdiction GIS; dimensional numbers (setbacks, height, FAR) from the land development code — dimensional_source names the exact section. Verify against the governing text for permit sets."}},"permits":{"object":"location_section","layer":"permits","name":"Permits","category":"property","status":"not_covered","summary":"Permit feeds are connected for Tampa/Hillsborough, Orlando, Los Angeles, and San Francisco so far.","data":null,"reason":"Permit feeds are connected for Tampa/Hillsborough, Orlando, Los Angeles, and San Francisco so far.","hint":"More jurisdictions land as their feeds are verified.","source":{"name":"City / county permit feeds","kind":"official","attribution":"Local building departments","note":"Permits within ~120 m of the point — geocoded permit points, so \"on or near\" the parcel."}},"utilities":{"object":"location_section","layer":"utilities","name":"Utilities","category":"geography","status":"available","summary":"Electric: FLORIDA POWER & LIGHT CO.","data":{"wastewater":null,"wastewater_confidence":null,"wastewater_updated":null,"drinking_water":null,"electric_providers":[{"name":"FLORIDA POWER & LIGHT CO","type":"INVESTOR OWNED"}]},"source":{"name":"FL Water Management Inventory + EIA service territories","kind":"official","attribution":"FDOH / EIA","note":"Sewer/septic classes are inventory-based (\"known\" vs \"likely\") — confirm with the utility before design."}}},"request_id":"87b60939-0b0c-4a80-8d3a-22e729cc72f9"}