@pascal-app/nodes 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1717) hide show
  1. package/dist/box-vent/definition.d.ts +30 -0
  2. package/dist/box-vent/definition.d.ts.map +1 -0
  3. package/dist/box-vent/definition.js +210 -0
  4. package/dist/box-vent/floorplan.d.ts +15 -0
  5. package/dist/box-vent/floorplan.d.ts.map +1 -0
  6. package/dist/box-vent/floorplan.js +187 -0
  7. package/dist/box-vent/geometry.d.ts +40 -0
  8. package/dist/box-vent/geometry.d.ts.map +1 -0
  9. package/dist/box-vent/geometry.js +421 -0
  10. package/dist/box-vent/index.d.ts +4 -0
  11. package/dist/box-vent/index.d.ts.map +1 -0
  12. package/dist/box-vent/index.js +3 -0
  13. package/dist/box-vent/move-tool.d.ts +14 -0
  14. package/dist/box-vent/move-tool.d.ts.map +1 -0
  15. package/dist/box-vent/move-tool.js +217 -0
  16. package/dist/box-vent/panel.d.ts +14 -0
  17. package/dist/box-vent/panel.d.ts.map +1 -0
  18. package/dist/box-vent/panel.js +143 -0
  19. package/dist/box-vent/parametrics.d.ts +9 -0
  20. package/dist/box-vent/parametrics.d.ts.map +1 -0
  21. package/dist/box-vent/parametrics.js +35 -0
  22. package/dist/box-vent/preview.d.ts +17 -0
  23. package/dist/box-vent/preview.d.ts.map +1 -0
  24. package/dist/box-vent/preview.js +41 -0
  25. package/dist/box-vent/renderer.d.ts +26 -0
  26. package/dist/box-vent/renderer.d.ts.map +1 -0
  27. package/dist/box-vent/renderer.js +127 -0
  28. package/dist/box-vent/schema.d.ts +2 -0
  29. package/dist/box-vent/schema.d.ts.map +1 -0
  30. package/dist/box-vent/schema.js +3 -0
  31. package/dist/box-vent/tool.d.ts +13 -0
  32. package/dist/box-vent/tool.d.ts.map +1 -0
  33. package/dist/box-vent/tool.js +116 -0
  34. package/dist/building/definition.d.ts +12 -0
  35. package/dist/building/definition.d.ts.map +1 -0
  36. package/dist/building/definition.js +53 -0
  37. package/dist/building/index.d.ts +2 -0
  38. package/dist/building/index.d.ts.map +1 -0
  39. package/dist/building/index.js +1 -0
  40. package/dist/building/move-tool.d.ts +6 -0
  41. package/dist/building/move-tool.d.ts.map +1 -0
  42. package/dist/building/move-tool.js +187 -0
  43. package/dist/building/parametrics.d.ts +3 -0
  44. package/dist/building/parametrics.d.ts.map +1 -0
  45. package/dist/building/parametrics.js +3 -0
  46. package/dist/building/renderer.d.ts +6 -0
  47. package/dist/building/renderer.d.ts.map +1 -0
  48. package/dist/building/renderer.js +12 -0
  49. package/dist/building/schema.d.ts +2 -0
  50. package/dist/building/schema.d.ts.map +1 -0
  51. package/dist/building/schema.js +1 -0
  52. package/dist/cabinet/animation.d.ts +5 -0
  53. package/dist/cabinet/animation.d.ts.map +1 -0
  54. package/dist/cabinet/animation.js +48 -0
  55. package/dist/cabinet/compartment-card.d.ts +17 -0
  56. package/dist/cabinet/compartment-card.d.ts.map +1 -0
  57. package/dist/cabinet/compartment-card.js +145 -0
  58. package/dist/cabinet/continuous-placement.d.ts +49 -0
  59. package/dist/cabinet/continuous-placement.d.ts.map +1 -0
  60. package/dist/cabinet/continuous-placement.js +110 -0
  61. package/dist/cabinet/cooktop-flame.d.ts +14 -0
  62. package/dist/cabinet/cooktop-flame.d.ts.map +1 -0
  63. package/dist/cabinet/cooktop-flame.js +115 -0
  64. package/dist/cabinet/definition.d.ts +26 -0
  65. package/dist/cabinet/definition.d.ts.map +1 -0
  66. package/dist/cabinet/definition.js +1016 -0
  67. package/dist/cabinet/floorplan-move.d.ts +15 -0
  68. package/dist/cabinet/floorplan-move.d.ts.map +1 -0
  69. package/dist/cabinet/floorplan-move.js +192 -0
  70. package/dist/cabinet/floorplan-overrides.d.ts +16 -0
  71. package/dist/cabinet/floorplan-overrides.d.ts.map +1 -0
  72. package/dist/cabinet/floorplan-overrides.js +47 -0
  73. package/dist/cabinet/floorplan.d.ts +4 -0
  74. package/dist/cabinet/floorplan.d.ts.map +1 -0
  75. package/dist/cabinet/floorplan.js +311 -0
  76. package/dist/cabinet/geometry/cooktop.d.ts +20 -0
  77. package/dist/cabinet/geometry/cooktop.d.ts.map +1 -0
  78. package/dist/cabinet/geometry/cooktop.js +269 -0
  79. package/dist/cabinet/geometry/dishwasher.d.ts +4 -0
  80. package/dist/cabinet/geometry/dishwasher.d.ts.map +1 -0
  81. package/dist/cabinet/geometry/dishwasher.js +100 -0
  82. package/dist/cabinet/geometry/fridge.d.ts +5 -0
  83. package/dist/cabinet/geometry/fridge.d.ts.map +1 -0
  84. package/dist/cabinet/geometry/fridge.js +393 -0
  85. package/dist/cabinet/geometry/fronts.d.ts +9 -0
  86. package/dist/cabinet/geometry/fronts.d.ts.map +1 -0
  87. package/dist/cabinet/geometry/fronts.js +468 -0
  88. package/dist/cabinet/geometry/hood.d.ts +6 -0
  89. package/dist/cabinet/geometry/hood.d.ts.map +1 -0
  90. package/dist/cabinet/geometry/hood.js +108 -0
  91. package/dist/cabinet/geometry/oven-microwave.d.ts +5 -0
  92. package/dist/cabinet/geometry/oven-microwave.d.ts.map +1 -0
  93. package/dist/cabinet/geometry/oven-microwave.js +292 -0
  94. package/dist/cabinet/geometry/pantry.d.ts +5 -0
  95. package/dist/cabinet/geometry/pantry.d.ts.map +1 -0
  96. package/dist/cabinet/geometry/pantry.js +80 -0
  97. package/dist/cabinet/geometry/run.d.ts +6 -0
  98. package/dist/cabinet/geometry/run.d.ts.map +1 -0
  99. package/dist/cabinet/geometry/run.js +124 -0
  100. package/dist/cabinet/geometry/shared.d.ts +46 -0
  101. package/dist/cabinet/geometry/shared.d.ts.map +1 -0
  102. package/dist/cabinet/geometry/shared.js +356 -0
  103. package/dist/cabinet/geometry/sink.d.ts +29 -0
  104. package/dist/cabinet/geometry/sink.d.ts.map +1 -0
  105. package/dist/cabinet/geometry/sink.js +262 -0
  106. package/dist/cabinet/geometry.d.ts +6 -0
  107. package/dist/cabinet/geometry.d.ts.map +1 -0
  108. package/dist/cabinet/geometry.js +219 -0
  109. package/dist/cabinet/index.d.ts +5 -0
  110. package/dist/cabinet/index.d.ts.map +1 -0
  111. package/dist/cabinet/index.js +4 -0
  112. package/dist/cabinet/interaction.d.ts +15 -0
  113. package/dist/cabinet/interaction.d.ts.map +1 -0
  114. package/dist/cabinet/interaction.js +109 -0
  115. package/dist/cabinet/move-frame.d.ts +3 -0
  116. package/dist/cabinet/move-frame.d.ts.map +1 -0
  117. package/dist/cabinet/move-frame.js +252 -0
  118. package/dist/cabinet/paint.d.ts +2 -0
  119. package/dist/cabinet/paint.d.ts.map +1 -0
  120. package/dist/cabinet/paint.js +17 -0
  121. package/dist/cabinet/panel.d.ts +2 -0
  122. package/dist/cabinet/panel.d.ts.map +1 -0
  123. package/dist/cabinet/panel.js +356 -0
  124. package/dist/cabinet/parametrics.d.ts +4 -0
  125. package/dist/cabinet/parametrics.d.ts.map +1 -0
  126. package/dist/cabinet/parametrics.js +46 -0
  127. package/dist/cabinet/placement-status.d.ts +7 -0
  128. package/dist/cabinet/placement-status.d.ts.map +1 -0
  129. package/dist/cabinet/placement-status.js +6 -0
  130. package/dist/cabinet/placement-type.d.ts +9 -0
  131. package/dist/cabinet/placement-type.d.ts.map +1 -0
  132. package/dist/cabinet/placement-type.js +13 -0
  133. package/dist/cabinet/presets.d.ts +10 -0
  134. package/dist/cabinet/presets.d.ts.map +1 -0
  135. package/dist/cabinet/presets.js +168 -0
  136. package/dist/cabinet/quick-action-icons.d.ts +13 -0
  137. package/dist/cabinet/quick-action-icons.d.ts.map +1 -0
  138. package/dist/cabinet/quick-action-icons.js +29 -0
  139. package/dist/cabinet/quick-actions.d.ts +6 -0
  140. package/dist/cabinet/quick-actions.d.ts.map +1 -0
  141. package/dist/cabinet/quick-actions.js +203 -0
  142. package/dist/cabinet/run-layout.d.ts +94 -0
  143. package/dist/cabinet/run-layout.d.ts.map +1 -0
  144. package/dist/cabinet/run-layout.js +315 -0
  145. package/dist/cabinet/run-ops.d.ts +140 -0
  146. package/dist/cabinet/run-ops.d.ts.map +1 -0
  147. package/dist/cabinet/run-ops.js +1472 -0
  148. package/dist/cabinet/run-panel.d.ts +17 -0
  149. package/dist/cabinet/run-panel.d.ts.map +1 -0
  150. package/dist/cabinet/run-panel.js +220 -0
  151. package/dist/cabinet/scene-action.d.ts +8 -0
  152. package/dist/cabinet/scene-action.d.ts.map +1 -0
  153. package/dist/cabinet/scene-action.js +130 -0
  154. package/dist/cabinet/schema.d.ts +2 -0
  155. package/dist/cabinet/schema.d.ts.map +1 -0
  156. package/dist/cabinet/schema.js +1 -0
  157. package/dist/cabinet/slots.d.ts +4 -0
  158. package/dist/cabinet/slots.d.ts.map +1 -0
  159. package/dist/cabinet/slots.js +24 -0
  160. package/dist/cabinet/stack-transitions.d.ts +12 -0
  161. package/dist/cabinet/stack-transitions.d.ts.map +1 -0
  162. package/dist/cabinet/stack-transitions.js +112 -0
  163. package/dist/cabinet/stack.d.ts +102 -0
  164. package/dist/cabinet/stack.d.ts.map +1 -0
  165. package/dist/cabinet/stack.js +388 -0
  166. package/dist/cabinet/system.d.ts +13 -0
  167. package/dist/cabinet/system.d.ts.map +1 -0
  168. package/dist/cabinet/system.js +116 -0
  169. package/dist/cabinet/tool.d.ts +3 -0
  170. package/dist/cabinet/tool.d.ts.map +1 -0
  171. package/dist/cabinet/tool.js +850 -0
  172. package/dist/cabinet/tree-structure.d.ts +13 -0
  173. package/dist/cabinet/tree-structure.d.ts.map +1 -0
  174. package/dist/cabinet/tree-structure.js +138 -0
  175. package/dist/cabinet/wall-snap.d.ts +66 -0
  176. package/dist/cabinet/wall-snap.d.ts.map +1 -0
  177. package/dist/cabinet/wall-snap.js +255 -0
  178. package/dist/ceiling/boundary-editor.d.ts +17 -0
  179. package/dist/ceiling/boundary-editor.d.ts.map +1 -0
  180. package/dist/ceiling/boundary-editor.js +118 -0
  181. package/dist/ceiling/definition.d.ts +20 -0
  182. package/dist/ceiling/definition.d.ts.map +1 -0
  183. package/dist/ceiling/definition.js +161 -0
  184. package/dist/ceiling/floorplan-affordances.d.ts +181 -0
  185. package/dist/ceiling/floorplan-affordances.d.ts.map +1 -0
  186. package/dist/ceiling/floorplan-affordances.js +28 -0
  187. package/dist/ceiling/floorplan-move.d.ts +12 -0
  188. package/dist/ceiling/floorplan-move.d.ts.map +1 -0
  189. package/dist/ceiling/floorplan-move.js +16 -0
  190. package/dist/ceiling/floorplan.d.ts +9 -0
  191. package/dist/ceiling/floorplan.d.ts.map +1 -0
  192. package/dist/ceiling/floorplan.js +90 -0
  193. package/dist/ceiling/hole-editor.d.ts +10 -0
  194. package/dist/ceiling/hole-editor.d.ts.map +1 -0
  195. package/dist/ceiling/hole-editor.js +45 -0
  196. package/dist/ceiling/index.d.ts +3 -0
  197. package/dist/ceiling/index.d.ts.map +1 -0
  198. package/dist/ceiling/index.js +2 -0
  199. package/dist/ceiling/materials.d.ts +15 -0
  200. package/dist/ceiling/materials.d.ts.map +1 -0
  201. package/dist/ceiling/materials.js +61 -0
  202. package/dist/ceiling/move-tool.d.ts +6 -0
  203. package/dist/ceiling/move-tool.d.ts.map +1 -0
  204. package/dist/ceiling/move-tool.js +264 -0
  205. package/dist/ceiling/paint.d.ts +9 -0
  206. package/dist/ceiling/paint.d.ts.map +1 -0
  207. package/dist/ceiling/paint.js +37 -0
  208. package/dist/ceiling/panel.d.ts +11 -0
  209. package/dist/ceiling/panel.d.ts.map +1 -0
  210. package/dist/ceiling/panel.js +138 -0
  211. package/dist/ceiling/parametrics.d.ts +11 -0
  212. package/dist/ceiling/parametrics.d.ts.map +1 -0
  213. package/dist/ceiling/parametrics.js +16 -0
  214. package/dist/ceiling/renderer.d.ts +6 -0
  215. package/dist/ceiling/renderer.d.ts.map +1 -0
  216. package/dist/ceiling/renderer.js +87 -0
  217. package/dist/ceiling/schema.d.ts +2 -0
  218. package/dist/ceiling/schema.d.ts.map +1 -0
  219. package/dist/ceiling/schema.js +1 -0
  220. package/dist/ceiling/slots.d.ts +6 -0
  221. package/dist/ceiling/slots.d.ts.map +1 -0
  222. package/dist/ceiling/slots.js +7 -0
  223. package/dist/ceiling/system.d.ts +10 -0
  224. package/dist/ceiling/system.d.ts.map +1 -0
  225. package/dist/ceiling/system.js +14 -0
  226. package/dist/ceiling/tool.d.ts +3 -0
  227. package/dist/ceiling/tool.d.ts.map +1 -0
  228. package/dist/ceiling/tool.js +227 -0
  229. package/dist/chimney/definition.d.ts +18 -0
  230. package/dist/chimney/definition.d.ts.map +1 -0
  231. package/dist/chimney/definition.js +387 -0
  232. package/dist/chimney/floorplan.d.ts +17 -0
  233. package/dist/chimney/floorplan.d.ts.map +1 -0
  234. package/dist/chimney/floorplan.js +190 -0
  235. package/dist/chimney/geometry.d.ts +29 -0
  236. package/dist/chimney/geometry.d.ts.map +1 -0
  237. package/dist/chimney/geometry.js +500 -0
  238. package/dist/chimney/holes.d.ts +30 -0
  239. package/dist/chimney/holes.d.ts.map +1 -0
  240. package/dist/chimney/holes.js +310 -0
  241. package/dist/chimney/index.d.ts +4 -0
  242. package/dist/chimney/index.d.ts.map +1 -0
  243. package/dist/chimney/index.js +3 -0
  244. package/dist/chimney/move-tool.d.ts +19 -0
  245. package/dist/chimney/move-tool.d.ts.map +1 -0
  246. package/dist/chimney/move-tool.js +286 -0
  247. package/dist/chimney/paint.d.ts +24 -0
  248. package/dist/chimney/paint.d.ts.map +1 -0
  249. package/dist/chimney/paint.js +96 -0
  250. package/dist/chimney/panel.d.ts +2 -0
  251. package/dist/chimney/panel.d.ts.map +1 -0
  252. package/dist/chimney/panel.js +350 -0
  253. package/dist/chimney/parametrics.d.ts +4 -0
  254. package/dist/chimney/parametrics.d.ts.map +1 -0
  255. package/dist/chimney/parametrics.js +177 -0
  256. package/dist/chimney/presets.d.ts +27 -0
  257. package/dist/chimney/presets.d.ts.map +1 -0
  258. package/dist/chimney/presets.js +93 -0
  259. package/dist/chimney/preview.d.ts +14 -0
  260. package/dist/chimney/preview.d.ts.map +1 -0
  261. package/dist/chimney/preview.js +74 -0
  262. package/dist/chimney/renderer.d.ts +17 -0
  263. package/dist/chimney/renderer.d.ts.map +1 -0
  264. package/dist/chimney/renderer.js +193 -0
  265. package/dist/chimney/roof-trim.d.ts +23 -0
  266. package/dist/chimney/roof-trim.d.ts.map +1 -0
  267. package/dist/chimney/roof-trim.js +94 -0
  268. package/dist/chimney/schema.d.ts +2 -0
  269. package/dist/chimney/schema.d.ts.map +1 -0
  270. package/dist/chimney/schema.js +1 -0
  271. package/dist/chimney/tool.d.ts +3 -0
  272. package/dist/chimney/tool.d.ts.map +1 -0
  273. package/dist/chimney/tool.js +126 -0
  274. package/dist/column/definition.d.ts +21 -0
  275. package/dist/column/definition.d.ts.map +1 -0
  276. package/dist/column/definition.js +375 -0
  277. package/dist/column/floorplan-affordances.d.ts +32 -0
  278. package/dist/column/floorplan-affordances.d.ts.map +1 -0
  279. package/dist/column/floorplan-affordances.js +126 -0
  280. package/dist/column/floorplan-move.d.ts +11 -0
  281. package/dist/column/floorplan-move.d.ts.map +1 -0
  282. package/dist/column/floorplan-move.js +66 -0
  283. package/dist/column/floorplan.d.ts +15 -0
  284. package/dist/column/floorplan.d.ts.map +1 -0
  285. package/dist/column/floorplan.js +238 -0
  286. package/dist/column/index.d.ts +2 -0
  287. package/dist/column/index.d.ts.map +1 -0
  288. package/dist/column/index.js +1 -0
  289. package/dist/column/paint.d.ts +2 -0
  290. package/dist/column/paint.d.ts.map +1 -0
  291. package/dist/column/paint.js +15 -0
  292. package/dist/column/panel.d.ts +2 -0
  293. package/dist/column/panel.d.ts.map +1 -0
  294. package/dist/column/panel.js +414 -0
  295. package/dist/column/parametrics.d.ts +12 -0
  296. package/dist/column/parametrics.d.ts.map +1 -0
  297. package/dist/column/parametrics.js +21 -0
  298. package/dist/column/renderer.d.ts +20 -0
  299. package/dist/column/renderer.d.ts.map +1 -0
  300. package/dist/column/renderer.js +1016 -0
  301. package/dist/column/schema.d.ts +2 -0
  302. package/dist/column/schema.d.ts.map +1 -0
  303. package/dist/column/schema.js +1 -0
  304. package/dist/column/slots.d.ts +9 -0
  305. package/dist/column/slots.d.ts.map +1 -0
  306. package/dist/column/slots.js +19 -0
  307. package/dist/column/tool.d.ts +14 -0
  308. package/dist/column/tool.d.ts.map +1 -0
  309. package/dist/column/tool.js +133 -0
  310. package/dist/cupola/definition.d.ts +11 -0
  311. package/dist/cupola/definition.d.ts.map +1 -0
  312. package/dist/cupola/definition.js +143 -0
  313. package/dist/cupola/floorplan.d.ts +9 -0
  314. package/dist/cupola/floorplan.d.ts.map +1 -0
  315. package/dist/cupola/floorplan.js +89 -0
  316. package/dist/cupola/geometry.d.ts +23 -0
  317. package/dist/cupola/geometry.d.ts.map +1 -0
  318. package/dist/cupola/geometry.js +262 -0
  319. package/dist/cupola/index.d.ts +4 -0
  320. package/dist/cupola/index.d.ts.map +1 -0
  321. package/dist/cupola/index.js +3 -0
  322. package/dist/cupola/move-tool.d.ts +12 -0
  323. package/dist/cupola/move-tool.d.ts.map +1 -0
  324. package/dist/cupola/move-tool.js +206 -0
  325. package/dist/cupola/panel.d.ts +7 -0
  326. package/dist/cupola/panel.d.ts.map +1 -0
  327. package/dist/cupola/panel.js +106 -0
  328. package/dist/cupola/parametrics.d.ts +9 -0
  329. package/dist/cupola/parametrics.d.ts.map +1 -0
  330. package/dist/cupola/parametrics.js +30 -0
  331. package/dist/cupola/preview.d.ts +13 -0
  332. package/dist/cupola/preview.d.ts.map +1 -0
  333. package/dist/cupola/preview.js +37 -0
  334. package/dist/cupola/renderer.d.ts +12 -0
  335. package/dist/cupola/renderer.d.ts.map +1 -0
  336. package/dist/cupola/renderer.js +66 -0
  337. package/dist/cupola/schema.d.ts +2 -0
  338. package/dist/cupola/schema.d.ts.map +1 -0
  339. package/dist/cupola/schema.js +3 -0
  340. package/dist/cupola/tool.d.ts +8 -0
  341. package/dist/cupola/tool.d.ts.map +1 -0
  342. package/dist/cupola/tool.js +105 -0
  343. package/dist/door/definition.d.ts +23 -0
  344. package/dist/door/definition.d.ts.map +1 -0
  345. package/dist/door/definition.js +257 -0
  346. package/dist/door/door-math.d.ts +23 -0
  347. package/dist/door/door-math.d.ts.map +1 -0
  348. package/dist/door/door-math.js +38 -0
  349. package/dist/door/floorplan-affordances.d.ts +21 -0
  350. package/dist/door/floorplan-affordances.d.ts.map +1 -0
  351. package/dist/door/floorplan-affordances.js +102 -0
  352. package/dist/door/floorplan-move.d.ts +18 -0
  353. package/dist/door/floorplan-move.d.ts.map +1 -0
  354. package/dist/door/floorplan-move.js +239 -0
  355. package/dist/door/floorplan.d.ts +37 -0
  356. package/dist/door/floorplan.d.ts.map +1 -0
  357. package/dist/door/floorplan.js +702 -0
  358. package/dist/door/index.d.ts +3 -0
  359. package/dist/door/index.d.ts.map +1 -0
  360. package/dist/door/index.js +2 -0
  361. package/dist/door/move-tool.d.ts +6 -0
  362. package/dist/door/move-tool.d.ts.map +1 -0
  363. package/dist/door/move-tool.js +898 -0
  364. package/dist/door/paint.d.ts +8 -0
  365. package/dist/door/paint.d.ts.map +1 -0
  366. package/dist/door/paint.js +11 -0
  367. package/dist/door/panel.d.ts +2 -0
  368. package/dist/door/panel.d.ts.map +1 -0
  369. package/dist/door/panel.js +576 -0
  370. package/dist/door/parametrics.d.ts +12 -0
  371. package/dist/door/parametrics.d.ts.map +1 -0
  372. package/dist/door/parametrics.js +27 -0
  373. package/dist/door/preview.d.ts +18 -0
  374. package/dist/door/preview.d.ts.map +1 -0
  375. package/dist/door/preview.js +36 -0
  376. package/dist/door/renderer.d.ts +6 -0
  377. package/dist/door/renderer.d.ts.map +1 -0
  378. package/dist/door/renderer.js +26 -0
  379. package/dist/door/schema.d.ts +2 -0
  380. package/dist/door/schema.d.ts.map +1 -0
  381. package/dist/door/schema.js +1 -0
  382. package/dist/door/slots.d.ts +9 -0
  383. package/dist/door/slots.d.ts.map +1 -0
  384. package/dist/door/slots.js +20 -0
  385. package/dist/door/system.d.ts +18 -0
  386. package/dist/door/system.d.ts.map +1 -0
  387. package/dist/door/system.js +22 -0
  388. package/dist/door/tool.d.ts +15 -0
  389. package/dist/door/tool.d.ts.map +1 -0
  390. package/dist/door/tool.js +555 -0
  391. package/dist/dormer/csg-geometry.d.ts +104 -0
  392. package/dist/dormer/csg-geometry.d.ts.map +1 -0
  393. package/dist/dormer/csg-geometry.js +755 -0
  394. package/dist/dormer/definition.d.ts +20 -0
  395. package/dist/dormer/definition.d.ts.map +1 -0
  396. package/dist/dormer/definition.js +491 -0
  397. package/dist/dormer/floorplan.d.ts +23 -0
  398. package/dist/dormer/floorplan.d.ts.map +1 -0
  399. package/dist/dormer/floorplan.js +193 -0
  400. package/dist/dormer/geometry.d.ts +42 -0
  401. package/dist/dormer/geometry.d.ts.map +1 -0
  402. package/dist/dormer/geometry.js +63 -0
  403. package/dist/dormer/index.d.ts +5 -0
  404. package/dist/dormer/index.d.ts.map +1 -0
  405. package/dist/dormer/index.js +3 -0
  406. package/dist/dormer/move-tool.d.ts +16 -0
  407. package/dist/dormer/move-tool.d.ts.map +1 -0
  408. package/dist/dormer/move-tool.js +136 -0
  409. package/dist/dormer/paint.d.ts +24 -0
  410. package/dist/dormer/paint.d.ts.map +1 -0
  411. package/dist/dormer/paint.js +103 -0
  412. package/dist/dormer/panel-actions-section.d.ts +10 -0
  413. package/dist/dormer/panel-actions-section.d.ts.map +1 -0
  414. package/dist/dormer/panel-actions-section.js +11 -0
  415. package/dist/dormer/panel-position-section.d.ts +17 -0
  416. package/dist/dormer/panel-position-section.d.ts.map +1 -0
  417. package/dist/dormer/panel-position-section.js +162 -0
  418. package/dist/dormer/panel-window-section.d.ts +14 -0
  419. package/dist/dormer/panel-window-section.d.ts.map +1 -0
  420. package/dist/dormer/panel-window-section.js +59 -0
  421. package/dist/dormer/panel.d.ts +2 -0
  422. package/dist/dormer/panel.d.ts.map +1 -0
  423. package/dist/dormer/panel.js +134 -0
  424. package/dist/dormer/parametrics.d.ts +4 -0
  425. package/dist/dormer/parametrics.d.ts.map +1 -0
  426. package/dist/dormer/parametrics.js +110 -0
  427. package/dist/dormer/placement-guides.d.ts +28 -0
  428. package/dist/dormer/placement-guides.d.ts.map +1 -0
  429. package/dist/dormer/placement-guides.js +170 -0
  430. package/dist/dormer/preview.d.ts +7 -0
  431. package/dist/dormer/preview.d.ts.map +1 -0
  432. package/dist/dormer/preview.js +29 -0
  433. package/dist/dormer/renderer.d.ts +8 -0
  434. package/dist/dormer/renderer.d.ts.map +1 -0
  435. package/dist/dormer/renderer.js +134 -0
  436. package/dist/dormer/schema.d.ts +3 -0
  437. package/dist/dormer/schema.d.ts.map +1 -0
  438. package/dist/dormer/schema.js +1 -0
  439. package/dist/dormer/tool.d.ts +11 -0
  440. package/dist/dormer/tool.d.ts.map +1 -0
  441. package/dist/dormer/tool.js +69 -0
  442. package/dist/dormer/use-dormer-placement.d.ts +44 -0
  443. package/dist/dormer/use-dormer-placement.d.ts.map +1 -0
  444. package/dist/dormer/use-dormer-placement.js +166 -0
  445. package/dist/dormer/window-assembly.d.ts +22 -0
  446. package/dist/dormer/window-assembly.d.ts.map +1 -0
  447. package/dist/dormer/window-assembly.js +111 -0
  448. package/dist/dormer/window-frame.d.ts +24 -0
  449. package/dist/dormer/window-frame.d.ts.map +1 -0
  450. package/dist/dormer/window-frame.js +100 -0
  451. package/dist/downspout/definition.d.ts +17 -0
  452. package/dist/downspout/definition.d.ts.map +1 -0
  453. package/dist/downspout/definition.js +173 -0
  454. package/dist/downspout/geometry.d.ts +5 -0
  455. package/dist/downspout/geometry.d.ts.map +1 -0
  456. package/dist/downspout/geometry.js +204 -0
  457. package/dist/downspout/index.d.ts +4 -0
  458. package/dist/downspout/index.d.ts.map +1 -0
  459. package/dist/downspout/index.js +3 -0
  460. package/dist/downspout/inspector-editors.d.ts +25 -0
  461. package/dist/downspout/inspector-editors.d.ts.map +1 -0
  462. package/dist/downspout/inspector-editors.js +61 -0
  463. package/dist/downspout/parametrics.d.ts +4 -0
  464. package/dist/downspout/parametrics.d.ts.map +1 -0
  465. package/dist/downspout/parametrics.js +66 -0
  466. package/dist/downspout/preview.d.ts +19 -0
  467. package/dist/downspout/preview.d.ts.map +1 -0
  468. package/dist/downspout/preview.js +48 -0
  469. package/dist/downspout/renderer.d.ts +22 -0
  470. package/dist/downspout/renderer.d.ts.map +1 -0
  471. package/dist/downspout/renderer.js +153 -0
  472. package/dist/downspout/routing.d.ts +81 -0
  473. package/dist/downspout/routing.d.ts.map +1 -0
  474. package/dist/downspout/routing.js +131 -0
  475. package/dist/downspout/schema.d.ts +2 -0
  476. package/dist/downspout/schema.d.ts.map +1 -0
  477. package/dist/downspout/schema.js +3 -0
  478. package/dist/downspout/tool.d.ts +3 -0
  479. package/dist/downspout/tool.d.ts.map +1 -0
  480. package/dist/downspout/tool.js +148 -0
  481. package/dist/duct-fitting/definition.d.ts +12 -0
  482. package/dist/duct-fitting/definition.d.ts.map +1 -0
  483. package/dist/duct-fitting/definition.js +124 -0
  484. package/dist/duct-fitting/floorplan.d.ts +12 -0
  485. package/dist/duct-fitting/floorplan.d.ts.map +1 -0
  486. package/dist/duct-fitting/floorplan.js +59 -0
  487. package/dist/duct-fitting/geometry.d.ts +26 -0
  488. package/dist/duct-fitting/geometry.d.ts.map +1 -0
  489. package/dist/duct-fitting/geometry.js +341 -0
  490. package/dist/duct-fitting/index.d.ts +5 -0
  491. package/dist/duct-fitting/index.d.ts.map +1 -0
  492. package/dist/duct-fitting/index.js +4 -0
  493. package/dist/duct-fitting/inspector-editors.d.ts +6 -0
  494. package/dist/duct-fitting/inspector-editors.d.ts.map +1 -0
  495. package/dist/duct-fitting/inspector-editors.js +16 -0
  496. package/dist/duct-fitting/move-tool.d.ts +23 -0
  497. package/dist/duct-fitting/move-tool.d.ts.map +1 -0
  498. package/dist/duct-fitting/move-tool.js +302 -0
  499. package/dist/duct-fitting/parametrics.d.ts +4 -0
  500. package/dist/duct-fitting/parametrics.d.ts.map +1 -0
  501. package/dist/duct-fitting/parametrics.js +328 -0
  502. package/dist/duct-fitting/ports.d.ts +32 -0
  503. package/dist/duct-fitting/ports.d.ts.map +1 -0
  504. package/dist/duct-fitting/ports.js +140 -0
  505. package/dist/duct-fitting/schema.d.ts +2 -0
  506. package/dist/duct-fitting/schema.d.ts.map +1 -0
  507. package/dist/duct-fitting/schema.js +1 -0
  508. package/dist/duct-fitting/selection.d.ts +27 -0
  509. package/dist/duct-fitting/selection.d.ts.map +1 -0
  510. package/dist/duct-fitting/selection.js +677 -0
  511. package/dist/duct-fitting/tool.d.ts +18 -0
  512. package/dist/duct-fitting/tool.d.ts.map +1 -0
  513. package/dist/duct-fitting/tool.js +160 -0
  514. package/dist/duct-segment/definition.d.ts +4 -0
  515. package/dist/duct-segment/definition.d.ts.map +1 -0
  516. package/dist/duct-segment/definition.js +180 -0
  517. package/dist/duct-segment/floorplan.d.ts +12 -0
  518. package/dist/duct-segment/floorplan.d.ts.map +1 -0
  519. package/dist/duct-segment/floorplan.js +121 -0
  520. package/dist/duct-segment/geometry.d.ts +99 -0
  521. package/dist/duct-segment/geometry.d.ts.map +1 -0
  522. package/dist/duct-segment/geometry.js +368 -0
  523. package/dist/duct-segment/index.d.ts +4 -0
  524. package/dist/duct-segment/index.d.ts.map +1 -0
  525. package/dist/duct-segment/index.js +3 -0
  526. package/dist/duct-segment/move-tool.d.ts +22 -0
  527. package/dist/duct-segment/move-tool.d.ts.map +1 -0
  528. package/dist/duct-segment/move-tool.js +347 -0
  529. package/dist/duct-segment/parametrics.d.ts +4 -0
  530. package/dist/duct-segment/parametrics.d.ts.map +1 -0
  531. package/dist/duct-segment/parametrics.js +165 -0
  532. package/dist/duct-segment/schema.d.ts +2 -0
  533. package/dist/duct-segment/schema.d.ts.map +1 -0
  534. package/dist/duct-segment/schema.js +1 -0
  535. package/dist/duct-segment/selection.d.ts +34 -0
  536. package/dist/duct-segment/selection.d.ts.map +1 -0
  537. package/dist/duct-segment/selection.js +1395 -0
  538. package/dist/duct-segment/tool.d.ts +3 -0
  539. package/dist/duct-segment/tool.d.ts.map +1 -0
  540. package/dist/duct-segment/tool.js +924 -0
  541. package/dist/duct-terminal/definition.d.ts +13 -0
  542. package/dist/duct-terminal/definition.d.ts.map +1 -0
  543. package/dist/duct-terminal/definition.js +87 -0
  544. package/dist/duct-terminal/floorplan.d.ts +11 -0
  545. package/dist/duct-terminal/floorplan.d.ts.map +1 -0
  546. package/dist/duct-terminal/floorplan.js +61 -0
  547. package/dist/duct-terminal/geometry.d.ts +14 -0
  548. package/dist/duct-terminal/geometry.d.ts.map +1 -0
  549. package/dist/duct-terminal/geometry.js +78 -0
  550. package/dist/duct-terminal/index.d.ts +5 -0
  551. package/dist/duct-terminal/index.d.ts.map +1 -0
  552. package/dist/duct-terminal/index.js +4 -0
  553. package/dist/duct-terminal/parametrics.d.ts +4 -0
  554. package/dist/duct-terminal/parametrics.d.ts.map +1 -0
  555. package/dist/duct-terminal/parametrics.js +69 -0
  556. package/dist/duct-terminal/ports.d.ts +27 -0
  557. package/dist/duct-terminal/ports.d.ts.map +1 -0
  558. package/dist/duct-terminal/ports.js +60 -0
  559. package/dist/duct-terminal/schema.d.ts +2 -0
  560. package/dist/duct-terminal/schema.d.ts.map +1 -0
  561. package/dist/duct-terminal/schema.js +1 -0
  562. package/dist/duct-terminal/tool.d.ts +13 -0
  563. package/dist/duct-terminal/tool.d.ts.map +1 -0
  564. package/dist/duct-terminal/tool.js +360 -0
  565. package/dist/elevator/definition.d.ts +11 -0
  566. package/dist/elevator/definition.d.ts.map +1 -0
  567. package/dist/elevator/definition.js +255 -0
  568. package/dist/elevator/floorplan-affordances.d.ts +21 -0
  569. package/dist/elevator/floorplan-affordances.d.ts.map +1 -0
  570. package/dist/elevator/floorplan-affordances.js +94 -0
  571. package/dist/elevator/floorplan.d.ts +3 -0
  572. package/dist/elevator/floorplan.d.ts.map +1 -0
  573. package/dist/elevator/floorplan.js +360 -0
  574. package/dist/elevator/index.d.ts +2 -0
  575. package/dist/elevator/index.d.ts.map +1 -0
  576. package/dist/elevator/index.js +1 -0
  577. package/dist/elevator/paint.d.ts +2 -0
  578. package/dist/elevator/paint.d.ts.map +1 -0
  579. package/dist/elevator/paint.js +6 -0
  580. package/dist/elevator/panel.d.ts +2 -0
  581. package/dist/elevator/panel.d.ts.map +1 -0
  582. package/dist/elevator/panel.js +397 -0
  583. package/dist/elevator/parametrics.d.ts +3 -0
  584. package/dist/elevator/parametrics.d.ts.map +1 -0
  585. package/dist/elevator/parametrics.js +4 -0
  586. package/dist/elevator/renderer.d.ts +6 -0
  587. package/dist/elevator/renderer.d.ts.map +1 -0
  588. package/dist/elevator/renderer.js +583 -0
  589. package/dist/elevator/schema.d.ts +2 -0
  590. package/dist/elevator/schema.d.ts.map +1 -0
  591. package/dist/elevator/schema.js +1 -0
  592. package/dist/elevator/slots.d.ts +8 -0
  593. package/dist/elevator/slots.d.ts.map +1 -0
  594. package/dist/elevator/slots.js +17 -0
  595. package/dist/elevator/system.d.ts +8 -0
  596. package/dist/elevator/system.d.ts.map +1 -0
  597. package/dist/elevator/system.js +13 -0
  598. package/dist/eyebrow-vent/definition.d.ts +12 -0
  599. package/dist/eyebrow-vent/definition.d.ts.map +1 -0
  600. package/dist/eyebrow-vent/definition.js +150 -0
  601. package/dist/eyebrow-vent/floorplan.d.ts +9 -0
  602. package/dist/eyebrow-vent/floorplan.d.ts.map +1 -0
  603. package/dist/eyebrow-vent/floorplan.js +86 -0
  604. package/dist/eyebrow-vent/geometry.d.ts +25 -0
  605. package/dist/eyebrow-vent/geometry.d.ts.map +1 -0
  606. package/dist/eyebrow-vent/geometry.js +313 -0
  607. package/dist/eyebrow-vent/index.d.ts +4 -0
  608. package/dist/eyebrow-vent/index.d.ts.map +1 -0
  609. package/dist/eyebrow-vent/index.js +3 -0
  610. package/dist/eyebrow-vent/move-tool.d.ts +13 -0
  611. package/dist/eyebrow-vent/move-tool.d.ts.map +1 -0
  612. package/dist/eyebrow-vent/move-tool.js +207 -0
  613. package/dist/eyebrow-vent/panel.d.ts +7 -0
  614. package/dist/eyebrow-vent/panel.d.ts.map +1 -0
  615. package/dist/eyebrow-vent/panel.js +106 -0
  616. package/dist/eyebrow-vent/parametrics.d.ts +9 -0
  617. package/dist/eyebrow-vent/parametrics.d.ts.map +1 -0
  618. package/dist/eyebrow-vent/parametrics.js +31 -0
  619. package/dist/eyebrow-vent/preview.d.ts +13 -0
  620. package/dist/eyebrow-vent/preview.d.ts.map +1 -0
  621. package/dist/eyebrow-vent/preview.js +37 -0
  622. package/dist/eyebrow-vent/renderer.d.ts +12 -0
  623. package/dist/eyebrow-vent/renderer.d.ts.map +1 -0
  624. package/dist/eyebrow-vent/renderer.js +68 -0
  625. package/dist/eyebrow-vent/schema.d.ts +2 -0
  626. package/dist/eyebrow-vent/schema.d.ts.map +1 -0
  627. package/dist/eyebrow-vent/schema.js +3 -0
  628. package/dist/eyebrow-vent/tool.d.ts +9 -0
  629. package/dist/eyebrow-vent/tool.d.ts.map +1 -0
  630. package/dist/eyebrow-vent/tool.js +111 -0
  631. package/dist/fence/actions/move-endpoint.d.ts +32 -0
  632. package/dist/fence/actions/move-endpoint.d.ts.map +1 -0
  633. package/dist/fence/actions/move-endpoint.js +201 -0
  634. package/dist/fence/curve-tool.d.ts +17 -0
  635. package/dist/fence/curve-tool.d.ts.map +1 -0
  636. package/dist/fence/curve-tool.js +122 -0
  637. package/dist/fence/definition.d.ts +17 -0
  638. package/dist/fence/definition.d.ts.map +1 -0
  639. package/dist/fence/definition.js +281 -0
  640. package/dist/fence/floorplan-affordances.d.ts +31 -0
  641. package/dist/fence/floorplan-affordances.d.ts.map +1 -0
  642. package/dist/fence/floorplan-affordances.js +271 -0
  643. package/dist/fence/floorplan-move.d.ts +10 -0
  644. package/dist/fence/floorplan-move.d.ts.map +1 -0
  645. package/dist/fence/floorplan-move.js +162 -0
  646. package/dist/fence/floorplan.d.ts +4 -0
  647. package/dist/fence/floorplan.d.ts.map +1 -0
  648. package/dist/fence/floorplan.js +452 -0
  649. package/dist/fence/geometry.d.ts +6 -0
  650. package/dist/fence/geometry.d.ts.map +1 -0
  651. package/dist/fence/geometry.js +65 -0
  652. package/dist/fence/index.d.ts +3 -0
  653. package/dist/fence/index.d.ts.map +1 -0
  654. package/dist/fence/index.js +2 -0
  655. package/dist/fence/inspector-editors.d.ts +24 -0
  656. package/dist/fence/inspector-editors.d.ts.map +1 -0
  657. package/dist/fence/inspector-editors.js +43 -0
  658. package/dist/fence/move-control-point-tool.d.ts +9 -0
  659. package/dist/fence/move-control-point-tool.d.ts.map +1 -0
  660. package/dist/fence/move-control-point-tool.js +91 -0
  661. package/dist/fence/move-endpoint-tool.d.ts +27 -0
  662. package/dist/fence/move-endpoint-tool.d.ts.map +1 -0
  663. package/dist/fence/move-endpoint-tool.js +190 -0
  664. package/dist/fence/move-tangent-tool.d.ts +10 -0
  665. package/dist/fence/move-tangent-tool.d.ts.map +1 -0
  666. package/dist/fence/move-tangent-tool.js +88 -0
  667. package/dist/fence/move-tool.d.ts +6 -0
  668. package/dist/fence/move-tool.d.ts.map +1 -0
  669. package/dist/fence/move-tool.js +271 -0
  670. package/dist/fence/paint.d.ts +2 -0
  671. package/dist/fence/paint.d.ts.map +1 -0
  672. package/dist/fence/paint.js +17 -0
  673. package/dist/fence/parametrics.d.ts +16 -0
  674. package/dist/fence/parametrics.d.ts.map +1 -0
  675. package/dist/fence/parametrics.js +86 -0
  676. package/dist/fence/schema.d.ts +10 -0
  677. package/dist/fence/schema.d.ts.map +1 -0
  678. package/dist/fence/schema.js +9 -0
  679. package/dist/fence/slots.d.ts +10 -0
  680. package/dist/fence/slots.d.ts.map +1 -0
  681. package/dist/fence/slots.js +23 -0
  682. package/dist/fence/tool.d.ts +3 -0
  683. package/dist/fence/tool.d.ts.map +1 -0
  684. package/dist/fence/tool.js +563 -0
  685. package/dist/guide/definition.d.ts +10 -0
  686. package/dist/guide/definition.d.ts.map +1 -0
  687. package/dist/guide/definition.js +52 -0
  688. package/dist/guide/index.d.ts +2 -0
  689. package/dist/guide/index.d.ts.map +1 -0
  690. package/dist/guide/index.js +1 -0
  691. package/dist/guide/parametrics.d.ts +3 -0
  692. package/dist/guide/parametrics.d.ts.map +1 -0
  693. package/dist/guide/parametrics.js +3 -0
  694. package/dist/guide/renderer.d.ts +6 -0
  695. package/dist/guide/renderer.d.ts.map +1 -0
  696. package/dist/guide/renderer.js +52 -0
  697. package/dist/guide/schema.d.ts +2 -0
  698. package/dist/guide/schema.d.ts.map +1 -0
  699. package/dist/guide/schema.js +1 -0
  700. package/dist/guide/system.d.ts +3 -0
  701. package/dist/guide/system.d.ts.map +1 -0
  702. package/dist/guide/system.js +3 -0
  703. package/dist/gutter/corner-mitre.d.ts +88 -0
  704. package/dist/gutter/corner-mitre.d.ts.map +1 -0
  705. package/dist/gutter/corner-mitre.js +176 -0
  706. package/dist/gutter/definition.d.ts +19 -0
  707. package/dist/gutter/definition.d.ts.map +1 -0
  708. package/dist/gutter/definition.js +164 -0
  709. package/dist/gutter/downspouts-panel.d.ts +8 -0
  710. package/dist/gutter/downspouts-panel.d.ts.map +1 -0
  711. package/dist/gutter/downspouts-panel.js +111 -0
  712. package/dist/gutter/eave-align.d.ts +33 -0
  713. package/dist/gutter/eave-align.d.ts.map +1 -0
  714. package/dist/gutter/eave-align.js +50 -0
  715. package/dist/gutter/eave-snap.d.ts +45 -0
  716. package/dist/gutter/eave-snap.d.ts.map +1 -0
  717. package/dist/gutter/eave-snap.js +128 -0
  718. package/dist/gutter/floorplan.d.ts +18 -0
  719. package/dist/gutter/floorplan.d.ts.map +1 -0
  720. package/dist/gutter/floorplan.js +274 -0
  721. package/dist/gutter/geometry.d.ts +39 -0
  722. package/dist/gutter/geometry.d.ts.map +1 -0
  723. package/dist/gutter/geometry.js +532 -0
  724. package/dist/gutter/index.d.ts +4 -0
  725. package/dist/gutter/index.d.ts.map +1 -0
  726. package/dist/gutter/index.js +3 -0
  727. package/dist/gutter/length-snap.d.ts +16 -0
  728. package/dist/gutter/length-snap.d.ts.map +1 -0
  729. package/dist/gutter/length-snap.js +177 -0
  730. package/dist/gutter/move-tool.d.ts +21 -0
  731. package/dist/gutter/move-tool.d.ts.map +1 -0
  732. package/dist/gutter/move-tool.js +223 -0
  733. package/dist/gutter/outlet-lookup.d.ts +43 -0
  734. package/dist/gutter/outlet-lookup.d.ts.map +1 -0
  735. package/dist/gutter/outlet-lookup.js +50 -0
  736. package/dist/gutter/parametrics.d.ts +4 -0
  737. package/dist/gutter/parametrics.d.ts.map +1 -0
  738. package/dist/gutter/parametrics.js +62 -0
  739. package/dist/gutter/preview.d.ts +22 -0
  740. package/dist/gutter/preview.d.ts.map +1 -0
  741. package/dist/gutter/preview.js +57 -0
  742. package/dist/gutter/profile-geometry.d.ts +44 -0
  743. package/dist/gutter/profile-geometry.d.ts.map +1 -0
  744. package/dist/gutter/profile-geometry.js +56 -0
  745. package/dist/gutter/renderer.d.ts +22 -0
  746. package/dist/gutter/renderer.d.ts.map +1 -0
  747. package/dist/gutter/renderer.js +202 -0
  748. package/dist/gutter/schema.d.ts +2 -0
  749. package/dist/gutter/schema.d.ts.map +1 -0
  750. package/dist/gutter/schema.js +3 -0
  751. package/dist/gutter/tool.d.ts +25 -0
  752. package/dist/gutter/tool.d.ts.map +1 -0
  753. package/dist/gutter/tool.js +124 -0
  754. package/dist/hvac-equipment/definition.d.ts +13 -0
  755. package/dist/hvac-equipment/definition.d.ts.map +1 -0
  756. package/dist/hvac-equipment/definition.js +92 -0
  757. package/dist/hvac-equipment/floorplan.d.ts +10 -0
  758. package/dist/hvac-equipment/floorplan.d.ts.map +1 -0
  759. package/dist/hvac-equipment/floorplan.js +71 -0
  760. package/dist/hvac-equipment/geometry.d.ts +20 -0
  761. package/dist/hvac-equipment/geometry.d.ts.map +1 -0
  762. package/dist/hvac-equipment/geometry.js +701 -0
  763. package/dist/hvac-equipment/index.d.ts +5 -0
  764. package/dist/hvac-equipment/index.d.ts.map +1 -0
  765. package/dist/hvac-equipment/index.js +4 -0
  766. package/dist/hvac-equipment/parametrics.d.ts +4 -0
  767. package/dist/hvac-equipment/parametrics.d.ts.map +1 -0
  768. package/dist/hvac-equipment/parametrics.js +101 -0
  769. package/dist/hvac-equipment/ports.d.ts +36 -0
  770. package/dist/hvac-equipment/ports.d.ts.map +1 -0
  771. package/dist/hvac-equipment/ports.js +91 -0
  772. package/dist/hvac-equipment/schema.d.ts +2 -0
  773. package/dist/hvac-equipment/schema.d.ts.map +1 -0
  774. package/dist/hvac-equipment/schema.js +1 -0
  775. package/dist/hvac-equipment/tool.d.ts +11 -0
  776. package/dist/hvac-equipment/tool.d.ts.map +1 -0
  777. package/dist/hvac-equipment/tool.js +103 -0
  778. package/dist/index.d.ts +62 -0
  779. package/dist/index.d.ts.map +1 -0
  780. package/dist/index.js +158 -0
  781. package/dist/item/definition.d.ts +32 -0
  782. package/dist/item/definition.d.ts.map +1 -0
  783. package/dist/item/definition.js +309 -0
  784. package/dist/item/floorplan-move.d.ts +3 -0
  785. package/dist/item/floorplan-move.d.ts.map +1 -0
  786. package/dist/item/floorplan-move.js +307 -0
  787. package/dist/item/floorplan.d.ts +3 -0
  788. package/dist/item/floorplan.d.ts.map +1 -0
  789. package/dist/item/floorplan.js +204 -0
  790. package/dist/item/index.d.ts +3 -0
  791. package/dist/item/index.d.ts.map +1 -0
  792. package/dist/item/index.js +2 -0
  793. package/dist/item/model-loader.d.ts +18 -0
  794. package/dist/item/model-loader.d.ts.map +1 -0
  795. package/dist/item/model-loader.js +131 -0
  796. package/dist/item/move-tool.d.ts +6 -0
  797. package/dist/item/move-tool.d.ts.map +1 -0
  798. package/dist/item/move-tool.js +150 -0
  799. package/dist/item/paint.d.ts +3 -0
  800. package/dist/item/paint.d.ts.map +1 -0
  801. package/dist/item/paint.js +214 -0
  802. package/dist/item/panel.d.ts +16 -0
  803. package/dist/item/panel.d.ts.map +1 -0
  804. package/dist/item/panel.js +103 -0
  805. package/dist/item/parametrics.d.ts +12 -0
  806. package/dist/item/parametrics.d.ts.map +1 -0
  807. package/dist/item/parametrics.js +12 -0
  808. package/dist/item/renderer.d.ts +6 -0
  809. package/dist/item/renderer.d.ts.map +1 -0
  810. package/dist/item/renderer.js +425 -0
  811. package/dist/item/schema.d.ts +2 -0
  812. package/dist/item/schema.d.ts.map +1 -0
  813. package/dist/item/schema.js +1 -0
  814. package/dist/item/system.d.ts +11 -0
  815. package/dist/item/system.d.ts.map +1 -0
  816. package/dist/item/system.js +15 -0
  817. package/dist/item/tool.d.ts +3 -0
  818. package/dist/item/tool.d.ts.map +1 -0
  819. package/dist/item/tool.js +46 -0
  820. package/dist/level/definition.d.ts +9 -0
  821. package/dist/level/definition.d.ts.map +1 -0
  822. package/dist/level/definition.js +55 -0
  823. package/dist/level/index.d.ts +2 -0
  824. package/dist/level/index.d.ts.map +1 -0
  825. package/dist/level/index.js +1 -0
  826. package/dist/level/parametrics.d.ts +3 -0
  827. package/dist/level/parametrics.d.ts.map +1 -0
  828. package/dist/level/parametrics.js +3 -0
  829. package/dist/level/renderer.d.ts +6 -0
  830. package/dist/level/renderer.d.ts.map +1 -0
  831. package/dist/level/renderer.js +12 -0
  832. package/dist/level/schema.d.ts +2 -0
  833. package/dist/level/schema.d.ts.map +1 -0
  834. package/dist/level/schema.js +1 -0
  835. package/dist/level/system.d.ts +3 -0
  836. package/dist/level/system.d.ts.map +1 -0
  837. package/dist/level/system.js +3 -0
  838. package/dist/lineset/definition.d.ts +15 -0
  839. package/dist/lineset/definition.d.ts.map +1 -0
  840. package/dist/lineset/definition.js +118 -0
  841. package/dist/lineset/floorplan.d.ts +10 -0
  842. package/dist/lineset/floorplan.d.ts.map +1 -0
  843. package/dist/lineset/floorplan.js +78 -0
  844. package/dist/lineset/geometry.d.ts +20 -0
  845. package/dist/lineset/geometry.d.ts.map +1 -0
  846. package/dist/lineset/geometry.js +87 -0
  847. package/dist/lineset/index.d.ts +4 -0
  848. package/dist/lineset/index.d.ts.map +1 -0
  849. package/dist/lineset/index.js +3 -0
  850. package/dist/lineset/move-tool.d.ts +27 -0
  851. package/dist/lineset/move-tool.d.ts.map +1 -0
  852. package/dist/lineset/move-tool.js +256 -0
  853. package/dist/lineset/parametrics.d.ts +4 -0
  854. package/dist/lineset/parametrics.d.ts.map +1 -0
  855. package/dist/lineset/parametrics.js +34 -0
  856. package/dist/lineset/schema.d.ts +2 -0
  857. package/dist/lineset/schema.d.ts.map +1 -0
  858. package/dist/lineset/schema.js +1 -0
  859. package/dist/lineset/selection.d.ts +3 -0
  860. package/dist/lineset/selection.d.ts.map +1 -0
  861. package/dist/lineset/selection.js +3 -0
  862. package/dist/lineset/tool.d.ts +3 -0
  863. package/dist/lineset/tool.d.ts.map +1 -0
  864. package/dist/lineset/tool.js +298 -0
  865. package/dist/liquid-line/definition.d.ts +16 -0
  866. package/dist/liquid-line/definition.d.ts.map +1 -0
  867. package/dist/liquid-line/definition.js +110 -0
  868. package/dist/liquid-line/floorplan.d.ts +10 -0
  869. package/dist/liquid-line/floorplan.d.ts.map +1 -0
  870. package/dist/liquid-line/floorplan.js +66 -0
  871. package/dist/liquid-line/geometry.d.ts +16 -0
  872. package/dist/liquid-line/geometry.d.ts.map +1 -0
  873. package/dist/liquid-line/geometry.js +57 -0
  874. package/dist/liquid-line/index.d.ts +5 -0
  875. package/dist/liquid-line/index.d.ts.map +1 -0
  876. package/dist/liquid-line/index.js +4 -0
  877. package/dist/liquid-line/move-tool.d.ts +23 -0
  878. package/dist/liquid-line/move-tool.d.ts.map +1 -0
  879. package/dist/liquid-line/move-tool.js +231 -0
  880. package/dist/liquid-line/options.d.ts +16 -0
  881. package/dist/liquid-line/options.d.ts.map +1 -0
  882. package/dist/liquid-line/options.js +6 -0
  883. package/dist/liquid-line/parametrics.d.ts +4 -0
  884. package/dist/liquid-line/parametrics.d.ts.map +1 -0
  885. package/dist/liquid-line/parametrics.js +17 -0
  886. package/dist/liquid-line/schema.d.ts +2 -0
  887. package/dist/liquid-line/schema.d.ts.map +1 -0
  888. package/dist/liquid-line/schema.js +1 -0
  889. package/dist/liquid-line/selection.d.ts +3 -0
  890. package/dist/liquid-line/selection.d.ts.map +1 -0
  891. package/dist/liquid-line/selection.js +3 -0
  892. package/dist/liquid-line/tool.d.ts +3 -0
  893. package/dist/liquid-line/tool.d.ts.map +1 -0
  894. package/dist/liquid-line/tool.js +517 -0
  895. package/dist/measurement/definition.d.ts +4 -0
  896. package/dist/measurement/definition.d.ts.map +1 -0
  897. package/dist/measurement/definition.js +61 -0
  898. package/dist/measurement/edit.d.ts +9 -0
  899. package/dist/measurement/edit.d.ts.map +1 -0
  900. package/dist/measurement/edit.js +97 -0
  901. package/dist/measurement/floorplan-affordance.d.ts +3 -0
  902. package/dist/measurement/floorplan-affordance.d.ts.map +1 -0
  903. package/dist/measurement/floorplan-affordance.js +90 -0
  904. package/dist/measurement/floorplan.d.ts +3 -0
  905. package/dist/measurement/floorplan.d.ts.map +1 -0
  906. package/dist/measurement/floorplan.js +195 -0
  907. package/dist/measurement/index.d.ts +3 -0
  908. package/dist/measurement/index.d.ts.map +1 -0
  909. package/dist/measurement/index.js +2 -0
  910. package/dist/measurement/renderer.d.ts +8 -0
  911. package/dist/measurement/renderer.d.ts.map +1 -0
  912. package/dist/measurement/renderer.js +285 -0
  913. package/dist/measurement/resolve.d.ts +42 -0
  914. package/dist/measurement/resolve.d.ts.map +1 -0
  915. package/dist/measurement/resolve.js +207 -0
  916. package/dist/measurement/schema.d.ts +2 -0
  917. package/dist/measurement/schema.d.ts.map +1 -0
  918. package/dist/measurement/schema.js +1 -0
  919. package/dist/measurement/selection.d.ts +3 -0
  920. package/dist/measurement/selection.d.ts.map +1 -0
  921. package/dist/measurement/selection.js +259 -0
  922. package/dist/measurement/smart-surface.d.ts +4 -0
  923. package/dist/measurement/smart-surface.d.ts.map +1 -0
  924. package/dist/measurement/smart-surface.js +21 -0
  925. package/dist/measurement/smart-tool.d.ts +3 -0
  926. package/dist/measurement/smart-tool.d.ts.map +1 -0
  927. package/dist/measurement/smart-tool.js +264 -0
  928. package/dist/measurement/surface-query.d.ts +90 -0
  929. package/dist/measurement/surface-query.d.ts.map +1 -0
  930. package/dist/measurement/surface-query.js +519 -0
  931. package/dist/measurement/tool-router.d.ts +2 -0
  932. package/dist/measurement/tool-router.d.ts.map +1 -0
  933. package/dist/measurement/tool-router.js +9 -0
  934. package/dist/measurement/tool.d.ts +62 -0
  935. package/dist/measurement/tool.d.ts.map +1 -0
  936. package/dist/measurement/tool.js +1342 -0
  937. package/dist/pipe-fitting/definition.d.ts +10 -0
  938. package/dist/pipe-fitting/definition.d.ts.map +1 -0
  939. package/dist/pipe-fitting/definition.js +91 -0
  940. package/dist/pipe-fitting/floorplan.d.ts +10 -0
  941. package/dist/pipe-fitting/floorplan.d.ts.map +1 -0
  942. package/dist/pipe-fitting/floorplan.js +50 -0
  943. package/dist/pipe-fitting/geometry.d.ts +11 -0
  944. package/dist/pipe-fitting/geometry.d.ts.map +1 -0
  945. package/dist/pipe-fitting/geometry.js +31 -0
  946. package/dist/pipe-fitting/index.d.ts +5 -0
  947. package/dist/pipe-fitting/index.d.ts.map +1 -0
  948. package/dist/pipe-fitting/index.js +4 -0
  949. package/dist/pipe-fitting/move-tool.d.ts +30 -0
  950. package/dist/pipe-fitting/move-tool.d.ts.map +1 -0
  951. package/dist/pipe-fitting/move-tool.js +312 -0
  952. package/dist/pipe-fitting/parametrics.d.ts +4 -0
  953. package/dist/pipe-fitting/parametrics.d.ts.map +1 -0
  954. package/dist/pipe-fitting/parametrics.js +105 -0
  955. package/dist/pipe-fitting/ports.d.ts +26 -0
  956. package/dist/pipe-fitting/ports.d.ts.map +1 -0
  957. package/dist/pipe-fitting/ports.js +93 -0
  958. package/dist/pipe-fitting/schema.d.ts +2 -0
  959. package/dist/pipe-fitting/schema.d.ts.map +1 -0
  960. package/dist/pipe-fitting/schema.js +1 -0
  961. package/dist/pipe-fitting/selection.d.ts +3 -0
  962. package/dist/pipe-fitting/selection.d.ts.map +1 -0
  963. package/dist/pipe-fitting/selection.js +579 -0
  964. package/dist/pipe-fitting/tool.d.ts +19 -0
  965. package/dist/pipe-fitting/tool.d.ts.map +1 -0
  966. package/dist/pipe-fitting/tool.js +162 -0
  967. package/dist/pipe-segment/definition.d.ts +14 -0
  968. package/dist/pipe-segment/definition.d.ts.map +1 -0
  969. package/dist/pipe-segment/definition.js +116 -0
  970. package/dist/pipe-segment/floorplan.d.ts +9 -0
  971. package/dist/pipe-segment/floorplan.d.ts.map +1 -0
  972. package/dist/pipe-segment/floorplan.js +87 -0
  973. package/dist/pipe-segment/geometry.d.ts +16 -0
  974. package/dist/pipe-segment/geometry.d.ts.map +1 -0
  975. package/dist/pipe-segment/geometry.js +54 -0
  976. package/dist/pipe-segment/index.d.ts +4 -0
  977. package/dist/pipe-segment/index.d.ts.map +1 -0
  978. package/dist/pipe-segment/index.js +3 -0
  979. package/dist/pipe-segment/move-tool.d.ts +25 -0
  980. package/dist/pipe-segment/move-tool.d.ts.map +1 -0
  981. package/dist/pipe-segment/move-tool.js +254 -0
  982. package/dist/pipe-segment/parametrics.d.ts +4 -0
  983. package/dist/pipe-segment/parametrics.d.ts.map +1 -0
  984. package/dist/pipe-segment/parametrics.js +33 -0
  985. package/dist/pipe-segment/schema.d.ts +2 -0
  986. package/dist/pipe-segment/schema.d.ts.map +1 -0
  987. package/dist/pipe-segment/schema.js +1 -0
  988. package/dist/pipe-segment/selection.d.ts +31 -0
  989. package/dist/pipe-segment/selection.d.ts.map +1 -0
  990. package/dist/pipe-segment/selection.js +841 -0
  991. package/dist/pipe-segment/tool.d.ts +3 -0
  992. package/dist/pipe-segment/tool.d.ts.map +1 -0
  993. package/dist/pipe-segment/tool.js +595 -0
  994. package/dist/pipe-trap/definition.d.ts +10 -0
  995. package/dist/pipe-trap/definition.d.ts.map +1 -0
  996. package/dist/pipe-trap/definition.js +59 -0
  997. package/dist/pipe-trap/floorplan.d.ts +10 -0
  998. package/dist/pipe-trap/floorplan.d.ts.map +1 -0
  999. package/dist/pipe-trap/floorplan.js +41 -0
  1000. package/dist/pipe-trap/geometry.d.ts +16 -0
  1001. package/dist/pipe-trap/geometry.d.ts.map +1 -0
  1002. package/dist/pipe-trap/geometry.js +74 -0
  1003. package/dist/pipe-trap/index.d.ts +5 -0
  1004. package/dist/pipe-trap/index.d.ts.map +1 -0
  1005. package/dist/pipe-trap/index.js +4 -0
  1006. package/dist/pipe-trap/parametrics.d.ts +4 -0
  1007. package/dist/pipe-trap/parametrics.d.ts.map +1 -0
  1008. package/dist/pipe-trap/parametrics.js +16 -0
  1009. package/dist/pipe-trap/ports.d.ts +11 -0
  1010. package/dist/pipe-trap/ports.d.ts.map +1 -0
  1011. package/dist/pipe-trap/ports.js +32 -0
  1012. package/dist/pipe-trap/schema.d.ts +2 -0
  1013. package/dist/pipe-trap/schema.d.ts.map +1 -0
  1014. package/dist/pipe-trap/schema.js +1 -0
  1015. package/dist/pipe-trap/tool.d.ts +9 -0
  1016. package/dist/pipe-trap/tool.d.ts.map +1 -0
  1017. package/dist/pipe-trap/tool.js +99 -0
  1018. package/dist/ridge-vent/definition.d.ts +16 -0
  1019. package/dist/ridge-vent/definition.d.ts.map +1 -0
  1020. package/dist/ridge-vent/definition.js +195 -0
  1021. package/dist/ridge-vent/floorplan.d.ts +15 -0
  1022. package/dist/ridge-vent/floorplan.d.ts.map +1 -0
  1023. package/dist/ridge-vent/floorplan.js +121 -0
  1024. package/dist/ridge-vent/geometry.d.ts +22 -0
  1025. package/dist/ridge-vent/geometry.d.ts.map +1 -0
  1026. package/dist/ridge-vent/geometry.js +526 -0
  1027. package/dist/ridge-vent/index.d.ts +4 -0
  1028. package/dist/ridge-vent/index.d.ts.map +1 -0
  1029. package/dist/ridge-vent/index.js +3 -0
  1030. package/dist/ridge-vent/move-tool.d.ts +12 -0
  1031. package/dist/ridge-vent/move-tool.d.ts.map +1 -0
  1032. package/dist/ridge-vent/move-tool.js +210 -0
  1033. package/dist/ridge-vent/panel.d.ts +7 -0
  1034. package/dist/ridge-vent/panel.d.ts.map +1 -0
  1035. package/dist/ridge-vent/panel.js +118 -0
  1036. package/dist/ridge-vent/parametrics.d.ts +4 -0
  1037. package/dist/ridge-vent/parametrics.d.ts.map +1 -0
  1038. package/dist/ridge-vent/parametrics.js +28 -0
  1039. package/dist/ridge-vent/preview.d.ts +7 -0
  1040. package/dist/ridge-vent/preview.d.ts.map +1 -0
  1041. package/dist/ridge-vent/preview.js +31 -0
  1042. package/dist/ridge-vent/renderer.d.ts +20 -0
  1043. package/dist/ridge-vent/renderer.d.ts.map +1 -0
  1044. package/dist/ridge-vent/renderer.js +205 -0
  1045. package/dist/ridge-vent/schema.d.ts +2 -0
  1046. package/dist/ridge-vent/schema.d.ts.map +1 -0
  1047. package/dist/ridge-vent/schema.js +2 -0
  1048. package/dist/ridge-vent/tool.d.ts +8 -0
  1049. package/dist/ridge-vent/tool.d.ts.map +1 -0
  1050. package/dist/ridge-vent/tool.js +130 -0
  1051. package/dist/roof/definition.d.ts +16 -0
  1052. package/dist/roof/definition.d.ts.map +1 -0
  1053. package/dist/roof/definition.js +170 -0
  1054. package/dist/roof/floorplan.d.ts +21 -0
  1055. package/dist/roof/floorplan.d.ts.map +1 -0
  1056. package/dist/roof/floorplan.js +271 -0
  1057. package/dist/roof/index.d.ts +3 -0
  1058. package/dist/roof/index.d.ts.map +1 -0
  1059. package/dist/roof/index.js +2 -0
  1060. package/dist/roof/panel.d.ts +2 -0
  1061. package/dist/roof/panel.d.ts.map +1 -0
  1062. package/dist/roof/panel.js +214 -0
  1063. package/dist/roof/parametrics.d.ts +3 -0
  1064. package/dist/roof/parametrics.d.ts.map +1 -0
  1065. package/dist/roof/parametrics.js +4 -0
  1066. package/dist/roof/renderer.d.ts +6 -0
  1067. package/dist/roof/renderer.d.ts.map +1 -0
  1068. package/dist/roof/renderer.js +79 -0
  1069. package/dist/roof/roof-materials.d.ts +5 -0
  1070. package/dist/roof/roof-materials.d.ts.map +1 -0
  1071. package/dist/roof/roof-materials.js +43 -0
  1072. package/dist/roof/schema.d.ts +2 -0
  1073. package/dist/roof/schema.d.ts.map +1 -0
  1074. package/dist/roof/schema.js +1 -0
  1075. package/dist/roof/system.d.ts +3 -0
  1076. package/dist/roof/system.d.ts.map +1 -0
  1077. package/dist/roof/system.js +3 -0
  1078. package/dist/roof-segment/definition.d.ts +10 -0
  1079. package/dist/roof-segment/definition.d.ts.map +1 -0
  1080. package/dist/roof-segment/definition.js +305 -0
  1081. package/dist/roof-segment/floorplan-affordances.d.ts +31 -0
  1082. package/dist/roof-segment/floorplan-affordances.d.ts.map +1 -0
  1083. package/dist/roof-segment/floorplan-affordances.js +170 -0
  1084. package/dist/roof-segment/floorplan.d.ts +41 -0
  1085. package/dist/roof-segment/floorplan.d.ts.map +1 -0
  1086. package/dist/roof-segment/floorplan.js +265 -0
  1087. package/dist/roof-segment/index.d.ts +2 -0
  1088. package/dist/roof-segment/index.d.ts.map +1 -0
  1089. package/dist/roof-segment/index.js +1 -0
  1090. package/dist/roof-segment/measurement.d.ts +4 -0
  1091. package/dist/roof-segment/measurement.d.ts.map +1 -0
  1092. package/dist/roof-segment/measurement.js +64 -0
  1093. package/dist/roof-segment/panel.d.ts +2 -0
  1094. package/dist/roof-segment/panel.d.ts.map +1 -0
  1095. package/dist/roof-segment/panel.js +180 -0
  1096. package/dist/roof-segment/parametrics.d.ts +3 -0
  1097. package/dist/roof-segment/parametrics.d.ts.map +1 -0
  1098. package/dist/roof-segment/parametrics.js +4 -0
  1099. package/dist/roof-segment/renderer.d.ts +6 -0
  1100. package/dist/roof-segment/renderer.d.ts.map +1 -0
  1101. package/dist/roof-segment/renderer.js +93 -0
  1102. package/dist/roof-segment/schema.d.ts +2 -0
  1103. package/dist/roof-segment/schema.d.ts.map +1 -0
  1104. package/dist/roof-segment/schema.js +1 -0
  1105. package/dist/scan/definition.d.ts +9 -0
  1106. package/dist/scan/definition.d.ts.map +1 -0
  1107. package/dist/scan/definition.js +49 -0
  1108. package/dist/scan/index.d.ts +2 -0
  1109. package/dist/scan/index.d.ts.map +1 -0
  1110. package/dist/scan/index.js +1 -0
  1111. package/dist/scan/parametrics.d.ts +3 -0
  1112. package/dist/scan/parametrics.d.ts.map +1 -0
  1113. package/dist/scan/parametrics.js +3 -0
  1114. package/dist/scan/renderer.d.ts +6 -0
  1115. package/dist/scan/renderer.d.ts.map +1 -0
  1116. package/dist/scan/renderer.js +54 -0
  1117. package/dist/scan/schema.d.ts +2 -0
  1118. package/dist/scan/schema.d.ts.map +1 -0
  1119. package/dist/scan/schema.js +1 -0
  1120. package/dist/scan/system.d.ts +3 -0
  1121. package/dist/scan/system.d.ts.map +1 -0
  1122. package/dist/scan/system.js +3 -0
  1123. package/dist/shared/auto-fitting.d.ts +253 -0
  1124. package/dist/shared/auto-fitting.d.ts.map +1 -0
  1125. package/dist/shared/auto-fitting.js +659 -0
  1126. package/dist/shared/auto-offset-tag.d.ts +67 -0
  1127. package/dist/shared/auto-offset-tag.d.ts.map +1 -0
  1128. package/dist/shared/auto-offset-tag.js +94 -0
  1129. package/dist/shared/draw-alignment.d.ts +25 -0
  1130. package/dist/shared/draw-alignment.d.ts.map +1 -0
  1131. package/dist/shared/draw-alignment.js +30 -0
  1132. package/dist/shared/duct-body-paint.d.ts +6 -0
  1133. package/dist/shared/duct-body-paint.d.ts.map +1 -0
  1134. package/dist/shared/duct-body-paint.js +13 -0
  1135. package/dist/shared/fitting-endpoint-reaim.d.ts +72 -0
  1136. package/dist/shared/fitting-endpoint-reaim.d.ts.map +1 -0
  1137. package/dist/shared/fitting-endpoint-reaim.js +123 -0
  1138. package/dist/shared/fitting-rotation.d.ts +21 -0
  1139. package/dist/shared/fitting-rotation.d.ts.map +1 -0
  1140. package/dist/shared/fitting-rotation.js +39 -0
  1141. package/dist/shared/floor-placement.d.ts +25 -0
  1142. package/dist/shared/floor-placement.d.ts.map +1 -0
  1143. package/dist/shared/floor-placement.js +109 -0
  1144. package/dist/shared/floorplan-cursor.d.ts +11 -0
  1145. package/dist/shared/floorplan-cursor.d.ts.map +1 -0
  1146. package/dist/shared/floorplan-cursor.js +17 -0
  1147. package/dist/shared/ghost-alignment.d.ts +31 -0
  1148. package/dist/shared/ghost-alignment.d.ts.map +1 -0
  1149. package/dist/shared/ghost-alignment.js +29 -0
  1150. package/dist/shared/ghost-materials.d.ts +29 -0
  1151. package/dist/shared/ghost-materials.d.ts.map +1 -0
  1152. package/dist/shared/ghost-materials.js +81 -0
  1153. package/dist/shared/level-offset-group.d.ts +18 -0
  1154. package/dist/shared/level-offset-group.d.ts.map +1 -0
  1155. package/dist/shared/level-offset-group.js +31 -0
  1156. package/dist/shared/mep-ghost.d.ts +37 -0
  1157. package/dist/shared/mep-ghost.d.ts.map +1 -0
  1158. package/dist/shared/mep-ghost.js +83 -0
  1159. package/dist/shared/move-roof-tool.d.ts +6 -0
  1160. package/dist/shared/move-roof-tool.d.ts.map +1 -0
  1161. package/dist/shared/move-roof-tool.js +420 -0
  1162. package/dist/shared/opening-guides-runtime.d.ts +70 -0
  1163. package/dist/shared/opening-guides-runtime.d.ts.map +1 -0
  1164. package/dist/shared/opening-guides-runtime.js +182 -0
  1165. package/dist/shared/opening-placement-dimensions.d.ts +19 -0
  1166. package/dist/shared/opening-placement-dimensions.d.ts.map +1 -0
  1167. package/dist/shared/opening-placement-dimensions.js +152 -0
  1168. package/dist/shared/path-offset.d.ts +10 -0
  1169. package/dist/shared/path-offset.d.ts.map +1 -0
  1170. package/dist/shared/path-offset.js +74 -0
  1171. package/dist/shared/path-point-affordance.d.ts +34 -0
  1172. package/dist/shared/path-point-affordance.d.ts.map +1 -0
  1173. package/dist/shared/path-point-affordance.js +97 -0
  1174. package/dist/shared/path-segment-affordance.d.ts +33 -0
  1175. package/dist/shared/path-segment-affordance.d.ts.map +1 -0
  1176. package/dist/shared/path-segment-affordance.js +77 -0
  1177. package/dist/shared/pipe-run-translation-offset.d.ts +27 -0
  1178. package/dist/shared/pipe-run-translation-offset.d.ts.map +1 -0
  1179. package/dist/shared/pipe-run-translation-offset.js +131 -0
  1180. package/dist/shared/pipe-vertical-offset.d.ts +98 -0
  1181. package/dist/shared/pipe-vertical-offset.d.ts.map +1 -0
  1182. package/dist/shared/pipe-vertical-offset.js +836 -0
  1183. package/dist/shared/placeholder-geometry.d.ts +22 -0
  1184. package/dist/shared/placeholder-geometry.d.ts.map +1 -0
  1185. package/dist/shared/placeholder-geometry.js +31 -0
  1186. package/dist/shared/polygon-centroid-move.d.ts +21 -0
  1187. package/dist/shared/polygon-centroid-move.d.ts.map +1 -0
  1188. package/dist/shared/polygon-centroid-move.js +117 -0
  1189. package/dist/shared/polygon-measurement.d.ts +10 -0
  1190. package/dist/shared/polygon-measurement.d.ts.map +1 -0
  1191. package/dist/shared/polygon-measurement.js +35 -0
  1192. package/dist/shared/polygon-vertex-affordance.d.ts +108 -0
  1193. package/dist/shared/polygon-vertex-affordance.d.ts.map +1 -0
  1194. package/dist/shared/polygon-vertex-affordance.js +325 -0
  1195. package/dist/shared/ports.d.ts +75 -0
  1196. package/dist/shared/ports.d.ts.map +1 -0
  1197. package/dist/shared/ports.js +164 -0
  1198. package/dist/shared/quick-measurement.d.ts +8 -0
  1199. package/dist/shared/quick-measurement.d.ts.map +1 -0
  1200. package/dist/shared/quick-measurement.js +15 -0
  1201. package/dist/shared/refrigerant-line-selection.d.ts +4 -0
  1202. package/dist/shared/refrigerant-line-selection.d.ts.map +1 -0
  1203. package/dist/shared/refrigerant-line-selection.js +405 -0
  1204. package/dist/shared/relative-roof-drag.d.ts +18 -0
  1205. package/dist/shared/relative-roof-drag.d.ts.map +1 -0
  1206. package/dist/shared/relative-roof-drag.js +83 -0
  1207. package/dist/shared/ridge-snap.d.ts +31 -0
  1208. package/dist/shared/ridge-snap.d.ts.map +1 -0
  1209. package/dist/shared/ridge-snap.js +61 -0
  1210. package/dist/shared/roof-attachment-fallback-preview.d.ts +14 -0
  1211. package/dist/shared/roof-attachment-fallback-preview.d.ts.map +1 -0
  1212. package/dist/shared/roof-attachment-fallback-preview.js +84 -0
  1213. package/dist/shared/roof-face-host.d.ts +17 -0
  1214. package/dist/shared/roof-face-host.d.ts.map +1 -0
  1215. package/dist/shared/roof-face-host.js +24 -0
  1216. package/dist/shared/roof-opening-host.d.ts +66 -0
  1217. package/dist/shared/roof-opening-host.d.ts.map +1 -0
  1218. package/dist/shared/roof-opening-host.js +98 -0
  1219. package/dist/shared/roof-segment-hit.d.ts +34 -0
  1220. package/dist/shared/roof-segment-hit.d.ts.map +1 -0
  1221. package/dist/shared/roof-segment-hit.js +72 -0
  1222. package/dist/shared/roof-surface-placement-guides.d.ts +68 -0
  1223. package/dist/shared/roof-surface-placement-guides.d.ts.map +1 -0
  1224. package/dist/shared/roof-surface-placement-guides.js +716 -0
  1225. package/dist/shared/roof-surface.d.ts +20 -0
  1226. package/dist/shared/roof-surface.d.ts.map +1 -0
  1227. package/dist/shared/roof-surface.js +467 -0
  1228. package/dist/shared/roof-wall-opening-cut.d.ts +16 -0
  1229. package/dist/shared/roof-wall-opening-cut.d.ts.map +1 -0
  1230. package/dist/shared/roof-wall-opening-cut.js +52 -0
  1231. package/dist/shared/roof-wall-opening-placement.d.ts +53 -0
  1232. package/dist/shared/roof-wall-opening-placement.d.ts.map +1 -0
  1233. package/dist/shared/roof-wall-opening-placement.js +58 -0
  1234. package/dist/shared/rotate-affordance.d.ts +16 -0
  1235. package/dist/shared/rotate-affordance.d.ts.map +1 -0
  1236. package/dist/shared/rotate-affordance.js +20 -0
  1237. package/dist/shared/run-move-connectivity.d.ts +52 -0
  1238. package/dist/shared/run-move-connectivity.d.ts.map +1 -0
  1239. package/dist/shared/run-move-connectivity.js +82 -0
  1240. package/dist/shared/run-translation-offset.d.ts +24 -0
  1241. package/dist/shared/run-translation-offset.d.ts.map +1 -0
  1242. package/dist/shared/run-translation-offset.js +140 -0
  1243. package/dist/shared/selection-handles.d.ts +51 -0
  1244. package/dist/shared/selection-handles.d.ts.map +1 -0
  1245. package/dist/shared/selection-handles.js +74 -0
  1246. package/dist/shared/slot-paint.d.ts +46 -0
  1247. package/dist/shared/slot-paint.d.ts.map +1 -0
  1248. package/dist/shared/slot-paint.js +235 -0
  1249. package/dist/shared/surface-paint.d.ts +3 -0
  1250. package/dist/shared/surface-paint.d.ts.map +1 -0
  1251. package/dist/shared/surface-paint.js +41 -0
  1252. package/dist/shared/use-segment-trim-clip.d.ts +44 -0
  1253. package/dist/shared/use-segment-trim-clip.d.ts.map +1 -0
  1254. package/dist/shared/use-segment-trim-clip.js +149 -0
  1255. package/dist/shared/vertical-offset.d.ts +95 -0
  1256. package/dist/shared/vertical-offset.d.ts.map +1 -0
  1257. package/dist/shared/vertical-offset.js +851 -0
  1258. package/dist/shared/wall-attach-target.d.ts +109 -0
  1259. package/dist/shared/wall-attach-target.d.ts.map +1 -0
  1260. package/dist/shared/wall-attach-target.js +192 -0
  1261. package/dist/shared/wall-opening-alignment.d.ts +34 -0
  1262. package/dist/shared/wall-opening-alignment.d.ts.map +1 -0
  1263. package/dist/shared/wall-opening-alignment.js +113 -0
  1264. package/dist/shelf/definition.d.ts +4 -0
  1265. package/dist/shelf/definition.d.ts.map +1 -0
  1266. package/dist/shelf/definition.js +265 -0
  1267. package/dist/shelf/dimensions.d.ts +3 -0
  1268. package/dist/shelf/dimensions.d.ts.map +1 -0
  1269. package/dist/shelf/dimensions.js +15 -0
  1270. package/dist/shelf/floorplan-affordances.d.ts +26 -0
  1271. package/dist/shelf/floorplan-affordances.d.ts.map +1 -0
  1272. package/dist/shelf/floorplan-affordances.js +88 -0
  1273. package/dist/shelf/floorplan-move.d.ts +25 -0
  1274. package/dist/shelf/floorplan-move.d.ts.map +1 -0
  1275. package/dist/shelf/floorplan-move.js +90 -0
  1276. package/dist/shelf/floorplan.d.ts +20 -0
  1277. package/dist/shelf/floorplan.d.ts.map +1 -0
  1278. package/dist/shelf/floorplan.js +124 -0
  1279. package/dist/shelf/geometry.d.ts +15 -0
  1280. package/dist/shelf/geometry.d.ts.map +1 -0
  1281. package/dist/shelf/geometry.js +304 -0
  1282. package/dist/shelf/index.d.ts +4 -0
  1283. package/dist/shelf/index.d.ts.map +1 -0
  1284. package/dist/shelf/index.js +3 -0
  1285. package/dist/shelf/paint.d.ts +3 -0
  1286. package/dist/shelf/paint.d.ts.map +1 -0
  1287. package/dist/shelf/paint.js +181 -0
  1288. package/dist/shelf/parametrics.d.ts +14 -0
  1289. package/dist/shelf/parametrics.d.ts.map +1 -0
  1290. package/dist/shelf/parametrics.js +81 -0
  1291. package/dist/shelf/preview.d.ts +31 -0
  1292. package/dist/shelf/preview.d.ts.map +1 -0
  1293. package/dist/shelf/preview.js +77 -0
  1294. package/dist/shelf/schema.d.ts +2 -0
  1295. package/dist/shelf/schema.d.ts.map +1 -0
  1296. package/dist/shelf/schema.js +6 -0
  1297. package/dist/shelf/slots.d.ts +9 -0
  1298. package/dist/shelf/slots.d.ts.map +1 -0
  1299. package/dist/shelf/slots.js +30 -0
  1300. package/dist/shelf/tool.d.ts +3 -0
  1301. package/dist/shelf/tool.d.ts.map +1 -0
  1302. package/dist/shelf/tool.js +125 -0
  1303. package/dist/site/definition.d.ts +10 -0
  1304. package/dist/site/definition.d.ts.map +1 -0
  1305. package/dist/site/definition.js +54 -0
  1306. package/dist/site/index.d.ts +2 -0
  1307. package/dist/site/index.d.ts.map +1 -0
  1308. package/dist/site/index.js +1 -0
  1309. package/dist/site/parametrics.d.ts +3 -0
  1310. package/dist/site/parametrics.d.ts.map +1 -0
  1311. package/dist/site/parametrics.js +3 -0
  1312. package/dist/site/recessed-slab-ground-holes.d.ts +3 -0
  1313. package/dist/site/recessed-slab-ground-holes.d.ts.map +1 -0
  1314. package/dist/site/recessed-slab-ground-holes.js +46 -0
  1315. package/dist/site/renderer.d.ts +6 -0
  1316. package/dist/site/renderer.d.ts.map +1 -0
  1317. package/dist/site/renderer.js +196 -0
  1318. package/dist/site/schema.d.ts +2 -0
  1319. package/dist/site/schema.d.ts.map +1 -0
  1320. package/dist/site/schema.js +1 -0
  1321. package/dist/skylight/definition.d.ts +10 -0
  1322. package/dist/skylight/definition.d.ts.map +1 -0
  1323. package/dist/skylight/definition.js +268 -0
  1324. package/dist/skylight/floorplan.d.ts +16 -0
  1325. package/dist/skylight/floorplan.d.ts.map +1 -0
  1326. package/dist/skylight/floorplan.js +129 -0
  1327. package/dist/skylight/frame-csg.d.ts +4 -0
  1328. package/dist/skylight/frame-csg.d.ts.map +1 -0
  1329. package/dist/skylight/frame-csg.js +49 -0
  1330. package/dist/skylight/geometry.d.ts +7 -0
  1331. package/dist/skylight/geometry.d.ts.map +1 -0
  1332. package/dist/skylight/geometry.js +114 -0
  1333. package/dist/skylight/index.d.ts +5 -0
  1334. package/dist/skylight/index.d.ts.map +1 -0
  1335. package/dist/skylight/index.js +4 -0
  1336. package/dist/skylight/interaction.d.ts +11 -0
  1337. package/dist/skylight/interaction.d.ts.map +1 -0
  1338. package/dist/skylight/interaction.js +42 -0
  1339. package/dist/skylight/move-tool.d.ts +5 -0
  1340. package/dist/skylight/move-tool.d.ts.map +1 -0
  1341. package/dist/skylight/move-tool.js +233 -0
  1342. package/dist/skylight/panel.d.ts +2 -0
  1343. package/dist/skylight/panel.d.ts.map +1 -0
  1344. package/dist/skylight/panel.js +253 -0
  1345. package/dist/skylight/parametrics.d.ts +4 -0
  1346. package/dist/skylight/parametrics.d.ts.map +1 -0
  1347. package/dist/skylight/parametrics.js +99 -0
  1348. package/dist/skylight/preview.d.ts +7 -0
  1349. package/dist/skylight/preview.d.ts.map +1 -0
  1350. package/dist/skylight/preview.js +49 -0
  1351. package/dist/skylight/renderer.d.ts +6 -0
  1352. package/dist/skylight/renderer.d.ts.map +1 -0
  1353. package/dist/skylight/renderer.js +303 -0
  1354. package/dist/skylight/roof-cut.d.ts +21 -0
  1355. package/dist/skylight/roof-cut.d.ts.map +1 -0
  1356. package/dist/skylight/roof-cut.js +61 -0
  1357. package/dist/skylight/schema.d.ts +2 -0
  1358. package/dist/skylight/schema.d.ts.map +1 -0
  1359. package/dist/skylight/schema.js +1 -0
  1360. package/dist/skylight/system.d.ts +3 -0
  1361. package/dist/skylight/system.d.ts.map +1 -0
  1362. package/dist/skylight/system.js +49 -0
  1363. package/dist/skylight/tool.d.ts +3 -0
  1364. package/dist/skylight/tool.d.ts.map +1 -0
  1365. package/dist/skylight/tool.js +100 -0
  1366. package/dist/slab/boundary-editor.d.ts +24 -0
  1367. package/dist/slab/boundary-editor.d.ts.map +1 -0
  1368. package/dist/slab/boundary-editor.js +127 -0
  1369. package/dist/slab/definition.d.ts +20 -0
  1370. package/dist/slab/definition.d.ts.map +1 -0
  1371. package/dist/slab/definition.js +218 -0
  1372. package/dist/slab/floorplan-affordances.d.ts +177 -0
  1373. package/dist/slab/floorplan-affordances.d.ts.map +1 -0
  1374. package/dist/slab/floorplan-affordances.js +52 -0
  1375. package/dist/slab/floorplan-move.d.ts +12 -0
  1376. package/dist/slab/floorplan-move.d.ts.map +1 -0
  1377. package/dist/slab/floorplan-move.js +19 -0
  1378. package/dist/slab/floorplan.d.ts +20 -0
  1379. package/dist/slab/floorplan.d.ts.map +1 -0
  1380. package/dist/slab/floorplan.js +144 -0
  1381. package/dist/slab/geometry.d.ts +5 -0
  1382. package/dist/slab/geometry.d.ts.map +1 -0
  1383. package/dist/slab/geometry.js +133 -0
  1384. package/dist/slab/hole-editor.d.ts +14 -0
  1385. package/dist/slab/hole-editor.d.ts.map +1 -0
  1386. package/dist/slab/hole-editor.js +54 -0
  1387. package/dist/slab/index.d.ts +3 -0
  1388. package/dist/slab/index.d.ts.map +1 -0
  1389. package/dist/slab/index.js +2 -0
  1390. package/dist/slab/move-tool.d.ts +6 -0
  1391. package/dist/slab/move-tool.d.ts.map +1 -0
  1392. package/dist/slab/move-tool.js +232 -0
  1393. package/dist/slab/paint.d.ts +8 -0
  1394. package/dist/slab/paint.d.ts.map +1 -0
  1395. package/dist/slab/paint.js +26 -0
  1396. package/dist/slab/panel.d.ts +14 -0
  1397. package/dist/slab/panel.d.ts.map +1 -0
  1398. package/dist/slab/panel.js +144 -0
  1399. package/dist/slab/parametrics.d.ts +14 -0
  1400. package/dist/slab/parametrics.d.ts.map +1 -0
  1401. package/dist/slab/parametrics.js +19 -0
  1402. package/dist/slab/quick-measurement.d.ts +3 -0
  1403. package/dist/slab/quick-measurement.d.ts.map +1 -0
  1404. package/dist/slab/quick-measurement.js +35 -0
  1405. package/dist/slab/schema.d.ts +2 -0
  1406. package/dist/slab/schema.d.ts.map +1 -0
  1407. package/dist/slab/schema.js +1 -0
  1408. package/dist/slab/slots.d.ts +10 -0
  1409. package/dist/slab/slots.d.ts.map +1 -0
  1410. package/dist/slab/slots.js +20 -0
  1411. package/dist/slab/system.d.ts +3 -0
  1412. package/dist/slab/system.d.ts.map +1 -0
  1413. package/dist/slab/system.js +63 -0
  1414. package/dist/slab/tool.d.ts +3 -0
  1415. package/dist/slab/tool.d.ts.map +1 -0
  1416. package/dist/slab/tool.js +204 -0
  1417. package/dist/solar-panel/definition.d.ts +15 -0
  1418. package/dist/solar-panel/definition.d.ts.map +1 -0
  1419. package/dist/solar-panel/definition.js +260 -0
  1420. package/dist/solar-panel/floorplan.d.ts +21 -0
  1421. package/dist/solar-panel/floorplan.d.ts.map +1 -0
  1422. package/dist/solar-panel/floorplan.js +120 -0
  1423. package/dist/solar-panel/geometry.d.ts +29 -0
  1424. package/dist/solar-panel/geometry.d.ts.map +1 -0
  1425. package/dist/solar-panel/geometry.js +196 -0
  1426. package/dist/solar-panel/index.d.ts +5 -0
  1427. package/dist/solar-panel/index.d.ts.map +1 -0
  1428. package/dist/solar-panel/index.js +4 -0
  1429. package/dist/solar-panel/move-tool.d.ts +5 -0
  1430. package/dist/solar-panel/move-tool.d.ts.map +1 -0
  1431. package/dist/solar-panel/move-tool.js +257 -0
  1432. package/dist/solar-panel/panel.d.ts +2 -0
  1433. package/dist/solar-panel/panel.d.ts.map +1 -0
  1434. package/dist/solar-panel/panel.js +146 -0
  1435. package/dist/solar-panel/parametrics.d.ts +4 -0
  1436. package/dist/solar-panel/parametrics.d.ts.map +1 -0
  1437. package/dist/solar-panel/parametrics.js +52 -0
  1438. package/dist/solar-panel/preview.d.ts +7 -0
  1439. package/dist/solar-panel/preview.d.ts.map +1 -0
  1440. package/dist/solar-panel/preview.js +46 -0
  1441. package/dist/solar-panel/renderer.d.ts +26 -0
  1442. package/dist/solar-panel/renderer.d.ts.map +1 -0
  1443. package/dist/solar-panel/renderer.js +162 -0
  1444. package/dist/solar-panel/schema.d.ts +2 -0
  1445. package/dist/solar-panel/schema.d.ts.map +1 -0
  1446. package/dist/solar-panel/schema.js +1 -0
  1447. package/dist/solar-panel/tool.d.ts +11 -0
  1448. package/dist/solar-panel/tool.d.ts.map +1 -0
  1449. package/dist/solar-panel/tool.js +120 -0
  1450. package/dist/spawn/definition.d.ts +4 -0
  1451. package/dist/spawn/definition.d.ts.map +1 -0
  1452. package/dist/spawn/definition.js +107 -0
  1453. package/dist/spawn/floorplan-affordances.d.ts +3 -0
  1454. package/dist/spawn/floorplan-affordances.d.ts.map +1 -0
  1455. package/dist/spawn/floorplan-affordances.js +31 -0
  1456. package/dist/spawn/floorplan-move.d.ts +3 -0
  1457. package/dist/spawn/floorplan-move.d.ts.map +1 -0
  1458. package/dist/spawn/floorplan-move.js +31 -0
  1459. package/dist/spawn/floorplan.d.ts +14 -0
  1460. package/dist/spawn/floorplan.d.ts.map +1 -0
  1461. package/dist/spawn/floorplan.js +135 -0
  1462. package/dist/spawn/index.d.ts +3 -0
  1463. package/dist/spawn/index.d.ts.map +1 -0
  1464. package/dist/spawn/index.js +2 -0
  1465. package/dist/spawn/panel.d.ts +2 -0
  1466. package/dist/spawn/panel.d.ts.map +1 -0
  1467. package/dist/spawn/panel.js +71 -0
  1468. package/dist/spawn/parametrics.d.ts +8 -0
  1469. package/dist/spawn/parametrics.d.ts.map +1 -0
  1470. package/dist/spawn/parametrics.js +23 -0
  1471. package/dist/spawn/renderer.d.ts +16 -0
  1472. package/dist/spawn/renderer.d.ts.map +1 -0
  1473. package/dist/spawn/renderer.js +47 -0
  1474. package/dist/spawn/schema.d.ts +2 -0
  1475. package/dist/spawn/schema.d.ts.map +1 -0
  1476. package/dist/spawn/schema.js +5 -0
  1477. package/dist/spawn/tool.d.ts +10 -0
  1478. package/dist/spawn/tool.d.ts.map +1 -0
  1479. package/dist/spawn/tool.js +109 -0
  1480. package/dist/stair/definition.d.ts +9 -0
  1481. package/dist/stair/definition.d.ts.map +1 -0
  1482. package/dist/stair/definition.js +440 -0
  1483. package/dist/stair/floor-stack.d.ts +10 -0
  1484. package/dist/stair/floor-stack.d.ts.map +1 -0
  1485. package/dist/stair/floor-stack.js +77 -0
  1486. package/dist/stair/floorplan-affordances.d.ts +53 -0
  1487. package/dist/stair/floorplan-affordances.d.ts.map +1 -0
  1488. package/dist/stair/floorplan-affordances.js +266 -0
  1489. package/dist/stair/floorplan-move.d.ts +17 -0
  1490. package/dist/stair/floorplan-move.d.ts.map +1 -0
  1491. package/dist/stair/floorplan-move.js +64 -0
  1492. package/dist/stair/floorplan.d.ts +26 -0
  1493. package/dist/stair/floorplan.d.ts.map +1 -0
  1494. package/dist/stair/floorplan.js +455 -0
  1495. package/dist/stair/index.d.ts +2 -0
  1496. package/dist/stair/index.d.ts.map +1 -0
  1497. package/dist/stair/index.js +1 -0
  1498. package/dist/stair/paint.d.ts +2 -0
  1499. package/dist/stair/paint.d.ts.map +1 -0
  1500. package/dist/stair/paint.js +86 -0
  1501. package/dist/stair/panel.d.ts +2 -0
  1502. package/dist/stair/panel.d.ts.map +1 -0
  1503. package/dist/stair/panel.js +196 -0
  1504. package/dist/stair/parametrics.d.ts +3 -0
  1505. package/dist/stair/parametrics.d.ts.map +1 -0
  1506. package/dist/stair/parametrics.js +4 -0
  1507. package/dist/stair/renderer.d.ts +6 -0
  1508. package/dist/stair/renderer.d.ts.map +1 -0
  1509. package/dist/stair/renderer.js +667 -0
  1510. package/dist/stair/schema.d.ts +2 -0
  1511. package/dist/stair/schema.d.ts.map +1 -0
  1512. package/dist/stair/schema.js +1 -0
  1513. package/dist/stair/slots.d.ts +7 -0
  1514. package/dist/stair/slots.d.ts.map +1 -0
  1515. package/dist/stair/slots.js +13 -0
  1516. package/dist/stair/system.d.ts +3 -0
  1517. package/dist/stair/system.d.ts.map +1 -0
  1518. package/dist/stair/system.js +3 -0
  1519. package/dist/stair-segment/definition.d.ts +8 -0
  1520. package/dist/stair-segment/definition.d.ts.map +1 -0
  1521. package/dist/stair-segment/definition.js +133 -0
  1522. package/dist/stair-segment/index.d.ts +2 -0
  1523. package/dist/stair-segment/index.d.ts.map +1 -0
  1524. package/dist/stair-segment/index.js +1 -0
  1525. package/dist/stair-segment/panel.d.ts +2 -0
  1526. package/dist/stair-segment/panel.d.ts.map +1 -0
  1527. package/dist/stair-segment/panel.js +126 -0
  1528. package/dist/stair-segment/parametrics.d.ts +3 -0
  1529. package/dist/stair-segment/parametrics.d.ts.map +1 -0
  1530. package/dist/stair-segment/parametrics.js +4 -0
  1531. package/dist/stair-segment/renderer.d.ts +6 -0
  1532. package/dist/stair-segment/renderer.d.ts.map +1 -0
  1533. package/dist/stair-segment/renderer.js +55 -0
  1534. package/dist/stair-segment/schema.d.ts +2 -0
  1535. package/dist/stair-segment/schema.d.ts.map +1 -0
  1536. package/dist/stair-segment/schema.js +1 -0
  1537. package/dist/turbine-vent/definition.d.ts +24 -0
  1538. package/dist/turbine-vent/definition.d.ts.map +1 -0
  1539. package/dist/turbine-vent/definition.js +119 -0
  1540. package/dist/turbine-vent/floorplan.d.ts +13 -0
  1541. package/dist/turbine-vent/floorplan.d.ts.map +1 -0
  1542. package/dist/turbine-vent/floorplan.js +111 -0
  1543. package/dist/turbine-vent/geometry.d.ts +6 -0
  1544. package/dist/turbine-vent/geometry.d.ts.map +1 -0
  1545. package/dist/turbine-vent/geometry.js +284 -0
  1546. package/dist/turbine-vent/index.d.ts +4 -0
  1547. package/dist/turbine-vent/index.d.ts.map +1 -0
  1548. package/dist/turbine-vent/index.js +3 -0
  1549. package/dist/turbine-vent/move-tool.d.ts +13 -0
  1550. package/dist/turbine-vent/move-tool.d.ts.map +1 -0
  1551. package/dist/turbine-vent/move-tool.js +207 -0
  1552. package/dist/turbine-vent/panel.d.ts +8 -0
  1553. package/dist/turbine-vent/panel.d.ts.map +1 -0
  1554. package/dist/turbine-vent/panel.js +127 -0
  1555. package/dist/turbine-vent/parametrics.d.ts +9 -0
  1556. package/dist/turbine-vent/parametrics.d.ts.map +1 -0
  1557. package/dist/turbine-vent/parametrics.js +34 -0
  1558. package/dist/turbine-vent/preview.d.ts +14 -0
  1559. package/dist/turbine-vent/preview.d.ts.map +1 -0
  1560. package/dist/turbine-vent/preview.js +38 -0
  1561. package/dist/turbine-vent/renderer.d.ts +18 -0
  1562. package/dist/turbine-vent/renderer.d.ts.map +1 -0
  1563. package/dist/turbine-vent/renderer.js +107 -0
  1564. package/dist/turbine-vent/schema.d.ts +2 -0
  1565. package/dist/turbine-vent/schema.d.ts.map +1 -0
  1566. package/dist/turbine-vent/schema.js +3 -0
  1567. package/dist/turbine-vent/tool.d.ts +9 -0
  1568. package/dist/turbine-vent/tool.d.ts.map +1 -0
  1569. package/dist/turbine-vent/tool.js +111 -0
  1570. package/dist/wall/curve-tool.d.ts +14 -0
  1571. package/dist/wall/curve-tool.d.ts.map +1 -0
  1572. package/dist/wall/curve-tool.js +123 -0
  1573. package/dist/wall/definition.d.ts +19 -0
  1574. package/dist/wall/definition.d.ts.map +1 -0
  1575. package/dist/wall/definition.js +132 -0
  1576. package/dist/wall/floorplan-affordances.d.ts +13 -0
  1577. package/dist/wall/floorplan-affordances.d.ts.map +1 -0
  1578. package/dist/wall/floorplan-affordances.js +241 -0
  1579. package/dist/wall/floorplan-move.d.ts +32 -0
  1580. package/dist/wall/floorplan-move.d.ts.map +1 -0
  1581. package/dist/wall/floorplan-move.js +259 -0
  1582. package/dist/wall/floorplan-overrides.d.ts +22 -0
  1583. package/dist/wall/floorplan-overrides.d.ts.map +1 -0
  1584. package/dist/wall/floorplan-overrides.js +32 -0
  1585. package/dist/wall/floorplan.d.ts +23 -0
  1586. package/dist/wall/floorplan.d.ts.map +1 -0
  1587. package/dist/wall/floorplan.js +249 -0
  1588. package/dist/wall/index.d.ts +3 -0
  1589. package/dist/wall/index.d.ts.map +1 -0
  1590. package/dist/wall/index.js +2 -0
  1591. package/dist/wall/measurement.d.ts +5 -0
  1592. package/dist/wall/measurement.d.ts.map +1 -0
  1593. package/dist/wall/measurement.js +174 -0
  1594. package/dist/wall/move-endpoint-tool.d.ts +22 -0
  1595. package/dist/wall/move-endpoint-tool.d.ts.map +1 -0
  1596. package/dist/wall/move-endpoint-tool.js +450 -0
  1597. package/dist/wall/move-shared.d.ts +48 -0
  1598. package/dist/wall/move-shared.d.ts.map +1 -0
  1599. package/dist/wall/move-shared.js +162 -0
  1600. package/dist/wall/move-tool.d.ts +6 -0
  1601. package/dist/wall/move-tool.d.ts.map +1 -0
  1602. package/dist/wall/move-tool.js +523 -0
  1603. package/dist/wall/paint.d.ts +33 -0
  1604. package/dist/wall/paint.d.ts.map +1 -0
  1605. package/dist/wall/paint.js +176 -0
  1606. package/dist/wall/panel.d.ts +2 -0
  1607. package/dist/wall/panel.d.ts.map +1 -0
  1608. package/dist/wall/panel.js +198 -0
  1609. package/dist/wall/parametrics.d.ts +16 -0
  1610. package/dist/wall/parametrics.d.ts.map +1 -0
  1611. package/dist/wall/parametrics.js +30 -0
  1612. package/dist/wall/quick-measurement.d.ts +3 -0
  1613. package/dist/wall/quick-measurement.d.ts.map +1 -0
  1614. package/dist/wall/quick-measurement.js +30 -0
  1615. package/dist/wall/renderer.d.ts +25 -0
  1616. package/dist/wall/renderer.d.ts.map +1 -0
  1617. package/dist/wall/renderer.js +65 -0
  1618. package/dist/wall/schema.d.ts +12 -0
  1619. package/dist/wall/schema.d.ts.map +1 -0
  1620. package/dist/wall/schema.js +10 -0
  1621. package/dist/wall/slots.d.ts +10 -0
  1622. package/dist/wall/slots.d.ts.map +1 -0
  1623. package/dist/wall/slots.js +84 -0
  1624. package/dist/wall/system.d.ts +14 -0
  1625. package/dist/wall/system.d.ts.map +1 -0
  1626. package/dist/wall/system.js +18 -0
  1627. package/dist/wall/tool.d.ts +3 -0
  1628. package/dist/wall/tool.d.ts.map +1 -0
  1629. package/dist/wall/tool.js +628 -0
  1630. package/dist/wall/treatments.d.ts +26 -0
  1631. package/dist/wall/treatments.d.ts.map +1 -0
  1632. package/dist/wall/treatments.js +503 -0
  1633. package/dist/window/definition.d.ts +15 -0
  1634. package/dist/window/definition.d.ts.map +1 -0
  1635. package/dist/window/definition.js +237 -0
  1636. package/dist/window/floor-projection.d.ts +9 -0
  1637. package/dist/window/floor-projection.d.ts.map +1 -0
  1638. package/dist/window/floor-projection.js +84 -0
  1639. package/dist/window/floorplan-affordances.d.ts +22 -0
  1640. package/dist/window/floorplan-affordances.d.ts.map +1 -0
  1641. package/dist/window/floorplan-affordances.js +82 -0
  1642. package/dist/window/floorplan-move.d.ts +14 -0
  1643. package/dist/window/floorplan-move.d.ts.map +1 -0
  1644. package/dist/window/floorplan-move.js +223 -0
  1645. package/dist/window/floorplan.d.ts +16 -0
  1646. package/dist/window/floorplan.d.ts.map +1 -0
  1647. package/dist/window/floorplan.js +151 -0
  1648. package/dist/window/index.d.ts +3 -0
  1649. package/dist/window/index.d.ts.map +1 -0
  1650. package/dist/window/index.js +2 -0
  1651. package/dist/window/move-tool.d.ts +18 -0
  1652. package/dist/window/move-tool.d.ts.map +1 -0
  1653. package/dist/window/move-tool.js +914 -0
  1654. package/dist/window/paint.d.ts +8 -0
  1655. package/dist/window/paint.d.ts.map +1 -0
  1656. package/dist/window/paint.js +11 -0
  1657. package/dist/window/panel.d.ts +2 -0
  1658. package/dist/window/panel.d.ts.map +1 -0
  1659. package/dist/window/panel.js +384 -0
  1660. package/dist/window/parametrics.d.ts +11 -0
  1661. package/dist/window/parametrics.d.ts.map +1 -0
  1662. package/dist/window/parametrics.js +22 -0
  1663. package/dist/window/preview.d.ts +18 -0
  1664. package/dist/window/preview.d.ts.map +1 -0
  1665. package/dist/window/preview.js +36 -0
  1666. package/dist/window/renderer.d.ts +6 -0
  1667. package/dist/window/renderer.d.ts.map +1 -0
  1668. package/dist/window/renderer.js +37 -0
  1669. package/dist/window/schema.d.ts +2 -0
  1670. package/dist/window/schema.d.ts.map +1 -0
  1671. package/dist/window/schema.js +1 -0
  1672. package/dist/window/slots.d.ts +5 -0
  1673. package/dist/window/slots.d.ts.map +1 -0
  1674. package/dist/window/slots.js +11 -0
  1675. package/dist/window/system.d.ts +12 -0
  1676. package/dist/window/system.d.ts.map +1 -0
  1677. package/dist/window/system.js +16 -0
  1678. package/dist/window/tool.d.ts +13 -0
  1679. package/dist/window/tool.d.ts.map +1 -0
  1680. package/dist/window/tool.js +580 -0
  1681. package/dist/window/window-math.d.ts +31 -0
  1682. package/dist/window/window-math.d.ts.map +1 -0
  1683. package/dist/window/window-math.js +41 -0
  1684. package/dist/zone/definition.d.ts +10 -0
  1685. package/dist/zone/definition.d.ts.map +1 -0
  1686. package/dist/zone/definition.js +80 -0
  1687. package/dist/zone/floorplan-affordances.d.ts +81 -0
  1688. package/dist/zone/floorplan-affordances.d.ts.map +1 -0
  1689. package/dist/zone/floorplan-affordances.js +19 -0
  1690. package/dist/zone/floorplan-move.d.ts +13 -0
  1691. package/dist/zone/floorplan-move.d.ts.map +1 -0
  1692. package/dist/zone/floorplan-move.js +17 -0
  1693. package/dist/zone/floorplan.d.ts +13 -0
  1694. package/dist/zone/floorplan.d.ts.map +1 -0
  1695. package/dist/zone/floorplan.js +147 -0
  1696. package/dist/zone/index.d.ts +2 -0
  1697. package/dist/zone/index.d.ts.map +1 -0
  1698. package/dist/zone/index.js +1 -0
  1699. package/dist/zone/parametrics.d.ts +3 -0
  1700. package/dist/zone/parametrics.d.ts.map +1 -0
  1701. package/dist/zone/parametrics.js +4 -0
  1702. package/dist/zone/quantities-panel.d.ts +2 -0
  1703. package/dist/zone/quantities-panel.d.ts.map +1 -0
  1704. package/dist/zone/quantities-panel.js +83 -0
  1705. package/dist/zone/quick-measurement.d.ts +3 -0
  1706. package/dist/zone/quick-measurement.d.ts.map +1 -0
  1707. package/dist/zone/quick-measurement.js +29 -0
  1708. package/dist/zone/renderer.d.ts +6 -0
  1709. package/dist/zone/renderer.d.ts.map +1 -0
  1710. package/dist/zone/renderer.js +205 -0
  1711. package/dist/zone/schema.d.ts +2 -0
  1712. package/dist/zone/schema.d.ts.map +1 -0
  1713. package/dist/zone/schema.js +1 -0
  1714. package/dist/zone/system.d.ts +3 -0
  1715. package/dist/zone/system.d.ts.map +1 -0
  1716. package/dist/zone/system.js +3 -0
  1717. package/package.json +61 -0
