@pascal-app/core 1.0.0-beta.4 → 1.0.0

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 (263) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +23 -0
  3. package/dist/capture/index.d.ts +3 -0
  4. package/dist/capture/index.d.ts.map +1 -0
  5. package/dist/capture/index.js +2 -0
  6. package/dist/capture/schema.d.ts +417 -0
  7. package/dist/capture/schema.d.ts.map +1 -0
  8. package/dist/capture/schema.js +348 -0
  9. package/dist/capture/source.d.ts +60 -0
  10. package/dist/capture/source.d.ts.map +1 -0
  11. package/dist/capture/source.js +254 -0
  12. package/dist/events/bus.d.ts +55 -7
  13. package/dist/events/bus.d.ts.map +1 -1
  14. package/dist/events/hidden-wall-pointer-hold.d.ts +28 -0
  15. package/dist/events/hidden-wall-pointer-hold.d.ts.map +1 -0
  16. package/dist/events/hidden-wall-pointer-hold.js +37 -0
  17. package/dist/hooks/spatial-grid/spatial-grid-manager.d.ts +12 -0
  18. package/dist/hooks/spatial-grid/spatial-grid-manager.d.ts.map +1 -1
  19. package/dist/hooks/spatial-grid/spatial-grid-manager.js +39 -1
  20. package/dist/hooks/spatial-grid/spatial-grid-sync.d.ts +2785 -1
  21. package/dist/hooks/spatial-grid/spatial-grid-sync.d.ts.map +1 -1
  22. package/dist/hooks/spatial-grid/spatial-grid-sync.js +132 -19
  23. package/dist/hooks/spatial-grid/support-host-patch.d.ts +45 -1
  24. package/dist/hooks/spatial-grid/support-host-patch.d.ts.map +1 -1
  25. package/dist/hooks/spatial-grid/support-host-patch.js +171 -6
  26. package/dist/index.d.ts +15 -6
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +17 -5
  29. package/dist/lib/asset-storage.d.ts.map +1 -1
  30. package/dist/lib/asset-storage.js +4 -1
  31. package/dist/lib/polygon-union.d.ts +4 -0
  32. package/dist/lib/polygon-union.d.ts.map +1 -0
  33. package/dist/lib/polygon-union.js +306 -0
  34. package/dist/lib/roof-overlap.d.ts +32 -0
  35. package/dist/lib/roof-overlap.d.ts.map +1 -0
  36. package/dist/lib/roof-overlap.js +72 -0
  37. package/dist/lib/room-topology-index.d.ts +50 -0
  38. package/dist/lib/room-topology-index.d.ts.map +1 -0
  39. package/dist/lib/room-topology-index.js +237 -0
  40. package/dist/lib/slab-polygon.d.ts +35 -2
  41. package/dist/lib/slab-polygon.d.ts.map +1 -1
  42. package/dist/lib/slab-polygon.js +133 -27
  43. package/dist/lib/space-detection.d.ts +40 -3
  44. package/dist/lib/space-detection.d.ts.map +1 -1
  45. package/dist/lib/space-detection.js +890 -246
  46. package/dist/registry/handles.d.ts +24 -3
  47. package/dist/registry/handles.d.ts.map +1 -1
  48. package/dist/registry/index.d.ts +3 -3
  49. package/dist/registry/index.d.ts.map +1 -1
  50. package/dist/registry/index.js +1 -1
  51. package/dist/registry/registry.d.ts +29 -6
  52. package/dist/registry/registry.d.ts.map +1 -1
  53. package/dist/registry/registry.js +111 -4
  54. package/dist/registry/scene-api.d.ts +16 -0
  55. package/dist/registry/scene-api.d.ts.map +1 -1
  56. package/dist/registry/scene-api.js +49 -1
  57. package/dist/registry/types.d.ts +261 -13
  58. package/dist/registry/types.d.ts.map +1 -1
  59. package/dist/registry/use-registry-version.d.ts +11 -0
  60. package/dist/registry/use-registry-version.d.ts.map +1 -0
  61. package/dist/registry/use-registry-version.js +15 -0
  62. package/dist/schema/__bench__/node-parsers.bench.d.ts +24 -0
  63. package/dist/schema/__bench__/node-parsers.bench.d.ts.map +1 -0
  64. package/dist/schema/__bench__/node-parsers.bench.js +314 -0
  65. package/dist/schema/__fixtures__/node-fixtures.d.ts +28 -0
  66. package/dist/schema/__fixtures__/node-fixtures.d.ts.map +1 -0
  67. package/dist/schema/__fixtures__/node-fixtures.js +125 -0
  68. package/dist/schema/base.d.ts +1 -1
  69. package/dist/schema/base.d.ts.map +1 -1
  70. package/dist/schema/base.js +8 -1
  71. package/dist/schema/compiled-node-parsers.d.ts +40 -0
  72. package/dist/schema/compiled-node-parsers.d.ts.map +1 -0
  73. package/dist/schema/compiled-node-parsers.js +95 -0
  74. package/dist/schema/index.d.ts +20 -15
  75. package/dist/schema/index.d.ts.map +1 -1
  76. package/dist/schema/index.js +19 -12
  77. package/dist/schema/material.d.ts +2 -1
  78. package/dist/schema/material.d.ts.map +1 -1
  79. package/dist/schema/material.js +1 -0
  80. package/dist/schema/nodes/automatic-downspout.d.ts +17 -0
  81. package/dist/schema/nodes/automatic-downspout.d.ts.map +1 -0
  82. package/dist/schema/nodes/automatic-downspout.js +237 -0
  83. package/dist/schema/nodes/block.d.ts +107 -0
  84. package/dist/schema/nodes/block.d.ts.map +1 -0
  85. package/dist/schema/nodes/block.js +207 -0
  86. package/dist/schema/nodes/box-vent.d.ts +8 -2
  87. package/dist/schema/nodes/box-vent.d.ts.map +1 -1
  88. package/dist/schema/nodes/box-vent.js +2 -0
  89. package/dist/schema/nodes/building.d.ts +1 -1
  90. package/dist/schema/nodes/cabinet.d.ts +25 -3
  91. package/dist/schema/nodes/cabinet.d.ts.map +1 -1
  92. package/dist/schema/nodes/cabinet.js +26 -5
  93. package/dist/schema/nodes/ceiling.d.ts +1 -1
  94. package/dist/schema/nodes/chimney.d.ts +2 -2
  95. package/dist/schema/nodes/column.d.ts +6 -6
  96. package/dist/schema/nodes/construction-dimension.d.ts +4 -4
  97. package/dist/schema/nodes/cupola.d.ts +9 -1
  98. package/dist/schema/nodes/cupola.d.ts.map +1 -1
  99. package/dist/schema/nodes/cupola.js +2 -0
  100. package/dist/schema/nodes/door.d.ts +1 -1
  101. package/dist/schema/nodes/dormer.d.ts +44 -1
  102. package/dist/schema/nodes/dormer.d.ts.map +1 -1
  103. package/dist/schema/nodes/dormer.js +131 -7
  104. package/dist/schema/nodes/downspout.d.ts +11 -1
  105. package/dist/schema/nodes/downspout.d.ts.map +1 -1
  106. package/dist/schema/nodes/downspout.js +24 -0
  107. package/dist/schema/nodes/duct-fitting.d.ts +18 -1
  108. package/dist/schema/nodes/duct-fitting.d.ts.map +1 -1
  109. package/dist/schema/nodes/duct-fitting.js +25 -4
  110. package/dist/schema/nodes/duct-segment.d.ts +23 -1
  111. package/dist/schema/nodes/duct-segment.d.ts.map +1 -1
  112. package/dist/schema/nodes/duct-segment.js +20 -0
  113. package/dist/schema/nodes/duct-terminal.d.ts +1 -1
  114. package/dist/schema/nodes/elevator.d.ts +1 -1
  115. package/dist/schema/nodes/eyebrow-vent.d.ts +8 -2
  116. package/dist/schema/nodes/eyebrow-vent.d.ts.map +1 -1
  117. package/dist/schema/nodes/eyebrow-vent.js +2 -0
  118. package/dist/schema/nodes/fence.d.ts +1 -1
  119. package/dist/schema/nodes/guide.d.ts +1 -1
  120. package/dist/schema/nodes/gutter.d.ts +36 -2
  121. package/dist/schema/nodes/gutter.d.ts.map +1 -1
  122. package/dist/schema/nodes/gutter.js +308 -1
  123. package/dist/schema/nodes/hanger-overrides.d.ts +7 -0
  124. package/dist/schema/nodes/hanger-overrides.d.ts.map +1 -0
  125. package/dist/schema/nodes/hanger-overrides.js +6 -0
  126. package/dist/schema/nodes/hvac-equipment.d.ts +1 -1
  127. package/dist/schema/nodes/item.d.ts +4 -3
  128. package/dist/schema/nodes/item.d.ts.map +1 -1
  129. package/dist/schema/nodes/item.js +5 -0
  130. package/dist/schema/nodes/lean-to-extension.d.ts +212 -0
  131. package/dist/schema/nodes/lean-to-extension.d.ts.map +1 -0
  132. package/dist/schema/nodes/lean-to-extension.js +114 -0
  133. package/dist/schema/nodes/level.d.ts +5 -2
  134. package/dist/schema/nodes/level.d.ts.map +1 -1
  135. package/dist/schema/nodes/level.js +9 -0
  136. package/dist/schema/nodes/lineset.d.ts +1 -1
  137. package/dist/schema/nodes/liquid-line.d.ts +1 -1
  138. package/dist/schema/nodes/measurement.d.ts +1 -1
  139. package/dist/schema/nodes/pipe-fitting.d.ts +9 -1
  140. package/dist/schema/nodes/pipe-fitting.d.ts.map +1 -1
  141. package/dist/schema/nodes/pipe-fitting.js +6 -2
  142. package/dist/schema/nodes/pipe-segment.d.ts +23 -1
  143. package/dist/schema/nodes/pipe-segment.d.ts.map +1 -1
  144. package/dist/schema/nodes/pipe-segment.js +20 -0
  145. package/dist/schema/nodes/pipe-trap.d.ts +1 -1
  146. package/dist/schema/nodes/ridge-vent.d.ts +1 -1
  147. package/dist/schema/nodes/ridge-vent.d.ts.map +1 -1
  148. package/dist/schema/nodes/ridge-vent.js +4 -1
  149. package/dist/schema/nodes/roof-segment-shape.d.ts +4 -0
  150. package/dist/schema/nodes/roof-segment-shape.d.ts.map +1 -1
  151. package/dist/schema/nodes/roof-segment-shape.js +64 -1
  152. package/dist/schema/nodes/roof-segment-walls.d.ts +3 -1
  153. package/dist/schema/nodes/roof-segment-walls.d.ts.map +1 -1
  154. package/dist/schema/nodes/roof-segment-walls.js +1 -1
  155. package/dist/schema/nodes/roof-segment.d.ts +41 -1
  156. package/dist/schema/nodes/roof-segment.d.ts.map +1 -1
  157. package/dist/schema/nodes/roof-segment.js +79 -2
  158. package/dist/schema/nodes/roof.d.ts +22 -1
  159. package/dist/schema/nodes/roof.d.ts.map +1 -1
  160. package/dist/schema/nodes/roof.js +14 -0
  161. package/dist/schema/nodes/scan.d.ts +19 -2
  162. package/dist/schema/nodes/scan.d.ts.map +1 -1
  163. package/dist/schema/nodes/scan.js +11 -1
  164. package/dist/schema/nodes/shelf.d.ts +2 -2
  165. package/dist/schema/nodes/site.d.ts +1 -1
  166. package/dist/schema/nodes/skylight.d.ts +1 -1
  167. package/dist/schema/nodes/slab.d.ts +1 -1
  168. package/dist/schema/nodes/solar-panel.d.ts +1 -1
  169. package/dist/schema/nodes/spawn.d.ts +1 -1
  170. package/dist/schema/nodes/stair-segment.d.ts +1 -1
  171. package/dist/schema/nodes/stair.d.ts +1 -1
  172. package/dist/schema/nodes/structural-grid.d.ts +1 -1
  173. package/dist/schema/nodes/turbine-vent.d.ts +7 -1
  174. package/dist/schema/nodes/turbine-vent.d.ts.map +1 -1
  175. package/dist/schema/nodes/turbine-vent.js +2 -0
  176. package/dist/schema/nodes/wall.d.ts +4 -4
  177. package/dist/schema/nodes/wall.d.ts.map +1 -1
  178. package/dist/schema/nodes/wall.js +7 -1
  179. package/dist/schema/nodes/window.d.ts +10 -3
  180. package/dist/schema/nodes/window.d.ts.map +1 -1
  181. package/dist/schema/nodes/window.js +4 -0
  182. package/dist/schema/nodes/zone.d.ts +2 -2
  183. package/dist/schema/nodes/zone.js +1 -1
  184. package/dist/schema/types.d.ts +485 -109
  185. package/dist/schema/types.d.ts.map +1 -1
  186. package/dist/schema/types.js +27 -1
  187. package/dist/services/hosting.d.ts +2 -2
  188. package/dist/services/hosting.d.ts.map +1 -1
  189. package/dist/services/hosting.js +4 -4
  190. package/dist/services/index.d.ts +2 -2
  191. package/dist/services/index.d.ts.map +1 -1
  192. package/dist/services/index.js +2 -2
  193. package/dist/services/storey.d.ts +3 -10
  194. package/dist/services/storey.d.ts.map +1 -1
  195. package/dist/services/storey.js +45 -15
  196. package/dist/services/system-graph.d.ts +11 -0
  197. package/dist/services/system-graph.d.ts.map +1 -1
  198. package/dist/services/system-graph.js +35 -5
  199. package/dist/store/actions/node-actions.d.ts +15 -4
  200. package/dist/store/actions/node-actions.d.ts.map +1 -1
  201. package/dist/store/actions/node-actions.js +458 -19
  202. package/dist/store/history-control.d.ts +5 -0
  203. package/dist/store/history-control.d.ts.map +1 -1
  204. package/dist/store/history-control.js +68 -6
  205. package/dist/store/history-invalidation.d.ts +3 -0
  206. package/dist/store/history-invalidation.d.ts.map +1 -0
  207. package/dist/store/history-invalidation.js +72 -0
  208. package/dist/store/scene-hydration.d.ts +5 -0
  209. package/dist/store/scene-hydration.d.ts.map +1 -0
  210. package/dist/store/scene-hydration.js +57 -0
  211. package/dist/store/use-scene.d.ts +3 -0
  212. package/dist/store/use-scene.d.ts.map +1 -1
  213. package/dist/store/use-scene.js +407 -227
  214. package/dist/systems/elevator/elevator-service.d.ts.map +1 -1
  215. package/dist/systems/elevator/elevator-service.js +16 -11
  216. package/dist/systems/roof/roof-elevation-system.d.ts +3 -0
  217. package/dist/systems/roof/roof-elevation-system.d.ts.map +1 -0
  218. package/dist/systems/roof/roof-elevation-system.js +94 -0
  219. package/dist/systems/roof/roof-elevation.d.ts +4 -0
  220. package/dist/systems/roof/roof-elevation.d.ts.map +1 -0
  221. package/dist/systems/roof/roof-elevation.js +95 -0
  222. package/dist/systems/roof/roof-footprint.d.ts +17 -0
  223. package/dist/systems/roof/roof-footprint.d.ts.map +1 -0
  224. package/dist/systems/roof/roof-footprint.js +83 -0
  225. package/dist/systems/slab/slab-support.d.ts +0 -31
  226. package/dist/systems/slab/slab-support.d.ts.map +1 -1
  227. package/dist/systems/slab/slab-support.js +26 -4
  228. package/dist/systems/stair/stair-flight.d.ts +17 -0
  229. package/dist/systems/stair/stair-flight.d.ts.map +1 -0
  230. package/dist/systems/stair/stair-flight.js +27 -0
  231. package/dist/systems/stair/stair-opening-preview.d.ts +1556 -1328
  232. package/dist/systems/stair/stair-opening-preview.d.ts.map +1 -1
  233. package/dist/systems/stair/stair-opening-system.d.ts +1 -0
  234. package/dist/systems/stair/stair-opening-system.d.ts.map +1 -1
  235. package/dist/systems/stair/stair-opening-system.js +93 -96
  236. package/dist/systems/stair/stair-rise.js +21 -20
  237. package/dist/systems/wall/wall-curve.d.ts +1 -0
  238. package/dist/systems/wall/wall-curve.d.ts.map +1 -1
  239. package/dist/systems/wall/wall-curve.js +73 -0
  240. package/dist/systems/wall/wall-footprint.d.ts +1 -0
  241. package/dist/systems/wall/wall-footprint.d.ts.map +1 -1
  242. package/dist/systems/wall/wall-footprint.js +1 -0
  243. package/dist/systems/wall/wall-mitering.d.ts.map +1 -1
  244. package/dist/systems/wall/wall-mitering.js +88 -9
  245. package/dist/systems/wall/wall-topology.d.ts +53 -0
  246. package/dist/systems/wall/wall-topology.d.ts.map +1 -0
  247. package/dist/systems/wall/wall-topology.js +414 -0
  248. package/dist/utils/clone-scene-graph.d.ts +2 -0
  249. package/dist/utils/clone-scene-graph.d.ts.map +1 -1
  250. package/dist/utils/clone-scene-graph.js +39 -2
  251. package/dist/utils/scene-migrations.d.ts +1 -0
  252. package/dist/utils/scene-migrations.d.ts.map +1 -1
  253. package/dist/utils/scene-migrations.js +1 -0
  254. package/dist/utils/vertical-scene-migration.d.ts +13 -0
  255. package/dist/utils/vertical-scene-migration.d.ts.map +1 -0
  256. package/dist/utils/vertical-scene-migration.js +179 -0
  257. package/dist/validation/validate-build-json.d.ts +3 -0
  258. package/dist/validation/validate-build-json.d.ts.map +1 -1
  259. package/dist/validation/validate-build-json.js +49 -2
  260. package/package.json +10 -3
  261. package/dist/systems/elevator/elevator-runtime-system.d.ts +0 -2
  262. package/dist/systems/elevator/elevator-runtime-system.d.ts.map +0 -1
  263. package/dist/systems/elevator/elevator-runtime-system.js +0 -8
