efficient-web-builder 74.1.0 → 74.2.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 +23 -0
- package/dist/editor/components/PreviewFooterContext.d.ts +3 -1
- package/dist/editor/components/PreviewFooterContext.js +1 -1
- package/dist/editor/components/StorefrontEditor.js +1 -1
- package/dist/editor/components/storefront-editor.css +7 -0
- package/dist/editor/lib/document/blocks/general/ContactLocations/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Footprint/fields.d.ts +3 -0
- package/dist/editor/lib/document/blocks/general/Footprint/fields.js +1 -1
- package/dist/editor/lib/document/controls.d.ts +1 -0
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/page-root-fields.d.ts +4 -0
- package/dist/editor/lib/document/page-root-fields.js +1 -1
- package/dist/editor/lib/document/page-root.d.ts +3 -2
- package/dist/editor/lib/document/page-root.js +2 -2
- package/dist/editor/lib/document/registry.js +1 -1
- package/dist/editor/lib/editor-document-adapter.d.ts +1 -0
- package/dist/editor/lib/editor-document-adapter.js +1 -1
- package/dist/editor/lib/pinned-chrome-doc.d.ts +1 -0
- package/dist/editor/lib/pinned-chrome-doc.js +1 -1
- package/dist/format/lib/build/module-specifiers.d.ts +8 -0
- package/dist/format/lib/build/module-specifiers.js +1 -1
- package/dist/format/lib/content/block-sources.d.ts +1 -0
- package/dist/format/lib/content/block-sources.js +1 -1
- package/dist/format/lib/content/page-width.d.ts +15 -0
- package/dist/format/lib/content/page-width.js +1 -1
- package/dist/format/lib/content/section-css.d.ts +1 -1
- package/dist/format/lib/content/section-css.js +1 -1
- package/dist/format/lib/content/site-css.d.ts +5 -0
- package/dist/format/lib/content/site-css.js +1 -0
- package/dist/format/lib/content/site-offices.d.ts +7 -0
- package/dist/format/lib/content/site-offices.js +1 -0
- package/dist/format/lib/editor-words-catalogue.d.ts +3 -0
- package/dist/format/lib/editor-words-catalogue.js +3 -3
- package/dist/format/lib/source-rules/panel-colour-tokens.js +7 -7
- package/dist/format/lib/source-rules/site-gutter-once.d.ts +12 -0
- package/dist/format/lib/source-rules/site-gutter-once.js +23 -0
- package/dist/render/components/Breadcrumb.js +1 -1
- package/dist/render/components/Cards.js +1 -1
- package/dist/render/components/ChartSection.js +1 -1
- package/dist/render/components/ContactLocations.js +2 -2
- package/dist/render/components/Countdown.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/FAQ.js +1 -1
- package/dist/render/components/FeaturedCover.js +1 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/Footprint.js +1 -1
- package/dist/render/components/HeroGroup.js +1 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/HeroSlide.js +1 -1
- package/dist/render/components/ImageBlock.js +1 -1
- package/dist/render/components/KeyFeatures.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.js +1 -1
- package/dist/render/components/ParagraphsA.js +1 -1
- package/dist/render/components/ProcessSteps.js +1 -1
- package/dist/render/components/Prose.js +1 -1
- package/dist/render/components/SectionHeader.js +1 -1
- package/dist/render/components/Series.js +1 -1
- package/dist/render/components/SideSpaceOnce.d.ts +6 -0
- package/dist/render/components/SideSpaceOnce.js +1 -0
- package/dist/render/components/SiteGutterFrame.js +1 -1
- package/dist/render/components/SiteOffices.d.ts +5 -0
- package/dist/render/components/SiteOffices.js +1 -0
- package/dist/render/components/SiteRootProps.d.ts +6 -0
- package/dist/render/components/SiteRootProps.js +1 -0
- package/dist/render/components/SpecStrip.js +1 -1
- package/dist/render/components/Split.js +1 -1
- package/dist/render/components/StatsParagraph.js +1 -1
- package/dist/render/components/Testimonials.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/lib/content/section-edge.d.ts +1 -1
- package/dist/render/lib/content/section-edge.js +1 -1
- package/dist/render/lib/document/blocks/general/ContactLocations/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Footprint/render.js +1 -1
- package/dist/render/lib/document/blocks/general/SectionHeader/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/custom-css.d.ts +2 -1
- package/dist/render/lib/document/passes/section-custom-css.d.ts +7 -0
- package/dist/render/lib/document/passes/section-custom-css.js +1 -1
- package/dist/render/lib/document/passes/section-padding.js +1 -1
- package/dist/render/lib/document/passes/section-width.js +1 -1
- package/dist/render/lib/document/section-css-style.d.ts +3 -1
- package/dist/render/lib/document/section-css-style.js +1 -1
- package/dist/routine-index.json +1 -1
- package/dist/value-index.json +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r,jsxs as m}from"react/jsx-runtime";import{HideTaker as
|
|
1
|
+
import{jsx as r,jsxs as m}from"react/jsx-runtime";import{HideTaker as y}from"./ViewHideRoot.js";import{bandPadAttrs as j}from"../lib/content/section-padding.js";import{innerPaddingFallback as N}from"../lib/document/passes/section-padding.js";import{alignViewClasses as S}from"../../format/lib/content/block-align.js";import{SiteLink as T}from"../lib/site-runtime.js";import{renderHeadline as B}from"./goldPhrases.js";import{say as L}from"../../format/lib/editor-words.js";import{withSideOnce as _}from"../../format/lib/content/page-width.js";import{useSideSpaceOnce as z}from"./SideSpaceOnce.js";function O({title:n,buttons:p,padTop:d,padBottom:x,bandPad:c,buttonsAlign:s,buttonsAlignTablet:f,buttonsAlignPhone:g,editing:o=!1}={}){const h=z(),l=c??j({padTop:d,padBottom:x},N("TitleWithButtons")),i=(p??[]).filter(t=>o||(t.label??"").trim()),e=!!(n??"").trim(),a=!e&&(s==="center"||s==="left")?s:null,v=e?"":S("items",a??"right",f,g,{atSectionLine:!0});return!o&&!e&&i.length===0?null:r(y,{as:"section",className:"relative z-[2] bg-bg",children:m("div",{className:_([a==="center"?"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-1 items-center justify-items-center gap-[60px] border-b border-line px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]":a==="left"?"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-1 items-center justify-items-start gap-[60px] border-b border-line px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]":"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-[1fr_auto] items-center gap-[60px] border-b border-line px-[var(--sf-site-gutter,40px)] max-view-desktop:grid-cols-1 max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]",v,l.className].filter(Boolean).join(" "),h),style:l.style,children:[a===null&&!e&&i.length>0&&r("div",{"aria-hidden":!0,className:"max-view-desktop:hidden"}),e&&r("h2",{className:"max-w-[1000px] font-display text-[length:min(var(--size-headingLarge,clamp(48px,7vw,108px)),var(--sf-heading-max,9999px))] [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-[0.94] tracking-[-0.035em] text-fg",children:B(n??"")}),i.length>0&&r("div",{className:"flex min-w-[280px] flex-col gap-3.5 max-view-desktop:min-w-0",children:i.map((t,u)=>{const b=(t.label??"").trim()||L("Button label"),w=t.href||"#",k=t.variant==="primary";return m(T,{newTab:"auto",href:w,className:["flex items-center justify-between gap-6 px-7 py-5","font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.3em] transition-colors",k?"border border-btn bg-btn text-btn-ink hover:border-fg hover:bg-fg":"border border-line text-fg hover:border-accent hover:text-accent"].join(" "),children:[b," ",r("span",{"aria-hidden":!0,children:"→"})]},u)})})]})})}export{O as default};
|
|
@@ -6,7 +6,7 @@ export type SectionEdge = {
|
|
|
6
6
|
site?: boolean;
|
|
7
7
|
beyond?: string;
|
|
8
8
|
};
|
|
9
|
-
export declare function sectionEdgeAttrs(edge: SectionEdge): {
|
|
9
|
+
export declare function sectionEdgeAttrs(edge: SectionEdge, once?: boolean): {
|
|
10
10
|
className: string;
|
|
11
11
|
style?: CSSProperties;
|
|
12
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FULL_SECTION_WIDTH as v,SITE_WIDTH_CAP as
|
|
1
|
+
import{FULL_SECTION_WIDTH as v,SIDE_ONCE_EDGE_GUTTER_CLASS as u,SIDE_ONCE_EDGE_SIDE_CLASS as E,SITE_WIDTH_CAP as y,siteSideRoom as S}from"../../../format/lib/content/page-width.js";import{padSideAttrs as h}from"./section-padding.js";const N=" [--sf-edge-t:max(0px,calc(var(--sf-site-width,1600px)_-_100%_-_2_*_var(--sf-edge-g)))] [--sf-edge-al:min(var(--sf-edge-l),max(calc(var(--sf-edge-t)_/_2),calc(var(--sf-edge-t)_-_var(--sf-edge-r))))] [--sf-edge-ar:min(var(--sf-edge-r),max(calc(var(--sf-edge-t)_/_2),calc(var(--sf-edge-t)_-_var(--sf-edge-l))))]",w="[--sf-edge-g:0px] [--sf-edge-al:var(--sf-edge-l)] [--sf-edge-ar:var(--sf-edge-r)]",T="[--sf-edge-l:var(--sf-edge-ld,0px)] [--sf-edge-r:var(--sf-edge-rd,0px)] max-view-desktop:[--sf-edge-l:var(--sf-edge-lt,var(--sf-edge-ld,0px))] max-view-desktop:[--sf-edge-r:var(--sf-edge-rt,var(--sf-edge-rd,0px))] max-view-wide:[--sf-edge-l:var(--sf-edge-lp,var(--sf-edge-lt,var(--sf-edge-ld,0px)))] max-view-wide:[--sf-edge-r:var(--sf-edge-rp,var(--sf-edge-rt,var(--sf-edge-rd,0px)))]",i="max-w-[100vw]",A=`ml-[calc(-1_*_(var(--sf-edge-g)_+_var(--sf-edge-al)))] mr-[calc(-1_*_(var(--sf-edge-g)_+_var(--sf-edge-ar)))] w-[calc(100%_+_2_*_var(--sf-edge-g)_+_var(--sf-edge-al)_+_var(--sf-edge-ar))] ${i}`;function l(e,r=!1){const a={},s=e.pad??{},g=h({left:s.left,right:s.right},{left:s.leftPhone,right:s.rightPhone},{left:s.leftTablet,right:s.rightTablet},{left:s.left,right:s.right},{desktop:s.unit,tablet:s.unitTablet,phone:s.unitPhone},0,e.site?"site":"box"),t=g.style;for(const[f,b]of[["l","paddingLeft"],["r","paddingRight"]]){const n=t[b];n!==void 0&&(a[`--sf-edge-${f}d`]=typeof n=="number"?`${n}px`:String(n));const c=t[`--sf-pad-${f}-tablet`],o=t[`--sf-pad-${f}-phone`];c!==void 0&&(a[`--sf-edge-${f}t`]=String(c)),o!==void 0&&(a[`--sf-edge-${f}p`]=String(o))}const d=S(e.site?"site":"box"),_=g.classes.includes(d.className.split(" ")[0]),x=e.gutter?`${d.className} ${d.edge}${N}`:`${w}${_?` ${d.className}`:""}`,$=r?` ${E}${e.gutter?` ${u}`:""}`:"";return{className:`${x} ${T}${$}`,style:a}}function O(e,r=!1){const{className:a,style:s}=l(e,r);return{className:`${a} ${A}`,...Object.keys(s).length?{style:s}:{}}}const p="[--sf-edge-bl:max(0px,min(calc(var(--sf-edge-beyond)_+_(var(--sf-edge-l)_-_var(--sf-edge-r))_/_2),calc(2_*_var(--sf-edge-beyond))))] [--sf-edge-br:max(0px,min(calc(var(--sf-edge-beyond)_+_(var(--sf-edge-r)_-_var(--sf-edge-l))_/_2),calc(2_*_var(--sf-edge-beyond))))]";function D(e){const r=l(e).style,a=t=>{const d=r[`--sf-edge-${t}d`]??"0px",_=r[`--sf-edge-${t}t`]??d;return[d,_,r[`--sf-edge-${t}p`]??_]},[s,g]=[a("l"),a("r")];return s.every((t,d)=>t===g[d])}const m="--sf-edge-beyond";function B(e){return`max(0px,calc((${e===null?v:`min(${v},${e})`} - ${y}) / 2))`}function L(e){const r=e.beyond;return r===void 0||r==="0px"?null:{className:D(e)?"mx-[calc(-1_*_var(--sf-edge-beyond))] px-[var(--sf-edge-beyond)]":`${p} ml-[calc(-1_*_var(--sf-edge-bl))] mr-[calc(-1_*_var(--sf-edge-br))] pl-[var(--sf-edge-bl)] pr-[var(--sf-edge-br)]`,style:{[m]:r}}}const C=`${p} ml-[calc(-1_*_(var(--sf-edge-g)_+_var(--sf-edge-al)_+_var(--sf-edge-bl)))] mr-[calc(-1_*_(var(--sf-edge-g)_+_var(--sf-edge-ar)_+_var(--sf-edge-br)))] w-[calc(100%_+_2_*_var(--sf-edge-g)_+_var(--sf-edge-al)_+_var(--sf-edge-ar)_+_var(--sf-edge-bl)_+_var(--sf-edge-br))] pl-[calc(var(--sf-edge-g)_+_var(--sf-edge-al)_+_var(--sf-edge-bl))] pr-[calc(var(--sf-edge-g)_+_var(--sf-edge-ar)_+_var(--sf-edge-br))] ${i}`;function P(e){const{className:r,style:a}=l(e);return{className:`${r} ${C}`,style:{...a,[m]:e.beyond??"0px"}}}export{m as EDGE_BEYOND_VAR,B as groundBeyond,O as sectionEdgeAttrs,P as sectionEdgeBandAttrs,L as sectionEdgeBeyondAttrs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as a,Fragment as u}from"react/jsx-runtime";import l from"../../../../../components/ContactLocations.js";import{CONTACT_LOCATIONS_CARDS_PLACEHOLDER as g,CONTACT_LOCATIONS_DEFAULTS as i,contactLocationCardOfRow as s}from"../../../../../../format/lib/content/contact.js";import{SITE_OFFICES_SOURCE as m,declaredBlockSource as c,sourcedRows as C}from"../../../../../../format/lib/content/block-sources.js";import{phHideDefault as h}from"../../scaffold.js";import{say as o}from"../../../../../../format/lib/editor-words.js";import{pictureHoverOf as L}from"../../../../../../format/lib/animation/hover.js";import{contactLocationOfOffice as O}from"../../../../../../format/lib/content/site-offices.js";import{SiteOffices as S}from"../../../../../components/SiteOffices.js";import{ContactLocationsMeta as T}from"../../../../../../format/lib/document/blocks/general/ContactLocations/meta.js";const y=()=>[{name:o("Location name"),address:o("Street address"),state:o("State"),country:o("Country"),phone:"+00 000 0000",hours:o("Opening hours")}];function E(t,e=[]){if(!c(t))return t.locations??g;if(c(t)===m&&e.length)return e.map(O);const n=C(t,t.editor?.isEditing===!0,y());return n.rows.length?n.rows.map(s):null}function r(t,e,n){const d=h(t,e,n);return d!==void 0?d:t==null?void 0:""}const b={...T,render:t=>c(t)===m?a(S,{children:e=>f(t,e)}):f(t)};function f(t,e){const n=E(t,e);return n?a(l,{sectionNumber:r(t.sectionNumber,i.sectionNumber,t.editor),heading:r(t.heading,i.heading,t.editor),tagline:r(t.tagline,i.tagline,t.editor),galleryKicker:r(t.galleryKicker,i.galleryKicker,t.editor),galleryHint:r(t.galleryHint,i.galleryHint,t.editor),locations:n,mapTheme:t.mapTheme??i.mapTheme,imageShape:t.imageShape,pictureHover:L(t,"ContactLocations"),editing:t.editor?.isEditing,nodeId:t.editor?.isEditing?t.id:void 0}):a(u,{})}export{b as ContactLocationsRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as s}from"react/jsx-runtime";import{bandPadAttrs as y}from"../../../../content/section-padding.js";import{innerPaddingFallback as T}from"../../../passes/section-padding.js";import O from"../../../../../components/Footprint.js";import{FOOTPRINT_DEFAULTS as C,footprintHeadInList as w,footprintListColumns as P,footprintListPosition as E,footprintMapHeight as F,footprintOfficeOfRow as m,footprintShows as H}from"../../../../../../format/lib/content/footprint.js";import{DEALERS_SOURCE as l,SITE_OFFICES_SOURCE as u,declaredBlockSource as d,sourcedRows as R}from"../../../../../../format/lib/content/block-sources.js";import{hidableText as h}from"efficient-easel/draw";import{parseSectionHeadPlacement as b}from"../../../../../../format/lib/sections/section-head-placement.js";import{phRows as x,phHide as f}from"../../scaffold.js";import{say as e}from"../../../../../../format/lib/editor-words.js";import{CARD_TEMPLATE_SLOT as L}from"../../../../../../format/lib/content/card-template.js";import{cardPressTitlesOf as _}from"../../../card-press-titles.js";import{SiteOffices as I}from"../../../../../components/SiteOffices.js";import{FootprintMeta as q,FOOTPRINT_PH as c}from"../../../../../../format/lib/document/blocks/general/Footprint/meta.js";const A=()=>[{role:e("Headquarters"),city:e("City"),country:e("Country"),address:e("Street address"),lat:0,lng:0,hq:!0},{role:e("Office"),city:e("City"),country:e("Country"),address:e("Street address"),lat:0,lng:0,hq:!1}],S=()=>[{role:e("Headquarters"),city:e("City"),country:e("Country"),address:e("Street address"),hq:"true"},{role:e("Office"),city:e("City"),country:e("Country"),address:e("Street address")}];function D(t,r=[]){const i=()=>x(t.offices,A(),t.editor),o=d(t);if(!o||o===l)return i();const a=t.editor?.isEditing===!0;if(o===u)return r.length?[...r]:a?S().map(m):i();const n=R(t,a,S());return!n.sample&&!n.rows.length?i():n.rows.map(m)}const X={...q,render:t=>d(t)===u?s(I,{children:r=>g(t,r)}):g(t)};function g(t,r){const i=b(t.headPlacement)==="own-box",o=n=>i?void 0:n,a=D(t,r);return s(O,{sectionNumber:o(f(t.sectionNumber,c.sectionNumber,t.editor)),heading:o(f(t.heading,c.heading,t.editor)),tagline:o(f(t.tagline,c.tagline,t.editor)),omitHead:i,offices:a,mapTheme:t.mapTheme??C.mapTheme,bandPad:y(t,T("Footprint"),{noTop:i}),editing:t.editor?.isEditing,dealers:d(t)===l,search:t.search===!0,searchHint:h(t.searchHint),noMatchText:h(t.noMatchText),listPosition:E(t),showDistance:t.showDistance!==!1,shows:H(t),listColumns:P(t),mapHeight:F(t),headInList:w(t),template:t.template,ownerId:String(t.id??""),pressTitles:_(t,L)})}export{X as FootprintRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import{HideTaker as R}from"../../../../../components/ViewHideRoot.js";import{SideOnceClass as T}from"../../../../../components/SideSpaceOnce.js";import{resolveWidth as b}from"../../../../../../format/lib/content/section-width.js";import{FRAME as g}from"../../../../../components/BlockFrame.js";import G from"../../../../../components/EditorialSectionHead.js";import{renderGold as _,renderHeadline as j}from"../../../../../components/goldPhrases.js";import s from"../../../../../components/SectionHeader.js";import{hidableText as f}from"efficient-easel/draw";import{parseNaturalDescriptionSize as z,parseNaturalRowGap as A,parseSectionHeadStyle as C}from"../../../../../../format/lib/sections/section-head-style.js";import{parseSectionEyebrowLook as p}from"../../../../../../format/lib/sections/section-eyebrow-look.js";import{phHide as t}from"../../scaffold.js";import{SectionHeaderMeta as D,SECTION_HEADER_PH as r}from"../../../../../../format/lib/document/blocks/general/SectionHeader/meta.js";const V={...D,render:({headStyle:S,num:i,numStyle:H,eyebrowLook:l,title:o,description:c,logoSrc:d,logoAlt:x,linkText:k,linkHref:w,rowGap:h,descriptionSize:v,widthMode:y,editor:e})=>{const u=t(k,r.linkText,e),E=b({widthMode:y},"full"),a=C(S);return n(T,{className:"px-[var(--sf-site-gutter,40px)] pt-10 max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))] max-view-wide:pt-6",children:N=>n(R,{as:"section",className:N,children:n("div",{className:E.mode==="page"?g:void 0,children:a==="editorial"?n(G,{num:t(i,r.num,e),title:(()=>{const m=t(o,r.title,e);return m?j(m,!0):void 0})(),desc:(()=>{const m=t(c,r.description,e);return m?_(m):void 0})(),spaceBelow:""}):a==="simple"?n(s,{look:"simple",num:t(i,r.num,e),title:t(o,r.title,e),eyebrowLook:p(l,"SectionHeader")}):a==="statement"?n(s,{look:"statement",num:t(i,r.num,e),title:t(o,r.title,e),eyebrowLook:p(l,"SectionHeader")}):a==="natural"?n(s,{look:"natural",num:t(i,r.num,e),title:t(o,r.title,e),description:t(c,r.description,e),eyebrowLook:p(l,"SectionHeader"),rowGap:A(h),descriptionSize:z(v)}):a==="essay"?n(s,{look:"essay",num:t(i,r.num,e),title:t(o,r.title,e),eyebrowLook:p(l,"SectionHeader")}):n(s,{num:t(i,r.num,e),title:t(o,r.title,e),description:t(c,r.description,e),logo:d?{src:d,alt:f(x)}:void 0,link:u?{text:u,href:f(w)||"#"}:void 0,numStyle:H,accent:!0})})})})}};export{V as SectionHeaderRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hasWords as
|
|
1
|
+
import{hasWords as W,registerSectionToBox as t}from"../../../sections/section-to-box.js";import{BUTTON as P,DIM as y,DROP_COMMON as s,DROP_SIDE_PADDING as O,INNER_BOX as o,leadLine as M,SAME_KEYS as d,SECTION_BOX as p,TEXT as l,innerPad as w,siteGutterOf as B,innerPadKeys as k,smallText as b,wrapperPad as _,wrapperPadKeys as u}from"./section-to-box-row-parts.js";import{CARDS_SECTION_TO_BOX as U}from"./section-to-box-rows-cards.js";import{SITE_SIDE as E}from"efficient-easel/screen/lib/content/length-units";import{storedUnit as x}from"../../../../../format/lib/content/css-length.js";import{finiteNumber as G}from"../../../../../format/lib/finite-number.js";import{STATS_SECTION_TO_BOX as F}from"./section-to-box-rows-stats.js";import{LOGOS_SECTION_TO_BOX as K}from"./section-to-box-rows-logos.js";import{STRIP_SECTION_TO_BOX as Y}from"./section-to-box-rows-strip.js";import{TIMELINE_SECTION_TO_BOX as j}from"./section-to-box-rows-timeline.js";import{LOCATIONS_SECTION_TO_BOX as z}from"./section-to-box-rows-locations.js";import{HEAD_ONLY_SECTION_TO_BOX as q}from"./section-to-box-rows-head.js";import{PAGE_HEADER_SECTION_TO_BOX as J}from"./section-to-box-rows-pageheader.js";import{TAB_BAR_SECTION_TO_BOX as Q}from"./section-to-box-rows-tabbar.js";import{DOCBODY_SECTION_TO_BOX as V}from"./section-to-box-rows-docbody.js";import{EDITORIAL_SECTION_TO_BOX as Z}from"./section-to-box-rows-editorial.js";import{FORMS_SECTION_TO_BOX as $}from"./section-to-box-rows-forms.js";import{CHECKOUT_SECTION_TO_BOX as ee}from"./section-to-box-rows-checkout.js";import{PROOF_SECTION_TO_BOX as te}from"./section-to-box-rows-proof.js";import{INTEGRATIONS_SECTION_TO_BOX as oe}from"./section-to-box-rows-integrations.js";import{PROMO_SECTION_TO_BOX as ne}from"./section-to-box-rows-promo.js";import{FITMENT_SECTION_TO_BOX as ie}from"./section-to-box-rows-fitment.js";import{fluidToken as re,headTree as N,token as i}from"./section-head-looks.js";import{CTA_PH as h,PH as ae,phAccentAsMarks as m}from"../../../../../format/lib/document/blocks/placeholders.js";import{PROSE_PH as f}from"../../../../../format/lib/document/blocks/general/Prose/meta.js";import{PARAGRAPHS_A_PH as c}from"../../../../../format/lib/document/blocks/general/ParagraphsA/meta.js";import{BANNER_PH as se}from"../../../../../format/lib/document/blocks/general/Banner/meta.js";import{TITLE_WITH_BUTTONS_PH as de,TITLE_WITH_BUTTONS_SCAFFOLD_BUTTONS as pe}from"../../../../../format/lib/document/blocks/general/TitleWithButtons/meta.js";import{SECTION_HEADER_PH as a}from"../../../../../format/lib/document/blocks/general/SectionHeader/meta.js";import{INTRO_PH as S}from"../../../../../format/lib/document/blocks/general/IntroBleed/meta.js";import{boxPadding as le,fillSlot as he}from"../../../../../format/lib/document/seed-parts.js";const I={top:72,bottom:72,topPhone:72,bottomPhone:72},me={name:"Editorial Text",boxProps:e=>({...p,direction:"column",gap:28,gapPhone:28,sectionBorder:{top:1},..._(e,I)}),box:[["topBorder","sectionBorder",e=>e===!1?void 0:{top:1}],...d,...u(I)],parts:[N("Prose"),{kind:"text",key:"body",props:y,style:{textStyle:"body-1",...i("body",16),lineHeight:1.7,paragraphSpacing:18}}],drop:{...s,...O,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)"}},H={buttonPaddingTop:20,buttonPaddingBottom:20,buttonPaddingLeft:28,buttonPaddingRight:28},A=(e,n)=>n?.variant==="primary",R=(e,n)=>({kind:"list",key:"buttons",name:"Button",flat:!0,when:e,parts:[{kind:"button",key:"label",href:"href",when:A,variant:"primary",style:{letterSpacing:.3},props:{...P,...H,...n}},{kind:"button",key:"label",href:"href",when:(r,g)=>!A(r,g),variant:"ghost",style:{letterSpacing:.3},props:{...P,...H,...n}}]}),T=e=>W(e.title),ge={name:"Call-to-Action Heading",boxProps:e=>({...p,direction:"row",align:"center",justify:T(e)?"between":"end",gap:60,gapPhone:60,share:"content",sectionBorder:{bottom:1},...w(e,"TitleWithButtons")}),box:[...d,...k("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",...re("headingLarge",48,7,108),case:"upper",lineHeight:.94,letterSpacing:-.035},mark:"accentItalic"}]},{kind:"group",name:"Buttons",props:e=>({...o,gap:14,gapPhone:14,widthFitPhone:"fill",...T(e)?{minWidth:280,minWidthPhone:0}:{}}),parts:[R(T,{widthFit:"fill",iconPosition:"end"}),R(e=>!T(e),{})]}],drop:{...s,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 ce(e,n){const r=B(n,{to:x(e.sectionPaddingUnitTablet??e.sectionPaddingUnit)}),g=B(n,{view:"phone",to:x(e.sectionPaddingUnitPhone),maxPx:20});return{sectionPaddingLeft:E,sectionPaddingRight:E,sectionPaddingLeftTablet:r,sectionPaddingRightTablet:r,sectionPaddingLeftPhone:g,sectionPaddingRightPhone:g}}const C={top:40,bottom:64,topPhone:24,bottomPhone:36},Te={name:"Section Header",boxProps:(e,n)=>({...p,direction:"column",gap:0,..._(e,C),...ce(e,n)}),box:[...d,...u(C)],parts:[N("SectionHeader")],drop:{...s,...O,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"}},v={...o,direction:"row",share:[67],gap:32},L={...o,sectionPaddingLeft:24,sectionPaddingLeftPhone:0},X=(e,n,r)=>({kind:"group",name:e,props:n,parts:[r]}),Pe={name:"Lead Text",boxProps:e=>({...p,direction:"column",gap:40,gapPhone:40,sectionBorder:{bottom:1},...w(e,"ParagraphsA")}),box:[...d,...k("ParagraphsA")],parts:[{kind:"group",name:"Numbers",props:{...v,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:[b("eyebrow",{color:"labels",...i("label",12),letterSpacing:.24})]},X("Stats column",o,{kind:"group",name:"Stats",props:{...L,gap:0,gapPhone:0},parts:[{kind:"list",key:"stats",name:"Stat",flat:!0,parts:[M("value","label",{...i("label",13),letterSpacing:.18,lineHeight:1.8})]}]})]},{kind:"group",name:"Words",props:{...v,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}}]}]},X("Note column",{...o,justify:"end"},{kind:"group",name:"Founders",props:{...L,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:y,style:{textStyle:"body-5",fontRole:"heading",...i("body",14,12),lineHeight:1.7}}]},b("attribution",{...i("label",12,10),letterSpacing:.24,lineHeight:1.7})]})]}],drop:{...s}},D={top:24,bottom:24,topPhone:24,bottomPhone:24},Oe={name:"Banner",boxProps:e=>({...p,direction:"column",gap:0,..._(e,D)}),box:[...d,"contained",...u(D)],parts:[{kind:"group",name:"Card",keepEmpty:!0,props:{...o,gap:28,gapPhone:28,placement:"top-left",darken:60,darkenStyle:"even",sectionBorder:{width:1},...he("surface"),...le(64,40,40,24)},box:[["imageSrc","bgImage"],["overlay","darken",e=>Math.min(Math.max(G(e)??60,0),100)]],parts:[{kind:"group",name:"Words",props:{...o,gap:20,gapPhone:20},parts:[b("eyebrow"),{kind:"text",key:"title",role:"heading",props:{...l,maxWidth:680},style:{weight:500,lineHeight:1.05,letterSpacing:-.03,case:"none",...i("headingMedium",44,32)}},{kind:"text",key:"body",props:{...l,maxWidth:680},style:{textStyle:"body-1",lineHeight:1.6,...i("body",16)}}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:P}]}],drop:{...s,...O}},be={Prose:me,TitleWithButtons:ge,SectionHeader:Te,ParagraphsA:Pe,Banner:Oe},Qe={Prose:()=>({eyebrow:f.eyebrow,title:m(f.title),body:f.body}),TitleWithButtons:()=>({title:m(de.title),buttons:pe.map(e=>({...e}))}),SectionHeader:()=>({num:a.num,title:m(a.title),description:a.description,linkText:a.linkText,linkHref:h.href}),ParagraphsA:()=>({eyebrow:c.eyebrow,lead:ae.body,foundersHeading:c.foundersHeading,foundersBody:c.foundersBody,attribution:c.attribution}),Banner:()=>({...se,ctaText:h.text,ctaHref:h.href}),ProcessSteps:()=>({num:a.num,title:m(a.title)}),IntroBleed:()=>({eyebrow:S.eyebrow,title:m(S.title),body:S.body,ctaText:h.text,ctaHref:h.href})};function Ve(){t(be),t(F),t(K),t(U),t(Y),t(j),t(z),t(q),t(J),t(Q),t(V),t(Z),t($),t(ee),t(ie),t(te),t(oe),t(ne)}export{be as GENERAL_SECTION_TO_BOX,Qe as TEXT_PRESS_STARTERS,Ve as registerGeneralSectionRows};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SECTION_CSS_SCOPE_ATTR } from "../../../format/lib/content/section-css.js";
|
|
2
|
+
import { SITE_CSS_SCOPE_ATTR } from "../../../format/lib/content/site-css.js";
|
|
2
3
|
export declare const CUSTOM_HTML_SCOPE_ATTR = "data-sf-custom-html";
|
|
3
|
-
export type CssScopeAttr = typeof CUSTOM_HTML_SCOPE_ATTR | typeof SECTION_CSS_SCOPE_ATTR;
|
|
4
|
+
export type CssScopeAttr = typeof CUSTOM_HTML_SCOPE_ATTR | typeof SECTION_CSS_SCOPE_ATTR | typeof SITE_CSS_SCOPE_ATTR;
|
|
4
5
|
export declare function customHtmlIdPrefix(id: string): string;
|
|
5
6
|
export declare function customHtmlScope(id: string, attr?: CssScopeAttr): string;
|
|
6
7
|
export declare function scopeCustomCss(css: string, id: string, attr?: CssScopeAttr, ownIds?: ReadonlySet<string>): string;
|
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
import type { BlockPass } from "../../../../format/lib/document/passes/types.js";
|
|
2
|
+
declare const SectionCssStyle: import("react").LazyExoticComponent<typeof import("../section-css-style.js").default>;
|
|
3
|
+
export declare function ScopedCssStyle({ css, id, attr }: {
|
|
4
|
+
css: string;
|
|
5
|
+
id: string;
|
|
6
|
+
attr?: Parameters<typeof SectionCssStyle>[0]["attr"];
|
|
7
|
+
}): import("react").JSX.Element;
|
|
2
8
|
export declare const sectionCustomCss: BlockPass;
|
|
9
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as i,jsxs as c}from"react/jsx-runtime";import{lazy as d}from"react";import{CellWrap as a}from"../../../components/InBoxContext.js";import{SECTION_CSS_KEY as f,SECTION_CSS_SCOPE_ATTR as l,sectionCssOf as C}from"../../../../format/lib/content/section-css.js";const o=d(()=>import("../section-css-style.js"));function x({css:t,id:e,attr:s}){return i(o,{css:t,id:e,attr:s})}const y={name:"sectionCustomCss",applies:(t,e,s)=>e.isSection(t)&&!!s&&typeof s.render=="function",panel(t,e,s){t.fields={...t.fields,...s.customCssFields()}},draw(t){t.defaultProps={...t.defaultProps,[f]:""};const e=t.render;t.render=s=>{const r=C(s),n=typeof s.id=="string"?s.id:"";return!r||!n?e(s):c(a,{className:"sf-section-css",attrs:{[l]:n},children:[i(o,{css:r,id:n}),e(s)]})}}};export{x as ScopedCssStyle,y as sectionCustomCss};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as _}from"react/jsx-runtime";import{SideOnceClass as p}from"../../../components/SideSpaceOnce.js";import{HideTaker as I}from"../../../components/ViewHideRoot.js";import{LineChoice as C}from"../../../components/InBoxContext.js";import{isBackgroundBox as F}from"../../../../format/lib/content/box-background.js";import{boxSideSpaceOf as L}from"../../../../format/lib/content/box-side-space.js";import{BAND_PAD_KEYS as S,BAND_PAD_UNIT_KEY as R,BLOCK_PAD_FRAME as P,PAD_TOTAL_KEY as f,SECTION_PAD_KEYS as K,framePadAttrs as H,padTotalKeys as h,padValuesOf as W,sectionPadAttrs as y,tierFramesOf as B}from"../../content/section-padding.js";import{readPartStyle as v}from"../part-styles.js";import{CRUMB_PAD as Y,SPEC_PAD as j}from"../../../../format/lib/sections/strip-shape.js";import{say as M}from"../../../../format/lib/editor-words.js";import{sectionFillPassClass as D}from"../../../../format/lib/content/section-min-height.js";import{COPIES_IN_THE_BOX as U,drawsCopiesInTheBox as $}from"../../../../format/lib/content/copies-in-box.js";import{ownEntry as c}from"../../../../format/lib/own-entry.js";const E={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}},ft=new Set(Object.keys(E));function m(t,e){return e?.innerPadding??c(E,t)}const ut=t=>m(t)??{},Pt=t=>c({DetailRows:{top:100,bottom:100}},t),O=new Set(["Flex","Text","Heading","ImageBlock","ButtonBlock"]),V=new Set(["Divider"]),X=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),T=new Set(["ProductGrid"]);function A(t,e,n=!1,o){const i=t.render;t.render=r=>{if(e?.(r))return i(r);const d={...W(r,K,n),sideSpace:L(r.sideSpace)},a=o?H({values:d,frame:o(r)},!0).outer:y(d),s=i(r);if(!a)return s;const l=u=>_(p,{className:u?`${a.className} ${u}`:a.className,children:N=>_(I,{className:N,style:a.style,children:s})}),g=D(r,{atSectionLine:!0}),b=D(r);return g===b?l(g):_(C,{line:"by-box",draw:u=>l(u?b:g)})}}const gt={name:"sectionPadding",applies:(t,e,n)=>e.isSection(t)&&!X.has(t)&&!!n&&typeof n.render=="function",panel(t,e,n){const o=m(e,t);if(o){t.fields={...t.fields,...n.sidesPaddingFields({keys:S,unitKey:R,fallback:o,tablet:!0,siteSide:!0})};return}if(T.has(e))return;const i=[S.top,S.bottom].filter(d=>t.fields!=null&&d in t.fields);if(i.length)throw new Error(`section-padding: ${e} declares its own ${i.join(" / ")} row; declare \`innerPadding: { top, bottom }\` in its meta and the one Padding row draws on its band`);const r=c(x,e);if(r){w(t,e,n,r);return}t.fields={...t.fields,...n.sidesPaddingFields({tablet:!0,siteSide:!0})}},draw(t,e){if(!m(e,t)){if(T.has(e)){A(t);return}O.has(e)||V.has(e)||A(t,e==="Flex"?n=>F(n.bgImage):U.has(e)?n=>$(e,n):void 0,!0,c(x,e))}}},k=["Heading","Text","ImageBlock","ButtonBlock"],G=["LogoBlock"],x={Text:t=>v(t,"text").textStyle?.startsWith("heading-")?P.heading:P.text,Heading:()=>P.heading,ButtonBlock:()=>P.text,Breadcrumb:()=>B(Y),SpecStrip:()=>B(j)},q={ButtonBlock:"Outer padding"};function z(t,e){const n=t[f],o=Array.isArray(n)?n.filter(s=>typeof s=="string"):[],i=h().filter(s=>e?.[s]);if(!i.length)return t;const r=[...o.filter(s=>!i.includes(s)),...i.filter(s=>typeof t[s]=="number")];if(r.length===o.length&&r.every((s,l)=>s===o[l]))return t;const{[f]:d,...a}=t;return r.length?{...a,[f]:r}:a}function J(t,e){if(e<=0)return null;const n=Array.isArray(t[f])?t[f]:[];return h().some(i=>typeof t[i]=="number"&&!n.includes(i))?M("plus {n} px (older setting)",{n:e}):null}function w(t,e,n,o){t.fields={...t.fields,...n.ownPaddingFields?.(o,J,c(q,e))??n.sidesPaddingFields({tablet:!0,siteSide:!0})};const i=t.resolveData;t.resolveData=(r,d)=>{const a=r.props??{},s=d?.trigger==="replace"?z(a,d.changed):a,l=s===a?r:{...r,props:s};return i?i(l,d):l}}const _t={name:"blockPadding",applies:(t,e,n)=>(k.includes(t)||G.includes(t))&&!!n&&typeof n.render=="function",panel(t,e,n){const o=c(x,e);if(!o){t.fields={...t.fields,...n.sidesPaddingFields({tablet:!0,siteSide:!0})};return}w(t,e,n,o)},draw(t,e){O.has(e)||A(t,void 0,!0)}};export{x as OWN_PAD_FRAME,q as OWN_PAD_LABEL,V as PADS_ITS_OWN_SPACE,O as PAD_ON_ROOT,ft as SECTION_PAD_INNER,E as SECTION_PAD_INNER_DEFAULTS,_t as blockPadding,ut as innerPaddingFallback,J as olderPadNote,Pt as ownPairDefault,gt as sectionPadding,z as withPadTotals};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as d}from"react/jsx-runtime";import{HideTaker as s}from"../../../components/ViewHideRoot.js";import{
|
|
1
|
+
import{jsx as d}from"react/jsx-runtime";import{HideTaker as s}from"../../../components/ViewHideRoot.js";import{SideOnceClass as X}from"../../../components/SideSpaceOnce.js";import{LineChoice as q}from"../../../components/InBoxContext.js";import{BOX_TYPE as z}from"../../../../format/lib/document/container-blocks.js";import{INTRO_EDGE_CLASS as J}from"../../../../format/lib/sections/intro-bleed-layout.js";import{cssLengthOf as G}from"../../../../format/lib/content/css-length.js";import{resolveContainerDirection as Q}from"../../../../format/lib/content/container-direction.js";import{HERO_BACKGROUND_VAR as Z,HERO_CHROME_CAP_VAR as tt,HERO_CHROME_INSET_VAR as nt,FULL_SECTION_WIDTH as et,SITE_WIDTH_CAP as _,centredCap as v,heroBackgroundTokens as ot}from"../../../../format/lib/content/page-width.js";import{SECTION_WIDTH_FAMILY as D,SECTION_WIDTH_KEYS as F,hasOwnSectionWidth as it,hasWidthFamily as rt,resolveWidth as L,siteWidthsOf as ct}from"../../../../format/lib/content/section-width.js";import{boxCardProps as lt}from"../../../../format/lib/content/box-background.js";import{cardCopyPlace as dt}from"../../../../format/lib/content/card-template.js";import{BOX_GUTTER_KEY as ut,boxGutterOf as st,boxPlaceOf as at,boxRunsEdgeToEdge as ft,isFrameContainer as O,ownNodeWidth as ht,sectionGroundAnswer as _t,siteDrawsGutter as Nt}from"../../../../format/lib/content/site-gutter.js";import{getEditorSiteContentWidth as wt}from"../../../../format/lib/document/editor-site-widths.js";import{GroundStopsAt as H,NestedBoxChoice as Ct,SectionGroupChoice as Ot,SectionGroupWidthsProvider as Et,SectionRootChoice as Tt,SplitBandAndColumn as M}from"../../../components/SiteGutterFrame.js";import{FRAME as P}from"../../../components/BlockFrame.js";import{sectionFillPassClass as p}from"../../../../format/lib/content/section-min-height.js";import{parentCapsWidth as mt}from"../../../../format/lib/sections/section-head-placement.js";import{addShowWhenFacts as E,withRowsShownWhen as T}from"../../../../format/lib/document/show-when-attach.js";import{findParentNode as St,heldByANode as pt,isNestedNode as xt,NOT_HELD_BY_A_NODE as y}from"../../../../format/lib/document/passes/document-position.js";import{ownEntry as U}from"../../../../format/lib/own-entry.js";const w="--sf-sw-site",Rt="--sf-sw-content",At="--sf-bg-cap",Wt="contents [--sf-site-width:var(--sf-sw-content)] max-view-wide:[--sf-site-width:var(--sf-sw-site)]",A=({own:n,content:t,siteContent:e})=>n===!0&&t==="full"&&e!=="full",k="contents view-wide:[--sf-site-width:100vw]",W=({held:n},t,e)=>n?e:d(s,{className:t,children:e}),It=`contents view-wide:[--sf-site-width:100vw] ${J} view-wide:[--sf-site-gutter:var(--intro-edge)]`,I=(n,t,e)=>t==="content"?`min(${G(n,e)},var(${w}))`:G(n,e);function m({content:n,contentMax:t,contentMaxUnit:e},o){return n==="full"?o!=="content"?et:null:t===null?null:I(t,o,e)}function S(n,t){return t===null?n:d(s,{className:"contents",style:{[w]:_},children:d(s,{className:Wt,style:{[Rt]:t},children:n})})}const bt="--sf-content-cap",gt="contents max-view-wide:[--sf-content-cap:none]";function Bt({content:n,contentMax:t,contentMaxUnit:e},o){return n==="full"?null:t!==null?I(t,o,e):o==="content"?null:`var(${w})`}function Gt(n,t){return t===null?n:d(s,{className:"contents",style:{[w]:_},children:d(s,{className:gt,style:{[bt]:t},children:n})})}const V=`var(${w},${_})`,h=(n,t,e="")=>n==="content"?d(s,{className:e||void 0,style:v(_),children:d(H,{ground:V,children:t})}):t;function $(n,t,e,o,c){if(A(e))return h(o,W(e,k,d(M,{children:n({...t,contained:!0})})),c);if(e.content==="full")return h(o,n({...t,contained:!1}),c);const i=m(e,o);return o==="content"&&i===null&&!e.own?n({...t,contained:!0}):h(o,S(d(M,{children:n({...t,contained:!0})}),i),c)}function vt(n,t,e,o,c){if(e==="hero"){const l=S(n(t),m(o,o.band));return o.band==="full"?d(s,{style:{[Z]:"none",[nt]:"initial",[tt]:"initial"},children:l}):o.band==="content"?d(s,{style:ot(!0),children:l}):l}const i=o.band??"full",r=p(t,{atSectionLine:!c});if(e==="rawMarkup"){if(o.content==="full")return h(i,n(t),r);const l=o.contentMax===null?_:I(o.contentMax,i,o.contentMaxUnit);return d(s,{className:"contents",style:{[w]:_},children:h(i,d(s,{className:r||void 0,style:v(l),children:n(t)}),r)})}if(e==="scrollOver"){const l=o.content==="full",u=A(o)?W(o,It,n({...t,fullWidth:!1})):S(n({...t,fullWidth:l}),l?null:m(o,i));return i==="content"?d(s,{className:"contents",style:{[At]:_},children:u}):u}switch(e){case"both":return h(i,Gt(n(t),Bt(o,i)),r);case"contained":return $(n,t,o,i,r);case"contentColumn":case"contentFull":case"productGrid":{const l=A(o),u=o.content==="full"&&!l?"full":"page",a=l?W(o,k,n({...t,widthMode:u})):S(n({...t,widthMode:u}),o.content==="full"?null:m(o,i));return e==="productGrid"&&!o.own?i==="content"?d(X,{className:r?`${P} ${r}`:P,children:N=>d(s,{className:N,children:a})}):a:h(i,a,r)}default:return h(i,S(n(t),m(o,i)),r)}}function Y(n,t,e,o,c){const i=c===z?"edge":"by-box",r=l=>vt(n,t,e,o,l);return i==="edge"?r(!0):p(t)===p(t,{atSectionLine:!0})?r(!1):d(q,{line:i,draw:r})}function Dt(n,t){const e=U(D,t);if(!e)return;const o=n.render;n.render=c=>{const i=ct(c),r={band:i.background,content:i.content??"content",contentMax:null},l=()=>e==="rawMarkup"?o(c):d(Ot,{draw:f=>f?.background==="content"?d(H,{ground:V,children:u(f)}):u(f)}),u=f=>{const C=f?{...r,band:f.background==="content"?r.band:f.background??r.band,content:f.content??r.content,own:f.background==="full"||f.content!==null,held:!0,siteContent:r.content}:r,R=Y(o,c,e,C,t);if(!O(t))return R;const g=st(c),B=g===void 0?C.content:g?"content":"full";return B===C.content?R:d(Ct,{atTop:R,nested:$(o,c,{...C,content:B,own:!1},C.band??"full",p(c))})},a=ht(t,c);if(!it(a))return l();const N=e==="rawMarkup",b=_t(t,c),j=a.content??(N?"full":r.content),x={band:b,content:b==="content"?"content":j,contentMax:a.contentMax,contentMaxUnit:a.contentMaxUnit,own:!N,siteContent:r.content};return d(Tt,{own:()=>d(Et,{value:{background:x.band,content:x.content},children:Y(o,c,e,x,t)}),followed:l})}}const Ft={all:[y,{not:{context:"runsEdgeToEdge",is:!0}}]},an={name:"sectionWidth",applies:(n,t,e)=>rt(n)&&!!e&&typeof e.render=="function",panel(n,t,e){const o=e.sectionOwnWidthFields({drawsFullOnItsOwn:U(D,t)==="rawMarkup"}),c=O(t)?e.boxGutterFields():{},i={...n.fields,...c,...o},r=O(t)?K(t,n,i,[ut]):i;E(n,{heldByANode:pt}),O(t)&&E(n,{runsEdgeToEdge:(l,u)=>ft(lt(l.props??{},dt(u.appState,l.props?.id)?.inCopy!==!1))}),n.fields=T(r,[F.background,F.content],O(t)?Ft:y)},draw(n,t){Dt(n,t)}};function Lt(n,t){if(!n||!("widthMode"in n))return n;const e={...n},o=e.widthMode;return o&&(e.widthMode={...o,currentValue:t.mode,inherited:t.inherited}),e}const Ht=new Set(["Heading","Text","ImageBlock","ButtonBlock"]),fn={name:"containedWidth",applies:(n,t,e)=>Ht.has(n)&&!!e&&typeof e.render=="function",panel(n,t,e){const o=e.widthField;n.fields=K(t,n,{...n.fields,...o("page")});const c=n.resolveFields;n.resolveFields=(i,r)=>{const l=c?c(i,r):r.fields,u=L(i?.props??{},"page"),a=N=>Lt(N,u);return l&&typeof l.then=="function"?l.then(a):a(l)}},draw(n){const t=n.render;n.render=e=>{const{mode:o}=L(e,"page");return t({...e,contained:o!=="full"})}}},Mt={not:{context:"inHeroGroupRow",is:!0}},hn={name:"buttonAlignInRow",applies:n=>n==="ButtonBlock",panel(n){const t=n;t.fields=T(t.fields??{},["align"],Mt),E(t,{inHeroGroupRow:(e,o)=>{const c=St(o.appState,e.props?.id);return!!c&&c.type==="HeroGroup"&&Q("HeroGroup",c.props?.direction)==="row"}})}};function Pt(n){return Object.values(n).some(t=>!!t&&typeof t=="object"&&t.type==="slot")}const yt={any:[]},Ut={all:[{not:{context:"outsideBox",is:!0}},{not:{context:"insideSiteGutter",is:!0}}]},kt={not:{context:"widthCappedByParent",is:!0}};function K(n,t,e,o=["widthMode"]){if(n==="ButtonBlock")return T(e,["_gWidth",...o],yt);if(Pt(e)){const c=(i,r)=>at(r.appState?.data?.content,i.props?.id,Nt(wt()));return E(t,{outsideBox:(i,r)=>c(i,r)?.inBox!==!0,insideSiteGutter:(i,r)=>c(i,r)?.insideGutter}),T(e,o,Ut)}return E(t,{widthCappedByParent:(c,i)=>"parent"in i?mt(i.parent):xt({props:c.props??{}},i)}),T(e,o,kt)}export{At as SECTION_BACKGROUND_VAR,gt as SECTION_CONTENT_CAP_CLASS,bt as SECTION_CONTENT_CAP_VAR,Wt as SECTION_CONTENT_CLASS,Rt as SECTION_CONTENT_VAR,w as SITE_CONTENT_VAR,hn as buttonAlignInRow,fn as containedWidth,an as sectionWidth,Lt as widthModeFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{SECTION_CSS_SCOPE_ATTR as n}from"../../../format/lib/content/section-css.js";import{scopeCustomCss as m}from"./custom-css.js";function l({css:t,id:s,attr:e=n}){const o=m(t,s,e);return o?r("style",{dangerouslySetInnerHTML:{__html:o}}):null}export{l as default};
|