@pascal-app/nodes 1.0.0 → 1.0.3

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 (439) hide show
  1. package/dist/block/definition.d.ts.map +1 -1
  2. package/dist/block/definition.js +4 -1
  3. package/dist/block/face-host.d.ts.map +1 -1
  4. package/dist/block/face-host.js +19 -2
  5. package/dist/block/hosted-edit.d.ts +13 -0
  6. package/dist/block/hosted-edit.d.ts.map +1 -0
  7. package/dist/block/hosted-edit.js +205 -0
  8. package/dist/block/last-operation.d.ts +1 -1
  9. package/dist/block/last-operation.d.ts.map +1 -1
  10. package/dist/block/last-operation.js +6 -4
  11. package/dist/block/modal-session.d.ts +2 -1
  12. package/dist/block/modal-session.d.ts.map +1 -1
  13. package/dist/block/modal-session.js +2 -2
  14. package/dist/block/selection.d.ts.map +1 -1
  15. package/dist/block/selection.js +82 -24
  16. package/dist/block/surface.d.ts +4 -0
  17. package/dist/block/surface.d.ts.map +1 -0
  18. package/dist/block/surface.js +54 -0
  19. package/dist/block/use-block-face-operation.d.ts +2 -2
  20. package/dist/block/use-block-face-operation.d.ts.map +1 -1
  21. package/dist/block/use-block-face-operation.js +25 -11
  22. package/dist/box-vent/definition.d.ts.map +1 -1
  23. package/dist/box-vent/definition.js +1 -0
  24. package/dist/box-vent/panel.js +4 -4
  25. package/dist/building/renderer.d.ts.map +1 -1
  26. package/dist/building/renderer.js +1 -1
  27. package/dist/cabinet/appliance-layout.d.ts +26 -0
  28. package/dist/cabinet/appliance-layout.d.ts.map +1 -0
  29. package/dist/cabinet/appliance-layout.js +52 -0
  30. package/dist/cabinet/countertop-layout.d.ts +173 -0
  31. package/dist/cabinet/countertop-layout.d.ts.map +1 -0
  32. package/dist/cabinet/countertop-layout.js +80 -0
  33. package/dist/cabinet/definition.d.ts.map +1 -1
  34. package/dist/cabinet/definition.js +17 -8
  35. package/dist/cabinet/geometry/cooktop.d.ts.map +1 -1
  36. package/dist/cabinet/geometry/cooktop.js +2 -2
  37. package/dist/cabinet/geometry/run.d.ts.map +1 -1
  38. package/dist/cabinet/geometry/run.js +10 -71
  39. package/dist/cabinet/geometry/sink.d.ts +2 -12
  40. package/dist/cabinet/geometry/sink.d.ts.map +1 -1
  41. package/dist/cabinet/geometry/sink.js +8 -39
  42. package/dist/cabinet/hosted-resize.d.ts +5 -0
  43. package/dist/cabinet/hosted-resize.d.ts.map +1 -0
  44. package/dist/cabinet/hosted-resize.js +14 -0
  45. package/dist/cabinet/placement-snap.d.ts.map +1 -1
  46. package/dist/cabinet/placement-snap.js +4 -2
  47. package/dist/cabinet/run-layout.d.ts +8 -1
  48. package/dist/cabinet/run-layout.d.ts.map +1 -1
  49. package/dist/cabinet/run-layout.js +22 -14
  50. package/dist/cabinet/run-ops.d.ts +3 -3
  51. package/dist/cabinet/run-ops.js +3 -3
  52. package/dist/cabinet/run-panel.d.ts +1 -1
  53. package/dist/cabinet/run-panel.d.ts.map +1 -1
  54. package/dist/cabinet/run-panel.js +16 -7
  55. package/dist/cabinet/surfaces.d.ts +5 -0
  56. package/dist/cabinet/surfaces.d.ts.map +1 -0
  57. package/dist/cabinet/surfaces.js +113 -0
  58. package/dist/cabinet/tool.d.ts.map +1 -1
  59. package/dist/cabinet/tool.js +8 -4
  60. package/dist/cabinet/tree-structure.d.ts.map +1 -1
  61. package/dist/cabinet/tree-structure.js +10 -9
  62. package/dist/ceiling/definition.d.ts.map +1 -1
  63. package/dist/ceiling/definition.js +6 -1
  64. package/dist/ceiling/floorplan-affordances.d.ts +4 -4
  65. package/dist/ceiling/panel.js +1 -1
  66. package/dist/ceiling/renderer.d.ts.map +1 -1
  67. package/dist/ceiling/renderer.js +3 -2
  68. package/dist/chimney/definition.d.ts.map +1 -1
  69. package/dist/chimney/definition.js +1 -0
  70. package/dist/chimney/panel.js +9 -9
  71. package/dist/column/definition.d.ts.map +1 -1
  72. package/dist/column/definition.js +10 -3
  73. package/dist/column/floorplan-affordances.d.ts.map +1 -1
  74. package/dist/column/floorplan-affordances.js +6 -1
  75. package/dist/column/floorplan.d.ts.map +1 -1
  76. package/dist/column/floorplan.js +23 -11
  77. package/dist/column/hosted-resize.d.ts +116 -0
  78. package/dist/column/hosted-resize.d.ts.map +1 -0
  79. package/dist/column/hosted-resize.js +9 -0
  80. package/dist/column/panel.d.ts.map +1 -1
  81. package/dist/column/panel.js +6 -3
  82. package/dist/column/renderer.d.ts.map +1 -1
  83. package/dist/column/renderer.js +25 -103
  84. package/dist/column/shape.d.ts +22 -0
  85. package/dist/column/shape.d.ts.map +1 -0
  86. package/dist/column/shape.js +120 -0
  87. package/dist/column/surface.d.ts +4 -0
  88. package/dist/column/surface.d.ts.map +1 -0
  89. package/dist/column/surface.js +66 -0
  90. package/dist/cupola/definition.d.ts.map +1 -1
  91. package/dist/cupola/definition.js +1 -0
  92. package/dist/cupola/panel.js +1 -1
  93. package/dist/door/definition.d.ts.map +1 -1
  94. package/dist/door/definition.js +40 -1
  95. package/dist/door/door-math.d.ts +1 -1
  96. package/dist/door/door-math.d.ts.map +1 -1
  97. package/dist/door/door-math.js +7 -10
  98. package/dist/door/floorplan-affordances.d.ts.map +1 -1
  99. package/dist/door/floorplan-affordances.js +8 -12
  100. package/dist/door/move-tool.d.ts.map +1 -1
  101. package/dist/door/move-tool.js +3 -4
  102. package/dist/door/panel.d.ts.map +1 -1
  103. package/dist/door/panel.js +28 -57
  104. package/dist/door/tool.d.ts.map +1 -1
  105. package/dist/door/tool.js +20 -2
  106. package/dist/dormer/definition.d.ts.map +1 -1
  107. package/dist/dormer/definition.js +1 -0
  108. package/dist/dormer/panel-position-section.js +2 -2
  109. package/dist/dormer/panel.js +1 -1
  110. package/dist/downspout/definition.d.ts.map +1 -1
  111. package/dist/downspout/definition.js +1 -0
  112. package/dist/duct-segment/parametrics.d.ts.map +1 -1
  113. package/dist/duct-segment/parametrics.js +5 -1
  114. package/dist/duct-segment/tool.d.ts +1 -0
  115. package/dist/duct-segment/tool.d.ts.map +1 -1
  116. package/dist/duct-segment/tool.js +21 -8
  117. package/dist/duct-terminal/tool.d.ts.map +1 -1
  118. package/dist/duct-terminal/tool.js +77 -8
  119. package/dist/elevator/definition.d.ts.map +1 -1
  120. package/dist/elevator/definition.js +2 -0
  121. package/dist/elevator/parametrics.d.ts.map +1 -1
  122. package/dist/elevator/parametrics.js +98 -1
  123. package/dist/eyebrow-vent/definition.d.ts.map +1 -1
  124. package/dist/eyebrow-vent/definition.js +1 -0
  125. package/dist/eyebrow-vent/panel.js +1 -1
  126. package/dist/fence/definition.d.ts.map +1 -1
  127. package/dist/fence/definition.js +1 -0
  128. package/dist/fence/inspector-editors.js +1 -1
  129. package/dist/fence/tool.js +2 -2
  130. package/dist/guide/definition.d.ts.map +1 -1
  131. package/dist/guide/definition.js +1 -0
  132. package/dist/gutter/definition.d.ts.map +1 -1
  133. package/dist/gutter/definition.js +1 -0
  134. package/dist/hvac-equipment/tool.d.ts.map +1 -1
  135. package/dist/hvac-equipment/tool.js +8 -2
  136. package/dist/imported-mesh/definition.d.ts +5 -0
  137. package/dist/imported-mesh/definition.d.ts.map +1 -0
  138. package/dist/imported-mesh/definition.js +38 -0
  139. package/dist/imported-mesh/floorplan.d.ts +4 -0
  140. package/dist/imported-mesh/floorplan.d.ts.map +1 -0
  141. package/dist/imported-mesh/floorplan.js +34 -0
  142. package/dist/imported-mesh/geometry.d.ts +5 -0
  143. package/dist/imported-mesh/geometry.d.ts.map +1 -0
  144. package/dist/imported-mesh/geometry.js +34 -0
  145. package/dist/imported-mesh/index.d.ts +4 -0
  146. package/dist/imported-mesh/index.d.ts.map +1 -0
  147. package/dist/imported-mesh/index.js +3 -0
  148. package/dist/imported-mesh/schema.d.ts +2 -0
  149. package/dist/imported-mesh/schema.d.ts.map +1 -0
  150. package/dist/imported-mesh/schema.js +1 -0
  151. package/dist/index.d.ts +2 -0
  152. package/dist/index.d.ts.map +1 -1
  153. package/dist/index.js +8 -0
  154. package/dist/item/__fixtures__/main-floorplan.d.ts +26 -0
  155. package/dist/item/__fixtures__/main-floorplan.d.ts.map +1 -0
  156. package/dist/item/__fixtures__/main-floorplan.js +297 -0
  157. package/dist/item/definition.d.ts.map +1 -1
  158. package/dist/item/definition.js +3 -1
  159. package/dist/item/floorplan-move.d.ts +9 -1
  160. package/dist/item/floorplan-move.d.ts.map +1 -1
  161. package/dist/item/floorplan-move.js +231 -99
  162. package/dist/item/floorplan.d.ts +22 -0
  163. package/dist/item/floorplan.d.ts.map +1 -1
  164. package/dist/item/floorplan.js +72 -2
  165. package/dist/item/move-tool.d.ts +1 -1
  166. package/dist/item/move-tool.d.ts.map +1 -1
  167. package/dist/item/move-tool.js +15 -7
  168. package/dist/item/panel.js +1 -1
  169. package/dist/item/renderer.d.ts.map +1 -1
  170. package/dist/item/renderer.js +8 -2
  171. package/dist/level/renderer.js +1 -1
  172. package/dist/lineset/tool.d.ts.map +1 -1
  173. package/dist/lineset/tool.js +1 -0
  174. package/dist/liquid-line/tool.d.ts.map +1 -1
  175. package/dist/liquid-line/tool.js +5 -1
  176. package/dist/measurement/definition.d.ts.map +1 -1
  177. package/dist/measurement/definition.js +1 -0
  178. package/dist/pipe-segment/parametrics.d.ts.map +1 -1
  179. package/dist/pipe-segment/parametrics.js +5 -1
  180. package/dist/pipe-segment/tool.d.ts.map +1 -1
  181. package/dist/pipe-segment/tool.js +14 -3
  182. package/dist/pipe-trap/tool.d.ts.map +1 -1
  183. package/dist/pipe-trap/tool.js +7 -8
  184. package/dist/procedural-item/definition.d.ts +4 -0
  185. package/dist/procedural-item/definition.d.ts.map +1 -0
  186. package/dist/procedural-item/definition.js +257 -0
  187. package/dist/procedural-item/geometry.d.ts +31 -0
  188. package/dist/procedural-item/geometry.d.ts.map +1 -0
  189. package/dist/procedural-item/geometry.js +88 -0
  190. package/dist/procedural-item/index.d.ts +3 -0
  191. package/dist/procedural-item/index.d.ts.map +1 -0
  192. package/dist/procedural-item/index.js +2 -0
  193. package/dist/procedural-item/move-session.d.ts +15 -0
  194. package/dist/procedural-item/move-session.d.ts.map +1 -0
  195. package/dist/procedural-item/move-session.js +197 -0
  196. package/dist/procedural-item/move-tool.d.ts +5 -0
  197. package/dist/procedural-item/move-tool.d.ts.map +1 -0
  198. package/dist/procedural-item/move-tool.js +193 -0
  199. package/dist/procedural-item/renderer.d.ts +5 -0
  200. package/dist/procedural-item/renderer.d.ts.map +1 -0
  201. package/dist/procedural-item/renderer.js +66 -0
  202. package/dist/ridge-vent/definition.d.ts.map +1 -1
  203. package/dist/ridge-vent/definition.js +1 -0
  204. package/dist/ridge-vent/panel.js +4 -4
  205. package/dist/roof/definition.d.ts.map +1 -1
  206. package/dist/roof/definition.js +4 -1
  207. package/dist/roof/panel-model.d.ts +4 -0
  208. package/dist/roof/panel-model.d.ts.map +1 -0
  209. package/dist/roof/panel-model.js +151 -0
  210. package/dist/roof/panel.d.ts.map +1 -1
  211. package/dist/roof/panel.js +9 -8
  212. package/dist/roof/parametrics.d.ts.map +1 -1
  213. package/dist/roof/parametrics.js +16 -1
  214. package/dist/roof-segment/definition.d.ts.map +1 -1
  215. package/dist/roof-segment/definition.js +1 -0
  216. package/dist/roof-segment/panel.d.ts.map +1 -1
  217. package/dist/roof-segment/panel.js +5 -5
  218. package/dist/roof-segment/parametrics.d.ts.map +1 -1
  219. package/dist/roof-segment/parametrics.js +176 -1
  220. package/dist/scan/definition.d.ts.map +1 -1
  221. package/dist/scan/definition.js +1 -0
  222. package/dist/shared/automatic-run-end-cap.d.ts +1 -0
  223. package/dist/shared/automatic-run-end-cap.d.ts.map +1 -1
  224. package/dist/shared/automatic-run-end-cap.js +10 -0
  225. package/dist/shared/commit-opening-move.d.ts +4 -0
  226. package/dist/shared/commit-opening-move.d.ts.map +1 -0
  227. package/dist/shared/commit-opening-move.js +9 -0
  228. package/dist/shared/curtain-opening-limits.d.ts +14 -0
  229. package/dist/shared/curtain-opening-limits.d.ts.map +1 -0
  230. package/dist/shared/curtain-opening-limits.js +53 -0
  231. package/dist/shared/distribution-run-tool.d.ts +10 -0
  232. package/dist/shared/distribution-run-tool.d.ts.map +1 -1
  233. package/dist/shared/distribution-run-tool.js +56 -11
  234. package/dist/shared/draft-axis-guides.d.ts +0 -6
  235. package/dist/shared/draft-axis-guides.d.ts.map +1 -1
  236. package/dist/shared/draft-axis-guides.js +1 -8
  237. package/dist/shared/hosted-resize.d.ts +12 -0
  238. package/dist/shared/hosted-resize.d.ts.map +1 -0
  239. package/dist/shared/hosted-resize.js +166 -0
  240. package/dist/shared/opening-grid-follow.d.ts +8 -0
  241. package/dist/shared/opening-grid-follow.d.ts.map +1 -0
  242. package/dist/shared/opening-grid-follow.js +12 -0
  243. package/dist/shared/opening-property-preview-host.d.ts +3 -0
  244. package/dist/shared/opening-property-preview-host.d.ts.map +1 -0
  245. package/dist/shared/opening-property-preview-host.js +21 -0
  246. package/dist/shared/opening-property-preview.d.ts +19 -0
  247. package/dist/shared/opening-property-preview.d.ts.map +1 -0
  248. package/dist/shared/opening-property-preview.js +99 -0
  249. package/dist/shared/panel-fields.d.ts +15 -0
  250. package/dist/shared/panel-fields.d.ts.map +1 -0
  251. package/dist/shared/panel-fields.js +31 -0
  252. package/dist/shared/resting-surface-plan.d.ts +4 -0
  253. package/dist/shared/resting-surface-plan.d.ts.map +1 -0
  254. package/dist/shared/resting-surface-plan.js +53 -0
  255. package/dist/shared/surface-counterparts.d.ts +12 -0
  256. package/dist/shared/surface-counterparts.d.ts.map +1 -0
  257. package/dist/shared/surface-counterparts.js +27 -0
  258. package/dist/shared/wall-attach-target.d.ts +1 -0
  259. package/dist/shared/wall-attach-target.d.ts.map +1 -1
  260. package/dist/shared/wall-attach-target.js +4 -1
  261. package/dist/shared/wall-event-from-grid.d.ts +5 -0
  262. package/dist/shared/wall-event-from-grid.d.ts.map +1 -0
  263. package/dist/shared/wall-event-from-grid.js +36 -0
  264. package/dist/shelf/definition.d.ts.map +1 -1
  265. package/dist/shelf/definition.js +5 -2
  266. package/dist/shelf/floorplan-affordances.d.ts.map +1 -1
  267. package/dist/shelf/floorplan-affordances.js +5 -3
  268. package/dist/shelf/floorplan-move.d.ts.map +1 -1
  269. package/dist/shelf/floorplan-move.js +3 -2
  270. package/dist/shelf/floorplan.d.ts.map +1 -1
  271. package/dist/shelf/floorplan.js +9 -2
  272. package/dist/shelf/geometry.d.ts.map +1 -1
  273. package/dist/shelf/geometry.js +2 -10
  274. package/dist/site/renderer.d.ts.map +1 -1
  275. package/dist/site/renderer.js +9 -2
  276. package/dist/skylight/definition.d.ts.map +1 -1
  277. package/dist/skylight/definition.js +1 -0
  278. package/dist/skylight/panel.js +6 -6
  279. package/dist/slab/definition.d.ts.map +1 -1
  280. package/dist/slab/definition.js +4 -0
  281. package/dist/slab/panel.js +1 -1
  282. package/dist/solar-panel/definition.d.ts.map +1 -1
  283. package/dist/solar-panel/definition.js +1 -0
  284. package/dist/solar-panel/panel.js +2 -2
  285. package/dist/spawn/definition.d.ts.map +1 -1
  286. package/dist/spawn/definition.js +1 -0
  287. package/dist/spawn/panel.js +1 -1
  288. package/dist/stair/definition.d.ts.map +1 -1
  289. package/dist/stair/definition.js +2 -0
  290. package/dist/stair/panel.d.ts.map +1 -1
  291. package/dist/stair/panel.js +9 -7
  292. package/dist/stair/parametrics.d.ts.map +1 -1
  293. package/dist/stair/parametrics.js +164 -1
  294. package/dist/stair-segment/definition.d.ts.map +1 -1
  295. package/dist/stair-segment/definition.js +1 -0
  296. package/dist/stair-segment/panel.js +4 -4
  297. package/dist/stair-segment/parametrics.d.ts.map +1 -1
  298. package/dist/stair-segment/parametrics.js +81 -1
  299. package/dist/turbine-vent/definition.d.ts.map +1 -1
  300. package/dist/turbine-vent/definition.js +1 -0
  301. package/dist/turbine-vent/panel.js +1 -1
  302. package/dist/unit/definition.d.ts +10 -0
  303. package/dist/unit/definition.d.ts.map +1 -0
  304. package/dist/unit/definition.js +38 -0
  305. package/dist/unit/index.d.ts +2 -0
  306. package/dist/unit/index.d.ts.map +1 -0
  307. package/dist/unit/index.js +1 -0
  308. package/dist/unit/parametrics.d.ts +3 -0
  309. package/dist/unit/parametrics.d.ts.map +1 -0
  310. package/dist/unit/parametrics.js +4 -0
  311. package/dist/unit/schema.d.ts +2 -0
  312. package/dist/unit/schema.d.ts.map +1 -0
  313. package/dist/unit/schema.js +1 -0
  314. package/dist/unit/unit-panel.d.ts +5 -0
  315. package/dist/unit/unit-panel.d.ts.map +1 -0
  316. package/dist/unit/unit-panel.js +61 -0
  317. package/dist/wall/actions.d.ts +3 -0
  318. package/dist/wall/actions.d.ts.map +1 -0
  319. package/dist/wall/actions.js +56 -0
  320. package/dist/wall/curtain-opening-frame.d.ts +14 -0
  321. package/dist/wall/curtain-opening-frame.d.ts.map +1 -0
  322. package/dist/wall/curtain-opening-frame.js +111 -0
  323. package/dist/wall/curtain-panel-highlight.d.ts +3 -0
  324. package/dist/wall/curtain-panel-highlight.d.ts.map +1 -0
  325. package/dist/wall/curtain-panel-highlight.js +113 -0
  326. package/dist/wall/curtain-wall-adapter.d.ts +3 -0
  327. package/dist/wall/curtain-wall-adapter.d.ts.map +1 -0
  328. package/dist/wall/curtain-wall-adapter.js +55 -0
  329. package/dist/wall/curtain-wall-floorplan.d.ts +3 -0
  330. package/dist/wall/curtain-wall-floorplan.d.ts.map +1 -0
  331. package/dist/wall/curtain-wall-floorplan.js +91 -0
  332. package/dist/wall/curtain-wall-geometry.d.ts +4 -0
  333. package/dist/wall/curtain-wall-geometry.d.ts.map +1 -0
  334. package/dist/wall/curtain-wall-geometry.js +226 -0
  335. package/dist/wall/curtain-wall-layout.d.ts +16 -0
  336. package/dist/wall/curtain-wall-layout.d.ts.map +1 -0
  337. package/dist/wall/curtain-wall-layout.js +176 -0
  338. package/dist/wall/curtain-wall-materials.d.ts +5 -0
  339. package/dist/wall/curtain-wall-materials.d.ts.map +1 -0
  340. package/dist/wall/curtain-wall-materials.js +55 -0
  341. package/dist/wall/curtain-wall-panel.d.ts +14 -0
  342. package/dist/wall/curtain-wall-panel.d.ts.map +1 -0
  343. package/dist/wall/curtain-wall-panel.js +167 -0
  344. package/dist/wall/curtain-wall-piece-geometry.d.ts +5 -0
  345. package/dist/wall/curtain-wall-piece-geometry.d.ts.map +1 -0
  346. package/dist/wall/curtain-wall-piece-geometry.js +220 -0
  347. package/dist/wall/curtain-wall-shadow.d.ts +4 -0
  348. package/dist/wall/curtain-wall-shadow.d.ts.map +1 -0
  349. package/dist/wall/curtain-wall-shadow.js +15 -0
  350. package/dist/wall/definition.d.ts +0 -15
  351. package/dist/wall/definition.d.ts.map +1 -1
  352. package/dist/wall/definition.js +65 -4
  353. package/dist/wall/drawing-mode.d.ts +12 -0
  354. package/dist/wall/drawing-mode.d.ts.map +1 -0
  355. package/dist/wall/drawing-mode.js +38 -0
  356. package/dist/wall/floorplan-tool.d.ts +4 -0
  357. package/dist/wall/floorplan-tool.d.ts.map +1 -0
  358. package/dist/wall/floorplan-tool.js +107 -0
  359. package/dist/wall/floorplan.d.ts.map +1 -1
  360. package/dist/wall/floorplan.js +6 -2
  361. package/dist/wall/length-patch.d.ts +3 -0
  362. package/dist/wall/length-patch.d.ts.map +1 -0
  363. package/dist/wall/length-patch.js +14 -0
  364. package/dist/wall/move-tool.d.ts.map +1 -1
  365. package/dist/wall/move-tool.js +23 -1
  366. package/dist/wall/paint.d.ts.map +1 -1
  367. package/dist/wall/paint.js +39 -4
  368. package/dist/wall/panel-model.d.ts +4 -0
  369. package/dist/wall/panel-model.d.ts.map +1 -0
  370. package/dist/wall/panel-model.js +117 -0
  371. package/dist/wall/panel.d.ts.map +1 -1
  372. package/dist/wall/panel.js +20 -24
  373. package/dist/wall/property-preview.d.ts +7 -0
  374. package/dist/wall/property-preview.d.ts.map +1 -0
  375. package/dist/wall/property-preview.js +31 -0
  376. package/dist/wall/rectangle-command.d.ts +149 -0
  377. package/dist/wall/rectangle-command.d.ts.map +1 -0
  378. package/dist/wall/rectangle-command.js +22 -0
  379. package/dist/wall/rectangle-tool.d.ts +2 -0
  380. package/dist/wall/rectangle-tool.d.ts.map +1 -0
  381. package/dist/wall/rectangle-tool.js +147 -0
  382. package/dist/wall/renderer.d.ts.map +1 -1
  383. package/dist/wall/renderer.js +7 -4
  384. package/dist/wall/slots.d.ts +2 -2
  385. package/dist/wall/slots.d.ts.map +1 -1
  386. package/dist/wall/slots.js +10 -2
  387. package/dist/wall/split-floorplan-layer.d.ts +4 -0
  388. package/dist/wall/split-floorplan-layer.d.ts.map +1 -0
  389. package/dist/wall/split-floorplan-layer.js +71 -0
  390. package/dist/wall/split-pointer.d.ts +3 -0
  391. package/dist/wall/split-pointer.d.ts.map +1 -0
  392. package/dist/wall/split-pointer.js +95 -0
  393. package/dist/wall/split-preview.d.ts +55 -0
  394. package/dist/wall/split-preview.d.ts.map +1 -0
  395. package/dist/wall/split-preview.js +106 -0
  396. package/dist/wall/split-session.d.ts +16 -0
  397. package/dist/wall/split-session.d.ts.map +1 -0
  398. package/dist/wall/split-session.js +138 -0
  399. package/dist/wall/split-store.d.ts +16 -0
  400. package/dist/wall/split-store.d.ts.map +1 -0
  401. package/dist/wall/split-store.js +6 -0
  402. package/dist/wall/split-tool.d.ts +10 -0
  403. package/dist/wall/split-tool.d.ts.map +1 -0
  404. package/dist/wall/split-tool.js +95 -0
  405. package/dist/wall/system.d.ts.map +1 -1
  406. package/dist/wall/system.js +3 -1
  407. package/dist/wall/tool.d.ts.map +1 -1
  408. package/dist/wall/tool.js +14 -6
  409. package/dist/wall/wall-batch-system.d.ts.map +1 -1
  410. package/dist/wall/wall-batch-system.js +3 -0
  411. package/dist/window/definition.d.ts.map +1 -1
  412. package/dist/window/definition.js +48 -1
  413. package/dist/window/floorplan-affordances.d.ts.map +1 -1
  414. package/dist/window/floorplan-affordances.js +8 -10
  415. package/dist/window/move-tool.d.ts.map +1 -1
  416. package/dist/window/move-tool.js +4 -6
  417. package/dist/window/panel.d.ts.map +1 -1
  418. package/dist/window/panel.js +22 -60
  419. package/dist/window/tool.d.ts.map +1 -1
  420. package/dist/window/tool.js +34 -2
  421. package/dist/window/window-math.d.ts +1 -1
  422. package/dist/window/window-math.d.ts.map +1 -1
  423. package/dist/window/window-math.js +8 -11
  424. package/dist/zone/definition.d.ts.map +1 -1
  425. package/dist/zone/definition.js +8 -1
  426. package/dist/zone/floorplan.d.ts +1 -3
  427. package/dist/zone/floorplan.d.ts.map +1 -1
  428. package/dist/zone/floorplan.js +43 -28
  429. package/dist/zone/quantities-panel.d.ts.map +1 -1
  430. package/dist/zone/quantities-panel.js +32 -44
  431. package/dist/zone/renderer.d.ts.map +1 -1
  432. package/dist/zone/renderer.js +21 -7
  433. package/dist/zone/unit-membership.d.ts +12 -0
  434. package/dist/zone/unit-membership.d.ts.map +1 -0
  435. package/dist/zone/unit-membership.js +22 -0
  436. package/package.json +15 -9
  437. package/dist/shared/opening-documentation-fields.d.ts +0 -16
  438. package/dist/shared/opening-documentation-fields.d.ts.map +0 -1
  439. package/dist/shared/opening-documentation-fields.js +0 -54