@@ -1 +1 @@
1
- {"version":3,"file":"spatial-grid-sync.d.ts","sourceRoot":"","sources":["../../../src/hooks/spatial-grid/spatial-grid-sync.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAY,QAAQ,EAAY,MAAM,cAAc,CAAA;AAY/F,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAmBpF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,MAAM,GAAG,IAAI,CASf;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,GAChC,SAAS,GAAG,IAAI,CAgBlB;AAKD,wBAAgB,mBAAmB,IAAI,MAAM,IAAI,CAgIhD;AAMD;;;;;GAKG;AACH,wBAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAQ,QA6BtB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,SAAS,EAAE,CAAC,EAAE,EAAE,SAAS,KAAK,IAAI,QAgDnC;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,SAAS,EAAE,CAAC,EAAE,EAAE,SAAS,KAAK,IAAI,QAUnC"}
@@ -1,3 +1,4 @@
1
+ import { subtractPolygonsFromPolygon } from '../../lib/polygon-union';
1
2
  import { getRenderableSlabPolygon } from '../../lib/slab-polygon';
2
3
  import { isLevelAtSiteDatum, isLevelBaseConsumer } from '../../lib/terrain-support';
3
4
  import { nodeRegistry } from '../../registry';
@@ -98,6 +99,41 @@ export function initSpatialGridSync() {
98
99
  const markDirty = (id) => store.getState().markDirty(id);
99
100
  // Subscribe to all changes
100
101
  const unsubscribeScene = store.subscribe((state, prevState) => {
102
+ if (state.nodes === prevState.nodes)
103
+ return;
104
+ const changedSlabContextLevels = new Set();
105
+ const checkSlabContext = (id) => {
106
+ const previous = prevState.nodes[id];
107
+ const next = state.nodes[id];
108
+ if (previous === next)
109
+ return;
110
+ const wallChanged = (previous?.type === 'wall' || next?.type === 'wall') &&
111
+ (previous?.type !== 'wall' ||
112
+ next?.type !== 'wall' ||
113
+ previous.parentId !== next.parentId ||
114
+ previous.start !== next.start ||
115
+ previous.end !== next.end ||
116
+ previous.thickness !== next.thickness ||
117
+ previous.curveOffset !== next.curveOffset);
118
+ const slabChanged = (previous?.type === 'slab' || next?.type === 'slab') &&
119
+ (previous?.type !== 'slab' ||
120
+ next?.type !== 'slab' ||
121
+ previous.parentId !== next.parentId ||
122
+ previous.polygon !== next.polygon ||
123
+ previous.elevation !== next.elevation);
124
+ if (!(wallChanged || slabChanged))
125
+ return;
126
+ if (previous)
127
+ changedSlabContextLevels.add(resolveLevelId(previous, prevState.nodes));
128
+ if (next)
129
+ changedSlabContextLevels.add(resolveLevelId(next, state.nodes));
130
+ };
131
+ for (const id in prevState.nodes)
132
+ checkSlabContext(id);
133
+ for (const id in state.nodes) {
134
+ if (!prevState.nodes[id])
135
+ checkSlabContext(id);
136
+ }
101
137
  // Detect added nodes
102
138
  for (const [id, node] of Object.entries(state.nodes)) {
103
139
  if (!prevState.nodes[id]) {
@@ -123,7 +159,7 @@ export function initSpatialGridSync() {
123
159
  spatialGridManager.handleNodeDeleted(id, node.type, levelId);
124
160
  // When a slab is removed, mark items/walls that were on it dirty (using current state)
125
161
  if (node.type === 'slab') {
126
- markNodesOverlappingSlab(node, state.nodes, markDirty);
162
+ markNodesOverlappingSlab(node, state.nodes, markDirty, prevState.nodes);
127
163
  markCoveringDependentsBelow(levelId, state.nodes, markDirty);
128
164
  }
129
165
  // Deleting a sculpted site drops the ground back to the datum, so its
@@ -160,7 +196,7 @@ export function initSpatialGridSync() {
160
196
  const levelId = resolveLevelId(node, state.nodes);
161
197
  spatialGridManager.handleNodeUpdated(node, levelId);
162
198
  }
163
- markSlabChangeDependents(prev, node, state.nodes, markDirty);
199
+ markSlabChangeDependents(prev, node, state.nodes, markDirty, prevState.nodes);
164
200
  }
165
201
  else if (node.type === 'level' && prev.type === 'level') {
166
202
  if (node.height !== prev.height) {
@@ -188,6 +224,38 @@ export function initSpatialGridSync() {
188
224
  }
189
225
  }
190
226
  }
227
+ // Unchanged slabs can lose an adopted wall band or a sibling seam. Their
228
+ // stored polygons cannot identify objects standing on the former boundary.
229
+ if (changedSlabContextLevels.size === 0)
230
+ return;
231
+ const beforeContext = slabBoundaryContext(prevState.nodes, changedSlabContextLevels);
232
+ const afterContext = slabBoundaryContext(state.nodes, changedSlabContextLevels);
233
+ for (const context of afterContext.values()) {
234
+ for (const slab of context.slabs) {
235
+ const previous = prevState.nodes[slab.id];
236
+ if (previous?.type !== 'slab')
237
+ continue;
238
+ if (slab.parentId !== previous.parentId ||
239
+ slab.polygon !== previous.polygon ||
240
+ slab.elevation !== previous.elevation ||
241
+ slab.holes !== previous.holes)
242
+ continue;
243
+ const previousContext = beforeContext.get(resolveLevelId(previous, prevState.nodes));
244
+ const beforePolygon = cachedSlabPolygon(previous, previousContext);
245
+ const afterPolygon = cachedSlabPolygon(slab, context);
246
+ if (beforePolygon.length === afterPolygon.length &&
247
+ beforePolygon.every((point, i) => arraysEqual(point, afterPolygon[i])))
248
+ continue;
249
+ // Support only changed in the gained/lost bands, not across the slab interior.
250
+ const changedBands = [
251
+ ...subtractPolygonsFromPolygon(beforePolygon, [afterPolygon]),
252
+ ...subtractPolygonsFromPolygon(afterPolygon, [beforePolygon]),
253
+ ];
254
+ for (const polygon of changedBands) {
255
+ markNodesOverlappingPolygon(resolveLevelId(slab, state.nodes), polygon, state.nodes, markDirty, context.consumers);
256
+ }
257
+ }
258
+ }
191
259
  });
192
260
  // Live terrain is deliberately not written into `useScene` per dab: doing so
193
261
  // would encode the whole field, flood history, and wake every scene subscriber.
@@ -240,12 +308,13 @@ export function markDeckAttachedStairs(slabId, nodes, markDirty) {
240
308
  * Dirty every consumer of a slab's top or underside. Kept pure so committed
241
309
  * scene writes and live handle previews use the same dependency boundary.
242
310
  */
243
- export function markSlabChangeDependents(previous, next, nodes, markDirty) {
244
- const supportChanged = next.polygon !== previous.polygon ||
311
+ export function markSlabChangeDependents(previous, next, nodes, markDirty, previousNodes = nodes) {
312
+ const supportChanged = next.parentId !== previous.parentId ||
313
+ next.polygon !== previous.polygon ||
245
314
  next.elevation !== previous.elevation ||
246
315
  next.holes !== previous.holes;
247
316
  if (supportChanged) {
248
- markNodesOverlappingSlab(previous, nodes, markDirty);
317
+ markNodesOverlappingSlab(previous, nodes, markDirty, previousNodes);
249
318
  markNodesOverlappingSlab(next, nodes, markDirty);
250
319
  }
251
320
  if (next.elevation !== previous.elevation) {
@@ -254,7 +323,14 @@ export function markSlabChangeDependents(previous, next, nodes, markDirty) {
254
323
  if (supportChanged ||
255
324
  next.thickness !== previous.thickness ||
256
325
  next.recessed !== previous.recessed) {
257
- markCoveringDependentsBelow(resolveLevelId(next, nodes), nodes, markDirty);
326
+ const nextLevelId = resolveLevelId(next, nodes);
327
+ markCoveringDependentsBelow(nextLevelId, nodes, markDirty);
328
+ if (next.parentId !== previous.parentId) {
329
+ const previousLevelId = resolveLevelId(previous, previousNodes);
330
+ if (previousLevelId !== nextLevelId) {
331
+ markCoveringDependentsBelow(previousLevelId, nodes, markDirty);
332
+ }
333
+ }
258
334
  }
259
335
  }
260
336
  /**
@@ -344,18 +420,8 @@ export function markCoveringDependentsBelow(slabLevelId, nodes, markDirty) {
344
420
  }
345
421
  }
346
422
  }
347
- /**
348
- * Mark all floor items and walls that may be affected by a slab change as dirty.
349
- */
350
- function markNodesOverlappingSlab(slab, nodes, markDirty) {
351
- if (slab.polygon.length < 3)
352
- return;
423
+ function renderableSlabPolygon(slab, nodes) {
353
424
  const slabLevelId = resolveLevelId(slab, nodes);
354
- // Walls AND floor-placed nodes follow the slab's RENDERED footprint
355
- // (band-adopted edges reach the wall's outer face), so the dirty gate
356
- // must test the same polygon the support queries re-evaluate — a stored
357
- // polygon that stops short of the wall body would otherwise never
358
- // re-elevate nodes sitting over the adopted band.
359
425
  const levelWalls = [];
360
426
  const siblingSlabs = [];
361
427
  for (const node of Object.values(nodes)) {
@@ -368,8 +434,20 @@ function markNodesOverlappingSlab(slab, nodes, markDirty) {
368
434
  siblingSlabs.push(node);
369
435
  }
370
436
  }
371
- const renderedPolygon = getRenderableSlabPolygon(slab, { walls: levelWalls, siblingSlabs });
372
- for (const node of Object.values(nodes)) {
437
+ return getRenderableSlabPolygon(slab, { walls: levelWalls, siblingSlabs });
438
+ }
439
+ /**
440
+ * Mark all floor items and walls that may be affected by a slab change as dirty.
441
+ */
442
+ function markNodesOverlappingSlab(slab, nodes, markDirty, contextNodes = nodes) {
443
+ if (slab.polygon.length < 3)
444
+ return;
445
+ const slabLevelId = resolveLevelId(slab, contextNodes);
446
+ const renderedPolygon = renderableSlabPolygon(slab, contextNodes);
447
+ markNodesOverlappingPolygon(slabLevelId, renderedPolygon, nodes, markDirty);
448
+ }
449
+ function markNodesOverlappingPolygon(slabLevelId, renderedPolygon, nodes, markDirty, candidates = Object.values(nodes)) {
450
+ for (const node of candidates) {
373
451
  if (node.type === 'wall') {
374
452
  const wall = node;
375
453
  if (resolveLevelId(node, nodes) !== slabLevelId)
@@ -412,3 +490,38 @@ function markNodesOverlappingSlab(slab, nodes, markDirty) {
412
490
  }
413
491
  }
414
492
  }
493
+ function slabBoundaryContext(nodes, levels) {
494
+ const contexts = new Map();
495
+ for (const id in nodes) {
496
+ const node = nodes[id];
497
+ const floorPlaced = nodeRegistry.get(node.type)?.capabilities?.floorPlaced;
498
+ if (node.type !== 'wall' && node.type !== 'slab' && !floorPlaced)
499
+ continue;
500
+ const levelId = resolveLevelId(node, nodes);
501
+ if (!levels.has(levelId))
502
+ continue;
503
+ let context = contexts.get(levelId);
504
+ if (!context) {
505
+ context = { walls: [], slabs: [], consumers: [], polygons: new Map() };
506
+ contexts.set(levelId, context);
507
+ }
508
+ if (node.type === 'wall')
509
+ context.walls.push(node);
510
+ if (node.type === 'slab')
511
+ context.slabs.push(node);
512
+ if (node.type === 'wall' || floorPlaced)
513
+ context.consumers.push(node);
514
+ }
515
+ return contexts;
516
+ }
517
+ function cachedSlabPolygon(slab, context) {
518
+ let polygon = context.polygons.get(slab.id);
519
+ if (!polygon) {
520
+ polygon = getRenderableSlabPolygon(slab, {
521
+ walls: context.walls,
522
+ siblingSlabs: context.slabs.filter((sibling) => sibling.id !== slab.id),
523
+ });
524
+ context.polygons.set(slab.id, polygon);
525
+ }
526
+ return polygon;
527
+ }
@@ -1,4 +1,4 @@
1
- import type { AnyNode, FenceNode, WallNode } from '../../schema';
1
+ import type { AnyNode, AnyNodeId, FenceNode, WallNode } from '../../schema';
2
2
  export type SupportSlabPatch = {
3
3
  supportSlabId: string | undefined;
4
4
  };
@@ -13,8 +13,29 @@ export type SupportSlabPatchOptions = {
13
13
  maxElevation?: number | null;
14
14
  /** Pointer- or snap-decided host. Ground is a first-class support source. */
15
15
  preferredSlabId?: string | null;
16
+ /** Persist even an unambiguous host so later overlapping slabs cannot re-elect it. */
17
+ pinSupport?: boolean;
18
+ };
19
+ export type FrozenFloorPlacementOptions = {
20
+ /** Canonical position before floor/support lift is applied. */
21
+ position: [number, number, number];
22
+ rotation?: unknown;
23
+ /** Exact level-local elevation hit on a non-slab construction surface. */
24
+ elevation: number;
25
+ /** Slab/ground supporting that construction surface, when known. */
26
+ preferredSlabId?: string | null;
16
27
  };
17
28
  export declare function resolveSupportSlabPatch(node: AnyNode, nodes: Record<string, AnyNode>, options?: SupportSlabPatchOptions): SupportSlabPatch;
29
+ /**
30
+ * Freeze an exact pointed node-top elevation into a floor-placed node's
31
+ * existing canonical Y offset, while pinning the slab/ground beneath that
32
+ * surface. This deliberately does not create a live hosting edge to the
33
+ * pointed node: arbitrary mesh faces can be edited or sloped, so placement
34
+ * captures the plane the user chose at commit time.
35
+ */
36
+ export declare function resolveFrozenFloorPlacementPatch(node: AnyNode, nodes: Record<string, AnyNode>, options: FrozenFloorPlacementOptions): SupportSlabPatch & {
37
+ position: [number, number, number];
38
+ };
18
39
  export declare function resolveWallSupportSlabPatch(wall: WallNode, nodes: Record<string, AnyNode>, options?: SupportSlabPatchOptions): SupportSlabPatch;
19
40
  /**
20
41
  * Re-elect a moved wall without discarding an explicit construction source.
@@ -48,4 +69,27 @@ export type FenceSupportInput = Pick<FenceNode, 'start' | 'end' | 'curveOffset'
48
69
  * via the same absent-host default. Pure; exported for tests.
49
70
  */
50
71
  export declare function resolveFenceSupportSlabPatch(fence: FenceSupportInput, nodes: Record<string, AnyNode>, options?: SupportSlabPatchOptions): SupportSlabPatch;
72
+ export type FenceConstructionOptions = {
73
+ supportCap?: number | null;
74
+ preferredSupportSlabId?: string | null;
75
+ constructionElevation?: number | null;
76
+ };
77
+ export declare function resolveFenceConstructionSupport(fence: FenceNode, levelId: string, nodes: Record<string, AnyNode>, options?: FenceConstructionOptions): FenceNode;
78
+ export type WallConstructionOptions = {
79
+ supportCap?: number | null;
80
+ preferredSupportSlabId?: string | null;
81
+ constructionElevation?: number | null;
82
+ constructionHeight?: number | null;
83
+ flatConstructionBase?: boolean;
84
+ constructionSourceNodeId?: AnyNodeId | null;
85
+ };
86
+ export declare function resolveTerrainWallConstructionOptions(nodes: Record<string, AnyNode>, levelId: string, point: readonly [number, number], defaults?: Record<string, unknown>): WallConstructionOptions | undefined;
87
+ export type WallConstructionResolution = {
88
+ walls: WallNode[];
89
+ sourceSupportUpdate: {
90
+ id: AnyNodeId;
91
+ data: SupportSlabPatch;
92
+ } | null;
93
+ };
94
+ export declare function resolveWallConstruction(nodes: Record<string, AnyNode>, levelId: string, walls: readonly WallNode[], options?: WallConstructionOptions): WallConstructionResolution;
51
95
  //# sourceMappingURL=support-host-patch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"support-host-patch.d.ts","sourceRoot":"","sources":["../../../src/hooks/spatial-grid/support-host-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CAAqC,CACnD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,EAChC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACjC,uBAAuB,GAAG,SAAS,CAiBrC;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,KAAK,EAAE,QAAQ,EAAE,CAAA;IACjB,mBAAmB,EAAE;QAAE,EAAE,EAAE,SAAS,CAAC;QAAC,IAAI,EAAE,gBAAgB,CAAA;KAAE,GAAG,IAAI,CAAA;CACtE,CAAA;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,SAAS,QAAQ,EAAE,EAC1B,OAAO,CAAC,EAAE,uBAAuB,GAChC,0BAA0B,CAkF5B"}
@@ -1,6 +1,8 @@
1
+ import { levelBaseElevationAt, terrainSupportLift } from '../../lib/terrain-support';
1
2
  import { nodeRegistry } from '../../registry';
3
+ import { DEFAULT_LEVEL_HEIGHT } from '../../services/level-height';
2
4
  import { getWallCurveFrameAt, isCurvedWall } from '../../systems/wall/wall-curve';
3
- import { GROUND_SUPPORT_ID, getFloorPlacedFootprints } from './floor-placed-elevation';
5
+ import { GROUND_SUPPORT_ID, getFloorPlacedElevation, getFloorPlacedFootprints, } from './floor-placed-elevation';
4
6
  import { SUPPORT_ELEVATION_EPSILON, spatialGridManager } from './spatial-grid-manager';
5
7
  export function resolveSupportSlabPatch(node, nodes, options) {
6
8
  const floorPlaced = nodeRegistry.get(node.type)?.capabilities?.floorPlaced;
@@ -13,6 +15,21 @@ export function resolveSupportSlabPatch(node, nodes, options) {
13
15
  return { supportSlabId: undefined };
14
16
  const maxElevation = options?.maxElevation;
15
17
  const footprints = getFloorPlacedFootprints(floorPlaced, node, { nodes });
18
+ if (options?.preferredSlabId === GROUND_SUPPORT_ID) {
19
+ return { supportSlabId: GROUND_SUPPORT_ID };
20
+ }
21
+ if (options?.preferredSlabId) {
22
+ for (const footprint of footprints) {
23
+ const position = footprint.position ?? node.position;
24
+ if (!Array.isArray(position) || position.length !== 3)
25
+ continue;
26
+ const elevation = spatialGridManager.getHostSlabElevationForFootprint(parent.id, options.preferredSlabId, position, footprint.dimensions, footprint.rotation);
27
+ if (elevation !== null &&
28
+ (maxElevation == null || elevation <= maxElevation + SUPPORT_ELEVATION_EPSILON)) {
29
+ return { supportSlabId: options.preferredSlabId };
30
+ }
31
+ }
32
+ }
16
33
  const candidateElevations = new Set();
17
34
  let winner = null;
18
35
  let cappedOut = false;
@@ -32,12 +49,54 @@ export function resolveSupportSlabPatch(node, nodes, options) {
32
49
  }
33
50
  }
34
51
  if (winner !== null) {
35
- return { supportSlabId: candidateElevations.size >= 2 ? winner.slabId : undefined };
52
+ return {
53
+ supportSlabId: options?.pinSupport || candidateElevations.size >= 2 ? winner.slabId : undefined,
54
+ };
36
55
  }
37
56
  // Capped election chose the ground while overlapping slabs sit above the
38
57
  // cap: persist the ground host, or the uncapped per-frame election would
39
58
  // lift the committed node back onto the deck.
40
- return { supportSlabId: cappedOut ? GROUND_SUPPORT_ID : undefined };
59
+ return {
60
+ supportSlabId: options?.pinSupport || cappedOut ? GROUND_SUPPORT_ID : undefined,
61
+ };
62
+ }
63
+ /**
64
+ * Freeze an exact pointed node-top elevation into a floor-placed node's
65
+ * existing canonical Y offset, while pinning the slab/ground beneath that
66
+ * surface. This deliberately does not create a live hosting edge to the
67
+ * pointed node: arbitrary mesh faces can be edited or sloped, so placement
68
+ * captures the plane the user chose at commit time.
69
+ */
70
+ export function resolveFrozenFloorPlacementPatch(node, nodes, options) {
71
+ const effectiveNode = {
72
+ ...node,
73
+ position: options.position,
74
+ ...(options.rotation !== undefined ? { rotation: options.rotation } : {}),
75
+ };
76
+ const floorPlaced = nodeRegistry.get(effectiveNode.type)?.capabilities?.floorPlaced;
77
+ if (!floorPlaced || (floorPlaced.applies && !floorPlaced.applies(effectiveNode))) {
78
+ return { supportSlabId: undefined, position: options.position };
79
+ }
80
+ const supportPatch = resolveSupportSlabPatch(effectiveNode, nodes, {
81
+ maxElevation: options.elevation,
82
+ preferredSlabId: options.preferredSlabId,
83
+ pinSupport: true,
84
+ });
85
+ const pinnedNode = { ...effectiveNode, ...supportPatch };
86
+ const supportElevation = getFloorPlacedElevation({
87
+ node: pinnedNode,
88
+ nodes,
89
+ position: options.position,
90
+ rotation: options.rotation,
91
+ });
92
+ return {
93
+ ...supportPatch,
94
+ position: [
95
+ options.position[0],
96
+ options.position[1] + options.elevation - supportElevation,
97
+ options.position[2],
98
+ ],
99
+ };
41
100
  }
42
101
  export function resolveWallSupportSlabPatch(wall, nodes, options) {
43
102
  const parent = wall.parentId ? nodes[wall.parentId] : null;
@@ -138,6 +197,9 @@ export function resolveFenceSupportSlabPatch(fence, nodes, options) {
138
197
  const points = fenceCenterlinePoints(fence);
139
198
  const candidateElevations = new Set();
140
199
  let winner = null;
200
+ if (options?.preferredSlabId === GROUND_SUPPORT_ID) {
201
+ return { supportSlabId: GROUND_SUPPORT_ID };
202
+ }
141
203
  for (let i = 1; i < points.length; i++) {
142
204
  const [ax, az] = points[i - 1];
143
205
  const [bx, bz] = points[i];
@@ -149,6 +211,13 @@ export function resolveFenceSupportSlabPatch(fence, nodes, options) {
149
211
  // getItemFootprint's rotation convention: local +X maps to
150
212
  // (cos yRot, sin yRot) in XZ, so the segment angle aligns the band.
151
213
  const rotation = [0, Math.atan2(bz - az, bx - ax), 0];
214
+ if (options?.preferredSlabId) {
215
+ const preferredElevation = spatialGridManager.getHostSlabElevationForFootprint(parent.id, options.preferredSlabId, position, dimensions, rotation);
216
+ if (preferredElevation !== null &&
217
+ (maxElevation == null || preferredElevation <= maxElevation + SUPPORT_ELEVATION_EPSILON)) {
218
+ return { supportSlabId: options.preferredSlabId };
219
+ }
220
+ }
152
221
  const candidates = spatialGridManager.getSupportCandidatesForFootprint(parent.id, position, dimensions, rotation);
153
222
  for (const candidate of candidates)
154
223
  candidateElevations.add(candidate.elevation);
@@ -157,8 +226,104 @@ export function resolveFenceSupportSlabPatch(fence, nodes, options) {
157
226
  winner = { slabId: support.slabId, elevation: support.elevation };
158
227
  }
159
228
  }
160
- if (winner === null)
161
- return { supportSlabId: undefined };
229
+ if (winner === null) {
230
+ return { supportSlabId: options?.pinSupport ? GROUND_SUPPORT_ID : undefined };
231
+ }
162
232
  const persist = candidateElevations.size >= 2 || winner.elevation > SUPPORT_ELEVATION_EPSILON;
163
- return { supportSlabId: persist ? winner.slabId : undefined };
233
+ return { supportSlabId: options?.pinSupport || persist ? winner.slabId : undefined };
234
+ }
235
+ export function resolveFenceConstructionSupport(fence, levelId, nodes, options) {
236
+ const supportPatch = resolveFenceSupportSlabPatch({ ...fence, parentId: levelId }, nodes, {
237
+ maxElevation: options?.supportCap ?? null,
238
+ preferredSlabId: options?.preferredSupportSlabId ?? null,
239
+ pinSupport: options?.constructionElevation != null,
240
+ });
241
+ const host = supportPatch.supportSlabId ? nodes[supportPatch.supportSlabId] : null;
242
+ const baseElevation = host?.type === 'slab'
243
+ ? host.elevation
244
+ : levelBaseElevationAt(nodes, levelId, fence.start[0], fence.start[1]);
245
+ const supportOffset = options?.constructionElevation == null
246
+ ? fence.supportOffset
247
+ : options.constructionElevation - baseElevation;
248
+ return {
249
+ ...fence,
250
+ ...supportPatch,
251
+ supportOffset: supportOffset != null && Math.abs(supportOffset) > 1e-6 ? supportOffset : undefined,
252
+ };
253
+ }
254
+ export function resolveTerrainWallConstructionOptions(nodes, levelId, point, defaults) {
255
+ const constructionElevation = terrainSupportLift(nodes, levelId, point[0], point[1]);
256
+ if (constructionElevation == null)
257
+ return undefined;
258
+ const level = nodes[levelId];
259
+ const constructionHeight = typeof defaults?.height === 'number'
260
+ ? defaults.height
261
+ : level?.type === 'level'
262
+ ? (level.height ?? DEFAULT_LEVEL_HEIGHT)
263
+ : DEFAULT_LEVEL_HEIGHT;
264
+ return {
265
+ constructionElevation,
266
+ constructionHeight,
267
+ supportCap: constructionElevation,
268
+ };
269
+ }
270
+ export function resolveWallConstruction(nodes, levelId, walls, options) {
271
+ let resolvedNodes = nodes;
272
+ let sourceSupportUpdate = null;
273
+ const constructionSourceNodeId = options?.constructionSourceNodeId;
274
+ const constructionSourceIsSlab = constructionSourceNodeId
275
+ ? nodes[constructionSourceNodeId]?.type === 'slab'
276
+ : false;
277
+ if (constructionSourceNodeId) {
278
+ const sourceNode = nodes[constructionSourceNodeId];
279
+ const currentSupport = sourceNode && 'supportSlabId' in sourceNode
280
+ ? sourceNode.supportSlabId
281
+ : undefined;
282
+ if (sourceNode && currentSupport == null) {
283
+ const data = resolveSupportSlabPatch(sourceNode, nodes, { pinSupport: true });
284
+ if (data.supportSlabId != null) {
285
+ sourceSupportUpdate = { id: constructionSourceNodeId, data };
286
+ resolvedNodes = {
287
+ ...nodes,
288
+ [constructionSourceNodeId]: { ...sourceNode, ...data },
289
+ };
290
+ }
291
+ }
292
+ }
293
+ const resolvedWalls = walls.map((createdWall) => {
294
+ const wallWithParent = { ...createdWall, parentId: levelId };
295
+ const terrainBase = terrainSupportLift(resolvedNodes, levelId, createdWall.start[0], createdWall.start[1]);
296
+ const wallOptions = options?.preferredSupportSlabId === GROUND_SUPPORT_ID &&
297
+ terrainBase == null &&
298
+ !options.flatConstructionBase
299
+ ? undefined
300
+ : options;
301
+ const flatConstructionBase = wallOptions?.flatConstructionBase === true && !constructionSourceIsSlab;
302
+ const preferredSupportSlabId = flatConstructionBase
303
+ ? GROUND_SUPPORT_ID
304
+ : (wallOptions?.preferredSupportSlabId ??
305
+ (wallOptions?.constructionElevation != null && terrainBase != null
306
+ ? GROUND_SUPPORT_ID
307
+ : null));
308
+ const supportPatch = resolveWallSupportSlabPatch(wallWithParent, resolvedNodes, {
309
+ maxElevation: wallOptions?.supportCap ?? null,
310
+ preferredSlabId: preferredSupportSlabId,
311
+ });
312
+ const sourceSupport = spatialGridManager.getSlabSupportForWall(levelId, createdWall.start, createdWall.end, createdWall.curveOffset, createdWall.thickness, supportPatch.supportSlabId, wallOptions?.supportCap ?? null);
313
+ const groundDraft = preferredSupportSlabId === GROUND_SUPPORT_ID && (terrainBase != null || flatConstructionBase);
314
+ const supportOffset = groundDraft && wallOptions?.constructionElevation != null
315
+ ? wallOptions.constructionElevation - sourceSupport.elevation
316
+ : undefined;
317
+ const preserveDraftHeight = groundDraft &&
318
+ createdWall.height == null &&
319
+ wallOptions?.constructionHeight != null &&
320
+ wallOptions.constructionElevation != null;
321
+ return {
322
+ ...wallWithParent,
323
+ ...supportPatch,
324
+ height: preserveDraftHeight ? wallOptions.constructionHeight : createdWall.height,
325
+ supportOffset: supportOffset != null && Math.abs(supportOffset) > 1e-6 ? supportOffset : undefined,
326
+ };
327
+ });
328
+ return { walls: resolvedWalls, sourceSupportUpdate };
164
329
  }
package/dist/index.d.ts CHANGED
@@ -1,19 +1,22 @@
1
- export type { BoxVentEvent, BuildingEvent, CabinetEvent, CabinetModuleEvent, CameraControlEvent, CameraControlFitSceneEvent, CameraPose, CeilingEvent, ChimneyEvent, ColumnEvent, ConstructionDimensionEvent, DoorEvent, DormerEvent, ElevatorEvent, EventSuffix, FenceEvent, GridEvent, GuideEvent, GutterEvent, ItemEvent, LevelEvent, MeasurementEvent, NodeEvent, RidgeVentEvent, RoofEvent, RoofSegmentEvent, RoomPresetCreateEvent, ScanEvent, ShelfEvent, SiteEvent, SkylightEvent, SlabEvent, SolarPanelEvent, SpawnEvent, StairEvent, StairSegmentEvent, StructuralGridEvent, WallEvent, WindowEvent, ZoneEvent, } from './events/bus';
1
+ export type { BlockEvent, BoxVentEvent, BuildingEvent, CabinetEvent, CabinetModuleEvent, CameraControlEvent, CameraControlFitSceneEvent, CameraPose, CeilingEvent, ChimneyEvent, ColumnEvent, ConstructionDimensionEvent, DoorEvent, DormerEvent, ElevatorEvent, EventSuffix, FenceEvent, GridEvent, GuideEvent, GutterEvent, ItemEvent, LeanToExtensionEvent, LevelEvent, MeasurementEvent, NodeEvent, RidgeVentEvent, RoofEvent, RoofSegmentEvent, RoomPresetCreateEvent, ScanEvent, ShelfEvent, SiteEvent, SkylightEvent, SlabEvent, SnapshotCaptureFailedEvent, SnapshotCapturePose, SnapshotSavedEvent, SolarPanelEvent, SpawnEvent, StairEvent, StairSegmentEvent, StructuralGridEvent, ThumbnailGenerateEvent, WallEvent, WindowEvent, ZoneEvent, } from './events/bus';
2
2
  export { emitter, eventSuffixes } from './events/bus';
3
+ export { hiddenWallPointerEventsHeld, holdHiddenWallPointerEvents, } from './events/hidden-wall-pointer-hold';
3
4
  export { type ItemClipEntry, itemClipRegistry } from './hooks/scene-registry/item-clip-registry';
4
5
  export { sceneRegistry, useRegistry, } from './hooks/scene-registry/scene-registry';
5
6
  export { type FloorPlacedElevationArgs, GROUND_SUPPORT_ID, getFloorPlacedElevation, getFloorPlacedFootprints, getFloorStackedPosition, } from './hooks/spatial-grid/floor-placed-elevation';
6
7
  export { getWallBaseElevationForNodes, getWallEffectiveHeightForNodes, type PointedSupportSurface, pointInPolygon, SUPPORT_ELEVATION_EPSILON, spatialGridManager, type WallSlabSupportSegment, } from './hooks/spatial-grid/spatial-grid-manager';
7
8
  export { findLevelAncestorId, initSpatialGridSync, markSlabChangeDependents, resolveBuildingForLevel, resolveLevelId, } from './hooks/spatial-grid/spatial-grid-sync';
8
- export { type FenceSupportInput, resolveFenceSupportSlabPatch, resolveMovedWallSupportSlabPatch, resolveSupportSlabPatch, resolveWallSupportSlabPatch, type SupportSlabPatch, type SupportSlabPatchOptions, } from './hooks/spatial-grid/support-host-patch';
9
+ export { type FenceConstructionOptions, type FenceSupportInput, type FrozenFloorPlacementOptions, resolveFenceConstructionSupport, resolveFenceSupportSlabPatch, resolveFrozenFloorPlacementPatch, resolveMovedWallSupportSlabPatch, resolveSupportSlabPatch, resolveTerrainWallConstructionOptions, resolveWallConstruction, resolveWallSupportSlabPatch, type SupportSlabPatch, type SupportSlabPatchOptions, type WallConstructionOptions, type WallConstructionResolution, } from './hooks/spatial-grid/support-host-patch';
9
10
  export { useSpatialQuery } from './hooks/spatial-grid/use-spatial-query';
10
11
  export { loadAssetUrl, saveAsset } from './lib/asset-storage';
11
12
  export { clampDoorOperationState, getDoorRenderOpenAmount, getGarageVisibleOpeningRatio, isOperationDoorType, SECTIONAL_GARAGE_RENDER_OPEN_SCALE, } from './lib/door-operation';
12
13
  export { getDefaultLevelName, getLevelDisplayName } from './lib/level-name';
13
14
  export { areMeasurementPointsCoplanar, closestMeasurementFeatureBinding, MEASUREMENT_PLANAR_TOLERANCE, measurementAnchorFallback, measurementAnchorReferenceNodeIds, measurementAngle, measurementArea, measurementAreaVector, measurementCentroid, measurementDistance, measurementFeatureLength, measurementNormal, measurementPerimeter, measurementPrismVolume, measurementReferenceNodeIds, remapMeasurementAnchors, remapMeasurementReferences, } from './lib/measurement-geometry';
14
15
  export { type Point2D as PolygonPoint2D, pointInPolygon as pointInPolygon2D, pointOnSegment, polygonContainsPolygon, polygonsIntersect, polygonsOverlap, segmentsIntersect, } from './lib/polygon-relations';
16
+ export { type Point2D as PolygonBooleanPoint2D, subtractPolygonsFromPolygon, unionPolygons, } from './lib/polygon-union';
17
+ export { compareRoofOverlapIdentity, getRoofPlanBounds, type RoofOverlapEntry, type RoofPlan, type RoofPlanBounds, type RoofPlanSegment, roofOverlapEntryOwns, roofPlanBoundsOverlap, roofPlanOverlapEntryOwns, } from './lib/roof-overlap';
15
18
  export { resolveSelectionProxyId, selectionProxyIdFromMetadata } from './lib/selection-proxy';
16
- export { getRenderableSlabPolygon, type SlabEdgeWallBandSnap, type SlabPolygonContext, slabPolygonContextFromGeometry, snapSlabEdgeToWallBand, } from './lib/slab-polygon';
19
+ export { getRenderableSlabPolygon, prepareSlabPolygonContext, type SlabEdgeWallBandSnap, type SlabPolygonContext, scopeSlabPolygonContext, slabPolygonContextChanges, slabPolygonContextForLevel, slabPolygonContextFromGeometry, snapSlabEdgeToWallBand, } from './lib/slab-polygon';
17
20
  export { deriveSlotId, isSlotMaterialName, SLOT_MATERIAL_PREFIX, slotLabelFromId, } from './lib/slots';
18
21
  export { type AutoCeilingPlanningContext, type AutoCeilingSyncPlan, type AutoSlabPlanningContext, type AutoSlabSyncPlan, type AutoZoneSyncPlan, detectSpacesForLevel, initSpaceDetectionSync, isSpaceDetectionPaused, pauseSpaceDetection, planAutoCeilingsForLevel, planAutoSlabsForLevel, planAutoZonesForLevel, resolveAutoZonePolygon, resumeSpaceDetection, type Space, type SpaceBoundaryFace, wallClosesRoom, wallTouchesOthers, } from './lib/space-detection';
19
22
  export { advanceStroke, type BrushSettings, type BrushShape, beginStroke, brushHeightAt, DEFAULT_BRUSH_SETTINGS, detachStrokeAnchor, highestOver, MIN_BRUSH_RADIUS_IN_SPACINGS, maxCoverage, minBrushRadius, RAISE_METRES_PER_STROKE, sampleTarget, type TerrainStroke, type TerrainVerb, weightAt, } from './lib/terrain-brush';
@@ -27,10 +30,12 @@ export { deriveZoneQuantityReport, type ZoneQuantityReport, type ZoneQuantityVal
27
30
  export { getCatalogMaterialById, getDynamicLibraryMaterials, getLibraryMaterialIdFromRef, getLibraryMaterialsVersion, getMaterialPresetByRef, getMaterialsForCategory, getSceneMaterialIdFromRef, LIBRARY_MATERIAL_REF_PREFIX, MATERIAL_CATALOG, MATERIAL_CATEGORIES, MATERIAL_SURFACES, type MaterialCatalogItem, type MaterialCategory, type MaterialRef, type MaterialSource, type MaterialSurface, type ParsedMaterialRef, parseMaterialRef, registerLibraryMaterials, SCENE_MATERIAL_REF_PREFIX, subscribeLibraryMaterials, toLibraryMaterialRef, toSceneMaterialRef, unregisterLibraryMaterials, } from './material-library';
28
31
  export type { FloorPlacedFootprint, FloorPlacedFootprintContext, FloorPlacedFootprintResolver, FloorPlacedFootprintsResolver, } from './registry';
29
32
  export * from './registry';
33
+ export { useRegistryVersion } from './registry/use-registry-version';
30
34
  export * from './schema';
31
35
  export * from './services';
32
36
  export { isMovable, movePlanToward, moveToward, resolveMovable } from './services/movement';
33
- export { getSceneHistoryPauseDepth, pauseSceneHistory, resetSceneHistoryPauseDepth, resumeSceneHistory, runAsSingleSceneHistoryStep, type SceneCommit, type SceneCommitListener, type SceneCommitOrigin, type SceneSnapshot, subscribeSceneCommits, } from './store/history-control';
37
+ export { acquireSceneHistoryPause, activeSceneCommitNodeIds, getSceneHistoryPauseDepth, pauseSceneHistory, resetSceneHistoryPauseDepth, resumeSceneHistory, runAsSingleSceneHistoryStep, type SceneCommit, type SceneCommitListener, type SceneCommitOrigin, type SceneSnapshot, subscribeSceneCommits, } from './store/history-control';
38
+ export { getHistoryDirtyNodeIds } from './store/history-invalidation';
34
39
  export { type ControlValue, type DoorAnimationState, type DoorInteractiveState, type ElevatorInteractiveState, type ElevatorPhase, type ItemInteractiveState, type SkylightAnimationState, type SkylightInteractiveState, useInteractive, type WindowAnimationState, type WindowInteractiveState, } from './store/use-interactive';
35
40
  export { default as useLiveNodeOverrides, getEffectiveNode, type LiveNodeOverrides, } from './store/use-live-node-overrides';
36
41
  export { default as useLiveTerrain, type LiveTerrainStroke, } from './store/use-live-terrain';
@@ -41,22 +46,26 @@ export { type ElevatorDoorSide, getElevatorCabCenterZ, getElevatorCabDepth, getE
41
46
  export { syncAutoElevatorOpenings } from './systems/elevator/elevator-opening-sync';
42
47
  export { ElevatorOpeningSystem } from './systems/elevator/elevator-opening-system';
43
48
  export { createElevatorInteractiveState, openElevatorDoor, openElevatorDoorState, queueElevatorRequest, requestElevatorLevel, stepElevatorRuntimeState, stepElevatorRuntimes, } from './systems/elevator/elevator-runtime';
44
- export { ElevatorRuntimeSystem } from './systems/elevator/elevator-runtime-system';
45
49
  export { type ElevatorLevelEntry, resolveElevatorBuildingLevels, resolveElevatorLevels, resolveElevatorServiceLevelIds, resolveElevatorServiceLevels, } from './systems/elevator/elevator-service';
46
50
  export { getFenceCenterlineFrameAt, getFenceCenterlineLength, sampleFenceCenterline, } from './systems/fence/fence-centerline';
47
51
  export { getFenceControlHandle, getFenceSplineFrameAt, getFenceSplineLength, getTwoPointFenceCurveTangents, isSplineFence, sampleFenceSpline, } from './systems/fence/fence-spline';
52
+ export { resolveRoofElevation, resolveRoofWallTopElevation } from './systems/roof/roof-elevation';
53
+ export { RoofElevationSystem } from './systems/roof/roof-elevation-system';
54
+ export { fitRoofFootprint, type RoofFootprintTarget, resolveRoomRoofFootprint, resolveRoomRoofFootprintOnLevel, } from './systems/roof/roof-footprint';
48
55
  export { resolveSlabPlacementElevation } from './systems/slab/slab-placement';
49
56
  export { clampSlabElevationForWalls, getSlabElevationUpperBound, type SlabElevationClamp, } from './systems/slab/slab-support';
57
+ export { createDefaultStairSegment, createStairFlightFromStair, type StairFlightOverrides, } from './systems/stair/stair-flight';
50
58
  export { type StairFootprintAABB, stairFootprintAABB } from './systems/stair/stair-footprint';
51
59
  export { createSurfaceOpeningPreviewController } from './systems/stair/stair-opening-preview';
52
60
  export { syncAutoStairOpenings } from './systems/stair/stair-opening-sync';
53
61
  export { StairOpeningSystem } from './systems/stair/stair-opening-system';
54
62
  export { resolveStairTotalRise, syncStairRises } from './systems/stair/stair-rise';
55
- export { getClampedWallCurveOffset, getMaxWallCurveOffset, getWallArcData, getWallChordFrame, getWallCurveFrameAt, getWallCurveLength, getWallMidpointHandlePoint, getWallStraightSnapOffset, getWallSurfacePolygon, isCurvedWall, normalizeWallCurveOffset, sampleWallCenterline, } from './systems/wall/wall-curve';
63
+ export { constrainWallCurveOffsetToAvoidIntersections, getClampedWallCurveOffset, getMaxWallCurveOffset, getWallArcData, getWallChordFrame, getWallCurveFrameAt, getWallCurveLength, getWallMidpointHandlePoint, getWallStraightSnapOffset, getWallSurfacePolygon, isCurvedWall, normalizeWallCurveOffset, sampleWallCenterline, } from './systems/wall/wall-curve';
56
64
  export { DEFAULT_WALL_HEIGHT, DEFAULT_WALL_THICKNESS, getWallPlanFootprint, getWallThickness, } from './systems/wall/wall-footprint';
57
65
  export { calculateLevelMiters, getAdjacentWallIds, getWallMiterBoundaryPoints, type Point2D, pointToKey, type WallMiterBoundaryPoints, type WallMiterData, } from './systems/wall/wall-mitering';
58
66
  export { constrainWallMoveDeltaToAxis, getLinkedWallUpdates, getPerpendicularWallMoveAxis, getPlannedLinkedWallUpdates, planWallMoveJunctions, type WallMoveAxis, type WallMoveBridgePlan, type WallMoveJunctionPlan, type WallMoveLinkedWallTargetPlan, type WallPlanPoint, } from './systems/wall/wall-move';
59
67
  export { MIN_WALL_HEIGHT, resolveWallEffectiveHeight, resolveWallTop, } from './systems/wall/wall-top';
68
+ export { planWallInsertion, planWallSplitAtPoint, } from './systems/wall/wall-topology';
60
69
  export type { SceneGraph } from './utils/clone-scene-graph';
61
70
  export { cloneLevelSubtree, cloneSceneGraph, forkSceneGraph } from './utils/clone-scene-graph';
62
71
  export { isObject } from './utils/types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,0BAA0B,EAC1B,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,0BAA0B,EAC1B,SAAS,EACT,WAAW,EACX,aAAa,EACb,WAAW,EACX,UAAU,EACV,SAAS,EACT,UAAU,EACV,WAAW,EACX,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,SAAS,EACT,gBAAgB,EAChB,qBAAqB,EACrB,SAAS,EACT,UAAU,EACV,SAAS,EACT,aAAa,EACb,SAAS,EACT,eAAe,EACf,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,SAAS,EACT,WAAW,EACX,SAAS,GACV,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AACrD,OAAO,EAAE,KAAK,aAAa,EAAE,gBAAgB,EAAE,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