@pascal-app/core 0.9.1 → 1.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (378) hide show
  1. package/README.md +17 -10
  2. package/dist/events/bus.d.ts +49 -2
  3. package/dist/events/bus.d.ts.map +1 -1
  4. package/dist/hooks/scene-registry/item-clip-registry.d.ts +18 -0
  5. package/dist/hooks/scene-registry/item-clip-registry.d.ts.map +1 -0
  6. package/dist/hooks/scene-registry/item-clip-registry.js +10 -0
  7. package/dist/hooks/scene-registry/scene-registry.d.ts +8 -1
  8. package/dist/hooks/scene-registry/scene-registry.d.ts.map +1 -1
  9. package/dist/hooks/scene-registry/scene-registry.js +27 -1
  10. package/dist/hooks/spatial-grid/floor-placed-elevation.d.ts +17 -1
  11. package/dist/hooks/spatial-grid/floor-placed-elevation.d.ts.map +1 -1
  12. package/dist/hooks/spatial-grid/floor-placed-elevation.js +61 -8
  13. package/dist/hooks/spatial-grid/spatial-grid-manager.d.ts +135 -28
  14. package/dist/hooks/spatial-grid/spatial-grid-manager.d.ts.map +1 -1
  15. package/dist/hooks/spatial-grid/spatial-grid-manager.js +427 -271
  16. package/dist/hooks/spatial-grid/spatial-grid-sync.d.ts +46 -1
  17. package/dist/hooks/spatial-grid/spatial-grid-sync.d.ts.map +1 -1
  18. package/dist/hooks/spatial-grid/spatial-grid-sync.js +208 -9
  19. package/dist/hooks/spatial-grid/support-host-id.d.ts +3 -0
  20. package/dist/hooks/spatial-grid/support-host-id.d.ts.map +1 -0
  21. package/dist/hooks/spatial-grid/support-host-id.js +2 -0
  22. package/dist/hooks/spatial-grid/support-host-patch.d.ts +51 -0
  23. package/dist/hooks/spatial-grid/support-host-patch.d.ts.map +1 -0
  24. package/dist/hooks/spatial-grid/support-host-patch.js +164 -0
  25. package/dist/index.d.ts +33 -11
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +32 -10
  28. package/dist/lib/level-name.d.ts +4 -0
  29. package/dist/lib/level-name.d.ts.map +1 -0
  30. package/dist/lib/level-name.js +10 -0
  31. package/dist/lib/measurement-geometry.d.ts +23 -0
  32. package/dist/lib/measurement-geometry.d.ts.map +1 -0
  33. package/dist/lib/measurement-geometry.js +249 -0
  34. package/dist/lib/polygon-geometry.d.ts +0 -1
  35. package/dist/lib/polygon-geometry.d.ts.map +1 -1
  36. package/dist/lib/polygon-geometry.js +0 -18
  37. package/dist/lib/selection-proxy.d.ts +4 -0
  38. package/dist/lib/selection-proxy.d.ts.map +1 -0
  39. package/dist/lib/selection-proxy.js +12 -0
  40. package/dist/lib/slab-polygon.d.ts +31 -2
  41. package/dist/lib/slab-polygon.d.ts.map +1 -1
  42. package/dist/lib/slab-polygon.js +557 -31
  43. package/dist/lib/slots.d.ts +14 -0
  44. package/dist/lib/slots.d.ts.map +1 -0
  45. package/dist/lib/slots.js +26 -0
  46. package/dist/lib/space-detection.d.ts +40 -6
  47. package/dist/lib/space-detection.d.ts.map +1 -1
  48. package/dist/lib/space-detection.js +574 -192
  49. package/dist/lib/terrain-brush.d.ts +163 -0
  50. package/dist/lib/terrain-brush.d.ts.map +1 -0
  51. package/dist/lib/terrain-brush.js +359 -0
  52. package/dist/lib/terrain-codec.d.ts +51 -0
  53. package/dist/lib/terrain-codec.d.ts.map +1 -0
  54. package/dist/lib/terrain-codec.js +167 -0
  55. package/dist/lib/terrain-field.d.ts +150 -0
  56. package/dist/lib/terrain-field.d.ts.map +1 -0
  57. package/dist/lib/terrain-field.js +248 -0
  58. package/dist/lib/terrain-raycast.d.ts +44 -0
  59. package/dist/lib/terrain-raycast.d.ts.map +1 -0
  60. package/dist/lib/terrain-raycast.js +188 -0
  61. package/dist/lib/terrain-source.d.ts +60 -0
  62. package/dist/lib/terrain-source.d.ts.map +1 -0
  63. package/dist/lib/terrain-source.js +90 -0
  64. package/dist/lib/terrain-support.d.ts +60 -0
  65. package/dist/lib/terrain-support.d.ts.map +1 -0
  66. package/dist/lib/terrain-support.js +150 -0
  67. package/dist/lib/wall-distance.d.ts +60 -0
  68. package/dist/lib/wall-distance.d.ts.map +1 -0
  69. package/dist/lib/wall-distance.js +85 -0
  70. package/dist/lib/zone-quantities.d.ts +21 -0
  71. package/dist/lib/zone-quantities.d.ts.map +1 -0
  72. package/dist/lib/zone-quantities.js +428 -0
  73. package/dist/material-library.d.ts +28 -1
  74. package/dist/material-library.d.ts.map +1 -1
  75. package/dist/material-library.js +2233 -441
  76. package/dist/registry/handles.d.ts +91 -3
  77. package/dist/registry/handles.d.ts.map +1 -1
  78. package/dist/registry/index.d.ts +3 -3
  79. package/dist/registry/index.d.ts.map +1 -1
  80. package/dist/registry/index.js +1 -1
  81. package/dist/registry/registry.d.ts +46 -3
  82. package/dist/registry/registry.d.ts.map +1 -1
  83. package/dist/registry/registry.js +82 -1
  84. package/dist/registry/subtree.d.ts.map +1 -1
  85. package/dist/registry/subtree.js +8 -1
  86. package/dist/registry/types.d.ts +781 -39
  87. package/dist/registry/types.d.ts.map +1 -1
  88. package/dist/schema/index.d.ts +27 -8
  89. package/dist/schema/index.d.ts.map +1 -1
  90. package/dist/schema/index.js +23 -6
  91. package/dist/schema/material.d.ts +3 -2
  92. package/dist/schema/material.d.ts.map +1 -1
  93. package/dist/schema/material.js +7 -5
  94. package/dist/schema/nodes/box-vent.d.ts +2 -2
  95. package/dist/schema/nodes/cabinet.d.ts +536 -0
  96. package/dist/schema/nodes/cabinet.d.ts.map +1 -0
  97. package/dist/schema/nodes/cabinet.js +139 -0
  98. package/dist/schema/nodes/ceiling.d.ts +4 -3
  99. package/dist/schema/nodes/ceiling.d.ts.map +1 -1
  100. package/dist/schema/nodes/ceiling.js +11 -1
  101. package/dist/schema/nodes/chimney.d.ts +4 -4
  102. package/dist/schema/nodes/column.d.ts +4 -2
  103. package/dist/schema/nodes/column.d.ts.map +1 -1
  104. package/dist/schema/nodes/column.js +5 -0
  105. package/dist/schema/nodes/construction-dimension.d.ts +195 -0
  106. package/dist/schema/nodes/construction-dimension.d.ts.map +1 -0
  107. package/dist/schema/nodes/construction-dimension.js +151 -0
  108. package/dist/schema/nodes/cupola.d.ts +2 -2
  109. package/dist/schema/nodes/door.d.ts +42 -5
  110. package/dist/schema/nodes/door.d.ts.map +1 -1
  111. package/dist/schema/nodes/door.js +32 -0
  112. package/dist/schema/nodes/dormer.d.ts +8 -8
  113. package/dist/schema/nodes/dormer.js +1 -1
  114. package/dist/schema/nodes/downspout.d.ts +2 -2
  115. package/dist/schema/nodes/duct-fitting.d.ts +91 -0
  116. package/dist/schema/nodes/duct-fitting.d.ts.map +1 -0
  117. package/dist/schema/nodes/duct-fitting.js +92 -0
  118. package/dist/schema/nodes/duct-segment.d.ts +61 -0
  119. package/dist/schema/nodes/duct-segment.d.ts.map +1 -0
  120. package/dist/schema/nodes/duct-segment.js +73 -0
  121. package/dist/schema/nodes/duct-terminal.d.ts +58 -0
  122. package/dist/schema/nodes/duct-terminal.d.ts.map +1 -0
  123. package/dist/schema/nodes/duct-terminal.js +53 -0
  124. package/dist/schema/nodes/elevator.d.ts +3 -2
  125. package/dist/schema/nodes/elevator.d.ts.map +1 -1
  126. package/dist/schema/nodes/elevator.js +3 -0
  127. package/dist/schema/nodes/eyebrow-vent.d.ts +2 -2
  128. package/dist/schema/nodes/fence.d.ts +20 -2
  129. package/dist/schema/nodes/fence.d.ts.map +1 -1
  130. package/dist/schema/nodes/fence.js +33 -2
  131. package/dist/schema/nodes/gutter.d.ts +2 -2
  132. package/dist/schema/nodes/hvac-equipment.d.ts +64 -0
  133. package/dist/schema/nodes/hvac-equipment.d.ts.map +1 -0
  134. package/dist/schema/nodes/hvac-equipment.js +57 -0
  135. package/dist/schema/nodes/item.d.ts +9 -0
  136. package/dist/schema/nodes/item.d.ts.map +1 -1
  137. package/dist/schema/nodes/item.js +24 -0
  138. package/dist/schema/nodes/level.d.ts +2 -1
  139. package/dist/schema/nodes/level.d.ts.map +1 -1
  140. package/dist/schema/nodes/level.js +12 -31
  141. package/dist/schema/nodes/lineset.d.ts +42 -0
  142. package/dist/schema/nodes/lineset.d.ts.map +1 -0
  143. package/dist/schema/nodes/lineset.js +38 -0
  144. package/dist/schema/nodes/liquid-line.d.ts +34 -0
  145. package/dist/schema/nodes/liquid-line.d.ts.map +1 -0
  146. package/dist/schema/nodes/liquid-line.js +24 -0
  147. package/dist/schema/nodes/measurement.d.ts +306 -0
  148. package/dist/schema/nodes/measurement.d.ts.map +1 -0
  149. package/dist/schema/nodes/measurement.js +87 -0
  150. package/dist/schema/nodes/pipe-fitting.d.ts +56 -0
  151. package/dist/schema/nodes/pipe-fitting.d.ts.map +1 -0
  152. package/dist/schema/nodes/pipe-fitting.js +45 -0
  153. package/dist/schema/nodes/pipe-segment.d.ts +48 -0
  154. package/dist/schema/nodes/pipe-segment.d.ts.map +1 -0
  155. package/dist/schema/nodes/pipe-segment.js +36 -0
  156. package/dist/schema/nodes/pipe-trap.d.ts +43 -0
  157. package/dist/schema/nodes/pipe-trap.d.ts.map +1 -0
  158. package/dist/schema/nodes/pipe-trap.js +36 -0
  159. package/dist/schema/nodes/ridge-vent.d.ts +18 -3
  160. package/dist/schema/nodes/ridge-vent.d.ts.map +1 -1
  161. package/dist/schema/nodes/ridge-vent.js +221 -3
  162. package/dist/schema/nodes/roof-segment-shape.d.ts +90 -0
  163. package/dist/schema/nodes/roof-segment-shape.d.ts.map +1 -0
  164. package/dist/schema/nodes/roof-segment-shape.js +318 -0
  165. package/dist/schema/nodes/roof-segment-walls.d.ts +101 -0
  166. package/dist/schema/nodes/roof-segment-walls.d.ts.map +1 -0
  167. package/dist/schema/nodes/roof-segment-walls.js +330 -0
  168. package/dist/schema/nodes/roof-segment.d.ts +84 -8
  169. package/dist/schema/nodes/roof-segment.d.ts.map +1 -1
  170. package/dist/schema/nodes/roof-segment.js +290 -5
  171. package/dist/schema/nodes/roof.d.ts +8 -8
  172. package/dist/schema/nodes/shelf.d.ts +4 -2
  173. package/dist/schema/nodes/shelf.d.ts.map +1 -1
  174. package/dist/schema/nodes/shelf.js +8 -0
  175. package/dist/schema/nodes/site.d.ts +9 -0
  176. package/dist/schema/nodes/site.d.ts.map +1 -1
  177. package/dist/schema/nodes/site.js +8 -6
  178. package/dist/schema/nodes/skylight.d.ts +10 -10
  179. package/dist/schema/nodes/slab.d.ts +8 -2
  180. package/dist/schema/nodes/slab.d.ts.map +1 -1
  181. package/dist/schema/nodes/slab.js +18 -2
  182. package/dist/schema/nodes/solar-panel.d.ts +4 -4
  183. package/dist/schema/nodes/spawn.d.ts +1 -0
  184. package/dist/schema/nodes/spawn.d.ts.map +1 -1
  185. package/dist/schema/nodes/spawn.js +2 -0
  186. package/dist/schema/nodes/stair-segment.d.ts +4 -4
  187. package/dist/schema/nodes/stair.d.ts +16 -13
  188. package/dist/schema/nodes/stair.d.ts.map +1 -1
  189. package/dist/schema/nodes/stair.js +11 -1
  190. package/dist/schema/nodes/structural-grid.d.ts +27 -0
  191. package/dist/schema/nodes/structural-grid.d.ts.map +1 -0
  192. package/dist/schema/nodes/structural-grid.js +17 -0
  193. package/dist/schema/nodes/turbine-vent.d.ts +2 -2
  194. package/dist/schema/nodes/wall.d.ts +248 -6
  195. package/dist/schema/nodes/wall.d.ts.map +1 -1
  196. package/dist/schema/nodes/wall.js +266 -0
  197. package/dist/schema/nodes/window.d.ts +40 -3
  198. package/dist/schema/nodes/window.d.ts.map +1 -1
  199. package/dist/schema/nodes/window.js +30 -0
  200. package/dist/schema/nodes/zone.d.ts +22 -0
  201. package/dist/schema/nodes/zone.d.ts.map +1 -1
  202. package/dist/schema/nodes/zone.js +21 -0
  203. package/dist/schema/scene-material.d.ts +41 -0
  204. package/dist/schema/scene-material.d.ts.map +1 -0
  205. package/dist/schema/scene-material.js +9 -0
  206. package/dist/schema/terrain.d.ts +28 -0
  207. package/dist/schema/terrain.d.ts.map +1 -0
  208. package/dist/schema/terrain.js +30 -0
  209. package/dist/schema/types.d.ts +1300 -97
  210. package/dist/schema/types.d.ts.map +1 -1
  211. package/dist/schema/types.js +27 -0
  212. package/dist/services/__fixtures__/wall-plane-top-boundary-repro.d.ts +80 -0
  213. package/dist/services/__fixtures__/wall-plane-top-boundary-repro.d.ts.map +1 -0
  214. package/dist/services/__fixtures__/wall-plane-top-boundary-repro.js +89 -0
  215. package/dist/services/alignment-anchors.d.ts.map +1 -1
  216. package/dist/services/alignment-anchors.js +30 -1
  217. package/dist/services/alignment.d.ts +5 -0
  218. package/dist/services/alignment.d.ts.map +1 -1
  219. package/dist/services/alignment.js +2 -0
  220. package/dist/services/hosting.d.ts +8 -0
  221. package/dist/services/hosting.d.ts.map +1 -1
  222. package/dist/services/hosting.js +13 -4
  223. package/dist/services/index.d.ts +9 -2
  224. package/dist/services/index.d.ts.map +1 -1
  225. package/dist/services/index.js +9 -2
  226. package/dist/services/level-height.d.ts +27 -0
  227. package/dist/services/level-height.d.ts.map +1 -0
  228. package/dist/services/level-height.js +94 -0
  229. package/dist/services/opening-guides.d.ts +141 -0
  230. package/dist/services/opening-guides.d.ts.map +1 -0
  231. package/dist/services/opening-guides.js +267 -0
  232. package/dist/services/port-connectivity.d.ts +115 -0
  233. package/dist/services/port-connectivity.d.ts.map +1 -0
  234. package/dist/services/port-connectivity.js +300 -0
  235. package/dist/services/riser-diagram.d.ts +40 -0
  236. package/dist/services/riser-diagram.d.ts.map +1 -0
  237. package/dist/services/riser-diagram.js +110 -0
  238. package/dist/services/snap.d.ts +9 -1
  239. package/dist/services/snap.d.ts.map +1 -1
  240. package/dist/services/snap.js +21 -1
  241. package/dist/services/storey.d.ts +103 -0
  242. package/dist/services/storey.d.ts.map +1 -0
  243. package/dist/services/storey.js +296 -0
  244. package/dist/services/system-graph.d.ts +30 -0
  245. package/dist/services/system-graph.d.ts.map +1 -0
  246. package/dist/services/system-graph.js +164 -0
  247. package/dist/services/validate-dwv.d.ts +32 -0
  248. package/dist/services/validate-dwv.d.ts.map +1 -0
  249. package/dist/services/validate-dwv.js +118 -0
  250. package/dist/store/actions/node-actions.d.ts.map +1 -1
  251. package/dist/store/actions/node-actions.js +141 -4
  252. package/dist/store/history-control.d.ts +31 -0
  253. package/dist/store/history-control.d.ts.map +1 -1
  254. package/dist/store/history-control.js +130 -0
  255. package/dist/store/use-live-terrain.d.ts +65 -0
  256. package/dist/store/use-live-terrain.d.ts.map +1 -0
  257. package/dist/store/use-live-terrain.js +31 -0
  258. package/dist/store/use-live-transforms.d.ts +8 -0
  259. package/dist/store/use-live-transforms.d.ts.map +1 -1
  260. package/dist/store/use-scene.d.ts +47 -3
  261. package/dist/store/use-scene.d.ts.map +1 -1
  262. package/dist/store/use-scene.js +992 -55
  263. package/dist/systems/elevator/elevator-opening-system.d.ts +1 -0
  264. package/dist/systems/elevator/elevator-opening-system.d.ts.map +1 -1
  265. package/dist/systems/elevator/elevator-opening-system.js +27 -21
  266. package/dist/systems/elevator/elevator-service.d.ts +0 -2
  267. package/dist/systems/elevator/elevator-service.d.ts.map +1 -1
  268. package/dist/systems/elevator/elevator-service.js +2 -24
  269. package/dist/systems/fence/fence-centerline.d.ts +12 -0
  270. package/dist/systems/fence/fence-centerline.d.ts.map +1 -0
  271. package/dist/systems/fence/fence-centerline.js +37 -0
  272. package/dist/systems/fence/fence-spline.d.ts +39 -0
  273. package/dist/systems/fence/fence-spline.d.ts.map +1 -0
  274. package/dist/systems/fence/fence-spline.js +196 -0
  275. package/dist/systems/slab/slab-placement.d.ts +11 -0
  276. package/dist/systems/slab/slab-placement.d.ts.map +1 -0
  277. package/dist/systems/slab/slab-placement.js +14 -0
  278. package/dist/systems/slab/slab-support.d.ts +137 -0
  279. package/dist/systems/slab/slab-support.d.ts.map +1 -0
  280. package/dist/systems/slab/slab-support.js +557 -0
  281. package/dist/systems/stair/stair-footprint.d.ts.map +1 -1
  282. package/dist/systems/stair/stair-footprint.js +21 -11
  283. package/dist/systems/stair/stair-opening-preview.d.ts +1300 -505
  284. package/dist/systems/stair/stair-opening-preview.d.ts.map +1 -1
  285. package/dist/systems/stair/stair-opening-sync.d.ts.map +1 -1
  286. package/dist/systems/stair/stair-opening-sync.js +19 -33
  287. package/dist/systems/stair/stair-opening-system.d.ts.map +1 -1
  288. package/dist/systems/stair/stair-opening-system.js +32 -4
  289. package/dist/systems/stair/stair-rise.d.ts +22 -0
  290. package/dist/systems/stair/stair-rise.d.ts.map +1 -0
  291. package/dist/systems/stair/stair-rise.js +79 -0
  292. package/dist/systems/wall/wall-curve.d.ts +10 -0
  293. package/dist/systems/wall/wall-curve.d.ts.map +1 -1
  294. package/dist/systems/wall/wall-curve.js +1 -1
  295. package/dist/systems/wall/wall-mitering.d.ts.map +1 -1
  296. package/dist/systems/wall/wall-mitering.js +44 -8
  297. package/dist/systems/wall/wall-top.d.ts +40 -0
  298. package/dist/systems/wall/wall-top.d.ts.map +1 -0
  299. package/dist/systems/wall/wall-top.js +46 -0
  300. package/dist/utils/clone-scene-graph.d.ts +1 -0
  301. package/dist/utils/clone-scene-graph.d.ts.map +1 -1
  302. package/dist/utils/clone-scene-graph.js +56 -5
  303. package/dist/utils/heal-scene-graph.d.ts +18 -0
  304. package/dist/utils/heal-scene-graph.d.ts.map +1 -0
  305. package/dist/utils/heal-scene-graph.js +106 -0
  306. package/dist/validation/validate-build-json.d.ts +3 -0
  307. package/dist/validation/validate-build-json.d.ts.map +1 -1
  308. package/dist/validation/validate-build-json.js +90 -5
  309. package/package.json +4 -4
  310. package/dist/hooks/spatial-grid/floor-placed-elevation.test.d.ts +0 -2
  311. package/dist/hooks/spatial-grid/floor-placed-elevation.test.d.ts.map +0 -1
  312. package/dist/hooks/spatial-grid/floor-placed-elevation.test.js +0 -273
  313. package/dist/lib/space-detection-pause.test.d.ts +0 -2
  314. package/dist/lib/space-detection-pause.test.d.ts.map +0 -1
  315. package/dist/lib/space-detection-pause.test.js +0 -42
  316. package/dist/lib/space-detection.test.d.ts +0 -2
  317. package/dist/lib/space-detection.test.d.ts.map +0 -1
  318. package/dist/lib/space-detection.test.js +0 -77
  319. package/dist/registry/registry.test.d.ts +0 -2
  320. package/dist/registry/registry.test.d.ts.map +0 -1
  321. package/dist/registry/registry.test.js +0 -183
  322. package/dist/registry/relations-resolver.test.d.ts +0 -2
  323. package/dist/registry/relations-resolver.test.d.ts.map +0 -1
  324. package/dist/registry/relations-resolver.test.js +0 -183
  325. package/dist/registry/scene-api.test.d.ts +0 -2
  326. package/dist/registry/scene-api.test.d.ts.map +0 -1
  327. package/dist/registry/scene-api.test.js +0 -183
  328. package/dist/registry/subtree.test.d.ts +0 -2
  329. package/dist/registry/subtree.test.d.ts.map +0 -1
  330. package/dist/registry/subtree.test.js +0 -133
  331. package/dist/schema/asset-url.test.d.ts +0 -2
  332. package/dist/schema/asset-url.test.d.ts.map +0 -1
  333. package/dist/schema/asset-url.test.js +0 -134
  334. package/dist/services/alignment-anchors.test.d.ts +0 -2
  335. package/dist/services/alignment-anchors.test.d.ts.map +0 -1
  336. package/dist/services/alignment-anchors.test.js +0 -383
  337. package/dist/services/alignment.test.d.ts +0 -2
  338. package/dist/services/alignment.test.d.ts.map +0 -1
  339. package/dist/services/alignment.test.js +0 -92
  340. package/dist/services/drag-session.test.d.ts +0 -2
  341. package/dist/services/drag-session.test.d.ts.map +0 -1
  342. package/dist/services/drag-session.test.js +0 -219
  343. package/dist/services/hosting.test.d.ts +0 -2
  344. package/dist/services/hosting.test.d.ts.map +0 -1
  345. package/dist/services/hosting.test.js +0 -199
  346. package/dist/services/movement.test.d.ts +0 -2
  347. package/dist/services/movement.test.d.ts.map +0 -1
  348. package/dist/services/movement.test.js +0 -133
  349. package/dist/services/single-undo-dance.test.d.ts +0 -2
  350. package/dist/services/single-undo-dance.test.d.ts.map +0 -1
  351. package/dist/services/single-undo-dance.test.js +0 -210
  352. package/dist/services/snap.test.d.ts +0 -2
  353. package/dist/services/snap.test.d.ts.map +0 -1
  354. package/dist/services/snap.test.js +0 -95
  355. package/dist/store/actions/node-mutation-sanitize.test.d.ts +0 -2
  356. package/dist/store/actions/node-mutation-sanitize.test.d.ts.map +0 -1
  357. package/dist/store/actions/node-mutation-sanitize.test.js +0 -147
  358. package/dist/store/actions/reparent.test.d.ts +0 -2
  359. package/dist/store/actions/reparent.test.d.ts.map +0 -1
  360. package/dist/store/actions/reparent.test.js +0 -212
  361. package/dist/store/use-scene-elevator-migration.test.d.ts +0 -2
  362. package/dist/store/use-scene-elevator-migration.test.d.ts.map +0 -1
  363. package/dist/store/use-scene-elevator-migration.test.js +0 -109
  364. package/dist/systems/elevator/elevator-opening-sync.test.d.ts +0 -2
  365. package/dist/systems/elevator/elevator-opening-sync.test.d.ts.map +0 -1
  366. package/dist/systems/elevator/elevator-opening-sync.test.js +0 -146
  367. package/dist/systems/elevator/elevator-runtime.test.d.ts +0 -2
  368. package/dist/systems/elevator/elevator-runtime.test.d.ts.map +0 -1
  369. package/dist/systems/elevator/elevator-runtime.test.js +0 -64
  370. package/dist/systems/stair/stair-opening-preview.test.d.ts +0 -2
  371. package/dist/systems/stair/stair-opening-preview.test.d.ts.map +0 -1
  372. package/dist/systems/stair/stair-opening-preview.test.js +0 -80
  373. package/dist/systems/stair/stair-opening-sync.test.d.ts +0 -2
  374. package/dist/systems/stair/stair-opening-sync.test.d.ts.map +0 -1
  375. package/dist/systems/stair/stair-opening-sync.test.js +0 -446
  376. package/dist/utils/clone-scene-graph.test.d.ts +0 -2
  377. package/dist/utils/clone-scene-graph.test.d.ts.map +0 -1
  378. package/dist/utils/clone-scene-graph.test.js +0 -59
