@pascal-app/core 0.8.0 → 0.9.2

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 (471) hide show
  1. package/dist/events/bus.d.ts +67 -13
  2. package/dist/events/bus.d.ts.map +1 -1
  3. package/dist/hooks/scene-registry/item-clip-registry.d.ts +18 -0
  4. package/dist/hooks/scene-registry/item-clip-registry.d.ts.map +1 -0
  5. package/dist/hooks/scene-registry/item-clip-registry.js +10 -0
  6. package/dist/hooks/scene-registry/scene-registry.d.ts +14 -23
  7. package/dist/hooks/scene-registry/scene-registry.d.ts.map +1 -1
  8. package/dist/hooks/scene-registry/scene-registry.js +59 -26
  9. package/dist/hooks/scene-registry/scene-registry.test.d.ts +2 -0
  10. package/dist/hooks/scene-registry/scene-registry.test.d.ts.map +1 -0
  11. package/dist/hooks/scene-registry/scene-registry.test.js +26 -0
  12. package/dist/hooks/spatial-grid/floor-placed-elevation.d.ts +14 -0
  13. package/dist/hooks/spatial-grid/floor-placed-elevation.d.ts.map +1 -0
  14. package/dist/hooks/spatial-grid/floor-placed-elevation.js +51 -0
  15. package/dist/hooks/spatial-grid/floor-placed-elevation.test.d.ts +2 -0
  16. package/dist/hooks/spatial-grid/floor-placed-elevation.test.d.ts.map +1 -0
  17. package/dist/hooks/spatial-grid/floor-placed-elevation.test.js +366 -0
  18. package/dist/hooks/spatial-grid/spatial-grid-manager.d.ts +79 -11
  19. package/dist/hooks/spatial-grid/spatial-grid-manager.d.ts.map +1 -1
  20. package/dist/hooks/spatial-grid/spatial-grid-manager.js +508 -141
  21. package/dist/hooks/spatial-grid/spatial-grid-sync.d.ts +28 -1
  22. package/dist/hooks/spatial-grid/spatial-grid-sync.d.ts.map +1 -1
  23. package/dist/hooks/spatial-grid/spatial-grid-sync.js +109 -18
  24. package/dist/hooks/spatial-grid/wall-slab-overlap.test.d.ts +2 -0
  25. package/dist/hooks/spatial-grid/wall-slab-overlap.test.d.ts.map +1 -0
  26. package/dist/hooks/spatial-grid/wall-slab-overlap.test.js +363 -0
  27. package/dist/index.d.ts +36 -8
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +33 -6
  30. package/dist/lib/level-name.d.ts +4 -0
  31. package/dist/lib/level-name.d.ts.map +1 -0
  32. package/dist/lib/level-name.js +10 -0
  33. package/dist/lib/measurement-geometry.d.ts +19 -0
  34. package/dist/lib/measurement-geometry.d.ts.map +1 -0
  35. package/dist/lib/measurement-geometry.js +232 -0
  36. package/dist/lib/measurement-geometry.test.d.ts +2 -0
  37. package/dist/lib/measurement-geometry.test.d.ts.map +1 -0
  38. package/dist/lib/measurement-geometry.test.js +102 -0
  39. package/dist/lib/polygon-geometry.d.ts +0 -1
  40. package/dist/lib/polygon-geometry.d.ts.map +1 -1
  41. package/dist/lib/polygon-geometry.js +0 -18
  42. package/dist/lib/polygon-relations.d.ts +10 -0
  43. package/dist/lib/polygon-relations.d.ts.map +1 -0
  44. package/dist/lib/polygon-relations.js +73 -0
  45. package/dist/lib/selection-proxy.d.ts +4 -0
  46. package/dist/lib/selection-proxy.d.ts.map +1 -0
  47. package/dist/lib/selection-proxy.js +12 -0
  48. package/dist/lib/slab-polygon.d.ts +31 -2
  49. package/dist/lib/slab-polygon.d.ts.map +1 -1
  50. package/dist/lib/slab-polygon.js +525 -31
  51. package/dist/lib/slab-polygon.test.d.ts +2 -0
  52. package/dist/lib/slab-polygon.test.d.ts.map +1 -0
  53. package/dist/lib/slab-polygon.test.js +635 -0
  54. package/dist/lib/slots.d.ts +14 -0
  55. package/dist/lib/slots.d.ts.map +1 -0
  56. package/dist/lib/slots.js +26 -0
  57. package/dist/lib/space-detection-pause.test.d.ts +2 -0
  58. package/dist/lib/space-detection-pause.test.d.ts.map +1 -0
  59. package/dist/lib/space-detection-pause.test.js +42 -0
  60. package/dist/lib/space-detection.d.ts +54 -2
  61. package/dist/lib/space-detection.d.ts.map +1 -1
  62. package/dist/lib/space-detection.js +599 -124
  63. package/dist/lib/space-detection.test.d.ts +2 -0
  64. package/dist/lib/space-detection.test.d.ts.map +1 -0
  65. package/dist/lib/space-detection.test.js +376 -0
  66. package/dist/lib/wall-distance.d.ts +60 -0
  67. package/dist/lib/wall-distance.d.ts.map +1 -0
  68. package/dist/lib/wall-distance.js +85 -0
  69. package/dist/lib/zone-quantities.d.ts +21 -0
  70. package/dist/lib/zone-quantities.d.ts.map +1 -0
  71. package/dist/lib/zone-quantities.js +183 -0
  72. package/dist/lib/zone-quantities.test.d.ts +2 -0
  73. package/dist/lib/zone-quantities.test.d.ts.map +1 -0
  74. package/dist/lib/zone-quantities.test.js +82 -0
  75. package/dist/material-library.d.ts +20 -1
  76. package/dist/material-library.d.ts.map +1 -1
  77. package/dist/material-library.js +3737 -200
  78. package/dist/registry/__bench__/relations-resolver.bench.d.ts +15 -0
  79. package/dist/registry/__bench__/relations-resolver.bench.d.ts.map +1 -0
  80. package/dist/registry/__bench__/relations-resolver.bench.js +170 -0
  81. package/dist/registry/handles.d.ts +394 -0
  82. package/dist/registry/handles.d.ts.map +1 -0
  83. package/dist/registry/handles.js +24 -0
  84. package/dist/registry/index.d.ts +7 -0
  85. package/dist/registry/index.d.ts.map +1 -0
  86. package/dist/registry/index.js +4 -0
  87. package/dist/registry/registry.d.ts +136 -0
  88. package/dist/registry/registry.d.ts.map +1 -0
  89. package/dist/registry/registry.js +282 -0
  90. package/dist/registry/registry.test.d.ts +2 -0
  91. package/dist/registry/registry.test.d.ts.map +1 -0
  92. package/dist/registry/registry.test.js +196 -0
  93. package/dist/registry/relations-resolver.d.ts +42 -0
  94. package/dist/registry/relations-resolver.d.ts.map +1 -0
  95. package/dist/registry/relations-resolver.js +77 -0
  96. package/dist/registry/relations-resolver.test.d.ts +2 -0
  97. package/dist/registry/relations-resolver.test.d.ts.map +1 -0
  98. package/dist/registry/relations-resolver.test.js +183 -0
  99. package/dist/registry/scene-api.d.ts +44 -0
  100. package/dist/registry/scene-api.d.ts.map +1 -0
  101. package/dist/registry/scene-api.js +111 -0
  102. package/dist/registry/scene-api.test.d.ts +2 -0
  103. package/dist/registry/scene-api.test.d.ts.map +1 -0
  104. package/dist/registry/scene-api.test.js +183 -0
  105. package/dist/registry/subtree.d.ts +67 -0
  106. package/dist/registry/subtree.d.ts.map +1 -0
  107. package/dist/registry/subtree.js +123 -0
  108. package/dist/registry/subtree.test.d.ts +2 -0
  109. package/dist/registry/subtree.test.d.ts.map +1 -0
  110. package/dist/registry/subtree.test.js +163 -0
  111. package/dist/registry/types.d.ts +2099 -0
  112. package/dist/registry/types.d.ts.map +1 -0
  113. package/dist/registry/types.js +1 -0
  114. package/dist/schema/index.d.ts +35 -4
  115. package/dist/schema/index.d.ts.map +1 -1
  116. package/dist/schema/index.js +32 -4
  117. package/dist/schema/material.d.ts +13 -2
  118. package/dist/schema/material.d.ts.map +1 -1
  119. package/dist/schema/material.js +17 -5
  120. package/dist/schema/material.test.d.ts +2 -0
  121. package/dist/schema/material.test.d.ts.map +1 -0
  122. package/dist/schema/material.test.js +43 -0
  123. package/dist/schema/nodes/box-vent.d.ts +74 -0
  124. package/dist/schema/nodes/box-vent.d.ts.map +1 -0
  125. package/dist/schema/nodes/box-vent.js +63 -0
  126. package/dist/schema/nodes/building.d.ts +1 -1
  127. package/dist/schema/nodes/building.d.ts.map +1 -1
  128. package/dist/schema/nodes/building.js +3 -2
  129. package/dist/schema/nodes/cabinet.d.ts +534 -0
  130. package/dist/schema/nodes/cabinet.d.ts.map +1 -0
  131. package/dist/schema/nodes/cabinet.js +137 -0
  132. package/dist/schema/nodes/ceiling.d.ts +5 -2
  133. package/dist/schema/nodes/ceiling.d.ts.map +1 -1
  134. package/dist/schema/nodes/ceiling.js +5 -1
  135. package/dist/schema/nodes/chimney.d.ts +158 -0
  136. package/dist/schema/nodes/chimney.d.ts.map +1 -0
  137. package/dist/schema/nodes/chimney.js +67 -0
  138. package/dist/schema/nodes/column.d.ts +600 -7
  139. package/dist/schema/nodes/column.d.ts.map +1 -1
  140. package/dist/schema/nodes/column.js +589 -6
  141. package/dist/schema/nodes/cupola.d.ts +66 -0
  142. package/dist/schema/nodes/cupola.d.ts.map +1 -0
  143. package/dist/schema/nodes/cupola.js +28 -0
  144. package/dist/schema/nodes/door.d.ts +13 -5
  145. package/dist/schema/nodes/door.d.ts.map +1 -1
  146. package/dist/schema/nodes/door.js +12 -0
  147. package/dist/schema/nodes/dormer.d.ts +228 -0
  148. package/dist/schema/nodes/dormer.d.ts.map +1 -0
  149. package/dist/schema/nodes/dormer.js +119 -0
  150. package/dist/schema/nodes/downspout.d.ts +75 -0
  151. package/dist/schema/nodes/downspout.d.ts.map +1 -0
  152. package/dist/schema/nodes/downspout.js +63 -0
  153. package/dist/schema/nodes/duct-fitting.d.ts +91 -0
  154. package/dist/schema/nodes/duct-fitting.d.ts.map +1 -0
  155. package/dist/schema/nodes/duct-fitting.js +92 -0
  156. package/dist/schema/nodes/duct-segment.d.ts +61 -0
  157. package/dist/schema/nodes/duct-segment.d.ts.map +1 -0
  158. package/dist/schema/nodes/duct-segment.js +73 -0
  159. package/dist/schema/nodes/duct-terminal.d.ts +57 -0
  160. package/dist/schema/nodes/duct-terminal.d.ts.map +1 -0
  161. package/dist/schema/nodes/duct-terminal.js +51 -0
  162. package/dist/schema/nodes/elevator.d.ts +106 -0
  163. package/dist/schema/nodes/elevator.d.ts.map +1 -0
  164. package/dist/schema/nodes/elevator.js +57 -0
  165. package/dist/schema/nodes/eyebrow-vent.d.ts +68 -0
  166. package/dist/schema/nodes/eyebrow-vent.d.ts.map +1 -0
  167. package/dist/schema/nodes/eyebrow-vent.js +40 -0
  168. package/dist/schema/nodes/fence.d.ts +19 -2
  169. package/dist/schema/nodes/fence.d.ts.map +1 -1
  170. package/dist/schema/nodes/fence.js +27 -2
  171. package/dist/schema/nodes/gutter.d.ts +84 -0
  172. package/dist/schema/nodes/gutter.d.ts.map +1 -0
  173. package/dist/schema/nodes/gutter.js +76 -0
  174. package/dist/schema/nodes/hvac-equipment.d.ts +63 -0
  175. package/dist/schema/nodes/hvac-equipment.d.ts.map +1 -0
  176. package/dist/schema/nodes/hvac-equipment.js +55 -0
  177. package/dist/schema/nodes/item.d.ts +12 -0
  178. package/dist/schema/nodes/item.d.ts.map +1 -1
  179. package/dist/schema/nodes/item.js +20 -0
  180. package/dist/schema/nodes/level.d.ts +1 -1
  181. package/dist/schema/nodes/level.d.ts.map +1 -1
  182. package/dist/schema/nodes/level.js +4 -0
  183. package/dist/schema/nodes/lineset.d.ts +42 -0
  184. package/dist/schema/nodes/lineset.d.ts.map +1 -0
  185. package/dist/schema/nodes/lineset.js +38 -0
  186. package/dist/schema/nodes/liquid-line.d.ts +34 -0
  187. package/dist/schema/nodes/liquid-line.d.ts.map +1 -0
  188. package/dist/schema/nodes/liquid-line.js +24 -0
  189. package/dist/schema/nodes/measurement.d.ts +306 -0
  190. package/dist/schema/nodes/measurement.d.ts.map +1 -0
  191. package/dist/schema/nodes/measurement.js +87 -0
  192. package/dist/schema/nodes/measurement.test.d.ts +2 -0
  193. package/dist/schema/nodes/measurement.test.d.ts.map +1 -0
  194. package/dist/schema/nodes/measurement.test.js +139 -0
  195. package/dist/schema/nodes/pipe-fitting.d.ts +56 -0
  196. package/dist/schema/nodes/pipe-fitting.d.ts.map +1 -0
  197. package/dist/schema/nodes/pipe-fitting.js +45 -0
  198. package/dist/schema/nodes/pipe-segment.d.ts +48 -0
  199. package/dist/schema/nodes/pipe-segment.d.ts.map +1 -0
  200. package/dist/schema/nodes/pipe-segment.js +36 -0
  201. package/dist/schema/nodes/pipe-trap.d.ts +43 -0
  202. package/dist/schema/nodes/pipe-trap.d.ts.map +1 -0
  203. package/dist/schema/nodes/pipe-trap.js +36 -0
  204. package/dist/schema/nodes/ridge-vent-defaults.test.d.ts +2 -0
  205. package/dist/schema/nodes/ridge-vent-defaults.test.d.ts.map +1 -0
  206. package/dist/schema/nodes/ridge-vent-defaults.test.js +205 -0
  207. package/dist/schema/nodes/ridge-vent.d.ts +82 -0
  208. package/dist/schema/nodes/ridge-vent.d.ts.map +1 -0
  209. package/dist/schema/nodes/ridge-vent.js +248 -0
  210. package/dist/schema/nodes/roof-segment-shape.d.ts +90 -0
  211. package/dist/schema/nodes/roof-segment-shape.d.ts.map +1 -0
  212. package/dist/schema/nodes/roof-segment-shape.js +318 -0
  213. package/dist/schema/nodes/roof-segment-shape.test.d.ts +2 -0
  214. package/dist/schema/nodes/roof-segment-shape.test.d.ts.map +1 -0
  215. package/dist/schema/nodes/roof-segment-shape.test.js +175 -0
  216. package/dist/schema/nodes/roof-segment-surface.test.d.ts +2 -0
  217. package/dist/schema/nodes/roof-segment-surface.test.d.ts.map +1 -0
  218. package/dist/schema/nodes/roof-segment-surface.test.js +48 -0
  219. package/dist/schema/nodes/roof-segment-trim.test.d.ts +2 -0
  220. package/dist/schema/nodes/roof-segment-trim.test.d.ts.map +1 -0
  221. package/dist/schema/nodes/roof-segment-trim.test.js +107 -0
  222. package/dist/schema/nodes/roof-segment-walls.d.ts +101 -0
  223. package/dist/schema/nodes/roof-segment-walls.d.ts.map +1 -0
  224. package/dist/schema/nodes/roof-segment-walls.js +330 -0
  225. package/dist/schema/nodes/roof-segment-walls.test.d.ts +2 -0
  226. package/dist/schema/nodes/roof-segment-walls.test.d.ts.map +1 -0
  227. package/dist/schema/nodes/roof-segment-walls.test.js +92 -0
  228. package/dist/schema/nodes/roof-segment.d.ts +273 -3
  229. package/dist/schema/nodes/roof-segment.d.ts.map +1 -1
  230. package/dist/schema/nodes/roof-segment.js +539 -3
  231. package/dist/schema/nodes/roof.d.ts +8 -8
  232. package/dist/schema/nodes/roof.d.ts.map +1 -1
  233. package/dist/schema/nodes/roof.js +4 -16
  234. package/dist/schema/nodes/shelf.d.ts +106 -0
  235. package/dist/schema/nodes/shelf.d.ts.map +1 -0
  236. package/dist/schema/nodes/shelf.js +90 -0
  237. package/dist/schema/nodes/site.d.ts +1 -122
  238. package/dist/schema/nodes/site.d.ts.map +1 -1
  239. package/dist/schema/nodes/site.js +2 -6
  240. package/dist/schema/nodes/skylight.d.ts +279 -0
  241. package/dist/schema/nodes/skylight.d.ts.map +1 -0
  242. package/dist/schema/nodes/skylight.js +152 -0
  243. package/dist/schema/nodes/slab.d.ts +5 -2
  244. package/dist/schema/nodes/slab.d.ts.map +1 -1
  245. package/dist/schema/nodes/slab.js +5 -1
  246. package/dist/schema/nodes/solar-panel.d.ts +117 -0
  247. package/dist/schema/nodes/solar-panel.d.ts.map +1 -0
  248. package/dist/schema/nodes/solar-panel.js +47 -0
  249. package/dist/schema/nodes/stair-segment.d.ts +4 -4
  250. package/dist/schema/nodes/stair.d.ts +13 -12
  251. package/dist/schema/nodes/stair.d.ts.map +1 -1
  252. package/dist/schema/nodes/stair.js +3 -0
  253. package/dist/schema/nodes/surface-hole-metadata.d.ts +2 -0
  254. package/dist/schema/nodes/surface-hole-metadata.d.ts.map +1 -1
  255. package/dist/schema/nodes/surface-hole-metadata.js +3 -1
  256. package/dist/schema/nodes/turbine-vent.d.ts +68 -0
  257. package/dist/schema/nodes/turbine-vent.d.ts.map +1 -0
  258. package/dist/schema/nodes/turbine-vent.js +41 -0
  259. package/dist/schema/nodes/wall.d.ts +245 -6
  260. package/dist/schema/nodes/wall.d.ts.map +1 -1
  261. package/dist/schema/nodes/wall.js +257 -0
  262. package/dist/schema/nodes/wall.test.d.ts +2 -0
  263. package/dist/schema/nodes/wall.test.d.ts.map +1 -0
  264. package/dist/schema/nodes/wall.test.js +208 -0
  265. package/dist/schema/nodes/window.d.ts +11 -3
  266. package/dist/schema/nodes/window.d.ts.map +1 -1
  267. package/dist/schema/nodes/window.js +12 -0
  268. package/dist/schema/nodes/zone.d.ts +2 -0
  269. package/dist/schema/nodes/zone.d.ts.map +1 -1
  270. package/dist/schema/nodes/zone.js +6 -0
  271. package/dist/schema/scene-material.d.ts +41 -0
  272. package/dist/schema/scene-material.d.ts.map +1 -0
  273. package/dist/schema/scene-material.js +9 -0
  274. package/dist/schema/types.d.ts +2850 -655
  275. package/dist/schema/types.d.ts.map +1 -1
  276. package/dist/schema/types.js +49 -0
  277. package/dist/services/alignment-anchors.d.ts +100 -0
  278. package/dist/services/alignment-anchors.d.ts.map +1 -0
  279. package/dist/services/alignment-anchors.js +312 -0
  280. package/dist/services/alignment-anchors.test.d.ts +2 -0
  281. package/dist/services/alignment-anchors.test.d.ts.map +1 -0
  282. package/dist/services/alignment-anchors.test.js +383 -0
  283. package/dist/services/alignment.d.ts +131 -0
  284. package/dist/services/alignment.d.ts.map +1 -0
  285. package/dist/services/alignment.js +171 -0
  286. package/dist/services/alignment.test.d.ts +2 -0
  287. package/dist/services/alignment.test.d.ts.map +1 -0
  288. package/dist/services/alignment.test.js +92 -0
  289. package/dist/services/drag-session.d.ts +47 -0
  290. package/dist/services/drag-session.d.ts.map +1 -0
  291. package/dist/services/drag-session.js +100 -0
  292. package/dist/services/drag-session.test.d.ts +2 -0
  293. package/dist/services/drag-session.test.d.ts.map +1 -0
  294. package/dist/services/drag-session.test.js +219 -0
  295. package/dist/services/hosting.d.ts +88 -0
  296. package/dist/services/hosting.d.ts.map +1 -0
  297. package/dist/services/hosting.js +131 -0
  298. package/dist/services/hosting.test.d.ts +2 -0
  299. package/dist/services/hosting.test.d.ts.map +1 -0
  300. package/dist/services/hosting.test.js +230 -0
  301. package/dist/services/index.d.ts +13 -0
  302. package/dist/services/index.d.ts.map +1 -0
  303. package/dist/services/index.js +12 -0
  304. package/dist/services/level-height.d.ts +28 -0
  305. package/dist/services/level-height.d.ts.map +1 -0
  306. package/dist/services/level-height.js +62 -0
  307. package/dist/services/movement.d.ts +48 -0
  308. package/dist/services/movement.d.ts.map +1 -0
  309. package/dist/services/movement.js +65 -0
  310. package/dist/services/movement.test.d.ts +2 -0
  311. package/dist/services/movement.test.d.ts.map +1 -0
  312. package/dist/services/movement.test.js +133 -0
  313. package/dist/services/opening-guides.d.ts +141 -0
  314. package/dist/services/opening-guides.d.ts.map +1 -0
  315. package/dist/services/opening-guides.js +267 -0
  316. package/dist/services/opening-guides.test.d.ts +2 -0
  317. package/dist/services/opening-guides.test.d.ts.map +1 -0
  318. package/dist/services/opening-guides.test.js +208 -0
  319. package/dist/services/port-connectivity.d.ts +115 -0
  320. package/dist/services/port-connectivity.d.ts.map +1 -0
  321. package/dist/services/port-connectivity.js +300 -0
  322. package/dist/services/port-connectivity.test.d.ts +2 -0
  323. package/dist/services/port-connectivity.test.d.ts.map +1 -0
  324. package/dist/services/port-connectivity.test.js +297 -0
  325. package/dist/services/riser-diagram.d.ts +40 -0
  326. package/dist/services/riser-diagram.d.ts.map +1 -0
  327. package/dist/services/riser-diagram.js +110 -0
  328. package/dist/services/riser-diagram.test.d.ts +2 -0
  329. package/dist/services/riser-diagram.test.d.ts.map +1 -0
  330. package/dist/services/riser-diagram.test.js +66 -0
  331. package/dist/services/single-undo-dance.test.d.ts +2 -0
  332. package/dist/services/single-undo-dance.test.d.ts.map +1 -0
  333. package/dist/services/single-undo-dance.test.js +210 -0
  334. package/dist/services/snap.d.ts +80 -0
  335. package/dist/services/snap.d.ts.map +1 -0
  336. package/dist/services/snap.js +140 -0
  337. package/dist/services/snap.test.d.ts +2 -0
  338. package/dist/services/snap.test.d.ts.map +1 -0
  339. package/dist/services/snap.test.js +137 -0
  340. package/dist/services/system-graph.d.ts +30 -0
  341. package/dist/services/system-graph.d.ts.map +1 -0
  342. package/dist/services/system-graph.js +164 -0
  343. package/dist/services/system-graph.test.d.ts +2 -0
  344. package/dist/services/system-graph.test.d.ts.map +1 -0
  345. package/dist/services/system-graph.test.js +138 -0
  346. package/dist/services/validate-dwv.d.ts +32 -0
  347. package/dist/services/validate-dwv.d.ts.map +1 -0
  348. package/dist/services/validate-dwv.js +118 -0
  349. package/dist/services/validate-dwv.test.d.ts +2 -0
  350. package/dist/services/validate-dwv.test.d.ts.map +1 -0
  351. package/dist/services/validate-dwv.test.js +109 -0
  352. package/dist/solar-panel-presets.d.ts +17 -0
  353. package/dist/solar-panel-presets.d.ts.map +1 -0
  354. package/dist/solar-panel-presets.js +43 -0
  355. package/dist/store/actions/node-actions.d.ts +14 -2
  356. package/dist/store/actions/node-actions.d.ts.map +1 -1
  357. package/dist/store/actions/node-actions.js +585 -15
  358. package/dist/store/actions/node-mutation-sanitize.test.d.ts +2 -0
  359. package/dist/store/actions/node-mutation-sanitize.test.d.ts.map +1 -0
  360. package/dist/store/actions/node-mutation-sanitize.test.js +147 -0
  361. package/dist/store/actions/reparent.test.d.ts +2 -0
  362. package/dist/store/actions/reparent.test.d.ts.map +1 -0
  363. package/dist/store/actions/reparent.test.js +212 -0
  364. package/dist/store/actions/ridge-vent-update.test.d.ts +2 -0
  365. package/dist/store/actions/ridge-vent-update.test.d.ts.map +1 -0
  366. package/dist/store/actions/ridge-vent-update.test.js +264 -0
  367. package/dist/store/history-control.d.ts +11 -0
  368. package/dist/store/history-control.d.ts.map +1 -1
  369. package/dist/store/history-control.js +33 -0
  370. package/dist/store/use-interactive.d.ts +39 -0
  371. package/dist/store/use-interactive.d.ts.map +1 -1
  372. package/dist/store/use-interactive.js +75 -0
  373. package/dist/store/use-live-node-overrides.d.ts +22 -0
  374. package/dist/store/use-live-node-overrides.d.ts.map +1 -0
  375. package/dist/store/use-live-node-overrides.js +59 -0
  376. package/dist/store/use-scene-dirty-tracking.test.d.ts +2 -0
  377. package/dist/store/use-scene-dirty-tracking.test.d.ts.map +1 -0
  378. package/dist/store/use-scene-dirty-tracking.test.js +68 -0
  379. package/dist/store/use-scene-elevator-migration.test.d.ts +2 -0
  380. package/dist/store/use-scene-elevator-migration.test.d.ts.map +1 -0
  381. package/dist/store/use-scene-elevator-migration.test.js +109 -0
  382. package/dist/store/use-scene-measurement-roundtrip.test.d.ts +2 -0
  383. package/dist/store/use-scene-measurement-roundtrip.test.d.ts.map +1 -0
  384. package/dist/store/use-scene-measurement-roundtrip.test.js +97 -0
  385. package/dist/store/use-scene-plugins.test.d.ts +2 -0
  386. package/dist/store/use-scene-plugins.test.d.ts.map +1 -0
  387. package/dist/store/use-scene-plugins.test.js +51 -0
  388. package/dist/store/use-scene-wall-slot-migration.test.d.ts +2 -0
  389. package/dist/store/use-scene-wall-slot-migration.test.d.ts.map +1 -0
  390. package/dist/store/use-scene-wall-slot-migration.test.js +210 -0
  391. package/dist/store/use-scene-window-migration.test.d.ts +2 -0
  392. package/dist/store/use-scene-window-migration.test.d.ts.map +1 -0
  393. package/dist/store/use-scene-window-migration.test.js +85 -0
  394. package/dist/store/use-scene.d.ts +28 -2
  395. package/dist/store/use-scene.d.ts.map +1 -1
  396. package/dist/store/use-scene.js +546 -49
  397. package/dist/systems/elevator/elevator-dispatch.d.ts +12 -0
  398. package/dist/systems/elevator/elevator-dispatch.d.ts.map +1 -0
  399. package/dist/systems/elevator/elevator-dispatch.js +57 -0
  400. package/dist/systems/elevator/elevator-geometry.d.ts +15 -0
  401. package/dist/systems/elevator/elevator-geometry.d.ts.map +1 -0
  402. package/dist/systems/elevator/elevator-geometry.js +50 -0
  403. package/dist/systems/elevator/elevator-opening-sync.d.ts +6 -0
  404. package/dist/systems/elevator/elevator-opening-sync.d.ts.map +1 -0
  405. package/dist/systems/elevator/elevator-opening-sync.js +218 -0
  406. package/dist/systems/elevator/elevator-opening-sync.test.d.ts +2 -0
  407. package/dist/systems/elevator/elevator-opening-sync.test.d.ts.map +1 -0
  408. package/dist/systems/elevator/elevator-opening-sync.test.js +146 -0
  409. package/dist/systems/elevator/elevator-opening-system.d.ts +2 -0
  410. package/dist/systems/elevator/elevator-opening-system.d.ts.map +1 -0
  411. package/dist/systems/elevator/elevator-opening-system.js +48 -0
  412. package/dist/systems/elevator/elevator-runtime-system.d.ts +2 -0
  413. package/dist/systems/elevator/elevator-runtime-system.d.ts.map +1 -0
  414. package/dist/systems/elevator/elevator-runtime-system.js +8 -0
  415. package/dist/systems/elevator/elevator-runtime.d.ts +18 -0
  416. package/dist/systems/elevator/elevator-runtime.d.ts.map +1 -0
  417. package/dist/systems/elevator/elevator-runtime.js +225 -0
  418. package/dist/systems/elevator/elevator-runtime.test.d.ts +2 -0
  419. package/dist/systems/elevator/elevator-runtime.test.d.ts.map +1 -0
  420. package/dist/systems/elevator/elevator-runtime.test.js +64 -0
  421. package/dist/systems/elevator/elevator-service.d.ts +19 -0
  422. package/dist/systems/elevator/elevator-service.d.ts.map +1 -0
  423. package/dist/systems/elevator/elevator-service.js +111 -0
  424. package/dist/systems/fence/fence-centerline.d.ts +12 -0
  425. package/dist/systems/fence/fence-centerline.d.ts.map +1 -0
  426. package/dist/systems/fence/fence-centerline.js +37 -0
  427. package/dist/systems/fence/fence-spline.d.ts +39 -0
  428. package/dist/systems/fence/fence-spline.d.ts.map +1 -0
  429. package/dist/systems/fence/fence-spline.js +196 -0
  430. package/dist/systems/fence/fence-spline.test.d.ts +2 -0
  431. package/dist/systems/fence/fence-spline.test.d.ts.map +1 -0
  432. package/dist/systems/fence/fence-spline.test.js +136 -0
  433. package/dist/systems/stair/stair-footprint.d.ts +44 -0
  434. package/dist/systems/stair/stair-footprint.d.ts.map +1 -0
  435. package/dist/systems/stair/stair-footprint.js +178 -0
  436. package/dist/systems/stair/stair-opening-preview.d.ts +2447 -0
  437. package/dist/systems/stair/stair-opening-preview.d.ts.map +1 -0
  438. package/dist/systems/stair/stair-opening-preview.js +93 -0
  439. package/dist/systems/stair/stair-opening-preview.test.d.ts +2 -0
  440. package/dist/systems/stair/stair-opening-preview.test.d.ts.map +1 -0
  441. package/dist/systems/stair/stair-opening-preview.test.js +80 -0
  442. package/dist/systems/stair/stair-opening-sync.d.ts.map +1 -1
  443. package/dist/systems/stair/stair-opening-sync.js +155 -147
  444. package/dist/systems/stair/stair-opening-sync.test.js +424 -2
  445. package/dist/systems/stair/stair-opening-system.d.ts +2 -0
  446. package/dist/systems/stair/stair-opening-system.d.ts.map +1 -0
  447. package/dist/systems/stair/stair-opening-system.js +104 -0
  448. package/dist/systems/wall/wall-mitering.d.ts.map +1 -1
  449. package/dist/systems/wall/wall-mitering.js +38 -2
  450. package/dist/systems/wall/wall-mitering.test.d.ts +2 -0
  451. package/dist/systems/wall/wall-mitering.test.d.ts.map +1 -0
  452. package/dist/systems/wall/wall-mitering.test.js +63 -0
  453. package/dist/systems/wall/wall-move.d.ts +48 -0
  454. package/dist/systems/wall/wall-move.d.ts.map +1 -0
  455. package/dist/systems/wall/wall-move.js +193 -0
  456. package/dist/utils/clone-scene-graph.d.ts +7 -4
  457. package/dist/utils/clone-scene-graph.d.ts.map +1 -1
  458. package/dist/utils/clone-scene-graph.js +29 -7
  459. package/dist/utils/clone-scene-graph.test.d.ts +2 -0
  460. package/dist/utils/clone-scene-graph.test.d.ts.map +1 -0
  461. package/dist/utils/clone-scene-graph.test.js +62 -0
  462. package/dist/utils/heal-scene-graph.d.ts +18 -0
  463. package/dist/utils/heal-scene-graph.d.ts.map +1 -0
  464. package/dist/utils/heal-scene-graph.js +90 -0
  465. package/dist/utils/heal-scene-graph.test.d.ts +2 -0
  466. package/dist/utils/heal-scene-graph.test.d.ts.map +1 -0
  467. package/dist/utils/heal-scene-graph.test.js +88 -0
  468. package/dist/validation/validate-build-json.d.ts +44 -0
  469. package/dist/validation/validate-build-json.d.ts.map +1 -0
  470. package/dist/validation/validate-build-json.js +256 -0
  471. package/package.json +11 -4
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Bench harness for the relations cascade resolver.
3
+ *
4
+ * Phase 1 risk gate: at 5000 nodes the resolver step must stay under
5
+ * 2ms p95 per `cascadeDirty` invocation. Above that, the registry-driven
6
+ * dispatch will tank framerate during a corner drag in Phase 3.
7
+ *
8
+ * Run via:
9
+ * bun run packages/core/src/registry/__bench__/relations-resolver.bench.ts
10
+ *
11
+ * Output: JSON to stdout with { p50, p95, p99, mean, max, n } in milliseconds.
12
+ * Doubles as a regression gate — wire into CI when we have a baseline.
13
+ */
14
+ export {};
15
+ //# sourceMappingURL=relations-resolver.bench.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relations-resolver.bench.d.ts","sourceRoot":"","sources":["../../../src/registry/__bench__/relations-resolver.bench.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG"}
@@ -0,0 +1,170 @@
1
+ /**
2
+ * Bench harness for the relations cascade resolver.
3
+ *
4
+ * Phase 1 risk gate: at 5000 nodes the resolver step must stay under
5
+ * 2ms p95 per `cascadeDirty` invocation. Above that, the registry-driven
6
+ * dispatch will tank framerate during a corner drag in Phase 3.
7
+ *
8
+ * Run via:
9
+ * bun run packages/core/src/registry/__bench__/relations-resolver.bench.ts
10
+ *
11
+ * Output: JSON to stdout with { p50, p95, p99, mean, max, n } in milliseconds.
12
+ * Doubles as a regression gate — wire into CI when we have a baseline.
13
+ */
14
+ import { z } from 'zod';
15
+ import { nodeRegistry, registerNode } from '../registry';
16
+ import { cascadeDirty } from '../relations-resolver';
17
+ const ID = (s) => s;
18
+ function makeDef(kind, relations) {
19
+ return {
20
+ kind,
21
+ schemaVersion: 1,
22
+ schema: z.object({ type: z.literal(kind) }),
23
+ category: 'utility',
24
+ defaults: () => ({}),
25
+ capabilities: {},
26
+ relations,
27
+ renderer: { kind: 'parametric', module: async () => ({ default: () => null }) },
28
+ };
29
+ }
30
+ /**
31
+ * Builds a 5000-node fixture: a 50×100 grid of walls (so 5000 walls).
32
+ * Each wall hosts up to 2 doors and is bordered by ~4 slabs (in a sparse
33
+ * spatial index). Designed to stress hosts + affectsSpatial cascade
34
+ * simultaneously.
35
+ *
36
+ * Returns:
37
+ * - 5000 wall nodes
38
+ * - 8000 door nodes (children of walls)
39
+ * - 200 slab nodes (sparse; ~25 walls per slab)
40
+ *
41
+ * Total: ~13,200 nodes. The cascade starts from one wall and should mark
42
+ * its children (doors) + its spatial neighbors (slabs) dirty.
43
+ */
44
+ function buildFixture() {
45
+ const nodes = {};
46
+ const wallToSlabIds = new Map();
47
+ for (let row = 0; row < 50; row++) {
48
+ for (let col = 0; col < 100; col++) {
49
+ const wallId = ID(`wall_r${row}c${col}`);
50
+ const childIds = [];
51
+ for (let d = 0; d < 2; d++) {
52
+ const doorId = ID(`door_r${row}c${col}d${d}`);
53
+ childIds.push(doorId);
54
+ nodes[doorId] = {
55
+ id: doorId,
56
+ type: 'door',
57
+ parentId: wallId,
58
+ visible: true,
59
+ };
60
+ }
61
+ nodes[wallId] = {
62
+ id: wallId,
63
+ type: 'wall',
64
+ parentId: null,
65
+ visible: true,
66
+ children: childIds,
67
+ };
68
+ // Map this wall to its bordering slab (sparse: ~25 walls share a slab).
69
+ const slabRow = Math.floor(row / 5);
70
+ const slabCol = Math.floor(col / 5);
71
+ const slabId = ID(`slab_r${slabRow}c${slabCol}`);
72
+ const list = wallToSlabIds.get(wallId) ?? [];
73
+ list.push(slabId);
74
+ wallToSlabIds.set(wallId, list);
75
+ }
76
+ }
77
+ for (let row = 0; row < 10; row++) {
78
+ for (let col = 0; col < 20; col++) {
79
+ const slabId = ID(`slab_r${row}c${col}`);
80
+ nodes[slabId] = {
81
+ id: slabId,
82
+ type: 'slab',
83
+ parentId: null,
84
+ visible: true,
85
+ };
86
+ }
87
+ }
88
+ return { nodes, wallToSlabIds };
89
+ }
90
+ function makeScene(nodes) {
91
+ return {
92
+ get: ((nid) => nodes[nid]),
93
+ nodes: () => nodes,
94
+ update: () => { },
95
+ upsert: () => ID(''),
96
+ delete: () => { },
97
+ restore: () => { },
98
+ restoreAll: () => { },
99
+ markDirty: () => { },
100
+ pauseHistory: () => { },
101
+ resumeHistory: () => { },
102
+ getSubtree: () => null,
103
+ cloneNodesInto: () => null,
104
+ };
105
+ }
106
+ function percentile(values, p) {
107
+ const sorted = [...values].sort((a, b) => a - b);
108
+ const idx = Math.min(sorted.length - 1, Math.floor((p / 100) * sorted.length));
109
+ return sorted[idx] ?? 0;
110
+ }
111
+ async function main() {
112
+ nodeRegistry._reset();
113
+ registerNode(makeDef('wall', { hosts: ['door'], affectsSpatial: ['slab'] }));
114
+ registerNode(makeDef('door'));
115
+ registerNode(makeDef('slab'));
116
+ const { nodes, wallToSlabIds } = buildFixture();
117
+ const scene = makeScene(nodes);
118
+ const spatialQuery = (node, kinds) => {
119
+ if (!kinds.includes('slab'))
120
+ return [];
121
+ return wallToSlabIds.get(node.id) ?? [];
122
+ };
123
+ const totalNodes = Object.keys(nodes).length;
124
+ const totalWalls = 50 * 100;
125
+ console.log(`[bench] fixture: ${totalNodes} nodes (${totalWalls} walls, 8000 doors, 200 slabs)`);
126
+ const iterations = 1000;
127
+ const samples = [];
128
+ // Warm-up — JIT, cache lines, etc.
129
+ for (let i = 0; i < 50; i++) {
130
+ cascadeDirty(ID(`wall_r${i % 50}c${i % 100}`), { scene, spatialQuery });
131
+ }
132
+ for (let i = 0; i < iterations; i++) {
133
+ const row = i % 50;
134
+ const col = i % 100;
135
+ const startId = ID(`wall_r${row}c${col}`);
136
+ const t0 = performance.now();
137
+ cascadeDirty(startId, { scene, spatialQuery });
138
+ const elapsed = performance.now() - t0;
139
+ samples.push(elapsed);
140
+ }
141
+ const mean = samples.reduce((acc, v) => acc + v, 0) / samples.length;
142
+ const max = Math.max(...samples);
143
+ const p50 = percentile(samples, 50);
144
+ const p95 = percentile(samples, 95);
145
+ const p99 = percentile(samples, 99);
146
+ const result = {
147
+ fixture: { totalNodes, walls: totalWalls, doors: 8000, slabs: 200 },
148
+ iterations,
149
+ p50_ms: Number(p50.toFixed(4)),
150
+ p95_ms: Number(p95.toFixed(4)),
151
+ p99_ms: Number(p99.toFixed(4)),
152
+ mean_ms: Number(mean.toFixed(4)),
153
+ max_ms: Number(max.toFixed(4)),
154
+ };
155
+ console.log(JSON.stringify(result, null, 2));
156
+ const target = 2.0;
157
+ if (p95 > target) {
158
+ console.error(`\n❌ p95 ${p95.toFixed(2)}ms exceeds Phase 1 gate of ${target}ms. ` +
159
+ `Phase 2 (column + shelf) can still proceed since their relations are empty, ` +
160
+ `but Phase 3 wall migration must add spatial-index-backed neighbor queries first.`);
161
+ process.exitCode = 1;
162
+ }
163
+ else {
164
+ console.log(`\n✅ p95 ${p95.toFixed(3)}ms within Phase 1 gate of ${target}ms`);
165
+ }
166
+ }
167
+ main().catch((err) => {
168
+ console.error(err);
169
+ process.exitCode = 1;
170
+ });
@@ -0,0 +1,394 @@
1
+ import type { AnyNode, AnyNodeId } from '../schema/types';
2
+ import type { SceneApi } from './types';
3
+ /**
4
+ * Editor-facing verbs that handle descriptors can invoke.
5
+ *
6
+ * Parallel to {@link SceneApi} but exposes EDITOR state mutations (move
7
+ * tools, endpoint dragging, etc.) instead of scene-data writes. Descriptors
8
+ * receive a concrete implementation from the editor at drag time — `core`
9
+ * only carries the interface so node definitions can call into editor
10
+ * affordances without importing the editor package.
11
+ *
12
+ * Minimal verb set today; grow it as new descriptor variants land
13
+ * (engageCurve for wall/fence curving, etc.).
14
+ */
15
+ export type EditorApi = {
16
+ /**
17
+ * Hand the node to its registered move tool (the same path the floating
18
+ * menu's Move icon uses). Implementations clear any in-progress endpoint
19
+ * or curving state so the move starts from a clean slate.
20
+ */
21
+ engageMove: (node: AnyNode) => void;
22
+ /**
23
+ * Like {@link engageMove}, but for a press-drag gizmo: the move commits on
24
+ * pointer-release instead of waiting for a click, so the on-canvas move cross
25
+ * behaves as press-drag-release while still showing the placement preview.
26
+ */
27
+ engageMoveDrag: (node: AnyNode) => void;
28
+ /**
29
+ * Engage endpoint drag for kinds that own start / end anchors (walls,
30
+ * fences). No-ops for kinds without endpoints.
31
+ */
32
+ engageEndpointMove: (node: AnyNode, endpoint: 'start' | 'end') => void;
33
+ /**
34
+ * Engage drag of a spline control point (`path[index]`). Used by spline
35
+ * fences to reshape their centerline. No-ops for kinds without a path.
36
+ */
37
+ engageControlPointMove: (node: AnyNode, index: number) => void;
38
+ /**
39
+ * Engage drag of a spline tangent handle (`path[index]`, which end). Used by
40
+ * spline fences to bend the curve through one control point. No-ops for kinds
41
+ * without tangents.
42
+ */
43
+ engageTangentMove: (node: AnyNode, index: number, side: 'in' | 'out') => void;
44
+ };
45
+ export type HandlePortal = 'self' | 'parent' | 'grandparent';
46
+ export type HandleAxis = 'x' | 'y' | 'z';
47
+ export type HandleAnchor = 'center' | 'min' | 'max';
48
+ /** 3D position + rotation of the arrow in its portal target's local space. */
49
+ export type HandlePlacement<N> = {
50
+ /**
51
+ * `sceneApi` is supplied so descriptors that depend on cross-node state
52
+ * (elevator height resolving level entries, future cross-kind handles)
53
+ * can compute placement against the live scene. Existing descriptors
54
+ * that only need `node` can ignore the second argument.
55
+ */
56
+ position: (node: N, sceneApi: SceneApi) => readonly [number, number, number];
57
+ /** Optional Y rotation (radians). Defaults to 0. */
58
+ rotationY?: (node: N, sceneApi: SceneApi) => number;
59
+ };
60
+ export type Cursor = 'ew-resize' | 'ns-resize' | 'move' | 'grab' | 'grabbing';
61
+ /**
62
+ * Visual decoration shown alongside a handle while the user is hovering
63
+ * or dragging it. Today: a thin horizontal ring at a node-local radius —
64
+ * the curved-stair width / inner-radius arrows use this to trace the
65
+ * outer rim / inner pillar so the user sees what the drag affects.
66
+ *
67
+ * Pure data: the editor's arrow renderer reads it and mounts the visual.
68
+ */
69
+ export type HandleDecoration<N> = {
70
+ kind: 'ring';
71
+ /** Node-local radius of the ring (XZ plane). */
72
+ radius: (node: N, sceneApi: SceneApi) => number;
73
+ /** Node-local Y of the ring. Defaults to 0. */
74
+ y?: (node: N) => number;
75
+ /** Node-local center of the ring. Defaults to the node origin. */
76
+ center?: (node: N, sceneApi: SceneApi) => readonly [number, number, number];
77
+ };
78
+ /**
79
+ * Linear resize along a single local axis. Covers width / depth / height
80
+ * arrows whose visible behaviour is "drag the +axis edge, the dimension
81
+ * grows."
82
+ *
83
+ * `anchor` controls which side stays fixed:
84
+ * - 'center' : symmetric — both edges move ±delta (column width/depth).
85
+ * - 'min' : the -axis edge is fixed; drag the +axis edge by `delta`
86
+ * grows the value by `delta` (column height with origin at
87
+ * base; door height with bottom anchored).
88
+ * - 'max' : the +axis edge is fixed; drag the -axis edge.
89
+ *
90
+ * `apply(node, newValue)` returns the partial patch. Use it to write
91
+ * sibling fields too (e.g. door 'max' anchor re-centers `position[0]`).
92
+ */
93
+ export type LinearResizeHandle<N> = {
94
+ kind: 'linear-resize';
95
+ /** Local axis. The arrow's chevron points along +axis. */
96
+ axis: HandleAxis;
97
+ anchor: HandleAnchor;
98
+ currentValue: (node: N) => number;
99
+ apply: (node: N, newValue: number, sceneApi: SceneApi) => Partial<N>;
100
+ /** Optional live-scene visibility gate for context-dependent arrows. */
101
+ visible?: (node: N, sceneApi: SceneApi) => boolean;
102
+ /**
103
+ * Optional committed-write hook. The generic handle renderer previews the
104
+ * selected node with the `apply` patch during drag; on release it normally
105
+ * writes that patch back to the same node. Composite nodes can override the
106
+ * final write here to fan the resize out to siblings / parents while keeping
107
+ * the handle UI generic.
108
+ */
109
+ commit?: (node: N, patch: Partial<N>, sceneApi: SceneApi) => void;
110
+ /**
111
+ * Optional per-tick hook fired while this handle is being dragged, with the
112
+ * live (in-progress, override-merged) node. A pure side-channel for transient
113
+ * feedback — doors/windows use it to publish proximity / sill guides for the
114
+ * edge being resized. The return value is ignored; the resize itself is driven
115
+ * by `apply`.
116
+ */
117
+ onDrag?: (node: N, sceneApi: SceneApi) => void;
118
+ /**
119
+ * Cross-node redirect. By default the drag's live override + the
120
+ * committed write both land on the SELECTED node. When this returns
121
+ * another node's id, the editor publishes the override to / commits on
122
+ * THAT node instead (and `apply` should return that node's patch).
123
+ * Used when a node's handle edits a value owned by a sibling — e.g. a
124
+ * downspout's side-move arrows slide its outlet, which lives on the
125
+ * host gutter (`gutter.outlets[].offset`). The selected node is still
126
+ * what `currentValue` / `apply` receive, so the descriptor can read
127
+ * the downspout to find its gutter + outlet.
128
+ */
129
+ overrideTarget?: (node: N, sceneApi: SceneApi) => AnyNodeId | undefined;
130
+ min?: number | ((node: N, sceneApi: SceneApi) => number);
131
+ max?: number | ((node: N, sceneApi: SceneApi) => number);
132
+ /** Snap the resized scalar to the editor's active grid step before apply. */
133
+ gridSnap?: boolean;
134
+ placement: HandlePlacement<N>;
135
+ /**
136
+ * Dimension this handle steers (e.g. `'height'`). When set, the editor
137
+ * publishes it to `activeHandleDrag.label` for the duration of the drag
138
+ * so out-of-band overlays (the floating dimension pill) can react, and
139
+ * the handle's own in-world value chip is suppressed to avoid showing
140
+ * the same number twice. Leave unset for handles that keep their inline
141
+ * chip and don't drive any external overlay.
142
+ */
143
+ measureLabel?: string;
144
+ /**
145
+ * Defaults to 'self' (arrow lives in the selected node's own mesh).
146
+ * 'parent' uses the parent mesh — used by doors/windows whose handles
147
+ * need to ride the wall's rotation.
148
+ */
149
+ portal?: HandlePortal;
150
+ cursor?: Cursor;
151
+ /** Optional visual guide shown while the arrow is hovered or dragging. */
152
+ decoration?: HandleDecoration<N>;
153
+ /**
154
+ * Visual override. Defaults to the standard chevron arrow.
155
+ *
156
+ * `'tracker'` swaps the chevron for a dashed vertical leader + a small
157
+ * cube at `placement.position`. The leader runs from the floor (local
158
+ * y=0) up to the cube; the cube is the drag target and reuses the same
159
+ * linear-resize drag pipeline as the chevron. Intended for vertical
160
+ * height handles where the dashed leader makes the "this is the wall
161
+ * top" relationship readable at a glance — mirrors the `corner-picker`
162
+ * shape on `tap-action` handles but with a draggable cube instead of a
163
+ * one-tap hex disc. Use with `axis: 'y'`; horizontal axes will render
164
+ * the leader vertically and look wrong.
165
+ */
166
+ shape?: 'arrow' | 'tracker';
167
+ /**
168
+ * Optional override for the bottom Y of the tracker leader. Defaults
169
+ * to 0 (floor of the rideObject's local frame). Use when the value
170
+ * being tracked spans a region that doesn't start at the floor — e.g.
171
+ * a chimney's body height runs from the roof deck up to the body top,
172
+ * so the leader should start at the deck plane and not climb through
173
+ * the roof shell below it. Only consulted when `shape === 'tracker'`.
174
+ */
175
+ trackerBaseY?: (node: N, sceneApi: SceneApi) => number;
176
+ /**
177
+ * Stand the chevron blade up into the node's facing plane instead of
178
+ * leaving it flat in the local XZ plane. For an `axis: 'x'` handle on a
179
+ * wall-mounted opening (door / window), the local XZ plane is horizontal,
180
+ * so the default blade is seen edge-on from the front — rotating it 90°
181
+ * about its pointing axis lays it in the wall face (local XY) so it reads
182
+ * face-on toward the camera. Chevron shape only; `axis: 'y'` handles are
183
+ * already stood up unconditionally so this is a no-op for them.
184
+ */
185
+ faceNormal?: boolean;
186
+ /**
187
+ * Gate this arrow behind a click-to-latch cube. When set, the arrow is
188
+ * hidden until the user clicks the {@link LatchHandle} cube declaring the
189
+ * same `group` name; clicking the cube again hides it. Lets a node keep a
190
+ * dense cluster (e.g. a dormer's window width/height arrows) collapsed
191
+ * behind a single grip until the user opts in. The latch state is local to
192
+ * the selection and resets when the node is deselected.
193
+ */
194
+ latchGroup?: string;
195
+ };
196
+ /**
197
+ * 1:1 outward growth — dragging the arrow outward by `delta` grows the
198
+ * value by `delta` (the visible edge follows the pointer). Use for radii
199
+ * and other fields where the conceptual model is "the +axis edge IS the
200
+ * thing being moved" rather than "the size IS being scaled."
201
+ */
202
+ export type RadialResizeHandle<N> = {
203
+ kind: 'radial-resize';
204
+ axis: HandleAxis;
205
+ currentValue: (node: N) => number;
206
+ apply: (node: N, newValue: number, sceneApi: SceneApi) => Partial<N>;
207
+ min?: number | ((node: N, sceneApi: SceneApi) => number);
208
+ max?: number | ((node: N, sceneApi: SceneApi) => number);
209
+ placement: HandlePlacement<N>;
210
+ portal?: HandlePortal;
211
+ /** Optional visual guide shown while the arrow is hovered or dragging. */
212
+ decoration?: HandleDecoration<N>;
213
+ };
214
+ /**
215
+ * Curved / spiral stair sweep arrows. The renderer raycasts a horizontal
216
+ * plane through the arrow's Y and emits the angular delta (radians,
217
+ * signed, normalised to [-π, π]) around the node's local origin.
218
+ *
219
+ * Unlike the linear variants, `apply` receives the raw cursor delta
220
+ * (not a `newValue`) because sweep handles typically write multiple
221
+ * fields off the delta (`sweepAngle` AND `rotation` — re-orienting the
222
+ * arc so the opposite edge stays world-fixed). Descriptor-internal
223
+ * math handles the per-end sign and any clamping; the renderer stays
224
+ * out of it.
225
+ */
226
+ export type ArcResizeHandle<N = any> = {
227
+ kind: 'arc-resize';
228
+ /**
229
+ * Marks the drag mode. Only 'angular' uses the polar plane renderer;
230
+ * 'radial' and 'vertical' degenerate to `linear-resize` (axis 'x' /
231
+ * 'y') so descriptors should prefer that for those cases.
232
+ */
233
+ axis: 'angular';
234
+ /** Optional metadata for descriptors that bundle two handles per kind. */
235
+ end?: 'start' | 'end';
236
+ apply: (initialNode: N, delta: number, sceneApi: SceneApi) => Partial<N>;
237
+ placement: HandlePlacement<N>;
238
+ portal?: HandlePortal;
239
+ /** Optional visual guide shown while the arrow is hovered or dragging. */
240
+ decoration?: HandleDecoration<N>;
241
+ /**
242
+ * Visual override. Defaults to the standard chevron (used by the
243
+ * stair-sweep extend handles). 'rotate' renders a two-headed curved
244
+ * arrow icon, intended for whole-node rotation handles.
245
+ */
246
+ shape?: 'chevron' | 'rotate';
247
+ /**
248
+ * Plane the angular drag is measured in:
249
+ * - 'horizontal' (default): cursor bearing around +Y — whole-node yaw
250
+ * (floor items, elevator, stair, roof-segment).
251
+ * - 'node-normal': cursor bearing around the node's local +Z axis, in
252
+ * the plane perpendicular to it — spins a wall-mounted item flat
253
+ * against its wall. The descriptor's `apply` writes the roll
254
+ * component (rotation[2]). The gizmo icon stands up into that plane.
255
+ */
256
+ rotationPlane?: 'horizontal' | 'node-normal';
257
+ /**
258
+ * Pivot point for the angular drag, in the rideObject's local space.
259
+ * The renderer measures cursor angle (atan2 on the drag plane) around
260
+ * this point — descriptors that write `rotation` should anchor it to
261
+ * the node's visual center. Defaults to the rideObject's own origin,
262
+ * which is correct for nodes whose mesh origin coincides with the
263
+ * field they're rotating (roof-segment, elevator). Use this when the
264
+ * node's pose is baked into its geometry (chimney) so the mesh origin
265
+ * sits at the parent frame's origin rather than the rotating shape's
266
+ * center.
267
+ */
268
+ rotationCenter?: (node: N, sceneApi: SceneApi) => readonly [number, number, number];
269
+ };
270
+ /**
271
+ * Wall / fence endpoint drag. Snapping and adjacency belong to the kind,
272
+ * so the descriptor declares the placement and hands the world-space
273
+ * pointer position back to `apply`. The kind can splice walls, snap to
274
+ * a grid, merge with a neighbour, etc., and returns the partial patch.
275
+ */
276
+ export type EndpointMoveHandle<N> = {
277
+ kind: 'endpoint-move';
278
+ endpoint: 'start' | 'end';
279
+ placement: HandlePlacement<N>;
280
+ /** Called with the world-space hit on the ground plane. */
281
+ apply: (node: N, worldPoint: readonly [number, number, number], sceneApi: SceneApi) => Partial<N>;
282
+ portal?: HandlePortal;
283
+ };
284
+ /**
285
+ * Click-to-engage affordance. The descriptor doesn't drive a drag — its
286
+ * single job is to mount a click target at `placement` and dispatch a
287
+ * verb on the editor API when the user clicks. Used by wall side-move
288
+ * (engage move tool) and wall corner pickers (engage endpoint move).
289
+ *
290
+ * The renderer picks the visual from `shape`. Default `'arrow'` reuses
291
+ * the chevron shape every resize handle uses. `'corner-picker'` renders
292
+ * a dashed vertical leader + billboarded hex disc + ring, anchored at
293
+ * `placement.position` and extending up to `nodeHeight(node)`.
294
+ */
295
+ export type TapActionHandle<N = any> = {
296
+ kind: 'tap-action';
297
+ placement: HandlePlacement<N>;
298
+ /**
299
+ * Dispatched on pointer-down. Use scene/editor APIs to read state +
300
+ * trigger the desired action.
301
+ */
302
+ onActivate: (node: N, scene: SceneApi, editor: EditorApi) => void;
303
+ /**
304
+ * Visual override; defaults to the standard chevron arrow. `'move-cross'`
305
+ * reuses the 4-way move cross — a tap-to-engage grip that hands the node to
306
+ * its move tool (via `onActivate`) instead of running the generic translate
307
+ * drag, so the move tool's own preview / ticker feedback shows up.
308
+ */
309
+ shape?: 'arrow' | 'corner-picker' | 'move-cross';
310
+ /**
311
+ * `shape: 'corner-picker'` only — render the disc and its outer ring as a
312
+ * circle instead of the default hexagon.
313
+ */
314
+ round?: boolean;
315
+ /**
316
+ * Required when `shape: 'corner-picker'` — controls the dashed leader's
317
+ * vertical extent. Pure callback so the descriptor doesn't need to
318
+ * import 3D libs.
319
+ */
320
+ nodeHeight?: (node: N) => number;
321
+ /**
322
+ * `shape: 'move-cross'` only — tilts the flat cross to lie in the right
323
+ * plane. `'horizontal'` (default) leaves it flat on the floor; `'node-normal'`
324
+ * stands it up against the node's facing plane (a wall face).
325
+ */
326
+ plane?: 'horizontal' | 'node-normal';
327
+ portal?: HandlePortal;
328
+ cursor?: Cursor;
329
+ };
330
+ /**
331
+ * Free ground-plane move. Drag the handle and the node slides across the
332
+ * horizontal plane at its base — the renderer raycasts that plane, converts
333
+ * the hit into the node's parent-local frame, and reports the new local XZ
334
+ * (optionally grid-snapped via `snapExtents`) to `apply`. Press-drag-release
335
+ * with the same live-override → commit-on-release flow as the resize / rotate
336
+ * handles. Rendered as a 4-way cross of double-headed arrows. Pure translation
337
+ * does not require geometry dirtying; renderers consume the live position
338
+ * override directly.
339
+ */
340
+ export type TranslateHandle<N = any> = {
341
+ kind: 'translate';
342
+ placement: HandlePlacement<N>;
343
+ /**
344
+ * Plane the drag is constrained to (through the node origin):
345
+ * - 'horizontal' (default): the ground plane (world-up normal) — slide
346
+ * across the floor. The free axes are parent-local X / Z.
347
+ * - 'node-normal': the plane perpendicular to the node's local +Z axis
348
+ * (its facing direction) — slide across a wall face. The free axes are
349
+ * parent-local X / Y; depth (Z) stays pinned to the surface.
350
+ */
351
+ plane?: 'horizontal' | 'node-normal';
352
+ /**
353
+ * `localPos` is the dragged-to position in the node's PARENT-local frame,
354
+ * with the two in-plane axes already grid-snapped (if `snapExtents` is set)
355
+ * and the off-plane axis pinned to its drag-start value. Return the patch
356
+ * that writes it to the node's position field.
357
+ */
358
+ apply: (initialNode: N, localPos: readonly [number, number, number], sceneApi: SceneApi) => Partial<N>;
359
+ /**
360
+ * Optional grid-snap footprint for the two in-plane axes, in order
361
+ * `[alongX, alongOther]` — `alongOther` is Z for the 'horizontal' plane and
362
+ * Y for 'node-normal'. Used to align the node's edges to the grid (rotation-
363
+ * aware: swap the pair at 90°). Omit / return null for free movement.
364
+ * `sceneApi` is supplied for composite nodes whose footprint depends on
365
+ * children, such as straight stairs.
366
+ */
367
+ snapExtents?: (node: N, sceneApi: SceneApi) => readonly [number, number] | null;
368
+ portal?: HandlePortal;
369
+ };
370
+ /**
371
+ * Click-to-latch cube. Renders a small persistent cube at `placement` that
372
+ * toggles the visibility of every handle tagged with the matching
373
+ * {@link LinearResizeHandle.latchGroup} `group`. Clicking the cube once shows
374
+ * the group's arrows; clicking again hides them. The latch state is local to
375
+ * the current selection and resets on deselect.
376
+ *
377
+ * Mirrors the duct-fitting selection cube but driven by descriptor data so any
378
+ * node can collapse a dense arrow cluster behind one grip — e.g. a dormer's
379
+ * window width/height arrows latch behind a cube at the window center.
380
+ */
381
+ export type LatchHandle<N = any> = {
382
+ kind: 'latch';
383
+ /** The `latchGroup` name whose arrows this cube reveals / hides. */
384
+ group: string;
385
+ placement: HandlePlacement<N>;
386
+ portal?: HandlePortal;
387
+ };
388
+ export type HandleDescriptor<N = any> = LinearResizeHandle<N> | RadialResizeHandle<N> | ArcResizeHandle<N> | EndpointMoveHandle<N> | TapActionHandle<N> | TranslateHandle<N> | LatchHandle<N>;
389
+ /**
390
+ * Static array, or a function for shape-dependent cases (column
391
+ * crossSection / supportStyle, stair-segment segmentType, etc.).
392
+ */
393
+ export type HandleList<N> = HandleDescriptor<N>[] | ((node: N) => HandleDescriptor<N>[]);
394
+ //# sourceMappingURL=handles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handles.d.ts","sourceRoot":"","sources":["../../src/registry/handles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvC;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB;;;;OAIG;IACH,UAAU,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACnC;;;;OAIG;IACH,cAAc,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACvC;;;OAGG;IACH,kBAAkB,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG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;IAC/E,MAAM,CAAC,EAAE,YAAY,CAAA;CACtB,CAAA;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,GAAG,IAAI;IACjC,IAAI,EAAE,OAAO,CAAA;IACb,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,eAAe,CAAC,CAAC,CAAC,CAAA;IAC7B,MAAM,CAAC,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,GAAG,IAChC,kBAAkB,CAAC,CAAC,CAAC,GACrB,kBAAkB,CAAC,CAAC,CAAC,GACrB,eAAe,CAAC,CAAC,CAAC,GAClB,kBAAkB,CAAC,CAAC,CAAC,GACrB,eAAe,CAAC,CAAC,CAAC,GAClB,eAAe,CAAC,CAAC,CAAC,GAClB,WAAW,CAAC,CAAC,CAAC,CAAA;AAElB;;;GAGG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA"}
@@ -0,0 +1,24 @@
1
+ // In-world resize / move arrow descriptors. Each `NodeDefinition` may
2
+ // declare a `handles` list (or a `(node) => list` function for shape-
3
+ // dependent affordances). The editor mounts a single generic component
4
+ // that reads these descriptors and renders the arrows / drag logic — no
5
+ // per-kind handles file needed.
6
+ //
7
+ // Pure data + small per-descriptor callbacks: no Three.js, React, or
8
+ // editor imports here so this stays in core. The descriptors are
9
+ // evaluated by the editor at drag time (`apply` etc.) so the callbacks
10
+ // run in the editor's context — they see the live node and the scene
11
+ // API but otherwise do not import 3D libraries.
12
+ //
13
+ // Layered intentionally:
14
+ // - axis-resize : symmetric scaling around center (column W/D, height)
15
+ // - edge-resize : anchored on one edge, the other follows the pointer
16
+ // (door width: drag right edge, left edge stays)
17
+ // - vertical-resize: linear-resize specialised for world-Y (height arrow
18
+ // anchored at bottom; window top-edge anchored at
19
+ // bottom; window bottom-edge anchored at top)
20
+ // - radial-resize : 1:1 outward growth of a radial field (column radius)
21
+ // - arc-resize : curved/spiral stair sweep / inner-radius / rise
22
+ // - endpoint-move : wall / fence endpoint drag (snapping is bespoke,
23
+ // so it delegates to a kind-supplied callback)
24
+ export {};
@@ -0,0 +1,7 @@
1
+ export type { ArcResizeHandle, Cursor, EditorApi, EndpointMoveHandle, HandleAnchor, HandleAxis, HandleDescriptor, HandleList, HandlePlacement, HandlePortal, LatchHandle, LinearResizeHandle, RadialResizeHandle, TapActionHandle, TranslateHandle, } from './handles';
2
+ export { bakePolicyOf, discoverPlugins, extendPluginDiscovery, getHostRefFields, getNodePluginId, getSelectableKinds, hasRegistry3DMoveTool, isDrawnViaTool, isDrawnViaToolKind, isNodeKindEnabled, isPresettable, isPresettableKind, isRegistryMovable, isRegistrySelectable, kindsWithBakePolicy, kindsWithFloorplanScope, loadPlugin, nodeRegistry, type PluginDiscovery, registerNode, resolveFacingIndicator, setPluginDiscovery, } from './registry';
3
+ export { type CascadeContext, type ChildQuery, cascadeDirty, collectDescendants, type SpatialQuery, } from './relations-resolver';
4
+ export { createSceneApi, type SceneStoreLike } from './scene-api';
5
+ export { type CloneNodesIntoOptions, type CloneNodesIntoResult, cloneNodesInto, collectSubtree, type Subtree, } from './subtree';
6
+ export type { Affordance, AlignmentFootprint, AlignmentFootprintConfig, AnyNodeDefinition, AssetRef, BakePolicy, BakeReplaceRenderer, Capabilities, CapabilityCtx, CuttableConfig, DistributionRole, DragAction, DuplicableConfig, DuplicateSubtreeCloneArgs, DuplicateSubtreeCloneResult, EditorCtx, ExportAnimationContext, FloorPlacedConfig, FloorPlacedFootprint, FloorPlacedFootprintContext, FloorPlacedFootprintResolver, FloorPlacedFootprintsResolver, FloorplanAffordance, FloorplanAffordanceModifiers, FloorplanAffordancePoint, FloorplanAffordanceSession, FloorplanGeometry, FloorplanMoveTarget, FloorplanMoveTargetSession, FloorplanPalette, FloorplanPoint, FloorplanStyle, GeometryContext, HostableConfig, IconRef, Issue, KeyboardAction, KeyboardActions, LazyComponent, LiveTransformLike, McpOverrides, MeasurementContribution, MeasurementFeature, MeasurementFeatureBinding, MeasurementFeatureGeometry, MeasurementSnapKind, Modifiers, MovableConfig, MovableParentFrame, NodeCategory, NodeDefinition, NodePort, NodeQuickAction, NodeQuickActionIcon, NodeQuickActionProvider, NodeQuickActionResult, NodeRegistry, PaintCapability, PaintEffectiveMaterialArgs, PaintPatchArgs, PaintPreviewArgs, PaintResolveArgs, ParamAction, ParametricDescriptor, ParamField, ParamGroup, ParentFrameSnapMatch, Plugin, Presentation, QuickMeasurementMetric, QuickMeasurementQuantity, QuickMeasurementReport, Relations, RendererSource, RoofAccessoryConfig, RotatableConfig, ScalableConfig, SceneActionCapability, SceneApi, SelectableConfig, SlotDeclaration, SnapPointKind, SnapProfile, SnappableConfig, SnapServicesLike, SurfacePoint, SurfaceQuery, SurfaceRole, SurfacesConfig, SystemContribution, ToolHint, ToolHintChip, Vec2, } from './types';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/registry/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,MAAM,EACN,SAAS,EACT,kBAAkB,EAClB,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,eAAe,GAChB,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EACvB,U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AAW,EACX,oBAAoB,EACpB,UAAU,EACV,UAAU,EACV,oBAAoB,EACpB,MAAM,EACN,YAAY,EACZ,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,qBAAqB,EACrB,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,QAAQ,EACR,YAAY,EACZ,IAAI,GACL,MAAM,SAAS,CAAA"}
@@ -0,0 +1,4 @@
1
+ export { bakePolicyOf, discoverPlugins, extendPluginDiscovery, getHostRefFields, getNodePluginId, getSelectableKinds, hasRegistry3DMoveTool, isDrawnViaTool, isDrawnViaToolKind, isNodeKindEnabled, isPresettable, isPresettableKind, isRegistryMovable, isRegistrySelectable, kindsWithBakePolicy, kindsWithFloorplanScope, loadPlugin, nodeRegistry, registerNode, resolveFacingIndicator, setPluginDiscovery, } from './registry';
2
+ export { cascadeDirty, collectDescendants, } from './relations-resolver';
3
+ export { createSceneApi } from './scene-api';
4
+ export { cloneNodesInto, collectSubtree, } from './subtree';