@pascal-app/nodes 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (708) hide show
  1. package/dist/block/definition.d.ts.map +1 -1
  2. package/dist/block/definition.js +18 -3
  3. package/dist/block/floorplan.d.ts +11 -1
  4. package/dist/block/floorplan.d.ts.map +1 -1
  5. package/dist/block/floorplan.js +81 -13
  6. package/dist/block/geometry.d.ts +2 -2
  7. package/dist/block/geometry.d.ts.map +1 -1
  8. package/dist/block/geometry.js +39 -24
  9. package/dist/block/hosted-edit.d.ts.map +1 -1
  10. package/dist/block/hosted-edit.js +25 -0
  11. package/dist/block/material-slots.d.ts +1 -3
  12. package/dist/block/material-slots.d.ts.map +1 -1
  13. package/dist/block/material-slots.js +1 -11
  14. package/dist/block/paint.d.ts.map +1 -1
  15. package/dist/block/paint.js +4 -10
  16. package/dist/block/panel.d.ts.map +1 -1
  17. package/dist/block/panel.js +8 -3
  18. package/dist/block/selection.d.ts.map +1 -1
  19. package/dist/block/selection.js +2 -2
  20. package/dist/box-vent/definition.d.ts.map +1 -1
  21. package/dist/box-vent/definition.js +2 -5
  22. package/dist/box-vent/panel.d.ts.map +1 -1
  23. package/dist/box-vent/panel.js +5 -28
  24. package/dist/cabinet/countertop-layout.d.ts +13 -2
  25. package/dist/cabinet/countertop-layout.d.ts.map +1 -1
  26. package/dist/cabinet/definition.d.ts.map +1 -1
  27. package/dist/cabinet/definition.js +1 -2
  28. package/dist/cabinet/floorplan.d.ts.map +1 -1
  29. package/dist/cabinet/floorplan.js +125 -28
  30. package/dist/cabinet/geometry/shared.d.ts +1 -2
  31. package/dist/cabinet/geometry/shared.d.ts.map +1 -1
  32. package/dist/cabinet/geometry/shared.js +1 -2
  33. package/dist/cabinet/run-layout.d.ts.map +1 -1
  34. package/dist/cabinet/run-layout.js +8 -5
  35. package/dist/cabinet/run-ops.d.ts +13 -2
  36. package/dist/cabinet/run-ops.d.ts.map +1 -1
  37. package/dist/cabinet/tool.d.ts.map +1 -1
  38. package/dist/cabinet/tool.js +22 -24
  39. package/dist/cabinet/wall-snap.d.ts.map +1 -1
  40. package/dist/cabinet/wall-snap.js +8 -8
  41. package/dist/ceiling/boundary-editor.d.ts.map +1 -1
  42. package/dist/ceiling/boundary-editor.js +5 -3
  43. package/dist/ceiling/definition.d.ts +4 -4
  44. package/dist/ceiling/definition.d.ts.map +1 -1
  45. package/dist/ceiling/definition.js +15 -15
  46. package/dist/ceiling/floorplan-affordances.d.ts +84 -4
  47. package/dist/ceiling/floorplan-affordances.d.ts.map +1 -1
  48. package/dist/ceiling/floorplan-affordances.js +0 -1
  49. package/dist/ceiling/floorplan-move.d.ts.map +1 -1
  50. package/dist/ceiling/floorplan-move.js +0 -1
  51. package/dist/ceiling/floorplan.d.ts +1 -1
  52. package/dist/ceiling/floorplan.d.ts.map +1 -1
  53. package/dist/ceiling/floorplan.js +2 -1
  54. package/dist/ceiling/height-bounds.d.ts +19 -0
  55. package/dist/ceiling/height-bounds.d.ts.map +1 -0
  56. package/dist/ceiling/height-bounds.js +24 -0
  57. package/dist/ceiling/hole-editor.d.ts.map +1 -1
  58. package/dist/ceiling/hole-editor.js +3 -4
  59. package/dist/ceiling/materials.d.ts +1 -1
  60. package/dist/ceiling/materials.d.ts.map +1 -1
  61. package/dist/ceiling/materials.js +10 -3
  62. package/dist/ceiling/paint.d.ts +2 -8
  63. package/dist/ceiling/paint.d.ts.map +1 -1
  64. package/dist/ceiling/paint.js +121 -24
  65. package/dist/ceiling/panel.d.ts.map +1 -1
  66. package/dist/ceiling/panel.js +40 -23
  67. package/dist/ceiling/renderer.d.ts.map +1 -1
  68. package/dist/ceiling/renderer.js +41 -5
  69. package/dist/chimney/move-tool.d.ts.map +1 -1
  70. package/dist/chimney/move-tool.js +8 -2
  71. package/dist/chimney/paint.d.ts.map +1 -1
  72. package/dist/chimney/paint.js +3 -10
  73. package/dist/column/definition.d.ts.map +1 -1
  74. package/dist/column/definition.js +24 -2
  75. package/dist/column/floorplan-affordances.d.ts.map +1 -1
  76. package/dist/column/floorplan-affordances.js +5 -0
  77. package/dist/column/floorplan.d.ts +1 -1
  78. package/dist/column/floorplan.d.ts.map +1 -1
  79. package/dist/column/floorplan.js +47 -2
  80. package/dist/column/hosted-resize.d.ts +101 -2
  81. package/dist/column/hosted-resize.d.ts.map +1 -1
  82. package/dist/column/panel.d.ts.map +1 -1
  83. package/dist/column/panel.js +147 -146
  84. package/dist/column/renderer.d.ts.map +1 -1
  85. package/dist/column/renderer.js +6 -4
  86. package/dist/column/surface.d.ts.map +1 -1
  87. package/dist/column/surface.js +7 -0
  88. package/dist/construction-dimension/floorplan.js +7 -3
  89. package/dist/cupola/definition.d.ts.map +1 -1
  90. package/dist/cupola/definition.js +2 -8
  91. package/dist/cupola/panel.d.ts.map +1 -1
  92. package/dist/cupola/panel.js +5 -23
  93. package/dist/door/definition.d.ts.map +1 -1
  94. package/dist/door/definition.js +12 -3
  95. package/dist/door/door-math.d.ts +5 -10
  96. package/dist/door/door-math.d.ts.map +1 -1
  97. package/dist/door/door-math.js +14 -15
  98. package/dist/door/floorplan-move.d.ts.map +1 -1
  99. package/dist/door/floorplan-move.js +3 -1
  100. package/dist/door/floorplan.d.ts.map +1 -1
  101. package/dist/door/floorplan.js +55 -21
  102. package/dist/door/mechanism.d.ts +4 -0
  103. package/dist/door/mechanism.d.ts.map +1 -0
  104. package/dist/door/mechanism.js +24 -0
  105. package/dist/door/move-tool.d.ts.map +1 -1
  106. package/dist/door/move-tool.js +72 -48
  107. package/dist/door/paint.d.ts.map +1 -1
  108. package/dist/door/paint.js +3 -0
  109. package/dist/door/panel.d.ts.map +1 -1
  110. package/dist/door/panel.js +34 -259
  111. package/dist/door/placement.d.ts +45 -0
  112. package/dist/door/placement.d.ts.map +1 -0
  113. package/dist/door/placement.js +51 -0
  114. package/dist/door/preview.d.ts.map +1 -1
  115. package/dist/door/preview.js +2 -0
  116. package/dist/door/renderer.d.ts.map +1 -1
  117. package/dist/door/renderer.js +3 -2
  118. package/dist/door/tool.d.ts.map +1 -1
  119. package/dist/door/tool.js +92 -21
  120. package/dist/dormer/csg-geometry.d.ts.map +1 -1
  121. package/dist/dormer/csg-geometry.js +2 -0
  122. package/dist/dormer/paint.d.ts.map +1 -1
  123. package/dist/dormer/paint.js +2 -5
  124. package/dist/dormer/panel.d.ts.map +1 -1
  125. package/dist/dormer/panel.js +4 -14
  126. package/dist/downspout/definition.d.ts.map +1 -1
  127. package/dist/downspout/definition.js +2 -2
  128. package/dist/duct-fitting/definition.d.ts.map +1 -1
  129. package/dist/duct-fitting/definition.js +2 -1
  130. package/dist/duct-fitting/geometry.d.ts.map +1 -1
  131. package/dist/duct-fitting/geometry.js +1 -1
  132. package/dist/duct-fitting/move-tool.d.ts.map +1 -1
  133. package/dist/duct-fitting/move-tool.js +8 -2
  134. package/dist/duct-segment/definition.d.ts.map +1 -1
  135. package/dist/duct-segment/definition.js +2 -2
  136. package/dist/duct-segment/geometry.d.ts.map +1 -1
  137. package/dist/duct-segment/geometry.js +1 -1
  138. package/dist/duct-segment/move-tool.d.ts.map +1 -1
  139. package/dist/duct-segment/move-tool.js +8 -2
  140. package/dist/elevator/definition.d.ts.map +1 -1
  141. package/dist/elevator/definition.js +1 -2
  142. package/dist/elevator/panel.d.ts.map +1 -1
  143. package/dist/elevator/panel.js +5 -27
  144. package/dist/elevator/parametrics.js +1 -1
  145. package/dist/elevator/renderer.d.ts.map +1 -1
  146. package/dist/elevator/renderer.js +3 -4
  147. package/dist/eyebrow-vent/definition.d.ts.map +1 -1
  148. package/dist/eyebrow-vent/definition.js +2 -5
  149. package/dist/eyebrow-vent/paint.d.ts.map +1 -1
  150. package/dist/eyebrow-vent/paint.js +3 -6
  151. package/dist/eyebrow-vent/panel.d.ts.map +1 -1
  152. package/dist/eyebrow-vent/panel.js +5 -23
  153. package/dist/fence/actions/move-endpoint.d.ts +1 -1
  154. package/dist/fence/actions/move-endpoint.d.ts.map +1 -1
  155. package/dist/fence/actions/move-endpoint.js +2 -1
  156. package/dist/fence/definition.d.ts +2 -1
  157. package/dist/fence/definition.d.ts.map +1 -1
  158. package/dist/fence/definition.js +83 -28
  159. package/dist/fence/drafting.d.ts +36 -0
  160. package/dist/fence/drafting.d.ts.map +1 -0
  161. package/dist/fence/drafting.js +210 -0
  162. package/dist/fence/feature-tool.d.ts +4 -0
  163. package/dist/fence/feature-tool.d.ts.map +1 -0
  164. package/dist/fence/feature-tool.js +140 -0
  165. package/dist/fence/features.d.ts +2 -0
  166. package/dist/fence/features.d.ts.map +1 -0
  167. package/dist/fence/features.js +12 -0
  168. package/dist/fence/floorplan-affordances.d.ts.map +1 -1
  169. package/dist/fence/floorplan-affordances.js +2 -1
  170. package/dist/fence/floorplan.d.ts +2 -3
  171. package/dist/fence/floorplan.d.ts.map +1 -1
  172. package/dist/fence/floorplan.js +131 -71
  173. package/dist/fence/geometry-parts.d.ts +50 -0
  174. package/dist/fence/geometry-parts.d.ts.map +1 -0
  175. package/dist/fence/geometry-parts.js +1144 -0
  176. package/dist/fence/geometry.d.ts +2 -3
  177. package/dist/fence/geometry.d.ts.map +1 -1
  178. package/dist/fence/geometry.js +84 -7
  179. package/dist/fence/index.d.ts +1 -0
  180. package/dist/fence/index.d.ts.map +1 -1
  181. package/dist/fence/index.js +1 -0
  182. package/dist/fence/inspector-editors.d.ts +15 -0
  183. package/dist/fence/inspector-editors.d.ts.map +1 -1
  184. package/dist/fence/inspector-editors.js +128 -3
  185. package/dist/fence/lift.d.ts.map +1 -1
  186. package/dist/fence/lift.js +5 -2
  187. package/dist/fence/move-tool.js +2 -1
  188. package/dist/fence/panel-model.d.ts +4 -0
  189. package/dist/fence/panel-model.d.ts.map +1 -0
  190. package/dist/fence/panel-model.js +12 -0
  191. package/dist/fence/parametrics.d.ts +0 -12
  192. package/dist/fence/parametrics.d.ts.map +1 -1
  193. package/dist/fence/parametrics.js +185 -18
  194. package/dist/fence/system.d.ts.map +1 -1
  195. package/dist/fence/system.js +141 -31
  196. package/dist/fence/tool.d.ts.map +1 -1
  197. package/dist/fence/tool.js +256 -47
  198. package/dist/fence-feature/actions.d.ts +7 -0
  199. package/dist/fence-feature/actions.d.ts.map +1 -0
  200. package/dist/fence-feature/actions.js +26 -0
  201. package/dist/fence-feature/definition.d.ts +4 -0
  202. package/dist/fence-feature/definition.d.ts.map +1 -0
  203. package/dist/fence-feature/definition.js +112 -0
  204. package/dist/fence-feature/floorplan-affordances.d.ts +3 -0
  205. package/dist/fence-feature/floorplan-affordances.d.ts.map +1 -0
  206. package/dist/fence-feature/floorplan-affordances.js +37 -0
  207. package/dist/fence-feature/floorplan.d.ts +4 -0
  208. package/dist/fence-feature/floorplan.d.ts.map +1 -0
  209. package/dist/fence-feature/floorplan.js +120 -0
  210. package/dist/fence-feature/geometry.d.ts +5 -0
  211. package/dist/fence-feature/geometry.d.ts.map +1 -0
  212. package/dist/fence-feature/geometry.js +43 -0
  213. package/dist/fence-feature/handles.d.ts +5 -0
  214. package/dist/fence-feature/handles.d.ts.map +1 -0
  215. package/dist/fence-feature/handles.js +84 -0
  216. package/dist/fence-feature/inspector.d.ts +6 -0
  217. package/dist/fence-feature/inspector.d.ts.map +1 -0
  218. package/dist/fence-feature/inspector.js +214 -0
  219. package/dist/fence-feature/interaction.d.ts +3 -0
  220. package/dist/fence-feature/interaction.d.ts.map +1 -0
  221. package/dist/fence-feature/interaction.js +41 -0
  222. package/dist/fence-feature/move-session.d.ts +9 -0
  223. package/dist/fence-feature/move-session.d.ts.map +1 -0
  224. package/dist/fence-feature/move-session.js +48 -0
  225. package/dist/fence-feature/move-tool.d.ts +5 -0
  226. package/dist/fence-feature/move-tool.d.ts.map +1 -0
  227. package/dist/fence-feature/move-tool.js +58 -0
  228. package/dist/fence-feature/pick-target.d.ts +7 -0
  229. package/dist/fence-feature/pick-target.d.ts.map +1 -0
  230. package/dist/fence-feature/pick-target.js +52 -0
  231. package/dist/floor-opening/definition.d.ts +3 -0
  232. package/dist/floor-opening/definition.d.ts.map +1 -0
  233. package/dist/floor-opening/definition.js +41 -0
  234. package/dist/floor-opening/floorplan.d.ts +156 -0
  235. package/dist/floor-opening/floorplan.d.ts.map +1 -0
  236. package/dist/floor-opening/floorplan.js +63 -0
  237. package/dist/gutter/definition.d.ts.map +1 -1
  238. package/dist/gutter/definition.js +2 -2
  239. package/dist/imported-mesh/definition.d.ts.map +1 -1
  240. package/dist/imported-mesh/definition.js +2 -0
  241. package/dist/imported-mesh/geometry.d.ts +1 -1
  242. package/dist/imported-mesh/geometry.d.ts.map +1 -1
  243. package/dist/imported-mesh/geometry.js +40 -12
  244. package/dist/index.d.ts +13 -2
  245. package/dist/index.d.ts.map +1 -1
  246. package/dist/index.js +20 -2
  247. package/dist/item/authored-face-host.d.ts +10 -0
  248. package/dist/item/authored-face-host.d.ts.map +1 -0
  249. package/dist/item/authored-face-host.js +87 -0
  250. package/dist/item/authored-params.d.ts +15 -0
  251. package/dist/item/authored-params.d.ts.map +1 -0
  252. package/dist/item/authored-params.js +72 -0
  253. package/dist/item/definition.d.ts +2 -2
  254. package/dist/item/definition.d.ts.map +1 -1
  255. package/dist/item/definition.js +33 -4
  256. package/dist/item/floorplan.d.ts +1 -1
  257. package/dist/item/floorplan.d.ts.map +1 -1
  258. package/dist/item/floorplan.js +35 -5
  259. package/dist/item/index.d.ts +1 -0
  260. package/dist/item/index.d.ts.map +1 -1
  261. package/dist/item/index.js +1 -0
  262. package/dist/item/model-loader.d.ts +2 -0
  263. package/dist/item/model-loader.d.ts.map +1 -1
  264. package/dist/item/model-loader.js +55 -23
  265. package/dist/item/move-tool.js +4 -4
  266. package/dist/item/paint.d.ts.map +1 -1
  267. package/dist/item/paint.js +5 -24
  268. package/dist/item/panel.d.ts +1 -3
  269. package/dist/item/panel.d.ts.map +1 -1
  270. package/dist/item/panel.js +20 -24
  271. package/dist/item/placement-notice.d.ts +14 -0
  272. package/dist/item/placement-notice.d.ts.map +1 -0
  273. package/dist/item/placement-notice.js +38 -0
  274. package/dist/item/plan-symbols.d.ts +67 -0
  275. package/dist/item/plan-symbols.d.ts.map +1 -0
  276. package/dist/item/plan-symbols.js +407 -0
  277. package/dist/item/renderer.d.ts +10 -0
  278. package/dist/item/renderer.d.ts.map +1 -1
  279. package/dist/item/renderer.js +64 -38
  280. package/dist/item/script-param-defaults.d.ts +12 -0
  281. package/dist/item/script-param-defaults.d.ts.map +1 -0
  282. package/dist/item/script-param-defaults.js +34 -0
  283. package/dist/lean-to-extension/definition.d.ts.map +1 -1
  284. package/dist/lean-to-extension/definition.js +1 -2
  285. package/dist/lean-to-extension/geometry.d.ts.map +1 -1
  286. package/dist/lean-to-extension/geometry.js +1 -1
  287. package/dist/lean-to-extension/layout.d.ts.map +1 -1
  288. package/dist/lean-to-extension/layout.js +2 -3
  289. package/dist/lean-to-extension/placement-validation.d.ts.map +1 -1
  290. package/dist/lean-to-extension/placement-validation.js +5 -5
  291. package/dist/lean-to-extension/tool.d.ts.map +1 -1
  292. package/dist/lean-to-extension/tool.js +5 -5
  293. package/dist/lineset/move-tool.d.ts.map +1 -1
  294. package/dist/lineset/move-tool.js +8 -2
  295. package/dist/liquid-line/move-tool.d.ts.map +1 -1
  296. package/dist/liquid-line/move-tool.js +8 -2
  297. package/dist/measurement/definition.js +1 -1
  298. package/dist/pipe-fitting/move-tool.d.ts.map +1 -1
  299. package/dist/pipe-fitting/move-tool.js +8 -2
  300. package/dist/pipe-segment/move-tool.d.ts.map +1 -1
  301. package/dist/pipe-segment/move-tool.js +8 -2
  302. package/dist/procedural-item/animation.d.ts +8 -0
  303. package/dist/procedural-item/animation.d.ts.map +1 -0
  304. package/dist/procedural-item/animation.js +116 -0
  305. package/dist/procedural-item/definition.d.ts.map +1 -1
  306. package/dist/procedural-item/definition.js +74 -8
  307. package/dist/procedural-item/geometry.d.ts +5 -1
  308. package/dist/procedural-item/geometry.d.ts.map +1 -1
  309. package/dist/procedural-item/geometry.js +239 -15
  310. package/dist/procedural-item/renderer.d.ts.map +1 -1
  311. package/dist/procedural-item/renderer.js +272 -23
  312. package/dist/ridge-vent/panel.d.ts.map +1 -1
  313. package/dist/ridge-vent/panel.js +5 -23
  314. package/dist/ridge-vent/renderer.d.ts.map +1 -1
  315. package/dist/ridge-vent/renderer.js +9 -8
  316. package/dist/roof/definition.d.ts.map +1 -1
  317. package/dist/roof/definition.js +4 -1
  318. package/dist/roof/floorplan.d.ts +8 -0
  319. package/dist/roof/floorplan.d.ts.map +1 -1
  320. package/dist/roof/floorplan.js +194 -18
  321. package/dist/roof/panel-model.d.ts.map +1 -1
  322. package/dist/roof/panel-model.js +10 -6
  323. package/dist/roof/panel.d.ts.map +1 -1
  324. package/dist/roof/panel.js +3 -10
  325. package/dist/roof/renderer.d.ts.map +1 -1
  326. package/dist/roof/renderer.js +5 -2
  327. package/dist/roof-segment/panel.d.ts.map +1 -1
  328. package/dist/roof-segment/panel.js +5 -24
  329. package/dist/roof-segment/renderer.d.ts.map +1 -1
  330. package/dist/roof-segment/renderer.js +17 -8
  331. package/dist/separator/definition.d.ts +3 -0
  332. package/dist/separator/definition.d.ts.map +1 -0
  333. package/dist/separator/definition.js +39 -0
  334. package/dist/separator/renderer.d.ts +5 -0
  335. package/dist/separator/renderer.d.ts.map +1 -0
  336. package/dist/separator/renderer.js +36 -0
  337. package/dist/shared/duct-body-paint.d.ts +0 -4
  338. package/dist/shared/duct-body-paint.d.ts.map +1 -1
  339. package/dist/shared/duct-body-paint.js +1 -5
  340. package/dist/shared/item-interaction-actions.d.ts +6 -0
  341. package/dist/shared/item-interaction-actions.d.ts.map +1 -0
  342. package/dist/shared/item-interaction-actions.js +27 -0
  343. package/dist/shared/item-interactions.d.ts +9 -0
  344. package/dist/shared/item-interactions.d.ts.map +1 -0
  345. package/dist/shared/item-interactions.js +74 -0
  346. package/dist/shared/item-light-placement.d.ts +2 -0
  347. package/dist/shared/item-light-placement.d.ts.map +1 -0
  348. package/dist/shared/item-light-placement.js +3 -0
  349. package/dist/shared/move-roof-tool.js +2 -1
  350. package/dist/shared/node-batch/batchable.d.ts +12 -0
  351. package/dist/shared/node-batch/batchable.d.ts.map +1 -0
  352. package/dist/shared/node-batch/batchable.js +41 -0
  353. package/dist/shared/node-batch/candidates.d.ts +7 -5
  354. package/dist/shared/node-batch/candidates.d.ts.map +1 -1
  355. package/dist/shared/node-batch/candidates.js +43 -59
  356. package/dist/shared/node-batch/release.d.ts +8 -0
  357. package/dist/shared/node-batch/release.d.ts.map +1 -0
  358. package/dist/shared/node-batch/release.js +16 -0
  359. package/dist/shared/node-batch/system.d.ts.map +1 -1
  360. package/dist/shared/node-batch/system.js +17 -12
  361. package/dist/shared/node-batch/types.d.ts +4 -1
  362. package/dist/shared/node-batch/types.d.ts.map +1 -1
  363. package/dist/shared/opening-documentation.d.ts +13 -1
  364. package/dist/shared/opening-documentation.d.ts.map +1 -1
  365. package/dist/shared/opening-documentation.js +245 -59
  366. package/dist/shared/opening-guides-runtime.d.ts.map +1 -1
  367. package/dist/shared/opening-guides-runtime.js +17 -14
  368. package/dist/shared/opening-placement-dimensions.d.ts.map +1 -1
  369. package/dist/shared/opening-placement-dimensions.js +3 -3
  370. package/dist/shared/opening-plane-offset.d.ts +23 -0
  371. package/dist/shared/opening-plane-offset.d.ts.map +1 -0
  372. package/dist/shared/opening-plane-offset.js +24 -0
  373. package/dist/shared/polygon-centroid-move.d.ts.map +1 -1
  374. package/dist/shared/polygon-centroid-move.js +4 -1
  375. package/dist/shared/polygon-vertex-affordance.d.ts.map +1 -1
  376. package/dist/shared/polygon-vertex-affordance.js +19 -15
  377. package/dist/shared/run-hangers.d.ts.map +1 -1
  378. package/dist/shared/run-hangers.js +5 -4
  379. package/dist/shared/scripted-opening-handles.d.ts +18 -0
  380. package/dist/shared/scripted-opening-handles.d.ts.map +1 -0
  381. package/dist/shared/scripted-opening-handles.js +53 -0
  382. package/dist/shared/scripted-opening.d.ts +25 -0
  383. package/dist/shared/scripted-opening.d.ts.map +1 -0
  384. package/dist/shared/scripted-opening.js +72 -0
  385. package/dist/shared/slot-paint.d.ts +14 -2
  386. package/dist/shared/slot-paint.d.ts.map +1 -1
  387. package/dist/shared/slot-paint.js +29 -29
  388. package/dist/shared/surface-paint.d.ts.map +1 -1
  389. package/dist/shared/surface-paint.js +2 -5
  390. package/dist/shared/swap-preview-material.d.ts +11 -0
  391. package/dist/shared/swap-preview-material.d.ts.map +1 -0
  392. package/dist/shared/swap-preview-material.js +16 -0
  393. package/dist/shared/system-checks.d.ts.map +1 -1
  394. package/dist/shared/system-checks.js +5 -3
  395. package/dist/shared/wall-attach-target.d.ts +3 -10
  396. package/dist/shared/wall-attach-target.d.ts.map +1 -1
  397. package/dist/shared/wall-attach-target.js +3 -63
  398. package/dist/shared/wall-opening-ceiling.d.ts +5 -15
  399. package/dist/shared/wall-opening-ceiling.d.ts.map +1 -1
  400. package/dist/shared/wall-opening-ceiling.js +10 -18
  401. package/dist/shelf/definition.d.ts.map +1 -1
  402. package/dist/shelf/definition.js +1 -1
  403. package/dist/shelf/geometry.d.ts.map +1 -1
  404. package/dist/shelf/geometry.js +1 -2
  405. package/dist/shelf/paint.d.ts.map +1 -1
  406. package/dist/shelf/paint.js +4 -10
  407. package/dist/site/line-ribbon.d.ts +31 -0
  408. package/dist/site/line-ribbon.d.ts.map +1 -0
  409. package/dist/site/line-ribbon.js +117 -0
  410. package/dist/site/lot-mask.d.ts +18 -0
  411. package/dist/site/lot-mask.d.ts.map +1 -0
  412. package/dist/site/lot-mask.js +35 -0
  413. package/dist/site/panel.d.ts +10 -0
  414. package/dist/site/panel.d.ts.map +1 -0
  415. package/dist/site/panel.js +155 -0
  416. package/dist/site/parametrics.d.ts +7 -0
  417. package/dist/site/parametrics.d.ts.map +1 -1
  418. package/dist/site/parametrics.js +8 -0
  419. package/dist/site/recessed-slab-ground-holes.d.ts.map +1 -1
  420. package/dist/site/recessed-slab-ground-holes.js +5 -2
  421. package/dist/site/renderer.d.ts.map +1 -1
  422. package/dist/site/renderer.js +150 -19
  423. package/dist/site/setbacks.d.ts +33 -0
  424. package/dist/site/setbacks.d.ts.map +1 -0
  425. package/dist/site/setbacks.js +204 -0
  426. package/dist/site/terrain-geometry.d.ts +28 -1
  427. package/dist/site/terrain-geometry.d.ts.map +1 -1
  428. package/dist/site/terrain-geometry.js +78 -4
  429. package/dist/site/terrain-holes.d.ts +15 -0
  430. package/dist/site/terrain-holes.d.ts.map +1 -0
  431. package/dist/site/terrain-holes.js +74 -0
  432. package/dist/site/terrain-mesh.d.ts +9 -2
  433. package/dist/site/terrain-mesh.d.ts.map +1 -1
  434. package/dist/site/terrain-mesh.js +36 -9
  435. package/dist/site/terrain-renderer.d.ts +9 -2
  436. package/dist/site/terrain-renderer.d.ts.map +1 -1
  437. package/dist/site/terrain-renderer.js +14 -4
  438. package/dist/slab/boundary-editor.d.ts +1 -1
  439. package/dist/slab/boundary-editor.d.ts.map +1 -1
  440. package/dist/slab/boundary-editor.js +13 -13
  441. package/dist/slab/definition.d.ts.map +1 -1
  442. package/dist/slab/definition.js +19 -3
  443. package/dist/slab/dependency-tracker.d.ts.map +1 -1
  444. package/dist/slab/dependency-tracker.js +67 -7
  445. package/dist/slab/elevation-limit.d.ts.map +1 -1
  446. package/dist/slab/elevation-limit.js +2 -2
  447. package/dist/slab/floorplan-affordances.d.ts +176 -4
  448. package/dist/slab/floorplan-affordances.d.ts.map +1 -1
  449. package/dist/slab/floorplan-affordances.js +0 -1
  450. package/dist/slab/floorplan-move.d.ts.map +1 -1
  451. package/dist/slab/floorplan-move.js +3 -4
  452. package/dist/slab/floorplan.d.ts +7 -0
  453. package/dist/slab/floorplan.d.ts.map +1 -1
  454. package/dist/slab/floorplan.js +22 -5
  455. package/dist/slab/geometry.d.ts.map +1 -1
  456. package/dist/slab/geometry.js +186 -76
  457. package/dist/slab/move-tool.js +7 -6
  458. package/dist/slab/paint.d.ts +18 -5
  459. package/dist/slab/paint.d.ts.map +1 -1
  460. package/dist/slab/paint.js +458 -9
  461. package/dist/slab/panel.d.ts.map +1 -1
  462. package/dist/slab/panel.js +28 -9
  463. package/dist/slab/placement-ownership.d.ts +2 -1
  464. package/dist/slab/placement-ownership.d.ts.map +1 -1
  465. package/dist/slab/placement-ownership.js +2 -2
  466. package/dist/slab/surface-split.d.ts +24 -0
  467. package/dist/slab/surface-split.d.ts.map +1 -0
  468. package/dist/slab/surface-split.js +389 -0
  469. package/dist/slab/tool.d.ts.map +1 -1
  470. package/dist/slab/tool.js +3 -3
  471. package/dist/stair/baluster-geometry.d.ts +21 -0
  472. package/dist/stair/baluster-geometry.d.ts.map +1 -0
  473. package/dist/stair/baluster-geometry.js +74 -0
  474. package/dist/stair/baluster-guard.d.ts +50 -0
  475. package/dist/stair/baluster-guard.d.ts.map +1 -0
  476. package/dist/stair/baluster-guard.js +71 -0
  477. package/dist/stair/boards-guard.d.ts +37 -0
  478. package/dist/stair/boards-guard.d.ts.map +1 -0
  479. package/dist/stair/boards-guard.js +61 -0
  480. package/dist/stair/cable-guard.d.ts +39 -0
  481. package/dist/stair/cable-guard.d.ts.map +1 -0
  482. package/dist/stair/cable-guard.js +105 -0
  483. package/dist/stair/construction-controls.d.ts +15 -0
  484. package/dist/stair/construction-controls.d.ts.map +1 -0
  485. package/dist/stair/construction-controls.js +29 -0
  486. package/dist/stair/continuous-railings.d.ts +10 -0
  487. package/dist/stair/continuous-railings.d.ts.map +1 -0
  488. package/dist/stair/continuous-railings.js +159 -0
  489. package/dist/stair/definition.d.ts.map +1 -1
  490. package/dist/stair/definition.js +16 -37
  491. package/dist/stair/documentation.d.ts +1 -1
  492. package/dist/stair/documentation.d.ts.map +1 -1
  493. package/dist/stair/documentation.js +10 -17
  494. package/dist/stair/floorplan-affordances.d.ts.map +1 -1
  495. package/dist/stair/floorplan-affordances.js +9 -25
  496. package/dist/stair/floorplan.d.ts +1 -23
  497. package/dist/stair/floorplan.d.ts.map +1 -1
  498. package/dist/stair/floorplan.js +102 -86
  499. package/dist/stair/glass-guard.d.ts +72 -0
  500. package/dist/stair/glass-guard.d.ts.map +1 -0
  501. package/dist/stair/glass-guard.js +167 -0
  502. package/dist/stair/guard-path.d.ts +119 -0
  503. package/dist/stair/guard-path.d.ts.map +1 -0
  504. package/dist/stair/guard-path.js +208 -0
  505. package/dist/stair/materials.d.ts +11 -0
  506. package/dist/stair/materials.d.ts.map +1 -0
  507. package/dist/stair/materials.js +51 -0
  508. package/dist/stair/metal-guard.d.ts +38 -0
  509. package/dist/stair/metal-guard.d.ts.map +1 -0
  510. package/dist/stair/metal-guard.js +79 -0
  511. package/dist/stair/paint.d.ts +32 -0
  512. package/dist/stair/paint.d.ts.map +1 -1
  513. package/dist/stair/paint.js +75 -36
  514. package/dist/stair/panel.d.ts.map +1 -1
  515. package/dist/stair/panel.js +154 -17
  516. package/dist/stair/parametrics.d.ts +1 -1
  517. package/dist/stair/parametrics.d.ts.map +1 -1
  518. package/dist/stair/parametrics.js +32 -15
  519. package/dist/stair/plan-entry.d.ts +31 -0
  520. package/dist/stair/plan-entry.d.ts.map +1 -0
  521. package/dist/stair/plan-entry.js +325 -0
  522. package/dist/stair/post-and-rail-guard.d.ts +31 -0
  523. package/dist/stair/post-and-rail-guard.d.ts.map +1 -0
  524. package/dist/stair/post-and-rail-guard.js +63 -0
  525. package/dist/stair/railing-controls.d.ts +9 -0
  526. package/dist/stair/railing-controls.d.ts.map +1 -0
  527. package/dist/stair/railing-controls.js +49 -0
  528. package/dist/stair/renderer.d.ts.map +1 -1
  529. package/dist/stair/renderer.js +259 -259
  530. package/dist/stair/use-stair-render-data.d.ts +317 -0
  531. package/dist/stair/use-stair-render-data.d.ts.map +1 -0
  532. package/dist/stair/use-stair-render-data.js +73 -0
  533. package/dist/stair-segment/definition.d.ts.map +1 -1
  534. package/dist/stair-segment/definition.js +51 -10
  535. package/dist/stair-segment/panel.d.ts.map +1 -1
  536. package/dist/stair-segment/panel.js +36 -42
  537. package/dist/stair-segment/parametrics.d.ts +1 -1
  538. package/dist/stair-segment/parametrics.d.ts.map +1 -1
  539. package/dist/stair-segment/parametrics.js +21 -8
  540. package/dist/stair-segment/renderer.d.ts.map +1 -1
  541. package/dist/stair-segment/renderer.js +16 -28
  542. package/dist/turbine-vent/definition.d.ts.map +1 -1
  543. package/dist/turbine-vent/definition.js +2 -5
  544. package/dist/turbine-vent/paint.d.ts.map +1 -1
  545. package/dist/turbine-vent/paint.js +2 -5
  546. package/dist/turbine-vent/panel.d.ts.map +1 -1
  547. package/dist/turbine-vent/panel.js +5 -23
  548. package/dist/unit/unit-panel.d.ts.map +1 -1
  549. package/dist/unit/unit-panel.js +6 -1
  550. package/dist/wall/actions.d.ts.map +1 -1
  551. package/dist/wall/actions.js +7 -2
  552. package/dist/wall/construction-dimensions.js +8 -5
  553. package/dist/wall/contextual-dimensions.js +4 -4
  554. package/dist/wall/curtain-wall-materials.d.ts +1 -1
  555. package/dist/wall/curtain-wall-materials.d.ts.map +1 -1
  556. package/dist/wall/curtain-wall-materials.js +2 -2
  557. package/dist/wall/curve-tool.d.ts.map +1 -1
  558. package/dist/wall/curve-tool.js +4 -0
  559. package/dist/wall/definition.d.ts.map +1 -1
  560. package/dist/wall/definition.js +41 -17
  561. package/dist/wall/floorplan-move.d.ts +1 -1
  562. package/dist/wall/floorplan-move.d.ts.map +1 -1
  563. package/dist/wall/floorplan-move.js +20 -83
  564. package/dist/wall/floorplan-tool.d.ts.map +1 -1
  565. package/dist/wall/floorplan-tool.js +10 -11
  566. package/dist/wall/floorplan.d.ts +3 -1
  567. package/dist/wall/floorplan.d.ts.map +1 -1
  568. package/dist/wall/floorplan.js +184 -21
  569. package/dist/wall/measurement.d.ts.map +1 -1
  570. package/dist/wall/measurement.js +5 -5
  571. package/dist/wall/move-endpoint-tool.d.ts.map +1 -1
  572. package/dist/wall/move-endpoint-tool.js +20 -7
  573. package/dist/wall/move-shared.d.ts.map +1 -1
  574. package/dist/wall/move-shared.js +11 -7
  575. package/dist/wall/move-tool.d.ts.map +1 -1
  576. package/dist/wall/move-tool.js +118 -148
  577. package/dist/wall/paint.d.ts +26 -15
  578. package/dist/wall/paint.d.ts.map +1 -1
  579. package/dist/wall/paint.js +306 -117
  580. package/dist/wall/panel-model.d.ts +18 -0
  581. package/dist/wall/panel-model.d.ts.map +1 -1
  582. package/dist/wall/panel-model.js +77 -19
  583. package/dist/wall/panel.d.ts.map +1 -1
  584. package/dist/wall/panel.js +217 -41
  585. package/dist/wall/parametrics.d.ts.map +1 -1
  586. package/dist/wall/parametrics.js +3 -0
  587. package/dist/wall/rectangle-command.d.ts +111 -12
  588. package/dist/wall/rectangle-command.d.ts.map +1 -1
  589. package/dist/wall/rectangle-tool.d.ts.map +1 -1
  590. package/dist/wall/rectangle-tool.js +26 -8
  591. package/dist/wall/renderer.d.ts.map +1 -1
  592. package/dist/wall/renderer.js +4 -2
  593. package/dist/wall/split-floorplan-layer.d.ts.map +1 -1
  594. package/dist/wall/split-floorplan-layer.js +7 -7
  595. package/dist/wall/split-session.d.ts.map +1 -1
  596. package/dist/wall/split-session.js +7 -1
  597. package/dist/wall/system.d.ts.map +1 -1
  598. package/dist/wall/system.js +36 -4
  599. package/dist/wall/tool.d.ts.map +1 -1
  600. package/dist/wall/tool.js +105 -49
  601. package/dist/wall/treatment-level-data.d.ts +3 -2
  602. package/dist/wall/treatment-level-data.d.ts.map +1 -1
  603. package/dist/wall/treatment-level-data.js +17 -13
  604. package/dist/wall/treatments.d.ts +10 -10
  605. package/dist/wall/treatments.d.ts.map +1 -1
  606. package/dist/wall/treatments.js +67 -54
  607. package/dist/wall/wall-batch-system.d.ts +7 -0
  608. package/dist/wall/wall-batch-system.d.ts.map +1 -1
  609. package/dist/wall/wall-batch-system.js +35 -3
  610. package/dist/wall/wall-batch.d.ts +6 -0
  611. package/dist/wall/wall-batch.d.ts.map +1 -1
  612. package/dist/wall/wall-batch.js +7 -1
  613. package/dist/window/definition.d.ts.map +1 -1
  614. package/dist/window/definition.js +12 -4
  615. package/dist/window/floorplan-move.d.ts.map +1 -1
  616. package/dist/window/floorplan-move.js +3 -1
  617. package/dist/window/floorplan.d.ts.map +1 -1
  618. package/dist/window/floorplan.js +145 -60
  619. package/dist/window/mechanism.d.ts +4 -0
  620. package/dist/window/mechanism.d.ts.map +1 -0
  621. package/dist/window/mechanism.js +20 -0
  622. package/dist/window/move-tool.d.ts.map +1 -1
  623. package/dist/window/move-tool.js +79 -48
  624. package/dist/window/paint.d.ts.map +1 -1
  625. package/dist/window/paint.js +3 -0
  626. package/dist/window/panel.d.ts.map +1 -1
  627. package/dist/window/panel.js +32 -88
  628. package/dist/window/placement.d.ts +23 -0
  629. package/dist/window/placement.d.ts.map +1 -0
  630. package/dist/window/placement.js +66 -0
  631. package/dist/window/preview.d.ts.map +1 -1
  632. package/dist/window/preview.js +2 -0
  633. package/dist/window/renderer.d.ts.map +1 -1
  634. package/dist/window/renderer.js +3 -2
  635. package/dist/window/tool.d.ts.map +1 -1
  636. package/dist/window/tool.js +96 -24
  637. package/dist/window/window-math.d.ts +6 -14
  638. package/dist/window/window-math.d.ts.map +1 -1
  639. package/dist/window/window-math.js +14 -20
  640. package/dist/zone/contextual-dimensions.d.ts.map +1 -1
  641. package/dist/zone/contextual-dimensions.js +6 -28
  642. package/dist/zone/definition.d.ts.map +1 -1
  643. package/dist/zone/definition.js +3 -3
  644. package/dist/zone/floorplan-affordances.d.ts +200 -0
  645. package/dist/zone/floorplan-affordances.d.ts.map +1 -1
  646. package/dist/zone/floorplan.d.ts +1 -1
  647. package/dist/zone/floorplan.d.ts.map +1 -1
  648. package/dist/zone/floorplan.js +93 -53
  649. package/dist/zone/quantities-panel.d.ts.map +1 -1
  650. package/dist/zone/quantities-panel.js +3 -14
  651. package/dist/zone/quick-measurement.d.ts +2 -2
  652. package/dist/zone/quick-measurement.d.ts.map +1 -1
  653. package/dist/zone/quick-measurement.js +6 -5
  654. package/dist/zone/renderer.d.ts +1 -1
  655. package/dist/zone/renderer.d.ts.map +1 -1
  656. package/dist/zone/renderer.js +58 -146
  657. package/dist/zone/room-clear-dimensions.js +3 -3
  658. package/dist/zone/room-documentation.d.ts.map +1 -1
  659. package/dist/zone/room-documentation.js +2 -6
  660. package/package.json +11 -11
  661. package/dist/block/slots.d.ts +0 -4
  662. package/dist/block/slots.d.ts.map +0 -1
  663. package/dist/block/slots.js +0 -17
  664. package/dist/cabinet/slots.d.ts +0 -4
  665. package/dist/cabinet/slots.d.ts.map +0 -1
  666. package/dist/cabinet/slots.js +0 -24
  667. package/dist/ceiling/slots.d.ts +0 -6
  668. package/dist/ceiling/slots.d.ts.map +0 -1
  669. package/dist/ceiling/slots.js +0 -7
  670. package/dist/column/slots.d.ts +0 -9
  671. package/dist/column/slots.d.ts.map +0 -1
  672. package/dist/column/slots.js +0 -19
  673. package/dist/door/slots.d.ts +0 -9
  674. package/dist/door/slots.d.ts.map +0 -1
  675. package/dist/door/slots.js +0 -20
  676. package/dist/elevator/slots.d.ts +0 -8
  677. package/dist/elevator/slots.d.ts.map +0 -1
  678. package/dist/elevator/slots.js +0 -17
  679. package/dist/fence/slots.d.ts +0 -10
  680. package/dist/fence/slots.d.ts.map +0 -1
  681. package/dist/fence/slots.js +0 -23
  682. package/dist/item/__fixtures__/main-floorplan.d.ts +0 -26
  683. package/dist/item/__fixtures__/main-floorplan.d.ts.map +0 -1
  684. package/dist/item/__fixtures__/main-floorplan.js +0 -297
  685. package/dist/lean-to-extension/slots.d.ts +0 -5
  686. package/dist/lean-to-extension/slots.d.ts.map +0 -1
  687. package/dist/lean-to-extension/slots.js +0 -15
  688. package/dist/shelf/slots.d.ts +0 -9
  689. package/dist/shelf/slots.d.ts.map +0 -1
  690. package/dist/shelf/slots.js +0 -30
  691. package/dist/slab/slots.d.ts +0 -10
  692. package/dist/slab/slots.d.ts.map +0 -1
  693. package/dist/slab/slots.js +0 -20
  694. package/dist/stair/floor-stack.d.ts +0 -10
  695. package/dist/stair/floor-stack.d.ts.map +0 -1
  696. package/dist/stair/floor-stack.js +0 -115
  697. package/dist/stair/slots.d.ts +0 -7
  698. package/dist/stair/slots.d.ts.map +0 -1
  699. package/dist/stair/slots.js +0 -13
  700. package/dist/wall/drawing-mode.d.ts +0 -12
  701. package/dist/wall/drawing-mode.d.ts.map +0 -1
  702. package/dist/wall/drawing-mode.js +0 -38
  703. package/dist/wall/slots.d.ts +0 -10
  704. package/dist/wall/slots.d.ts.map +0 -1
  705. package/dist/wall/slots.js +0 -92
  706. package/dist/window/slots.d.ts +0 -5
  707. package/dist/window/slots.d.ts.map +0 -1
  708. package/dist/window/slots.js +0 -11
