@pascal-app/core 1.0.5 → 1.0.7
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.
- package/dist/agent-operations/__fixtures__/add-object-cases.d.ts +31 -0
- package/dist/agent-operations/__fixtures__/add-object-cases.d.ts.map +1 -1
- package/dist/agent-operations/__fixtures__/build-room-cases.d.ts.map +1 -1
- package/dist/agent-operations/__fixtures__/build-room-cases.js +27 -0
- package/dist/agent-operations/__fixtures__/cases.d.ts.map +1 -1
- package/dist/agent-operations/__fixtures__/cases.js +19 -11
- package/dist/agent-operations/__fixtures__/design-brief-cases.d.ts +25 -2
- package/dist/agent-operations/__fixtures__/design-brief-cases.d.ts.map +1 -1
- package/dist/agent-operations/__fixtures__/design-brief-cases.js +509 -66
- package/dist/agent-operations/__fixtures__/dressing-scenes.d.ts +30 -0
- package/dist/agent-operations/__fixtures__/dressing-scenes.d.ts.map +1 -0
- package/dist/agent-operations/__fixtures__/dressing-scenes.js +82 -0
- package/dist/agent-operations/__fixtures__/native-materials.d.ts +407 -9
- package/dist/agent-operations/__fixtures__/native-materials.d.ts.map +1 -1
- package/dist/agent-operations/__fixtures__/notation-cases.d.ts.map +1 -1
- package/dist/agent-operations/__fixtures__/notation-cases.js +14 -0
- package/dist/agent-operations/__fixtures__/roof-bearing-cases.d.ts +7253 -4053
- package/dist/agent-operations/__fixtures__/roof-bearing-cases.d.ts.map +1 -1
- package/dist/agent-operations/__fixtures__/room-cases.d.ts +1 -0
- package/dist/agent-operations/__fixtures__/room-cases.d.ts.map +1 -1
- package/dist/agent-operations/__fixtures__/room-cases.js +57 -1
- package/dist/agent-operations/__fixtures__/room-check-scenes.d.ts +51 -0
- package/dist/agent-operations/__fixtures__/room-check-scenes.d.ts.map +1 -0
- package/dist/agent-operations/__fixtures__/room-check-scenes.js +121 -0
- package/dist/agent-operations/__fixtures__/scene-check-cases.d.ts.map +1 -1
- package/dist/agent-operations/__fixtures__/scene-check-cases.js +152 -18
- package/dist/agent-operations/__fixtures__/search-assets-cases.d.ts.map +1 -1
- package/dist/agent-operations/__fixtures__/search-assets-cases.js +91 -0
- package/dist/agent-operations/__fixtures__/site-cases.d.ts +40 -1
- package/dist/agent-operations/__fixtures__/site-cases.d.ts.map +1 -1
- package/dist/agent-operations/__fixtures__/structure-cases.d.ts +3 -0
- package/dist/agent-operations/__fixtures__/structure-cases.d.ts.map +1 -1
- package/dist/agent-operations/__fixtures__/structure-cases.js +199 -18
- package/dist/agent-operations/__fixtures__/unit-cases.d.ts +6 -0
- package/dist/agent-operations/__fixtures__/unit-cases.d.ts.map +1 -0
- package/dist/agent-operations/__fixtures__/unit-cases.js +266 -0
- package/dist/agent-operations/__fixtures__/verify-scene-cases.d.ts +109 -73
- package/dist/agent-operations/__fixtures__/verify-scene-cases.d.ts.map +1 -1
- package/dist/agent-operations/add-column.d.ts.map +1 -1
- package/dist/agent-operations/add-column.js +32 -3
- package/dist/agent-operations/add-fence.d.ts.map +1 -1
- package/dist/agent-operations/add-fence.js +2 -1
- package/dist/agent-operations/add-level.d.ts.map +1 -1
- package/dist/agent-operations/add-level.js +4 -4
- package/dist/agent-operations/add-object.d.ts +32 -6
- package/dist/agent-operations/add-object.d.ts.map +1 -1
- package/dist/agent-operations/add-object.js +59 -12
- package/dist/agent-operations/add-wall.d.ts +3 -8
- package/dist/agent-operations/add-wall.d.ts.map +1 -1
- package/dist/agent-operations/add-wall.js +31 -8
- package/dist/agent-operations/apply-changes.d.ts.map +1 -1
- package/dist/agent-operations/apply-changes.js +2 -1
- package/dist/agent-operations/asset-catalog.d.ts +63 -0
- package/dist/agent-operations/asset-catalog.d.ts.map +1 -0
- package/dist/agent-operations/asset-catalog.js +182 -0
- package/dist/agent-operations/asset-views.d.ts +4 -2
- package/dist/agent-operations/asset-views.d.ts.map +1 -1
- package/dist/agent-operations/asset-views.js +1 -3
- package/dist/agent-operations/author-scene-checks.d.ts +38 -0
- package/dist/agent-operations/author-scene-checks.d.ts.map +1 -0
- package/dist/agent-operations/author-scene-checks.js +266 -0
- package/dist/agent-operations/author-scene.d.ts +54 -20
- package/dist/agent-operations/author-scene.d.ts.map +1 -1
- package/dist/agent-operations/author-scene.js +1164 -196
- package/dist/agent-operations/authored-scene-merge.d.ts.map +1 -1
- package/dist/agent-operations/authored-scene-merge.js +61 -3
- package/dist/agent-operations/batch.d.ts +1 -1
- package/dist/agent-operations/batch.d.ts.map +1 -1
- package/dist/agent-operations/batch.js +38 -39
- package/dist/agent-operations/ceiling-object-observations.d.ts.map +1 -1
- package/dist/agent-operations/ceiling-object-observations.js +5 -4
- package/dist/agent-operations/circulation-geometry.d.ts +14 -0
- package/dist/agent-operations/circulation-geometry.d.ts.map +1 -0
- package/dist/agent-operations/circulation-geometry.js +151 -0
- package/dist/agent-operations/circulation-graph.d.ts +72 -0
- package/dist/agent-operations/circulation-graph.d.ts.map +1 -0
- package/dist/agent-operations/circulation-graph.js +713 -0
- package/dist/agent-operations/circulation-non-spaces.d.ts +10 -0
- package/dist/agent-operations/circulation-non-spaces.d.ts.map +1 -0
- package/dist/agent-operations/circulation-non-spaces.js +88 -0
- package/dist/agent-operations/circulation-spaces.d.ts +5880 -0
- package/dist/agent-operations/circulation-spaces.d.ts.map +1 -0
- package/dist/agent-operations/circulation-spaces.js +368 -0
- package/dist/agent-operations/collections.d.ts.map +1 -1
- package/dist/agent-operations/collections.js +9 -7
- package/dist/agent-operations/corner-window.d.ts.map +1 -1
- package/dist/agent-operations/corner-window.js +2 -4
- package/dist/agent-operations/create-roof.d.ts.map +1 -1
- package/dist/agent-operations/create-roof.js +5 -7
- package/dist/agent-operations/create-room.d.ts +4 -1
- package/dist/agent-operations/create-room.d.ts.map +1 -1
- package/dist/agent-operations/create-room.js +7 -4
- package/dist/agent-operations/create-stair.js +2 -2
- package/dist/agent-operations/design-brief.d.ts +13 -7
- package/dist/agent-operations/design-brief.d.ts.map +1 -1
- package/dist/agent-operations/design-brief.js +172 -92
- package/dist/agent-operations/door-clearance.d.ts +68 -8
- package/dist/agent-operations/door-clearance.d.ts.map +1 -1
- package/dist/agent-operations/door-clearance.js +127 -20
- package/dist/agent-operations/dress-targets.d.ts +23 -0
- package/dist/agent-operations/dress-targets.d.ts.map +1 -0
- package/dist/agent-operations/dress-targets.js +34 -0
- package/dist/agent-operations/duplicate-node.d.ts +14 -0
- package/dist/agent-operations/duplicate-node.d.ts.map +1 -0
- package/dist/agent-operations/duplicate-node.js +173 -0
- package/dist/agent-operations/find-by-type.d.ts.map +1 -1
- package/dist/agent-operations/find-by-type.js +3 -0
- package/dist/agent-operations/furnish-room.d.ts +2 -0
- package/dist/agent-operations/furnish-room.d.ts.map +1 -1
- package/dist/agent-operations/furnish-room.js +15 -4
- package/dist/agent-operations/furniture-kind.d.ts +28 -1
- package/dist/agent-operations/furniture-kind.d.ts.map +1 -1
- package/dist/agent-operations/furniture-kind.js +105 -6
- package/dist/agent-operations/ground-reader.d.ts +10 -0
- package/dist/agent-operations/ground-reader.d.ts.map +1 -0
- package/dist/agent-operations/ground-reader.js +25 -0
- package/dist/agent-operations/index.d.ts +118 -12
- package/dist/agent-operations/index.d.ts.map +1 -1
- package/dist/agent-operations/index.js +26 -1
- package/dist/agent-operations/item-solids.d.ts +39 -0
- package/dist/agent-operations/item-solids.d.ts.map +1 -0
- package/dist/agent-operations/item-solids.js +128 -0
- package/dist/agent-operations/layout-clearance.d.ts +91 -11
- package/dist/agent-operations/layout-clearance.d.ts.map +1 -1
- package/dist/agent-operations/layout-clearance.js +280 -73
- package/dist/agent-operations/level-height-fill.d.ts.map +1 -1
- package/dist/agent-operations/level-height-fill.js +7 -1
- package/dist/agent-operations/level-reads.d.ts +5 -0
- package/dist/agent-operations/level-reads.d.ts.map +1 -1
- package/dist/agent-operations/level-reads.js +38 -2
- package/dist/agent-operations/list-levels.d.ts.map +1 -1
- package/dist/agent-operations/list-levels.js +2 -4
- package/dist/agent-operations/move-node.d.ts +12 -0
- package/dist/agent-operations/move-node.d.ts.map +1 -0
- package/dist/agent-operations/move-node.js +28 -0
- package/dist/agent-operations/move-plan.d.ts +28 -0
- package/dist/agent-operations/move-plan.d.ts.map +1 -0
- package/dist/agent-operations/move-plan.js +257 -0
- package/dist/agent-operations/node-patch.d.ts.map +1 -1
- package/dist/agent-operations/node-patch.js +15 -0
- package/dist/agent-operations/paint.d.ts +3 -1
- package/dist/agent-operations/paint.d.ts.map +1 -1
- package/dist/agent-operations/paint.js +14 -1
- package/dist/agent-operations/photo-elevation.d.ts.map +1 -1
- package/dist/agent-operations/photo-elevation.js +2 -1
- package/dist/agent-operations/place-in-room.d.ts.map +1 -1
- package/dist/agent-operations/place-in-room.js +1 -0
- package/dist/agent-operations/place-items.d.ts.map +1 -1
- package/dist/agent-operations/place-items.js +3 -4
- package/dist/agent-operations/plan-clearance.d.ts +28 -0
- package/dist/agent-operations/plan-clearance.d.ts.map +1 -0
- package/dist/agent-operations/plan-clearance.js +47 -0
- package/dist/agent-operations/plan-geometry.d.ts +2 -0
- package/dist/agent-operations/plan-geometry.d.ts.map +1 -1
- package/dist/agent-operations/plan-geometry.js +10 -0
- package/dist/agent-operations/project-files.d.ts +10 -0
- package/dist/agent-operations/project-files.d.ts.map +1 -1
- package/dist/agent-operations/reachability.d.ts +41 -0
- package/dist/agent-operations/reachability.d.ts.map +1 -0
- package/dist/agent-operations/reachability.js +199 -0
- package/dist/agent-operations/room-checks.d.ts +60 -0
- package/dist/agent-operations/room-checks.d.ts.map +1 -0
- package/dist/agent-operations/room-checks.js +226 -0
- package/dist/agent-operations/room-faces.d.ts +30 -0
- package/dist/agent-operations/room-faces.d.ts.map +1 -0
- package/dist/agent-operations/room-faces.js +31 -0
- package/dist/agent-operations/room-findings.d.ts +5 -2
- package/dist/agent-operations/room-findings.d.ts.map +1 -1
- package/dist/agent-operations/room-findings.js +30 -0
- package/dist/agent-operations/room-finishes.d.ts +87 -0
- package/dist/agent-operations/room-finishes.d.ts.map +1 -0
- package/dist/agent-operations/room-finishes.js +193 -0
- package/dist/agent-operations/room-floor-script.d.ts +3 -3
- package/dist/agent-operations/room-floor-script.js +3 -3
- package/dist/agent-operations/room-readings.d.ts +90 -0
- package/dist/agent-operations/room-readings.d.ts.map +1 -0
- package/dist/agent-operations/room-readings.js +369 -0
- package/dist/agent-operations/room-tile.d.ts +15 -0
- package/dist/agent-operations/room-tile.d.ts.map +1 -0
- package/dist/agent-operations/room-tile.js +30 -0
- package/dist/agent-operations/room-wet.d.ts +55 -0
- package/dist/agent-operations/room-wet.d.ts.map +1 -0
- package/dist/agent-operations/room-wet.js +203 -0
- package/dist/agent-operations/scene-check-policy.d.ts +5 -0
- package/dist/agent-operations/scene-check-policy.d.ts.map +1 -0
- package/dist/agent-operations/scene-check-policy.js +24 -0
- package/dist/agent-operations/scene-checkpoint.d.ts +10 -0
- package/dist/agent-operations/scene-checkpoint.d.ts.map +1 -1
- package/dist/agent-operations/scene-checkpoint.js +31 -0
- package/dist/agent-operations/scene-issue-groups.d.ts +17 -0
- package/dist/agent-operations/scene-issue-groups.d.ts.map +1 -0
- package/dist/agent-operations/scene-issue-groups.js +71 -0
- package/dist/agent-operations/scene-materials.d.ts +23 -0
- package/dist/agent-operations/scene-materials.d.ts.map +1 -1
- package/dist/agent-operations/scene-materials.js +41 -0
- package/dist/agent-operations/scene-queries.d.ts +1667 -866
- package/dist/agent-operations/scene-queries.d.ts.map +1 -1
- package/dist/agent-operations/scene-queries.js +3 -3
- package/dist/agent-operations/scene-review.d.ts.map +1 -1
- package/dist/agent-operations/scene-review.js +3 -2
- package/dist/agent-operations/scene-view.d.ts.map +1 -1
- package/dist/agent-operations/scene-view.js +91 -21
- package/dist/agent-operations/search-assets.d.ts +10 -6
- package/dist/agent-operations/search-assets.d.ts.map +1 -1
- package/dist/agent-operations/search-assets.js +37 -22
- package/dist/agent-operations/set-checkpoint.d.ts.map +1 -1
- package/dist/agent-operations/set-checkpoint.js +1 -0
- package/dist/agent-operations/set-ground-level.d.ts +1 -1
- package/dist/agent-operations/set-ground-level.d.ts.map +1 -1
- package/dist/agent-operations/set-ground-level.js +3 -14
- package/dist/agent-operations/site.js +3 -2
- package/dist/agent-operations/slab-surface-script.d.ts +25 -0
- package/dist/agent-operations/slab-surface-script.d.ts.map +1 -0
- package/dist/agent-operations/slab-surface-script.js +60 -0
- package/dist/agent-operations/stair-plan-footprint.d.ts +9 -0
- package/dist/agent-operations/stair-plan-footprint.d.ts.map +1 -0
- package/dist/agent-operations/stair-plan-footprint.js +50 -0
- package/dist/agent-operations/types.d.ts +10 -5
- package/dist/agent-operations/types.d.ts.map +1 -1
- package/dist/agent-operations/units.d.ts +26 -0
- package/dist/agent-operations/units.d.ts.map +1 -0
- package/dist/agent-operations/units.js +110 -0
- package/dist/agent-operations/unreachable-rooms-check.d.ts +17 -0
- package/dist/agent-operations/unreachable-rooms-check.d.ts.map +1 -0
- package/dist/agent-operations/unreachable-rooms-check.js +35 -0
- package/dist/agent-operations/usage-checks.d.ts +2 -0
- package/dist/agent-operations/usage-checks.d.ts.map +1 -0
- package/dist/agent-operations/usage-checks.js +12 -0
- package/dist/agent-operations/verify-scene.d.ts +8 -11
- package/dist/agent-operations/verify-scene.d.ts.map +1 -1
- package/dist/agent-operations/verify-scene.js +55 -11
- package/dist/agent-operations/wall-face-defaults.d.ts +44 -0
- package/dist/agent-operations/wall-face-defaults.d.ts.map +1 -0
- package/dist/agent-operations/wall-face-defaults.js +229 -0
- package/dist/agent-operations/wall-joins.d.ts +119 -0
- package/dist/agent-operations/wall-joins.d.ts.map +1 -0
- package/dist/agent-operations/wall-joins.js +308 -0
- package/dist/agent-operations/wall-object-observations.d.ts.map +1 -1
- package/dist/agent-operations/wall-object-observations.js +4 -6
- package/dist/agent-operations/wall-skirting.d.ts.map +1 -1
- package/dist/agent-operations/wall-skirting.js +2 -0
- package/dist/agent-operations/wall-type.d.ts +49 -0
- package/dist/agent-operations/wall-type.d.ts.map +1 -0
- package/dist/agent-operations/wall-type.js +31 -0
- package/dist/agent-operations/zone-coverage.d.ts +85 -0
- package/dist/agent-operations/zone-coverage.d.ts.map +1 -0
- package/dist/agent-operations/zone-coverage.js +208 -0
- package/dist/agent-tools/add-object.d.ts +31 -0
- package/dist/agent-tools/add-object.d.ts.map +1 -1
- package/dist/agent-tools/add-object.js +44 -7
- package/dist/agent-tools/assets.d.ts +4 -0
- package/dist/agent-tools/assets.d.ts.map +1 -1
- package/dist/agent-tools/assets.js +11 -1
- package/dist/agent-tools/author-scene.d.ts +810 -15
- package/dist/agent-tools/author-scene.d.ts.map +1 -1
- package/dist/agent-tools/author-scene.js +275 -34
- package/dist/agent-tools/batch.d.ts +1 -1
- package/dist/agent-tools/batch.d.ts.map +1 -1
- package/dist/agent-tools/batch.js +5 -1
- package/dist/agent-tools/checkpoints.js +1 -1
- package/dist/agent-tools/columns.d.ts +14 -0
- package/dist/agent-tools/columns.d.ts.map +1 -1
- package/dist/agent-tools/columns.js +14 -2
- package/dist/agent-tools/contract.d.ts +10 -0
- package/dist/agent-tools/contract.d.ts.map +1 -1
- package/dist/agent-tools/contract.js +5 -1
- package/dist/agent-tools/corner-window.d.ts +1 -0
- package/dist/agent-tools/corner-window.d.ts.map +1 -1
- package/dist/agent-tools/corner-window.js +1 -1
- package/dist/agent-tools/create-room.d.ts +85 -0
- package/dist/agent-tools/create-room.d.ts.map +1 -1
- package/dist/agent-tools/create-room.js +8 -1
- package/dist/agent-tools/design-brief.d.ts +513 -7
- package/dist/agent-tools/design-brief.d.ts.map +1 -1
- package/dist/agent-tools/design-brief.js +192 -14
- package/dist/agent-tools/designs.js +1 -1
- package/dist/agent-tools/find-by-type.js +1 -1
- package/dist/agent-tools/index.d.ts +658 -10
- package/dist/agent-tools/index.d.ts.map +1 -1
- package/dist/agent-tools/index.js +9 -1
- package/dist/agent-tools/levels.js +4 -4
- package/dist/agent-tools/move-duplicate.d.ts +65 -0
- package/dist/agent-tools/move-duplicate.d.ts.map +1 -0
- package/dist/agent-tools/move-duplicate.js +68 -0
- package/dist/agent-tools/paint.d.ts +6 -0
- package/dist/agent-tools/paint.d.ts.map +1 -1
- package/dist/agent-tools/paint.js +7 -3
- package/dist/agent-tools/photo-elevation.js +1 -1
- package/dist/agent-tools/project-files.d.ts +2 -2
- package/dist/agent-tools/project-files.d.ts.map +1 -1
- package/dist/agent-tools/project-files.js +1 -1
- package/dist/agent-tools/refusal.d.ts +9 -1
- package/dist/agent-tools/refusal.d.ts.map +1 -1
- package/dist/agent-tools/refusal.js +5 -1
- package/dist/agent-tools/roofs.js +1 -1
- package/dist/agent-tools/room-structure.d.ts +60 -0
- package/dist/agent-tools/room-structure.d.ts.map +1 -1
- package/dist/agent-tools/room-structure.js +20 -1
- package/dist/agent-tools/search-materials.d.ts +1 -0
- package/dist/agent-tools/search-materials.d.ts.map +1 -1
- package/dist/agent-tools/site.js +1 -1
- package/dist/agent-tools/stairs.js +1 -1
- package/dist/agent-tools/units.d.ts +84 -0
- package/dist/agent-tools/units.d.ts.map +1 -0
- package/dist/agent-tools/units.js +54 -0
- package/dist/agent-tools/verify-scene-usage.d.ts +44 -0
- package/dist/agent-tools/verify-scene-usage.d.ts.map +1 -0
- package/dist/agent-tools/verify-scene-usage.js +146 -0
- package/dist/agent-tools/verify-scene.d.ts +12 -1
- package/dist/agent-tools/verify-scene.d.ts.map +1 -1
- package/dist/agent-tools/verify-scene.js +183 -3
- package/dist/agent-tools/view-scene.d.ts +3 -0
- package/dist/agent-tools/view-scene.d.ts.map +1 -1
- package/dist/agent-tools/view-scene.js +4 -1
- package/dist/agent-tools/wall-openings.d.ts +121 -2
- package/dist/agent-tools/wall-openings.d.ts.map +1 -1
- package/dist/agent-tools/wall-openings.js +123 -18
- package/dist/agent-tools/walls.d.ts +30 -0
- package/dist/agent-tools/walls.d.ts.map +1 -1
- package/dist/agent-tools/walls.js +54 -2
- package/dist/building/__fixtures__/wall-opening-cases.d.ts +340 -195
- package/dist/building/__fixtures__/wall-opening-cases.d.ts.map +1 -1
- package/dist/building/__fixtures__/wall-opening-cases.js +13 -0
- package/dist/building/code-profile.d.ts +231 -0
- package/dist/building/code-profile.d.ts.map +1 -0
- package/dist/building/code-profile.js +208 -0
- package/dist/building/corner-window.d.ts +2 -2
- package/dist/building/corner-window.d.ts.map +1 -1
- package/dist/building/corner-window.js +11 -2
- package/dist/building/door-types.d.ts +1 -0
- package/dist/building/door-types.d.ts.map +1 -1
- package/dist/building/door-types.js +2 -0
- package/dist/building/floor-item-fit.d.ts.map +1 -1
- package/dist/building/floor-item-fit.js +2 -4
- package/dist/building/ground-level.d.ts +1 -3
- package/dist/building/ground-level.d.ts.map +1 -1
- package/dist/building/ground-level.js +3 -5
- package/dist/building/index.d.ts +2 -0
- package/dist/building/index.d.ts.map +1 -1
- package/dist/building/index.js +2 -0
- package/dist/building/level-duplication.d.ts +5951 -4351
- package/dist/building/level-duplication.d.ts.map +1 -1
- package/dist/building/level-insertion.d.ts +1 -1
- package/dist/building/level-wall-copy.d.ts +24 -0
- package/dist/building/level-wall-copy.d.ts.map +1 -0
- package/dist/building/level-wall-copy.js +53 -0
- package/dist/building/merge-windows.d.ts.map +1 -1
- package/dist/building/merge-windows.js +1 -0
- package/dist/building/opening-style-presets.d.ts +2 -0
- package/dist/building/opening-style-presets.d.ts.map +1 -1
- package/dist/building/opening-style-presets.js +26 -5
- package/dist/building/room-use.d.ts +26 -0
- package/dist/building/room-use.d.ts.map +1 -0
- package/dist/building/room-use.js +102 -0
- package/dist/building/wall-openings.d.ts +115 -7
- package/dist/building/wall-openings.d.ts.map +1 -1
- package/dist/building/wall-openings.js +121 -29
- package/dist/building/window-types.d.ts +1 -0
- package/dist/building/window-types.d.ts.map +1 -1
- package/dist/building/window-types.js +3 -0
- package/dist/coherence/__fixtures__/enclosure-scenes.d.ts +84 -0
- package/dist/coherence/__fixtures__/enclosure-scenes.d.ts.map +1 -0
- package/dist/coherence/__fixtures__/enclosure-scenes.js +44 -0
- package/dist/commands/structure/attached-walls.d.ts +16 -0
- package/dist/commands/structure/attached-walls.d.ts.map +1 -0
- package/dist/commands/structure/attached-walls.js +53 -0
- package/dist/commands/structure/index.d.ts +3 -0
- package/dist/commands/structure/index.d.ts.map +1 -1
- package/dist/commands/structure/index.js +3 -0
- package/dist/commands/structure/move-separators.d.ts +62 -0
- package/dist/commands/structure/move-separators.d.ts.map +1 -0
- package/dist/commands/structure/move-separators.js +346 -0
- package/dist/commands/structure/set-floor-foundation.d.ts +5 -0
- package/dist/commands/structure/set-floor-foundation.d.ts.map +1 -1
- package/dist/commands/structure/set-wall-geometry.d.ts.map +1 -1
- package/dist/commands/structure/set-wall-geometry.js +44 -11
- package/dist/commands/structure/set-zone-intent.d.ts +26 -0
- package/dist/commands/structure/set-zone-intent.d.ts.map +1 -1
- package/dist/commands/structure/set-zone-intent.js +107 -2
- package/dist/commands/structure/shared.d.ts +888 -88
- package/dist/commands/structure/shared.d.ts.map +1 -1
- package/dist/commands/structure/wall-overlap.d.ts +45 -0
- package/dist/commands/structure/wall-overlap.d.ts.map +1 -0
- package/dist/commands/structure/wall-overlap.js +289 -0
- package/dist/commands/structure/zone-wall-merge.d.ts +3326 -2370
- package/dist/commands/structure/zone-wall-merge.d.ts.map +1 -1
- package/dist/contracts/reference-discovery.d.ts +2 -2
- package/dist/contracts/reference-discovery.d.ts.map +1 -1
- package/dist/contracts/reference-discovery.js +5 -3
- package/dist/contracts/reference-inventory.d.ts.map +1 -1
- package/dist/contracts/reference-inventory.js +75 -24
- package/dist/events/bus.d.ts +15 -2
- package/dist/events/bus.d.ts.map +1 -1
- package/dist/hooks/spatial-grid/built-in-floor-placed.d.ts +40 -0
- package/dist/hooks/spatial-grid/built-in-floor-placed.d.ts.map +1 -0
- package/dist/hooks/spatial-grid/built-in-floor-placed.js +220 -0
- package/dist/hooks/spatial-grid/floor-placed-elevation.d.ts.map +1 -1
- package/dist/hooks/spatial-grid/floor-placed-elevation.js +13 -7
- package/dist/hooks/spatial-grid/spatial-grid-manager.d.ts +56 -1
- package/dist/hooks/spatial-grid/spatial-grid-manager.d.ts.map +1 -1
- package/dist/hooks/spatial-grid/spatial-grid-manager.js +177 -27
- package/dist/hooks/spatial-grid/spatial-grid-sync.d.ts +1631 -831
- package/dist/hooks/spatial-grid/spatial-grid-sync.d.ts.map +1 -1
- package/dist/hooks/spatial-grid/spatial-grid-sync.js +24 -1
- package/dist/hooks/spatial-grid/support-host-patch.js +10 -10
- package/dist/i18n/format.d.ts +41 -0
- package/dist/i18n/format.d.ts.map +1 -0
- package/dist/i18n/format.js +124 -0
- package/dist/i18n/index.d.ts +5 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +3 -0
- package/dist/i18n/registry.d.ts +78 -0
- package/dist/i18n/registry.d.ts.map +1 -0
- package/dist/i18n/registry.js +252 -0
- package/dist/i18n/use-translate.d.ts +16 -0
- package/dist/i18n/use-translate.d.ts.map +1 -0
- package/dist/i18n/use-translate.js +23 -0
- package/dist/index.d.ts +32 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -15
- package/dist/lib/__fixtures__/mezzanine.d.ts +6840 -4169
- package/dist/lib/__fixtures__/mezzanine.d.ts.map +1 -1
- package/dist/lib/absorb-wall-separators.d.ts +2128 -1328
- package/dist/lib/absorb-wall-separators.d.ts.map +1 -1
- package/dist/lib/beam.d.ts +137 -0
- package/dist/lib/beam.d.ts.map +1 -0
- package/dist/lib/beam.js +297 -0
- package/dist/lib/below-grade-footprints.d.ts +13 -5
- package/dist/lib/below-grade-footprints.d.ts.map +1 -1
- package/dist/lib/below-grade-footprints.js +53 -10
- package/dist/lib/build-up.d.ts +89 -0
- package/dist/lib/build-up.d.ts.map +1 -0
- package/dist/lib/build-up.js +216 -0
- package/dist/lib/corner-pair.d.ts +205 -4
- package/dist/lib/corner-pair.d.ts.map +1 -1
- package/dist/lib/deck-boards.d.ts +80 -0
- package/dist/lib/deck-boards.d.ts.map +1 -0
- package/dist/lib/deck-boards.js +184 -0
- package/dist/lib/deck-framing.d.ts +150 -0
- package/dist/lib/deck-framing.d.ts.map +1 -0
- package/dist/lib/deck-framing.js +515 -0
- package/dist/lib/deepest-drawn.d.ts +3 -6
- package/dist/lib/deepest-drawn.d.ts.map +1 -1
- package/dist/lib/deepest-drawn.js +4 -8
- package/dist/lib/door-opening.d.ts +19 -0
- package/dist/lib/door-opening.d.ts.map +1 -0
- package/dist/lib/door-opening.js +27 -0
- package/dist/lib/door-operation.d.ts +2 -0
- package/dist/lib/door-operation.d.ts.map +1 -1
- package/dist/lib/door-operation.js +4 -0
- package/dist/lib/exterior-wall-loops.d.ts.map +1 -1
- package/dist/lib/exterior-wall-loops.js +2 -1
- package/dist/lib/finish-script.d.ts +5 -5
- package/dist/lib/finish-script.d.ts.map +1 -1
- package/dist/lib/finish-script.js +12 -5
- package/dist/lib/floor-footprint-name.d.ts +17 -0
- package/dist/lib/floor-footprint-name.d.ts.map +1 -1
- package/dist/lib/floor-footprint-name.js +17 -4
- package/dist/lib/floor-intent-changes.d.ts.map +1 -1
- package/dist/lib/floor-intent-changes.js +60 -35
- package/dist/lib/floor-opening-footprints.d.ts +1 -1
- package/dist/lib/floor-opening-footprints.d.ts.map +1 -1
- package/dist/lib/floor-opening-footprints.js +10 -4
- package/dist/lib/floor-plate-paint.d.ts +2 -0
- package/dist/lib/floor-plate-paint.d.ts.map +1 -1
- package/dist/lib/floor-plate-paint.js +12 -0
- package/dist/lib/floor-plates.d.ts +250 -0
- package/dist/lib/floor-plates.d.ts.map +1 -1
- package/dist/lib/floor-plates.js +43 -4
- package/dist/lib/floor-script.d.ts +35 -6
- package/dist/lib/floor-script.d.ts.map +1 -1
- package/dist/lib/floor-script.js +96 -16
- package/dist/lib/foundation-construction.d.ts +4 -13
- package/dist/lib/foundation-construction.d.ts.map +1 -1
- package/dist/lib/foundation-construction.js +4 -14
- package/dist/lib/foundation-standard.d.ts +2 -3
- package/dist/lib/foundation-standard.d.ts.map +1 -1
- package/dist/lib/foundation-standard.js +2 -3
- package/dist/lib/foundation-wall.d.ts +1 -2
- package/dist/lib/foundation-wall.d.ts.map +1 -1
- package/dist/lib/foundation-wall.js +1 -2
- package/dist/lib/framing-post.d.ts +91 -0
- package/dist/lib/framing-post.d.ts.map +1 -0
- package/dist/lib/framing-post.js +174 -0
- package/dist/lib/geometry-script-node.d.ts +11 -0
- package/dist/lib/geometry-script-node.d.ts.map +1 -1
- package/dist/lib/geometry-script-node.js +35 -0
- package/dist/lib/grade-standing.d.ts +16 -2
- package/dist/lib/grade-standing.d.ts.map +1 -1
- package/dist/lib/grade-standing.js +129 -9
- package/dist/lib/ground-seat.d.ts +2 -22
- package/dist/lib/ground-seat.d.ts.map +1 -1
- package/dist/lib/ground-seat.js +2 -17
- package/dist/lib/ground-window.d.ts +2 -1
- package/dist/lib/ground-window.d.ts.map +1 -1
- package/dist/lib/ground-window.js +5 -2
- package/dist/lib/level-footprints.d.ts +2 -0
- package/dist/lib/level-footprints.d.ts.map +1 -1
- package/dist/lib/level-footprints.js +7 -0
- package/dist/lib/opening-casing.d.ts +67 -0
- package/dist/lib/opening-casing.d.ts.map +1 -0
- package/dist/lib/opening-casing.js +131 -0
- package/dist/lib/opening-exterior-face.d.ts +6 -0
- package/dist/lib/opening-exterior-face.d.ts.map +1 -0
- package/dist/lib/opening-exterior-face.js +15 -0
- package/dist/lib/opening-floor-datum.d.ts +11 -5
- package/dist/lib/opening-floor-datum.d.ts.map +1 -1
- package/dist/lib/opening-floor-datum.js +38 -6
- package/dist/lib/opening-frame-depth.d.ts +18 -0
- package/dist/lib/opening-frame-depth.d.ts.map +1 -0
- package/dist/lib/opening-frame-depth.js +22 -0
- package/dist/lib/outdoor-room.d.ts +32 -0
- package/dist/lib/outdoor-room.d.ts.map +1 -0
- package/dist/lib/outdoor-room.js +66 -0
- package/dist/lib/plate-surface.d.ts +8 -0
- package/dist/lib/plate-surface.d.ts.map +1 -1
- package/dist/lib/plate-surface.js +53 -3
- package/dist/lib/porch-framing-sync.d.ts +46 -0
- package/dist/lib/porch-framing-sync.d.ts.map +1 -0
- package/dist/lib/porch-framing-sync.js +206 -0
- package/dist/lib/porch-framing.d.ts +44 -0
- package/dist/lib/porch-framing.d.ts.map +1 -0
- package/dist/lib/porch-framing.js +159 -0
- package/dist/lib/railing-rooms.d.ts +13 -0
- package/dist/lib/railing-rooms.d.ts.map +1 -0
- package/dist/lib/railing-rooms.js +37 -0
- package/dist/lib/roof-eave.d.ts +135 -0
- package/dist/lib/roof-eave.d.ts.map +1 -0
- package/dist/lib/roof-eave.js +186 -0
- package/dist/lib/room-floor-plate.d.ts +3 -1
- package/dist/lib/room-floor-plate.d.ts.map +1 -1
- package/dist/lib/room-floor-plate.js +7 -0
- package/dist/lib/space-detection.d.ts +13 -0
- package/dist/lib/space-detection.d.ts.map +1 -1
- package/dist/lib/space-detection.js +112 -24
- package/dist/lib/structure-kernel.d.ts +22 -9
- package/dist/lib/structure-kernel.d.ts.map +1 -1
- package/dist/lib/structure-kernel.js +146 -28
- package/dist/lib/structure-reconcile.d.ts +1 -1
- package/dist/lib/structure-reconcile.d.ts.map +1 -1
- package/dist/lib/structure-reconcile.js +7 -4
- package/dist/lib/surface-intent.d.ts +10 -0
- package/dist/lib/surface-intent.d.ts.map +1 -0
- package/dist/lib/surface-intent.js +18 -0
- package/dist/lib/terrain-source.d.ts.map +1 -1
- package/dist/lib/terrain-source.js +2 -1
- package/dist/lib/wall-face-script.d.ts.map +1 -1
- package/dist/lib/wall-face-script.js +5 -2
- package/dist/material-kinds.d.ts +1 -1
- package/dist/material-kinds.d.ts.map +1 -1
- package/dist/material-kinds.js +1 -0
- package/dist/material-library.d.ts +15 -0
- package/dist/material-library.d.ts.map +1 -1
- package/dist/material-library.js +458 -59
- package/dist/node-slots/door.d.ts +3 -4
- package/dist/node-slots/door.d.ts.map +1 -1
- package/dist/node-slots/door.js +4 -3
- package/dist/node-slots/wall.d.ts.map +1 -1
- package/dist/node-slots/wall.js +21 -3
- package/dist/node-slots/window.d.ts +2 -2
- package/dist/node-slots/window.d.ts.map +1 -1
- package/dist/node-slots/window.js +6 -1
- package/dist/procedural-items/design.d.ts +8 -0
- package/dist/procedural-items/design.d.ts.map +1 -1
- package/dist/procedural-items/design.js +169 -21
- package/dist/procedural-items/motion-controller.d.ts +2 -0
- package/dist/procedural-items/motion-controller.d.ts.map +1 -1
- package/dist/procedural-items/motion-controller.js +2 -1
- package/dist/registry/index.d.ts +2 -2
- package/dist/registry/index.d.ts.map +1 -1
- package/dist/registry/index.js +1 -1
- package/dist/registry/mechanism.d.ts +4 -1
- package/dist/registry/mechanism.d.ts.map +1 -1
- package/dist/registry/mechanism.js +10 -0
- package/dist/registry/types.d.ts +65 -23
- package/dist/registry/types.d.ts.map +1 -1
- package/dist/runtime/__fixtures__/live-scene.d.ts +14 -0
- package/dist/runtime/__fixtures__/live-scene.d.ts.map +1 -0
- package/dist/runtime/__fixtures__/live-scene.js +64 -0
- package/dist/runtime/apply.d.ts +42 -0
- package/dist/runtime/apply.d.ts.map +1 -0
- package/dist/runtime/apply.js +274 -0
- package/dist/runtime/dependencies.d.ts +97 -0
- package/dist/runtime/dependencies.d.ts.map +1 -0
- package/dist/runtime/dependencies.js +42 -0
- package/dist/runtime/ids.d.ts +11 -0
- package/dist/runtime/ids.d.ts.map +1 -0
- package/dist/runtime/ids.js +80 -0
- package/dist/runtime/index.d.ts +14 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +11 -0
- package/dist/runtime/node-queries.d.ts +16 -0
- package/dist/runtime/node-queries.d.ts.map +1 -0
- package/dist/runtime/node-queries.js +30 -0
- package/dist/runtime/patch.d.ts +26 -0
- package/dist/runtime/patch.d.ts.map +1 -0
- package/dist/runtime/patch.js +165 -0
- package/dist/runtime/reader.d.ts +104 -0
- package/dist/runtime/reader.d.ts.map +1 -0
- package/dist/runtime/reader.js +455 -0
- package/dist/runtime/scene-runtime.d.ts +112 -0
- package/dist/runtime/scene-runtime.d.ts.map +1 -0
- package/dist/runtime/scene-runtime.js +302 -0
- package/dist/schema/__fixtures__/node-fixtures.d.ts.map +1 -1
- package/dist/schema/__fixtures__/node-fixtures.js +1 -0
- package/dist/schema/assembly.d.ts +3 -0
- package/dist/schema/assembly.d.ts.map +1 -1
- package/dist/schema/assembly.js +13 -0
- package/dist/schema/asset-url.d.ts +37 -2
- package/dist/schema/asset-url.d.ts.map +1 -1
- package/dist/schema/asset-url.js +80 -11
- package/dist/schema/base.d.ts +8 -0
- package/dist/schema/base.d.ts.map +1 -1
- package/dist/schema/base.js +19 -1
- package/dist/schema/build-up.d.ts +247 -0
- package/dist/schema/build-up.d.ts.map +1 -0
- package/dist/schema/build-up.js +83 -0
- package/dist/schema/geometry-source.d.ts +80 -0
- package/dist/schema/geometry-source.d.ts.map +1 -1
- package/dist/schema/geometry-source.js +38 -0
- package/dist/schema/index.d.ts +12 -7
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +12 -6
- package/dist/schema/material.d.ts +5 -0
- package/dist/schema/material.d.ts.map +1 -1
- package/dist/schema/material.js +6 -0
- package/dist/schema/nodes/beam.d.ts +264 -0
- package/dist/schema/nodes/beam.d.ts.map +1 -0
- package/dist/schema/nodes/beam.js +139 -0
- package/dist/schema/nodes/box-vent.d.ts +5 -0
- package/dist/schema/nodes/box-vent.d.ts.map +1 -1
- package/dist/schema/nodes/cabinet.d.ts +10 -0
- package/dist/schema/nodes/cabinet.d.ts.map +1 -1
- package/dist/schema/nodes/ceiling.d.ts +48 -0
- package/dist/schema/nodes/ceiling.d.ts.map +1 -1
- package/dist/schema/nodes/ceiling.js +5 -0
- package/dist/schema/nodes/chimney.d.ts +10 -0
- package/dist/schema/nodes/chimney.d.ts.map +1 -1
- package/dist/schema/nodes/column.d.ts +42 -0
- package/dist/schema/nodes/column.d.ts.map +1 -1
- package/dist/schema/nodes/column.js +11 -1
- package/dist/schema/nodes/cupola.d.ts +5 -0
- package/dist/schema/nodes/cupola.d.ts.map +1 -1
- package/dist/schema/nodes/door.d.ts +54 -3
- package/dist/schema/nodes/door.d.ts.map +1 -1
- package/dist/schema/nodes/door.js +41 -7
- package/dist/schema/nodes/dormer.d.ts +20 -0
- package/dist/schema/nodes/dormer.d.ts.map +1 -1
- package/dist/schema/nodes/downspout.d.ts +5 -0
- package/dist/schema/nodes/downspout.d.ts.map +1 -1
- package/dist/schema/nodes/elevator.d.ts +5 -0
- package/dist/schema/nodes/elevator.d.ts.map +1 -1
- package/dist/schema/nodes/eyebrow-vent.d.ts +5 -0
- package/dist/schema/nodes/eyebrow-vent.d.ts.map +1 -1
- package/dist/schema/nodes/fence.d.ts +5 -0
- package/dist/schema/nodes/fence.d.ts.map +1 -1
- package/dist/schema/nodes/guide.d.ts +14 -0
- package/dist/schema/nodes/guide.d.ts.map +1 -1
- package/dist/schema/nodes/guide.js +2 -0
- package/dist/schema/nodes/gutter.d.ts +5 -0
- package/dist/schema/nodes/gutter.d.ts.map +1 -1
- package/dist/schema/nodes/item.d.ts +71 -0
- package/dist/schema/nodes/item.d.ts.map +1 -1
- package/dist/schema/nodes/item.js +5 -1
- package/dist/schema/nodes/level.d.ts +1 -1
- package/dist/schema/nodes/level.d.ts.map +1 -1
- package/dist/schema/nodes/opening-types.d.ts +13 -0
- package/dist/schema/nodes/opening-types.d.ts.map +1 -1
- package/dist/schema/nodes/opening-types.js +8 -1
- package/dist/schema/nodes/railing-wall.d.ts +112 -0
- package/dist/schema/nodes/railing-wall.d.ts.map +1 -0
- package/dist/schema/nodes/railing-wall.js +160 -0
- package/dist/schema/nodes/ridge-vent.d.ts +5 -0
- package/dist/schema/nodes/ridge-vent.d.ts.map +1 -1
- package/dist/schema/nodes/roof-segment.d.ts +224 -1
- package/dist/schema/nodes/roof-segment.d.ts.map +1 -1
- package/dist/schema/nodes/roof-segment.js +57 -10
- package/dist/schema/nodes/roof-types.d.ts +11 -0
- package/dist/schema/nodes/roof-types.d.ts.map +1 -1
- package/dist/schema/nodes/roof-types.js +6 -0
- package/dist/schema/nodes/roof.d.ts +60 -0
- package/dist/schema/nodes/roof.d.ts.map +1 -1
- package/dist/schema/nodes/roof.js +4 -0
- package/dist/schema/nodes/shelf.d.ts +5 -0
- package/dist/schema/nodes/shelf.d.ts.map +1 -1
- package/dist/schema/nodes/site.d.ts +80 -0
- package/dist/schema/nodes/site.d.ts.map +1 -1
- package/dist/schema/nodes/site.js +7 -0
- package/dist/schema/nodes/skylight.d.ts +10 -0
- package/dist/schema/nodes/skylight.d.ts.map +1 -1
- package/dist/schema/nodes/slab.d.ts +137 -0
- package/dist/schema/nodes/slab.d.ts.map +1 -1
- package/dist/schema/nodes/slab.js +3 -0
- package/dist/schema/nodes/solar-panel.d.ts +10 -0
- package/dist/schema/nodes/solar-panel.d.ts.map +1 -1
- package/dist/schema/nodes/stair-segment.d.ts +5 -0
- package/dist/schema/nodes/stair-segment.d.ts.map +1 -1
- package/dist/schema/nodes/stair-structure.d.ts +69 -0
- package/dist/schema/nodes/stair-structure.d.ts.map +1 -0
- package/dist/schema/nodes/stair-structure.js +39 -0
- package/dist/schema/nodes/stair.d.ts +46 -0
- package/dist/schema/nodes/stair.d.ts.map +1 -1
- package/dist/schema/nodes/stair.js +3 -0
- package/dist/schema/nodes/turbine-vent.d.ts +5 -0
- package/dist/schema/nodes/turbine-vent.d.ts.map +1 -1
- package/dist/schema/nodes/wall.d.ts +135 -2
- package/dist/schema/nodes/wall.d.ts.map +1 -1
- package/dist/schema/nodes/wall.js +42 -6
- package/dist/schema/nodes/window.d.ts +66 -1
- package/dist/schema/nodes/window.d.ts.map +1 -1
- package/dist/schema/nodes/window.js +50 -5
- package/dist/schema/nodes/zone.d.ts +68 -0
- package/dist/schema/nodes/zone.d.ts.map +1 -1
- package/dist/schema/nodes/zone.js +32 -0
- package/dist/schema/scene-material.d.ts +5 -0
- package/dist/schema/scene-material.d.ts.map +1 -1
- package/dist/schema/types.d.ts +1079 -4
- package/dist/schema/types.d.ts.map +1 -1
- package/dist/schema/types.js +2 -0
- package/dist/schema/wall-type.d.ts +95 -0
- package/dist/schema/wall-type.d.ts.map +1 -0
- package/dist/schema/wall-type.js +32 -0
- package/dist/services/roof-bearing.d.ts.map +1 -1
- package/dist/services/roof-bearing.js +6 -3
- package/dist/services/roof-level.d.ts.map +1 -1
- package/dist/services/roof-level.js +4 -3
- package/dist/services/roof-move.d.ts.map +1 -1
- package/dist/services/roof-move.js +13 -7
- package/dist/services/storey.d.ts.map +1 -1
- package/dist/services/storey.js +13 -8
- package/dist/spatial/usage-field/beds.d.ts +51 -0
- package/dist/spatial/usage-field/beds.d.ts.map +1 -0
- package/dist/spatial/usage-field/beds.js +346 -0
- package/dist/spatial/usage-field/blocked.d.ts +28 -0
- package/dist/spatial/usage-field/blocked.d.ts.map +1 -0
- package/dist/spatial/usage-field/blocked.js +185 -0
- package/dist/spatial/usage-field/boxes.d.ts +17 -0
- package/dist/spatial/usage-field/boxes.d.ts.map +1 -0
- package/dist/spatial/usage-field/boxes.js +82 -0
- package/dist/spatial/usage-field/catalogue-shapes.d.ts +3 -0
- package/dist/spatial/usage-field/catalogue-shapes.d.ts.map +1 -0
- package/dist/spatial/usage-field/catalogue-shapes.js +257 -0
- package/dist/spatial/usage-field/catalogue.d.ts +6 -0
- package/dist/spatial/usage-field/catalogue.d.ts.map +1 -0
- package/dist/spatial/usage-field/catalogue.js +11 -0
- package/dist/spatial/usage-field/clash.d.ts +40 -0
- package/dist/spatial/usage-field/clash.d.ts.map +1 -0
- package/dist/spatial/usage-field/clash.js +187 -0
- package/dist/spatial/usage-field/door-stairs.d.ts +18 -0
- package/dist/spatial/usage-field/door-stairs.d.ts.map +1 -0
- package/dist/spatial/usage-field/door-stairs.js +129 -0
- package/dist/spatial/usage-field/entry-way.d.ts +14 -0
- package/dist/spatial/usage-field/entry-way.d.ts.map +1 -0
- package/dist/spatial/usage-field/entry-way.js +219 -0
- package/dist/spatial/usage-field/fences.d.ts +18 -0
- package/dist/spatial/usage-field/fences.d.ts.map +1 -0
- package/dist/spatial/usage-field/fences.js +253 -0
- package/dist/spatial/usage-field/field.d.ts +44 -0
- package/dist/spatial/usage-field/field.d.ts.map +1 -0
- package/dist/spatial/usage-field/field.js +145 -0
- package/dist/spatial/usage-field/findings.d.ts +76 -0
- package/dist/spatial/usage-field/findings.d.ts.map +1 -0
- package/dist/spatial/usage-field/findings.js +252 -0
- package/dist/spatial/usage-field/fixtures.d.ts +18 -0
- package/dist/spatial/usage-field/fixtures.d.ts.map +1 -0
- package/dist/spatial/usage-field/fixtures.js +160 -0
- package/dist/spatial/usage-field/flag.d.ts +10 -0
- package/dist/spatial/usage-field/flag.d.ts.map +1 -0
- package/dist/spatial/usage-field/flag.js +12 -0
- package/dist/spatial/usage-field/floors.d.ts +13 -0
- package/dist/spatial/usage-field/floors.d.ts.map +1 -0
- package/dist/spatial/usage-field/floors.js +36 -0
- package/dist/spatial/usage-field/index.d.ts +7 -0
- package/dist/spatial/usage-field/index.d.ts.map +1 -0
- package/dist/spatial/usage-field/index.js +5 -0
- package/dist/spatial/usage-field/items.d.ts +38 -0
- package/dist/spatial/usage-field/items.d.ts.map +1 -0
- package/dist/spatial/usage-field/items.js +261 -0
- package/dist/spatial/usage-field/labels.d.ts +8 -0
- package/dist/spatial/usage-field/labels.d.ts.map +1 -0
- package/dist/spatial/usage-field/labels.js +14 -0
- package/dist/spatial/usage-field/level-field.d.ts +47 -0
- package/dist/spatial/usage-field/level-field.d.ts.map +1 -0
- package/dist/spatial/usage-field/level-field.js +96 -0
- package/dist/spatial/usage-field/measure.d.ts +324 -0
- package/dist/spatial/usage-field/measure.d.ts.map +1 -0
- package/dist/spatial/usage-field/measure.js +458 -0
- package/dist/spatial/usage-field/obstacles.d.ts +63 -0
- package/dist/spatial/usage-field/obstacles.d.ts.map +1 -0
- package/dist/spatial/usage-field/obstacles.js +215 -0
- package/dist/spatial/usage-field/openings.d.ts +12 -0
- package/dist/spatial/usage-field/openings.d.ts.map +1 -0
- package/dist/spatial/usage-field/openings.js +162 -0
- package/dist/spatial/usage-field/path.d.ts +48 -0
- package/dist/spatial/usage-field/path.d.ts.map +1 -0
- package/dist/spatial/usage-field/path.js +354 -0
- package/dist/spatial/usage-field/pieces.d.ts +27 -0
- package/dist/spatial/usage-field/pieces.d.ts.map +1 -0
- package/dist/spatial/usage-field/pieces.js +89 -0
- package/dist/spatial/usage-field/shapes.d.ts +18 -0
- package/dist/spatial/usage-field/shapes.d.ts.map +1 -0
- package/dist/spatial/usage-field/shapes.js +92 -0
- package/dist/spatial/usage-field/stairs.d.ts +23 -0
- package/dist/spatial/usage-field/stairs.d.ts.map +1 -0
- package/dist/spatial/usage-field/stairs.js +163 -0
- package/dist/spatial/usage-field/support.d.ts +24 -0
- package/dist/spatial/usage-field/support.d.ts.map +1 -0
- package/dist/spatial/usage-field/support.js +46 -0
- package/dist/spatial/usage-field/swings.d.ts +846 -0
- package/dist/spatial/usage-field/swings.d.ts.map +1 -0
- package/dist/spatial/usage-field/swings.js +427 -0
- package/dist/spatial/usage-field/types.d.ts +65 -0
- package/dist/spatial/usage-field/types.d.ts.map +1 -0
- package/dist/spatial/usage-field/types.js +1 -0
- package/dist/spatial/usage-field/walls.d.ts +1057 -0
- package/dist/spatial/usage-field/walls.d.ts.map +1 -0
- package/dist/spatial/usage-field/walls.js +166 -0
- package/dist/spatial/usage-field/way-in.d.ts +26 -0
- package/dist/spatial/usage-field/way-in.d.ts.map +1 -0
- package/dist/spatial/usage-field/way-in.js +113 -0
- package/dist/store/actions/node-actions.d.ts +2124 -1322
- package/dist/store/actions/node-actions.d.ts.map +1 -1
- package/dist/store/actions/node-actions.js +42 -16
- package/dist/store/derived-node-guard.d.ts +10 -2
- package/dist/store/derived-node-guard.d.ts.map +1 -1
- package/dist/store/derived-node-guard.js +31 -11
- package/dist/store/document-settling.d.ts +9 -0
- package/dist/store/document-settling.d.ts.map +1 -0
- package/dist/store/document-settling.js +22 -0
- package/dist/store/history-control.d.ts +19 -10
- package/dist/store/history-control.d.ts.map +1 -1
- package/dist/store/history-control.js +176 -127
- package/dist/store/history-drafts.d.ts.map +1 -1
- package/dist/store/history-drafts.js +21 -17
- package/dist/store/live-previews.d.ts +9 -0
- package/dist/store/live-previews.d.ts.map +1 -0
- package/dist/store/live-previews.js +19 -0
- package/dist/store/scene-annotations.d.ts +6751 -5151
- package/dist/store/scene-annotations.d.ts.map +1 -1
- package/dist/store/scene-environment.d.ts +33 -0
- package/dist/store/scene-environment.d.ts.map +1 -0
- package/dist/store/scene-environment.js +54 -0
- package/dist/store/scene-hydration.d.ts.map +1 -1
- package/dist/store/scene-hydration.js +41 -30
- package/dist/store/use-interactive.d.ts +9 -3
- package/dist/store/use-interactive.d.ts.map +1 -1
- package/dist/store/use-interactive.js +43 -11
- package/dist/store/use-live-node-overrides.d.ts.map +1 -1
- package/dist/store/use-live-node-overrides.js +3 -0
- package/dist/store/use-scene.d.ts +25 -0
- package/dist/store/use-scene.d.ts.map +1 -1
- package/dist/store/use-scene.js +408 -336
- package/dist/systems/document-reconcile.d.ts +40 -0
- package/dist/systems/document-reconcile.d.ts.map +1 -0
- package/dist/systems/document-reconcile.js +159 -0
- package/dist/systems/elevator/elevator-opening-system.d.ts.map +1 -1
- package/dist/systems/elevator/elevator-opening-system.js +9 -24
- package/dist/systems/fence/guard-layout.d.ts +69 -0
- package/dist/systems/fence/guard-layout.d.ts.map +1 -0
- package/dist/systems/fence/guard-layout.js +194 -0
- package/dist/systems/owned-floor-openings.d.ts +13 -1
- package/dist/systems/owned-floor-openings.d.ts.map +1 -1
- package/dist/systems/owned-floor-openings.js +58 -2
- package/dist/systems/reconcile-owned-floor-openings.d.ts +3 -1
- package/dist/systems/reconcile-owned-floor-openings.d.ts.map +1 -1
- package/dist/systems/reconcile-owned-floor-openings.js +4 -4
- package/dist/systems/roof/roof-elevation-system.d.ts.map +1 -1
- package/dist/systems/roof/roof-elevation-system.js +8 -26
- package/dist/systems/roof/roof-elevation.d.ts +16 -1
- package/dist/systems/roof/roof-elevation.d.ts.map +1 -1
- package/dist/systems/roof/roof-elevation.js +85 -4
- package/dist/systems/roof/roof-footprint.d.ts +42 -1
- package/dist/systems/roof/roof-footprint.d.ts.map +1 -1
- package/dist/systems/roof/roof-footprint.js +160 -4
- package/dist/systems/slab/__fixtures__/floor-step.d.ts +3163 -1934
- package/dist/systems/slab/__fixtures__/floor-step.d.ts.map +1 -1
- package/dist/systems/slab/__fixtures__/raised-room.d.ts +2495 -1249
- package/dist/systems/slab/__fixtures__/raised-room.d.ts.map +1 -1
- package/dist/systems/stair/stair-clearance.d.ts +7 -0
- package/dist/systems/stair/stair-clearance.d.ts.map +1 -1
- package/dist/systems/stair/stair-clearance.js +31 -11
- package/dist/systems/stair/stair-construction.d.ts +8 -3
- package/dist/systems/stair/stair-construction.d.ts.map +1 -1
- package/dist/systems/stair/stair-construction.js +55 -4
- package/dist/systems/stair/stair-opening-preview.d.ts +889 -89
- package/dist/systems/stair/stair-opening-preview.d.ts.map +1 -1
- package/dist/systems/stair/stair-opening-system.d.ts.map +1 -1
- package/dist/systems/stair/stair-opening-system.js +18 -34
- package/dist/systems/stair/stair-presets.d.ts +36 -0
- package/dist/systems/stair/stair-presets.d.ts.map +1 -1
- package/dist/systems/stair/stair-rise-query.d.ts.map +1 -1
- package/dist/systems/stair/stair-rise-query.js +3 -2
- package/dist/systems/stair/stair-rise.d.ts.map +1 -1
- package/dist/systems/stair/stair-rise.js +6 -0
- package/dist/systems/stair/stair-sizing.d.ts +42 -11
- package/dist/systems/stair/stair-sizing.d.ts.map +1 -1
- package/dist/systems/stair/stair-sizing.js +10 -1
- package/dist/systems/stair/stair-structure.d.ts +277 -0
- package/dist/systems/stair/stair-structure.d.ts.map +1 -0
- package/dist/systems/stair/stair-structure.js +496 -0
- package/dist/systems/wall/wall-assembly.d.ts +84 -6
- package/dist/systems/wall/wall-assembly.d.ts.map +1 -1
- package/dist/systems/wall/wall-assembly.js +204 -5
- package/dist/systems/wall/wall-finish.d.ts +38 -2
- package/dist/systems/wall/wall-finish.d.ts.map +1 -1
- package/dist/systems/wall/wall-finish.js +70 -2
- package/dist/systems/wall/wall-footprint.js +2 -2
- package/dist/systems/wall/wall-merge.d.ts.map +1 -1
- package/dist/systems/wall/wall-merge.js +28 -7
- package/dist/systems/wall/wall-mitering.d.ts +1 -0
- package/dist/systems/wall/wall-mitering.d.ts.map +1 -1
- package/dist/systems/wall/wall-mitering.js +152 -52
- package/dist/systems/wall/wall-move.d.ts +23 -6
- package/dist/systems/wall/wall-move.d.ts.map +1 -1
- package/dist/systems/wall/wall-move.js +65 -0
- package/dist/systems/wall/wall-top.d.ts +2 -2
- package/dist/systems/wall/wall-top.d.ts.map +1 -1
- package/dist/systems/wall/wall-top.js +6 -1
- package/dist/systems/wall/wall-topology.d.ts +32 -1
- package/dist/systems/wall/wall-topology.d.ts.map +1 -1
- package/dist/systems/wall/wall-topology.js +118 -10
- package/dist/systems/wall/wall-trim-profiles.d.ts +12 -0
- package/dist/systems/wall/wall-trim-profiles.d.ts.map +1 -0
- package/dist/systems/wall/wall-trim-profiles.js +191 -0
- package/dist/utils/ensure-scene-openings.d.ts +6523 -4923
- package/dist/utils/ensure-scene-openings.d.ts.map +1 -1
- package/dist/utils/floor-piece-adoption.d.ts +5 -0
- package/dist/utils/floor-piece-adoption.d.ts.map +1 -1
- package/dist/utils/floor-plate-migration.d.ts +1930 -1130
- package/dist/utils/floor-plate-migration.d.ts.map +1 -1
- package/dist/utils/owned-floor-opening-migration.d.ts +888 -88
- package/dist/utils/owned-floor-opening-migration.d.ts.map +1 -1
- package/dist/utils/reconcile-structure-on-load.d.ts +1930 -1130
- package/dist/utils/reconcile-structure-on-load.d.ts.map +1 -1
- package/dist/utils/structure-id.d.ts.map +1 -1
- package/dist/utils/structure-id.js +4 -0
- package/package.json +22 -5
- package/dist/lib/generic-foundation.d.ts +0 -40
- package/dist/lib/generic-foundation.d.ts.map +0 -1
- package/dist/lib/generic-foundation.js +0 -200
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { ZoneNode, } from '../schema/index.js';
|
|
2
2
|
import { generateId } from '../schema/base.js';
|
|
3
3
|
import { findLevelAboveId, getLevelBelow, getLevelElevations } from '../services/storey.js';
|
|
4
|
+
import { isSettlingDocument } from '../store/document-settling.js';
|
|
4
5
|
import { activeSceneCommitNodeIds, getSceneHistoryPauseDepth, isRestoringSceneHistory, notifySceneCommit, pauseSceneHistory, resumeSceneHistory, subscribeSceneCommits, } from '../store/history-control.js';
|
|
6
|
+
import { currentSceneEnvironment, sceneEnvironmentOf, } from '../store/scene-environment.js';
|
|
5
7
|
import { getClampedWallCurveOffset } from '../systems/wall/wall-curve.js';
|
|
6
8
|
import { changedLevelConstructionDisplacements } from './floor-foundation-stack.js';
|
|
7
9
|
import { createFloorOpeningIndex, floorOpeningTargets } from './floor-opening-intent.js';
|
|
10
|
+
import { porchPartOf, porchPartSignature } from './porch-framing-sync.js';
|
|
11
|
+
import { railingFencedRoomIds, railingWallIds } from './railing-rooms.js';
|
|
8
12
|
import { extractRooms, pointToTuple, polygonSignature, sampleWallPointsForRoomDetection, WALL_JUNCTION_TOLERANCE, } from './room-graph.js';
|
|
9
13
|
import { distanceToSegment, RoomTopologyIndex } from './room-topology-index.js';
|
|
10
14
|
import { applyStructureReconciliation } from './structure-commit.js';
|
|
@@ -31,7 +35,12 @@ function wallGeometrySignature(wall, nodes, levelId) {
|
|
|
31
35
|
// Plane-bound (no stored height) is a distinct state, not a default
|
|
32
36
|
// value: it resolves to the storey plane, so it must not alias an
|
|
33
37
|
// explicit height of the same magnitude in the trigger signature.
|
|
34
|
-
|
|
38
|
+
// A legacy height that is not a number still signs, rather than throwing.
|
|
39
|
+
wall.height == null
|
|
40
|
+
? 'plane'
|
|
41
|
+
: typeof wall.height === 'number'
|
|
42
|
+
? wall.height.toFixed(4)
|
|
43
|
+
: String(wall.height),
|
|
35
44
|
wall.supportSlabId ?? 'elected',
|
|
36
45
|
(wall.supportOffset ?? 0).toFixed(4),
|
|
37
46
|
getClampedWallCurveOffset(wall).toFixed(4),
|
|
@@ -74,6 +83,9 @@ function zoneGeometrySignature(zone) {
|
|
|
74
83
|
zone.wallMaterial,
|
|
75
84
|
zone.wallOverrides,
|
|
76
85
|
zone.seed,
|
|
86
|
+
// A porch's type and framing settings rebuild its posts and beam.
|
|
87
|
+
zone.roomType,
|
|
88
|
+
zone.porchFraming,
|
|
77
89
|
// A drawn zone's outline is intent (it may be adopted); a room's outline is
|
|
78
90
|
// derived, and an edit to it must be re-derived here as the hosted path does.
|
|
79
91
|
// The kernel's own write is not a change: the baseline is taken after it.
|
|
@@ -92,11 +104,19 @@ function levelStructureSnapshots(nodes) {
|
|
|
92
104
|
const zonesByLevel = new Map();
|
|
93
105
|
const slabElevationsByLevel = new Map();
|
|
94
106
|
const coveringUndersidesByLevel = new Map();
|
|
107
|
+
const porchPartsByLevel = new Map();
|
|
95
108
|
const floorOpenings = [];
|
|
96
109
|
for (const node of Object.values(nodes)) {
|
|
97
110
|
if (!(node && typeof node === 'object' && 'parentId' in node && node.parentId))
|
|
98
111
|
continue;
|
|
99
112
|
const levelId = node.parentId;
|
|
113
|
+
// A porch's own post or beam moved, resized or deleted by hand hands its framing over.
|
|
114
|
+
const porchPart = porchPartSignature(node);
|
|
115
|
+
if (porchPart) {
|
|
116
|
+
const parts = porchPartsByLevel.get(levelId) ?? [];
|
|
117
|
+
parts.push(porchPart);
|
|
118
|
+
porchPartsByLevel.set(levelId, parts);
|
|
119
|
+
}
|
|
100
120
|
if (node.type === 'stair' && nodes[node.deckSlabId]?.support === 'open') {
|
|
101
121
|
const target = nodes[node.deckSlabId].parentId;
|
|
102
122
|
const arrivals = arrivalsByLevel.get(target) ?? [];
|
|
@@ -196,6 +216,7 @@ function levelStructureSnapshots(nodes) {
|
|
|
196
216
|
...zonesByLevel.keys(),
|
|
197
217
|
...separatorsByLevel.keys(),
|
|
198
218
|
...openingsByLevel.keys(),
|
|
219
|
+
...porchPartsByLevel.keys(),
|
|
199
220
|
]);
|
|
200
221
|
for (const levelId of levelIds) {
|
|
201
222
|
const walls = wallsByLevel.get(levelId) ?? [];
|
|
@@ -207,7 +228,7 @@ function levelStructureSnapshots(nodes) {
|
|
|
207
228
|
const aboveSlabKey = aboveId
|
|
208
229
|
? (coveringUndersidesByLevel.get(aboveId) ?? []).sort().join(';')
|
|
209
230
|
: '';
|
|
210
|
-
snapshots.set(levelId, `${(arrivalsByLevel.get(levelId) ?? []).sort().join('|')}#${(separatorsByLevel.get(levelId) ?? []).sort().join('|')}#${storeyKey}#${levelWallSnapshot(walls, nodes, levelId)}##${zones.map(zoneGeometrySignature).sort().join('||')}##${slabKey}##${aboveSlabKey}##${(ceilingIdsByLevel.get(levelId) ?? []).sort().join('|')}##${(openingsByLevel.get(levelId) ?? []).sort().join('|')}`);
|
|
231
|
+
snapshots.set(levelId, `${(arrivalsByLevel.get(levelId) ?? []).sort().join('|')}#${(separatorsByLevel.get(levelId) ?? []).sort().join('|')}#${storeyKey}#${levelWallSnapshot(walls, nodes, levelId)}##${zones.map(zoneGeometrySignature).sort().join('||')}##${slabKey}##${aboveSlabKey}##${(ceilingIdsByLevel.get(levelId) ?? []).sort().join('|')}##${(openingsByLevel.get(levelId) ?? []).sort().join('|')}##${(porchPartsByLevel.get(levelId) ?? []).sort().join('|')}`);
|
|
211
232
|
}
|
|
212
233
|
return snapshots;
|
|
213
234
|
}
|
|
@@ -335,11 +356,17 @@ function fallbackLevelIdsForCandidates(before, current, candidateIds) {
|
|
|
335
356
|
if (wall?.parentId)
|
|
336
357
|
levelIds.add(wall.parentId);
|
|
337
358
|
}
|
|
359
|
+
else if (porchPartOf(node)) {
|
|
360
|
+
// A porch's own post or beam edited by hand: the kernel hands its framing over.
|
|
361
|
+
if (porchPartSignature(before[id]) !== porchPartSignature(current[id]) && node.parentId)
|
|
362
|
+
levelIds.add(node.parentId);
|
|
363
|
+
}
|
|
338
364
|
else if (node.type === 'slab') {
|
|
339
365
|
const old = before[id], next = current[id];
|
|
340
366
|
const changed = !old ||
|
|
341
367
|
!next ||
|
|
342
|
-
|
|
368
|
+
// Everything the covering underside below reads, as well as this level's own floor.
|
|
369
|
+
['thickness', 'floorHeight', 'polygon', 'holes', 'elevation', 'recessed'].some((field) => JSON.stringify(old[field]) !==
|
|
343
370
|
JSON.stringify(next[field]));
|
|
344
371
|
addLevelAndLower(node.parentId, nodes, changed);
|
|
345
372
|
if (node.plateRole === 'base' && changed)
|
|
@@ -375,9 +402,12 @@ function detectSpacesFromWalls(levelId, boundaries) {
|
|
|
375
402
|
const rooms = extractRooms(boundaries);
|
|
376
403
|
const walls = boundaries.filter((boundary) => boundary.type === 'wall');
|
|
377
404
|
const roomPolygons = rooms.map((room) => room.polygon);
|
|
405
|
+
const spans = rooms.flatMap((room) => room.spans);
|
|
406
|
+
// A room a railing fences off from the outside (a deck's guard) is outside.
|
|
407
|
+
const fenced = railingFencedRoomIds(spans, railingWallIds(walls));
|
|
378
408
|
const wallUpdates = walls.map((wall) => ({
|
|
379
409
|
wallId: wall.id,
|
|
380
|
-
...classifyWallSides(wall,
|
|
410
|
+
...classifyWallSides(wall, spans, fenced),
|
|
381
411
|
}));
|
|
382
412
|
return {
|
|
383
413
|
rooms,
|
|
@@ -389,6 +419,48 @@ function detectSpacesFromWalls(levelId, boundaries) {
|
|
|
389
419
|
export function detectSpacesForLevel(levelId, walls) {
|
|
390
420
|
return detectSpacesFromWalls(levelId, walls);
|
|
391
421
|
}
|
|
422
|
+
/**
|
|
423
|
+
* Levels whose structure intent differs between two versions of a scene: what a paused batch's
|
|
424
|
+
* resume (and a detached scene's reconciliation) re-derives.
|
|
425
|
+
*/
|
|
426
|
+
export function changedStructureLevelIds(before, after) {
|
|
427
|
+
const previous = levelStructureSnapshots(before);
|
|
428
|
+
const current = levelStructureSnapshots(after);
|
|
429
|
+
return [...new Set([...previous.keys(), ...current.keys()])].filter((id) => previous.get(id) !== current.get(id));
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* Levels whose structure an edit from `before` to `after` asks to re-derive, chosen as space
|
|
433
|
+
* detection chooses them for a store commit: from the nodes the edit changed (walls by level, and
|
|
434
|
+
* the fallbacks for levels, stairs, openings, slabs, ceilings, zones and separators), without
|
|
435
|
+
* signing every level of the scene.
|
|
436
|
+
*/
|
|
437
|
+
export function structureLevelsForChange(before, after) {
|
|
438
|
+
const candidateIds = new Set();
|
|
439
|
+
for (const id in after)
|
|
440
|
+
if (after[id] !== before[id] && !onlyChildrenChanged(before[id], after[id]))
|
|
441
|
+
candidateIds.add(id);
|
|
442
|
+
for (const id in before)
|
|
443
|
+
if (!(id in after))
|
|
444
|
+
candidateIds.add(id);
|
|
445
|
+
if (!candidateIds.size)
|
|
446
|
+
return [];
|
|
447
|
+
const levels = fallbackLevelIdsForCandidates(before, after, candidateIds);
|
|
448
|
+
for (const levelId of changedWallIdsByLevel(before, after, candidateIds).keys())
|
|
449
|
+
levels.add(levelId);
|
|
450
|
+
return [...levels];
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* A parent whose child list alone changed: the children created or deleted are candidates of
|
|
454
|
+
* their own, so the parent adds nothing (an item placed on a level re-derives no structure).
|
|
455
|
+
*/
|
|
456
|
+
function onlyChildrenChanged(before, after) {
|
|
457
|
+
if (!(before && after))
|
|
458
|
+
return false;
|
|
459
|
+
for (const key of new Set([...Object.keys(before), ...Object.keys(after)]))
|
|
460
|
+
if (key !== 'children' && before[key] !== after[key])
|
|
461
|
+
return false;
|
|
462
|
+
return true;
|
|
463
|
+
}
|
|
392
464
|
function syncSceneStructure(levelIds, sceneStore, previousNodes, mintId) {
|
|
393
465
|
applyStructureReconciliation(sceneStore, { levelIds, previousNodes, mintId });
|
|
394
466
|
}
|
|
@@ -402,26 +474,28 @@ function publishSpaces(levelIds, nodes, editorStore) {
|
|
|
402
474
|
}
|
|
403
475
|
editorStore.getState().setSpaces(nextSpaces);
|
|
404
476
|
}
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
477
|
+
const SPACE_DETECTION_PAUSE = Symbol('space-detection-pause');
|
|
478
|
+
const pauseOf = (environment = currentSceneEnvironment()) => environment.slot(SPACE_DETECTION_PAUSE, () => ({
|
|
479
|
+
depth: 0,
|
|
480
|
+
resumeListeners: new Set(),
|
|
481
|
+
}));
|
|
409
482
|
/** Pause structure reconciliation. Refcounted — pair with `resumeSpaceDetection`. */
|
|
410
483
|
export function pauseSpaceDetection() {
|
|
411
|
-
|
|
484
|
+
pauseOf().depth += 1;
|
|
412
485
|
}
|
|
413
486
|
/** Resume structure reconciliation. No-op if not currently paused. */
|
|
414
487
|
export function resumeSpaceDetection() {
|
|
415
|
-
|
|
488
|
+
const pause = pauseOf();
|
|
489
|
+
if (pause.depth === 0)
|
|
416
490
|
return;
|
|
417
|
-
|
|
418
|
-
if (
|
|
419
|
-
for (const reconcile of resumeListeners)
|
|
491
|
+
pause.depth -= 1;
|
|
492
|
+
if (pause.depth === 0)
|
|
493
|
+
for (const reconcile of pause.resumeListeners)
|
|
420
494
|
reconcile();
|
|
421
495
|
}
|
|
422
496
|
/** True iff structure reconciliation is currently paused. */
|
|
423
497
|
export function isSpaceDetectionPaused() {
|
|
424
|
-
return
|
|
498
|
+
return pauseOf().depth > 0;
|
|
425
499
|
}
|
|
426
500
|
export function createRoomTopologyIndex() {
|
|
427
501
|
return new RoomTopologyIndex({
|
|
@@ -436,6 +510,7 @@ export function initSpaceDetectionSync(sceneStore, editorStore, options = {}) {
|
|
|
436
510
|
// scene that merely loaded — rerunning on hydration resurrected auto slabs
|
|
437
511
|
// the user had deleted in an earlier session.
|
|
438
512
|
const initialNodes = sceneStore.getState().nodes;
|
|
513
|
+
const pause = pauseOf(sceneEnvironmentOf(sceneStore));
|
|
439
514
|
const topologyIndex = new RoomTopologyIndex({
|
|
440
515
|
detectRooms: extractRooms,
|
|
441
516
|
sampleWall: (wall) => sampleWallPointsForRoomDetection(wall).map(pointToTuple),
|
|
@@ -459,11 +534,11 @@ export function initSpaceDetectionSync(sceneStore, editorStore, options = {}) {
|
|
|
459
534
|
previousNodes = nodes;
|
|
460
535
|
};
|
|
461
536
|
adoptSceneBaseline(initialNodes);
|
|
462
|
-
const unsubscribeCommits = subscribeSceneCommits((commit) => {
|
|
537
|
+
const unsubscribeCommits = sceneEnvironmentOf(sceneStore).run(() => subscribeSceneCommits((commit) => {
|
|
463
538
|
if (commit.origin === 'local')
|
|
464
539
|
return;
|
|
465
540
|
adoptSceneBaseline(commit.current.nodes);
|
|
466
|
-
});
|
|
541
|
+
}));
|
|
467
542
|
// Keep reconciliation in this synchronous store subscription. Zundo emits
|
|
468
543
|
// the originating local SceneCommit only after subscribers return, so the
|
|
469
544
|
// history-paused derived writes below join that commit's current snapshot
|
|
@@ -476,11 +551,27 @@ export function initSpaceDetectionSync(sceneStore, editorStore, options = {}) {
|
|
|
476
551
|
adoptSceneBaseline(state.nodes);
|
|
477
552
|
return;
|
|
478
553
|
}
|
|
479
|
-
|
|
554
|
+
// A settling host derives this edit's structure itself (reconcileDocument): only the topology
|
|
555
|
+
// and spaces of the levels whose walls it changed are brought up to date here. Its derived
|
|
556
|
+
// writes are history-paused, so this runs before the pause check: the baseline must take them
|
|
557
|
+
// in, or the next edit would derive the host's rooms again from before it.
|
|
558
|
+
if (isSettlingDocument(sceneStore)) {
|
|
559
|
+
const levels = [
|
|
560
|
+
...changedWallIdsByLevel(previousNodes, state.nodes, activeSceneCommitNodeIds()).keys(),
|
|
561
|
+
];
|
|
562
|
+
for (const levelId of levels)
|
|
563
|
+
topologyIndex.rebuildLevel(levelId, state.nodes);
|
|
564
|
+
if (levels.length)
|
|
565
|
+
publishSpaces(levels, state.nodes, editorStore);
|
|
566
|
+
previousNodes = state.nodes;
|
|
567
|
+
return;
|
|
568
|
+
}
|
|
569
|
+
if (getSceneHistoryPauseDepth(sceneStore) > 0 ||
|
|
570
|
+
sceneStore.temporal.getState().isTracking === false)
|
|
480
571
|
return;
|
|
481
572
|
const nodes = state.nodes;
|
|
482
573
|
const candidateIds = activeSceneCommitNodeIds();
|
|
483
|
-
if (
|
|
574
|
+
if (pause.depth > 0)
|
|
484
575
|
return;
|
|
485
576
|
const changedWalls = changedWallIdsByLevel(previousNodes, nodes, candidateIds);
|
|
486
577
|
if (candidateIds && changedWalls.size > 0) {
|
|
@@ -563,10 +654,7 @@ export function initSpaceDetectionSync(sceneStore, editorStore, options = {}) {
|
|
|
563
654
|
return { nodes, rootNodeIds, collections, materials, installedPlugins };
|
|
564
655
|
};
|
|
565
656
|
const beforeCommit = capture();
|
|
566
|
-
const
|
|
567
|
-
const before = levelStructureSnapshots(previousNodes);
|
|
568
|
-
const after = levelStructureSnapshots(nodes);
|
|
569
|
-
const levels = [...new Set([...before.keys(), ...after.keys()])].filter((id) => before.get(id) !== after.get(id));
|
|
657
|
+
const levels = changedStructureLevelIds(previousNodes, beforeCommit.nodes);
|
|
570
658
|
if (!levels.length)
|
|
571
659
|
return;
|
|
572
660
|
isProcessing = true;
|
|
@@ -586,11 +674,11 @@ export function initSpaceDetectionSync(sceneStore, editorStore, options = {}) {
|
|
|
586
674
|
// so collaboration receives the originator's ids even for AI/template batches.
|
|
587
675
|
notifySceneCommit({ origin: 'local', before: beforeCommit, current: capture() });
|
|
588
676
|
};
|
|
589
|
-
resumeListeners.add(reconcilePaused);
|
|
677
|
+
pause.resumeListeners.add(reconcilePaused);
|
|
590
678
|
return () => {
|
|
591
679
|
unsubscribe();
|
|
592
680
|
unsubscribeCommits();
|
|
593
|
-
resumeListeners.delete(reconcilePaused);
|
|
681
|
+
pause.resumeListeners.delete(reconcilePaused);
|
|
594
682
|
};
|
|
595
683
|
}
|
|
596
684
|
export function wallTouchesOthers(wall, otherWalls) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AnyNode, AnyNodeId, WallNode } from '../schema/index.js';
|
|
1
|
+
import type { AnyNode, AnyNodeId, SeparatorNode, WallNode } from '../schema/index.js';
|
|
2
2
|
import type { ZoneNode } from '../schema/nodes/zone.js';
|
|
3
3
|
import { type FloorOpeningIndex } from './floor-opening-intent.js';
|
|
4
4
|
import { type Polygon, type Ring } from './polygon-boolean.js';
|
|
@@ -33,31 +33,44 @@ export type LevelStructureSnapshot = {
|
|
|
33
33
|
rooms: StructureRoom[];
|
|
34
34
|
};
|
|
35
35
|
/**
|
|
36
|
-
* The rooms
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
36
|
+
* The rooms closed off outside the house, and what they are by default: open to the outside across
|
|
37
|
+
* invisible walls or railings nothing stands behind, along at least as much of their edge as walls
|
|
38
|
+
* close (a porch on the front, or in a corner of the house). Closed with invisible walls, a porch;
|
|
39
|
+
* fenced with railings alone, a deck. A room walled on three sides and open on the fourth (a
|
|
40
|
+
* kitchen open to a terrace, a recessed porch) is not one of them. `lengthOf` is a wall's or a
|
|
41
|
+
* separator's length; `railingIds` the railing walls.
|
|
42
|
+
*/
|
|
43
|
+
export declare function outsideRoomTypes(rooms: readonly {
|
|
44
|
+
spans: readonly BoundarySpan[];
|
|
45
|
+
}[], lengthOf: (boundaryId: string) => number, railingIds?: ReadonlySet<string>): Map<string, 'porch' | 'deck'>;
|
|
46
|
+
/**
|
|
47
|
+
* The rooms that are outside: a porch, deck or patio (`roomType`, outdoors whatever covers it), and
|
|
48
|
+
* a room without a ceiling left without crossing a wall, through a separator no room stands behind
|
|
49
|
+
* or into another such room. A porch made a room for its floor left its wall with no outside: the
|
|
50
|
+
* front door faced the hall. A room that only lost its ceiling is walled in and a kitchen open to a
|
|
51
|
+
* terrace keeps its ceiling, so both stay inside; so does a courtyard walled on every side, a limit
|
|
52
|
+
* of this rule.
|
|
41
53
|
*/
|
|
42
54
|
export declare function outdoorRoomIds(rooms: readonly {
|
|
43
55
|
spans: readonly BoundarySpan[];
|
|
44
56
|
hasCeiling: boolean;
|
|
57
|
+
outdoor?: boolean;
|
|
45
58
|
}[]): Set<string>;
|
|
46
59
|
/** A wall face is inside when an indoor room stands on it; an outdoor room's face is outside. */
|
|
47
60
|
export declare function classifyWallSides(wall: WallNode, spans: readonly BoundarySpan[], outdoor?: ReadonlySet<string>): Pick<WallNode, 'frontSide' | 'backSide'>;
|
|
48
61
|
export declare function reconcileLevelStructure(input: Parameters<typeof planLevelStructure>[0]): ReturnType<typeof planLevelStructure>;
|
|
49
|
-
declare function planLevelStructure({ levelId, nodes, mintId, openingIndex, }: {
|
|
62
|
+
declare function planLevelStructure({ levelId, nodes, previousNodes, mintId, openingIndex, }: {
|
|
50
63
|
levelId: string;
|
|
51
64
|
nodes: SceneNodes;
|
|
52
65
|
previousNodes?: SceneNodes;
|
|
53
|
-
mintId: (kind: 'zone' | 'ceiling' | 'slab' | 'separator') => string;
|
|
66
|
+
mintId: (kind: 'zone' | 'ceiling' | 'slab' | 'separator' | 'column' | 'beam') => string;
|
|
54
67
|
openingIndex?: FloorOpeningIndex;
|
|
55
68
|
}): {
|
|
56
69
|
patches: NodePatch[];
|
|
57
70
|
snapshot: LevelStructureSnapshot;
|
|
58
71
|
events: StructureEvent[];
|
|
59
72
|
};
|
|
60
|
-
export declare function createLevelStructurePreview(levelId: string, nodes: SceneNodes): (walls: readonly WallNode[]) => {
|
|
73
|
+
export declare function createLevelStructurePreview(levelId: string, nodes: SceneNodes): (walls: readonly WallNode[], separators?: readonly SeparatorNode[]) => {
|
|
61
74
|
op: 'update';
|
|
62
75
|
id: AnyNodeId;
|
|
63
76
|
data: Partial<AnyNode>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structure-kernel.d.ts","sourceRoot":"","sources":["../../src/lib/structure-kernel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"structure-kernel.d.ts","sourceRoot":"","sources":["../../src/lib/structure-kernel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAI5E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAWpD,OAAO,EAAE,KAAK,iBAAiB,EAAsB,MAAM,wBAAwB,CAAA;AAQnF,OAAO,EAKL,KAAK,OAAO,EACZ,KAAK,IAAI,EAEV,MAAM,mBAAmB,CAAA;AAM1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAUzD,eAAO,MAAM,+BAA+B,MAAM,CAAA;AAElD,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;AAC1D,MAAM,MAAM,SAAS,GACjB;IAAE,EAAE,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,GAC/B;IAAE,EAAE,EAAE,QAAQ,CAAC;IAAC,EAAE,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAA;CAAE,GACvD;IAAE,EAAE,EAAE,QAAQ,CAAC;IAAC,EAAE,EAAE,SAAS,CAAA;CAAE,CAAA;AACnC,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAA;IAC/D,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AACD,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAA;IACtB,OAAO,EAAE,IAAI,CAAA;IACb,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,KAAK,EAAE,OAAO,CAAA;IACd,KAAK,EAAE,YAAY,EAAE,CAAA;CACtB,CAAA;AACD,MAAM,MAAM,sBAAsB,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,aAAa,EAAE,CAAA;CAAE,CAAA;AAuDhF;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,SAAS;IAAE,KAAK,EAAE,SAAS,YAAY,EAAE,CAAA;CAAE,EAAE,EACpD,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,EACxC,UAAU,GAAE,WAAW,CAAC,MAAM,CAAa,GAC1C,GAAG,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC,CAoB/B;AAiCD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,SAAS;IAAE,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,EAAE,GAC3F,GAAG,CAAC,MAAM,CAAC,CA2Bb;AAED,iGAAiG;AACjG,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,SAAS,YAAY,EAAE,EAC9B,OAAO,GAAE,WAAW,CAAC,MAAM,CAAa,GACvC,IAAI,CAAC,QAAQ,EAAE,WAAW,GAAG,UAAU,CAAC,CAU1C;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC,GAC9C,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAiBvC;AAED,iBAAS,kBAAkB,CAAC,EAC1B,OAAO,EACP,KAAK,EACL,aAAa,EACb,MAAM,EACN,YAAY,GACb,EAAE;IACD,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,UAAU,CAAA;IACjB,aAAa,CAAC,EAAE,UAAU,CAAA;IAC1B,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,KAAK,MAAM,CAAA;IACvF,YAAY,CAAC,EAAE,iBAAiB,CAAA;CACjC,GAAG;IAAE,OAAO,EAAE,SAAS,EAAE,CAAC;IAAC,QAAQ,EAAE,sBAAsB,CAAC;IAAC,MAAM,EAAE,cAAc,EAAE,CAAA;CAAE,CAorBvF;AAED,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,WA8C7D,SAAS,QAAQ,EAAE,eAAe,SAAS,aAAa,EAAE;QAn8BjE,QAAQ;QAAM,SAAS;UAAQ,OAAO,CAAC,OAAO,CAAC;IAu+BxD"}
|
|
@@ -12,9 +12,12 @@ import { buildFloorPlates, warnPlateFailure } from './floor-plates.js';
|
|
|
12
12
|
import { floorRoomFaces } from './floor-room-faces.js';
|
|
13
13
|
import { remapFloorStepOverrideKeys } from './floor-step-finish.js';
|
|
14
14
|
import { newZone } from './new-zone.js';
|
|
15
|
+
import { isOutdoorRoom, nextOutdoorRoomName, OUTDOOR_ROOM_DEFAULTS } from './outdoor-room.js';
|
|
15
16
|
import { replacementPlateFor } from './plate-reference.js';
|
|
16
17
|
import { area, containsPoint, difference, intersection, union, } from './polygon-boolean.js';
|
|
17
18
|
import { polygonInteriorPoint } from './polygon-label.js';
|
|
19
|
+
import { reconcilePorchFraming } from './porch-framing-sync.js';
|
|
20
|
+
import { railingFencedRoomIds, railingWallIds } from './railing-rooms.js';
|
|
18
21
|
import { pointFromTuple } from './room-graph.js';
|
|
19
22
|
import { roomNameAllocator } from './room-name.js';
|
|
20
23
|
import { adoptableFace, compareAdoptionFits, compareExistingRooms, existingRoomFace, zoneFaceFits, } from './room-zone-adoption.js';
|
|
@@ -61,14 +64,42 @@ function equal(a, b) {
|
|
|
61
64
|
/** Span overlap below this (a fraction of the boundary) is a shared endpoint, not a shared edge. */
|
|
62
65
|
const SPAN_OVERLAP = 1e-6;
|
|
63
66
|
/**
|
|
64
|
-
* The rooms
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
67
|
+
* The rooms closed off outside the house, and what they are by default: open to the outside across
|
|
68
|
+
* invisible walls or railings nothing stands behind, along at least as much of their edge as walls
|
|
69
|
+
* close (a porch on the front, or in a corner of the house). Closed with invisible walls, a porch;
|
|
70
|
+
* fenced with railings alone, a deck. A room walled on three sides and open on the fourth (a
|
|
71
|
+
* kitchen open to a terrace, a recessed porch) is not one of them. `lengthOf` is a wall's or a
|
|
72
|
+
* separator's length; `railingIds` the railing walls.
|
|
69
73
|
*/
|
|
70
|
-
export function
|
|
71
|
-
const
|
|
74
|
+
export function outsideRoomTypes(rooms, lengthOf, railingIds = new Set()) {
|
|
75
|
+
const railing = (span) => span.kind === 'wall' && railingIds.has(span.boundaryId);
|
|
76
|
+
const { exposed } = openLineExposure(rooms, (span) => span.kind === 'separator' || railing(span));
|
|
77
|
+
const spanLength = (span) => (span.t1 - span.t0) * lengthOf(span.boundaryId);
|
|
78
|
+
const types = new Map();
|
|
79
|
+
for (const room of rooms) {
|
|
80
|
+
let open = 0;
|
|
81
|
+
let walled = 0;
|
|
82
|
+
let invisible = false;
|
|
83
|
+
for (const span of room.spans) {
|
|
84
|
+
if (span.kind === 'wall' && !railing(span))
|
|
85
|
+
walled += spanLength(span);
|
|
86
|
+
else if (exposed(span)) {
|
|
87
|
+
open += spanLength(span);
|
|
88
|
+
invisible ||= span.kind === 'separator';
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (room.spans[0] && open > 0 && open >= walled - 1e-6)
|
|
92
|
+
types.set(room.spans[0].roomId, invisible ? 'porch' : 'deck');
|
|
93
|
+
}
|
|
94
|
+
return types;
|
|
95
|
+
}
|
|
96
|
+
/** Each separator span's spans across it, and whether any stretch of it has none. */
|
|
97
|
+
function separatorExposure(rooms) {
|
|
98
|
+
return openLineExposure(rooms, (span) => span.kind === 'separator');
|
|
99
|
+
}
|
|
100
|
+
/** Each open line's span (`isOpen`): the spans across it, and whether any stretch of it has none. */
|
|
101
|
+
function openLineExposure(rooms, isOpen) {
|
|
102
|
+
const separatorSpans = rooms.flatMap((room) => room.spans.filter(isOpen));
|
|
72
103
|
const across = (span) => separatorSpans
|
|
73
104
|
.filter((other) => other.boundaryId === span.boundaryId &&
|
|
74
105
|
other.face !== span.face &&
|
|
@@ -83,8 +114,25 @@ export function outdoorRoomIds(rooms) {
|
|
|
83
114
|
}
|
|
84
115
|
return reach < span.t1 - SPAN_OVERLAP;
|
|
85
116
|
};
|
|
86
|
-
|
|
87
|
-
|
|
117
|
+
return { across, exposed };
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* The rooms that are outside: a porch, deck or patio (`roomType`, outdoors whatever covers it), and
|
|
121
|
+
* a room without a ceiling left without crossing a wall, through a separator no room stands behind
|
|
122
|
+
* or into another such room. A porch made a room for its floor left its wall with no outside: the
|
|
123
|
+
* front door faced the hall. A room that only lost its ceiling is walled in and a kitchen open to a
|
|
124
|
+
* terrace keeps its ceiling, so both stay inside; so does a courtyard walled on every side, a limit
|
|
125
|
+
* of this rule.
|
|
126
|
+
*/
|
|
127
|
+
export function outdoorRoomIds(rooms) {
|
|
128
|
+
const { across, exposed } = separatorExposure(rooms);
|
|
129
|
+
const open = new Map(rooms.flatMap((room) => (!room.hasCeiling || room.outdoor) && room.spans[0]
|
|
130
|
+
? [[room.spans[0].roomId, room.spans]]
|
|
131
|
+
: []));
|
|
132
|
+
const declared = new Set(rooms.flatMap((room) => (room.outdoor && room.spans[0] ? [room.spans[0].roomId] : [])));
|
|
133
|
+
const queue = [...open].flatMap(([id, spans]) => declared.has(id) || spans.some((span) => span.kind === 'separator' && exposed(span))
|
|
134
|
+
? [id]
|
|
135
|
+
: []);
|
|
88
136
|
const outdoor = new Set(queue);
|
|
89
137
|
for (let id = queue.pop(); id !== undefined; id = queue.pop())
|
|
90
138
|
for (const span of open.get(id))
|
|
@@ -122,7 +170,7 @@ export function reconcileLevelStructure(input) {
|
|
|
122
170
|
return { patches: [], snapshot: { levelId: input.levelId, rooms: [] }, events: [] };
|
|
123
171
|
}
|
|
124
172
|
}
|
|
125
|
-
function planLevelStructure({ levelId, nodes, mintId, openingIndex, }) {
|
|
173
|
+
function planLevelStructure({ levelId, nodes, previousNodes, mintId, openingIndex, }) {
|
|
126
174
|
const snapshot = { levelId, rooms: [] };
|
|
127
175
|
const events = [];
|
|
128
176
|
const level = nodes[levelId];
|
|
@@ -200,6 +248,14 @@ function planLevelStructure({ levelId, nodes, mintId, openingIndex, }) {
|
|
|
200
248
|
const zoneByFace = new Map();
|
|
201
249
|
const retiredTo = new Map();
|
|
202
250
|
const nextRoomName = roomNameAllocator(allZones);
|
|
251
|
+
// A new room closed off outside the house is a porch, or a deck when railings fence it
|
|
252
|
+
// (`lib/outdoor-room`).
|
|
253
|
+
const boundaryLengths = new Map([...walls, ...separators].map((boundary) => [
|
|
254
|
+
boundary.id,
|
|
255
|
+
Math.hypot(boundary.end[0] - boundary.start[0], boundary.end[1] - boundary.start[1]),
|
|
256
|
+
]));
|
|
257
|
+
const outsideTypes = outsideRoomTypes(faces, (id) => boundaryLengths.get(id) ?? 0, railingWallIds(walls));
|
|
258
|
+
const roomNames = allZones.map((zone) => zone.name);
|
|
203
259
|
faces.forEach((face, index) => {
|
|
204
260
|
const rooms = zones
|
|
205
261
|
.filter((zone) => preferred.get(zone.id) === index && !adoptionFits.has(zone.id))
|
|
@@ -219,20 +275,37 @@ function planLevelStructure({ levelId, nodes, mintId, openingIndex, }) {
|
|
|
219
275
|
.sort((a, b) => scores.get(b.id)[index] - scores.get(a.id)[index] || compareIds(a.id, b.id))[0];
|
|
220
276
|
if (source)
|
|
221
277
|
sourceByFace.set(index, source);
|
|
278
|
+
const outside = !survivor && !source && face.spans[0] ? outsideTypes.get(face.spans[0].roomId) : undefined;
|
|
222
279
|
const zone = survivor ??
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
280
|
+
(outside
|
|
281
|
+
? newZone({
|
|
282
|
+
id: mintId('zone'),
|
|
283
|
+
parentId: levelId,
|
|
284
|
+
name: nextOutdoorRoomName(outside, roomNames),
|
|
285
|
+
polygon: face.polygon.outer,
|
|
286
|
+
roomType: outside,
|
|
287
|
+
floor: {
|
|
288
|
+
drop: OUTDOOR_ROOM_DEFAULTS[outside].drop,
|
|
289
|
+
finish: OUTDOOR_ROOM_DEFAULTS[outside].finish,
|
|
290
|
+
},
|
|
291
|
+
...(OUTDOOR_ROOM_DEFAULTS[outside].covered ? {} : { hasCeiling: false }),
|
|
292
|
+
})
|
|
293
|
+
: newZone({
|
|
294
|
+
id: mintId('zone'),
|
|
295
|
+
parentId: levelId,
|
|
296
|
+
name: nextRoomName(),
|
|
297
|
+
polygon: face.polygon.outer,
|
|
298
|
+
floor: source?.floor,
|
|
299
|
+
wallMaterial: source?.wallMaterial,
|
|
300
|
+
floorStepFinish: source?.floorStepFinish,
|
|
301
|
+
floorStepOverrides: source?.floorStepOverrides,
|
|
302
|
+
floorEdgeFinish: source?.floorEdgeFinish,
|
|
303
|
+
hasFloor: source?.hasFloor,
|
|
304
|
+
hasCeiling: source?.hasCeiling,
|
|
305
|
+
roomType: source?.roomType,
|
|
306
|
+
}));
|
|
307
|
+
if (outside)
|
|
308
|
+
roomNames.push(zone.name);
|
|
236
309
|
const seed = zone.seed && containsPoint([face.polygon], zone.seed)
|
|
237
310
|
? zone.seed
|
|
238
311
|
: polygonInteriorPoint({ polygon: face.polygon.outer, holes: face.polygon.holes }, !zone.seed);
|
|
@@ -447,6 +520,7 @@ function planLevelStructure({ levelId, nodes, mintId, openingIndex, }) {
|
|
|
447
520
|
material: template?.material,
|
|
448
521
|
materialPreset: template?.materialPreset,
|
|
449
522
|
slots: template?.slots,
|
|
523
|
+
buildUp: template?.buildUp,
|
|
450
524
|
visible: template?.visible,
|
|
451
525
|
});
|
|
452
526
|
const updated = {
|
|
@@ -594,11 +668,36 @@ function planLevelStructure({ levelId, nodes, mintId, openingIndex, }) {
|
|
|
594
668
|
for (const components of ceilingComponentsByFace.values())
|
|
595
669
|
for (const ceiling of components)
|
|
596
670
|
ceiling.children = [...new Set(ceiling.children)].sort();
|
|
671
|
+
// A covered porch's posts and beam (`lib/porch-framing-sync`).
|
|
672
|
+
const porchFraming = reconcilePorchFraming({
|
|
673
|
+
levelId,
|
|
674
|
+
nodes,
|
|
675
|
+
previousNodes,
|
|
676
|
+
zones: [
|
|
677
|
+
...new Map([...allZones, ...next.values()].flatMap((zone) => zone.type === 'zone' && !deleted.has(zone.id)
|
|
678
|
+
? [[zone.id, (next.get(zone.id) ?? zone)]]
|
|
679
|
+
: [])).values(),
|
|
680
|
+
],
|
|
681
|
+
plates: floorPlan.plates,
|
|
682
|
+
current: (id) => next.get(id) ?? nodes[id],
|
|
683
|
+
mintId,
|
|
684
|
+
});
|
|
685
|
+
for (const node of porchFraming.put)
|
|
686
|
+
put(node);
|
|
687
|
+
for (const id of porchFraming.delete)
|
|
688
|
+
deleted.add(id);
|
|
597
689
|
const spans = snapshot.rooms.flatMap((room) => room.spans);
|
|
598
|
-
const outdoor = outdoorRoomIds([...zoneByFace].map(([index, zone]) =>
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
690
|
+
const outdoor = outdoorRoomIds([...zoneByFace].map(([index, zone]) => {
|
|
691
|
+
const current = (next.get(zone.id) ?? zone);
|
|
692
|
+
return {
|
|
693
|
+
spans: faces[index].spans,
|
|
694
|
+
hasCeiling: current.hasCeiling !== false,
|
|
695
|
+
outdoor: isOutdoorRoom(current),
|
|
696
|
+
};
|
|
697
|
+
}));
|
|
698
|
+
// A room a railing fences off from the outside (a deck's guard) is outside too.
|
|
699
|
+
for (const id of railingFencedRoomIds(spans, railingWallIds(walls)))
|
|
700
|
+
outdoor.add(id);
|
|
602
701
|
for (const wall of walls)
|
|
603
702
|
put({ ...wall, ...next.get(wall.id), ...classifyWallSides(wall, spans, outdoor) });
|
|
604
703
|
for (const ceiling of allCeilings) {
|
|
@@ -706,7 +805,12 @@ export function createLevelStructurePreview(levelId, nodes) {
|
|
|
706
805
|
let wallIds = new Set(Object.values(draft)
|
|
707
806
|
.filter((node) => node.type === 'wall' && node.parentId === levelId)
|
|
708
807
|
.map((node) => node.id));
|
|
709
|
-
|
|
808
|
+
let separatorIds = new Set(Object.values(draft)
|
|
809
|
+
.filter((node) => node.type === 'separator' && node.parentId === levelId)
|
|
810
|
+
.map((node) => node.id));
|
|
811
|
+
// `separators`, when given, are the level's invisible walls as the gesture
|
|
812
|
+
// leaves them (an invisible-wall push); left out, the stored ones stand.
|
|
813
|
+
return (walls, separators) => {
|
|
710
814
|
const currentIds = new Set();
|
|
711
815
|
for (const wall of walls) {
|
|
712
816
|
if (wall.parentId !== levelId)
|
|
@@ -720,6 +824,20 @@ export function createLevelStructurePreview(levelId, nodes) {
|
|
|
720
824
|
if (!currentIds.has(id))
|
|
721
825
|
delete draft[id];
|
|
722
826
|
wallIds = currentIds;
|
|
827
|
+
if (separators) {
|
|
828
|
+
const current = new Set();
|
|
829
|
+
for (const separator of separators) {
|
|
830
|
+
if (separator.parentId !== levelId)
|
|
831
|
+
continue;
|
|
832
|
+
current.add(separator.id);
|
|
833
|
+
if (draft[separator.id] !== separator)
|
|
834
|
+
draft[separator.id] = separator;
|
|
835
|
+
}
|
|
836
|
+
for (const id of separatorIds)
|
|
837
|
+
if (!current.has(id))
|
|
838
|
+
delete draft[id];
|
|
839
|
+
separatorIds = current;
|
|
840
|
+
}
|
|
723
841
|
let id = 0;
|
|
724
842
|
// The stored surfaces are the committed reconciliation; only what the
|
|
725
843
|
// moved walls reshape differs from them.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type NodePatch, type SceneNodes, type StructureEvent } from './structure-kernel.js';
|
|
2
|
-
export type StructureIdFactory = (kind: 'zone' | 'ceiling' | 'slab' | 'separator') => string;
|
|
2
|
+
export type StructureIdFactory = (kind: 'zone' | 'ceiling' | 'slab' | 'separator' | 'column' | 'beam') => string;
|
|
3
3
|
export type SceneStructureInput = {
|
|
4
4
|
nodes: SceneNodes;
|
|
5
5
|
levelIds?: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structure-reconcile.d.ts","sourceRoot":"","sources":["../../src/lib/structure-reconcile.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,KAAK,SAAS,EAEd,KAAK,UAAU,EACf,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"structure-reconcile.d.ts","sourceRoot":"","sources":["../../src/lib/structure-reconcile.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,KAAK,SAAS,EAEd,KAAK,UAAU,EACf,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAA;AAG3B,MAAM,MAAM,kBAAkB,GAAG,CAC/B,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,KAChE,MAAM,CAAA;AACX,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,UAAU,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,MAAM,EAAE,kBAAkB,CAAA;IAC1B,aAAa,CAAC,EAAE,UAAU,CAAA;CAC3B,CAAA;AACD,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,UAAU,CAAA;IACjB,OAAO,EAAE,SAAS,EAAE,CAAA;IACpB,MAAM,EAAE,cAAc,EAAE,CAAA;CACzB,CAAA;AAyED,wBAAgB,uBAAuB,CAAC,EACtC,KAAK,EACL,QAAQ,EACR,MAAM,EACN,aAAa,GACd,EAAE,mBAAmB,GAAG,oBAAoB,CAiL5C"}
|