@pascal-app/core 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (320) 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 +221 -76
  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 +74 -72
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +71 -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/plan-footprint.d.ts +41 -0
  35. package/dist/lib/plan-footprint.d.ts.map +1 -0
  36. package/dist/lib/plan-footprint.js +58 -0
  37. package/dist/lib/room-topology-index.d.ts +1 -1
  38. package/dist/lib/room-topology-index.js +1 -1
  39. package/dist/lib/selection-proxy.d.ts +1 -1
  40. package/dist/lib/slab-polygon.d.ts +2 -2
  41. package/dist/lib/slab-polygon.js +2 -2
  42. package/dist/lib/space-detection.d.ts +1 -1
  43. package/dist/lib/space-detection.d.ts.map +1 -1
  44. package/dist/lib/space-detection.js +16 -11
  45. package/dist/lib/terrain-brush.d.ts +1 -1
  46. package/dist/lib/terrain-brush.js +1 -1
  47. package/dist/lib/terrain-codec.d.ts +2 -2
  48. package/dist/lib/terrain-codec.js +1 -1
  49. package/dist/lib/terrain-raycast.d.ts +1 -1
  50. package/dist/lib/terrain-raycast.js +1 -1
  51. package/dist/lib/terrain-source.d.ts +3 -3
  52. package/dist/lib/terrain-source.js +3 -3
  53. package/dist/lib/terrain-support.d.ts +1 -1
  54. package/dist/lib/terrain-support.js +3 -3
  55. package/dist/lib/unit-containment.d.ts +19 -0
  56. package/dist/lib/unit-containment.d.ts.map +1 -0
  57. package/dist/lib/unit-containment.js +158 -0
  58. package/dist/lib/unit-report.d.ts +19 -0
  59. package/dist/lib/unit-report.d.ts.map +1 -0
  60. package/dist/lib/unit-report.js +36 -0
  61. package/dist/lib/wall-distance.d.ts +2 -2
  62. package/dist/lib/wall-distance.js +1 -1
  63. package/dist/lib/zone-quantities.d.ts +1 -1
  64. package/dist/lib/zone-quantities.js +7 -7
  65. package/dist/material-library.d.ts +1 -1
  66. package/dist/material-library.js +1 -1
  67. package/dist/procedural-items/fixtures.d.ts +261 -0
  68. package/dist/procedural-items/fixtures.d.ts.map +1 -0
  69. package/dist/procedural-items/fixtures.js +349 -0
  70. package/dist/procedural-items/index.d.ts +10 -0
  71. package/dist/procedural-items/index.d.ts.map +1 -0
  72. package/dist/procedural-items/index.js +9 -0
  73. package/dist/procedural-items/integration.d.ts +92 -0
  74. package/dist/procedural-items/integration.d.ts.map +1 -0
  75. package/dist/procedural-items/integration.js +19 -0
  76. package/dist/procedural-items/library-colors.d.ts +56 -0
  77. package/dist/procedural-items/library-colors.d.ts.map +1 -0
  78. package/dist/procedural-items/library-colors.js +84 -0
  79. package/dist/procedural-items/materials.d.ts +5 -0
  80. package/dist/procedural-items/materials.d.ts.map +1 -0
  81. package/dist/procedural-items/materials.js +47 -0
  82. package/dist/procedural-items/node.d.ts +280 -0
  83. package/dist/procedural-items/node.d.ts.map +1 -0
  84. package/dist/procedural-items/node.js +71 -0
  85. package/dist/procedural-items/placement.d.ts +7 -0
  86. package/dist/procedural-items/placement.d.ts.map +1 -0
  87. package/dist/procedural-items/placement.js +48 -0
  88. package/dist/procedural-items/query.d.ts +50 -0
  89. package/dist/procedural-items/query.d.ts.map +1 -0
  90. package/dist/procedural-items/query.js +298 -0
  91. package/dist/procedural-items/recipe.d.ts +144 -0
  92. package/dist/procedural-items/recipe.d.ts.map +1 -0
  93. package/dist/procedural-items/recipe.js +372 -0
  94. package/dist/procedural-items/spatial.d.ts +19 -0
  95. package/dist/procedural-items/spatial.d.ts.map +1 -0
  96. package/dist/procedural-items/spatial.js +39 -0
  97. package/dist/registry/__bench__/relations-resolver.bench.js +2 -2
  98. package/dist/registry/handles.d.ts +12 -4
  99. package/dist/registry/handles.d.ts.map +1 -1
  100. package/dist/registry/index.d.ts +6 -6
  101. package/dist/registry/index.js +4 -4
  102. package/dist/registry/registry.d.ts +1 -1
  103. package/dist/registry/relations-resolver.d.ts +2 -2
  104. package/dist/registry/relations-resolver.js +1 -1
  105. package/dist/registry/scene-api.d.ts +2 -2
  106. package/dist/registry/scene-api.js +2 -2
  107. package/dist/registry/subtree.d.ts +1 -1
  108. package/dist/registry/subtree.js +2 -2
  109. package/dist/registry/types.d.ts +21 -9
  110. package/dist/registry/types.d.ts.map +1 -1
  111. package/dist/registry/use-registry-version.js +1 -1
  112. package/dist/registry/validate-relations.d.ts +4 -0
  113. package/dist/registry/validate-relations.d.ts.map +1 -0
  114. package/dist/registry/validate-relations.js +22 -0
  115. package/dist/schema/__bench__/node-parsers.bench.js +3 -3
  116. package/dist/schema/__fixtures__/node-fixtures.d.ts +1 -1
  117. package/dist/schema/__fixtures__/node-fixtures.d.ts.map +1 -1
  118. package/dist/schema/__fixtures__/node-fixtures.js +4 -2
  119. package/dist/schema/base.js +1 -1
  120. package/dist/schema/collections.d.ts +1 -1
  121. package/dist/schema/collections.js +1 -1
  122. package/dist/schema/compiled-node-parsers.d.ts +1 -1
  123. package/dist/schema/compiled-node-parsers.js +1 -1
  124. package/dist/schema/index.d.ts +73 -70
  125. package/dist/schema/index.d.ts.map +1 -1
  126. package/dist/schema/index.js +64 -61
  127. package/dist/schema/material.d.ts +1 -1
  128. package/dist/schema/material.js +1 -1
  129. package/dist/schema/nodes/automatic-downspout.d.ts +4 -4
  130. package/dist/schema/nodes/automatic-downspout.js +5 -5
  131. package/dist/schema/nodes/block.d.ts +1 -1
  132. package/dist/schema/nodes/block.d.ts.map +1 -1
  133. package/dist/schema/nodes/block.js +3 -4
  134. package/dist/schema/nodes/box-vent.js +2 -2
  135. package/dist/schema/nodes/building.d.ts +1 -1
  136. package/dist/schema/nodes/building.d.ts.map +1 -1
  137. package/dist/schema/nodes/building.js +8 -5
  138. package/dist/schema/nodes/cabinet.d.ts +2 -2
  139. package/dist/schema/nodes/cabinet.js +4 -4
  140. package/dist/schema/nodes/ceiling.d.ts +1 -1
  141. package/dist/schema/nodes/ceiling.js +5 -5
  142. package/dist/schema/nodes/chimney.js +2 -2
  143. package/dist/schema/nodes/column.d.ts +1 -0
  144. package/dist/schema/nodes/column.d.ts.map +1 -1
  145. package/dist/schema/nodes/column.js +3 -2
  146. package/dist/schema/nodes/construction-dimension.d.ts +3 -3
  147. package/dist/schema/nodes/construction-dimension.js +2 -2
  148. package/dist/schema/nodes/cupola.d.ts +1 -1
  149. package/dist/schema/nodes/cupola.js +2 -2
  150. package/dist/schema/nodes/door.js +2 -2
  151. package/dist/schema/nodes/dormer.d.ts +3 -3
  152. package/dist/schema/nodes/dormer.js +4 -4
  153. package/dist/schema/nodes/downspout.js +2 -2
  154. package/dist/schema/nodes/duct-fitting.js +1 -1
  155. package/dist/schema/nodes/duct-segment.js +2 -2
  156. package/dist/schema/nodes/duct-terminal.js +1 -1
  157. package/dist/schema/nodes/elevator.js +2 -2
  158. package/dist/schema/nodes/eyebrow-vent.js +2 -2
  159. package/dist/schema/nodes/fence.js +2 -2
  160. package/dist/schema/nodes/guide.js +2 -2
  161. package/dist/schema/nodes/gutter.d.ts +1 -1
  162. package/dist/schema/nodes/gutter.js +4 -4
  163. package/dist/schema/nodes/hvac-equipment.js +1 -1
  164. package/dist/schema/nodes/imported-mesh.d.ts +40 -0
  165. package/dist/schema/nodes/imported-mesh.d.ts.map +1 -0
  166. package/dist/schema/nodes/imported-mesh.js +27 -0
  167. package/dist/schema/nodes/item.d.ts +3 -3
  168. package/dist/schema/nodes/item.js +3 -3
  169. package/dist/schema/nodes/lean-to-extension.js +4 -4
  170. package/dist/schema/nodes/level.d.ts +1 -1
  171. package/dist/schema/nodes/level.d.ts.map +1 -1
  172. package/dist/schema/nodes/level.js +1 -1
  173. package/dist/schema/nodes/lineset.js +1 -1
  174. package/dist/schema/nodes/liquid-line.js +1 -1
  175. package/dist/schema/nodes/measurement.js +2 -2
  176. package/dist/schema/nodes/pipe-fitting.d.ts +1 -1
  177. package/dist/schema/nodes/pipe-fitting.js +1 -1
  178. package/dist/schema/nodes/pipe-segment.d.ts +1 -1
  179. package/dist/schema/nodes/pipe-segment.js +2 -2
  180. package/dist/schema/nodes/pipe-trap.d.ts +1 -1
  181. package/dist/schema/nodes/pipe-trap.js +1 -1
  182. package/dist/schema/nodes/ridge-vent.d.ts +1 -1
  183. package/dist/schema/nodes/ridge-vent.js +3 -3
  184. package/dist/schema/nodes/roof-segment-shape.d.ts +1 -1
  185. package/dist/schema/nodes/roof-segment-shape.js +1 -1
  186. package/dist/schema/nodes/roof-segment-walls.d.ts +1 -1
  187. package/dist/schema/nodes/roof-segment-walls.js +1 -1
  188. package/dist/schema/nodes/roof-segment.d.ts +2 -2
  189. package/dist/schema/nodes/roof-segment.js +2 -2
  190. package/dist/schema/nodes/roof.d.ts +1 -1
  191. package/dist/schema/nodes/roof.js +3 -3
  192. package/dist/schema/nodes/scan.js +3 -3
  193. package/dist/schema/nodes/shelf.d.ts +1 -1
  194. package/dist/schema/nodes/shelf.d.ts.map +1 -1
  195. package/dist/schema/nodes/shelf.js +3 -4
  196. package/dist/schema/nodes/site.js +2 -2
  197. package/dist/schema/nodes/skylight.d.ts +4 -4
  198. package/dist/schema/nodes/skylight.js +2 -2
  199. package/dist/schema/nodes/slab.js +3 -3
  200. package/dist/schema/nodes/solar-panel.js +3 -3
  201. package/dist/schema/nodes/spawn.js +1 -1
  202. package/dist/schema/nodes/stair-segment.js +2 -2
  203. package/dist/schema/nodes/stair.d.ts +1 -1
  204. package/dist/schema/nodes/stair.js +3 -3
  205. package/dist/schema/nodes/structural-grid.js +1 -1
  206. package/dist/schema/nodes/turbine-vent.d.ts +1 -1
  207. package/dist/schema/nodes/turbine-vent.js +2 -2
  208. package/dist/schema/nodes/unit.d.ts +33 -0
  209. package/dist/schema/nodes/unit.d.ts.map +1 -0
  210. package/dist/schema/nodes/unit.js +13 -0
  211. package/dist/schema/nodes/wall.d.ts +2 -2
  212. package/dist/schema/nodes/wall.d.ts.map +1 -1
  213. package/dist/schema/nodes/wall.js +7 -6
  214. package/dist/schema/nodes/window.js +2 -2
  215. package/dist/schema/nodes/zone.js +1 -1
  216. package/dist/schema/scene-material.js +2 -2
  217. package/dist/schema/types.d.ts +341 -19
  218. package/dist/schema/types.d.ts.map +1 -1
  219. package/dist/schema/types.js +56 -49
  220. package/dist/services/alignment-anchors.d.ts +6 -11
  221. package/dist/services/alignment-anchors.d.ts.map +1 -1
  222. package/dist/services/alignment-anchors.js +7 -34
  223. package/dist/services/drag-session.d.ts +4 -4
  224. package/dist/services/drag-session.js +1 -1
  225. package/dist/services/hosting.d.ts +2 -8
  226. package/dist/services/hosting.d.ts.map +1 -1
  227. package/dist/services/hosting.js +2 -12
  228. package/dist/services/index.d.ts +16 -13
  229. package/dist/services/index.d.ts.map +1 -1
  230. package/dist/services/index.js +16 -13
  231. package/dist/services/level-height.d.ts +2 -2
  232. package/dist/services/level-height.js +3 -3
  233. package/dist/services/movement.d.ts +3 -3
  234. package/dist/services/movement.js +2 -2
  235. package/dist/services/port-connectivity.d.ts +1 -1
  236. package/dist/services/port-connectivity.js +1 -1
  237. package/dist/services/riser-diagram.d.ts +1 -1
  238. package/dist/services/shelf-board.d.ts +5 -0
  239. package/dist/services/shelf-board.d.ts.map +1 -0
  240. package/dist/services/shelf-board.js +15 -0
  241. package/dist/services/storey.d.ts +2 -2
  242. package/dist/services/storey.js +2 -2
  243. package/dist/services/surface-hosting-procedural-parity.fixtures.d.ts +13 -0
  244. package/dist/services/surface-hosting-procedural-parity.fixtures.d.ts.map +1 -0
  245. package/dist/services/surface-hosting-procedural-parity.fixtures.js +4691 -0
  246. package/dist/services/surface-hosting-shelf-parity.fixtures.d.ts +1060 -0
  247. package/dist/services/surface-hosting-shelf-parity.fixtures.d.ts.map +1 -0
  248. package/dist/services/surface-hosting-shelf-parity.fixtures.js +3127 -0
  249. package/dist/services/surface-hosting.d.ts +88 -0
  250. package/dist/services/surface-hosting.d.ts.map +1 -0
  251. package/dist/services/surface-hosting.js +268 -0
  252. package/dist/services/surface-region.d.ts +8 -0
  253. package/dist/services/surface-region.d.ts.map +1 -0
  254. package/dist/services/surface-region.js +44 -0
  255. package/dist/services/system-graph.d.ts +2 -2
  256. package/dist/services/system-graph.js +2 -2
  257. package/dist/services/validate-dwv.d.ts +1 -1
  258. package/dist/services/validate-dwv.js +1 -1
  259. package/dist/store/actions/node-actions.d.ts +2 -2
  260. package/dist/store/actions/node-actions.d.ts.map +1 -1
  261. package/dist/store/actions/node-actions.js +48 -9
  262. package/dist/store/history-control.d.ts +3 -3
  263. package/dist/store/history-invalidation.d.ts +1 -1
  264. package/dist/store/history-invalidation.js +1 -1
  265. package/dist/store/use-interactive.d.ts +2 -2
  266. package/dist/store/use-live-terrain.d.ts +1 -1
  267. package/dist/store/use-scene.d.ts +4 -4
  268. package/dist/store/use-scene.d.ts.map +1 -1
  269. package/dist/store/use-scene.js +37 -31
  270. package/dist/systems/elevator/elevator-dispatch.d.ts +2 -2
  271. package/dist/systems/elevator/elevator-dispatch.js +1 -1
  272. package/dist/systems/elevator/elevator-geometry.d.ts +1 -1
  273. package/dist/systems/elevator/elevator-opening-sync.d.ts +1 -1
  274. package/dist/systems/elevator/elevator-opening-sync.js +2 -2
  275. package/dist/systems/elevator/elevator-opening-system.js +3 -3
  276. package/dist/systems/elevator/elevator-runtime.d.ts +3 -3
  277. package/dist/systems/elevator/elevator-runtime.js +3 -3
  278. package/dist/systems/elevator/elevator-service.d.ts +1 -1
  279. package/dist/systems/elevator/elevator-service.js +1 -1
  280. package/dist/systems/fence/fence-centerline.d.ts +2 -2
  281. package/dist/systems/fence/fence-centerline.js +2 -2
  282. package/dist/systems/fence/fence-spline.d.ts +2 -2
  283. package/dist/systems/roof/roof-elevation-system.js +3 -3
  284. package/dist/systems/roof/roof-elevation.d.ts +2 -2
  285. package/dist/systems/roof/roof-elevation.js +6 -6
  286. package/dist/systems/roof/roof-footprint.d.ts +1 -1
  287. package/dist/systems/roof/roof-footprint.js +3 -3
  288. package/dist/systems/slab/slab-placement.d.ts +1 -1
  289. package/dist/systems/slab/slab-support.d.ts +1 -1
  290. package/dist/systems/slab/slab-support.js +4 -4
  291. package/dist/systems/stair/stair-flight.d.ts +2 -2
  292. package/dist/systems/stair/stair-flight.js +2 -2
  293. package/dist/systems/stair/stair-footprint.d.ts +1 -1
  294. package/dist/systems/stair/stair-opening-preview.d.ts +206 -79
  295. package/dist/systems/stair/stair-opening-preview.d.ts.map +1 -1
  296. package/dist/systems/stair/stair-opening-preview.js +2 -2
  297. package/dist/systems/stair/stair-opening-sync.d.ts +1 -1
  298. package/dist/systems/stair/stair-opening-sync.js +6 -6
  299. package/dist/systems/stair/stair-opening-system.js +8 -8
  300. package/dist/systems/stair/stair-rise.d.ts +1 -1
  301. package/dist/systems/stair/stair-rise.js +3 -3
  302. package/dist/systems/wall/wall-curve.d.ts +2 -2
  303. package/dist/systems/wall/wall-footprint.d.ts +3 -3
  304. package/dist/systems/wall/wall-footprint.js +3 -3
  305. package/dist/systems/wall/wall-mitering.d.ts +1 -1
  306. package/dist/systems/wall/wall-mitering.js +1 -1
  307. package/dist/systems/wall/wall-move.d.ts +1 -1
  308. package/dist/systems/wall/wall-top.d.ts +1 -1
  309. package/dist/systems/wall/wall-topology.d.ts +2 -2
  310. package/dist/systems/wall/wall-topology.js +4 -4
  311. package/dist/utils/clone-scene-graph.d.ts +3 -3
  312. package/dist/utils/clone-scene-graph.d.ts.map +1 -1
  313. package/dist/utils/clone-scene-graph.js +9 -3
  314. package/dist/utils/scene-migrations.d.ts +3 -3
  315. package/dist/utils/scene-migrations.js +3 -3
  316. package/dist/utils/vertical-scene-migration.js +5 -5
  317. package/dist/validation/validate-build-json.d.ts +5 -2
  318. package/dist/validation/validate-build-json.d.ts.map +1 -1
  319. package/dist/validation/validate-build-json.js +45 -4
  320. package/package.json +14 -3
@@ -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"}