@pascal-app/nodes 1.0.0-beta.5 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/block/commands.d.ts +68 -0
- package/dist/block/commands.d.ts.map +1 -0
- package/dist/block/commands.js +1144 -0
- package/dist/block/contextual-help.d.ts +3 -0
- package/dist/block/contextual-help.d.ts.map +1 -0
- package/dist/block/contextual-help.js +38 -0
- package/dist/block/definition.d.ts +8 -0
- package/dist/block/definition.d.ts.map +1 -0
- package/dist/block/definition.js +126 -0
- package/dist/block/edit-session.d.ts +16 -0
- package/dist/block/edit-session.d.ts.map +1 -0
- package/dist/block/edit-session.js +32 -0
- package/dist/block/face-host.d.ts +3 -0
- package/dist/block/face-host.d.ts.map +1 -0
- package/dist/block/face-host.js +178 -0
- package/dist/block/floorplan.d.ts +3 -0
- package/dist/block/floorplan.d.ts.map +1 -0
- package/dist/block/floorplan.js +43 -0
- package/dist/block/geometry-snap.d.ts +18 -0
- package/dist/block/geometry-snap.d.ts.map +1 -0
- package/dist/block/geometry-snap.js +137 -0
- package/dist/block/geometry.d.ts +11 -0
- package/dist/block/geometry.d.ts.map +1 -0
- package/dist/block/geometry.js +146 -0
- package/dist/block/gesture-wheel.d.ts +8 -0
- package/dist/block/gesture-wheel.d.ts.map +1 -0
- package/dist/block/gesture-wheel.js +7 -0
- package/dist/block/interaction-sfx.d.ts +3 -0
- package/dist/block/interaction-sfx.d.ts.map +1 -0
- package/dist/block/interaction-sfx.js +16 -0
- package/dist/block/last-operation.d.ts +48 -0
- package/dist/block/last-operation.d.ts.map +1 -0
- package/dist/block/last-operation.js +120 -0
- package/dist/block/loop-cut-interaction.d.ts +5 -0
- package/dist/block/loop-cut-interaction.d.ts.map +1 -0
- package/dist/block/loop-cut-interaction.js +13 -0
- package/dist/block/material-slots.d.ts +61 -0
- package/dist/block/material-slots.d.ts.map +1 -0
- package/dist/block/material-slots.js +131 -0
- package/dist/block/modal-face-operation.d.ts +13 -0
- package/dist/block/modal-face-operation.d.ts.map +1 -0
- package/dist/block/modal-face-operation.js +40 -0
- package/dist/block/modal-session.d.ts +15 -0
- package/dist/block/modal-session.d.ts.map +1 -0
- package/dist/block/modal-session.js +40 -0
- package/dist/block/modal-transform.d.ts +30 -0
- package/dist/block/modal-transform.d.ts.map +1 -0
- package/dist/block/modal-transform.js +144 -0
- package/dist/block/paint.d.ts +3 -0
- package/dist/block/paint.d.ts.map +1 -0
- package/dist/block/paint.js +136 -0
- package/dist/block/panel.d.ts +2 -0
- package/dist/block/panel.d.ts.map +1 -0
- package/dist/block/panel.js +234 -0
- package/dist/block/parametrics.d.ts +4 -0
- package/dist/block/parametrics.d.ts.map +1 -0
- package/dist/block/parametrics.js +9 -0
- package/dist/block/preview.d.ts +6 -0
- package/dist/block/preview.d.ts.map +1 -0
- package/dist/block/preview.js +46 -0
- package/dist/block/rotation-drag.d.ts +5 -0
- package/dist/block/rotation-drag.d.ts.map +1 -0
- package/dist/block/rotation-drag.js +18 -0
- package/dist/block/schema.d.ts +2 -0
- package/dist/block/schema.d.ts.map +1 -0
- package/dist/block/schema.js +1 -0
- package/dist/block/selection-geometry.d.ts +9 -0
- package/dist/block/selection-geometry.d.ts.map +1 -0
- package/dist/block/selection-geometry.js +31 -0
- package/dist/block/selection-model.d.ts +17 -0
- package/dist/block/selection-model.d.ts.map +1 -0
- package/dist/block/selection-model.js +84 -0
- package/dist/block/selection.d.ts +4 -0
- package/dist/block/selection.d.ts.map +1 -0
- package/dist/block/selection.js +2570 -0
- package/dist/block/slots.d.ts +4 -0
- package/dist/block/slots.d.ts.map +1 -0
- package/dist/block/slots.js +17 -0
- package/dist/block/tool.d.ts +3 -0
- package/dist/block/tool.d.ts.map +1 -0
- package/dist/block/tool.js +174 -0
- package/dist/block/toolbar-state.d.ts +46 -0
- package/dist/block/toolbar-state.d.ts.map +1 -0
- package/dist/block/toolbar-state.js +67 -0
- package/dist/block/use-block-face-operation.d.ts +39 -0
- package/dist/block/use-block-face-operation.d.ts.map +1 -0
- package/dist/block/use-block-face-operation.js +218 -0
- package/dist/box-vent/definition.d.ts.map +1 -1
- package/dist/box-vent/definition.js +8 -5
- package/dist/box-vent/geometry.d.ts +4 -0
- package/dist/box-vent/geometry.d.ts.map +1 -1
- package/dist/box-vent/geometry.js +76 -44
- package/dist/box-vent/paint.d.ts +4 -0
- package/dist/box-vent/paint.d.ts.map +1 -0
- package/dist/box-vent/paint.js +40 -0
- package/dist/box-vent/panel.js +4 -4
- package/dist/box-vent/parametrics.js +3 -3
- package/dist/box-vent/renderer.d.ts.map +1 -1
- package/dist/box-vent/renderer.js +29 -10
- package/dist/cabinet/appliance-layout.d.ts +26 -0
- package/dist/cabinet/appliance-layout.d.ts.map +1 -0
- package/dist/cabinet/appliance-layout.js +52 -0
- package/dist/cabinet/compartment-card.d.ts.map +1 -1
- package/dist/cabinet/compartment-card.js +11 -3
- package/dist/cabinet/continuous-placement.d.ts +3 -0
- package/dist/cabinet/continuous-placement.d.ts.map +1 -1
- package/dist/cabinet/continuous-placement.js +6 -0
- package/dist/cabinet/countertop-layout.d.ts +173 -0
- package/dist/cabinet/countertop-layout.d.ts.map +1 -0
- package/dist/cabinet/countertop-layout.js +80 -0
- package/dist/cabinet/definition.d.ts.map +1 -1
- package/dist/cabinet/definition.js +414 -61
- package/dist/cabinet/floorplan-move.d.ts.map +1 -1
- package/dist/cabinet/floorplan-move.js +91 -22
- package/dist/cabinet/geometry/cooktop.d.ts.map +1 -1
- package/dist/cabinet/geometry/cooktop.js +2 -2
- package/dist/cabinet/geometry/fridge.d.ts.map +1 -1
- package/dist/cabinet/geometry/fridge.js +25 -1
- package/dist/cabinet/geometry/fronts.d.ts +4 -0
- package/dist/cabinet/geometry/fronts.d.ts.map +1 -1
- package/dist/cabinet/geometry/fronts.js +1 -1
- package/dist/cabinet/geometry/run.d.ts.map +1 -1
- package/dist/cabinet/geometry/run.js +28 -71
- package/dist/cabinet/geometry/sink.d.ts +2 -12
- package/dist/cabinet/geometry/sink.d.ts.map +1 -1
- package/dist/cabinet/geometry/sink.js +8 -39
- package/dist/cabinet/geometry.d.ts.map +1 -1
- package/dist/cabinet/geometry.js +63 -1
- package/dist/cabinet/hosted-resize.d.ts +8 -0
- package/dist/cabinet/hosted-resize.d.ts.map +1 -0
- package/dist/cabinet/hosted-resize.js +158 -0
- package/dist/cabinet/index.d.ts +1 -0
- package/dist/cabinet/index.d.ts.map +1 -1
- package/dist/cabinet/index.js +1 -0
- package/dist/cabinet/insertion.d.ts +19 -0
- package/dist/cabinet/insertion.d.ts.map +1 -0
- package/dist/cabinet/insertion.js +49 -0
- package/dist/cabinet/move-frame.d.ts.map +1 -1
- package/dist/cabinet/move-frame.js +68 -2
- package/dist/cabinet/panel-context.d.ts +7 -0
- package/dist/cabinet/panel-context.d.ts.map +1 -0
- package/dist/cabinet/panel-context.js +16 -0
- package/dist/cabinet/panel-visibility.d.ts +9 -0
- package/dist/cabinet/panel-visibility.d.ts.map +1 -0
- package/dist/cabinet/panel-visibility.js +26 -0
- package/dist/cabinet/panel.d.ts.map +1 -1
- package/dist/cabinet/panel.js +221 -37
- package/dist/cabinet/placement-dimensions.d.ts +42 -0
- package/dist/cabinet/placement-dimensions.d.ts.map +1 -0
- package/dist/cabinet/placement-dimensions.js +227 -0
- package/dist/cabinet/placement-snap.d.ts +21 -1
- package/dist/cabinet/placement-snap.d.ts.map +1 -1
- package/dist/cabinet/placement-snap.js +48 -6
- package/dist/cabinet/preset-width-debt.d.ts +7 -0
- package/dist/cabinet/preset-width-debt.d.ts.map +1 -0
- package/dist/cabinet/preset-width-debt.js +45 -0
- package/dist/cabinet/presets.d.ts.map +1 -1
- package/dist/cabinet/presets.js +14 -13
- package/dist/cabinet/profiles.d.ts +14 -0
- package/dist/cabinet/profiles.d.ts.map +1 -0
- package/dist/cabinet/profiles.js +30 -0
- package/dist/cabinet/quick-actions.d.ts.map +1 -1
- package/dist/cabinet/quick-actions.js +8 -24
- package/dist/cabinet/reveals.d.ts +37 -0
- package/dist/cabinet/reveals.d.ts.map +1 -0
- package/dist/cabinet/reveals.js +13 -0
- package/dist/cabinet/run-layout.d.ts +98 -5
- package/dist/cabinet/run-layout.d.ts.map +1 -1
- package/dist/cabinet/run-layout.js +430 -37
- package/dist/cabinet/run-ops.d.ts +204 -12
- package/dist/cabinet/run-ops.d.ts.map +1 -1
- package/dist/cabinet/run-ops.js +523 -36
- package/dist/cabinet/run-panel.d.ts +6 -2
- package/dist/cabinet/run-panel.d.ts.map +1 -1
- package/dist/cabinet/run-panel.js +294 -108
- package/dist/cabinet/stack-transitions.d.ts.map +1 -1
- package/dist/cabinet/stack-transitions.js +35 -24
- package/dist/cabinet/stack.d.ts +169 -1
- package/dist/cabinet/stack.d.ts.map +1 -1
- package/dist/cabinet/stack.js +57 -18
- package/dist/cabinet/surfaces.d.ts +4 -0
- package/dist/cabinet/surfaces.d.ts.map +1 -0
- package/dist/cabinet/surfaces.js +101 -0
- package/dist/cabinet/tool.d.ts.map +1 -1
- package/dist/cabinet/tool.js +615 -91
- package/dist/cabinet/tree-structure.d.ts.map +1 -1
- package/dist/cabinet/tree-structure.js +10 -9
- package/dist/cabinet/validation.d.ts +27 -0
- package/dist/cabinet/validation.d.ts.map +1 -0
- package/dist/cabinet/validation.js +56 -0
- package/dist/cabinet/wall-height-presets.d.ts +12 -0
- package/dist/cabinet/wall-height-presets.d.ts.map +1 -0
- package/dist/cabinet/wall-height-presets.js +15 -0
- package/dist/cabinet/wall-snap.d.ts +27 -3
- package/dist/cabinet/wall-snap.d.ts.map +1 -1
- package/dist/cabinet/wall-snap.js +278 -62
- package/dist/cabinet/widths.d.ts +10 -0
- package/dist/cabinet/widths.d.ts.map +1 -0
- package/dist/cabinet/widths.js +13 -0
- package/dist/ceiling/definition.d.ts.map +1 -1
- package/dist/ceiling/definition.js +8 -2
- package/dist/ceiling/floorplan-affordances.d.ts +12 -12
- package/dist/ceiling/materials.d.ts.map +1 -1
- package/dist/ceiling/materials.js +0 -1
- package/dist/ceiling/panel.js +1 -1
- package/dist/ceiling/parametrics.js +1 -1
- package/dist/chimney/definition.js +1 -1
- package/dist/chimney/panel.js +9 -9
- package/dist/chimney/parametrics.js +3 -3
- package/dist/column/definition.d.ts.map +1 -1
- package/dist/column/definition.js +22 -4
- package/dist/column/panel.d.ts.map +1 -1
- package/dist/column/panel.js +37 -7
- package/dist/column/parametrics.d.ts.map +1 -1
- package/dist/column/parametrics.js +5 -3
- package/dist/column/tool.d.ts.map +1 -1
- package/dist/column/tool.js +50 -14
- package/dist/cupola/definition.d.ts.map +1 -1
- package/dist/cupola/definition.js +15 -6
- package/dist/cupola/geometry.d.ts +6 -0
- package/dist/cupola/geometry.d.ts.map +1 -1
- package/dist/cupola/geometry.js +60 -13
- package/dist/cupola/paint.d.ts +4 -0
- package/dist/cupola/paint.d.ts.map +1 -0
- package/dist/cupola/paint.js +39 -0
- package/dist/cupola/panel.js +1 -1
- package/dist/cupola/parametrics.js +3 -3
- package/dist/cupola/renderer.d.ts.map +1 -1
- package/dist/cupola/renderer.js +27 -8
- package/dist/door/floorplan-move.d.ts.map +1 -1
- package/dist/door/floorplan-move.js +1 -1
- package/dist/door/move-tool.d.ts.map +1 -1
- package/dist/door/move-tool.js +86 -32
- package/dist/door/panel.d.ts.map +1 -1
- package/dist/door/panel.js +12 -12
- package/dist/door/parametrics.js +2 -2
- package/dist/door/tool.d.ts.map +1 -1
- package/dist/door/tool.js +16 -4
- package/dist/dormer/csg-geometry.d.ts +6 -42
- package/dist/dormer/csg-geometry.d.ts.map +1 -1
- package/dist/dormer/csg-geometry.js +38 -209
- package/dist/dormer/definition.d.ts +4 -12
- package/dist/dormer/definition.d.ts.map +1 -1
- package/dist/dormer/definition.js +18 -193
- package/dist/dormer/floorplan.d.ts +3 -3
- package/dist/dormer/floorplan.d.ts.map +1 -1
- package/dist/dormer/floorplan.js +6 -17
- package/dist/dormer/geometry.d.ts +5 -24
- package/dist/dormer/geometry.d.ts.map +1 -1
- package/dist/dormer/geometry.js +64 -41
- package/dist/dormer/index.d.ts +1 -1
- package/dist/dormer/index.d.ts.map +1 -1
- package/dist/dormer/index.js +1 -1
- package/dist/dormer/move-tool.d.ts.map +1 -1
- package/dist/dormer/move-tool.js +31 -3
- package/dist/dormer/panel-position-section.js +2 -2
- package/dist/dormer/panel-windows-section.d.ts +9 -0
- package/dist/dormer/panel-windows-section.d.ts.map +1 -0
- package/dist/dormer/panel-windows-section.js +7 -0
- package/dist/dormer/panel.d.ts.map +1 -1
- package/dist/dormer/panel.js +100 -18
- package/dist/dormer/parametrics.d.ts.map +1 -1
- package/dist/dormer/parametrics.js +8 -77
- package/dist/dormer/preview.d.ts.map +1 -1
- package/dist/dormer/preview.js +9 -1
- package/dist/dormer/renderer.d.ts.map +1 -1
- package/dist/dormer/renderer.js +24 -26
- package/dist/dormer/tool.d.ts.map +1 -1
- package/dist/dormer/tool.js +3 -1
- package/dist/dormer/window-layout.d.ts +15 -0
- package/dist/dormer/window-layout.d.ts.map +1 -0
- package/dist/dormer/window-layout.js +59 -0
- package/dist/downspout/definition.d.ts.map +1 -1
- package/dist/downspout/definition.js +17 -4
- package/dist/downspout/geometry.d.ts.map +1 -1
- package/dist/downspout/geometry.js +10 -0
- package/dist/downspout/inspector-editors.d.ts.map +1 -1
- package/dist/downspout/inspector-editors.js +9 -1
- package/dist/downspout/parametrics.d.ts.map +1 -1
- package/dist/downspout/parametrics.js +2 -1
- package/dist/downspout/renderer.d.ts.map +1 -1
- package/dist/downspout/renderer.js +19 -3
- package/dist/downspout/system.d.ts +7 -0
- package/dist/downspout/system.d.ts.map +1 -0
- package/dist/downspout/system.js +114 -0
- package/dist/duct-fitting/accessory-geometry.d.ts +4 -0
- package/dist/duct-fitting/accessory-geometry.d.ts.map +1 -0
- package/dist/duct-fitting/accessory-geometry.js +47 -0
- package/dist/duct-fitting/definition.d.ts.map +1 -1
- package/dist/duct-fitting/definition.js +11 -1
- package/dist/duct-fitting/floorplan.d.ts.map +1 -1
- package/dist/duct-fitting/floorplan.js +8 -0
- package/dist/duct-fitting/geometry.d.ts.map +1 -1
- package/dist/duct-fitting/geometry.js +52 -38
- package/dist/duct-fitting/parametrics.d.ts.map +1 -1
- package/dist/duct-fitting/parametrics.js +78 -15
- package/dist/duct-fitting/ports.d.ts +1 -0
- package/dist/duct-fitting/ports.d.ts.map +1 -1
- package/dist/duct-fitting/ports.js +46 -0
- package/dist/duct-fitting/tool.d.ts +19 -0
- package/dist/duct-fitting/tool.d.ts.map +1 -1
- package/dist/duct-fitting/tool.js +126 -34
- package/dist/duct-segment/continuation.d.ts +21 -0
- package/dist/duct-segment/continuation.d.ts.map +1 -0
- package/dist/duct-segment/continuation.js +167 -0
- package/dist/duct-segment/definition.d.ts.map +1 -1
- package/dist/duct-segment/definition.js +19 -18
- package/dist/duct-segment/floorplan.d.ts.map +1 -1
- package/dist/duct-segment/floorplan.js +43 -0
- package/dist/duct-segment/geometry.d.ts.map +1 -1
- package/dist/duct-segment/geometry.js +3 -0
- package/dist/duct-segment/move-tool.d.ts.map +1 -1
- package/dist/duct-segment/move-tool.js +33 -6
- package/dist/duct-segment/parametrics.d.ts.map +1 -1
- package/dist/duct-segment/parametrics.js +49 -1
- package/dist/duct-segment/selection.d.ts +3 -4
- package/dist/duct-segment/selection.d.ts.map +1 -1
- package/dist/duct-segment/selection.js +186 -158
- package/dist/duct-segment/tool.d.ts +38 -0
- package/dist/duct-segment/tool.d.ts.map +1 -1
- package/dist/duct-segment/tool.js +306 -677
- package/dist/duct-terminal/parametrics.js +2 -2
- package/dist/duct-terminal/tool.d.ts.map +1 -1
- package/dist/duct-terminal/tool.js +37 -7
- package/dist/elevator/panel.d.ts.map +1 -1
- package/dist/elevator/panel.js +7 -7
- package/dist/elevator/system.d.ts.map +1 -1
- package/dist/elevator/system.js +10 -1
- package/dist/eyebrow-vent/definition.d.ts.map +1 -1
- package/dist/eyebrow-vent/definition.js +8 -5
- package/dist/eyebrow-vent/geometry.d.ts +4 -0
- package/dist/eyebrow-vent/geometry.d.ts.map +1 -1
- package/dist/eyebrow-vent/geometry.js +60 -15
- package/dist/eyebrow-vent/paint.d.ts +4 -0
- package/dist/eyebrow-vent/paint.d.ts.map +1 -0
- package/dist/eyebrow-vent/paint.js +33 -0
- package/dist/eyebrow-vent/panel.js +1 -1
- package/dist/eyebrow-vent/parametrics.js +3 -3
- package/dist/eyebrow-vent/renderer.d.ts.map +1 -1
- package/dist/eyebrow-vent/renderer.js +27 -8
- package/dist/fence/definition.d.ts.map +1 -1
- package/dist/fence/definition.js +2 -1
- package/dist/fence/floorplan-affordances.d.ts +1 -0
- package/dist/fence/floorplan-affordances.d.ts.map +1 -1
- package/dist/fence/floorplan-affordances.js +30 -1
- package/dist/fence/floorplan.d.ts.map +1 -1
- package/dist/fence/floorplan.js +14 -0
- package/dist/fence/inspector-editors.js +1 -1
- package/dist/fence/parametrics.js +3 -3
- package/dist/fence/tool.d.ts.map +1 -1
- package/dist/fence/tool.js +47 -20
- package/dist/gutter/corner-mitre.d.ts.map +1 -1
- package/dist/gutter/corner-mitre.js +47 -7
- package/dist/gutter/definition.d.ts.map +1 -1
- package/dist/gutter/definition.js +23 -13
- package/dist/gutter/eave-align.d.ts.map +1 -1
- package/dist/gutter/eave-align.js +10 -0
- package/dist/gutter/eave-snap.d.ts +1 -1
- package/dist/gutter/eave-snap.d.ts.map +1 -1
- package/dist/gutter/eave-snap.js +10 -23
- package/dist/gutter/geometry.d.ts.map +1 -1
- package/dist/gutter/geometry.js +126 -8
- package/dist/gutter/outlet-lookup.d.ts.map +1 -1
- package/dist/gutter/outlet-lookup.js +22 -1
- package/dist/gutter/paint.d.ts +3 -0
- package/dist/gutter/paint.d.ts.map +1 -0
- package/dist/gutter/paint.js +6 -0
- package/dist/gutter/parametrics.d.ts.map +1 -1
- package/dist/gutter/parametrics.js +4 -1
- package/dist/gutter/renderer.d.ts.map +1 -1
- package/dist/gutter/renderer.js +63 -7
- package/dist/gutter/trim-clip.d.ts +3 -0
- package/dist/gutter/trim-clip.d.ts.map +1 -0
- package/dist/gutter/trim-clip.js +5 -0
- package/dist/hvac-equipment/parametrics.js +3 -3
- package/dist/hvac-equipment/tool.d.ts.map +1 -1
- package/dist/hvac-equipment/tool.js +12 -2
- package/dist/imported-mesh/definition.d.ts +5 -0
- package/dist/imported-mesh/definition.d.ts.map +1 -0
- package/dist/imported-mesh/definition.js +38 -0
- package/dist/imported-mesh/floorplan.d.ts +4 -0
- package/dist/imported-mesh/floorplan.d.ts.map +1 -0
- package/dist/imported-mesh/floorplan.js +34 -0
- package/dist/imported-mesh/geometry.d.ts +5 -0
- package/dist/imported-mesh/geometry.d.ts.map +1 -0
- package/dist/imported-mesh/geometry.js +34 -0
- package/dist/imported-mesh/index.d.ts +4 -0
- package/dist/imported-mesh/index.d.ts.map +1 -0
- package/dist/imported-mesh/index.js +3 -0
- package/dist/imported-mesh/schema.d.ts +2 -0
- package/dist/imported-mesh/schema.d.ts.map +1 -0
- package/dist/imported-mesh/schema.js +1 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -2
- package/dist/item/definition.d.ts.map +1 -1
- package/dist/item/definition.js +10 -2
- package/dist/item/floorplan-move.d.ts +9 -1
- package/dist/item/floorplan-move.d.ts.map +1 -1
- package/dist/item/floorplan-move.js +74 -2
- package/dist/item/floorplan.d.ts.map +1 -1
- package/dist/item/floorplan.js +33 -1
- package/dist/item/move-tool.d.ts +28 -1
- package/dist/item/move-tool.d.ts.map +1 -1
- package/dist/item/move-tool.js +15 -3
- package/dist/item/panel.js +1 -1
- package/dist/item/renderer.d.ts.map +1 -1
- package/dist/item/renderer.js +16 -6
- package/dist/item/system.d.ts +5 -0
- package/dist/item/system.d.ts.map +1 -1
- package/dist/item/system.js +7 -1
- package/dist/lean-to-extension/arc.d.ts +14 -0
- package/dist/lean-to-extension/arc.d.ts.map +1 -0
- package/dist/lean-to-extension/arc.js +56 -0
- package/dist/lean-to-extension/assembly.d.ts +61 -0
- package/dist/lean-to-extension/assembly.d.ts.map +1 -0
- package/dist/lean-to-extension/assembly.js +761 -0
- package/dist/lean-to-extension/canopy-joint.d.ts +35 -0
- package/dist/lean-to-extension/canopy-joint.d.ts.map +1 -0
- package/dist/lean-to-extension/canopy-joint.js +234 -0
- package/dist/lean-to-extension/conical-host.d.ts +15 -0
- package/dist/lean-to-extension/conical-host.d.ts.map +1 -0
- package/dist/lean-to-extension/conical-host.js +113 -0
- package/dist/lean-to-extension/corner-joint.d.ts +29 -0
- package/dist/lean-to-extension/corner-joint.d.ts.map +1 -0
- package/dist/lean-to-extension/corner-joint.js +1202 -0
- package/dist/lean-to-extension/definition.d.ts +4 -0
- package/dist/lean-to-extension/definition.d.ts.map +1 -0
- package/dist/lean-to-extension/definition.js +433 -0
- package/dist/lean-to-extension/floorplan-affordances.d.ts +4 -0
- package/dist/lean-to-extension/floorplan-affordances.d.ts.map +1 -0
- package/dist/lean-to-extension/floorplan-affordances.js +144 -0
- package/dist/lean-to-extension/floorplan-move.d.ts +3 -0
- package/dist/lean-to-extension/floorplan-move.d.ts.map +1 -0
- package/dist/lean-to-extension/floorplan-move.js +157 -0
- package/dist/lean-to-extension/floorplan-tool.d.ts +4 -0
- package/dist/lean-to-extension/floorplan-tool.d.ts.map +1 -0
- package/dist/lean-to-extension/floorplan-tool.js +385 -0
- package/dist/lean-to-extension/floorplan.d.ts +3 -0
- package/dist/lean-to-extension/floorplan.d.ts.map +1 -0
- package/dist/lean-to-extension/floorplan.js +373 -0
- package/dist/lean-to-extension/geometry.d.ts +7 -0
- package/dist/lean-to-extension/geometry.d.ts.map +1 -0
- package/dist/lean-to-extension/geometry.js +662 -0
- package/dist/lean-to-extension/index.d.ts +8 -0
- package/dist/lean-to-extension/index.d.ts.map +1 -0
- package/dist/lean-to-extension/index.js +7 -0
- package/dist/lean-to-extension/layout.d.ts +108 -0
- package/dist/lean-to-extension/layout.d.ts.map +1 -0
- package/dist/lean-to-extension/layout.js +477 -0
- package/dist/lean-to-extension/managed-preview.d.ts +3 -0
- package/dist/lean-to-extension/managed-preview.d.ts.map +1 -0
- package/dist/lean-to-extension/managed-preview.js +93 -0
- package/dist/lean-to-extension/move-tool.d.ts +8 -0
- package/dist/lean-to-extension/move-tool.d.ts.map +1 -0
- package/dist/lean-to-extension/move-tool.js +202 -0
- package/dist/lean-to-extension/paint.d.ts +2 -0
- package/dist/lean-to-extension/paint.d.ts.map +1 -0
- package/dist/lean-to-extension/paint.js +16 -0
- package/dist/lean-to-extension/parametrics.d.ts +4 -0
- package/dist/lean-to-extension/parametrics.d.ts.map +1 -0
- package/dist/lean-to-extension/parametrics.js +570 -0
- package/dist/lean-to-extension/placement-scope.d.ts +3 -0
- package/dist/lean-to-extension/placement-scope.d.ts.map +1 -0
- package/dist/lean-to-extension/placement-scope.js +4 -0
- package/dist/lean-to-extension/placement-validation.d.ts +4 -0
- package/dist/lean-to-extension/placement-validation.d.ts.map +1 -0
- package/dist/lean-to-extension/placement-validation.js +324 -0
- package/dist/lean-to-extension/placement.d.ts +59 -0
- package/dist/lean-to-extension/placement.d.ts.map +1 -0
- package/dist/lean-to-extension/placement.js +331 -0
- package/dist/lean-to-extension/plan-footprint.d.ts +10 -0
- package/dist/lean-to-extension/plan-footprint.d.ts.map +1 -0
- package/dist/lean-to-extension/plan-footprint.js +27 -0
- package/dist/lean-to-extension/preview-geometry.d.ts +7 -0
- package/dist/lean-to-extension/preview-geometry.d.ts.map +1 -0
- package/dist/lean-to-extension/preview-geometry.js +40 -0
- package/dist/lean-to-extension/preview.d.ts +7 -0
- package/dist/lean-to-extension/preview.d.ts.map +1 -0
- package/dist/lean-to-extension/preview.js +20 -0
- package/dist/lean-to-extension/renderer.d.ts +6 -0
- package/dist/lean-to-extension/renderer.d.ts.map +1 -0
- package/dist/lean-to-extension/renderer.js +34 -0
- package/dist/lean-to-extension/roof-attachment.d.ts +28 -0
- package/dist/lean-to-extension/roof-attachment.d.ts.map +1 -0
- package/dist/lean-to-extension/roof-attachment.js +376 -0
- package/dist/lean-to-extension/schema.d.ts +2 -0
- package/dist/lean-to-extension/schema.d.ts.map +1 -0
- package/dist/lean-to-extension/schema.js +1 -0
- package/dist/lean-to-extension/slots.d.ts +5 -0
- package/dist/lean-to-extension/slots.d.ts.map +1 -0
- package/dist/lean-to-extension/slots.js +15 -0
- package/dist/lean-to-extension/system.d.ts +7 -0
- package/dist/lean-to-extension/system.d.ts.map +1 -0
- package/dist/lean-to-extension/system.js +726 -0
- package/dist/lean-to-extension/tool.d.ts +3 -0
- package/dist/lean-to-extension/tool.d.ts.map +1 -0
- package/dist/lean-to-extension/tool.js +580 -0
- package/dist/lean-to-extension/wall-target.d.ts +10 -0
- package/dist/lean-to-extension/wall-target.d.ts.map +1 -0
- package/dist/lean-to-extension/wall-target.js +29 -0
- package/dist/lineset/definition.d.ts.map +1 -1
- package/dist/lineset/definition.js +1 -0
- package/dist/liquid-line/definition.d.ts.map +1 -1
- package/dist/liquid-line/definition.js +1 -0
- package/dist/pipe-fitting/definition.d.ts.map +1 -1
- package/dist/pipe-fitting/definition.js +16 -2
- package/dist/pipe-fitting/floorplan.d.ts.map +1 -1
- package/dist/pipe-fitting/floorplan.js +4 -0
- package/dist/pipe-fitting/geometry.d.ts +3 -5
- package/dist/pipe-fitting/geometry.d.ts.map +1 -1
- package/dist/pipe-fitting/geometry.js +154 -21
- package/dist/pipe-fitting/inline-insertion.d.ts +13 -0
- package/dist/pipe-fitting/inline-insertion.d.ts.map +1 -0
- package/dist/pipe-fitting/inline-insertion.js +96 -0
- package/dist/pipe-fitting/parametrics.d.ts.map +1 -1
- package/dist/pipe-fitting/parametrics.js +17 -3
- package/dist/pipe-fitting/ports.d.ts.map +1 -1
- package/dist/pipe-fitting/ports.js +8 -1
- package/dist/pipe-fitting/tool.d.ts +26 -0
- package/dist/pipe-fitting/tool.d.ts.map +1 -1
- package/dist/pipe-fitting/tool.js +182 -37
- package/dist/pipe-segment/continuation.d.ts +22 -0
- package/dist/pipe-segment/continuation.d.ts.map +1 -0
- package/dist/pipe-segment/continuation.js +146 -0
- package/dist/pipe-segment/definition.d.ts.map +1 -1
- package/dist/pipe-segment/definition.js +23 -7
- package/dist/pipe-segment/floorplan.d.ts.map +1 -1
- package/dist/pipe-segment/floorplan.js +42 -0
- package/dist/pipe-segment/geometry.d.ts +2 -1
- package/dist/pipe-segment/geometry.d.ts.map +1 -1
- package/dist/pipe-segment/geometry.js +4 -1
- package/dist/pipe-segment/move-tool.d.ts.map +1 -1
- package/dist/pipe-segment/move-tool.js +25 -5
- package/dist/pipe-segment/parametrics.d.ts.map +1 -1
- package/dist/pipe-segment/parametrics.js +49 -0
- package/dist/pipe-segment/selection.d.ts +3 -4
- package/dist/pipe-segment/selection.d.ts.map +1 -1
- package/dist/pipe-segment/selection.js +169 -105
- package/dist/pipe-segment/slope.d.ts +5 -0
- package/dist/pipe-segment/slope.d.ts.map +1 -0
- package/dist/pipe-segment/slope.js +10 -0
- package/dist/pipe-segment/tool.d.ts.map +1 -1
- package/dist/pipe-segment/tool.js +325 -545
- package/dist/pipe-trap/tool.d.ts.map +1 -1
- package/dist/pipe-trap/tool.js +15 -2
- package/dist/procedural-item/definition.d.ts +4 -0
- package/dist/procedural-item/definition.d.ts.map +1 -0
- package/dist/procedural-item/definition.js +254 -0
- package/dist/procedural-item/geometry.d.ts +31 -0
- package/dist/procedural-item/geometry.d.ts.map +1 -0
- package/dist/procedural-item/geometry.js +88 -0
- package/dist/procedural-item/index.d.ts +3 -0
- package/dist/procedural-item/index.d.ts.map +1 -0
- package/dist/procedural-item/index.js +2 -0
- package/dist/procedural-item/move-session.d.ts +15 -0
- package/dist/procedural-item/move-session.d.ts.map +1 -0
- package/dist/procedural-item/move-session.js +197 -0
- package/dist/procedural-item/move-tool.d.ts +5 -0
- package/dist/procedural-item/move-tool.d.ts.map +1 -0
- package/dist/procedural-item/move-tool.js +193 -0
- package/dist/procedural-item/renderer.d.ts +5 -0
- package/dist/procedural-item/renderer.d.ts.map +1 -0
- package/dist/procedural-item/renderer.js +66 -0
- package/dist/ridge-vent/definition.js +1 -1
- package/dist/ridge-vent/panel.d.ts.map +1 -1
- package/dist/ridge-vent/panel.js +4 -4
- package/dist/ridge-vent/parametrics.js +1 -1
- package/dist/roof/conical-roof-placement.d.ts +36 -0
- package/dist/roof/conical-roof-placement.d.ts.map +1 -0
- package/dist/roof/conical-roof-placement.js +134 -0
- package/dist/roof/conical-roof.d.ts +3 -0
- package/dist/roof/conical-roof.d.ts.map +1 -0
- package/dist/roof/conical-roof.js +53 -0
- package/dist/roof/definition.d.ts +3 -10
- package/dist/roof/definition.d.ts.map +1 -1
- package/dist/roof/definition.js +83 -13
- package/dist/roof/floorplan.d.ts +3 -10
- package/dist/roof/floorplan.d.ts.map +1 -1
- package/dist/roof/floorplan.js +139 -165
- package/dist/roof/index.d.ts +1 -0
- package/dist/roof/index.d.ts.map +1 -1
- package/dist/roof/index.js +1 -0
- package/dist/roof/panel.d.ts.map +1 -1
- package/dist/roof/panel.js +26 -25
- package/dist/roof/renderer.d.ts.map +1 -1
- package/dist/roof/roof-footprint-source.d.ts +16 -0
- package/dist/roof/roof-footprint-source.d.ts.map +1 -0
- package/dist/roof/roof-footprint-source.js +14 -0
- package/dist/roof/roof-footprint.d.ts +25 -0
- package/dist/roof/roof-footprint.d.ts.map +1 -0
- package/dist/roof/roof-footprint.js +94 -0
- package/dist/roof/roof-placement-mode.d.ts +18 -0
- package/dist/roof/roof-placement-mode.d.ts.map +1 -0
- package/dist/roof/roof-placement-mode.js +24 -0
- package/dist/roof/tool.d.ts +10 -0
- package/dist/roof/tool.d.ts.map +1 -0
- package/dist/roof/tool.js +922 -0
- package/dist/roof-segment/definition.d.ts.map +1 -1
- package/dist/roof-segment/definition.js +52 -8
- package/dist/roof-segment/floorplan-affordances.d.ts +5 -6
- package/dist/roof-segment/floorplan-affordances.d.ts.map +1 -1
- package/dist/roof-segment/floorplan-affordances.js +64 -18
- package/dist/roof-segment/floorplan.d.ts +3 -2
- package/dist/roof-segment/floorplan.d.ts.map +1 -1
- package/dist/roof-segment/floorplan.js +95 -46
- package/dist/roof-segment/panel.d.ts.map +1 -1
- package/dist/roof-segment/panel.js +122 -27
- package/dist/scan/definition.d.ts +2 -3
- package/dist/scan/definition.d.ts.map +1 -1
- package/dist/scan/definition.js +9 -7
- package/dist/scan/parametrics.d.ts.map +1 -1
- package/dist/scan/parametrics.js +13 -1
- package/dist/scan/renderer.d.ts.map +1 -1
- package/dist/scan/renderer.js +8 -2
- package/dist/shared/accessory-cursor.d.ts +7 -0
- package/dist/shared/accessory-cursor.d.ts.map +1 -0
- package/dist/shared/accessory-cursor.js +83 -0
- package/dist/shared/accessory-floorplan.d.ts +4 -0
- package/dist/shared/accessory-floorplan.d.ts.map +1 -0
- package/dist/shared/accessory-floorplan.js +51 -0
- package/dist/shared/accessory-geometry.d.ts +7 -0
- package/dist/shared/accessory-geometry.d.ts.map +1 -0
- package/dist/shared/accessory-geometry.js +79 -0
- package/dist/shared/accessory-placement.d.ts +10 -0
- package/dist/shared/accessory-placement.d.ts.map +1 -0
- package/dist/shared/accessory-placement.js +126 -0
- package/dist/shared/accessory-snapping.d.ts +5 -0
- package/dist/shared/accessory-snapping.d.ts.map +1 -0
- package/dist/shared/accessory-snapping.js +40 -0
- package/dist/shared/automatic-run-end-cap.d.ts +12 -0
- package/dist/shared/automatic-run-end-cap.d.ts.map +1 -0
- package/dist/shared/automatic-run-end-cap.js +169 -0
- package/dist/shared/block-face-host.d.ts +15 -0
- package/dist/shared/block-face-host.d.ts.map +1 -0
- package/dist/shared/block-face-host.js +36 -0
- package/dist/shared/connection-compatibility.d.ts +8 -0
- package/dist/shared/connection-compatibility.d.ts.map +1 -0
- package/dist/shared/connection-compatibility.js +28 -0
- package/dist/shared/connection-feedback.d.ts +10 -0
- package/dist/shared/connection-feedback.d.ts.map +1 -0
- package/dist/shared/connection-feedback.js +17 -0
- package/dist/shared/distribution-run-contract.d.ts +49 -0
- package/dist/shared/distribution-run-contract.d.ts.map +1 -0
- package/dist/shared/distribution-run-contract.js +30 -0
- package/dist/shared/distribution-run-tool.d.ts +117 -0
- package/dist/shared/distribution-run-tool.d.ts.map +1 -0
- package/dist/shared/distribution-run-tool.js +986 -0
- package/dist/shared/dormer-wall-opening-placement.d.ts +21 -0
- package/dist/shared/dormer-wall-opening-placement.d.ts.map +1 -0
- package/dist/shared/dormer-wall-opening-placement.js +101 -0
- package/dist/shared/duct-adapter.d.ts +10 -0
- package/dist/shared/duct-adapter.d.ts.map +1 -0
- package/dist/shared/duct-adapter.js +43 -0
- package/dist/shared/elbow-branch-continuation.d.ts +20 -0
- package/dist/shared/elbow-branch-continuation.d.ts.map +1 -0
- package/dist/shared/elbow-branch-continuation.js +200 -0
- package/dist/shared/fitting-clearance.d.ts +5 -0
- package/dist/shared/fitting-clearance.d.ts.map +1 -0
- package/dist/shared/fitting-clearance.js +11 -0
- package/dist/shared/fitting-deletion-cleanup.d.ts +14 -0
- package/dist/shared/fitting-deletion-cleanup.d.ts.map +1 -0
- package/dist/shared/fitting-deletion-cleanup.js +297 -0
- package/dist/shared/fitting-surface-support.d.ts +5 -0
- package/dist/shared/fitting-surface-support.d.ts.map +1 -0
- package/dist/shared/fitting-surface-support.js +42 -0
- package/dist/shared/fitting-tool-options.d.ts +4 -0
- package/dist/shared/fitting-tool-options.d.ts.map +1 -0
- package/dist/shared/fitting-tool-options.js +175 -0
- package/dist/shared/floor-placement.d.ts +1 -1
- package/dist/shared/floor-placement.d.ts.map +1 -1
- package/dist/shared/floor-placement.js +13 -33
- package/dist/shared/ghost-materials.d.ts.map +1 -1
- package/dist/shared/ghost-materials.js +2 -1
- package/dist/shared/lean-to-post-omissions.d.ts +8 -0
- package/dist/shared/lean-to-post-omissions.d.ts.map +1 -0
- package/dist/shared/lean-to-post-omissions.js +51 -0
- package/dist/shared/mep-fitting-actions.d.ts +5 -0
- package/dist/shared/mep-fitting-actions.d.ts.map +1 -0
- package/dist/shared/mep-fitting-actions.js +16 -0
- package/dist/shared/mep-presets.d.ts +11 -0
- package/dist/shared/mep-presets.d.ts.map +1 -0
- package/dist/shared/mep-presets.js +34 -0
- package/dist/shared/node-batch/candidates.d.ts +29 -0
- package/dist/shared/node-batch/candidates.d.ts.map +1 -0
- package/dist/shared/node-batch/candidates.js +260 -0
- package/dist/shared/node-batch/store.d.ts +26 -0
- package/dist/shared/node-batch/store.d.ts.map +1 -0
- package/dist/shared/node-batch/store.js +319 -0
- package/dist/shared/node-batch/system.d.ts +8 -0
- package/dist/shared/node-batch/system.d.ts.map +1 -0
- package/dist/shared/node-batch/system.js +569 -0
- package/dist/shared/node-batch/types.d.ts +99 -0
- package/dist/shared/node-batch/types.d.ts.map +1 -0
- package/dist/shared/node-batch/types.js +4 -0
- package/dist/shared/opening-move-history.d.ts +47 -0
- package/dist/shared/opening-move-history.d.ts.map +1 -0
- package/dist/shared/opening-move-history.js +18 -0
- package/dist/shared/opening-move-wall-gate.d.ts +55 -0
- package/dist/shared/opening-move-wall-gate.d.ts.map +1 -0
- package/dist/shared/opening-move-wall-gate.js +44 -0
- package/dist/shared/panel-fields.d.ts +15 -0
- package/dist/shared/panel-fields.d.ts.map +1 -0
- package/dist/shared/panel-fields.js +31 -0
- package/dist/shared/path-point-affordance.d.ts +2 -2
- package/dist/shared/path-point-affordance.d.ts.map +1 -1
- package/dist/shared/path-point-affordance.js +30 -6
- package/dist/shared/placeholder-geometry.d.ts.map +1 -1
- package/dist/shared/placeholder-geometry.js +4 -0
- package/dist/shared/ports.d.ts +20 -3
- package/dist/shared/ports.d.ts.map +1 -1
- package/dist/shared/ports.js +148 -7
- package/dist/shared/primitive-uv.d.ts +17 -0
- package/dist/shared/primitive-uv.d.ts.map +1 -0
- package/dist/shared/primitive-uv.js +107 -0
- package/dist/shared/reducer-size.d.ts +2 -0
- package/dist/shared/reducer-size.d.ts.map +1 -0
- package/dist/shared/reducer-size.js +12 -0
- package/dist/shared/resting-surface-plan.d.ts +3 -0
- package/dist/shared/resting-surface-plan.d.ts.map +1 -0
- package/dist/shared/resting-surface-plan.js +28 -0
- package/dist/shared/ridge-snap.js +1 -1
- package/dist/shared/roof-surface.d.ts.map +1 -1
- package/dist/shared/roof-surface.js +17 -2
- package/dist/shared/run-cursor.d.ts +22 -0
- package/dist/shared/run-cursor.d.ts.map +1 -0
- package/dist/shared/run-cursor.js +19 -0
- package/dist/shared/run-direction-feedback.d.ts +20 -0
- package/dist/shared/run-direction-feedback.d.ts.map +1 -0
- package/dist/shared/run-direction-feedback.js +139 -0
- package/dist/shared/run-hanger-controls.d.ts +7 -0
- package/dist/shared/run-hanger-controls.d.ts.map +1 -0
- package/dist/shared/run-hanger-controls.js +44 -0
- package/dist/shared/run-hanger-inspector.d.ts +5 -0
- package/dist/shared/run-hanger-inspector.d.ts.map +1 -0
- package/dist/shared/run-hanger-inspector.js +43 -0
- package/dist/shared/run-hanger-mode.d.ts +11 -0
- package/dist/shared/run-hanger-mode.d.ts.map +1 -0
- package/dist/shared/run-hanger-mode.js +32 -0
- package/dist/shared/run-hanger-system.d.ts +3 -0
- package/dist/shared/run-hanger-system.d.ts.map +1 -0
- package/dist/shared/run-hanger-system.js +39 -0
- package/dist/shared/run-hangers.d.ts +25 -0
- package/dist/shared/run-hangers.d.ts.map +1 -0
- package/dist/shared/run-hangers.js +261 -0
- package/dist/shared/run-port-snap.d.ts +11 -0
- package/dist/shared/run-port-snap.d.ts.map +1 -0
- package/dist/shared/run-port-snap.js +19 -0
- package/dist/shared/run-screen-direction.d.ts +5 -0
- package/dist/shared/run-screen-direction.d.ts.map +1 -0
- package/dist/shared/run-screen-direction.js +24 -0
- package/dist/shared/selection-handles.d.ts +4 -0
- package/dist/shared/selection-handles.d.ts.map +1 -1
- package/dist/shared/selection-handles.js +10 -0
- package/dist/shared/slot-paint.d.ts +8 -1
- package/dist/shared/slot-paint.d.ts.map +1 -1
- package/dist/shared/slot-paint.js +120 -27
- package/dist/shared/surface-paint.d.ts +1 -2
- package/dist/shared/surface-paint.d.ts.map +1 -1
- package/dist/shared/surface-paint.js +9 -20
- package/dist/shared/system-check-panel.d.ts +6 -0
- package/dist/shared/system-check-panel.d.ts.map +1 -0
- package/dist/shared/system-check-panel.js +62 -0
- package/dist/shared/system-checks.d.ts +9 -0
- package/dist/shared/system-checks.d.ts.map +1 -0
- package/dist/shared/system-checks.js +131 -0
- package/dist/shared/wall-attach-target.d.ts +14 -2
- package/dist/shared/wall-attach-target.d.ts.map +1 -1
- package/dist/shared/wall-attach-target.js +108 -4
- package/dist/shared/wall-opening-clearance.d.ts +19 -0
- package/dist/shared/wall-opening-clearance.d.ts.map +1 -0
- package/dist/shared/wall-opening-clearance.js +28 -0
- package/dist/shared/wall-run-move.d.ts +17 -0
- package/dist/shared/wall-run-move.d.ts.map +1 -0
- package/dist/shared/wall-run-move.js +56 -0
- package/dist/shelf/definition.d.ts.map +1 -1
- package/dist/shelf/definition.js +2 -1
- package/dist/shelf/floorplan-affordances.d.ts.map +1 -1
- package/dist/shelf/floorplan-affordances.js +5 -3
- package/dist/shelf/floorplan-move.d.ts.map +1 -1
- package/dist/shelf/floorplan-move.js +3 -2
- package/dist/shelf/geometry.d.ts.map +1 -1
- package/dist/shelf/geometry.js +2 -10
- package/dist/shelf/parametrics.js +4 -4
- package/dist/site/renderer.d.ts.map +1 -1
- package/dist/site/renderer.js +40 -28
- package/dist/site/terrain-geometry.d.ts +1 -1
- package/dist/site/terrain-geometry.d.ts.map +1 -1
- package/dist/site/terrain-geometry.js +35 -9
- package/dist/site/terrain-mesh.d.ts +5 -0
- package/dist/site/terrain-mesh.d.ts.map +1 -1
- package/dist/site/terrain-mesh.js +63 -34
- package/dist/skylight/definition.js +1 -1
- package/dist/skylight/panel.js +6 -6
- package/dist/skylight/parametrics.js +2 -2
- package/dist/slab/definition.d.ts.map +1 -1
- package/dist/slab/definition.js +6 -1
- package/dist/slab/dependency-tracker.d.ts +3 -0
- package/dist/slab/dependency-tracker.d.ts.map +1 -0
- package/dist/slab/dependency-tracker.js +104 -0
- package/dist/slab/floorplan-affordances.d.ts +8 -8
- package/dist/slab/geometry.d.ts.map +1 -1
- package/dist/slab/geometry.js +16 -2
- package/dist/slab/panel.js +1 -1
- package/dist/slab/parametrics.js +1 -1
- package/dist/slab/system.d.ts.map +1 -1
- package/dist/slab/system.js +8 -64
- package/dist/solar-panel/definition.js +1 -1
- package/dist/solar-panel/panel.js +2 -2
- package/dist/solar-panel/parametrics.js +2 -2
- package/dist/spawn/panel.js +1 -1
- package/dist/stair/panel.d.ts.map +1 -1
- package/dist/stair/panel.js +23 -16
- package/dist/stair/stair-type.d.ts +18 -0
- package/dist/stair/stair-type.d.ts.map +1 -0
- package/dist/stair/stair-type.js +25 -0
- package/dist/stair-segment/panel.d.ts.map +1 -1
- package/dist/stair-segment/panel.js +45 -6
- package/dist/turbine-vent/definition.d.ts.map +1 -1
- package/dist/turbine-vent/definition.js +8 -5
- package/dist/turbine-vent/geometry.d.ts.map +1 -1
- package/dist/turbine-vent/geometry.js +48 -18
- package/dist/turbine-vent/paint.d.ts +4 -0
- package/dist/turbine-vent/paint.d.ts.map +1 -0
- package/dist/turbine-vent/paint.js +35 -0
- package/dist/turbine-vent/panel.js +1 -1
- package/dist/turbine-vent/parametrics.js +2 -2
- package/dist/turbine-vent/renderer.d.ts.map +1 -1
- package/dist/turbine-vent/renderer.js +31 -9
- package/dist/unit/definition.d.ts +10 -0
- package/dist/unit/definition.d.ts.map +1 -0
- package/dist/unit/definition.js +38 -0
- package/dist/unit/index.d.ts +2 -0
- package/dist/unit/index.d.ts.map +1 -0
- package/dist/unit/index.js +1 -0
- package/dist/unit/parametrics.d.ts +3 -0
- package/dist/unit/parametrics.d.ts.map +1 -0
- package/dist/unit/parametrics.js +4 -0
- package/dist/unit/schema.d.ts +2 -0
- package/dist/unit/schema.d.ts.map +1 -0
- package/dist/unit/schema.js +1 -0
- package/dist/unit/unit-panel.d.ts +5 -0
- package/dist/unit/unit-panel.d.ts.map +1 -0
- package/dist/unit/unit-panel.js +61 -0
- package/dist/wall/curve-eligibility.d.ts +3 -0
- package/dist/wall/curve-eligibility.d.ts.map +1 -0
- package/dist/wall/curve-eligibility.js +10 -0
- package/dist/wall/curve-tool.d.ts.map +1 -1
- package/dist/wall/curve-tool.js +8 -11
- package/dist/wall/definition.d.ts +1 -1
- package/dist/wall/definition.d.ts.map +1 -1
- package/dist/wall/definition.js +36 -13
- package/dist/wall/floorplan-affordances.d.ts +1 -0
- package/dist/wall/floorplan-affordances.d.ts.map +1 -1
- package/dist/wall/floorplan-affordances.js +46 -7
- package/dist/wall/floorplan-move.d.ts +3 -4
- package/dist/wall/floorplan-move.d.ts.map +1 -1
- package/dist/wall/floorplan-move.js +122 -9
- package/dist/wall/floorplan.d.ts.map +1 -1
- package/dist/wall/floorplan.js +19 -23
- package/dist/wall/move-shared.d.ts.map +1 -1
- package/dist/wall/move-shared.js +10 -7
- package/dist/wall/paint.d.ts.map +1 -1
- package/dist/wall/paint.js +2 -0
- package/dist/wall/panel.d.ts.map +1 -1
- package/dist/wall/panel.js +10 -17
- package/dist/wall/parametrics.js +2 -2
- package/dist/wall/pointer-transparency.d.ts +128 -0
- package/dist/wall/pointer-transparency.d.ts.map +1 -0
- package/dist/wall/pointer-transparency.js +147 -0
- package/dist/wall/renderer.d.ts.map +1 -1
- package/dist/wall/renderer.js +65 -8
- package/dist/wall/selection-hit-owner.d.ts +53 -0
- package/dist/wall/selection-hit-owner.d.ts.map +1 -0
- package/dist/wall/selection-hit-owner.js +79 -0
- package/dist/wall/system.d.ts +2 -0
- package/dist/wall/system.d.ts.map +1 -1
- package/dist/wall/system.js +66 -25
- package/dist/wall/tool.d.ts.map +1 -1
- package/dist/wall/tool.js +5 -0
- package/dist/wall/treatment-level-data.d.ts +6 -1
- package/dist/wall/treatment-level-data.d.ts.map +1 -1
- package/dist/wall/treatment-level-data.js +82 -5
- package/dist/wall/treatments.d.ts +1 -0
- package/dist/wall/treatments.d.ts.map +1 -1
- package/dist/wall/treatments.js +5 -0
- package/dist/wall/wall-batch-system.d.ts +38 -6
- package/dist/wall/wall-batch-system.d.ts.map +1 -1
- package/dist/wall/wall-batch-system.js +122 -25
- package/dist/wall/wall-batch.js +2 -2
- package/dist/window/definition.d.ts +2 -1
- package/dist/window/definition.d.ts.map +1 -1
- package/dist/window/definition.js +51 -24
- package/dist/window/floorplan-move.d.ts.map +1 -1
- package/dist/window/floorplan-move.js +1 -1
- package/dist/window/move-tool.d.ts +7 -5
- package/dist/window/move-tool.d.ts.map +1 -1
- package/dist/window/move-tool.js +344 -58
- package/dist/window/panel.d.ts.map +1 -1
- package/dist/window/panel.js +8 -6
- package/dist/window/parametrics.js +2 -2
- package/dist/window/renderer.d.ts.map +1 -1
- package/dist/window/renderer.js +5 -7
- package/dist/window/tool.d.ts.map +1 -1
- package/dist/window/tool.js +227 -13
- package/dist/zone/definition.d.ts.map +1 -1
- package/dist/zone/definition.js +7 -1
- package/dist/zone/floorplan-affordances.d.ts +12 -12
- package/dist/zone/floorplan.d.ts +1 -3
- package/dist/zone/floorplan.d.ts.map +1 -1
- package/dist/zone/floorplan.js +43 -28
- package/dist/zone/quantities-panel.d.ts.map +1 -1
- package/dist/zone/quantities-panel.js +33 -29
- package/dist/zone/renderer.d.ts.map +1 -1
- package/dist/zone/renderer.js +20 -6
- package/dist/zone/unit-membership.d.ts +12 -0
- package/dist/zone/unit-membership.d.ts.map +1 -0
- package/dist/zone/unit-membership.js +22 -0
- package/package.json +16 -8
- package/dist/dormer/panel-window-section.d.ts +0 -14
- package/dist/dormer/panel-window-section.d.ts.map +0 -1
- package/dist/dormer/panel-window-section.js +0 -59
- package/dist/dormer/window-assembly.d.ts +0 -22
- package/dist/dormer/window-assembly.d.ts.map +0 -1
- package/dist/dormer/window-assembly.js +0 -111
- package/dist/dormer/window-frame.d.ts +0 -24
- package/dist/dormer/window-frame.d.ts.map +0 -1
- package/dist/dormer/window-frame.js +0 -100
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { StairSegmentNode as StairSegmentNodeSchema, useScene, } from '@pascal-app/core';
|
|
3
|
+
import { DEFAULT_LEVEL_HEIGHT, resolveStairTotalRise, runAsSingleSceneHistoryStep, StairSegmentNode as StairSegmentNodeSchema, useScene, } from '@pascal-app/core';
|
|
4
4
|
import { ActionButton, ActionGroup, PanelSection, PanelWrapper, SegmentedControl, SliderControl, ToggleControl, triggerSFX, useEditor, } from '@pascal-app/editor';
|
|
5
5
|
import { useViewer } from '@pascal-app/viewer';
|
|
6
6
|
import { Copy, Move, Trash2 } from 'lucide-react';
|
|
@@ -39,6 +39,45 @@ export default function StairSegmentPanel() {
|
|
|
39
39
|
const handleClose = useCallback(() => {
|
|
40
40
|
setSelection({ selectedIds: [] });
|
|
41
41
|
}, [setSelection]);
|
|
42
|
+
// A follows-level stair would hand the edited height straight back to
|
|
43
|
+
// `syncStairRises`, so a flight edit also pins the parent to the new total:
|
|
44
|
+
// the stair becomes Custom rise, exactly as editing Rise on its own panel.
|
|
45
|
+
const parentFollowsLevel = useScene((s) => {
|
|
46
|
+
const parent = node?.parentId ? s.nodes[node.parentId] : undefined;
|
|
47
|
+
return parent?.type === 'stair' && parent.totalRise == null;
|
|
48
|
+
});
|
|
49
|
+
const handleFlightHeightChange = useCallback((height) => {
|
|
50
|
+
if (!node)
|
|
51
|
+
return;
|
|
52
|
+
const sceneNodes = useScene.getState().nodes;
|
|
53
|
+
const parent = node.parentId ? sceneNodes[node.parentId] : undefined;
|
|
54
|
+
if (parent?.type !== 'stair') {
|
|
55
|
+
handleUpdate({ height });
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const totalRise = parent.children.reduce((sum, childId) => {
|
|
59
|
+
const child = sceneNodes[childId];
|
|
60
|
+
if (child?.type !== 'stair-segment')
|
|
61
|
+
return sum;
|
|
62
|
+
return sum + (child.id === node.id ? height : child.height);
|
|
63
|
+
}, 0);
|
|
64
|
+
runAsSingleSceneHistoryStep(useScene, () => {
|
|
65
|
+
useScene.getState().updateNodes([
|
|
66
|
+
{ id: node.id, data: { height } },
|
|
67
|
+
{ id: parent.id, data: { totalRise } },
|
|
68
|
+
]);
|
|
69
|
+
});
|
|
70
|
+
}, [node, handleUpdate]);
|
|
71
|
+
// Turning a landing back into a flight seeds the rise the parent stair
|
|
72
|
+
// resolves — a fixed 2.5 m stops halfway up a tall storey, and for a
|
|
73
|
+
// follows-mode stair it is what `syncStairRises` would converge to anyway.
|
|
74
|
+
const resolveParentStairRise = useCallback(() => {
|
|
75
|
+
const sceneNodes = useScene.getState().nodes;
|
|
76
|
+
const parent = node?.parentId ? sceneNodes[node.parentId] : undefined;
|
|
77
|
+
return parent?.type === 'stair'
|
|
78
|
+
? resolveStairTotalRise(parent, sceneNodes)
|
|
79
|
+
: DEFAULT_LEVEL_HEIGHT;
|
|
80
|
+
}, [node]);
|
|
42
81
|
const handleBack = useCallback(() => {
|
|
43
82
|
if (node?.parentId) {
|
|
44
83
|
setSelection({ selectedIds: [node.parentId] });
|
|
@@ -97,24 +136,24 @@ export default function StairSegmentPanel() {
|
|
|
97
136
|
updates.length = 1.0;
|
|
98
137
|
}
|
|
99
138
|
else {
|
|
100
|
-
updates.height =
|
|
139
|
+
updates.height = resolveParentStairRise();
|
|
101
140
|
updates.stepCount = 10;
|
|
102
141
|
updates.length = 3.0;
|
|
103
142
|
}
|
|
104
143
|
handleUpdate(updates);
|
|
105
|
-
}, options: SEGMENT_TYPE_OPTIONS, value: node.segmentType }) }), !isFirstSegment && (_jsx(PanelSection, { title: "Attachment", children: _jsx(SegmentedControl, { onChange: (v) => handleUpdate({ attachmentSide: v }), options: ATTACHMENT_SIDE_OPTIONS, value: node.attachmentSide }) })), _jsxs(PanelSection, { title: "Dimensions", children: [_jsx(SliderControl, { label: "Width", max:
|
|
144
|
+
}, options: SEGMENT_TYPE_OPTIONS, value: node.segmentType }) }), !isFirstSegment && (_jsx(PanelSection, { title: "Attachment", children: _jsx(SegmentedControl, { onChange: (v) => handleUpdate({ attachmentSide: v }), options: ATTACHMENT_SIDE_OPTIONS, value: node.attachmentSide }) })), _jsxs(PanelSection, { title: "Dimensions", children: [_jsx(SliderControl, { label: "Width", max: 1000, min: 0.5, onChange: (v) => handleUpdate({ width: v }), precision: 2, step: 0.1, unit: "m", value: node.width }), _jsx(SliderControl, { label: "Length", max: 1000, min: 0.5, onChange: (v) => handleUpdate({ length: v }), precision: 2, step: 0.1, unit: "m", value: node.length }), node.segmentType === 'stair' && (_jsxs(_Fragment, { children: [_jsx(SliderControl, { label: "Height", max: 1000, min: 0.5, onChange: handleFlightHeightChange, precision: 2, step: 0.1, unit: "m", value: node.height }), parentFollowsLevel && (_jsx("div", { className: "px-1 text-[11px] text-muted-foreground", children: "Editing switches the stair to Custom rise" })), _jsx(SliderControl, { label: "Steps", max: 30, min: 2, onChange: (v) => handleUpdate({ stepCount: Math.round(v) }), precision: 0, step: 1, unit: "", value: node.stepCount })] }))] }), _jsx(PanelSection, { title: "Structure", children: _jsxs("div", { className: "space-y-3", children: [_jsx(ToggleControl, { checked: node.fillToFloor, label: "Fill to floor", onChange: (checked) => handleUpdate({ fillToFloor: checked }) }), !node.fillToFloor && (_jsx(SliderControl, { label: "Thickness", max: 1000, min: 0.05, onChange: (v) => handleUpdate({ thickness: v }), precision: 2, step: 0.05, unit: "m", value: node.thickness ?? 0.25 }))] }) }), _jsxs(PanelSection, { title: "Position", children: [_jsx(SliderControl, { label: "X", onChange: (v) => {
|
|
106
145
|
const pos = [...node.position];
|
|
107
146
|
pos[0] = v;
|
|
108
147
|
handleUpdate({ position: pos });
|
|
109
|
-
}, precision: 2, step: 0.05, unit: "m", value:
|
|
148
|
+
}, precision: 2, step: 0.05, unit: "m", value: node.position[0] }), _jsx(SliderControl, { label: "Y", onChange: (v) => {
|
|
110
149
|
const pos = [...node.position];
|
|
111
150
|
pos[1] = v;
|
|
112
151
|
handleUpdate({ position: pos });
|
|
113
|
-
}, precision: 2, step: 0.05, unit: "m", value:
|
|
152
|
+
}, precision: 2, step: 0.05, unit: "m", value: node.position[1] }), _jsx(SliderControl, { label: "Z", onChange: (v) => {
|
|
114
153
|
const pos = [...node.position];
|
|
115
154
|
pos[2] = v;
|
|
116
155
|
handleUpdate({ position: pos });
|
|
117
|
-
}, precision: 2, step: 0.05, unit: "m", value:
|
|
156
|
+
}, precision: 2, step: 0.05, unit: "m", value: node.position[2] }), _jsx(SliderControl, { label: "Rotation", max: 180, min: -180, onChange: (degrees) => {
|
|
118
157
|
handleUpdate({ rotation: (degrees * Math.PI) / 180 });
|
|
119
158
|
}, precision: 0, step: 1, unit: "\u00B0", value: Math.round((node.rotation * 180) / Math.PI) }), _jsxs("div", { className: "flex gap-1.5 px-1 pt-2 pb-1", children: [_jsx(ActionButton, { label: "-45\u00B0", onClick: () => {
|
|
120
159
|
triggerSFX('sfx:item-rotate');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/turbine-vent/definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EAGpB,MAAM,kBAAkB,CAAA;AAIzB,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAoD1C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAAC,OAAO,eAAe,
|
|
1
|
+
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/turbine-vent/definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EAGpB,MAAM,kBAAkB,CAAA;AAIzB,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAoD1C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAAC,OAAO,eAAe,CA2DxE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TurbineVentNode as TurbineVentNodeSchema, } from '@pascal-app/core';
|
|
2
|
-
import { surfacePaintCapability } from '../shared/surface-paint';
|
|
3
2
|
import { buildTurbineVentFloorplan } from './floorplan';
|
|
3
|
+
import { turbineVentPaint } from './paint';
|
|
4
4
|
import { turbineVentParametrics } from './parametrics';
|
|
5
5
|
import { TurbineVentNode } from './schema';
|
|
6
6
|
const SIDE_HANDLE_OFFSET = 0.25;
|
|
@@ -70,7 +70,7 @@ const turbineVentHandles = [
|
|
|
70
70
|
*/
|
|
71
71
|
export const turbineVentDefinition = {
|
|
72
72
|
kind: 'turbine-vent',
|
|
73
|
-
schemaVersion:
|
|
73
|
+
schemaVersion: 3,
|
|
74
74
|
schema: TurbineVentNode,
|
|
75
75
|
category: 'structure',
|
|
76
76
|
surfaceRole: 'roof',
|
|
@@ -80,11 +80,14 @@ export const turbineVentDefinition = {
|
|
|
80
80
|
return rest;
|
|
81
81
|
},
|
|
82
82
|
capabilities: {
|
|
83
|
+
slots: () => [
|
|
84
|
+
{ slotId: 'base', label: 'Base', default: 'library:preset-softwhite' },
|
|
85
|
+
{ slotId: 'head', label: 'Head', default: 'library:preset-softwhite' },
|
|
86
|
+
],
|
|
83
87
|
selectable: { hitVolume: 'bbox' },
|
|
84
88
|
duplicable: true,
|
|
85
89
|
deletable: true,
|
|
86
|
-
|
|
87
|
-
paint: surfacePaintCapability,
|
|
90
|
+
paint: turbineVentPaint,
|
|
88
91
|
// Mounts on a roof segment via `roofSegmentId`. Sits ON TOP of the
|
|
89
92
|
// slope — no `buildCut`, just the dirty cascade so the parent roof's
|
|
90
93
|
// merged shell rebuilds when the vent moves / resizes.
|
|
@@ -109,7 +112,7 @@ export const turbineVentDefinition = {
|
|
|
109
112
|
presentation: {
|
|
110
113
|
label: 'Turbine Vent',
|
|
111
114
|
description: 'Wind-driven spinning whirlybird exhaust vent for a roof slope.',
|
|
112
|
-
icon: { kind: 'url', src: '/icons/
|
|
115
|
+
icon: { kind: 'url', src: '/icons/turbine-vent.webp' },
|
|
113
116
|
paletteSection: 'structure',
|
|
114
117
|
paletteOrder: 121,
|
|
115
118
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../src/turbine-vent/geometry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../src/turbine-vent/geometry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA0D9B,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,eAAe,GAAG,KAAK,CAAC,cAAc,CAiBhF;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,eAAe,GAAG,KAAK,CAAC,cAAc,CAqChF;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,eAAe,GAAG,KAAK,CAAC,cAAc,CASpF"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
2
|
import { mergeGeometries } from 'three/examples/jsm/utils/BufferGeometryUtils.js';
|
|
3
|
+
import { copyUvToSecondaryChannel, cumulativeProfileDistances, planarMetricUvs, } from '../shared/primitive-uv';
|
|
3
4
|
function resolveDims(node) {
|
|
4
5
|
const ro = Math.max(0.05, node.diameter / 2);
|
|
5
6
|
const height = Math.max(0.12, node.height);
|
|
@@ -136,6 +137,11 @@ function buildVanes(p, n, uv, count, rings, dw, totalTwist, thk) {
|
|
|
136
137
|
}
|
|
137
138
|
// ─── Primitive builders ──────────────────────────────────────────────
|
|
138
139
|
function cylinderWall(p, n, uv, r, y0, y1, segs) {
|
|
140
|
+
const ring = Array.from({ length: segs + 1 }, (_, index) => {
|
|
141
|
+
const angle = (index / segs) * Math.PI * 2;
|
|
142
|
+
return [r * Math.cos(angle), y0, r * Math.sin(angle)];
|
|
143
|
+
});
|
|
144
|
+
const ringU = cumulativeProfileDistances(ring);
|
|
139
145
|
for (let i = 0; i < segs; i++) {
|
|
140
146
|
const a = (i / segs) * Math.PI * 2;
|
|
141
147
|
const b = ((i + 1) / segs) * Math.PI * 2;
|
|
@@ -144,7 +150,12 @@ function cylinderWall(p, n, uv, r, y0, y1, segs) {
|
|
|
144
150
|
const cb = Math.cos(b);
|
|
145
151
|
const sb = Math.sin(b);
|
|
146
152
|
const out = [Math.cos((a + b) / 2), 0, Math.sin((a + b) / 2)];
|
|
147
|
-
pushQuad(p, n, uv, [r * ca, y0, r * sa], [r * cb, y0, r * sb], [r * cb, y1, r * sb], [r * ca, y1, r * sa], out
|
|
153
|
+
pushQuad(p, n, uv, [r * ca, y0, r * sa], [r * cb, y0, r * sb], [r * cb, y1, r * sb], [r * ca, y1, r * sa], out, [
|
|
154
|
+
[ringU[i], y0],
|
|
155
|
+
[ringU[i + 1], y0],
|
|
156
|
+
[ringU[i + 1], y1],
|
|
157
|
+
[ringU[i], y1],
|
|
158
|
+
]);
|
|
148
159
|
}
|
|
149
160
|
}
|
|
150
161
|
function disc(p, n, uv, r, y, hint, segs = 32) {
|
|
@@ -152,7 +163,13 @@ function disc(p, n, uv, r, y, hint, segs = 32) {
|
|
|
152
163
|
for (let i = 0; i < segs; i++) {
|
|
153
164
|
const a = (i / segs) * Math.PI * 2;
|
|
154
165
|
const b = ((i + 1) / segs) * Math.PI * 2;
|
|
155
|
-
|
|
166
|
+
const edgeA = polar(a, r, y);
|
|
167
|
+
const edgeB = polar(b, r, y);
|
|
168
|
+
pushTri(p, n, uv, center, edgeA, edgeB, hint, [
|
|
169
|
+
[center.x, center.z],
|
|
170
|
+
[edgeA.x, edgeA.z],
|
|
171
|
+
[edgeB.x, edgeB.z],
|
|
172
|
+
]);
|
|
156
173
|
}
|
|
157
174
|
}
|
|
158
175
|
// Half-ellipsoid cap: base radius `rb` at `y0`, apex `hd` above it.
|
|
@@ -170,6 +187,14 @@ function dome(p, n, uv, rb, y0, hd, lat, lng) {
|
|
|
170
187
|
grid.push(row);
|
|
171
188
|
}
|
|
172
189
|
const center = new THREE.Vector3(0, y0, 0);
|
|
190
|
+
const ringU = grid.map((row) => cumulativeProfileDistances(row.map((point) => [point.x, point.y, point.z])));
|
|
191
|
+
const ringV = [0];
|
|
192
|
+
for (let i = 1; i <= lat; i++) {
|
|
193
|
+
let distance = 0;
|
|
194
|
+
for (let j = 0; j <= lng; j++)
|
|
195
|
+
distance += grid[i - 1][j].distanceTo(grid[i][j]);
|
|
196
|
+
ringV.push(ringV[i - 1] + distance / (lng + 1));
|
|
197
|
+
}
|
|
173
198
|
for (let i = 0; i < lat; i++) {
|
|
174
199
|
for (let j = 0; j < lng; j++) {
|
|
175
200
|
const a = grid[i][j];
|
|
@@ -178,7 +203,12 @@ function dome(p, n, uv, rb, y0, hd, lat, lng) {
|
|
|
178
203
|
const d = grid[i + 1][j];
|
|
179
204
|
const mid = new THREE.Vector3().add(a).add(b).add(c).add(d).multiplyScalar(0.25);
|
|
180
205
|
const hint = mid.clone().sub(center).normalize();
|
|
181
|
-
pushQuad(p, n, uv, a, b, c, d, [hint.x, hint.y, hint.z]
|
|
206
|
+
pushQuad(p, n, uv, a, b, c, d, [hint.x, hint.y, hint.z], [
|
|
207
|
+
[ringU[i][j], ringV[i]],
|
|
208
|
+
[ringU[i][j + 1], ringV[i]],
|
|
209
|
+
[ringU[i + 1][j + 1], ringV[i + 1]],
|
|
210
|
+
[ringU[i + 1][j], ringV[i + 1]],
|
|
211
|
+
]);
|
|
182
212
|
}
|
|
183
213
|
}
|
|
184
214
|
}
|
|
@@ -203,7 +233,7 @@ function v(point) {
|
|
|
203
233
|
// always visible from the intended side under a FrontSide material — no
|
|
204
234
|
// hand-traced winding to get wrong. UVs are dimension-based so painted
|
|
205
235
|
// presets tile at a consistent world density across the body and vanes.
|
|
206
|
-
function pushQuad(positions, normals, uvs, ap, bp, cp, dp, hint) {
|
|
236
|
+
function pushQuad(positions, normals, uvs, ap, bp, cp, dp, hint, authoredUvs) {
|
|
207
237
|
const a = v(ap);
|
|
208
238
|
const b = v(bp);
|
|
209
239
|
const c = v(cp);
|
|
@@ -222,32 +252,26 @@ function pushQuad(positions, normals, uvs, ap, bp, cp, dp, hint) {
|
|
|
222
252
|
nx /= len;
|
|
223
253
|
ny /= len;
|
|
224
254
|
nz /= len;
|
|
225
|
-
const
|
|
226
|
-
const
|
|
227
|
-
const abz = b[2] - a[2];
|
|
228
|
-
const adx = d[0] - a[0];
|
|
229
|
-
const ady = d[1] - a[1];
|
|
230
|
-
const adz = d[2] - a[2];
|
|
231
|
-
const u = Math.sqrt(abx * abx + aby * aby + abz * abz);
|
|
232
|
-
const vv = Math.sqrt(adx * adx + ady * ady + adz * adz);
|
|
255
|
+
const faceUvs = authoredUvs ?? planarMetricUvs([a, b, c, d], [nx, ny, nz]);
|
|
256
|
+
const [uvA, uvB, uvC, uvD] = faceUvs;
|
|
233
257
|
if (flip) {
|
|
234
258
|
// Reversed winding: (a,b,c) + (a,c,d).
|
|
235
259
|
positions.push(a[0], a[1], a[2], b[0], b[1], b[2], c[0], c[1], c[2]);
|
|
236
|
-
uvs.push(
|
|
260
|
+
uvs.push(...uvA, ...uvB, ...uvC);
|
|
237
261
|
positions.push(a[0], a[1], a[2], c[0], c[1], c[2], d[0], d[1], d[2]);
|
|
238
|
-
uvs.push(
|
|
262
|
+
uvs.push(...uvA, ...uvC, ...uvD);
|
|
239
263
|
}
|
|
240
264
|
else {
|
|
241
265
|
// Default winding: (a,c,b) + (a,d,c).
|
|
242
266
|
positions.push(a[0], a[1], a[2], c[0], c[1], c[2], b[0], b[1], b[2]);
|
|
243
|
-
uvs.push(
|
|
267
|
+
uvs.push(...uvA, ...uvC, ...uvB);
|
|
244
268
|
positions.push(a[0], a[1], a[2], d[0], d[1], d[2], c[0], c[1], c[2]);
|
|
245
|
-
uvs.push(
|
|
269
|
+
uvs.push(...uvA, ...uvD, ...uvC);
|
|
246
270
|
}
|
|
247
271
|
for (let i = 0; i < 6; i++)
|
|
248
272
|
normals.push(nx, ny, nz);
|
|
249
273
|
}
|
|
250
|
-
function pushTri(positions, normals, uvs, ap, bp, cp, hint) {
|
|
274
|
+
function pushTri(positions, normals, uvs, ap, bp, cp, hint, authoredUvs) {
|
|
251
275
|
const a = v(ap);
|
|
252
276
|
const b = v(bp);
|
|
253
277
|
const c = v(cp);
|
|
@@ -264,13 +288,18 @@ function pushTri(positions, normals, uvs, ap, bp, cp, hint) {
|
|
|
264
288
|
nx /= len;
|
|
265
289
|
ny /= len;
|
|
266
290
|
nz /= len;
|
|
291
|
+
const faceUvs = authoredUvs ?? planarMetricUvs([a, b, c], [nx, ny, nz]);
|
|
292
|
+
const uvA = faceUvs[0];
|
|
293
|
+
const uvB = faceUvs[1];
|
|
294
|
+
const uvC = faceUvs[2];
|
|
267
295
|
if (flip) {
|
|
268
296
|
positions.push(a[0], a[1], a[2], c[0], c[1], c[2], b[0], b[1], b[2]);
|
|
297
|
+
uvs.push(...uvA, ...uvC, ...uvB);
|
|
269
298
|
}
|
|
270
299
|
else {
|
|
271
300
|
positions.push(a[0], a[1], a[2], b[0], b[1], b[2], c[0], c[1], c[2]);
|
|
301
|
+
uvs.push(...uvA, ...uvB, ...uvC);
|
|
272
302
|
}
|
|
273
|
-
uvs.push(0, 0, 1, 0, 0, 1);
|
|
274
303
|
for (let i = 0; i < 3; i++)
|
|
275
304
|
normals.push(nx, ny, nz);
|
|
276
305
|
}
|
|
@@ -279,6 +308,7 @@ function toGeometry(positions, normals, uvs) {
|
|
|
279
308
|
geo.setAttribute('position', new THREE.Float32BufferAttribute(positions, 3));
|
|
280
309
|
geo.setAttribute('normal', new THREE.Float32BufferAttribute(normals, 3));
|
|
281
310
|
geo.setAttribute('uv', new THREE.Float32BufferAttribute(uvs, 2));
|
|
311
|
+
copyUvToSecondaryChannel(geo);
|
|
282
312
|
geo.computeBoundingSphere();
|
|
283
313
|
return geo;
|
|
284
314
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { TurbineVentMaterialRole } from '@pascal-app/core';
|
|
2
|
+
export declare function resolveTurbineVentMaterialRole(hitObjectName?: string): TurbineVentMaterialRole;
|
|
3
|
+
export declare const turbineVentPaint: import("@pascal-app/core").PaintCapability;
|
|
4
|
+
//# sourceMappingURL=paint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paint.d.ts","sourceRoot":"","sources":["../../src/turbine-vent/paint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA2B,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAMxF,wBAAgB,8BAA8B,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,uBAAuB,CAE9F;AAED,eAAO,MAAM,gBAAgB,4CA0B3B,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { buildSlotPreviewMaterial, createSlotPaintCapability } from '../shared/slot-paint';
|
|
2
|
+
export function resolveTurbineVentMaterialRole(hitObjectName) {
|
|
3
|
+
return hitObjectName === 'turbine-vent-head' ? 'head' : 'base';
|
|
4
|
+
}
|
|
5
|
+
export const turbineVentPaint = createSlotPaintCapability({
|
|
6
|
+
materialTarget: 'turbine-vent',
|
|
7
|
+
resolveRole: ({ hitObjectName }) => resolveTurbineVentMaterialRole(hitObjectName),
|
|
8
|
+
applyPreview: ({ role, material, materialPreset, root }) => {
|
|
9
|
+
const preview = buildSlotPreviewMaterial(material, materialPreset);
|
|
10
|
+
if (!preview)
|
|
11
|
+
return null;
|
|
12
|
+
const targetName = `turbine-vent-${role}`;
|
|
13
|
+
const restores = [];
|
|
14
|
+
root.traverse((object) => {
|
|
15
|
+
const mesh = object;
|
|
16
|
+
if (!mesh.isMesh || mesh.name !== targetName)
|
|
17
|
+
return;
|
|
18
|
+
const previous = mesh.material;
|
|
19
|
+
mesh.material = preview;
|
|
20
|
+
restores.push(() => {
|
|
21
|
+
mesh.material = previous;
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
if (restores.length === 0)
|
|
25
|
+
return null;
|
|
26
|
+
return () => {
|
|
27
|
+
for (let index = restores.length - 1; index >= 0; index -= 1)
|
|
28
|
+
restores[index]?.();
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
legacyEffective: (node) => {
|
|
32
|
+
const legacy = node;
|
|
33
|
+
return { material: legacy.material, materialPreset: legacy.materialPreset };
|
|
34
|
+
},
|
|
35
|
+
});
|
|
@@ -123,5 +123,5 @@ export default function TurbineVentPanel() {
|
|
|
123
123
|
return (_jsxs(PanelWrapper, { icon: "/icons/roof.webp", onBack: node.roofSegmentId ? handleBack : undefined, onClose: handleClose, title: node.name || 'Turbine Vent', width: 300, children: [_jsx(PanelSection, { title: "Style", children: _jsx(SegmentedControl, { onChange: (v) => handleUpdate({ style: v }), options: [
|
|
124
124
|
{ label: 'Globe', value: 'globe' },
|
|
125
125
|
{ label: 'Cylinder', value: 'cylinder' },
|
|
126
|
-
], value: node.style ?? 'globe' }) }), _jsxs(PanelSection, { title: "Dimensions", children: [_jsx(SliderControl, { label: "Diameter", max:
|
|
126
|
+
], value: node.style ?? 'globe' }) }), _jsxs(PanelSection, { title: "Dimensions", children: [_jsx(SliderControl, { label: "Diameter", max: 1000, min: 0.15, onChange: (v) => previewProp({ diameter: v }), onCommit: (v) => handleUpdate({ diameter: v }), precision: 2, restoreOnCommit: false, step: 0.01, unit: "m", value: node.diameter }), _jsx(SliderControl, { label: "Height", max: 1000, min: 0.2, onChange: (v) => previewProp({ height: v }), onCommit: (v) => handleUpdate({ height: v }), precision: 2, restoreOnCommit: false, step: 0.01, unit: "m", value: node.height }), _jsx(SliderControl, { label: "Neck Height", max: Math.max(0.04, node.height * 0.5), min: 0.02, onChange: (v) => previewProp({ neckHeight: v }), onCommit: (v) => handleUpdate({ neckHeight: v }), precision: 2, restoreOnCommit: false, step: 0.01, unit: "m", value: node.neckHeight ?? 0.09 }), _jsx(SliderControl, { label: "Vanes", max: 36, min: 6, onChange: (v) => previewProp({ vaneCount: Math.round(v) }), onCommit: (v) => handleUpdate({ vaneCount: Math.round(v) }), precision: 0, restoreOnCommit: false, step: 1, unit: "", value: Math.round(node.vaneCount ?? 20) })] }), _jsxs(PanelSection, { title: "Motion", children: [_jsx(ActionGroup, { children: _jsx(ActionButton, { icon: isSpinning ? _jsx(Pause, { className: "h-3.5 w-3.5" }) : _jsx(Play, { className: "h-3.5 w-3.5" }), label: isSpinning ? 'Pause' : 'Play', onClick: handleToggleSpin }) }), _jsx(SliderControl, { label: "Spin Speed", max: 4, min: 0, onChange: (v) => previewProp({ spinSpeed: v }), onCommit: (v) => handleUpdate({ spinSpeed: v }), precision: 1, restoreOnCommit: false, step: 0.1, unit: "rad/s", value: Math.round((node.spinSpeed ?? 0) * 10) / 10 })] }), _jsxs(PanelSection, { title: "Position", children: [_jsx(SliderControl, { label: "X", max: Math.round(((segment?.width ?? 10) / 2) * 100) / 100, min: -Math.round(((segment?.width ?? 10) / 2) * 100) / 100, onChange: (v) => previewProp({ position: [v, node.position[1] ?? 0, node.position[2] ?? 0] }), onCommit: (v) => handleUpdate({ position: [v, node.position[1] ?? 0, node.position[2] ?? 0] }), precision: 2, restoreOnCommit: false, step: 0.05, unit: "m", value: node.position[0] ?? 0 }), _jsx(SliderControl, { label: "Y", max: Math.max((segment?.wallHeight ?? 3) + (segment ? getActiveRoofHeight(segment) : 3) + 2, (node.position[1] ?? 0) + 0.1), min: Math.min(0, (node.position[1] ?? 0) - 0.5), onChange: (v) => previewProp({ position: [node.position[0] ?? 0, v, node.position[2] ?? 0] }), onCommit: (v) => handleUpdate({ position: [node.position[0] ?? 0, v, node.position[2] ?? 0] }), precision: 2, restoreOnCommit: false, step: 0.05, unit: "m", value: node.position[1] ?? 0 }), _jsx(SliderControl, { label: "Z", max: Math.round(((segment?.depth ?? 10) / 2) * 100) / 100, min: -Math.round(((segment?.depth ?? 10) / 2) * 100) / 100, onChange: (v) => previewProp({ position: [node.position[0] ?? 0, node.position[1] ?? 0, v] }), onCommit: (v) => handleUpdate({ position: [node.position[0] ?? 0, node.position[1] ?? 0, v] }), precision: 2, restoreOnCommit: false, step: 0.05, unit: "m", value: node.position[2] ?? 0 }), _jsx(SliderControl, { label: "Rotation", max: 180, min: -180, onChange: (deg) => previewProp({ rotation: (deg * Math.PI) / 180 }), onCommit: (deg) => handleUpdate({ rotation: (deg * Math.PI) / 180 }), precision: 0, restoreOnCommit: false, step: 1, unit: "\u00B0", value: Math.round(((node.rotation ?? 0) * 180) / Math.PI) })] }), _jsx(PanelSection, { title: "Actions", children: _jsxs(ActionGroup, { children: [_jsx(ActionButton, { icon: _jsx(Move, { className: "h-3.5 w-3.5" }), label: "Move", onClick: handleMove }), _jsx(ActionButton, { icon: _jsx(Copy, { className: "h-3.5 w-3.5" }), label: "Duplicate", onClick: handleDuplicate }), _jsx(ActionButton, { className: "hover:bg-red-500/20", icon: _jsx(Trash2, { className: "h-3.5 w-3.5 text-red-400" }), label: "Delete", onClick: handleDelete })] }) })] }));
|
|
127
127
|
}
|
|
@@ -20,8 +20,8 @@ export const turbineVentParametrics = {
|
|
|
20
20
|
{
|
|
21
21
|
label: 'Dimensions',
|
|
22
22
|
fields: [
|
|
23
|
-
{ key: 'diameter', kind: 'number', unit: 'm', min: 0.15, max:
|
|
24
|
-
{ key: 'height', kind: 'number', unit: 'm', min: 0.2, max:
|
|
23
|
+
{ key: 'diameter', kind: 'number', unit: 'm', min: 0.15, max: 1000, step: 0.01 },
|
|
24
|
+
{ key: 'height', kind: 'number', unit: 'm', min: 0.2, max: 1000, step: 0.01 },
|
|
25
25
|
{ key: 'neckHeight', kind: 'number', unit: 'm', min: 0.02, max: 0.3, step: 0.01 },
|
|
26
26
|
{ key: 'vaneCount', kind: 'number', unit: '', min: 6, max: 36, step: 1 },
|
|
27
27
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/turbine-vent/renderer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,eAAe,EAIrB,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/turbine-vent/renderer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,eAAe,EAIrB,MAAM,kBAAkB,CAAA;AAuBzB;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,mBAAmB,GAAI,qBAAqB;IAAE,IAAI,EAAE,eAAe,CAAA;CAAE,uCA+J1E,CAAA;AAED,eAAe,mBAAmB,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useLiveNodeOverrides, useRegistry, useScene, } from '@pascal-app/core';
|
|
4
|
-
import { createMaterial, createMaterialFromPresetRef, createSurfaceRoleMaterial, useNodeEvents, useViewer, } from '@pascal-app/viewer';
|
|
4
|
+
import { createMaterial, createMaterialFromPresetRef, createSurfaceRoleMaterial, resolveMaterialRef, useNodeEvents, useViewer, } from '@pascal-app/viewer';
|
|
5
5
|
import { useFrame } from '@react-three/fiber';
|
|
6
6
|
import { useEffect, useMemo, useRef } from 'react';
|
|
7
7
|
import * as THREE from 'three';
|
|
@@ -34,6 +34,7 @@ const TurbineVentRenderer = ({ node: storeNode }) => {
|
|
|
34
34
|
const textures = useViewer((s) => s.textures);
|
|
35
35
|
const colorPreset = useViewer((s) => s.colorPreset);
|
|
36
36
|
const sceneTheme = useViewer((s) => s.sceneTheme);
|
|
37
|
+
const sceneMaterials = useScene((s) => s.materials);
|
|
37
38
|
// Merge live overrides (panel slider drags) on top of the store node so
|
|
38
39
|
// the mesh updates frame-by-frame without polluting undo history.
|
|
39
40
|
const overrides = useLiveNodeOverrides((s) => s.get(storeNode.id));
|
|
@@ -68,13 +69,34 @@ const TurbineVentRenderer = ({ node: storeNode }) => {
|
|
|
68
69
|
return surfaceQuatFromNormal(normal, new THREE.Quaternion());
|
|
69
70
|
}, [segment, node.position[0], node.position[2]]);
|
|
70
71
|
const material = useMemo(() => {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
72
|
+
const roleDefault = createSurfaceRoleMaterial('roof', colorPreset, THREE.FrontSide, sceneTheme);
|
|
73
|
+
const resolve = (role) => {
|
|
74
|
+
if (!textures)
|
|
75
|
+
return roleDefault;
|
|
76
|
+
const slotMaterial = resolveMaterialRef(node.slots?.[role], sceneMaterials, shading);
|
|
77
|
+
if (slotMaterial)
|
|
78
|
+
return slotMaterial;
|
|
79
|
+
if (node.material)
|
|
80
|
+
return createMaterial(node.material, shading);
|
|
81
|
+
if (node.materialPreset) {
|
|
82
|
+
return createMaterialFromPresetRef(node.materialPreset, shading) ?? defaultMaterial;
|
|
83
|
+
}
|
|
84
|
+
return roleDefault;
|
|
85
|
+
};
|
|
86
|
+
return {
|
|
87
|
+
base: resolve('base'),
|
|
88
|
+
head: resolve('head'),
|
|
89
|
+
};
|
|
90
|
+
}, [
|
|
91
|
+
textures,
|
|
92
|
+
colorPreset,
|
|
93
|
+
sceneTheme,
|
|
94
|
+
shading,
|
|
95
|
+
node.slots,
|
|
96
|
+
node.material,
|
|
97
|
+
node.materialPreset,
|
|
98
|
+
sceneMaterials,
|
|
99
|
+
]);
|
|
78
100
|
// Compose slope tilt + yaw onto a single quaternion so the registered
|
|
79
101
|
// ref's local frame is vent-mesh-local (handles read this frame).
|
|
80
102
|
const yAxis = useMemo(() => new THREE.Vector3(0, 1, 0), []);
|
|
@@ -102,6 +124,6 @@ const TurbineVentRenderer = ({ node: storeNode }) => {
|
|
|
102
124
|
const segPos = segment.position ?? [0, 0, 0];
|
|
103
125
|
const segRotY = segment.rotation ?? 0;
|
|
104
126
|
const neckH = Math.max(0.02, Math.min(node.neckHeight ?? 0.09, Math.max(0.12, node.height) * 0.5));
|
|
105
|
-
return (_jsx("group", { position: segPos, "rotation-y": segRotY, children: _jsxs("group", { position: [node.position[0] ?? 0, node.position[1] ?? 0, node.position[2] ?? 0], quaternion: composedQuat, ref: ref, visible: node.visible, children: [_jsx("mesh", { castShadow: true, geometry: clippedBase ?? baseGeometry, material: material, name: "turbine-vent-base", receiveShadow: true, ...handlers }), _jsx("group", { position: [0, neckH, 0], ref: headRef, children: _jsx("mesh", { castShadow: true, geometry: clippedHead ?? headGeometry, material: material, name: "turbine-vent-head", receiveShadow: true, ...handlers }) })] }) }));
|
|
127
|
+
return (_jsx("group", { position: segPos, "rotation-y": segRotY, children: _jsxs("group", { position: [node.position[0] ?? 0, node.position[1] ?? 0, node.position[2] ?? 0], quaternion: composedQuat, ref: ref, visible: node.visible, children: [_jsx("mesh", { castShadow: true, geometry: clippedBase ?? baseGeometry, material: material.base, name: "turbine-vent-base", receiveShadow: true, ...handlers }), _jsx("group", { position: [0, neckH, 0], ref: headRef, children: _jsx("mesh", { castShadow: true, geometry: clippedHead ?? headGeometry, material: material.head, name: "turbine-vent-head", receiveShadow: true, ...handlers }) })] }) }));
|
|
106
128
|
};
|
|
107
129
|
export default TurbineVentRenderer;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type NodeDefinition } from '@pascal-app/core';
|
|
2
|
+
import { UnitNode } from './schema';
|
|
3
|
+
/**
|
|
4
|
+
* Unit — a referencing overlay, not a container. It lists member zone ids
|
|
5
|
+
* and owns no geometry: member zones carry its tint, and the site panel
|
|
6
|
+
* drives selection (declaring `selectable` would subscribe the kind to 3D
|
|
7
|
+
* clicks that have nothing to hit). Not placeable: no tool, no palette tile.
|
|
8
|
+
*/
|
|
9
|
+
export declare const unitDefinition: NodeDefinition<typeof UnitNode>;
|
|
10
|
+
//# sourceMappingURL=definition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/unit/definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAA8B,MAAM,kBAAkB,CAAA;AAElF,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,cAAc,CAAC,OAAO,QAAQ,CAkC1D,CAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { UnitNode as UnitNodeSchema } from '@pascal-app/core';
|
|
2
|
+
import { unitParametrics } from './parametrics';
|
|
3
|
+
import { UnitNode } from './schema';
|
|
4
|
+
/**
|
|
5
|
+
* Unit — a referencing overlay, not a container. It lists member zone ids
|
|
6
|
+
* and owns no geometry: member zones carry its tint, and the site panel
|
|
7
|
+
* drives selection (declaring `selectable` would subscribe the kind to 3D
|
|
8
|
+
* clicks that have nothing to hit). Not placeable: no tool, no palette tile.
|
|
9
|
+
*/
|
|
10
|
+
export const unitDefinition = {
|
|
11
|
+
kind: 'unit',
|
|
12
|
+
schemaVersion: 1,
|
|
13
|
+
schema: UnitNode,
|
|
14
|
+
category: 'site',
|
|
15
|
+
defaults: () => {
|
|
16
|
+
const stub = UnitNodeSchema.parse({ id: 'unit_default', type: 'unit' });
|
|
17
|
+
const { id: _id, type: _type, ...rest } = stub;
|
|
18
|
+
return rest;
|
|
19
|
+
},
|
|
20
|
+
capabilities: {
|
|
21
|
+
duplicable: false,
|
|
22
|
+
deletable: true,
|
|
23
|
+
presettable: false,
|
|
24
|
+
},
|
|
25
|
+
parametrics: unitParametrics,
|
|
26
|
+
// No dirty consumer rebuilds this kind — see NodeDefinition.dirtyTracking.
|
|
27
|
+
dirtyTracking: false,
|
|
28
|
+
presentation: {
|
|
29
|
+
label: 'Unit',
|
|
30
|
+
description: 'A named group of zones forming one apartment, hotel room or commercial lot.',
|
|
31
|
+
icon: { kind: 'url', src: '/icons/zone.webp' },
|
|
32
|
+
paletteSection: 'site',
|
|
33
|
+
hidden: true,
|
|
34
|
+
},
|
|
35
|
+
mcp: {
|
|
36
|
+
description: 'A named occupancy unit (apartment, hotel room, commercial lot, common area) under a building, referencing member zones that may span levels.',
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/unit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { unitDefinition } from './definition';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parametrics.d.ts","sourceRoot":"","sources":["../../src/unit/parametrics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAEtE,eAAO,MAAM,eAAe,EAAE,oBAAoB,CAAC,QAAQ,CAG1D,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/unit/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { UnitNode } from '@pascal-app/core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unit-panel.d.ts","sourceRoot":"","sources":["../../src/unit/unit-panel.tsx"],"names":[],"mappings":"AAEA,OAAO,EAML,KAAK,QAAQ,EAGd,MAAM,kBAAkB,CAAA;AAgCzB,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,+BA2J7D"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { buildUnitReport, getLevelDisplayName, UNIT_KINDS, unitWarnings, useScene, } from '@pascal-app/core';
|
|
4
|
+
import { ActionButton, ActionGroup, formatAreaLabel, PanelSection, PanelWrapper, triggerSFX, } from '@pascal-app/editor';
|
|
5
|
+
import { useViewer } from '@pascal-app/viewer';
|
|
6
|
+
import { Trash2, X } from 'lucide-react';
|
|
7
|
+
import { useCallback, useMemo } from 'react';
|
|
8
|
+
import { PanelSelect, PanelTextField } from '../shared/panel-fields';
|
|
9
|
+
const UNIT_KIND_LABELS = {
|
|
10
|
+
apartment: 'Apartment',
|
|
11
|
+
'hotel-room': 'Hotel room',
|
|
12
|
+
commercial: 'Commercial',
|
|
13
|
+
common: 'Common',
|
|
14
|
+
};
|
|
15
|
+
const UNIT_KIND_OPTIONS = UNIT_KINDS.map((value) => ({ label: UNIT_KIND_LABELS[value], value }));
|
|
16
|
+
function ReportRow({ label, value }) {
|
|
17
|
+
return (_jsxs("div", { className: "flex items-baseline gap-2 rounded-md border border-border/50 bg-background/35 px-2.5 py-2 text-xs", children: [_jsx("span", { className: "text-muted-foreground", children: label }), _jsx("span", { className: "ml-auto font-mono font-medium text-foreground tabular-nums", children: value })] }));
|
|
18
|
+
}
|
|
19
|
+
export default function UnitPanel({ node }) {
|
|
20
|
+
const nodes = useScene((state) => state.nodes);
|
|
21
|
+
const updateNode = useScene((state) => state.updateNode);
|
|
22
|
+
const setSelection = useViewer((state) => state.setSelection);
|
|
23
|
+
const areaUnit = useViewer((state) => state.unit);
|
|
24
|
+
const focusedUnitId = useViewer((state) => state.focusedUnitId);
|
|
25
|
+
const report = useMemo(() => buildUnitReport(node, nodes), [node, nodes]);
|
|
26
|
+
const warnings = useMemo(() => unitWarnings(node, nodes), [node, nodes]);
|
|
27
|
+
const memberLevels = useMemo(() => {
|
|
28
|
+
const ordinals = new Map();
|
|
29
|
+
for (const member of report.members) {
|
|
30
|
+
if (member.levelId && member.levelOrdinal !== null) {
|
|
31
|
+
ordinals.set(member.levelId, member.levelOrdinal);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return [...ordinals.entries()]
|
|
35
|
+
.sort((a, b) => a[1] - b[1])
|
|
36
|
+
.map(([levelId]) => {
|
|
37
|
+
const level = nodes[levelId];
|
|
38
|
+
return { levelId, name: level?.type === 'level' ? getLevelDisplayName(level) : '' };
|
|
39
|
+
});
|
|
40
|
+
}, [nodes, report]);
|
|
41
|
+
const levelNameById = useMemo(() => new Map(memberLevels.map((level) => [level.levelId, level.name])), [memberLevels]);
|
|
42
|
+
const levelSpanLabel = useMemo(() => {
|
|
43
|
+
const names = memberLevels.map((level) => level.name).filter(Boolean);
|
|
44
|
+
return names.length > 0 ? names.join(', ') : '—';
|
|
45
|
+
}, [memberLevels]);
|
|
46
|
+
const update = useCallback((patch) => updateNode(node.id, patch), [node.id, updateNode]);
|
|
47
|
+
const removeMember = useCallback((zoneId) => update({ members: node.members.filter((id) => id !== zoneId) }), [node.members, update]);
|
|
48
|
+
const handleClose = useCallback(() => setSelection({ selectedIds: [] }), [setSelection]);
|
|
49
|
+
const handleDelete = useCallback(() => {
|
|
50
|
+
triggerSFX('sfx:structure-delete');
|
|
51
|
+
useScene.getState().deleteNode(node.id);
|
|
52
|
+
setSelection({ selectedIds: [] });
|
|
53
|
+
}, [node.id, setSelection]);
|
|
54
|
+
const warningMessages = warnings.map((warning) => {
|
|
55
|
+
if (warning.code === 'non-adjacent-levels') {
|
|
56
|
+
return 'Members sit on levels that are not adjacent.';
|
|
57
|
+
}
|
|
58
|
+
return 'No zones assigned yet.';
|
|
59
|
+
});
|
|
60
|
+
return (_jsxs(PanelWrapper, { icon: "/icons/zone.webp", onClose: handleClose, title: node.name || 'Unit', width: 320, children: [_jsxs(PanelSection, { title: "Unit", children: [_jsx(PanelTextField, { label: "Name", onCommit: (name) => update({ name }), value: node.name }), _jsx(PanelSelect, { label: "Kind", onChange: (kind) => update({ kind: kind }), options: UNIT_KIND_OPTIONS, value: node.kind }), _jsxs("label", { className: "flex h-10 items-center justify-between gap-3 rounded-lg border border-border/50 bg-[#2C2C2E] px-3 text-sm", children: [_jsx("span", { className: "text-muted-foreground", children: "Color" }), _jsxs("span", { className: "flex items-center gap-2", children: [_jsx("span", { className: "font-mono text-muted-foreground text-xs", children: node.color }), _jsx("input", { className: "h-6 w-8 cursor-pointer rounded border border-border/50 bg-transparent", onChange: (event) => update({ color: event.target.value }), type: "color", value: node.color })] })] })] }), _jsxs(PanelSection, { title: "Members", children: [report.members.length === 0 ? (_jsx("p", { className: "text-muted-foreground text-xs leading-snug", children: "No zones yet. Draw zones while this unit is focused, or pick it from a zone's inspector." })) : (report.members.map((member) => (_jsxs("div", { className: "flex h-9 items-center gap-2 rounded-lg border border-border/50 bg-[#2C2C2E] px-3 text-xs", children: [_jsx("span", { className: "min-w-0 flex-1 truncate text-foreground", children: member.name || 'Zone' }), _jsx("span", { className: "shrink-0 truncate text-muted-foreground", children: member.levelId ? levelNameById.get(member.levelId) : '' }), _jsx("span", { className: "shrink-0 font-mono text-muted-foreground tabular-nums", children: formatAreaLabel(member.areaM2, areaUnit, 1) }), _jsx("button", { "aria-label": `Remove ${member.name || 'zone'} from unit`, className: "shrink-0 rounded-full p-1 text-muted-foreground transition-colors hover:bg-[#3e3e3e] hover:text-foreground", onClick: () => removeMember(member.zoneId), type: "button", children: _jsx(X, { className: "h-3.5 w-3.5" }) })] }, member.zoneId)))), warningMessages.length > 0 ? (_jsx("ul", { className: "flex flex-col gap-1 text-amber-300 text-xs leading-snug", children: warningMessages.map((message, index) => (_jsx("li", { children: message }, warnings[index]?.code))) })) : null] }), _jsxs(PanelSection, { title: "Report", children: [_jsx(ReportRow, { label: "Members", value: String(report.memberCount) }), _jsx(ReportRow, { label: "Levels", value: levelSpanLabel }), _jsx(ReportRow, { label: "Gross area", value: formatAreaLabel(report.grossAreaM2, areaUnit, 2) })] }), _jsx(PanelSection, { title: "Actions", children: _jsxs(ActionGroup, { children: [focusedUnitId !== node.id && (_jsx(ActionButton, { className: "rounded-full", label: "Focus", onClick: () => useViewer.getState().setFocusedUnit(node.id) })), _jsx(ActionButton, { className: "text-destructive hover:text-destructive", icon: _jsx(Trash2, { className: "h-3.5 w-3.5" }), label: "Delete", onClick: handleDelete })] }) })] }));
|
|
61
|
+
}
|