@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,372 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { rotateVector } from './spatial.js';
|
|
3
|
+
const id = z.string().regex(/^[a-z][a-z0-9_]{0,47}$/);
|
|
4
|
+
const finite = z.number().finite().min(-1000).max(1000);
|
|
5
|
+
const expression = z.lazy(() => z.union([
|
|
6
|
+
finite,
|
|
7
|
+
id,
|
|
8
|
+
z.strictObject({
|
|
9
|
+
op: z.enum(['add', 'sub', 'mul', 'div', 'min', 'max']),
|
|
10
|
+
args: z.array(expression).min(2).max(8),
|
|
11
|
+
}),
|
|
12
|
+
z.strictObject({
|
|
13
|
+
op: z.enum(['floor', 'ceil', 'round', 'abs']),
|
|
14
|
+
args: z.tuple([expression]),
|
|
15
|
+
}),
|
|
16
|
+
z.strictObject({
|
|
17
|
+
op: z.literal('mod'),
|
|
18
|
+
args: z.tuple([expression, expression]),
|
|
19
|
+
}),
|
|
20
|
+
]));
|
|
21
|
+
const vector = z.tuple([expression, expression, expression]);
|
|
22
|
+
export const RecipeSchema = z.strictObject({
|
|
23
|
+
version: z.literal(1),
|
|
24
|
+
name: z.string().min(1).max(100),
|
|
25
|
+
description: z.string().max(600),
|
|
26
|
+
classification: z
|
|
27
|
+
.strictObject({
|
|
28
|
+
category: id,
|
|
29
|
+
functionTags: z.array(z.string().min(1).max(80)).max(16),
|
|
30
|
+
tags: z.array(z.string().min(1).max(80)).max(16),
|
|
31
|
+
})
|
|
32
|
+
.optional(),
|
|
33
|
+
mounting: z
|
|
34
|
+
.strictObject({ attachTo: z.enum(['wall-side', 'ceiling']), reference: id })
|
|
35
|
+
.optional(),
|
|
36
|
+
surfaces: z
|
|
37
|
+
.array(z.strictObject({
|
|
38
|
+
id,
|
|
39
|
+
label: z.string().min(1).max(60),
|
|
40
|
+
part: id.optional(),
|
|
41
|
+
position: vector,
|
|
42
|
+
rotation: vector.optional(),
|
|
43
|
+
size: z.tuple([expression, expression]),
|
|
44
|
+
}))
|
|
45
|
+
.max(24)
|
|
46
|
+
.optional(),
|
|
47
|
+
parameters: z
|
|
48
|
+
.array(z.strictObject({
|
|
49
|
+
id,
|
|
50
|
+
label: z.string().min(1).max(60),
|
|
51
|
+
default: finite,
|
|
52
|
+
min: finite,
|
|
53
|
+
max: finite,
|
|
54
|
+
step: z.number().positive().max(100),
|
|
55
|
+
unit: z.enum(['m', 'count', 'rad']),
|
|
56
|
+
part: id.optional(),
|
|
57
|
+
axis: z.enum(['x', 'y', 'z']).optional(),
|
|
58
|
+
}))
|
|
59
|
+
.min(1)
|
|
60
|
+
.max(16),
|
|
61
|
+
slots: z
|
|
62
|
+
.array(z.strictObject({
|
|
63
|
+
id,
|
|
64
|
+
label: z.string().min(1).max(60),
|
|
65
|
+
color: z.string().regex(/^#[0-9a-fA-F]{6}$/),
|
|
66
|
+
finish: z.enum(['glass', 'metal', 'wood']).optional(),
|
|
67
|
+
}))
|
|
68
|
+
.min(1)
|
|
69
|
+
.max(8),
|
|
70
|
+
parts: z
|
|
71
|
+
.array(z.strictObject({
|
|
72
|
+
id,
|
|
73
|
+
label: z.string().min(1).max(60),
|
|
74
|
+
count: expression,
|
|
75
|
+
shapes: z
|
|
76
|
+
.array(z.strictObject({
|
|
77
|
+
id,
|
|
78
|
+
primitive: z.enum(['box', 'roundedBox', 'cylinder']),
|
|
79
|
+
slot: id,
|
|
80
|
+
size: vector,
|
|
81
|
+
position: vector,
|
|
82
|
+
rotation: vector.optional(),
|
|
83
|
+
radius: expression.optional(),
|
|
84
|
+
support: z.boolean().optional(),
|
|
85
|
+
}))
|
|
86
|
+
.min(1)
|
|
87
|
+
.max(24),
|
|
88
|
+
}))
|
|
89
|
+
.min(1)
|
|
90
|
+
.max(16),
|
|
91
|
+
constraints: z
|
|
92
|
+
.array(z.strictObject({
|
|
93
|
+
left: expression,
|
|
94
|
+
relation: z.enum(['lte', 'gte']),
|
|
95
|
+
right: expression,
|
|
96
|
+
message: z.string().max(120),
|
|
97
|
+
}))
|
|
98
|
+
.max(24),
|
|
99
|
+
});
|
|
100
|
+
export const RECIPE_LIMITS = {
|
|
101
|
+
bytes: 131072,
|
|
102
|
+
depth: 24,
|
|
103
|
+
expressions: 50000,
|
|
104
|
+
shapes: 256,
|
|
105
|
+
triangles: 100000,
|
|
106
|
+
dimension: 30,
|
|
107
|
+
};
|
|
108
|
+
function guardTree(value, depth = 0, budget = { count: 0 }) {
|
|
109
|
+
if (++budget.count > 12000 || depth > RECIPE_LIMITS.depth)
|
|
110
|
+
throw new Error('Recipe exceeds structural budget');
|
|
111
|
+
if (value && typeof value === 'object') {
|
|
112
|
+
for (const [key, child] of Object.entries(value)) {
|
|
113
|
+
if (['__proto__', 'constructor', 'prototype'].includes(key))
|
|
114
|
+
throw new Error('Reserved key');
|
|
115
|
+
guardTree(child, depth + 1, budget);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
export function parseRecipe(input) {
|
|
120
|
+
guardTree(input);
|
|
121
|
+
if (JSON.stringify(input).length > RECIPE_LIMITS.bytes)
|
|
122
|
+
throw new Error('Recipe is too large');
|
|
123
|
+
const recipe = RecipeSchema.parse(input);
|
|
124
|
+
for (const list of [recipe.parameters, recipe.slots, recipe.parts]) {
|
|
125
|
+
if (new Set(list.map((x) => x.id)).size !== list.length)
|
|
126
|
+
throw new Error('IDs must be unique within each section');
|
|
127
|
+
}
|
|
128
|
+
for (const p of recipe.parameters) {
|
|
129
|
+
if (p.id === 'index' || p.min > p.max || p.default < p.min || p.default > p.max)
|
|
130
|
+
throw new Error(`Invalid parameter ${p.id}`);
|
|
131
|
+
if (p.unit === 'count' && ![p.min, p.max, p.default, p.step].every(Number.isInteger))
|
|
132
|
+
throw new Error(`Count ${p.id} must be integral`);
|
|
133
|
+
if (p.part && !recipe.parts.some((part) => part.id === p.part))
|
|
134
|
+
throw new Error(`Unknown part ${p.part}`);
|
|
135
|
+
}
|
|
136
|
+
for (const part of recipe.parts) {
|
|
137
|
+
if (new Set(part.shapes.map((s) => s.id)).size !== part.shapes.length)
|
|
138
|
+
throw new Error(`Duplicate shape in ${part.id}`);
|
|
139
|
+
for (const shape of part.shapes)
|
|
140
|
+
if (!recipe.slots.some((s) => s.id === shape.slot))
|
|
141
|
+
throw new Error(`Unknown slot ${shape.slot}`);
|
|
142
|
+
}
|
|
143
|
+
const surfaceIds = (recipe.surfaces ?? []).map((s) => s.id);
|
|
144
|
+
if (new Set(surfaceIds).size !== surfaceIds.length)
|
|
145
|
+
throw new Error('Duplicate surface ID');
|
|
146
|
+
for (const surface of recipe.surfaces ?? [])
|
|
147
|
+
if (surface.part && !recipe.parts.some((p) => p.id === surface.part))
|
|
148
|
+
throw new Error('Unknown surface part');
|
|
149
|
+
if (recipe.mounting &&
|
|
150
|
+
!(recipe.surfaces ?? []).some((s) => s.id === recipe.mounting.reference && !s.part))
|
|
151
|
+
throw new Error('Mounting requires one named, non-repeated reference surface');
|
|
152
|
+
const axes = recipe.parameters.flatMap((p) => (p.axis ? [`${p.part ?? 'design'}:${p.axis}`] : []));
|
|
153
|
+
if (new Set(axes).size !== axes.length)
|
|
154
|
+
throw new Error('Only one handle binding per axis in each part');
|
|
155
|
+
evaluateRecipe(recipe);
|
|
156
|
+
return recipe;
|
|
157
|
+
}
|
|
158
|
+
export function evaluateRecipe(recipe, values = {}) {
|
|
159
|
+
const parameters = Object.create(null);
|
|
160
|
+
for (const key of Object.keys(values))
|
|
161
|
+
if (!recipe.parameters.some((p) => p.id === key))
|
|
162
|
+
throw new Error(`Unknown parameter ${key}`);
|
|
163
|
+
for (const p of recipe.parameters) {
|
|
164
|
+
const v = values[p.id] ?? p.default;
|
|
165
|
+
if (!Number.isFinite(v) ||
|
|
166
|
+
v < p.min ||
|
|
167
|
+
v > p.max ||
|
|
168
|
+
(p.unit === 'count' && !Number.isInteger(v)))
|
|
169
|
+
throw new Error(`${p.label} must be between ${p.min} and ${p.max}`);
|
|
170
|
+
parameters[p.id] = v;
|
|
171
|
+
}
|
|
172
|
+
let work = 0;
|
|
173
|
+
const expr = (e, index = 0, depth = 0) => {
|
|
174
|
+
if (++work > RECIPE_LIMITS.expressions || depth > 16)
|
|
175
|
+
throw new Error('Expression budget exceeded');
|
|
176
|
+
if (typeof e === 'number')
|
|
177
|
+
return e;
|
|
178
|
+
if (typeof e === 'string') {
|
|
179
|
+
if (e === 'index')
|
|
180
|
+
return index;
|
|
181
|
+
if (!Object.hasOwn(parameters, e))
|
|
182
|
+
throw new Error(`Unknown expression reference ${e}`);
|
|
183
|
+
return parameters[e];
|
|
184
|
+
}
|
|
185
|
+
const a = e.args.map((x) => expr(x, index, depth + 1));
|
|
186
|
+
let result;
|
|
187
|
+
switch (e.op) {
|
|
188
|
+
case 'add':
|
|
189
|
+
result = a.reduce((x, y) => x + y);
|
|
190
|
+
break;
|
|
191
|
+
case 'sub':
|
|
192
|
+
result = a.reduce((x, y) => x - y);
|
|
193
|
+
break;
|
|
194
|
+
case 'mul':
|
|
195
|
+
result = a.reduce((x, y) => x * y);
|
|
196
|
+
break;
|
|
197
|
+
case 'div':
|
|
198
|
+
result = a.reduce((x, y) => x / y);
|
|
199
|
+
break;
|
|
200
|
+
case 'floor':
|
|
201
|
+
result = Math.floor(a[0]);
|
|
202
|
+
break;
|
|
203
|
+
case 'ceil':
|
|
204
|
+
result = Math.ceil(a[0]);
|
|
205
|
+
break;
|
|
206
|
+
case 'round':
|
|
207
|
+
result = Math.round(a[0]);
|
|
208
|
+
break;
|
|
209
|
+
case 'abs':
|
|
210
|
+
result = Math.abs(a[0]);
|
|
211
|
+
break;
|
|
212
|
+
case 'mod': {
|
|
213
|
+
const divisor = a[1];
|
|
214
|
+
if (divisor <= 0)
|
|
215
|
+
throw new Error('Modulo divisor must be positive');
|
|
216
|
+
const remainder = a[0] % divisor;
|
|
217
|
+
result = remainder < 0 ? remainder + divisor : remainder === 0 ? 0 : remainder;
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
case 'min':
|
|
221
|
+
result = Math.min(...a);
|
|
222
|
+
break;
|
|
223
|
+
case 'max':
|
|
224
|
+
result = Math.max(...a);
|
|
225
|
+
break;
|
|
226
|
+
default:
|
|
227
|
+
throw new Error('Unsupported operation');
|
|
228
|
+
}
|
|
229
|
+
if (!Number.isFinite(result) || Math.abs(result) > 10000)
|
|
230
|
+
throw new Error('Invalid expression result');
|
|
231
|
+
return result;
|
|
232
|
+
};
|
|
233
|
+
for (const c of recipe.constraints) {
|
|
234
|
+
const a = expr(c.left), b = expr(c.right);
|
|
235
|
+
if (c.relation === 'lte' ? a > b + 1e-8 : a < b - 1e-8)
|
|
236
|
+
throw new Error(c.message);
|
|
237
|
+
}
|
|
238
|
+
const shapes = [], surfaces = [];
|
|
239
|
+
const min = [Infinity, Infinity, Infinity], max = [-Infinity, -Infinity, -Infinity];
|
|
240
|
+
let triangles = 0;
|
|
241
|
+
for (const part of recipe.parts) {
|
|
242
|
+
const count = expr(part.count);
|
|
243
|
+
if (!Number.isInteger(count) || count < 0 || count > 64)
|
|
244
|
+
throw new Error(`Invalid repeat count for ${part.label}`);
|
|
245
|
+
for (let i = 0; i < count; i++)
|
|
246
|
+
for (const s of part.shapes) {
|
|
247
|
+
if (shapes.length >= RECIPE_LIMITS.shapes)
|
|
248
|
+
throw new Error('Expanded shape budget exceeded');
|
|
249
|
+
const vec = (v) => v.map((x) => expr(x, i));
|
|
250
|
+
const size = vec(s.size), position = vec(s.position), rotation = vec(s.rotation ?? [0, 0, 0]);
|
|
251
|
+
if (size.some((x) => x < 0.001 || x > RECIPE_LIMITS.dimension))
|
|
252
|
+
throw new Error(`Invalid dimensions for ${part.id}/${s.id}`);
|
|
253
|
+
const radius = s.primitive === 'roundedBox' ? expr(s.radius ?? 0.02, i) : 0;
|
|
254
|
+
if (radius < 0 || radius > Math.min(...size) / 2)
|
|
255
|
+
throw new Error(`Invalid rounding for ${s.id}`);
|
|
256
|
+
const shapeId = `${part.id}:${i}:${s.id}`;
|
|
257
|
+
shapes.push({
|
|
258
|
+
id: shapeId,
|
|
259
|
+
partId: part.id,
|
|
260
|
+
primitive: s.primitive,
|
|
261
|
+
slot: s.slot,
|
|
262
|
+
size,
|
|
263
|
+
position,
|
|
264
|
+
rotation,
|
|
265
|
+
radius,
|
|
266
|
+
});
|
|
267
|
+
triangles += s.primitive === 'roundedBox' ? 588 : s.primitive === 'cylinder' ? 96 : 12;
|
|
268
|
+
if (triangles > RECIPE_LIMITS.triangles)
|
|
269
|
+
throw new Error('Triangle budget exceeded');
|
|
270
|
+
// XYZ Euler rotations match Three.js; bounding corners remain pure domain math.
|
|
271
|
+
for (const x of [-size[0] / 2, size[0] / 2])
|
|
272
|
+
for (const y of [-size[1] / 2, size[1] / 2])
|
|
273
|
+
for (const z of [-size[2] / 2, size[2] / 2]) {
|
|
274
|
+
const [rx, ry, rz] = rotation;
|
|
275
|
+
const x1 = x * Math.cos(rz) - y * Math.sin(rz), y1 = x * Math.sin(rz) + y * Math.cos(rz);
|
|
276
|
+
const x2 = x1 * Math.cos(ry) + z * Math.sin(ry), z2 = -x1 * Math.sin(ry) + z * Math.cos(ry);
|
|
277
|
+
const point = [
|
|
278
|
+
x2 + position[0],
|
|
279
|
+
y1 * Math.cos(rx) - z2 * Math.sin(rx) + position[1],
|
|
280
|
+
y1 * Math.sin(rx) + z2 * Math.cos(rx) + position[2],
|
|
281
|
+
];
|
|
282
|
+
for (let k = 0; k < 3; k++) {
|
|
283
|
+
min[k] = Math.min(min[k], point[k]);
|
|
284
|
+
max[k] = Math.max(max[k], point[k]);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
if (s.support) {
|
|
288
|
+
if (rotation.some((v) => v !== 0))
|
|
289
|
+
throw new Error('Support surfaces must be horizontal and unrotated in v1');
|
|
290
|
+
surfaces.push({
|
|
291
|
+
id: `${shapeId}:top`,
|
|
292
|
+
label: part.label,
|
|
293
|
+
rotation: [0, 0, 0],
|
|
294
|
+
normal: [0, 1, 0],
|
|
295
|
+
position: [position[0], position[1] + size[1] / 2, position[2]],
|
|
296
|
+
size: [size[0], size[2]],
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
for (const surface of recipe.surfaces ?? []) {
|
|
302
|
+
const part = recipe.parts.find((p) => p.id === surface.part);
|
|
303
|
+
const count = part ? expr(part.count) : 1;
|
|
304
|
+
for (let i = 0; i < count; i++) {
|
|
305
|
+
if (surfaces.length >= 256)
|
|
306
|
+
throw new Error('Surface budget exceeded');
|
|
307
|
+
const rotation = (surface.rotation ?? [0, 0, 0]).map((e) => expr(e, i));
|
|
308
|
+
const size = surface.size.map((e) => expr(e, i));
|
|
309
|
+
const position = surface.position.map((e) => expr(e, i));
|
|
310
|
+
if (size.some((v) => v < 0.001 || v > 30) || position.some((v) => Math.abs(v) > 30))
|
|
311
|
+
throw new Error('Invalid surface region');
|
|
312
|
+
surfaces.push({
|
|
313
|
+
id: part ? `${surface.id}:${i}` : surface.id,
|
|
314
|
+
label: part ? `${surface.label} ${i + 1}` : surface.label,
|
|
315
|
+
position,
|
|
316
|
+
rotation,
|
|
317
|
+
normal: rotateVector([0, 1, 0], rotation),
|
|
318
|
+
size,
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
if (recipe.mounting) {
|
|
323
|
+
const reference = surfaces.find((s) => s.id === recipe.mounting.reference);
|
|
324
|
+
if (!reference || reference.id.includes(':'))
|
|
325
|
+
throw new Error('Missing mounting reference');
|
|
326
|
+
if (recipe.mounting.attachTo === 'ceiling') {
|
|
327
|
+
if (Math.abs(reference.normal[1] - 1) > 1e-6)
|
|
328
|
+
throw new Error('Ceiling mounting reference must face local +Y');
|
|
329
|
+
if (Math.abs(reference.position[1] - max[1]) > 1e-6)
|
|
330
|
+
throw new Error('Ceiling mounting reference must lie at the top of the design');
|
|
331
|
+
}
|
|
332
|
+
else if (Math.abs(reference.normal[2] + 1) > 1e-6)
|
|
333
|
+
throw new Error('Wall-side mounting reference must face local -Z');
|
|
334
|
+
}
|
|
335
|
+
if (!shapes.length)
|
|
336
|
+
throw new Error('The item must contain geometry');
|
|
337
|
+
const dimensions = max.map((x, i) => x - min[i]);
|
|
338
|
+
if (dimensions.some((x) => x > 30) || [...min, ...max].some((x) => Math.abs(x) > 30))
|
|
339
|
+
throw new Error('Item exceeds 30 m bounds');
|
|
340
|
+
if (min[1] < -0.001)
|
|
341
|
+
throw new Error('Geometry extends below the ground; base must be at y=0');
|
|
342
|
+
return { shapes, surfaces, min, max, dimensions, parameters, triangles };
|
|
343
|
+
}
|
|
344
|
+
export function sweepRecipe(recipe) {
|
|
345
|
+
const cases = [{}];
|
|
346
|
+
for (const p of recipe.parameters)
|
|
347
|
+
cases.push({ [p.id]: p.min }, { [p.id]: p.max });
|
|
348
|
+
let seed = 731;
|
|
349
|
+
for (let i = 0; i < 20; i++) {
|
|
350
|
+
const values = {};
|
|
351
|
+
for (const p of recipe.parameters) {
|
|
352
|
+
seed = (Math.imul(seed, 1664525) + 1013904223) >>> 0;
|
|
353
|
+
const n = Math.floor((p.max - p.min) / p.step);
|
|
354
|
+
values[p.id] = Math.min(p.max, p.min + Math.floor((seed / 4294967296) * (n + 1)) * p.step);
|
|
355
|
+
}
|
|
356
|
+
cases.push(values);
|
|
357
|
+
}
|
|
358
|
+
return cases.map((values, index) => {
|
|
359
|
+
try {
|
|
360
|
+
evaluateRecipe(recipe, values);
|
|
361
|
+
return { index, values, valid: true, error: null };
|
|
362
|
+
}
|
|
363
|
+
catch (error) {
|
|
364
|
+
return {
|
|
365
|
+
index,
|
|
366
|
+
values,
|
|
367
|
+
valid: false,
|
|
368
|
+
error: error instanceof Error ? error.message : String(error),
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
});
|
|
372
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Vec3 } from './recipe.js';
|
|
2
|
+
export type Frame = {
|
|
3
|
+
position: Vec3;
|
|
4
|
+
axes: [Vec3, Vec3, Vec3];
|
|
5
|
+
};
|
|
6
|
+
export type Bounds = {
|
|
7
|
+
min: Vec3;
|
|
8
|
+
max: Vec3;
|
|
9
|
+
dimensions: Vec3;
|
|
10
|
+
};
|
|
11
|
+
export declare const IDENTITY_FRAME: Frame;
|
|
12
|
+
export declare function rotateVector([x, y, z]: Vec3, [rx, ry, rz]: Vec3): Vec3;
|
|
13
|
+
export declare function frame(position: Vec3, rotation?: Vec3): Frame;
|
|
14
|
+
export declare function direction(f: Frame, p: Vec3): Vec3;
|
|
15
|
+
export declare function transformPoint(f: Frame, p: Vec3): Vec3;
|
|
16
|
+
export declare function composeFrames(a: Frame, b: Frame): Frame;
|
|
17
|
+
export declare function boundsOf(points: Vec3[]): Bounds;
|
|
18
|
+
export declare function boxCorners(min: Vec3, max: Vec3): Vec3[];
|
|
19
|
+
//# sourceMappingURL=spatial.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spatial.d.ts","sourceRoot":"","sources":["../../src/procedural-items/spatial.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAEpC,MAAM,MAAM,KAAK,GAAG;IAAE,QAAQ,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;CAAE,CAAA;AAChE,MAAM,MAAM,MAAM,GAAG;IAAE,GAAG,EAAE,IAAI,CAAC;IAAC,GAAG,EAAE,IAAI,CAAC;IAAC,UAAU,EAAE,IAAI,CAAA;CAAE,CAAA;AAC/D,eAAO,MAAM,cAAc,EAAE,KAO5B,CAAA;AACD,wBAAgB,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,CAMtE;AACD,wBAAgB,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,GAAE,IAAgB,GAAG,KAAK,CAKvE;AACD,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,CAIjD;AACD,wBAAgB,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,CAEtD;AACD,wBAAgB,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,GAAG,KAAK,CAKvD;AACD,wBAAgB,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAI/C;AACD,wBAAgB,UAAU,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,GAAG,IAAI,EAAE,CAIvD"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export const IDENTITY_FRAME = {
|
|
2
|
+
position: [0, 0, 0],
|
|
3
|
+
axes: [
|
|
4
|
+
[1, 0, 0],
|
|
5
|
+
[0, 1, 0],
|
|
6
|
+
[0, 0, 1],
|
|
7
|
+
],
|
|
8
|
+
};
|
|
9
|
+
export function rotateVector([x, y, z], [rx, ry, rz]) {
|
|
10
|
+
const x1 = x * Math.cos(rz) - y * Math.sin(rz), y1 = x * Math.sin(rz) + y * Math.cos(rz);
|
|
11
|
+
const x2 = x1 * Math.cos(ry) + z * Math.sin(ry), z2 = -x1 * Math.sin(ry) + z * Math.cos(ry);
|
|
12
|
+
return [x2, y1 * Math.cos(rx) - z2 * Math.sin(rx), y1 * Math.sin(rx) + z2 * Math.cos(rx)];
|
|
13
|
+
}
|
|
14
|
+
export function frame(position, rotation = [0, 0, 0]) {
|
|
15
|
+
return {
|
|
16
|
+
position,
|
|
17
|
+
axes: IDENTITY_FRAME.axes.map((v) => rotateVector(v, rotation)),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export function direction(f, p) {
|
|
21
|
+
return [0, 1, 2].map((i) => f.axes[0][i] * p[0] + f.axes[1][i] * p[1] + f.axes[2][i] * p[2]);
|
|
22
|
+
}
|
|
23
|
+
export function transformPoint(f, p) {
|
|
24
|
+
return direction(f, p).map((v, i) => v + f.position[i]);
|
|
25
|
+
}
|
|
26
|
+
export function composeFrames(a, b) {
|
|
27
|
+
return {
|
|
28
|
+
position: transformPoint(a, b.position),
|
|
29
|
+
axes: b.axes.map((v) => direction(a, v)),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export function boundsOf(points) {
|
|
33
|
+
const min = [0, 1, 2].map((i) => Math.min(...points.map((p) => p[i])));
|
|
34
|
+
const max = [0, 1, 2].map((i) => Math.max(...points.map((p) => p[i])));
|
|
35
|
+
return { min, max, dimensions: max.map((v, i) => v - min[i]) };
|
|
36
|
+
}
|
|
37
|
+
export function boxCorners(min, max) {
|
|
38
|
+
return [min[0], max[0]].flatMap((x) => [min[1], max[1]].flatMap((y) => [min[2], max[2]].map((z) => [x, y, z])));
|
|
39
|
+
}
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* Doubles as a regression gate — wire into CI when we have a baseline.
|
|
13
13
|
*/
|
|
14
14
|
import { z } from 'zod';
|
|
15
|
-
import { nodeRegistry, registerNode } from '../registry';
|
|
16
|
-
import { cascadeDirty } from '../relations-resolver';
|
|
15
|
+
import { nodeRegistry, registerNode } from '../registry.js';
|
|
16
|
+
import { cascadeDirty } from '../relations-resolver.js';
|
|
17
17
|
const ID = (s) => s;
|
|
18
18
|
function makeDef(kind, relations) {
|
|
19
19
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AnyNode, AnyNodeId } from '../schema/types';
|
|
2
|
-
import type { SceneApi } from './types';
|
|
1
|
+
import type { AnyNode, AnyNodeId } from '../schema/types.js';
|
|
2
|
+
import type { SceneApi } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Editor-facing verbs that handle descriptors can invoke.
|
|
5
5
|
*
|
|
@@ -49,6 +49,12 @@ export type HandleAnchor = 'center' | 'min' | 'max';
|
|
|
49
49
|
/** Keyboard modifiers captured for a handle-resize tick. */
|
|
50
50
|
export type HandleDragModifiers = {
|
|
51
51
|
readonly altKey: boolean;
|
|
52
|
+
readonly shiftKey?: boolean;
|
|
53
|
+
};
|
|
54
|
+
export type HandlePreviewSession<N> = {
|
|
55
|
+
preview: (patch: Partial<N>) => void;
|
|
56
|
+
commit: (patch?: Partial<N>) => void;
|
|
57
|
+
cancel: () => void;
|
|
52
58
|
};
|
|
53
59
|
/** 3D position + rotation of the arrow in its portal target's local space. */
|
|
54
60
|
export type HandlePlacement<N> = {
|
|
@@ -97,8 +103,10 @@ export type HandleDecoration<N> = {
|
|
|
97
103
|
*/
|
|
98
104
|
export type LinearResizeHandle<N> = {
|
|
99
105
|
kind: 'linear-resize';
|
|
100
|
-
/** Local
|
|
106
|
+
/** Local resize axis. */
|
|
101
107
|
axis: HandleAxis;
|
|
108
|
+
/** Arrow and clearance direction. Drag growth remains controlled by `anchor`. */
|
|
109
|
+
direction?: 1 | -1;
|
|
102
110
|
anchor: HandleAnchor;
|
|
103
111
|
currentValue: (node: N) => number;
|
|
104
112
|
apply: (node: N, newValue: number, sceneApi: SceneApi, modifiers?: HandleDragModifiers) => Partial<N>;
|
|
@@ -158,7 +166,13 @@ export type LinearResizeHandle<N> = {
|
|
|
158
166
|
* lean-to roof edges becoming one continuous run.
|
|
159
167
|
*/
|
|
160
168
|
connectionSnap?: (node: N, newValue: number, sceneApi: SceneApi) => number;
|
|
161
|
-
placement: HandlePlacement<N
|
|
169
|
+
placement: HandlePlacement<N> & {
|
|
170
|
+
/** Opt-in minimum center distance from an edge along `direction` (default +1), in scaled arrow units. */
|
|
171
|
+
clearance?: {
|
|
172
|
+
edge: (node: N, sceneApi: SceneApi) => number;
|
|
173
|
+
distance: number;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
162
176
|
/**
|
|
163
177
|
* Dimension this handle steers (e.g. `'height'`). When set, the editor
|
|
164
178
|
* publishes it to `activeHandleDrag.label` for the duration of the drag
|
|
@@ -240,6 +254,25 @@ export type RadialResizeHandle<N> = {
|
|
|
240
254
|
/** Optional visual guide shown while the arrow is hovered or dragging. */
|
|
241
255
|
decoration?: HandleDecoration<N>;
|
|
242
256
|
};
|
|
257
|
+
/**
|
|
258
|
+
* In-plane corner-radius knob. The editor places the knob diagonally inward
|
|
259
|
+
* from `corner` and converts its pointer position back into a radius. Holding
|
|
260
|
+
* Shift is exposed through `modifiers` so kinds can switch from a shared
|
|
261
|
+
* radius to per-corner radii without teaching the editor their schema.
|
|
262
|
+
*/
|
|
263
|
+
export type CornerRadiusHandle<N> = {
|
|
264
|
+
kind: 'corner-radius';
|
|
265
|
+
corner: readonly [x: -1 | 1, y: -1 | 1];
|
|
266
|
+
width: (node: N) => number;
|
|
267
|
+
height: (node: N) => number;
|
|
268
|
+
currentValue: (node: N) => number;
|
|
269
|
+
max: number | ((node: N, sceneApi: SceneApi) => number);
|
|
270
|
+
apply: (node: N, newValue: number, sceneApi: SceneApi, modifiers: HandleDragModifiers) => Partial<N>;
|
|
271
|
+
createPreview?: (node: N) => HandlePreviewSession<N>;
|
|
272
|
+
visible?: (node: N, sceneApi: SceneApi) => boolean;
|
|
273
|
+
portal?: HandlePortal;
|
|
274
|
+
portalTarget?: HandlePortalTarget<N>;
|
|
275
|
+
};
|
|
243
276
|
/**
|
|
244
277
|
* Curved / spiral stair sweep arrows. The renderer raycasts a horizontal
|
|
245
278
|
* plane through the arrow's Y and emits the angular delta (radians,
|
|
@@ -275,6 +308,8 @@ export type ArcResizeHandle<N = any> = {
|
|
|
275
308
|
* arrow icon, intended for whole-node rotation handles.
|
|
276
309
|
*/
|
|
277
310
|
shape?: 'chevron' | 'rotate';
|
|
311
|
+
/** Disable the default 15° snap for whole-node rotation. */
|
|
312
|
+
continuous?: boolean;
|
|
278
313
|
/**
|
|
279
314
|
* Plane the angular drag is measured in:
|
|
280
315
|
* - 'horizontal' (default): cursor bearing around +Y — whole-node yaw
|
|
@@ -421,7 +456,7 @@ export type LatchHandle<N = any> = {
|
|
|
421
456
|
portal?: HandlePortal;
|
|
422
457
|
portalTarget?: HandlePortalTarget<N>;
|
|
423
458
|
};
|
|
424
|
-
export type HandleDescriptor<N = any> = LinearResizeHandle<N> | RadialResizeHandle<N> | ArcResizeHandle<N> | EndpointMoveHandle<N> | TapActionHandle<N> | TranslateHandle<N> | LatchHandle<N>;
|
|
459
|
+
export type HandleDescriptor<N = any> = LinearResizeHandle<N> | RadialResizeHandle<N> | CornerRadiusHandle<N> | ArcResizeHandle<N> | EndpointMoveHandle<N> | TapActionHandle<N> | TranslateHandle<N> | LatchHandle<N>;
|
|
425
460
|
/**
|
|
426
461
|
* Static array, or a function for shape-dependent cases (column
|
|
427
462
|
* crossSection / supportStyle, stair-segment segmentType, etc.).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handles.d.ts","sourceRoot":"","sources":["../../src/registry/handles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvC;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB;;;;OAIG;IACH,UAAU,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACnC;;;;OAIG;IACH,cAAc,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACvC;;;OAGG;IACH,kBAAkB,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,KAAK,KAAK,IAAI,CAAA;IACtE;;;OAGG;IACH,sBAAsB,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC9D;;;;OAIG;IACH,iBAAiB,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,KAAK,KAAK,IAAI,CAAA;CAC9E,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,aAAa,CAAA;AAE5D,MAAM,MAAM,kBAAkB,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,KAAK,SAAS,GAAG,IAAI,GAAG,SAAS,CAAA;AAEjG,MAAM,MAAM,UAAU,GAAG,GAAG,GAAG,GAAG,GAA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C,CAAA;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,GAAG,IAAI;IACjC,IAAI,EAAE,OAAO,CAAA;IACb,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,eAAe,CAAC,CAAC,CAAC,CAAA;IAC7B,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,YAAY,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAA;CACrC,CAAA;AAED,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,GAAG,IAChC,kBAAkB,CAAC,CAAC,CAAC,GACrB,kBAAkB,CAAC,CAAC,CAAC,GACrB,kBAAkB,CAAC,CAAC,CAAC,GACrB,eAAe,CAAC,CAAC,CAAC,GAClB,kBAAkB,CAAC,CAAC,CAAC,GACrB,eAAe,CAAC,CAAC,CAAC,GAClB,eAAe,CAAC,CAAC,CAAC,GAClB,WAAW,CAAC,CAAC,CAAC,CAAA;AAElB;;;GAGG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,IACpB,gBAAgB,CAAC,CAAC,CAAC,EAAE,GACrB,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,CAAC,EAAE,QAAQ,KAAK,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA"}
|
package/dist/registry/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export type { ArcResizeHandle, Cursor, EditorApi, EndpointMoveHandle, HandleAnchor, HandleAxis, HandleDescriptor, HandleDragModifiers, HandleList, HandlePlacement, HandlePortal, LatchHandle, LinearResizeHandle, RadialResizeHandle, TapActionHandle, TranslateHandle, } from './handles';
|
|
2
|
-
export { bakePolicyOf, discoverPlugins, extendPluginDiscovery, getHostRefFields, getInspectorExtensions, getNodePluginId, getRegistryVersion, getSelectableKinds, hasRegistry3DMoveTool, isDrawnViaTool, isDrawnViaToolKind, isNodeKindEnabled, isPresettable, isPresettableKind, isRegistryMovable, isRegistrySelectable, isSelectionHighlightEnabled, kindsWithBakePolicy, kindsWithFloorplanScope, loadPlugin, nodeRegistry, onRegistryChange, type PluginDiscovery, registerNode, resolveFacingIndicator, setPluginDiscovery, } from './registry';
|
|
3
|
-
export { type CascadeContext, type ChildQuery, cascadeDirty, collectDescendants, type SpatialQuery, } from './relations-resolver';
|
|
4
|
-
export { createSceneApi, type SceneStoreLike } from './scene-api';
|
|
5
|
-
export { type CloneNodesIntoOptions, type CloneNodesIntoResult, cloneNodesInto, collectSubtree, type Subtree, } from './subtree';
|
|
6
|
-
export type { Affordance, AlignmentFootprint, AlignmentFootprintConfig, AnyNodeDefinition, AssetRef, BakeGeometryAsyncBuilder, BakeGeometryBuilder, BakePolicy, BakeReplaceRenderer, Capabilities, CapabilityCtx, CuttableConfig, DimensionTerminator, DimensionTextPosition, DistributionRole, DragAction, DuplicableConfig, DuplicateSubtreeCloneArgs, DuplicateSubtreeCloneResult, EditorCtx, ExportAnimationContext, FaceHostCapability, FaceHostPlacementArgs, FaceHostPlacementResult, FaceHostStoredPlacementArgs, FaceHostStoredValidityArgs, FloorPlacedConfig, FloorPlacedFootprint, FloorPlacedFootprintContext, FloorPlacedFootprintResolver, FloorPlacedFootprintsResolver, FloorplanAffordance, FloorplanAffordanceModifiers, FloorplanAffordancePoint, FloorplanAffordanceSession, FloorplanGeometry, FloorplanMoveTarget, FloorplanMoveTargetSession, FloorplanPalette, FloorplanPoint, FloorplanScope, FloorplanStyle, GeometryContext, GridSnapPositionArgs, GroupMoveSnapArgs, GroupMoveSnapResult, HostableConfig, IconRef, InspectorExtension, Issue, KeyboardAction, KeyboardActions, LazyComponent, LiveTransformLike, McpOverrides, MeasurementContribution, MeasurementFeature, MeasurementFeatureBinding, MeasurementFeatureGeometry, MeasurementSnapKind, Modifiers, MovableConfig, MovableParentFrame, NodeCategory, NodeDefinition, NodePort, NodeQuickAction, NodeQuickActionIcon, NodeQuickActionNodeScope, NodeQuickActionProvider, NodeQuickActionResult, NodeRegistry, PaintCapability, PaintEffectiveMaterialArgs, PaintPatchArgs, PaintPreviewArgs, PaintResolveArgs, ParamAction, ParametricDescriptor, ParamField, ParamGroup, ParentFrameSnapMatch, Plugin, Presentation, QuickMeasurementMetric, QuickMeasurementQuantity, QuickMeasurementReport, Relations, RendererSource, RoofAccessoryConfig, RotatableConfig, ScalableConfig, SceneActionCapability, SceneApi, SelectableConfig, SlotDeclaration, SnapPointKind, SnapProfile, SnappableConfig, SnapServicesLike, SurfacePoint, SurfaceQuery, SurfaceRole, SurfacesConfig, SystemContribution, ToolHint, ToolHintChip, ToolOption, ToolOptionChoice, Vec2, } from './types';
|
|
1
|
+
export type { ArcResizeHandle, CornerRadiusHandle, Cursor, EditorApi, EndpointMoveHandle, HandleAnchor, HandleAxis, HandleDescriptor, HandleDragModifiers, HandleList, HandlePlacement, HandlePortal, HandlePreviewSession, LatchHandle, LinearResizeHandle, RadialResizeHandle, TapActionHandle, TranslateHandle, } from './handles.js';
|
|
2
|
+
export { bakePolicyOf, discoverPlugins, extendPluginDiscovery, getHostRefFields, getInspectorExtensions, getNodePluginId, getRegistryVersion, getSelectableKinds, hasRegistry3DMoveTool, isDrawnViaTool, isDrawnViaToolKind, isNodeKindEnabled, isPresettable, isPresettableKind, isRegistryMovable, isRegistrySelectable, isSelectionHighlightEnabled, kindsWithBakePolicy, kindsWithFloorplanScope, loadPlugin, nodeRegistry, onRegistryChange, type PluginDiscovery, registerNode, resolveFacingIndicator, setPluginDiscovery, } from './registry.js';
|
|
3
|
+
export { type CascadeContext, type ChildQuery, cascadeDirty, collectDescendants, type SpatialQuery, } from './relations-resolver.js';
|
|
4
|
+
export { createSceneApi, type SceneStoreLike } from './scene-api.js';
|
|
5
|
+
export { type CloneNodesIntoOptions, type CloneNodesIntoResult, cloneNodesInto, collectSubtree, type Subtree, } from './subtree.js';
|
|
6
|
+
export type { Affordance, AlignmentFootprint, AlignmentFootprintConfig, AnyNodeDefinition, AssetRef, BakeGeometryAsyncBuilder, BakeGeometryBuilder, BakePolicy, BakeReplaceRenderer, Capabilities, CapabilityCtx, CuttableConfig, DimensionTerminator, DimensionTextPosition, DistributionRole, DragAction, DuplicableConfig, DuplicateSubtreeCloneArgs, DuplicateSubtreeCloneResult, EditorCtx, ExportAnimationContext, FaceHostCapability, FaceHostPlacementArgs, FaceHostPlacementResult, FaceHostStoredPlacementArgs, FaceHostStoredValidityArgs, FloorPlacedConfig, FloorPlacedFootprint, FloorPlacedFootprintContext, FloorPlacedFootprintResolver, FloorPlacedFootprintsResolver, FloorplanAffordance, FloorplanAffordanceModifiers, FloorplanAffordancePoint, FloorplanAffordanceSession, FloorplanGeometry, FloorplanMoveTarget, FloorplanMoveTargetSession, FloorplanPalette, FloorplanPoint, FloorplanScope, FloorplanStyle, GeometryContext, GridSnapPositionArgs, GroupMoveSnapArgs, GroupMoveSnapResult, HostableConfig, IconRef, InspectorExtension, Issue, KeyboardAction, KeyboardActions, LazyComponent, LiveTransformLike, McpOverrides, MeasurementContribution, MeasurementFeature, MeasurementFeatureBinding, MeasurementFeatureGeometry, MeasurementSnapKind, Modifiers, MovableConfig, MovableParentFrame, NodeCategory, NodeDefinition, NodePort, NodeQuickAction, NodeQuickActionIcon, NodeQuickActionNodeScope, NodeQuickActionProvider, NodeQuickActionResult, NodeRegistry, PaintCapability, PaintEffectiveMaterialArgs, PaintPatchArgs, PaintPreviewArgs, PaintResolveArgs, ParamAction, ParametricDescriptor, ParamField, ParamGroup, ParentFrameSnapMatch, Plugin, Presentation, QuickMeasurementMetric, QuickMeasurementQuantity, QuickMeasurementReport, Relations, RendererSource, RoofAccessoryConfig, RotatableConfig, ScalableConfig, SceneActionCapability, SceneApi, SelectableConfig, SlotDeclaration, SnapPointKind, SnapProfile, SnappableConfig, SnapServicesLike, SurfacePoint, SurfaceQuery, SurfaceRole, SurfacesConfig, SystemContribution, ToolHint, ToolHintChip, ToolOption, ToolOptionChoice, Vec2, } from './types.js';
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/registry/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,MAAM,EACN,SAAS,EACT,kBAAkB,EAClB,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,mBAAmB,EACnB,UAAU,EACV,eAAe,EACf,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,eAAe,GAChB,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,2BAA2B,EAC3B,mBAAmB,EACnB,uBAAuB,EACvB,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,KAAK,eAAe,EACpB,YAAY,EACZ,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,YAAY,EACZ,kBAAkB,EAClB,KAAK,YAAY,GAClB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAA;AACjE,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,cAAc,EACd,cAAc,EACd,KAAK,OAAO,GACb,MAAM,WAAW,CAAA;AAClB,YAAY,EACV,UAAU,EACV,kBAAkB,EAClB,wBAAwB,EACxB,iBAAiB,EACjB,QAAQ,EACR,wBAAwB,EACxB,mBAAmB,EACnB,UAAU,EACV,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,qBAAqB,EACrB,gBAAg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ChB,IAAI,GACL,MAAM,SAAS,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/registry/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,MAAM,EACN,SAAS,EACT,kBAAkB,EAClB,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,mBAAmB,EACnB,UAAU,EACV,eAAe,EACf,YAAY,EACZ,oBAAoB,EACpB,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,eAAe,GAChB,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,2BAA2B,EAC3B,mBAAmB,EACnB,uBAAuB,EACvB,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,KAAK,eAAe,EACpB,YAAY,EACZ,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,YAAY,EACZ,kBAAkB,EAClB,KAAK,YAAY,GAClB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAA;AACjE,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,cAAc,EACd,cAAc,EACd,KAAK,OAAO,GACb,MAAM,WAAW,CAAA;AAClB,YAAY,EACV,UAAU,EACV,kBAAkB,EAClB,wBAAwB,EACxB,iBAAiB,EACjB,QAAQ,EACR,wBAAwB,EACxB,mBAAmB,EACnB,UAAU,EACV,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,m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YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,IAAI,GACL,MAAM,SAAS,CAAA"}
|
package/dist/registry/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { bakePolicyOf, discoverPlugins, extendPluginDiscovery, getHostRefFields, getInspectorExtensions, getNodePluginId, getRegistryVersion, getSelectableKinds, hasRegistry3DMoveTool, isDrawnViaTool, isDrawnViaToolKind, isNodeKindEnabled, isPresettable, isPresettableKind, isRegistryMovable, isRegistrySelectable, isSelectionHighlightEnabled, kindsWithBakePolicy, kindsWithFloorplanScope, loadPlugin, nodeRegistry, onRegistryChange, registerNode, resolveFacingIndicator, setPluginDiscovery, } from './registry';
|
|
2
|
-
export { cascadeDirty, collectDescendants, } from './relations-resolver';
|
|
3
|
-
export { createSceneApi } from './scene-api';
|
|
4
|
-
export { cloneNodesInto, collectSubtree, } from './subtree';
|
|
1
|
+
export { bakePolicyOf, discoverPlugins, extendPluginDiscovery, getHostRefFields, getInspectorExtensions, getNodePluginId, getRegistryVersion, getSelectableKinds, hasRegistry3DMoveTool, isDrawnViaTool, isDrawnViaToolKind, isNodeKindEnabled, isPresettable, isPresettableKind, isRegistryMovable, isRegistrySelectable, isSelectionHighlightEnabled, kindsWithBakePolicy, kindsWithFloorplanScope, loadPlugin, nodeRegistry, onRegistryChange, registerNode, resolveFacingIndicator, setPluginDiscovery, } from './registry.js';
|
|
2
|
+
export { cascadeDirty, collectDescendants, } from './relations-resolver.js';
|
|
3
|
+
export { createSceneApi } from './scene-api.js';
|
|
4
|
+
export { cloneNodesInto, collectSubtree, } from './subtree.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AnyNodeDefinition, BakePolicy, FloorplanScope, InspectorExtension, NodeRegistry, Plugin } from './types';
|
|
1
|
+
import type { AnyNodeDefinition, BakePolicy, FloorplanScope, InspectorExtension, NodeRegistry, Plugin } from './types.js';
|
|
2
2
|
/** Monotonic counter, bumped on every kind registration (and test reset). */
|
|
3
3
|
export declare function getRegistryVersion(): number;
|
|
4
4
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AnyNode, AnyNodeId } from '../schema/types';
|
|
2
|
-
import type { SceneApi } from './types';
|
|
1
|
+
import type { AnyNode, AnyNodeId } from '../schema/types.js';
|
|
2
|
+
import type { SceneApi } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Spatial neighbor query — given a node and a set of kinds, returns IDs of
|
|
5
5
|
* neighboring nodes of those kinds. The runtime provides this from
|