@pascal-app/nodes 1.0.5 → 1.0.7

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 (566) hide show
  1. package/README.md +1 -0
  2. package/dist/beam/actions/move-endpoint.d.ts +24 -0
  3. package/dist/beam/actions/move-endpoint.d.ts.map +1 -0
  4. package/dist/beam/actions/move-endpoint.js +54 -0
  5. package/dist/beam/definition.d.ts +14 -0
  6. package/dist/beam/definition.d.ts.map +1 -0
  7. package/dist/beam/definition.js +173 -0
  8. package/dist/beam/draft-settings.d.ts +17 -0
  9. package/dist/beam/draft-settings.d.ts.map +1 -0
  10. package/dist/beam/draft-settings.js +81 -0
  11. package/dist/beam/drafting.d.ts +35 -0
  12. package/dist/beam/drafting.d.ts.map +1 -0
  13. package/dist/beam/drafting.js +103 -0
  14. package/dist/beam/floorplan-affordances.d.ts +8 -0
  15. package/dist/beam/floorplan-affordances.d.ts.map +1 -0
  16. package/dist/beam/floorplan-affordances.js +40 -0
  17. package/dist/beam/floorplan-move.d.ts +11 -0
  18. package/dist/beam/floorplan-move.d.ts.map +1 -0
  19. package/dist/beam/floorplan-move.js +54 -0
  20. package/dist/beam/floorplan.d.ts +11 -0
  21. package/dist/beam/floorplan.d.ts.map +1 -0
  22. package/dist/beam/floorplan.js +91 -0
  23. package/dist/beam/geometry.d.ts +19 -0
  24. package/dist/beam/geometry.d.ts.map +1 -0
  25. package/dist/beam/geometry.js +63 -0
  26. package/dist/beam/index.d.ts +3 -0
  27. package/dist/beam/index.d.ts.map +1 -0
  28. package/dist/beam/index.js +2 -0
  29. package/dist/beam/move-endpoint-tool.d.ts +21 -0
  30. package/dist/beam/move-endpoint-tool.d.ts.map +1 -0
  31. package/dist/beam/move-endpoint-tool.js +49 -0
  32. package/dist/beam/move-tool.d.ts +12 -0
  33. package/dist/beam/move-tool.d.ts.map +1 -0
  34. package/dist/beam/move-tool.js +114 -0
  35. package/dist/beam/panel-model.d.ts +28 -0
  36. package/dist/beam/panel-model.d.ts.map +1 -0
  37. package/dist/beam/panel-model.js +123 -0
  38. package/dist/beam/panel.d.ts +13 -0
  39. package/dist/beam/panel.d.ts.map +1 -0
  40. package/dist/beam/panel.js +107 -0
  41. package/dist/beam/parametrics.d.ts +3 -0
  42. package/dist/beam/parametrics.d.ts.map +1 -0
  43. package/dist/beam/parametrics.js +4 -0
  44. package/dist/beam/renderer.d.ts +13 -0
  45. package/dist/beam/renderer.d.ts.map +1 -0
  46. package/dist/beam/renderer.js +36 -0
  47. package/dist/beam/schema.d.ts +2 -0
  48. package/dist/beam/schema.d.ts.map +1 -0
  49. package/dist/beam/schema.js +1 -0
  50. package/dist/beam/tool.d.ts +13 -0
  51. package/dist/beam/tool.d.ts.map +1 -0
  52. package/dist/beam/tool.js +152 -0
  53. package/dist/box-vent/panel.d.ts.map +1 -1
  54. package/dist/box-vent/panel.js +8 -7
  55. package/dist/cabinet/batchable.d.ts +10 -0
  56. package/dist/cabinet/batchable.d.ts.map +1 -0
  57. package/dist/cabinet/batchable.js +12 -0
  58. package/dist/cabinet/compartment-card.d.ts.map +1 -1
  59. package/dist/cabinet/compartment-card.js +142 -46
  60. package/dist/cabinet/countertop-layout.d.ts +5 -0
  61. package/dist/cabinet/countertop-layout.d.ts.map +1 -1
  62. package/dist/cabinet/definition.d.ts.map +1 -1
  63. package/dist/cabinet/definition.js +3 -0
  64. package/dist/cabinet/dimension-input.d.ts +6 -0
  65. package/dist/cabinet/dimension-input.d.ts.map +1 -0
  66. package/dist/cabinet/dimension-input.js +8 -0
  67. package/dist/cabinet/essential-controls.d.ts.map +1 -1
  68. package/dist/cabinet/essential-controls.js +82 -17
  69. package/dist/cabinet/index.d.ts +1 -1
  70. package/dist/cabinet/index.d.ts.map +1 -1
  71. package/dist/cabinet/index.js +1 -1
  72. package/dist/cabinet/kitchen-catalog.d.ts +17 -4
  73. package/dist/cabinet/kitchen-catalog.d.ts.map +1 -1
  74. package/dist/cabinet/kitchen-catalog.js +45 -7
  75. package/dist/cabinet/kitchen-collection.d.ts.map +1 -1
  76. package/dist/cabinet/kitchen-collection.js +21 -5
  77. package/dist/cabinet/kitchen-module-actions.d.ts.map +1 -1
  78. package/dist/cabinet/kitchen-module-actions.js +107 -14
  79. package/dist/cabinet/neighbor-placement.d.ts +10 -0
  80. package/dist/cabinet/neighbor-placement.d.ts.map +1 -1
  81. package/dist/cabinet/panel.d.ts.map +1 -1
  82. package/dist/cabinet/panel.js +127 -50
  83. package/dist/cabinet/run-finishing.d.ts +5 -0
  84. package/dist/cabinet/run-finishing.d.ts.map +1 -1
  85. package/dist/cabinet/run-ops.d.ts +5 -0
  86. package/dist/cabinet/run-ops.d.ts.map +1 -1
  87. package/dist/cabinet/run-panel.d.ts.map +1 -1
  88. package/dist/cabinet/run-panel.js +203 -52
  89. package/dist/cabinet/tool.d.ts.map +1 -1
  90. package/dist/cabinet/tool.js +8 -5
  91. package/dist/ceiling/build-up-section.d.ts +7 -0
  92. package/dist/ceiling/build-up-section.d.ts.map +1 -0
  93. package/dist/ceiling/build-up-section.js +57 -0
  94. package/dist/ceiling/definition.d.ts.map +1 -1
  95. package/dist/ceiling/definition.js +3 -1
  96. package/dist/ceiling/floorplan-affordances.d.ts +112 -0
  97. package/dist/ceiling/floorplan-affordances.d.ts.map +1 -1
  98. package/dist/ceiling/materials.d.ts +5 -0
  99. package/dist/ceiling/materials.d.ts.map +1 -1
  100. package/dist/ceiling/materials.js +17 -0
  101. package/dist/ceiling/panel-model.d.ts +13 -0
  102. package/dist/ceiling/panel-model.d.ts.map +1 -0
  103. package/dist/ceiling/panel-model.js +49 -0
  104. package/dist/ceiling/panel.d.ts.map +1 -1
  105. package/dist/ceiling/panel.js +82 -18
  106. package/dist/ceiling/renderer.d.ts.map +1 -1
  107. package/dist/ceiling/renderer.js +10 -4
  108. package/dist/ceiling/tool.d.ts.map +1 -1
  109. package/dist/ceiling/tool.js +24 -4
  110. package/dist/chimney/panel.d.ts.map +1 -1
  111. package/dist/chimney/panel.js +113 -41
  112. package/dist/column/definition.d.ts.map +1 -1
  113. package/dist/column/definition.js +3 -0
  114. package/dist/column/floorplan.d.ts.map +1 -1
  115. package/dist/column/floorplan.js +17 -0
  116. package/dist/column/hosted-resize.d.ts +28 -1
  117. package/dist/column/hosted-resize.d.ts.map +1 -1
  118. package/dist/column/panel.d.ts.map +1 -1
  119. package/dist/column/panel.js +125 -37
  120. package/dist/column/post-options.d.ts +10 -0
  121. package/dist/column/post-options.d.ts.map +1 -0
  122. package/dist/column/post-options.js +71 -0
  123. package/dist/column/post-placement.d.ts +78 -0
  124. package/dist/column/post-placement.d.ts.map +1 -0
  125. package/dist/column/post-placement.js +157 -0
  126. package/dist/column/post-section.d.ts +17 -0
  127. package/dist/column/post-section.d.ts.map +1 -0
  128. package/dist/column/post-section.js +95 -0
  129. package/dist/column/post-tool.d.ts +11 -0
  130. package/dist/column/post-tool.d.ts.map +1 -0
  131. package/dist/column/post-tool.js +94 -0
  132. package/dist/column/tool.d.ts +3 -10
  133. package/dist/column/tool.d.ts.map +1 -1
  134. package/dist/column/tool.js +13 -1
  135. package/dist/cupola/panel.d.ts.map +1 -1
  136. package/dist/cupola/panel.js +14 -7
  137. package/dist/door/actions.d.ts +7 -0
  138. package/dist/door/actions.d.ts.map +1 -0
  139. package/dist/door/actions.js +32 -0
  140. package/dist/door/contextual-dimensions.d.ts.map +1 -1
  141. package/dist/door/contextual-dimensions.js +11 -1
  142. package/dist/door/definition.d.ts.map +1 -1
  143. package/dist/door/definition.js +34 -7
  144. package/dist/door/floorplan-affordances.d.ts.map +1 -1
  145. package/dist/door/floorplan-affordances.js +5 -2
  146. package/dist/door/floorplan-move.d.ts.map +1 -1
  147. package/dist/door/floorplan-move.js +28 -6
  148. package/dist/door/floorplan.d.ts +2 -0
  149. package/dist/door/floorplan.d.ts.map +1 -1
  150. package/dist/door/floorplan.js +89 -16
  151. package/dist/door/move-tool.d.ts.map +1 -1
  152. package/dist/door/move-tool.js +60 -16
  153. package/dist/door/paint.d.ts +2 -7
  154. package/dist/door/paint.d.ts.map +1 -1
  155. package/dist/door/paint.js +26 -2
  156. package/dist/door/panel.d.ts.map +1 -1
  157. package/dist/door/panel.js +242 -90
  158. package/dist/door/parametrics.js +1 -1
  159. package/dist/door/placement.d.ts.map +1 -1
  160. package/dist/door/placement.js +9 -2
  161. package/dist/door/swing.d.ts +22 -0
  162. package/dist/door/swing.d.ts.map +1 -0
  163. package/dist/door/swing.js +36 -0
  164. package/dist/door/tool.d.ts.map +1 -1
  165. package/dist/door/tool.js +76 -29
  166. package/dist/dormer/panel-actions-section.d.ts.map +1 -1
  167. package/dist/dormer/panel-actions-section.js +3 -1
  168. package/dist/dormer/panel-position-section.d.ts.map +1 -1
  169. package/dist/dormer/panel-position-section.js +4 -3
  170. package/dist/dormer/panel-windows-section.d.ts.map +1 -1
  171. package/dist/dormer/panel-windows-section.js +38 -1
  172. package/dist/dormer/panel.d.ts.map +1 -1
  173. package/dist/dormer/panel.js +24 -18
  174. package/dist/downspout/inspector-editors.d.ts.map +1 -1
  175. package/dist/downspout/inspector-editors.js +3 -2
  176. package/dist/duct-fitting/inspector-editors.d.ts.map +1 -1
  177. package/dist/duct-fitting/inspector-editors.js +6 -1
  178. package/dist/duct-fitting/tool.d.ts.map +1 -1
  179. package/dist/duct-fitting/tool.js +11 -2
  180. package/dist/duct-terminal/tool.d.ts.map +1 -1
  181. package/dist/duct-terminal/tool.js +11 -2
  182. package/dist/elevator/panel.d.ts.map +1 -1
  183. package/dist/elevator/panel.js +41 -18
  184. package/dist/eyebrow-vent/panel.d.ts.map +1 -1
  185. package/dist/eyebrow-vent/panel.js +16 -6
  186. package/dist/fence/drafting.d.ts +2 -3
  187. package/dist/fence/drafting.d.ts.map +1 -1
  188. package/dist/fence/drafting.js +2 -3
  189. package/dist/fence/inspector-editors.d.ts.map +1 -1
  190. package/dist/fence/inspector-editors.js +64 -21
  191. package/dist/fence/move-endpoint-tool.d.ts.map +1 -1
  192. package/dist/fence/move-endpoint-tool.js +11 -2
  193. package/dist/fence/system.d.ts.map +1 -1
  194. package/dist/fence/system.js +13 -0
  195. package/dist/fence-feature/actions.d.ts.map +1 -1
  196. package/dist/fence-feature/actions.js +5 -2
  197. package/dist/fence-feature/inspector.d.ts.map +1 -1
  198. package/dist/fence-feature/inspector.js +150 -34
  199. package/dist/fence-feature/move-session.d.ts +1 -1
  200. package/dist/floor-opening/floorplan.d.ts +29 -6
  201. package/dist/floor-opening/floorplan.d.ts.map +1 -1
  202. package/dist/floor-opening/floorplan.js +172 -14
  203. package/dist/gutter/downspouts-panel.d.ts.map +1 -1
  204. package/dist/gutter/downspouts-panel.js +14 -2
  205. package/dist/hvac-equipment/tool.d.ts.map +1 -1
  206. package/dist/hvac-equipment/tool.js +3 -2
  207. package/dist/i18n/definition-messages.d.ts +5 -0
  208. package/dist/i18n/definition-messages.d.ts.map +1 -0
  209. package/dist/i18n/definition-messages.js +771 -0
  210. package/dist/index.d.ts +4 -1
  211. package/dist/index.d.ts.map +1 -1
  212. package/dist/index.js +6 -1
  213. package/dist/item/authored-params.d.ts.map +1 -1
  214. package/dist/item/authored-params.js +19 -4
  215. package/dist/item/floorplan.d.ts +1 -1
  216. package/dist/item/floorplan.d.ts.map +1 -1
  217. package/dist/item/panel.d.ts.map +1 -1
  218. package/dist/item/panel.js +9 -7
  219. package/dist/liquid-line/tool.d.ts.map +1 -1
  220. package/dist/liquid-line/tool.js +10 -3
  221. package/dist/measurement/tool.d.ts +1 -1
  222. package/dist/measurement/tool.d.ts.map +1 -1
  223. package/dist/measurement/tool.js +8 -8
  224. package/dist/pipe-fitting/tool.d.ts.map +1 -1
  225. package/dist/pipe-fitting/tool.js +3 -2
  226. package/dist/pipe-trap/tool.d.ts.map +1 -1
  227. package/dist/pipe-trap/tool.js +7 -2
  228. package/dist/procedural-item/renderer.d.ts.map +1 -1
  229. package/dist/procedural-item/renderer.js +8 -1
  230. package/dist/ridge-vent/panel.d.ts.map +1 -1
  231. package/dist/ridge-vent/panel.js +22 -9
  232. package/dist/roof/barrel-panel.d.ts.map +1 -1
  233. package/dist/roof/barrel-panel.js +7 -3
  234. package/dist/roof/definition.d.ts.map +1 -1
  235. package/dist/roof/definition.js +33 -3
  236. package/dist/roof/floorplan-overrides.d.ts +22 -0
  237. package/dist/roof/floorplan-overrides.d.ts.map +1 -0
  238. package/dist/roof/floorplan-overrides.js +46 -0
  239. package/dist/roof/floorplan-tool.d.ts +9 -0
  240. package/dist/roof/floorplan-tool.d.ts.map +1 -0
  241. package/dist/roof/floorplan-tool.js +168 -0
  242. package/dist/roof/floorplan.d.ts.map +1 -1
  243. package/dist/roof/floorplan.js +131 -41
  244. package/dist/roof/glazing-controls.d.ts +2 -1
  245. package/dist/roof/glazing-controls.d.ts.map +1 -1
  246. package/dist/roof/glazing-controls.js +51 -13
  247. package/dist/roof/glazing-panel-editor.d.ts.map +1 -1
  248. package/dist/roof/glazing-panel-editor.js +40 -13
  249. package/dist/roof/glazing-panel.d.ts.map +1 -1
  250. package/dist/roof/glazing-panel.js +73 -9
  251. package/dist/roof/paint.d.ts +19 -0
  252. package/dist/roof/paint.d.ts.map +1 -0
  253. package/dist/roof/paint.js +158 -0
  254. package/dist/roof/panel.d.ts.map +1 -1
  255. package/dist/roof/panel.js +90 -22
  256. package/dist/roof/renderer.d.ts.map +1 -1
  257. package/dist/roof/renderer.js +13 -2
  258. package/dist/roof/roof-footprint-source.d.ts +17 -0
  259. package/dist/roof/roof-footprint-source.d.ts.map +1 -1
  260. package/dist/roof/roof-footprint-source.js +14 -0
  261. package/dist/roof/roof-footprint.d.ts +36 -2
  262. package/dist/roof/roof-footprint.d.ts.map +1 -1
  263. package/dist/roof/roof-footprint.js +124 -2
  264. package/dist/roof/roof-materials.d.ts.map +1 -1
  265. package/dist/roof/roof-materials.js +10 -1
  266. package/dist/roof/roof-placement-mode.d.ts +0 -2
  267. package/dist/roof/roof-placement-mode.d.ts.map +1 -1
  268. package/dist/roof/roof-placement-mode.js +8 -6
  269. package/dist/roof/roof-plan-creases.d.ts +50 -0
  270. package/dist/roof/roof-plan-creases.d.ts.map +1 -0
  271. package/dist/roof/roof-plan-creases.js +194 -0
  272. package/dist/roof/roof-ridge-mode.d.ts +20 -0
  273. package/dist/roof/roof-ridge-mode.d.ts.map +1 -0
  274. package/dist/roof/roof-ridge-mode.js +16 -0
  275. package/dist/roof/tool.d.ts +17 -4
  276. package/dist/roof/tool.d.ts.map +1 -1
  277. package/dist/roof/tool.js +211 -113
  278. package/dist/roof/wall-catch.d.ts +106 -0
  279. package/dist/roof/wall-catch.d.ts.map +1 -0
  280. package/dist/roof/wall-catch.js +267 -0
  281. package/dist/roof-segment/build-up-section.d.ts +9 -0
  282. package/dist/roof-segment/build-up-section.d.ts.map +1 -0
  283. package/dist/roof-segment/build-up-section.js +191 -0
  284. package/dist/roof-segment/definition.d.ts.map +1 -1
  285. package/dist/roof-segment/definition.js +50 -5
  286. package/dist/roof-segment/floorplan-affordances.d.ts.map +1 -1
  287. package/dist/roof-segment/floorplan-affordances.js +68 -19
  288. package/dist/roof-segment/floorplan.d.ts.map +1 -1
  289. package/dist/roof-segment/floorplan.js +16 -12
  290. package/dist/roof-segment/paint.d.ts +3 -1
  291. package/dist/roof-segment/paint.d.ts.map +1 -1
  292. package/dist/roof-segment/paint.js +43 -2
  293. package/dist/roof-segment/panel-model.d.ts +23 -0
  294. package/dist/roof-segment/panel-model.d.ts.map +1 -0
  295. package/dist/roof-segment/panel-model.js +64 -0
  296. package/dist/roof-segment/panel.d.ts.map +1 -1
  297. package/dist/roof-segment/panel.js +96 -14
  298. package/dist/roof-segment/parametrics.d.ts.map +1 -1
  299. package/dist/roof-segment/parametrics.js +4 -0
  300. package/dist/roof-segment/renderer.d.ts.map +1 -1
  301. package/dist/roof-segment/renderer.js +26 -5
  302. package/dist/separator/definition.d.ts.map +1 -1
  303. package/dist/separator/definition.js +10 -12
  304. package/dist/separator/floorplan-affordances.d.ts +9 -0
  305. package/dist/separator/floorplan-affordances.d.ts.map +1 -0
  306. package/dist/separator/floorplan-affordances.js +23 -0
  307. package/dist/separator/floorplan.d.ts +9 -0
  308. package/dist/separator/floorplan.d.ts.map +1 -0
  309. package/dist/separator/floorplan.js +54 -0
  310. package/dist/separator/renderer.d.ts +4 -0
  311. package/dist/separator/renderer.d.ts.map +1 -1
  312. package/dist/separator/renderer.js +21 -6
  313. package/dist/separator/selection.d.ts +10 -0
  314. package/dist/separator/selection.d.ts.map +1 -0
  315. package/dist/separator/selection.js +35 -0
  316. package/dist/shared/build-up-controls.d.ts +88 -0
  317. package/dist/shared/build-up-controls.d.ts.map +1 -0
  318. package/dist/shared/build-up-controls.js +139 -0
  319. package/dist/shared/curtain-opening-limits.d.ts.map +1 -1
  320. package/dist/shared/curtain-opening-limits.js +44 -14
  321. package/dist/shared/item-interaction-actions.d.ts.map +1 -1
  322. package/dist/shared/item-interaction-actions.js +11 -2
  323. package/dist/shared/layer-thickness.d.ts +2 -0
  324. package/dist/shared/layer-thickness.d.ts.map +1 -0
  325. package/dist/shared/layer-thickness.js +3 -0
  326. package/dist/shared/move-roof-tool.d.ts.map +1 -1
  327. package/dist/shared/move-roof-tool.js +100 -5
  328. package/dist/shared/node-batch/batchable.d.ts +2 -0
  329. package/dist/shared/node-batch/batchable.d.ts.map +1 -1
  330. package/dist/shared/node-batch/batchable.js +4 -0
  331. package/dist/shared/node-batch/candidates.d.ts +21 -5
  332. package/dist/shared/node-batch/candidates.d.ts.map +1 -1
  333. package/dist/shared/node-batch/candidates.js +85 -50
  334. package/dist/shared/node-batch/system.d.ts.map +1 -1
  335. package/dist/shared/node-batch/system.js +24 -15
  336. package/dist/shared/opening-casing-move.d.ts +16 -0
  337. package/dist/shared/opening-casing-move.d.ts.map +1 -0
  338. package/dist/shared/opening-casing-move.js +33 -0
  339. package/dist/shared/opening-casing-section.d.ts +15 -0
  340. package/dist/shared/opening-casing-section.d.ts.map +1 -0
  341. package/dist/shared/opening-casing-section.js +38 -0
  342. package/dist/shared/opening-casing.d.ts +26 -0
  343. package/dist/shared/opening-casing.d.ts.map +1 -0
  344. package/dist/shared/opening-casing.js +80 -0
  345. package/dist/shared/opening-depth-position.d.ts +13 -0
  346. package/dist/shared/opening-depth-position.d.ts.map +1 -0
  347. package/dist/shared/opening-depth-position.js +34 -0
  348. package/dist/shared/opening-documentation.d.ts.map +1 -1
  349. package/dist/shared/opening-documentation.js +17 -8
  350. package/dist/shared/opening-guides-runtime.d.ts +2 -1
  351. package/dist/shared/opening-guides-runtime.d.ts.map +1 -1
  352. package/dist/shared/opening-guides-runtime.js +11 -7
  353. package/dist/shared/opening-labels.d.ts +11 -0
  354. package/dist/shared/opening-labels.d.ts.map +1 -0
  355. package/dist/shared/opening-labels.js +46 -0
  356. package/dist/shared/opening-placement-dimensions.d.ts.map +1 -1
  357. package/dist/shared/opening-placement-dimensions.js +11 -9
  358. package/dist/shared/opening-plane-offset.d.ts +4 -3
  359. package/dist/shared/opening-plane-offset.d.ts.map +1 -1
  360. package/dist/shared/opening-plane-offset.js +7 -4
  361. package/dist/shared/opening-swap.d.ts +8 -0
  362. package/dist/shared/opening-swap.d.ts.map +1 -0
  363. package/dist/shared/opening-swap.js +18 -0
  364. package/dist/shared/polygon-vertex-affordance.d.ts +19 -0
  365. package/dist/shared/polygon-vertex-affordance.d.ts.map +1 -1
  366. package/dist/shared/polygon-vertex-affordance.js +65 -6
  367. package/dist/shared/roof-opening-host.d.ts +2 -1
  368. package/dist/shared/roof-opening-host.d.ts.map +1 -1
  369. package/dist/shared/roof-opening-host.js +14 -5
  370. package/dist/shared/roof-wall-opening-cut.d.ts.map +1 -1
  371. package/dist/shared/roof-wall-opening-cut.js +14 -6
  372. package/dist/shared/roof-wall-opening-placement.d.ts +2 -1
  373. package/dist/shared/roof-wall-opening-placement.d.ts.map +1 -1
  374. package/dist/shared/roof-wall-opening-placement.js +6 -4
  375. package/dist/shared/run-hanger-inspector.d.ts.map +1 -1
  376. package/dist/shared/run-hanger-inspector.js +39 -5
  377. package/dist/shared/system-check-panel.d.ts.map +1 -1
  378. package/dist/shared/system-check-panel.js +94 -15
  379. package/dist/shared/wall-attach-target.d.ts.map +1 -1
  380. package/dist/shared/wall-attach-target.js +6 -3
  381. package/dist/shelf/definition.d.ts.map +1 -1
  382. package/dist/shelf/definition.js +2 -0
  383. package/dist/site/ground-hole.d.ts +3 -3
  384. package/dist/site/ground-hole.js +3 -3
  385. package/dist/site/ground-veil.d.ts +5 -12
  386. package/dist/site/ground-veil.d.ts.map +1 -1
  387. package/dist/site/ground-veil.js +9 -33
  388. package/dist/site/panel.d.ts.map +1 -1
  389. package/dist/site/panel.js +52 -12
  390. package/dist/site/renderer.d.ts.map +1 -1
  391. package/dist/site/renderer.js +52 -23
  392. package/dist/skylight/panel.d.ts.map +1 -1
  393. package/dist/skylight/panel.js +49 -19
  394. package/dist/slab/deck-geometry.d.ts +28 -0
  395. package/dist/slab/deck-geometry.d.ts.map +1 -0
  396. package/dist/slab/deck-geometry.js +320 -0
  397. package/dist/slab/definition.d.ts +2 -1
  398. package/dist/slab/definition.d.ts.map +1 -1
  399. package/dist/slab/definition.js +6 -1
  400. package/dist/slab/dependency-tracker.d.ts.map +1 -1
  401. package/dist/slab/dependency-tracker.js +3 -0
  402. package/dist/slab/floorplan-affordances.d.ts +500 -0
  403. package/dist/slab/floorplan-affordances.d.ts.map +1 -1
  404. package/dist/slab/geometry.d.ts.map +1 -1
  405. package/dist/slab/geometry.js +46 -9
  406. package/dist/slab/panel.d.ts.map +1 -1
  407. package/dist/slab/panel.js +97 -21
  408. package/dist/slab/renderer.d.ts +11 -0
  409. package/dist/slab/renderer.d.ts.map +1 -0
  410. package/dist/slab/renderer.js +19 -0
  411. package/dist/slab/system.d.ts.map +1 -1
  412. package/dist/slab/system.js +12 -1
  413. package/dist/solar-panel/panel.d.ts.map +1 -1
  414. package/dist/solar-panel/panel.js +49 -14
  415. package/dist/stair/construction-controls.d.ts +3 -1
  416. package/dist/stair/construction-controls.d.ts.map +1 -1
  417. package/dist/stair/construction-controls.js +75 -12
  418. package/dist/stair/paint.d.ts +6 -0
  419. package/dist/stair/paint.d.ts.map +1 -1
  420. package/dist/stair/panel.d.ts.map +1 -1
  421. package/dist/stair/panel.js +243 -51
  422. package/dist/stair/parametrics.d.ts.map +1 -1
  423. package/dist/stair/parametrics.js +7 -0
  424. package/dist/stair/placement-defaults.d.ts +18 -0
  425. package/dist/stair/placement-defaults.d.ts.map +1 -0
  426. package/dist/stair/placement-defaults.js +27 -0
  427. package/dist/stair/railing-controls.d.ts.map +1 -1
  428. package/dist/stair/railing-controls.js +78 -18
  429. package/dist/stair/renderer.d.ts.map +1 -1
  430. package/dist/stair/renderer.js +16 -10
  431. package/dist/stair/structure-controls.d.ts +18 -0
  432. package/dist/stair/structure-controls.d.ts.map +1 -0
  433. package/dist/stair/structure-controls.js +275 -0
  434. package/dist/stair/tool.d.ts.map +1 -1
  435. package/dist/stair/tool.js +13 -9
  436. package/dist/stair/use-stair-render-data.d.ts +41 -0
  437. package/dist/stair/use-stair-render-data.d.ts.map +1 -1
  438. package/dist/stair-segment/panel.d.ts.map +1 -1
  439. package/dist/stair-segment/panel.js +65 -18
  440. package/dist/turbine-vent/panel.d.ts.map +1 -1
  441. package/dist/turbine-vent/panel.js +14 -5
  442. package/dist/unit/unit-panel.d.ts.map +1 -1
  443. package/dist/unit/unit-panel.js +28 -12
  444. package/dist/wall/actions.d.ts +1 -1
  445. package/dist/wall/actions.d.ts.map +1 -1
  446. package/dist/wall/actions.js +17 -13
  447. package/dist/wall/construction-dimensions.d.ts +6 -0
  448. package/dist/wall/construction-dimensions.d.ts.map +1 -1
  449. package/dist/wall/construction-dimensions.js +8 -0
  450. package/dist/wall/contextual-dimensions.d.ts +6 -0
  451. package/dist/wall/contextual-dimensions.d.ts.map +1 -1
  452. package/dist/wall/contextual-dimensions.js +104 -17
  453. package/dist/wall/curtain-opening-frame.d.ts.map +1 -1
  454. package/dist/wall/curtain-opening-frame.js +6 -4
  455. package/dist/wall/curtain-wall-layout.d.ts +1 -1
  456. package/dist/wall/curtain-wall-layout.d.ts.map +1 -1
  457. package/dist/wall/curtain-wall-layout.js +6 -4
  458. package/dist/wall/curtain-wall-materials.d.ts.map +1 -1
  459. package/dist/wall/curtain-wall-materials.js +8 -3
  460. package/dist/wall/curtain-wall-panel.d.ts.map +1 -1
  461. package/dist/wall/curtain-wall-panel.js +241 -37
  462. package/dist/wall/curve-tool.d.ts.map +1 -1
  463. package/dist/wall/curve-tool.js +2 -3
  464. package/dist/wall/definition.d.ts.map +1 -1
  465. package/dist/wall/definition.js +20 -5
  466. package/dist/wall/floorplan-affordances.d.ts.map +1 -1
  467. package/dist/wall/floorplan-affordances.js +9 -6
  468. package/dist/wall/floorplan-move.d.ts.map +1 -1
  469. package/dist/wall/floorplan-move.js +66 -16
  470. package/dist/wall/floorplan.d.ts +4 -5
  471. package/dist/wall/floorplan.d.ts.map +1 -1
  472. package/dist/wall/floorplan.js +62 -46
  473. package/dist/wall/move-endpoint-tool.d.ts.map +1 -1
  474. package/dist/wall/move-endpoint-tool.js +1 -0
  475. package/dist/wall/move-tool.d.ts.map +1 -1
  476. package/dist/wall/move-tool.js +77 -12
  477. package/dist/wall/paint.d.ts +2 -2
  478. package/dist/wall/paint.d.ts.map +1 -1
  479. package/dist/wall/paint.js +11 -4
  480. package/dist/wall/panel-model.d.ts +17 -2
  481. package/dist/wall/panel-model.d.ts.map +1 -1
  482. package/dist/wall/panel-model.js +158 -18
  483. package/dist/wall/panel.d.ts +8 -0
  484. package/dist/wall/panel.d.ts.map +1 -1
  485. package/dist/wall/panel.js +228 -156
  486. package/dist/wall/parametrics.d.ts +1 -1
  487. package/dist/wall/parametrics.d.ts.map +1 -1
  488. package/dist/wall/parametrics.js +14 -1
  489. package/dist/wall/railing-wall-adapter.d.ts +7 -0
  490. package/dist/wall/railing-wall-adapter.d.ts.map +1 -0
  491. package/dist/wall/railing-wall-adapter.js +38 -0
  492. package/dist/wall/railing-wall-floorplan.d.ts +8 -0
  493. package/dist/wall/railing-wall-floorplan.d.ts.map +1 -0
  494. package/dist/wall/railing-wall-floorplan.js +27 -0
  495. package/dist/wall/railing-wall-geometry.d.ts +12 -0
  496. package/dist/wall/railing-wall-geometry.d.ts.map +1 -0
  497. package/dist/wall/railing-wall-geometry.js +51 -0
  498. package/dist/wall/railing-wall-guard.d.ts +81 -0
  499. package/dist/wall/railing-wall-guard.d.ts.map +1 -0
  500. package/dist/wall/railing-wall-guard.js +435 -0
  501. package/dist/wall/railing-wall-materials.d.ts +11 -0
  502. package/dist/wall/railing-wall-materials.d.ts.map +1 -0
  503. package/dist/wall/railing-wall-materials.js +31 -0
  504. package/dist/wall/railing-wall-panel-model.d.ts +30 -0
  505. package/dist/wall/railing-wall-panel-model.d.ts.map +1 -0
  506. package/dist/wall/railing-wall-panel-model.js +117 -0
  507. package/dist/wall/railing-wall-panel.d.ts +17 -0
  508. package/dist/wall/railing-wall-panel.d.ts.map +1 -0
  509. package/dist/wall/railing-wall-panel.js +42 -0
  510. package/dist/wall/rectangle-command.d.ts +79 -1
  511. package/dist/wall/rectangle-command.d.ts.map +1 -1
  512. package/dist/wall/rectangle-tool.d.ts.map +1 -1
  513. package/dist/wall/rectangle-tool.js +2 -0
  514. package/dist/wall/renderer.d.ts.map +1 -1
  515. package/dist/wall/renderer.js +3 -1
  516. package/dist/wall/skirting-floor-gaps.d.ts +8 -0
  517. package/dist/wall/skirting-floor-gaps.d.ts.map +1 -0
  518. package/dist/wall/skirting-floor-gaps.js +36 -0
  519. package/dist/wall/system.d.ts +0 -14
  520. package/dist/wall/system.d.ts.map +1 -1
  521. package/dist/wall/system.js +6 -1
  522. package/dist/wall/tool.d.ts +16 -0
  523. package/dist/wall/tool.d.ts.map +1 -1
  524. package/dist/wall/tool.js +160 -47
  525. package/dist/wall/treatments.d.ts +3 -0
  526. package/dist/wall/treatments.d.ts.map +1 -1
  527. package/dist/wall/treatments.js +30 -7
  528. package/dist/window/actions.d.ts +7 -0
  529. package/dist/window/actions.d.ts.map +1 -0
  530. package/dist/window/actions.js +29 -0
  531. package/dist/window/definition.d.ts.map +1 -1
  532. package/dist/window/definition.js +11 -2
  533. package/dist/window/floorplan-move.d.ts.map +1 -1
  534. package/dist/window/floorplan-move.js +5 -0
  535. package/dist/window/floorplan.d.ts +2 -0
  536. package/dist/window/floorplan.d.ts.map +1 -1
  537. package/dist/window/floorplan.js +58 -1
  538. package/dist/window/mechanism.d.ts.map +1 -1
  539. package/dist/window/mechanism.js +21 -1
  540. package/dist/window/move-tool.d.ts.map +1 -1
  541. package/dist/window/move-tool.js +10 -3
  542. package/dist/window/paint.d.ts +2 -7
  543. package/dist/window/paint.d.ts.map +1 -1
  544. package/dist/window/paint.js +31 -3
  545. package/dist/window/panel.d.ts.map +1 -1
  546. package/dist/window/panel.js +311 -69
  547. package/dist/window/placement.d.ts.map +1 -1
  548. package/dist/window/placement.js +5 -1
  549. package/dist/window/swing.d.ts +13 -0
  550. package/dist/window/swing.d.ts.map +1 -0
  551. package/dist/window/swing.js +16 -0
  552. package/dist/window/tool.d.ts.map +1 -1
  553. package/dist/window/tool.js +19 -14
  554. package/dist/zone/floorplan-affordances.d.ts +136 -0
  555. package/dist/zone/floorplan-affordances.d.ts.map +1 -1
  556. package/dist/zone/quantities-panel.d.ts.map +1 -1
  557. package/dist/zone/quantities-panel.js +34 -9
  558. package/dist/zone/renderer.d.ts.map +1 -1
  559. package/dist/zone/renderer.js +9 -5
  560. package/package.json +14 -14
  561. package/dist/site/generic-foundation-geometry.d.ts +0 -16
  562. package/dist/site/generic-foundation-geometry.d.ts.map +0 -1
  563. package/dist/site/generic-foundation-geometry.js +0 -75
  564. package/dist/site/generic-foundation.d.ts +0 -4
  565. package/dist/site/generic-foundation.d.ts.map +0 -1
  566. package/dist/site/generic-foundation.js +0 -91
