@pascal-app/nodes 1.0.5 → 1.0.7
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/README.md +1 -0
- package/dist/beam/actions/move-endpoint.d.ts +24 -0
- package/dist/beam/actions/move-endpoint.d.ts.map +1 -0
- package/dist/beam/actions/move-endpoint.js +54 -0
- package/dist/beam/definition.d.ts +14 -0
- package/dist/beam/definition.d.ts.map +1 -0
- package/dist/beam/definition.js +173 -0
- package/dist/beam/draft-settings.d.ts +17 -0
- package/dist/beam/draft-settings.d.ts.map +1 -0
- package/dist/beam/draft-settings.js +81 -0
- package/dist/beam/drafting.d.ts +35 -0
- package/dist/beam/drafting.d.ts.map +1 -0
- package/dist/beam/drafting.js +103 -0
- package/dist/beam/floorplan-affordances.d.ts +8 -0
- package/dist/beam/floorplan-affordances.d.ts.map +1 -0
- package/dist/beam/floorplan-affordances.js +40 -0
- package/dist/beam/floorplan-move.d.ts +11 -0
- package/dist/beam/floorplan-move.d.ts.map +1 -0
- package/dist/beam/floorplan-move.js +54 -0
- package/dist/beam/floorplan.d.ts +11 -0
- package/dist/beam/floorplan.d.ts.map +1 -0
- package/dist/beam/floorplan.js +91 -0
- package/dist/beam/geometry.d.ts +19 -0
- package/dist/beam/geometry.d.ts.map +1 -0
- package/dist/beam/geometry.js +63 -0
- package/dist/beam/index.d.ts +3 -0
- package/dist/beam/index.d.ts.map +1 -0
- package/dist/beam/index.js +2 -0
- package/dist/beam/move-endpoint-tool.d.ts +21 -0
- package/dist/beam/move-endpoint-tool.d.ts.map +1 -0
- package/dist/beam/move-endpoint-tool.js +49 -0
- package/dist/beam/move-tool.d.ts +12 -0
- package/dist/beam/move-tool.d.ts.map +1 -0
- package/dist/beam/move-tool.js +114 -0
- package/dist/beam/panel-model.d.ts +28 -0
- package/dist/beam/panel-model.d.ts.map +1 -0
- package/dist/beam/panel-model.js +123 -0
- package/dist/beam/panel.d.ts +13 -0
- package/dist/beam/panel.d.ts.map +1 -0
- package/dist/beam/panel.js +107 -0
- package/dist/beam/parametrics.d.ts +3 -0
- package/dist/beam/parametrics.d.ts.map +1 -0
- package/dist/beam/parametrics.js +4 -0
- package/dist/beam/renderer.d.ts +13 -0
- package/dist/beam/renderer.d.ts.map +1 -0
- package/dist/beam/renderer.js +36 -0
- package/dist/beam/schema.d.ts +2 -0
- package/dist/beam/schema.d.ts.map +1 -0
- package/dist/beam/schema.js +1 -0
- package/dist/beam/tool.d.ts +13 -0
- package/dist/beam/tool.d.ts.map +1 -0
- package/dist/beam/tool.js +152 -0
- package/dist/box-vent/panel.d.ts.map +1 -1
- package/dist/box-vent/panel.js +8 -7
- package/dist/cabinet/batchable.d.ts +10 -0
- package/dist/cabinet/batchable.d.ts.map +1 -0
- package/dist/cabinet/batchable.js +12 -0
- package/dist/cabinet/compartment-card.d.ts.map +1 -1
- package/dist/cabinet/compartment-card.js +142 -46
- package/dist/cabinet/countertop-layout.d.ts +5 -0
- package/dist/cabinet/countertop-layout.d.ts.map +1 -1
- package/dist/cabinet/definition.d.ts.map +1 -1
- package/dist/cabinet/definition.js +3 -0
- package/dist/cabinet/dimension-input.d.ts +6 -0
- package/dist/cabinet/dimension-input.d.ts.map +1 -0
- package/dist/cabinet/dimension-input.js +8 -0
- package/dist/cabinet/essential-controls.d.ts.map +1 -1
- package/dist/cabinet/essential-controls.js +82 -17
- package/dist/cabinet/index.d.ts +1 -1
- package/dist/cabinet/index.d.ts.map +1 -1
- package/dist/cabinet/index.js +1 -1
- package/dist/cabinet/kitchen-catalog.d.ts +17 -4
- package/dist/cabinet/kitchen-catalog.d.ts.map +1 -1
- package/dist/cabinet/kitchen-catalog.js +45 -7
- package/dist/cabinet/kitchen-collection.d.ts.map +1 -1
- package/dist/cabinet/kitchen-collection.js +21 -5
- package/dist/cabinet/kitchen-module-actions.d.ts.map +1 -1
- package/dist/cabinet/kitchen-module-actions.js +107 -14
- package/dist/cabinet/neighbor-placement.d.ts +10 -0
- package/dist/cabinet/neighbor-placement.d.ts.map +1 -1
- package/dist/cabinet/panel.d.ts.map +1 -1
- package/dist/cabinet/panel.js +127 -50
- package/dist/cabinet/run-finishing.d.ts +5 -0
- package/dist/cabinet/run-finishing.d.ts.map +1 -1
- package/dist/cabinet/run-ops.d.ts +5 -0
- package/dist/cabinet/run-ops.d.ts.map +1 -1
- package/dist/cabinet/run-panel.d.ts.map +1 -1
- package/dist/cabinet/run-panel.js +203 -52
- package/dist/cabinet/tool.d.ts.map +1 -1
- package/dist/cabinet/tool.js +8 -5
- package/dist/ceiling/build-up-section.d.ts +7 -0
- package/dist/ceiling/build-up-section.d.ts.map +1 -0
- package/dist/ceiling/build-up-section.js +57 -0
- package/dist/ceiling/definition.d.ts.map +1 -1
- package/dist/ceiling/definition.js +3 -1
- package/dist/ceiling/floorplan-affordances.d.ts +112 -0
- package/dist/ceiling/floorplan-affordances.d.ts.map +1 -1
- package/dist/ceiling/materials.d.ts +5 -0
- package/dist/ceiling/materials.d.ts.map +1 -1
- package/dist/ceiling/materials.js +17 -0
- package/dist/ceiling/panel-model.d.ts +13 -0
- package/dist/ceiling/panel-model.d.ts.map +1 -0
- package/dist/ceiling/panel-model.js +49 -0
- package/dist/ceiling/panel.d.ts.map +1 -1
- package/dist/ceiling/panel.js +82 -18
- package/dist/ceiling/renderer.d.ts.map +1 -1
- package/dist/ceiling/renderer.js +10 -4
- package/dist/ceiling/tool.d.ts.map +1 -1
- package/dist/ceiling/tool.js +24 -4
- package/dist/chimney/panel.d.ts.map +1 -1
- package/dist/chimney/panel.js +113 -41
- package/dist/column/definition.d.ts.map +1 -1
- package/dist/column/definition.js +3 -0
- package/dist/column/floorplan.d.ts.map +1 -1
- package/dist/column/floorplan.js +17 -0
- package/dist/column/hosted-resize.d.ts +28 -1
- package/dist/column/hosted-resize.d.ts.map +1 -1
- package/dist/column/panel.d.ts.map +1 -1
- package/dist/column/panel.js +125 -37
- package/dist/column/post-options.d.ts +10 -0
- package/dist/column/post-options.d.ts.map +1 -0
- package/dist/column/post-options.js +71 -0
- package/dist/column/post-placement.d.ts +78 -0
- package/dist/column/post-placement.d.ts.map +1 -0
- package/dist/column/post-placement.js +157 -0
- package/dist/column/post-section.d.ts +17 -0
- package/dist/column/post-section.d.ts.map +1 -0
- package/dist/column/post-section.js +95 -0
- package/dist/column/post-tool.d.ts +11 -0
- package/dist/column/post-tool.d.ts.map +1 -0
- package/dist/column/post-tool.js +94 -0
- package/dist/column/tool.d.ts +3 -10
- package/dist/column/tool.d.ts.map +1 -1
- package/dist/column/tool.js +13 -1
- package/dist/cupola/panel.d.ts.map +1 -1
- package/dist/cupola/panel.js +14 -7
- package/dist/door/actions.d.ts +7 -0
- package/dist/door/actions.d.ts.map +1 -0
- package/dist/door/actions.js +32 -0
- package/dist/door/contextual-dimensions.d.ts.map +1 -1
- package/dist/door/contextual-dimensions.js +11 -1
- package/dist/door/definition.d.ts.map +1 -1
- package/dist/door/definition.js +34 -7
- package/dist/door/floorplan-affordances.d.ts.map +1 -1
- package/dist/door/floorplan-affordances.js +5 -2
- package/dist/door/floorplan-move.d.ts.map +1 -1
- package/dist/door/floorplan-move.js +28 -6
- package/dist/door/floorplan.d.ts +2 -0
- package/dist/door/floorplan.d.ts.map +1 -1
- package/dist/door/floorplan.js +89 -16
- package/dist/door/move-tool.d.ts.map +1 -1
- package/dist/door/move-tool.js +60 -16
- package/dist/door/paint.d.ts +2 -7
- package/dist/door/paint.d.ts.map +1 -1
- package/dist/door/paint.js +26 -2
- package/dist/door/panel.d.ts.map +1 -1
- package/dist/door/panel.js +242 -90
- package/dist/door/parametrics.js +1 -1
- package/dist/door/placement.d.ts.map +1 -1
- package/dist/door/placement.js +9 -2
- package/dist/door/swing.d.ts +22 -0
- package/dist/door/swing.d.ts.map +1 -0
- package/dist/door/swing.js +36 -0
- package/dist/door/tool.d.ts.map +1 -1
- package/dist/door/tool.js +76 -29
- package/dist/dormer/panel-actions-section.d.ts.map +1 -1
- package/dist/dormer/panel-actions-section.js +3 -1
- package/dist/dormer/panel-position-section.d.ts.map +1 -1
- package/dist/dormer/panel-position-section.js +4 -3
- package/dist/dormer/panel-windows-section.d.ts.map +1 -1
- package/dist/dormer/panel-windows-section.js +38 -1
- package/dist/dormer/panel.d.ts.map +1 -1
- package/dist/dormer/panel.js +24 -18
- package/dist/downspout/inspector-editors.d.ts.map +1 -1
- package/dist/downspout/inspector-editors.js +3 -2
- package/dist/duct-fitting/inspector-editors.d.ts.map +1 -1
- package/dist/duct-fitting/inspector-editors.js +6 -1
- package/dist/duct-fitting/tool.d.ts.map +1 -1
- package/dist/duct-fitting/tool.js +11 -2
- package/dist/duct-terminal/tool.d.ts.map +1 -1
- package/dist/duct-terminal/tool.js +11 -2
- package/dist/elevator/panel.d.ts.map +1 -1
- package/dist/elevator/panel.js +41 -18
- package/dist/eyebrow-vent/panel.d.ts.map +1 -1
- package/dist/eyebrow-vent/panel.js +16 -6
- package/dist/fence/drafting.d.ts +2 -3
- package/dist/fence/drafting.d.ts.map +1 -1
- package/dist/fence/drafting.js +2 -3
- package/dist/fence/inspector-editors.d.ts.map +1 -1
- package/dist/fence/inspector-editors.js +64 -21
- package/dist/fence/move-endpoint-tool.d.ts.map +1 -1
- package/dist/fence/move-endpoint-tool.js +11 -2
- package/dist/fence/system.d.ts.map +1 -1
- package/dist/fence/system.js +13 -0
- package/dist/fence-feature/actions.d.ts.map +1 -1
- package/dist/fence-feature/actions.js +5 -2
- package/dist/fence-feature/inspector.d.ts.map +1 -1
- package/dist/fence-feature/inspector.js +150 -34
- package/dist/fence-feature/move-session.d.ts +1 -1
- package/dist/floor-opening/floorplan.d.ts +29 -6
- package/dist/floor-opening/floorplan.d.ts.map +1 -1
- package/dist/floor-opening/floorplan.js +172 -14
- package/dist/gutter/downspouts-panel.d.ts.map +1 -1
- package/dist/gutter/downspouts-panel.js +14 -2
- package/dist/hvac-equipment/tool.d.ts.map +1 -1
- package/dist/hvac-equipment/tool.js +3 -2
- package/dist/i18n/definition-messages.d.ts +5 -0
- package/dist/i18n/definition-messages.d.ts.map +1 -0
- package/dist/i18n/definition-messages.js +771 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/item/authored-params.d.ts.map +1 -1
- package/dist/item/authored-params.js +19 -4
- package/dist/item/floorplan.d.ts +1 -1
- package/dist/item/floorplan.d.ts.map +1 -1
- package/dist/item/panel.d.ts.map +1 -1
- package/dist/item/panel.js +9 -7
- package/dist/liquid-line/tool.d.ts.map +1 -1
- package/dist/liquid-line/tool.js +10 -3
- package/dist/measurement/tool.d.ts +1 -1
- package/dist/measurement/tool.d.ts.map +1 -1
- package/dist/measurement/tool.js +8 -8
- package/dist/pipe-fitting/tool.d.ts.map +1 -1
- package/dist/pipe-fitting/tool.js +3 -2
- package/dist/pipe-trap/tool.d.ts.map +1 -1
- package/dist/pipe-trap/tool.js +7 -2
- package/dist/procedural-item/renderer.d.ts.map +1 -1
- package/dist/procedural-item/renderer.js +8 -1
- package/dist/ridge-vent/panel.d.ts.map +1 -1
- package/dist/ridge-vent/panel.js +22 -9
- package/dist/roof/barrel-panel.d.ts.map +1 -1
- package/dist/roof/barrel-panel.js +7 -3
- package/dist/roof/definition.d.ts.map +1 -1
- package/dist/roof/definition.js +33 -3
- package/dist/roof/floorplan-overrides.d.ts +22 -0
- package/dist/roof/floorplan-overrides.d.ts.map +1 -0
- package/dist/roof/floorplan-overrides.js +46 -0
- package/dist/roof/floorplan-tool.d.ts +9 -0
- package/dist/roof/floorplan-tool.d.ts.map +1 -0
- package/dist/roof/floorplan-tool.js +168 -0
- package/dist/roof/floorplan.d.ts.map +1 -1
- package/dist/roof/floorplan.js +131 -41
- package/dist/roof/glazing-controls.d.ts +2 -1
- package/dist/roof/glazing-controls.d.ts.map +1 -1
- package/dist/roof/glazing-controls.js +51 -13
- package/dist/roof/glazing-panel-editor.d.ts.map +1 -1
- package/dist/roof/glazing-panel-editor.js +40 -13
- package/dist/roof/glazing-panel.d.ts.map +1 -1
- package/dist/roof/glazing-panel.js +73 -9
- package/dist/roof/paint.d.ts +19 -0
- package/dist/roof/paint.d.ts.map +1 -0
- package/dist/roof/paint.js +158 -0
- package/dist/roof/panel.d.ts.map +1 -1
- package/dist/roof/panel.js +90 -22
- package/dist/roof/renderer.d.ts.map +1 -1
- package/dist/roof/renderer.js +13 -2
- package/dist/roof/roof-footprint-source.d.ts +17 -0
- package/dist/roof/roof-footprint-source.d.ts.map +1 -1
- package/dist/roof/roof-footprint-source.js +14 -0
- package/dist/roof/roof-footprint.d.ts +36 -2
- package/dist/roof/roof-footprint.d.ts.map +1 -1
- package/dist/roof/roof-footprint.js +124 -2
- package/dist/roof/roof-materials.d.ts.map +1 -1
- package/dist/roof/roof-materials.js +10 -1
- package/dist/roof/roof-placement-mode.d.ts +0 -2
- package/dist/roof/roof-placement-mode.d.ts.map +1 -1
- package/dist/roof/roof-placement-mode.js +8 -6
- package/dist/roof/roof-plan-creases.d.ts +50 -0
- package/dist/roof/roof-plan-creases.d.ts.map +1 -0
- package/dist/roof/roof-plan-creases.js +194 -0
- package/dist/roof/roof-ridge-mode.d.ts +20 -0
- package/dist/roof/roof-ridge-mode.d.ts.map +1 -0
- package/dist/roof/roof-ridge-mode.js +16 -0
- package/dist/roof/tool.d.ts +17 -4
- package/dist/roof/tool.d.ts.map +1 -1
- package/dist/roof/tool.js +211 -113
- package/dist/roof/wall-catch.d.ts +106 -0
- package/dist/roof/wall-catch.d.ts.map +1 -0
- package/dist/roof/wall-catch.js +267 -0
- package/dist/roof-segment/build-up-section.d.ts +9 -0
- package/dist/roof-segment/build-up-section.d.ts.map +1 -0
- package/dist/roof-segment/build-up-section.js +191 -0
- package/dist/roof-segment/definition.d.ts.map +1 -1
- package/dist/roof-segment/definition.js +50 -5
- package/dist/roof-segment/floorplan-affordances.d.ts.map +1 -1
- package/dist/roof-segment/floorplan-affordances.js +68 -19
- package/dist/roof-segment/floorplan.d.ts.map +1 -1
- package/dist/roof-segment/floorplan.js +16 -12
- package/dist/roof-segment/paint.d.ts +3 -1
- package/dist/roof-segment/paint.d.ts.map +1 -1
- package/dist/roof-segment/paint.js +43 -2
- package/dist/roof-segment/panel-model.d.ts +23 -0
- package/dist/roof-segment/panel-model.d.ts.map +1 -0
- package/dist/roof-segment/panel-model.js +64 -0
- package/dist/roof-segment/panel.d.ts.map +1 -1
- package/dist/roof-segment/panel.js +96 -14
- package/dist/roof-segment/parametrics.d.ts.map +1 -1
- package/dist/roof-segment/parametrics.js +4 -0
- package/dist/roof-segment/renderer.d.ts.map +1 -1
- package/dist/roof-segment/renderer.js +26 -5
- package/dist/separator/definition.d.ts.map +1 -1
- package/dist/separator/definition.js +10 -12
- package/dist/separator/floorplan-affordances.d.ts +9 -0
- package/dist/separator/floorplan-affordances.d.ts.map +1 -0
- package/dist/separator/floorplan-affordances.js +23 -0
- package/dist/separator/floorplan.d.ts +9 -0
- package/dist/separator/floorplan.d.ts.map +1 -0
- package/dist/separator/floorplan.js +54 -0
- package/dist/separator/renderer.d.ts +4 -0
- package/dist/separator/renderer.d.ts.map +1 -1
- package/dist/separator/renderer.js +21 -6
- package/dist/separator/selection.d.ts +10 -0
- package/dist/separator/selection.d.ts.map +1 -0
- package/dist/separator/selection.js +35 -0
- package/dist/shared/build-up-controls.d.ts +88 -0
- package/dist/shared/build-up-controls.d.ts.map +1 -0
- package/dist/shared/build-up-controls.js +139 -0
- package/dist/shared/curtain-opening-limits.d.ts.map +1 -1
- package/dist/shared/curtain-opening-limits.js +44 -14
- package/dist/shared/item-interaction-actions.d.ts.map +1 -1
- package/dist/shared/item-interaction-actions.js +11 -2
- package/dist/shared/layer-thickness.d.ts +2 -0
- package/dist/shared/layer-thickness.d.ts.map +1 -0
- package/dist/shared/layer-thickness.js +3 -0
- package/dist/shared/move-roof-tool.d.ts.map +1 -1
- package/dist/shared/move-roof-tool.js +100 -5
- package/dist/shared/node-batch/batchable.d.ts +2 -0
- package/dist/shared/node-batch/batchable.d.ts.map +1 -1
- package/dist/shared/node-batch/batchable.js +4 -0
- package/dist/shared/node-batch/candidates.d.ts +21 -5
- package/dist/shared/node-batch/candidates.d.ts.map +1 -1
- package/dist/shared/node-batch/candidates.js +85 -50
- package/dist/shared/node-batch/system.d.ts.map +1 -1
- package/dist/shared/node-batch/system.js +24 -15
- package/dist/shared/opening-casing-move.d.ts +16 -0
- package/dist/shared/opening-casing-move.d.ts.map +1 -0
- package/dist/shared/opening-casing-move.js +33 -0
- package/dist/shared/opening-casing-section.d.ts +15 -0
- package/dist/shared/opening-casing-section.d.ts.map +1 -0
- package/dist/shared/opening-casing-section.js +38 -0
- package/dist/shared/opening-casing.d.ts +26 -0
- package/dist/shared/opening-casing.d.ts.map +1 -0
- package/dist/shared/opening-casing.js +80 -0
- package/dist/shared/opening-depth-position.d.ts +13 -0
- package/dist/shared/opening-depth-position.d.ts.map +1 -0
- package/dist/shared/opening-depth-position.js +34 -0
- package/dist/shared/opening-documentation.d.ts.map +1 -1
- package/dist/shared/opening-documentation.js +17 -8
- package/dist/shared/opening-guides-runtime.d.ts +2 -1
- package/dist/shared/opening-guides-runtime.d.ts.map +1 -1
- package/dist/shared/opening-guides-runtime.js +11 -7
- package/dist/shared/opening-labels.d.ts +11 -0
- package/dist/shared/opening-labels.d.ts.map +1 -0
- package/dist/shared/opening-labels.js +46 -0
- package/dist/shared/opening-placement-dimensions.d.ts.map +1 -1
- package/dist/shared/opening-placement-dimensions.js +11 -9
- package/dist/shared/opening-plane-offset.d.ts +4 -3
- package/dist/shared/opening-plane-offset.d.ts.map +1 -1
- package/dist/shared/opening-plane-offset.js +7 -4
- package/dist/shared/opening-swap.d.ts +8 -0
- package/dist/shared/opening-swap.d.ts.map +1 -0
- package/dist/shared/opening-swap.js +18 -0
- package/dist/shared/polygon-vertex-affordance.d.ts +19 -0
- package/dist/shared/polygon-vertex-affordance.d.ts.map +1 -1
- package/dist/shared/polygon-vertex-affordance.js +65 -6
- package/dist/shared/roof-opening-host.d.ts +2 -1
- package/dist/shared/roof-opening-host.d.ts.map +1 -1
- package/dist/shared/roof-opening-host.js +14 -5
- package/dist/shared/roof-wall-opening-cut.d.ts.map +1 -1
- package/dist/shared/roof-wall-opening-cut.js +14 -6
- package/dist/shared/roof-wall-opening-placement.d.ts +2 -1
- package/dist/shared/roof-wall-opening-placement.d.ts.map +1 -1
- package/dist/shared/roof-wall-opening-placement.js +6 -4
- package/dist/shared/run-hanger-inspector.d.ts.map +1 -1
- package/dist/shared/run-hanger-inspector.js +39 -5
- package/dist/shared/system-check-panel.d.ts.map +1 -1
- package/dist/shared/system-check-panel.js +94 -15
- package/dist/shared/wall-attach-target.d.ts.map +1 -1
- package/dist/shared/wall-attach-target.js +6 -3
- package/dist/shelf/definition.d.ts.map +1 -1
- package/dist/shelf/definition.js +2 -0
- package/dist/site/ground-hole.d.ts +3 -3
- package/dist/site/ground-hole.js +3 -3
- package/dist/site/ground-veil.d.ts +5 -12
- package/dist/site/ground-veil.d.ts.map +1 -1
- package/dist/site/ground-veil.js +9 -33
- package/dist/site/panel.d.ts.map +1 -1
- package/dist/site/panel.js +52 -12
- package/dist/site/renderer.d.ts.map +1 -1
- package/dist/site/renderer.js +52 -23
- package/dist/skylight/panel.d.ts.map +1 -1
- package/dist/skylight/panel.js +49 -19
- package/dist/slab/deck-geometry.d.ts +28 -0
- package/dist/slab/deck-geometry.d.ts.map +1 -0
- package/dist/slab/deck-geometry.js +320 -0
- package/dist/slab/definition.d.ts +2 -1
- package/dist/slab/definition.d.ts.map +1 -1
- package/dist/slab/definition.js +6 -1
- package/dist/slab/dependency-tracker.d.ts.map +1 -1
- package/dist/slab/dependency-tracker.js +3 -0
- package/dist/slab/floorplan-affordances.d.ts +500 -0
- package/dist/slab/floorplan-affordances.d.ts.map +1 -1
- package/dist/slab/geometry.d.ts.map +1 -1
- package/dist/slab/geometry.js +46 -9
- package/dist/slab/panel.d.ts.map +1 -1
- package/dist/slab/panel.js +97 -21
- package/dist/slab/renderer.d.ts +11 -0
- package/dist/slab/renderer.d.ts.map +1 -0
- package/dist/slab/renderer.js +19 -0
- package/dist/slab/system.d.ts.map +1 -1
- package/dist/slab/system.js +12 -1
- package/dist/solar-panel/panel.d.ts.map +1 -1
- package/dist/solar-panel/panel.js +49 -14
- package/dist/stair/construction-controls.d.ts +3 -1
- package/dist/stair/construction-controls.d.ts.map +1 -1
- package/dist/stair/construction-controls.js +75 -12
- package/dist/stair/paint.d.ts +6 -0
- package/dist/stair/paint.d.ts.map +1 -1
- package/dist/stair/panel.d.ts.map +1 -1
- package/dist/stair/panel.js +243 -51
- package/dist/stair/parametrics.d.ts.map +1 -1
- package/dist/stair/parametrics.js +7 -0
- package/dist/stair/placement-defaults.d.ts +18 -0
- package/dist/stair/placement-defaults.d.ts.map +1 -0
- package/dist/stair/placement-defaults.js +27 -0
- package/dist/stair/railing-controls.d.ts.map +1 -1
- package/dist/stair/railing-controls.js +78 -18
- package/dist/stair/renderer.d.ts.map +1 -1
- package/dist/stair/renderer.js +16 -10
- package/dist/stair/structure-controls.d.ts +18 -0
- package/dist/stair/structure-controls.d.ts.map +1 -0
- package/dist/stair/structure-controls.js +275 -0
- package/dist/stair/tool.d.ts.map +1 -1
- package/dist/stair/tool.js +13 -9
- package/dist/stair/use-stair-render-data.d.ts +41 -0
- package/dist/stair/use-stair-render-data.d.ts.map +1 -1
- package/dist/stair-segment/panel.d.ts.map +1 -1
- package/dist/stair-segment/panel.js +65 -18
- package/dist/turbine-vent/panel.d.ts.map +1 -1
- package/dist/turbine-vent/panel.js +14 -5
- package/dist/unit/unit-panel.d.ts.map +1 -1
- package/dist/unit/unit-panel.js +28 -12
- package/dist/wall/actions.d.ts +1 -1
- package/dist/wall/actions.d.ts.map +1 -1
- package/dist/wall/actions.js +17 -13
- package/dist/wall/construction-dimensions.d.ts +6 -0
- package/dist/wall/construction-dimensions.d.ts.map +1 -1
- package/dist/wall/construction-dimensions.js +8 -0
- package/dist/wall/contextual-dimensions.d.ts +6 -0
- package/dist/wall/contextual-dimensions.d.ts.map +1 -1
- package/dist/wall/contextual-dimensions.js +104 -17
- package/dist/wall/curtain-opening-frame.d.ts.map +1 -1
- package/dist/wall/curtain-opening-frame.js +6 -4
- package/dist/wall/curtain-wall-layout.d.ts +1 -1
- package/dist/wall/curtain-wall-layout.d.ts.map +1 -1
- package/dist/wall/curtain-wall-layout.js +6 -4
- package/dist/wall/curtain-wall-materials.d.ts.map +1 -1
- package/dist/wall/curtain-wall-materials.js +8 -3
- package/dist/wall/curtain-wall-panel.d.ts.map +1 -1
- package/dist/wall/curtain-wall-panel.js +241 -37
- package/dist/wall/curve-tool.d.ts.map +1 -1
- package/dist/wall/curve-tool.js +2 -3
- package/dist/wall/definition.d.ts.map +1 -1
- package/dist/wall/definition.js +20 -5
- package/dist/wall/floorplan-affordances.d.ts.map +1 -1
- package/dist/wall/floorplan-affordances.js +9 -6
- package/dist/wall/floorplan-move.d.ts.map +1 -1
- package/dist/wall/floorplan-move.js +66 -16
- package/dist/wall/floorplan.d.ts +4 -5
- package/dist/wall/floorplan.d.ts.map +1 -1
- package/dist/wall/floorplan.js +62 -46
- package/dist/wall/move-endpoint-tool.d.ts.map +1 -1
- package/dist/wall/move-endpoint-tool.js +1 -0
- package/dist/wall/move-tool.d.ts.map +1 -1
- package/dist/wall/move-tool.js +77 -12
- package/dist/wall/paint.d.ts +2 -2
- package/dist/wall/paint.d.ts.map +1 -1
- package/dist/wall/paint.js +11 -4
- package/dist/wall/panel-model.d.ts +17 -2
- package/dist/wall/panel-model.d.ts.map +1 -1
- package/dist/wall/panel-model.js +158 -18
- package/dist/wall/panel.d.ts +8 -0
- package/dist/wall/panel.d.ts.map +1 -1
- package/dist/wall/panel.js +228 -156
- package/dist/wall/parametrics.d.ts +1 -1
- package/dist/wall/parametrics.d.ts.map +1 -1
- package/dist/wall/parametrics.js +14 -1
- package/dist/wall/railing-wall-adapter.d.ts +7 -0
- package/dist/wall/railing-wall-adapter.d.ts.map +1 -0
- package/dist/wall/railing-wall-adapter.js +38 -0
- package/dist/wall/railing-wall-floorplan.d.ts +8 -0
- package/dist/wall/railing-wall-floorplan.d.ts.map +1 -0
- package/dist/wall/railing-wall-floorplan.js +27 -0
- package/dist/wall/railing-wall-geometry.d.ts +12 -0
- package/dist/wall/railing-wall-geometry.d.ts.map +1 -0
- package/dist/wall/railing-wall-geometry.js +51 -0
- package/dist/wall/railing-wall-guard.d.ts +81 -0
- package/dist/wall/railing-wall-guard.d.ts.map +1 -0
- package/dist/wall/railing-wall-guard.js +435 -0
- package/dist/wall/railing-wall-materials.d.ts +11 -0
- package/dist/wall/railing-wall-materials.d.ts.map +1 -0
- package/dist/wall/railing-wall-materials.js +31 -0
- package/dist/wall/railing-wall-panel-model.d.ts +30 -0
- package/dist/wall/railing-wall-panel-model.d.ts.map +1 -0
- package/dist/wall/railing-wall-panel-model.js +117 -0
- package/dist/wall/railing-wall-panel.d.ts +17 -0
- package/dist/wall/railing-wall-panel.d.ts.map +1 -0
- package/dist/wall/railing-wall-panel.js +42 -0
- package/dist/wall/rectangle-command.d.ts +79 -1
- 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 +2 -0
- package/dist/wall/renderer.d.ts.map +1 -1
- package/dist/wall/renderer.js +3 -1
- package/dist/wall/skirting-floor-gaps.d.ts +8 -0
- package/dist/wall/skirting-floor-gaps.d.ts.map +1 -0
- package/dist/wall/skirting-floor-gaps.js +36 -0
- package/dist/wall/system.d.ts +0 -14
- package/dist/wall/system.d.ts.map +1 -1
- package/dist/wall/system.js +6 -1
- package/dist/wall/tool.d.ts +16 -0
- package/dist/wall/tool.d.ts.map +1 -1
- package/dist/wall/tool.js +160 -47
- package/dist/wall/treatments.d.ts +3 -0
- package/dist/wall/treatments.d.ts.map +1 -1
- package/dist/wall/treatments.js +30 -7
- package/dist/window/actions.d.ts +7 -0
- package/dist/window/actions.d.ts.map +1 -0
- package/dist/window/actions.js +29 -0
- package/dist/window/definition.d.ts.map +1 -1
- package/dist/window/definition.js +11 -2
- package/dist/window/floorplan-move.d.ts.map +1 -1
- package/dist/window/floorplan-move.js +5 -0
- package/dist/window/floorplan.d.ts +2 -0
- package/dist/window/floorplan.d.ts.map +1 -1
- package/dist/window/floorplan.js +58 -1
- package/dist/window/mechanism.d.ts.map +1 -1
- package/dist/window/mechanism.js +21 -1
- package/dist/window/move-tool.d.ts.map +1 -1
- package/dist/window/move-tool.js +10 -3
- package/dist/window/paint.d.ts +2 -7
- package/dist/window/paint.d.ts.map +1 -1
- package/dist/window/paint.js +31 -3
- package/dist/window/panel.d.ts.map +1 -1
- package/dist/window/panel.js +311 -69
- package/dist/window/placement.d.ts.map +1 -1
- package/dist/window/placement.js +5 -1
- package/dist/window/swing.d.ts +13 -0
- package/dist/window/swing.d.ts.map +1 -0
- package/dist/window/swing.js +16 -0
- package/dist/window/tool.d.ts.map +1 -1
- package/dist/window/tool.js +19 -14
- package/dist/zone/floorplan-affordances.d.ts +136 -0
- package/dist/zone/floorplan-affordances.d.ts.map +1 -1
- package/dist/zone/quantities-panel.d.ts.map +1 -1
- package/dist/zone/quantities-panel.js +34 -9
- package/dist/zone/renderer.d.ts.map +1 -1
- package/dist/zone/renderer.js +9 -5
- package/package.json +14 -14
- package/dist/site/generic-foundation-geometry.d.ts +0 -16
- package/dist/site/generic-foundation-geometry.d.ts.map +0 -1
- package/dist/site/generic-foundation-geometry.js +0 -75
- package/dist/site/generic-foundation.d.ts +0 -4
- package/dist/site/generic-foundation.d.ts.map +0 -1
- package/dist/site/generic-foundation.js +0 -91
package/dist/wall/panel.js
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { assemblyThickness,
|
|
3
|
+
import { assemblyThickness, FRAMING_SPACINGS, GROUND_SUPPORT_ID, GYPSUM_HALF, GYPSUM_SHEATHING, getClampedWallCurveOffset, getMaxWallCurveOffset, getWallAssemblyPreset, getWallCurveLength, normalizeWallCurveOffset, resolveWallAssembly, runAsSingleSceneHistoryStep, terrainSupportLift, useLiveNodeOverrides, usePascalI18n, useScene, WALL_ASSEMBLY_PRESETS, WALL_CHAIR_RAIL_DEFAULT, WALL_CROWN_DEFAULT, WALL_SKIRTING_DEFAULT, WSP_SHEATHING, wallAssemblyFromLegacy, wallAssemblyPatch, wallAssemblyToLegacy, wallAssemblyUnverifiedNote, wallTrimPatch, } from '@pascal-app/core';
|
|
4
4
|
import { setWallFaceScript } from '@pascal-app/core/agent-operations';
|
|
5
|
-
import { ActionButton, ActionGroup, curveReshapeScope, finishScriptCode, formatLinearMeasurement, getLinearUnitLabel, linearControlValueToMeters, metersToLinearUnit, PanelSection, PanelWrapper, SegmentedControl, SliderControl, triggerSFX, useInteractionScope, WallPaintRegionList, } from '@pascal-app/editor';
|
|
5
|
+
import { ActionButton, ActionGroup, curveReshapeScope, finishScriptCode, formatLinearMeasurement, getLinearUnitLabel, linearControlValueToMeters, metersToLinearUnit, PanelSection, PanelWrapper, SegmentedControl, SliderControl, triggerSFX, useInteractionScope, useProjectWallTypes, WallPaintRegionList, WallTypeMenu, } from '@pascal-app/editor';
|
|
6
6
|
import { useViewer } from '@pascal-app/viewer';
|
|
7
7
|
import { Spline } from 'lucide-react';
|
|
8
8
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
9
9
|
import { useShallow } from 'zustand/react/shallow';
|
|
10
|
+
import { formatSpacing } from '../shared/build-up-controls.js';
|
|
11
|
+
import { formatLayerThickness, parseLayerThickness } from '../shared/layer-thickness.js';
|
|
10
12
|
import { resolveWallOpeningCeiling } from '../shared/wall-opening-ceiling.js';
|
|
11
13
|
import { CurtainWallPanel } from './curtain-wall-panel.js';
|
|
12
14
|
import { hasWallCurveBlockingChildren } from './curve-eligibility.js';
|
|
13
15
|
import { buildWallLengthPatch } from './length-patch.js';
|
|
14
|
-
import { wallReferenceModel } from './panel-model.js';
|
|
16
|
+
import { EXTERIOR_FINISH_DEFAULT, EXTERIOR_FINISH_OPTIONS, wallReferenceModel, } from './panel-model.js';
|
|
15
17
|
import { createWallPropertyPreview } from './property-preview.js';
|
|
18
|
+
import { RailingWallPanel } from './railing-wall-panel.js';
|
|
19
|
+
import { railingWallTypePatch } from './railing-wall-panel-model.js';
|
|
16
20
|
/**
|
|
17
21
|
* Base half of the plane-bound repair: a stamped draft offset goes, and a
|
|
18
22
|
* ground host is dropped unless sculpted terrain actually supports it — a
|
|
@@ -29,30 +33,50 @@ function wallBaseRepairPatch(n) {
|
|
|
29
33
|
: {}),
|
|
30
34
|
};
|
|
31
35
|
}
|
|
36
|
+
const WALL_REFERENCE_LABELS = {
|
|
37
|
+
outside: /* i18n */ { id: 'node.wall.reference.outside', message: 'Outside face' },
|
|
38
|
+
center: /* i18n */ { id: 'node.wall.reference.center', message: 'Center' },
|
|
39
|
+
inside: /* i18n */ { id: 'node.wall.reference.inside', message: 'Inside face' },
|
|
40
|
+
left: /* i18n */ { id: 'node.wall.reference.left', message: 'Left' },
|
|
41
|
+
right: /* i18n */ { id: 'node.wall.reference.right', message: 'Right' },
|
|
42
|
+
};
|
|
32
43
|
const WALL_TRIM_PROFILE_OPTIONS = {
|
|
33
44
|
skirting: [
|
|
34
|
-
{ label: 'Flat', value: 'flat' },
|
|
35
|
-
{ label: 'Modern', value: 'base-modern' },
|
|
36
|
-
{
|
|
37
|
-
|
|
38
|
-
|
|
45
|
+
{ label: /* i18n */ { id: 'node.wall.panel.flat', message: 'Flat' }, value: 'flat' },
|
|
46
|
+
{ label: /* i18n */ { id: 'node.wall.panel.modern', message: 'Modern' }, value: 'base-modern' },
|
|
47
|
+
{
|
|
48
|
+
label: /* i18n */ { id: 'node.wall.panel.colonial', message: 'Colonial' },
|
|
49
|
+
value: 'base-colonial',
|
|
50
|
+
},
|
|
51
|
+
{ label: /* i18n */ { id: 'node.wall.panel.shoe', message: 'Shoe' }, value: 'base-shoe' },
|
|
52
|
+
{ label: /* i18n */ { id: 'node.wall.panel.ogee', message: 'Ogee' }, value: 'base-ogee' },
|
|
39
53
|
],
|
|
40
54
|
crown: [
|
|
41
|
-
{ label: 'Flat', value: 'flat' },
|
|
42
|
-
{ label: 'Cove', value: 'crown-cove' },
|
|
43
|
-
{ label: 'Ogee', value: 'crown-ogee' },
|
|
44
|
-
{
|
|
45
|
-
|
|
55
|
+
{ label: /* i18n */ { id: 'node.wall.panel.flat', message: 'Flat' }, value: 'flat' },
|
|
56
|
+
{ label: /* i18n */ { id: 'node.wall.panel.cove', message: 'Cove' }, value: 'crown-cove' },
|
|
57
|
+
{ label: /* i18n */ { id: 'node.wall.panel.ogee', message: 'Ogee' }, value: 'crown-ogee' },
|
|
58
|
+
{
|
|
59
|
+
label: /* i18n */ { id: 'node.wall.panel.craft', message: 'Craft' },
|
|
60
|
+
value: 'crown-craftsman',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
label: /* i18n */ { id: 'node.wall.panel.layered', message: 'Layered' },
|
|
64
|
+
value: 'crown-layered',
|
|
65
|
+
},
|
|
46
66
|
],
|
|
47
67
|
chairRail: [
|
|
48
|
-
{ label: 'Flat', value: 'flat' },
|
|
49
|
-
{ label: 'Round', value: 'rail-rounded' },
|
|
50
|
-
{ label: 'Ogee', value: 'rail-ogee' },
|
|
51
|
-
{
|
|
52
|
-
|
|
68
|
+
{ label: /* i18n */ { id: 'node.wall.panel.flat', message: 'Flat' }, value: 'flat' },
|
|
69
|
+
{ label: /* i18n */ { id: 'node.wall.panel.round', message: 'Round' }, value: 'rail-rounded' },
|
|
70
|
+
{ label: /* i18n */ { id: 'node.wall.panel.ogee', message: 'Ogee' }, value: 'rail-ogee' },
|
|
71
|
+
{
|
|
72
|
+
label: /* i18n */ { id: 'node.wall.panel.picture', message: 'Picture' },
|
|
73
|
+
value: 'rail-picture',
|
|
74
|
+
},
|
|
75
|
+
{ label: /* i18n */ { id: 'node.wall.panel.step', message: 'Step' }, value: 'rail-stepped' },
|
|
53
76
|
],
|
|
54
77
|
};
|
|
55
78
|
export default function WallPanel() {
|
|
79
|
+
const i18n = usePascalI18n();
|
|
56
80
|
const selectedId = useViewer((s) => s.selection.selectedIds[0]);
|
|
57
81
|
const unit = useViewer((s) => s.unit);
|
|
58
82
|
const setSelection = useViewer((s) => s.setSelection);
|
|
@@ -172,34 +196,79 @@ export default function WallPanel() {
|
|
|
172
196
|
const skirting = { ...WALL_SKIRTING_DEFAULT, ...(node.skirting ?? {}) };
|
|
173
197
|
const crown = { ...WALL_CROWN_DEFAULT, ...(node.crown ?? {}) };
|
|
174
198
|
const chairRail = { ...WALL_CHAIR_RAIL_DEFAULT, ...(node.chairRail ?? {}) };
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
{
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
{
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
199
|
+
// A railing keeps its own height, its posts set its thickness, and it has no assembly or faces:
|
|
200
|
+
// the Railing section holds its controls instead.
|
|
201
|
+
const railing = node.wallType === 'railing';
|
|
202
|
+
return (_jsxs(PanelWrapper, { icon: "/icons/wall.webp", onClose: handleClose, title: node.name || i18n._({ id: 'node.wall.panel.wall', message: 'Wall' }), width: 280, children: [_jsx(PanelSection, { title: i18n._({ id: 'node.wall.panel.wallType', message: 'Wall type' }), children: _jsx(SegmentedControl, { onChange: (wallType) => handleUpdate(wallType === 'railing' ? railingWallTypePatch(node) : { wallType }), options: [
|
|
203
|
+
{
|
|
204
|
+
label: i18n._({ id: 'node.wall.panel.standard', message: 'Standard' }),
|
|
205
|
+
value: 'standard',
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
label: i18n._({ id: 'node.wall.panel.curtainWall', message: 'Curtain wall' }),
|
|
209
|
+
value: 'curtain',
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
label: i18n._({ id: 'node.wall.panel.railing', message: 'Railing' }),
|
|
213
|
+
value: 'railing',
|
|
214
|
+
},
|
|
215
|
+
], value: node.wallType ?? 'standard' }) }), node.wallType !== 'curtain' && !railing && (_jsx(WallAssemblySection, { node: node, onUpdate: handleUpdate, unit: unit })), _jsxs(PanelSection, { title: i18n._({ id: 'node.wall.panel.dimensions', message: 'Dimensions' }), children: [_jsx(SliderControl, { onCommit: handleCommit, onCancel: handleCancel, restoreOnCommit: false, previewWhileTyping: true, label: i18n._({ id: 'node.wall.panel.length', message: 'Length' }), max: metersToLinearUnit(1000, unit), min: metersToLinearUnit(0.1, unit), onChange: (value) => handleUpdateLength(linearControlValueToMeters(value, unit, { maxMeters: 1000, minMeters: 0.1 })), precision: 2, step: unit === 'imperial' ? 0.1 : 0.01, unit: unitLabel, value: displayLength }), !railing && (_jsxs(_Fragment, { children: [_jsx("div", { className: "px-1 font-medium text-[10px] text-muted-foreground/80 uppercase tracking-wider", children: i18n._({ id: 'node.wall.panel.top', message: 'Top' }) }), _jsx(SegmentedControl, { onChange: handleTopModeChange, options: [
|
|
216
|
+
{
|
|
217
|
+
label: i18n._({ id: 'node.wall.panel.followsLevel', message: 'Follows level' }),
|
|
218
|
+
value: 'storey',
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
label: i18n._({ id: 'node.wall.panel.customHeight', message: 'Custom height' }),
|
|
222
|
+
value: 'custom',
|
|
223
|
+
},
|
|
224
|
+
], value: isPlaneBound ? 'storey' : 'custom' }), isPlaneBound ? (_jsx("div", { className: "px-1 text-[11px] text-muted-foreground", children: i18n._({
|
|
225
|
+
id: 'node.panel.currently',
|
|
226
|
+
message: 'Currently {value}',
|
|
227
|
+
values: { value: formatLinearMeasurement(height, unit) },
|
|
228
|
+
}) })) : (_jsx(SliderControl, { onCommit: handleCommit, onCancel: handleCancel, restoreOnCommit: false, previewWhileTyping: true, label: i18n._({ id: 'node.wall.panel.height', message: 'Height' }), max: metersToLinearUnit(1000, unit), min: metersToLinearUnit(0.1, unit), onChange: (v) => handlePreview({
|
|
229
|
+
height: linearControlValueToMeters(v, unit, {
|
|
230
|
+
maxMeters: 1000,
|
|
231
|
+
minMeters: 0.1,
|
|
232
|
+
}),
|
|
233
|
+
}), 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: i18n._({ id: 'node.wall.panel.bottom', message: 'Bottom' }) }), _jsx(SegmentedControl, { onChange: handleInfillChange, options: [
|
|
234
|
+
{ label: i18n._({ id: 'node.wall.panel.auto', message: 'Auto' }), value: 'auto' },
|
|
235
|
+
{
|
|
236
|
+
label: i18n._({
|
|
237
|
+
id: 'node.wall.panel.fillToTerrain',
|
|
238
|
+
message: 'Fill to terrain',
|
|
239
|
+
}),
|
|
240
|
+
value: 'terrain',
|
|
241
|
+
},
|
|
242
|
+
], value: followsTerrain ? 'terrain' : 'auto' }), followsTerrain && (_jsx("div", { className: "px-1 text-[11px] text-muted-foreground", children: i18n._({
|
|
243
|
+
id: 'node.wall.panel.extendsDownwardToMeetTheTerrain',
|
|
244
|
+
message: 'Extends downward to meet the terrain. Height and top stay unchanged.',
|
|
245
|
+
}) })), 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: i18n._({ id: 'node.wall.panel.thickness', message: 'Thickness' }) }), _jsx("span", { className: "text-[11px] text-muted-foreground tabular-nums", children: i18n._({
|
|
246
|
+
id: 'node.wall.panel.thicknessFromAssembly',
|
|
247
|
+
message: '{thickness} · from assembly',
|
|
248
|
+
values: { thickness: formatLinearMeasurement(thickness, unit) },
|
|
249
|
+
}) })] })) : (_jsx(SliderControl, { onCommit: handleCommit, onCancel: handleCancel, restoreOnCommit: false, previewWhileTyping: true, label: node.wallType === 'curtain'
|
|
250
|
+
? i18n._({ id: 'node.wall.panel.frameDepth', message: 'Frame depth' })
|
|
251
|
+
: i18n._({ id: 'node.wall.panel.thickness', message: 'Thickness' }), max: metersToLinearUnit(1000, unit), min: metersToLinearUnit(0.05, unit), onChange: (v) => handlePreview({
|
|
252
|
+
thickness: linearControlValueToMeters(v, unit, {
|
|
253
|
+
maxMeters: 1000,
|
|
254
|
+
minMeters: 0.05,
|
|
255
|
+
}),
|
|
256
|
+
}), 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: i18n._({ id: 'node.wall.panel.reference', message: 'Reference' }) }), reference && (_jsx(SegmentedControl, { mixed: reference.value === null, onChange: (value) => reference.apply(value), options: reference.options.map((option) => ({
|
|
257
|
+
...option,
|
|
258
|
+
label: i18n._(WALL_REFERENCE_LABELS[option.value]),
|
|
259
|
+
})), value: reference.value ?? 'center' })), !hasWallChildrenBlockingCurve && (_jsx(SliderControl, { onCommit: handleCommit, onCancel: handleCancel, restoreOnCommit: false, previewWhileTyping: true, label: i18n._({ id: 'node.wall.panel.curve', message: 'Curve' }), max: Math.max(metersToLinearUnit(0.01, unit), displayMaxCurveOffset), min: -Math.max(metersToLinearUnit(0.01, unit), displayMaxCurveOffset), onChange: (v) => handlePreview({
|
|
192
260
|
curveOffset: normalizeWallCurveOffset(node, linearControlValueToMeters(v, unit, {
|
|
193
261
|
maxMeters: curveOffsetLimit,
|
|
194
262
|
minMeters: -curveOffsetLimit,
|
|
195
263
|
})),
|
|
196
|
-
}), 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)) :
|
|
264
|
+
}), 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)) : railing ? (_jsx(RailingWallPanel, { node: node, onUpdate: handleUpdate, onPreview: handlePreview, onCommit: handleCommit, onCancel: handleCancel, unit: unit }, node.id)) : (_jsxs(_Fragment, { children: [_jsx(WallPaintRegionList, { wallId: node.id }), _jsx(WallFaceScriptSection, { wallId: node.id }), _jsx(WallTrimSection, { node: node, onUpdate: handleUpdate, title: i18n._({ id: 'node.wall.panel.skirting', message: 'Skirting' }), trimKey: "skirting", trimValue: skirting, unit: unit, unitLabel: unitLabel, wallHeightMeters: wallHeightMeters }), _jsx(WallTrimSection, { node: node, onUpdate: handleUpdate, title: i18n._({ id: 'node.wall.panel.crownMolding', message: 'Crown molding' }), trimKey: "crown", trimValue: crown, unit: unit, unitLabel: unitLabel, wallHeightMeters: wallHeightMeters }), _jsx(WallTrimSection, { node: node, onUpdate: handleUpdate, title: i18n._({ id: 'node.wall.panel.chairRail', message: 'Chair rail' }), trimKey: "chairRail", trimValue: chairRail, unit: unit, unitLabel: unitLabel, wallHeightMeters: wallHeightMeters })] })), !hasWallChildrenBlockingCurve && (_jsx(PanelSection, { title: i18n._({ id: 'node.wall.panel.actions', message: 'Actions' }), children: _jsx(ActionGroup, { children: _jsx(ActionButton, { icon: _jsx(Spline, { className: "h-3.5 w-3.5" }), label: i18n._({ id: 'node.wall.panel.curve', message: 'Curve' }), onClick: handleCurve }) }) }))] }));
|
|
197
265
|
}
|
|
198
266
|
/**
|
|
199
267
|
* "Scripted finish": a face a script builds (it owns that face's colours, so Paint leaves it), with
|
|
200
268
|
* its code to read and a way to take it off, back to the face's own finish.
|
|
201
269
|
*/
|
|
202
270
|
function WallFaceScriptSection({ wallId }) {
|
|
271
|
+
const i18n = usePascalI18n();
|
|
203
272
|
const shas = useScene(useShallow((scene) => {
|
|
204
273
|
const wall = scene.nodes[wallId];
|
|
205
274
|
return wall?.type === 'wall'
|
|
@@ -208,19 +277,24 @@ function WallFaceScriptSection({ wallId }) {
|
|
|
208
277
|
}));
|
|
209
278
|
if (!(shas[0] || shas[1]))
|
|
210
279
|
return null;
|
|
211
|
-
return (_jsx(PanelSection, { title:
|
|
280
|
+
return (_jsx(PanelSection, { title: i18n._({ id: 'node.wall.panel.scriptedFinish', message: 'Scripted finish' }), children: ['a', 'b'].map((face, index) => {
|
|
212
281
|
const sha = shas[index];
|
|
213
282
|
return sha ? _jsx(WallFaceScriptRow, { face: face, sha: sha, wallId: wallId }, face) : null;
|
|
214
283
|
}) }));
|
|
215
284
|
}
|
|
216
285
|
function WallFaceScriptRow({ face, sha, wallId }) {
|
|
286
|
+
const i18n = usePascalI18n();
|
|
217
287
|
const [code, setCode] = useState(null);
|
|
218
288
|
const [open, setOpen] = useState(false);
|
|
289
|
+
const unreadable = i18n._({
|
|
290
|
+
id: 'editor.panels.scriptUnreadable',
|
|
291
|
+
message: 'The script could not be read.',
|
|
292
|
+
});
|
|
219
293
|
const toggleCode = () => {
|
|
220
294
|
setOpen((shown) => !shown);
|
|
221
295
|
if (code?.sha === sha)
|
|
222
296
|
return;
|
|
223
|
-
finishScriptCode(sha).then((text) => setCode({ sha, text: text ??
|
|
297
|
+
finishScriptCode(sha).then((text) => setCode({ sha, text: text ?? unreadable }), () => setCode({ sha, text: unreadable }));
|
|
224
298
|
};
|
|
225
299
|
const remove = () => {
|
|
226
300
|
const { changes } = setWallFaceScript(useScene.getState().nodes, { wallId, face, remove: true }, { activeLevelId: null });
|
|
@@ -229,33 +303,52 @@ function WallFaceScriptRow({ face, sha, wallId }) {
|
|
|
229
303
|
useScene.getState().updateNode(id, data);
|
|
230
304
|
});
|
|
231
305
|
};
|
|
232
|
-
return (_jsxs("div", { className: "flex flex-col gap-2", "data-wall-face-script": face, children: [_jsxs("div", { className: "flex min-h-8 items-center justify-between gap-3", children: [
|
|
306
|
+
return (_jsxs("div", { className: "flex flex-col gap-2", "data-wall-face-script": face, children: [_jsxs("div", { className: "flex min-h-8 items-center justify-between gap-3", children: [_jsx("span", { className: "text-muted-foreground text-xs", children: i18n._({
|
|
307
|
+
id: 'node.wall.panel.sideFace',
|
|
308
|
+
message: 'Side {face}',
|
|
309
|
+
values: { face: face.toUpperCase() },
|
|
310
|
+
}) }), _jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("button", { className: "rounded-full border border-border/50 px-2.5 py-0.5 text-xs transition-colors hover:bg-accent", onClick: toggleCode, type: "button", children: open
|
|
311
|
+
? i18n._({ id: 'node.wall.panel.hideCode', message: 'Hide code' })
|
|
312
|
+
: i18n._({ id: 'node.wall.panel.viewCode', message: 'View code' }) }), _jsx("button", { className: "rounded-full border border-border/50 px-2.5 py-0.5 text-xs transition-colors hover:bg-accent", onClick: remove, type: "button", children: i18n._({ id: 'node.wall.panel.remove', message: 'Remove' }) })] })] }), open && (_jsx("pre", { className: "max-h-60 overflow-auto whitespace-pre rounded-lg border border-border/50 p-2 font-mono text-[11px] text-foreground", children: code?.sha === sha
|
|
313
|
+
? code.text
|
|
314
|
+
: i18n._({ id: 'node.wall.panel.loading', message: 'Loading…' }) }))] }));
|
|
233
315
|
}
|
|
234
316
|
function WallTrimSection({ node, onUpdate, title, trimKey, trimValue, unit, unitLabel, wallHeightMeters, }) {
|
|
317
|
+
const i18n = usePascalI18n();
|
|
235
318
|
const updateTrim = (patch) => onUpdate(wallTrimPatch(node, trimKey, patch));
|
|
236
319
|
const profileOptions = WALL_TRIM_PROFILE_OPTIONS[trimKey];
|
|
237
320
|
const selectedProfile = profileOptions.some((option) => option.value === trimValue.profile)
|
|
238
321
|
? trimValue.profile
|
|
239
322
|
: profileOptions[0].value;
|
|
240
|
-
return (_jsxs(PanelSection, { title: title, children: [_jsx(ActionGroup, { children: _jsx(ActionButton, { label: trimValue.enabled
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
323
|
+
return (_jsxs(PanelSection, { title: title, children: [_jsx(ActionGroup, { children: _jsx(ActionButton, { label: trimValue.enabled
|
|
324
|
+
? i18n._({
|
|
325
|
+
id: 'node.wall.trim.hide',
|
|
326
|
+
message: '{trim, select, skirting {Hide skirting} crown {Hide crown molding} other {Hide chair rail}}',
|
|
327
|
+
values: { trim: trimKey },
|
|
328
|
+
})
|
|
329
|
+
: i18n._({
|
|
330
|
+
id: 'node.wall.trim.show',
|
|
331
|
+
message: '{trim, select, skirting {Show skirting} crown {Show crown molding} other {Show chair rail}}',
|
|
332
|
+
values: { trim: trimKey },
|
|
333
|
+
}), onClick: () => updateTrim({ enabled: !trimValue.enabled }) }) }), trimValue.enabled && (_jsxs(_Fragment, { children: [_jsx(SegmentedControl, { onChange: (next) => updateTrim({ sides: next }), options: [
|
|
334
|
+
{ label: i18n._({ id: 'node.wall.panel.sideA', message: 'Side A' }), value: 'a' },
|
|
335
|
+
{ label: i18n._({ id: 'node.wall.panel.sideB', message: 'Side B' }), value: 'b' },
|
|
336
|
+
{ label: i18n._({ id: 'node.wall.panel.both', message: 'Both' }), value: 'both' },
|
|
244
337
|
], value: trimValue.sides === 'interior'
|
|
245
338
|
? 'a'
|
|
246
339
|
: trimValue.sides === 'exterior'
|
|
247
340
|
? 'b'
|
|
248
|
-
: trimValue.sides }), _jsx(SegmentedControl, { onChange: (next) => updateTrim({ profile: next }), options: profileOptions, value: selectedProfile }), _jsx(SliderControl, { label:
|
|
341
|
+
: trimValue.sides }), _jsx(SegmentedControl, { onChange: (next) => updateTrim({ profile: next }), options: profileOptions.map((option) => ({ ...option, label: i18n._(option.label) })), value: selectedProfile }), _jsx(SliderControl, { label: i18n._({ id: 'node.wall.panel.height', message: 'Height' }), max: metersToLinearUnit(Math.max(0.05, wallHeightMeters), unit), min: metersToLinearUnit(0.01, unit), onChange: (value) => updateTrim({
|
|
249
342
|
height: linearControlValueToMeters(value, unit, {
|
|
250
343
|
maxMeters: Math.max(0.05, wallHeightMeters),
|
|
251
344
|
minMeters: 0.01,
|
|
252
345
|
}),
|
|
253
|
-
}), precision: 2, step: 0.01, unit: unitLabel, value: metersToLinearUnit(trimValue.height, unit) }), _jsx(SliderControl, { label:
|
|
346
|
+
}), precision: 2, step: 0.01, unit: unitLabel, value: metersToLinearUnit(trimValue.height, unit) }), _jsx(SliderControl, { label: i18n._({ id: 'node.wall.panel.depth', message: 'Depth' }), max: metersToLinearUnit(0.2, unit), min: metersToLinearUnit(0.001, unit), onChange: (value) => updateTrim({
|
|
254
347
|
proud: linearControlValueToMeters(value, unit, {
|
|
255
348
|
maxMeters: 0.2,
|
|
256
349
|
minMeters: 0.001,
|
|
257
350
|
}),
|
|
258
|
-
}), precision: 3, step: 0.005, unit: unitLabel, value: metersToLinearUnit(trimValue.proud, unit) }), trimKey === 'chairRail' && (_jsx(SliderControl, { label:
|
|
351
|
+
}), precision: 3, step: 0.005, unit: unitLabel, value: metersToLinearUnit(trimValue.proud, unit) }), trimKey === 'chairRail' && (_jsx(SliderControl, { label: i18n._({ id: 'node.wall.panel.offset', message: 'Offset' }), max: metersToLinearUnit(Math.max(0.05, wallHeightMeters - trimValue.height), unit), min: metersToLinearUnit(0, unit), onChange: (value) => updateTrim({
|
|
259
352
|
offsetY: linearControlValueToMeters(value, unit, {
|
|
260
353
|
maxMeters: Math.max(0.05, wallHeightMeters - trimValue.height),
|
|
261
354
|
minMeters: 0,
|
|
@@ -270,70 +363,6 @@ function WallTrimSection({ node, onUpdate, title, trimKey, trimValue, unit, unit
|
|
|
270
363
|
// here goes through `wallAssemblyPatch`, which writes the layer stack AND the
|
|
271
364
|
// re-derived total in one `updateNode` call, so the 2D plan and the 3D wall
|
|
272
365
|
// both move on the same store tick.
|
|
273
|
-
const METRES_PER_INCH = 0.0254;
|
|
274
|
-
/**
|
|
275
|
-
* Imperial-friendly thickness input. Accepts `5/8`, `5/8"`, `7/16 in`,
|
|
276
|
-
* `1-1/4"`, `1 1/2"`, `12mm`, `0.012m`. A bare number means INCHES in imperial
|
|
277
|
-
* display and MILLIMETRES in metric — wall layers are millimetre-scale and
|
|
278
|
-
* typing `0.0127` for half-inch board is nobody's idea of usable.
|
|
279
|
-
*/
|
|
280
|
-
function parseLayerThickness(raw, unit) {
|
|
281
|
-
const text = raw.trim().toLowerCase().replace(/["”]/g, ' in ');
|
|
282
|
-
if (!text)
|
|
283
|
-
return null;
|
|
284
|
-
const explicit = /(mm|cm|m|in|ft|')\s*$/.exec(text);
|
|
285
|
-
const suffix = explicit?.[1];
|
|
286
|
-
const body = (suffix ? text.slice(0, explicit?.index) : text).trim();
|
|
287
|
-
// `1-1/4` / `1 1/2` / `5/8` / `0.4375`
|
|
288
|
-
const mixed = /^(\d+(?:\.\d+)?)[\s-]+(\d+)\s*\/\s*(\d+)$/.exec(body);
|
|
289
|
-
const fraction = /^(\d+)\s*\/\s*(\d+)$/.exec(body);
|
|
290
|
-
let value;
|
|
291
|
-
if (mixed) {
|
|
292
|
-
value = Number(mixed[1]) + Number(mixed[2]) / Number(mixed[3]);
|
|
293
|
-
}
|
|
294
|
-
else if (fraction) {
|
|
295
|
-
value = Number(fraction[1]) / Number(fraction[2]);
|
|
296
|
-
}
|
|
297
|
-
else {
|
|
298
|
-
value = Number(body);
|
|
299
|
-
}
|
|
300
|
-
if (!Number.isFinite(value) || value < 0)
|
|
301
|
-
return null;
|
|
302
|
-
switch (suffix) {
|
|
303
|
-
case 'mm':
|
|
304
|
-
return value / 1000;
|
|
305
|
-
case 'cm':
|
|
306
|
-
return value / 100;
|
|
307
|
-
case 'm':
|
|
308
|
-
return value;
|
|
309
|
-
case 'in':
|
|
310
|
-
return value * METRES_PER_INCH;
|
|
311
|
-
case 'ft':
|
|
312
|
-
case "'":
|
|
313
|
-
return value * 12 * METRES_PER_INCH;
|
|
314
|
-
default:
|
|
315
|
-
return unit === 'imperial' ? value * METRES_PER_INCH : value / 1000;
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
/** Nearest common fraction of an inch, so 0.0111 m reads back as `7/16"`. */
|
|
319
|
-
function formatLayerThickness(metres, unit) {
|
|
320
|
-
if (unit !== 'imperial')
|
|
321
|
-
return `${Math.round(metres * 1000 * 10) / 10} mm`;
|
|
322
|
-
const inchValue = metres / METRES_PER_INCH;
|
|
323
|
-
const sixteenths = Math.round(inchValue * 16);
|
|
324
|
-
if (Math.abs(inchValue * 16 - sixteenths) > 1e-6)
|
|
325
|
-
return `${Math.round(inchValue * 1000) / 1000}"`;
|
|
326
|
-
const whole = Math.floor(sixteenths / 16);
|
|
327
|
-
let numerator = sixteenths % 16;
|
|
328
|
-
let denominator = 16;
|
|
329
|
-
while (numerator % 2 === 0 && numerator > 0) {
|
|
330
|
-
numerator /= 2;
|
|
331
|
-
denominator /= 2;
|
|
332
|
-
}
|
|
333
|
-
if (numerator === 0)
|
|
334
|
-
return `${whole}"`;
|
|
335
|
-
return whole > 0 ? `${whole}-${numerator}/${denominator}"` : `${numerator}/${denominator}"`;
|
|
336
|
-
}
|
|
337
366
|
const SELECT_CLASS = 'h-7 w-full rounded border border-border bg-background px-2 text-[11px] text-foreground outline-none focus:border-primary';
|
|
338
367
|
const INPUT_CLASS = 'h-7 w-full rounded border border-border bg-background px-2 text-[11px] text-foreground outline-none focus:border-primary';
|
|
339
368
|
const ROW_LABEL_CLASS = 'w-[68px] shrink-0 text-[10px] text-muted-foreground uppercase tracking-wide';
|
|
@@ -359,47 +388,62 @@ function ThicknessInput({ metres, onCommit, unit, }) {
|
|
|
359
388
|
}
|
|
360
389
|
}, spellCheck: false, value: display }));
|
|
361
390
|
}
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
{
|
|
368
|
-
{
|
|
369
|
-
|
|
391
|
+
/**
|
|
392
|
+
* The Exterior select's names for the finishes of the list it shares with the
|
|
393
|
+
* multi-selection controls (`EXTERIOR_FINISH_OPTIONS`, in `panel-model`).
|
|
394
|
+
*/
|
|
395
|
+
const EXTERIOR_FINISH_LABELS = {
|
|
396
|
+
none: /* i18n */ { id: 'node.wall.panel.none', message: 'None' },
|
|
397
|
+
siding: /* i18n */ { id: 'node.wall.panel.lapSiding', message: 'Lap siding' },
|
|
398
|
+
'fiber-cement': /* i18n */ { id: 'node.wall.panel.fiberCement', message: 'Fiber cement' },
|
|
399
|
+
stucco: /* i18n */ { id: 'node.wall.panel.stucco', message: 'Stucco' },
|
|
400
|
+
brick: /* i18n */ { id: 'node.wall.panel.brickVeneer', message: 'Brick veneer' },
|
|
401
|
+
stone: /* i18n */ { id: 'node.wall.panel.stoneVeneer', message: 'Stone veneer' },
|
|
402
|
+
};
|
|
370
403
|
const SHEATHING_OPTIONS = [
|
|
371
|
-
{ value: 'none', label: 'None' },
|
|
372
|
-
{ value: 'osb', label: 'OSB' },
|
|
373
|
-
{ value: 'plywood', label: 'Plywood' },
|
|
374
|
-
{ value: 'gypsum', label: 'Gypsum' },
|
|
404
|
+
{ value: 'none', label: /* i18n */ { id: 'node.wall.panel.none', message: 'None' } },
|
|
405
|
+
{ value: 'osb', label: /* i18n */ { id: 'node.wall.panel.osb', message: 'OSB' } },
|
|
406
|
+
{ value: 'plywood', label: /* i18n */ { id: 'node.wall.panel.plywood', message: 'Plywood' } },
|
|
407
|
+
{ value: 'gypsum', label: /* i18n */ { id: 'node.wall.panel.gypsum', message: 'Gypsum' } },
|
|
375
408
|
];
|
|
376
409
|
const FRAMING_OPTIONS = [
|
|
377
|
-
{ value: 'wood', label: 'Wood studs' },
|
|
378
|
-
{ value: 'lgs', label: 'Steel studs' },
|
|
379
|
-
{ value: 'cmu', label: 'CMU' },
|
|
380
|
-
{ value: 'icf', label: 'ICF' },
|
|
410
|
+
{ value: 'wood', label: /* i18n */ { id: 'node.wall.panel.woodStuds', message: 'Wood studs' } },
|
|
411
|
+
{ value: 'lgs', label: /* i18n */ { id: 'node.wall.panel.steelStuds', message: 'Steel studs' } },
|
|
412
|
+
{ value: 'cmu', label: /* i18n */ { id: 'node.wall.panel.cmu', message: 'CMU' } },
|
|
413
|
+
{ value: 'icf', label: /* i18n */ { id: 'node.wall.panel.icf', message: 'ICF' } },
|
|
381
414
|
];
|
|
415
|
+
const spacingKey = (metres) => metres.toFixed(6);
|
|
416
|
+
/**
|
|
417
|
+
* The stud spacings to pick from, the framing list roofs and ceilings use, keeping a stored one
|
|
418
|
+
* off the list; and the one stored (null for the framer's default).
|
|
419
|
+
*/
|
|
420
|
+
export function studSpacingChoices(stored) {
|
|
421
|
+
const listed = FRAMING_SPACINGS.find((size) => stored !== undefined && Math.abs(size - stored) < 1e-6);
|
|
422
|
+
const current = stored === undefined ? null : (listed ?? stored);
|
|
423
|
+
return {
|
|
424
|
+
sizes: current === null || listed !== undefined ? FRAMING_SPACINGS : [current, ...FRAMING_SPACINGS],
|
|
425
|
+
current,
|
|
426
|
+
};
|
|
427
|
+
}
|
|
382
428
|
const INTERIOR_FINISH_OPTIONS = [
|
|
383
|
-
{ value: 'none', label: 'None' },
|
|
384
|
-
{ value: 'drywall', label: 'Drywall' },
|
|
385
|
-
{ value: 'plaster', label: 'Plaster' },
|
|
429
|
+
{ value: 'none', label: /* i18n */ { id: 'node.wall.panel.none', message: 'None' } },
|
|
430
|
+
{ value: 'drywall', label: /* i18n */ { id: 'node.wall.panel.drywall', message: 'Drywall' } },
|
|
431
|
+
{ value: 'plaster', label: /* i18n */ { id: 'node.wall.panel.plaster', message: 'Plaster' } },
|
|
386
432
|
];
|
|
387
|
-
/** Cited default thickness for a finish the user just switched to. */
|
|
388
|
-
const EXTERIOR_FINISH_DEFAULT = {
|
|
389
|
-
none: 0,
|
|
390
|
-
siding: SIDING_LAP,
|
|
391
|
-
'fiber-cement': FIBER_CEMENT,
|
|
392
|
-
stucco: STUCCO_3_COAT,
|
|
393
|
-
brick: BRICK_VENEER + BRICK_AIR_SPACE,
|
|
394
|
-
stone: STONE_VENEER_UNVERIFIED,
|
|
395
|
-
};
|
|
396
433
|
function WallAssemblySection({ node, onUpdate, unit, }) {
|
|
434
|
+
const i18n = usePascalI18n();
|
|
397
435
|
const stack = node.assembly;
|
|
398
436
|
// The cladding / sheathing / framing / interior editor works on the WS5 view
|
|
399
437
|
// of the F2 stack; a stack it cannot express is listed read-only.
|
|
400
438
|
const assembly = stack ? (wallAssemblyToLegacy(stack) ?? undefined) : undefined;
|
|
439
|
+
const studSpacing = studSpacingChoices(assembly?.framing.spacing);
|
|
401
440
|
const resolved = resolveWallAssembly(node);
|
|
402
441
|
const presetNote = wallAssemblyUnverifiedNote(node);
|
|
442
|
+
// The project's own wall types sit beside the presets and apply the same way.
|
|
443
|
+
const projectTypes = useProjectWallTypes();
|
|
444
|
+
const presetId = stack?.presetId;
|
|
445
|
+
const knownPreset = !!presetId &&
|
|
446
|
+
(!!getWallAssemblyPreset(presetId) || projectTypes.some((type) => type.id === presetId));
|
|
403
447
|
// Every write goes through wallAssemblyPatch so `thickness` is re-derived.
|
|
404
448
|
// Changing any layer clears `preset` — the stack is no longer that preset.
|
|
405
449
|
const apply = (next) => onUpdate(wallAssemblyPatch(wallAssemblyFromLegacy(next)));
|
|
@@ -409,25 +453,27 @@ function WallAssemblySection({ node, onUpdate, unit, }) {
|
|
|
409
453
|
const next = mutate({ ...assembly });
|
|
410
454
|
apply({ ...next, preset: undefined });
|
|
411
455
|
};
|
|
412
|
-
return (_jsxs(PanelSection, { title:
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
456
|
+
return (_jsxs(PanelSection, { title: i18n._({ id: 'node.wall.panel.assembly', message: 'Assembly' }), children: [_jsxs(LayerRow, { label: i18n._({ id: 'node.wall.panel.preset', message: 'Preset' }), children: [_jsxs("select", { className: SELECT_CLASS, onChange: (event) => {
|
|
457
|
+
const id = event.target.value;
|
|
458
|
+
if (!id) {
|
|
459
|
+
onUpdate({ assembly: undefined });
|
|
460
|
+
return;
|
|
461
|
+
}
|
|
462
|
+
const preset = getWallAssemblyPreset(id) ?? projectTypes.find((type) => type.id === id);
|
|
463
|
+
if (preset)
|
|
464
|
+
onUpdate(wallAssemblyPatch(structuredClone(preset.assembly)));
|
|
465
|
+
}, value: knownPreset ? presetId : '', children: [_jsx("option", { value: "", children: stack
|
|
466
|
+
? i18n._({ id: 'node.wall.panel.custom', message: 'Custom' })
|
|
467
|
+
: i18n._({ id: 'node.wall.panel.noneSingleLayer', message: 'None (single layer)' }) }), WALL_ASSEMBLY_PRESETS.map((preset) => (_jsx("option", { value: preset.id, children: preset.label }, preset.id))), projectTypes.length > 0 ? (_jsx("optgroup", { label: i18n._({ id: 'node.wall.panel.thisProject', message: 'This project' }), children: projectTypes.map((type) => (_jsx("option", { value: type.id, children: type.label }, type.id))) })) : null] }), _jsx(WallTypeMenu, { assembly: stack, onApply: (type) => onUpdate(wallAssemblyPatch(structuredClone(type.assembly))), placement: node.frontSide === 'exterior' || node.backSide === 'exterior' ? 'exterior' : 'interior' })] }), assembly && (_jsxs(_Fragment, { children: [_jsxs(LayerRow, { label: i18n._({ id: 'node.wall.panel.exterior', message: 'Exterior' }), children: [_jsx("select", { className: SELECT_CLASS, onChange: (event) => {
|
|
422
468
|
const finish = event.target.value;
|
|
423
469
|
edit((draft) => ({
|
|
424
470
|
...draft,
|
|
425
471
|
exterior: { finish, thickness: EXTERIOR_FINISH_DEFAULT[finish] },
|
|
426
472
|
}));
|
|
427
|
-
}, value: assembly.exterior?.finish ?? 'none', children: EXTERIOR_FINISH_OPTIONS.map((option) => (_jsx("option", { value: option.value, children: option.
|
|
473
|
+
}, value: assembly.exterior?.finish ?? 'none', children: EXTERIOR_FINISH_OPTIONS.map((option) => (_jsx("option", { value: option.value, children: i18n._(EXTERIOR_FINISH_LABELS[option.value]) }, option.value))) }), assembly.exterior && assembly.exterior.finish !== 'none' && (_jsx(ThicknessInput, { metres: assembly.exterior.thickness, onCommit: (thickness) => edit((draft) => ({
|
|
428
474
|
...draft,
|
|
429
475
|
exterior: { finish: draft.exterior?.finish ?? 'siding', thickness },
|
|
430
|
-
})), unit: unit }))] }), _jsxs(LayerRow, { label:
|
|
476
|
+
})), unit: unit }))] }), _jsxs(LayerRow, { label: i18n._({ id: 'node.wall.panel.sheathing', message: 'Sheathing' }), children: [_jsx("select", { className: SELECT_CLASS, onChange: (event) => {
|
|
431
477
|
const material = event.target.value;
|
|
432
478
|
edit((draft) => ({
|
|
433
479
|
...draft,
|
|
@@ -440,16 +486,29 @@ function WallAssemblySection({ node, onUpdate, unit, }) {
|
|
|
440
486
|
: WSP_SHEATHING,
|
|
441
487
|
},
|
|
442
488
|
}));
|
|
443
|
-
}, 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) => ({
|
|
489
|
+
}, value: assembly.sheathing?.material ?? 'none', children: SHEATHING_OPTIONS.map((option) => (_jsx("option", { value: option.value, children: i18n._(option.label) }, option.value))) }), assembly.sheathing && assembly.sheathing.material !== 'none' && (_jsx(ThicknessInput, { metres: assembly.sheathing.thickness, onCommit: (thickness) => edit((draft) => ({
|
|
444
490
|
...draft,
|
|
445
491
|
sheathing: { material: draft.sheathing?.material ?? 'osb', thickness },
|
|
446
|
-
})), unit: unit }))] }), _jsxs(LayerRow, { label:
|
|
492
|
+
})), unit: unit }))] }), _jsxs(LayerRow, { label: i18n._({ id: 'node.wall.panel.framing', message: 'Framing' }), children: [_jsx("select", { className: SELECT_CLASS, onChange: (event) => edit((draft) => {
|
|
493
|
+
const kind = event.target.value;
|
|
494
|
+
// Block and ICF have no studs to space.
|
|
495
|
+
const studs = kind === 'wood' || kind === 'lgs';
|
|
496
|
+
const { spacing, ...framing } = draft.framing;
|
|
497
|
+
return {
|
|
498
|
+
...draft,
|
|
499
|
+
framing: { ...framing, kind, ...(studs && spacing ? { spacing } : {}) },
|
|
500
|
+
};
|
|
501
|
+
}), value: assembly.framing.kind, children: FRAMING_OPTIONS.map((option) => (_jsx("option", { value: option.value, children: i18n._(option.label) }, option.value))) }), _jsx(ThicknessInput, { metres: assembly.framing.depth, onCommit: (depth) => edit((draft) => ({ ...draft, framing: { ...draft.framing, depth } })), unit: unit })] }), (assembly.framing.kind === 'wood' || assembly.framing.kind === 'lgs') && (_jsx(LayerRow, { label: i18n._({ id: 'node.wall.panel.studs', message: 'Studs' }), children: _jsxs("select", { className: SELECT_CLASS, onChange: (event) => {
|
|
502
|
+
const spacing = studSpacing.sizes.find((size) => spacingKey(size) === event.target.value);
|
|
503
|
+
edit((draft) => ({
|
|
447
504
|
...draft,
|
|
448
505
|
framing: {
|
|
449
|
-
kind:
|
|
506
|
+
kind: draft.framing.kind,
|
|
450
507
|
depth: draft.framing.depth,
|
|
508
|
+
...(spacing !== undefined ? { spacing } : {}),
|
|
451
509
|
},
|
|
452
|
-
}))
|
|
510
|
+
}));
|
|
511
|
+
}, value: studSpacing.current === null ? '' : spacingKey(studSpacing.current), children: [_jsx("option", { value: "", children: i18n._({ id: 'node.wall.panel.framersDefault', message: "Framer's default" }) }), studSpacing.sizes.map((spacing) => (_jsx("option", { value: spacingKey(spacing), children: formatSpacing(spacing, unit, i18n) }, spacingKey(spacing))))] }) })), _jsxs(LayerRow, { label: i18n._({ id: 'node.wall.panel.interior', message: 'Interior' }), children: [_jsx("select", { className: SELECT_CLASS, onChange: (event) => {
|
|
453
512
|
const finish = event.target.value;
|
|
454
513
|
edit((draft) => ({
|
|
455
514
|
...draft,
|
|
@@ -458,8 +517,21 @@ function WallAssemblySection({ node, onUpdate, unit, }) {
|
|
|
458
517
|
thickness: finish === 'none' ? 0 : (draft.interior?.thickness ?? GYPSUM_HALF),
|
|
459
518
|
},
|
|
460
519
|
}));
|
|
461
|
-
}, 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) => ({
|
|
520
|
+
}, value: assembly.interior?.finish ?? 'none', children: INTERIOR_FINISH_OPTIONS.map((option) => (_jsx("option", { value: option.value, children: i18n._(option.label) }, option.value))) }), assembly.interior && assembly.interior.finish !== 'none' && (_jsx(ThicknessInput, { metres: assembly.interior.thickness, onCommit: (thickness) => edit((draft) => ({
|
|
462
521
|
...draft,
|
|
463
522
|
interior: { finish: draft.interior?.finish ?? 'drywall', thickness },
|
|
464
|
-
})), 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:
|
|
523
|
+
})), 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: i18n._({ id: 'node.wall.panel.totalThickness', message: '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: i18n._({
|
|
524
|
+
id: 'node.wall.panel.partitionTheInteriorFinishIsApplied',
|
|
525
|
+
message: 'Partition: the interior finish is applied to both faces.',
|
|
526
|
+
}) })), resolved.kind === 'envelope' && resolved.exteriorSide == null && (_jsx("div", { className: "px-2 pb-1.5 text-[10px] text-muted-foreground", children: i18n._({
|
|
527
|
+
id: 'node.wall.panel.whichFaceIsOutsideIsUndetermined',
|
|
528
|
+
message: 'Which face is outside is undetermined (no room detected on either side) — the exterior layers are drawn on side B.',
|
|
529
|
+
}) })), presetNote && (_jsx("div", { className: "px-2 pb-2 text-[10px] text-amber-600 dark:text-amber-400", children: i18n._({
|
|
530
|
+
id: 'node.wall.panel.unverifiedPresetnote',
|
|
531
|
+
message: 'Unverified: {presetNote}',
|
|
532
|
+
values: { presetNote },
|
|
533
|
+
}) })), _jsx("div", { className: "px-2 pb-2 text-[10px] text-muted-foreground", children: i18n._({
|
|
534
|
+
id: 'node.wall.panel.layerThicknessesFollowThe2021Irc',
|
|
535
|
+
message: 'Layer thicknesses follow the 2021 IRC assembly data. Drafting aid, not engineering — verify with the authority having jurisdiction.',
|
|
536
|
+
}) })] })), 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: i18n._({ id: 'node.wall.panel.totalThickness', message: 'Total thickness' }) }), _jsx("span", { className: "font-medium text-[11px] text-foreground tabular-nums", children: formatLayerThickness(assemblyThickness(stack), unit) })] })] }))] }));
|
|
465
537
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parametrics.d.ts","sourceRoot":"","sources":["../../src/wall/parametrics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"parametrics.d.ts","sourceRoot":"","sources":["../../src/wall/parametrics.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AACpF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAExC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,EAAE,oBAAoB,CAAC,QAAQ,CAmC1D,CAAA"}
|