@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
@@ -0,0 +1,79 @@
1
+ /**
2
+ * One coherent metal guard laid out along a rail path, as oriented boxes — a
3
+ * fabricated steel guardrail in metres: a slim square post at each end (and
4
+ * every bay ≤ 4 ft between), welded to a flat baseplate that mounts it to the
5
+ * tread rather than embedding below it, a flat top rail and a bottom rail that
6
+ * follow the path with a fitting block closing every interior corner, and
7
+ * slender square balusters spanning the two rails. It shares the path sampling,
8
+ * corner finding and newel/picket stations in `guard-path.ts` with the baluster,
9
+ * deck post-and-rail, cable, boards and glass guards, so a straight flight, a
10
+ * chained L/U landing turn, a winder, a curved or spiral sweep and an integrated
11
+ * top landing all read as the same guard; only the sections, the surface-mounted
12
+ * feet and the slim infill differ. Pure data — no Three.js, no React.
13
+ *
14
+ * Unlike the wood guards, a steel post is not sunk into the structure: it stands
15
+ * on the nosing line on a baseplate, the mounting foot that grounds it. The
16
+ * infill is plumb slender bars spanning rail to rail, so nothing crosses the
17
+ * walking volume on a slope and every member meets another.
18
+ *
19
+ * `reach` runs the rails that far past the top vertex along the final slope to
20
+ * die into a post standing there; `topPost: false` then omits the top post.
21
+ * `postThrough` runs the posts past the top rail with a small cap of their own.
22
+ */
23
+ import { buildGuardChassis, guardPickets, } from './guard-path';
24
+ // Fabricated steel guardrail, in metres.
25
+ const POST = 0.04; // a slim 1½ in square steel post
26
+ const BASEPLATE_W = 0.1; // the welded foot plate that mounts the post…
27
+ const BASEPLATE_T = 0.008; // …a thin flat plate sitting on the nosing line
28
+ const TOP_RAIL_W = 0.05; // a flat 2 in top rail across the run
29
+ const TOP_RAIL_T = 0.03;
30
+ const BOTTOM_RAIL_W = 0.038; // a slimmer bottom rail across the run
31
+ const BOTTOM_RAIL_T = 0.025;
32
+ const BOTTOM_CLEAR = 0.08; // underside of the bottom rail over the nosing line
33
+ const INFILL = 0.016; // a 5⁄8 in square baluster
34
+ const INFILL_PITCH = 0.11; // on centre; clears under the 4 in sphere with the bar
35
+ /** The widest clear gap left between balusters, in metres (0.1016 m = 4 in sphere). */
36
+ const INFILL_MAX_GAP = 0.1016;
37
+ const POST_ABOVE_RAIL = 0.0762; // a through-post stands this far above the top rail…
38
+ const POST_CAP_T = 0.0254; // …under a 1 in cap of its own
39
+ const POST_CAP_OVERHANG = 0.0381;
40
+ /** The metal guard's two rails, bottom-to-top: a slim bottom rail held off the
41
+ * nosing line and a flat top rail with its top at the guard height. Shared with
42
+ * the flight connector so a bridge carries the same rails as the guards it joins. */
43
+ export function metalGuardRails(railHeight) {
44
+ return [
45
+ { y: BOTTOM_CLEAR + BOTTOM_RAIL_T / 2, across: BOTTOM_RAIL_W, vertical: BOTTOM_RAIL_T },
46
+ { y: railHeight - TOP_RAIL_T / 2, across: TOP_RAIL_W, vertical: TOP_RAIL_T },
47
+ ];
48
+ }
49
+ /** The flat baseplate welded under a post foot, sitting on the nosing line. */
50
+ function baseplate(x, footY, z) {
51
+ return {
52
+ center: [x, footY + BASEPLATE_T / 2, z],
53
+ size: [BASEPLATE_W, BASEPLATE_T, BASEPLATE_W],
54
+ direction: [0, 1, 0],
55
+ };
56
+ }
57
+ export function buildMetalGuard(points, options) {
58
+ const { railHeight } = options;
59
+ const chassis = buildGuardChassis(points, options, metalGuardRails(railHeight), {
60
+ width: POST,
61
+ embed: 0,
62
+ top: -TOP_RAIL_T,
63
+ throughTop: POST_ABOVE_RAIL,
64
+ capThickness: POST_CAP_T,
65
+ capOverhang: POST_CAP_OVERHANG,
66
+ foot: baseplate,
67
+ }, {
68
+ picketPitch: INFILL_PITCH,
69
+ picketMinPitch: INFILL + 0.02,
70
+ picketMaxPitch: INFILL_MAX_GAP + INFILL,
71
+ });
72
+ if (!chassis)
73
+ return [];
74
+ const { path, boxes } = chassis;
75
+ if (path.kind === 'pivot')
76
+ return boxes;
77
+ boxes.push(...guardPickets(path, INFILL, POST, BOTTOM_CLEAR + BOTTOM_RAIL_T, railHeight - TOP_RAIL_T));
78
+ return boxes;
79
+ }
@@ -1,2 +1,34 @@
1
+ import { type AnyNode, type PaintPreviewArgs, type PaintResolveArgs } from '@pascal-app/core';
1
2
  export declare const stairPaint: import("@pascal-app/core").PaintCapability;
3
+ declare const segmentPaint: import("@pascal-app/core").PaintCapability;
4
+ export declare const stairSegmentPaint: {
5
+ getEffectiveMaterial: (args: Parameters<NonNullable<typeof segmentPaint.getEffectiveMaterial>>[0]) => {
6
+ material: {
7
+ id?: string | undefined;
8
+ preset?: "custom" | "white" | "brick" | "concrete" | "wood" | "glass" | "metal" | "plaster" | "tile" | "marble" | undefined;
9
+ properties?: {
10
+ color: string;
11
+ roughness: number;
12
+ metalness: number;
13
+ opacity: number;
14
+ transparent: boolean;
15
+ side: "front" | "back" | "double";
16
+ } | undefined;
17
+ texture?: {
18
+ url: string;
19
+ repeat?: [number, number] | undefined;
20
+ scale?: number | undefined;
21
+ } | undefined;
22
+ } | undefined;
23
+ materialPreset: string | undefined;
24
+ } | null;
25
+ materialTarget?: import("@pascal-app/core").MaterialTargetValue;
26
+ roomScope?: boolean;
27
+ resolveRole: (args: PaintResolveArgs) => string | null;
28
+ roleLabel?: (node: AnyNode, role: string) => string | null;
29
+ buildPatch: (args: import("@pascal-app/core").PaintPatchArgs) => Partial<AnyNode>;
30
+ commit?: (args: import("@pascal-app/core").PaintPatchArgs) => void;
31
+ applyPreview: (args: PaintPreviewArgs) => (() => void) | null;
32
+ };
33
+ export {};
2
34
  //# sourceMappingURL=paint.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"paint.d.ts","sourceRoot":"","sources":["../../src/stair/paint.ts"],"names":[],"mappings":"AA+FA,eAAO,MAAM,UAAU,4CAIrB,CAAA"}
