@pascal-app/core 1.0.0 → 1.0.3

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 (345) hide show
  1. package/dist/capture/index.d.ts +2 -2
  2. package/dist/capture/index.js +2 -2
  3. package/dist/capture/schema.d.ts.map +1 -1
  4. package/dist/capture/schema.js +2 -0
  5. package/dist/capture/source.d.ts +1 -1
  6. package/dist/capture/source.js +1 -1
  7. package/dist/events/bus.d.ts +6 -3
  8. package/dist/events/bus.d.ts.map +1 -1
  9. package/dist/hooks/spatial-grid/floor-placed-elevation.d.ts +4 -4
  10. package/dist/hooks/spatial-grid/floor-placed-elevation.d.ts.map +1 -1
  11. package/dist/hooks/spatial-grid/floor-placed-elevation.js +7 -12
  12. package/dist/hooks/spatial-grid/floor-placed-footprints.d.ts +4 -0
  13. package/dist/hooks/spatial-grid/floor-placed-footprints.d.ts.map +1 -0
  14. package/dist/hooks/spatial-grid/floor-placed-footprints.js +7 -0
  15. package/dist/hooks/spatial-grid/spatial-grid-manager.d.ts +5 -8
  16. package/dist/hooks/spatial-grid/spatial-grid-manager.d.ts.map +1 -1
  17. package/dist/hooks/spatial-grid/spatial-grid-manager.js +23 -106
  18. package/dist/hooks/spatial-grid/spatial-grid-sync.d.ts +263 -84
  19. package/dist/hooks/spatial-grid/spatial-grid-sync.d.ts.map +1 -1
  20. package/dist/hooks/spatial-grid/spatial-grid-sync.js +77 -13
  21. package/dist/hooks/spatial-grid/support-host-patch.d.ts +1 -1
  22. package/dist/hooks/spatial-grid/support-host-patch.js +6 -6
  23. package/dist/hooks/spatial-grid/use-spatial-query.d.ts +1 -1
  24. package/dist/hooks/spatial-grid/use-spatial-query.js +1 -1
  25. package/dist/index.d.ts +77 -72
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +74 -69
  28. package/dist/lib/door-operation.d.ts +1 -1
  29. package/dist/lib/item-polygon-overlap.d.ts +6 -0
  30. package/dist/lib/item-polygon-overlap.d.ts.map +1 -0
  31. package/dist/lib/item-polygon-overlap.js +67 -0
  32. package/dist/lib/level-name.d.ts +1 -1
  33. package/dist/lib/measurement-geometry.d.ts +4 -4
  34. package/dist/lib/node-visibility.d.ts +12 -0
  35. package/dist/lib/node-visibility.d.ts.map +1 -0
  36. package/dist/lib/node-visibility.js +12 -0
  37. package/dist/lib/plan-footprint.d.ts +41 -0
  38. package/dist/lib/plan-footprint.d.ts.map +1 -0
  39. package/dist/lib/plan-footprint.js +58 -0
  40. package/dist/lib/room-topology-index.d.ts +1 -1
  41. package/dist/lib/room-topology-index.js +1 -1
  42. package/dist/lib/selection-proxy.d.ts +1 -1
  43. package/dist/lib/slab-polygon.d.ts +2 -2
  44. package/dist/lib/slab-polygon.js +2 -2
  45. package/dist/lib/space-detection.d.ts +1 -1
  46. package/dist/lib/space-detection.d.ts.map +1 -1
  47. package/dist/lib/space-detection.js +16 -11
  48. package/dist/lib/terrain-brush.d.ts +1 -1
  49. package/dist/lib/terrain-brush.js +1 -1
  50. package/dist/lib/terrain-codec.d.ts +2 -2
  51. package/dist/lib/terrain-codec.js +1 -1
  52. package/dist/lib/terrain-raycast.d.ts +1 -1
  53. package/dist/lib/terrain-raycast.js +1 -1
  54. package/dist/lib/terrain-source.d.ts +3 -3
  55. package/dist/lib/terrain-source.js +3 -3
  56. package/dist/lib/terrain-support.d.ts +1 -1
  57. package/dist/lib/terrain-support.js +3 -3
  58. package/dist/lib/unit-containment.d.ts +19 -0
  59. package/dist/lib/unit-containment.d.ts.map +1 -0
  60. package/dist/lib/unit-containment.js +158 -0
  61. package/dist/lib/unit-report.d.ts +19 -0
  62. package/dist/lib/unit-report.d.ts.map +1 -0
  63. package/dist/lib/unit-report.js +36 -0
  64. package/dist/lib/wall-distance.d.ts +2 -2
  65. package/dist/lib/wall-distance.js +1 -1
  66. package/dist/lib/zone-quantities.d.ts +1 -1
  67. package/dist/lib/zone-quantities.js +7 -7
  68. package/dist/material-library.d.ts +1 -1
  69. package/dist/material-library.js +1 -1
  70. package/dist/procedural-items/fixtures.d.ts +261 -0
  71. package/dist/procedural-items/fixtures.d.ts.map +1 -0
  72. package/dist/procedural-items/fixtures.js +349 -0
  73. package/dist/procedural-items/index.d.ts +10 -0
  74. package/dist/procedural-items/index.d.ts.map +1 -0
  75. package/dist/procedural-items/index.js +9 -0
  76. package/dist/procedural-items/integration.d.ts +92 -0
  77. package/dist/procedural-items/integration.d.ts.map +1 -0
  78. package/dist/procedural-items/integration.js +19 -0
  79. package/dist/procedural-items/library-colors.d.ts +56 -0
  80. package/dist/procedural-items/library-colors.d.ts.map +1 -0
  81. package/dist/procedural-items/library-colors.js +84 -0
  82. package/dist/procedural-items/materials.d.ts +5 -0
  83. package/dist/procedural-items/materials.d.ts.map +1 -0
  84. package/dist/procedural-items/materials.js +47 -0
  85. package/dist/procedural-items/node.d.ts +280 -0
  86. package/dist/procedural-items/node.d.ts.map +1 -0
  87. package/dist/procedural-items/node.js +71 -0
  88. package/dist/procedural-items/placement.d.ts +7 -0
  89. package/dist/procedural-items/placement.d.ts.map +1 -0
  90. package/dist/procedural-items/placement.js +48 -0
  91. package/dist/procedural-items/query.d.ts +51 -0
  92. package/dist/procedural-items/query.d.ts.map +1 -0
  93. package/dist/procedural-items/query.js +342 -0
  94. package/dist/procedural-items/recipe.d.ts +144 -0
  95. package/dist/procedural-items/recipe.d.ts.map +1 -0
  96. package/dist/procedural-items/recipe.js +372 -0
  97. package/dist/procedural-items/spatial.d.ts +19 -0
  98. package/dist/procedural-items/spatial.d.ts.map +1 -0
  99. package/dist/procedural-items/spatial.js +39 -0
  100. package/dist/registry/__bench__/relations-resolver.bench.js +2 -2
  101. package/dist/registry/handles.d.ts +40 -5
  102. package/dist/registry/handles.d.ts.map +1 -1
  103. package/dist/registry/index.d.ts +6 -6
  104. package/dist/registry/index.d.ts.map +1 -1
  105. package/dist/registry/index.js +4 -4
  106. package/dist/registry/registry.d.ts +1 -1
  107. package/dist/registry/relations-resolver.d.ts +2 -2
  108. package/dist/registry/relations-resolver.js +1 -1
  109. package/dist/registry/scene-api.d.ts +2 -2
  110. package/dist/registry/scene-api.js +2 -2
  111. package/dist/registry/subtree.d.ts +1 -1
  112. package/dist/registry/subtree.d.ts.map +1 -1
  113. package/dist/registry/subtree.js +8 -2
  114. package/dist/registry/types.d.ts +32 -10
  115. package/dist/registry/types.d.ts.map +1 -1
  116. package/dist/registry/use-registry-version.js +1 -1
  117. package/dist/registry/validate-relations.d.ts +4 -0
  118. package/dist/registry/validate-relations.d.ts.map +1 -0
  119. package/dist/registry/validate-relations.js +22 -0
  120. package/dist/schema/__bench__/node-parsers.bench.js +3 -3
  121. package/dist/schema/__fixtures__/node-fixtures.d.ts +1 -1
  122. package/dist/schema/__fixtures__/node-fixtures.d.ts.map +1 -1
  123. package/dist/schema/__fixtures__/node-fixtures.js +4 -2
  124. package/dist/schema/base.js +1 -1
  125. package/dist/schema/collections.d.ts +1 -1
  126. package/dist/schema/collections.js +1 -1
  127. package/dist/schema/compiled-node-parsers.d.ts +1 -1
  128. package/dist/schema/compiled-node-parsers.js +1 -1
  129. package/dist/schema/index.d.ts +74 -70
  130. package/dist/schema/index.d.ts.map +1 -1
  131. package/dist/schema/index.js +65 -61
  132. package/dist/schema/material.d.ts +1 -1
  133. package/dist/schema/material.js +1 -1
  134. package/dist/schema/nodes/automatic-downspout.d.ts +4 -4
  135. package/dist/schema/nodes/automatic-downspout.js +5 -5
  136. package/dist/schema/nodes/block.d.ts +3 -3
  137. package/dist/schema/nodes/block.d.ts.map +1 -1
  138. package/dist/schema/nodes/block.js +24 -12
  139. package/dist/schema/nodes/box-vent.js +2 -2
  140. package/dist/schema/nodes/building.d.ts +1 -1
  141. package/dist/schema/nodes/building.d.ts.map +1 -1
  142. package/dist/schema/nodes/building.js +8 -5
  143. package/dist/schema/nodes/cabinet.d.ts +4 -4
  144. package/dist/schema/nodes/cabinet.js +4 -4
  145. package/dist/schema/nodes/ceiling.d.ts +1 -1
  146. package/dist/schema/nodes/ceiling.js +5 -5
  147. package/dist/schema/nodes/chimney.js +2 -2
  148. package/dist/schema/nodes/column.d.ts +1 -0
  149. package/dist/schema/nodes/column.d.ts.map +1 -1
  150. package/dist/schema/nodes/column.js +3 -2
  151. package/dist/schema/nodes/construction-dimension.d.ts +3 -3
  152. package/dist/schema/nodes/construction-dimension.js +2 -2
  153. package/dist/schema/nodes/cupola.d.ts +1 -1
  154. package/dist/schema/nodes/cupola.js +2 -2
  155. package/dist/schema/nodes/curtain-wall.d.ts +129 -0
  156. package/dist/schema/nodes/curtain-wall.d.ts.map +1 -0
  157. package/dist/schema/nodes/curtain-wall.js +49 -0
  158. package/dist/schema/nodes/door.d.ts +2 -2
  159. package/dist/schema/nodes/door.js +2 -2
  160. package/dist/schema/nodes/dormer.d.ts +3 -3
  161. package/dist/schema/nodes/dormer.js +4 -4
  162. package/dist/schema/nodes/downspout.js +2 -2
  163. package/dist/schema/nodes/duct-fitting.js +1 -1
  164. package/dist/schema/nodes/duct-segment.js +2 -2
  165. package/dist/schema/nodes/duct-terminal.js +1 -1
  166. package/dist/schema/nodes/elevator.js +2 -2
  167. package/dist/schema/nodes/eyebrow-vent.js +2 -2
  168. package/dist/schema/nodes/fence.js +2 -2
  169. package/dist/schema/nodes/guide.js +2 -2
  170. package/dist/schema/nodes/gutter.d.ts +1 -1
  171. package/dist/schema/nodes/gutter.js +4 -4
  172. package/dist/schema/nodes/hvac-equipment.js +1 -1
  173. package/dist/schema/nodes/imported-mesh.d.ts +40 -0
  174. package/dist/schema/nodes/imported-mesh.d.ts.map +1 -0
  175. package/dist/schema/nodes/imported-mesh.js +27 -0
  176. package/dist/schema/nodes/item.d.ts +3 -3
  177. package/dist/schema/nodes/item.js +3 -3
  178. package/dist/schema/nodes/lean-to-extension.js +4 -4
  179. package/dist/schema/nodes/level.d.ts +1 -1
  180. package/dist/schema/nodes/level.d.ts.map +1 -1
  181. package/dist/schema/nodes/level.js +1 -1
  182. package/dist/schema/nodes/lineset.js +1 -1
  183. package/dist/schema/nodes/liquid-line.js +1 -1
  184. package/dist/schema/nodes/measurement.js +2 -2
  185. package/dist/schema/nodes/pipe-fitting.d.ts +1 -1
  186. package/dist/schema/nodes/pipe-fitting.js +1 -1
  187. package/dist/schema/nodes/pipe-segment.d.ts +1 -1
  188. package/dist/schema/nodes/pipe-segment.js +2 -2
  189. package/dist/schema/nodes/pipe-trap.d.ts +1 -1
  190. package/dist/schema/nodes/pipe-trap.js +1 -1
  191. package/dist/schema/nodes/ridge-vent.d.ts +1 -1
  192. package/dist/schema/nodes/ridge-vent.js +3 -3
  193. package/dist/schema/nodes/roof-segment-shape.d.ts +1 -1
  194. package/dist/schema/nodes/roof-segment-shape.js +1 -1
  195. package/dist/schema/nodes/roof-segment-walls.d.ts +1 -1
  196. package/dist/schema/nodes/roof-segment-walls.js +1 -1
  197. package/dist/schema/nodes/roof-segment.d.ts +2 -2
  198. package/dist/schema/nodes/roof-segment.js +2 -2
  199. package/dist/schema/nodes/roof.d.ts +1 -1
  200. package/dist/schema/nodes/roof.js +3 -3
  201. package/dist/schema/nodes/scan.js +3 -3
  202. package/dist/schema/nodes/shelf.d.ts +1 -1
  203. package/dist/schema/nodes/shelf.d.ts.map +1 -1
  204. package/dist/schema/nodes/shelf.js +3 -4
  205. package/dist/schema/nodes/site.js +2 -2
  206. package/dist/schema/nodes/skylight.d.ts +4 -4
  207. package/dist/schema/nodes/skylight.js +2 -2
  208. package/dist/schema/nodes/slab.js +3 -3
  209. package/dist/schema/nodes/solar-panel.js +3 -3
  210. package/dist/schema/nodes/spawn.js +1 -1
  211. package/dist/schema/nodes/stair-segment.js +2 -2
  212. package/dist/schema/nodes/stair.d.ts +1 -1
  213. package/dist/schema/nodes/stair.js +3 -3
  214. package/dist/schema/nodes/structural-grid.js +1 -1
  215. package/dist/schema/nodes/turbine-vent.d.ts +1 -1
  216. package/dist/schema/nodes/turbine-vent.js +2 -2
  217. package/dist/schema/nodes/unit.d.ts +33 -0
  218. package/dist/schema/nodes/unit.d.ts.map +1 -0
  219. package/dist/schema/nodes/unit.js +13 -0
  220. package/dist/schema/nodes/wall.d.ts +75 -2
  221. package/dist/schema/nodes/wall.d.ts.map +1 -1
  222. package/dist/schema/nodes/wall.js +10 -6
  223. package/dist/schema/nodes/window.js +2 -2
  224. package/dist/schema/nodes/zone.js +1 -1
  225. package/dist/schema/scene-material.js +2 -2
  226. package/dist/schema/types.d.ts +417 -22
  227. package/dist/schema/types.d.ts.map +1 -1
  228. package/dist/schema/types.js +56 -49
  229. package/dist/services/__fixtures__/hosting.d.ts +3 -0
  230. package/dist/services/__fixtures__/hosting.d.ts.map +1 -0
  231. package/dist/services/__fixtures__/hosting.js +9 -0
  232. package/dist/services/__fixtures__/shelf-surface-rows.d.ts +4 -0
  233. package/dist/services/__fixtures__/shelf-surface-rows.d.ts.map +1 -0
  234. package/dist/services/__fixtures__/shelf-surface-rows.js +18 -0
  235. package/dist/services/alignment-anchors.d.ts +6 -11
  236. package/dist/services/alignment-anchors.d.ts.map +1 -1
  237. package/dist/services/alignment-anchors.js +7 -34
  238. package/dist/services/drag-session.d.ts +4 -4
  239. package/dist/services/drag-session.js +1 -1
  240. package/dist/services/hosting.d.ts +5 -8
  241. package/dist/services/hosting.d.ts.map +1 -1
  242. package/dist/services/hosting.js +25 -18
  243. package/dist/services/index.d.ts +16 -13
  244. package/dist/services/index.d.ts.map +1 -1
  245. package/dist/services/index.js +16 -13
  246. package/dist/services/level-height.d.ts +2 -2
  247. package/dist/services/level-height.js +3 -3
  248. package/dist/services/movement.d.ts +3 -3
  249. package/dist/services/movement.js +2 -2
  250. package/dist/services/port-connectivity.d.ts +1 -1
  251. package/dist/services/port-connectivity.js +1 -1
  252. package/dist/services/riser-diagram.d.ts +1 -1
  253. package/dist/services/shelf-board.d.ts +5 -0
  254. package/dist/services/shelf-board.d.ts.map +1 -0
  255. package/dist/services/shelf-board.js +15 -0
  256. package/dist/services/snap.d.ts +3 -0
  257. package/dist/services/snap.d.ts.map +1 -1
  258. package/dist/services/snap.js +11 -0
  259. package/dist/services/storey.d.ts +2 -2
  260. package/dist/services/storey.js +2 -2
  261. package/dist/services/surface-hosting-procedural-parity.fixtures.d.ts +13 -0
  262. package/dist/services/surface-hosting-procedural-parity.fixtures.d.ts.map +1 -0
  263. package/dist/services/surface-hosting-procedural-parity.fixtures.js +4691 -0
  264. package/dist/services/surface-hosting-shelf-parity.fixtures.d.ts +1060 -0
  265. package/dist/services/surface-hosting-shelf-parity.fixtures.d.ts.map +1 -0
  266. package/dist/services/surface-hosting-shelf-parity.fixtures.js +3127 -0
  267. package/dist/services/surface-hosting.d.ts +92 -0
  268. package/dist/services/surface-hosting.d.ts.map +1 -0
  269. package/dist/services/surface-hosting.js +305 -0
  270. package/dist/services/surface-region.d.ts +8 -0
  271. package/dist/services/surface-region.d.ts.map +1 -0
  272. package/dist/services/surface-region.js +44 -0
  273. package/dist/services/system-graph.d.ts +2 -2
  274. package/dist/services/system-graph.js +2 -2
  275. package/dist/services/validate-dwv.d.ts +1 -1
  276. package/dist/services/validate-dwv.js +1 -1
  277. package/dist/store/actions/node-actions.d.ts +2 -2
  278. package/dist/store/actions/node-actions.d.ts.map +1 -1
  279. package/dist/store/actions/node-actions.js +50 -104
  280. package/dist/store/history-control.d.ts +3 -3
  281. package/dist/store/history-invalidation.d.ts +1 -1
  282. package/dist/store/history-invalidation.js +1 -1
  283. package/dist/store/use-interactive.d.ts +2 -2
  284. package/dist/store/use-live-terrain.d.ts +1 -1
  285. package/dist/store/use-scene.d.ts +4 -4
  286. package/dist/store/use-scene.d.ts.map +1 -1
  287. package/dist/store/use-scene.js +50 -32
  288. package/dist/systems/elevator/elevator-dispatch.d.ts +2 -2
  289. package/dist/systems/elevator/elevator-dispatch.js +1 -1
  290. package/dist/systems/elevator/elevator-geometry.d.ts +1 -1
  291. package/dist/systems/elevator/elevator-opening-sync.d.ts +1 -1
  292. package/dist/systems/elevator/elevator-opening-sync.js +2 -2
  293. package/dist/systems/elevator/elevator-opening-system.js +3 -3
  294. package/dist/systems/elevator/elevator-runtime.d.ts +3 -3
  295. package/dist/systems/elevator/elevator-runtime.js +3 -3
  296. package/dist/systems/elevator/elevator-service.d.ts +1 -1
  297. package/dist/systems/elevator/elevator-service.js +1 -1
  298. package/dist/systems/fence/fence-centerline.d.ts +2 -2
  299. package/dist/systems/fence/fence-centerline.js +2 -2
  300. package/dist/systems/fence/fence-spline.d.ts +2 -2
  301. package/dist/systems/roof/roof-elevation-system.js +3 -3
  302. package/dist/systems/roof/roof-elevation.d.ts +2 -2
  303. package/dist/systems/roof/roof-elevation.js +6 -6
  304. package/dist/systems/roof/roof-footprint.d.ts +1 -1
  305. package/dist/systems/roof/roof-footprint.js +3 -3
  306. package/dist/systems/slab/slab-placement.d.ts +1 -1
  307. package/dist/systems/slab/slab-support.d.ts +1 -1
  308. package/dist/systems/slab/slab-support.js +4 -4
  309. package/dist/systems/stair/stair-flight.d.ts +2 -2
  310. package/dist/systems/stair/stair-flight.js +2 -2
  311. package/dist/systems/stair/stair-footprint.d.ts +1 -1
  312. package/dist/systems/stair/stair-opening-preview.d.ts +248 -87
  313. package/dist/systems/stair/stair-opening-preview.d.ts.map +1 -1
  314. package/dist/systems/stair/stair-opening-preview.js +2 -2
  315. package/dist/systems/stair/stair-opening-sync.d.ts +1 -1
  316. package/dist/systems/stair/stair-opening-sync.js +6 -6
  317. package/dist/systems/stair/stair-opening-system.js +8 -8
  318. package/dist/systems/stair/stair-rise.d.ts +1 -1
  319. package/dist/systems/stair/stair-rise.js +3 -3
  320. package/dist/systems/wall/wall-curve.d.ts +2 -2
  321. package/dist/systems/wall/wall-footprint.d.ts +3 -3
  322. package/dist/systems/wall/wall-footprint.js +3 -3
  323. package/dist/systems/wall/wall-merge.d.ts +38 -0
  324. package/dist/systems/wall/wall-merge.d.ts.map +1 -0
  325. package/dist/systems/wall/wall-merge.js +240 -0
  326. package/dist/systems/wall/wall-mitering.d.ts +1 -1
  327. package/dist/systems/wall/wall-mitering.js +1 -1
  328. package/dist/systems/wall/wall-move.d.ts +1 -1
  329. package/dist/systems/wall/wall-operations.d.ts +28 -0
  330. package/dist/systems/wall/wall-operations.d.ts.map +1 -0
  331. package/dist/systems/wall/wall-operations.js +145 -0
  332. package/dist/systems/wall/wall-top.d.ts +1 -1
  333. package/dist/systems/wall/wall-topology.d.ts +9 -2
  334. package/dist/systems/wall/wall-topology.d.ts.map +1 -1
  335. package/dist/systems/wall/wall-topology.js +57 -9
  336. package/dist/utils/clone-scene-graph.d.ts +3 -3
  337. package/dist/utils/clone-scene-graph.d.ts.map +1 -1
  338. package/dist/utils/clone-scene-graph.js +9 -3
  339. package/dist/utils/scene-migrations.d.ts +3 -3
  340. package/dist/utils/scene-migrations.js +3 -3
  341. package/dist/utils/vertical-scene-migration.js +5 -5
  342. package/dist/validation/validate-build-json.d.ts +5 -2
  343. package/dist/validation/validate-build-json.d.ts.map +1 -1
  344. package/dist/validation/validate-build-json.js +57 -4
  345. package/package.json +15 -4