@@ -1 +1 @@
1
- {"version":3,"file":"door.d.ts","sourceRoot":"","sources":["../../../src/schema/nodes/door.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,WAAW;;;;;;;;;;;iBAWtB,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;AAErD,eAAO,MAAM,YAAY;;;EAAiC,CAAA;AAC1D,eAAO,MAAM,QAAQ;;;;;;;;;;;EAWnB,CAAA;AACF,eAAO,MAAM,cAAc;;;;;EAAoD,CAAA;AAE/E,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AACvD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAA;AAC/C,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAE3D,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuFnB,CAAA;AAEF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAA"}
1
+ {"version":3,"file":"door.d.ts","sourceRoot":"","sources":["../../../src/schema/nodes/door.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,WAAW;;;;;;;;;;;iBAWtB,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;AAErD,eAAO,MAAM,YAAY;;;EAAiC,CAAA;AAC1D,eAAO,MAAM,uBAAuB;;;EAAgC,CAAA;AACpE,eAAO,MAAM,yBAAyB;;;;;EAKpC,CAAA;AACF,eAAO,MAAM,QAAQ;;;;;;;;;;;EAWnB,CAAA;AACF,eAAO,MAAM,cAAc;;;;;EAAoD,CAAA;AAE/E,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AACvD,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAC7E,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AACjF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAA;AAC/C,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAE3D,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiHnB,CAAA;AAEF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAA"}
@@ -13,6 +13,13 @@ export const DoorSegment = z.object({
13
13
  panelInset: z.number().default(0.04),
14
14
  });
15
15
  export const DoorCategory = z.enum(['interior', 'garage']);
16
+ export const OpeningConstructionType = z.enum(['framed', 'masonry']);
17
+ export const OpeningDimensionReference = z.enum([
18
+ 'nominal',
19
+ 'rough-opening',
20
+ 'masonry-opening',
21
+ 'finish-opening',
22
+ ]);
16
23
  export const DoorType = z.enum([
17
24
  'hinged',
18
25
  'double',
@@ -30,13 +37,38 @@ export const DoorNode = BaseNode.extend({
30
37
  id: objectId('door'),
31
38
  type: nodeType('door'),
32
39
  material: MaterialSchema.optional(),
40
+ // Per-slot material overrides on the unified slot model. Keys: `panel` (the
41
+ // door body), `glass`. Value = a `MaterialRef` (`library:<id>` / `scene:<id>`).
42
+ // Absent = the body/glass default. Mirrors `ShelfNode.slots`.
43
+ slots: z.record(z.string(), z.string()).optional(),
33
44
  position: z.tuple([z.number(), z.number(), z.number()]).default([0, 0, 0]),
34
45
  rotation: z.tuple([z.number(), z.number(), z.number()]).default([0, 0, 0]),
35
46
  side: z.enum(['front', 'back']).optional(),
36
47
  wallId: z.string().optional(),
48
+ // Alternative host: a roof-segment's generated wall face (base wall
49
+ // under the roof or a coplanar gable end). When set, `position` is
50
+ // FACE-LOCAL — [u along the face, v height, z from the wall mid-plane]
51
+ // — exactly the wall-child convention; the renderer mounts the node
52
+ // inside the face frame (`getRoofWallFaceFrame`), which is what makes
53
+ // hosted children track segment resizes live.
54
+ roofSegmentId: z.string().optional(),
55
+ roofFace: z.enum(['front', 'back', 'right', 'left']).optional(),
37
56
  // Overall dimensions
38
57
  width: z.number().default(0.9),
39
58
  height: z.number().default(2.1),
59
+ // Construction-document identity. `mark` overrides the deterministic
60
+ // level fallback (101, 102, ...). Rough-opening dimensions stay optional
61
+ // because they are manufacturer/framing inputs, not safe derivations from
62
+ // the nominal modeled size.
63
+ mark: z.string().trim().max(16).optional(),
64
+ constructionType: OpeningConstructionType.default('framed'),
65
+ dimensionReference: OpeningDimensionReference.default('nominal'),
66
+ roughOpeningWidth: z.number().positive().optional(),
67
+ roughOpeningHeight: z.number().positive().optional(),
68
+ masonryOpeningWidth: z.number().positive().optional(),
69
+ masonryOpeningHeight: z.number().positive().optional(),
70
+ finishOpeningWidth: z.number().positive().optional(),
71
+ finishOpeningHeight: z.number().positive().optional(),
40
72
  // Door family
41
73
  doorCategory: DoorCategory.default('interior'),
42
74
  doorType: DoorType.default('hinged'),
@@ -49,7 +49,7 @@ export declare const DormerNode: z.ZodObject<{
49
49
  type: z.ZodDefault<z.ZodLiteral<"dormer">>;
50
50
  material: z.ZodOptional<z.ZodObject<{
51
51
  id: z.ZodOptional<z.ZodString>;
52
- preset: z.ZodOptional<z.ZodEnum<{
52
+ preset: z.ZodOptional<z.ZodCatch<z.ZodEnum<{
53
53
  custom: "custom";
54
54
  white: "white";
55
55
  brick: "brick";
@@ -60,7 +60,7 @@ export declare const DormerNode: z.ZodObject<{
60
60
  plaster: "plaster";
61
61
  tile: "tile";
62
62
  marble: "marble";
63
- }>>;
63
+ }>>>;
64
64
  properties: z.ZodOptional<z.ZodObject<{
65
65
  color: z.ZodDefault<z.ZodString>;
66
66
  roughness: z.ZodDefault<z.ZodNumber>;
@@ -82,7 +82,7 @@ export declare const DormerNode: z.ZodObject<{
82
82
  materialPreset: z.ZodOptional<z.ZodString>;
83
83
  topMaterial: z.ZodOptional<z.ZodObject<{
84
84
  id: z.ZodOptional<z.ZodString>;
85
- preset: z.ZodOptional<z.ZodEnum<{
85
+ preset: z.ZodOptional<z.ZodCatch<z.ZodEnum<{
86
86
  custom: "custom";
87
87
  white: "white";
88
88
  brick: "brick";
@@ -93,7 +93,7 @@ export declare const DormerNode: z.ZodObject<{
93
93
  plaster: "plaster";
94
94
  tile: "tile";
95
95
  marble: "marble";
96
- }>>;
96
+ }>>>;
97
97
  properties: z.ZodOptional<z.ZodObject<{
98
98
  color: z.ZodDefault<z.ZodString>;
99
99
  roughness: z.ZodDefault<z.ZodNumber>;
@@ -115,7 +115,7 @@ export declare const DormerNode: z.ZodObject<{
115
115
  topMaterialPreset: z.ZodOptional<z.ZodString>;
116
116
  sideMaterial: z.ZodOptional<z.ZodObject<{
117
117
  id: z.ZodOptional<z.ZodString>;
118
- preset: z.ZodOptional<z.ZodEnum<{
118
+ preset: z.ZodOptional<z.ZodCatch<z.ZodEnum<{
119
119
  custom: "custom";
120
120
  white: "white";
121
121
  brick: "brick";
@@ -126,7 +126,7 @@ export declare const DormerNode: z.ZodObject<{
126
126
  plaster: "plaster";
127
127
  tile: "tile";
128
128
  marble: "marble";
129
- }>>;
129
+ }>>>;
130
130
  properties: z.ZodOptional<z.ZodObject<{
131
131
  color: z.ZodDefault<z.ZodString>;
132
132
  roughness: z.ZodDefault<z.ZodNumber>;
@@ -148,7 +148,7 @@ export declare const DormerNode: z.ZodObject<{
148
148
  sideMaterialPreset: z.ZodOptional<z.ZodString>;
149
149
  wallMaterial: z.ZodOptional<z.ZodObject<{
150
150
  id: z.ZodOptional<z.ZodString>;
151
- preset: z.ZodOptional<z.ZodEnum<{
151
+ preset: z.ZodOptional<z.ZodCatch<z.ZodEnum<{
152
152
  custom: "custom";
153
153
  white: "white";
154
154
  brick: "brick";
@@ -159,7 +159,7 @@ export declare const DormerNode: z.ZodObject<{
159
159
  plaster: "plaster";
160
160
  tile: "tile";
161
161
  marble: "marble";
162
- }>>;
162
+ }>>>;
163
163
  properties: z.ZodOptional<z.ZodObject<{
164
164
  color: z.ZodDefault<z.ZodString>;
165
165
  roughness: z.ZodDefault<z.ZodNumber>;
@@ -76,7 +76,7 @@ export const DormerNode = BaseNode.extend({
76
76
  windowCornerRadii: z
77
77
  .tuple([z.number(), z.number(), z.number(), z.number()])
78
78
  .default(DEFAULT_CORNER_RADII),
79
- windowSill: z.boolean().default(true),
79
+ windowSill: z.boolean().default(false),
80
80
  windowSillDepth: z.number().default(DORMER_DEFAULTS.WINDOW_SILL_DEPTH),
81
81
  windowSillThickness: z.number().default(DORMER_DEFAULTS.WINDOW_SILL_THICKNESS),
82
82
  }).describe(dedent `
@@ -19,7 +19,7 @@ export declare const DownspoutNode: z.ZodObject<{
19
19
  type: z.ZodDefault<z.ZodLiteral<"downspout">>;
20
20
  material: z.ZodOptional<z.ZodObject<{
21
21
  id: z.ZodOptional<z.ZodString>;
22
- preset: z.ZodOptional<z.ZodEnum<{
22
+ preset: z.ZodOptional<z.ZodCatch<z.ZodEnum<{
23
23
  custom: "custom";
24
24
  white: "white";
25
25
  brick: "brick";
@@ -30,7 +30,7 @@ export declare const DownspoutNode: z.ZodObject<{
30
30
  plaster: "plaster";
31
31
  tile: "tile";
32
32
  marble: "marble";
33
- }>>;
33
+ }>>>;
34
34
  properties: z.ZodOptional<z.ZodObject<{
35
35
  color: z.ZodDefault<z.ZodString>;
36
36
  roughness: z.ZodDefault<z.ZodNumber>;
@@ -0,0 +1,91 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Duct fitting — the junction pieces that connect round duct segments:
4
+ * elbows (direction change), tees (branch takeoff), reducers (diameter
5
+ * transition).
6
+ *
7
+ * Phase 2 of the HVAC node system. Fittings are the first kind to expose
8
+ * typed ports (`def.ports`) — placement tools snap duct endpoints onto a
9
+ * fitting's collars, and the future system graph walks ports to decide
10
+ * connectivity.
11
+ *
12
+ * `position` is level-local meters; `rotation` is an XYZ euler in radians
13
+ * so a fitting can turn a horizontal run vertical (riser elbows).
14
+ *
15
+ * Local-frame conventions (before `rotation` is applied):
16
+ * - elbow: inlet faces -X, outlet turned by `angle` degrees in the
17
+ * XZ plane (90° → +Z).
18
+ * - tee: run along the X axis (ports face -X and +X), branch
19
+ * collar at `branchAngle`° from the +X (outlet) axis in the
20
+ * XZ plane — 90° a square straight tee, <90° a lateral
21
+ * leaning downstream toward the outlet, >90° leaning upstream
22
+ * toward the inlet — sized at `diameter2`.
23
+ * - cross: four-way junction — run along the X axis (ports face -X
24
+ * and +X) at the run profile, two opposed branches square to
25
+ * the run along ±Z (branch faces +Z, branch2 faces -Z) at the
26
+ * branch profile (`shape2` / `diameter2`).
27
+ * - reducer: inlet at `diameter` faces -X, outlet at `diameter2`
28
+ * faces +X.
29
+ * - transition: square-to-round — rect end at `width` × `height` faces
30
+ * -X, round end at `diameter2` faces +X. `diameter` carries
31
+ * the rect end's area-equivalent round size.
32
+ */
33
+ export declare const DuctFittingNode: z.ZodObject<{
34
+ object: z.ZodDefault<z.ZodLiteral<"node">>;
35
+ name: z.ZodOptional<z.ZodString>;
36
+ parentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
37
+ visible: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
38
+ camera: z.ZodOptional<z.ZodObject<{
39
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
40
+ target: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
41
+ mode: z.ZodDefault<z.ZodEnum<{
42
+ perspective: "perspective";
43
+ orthographic: "orthographic";
44
+ }>>;
45
+ fov: z.ZodOptional<z.ZodNumber>;
46
+ zoom: z.ZodOptional<z.ZodNumber>;
47
+ }, z.core.$strip>>;
48
+ metadata: z.ZodDefault<z.ZodOptional<z.ZodJSONSchema>>;
49
+ id: z.ZodDefault<z.ZodTemplateLiteral<`duct-fitting_${string}`>>;
50
+ type: z.ZodDefault<z.ZodLiteral<"duct-fitting">>;
51
+ position: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
52
+ rotation: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
53
+ fittingType: z.ZodDefault<z.ZodEnum<{
54
+ elbow: "elbow";
55
+ tee: "tee";
56
+ cross: "cross";
57
+ reducer: "reducer";
58
+ transition: "transition";
59
+ }>>;
60
+ shape: z.ZodDefault<z.ZodEnum<{
61
+ round: "round";
62
+ rect: "rect";
63
+ oval: "oval";
64
+ }>>;
65
+ width: z.ZodDefault<z.ZodNumber>;
66
+ height: z.ZodDefault<z.ZodNumber>;
67
+ shape2: z.ZodDefault<z.ZodEnum<{
68
+ round: "round";
69
+ rect: "rect";
70
+ oval: "oval";
71
+ }>>;
72
+ width2: z.ZodDefault<z.ZodNumber>;
73
+ height2: z.ZodDefault<z.ZodNumber>;
74
+ angle: z.ZodDefault<z.ZodNumber>;
75
+ branchAngle: z.ZodDefault<z.ZodNumber>;
76
+ diameter: z.ZodDefault<z.ZodNumber>;
77
+ diameter2: z.ZodDefault<z.ZodNumber>;
78
+ ductMaterial: z.ZodDefault<z.ZodEnum<{
79
+ "sheet-metal": "sheet-metal";
80
+ flex: "flex";
81
+ "duct-board": "duct-board";
82
+ }>>;
83
+ system: z.ZodDefault<z.ZodEnum<{
84
+ supply: "supply";
85
+ return: "return";
86
+ }>>;
87
+ slots: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
88
+ }, z.core.$strip>;
89
+ export type DuctFittingNode = z.infer<typeof DuctFittingNode>;
90
+ export type DuctFittingNodeId = DuctFittingNode['id'];
91
+ //# sourceMappingURL=duct-fitting.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"duct-fitting.d.ts","sourceRoot":"","sources":["../../../src/schema/nodes/duct-fitting.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2D3B,CAAA;AACD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AAC7D,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC,IAAI,CAAC,CAAA"}
@@ -0,0 +1,92 @@
1
+ import dedent from 'dedent';
2
+ import { z } from 'zod';
3
+ import { BaseNode, nodeType, objectId } from '../base';
4
+ /**
5
+ * Duct fitting — the junction pieces that connect round duct segments:
6
+ * elbows (direction change), tees (branch takeoff), reducers (diameter
7
+ * transition).
8
+ *
9
+ * Phase 2 of the HVAC node system. Fittings are the first kind to expose
10
+ * typed ports (`def.ports`) — placement tools snap duct endpoints onto a
11
+ * fitting's collars, and the future system graph walks ports to decide
12
+ * connectivity.
13
+ *
14
+ * `position` is level-local meters; `rotation` is an XYZ euler in radians
15
+ * so a fitting can turn a horizontal run vertical (riser elbows).
16
+ *
17
+ * Local-frame conventions (before `rotation` is applied):
18
+ * - elbow: inlet faces -X, outlet turned by `angle` degrees in the
19
+ * XZ plane (90° → +Z).
20
+ * - tee: run along the X axis (ports face -X and +X), branch
21
+ * collar at `branchAngle`° from the +X (outlet) axis in the
22
+ * XZ plane — 90° a square straight tee, <90° a lateral
23
+ * leaning downstream toward the outlet, >90° leaning upstream
24
+ * toward the inlet — sized at `diameter2`.
25
+ * - cross: four-way junction — run along the X axis (ports face -X
26
+ * and +X) at the run profile, two opposed branches square to
27
+ * the run along ±Z (branch faces +Z, branch2 faces -Z) at the
28
+ * branch profile (`shape2` / `diameter2`).
29
+ * - reducer: inlet at `diameter` faces -X, outlet at `diameter2`
30
+ * faces +X.
31
+ * - transition: square-to-round — rect end at `width` × `height` faces
32
+ * -X, round end at `diameter2` faces +X. `diameter` carries
33
+ * the rect end's area-equivalent round size.
34
+ */
35
+ export const DuctFittingNode = BaseNode.extend({
36
+ id: objectId('duct-fitting'),
37
+ type: nodeType('duct-fitting'),
38
+ // Level-local meters.
39
+ position: z.tuple([z.number(), z.number(), z.number()]).default([0, 0, 0]),
40
+ // XYZ euler radians.
41
+ rotation: z.tuple([z.number(), z.number(), z.number()]).default([0, 0, 0]),
42
+ fittingType: z.enum(['elbow', 'tee', 'cross', 'reducer', 'transition']).default('elbow'),
43
+ // Run-leg cross-section: round collars, or a rect / flat-oval profile
44
+ // matching the trunk the fitting sits in. Reducers ignore the shape.
45
+ // When non-round, `diameter` carries the area-equivalent round size
46
+ // (drives leg lengths + advertised ports).
47
+ shape: z.enum(['round', 'rect', 'oval']).default('rect'),
48
+ // Rect / oval run-leg profile in inches (used when shape ≠ 'round').
49
+ width: z.number().min(4).max(60).default(14),
50
+ height: z.number().min(3).max(40).default(8),
51
+ // Tee / cross BRANCH cross-section: a round collar at `diameter2` or a
52
+ // rect / oval profile matching the duct drawn off the tap. When
53
+ // non-round, `diameter2` carries the branch's area-equivalent round
54
+ // size. A cross's two opposed branches share this one profile.
55
+ shape2: z.enum(['round', 'rect', 'oval']).default('rect'),
56
+ // Rect / oval branch profile in inches (used when shape2 ≠ 'round').
57
+ width2: z.number().min(4).max(60).default(14),
58
+ height2: z.number().min(3).max(40).default(8),
59
+ // Elbow turn angle in degrees. Residential sheet-metal elbows come in
60
+ // 90° and 45°; adjustable elbows cover the range between. 0° is a
61
+ // straight coupling — what an elbow flattens to when its run is dragged
62
+ // into line with the fixed collar.
63
+ angle: z.number().min(0).max(90).default(90),
64
+ // Tee branch angle in degrees, measured off the +X (outlet) axis: 90°
65
+ // is a square straight tee, <90° a lateral whose branch sweeps
66
+ // downstream toward the outlet (flow merges), >90° leans the branch
67
+ // upstream toward the inlet. Ignored by every other fitting type.
68
+ branchAngle: z.number().min(45).max(135).default(90),
69
+ // Main (run/inlet) nominal diameter in inches.
70
+ diameter: z.number().min(2).max(48).default(6),
71
+ // Secondary diameter in inches — tee branch collar, reducer outlet.
72
+ // Ignored by elbows.
73
+ diameter2: z.number().min(2).max(48).default(6),
74
+ ductMaterial: z.enum(['sheet-metal', 'flex', 'duct-board']).default('sheet-metal'),
75
+ system: z.enum(['supply', 'return']).default('supply'),
76
+ slots: z.record(z.string(), z.string()).optional(),
77
+ }).describe(dedent `
78
+ Duct fitting - elbow, tee, cross, reducer, or square-to-round transition between duct runs.
79
+ - position: [x, y, z] level-local meters
80
+ - rotation: [x, y, z] euler radians
81
+ - fittingType: elbow | tee | cross | reducer | transition (rect end -X, round end +X)
82
+ - shape: round | rect | oval run legs (matches the trunk; ignored by reducer / transition)
83
+ - width / height: rect / oval run-leg profile in inches (transition: the rect end)
84
+ - shape2: round | rect | oval tee / cross branch (matches the duct drawn off the tap)
85
+ - width2 / height2: rect / oval branch profile in inches
86
+ - angle: elbow turn in degrees (45 or 90 typical)
87
+ - branchAngle: tee branch angle off the outlet axis (90 straight tee, 45 downstream lateral, 135 upstream); cross branches are always square
88
+ - diameter: main nominal diameter in inches
89
+ - diameter2: tee / cross branch / reducer outlet / transition round-end diameter in inches
90
+ - ductMaterial: sheet-metal | flex | duct-board
91
+ - system: supply | return
92
+ `);
@@ -0,0 +1,61 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Round duct segment — a polyline of 3D points connected by cylindrical
4
+ * duct sections. Forced-air HVAC supply/return runs in US residential.
5
+ *
6
+ * Phase 1 of the HVAC node system: just the geometry primitive. Fittings,
7
+ * terminals, equipment, and typed ports come in later slices.
8
+ *
9
+ * Path coordinates are level-local meters: [x, y, z] tuples. y is height
10
+ * above the level floor. A duct hung at ceiling height through three points
11
+ * is e.g. `[[0, 2.6, 0], [3, 2.6, 0], [3, 2.6, 4]]`.
12
+ *
13
+ * Diameters are nominal US round-duct sizes in inches; the geometry
14
+ * builder converts to meters for the cylinder radius.
15
+ */
16
+ export declare const DuctSegmentNode: z.ZodObject<{
17
+ object: z.ZodDefault<z.ZodLiteral<"node">>;
18
+ name: z.ZodOptional<z.ZodString>;
19
+ parentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
20
+ visible: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
21
+ camera: z.ZodOptional<z.ZodObject<{
22
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
23
+ target: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
24
+ mode: z.ZodDefault<z.ZodEnum<{
25
+ perspective: "perspective";
26
+ orthographic: "orthographic";
27
+ }>>;
28
+ fov: z.ZodOptional<z.ZodNumber>;
29
+ zoom: z.ZodOptional<z.ZodNumber>;
30
+ }, z.core.$strip>>;
31
+ metadata: z.ZodDefault<z.ZodOptional<z.ZodJSONSchema>>;
32
+ id: z.ZodDefault<z.ZodTemplateLiteral<`duct-segment_${string}`>>;
33
+ type: z.ZodDefault<z.ZodLiteral<"duct-segment">>;
34
+ path: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
35
+ shape: z.ZodDefault<z.ZodEnum<{
36
+ round: "round";
37
+ rect: "rect";
38
+ oval: "oval";
39
+ }>>;
40
+ diameter: z.ZodDefault<z.ZodNumber>;
41
+ width: z.ZodDefault<z.ZodNumber>;
42
+ height: z.ZodDefault<z.ZodNumber>;
43
+ roll: z.ZodDefault<z.ZodNumber>;
44
+ ductMaterial: z.ZodDefault<z.ZodEnum<{
45
+ spiral: "spiral";
46
+ "sheet-metal": "sheet-metal";
47
+ flex: "flex";
48
+ "duct-board": "duct-board";
49
+ }>>;
50
+ seamDetail: z.ZodDefault<z.ZodBoolean>;
51
+ insulated: z.ZodDefault<z.ZodBoolean>;
52
+ insulationR: z.ZodDefault<z.ZodNumber>;
53
+ system: z.ZodDefault<z.ZodEnum<{
54
+ supply: "supply";
55
+ return: "return";
56
+ }>>;
57
+ slots: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
58
+ }, z.core.$strip>;
59
+ export type DuctSegmentNode = z.infer<typeof DuctSegmentNode>;
60
+ export type DuctSegmentNodeId = DuctSegmentNode['id'];
61
+ //# sourceMappingURL=duct-segment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"duct-segment.d.ts","sourceRoot":"","sources":["../../../src/schema/nodes/duct-segment.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyD3B,CAAA;AACD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AAC7D,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC,IAAI,CAAC,CAAA"}
@@ -0,0 +1,73 @@
1
+ import dedent from 'dedent';
2
+ import { z } from 'zod';
3
+ import { BaseNode, nodeType, objectId } from '../base';
4
+ /**
5
+ * Round duct segment — a polyline of 3D points connected by cylindrical
6
+ * duct sections. Forced-air HVAC supply/return runs in US residential.
7
+ *
8
+ * Phase 1 of the HVAC node system: just the geometry primitive. Fittings,
9
+ * terminals, equipment, and typed ports come in later slices.
10
+ *
11
+ * Path coordinates are level-local meters: [x, y, z] tuples. y is height
12
+ * above the level floor. A duct hung at ceiling height through three points
13
+ * is e.g. `[[0, 2.6, 0], [3, 2.6, 0], [3, 2.6, 4]]`.
14
+ *
15
+ * Diameters are nominal US round-duct sizes in inches; the geometry
16
+ * builder converts to meters for the cylinder radius.
17
+ */
18
+ export const DuctSegmentNode = BaseNode.extend({
19
+ id: objectId('duct-segment'),
20
+ type: nodeType('duct-segment'),
21
+ // Polyline path in level-local meters. Minimum two points (start, end).
22
+ path: z.array(z.tuple([z.number(), z.number(), z.number()])).min(2),
23
+ // Cross-section. Round is the branch default; rect is the trunk /
24
+ // plenum profile (real US systems: rect trunk, round branches); oval
25
+ // is the flat-oval profile (two semicircles of the duct height joined
26
+ // by flat sides) used where round won't fit a joist bay.
27
+ shape: z.enum(['round', 'rect', 'oval']).default('round'),
28
+ // Nominal inner diameter in inches (round shape). Common residential
29
+ // sizes 4"–14"; we accept any positive number so the inspector slider
30
+ // stays ergonomic and larger commercial sizes load without a schema bump.
31
+ diameter: z.number().min(2).max(48).default(6),
32
+ // Rect / oval cross-section in inches: width is the horizontal face,
33
+ // height the vertical. Typical residential trunks 12×8 – 24×10. For
34
+ // oval, height is also the end-cap semicircle diameter (width ≥ height).
35
+ width: z.number().min(4).max(60).default(14),
36
+ height: z.number().min(3).max(40).default(8),
37
+ // Cross-section roll (radians) about the run direction. 0 = width
38
+ // horizontal / height vertical (the natural orientation the geometry
39
+ // derives from direction). Non-zero only on a rect riser turned out of
40
+ // the horizontal plane, so its profile stays continuous through the
41
+ // elbow it left instead of snapping to the world-axis fallback.
42
+ roll: z.number().default(0),
43
+ // Construction material. Spiral is round rigid sheet metal with the
44
+ // helical lock seam drawn on the body (round shape only — rect / oval
45
+ // runs render it as plain sheet metal).
46
+ ductMaterial: z.enum(['sheet-metal', 'spiral', 'flex', 'duct-board']).default('flex'),
47
+ // Whether to draw the construction body detail (spiral lock seam /
48
+ // flex wire corrugation) on round runs. Off renders a smooth body —
49
+ // lighter on the eyes and the GPU in dense scenes.
50
+ seamDetail: z.boolean().default(false),
51
+ // Whether the run wears its external insulation wrap (drawn as a
52
+ // translucent shell). Off by default — bare duct.
53
+ insulated: z.boolean().default(false),
54
+ // External insulation R-value (used when insulated). Common flex-duct
55
+ // values are R-4.2, R-6, R-8.
56
+ insulationR: z.number().min(0).max(12).default(0.5),
57
+ // Which side of the air loop this segment belongs to. Drives visual tint
58
+ // and (in later slices) System graph membership.
59
+ system: z.enum(['supply', 'return']).default('supply'),
60
+ slots: z.record(z.string(), z.string()).optional(),
61
+ }).describe(dedent `
62
+ Duct segment - polyline of 3D points connected by duct sections.
63
+ - path: list of [x, y, z] points in level-local meters (min 2)
64
+ - shape: round (branches) | rect (trunks / plenums) | oval (flat-oval, tight joist bays)
65
+ - diameter: nominal inner diameter in inches for round (typ. 4-14 residential)
66
+ - width / height: rect / oval cross-section in inches (typ. 12x8 - 24x10 trunks)
67
+ - roll: cross-section roll in radians (0 = upright; set on risers to stay continuous through their elbow)
68
+ - ductMaterial: sheet-metal | spiral (round rigid, helical seam) | flex | duct-board
69
+ - seamDetail: draw the spiral seam / flex corrugation on round runs (default off)
70
+ - insulated: whether the run wears its external insulation wrap (default off)
71
+ - insulationR: external insulation R-value when insulated (4, 6, 8 typical)
72
+ - system: supply | return (drives visual tint)
73
+ `);
@@ -0,0 +1,58 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Duct terminal — where the air loop meets the room: supply registers,
4
+ * ceiling diffusers, return grilles.
5
+ *
6
+ * Phase 3 of the HVAC node system. Each terminal exposes a single typed
7
+ * port at its collar (behind/above/below the face depending on mount),
8
+ * so duct runs end onto it like any other port.
9
+ *
10
+ * `position` is the center of the visible face in level-local meters —
11
+ * floor registers at y≈0, ceiling diffusers at ceiling height, wall
12
+ * registers at their height on the wall. `rotation` is yaw radians.
13
+ */
14
+ export declare const DuctTerminalNode: z.ZodObject<{
15
+ object: z.ZodDefault<z.ZodLiteral<"node">>;
16
+ name: z.ZodOptional<z.ZodString>;
17
+ parentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
18
+ visible: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
19
+ camera: z.ZodOptional<z.ZodObject<{
20
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
21
+ target: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
22
+ mode: z.ZodDefault<z.ZodEnum<{
23
+ perspective: "perspective";
24
+ orthographic: "orthographic";
25
+ }>>;
26
+ fov: z.ZodOptional<z.ZodNumber>;
27
+ zoom: z.ZodOptional<z.ZodNumber>;
28
+ }, z.core.$strip>>;
29
+ metadata: z.ZodDefault<z.ZodOptional<z.ZodJSONSchema>>;
30
+ id: z.ZodDefault<z.ZodTemplateLiteral<`duct-terminal_${string}`>>;
31
+ type: z.ZodDefault<z.ZodLiteral<"duct-terminal">>;
32
+ position: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
33
+ rotation: z.ZodDefault<z.ZodNumber>;
34
+ supportSlabId: z.ZodOptional<z.ZodString>;
35
+ terminalType: z.ZodDefault<z.ZodEnum<{
36
+ "supply-register": "supply-register";
37
+ diffuser: "diffuser";
38
+ "return-grille": "return-grille";
39
+ }>>;
40
+ mount: z.ZodDefault<z.ZodEnum<{
41
+ wall: "wall";
42
+ ceiling: "ceiling";
43
+ floor: "floor";
44
+ }>>;
45
+ width: z.ZodDefault<z.ZodNumber>;
46
+ depth: z.ZodDefault<z.ZodNumber>;
47
+ collarShape: z.ZodDefault<z.ZodEnum<{
48
+ round: "round";
49
+ rect: "rect";
50
+ oval: "oval";
51
+ }>>;
52
+ collarDiameter: z.ZodDefault<z.ZodNumber>;
53
+ collarWidth: z.ZodDefault<z.ZodNumber>;
54
+ collarHeight: z.ZodDefault<z.ZodNumber>;
55
+ }, z.core.$strip>;
56
+ export type DuctTerminalNode = z.infer<typeof DuctTerminalNode>;
57
+ export type DuctTerminalNodeId = DuctTerminalNode['id'];
58
+ //# sourceMappingURL=duct-terminal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"duct-terminal.d.ts","sourceRoot":"","sources":["../../../src/schema/nodes/duct-terminal.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuC5B,CAAA;AACD,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAC/D,MAAM,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAA"}
@@ -0,0 +1,53 @@
1
+ import dedent from 'dedent';
2
+ import { z } from 'zod';
3
+ import { BaseNode, nodeType, objectId } from '../base';
4
+ /**
5
+ * Duct terminal — where the air loop meets the room: supply registers,
6
+ * ceiling diffusers, return grilles.
7
+ *
8
+ * Phase 3 of the HVAC node system. Each terminal exposes a single typed
9
+ * port at its collar (behind/above/below the face depending on mount),
10
+ * so duct runs end onto it like any other port.
11
+ *
12
+ * `position` is the center of the visible face in level-local meters —
13
+ * floor registers at y≈0, ceiling diffusers at ceiling height, wall
14
+ * registers at their height on the wall. `rotation` is yaw radians.
15
+ */
16
+ export const DuctTerminalNode = BaseNode.extend({
17
+ id: objectId('duct-terminal'),
18
+ type: nodeType('duct-terminal'),
19
+ // Level-local meters — center of the face.
20
+ position: z.tuple([z.number(), z.number(), z.number()]).default([0, 0, 0]),
21
+ // Yaw in radians.
22
+ rotation: z.number().default(0),
23
+ // Persisted slab-support host — see ItemNode.supportSlabId for the rules.
24
+ supportSlabId: z.string().optional(),
25
+ terminalType: z.enum(['supply-register', 'diffuser', 'return-grille']).default('supply-register'),
26
+ // Which surface the terminal mounts on. Drives face orientation and
27
+ // which way the collar (and its port) points.
28
+ mount: z.enum(['floor', 'ceiling', 'wall']).default('floor'),
29
+ // Face dimensions in meters. Typical floor register ~0.30 × 0.15;
30
+ // ceiling diffusers are square (0.6 × 0.6); return grilles run large.
31
+ width: z.number().min(0.1).max(1.5).default(0.3),
32
+ depth: z.number().min(0.05).max(1.5).default(0.15),
33
+ // Collar cross-section on the duct side. Round is the default; rect and
34
+ // oval (flat-oval) match the duct shapes a run might end with.
35
+ collarShape: z.enum(['round', 'rect', 'oval']).default('round'),
36
+ // Round collar diameter in inches on the duct side.
37
+ collarDiameter: z.number().min(4).max(20).default(6),
38
+ // Rect / oval collar cross-section in inches: width is the horizontal
39
+ // face, height the vertical. For oval, height is also the end-cap
40
+ // semicircle diameter (width ≥ height).
41
+ collarWidth: z.number().min(4).max(20).default(10),
42
+ collarHeight: z.number().min(3).max(20).default(6),
43
+ }).describe(dedent `
44
+ Duct terminal - supply register, ceiling diffuser, or return grille.
45
+ - position: [x, y, z] level-local meters, center of the face
46
+ - rotation: yaw radians
47
+ - terminalType: supply-register | diffuser | return-grille (grille = return side)
48
+ - mount: floor | ceiling | wall - face orientation + collar direction
49
+ - width / depth: face size in meters
50
+ - collarShape: round | rect | oval - duct-side collar cross-section
51
+ - collarDiameter: round collar diameter in inches
52
+ - collarWidth / collarHeight: rect / oval collar cross-section in inches
53
+ `);
@@ -36,7 +36,7 @@ export declare const ElevatorNode: z.ZodObject<{
36
36
  type: z.ZodDefault<z.ZodLiteral<"elevator">>;
37
37
  material: z.ZodOptional<z.ZodObject<{
38
38
  id: z.ZodOptional<z.ZodString>;
39
- preset: z.ZodOptional<z.ZodEnum<{
39
+ preset: z.ZodOptional<z.ZodCatch<z.ZodEnum<{
40
40
  custom: "custom";
41
41
  white: "white";
42
42
  brick: "brick";
@@ -47,7 +47,7 @@ export declare const ElevatorNode: z.ZodObject<{
47
47
  plaster: "plaster";
48
48
  tile: "tile";
49
49
  marble: "marble";
50
- }>>;
50
+ }>>>;
51
51
  properties: z.ZodOptional<z.ZodObject<{
52
52
  color: z.ZodDefault<z.ZodString>;
53
53
  roughness: z.ZodDefault<z.ZodNumber>;
@@ -67,6 +67,7 @@ export declare const ElevatorNode: z.ZodObject<{
67
67
  }, z.core.$strip>>;
68
68
  }, z.core.$strip>>;
69
69
  materialPreset: z.ZodOptional<z.ZodString>;
70
+ slots: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
70
71
  position: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
71
72
  rotation: z.ZodDefault<z.ZodNumber>;
72
73
  width: z.ZodDefault<z.ZodNumber>;
@@ -1 +1 @@
1
- {"version":3,"file":"elevator.d.ts","sourceRoot":"","sources":["../../../src/schema/nodes/elevator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,iBAAiB;;;;EAA4D,CAAA;AAC1F,eAAO,MAAM,sBAAsB;;;;EAA4D,CAAA;AAC/F,eAAO,MAAM,kBAAkB;;;EAA6B,CAAA;AAE5D,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAC3E,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AACjE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAEnE,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgDxB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA"}
1
+ {"version":3,"file":"elevator.d.ts","sourceRoot":"","sources":["../../../src/schema/nodes/elevator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,iBAAiB;;;;EAA4D,CAAA;AAC1F,eAAO,MAAM,sBAAsB;;;;EAA4D,CAAA;AAC/F,eAAO,MAAM,kBAAkB;;;EAA6B,CAAA;AAE5D,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAC3E,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AACjE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAEnE,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmDxB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA"}
@@ -10,6 +10,9 @@ export const ElevatorNode = BaseNode.extend({
10
10
  type: nodeType('elevator'),
11
11
  material: MaterialSchema.optional(),
12
12
  materialPreset: z.string().optional(),
13
+ // Unified paint-slot refs (`scene:`/`library:` MaterialRef per slot id),
14
+ // matching the slot model items/slab/shelf use. Absent = declared default.
15
+ slots: z.record(z.string(), z.string()).optional(),
13
16
  position: z.tuple([z.number(), z.number(), z.number()]).default([0, 0, 0]),
14
17
  // Rotation around the Y axis in radians.
15
18
  rotation: z.number().default(0),