@@ -1,40 +1,9 @@
1
1
  import { Brush, csgEvaluator, csgGeometry, prepareBrushForCSG, SUBTRACTION, } from '@pascal-app/viewer';
2
2
  import { BoxGeometry, CylinderGeometry, Group, Mesh, SphereGeometry, TorusGeometry, } from 'three';
3
+ import { BASIN_WALL, FAUCET_BASE_RADIUS, sinkFaucetFootprint, sinkOpening, } from '../appliance-layout';
4
+ export { FAUCET_SETBACK, sinkBowls } from '../appliance-layout';
3
5
  import { createWorldScaleBoxGeometry, stampSlot } from './shared';
4
- const BASIN_WALL = 0.012;
5
6
  const BASIN_DEPTH = 0.19;
6
- const BASIN_CORNER_MARGIN = 0.06;
7
- // Centers the faucet base in the strip between the bowl's back edge and the
8
- // countertop's back edge (BASIN_CORNER_MARGIN wide).
9
- export const FAUCET_SETBACK = 0.03;
10
- /**
11
- * Bowl rects in module-local X/Z given the usable countertop footprint.
12
- * Shared by the 3D cut, the run-countertop cut, and the 2D floorplan symbol.
13
- */
14
- export function sinkBowls(layout, usableWidth, usableDepth) {
15
- const depth = Math.max(0.1, usableDepth - BASIN_CORNER_MARGIN * 2);
16
- const full = Math.max(0.15, usableWidth - BASIN_CORNER_MARGIN * 2);
17
- if (layout === 'single') {
18
- const width = Math.min(0.7, full);
19
- return [{ centerX: 0, width, depth }];
20
- }
21
- const divider = 0.03;
22
- if (layout === 'double') {
23
- const width = Math.min(0.42, (full - divider) / 2);
24
- return [
25
- { centerX: -(width + divider) / 2, width, depth },
26
- { centerX: (width + divider) / 2, width, depth },
27
- ];
28
- }
29
- // double-offset: 60/40 split
30
- const total = Math.min(0.86, full);
31
- const main = (total - divider) * 0.6;
32
- const side = (total - divider) * 0.4;
33
- return [
34
- { centerX: -(total / 2) + main / 2, width: main, depth },
35
- { centerX: total / 2 - side / 2, width: side, depth },
36
- ];
37
- }
38
7
  /**
39
8
  * Subtract the sink bowl openings from a countertop mesh via three-bvh-csg.
40
9
  * `cutCenterX/Z` position the sink footprint in the countertop mesh's local
@@ -49,7 +18,8 @@ export function cutSinkIntoCountertop(countertop, bowls, cutCenterX, cutCenterZ,
49
18
  for (const bowl of bowls) {
50
19
  // Rim reveal: the opening is slightly smaller than the basin shell so
51
20
  // the undermount lip tucks under the countertop.
52
- const cutter = new Brush(new BoxGeometry(bowl.width - BASIN_WALL, countertopThickness * 4, bowl.depth - BASIN_WALL));
21
+ const opening = sinkOpening(bowl);
22
+ const cutter = new Brush(new BoxGeometry(opening.width, countertopThickness * 4, opening.depth));
53
23
  cutter.position.set(cutCenterX + bowl.centerX, countertop.position.y, cutCenterZ);
54
24
  prepareBrushForCSG(cutter);
55
25
  const next = csgEvaluator.evaluate(result, cutter, SUBTRACTION);
@@ -174,7 +144,7 @@ function addFaucet(group, x, z, rimY, name, applianceMaterial) {
174
144
  const riserTopY = rimY + FAUCET_RISER_TOP;
175
145
  const reach = FAUCET_ARC_RADIUS * 2;
176
146
  // Round base flare where the body meets the countertop.
177
- const flare = stampSlot(new Mesh(new CylinderGeometry(FAUCET_BODY_RADIUS + 0.002, 0.032, 0.008, 28), applianceMaterial), 'appliance');
147
+ const flare = stampSlot(new Mesh(new CylinderGeometry(FAUCET_BODY_RADIUS + 0.002, FAUCET_BASE_RADIUS, 0.008, 28), applianceMaterial), 'appliance');
178
148
  flare.name = `${name}-faucet-escutcheon`;
179
149
  flare.position.set(x, rimY + 0.004, z);
180
150
  flare.castShadow = true;
@@ -254,9 +224,8 @@ export function addSinkCompartment(group, bowls, centerX, centerZ, rimY, counter
254
224
  for (const [bowlIndex, bowl] of bowls.entries()) {
255
225
  addBasinShell(group, bowl, centerX, centerZ, rimY, `${name}-${bowlIndex}`, applianceMaterial);
256
226
  }
257
- const bowlsMinX = Math.min(...bowls.map((bowl) => bowl.centerX - bowl.width / 2));
258
- const bowlsMaxX = Math.max(...bowls.map((bowl) => bowl.centerX + bowl.width / 2));
259
- const faucetX = centerX + (bowlsMinX + bowlsMaxX) / 2;
260
- const faucetZ = centerZ - bowls[0].depth / 2 - FAUCET_SETBACK;
227
+ const faucet = sinkFaucetFootprint(bowls);
228
+ const faucetX = centerX + faucet.x;
229
+ const faucetZ = centerZ + faucet.z;
261
230
  addFaucet(group, faucetX, faucetZ, rimY + countertopThickness, name, applianceMaterial);
262
231
  }
@@ -0,0 +1,5 @@
1
+ import type { AnyNode, AnyNodeId, HandleDescriptor, SceneApi } from '@pascal-app/core';
2
+ export declare function cabinetHostedChildUpdates(before: Record<AnyNodeId, AnyNode>, after: Record<AnyNodeId, AnyNode>): import("../shared/hosted-resize").HostedUpdate[] | null;
3
+ export declare function planCabinetHostedEdit(scene: SceneApi, apply: (staged: SceneApi) => void): import("../shared/hosted-resize").HostedUpdate[] | null;
4
+ export declare function withCabinetHostedChildren<N extends AnyNode>(descriptor: HandleDescriptor<N>): HandleDescriptor<N>;
5
+ //# sourceMappingURL=hosted-resize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hosted-resize.d.ts","sourceRoot":"","sources":["../../src/cabinet/hosted-resize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAQtF,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,EAClC,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,2DAGlC;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,QAAQ,KAAK,IAAI,2DAEvF;AAED,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,OAAO,EACzD,UAAU,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAC9B,gBAAgB,CAAC,CAAC,CAAC,CAErB"}
@@ -0,0 +1,14 @@
1
+ import { hostedChildUpdates, planHostedEdit, withHostedChildren } from '../shared/hosted-resize';
2
+ const policy = {
3
+ host: (node) => node.type === 'cabinet',
4
+ child: (node) => node.type !== 'cabinet' && node.type !== 'cabinet-module',
5
+ };
6
+ export function cabinetHostedChildUpdates(before, after) {
7
+ return hostedChildUpdates(before, after, policy);
8
+ }
9
+ export function planCabinetHostedEdit(scene, apply) {
10
+ return planHostedEdit(scene, apply, policy);
11
+ }
12
+ export function withCabinetHostedChildren(descriptor) {
13
+ return descriptor.kind === 'linear-resize' ? withHostedChildren(descriptor, policy) : descriptor;
14
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"placement-snap.d.ts","sourceRoot":"","sources":["../../src/cabinet/placement-snap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAE/C,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAK9F;AAED;;wEAEwE;AACxE,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,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AM,EAAE,MAAM,CAAC,CAwB3B"}
@@ -13,9 +13,11 @@ export function resolveCabinetLevelPlanFrame(levelId, nodes) {
13
13
  const building = level?.parentId ? nodes[level.parentId] : undefined;
14
14
  if (building?.type !== 'building')
15
15
  return { position: [0, 0], rotationY: 0 };
16
+ const position = Array.isArray(building.position) ? building.position : [0, 0, 0];
17
+ const rotation = Array.isArray(building.rotation) ? building.rotation : [0, 0, 0];
16
18
  return {
17
- position: [building.position[0], building.position[2]],
18
- rotationY: building.rotation[1],
19
+ position: [position[0] ?? 0, position[2] ?? 0],
20
+ rotationY: rotation[1] ?? 0,
19
21
  };
20
22
  }
21
23
  export function resolveCabinetGridPosition({ raw, dimensions, footprintOffset = [0, 0], yaw, step, }) {
@@ -54,15 +54,22 @@ export type RunSpan = {
54
54
  topY: number;
55
55
  hasCountertop: boolean;
56
56
  };
57
+ type SpanModule = Pick<CabinetModuleNode, 'position' | 'width' | 'depth' | 'carcassHeight' | 'cabinetType'>;
57
58
  /**
58
59
  * Contiguous same-height module groups along the run — the units the
59
60
  * countertop, plinth, and appliance-gap logic operate on. A gap, a
60
61
  * base↔tall transition, a top-height change, or a depth-footprint change
61
62
  * starts a new span.
62
63
  */
