@pascal-app/nodes 1.0.0 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (439) hide show
  1. package/dist/block/definition.d.ts.map +1 -1
  2. package/dist/block/definition.js +4 -1
  3. package/dist/block/face-host.d.ts.map +1 -1
  4. package/dist/block/face-host.js +19 -2
  5. package/dist/block/hosted-edit.d.ts +13 -0
  6. package/dist/block/hosted-edit.d.ts.map +1 -0
  7. package/dist/block/hosted-edit.js +205 -0
  8. package/dist/block/last-operation.d.ts +1 -1
  9. package/dist/block/last-operation.d.ts.map +1 -1
  10. package/dist/block/last-operation.js +6 -4
  11. package/dist/block/modal-session.d.ts +2 -1
  12. package/dist/block/modal-session.d.ts.map +1 -1
  13. package/dist/block/modal-session.js +2 -2
  14. package/dist/block/selection.d.ts.map +1 -1
  15. package/dist/block/selection.js +82 -24
  16. package/dist/block/surface.d.ts +4 -0
  17. package/dist/block/surface.d.ts.map +1 -0
  18. package/dist/block/surface.js +54 -0
  19. package/dist/block/use-block-face-operation.d.ts +2 -2
  20. package/dist/block/use-block-face-operation.d.ts.map +1 -1
  21. package/dist/block/use-block-face-operation.js +25 -11
  22. package/dist/box-vent/definition.d.ts.map +1 -1
  23. package/dist/box-vent/definition.js +1 -0
  24. package/dist/box-vent/panel.js +4 -4
  25. package/dist/building/renderer.d.ts.map +1 -1
  26. package/dist/building/renderer.js +1 -1
  27. package/dist/cabinet/appliance-layout.d.ts +26 -0
  28. package/dist/cabinet/appliance-layout.d.ts.map +1 -0
  29. package/dist/cabinet/appliance-layout.js +52 -0
  30. package/dist/cabinet/countertop-layout.d.ts +173 -0
  31. package/dist/cabinet/countertop-layout.d.ts.map +1 -0
  32. package/dist/cabinet/countertop-layout.js +80 -0
  33. package/dist/cabinet/definition.d.ts.map +1 -1
  34. package/dist/cabinet/definition.js +17 -8
  35. package/dist/cabinet/geometry/cooktop.d.ts.map +1 -1
  36. package/dist/cabinet/geometry/cooktop.js +2 -2
  37. package/dist/cabinet/geometry/run.d.ts.map +1 -1
  38. package/dist/cabinet/geometry/run.js +10 -71
  39. package/dist/cabinet/geometry/sink.d.ts +2 -12
  40. package/dist/cabinet/geometry/sink.d.ts.map +1 -1
  41. package/dist/cabinet/geometry/sink.js +8 -39
  42. package/dist/cabinet/hosted-resize.d.ts +5 -0
  43. package/dist/cabinet/hosted-resize.d.ts.map +1 -0
  44. package/dist/cabinet/hosted-resize.js +14 -0
  45. package/dist/cabinet/placement-snap.d.ts.map +1 -1
  46. package/dist/cabinet/placement-snap.js +4 -2
  47. package/dist/cabinet/run-layout.d.ts +8 -1
  48. package/dist/cabinet/run-layout.d.ts.map +1 -1
  49. package/dist/cabinet/run-layout.js +22 -14
  50. package/dist/cabinet/run-ops.d.ts +3 -3
  51. package/dist/cabinet/run-ops.js +3 -3
  52. package/dist/cabinet/run-panel.d.ts +1 -1
  53. package/dist/cabinet/run-panel.d.ts.map +1 -1
  54. package/dist/cabinet/run-panel.js +16 -7
  55. package/dist/cabinet/surfaces.d.ts +5 -0
  56. package/dist/cabinet/surfaces.d.ts.map +1 -0
  57. package/dist/cabinet/surfaces.js +113 -0
  58. package/dist/cabinet/tool.d.ts.map +1 -1
  59. package/dist/cabinet/tool.js +8 -4
  60. package/dist/cabinet/tree-structure.d.ts.map +1 -1
  61. package/dist/cabinet/tree-structure.js +10 -9
  62. package/dist/ceiling/definition.d.ts.map +1 -1
  63. package/dist/ceiling/definition.js +6 -1
  64. package/dist/ceiling/floorplan-affordances.d.ts +4 -4
  65. package/dist/ceiling/panel.js +1 -1
  66. package/dist/ceiling/renderer.d.ts.map +1 -1
  67. package/dist/ceiling/renderer.js +3 -2
  68. package/dist/chimney/definition.d.ts.map +1 -1
  69. package/dist/chimney/definition.js +1 -0
  70. package/dist/chimney/panel.js +9 -9
  71. package/dist/column/definition.d.ts.map +1 -1
  72. package/dist/column/definition.js +10 -3
  73. package/dist/column/floorplan-affordances.d.ts.map +1 -1
  74. package/dist/column/floorplan-affordances.js +6 -1
  75. package/dist/column/floorplan.d.ts.map +1 -1
  76. package/dist/column/floorplan.js +23 -11
  77. package/dist/column/hosted-resize.d.ts +116 -0
  78. package/dist/column/hosted-resize.d.ts.map +1 -0
  79. package/dist/column/hosted-resize.js +9 -0
  80. package/dist/column/panel.d.ts.map +1 -1
  81. package/dist/column/panel.js +6 -3
  82. package/dist/column/renderer.d.ts.map +1 -1
  83. package/dist/column/renderer.js +25 -103
  84. package/dist/column/shape.d.ts +22 -0
  85. package/dist/column/shape.d.ts.map +1 -0
  86. package/dist/column/shape.js +120 -0
  87. package/dist/column/surface.d.ts +4 -0
  88. package/dist/column/surface.d.ts.map +1 -0
  89. package/dist/column/surface.js +66 -0
  90. package/dist/cupola/definition.d.ts.map +1 -1
  91. package/dist/cupola/definition.js +1 -0
  92. package/dist/cupola/panel.js +1 -1
  93. package/dist/door/definition.d.ts.map +1 -1
  94. package/dist/door/definition.js +40 -1
  95. package/dist/door/door-math.d.ts +1 -1
  96. package/dist/door/door-math.d.ts.map +1 -1
  97. package/dist/door/door-math.js +7 -10
  98. package/dist/door/floorplan-affordances.d.ts.map +1 -1
  99. package/dist/door/floorplan-affordances.js +8 -12
  100. package/dist/door/move-tool.d.ts.map +1 -1
  101. package/dist/door/move-tool.js +3 -4
  102. package/dist/door/panel.d.ts.map +1 -1
  103. package/dist/door/panel.js +28 -57
  104. package/dist/door/tool.d.ts.map +1 -1
  105. package/dist/door/tool.js +20 -2
  106. package/dist/dormer/definition.d.ts.map +1 -1
  107. package/dist/dormer/definition.js +1 -0
  108. package/dist/dormer/panel-position-section.js +2 -2
  109. package/dist/dormer/panel.js +1 -1
  110. package/dist/downspout/definition.d.ts.map +1 -1
  111. package/dist/downspout/definition.js +1 -0
  112. package/dist/duct-segment/parametrics.d.ts.map +1 -1
  113. package/dist/duct-segment/parametrics.js +5 -1
  114. package/dist/duct-segment/tool.d.ts +1 -0
  115. package/dist/duct-segment/tool.d.ts.map +1 -1
  116. package/dist/duct-segment/tool.js +21 -8
  117. package/dist/duct-terminal/tool.d.ts.map +1 -1
  118. package/dist/duct-terminal/tool.js +77 -8
  119. package/dist/elevator/definition.d.ts.map +1 -1
  120. package/dist/elevator/definition.js +2 -0
  121. package/dist/elevator/parametrics.d.ts.map +1 -1
  122. package/dist/elevator/parametrics.js +98 -1
  123. package/dist/eyebrow-vent/definition.d.ts.map +1 -1
  124. package/dist/eyebrow-vent/definition.js +1 -0
  125. package/dist/eyebrow-vent/panel.js +1 -1
  126. package/dist/fence/definition.d.ts.map +1 -1
  127. package/dist/fence/definition.js +1 -0
  128. package/dist/fence/inspector-editors.js +1 -1
  129. package/dist/fence/tool.js +2 -2
  130. package/dist/guide/definition.d.ts.map +1 -1
  131. package/dist/guide/definition.js +1 -0
  132. package/dist/gutter/definition.d.ts.map +1 -1
  133. package/dist/gutter/definition.js +1 -0
  134. package/dist/hvac-equipment/tool.d.ts.map +1 -1
  135. package/dist/hvac-equipment/tool.js +8 -2
  136. package/dist/imported-mesh/definition.d.ts +5 -0
  137. package/dist/imported-mesh/definition.d.ts.map +1 -0
  138. package/dist/imported-mesh/definition.js +38 -0
  139. package/dist/imported-mesh/floorplan.d.ts +4 -0
  140. package/dist/imported-mesh/floorplan.d.ts.map +1 -0
  141. package/dist/imported-mesh/floorplan.js +34 -0
  142. package/dist/imported-mesh/geometry.d.ts +5 -0
  143. package/dist/imported-mesh/geometry.d.ts.map +1 -0
  144. package/dist/imported-mesh/geometry.js +34 -0
  145. package/dist/imported-mesh/index.d.ts +4 -0
  146. package/dist/imported-mesh/index.d.ts.map +1 -0
  147. package/dist/imported-mesh/index.js +3 -0
  148. package/dist/imported-mesh/schema.d.ts +2 -0
  149. package/dist/imported-mesh/schema.d.ts.map +1 -0
  150. package/dist/imported-mesh/schema.js +1 -0
  151. package/dist/index.d.ts +2 -0
  152. package/dist/index.d.ts.map +1 -1
  153. package/dist/index.js +8 -0
  154. package/dist/item/__fixtures__/main-floorplan.d.ts +26 -0
  155. package/dist/item/__fixtures__/main-floorplan.d.ts.map +1 -0
  156. package/dist/item/__fixtures__/main-floorplan.js +297 -0
  157. package/dist/item/definition.d.ts.map +1 -1
  158. package/dist/item/definition.js +3 -1
  159. package/dist/item/floorplan-move.d.ts +9 -1
  160. package/dist/item/floorplan-move.d.ts.map +1 -1
  161. package/dist/item/floorplan-move.js +231 -99
  162. package/dist/item/floorplan.d.ts +22 -0
  163. package/dist/item/floorplan.d.ts.map +1 -1
  164. package/dist/item/floorplan.js +72 -2
  165. package/dist/item/move-tool.d.ts +1 -1
  166. package/dist/item/move-tool.d.ts.map +1 -1
  167. package/dist/item/move-tool.js +15 -7
  168. package/dist/item/panel.js +1 -1
  169. package/dist/item/renderer.d.ts.map +1 -1
  170. package/dist/item/renderer.js +8 -2
  171. package/dist/level/renderer.js +1 -1
  172. package/dist/lineset/tool.d.ts.map +1 -1
  173. package/dist/lineset/tool.js +1 -0
  174. package/dist/liquid-line/tool.d.ts.map +1 -1
  175. package/dist/liquid-line/tool.js +5 -1
  176. package/dist/measurement/definition.d.ts.map +1 -1
  177. package/dist/measurement/definition.js +1 -0
  178. package/dist/pipe-segment/parametrics.d.ts.map +1 -1
  179. package/dist/pipe-segment/parametrics.js +5 -1
  180. package/dist/pipe-segment/tool.d.ts.map +1 -1
  181. package/dist/pipe-segment/tool.js +14 -3
  182. package/dist/pipe-trap/tool.d.ts.map +1 -1
  183. package/dist/pipe-trap/tool.js +7 -8
  184. package/dist/procedural-item/definition.d.ts +4 -0
  185. package/dist/procedural-item/definition.d.ts.map +1 -0
  186. package/dist/procedural-item/definition.js +257 -0
  187. package/dist/procedural-item/geometry.d.ts +31 -0
  188. package/dist/procedural-item/geometry.d.ts.map +1 -0
  189. package/dist/procedural-item/geometry.js +88 -0
  190. package/dist/procedural-item/index.d.ts +3 -0
  191. package/dist/procedural-item/index.d.ts.map +1 -0
  192. package/dist/procedural-item/index.js +2 -0
  193. package/dist/procedural-item/move-session.d.ts +15 -0
  194. package/dist/procedural-item/move-session.d.ts.map +1 -0
  195. package/dist/procedural-item/move-session.js +197 -0
  196. package/dist/procedural-item/move-tool.d.ts +5 -0
  197. package/dist/procedural-item/move-tool.d.ts.map +1 -0
  198. package/dist/procedural-item/move-tool.js +193 -0
  199. package/dist/procedural-item/renderer.d.ts +5 -0
  200. package/dist/procedural-item/renderer.d.ts.map +1 -0
  201. package/dist/procedural-item/renderer.js +66 -0
  202. package/dist/ridge-vent/definition.d.ts.map +1 -1
  203. package/dist/ridge-vent/definition.js +1 -0
  204. package/dist/ridge-vent/panel.js +4 -4
  205. package/dist/roof/definition.d.ts.map +1 -1
  206. package/dist/roof/definition.js +4 -1
  207. package/dist/roof/panel-model.d.ts +4 -0
  208. package/dist/roof/panel-model.d.ts.map +1 -0
  209. package/dist/roof/panel-model.js +151 -0
  210. package/dist/roof/panel.d.ts.map +1 -1
  211. package/dist/roof/panel.js +9 -8
  212. package/dist/roof/parametrics.d.ts.map +1 -1
  213. package/dist/roof/parametrics.js +16 -1
  214. package/dist/roof-segment/definition.d.ts.map +1 -1
  215. package/dist/roof-segment/definition.js +1 -0
  216. package/dist/roof-segment/panel.d.ts.map +1 -1
  217. package/dist/roof-segment/panel.js +5 -5
  218. package/dist/roof-segment/parametrics.d.ts.map +1 -1
  219. package/dist/roof-segment/parametrics.js +176 -1
  220. package/dist/scan/definition.d.ts.map +1 -1
  221. package/dist/scan/definition.js +1 -0
  222. package/dist/shared/automatic-run-end-cap.d.ts +1 -0
  223. package/dist/shared/automatic-run-end-cap.d.ts.map +1 -1
  224. package/dist/shared/automatic-run-end-cap.js +10 -0
  225. package/dist/shared/commit-opening-move.d.ts +4 -0
  226. package/dist/shared/commit-opening-move.d.ts.map +1 -0
  227. package/dist/shared/commit-opening-move.js +9 -0
  228. package/dist/shared/curtain-opening-limits.d.ts +14 -0
  229. package/dist/shared/curtain-opening-limits.d.ts.map +1 -0
  230. package/dist/shared/curtain-opening-limits.js +53 -0
  231. package/dist/shared/distribution-run-tool.d.ts +10 -0
  232. package/dist/shared/distribution-run-tool.d.ts.map +1 -1
  233. package/dist/shared/distribution-run-tool.js +56 -11
  234. package/dist/shared/draft-axis-guides.d.ts +0 -6
  235. package/dist/shared/draft-axis-guides.d.ts.map +1 -1
  236. package/dist/shared/draft-axis-guides.js +1 -8
  237. package/dist/shared/hosted-resize.d.ts +12 -0
  238. package/dist/shared/hosted-resize.d.ts.map +1 -0
  239. package/dist/shared/hosted-resize.js +166 -0
  240. package/dist/shared/opening-grid-follow.d.ts +8 -0
  241. package/dist/shared/opening-grid-follow.d.ts.map +1 -0
  242. package/dist/shared/opening-grid-follow.js +12 -0
  243. package/dist/shared/opening-property-preview-host.d.ts +3 -0
  244. package/dist/shared/opening-property-preview-host.d.ts.map +1 -0
  245. package/dist/shared/opening-property-preview-host.js +21 -0
  246. package/dist/shared/opening-property-preview.d.ts +19 -0
  247. package/dist/shared/opening-property-preview.d.ts.map +1 -0
  248. package/dist/shared/opening-property-preview.js +99 -0
  249. package/dist/shared/panel-fields.d.ts +15 -0
  250. package/dist/shared/panel-fields.d.ts.map +1 -0
  251. package/dist/shared/panel-fields.js +31 -0
  252. package/dist/shared/resting-surface-plan.d.ts +4 -0
  253. package/dist/shared/resting-surface-plan.d.ts.map +1 -0
  254. package/dist/shared/resting-surface-plan.js +53 -0
  255. package/dist/shared/surface-counterparts.d.ts +12 -0
  256. package/dist/shared/surface-counterparts.d.ts.map +1 -0
  257. package/dist/shared/surface-counterparts.js +27 -0
  258. package/dist/shared/wall-attach-target.d.ts +1 -0
  259. package/dist/shared/wall-attach-target.d.ts.map +1 -1
  260. package/dist/shared/wall-attach-target.js +4 -1
  261. package/dist/shared/wall-event-from-grid.d.ts +5 -0
  262. package/dist/shared/wall-event-from-grid.d.ts.map +1 -0
  263. package/dist/shared/wall-event-from-grid.js +36 -0
  264. package/dist/shelf/definition.d.ts.map +1 -1
  265. package/dist/shelf/definition.js +5 -2
  266. package/dist/shelf/floorplan-affordances.d.ts.map +1 -1
  267. package/dist/shelf/floorplan-affordances.js +5 -3
  268. package/dist/shelf/floorplan-move.d.ts.map +1 -1
  269. package/dist/shelf/floorplan-move.js +3 -2
  270. package/dist/shelf/floorplan.d.ts.map +1 -1
  271. package/dist/shelf/floorplan.js +9 -2
  272. package/dist/shelf/geometry.d.ts.map +1 -1
  273. package/dist/shelf/geometry.js +2 -10
  274. package/dist/site/renderer.d.ts.map +1 -1
  275. package/dist/site/renderer.js +9 -2
  276. package/dist/skylight/definition.d.ts.map +1 -1
  277. package/dist/skylight/definition.js +1 -0
  278. package/dist/skylight/panel.js +6 -6
  279. package/dist/slab/definition.d.ts.map +1 -1
  280. package/dist/slab/definition.js +4 -0
  281. package/dist/slab/panel.js +1 -1
  282. package/dist/solar-panel/definition.d.ts.map +1 -1
  283. package/dist/solar-panel/definition.js +1 -0
  284. package/dist/solar-panel/panel.js +2 -2
  285. package/dist/spawn/definition.d.ts.map +1 -1
  286. package/dist/spawn/definition.js +1 -0
  287. package/dist/spawn/panel.js +1 -1
  288. package/dist/stair/definition.d.ts.map +1 -1
  289. package/dist/stair/definition.js +2 -0
  290. package/dist/stair/panel.d.ts.map +1 -1
  291. package/dist/stair/panel.js +9 -7
  292. package/dist/stair/parametrics.d.ts.map +1 -1
  293. package/dist/stair/parametrics.js +164 -1
  294. package/dist/stair-segment/definition.d.ts.map +1 -1
  295. package/dist/stair-segment/definition.js +1 -0
  296. package/dist/stair-segment/panel.js +4 -4
  297. package/dist/stair-segment/parametrics.d.ts.map +1 -1
  298. package/dist/stair-segment/parametrics.js +81 -1
  299. package/dist/turbine-vent/definition.d.ts.map +1 -1
  300. package/dist/turbine-vent/definition.js +1 -0
  301. package/dist/turbine-vent/panel.js +1 -1
  302. package/dist/unit/definition.d.ts +10 -0
  303. package/dist/unit/definition.d.ts.map +1 -0
  304. package/dist/unit/definition.js +38 -0
  305. package/dist/unit/index.d.ts +2 -0
  306. package/dist/unit/index.d.ts.map +1 -0
  307. package/dist/unit/index.js +1 -0
  308. package/dist/unit/parametrics.d.ts +3 -0
  309. package/dist/unit/parametrics.d.ts.map +1 -0
  310. package/dist/unit/parametrics.js +4 -0
  311. package/dist/unit/schema.d.ts +2 -0
  312. package/dist/unit/schema.d.ts.map +1 -0
  313. package/dist/unit/schema.js +1 -0
  314. package/dist/unit/unit-panel.d.ts +5 -0
  315. package/dist/unit/unit-panel.d.ts.map +1 -0
  316. package/dist/unit/unit-panel.js +61 -0
  317. package/dist/wall/actions.d.ts +3 -0
  318. package/dist/wall/actions.d.ts.map +1 -0
  319. package/dist/wall/actions.js +56 -0
  320. package/dist/wall/curtain-opening-frame.d.ts +14 -0
  321. package/dist/wall/curtain-opening-frame.d.ts.map +1 -0
  322. package/dist/wall/curtain-opening-frame.js +111 -0
  323. package/dist/wall/curtain-panel-highlight.d.ts +3 -0
  324. package/dist/wall/curtain-panel-highlight.d.ts.map +1 -0
  325. package/dist/wall/curtain-panel-highlight.js +113 -0
  326. package/dist/wall/curtain-wall-adapter.d.ts +3 -0
  327. package/dist/wall/curtain-wall-adapter.d.ts.map +1 -0
  328. package/dist/wall/curtain-wall-adapter.js +55 -0
  329. package/dist/wall/curtain-wall-floorplan.d.ts +3 -0
  330. package/dist/wall/curtain-wall-floorplan.d.ts.map +1 -0
  331. package/dist/wall/curtain-wall-floorplan.js +91 -0
  332. package/dist/wall/curtain-wall-geometry.d.ts +4 -0
  333. package/dist/wall/curtain-wall-geometry.d.ts.map +1 -0
  334. package/dist/wall/curtain-wall-geometry.js +226 -0
  335. package/dist/wall/curtain-wall-layout.d.ts +16 -0
  336. package/dist/wall/curtain-wall-layout.d.ts.map +1 -0
  337. package/dist/wall/curtain-wall-layout.js +176 -0
  338. package/dist/wall/curtain-wall-materials.d.ts +5 -0
  339. package/dist/wall/curtain-wall-materials.d.ts.map +1 -0
  340. package/dist/wall/curtain-wall-materials.js +55 -0
  341. package/dist/wall/curtain-wall-panel.d.ts +14 -0
  342. package/dist/wall/curtain-wall-panel.d.ts.map +1 -0
  343. package/dist/wall/curtain-wall-panel.js +167 -0
  344. package/dist/wall/curtain-wall-piece-geometry.d.ts +5 -0
  345. package/dist/wall/curtain-wall-piece-geometry.d.ts.map +1 -0
  346. package/dist/wall/curtain-wall-piece-geometry.js +220 -0
  347. package/dist/wall/curtain-wall-shadow.d.ts +4 -0
  348. package/dist/wall/curtain-wall-shadow.d.ts.map +1 -0
  349. package/dist/wall/curtain-wall-shadow.js +15 -0
  350. package/dist/wall/definition.d.ts +0 -15
  351. package/dist/wall/definition.d.ts.map +1 -1
  352. package/dist/wall/definition.js +65 -4
  353. package/dist/wall/drawing-mode.d.ts +12 -0
  354. package/dist/wall/drawing-mode.d.ts.map +1 -0
  355. package/dist/wall/drawing-mode.js +38 -0
  356. package/dist/wall/floorplan-tool.d.ts +4 -0
  357. package/dist/wall/floorplan-tool.d.ts.map +1 -0
  358. package/dist/wall/floorplan-tool.js +107 -0
  359. package/dist/wall/floorplan.d.ts.map +1 -1
  360. package/dist/wall/floorplan.js +6 -2
  361. package/dist/wall/length-patch.d.ts +3 -0
  362. package/dist/wall/length-patch.d.ts.map +1 -0
  363. package/dist/wall/length-patch.js +14 -0
  364. package/dist/wall/move-tool.d.ts.map +1 -1
  365. package/dist/wall/move-tool.js +23 -1
  366. package/dist/wall/paint.d.ts.map +1 -1
  367. package/dist/wall/paint.js +39 -4
  368. package/dist/wall/panel-model.d.ts +4 -0
  369. package/dist/wall/panel-model.d.ts.map +1 -0
  370. package/dist/wall/panel-model.js +117 -0
  371. package/dist/wall/panel.d.ts.map +1 -1
  372. package/dist/wall/panel.js +20 -24
  373. package/dist/wall/property-preview.d.ts +7 -0
  374. package/dist/wall/property-preview.d.ts.map +1 -0
  375. package/dist/wall/property-preview.js +31 -0
  376. package/dist/wall/rectangle-command.d.ts +149 -0
  377. package/dist/wall/rectangle-command.d.ts.map +1 -0
  378. package/dist/wall/rectangle-command.js +22 -0
  379. package/dist/wall/rectangle-tool.d.ts +2 -0
  380. package/dist/wall/rectangle-tool.d.ts.map +1 -0
  381. package/dist/wall/rectangle-tool.js +147 -0
  382. package/dist/wall/renderer.d.ts.map +1 -1
  383. package/dist/wall/renderer.js +7 -4
  384. package/dist/wall/slots.d.ts +2 -2
  385. package/dist/wall/slots.d.ts.map +1 -1
  386. package/dist/wall/slots.js +10 -2
  387. package/dist/wall/split-floorplan-layer.d.ts +4 -0
  388. package/dist/wall/split-floorplan-layer.d.ts.map +1 -0
  389. package/dist/wall/split-floorplan-layer.js +71 -0
  390. package/dist/wall/split-pointer.d.ts +3 -0
  391. package/dist/wall/split-pointer.d.ts.map +1 -0
  392. package/dist/wall/split-pointer.js +95 -0
  393. package/dist/wall/split-preview.d.ts +55 -0
  394. package/dist/wall/split-preview.d.ts.map +1 -0
  395. package/dist/wall/split-preview.js +106 -0
  396. package/dist/wall/split-session.d.ts +16 -0
  397. package/dist/wall/split-session.d.ts.map +1 -0
  398. package/dist/wall/split-session.js +138 -0
  399. package/dist/wall/split-store.d.ts +16 -0
  400. package/dist/wall/split-store.d.ts.map +1 -0
  401. package/dist/wall/split-store.js +6 -0
  402. package/dist/wall/split-tool.d.ts +10 -0
  403. package/dist/wall/split-tool.d.ts.map +1 -0
  404. package/dist/wall/split-tool.js +95 -0
  405. package/dist/wall/system.d.ts.map +1 -1
  406. package/dist/wall/system.js +3 -1
  407. package/dist/wall/tool.d.ts.map +1 -1
  408. package/dist/wall/tool.js +14 -6
  409. package/dist/wall/wall-batch-system.d.ts.map +1 -1
  410. package/dist/wall/wall-batch-system.js +3 -0
  411. package/dist/window/definition.d.ts.map +1 -1
  412. package/dist/window/definition.js +48 -1
  413. package/dist/window/floorplan-affordances.d.ts.map +1 -1
  414. package/dist/window/floorplan-affordances.js +8 -10
  415. package/dist/window/move-tool.d.ts.map +1 -1
  416. package/dist/window/move-tool.js +4 -6
  417. package/dist/window/panel.d.ts.map +1 -1
  418. package/dist/window/panel.js +22 -60
  419. package/dist/window/tool.d.ts.map +1 -1
  420. package/dist/window/tool.js +34 -2
  421. package/dist/window/window-math.d.ts +1 -1
  422. package/dist/window/window-math.d.ts.map +1 -1
  423. package/dist/window/window-math.js +8 -11
  424. package/dist/zone/definition.d.ts.map +1 -1
  425. package/dist/zone/definition.js +8 -1
  426. package/dist/zone/floorplan.d.ts +1 -3
  427. package/dist/zone/floorplan.d.ts.map +1 -1
  428. package/dist/zone/floorplan.js +43 -28
  429. package/dist/zone/quantities-panel.d.ts.map +1 -1
  430. package/dist/zone/quantities-panel.js +32 -44
  431. package/dist/zone/renderer.d.ts.map +1 -1
  432. package/dist/zone/renderer.js +21 -7
  433. package/dist/zone/unit-membership.d.ts +12 -0
  434. package/dist/zone/unit-membership.d.ts.map +1 -0
  435. package/dist/zone/unit-membership.js +22 -0
  436. package/package.json +15 -9
  437. package/dist/shared/opening-documentation-fields.d.ts +0 -16
  438. package/dist/shared/opening-documentation-fields.d.ts.map +0 -1
  439. package/dist/shared/opening-documentation-fields.js +0 -54
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAqB,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAiDjE;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,aAAa,EAAE,MA2D3B,CAAA;AAED,OAAO,EACL,iBAAiB,EACjB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,iBAAiB,EACjB,eAAe,GAChB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,iBAAiB,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AE,cAAc,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA"}
package/dist/index.js CHANGED
@@ -19,6 +19,7 @@ import { fenceDefinition } from './fence';
19
19
  import { guideDefinition } from './guide';
