@pascal-app/nodes 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/block/definition.d.ts.map +1 -1
- package/dist/block/definition.js +18 -3
- package/dist/block/floorplan.d.ts +11 -1
- package/dist/block/floorplan.d.ts.map +1 -1
- package/dist/block/floorplan.js +81 -13
- package/dist/block/geometry.d.ts +2 -2
- package/dist/block/geometry.d.ts.map +1 -1
- package/dist/block/geometry.js +39 -24
- package/dist/block/hosted-edit.d.ts.map +1 -1
- package/dist/block/hosted-edit.js +25 -0
- package/dist/block/material-slots.d.ts +1 -3
- package/dist/block/material-slots.d.ts.map +1 -1
- package/dist/block/material-slots.js +1 -11
- package/dist/block/paint.d.ts.map +1 -1
- package/dist/block/paint.js +4 -10
- package/dist/block/panel.d.ts.map +1 -1
- package/dist/block/panel.js +8 -3
- package/dist/block/selection.d.ts.map +1 -1
- package/dist/block/selection.js +2 -2
- package/dist/box-vent/definition.d.ts.map +1 -1
- package/dist/box-vent/definition.js +2 -5
- package/dist/box-vent/panel.d.ts.map +1 -1
- package/dist/box-vent/panel.js +5 -28
- package/dist/cabinet/countertop-layout.d.ts +13 -2
- package/dist/cabinet/countertop-layout.d.ts.map +1 -1
- package/dist/cabinet/definition.d.ts.map +1 -1
- package/dist/cabinet/definition.js +1 -2
- package/dist/cabinet/floorplan.d.ts.map +1 -1
- package/dist/cabinet/floorplan.js +125 -28
- package/dist/cabinet/geometry/shared.d.ts +1 -2
- package/dist/cabinet/geometry/shared.d.ts.map +1 -1
- package/dist/cabinet/geometry/shared.js +1 -2
- package/dist/cabinet/run-layout.d.ts.map +1 -1
- package/dist/cabinet/run-layout.js +8 -5
- package/dist/cabinet/run-ops.d.ts +13 -2
- package/dist/cabinet/run-ops.d.ts.map +1 -1
- package/dist/cabinet/tool.d.ts.map +1 -1
- package/dist/cabinet/tool.js +22 -24
- package/dist/cabinet/wall-snap.d.ts.map +1 -1
- package/dist/cabinet/wall-snap.js +8 -8
- package/dist/ceiling/boundary-editor.d.ts.map +1 -1
- package/dist/ceiling/boundary-editor.js +5 -3
- package/dist/ceiling/definition.d.ts +4 -4
- package/dist/ceiling/definition.d.ts.map +1 -1
- package/dist/ceiling/definition.js +15 -15
- package/dist/ceiling/floorplan-affordances.d.ts +84 -4
- package/dist/ceiling/floorplan-affordances.d.ts.map +1 -1
- package/dist/ceiling/floorplan-affordances.js +0 -1
- package/dist/ceiling/floorplan-move.d.ts.map +1 -1
- package/dist/ceiling/floorplan-move.js +0 -1
- package/dist/ceiling/floorplan.d.ts +1 -1
- package/dist/ceiling/floorplan.d.ts.map +1 -1
- package/dist/ceiling/floorplan.js +2 -1
- package/dist/ceiling/height-bounds.d.ts +19 -0
- package/dist/ceiling/height-bounds.d.ts.map +1 -0
- package/dist/ceiling/height-bounds.js +24 -0
- package/dist/ceiling/hole-editor.d.ts.map +1 -1
- package/dist/ceiling/hole-editor.js +3 -4
- package/dist/ceiling/materials.d.ts +1 -1
- package/dist/ceiling/materials.d.ts.map +1 -1
- package/dist/ceiling/materials.js +10 -3
- package/dist/ceiling/paint.d.ts +2 -8
- package/dist/ceiling/paint.d.ts.map +1 -1
- package/dist/ceiling/paint.js +121 -24
- package/dist/ceiling/panel.d.ts.map +1 -1
- package/dist/ceiling/panel.js +40 -23
- package/dist/ceiling/renderer.d.ts.map +1 -1
- package/dist/ceiling/renderer.js +41 -5
- package/dist/chimney/move-tool.d.ts.map +1 -1
- package/dist/chimney/move-tool.js +8 -2
- package/dist/chimney/paint.d.ts.map +1 -1
- package/dist/chimney/paint.js +3 -10
- package/dist/column/definition.d.ts.map +1 -1
- package/dist/column/definition.js +24 -2
- package/dist/column/floorplan-affordances.d.ts.map +1 -1
- package/dist/column/floorplan-affordances.js +5 -0
- package/dist/column/floorplan.d.ts +1 -1
- package/dist/column/floorplan.d.ts.map +1 -1
- package/dist/column/floorplan.js +47 -2
- package/dist/column/hosted-resize.d.ts +101 -2
- package/dist/column/hosted-resize.d.ts.map +1 -1
- package/dist/column/panel.d.ts.map +1 -1
- package/dist/column/panel.js +147 -146
- package/dist/column/renderer.d.ts.map +1 -1
- package/dist/column/renderer.js +6 -4
- package/dist/column/surface.d.ts.map +1 -1
- package/dist/column/surface.js +7 -0
- package/dist/construction-dimension/floorplan.js +7 -3
- package/dist/cupola/definition.d.ts.map +1 -1
- package/dist/cupola/definition.js +2 -8
- package/dist/cupola/panel.d.ts.map +1 -1
- package/dist/cupola/panel.js +5 -23
- package/dist/door/definition.d.ts.map +1 -1
- package/dist/door/definition.js +12 -3
- package/dist/door/door-math.d.ts +5 -10
- package/dist/door/door-math.d.ts.map +1 -1
- package/dist/door/door-math.js +14 -15
- package/dist/door/floorplan-move.d.ts.map +1 -1
- package/dist/door/floorplan-move.js +3 -1
- package/dist/door/floorplan.d.ts.map +1 -1
- package/dist/door/floorplan.js +55 -21
- package/dist/door/mechanism.d.ts +4 -0
- package/dist/door/mechanism.d.ts.map +1 -0
- package/dist/door/mechanism.js +24 -0
- package/dist/door/move-tool.d.ts.map +1 -1
- package/dist/door/move-tool.js +72 -48
- package/dist/door/paint.d.ts.map +1 -1
- package/dist/door/paint.js +3 -0
- package/dist/door/panel.d.ts.map +1 -1
- package/dist/door/panel.js +34 -259
- package/dist/door/placement.d.ts +45 -0
- package/dist/door/placement.d.ts.map +1 -0
- package/dist/door/placement.js +51 -0
- package/dist/door/preview.d.ts.map +1 -1
- package/dist/door/preview.js +2 -0
- package/dist/door/renderer.d.ts.map +1 -1
- package/dist/door/renderer.js +3 -2
- package/dist/door/tool.d.ts.map +1 -1
- package/dist/door/tool.js +92 -21
- package/dist/dormer/csg-geometry.d.ts.map +1 -1
- package/dist/dormer/csg-geometry.js +2 -0
- package/dist/dormer/paint.d.ts.map +1 -1
- package/dist/dormer/paint.js +2 -5
- package/dist/dormer/panel.d.ts.map +1 -1
- package/dist/dormer/panel.js +4 -14
- package/dist/downspout/definition.d.ts.map +1 -1
- package/dist/downspout/definition.js +2 -2
- package/dist/duct-fitting/definition.d.ts.map +1 -1
- package/dist/duct-fitting/definition.js +2 -1
- package/dist/duct-fitting/geometry.d.ts.map +1 -1
- package/dist/duct-fitting/geometry.js +1 -1
- package/dist/duct-fitting/move-tool.d.ts.map +1 -1
- package/dist/duct-fitting/move-tool.js +8 -2
- package/dist/duct-segment/definition.d.ts.map +1 -1
- package/dist/duct-segment/definition.js +2 -2
- package/dist/duct-segment/geometry.d.ts.map +1 -1
- package/dist/duct-segment/geometry.js +1 -1
- package/dist/duct-segment/move-tool.d.ts.map +1 -1
- package/dist/duct-segment/move-tool.js +8 -2
- package/dist/elevator/definition.d.ts.map +1 -1
- package/dist/elevator/definition.js +1 -2
- package/dist/elevator/panel.d.ts.map +1 -1
- package/dist/elevator/panel.js +5 -27
- package/dist/elevator/parametrics.js +1 -1
- package/dist/elevator/renderer.d.ts.map +1 -1
- package/dist/elevator/renderer.js +3 -4
- package/dist/eyebrow-vent/definition.d.ts.map +1 -1
- package/dist/eyebrow-vent/definition.js +2 -5
- package/dist/eyebrow-vent/paint.d.ts.map +1 -1
- package/dist/eyebrow-vent/paint.js +3 -6
- package/dist/eyebrow-vent/panel.d.ts.map +1 -1
- package/dist/eyebrow-vent/panel.js +5 -23
- package/dist/fence/actions/move-endpoint.d.ts +1 -1
- package/dist/fence/actions/move-endpoint.d.ts.map +1 -1
- package/dist/fence/actions/move-endpoint.js +2 -1
- package/dist/fence/definition.d.ts +2 -1
- package/dist/fence/definition.d.ts.map +1 -1
- package/dist/fence/definition.js +83 -28
- package/dist/fence/drafting.d.ts +36 -0
- package/dist/fence/drafting.d.ts.map +1 -0
- package/dist/fence/drafting.js +210 -0
- package/dist/fence/feature-tool.d.ts +4 -0
- package/dist/fence/feature-tool.d.ts.map +1 -0
- package/dist/fence/feature-tool.js +140 -0
- package/dist/fence/features.d.ts +2 -0
- package/dist/fence/features.d.ts.map +1 -0
- package/dist/fence/features.js +12 -0
- package/dist/fence/floorplan-affordances.d.ts.map +1 -1
- package/dist/fence/floorplan-affordances.js +2 -1
- package/dist/fence/floorplan.d.ts +2 -3
- package/dist/fence/floorplan.d.ts.map +1 -1
- package/dist/fence/floorplan.js +131 -71
- package/dist/fence/geometry-parts.d.ts +50 -0
- package/dist/fence/geometry-parts.d.ts.map +1 -0
- package/dist/fence/geometry-parts.js +1144 -0
- package/dist/fence/geometry.d.ts +2 -3
- package/dist/fence/geometry.d.ts.map +1 -1
- package/dist/fence/geometry.js +84 -7
- package/dist/fence/index.d.ts +1 -0
- package/dist/fence/index.d.ts.map +1 -1
- package/dist/fence/index.js +1 -0
- package/dist/fence/inspector-editors.d.ts +15 -0
- package/dist/fence/inspector-editors.d.ts.map +1 -1
- package/dist/fence/inspector-editors.js +128 -3
- package/dist/fence/lift.d.ts.map +1 -1
- package/dist/fence/lift.js +5 -2
- package/dist/fence/move-tool.js +2 -1
- package/dist/fence/panel-model.d.ts +4 -0
- package/dist/fence/panel-model.d.ts.map +1 -0
- package/dist/fence/panel-model.js +12 -0
- package/dist/fence/parametrics.d.ts +0 -12
- package/dist/fence/parametrics.d.ts.map +1 -1
- package/dist/fence/parametrics.js +185 -18
- package/dist/fence/system.d.ts.map +1 -1
- package/dist/fence/system.js +141 -31
- package/dist/fence/tool.d.ts.map +1 -1
- package/dist/fence/tool.js +256 -47
- package/dist/fence-feature/actions.d.ts +7 -0
- package/dist/fence-feature/actions.d.ts.map +1 -0
- package/dist/fence-feature/actions.js +26 -0
- package/dist/fence-feature/definition.d.ts +4 -0
- package/dist/fence-feature/definition.d.ts.map +1 -0
- package/dist/fence-feature/definition.js +112 -0
- package/dist/fence-feature/floorplan-affordances.d.ts +3 -0
- package/dist/fence-feature/floorplan-affordances.d.ts.map +1 -0
- package/dist/fence-feature/floorplan-affordances.js +37 -0
- package/dist/fence-feature/floorplan.d.ts +4 -0
- package/dist/fence-feature/floorplan.d.ts.map +1 -0
- package/dist/fence-feature/floorplan.js +120 -0
- package/dist/fence-feature/geometry.d.ts +5 -0
- package/dist/fence-feature/geometry.d.ts.map +1 -0
- package/dist/fence-feature/geometry.js +43 -0
- package/dist/fence-feature/handles.d.ts +5 -0
- package/dist/fence-feature/handles.d.ts.map +1 -0
- package/dist/fence-feature/handles.js +84 -0
- package/dist/fence-feature/inspector.d.ts +6 -0
- package/dist/fence-feature/inspector.d.ts.map +1 -0
- package/dist/fence-feature/inspector.js +214 -0
- package/dist/fence-feature/interaction.d.ts +3 -0
- package/dist/fence-feature/interaction.d.ts.map +1 -0
- package/dist/fence-feature/interaction.js +41 -0
- package/dist/fence-feature/move-session.d.ts +9 -0
- package/dist/fence-feature/move-session.d.ts.map +1 -0
- package/dist/fence-feature/move-session.js +48 -0
- package/dist/fence-feature/move-tool.d.ts +5 -0
- package/dist/fence-feature/move-tool.d.ts.map +1 -0
- package/dist/fence-feature/move-tool.js +58 -0
- package/dist/fence-feature/pick-target.d.ts +7 -0
- package/dist/fence-feature/pick-target.d.ts.map +1 -0
- package/dist/fence-feature/pick-target.js +52 -0
- package/dist/floor-opening/definition.d.ts +3 -0
- package/dist/floor-opening/definition.d.ts.map +1 -0
- package/dist/floor-opening/definition.js +41 -0
- package/dist/floor-opening/floorplan.d.ts +156 -0
- package/dist/floor-opening/floorplan.d.ts.map +1 -0
- package/dist/floor-opening/floorplan.js +63 -0
- package/dist/gutter/definition.d.ts.map +1 -1
- package/dist/gutter/definition.js +2 -2
- package/dist/imported-mesh/definition.d.ts.map +1 -1
- package/dist/imported-mesh/definition.js +2 -0
- package/dist/imported-mesh/geometry.d.ts +1 -1
- package/dist/imported-mesh/geometry.d.ts.map +1 -1
- package/dist/imported-mesh/geometry.js +40 -12
- package/dist/index.d.ts +13 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -2
- package/dist/item/authored-face-host.d.ts +10 -0
- package/dist/item/authored-face-host.d.ts.map +1 -0
- package/dist/item/authored-face-host.js +87 -0
- package/dist/item/authored-params.d.ts +15 -0
- package/dist/item/authored-params.d.ts.map +1 -0
- package/dist/item/authored-params.js +72 -0
- package/dist/item/definition.d.ts +2 -2
- package/dist/item/definition.d.ts.map +1 -1
- package/dist/item/definition.js +33 -4
- package/dist/item/floorplan.d.ts +1 -1
- package/dist/item/floorplan.d.ts.map +1 -1
- package/dist/item/floorplan.js +35 -5
- package/dist/item/index.d.ts +1 -0
- package/dist/item/index.d.ts.map +1 -1
- package/dist/item/index.js +1 -0
- package/dist/item/model-loader.d.ts +2 -0
- package/dist/item/model-loader.d.ts.map +1 -1
- package/dist/item/model-loader.js +55 -23
- package/dist/item/move-tool.js +4 -4
- package/dist/item/paint.d.ts.map +1 -1
- package/dist/item/paint.js +5 -24
- package/dist/item/panel.d.ts +1 -3
- package/dist/item/panel.d.ts.map +1 -1
- package/dist/item/panel.js +20 -24
- package/dist/item/placement-notice.d.ts +14 -0
- package/dist/item/placement-notice.d.ts.map +1 -0
- package/dist/item/placement-notice.js +38 -0
- package/dist/item/plan-symbols.d.ts +67 -0
- package/dist/item/plan-symbols.d.ts.map +1 -0
- package/dist/item/plan-symbols.js +407 -0
- package/dist/item/renderer.d.ts +10 -0
- package/dist/item/renderer.d.ts.map +1 -1
- package/dist/item/renderer.js +64 -38
- package/dist/item/script-param-defaults.d.ts +12 -0
- package/dist/item/script-param-defaults.d.ts.map +1 -0
- package/dist/item/script-param-defaults.js +34 -0
- package/dist/lean-to-extension/definition.d.ts.map +1 -1
- package/dist/lean-to-extension/definition.js +1 -2
- package/dist/lean-to-extension/geometry.d.ts.map +1 -1
- package/dist/lean-to-extension/geometry.js +1 -1
- package/dist/lean-to-extension/layout.d.ts.map +1 -1
- package/dist/lean-to-extension/layout.js +2 -3
- package/dist/lean-to-extension/placement-validation.d.ts.map +1 -1
- package/dist/lean-to-extension/placement-validation.js +5 -5
- package/dist/lean-to-extension/tool.d.ts.map +1 -1
- package/dist/lean-to-extension/tool.js +5 -5
- package/dist/lineset/move-tool.d.ts.map +1 -1
- package/dist/lineset/move-tool.js +8 -2
- package/dist/liquid-line/move-tool.d.ts.map +1 -1
- package/dist/liquid-line/move-tool.js +8 -2
- package/dist/measurement/definition.js +1 -1
- package/dist/pipe-fitting/move-tool.d.ts.map +1 -1
- package/dist/pipe-fitting/move-tool.js +8 -2
- package/dist/pipe-segment/move-tool.d.ts.map +1 -1
- package/dist/pipe-segment/move-tool.js +8 -2
- package/dist/procedural-item/animation.d.ts +8 -0
- package/dist/procedural-item/animation.d.ts.map +1 -0
- package/dist/procedural-item/animation.js +116 -0
- package/dist/procedural-item/definition.d.ts.map +1 -1
- package/dist/procedural-item/definition.js +74 -8
- package/dist/procedural-item/geometry.d.ts +5 -1
- package/dist/procedural-item/geometry.d.ts.map +1 -1
- package/dist/procedural-item/geometry.js +239 -15
- package/dist/procedural-item/renderer.d.ts.map +1 -1
- package/dist/procedural-item/renderer.js +272 -23
- package/dist/ridge-vent/panel.d.ts.map +1 -1
- package/dist/ridge-vent/panel.js +5 -23
- package/dist/ridge-vent/renderer.d.ts.map +1 -1
- package/dist/ridge-vent/renderer.js +9 -8
- package/dist/roof/definition.d.ts.map +1 -1
- package/dist/roof/definition.js +4 -1
- package/dist/roof/floorplan.d.ts +8 -0
- package/dist/roof/floorplan.d.ts.map +1 -1
- package/dist/roof/floorplan.js +194 -18
- package/dist/roof/panel-model.d.ts.map +1 -1
- package/dist/roof/panel-model.js +10 -6
- package/dist/roof/panel.d.ts.map +1 -1
- package/dist/roof/panel.js +3 -10
- package/dist/roof/renderer.d.ts.map +1 -1
- package/dist/roof/renderer.js +5 -2
- package/dist/roof-segment/panel.d.ts.map +1 -1
- package/dist/roof-segment/panel.js +5 -24
- package/dist/roof-segment/renderer.d.ts.map +1 -1
- package/dist/roof-segment/renderer.js +17 -8
- package/dist/separator/definition.d.ts +3 -0
- package/dist/separator/definition.d.ts.map +1 -0
- package/dist/separator/definition.js +39 -0
- package/dist/separator/renderer.d.ts +5 -0
- package/dist/separator/renderer.d.ts.map +1 -0
- package/dist/separator/renderer.js +36 -0
- package/dist/shared/duct-body-paint.d.ts +0 -4
- package/dist/shared/duct-body-paint.d.ts.map +1 -1
- package/dist/shared/duct-body-paint.js +1 -5
- package/dist/shared/item-interaction-actions.d.ts +6 -0
- package/dist/shared/item-interaction-actions.d.ts.map +1 -0
- package/dist/shared/item-interaction-actions.js +27 -0
- package/dist/shared/item-interactions.d.ts +9 -0
- package/dist/shared/item-interactions.d.ts.map +1 -0
- package/dist/shared/item-interactions.js +74 -0
- package/dist/shared/item-light-placement.d.ts +2 -0
- package/dist/shared/item-light-placement.d.ts.map +1 -0
- package/dist/shared/item-light-placement.js +3 -0
- package/dist/shared/move-roof-tool.js +2 -1
- package/dist/shared/node-batch/batchable.d.ts +12 -0
- package/dist/shared/node-batch/batchable.d.ts.map +1 -0
- package/dist/shared/node-batch/batchable.js +41 -0
- package/dist/shared/node-batch/candidates.d.ts +7 -5
- package/dist/shared/node-batch/candidates.d.ts.map +1 -1
- package/dist/shared/node-batch/candidates.js +43 -59
- package/dist/shared/node-batch/release.d.ts +8 -0
- package/dist/shared/node-batch/release.d.ts.map +1 -0
- package/dist/shared/node-batch/release.js +16 -0
- package/dist/shared/node-batch/system.d.ts.map +1 -1
- package/dist/shared/node-batch/system.js +17 -12
- package/dist/shared/node-batch/types.d.ts +4 -1
- package/dist/shared/node-batch/types.d.ts.map +1 -1
- package/dist/shared/opening-documentation.d.ts +13 -1
- package/dist/shared/opening-documentation.d.ts.map +1 -1
- package/dist/shared/opening-documentation.js +245 -59
- package/dist/shared/opening-guides-runtime.d.ts.map +1 -1
- package/dist/shared/opening-guides-runtime.js +17 -14
- package/dist/shared/opening-placement-dimensions.d.ts.map +1 -1
- package/dist/shared/opening-placement-dimensions.js +3 -3
- package/dist/shared/opening-plane-offset.d.ts +23 -0
- package/dist/shared/opening-plane-offset.d.ts.map +1 -0
- package/dist/shared/opening-plane-offset.js +24 -0
- package/dist/shared/polygon-centroid-move.d.ts.map +1 -1
- package/dist/shared/polygon-centroid-move.js +4 -1
- package/dist/shared/polygon-vertex-affordance.d.ts.map +1 -1
- package/dist/shared/polygon-vertex-affordance.js +19 -15
- package/dist/shared/run-hangers.d.ts.map +1 -1
- package/dist/shared/run-hangers.js +5 -4
- package/dist/shared/scripted-opening-handles.d.ts +18 -0
- package/dist/shared/scripted-opening-handles.d.ts.map +1 -0
- package/dist/shared/scripted-opening-handles.js +53 -0
- package/dist/shared/scripted-opening.d.ts +25 -0
- package/dist/shared/scripted-opening.d.ts.map +1 -0
- package/dist/shared/scripted-opening.js +72 -0
- package/dist/shared/slot-paint.d.ts +14 -2
- package/dist/shared/slot-paint.d.ts.map +1 -1
- package/dist/shared/slot-paint.js +29 -29
- package/dist/shared/surface-paint.d.ts.map +1 -1
- package/dist/shared/surface-paint.js +2 -5
- package/dist/shared/swap-preview-material.d.ts +11 -0
- package/dist/shared/swap-preview-material.d.ts.map +1 -0
- package/dist/shared/swap-preview-material.js +16 -0
- package/dist/shared/system-checks.d.ts.map +1 -1
- package/dist/shared/system-checks.js +5 -3
- package/dist/shared/wall-attach-target.d.ts +3 -10
- package/dist/shared/wall-attach-target.d.ts.map +1 -1
- package/dist/shared/wall-attach-target.js +3 -63
- package/dist/shared/wall-opening-ceiling.d.ts +5 -15
- package/dist/shared/wall-opening-ceiling.d.ts.map +1 -1
- package/dist/shared/wall-opening-ceiling.js +10 -18
- package/dist/shelf/definition.d.ts.map +1 -1
- package/dist/shelf/definition.js +1 -1
- package/dist/shelf/geometry.d.ts.map +1 -1
- package/dist/shelf/geometry.js +1 -2
- package/dist/shelf/paint.d.ts.map +1 -1
- package/dist/shelf/paint.js +4 -10
- package/dist/site/line-ribbon.d.ts +31 -0
- package/dist/site/line-ribbon.d.ts.map +1 -0
- package/dist/site/line-ribbon.js +117 -0
- package/dist/site/lot-mask.d.ts +18 -0
- package/dist/site/lot-mask.d.ts.map +1 -0
- package/dist/site/lot-mask.js +35 -0
- package/dist/site/panel.d.ts +10 -0
- package/dist/site/panel.d.ts.map +1 -0
- package/dist/site/panel.js +155 -0
- package/dist/site/parametrics.d.ts +7 -0
- package/dist/site/parametrics.d.ts.map +1 -1
- package/dist/site/parametrics.js +8 -0
- package/dist/site/recessed-slab-ground-holes.d.ts.map +1 -1
- package/dist/site/recessed-slab-ground-holes.js +5 -2
- package/dist/site/renderer.d.ts.map +1 -1
- package/dist/site/renderer.js +150 -19
- package/dist/site/setbacks.d.ts +33 -0
- package/dist/site/setbacks.d.ts.map +1 -0
- package/dist/site/setbacks.js +204 -0
- package/dist/site/terrain-geometry.d.ts +28 -1
- package/dist/site/terrain-geometry.d.ts.map +1 -1
- package/dist/site/terrain-geometry.js +78 -4
- package/dist/site/terrain-holes.d.ts +15 -0
- package/dist/site/terrain-holes.d.ts.map +1 -0
- package/dist/site/terrain-holes.js +74 -0
- package/dist/site/terrain-mesh.d.ts +9 -2
- package/dist/site/terrain-mesh.d.ts.map +1 -1
- package/dist/site/terrain-mesh.js +36 -9
- package/dist/site/terrain-renderer.d.ts +9 -2
- package/dist/site/terrain-renderer.d.ts.map +1 -1
- package/dist/site/terrain-renderer.js +14 -4
- package/dist/slab/boundary-editor.d.ts +1 -1
- package/dist/slab/boundary-editor.d.ts.map +1 -1
- package/dist/slab/boundary-editor.js +13 -13
- package/dist/slab/definition.d.ts.map +1 -1
- package/dist/slab/definition.js +19 -3
- package/dist/slab/dependency-tracker.d.ts.map +1 -1
- package/dist/slab/dependency-tracker.js +67 -7
- package/dist/slab/elevation-limit.d.ts.map +1 -1
- package/dist/slab/elevation-limit.js +2 -2
- package/dist/slab/floorplan-affordances.d.ts +176 -4
- package/dist/slab/floorplan-affordances.d.ts.map +1 -1
- package/dist/slab/floorplan-affordances.js +0 -1
- package/dist/slab/floorplan-move.d.ts.map +1 -1
- package/dist/slab/floorplan-move.js +3 -4
- package/dist/slab/floorplan.d.ts +7 -0
- package/dist/slab/floorplan.d.ts.map +1 -1
- package/dist/slab/floorplan.js +22 -5
- package/dist/slab/geometry.d.ts.map +1 -1
- package/dist/slab/geometry.js +186 -76
- package/dist/slab/move-tool.js +7 -6
- package/dist/slab/paint.d.ts +18 -5
- package/dist/slab/paint.d.ts.map +1 -1
- package/dist/slab/paint.js +458 -9
- package/dist/slab/panel.d.ts.map +1 -1
- package/dist/slab/panel.js +28 -9
- package/dist/slab/placement-ownership.d.ts +2 -1
- package/dist/slab/placement-ownership.d.ts.map +1 -1
- package/dist/slab/placement-ownership.js +2 -2
- package/dist/slab/surface-split.d.ts +24 -0
- package/dist/slab/surface-split.d.ts.map +1 -0
- package/dist/slab/surface-split.js +389 -0
- package/dist/slab/tool.d.ts.map +1 -1
- package/dist/slab/tool.js +3 -3
- package/dist/stair/baluster-geometry.d.ts +21 -0
- package/dist/stair/baluster-geometry.d.ts.map +1 -0
- package/dist/stair/baluster-geometry.js +74 -0
- package/dist/stair/baluster-guard.d.ts +50 -0
- package/dist/stair/baluster-guard.d.ts.map +1 -0
- package/dist/stair/baluster-guard.js +71 -0
- package/dist/stair/boards-guard.d.ts +37 -0
- package/dist/stair/boards-guard.d.ts.map +1 -0
- package/dist/stair/boards-guard.js +61 -0
- package/dist/stair/cable-guard.d.ts +39 -0
- package/dist/stair/cable-guard.d.ts.map +1 -0
- package/dist/stair/cable-guard.js +105 -0
- package/dist/stair/construction-controls.d.ts +15 -0
- package/dist/stair/construction-controls.d.ts.map +1 -0
- package/dist/stair/construction-controls.js +29 -0
- package/dist/stair/continuous-railings.d.ts +10 -0
- package/dist/stair/continuous-railings.d.ts.map +1 -0
- package/dist/stair/continuous-railings.js +159 -0
- package/dist/stair/definition.d.ts.map +1 -1
- package/dist/stair/definition.js +16 -37
- package/dist/stair/documentation.d.ts +1 -1
- package/dist/stair/documentation.d.ts.map +1 -1
- package/dist/stair/documentation.js +10 -17
- package/dist/stair/floorplan-affordances.d.ts.map +1 -1
- package/dist/stair/floorplan-affordances.js +9 -25
- package/dist/stair/floorplan.d.ts +1 -23
- package/dist/stair/floorplan.d.ts.map +1 -1
- package/dist/stair/floorplan.js +102 -86
- package/dist/stair/glass-guard.d.ts +72 -0
- package/dist/stair/glass-guard.d.ts.map +1 -0
- package/dist/stair/glass-guard.js +167 -0
- package/dist/stair/guard-path.d.ts +119 -0
- package/dist/stair/guard-path.d.ts.map +1 -0
- package/dist/stair/guard-path.js +208 -0
- package/dist/stair/materials.d.ts +11 -0
- package/dist/stair/materials.d.ts.map +1 -0
- package/dist/stair/materials.js +51 -0
- package/dist/stair/metal-guard.d.ts +38 -0
- package/dist/stair/metal-guard.d.ts.map +1 -0
- package/dist/stair/metal-guard.js +79 -0
- package/dist/stair/paint.d.ts +32 -0
- package/dist/stair/paint.d.ts.map +1 -1
- package/dist/stair/paint.js +75 -36
- package/dist/stair/panel.d.ts.map +1 -1
- package/dist/stair/panel.js +154 -17
- package/dist/stair/parametrics.d.ts +1 -1
- package/dist/stair/parametrics.d.ts.map +1 -1
- package/dist/stair/parametrics.js +32 -15
- package/dist/stair/plan-entry.d.ts +31 -0
- package/dist/stair/plan-entry.d.ts.map +1 -0
- package/dist/stair/plan-entry.js +325 -0
- package/dist/stair/post-and-rail-guard.d.ts +31 -0
- package/dist/stair/post-and-rail-guard.d.ts.map +1 -0
- package/dist/stair/post-and-rail-guard.js +63 -0
- package/dist/stair/railing-controls.d.ts +9 -0
- package/dist/stair/railing-controls.d.ts.map +1 -0
- package/dist/stair/railing-controls.js +49 -0
- package/dist/stair/renderer.d.ts.map +1 -1
- package/dist/stair/renderer.js +259 -259
- package/dist/stair/use-stair-render-data.d.ts +317 -0
- package/dist/stair/use-stair-render-data.d.ts.map +1 -0
- package/dist/stair/use-stair-render-data.js +73 -0
- package/dist/stair-segment/definition.d.ts.map +1 -1
- package/dist/stair-segment/definition.js +51 -10
- package/dist/stair-segment/panel.d.ts.map +1 -1
- package/dist/stair-segment/panel.js +36 -42
- package/dist/stair-segment/parametrics.d.ts +1 -1
- package/dist/stair-segment/parametrics.d.ts.map +1 -1
- package/dist/stair-segment/parametrics.js +21 -8
- package/dist/stair-segment/renderer.d.ts.map +1 -1
- package/dist/stair-segment/renderer.js +16 -28
- package/dist/turbine-vent/definition.d.ts.map +1 -1
- package/dist/turbine-vent/definition.js +2 -5
- package/dist/turbine-vent/paint.d.ts.map +1 -1
- package/dist/turbine-vent/paint.js +2 -5
- package/dist/turbine-vent/panel.d.ts.map +1 -1
- package/dist/turbine-vent/panel.js +5 -23
- package/dist/unit/unit-panel.d.ts.map +1 -1
- package/dist/unit/unit-panel.js +6 -1
- package/dist/wall/actions.d.ts.map +1 -1
- package/dist/wall/actions.js +7 -2
- package/dist/wall/construction-dimensions.js +8 -5
- package/dist/wall/contextual-dimensions.js +4 -4
- package/dist/wall/curtain-wall-materials.d.ts +1 -1
- package/dist/wall/curtain-wall-materials.d.ts.map +1 -1
- package/dist/wall/curtain-wall-materials.js +2 -2
- package/dist/wall/curve-tool.d.ts.map +1 -1
- package/dist/wall/curve-tool.js +4 -0
- package/dist/wall/definition.d.ts.map +1 -1
- package/dist/wall/definition.js +41 -17
- package/dist/wall/floorplan-move.d.ts +1 -1
- package/dist/wall/floorplan-move.d.ts.map +1 -1
- package/dist/wall/floorplan-move.js +20 -83
- package/dist/wall/floorplan-tool.d.ts.map +1 -1
- package/dist/wall/floorplan-tool.js +10 -11
- package/dist/wall/floorplan.d.ts +3 -1
- package/dist/wall/floorplan.d.ts.map +1 -1
- package/dist/wall/floorplan.js +184 -21
- package/dist/wall/measurement.d.ts.map +1 -1
- package/dist/wall/measurement.js +5 -5
- package/dist/wall/move-endpoint-tool.d.ts.map +1 -1
- package/dist/wall/move-endpoint-tool.js +20 -7
- package/dist/wall/move-shared.d.ts.map +1 -1
- package/dist/wall/move-shared.js +11 -7
- package/dist/wall/move-tool.d.ts.map +1 -1
- package/dist/wall/move-tool.js +118 -148
- package/dist/wall/paint.d.ts +26 -15
- package/dist/wall/paint.d.ts.map +1 -1
- package/dist/wall/paint.js +306 -117
- package/dist/wall/panel-model.d.ts +18 -0
- package/dist/wall/panel-model.d.ts.map +1 -1
- package/dist/wall/panel-model.js +77 -19
- package/dist/wall/panel.d.ts.map +1 -1
- package/dist/wall/panel.js +217 -41
- package/dist/wall/parametrics.d.ts.map +1 -1
- package/dist/wall/parametrics.js +3 -0
- package/dist/wall/rectangle-command.d.ts +111 -12
- package/dist/wall/rectangle-command.d.ts.map +1 -1
- package/dist/wall/rectangle-tool.d.ts.map +1 -1
- package/dist/wall/rectangle-tool.js +26 -8
- package/dist/wall/renderer.d.ts.map +1 -1
- package/dist/wall/renderer.js +4 -2
- package/dist/wall/split-floorplan-layer.d.ts.map +1 -1
- package/dist/wall/split-floorplan-layer.js +7 -7
- package/dist/wall/split-session.d.ts.map +1 -1
- package/dist/wall/split-session.js +7 -1
- package/dist/wall/system.d.ts.map +1 -1
- package/dist/wall/system.js +36 -4
- package/dist/wall/tool.d.ts.map +1 -1
- package/dist/wall/tool.js +105 -49
- package/dist/wall/treatment-level-data.d.ts +3 -2
- package/dist/wall/treatment-level-data.d.ts.map +1 -1
- package/dist/wall/treatment-level-data.js +17 -13
- package/dist/wall/treatments.d.ts +10 -10
- package/dist/wall/treatments.d.ts.map +1 -1
- package/dist/wall/treatments.js +67 -54
- package/dist/wall/wall-batch-system.d.ts +7 -0
- package/dist/wall/wall-batch-system.d.ts.map +1 -1
- package/dist/wall/wall-batch-system.js +35 -3
- package/dist/wall/wall-batch.d.ts +6 -0
- package/dist/wall/wall-batch.d.ts.map +1 -1
- package/dist/wall/wall-batch.js +7 -1
- package/dist/window/definition.d.ts.map +1 -1
- package/dist/window/definition.js +12 -4
- package/dist/window/floorplan-move.d.ts.map +1 -1
- package/dist/window/floorplan-move.js +3 -1
- package/dist/window/floorplan.d.ts.map +1 -1
- package/dist/window/floorplan.js +145 -60
- package/dist/window/mechanism.d.ts +4 -0
- package/dist/window/mechanism.d.ts.map +1 -0
- package/dist/window/mechanism.js +20 -0
- package/dist/window/move-tool.d.ts.map +1 -1
- package/dist/window/move-tool.js +79 -48
- package/dist/window/paint.d.ts.map +1 -1
- package/dist/window/paint.js +3 -0
- package/dist/window/panel.d.ts.map +1 -1
- package/dist/window/panel.js +32 -88
- package/dist/window/placement.d.ts +23 -0
- package/dist/window/placement.d.ts.map +1 -0
- package/dist/window/placement.js +66 -0
- package/dist/window/preview.d.ts.map +1 -1
- package/dist/window/preview.js +2 -0
- package/dist/window/renderer.d.ts.map +1 -1
- package/dist/window/renderer.js +3 -2
- package/dist/window/tool.d.ts.map +1 -1
- package/dist/window/tool.js +96 -24
- package/dist/window/window-math.d.ts +6 -14
- package/dist/window/window-math.d.ts.map +1 -1
- package/dist/window/window-math.js +14 -20
- package/dist/zone/contextual-dimensions.d.ts.map +1 -1
- package/dist/zone/contextual-dimensions.js +6 -28
- package/dist/zone/definition.d.ts.map +1 -1
- package/dist/zone/definition.js +3 -3
- package/dist/zone/floorplan-affordances.d.ts +200 -0
- package/dist/zone/floorplan-affordances.d.ts.map +1 -1
- package/dist/zone/floorplan.d.ts +1 -1
- package/dist/zone/floorplan.d.ts.map +1 -1
- package/dist/zone/floorplan.js +93 -53
- package/dist/zone/quantities-panel.d.ts.map +1 -1
- package/dist/zone/quantities-panel.js +3 -14
- package/dist/zone/quick-measurement.d.ts +2 -2
- package/dist/zone/quick-measurement.d.ts.map +1 -1
- package/dist/zone/quick-measurement.js +6 -5
- package/dist/zone/renderer.d.ts +1 -1
- package/dist/zone/renderer.d.ts.map +1 -1
- package/dist/zone/renderer.js +58 -146
- package/dist/zone/room-clear-dimensions.js +3 -3
- package/dist/zone/room-documentation.d.ts.map +1 -1
- package/dist/zone/room-documentation.js +2 -6
- package/package.json +11 -11
- package/dist/block/slots.d.ts +0 -4
- package/dist/block/slots.d.ts.map +0 -1
- package/dist/block/slots.js +0 -17
- package/dist/cabinet/slots.d.ts +0 -4
- package/dist/cabinet/slots.d.ts.map +0 -1
- package/dist/cabinet/slots.js +0 -24
- package/dist/ceiling/slots.d.ts +0 -6
- package/dist/ceiling/slots.d.ts.map +0 -1
- package/dist/ceiling/slots.js +0 -7
- package/dist/column/slots.d.ts +0 -9
- package/dist/column/slots.d.ts.map +0 -1
- package/dist/column/slots.js +0 -19
- package/dist/door/slots.d.ts +0 -9
- package/dist/door/slots.d.ts.map +0 -1
- package/dist/door/slots.js +0 -20
- package/dist/elevator/slots.d.ts +0 -8
- package/dist/elevator/slots.d.ts.map +0 -1
- package/dist/elevator/slots.js +0 -17
- package/dist/fence/slots.d.ts +0 -10
- package/dist/fence/slots.d.ts.map +0 -1
- package/dist/fence/slots.js +0 -23
- package/dist/item/__fixtures__/main-floorplan.d.ts +0 -26
- package/dist/item/__fixtures__/main-floorplan.d.ts.map +0 -1
- package/dist/item/__fixtures__/main-floorplan.js +0 -297
- package/dist/lean-to-extension/slots.d.ts +0 -5
- package/dist/lean-to-extension/slots.d.ts.map +0 -1
- package/dist/lean-to-extension/slots.js +0 -15
- package/dist/shelf/slots.d.ts +0 -9
- package/dist/shelf/slots.d.ts.map +0 -1
- package/dist/shelf/slots.js +0 -30
- package/dist/slab/slots.d.ts +0 -10
- package/dist/slab/slots.d.ts.map +0 -1
- package/dist/slab/slots.js +0 -20
- package/dist/stair/floor-stack.d.ts +0 -10
- package/dist/stair/floor-stack.d.ts.map +0 -1
- package/dist/stair/floor-stack.js +0 -115
- package/dist/stair/slots.d.ts +0 -7
- package/dist/stair/slots.d.ts.map +0 -1
- package/dist/stair/slots.js +0 -13
- package/dist/wall/drawing-mode.d.ts +0 -12
- package/dist/wall/drawing-mode.d.ts.map +0 -1
- package/dist/wall/drawing-mode.js +0 -38
- package/dist/wall/slots.d.ts +0 -10
- package/dist/wall/slots.d.ts.map +0 -1
- package/dist/wall/slots.js +0 -92
- package/dist/window/slots.d.ts +0 -5
- package/dist/window/slots.d.ts.map +0 -1
- package/dist/window/slots.js +0 -11
package/dist/wall/panel.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import { ActionButton, ActionGroup, curveReshapeScope, formatLinearMeasurement, getLinearUnitLabel, linearControlValueToMeters, metersToLinearUnit, PanelSection, PanelWrapper, SegmentedControl, SliderControl, triggerSFX, useInteractionScope, } from '@pascal-app/editor';
|
|
3
|
+
import { assemblyThickness, BRICK_AIR_SPACE, BRICK_VENEER, FIBER_CEMENT, GROUND_SUPPORT_ID, GYPSUM_HALF, GYPSUM_SHEATHING, getClampedWallCurveOffset, getMaxWallCurveOffset, getWallAssemblyPreset, getWallCurveLength, normalizeWallCurveOffset, resolveWallAssembly, SIDING_LAP, STONE_VENEER_UNVERIFIED, STUCCO_3_COAT, terrainSupportLift, useLiveNodeOverrides, useScene, WALL_ASSEMBLY_PRESETS, WALL_CHAIR_RAIL_DEFAULT, WALL_CROWN_DEFAULT, WALL_SKIRTING_DEFAULT, WSP_SHEATHING, wallAssemblyFromLegacy, wallAssemblyPatch, wallAssemblyToLegacy, wallAssemblyUnverifiedNote, } from '@pascal-app/core';
|
|
4
|
+
import { ActionButton, ActionGroup, curveReshapeScope, formatLinearMeasurement, getLinearUnitLabel, linearControlValueToMeters, metersToLinearUnit, PanelSection, PanelWrapper, SegmentedControl, SliderControl, triggerSFX, useInteractionScope, WallPaintRegionList, } from '@pascal-app/editor';
|
|
5
5
|
import { useViewer } from '@pascal-app/viewer';
|
|
6
6
|
import { Spline } from 'lucide-react';
|
|
7
|
-
import { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
7
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
8
8
|
import { resolveWallOpeningCeiling } from '../shared/wall-opening-ceiling';
|
|
9
9
|
import { CurtainWallPanel } from './curtain-wall-panel';
|
|
10
10
|
import { hasWallCurveBlockingChildren } from './curve-eligibility';
|
|
11
11
|
import { buildWallLengthPatch } from './length-patch';
|
|
12
|
+
import { wallReferenceModel } from './panel-model';
|
|
12
13
|
import { createWallPropertyPreview } from './property-preview';
|
|
13
14
|
/**
|
|
14
15
|
* Base half of the plane-bound repair: a stamped draft offset goes, and a
|
|
@@ -85,6 +86,8 @@ export default function WallPanel() {
|
|
|
85
86
|
return undefined;
|
|
86
87
|
return resolveWallOpeningCeiling(wall, s.nodes);
|
|
87
88
|
});
|
|
89
|
+
const sceneNodes = useScene((s) => s.nodes);
|
|
90
|
+
const reference = useMemo(() => (node ? wallReferenceModel([node], sceneNodes) : null), [node, sceneNodes]);
|
|
88
91
|
// Mirror the latest node into a ref so the slider handlers below have
|
|
89
92
|
// stable identities across re-renders. Without this, every store tick
|
|
90
93
|
// (one per pointermove during a slider drag) rebuilt the handler
|
|
@@ -178,49 +181,17 @@ export default function WallPanel() {
|
|
|
178
181
|
}), precision: 2, step: 0.1, unit: unitLabel, value: Math.round(displayHeight * 100) / 100 })), _jsx("div", { className: "px-1 font-medium text-[10px] text-muted-foreground/80 uppercase tracking-wider", children: "Bottom" }), _jsx(SegmentedControl, { onChange: handleInfillChange, options: [
|
|
179
182
|
{ label: 'Auto', value: 'auto' },
|
|
180
183
|
{ label: 'Fill to terrain', value: 'terrain' },
|
|
181
|
-
], value: followsTerrain ? 'terrain' : 'auto' }), followsTerrain && (_jsx("div", { className: "px-1 text-[11px] text-muted-foreground", children: "Extends downward to meet the terrain. Height and top stay unchanged." })), _jsx(SliderControl, { onCommit: handleCommit, onCancel: handleCancel, restoreOnCommit: false, previewWhileTyping: true, label: node.wallType === 'curtain' ? 'Frame depth' : 'Thickness', max: metersToLinearUnit(1000, unit), min: metersToLinearUnit(0.05, unit), onChange: (v) => handlePreview({
|
|
184
|
+
], value: followsTerrain ? 'terrain' : 'auto' }), followsTerrain && (_jsx("div", { className: "px-1 text-[11px] text-muted-foreground", children: "Extends downward to meet the terrain. Height and top stay unchanged." })), node.assembly && node.wallType !== 'curtain' ? (_jsxs("div", { className: "flex items-center justify-between px-2 py-1.5", children: [_jsx("span", { className: "font-medium text-[10px] text-muted-foreground uppercase tracking-wider", children: "Thickness" }), _jsxs("span", { className: "text-[11px] text-muted-foreground tabular-nums", children: [formatLinearMeasurement(thickness, unit), " \u00B7 from assembly"] })] })) : (_jsx(SliderControl, { onCommit: handleCommit, onCancel: handleCancel, restoreOnCommit: false, previewWhileTyping: true, label: node.wallType === 'curtain' ? 'Frame depth' : 'Thickness', max: metersToLinearUnit(1000, unit), min: metersToLinearUnit(0.05, unit), onChange: (v) => handlePreview({
|
|
182
185
|
thickness: linearControlValueToMeters(v, unit, {
|
|
183
186
|
maxMeters: 1000,
|
|
184
187
|
minMeters: 0.05,
|
|
185
188
|
}),
|
|
186
|
-
}), precision: 3, step: 0.01, unit: unitLabel, value: Math.round(displayThickness * 1000) / 1000 }), !hasWallChildrenBlockingCurve && (_jsx(SliderControl, { onCommit: handleCommit, onCancel: handleCancel, restoreOnCommit: false, previewWhileTyping: true, label: "Curve", max: Math.max(metersToLinearUnit(0.01, unit), displayMaxCurveOffset), min: -Math.max(metersToLinearUnit(0.01, unit), displayMaxCurveOffset), onChange: (v) => handlePreview({
|
|
189
|
+
}), precision: 3, step: 0.01, unit: unitLabel, value: Math.round(displayThickness * 1000) / 1000 })), _jsx("div", { className: "px-1 font-medium text-[10px] text-muted-foreground/80", children: "Reference" }), reference && (_jsx(SegmentedControl, { mixed: reference.value === null, onChange: (value) => reference.apply(value), options: reference.options, value: reference.value ?? 'center' })), !hasWallChildrenBlockingCurve && (_jsx(SliderControl, { onCommit: handleCommit, onCancel: handleCancel, restoreOnCommit: false, previewWhileTyping: true, label: "Curve", max: Math.max(metersToLinearUnit(0.01, unit), displayMaxCurveOffset), min: -Math.max(metersToLinearUnit(0.01, unit), displayMaxCurveOffset), onChange: (v) => handlePreview({
|
|
187
190
|
curveOffset: normalizeWallCurveOffset(node, linearControlValueToMeters(v, unit, {
|
|
188
191
|
maxMeters: curveOffsetLimit,
|
|
189
192
|
minMeters: -curveOffsetLimit,
|
|
190
193
|
})),
|
|
191
|
-
}), precision: 2, step: 0.1, unit: unitLabel, value: Math.round(displayCurveOffset * 100) / 100 }))] }), node.wallType === 'curtain' ? (_jsx(CurtainWallPanel, { height: height, node: node, onUpdate: handleUpdate, onPreview: handlePreview, onCommit: handleCommit, onCancel: handleCancel, unit: unit }, node.id)) : (_jsxs(_Fragment, { children: [_jsx(
|
|
192
|
-
}
|
|
193
|
-
function WallFaceBandSection({ node, onUpdate, unit, unitLabel, wallHeightMeters, }) {
|
|
194
|
-
const bandConfig = getWallFaceBandConfig(node, wallHeightMeters);
|
|
195
|
-
const bandCount = bandConfig.count;
|
|
196
|
-
const lowerHeight = bandConfig.lowerHeight;
|
|
197
|
-
const middleHeight = bandConfig.middleHeight;
|
|
198
|
-
const upperHeight = bandConfig.upperHeight;
|
|
199
|
-
const updateBands = (patch) => onUpdate({
|
|
200
|
-
faceBands: {
|
|
201
|
-
...WALL_FACE_BAND_DEFAULT,
|
|
202
|
-
...(node.faceBands ?? {}),
|
|
203
|
-
enabled: bandCount > 1,
|
|
204
|
-
count: bandCount,
|
|
205
|
-
...patch,
|
|
206
|
-
},
|
|
207
|
-
});
|
|
208
|
-
return (_jsxs(PanelSection, { title: "Wall bands", children: [_jsx(SliderControl, { label: "Bands", max: 4, min: 1, onChange: (value) => onUpdate(buildWallFaceBandCountPatch(node, Math.round(value))), precision: 0, step: 1, value: bandCount }), bandCount >= 2 && (_jsx(SliderControl, { label: "Lower", max: metersToLinearUnit(wallHeightMeters, unit), min: metersToLinearUnit(0, unit), onChange: (value) => updateBands({
|
|
209
|
-
lowerHeight: linearControlValueToMeters(value, unit, {
|
|
210
|
-
maxMeters: wallHeightMeters,
|
|
211
|
-
minMeters: 0,
|
|
212
|
-
}),
|
|
213
|
-
}), precision: 2, step: 0.01, unit: unitLabel, value: metersToLinearUnit(lowerHeight, unit) })), bandCount >= 3 && (_jsx(SliderControl, { label: "Middle", max: metersToLinearUnit(Math.max(0, wallHeightMeters - lowerHeight), unit), min: metersToLinearUnit(0, unit), onChange: (value) => updateBands({
|
|
214
|
-
middleHeight: linearControlValueToMeters(value, unit, {
|
|
215
|
-
maxMeters: Math.max(0, wallHeightMeters - lowerHeight),
|
|
216
|
-
minMeters: 0,
|
|
217
|
-
}),
|
|
218
|
-
}), precision: 2, step: 0.01, unit: unitLabel, value: metersToLinearUnit(middleHeight, unit) })), bandCount >= 4 && (_jsx(SliderControl, { label: "Upper", max: metersToLinearUnit(Math.max(0, wallHeightMeters - lowerHeight - middleHeight), unit), min: metersToLinearUnit(0, unit), onChange: (value) => updateBands({
|
|
219
|
-
upperHeight: linearControlValueToMeters(value, unit, {
|
|
220
|
-
maxMeters: Math.max(0, wallHeightMeters - lowerHeight - middleHeight),
|
|
221
|
-
minMeters: 0,
|
|
222
|
-
}),
|
|
223
|
-
}), precision: 2, step: 0.01, unit: unitLabel, value: metersToLinearUnit(upperHeight, unit) }))] }));
|
|
194
|
+
}), precision: 2, step: 0.1, unit: unitLabel, value: Math.round(displayCurveOffset * 100) / 100 }))] }), node.wallType === 'curtain' ? (_jsx(CurtainWallPanel, { height: height, node: node, onUpdate: handleUpdate, onPreview: handlePreview, onCommit: handleCommit, onCancel: handleCancel, unit: unit }, node.id)) : (_jsxs(_Fragment, { children: [_jsx(WallAssemblySection, { node: node, onUpdate: handleUpdate, unit: unit }), _jsx(WallPaintRegionList, { wallId: node.id }), _jsx(WallTrimSection, { node: node, onUpdate: handleUpdate, title: "Skirting", trimKey: "skirting", trimValue: skirting, unit: unit, unitLabel: unitLabel, wallHeightMeters: wallHeightMeters }), _jsx(WallTrimSection, { node: node, onUpdate: handleUpdate, title: "Crown molding", trimKey: "crown", trimValue: crown, unit: unit, unitLabel: unitLabel, wallHeightMeters: wallHeightMeters }), _jsx(WallTrimSection, { node: node, onUpdate: handleUpdate, title: "Chair rail", trimKey: "chairRail", trimValue: chairRail, unit: unit, unitLabel: unitLabel, wallHeightMeters: wallHeightMeters })] })), !hasWallChildrenBlockingCurve && (_jsx(PanelSection, { title: "Actions", children: _jsx(ActionGroup, { children: _jsx(ActionButton, { icon: _jsx(Spline, { className: "h-3.5 w-3.5" }), label: "Curve", onClick: handleCurve }) }) }))] }));
|
|
224
195
|
}
|
|
225
196
|
function WallTrimSection({ node, onUpdate, title, trimKey, trimValue, unit, unitLabel, wallHeightMeters, }) {
|
|
226
197
|
const updateTrim = (patch) => onUpdate({
|
|
@@ -234,10 +205,14 @@ function WallTrimSection({ node, onUpdate, title, trimKey, trimValue, unit, unit
|
|
|
234
205
|
? trimValue.profile
|
|
235
206
|
: profileOptions[0].value;
|
|
236
207
|
return (_jsxs(PanelSection, { title: title, children: [_jsx(ActionGroup, { children: _jsx(ActionButton, { label: trimValue.enabled ? `Hide ${title.toLowerCase()}` : `Show ${title.toLowerCase()}`, onClick: () => updateTrim({ enabled: !trimValue.enabled }) }) }), trimValue.enabled && (_jsxs(_Fragment, { children: [_jsx(SegmentedControl, { onChange: (next) => updateTrim({ sides: next }), options: [
|
|
237
|
-
{ label: '
|
|
238
|
-
{ label: '
|
|
208
|
+
{ label: 'Side A', value: 'a' },
|
|
209
|
+
{ label: 'Side B', value: 'b' },
|
|
239
210
|
{ label: 'Both', value: 'both' },
|
|
240
|
-
], value: trimValue.sides
|
|
211
|
+
], value: trimValue.sides === 'interior'
|
|
212
|
+
? 'a'
|
|
213
|
+
: trimValue.sides === 'exterior'
|
|
214
|
+
? 'b'
|
|
215
|
+
: trimValue.sides }), _jsx(SegmentedControl, { onChange: (next) => updateTrim({ profile: next }), options: profileOptions, value: selectedProfile }), _jsx(SliderControl, { label: "Height", max: metersToLinearUnit(Math.max(0.05, wallHeightMeters), unit), min: metersToLinearUnit(0.01, unit), onChange: (value) => updateTrim({
|
|
241
216
|
height: linearControlValueToMeters(value, unit, {
|
|
242
217
|
maxMeters: Math.max(0.05, wallHeightMeters),
|
|
243
218
|
minMeters: 0.01,
|
|
@@ -254,3 +229,204 @@ function WallTrimSection({ node, onUpdate, title, trimKey, trimValue, unit, unit
|
|
|
254
229
|
}),
|
|
255
230
|
}), precision: 2, step: 0.01, unit: unitLabel, value: metersToLinearUnit(trimValue.offsetY ?? 0, unit) }))] }))] }));
|
|
256
231
|
}
|
|
232
|
+
// ---------------------------------------------------------------------------
|
|
233
|
+
// Assembly
|
|
234
|
+
// ---------------------------------------------------------------------------
|
|
235
|
+
//
|
|
236
|
+
// The assembly is the SINGLE SOURCE OF TRUTH for `wall.thickness` — every edit
|
|
237
|
+
// here goes through `wallAssemblyPatch`, which writes the layer stack AND the
|
|
238
|
+
// re-derived total in one `updateNode` call, so the 2D plan and the 3D wall
|
|
239
|
+
// both move on the same store tick.
|
|
240
|
+
const METRES_PER_INCH = 0.0254;
|
|
241
|
+
/**
|
|
242
|
+
* Imperial-friendly thickness input. Accepts `5/8`, `5/8"`, `7/16 in`,
|
|
243
|
+
* `1-1/4"`, `1 1/2"`, `12mm`, `0.012m`. A bare number means INCHES in imperial
|
|
244
|
+
* display and MILLIMETRES in metric — wall layers are millimetre-scale and
|
|
245
|
+
* typing `0.0127` for half-inch board is nobody's idea of usable.
|
|
246
|
+
*/
|
|
247
|
+
function parseLayerThickness(raw, unit) {
|
|
248
|
+
const text = raw.trim().toLowerCase().replace(/["”]/g, ' in ');
|
|
249
|
+
if (!text)
|
|
250
|
+
return null;
|
|
251
|
+
const explicit = /(mm|cm|m|in|ft|')\s*$/.exec(text);
|
|
252
|
+
const suffix = explicit?.[1];
|
|
253
|
+
const body = (suffix ? text.slice(0, explicit?.index) : text).trim();
|
|
254
|
+
// `1-1/4` / `1 1/2` / `5/8` / `0.4375`
|
|
255
|
+
const mixed = /^(\d+(?:\.\d+)?)[\s-]+(\d+)\s*\/\s*(\d+)$/.exec(body);
|
|
256
|
+
const fraction = /^(\d+)\s*\/\s*(\d+)$/.exec(body);
|
|
257
|
+
let value;
|
|
258
|
+
if (mixed) {
|
|
259
|
+
value = Number(mixed[1]) + Number(mixed[2]) / Number(mixed[3]);
|
|
260
|
+
}
|
|
261
|
+
else if (fraction) {
|
|
262
|
+
value = Number(fraction[1]) / Number(fraction[2]);
|
|
263
|
+
}
|
|
264
|
+
else {
|
|
265
|
+
value = Number(body);
|
|
266
|
+
}
|
|
267
|
+
if (!Number.isFinite(value) || value < 0)
|
|
268
|
+
return null;
|
|
269
|
+
switch (suffix) {
|
|
270
|
+
case 'mm':
|
|
271
|
+
return value / 1000;
|
|
272
|
+
case 'cm':
|
|
273
|
+
return value / 100;
|
|
274
|
+
case 'm':
|
|
275
|
+
return value;
|
|
276
|
+
case 'in':
|
|
277
|
+
return value * METRES_PER_INCH;
|
|
278
|
+
case 'ft':
|
|
279
|
+
case "'":
|
|
280
|
+
return value * 12 * METRES_PER_INCH;
|
|
281
|
+
default:
|
|
282
|
+
return unit === 'imperial' ? value * METRES_PER_INCH : value / 1000;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
/** Nearest common fraction of an inch, so 0.0111 m reads back as `7/16"`. */
|
|
286
|
+
function formatLayerThickness(metres, unit) {
|
|
287
|
+
if (unit !== 'imperial')
|
|
288
|
+
return `${Math.round(metres * 1000 * 10) / 10} mm`;
|
|
289
|
+
const inchValue = metres / METRES_PER_INCH;
|
|
290
|
+
const sixteenths = Math.round(inchValue * 16);
|
|
291
|
+
if (Math.abs(inchValue * 16 - sixteenths) > 1e-6)
|
|
292
|
+
return `${Math.round(inchValue * 1000) / 1000}"`;
|
|
293
|
+
const whole = Math.floor(sixteenths / 16);
|
|
294
|
+
let numerator = sixteenths % 16;
|
|
295
|
+
let denominator = 16;
|
|
296
|
+
while (numerator % 2 === 0 && numerator > 0) {
|
|
297
|
+
numerator /= 2;
|
|
298
|
+
denominator /= 2;
|
|
299
|
+
}
|
|
300
|
+
if (numerator === 0)
|
|
301
|
+
return `${whole}"`;
|
|
302
|
+
return whole > 0 ? `${whole}-${numerator}/${denominator}"` : `${numerator}/${denominator}"`;
|
|
303
|
+
}
|
|
304
|
+
const SELECT_CLASS = 'h-7 w-full rounded border border-border bg-background px-2 text-[11px] text-foreground outline-none focus:border-primary';
|
|
305
|
+
const INPUT_CLASS = 'h-7 w-full rounded border border-border bg-background px-2 text-[11px] text-foreground outline-none focus:border-primary';
|
|
306
|
+
const ROW_LABEL_CLASS = 'w-[68px] shrink-0 text-[10px] text-muted-foreground uppercase tracking-wide';
|
|
307
|
+
function LayerRow({ label, children }) {
|
|
308
|
+
return (_jsxs("div", { className: "flex items-center gap-2 px-1 py-0.5", children: [_jsx("span", { className: ROW_LABEL_CLASS, children: label }), _jsx("div", { className: "flex flex-1 items-center gap-1.5", children: children })] }));
|
|
309
|
+
}
|
|
310
|
+
function ThicknessInput({ metres, onCommit, unit, }) {
|
|
311
|
+
const [draft, setDraft] = useState(null);
|
|
312
|
+
const display = draft ?? formatLayerThickness(metres, unit);
|
|
313
|
+
return (_jsx("input", { className: INPUT_CLASS, onBlur: () => {
|
|
314
|
+
if (draft != null) {
|
|
315
|
+
const parsed = parseLayerThickness(draft, unit);
|
|
316
|
+
if (parsed != null)
|
|
317
|
+
onCommit(parsed);
|
|
318
|
+
}
|
|
319
|
+
setDraft(null);
|
|
320
|
+
}, onChange: (event) => setDraft(event.target.value), onKeyDown: (event) => {
|
|
321
|
+
if (event.key === 'Enter')
|
|
322
|
+
event.currentTarget.blur();
|
|
323
|
+
if (event.key === 'Escape') {
|
|
324
|
+
setDraft(null);
|
|
325
|
+
event.currentTarget.blur();
|
|
326
|
+
}
|
|
327
|
+
}, spellCheck: false, value: display }));
|
|
328
|
+
}
|
|
329
|
+
const EXTERIOR_FINISH_OPTIONS = [
|
|
330
|
+
{ value: 'none', label: 'None' },
|
|
331
|
+
{ value: 'siding', label: 'Lap siding' },
|
|
332
|
+
{ value: 'fiber-cement', label: 'Fiber cement' },
|
|
333
|
+
{ value: 'stucco', label: 'Stucco' },
|
|
334
|
+
{ value: 'brick', label: 'Brick veneer' },
|
|
335
|
+
{ value: 'stone', label: 'Stone veneer' },
|
|
336
|
+
];
|
|
337
|
+
const SHEATHING_OPTIONS = [
|
|
338
|
+
{ value: 'none', label: 'None' },
|
|
339
|
+
{ value: 'osb', label: 'OSB' },
|
|
340
|
+
{ value: 'plywood', label: 'Plywood' },
|
|
341
|
+
{ value: 'gypsum', label: 'Gypsum' },
|
|
342
|
+
];
|
|
343
|
+
const FRAMING_OPTIONS = [
|
|
344
|
+
{ value: 'wood', label: 'Wood studs' },
|
|
345
|
+
{ value: 'lgs', label: 'Steel studs' },
|
|
346
|
+
{ value: 'cmu', label: 'CMU' },
|
|
347
|
+
{ value: 'icf', label: 'ICF' },
|
|
348
|
+
];
|
|
349
|
+
const INTERIOR_FINISH_OPTIONS = [
|
|
350
|
+
{ value: 'none', label: 'None' },
|
|
351
|
+
{ value: 'drywall', label: 'Drywall' },
|
|
352
|
+
{ value: 'plaster', label: 'Plaster' },
|
|
353
|
+
];
|
|
354
|
+
/** Cited default thickness for a finish the user just switched to. */
|
|
355
|
+
const EXTERIOR_FINISH_DEFAULT = {
|
|
356
|
+
none: 0,
|
|
357
|
+
siding: SIDING_LAP,
|
|
358
|
+
'fiber-cement': FIBER_CEMENT,
|
|
359
|
+
stucco: STUCCO_3_COAT,
|
|
360
|
+
brick: BRICK_VENEER + BRICK_AIR_SPACE,
|
|
361
|
+
stone: STONE_VENEER_UNVERIFIED,
|
|
362
|
+
};
|
|
363
|
+
function WallAssemblySection({ node, onUpdate, unit, }) {
|
|
364
|
+
const stack = node.assembly;
|
|
365
|
+
// The cladding / sheathing / framing / interior editor works on the WS5 view
|
|
366
|
+
// of the F2 stack; a stack it cannot express is listed read-only.
|
|
367
|
+
const assembly = stack ? (wallAssemblyToLegacy(stack) ?? undefined) : undefined;
|
|
368
|
+
const resolved = resolveWallAssembly(node);
|
|
369
|
+
const presetNote = wallAssemblyUnverifiedNote(node);
|
|
370
|
+
// Every write goes through wallAssemblyPatch so `thickness` is re-derived.
|
|
371
|
+
// Changing any layer clears `preset` — the stack is no longer that preset.
|
|
372
|
+
const apply = (next) => onUpdate(wallAssemblyPatch(wallAssemblyFromLegacy(next)));
|
|
373
|
+
const edit = (mutate) => {
|
|
374
|
+
if (!assembly)
|
|
375
|
+
return;
|
|
376
|
+
const next = mutate({ ...assembly });
|
|
377
|
+
apply({ ...next, preset: undefined });
|
|
378
|
+
};
|
|
379
|
+
return (_jsxs(PanelSection, { title: "Assembly", children: [_jsx(LayerRow, { label: "Preset", children: _jsxs("select", { className: SELECT_CLASS, onChange: (event) => {
|
|
380
|
+
const id = event.target.value;
|
|
381
|
+
if (!id) {
|
|
382
|
+
onUpdate({ assembly: undefined });
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
const preset = getWallAssemblyPreset(id);
|
|
386
|
+
if (preset)
|
|
387
|
+
onUpdate(wallAssemblyPatch(preset.assembly));
|
|
388
|
+
}, value: stack?.presetId ?? '', children: [_jsx("option", { value: "", children: stack ? 'Custom' : 'None (single layer)' }), WALL_ASSEMBLY_PRESETS.map((preset) => (_jsx("option", { value: preset.id, children: preset.label }, preset.id)))] }) }), assembly && (_jsxs(_Fragment, { children: [_jsxs(LayerRow, { label: "Exterior", children: [_jsx("select", { className: SELECT_CLASS, onChange: (event) => {
|
|
389
|
+
const finish = event.target.value;
|
|
390
|
+
edit((draft) => ({
|
|
391
|
+
...draft,
|
|
392
|
+
exterior: { finish, thickness: EXTERIOR_FINISH_DEFAULT[finish] },
|
|
393
|
+
}));
|
|
394
|
+
}, value: assembly.exterior?.finish ?? 'none', children: EXTERIOR_FINISH_OPTIONS.map((option) => (_jsx("option", { value: option.value, children: option.label }, option.value))) }), assembly.exterior && assembly.exterior.finish !== 'none' && (_jsx(ThicknessInput, { metres: assembly.exterior.thickness, onCommit: (thickness) => edit((draft) => ({
|
|
395
|
+
...draft,
|
|
396
|
+
exterior: { finish: draft.exterior?.finish ?? 'siding', thickness },
|
|
397
|
+
})), unit: unit }))] }), _jsxs(LayerRow, { label: "Sheathing", children: [_jsx("select", { className: SELECT_CLASS, onChange: (event) => {
|
|
398
|
+
const material = event.target.value;
|
|
399
|
+
edit((draft) => ({
|
|
400
|
+
...draft,
|
|
401
|
+
sheathing: {
|
|
402
|
+
material,
|
|
403
|
+
thickness: material === 'none'
|
|
404
|
+
? 0
|
|
405
|
+
: material === 'gypsum'
|
|
406
|
+
? GYPSUM_SHEATHING
|
|
407
|
+
: WSP_SHEATHING,
|
|
408
|
+
},
|
|
409
|
+
}));
|
|
410
|
+
}, value: assembly.sheathing?.material ?? 'none', children: SHEATHING_OPTIONS.map((option) => (_jsx("option", { value: option.value, children: option.label }, option.value))) }), assembly.sheathing && assembly.sheathing.material !== 'none' && (_jsx(ThicknessInput, { metres: assembly.sheathing.thickness, onCommit: (thickness) => edit((draft) => ({
|
|
411
|
+
...draft,
|
|
412
|
+
sheathing: { material: draft.sheathing?.material ?? 'osb', thickness },
|
|
413
|
+
})), unit: unit }))] }), _jsxs(LayerRow, { label: "Framing", children: [_jsx("select", { className: SELECT_CLASS, onChange: (event) => edit((draft) => ({
|
|
414
|
+
...draft,
|
|
415
|
+
framing: {
|
|
416
|
+
kind: event.target.value,
|
|
417
|
+
depth: draft.framing.depth,
|
|
418
|
+
},
|
|
419
|
+
})), value: assembly.framing.kind, children: FRAMING_OPTIONS.map((option) => (_jsx("option", { value: option.value, children: option.label }, option.value))) }), _jsx(ThicknessInput, { metres: assembly.framing.depth, onCommit: (depth) => edit((draft) => ({ ...draft, framing: { kind: draft.framing.kind, depth } })), unit: unit })] }), _jsxs(LayerRow, { label: "Interior", children: [_jsx("select", { className: SELECT_CLASS, onChange: (event) => {
|
|
420
|
+
const finish = event.target.value;
|
|
421
|
+
edit((draft) => ({
|
|
422
|
+
...draft,
|
|
423
|
+
interior: {
|
|
424
|
+
finish,
|
|
425
|
+
thickness: finish === 'none' ? 0 : (draft.interior?.thickness ?? GYPSUM_HALF),
|
|
426
|
+
},
|
|
427
|
+
}));
|
|
428
|
+
}, value: assembly.interior?.finish ?? 'none', children: INTERIOR_FINISH_OPTIONS.map((option) => (_jsx("option", { value: option.value, children: option.label }, option.value))) }), assembly.interior && assembly.interior.finish !== 'none' && (_jsx(ThicknessInput, { metres: assembly.interior.thickness, onCommit: (thickness) => edit((draft) => ({
|
|
429
|
+
...draft,
|
|
430
|
+
interior: { finish: draft.interior?.finish ?? 'drywall', thickness },
|
|
431
|
+
})), unit: unit }))] }), _jsxs("div", { className: "flex items-center justify-between px-2 py-1.5", children: [_jsx("span", { className: "font-medium text-[10px] text-muted-foreground uppercase tracking-wide", children: "Total thickness" }), _jsx("span", { className: "font-medium text-[11px] text-foreground tabular-nums", children: formatLayerThickness(assemblyThickness(stack), unit) })] }), resolved.kind === 'partition' && (_jsx("div", { className: "px-2 pb-1.5 text-[10px] text-muted-foreground", children: "Partition: the interior finish is applied to both faces." })), resolved.kind === 'envelope' && resolved.exteriorSide == null && (_jsx("div", { className: "px-2 pb-1.5 text-[10px] text-muted-foreground", children: "Which face is outside is undetermined (no room detected on either side) \u2014 the exterior layers are drawn on side B." })), presetNote && (_jsxs("div", { className: "px-2 pb-2 text-[10px] text-amber-600 dark:text-amber-400", children: ["Unverified: ", presetNote] })), _jsx("div", { className: "px-2 pb-2 text-[10px] text-muted-foreground", children: "Layer thicknesses follow the 2021 IRC assembly data. Drafting aid, not engineering \u2014 verify with the authority having jurisdiction." })] })), stack && !assembly && (_jsxs(_Fragment, { children: [resolved.layers.map((layer, index) => (_jsx(LayerRow, { label: layer.material, children: _jsx("span", { className: "text-[11px] text-muted-foreground tabular-nums", children: formatLayerThickness(layer.thickness, unit) }) }, `${layer.role}-${index}`))), _jsxs("div", { className: "flex items-center justify-between px-2 py-1.5", children: [_jsx("span", { className: "font-medium text-[10px] text-muted-foreground uppercase tracking-wide", children: "Total thickness" }), _jsx("span", { className: "font-medium text-[11px] text-foreground tabular-nums", children: formatLayerThickness(assemblyThickness(stack), unit) })] })] }))] }));
|
|
432
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parametrics.d.ts","sourceRoot":"","sources":["../../src/wall/parametrics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAExC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,EAAE,oBAAoB,CAAC,QAAQ,
|
|
1
|
+
{"version":3,"file":"parametrics.d.ts","sourceRoot":"","sources":["../../src/wall/parametrics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAExC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,EAAE,oBAAoB,CAAC,QAAQ,CAsB1D,CAAA"}
|
package/dist/wall/parametrics.js
CHANGED
|
@@ -15,6 +15,9 @@ export const wallParametrics = {
|
|
|
15
15
|
{
|
|
16
16
|
label: 'Dimensions',
|
|
17
17
|
fields: [
|
|
18
|
+
// Reference is not a raw field: its labels depend on each wall's rooms
|
|
19
|
+
// (`wallReferenceModel` in panel-model), so generic inspectors never
|
|
20
|
+
// show the stored a / b value.
|
|
18
21
|
{ key: 'thickness', kind: 'number', unit: 'm', min: 0.05, max: 1000, step: 0.01 },
|
|
19
22
|
// `height` may be absent (plane-bound top); the custom panel owns the
|
|
20
23
|
// Follows storey / Custom height mode switch, so this is metadata only.
|
|
@@ -9,8 +9,8 @@ export declare function createWallRectangle(levelId: AnyNodeId, start: WallPlanP
|
|
|
9
9
|
children: (`item_${string}` | `procedural-item_${string}` | `leanto_${string}` | `door_${string}` | `window_${string}`)[];
|
|
10
10
|
start: [number, number];
|
|
11
11
|
end: [number, number];
|
|
12
|
-
frontSide: "unknown" | "
|
|
13
|
-
backSide: "unknown" | "
|
|
12
|
+
frontSide: "unknown" | "exterior" | "interior";
|
|
13
|
+
backSide: "unknown" | "exterior" | "interior";
|
|
14
14
|
name?: string | undefined;
|
|
15
15
|
camera?: {
|
|
16
16
|
position: [number, number, number];
|
|
@@ -19,6 +19,17 @@ export declare function createWallRectangle(levelId: AnyNodeId, start: WallPlanP
|
|
|
19
19
|
fov?: number | undefined;
|
|
20
20
|
zoom?: number | undefined;
|
|
21
21
|
} | undefined;
|
|
22
|
+
provenance?: {
|
|
23
|
+
refs: {
|
|
24
|
+
id: string;
|
|
25
|
+
ns?: string | undefined;
|
|
26
|
+
role?: "primary" | "piece" | "absorbed" | "alias" | "derived" | undefined;
|
|
27
|
+
}[];
|
|
28
|
+
lineage?: {
|
|
29
|
+
op: "import" | "split" | "merge" | "duplicate" | "convert" | "promote" | "make-independent" | "attach";
|
|
30
|
+
fromIds: string[];
|
|
31
|
+
} | undefined;
|
|
32
|
+
} | undefined;
|
|
22
33
|
wallType?: "standard" | "curtain" | undefined;
|
|
23
34
|
curtainWall?: {
|
|
24
35
|
construction: "stick" | "unitized";
|
|
@@ -41,7 +52,7 @@ export declare function createWallRectangle(levelId: AnyNodeId, start: WallPlanP
|
|
|
41
52
|
jointWidth: number;
|
|
42
53
|
glassThickness: number;
|
|
43
54
|
panelType: "glass" | "solid" | "empty";
|
|
44
|
-
spandrel: "
|
|
55
|
+
spandrel: "bottom" | "top" | "none";
|
|
45
56
|
frameColor: string;
|
|
46
57
|
glassColor: string;
|
|
47
58
|
solidColor: string;
|
|
@@ -108,22 +119,110 @@ export declare function createWallRectangle(levelId: AnyNodeId, start: WallPlanP
|
|
|
108
119
|
} | undefined;
|
|
109
120
|
exteriorMaterialPreset?: string | undefined;
|
|
110
121
|
slots?: Record<string, string> | undefined;
|
|
122
|
+
legacyFaceMaterials?: {
|
|
123
|
+
a?: {
|
|
124
|
+
material?: {
|
|
125
|
+
id?: string | undefined;
|
|
126
|
+
preset?: "custom" | "white" | "brick" | "concrete" | "wood" | "glass" | "metal" | "plaster" | "tile" | "marble" | undefined;
|
|
127
|
+
properties?: {
|
|
128
|
+
color: string;
|
|
129
|
+
roughness: number;
|
|
130
|
+
metalness: number;
|
|
131
|
+
opacity: number;
|
|
132
|
+
transparent: boolean;
|
|
133
|
+
side: "front" | "back" | "double";
|
|
134
|
+
} | undefined;
|
|
135
|
+
texture?: {
|
|
136
|
+
url: string;
|
|
137
|
+
repeat?: [number, number] | undefined;
|
|
138
|
+
scale?: number | undefined;
|
|
139
|
+
} | undefined;
|
|
140
|
+
} | undefined;
|
|
141
|
+
materialPreset?: string | undefined;
|
|
142
|
+
} | undefined;
|
|
143
|
+
b?: {
|
|
144
|
+
material?: {
|
|
145
|
+
id?: string | undefined;
|
|
146
|
+
preset?: "custom" | "white" | "brick" | "concrete" | "wood" | "glass" | "metal" | "plaster" | "tile" | "marble" | undefined;
|
|
147
|
+
properties?: {
|
|
148
|
+
color: string;
|
|
149
|
+
roughness: number;
|
|
150
|
+
metalness: number;
|
|
151
|
+
opacity: number;
|
|
152
|
+
transparent: boolean;
|
|
153
|
+
side: "front" | "back" | "double";
|
|
154
|
+
} | undefined;
|
|
155
|
+
texture?: {
|
|
156
|
+
url: string;
|
|
157
|
+
repeat?: [number, number] | undefined;
|
|
158
|
+
scale?: number | undefined;
|
|
159
|
+
} | undefined;
|
|
160
|
+
} | undefined;
|
|
161
|
+
materialPreset?: string | undefined;
|
|
162
|
+
} | undefined;
|
|
163
|
+
} | undefined;
|
|
164
|
+
faceRegions?: {
|
|
165
|
+
id: string;
|
|
166
|
+
face: "a" | "b";
|
|
167
|
+
finish: string;
|
|
168
|
+
u0?: number | undefined;
|
|
169
|
+
u1?: number | undefined;
|
|
170
|
+
v0?: number | undefined;
|
|
171
|
+
v1?: number | undefined;
|
|
172
|
+
}[] | undefined;
|
|
111
173
|
thickness?: number | undefined;
|
|
174
|
+
assembly?: {
|
|
175
|
+
layers: {
|
|
176
|
+
id: string;
|
|
177
|
+
role: "fill" | "shell" | "finish" | "lining" | "substrate" | "sheathing" | "membrane" | "underlay" | "insulation" | "air" | "furring" | "structure" | "deck" | "covering" | "glazing";
|
|
178
|
+
thickness: number;
|
|
179
|
+
core?: true | undefined;
|
|
180
|
+
material?: string | undefined;
|
|
181
|
+
slot?: string | undefined;
|
|
182
|
+
returns?: boolean | undefined;
|
|
183
|
+
display?: "construction" | "finished" | undefined;
|
|
184
|
+
inset?: number | undefined;
|
|
185
|
+
bottom?: number | undefined;
|
|
186
|
+
lift?: number | undefined;
|
|
187
|
+
src?: string | undefined;
|
|
188
|
+
}[];
|
|
189
|
+
backing?: {
|
|
190
|
+
id: string;
|
|
191
|
+
role: "fill" | "shell" | "finish" | "lining" | "substrate" | "sheathing" | "membrane" | "underlay" | "insulation" | "air" | "furring" | "structure" | "deck" | "covering" | "glazing";
|
|
192
|
+
thickness: number;
|
|
193
|
+
core?: true | undefined;
|
|
194
|
+
material?: string | undefined;
|
|
195
|
+
slot?: string | undefined;
|
|
196
|
+
returns?: boolean | undefined;
|
|
197
|
+
display?: "construction" | "finished" | undefined;
|
|
198
|
+
inset?: number | undefined;
|
|
199
|
+
bottom?: number | undefined;
|
|
200
|
+
lift?: number | undefined;
|
|
201
|
+
src?: string | undefined;
|
|
202
|
+
}[] | undefined;
|
|
203
|
+
face?: "front" | "exterior" | undefined;
|
|
204
|
+
presetId?: string | undefined;
|
|
205
|
+
cavityInsulation?: string | undefined;
|
|
206
|
+
} | undefined;
|
|
207
|
+
justification?: "a" | "b" | undefined;
|
|
112
208
|
height?: number | undefined;
|
|
113
209
|
curveOffset?: number | undefined;
|
|
114
210
|
supportSlabId?: string | undefined;
|
|
115
211
|
supportOffset?: number | undefined;
|
|
116
212
|
fillToTerrain?: boolean | undefined;
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
213
|
+
underpinning?: {
|
|
214
|
+
rim: number;
|
|
215
|
+
stem: number;
|
|
216
|
+
openings?: {
|
|
217
|
+
u: number;
|
|
218
|
+
width: number;
|
|
219
|
+
top: number;
|
|
220
|
+
bottom: number;
|
|
221
|
+
}[] | undefined;
|
|
123
222
|
} | undefined;
|
|
124
223
|
skirting?: {
|
|
125
224
|
enabled: boolean;
|
|
126
|
-
sides: "
|
|
225
|
+
sides: "a" | "b" | "exterior" | "interior" | "both";
|
|
127
226
|
height: number;
|
|
128
227
|
proud: number;
|
|
129
228
|
profile: "flat" | "bevel" | "triangle" | "cove" | "bullnose" | "base-modern" | "base-colonial" | "base-shoe" | "base-ogee" | "crown-cove" | "crown-ogee" | "crown-craftsman" | "crown-layered" | "rail-rounded" | "rail-ogee" | "rail-picture" | "rail-stepped";
|
|
@@ -131,7 +230,7 @@ export declare function createWallRectangle(levelId: AnyNodeId, start: WallPlanP
|
|
|
131
230
|
} | undefined;
|
|
132
231
|
crown?: {
|
|
133
232
|
enabled: boolean;
|
|
134
|
-
sides: "
|
|
233
|
+
sides: "a" | "b" | "exterior" | "interior" | "both";
|
|
135
234
|
height: number;
|
|
136
235
|
proud: number;
|
|
137
236
|
profile: "flat" | "bevel" | "triangle" | "cove" | "bullnose" | "base-modern" | "base-colonial" | "base-shoe" | "base-ogee" | "crown-cove" | "crown-ogee" | "crown-craftsman" | "crown-layered" | "rail-rounded" | "rail-ogee" | "rail-picture" | "rail-stepped";
|
|
@@ -139,7 +238,7 @@ export declare function createWallRectangle(levelId: AnyNodeId, start: WallPlanP
|
|
|
139
238
|
} | undefined;
|
|
140
239
|
chairRail?: {
|
|
141
240
|
enabled: boolean;
|
|
142
|
-
sides: "
|
|
241
|
+
sides: "a" | "b" | "exterior" | "interior" | "both";
|
|
143
242
|
height: number;
|
|
144
243
|
proud: number;
|
|
145
244
|
profile: "flat" | "bevel" | "triangle" | "cove" | "bullnose" | "base-modern" | "base-colonial" | "base-shoe" | "base-ogee" | "crown-cove" | "crown-ogee" | "crown-craftsman" | "crown-layered" | "rail-rounded" | "rail-ogee" | "rail-picture" | "rail-stepped";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rectangle-command.d.ts","sourceRoot":"","sources":["../../src/wall/rectangle-command.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EAKd,KAAK,uBAAuB,EAC5B,KAAK,QAAQ,EACb,KAAK,aAAa,EACnB,MAAM,kBAAkB,CAAA;AAEzB,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,aAAa,EACpB,GAAG,EAAE,aAAa,EAClB,QAAQ,GAAE,OAAO,CAAC,QAAQ,CAAM,EAChC,OAAO,CAAC,EAAE,uBAAuB
|
|
1
|
+
{"version":3,"file":"rectangle-command.d.ts","sourceRoot":"","sources":["../../src/wall/rectangle-command.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EAKd,KAAK,uBAAuB,EAC5B,KAAK,QAAQ,EACb,KAAK,aAAa,EACnB,MAAM,kBAAkB,CAAA;AAEzB,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,aAAa,EACpB,GAAG,EAAE,aAAa,EAClB,QAAQ,GAAE,OAAO,CAAC,QAAQ,CAAM,EAChC,OAAO,CAAC,EAAE,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAmBlC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rectangle-tool.d.ts","sourceRoot":"","sources":["../../src/wall/rectangle-tool.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rectangle-tool.d.ts","sourceRoot":"","sources":["../../src/wall/rectangle-tool.tsx"],"names":[],"mappings":"AAoCA,MAAM,CAAC,OAAO,UAAU,iBAAiB,gCAoNxC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { emitter, useScene, wallRectangleCorners, } from '@pascal-app/core';
|
|
4
|
-
import { CursorSphere, clearPlacementSurface, DRAFT_LABEL_Y_OFFSET, DraftMeasurementLabel, EDITOR_LAYER, formatLinearMeasurement, isMagneticSnapActive, markToolCancelConsumed, NO_RAYCAST, publishHorizontalConstructionPlane, resolveEventConstructionPlane, snapWallDraftPointDetailed, triggerSFX, useEditor, useInteractionScope, useLinearDisplay, useRegistryToolContext, useWallSnapIndicator, } from '@pascal-app/editor';
|
|
4
|
+
import { CursorSphere, clearPlacementSurface, DRAFT_LABEL_Y_OFFSET, DraftMeasurementLabel, EDITOR_LAYER, formatLinearMeasurement, isMagneticSnapActive, markToolCancelConsumed, NO_RAYCAST, publishHorizontalConstructionPlane, resolveEventConstructionPlane, snapWallDraftPointDetailed, triggerSFX, useEditor, useFloorplanDraftPreview, useInteractionScope, useLinearDisplay, useRegistryToolContext, useWallSnapIndicator, } from '@pascal-app/editor';
|
|
5
5
|
import { getSceneTheme, useViewer } from '@pascal-app/viewer';
|
|
6
6
|
import { useThree } from '@react-three/fiber';
|
|
7
7
|
import { useEffect, useState } from 'react';
|
|
@@ -27,7 +27,7 @@ export default function RectangleWallTool() {
|
|
|
27
27
|
setDraft(null);
|
|
28
28
|
setMessage('');
|
|
29
29
|
let start = null;
|
|
30
|
-
let
|
|
30
|
+
let corner = null;
|
|
31
31
|
let plane = null;
|
|
32
32
|
useInteractionScope.getState().begin({ kind: 'drafting', tool: 'wall' });
|
|
33
33
|
const pointFor = (e) => {
|
|
@@ -57,21 +57,26 @@ export default function RectangleWallTool() {
|
|
|
57
57
|
setMessage('');
|
|
58
58
|
if (!start)
|
|
59
59
|
return;
|
|
60
|
-
// The
|
|
61
|
-
if (
|
|
60
|
+
// The wall draft's tick as the dragged corner steps to a new snapped spot.
|
|
61
|
+
if (corner && (corner[0] !== point[0] || corner[1] !== point[1]))
|
|
62
62
|
triggerSFX('sfx:grid-snap');
|
|
63
|
-
|
|
63
|
+
corner = point;
|
|
64
64
|
setDraft({ start, end: point, y: hoverPlane.localY });
|
|
65
65
|
};
|
|
66
66
|
const leave = () => {
|
|
67
67
|
setCursor(null);
|
|
68
68
|
useWallSnapIndicator.getState().clear();
|
|
69
69
|
};
|
|
70
|
+
// The first corner is mirrored out of tree, like the wall chain's origin,
|
|
71
|
+
// for consumers outside the tool (the plan view, onboarding hints).
|
|
72
|
+
const publishStart = (point) => useFloorplanDraftPreview.getState().setWallRectangleDraftStart(point);
|
|
70
73
|
const cancel = () => {
|
|
71
|
-
if (start)
|
|
74
|
+
if (start) {
|
|
72
75
|
markToolCancelConsumed();
|
|
76
|
+
publishStart(null);
|
|
77
|
+
}
|
|
73
78
|
start = null;
|
|
74
|
-
|
|
79
|
+
corner = null;
|
|
75
80
|
plane = null;
|
|
76
81
|
setDraft(null);
|
|
77
82
|
setMessage('');
|
|
@@ -84,10 +89,11 @@ export default function RectangleWallTool() {
|
|
|
84
89
|
const point = pointFor(e);
|
|
85
90
|
if (!start) {
|
|
86
91
|
start = point;
|
|
87
|
-
|
|
92
|
+
publishStart(point);
|
|
88
93
|
plane = resolveEventConstructionPlane(e, null);
|
|
89
94
|
publishHorizontalConstructionPlane(e, plane);
|
|
90
95
|
setCursor([point[0], plane.localY, point[1]]);
|
|
96
|
+
corner = point;
|
|
91
97
|
setDraft({ start, end: point, y: plane.localY });
|
|
92
98
|
setMessage('');
|
|
93
99
|
triggerSFX('sfx:structure-build-start');
|
|
@@ -106,15 +112,27 @@ export default function RectangleWallTool() {
|
|
|
106
112
|
setMessage(error.message);
|
|
107
113
|
}
|
|
108
114
|
};
|
|
115
|
+
// The plan view finishing or dropping the same rectangle (split view) ends it here too.
|
|
116
|
+
const stopMirror = useFloorplanDraftPreview.subscribe((state, previous) => {
|
|
117
|
+
if (!start || !previous.wallRectangleDraftStart || state.wallRectangleDraftStart)
|
|
118
|
+
return;
|
|
119
|
+
start = null;
|
|
120
|
+
corner = null;
|
|
121
|
+
plane = null;
|
|
122
|
+
setDraft(null);
|
|
123
|
+
});
|
|
109
124
|
emitter.on('grid:move', move);
|
|
110
125
|
emitter.on('grid:click', click);
|
|
111
126
|
emitter.on('tool:cancel', cancel);
|
|
112
127
|
canvas.addEventListener('pointerleave', leave);
|
|
113
128
|
return () => {
|
|
129
|
+
stopMirror();
|
|
114
130
|
emitter.off('grid:move', move);
|
|
115
131
|
emitter.off('grid:click', click);
|
|
116
132
|
emitter.off('tool:cancel', cancel);
|
|
117
133
|
canvas.removeEventListener('pointerleave', leave);
|
|
134
|
+
if (start)
|
|
135
|
+
publishStart(null);
|
|
118
136
|
useWallSnapIndicator.getState().clear();
|
|
119
137
|
clearPlacementSurface();
|
|
120
138
|
useInteractionScope.getState().endIf((s) => s.kind === 'drafting' && s.tool === 'wall');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/wall/renderer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAOL,KAAK,QAAQ,EACd,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/wall/renderer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAOL,KAAK,QAAQ,EACd,MAAM,kBAAkB,CAAA;AAwCzB;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,YAAY,GAAI,UAAU;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,gCA4JjD,CAAA;AAED,eAAe,YAAY,CAAA"}
|
package/dist/wall/renderer.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { hiddenWallPointerEventsHeld, useLiveNodeOverrides, useRegistry, useScene, } from '@pascal-app/core';
|
|
4
|
-
import { NodeRenderer, SHADOW_ONLY_LAYER, useLibraryMaterialsVersion, useNodeEvents, useViewer, } from '@pascal-app/viewer';
|
|
4
|
+
import { getWallFinishRefs, NodeRenderer, SHADOW_ONLY_LAYER, useLibraryMaterialsVersion, useNodeEvents, useViewer, } from '@pascal-app/viewer';
|
|
5
5
|
import { useEffect, useLayoutEffect, useMemo, useRef } from 'react';
|
|
6
6
|
import { useShallow } from 'zustand/react/shallow';
|
|
7
7
|
import { createPlaceholderGeometry } from '../shared/placeholder-geometry';
|
|
@@ -113,7 +113,9 @@ const WallRenderer = ({ node }) => {
|
|
|
113
113
|
// register after mount, and a dangling ref cached as the slot default must
|
|
114
114
|
// re-resolve when they land.
|
|
115
115
|
const libraryMaterialsVersion = useLibraryMaterialsVersion();
|
|
116
|
-
|
|
116
|
+
// Built geometry's groups index its finish palette; WallCutout swaps the
|
|
117
|
+
// array whenever a rebuild changes that palette.
|
|
118
|
+
const baseMaterials = getCurtainAwareWallMaterials(treatmentNode, shading, textures, colorPreset, sceneTheme, sceneMaterials, getWallFinishRefs(ref.current?.geometry)).visible;
|
|
117
119
|
// biome-ignore lint/correctness/useExhaustiveDependencies: libraryMaterialsVersion invalidates the ref resolution inside createWallExtraSlotMaterials
|
|
118
120
|
const extraMaterials = useMemo(() => createWallExtraSlotMaterials(node, shading, sceneMaterials), [node, sceneMaterials, shading, libraryMaterialsVersion]);
|
|
119
121
|
useEffect(() => () => {
|