@pascal-app/core 1.0.0-beta.5 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +23 -0
- package/dist/capture/index.d.ts +3 -0
- package/dist/capture/index.d.ts.map +1 -0
- package/dist/capture/index.js +2 -0
- package/dist/capture/schema.d.ts +417 -0
- package/dist/capture/schema.d.ts.map +1 -0
- package/dist/capture/schema.js +348 -0
- package/dist/capture/source.d.ts +60 -0
- package/dist/capture/source.d.ts.map +1 -0
- package/dist/capture/source.js +254 -0
- package/dist/events/bus.d.ts +55 -7
- package/dist/events/bus.d.ts.map +1 -1
- package/dist/events/hidden-wall-pointer-hold.d.ts +28 -0
- package/dist/events/hidden-wall-pointer-hold.d.ts.map +1 -0
- package/dist/events/hidden-wall-pointer-hold.js +37 -0
- package/dist/hooks/spatial-grid/spatial-grid-sync.d.ts +2785 -1
- package/dist/hooks/spatial-grid/spatial-grid-sync.d.ts.map +1 -1
- package/dist/hooks/spatial-grid/spatial-grid-sync.js +132 -19
- package/dist/hooks/spatial-grid/support-host-patch.d.ts +45 -1
- package/dist/hooks/spatial-grid/support-host-patch.d.ts.map +1 -1
- package/dist/hooks/spatial-grid/support-host-patch.js +171 -6
- package/dist/index.d.ts +14 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -5
- package/dist/lib/asset-storage.d.ts.map +1 -1
- package/dist/lib/asset-storage.js +4 -1
- package/dist/lib/polygon-union.d.ts +4 -0
- package/dist/lib/polygon-union.d.ts.map +1 -0
- package/dist/lib/polygon-union.js +306 -0
- package/dist/lib/roof-overlap.d.ts +32 -0
- package/dist/lib/roof-overlap.d.ts.map +1 -0
- package/dist/lib/roof-overlap.js +72 -0
- package/dist/lib/slab-polygon.d.ts +35 -2
- package/dist/lib/slab-polygon.d.ts.map +1 -1
- package/dist/lib/slab-polygon.js +133 -27
- package/dist/lib/space-detection.d.ts +11 -0
- package/dist/lib/space-detection.d.ts.map +1 -1
- package/dist/lib/space-detection.js +42 -14
- package/dist/registry/handles.d.ts +24 -3
- package/dist/registry/handles.d.ts.map +1 -1
- package/dist/registry/index.d.ts +3 -4
- package/dist/registry/index.d.ts.map +1 -1
- package/dist/registry/index.js +1 -2
- package/dist/registry/registry.d.ts +13 -6
- package/dist/registry/registry.d.ts.map +1 -1
- package/dist/registry/registry.js +37 -4
- package/dist/registry/scene-api.d.ts +16 -0
- package/dist/registry/scene-api.d.ts.map +1 -1
- package/dist/registry/scene-api.js +49 -1
- package/dist/registry/types.d.ts +226 -13
- package/dist/registry/types.d.ts.map +1 -1
- package/dist/schema/__bench__/node-parsers.bench.d.ts +24 -0
- package/dist/schema/__bench__/node-parsers.bench.d.ts.map +1 -0
- package/dist/schema/__bench__/node-parsers.bench.js +314 -0
- package/dist/schema/__fixtures__/node-fixtures.d.ts +28 -0
- package/dist/schema/__fixtures__/node-fixtures.d.ts.map +1 -0
- package/dist/schema/__fixtures__/node-fixtures.js +125 -0
- package/dist/schema/base.d.ts +1 -1
- package/dist/schema/base.d.ts.map +1 -1
- package/dist/schema/base.js +8 -1
- package/dist/schema/compiled-node-parsers.d.ts +40 -0
- package/dist/schema/compiled-node-parsers.d.ts.map +1 -0
- package/dist/schema/compiled-node-parsers.js +95 -0
- package/dist/schema/index.d.ts +19 -15
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +17 -12
- package/dist/schema/material.d.ts +2 -1
- package/dist/schema/material.d.ts.map +1 -1
- package/dist/schema/material.js +1 -0
- package/dist/schema/nodes/automatic-downspout.d.ts +17 -0
- package/dist/schema/nodes/automatic-downspout.d.ts.map +1 -0
- package/dist/schema/nodes/automatic-downspout.js +237 -0
- package/dist/schema/nodes/block.d.ts +107 -0
- package/dist/schema/nodes/block.d.ts.map +1 -0
- package/dist/schema/nodes/block.js +207 -0
- package/dist/schema/nodes/box-vent.d.ts +8 -2
- package/dist/schema/nodes/box-vent.d.ts.map +1 -1
- package/dist/schema/nodes/box-vent.js +2 -0
- package/dist/schema/nodes/building.d.ts +1 -1
- package/dist/schema/nodes/cabinet.d.ts +25 -3
- package/dist/schema/nodes/cabinet.d.ts.map +1 -1
- package/dist/schema/nodes/cabinet.js +26 -5
- package/dist/schema/nodes/ceiling.d.ts +1 -1
- package/dist/schema/nodes/chimney.d.ts +2 -2
- package/dist/schema/nodes/column.d.ts +6 -6
- package/dist/schema/nodes/construction-dimension.d.ts +4 -4
- package/dist/schema/nodes/cupola.d.ts +9 -1
- package/dist/schema/nodes/cupola.d.ts.map +1 -1
- package/dist/schema/nodes/cupola.js +2 -0
- package/dist/schema/nodes/door.d.ts +1 -1
- package/dist/schema/nodes/dormer.d.ts +44 -1
- package/dist/schema/nodes/dormer.d.ts.map +1 -1
- package/dist/schema/nodes/dormer.js +131 -7
- package/dist/schema/nodes/downspout.d.ts +11 -1
- package/dist/schema/nodes/downspout.d.ts.map +1 -1
- package/dist/schema/nodes/downspout.js +24 -0
- package/dist/schema/nodes/duct-fitting.d.ts +18 -1
- package/dist/schema/nodes/duct-fitting.d.ts.map +1 -1
- package/dist/schema/nodes/duct-fitting.js +25 -4
- package/dist/schema/nodes/duct-segment.d.ts +23 -1
- package/dist/schema/nodes/duct-segment.d.ts.map +1 -1
- package/dist/schema/nodes/duct-segment.js +20 -0
- package/dist/schema/nodes/duct-terminal.d.ts +1 -1
- package/dist/schema/nodes/elevator.d.ts +1 -1
- package/dist/schema/nodes/eyebrow-vent.d.ts +8 -2
- package/dist/schema/nodes/eyebrow-vent.d.ts.map +1 -1
- package/dist/schema/nodes/eyebrow-vent.js +2 -0
- package/dist/schema/nodes/fence.d.ts +1 -1
- package/dist/schema/nodes/guide.d.ts +1 -1
- package/dist/schema/nodes/gutter.d.ts +36 -2
- package/dist/schema/nodes/gutter.d.ts.map +1 -1
- package/dist/schema/nodes/gutter.js +308 -1
- package/dist/schema/nodes/hanger-overrides.d.ts +7 -0
- package/dist/schema/nodes/hanger-overrides.d.ts.map +1 -0
- package/dist/schema/nodes/hanger-overrides.js +6 -0
- package/dist/schema/nodes/hvac-equipment.d.ts +1 -1
- package/dist/schema/nodes/item.d.ts +4 -3
- package/dist/schema/nodes/item.d.ts.map +1 -1
- package/dist/schema/nodes/item.js +5 -0
- package/dist/schema/nodes/lean-to-extension.d.ts +212 -0
- package/dist/schema/nodes/lean-to-extension.d.ts.map +1 -0
- package/dist/schema/nodes/lean-to-extension.js +114 -0
- package/dist/schema/nodes/level.d.ts +2 -2
- package/dist/schema/nodes/level.d.ts.map +1 -1
- package/dist/schema/nodes/lineset.d.ts +1 -1
- package/dist/schema/nodes/liquid-line.d.ts +1 -1
- package/dist/schema/nodes/measurement.d.ts +1 -1
- package/dist/schema/nodes/pipe-fitting.d.ts +9 -1
- package/dist/schema/nodes/pipe-fitting.d.ts.map +1 -1
- package/dist/schema/nodes/pipe-fitting.js +6 -2
- package/dist/schema/nodes/pipe-segment.d.ts +23 -1
- package/dist/schema/nodes/pipe-segment.d.ts.map +1 -1
- package/dist/schema/nodes/pipe-segment.js +20 -0
- package/dist/schema/nodes/pipe-trap.d.ts +1 -1
- package/dist/schema/nodes/ridge-vent.d.ts +1 -1
- package/dist/schema/nodes/ridge-vent.d.ts.map +1 -1
- package/dist/schema/nodes/ridge-vent.js +4 -1
- package/dist/schema/nodes/roof-segment-shape.d.ts +4 -0
- package/dist/schema/nodes/roof-segment-shape.d.ts.map +1 -1
- package/dist/schema/nodes/roof-segment-shape.js +64 -1
- package/dist/schema/nodes/roof-segment-walls.d.ts +3 -1
- package/dist/schema/nodes/roof-segment-walls.d.ts.map +1 -1
- package/dist/schema/nodes/roof-segment-walls.js +1 -1
- package/dist/schema/nodes/roof-segment.d.ts +41 -1
- package/dist/schema/nodes/roof-segment.d.ts.map +1 -1
- package/dist/schema/nodes/roof-segment.js +79 -2
- package/dist/schema/nodes/roof.d.ts +22 -1
- package/dist/schema/nodes/roof.d.ts.map +1 -1
- package/dist/schema/nodes/roof.js +14 -0
- package/dist/schema/nodes/scan.d.ts +19 -2
- package/dist/schema/nodes/scan.d.ts.map +1 -1
- package/dist/schema/nodes/scan.js +11 -1
- package/dist/schema/nodes/shelf.d.ts +2 -2
- package/dist/schema/nodes/site.d.ts +1 -1
- package/dist/schema/nodes/skylight.d.ts +1 -1
- package/dist/schema/nodes/slab.d.ts +1 -1
- package/dist/schema/nodes/solar-panel.d.ts +1 -1
- package/dist/schema/nodes/spawn.d.ts +1 -1
- package/dist/schema/nodes/stair-segment.d.ts +1 -1
- package/dist/schema/nodes/stair.d.ts +1 -1
- package/dist/schema/nodes/structural-grid.d.ts +1 -1
- package/dist/schema/nodes/turbine-vent.d.ts +7 -1
- package/dist/schema/nodes/turbine-vent.d.ts.map +1 -1
- package/dist/schema/nodes/turbine-vent.js +2 -0
- package/dist/schema/nodes/wall.d.ts +4 -4
- package/dist/schema/nodes/wall.d.ts.map +1 -1
- package/dist/schema/nodes/wall.js +7 -1
- package/dist/schema/nodes/window.d.ts +10 -3
- package/dist/schema/nodes/window.d.ts.map +1 -1
- package/dist/schema/nodes/window.js +4 -0
- package/dist/schema/nodes/zone.d.ts +2 -2
- package/dist/schema/nodes/zone.js +1 -1
- package/dist/schema/types.d.ts +484 -109
- package/dist/schema/types.d.ts.map +1 -1
- package/dist/schema/types.js +27 -1
- package/dist/services/hosting.d.ts +2 -2
- package/dist/services/hosting.d.ts.map +1 -1
- package/dist/services/hosting.js +4 -4
- package/dist/services/index.d.ts +1 -1
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/system-graph.d.ts +11 -0
- package/dist/services/system-graph.d.ts.map +1 -1
- package/dist/services/system-graph.js +35 -5
- package/dist/store/actions/node-actions.d.ts +7 -0
- package/dist/store/actions/node-actions.d.ts.map +1 -1
- package/dist/store/actions/node-actions.js +429 -17
- package/dist/store/history-invalidation.d.ts +3 -0
- package/dist/store/history-invalidation.d.ts.map +1 -0
- package/dist/store/history-invalidation.js +72 -0
- package/dist/store/scene-hydration.d.ts +5 -0
- package/dist/store/scene-hydration.d.ts.map +1 -0
- package/dist/store/scene-hydration.js +57 -0
- package/dist/store/use-scene.d.ts +3 -0
- package/dist/store/use-scene.d.ts.map +1 -1
- package/dist/store/use-scene.js +332 -64
- package/dist/systems/roof/roof-elevation-system.d.ts +3 -0
- package/dist/systems/roof/roof-elevation-system.d.ts.map +1 -0
- package/dist/systems/roof/roof-elevation-system.js +94 -0
- package/dist/systems/roof/roof-elevation.d.ts +4 -0
- package/dist/systems/roof/roof-elevation.d.ts.map +1 -0
- package/dist/systems/roof/roof-elevation.js +95 -0
- package/dist/systems/roof/roof-footprint.d.ts +17 -0
- package/dist/systems/roof/roof-footprint.d.ts.map +1 -0
- package/dist/systems/roof/roof-footprint.js +83 -0
- package/dist/systems/stair/stair-flight.d.ts +17 -0
- package/dist/systems/stair/stair-flight.d.ts.map +1 -0
- package/dist/systems/stair/stair-flight.js +27 -0
- package/dist/systems/stair/stair-opening-preview.d.ts +1555 -1328
- package/dist/systems/stair/stair-opening-preview.d.ts.map +1 -1
- package/dist/systems/stair/stair-opening-system.d.ts +1 -0
- package/dist/systems/stair/stair-opening-system.d.ts.map +1 -1
- package/dist/systems/stair/stair-opening-system.js +93 -96
- package/dist/systems/stair/stair-rise.d.ts.map +1 -1
- package/dist/systems/stair/stair-rise.js +20 -21
- package/dist/systems/wall/wall-curve.d.ts +1 -0
- package/dist/systems/wall/wall-curve.d.ts.map +1 -1
- package/dist/systems/wall/wall-curve.js +73 -0
- package/dist/systems/wall/wall-footprint.d.ts +1 -0
- package/dist/systems/wall/wall-footprint.d.ts.map +1 -1
- package/dist/systems/wall/wall-footprint.js +1 -0
- package/dist/utils/clone-scene-graph.d.ts.map +1 -1
- package/dist/utils/clone-scene-graph.js +26 -0
- package/dist/validation/validate-build-json.d.ts +3 -0
- package/dist/validation/validate-build-json.d.ts.map +1 -1
- package/dist/validation/validate-build-json.js +49 -2
- package/package.json +10 -3
- package/dist/systems/elevator/elevator-runtime-system.d.ts +0 -2
- package/dist/systems/elevator/elevator-runtime-system.d.ts.map +0 -1
- package/dist/systems/elevator/elevator-runtime-system.js +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/schema/types.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/schema/types.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AAiDnB,6FAA6F;AAC7F,KAAK,UAAU,GAAG,CAAC,CAAC,SAAS,CAAC;IAAE,IAAI,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAA;CAAE,GAAG,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;AAEnG,gFAAgF;AAChF,KAAK,iBAAiB,CAAC,CAAC,SAAS,UAAU,IAAI,CAAC,CAAC,SAAS,CACxD,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,GAAG;IAAE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAA;CAAE,CAC9E,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,SAAS,GAAI,KAAK,CAAC,CAAC,SAAS,SAAS,CAAC,UAAU,EAAE,GAAG,UAAU,EAAE,CAAC,EAAE,SAAS,CAAC,gCAO/E,CAAC,iDACX,CAAA;AAEH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAiDlB,CAAA;AAEF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAA;AAC7C,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AACzC,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AAErC,yFAAyF;AACzF,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAA;AAE/D,qFAAqF;AACrF,eAAO,MAAM,UAAU,GAAI,QAAQ,aAAa,KAAG,WAAsC,CAAA"}
|
package/dist/schema/types.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
|
+
import { BlockNode } from './nodes/block';
|
|
2
3
|
import { BoxVentNode } from './nodes/box-vent';
|
|
3
4
|
import { BuildingNode } from './nodes/building';
|
|
4
5
|
import { CabinetModuleNode, CabinetNode } from './nodes/cabinet';
|
|
@@ -20,6 +21,7 @@ import { GuideNode } from './nodes/guide';
|
|
|
20
21
|
import { GutterNode } from './nodes/gutter';
|
|
21
22
|
import { HvacEquipmentNode } from './nodes/hvac-equipment';
|
|
22
23
|
import { ItemNode } from './nodes/item';
|
|
24
|
+
import { LeanToExtensionNode } from './nodes/lean-to-extension';
|
|
23
25
|
import { LevelNode } from './nodes/level';
|
|
24
26
|
import { LinesetNode } from './nodes/lineset';
|
|
25
27
|
import { LiquidLineNode } from './nodes/liquid-line';
|
|
@@ -44,13 +46,35 @@ import { TurbineVentNode } from './nodes/turbine-vent';
|
|
|
44
46
|
import { WallNode } from './nodes/wall';
|
|
45
47
|
import { WindowNode } from './nodes/window';
|
|
46
48
|
import { ZoneNode } from './nodes/zone';
|
|
47
|
-
|
|
49
|
+
/**
|
|
50
|
+
* Assembles the node union on discriminators that claim exactly one value.
|
|
51
|
+
*
|
|
52
|
+
* `nodeType()` defaults the literal so a per-kind schema can fill `type` in
|
|
53
|
+
* (`WallNode.parse({ start, end })`), but a `.default()`-wrapped discriminator
|
|
54
|
+
* also claims `undefined` from zod 4.5 on (upstream #6432). With 48 members
|
|
55
|
+
* doing it, the union's lazily-built discriminator map collides on
|
|
56
|
+
* `undefined` and throws `Duplicate discriminator value` — as a plain Error,
|
|
57
|
+
* so it escapes `safeParse` and surfaces as a crash at the first parse.
|
|
58
|
+
*
|
|
59
|
+
* Each member is therefore projected to a clone whose `type` is the bare
|
|
60
|
+
* literal. Per-kind schemas keep their default; only the union's view of the
|
|
61
|
+
* discriminator narrows. Metadata lives in zod's global registry keyed by
|
|
62
|
+
* instance, so `.describe()` text has to be carried over to the clone by hand.
|
|
63
|
+
*/
|
|
64
|
+
export const nodeUnion = (members) => z.discriminatedUnion('type', members.map((member) => {
|
|
65
|
+
const projected = member.extend({ type: member.shape.type.unwrap() });
|
|
66
|
+
const meta = z.globalRegistry.get(member);
|
|
67
|
+
return meta ? projected.meta(meta) : projected;
|
|
68
|
+
}));
|
|
69
|
+
export const AnyNode = nodeUnion([
|
|
48
70
|
SiteNode,
|
|
49
71
|
BuildingNode,
|
|
50
72
|
ElevatorNode,
|
|
51
73
|
LevelNode,
|
|
74
|
+
LeanToExtensionNode,
|
|
52
75
|
ColumnNode,
|
|
53
76
|
ConstructionDimensionNode,
|
|
77
|
+
BlockNode,
|
|
54
78
|
StructuralGridNode,
|
|
55
79
|
WallNode,
|
|
56
80
|
FenceNode,
|
|
@@ -92,3 +116,5 @@ export const AnyNode = z.discriminatedUnion('type', [
|
|
|
92
116
|
PipeFittingNode,
|
|
93
117
|
PipeTrapNode,
|
|
94
118
|
]);
|
|
119
|
+
/** The node kind a union member accepts, read off its bare-literal discriminator. */
|
|
120
|
+
export const nodeKindOf = (option) => option.shape.type.value;
|
|
@@ -58,7 +58,7 @@ export declare function getSurface(host: AnyNode): SurfacesConfig | null;
|
|
|
58
58
|
* Resolves the stackable top height of a host (e.g. table surface, slab top,
|
|
59
59
|
* stair landing). Returns `null` when the host has no `surfaces.top`.
|
|
60
60
|
*/
|
|
61
|
-
export declare function getTopSurfaceHeight(host: AnyNode): number | null;
|
|
61
|
+
export declare function getTopSurfaceHeight(host: AnyNode, nodes?: Record<string, AnyNode>): number | null;
|
|
62
62
|
/**
|
|
63
63
|
* Whether `host` can receive a surface-resting (top-stacked) child. A
|
|
64
64
|
* ceiling-mounted item hangs from the ceiling, so its visible "top" is not a
|
|
@@ -84,5 +84,5 @@ export declare function pickHost(args: {
|
|
|
84
84
|
* Convenience: clamps a Y coordinate to the top of a host surface, when one
|
|
85
85
|
* is declared. Returns the original Y if the host has no top surface.
|
|
86
86
|
*/
|
|
87
|
-
export declare function clampYToHostTop(host: AnyNode, originalY: number): number;
|
|
87
|
+
export declare function clampYToHostTop(host: AnyNode, originalY: number, nodes?: Record<string, AnyNode>): number;
|
|
88
88
|
//# sourceMappingURL=hosting.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hosting.d.ts","sourceRoot":"","sources":["../../src/services/hosting.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEzD;;;;;GAKG;AACH,eAAO,MAAM,cAAc,IAAI,CAAA;AAE/B,MAAM,MAAM,IAAI,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;AAEpD,MAAM,MAAM,WAAW,GACnB;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,MAAM,EAAE,SAAS,CAAA;CAAE,GACxC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,SAAS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I,CAUjB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,OAAO,EACb,SAAS,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,MAAM,CAGR"}
|
package/dist/services/hosting.js
CHANGED
|
@@ -82,12 +82,12 @@ export function getSurface(host) {
|
|
|
82
82
|
* Resolves the stackable top height of a host (e.g. table surface, slab top,
|
|
83
83
|
* stair landing). Returns `null` when the host has no `surfaces.top`.
|
|
84
84
|
*/
|
|
85
|
-
export function getTopSurfaceHeight(host) {
|
|
85
|
+
export function getTopSurfaceHeight(host, nodes = { [host.id]: host }) {
|
|
86
86
|
const surfaces = getSurface(host);
|
|
87
87
|
if (!surfaces?.top)
|
|
88
88
|
return null;
|
|
89
89
|
const { height } = surfaces.top;
|
|
90
|
-
return typeof height === 'function' ? height(host) : height;
|
|
90
|
+
return typeof height === 'function' ? height(host, { nodes }) : height;
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
93
|
* Whether `host` can receive a surface-resting (top-stacked) child. A
|
|
@@ -125,7 +125,7 @@ export function pickHost(args) {
|
|
|
125
125
|
* Convenience: clamps a Y coordinate to the top of a host surface, when one
|
|
126
126
|
* is declared. Returns the original Y if the host has no top surface.
|
|
127
127
|
*/
|
|
128
|
-
export function clampYToHostTop(host, originalY) {
|
|
129
|
-
const top = getTopSurfaceHeight(host);
|
|
128
|
+
export function clampYToHostTop(host, originalY, nodes) {
|
|
129
|
+
const top = getTopSurfaceHeight(host, nodes);
|
|
130
130
|
return top == null ? originalY : top;
|
|
131
131
|
}
|
package/dist/services/index.d.ts
CHANGED
|
@@ -9,6 +9,6 @@ export { analyzePortConnectivity, type PortConnection, type PortConnectivity, re
|
|
|
9
9
|
export { buildRiserDiagram, projectIso, type RiserDiagram, type RiserLine, type RiserMarker, } from './riser-diagram';
|
|
10
10
|
export { DEFAULT_ANGLE_STEP, DEFAULT_GRID_STEP, type SnapServices, snapAngleToList, snapPointAlongAngleRay, snapPointToAngle, snapPointToGrid, snapScalar, snapServices, snapVec3ToGrid, snapWorldXZToBuildingLocal, } from './snap';
|
|
11
11
|
export { CEILING_CLAMP_MARGIN, findLevelAboveId, findLevelBelowId, getCeilingClampBound, getCoveringSlabUndersideAt, getLevelAbove, getLevelBelow, getLevelElevations, getLevelFloorToFloorHeight, getStoredLevelHeight, getWallPlaneTop, type LevelElevation, } from './storey';
|
|
12
|
-
export { buildPortComponents, type SystemSummary, summarizeSystemFor, } from './system-graph';
|
|
12
|
+
export { buildPortComponents, collectSystemPorts, distributionPointToWorld, type SystemSummary, summarizeSystemFor, } from './system-graph';
|
|
13
13
|
export { type DwvFinding, type DwvSeverity, validateDwv, } from './validate-dwv';
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,WAAW,EACX,iBAAiB,EACjB,KAAK,gCAAgC,EACrC,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,gBAAgB,EAChB,+BAA+B,GAChC,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,uBAAuB,EACvB,KAAK,aAAa,EAClB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,cAAc,EACd,kBAAkB,GACnB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,iBAAiB,EACjB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,GACxB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,SAAS,EACT,YAAY,EACZ,eAAe,EACf,UAAU,EACV,mB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,OAAO,EACL,mBAAmB,EACnB,KAAK,aAAa,EAClB,kBAAkB,GACnB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,WAAW,GACZ,MAAM,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,WAAW,EACX,iBAAiB,EACjB,KAAK,gCAAgC,EACrC,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,gBAAgB,EAChB,+BAA+B,GAChC,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,uBAAuB,EACvB,KAAK,aAAa,EAClB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,cAAc,EACd,kBAAkB,GACnB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,iBAAiB,EACjB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,GACxB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,SAAS,EACT,YAAY,EACZ,eAAe,EACf,UAAU,EACV,mBAAmB,EACnB,cAAc,EACd,QAAQ,EACR,KAAK,IAAI,GACV,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,KAAK,QAAQ,EACb,aAAa,EACb,SAAS,EACT,cAAc,EACd,UAAU,EACV,cAAc,GACf,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,eAAe,EACf,oBAAoB,EACpB,gCAAgC,EAChC,wBAAwB,EACxB,kBAAkB,EAClB,uBAAuB,EACvB,KAAK,OAAO,EACZ,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAC3B,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,UAAU,GAChB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,uBAAuB,EACvB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,0BAA0B,GAC3B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,WAAW,GACjB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,KAAK,YAAY,EACjB,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,UAAU,EACV,YAAY,EACZ,cAAc,EACd,0BAA0B,GAC3B,MAAM,QAAQ,CAAA;AACf,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,0BAA0B,EAC1B,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,0BAA0B,EAC1B,oBAAoB,EACpB,eAAe,EACf,KAAK,cAAc,GACpB,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,wBAAwB,EACxB,KAAK,aAAa,EAClB,kBAAkB,GACnB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,WAAW,GACZ,MAAM,gBAAgB,CAAA"}
|
package/dist/services/index.js
CHANGED
|
@@ -9,5 +9,5 @@ export { analyzePortConnectivity, resolveConnectivityUpdates, } from './port-con
|
|
|
9
9
|
export { buildRiserDiagram, projectIso, } from './riser-diagram';
|
|
10
10
|
export { DEFAULT_ANGLE_STEP, DEFAULT_GRID_STEP, snapAngleToList, snapPointAlongAngleRay, snapPointToAngle, snapPointToGrid, snapScalar, snapServices, snapVec3ToGrid, snapWorldXZToBuildingLocal, } from './snap';
|
|
11
11
|
export { CEILING_CLAMP_MARGIN, findLevelAboveId, findLevelBelowId, getCeilingClampBound, getCoveringSlabUndersideAt, getLevelAbove, getLevelBelow, getLevelElevations, getLevelFloorToFloorHeight, getStoredLevelHeight, getWallPlaneTop, } from './storey';
|
|
12
|
-
export { buildPortComponents, summarizeSystemFor, } from './system-graph';
|
|
12
|
+
export { buildPortComponents, collectSystemPorts, distributionPointToWorld, summarizeSystemFor, } from './system-graph';
|
|
13
13
|
export { validateDwv, } from './validate-dwv';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type NodePort } from '../registry';
|
|
1
2
|
import type { AnyNode, AnyNodeId } from '../schema';
|
|
2
3
|
export type SystemSummary = {
|
|
3
4
|
/** Every node in this connected component. */
|
|
@@ -14,6 +15,16 @@ export type SystemSummary = {
|
|
|
14
15
|
* handler / condenser anywhere in the component). */
|
|
15
16
|
connectedToEquipment: boolean;
|
|
16
17
|
};
|
|
18
|
+
export type SystemPort = {
|
|
19
|
+
port: NodePort;
|
|
20
|
+
nodeId: AnyNodeId;
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
z: number;
|
|
24
|
+
system: string | undefined;
|
|
25
|
+
};
|
|
26
|
+
export declare function collectSystemPorts(nodes: Readonly<Record<AnyNodeId, AnyNode>>): SystemPort[];
|
|
27
|
+
export declare function distributionPointToWorld(node: AnyNode, point: readonly [number, number, number], nodes: Readonly<Record<AnyNodeId, AnyNode>>): [number, number, number];
|
|
17
28
|
/**
|
|
18
29
|
* Group every port-bearing node into connected components via coinciding
|
|
19
30
|
* ports. Nodes with ports but no joints form singleton components; nodes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-graph.d.ts","sourceRoot":"","sources":["../../src/services/system-graph.ts"],"names":[],"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,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,EAAE,EAAE,CA6B9F;AAkDD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,GAC1C,aAAa,GAAG,IAAI,CAStB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { nodeRegistry } from '../registry';
|
|
2
|
+
import { getLevelElevations } from './storey';
|
|
2
3
|
/**
|
|
3
4
|
* The "System" primitive: connected components over the port graph.
|
|
4
5
|
*
|
|
@@ -15,7 +16,7 @@ import { nodeRegistry } from '../registry';
|
|
|
15
16
|
/** Distance (meters) under which two ports count as the same joint —
|
|
16
17
|
* matches port-connectivity's tolerance for hand-placed joints. */
|
|
17
18
|
const COINCIDENT_EPS_M = 0.05;
|
|
18
|
-
function
|
|
19
|
+
export function collectSystemPorts(nodes) {
|
|
19
20
|
const result = [];
|
|
20
21
|
for (const node of Object.values(nodes)) {
|
|
21
22
|
if (!node)
|
|
@@ -24,17 +25,44 @@ function collectPorts(nodes) {
|
|
|
24
25
|
if (!ports)
|
|
25
26
|
continue;
|
|
26
27
|
for (const port of ports) {
|
|
28
|
+
const [x, y, z] = distributionPointToWorld(node, port.position, nodes);
|
|
27
29
|
result.push({
|
|
30
|
+
port,
|
|
28
31
|
nodeId: node.id,
|
|
29
|
-
x
|
|
30
|
-
y
|
|
31
|
-
z
|
|
32
|
+
x,
|
|
33
|
+
y,
|
|
34
|
+
z,
|
|
32
35
|
system: port.system,
|
|
33
36
|
});
|
|
34
37
|
}
|
|
35
38
|
}
|
|
36
39
|
return result;
|
|
37
40
|
}
|
|
41
|
+
export function distributionPointToWorld(node, point, nodes) {
|
|
42
|
+
const elevations = getLevelElevations(nodes);
|
|
43
|
+
let ancestor = node;
|
|
44
|
+
const visited = new Set();
|
|
45
|
+
while (ancestor && ancestor.type !== 'level' && !visited.has(ancestor.id)) {
|
|
46
|
+
visited.add(ancestor.id);
|
|
47
|
+
ancestor = ancestor.parentId ? nodes[ancestor.parentId] : undefined;
|
|
48
|
+
}
|
|
49
|
+
const elevation = ancestor?.type === 'level' ? elevations.get(ancestor.id) : undefined;
|
|
50
|
+
const building = elevation?.buildingId ? nodes[elevation.buildingId] : undefined;
|
|
51
|
+
let [x, y, z] = point;
|
|
52
|
+
y += elevation?.baseY ?? 0;
|
|
53
|
+
if (building?.type === 'building') {
|
|
54
|
+
const { position, rotation } = building;
|
|
55
|
+
const [rx, ry, rz] = rotation;
|
|
56
|
+
const zx = Math.cos(rz) * x - Math.sin(rz) * y;
|
|
57
|
+
const zy = Math.sin(rz) * x + Math.cos(rz) * y;
|
|
58
|
+
const yx = Math.cos(ry) * zx + Math.sin(ry) * z;
|
|
59
|
+
const yz = -Math.sin(ry) * zx + Math.cos(ry) * z;
|
|
60
|
+
x = yx + position[0];
|
|
61
|
+
y = Math.cos(rx) * zy - Math.sin(rx) * yz + position[1];
|
|
62
|
+
z = Math.sin(rx) * zy + Math.cos(rx) * yz + position[2];
|
|
63
|
+
}
|
|
64
|
+
return [x, y, z];
|
|
65
|
+
}
|
|
38
66
|
/** Union-find over node ids. */
|
|
39
67
|
class Components {
|
|
40
68
|
parent = new Map();
|
|
@@ -68,7 +96,7 @@ function pathLength(path) {
|
|
|
68
96
|
* without `def.ports` don't participate at all.
|
|
69
97
|
*/
|
|
70
98
|
export function buildPortComponents(nodes) {
|
|
71
|
-
const ports =
|
|
99
|
+
const ports = collectSystemPorts(nodes);
|
|
72
100
|
const components = new Components();
|
|
73
101
|
const epsSq = COINCIDENT_EPS_M * COINCIDENT_EPS_M;
|
|
74
102
|
for (let i = 0; i < ports.length; i++) {
|
|
@@ -77,6 +105,8 @@ export function buildPortComponents(nodes) {
|
|
|
77
105
|
const b = ports[j];
|
|
78
106
|
if (a.nodeId === b.nodeId)
|
|
79
107
|
continue;
|
|
108
|
+
if (a.system && b.system && a.system !== b.system)
|
|
109
|
+
continue;
|
|
80
110
|
const dx = a.x - b.x;
|
|
81
111
|
const dy = a.y - b.y;
|
|
82
112
|
const dz = a.z - b.z;
|
|
@@ -9,6 +9,13 @@ type NodeUpdateOp = {
|
|
|
9
9
|
data: Partial<AnyNode>;
|
|
10
10
|
};
|
|
11
11
|
type NodeDeleteOp = AnyNodeId;
|
|
12
|
+
type NumericSanitizeIssue = {
|
|
13
|
+
path: PropertyKey[];
|
|
14
|
+
from: number;
|
|
15
|
+
to?: number;
|
|
16
|
+
action: 'clamped' | 'dropped' | 'rounded';
|
|
17
|
+
};
|
|
18
|
+
export declare function numericSanitizeIssuesToMessage(issues: NumericSanitizeIssue[] | null | undefined): string;
|
|
12
19
|
declare const createNodesActionImpl: (set: (fn: (state: SceneState) => Partial<SceneState>) => void, get: () => SceneState, ops: NodeCreateOp[]) => void;
|
|
13
20
|
declare const applyNodeChangesActionImpl: (set: (fn: (state: SceneState) => Partial<SceneState>) => void, get: () => SceneState, changes: {
|
|
14
21
|
create?: NodeCreateOp[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-actions.d.ts","sourceRoot":"","sources":["../../../src/store/actions/node-actions.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"node-actions.d.ts","sourceRoot":"","sources":["../../../src/store/actions/node-actions.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,SAAS,EAwBf,MAAM,cAAc,CAAA;AAIrB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAG9C,KAAK,YAAY,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,CAAA;AAC3D,KAAK,YAAY,GAAG;IAAE,EAAE,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC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