20
20
  import { gutterDefinition } from './gutter';
21
21
  import { hvacEquipmentDefinition } from './hvac-equipment';
22
+ import { importedMeshDefinition } from './imported-mesh';
22
23
  import { itemDefinition } from './item';
23
24
  import { leanToExtensionDefinition } from './lean-to-extension';
24
25
  import { levelDefinition } from './level';
@@ -28,6 +29,7 @@ import { measurementDefinition } from './measurement';
28
29
  import { pipeFittingDefinition } from './pipe-fitting';
29
30
  import { pipeSegmentDefinition } from './pipe-segment';
30
31
  import { pipeTrapDefinition } from './pipe-trap';
32
+ import { proceduralItemDefinition } from './procedural-item/definition';
31
33
  import { ridgeVentDefinition } from './ridge-vent';
32
34
  import { roofDefinition } from './roof';
33
35
  import { roofSegmentDefinition } from './roof-segment';
@@ -42,6 +44,7 @@ import { stairDefinition } from './stair';
42
44
  import { stairSegmentDefinition } from './stair-segment';
43
45
  import { structuralGridDefinition } from './structural-grid';
44
46
  import { turbineVentDefinition } from './turbine-vent';
47
+ import { unitDefinition } from './unit';
45
48
  import { wallDefinition } from './wall';