@@ -1,14 +1,17 @@
1
1
  'use client';
2
2
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { cornerPair, fusesAtCorner, runAsSingleSceneHistoryStep, scriptImages, useInteractive, useScene, } from '@pascal-app/core';
3
+ import { cornerPair, fusesAtCorner, isAutoFrameDepth, openingExteriorFace, openingHostFacing, resolveHostedOpeningFrameDepth, resolveOpeningCasingHost, runAsSingleSceneHistoryStep, scriptImages, useInteractive, usePascalI18n, useScene, } from '@pascal-app/core';
4
4
  import { isAgentRefusal } from '@pascal-app/core/agent-tools';
5
- import { cornerPartnerUpdates, cornerSideWidth, getWindowStyleOverrides, SHAPED_WINDOW_TYPES, SILLLESS_WINDOW_TYPES, unwrapCorner, WINDOW_STYLE_CHOICES, WINDOW_STYLE_LABELS, windowStylesOf, windowTakesStyle, windowTypeChange, wrapCorner, } from '@pascal-app/core/building';
6
- import { ActionButton, ActionGroup, cn, duplicateNodeAndPickUp, PanelSection, PanelWrapper, SegmentedControl, SliderControl, ToggleControl, triggerSFX, useEditor, writeWindowChanges, } from '@pascal-app/editor';
5
+ import { cornerPartnerUpdates, cornerSideWidth, getWindowStyleOverrides, SHAPED_WINDOW_TYPES, SILLLESS_WINDOW_TYPES, unwrapCorner, WINDOW_STYLE_CHOICES, windowStylesOf, windowTakesStyle, windowTypeChange, wrapCorner, } from '@pascal-app/core/building';
6
+ import { ActionButton, ActionGroup, cn, duplicateNodeAndPickUp, FinishSwatch, PanelSection, PanelWrapper, SegmentedControl, SliderControl, ToggleControl, triggerSFX, useEditor, writeWindowChanges, } from '@pascal-app/editor';
7
7
  import { useViewer } from '@pascal-app/viewer';