@@ -1,297 +0,0 @@
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,5 +0,0 @@
1
- import type { SlotDeclaration } from '@pascal-app/core';
2
- export type LeanToSlotId = 'flashing' | 'ledger' | 'beam' | 'framing' | 'posts' | 'footings';
3
- export declare const LEAN_TO_SLOT_DEFAULTS: Partial<Record<LeanToSlotId, string>>;
4
- export declare function leanToSlots(): SlotDeclaration[];
5
- //# sourceMappingURL=slots.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"slots.d.ts","sourceRoot":"","sources":["../../src/lean-to-extension/slots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAEvD,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAA;AAE5F,eAAO,MAAM,qBAAqB,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAIvE,CAAA;AAED,wBAAgB,WAAW,IAAI,eAAe,EAAE,CAS/C"}
@@ -1,15 +0,0 @@
1
- export const LEAN_TO_SLOT_DEFAULTS = {
2
- flashing: 'library:metal-steel',
3
- posts: 'library:concrete-plaster',
4
- footings: 'library:concrete-plaster',
5
- };
6
- export function leanToSlots() {
7
- return [
8
- { slotId: 'flashing', label: 'Flashing', default: LEAN_TO_SLOT_DEFAULTS.flashing },
9
- { slotId: 'ledger', label: 'Ledger / high beam', default: LEAN_TO_SLOT_DEFAULTS.ledger },
10
- { slotId: 'beam', label: 'Low beam', default: LEAN_TO_SLOT_DEFAULTS.beam },
11
- { slotId: 'framing', label: 'Framing', default: LEAN_TO_SLOT_DEFAULTS.framing },
12
- { slotId: 'posts', label: 'Posts', default: LEAN_TO_SLOT_DEFAULTS.posts },
13
- { slotId: 'footings', label: 'Footings', default: LEAN_TO_SLOT_DEFAULTS.footings },
14
- ];
15
- }
@@ -1,9 +0,0 @@
1
- import type { SlotDeclaration } from '@pascal-app/core';
2
- import type { ShelfNode } from './schema';
3
- export type ShelfSlotId = 'shelves' | 'frame' | 'back';
4
- export declare const SHELF_SLOT_DEFAULT_COLOR = "#ffffff";
5
- /** Map a builder mesh name to its slot id (null = not a paintable shelf part). */
6
- export declare function shelfSlotIdForMeshName(name: string): ShelfSlotId | null;
7
- /** Which slots a given shelf actually exposes (depends on style/flags). */
8
- export declare function shelfSlots(node: ShelfNode): SlotDeclaration[];
9
- //# sourceMappingURL=slots.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"slots.d.ts","sourceRoot":"","sources":["../../src/shelf/slots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEzC,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;AAGtD,eAAO,MAAM,wBAAwB,YAAY,CAAA;AAEjD,kFAAkF;AAClF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAavE;AAED,2EAA2E;AAC3E,wBAAgB,UAAU,CAAC,IAAI,EAAE,SAAS,GAAG,eAAe,EAAE,CAS7D"}
@@ -1,30 +0,0 @@
1
- // Visual parity with the retired DEFAULT_SHELF_MATERIAL (off-white).
2
- export const SHELF_SLOT_DEFAULT_COLOR = '#ffffff';
3
- /** Map a builder mesh name to its slot id (null = not a paintable shelf part). */
4
- export function shelfSlotIdForMeshName(name) {
5
- if (name.startsWith('shelf-board'))
6
- return 'shelves';
7
- if (name === 'shelf-back')
8
- return 'back';
9
- if (name.startsWith('shelf-side') ||
10
- name.startsWith('shelf-post') ||
11
- name.startsWith('shelf-divider') ||
12
- name.startsWith('shelf-bracket') ||
13
- name.startsWith('shelf-brace')) {
14
- return 'frame';
15
- }
16
- return null;
17
- }
18
- /** Which slots a given shelf actually exposes (depends on style/flags). */
19
- export function shelfSlots(node) {
20
- const slots = [
21
- { slotId: 'shelves', label: 'Shelves', default: SHELF_SLOT_DEFAULT_COLOR },
22
- ];
23
- const hasFrame = !(node.style === 'wall-shelf' && node.bracketStyle === 'hidden');
24
- if (hasFrame)
25
- slots.push({ slotId: 'frame', label: 'Frame', default: SHELF_SLOT_DEFAULT_COLOR });
26
- const hasBack = node.style === 'cubby' || (node.style === 'bookshelf' && node.withBack);
27
- if (hasBack)
28
- slots.push({ slotId: 'back', label: 'Back', default: SHELF_SLOT_DEFAULT_COLOR });
29
- return slots;
30
- }
@@ -1,10 +0,0 @@
1
- import type { SlotDeclaration } from '@pascal-app/core';
2
- export type SlabSlotId = 'surface' | 'side';
3
- export declare const SLAB_TOP_SLOT_DEFAULT = "library:wood-woodplank48";
4
- export declare const SLAB_SIDE_SLOT_DEFAULT = "#cccccc";
5
- /**
6
- * A slab exposes two paintable faces: the top floor surface and its sides
7
- * (vertical walls + underside).
8
- */
9
- export declare function slabSlots(): SlotDeclaration[];
10
- //# sourceMappingURL=slots.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"slots.d.ts","sourceRoot":"","sources":["../../src/slab/slots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAEvD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,MAAM,CAAA;AAU3C,eAAO,MAAM,qBAAqB,6BAA6B,CAAA;AAC/D,eAAO,MAAM,sBAAsB,YAAY,CAAA;AAE/C;;;GAGG;AACH,wBAAgB,SAAS,IAAI,eAAe,EAAE,CAK7C"}
@@ -1,20 +0,0 @@
1
- // Declared default appearances for an unpainted slab in colored mode — a
2
- // catalog `library:<id>` finish or a `#rrggbb` colour. Textures-off collapses
3
- // both to the themed floor role (the escape hatch).
4
- //
5
- // `surface` (top face) keeps the wood floor default and the slot id used before
6
- // the top/side split, so existing painted slabs keep their floor finish. `side`
7
- // (walls + underside) defaults to a light grey so a slab's edges read as a
8
- // distinct trim rather than wood end-grain.
9
- export const SLAB_TOP_SLOT_DEFAULT = 'library:wood-woodplank48';
10
- export const SLAB_SIDE_SLOT_DEFAULT = '#cccccc';
11
- /**
12
- * A slab exposes two paintable faces: the top floor surface and its sides
13
- * (vertical walls + underside).
14
- */
15
- export function slabSlots() {
16
- return [
17
- { slotId: 'surface', label: 'Top', default: SLAB_TOP_SLOT_DEFAULT },
18
- { slotId: 'side', label: 'Sides', default: SLAB_SIDE_SLOT_DEFAULT },
19
- ];
20
- }
@@ -1,10 +0,0 @@
1
- import type { AnyNode, AnyNodeId, FloorPlacedFootprint, StairNode, StairSegmentNode } from '@pascal-app/core';
2
- type SegmentTransform = {
3
- position: [number, number, number];
4
- rotation: number;
5
- };
6
- export declare function getStairFloorPlacedFootprints(stair: StairNode, nodes: Readonly<Record<AnyNodeId, AnyNode>>): FloorPlacedFootprint[];
7
- export declare function getStairSegmentFloorPlacedFootprints(stair: StairNode, segments: readonly StairSegmentNode[]): FloorPlacedFootprint[];
8
- export declare function computeStairSegmentFloorStackTransforms(segments: readonly StairSegmentNode[]): SegmentTransform[];
9
- export {};
10
- //# sourceMappingURL=floor-stack.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"floor-stack.d.ts","sourceRoot":"","sources":["../../src/stair/floor-stack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,SAAS,EACT,oBAAoB,EACpB,SAAS,EACT,gBAAgB,EACjB,MAAM,kBAAkB,CAAA;AAEzB,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;IAClC,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,SAAS,EAChB,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,GAC1C,oBAAoB,EAAE,CAUxB;AA+CD,wBAAgB,oCAAoC,CAClD,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,SAAS,gBAAgB,EAAE,GACpC,oBAAoB,EAAE,CA4BxB;AAED,wBAAgB,uCAAuC,CACrD,QAAQ,EAAE,SAAS,gBAAgB,EAAE,GACpC,gBAAgB,EAAE,CAgDpB"}
@@ -1,115 +0,0 @@
1
- export function getStairFloorPlacedFootprints(stair, nodes) {
2
- if ((stair.stairType ?? 'straight') !== 'straight') {
3
- return getArcStairFloorPlacedFootprints(stair);
4
- }
5
- const segments = (stair.children ?? [])
6
- .map((childId) => nodes[childId])
7
- .filter((node) => node?.type === 'stair-segment');
8
- return getStairSegmentFloorPlacedFootprints(stair, segments);
9
- }
10
- const MAX_ARC_FOOTPRINT_SWEEP = Math.PI / 12;
11
- function getArcStairFloorPlacedFootprints(stair) {
12
- const isSpiral = stair.stairType === 'spiral';
13
- const innerRadius = Math.max(isSpiral ? 0.05 : 0.2, stair.innerRadius ?? (isSpiral ? 0.2 : 0.9));
14
- const outerRadius = innerRadius + Math.max(stair.width ?? 1, 0.4);
15
- const sweepAngle = stair.sweepAngle ?? (isSpiral ? Math.PI * 2 : Math.PI / 2);
16
- const stepCount = Math.max(2, Math.round(stair.stepCount ?? 10));
17
- const sliceCount = Math.max(stepCount, Math.ceil(Math.abs(sweepAngle) / MAX_ARC_FOOTPRINT_SWEEP));
18
- const footprints = [];
19
- for (let index = 0; index < sliceCount; index += 1) {
20
- const startAngle = -sweepAngle / 2 + (sweepAngle * index) / sliceCount;
21
- const endAngle = -sweepAngle / 2 + (sweepAngle * (index + 1)) / sliceCount;
22
- const midAngle = (startAngle + endAngle) / 2;
23
- const halfSweep = Math.abs(endAngle - startAngle) / 2;
24
- const projectedInnerRadius = innerRadius * Math.cos(halfSweep);
25
- const radialSize = outerRadius - projectedInnerRadius;
26
- const tangentialSize = 2 * outerRadius * Math.sin(halfSweep);
27
- const centerRadius = (outerRadius + projectedInnerRadius) / 2;
28
- const [offsetX, offsetZ] = rotateXZ(Math.cos(midAngle) * centerRadius, Math.sin(midAngle) * centerRadius, stair.rotation);
29
- footprints.push({
30
- position: [stair.position[0] + offsetX, stair.position[1], stair.position[2] + offsetZ],
31
- dimensions: [Math.max(radialSize, 0.01), 0.01, Math.max(tangentialSize, 0.01)],
32
- rotation: [0, midAngle - stair.rotation, 0],
33
- });
34
- }
35
- if (isSpiral && (stair.showCenterColumn ?? true)) {
36
- const columnRadius = Math.max(0.05, Math.min(innerRadius * 0.72, innerRadius - 0.03));
37
- footprints.push({
38
- position: stair.position,
39
- dimensions: [columnRadius * 2, 0.01, columnRadius * 2],
40
- rotation: [0, 0, 0],
41
- });
42
- }
43
- return footprints;
44
- }
45
- export function getStairSegmentFloorPlacedFootprints(stair, segments) {
46
- const transforms = computeStairSegmentFloorStackTransforms(segments);
47
- return segments.map((segment, index) => {
48
- const transform = transforms[index];
49
- const [centerOffsetX, centerOffsetZ] = rotateXZ(0, segment.length / 2, transform.rotation);
50
- const centerInGroupX = transform.position[0] + centerOffsetX;
51
- const centerInGroupZ = transform.position[2] + centerOffsetZ;
52
- const [centerOffsetWorldX, centerOffsetWorldZ] = rotateXZ(centerInGroupX, centerInGroupZ, stair.rotation);
53
- return {
54
- position: [
55
- stair.position[0] + centerOffsetWorldX,
56
- stair.position[1] + transform.position[1],
57
- stair.position[2] + centerOffsetWorldZ,
58
- ],
59
- dimensions: [
60
- segment.width,
61
- Math.max(segment.height, segment.thickness, 0.01),
62
- segment.length,
63
- ],
64
- rotation: [0, stair.rotation + transform.rotation, 0],
65
- };
66
- });
67
- }
68
- export function computeStairSegmentFloorStackTransforms(segments) {
69
- const transforms = [];
70
- let currentX = 0;
71
- let currentY = 0;
72
- let currentZ = 0;
73
- let currentRot = 0;
74
- for (let index = 0; index < segments.length; index += 1) {
75
- const segment = segments[index];
76
- if (index > 0) {
77
- const previous = segments[index - 1];
78
- let attachX = 0;
79
- let attachZ = 0;
80
- let rotationDelta = 0;
81
- switch (segment.attachmentSide) {
82
- case 'front':
83
- attachX = 0;
84
- attachZ = previous.length;
85
- rotationDelta = 0;
86
- break;
87
- case 'left':
88
- attachX = previous.width / 2;
89
- attachZ = previous.length / 2;
90
- rotationDelta = Math.PI / 2;
91
- break;
92
- case 'right':
93
- attachX = -previous.width / 2;
94
- attachZ = previous.length / 2;
95
- rotationDelta = -Math.PI / 2;
96
- break;
97
- }
98
- const [rotatedX, rotatedZ] = rotateXZ(attachX, attachZ, currentRot);
99
- currentX += rotatedX;
100
- currentY += previous.height;
101
- currentZ += rotatedZ;
102
- currentRot += rotationDelta;
103
- }
104
- transforms.push({
105
- position: [currentX, currentY, currentZ],
106
- rotation: currentRot,
107
- });
108
- }
109
- return transforms;
110
- }
111
- function rotateXZ(x, z, angle) {
112
- const cos = Math.cos(angle);
113
- const sin = Math.sin(angle);
114
- return [x * cos + z * sin, -x * sin + z * cos];
115
- }
@@ -1,7 +0,0 @@
1
- import type { SlotDeclaration, StairNode } from '@pascal-app/core';
2
- export type StairSlotId = 'treads' | 'body' | 'railing';
3
- export declare const STAIR_TREADS_SLOT_DEFAULT = "library:wood-woodplank48";
4
- export declare const STAIR_BODY_SLOT_DEFAULT = "library:preset-lightgrey";
5
- export declare const STAIR_RAILING_SLOT_DEFAULT = "library:metal-steel";
6
- export declare function stairSlots(node: StairNode): SlotDeclaration[];
7
- //# sourceMappingURL=slots.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"slots.d.ts","sourceRoot":"","sources":["../../src/stair/slots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAElE,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAA;AAEvD,eAAO,MAAM,yBAAyB,6BAA6B,CAAA;AACnE,eAAO,MAAM,uBAAuB,6BAA6B,CAAA;AACjE,eAAO,MAAM,0BAA0B,wBAAwB,CAAA;AAE/D,wBAAgB,UAAU,CAAC,IAAI,EAAE,SAAS,GAAG,eAAe,EAAE,CAW7D"}
@@ -1,13 +0,0 @@
1
- export const STAIR_TREADS_SLOT_DEFAULT = 'library:wood-woodplank48';
2
- export const STAIR_BODY_SLOT_DEFAULT = 'library:preset-lightgrey';
3
- export const STAIR_RAILING_SLOT_DEFAULT = 'library:metal-steel';
4
- export function stairSlots(node) {
5
- const slots = [
6
- { slotId: 'treads', label: 'Treads', default: STAIR_TREADS_SLOT_DEFAULT },
7
- { slotId: 'body', label: 'Body', default: STAIR_BODY_SLOT_DEFAULT },
8
- ];
9
- if (node.railingMode && node.railingMode !== 'none') {
10
- slots.push({ slotId: 'railing', label: 'Railing', default: STAIR_RAILING_SLOT_DEFAULT });
11
- }
12
- return slots;
13
- }
@@ -1,12 +0,0 @@
1
- export declare const useWallDrawingMode: import("zustand").UseBoundStore<import("zustand").StoreApi<{
2
- mode: "line" | "rectangle";
3
- toggle: () => void;
4
- }>>;
5
- /**
6
- * R toggles line / rectangle drawing (the HUD's Shape chip cycles the same
7
- * store). Both wall tools mount this: the 3D tool only exists once the canvas
8
- * does, and split view mounts both, so one listener serves whichever is up.
9
- * The mode outlives the tool: re-arming walls resumes the last shape used.
10
- */
11
- export declare function useWallDrawingModeKeys(): void;
12
- //# sourceMappingURL=drawing-mode.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawing-mode.d.ts","sourceRoot":"","sources":["../../src/wall/drawing-mode.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB;UACvB,MAAM,GAAG,WAAW;YAClB,MAAM,IAAI;GAOjB,CAAA;AAWH;;;;;GAKG;AACH,wBAAgB,sBAAsB,SAOrC"}
@@ -1,38 +0,0 @@
1
- import { emitter } from '@pascal-app/core';
2
- import { isEditableKeyboardTarget } from '@pascal-app/editor';
3
- import { useEffect } from 'react';
4
- import { create } from 'zustand';
5
- export const useWallDrawingMode = create((set, get) => ({
6
- mode: 'line',
7
- toggle: () => {
8
- emitter.emit('tool:cancel');
9
- set({ mode: get().mode === 'rectangle' ? 'line' : 'rectangle' });
10
- },
11
- }));
12
- const onKeyDown = (e) => {
13
- if (e.repeat || e.metaKey || e.ctrlKey || e.altKey)
14
- return;
15
- if (e.key !== 'r' && e.key !== 'R')
16
- return;
17
- if (isEditableKeyboardTarget(e.target))
18
- return;
19
- e.preventDefault();
20
- useWallDrawingMode.getState().toggle();
21
- };
22
- let owners = 0;
23
- /**
24
- * R toggles line / rectangle drawing (the HUD's Shape chip cycles the same
25
- * store). Both wall tools mount this: the 3D tool only exists once the canvas
26
- * does, and split view mounts both, so one listener serves whichever is up.
27
- * The mode outlives the tool: re-arming walls resumes the last shape used.
28
- */
29
- export function useWallDrawingModeKeys() {
30
- useEffect(() => {
31
- if (owners++ === 0)
32
- window.addEventListener('keydown', onKeyDown);
33
- return () => {
34
- if (--owners === 0)
35
- window.removeEventListener('keydown', onKeyDown);
36
- };
37
- }, []);
38
- }
@@ -1,10 +0,0 @@
1
- import { type SlotDeclaration, type WallNode } from '@pascal-app/core';
2
- /**
3
- * A wall exposes two paintable faces — interior + exterior. Painting writes
4
- * `node.slots[interior|exterior]` via `wallPaint` like every other kind; this
5
- * declaration surfaces the slot list + declared defaults for the picker and
6
- * keeps walls on the same `{ slotId, label, default }` contract. The defaults
7
- * come from core so the viewer's material resolver renders the identical value.
8
- */
9
- export declare function wallSlots(node?: WallNode): SlotDeclaration[];
10
- //# sourceMappingURL=slots.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"slots.d.ts","sourceRoot":"","sources":["../../src/wall/slots.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,EAEpB,KAAK,QAAQ,EACd,MAAM,kBAAkB,CAAA;AAEzB;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,IAAI,CAAC,EAAE,QAAQ,GAAG,eAAe,EAAE,CAmF5D"}