@@ -0,0 +1,1472 @@
1
+ import { calculateLevelMiters, getWallPlanFootprint, resolveLevelId, selectionProxyIdFromMetadata, } from '@pascal-app/core';
2
+ import { moduleMaxX, moduleMinX, planToRunLocal, runLocalToPlan, runLocalXExtent, sideInsertX, } from './run-layout';
3
+ import { CabinetModuleNode as CabinetModuleNodeSchema, CabinetNode as CabinetNodeSchema, } from './schema';
4
+ import { backAnchoredModuleZ, hoodCompartmentHeight, newCabinetCompartment, stackForCabinet, } from './stack';
5
+ /**
6
+ * Kind-owned cabinet run mutations, shared by the properties panel, the
7
+ * quick-action menu, and the placement tool. Everything routes through
8
+ * `SceneApi` so each caller (panel with `useScene`, actions with the
9
+ * registry's api) gets identical behavior — these used to be copy-pasted
10
+ * per surface and had already drifted (gap checks, hood support, revision
11
+ * scope).
12
+ */
13
+ export const CABINET_BASE_WIDTH = 0.6;
14
+ export const CABINET_WALL_DEPTH = 0.32;
15
+ export const CABINET_WALL_CARCASS_HEIGHT = 0.72;
16
+ export const CABINET_TALL_DEPTH = 0.58;
17
+ export const CABINET_TALL_PLINTH_HEIGHT = 0.1;
18
+ export const CABINET_TALL_CARCASS_HEIGHT = 2.07;
19
+ export const CABINET_EDGE_EPSILON = 1e-4;
20
+ const MIN_CORNER_CONNECTED_WIDTH = 0.3;
21
+ const MIN_TRIMMED_CORNER_CONNECTED_WIDTH = 0.05;
22
+ const CORNER_WIDTH_SEARCH_STEP = 0.01;
23
+ const WALL_CLEARANCE_EPSILON = 1e-5;
24
+ export function cabinetMetadataRecord(metadata) {
25
+ return metadata && typeof metadata === 'object' && !Array.isArray(metadata)
26
+ ? metadata
27
+ : {};
28
+ }
29
+ function withSelectionProxyMetadata(metadata, proxyId) {
30
+ return {
31
+ ...cabinetMetadataRecord(metadata),
32
+ nodeSelectionProxyId: proxyId,
33
+ };
34
+ }
35
+ function cornerSourceLink(metadata) {
36
+ const record = cabinetMetadataRecord(metadata);
37
+ const value = record.cabinetCornerSourceLink;
38
+ if (!value || typeof value !== 'object' || Array.isArray(value))
39
+ return null;
40
+ const side = value.side;
41
+ const linkedRunIds = value.linkedRunIds;
42
+ if ((side !== 'left' && side !== 'right') || !Array.isArray(linkedRunIds))
43
+ return null;
44
+ return {
45
+ side,
46
+ linkedRunIds: linkedRunIds.filter((id) => typeof id === 'string'),
47
+ };
48
+ }
49
+ function cornerDerivedRunLink(metadata) {
50
+ const record = cabinetMetadataRecord(metadata);
51
+ const value = record.cabinetCornerDerivedRun;
52
+ if (!value || typeof value !== 'object' || Array.isArray(value))
53
+ return null;
54
+ const role = value.role;
55
+ const side = value.side;
56
+ const turnSide = value.turnSide;
57
+ const sourceModuleId = value.sourceModuleId;
58
+ const sourceRunId = value.sourceRunId;
59
+ if ((role !== 'base-leg' && role !== 'wall-leg' && role !== 'bridge') ||
60
+ (side !== 'left' && side !== 'right') ||
61
+ typeof sourceModuleId !== 'string' ||
62
+ typeof sourceRunId !== 'string') {
63
+ return null;
64
+ }
65
+ return {
66
+ role,
67
+ side,
68
+ turnSide: turnSide === 'left' || turnSide === 'right' ? turnSide : side,
69
+ sourceModuleId: sourceModuleId,
70
+ sourceRunId: sourceRunId,
71
+ };
72
+ }
73
+ /**
74
+ * Deleting one member of an L-corner group removes ONLY that node (plus its
75
+ * normal descendants) — never the other corner runs. These patches keep the
76
+ * metadata links consistent afterwards:
77
+ * - deleting a derived leg run → drop its id from the source module's
78
+ * `cabinetCornerSourceLink.linkedRunIds` (drop the link when empty);
79
+ * - deleting the source module → strip `cabinetCornerDerivedRun` from the
80
+ * surviving legs so they become plain independent runs.
81
+ * Patches targeting nodes that are also being deleted are skipped by the
82
+ * store, so deleting the whole source run (subtree cascade) stays clean.
83
+ */
84
+ export function cabinetCornerUnlinkPatchesOnDelete(node, nodes) {
85
+ const patches = [];
86
+ const sourceLink = cornerSourceLink(node.metadata);
87
+ if (sourceLink) {
88
+ for (const runId of sourceLink.linkedRunIds) {
89
+ const linkedRun = nodes[runId];
90
+ if (linkedRun?.type !== 'cabinet')
91
+ continue;
92
+ const metadata = cabinetMetadataRecord(linkedRun.metadata);
93
+ if (!('cabinetCornerDerivedRun' in metadata))
94
+ continue;
95
+ const { cabinetCornerDerivedRun: _dropped, ...rest } = metadata;
96
+ patches.push({ id: runId, data: { metadata: rest } });
97
+ }
98
+ }
99
+ const derivedLink = cornerDerivedRunLink(node.metadata);
100
+ if (derivedLink) {
101
+ const sourceModule = nodes[derivedLink.sourceModuleId];
102
+ if (sourceModule?.type === 'cabinet-module') {
103
+ const sourceModuleLink = cornerSourceLink(sourceModule.metadata);
104
+ if (sourceModuleLink) {
105
+ const remaining = sourceModuleLink.linkedRunIds.filter((id) => id !== node.id);
106
+ const metadata = cabinetMetadataRecord(sourceModule.metadata);
107
+ const { cabinetCornerSourceLink: _dropped, ...rest } = metadata;
108
+ patches.push({
109
+ id: sourceModule.id,
110
+ data: {
111
+ metadata: remaining.length > 0
112
+ ? {
113
+ ...rest,
114
+ cabinetCornerSourceLink: {
115
+ side: sourceModuleLink.side,
116
+ linkedRunIds: remaining,
117
+ },
118
+ }
119
+ : rest,
120
+ },
121
+ });
122
+ }
123
+ }
124
+ }
125
+ return patches;
126
+ }
127
+ /**
128
+ * A cabinet run is a grouping container — once its last child is deleted
129
+ * the empty run must go too, so no orphan group lingers in the scene graph
130
+ * or the persisted data. Children may be modules or derived corner leg
131
+ * runs (which position themselves relative to the run), so ANY survivor
132
+ * keeps the run alive. `pendingDeleteIds` covers multi-select deletes:
133
+ * siblings already part of the same gesture count as gone.
134
+ */
135
+ export function cabinetEmptyRunCascadeDeleteIds(node, nodes, pendingDeleteIds) {
136
+ const parent = node.parentId ? nodes[node.parentId] : undefined;
137
+ if (parent?.type !== 'cabinet')
138
+ return [];
139
+ const hasSurvivingChild = (parent.children ?? []).some((childId) => {
140
+ const id = childId;
141
+ if (id === node.id || pendingDeleteIds.has(id))
142
+ return false;
143
+ return nodes[id] != null;
144
+ });
145
+ return hasSurvivingChild ? [] : [parent.id];
146
+ }
147
+ /**
148
+ * Bump the run's layout revision — the geometryKey input that forces its
149
+ * composite geometry (spans, countertop, plinth) to re-flow when a child
150
+ * module changes in a way the run's own fields don't capture. Sibling runs
151
+ * are re-keyed separately by the adjacency watcher in `system.tsx`, so no
152
+ * level-wide sweep is needed here.
153
+ */
154
+ export function bumpCabinetRunLayoutRevision(sceneApi, run) {
155
+ const live = sceneApi.get(run.id) ?? run;
156
+ const metadata = cabinetMetadataRecord(live.metadata);
157
+ const currentRevision = typeof metadata.cabinetLayoutRevision === 'number' ? metadata.cabinetLayoutRevision : 0;
158
+ sceneApi.update(run.id, {
159
+ metadata: { ...metadata, cabinetLayoutRevision: currentRevision + 1 },
160
+ });
161
+ sceneApi.markDirty(run.id);
162
+ }
163
+ export function runModuleBaseY(run) {
164
+ return run.showPlinth ? run.plinthHeight : 0;
165
+ }
166
+ export function totalCabinetHeight(node) {
167
+ return ((node.showPlinth ? node.plinthHeight : 0) +
168
+ node.carcassHeight +
169
+ (node.withCountertop ? node.countertopThickness : 0));
170
+ }
171
+ /** Y where a wall cabinet's bottom lands so its top aligns with a tall unit's top. */
172
+ export function wallBottomHeightForTallAlignment() {
173
+ return (totalCabinetHeight({
174
+ showPlinth: true,
175
+ plinthHeight: CABINET_TALL_PLINTH_HEIGHT,
176
+ carcassHeight: CABINET_TALL_CARCASS_HEIGHT,
177
+ withCountertop: false,
178
+ countertopThickness: 0,
179
+ }) - CABINET_WALL_CARCASS_HEIGHT);
180
+ }
181
+ /** Local Z offset that makes a shallower wall cabinet's back flush with its deeper base. */
182
+ export function backAlignZ(baseDepth, wallDepth) {
183
+ return -(baseDepth - wallDepth) / 2;
184
+ }
185
+ export function wallChildOf(module, nodes) {
186
+ for (const childId of module.children ?? []) {
187
+ const child = nodes[childId];
188
+ if (child?.type === 'cabinet-module')
189
+ return child;
190
+ }
191
+ return null;
192
+ }
193
+ export function resolveCabinetType(module, run) {
194
+ if (module.cabinetType)
195
+ return module.cabinetType;
196
+ return run?.runTier === 'tall' ? 'tall' : 'base';
197
+ }
198
+ export function cabinetModulesForRun(run, nodes) {
199
+ return (run.children ?? [])
200
+ .map((id) => nodes[id])
201
+ .filter((child) => child?.type === 'cabinet-module');
202
+ }
203
+ export function cornerSourceModulesForRun(run, nodes) {
204
+ return cabinetModulesForRun(run, nodes).filter((module) => cornerSourceLink(module.metadata) != null);
205
+ }
206
+ function doorStack(shelfCount) {
207
+ return [{ ...newCabinetCompartment('door'), shelfCount }];
208
+ }
209
+ function cloneWallCabinetStack(sourceWallTop, shelfCount) {
210
+ if (!sourceWallTop)
211
+ return doorStack(shelfCount);
212
+ return stackForCabinet(sourceWallTop).map((compartment) => ({ ...compartment }));
213
+ }
214
+ function inheritedShelfCount(module) {
215
+ const door = stackForCabinet(module).find((compartment) => compartment.type === 'door');
216
+ return typeof door?.shelfCount === 'number' && door.shelfCount >= 0 ? door.shelfCount : 1;
217
+ }
218
+ function runBackLineZ(modules) {
219
+ return Math.min(...modules.map((module) => module.position[2] - module.depth / 2));
220
+ }
221
+ export function cornerLinkedSourceModuleForRun(run, nodes) {
222
+ return cornerSourceModulesForRun(run, nodes)[0] ?? null;
223
+ }
224
+ export function cornerStyleSourceForRun(run, nodes) {
225
+ const directSourceModule = cornerLinkedSourceModuleForRun(run, nodes);
226
+ if (directSourceModule)
227
+ return { module: directSourceModule, run };
228
+ const derivedLink = cornerDerivedRunLink(run.metadata);
229
+ if (!derivedLink)
230
+ return null;
231
+ const sourceRun = nodes[derivedLink.sourceRunId];
232
+ const sourceModule = nodes[derivedLink.sourceModuleId];
233
+ if (sourceRun?.type !== 'cabinet' || sourceModule?.type !== 'cabinet-module')
234
+ return null;
235
+ return { module: sourceModule, run: sourceRun };
236
+ }
237
+ function applyCabinetRunStylePatch(sceneApi, run, patch) {
238
+ if (Object.keys(patch).length === 0)
239
+ return;
240
+ sceneApi.update(run.id, patch);
241
+ for (const module of cabinetModulesForRun(run, sceneApi.nodes())) {
242
+ sceneApi.update(module.id, patch);
243
+ const wallChild = wallChildOf(module, sceneApi.nodes());
244
+ if (wallChild) {
245
+ sceneApi.update(wallChild.id, patch);
246
+ }
247
+ }
248
+ }
249
+ /**
250
+ * Push a style patch onto every corner run linked to a source module. Styles
251
+ * must reach the legs even when `syncDerivedCornerRun`'s geometric re-layout
252
+ * bails (a wall drawn later blocks the layout, a leg gained extra modules),
253
+ * so this applies the patch directly instead of riding on the layout sync.
254
+ */
255
+ function applyStylePatchToLinkedCornerRuns(sceneApi, sourceModule, patch) {
256
+ const link = cornerSourceLink(sourceModule.metadata);
257
+ if (!link)
258
+ return;
259
+ for (const runId of link.linkedRunIds) {
260
+ const linkedRun = sceneApi.get(runId);
261
+ if (linkedRun?.type !== 'cabinet')
262
+ continue;
263
+ applyCabinetRunStylePatch(sceneApi, linkedRun, patch);
264
+ }
265
+ }
266
+ export function syncCornerStyleGroupFromRun({ run, patch, sceneApi, }) {
267
+ if (Object.keys(patch).length === 0)
268
+ return false;
269
+ const source = cornerStyleSourceForRun(run, sceneApi.nodes());
270
+ if (!source)
271
+ return false;
272
+ const sourceRun = sceneApi.get(source.run.id) ?? source.run;
273
+ applyCabinetRunStylePatch(sceneApi, sourceRun, patch);
274
+ const cornerSources = cornerSourceModulesForRun(sourceRun, sceneApi.nodes());
275
+ const sourceModules = cornerSources.length > 0
276
+ ? cornerSources
277
+ : [sceneApi.get(source.module.id) ?? source.module];
278
+ for (const sourceModule of sourceModules) {
279
+ const liveModule = sceneApi.get(sourceModule.id) ?? sourceModule;
280
+ applyStylePatchToLinkedCornerRuns(sceneApi, liveModule, patch);
281
+ syncCornerRunsFromSourceModule({
282
+ module: liveModule,
283
+ run: sceneApi.get(sourceRun.id) ?? sourceRun,
284
+ sceneApi,
285
+ });
286
+ }
287
+ return true;
288
+ }
289
+ function chainModuleCenters(widths) {
290
+ const centers = [];
291
+ for (let index = 0; index < widths.length; index += 1) {
292
+ if (index === 0) {
293
+ centers.push(0);
294
+ continue;
295
+ }
296
+ centers.push(centers[index - 1] + (widths[index - 1] + widths[index]) / 2);
297
+ }
298
+ return centers;
299
+ }
300
+ function moduleWidthsFromPatches(patches) {
301
+ return patches.map((patch) => patch.width);
302
+ }
303
+ function rangesOverlap(minA, maxA, minB, maxB, epsilon = 1e-4) {
304
+ return Math.min(maxA, maxB) - Math.max(minA, minB) > epsilon;
305
+ }
306
+ function angleDelta(a, b) {
307
+ return Math.atan2(Math.sin(a - b), Math.cos(a - b));
308
+ }
309
+ function runPositionFromBackLeft({ backLeft, rotation, firstWidth, depth, y, }) {
310
+ const pseudoRun = {
311
+ position: [backLeft[0], y, backLeft[1]],
312
+ rotation,
313
+ };
314
+ return runLocalToPlan(pseudoRun, [firstWidth / 2, 0, depth / 2]);
315
+ }
316
+ function composePose(parentPosition, parentRotation, childPosition, childRotation = 0) {
317
+ const cos = Math.cos(parentRotation);
318
+ const sin = Math.sin(parentRotation);
319
+ const [lx, ly, lz] = childPosition;
320
+ return {
321
+ position: [
322
+ parentPosition[0] + lx * cos + lz * sin,
323
+ parentPosition[1] + ly,
324
+ parentPosition[2] - lx * sin + lz * cos,
325
+ ],
326
+ rotation: parentRotation + childRotation,
327
+ };
328
+ }
329
+ function resolveCabinetWorldTransform(node, nodes) {
330
+ const parent = node.parentId ? nodes[node.parentId] : null;
331
+ if (parent?.type === 'cabinet' || parent?.type === 'cabinet-module') {
332
+ const worldParent = resolveCabinetWorldTransform(parent, nodes);
333
+ return composePose(worldParent.position, worldParent.rotation, node.position, node.rotation);
334
+ }
335
+ return {
336
+ position: [...node.position],
337
+ rotation: node.rotation,
338
+ };
339
+ }
340
+ function worldToCabinetLocalPosition(parent, nodes, worldPosition) {
341
+ const frame = resolveCabinetWorldTransform(parent, nodes);
342
+ return planToRunLocal(frame, worldPosition[0], worldPosition[1] - frame.position[1], worldPosition[2]);
343
+ }
344
+ function worldToCabinetLocalRotation(parent, nodes, worldRotation) {
345
+ return worldRotation - resolveCabinetWorldTransform(parent, nodes).rotation;
346
+ }
347
+ function positionAlongWorldAxis(origin, axis, distance) {
348
+ return [origin[0] + axis[0] * distance, origin[1], origin[2] + axis[1] * distance];
349
+ }
350
+ function anchoredBridgeRunWorldPosition({ sourceWallTop, sourceRun, bridgeWidth, side, fallbackPosition, nodes, }) {
351
+ const sourceWallWorld = sourceWallTop?.type === 'cabinet-module'
352
+ ? resolveCabinetWorldTransform(sourceWallTop, nodes)
353
+ : null;
354
+ const sourceRunWorld = resolveCabinetWorldTransform(sourceRun, nodes);
355
+ const sourceAxis = [
356
+ Math.cos(sourceRunWorld.rotation),
357
+ -Math.sin(sourceRunWorld.rotation),
358
+ ];
359
+ return sourceWallWorld && typeof sourceWallTop?.width === 'number'
360
+ ? positionAlongWorldAxis(sourceWallWorld.position, sourceAxis, (side === 'right' ? 1 : -1) * (sourceWallTop.width / 2 + bridgeWidth / 2))
361
+ : fallbackPosition;
362
+ }
363
+ /** The cabinet-frame parent a derived corner run's placement is local to. */
364
+ function cabinetFrameParent(node, nodes) {
365
+ const parent = node.parentId ? nodes[node.parentId] : null;
366
+ return parent?.type === 'cabinet' || parent?.type === 'cabinet-module' ? parent : null;
367
+ }
368
+ function cornerSourceModulePatch({ module, side, width, }) {
369
+ const anchoredEdge = side === 'right' ? moduleMinX(module) : moduleMaxX(module);
370
+ return {
371
+ width,
372
+ position: [
373
+ side === 'right' ? anchoredEdge + width / 2 : anchoredEdge - width / 2,
374
+ module.position[1],
375
+ module.position[2],
376
+ ],
377
+ };
378
+ }
379
+ function adjustedCornerSourceModule(module, side, width) {
380
+ return {
381
+ ...module,
382
+ ...cornerSourceModulePatch({ module, side, width }),
383
+ };
384
+ }
385
+ function resolveCornerEndSide({ module, modules, preferredSide, }) {
386
+ const extent = runLocalXExtent(modules);
387
+ if (!extent)
388
+ return null;
389
+ const atLeftEnd = Math.abs(moduleMinX(module) - extent.minX) <= CABINET_EDGE_EPSILON;
390
+ const atRightEnd = Math.abs(moduleMaxX(module) - extent.maxX) <= CABINET_EDGE_EPSILON;
391
+ if (preferredSide === 'left' && atLeftEnd)
392
+ return 'left';
393
+ if (preferredSide === 'right' && atRightEnd)
394
+ return 'right';
395
+ if (atLeftEnd !== atRightEnd)
396
+ return atLeftEnd ? 'left' : 'right';
397
+ return null;
398
+ }
399
+ function resolveCabinetHostLevelId(node, nodes) {
400
+ const levelId = resolveLevelId(node, nodes);
401
+ return levelId ? levelId : null;
402
+ }
403
+ function overlappingPolygonXRangeWithinStrip(points, minZ, maxZ) {
404
+ const xs = [];
405
+ const withinStrip = (z) => z >= minZ - WALL_CLEARANCE_EPSILON && z <= maxZ + WALL_CLEARANCE_EPSILON;
406
+ for (const point of points) {
407
+ if (withinStrip(point.z))
408
+ xs.push(point.x);
409
+ }
410
+ for (let index = 0; index < points.length; index += 1) {
411
+ const a = points[index];
412
+ const b = points[(index + 1) % points.length];
413
+ const dz = b.z - a.z;
414
+ if (Math.abs(dz) <= WALL_CLEARANCE_EPSILON)
415
+ continue;
416
+ for (const boundary of [minZ, maxZ]) {
417
+ const t = (boundary - a.z) / dz;
418
+ if (t < -WALL_CLEARANCE_EPSILON || t > 1 + WALL_CLEARANCE_EPSILON)
419
+ continue;
420
+ xs.push(a.x + (b.x - a.x) * t);
421
+ }
422
+ }
423
+ if (xs.length === 0)
424
+ return null;
425
+ return {
426
+ minX: Math.min(...xs),
427
+ maxX: Math.max(...xs),
428
+ };
429
+ }
430
+ function resolveWallLimitedWidth({ backLeft, desiredWidth, depth, leadingOffset, nodes, rotation, sourceNode, }) {
431
+ const hostLevelId = resolveCabinetHostLevelId(sourceNode, nodes);
432
+ if (!hostLevelId)
433
+ return desiredWidth;
434
+ const walls = Object.values(nodes).filter((node) => node?.type === 'wall' &&
435
+ resolveLevelId(node, nodes) === hostLevelId);
436
+ if (walls.length === 0)
437
+ return desiredWidth;
438
+ const candidateRun = {
439
+ position: [backLeft[0], 0, backLeft[1]],
440
+ rotation,
441
+ };
442
+ const miterData = calculateLevelMiters(walls);
443
+ let blockingDistance = Number.POSITIVE_INFINITY;
444
+ for (const wall of walls) {
445
+ const footprint = getWallPlanFootprint(wall, miterData);
446
+ if (footprint.length < 3)
447
+ continue;
448
+ const localFootprint = footprint.map((point) => {
449
+ const local = planToRunLocal(candidateRun, point.x, 0, point.y);
450
+ return { x: local[0], z: local[2] };
451
+ });
452
+ const overlaps = [
453
+ overlappingPolygonXRangeWithinStrip(localFootprint, 0, depth),
454
+ overlappingPolygonXRangeWithinStrip(localFootprint, -depth, 0),
455
+ ].filter((overlap) => overlap != null);
456
+ if (overlaps.length === 0)
457
+ continue;
458
+ for (const overlap of overlaps) {
459
+ if (overlap.maxX <= WALL_CLEARANCE_EPSILON || overlap.minX <= WALL_CLEARANCE_EPSILON) {
460
+ continue;
461
+ }
462
+ blockingDistance = Math.min(blockingDistance, Math.max(0, overlap.minX));
463
+ }
464
+ }
465
+ if (!Number.isFinite(blockingDistance))
466
+ return desiredWidth;
467
+ const cappedWidth = Math.min(desiredWidth, blockingDistance - leadingOffset);
468
+ return Math.max(0, cappedWidth);
469
+ }
470
+ function resolveSideAddedModuleWidth({ centerX, centerZ, depth, desiredWidth, nodes, run, side, sourceNode, }) {
471
+ const hostLevelId = resolveCabinetHostLevelId(sourceNode, nodes);
472
+ if (!hostLevelId) {
473
+ return desiredWidth;
474
+ }
475
+ const walls = Object.values(nodes).filter((node) => node?.type === 'wall' &&
476
+ resolveLevelId(node, nodes) === hostLevelId);
477
+ if (walls.length === 0)
478
+ return desiredWidth;
479
+ const runWorld = resolveCabinetWorldTransform(run, nodes);
480
+ const miterData = calculateLevelMiters(walls);
481
+ const minZ = centerZ - depth / 2;
482
+ const maxZ = centerZ + depth / 2;
483
+ const anchorEdge = side === 'right' ? centerX - desiredWidth / 2 : centerX + desiredWidth / 2;
484
+ let cappedWidth = desiredWidth;
485
+ for (const wall of walls) {
486
+ const footprint = getWallPlanFootprint(wall, miterData);
487
+ if (footprint.length < 3)
488
+ continue;
489
+ const overlap = overlappingPolygonXRangeWithinStrip(footprint.map((point) => {
490
+ const local = planToRunLocal(runWorld, point.x, 0, point.y);
491
+ return { x: local[0], z: local[2] };
492
+ }), minZ, maxZ);
493
+ if (!overlap)
494
+ continue;
495
+ if (side === 'right') {
496
+ if (overlap.minX <= anchorEdge + WALL_CLEARANCE_EPSILON)
497
+ continue;
498
+ cappedWidth = Math.min(cappedWidth, Math.max(0, overlap.minX - anchorEdge));
499
+ continue;
500
+ }
501
+ if (overlap.maxX >= anchorEdge - WALL_CLEARANCE_EPSILON)
502
+ continue;
503
+ cappedWidth = Math.min(cappedWidth, Math.max(0, anchorEdge - overlap.maxX));
504
+ }
505
+ return cappedWidth;
506
+ }
507
+ function resolveCornerSourceSideWallLimitedWidth({ desiredWidth, module, nodes, run, side, }) {
508
+ const hostLevelId = resolveCabinetHostLevelId(module, nodes);
509
+ if (!hostLevelId)
510
+ return desiredWidth;
511
+ const walls = Object.values(nodes).filter((node) => node?.type === 'wall' &&
512
+ resolveLevelId(node, nodes) === hostLevelId);
513
+ if (walls.length === 0)
514
+ return desiredWidth;
515
+ const runWorld = resolveCabinetWorldTransform(run, nodes);
516
+ const miterData = calculateLevelMiters(walls);
517
+ const minZ = module.position[2] - module.depth / 2;
518
+ const maxZ = module.position[2] + module.depth / 2;
519
+ const centerZ = module.position[2];
520
+ const fixedEdge = side === 'right' ? moduleMinX(module) : moduleMaxX(module);
521
+ let cappedWidth = desiredWidth;
522
+ for (const wall of walls) {
523
+ const footprint = getWallPlanFootprint(wall, miterData);
524
+ if (footprint.length < 3)
525
+ continue;
526
+ const localFootprint = footprint.map((point) => {
527
+ const local = planToRunLocal(runWorld, point.x, 0, point.y);
528
+ return { x: local[0], z: local[2] };
529
+ });
530
+ const footprintMinZ = Math.min(...localFootprint.map((point) => point.z));
531
+ const footprintMaxZ = Math.max(...localFootprint.map((point) => point.z));
532
+ if (centerZ < footprintMinZ - WALL_CLEARANCE_EPSILON ||
533
+ centerZ > footprintMaxZ + WALL_CLEARANCE_EPSILON) {
534
+ continue;
535
+ }
536
+ const overlap = overlappingPolygonXRangeWithinStrip(localFootprint, minZ, maxZ);
537
+ if (!overlap)
538
+ continue;
539
+ if (side === 'right') {
540
+ if (overlap.maxX <= fixedEdge + WALL_CLEARANCE_EPSILON)
541
+ continue;
542
+ const maxSourceRight = overlap.minX - run.depth;
543
+ if (maxSourceRight <= fixedEdge + desiredWidth + WALL_CLEARANCE_EPSILON) {
544
+ cappedWidth = Math.min(cappedWidth, Math.max(0, maxSourceRight - fixedEdge));
545
+ }
546
+ continue;
547
+ }
548
+ if (overlap.minX >= fixedEdge - WALL_CLEARANCE_EPSILON)
549
+ continue;
550
+ const minSourceLeft = overlap.maxX + run.depth;
551
+ if (minSourceLeft >= fixedEdge - desiredWidth - WALL_CLEARANCE_EPSILON) {
552
+ cappedWidth = Math.min(cappedWidth, Math.max(0, fixedEdge - minSourceLeft));
553
+ }
554
+ }
555
+ return cappedWidth;
556
+ }
557
+ function computeCornerRunLayout({ module, run, nodes, side, turnSide = side, sourceModuleOverride, minConnectedWidth = MIN_CORNER_CONNECTED_WIDTH, }) {
558
+ const sourceModule = sourceModuleOverride ?? module;
559
+ const modules = cabinetModulesForRun(run, nodes).map((entry) => entry.id === sourceModule.id ? sourceModule : entry);
560
+ const extent = runLocalXExtent(modules);
561
+ if (!extent || modules.length === 0)
562
+ return null;
563
+ const runWorld = resolveCabinetWorldTransform(run, nodes);
564
+ const backZ = runBackLineZ(modules);
565
+ const cornerX = side === 'right' ? extent.maxX : extent.minX;
566
+ const corner = runLocalToPlan(runWorld, [cornerX, 0, backZ]);
567
+ const sourceAxis = [Math.cos(runWorld.rotation), -Math.sin(runWorld.rotation)];
568
+ const sign = side === 'right' ? 1 : -1;
569
+ const shiftedCorner = [
570
+ corner[0] + sign * run.depth * sourceAxis[0],
571
+ corner[2] + sign * run.depth * sourceAxis[1],
572
+ ];
573
+ const legRotation = turnSide === 'right' ? runWorld.rotation - Math.PI / 2 : runWorld.rotation + Math.PI / 2;
574
+ const legAxis = [Math.cos(legRotation), -Math.sin(legRotation)];
575
+ const connectedWidth = resolveWallLimitedWidth({
576
+ backLeft: side === 'right'
577
+ ? shiftedCorner
578
+ : [
579
+ shiftedCorner[0] - legAxis[0] * (run.depth + sourceModule.width),
580
+ shiftedCorner[1] - legAxis[1] * (run.depth + sourceModule.width),
581
+ ],
582
+ desiredWidth: sourceModule.width,
583
+ depth: run.depth,
584
+ leadingOffset: run.depth,
585
+ nodes,
586
+ rotation: legRotation,
587
+ sourceNode: sourceModule,
588
+ });
589
+ if (connectedWidth < minConnectedWidth - WALL_CLEARANCE_EPSILON)
590
+ return null;
591
+ const connectedShelfCount = inheritedShelfCount(module);
592
+ const baseLegLength = run.depth + connectedWidth;
593
+ const baseFirstWidth = side === 'right' ? run.depth : connectedWidth;
594
+ const baseBackLeft = side === 'right'
595
+ ? shiftedCorner
596
+ : [
597
+ shiftedCorner[0] - legAxis[0] * baseLegLength,
598
+ shiftedCorner[1] - legAxis[1] * baseLegLength,
599
+ ];
600
+ const baseRunPosition = runPositionFromBackLeft({
601
+ backLeft: baseBackLeft,
602
+ rotation: legRotation,
603
+ firstWidth: baseFirstWidth,
604
+ depth: run.depth,
605
+ y: runWorld.position[1],
606
+ });
607
+ const wallLegLength = run.depth + connectedWidth;
608
+ const wallFirstWidth = side === 'right' ? run.depth : connectedWidth;
609
+ const wallBackLeft = side === 'right'
610
+ ? shiftedCorner
611
+ : [
612
+ shiftedCorner[0] - legAxis[0] * wallLegLength,
613
+ shiftedCorner[1] - legAxis[1] * wallLegLength,
614
+ ];
615
+ const wallRunPosition = runPositionFromBackLeft({
616
+ backLeft: wallBackLeft,
617
+ rotation: legRotation,
618
+ firstWidth: wallFirstWidth,
619
+ depth: CABINET_WALL_DEPTH,
620
+ y: runWorld.position[1] + wallBottomHeightForTallAlignment(),
621
+ });
622
+ const bridgeWidth = Math.max(0.01, run.depth - CABINET_WALL_DEPTH);
623
+ const sourceCornerModule = side === 'right' ? modules.at(-1) : modules[0];
624
+ if (!sourceCornerModule)
625
+ return null;
626
+ const bridgeStartX = side === 'right' ? moduleMinX(sourceCornerModule) : moduleMinX(sourceCornerModule) - bridgeWidth;
627
+ const bridgeBackLeftPlan = runLocalToPlan(runWorld, [bridgeStartX, 0, backZ]);
628
+ const bridgeRunPosition = runPositionFromBackLeft({
629
+ backLeft: [bridgeBackLeftPlan[0], bridgeBackLeftPlan[2]],
630
+ rotation: runWorld.rotation,
631
+ firstWidth: side === 'right' ? sourceCornerModule.width : bridgeWidth,
632
+ depth: CABINET_WALL_DEPTH,
633
+ y: runWorld.position[1] + wallBottomHeightForTallAlignment(),
634
+ });
635
+ const bridgeFillerStartX = side === 'right' ? moduleMaxX(sourceCornerModule) : moduleMinX(sourceCornerModule) - bridgeWidth;
636
+ const bridgeFillerBackLeftPlan = runLocalToPlan(runWorld, [bridgeFillerStartX, 0, backZ]);
637
+ const bridgeFillerRunPosition = runPositionFromBackLeft({
638
+ backLeft: [bridgeFillerBackLeftPlan[0], bridgeFillerBackLeftPlan[2]],
639
+ rotation: runWorld.rotation,
640
+ firstWidth: bridgeWidth,
641
+ depth: CABINET_WALL_DEPTH,
642
+ y: runWorld.position[1] + wallBottomHeightForTallAlignment(),
643
+ });
644
+ return {
645
+ baseRunPosition,
646
+ wallRunPosition,
647
+ bridgeRunPosition,
648
+ bridgeFillerRunPosition,
649
+ legRotation,
650
+ connectedWidth,
651
+ connectedShelfCount,
652
+ bridgeWidth,
653
+ sourceCornerWidth: sourceCornerModule.width,
654
+ };
655
+ }
656
+ function resolveCornerAdditionLayout({ module, run, nodes, side, }) {
657
+ const modules = cabinetModulesForRun(run, nodes);
658
+ const endSide = resolveCornerEndSide({ module, modules, preferredSide: side });
659
+ if (!endSide)
660
+ return null;
661
+ const turnSide = side;
662
+ const maxSourceWidth = resolveCornerSourceSideWallLimitedWidth({
663
+ desiredWidth: module.width,
664
+ module,
665
+ nodes,
666
+ run,
667
+ side: endSide,
668
+ });
669
+ const sourceWasSideWallTrimmed = maxSourceWidth < module.width - CABINET_EDGE_EPSILON;
670
+ const minConnectedWidth = sourceWasSideWallTrimmed
671
+ ? MIN_TRIMMED_CORNER_CONNECTED_WIDTH
672
+ : MIN_CORNER_CONNECTED_WIDTH;
673
+ if (maxSourceWidth < minConnectedWidth - WALL_CLEARANCE_EPSILON)
674
+ return null;
675
+ const initialSourceModule = sourceWasSideWallTrimmed
676
+ ? adjustedCornerSourceModule(module, endSide, Number(maxSourceWidth.toFixed(4)))
677
+ : module;
678
+ const directLayout = computeCornerRunLayout({
679
+ module,
680
+ run,
681
+ nodes,
682
+ side: endSide,
683
+ turnSide,
684
+ sourceModuleOverride: initialSourceModule,
685
+ minConnectedWidth,
686
+ });
687
+ if (directLayout)
688
+ return { sourceModule: initialSourceModule, layout: directLayout, endSide, turnSide };
689
+ for (let sourceWidth = initialSourceModule.width - CORNER_WIDTH_SEARCH_STEP; sourceWidth >= minConnectedWidth - WALL_CLEARANCE_EPSILON; sourceWidth -= CORNER_WIDTH_SEARCH_STEP) {
690
+ const candidateModule = adjustedCornerSourceModule(module, endSide, Number(sourceWidth.toFixed(4)));
691
+ const layout = computeCornerRunLayout({
692
+ module,
693
+ run,
694
+ nodes,
695
+ side: endSide,
696
+ turnSide,
697
+ sourceModuleOverride: candidateModule,
698
+ minConnectedWidth,
699
+ });
700
+ if (layout)
701
+ return { sourceModule: candidateModule, layout, endSide, turnSide };
702
+ }
703
+ return null;
704
+ }
705
+ function uncoveredWallRunSegments({ depth, modulePatches, parentId, position, rotation, sceneApi, }) {
706
+ const moduleWidths = moduleWidthsFromPatches(modulePatches);
707
+ const centers = chainModuleCenters(moduleWidths);
708
+ const candidateModules = centers.map((center, index) => ({
709
+ index,
710
+ minX: center - moduleWidths[index] / 2,
711
+ maxX: center + moduleWidths[index] / 2,
712
+ minZ: -depth / 2,
713
+ maxZ: depth / 2,
714
+ }));
715
+ const candidateRun = { position, rotation };
716
+ const existingModules = [];
717
+ for (const node of Object.values(sceneApi.nodes())) {
718
+ if (node.type !== 'cabinet' || node.runTier !== 'wall')
719
+ continue;
720
+ const nodeWorld = resolveCabinetWorldTransform(node, sceneApi.nodes());
721
+ if (Math.abs(angleDelta(nodeWorld.rotation, rotation)) > 1e-3)
722
+ continue;
723
+ if (Math.abs(nodeWorld.position[1] - position[1]) > 1e-3)
724
+ continue;
725
+ const modules = cabinetModulesForRun(node, sceneApi.nodes());
726
+ if (modules.length === 0)
727
+ continue;
728
+ existingModules.push(...modules.map((module) => {
729
+ const world = runLocalToPlan(nodeWorld, module.position);
730
+ const local = planToRunLocal(candidateRun, world[0], 0, world[2]);
731
+ return {
732
+ minX: local[0] - module.width / 2,
733
+ maxX: local[0] + module.width / 2,
734
+ minZ: local[2] - module.depth / 2,
735
+ maxZ: local[2] + module.depth / 2,
736
+ };
737
+ }));
738
+ }
739
+ const uncoveredIndices = candidateModules
740
+ .filter((candidate) => !existingModules.some((existing) => rangesOverlap(candidate.minX, candidate.maxX, existing.minX, existing.maxX) &&
741
+ rangesOverlap(candidate.minZ, candidate.maxZ, existing.minZ, existing.maxZ)))
742
+ .map((candidate) => candidate.index);
743
+ if (uncoveredIndices.length === 0)
744
+ return [];
745
+ const segments = [];
746
+ let segmentStart = uncoveredIndices[0];
747
+ let previous = uncoveredIndices[0];
748
+ const pushSegment = (startIndex, endIndex) => {
749
+ segments.push({
750
+ modulePatches: modulePatches.slice(startIndex, endIndex + 1),
751
+ position: runLocalToPlan(candidateRun, [centers[startIndex] ?? 0, 0, 0]),
752
+ });
753
+ };
754
+ for (let index = 1; index < uncoveredIndices.length; index += 1) {
755
+ const current = uncoveredIndices[index];
756
+ if (current === previous + 1) {
757
+ previous = current;
758
+ continue;
759
+ }
760
+ pushSegment(segmentStart, previous);
761
+ segmentStart = current;
762
+ previous = current;
763
+ }
764
+ pushSegment(segmentStart, previous);
765
+ return segments;
766
+ }
767
+ function upsertCabinetRunWithModules({ depth, modulePatches, name, parentId, position, rotation, runTier, sceneApi, sourceRun, }) {
768
+ const run = CabinetNodeSchema.parse({
769
+ ...sourceRun,
770
+ id: undefined,
771
+ children: [],
772
+ parentId,
773
+ name,
774
+ position,
775
+ rotation,
776
+ runTier,
777
+ depth,
778
+ carcassHeight: runTier === 'wall' ? CABINET_WALL_CARCASS_HEIGHT : sourceRun.carcassHeight,
779
+ plinthHeight: runTier === 'base' ? sourceRun.plinthHeight : 0,
780
+ toeKickDepth: runTier === 'base' ? sourceRun.toeKickDepth : 0,
781
+ countertopThickness: runTier === 'base' ? sourceRun.countertopThickness : 0,
782
+ countertopOverhang: runTier === 'base' ? sourceRun.countertopOverhang : 0,
783
+ countertopBackOverhang: runTier === 'base' ? sourceRun.countertopBackOverhang : 0,
784
+ withFinishedBack: runTier === 'base' ? sourceRun.withFinishedBack : false,
785
+ showPlinth: runTier === 'base' ? sourceRun.showPlinth : false,
786
+ withCountertop: runTier === 'base' ? sourceRun.withCountertop : false,
787
+ barLedge: undefined,
788
+ withWaterfall: false,
789
+ });
790
+ sceneApi.upsert(run, parentId);
791
+ const centers = chainModuleCenters(modulePatches.map((module) => module.width));
792
+ const moduleIds = modulePatches.map((patch, index) => {
793
+ const module = CabinetModuleNodeSchema.parse({
794
+ ...CabinetModuleNodeSchema.parse({}),
795
+ name: patch.name,
796
+ parentId: run.id,
797
+ position: [centers[index] ?? 0, runTier === 'base' ? runModuleBaseY(run) : 0, 0],
798
+ cabinetType: runTier === 'tall' ? 'tall' : 'base',
799
+ width: patch.width,
800
+ depth,
801
+ carcassHeight: runTier === 'wall' ? CABINET_WALL_CARCASS_HEIGHT : run.carcassHeight,
802
+ plinthHeight: 0,
803
+ toeKickDepth: runTier === 'base' ? sourceRun.toeKickDepth : 0,
804
+ countertopThickness: runTier === 'base' ? sourceRun.countertopThickness : 0,
805
+ countertopOverhang: runTier === 'base' ? sourceRun.countertopOverhang : 0,
806
+ showPlinth: false,
807
+ withCountertop: false,
808
+ moduleKind: patch.moduleKind ?? 'standard',
809
+ ...(patch.openSide ? { openSide: patch.openSide } : {}),
810
+ ...(patch.cornerShelf ? { cornerShelf: true } : {}),
811
+ ...(patch.stack ? { stack: patch.stack } : {}),
812
+ });
813
+ sceneApi.upsert(module, run.id);
814
+ return module.id;
815
+ });
816
+ return { runId: run.id, moduleIds };
817
+ }
818
+ function childModuleByName(parent, name, nodes) {
819
+ for (const childId of parent.children ?? []) {
820
+ const child = nodes[childId];
821
+ if (child?.type === 'cabinet-module' && child.name === name)
822
+ return child;
823
+ }
824
+ return null;
825
+ }
826
+ export function previewCornerAdditionLayout({ module, run, nodes, side, }) {
827
+ const resolved = resolveCornerAdditionLayout({ module, run, nodes, side });
828
+ if (!resolved)
829
+ return null;
830
+ return {
831
+ connectedWidth: resolved.layout.connectedWidth,
832
+ sourceWidth: Math.min(resolved.sourceModule.width, resolved.layout.connectedWidth),
833
+ };
834
+ }
835
+ function setCabinetSelectionProxy(sceneApi, id, proxyId) {
836
+ const live = sceneApi.get(id);
837
+ if (!live || (live.type !== 'cabinet' && live.type !== 'cabinet-module'))
838
+ return;
839
+ sceneApi.update(id, {
840
+ metadata: withSelectionProxyMetadata(live.metadata, proxyId),
841
+ });
842
+ }
843
+ function cornerSelectionRootId(sourceRun, derivedRunId) {
844
+ return selectionProxyIdFromMetadata(sourceRun.metadata)
845
+ ? derivedRunId
846
+ : sourceRun.id;
847
+ }
848
+ function syncDerivedCornerRun({ role, run, sourceModule, sourceRun, side, turnSide, sceneApi, }) {
849
+ const layout = computeCornerRunLayout({
850
+ module: sourceModule,
851
+ run: sourceRun,
852
+ nodes: sceneApi.nodes(),
853
+ side,
854
+ turnSide,
855
+ });
856
+ if (!layout)
857
+ return;
858
+ const modules = [...cabinetModulesForRun(run, sceneApi.nodes())].sort((a, b) => a.position[0] - b.position[0]);
859
+ if (modules.length === 0)
860
+ return;
861
+ const fullSpecs = role === 'base-leg'
862
+ ? side === 'right'
863
+ ? [
864
+ ['Corner Filler', run.depth, 'right', 'corner-filler', true],
865
+ ['Base Cabinet', layout.connectedWidth, 'left', 'standard', false],
866
+ ]
867
+ : [
868
+ ['Base Cabinet', layout.connectedWidth, 'right', 'standard', false],
869
+ ['Corner Filler', run.depth, 'left', 'corner-filler', true],
870
+ ]
871
+ : role === 'wall-leg'
872
+ ? side === 'right'
873
+ ? [
874
+ ['Corner Wall Filler', sourceRun.depth, 'right', 'corner-filler', true],
875
+ ['Wall Cabinet', layout.connectedWidth, 'left', 'standard', false],
876
+ ]
877
+ : [
878
+ ['Wall Cabinet', layout.connectedWidth, 'right', 'standard', false],
879
+ ['Corner Wall Filler', sourceRun.depth, 'left', 'corner-filler', true],
880
+ ]
881
+ : side === 'right'
882
+ ? [
883
+ ['Wall Corner Cabinet', layout.sourceCornerWidth, 'right', 'standard', false],
884
+ ['Wall Bridge Filler', layout.bridgeWidth, 'left', 'corner-filler', true],
885
+ ]
886
+ : [
887
+ ['Wall Bridge Filler', layout.bridgeWidth, 'right', 'corner-filler', true],
888
+ ['Wall Corner Cabinet', layout.sourceCornerWidth, 'left', 'standard', false],
889
+ ];
890
+ const fullNames = fullSpecs.map(([name]) => name);
891
+ const fullWidths = fullSpecs.map(([, width]) => width);
892
+ const fullCenters = chainModuleCenters(fullWidths);
893
+ const specByName = new Map(fullSpecs.map(([name, width, openSide, moduleKind, cornerShelf]) => [
894
+ name,
895
+ {
896
+ width: width,
897
+ openSide: openSide,
898
+ moduleKind: moduleKind,
899
+ cornerShelf: cornerShelf,
900
+ },
901
+ ]));
902
+ const currentSpecs = modules.map((entry) => specByName.get(entry.name)).filter(Boolean);
903
+ if (currentSpecs.length !== modules.length)
904
+ return;
905
+ const currentWidths = currentSpecs.map((entry) => entry.width);
906
+ const currentCenters = chainModuleCenters(currentWidths);
907
+ const firstName = modules[0].name;
908
+ const firstIndex = fullNames.indexOf(firstName);
909
+ if (firstIndex < 0)
910
+ return;
911
+ const sourceWallTop = wallChildOf(sourceModule, sceneApi.nodes());
912
+ const isStandaloneBridgeFillerRun = role === 'bridge' && modules.length === 1 && modules[0]?.name === 'Wall Bridge Filler';
913
+ const bridgeAnchorPosition = isStandaloneBridgeFillerRun
914
+ ? anchoredBridgeRunWorldPosition({
915
+ sourceWallTop,
916
+ sourceRun,
917
+ bridgeWidth: layout.bridgeWidth,
918
+ side,
919
+ fallbackPosition: layout.bridgeFillerRunPosition,
920
+ nodes: sceneApi.nodes(),
921
+ })
922
+ : null;
923
+ const anchorPosition = role === 'base-leg'
924
+ ? layout.baseRunPosition
925
+ : role === 'wall-leg'
926
+ ? layout.wallRunPosition
927
+ : isStandaloneBridgeFillerRun
928
+ ? (bridgeAnchorPosition ?? layout.bridgeFillerRunPosition)
929
+ : layout.bridgeRunPosition;
930
+ const sourceRunWorld = resolveCabinetWorldTransform(sourceRun, sceneApi.nodes());
931
+ const rotation = role === 'bridge' ? sourceRunWorld.rotation : layout.legRotation;
932
+ const depth = role === 'base-leg' ? sourceRun.depth : CABINET_WALL_DEPTH;
933
+ const runWorldPosition = isStandaloneBridgeFillerRun
934
+ ? anchorPosition
935
+ : runLocalToPlan({ position: anchorPosition, rotation }, [fullCenters[firstIndex] ?? 0, 0, 0]);
936
+ // Place relative to the derived run's ACTUAL parent frame — source run for
937
+ // new scenes, source module for legacy scenes that nested legs under it.
938
+ const frameParent = cabinetFrameParent(run, sceneApi.nodes()) ?? sourceRun;
939
+ const runPosition = worldToCabinetLocalPosition(frameParent, sceneApi.nodes(), runWorldPosition);
940
+ const localRotation = worldToCabinetLocalRotation(frameParent, sceneApi.nodes(), rotation);
941
+ sceneApi.update(run.id, {
942
+ position: runPosition,
943
+ rotation: localRotation,
944
+ depth,
945
+ carcassHeight: role === 'base-leg' ? sourceRun.carcassHeight : CABINET_WALL_CARCASS_HEIGHT,
946
+ plinthHeight: role === 'base-leg' ? sourceRun.plinthHeight : 0,
947
+ toeKickDepth: role === 'base-leg' ? sourceRun.toeKickDepth : 0,
948
+ countertopThickness: role === 'base-leg' ? sourceRun.countertopThickness : 0,
949
+ countertopOverhang: role === 'base-leg' ? sourceRun.countertopOverhang : 0,
950
+ countertopBackOverhang: role === 'base-leg' ? sourceRun.countertopBackOverhang : 0,
951
+ withFinishedBack: role === 'base-leg' ? sourceRun.withFinishedBack : false,
952
+ showPlinth: role === 'base-leg' ? sourceRun.showPlinth : false,
953
+ withCountertop: role === 'base-leg' ? sourceRun.withCountertop : false,
954
+ frontStyle: sourceRun.frontStyle,
955
+ frontOverlay: sourceRun.frontOverlay,
956
+ handleStyle: sourceRun.handleStyle,
957
+ handlePosition: sourceRun.handlePosition,
958
+ });
959
+ modules.forEach((entry, index) => {
960
+ const spec = specByName.get(entry.name);
961
+ if (!spec)
962
+ return;
963
+ sceneApi.update(entry.id, {
964
+ width: spec.width,
965
+ depth,
966
+ carcassHeight: role === 'base-leg' ? sourceRun.carcassHeight : CABINET_WALL_CARCASS_HEIGHT,
967
+ position: [
968
+ currentCenters[index] ?? 0,
969
+ role === 'base-leg' ? runModuleBaseY(sourceRun) : 0,
970
+ 0,
971
+ ],
972
+ toeKickDepth: role === 'base-leg' ? sourceRun.toeKickDepth : 0,
973
+ countertopThickness: role === 'base-leg' ? sourceRun.countertopThickness : 0,
974
+ countertopOverhang: role === 'base-leg' ? sourceRun.countertopOverhang : 0,
975
+ moduleKind: spec.moduleKind,
976
+ openSide: spec.openSide,
977
+ cornerShelf: spec.cornerShelf,
978
+ frontStyle: sourceRun.frontStyle,
979
+ frontOverlay: sourceRun.frontOverlay,
980
+ handleStyle: sourceRun.handleStyle,
981
+ handlePosition: sourceRun.handlePosition,
982
+ stack: doorStack(layout.connectedShelfCount),
983
+ metadata: entry.metadata,
984
+ });
985
+ });
986
+ if (role === 'base-leg') {
987
+ const connectedBaseModule = childModuleByName(sceneApi.get(run.id) ?? run, 'Base Cabinet', sceneApi.nodes());
988
+ if (connectedBaseModule) {
989
+ ensureWallCabinetAbove({
990
+ module: connectedBaseModule,
991
+ run: sceneApi.get(run.id) ?? run,
992
+ sceneApi,
993
+ shelfCount: layout.connectedShelfCount,
994
+ openSide: connectedBaseModule.openSide,
995
+ });
996
+ }
997
+ }
998
+ bumpCabinetRunLayoutRevision(sceneApi, sceneApi.get(run.id) ?? run);
999
+ }
1000
+ export function syncCornerRunsFromSourceModule({ module, run, sceneApi, }) {
1001
+ const link = cornerSourceLink(module.metadata);
1002
+ if (!link)
1003
+ return;
1004
+ for (const runId of link.linkedRunIds) {
1005
+ const linkedRun = sceneApi.get(runId);
1006
+ if (linkedRun?.type !== 'cabinet')
1007
+ continue;
1008
+ const derivedLink = cornerDerivedRunLink(linkedRun.metadata);
1009
+ if (!derivedLink)
1010
+ continue;
1011
+ syncDerivedCornerRun({
1012
+ role: derivedLink.role,
1013
+ run: linkedRun,
1014
+ sourceModule: module,
1015
+ sourceRun: run,
1016
+ side: derivedLink.side,
1017
+ turnSide: derivedLink.turnSide,
1018
+ sceneApi,
1019
+ });
1020
+ }
1021
+ }
1022
+ /**
1023
+ * Insert a new base module flush against the anchor's side (or the run's
1024
+ * outer edge with no anchor). Gap-checked — returns null when a flush
1025
+ * neighbor leaves no room for a standard-width unit.
1026
+ */
1027
+ export function planCabinetModuleSideAddition({ anchorModule, nodes, run, side, }) {
1028
+ const modules = cabinetModulesForRun(run, nodes);
1029
+ const x = sideInsertX({
1030
+ anchorModule,
1031
+ modules,
1032
+ side,
1033
+ width: CABINET_BASE_WIDTH,
1034
+ epsilon: CABINET_EDGE_EPSILON,
1035
+ });
1036
+ if (x == null)
1037
+ return null;
1038
+ const depth = run.depth;
1039
+ const z = anchorModule
1040
+ ? backAnchoredModuleZ(anchorModule.position[2], anchorModule.depth, depth)
1041
+ : 0;
1042
+ const width = resolveSideAddedModuleWidth({
1043
+ centerX: x,
1044
+ centerZ: z,
1045
+ depth,
1046
+ desiredWidth: CABINET_BASE_WIDTH,
1047
+ nodes,
1048
+ run,
1049
+ side,
1050
+ sourceNode: anchorModule ?? run,
1051
+ });
1052
+ if (width < MIN_CORNER_CONNECTED_WIDTH - WALL_CLEARANCE_EPSILON)
1053
+ return null;
1054
+ return CabinetModuleNodeSchema.parse({
1055
+ name: `Base Cabinet ${modules.length + 1}`,
1056
+ parentId: run.id,
1057
+ position: [
1058
+ side === 'left' ? x + (CABINET_BASE_WIDTH - width) / 2 : x - (CABINET_BASE_WIDTH - width) / 2,
1059
+ runModuleBaseY(run),
1060
+ z,
1061
+ ],
1062
+ width,
1063
+ depth,
1064
+ carcassHeight: run.carcassHeight,
1065
+ plinthHeight: run.plinthHeight,
1066
+ toeKickDepth: run.toeKickDepth,
1067
+ countertopThickness: 0,
1068
+ countertopOverhang: run.countertopOverhang,
1069
+ showPlinth: false,
1070
+ withCountertop: false,
1071
+ });
1072
+ }
1073
+ export function addCabinetModuleSide({ anchorModule, run, sceneApi, side, }) {
1074
+ const module = planCabinetModuleSideAddition({
1075
+ anchorModule,
1076
+ nodes: sceneApi.nodes(),
1077
+ run,
1078
+ side,
1079
+ });
1080
+ if (!module)
1081
+ return null;
1082
+ sceneApi.upsert(module, run.id);
1083
+ bumpCabinetRunLayoutRevision(sceneApi, run);
1084
+ return module.id;
1085
+ }
1086
+ /**
1087
+ * Spawn an L corner off one open end of a base run: a perpendicular base leg
1088
+ * with a corner pocket filler plus cabinet, a matching wall leg, and a short
1089
+ * wall bridge above the source run's corner cabinet so the top corner doesn't
1090
+ * read empty.
1091
+ */
1092
+ export function addCornerRun({ module, run, sceneApi, side, }) {
1093
+ const liveRun = sceneApi.get(run.id) ?? run;
1094
+ const liveModule = sceneApi.get(module.id) ?? module;
1095
+ if (liveRun.runTier !== 'base' || resolveCabinetType(liveModule, liveRun) !== 'base') {
1096
+ return null;
1097
+ }
1098
+ const resolved = resolveCornerAdditionLayout({
1099
+ module: liveModule,
1100
+ run: liveRun,
1101
+ nodes: sceneApi.nodes(),
1102
+ side,
1103
+ });
1104
+ if (!resolved)
1105
+ return null;
1106
+ const { layout, sourceModule: resolvedSourceModule, endSide, turnSide } = resolved;
1107
+ let sourceModule = liveModule;
1108
+ let sourceRun = liveRun;
1109
+ if (resolvedSourceModule.width < liveModule.width - CABINET_EDGE_EPSILON ||
1110
+ layout.connectedWidth < liveModule.width - CABINET_EDGE_EPSILON) {
1111
+ const sourcePatch = cornerSourceModulePatch({
1112
+ module: liveModule,
1113
+ side: endSide,
1114
+ width: Math.min(resolvedSourceModule.width, layout.connectedWidth),
1115
+ });
1116
+ sceneApi.update(liveModule.id, sourcePatch);
1117
+ const existingWallTop = wallChildOf(liveModule, sceneApi.nodes());
1118
+ if (existingWallTop) {
1119
+ sceneApi.update(existingWallTop.id, {
1120
+ width: layout.connectedWidth,
1121
+ });
1122
+ }
1123
+ sourceModule = sceneApi.get(liveModule.id) ?? liveModule;
1124
+ sourceRun = sceneApi.get(liveRun.id) ?? liveRun;
1125
+ }
1126
+ const resolvedLayout = computeCornerRunLayout({
1127
+ module: sourceModule,
1128
+ run: sourceRun,
1129
+ nodes: sceneApi.nodes(),
1130
+ side: endSide,
1131
+ turnSide,
1132
+ minConnectedWidth: sourceModule.width < MIN_CORNER_CONNECTED_WIDTH - CABINET_EDGE_EPSILON
1133
+ ? MIN_TRIMMED_CORNER_CONNECTED_WIDTH
1134
+ : MIN_CORNER_CONNECTED_WIDTH,
1135
+ });
1136
+ if (!resolvedLayout)
1137
+ return null;
1138
+ const { baseRunPosition, wallRunPosition, bridgeFillerRunPosition, legRotation, connectedWidth, connectedShelfCount, bridgeWidth, } = resolvedLayout;
1139
+ const runWorld = resolveCabinetWorldTransform(sourceRun, sceneApi.nodes());
1140
+ const sourceWallChildId = ensureWallCabinetAbove({
1141
+ module: sourceModule,
1142
+ run: sourceRun,
1143
+ sceneApi,
1144
+ shelfCount: connectedShelfCount,
1145
+ openSide: endSide,
1146
+ });
1147
+ const existingWallTop = sourceWallChildId
1148
+ ? (sceneApi.get(sourceWallChildId) ?? null)
1149
+ : wallChildOf(sourceModule, sceneApi.nodes());
1150
+ // Legs are siblings of the source module under the SOURCE RUN — the run is
1151
+ // the modular cabinet group; the clicked module must not become a container.
1152
+ const baseLocalPosition = worldToCabinetLocalPosition(sourceRun, sceneApi.nodes(), baseRunPosition);
1153
+ const baseLocalRotation = worldToCabinetLocalRotation(sourceRun, sceneApi.nodes(), legRotation);
1154
+ const baseModules = endSide === 'right'
1155
+ ? [
1156
+ {
1157
+ name: 'Corner Filler',
1158
+ width: sourceRun.depth,
1159
+ moduleKind: 'corner-filler',
1160
+ openSide: 'right',
1161
+ cornerShelf: true,
1162
+ stack: doorStack(connectedShelfCount),
1163
+ },
1164
+ {
1165
+ name: 'Base Cabinet',
1166
+ width: connectedWidth,
1167
+ openSide: 'left',
1168
+ stack: doorStack(connectedShelfCount),
1169
+ },
1170
+ ]
1171
+ : [
1172
+ {
1173
+ name: 'Base Cabinet',
1174
+ width: connectedWidth,
1175
+ openSide: 'right',
1176
+ stack: doorStack(connectedShelfCount),
1177
+ },
1178
+ {
1179
+ name: 'Corner Filler',
1180
+ width: sourceRun.depth,
1181
+ moduleKind: 'corner-filler',
1182
+ openSide: 'left',
1183
+ cornerShelf: true,
1184
+ stack: doorStack(connectedShelfCount),
1185
+ },
1186
+ ];
1187
+ const baseLeg = upsertCabinetRunWithModules({
1188
+ depth: sourceRun.depth,
1189
+ modulePatches: baseModules,
1190
+ name: 'Corner Base Run',
1191
+ parentId: sourceRun.id,
1192
+ position: baseLocalPosition,
1193
+ rotation: baseLocalRotation,
1194
+ runTier: 'base',
1195
+ sceneApi,
1196
+ sourceRun,
1197
+ });
1198
+ const selectionRootId = cornerSelectionRootId(sourceRun, baseLeg.runId);
1199
+ const linkedRunIds = [baseLeg.runId];
1200
+ const baseLegLiveMetadata = sceneApi.get(baseLeg.runId)?.metadata ?? null;
1201
+ const baseLegMetadata = cabinetMetadataRecord(baseLegLiveMetadata);
1202
+ sceneApi.update(baseLeg.runId, {
1203
+ metadata: {
1204
+ ...(selectionRootId === baseLeg.runId
1205
+ ? baseLegMetadata
1206
+ : withSelectionProxyMetadata(baseLegLiveMetadata, selectionRootId)),
1207
+ cabinetCornerDerivedRun: {
1208
+ role: 'base-leg',
1209
+ side: endSide,
1210
+ turnSide,
1211
+ sourceModuleId: sourceModule.id,
1212
+ sourceRunId: sourceRun.id,
1213
+ },
1214
+ },
1215
+ });
1216
+ for (const moduleId of baseLeg.moduleIds) {
1217
+ setCabinetSelectionProxy(sceneApi, moduleId, selectionRootId);
1218
+ }
1219
+ const baseLegRunNode = sceneApi.get(baseLeg.runId) ?? sourceRun;
1220
+ const cornerFillerModule = childModuleByName(baseLegRunNode, 'Corner Filler', sceneApi.nodes()) ??
1221
+ sceneApi.get(baseLeg.moduleIds[0]);
1222
+ const connectedBaseModule = childModuleByName(baseLegRunNode, 'Base Cabinet', sceneApi.nodes()) ??
1223
+ sceneApi.get(baseLeg.moduleIds[1]);
1224
+ if (cornerFillerModule) {
1225
+ const bridgeRunWorldPosition = anchoredBridgeRunWorldPosition({
1226
+ sourceWallTop: existingWallTop,
1227
+ sourceRun,
1228
+ bridgeWidth,
1229
+ side: endSide,
1230
+ fallbackPosition: bridgeFillerRunPosition,
1231
+ nodes: sceneApi.nodes(),
1232
+ });
1233
+ const bridgeRunLocalPosition = worldToCabinetLocalPosition(cornerFillerModule, sceneApi.nodes(), bridgeRunWorldPosition);
1234
+ const bridgeRunLocalRotation = worldToCabinetLocalRotation(cornerFillerModule, sceneApi.nodes(), runWorld.rotation);
1235
+ const bridgeRun = upsertCabinetRunWithModules({
1236
+ depth: CABINET_WALL_DEPTH,
1237
+ modulePatches: [
1238
+ {
1239
+ name: 'Wall Bridge Filler',
1240
+ width: bridgeWidth,
1241
+ moduleKind: 'corner-filler',
1242
+ openSide: endSide === 'right' ? 'left' : 'right',
1243
+ cornerShelf: true,
1244
+ stack: doorStack(connectedShelfCount),
1245
+ },
1246
+ ],
1247
+ name: 'Corner Wall Bridge',
1248
+ parentId: cornerFillerModule.id,
1249
+ position: bridgeRunLocalPosition,
1250
+ rotation: bridgeRunLocalRotation,
1251
+ runTier: 'wall',
1252
+ sceneApi,
1253
+ sourceRun,
1254
+ });
1255
+ linkedRunIds.push(bridgeRun.runId);
1256
+ const bridgeRunLiveMetadata = sceneApi.get(bridgeRun.runId)?.metadata ?? null;
1257
+ const bridgeRunMetadata = cabinetMetadataRecord(bridgeRunLiveMetadata);
1258
+ sceneApi.update(bridgeRun.runId, {
1259
+ metadata: {
1260
+ ...(selectionRootId === bridgeRun.runId
1261
+ ? bridgeRunMetadata
1262
+ : withSelectionProxyMetadata(bridgeRunLiveMetadata, selectionRootId)),
1263
+ cabinetCornerDerivedRun: {
1264
+ role: 'bridge',
1265
+ side: endSide,
1266
+ turnSide,
1267
+ sourceModuleId: sourceModule.id,
1268
+ sourceRunId: sourceRun.id,
1269
+ },
1270
+ },
1271
+ });
1272
+ for (const moduleId of bridgeRun.moduleIds) {
1273
+ setCabinetSelectionProxy(sceneApi, moduleId, selectionRootId);
1274
+ }
1275
+ const wallModuleCenters = chainModuleCenters([sourceRun.depth, connectedWidth]);
1276
+ const cornerWallFillerCenter = endSide === 'right' ? (wallModuleCenters[0] ?? 0) : (wallModuleCenters[1] ?? 0);
1277
+ const cornerWallFillerWorldPosition = runLocalToPlan({ position: wallRunPosition, rotation: legRotation }, [cornerWallFillerCenter, 0, 0]);
1278
+ const wallFillerRun = upsertCabinetRunWithModules({
1279
+ depth: CABINET_WALL_DEPTH,
1280
+ modulePatches: [
1281
+ {
1282
+ name: 'Corner Wall Filler',
1283
+ width: sourceRun.depth,
1284
+ moduleKind: 'corner-filler',
1285
+ openSide: endSide === 'right' ? 'right' : 'left',
1286
+ cornerShelf: true,
1287
+ stack: doorStack(connectedShelfCount),
1288
+ },
1289
+ ],
1290
+ name: 'Corner Wall Run',
1291
+ parentId: cornerFillerModule.id,
1292
+ position: worldToCabinetLocalPosition(cornerFillerModule, sceneApi.nodes(), cornerWallFillerWorldPosition),
1293
+ rotation: worldToCabinetLocalRotation(cornerFillerModule, sceneApi.nodes(), legRotation),
1294
+ runTier: 'wall',
1295
+ sceneApi,
1296
+ sourceRun,
1297
+ });
1298
+ linkedRunIds.push(wallFillerRun.runId);
1299
+ const wallFillerRunLiveMetadata = sceneApi.get(wallFillerRun.runId)?.metadata ?? null;
1300
+ const wallFillerRunMetadata = cabinetMetadataRecord(wallFillerRunLiveMetadata);
1301
+ sceneApi.update(wallFillerRun.runId, {
1302
+ metadata: {
1303
+ ...(selectionRootId === wallFillerRun.runId
1304
+ ? wallFillerRunMetadata
1305
+ : withSelectionProxyMetadata(wallFillerRunLiveMetadata, selectionRootId)),
1306
+ cabinetCornerDerivedRun: {
1307
+ role: 'wall-leg',
1308
+ side: endSide,
1309
+ turnSide,
1310
+ sourceModuleId: sourceModule.id,
1311
+ sourceRunId: sourceRun.id,
1312
+ },
1313
+ },
1314
+ });
1315
+ for (const moduleId of wallFillerRun.moduleIds) {
1316
+ setCabinetSelectionProxy(sceneApi, moduleId, selectionRootId);
1317
+ }
1318
+ }
1319
+ if (connectedBaseModule) {
1320
+ const wallChildId = ensureWallCabinetAbove({
1321
+ module: connectedBaseModule,
1322
+ run: sceneApi.get(baseLeg.runId) ?? baseLegRunNode,
1323
+ sceneApi,
1324
+ shelfCount: connectedShelfCount,
1325
+ openSide: connectedBaseModule.openSide,
1326
+ });
1327
+ if (wallChildId) {
1328
+ setCabinetSelectionProxy(sceneApi, wallChildId, selectionRootId);
1329
+ }
1330
+ }
1331
+ sceneApi.update(sourceModule.id, {
1332
+ metadata: {
1333
+ ...cabinetMetadataRecord(sceneApi.get(sourceModule.id)?.metadata ?? null),
1334
+ cabinetCornerSourceLink: {
1335
+ side: endSide,
1336
+ linkedRunIds,
1337
+ },
1338
+ },
1339
+ });
1340
+ bumpCabinetRunLayoutRevision(sceneApi, sourceRun);
1341
+ return baseLeg.moduleIds[1] ?? baseLeg.moduleIds[0] ?? null;
1342
+ }
1343
+ /**
1344
+ * Nest a wall cabinet (or chimney hood) above a base module. Returns the new
1345
+ * node id, or null when the module already carries one / isn't a base unit.
1346
+ */
1347
+ export function addWallChildAbove({ kind, module, run, sceneApi, openSide, }) {
1348
+ if (resolveCabinetType(module, run) !== 'base')
1349
+ return null;
1350
+ if (wallChildOf(module, sceneApi.nodes()))
1351
+ return null;
1352
+ const isHood = kind === 'hood';
1353
+ const carcassHeight = isHood
1354
+ ? Math.max(0.4, hoodCompartmentHeight('hood-pyramid'))
1355
+ : CABINET_WALL_CARCASS_HEIGHT;
1356
+ const wall = CabinetModuleNodeSchema.parse({
1357
+ name: isHood ? 'Chimney' : 'Wall Cabinet',
1358
+ parentId: module.id,
1359
+ // Wall cabinet top aligns with the default tall cabinet top.
1360
+ position: [
1361
+ 0,
1362
+ wallBottomHeightForTallAlignment() - module.position[1],
1363
+ backAlignZ(module.depth, CABINET_WALL_DEPTH),
1364
+ ],
1365
+ width: module.width,
1366
+ depth: CABINET_WALL_DEPTH,
1367
+ carcassHeight,
1368
+ plinthHeight: 0,
1369
+ toeKickDepth: 0,
1370
+ countertopThickness: 0,
1371
+ countertopOverhang: 0,
1372
+ showPlinth: false,
1373
+ withCountertop: false,
1374
+ stack: isHood ? [newCabinetCompartment('hood-pyramid')] : doorStack(1),
1375
+ frontStyle: module.frontStyle,
1376
+ frontOverlay: module.frontOverlay,
1377
+ handleStyle: module.handleStyle,
1378
+ handlePosition: module.handlePosition,
1379
+ ...(openSide ? { openSide } : {}),
1380
+ });
1381
+ sceneApi.upsert(wall, module.id);
1382
+ sceneApi.markDirty(module.id);
1383
+ return wall.id;
1384
+ }
1385
+ function ensureWallCabinetAbove({ module, run, sceneApi, shelfCount, openSide, }) {
1386
+ const existingWall = wallChildOf(module, sceneApi.nodes());
1387
+ if (existingWall) {
1388
+ sceneApi.update(existingWall.id, {
1389
+ width: module.width,
1390
+ depth: CABINET_WALL_DEPTH,
1391
+ carcassHeight: CABINET_WALL_CARCASS_HEIGHT,
1392
+ position: [
1393
+ 0,
1394
+ wallBottomHeightForTallAlignment() - module.position[1],
1395
+ backAlignZ(module.depth, CABINET_WALL_DEPTH),
1396
+ ],
1397
+ frontStyle: module.frontStyle,
1398
+ frontOverlay: module.frontOverlay,
1399
+ handleStyle: module.handleStyle,
1400
+ handlePosition: module.handlePosition,
1401
+ stack: cloneWallCabinetStack(existingWall, shelfCount),
1402
+ ...(openSide ? { openSide } : {}),
1403
+ });
1404
+ return existingWall.id;
1405
+ }
1406
+ const wallChildId = addWallChildAbove({
1407
+ kind: 'cabinet',
1408
+ module,
1409
+ run,
1410
+ sceneApi,
1411
+ openSide,
1412
+ });
1413
+ if (!wallChildId)
1414
+ return null;
1415
+ sceneApi.update(wallChildId, {
1416
+ stack: doorStack(shelfCount),
1417
+ });
1418
+ return wallChildId;
1419
+ }
1420
+ /** Convert a base module to a tall unit (deletes any nested wall cabinet). */
1421
+ export function switchCabinetToTall({ module, run, sceneApi, }) {
1422
+ if (resolveCabinetType(module, run) !== 'base')
1423
+ return false;
1424
+ const wallChild = wallChildOf(module, sceneApi.nodes());
1425
+ if (wallChild)
1426
+ sceneApi.delete(wallChild.id);
1427
+ sceneApi.update(module.id, {
1428
+ name: 'Tall Cabinet',
1429
+ cabinetType: 'tall',
1430
+ depth: CABINET_TALL_DEPTH,
1431
+ position: [
1432
+ module.position[0],
1433
+ runModuleBaseY(run),
1434
+ backAnchoredModuleZ(module.position[2], module.depth, CABINET_TALL_DEPTH),
1435
+ ],
1436
+ carcassHeight: CABINET_TALL_CARCASS_HEIGHT,
1437
+ plinthHeight: CABINET_TALL_PLINTH_HEIGHT,
1438
+ toeKickDepth: 0.075,
1439
+ showPlinth: false,
1440
+ countertopThickness: 0,
1441
+ countertopOverhang: run.countertopOverhang,
1442
+ withCountertop: false,
1443
+ stack: doorStack(3),
1444
+ });
1445
+ bumpCabinetRunLayoutRevision(sceneApi, run);
1446
+ return true;
1447
+ }
1448
+ /** Convert a tall module back to a base unit matching the run's dimensions. */
1449
+ export function switchCabinetToBase({ module, run, sceneApi, }) {
1450
+ if (resolveCabinetType(module, run) !== 'tall')
1451
+ return false;
1452
+ sceneApi.update(module.id, {
1453
+ name: 'Base Cabinet',
1454
+ cabinetType: 'base',
1455
+ depth: run.depth,
1456
+ position: [
1457
+ module.position[0],
1458
+ runModuleBaseY(run),
1459
+ backAnchoredModuleZ(module.position[2], module.depth, run.depth),
1460
+ ],
1461
+ carcassHeight: run.carcassHeight,
1462
+ plinthHeight: run.plinthHeight,
1463
+ toeKickDepth: run.toeKickDepth,
1464
+ showPlinth: false,
1465
+ countertopThickness: 0,
1466
+ countertopOverhang: run.countertopOverhang,
1467
+ withCountertop: false,
1468
+ stack: doorStack(1),
1469
+ });
1470
+ bumpCabinetRunLayoutRevision(sceneApi, run);
1471
+ return true;
1472
+ }