8
8
  import { Copy, FlipHorizontal2, Move, Trash2 } from 'lucide-react';
9
9
  import { useCallback, useEffect, useMemo } from 'react';
10
10
  import { AuthoredParams } from '../item/authored-params.js';
11
11
  import { constrainCurtainOpening, curtainOpeningLimits } from '../shared/curtain-opening-limits.js';
12
+ import { OpeningCasingSection } from '../shared/opening-casing-section.js';
13
+ import { OpeningDepthPositionControl } from '../shared/opening-depth-position.js';
14
+ import { WINDOW_STYLE_MESSAGES, WINDOW_TYPE_MESSAGES } from '../shared/opening-labels.js';
12
15
  import { createOpeningPropertyPreview } from '../shared/opening-property-preview.js';
13
16
  import { openingPropertyPreviewHost } from '../shared/opening-property-preview-host.js';
14
17
  import { windowTypeOptions } from './placement.js';
@@ -32,6 +35,50 @@ function normalizeWindowCornerRadii(radii, width, height) {
32
35
  return next;
33
36
  return next.map((radius) => radius * scale);
34
37
  }
38
+ const INCH = 0.0254;
39
+ const MIN_SHUTTER_WIDTH = 0.15;
40
+ const MIN_ROLLER_BOX_HEIGHT = 0.12;
41
+ const MAX_ROLLER_BOX_HEIGHT = 0.35;
42
+ const DEFAULT_ROLLER_BOX_HEIGHT = 0.18;
43
+ // What the viewer draws for an inside sill without its own sizes (window-system `addWindowDetails`).
44
+ const INSIDE_SILL_DEPTH = 0.06;
45
+ const INSIDE_SILL_THICKNESS = 0.03;
46
+ const INSIDE_SILL_OVERHANG = 0.015;
47
+ // The declared slot defaults (packages/core/src/node-slots/window.ts), shown as "Default". The
48
+ // hardware follows the frame until it is painted.
49
+ const FRAME_FINISH_DEFAULT = 'library:preset-softwhite';
50
+ const SHUTTERS_FINISH_DEFAULT = 'library:preset-charcoal';
51
+ // What the viewer draws (window-system `addWindowDetails`): the handle and hinges on these sashes,
52
+ // the per-sash grid in these types, neither on a corner window.
53
+ const SASH_HARDWARE_TYPES = new Set([
54
+ 'casement',
55
+ 'awning',
56
+ 'hopper',
57
+ 'tilt-turn',
58
+ ]);
59
+ const SASH_GRID_TYPES = new Set([
60
+ 'casement',
61
+ 'sliding',
62
+ 'single-hung',
63
+ 'double-hung',
64
+ 'awning',
65
+ 'hopper',
66
+ 'tilt-turn',
67
+ ]);
68
+ /**
69
+ * Which way a casement or awning sash without `openingDirection` opens today: toward the face it
70
+ * was placed from (window-pose `poseWindowMovingParts`; an awning hinged at the bottom the other
71
+ * way), read against the exterior face.
72
+ */
73
+ function legacyOpeningDirection(node, nodes) {
74
+ const exterior = (openingExteriorFace(node, nodes) === 'a' ? 1 : -1) * openingHostFacing(node);
75
+ const placed = node.windowType === 'awning' && node.awningDirection === 'down' ? -1 : 1;
76
+ return placed * exterior > 0 ? 'outward' : 'inward';
77
+ }
78
+ /** A small caption over a row, as the door panel's Hinges side. */
79
+ function Captioned({ label, children }) {
80
+ return (_jsxs("div", { className: "space-y-1", children: [_jsx("span", { className: "px-1 font-medium text-[10px] text-muted-foreground/80 uppercase tracking-wider", children: label }), children] }));
81
+ }
35
82
  /** The Corner section's pill buttons: a token hover, the press, the keyboard focus ring. */