@@ -17,9 +17,9 @@
17
17
  * the commit, the next read is a cache hit, so a stroke never decodes base64 even
18
18
  * once, let alone per dab.
19
19
  */
20
- import useLiveTerrain from '../store/use-live-terrain';
21
- import { decodeTerrainField, encodeTerrainField } from './terrain-codec';
22
- import { createTerrainField } from './terrain-field';
20
+ import useLiveTerrain from '../store/use-live-terrain.js';
21
+ import { decodeTerrainField, encodeTerrainField } from './terrain-codec.js';
22
+ import { createTerrainField } from './terrain-field.js';
23
23
  const fieldCache = new WeakMap();
24
24
  /**
25
25
  * Sites whose `terrain` failed to decode. Prevents re-attempting a doomed decode
@@ -11,7 +11,7 @@
11
11
  * The whole file is pure — nodes in, metres out — which is what lets the stacking
12
12
  * matrix be tested per kind without a canvas.
13
13
  */
14
- import type { AnyNode } from '../schema';
14
+ import type { AnyNode } from '../schema/index.js';
15
15
  /**
16
16
  * World Y of the site datum — the plane terrain heights are measured from.
17
17
  *
@@ -11,9 +11,9 @@
11
11
  * The whole file is pure — nodes in, metres out — which is what lets the stacking
12
12
  * matrix be tested per kind without a canvas.
13
13
  */
