efficient-web-builder 57.1.0 → 59.0.0
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/CHANGELOG.md +52 -0
- package/dist/editor/components/SectionIcon.js +1 -1
- package/dist/editor/components/WebsiteScreenParts.js +1 -1
- package/dist/editor/components/storefront-editor.css +30 -0
- package/dist/editor/lib/animation/hover-fields.js +1 -1
- package/dist/editor/lib/document/ColourControl.js +1 -1
- package/dist/editor/lib/document/blocks/general/CardList/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Cards/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Chart/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Contents/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Countdown/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Divider/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/FAQ/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ListSearch/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/general/ListSearch/fields.js +1 -0
- package/dist/editor/lib/document/blocks/general/Mockup/fields.js +2 -2
- package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
- package/dist/editor/lib/document/blocks/general/index.js +1 -1
- package/dist/editor/lib/document/box-fields.d.ts +1 -0
- package/dist/editor/lib/document/box-fields.js +1 -1
- package/dist/editor/lib/document/card-display-chips.d.ts +7 -5
- package/dist/editor/lib/document/card-display-chips.js +1 -1
- package/dist/editor/lib/document/card-row-fields.d.ts +2 -1
- package/dist/editor/lib/document/card-row-fields.js +1 -1
- package/dist/editor/lib/document/controls.d.ts +13 -1
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/sections/text-layouts.js +1 -1
- package/dist/format/lib/animation/hover.js +1 -1
- package/dist/format/lib/content/accordion-row-style.d.ts +10 -0
- package/dist/format/lib/content/accordion-row-style.js +1 -0
- package/dist/format/lib/content/box-angle.d.ts +9 -0
- package/dist/format/lib/content/box-angle.js +1 -0
- package/dist/format/lib/content/box-background.d.ts +3 -0
- package/dist/format/lib/content/box-background.js +1 -1
- package/dist/format/lib/content/box-layout.d.ts +3 -0
- package/dist/format/lib/content/box-layout.js +1 -1
- package/dist/format/lib/content/card-columns.d.ts +1 -0
- package/dist/format/lib/content/card-columns.js +1 -0
- package/dist/format/lib/content/card-place.d.ts +4 -0
- package/dist/format/lib/content/card-place.js +1 -1
- package/dist/format/lib/content/card-state.d.ts +17 -0
- package/dist/format/lib/content/card-state.js +1 -1
- package/dist/format/lib/content/card-template.d.ts +3 -0
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/copies-in-box.d.ts +2 -0
- package/dist/format/lib/content/copies-in-box.js +1 -0
- package/dist/format/lib/content/gallery-layout.d.ts +13 -1
- package/dist/format/lib/content/gallery-layout.js +1 -1
- package/dist/format/lib/content/list-query.d.ts +7 -0
- package/dist/format/lib/content/list-query.js +1 -0
- package/dist/format/lib/content/page-background.js +1 -1
- package/dist/format/lib/content/part-display.js +1 -1
- package/dist/format/lib/content/section-background.js +1 -1
- package/dist/format/lib/content/view-hide-class.d.ts +11 -0
- package/dist/format/lib/content/view-hide-class.js +1 -0
- package/dist/format/lib/document/blocks/general/Chart/meta.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/Chart/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Countdown/meta.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/Countdown/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/FAQ/card-seed.d.ts +7 -0
- package/dist/format/lib/document/blocks/general/FAQ/card-seed.js +1 -0
- package/dist/format/lib/document/blocks/general/FAQ/meta.d.ts +6 -0
- package/dist/format/lib/document/blocks/general/FAQ/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/ListSearch/meta.d.ts +6 -0
- package/dist/format/lib/document/blocks/general/ListSearch/meta.js +1 -0
- package/dist/format/lib/document/blocks/general/Mockup/meta.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/Mockup/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/PaymentBadges/meta.d.ts +6 -0
- package/dist/format/lib/document/blocks/general/PaymentBadges/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/metas.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/metas.js +1 -1
- package/dist/format/lib/document/blocks/general/text-part-shapes.json +28 -0
- package/dist/format/lib/document/box-footer.js +1 -1
- package/dist/format/lib/document/card-row-keys.d.ts +14 -0
- package/dist/format/lib/document/card-row-keys.js +1 -0
- package/dist/format/lib/document/cards-template-on-read.d.ts +1 -1
- package/dist/format/lib/document/cards-template-on-read.js +1 -1
- package/dist/format/lib/document/container-blocks.js +1 -1
- package/dist/format/lib/document/general-order.d.ts +1 -1
- package/dist/format/lib/document/general-order.js +1 -1
- package/dist/format/lib/document/list-search-scopes.d.ts +4 -0
- package/dist/format/lib/document/list-search-scopes.js +1 -0
- package/dist/format/lib/document/neutralization-contracts.js +1 -1
- package/dist/format/lib/document/part-inks.d.ts +6 -2
- package/dist/format/lib/document/part-inks.js +1 -1
- package/dist/format/lib/document/section-catalog.js +2 -2
- package/dist/format/lib/document/theme-slots.d.ts +20 -0
- package/dist/format/lib/document/theme-slots.js +1 -0
- package/dist/format/lib/editor-words-catalogue.d.ts +10 -0
- package/dist/format/lib/editor-words-catalogue.js +4 -4
- package/dist/format/lib/editor-words-kept.js +1 -1
- package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
- package/dist/format/lib/theme.d.ts +1 -0
- package/dist/format/lib/theme.js +4 -4
- package/dist/render/components/BoxAccordionRow.d.ts +3 -1
- package/dist/render/components/BoxAccordionRow.js +1 -1
- package/dist/render/components/BoxTabPaneContext.d.ts +5 -0
- package/dist/render/components/BoxTabPaneContext.js +1 -1
- package/dist/render/components/CardRowContext.d.ts +3 -1
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/Cards.d.ts +2 -1
- package/dist/render/components/Cards.js +1 -1
- package/dist/render/components/CategoryBar.d.ts +1 -1
- package/dist/render/components/CategoryBar.js +1 -1
- package/dist/render/components/ChartSection.d.ts +2 -1
- package/dist/render/components/ChartSection.js +1 -1
- package/dist/render/components/ContactLocations.js +2 -2
- package/dist/render/components/ContentsList.d.ts +3 -3
- package/dist/render/components/ContentsList.js +1 -1
- package/dist/render/components/Countdown.d.ts +2 -1
- package/dist/render/components/Countdown.js +1 -1
- package/dist/render/components/Divider.d.ts +1 -2
- package/dist/render/components/Divider.js +1 -1
- package/dist/render/components/DocBody.js +5 -5
- package/dist/render/components/DocMasthead.js +1 -1
- package/dist/render/components/DocMetaCards.js +1 -1
- package/dist/render/components/DocTabs.js +1 -1
- package/dist/render/components/Eyebrow.d.ts +2 -1
- package/dist/render/components/Eyebrow.js +1 -1
- package/dist/render/components/FAQ.d.ts +6 -1
- package/dist/render/components/FAQ.js +1 -1
- package/dist/render/components/FeaturedCover.d.ts +2 -1
- package/dist/render/components/FeaturedCover.js +1 -1
- package/dist/render/components/Flex.d.ts +3 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/Footprint.js +1 -1
- package/dist/render/components/HeroGroup.d.ts +1 -1
- package/dist/render/components/HeroGroup.js +1 -1
- package/dist/render/components/HeroPictures.js +1 -1
- package/dist/render/components/HeroSection.js +1 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/HeroSlide.d.ts +1 -1
- package/dist/render/components/HeroSlide.js +1 -1
- package/dist/render/components/InBoxContext.d.ts +1 -1
- package/dist/render/components/InBoxContext.js +1 -1
- package/dist/render/components/IntegrationsSection.js +1 -1
- package/dist/render/components/IntroBleed.js +1 -1
- package/dist/render/components/JoinBox.js +1 -1
- package/dist/render/components/KeyFeatures.js +1 -1
- package/dist/render/components/ListSearchBox.d.ts +7 -0
- package/dist/render/components/ListSearchBox.js +1 -0
- package/dist/render/components/LocationMap.d.ts +2 -1
- package/dist/render/components/LocationMap.js +1 -1
- package/dist/render/components/Logo.d.ts +3 -1
- package/dist/render/components/Logo.js +1 -1
- package/dist/render/components/LogoBlock.js +1 -1
- package/dist/render/components/LongRead.js +1 -1
- package/dist/render/components/Manifesto.js +1 -1
- package/dist/render/components/Masthead.js +1 -1
- package/dist/render/components/MockupSection.d.ts +2 -1
- package/dist/render/components/MockupSection.js +1 -1
- package/dist/render/components/ParagraphsA.d.ts +2 -1
- package/dist/render/components/ParagraphsA.js +1 -1
- package/dist/render/components/PostCard.d.ts +2 -1
- package/dist/render/components/PostCard.js +1 -1
- package/dist/render/components/ProcessSteps.js +1 -1
- package/dist/render/components/Prose.js +1 -1
- package/dist/render/components/SectionAnimation.d.ts +3 -2
- package/dist/render/components/SectionAnimation.js +1 -1
- package/dist/render/components/SectionEyebrow.d.ts +2 -1
- package/dist/render/components/SectionEyebrow.js +1 -1
- package/dist/render/components/Series.js +1 -1
- package/dist/render/components/SiteGutterFrame.d.ts +2 -2
- package/dist/render/components/SiteGutterFrame.js +1 -1
- package/dist/render/components/Spacer.js +1 -1
- package/dist/render/components/SpecStrip.js +1 -1
- package/dist/render/components/StatsParagraph.js +1 -1
- package/dist/render/components/Testimonials.js +1 -1
- package/dist/render/components/TickerSection.js +1 -1
- package/dist/render/components/Timeline.js +1 -1
- package/dist/render/components/TimelineTrack.js +1 -1
- package/dist/render/components/TitleWithButtons.js +1 -1
- package/dist/render/components/ViewHideRoot.d.ts +23 -0
- package/dist/render/components/ViewHideRoot.js +1 -0
- package/dist/render/lib/content/block-size.d.ts +0 -2
- package/dist/render/lib/content/block-size.js +1 -1
- package/dist/render/lib/content/page-contents.js +1 -1
- package/dist/render/lib/document/blocks/general/CardList/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Cards/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Chart/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Contents/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Countdown/render.js +1 -1
- package/dist/render/lib/document/blocks/general/CustomHTML/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Divider/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Eyebrow/render.js +1 -1
- package/dist/render/lib/document/blocks/general/FAQ/render.js +1 -1
- package/dist/render/lib/document/blocks/general/FeaturedCover/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
- package/dist/render/lib/document/blocks/general/ListSearch/render.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/ListSearch/render.js +1 -0
- package/dist/render/lib/document/blocks/general/LocationMap/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Mockup/render.js +2 -2
- package/dist/render/lib/document/blocks/general/OrderSummary/card-seed.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/OrderSummary/card-seed.js +1 -0
- package/dist/render/lib/document/blocks/general/ParagraphsA/render.js +1 -1
- package/dist/render/lib/document/blocks/general/PaymentBadges/render.js +1 -1
- package/dist/render/lib/document/blocks/general/PostCard/render.js +1 -1
- package/dist/render/lib/document/blocks/general/SectionHeader/render.js +1 -1
- package/dist/render/lib/document/blocks/general/renders.d.ts +1 -0
- package/dist/render/lib/document/blocks/general/renders.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +3 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.d.ts +3 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-checkout.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-checkout.js +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-docbody.js +2 -2
- package/dist/render/lib/document/blocks/general/section-to-box-rows-head.d.ts +12 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.d.ts +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-promo.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-promo.js +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-proof.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-proof.js +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-stats.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/head-core-boxes.js +1 -1
- package/dist/render/lib/document/page-render.js +1 -1
- package/dist/render/lib/document/passes/block-size.js +1 -1
- package/dist/render/lib/document/passes/borders.js +1 -1
- package/dist/render/lib/document/passes/box-join.js +1 -1
- package/dist/render/lib/document/passes/cell-width.js +1 -1
- package/dist/render/lib/document/passes/corners.js +1 -1
- package/dist/render/lib/document/passes/head-core.js +1 -1
- package/dist/render/lib/document/passes/hidden-nodes.d.ts +2 -0
- package/dist/render/lib/document/passes/hidden-nodes.js +1 -0
- package/dist/render/lib/document/passes/index.js +1 -1
- package/dist/render/lib/document/passes/section-anchor.js +1 -1
- package/dist/render/lib/document/passes/section-animation.js +1 -1
- package/dist/render/lib/document/passes/section-height.js +1 -1
- package/dist/render/lib/document/passes/section-padding.js +1 -1
- package/dist/render/lib/document/passes/section-sticky.js +1 -1
- package/dist/render/lib/document/passes/section-theme.js +1 -1
- package/dist/render/lib/document/passes/section-width.js +1 -1
- package/dist/render/lib/document/slot-counts.js +1 -1
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/package.json +3 -3
- package/dist/editor/lib/document/theme-swatches.d.ts +0 -3
- package/dist/editor/lib/document/theme-swatches.js +0 -1
- package/dist/format/lib/document/passes/hidden-nodes.d.ts +0 -2
- package/dist/format/lib/document/passes/hidden-nodes.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hasWords as
|
|
1
|
+
import{hasWords as C,registerSectionToBox as t}from"../../../sections/section-to-box.js";import{BUTTON as m,DIM as g,DROP_COMMON as a,DROP_SIDE_PADDING as c,INNER_BOX as o,leadLine as v,SAME_KEYS as s,SECTION_BOX as d,TEXT as l,innerPad as T,siteGutterOf as A,innerPadKeys as y,smallText as O,wrapperPad as u,wrapperPadKeys as P}from"./section-to-box-row-parts.js";import{CARDS_SECTION_TO_BOX as H}from"./section-to-box-rows-cards.js";import{normalizeSiteGutterPhone as R,siteGutterPhoneFollows as X}from"../../../../../format/lib/content/page-width.js";import{finiteNumber as D}from"../../../../../format/lib/finite-number.js";import{STATS_SECTION_TO_BOX as L}from"./section-to-box-rows-stats.js";import{LOGOS_SECTION_TO_BOX as W}from"./section-to-box-rows-logos.js";import{STRIP_SECTION_TO_BOX as G}from"./section-to-box-rows-strip.js";import{TIMELINE_SECTION_TO_BOX as M}from"./section-to-box-rows-timeline.js";import{LOCATIONS_SECTION_TO_BOX as F}from"./section-to-box-rows-locations.js";import{HEAD_ONLY_SECTION_TO_BOX as K}from"./section-to-box-rows-head.js";import{PAGE_HEADER_SECTION_TO_BOX as U}from"./section-to-box-rows-pageheader.js";import{DOCBODY_SECTION_TO_BOX as z}from"./section-to-box-rows-docbody.js";import{EDITORIAL_SECTION_TO_BOX as Y}from"./section-to-box-rows-editorial.js";import{FORMS_SECTION_TO_BOX as j}from"./section-to-box-rows-forms.js";import{CHECKOUT_SECTION_TO_BOX as q}from"./section-to-box-rows-checkout.js";import{PROOF_SECTION_TO_BOX as J}from"./section-to-box-rows-proof.js";import{PROMO_SECTION_TO_BOX as Q}from"./section-to-box-rows-promo.js";import{FITMENT_SECTION_TO_BOX as V}from"./section-to-box-rows-fitment.js";import{fluidToken as Z,headTree as S,token as i}from"./section-head-looks.js";import{boxPadding as $}from"../../../../../format/lib/document/seed-parts.js";const _={top:72,bottom:72,topPhone:72,bottomPhone:72},ee={name:"Editorial Text",boxProps:e=>({...d,direction:"column",gap:28,gapPhone:28,sectionBorder:{top:1},...u(e,_)}),box:[["topBorder","sectionBorder",e=>e===!1?void 0:{top:1}],...s,...P(_)],parts:[S("Prose"),{kind:"text",key:"body",props:g,style:{textStyle:"body-1",...i("body",16),lineHeight:1.7,paragraphSpacing:18}}],drop:{...a,...c,headPlacement:"needs a row per head placement: an own-box Prose draws no head (its words sit in a Section Header above it), the row always draws the head. 0 of 123 live nodes store it (the live export, 2026-10-24)"}},f={buttonPaddingTop:20,buttonPaddingBottom:20,buttonPaddingLeft:28,buttonPaddingRight:28},w=(e,n)=>n?.variant==="primary",k=(e,n)=>({kind:"list",key:"buttons",name:"Button",flat:!0,when:e,parts:[{kind:"button",key:"label",href:"href",when:w,variant:"primary",style:{letterSpacing:.3},props:{...m,...f,...n}},{kind:"button",key:"label",href:"href",when:(r,p)=>!w(r,p),variant:"ghost",style:{letterSpacing:.3},props:{...m,...f,...n}}]}),h=e=>C(e.title),te={name:"Call-to-Action Heading",boxProps:e=>({...d,direction:"row",align:"center",justify:h(e)?"between":"end",gap:60,gapPhone:60,share:"content",sectionBorder:{bottom:1},...T(e,"TitleWithButtons")}),box:[...s,...y("TitleWithButtons")],parts:[{kind:"group",name:"Title",props:{...o,maxWidth:1e3,widthFitPhone:"fill"},parts:[{kind:"text",key:"title",role:"heading",props:l,style:{textStyle:"heading-1",...Z("headingLarge",48,7,108),case:"upper",lineHeight:.94,letterSpacing:-.035}}]},{kind:"group",name:"Buttons",props:e=>({...o,gap:14,gapPhone:14,widthFitPhone:"fill",...h(e)?{minWidth:280,minWidthPhone:0}:{}}),parts:[k(h,{widthFit:"fill",iconPosition:"end"}),k(e=>!h(e),{})]}],drop:{...a,buttonsAlign:"moves the buttons only when there is no heading (4 of 128 live nodes), where the Box puts them at the end. 0 of 128 live nodes store it (the live export, 2026-10-24)",buttonsAlignPhone:"the phone's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Phone view's Block alignment row), so nothing moves",buttonsAlignTablet:"the tablet's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Tablet view's Block alignment row, 0 stored on the US sites 2026-11-05), so nothing moves"}};function oe(e){const{siteGutter:n,siteGutterPhone:r}=e.site??{},p=A(e),b=Math.min(20,R(r)??X(n));return{sectionPaddingLeft:p,sectionPaddingRight:p,sectionPaddingLeftPhone:b,sectionPaddingRightPhone:b}}const B={top:40,bottom:64,topPhone:24,bottomPhone:36},ne={name:"Section Header",boxProps:(e,n)=>({...d,direction:"column",gap:0,...u(e,B),...oe(n)}),box:[...s,...P(B)],parts:[S("SectionHeader")],drop:{...a,...c,headStyle:"needs a row per head look: the row draws the standard look; the editorial, simple, statement, natural and essay looks are other layouts. 0 of 69 live nodes store it (the live export, 2026-10-24)",eyebrowLook:"read only by the simple, statement, natural and essay looks, which this row does not draw. 0 of 69 live nodes store it",rowGap:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",descriptionSize:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",numStyle:"Solid (the default; 4 of 69 live nodes store it) IS the eyebrow Text the row draws; Outlined (0 live) needs an outlined-number text look"}},x={...o,direction:"row",share:[67],gap:30},E={...o,sectionPaddingLeft:30,sectionPaddingLeftPhone:0},N=(e,n,r)=>({kind:"group",name:e,props:n,parts:[r]}),ie={name:"Lead Text",boxProps:e=>({...d,direction:"column",gap:40,gapPhone:40,sectionBorder:{bottom:1},...T(e,"ParagraphsA")}),box:[...s,...y("ParagraphsA")],parts:[{kind:"group",name:"Numbers",props:{...x,gapPhone:24,sectionBorder:{bottom:1},sectionPaddingBottom:40,sectionPaddingBottomPhone:40},parts:[{kind:"group",name:"Eyebrow",props:{...o,sectionPaddingTop:5,sectionPaddingBottom:1,sectionPaddingTopPhone:5,sectionPaddingBottomPhone:1},parts:[O("eyebrow",{color:"labels",...i("label",12),letterSpacing:.24})]},N("Stats column",o,{kind:"group",name:"Stats",props:{...E,gap:0,gapPhone:0},parts:[{kind:"list",key:"stats",name:"Stat",flat:!0,parts:[v("value","label",{...i("label",13),letterSpacing:.18,lineHeight:1.8})]}]})]},{kind:"group",name:"Words",props:{...x,gapPhone:28},parts:[{kind:"group",name:"Lead",props:o,parts:[{kind:"group",name:"Measure",props:{...o,maxWidth:780},parts:[{kind:"text",key:"lead",props:l,style:{textStyle:"heading-3",...i("headingSmall",22,20),weight:400,case:"none",lineHeight:1.45,letterSpacing:-.005}}]}]},N("Note column",{...o,justify:"end",widthFit:"fill"},{kind:"group",name:"Founders",props:{...E,gap:8,gapPhone:8},parts:[{kind:"group",name:"Note",props:{...o,gap:6,gapPhone:6},parts:[{kind:"text",key:"foundersHeading",props:l,style:{textStyle:"body-1",fontRole:"heading",...i("body",18,16),weight:500,letterSpacing:-.01,lineHeight:1.7}},{kind:"text",key:"foundersBody",props:g,style:{textStyle:"body-5",fontRole:"heading",...i("body",14,12),lineHeight:1.7}}]},O("attribution",{...i("label",12,10),letterSpacing:.24,lineHeight:1.7})]})]}],drop:{...a}},I={top:24,bottom:24,topPhone:24,bottomPhone:24},re={name:"Banner",boxProps:e=>({...d,direction:"column",gap:0,...u(e,I)}),box:[...s,"contained",...P(I)],parts:[{kind:"group",name:"Card",keepEmpty:!0,props:{...o,gap:28,placement:"top-left",darken:60,darkenStyle:"even",sectionBorder:{width:1},...$(64,40,40,24)},box:[["imageSrc","bgImage"],["overlay","darken",e=>Math.min(Math.max(D(e)??60,0),100)]],parts:[{kind:"group",name:"Words",props:{...o,gap:20},parts:[O("eyebrow"),{kind:"text",key:"title",role:"heading",props:{...l,maxWidth:680},style:{weight:500,lineHeight:1.05,letterSpacing:-.03,case:"none"}},{kind:"text",key:"body",props:{...g,maxWidth:680},style:{textStyle:"body-1",lineHeight:1.6},was:{size:16}}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:m}]}],drop:{...a,...c}},ae={Prose:ee,TitleWithButtons:te,SectionHeader:ne,ParagraphsA:ie,Banner:re};function Ee(){t(ae),t(L),t(W),t(H),t(G),t(M),t(F),t(K),t(U),t(z),t(Y),t(j),t(q),t(V),t(J),t(Q)}export{ae as GENERAL_SECTION_TO_BOX,Ee as registerGeneralSectionRows};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isNode as
|
|
1
|
+
import{isNode as x,isNodeList as c}from"efficient-easel/data";import{storedStepsShown as E}from"../../components/ProcessSteps.js";import{declaredBlockSource as m,sourcedRows as P}from"../../../format/lib/content/block-sources.js";import{rowHoldsContent as S}from"../../../format/lib/content/card-state.js";import{CARD_LIST_TYPE as k}from"../../../format/lib/content/card-template.js";import{HEAD_CORE_PROP as C,HOLDS_HEAD_CORE_PROP as l}from"../content/empty-hides.js";import{parseSectionHeadPlacement as L}from"../../../format/lib/sections/section-head-placement.js";const p="Flex",_="Text",i=r=>Object.values(r??{}).filter(c),A=r=>r.type===k&&m(r.props)!=="",a=r=>{if(r.type!==p)return!1;const t=i(r.props).flat();return t.length>0&&t.every(A)},u=r=>L(r.props?.headPlacement)==="own-box"||a(r),f=r=>r===void 0||Array.isArray(r)&&r.length===0;function y(r){return r.type===_?!0:r.type===p&&i(r.props).every(t=>t.every(y))}const H={ProcessSteps:r=>f(r.boxes)&&E(r.steps).length===0,Logos:r=>!m(r)&&f(r.logos)&&f(r.items)};function B(r){return i(r.props).flat().every(t=>!P(t.props,!1).rows.some(S))}function g(r){const t=i(r.props).flat();return t.some(u)&&t.every(o=>u(o)||y(o))}function O(r){const t={...r.props};for(const[o,s]of Object.entries(r.props??{}))!c(s)||!s.some(e=>x(e)&&u(e))||(t[o]=s.map(e=>{if(!u(e))return e;const n=a(e)?B(e):H[String(e.type)]?.(e.props??{})===!0;return{...e,props:{...e.props,[C]:n?"empty":!0}}}));return{...r,props:t}}function R(r){const o=Object.entries(r.props??{}).filter(([,e])=>c(e)).filter(([,e])=>e.length>0);if(o.length!==1||o[0][1].length!==1)return null;const s=o[0][1][0];return s?.type===p&&s.props?{key:o[0][0],inner:s}:null}function T(r){if(r?.type!==p||!r.props)return r;if(g(r)){const o=O(r);return{...o,props:{...o.props,[l]:!0}}}const t=R(r);return!t||!g(t.inner)?r:{...r,props:{...r.props,[t.key]:[O(t.inner)],[l]:!0}}}function j(r){const t=r;if(!t||!Array.isArray(t.content))return r;let o=!1;const s=t.content.map(e=>{const n=T(e);return n!==e&&(o=!0),n});return o?{...t,content:s}:r}export{j as markHeadCoreBoxes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t}from"react/jsx-runtime";import{Render as a}from"efficient-easel/render";import{capHeroGroups as c}from"../../../format/lib/document/cap-hero-groups.js";import{BelowFirstScreen as
|
|
1
|
+
"use client";import{jsx as t}from"react/jsx-runtime";import{Render as a}from"efficient-easel/render";import{capHeroGroups as c}from"../../../format/lib/document/cap-hero-groups.js";import{BelowFirstScreen as p,LATER_SLIDES_KEY as f,firstScreenLead as d,laterSlideIdsOf as g,useLeadDrawsFirst as S}from"../first-screen.js";import{markListSearchScopes as l}from"../../../format/lib/document/list-search-scopes.js";import{markHeadCoreBoxes as h}from"./head-core-boxes.js";import{oneH1 as u}from"../../../format/lib/document/one-h1.js";import{withPageContents as w}from"../content/page-contents.js";import{migrateLegacyPageData as L}from"./migrate-legacy.js";import{migrateRenamedProps as O}from"../../../format/lib/document/renamed-props.js";import{convertSectionsInPage as _,SECTION_TO_BOX_ON as P}from"../sections/section-to-box.js";import{siteThemeOf as R}from"../../../format/lib/theme.js";import{registerGeneralSectionRows as x}from"./blocks/general/section-to-box-rows.js";import{withSlotCounts as C}from"./slot-counts.js";function E({config:m,data:i,metadata:r}){x();const e=w(l(h(u(c(_(O(L(i)),P,{theme:R(r)})))))),n=S(m,d(e.content)),o=g(e.content),s=o.length>0?{...r,[f]:o}:r;return t(p,{children:t(a,{config:n,metadata:C(s,e.content),data:e})})}export{E as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as x}from"react/jsx-runtime";import{parseBlockWidthFit as K,phoneKey as l,tabletKey as o}from"efficient-easel/draw";import{blockCanWidenPastCell as P,blockFillInCellClass as A,blockSizeOf as L,blockSizeValuesOf as G}from"../../content/block-size.js";import{NoCellBound as X}from"../../../components/BoxCellContext.js";import{CellWrap as Z,useBoxCell as v}from"../../../components/InBoxContext.js";import{boxPhoneRowFits as U,boxRowColumnsClass as T,boxShareClasses as g,boxShareTabletOf as $,boxTabletColumnsClass as M}from"../../../../format/lib/content/box-layout.js";import{resolveContainerDirection as V}from"../../../../format/lib/content/container-direction.js";import{containerBlocksFor as Y}from"../../../../format/lib/document/container-blocks.js";import{readPartStyle as q}from"../part-styles.js";import{addShowWhenFacts as J,withRowRules as S}from"../../../../format/lib/document/show-when-attach.js";import{BOX_BLOCK_KEYS as Q}from"./cell-width.js";import{findParentNode as tt}from"../../../../format/lib/document/passes/document-position.js";const et=new Set(["Text","Heading"]),it=new Set(["h1","h2","h3","h4","h5","h6"]);function O(t,e){return t==="Heading"?!0:t!=="Text"?!1:typeof e.tag=="string"&&it.has(e.tag)?!0:q(e,"text").textStyle?.startsWith("heading-")===!0}const c={not:{context:"blockOutsideBox",is:!0}},B={all:[c,{not:{context:"boxSharesWidth",is:!0}}]},k={all:[c,{not:{context:"boxSharesWidthPhone",is:!0}}]},C={all:[c,{not:{context:"boxSharesWidthTablet",is:!0}}]};function I(t,e,i){return{any:[{field:o(t),is:e},{all:[{field:o(t),set:!1},i??{field:t,is:e}]}]}}function y(t,e,i){return{any:[{field:l(t),is:e},{all:[{field:l(t),set:!1},i??{field:t,is:e}]}]}}const H={any:[{field:"textFit",is:"shrink"},{all:[{field:"textFit",set:!1},{not:{context:"textWrapsByDefault",is:!0}}]}]},nt=[[["_gBlockSize","minWidth",o("minWidth"),l("minWidth"),"maxWidth",o("maxWidth"),l("maxWidth")],c],[["widthFit"],B],[[o("widthFit")],C],[[l("widthFit")],k],[["width"],{all:[B,{field:"widthFit",is:"fixed"}]}],[[o("width")],{all:[C,I("widthFit","fixed")]}],[[l("width")],{all:[k,y("widthFit","fixed")]}]],N=I("textFit","shrink",H),E=[[["_gText","textFit",o("textFit"),l("textFit")],c],[["minFont"],{all:[c,H]}],[[o("minFont")],{all:[c,N]}],[[l("minFont")],{all:[c,y("textFit","shrink",N)]}]],h=(t,e)=>tt(e.appState,t.props?.id),u=t=>!!t&&typeof t.type=="string"&&Y(t.type)!==null,w=t=>(t.type==="Flex"||t.type==="HeroGroup")&&V(t.type,t.props?.direction)==="row",b=t=>{const e=K(t);return e!==void 0&&e!=="fit"},rt={blockOutsideBox:(t,e)=>!u(h(t,e)),boxSharesWidth:(t,e)=>{const i=h(t,e);return!u(i)||!w(i)?!1:T({...i.props,direction:"row"})!==""?!0:g(i.props?.share)!==""&&!b(t.props?.widthFit)},boxSharesWidthTablet:(t,e)=>{const i=h(t,e);if(!u(i)||!w(i))return!1;if(M(i.props?.[o("columns")])!==""||T({...i.props,direction:"row"})!=="")return!0;const n=$(i.props?.[o("share")])??i.props?.share;return g(n)!==""&&!b(t.props?.[o("widthFit")]??t.props?.widthFit)},boxSharesWidthPhone:(t,e)=>{const i=h(t,e);if(!u(i)||!w(i))return!1;const n=i.props?.phoneRow;return(Number(n)===2||Number(n)===3)&&!U(n,i.props?.[l("share")])&&!b(t.props?.[l("widthFit")]??t.props?.widthFit)}},st=t=>/^_[gds][A-Z]/.test(t);function ot(t,e,i){const n=Object.entries(t),r=n.findIndex(([a])=>a===e);if(r===-1)return null;let s=r+1;for(;s<n.length&&!st(n[s][0]);)s++;return Object.fromEntries([...n.slice(0,s),...Object.entries(i),...n.slice(s)])}function R(t,e,i){const n=Object.entries(t);return Object.fromEntries([...n.slice(0,e),...Object.entries(i),...n.slice(e)])}function lt(t,e,i){const n=Object.keys(e);if(n.includes("_dSize")){const{_gBlockSize:r,...s}=i;return R(e,n.indexOf("_dSize")+1,s)}return ct.has(t)&&n.includes("_gSpacing")?R(e,n.indexOf("_gSpacing"),i):{...e,...i}}const ct=new Set(["Text","Heading"]);function at(t,e){const{_gText:i,...n}=e;return ot(t,"_gText",n)??{...t,...e}}function ht(t){const e=new WeakMap;return i=>{if(!i||!("textFit"in i))return i;let n=e.get(i);if(!n){n={...i};for(const r of["textFit",o("textFit"),l("textFit")])r in n&&(n[r]=t[r]);e.set(i,n)}return n}}const Ot={name:"blockSize",applies:(t,e,i)=>Q.includes(t)&&!!i&&typeof i.render=="function",panel(t,e,i){const n=et.has(e),{text:r}=i.blockSizeFields(n?{tablet:!0,textFit:e==="Heading"?"shrink":"wrap"}:{}),{size:s}=i.blockSizeFields({tablet:!0});let a=lt(e,t.fields??{},S(s,nt));if(n){const f=S(r,E);if(a=at(a,f),e==="Text"){const z=S(i.blockSizeFields({tablet:!0,textFit:"shrink"}).text,E),D=ht(z),F=t.resolveFields,j=(m,d)=>{const p=F?F(m,d):d.fields,_=W=>O(e,m?.props??{})?D(W??d.fields):W;return p instanceof Promise?p.then(_):_(p)};t.resolveFields=j}}t.fields=a,J(t,{...rt,textWrapsByDefault:f=>!O(e,f.props??{})})},draw(t){ut(t)}};function ut(t){const e=t.render;t.render=i=>{const n=G(i),r=L(n),s=e(i);return r===null?s:x(ft,{size:r,className:r.className,inCell:A(n),widens:P(n),children:s})}}function ft({size:t,className:e,inCell:i,widens:n,children:r}){const s=v()?.phoneCells===!0,a=n?x(X,{children:r}):r;return x(Z,{className:s&&i?`${e} ${i}`:e,...Object.keys(t.style).length?{style:t.style}:{},attrs:t.attrs,children:a})}export{Ot as blockSize,O as textShrinksByDefault};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as s}from"react/jsx-runtime";import{HideTaker as d}from"../../../components/ViewHideRoot.js";import{SECTION_BORDER_CLASS as c,sectionBorderStyle as a}from"../../../../format/lib/content/borders.js";import{PAD_ON_ROOT as l}from"./section-padding.js";const O={name:"sectionBorder",applies:(e,o,r)=>o.isSection(e)&&!!r&&typeof r.render=="function",draw(e,o){if(l.has(o))return;const r=e.render;e.render=n=>{const t=a(n.sectionBorder,n.sectionBorderPhone,n.sectionBorderTablet),i=r(n);return t?s(d,{className:c,style:{display:"contents",...t},children:i}):i}}};export{O as sectionBorder};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as t,jsx as i}from"react/jsx-runtime";import{useSectionRoot as s}from"../../../components/SiteGutterFrame.js";import{BOX_TYPE as
|
|
1
|
+
import{Fragment as t,jsx as i}from"react/jsx-runtime";import{HideTaker as m}from"../../../components/ViewHideRoot.js";import{useSectionRoot as s}from"../../../components/SiteGutterFrame.js";import{BOX_TYPE as a}from"../../../../format/lib/document/container-blocks.js";import{JoinBox as d}from"../../../components/JoinBox.js";import{tickerJoinPinClass as c,tickerJoinSide as f}from"../../../../format/lib/sections/ticker-join.js";function l({side:r,children:e}){return s()?i(d,{children:i(m,{className:c(r),children:e})}):i(t,{children:e})}const j={name:"boxJoin",applies:(r,e,n)=>r===a&&!!n&&typeof n.render=="function",draw(r){const e=r.render;r.render=n=>{const o=f(n.join);return o?i(l,{side:o,children:e(n)}):e(n)}}};export{j as boxJoin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{HideTaker as s}from"../../../components/ViewHideRoot.js";import{GRID_SPAN_ATTR as l,resolveGridSpan as d}from"../../../../format/lib/content/grid-span.js";import{withRowsShownWhen as f}from"../../../../format/lib/document/show-when-attach.js";import{CONTAINER_BLOCK_CHOICES as _}from"../../../../format/lib/document/container-blocks.js";import{RETIRED_NESTABLE_SECTIONS as a}from"../../../../format/lib/document/section-catalog.js";import{BOX_MAY_HOLD as c}from"../../../../format/lib/document/passes/slot-rules.js";const m=Array.from(new Set([..._.map(e=>e.type),...c])),S=Array.from(new Set([...m,...a,"GalleryItem"])),p={not:{context:"parentOffersPositions",is:!1}},I={name:"cellWidth",applies:(e,n,r)=>S.includes(e)&&!!r&&typeof r.render=="function",panel(e,n,r){const t=r.cellWidthFields;e.fields={...e.fields,...t()},e.fields=f(e.fields??{},Object.keys(t()),p)},draw(e){const n=e.render;e.render=r=>{const t=d(r.gridSpan),o=n(r);return t==null?o:i(s,{className:"sf-grid-cell",[l]:String(t),children:o})}}};export{m as BOX_BLOCK_KEYS,p as CELL_WIDTH_SHOW_WHEN,I as cellWidth};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{HideTaker as d}from"../../../components/ViewHideRoot.js";import{cardCornerStyle as i}from"../../../../format/lib/content/card-corners.js";import{sectionCornerStyle as c}from"../../../../format/lib/content/section-corners.js";const S={name:"sectionCorners",applies:(r,n,e)=>n.isSection(r)&&!!e&&typeof e.render=="function",panel(r,n,e){r.fields={...r.fields,...e.sectionShapeFields()}},draw(r){const n=r.render;r.render=e=>{const s=c(e.sectionCorners,e.sectionCornerSides),o=n(e);return s?t(d,{className:"sf-section-corners",style:{display:"contents",...s},children:o}):o}}},a=["CollectionCard"],m={name:"cardCorners",applies:(r,n,e)=>a.includes(r)&&!!e&&typeof e.render=="function",panel(r,n,e){r.fields={...r.fields,...e.cardShapeFields()}},draw(r){const n=r.render;r.render=e=>{const s=i(e.cardCorners,e.cardCornerSides),o=n(e);return s?t(d,{className:"sf-card-corners",style:{display:"contents",...s},children:o}):o}}};export{a as CARD_BLOCK_KEYS,m as cardCorners,S as sectionCorners};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as
|
|
1
|
+
import{jsx as t,jsxs as s}from"react/jsx-runtime";import{HideTaker as d}from"../../../components/ViewHideRoot.js";import{EmptyHidesStyle as _,HEAD_BOX_CLASS as o,HEAD_CORE_CLASS as c,HEAD_CORE_PROP as i,HOLDS_HEAD_CORE_PROP as f}from"../../content/empty-hides.js";const l="Flex",a=(e,r)=>e[r]!==void 0&&e[r]!==!1&&!e.editor?.isEditing,u={name:"headCore",applies:(e,r,n)=>typeof n?.render=="function",draw(e){const r=e.render;e.render=n=>a(n,i)?t(d,{className:c,children:n[i]==="empty"?null:r(n)}):r(n)}},O={name:"headBox",applies:(e,r,n)=>e===l&&typeof n?.render=="function",draw(e){const r=e.render;e.render=n=>a(n,f)?s(d,{className:o,children:[t(_,{}),r(n)]}):r(n)}};export{O as headBox,u as headCore};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createElement as o}from"react";import{ViewHideContext as t,viewHideClaim as a}from"../../../components/ViewHideRoot.js";import{nodeHiddenEverywhere as m,nodeViewHideClass as s,nodeViewHideWords as l}from"../../../../format/lib/content/view-hide-class.js";const u={name:"hiddenNodes",applies:(n,r,e)=>typeof e?.render=="function",draw(n){const r=n.render;n.render=e=>{if(m(e))return null;const d=s(e),i=a(d,l(e));return o(t.Provider,{value:i},r(e))}}};export{u as hiddenNodes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{catalogueLabel as e}from"../../../../format/lib/document/passes/catalogue-labels.js";import{blockSize as n}from"./block-size.js";import{boxJoin as p}from"./box-join.js";import{cardTemplateOnInsert as s}from"../../../../format/lib/document/passes/card-template-on-insert.js";import{cellWidth as c}from"./cell-width.js";import{clickableParts as f}from"./clickable-parts.js";import{cardCorners as a,sectionCorners as l}from"./corners.js";import{emptyHeadings as d}from"../../../../format/lib/document/passes/empty-headings.js";import{showWhenRows as h}from"../../../../format/lib/document/passes/show-when-rows.js";import{headBox as u,headCore as S}from"./head-core.js";import{hiddenNodes as b}from"
|
|
1
|
+
import{catalogueLabel as e}from"../../../../format/lib/document/passes/catalogue-labels.js";import{blockSize as n}from"./block-size.js";import{boxJoin as p}from"./box-join.js";import{cardTemplateOnInsert as s}from"../../../../format/lib/document/passes/card-template-on-insert.js";import{cellWidth as c}from"./cell-width.js";import{clickableParts as f}from"./clickable-parts.js";import{cardCorners as a,sectionCorners as l}from"./corners.js";import{emptyHeadings as d}from"../../../../format/lib/document/passes/empty-headings.js";import{showWhenRows as h}from"../../../../format/lib/document/passes/show-when-rows.js";import{headBox as u,headCore as S}from"./head-core.js";import{hiddenNodes as b}from"./hidden-nodes.js";import{showFor as g}from"./show-for.js";import{mediaValues as w}from"../../../../format/lib/document/passes/media-values.js";import{sectionAnchor as A}from"./section-anchor.js";import{blockEntrance as P,sectionAnimation as k}from"./section-animation.js";import{sectionHeight as C}from"./section-height.js";import{cardSticky as B,sectionSticky as W}from"./section-sticky.js";import{sectionBorder as y}from"./borders.js";import{blockPadding as G,sectionPadding as T}from"./section-padding.js";import{sectionTheme as x,slideTheme as E}from"./section-theme.js";import{buttonAlignInRow as H,containedWidth as I,sectionWidth as L}from"./section-width.js";import{blockGroups as O,sectionGroups as R}from"../../../../format/lib/document/passes/settings-groups.js";import{slotsStartAfresh as z}from"./slots-start-afresh.js";import{openSlotDisallow as D,sectionGroupAllow as F}from"../../../../format/lib/document/passes/slot-rules.js";import{registryPassContext as ho}from"../../../../format/lib/document/passes/registry-context.js";const J=[z,w,S,F,D,T,l,y,a,G,P,c,L,I,H,C,A,x,k,W,B,p,E,n,R,O,h,d,f,u,g,b,e,s];function fo(r,m,o){const t=m;for(const i of J)i.applies(r,o,t)&&(o.inspector&&i.panel?.(t,r,o.inspector,o),i.draw?.(t,r,o));return m}export{J as BLOCK_PASSES,fo as applyBlockPasses,ho as registryPassContext};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as r,Fragment as o,jsxs as i}from"react/jsx-runtime";import{HideTaker as c,usePeekViewHide as d,withViewHide as m}from"../../../components/ViewHideRoot.js";import{anchorSlug as t}from"../../../../format/lib/content/anchor-name.js";import{useBoxCell as h,useFillsCell as g,useInBox as x}from"../../../components/InBoxContext.js";import{drawsCopiesInTheBox as w}from"../../../../format/lib/content/copies-in-box.js";const u="!grow-0 !shrink-0 !basis-0",_=["[.sf-gap-zone>&]:w-0","[.sf-gap-zone>&]:h-0","[.sf-gap-zone>&]:-mb-[var(--sf-gap-len)]","[.sf-gap-zone>&]:-mr-[var(--sf-gap-len)]","[@media(min-width:800.02px)_and_(max-width:1099.98px)]:[.sf-gap-zone>&]:-mb-[var(--sf-gap-len-tablet,var(--sf-gap-len))]","[@media(min-width:800.02px)_and_(max-width:1099.98px)]:[.sf-gap-zone>&]:-mr-[var(--sf-gap-len-tablet,var(--sf-gap-len))]","[@media(min-width:720px)_and_(max-width:800px)]:[.sf-gap-zone>&]:-mb-[var(--sf-gap-len-tablet,var(--sf-gap-len-phone,calc(var(--sf-gap-len)/2)))]","[@media(min-width:720px)_and_(max-width:800px)]:[.sf-gap-zone>&]:-mr-[var(--sf-gap-len-tablet,var(--sf-gap-len-phone,calc(var(--sf-gap-len)/2)))]","[@media(max-width:719.98px)]:[.sf-gap-zone>&]:-mb-[var(--sf-gap-len-phone,calc(var(--sf-gap-len)/2))]","[@media(max-width:719.98px)]:[.sf-gap-zone>&]:-mr-[var(--sf-gap-len-phone,calc(var(--sf-gap-len)/2))]"].join(" "),v="flex flex-col w-full min-w-0 [&>*]:grow";function l({anchor:n}){const a=t(n),e=x(),s=d();return a?r("span",{id:a,className:m(e?`sf-section-anchor ${u} ${_}`:"sf-section-anchor",s),"aria-hidden":"true"}):null}function A({anchor:n,copiesInBox:a,children:e}){const s=h()?.columnsRow===!0,p=g(),f=t(n)!=="";return a?r(o,{children:e}):s&&!p&&f?i(c,{className:v,children:[r(l,{anchor:n}),e]}):i(o,{children:[r(l,{anchor:n}),e]})}const N={name:"sectionAnchor",applies:(n,a,e)=>a.isSection(n)&&!!e&&typeof e.render=="function",panel(n,a,e){const s=e.anchorFields;n.fields={...n.fields,...s()}},draw(n,a){n.defaultProps={...n.defaultProps,anchor:""};const e=n.render;n.render=s=>r(A,{anchor:s.anchor,copiesInBox:w(a,s),children:e(s)})}};export{_ as ANCHOR_GAP_BACK_CLASS,u as SECTION_ANCHOR_IN_BOX_CLASS,N as sectionAnchor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as m}from"react/jsx-runtime";import{SectionAnimation as E}from"../../../components/SectionAnimation.js";import{ENTRANCE_EXCLUDED as f,entranceDrawn as l}from"../../animation/entrance.js";import{CARD_HOVER_SECTIONS as p,PICTURE_HOVER_BLOCKS as w}from"../../../../format/lib/animation/hover.js";import{BOX_TYPE as T}from"../../../../format/lib/document/container-blocks.js";import{drawsCopiesInTheBox as _}from"../../../../format/lib/content/copies-in-box.js";const a=Object.fromEntries(w.map(n=>[n,"picture"])),b={[T]:"box",Ticker:"marquee",...Object.fromEntries(p.map(n=>[n,"cards"])),...a},c=(n,e)=>!f.has(n)&&!!e&&typeof e.render=="function";function s(n,e,o,i){n.fields={...n.fields,...o.animationTabFields(e,i)}}function d(n,e){const o=n,i=o.render;o.render=t=>{const r=l(t);return!r||_(e,t)?i(t):m(E,{desktop:r.desktop,phone:r.phone,editing:!!t.editor?.isEditing,takesViewHide:!0,children:i(t)})}}const R={name:"sectionAnimation",applies:(n,e,o)=>e.isSection(n)&&c(n,o),panel:(n,e,o)=>s(n,b[e]??"section",o,e),draw:(n,e)=>d(n,e)},x={name:"blockEntrance",applies:(n,e,o)=>!e.isSection(n)&&c(n,o),panel:(n,e,o)=>s(n,a[e]??"block",o,e),draw:(n,e)=>d(n,e)};export{x as blockEntrance,R as sectionAnimation};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as E}from"react/jsx-runtime";import{SECTION_HEIGHT_MODES as u,SECTION_MIN_HEIGHT_EXCLUDED as T,hasPhoneHeight as _,hasTabletHeight as p,resolvePhoneHeight as w,resolveTabletHeight as x,resolveSectionMinHeight as F,sectionMinHeightAttrs as I}from"../../../../format/lib/content/section-min-height.js";import{CellWrap as M}from"../../../components/InBoxContext.js";import{drawsCopiesInTheBox as S}from"../../../../format/lib/content/copies-in-box.js";import{phoneKey as V,tabletKey as a}from"efficient-easel/draw";import{shownByUsedValue as H,shownForOption as b,withRowRules as C}from"../../../../format/lib/document/show-when-attach.js";const N=(()=>{const e=i=>[[i],[a(i),i],[V(i),a(i),i]],o=i=>({field:i,in:u}),t=i=>r=>b(r,u,"auto",i),[n,s]=[e("sectionHeightValue"),e("sectionHeightUnit")];return e("sectionHeightMode").flatMap((i,r)=>[[[n[r][0]],H(i,o,t(["fixed","screen"]))],[[s[r][0]],H(i,o,t(["fixed"]))]])})(),j={name:"sectionHeight",applies:(e,o,t)=>o.isSection(e)&&!T.has(e)&&!!t&&typeof t.render=="function",panel(e,o,t){const n=t.heightFields;e.fields={...e.fields,...C(n(),N)};const s=e.resolveFields;e.resolveFields=(i,r)=>{const h=s?s(i,r):r.fields,c=i?.props??{},g=F(c),d=p(c)?x(c):null,m=_(c)?w(c):null,l=v=>f(f(O(v,g),"sectionHeightValueTablet",d),"sectionHeightValuePhone",m);return h&&typeof h.then=="function"?h.then(l):l(h)}},draw(e,o){const t=e.render;e.render=n=>{if(S(o,n))return t(n);const s=I(n);return s?E(M,{className:s.className,style:s.style,children:t(n)}):t(n)}}};function O(e,o){if(!e||!("sectionHeightMode"in e)||o.mode==="auto")return e;const t={...e},n=t.sectionHeightValue;return n&&(t.sectionHeightValue={...n,unit:o.unit}),t}function f(e,o,t){if(!e||!(o in e)||!t||t.mode==="auto")return e;const n={...e},s=n[o];return s&&(n[o]={...s,unit:t.unit}),n}export{j as sectionHeight};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as f}from"react/jsx-runtime";import{HideTaker as m}from"../../../components/ViewHideRoot.js";import{isBackgroundBox as u}from"../../../../format/lib/content/box-background.js";import{SECTION_PAD_KEYS as S,padValuesOf as p,resolveSectionPadding as T,sectionPadAttrs as g}from"../../content/section-padding.js";import{sectionFillPassClass as I}from"../../../../format/lib/content/section-min-height.js";import{COPIES_IN_THE_BOX as E,drawsCopiesInTheBox as b}from"../../../../format/lib/content/copies-in-box.js";const l={ParagraphsA:{top:60,bottom:80},StatsParagraph:{top:120,bottom:120},Timeline:{top:120,bottom:120},Footprint:{top:120,bottom:120},TimelineTrack:{top:120,bottom:120},TitleWithButtons:{top:140,bottom:140},ProcessSteps:{top:120,bottom:120},DetailRows:{top:100,bottom:100}},c=new Set(Object.keys(l)),P=new Set(["Flex","Text","Heading","ImageBlock"]),N=new Set(["Divider"]),O=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),_=new Set(["ProductGrid"]);function a(t,e,o=!1){const s=t.render;t.render=n=>{if(e?.(n))return s(n);const r=g(p(n,S,o)),i=s(n),d=I(n);return r?f(m,{className:d?`${r.className} ${d}`:r.className,style:r.style,children:i}):i}}const F={name:"sectionPadding",applies:(t,e,o)=>e.isSection(t)&&!O.has(t)&&!!o&&typeof o.render=="function",panel(t,e,o){c.has(e)||_.has(e)||(t.fields={...t.fields,...o.sidesPaddingFields({tablet:!0})})},draw(t,e){if(c.has(e)){const o=t.render,s=l[e];t.render=n=>{const r=T(n,s);return o({...n,padTop:r.top,padBottom:r.bottom})};return}if(_.has(e)){a(t);return}P.has(e)||N.has(e)||a(t,e==="Flex"?o=>u(o.bgImage):E.has(e)?o=>b(e,o):void 0,!0)}},h=["Heading","Text","ImageBlock"],x=["LogoBlock"],H={name:"blockPadding",applies:(t,e,o)=>(h.includes(t)||x.includes(t))&&!!o&&typeof o.render=="function",panel(t,e,o){t.fields={...t.fields,...o.sidesPaddingFields({tablet:!0})}},draw(t,e){P.has(e)||a(t,void 0,!0)}};export{N as PADS_ITS_OWN_SPACE,P as PAD_ON_ROOT,c as SECTION_PAD_INNER,l as SECTION_PAD_INNER_DEFAULTS,H as blockPadding,F as sectionPadding};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import{HideTaker as l}from"../../../components/ViewHideRoot.js";import{SECTION_STICK_EXCLUDED as f,sectionStickAttrs as d}from"../../../../format/lib/content/section-sticky.js";import{shownByUsedValue as c,withRowRules as k}from"../../../../format/lib/document/show-when-attach.js";import{SlotsStartAfresh as T}from"../../../components/InBoxContext.js";import{CARD_BLOCK_KEYS as S}from"./corners.js";const D=a("sectionSticky",(e,s,t)=>s.isSection(e)&&!f.has(e)&&!!t&&typeof t.render=="function"),x=a("cardSticky",(e,s,t)=>S.includes(e)&&!!t&&typeof t.render=="function");function a(e,s){return{name:e,applies:s,panel(t,o,i){t.fields={...t.fields,...k(i.stickFields(),p)}},draw(t){const o=t.render;t.render=i=>{const r=d(i);return r?n(l,{className:r.className,style:r.style,children:n(T,{children:o(i)})}):o(i)}}}}const p=(()=>{const e=t=>({field:t,in:[!0,!1]}),s=t=>({field:t,is:!0});return[[["stickTopDistance"],s("stickTop")],[["stickTopDistanceTablet"],c(["stickTopTablet","stickTop"],e,s)],[["stickTopDistancePhone"],c(["stickTopPhone","stickTopTablet","stickTop"],e,s)]]})();export{x as cardSticky,D as sectionSticky};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as a}from"react/jsx-runtime";import{CellWrap as
|
|
1
|
+
import{jsx as a}from"react/jsx-runtime";import{CellWrap as E}from"../../../components/InBoxContext.js";import{SectionRootChoice as T}from"../../../components/SiteGutterFrame.js";import{SITE_WIDTH_CAP as h,centredCap as _}from"../../../../format/lib/content/page-width.js";import{ownNodeWidth as C}from"../../../../format/lib/content/site-gutter.js";import{drawsCopiesInTheBox as L}from"../../../../format/lib/content/copies-in-box.js";import{SECTION_THEME_EXCLUDED as N,SECTION_THEME_NESTED_READING as m,nestedAccentValue as d,sectionThemeWrap as u}from"../../../../format/lib/content/section-surface.js";const W={name:"sectionTheme",applies:(e,t,s)=>t.isSection(e)&&!N.has(e)&&!!s&&typeof s.render=="function",panel(e,t,s){const{sectionThemeFields:o,SECTION_THEME_FOLLOW_LABEL:n}=s,i=m.has(t);e.fields={...e.fields,...i?o(d,n):o()}},draw(e,t){const s=m.has(t),o=e.render;e.render=n=>{const i=u(s?{...n,sectionAccent:d(n.sectionAccent)}:n),c=o(n);if(!i)return c;const l=f=>a(E,{className:i.className,style:f,children:c}),r=i.style;return L(t,n)?a("div",{className:i.className,style:{...r,display:"contents"},children:c}):C(t,n).background!=="content"?l(r):a(T,{own:()=>l({...r,..._(h)}),followed:()=>l(r)})}}},x={name:"slideTheme",applies:e=>e==="HeroSlide",panel(e,t,s){const{sectionThemeFields:o,BLOCK_THEME_FOLLOW_LABEL:n}=s;e?.fields&&(e.fields={...e.fields,...o(d,n)})}};export{W as sectionTheme,x as slideTheme};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as l}from"react/jsx-runtime";import{INTRO_EDGE_CLASS as
|
|
1
|
+
import{jsx as l}from"react/jsx-runtime";import{HideTaker as u}from"../../../components/ViewHideRoot.js";import{INTRO_EDGE_CLASS as U}from"../../../../format/lib/sections/intro-bleed-layout.js";import{resolveContainerDirection as $}from"../../../../format/lib/content/container-direction.js";import{HERO_BACKGROUND_VAR as Y,HERO_CHROME_CAP_VAR as K,HERO_CHROME_INSET_VAR as j,SITE_WIDTH_CAP as _,centredCap as g,heroBackgroundTokens as X}from"../../../../format/lib/content/page-width.js";import{SECTION_WIDTH_FAMILY as B,SECTION_WIDTH_KEYS as v,hasOwnSectionWidth as q,hasWidthFamily as z,resolveWidth as G,siteWidthsOf as J}from"../../../../format/lib/content/section-width.js";import{BOX_GUTTER_KEY as Q,boxGutterOf as Z,boxPlaceOf as tt,boxRunsEdgeToEdge as nt,isFrameContainer as w,ownNodeWidth as et,siteDrawsGutter as ot}from"../../../../format/lib/content/site-gutter.js";import{getEditorSiteContentWidth as it}from"../../../../format/lib/document/editor-site-widths.js";import{NestedBoxChoice as ct,SectionGroupChoice as rt,SectionGroupWidthsProvider as lt,SectionRootChoice as dt,SplitBandAndColumn as D}from"../../../components/SiteGutterFrame.js";import{FRAME as F}from"../../../components/BlockFrame.js";import{sectionFillPassClass as H}from"../../../../format/lib/content/section-min-height.js";import{parentCapsWidth as ut}from"../../../../format/lib/sections/section-head-placement.js";import{addShowWhenFacts as E,withRowsShownWhen as O}from"../../../../format/lib/document/show-when-attach.js";import{findParentNode as st,heldByANode as at,isNestedNode as ft,NOT_HELD_BY_A_NODE as M}from"../../../../format/lib/document/passes/document-position.js";const C="--sf-sw-site",ht="--sf-sw-content",_t="--sf-bg-cap",Nt="contents [--sf-site-width:var(--sf-sw-content)] max-view-wide:[--sf-site-width:var(--sf-sw-site)]",p=({own:t,content:n,siteContent:e})=>t===!0&&n==="full"&&e!=="full",L="contents view-wide:[--sf-site-width:100vw]",A=({held:t},n,e)=>t?e:l(u,{className:n,children:e}),wt=`contents view-wide:[--sf-site-width:100vw] ${U} view-wide:[--sf-site-gutter:var(--intro-edge)]`,W=(t,n)=>n==="content"?`min(${t}px,var(${C}))`:`${t}px`;function T({content:t,contentMax:n},e){return t==="full"?e!=="content"?"100vw":null:n===null?null:W(n,e)}function S(t,n){return n===null?t:l(u,{className:"contents",style:{[C]:_},children:l(u,{className:Nt,style:{[ht]:n},children:t})})}const Et="--sf-content-cap",Ot="contents max-view-wide:[--sf-content-cap:none]";function Ct({content:t,contentMax:n},e){return t==="full"?null:n!==null?W(n,e):e==="content"?null:`var(${C})`}function Tt(t,n){return n===null?t:l(u,{className:"contents",style:{[C]:_},children:l(u,{className:Ot,style:{[Et]:n},children:t})})}const a=(t,n,e="")=>t==="content"?l(u,{className:e||void 0,style:g(_),children:n}):n;function P(t,n,e,o,i){if(p(e))return a(o,A(e,L,l(D,{children:t({...n,contained:!0})})),i);if(e.content==="full")return a(o,t({...n,contained:!1}),i);const c=T(e,o);return o==="content"&&c===null&&!e.own?t({...n,contained:!0}):a(o,S(l(D,{children:t({...n,contained:!0})}),c),i)}function k(t,n,e,o){if(e==="hero"){const r=S(t(n),T(o,o.band));return o.band==="full"?l(u,{style:{[Y]:"none",[j]:"initial",[K]:"initial"},children:r}):o.band==="content"?l(u,{style:X(!0),children:r}):r}const i=o.band??"full",c=H(n);if(e==="rawMarkup"){if(o.content==="full")return a(i,t(n),c);const r=o.contentMax===null?_:W(o.contentMax,i);return l(u,{className:"contents",style:{[C]:_},children:a(i,l(u,{className:c||void 0,style:g(r),children:t(n)}),c)})}if(e==="scrollOver"){const r=o.content==="full",d=p(o)?A(o,wt,t({...n,fullWidth:!1})):S(t({...n,fullWidth:r}),r?null:T(o,i));return i==="content"?l(u,{className:"contents",style:{[_t]:_},children:d}):d}switch(e){case"both":return a(i,Tt(t(n),Ct(o,i)),c);case"contained":return P(t,n,o,i,c);case"contentColumn":case"contentFull":case"productGrid":{const r=p(o),d=o.content==="full"&&!r?"full":"page",s=r?A(o,L,t({...n,widthMode:d})):S(t({...n,widthMode:d}),o.content==="full"?null:T(o,i));return e==="productGrid"&&!o.own?i==="content"?l(u,{className:c?`${F} ${c}`:F,children:s}):s:a(i,s,c)}default:return a(i,S(t(n),T(o,i)),c)}}function St(t,n){const e=B[n],o=t.render;t.render=i=>{const c=J(i),r={band:c.background,content:c.content??"content",contentMax:null},d=()=>e==="rawMarkup"?o(i):l(rt,{draw:h=>{const N=h?{...r,band:h.background==="content"?r.band:h.background??r.band,content:h.content??r.content,own:h.background==="full"||h.content!==null,held:!0,siteContent:r.content}:r,R=k(o,i,e,N);if(!w(n))return R;const b=Z(i),I=b===void 0?N.content:b?"content":"full";return I===N.content?R:l(ct,{atTop:R,nested:P(o,i,{...N,content:I,own:!1},N.band??"full",H(i))})}}),s=et(n,i);if(!q(s))return d();const f=e==="rawMarkup",m=s.background??(f?"full":c.background),V=s.content??(f?"full":r.content),x={band:m,content:m==="content"?"content":V,contentMax:s.contentMax,own:!f,siteContent:r.content};return l(dt,{own:()=>l(lt,{value:{background:x.band,content:x.content},children:k(o,i,e,x)}),followed:d})}}const mt={all:[M,{not:{context:"runsEdgeToEdge",is:!0}}]},$t={name:"sectionWidth",applies:(t,n,e)=>z(t)&&!!e&&typeof e.render=="function",panel(t,n,e){const o=e.sectionOwnWidthFields({drawsFullOnItsOwn:B[n]==="rawMarkup"}),i=w(n)?e.boxGutterFields():{},c={...t.fields,...i,...o},r=w(n)?y(n,t,c,[Q]):c;E(t,{heldByANode:at}),w(n)&&E(t,{runsEdgeToEdge:d=>nt(d.props??{})}),t.fields=O(r,[v.background,v.content],w(n)?mt:M)},draw(t,n){St(t,n)}};function xt(t,n){if(!t||!("widthMode"in t))return t;const e={...t},o=e.widthMode;return o&&(e.widthMode={...o,currentValue:n.mode,inherited:n.inherited}),e}const Rt=new Set(["Heading","Text","ImageBlock","ButtonBlock"]),Yt={name:"containedWidth",applies:(t,n,e)=>Rt.has(t)&&!!e&&typeof e.render=="function",panel(t,n,e){const o=e.widthField;t.fields=y(n,t,{...t.fields,...o("page")});const i=t.resolveFields;t.resolveFields=(c,r)=>{const d=i?i(c,r):r.fields,s=G(c?.props??{},"page"),f=m=>xt(m,s);return d&&typeof d.then=="function"?d.then(f):f(d)}},draw(t){const n=t.render;t.render=e=>{const{mode:o}=G(e,"page");return n({...e,contained:o!=="full"})}}},pt={not:{context:"inHeroGroupRow",is:!0}},Kt={name:"buttonAlignInRow",applies:t=>t==="ButtonBlock",panel(t){const n=t;n.fields=O(n.fields??{},["align"],pt),E(n,{inHeroGroupRow:(e,o)=>{const i=st(o.appState,e.props?.id);return!!i&&i.type==="HeroGroup"&&$("HeroGroup",i.props?.direction)==="row"}})}};function At(t){return Object.values(t).some(n=>!!n&&typeof n=="object"&&n.type==="slot")}const Wt={any:[]},bt={all:[{not:{context:"outsideBox",is:!0}},{not:{context:"insideSiteGutter",is:!0}}]},It={not:{context:"widthCappedByParent",is:!0}};function y(t,n,e,o=["widthMode"]){if(t==="ButtonBlock")return O(e,["_gWidth",...o],Wt);if(At(e)){const i=(c,r)=>tt(r.appState?.data?.content,c.props?.id,ot(it()));return E(n,{outsideBox:(c,r)=>i(c,r)?.inBox!==!0,insideSiteGutter:(c,r)=>i(c,r)?.insideGutter}),O(e,o,bt)}return E(n,{widthCappedByParent:(i,c)=>"parent"in c?ut(c.parent):ft({props:i.props??{}},c)}),O(e,o,It)}export{_t as SECTION_BACKGROUND_VAR,Ot as SECTION_CONTENT_CAP_CLASS,Et as SECTION_CONTENT_CAP_VAR,Nt as SECTION_CONTENT_CLASS,ht as SECTION_CONTENT_VAR,C as SITE_CONTENT_VAR,Kt as buttonAlignInRow,Yt as containedWidth,$t as sectionWidth,xt as widthModeFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isNode as
|
|
1
|
+
import{isNode as O,isNodeList as w}from"efficient-easel/data";import{hidableText as S,readHidable as y}from"efficient-easel/draw";import{blockSizeValuesOf as _}from"../content/block-size.js";import{nodeHiddenEverywhere as R,nodeViewHideClass as h}from"../../../format/lib/content/view-hide-class.js";import{CARD_ROW_FIELD_PROP as b,CARD_TEMPLATE_SLOT as x,namedRowField as E,ROW_BOUND_PROPS as P}from"../../../format/lib/content/card-template.js";import{SHOW_FOR_PROP as g}from"../../../format/lib/content/box-show-for-choices.js";const p="slotCounts",d=t=>!y(t).hidden&&S(t).trim()!=="",C=t=>typeof t=="string"&&t.trim()!=="",A={Flex:()=>!0,PostCard:()=>!0,ImageBlock:t=>C(t.src),Text:t=>d(t.text),Heading:t=>d(t.text),Eyebrow:t=>d(t.eyebrow)},F=["widthFit","width","minWidth"],u=t=>w(t);function N(t){if(Array.isArray(t.content))return u(t.content)?t.content:null;const e=Object.values(t).filter(u);return e.length===1?e[0]:null}function W(t,e){return[...new Set([b,...Object.values(P[t]??{})])].some(o=>E(e,o)!=="")}function D(t){const e=t.props??{},n=A[t.type];if(!n||!n(e)||W(t.type,e)||h(e))return!1;const o=e[g];if(o!=null&&o!=="")return!1;const r=_(e);return!F.some(s=>r[s]!==void 0)}function I(t){let e=0;for(const n of t)if(!R(n.props??{})){if(!D(n))return;e+=1}return e>0?e:void 0}function T(t){const e={},n=new Set,o=new Set,r=(s,a)=>{if(Array.isArray(s))for(const f of s){if(!O(f))continue;const i=f.props.id;typeof i=="string"&&(n.has(i)?o:n).add(i);const l=a?null:N(f.props);if(typeof i=="string"&&l){const c=I(l);c!==void 0&&(e[i]=c)}for(const[c,m]of Object.entries(f.props))u(m)&&r(m,a||c===x)}};r(t,!1);for(const s of o)delete e[s];return e}function z(t,e){return{...t??{},[p]:T(e)}}function B(t){const n=t.editor?.metadata?.[p],o=t.id,r=typeof o=="string"&&n&&typeof n=="object"?n[o]:void 0;return typeof r=="number"&&Number.isInteger(r)&&r>0?r:void 0}export{A as DRAWS_FOR_SURE,p as SLOT_COUNTS_KEY,B as slotCountOf,T as slotCountsOf,z as withSlotCounts};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{readHidable as Z}from"efficient-easel/draw";import{BOX_TYPE as ee,CONTAINER_BLOCKS_SLOT as te}from"../../../format/lib/document/container-blocks.js";import{headingTextSeed as oe,labelTextSeed as ne}from"../../../format/lib/document/text-seeds.js";import{SPLITTABLE_SECTIONS as se}from"../../../format/lib/sections/section-head-placement.js";import{finiteNumber as R}from"../../../format/lib/finite-number.js";import{accentItalicRuns as ie}from"../../../format/lib/markup.js";import{seedNodes as re}from"../../../format/lib/document/seed-parts.js";import{bucketByGroup as ae}from"../../../format/lib/locations-grid.js";import{normalizeTheme as G}from"../../../format/lib/theme.js";const P=ee,v=te;function Be(t){if(t.theme)return G(t.theme);const o=t.site?.themePresets;return o?G({selected:t.site?.selectedPreset??0,themes:[...o]}):void 0}function ce(t,o){return o===0?`${t}~box`:`${t}~box-${o+1}`}const A={Flex:"the Box itself",Hero:"its slides hold Boxes of real blocks (Hero › Slide › Box), and its Scrolling Bar is a Box in its strip slot (Hero › Box)",Divider:"one block with no text, picture or button",CustomHTML:"the HTML box is the whole section; it has no parts"};function Te(t){for(const[o,i]of Object.entries(t)){if(o in A&&A[o]!==i)throw new Error(`lib/sections/section-to-box: "${o}" is already Box-native`);A[o]=i}}function _e(t){return A[t]}const V=new Set(["id"]),T={},F=[],fe=["Breadcrumb","DocBody","Form","SubmitBuild","Footprint","Stats","Logos","FitmentFinder","DocMasthead","Timeline","TimelineTrack"];function Ee(t){for(const[o,i]of Object.entries(t)){if(o in T&&T[o]!==i)throw new Error(`lib/sections/section-to-box: "${o}" already has a row`);T[o]=i}}function Pe(t){return T[t]}function ve(){return Object.keys(T)}function de(t){return t in T&&F.includes(t)}function je(t,o=fe){return t in T&&(o.includes(t)||de(t))}function Ne(t){const o=se[t];if(!o)throw new Error(`lib/sections/section-to-box: "${t}" has no head row in SPLITTABLE_SECTIONS`);const i=[{kind:"text",key:o.num,role:"eyebrow"},{kind:"text",key:o.title,role:"heading"}];return o.description&&i.push({kind:"text",key:o.description,role:"body"}),o.headRows.includes("linkText")&&o.headRows.includes("linkHref")&&i.push({kind:"button",key:"linkText",href:"linkHref"}),i}const H=t=>Z(t),Ie=t=>H(t).text.trim()!=="";function le(t){if(t.includes("=="))return t;const o=t.indexOf("/"),i=o===-1?t:t.slice(0,o),r=i.trim();if(!r)return t;const m=i.indexOf(r);return`${i.slice(0,m)}==${r}==${i.slice(m+r.length)}${o===-1?"":t.slice(o)}`}const pe=t=>t==="heading"?oe():t==="eyebrow"?ne():{};function ue(t,o,i,r){const a={...t._partStyles?.text??{},...o??{},...i??{}};return(r==="center"||r==="right")&&a.align===void 0&&(a.align=r),Object.keys(a).length?{_partStyles:{text:a}}:{}}function he(t,o){if(t===void 0)return{};if(typeof t=="string")return{variant:t};const i=o[t.key];return{variant:typeof i=="string"&&Object.hasOwn(t.map,i)?t.map[i]:t.fallback}}function Y(t,o,i,r,m={}){const a={...o};for(const h of t){const[k,B,j]=typeof h=="string"?[h,h,void 0]:h;if(i[k]===void 0)continue;const _=j?j(i[k],i,m):i[k];_===void 0?delete a[B]:a[B]=_,r(k,B,_===void 0)}return a}function ye(t){const o=new Set([...V,"headPlacement","_partStyles",...Object.keys(t.drop??{}),...Object.keys(t.reads??{})]),i=m=>{for(const a of m??[])o.add(typeof a=="string"?a:a[0])},r=m=>{for(const a of m)switch(a.kind){case"text":case"image":o.add(a.key),a.kind==="image"&&a.alt&&o.add(a.alt);break;case"button":o.add(a.key),o.add(a.href),typeof a.variant=="object"&&o.add(a.variant.key);break;case"list":o.add(a.key);break;case"group":case"block":i(a.box),r(a.parts??[]);break;case"core":if(a.keep!=="rest"&&a.keep.forEach(h=>o.add(h)),Object.keys(a.rename??{}).forEach(h=>o.add(h)),a.derive?.reads.forEach(h=>o.add(h)),typeof a.slots!="function")for(const h of Object.values(a.slots??{}))for(const k of h)"kind"in k&&o.add(k.key);break}};for(const m of[t,...t.also??[]])i(m.box),r(m.parts);return o}function q(t,o,i={}){const r=t.props,m=o.skip?.(r);if(m!==void 0)return{node:t,nodes:[t],carried:[],dropped:[],siteWrites:[],restyled:[],skipped:m};const a=String(r.id??t.type),h=[],k=[],B=[],j=new Set,_=(n,s)=>{h.push({key:n,home:s}),j.add(n)},X=r._partStyles??{},L=ye(o);let K=0;const $=(n,s)=>({type:n,props:{...s,id:`${a}~${n}-${++K}`}}),M=(n,s,b,y,g,d,w)=>{if(g){for(const c of n??[]){const p=typeof c=="string"?c:c[0];b[p]!==void 0&&w(p,`nothing — the ${y} has no parts, so it is not drawn`)}return}const e=typeof s=="function"?s(r,i):s??{};return Y(n??[],e,b,(c,p,f)=>w(c,f?`nothing — the old value draws nothing (${y}: no ${p})`:`${d}${y}: ${p}`),i)},J=n=>re(n,s=>`${a}~${s}-${++K}`),W=(n,s,b)=>{const y=n.of?n.of(s):Array.isArray(s[n.key])?s[n.key]:[],g=typeof n.props=="function"?n.props(r,i):n.props??{},d=y.map((f,x)=>{const l=f??{},u=n.item?.(l,x,r)??{},O=N(u.reverse?[...n.parts].reverse():n.parts,l,!1,`item ${x+1}: `);return n.flat?u.props?O.map(E=>({...E,props:{...E.props,...u.props,id:E.props.id}})):O:[$(P,{name:`${n.name} ${x+1}`,...g,...u.props??{},[v]:O})]});if(n.groups){const f=n.groups;return b(n.key,y.length?`one Box per item (${y.length}), in a Box per group`:"nothing — the list is empty"),ae(y.map(x=>x??{}),f.of,f.of).map((x,l)=>{const u=x.items.map(S=>S.item),O=f.parts?N(f.parts,f.head?.(u,r)??{},!1,`group ${l+1}: `):[],E=x.items.map(S=>d[S.index]),z=f.perRow?.(u.length,r),I=Number.isInteger(z)&&z>=1?z:1,C=[];if(f.perRow&&I<E.length)for(let S=0;S*I<E.length;S++)C.push(E.slice(S*I,(S+1)*I).flat());return $(P,{name:`${f.name} ${l+1}`,...f.props??{},[v]:[...O,$(P,{name:`${f.itemsName} ${l+1}`,...f.itemsProps?.(u.length,r)??{},[v]:C.length?C.map((S,U)=>$(P,{name:`${f.rowName??`${f.itemsName} row`} ${U+1}`,...f.rowProps??{},[v]:S})):E.flat()})]})})}const w=n.perRow?.(r),e=n.perRow?Number.isInteger(w)&&w>=1?w:1:0;if(b(n.key,(y.length?n.flat?`each item's parts (${y.length} items), in order`:`one Box per item (${y.length}), its parts inside`:"nothing — the list is empty")+(e&&y.length?`, in rows of ${e}`:"")),!e)return d.flat();const c=typeof n.rowProps=="function"?n.rowProps(r,i):n.rowProps??{},p=[];for(let f=0;f*e<d.length;f++){const x=d.slice(f*e,(f+1)*e).flat(),l=n.rowFiller?e-d.slice(f*e,(f+1)*e).length:0;p.push($(P,{name:`${n.rowName??`${n.name} row`} ${f+1}`,...c,[v]:[...x,...Array.from({length:l},(u,O)=>$(P,{name:`Empty ${O+1}`,...n.rowFiller,[v]:[]}))]}))}return p},N=(n,s,b,y)=>{const g=[],d=(e,c)=>b?_(e,c):void 0,w=e=>b?X[e]:void 0;for(const e of n)if(!(e.when&&!e.when(r,b?void 0:s)))switch(e.kind){case"text":{const c=H(s[e.key]);if(!c.text.trim()&&!(b&&i.press&&o.pressKeepsEmpty?.includes(e.key))){d(e.key,"nothing — empty words draw nothing, so no block");break}const p=pe(e.role??"body"),{_partStyles:f,...x}=p,l=ue(p,e.styleFrom?{...e.style,...e.styleFrom(r,i)}:e.style,w(e.key),e.props?.align);if(e.was&&b){const u=l._partStyles?.text??{};B.push({key:e.key,was:e.was,...typeof u.textStyle=="string"?{textStyle:u.textStyle}:{},...R(u.size)!==void 0?{size:R(u.size)}:{},...R(u.sizePhone)!==void 0?{sizePhone:R(u.sizePhone)}:{}})}g.push($("Text",{text:e.mark==="accentLead"?le(c.text):e.mark==="accentItalic"?ie(c.text):c.text,...x,...e.props??{},...l,...c.hidden?{_hidden:!0}:{}})),d(e.key,`${y}Text block: its words${c.hidden?", hidden":""}`);break}case"button":{const c=H(s[e.key]);if(!c.text.trim()){d(e.key,"nothing — no words, no button"),d(e.href,"nothing — no button to link"),typeof e.variant=="object"&&d(e.variant.key,"nothing — no button to style");break}const p=typeof s[e.href]=="string"&&s[e.href]?s[e.href]:"#",f={...e.style??{},...w(e.key)??{}};g.push($("ButtonBlock",{label:c.text,href:p,...typeof e.props=="function"?e.props(s,i):e.props??{},...he(e.variant,s),...Object.keys(f).length?{_partStyles:{label:f}}:{},...c.hidden?{_hidden:!0}:{}})),d(e.key,`${y}Button block: its words`),d(e.href,`${y}Button block: its link`),typeof e.variant=="object"&&d(e.variant.key,`${y}Button block: its Style`);break}case"image":{const c=s[e.key];if(typeof c!="string"||!c){d(e.key,"nothing — no picture, no block"),e.alt&&d(e.alt,"nothing — no picture to describe");break}const p=e.alt&&typeof s[e.alt]=="string"?s[e.alt]:"";g.push($("ImageBlock",{src:c,alt:p,...e.props??{}})),d(e.key,`${y}Image block: its picture`),e.alt&&d(e.alt,`${y}Image block: its alt text`);break}case"list":{g.push(...W(e,s,d));break}case"group":{const c=N(e.parts,s,b,y),p=M(e.box,e.props,s,`${e.name} Box`,!c.length&&!e.keepEmpty,y,d);p&&g.push($(P,{name:e.name,...p,[v]:c}));break}case"block":{const c=e.parts?N(e.parts,s,b,y):[],p=M(e.box,e.props,s,`${e.type} block`,!!e.parts&&!c.length&&!e.keepEmpty,y,d);p&&g.push($(e.type,{...p,...e.slot?{[e.slot]:c}:{}}));break}case"core":{const c=e.as??t.type,p={...e.headless?{}:{headPlacement:"own-box"},...e.props??{}},f=e.keep==="rest"?Object.keys(s).filter(l=>!L.has(l)&&!(l in p)):e.keep;for(const l of f)s[l]!==void 0&&(p[l]=s[l],d(l,`the ${c} block inside the Box`));if(e.keep==="rest"){for(const u of Object.keys(e.props??{}))s[u]!==void 0&&!L.has(u)&&d(u,`nothing — the ${c} block inside the Box has the row's own value`);s.headPlacement!==void 0&&d("headPlacement",`the ${c} block inside the Box: own-box`);const l=Object.fromEntries(Object.entries(X).filter(([u])=>!L.has(u)));Object.keys(l).length&&(p._partStyles=l)}for(const[l,u]of Object.entries(e.rename??{}))s[l]!==void 0&&(p[u]=s[l],d(l,`the ${c} block inside the Box: ${u}`));if(e.derive){Object.assign(p,e.derive.props(s,i));for(const l of e.derive.reads)s[l]!==void 0&&d(l,`the ${c} block inside the Box`)}const x=typeof e.slots=="function"?e.slots(s,i):e.slots??{};for(const[l,u]of Object.entries(x))p[l]=u.flatMap(O=>"kind"in O?W(O,s,d):J([O]));g.push($(c,p));break}}return g},Q=(n,s)=>{const b=s===0?"Box":`${n.name} Box`,y=N(n.parts,r,!0,s===0?"":`${b}: `),g=typeof n.boxProps=="function"?n.boxProps(r,i):n.boxProps??{},d=Y(n.box??[],g,r,(w,e,c)=>_(w,c?`nothing — the old value draws nothing (${b}: no ${e})`:`${b}: ${e}`),i);return{type:P,props:{name:n.name,...d,[v]:y,id:ce(a,s)}}},D=[o,...o.also??[]].map(Q);r._partStyles!==void 0&&_("_partStyles","each old part's style moved to its new part");for(const[n,s]of Object.entries(o.reads??{}))r[n]!==void 0&&_(n,s);for(const[n,s]of Object.entries(o.drop??{}))n in r&&(k.push({key:n,why:s}),j.add(n));for(const n of Object.keys(r))V.has(n)||j.has(n)||k.push({key:n,why:"not in the row — not carried"});return{node:D[0],nodes:D,carried:h,dropped:k,siteWrites:[...o.site?.(t,i)??[]],restyled:B}}function Re(t,o=F,i={}){const r=t.content;if(!Array.isArray(r))return t;let m=!1;const a=r.flatMap(h=>{const k=h&&typeof h.type=="string"&&o.includes(h.type)?T[h.type]:void 0;if(!k)return[h];const B=q(h,k,i);return B.skipped!==void 0?[h]:(m=!0,B.nodes)});return m?{...t,content:a}:t}function Ae(t,o=F,i={}){if(!Array.isArray(t))return[];const r=[];return t.forEach((m,a)=>{const h=m&&typeof m.type=="string"&&o.includes(m.type)?T[m.type]:void 0;if(!h)return;const k=q(m,h,i);k.skipped===void 0&&r.push({index:a,node:k.node,nodes:k.nodes})}),r}export{v as SECTION_BOX_SLOT,P as SECTION_BOX_TYPE,F as SECTION_TO_BOX_ON,fe as SECTION_TO_BOX_PRESS,_e as boxNativeReason,q as convertSection,Re as convertSectionsInPage,Be as convertTheme,de as convertsToBox,Ie as hasWords,Ne as headParts,je as pressesAsBox,Te as registerBoxNativeSections,Ee as registerSectionToBox,ce as sectionBoxIdOf,Ae as sectionToBoxEdits,Pe as sectionToBoxRow,ve as sectionToBoxTypes};
|
|
1
|
+
import{readHidable as Z}from"efficient-easel/draw";import{BOX_TYPE as ee,CONTAINER_BLOCKS_SLOT as te}from"../../../format/lib/document/container-blocks.js";import{headingTextSeed as oe,labelTextSeed as ne}from"../../../format/lib/document/text-seeds.js";import{SPLITTABLE_SECTIONS as se}from"../../../format/lib/sections/section-head-placement.js";import{finiteNumber as R}from"../../../format/lib/finite-number.js";import{accentItalicRuns as re}from"../../../format/lib/markup.js";import{seedNodes as ie}from"../../../format/lib/document/seed-parts.js";import{bucketByGroup as ae}from"../../../format/lib/locations-grid.js";import{normalizeTheme as G}from"../../../format/lib/theme.js";const E=ee,v=te;function Be(t){if(t.theme)return G(t.theme);const o=t.site?.themePresets;return o?G({selected:t.site?.selectedPreset??0,themes:[...o]}):void 0}function ce(t,o){return o===0?`${t}~box`:`${t}~box-${o+1}`}const A={Flex:"the Box itself",Hero:"its slides hold Boxes of real blocks (Hero › Slide › Box), and its Scrolling Bar is a Box in its strip slot (Hero › Box)",Divider:"one block with no text, picture or button",CustomHTML:"the HTML box is the whole section; it has no parts"};function Te(t){for(const[o,r]of Object.entries(t)){if(o in A&&A[o]!==r)throw new Error(`lib/sections/section-to-box: "${o}" is already Box-native`);A[o]=r}}function _e(t){return A[t]}const V=new Set(["id"]),T={},z=[],fe=["Breadcrumb","DocBody","Form","SubmitBuild","Footprint","FAQ","ProductGrid","Stats","Logos","PaymentBadges","FitmentFinder","DocMasthead","Timeline","TimelineTrack","OrderSummary","Chart","Mockup","Countdown","FeaturedCover","Cards"];function Pe(t){for(const[o,r]of Object.entries(t)){if(o in T&&T[o]!==r)throw new Error(`lib/sections/section-to-box: "${o}" already has a row`);T[o]=r}}function Ee(t){return T[t]}function ve(){return Object.keys(T)}function de(t){return t in T&&z.includes(t)}function je(t,o=fe){return t in T&&(o.includes(t)||de(t))}function Ne(t){const o=se[t];if(!o)throw new Error(`lib/sections/section-to-box: "${t}" has no head row in SPLITTABLE_SECTIONS`);const r=[{kind:"text",key:o.num,role:"eyebrow"},{kind:"text",key:o.title,role:"heading"}];return o.description&&r.push({kind:"text",key:o.description,role:"body"}),o.headRows.includes("linkText")&&o.headRows.includes("linkHref")&&r.push({kind:"button",key:"linkText",href:"linkHref"}),r}const H=t=>Z(t),Ie=t=>H(t).text.trim()!=="";function le(t){if(t.includes("=="))return t;const o=t.indexOf("/"),r=o===-1?t:t.slice(0,o),i=r.trim();if(!i)return t;const m=r.indexOf(i);return`${r.slice(0,m)}==${i}==${r.slice(m+i.length)}${o===-1?"":t.slice(o)}`}const pe=t=>t==="heading"?oe():t==="eyebrow"?ne():{};function ue(t,o,r,i){const a={...t._partStyles?.text??{},...o??{},...r??{}};return(i==="center"||i==="right")&&a.align===void 0&&(a.align=i),Object.keys(a).length?{_partStyles:{text:a}}:{}}function he(t,o){if(t===void 0)return{};if(typeof t=="string")return{variant:t};const r=o[t.key];return{variant:typeof r=="string"&&Object.hasOwn(t.map,r)?t.map[r]:t.fallback}}function Y(t,o,r,i,m={}){const a={...o};for(const h of t){const[k,B,j]=typeof h=="string"?[h,h,void 0]:h;if(r[k]===void 0)continue;const _=j?j(r[k],r,m):r[k];_===void 0?delete a[B]:a[B]=_,i(k,B,_===void 0)}return a}function ye(t){const o=new Set([...V,"headPlacement","_partStyles",...Object.keys(t.drop??{}),...Object.keys(t.reads??{})]),r=m=>{for(const a of m??[])o.add(typeof a=="string"?a:a[0])},i=m=>{for(const a of m)switch(a.kind){case"text":case"image":o.add(a.key),a.kind==="image"&&a.alt&&o.add(a.alt);break;case"button":o.add(a.key),o.add(a.href),typeof a.variant=="object"&&o.add(a.variant.key);break;case"list":o.add(a.key);break;case"group":case"block":r(a.box),i(a.parts??[]);break;case"core":if(a.keep!=="rest"&&a.keep.forEach(h=>o.add(h)),Object.keys(a.rename??{}).forEach(h=>o.add(h)),a.derive?.reads.forEach(h=>o.add(h)),typeof a.slots!="function")for(const h of Object.values(a.slots??{}))for(const k of h)"kind"in k&&o.add(k.key);break}};for(const m of[t,...t.also??[]])r(m.box),i(m.parts);return o}function Q(t,o,r={}){const i=t.props,m=o.skip?.(i);if(m!==void 0)return{node:t,nodes:[t],carried:[],dropped:[],siteWrites:[],restyled:[],skipped:m};const a=String(i.id??t.type),h=[],k=[],B=[],j=new Set,_=(n,s)=>{h.push({key:n,home:s}),j.add(n)},M=i._partStyles??{},C=ye(o);let X=0;const $=(n,s)=>({type:n,props:{...s,id:`${a}~${n}-${++X}`}}),K=(n,s,b,y,g,d,w)=>{if(g){for(const c of n??[]){const p=typeof c=="string"?c:c[0];b[p]!==void 0&&w(p,`nothing — the ${y} has no parts, so it is not drawn`)}return}const e=typeof s=="function"?s(i,r):s??{};return Y(n??[],e,b,(c,p,f)=>w(c,f?`nothing — the old value draws nothing (${y}: no ${p})`:`${d}${y}: ${p}`),r)},q=n=>ie(n,s=>`${a}~${s}-${++X}`),W=(n,s,b)=>{const y=n.of?n.of(s):Array.isArray(s[n.key])?s[n.key]:[],g=typeof n.props=="function"?n.props(i,r):n.props??{},d=y.map((f,x)=>{const l=f??{},u=n.item?.(l,x,i)??{},O=N(u.reverse?[...n.parts].reverse():n.parts,l,!1,`item ${x+1}: `);return n.flat?u.props?O.map(P=>({...P,props:{...P.props,...u.props,id:P.props.id}})):O:[$(E,{name:`${n.name} ${x+1}`,...g,...u.props??{},[v]:O})]});if(n.groups){const f=n.groups;return b(n.key,y.length?`one Box per item (${y.length}), in a Box per group`:"nothing — the list is empty"),ae(y.map(x=>x??{}),f.of,f.of).map((x,l)=>{const u=x.items.map(S=>S.item),O=f.parts?N(f.parts,f.head?.(u,i)??{},!1,`group ${l+1}: `):[],P=x.items.map(S=>d[S.index]),L=f.perRow?.(u.length,i),I=Number.isInteger(L)&&L>=1?L:1,F=[];if(f.perRow&&I<P.length)for(let S=0;S*I<P.length;S++)F.push(P.slice(S*I,(S+1)*I).flat());return $(E,{name:`${f.name} ${l+1}`,...f.props??{},[v]:[...O,$(E,{name:`${f.itemsName} ${l+1}`,...f.itemsProps?.(u.length,i)??{},[v]:F.length?F.map((S,U)=>$(E,{name:`${f.rowName??`${f.itemsName} row`} ${U+1}`,...f.rowProps??{},[v]:S})):P.flat()})]})})}const w=n.perRow?.(i),e=n.perRow?Number.isInteger(w)&&w>=1?w:1:0;if(b(n.key,(y.length?n.flat?`each item's parts (${y.length} items), in order`:`one Box per item (${y.length}), its parts inside`:"nothing — the list is empty")+(e&&y.length?`, in rows of ${e}`:"")),!e)return d.flat();const c=typeof n.rowProps=="function"?n.rowProps(i,r):n.rowProps??{},p=[];for(let f=0;f*e<d.length;f++){const x=d.slice(f*e,(f+1)*e).flat(),l=n.rowFiller?e-d.slice(f*e,(f+1)*e).length:0;p.push($(E,{name:`${n.rowName??`${n.name} row`} ${f+1}`,...c,[v]:[...x,...Array.from({length:l},(u,O)=>$(E,{name:`Empty ${O+1}`,...n.rowFiller,[v]:[]}))]}))}return p},N=(n,s,b,y)=>{const g=[],d=(e,c)=>b?_(e,c):void 0,w=e=>b?M[e]:void 0;for(const e of n)if(!(e.when&&!e.when(i,b?void 0:s)))switch(e.kind){case"text":{const c=H(s[e.key]);if(!c.text.trim()&&!(b&&r.press&&o.pressKeepsEmpty?.includes(e.key))){d(e.key,"nothing — empty words draw nothing, so no block");break}const p=pe(e.role??"body"),{_partStyles:f,...x}=p,l=ue(p,e.styleFrom?{...e.style,...e.styleFrom(i,r)}:e.style,w(e.key),e.props?.align);if(e.was&&b){const u=l._partStyles?.text??{};B.push({key:e.key,was:e.was,...typeof u.textStyle=="string"?{textStyle:u.textStyle}:{},...R(u.size)!==void 0?{size:R(u.size)}:{},...R(u.sizePhone)!==void 0?{sizePhone:R(u.sizePhone)}:{}})}g.push($("Text",{text:e.mark==="accentLead"?le(c.text):e.mark==="accentItalic"?re(c.text):c.text,...x,...e.props??{},...l,...c.hidden?{_hidden:!0}:{}})),d(e.key,`${y}Text block: its words${c.hidden?", hidden":""}`);break}case"button":{const c=H(s[e.key]);if(!c.text.trim()){d(e.key,"nothing — no words, no button"),d(e.href,"nothing — no button to link"),typeof e.variant=="object"&&d(e.variant.key,"nothing — no button to style");break}const p=typeof s[e.href]=="string"&&s[e.href]?s[e.href]:"#",f={...e.style??{},...w(e.key)??{}};g.push($("ButtonBlock",{label:c.text,href:p,...typeof e.props=="function"?e.props(s,r):e.props??{},...he(e.variant,s),...Object.keys(f).length?{_partStyles:{label:f}}:{},...c.hidden?{_hidden:!0}:{}})),d(e.key,`${y}Button block: its words`),d(e.href,`${y}Button block: its link`),typeof e.variant=="object"&&d(e.variant.key,`${y}Button block: its Style`);break}case"image":{const c=s[e.key];if(typeof c!="string"||!c){d(e.key,"nothing — no picture, no block"),e.alt&&d(e.alt,"nothing — no picture to describe");break}const p=e.alt&&typeof s[e.alt]=="string"?s[e.alt]:"";g.push($("ImageBlock",{src:c,alt:p,...e.props??{}})),d(e.key,`${y}Image block: its picture`),e.alt&&d(e.alt,`${y}Image block: its alt text`);break}case"list":{g.push(...W(e,s,d));break}case"group":{const c=N(e.parts,s,b,y),p=K(e.box,e.props,s,`${e.name} Box`,!c.length&&!e.keepEmpty,y,d);p&&g.push($(E,{name:e.name,...p,[v]:c}));break}case"block":{const c=e.parts?N(e.parts,s,b,y):[],p=K(e.box,e.props,s,`${e.type} block`,!!e.parts&&!c.length&&!e.keepEmpty,y,d);p&&g.push($(e.type,{...p,...e.slot?{[e.slot]:c}:{}}));break}case"core":{const c=e.as??t.type,p={...e.headless?{}:{headPlacement:"own-box"},...e.props??{}},f=e.keep==="rest"?Object.keys(s).filter(l=>!C.has(l)&&!(l in p)):e.keep;for(const l of f)s[l]!==void 0&&(p[l]=s[l],d(l,`the ${c} block inside the Box`));if(e.keep==="rest"){for(const u of Object.keys(e.props??{}))s[u]!==void 0&&!C.has(u)&&d(u,`nothing — the ${c} block inside the Box has the row's own value`);s.headPlacement!==void 0&&d("headPlacement",`the ${c} block inside the Box: own-box`);const l=Object.fromEntries(Object.entries(M).filter(([u])=>!C.has(u)));Object.keys(l).length&&(p._partStyles=l)}for(const[l,u]of Object.entries(e.rename??{}))s[l]!==void 0&&(p[u]=s[l],d(l,`the ${c} block inside the Box: ${u}`));if(e.derive){Object.assign(p,e.derive.props(s,r));for(const l of e.derive.reads)s[l]!==void 0&&d(l,`the ${c} block inside the Box`)}const x=typeof e.slots=="function"?e.slots(s,r):e.slots??{};for(const[l,u]of Object.entries(x))p[l]=u.flatMap(O=>"kind"in O?W(O,s,d):q([O]));g.push($(c,p));break}}return g},J=(n,s)=>{const b=s===0?"Box":`${n.name} Box`,y=N(n.parts,i,!0,s===0?"":`${b}: `),g=typeof n.boxProps=="function"?n.boxProps(i,r):n.boxProps??{},d=Y(n.box??[],g,i,(w,e,c)=>_(w,c?`nothing — the old value draws nothing (${b}: no ${e})`:`${b}: ${e}`),r);return{type:E,props:{name:n.name,...d,[v]:y,id:ce(a,s)}}},D=[o,...o.also??[]].map(J);i._partStyles!==void 0&&_("_partStyles","each old part's style moved to its new part");for(const[n,s]of Object.entries(o.reads??{}))i[n]!==void 0&&_(n,s);for(const[n,s]of Object.entries(o.drop??{}))n in i&&(k.push({key:n,why:s}),j.add(n));for(const n of Object.keys(i))V.has(n)||j.has(n)||k.push({key:n,why:"not in the row — not carried"});return{node:D[0],nodes:D,carried:h,dropped:k,siteWrites:[...o.site?.(t,r)??[]],restyled:B}}function Re(t,o=z,r={}){const i=t.content;if(!Array.isArray(i))return t;let m=!1;const a=i.flatMap(h=>{const k=h&&typeof h.type=="string"&&o.includes(h.type)?T[h.type]:void 0;if(!k)return[h];const B=Q(h,k,r);return B.skipped!==void 0?[h]:(m=!0,B.nodes)});return m?{...t,content:a}:t}function Ae(t,o=z,r={}){if(!Array.isArray(t))return[];const i=[];return t.forEach((m,a)=>{const h=m&&typeof m.type=="string"&&o.includes(m.type)?T[m.type]:void 0;if(!h)return;const k=Q(m,h,r);k.skipped===void 0&&i.push({index:a,node:k.node,nodes:k.nodes})}),i}export{v as SECTION_BOX_SLOT,E as SECTION_BOX_TYPE,z as SECTION_TO_BOX_ON,fe as SECTION_TO_BOX_PRESS,_e as boxNativeReason,Q as convertSection,Re as convertSectionsInPage,Be as convertTheme,de as convertsToBox,Ie as hasWords,Ne as headParts,je as pressesAsBox,Te as registerBoxNativeSections,Pe as registerSectionToBox,ce as sectionBoxIdOf,Ae as sectionToBoxEdits,Ee as sectionToBoxRow,ve as sectionToBoxTypes};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-web-builder",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "59.0.0",
|
|
4
4
|
"description": "The EFFICIENT website builder: the website editor, the general sections and the renderer that draws them, compiled. Hostable by any EFFICIENT product; nothing here imports a host.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Efficient Pty Ltd",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"@tabler/icons-react": "^3.46.0",
|
|
56
56
|
"efficient-easel": "^29.0.0",
|
|
57
|
-
"efficient-shell": "^12.
|
|
57
|
+
"efficient-shell": "^12.17.0",
|
|
58
58
|
"isomorphic-dompurify": "^3.18.0",
|
|
59
59
|
"next": ">=16",
|
|
60
60
|
"react": ">=19",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@types/react": "^19",
|
|
74
74
|
"@types/react-dom": "^19",
|
|
75
75
|
"efficient-easel": "^29.0.0",
|
|
76
|
-
"efficient-shell": "^12.
|
|
76
|
+
"efficient-shell": "^12.17.0",
|
|
77
77
|
"esbuild": "^0.28.0",
|
|
78
78
|
"happy-dom": "^20.14.5",
|
|
79
79
|
"isomorphic-dompurify": "^3.18.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{say as t}from"../../../format/lib/editor-words.js";import{typedHex as h}from"efficient-easel/pick";import{normalizeTheme as u}from"../../../format/lib/theme.js";function p(m){const r=new Set,c=[];return u(m).themes.forEach((o,n)=>{const s=[[t("Theme {n} main color",{n:n+1}),o.accent],[t("Theme {n} text color",{n:n+1}),o.text],[t("Theme {n} background",{n:n+1}),o.background]];for(const[f,a]of s){const e=a?h(a):null;!e||r.has(e)||(r.add(e),c.push({name:f,value:e}))}}),c}export{p as themeSwatches};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const r={name:"hiddenNodes",applies:(n,d,e)=>typeof e?.render=="function",draw(n){const d=n.render;n.render=e=>e._hidden?null:d(e)}};export{r as hiddenNodes};
|