@pascal-app/core 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +221 -76
- 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 +74 -72
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +71 -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/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 +50 -0
- package/dist/procedural-items/query.d.ts.map +1 -0
- package/dist/procedural-items/query.js +298 -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 +12 -4
- package/dist/registry/handles.d.ts.map +1 -1
- package/dist/registry/index.d.ts +6 -6
- 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.js +2 -2
- package/dist/registry/types.d.ts +21 -9
- 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 +73 -70
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +64 -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 +1 -1
- package/dist/schema/nodes/block.d.ts.map +1 -1
- package/dist/schema/nodes/block.js +3 -4
- 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 +2 -2
- 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/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 +2 -2
- package/dist/schema/nodes/wall.d.ts.map +1 -1
- package/dist/schema/nodes/wall.js +7 -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 +341 -19
- package/dist/schema/types.d.ts.map +1 -1
- package/dist/schema/types.js +56 -49
- 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 +2 -8
- package/dist/services/hosting.d.ts.map +1 -1
- package/dist/services/hosting.js +2 -12
- 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/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 +88 -0
- package/dist/services/surface-hosting.d.ts.map +1 -0
- package/dist/services/surface-hosting.js +268 -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 +48 -9
- 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 +37 -31
- 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 +206 -79
- 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-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-top.d.ts +1 -1
- package/dist/systems/wall/wall-topology.d.ts +2 -2
- package/dist/systems/wall/wall-topology.js +4 -4
- 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 +45 -4
- package/package.json +14 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stair-opening-preview.d.ts","sourceRoot":"","sources":["../../../src/systems/stair/stair-opening-preview.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC7E,OAA6B,EAAE,KAAK,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AAClG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAGpE,KAAK,oBAAoB,GAAG;IAC1B,EAAE,EAAE,SAAS,CAAA;IACb,IAAI,EAAE,OAAO,CAAC,QAAQ,GAAG,WAAW,CAAC,CAAA;CACtC,CAAA;AAoBD,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,EAClD,aAAa,EAAE,WAAW,CAAC,MAAM,EAAE,iBAAiB,CAAC,EACrD,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAAC,WAYvC;AAED,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,EAClD,aAAa,EAAE,WAAW,CAAC,MAAM,EAAE,iBAAiB,CAAC,EACrD,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAAC
|
|
1
|
+
{"version":3,"file":"stair-opening-preview.d.ts","sourceRoot":"","sources":["../../../src/systems/stair/stair-opening-preview.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,SA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwBvC;AAED,wBAAgB,qCAAqC;;mBAUlC,oBAAoB,EAAE;;EAiCxC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import useLiveNodeOverrides, {} from '../../store/use-live-node-overrides';
|
|
2
|
-
import useScene from '../../store/use-scene';
|
|
1
|
+
import useLiveNodeOverrides, {} from '../../store/use-live-node-overrides.js';
|
|
2
|
+
import useScene from '../../store/use-scene.js';
|
|
3
3
|
const SURFACE_OPENING_FIELDS = ['holes', 'holeMetadata'];
|
|
4
4
|
function isSurface(node) {
|
|
5
5
|
return node?.type === 'slab' || node?.type === 'ceiling';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AnyNode, AnyNodeId, CeilingNode, SlabNode } from '../../schema';
|
|
1
|
+
import type { AnyNode, AnyNodeId, CeilingNode, SlabNode } from '../../schema/index.js';
|
|
2
2
|
export declare function syncAutoStairOpenings(nodes: Record<string, AnyNode>): {
|
|
3
3
|
id: AnyNodeId;
|
|
4
4
|
data: Partial<SlabNode | CeilingNode>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { resolveBuildingForLevel, resolveLevelId } from '../../hooks/spatial-grid/spatial-grid-sync';
|
|
2
|
-
import { polygonContainsPolygon, polygonsOverlap } from '../../lib/polygon-relations';
|
|
3
|
-
import { resolveCeilingHeight } from '../../services/level-height';
|
|
4
|
-
import { getLevelElevations } from '../../services/storey';
|
|
5
|
-
import { computeSegmentTransforms, rotateXZ } from './stair-footprint';
|
|
6
|
-
import { resolveStairTotalRise } from './stair-rise';
|
|
1
|
+
import { resolveBuildingForLevel, resolveLevelId } from '../../hooks/spatial-grid/spatial-grid-sync.js';
|
|
2
|
+
import { polygonContainsPolygon, polygonsOverlap } from '../../lib/polygon-relations.js';
|
|
3
|
+
import { resolveCeilingHeight } from '../../services/level-height.js';
|
|
4
|
+
import { getLevelElevations } from '../../services/storey.js';
|
|
5
|
+
import { computeSegmentTransforms, rotateXZ } from './stair-footprint.js';
|
|
6
|
+
import { resolveStairTotalRise } from './stair-rise.js';
|
|
7
7
|
const CURVED_STAIR_SLAB_OPENING_RATIO = 0.8;
|
|
8
8
|
const STRAIGHT_STAIR_TARGET_THRESHOLD_MIN = 0.35;
|
|
9
9
|
const STAIR_SLAB_OPENING_TIGHTENING = 0;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { useEffect } from 'react';
|
|
3
|
-
import { pauseSceneHistory, resumeSceneHistory } from '../../store/history-control';
|
|
4
|
-
import { queueSceneNormalization } from '../../store/scene-hydration';
|
|
5
|
-
import useLiveNodeOverrides from '../../store/use-live-node-overrides';
|
|
6
|
-
import useLiveTransforms from '../../store/use-live-transforms';
|
|
7
|
-
import useScene from '../../store/use-scene';
|
|
8
|
-
import { createSurfaceOpeningPreviewController, getNodesWithLiveStairOpeningInputs, hasLiveStairOpeningInputs, } from './stair-opening-preview';
|
|
9
|
-
import { syncAutoStairOpenings } from './stair-opening-sync';
|
|
10
|
-
import { syncStairRises } from './stair-rise';
|
|
3
|
+
import { pauseSceneHistory, resumeSceneHistory } from '../../store/history-control.js';
|
|
4
|
+
import { queueSceneNormalization } from '../../store/scene-hydration.js';
|
|
5
|
+
import useLiveNodeOverrides from '../../store/use-live-node-overrides.js';
|
|
6
|
+
import useLiveTransforms from '../../store/use-live-transforms.js';
|
|
7
|
+
import useScene from '../../store/use-scene.js';
|
|
8
|
+
import { createSurfaceOpeningPreviewController, getNodesWithLiveStairOpeningInputs, hasLiveStairOpeningInputs, } from './stair-opening-preview.js';
|
|
9
|
+
import { syncAutoStairOpenings } from './stair-opening-sync.js';
|
|
10
|
+
import { syncStairRises } from './stair-rise.js';
|
|
11
11
|
function isOpeningRelevantNode(node) {
|
|
12
12
|
return (node?.type === 'building' ||
|
|
13
13
|
node?.type === 'ceiling' ||
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AnyNode, AnyNodeId, StairNode } from '../../schema';
|
|
1
|
+
import type { AnyNode, AnyNodeId, StairNode } from '../../schema/index.js';
|
|
2
2
|
export declare function resolveStairTotalRise(stair: StairNode, nodes: Record<string, AnyNode>): number;
|
|
3
3
|
/**
|
|
4
4
|
* Keeps straight stairs' flight segments in step with the resolved rise.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getFloorStackedPosition } from '../../hooks/spatial-grid/floor-placed-elevation';
|
|
2
|
-
import { DEFAULT_LEVEL_HEIGHT } from '../../services/level-height';
|
|
3
|
-
import { getLevelFloorToFloorHeight } from '../../services/storey';
|
|
1
|
+
import { getFloorStackedPosition } from '../../hooks/spatial-grid/floor-placed-elevation.js';
|
|
2
|
+
import { DEFAULT_LEVEL_HEIGHT } from '../../services/level-height.js';
|
|
3
|
+
import { getLevelFloorToFloorHeight } from '../../services/storey.js';
|
|
4
4
|
export function resolveStairTotalRise(stair, nodes) {
|
|
5
5
|
if (stair.totalRise !== undefined)
|
|
6
6
|
return stair.totalRise;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { FenceNode, WallNode } from '../../schema';
|
|
2
|
-
import type { Point2D } from './wall-mitering';
|
|
1
|
+
import type { FenceNode, WallNode } from '../../schema/index.js';
|
|
2
|
+
import type { Point2D } from './wall-mitering.js';
|
|
3
3
|
type WallCurveLike = Pick<WallNode | FenceNode, 'start' | 'end' | 'curveOffset'>;
|
|
4
4
|
type CurveFrame = {
|
|
5
5
|
point: Point2D;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { WallNode } from '../../schema';
|
|
2
|
-
import { type Point2D, type WallMiterData } from './wall-mitering';
|
|
3
|
-
export { calculateLevelMiters, type Point2D, type WallMiterData } from './wall-mitering';
|
|
1
|
+
import type { WallNode } from '../../schema/index.js';
|
|
2
|
+
import { type Point2D, type WallMiterData } from './wall-mitering.js';
|
|
3
|
+
export { calculateLevelMiters, type Point2D, type WallMiterData } from './wall-mitering.js';
|
|
4
4
|
export declare const DEFAULT_WALL_THICKNESS = 0.1;
|
|
5
5
|
export declare const DEFAULT_WALL_HEIGHT = 2.5;
|
|
6
6
|
export declare function getWallThickness(wallNode: WallNode): number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getWallSurfacePolygon, isCurvedWall } from './wall-curve';
|
|
2
|
-
import { getWallMiterBoundaryPoints, pointToKey, } from './wall-mitering';
|
|
3
|
-
export { calculateLevelMiters } from './wall-mitering';
|
|
1
|
+
import { getWallSurfacePolygon, isCurvedWall } from './wall-curve.js';
|
|
2
|
+
import { getWallMiterBoundaryPoints, pointToKey, } from './wall-mitering.js';
|
|
3
|
+
export { calculateLevelMiters } from './wall-mitering.js';
|
|
4
4
|
export const DEFAULT_WALL_THICKNESS = 0.1;
|
|
5
5
|
export const DEFAULT_WALL_HEIGHT = 2.5;
|
|
6
6
|
const CURVED_WALL_SURFACE_SEGMENTS = 24;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getWallCurveFrameAt, isCurvedWall } from './wall-curve';
|
|
1
|
+
import { getWallCurveFrameAt, isCurvedWall } from './wall-curve.js';
|
|
2
2
|
// ============================================================================
|
|
3
3
|
// UTILITY FUNCTIONS
|
|
4
4
|
// ============================================================================
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type AnyNode, type AnyNodeId, type WallNode } from '../../schema';
|
|
2
|
-
import type { WallPlanPoint } from './wall-move';
|
|
1
|
+
import { type AnyNode, type AnyNodeId, type WallNode } from '../../schema/index.js';
|
|
2
|
+
import type { WallPlanPoint } from './wall-move.js';
|
|
3
3
|
export type WallTopologyChanges = {
|
|
4
4
|
create: Array<{
|
|
5
5
|
node: AnyNode;
|
|
@@ -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;
|
|
@@ -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,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAE9E,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;IACjC,WAAW,EAAE,SAAS,EAAE,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC,YAAY,EAAE,UAAU,CAAC,CAAA;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC,eAAe,EAAE,aAAa,CAAC,CAAA;IAClD,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC5B,CAAA;AAUD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,
|
|
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,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAE9E,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;IACjC,WAAW,EAAE,SAAS,EAAE,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC,YAAY,EAAE,UAAU,CAAC,CAAA;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC,eAAe,EAAE,aAAa,CAAC,CAAA;IAClD,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC5B,CAAA;AAUD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,CAqKlE;AAED;;;;;;;;;;;;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":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAW,KAAK,WAAW,EAAc,MAAM,iBAAiB,CAAA;AAGvE,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,SAAS,CAAA;AAEpD,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAA;IAC5C,iFAAiF;IACjF,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACnC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACpC,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9B,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC3B,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"validate-build-json.d.ts","sourceRoot":"","sources":["../../src/validation/validate-build-json.ts"],"names":[],"mappings":"AACA,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,MAAM,kBAAkB,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;IAC3B,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,gBAAgB,EAAE,MAAM,CAAA;CACzB,CAAA;AAwCD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,uBAAuB,CA2XzE"}
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
import { nodeRegistry } from '../registry';
|
|
2
|
-
import { SceneMaterial } from '../schema/scene-material';
|
|
3
|
-
import { AnyNode, nodeKindOf } from '../schema/types';
|
|
4
|
-
import { healSceneNodes } from '../utils/heal-scene-graph';
|
|
1
|
+
import { nodeRegistry } from '../registry/index.js';
|
|
2
|
+
import { SceneMaterial } from '../schema/scene-material.js';
|
|
3
|
+
import { AnyNode, nodeKindOf } from '../schema/types.js';
|
|
4
|
+
import { healSceneNodes } from '../utils/heal-scene-graph.js';
|
|
5
5
|
const KNOWN_TYPES = new Set(AnyNode.options.map(nodeKindOf));
|
|
6
6
|
function isPlainObject(value) {
|
|
7
7
|
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
8
8
|
}
|
|
9
|
+
function isCollection(value) {
|
|
10
|
+
if (!isPlainObject(value))
|
|
11
|
+
return false;
|
|
12
|
+
return (typeof value.id === 'string' &&
|
|
13
|
+
typeof value.name === 'string' &&
|
|
14
|
+
Array.isArray(value.nodeIds) &&
|
|
15
|
+
value.nodeIds.every((nodeId) => typeof nodeId === 'string') &&
|
|
16
|
+
(value.color === undefined || typeof value.color === 'string') &&
|
|
17
|
+
(value.controlNodeId === undefined || typeof value.controlNodeId === 'string'));
|
|
18
|
+
}
|
|
9
19
|
function polygonAreaM2(points) {
|
|
10
20
|
if (points.length < 3)
|
|
11
21
|
return 0;
|
|
@@ -63,6 +73,7 @@ export function validateBuildJson(input) {
|
|
|
63
73
|
const rootNodeIdsRaw = input.rootNodeIds;
|
|
64
74
|
const installedPluginsRaw = input.installedPlugins;
|
|
65
75
|
const materialsRaw = input.materials;
|
|
76
|
+
const collectionsRaw = input.collections;
|
|
66
77
|
if (!isPlainObject(nodesRaw)) {
|
|
67
78
|
errors.push({
|
|
68
79
|
severity: 'error',
|
|
@@ -148,6 +159,35 @@ export function validateBuildJson(input) {
|
|
|
148
159
|
message: 'Ignored invalid "materials" — expected an object of id → material.',
|
|
149
160
|
});
|
|
150
161
|
}
|
|
162
|
+
let collections;
|
|
163
|
+
if (isPlainObject(collectionsRaw)) {
|
|
164
|
+
const skippedIds = [];
|
|
165
|
+
const kept = {};
|
|
166
|
+
for (const [id, value] of Object.entries(collectionsRaw)) {
|
|
167
|
+
if (isCollection(value)) {
|
|
168
|
+
kept[id] = value;
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
skippedIds.push(id);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
if (Object.keys(kept).length > 0)
|
|
175
|
+
collections = kept;
|
|
176
|
+
if (skippedIds.length > 0) {
|
|
177
|
+
warnings.push({
|
|
178
|
+
severity: 'warning',
|
|
179
|
+
code: 'invalid_collections',
|
|
180
|
+
message: `Ignored ${skippedIds.length} invalid collection${skippedIds.length === 1 ? '' : 's'}: ${skippedIds.join(', ')}.`,
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
else if (collectionsRaw !== undefined) {
|
|
185
|
+
warnings.push({
|
|
186
|
+
severity: 'warning',
|
|
187
|
+
code: 'invalid_collections',
|
|
188
|
+
message: 'Ignored invalid "collections" — expected an object of id → collection.',
|
|
189
|
+
});
|
|
190
|
+
}
|
|
151
191
|
if (strippedChildRefs > 0 || droppedWallIds.length > 0) {
|
|
152
192
|
warnings.push({
|
|
153
193
|
severity: 'warning',
|
|
@@ -348,6 +388,7 @@ export function validateBuildJson(input) {
|
|
|
348
388
|
rootNodeIds,
|
|
349
389
|
...(installedPlugins ? { installedPlugins } : {}),
|
|
350
390
|
...(materials ? { materials } : {}),
|
|
391
|
+
...(collections ? { collections } : {}),
|
|
351
392
|
}
|
|
352
393
|
: null,
|
|
353
394
|
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.1",
|
|
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",
|