36
83
  const CORNER_BUTTON = 'outline-hidden transition-[background-color,scale] duration-150 hover:bg-foreground/[0.06] focus-visible:outline-2 focus-visible:outline-foreground/50 focus-visible:outline-offset-2 motion-safe:active:scale-[0.96]';
37
84
  /** A change to one side of a corner window that both share, made on its partner too. */
@@ -49,6 +96,7 @@ function syncCornerPartner(windowId, updates) {
49
96
  scene.dirtyNodes.add(parentId);
50
97
  }
51
98
  export default function WindowPanel() {
99
+ const i18n = usePascalI18n();
52
100
  const selectedId = useViewer((s) => s.selection.selectedIds[0]);
53
101
  const setSelection = useViewer((s) => s.setSelection);
54
102
  const deleteNode = useScene((s) => s.deleteNode);
@@ -58,6 +106,15 @@ export default function WindowPanel() {
58
106
  : null, [selectedId]);
59
107
  useEffect(() => () => preview?.cancel(), [preview]);
60
108
  const node = useScene((s) => selectedId ? s.nodes[selectedId] : undefined);
109
+ // The depth the frame renders at: explicit, or the host wall's thickness plus the lip.
110
+ const frameDepth = useScene((s) => (node ? resolveHostedOpeningFrameDepth(node, s.nodes) : 0));
111
+ // Shutters hang where casing can: not on a curtain wall, a dormer or a script's unit; nor on a
112
+ // roof's gable face or a corner window, where the second shutter has no wall beside it.
113
+ const takesShutters = useScene((s) => node?.type === 'window' &&
114
+ !node.roofSegmentId &&
115
+ !node.corner &&
116
+ resolveOpeningCasingHost(node, s.nodes) !== null);
117
+ const imperial = useViewer((s) => s.unit) === 'imperial';
61
118
  // Stable handler refs ("Custom panels" in wiki/architecture/node-definitions.md).
62
119
  // Without them, the 15+ SliderControls in this panel would loop on drag.
63
120
  const handleUpdate = useCallback((updates) => {
@@ -210,10 +267,17 @@ export default function WindowPanel() {
210
267
  const isOperableSashWindow = windowType === 'casement' ||
211
268
  windowType === 'awning' ||
212
269
  windowType === 'hopper' ||
270
+ windowType === 'tilt-turn' ||
213
271
  windowType === 'louvered';
214
272
  const isOperableWindow = isTrackSashWindow || isOperableSashWindow;
215
273
  const supportsWindowShape = SHAPED_WINDOW_TYPES.has(node.windowType ?? 'fixed');
216
- const supportsGrid = isFixedWindow;
274
+ const hasSashHardware = !node.corner && SASH_HARDWARE_TYPES.has(windowType);
275
+ // Curved sashes take no grid: the viewer draws it in rectangular ones only.
276
+ const takesSashGrid = !node.corner &&
277
+ SASH_GRID_TYPES.has(windowType) &&
278
+ (openingShape === 'rectangle' || !SHAPED_WINDOW_TYPES.has(windowType));
279
+ const supportsGrid = isFixedWindow || takesSashGrid;
280
+ const showGridDivisions = isFixedWindow || node.sashGrid === true;
217
281
  const supportsSill = !SILLLESS_WINDOW_TYPES.has(node.windowType);
218
282
  const showWindowTypeSection = !scripted && !isOpening;
219
283
  const windowStyles = windowStylesOf(node);
@@ -223,24 +287,46 @@ export default function WindowPanel() {
223
287
  const showGridSection = !scripted && !isOpening && supportsGrid;
224
288
  const showStyleSection = !scripted && !isOpening && windowTakesStyle(node.windowType);
225
289
  const showSillSection = !scripted && !isOpening && supportsSill;
290
+ const showHardwareSection = !scripted && !isOpening && hasSashHardware;
291
+ const showShuttersSection = !scripted && !isOpening && takesShutters;
292
+ const shutters = node.shutters ?? 'none';
293
+ const rollerShutter = node.rollerShutter ?? 'none';
294
+ // One shutter per side shares the window's width; a single shutter covers all of it.
295
+ const shutterWidth = node.shutterWidth ?? ((node.shutterSides ?? 'both') === 'both' ? node.width / 2 : node.width);
296
+ const maxShutterWidth = Math.max(node.width, MIN_SHUTTER_WIDTH);
297
+ const toShownLength = (meters) => (imperial ? meters / INCH : meters);
226
298
  const showOperationSection = !scripted && !isOpening && isOperableWindow;
227
299
  const showAwningDirectionSection = !scripted && !isOpening && displayedWindowType === 'awning';
228
300
  const showCasementSection = !scripted && !isOpening && windowType === 'casement';
301
+ const showTiltTurnSection = !scripted && !isOpening && windowType === 'tilt-turn';
302
+ // Casement and awning sashes open outward or inward; a saved window without the field keeps the
303
+ // way it opens today, toward the face it was placed from.
304
+ const showOpensRow = !scripted && !isOpening && (windowType === 'casement' || windowType === 'awning');
305
+ const openingDirection = node.openingDirection ?? legacyOpeningDirection(node, useScene.getState().nodes);
229
306
  const showFlipSide = !isOpening;
230
307
  const operationLabel = isTrackSashWindow
231
308
  ? windowType === 'sliding'
232
- ? 'Slide'
233
- : 'Raise'
234
- : windowType === 'casement'
235
- ? 'Swing'
236
- : windowType === 'louvered'
237
- ? 'Slats'
238
- : 'Tilt';
309
+ ? i18n._({ id: 'node.window.operation.slide', message: 'Slide' })
310
+ : i18n._({ id: 'node.window.operation.raise', message: 'Raise' })
311
+ : windowType === 'tilt-turn'
312
+ ? i18n._(WINDOW_TYPE_MESSAGES['tilt-turn'])
313
+ : windowType === 'casement'
314
+ ? i18n._({ id: 'node.window.operation.swing', message: 'Swing' })
315
+ : windowType === 'louvered'
316
+ ? i18n._({ id: 'node.window.operation.slats', message: 'Slats' })
317
+ : i18n._({ id: 'node.window.operation.tilt', message: 'Tilt' });
239
318
  const setOperationState = (value) => {
240
- useInteractive.getState().cancelWindowAnimation(node.id);
241
- useInteractive.getState().removeWindowOpenState(node.id);
319
+ useInteractive.getState().cancelWindowAnimation(node.id, 'operationState');
320
+ useInteractive.getState().removeWindowOpenState(node.id, 'operationState');
242
321
  handleUpdate({ operationState: Math.max(0, Math.min(1, value)) });
243
322
  };
323
+ const setShutterState = (field, value) => {
324
+ const interactive = useInteractive.getState();
325
+ interactive.cancelWindowAnimation(node.id, field);
326
+ interactive.removeWindowOpenState(node.id, field);
327
+ interactive.removeMechanismPart(node.id, 'shutters');
328
+ handleUpdate({ [field]: Math.max(0, Math.min(100, value)) / 100 });
329
+ };
244
330
  const getDimensionUpdates = (updates) => {
245
331
  const nextWidth = updates.width ?? node.width;
246
332
  const nextHeight = updates.height ?? node.height;
@@ -299,7 +385,7 @@ export default function WindowPanel() {
299
385
  });
300
386
  handleUpdate({ rowRatios: newRatios });
301
387
  };
302
- return (_jsxs(PanelWrapper, { icon: scriptImages(node)?.thumbnail ?? '/icons/window.webp', onClose: handleClose, title: node.name || 'Window', width: 320, children: [!scripted && (_jsx(PanelSection, { title: "Type", children: _jsx(SegmentedControl, { onChange: (value) => handleUpdate({
388
+ return (_jsxs(PanelWrapper, { icon: scriptImages(node)?.thumbnail ?? '/icons/window.webp', onClose: handleClose, title: node.name || i18n._({ id: 'node.window.panel.window', message: 'Window' }), width: 320, children: [!scripted && (_jsx(PanelSection, { title: i18n._({ id: 'node.window.panel.type', message: 'Type' }), children: _jsx(SegmentedControl, { onChange: (value) => handleUpdate({
303
389
  openingKind: value,
304
390
  ...(value === 'opening'
305
391
  ? {
@@ -312,34 +398,58 @@ export default function WindowPanel() {
312
398
  }
313
399
  : {}),
314
400
  }), options: [
315
- { value: 'window', label: 'Window' },
316
- { value: 'opening', label: 'Opening' },
317
- ], value: node.openingKind ?? 'window' }) })), showWindowTypeSection && (_jsxs(PanelSection, { title: "Window Type", children: [_jsx("div", { className: "grid grid-cols-2 gap-2 px-1 pt-1", children: windowTypeOptions.map((option) => {
318
- const isSelected = displayedWindowType === option.value;
319
- return (_jsx("button", { className: cn('flex min-h-12 items-center rounded-lg border px-3 py-2.5 text-left text-xs transition-colors', isSelected
320
- ? 'border-orange-400/60 bg-orange-400/10 text-foreground'
321
- : 'border-border/50 bg-black/4 dark:bg-[#2C2C2E] text-muted-foreground hover:bg-black/8 dark:hover:bg-[#3e3e3e] hover:text-foreground'), onClick: () => handleUpdate({
322
- ...windowTypeChange(node, option.value),
323
- ...(option.value === 'awning' ? { awningDirection } : {}),
324
- }), type: "button", children: _jsx("span", { className: "truncate font-medium", children: option.label }) }, option.value));
325
- }) }), showAwningDirectionSection && (_jsx("div", { className: "mt-2", children: _jsx(SegmentedControl, { onChange: (value) => handleUpdate({
326
- windowType: 'awning',
327
- awningDirection: value,
328
- }), options: [
329
- { value: 'up', label: 'Up' },
330
- { value: 'down', label: 'Down' },
331
- ], value: awningDirection }) })), showCasementSection && (_jsxs("div", { className: "mt-2 space-y-2", children: [_jsx(SegmentedControl, { onChange: (value) => handleUpdate({ casementStyle: value }), options: [
332
- { value: 'single', label: 'Single' },
333
- { value: 'french', label: 'French' },
334
- ], value: node.casementStyle ?? 'single' }), (node.casementStyle ?? 'single') === 'single' && (_jsx(SegmentedControl, { onChange: (value) => handleUpdate({ hingesSide: value }), options: [
335
- { value: 'left', label: 'Left' },
336
- { value: 'right', label: 'Right' },
337
- ], value: node.hingesSide ?? 'left' }))] })), showOperationSection && (_jsx("div", { className: "mt-2", children: _jsx(SliderControl, { label: operationLabel, max: 1, min: 0, onChange: setOperationState, precision: 2, restoreOnCommit: false, step: 0.05, value: Math.round((node.operationState ?? 0) * 100) / 100 }) }))] })), showStyleSection && (_jsxs(PanelSection, { title: "Style", children: [_jsx("div", { className: "grid grid-cols-2 gap-2 px-1 pt-1", children: WINDOW_STYLE_CHOICES.map((style) => (_jsx("button", { "aria-pressed": windowStyles.includes(style), className: cn('flex min-h-10 items-center rounded-lg border px-3 py-2 text-left text-xs transition-colors', windowStyles.includes(style)
401
+ {
402
+ value: 'window',
403
+ label: i18n._({ id: 'node.window.panel.window', message: 'Window' }),
404
+ },
405
+ {
406
+ value: 'opening',
407
+ label: i18n._({ id: 'node.window.panel.opening', message: 'Opening' }),
408
+ },
409
+ ], value: node.openingKind ?? 'window' }) })), showWindowTypeSection && (_jsx(PanelSection, { title: i18n._({ id: 'node.window.panel.windowType', message: 'Window type' }), children: _jsx("div", { className: "grid grid-cols-2 gap-2 px-1 pt-1", children: windowTypeOptions.map((option) => {
410
+ const isSelected = displayedWindowType === option.value;
411
+ return (_jsx("button", { className: cn('flex min-h-12 items-center rounded-lg border px-3 py-2.5 text-left text-xs transition-colors', isSelected
338
412
  ? 'border-orange-400/60 bg-orange-400/10 text-foreground'
339
- : 'border-border/50 bg-black/4 dark:bg-[#2C2C2E] text-muted-foreground hover:bg-black/8 dark:hover:bg-[#3e3e3e] hover:text-foreground'), onClick: () => handleUpdate(getWindowStyleOverrides(style)), type: "button", children: _jsx("span", { className: "truncate font-medium", children: WINDOW_STYLE_LABELS[style] }) }, style))) }), !windowStyles.length && (_jsx("p", { className: "px-1 pt-2 text-muted-foreground text-xs", children: "Custom: the panes match no style." }))] })), corner && (_jsx(PanelSection, { title: "Corner", children: corner.paired ? (_jsxs("div", { className: "flex flex-col gap-2 px-1 pb-1", children: [_jsxs("div", { className: "flex items-center justify-between gap-2 text-xs", children: [_jsxs("span", { className: "text-muted-foreground", children: ["Wraps the corner with ", corner.partner.name || 'its partner'] }), _jsx("button", { className: cn('rounded-full border border-border/50 px-3 py-1 text-xs', CORNER_BUTTON), onClick: () => selectedId && writeWindows(unwrapCorner(useScene.getState().nodes, selectedId)), type: "button", children: "Unwrap" })] }), _jsx(SliderControl, { label: "This side", min: 0.1, onChange: (v) => selectedId && setCornerWidth(selectedId, v), precision: 2, step: 0.05, unit: "m", value: node.width }), _jsx(SliderControl, { label: "Other side", min: 0.1, onChange: (v) => setCornerWidth(corner.partner.id, v), precision: 2, step: 0.05, unit: "m", value: corner.partner.width }), fusesAtCorner(node) && (_jsx(SegmentedControl, { onChange: setCornerPost, options: [
340
- { label: 'Fused glass', value: 'none' },
341
- { label: 'Corner post', value: 'post' },
342
- ], value: node.corner?.post ?? 'none' }))] })) : (_jsx("div", { className: "px-1 pb-1", children: _jsx("button", { className: cn('w-full rounded-full border border-border/50 px-3 py-2 text-xs', CORNER_BUTTON), onClick: wrapTheCorner, type: "button", children: "Wrap the corner" }) })) })), _jsxs(PanelSection, { title: "Position", children: [!corner?.paired && (_jsx(SliderControl, { label: _jsxs(_Fragment, { children: ["X", _jsx("sub", { className: "ml-[1px] text-[11px] opacity-70", children: "pos" })] }), onChange: (v) => handleUpdate({ position: [v, node.position[1], node.position[2]] }), precision: 2, step: 0.1, unit: "m", value: node.position[0] })), _jsx(SliderControl, { label: _jsxs(_Fragment, { children: ["Y", _jsx("sub", { className: "ml-[1px] text-[11px] opacity-70", children: "pos" })] }), onChange: (v) => handleUpdate({ position: [node.position[0], v, node.position[2]] }), precision: 2, step: 0.1, unit: "m", value: node.position[1] }), showFlipSide && (_jsx("div", { className: "px-1 pt-2 pb-1", children: _jsx(ActionButton, { className: "w-full", icon: _jsx(FlipHorizontal2, { className: "h-4 w-4" }), label: "Flip Side", onClick: handleFlip }) }))] }), scripted && _jsx(AuthoredParams, { node: node }), !scripted && (_jsxs(PanelSection, { title: "Dimensions", children: [limits && (_jsx("p", { className: "text-[11px] text-muted-foreground", children: "Size is limited to the wall, including clearance for the opening frame." })), !corner?.paired && (_jsx(SliderControl, { label: "Width", max: limits?.width, min: 0.01, onChange: (v) => preview?.preview(getDimensionUpdates({ width: v })), onCommit: (v) => preview?.commit(getDimensionUpdates({ width: v })), onCancel: () => preview?.cancel(), previewWhileTyping: true, precision: 2, restoreOnCommit: false, step: 0.01, unit: "m", value: node.width })), _jsx(SliderControl, { label: "Height", max: limits?.height, min: 0.01, onChange: (v) => preview?.preview(getDimensionUpdates({ height: v })), onCommit: (v) => commitPreview(getDimensionUpdates({ height: v })), onCancel: () => preview?.cancel(), previewWhileTyping: true, precision: 2, restoreOnCommit: false, step: 0.01, unit: "m", value: node.height })] })), showWindowShapeSection && (_jsxs(PanelSection, { title: "Top Shape", children: [_jsx(SegmentedControl, { onChange: (value) => handleUpdate({
413
+ : 'border-border/50 bg-black/4 dark:bg-[#2C2C2E] text-muted-foreground hover:bg-black/8 dark:hover:bg-[#3e3e3e] hover:text-foreground'), onClick: () => handleUpdate({
414
+ ...windowTypeChange(node, option.value),
415
+ ...(option.value === 'awning' ? { awningDirection } : {}),
416
+ }), type: "button", children: _jsx("span", { className: "truncate font-medium", children: i18n._(WINDOW_TYPE_MESSAGES[option.value]) }) }, option.value));
417
+ }) }) })), showStyleSection && (_jsxs(PanelSection, { title: i18n._({ id: 'node.window.panel.style', message: 'Style' }), children: [_jsx("div", { className: "grid grid-cols-2 gap-2 px-1 pt-1", children: WINDOW_STYLE_CHOICES.map((style) => (_jsx("button", { "aria-pressed": windowStyles.includes(style), className: cn('flex min-h-10 items-center rounded-lg border px-3 py-2 text-left text-xs transition-colors', windowStyles.includes(style)
418
+ ? 'border-orange-400/60 bg-orange-400/10 text-foreground'
419
+ : 'border-border/50 bg-black/4 dark:bg-[#2C2C2E] text-muted-foreground hover:bg-black/8 dark:hover:bg-[#3e3e3e] hover:text-foreground'), onClick: () => handleUpdate(getWindowStyleOverrides(style)), type: "button", children: _jsx("span", { className: "truncate font-medium", children: i18n._(WINDOW_STYLE_MESSAGES[style]) }) }, style))) }), !windowStyles.length && (_jsx("p", { className: "px-1 pt-2 text-muted-foreground text-xs", children: i18n._({
420
+ id: 'node.window.panel.customThePanesMatchNoStyle',
421
+ message: 'Custom: the panes match no style.',
422
+ }) }))] })), !scripted && (_jsxs(PanelSection, { title: i18n._({ id: 'node.window.panel.dimensions', message: 'Dimensions' }), children: [limits && (_jsx("p", { className: "text-[11px] text-muted-foreground", children: i18n._({
423
+ id: 'node.window.panel.sizeIsLimitedToTheWall',
424
+ message: 'Size is limited to the wall, including clearance for the opening frame.',
425
+ }) })), !corner?.paired && (_jsx(SliderControl, { label: i18n._({ id: 'node.window.panel.width', message: 'Width' }), max: limits?.width, min: 0.01, onChange: (v) => preview?.preview(getDimensionUpdates({ width: v })), onCommit: (v) => preview?.commit(getDimensionUpdates({ width: v })), onCancel: () => preview?.cancel(), previewWhileTyping: true, precision: 2, restoreOnCommit: false, step: 0.01, unit: "m", value: node.width })), _jsx(SliderControl, { label: i18n._({ id: 'node.window.panel.height', message: 'Height' }), max: limits?.height, min: 0.01, onChange: (v) => preview?.preview(getDimensionUpdates({ height: v })), onCommit: (v) => commitPreview(getDimensionUpdates({ height: v })), onCancel: () => preview?.cancel(), previewWhileTyping: true, precision: 2, restoreOnCommit: false, step: 0.01, unit: "m", value: node.height })] })), _jsxs(PanelSection, { title: i18n._({ id: 'node.window.panel.position', message: 'Position' }), children: [!corner?.paired && (_jsx(SliderControl, { label: _jsxs(_Fragment, { children: ["X", _jsx("sub", { className: "ml-[1px] text-[11px] opacity-70", children: i18n._({ id: 'node.window.panel.pos', message: 'pos' }) })] }), onChange: (v) => handleUpdate({ position: [v, node.position[1], node.position[2]] }), precision: 2, step: 0.1, unit: "m", value: node.position[0] })), _jsx(SliderControl, { label: _jsxs(_Fragment, { children: ["Y", _jsx("sub", { className: "ml-[1px] text-[11px] opacity-70", children: i18n._({ id: 'node.window.panel.pos', message: 'pos' }) })] }), onChange: (v) => handleUpdate({ position: [node.position[0], v, node.position[2]] }), precision: 2, step: 0.1, unit: "m", value: node.position[1] }), showFlipSide && (_jsx("div", { className: "px-1 pt-2 pb-1", children: _jsx(ActionButton, { className: "w-full", icon: _jsx(FlipHorizontal2, { className: "h-4 w-4" }), label: i18n._({ id: 'node.window.panel.flipSide', message: 'Flip side' }), onClick: handleFlip }) }))] }), scripted && _jsx(AuthoredParams, { node: node }), showGridSection && (_jsxs(PanelSection, { title: i18n._({ id: 'node.window.panel.grid', message: 'Grid' }), children: [!isFixedWindow && (_jsx(ToggleControl, { checked: node.sashGrid === true, label: i18n._({
426
+ id: 'node.window.panel.divideEachSash',
427
+ message: 'Divide each sash',
428
+ }), onChange: (checked) => handleUpdate({ sashGrid: checked }) })), showGridDivisions && (_jsxs(_Fragment, { children: [_jsx(SliderControl, { label: i18n._({ id: 'node.window.panel.columns', message: 'Columns' }), max: 8, min: 1, onChange: (v) => {
429
+ const n = Math.max(1, Math.min(8, Math.round(v)));
430
+ handleUpdate({ columnRatios: Array(n).fill(1 / n) });
431
+ }, precision: 0, step: 1, value: numCols }), _jsx(SliderControl, { label: i18n._({ id: 'node.window.panel.rows', message: 'Rows' }), max: 8, min: 1, onChange: (v) => {
432
+ const n = Math.max(1, Math.min(8, Math.round(v)));
433
+ handleUpdate({ rowRatios: Array(n).fill(1 / n) });
434
+ }, precision: 0, step: 1, value: numRows }), numCols > 1 && (_jsxs("div", { className: "mt-2 flex flex-col gap-1", children: [_jsx("div", { className: "mb-1 px-1 font-medium text-[10px] text-muted-foreground/80 uppercase tracking-wider", children: i18n._({ id: 'node.window.panel.colWidths', message: 'Column widths' }) }), normCols.map((ratio, i) => (_jsx(SliderControl, { label: `C${i + 1}`, max: 95, min: 5, onChange: (v) => setColumnRatio(i, v / 100), precision: 1, step: 1, unit: "%", value: Math.round(ratio * 100 * 10) / 10 }, `c-${i}`))), _jsx("div", { className: "mt-1 border-border/50 border-t pt-1", children: _jsx(SliderControl, { label: i18n._({ id: 'node.window.panel.divider', message: 'Divider' }), max: 0.1, min: 0.005, onChange: (v) => handleUpdate({ columnDividerThickness: v }), precision: 3, step: 0.01, unit: "m", value: node.columnDividerThickness ?? 0.03 }) })] })), numRows > 1 && (_jsxs("div", { className: "mt-2 flex flex-col gap-1", children: [_jsx("div", { className: "mb-1 px-1 font-medium text-[10px] text-muted-foreground/80 uppercase tracking-wider", children: i18n._({ id: 'node.window.panel.rowHeights', message: 'Row heights' }) }), normRows.map((ratio, i) => (_jsx(SliderControl, { label: `R${i + 1}`, max: 95, min: 5, onChange: (v) => setRowRatio(i, v / 100), precision: 1, step: 1, unit: "%", value: Math.round(ratio * 100 * 10) / 10 }, `r-${i}`))), _jsx("div", { className: "mt-1 border-border/50 border-t pt-1", children: _jsx(SliderControl, { label: i18n._({ id: 'node.window.panel.divider', message: 'Divider' }), max: 0.1, min: 0.005, onChange: (v) => handleUpdate({ rowDividerThickness: v }), precision: 3, step: 0.01, unit: "m", value: node.rowDividerThickness ?? 0.03 }) })] }))] }))] })), corner && (_jsx(PanelSection, { title: i18n._({ id: 'node.window.panel.corner', message: 'Corner' }), children: corner.paired ? (_jsxs("div", { className: "flex flex-col gap-2 px-1 pb-1", children: [_jsxs("div", { className: "flex items-center justify-between gap-2 text-xs", children: [_jsx("span", { className: "text-muted-foreground", children: corner.partner.name
435
+ ? i18n._({
436
+ id: 'node.window.panel.wrapsTheCornerWithNamed',
437
+ message: 'Wraps the corner with {partner}',
438
+ values: { partner: corner.partner.name },
439
+ })
440
+ : i18n._({
441
+ id: 'node.window.panel.wrapsTheCornerWithPartner',
442
+ message: 'Wraps the corner with its partner',
443
+ }) }), _jsx("button", { className: cn('rounded-full border border-border/50 px-3 py-1 text-xs', CORNER_BUTTON), onClick: () => selectedId && writeWindows(unwrapCorner(useScene.getState().nodes, selectedId)), type: "button", children: i18n._({ id: 'node.window.panel.unwrap', message: 'Unwrap' }) })] }), _jsx(SliderControl, { label: i18n._({ id: 'node.window.panel.thisSide', message: 'This side' }), min: 0.1, onChange: (v) => selectedId && setCornerWidth(selectedId, v), precision: 2, step: 0.05, unit: "m", value: node.width }), _jsx(SliderControl, { label: i18n._({ id: 'node.window.panel.otherSide', message: 'Other side' }), min: 0.1, onChange: (v) => setCornerWidth(corner.partner.id, v), precision: 2, step: 0.05, unit: "m", value: corner.partner.width }), fusesAtCorner(node) && (_jsx(SegmentedControl, { onChange: setCornerPost, options: [
444
+ {
445
+ label: i18n._({ id: 'node.window.panel.fusedGlass', message: 'Fused glass' }),
446
+ value: 'none',
447
+ },
448
+ {
449
+ label: i18n._({ id: 'node.window.panel.cornerPost', message: 'Corner post' }),
450
+ value: 'post',
451
+ },
452
+ ], value: node.corner?.post ?? 'none' }))] })) : (_jsx("div", { className: "px-1 pb-1", children: _jsx("button", { className: cn('w-full rounded-full border border-border/50 px-3 py-2 text-xs', CORNER_BUTTON), onClick: wrapTheCorner, type: "button", children: i18n._({ id: 'node.window.panel.wrapTheCorner', message: 'Wrap the corner' }) }) })) })), showWindowShapeSection && (_jsxs(PanelSection, { title: i18n._({ id: 'node.window.panel.topShape', message: 'Top shape' }), children: [_jsx(SegmentedControl, { onChange: (value) => handleUpdate({
343
453
  openingShape: value,
344
454
  ...(value === 'rounded'
345
455
  ? {
@@ -352,34 +462,166 @@ export default function WindowPanel() {
352
462
  : {}),
353
463
  ...(value === 'arch' ? { archHeight } : {}),
354
464
  }), options: [
355
- { value: 'rectangle', label: 'Rect' },
356
- { value: 'rounded', label: 'Rounded' },
357
- { value: 'arch', label: 'Arch' },
465
+ {
466
+ value: 'rectangle',
467
+ label: i18n._({ id: 'node.window.panel.rect', message: 'Rect' }),
468
+ },
469
+ {
470
+ value: 'rounded',
471
+ label: i18n._({ id: 'node.window.panel.rounded', message: 'Rounded' }),
472
+ },
473
+ { value: 'arch', label: i18n._({ id: 'node.window.panel.arch', message: 'Arch' }) },
358
474
  ], value: windowShape }), windowShape === 'rounded' && (_jsxs("div", { className: "mt-2 flex flex-col gap-1", children: [_jsx(SegmentedControl, { onChange: (value) => handleUpdate({ openingRadiusMode: value }), options: [
359
- { value: 'all', label: 'All' },
360
- { value: 'individual', label: 'Individual' },
361
- ], value: openingRadiusMode }), openingRadiusMode === 'all' ? (_jsx(SliderControl, { label: "Corner Radius", max: maxRoundedRadius, min: 0, onChange: (value) => previewWindowUpdate('cornerRadius', value), onCommit: (value) => commitWindowPreview('cornerRadius', value), onCancel: () => preview?.cancel(), previewWhileTyping: true, restoreOnCommit: false, precision: 2, step: 0.05, unit: "m", value: cornerRadius })) : (_jsx(_Fragment, { children: [
362
- ['Top Left', 0],
363
- ['Top Right', 1],
364
- ['Bottom Right', 2],
365
- ['Bottom Left', 3],
366
- ].map(([label, index]) => (_jsx(SliderControl, { label: label, max: maxRoundedRadius, min: 0, onChange: (value) => setOpeningCornerRadius(index, value), onCommit: (value) => setOpeningCornerRadius(index, value, true), onCancel: () => preview?.cancel(), previewWhileTyping: true, restoreOnCommit: false, precision: 2, step: 0.05, unit: "m", value: openingCornerRadii[index] ?? 0 }, label))) })), _jsx(SliderControl, { label: "Reveal Radius", max: 0.08, min: 0, onChange: (value) => previewWindowUpdate('openingRevealRadius', value), onCommit: (value) => commitWindowPreview('openingRevealRadius', value), onCancel: () => preview?.cancel(), previewWhileTyping: true, restoreOnCommit: false, precision: 3, step: 0.005, unit: "m", value: openingRevealRadius })] })), windowShape === 'arch' && (_jsx("div", { className: "mt-2 flex flex-col gap-1", children: _jsx(SliderControl, { label: "Arch Height", max: Math.max(0.05, node.height), min: 0.05, onChange: (value) => previewWindowUpdate('archHeight', value), onCommit: (value) => commitWindowPreview('archHeight', value), onCancel: () => preview?.cancel(), previewWhileTyping: true, precision: 2, restoreOnCommit: false, step: 0.05, unit: "m", value: archHeight }) }))] })), showOpeningShapeSection && (_jsxs(PanelSection, { title: "Opening Shape", children: [_jsx(SegmentedControl, { onChange: (value) => handleUpdate({ openingShape: value }), options: [
367
- { value: 'rectangle', label: 'Rect' },
368
- { value: 'rounded', label: 'Rounded' },
369
- { value: 'arch', label: 'Arch' },
475
+ { value: 'all', label: i18n._({ id: 'node.window.panel.all', message: 'All' }) },
476
+ {
477
+ value: 'individual',
478
+ label: i18n._({ id: 'node.window.panel.individual', message: 'Individual' }),
479
+ },
480
+ ], value: openingRadiusMode }), openingRadiusMode === 'all' ? (_jsx(SliderControl, { label: i18n._({ id: 'node.window.panel.cornerRadius', message: 'Corner radius' }), max: maxRoundedRadius, min: 0, onChange: (value) => previewWindowUpdate('cornerRadius', value), onCommit: (value) => commitWindowPreview('cornerRadius', value), onCancel: () => preview?.cancel(), previewWhileTyping: true, restoreOnCommit: false, precision: 2, step: 0.05, unit: "m", value: cornerRadius })) : (_jsx(_Fragment, { children: [
481
+ [i18n._({ id: 'node.cornerRadius.topLeft', message: 'Top left' }), 0],
482
+ [i18n._({ id: 'node.cornerRadius.topRight', message: 'Top right' }), 1],
483
+ [i18n._({ id: 'node.cornerRadius.bottomRight', message: 'Bottom right' }), 2],
484
+ [i18n._({ id: 'node.cornerRadius.bottomLeft', message: 'Bottom left' }), 3],
485
+ ].map(([label, index]) => (_jsx(SliderControl, { label: label, max: maxRoundedRadius, min: 0, onChange: (value) => setOpeningCornerRadius(index, value), onCommit: (value) => setOpeningCornerRadius(index, value, true), onCancel: () => preview?.cancel(), previewWhileTyping: true, restoreOnCommit: false, precision: 2, step: 0.05, unit: "m", value: openingCornerRadii[index] ?? 0 }, label))) })), _jsx(SliderControl, { label: i18n._({ id: 'node.window.panel.revealRadius', message: 'Reveal radius' }), max: 0.08, min: 0, onChange: (value) => previewWindowUpdate('openingRevealRadius', value), onCommit: (value) => commitWindowPreview('openingRevealRadius', value), onCancel: () => preview?.cancel(), previewWhileTyping: true, restoreOnCommit: false, precision: 3, step: 0.005, unit: "m", value: openingRevealRadius })] })), windowShape === 'arch' && (_jsx("div", { className: "mt-2 flex flex-col gap-1", children: _jsx(SliderControl, { label: i18n._({ id: 'node.window.panel.archHeight', message: 'Arch height' }), max: Math.max(0.05, node.height), min: 0.05, onChange: (value) => previewWindowUpdate('archHeight', value), onCommit: (value) => commitWindowPreview('archHeight', value), onCancel: () => preview?.cancel(), previewWhileTyping: true, precision: 2, restoreOnCommit: false, step: 0.05, unit: "m", value: archHeight }) }))] })), showOpeningShapeSection && (_jsxs(PanelSection, { title: i18n._({ id: 'node.window.panel.openingShape', message: 'Opening shape' }), children: [_jsx(SegmentedControl, { onChange: (value) => handleUpdate({ openingShape: value }), options: [
486
+ {
487
+ value: 'rectangle',
488
+ label: i18n._({ id: 'node.window.panel.rect', message: 'Rect' }),
489
+ },
490
+ {
491
+ value: 'rounded',
492
+ label: i18n._({ id: 'node.window.panel.rounded', message: 'Rounded' }),
493
+ },
494
+ { value: 'arch', label: i18n._({ id: 'node.window.panel.arch', message: 'Arch' }) },
370
495
  ], value: openingShape }), openingShape === 'rounded' && (_jsxs("div", { className: "mt-2 flex flex-col gap-1", children: [_jsx(SegmentedControl, { onChange: (value) => handleUpdate({ openingRadiusMode: value }), options: [
371
- { value: 'all', label: 'All' },
372
- { value: 'individual', label: 'Individual' },
373
- ], value: openingRadiusMode }), openingRadiusMode === 'all' ? (_jsx(SliderControl, { label: "Corner Radius", max: maxRoundedRadius, min: 0, onChange: (value) => previewWindowUpdate('cornerRadius', value), onCommit: (value) => commitWindowPreview('cornerRadius', value), onCancel: () => preview?.cancel(), previewWhileTyping: true, restoreOnCommit: false, precision: 2, step: 0.05, unit: "m", value: cornerRadius })) : (_jsx(_Fragment, { children: [
374
- ['Top Left', 0],
375
- ['Top Right', 1],
376
- ['Bottom Right', 2],
377
- ['Bottom Left', 3],
378
- ].map(([label, index]) => (_jsx(SliderControl, { label: label, max: maxRoundedRadius, min: 0, onChange: (value) => setOpeningCornerRadius(index, value), onCommit: (value) => setOpeningCornerRadius(index, value, true), onCancel: () => preview?.cancel(), previewWhileTyping: true, restoreOnCommit: false, precision: 2, step: 0.05, unit: "m", value: openingCornerRadii[index] ?? 0 }, label))) })), _jsx(SliderControl, { label: "Reveal Radius", max: 0.08, min: 0, onChange: (value) => previewWindowUpdate('openingRevealRadius', value), onCommit: (value) => commitWindowPreview('openingRevealRadius', value), onCancel: () => preview?.cancel(), previewWhileTyping: true, restoreOnCommit: false, precision: 3, step: 0.005, unit: "m", value: openingRevealRadius })] })), openingShape === 'arch' && (_jsx("div", { className: "mt-2 flex flex-col gap-1", children: _jsx(SliderControl, { label: "Arch Height", max: Math.max(0.05, node.height), min: 0.05, onChange: (value) => previewWindowUpdate('archHeight', value), onCommit: (value) => commitWindowPreview('archHeight', value), onCancel: () => preview?.cancel(), previewWhileTyping: true, precision: 2, restoreOnCommit: false, step: 0.05, unit: "m", value: archHeight }) }))] })), !isOpening && !scripted && (_jsxs(_Fragment, { children: [showFrameSection && (_jsxs(PanelSection, { title: "Frame", children: [_jsx(SliderControl, { label: "Thickness", min: 0, onChange: (v) => previewWindowUpdate('frameThickness', v), onCommit: (v) => commitWindowPreview('frameThickness', v), onCancel: () => preview?.cancel(), previewWhileTyping: true, restoreOnCommit: false, precision: 3, step: 0.01, unit: "m", value: node.frameThickness }), _jsx(SliderControl, { label: "Depth", min: 0, onChange: (v) => previewWindowUpdate('frameDepth', v), onCommit: (v) => commitWindowPreview('frameDepth', v), onCancel: () => preview?.cancel(), previewWhileTyping: true, restoreOnCommit: false, precision: 3, step: 0.01, unit: "m", value: node.frameDepth })] })), showGridSection && (_jsxs(PanelSection, { title: "Grid", children: [_jsx(SliderControl, { label: "Columns", max: 8, min: 1, onChange: (v) => {
379
- const n = Math.max(1, Math.min(8, Math.round(v)));
380
- handleUpdate({ columnRatios: Array(n).fill(1 / n) });
381
- }, precision: 0, step: 1, value: numCols }), _jsx(SliderControl, { label: "Rows", max: 8, min: 1, onChange: (v) => {
382
- const n = Math.max(1, Math.min(8, Math.round(v)));
383
- handleUpdate({ rowRatios: Array(n).fill(1 / n) });
384
- }, precision: 0, step: 1, value: numRows }), numCols > 1 && (_jsxs("div", { className: "mt-2 flex flex-col gap-1", children: [_jsx("div", { className: "mb-1 px-1 font-medium text-[10px] text-muted-foreground/80 uppercase tracking-wider", children: "Col Widths" }), normCols.map((ratio, i) => (_jsx(SliderControl, { label: `C${i + 1}`, max: 95, min: 5, onChange: (v) => setColumnRatio(i, v / 100), precision: 1, step: 1, unit: "%", value: Math.round(ratio * 100 * 10) / 10 }, `c-${i}`))), _jsx("div", { className: "mt-1 border-border/50 border-t pt-1", children: _jsx(SliderControl, { label: "Divider", max: 0.1, min: 0.005, onChange: (v) => handleUpdate({ columnDividerThickness: v }), precision: 3, step: 0.01, unit: "m", value: node.columnDividerThickness ?? 0.03 }) })] })), numRows > 1 && (_jsxs("div", { className: "mt-2 flex flex-col gap-1", children: [_jsx("div", { className: "mb-1 px-1 font-medium text-[10px] text-muted-foreground/80 uppercase tracking-wider", children: "Row Heights" }), normRows.map((ratio, i) => (_jsx(SliderControl, { label: `R${i + 1}`, max: 95, min: 5, onChange: (v) => setRowRatio(i, v / 100), precision: 1, step: 1, unit: "%", value: Math.round(ratio * 100 * 10) / 10 }, `r-${i}`))), _jsx("div", { className: "mt-1 border-border/50 border-t pt-1", children: _jsx(SliderControl, { label: "Divider", max: 0.1, min: 0.005, onChange: (v) => handleUpdate({ rowDividerThickness: v }), precision: 3, step: 0.01, unit: "m", value: node.rowDividerThickness ?? 0.03 }) })] }))] })), showSillSection && (_jsxs(PanelSection, { title: "Sill", children: [_jsx(ToggleControl, { checked: node.sill, label: "Enable Sill", onChange: (checked) => handleUpdate({ sill: checked }) }), node.sill && (_jsxs("div", { className: "mt-1 flex flex-col gap-1", children: [_jsx(SliderControl, { label: "Depth", min: 0, onChange: (v) => handleUpdate({ sillDepth: v }), precision: 3, step: 0.01, unit: "m", value: node.sillDepth }), _jsx(SliderControl, { label: "Thickness", min: 0, onChange: (v) => handleUpdate({ sillThickness: v }), precision: 3, step: 0.01, unit: "m", value: node.sillThickness })] }))] }))] })), _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-600 dark:text-red-400" }), label: "Delete", onClick: handleDelete })] }) })] }));
496
+ { value: 'all', label: i18n._({ id: 'node.window.panel.all', message: 'All' }) },
497
+ {
498
+ value: 'individual',
499
+ label: i18n._({ id: 'node.window.panel.individual', message: 'Individual' }),
500
+ },
501
+ ], value: openingRadiusMode }), openingRadiusMode === 'all' ? (_jsx(SliderControl, { label: i18n._({ id: 'node.window.panel.cornerRadius', message: 'Corner radius' }), max: maxRoundedRadius, min: 0, onChange: (value) => previewWindowUpdate('cornerRadius', value), onCommit: (value) => commitWindowPreview('cornerRadius', value), onCancel: () => preview?.cancel(), previewWhileTyping: true, restoreOnCommit: false, precision: 2, step: 0.05, unit: "m", value: cornerRadius })) : (_jsx(_Fragment, { children: [
502
+ [i18n._({ id: 'node.cornerRadius.topLeft', message: 'Top left' }), 0],
503
+ [i18n._({ id: 'node.cornerRadius.topRight', message: 'Top right' }), 1],
504
+ [i18n._({ id: 'node.cornerRadius.bottomRight', message: 'Bottom right' }), 2],
505
+ [i18n._({ id: 'node.cornerRadius.bottomLeft', message: 'Bottom left' }), 3],
506
+ ].map(([label, index]) => (_jsx(SliderControl, { label: label, max: maxRoundedRadius, min: 0, onChange: (value) => setOpeningCornerRadius(index, value), onCommit: (value) => setOpeningCornerRadius(index, value, true), onCancel: () => preview?.cancel(), previewWhileTyping: true, restoreOnCommit: false, precision: 2, step: 0.05, unit: "m", value: openingCornerRadii[index] ?? 0 }, label))) })), _jsx(SliderControl, { label: i18n._({ id: 'node.window.panel.revealRadius', message: 'Reveal radius' }), max: 0.08, min: 0, onChange: (value) => previewWindowUpdate('openingRevealRadius', value), onCommit: (value) => commitWindowPreview('openingRevealRadius', value), onCancel: () => preview?.cancel(), previewWhileTyping: true, restoreOnCommit: false, precision: 3, step: 0.005, unit: "m", value: openingRevealRadius })] })), openingShape === 'arch' && (_jsx("div", { className: "mt-2 flex flex-col gap-1", children: _jsx(SliderControl, { label: i18n._({ id: 'node.window.panel.archHeight', message: 'Arch height' }), max: Math.max(0.05, node.height), min: 0.05, onChange: (value) => previewWindowUpdate('archHeight', value), onCommit: (value) => commitWindowPreview('archHeight', value), onCancel: () => preview?.cancel(), previewWhileTyping: true, precision: 2, restoreOnCommit: false, step: 0.05, unit: "m", value: archHeight }) }))] })), (showOperationSection || showAwningDirectionSection || showCasementSection) && (_jsx(PanelSection, { title: operationLabel, children: _jsxs("div", { className: "flex flex-col gap-2", children: [showAwningDirectionSection && (_jsx("div", { children: _jsx(SegmentedControl, { onChange: (value) => handleUpdate({
507
+ windowType: 'awning',
508
+ awningDirection: value,
509
+ }), options: [
510
+ { value: 'up', label: i18n._({ id: 'node.window.panel.up', message: 'Up' }) },
511
+ {
512
+ value: 'down',
513
+ label: i18n._({ id: 'node.window.panel.down', message: 'Down' }),
514
+ },
515
+ ], value: awningDirection }) })), showCasementSection && (_jsxs("div", { className: "space-y-2", children: [_jsx(SegmentedControl, { onChange: (value) => handleUpdate({ casementStyle: value }), options: [
516
+ {
517
+ value: 'single',
518
+ label: i18n._({ id: 'node.window.panel.single', message: 'Single' }),
519
+ },
520
+ {
521
+ value: 'french',
522
+ label: i18n._({ id: 'node.window.panel.french', message: 'French' }),
523
+ },
524
+ ], value: node.casementStyle ?? 'single' }), (node.casementStyle ?? 'single') === 'single' && (_jsx(SegmentedControl, { onChange: (value) => handleUpdate({ hingesSide: value }), options: [
525
+ {
526
+ value: 'left',
527
+ label: i18n._({ id: 'node.window.panel.left', message: 'Left' }),
528
+ },
529
+ {
530
+ value: 'right',
531
+ label: i18n._({ id: 'node.window.panel.right', message: 'Right' }),
532
+ },
533
+ ], value: node.hingesSide ?? 'left' }))] })), showTiltTurnSection && (_jsxs(_Fragment, { children: [_jsx(Captioned, { label: i18n._({ id: 'node.window.panel.tiltTurnMode', message: 'Mode' }), children: _jsx(SegmentedControl, { onChange: (value) => handleUpdate({ tiltTurnMode: value }), options: [
534
+ {
535
+ value: 'tilt',
536
+ label: i18n._({ id: 'node.window.panel.tiltTurnTilt', message: 'Tilt' }),
537
+ },
538
+ {
539
+ value: 'turn',
540
+ label: i18n._({ id: 'node.window.panel.tiltTurnTurn', message: 'Turn' }),
541
+ },
542
+ ], value: node.tiltTurnMode ?? 'tilt' }) }), node.tiltTurnMode === 'turn' && (_jsx(Captioned, { label: i18n._({ id: 'node.window.panel.hingesSide', message: 'Hinges side' }), children: _jsx(SegmentedControl, { onChange: (value) => handleUpdate({ hingesSide: value }), options: [
543
+ {
544
+ value: 'left',
545
+ label: i18n._({ id: 'node.window.panel.left', message: 'Left' }),
546
+ },
547
+ {
548
+ value: 'right',
549
+ label: i18n._({ id: 'node.window.panel.right', message: 'Right' }),
550
+ },
551
+ ], value: node.hingesSide ?? 'left' }) }))] })), showOpensRow && (_jsx(Captioned, { label: i18n._({ id: 'node.window.panel.opens', message: 'Opens' }), children: _jsx(SegmentedControl, { onChange: (value) => handleUpdate({ openingDirection: value }), options: [
552
+ {
553
+ value: 'outward',
554
+ label: i18n._({ id: 'node.window.panel.outward', message: 'Outward' }),
555
+ },
556
+ {
557
+ value: 'inward',
558
+ label: i18n._({ id: 'node.window.panel.inward', message: 'Inward' }),
559
+ },
560
+ ], value: openingDirection }) })), showOperationSection && (_jsx("div", { children: _jsx(SliderControl, { label: showTiltTurnSection
561
+ ? i18n._({ id: 'node.window.panel.open', message: 'Open' })
562
+ : operationLabel, max: 1, min: 0, onChange: setOperationState, precision: 2, restoreOnCommit: false, step: 0.05, value: Math.round((node.operationState ?? 0) * 100) / 100 }) }))] }) })), showFrameSection && (_jsxs(PanelSection, { title: i18n._({ id: 'node.window.panel.frame', message: 'Frame' }), children: [_jsx(SliderControl, { label: i18n._({ id: 'node.window.panel.thickness', message: 'Thickness' }), min: 0, onChange: (v) => previewWindowUpdate('frameThickness', v), onCommit: (v) => commitWindowPreview('frameThickness', v), onCancel: () => preview?.cancel(), previewWhileTyping: true, restoreOnCommit: false, precision: 3, step: 0.01, unit: "m", value: node.frameThickness }), _jsx(SliderControl, { label: isAutoFrameDepth(node)
563
+ ? i18n._({ id: 'node.window.panel.frameDepthAuto', message: 'Depth (auto)' })
564
+ : i18n._({ id: 'node.window.panel.depth', message: 'Depth' }), min: 0, onChange: (v) => previewWindowUpdate('frameDepth', v), onCommit: (v) => commitWindowPreview('frameDepth', v), onCancel: () => preview?.cancel(), previewWhileTyping: true, restoreOnCommit: false, precision: 3, step: 0.01, unit: "m", value: frameDepth }), !isAutoFrameDepth(node) && (_jsxs("div", { className: "flex items-center justify-between px-2 text-muted-foreground text-xs", children: [_jsx("span", { children: i18n._({
565
+ id: 'node.window.panel.autoFollowsTheWall',
566
+ message: 'Auto follows the wall',
567
+ }) }), _jsx("button", { className: "rounded-full border border-border/50 px-2.5 py-0.5 transition-colors hover:bg-accent", onClick: () => handleUpdate({ frameDepth: undefined }), type: "button", children: i18n._({ id: 'node.window.panel.auto', message: 'Auto' }) })] })), _jsx(OpeningDepthPositionControl, { node: node, onUpdate: handleUpdate })] })), showSillSection && (_jsxs(PanelSection, { title: i18n._({ id: 'node.window.panel.sill', message: 'Sill' }), children: [_jsx(ToggleControl, { checked: node.sill, label: i18n._({ id: 'node.window.panel.enableSill', message: 'Enable sill' }), onChange: (checked) => handleUpdate({ sill: checked }) }), node.sill && (_jsxs("div", { className: "mt-1 flex flex-col gap-1", children: [_jsx(SliderControl, { label: i18n._({ id: 'node.window.panel.depth', message: 'Depth' }), min: 0, onChange: (v) => handleUpdate({ sillDepth: v }), precision: 3, step: 0.01, unit: "m", value: node.sillDepth }), _jsx(SliderControl, { label: i18n._({ id: 'node.window.panel.thickness', message: 'Thickness' }), min: 0, onChange: (v) => handleUpdate({ sillThickness: v }), precision: 3, step: 0.01, unit: "m", value: node.sillThickness }), _jsx(SliderControl, { label: i18n._({ id: 'node.window.panel.overhang', message: 'Overhang' }), max: 0.15, min: 0, onChange: (v) => handleUpdate({ sillOverhang: Math.max(0, Math.min(0.15, v)) }), precision: 3, step: 0.005, unit: "m", value: node.sillOverhang ?? node.sillDepth * 0.4 })] })), _jsx(ToggleControl, { checked: node.sillInterior === true, label: i18n._({ id: 'node.window.panel.insideSill', message: 'Inside sill' }), onChange: (checked) => handleUpdate({ sillInterior: checked }) }), node.sillInterior === true && (_jsxs("div", { className: "mt-1 flex flex-col gap-1", children: [_jsx(SliderControl, { label: i18n._({ id: 'node.window.panel.depth', message: 'Depth' }), max: 0.3, min: 0.02, onChange: (v) => handleUpdate({ sillInteriorDepth: Math.max(0.02, Math.min(0.3, v)) }), precision: 3, step: 0.005, unit: "m", value: node.sillInteriorDepth ?? INSIDE_SILL_DEPTH }), _jsx(SliderControl, { label: i18n._({ id: 'node.window.panel.thickness', message: 'Thickness' }), max: 0.05, min: 0.015, onChange: (v) => handleUpdate({ sillInteriorThickness: Math.max(0.015, Math.min(0.05, v)) }), precision: 3, step: 0.005, unit: "m", value: node.sillInteriorThickness ?? INSIDE_SILL_THICKNESS }), _jsx(SliderControl, { label: i18n._({ id: 'node.window.panel.overhang', message: 'Overhang' }), max: 0.15, min: 0, onChange: (v) => handleUpdate({ sillInteriorOverhang: Math.max(0, Math.min(0.15, v)) }), precision: 3, step: 0.005, unit: "m", value: node.sillInteriorOverhang ?? INSIDE_SILL_OVERHANG })] })), (node.sill || node.sillInterior === true) && (_jsx("div", { className: "mt-1 border-border/50 border-t pt-1", children: _jsx(FinishSwatch, { fallback: node.slots?.frame ?? FRAME_FINISH_DEFAULT, label: i18n._({ id: 'node.window.panel.finish', message: 'Finish' }), node: node, paintRole: "sill", value: node.slots?.sill }) }))] })), _jsx(OpeningCasingSection, { node: node, onUpdate: handleUpdate }), showShuttersSection && (_jsxs(PanelSection, { title: i18n._({ id: 'node.window.panel.shutters', message: 'Shutters' }), children: [_jsx(SegmentedControl, { onChange: (value) => handleUpdate({ shutters: value }), options: [
568
+ {
569
+ value: 'none',
570
+ label: i18n._({ id: 'node.window.panel.shuttersNone', message: 'None' }),
571
+ },
572
+ {
573
+ value: 'louvered',
574
+ label: i18n._({ id: 'node.window.panel.shuttersLouvered', message: 'Louvered' }),
575
+ },
576
+ {
577
+ value: 'panel',
578
+ label: i18n._({ id: 'node.window.panel.shuttersPanel', message: 'Panel' }),
579
+ },
580
+ {
581
+ value: 'board-batten',
582
+ label: i18n._({
583
+ id: 'node.window.panel.shuttersBoardBatten',
584
+ message: 'Board and batten',
585
+ }),
586
+ },
587
+ ], value: shutters }), shutters !== 'none' && (_jsxs("div", { className: "mt-1 flex flex-col gap-1", children: [_jsx(Captioned, { label: i18n._({ id: 'node.window.panel.shutterSides', message: 'Sides' }), children: _jsx(SegmentedControl, { onChange: (value) => handleUpdate({ shutterSides: value }), options: [
588
+ {
589
+ value: 'both',
590
+ label: i18n._({ id: 'node.window.panel.shutterSidesBoth', message: 'Both' }),
591
+ },
592
+ {
593
+ value: 'left',
594
+ label: i18n._({ id: 'node.window.panel.left', message: 'Left' }),
595
+ },
596
+ {
597
+ value: 'right',
598
+ label: i18n._({ id: 'node.window.panel.right', message: 'Right' }),
599
+ },
600
+ ], value: node.shutterSides ?? 'both' }) }), _jsx(SliderControl, { label: i18n._({ id: 'node.window.panel.width', message: 'Width' }), max: toShownLength(maxShutterWidth), min: toShownLength(MIN_SHUTTER_WIDTH), onChange: (value) => {
601
+ const meters = imperial ? value * INCH : value;
602
+ handleUpdate({
603
+ shutterWidth: Math.min(Math.max(meters, MIN_SHUTTER_WIDTH), maxShutterWidth),
604
+ });
605
+ }, precision: imperial ? 1 : 2, step: imperial ? 0.5 : 0.01, unit: imperial ? 'in' : 'm', value: toShownLength(shutterWidth) }), _jsx(SliderControl, { label: i18n._({ id: 'node.window.panel.open', message: 'Open' }), max: 100, min: 0, onChange: (v) => setShutterState('shutterOpen', v), precision: 0, restoreOnCommit: false, step: 5, unit: "%", value: Math.round((node.shutterOpen ?? 1) * 100) })] })), _jsxs("div", { className: "mt-1 flex flex-col gap-1 border-border/50 border-t pt-1", children: [_jsx(Captioned, { label: i18n._({ id: 'node.window.panel.rollerShutter', message: 'Roller shutter' }), children: _jsx(SegmentedControl, { onChange: (value) => handleUpdate({ rollerShutter: value }), options: [
606
+ {
607
+ value: 'none',
608
+ label: i18n._({ id: 'node.window.panel.rollerShutterNone', message: 'None' }),
609
+ },
610
+ {
611
+ value: 'box',
612
+ label: i18n._({ id: 'node.window.panel.rollerShutterBox', message: 'Box' }),
613
+ },
614
+ {
615
+ value: 'concealed',
616
+ label: i18n._({
617
+ id: 'node.window.panel.rollerShutterConcealed',
618
+ message: 'Concealed',
619
+ }),
620
+ },
621
+ ], value: rollerShutter }) }), rollerShutter === 'box' && (_jsx(SliderControl, { label: i18n._({
622
+ id: 'node.window.panel.rollerShutterBoxHeight',
623
+ message: 'Box height',
624
+ }), max: MAX_ROLLER_BOX_HEIGHT, min: MIN_ROLLER_BOX_HEIGHT, onChange: (value) => handleUpdate({
625
+ rollerShutterBoxHeight: Math.min(Math.max(value, MIN_ROLLER_BOX_HEIGHT), MAX_ROLLER_BOX_HEIGHT),
626
+ }), precision: 2, step: 0.01, unit: "m", value: node.rollerShutterBoxHeight ?? DEFAULT_ROLLER_BOX_HEIGHT })), rollerShutter !== 'none' && (_jsx(SliderControl, { label: i18n._({ id: 'node.window.panel.open', message: 'Open' }), max: 100, min: 0, onChange: (v) => setShutterState('rollerShutterOpen', v), precision: 0, restoreOnCommit: false, step: 5, unit: "%", value: Math.round((node.rollerShutterOpen ?? 1) * 100) }))] }), (shutters !== 'none' || rollerShutter !== 'none') && (_jsx("div", { className: "mt-1 border-border/50 border-t pt-1", children: _jsx(FinishSwatch, { fallback: SHUTTERS_FINISH_DEFAULT, label: i18n._({ id: 'node.window.panel.finish', message: 'Finish' }), node: node, paintRole: "shutters", value: node.slots?.shutters }) }))] })), showHardwareSection && (_jsxs(PanelSection, { title: i18n._({ id: 'node.window.panel.hardware', message: 'Hardware' }), children: [_jsx(ToggleControl, { checked: node.windowHandle !== false, label: i18n._({ id: 'node.window.panel.handle', message: 'Handle' }), onChange: (checked) => handleUpdate({ windowHandle: checked }) }), _jsx(FinishSwatch, { fallback: node.slots?.frame ?? FRAME_FINISH_DEFAULT, label: i18n._({ id: 'node.window.panel.finish', message: 'Finish' }), node: node, paintRole: "hardware", value: node.slots?.hardware })] })), _jsx(PanelSection, { title: i18n._({ id: 'node.window.panel.actions', message: 'Actions' }), children: _jsxs(ActionGroup, { children: [_jsx(ActionButton, { icon: _jsx(Move, { className: "h-3.5 w-3.5" }), label: i18n._({ id: 'node.window.panel.move', message: 'Move' }), onClick: handleMove }), _jsx(ActionButton, { icon: _jsx(Copy, { className: "h-3.5 w-3.5" }), label: i18n._({ id: 'node.window.panel.duplicate', message: 'Duplicate' }), onClick: handleDuplicate }), _jsx(ActionButton, { className: "hover:bg-red-500/20", icon: _jsx(Trash2, { className: "h-3.5 w-3.5 text-red-600 dark:text-red-400" }), label: i18n._({ id: 'node.window.panel.delete', message: 'Delete' }), onClick: handleDelete })] }) })] }));
385
627
  }
@@ -1 +1 @@
1
- {"version":3,"file":"placement.d.ts","sourceRoot":"","sources":["../../src/window/placement.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAqB,QAAQ,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC/E,OAAO,EAKL,KAAK,WAAW,EAGjB,MAAM,2BAA2B,CAAA;AASlC,mEAAmE;AACnE,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,UAAU,CAAC,YAAY,CAAC,CAAA;CAAE,CAUvF,CAAA;AAED,KAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,UAAU,CAAC,YAAY,CAAC,CAAA;IAC9B,KAAK,EAAE,WAAW,CAAA;IAClB,SAAS,IAAI,IAAI,CAAA;IACjB,UAAU,IAAI,IAAI,CAAA;CACnB,CAAA;AAID,eAAO,MAAM,kBAAkB,mFAW5B,CAAA;AAEH;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAAC,UAAU,CAAC,CAOxD;AAED,eAAO,MAAM,sBAAsB,EAAE,QAAQ,EAgC5C,CAAA;AAYD,iGAAiG;AACjG,eAAO,MAAM,0BAA0B;IACrC,SAAS,aAAa,MAAM,IAAI;IAChC,KAAK;CAIN,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,QAAQ,EASzC,CAAA"}
1
+ {"version":3,"file":"placement.d.ts","sourceRoot":"","sources":["../../src/window/placement.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAqB,QAAQ,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC/E,OAAO,EAML,KAAK,WAAW,EAGjB,MAAM,2BAA2B,CAAA;AASlC,mEAAmE;AACnE,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,UAAU,CAAC,YAAY,CAAC,CAAA;CAAE,CAWvF,CAAA;AAED,KAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,UAAU,CAAC,YAAY,CAAC,CAAA;IAC9B,KAAK,EAAE,WAAW,CAAA;IAClB,SAAS,IAAI,IAAI,CAAA;IACjB,UAAU,IAAI,IAAI,CAAA;CACnB,CAAA;AAID,eAAO,MAAM,kBAAkB,mFAW5B,CAAA;AAEH;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAAC,UAAU,CAAC,CAUxD;AAED,eAAO,MAAM,sBAAsB,EAAE,QAAQ,EAgC5C,CAAA;AAYD,iGAAiG;AACjG,eAAO,MAAM,0BAA0B;IACrC,SAAS,aAAa,MAAM,IAAI;IAChC,KAAK;CAIN,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,QAAQ,EASzC,CAAA"}
@@ -1,5 +1,5 @@
1
1
  // The window tool's placement choices: the chips [O] Type and [L] Style.
2
- import { getWindowStyleOverrides, SILLLESS_WINDOW_TYPES, WINDOW_STYLE_CHOICES, WINDOW_STYLE_LABELS, windowTakesStyle, windowTypeFields, } from '@pascal-app/core/building';
2
+ import { getWindowStyleOverrides, NEW_WINDOW_FRAME_THICKNESS, SILLLESS_WINDOW_TYPES, WINDOW_STYLE_CHOICES, WINDOW_STYLE_LABELS, windowTakesStyle, windowTypeFields, } from '@pascal-app/core/building';
3
3
  import { CORNER_BLOCK_NOTES, cornerHintRows, useCornerSnapHint, } from '@pascal-app/editor';
4
4
  import { create } from 'zustand';
5
5
  /** The window panel's Window Type row and the tool's Type chip. */
@@ -8,6 +8,7 @@ export const windowTypeOptions = [
8
8
  { label: 'Sliding', value: 'sliding' },
9
9
  { label: 'Casement', value: 'casement' },
10
10
  { label: 'Awning', value: 'awning' },
11
+ { label: 'Tilt and Turn', value: 'tilt-turn' },
11
12
  { label: 'Single Hung', value: 'single-hung' },
12
13
  { label: 'Double Hung', value: 'double-hung' },
13
14
  { label: 'Bay', value: 'bay' },
@@ -31,6 +32,9 @@ export const useWindowPlacement = create((set, get) => ({
31
32
  export function placedWindowFields() {
32
33
  const { type, style } = useWindowPlacement.getState();
33
34
  return {
35
+ frameThickness: NEW_WINDOW_FRAME_THICKNESS,
36
+ casingFaceA: true,
37
+ casingFaceB: true,
34
38
  ...windowTypeFields(type),
35
39
  sill: !SILLLESS_WINDOW_TYPES.has(type),
36
40
  ...(windowTakesStyle(type) ? getWindowStyleOverrides(style) : {}),
@@ -0,0 +1,13 @@
1
+ import type { WindowNode } from '@pascal-app/core';
2
+ type HingedWindow = Pick<WindowNode, 'windowType' | 'casementStyle' | 'hingesSide'> & Partial<Pick<WindowNode, 'openingKind' | 'source'>>;
3
+ /**
4
+ * Whether a window hangs one sash from a side jamb, so its hinge side can be swapped: a single
5
+ * casement. A French casement hinges on both jambs; awning and hopper sashes hinge on the head
6
+ * or the sill, and every other type slides, pivots or stays fixed. A window has no inward or
7
+ * outward setting, so there is no swing side to swap.
8
+ */
9
+ export declare function canSwapWindowHinge(node: HingedWindow): boolean;
10
+ /** The sash hung from the other jamb. */
11
+ export declare function swapWindowHingePatch(node: HingedWindow): Partial<WindowNode>;
12
+ export {};
13
+ //# sourceMappingURL=swing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"swing.d.ts","sourceRoot":"","sources":["../../src/window/swing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,KAAK,YAAY,GAAG,IAAI,CAAC,UAAU,EAAE,YAAY,GAAG,eAAe,GAAG,YAAY,CAAC,GACjF,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,aAAa,GAAG,QAAQ,CAAC,CAAC,CAAA;AAErD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAO9D;AAED,yCAAyC;AACzC,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,CAE5E"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Whether a window hangs one sash from a side jamb, so its hinge side can be swapped: a single
3
+ * casement. A French casement hinges on both jambs; awning and hopper sashes hinge on the head
4
+ * or the sill, and every other type slides, pivots or stays fixed. A window has no inward or
5
+ * outward setting, so there is no swing side to swap.
6
+ */
7
+ export function canSwapWindowHinge(node) {
8
+ return (!node.source &&
9
+ node.openingKind !== 'opening' &&
10
+ node.windowType === 'casement' &&
11
+ (node.casementStyle ?? 'single') === 'single');
12
+ }
13
+ /** The sash hung from the other jamb. */
14
+ export function swapWindowHingePatch(node) {
15
+ return { hingesSide: node.hingesSide === 'right' ? 'left' : 'right' };
16
+ }