@pascal-app/core 1.0.0 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/capture/index.d.ts +2 -2
- package/dist/capture/index.js +2 -2
- package/dist/capture/schema.d.ts.map +1 -1
- package/dist/capture/schema.js +2 -0
- package/dist/capture/source.d.ts +1 -1
- package/dist/capture/source.js +1 -1
- package/dist/events/bus.d.ts +6 -3
- package/dist/events/bus.d.ts.map +1 -1
- package/dist/hooks/spatial-grid/floor-placed-elevation.d.ts +4 -4
- package/dist/hooks/spatial-grid/floor-placed-elevation.d.ts.map +1 -1
- package/dist/hooks/spatial-grid/floor-placed-elevation.js +7 -12
- package/dist/hooks/spatial-grid/floor-placed-footprints.d.ts +4 -0
- package/dist/hooks/spatial-grid/floor-placed-footprints.d.ts.map +1 -0
- package/dist/hooks/spatial-grid/floor-placed-footprints.js +7 -0
- package/dist/hooks/spatial-grid/spatial-grid-manager.d.ts +5 -8
- package/dist/hooks/spatial-grid/spatial-grid-manager.d.ts.map +1 -1
- package/dist/hooks/spatial-grid/spatial-grid-manager.js +23 -106
- package/dist/hooks/spatial-grid/spatial-grid-sync.d.ts +263 -84
- package/dist/hooks/spatial-grid/spatial-grid-sync.d.ts.map +1 -1
- package/dist/hooks/spatial-grid/spatial-grid-sync.js +77 -13
- package/dist/hooks/spatial-grid/support-host-patch.d.ts +1 -1
- package/dist/hooks/spatial-grid/support-host-patch.js +6 -6
- package/dist/hooks/spatial-grid/use-spatial-query.d.ts +1 -1
- package/dist/hooks/spatial-grid/use-spatial-query.js +1 -1
- package/dist/index.d.ts +77 -72
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +74 -69
- package/dist/lib/door-operation.d.ts +1 -1
- package/dist/lib/item-polygon-overlap.d.ts +6 -0
- package/dist/lib/item-polygon-overlap.d.ts.map +1 -0
- package/dist/lib/item-polygon-overlap.js +67 -0
- package/dist/lib/level-name.d.ts +1 -1
- package/dist/lib/measurement-geometry.d.ts +4 -4
- package/dist/lib/node-visibility.d.ts +12 -0
- package/dist/lib/node-visibility.d.ts.map +1 -0
- package/dist/lib/node-visibility.js +12 -0
- package/dist/lib/plan-footprint.d.ts +41 -0
- package/dist/lib/plan-footprint.d.ts.map +1 -0
- package/dist/lib/plan-footprint.js +58 -0
- package/dist/lib/room-topology-index.d.ts +1 -1
- package/dist/lib/room-topology-index.js +1 -1
- package/dist/lib/selection-proxy.d.ts +1 -1
- package/dist/lib/slab-polygon.d.ts +2 -2
- package/dist/lib/slab-polygon.js +2 -2
- package/dist/lib/space-detection.d.ts +1 -1
- package/dist/lib/space-detection.d.ts.map +1 -1
- package/dist/lib/space-detection.js +16 -11
- package/dist/lib/terrain-brush.d.ts +1 -1
- package/dist/lib/terrain-brush.js +1 -1
- package/dist/lib/terrain-codec.d.ts +2 -2
- package/dist/lib/terrain-codec.js +1 -1
- package/dist/lib/terrain-raycast.d.ts +1 -1
- package/dist/lib/terrain-raycast.js +1 -1
- package/dist/lib/terrain-source.d.ts +3 -3
- package/dist/lib/terrain-source.js +3 -3
- package/dist/lib/terrain-support.d.ts +1 -1
- package/dist/lib/terrain-support.js +3 -3
- package/dist/lib/unit-containment.d.ts +19 -0
- package/dist/lib/unit-containment.d.ts.map +1 -0
- package/dist/lib/unit-containment.js +158 -0
- package/dist/lib/unit-report.d.ts +19 -0
- package/dist/lib/unit-report.d.ts.map +1 -0
- package/dist/lib/unit-report.js +36 -0
- package/dist/lib/wall-distance.d.ts +2 -2
- package/dist/lib/wall-distance.js +1 -1
- package/dist/lib/zone-quantities.d.ts +1 -1
- package/dist/lib/zone-quantities.js +7 -7
- package/dist/material-library.d.ts +1 -1
- package/dist/material-library.js +1 -1
- package/dist/procedural-items/fixtures.d.ts +261 -0
- package/dist/procedural-items/fixtures.d.ts.map +1 -0
- package/dist/procedural-items/fixtures.js +349 -0
- package/dist/procedural-items/index.d.ts +10 -0
- package/dist/procedural-items/index.d.ts.map +1 -0
- package/dist/procedural-items/index.js +9 -0
- package/dist/procedural-items/integration.d.ts +92 -0
- package/dist/procedural-items/integration.d.ts.map +1 -0
- package/dist/procedural-items/integration.js +19 -0
- package/dist/procedural-items/library-colors.d.ts +56 -0
- package/dist/procedural-items/library-colors.d.ts.map +1 -0
- package/dist/procedural-items/library-colors.js +84 -0
- package/dist/procedural-items/materials.d.ts +5 -0
- package/dist/procedural-items/materials.d.ts.map +1 -0
- package/dist/procedural-items/materials.js +47 -0
- package/dist/procedural-items/node.d.ts +280 -0
- package/dist/procedural-items/node.d.ts.map +1 -0
- package/dist/procedural-items/node.js +71 -0
- package/dist/procedural-items/placement.d.ts +7 -0
- package/dist/procedural-items/placement.d.ts.map +1 -0
- package/dist/procedural-items/placement.js +48 -0
- package/dist/procedural-items/query.d.ts +51 -0
- package/dist/procedural-items/query.d.ts.map +1 -0
- package/dist/procedural-items/query.js +342 -0
- package/dist/procedural-items/recipe.d.ts +144 -0
- package/dist/procedural-items/recipe.d.ts.map +1 -0
- package/dist/procedural-items/recipe.js +372 -0
- package/dist/procedural-items/spatial.d.ts +19 -0
- package/dist/procedural-items/spatial.d.ts.map +1 -0
- package/dist/procedural-items/spatial.js +39 -0
- package/dist/registry/__bench__/relations-resolver.bench.js +2 -2
- package/dist/registry/handles.d.ts +40 -5
- package/dist/registry/handles.d.ts.map +1 -1
- package/dist/registry/index.d.ts +6 -6
- package/dist/registry/index.d.ts.map +1 -1
- package/dist/registry/index.js +4 -4
- package/dist/registry/registry.d.ts +1 -1
- package/dist/registry/relations-resolver.d.ts +2 -2
- package/dist/registry/relations-resolver.js +1 -1
- package/dist/registry/scene-api.d.ts +2 -2
- package/dist/registry/scene-api.js +2 -2
- package/dist/registry/subtree.d.ts +1 -1
- package/dist/registry/subtree.d.ts.map +1 -1
- package/dist/registry/subtree.js +8 -2
- package/dist/registry/types.d.ts +32 -10
- package/dist/registry/types.d.ts.map +1 -1
- package/dist/registry/use-registry-version.js +1 -1
- package/dist/registry/validate-relations.d.ts +4 -0
- package/dist/registry/validate-relations.d.ts.map +1 -0
- package/dist/registry/validate-relations.js +22 -0
- package/dist/schema/__bench__/node-parsers.bench.js +3 -3
- package/dist/schema/__fixtures__/node-fixtures.d.ts +1 -1
- package/dist/schema/__fixtures__/node-fixtures.d.ts.map +1 -1
- package/dist/schema/__fixtures__/node-fixtures.js +4 -2
- package/dist/schema/base.js +1 -1
- package/dist/schema/collections.d.ts +1 -1
- package/dist/schema/collections.js +1 -1
- package/dist/schema/compiled-node-parsers.d.ts +1 -1
- package/dist/schema/compiled-node-parsers.js +1 -1
- package/dist/schema/index.d.ts +74 -70
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +65 -61
- package/dist/schema/material.d.ts +1 -1
- package/dist/schema/material.js +1 -1
- package/dist/schema/nodes/automatic-downspout.d.ts +4 -4
- package/dist/schema/nodes/automatic-downspout.js +5 -5
- package/dist/schema/nodes/block.d.ts +3 -3
- package/dist/schema/nodes/block.d.ts.map +1 -1
- package/dist/schema/nodes/block.js +24 -12
- package/dist/schema/nodes/box-vent.js +2 -2
- package/dist/schema/nodes/building.d.ts +1 -1
- package/dist/schema/nodes/building.d.ts.map +1 -1
- package/dist/schema/nodes/building.js +8 -5
- package/dist/schema/nodes/cabinet.d.ts +4 -4
- package/dist/schema/nodes/cabinet.js +4 -4
- package/dist/schema/nodes/ceiling.d.ts +1 -1
- package/dist/schema/nodes/ceiling.js +5 -5
- package/dist/schema/nodes/chimney.js +2 -2
- package/dist/schema/nodes/column.d.ts +1 -0
- package/dist/schema/nodes/column.d.ts.map +1 -1
- package/dist/schema/nodes/column.js +3 -2
- package/dist/schema/nodes/construction-dimension.d.ts +3 -3
- package/dist/schema/nodes/construction-dimension.js +2 -2
- package/dist/schema/nodes/cupola.d.ts +1 -1
- package/dist/schema/nodes/cupola.js +2 -2
- package/dist/schema/nodes/curtain-wall.d.ts +129 -0
- package/dist/schema/nodes/curtain-wall.d.ts.map +1 -0
- package/dist/schema/nodes/curtain-wall.js +49 -0
- package/dist/schema/nodes/door.d.ts +2 -2
- package/dist/schema/nodes/door.js +2 -2
- package/dist/schema/nodes/dormer.d.ts +3 -3
- package/dist/schema/nodes/dormer.js +4 -4
- package/dist/schema/nodes/downspout.js +2 -2
- package/dist/schema/nodes/duct-fitting.js +1 -1
- package/dist/schema/nodes/duct-segment.js +2 -2
- package/dist/schema/nodes/duct-terminal.js +1 -1
- package/dist/schema/nodes/elevator.js +2 -2
- package/dist/schema/nodes/eyebrow-vent.js +2 -2
- package/dist/schema/nodes/fence.js +2 -2
- package/dist/schema/nodes/guide.js +2 -2
- package/dist/schema/nodes/gutter.d.ts +1 -1
- package/dist/schema/nodes/gutter.js +4 -4
- package/dist/schema/nodes/hvac-equipment.js +1 -1
- package/dist/schema/nodes/imported-mesh.d.ts +40 -0
- package/dist/schema/nodes/imported-mesh.d.ts.map +1 -0
- package/dist/schema/nodes/imported-mesh.js +27 -0
- package/dist/schema/nodes/item.d.ts +3 -3
- package/dist/schema/nodes/item.js +3 -3
- package/dist/schema/nodes/lean-to-extension.js +4 -4
- package/dist/schema/nodes/level.d.ts +1 -1
- package/dist/schema/nodes/level.d.ts.map +1 -1
- package/dist/schema/nodes/level.js +1 -1
- package/dist/schema/nodes/lineset.js +1 -1
- package/dist/schema/nodes/liquid-line.js +1 -1
- package/dist/schema/nodes/measurement.js +2 -2
- package/dist/schema/nodes/pipe-fitting.d.ts +1 -1
- package/dist/schema/nodes/pipe-fitting.js +1 -1
- package/dist/schema/nodes/pipe-segment.d.ts +1 -1
- package/dist/schema/nodes/pipe-segment.js +2 -2
- package/dist/schema/nodes/pipe-trap.d.ts +1 -1
- package/dist/schema/nodes/pipe-trap.js +1 -1
- package/dist/schema/nodes/ridge-vent.d.ts +1 -1
- package/dist/schema/nodes/ridge-vent.js +3 -3
- package/dist/schema/nodes/roof-segment-shape.d.ts +1 -1
- package/dist/schema/nodes/roof-segment-shape.js +1 -1
- package/dist/schema/nodes/roof-segment-walls.d.ts +1 -1
- package/dist/schema/nodes/roof-segment-walls.js +1 -1
- package/dist/schema/nodes/roof-segment.d.ts +2 -2
- package/dist/schema/nodes/roof-segment.js +2 -2
- package/dist/schema/nodes/roof.d.ts +1 -1
- package/dist/schema/nodes/roof.js +3 -3
- package/dist/schema/nodes/scan.js +3 -3
- package/dist/schema/nodes/shelf.d.ts +1 -1
- package/dist/schema/nodes/shelf.d.ts.map +1 -1
- package/dist/schema/nodes/shelf.js +3 -4
- package/dist/schema/nodes/site.js +2 -2
- package/dist/schema/nodes/skylight.d.ts +4 -4
- package/dist/schema/nodes/skylight.js +2 -2
- package/dist/schema/nodes/slab.js +3 -3
- package/dist/schema/nodes/solar-panel.js +3 -3
- package/dist/schema/nodes/spawn.js +1 -1
- package/dist/schema/nodes/stair-segment.js +2 -2
- package/dist/schema/nodes/stair.d.ts +1 -1
- package/dist/schema/nodes/stair.js +3 -3
- package/dist/schema/nodes/structural-grid.js +1 -1
- package/dist/schema/nodes/turbine-vent.d.ts +1 -1
- package/dist/schema/nodes/turbine-vent.js +2 -2
- package/dist/schema/nodes/unit.d.ts +33 -0
- package/dist/schema/nodes/unit.d.ts.map +1 -0
- package/dist/schema/nodes/unit.js +13 -0
- package/dist/schema/nodes/wall.d.ts +75 -2
- package/dist/schema/nodes/wall.d.ts.map +1 -1
- package/dist/schema/nodes/wall.js +10 -6
- package/dist/schema/nodes/window.js +2 -2
- package/dist/schema/nodes/zone.js +1 -1
- package/dist/schema/scene-material.js +2 -2
- package/dist/schema/types.d.ts +417 -22
- package/dist/schema/types.d.ts.map +1 -1
- package/dist/schema/types.js +56 -49
- package/dist/services/__fixtures__/hosting.d.ts +3 -0
- package/dist/services/__fixtures__/hosting.d.ts.map +1 -0
- package/dist/services/__fixtures__/hosting.js +9 -0
- package/dist/services/__fixtures__/shelf-surface-rows.d.ts +4 -0
- package/dist/services/__fixtures__/shelf-surface-rows.d.ts.map +1 -0
- package/dist/services/__fixtures__/shelf-surface-rows.js +18 -0
- package/dist/services/alignment-anchors.d.ts +6 -11
- package/dist/services/alignment-anchors.d.ts.map +1 -1
- package/dist/services/alignment-anchors.js +7 -34
- package/dist/services/drag-session.d.ts +4 -4
- package/dist/services/drag-session.js +1 -1
- package/dist/services/hosting.d.ts +5 -8
- package/dist/services/hosting.d.ts.map +1 -1
- package/dist/services/hosting.js +25 -18
- package/dist/services/index.d.ts +16 -13
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +16 -13
- package/dist/services/level-height.d.ts +2 -2
- package/dist/services/level-height.js +3 -3
- package/dist/services/movement.d.ts +3 -3
- package/dist/services/movement.js +2 -2
- package/dist/services/port-connectivity.d.ts +1 -1
- package/dist/services/port-connectivity.js +1 -1
- package/dist/services/riser-diagram.d.ts +1 -1
- package/dist/services/shelf-board.d.ts +5 -0
- package/dist/services/shelf-board.d.ts.map +1 -0
- package/dist/services/shelf-board.js +15 -0
- package/dist/services/snap.d.ts +3 -0
- package/dist/services/snap.d.ts.map +1 -1
- package/dist/services/snap.js +11 -0
- package/dist/services/storey.d.ts +2 -2
- package/dist/services/storey.js +2 -2
- package/dist/services/surface-hosting-procedural-parity.fixtures.d.ts +13 -0
- package/dist/services/surface-hosting-procedural-parity.fixtures.d.ts.map +1 -0
- package/dist/services/surface-hosting-procedural-parity.fixtures.js +4691 -0
- package/dist/services/surface-hosting-shelf-parity.fixtures.d.ts +1060 -0
- package/dist/services/surface-hosting-shelf-parity.fixtures.d.ts.map +1 -0
- package/dist/services/surface-hosting-shelf-parity.fixtures.js +3127 -0
- package/dist/services/surface-hosting.d.ts +92 -0
- package/dist/services/surface-hosting.d.ts.map +1 -0
- package/dist/services/surface-hosting.js +305 -0
- package/dist/services/surface-region.d.ts +8 -0
- package/dist/services/surface-region.d.ts.map +1 -0
- package/dist/services/surface-region.js +44 -0
- package/dist/services/system-graph.d.ts +2 -2
- package/dist/services/system-graph.js +2 -2
- package/dist/services/validate-dwv.d.ts +1 -1
- package/dist/services/validate-dwv.js +1 -1
- package/dist/store/actions/node-actions.d.ts +2 -2
- package/dist/store/actions/node-actions.d.ts.map +1 -1
- package/dist/store/actions/node-actions.js +50 -104
- package/dist/store/history-control.d.ts +3 -3
- package/dist/store/history-invalidation.d.ts +1 -1
- package/dist/store/history-invalidation.js +1 -1
- package/dist/store/use-interactive.d.ts +2 -2
- package/dist/store/use-live-terrain.d.ts +1 -1
- package/dist/store/use-scene.d.ts +4 -4
- package/dist/store/use-scene.d.ts.map +1 -1
- package/dist/store/use-scene.js +50 -32
- package/dist/systems/elevator/elevator-dispatch.d.ts +2 -2
- package/dist/systems/elevator/elevator-dispatch.js +1 -1
- package/dist/systems/elevator/elevator-geometry.d.ts +1 -1
- package/dist/systems/elevator/elevator-opening-sync.d.ts +1 -1
- package/dist/systems/elevator/elevator-opening-sync.js +2 -2
- package/dist/systems/elevator/elevator-opening-system.js +3 -3
- package/dist/systems/elevator/elevator-runtime.d.ts +3 -3
- package/dist/systems/elevator/elevator-runtime.js +3 -3
- package/dist/systems/elevator/elevator-service.d.ts +1 -1
- package/dist/systems/elevator/elevator-service.js +1 -1
- package/dist/systems/fence/fence-centerline.d.ts +2 -2
- package/dist/systems/fence/fence-centerline.js +2 -2
- package/dist/systems/fence/fence-spline.d.ts +2 -2
- package/dist/systems/roof/roof-elevation-system.js +3 -3
- package/dist/systems/roof/roof-elevation.d.ts +2 -2
- package/dist/systems/roof/roof-elevation.js +6 -6
- package/dist/systems/roof/roof-footprint.d.ts +1 -1
- package/dist/systems/roof/roof-footprint.js +3 -3
- package/dist/systems/slab/slab-placement.d.ts +1 -1
- package/dist/systems/slab/slab-support.d.ts +1 -1
- package/dist/systems/slab/slab-support.js +4 -4
- package/dist/systems/stair/stair-flight.d.ts +2 -2
- package/dist/systems/stair/stair-flight.js +2 -2
- package/dist/systems/stair/stair-footprint.d.ts +1 -1
- package/dist/systems/stair/stair-opening-preview.d.ts +248 -87
- package/dist/systems/stair/stair-opening-preview.d.ts.map +1 -1
- package/dist/systems/stair/stair-opening-preview.js +2 -2
- package/dist/systems/stair/stair-opening-sync.d.ts +1 -1
- package/dist/systems/stair/stair-opening-sync.js +6 -6
- package/dist/systems/stair/stair-opening-system.js +8 -8
- package/dist/systems/stair/stair-rise.d.ts +1 -1
- package/dist/systems/stair/stair-rise.js +3 -3
- package/dist/systems/wall/wall-curve.d.ts +2 -2
- package/dist/systems/wall/wall-footprint.d.ts +3 -3
- package/dist/systems/wall/wall-footprint.js +3 -3
- package/dist/systems/wall/wall-merge.d.ts +38 -0
- package/dist/systems/wall/wall-merge.d.ts.map +1 -0
- package/dist/systems/wall/wall-merge.js +240 -0
- package/dist/systems/wall/wall-mitering.d.ts +1 -1
- package/dist/systems/wall/wall-mitering.js +1 -1
- package/dist/systems/wall/wall-move.d.ts +1 -1
- package/dist/systems/wall/wall-operations.d.ts +28 -0
- package/dist/systems/wall/wall-operations.d.ts.map +1 -0
- package/dist/systems/wall/wall-operations.js +145 -0
- package/dist/systems/wall/wall-top.d.ts +1 -1
- package/dist/systems/wall/wall-topology.d.ts +9 -2
- package/dist/systems/wall/wall-topology.d.ts.map +1 -1
- package/dist/systems/wall/wall-topology.js +57 -9
- package/dist/utils/clone-scene-graph.d.ts +3 -3
- package/dist/utils/clone-scene-graph.d.ts.map +1 -1
- package/dist/utils/clone-scene-graph.js +9 -3
- package/dist/utils/scene-migrations.d.ts +3 -3
- package/dist/utils/scene-migrations.js +3 -3
- package/dist/utils/vertical-scene-migration.js +5 -5
- package/dist/validation/validate-build-json.d.ts +5 -2
- package/dist/validation/validate-build-json.d.ts.map +1 -1
- package/dist/validation/validate-build-json.js +57 -4
- package/package.json +15 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wall-topology.d.ts","sourceRoot":"","sources":["../../../src/systems/wall/wall-topology.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,SAAS,EAId,KAAK,QAAQ,EAGd,MAAM,cAAc,CAAA;AAErB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa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,aAAa,EACpB,GAAG,EAAE,aAAa,EAClB,KAAK,EAAE,QAAQ,EAAE,GAChB,KAAK,CAAC,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC,CAiBvC;AAwDD,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,EACjC,IAAI,EAAE;IACJ,OAAO,EAAE,SAAS,GAAG,IAAI,CAAA;IACzB,KAAK,EAAE,aAAa,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAClC,GACA,oBAAoB,CAqCtB;AA4OD,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,EACjC,IAAI,EAAE;IACJ,OAAO,EAAE,SAAS,CAAA;IAClB,KAAK,EAAE,aAAa,CAAA;IACpB,GAAG,EAAE,aAAa,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAA;CACjC,GACA,mBAAmB,CAoHrB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { GROUND_SUPPORT_ID } from '../../hooks/spatial-grid/support-host-id';
|
|
2
|
-
import { terrainSupportLift } from '../../lib/terrain-support';
|
|
3
|
-
import { getScaledDimensions, WallNode as WallSchema, } from '../../schema';
|
|
4
|
-
import { getWallArcData, getWallCurveFrameAt, getWallCurveLength, isCurvedWall } from './wall-curve';
|
|
1
|
+
import { GROUND_SUPPORT_ID } from '../../hooks/spatial-grid/support-host-id.js';
|
|
2
|
+
import { terrainSupportLift } from '../../lib/terrain-support.js';
|
|
3
|
+
import { getScaledDimensions, WallNode as WallSchema, } from '../../schema/index.js';
|
|
4
|
+
import { getWallArcData, getWallCurveFrameAt, getWallCurveLength, isCurvedWall } from './wall-curve.js';
|
|
5
5
|
const WALL_MIN_LENGTH = 0.01;
|
|
6
6
|
const WALL_SPLIT_ENDPOINT_EPSILON = 0.02;
|
|
7
7
|
const WALL_INTERSECTION_EPSILON = 1e-6;
|
|
@@ -13,12 +13,13 @@ function distanceSquared(a, b) {
|
|
|
13
13
|
function isSegmentLongEnough(start, end) {
|
|
14
14
|
return distanceSquared(start, end) >= WALL_MIN_LENGTH * WALL_MIN_LENGTH;
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
/** Where straight walls run along `start→end`, as sorted parameter intervals of it. */
|
|
17
|
+
function collinearWallIntervals(start, end, walls) {
|
|
17
18
|
const dx = end[0] - start[0];
|
|
18
19
|
const dz = end[1] - start[1];
|
|
19
20
|
const lengthSquared = dx * dx + dz * dz;
|
|
20
21
|
if (lengthSquared <= WALL_INTERSECTION_EPSILON * WALL_INTERSECTION_EPSILON)
|
|
21
|
-
return
|
|
22
|
+
return null;
|
|
22
23
|
const length = Math.sqrt(lengthSquared);
|
|
23
24
|
const intervals = [];
|
|
24
25
|
for (const wall of walls) {
|
|
@@ -37,9 +38,15 @@ function wallSegmentsCoverSegment(start, end, walls) {
|
|
|
37
38
|
intervals.push([intervalStart, intervalEnd]);
|
|
38
39
|
}
|
|
39
40
|
intervals.sort((left, right) => left[0] - right[0]);
|
|
40
|
-
|
|
41
|
+
return { intervals, length };
|
|
42
|
+
}
|
|
43
|
+
function wallSegmentsCoverSegment(start, end, walls) {
|
|
44
|
+
const collinear = collinearWallIntervals(start, end, walls);
|
|
45
|
+
if (!collinear)
|
|
46
|
+
return false;
|
|
47
|
+
const parameterTolerance = WALL_INTERSECTION_EPSILON / collinear.length;
|
|
41
48
|
let coveredUntil = 0;
|
|
42
|
-
for (const [intervalStart, intervalEnd] of intervals) {
|
|
49
|
+
for (const [intervalStart, intervalEnd] of collinear.intervals) {
|
|
43
50
|
if (intervalStart > coveredUntil + parameterTolerance)
|
|
44
51
|
return false;
|
|
45
52
|
coveredUntil = Math.max(coveredUntil, intervalEnd);
|
|
@@ -48,6 +55,32 @@ function wallSegmentsCoverSegment(start, end, walls) {
|
|
|
48
55
|
}
|
|
49
56
|
return false;
|
|
50
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* The parts of `start→end` that no straight wall already runs along, in order.
|
|
60
|
+
* A side drawn along an existing wall and past its end yields the overhang
|
|
61
|
+
* only, so the existing wall is reused instead of doubled. Gaps too short to
|
|
62
|
+
* be a wall are treated as covered.
|
|
63
|
+
*/
|
|
64
|
+
export function uncoveredWallSegments(start, end, walls) {
|
|
65
|
+
const collinear = collinearWallIntervals(start, end, walls);
|
|
66
|
+
if (!collinear)
|
|
67
|
+
return [];
|
|
68
|
+
const minimumGap = WALL_MIN_LENGTH / collinear.length;
|
|
69
|
+
const at = (t) => [
|
|
70
|
+
start[0] + (end[0] - start[0]) * t,
|
|
71
|
+
start[1] + (end[1] - start[1]) * t,
|
|
72
|
+
];
|
|
73
|
+
const segments = [];
|
|
74
|
+
let coveredUntil = 0;
|
|
75
|
+
for (const [intervalStart, intervalEnd] of collinear.intervals) {
|
|
76
|
+
if (intervalStart > coveredUntil + minimumGap)
|
|
77
|
+
segments.push([at(coveredUntil), at(intervalStart)]);
|
|
78
|
+
coveredUntil = Math.max(coveredUntil, intervalEnd);
|
|
79
|
+
}
|
|
80
|
+
if (coveredUntil < 1 - minimumGap)
|
|
81
|
+
segments.push([at(coveredUntil), end]);
|
|
82
|
+
return segments;
|
|
83
|
+
}
|
|
51
84
|
function projectPointOntoWallCenterline(point, wall) {
|
|
52
85
|
if (isCurvedWall(wall)) {
|
|
53
86
|
const arc = getWallArcData(wall);
|
|
@@ -396,13 +429,28 @@ export function planWallInsertion(nodes, args) {
|
|
|
396
429
|
return split ? [[wallId, split]] : [];
|
|
397
430
|
});
|
|
398
431
|
const replacementWalls = splitPlans.flatMap(([, split]) => split.create);
|
|
432
|
+
// Rooms name the walls that enclose them; a split wall's replacements take
|
|
433
|
+
// its place, as they do for an explicit division or a merge.
|
|
434
|
+
const replacements = new Map(splitPlans.map(([wallId, split]) => [wallId, split.create.map((wall) => wall.id)]));
|
|
435
|
+
const zoneUpdates = Object.values(nodes).flatMap((node) => node.type === 'zone' &&
|
|
436
|
+
node.parentId === args.levelId &&
|
|
437
|
+
node.boundaryWallIds.some((id) => replacements.has(id))
|
|
438
|
+
? [
|
|
439
|
+
{
|
|
440
|
+
id: node.id,
|
|
441
|
+
data: {
|
|
442
|
+
boundaryWallIds: node.boundaryWallIds.flatMap((id) => replacements.get(id) ?? [id]),
|
|
443
|
+
},
|
|
444
|
+
},
|
|
445
|
+
]
|
|
446
|
+
: []);
|
|
399
447
|
const plan = {
|
|
400
448
|
changes: {
|
|
401
449
|
create: [...replacementWalls, ...insertedWalls].map((node) => ({
|
|
402
450
|
node,
|
|
403
451
|
parentId: args.levelId,
|
|
404
452
|
})),
|
|
405
|
-
update: splitPlans.flatMap(([, split]) => split.update),
|
|
453
|
+
update: [...splitPlans.flatMap(([, split]) => split.update), ...zoneUpdates],
|
|
406
454
|
delete: splitPlans.map(([wallId]) => wallId),
|
|
407
455
|
},
|
|
408
456
|
insertedWalls,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { AnyNode, AnyNodeId } from '../schema';
|
|
2
|
-
import type { Collection, CollectionId } from '../schema/collections';
|
|
3
|
-
import type { SceneMaterial, SceneMaterialId } from '../schema/scene-material';
|
|
1
|
+
import type { AnyNode, AnyNodeId } from '../schema/index.js';
|
|
2
|
+
import type { Collection, CollectionId } from '../schema/collections.js';
|
|
3
|
+
import type { SceneMaterial, SceneMaterialId } from '../schema/scene-material.js';
|
|
4
4
|
export type SceneGraph = {
|
|
5
5
|
nodes: Record<AnyNodeId, AnyNode>;
|
|
6
6
|
rootNodeIds: AnyNodeId[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clone-scene-graph.d.ts","sourceRoot":"","sources":["../../src/utils/clone-scene-graph.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAEnD,OAAO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;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,EACjC,OAAO,EAAE,SAAS,GACjB;IAAE,WAAW,EAAE,OAAO,EAAE,CAAC;IAAC,UAAU,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAqH/E;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,UAAU,EAAE,UAAU,EACtB,OAAO,GAAE,qBAA0B,GAClC,UAAU,CA0EZ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { GROUND_SUPPORT_ID } from '../hooks/spatial-grid/floor-placed-elevation';
|
|
2
|
-
import { remapConstructionDimensionReferences, remapMeasurementReferences, } from '../lib/measurement-geometry';
|
|
3
|
-
import { generateId } from '../schema/base';
|
|
1
|
+
import { GROUND_SUPPORT_ID } from '../hooks/spatial-grid/floor-placed-elevation.js';
|
|
2
|
+
import { remapConstructionDimensionReferences, remapMeasurementReferences, } from '../lib/measurement-geometry.js';
|
|
3
|
+
import { generateId } from '../schema/base.js';
|
|
4
4
|
/**
|
|
5
5
|
* Extracts the type prefix from a node ID (e.g., "wall_abc123" -> "wall")
|
|
6
6
|
*/
|
|
@@ -84,6 +84,12 @@ export function cloneSceneGraph(sceneGraph) {
|
|
|
84
84
|
;
|
|
85
85
|
clonedNode.supportSlabId = idMap.get(clonedNode.supportSlabId);
|
|
86
86
|
}
|
|
87
|
+
if (clonedNode.type === 'unit') {
|
|
88
|
+
clonedNode.members = clonedNode.members.flatMap((id) => {
|
|
89
|
+
const remapped = idMap.get(id);
|
|
90
|
+
return remapped ? [remapped] : [];
|
|
91
|
+
});
|
|
92
|
+
}
|
|
87
93
|
if ('deckSlabId' in clonedNode && typeof clonedNode.deckSlabId === 'string') {
|
|
88
94
|
;
|
|
89
95
|
clonedNode.deckSlabId = idMap.get(clonedNode.deckSlabId);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { type HealSceneResult, healSceneNodes } from './heal-scene-graph';
|
|
2
|
-
export { type RetiredSceneNodeMigration, removeRetiredDrawingSheetNodes, } from './retired-scene-nodes';
|
|
3
|
-
export { migrateVerticalSceneNodes, type VerticalSceneMigration, } from './vertical-scene-migration';
|
|
1
|
+
export { type HealSceneResult, healSceneNodes } from './heal-scene-graph.js';
|
|
2
|
+
export { type RetiredSceneNodeMigration, removeRetiredDrawingSheetNodes, } from './retired-scene-nodes.js';
|
|
3
|
+
export { migrateVerticalSceneNodes, type VerticalSceneMigration, } from './vertical-scene-migration.js';
|
|
4
4
|
//# sourceMappingURL=scene-migrations.d.ts.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
// scene authority. Everything exported here must stay pure data logic with no
|
|
3
3
|
// store, React, or Three.js imports so it can run in Server Components and
|
|
4
4
|
// API routes.
|
|
5
|
-
export { healSceneNodes } from './heal-scene-graph';
|
|
6
|
-
export { removeRetiredDrawingSheetNodes, } from './retired-scene-nodes';
|
|
7
|
-
export { migrateVerticalSceneNodes, } from './vertical-scene-migration';
|
|
5
|
+
export { healSceneNodes } from './heal-scene-graph.js';
|
|
6
|
+
export { removeRetiredDrawingSheetNodes, } from './retired-scene-nodes.js';
|
|
7
|
+
export { migrateVerticalSceneNodes, } from './vertical-scene-migration.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { GROUND_SUPPORT_ID } from '../hooks/spatial-grid/support-host-id';
|
|
2
|
-
import { deriveLegacyLevelHeight } from '../services/level-height';
|
|
3
|
-
import { getCeilingClampBound } from '../services/storey';
|
|
4
|
-
import { computeWallSlabSupport } from '../systems/slab/slab-support';
|
|
5
|
-
import { DEFAULT_WALL_HEIGHT } from '../systems/wall/wall-footprint';
|
|
1
|
+
import { GROUND_SUPPORT_ID } from '../hooks/spatial-grid/support-host-id.js';
|
|
2
|
+
import { deriveLegacyLevelHeight } from '../services/level-height.js';
|
|
3
|
+
import { getCeilingClampBound } from '../services/storey.js';
|
|
4
|
+
import { computeWallSlabSupport } from '../systems/slab/slab-support.js';
|
|
5
|
+
import { DEFAULT_WALL_HEIGHT } from '../systems/wall/wall-footprint.js';
|
|
6
6
|
function getFiniteNumber(value, fallback) {
|
|
7
7
|
return typeof value === 'number' && Number.isFinite(value) ? value : fallback;
|
|
8
8
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { Collection } from '../schema/collections.js';
|
|
2
|
+
import { SceneMaterial } from '../schema/scene-material.js';
|
|
3
|
+
import { type AnyNodeType } from '../schema/types.js';
|
|
3
4
|
export type ValidationSeverity = 'error' | 'warning';
|
|
4
5
|
export type ValidationIssue = {
|
|
5
6
|
severity: ValidationSeverity;
|
|
@@ -21,6 +22,8 @@ export type ParsedBuildJson = {
|
|
|
21
22
|
installedPlugins?: string[];
|
|
22
23
|
/** Scene materials referenced by node `slots` (`scene:<id>`). */
|
|
23
24
|
materials?: Record<string, SceneMaterial>;
|
|
25
|
+
/** Item collections; member nodes carry the matching `collectionIds`. */
|
|
26
|
+
collections?: Record<string, Collection>;
|
|
24
27
|
};
|
|
25
28
|
export type SchemaIssue = {
|
|
26
29
|
nodeId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-build-json.d.ts","sourceRoot":"","sources":["../../src/validation/validate-build-json.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validate-build-json.d.ts","sourceRoot":"","sources":["../../src/validation/validate-build-json.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAW,KAAK,WAAW,EAAc,MAAM,iBAAiB,CAAA;AAGvE,MAAM,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Ae,EAAE,CAAA;IAC3B,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,gBAAgB,EAAE,MAAM,CAAA;CACzB,CAAA;AAwCD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,uBAAuB,CAsYzE"}
|
|
@@ -1,11 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { HIDDEN_SITE_NOTE } from '../lib/node-visibility.js';
|
|
2
|
+
import { nodeRegistry } from '../registry/index.js';
|
|
3
|
+
import { SceneMaterial } from '../schema/scene-material.js';
|
|
4
|
+
import { AnyNode, nodeKindOf } from '../schema/types.js';
|
|
5
|
+
import { healSceneNodes } from '../utils/heal-scene-graph.js';
|
|
5
6
|
const KNOWN_TYPES = new Set(AnyNode.options.map(nodeKindOf));
|
|
6
7
|
function isPlainObject(value) {
|
|
7
8
|
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
8
9
|
}
|
|
10
|
+
function isCollection(value) {
|
|
11
|
+
if (!isPlainObject(value))
|
|
12
|
+
return false;
|
|
13
|
+
return (typeof value.id === 'string' &&
|
|
14
|
+
typeof value.name === 'string' &&
|
|
15
|
+
Array.isArray(value.nodeIds) &&
|
|
16
|
+
value.nodeIds.every((nodeId) => typeof nodeId === 'string') &&
|
|
17
|
+
(value.color === undefined || typeof value.color === 'string') &&
|
|
18
|
+
(value.controlNodeId === undefined || typeof value.controlNodeId === 'string'));
|
|
19
|
+
}
|
|
9
20
|
function polygonAreaM2(points) {
|
|
10
21
|
if (points.length < 3)
|
|
11
22
|
return 0;
|
|
@@ -63,6 +74,7 @@ export function validateBuildJson(input) {
|
|
|
63
74
|
const rootNodeIdsRaw = input.rootNodeIds;
|
|
64
75
|
const installedPluginsRaw = input.installedPlugins;
|
|
65
76
|
const materialsRaw = input.materials;
|
|
77
|
+
const collectionsRaw = input.collections;
|
|
66
78
|
if (!isPlainObject(nodesRaw)) {
|
|
67
79
|
errors.push({
|
|
68
80
|
severity: 'error',
|
|
@@ -148,6 +160,35 @@ export function validateBuildJson(input) {
|
|
|
148
160
|
message: 'Ignored invalid "materials" — expected an object of id → material.',
|
|
149
161
|
});
|
|
150
162
|
}
|
|
163
|
+
let collections;
|
|
164
|
+
if (isPlainObject(collectionsRaw)) {
|
|
165
|
+
const skippedIds = [];
|
|
166
|
+
const kept = {};
|
|
167
|
+
for (const [id, value] of Object.entries(collectionsRaw)) {
|
|
168
|
+
if (isCollection(value)) {
|
|
169
|
+
kept[id] = value;
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
skippedIds.push(id);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
if (Object.keys(kept).length > 0)
|
|
176
|
+
collections = kept;
|
|
177
|
+
if (skippedIds.length > 0) {
|
|
178
|
+
warnings.push({
|
|
179
|
+
severity: 'warning',
|
|
180
|
+
code: 'invalid_collections',
|
|
181
|
+
message: `Ignored ${skippedIds.length} invalid collection${skippedIds.length === 1 ? '' : 's'}: ${skippedIds.join(', ')}.`,
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
else if (collectionsRaw !== undefined) {
|
|
186
|
+
warnings.push({
|
|
187
|
+
severity: 'warning',
|
|
188
|
+
code: 'invalid_collections',
|
|
189
|
+
message: 'Ignored invalid "collections" — expected an object of id → collection.',
|
|
190
|
+
});
|
|
191
|
+
}
|
|
151
192
|
if (strippedChildRefs > 0 || droppedWallIds.length > 0) {
|
|
152
193
|
warnings.push({
|
|
153
194
|
severity: 'warning',
|
|
@@ -162,6 +203,17 @@ export function validateBuildJson(input) {
|
|
|
162
203
|
message: '"rootNodeIds" is empty — no entry point into the scene.',
|
|
163
204
|
});
|
|
164
205
|
}
|
|
206
|
+
// Hand-authored files hide the Site expecting the parcel to disappear; the
|
|
207
|
+
// flag is accepted but reaches nothing beneath it, so say so at import.
|
|
208
|
+
for (const [key, value] of Object.entries(nodes)) {
|
|
209
|
+
if (!isPlainObject(value) || value.type !== 'site' || value.visible !== false)
|
|
210
|
+
continue;
|
|
211
|
+
warnings.push({
|
|
212
|
+
severity: 'warning',
|
|
213
|
+
code: 'site_hidden',
|
|
214
|
+
message: `Site "${typeof value.id === 'string' ? value.id : key}" is hidden. ${HIDDEN_SITE_NOTE}`,
|
|
215
|
+
});
|
|
216
|
+
}
|
|
165
217
|
// Ids of nodes whose type falls outside the static schema union — plugin
|
|
166
218
|
// kinds (`trees:tree`) or genuinely unknown types. The scene store accepts
|
|
167
219
|
// them on load (they already round-trip through the DB fine) and they're
|
|
@@ -348,6 +400,7 @@ export function validateBuildJson(input) {
|
|
|
348
400
|
rootNodeIds,
|
|
349
401
|
...(installedPlugins ? { installedPlugins } : {}),
|
|
350
402
|
...(materials ? { materials } : {}),
|
|
403
|
+
...(collections ? { collections } : {}),
|
|
351
404
|
}
|
|
352
405
|
: null,
|
|
353
406
|
stats,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pascal-app/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Core library for Pascal 3D building editor",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -51,6 +51,11 @@
|
|
|
51
51
|
"import": "./dist/hooks/spatial-grid/spatial-grid-manager.js",
|
|
52
52
|
"default": "./dist/hooks/spatial-grid/spatial-grid-manager.js"
|
|
53
53
|
},
|
|
54
|
+
"./plan-footprint": {
|
|
55
|
+
"types": "./dist/lib/plan-footprint.d.ts",
|
|
56
|
+
"import": "./dist/lib/plan-footprint.js",
|
|
57
|
+
"default": "./dist/lib/plan-footprint.js"
|
|
58
|
+
},
|
|
54
59
|
"./wall": {
|
|
55
60
|
"types": "./dist/systems/wall/wall-footprint.d.ts",
|
|
56
61
|
"import": "./dist/systems/wall/wall-footprint.js",
|
|
@@ -60,6 +65,11 @@
|
|
|
60
65
|
"types": "./dist/systems/stair/stair-opening-sync.d.ts",
|
|
61
66
|
"import": "./dist/systems/stair/stair-opening-sync.js",
|
|
62
67
|
"default": "./dist/systems/stair/stair-opening-sync.js"
|
|
68
|
+
},
|
|
69
|
+
"./procedural-items": {
|
|
70
|
+
"types": "./dist/procedural-items/index.d.ts",
|
|
71
|
+
"import": "./dist/procedural-items/index.js",
|
|
72
|
+
"default": "./dist/procedural-items/index.js"
|
|
63
73
|
}
|
|
64
74
|
},
|
|
65
75
|
"files": [
|
|
@@ -67,12 +77,13 @@
|
|
|
67
77
|
"README.md"
|
|
68
78
|
],
|
|
69
79
|
"scripts": {
|
|
70
|
-
"build": "tsc --build",
|
|
80
|
+
"build": "tsc --build && bun ../../scripts/fix-node-esm-imports.ts dist",
|
|
71
81
|
"dev": "tsgo --build --watch",
|
|
72
82
|
"test": "bun test src",
|
|
73
83
|
"bench:registry": "bun run src/registry/__bench__/relations-resolver.bench.ts",
|
|
74
84
|
"bench:schema": "bun run src/schema/__bench__/node-parsers.bench.ts",
|
|
75
|
-
"
|
|
85
|
+
"smoke:node": "node --input-type=module -e \"await import('./dist/index.js')\"",
|
|
86
|
+
"prepublishOnly": "npm run build && npm run smoke:node"
|
|
76
87
|
},
|
|
77
88
|
"peerDependencies": {
|
|
78
89
|
"@react-three/drei": "^10",
|
|
@@ -107,7 +118,7 @@
|
|
|
107
118
|
],
|
|
108
119
|
"repository": {
|
|
109
120
|
"type": "git",
|
|
110
|
-
"url": "https://github.com/pascalorg/editor.git",
|
|
121
|
+
"url": "git+https://github.com/pascalorg/editor.git",
|
|
111
122
|
"directory": "packages/core"
|
|
112
123
|
},
|
|
113
124
|
"license": "MIT",
|