1
+ {"version":3,"file":"paint.d.ts","sourceRoot":"","sources":["../../src/stair/paint.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EAGZ,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EAMtB,MAAM,kBAAkB,CAAA;AAwHzB,eAAO,MAAM,UAAU,4CAKrB,CAAA;AAEF,QAAA,MAAM,YAAY,4CAMhB,CAAA;AACF,eAAO,MAAM,iBAAiB;iCAGpB,UAAU,CAAC,WAAW,CAAC,OAAO,YAAY,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;CAa7E,CAAA"}
@@ -1,6 +1,8 @@
1
- import { buildSlotPreviewMaterial, createSlotPaintCapability } from '../shared/slot-paint';
1
+ import { getEffectiveStairSurfaceMaterial, parseMaterialRef, } from '@pascal-app/core';
2
+ import { buildSlotPreviewMaterial, createSlotPaintCapability, declaredSlotLook, } from '../shared/slot-paint';
3
+ import { swapPreviewMaterial } from '../shared/swap-preview-material';
2
4
  function isStairSlotId(value) {
3
- return value === 'treads' || value === 'body' || value === 'railing';
5
+ return value === 'treads' || value === 'body' || value === 'railing' || value === 'infill';
4
6
  }
5
7
  function resolveStairPaintRole(args) {
6
8
  const userData = args.hitObject?.userData;
@@ -15,9 +17,10 @@ function resolveStairPaintRole(args) {
15
17
  }
16
18
  function previewStairSlot(args) {
17
19
  const { role, root, material, materialPreset } = args;
20
+ const nodes = args.nodes ?? {};
18
21
  if (!isStairSlotId(role))
19
22
  return null;
20
- const preview = buildSlotPreviewMaterial(material, materialPreset);
23
+ const preview = buildSlotPreviewMaterial(material, materialPreset, args.materials ?? {});
21
24
  if (!preview)
22
25
  return () => { };
23
26
  const restores = [];
@@ -27,27 +30,34 @@ function previewStairSlot(args) {
27
30
  return;
28
31
  const userData = mesh.userData;
29
32
  if (userData.slotId === role) {
30
- const previous = mesh.material;
31
- mesh.material = preview;
32
- restores.push(() => {
33
- mesh.material = previous;
34
- });
33
+ restores.push(swapPreviewMaterial(mesh, preview));
35
34
  return;
36
35
  }
37
36
  if (!Array.isArray(userData.slotIds))
38
37
  return;
39
- const materialIndex = userData.slotIds.indexOf(role);
40
- if (materialIndex < 0)
38
+ if (!userData.slotIds.includes(role))
41
39
  return;
42
40
  if (!Array.isArray(mesh.material))
43
41
  return;
44
- const previous = mesh.material;
45
- const next = previous.slice();
46
- next[materialIndex] = preview;
47
- mesh.material = next;
48
- restores.push(() => {
49
- mesh.material = previous;
50
- });
42
+ const next = mesh.material.slice();
43
+ let changed = false;
44
+ for (const [index, slotId] of userData.slotIds.entries()) {
45
+ if (slotId !== role)
46
+ continue;
47
+ const segmentId = userData.segmentIds?.[index];
48
+ const segment = segmentId ? nodes[segmentId] : undefined;
49
+ if (args.node.type === 'stair' &&
50
+ segment?.type === 'stair-segment' &&
51
+ (slotLook(segment, role, args.materials ?? {}) ||
52
+ segment.material !== undefined ||
53
+ typeof segment.materialPreset === 'string'))
54
+ continue;
55
+ next[index] = preview;
56
+ changed = true;
57
+ }
58
+ if (!changed)
59
+ return;
60
+ restores.push(swapPreviewMaterial(mesh, next));
51
61
  });
52
62
  if (restores.length === 0)
53
63
  return null;
@@ -56,31 +66,60 @@ function previewStairSlot(args) {
56
66
  restores[index]?.();
57
67
  };
58
68
  }
69
+ function slotLook(node, role, materials) {
70
+ const parsed = parseMaterialRef(node.slots?.[role]);
71
+ if (!parsed)
72
+ return null;
73
+ if (parsed.kind === 'library')
74
+ return { material: undefined, materialPreset: `library:${parsed.id}` };
75
+ const entry = materials[parsed.id];
76
+ return entry ? { material: entry.material, materialPreset: undefined } : null;
77
+ }
59
78
  function legacyEffective(node, role) {
60
- if (!isStairSlotId(role))
79
+ if (!isStairSlotId(role) || role === 'infill')
61
80
  return null;
62
- const stair = node;
63
- const perSlot = role === 'treads'
64
- ? { material: stair.treadMaterial, materialPreset: stair.treadMaterialPreset }
65
- : role === 'body'
66
- ? { material: stair.sideMaterial, materialPreset: stair.sideMaterialPreset }
67
- : { material: stair.railingMaterial, materialPreset: stair.railingMaterialPreset };
68
- if (perSlot.material !== undefined || typeof perSlot.materialPreset === 'string') {
69
- return {
70
- material: perSlot.material,
71
- materialPreset: typeof perSlot.materialPreset === 'string' ? perSlot.materialPreset : undefined,
72
- };
73
- }
74
- if (stair.material !== undefined || typeof stair.materialPreset === 'string') {
75
- return {
76
- material: stair.material,
77
- materialPreset: typeof stair.materialPreset === 'string' ? stair.materialPreset : undefined,
78
- };
81
+ if (node.type === 'stair-segment') {
82
+ return node.material !== undefined || typeof node.materialPreset === 'string'
83
+ ? { material: node.material, materialPreset: node.materialPreset }
84
+ : null;
79
85
  }
80
- return null;
86
+ if (node.type !== 'stair')
87
+ return null;
88
+ const spec = getEffectiveStairSurfaceMaterial(node, role === 'treads' ? 'tread' : role === 'body' ? 'side' : 'railing');
89
+ return spec.material !== undefined || spec.materialPreset !== undefined
90
+ ? { material: spec.material, materialPreset: spec.materialPreset }
91
+ : null;
92
+ }
93
+ function segmentFallbackLook(segment, role, nodes, materials) {
94
+ const own = legacyEffective(segment, role);
95
+ if (own)
96
+ return own;
97
+ const parent = segment.parentId ? nodes[segment.parentId] : undefined;
98
+ return parent?.type === 'stair'
99
+ ? (slotLook(parent, role, materials) ??
100
+ legacyEffective(parent, role) ??
101
+ declaredSlotLook(parent, role))
102
+ : declaredSlotLook(segment, role);
81
103
  }
82
104
  export const stairPaint = createSlotPaintCapability({
83
105
  resolveRole: resolveStairPaintRole,
84
106
  applyPreview: previewStairSlot,
85
107
  legacyEffective,
108
+ erasedLook: ({ node, role }) => legacyEffective(node, role) ?? declaredSlotLook(node, role),
109
+ });
110
+ const segmentPaint = createSlotPaintCapability({
111
+ resolveRole: resolveStairPaintRole,
112
+ applyPreview: previewStairSlot,
113
+ legacyEffective,
114
+ erasedLook: ({ node, role, nodes, materials }) => segmentFallbackLook(node, role, nodes ?? {}, materials ?? {}),
86
115
  });
116
+ export const stairSegmentPaint = {
117
+ ...segmentPaint,
118
+ getEffectiveMaterial: (args) => {
119
+ if (args.role !== 'treads' && args.role !== 'body')
120
+ return null;
121
+ const look = segmentPaint.getEffectiveMaterial?.(args) ??
122
+ segmentFallbackLook(args.node, args.role, args.nodes, args.materials ?? {});
123
+ return look ? { material: look.material, materialPreset: look.materialPreset } : null;
124
+ },
125
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../src/stair/panel.tsx"],"names":[],"mappings":"AAuEA,MAAM,CAAC,OAAO,UAAU,UAAU,uCAwjBjC"}
1
+ {"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../src/stair/panel.tsx"],"names":[],"mappings":"AA0FA,MAAM,CAAC,OAAO,UAAU,UAAU,uCAu2BjC"}
@@ -1,12 +1,14 @@
1
1
  'use client';
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { getLevelDisplayName, resolveStairTotalRise, runAsSingleSceneHistoryStep, StairSegmentNode as StairSegmentNodeSchema, useScene, } from '@pascal-app/core';
4
- import { ActionButton, ActionGroup, duplicateStairSubtree, formatLinearMeasurement, getStairLevelOptions, MetricControl, PanelSection, PanelWrapper, resolveStairDestinationLevel, resolveStairFromLevelId, resolveStairToLevelId, SegmentedControl, SliderControl, ToggleControl, triggerSFX, useEditor, } from '@pascal-app/editor';
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { getLevelDisplayName, measureStair, planStairPreset, planStairRiseEdit, planStairSizingEdit, proposeStairLayouts, resolveStairArcDimensions, resolveStairTotalRise, runAsSingleSceneHistoryStep, StairSegmentNode as StairSegmentNodeSchema, useScene, } from '@pascal-app/core';
4
+ import { ActionButton, ActionGroup, duplicateNodeAndPickUp, formatLinearMeasurement, getStairLevelOptions, MetricControl, PanelSection, PanelWrapper, resolveStairDestinationLevel, resolveStairFromLevelId, resolveStairToLevelId, SegmentedControl, SelectControl, SliderControl, ToggleControl, triggerSFX, useEditor, } from '@pascal-app/editor';
5
5
  import { useViewer } from '@pascal-app/viewer';
6
6
  import { Copy, Move, Plus, Trash2 } from 'lucide-react';
7
- import { useCallback, useMemo } from 'react';
7
+ import { useCallback, useMemo, useState } from 'react';
8
8
  import { useShallow } from 'zustand/react/shallow';
9
+ import { StairConstructionControls } from './construction-controls';
9
10
  import { getStairDestinationUpdates } from './destination';
11
+ import { StairRailingControls } from './railing-controls';
10
12
  import { getStairTypeChange } from './stair-type';
11
13
  const RAILING_MODE_OPTIONS = [
12
14
  { label: 'None', value: 'none' },
@@ -14,6 +16,14 @@ const RAILING_MODE_OPTIONS = [
14
16
  { label: 'Right', value: 'right' },
15
17
  { label: 'Both', value: 'both' },
16
18
  ];
19
+ const RAILING_STYLE_OPTIONS = [
20
+ { label: 'Balusters', value: 'balusters' },
21
+ { label: 'Post & rail', value: 'post-and-rail' },
22
+ { label: 'Cable', value: 'cable' },
23
+ { label: 'Boards', value: 'boards' },
24
+ { label: 'Glass', value: 'glass' },
25
+ { label: 'Metal', value: 'metal' },
26
+ ];
17
27
  const STAIR_TYPE_OPTIONS = [
18
28
  { label: 'Straight', value: 'straight' },
19
29
  { label: 'Curved', value: 'curved' },
@@ -40,6 +50,12 @@ export default function StairPanel() {
40
50
  const createNode = useScene((s) => s.createNode);
41
51
  const setMovingNode = useEditor((s) => s.setMovingNode);
42
52
  const nodes = useScene((s) => s.nodes);
53
+ const [presetTurn, setPresetTurn] = useState('left');
54
+ const [turningStrategy, setTurningStrategy] = useState('landing');
55
+ const [innerGap, setInnerGap] = useState(0);
56
+ const [walkingLineOffset, setWalkingLineOffset] = useState(0.5);
57
+ const [division, setDivision] = useState('equal-going');
58
+ const [riseError, setRiseError] = useState(null);
43
59
  const node = useScene((s) => selectedId ? s.nodes[selectedId] : undefined);
44
60
  const levels = useMemo(() => (node?.type === 'stair' ? getStairLevelOptions(nodes, node) : []), [node, nodes]);
45
61
  const candidateDecks = useMemo(() => {
@@ -72,7 +88,24 @@ export default function StairPanel() {
72
88
  const handleUpdate = useCallback((updates) => {
73
89
  if (!selectedId)
74
90
  return;
75
- updateNode(selectedId, updates);
91
+ const scene = useScene.getState();
92
+ const current = scene.nodes[selectedId];
93
+ if (current?.type === 'stair' && typeof updates.totalRise === 'number') {
94
+ try {
95
+ const changes = planStairRiseEdit(current, updates.totalRise, scene.nodes);
96
+ changes[0].data = updates;
97
+ scene.updateNodes(changes);
98
+ setRiseError(null);
99
+ }
100
+ catch (error) {
101
+ if (!(error instanceof RangeError))
102
+ throw error;
103
+ setRiseError({ id: current.id, message: error.message });
104
+ }
105
+ }
106
+ else {
107
+ updateNode(selectedId, updates);
108
+ }
76
109
  }, [selectedId, updateNode]);
77
110
  const handleClose = useCallback(() => {
78
111
  setSelection({ selectedIds: [] });
@@ -174,15 +207,8 @@ export default function StairPanel() {
174
207
  setSelection({ selectedIds: [segmentId] });
175
208
  }, [setSelection]);
176
209
  const handleDuplicate = useCallback(() => {
177
- if (!node)
178
- return;
179
- triggerSFX('sfx:item-pick');
180
- try {
181
- duplicateStairSubtree(node.id, { mode: 'move' });
182
- }
183
- catch (e) {
184
- console.error('Failed to duplicate stair', e);
185
- }
210
+ if (node)
211
+ duplicateNodeAndPickUp(node);
186
212
  }, [node]);
187
213
  const handleMove = useCallback(() => {
188
214
  if (node) {
@@ -209,10 +235,118 @@ export default function StairPanel() {
209
235
  const deckNode = node.deckSlabId ? nodes[node.deckSlabId] : undefined;
210
236
  const attachedDeck = deckNode?.type === 'slab' ? deckNode : undefined;
211
237
  const resolvedRise = resolveStairTotalRise(node, nodes);
212
- return (_jsxs(PanelWrapper, { icon: "/icons/stairs.webp", onClose: handleClose, title: node.name || 'Staircase', width: 300, children: [_jsx(PanelSection, { title: "Type", children: _jsx(SegmentedControl, { onChange: handleStairTypeChange, options: STAIR_TYPE_OPTIONS, value: node.stairType ?? 'straight' }) }), _jsx(PanelSection, { title: "Opening", children: _jsxs("div", { className: "space-y-3", children: [attachedDeck ? null : (_jsx(ToggleControl, { checked: (node.slabOpeningMode ?? 'none') === 'destination', label: "Auto Cutout", onChange: handleAutoCutoutChange })), _jsxs("div", { className: "space-y-1.5", children: [_jsx("div", { className: "px-1 text-[11px] text-muted-foreground uppercase tracking-[0.14em]", children: "From Level" }), _jsx("select", { className: "h-9 w-full rounded-lg border border-border/50 bg-[#2C2C2E] px-3 text-foreground text-sm", onChange: (event) => handleFromLevelChange(event.target.value), value: resolvedFromLevelId ?? '', children: levels.map((level) => (_jsx("option", { value: level.id, children: getLevelDisplayName(level) }, level.id))) })] }), _jsxs("div", { className: "space-y-1.5", children: [_jsx("div", { className: "px-1 text-[11px] text-muted-foreground uppercase tracking-[0.14em]", children: "To" }), _jsxs("select", { className: "h-9 w-full rounded-lg border border-border/50 bg-[#2C2C2E] px-3 text-foreground text-sm", onChange: (event) => handleDestinationChange(event.target.value), value: attachedDeck ? attachedDeck.id : (resolvedToLevelId ?? ''), children: [levels.map((level) => (_jsx("option", { value: level.id, children: getLevelDisplayName(level) }, level.id))), candidateDecks.map((deck) => (_jsx("option", { value: deck.id, children: deck.name || 'Deck' }, deck.id)))] })] }), _jsxs("div", { className: "space-y-1.5", children: [_jsx("div", { className: "px-1 text-[11px] text-muted-foreground uppercase tracking-[0.14em]", children: "Rise" }), _jsx(SegmentedControl, { onChange: (value) => handleUpdate(value === 'custom' ? { totalRise: resolvedRise } : { totalRise: undefined }), options: [
238
+ const measurements = measureStair(node, nodes);
239
+ const applySizing = (fitRun) => {
240
+ const scene = useScene.getState();
241
+ const current = scene.nodes[node.id];
242
+ if (current?.type !== 'stair')
243
+ return;
244
+ try {
245
+ scene.updateNodes(planStairSizingEdit(current, scene.nodes, fitRun));
246
+ setRiseError(null);
247
+ }
248
+ catch (error) {
249
+ if (!(error instanceof RangeError))
250
+ throw error;
251
+ setRiseError({ id: current.id, message: error.message });
252
+ }
253
+ };
254
+ const layoutOptions = proposeStairLayouts(node, nodes)
255
+ .filter((option) => option.layout === 'straight' || option.turn === presetTurn)
256
+ .map((option) => {
257
+ try {
258
+ return {
259
+ ...option,
260
+ footprint: planStairPreset(node, nodes, {
261
+ layout: option.layout,
262
+ turn: presetTurn,
263
+ turningStrategy,
264
+ innerGap,
265
+ walkingLineOffset,
266
+ division,
267
+ }).footprint,
268
+ };
269
+ }
270
+ catch (error) {
271
+ if (!(error instanceof RangeError))
272
+ throw error;
273
+ return { ...option, footprint: null };
274
+ }
275
+ });
276
+ const applyPreset = (layout) => {
277
+ const scene = useScene.getState();
278
+ const current = scene.nodes[node.id];
279
+ if (current?.type !== 'stair')
280
+ return;
281
+ try {
282
+ const plan = planStairPreset(current, scene.nodes, {
283
+ layout,
284
+ turn: presetTurn,
285
+ turningStrategy,
286
+ innerGap,
287
+ walkingLineOffset,
288
+ division,
289
+ });
290
+ runAsSingleSceneHistoryStep(useScene, () => {
291
+ scene.deleteNodes(plan.removeIds);
292
+ for (const segment of plan.segments) {
293
+ if (scene.nodes[segment.id])
294
+ scene.updateNode(segment.id, segment);
295
+ else
296
+ scene.createNode(segment, current.id);
297
+ }
298
+ scene.updateNode(current.id, plan.stair);
299
+ });
300
+ setRiseError(null);
301
+ }
302
+ catch (error) {
303
+ if (!(error instanceof RangeError))
304
+ throw error;
305
+ setRiseError({ id: current.id, message: error.message });
306
+ }
307
+ };
308
+ const minimumRise = Math.max(0.001, (node.stairType === 'straight'
309
+ ? segments
310
+ .filter((segment) => segment.segmentType === 'landing')
311
+ .reduce((sum, segment) => sum + segment.height, 0)
312
+ : 0) + 0.001);
313
+ return (_jsxs(PanelWrapper, { icon: "/icons/stairs.webp", onClose: handleClose, title: node.name || 'Staircase', width: 300, children: [_jsx(PanelSection, { title: "Type", children: _jsx(SegmentedControl, { onChange: handleStairTypeChange, options: STAIR_TYPE_OPTIONS, value: node.stairType ?? 'straight' }) }), _jsxs(PanelSection, { title: "Layout", children: [_jsx(SegmentedControl, { value: presetTurn, onChange: setPresetTurn, options: [
314
+ { label: 'Left turn', value: 'left' },
315
+ { label: 'Right turn', value: 'right' },
316
+ ] }), _jsx(SegmentedControl, { value: turningStrategy, onChange: setTurningStrategy, options: [
317
+ { label: 'Landing', value: 'landing' },
318
+ { label: 'Winder', value: 'winder' },
319
+ ] }), turningStrategy === 'winder' && (_jsxs(_Fragment, { children: [_jsx(MetricControl, { label: "Inner gap", unit: "m", min: 0, step: 0.05, precision: 2, value: innerGap, onChange: setInnerGap }), _jsx(MetricControl, { label: "Walking line offset", unit: "m", min: 0.001, step: 0.05, precision: 2, value: walkingLineOffset, onChange: setWalkingLineOffset }), _jsx(SegmentedControl, { value: division, onChange: setDivision, options: [
320
+ { label: 'Equal going', value: 'equal-going' },
321
+ { label: 'Equal angle', value: 'equal-angle' },
322
+ ] })] })), _jsx("div", { className: "grid grid-cols-3 gap-2", children: layoutOptions.map((option) => {
323
+ const label = option.layout === 'straight' ? 'Straight' : `${option.layout.toUpperCase()} turn`;
324
+ return (_jsxs("button", { type: "button", "aria-label": `Apply ${label} layout`, disabled: !option.footprint, onClick: () => applyPreset(option.layout), className: "flex min-h-24 flex-col items-center justify-center gap-2 rounded-lg border border-border/60 bg-muted/30 px-1 py-3 text-foreground transition-colors hover:border-foreground/40 hover:bg-muted/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-40", children: [_jsx("svg", { "aria-hidden": "true", width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", children: _jsx("path", { d: option.layout === 'straight'
325
+ ? 'M16 27V5'
326
+ : option.layout === 'l'
327
+ ? 'M7 27V7H27'
328
+ : 'M7 27V7H25V27', stroke: "currentColor", strokeWidth: "6", strokeLinecap: "square", strokeLinejoin: "miter", transform: presetTurn === 'right' ? 'translate(32 0) scale(-1 1)' : undefined }) }), _jsx("span", { className: "text-xs font-medium", children: label }), _jsx("span", { className: "text-center text-[11px] leading-tight text-muted-foreground", children: option.footprint
329
+ ? `${formatLinearMeasurement(option.footprint.width, unit, metricNotation)} × ${formatLinearMeasurement(option.footprint.length, unit, metricNotation)}`
330
+ : 'Unavailable' })] }, option.layout));
331
+ }) })] }), _jsxs(PanelSection, { title: "Sizing", children: [_jsxs("details", { className: "px-1 text-xs", children: [_jsx("summary", { className: "cursor-pointer py-2 text-muted-foreground", children: "Measurements" }), _jsxs("div", { className: "space-y-2 px-1 text-xs", children: [measurements.flights.map((flight, index) => (_jsxs("div", { children: ["Flight ", index + 1, ": ", flight.count, " risers \u00B7 R", ' ', flight.riserHeight === null
332
+ ? '—'
333
+ : formatLinearMeasurement(flight.riserHeight, unit, metricNotation), ' ', "\u00B7 T", ' ', flight.going === null
334
+ ? '—'
335
+ : formatLinearMeasurement(flight.going, unit, metricNotation), ' ', "\u00B7 ", flight.slope === null ? '—' : `${((flight.slope * 180) / Math.PI).toFixed(1)}°`] }, flight.nodeId))), _jsxs("div", { children: ["Headroom:", ' ', measurements.headroom.status === 'unresolved'
336
+ ? 'Not evaluated'
337
+ : measurements.headroom.minimum === null
338
+ ? 'No overhead surface'
339
+ : formatLinearMeasurement(measurements.headroom.minimum, unit, metricNotation)] }), _jsx("div", { className: "text-muted-foreground", children: "Floors, ceilings and stairs only." })] })] }), [...new Set(measurements.diagnostics.map((diagnostic) => diagnostic.message))].map((message) => (_jsx("div", { role: "status", className: "rounded-lg bg-muted/40 px-3 py-2 text-xs text-muted-foreground", children: message }, message))), _jsxs("details", { className: "space-y-3", children: [_jsx("summary", { className: "cursor-pointer px-1 py-2 text-xs text-muted-foreground", children: "Design targets" }), _jsx(MetricControl, { label: "Target max riser", unit: "m", precision: 3, step: 0.005, min: 0.001, value: measurements.targets.maxRiserHeight, onChange: (value) => handleUpdate({ designTargets: { ...measurements.targets, maxRiserHeight: value } }) }), _jsx(MetricControl, { label: "Target minimum going", unit: "m", precision: 3, step: 0.01, min: 0.001, value: measurements.targets.minimumGoing, onChange: (value) => handleUpdate({ designTargets: { ...measurements.targets, minimumGoing: value } }) }), _jsx(MetricControl, { label: "Target going", unit: "m", precision: 3, step: 0.01, min: 0.001, value: measurements.targets.targetGoing, onChange: (value) => handleUpdate({ designTargets: { ...measurements.targets, targetGoing: value } }) }), _jsx(MetricControl, { label: "Target headroom", unit: "m", precision: 2, step: 0.05, min: 0.001, value: measurements.targets.minimumHeadroom, onChange: (value) => handleUpdate({ designTargets: { ...measurements.targets, minimumHeadroom: value } }) })] }), _jsx(ActionButton, { className: "flex-none", label: "Fit uniform risers", onClick: () => applySizing(false) }), _jsx(ActionButton, { className: "flex-none", label: "Fit risers and going", onClick: () => applySizing(true) })] }), _jsx(PanelSection, { title: "Opening", children: _jsxs("div", { className: "space-y-3", children: [attachedDeck ? null : (_jsx(ToggleControl, { checked: (node.slabOpeningMode ?? 'none') === 'destination', label: "Auto Cutout", onChange: handleAutoCutoutChange })), _jsxs("div", { className: "space-y-1.5", children: [_jsx("div", { className: "px-1 text-[11px] text-muted-foreground uppercase tracking-[0.14em]", children: "From Level" }), _jsx("select", { className: "h-9 w-full rounded-lg border border-border/50 bg-[#2C2C2E] px-3 text-foreground text-sm", onChange: (event) => handleFromLevelChange(event.target.value), value: resolvedFromLevelId ?? '', children: levels.map((level) => (_jsx("option", { value: level.id, children: getLevelDisplayName(level) }, level.id))) })] }), _jsxs("div", { className: "space-y-1.5", children: [_jsx("div", { className: "px-1 text-[11px] text-muted-foreground uppercase tracking-[0.14em]", children: "To" }), _jsxs("select", { className: "h-9 w-full rounded-lg border border-border/50 bg-[#2C2C2E] px-3 text-foreground text-sm", onChange: (event) => handleDestinationChange(event.target.value), value: attachedDeck ? attachedDeck.id : (resolvedToLevelId ?? ''), children: [levels.map((level) => (_jsx("option", { value: level.id, children: getLevelDisplayName(level) }, level.id))), candidateDecks.map((deck) => (_jsx("option", { value: deck.id, children: deck.name || 'Deck' }, deck.id)))] })] }), _jsxs("div", { className: "space-y-1.5", children: [_jsx("div", { className: "px-1 text-[11px] text-muted-foreground uppercase tracking-[0.14em]", children: "Rise" }), _jsx(SegmentedControl, { onChange: (value) => handleUpdate(value === 'custom' ? { totalRise: resolvedRise } : { totalRise: undefined }), options: [
213
340
  { label: attachedDeck ? 'Follows deck' : 'Follows level', value: 'follows' },
214
341
  { label: 'Custom rise', value: 'custom' },
215
- ], value: node.totalRise == null ? 'follows' : 'custom' }), node.totalRise == null ? (_jsxs("div", { className: "px-1 text-[11px] text-muted-foreground", children: ["Currently ", formatLinearMeasurement(resolvedRise, unit, metricNotation)] })) : (_jsx(MetricControl, { label: "Rise", max: 1000, min: 0.2, onChange: (value) => handleUpdate({ totalRise: value }), precision: 2, step: 0.05, unit: "m", value: resolvedRise }))] }), attachedDeck ? null : (_jsxs(_Fragment, { children: [_jsx(SegmentedControl, { onChange: (value) => handleAutoCutoutChange(value === 'destination'), options: STAIR_SLAB_OPENING_OPTIONS, value: node.slabOpeningMode ?? 'none' }), (node.slabOpeningMode ?? 'none') === 'destination' ? (_jsx(MetricControl, { label: "Opening Offset", max: 0.5, min: 0, onChange: (value) => handleUpdate({ openingOffset: value }), precision: 2, step: 0.01, unit: "m", value: node.openingOffset ?? 0 })) : null] })), node.stairType === 'spiral' && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "space-y-1.5", children: [_jsx("div", { className: "px-1 text-[11px] text-muted-foreground uppercase tracking-[0.14em]", children: "Landing" }), _jsx(SegmentedControl, { onChange: (value) => handleUpdate({ topLandingMode: value }), options: TOP_LANDING_MODE_OPTIONS, value: node.topLandingMode ?? 'none' })] }), (node.topLandingMode ?? 'none') === 'integrated' && (_jsx(MetricControl, { label: "Top Landing", max: 5, min: 0.3, onChange: (value) => handleUpdate({ topLandingDepth: value }), precision: 2, step: 0.05, unit: "m", value: node.topLandingDepth ?? 0.9 }))] }))] }) }), node.stairType === 'straight' && (_jsxs(PanelSection, { title: "Segments", children: [_jsx("div", { className: "flex flex-col gap-1", children: segments.map((seg, i) => (_jsxs("button", { className: "flex items-center justify-between rounded-lg border border-border/50 bg-[#2C2C2E] px-3 py-2 text-foreground text-sm transition-colors hover:bg-[#3e3e3e]", onClick: () => handleSelectSegment(seg.id), type: "button", children: [_jsx("span", { className: "truncate", children: seg.name || `Segment ${i + 1}` }), _jsx("span", { className: "text-muted-foreground text-xs capitalize", children: seg.segmentType })] }, seg.id))) }), _jsxs("div", { className: "flex gap-1.5", children: [_jsx(ActionButton, { icon: _jsx(Plus, { className: "h-3.5 w-3.5" }), label: "Add flight", onClick: handleAddFlight }), _jsx(ActionButton, { icon: _jsx(Plus, { className: "h-3.5 w-3.5" }), label: "Add landing", onClick: handleAddLanding })] })] })), (node.stairType === 'curved' || node.stairType === 'spiral') && (_jsxs(PanelSection, { title: "Geometry", children: [_jsx(MetricControl, { label: "Width", max: 10, min: 0.4, onChange: (value) => handleUpdate({ width: value }), precision: 2, step: 0.05, unit: "m", value: node.width ?? 1 }), _jsx(MetricControl, { label: "Steps", max: 32, min: 2, onChange: (value) => handleUpdate({ stepCount: Math.max(2, Math.round(value)) }), precision: 0, step: 1, unit: "", value: Math.max(2, Math.round(node.stepCount ?? 10)) }), node.stairType !== 'spiral' && (_jsx(ToggleControl, { checked: node.fillToFloor ?? true, label: "Fit To Floor", onChange: (checked) => handleUpdate({ fillToFloor: checked }) })), (node.stairType === 'spiral' || !(node.fillToFloor ?? true)) && (_jsx(MetricControl, { label: "Thickness", max: 1, min: 0.02, onChange: (value) => handleUpdate({ thickness: value }), precision: 2, step: 0.01, unit: "m", value: node.thickness ?? 0.25 })), _jsx(MetricControl, { label: "Inner Radius", max: 10, min: node.stairType === 'spiral' ? 0.05 : 0.2, onChange: (value) => handleUpdate({ innerRadius: value }), precision: 2, step: 0.05, unit: "m", value: node.innerRadius ?? 0.9 }), _jsx(SliderControl, { label: "Sweep", max: node.stairType === 'spiral' ? 720 : 270, min: node.stairType === 'spiral' ? -720 : -270, onChange: (degrees) => handleUpdate({ sweepAngle: (degrees * Math.PI) / 180 }), precision: 0, step: 1, unit: "\u00B0", value: Math.round(((node.sweepAngle ?? Math.PI / 2) * 180) / Math.PI) }), node.stairType === 'spiral' && (_jsxs(_Fragment, { children: [_jsx(ToggleControl, { checked: node.showCenterColumn ?? true, label: "Center Column", onChange: (checked) => handleUpdate({ showCenterColumn: checked }) }), _jsx(ToggleControl, { checked: node.showStepSupports ?? true, label: "Step Supports", onChange: (checked) => handleUpdate({ showStepSupports: checked }) })] }))] })), _jsxs(PanelSection, { title: "Position", children: [_jsx(SliderControl, { label: "X", onChange: (v) => {
342
+ ], value: node.totalRise == null ? 'follows' : 'custom' }), node.totalRise == null ? (_jsxs("div", { className: "px-1 text-[11px] text-muted-foreground", children: ["Currently ", formatLinearMeasurement(resolvedRise, unit, metricNotation)] })) : (_jsx(MetricControl, { label: "Rise", min: minimumRise, onChange: (value) => handleUpdate({ totalRise: value }), precision: 2, step: 0.05, unit: "m", value: resolvedRise }))] }), riseError?.id === node.id ? (_jsx("div", { role: "alert", className: "text-destructive text-xs", children: riseError.message })) : null, attachedDeck ? null : (_jsxs(_Fragment, { children: [_jsx(SegmentedControl, { onChange: (value) => handleAutoCutoutChange(value === 'destination'), options: STAIR_SLAB_OPENING_OPTIONS, value: node.slabOpeningMode ?? 'none' }), (node.slabOpeningMode ?? 'none') === 'destination' ? (_jsx(MetricControl, { label: "Opening Offset", min: 0, onChange: (value) => handleUpdate({ openingOffset: value }), precision: 2, step: 0.01, unit: "m", value: node.openingOffset ?? 0 })) : null] })), node.stairType === 'spiral' && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "space-y-1.5", children: [_jsx("div", { className: "px-1 text-[11px] text-muted-foreground uppercase tracking-[0.14em]", children: "Landing" }), _jsx(SegmentedControl, { onChange: (value) => handleUpdate({ topLandingMode: value }), options: TOP_LANDING_MODE_OPTIONS, value: node.topLandingMode ?? 'none' })] }), (node.topLandingMode ?? 'none') === 'integrated' && (_jsx(MetricControl, { label: "Top Landing", max: Math.PI * 2 * resolveStairArcDimensions(node, resolvedRise).walkingRadius, min: 0.001, onChange: (value) => handleUpdate({ topLandingDepth: value }), precision: 2, step: 0.05, unit: "m", value: node.topLandingDepth ?? 0.9 }))] }))] }) }), node.stairType === 'straight' && (_jsxs(PanelSection, { title: "Segments", children: [_jsx("div", { className: "flex flex-col gap-1", children: segments.map((seg, i) => (_jsxs("button", { className: "flex items-center justify-between rounded-lg border border-border/50 bg-[#2C2C2E] px-3 py-2 text-foreground text-sm transition-colors hover:bg-[#3e3e3e]", onClick: () => handleSelectSegment(seg.id), type: "button", children: [_jsx("span", { className: "truncate", children: seg.name || `Segment ${i + 1}` }), _jsx("span", { className: "text-muted-foreground text-xs capitalize", children: seg.segmentType })] }, seg.id))) }), _jsxs("div", { className: "flex gap-1.5", children: [_jsx(ActionButton, { icon: _jsx(Plus, { className: "h-3.5 w-3.5" }), label: "Add flight", onClick: handleAddFlight }), _jsx(ActionButton, { icon: _jsx(Plus, { className: "h-3.5 w-3.5" }), label: "Add landing", onClick: handleAddLanding })] })] })), (node.stairType === 'curved' || node.stairType === 'spiral') && (_jsxs(PanelSection, { title: "Geometry", children: [_jsx(MetricControl, { label: "Width", min: 0.001, onChange: (value) => handleUpdate({ width: value }), precision: 2, step: 0.05, unit: "m", value: node.width ?? 1 }), _jsx(MetricControl, { label: "Steps", min: 2, onChange: (value) => handleUpdate({ stepCount: Math.max(2, Math.round(value)) }), precision: 0, step: 1, unit: "", value: Math.max(2, Math.round(node.stepCount ?? 10)) }), node.stairType !== 'spiral' && (_jsx(ToggleControl, { checked: node.fillToFloor ?? true, label: "Fit To Floor", onChange: (checked) => handleUpdate({ fillToFloor: checked }) })), (node.stairType === 'spiral' || !(node.fillToFloor ?? true)) && (_jsx(MetricControl, { label: "Thickness", min: 0.001, onChange: (value) => handleUpdate({ thickness: value }), precision: 2, step: 0.01, unit: "m", value: node.thickness ?? 0.25 })), _jsx(MetricControl, { label: "Inner Radius", min: 0.001, onChange: (value) => handleUpdate({ innerRadius: value }), precision: 2, step: 0.05, unit: "m", value: node.innerRadius ?? 0.9 }), _jsx(SegmentedControl, { value: node.sweepAngle < 0 ? 'negative' : 'positive', onChange: (value) => handleUpdate({
343
+ sweepAngle: Math.abs(node.sweepAngle) * (value === 'negative' ? -1 : 1),
344
+ }), options: [
345
+ { label: 'Clockwise', value: 'positive' },
346
+ { label: 'Counterclockwise', value: 'negative' },
347
+ ] }), _jsx(SliderControl, { label: "Sweep", min: 0.01, onChange: (degrees) => handleUpdate({
348
+ sweepAngle: (Math.sign(node.sweepAngle || 1) * (degrees * Math.PI)) / 180,
349
+ }), precision: 0, step: 1, unit: "\u00B0", value: Math.round((Math.abs(node.sweepAngle ?? Math.PI / 2) * 180) / Math.PI) }), node.stairType === 'spiral' && (_jsxs(_Fragment, { children: [_jsx(ToggleControl, { checked: node.showCenterColumn ?? true, label: "Center Column", onChange: (checked) => handleUpdate({ showCenterColumn: checked }) }), _jsx(ToggleControl, { checked: node.showStepSupports ?? true, label: "Step Supports", onChange: (checked) => handleUpdate({ showStepSupports: checked }) })] }))] })), _jsx(PanelSection, { title: "Construction", children: _jsx(StairConstructionControls, { node: node, onChange: (construction) => handleUpdate({ construction }) }) }), _jsxs(PanelSection, { title: "Position", children: [_jsx(SliderControl, { label: "X", onChange: (v) => {
216
350
  const pos = [...node.position];
217
351
  pos[0] = v;
218
352
  handleUpdate({ position: pos });
@@ -232,5 +366,8 @@ export default function StairPanel() {
232
366
  } }), _jsx(ActionButton, { label: "+45\u00B0", onClick: () => {
233
367
  triggerSFX('sfx:item-rotate');
234
368
  handleUpdate({ rotation: node.rotation + Math.PI / 4 });
235
- } })] })] }), _jsxs(PanelSection, { title: "Railing", children: [_jsx(SegmentedControl, { onChange: (value) => handleUpdate({ railingMode: value }), options: RAILING_MODE_OPTIONS, value: node.railingMode ?? 'none' }), (node.railingMode ?? 'none') !== 'none' && (_jsx(SliderControl, { label: "Height", max: 1.4, min: 0.7, onChange: (value) => handleUpdate({ railingHeight: value }), precision: 2, step: 0.02, unit: "m", value: node.railingHeight ?? 0.92 }))] }), _jsx(PanelSection, { title: "Actions", children: _jsxs(ActionGroup, { children: [_jsx(ActionButton, { icon: _jsx(Move, { className: "h-3.5 w-3.5" }), label: "Move", onClick: handleMove }), _jsx(ActionButton, { icon: _jsx(Copy, { className: "h-3.5 w-3.5" }), label: "Duplicate", onClick: handleDuplicate }), _jsx(ActionButton, { className: "hover:bg-red-500/20", icon: _jsx(Trash2, { className: "h-3.5 w-3.5 text-red-400" }), label: "Delete", onClick: handleDelete })] }) })] }));
369
+ } })] })] }), _jsxs(PanelSection, { title: "Railing", children: [_jsx(StairRailingControls, { node: node, onChange: handleUpdate }), _jsx(SegmentedControl, { onChange: (value) => handleUpdate({ railingMode: value }), options: RAILING_MODE_OPTIONS, value: node.railingMode ?? 'none' }), (node.railingMode ?? 'none') !== 'none' && (_jsxs(_Fragment, { children: [_jsx(SelectControl, { label: "Style", onChange: (value) => handleUpdate({
370
+ railingStyle: value,
371
+ ...(value === 'glass' || value === 'metal' ? { railingPath: 'continuous' } : {}),
372
+ }), options: RAILING_STYLE_OPTIONS, value: node.railingStyle ?? 'balusters' }), _jsx(SliderControl, { label: "Height", min: 0.001, onChange: (value) => handleUpdate({ railingHeight: value }), precision: 2, step: 0.02, unit: "m", value: node.railingHeight ?? 0.92 })] }))] }), _jsx(PanelSection, { title: "Actions", children: _jsxs(ActionGroup, { children: [_jsx(ActionButton, { icon: _jsx(Move, { className: "h-3.5 w-3.5" }), label: "Move", onClick: handleMove }), _jsx(ActionButton, { icon: _jsx(Copy, { className: "h-3.5 w-3.5" }), label: "Duplicate", onClick: handleDuplicate }), _jsx(ActionButton, { className: "hover:bg-red-500/20", icon: _jsx(Trash2, { className: "h-3.5 w-3.5 text-red-400" }), label: "Delete", onClick: handleDelete })] }) })] }));
236
373
  }
@@ -1,3 +1,3 @@
1
- import type { ParametricDescriptor, StairNode } from '@pascal-app/core';
1
+ import { type ParametricDescriptor, type StairNode } from '@pascal-app/core';
2
2
  export declare const stairParametrics: ParametricDescriptor<StairNode>;
3
3
  //# sourceMappingURL=parametrics.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parametrics.d.ts","sourceRoot":"","sources":["../../src/stair/parametrics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAEvE,eAAO,MAAM,gBAAgB,EAAE,oBAAoB,CAAC,SAAS,CAuK5D,CAAA"}
1
+ {"version":3,"file":"parametrics.d.ts","sourceRoot":"","sources":["../../src/stair/parametrics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,oBAAoB,EAAqB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAI/F,eAAO,MAAM,gBAAgB,EAAE,oBAAoB,CAAC,SAAS,CAsL5D,CAAA"}