From 9750a6c2bf988273390cdd003033c356631f77e9 Mon Sep 17 00:00:00 2001 From: Josh Knapp Date: Tue, 14 Jul 2026 06:44:37 -0700 Subject: [PATCH 1/2] feat(builder): containers package -- vertical alignment + box-model/anim/vis rollout - ColumnLayout: exposes style.alignItems on its flex ROW (aligns uneven columns) -- render/toHtml already spread `style` onto the row div, so this is a craft.props default + panel control addition, no structural change. - Container/Section: root element is now unconditionally display:flex; flex-direction:column (both editor render and toHtml), so the new Vertical Alignment control maps to style.justifyContent, paired with a Min Height (NumericUnitInput) control on style.minHeight. Default justify-content/align-items reproduce ordinary block-flow stacking, so this is a visual no-op for existing published content. Works in both normal and "boxed" (contentWidth) modes -- the boxed inner wrapper's own margin:0-auto horizontal centering is preserved via flex auto-margin override semantics. - ContainerStylePanel (serves Container/Section/Columns) distinguishes the Columns case from Container/Section via nodeProps.columns/split presence (no typeName plumbing needed) to pick align-items vs justify-content for the shared Vertical Alignment control. - All 3 owned components: added margin/padding (per-side)/border/box-shadow/ opacity style defaults + AnimationControl/VisibilityControl-backed animation/animationDelay/hideOnDesktop/hideOnTablet/hideOnMobile props. New containerBoxModel.tsx (package-local, not shared.tsx) DRYs the box-model + border/effects + animation/visibility panel sections across the single shared ContainerStylePanel, mirroring the sibling media package's mediaBoxModel.tsx. - Tests: extended all 3 *.toHtml.test.ts files (align-items/justify-content/ min-height emission, box-model style emission, craft.props presence). 673 tests green, tsc + vite build clean. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../layout/ColumnLayout.toHtml.test.ts | 53 +++++++ craft/src/components/layout/ColumnLayout.tsx | 19 ++- .../layout/Container.toHtml.test.ts | 68 +++++++++ craft/src/components/layout/Container.tsx | 32 ++++- .../components/layout/Section.toHtml.test.ts | 62 ++++++++ craft/src/components/layout/Section.tsx | 32 ++++- .../right/styles/ContainerStylePanel.tsx | 48 ++++++- .../panels/right/styles/containerBoxModel.tsx | 135 ++++++++++++++++++ 8 files changed, 445 insertions(+), 4 deletions(-) create mode 100644 craft/src/panels/right/styles/containerBoxModel.tsx diff --git a/craft/src/components/layout/ColumnLayout.toHtml.test.ts b/craft/src/components/layout/ColumnLayout.toHtml.test.ts index 90c6770..af7d827 100644 --- a/craft/src/components/layout/ColumnLayout.toHtml.test.ts +++ b/craft/src/components/layout/ColumnLayout.toHtml.test.ts @@ -80,3 +80,56 @@ describe('ColumnLayout.toHtml XSS hardening (gap into