63
- export declare function getRunSpans(modules: readonly Pick<CabinetModuleNode, 'position' | 'width' | 'depth' | 'carcassHeight' | 'cabinetType'>[], opts?: {
64
+ export declare function getRunSpans(modules: readonly SpanModule[], opts?: {
64
65
  runTier?: CabinetNode['runTier'];
65
66
  }): RunSpan[];
67
+ export declare function getRunSpanGroups<T extends SpanModule>(modules: readonly T[], opts?: {
68
+ runTier?: CabinetNode['runTier'];
69
+ }): Array<{
70
+ span: RunSpan;
71
+ modules: T[];
72
+ }>;
66
73
  export declare function derivedCornerRole(metadata: unknown): {
67
74
  role: 'base-leg' | 'wall-leg' | 'bridge';
68
75
  side: 'left' | 'right';
@@ -1 +1 @@
1
- {"version":3,"file":"run-layout.d.ts","sourceRoot":"","sources":["../../src/cabinet/run-layout.ts"],"names":[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AAA;IAChC,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IAC9B,YAAY,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,OAAO,EAAE,OAAO,CAAC,CAAC,CAAA;IACzD,mBAAmB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACvC,GAAG,sBAAsB,CAAC,CAAC,CAAC,CA0I5B;AAED,4DAA4D;AAC5D,wBAAgB,eAAe,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,GAAG;IAC/D,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;CACd,GAAG,IAAI,CAKP;AAED,MAAM,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,UAAU,CAAC,CAAA;AAEhE,wEAAwE;AACxE,wBAAgB,cAAc,CAC5B,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GACvC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAS1B;AAED,yCAAyC;AACzC,wBAAgB,cAAc,CAC5B,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAM1B"}
@@ -141,8 +141,11 @@ export function moduleSideOpen(modules, moduleId, side, epsilon = RUN_ADJACENCY_
141
141
  * starts a new span.
142
142
  */
143
143
  export function getRunSpans(modules, opts = {}) {
144
+ return getRunSpanGroups(modules, opts).map((group) => group.span);
145
+ }
146
+ export function getRunSpanGroups(modules, opts = {}) {
144
147
  const sorted = [...modules].sort((a, b) => a.position[0] - b.position[0]);
145
- const spans = [];
148
+ const groups = [];
146
149
  const runTier = opts.runTier ?? 'base';
147
150
  for (const module of sorted) {
148
151
  const minX = module.position[0] - module.width / 2;
@@ -151,27 +154,32 @@ export function getRunSpans(modules, opts = {}) {
151
154
  const maxZ = module.position[2] + module.depth / 2;
152
155
  const topY = module.position[1] + module.carcassHeight;
153
156
  const hasCountertop = runTier === 'base' && (module.cabinetType ?? 'base') !== 'tall';
154
- const current = spans.at(-1);
157
+ const group = groups.at(-1);
158
+ const current = group?.span;
155
159
  if (!current ||
156
160
  minX - current.maxX > RUN_ADJACENCY_EPSILON ||
157
161
  current.hasCountertop !== hasCountertop ||
158
162
  Math.abs(current.topY - topY) > RUN_ADJACENCY_EPSILON ||
159
163
  Math.abs(current.minZ - minZ) > RUN_ADJACENCY_EPSILON ||
160
164
  Math.abs(current.maxZ - maxZ) > RUN_ADJACENCY_EPSILON) {
161
- spans.push({
162
- minX,
163
- maxX,
164
- centerX: module.position[0],
165
- centerZ: module.position[2],
166
- width: module.width,
167
- depth: module.depth,
168
- minZ,
169
- maxZ,
170
- topY,
171
- hasCountertop,
165
+ groups.push({
166
+ modules: [module],
167
+ span: {
168
+ minX,
169
+ maxX,
170
+ centerX: module.position[0],
171
+ centerZ: module.position[2],
172
+ width: module.width,
173
+ depth: module.depth,
174
+ minZ,
175
+ maxZ,
176
+ topY,
177
+ hasCountertop,
178
+ },
172
179
  });
173
180
  continue;
174
181
  }
182
+ group.modules.push(module);
175
183
  current.maxX = Math.max(current.maxX, maxX);
176
184
  current.minZ = Math.min(current.minZ, minZ);
177
185
  current.maxZ = Math.max(current.maxZ, maxZ);
@@ -181,7 +189,7 @@ export function getRunSpans(modules, opts = {}) {
181
189
  current.centerZ = (current.minZ + current.maxZ) / 2;
182
190
  current.topY = Math.max(current.topY, topY);
183
191
  }
184
- return spans;
192
+ return groups;
185
193
  }
186
194
  function angleDelta(a, b) {
187
195
  return Math.atan2(Math.sin(a - b), Math.cos(a - b));
@@ -48,8 +48,8 @@ export declare function cabinetCornerUnlinkPatchesOnDelete(node: CabinetNode | C
48
48
  * A cabinet run is a grouping container — once its last child is deleted
49
49
  * the empty run must go too, so no orphan group lingers in the scene graph
50
50
  * or the persisted data. Children may be modules or derived corner leg
51
- * runs (which position themselves relative to the run), so ANY survivor
52
- * keeps the run alive. `pendingDeleteIds` covers multi-select deletes:
51
+ * runs (which position themselves relative to the run). Hosted assets do not
52
+ * keep an empty run alive. `pendingDeleteIds` covers multi-select deletes:
53
53
  * siblings already part of the same gesture count as gone.
54
54
  */
55
55
  export declare function cabinetEmptyRunCascadeDeleteIds(node: CabinetEditableNode, nodes: Readonly<Partial<Record<AnyNodeId, AnyNode>>>, pendingDeleteIds: ReadonlySet<AnyNodeId>): AnyNodeId[];
@@ -112,7 +112,7 @@ export declare function cabinetRunWidthEqualizationPlan(run: CabinetNode, nodes:
112
112
  withCountertop: boolean;
113
113
  id: `cabinet-module_${string}`;
114
114
  type: "cabinet-module";
115
- children: (`cabinet_${string}` | `cabinet-module_${string}`)[];
115
+ children: string[];
116
116
  cabinetType: "base" | "tall";
117
117
  moduleKind: "standard" | "corner-filler";
118
118
  topFinish: "trim" | "none" | "top-cabinet";
@@ -161,8 +161,8 @@ export function cabinetCornerUnlinkPatchesOnDelete(node, nodes) {
161
161
  * A cabinet run is a grouping container — once its last child is deleted
162
162
  * the empty run must go too, so no orphan group lingers in the scene graph
163
163
  * or the persisted data. Children may be modules or derived corner leg
164
- * runs (which position themselves relative to the run), so ANY survivor
165
- * keeps the run alive. `pendingDeleteIds` covers multi-select deletes:
164
+ * runs (which position themselves relative to the run). Hosted assets do not
165
+ * keep an empty run alive. `pendingDeleteIds` covers multi-select deletes:
166
166
  * siblings already part of the same gesture count as gone.
167
167
  */
168
168
  export function cabinetEmptyRunCascadeDeleteIds(node, nodes, pendingDeleteIds) {
@@ -173,7 +173,7 @@ export function cabinetEmptyRunCascadeDeleteIds(node, nodes, pendingDeleteIds) {
173
173
  const id = childId;
174
174
  if (id === node.id || pendingDeleteIds.has(id))
175
175
  return false;
176
- return nodes[id] != null;
176
+ return nodes[id]?.type === 'cabinet' || nodes[id]?.type === 'cabinet-module';
177
177
  });
178
178
  return hasSurvivingChild ? [] : [parent.id];
179
179
  }
@@ -9,7 +9,7 @@ export declare function reflowRunModules({ modules, parentRun, patch, scene, sel
9
9
  scene: ReturnType<typeof useScene.getState>;
10
10
  selected: CabinetModuleNodeType;
11
11
  }): boolean;
12
- export declare function updateCabinetRun({ modules, node, patch, }: {
12
+ export declare function updateCabinetRun(args: {
13
13
  modules: CabinetModuleNodeType[];
14
14
  node: CabinetNodeType;
15
15
  patch: Partial<CabinetNodeType>;
@@ -1 +1 @@
1
- {"version":3,"file":"run-panel.d.ts","sourceRoot":"","sources":["../../src/cabinet/run-panel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAGV,iBAAiB,IAAI,qBAAqB,EAC1C,WAAW,IAAI,eAAe,EAC/B,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAkC,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AA+D3E,MAAM,MAAM,mBAAmB,GAAG,eAAe,GAAG,qBAAqB,CAAA;AAoFzE,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,UAAU,CAAC,OAAO,QAAQ,CAAC,QAAQ,CAAC,EAC3C,GAAG,EAAE,eAAe,QAIrB;AAuBD,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,SAAS,EACT,KAAK,EACL,KAAK,EACL,QAAQ,GACT,EAAE;IACD,OAAO,EAAE,qBAAqB,EAAE,CAAA;IAChC,SAAS,EAAE,eAAe,CAAA;IAC1B,KAAK,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAA;IACrC,KAAK,EAAE,UAAU,CAAC,OAAO,QAAQ,CAAC,QAAQ,CAAC,CAAA;IAC3C,QAAQ,EAAE,qBAAqB,CAAA;CAChC,GAAG,OAAO,CA8JV;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,IAAI,EACJ,KAAK,GACN,EAAE;I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C,CAAA;CAChC,QAOA;AA8FD,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,OAAO,EACP,OAAO,GACR,EAAE;IACD,IAAI,EAAE,eAAe,CAAA;IACrB,OAAO,EAAE,qBAAqB,EAAE,CAAA;IAChC,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,+BA8iBA"}
@@ -1,11 +1,12 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { createSceneApi, resolveLevelId, useScene } from '@pascal-app/core';
3
+ import { cascadeDirty, createSceneApi, resolveLevelId, useScene } from '@pascal-app/core';
4
4
  import { ActionButton, PanelSection, PanelWrapper, SegmentedControl, SliderControl, ToggleControl, } from '@pascal-app/editor';
5
5
  import { useViewer } from '@pascal-app/viewer';
6
6
  import { Copy, Equal as EqualIcon, Plus, Trash } from 'lucide-react';
7
7
  import { useCallback, useMemo, useState } from 'react';
8
8
  import { useShallow } from 'zustand/react/shallow';
9
+ import { planCabinetHostedEdit } from './hosted-resize';
9
10
  import { metadataForSelectedWidth, metadataWithPresetWidthDebt, presetNominalWidth, presetWidthDebt, recordedPresetNominalWidth, } from './preset-width-debt';
10
11
  import { CABINET_DIMENSION_PROFILES, cabinetDimensionProfileById, cabinetDimensionProfileId, } from './profiles';
11
12
  import { MAX_CABINET_WIDTH } from './resize-limits';
@@ -227,16 +228,24 @@ export function reflowRunModules({ modules, parentRun, patch, scene, selected, }
227
228
  bumpRunLayoutRevisionViaStore(scene, parentRun);
228
229
  return true;
229
230
  }
230
- export function updateCabinetRun({ modules, node, patch, }) {
231
- const scene = useScene.getState();
231
+ export function updateCabinetRun(args) {
232
232
  const sceneApi = createSceneApi(useScene);
233
+ const updates = planCabinetHostedEdit(sceneApi, (staged) => writeCabinetRun(args, staged));
234
+ if (!updates)
235
+ return;
236
+ useScene.getState().updateNodes(updates.map(([id, data]) => ({ id, data })));
237
+ for (const id of cascadeDirty(args.node.id, { scene: sceneApi }))
238
+ useScene.getState().markDirty(id);
239
+ }
240
+ function writeCabinetRun({ modules, node, patch, }, sceneApi) {
241
+ const nodes = sceneApi.nodes();
233
242
  const nextPatch = { ...patch };
234
243
  if (typeof nextPatch.carcassHeight === 'number') {
235
244
  const minModuleHeight = Math.max(0.4, ...modules.map((module) => minCabinetCarcassHeightForStack(module)));
236
245
  nextPatch.carcassHeight = Math.max(nextPatch.carcassHeight, minModuleHeight);
237
246
  }
238
247
  const nextNode = { ...node, ...nextPatch };
239
- scene.updateNode(node.id, nextPatch);
248
+ sceneApi.update(node.id, nextPatch);
240
249
  const shouldSyncDepth = RUN_DEPTH_PATCH_KEY in nextPatch;
241
250
  const shouldSyncHeight = 'carcassHeight' in nextPatch;
242
251
  const shouldSyncPosition = Object.keys(nextPatch).some((key) => RUN_POSITION_PATCH_KEYS.has(key));
@@ -277,11 +286,11 @@ export function updateCabinetRun({ modules, node, patch, }) {
277
286
  if ('frontGap' in nextPatch)
278
287
  modulePatch.frontGap = nextNode.frontGap;
279
288
  }
280
- scene.updateNode(module.id, modulePatch);
289
+ sceneApi.update(module.id, modulePatch);
281
290
  if (shouldSyncModules) {
282
- const wallChild = wallChildOf(module, scene.nodes);
291
+ const wallChild = wallChildOf(module, nodes);
283
292
  if (wallChild) {
284
- scene.updateNode(wallChild.id, {
293
+ sceneApi.update(wallChild.id, {
285
294
  frontStyle: nextNode.frontStyle,
286
295
  frontOverlay: nextNode.frontOverlay,
287
296
  handleStyle: nextNode.handleStyle,
@@ -0,0 +1,5 @@
1
+ import { type CabinetNode, type DeclaredHostSurface, type GeometryContext, type SurfaceProvider } from '@pascal-app/core';
2
+ export declare function getCabinetSurfaces(node: CabinetNode, ctx?: GeometryContext): DeclaredHostSurface[];
3
+ export declare const cabinetSurfaceProvider: SurfaceProvider;
4
+ export declare const cabinetModuleSurfaceProvider: SurfaceProvider;
5
+ //# sourceMappingURL=surfaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"surfaces.d.ts","sourceRoot":"","sources":["../../src/cabinet/surfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EAIpB,KAAK,eAAe,EACrB,MAAM,kBAAkB,CAAA;AA8BzB,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,WAAW,EACjB,GAAG,CAAC,EAAE,eAAe,GACpB,mBAAmB,EAAE,CA0CvB;AAgBD,eAAO,MAAM,sBAAsB,EAAE,eAkCpC,CAAA;AAED,eAAO,MAAM,4BAA4B,EAAE,eAU1C,CAAA"}
@@ -0,0 +1,113 @@
1
+ import { hitDerivedSurfaceProvider, pointInPolygon2D, } from '@pascal-app/core';
2
+ import { cooktopFootprint, sinkFaucetFootprint, sinkOpening } from './appliance-layout';
3
+ import { getCabinetCountertopLayout } from './countertop-layout';
4
+ import { isCooktopCompartmentType } from './stack';
5
+ function rectangle(x, z, width, depth) {
6
+ return [
7
+ [x - width / 2, z - depth / 2],
8
+ [x + width / 2, z - depth / 2],
9
+ [x + width / 2, z + depth / 2],
10
+ [x - width / 2, z + depth / 2],
11
+ ];
12
+ }
13
+ function slabSurface(id, label, slab) {
14
+ // Keep XZ anchored to the run, so changing either end or an overhang cannot move an attachment.
15
+ return {
16
+ id,
17
+ label,
18
+ position: [0, slab.position[1] + slab.size[1] / 2, 0],
19
+ normal: [0, 1, 0],
20
+ gridSnap: true,
21
+ region: {
22
+ kind: 'rect',
23
+ center: [slab.position[0], slab.position[2]],
24
+ size: [slab.size[0] / 2, slab.size[2] / 2],
25
+ },
26
+ };
27
+ }
28
+ export function getCabinetSurfaces(node, ctx) {
29
+ const surfaces = [];
30
+ for (const layout of getCabinetCountertopLayout(node, ctx)) {
31
+ // First member identity survives edits to other spans and changes to this span's far end.
32
+ // Removing/replacing that member or splitting/merging the span is a topology edit.
33
+ const anchorId = layout.modules[0].id;
34
+ if (layout.countertop) {
35
+ const surface = slabSurface(`countertop:${anchorId}`, 'Countertop', layout.countertop);
36
+ const holes = layout.sinkCuts.flatMap((cut) => cut.bowls.map((bowl) => {
37
+ const opening = sinkOpening(bowl);
38
+ return rectangle(cut.x + opening.centerX, cut.z, opening.width, opening.depth);
39
+ }));
40
+ for (const cut of layout.sinkCuts) {
41
+ const faucet = sinkFaucetFootprint(cut.bowls);
42
+ holes.push(Array.from({ length: 28 }, (_, index) => {
43
+ const angle = (index * Math.PI * 2) / 28;
44
+ return [
45
+ cut.x + faucet.x + Math.cos(angle) * faucet.radius,
46
+ cut.z + faucet.z + Math.sin(angle) * faucet.radius,
47
+ ];
48
+ }));
49
+ }
50
+ for (const module of layout.modules) {
51
+ if (!module.stack?.some((compartment) => isCooktopCompartmentType(compartment.type)))
52
+ continue;
53
+ const footprint = cooktopFootprint(module);
54
+ holes.push(rectangle(module.position[0], module.position[2], footprint.width, footprint.depth));
55
+ }
56
+ surface.region = { ...surface.region, ...(holes.length > 0 ? { holes } : {}) };
57
+ surfaces.push(surface);
58
+ }
59
+ if (layout.bar) {
60
+ surfaces.push(slabSurface(`bar:${layout.bar.edge}:${anchorId}`, 'Bar ledge', layout.bar.slab));
61
+ }
62
+ }
63
+ return surfaces;
64
+ }
65
+ function geometryContext(host, ctx) {
66
+ const nodes = ctx.scene.nodes();
67
+ return {
68
+ resolve: (id) => nodes[id],
69
+ children: host.children
70
+ .map((id) => ctx.scene.get(id))
71
+ .filter((node) => !!node),
72
+ parent: host.parentId ? (nodes[host.parentId] ?? null) : null,
73
+ siblings: Object.values(nodes).filter((node) => node.type === host.type && node.parentId === host.parentId),
74
+ };
75
+ }
76
+ export const cabinetSurfaceProvider = {
77
+ childFrame: 'host-local',
78
+ surfaces(host, ctx) {
79
+ return host.type === 'cabinet' ? getCabinetSurfaces(host, geometryContext(host, ctx)) : [];
80
+ },
81
+ resolveHit(host, hit, ctx) {
82
+ if (host.type !== 'cabinet' || !(hit.normalWorldY >= 0.75) || !hit.point.every(Number.isFinite))
83
+ return null;
84
+ const surfaces = getCabinetSurfaces(host, geometryContext(host, ctx));
85
+ let nearest = null;
86
+ for (const surface of surfaces) {
87
+ const region = surface.region;
88
+ const [x, z] = [hit.point[0], hit.point[2]];
89
+ const [cx, cz] = region.center;
90
+ const [width, depth] = region.size;
91
+ if (Math.abs(x - cx) > width ||
92
+ Math.abs(z - cz) > depth ||
93
+ region.holes?.some((hole) => pointInPolygon2D([x, z], hole.map(([hx, hz]) => [hx, hz]))))
94
+ continue;
95
+ if (!nearest ||
96
+ Math.abs(surface.position[1] - hit.point[1]) < Math.abs(nearest.position[1] - hit.point[1]))
97
+ nearest = surface;
98
+ }
99
+ return nearest;
100
+ },
101
+ };
102
+ export const cabinetModuleSurfaceProvider = {
103
+ childFrame: 'host-local',
104
+ // Catalog placement has always targeted runs; standalone module hosting belongs to registry movers.
105
+ accepts: (_host, childKind) => childKind !== 'item',
106
+ resolveHit(host, hit, ctx) {
107
+ const parent = host.parentId ? ctx.scene.get(host.parentId) : undefined;
108
+ // A run owns its counter and cutouts; its module meshes must let the hit bubble.
109
+ if (parent?.type === 'cabinet')
110
+ return null;
111
+ return hitDerivedSurfaceProvider.resolveHit(host, hit, ctx);
112
+ },
113
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../src/cabinet/tool.tsx"],"names":[],"mappings":"AAoZA,QAAA,MAAM,WAAW,0CAy/ChB,CAAA;AAED,eAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../src/cabinet/tool.tsx"],"names":[],"mappings":"AAoZA,QAAA,MAAM,WAAW,0CA6/ChB,CAAA;AAED,eAAe,WAAW,CAAA"}
@@ -200,6 +200,7 @@ const CabinetTool = () => {
200
200
  const [placement, setPlacement] = useState(null);
201
201
  const [draftSegments, setDraftSegments] = useState([]);
202
202
  const [yaw, setYaw] = useState(0);
203
+ const toolDefaults = useEditor((state) => state.toolDefaults.cabinet);
203
204
  const placementType = useCabinetPlacementType((s) => s.type);
204
205
  const islandMode = placementType === 'island';
205
206
  const yawRef = useRef(0);
@@ -226,6 +227,7 @@ const CabinetTool = () => {
226
227
  return CabinetModuleNode.parse({
227
228
  ...cabinetModuleDefinition.defaults(),
228
229
  ...DEFAULT_PLACEMENT_PRESET.createPatch(),
230
+ ...toolDefaults,
229
231
  showPlinth: runDefaults.showPlinth,
230
232
  plinthHeight: runDefaults.plinthHeight,
231
233
  toeKickDepth: runDefaults.toeKickDepth,
@@ -234,7 +236,7 @@ const CabinetTool = () => {
234
236
  countertopOverhang: runDefaults.countertopOverhang,
235
237
  countertopBackOverhang: runDefaults.countertopBackOverhang,
236
238
  });
237
- }, []);
239
+ }, [toolDefaults]);
238
240
  const [previewSize, setPreviewSize] = useState(() => ({
239
241
  depth: previewNodeTemplate.depth,
240
242
  height: previewNodeTemplate.carcassHeight,
@@ -839,12 +841,13 @@ const CabinetTool = () => {
839
841
  const island = islandModeRef.current;
840
842
  const cabinet = CabinetNode.parse({
841
843
  ...cabinetDefinition.defaults(),
844
+ ...toolDefaults,
842
845
  name: island ? 'Kitchen Island' : 'Modular Cabinet',
843
846
  position,
844
847
  rotation: yaw,
845
848
  parentId: activeLevelId,
846
- depth: patch.depth ?? cabinetDefinition.defaults().depth,
847
- carcassHeight: patch.carcassHeight ?? cabinetDefinition.defaults().carcassHeight,
849
+ depth: previewNode.depth,
850
+ carcassHeight: previewNode.carcassHeight,
848
851
  ...(island && {
849
852
  countertopBackOverhang: ISLAND_SEATING_OVERHANG,
850
853
  withFinishedBack: true,
@@ -853,6 +856,7 @@ const CabinetTool = () => {
853
856
  const buildModule = (localX, width, index) => CabinetModuleNode.parse({
854
857
  ...cabinetModuleDefinition.defaults(),
855
858
  ...patch,
859
+ ...toolDefaults,
856
860
  name: index === 0 ? (patch.name ?? 'Base Cabinet') : `Base Cabinet ${index + 1}`,
857
861
  parentId: cabinet.id,
858
862
  position: [localX, runModuleBaseY(cabinet.plinthHeight, cabinet.showPlinth), 0],
@@ -1387,7 +1391,7 @@ const CabinetTool = () => {
1387
1391
  useAlignmentGuides.getState().clear();
1388
1392
  useCabinetPlacementStatus.getState().setBlocked(false);
1389
1393
  };
1390
- }, [activeLevelId, metricNotation, publishFloorplanPreview, unit]);
1394
+ }, [activeLevelId, metricNotation, previewNode, publishFloorplanPreview, toolDefaults, unit]);
1391
1395
  if (!activeLevelId || !placement)
1392
1396
  return null;
1393
1397
  const stretch = placement.stretch;
@@ -1 +1 @@
1
- {"version":3,"file":"tree-structure.d.ts","sourceRoot":"","sources":["../../src/cabinet/tree-structure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,SAAS,EAGV,MAAM,kBAAkB,CAAA;AA2FzB;8DAC8D;AAC9D,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,OAAO,EACb,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,GACpD,OAAO,CAET;AAED,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,GACnD,MAAM,CAWR;AAED,kDAAkD;AAClD,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,GACnD,SAAS,EAAE,CAuBb;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE;IAChD,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;IACjC,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;CACpD,GAAG,SAAS,SAAS,EAAE,CAkCvB"}
1
+ {"version":3,"file":"tree-structure.d.ts","sourceRoot":"","sources":["../../src/cabinet/tree-structure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,SAAS,EAGV,MAAM,kBAAkB,CAAA;AA0FzB;8DAC8D;AAC9D,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,OAAO,EACb,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,GACpD,OAAO,CAET;AAED,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,GACnD,MAAM,CAWR;AAED,kDAAkD;AAClD,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,GACnD,SAAS,EAAE,CA0Bb;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE;IAChD,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;IACjC,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;CACpD,GAAG,SAAS,SAAS,EAAE,CAkCvB"}
@@ -27,11 +27,6 @@ function isCabinetRun(node) {
27
27
  function isCabinetModule(node) {
28
28
  return node?.type === 'cabinet-module';
29
29
  }
30
- function cabinetModuleChildren(run, nodes) {
31
- return (run.children ?? [])
32
- .map((id) => nodes[id])
33
- .filter((child) => child?.type === 'cabinet-module');
34
- }
35
30
  function childIdsOf(node) {
36
31
  if (!node || typeof node !== 'object' || !('children' in node) || !Array.isArray(node.children)) {
37
32
  return [];
@@ -46,15 +41,19 @@ function resolveCabinetRunChildIds(run, nodes) {
46
41
  resolved.push(child.id);
47
42
  continue;
48
43
  }
49
- if (!isCabinetRun(child))
44
+ if (!isCabinetRun(child)) {
45
+ resolved.push(childId);
50
46
  continue;
47
+ }
51
48
  const link = cornerDerivedRunLink(child.metadata);
52
49
  if (link?.role === 'base-leg') {
53
50
  resolved.push(...resolveCabinetRunChildIds(child, nodes));
54
51
  continue;
55
52
  }
56
- if (link)
53
+ if (link) {
54
+ resolved.push(...resolveCabinetRunChildIds(child, nodes).filter((id) => !isCabinetModule(nodes[id])));
57
55
  continue;
56
+ }
58
57
  resolved.push(child.id);
59
58
  }
60
59
  return resolved;
@@ -92,11 +91,13 @@ export function cabinetTreeChildIds(node, nodes) {
92
91
  resolved.push(child.id);
93
92
  continue;
94
93
  }
95
- if (!isCabinetRun(child))
94
+ if (!isCabinetRun(child)) {
95
+ resolved.push(childId);
96
96
  continue;
97
+ }
97
98
  const link = cornerDerivedRunLink(child.metadata);
98
99
  if (link) {
99
- resolved.push(...cabinetModuleChildren(child, nodes).map((module) => module.id));
100
+ resolved.push(...resolveCabinetRunChildIds(child, nodes));
100
101
  continue;
101
102
  }
102
103
  resolved.push(child.id);
@@ -1 +1 @@
1
- {"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/ceiling/definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,cAAc,EAIpB,MAAM,kBAAkB,CAAA;AAmBzB,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAmFtC;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,iBAAiB,EAAE,cAAc,CAAC,OAAO,WAAW,CAiHhE,CAAA"}
1
+ {"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/ceiling/definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,cAAc,EAIpB,MAAM,kBAAkB,CAAA;AAqBzB,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAmFtC;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,iBAAiB,EAAE,cAAc,CAAC,OAAO,WAAW,CAqHhE,CAAA"}