46
49
  import { windowDefinition } from './window';
47
50
  import { zoneDefinition } from './zone';
@@ -79,10 +82,13 @@ export const builtinPlugin = {
79
82
  cabinetDefinition,
80
83
  cabinetModuleDefinition,
81
84
  itemDefinition,
85
+ proceduralItemDefinition,
86
+ importedMeshDefinition,
82
87
  // Stage A — wrap-exports the legacy renderer + system. Legacy
83
88
  // panels / move tools / floorplan branches still serve these.
84
89
  columnDefinition,
85
90
  elevatorDefinition,
91
+ unitDefinition,
86
92
  roofDefinition,
87
93
  roofSegmentDefinition,
88
94
  stairDefinition,
@@ -143,6 +149,7 @@ export { fenceDefinition } from './fence';
143
149
  export { guideDefinition } from './guide';
144
150
  export { gutterDefinition } from './gutter';
145
151
  export { hvacEquipmentDefinition } from './hvac-equipment';
152
+ export { importedMeshDefinition } from './imported-mesh';
146
153
  export { itemDefinition } from './item';
147
154
  export { leanToExtensionDefinition } from './lean-to-extension';
148
155
  export { levelDefinition } from './level';
@@ -166,6 +173,7 @@ export { stairDefinition } from './stair';
166
173
  export { stairSegmentDefinition } from './stair-segment';
167
174
  export { structuralGridDefinition } from './structural-grid';
168
175
  export { turbineVentDefinition } from './turbine-vent';
176
+ export { unitDefinition } from './unit';
169
177
  export { wallDefinition } from './wall';
170
178
  export { windowDefinition } from './window';
171
179
  export { zoneDefinition } from './zone';
@@ -0,0 +1,26 @@
1
+ import { type FloorplanGeometry, type GeometryContext, type ItemNode } from '@pascal-app/core';
2
+ /**
3
+ * Stage C floor-plan builder for item.
4
+ *
5
+ * Items can be parented to a wall, ceiling, slab, or another item.
6
+ * Position is in the parent's local frame, so we walk the parent chain
7
+ * via `ctx.resolve` to compute the world-space (level-local) transform.
8
+ *
9
+ * Mirrors `getItemFloorplanTransform` from editor/lib/floorplan/items.ts
10
+ * but uses the registry's resolve callback instead of a node map. Logic
11
+ * is identical so visual output matches the legacy.
12
+ *
13
+ * Returns a rotated rectangle of width × depth at the resolved position.
14
+ * Phase 5 follow-up may render `asset.floorPlanUrl` as a custom image
15
+ * overlay when present.
16
+ */
17
+ type Transform = {
18
+ x: number;
19
+ y: number;
20
+ rotation: number;
21
+ };
22
+ export declare function resolveItemTransform(item: ItemNode, ctx: GeometryContext, cache?: Map<`roof_${string}` | `rseg_${string}` | `site_${string}` | `building_${string}` | `level_${string}` | `elevator_${string}` | `unit_${string}` | `zone_${string}` | `block_${string}` | `ceiling_${string}` | `item_${string}` | `procedural-item_${string}` | `column_${string}` | `construction-dimension_${string}` | `wall_${string}` | `slab_${string}` | `fence_${string}` | `structural-grid_${string}` | `imesh_${string}` | `stair_${string}` | `scan_${string}` | `guide_${string}` | `measurement_${string}` | `spawn_${string}` | `shelf_${string}` | `duct-segment_${string}` | `duct-fitting_${string}` | `duct-terminal_${string}` | `hvac-equipment_${string}` | `lineset_${string}` | `liquid-line_${string}` | `pipe-segment_${string}` | `pipe-fitting_${string}` | `pipe-trap_${string}` | `leanto_${string}` | `door_${string}` | `window_${string}` | `cabinet_${string}` | `cabinet-module_${string}` | `sseg_${string}` | `bvent_${string}` | `rvent_${string}` | `tvent_${string}` | `cupola_${string}` | `eyebrow-vent_${string}` | `gutter_${string}` | `chimney_${string}` | `solarpanel_${string}` | `skylight_${string}` | `dormer_${string}` | `downspout_${string}`, Transform | null>): Transform | null;
23
+ export declare function buildItemContextualDimensions(node: ItemNode, ctx: GeometryContext): FloorplanGeometry | null;
24
+ export declare function buildItemFloorplan(node: ItemNode, ctx: GeometryContext): FloorplanGeometry | null;
25
+ export {};
26
+ //# sourceMappingURL=main-floorplan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main-floorplan.d.ts","sourceRoot":"","sources":["../../../src/item/__fixtures__/main-floorplan.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,iBAAiB,EAEtB,KAAK,eAAe,EAIpB,KAAK,QAAQ,EAId,MAAM,kBAAkB,CAAA;AAIzB;;;;;;;;;;;;;;GAcG;AACH,KAAK,SAAS,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAA;AAe3D,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,QAAQ,EACd,GAAG,EAAE,eAAe,EACpB,KAAK,0pCAAyC,GAC7C,SAAS,GAAG,IAAI,CA6JlB;AAED,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,QAAQ,EACd,GAAG,EAAE,eAAe,GACnB,iBAAiB,GAAG,IAAI,CA+C1B;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,eAAe,GAAG,iBAAiB,GAAG,IAAI,CAmGjG"}
@@ -0,0 +1,297 @@
1
+ import { getBlockFaceFrame, getRoofWallFaceFrame, getScaledDimensions, roofFacePointToSegment, useLiveTransforms, } from '@pascal-app/core';
2
+ import { formatLinearMeasurement, readFloorplanMetricNotationOverride } from '@pascal-app/editor';
3
+ import { restingNodePlanFrame } from '../../shared/resting-surface-plan';
4
+ // Plan-space rotation convention used by the legacy `rotatePlanVector`
5
+ // in `editor/src/lib/floorplan/geometry.ts`. This is a CLOCKWISE rotation
6
+ // — the registry-side equivalent of the canonical floor-plan transform
7
+ // math. Don't switch to a standard counter-clockwise rotation; the wall
8
+ // items math (wallRotation = -atan2(dy, dx)) is calibrated against this
9
+ // convention, and the legacy item floor-plan stack reads from these
10
+ // offsets across many sites.
11
+ function rotateVec(x, y, angle) {
12
+ const c = Math.cos(angle);
13
+ const s = Math.sin(angle);
14
+ return [x * c + y * s, -x * s + y * c];
15
+ }
16
+ export function resolveItemTransform(item, ctx, cache = new Map()) {
17
+ const cached = cache.get(item.id);
18
+ if (cached !== undefined)
19
+ return cached;
20
+ const localRotation = item.rotation[1] ?? 0;
21
+ let result = null;
22
+ const parentNode = item.parentId
23
+ ? ctx.resolve(item.parentId)
24
+ : undefined;
25
+ if (parentNode?.type === 'wall') {
26
+ // Wall-aligned: rotate item.position by wall's angle, anchor at wall.start.
27
+ const wall = parentNode;
28
+ const wallRotation = -Math.atan2(wall.end[1] - wall.start[1], wall.end[0] - wall.start[0]);
29
+ const wallLocalZ = item.asset.attachTo === 'wall-side'
30
+ ? ((wall.thickness ?? 0.1) / 2) * (item.side === 'front' ? 1 : -1)
31
+ : item.position[2];
32
+ const [offsetX, offsetY] = rotateVec(item.position[0], wallLocalZ, wallRotation);
33
+ result = {
34
+ x: wall.start[0] + offsetX,
35
+ y: wall.start[1] + offsetY,
36
+ rotation: wallRotation + localRotation,
37
+ };
38
+ }
39
+ else if (parentNode?.type === 'item') {
40
+ // Nested item: recursively resolve parent's transform.
41
+ const parentT = resolveItemTransform(parentNode, ctx, cache);
42
+ if (parentT) {
43
+ const [offsetX, offsetY] = rotateVec(item.position[0], item.position[2], parentT.rotation);
44
+ result = {
45
+ x: parentT.x + offsetX,
46
+ y: parentT.y + offsetY,
47
+ rotation: parentT.rotation + localRotation,
48
+ };
49
+ }
50
+ }
51
+ else if (parentNode?.type === 'cabinet' ||
52
+ parentNode?.type === 'cabinet-module' ||
53
+ parentNode?.type === 'procedural-item') {
54
+ const f = restingNodePlanFrame(item, ctx.resolve);
55
+ result = {
56
+ x: f.position[0],
57
+ y: f.position[2],
58
+ rotation: Math.atan2(f.axes[2][0], f.axes[2][2]),
59
+ };
60
+ }
61
+ else if (parentNode?.type === 'shelf') {
62
+ // Shelf-hosted item: `item.position` is in shelf-local coords. The
63
+ // shelf has its own `position` + `rotation[1]` in its parent (level)
64
+ // frame, so the item's plan-space position composes the shelf's
65
+ // pose with the item's local offset. Without this branch the
66
+ // `else` below would treat shelf-local coords as level-local and
67
+ // the item would render at the wrong spot whenever the shelf is
68
+ // anywhere other than (0, 0, 0).
69
+ //
70
+ // We also check `useLiveTransforms` for the shelf — if the shelf is
71
+ // mid-move (3D or 2D), its scene-state `position` is still at the
72
+ // pre-move spot but the live transform carries the cursor-tracked
73
+ // position. Reading the live value here keeps the hosted item
74
+ // following the shelf in 2D throughout the drag, mirroring how the
75
+ // shelf's own entry follows via the layer's effectiveNode override.
76
+ const shelf = parentNode;
77
+ const live = useLiveTransforms.getState().get(shelf.id);
78
+ if (shelf.parentId &&
79
+ ['item', 'shelf', 'cabinet', 'cabinet-module', 'procedural-item'].includes(ctx.resolve(shelf.parentId)?.type ?? '')) {
80
+ const parentT = resolveItemTransform({
81
+ ...shelf,
82
+ position: live?.position ?? shelf.position,
83
+ rotation: [0, live?.rotation ?? shelf.rotation[1], 0],
84
+ }, ctx, cache);
85
+ if (!parentT)
86
+ return null;
87
+ const [x, y] = rotateVec(item.position[0], item.position[2], parentT.rotation);
88
+ return { x: parentT.x + x, y: parentT.y + y, rotation: parentT.rotation + localRotation };
89
+ }
90
+ const shelfX = live?.position[0] ?? shelf.position[0];
91
+ const shelfZ = live?.position[2] ?? shelf.position[2];
92
+ const shelfRotationY = live?.rotation ?? shelf.rotation[1] ?? 0;
93
+ const [offsetX, offsetY] = rotateVec(item.position[0], item.position[2], shelfRotationY);
94
+ result = {
95
+ x: shelfX + offsetX,
96
+ y: shelfZ + offsetY,
97
+ rotation: shelfRotationY + localRotation,
98
+ };
99
+ }
100
+ else if (parentNode?.type === 'roof-segment') {
101
+ // Roof-hosted wall item: FACE-LOCAL position mapped through the face
102
+ // frame, then composed through the segment's and parent roof's poses
103
+ // into level-local plan coords.
104
+ const segment = parentNode;
105
+ const roof = segment.parentId
106
+ ? ctx.resolve(segment.parentId)
107
+ : undefined;
108
+ if (roof?.type === 'roof' && item.roofFace) {
109
+ const frame = getRoofWallFaceFrame(segment, item.roofFace);
110
+ const segLocal = roofFacePointToSegment(segment, item.roofFace, item.position);
111
+ const [sx, sz] = rotateVec(segLocal[0], segLocal[2], segment.rotation ?? 0);
112
+ const [rx, rz] = rotateVec(sx + segment.position[0], sz + segment.position[2], roof.rotation ?? 0);
113
+ result = {
114
+ x: rx + roof.position[0],
115
+ y: rz + roof.position[2],
116
+ rotation: (roof.rotation ?? 0) + (segment.rotation ?? 0) + frame.yaw + localRotation,
117
+ };
118
+ }
119
+ }
120
+ else if (parentNode?.type === 'block' && item.blockFaceId) {
121
+ const frame = getBlockFaceFrame(parentNode.topology, item.blockFaceId);
122
+ if (frame) {
123
+ const localX = frame.origin[0] +
124
+ frame.xAxis[0] * item.position[0] +
125
+ frame.yAxis[0] * item.position[1] +
126
+ frame.normal[0] * item.position[2];
127
+ const localZ = frame.origin[2] +
128
+ frame.xAxis[2] * item.position[0] +
129
+ frame.yAxis[2] * item.position[1] +
130
+ frame.normal[2] * item.position[2];
131
+ const hostRotation = parentNode.rotation ?? 0;
132
+ const [offsetX, offsetZ] = rotateVec(localX, localZ, hostRotation);
133
+ const faceRotation = -Math.atan2(frame.xAxis[2], frame.xAxis[0]);
134
+ result = {
135
+ x: parentNode.position[0] + offsetX,
136
+ y: parentNode.position[2] + offsetZ,
137
+ rotation: hostRotation + faceRotation + localRotation,
138
+ };
139
+ }
140
+ }
141
+ else {
142
+ // Level / slab / ceiling parent — item.position is level-local.
143
+ result = {
144
+ x: item.position[0],
145
+ y: item.position[2],
146
+ rotation: localRotation,
147
+ };
148
+ }
149
+ cache.set(item.id, result);
150
+ return result;
151
+ }
152
+ export function buildItemContextualDimensions(node, ctx) {
153
+ const transform = resolveItemTransform(node, ctx);
154
+ if (!transform)
155
+ return null;
156
+ const [width, , depth] = getScaledDimensions(node);
157
+ if (width <= 1e-6 || depth <= 1e-6)
158
+ return null;
159
+ const centerLocalZ = node.asset.attachTo === 'wall-side' ? depth / 2 : 0;
160
+ const [centerOffsetX, centerOffsetY] = rotateVec(0, centerLocalZ, transform.rotation);
161
+ const cx = transform.x + centerOffsetX;
162
+ const cy = transform.y + centerOffsetY;
163
+ const halfWidth = width / 2;
164
+ const halfDepth = depth / 2;
165
+ const point = (x, y) => {
166
+ const [rx, ry] = rotateVec(x, y, transform.rotation);
167
+ return [cx + rx, cy + ry];
168
+ };
169
+ const widthNormal = rotateVec(0, -1, transform.rotation);
170
+ const depthNormal = rotateVec(1, 0, transform.rotation);
171
+ const unit = ctx.viewState?.unit ?? 'metric';
172
+ const metricNotation = readFloorplanMetricNotationOverride(ctx) ?? 'meters';
173
+ const stroke = ctx.viewState?.palette?.selectedStroke ?? '#2563eb';
174
+ return {
175
+ kind: 'group',
176
+ children: [
177
+ {
178
+ kind: 'dimension',
179
+ start: point(-halfWidth, -halfDepth),
180
+ end: point(halfWidth, -halfDepth),
181
+ offsetNormal: widthNormal,
182
+ offsetDistance: 0.28,
183
+ extensionOvershoot: 0.08,
184
+ text: formatLinearMeasurement(width, unit, metricNotation),
185
+ stroke,
186
+ },
187
+ {
188
+ kind: 'dimension',
189
+ start: point(halfWidth, -halfDepth),
190
+ end: point(halfWidth, halfDepth),
191
+ offsetNormal: depthNormal,
192
+ offsetDistance: 0.28,
193
+ extensionOvershoot: 0.08,
194
+ text: formatLinearMeasurement(depth, unit, metricNotation),
195
+ stroke,
196
+ },
197
+ ],
198
+ };
199
+ }
200
+ export function buildItemFloorplan(node, ctx) {
201
+ const transform = resolveItemTransform(node, ctx);
202
+ if (!transform)
203
+ return null;
204
+ const [width, , depth] = getScaledDimensions(node);
205
+ if (width <= 0 || depth <= 0)
206
+ return null;
207
+ // Wall-side items are anchored at the mounted wall face; their body extends
208
+ // depth-ward AWAY from the wall (into the room), so push the footprint centre
209
+ // a half-depth out along the item's local +Z. After the front/back π flip in
210
+ // `transform.rotation`, +depth/2 always points off the wall for either side;
211
+ // a negative offset would lay the footprint across the wall onto the far side.
212
+ const centerLocalZ = node.asset.attachTo === 'wall-side' ? depth / 2 : 0;
213
+ const [centerOffsetX, centerOffsetY] = rotateVec(0, centerLocalZ, transform.rotation);
214
+ const cx = transform.x + centerOffsetX;
215
+ const cy = transform.y + centerOffsetY;
216
+ // Rectangle corners in local space, rotated and translated.
217
+ const halfW = width / 2;
218
+ const halfD = depth / 2;
219
+ const corners = [
220
+ [-halfW, -halfD],
221
+ [halfW, -halfD],
222
+ [halfW, halfD],
223
+ [-halfW, halfD],
224
+ ];
225
+ const points = corners.map(([x, y]) => {
226
+ const [rx, ry] = rotateVec(x, y, transform.rotation);
227
+ return [cx + rx, cy + ry];
228
+ });
229
+ const isSelected = ctx.viewState?.selected ?? false;
230
+ // Marquee preview — the about-to-be-selected tint every other kind shows.
231
+ const isHighlighted = ctx.viewState?.highlighted ?? false;
232
+ const showSelection = isSelected || isHighlighted;
233
+ const isMoving = ctx.viewState?.moving ?? false;
234
+ const selectedStroke = ctx.viewState?.palette?.selectedStroke ?? '#3b82f6';
235
+ const floorPlanUrl = node.asset.floorPlanUrl;
236
+ const children = [
237
+ {
238
+ kind: 'polygon',
239
+ points,
240
+ // When an asset thumbnail is present, the polygon is a transparent
241
+ // hit-target — the image carries the visual weight. Without a
242
+ // thumbnail the polygon needs a light fill to read at all.
243
+ //
244
+ // `transparent` (not `none`) so the interior remains hit-testable —
245
+ // the registry layer's wrapping `<g>` only fires onPointerDown when
246
+ // the child renders a paintable surface. `fill="none"` would make
247
+ // clicks pass through to whatever's beneath, breaking selection.
248
+ fill: floorPlanUrl ? 'transparent' : '#fef3c7',
249
+ // Selected items read as selected: palette stroke + heavier weight
250
+ // (the move dot used to be the only cue, and it hides in
251
+ // multi-selections).
252
+ stroke: showSelection ? selectedStroke : '#92400e',
253
+ strokeWidth: showSelection ? 0.035 : 0.012,
254
+ opacity: 0.85,
255
+ },
256
+ ];
257
+ // Asset thumbnail — top-down PNG capture from the asset modal. Drawn
258
+ // inside the footprint with the item's rotation applied. Matches the
259
+ // legacy `FloorplanItemImage` overlay.
260
+ if (floorPlanUrl) {
261
+ children.push({
262
+ kind: 'image',
263
+ url: floorPlanUrl,
264
+ center: [cx, cy],
265
+ width,
266
+ height: depth,
267
+ // `rotateVec` (the footprint polygon) applies R(-angle), but the renderer
268
+ // draws the image with SVG `rotate(+deg)` = R(+angle). Negate so the
269
+ // sprite rotates the same way as its footprint box (and 3D); otherwise the
270
+ // two counter-rotate and diverge by 2x the item's rotation.
271
+ rotation: -transform.rotation,
272
+ });
273
+ }
274
+ // Selection ring ABOVE the thumbnail — the base polygon's selected stroke
275
+ // sits underneath the image, so re-draw it on top. `fill: none` keeps the
276
+ // ring click-through; the base polygon owns hit-testing.
277
+ if (showSelection && floorPlanUrl) {
278
+ children.push({
279
+ kind: 'polygon',
280
+ points,
281
+ fill: 'none',
282
+ stroke: selectedStroke,
283
+ strokeWidth: 0.035,
284
+ opacity: isSelected ? 0.95 : 0.7,
285
+ });
286
+ }
287
+ // Move handle — orange dot at the item center. Only when selected and not
288
+ // already moving: during a move the dot sits under the cursor, so a release
289
+ // over it would re-arm the move (and re-enter edit) instead of committing.
290
+ if (isSelected && !isMoving) {
291
+ children.push({
292
+ kind: 'move-handle',
293
+ point: [cx, cy],
294
+ });
295
+ }
296
+ return { kind: 'group', children };
297
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/item/definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAA;AAMzB,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AA+HnC;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,cAAc,EAAE,cAAc,CAAC,OAAO,QAAQ,CAwL1D,CAAA"}
1
+ {"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/item/definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAA;AAOzB,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AA+HnC;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,cAAc,EAAE,cAAc,CAAC,OAAO,QAAQ,CAyL1D,CAAA"}
@@ -1,4 +1,5 @@
1
1
  import { getScaledDimensions, } from '@pascal-app/core';
2
+ import { restingFloorplanAffectedIds } from '../shared/resting-surface-plan';
2
3
  import { buildItemContextualDimensions, buildItemFloorplan } from './floorplan';
3
4
  import { itemFloorplanMoveTarget } from './floorplan-move';
4
5
  import { itemPaint } from './paint';
@@ -196,7 +197,7 @@ export const itemDefinition = {
196
197
  },
197
198
  },
198
199
  },