14
- import { getLevelElevations } from '../services/storey';
15
- import { heightAt } from './terrain-field';
16
- import { terrainFieldOf } from './terrain-source';
14
+ import { getLevelElevations } from '../services/storey.js';
15
+ import { heightAt } from './terrain-field.js';
16
+ import { terrainFieldOf } from './terrain-source.js';
17
17
  /**
18
18
  * World Y of the site datum — the plane terrain heights are measured from.
19
19
  *
@@ -0,0 +1,19 @@
1
+ import type { AnyNode, AnyNodeId, BuildingNode, LevelNode, UnitNode, WallNode, ZoneNode } from '../schema/index.js';
2
+ export type UnitDerivation = {
3
+ unitId: UnitNode['id'];
4
+ memberZoneIds: ZoneNode['id'][];
5
+ levelIds: LevelNode['id'][];
6
+ containedNodeIds: AnyNodeId[];
7
+ boundaryWallIds: WallNode['id'][];
8
+ supportIds: AnyNodeId[];
9
+ visibleNodeIds: AnyNodeId[];
10
+ };
11
+ type Nodes = Readonly<Record<AnyNodeId, AnyNode>>;
12
+ export declare function deriveUnit(unit: UnitNode, nodes: Nodes): UnitDerivation;
13
+ export declare function unitsForZone(zoneId: ZoneNode['id'], nodes: Nodes): UnitNode[];
14
+ export declare function unassignedZoneIds(buildingId: BuildingNode['id'], nodes: Nodes): ZoneNode['id'][];
15
+ export declare function unitWarnings(unit: UnitNode, nodes: Nodes): Array<{
16
+ code: 'empty' | 'non-adjacent-levels';
17
+ }>;
18
+ export {};
19
+ //# sourceMappingURL=unit-containment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unit-containment.d.ts","sourceRoot":"","sources":["../../src/lib/unit-containment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,SAAS,EACT,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,QAAQ,EACT,MAAM,WAAW,CAAA;AAMlB,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAA;IACtB,aAAa,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAA;IAC/B,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,CAAA;IAC3B,gBAAgB,EAAE,SAAS,EAAE,CAAA;IAC7B,eAAe,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAA;IACjC,UAAU,EAAE,SAAS,EAAE,CAAA;IACvB,cAAc,EAAE,SAAS,EAAE,CAAA;CAC5B,CAAA;AAED,KAAK,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAA;AA8CjD,wBAAgB,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,GAAG,cAAc,CAuFvE;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,GAAG,QAAQ,EAAE,CAI7E;AAED,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAqBhG;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,KAAK,GACX,KAAK,CAAC;IACP,IAAI,EAAE,OAAO,GAAG,qBAAqB,CAAA;CACtC,CAAC,CAiBD"}
@@ -0,0 +1,158 @@
1
+ import { pointOnPolygonBoundary, wallOverlapsSlabFootprint } from '../systems/slab/slab-support.js';
2
+ import { measurementCentroid } from './measurement-geometry.js';
3
+ import { pointInPolygon } from './polygon-relations.js';
4
+ import { detectSpacesForLevel, resolveAutoZonePolygon } from './space-detection.js';
5
+ function footprintCentroid(node) {
6
+ if ('position' in node && Array.isArray(node.position) && node.position.length === 3) {
7
+ return [node.position[0], node.position[2]];
8
+ }
9
+ if ('polygon' in node && Array.isArray(node.polygon)) {
10
+ const centroid = measurementCentroid(node.polygon.map(([x, z]) => [x, 0, z]));
11
+ return centroid ? [centroid[0], centroid[2]] : null;
12
+ }
13
+ return null;
14
+ }
15
+ function polygonCentroid(polygon) {
16
+ if (polygon.length < 3)
17
+ return null;
18
+ const centroid = measurementCentroid(polygon.map(([x, z]) => [x, 0, z]));
19
+ return centroid ? [centroid[0], centroid[2]] : null;
20
+ }
21
+ function coversPoint(point, polygon, holes = []) {
22
+ return (polygon.length >= 3 &&
23
+ (pointInPolygon(point, polygon) || pointOnPolygonBoundary(point[0], point[1], polygon)) &&
24
+ !holes.some((hole) => pointInPolygon(point, hole, { includeBoundary: false }) &&
25
+ !pointOnPolygonBoundary(point[0], point[1], hole)));
26
+ }
27
+ function overlapsSupport(polygon, support) {
28
+ if (polygon.length < 3 || support.polygon.length < 3)
29
+ return false;
30
+ return (polygon.some((point) => coversPoint(point, support.polygon, support.holes)) ||
31
+ support.polygon.some((point) => coversPoint(point, polygon)) ||
32
+ polygon.some((start, index) => wallOverlapsSlabFootprint({ start, end: polygon[(index + 1) % polygon.length], thickness: 0 }, support.polygon, support.holes)));
33
+ }
34
+ export function deriveUnit(unit, nodes) {
35
+ const members = [...new Set(unit.members)].flatMap((id) => {
36
+ const zone = nodes[id];
37
+ return zone?.type === 'zone' ? [zone] : [];
38
+ });
39
+ const levels = new Map();
40
+ const polygonsByLevel = new Map();
41
+ for (const zone of members) {
42
+ const level = zone.parentId ? nodes[zone.parentId] : undefined;
43
+ if (level?.type !== 'level')
44
+ continue;
45
+ levels.set(level.id, level);
46
+ const polygons = polygonsByLevel.get(level.id) ?? [];
47
+ polygons.push(resolveAutoZonePolygon(zone, (id) => nodes[id]));
48
+ polygonsByLevel.set(level.id, polygons);
49
+ }
50
+ const levelIds = [...levels.values()]
51
+ .sort((a, b) => a.level - b.level || a.id.localeCompare(b.id))
52
+ .map((level) => level.id);
53
+ const containedNodeIds = [];
54
+ const boundaryWalls = new Set();
55
+ const supportIds = [];
56
+ const wallsByLevel = new Map();
57
+ for (const node of Object.values(nodes)) {
58
+ const polygons = node.parentId
59
+ ? polygonsByLevel.get(node.parentId)
60
+ : undefined;
61
+ if (!polygons)
62
+ continue;
63
+ if (node.type === 'wall') {
64
+ const levelId = node.parentId;
65
+ wallsByLevel.set(levelId, [...(wallsByLevel.get(levelId) ?? []), node]);
66
+ if (polygons.some((polygon) => polygon.length >= 3 && wallOverlapsSlabFootprint(node, polygon))) {
67
+ boundaryWalls.add(node.id);
68
+ }
69
+ }
70
+ else if (node.type === 'slab' || node.type === 'ceiling') {
71
+ if (polygons.some((polygon) => overlapsSupport(polygon, node)))
72
+ supportIds.push(node.id);
73
+ }
74
+ else if (node.type !== 'zone' &&
75
+ node.type !== 'level' &&
76
+ node.type !== 'building' &&
77
+ node.type !== 'site' &&
78
+ node.type !== 'unit') {
79
+ const point = footprintCentroid(node);
80
+ if (point && polygons.some((polygon) => coversPoint(point, polygon)))
81
+ containedNodeIds.push(node.id);
82
+ }
83
+ }
84
+ // A zone drawn inside a room, short of the wall centerlines, still means
85
+ // that room: the walls of every detected space that encloses a member
86
+ // centroid, or whose own centroid the member encloses, are boundary walls.
87
+ for (const [levelId, walls] of wallsByLevel) {
88
+ const polygons = polygonsByLevel.get(levelId) ?? [];
89
+ for (const space of detectSpacesForLevel(levelId, walls).spaces) {
90
+ if (space.isExterior)
91
+ continue;
92
+ const spaceCentroid = polygonCentroid(space.polygon);
93
+ const matches = polygons.some((polygon) => {
94
+ const memberCentroid = polygonCentroid(polygon);
95
+ return ((memberCentroid !== null && coversPoint(memberCentroid, space.polygon)) ||
96
+ (spaceCentroid !== null && coversPoint(spaceCentroid, polygon)));
97
+ });
98
+ if (matches)
99
+ for (const wallId of space.wallIds)
100
+ boundaryWalls.add(wallId);
101
+ }
102
+ }
103
+ const boundaryWallIds = [...boundaryWalls];
104
+ const memberZoneIds = members.map((zone) => zone.id);
105
+ // Ancestors (levels, building, site, the unit itself) are left out: the
106
+ // viewer's isolation filter keeps every descendant of a listed id, so
107
+ // listing a level would show the whole storey.
108
+ const visible = new Set([
109
+ ...memberZoneIds,
110
+ ...containedNodeIds,
111
+ ...boundaryWallIds,
112
+ ...supportIds,
113
+ ]);
114
+ return {
115
+ unitId: unit.id,
116
+ memberZoneIds,
117
+ levelIds,
118
+ containedNodeIds,
119
+ boundaryWallIds,
120
+ supportIds,
121
+ visibleNodeIds: [...visible],
122
+ };
123
+ }
124
+ export function unitsForZone(zoneId, nodes) {
125
+ return Object.values(nodes).filter((node) => node.type === 'unit' && node.members.includes(zoneId));
126
+ }
127
+ export function unassignedZoneIds(buildingId, nodes) {
128
+ const assigned = new Set(Object.values(nodes).flatMap((node) => (node.type === 'unit' ? node.members : [])));
129
+ const building = nodes[buildingId];
130
+ if (building?.type !== 'building')
131
+ return [];
132
+ const levels = new Set(Object.values(nodes).flatMap((node) => node.type === 'level' && (node.parentId === buildingId || building.children.includes(node.id))
133
+ ? [node.id]
134
+ : []));
135
+ return Object.values(nodes).flatMap((node) => node.type === 'zone' &&
136
+ node.parentId &&
137
+ levels.has(node.parentId) &&
138
+ !assigned.has(node.id)
139
+ ? [node.id]
140
+ : []);
141
+ }
142
+ export function unitWarnings(unit, nodes) {
143
+ const members = [...new Set(unit.members)].filter((id) => nodes[id]?.type === 'zone');
144
+ const warnings = [];
145
+ if (members.length === 0)
146
+ warnings.push({ code: 'empty' });
147
+ const ordinals = [
148
+ ...new Set(members.flatMap((id) => {
149
+ const parentId = nodes[id]?.parentId;
150
+ const level = parentId ? nodes[parentId] : undefined;
151
+ return level?.type === 'level' ? [level.level] : [];
152
+ })),
153
+ ].sort((a, b) => a - b);
154
+ if (ordinals.some((ordinal, index) => index > 0 && ordinal - ordinals[index - 1] > 1)) {
155
+ warnings.push({ code: 'non-adjacent-levels' });
156
+ }
157
+ return warnings;
158
+ }
@@ -0,0 +1,19 @@
1
+ import type { AnyNode, AnyNodeId, LevelNode, UnitNode, ZoneNode } from '../schema/index.js';
2
+ export type UnitReport = {
3
+ memberCount: number;
4
+ levelSpan: {
5
+ minOrdinal: number;
6
+ maxOrdinal: number;
7
+ count: number;
8
+ } | null;
9
+ grossAreaM2: number;
10
+ members: Array<{
11
+ zoneId: ZoneNode['id'];
12
+ name: string;
13
+ levelId: LevelNode['id'] | null;
14
+ levelOrdinal: number | null;
15
+ areaM2: number;
16
+ }>;
17
+ };
18
+ export declare function buildUnitReport(unit: UnitNode, nodes: Readonly<Record<AnyNodeId, AnyNode>>): UnitReport;
19
+ //# sourceMappingURL=unit-report.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unit-report.d.ts","sourceRoot":"","sources":["../../src/lib/unit-report.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAIlF,MAAM,MAAM,UAAU,GAAG;IACvB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;IAC3E,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,KAAK,CAAC;QACb,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAA;QACtB,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,EAAE,SAAS,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;QAC/B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;QAC3B,MAAM,EAAE,MAAM,CAAA;KACf,CAAC,CAAA;CACH,CAAA;AAED,wBAAgB,eAAe,CAC7B,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,GAC1C,UAAU,CAgCZ"}
@@ -0,0 +1,36 @@
1
+ import { measurementArea } from './measurement-geometry.js';
2
+ import { resolveAutoZonePolygon } from './space-detection.js';
3
+ export function buildUnitReport(unit, nodes) {
4
+ const levels = new Map();
5
+ const members = [...new Set(unit.members)].flatMap((id) => {
6
+ const zone = nodes[id];
7
+ if (zone?.type !== 'zone')
8
+ return [];
9
+ const level = zone.parentId ? nodes[zone.parentId] : undefined;
10
+ if (level?.type === 'level')
11
+ levels.set(level.id, level.level);
12
+ const polygon = resolveAutoZonePolygon(zone, (nodeId) => nodes[nodeId]);
13
+ return [
14
+ {
15
+ zoneId: zone.id,
16
+ name: zone.name,
17
+ levelId: level?.type === 'level' ? level.id : null,
18
+ levelOrdinal: level?.type === 'level' ? level.level : null,
19
+ areaM2: measurementArea(polygon.map(([x, z]) => [x, 0, z])),
20
+ },
21
+ ];
22
+ });
23
+ const ordinals = [...levels.values()];
24
+ return {
25
+ memberCount: members.length,
26
+ levelSpan: levels.size > 0
27
+ ? {
28
+ minOrdinal: Math.min(...ordinals),
29
+ maxOrdinal: Math.max(...ordinals),
30
+ count: levels.size,
31
+ }
32
+ : null,
33
+ grossAreaM2: members.reduce((sum, member) => sum + member.areaM2, 0),
34
+ members,
35
+ };
36
+ }
@@ -1,5 +1,5 @@
1
- import type { WallNode } from '../schema/nodes/wall';
2
- import type { AnyNode, AnyNodeId } from '../schema/types';
1
+ import type { WallNode } from '../schema/nodes/wall.js';
2
+ import type { AnyNode, AnyNodeId } from '../schema/types.js';
3
3
  /**
4
4
  * Pure plan-space wall-distance math shared by the 2D opening snap
5
5
  * (`findClosestWallInPlan` in @pascal-app/nodes) and the editor's 2D
@@ -1,4 +1,4 @@
1
- import { isCurvedWall } from '../systems/wall/wall-curve';
1
+ import { isCurvedWall } from '../systems/wall/wall-curve.js';
2
2
  /**
3
3
  * Pure plan-space wall-distance math shared by the 2D opening snap
4
4
  * (`findClosestWallInPlan` in @pascal-app/nodes) and the editor's 2D
@@ -1,4 +1,4 @@
1
- import type { AnyNode, ZoneNode } from '../schema';
1
+ import type { AnyNode, ZoneNode } from '../schema/index.js';
2
2
  export type ZoneQuantityValue = {
3
3
  status: 'available';
4
4
  value: number;
@@ -1,10 +1,10 @@
1
- import { DEFAULT_LEVEL_HEIGHT, resolveCeilingHeight } from '../services/level-height';
2
- import { getWallPlaneTop } from '../services/storey';
3
- import { computeWallSlabSupport } from '../systems/slab/slab-support';
4
- import { sampleWallCenterline } from '../systems/wall/wall-curve';
5
- import { DEFAULT_WALL_THICKNESS } from '../systems/wall/wall-footprint';
6
- import { resolveWallEffectiveHeight } from '../systems/wall/wall-top';
7
- import { detectSpacesForLevel } from './space-detection';
1
+ import { DEFAULT_LEVEL_HEIGHT, resolveCeilingHeight } from '../services/level-height.js';
2
+ import { getWallPlaneTop } from '../services/storey.js';
3
+ import { computeWallSlabSupport } from '../systems/slab/slab-support.js';
4
+ import { sampleWallCenterline } from '../systems/wall/wall-curve.js';
5
+ import { DEFAULT_WALL_THICKNESS } from '../systems/wall/wall-footprint.js';
6
+ import { resolveWallEffectiveHeight } from '../systems/wall/wall-top.js';
7
+ import { detectSpacesForLevel } from './space-detection.js';
8
8
  const BOUNDARY_TOLERANCE = 0.08;
9
9
  const SURFACE_COVERAGE_THRESHOLD = 0.95;
10
10
  const SPACE_CONTAINMENT_THRESHOLD = 0.95;
@@ -1,4 +1,4 @@
1
- import { type MaterialPresetPayload } from './schema/material';
1
+ import { type MaterialPresetPayload } from './schema/material.js';
2
2
  export type MaterialSource = 'pascal' | 'community' | 'mine' | 'workspace';
3
3
  export type MaterialCatalogItem = {
4
4
  id: string;
@@ -1,4 +1,4 @@
1
- import { MaterialTarget as MaterialTargetSchema, } from './schema/material';
1
+ import { MaterialTarget as MaterialTargetSchema, } from './schema/material.js';
2
2
  const WALL_TARGETS = [
3
3
  MaterialTargetSchema.enum.wall,
4
4
  MaterialTargetSchema.enum.chimney,
@@ -0,0 +1,261 @@
1
+ import { type Expr } from './recipe.js';
2
+ export declare const shelfRecipe: {
3
+ version: 1;
4
+ name: string;
5
+ description: string;
6
+ parameters: {
7
+ id: string;
8
+ label: string;
9
+ default: number;
10
+ min: number;
11
+ max: number;
12
+ step: number;
13
+ unit: "count" | "m" | "rad";
14
+ part?: string | undefined;
15
+ axis?: "x" | "y" | "z" | undefined;
16
+ }[];
17
+ slots: {
18
+ id: string;
19
+ label: string;
20
+ color: string;
21
+ finish?: "wood" | "glass" | "metal" | undefined;
22
+ }[];
23
+ parts: {
24
+ id: string;
25
+ label: string;
26
+ count: Expr;
27
+ shapes: {
28
+ id: string;
29
+ primitive: "box" | "roundedBox" | "cylinder";
30
+ slot: string;
31
+ size: [Expr, Expr, Expr];
32
+ position: [Expr, Expr, Expr];
33
+ rotation?: [Expr, Expr, Expr] | undefined;
34
+ radius?: Expr | undefined;
35
+ support?: boolean | undefined;
36
+ }[];
37
+ }[];
38
+ constraints: {
39
+ left: Expr;
40
+ relation: "lte" | "gte";
41
+ right: Expr;
42
+ message: string;
43
+ }[];
44
+ classification?: {
45
+ category: string;
46
+ functionTags: string[];
47
+ tags: string[];
48
+ } | undefined;
49
+ mounting?: {
50
+ attachTo: "ceiling" | "wall-side";
51
+ reference: string;
52
+ } | undefined;
53
+ surfaces?: {
54
+ id: string;
55
+ label: string;
56
+ position: [Expr, Expr, Expr];
57
+ size: [Expr, Expr];
58
+ part?: string | undefined;
59
+ rotation?: [Expr, Expr, Expr] | undefined;
60
+ }[] | undefined;
61
+ };
62
+ export declare const bedRecipe: {
63
+ version: 1;
64
+ name: string;
65
+ description: string;
66
+ parameters: {
67
+ id: string;
68
+ label: string;
69
+ default: number;
70
+ min: number;
71
+ max: number;
72
+ step: number;
73
+ unit: "count" | "m" | "rad";
74
+ part?: string | undefined;
75
+ axis?: "x" | "y" | "z" | undefined;
76
+ }[];
77
+ slots: {
78
+ id: string;
79
+ label: string;
80
+ color: string;
81
+ finish?: "wood" | "glass" | "metal" | undefined;
82
+ }[];
83
+ parts: {
84
+ id: string;
85
+ label: string;
86
+ count: Expr;
87
+ shapes: {
88
+ id: string;
89
+ primitive: "box" | "roundedBox" | "cylinder";
90
+ slot: string;
91
+ size: [Expr, Expr, Expr];
92
+ position: [Expr, Expr, Expr];
93
+ rotation?: [Expr, Expr, Expr] | undefined;
94
+ radius?: Expr | undefined;
95
+ support?: boolean | undefined;
96
+ }[];
97
+ }[];
98
+ constraints: {
99
+ left: Expr;
100
+ relation: "lte" | "gte";
101
+ right: Expr;
102
+ message: string;
103
+ }[];
104
+ classification?: {
105
+ category: string;
106
+ functionTags: string[];
107
+ tags: string[];
108
+ } | undefined;
109
+ mounting?: {
110
+ attachTo: "ceiling" | "wall-side";
111
+ reference: string;
112
+ } | undefined;
113
+ surfaces?: {
114
+ id: string;
115
+ label: string;
116
+ position: [Expr, Expr, Expr];
117
+ size: [Expr, Expr];
118
+ part?: string | undefined;
119
+ rotation?: [Expr, Expr, Expr] | undefined;
120
+ }[] | undefined;
121
+ };
122
+ export declare const radiatorRecipe: {
123
+ version: 1;
124
+ name: string;
125
+ description: string;
126
+ parameters: {
127
+ id: string;
128
+ label: string;
129
+ default: number;
130
+ min: number;
131
+ max: number;
132
+ step: number;
133
+ unit: "count" | "m" | "rad";
134
+ part?: string | undefined;
135
+ axis?: "x" | "y" | "z" | undefined;
136
+ }[];
137
+ slots: {
138
+ id: string;
139
+ label: string;
140
+ color: string;
141
+ finish?: "wood" | "glass" | "metal" | undefined;
142
+ }[];
143
+ parts: {
144
+ id: string;
145
+ label: string;
146
+ count: Expr;
147
+ shapes: {
148
+ id: string;
149
+ primitive: "box" | "roundedBox" | "cylinder";
150
+ slot: string;
151
+ size: [Expr, Expr, Expr];
152
+ position: [Expr, Expr, Expr];
153
+ rotation?: [Expr, Expr, Expr] | undefined;
154
+ radius?: Expr | undefined;
155
+ support?: boolean | undefined;
156
+ }[];
157
+ }[];
158
+ constraints: {
159
+ left: Expr;
160
+ relation: "lte" | "gte";
161
+ right: Expr;
162
+ message: string;
163
+ }[];
164
+ classification?: {
165
+ category: string;
166
+ functionTags: string[];
167
+ tags: string[];
168
+ } | undefined;
169
+ mounting?: {
170
+ attachTo: "ceiling" | "wall-side";
171
+ reference: string;
172
+ } | undefined;
173
+ surfaces?: {
174
+ id: string;
175
+ label: string;
176
+ position: [Expr, Expr, Expr];
177
+ size: [Expr, Expr];
178
+ part?: string | undefined;
179
+ rotation?: [Expr, Expr, Expr] | undefined;
180
+ }[] | undefined;
181
+ };
182
+ export declare const counterRecipe: {
183
+ version: 1;
184
+ name: string;
185
+ description: string;
186
+ parameters: {
187
+ id: string;
188
+ label: string;
189
+ default: number;
190
+ min: number;
191
+ max: number;
192
+ step: number;
193
+ unit: "count" | "m" | "rad";
194
+ part?: string | undefined;
195
+ axis?: "x" | "y" | "z" | undefined;
196
+ }[];
197
+ slots: {
198
+ id: string;
199
+ label: string;
200
+ color: string;
201
+ finish?: "wood" | "glass" | "metal" | undefined;
202
+ }[];
203
+ parts: {
204
+ id: string;
205
+ label: string;
206
+ count: Expr;
207
+ shapes: {
208
+ id: string;
209
+ primitive: "box" | "roundedBox" | "cylinder";
210
+ slot: string;
211
+ size: [Expr, Expr, Expr];
212
+ position: [Expr, Expr, Expr];
213
+ rotation?: [Expr, Expr, Expr] | undefined;
214
+ radius?: Expr | undefined;
215
+ support?: boolean | undefined;
216
+ }[];
217
+ }[];
218
+ constraints: {
219
+ left: Expr;
220
+ relation: "lte" | "gte";
221
+ right: Expr;
222
+ message: string;
223
+ }[];
224
+ classification?: {
225
+ category: string;
226
+ functionTags: string[];
227
+ tags: string[];
228
+ } | undefined;
229
+ mounting?: {
230
+ attachTo: "ceiling" | "wall-side";
231
+ reference: string;
232
+ } | undefined;
233
+ surfaces?: {
234
+ id: string;
235
+ label: string;
236
+ position: [Expr, Expr, Expr];
237
+ size: [Expr, Expr];
238
+ part?: string | undefined;
239
+ rotation?: [Expr, Expr, Expr] | undefined;
240
+ }[] | undefined;
241
+ };
242
+ export declare const experimentBriefs: readonly [{
243
+ readonly id: "shelf_open";
244
+ readonly prompt: "Create a freestanding open oak bookcase, 1.2 m wide and 1.8 m tall, with adjustable width, height, depth and shelf count. Expose frame and shelf material slots and shelf support surfaces.";
245
+ }, {
246
+ readonly id: "shelf_asymmetric";
247
+ readonly prompt: "Create an asymmetric low bookcase with a wide open compartment on the left and a narrow stack of shelves on the right. Expose overall width, height, depth and right shelf count. Use contrasting frame and back colors.";
248
+ }, {
249
+ readonly id: "bed_timber";
250
+ readonly prompt: "Create a timber platform bed with a mattress, a headboard and two pillows. Expose bed width, length, headboard height, pillow count and pillow size. Pillows must remain above the mattress when resized. Separate frame, bedding and pillow material slots.";
251
+ }, {
252
+ readonly id: "bed_upholstered";
253
+ readonly prompt: "Create an upholstered bed with a tall rounded headboard, a low base, mattress and three pillows. Expose bed width, length, headboard height and pillow count. Include independently adjustable pillow depth and separate material slots.";
254
+ }, {
255
+ readonly id: "bench";
256
+ readonly prompt: "Create a park bench with a slatted timber seat, backrest and two metal supports. Expose width, seat height, depth and slat count. Changing width must preserve support thickness. Separate timber and metal slots.";
257
+ }, {
258
+ readonly id: "divider";
259
+ readonly prompt: "Create a freestanding room divider with repeated vertical timber slats on a base. Expose width, height, depth and slat count. Keep every slat above the ground and evenly distributed when resized. Separate slat and base slots.";
260
+ }];
261
+ //# sourceMappingURL=fixtures.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../src/procedural-items/fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAA4B,MAAM,UAAU,CAAA;AAwB9D,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkEtB,CAAA;AACF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyFpB,CAAA;AACF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkFzB,CAAA;AACF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqExB,CAAA;AACF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;EA+BnB,CAAA"}