@pascal-app/editor 0.8.0 → 0.9.2
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/package.json +15 -13
- package/src/components/editor/alignment-3d-guide-layer.tsx +168 -0
- package/src/components/editor/bake-exporter.tsx +47 -0
- package/src/components/editor/custom-camera-controls.tsx +795 -28
- package/src/components/editor/editor-layout-mobile.tsx +8 -3
- package/src/components/editor/editor-layout-v2.tsx +76 -51
- package/src/components/editor/export-manager.tsx +69 -32
- package/src/components/editor/fence-tangent-lines-3d.tsx +87 -0
- package/src/components/editor/first-person/build-collider-world.test.ts +182 -0
- package/src/components/editor/first-person/build-collider-world.ts +228 -83
- package/src/components/editor/first-person-controls.tsx +943 -27
- package/src/components/editor/floating-action-menu.tsx +676 -208
- package/src/components/editor/floating-building-action-menu.tsx +2 -2
- package/src/components/editor/floorplan-background-selection.test.ts +58 -0
- package/src/components/editor/floorplan-background-selection.ts +3 -2
- package/src/components/editor/floorplan-panel.tsx +6916 -12137
- package/src/components/editor/grid.tsx +197 -36
- package/src/components/editor/group-actions.ts +457 -0
- package/src/components/editor/group-floating-action-menu.tsx +130 -0
- package/src/components/editor/group-move-3d.ts +397 -0
- package/src/components/editor/group-rotate-handle.tsx +420 -0
- package/src/components/editor/group-selection-box-3d.tsx +173 -0
- package/src/components/editor/group-transform-shared.test.ts +396 -0
- package/src/components/editor/group-transform-shared.ts +489 -0
- package/src/components/editor/handles/handle-arrow.tsx +581 -0
- package/src/components/editor/handles/use-handle-drag.ts +246 -0
- package/src/components/editor/index.tsx +412 -162
- package/src/components/editor/measurement-pill.tsx +115 -0
- package/src/components/editor/node-action-menu.tsx +14 -1
- package/src/components/editor/node-arrow-handles.tsx +1646 -0
- package/src/components/editor/opening-guides-3d-layer.tsx +144 -0
- package/src/components/editor/quick-measurement-card.tsx +70 -0
- package/src/components/editor/quick-measurement-hud.tsx +28 -0
- package/src/components/editor/riser-diagram-panel.tsx +137 -0
- package/src/components/editor/selection-manager.tsx +1106 -483
- package/src/components/editor/site-edge-labels.tsx +45 -21
- package/src/components/editor/slab-hole-highlights.tsx +474 -0
- package/src/components/editor/snapshot-capture-overlay.tsx +369 -155
- package/src/components/editor/three-context-bridge.ts +22 -0
- package/src/components/editor/thumbnail-generator.tsx +140 -41
- package/src/components/editor/use-floorplan-background-placement.ts +190 -35
- package/src/components/editor/use-floorplan-hit-testing.ts +24 -0
- package/src/components/editor/use-floorplan-scene-data.ts +19 -7
- package/src/components/editor/use-mesh-settle-epoch.ts +26 -0
- package/src/components/editor/wall-measurement-label.tsx +14 -19
- package/src/components/editor/wall-move-side-handles.tsx +870 -0
- package/src/components/editor/wall-opening-highlights.tsx +181 -0
- package/src/components/editor/wall-snap-beacon-layer.tsx +304 -0
- package/src/components/editor-2d/floorplan-action-menu-layer.tsx +15 -6
- package/src/components/editor-2d/floorplan-alignment-guide-layer.tsx +142 -0
- package/src/components/editor-2d/floorplan-cursor-indicator-overlay.tsx +5 -3
- package/src/components/editor-2d/floorplan-group-action-menu.tsx +87 -0
- package/src/components/editor-2d/floorplan-group-move.tsx +701 -0
- package/src/components/editor-2d/floorplan-measurement-tool-layer.test.ts +113 -0
- package/src/components/editor-2d/floorplan-measurement-tool-layer.tsx +1656 -0
- package/src/components/editor-2d/floorplan-quick-measure-layer.tsx +212 -0
- package/src/components/editor-2d/floorplan-registry-action-menu.tsx +392 -0
- package/src/components/editor-2d/floorplan-registry-move-overlay.tsx +857 -0
- package/src/components/editor-2d/floorplan-render-context.tsx +62 -0
- package/src/components/editor-2d/floorplan-snap-beacon-layer.tsx +77 -0
- package/src/components/editor-2d/floorplan-wall-move-ghost-layer.tsx +47 -0
- package/src/components/editor-2d/renderers/floorplan-geometry-renderer.tsx +266 -0
- package/src/components/editor-2d/renderers/floorplan-label-angle.test.ts +15 -0
- package/src/components/editor-2d/renderers/floorplan-label-angle.ts +14 -0
- package/src/components/editor-2d/renderers/floorplan-measurements-layer.tsx +108 -66
- package/src/components/editor-2d/renderers/floorplan-placement-preview-layer.tsx +62 -0
- package/src/components/editor-2d/renderers/floorplan-registry-layer.test.ts +308 -0
- package/src/components/editor-2d/renderers/floorplan-registry-layer.tsx +3325 -0
- package/src/components/editor-2d/renderers/floorplan-stair-layer.tsx +24 -9
- package/src/components/editor-2d/renderers/floorplan-voronoi-layer.tsx +128 -0
- package/src/components/editor-2d/svg-paths.ts +10 -2
- package/src/components/systems/ceiling/ceiling-selection-affordance-system.tsx +439 -57
- package/src/components/systems/ceiling/ceiling-system.tsx +109 -12
- package/src/components/systems/roof/roof-edit-system.tsx +1851 -22
- package/src/components/systems/selection-affordance-manager.tsx +38 -0
- package/src/components/systems/stair/stair-edit-system.tsx +1 -1
- package/src/components/systems/zone/zone-label-editor-system.tsx +14 -1
- package/src/components/systems/zone/zone-system.tsx +42 -13
- package/src/components/tools/elevator/elevator-defaults.ts +8 -0
- package/src/components/tools/elevator/elevator-tool.tsx +375 -0
- package/src/components/tools/elevator/move-elevator-tool.tsx +263 -0
- package/src/components/tools/fence/fence-drafting.ts +141 -27
- package/src/components/tools/item/move-tool.tsx +45 -105
- package/src/components/tools/item/placement-math.test.ts +22 -0
- package/src/components/tools/item/placement-math.ts +59 -7
- package/src/components/tools/item/placement-strategies.ts +432 -16
- package/src/components/tools/item/placement-types.ts +22 -1
- package/src/components/tools/item/use-draft-node.ts +51 -2
- package/src/components/tools/item/use-placement-coordinator.tsx +1399 -256
- package/src/components/tools/registry/move-registry-node-tool.tsx +1064 -0
- package/src/components/tools/roof/roof-tool.tsx +350 -28
- package/src/components/tools/select/box-select-state.ts +88 -0
- package/src/components/tools/select/box-select-tool.tsx +442 -520
- package/src/components/tools/select/marquee-geometry.test.ts +161 -0
- package/src/components/tools/select/marquee-geometry.ts +155 -0
- package/src/components/tools/select/plane-box-select-tool.tsx +570 -0
- package/src/components/tools/select/screen-rectangle-selection.ts +84 -0
- package/src/components/tools/select/select-candidates.test.ts +109 -0
- package/src/components/tools/select/select-candidates.ts +85 -0
- package/src/components/tools/shared/affordance-dispatch.ts +30 -0
- package/src/components/tools/shared/cursor-sphere.tsx +62 -26
- package/src/components/tools/shared/drag-bounding-box.tsx +195 -0
- package/src/components/tools/shared/facing-indicator.tsx +87 -0
- package/src/components/tools/shared/facing-pose-indicator.tsx +54 -0
- package/src/components/tools/shared/floor-stack-preview.ts +25 -0
- package/src/components/tools/shared/fresh-placement-visibility.ts +61 -0
- package/src/components/tools/shared/placement-box-geometry.ts +123 -0
- package/src/components/tools/shared/placement-box.tsx +305 -0
- package/src/components/tools/shared/polygon-editor.tsx +866 -175
- package/src/components/tools/shared/segment-angle.ts +56 -0
- package/src/components/tools/site/site-boundary-editor.tsx +520 -16
- package/src/components/tools/site/site-flag-model.ts +18 -0
- package/src/components/tools/stair/stair-defaults.ts +2 -1
- package/src/components/tools/stair/stair-tool.tsx +342 -37
- package/src/components/tools/tool-manager.tsx +239 -62
- package/src/components/tools/wall/wall-drafting.test.ts +330 -0
- package/src/components/tools/wall/wall-drafting.ts +248 -171
- package/src/components/tools/wall/wall-snap-geometry.test.ts +123 -0
- package/src/components/tools/wall/wall-snap-geometry.ts +331 -0
- package/src/components/tools/zone/zone-boundary-editor.tsx +5 -1
- package/src/components/tools/zone/zone-tool.tsx +86 -82
- package/src/components/ui/action-menu/action-button.tsx +21 -1
- package/src/components/ui/action-menu/camera-actions.tsx +24 -17
- package/src/components/ui/action-menu/control-modes.tsx +40 -170
- package/src/components/ui/action-menu/furnish-tools.tsx +5 -5
- package/src/components/ui/action-menu/index.tsx +3 -117
- package/src/components/ui/action-menu/measurement-control.tsx +188 -0
- package/src/components/ui/action-menu/structure-tools.tsx +27 -93
- package/src/components/ui/action-menu/view-toggles.tsx +279 -90
- package/src/components/ui/command-palette/editor-commands.tsx +20 -15
- package/src/components/ui/command-palette/index.tsx +5 -3
- package/src/components/ui/controls/material-paint-panel.tsx +152 -0
- package/src/components/ui/controls/material-picker.tsx +87 -177
- package/src/components/ui/controls/material-properties-editor.tsx +108 -0
- package/src/components/ui/controls/metric-control.tsx +142 -46
- package/src/components/ui/controls/scene-material-list.tsx +247 -0
- package/src/components/ui/controls/slider-control.tsx +88 -38
- package/src/components/ui/floating-level-selector.tsx +47 -10
- package/src/components/ui/helpers/building-helper.tsx +10 -23
- package/src/components/ui/helpers/contextual-helper-panel.tsx +428 -0
- package/src/components/ui/helpers/helper-manager.tsx +235 -23
- package/src/components/ui/helpers/item-helper.tsx +28 -32
- package/src/components/ui/helpers/registered-tool-helper.tsx +59 -0
- package/src/components/ui/helpers/roof-helper.tsx +10 -12
- package/src/components/ui/icon-ref.tsx +47 -0
- package/src/components/ui/item-catalog/catalog-items.tsx +40 -1
- package/src/components/ui/item-catalog/item-catalog.tsx +16 -36
- package/src/components/ui/level-duplicate-dialog.tsx +2 -1
- package/src/components/ui/panels/node-display.ts +17 -16
- package/src/components/ui/panels/panel-manager.tsx +55 -58
- package/src/components/ui/panels/panel-wrapper.tsx +238 -12
- package/src/components/ui/panels/parametric-inspector.tsx +482 -0
- package/src/components/ui/panels/reference-panel.tsx +54 -19
- package/src/components/ui/primitives/dropdown-menu.tsx +12 -8
- package/src/components/ui/primitives/shortcut-token.tsx +39 -3
- package/src/components/ui/primitives/sidebar.tsx +1 -0
- package/src/components/ui/scene-loader.tsx +1 -3
- package/src/components/ui/sidebar/app-sidebar.tsx +5 -1
- package/src/components/ui/sidebar/icon-rail.tsx +50 -31
- package/src/components/ui/sidebar/panels/items-panel/function-tree-panel.tsx +263 -0
- package/src/components/ui/sidebar/panels/items-panel/index.tsx +82 -8
- package/src/components/ui/sidebar/panels/plugins-panel.tsx +218 -0
- package/src/components/ui/sidebar/panels/settings-panel/index.tsx +122 -41
- package/src/components/ui/sidebar/panels/settings-panel/keyboard-shortcuts-dialog.tsx +66 -7
- package/src/components/ui/sidebar/panels/settings-panel/load-build-dialog.tsx +267 -0
- package/src/components/ui/sidebar/panels/site-panel/building-tree-node.tsx +3 -1
- package/src/components/ui/sidebar/panels/site-panel/ceiling-tree-node.tsx +9 -5
- package/src/components/ui/sidebar/panels/site-panel/chimney-tree-node.tsx +86 -0
- package/src/components/ui/sidebar/panels/site-panel/column-tree-node.tsx +1 -1
- package/src/components/ui/sidebar/panels/site-panel/door-tree-node.tsx +7 -2
- package/src/components/ui/sidebar/panels/site-panel/dormer-tree-node.tsx +92 -0
- package/src/components/ui/sidebar/panels/site-panel/elevator-tree-node.tsx +75 -0
- package/src/components/ui/sidebar/panels/site-panel/fence-tree-node.tsx +3 -3
- package/src/components/ui/sidebar/panels/site-panel/gutter-tree-node.tsx +86 -0
- package/src/components/ui/sidebar/panels/site-panel/index.tsx +42 -21
- package/src/components/ui/sidebar/panels/site-panel/item-tree-node.tsx +31 -17
- package/src/components/ui/sidebar/panels/site-panel/level-tree-node.tsx +2 -1
- package/src/components/ui/sidebar/panels/site-panel/registry-tree-node.tsx +140 -0
- package/src/components/ui/sidebar/panels/site-panel/roof-tree-node.tsx +48 -8
- package/src/components/ui/sidebar/panels/site-panel/shelf-tree-node.tsx +132 -0
- package/src/components/ui/sidebar/panels/site-panel/slab-tree-node.tsx +9 -5
- package/src/components/ui/sidebar/panels/site-panel/solar-panel-tree-node.tsx +86 -0
- package/src/components/ui/sidebar/panels/site-panel/spawn-tree-node.tsx +7 -1
- package/src/components/ui/sidebar/panels/site-panel/stair-tree-node.tsx +2 -2
- package/src/components/ui/sidebar/panels/site-panel/tree-node.tsx +112 -39
- package/src/components/ui/sidebar/panels/site-panel/tree-structure.ts +36 -0
- package/src/components/ui/sidebar/panels/site-panel/wall-tree-node.tsx +1 -1
- package/src/components/ui/sidebar/panels/site-panel/window-tree-node.tsx +7 -2
- package/src/components/ui/sidebar/panels/site-panel/zone-tree-node.tsx +3 -3
- package/src/components/ui/sidebar/panels/zone-panel/index.tsx +51 -2
- package/src/components/ui/sidebar/tab-bar.tsx +75 -1
- package/src/components/ui/sidebar/use-plugin-panels.tsx +132 -0
- package/src/components/ui/snap-target-badge.test.tsx +40 -0
- package/src/components/ui/snap-target-badge.tsx +88 -0
- package/src/components/viewer-overlay.tsx +253 -61
- package/src/components/viewer-zone-system.tsx +7 -2
- package/src/hooks/use-auto-save.test.ts +14 -0
- package/src/hooks/use-auto-save.ts +64 -10
- package/src/hooks/use-ceiling-events.ts +176 -0
- package/src/hooks/use-drag-action.ts +127 -0
- package/src/hooks/use-keyboard.ts +493 -95
- package/src/hooks/use-selection.ts +64 -0
- package/src/index.tsx +451 -6
- package/src/lib/active-placement-surface.ts +35 -0
- package/src/lib/ceiling-plan-snap.ts +24 -0
- package/src/lib/constants.ts +6 -2
- package/src/lib/contextual-help.test.ts +112 -0
- package/src/lib/contextual-help.ts +144 -0
- package/src/lib/continuation.ts +64 -0
- package/src/lib/direct-manipulation.test.ts +192 -0
- package/src/lib/direct-manipulation.ts +109 -0
- package/src/lib/editor-api.ts +50 -0
- package/src/lib/elevator-support.ts +96 -0
- package/src/lib/floorplan/apply-alignment.test.ts +25 -0
- package/src/lib/floorplan/apply-alignment.ts +117 -0
- package/src/lib/floorplan/floorplan-export.tsx +364 -0
- package/src/lib/floorplan/geometry.ts +53 -0
- package/src/lib/floorplan/index.ts +10 -0
- package/src/lib/floorplan/items.ts +5 -2
- package/src/lib/floorplan/plan-coords.ts +21 -0
- package/src/lib/floorplan/selection-tool.ts +40 -0
- package/src/lib/floorplan/stairs.ts +12 -1
- package/src/lib/fresh-planar-placement.test.ts +339 -0
- package/src/lib/fresh-planar-placement.ts +130 -0
- package/src/lib/glb-export.test.ts +441 -0
- package/src/lib/glb-export.ts +874 -0
- package/src/lib/history.ts +11 -1
- package/src/lib/interaction/hot-set.test.ts +133 -0
- package/src/lib/interaction/hot-set.ts +67 -0
- package/src/lib/interaction/overlay-policy.test.ts +51 -0
- package/src/lib/interaction/overlay-policy.ts +59 -0
- package/src/lib/interaction/scope.ts +211 -0
- package/src/lib/level-duplication.ts +54 -42
- package/src/lib/level-selection.ts +2 -2
- package/src/lib/material-paint.ts +227 -48
- package/src/lib/measurement-kind.test.ts +30 -0
- package/src/lib/measurement-kind.ts +19 -0
- package/src/lib/measurement-label.test.ts +47 -0
- package/src/lib/measurement-label.ts +68 -0
- package/src/lib/measurement-parser.ts +116 -0
- package/src/lib/measurements.test.ts +183 -0
- package/src/lib/measurements.ts +199 -0
- package/src/lib/paint-scope.test.ts +454 -0
- package/src/lib/paint-scope.ts +461 -0
- package/src/lib/placement-drag-release.ts +23 -0
- package/src/lib/placement-metadata.ts +29 -0
- package/src/lib/planar-cursor-placement.test.ts +100 -0
- package/src/lib/planar-cursor-placement.ts +42 -0
- package/src/lib/plugin-panels.test.ts +19 -0
- package/src/lib/plugin-panels.ts +91 -0
- package/src/lib/quick-measurement.test.ts +77 -0
- package/src/lib/quick-measurement.ts +109 -0
- package/src/lib/roof-duplication.ts +7 -7
- package/src/lib/roof-hover-outline-proxy.ts +22 -0
- package/src/lib/roof-wall-hit.ts +164 -0
- package/src/lib/scene-clipboard.test.ts +196 -0
- package/src/lib/scene-clipboard.ts +332 -0
- package/src/lib/scene.ts +40 -8
- package/src/lib/selection-routing.test.ts +298 -0
- package/src/lib/selection-routing.ts +175 -0
- package/src/lib/sfx/index.ts +1 -0
- package/src/lib/sfx/movement-tick.test.ts +65 -0
- package/src/lib/sfx/movement-tick.ts +18 -0
- package/src/lib/sfx-bus.ts +69 -10
- package/src/lib/sfx-player.test.ts +124 -0
- package/src/lib/sfx-player.ts +148 -55
- package/src/lib/site-boundary.ts +1 -0
- package/src/lib/slab-plan-snap.test.ts +93 -0
- package/src/lib/slab-plan-snap.ts +108 -0
- package/src/lib/snapping-mode.test.ts +138 -0
- package/src/lib/snapping-mode.ts +179 -0
- package/src/lib/stair-duplication.ts +4 -4
- package/src/lib/stair-levels.test.ts +146 -0
- package/src/lib/stair-levels.ts +177 -0
- package/src/lib/surface-plan-snap.test.ts +71 -0
- package/src/lib/surface-plan-snap.ts +256 -0
- package/src/lib/use-linear-display.ts +40 -0
- package/src/lib/world-grid-snap.ts +231 -0
- package/src/lib/zone-content.ts +130 -0
- package/src/store/use-alignment-guides.ts +21 -0
- package/src/store/use-direct-manipulation-feedback.ts +20 -0
- package/src/store/use-editor.tsx +767 -114
- package/src/store/use-facing-pose.ts +44 -0
- package/src/store/use-fence-curve-draft.ts +21 -0
- package/src/store/use-floorplan-draft-preview.ts +101 -0
- package/src/store/use-floorplan-marquee.ts +50 -0
- package/src/store/use-interaction-scope.test.ts +186 -0
- package/src/store/use-interaction-scope.ts +132 -0
- package/src/store/use-measurement-draft.test.ts +530 -0
- package/src/store/use-measurement-draft.ts +543 -0
- package/src/store/use-opening-guides.ts +41 -0
- package/src/store/use-placement-preview.ts +39 -0
- package/src/store/use-quick-measurement-hud.test.ts +53 -0
- package/src/store/use-quick-measurement-hud.ts +77 -0
- package/src/store/use-segment-draft-chain.ts +28 -0
- package/src/store/use-stair-build-preview.ts +43 -0
- package/src/store/use-wall-move-ghosts.ts +36 -0
- package/src/store/use-wall-snap-indicator.ts +34 -0
- package/src/components/editor/first-person/bvh-ecctrl.tsx +0 -860
- package/src/components/editor/preset-thumbnail-generator.tsx +0 -125
- package/src/components/editor-2d/renderers/floorplan-roof-layer.tsx +0 -113
- package/src/components/tools/building/move-building-tool.tsx +0 -157
- package/src/components/tools/ceiling/ceiling-boundary-editor.tsx +0 -43
- package/src/components/tools/ceiling/ceiling-hole-editor.tsx +0 -49
- package/src/components/tools/ceiling/ceiling-tool.tsx +0 -465
- package/src/components/tools/ceiling/move-ceiling-tool.tsx +0 -264
- package/src/components/tools/column/column-tool.tsx +0 -97
- package/src/components/tools/column/move-column-tool.tsx +0 -105
- package/src/components/tools/door/door-math.ts +0 -110
- package/src/components/tools/door/door-tool.tsx +0 -324
- package/src/components/tools/door/move-door-tool.tsx +0 -412
- package/src/components/tools/fence/curve-fence-tool.tsx +0 -178
- package/src/components/tools/fence/fence-tool.tsx +0 -346
- package/src/components/tools/fence/move-fence-endpoint-tool.tsx +0 -441
- package/src/components/tools/fence/move-fence-tool.tsx +0 -302
- package/src/components/tools/item/item-tool.tsx +0 -26
- package/src/components/tools/roof/move-roof-tool.tsx +0 -364
- package/src/components/tools/slab/move-slab-tool.tsx +0 -182
- package/src/components/tools/slab/slab-boundary-editor.tsx +0 -43
- package/src/components/tools/slab/slab-hole-editor.tsx +0 -49
- package/src/components/tools/slab/slab-tool.tsx +0 -322
- package/src/components/tools/spawn/move-spawn-tool.tsx +0 -101
- package/src/components/tools/spawn/spawn-tool.tsx +0 -130
- package/src/components/tools/wall/curve-wall-tool.tsx +0 -178
- package/src/components/tools/wall/move-wall-endpoint-tool.tsx +0 -426
- package/src/components/tools/wall/move-wall-tool.tsx +0 -358
- package/src/components/tools/wall/wall-tool.tsx +0 -332
- package/src/components/tools/window/move-window-tool.tsx +0 -447
- package/src/components/tools/window/window-math.ts +0 -117
- package/src/components/tools/window/window-tool.tsx +0 -332
- package/src/components/ui/helpers/ceiling-helper.tsx +0 -20
- package/src/components/ui/helpers/slab-helper.tsx +0 -20
- package/src/components/ui/helpers/wall-helper.tsx +0 -20
- package/src/components/ui/panels/ceiling-panel.tsx +0 -249
- package/src/components/ui/panels/column-panel.tsx +0 -759
- package/src/components/ui/panels/door-panel.tsx +0 -1299
- package/src/components/ui/panels/fence-panel.tsx +0 -222
- package/src/components/ui/panels/item-panel.tsx +0 -306
- package/src/components/ui/panels/paint-panel.tsx +0 -163
- package/src/components/ui/panels/presets/presets-popover.tsx +0 -511
- package/src/components/ui/panels/roof-panel.tsx +0 -280
- package/src/components/ui/panels/roof-segment-panel.tsx +0 -311
- package/src/components/ui/panels/slab-panel.tsx +0 -250
- package/src/components/ui/panels/spawn-panel.tsx +0 -161
- package/src/components/ui/panels/stair-panel.tsx +0 -577
- package/src/components/ui/panels/stair-segment-panel.tsx +0 -325
- package/src/components/ui/panels/wall-panel.tsx +0 -273
- package/src/components/ui/panels/window-panel.tsx +0 -968
- package/src/contexts/presets-context.tsx +0 -121
- package/src/hooks/use-contextual-tools.ts +0 -61
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
import { describe, expect, it } from 'bun:test'
|
|
2
|
+
import {
|
|
3
|
+
type AnyNode,
|
|
4
|
+
detectSpacesForLevel,
|
|
5
|
+
type ItemNode,
|
|
6
|
+
type SlabNode,
|
|
7
|
+
type Space,
|
|
8
|
+
type WallNode,
|
|
9
|
+
} from '@pascal-app/core'
|
|
10
|
+
import {
|
|
11
|
+
availablePaintScopes,
|
|
12
|
+
cyclePaintScope,
|
|
13
|
+
type PaintHoverInfo,
|
|
14
|
+
type PaintScope,
|
|
15
|
+
paintScopeLabel,
|
|
16
|
+
resolvePaintScopeTargets,
|
|
17
|
+
type WallPaintHit,
|
|
18
|
+
} from './paint-scope'
|
|
19
|
+
|
|
20
|
+
describe('availablePaintScopes', () => {
|
|
21
|
+
it('every node offers single', () => {
|
|
22
|
+
expect(availablePaintScopes({ node: roof(), slotRoles: ['top'] })).toEqual(['single'])
|
|
23
|
+
})
|
|
24
|
+
it('more than one slot adds whole-object', () => {
|
|
25
|
+
expect(availablePaintScopes({ node: roof(), slotRoles: ['top', 'edge'] })).toEqual([
|
|
26
|
+
'single',
|
|
27
|
+
'object',
|
|
28
|
+
])
|
|
29
|
+
})
|
|
30
|
+
it('a single slot does not add whole-object', () => {
|
|
31
|
+
expect(availablePaintScopes({ node: roof(), slotRoles: ['top'] })).not.toContain('object')
|
|
32
|
+
})
|
|
33
|
+
it('an asset adds all-matching (items)', () => {
|
|
34
|
+
expect(availablePaintScopes({ node: item('a', 'sofa'), slotRoles: ['seat'] })).toContain(
|
|
35
|
+
'matching',
|
|
36
|
+
)
|
|
37
|
+
})
|
|
38
|
+
// `room` derives from the kind's registry `capabilities.paint.roomScope`, which
|
|
39
|
+
// isn't wired in this unit context; its resolver behaviour is covered below.
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
describe('cyclePaintScope', () => {
|
|
43
|
+
it('wraps within the given set', () => {
|
|
44
|
+
const set: PaintScope[] = ['single', 'object', 'matching']
|
|
45
|
+
expect(cyclePaintScope('single', set)).toBe('object')
|
|
46
|
+
expect(cyclePaintScope('object', set)).toBe('matching')
|
|
47
|
+
expect(cyclePaintScope('matching', set)).toBe('single')
|
|
48
|
+
})
|
|
49
|
+
it('a scope foreign to the set restarts at the first entry', () => {
|
|
50
|
+
expect(cyclePaintScope('matching', ['single', 'room'])).toBe('single')
|
|
51
|
+
})
|
|
52
|
+
it('an empty set stays single', () => {
|
|
53
|
+
expect(cyclePaintScope('single', [])).toBe('single')
|
|
54
|
+
})
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
describe('paintScopeLabel', () => {
|
|
58
|
+
const info = (over: Partial<PaintHoverInfo>): PaintHoverInfo => ({
|
|
59
|
+
scopes: ['single'],
|
|
60
|
+
slotLabel: 'Seat cushion',
|
|
61
|
+
nodeNoun: 'item',
|
|
62
|
+
...over,
|
|
63
|
+
})
|
|
64
|
+
it('single shows the hovered slot label', () => {
|
|
65
|
+
expect(paintScopeLabel('single', info({ slotLabel: 'Seat cushion' }))).toBe('Seat cushion')
|
|
66
|
+
})
|
|
67
|
+
it('single falls back when there is no slot label', () => {
|
|
68
|
+
expect(paintScopeLabel('single', info({ slotLabel: '' }))).toBe('This surface')
|
|
69
|
+
})
|
|
70
|
+
it('object reads "Whole <noun>"', () => {
|
|
71
|
+
expect(paintScopeLabel('object', info({ nodeNoun: 'shelf' }))).toBe('Whole shelf')
|
|
72
|
+
})
|
|
73
|
+
it('matching / room are kind-agnostic', () => {
|
|
74
|
+
expect(paintScopeLabel('matching', info({}))).toBe('All matching')
|
|
75
|
+
expect(paintScopeLabel('room', info({}))).toBe('Room')
|
|
76
|
+
})
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
// ── resolvePaintScopeTargets ────────────────────────────────────────────────
|
|
80
|
+
|
|
81
|
+
function item(id: string, assetId: string): ItemNode {
|
|
82
|
+
return { id, type: 'item', asset: { id: assetId } } as unknown as ItemNode
|
|
83
|
+
}
|
|
84
|
+
function slab(id: string, polygon: Array<[number, number]>): SlabNode {
|
|
85
|
+
return { id, type: 'slab', polygon } as unknown as SlabNode
|
|
86
|
+
}
|
|
87
|
+
function wall(
|
|
88
|
+
id: string,
|
|
89
|
+
start: [number, number],
|
|
90
|
+
end: [number, number],
|
|
91
|
+
levelId = 'l1',
|
|
92
|
+
): WallNode {
|
|
93
|
+
return {
|
|
94
|
+
id,
|
|
95
|
+
type: 'wall',
|
|
96
|
+
parentId: levelId,
|
|
97
|
+
start,
|
|
98
|
+
end,
|
|
99
|
+
thickness: 0.2,
|
|
100
|
+
frontSide: 'unknown',
|
|
101
|
+
backSide: 'unknown',
|
|
102
|
+
} as unknown as WallNode
|
|
103
|
+
}
|
|
104
|
+
function roof(): AnyNode {
|
|
105
|
+
return { id: 'r', type: 'roof' } as unknown as AnyNode
|
|
106
|
+
}
|
|
107
|
+
function asMap(nodes: AnyNode[]): Record<string, AnyNode> {
|
|
108
|
+
return Object.fromEntries(nodes.map((node) => [node.id, node]))
|
|
109
|
+
}
|
|
110
|
+
const noSlotRoles = () => [] as string[]
|
|
111
|
+
|
|
112
|
+
// `nodeId` is a branded id type; compare by plain `id:role` strings.
|
|
113
|
+
function keys(targets: Array<{ nodeId: string; role: string }>): string[] {
|
|
114
|
+
return targets.map((target) => `${target.nodeId}:${target.role}`)
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function resolve(args: {
|
|
118
|
+
node: AnyNode
|
|
119
|
+
role?: string
|
|
120
|
+
scope: PaintScope
|
|
121
|
+
nodes: AnyNode[]
|
|
122
|
+
spaces?: Space[]
|
|
123
|
+
slotRolesOf?: (node: AnyNode) => string[]
|
|
124
|
+
wallHit?: WallPaintHit
|
|
125
|
+
}) {
|
|
126
|
+
return resolvePaintScopeTargets({
|
|
127
|
+
node: args.node,
|
|
128
|
+
role: args.role ?? 'surface',
|
|
129
|
+
scope: args.scope,
|
|
130
|
+
nodes: asMap(args.nodes),
|
|
131
|
+
spaces: Object.fromEntries((args.spaces ?? []).map((s) => [s.id, s])),
|
|
132
|
+
slotRolesOf: args.slotRolesOf ?? noSlotRoles,
|
|
133
|
+
wallHit: args.wallHit,
|
|
134
|
+
})
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function adjacentRooms(levelId = 'l1') {
|
|
138
|
+
const walls = [
|
|
139
|
+
wall('bottom-left', [0, 0], [4, 0], levelId),
|
|
140
|
+
wall('bottom-right', [4, 0], [8, 0], levelId),
|
|
141
|
+
wall('right', [8, 0], [8, 4], levelId),
|
|
142
|
+
wall('top-right', [8, 4], [4, 4], levelId),
|
|
143
|
+
wall('top-left', [4, 4], [0, 4], levelId),
|
|
144
|
+
wall('left', [0, 4], [0, 0], levelId),
|
|
145
|
+
wall('shared', [4, 0], [4, 4], levelId),
|
|
146
|
+
]
|
|
147
|
+
return { walls, spaces: detectSpacesForLevel(levelId, walls).spaces }
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
describe('resolvePaintScopeTargets', () => {
|
|
151
|
+
it('single always returns just the clicked surface', () => {
|
|
152
|
+
const a = item('a', 'sofa')
|
|
153
|
+
expect(
|
|
154
|
+
keys(resolve({ node: a, role: 'seat', scope: 'single', nodes: [a, item('b', 'sofa')] })),
|
|
155
|
+
).toEqual(['a:seat'])
|
|
156
|
+
})
|
|
157
|
+
|
|
158
|
+
it('item matching fans the same slot across same-asset items only', () => {
|
|
159
|
+
const a = item('a', 'sofa')
|
|
160
|
+
const b = item('b', 'sofa')
|
|
161
|
+
const c = item('c', 'lamp')
|
|
162
|
+
const result = resolve({ node: a, role: 'seat', scope: 'matching', nodes: [a, b, c] })
|
|
163
|
+
expect(keys(result).sort()).toEqual(['a:seat', 'b:seat'])
|
|
164
|
+
})
|
|
165
|
+
|
|
166
|
+
it('item whole-item fans every enumerated slot of the clicked item', () => {
|
|
167
|
+
const a = item('a', 'sofa')
|
|
168
|
+
const result = resolve({
|
|
169
|
+
node: a,
|
|
170
|
+
role: 'seat',
|
|
171
|
+
scope: 'object',
|
|
172
|
+
nodes: [a],
|
|
173
|
+
slotRolesOf: () => ['seat', 'legs', 'cushion'],
|
|
174
|
+
})
|
|
175
|
+
expect(keys(result)).toEqual(['a:seat', 'a:legs', 'a:cushion'])
|
|
176
|
+
})
|
|
177
|
+
|
|
178
|
+
it('item whole-item falls back to the single slot when the subtree is unmounted', () => {
|
|
179
|
+
const a = item('a', 'sofa')
|
|
180
|
+
expect(keys(resolve({ node: a, role: 'seat', scope: 'object', nodes: [a] }))).toEqual([
|
|
181
|
+
'a:seat',
|
|
182
|
+
])
|
|
183
|
+
})
|
|
184
|
+
|
|
185
|
+
it('wall room selects the enclosed space on the clicked face of a shared wall', () => {
|
|
186
|
+
const { walls, spaces } = adjacentRooms()
|
|
187
|
+
const shared = walls.find((candidate) => String(candidate.id) === 'shared')!
|
|
188
|
+
|
|
189
|
+
const leftRoom = resolve({
|
|
190
|
+
node: shared,
|
|
191
|
+
role: 'interior',
|
|
192
|
+
scope: 'room',
|
|
193
|
+
nodes: walls,
|
|
194
|
+
spaces,
|
|
195
|
+
wallHit: { face: 'front', point: [3.9, 2] },
|
|
196
|
+
})
|
|
197
|
+
expect(keys(leftRoom).sort()).toEqual([
|
|
198
|
+
'bottom-left:interior',
|
|
199
|
+
'left:interior',
|
|
200
|
+
'shared:interior',
|
|
201
|
+
'top-left:interior',
|
|
202
|
+
])
|
|
203
|
+
|
|
204
|
+
const rightRoom = resolve({
|
|
205
|
+
node: shared,
|
|
206
|
+
role: 'exterior',
|
|
207
|
+
scope: 'room',
|
|
208
|
+
nodes: walls,
|
|
209
|
+
spaces,
|
|
210
|
+
wallHit: { face: 'back', point: [4.1, 2] },
|
|
211
|
+
})
|
|
212
|
+
expect(keys(rightRoom).sort()).toEqual([
|
|
213
|
+
'bottom-right:interior',
|
|
214
|
+
'right:interior',
|
|
215
|
+
'shared:exterior',
|
|
216
|
+
'top-right:interior',
|
|
217
|
+
])
|
|
218
|
+
})
|
|
219
|
+
|
|
220
|
+
it('wall room preserves the vertical band while mapping each boundary face side', () => {
|
|
221
|
+
const { walls, spaces } = adjacentRooms()
|
|
222
|
+
const shared = walls.find((candidate) => String(candidate.id) === 'shared')!
|
|
223
|
+
const result = resolve({
|
|
224
|
+
node: shared,
|
|
225
|
+
role: 'lowerExterior',
|
|
226
|
+
scope: 'room',
|
|
227
|
+
nodes: walls,
|
|
228
|
+
spaces,
|
|
229
|
+
wallHit: { face: 'back', point: [4.1, 2] },
|
|
230
|
+
})
|
|
231
|
+
expect(keys(result).sort()).toEqual([
|
|
232
|
+
'bottom-right:lowerInterior',
|
|
233
|
+
'right:lowerInterior',
|
|
234
|
+
'shared:lowerExterior',
|
|
235
|
+
'top-right:lowerInterior',
|
|
236
|
+
])
|
|
237
|
+
})
|
|
238
|
+
|
|
239
|
+
it('wall room maps a reversed boundary wall to its rendered side', () => {
|
|
240
|
+
const { walls } = adjacentRooms()
|
|
241
|
+
const topRight = walls.find((candidate) => String(candidate.id) === 'top-right')!
|
|
242
|
+
topRight.start = [4, 4]
|
|
243
|
+
topRight.end = [8, 4]
|
|
244
|
+
const spaces = detectSpacesForLevel('l1', walls).spaces
|
|
245
|
+
const shared = walls.find((candidate) => String(candidate.id) === 'shared')!
|
|
246
|
+
const result = resolve({
|
|
247
|
+
node: shared,
|
|
248
|
+
role: 'exterior',
|
|
249
|
+
scope: 'room',
|
|
250
|
+
nodes: walls,
|
|
251
|
+
spaces,
|
|
252
|
+
wallHit: { face: 'back', point: [4.1, 2] },
|
|
253
|
+
})
|
|
254
|
+
|
|
255
|
+
expect(keys(result)).toContain('top-right:exterior')
|
|
256
|
+
expect(keys(result)).not.toContain('top-right:interior')
|
|
257
|
+
})
|
|
258
|
+
|
|
259
|
+
it('wall room excludes duplicate geometry and spaces from another level', () => {
|
|
260
|
+
const levelA = adjacentRooms('l1')
|
|
261
|
+
const levelB = adjacentRooms('l2')
|
|
262
|
+
const levelBWalls = levelB.walls.map((candidate) => ({
|
|
263
|
+
...candidate,
|
|
264
|
+
id: `other-${candidate.id}`,
|
|
265
|
+
})) as unknown as WallNode[]
|
|
266
|
+
const otherSpaces = detectSpacesForLevel('l2', levelBWalls).spaces
|
|
267
|
+
const shared = levelA.walls.find((candidate) => String(candidate.id) === 'shared')!
|
|
268
|
+
const result = resolve({
|
|
269
|
+
node: shared,
|
|
270
|
+
role: 'interior',
|
|
271
|
+
scope: 'room',
|
|
272
|
+
nodes: [...levelA.walls, ...levelBWalls],
|
|
273
|
+
spaces: [...levelA.spaces, ...otherSpaces],
|
|
274
|
+
wallHit: { face: 'front', point: [3.9, 2] },
|
|
275
|
+
})
|
|
276
|
+
expect(keys(result).every((key) => !key.startsWith('other-'))).toBe(true)
|
|
277
|
+
expect(result).toHaveLength(4)
|
|
278
|
+
})
|
|
279
|
+
|
|
280
|
+
it('wall room uses the hit subsegment when one long wall bounds adjacent bays', () => {
|
|
281
|
+
const long = wall('long', [0, 0], [8, 0])
|
|
282
|
+
const walls = [
|
|
283
|
+
long,
|
|
284
|
+
wall('left', [0, 0], [0, -3]),
|
|
285
|
+
wall('left-bottom', [0, -3], [4, -3]),
|
|
286
|
+
wall('divider', [4, -3], [4, 0]),
|
|
287
|
+
wall('right-bottom', [4, -3], [8, -3]),
|
|
288
|
+
wall('right', [8, -3], [8, 0]),
|
|
289
|
+
]
|
|
290
|
+
const spaces = detectSpacesForLevel('l1', walls).spaces
|
|
291
|
+
|
|
292
|
+
const leftBay = resolve({
|
|
293
|
+
node: long,
|
|
294
|
+
role: 'exterior',
|
|
295
|
+
scope: 'room',
|
|
296
|
+
nodes: walls,
|
|
297
|
+
spaces,
|
|
298
|
+
wallHit: { face: 'back', point: [2, -0.1] },
|
|
299
|
+
})
|
|
300
|
+
const rightBay = resolve({
|
|
301
|
+
node: long,
|
|
302
|
+
role: 'exterior',
|
|
303
|
+
scope: 'room',
|
|
304
|
+
nodes: walls,
|
|
305
|
+
spaces,
|
|
306
|
+
wallHit: { face: 'back', point: [6, -0.1] },
|
|
307
|
+
})
|
|
308
|
+
|
|
309
|
+
expect(keys(leftBay).some((key) => key.startsWith('left-bottom:'))).toBe(true)
|
|
310
|
+
expect(keys(leftBay).some((key) => key.startsWith('right-bottom:'))).toBe(false)
|
|
311
|
+
expect(keys(rightBay).some((key) => key.startsWith('right-bottom:'))).toBe(true)
|
|
312
|
+
expect(keys(rightBay).some((key) => key.startsWith('left-bottom:'))).toBe(false)
|
|
313
|
+
})
|
|
314
|
+
|
|
315
|
+
it('wall room with no enclosing space falls back to single', () => {
|
|
316
|
+
const w1 = wall('w1', [0, 0], [4, 0])
|
|
317
|
+
expect(
|
|
318
|
+
keys(resolve({ node: w1, role: 'interior', scope: 'room', nodes: [w1], spaces: [] })),
|
|
319
|
+
).toEqual(['w1:interior'])
|
|
320
|
+
})
|
|
321
|
+
|
|
322
|
+
it('wall room paints the connected exterior envelope from an exterior face', () => {
|
|
323
|
+
const walls = [
|
|
324
|
+
wall('bottom', [0, 0], [4, 0]),
|
|
325
|
+
wall('right', [4, 0], [4, 4]),
|
|
326
|
+
wall('top', [4, 4], [0, 4]),
|
|
327
|
+
wall('left', [0, 4], [0, 0]),
|
|
328
|
+
]
|
|
329
|
+
const spaces = detectSpacesForLevel('l1', walls).spaces
|
|
330
|
+
expect(
|
|
331
|
+
keys(
|
|
332
|
+
resolve({
|
|
333
|
+
node: walls[0]!,
|
|
334
|
+
role: 'exterior',
|
|
335
|
+
scope: 'room',
|
|
336
|
+
nodes: walls,
|
|
337
|
+
spaces,
|
|
338
|
+
wallHit: { face: 'back', point: [2, -0.1] },
|
|
339
|
+
}),
|
|
340
|
+
).sort(),
|
|
341
|
+
).toEqual(['bottom:exterior', 'left:exterior', 'right:exterior', 'top:exterior'])
|
|
342
|
+
})
|
|
343
|
+
|
|
344
|
+
it('wall room does not cross to a disconnected exterior envelope', () => {
|
|
345
|
+
const first = [
|
|
346
|
+
wall('a-bottom', [0, 0], [4, 0]),
|
|
347
|
+
wall('a-right', [4, 0], [4, 4]),
|
|
348
|
+
wall('a-top', [4, 4], [0, 4]),
|
|
349
|
+
wall('a-left', [0, 4], [0, 0]),
|
|
350
|
+
]
|
|
351
|
+
const second = [
|
|
352
|
+
wall('b-bottom', [10, 0], [14, 0]),
|
|
353
|
+
wall('b-right', [14, 0], [14, 4]),
|
|
354
|
+
wall('b-top', [14, 4], [10, 4]),
|
|
355
|
+
wall('b-left', [10, 4], [10, 0]),
|
|
356
|
+
]
|
|
357
|
+
const walls = [...first, ...second]
|
|
358
|
+
const spaces = detectSpacesForLevel('l1', walls).spaces
|
|
359
|
+
const result = resolve({
|
|
360
|
+
node: first[0]!,
|
|
361
|
+
role: 'exterior',
|
|
362
|
+
scope: 'room',
|
|
363
|
+
nodes: walls,
|
|
364
|
+
spaces,
|
|
365
|
+
wallHit: { face: 'back', point: [2, -0.1] },
|
|
366
|
+
})
|
|
367
|
+
|
|
368
|
+
expect(result).toHaveLength(4)
|
|
369
|
+
expect(keys(result).every((key) => key.startsWith('a-'))).toBe(true)
|
|
370
|
+
})
|
|
371
|
+
|
|
372
|
+
it('wall room excludes shared interior walls from the exterior envelope', () => {
|
|
373
|
+
const { walls, spaces } = adjacentRooms()
|
|
374
|
+
const bottomLeft = walls.find((candidate) => String(candidate.id) === 'bottom-left')!
|
|
375
|
+
const result = resolve({
|
|
376
|
+
node: bottomLeft,
|
|
377
|
+
role: 'exterior',
|
|
378
|
+
scope: 'room',
|
|
379
|
+
nodes: walls,
|
|
380
|
+
spaces,
|
|
381
|
+
wallHit: { face: 'back', point: [2, -0.1] },
|
|
382
|
+
})
|
|
383
|
+
|
|
384
|
+
expect(result).toHaveLength(6)
|
|
385
|
+
expect(keys(result).some((key) => key.startsWith('shared:'))).toBe(false)
|
|
386
|
+
})
|
|
387
|
+
|
|
388
|
+
it('wall room follows an exterior wall that is logically split across rooms', () => {
|
|
389
|
+
const long = wall('long', [0, 0], [8, 0])
|
|
390
|
+
const walls = [
|
|
391
|
+
long,
|
|
392
|
+
wall('right', [8, 0], [8, 4]),
|
|
393
|
+
wall('top-right', [8, 4], [4, 4]),
|
|
394
|
+
wall('top-left', [4, 4], [0, 4]),
|
|
395
|
+
wall('left', [0, 4], [0, 0]),
|
|
396
|
+
wall('divider', [4, 0], [4, 4]),
|
|
397
|
+
]
|
|
398
|
+
const spaces = detectSpacesForLevel('l1', walls).spaces
|
|
399
|
+
const result = resolve({
|
|
400
|
+
node: long,
|
|
401
|
+
role: 'exterior',
|
|
402
|
+
scope: 'room',
|
|
403
|
+
nodes: walls,
|
|
404
|
+
spaces,
|
|
405
|
+
wallHit: { face: 'back', point: [2, -0.1] },
|
|
406
|
+
})
|
|
407
|
+
|
|
408
|
+
expect(keys(result).filter((key) => key === 'long:exterior')).toHaveLength(1)
|
|
409
|
+
expect(keys(result).some((key) => key.startsWith('divider:'))).toBe(false)
|
|
410
|
+
expect(result).toHaveLength(5)
|
|
411
|
+
})
|
|
412
|
+
|
|
413
|
+
it('slab room fans across slabs whose centroid sits in the same space', () => {
|
|
414
|
+
const inside = slab('inA', [
|
|
415
|
+
[1, 1],
|
|
416
|
+
[3, 1],
|
|
417
|
+
[3, 3],
|
|
418
|
+
[1, 3],
|
|
419
|
+
])
|
|
420
|
+
const alsoInside = slab('inB', [
|
|
421
|
+
[2, 2],
|
|
422
|
+
[2.5, 2],
|
|
423
|
+
[2.5, 2.5],
|
|
424
|
+
[2, 2.5],
|
|
425
|
+
])
|
|
426
|
+
const outside = slab('out', [
|
|
427
|
+
[20, 20],
|
|
428
|
+
[21, 20],
|
|
429
|
+
[21, 21],
|
|
430
|
+
[20, 21],
|
|
431
|
+
])
|
|
432
|
+
const space: Space = {
|
|
433
|
+
id: 's1',
|
|
434
|
+
levelId: 'l1',
|
|
435
|
+
polygon: [
|
|
436
|
+
[0, 0],
|
|
437
|
+
[10, 0],
|
|
438
|
+
[10, 10],
|
|
439
|
+
[0, 10],
|
|
440
|
+
],
|
|
441
|
+
wallIds: [],
|
|
442
|
+
boundaryFaces: [],
|
|
443
|
+
isExterior: false,
|
|
444
|
+
}
|
|
445
|
+
const result = resolve({
|
|
446
|
+
node: inside,
|
|
447
|
+
role: 'surface',
|
|
448
|
+
scope: 'room',
|
|
449
|
+
nodes: [inside, alsoInside, outside],
|
|
450
|
+
spaces: [space],
|
|
451
|
+
})
|
|
452
|
+
expect(keys(result).sort()).toEqual(['inA:surface', 'inB:surface'])
|
|
453
|
+
})
|
|
454
|
+
})
|