@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
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import dedent from 'dedent';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { BaseNode, nodeType, objectId } from '../base.js';
|
|
4
|
+
const finiteNumber = z.number().finite();
|
|
5
|
+
const vector3Array = z
|
|
6
|
+
.array(finiteNumber)
|
|
7
|
+
.refine((values) => values.length % 3 === 0, 'Expected XYZ triples');
|
|
8
|
+
export const ImportedMeshPrimitive = z.object({
|
|
9
|
+
positions: vector3Array,
|
|
10
|
+
normals: vector3Array.optional(),
|
|
11
|
+
indices: z.array(z.number().int().nonnegative()).default([]),
|
|
12
|
+
color: z.string().default('#94a3b8'),
|
|
13
|
+
opacity: z.number().min(0).max(1).default(1),
|
|
14
|
+
});
|
|
15
|
+
/** Triangle geometry retained when an import has no native Pascal shape. */
|
|
16
|
+
export const ImportedMeshNode = BaseNode.extend({
|
|
17
|
+
id: objectId('imesh'),
|
|
18
|
+
type: nodeType('imported-mesh'),
|
|
19
|
+
position: z.tuple([finiteNumber, finiteNumber, finiteNumber]).default([0, 0, 0]),
|
|
20
|
+
rotation: z.tuple([finiteNumber, finiteNumber, finiteNumber]).default([0, 0, 0]),
|
|
21
|
+
primitives: z.array(ImportedMeshPrimitive).default([]),
|
|
22
|
+
}).describe(dedent `
|
|
23
|
+
Imported mesh node - triangle geometry preserved from an external model
|
|
24
|
+
- position / rotation: transform in the parent coordinate system
|
|
25
|
+
- primitives: indexed triangle buffers in meters with source display colors
|
|
26
|
+
- metadata: source-format identity and properties
|
|
27
|
+
`);
|
|
@@ -154,8 +154,8 @@ declare const assetSchema: z.ZodObject<{
|
|
|
154
154
|
dimensions: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
155
155
|
attachTo: z.ZodOptional<z.ZodEnum<{
|
|
156
156
|
wall: "wall";
|
|
157
|
-
"wall-side": "wall-side";
|
|
158
157
|
ceiling: "ceiling";
|
|
158
|
+
"wall-side": "wall-side";
|
|
159
159
|
}>>;
|
|
160
160
|
recessed: z.ZodOptional<z.ZodBoolean>;
|
|
161
161
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -238,7 +238,7 @@ export declare const ItemNode: z.ZodObject<{
|
|
|
238
238
|
front: "front";
|
|
239
239
|
back: "back";
|
|
240
240
|
}>>;
|
|
241
|
-
children: z.ZodDefault<z.ZodArray<z.
|
|
241
|
+
children: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
242
242
|
wallId: z.ZodOptional<z.ZodString>;
|
|
243
243
|
wallT: z.ZodOptional<z.ZodNumber>;
|
|
244
244
|
roofSegmentId: z.ZodOptional<z.ZodString>;
|
|
@@ -268,8 +268,8 @@ export declare const ItemNode: z.ZodObject<{
|
|
|
268
268
|
dimensions: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
269
269
|
attachTo: z.ZodOptional<z.ZodEnum<{
|
|
270
270
|
wall: "wall";
|
|
271
|
-
"wall-side": "wall-side";
|
|
272
271
|
ceiling: "ceiling";
|
|
272
|
+
"wall-side": "wall-side";
|
|
273
273
|
}>>;
|
|
274
274
|
recessed: z.ZodOptional<z.ZodBoolean>;
|
|
275
275
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import dedent from 'dedent';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { AssetUrl } from '../asset-url';
|
|
4
|
-
import { BaseNode, nodeType, objectId } from '../base';
|
|
3
|
+
import { AssetUrl } from '../asset-url.js';
|
|
4
|
+
import { BaseNode, nodeType, objectId } from '../base.js';
|
|
5
5
|
// --- Control descriptors ---
|
|
6
6
|
const toggleControlSchema = z.object({
|
|
7
7
|
kind: z.literal('toggle'),
|
|
@@ -104,7 +104,7 @@ export const ItemNode = BaseNode.extend({
|
|
|
104
104
|
rotation: z.tuple([z.number(), z.number(), z.number()]).default([0, 0, 0]),
|
|
105
105
|
scale: z.tuple([z.number(), z.number(), z.number()]).default([1, 1, 1]),
|
|
106
106
|
side: z.enum(['front', 'back']).optional(),
|
|
107
|
-
children: z.array(
|
|
107
|
+
children: z.array(z.string()).default([]),
|
|
108
108
|
// Wall attachment properties (only used when asset.attachTo is "wall" or "wall-side")
|
|
109
109
|
wallId: z.string().optional(),
|
|
110
110
|
wallT: z.number().optional(), // 0-1 parametric position along wall
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import dedent from 'dedent';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { BaseNode, nodeType, objectId } from '../base';
|
|
4
|
-
import { ColumnNode } from './column';
|
|
5
|
-
import { RoofNode } from './roof';
|
|
6
|
-
import { SlabNode } from './slab';
|
|
3
|
+
import { BaseNode, nodeType, objectId } from '../base.js';
|
|
4
|
+
import { ColumnNode } from './column.js';
|
|
5
|
+
import { RoofNode } from './roof.js';
|
|
6
|
+
import { SlabNode } from './slab.js';
|
|
7
7
|
export const LeanToConnectionMode = z.enum(['auto', 'manual']);
|
|
8
8
|
export const LeanToCanopyForm = z.enum(['mono', 'gable', 'butterfly']);
|
|
9
9
|
export const LeanToHostKind = z.enum(['wall', 'slab-edge', 'freestanding', 'conical-roof']);
|
|
@@ -19,7 +19,7 @@ export declare const LevelNode: z.ZodObject<{
|
|
|
19
19
|
metadata: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
20
20
|
id: z.ZodDefault<z.ZodTemplateLiteral<`level_${string}`>>;
|
|
21
21
|
type: z.ZodDefault<z.ZodLiteral<"level">>;
|
|
22
|
-
children: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<`
|
|
22
|
+
children: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<`block_${string}` | `ceiling_${string}` | `item_${string}` | `procedural-item_${string}` | `column_${string}` | `construction-dimension_${string}` | `wall_${string}` | `roof_${string}` | `slab_${string}` | `fence_${string}` | `structural-grid_${string}` | `imesh_${string}` | `zone_${string}` | `stair_${string}` | `scan_${string}` | `guide_${string}` | `measurement_${string}` | `spawn_${string}` | `shelf_${string}` | `duct-segment_${string}` | `duct-fitting_${string}` | `duct-terminal_${string}` | `hvac-equipment_${string}` | `lineset_${string}` | `liquid-line_${string}` | `pipe-segment_${string}` | `pipe-fitting_${string}` | `pipe-trap_${string}`, string>>>>;
|
|
23
23
|
level: z.ZodDefault<z.ZodNumber>;
|
|
24
24
|
baseElevation: z.ZodDefault<z.ZodNumber>;
|
|
25
25
|
height: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"level.d.ts","sourceRoot":"","sources":["../../../src/schema/nodes/level.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"level.d.ts","sourceRoot":"","sources":["../../../src/schema/nodes/level.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AA+DvB,eAAO,MAAM,4BAA4B,IAAI,CAAA;AAE7C,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAElE;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;iBA0BrB,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dedent from 'dedent';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { BaseNode, nodeType, objectId } from '../base';
|
|
3
|
+
import { BaseNode, nodeType, objectId } from '../base.js';
|
|
4
4
|
const LevelChildId = z.string().transform((id) => id);
|
|
5
5
|
export const DEFAULT_LEVEL_BASE_ELEVATION = 0;
|
|
6
6
|
export function normalizeLevelBaseElevation(value) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dedent from 'dedent';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { BaseNode, nodeType, objectId } from '../base';
|
|
3
|
+
import { BaseNode, nodeType, objectId } from '../base.js';
|
|
4
4
|
/**
|
|
5
5
|
* Refrigerant lineset — the copper pipe pair that links the outdoor
|
|
6
6
|
* condenser to the indoor coil (furnace / air handler) of a split system.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dedent from 'dedent';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { BaseNode, nodeType, objectId } from '../base';
|
|
3
|
+
import { BaseNode, nodeType, objectId } from '../base.js';
|
|
4
4
|
/**
|
|
5
5
|
* Standalone refrigerant liquid line — the thin bare-copper line that carries
|
|
6
6
|
* warm liquid out to the indoor coil. It is the line that used to be drawn as
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import dedent from 'dedent';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { areMeasurementPointsCoplanar, MEASUREMENT_PLANAR_TOLERANCE, measurementNormal, } from '../../lib/measurement-geometry';
|
|
4
|
-
import { BaseNode, nodeType, objectId } from '../base';
|
|
3
|
+
import { areMeasurementPointsCoplanar, MEASUREMENT_PLANAR_TOLERANCE, measurementNormal, } from '../../lib/measurement-geometry.js';
|
|
4
|
+
import { BaseNode, nodeType, objectId } from '../base.js';
|
|
5
5
|
const FiniteCoordinate = z.number().finite();
|
|
6
6
|
export const MeasurementPoint = z.tuple([FiniteCoordinate, FiniteCoordinate, FiniteCoordinate]);
|
|
7
7
|
export const MeasurementFeatureParameter = z.union([z.string(), z.boolean(), FiniteCoordinate]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dedent from 'dedent';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { BaseNode, nodeType, objectId } from '../base';
|
|
3
|
+
import { BaseNode, nodeType, objectId } from '../base.js';
|
|
4
4
|
/**
|
|
5
5
|
* DWV pipe fitting — the joints drain systems are actually built from:
|
|
6
6
|
* elbows (bends), wyes (45° branch entries, the code-preferred way to
|
|
@@ -56,8 +56,8 @@ export declare const PipeSegmentNode: z.ZodObject<{
|
|
|
56
56
|
}, z.core.$strip>>;
|
|
57
57
|
diameter: z.ZodDefault<z.ZodNumber>;
|
|
58
58
|
pipeMaterial: z.ZodDefault<z.ZodEnum<{
|
|
59
|
-
pvc: "pvc";
|
|
60
59
|
abs: "abs";
|
|
60
|
+
pvc: "pvc";
|
|
61
61
|
"cast-iron": "cast-iron";
|
|
62
62
|
}>>;
|
|
63
63
|
system: z.ZodDefault<z.ZodEnum<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import dedent from 'dedent';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { BaseNode, nodeType, objectId } from '../base';
|
|
4
|
-
import { HangerOverrides } from './hanger-overrides';
|
|
3
|
+
import { BaseNode, nodeType, objectId } from '../base.js';
|
|
4
|
+
import { HangerOverrides } from './hanger-overrides.js';
|
|
5
5
|
/**
|
|
6
6
|
* DWV pipe segment — drain / waste / vent runs in US residential
|
|
7
7
|
* plumbing. Phase 2 of the distribution-system effort: the plumbing
|
|
@@ -32,8 +32,8 @@ export declare const PipeTrapNode: z.ZodObject<{
|
|
|
32
32
|
rotation: z.ZodDefault<z.ZodNumber>;
|
|
33
33
|
diameter: z.ZodDefault<z.ZodNumber>;
|
|
34
34
|
pipeMaterial: z.ZodDefault<z.ZodEnum<{
|
|
35
|
-
pvc: "pvc";
|
|
36
35
|
abs: "abs";
|
|
36
|
+
pvc: "pvc";
|
|
37
37
|
"cast-iron": "cast-iron";
|
|
38
38
|
}>>;
|
|
39
39
|
armLengthM: z.ZodDefault<z.ZodNumber>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dedent from 'dedent';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { BaseNode, nodeType, objectId } from '../base';
|
|
3
|
+
import { BaseNode, nodeType, objectId } from '../base.js';
|
|
4
4
|
/**
|
|
5
5
|
* DWV trap — the P-trap between a fixture and the waste system. Holds a
|
|
6
6
|
* water seal that blocks sewer gas; every drained fixture has exactly
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import dedent from 'dedent';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { BaseNode, nodeType, objectId } from '../base';
|
|
4
|
-
import { MaterialSchema } from '../material';
|
|
5
|
-
import { getDutchRoofMetrics, getRoofSegmentVisibleTopBounds, ROOF_SHAPE_DEFAULTS, } from './roof-segment';
|
|
3
|
+
import { BaseNode, nodeType, objectId } from '../base.js';
|
|
4
|
+
import { MaterialSchema } from '../material.js';
|
|
5
|
+
import { getDutchRoofMetrics, getRoofSegmentVisibleTopBounds, ROOF_SHAPE_DEFAULTS, } from './roof-segment.js';
|
|
6
6
|
const MIN_DEFAULT_RIDGE_VENT_LENGTH_M = 0.4;
|
|
7
7
|
const DEFAULT_RIDGE_VENT_GENERATOR = 'default-ridge-vent';
|
|
8
8
|
const AUTO_RIDGE_VENT_METADATA_KEY = 'autoRidgeVent';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RoofSegmentNode } from './roof-segment';
|
|
1
|
+
import type { RoofSegmentNode } from './roof-segment.js';
|
|
2
2
|
/**
|
|
3
3
|
* Wall-face math for roof segments — the vertical surfaces a wall-mounted
|
|
4
4
|
* opening (door / window) can attach to. A segment's generated volume has
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getDutchRoofMetrics, getSegmentSlopeFrame } from './roof-segment';
|
|
1
|
+
import { getDutchRoofMetrics, getSegmentSlopeFrame } from './roof-segment.js';
|
|
2
2
|
function getWallVolumeFrame(node) {
|
|
3
3
|
const { activeRh, tanTheta } = getSegmentSlopeFrame(node);
|
|
4
4
|
const wallThickness = node.wallThickness ?? 0.1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import type { MaterialSchema as MaterialSchemaType } from '../material';
|
|
2
|
+
import type { MaterialSchema as MaterialSchemaType } from '../material.js';
|
|
3
3
|
export declare const RoofType: z.ZodEnum<{
|
|
4
4
|
flat: "flat";
|
|
5
5
|
hip: "hip";
|
|
@@ -269,9 +269,9 @@ export declare const RoofSegmentNode: z.ZodObject<{
|
|
|
269
269
|
shedJointScopeId: z.ZodOptional<z.ZodString>;
|
|
270
270
|
managedByParent: z.ZodDefault<z.ZodBoolean>;
|
|
271
271
|
wallShell: z.ZodDefault<z.ZodEnum<{
|
|
272
|
+
omit: "omit";
|
|
272
273
|
auto: "auto";
|
|
273
274
|
include: "include";
|
|
274
|
-
omit: "omit";
|
|
275
275
|
}>>;
|
|
276
276
|
shedInsetEndPanels: z.ZodDefault<z.ZodBoolean>;
|
|
277
277
|
gambrelLowerWidthRatio: z.ZodDefault<z.ZodNumber>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import dedent from 'dedent';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { BaseNode, nodeType, objectId } from '../base';
|
|
4
|
-
import { MaterialSchema } from '../material';
|
|
3
|
+
import { BaseNode, nodeType, objectId } from '../base.js';
|
|
4
|
+
import { MaterialSchema } from '../material.js';
|
|
5
5
|
export const RoofType = z.enum([
|
|
6
6
|
'hip',
|
|
7
7
|
'gable',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import type { MaterialSchema as MaterialSchemaType } from '../material';
|
|
2
|
+
import type { MaterialSchema as MaterialSchemaType } from '../material.js';
|
|
3
3
|
export type RoofSurfaceMaterialRole = 'top' | 'edge' | 'wall';
|
|
4
4
|
export type RoofSurfaceMaterialSpec = {
|
|
5
5
|
material?: MaterialSchemaType;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import dedent from 'dedent';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { BaseNode, nodeType, objectId } from '../base';
|
|
4
|
-
import { MaterialSchema } from '../material';
|
|
5
|
-
import { RoofSegmentNode } from './roof-segment';
|
|
3
|
+
import { BaseNode, nodeType, objectId } from '../base.js';
|
|
4
|
+
import { MaterialSchema } from '../material.js';
|
|
5
|
+
import { RoofSegmentNode } from './roof-segment.js';
|
|
6
6
|
export const RoofSupport = z
|
|
7
7
|
.discriminatedUnion('kind', [
|
|
8
8
|
z.object({ kind: z.literal('level') }),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { CaptureSessionLocatorSchema } from '../../capture/schema';
|
|
3
|
-
import { AssetUrl } from '../asset-url';
|
|
4
|
-
import { BaseNode, nodeType, objectId } from '../base';
|
|
2
|
+
import { CaptureSessionLocatorSchema } from '../../capture/schema.js';
|
|
3
|
+
import { AssetUrl } from '../asset-url.js';
|
|
4
|
+
import { BaseNode, nodeType, objectId } from '../base.js';
|
|
5
5
|
export const CaptureSessionReference = CaptureSessionLocatorSchema.extend({
|
|
6
6
|
manifestUrl: AssetUrl.optional(),
|
|
7
7
|
});
|
|
@@ -44,7 +44,7 @@ export declare const ShelfNode: z.ZodObject<{
|
|
|
44
44
|
metadata: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
45
45
|
id: z.ZodDefault<z.ZodTemplateLiteral<`shelf_${string}`>>;
|
|
46
46
|
type: z.ZodDefault<z.ZodLiteral<"shelf">>;
|
|
47
|
-
children: z.ZodDefault<z.ZodArray<z.
|
|
47
|
+
children: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
48
48
|
position: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
49
49
|
rotation: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
50
50
|
supportSlabId: z.ZodOptional<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shelf.d.ts","sourceRoot":"","sources":["../../../src/schema/nodes/shelf.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"shelf.d.ts","sourceRoot":"","sources":["../../../src/schema/nodes/shelf.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiEpB,CAAA;AAEF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { BaseNode, nodeType, objectId } from '../base';
|
|
3
|
-
import { MaterialSchema } from '../material';
|
|
4
|
-
import { ItemNode } from './item';
|
|
2
|
+
import { BaseNode, nodeType, objectId } from '../base.js';
|
|
3
|
+
import { MaterialSchema } from '../material.js';
|
|
5
4
|
/**
|
|
6
5
|
* Parametric shelf — a configurable furniture unit with one or more
|
|
7
6
|
* horizontal boards that host other items.
|
|
@@ -39,7 +38,7 @@ export const ShelfNode = BaseNode.extend({
|
|
|
39
38
|
// not be rendered, making the commit look like "the item went
|
|
40
39
|
// somewhere else"). The action's parent-update branch needs the field
|
|
41
40
|
// present at parse-time so the children array is always defined.
|
|
42
|
-
children: z.array(
|
|
41
|
+
children: z.array(z.string()).default([]),
|
|
43
42
|
position: z.tuple([z.number(), z.number(), z.number()]).default([0, 0, 0]),
|
|
44
43
|
rotation: z.tuple([z.number(), z.number(), z.number()]).default([0, 0, 0]),
|
|
45
44
|
// Persisted slab-support host — see ItemNode.supportSlabId for the rules.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// lib/scenegraph/schema/nodes/site.ts
|
|
2
2
|
import dedent from 'dedent';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { BaseNode, nodeType, objectId } from '../base';
|
|
5
|
-
import { TerrainData } from '../terrain';
|
|
4
|
+
import { BaseNode, nodeType, objectId } from '../base.js';
|
|
5
|
+
import { TerrainData } from '../terrain.js';
|
|
6
6
|
// 2D Polygon
|
|
7
7
|
const PropertyLineData = z.object({
|
|
8
8
|
type: z.literal('polygon'),
|
|
@@ -14,15 +14,15 @@ export declare const SkylightType: z.ZodEnum<{
|
|
|
14
14
|
}>;
|
|
15
15
|
export type SkylightType = (typeof SKYLIGHT_TYPE_ORDER)[number];
|
|
16
16
|
export declare const SkylightOpeningSide: z.ZodEnum<{
|
|
17
|
+
top: "top";
|
|
17
18
|
right: "right";
|
|
18
19
|
left: "left";
|
|
19
|
-
top: "top";
|
|
20
20
|
bottom: "bottom";
|
|
21
21
|
}>;
|
|
22
22
|
export type SkylightOpeningSide = z.infer<typeof SkylightOpeningSide>;
|
|
23
23
|
export declare const SkylightSlideDirection: z.ZodEnum<{
|
|
24
|
-
z: "z";
|
|
25
24
|
x: "x";
|
|
25
|
+
z: "z";
|
|
26
26
|
}>;
|
|
27
27
|
export type SkylightSlideDirection = z.infer<typeof SkylightSlideDirection>;
|
|
28
28
|
export type SkylightTypePreset = {
|
|
@@ -256,17 +256,17 @@ export declare const SkylightNode: z.ZodObject<{
|
|
|
256
256
|
lanternTopScale: z.ZodDefault<z.ZodNumber>;
|
|
257
257
|
openingAngle: z.ZodDefault<z.ZodNumber>;
|
|
258
258
|
openingSide: z.ZodDefault<z.ZodEnum<{
|
|
259
|
+
top: "top";
|
|
259
260
|
right: "right";
|
|
260
261
|
left: "left";
|
|
261
|
-
top: "top";
|
|
262
262
|
bottom: "bottom";
|
|
263
263
|
}>>;
|
|
264
264
|
operationState: z.ZodDefault<z.ZodNumber>;
|
|
265
265
|
motorHousing: z.ZodDefault<z.ZodBoolean>;
|
|
266
266
|
slideFraction: z.ZodDefault<z.ZodNumber>;
|
|
267
267
|
slideDirection: z.ZodDefault<z.ZodEnum<{
|
|
268
|
-
z: "z";
|
|
269
268
|
x: "x";
|
|
269
|
+
z: "z";
|
|
270
270
|
}>>;
|
|
271
271
|
trackWidth: z.ZodDefault<z.ZodNumber>;
|
|
272
272
|
motorHousingSize: z.ZodDefault<z.ZodNumber>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import dedent from 'dedent';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { BaseNode, nodeType, objectId } from '../base';
|
|
4
|
-
import { MaterialSchema } from '../material';
|
|
3
|
+
import { BaseNode, nodeType, objectId } from '../base.js';
|
|
4
|
+
import { MaterialSchema } from '../material.js';
|
|
5
5
|
export const SkylightMaterialRole = z.enum(['frame', 'glass']);
|
|
6
6
|
export const SKYLIGHT_TYPE_ORDER = ['flat', 'walk-on', 'lantern', 'opening', 'sliding'];
|
|
7
7
|
export const SkylightType = z.enum(SKYLIGHT_TYPE_ORDER);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import dedent from 'dedent';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { BaseNode, nodeType, objectId } from '../base';
|
|
4
|
-
import { MaterialSchema } from '../material';
|
|
5
|
-
import { SurfaceHoleMetadata } from './surface-hole-metadata';
|
|
3
|
+
import { BaseNode, nodeType, objectId } from '../base.js';
|
|
4
|
+
import { MaterialSchema } from '../material.js';
|
|
5
|
+
import { SurfaceHoleMetadata } from './surface-hole-metadata.js';
|
|
6
6
|
// Edit-time floor for `thickness` — a thinner slab z-fights the ceiling's
|
|
7
7
|
// −0.01 underside offset. Applies to edits only; migration writes legacy
|
|
8
8
|
// intervals verbatim (including degenerate zero-thickness slabs).
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import dedent from 'dedent';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { SolarPanelPresetKey } from '../../solar-panel-presets';
|
|
4
|
-
import { BaseNode, nodeType, objectId } from '../base';
|
|
5
|
-
import { MaterialSchema } from '../material';
|
|
3
|
+
import { SolarPanelPresetKey } from '../../solar-panel-presets.js';
|
|
4
|
+
import { BaseNode, nodeType, objectId } from '../base.js';
|
|
5
|
+
import { MaterialSchema } from '../material.js';
|
|
6
6
|
export const SolarPanelMaterialRole = z.enum(['frame', 'panel']);
|
|
7
7
|
export const SolarPanelNode = BaseNode.extend({
|
|
8
8
|
id: objectId('solarpanel'),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import dedent from 'dedent';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { BaseNode, nodeType, objectId } from '../base';
|
|
4
|
-
import { MaterialSchema } from '../material';
|
|
3
|
+
import { BaseNode, nodeType, objectId } from '../base.js';
|
|
4
|
+
import { MaterialSchema } from '../material.js';
|
|
5
5
|
export const StairSegmentType = z.enum(['stair', 'landing']);
|
|
6
6
|
export const AttachmentSide = z.enum(['front', 'left', 'right']);
|
|
7
7
|
export const StairSegmentNode = BaseNode.extend({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import dedent from 'dedent';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { BaseNode, nodeType, objectId } from '../base';
|
|
4
|
-
import { MaterialSchema } from '../material';
|
|
5
|
-
import { StairSegmentNode } from './stair-segment';
|
|
3
|
+
import { BaseNode, nodeType, objectId } from '../base.js';
|
|
4
|
+
import { MaterialSchema } from '../material.js';
|
|
5
|
+
import { StairSegmentNode } from './stair-segment.js';
|
|
6
6
|
export const StairRailingMode = z.enum(['none', 'left', 'right', 'both']);
|
|
7
7
|
export const StairType = z.enum(['straight', 'curved', 'spiral']);
|
|
8
8
|
export const StairTopLandingMode = z.enum(['none', 'integrated']);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dedent from 'dedent';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { BaseNode, nodeType, objectId } from '../base';
|
|
3
|
+
import { BaseNode, nodeType, objectId } from '../base.js';
|
|
4
4
|
export const StructuralGridNode = BaseNode.extend({
|
|
5
5
|
id: objectId('structural-grid'),
|
|
6
6
|
type: nodeType('structural-grid'),
|
|
@@ -66,8 +66,8 @@ export declare const TurbineVentNode: z.ZodObject<{
|
|
|
66
66
|
vaneCount: z.ZodDefault<z.ZodNumber>;
|
|
67
67
|
spinSpeed: z.ZodDefault<z.ZodNumber>;
|
|
68
68
|
style: z.ZodDefault<z.ZodEnum<{
|
|
69
|
-
globe: "globe";
|
|
70
69
|
cylinder: "cylinder";
|
|
70
|
+
globe: "globe";
|
|
71
71
|
}>>;
|
|
72
72
|
}, z.core.$strip>;
|
|
73
73
|
export type TurbineVentNode = z.infer<typeof TurbineVentNode>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import dedent from 'dedent';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { BaseNode, nodeType, objectId } from '../base';
|
|
4
|
-
import { MaterialSchema } from '../material';
|
|
3
|
+
import { BaseNode, nodeType, objectId } from '../base.js';
|
|
4
|
+
import { MaterialSchema } from '../material.js';
|
|
5
5
|
export const TurbineVentMaterialRole = z.enum(['base', 'head']);
|
|
6
6
|
export const TurbineVentNode = BaseNode.extend({
|
|
7
7
|
id: objectId('tvent'),
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const UNIT_KINDS: readonly ["apartment", "hotel-room", "commercial", "common"];
|
|
3
|
+
export type UnitKind = (typeof UNIT_KINDS)[number];
|
|
4
|
+
export declare const DEFAULT_UNIT_COLOR = "#f59e0b";
|
|
5
|
+
export declare const UnitNode: z.ZodObject<{
|
|
6
|
+
object: z.ZodDefault<z.ZodLiteral<"node">>;
|
|
7
|
+
parentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
8
|
+
visible: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
9
|
+
camera: z.ZodOptional<z.ZodObject<{
|
|
10
|
+
position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
11
|
+
target: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
12
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
13
|
+
perspective: "perspective";
|
|
14
|
+
orthographic: "orthographic";
|
|
15
|
+
}>>;
|
|
16
|
+
fov: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
zoom: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
}, z.core.$strip>>;
|
|
19
|
+
id: z.ZodDefault<z.ZodTemplateLiteral<`unit_${string}`>>;
|
|
20
|
+
type: z.ZodDefault<z.ZodLiteral<"unit">>;
|
|
21
|
+
name: z.ZodDefault<z.ZodString>;
|
|
22
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
23
|
+
apartment: "apartment";
|
|
24
|
+
"hotel-room": "hotel-room";
|
|
25
|
+
commercial: "commercial";
|
|
26
|
+
common: "common";
|
|
27
|
+
}>>;
|
|
28
|
+
members: z.ZodDefault<z.ZodArray<z.ZodDefault<z.ZodTemplateLiteral<`zone_${string}`>>>>;
|
|
29
|
+
color: z.ZodDefault<z.ZodString>;
|
|
30
|
+
metadata: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
export type UnitNode = z.infer<typeof UnitNode>;
|
|
33
|
+
//# sourceMappingURL=unit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unit.d.ts","sourceRoot":"","sources":["../../../src/schema/nodes/unit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,UAAU,8DAA+D,CAAA;AACtF,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAA;AAClD,eAAO,MAAM,kBAAkB,YAAY,CAAA;AAE3C,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQnB,CAAA;AAEF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BaseNode, nodeType, objectId } from '../base.js';
|
|
3
|
+
export const UNIT_KINDS = ['apartment', 'hotel-room', 'commercial', 'common'];
|
|
4
|
+
export const DEFAULT_UNIT_COLOR = '#f59e0b';
|
|
5
|
+
export const UnitNode = BaseNode.extend({
|
|
6
|
+
id: objectId('unit'),
|
|
7
|
+
type: nodeType('unit'),
|
|
8
|
+
name: z.string().default('Unit'),
|
|
9
|
+
kind: z.enum(UNIT_KINDS).default('apartment'),
|
|
10
|
+
members: z.array(objectId('zone')).default([]),
|
|
11
|
+
color: z.string().default(DEFAULT_UNIT_COLOR),
|
|
12
|
+
metadata: z.record(z.string(), z.unknown()).optional().default({}),
|
|
13
|
+
});
|