199
- duplicable: true,
200
+ duplicable: { subtree: 'with-children' },
200
201
  deletable: true,
201
202
  paint: itemPaint,
202
203
  // Items participate in compositions — e.g. "table-with-plants",
@@ -297,6 +298,7 @@ export const itemDefinition = {
297
298
  // Stage C: floor-plan polygon. ctx.resolve walks the parent chain
298
299
  // (wall / nested item / level) to compute the world-space transform.
299
300
  floorplan: buildItemFloorplan,
301
+ floorplanAffectedIds: restingFloorplanAffectedIds,
300
302
  // 2D move-on-floorplan handler. Branches on `asset.attachTo`:
301
303
  // wall items snap to walls (like door / window), ceiling items
302
304
  // snap to ceiling polygons, floor items snap to slabs. attachTo
@@ -1,3 +1,11 @@
1
- import { type FloorplanMoveTarget, type ItemNode } from '@pascal-app/core';
1
+ import { type AnyNode, type AnyNodeId, type CeilingNode, type FloorplanMoveTarget, type ItemNode } from '@pascal-app/core';
2
2
  export declare const itemFloorplanMoveTarget: FloorplanMoveTarget<ItemNode>;
3
+ /**
4
+ * Walk every ceiling under the level and return the first one whose
5
+ * polygon contains the pointer. Holes are honoured — a point inside a
6
+ * hole counts as not inside the surface. Slabs are intentionally NOT a
7
+ * valid target: floor items are parented to the level, not the slab,
8
+ * because slabs don't carry a `children` field on their schema.
9
+ */
10
+ export declare function findContainingSurface(point: readonly [number, number], nodes: Record<AnyNodeId, AnyNode>, parentLevelId: AnyNodeId | null, targetKind: 'ceiling'): CeilingNode | null;
3
11
  //# sourceMappingURL=floorplan-move.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"floorplan-move.d.ts","sourceRoot":"","sources":["../../src/item/floorplan-move.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,mBAAmB,EAKxB,KAAK,QAAQ,EAMd,MAAM,kBAAkB,CAAA;AAsKzB,eAAO,MAAM,uBAAuB,EAAE,mBAAmB,CAAC,QAAQ,CA+BjE,CAAA"}
1
+ {"version":3,"file":"floorplan-move.d.ts","sourceRoot":"","sources":["../../src/item/floorplan-move.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,SAAS,EACd,KAAK,WAAW,EAMhB,KAAK,mBAAmB,EAKxB,KAAK,QAAQ,EAQd,MAAM,kBAAkB,CAAA;AA+EzB,eAAO,MAAM,uBAAuB,EAAE,mBAAmB,CAAC,QAAQ,CA+BjE,CAAA;AAgaD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,EAChC,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,EACjC,aAAa,EAAE,SAAS,GAAG,IAAI,EAC/B,UAAU,EAAE,SAAS,GACpB,WAAW,GAAG,IAAI,CAwBpB"}