efficient-web-builder 67.8.0 → 68.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/BlockGapField.d.ts +4 -1
- package/dist/editor/components/BlockGapField.js +1 -1
- package/dist/editor/components/CornersField.d.ts +3 -1
- package/dist/editor/components/CornersField.js +1 -1
- package/dist/editor/components/SideSpaceField.d.ts +5 -1
- package/dist/editor/components/SideSpaceField.js +1 -1
- package/dist/editor/components/StorefrontEditor.js +1 -1
- package/dist/editor/components/WebsiteSettingsPanel.d.ts +0 -5
- package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
- package/dist/editor/components/storefront-editor.css +6 -1
- package/dist/editor/components/useSiteLengthRow.d.ts +15 -0
- package/dist/editor/components/useSiteLengthRow.js +1 -0
- package/dist/editor/lib/content/site-length-rows.d.ts +15 -0
- package/dist/editor/lib/content/site-length-rows.js +1 -0
- package/dist/editor/lib/document/blocks/general/Logos/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ProcessSteps/fields.js +1 -1
- package/dist/editor/lib/document/box-fields.d.ts +2 -0
- package/dist/editor/lib/document/box-fields.js +1 -1
- package/dist/editor/lib/document/choice-pictures.d.ts +2 -0
- package/dist/editor/lib/document/choice-pictures.js +1 -1
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/shape-picker.js +1 -1
- package/dist/format/lib/content/block-align.d.ts +2 -0
- package/dist/format/lib/content/block-align.js +1 -1
- package/dist/format/lib/content/container-gap.d.ts +1 -0
- package/dist/format/lib/content/container-gap.js +1 -1
- package/dist/format/lib/content/css-length.d.ts +5 -6
- package/dist/format/lib/content/css-length.js +1 -1
- package/dist/format/lib/content/gallery-layout.d.ts +25 -11
- package/dist/format/lib/content/gallery-layout.js +1 -1
- package/dist/format/lib/content/grid-span.js +1 -1
- package/dist/format/lib/content/image-text-rows.d.ts +1 -0
- package/dist/format/lib/content/image-text-rows.js +1 -1
- package/dist/format/lib/content/page-width.d.ts +2 -1
- package/dist/format/lib/content/page-width.js +1 -1
- package/dist/format/lib/content/section-min-height.d.ts +3 -1
- package/dist/format/lib/content/section-min-height.js +1 -1
- package/dist/format/lib/content/view-lines.d.ts +7 -0
- package/dist/format/lib/content/view-lines.js +1 -1
- package/dist/format/lib/document/media-manifest.json +13 -3
- package/dist/format/lib/editor-words-kept.js +1 -1
- package/dist/format/lib/sections/section-head-placement.js +1 -1
- package/dist/format/lib/source-rules/site-length-writes.d.ts +18 -0
- package/dist/format/lib/source-rules/site-length-writes.js +2 -0
- package/dist/format/lib/theme.d.ts +5 -0
- package/dist/format/lib/theme.js +1 -1
- package/dist/render/components/ButtonBlock.js +1 -1
- package/dist/render/components/CardRowContext.d.ts +2 -1
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/Eyebrow.js +1 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/InBoxContext.d.ts +6 -0
- package/dist/render/components/InBoxContext.js +1 -1
- package/dist/render/components/Logo.js +1 -1
- package/dist/render/components/LogoBlock.js +1 -1
- package/dist/render/components/PreviewHeaderContext.d.ts +3 -1
- package/dist/render/components/PreviewHeaderContext.js +1 -1
- package/dist/render/components/PublishedPartStylesContext.js +1 -1
- package/dist/render/components/SectionAnimation.js +1 -1
- package/dist/render/components/Split.js +1 -1
- package/dist/render/components/Text.js +1 -1
- package/dist/render/components/ViewHideRoot.d.ts +2 -1
- package/dist/render/components/ViewHideRoot.js +1 -1
- package/dist/render/lib/content/section-edge.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
- package/dist/render/lib/document/passes/block-size.js +1 -1
- package/dist/render/lib/document/passes/section-anchor.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-width.js +1 -1
- package/package.json +10 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as B}from"react/jsx-runtime";import{createContext as Jt,useCallback as e,useContext as Kt,useMemo as Qt,useState as Xt}from"react";import{EditorSiteLogoContext as $t}from"./SiteLogoContext.js";import{IDENTITY_CARD_GAP as M,DEFAULT_HEADING_COMPRESSION as N,DEFAULT_HEADING_TYPOGRAPHY as g,DEFAULT_SIZES as Y,DEFAULT_SWITCH_SHOWN as b,DEFAULT_THEME_MODE as j,DEFAULT_THEME_VALUE as z}from"../../format/lib/theme.js";import{DEFAULT_FONTS as V}from"../../format/lib/fonts.js";const Z={},q=Jt({settings:null,setSettings:()=>{},primeSettings:()=>{},websiteName:null,templateChrome:!1,templateName:null,chromePlaceholder:!1,themeMode:j,setThemeMode:()=>{},themeSwitchShown:b,setThemeSwitchShown:()=>{},theme:z,themeRow:"none",setTheme:()=>{},fonts:V,setFonts:()=>{},sizes:Y,setSizes:()=>{},cornerRadiusPx:null,setCornerRadiusPx:()=>{},cardShadow:null,setCardShadow:()=>{},shadowColor:null,setShadowColor:()=>{},cardGap:M,setCardGap:()=>{},hoverEffect:null,setHoverEffect:()=>{},headingCompression:N,setHeadingCompression:()=>{},siteWidth:null,setSiteWidth:()=>{},siteGutter:null,siteGutterPhone:null,blockGap:null,blockGapPhone:null,siteLengthUnits:Z,setSiteLengthUnits:()=>{},setSiteGutter:()=>{},setSiteGutterPhone:()=>{},setBlockGap:()=>{},setBlockGapPhone:()=>{},headingTypography:g,setHeadingTypography:()=>{},textStyles:null,setTextStyles:()=>{},wordStyles:null,heroBackgroundFollowsWidth:null,setHeroBackgroundFollowsWidth:()=>{},sectionBackgroundWidth:null,setSectionBackgroundWidth:()=>{},sectionContentWidth:null,setSectionContentWidth:()=>{},photographyGrayscale:null,setPhotographyGrayscale:()=>{},shareButtonOnPosts:null,setShareButtonOnPosts:()=>{},themeFromDocument:!1});function ne({children:o,websiteName:s=null,templateChrome:l=!1,templateName:r=null,chromePlaceholder:u=!1,themeMode:J=j,onThemeModeChange:i,themeSwitchShown:K=b,onThemeSwitchShownChange:c,theme:Q=z,themeRow:X="none",onThemeChange:d,fonts:$=V,onFontsChange:S,sizes:C=Y,onSizesChange:a,cornerRadiusPx:tt=null,onCornerRadiusPxChange:p,cardShadow:et=null,onCardShadowChange:h,shadowColor:st=null,onShadowColorChange:m,cardGap:ot=M,onCardGapChange:E,hoverEffect:lt=null,onHoverEffectChange:T,headingCompression:nt=N,onHeadingCompressionChange:f,siteWidth:rt=null,onSiteWidthChange:P,siteGutter:ut=null,siteGutterPhone:it=null,blockGap:ct=null,blockGapPhone:dt=null,siteLengthUnits:St=Z,onSiteLengthUnitsChange:_,onSiteGutterChange:x,onSiteGutterPhoneChange:G,onBlockGapChange:w,onBlockGapPhoneChange:D,headingTypography:at=g,onHeadingTypographyChange:F,textStyles:pt=null,onTextStylesChange:H,wordStyles:ht=null,heroBackgroundFollowsWidth:mt=null,onHeroBackgroundFollowsWidthChange:k,sectionBackgroundWidth:Et=null,onSectionBackgroundWidthChange:A,sectionContentWidth:Tt=null,onSectionContentWidthChange:I,photographyGrayscale:ft=null,onPhotographyGrayscaleChange:L,shareButtonOnPosts:Pt=null,onShareButtonOnPostsChange:U,themeFromDocument:_t=!1}){const[n,v]=Xt(null),xt=e(t=>v(qt=>qt??t),[]),Gt=e(t=>i?.(t),[i]),wt=e(t=>c?.(t),[c]),Dt=e(t=>d?.(t),[d]),Ft=e(t=>S?.(t),[S]),Ht=e(t=>a?.(t),[a]),kt=e(t=>P?.(t),[P]),At=e(t=>x?.(t),[x]),It=e(t=>G?.(t),[G]),Lt=e(t=>w?.(t),[w]),Ut=e(t=>D?.(t),[D]),vt=e(t=>_?.(t),[_]),Wt=e(t=>k?.(t),[k]),yt=e(t=>A?.(t),[A]),Ot=e(t=>I?.(t),[I]),Rt=e(t=>L?.(t),[L]),Bt=e(t=>U?.(t),[U]),Mt=e(t=>p?.(t),[p]),Nt=e(t=>h?.(t),[h]),gt=e(t=>m?.(t),[m]),Yt=e(t=>E?.(t),[E]),bt=e(t=>T?.(t),[T]),jt=e(t=>f?.(t),[f]),zt=e(t=>F?.(t),[F]),Vt=e(t=>H?.(t),[H]),W=n?.logoUrl,y=n?.logoReversed,O=n?.logoInkIsDark,R=n!==null,Zt=Qt(()=>({logo:R?{logoUrl:W,logoReversed:y,logoInkIsDark:O}:null,placeholder:l||u,wordmark:l?r:s}),[R,W,y,O,l,u,r,s]);return B($t.Provider,{value:Zt,children:B(q.Provider,{value:{settings:n,setSettings:v,primeSettings:xt,websiteName:s,templateChrome:l,templateName:r,chromePlaceholder:u,themeMode:J,setThemeMode:Gt,themeSwitchShown:K,setThemeSwitchShown:wt,theme:Q,themeRow:X,setTheme:Dt,fonts:$,setFonts:Ft,sizes:C,setSizes:Ht,cornerRadiusPx:tt,setCornerRadiusPx:Mt,cardShadow:et,setCardShadow:Nt,shadowColor:st,setShadowColor:gt,cardGap:ot,setCardGap:Yt,hoverEffect:lt,setHoverEffect:bt,headingCompression:nt,setHeadingCompression:jt,siteWidth:rt,setSiteWidth:kt,siteGutter:ut,siteGutterPhone:it,blockGap:ct,blockGapPhone:dt,siteLengthUnits:St,setSiteLengthUnits:vt,setSiteGutter:At,setSiteGutterPhone:It,setBlockGap:Lt,setBlockGapPhone:Ut,headingTypography:at,setHeadingTypography:zt,textStyles:pt,setTextStyles:Vt,wordStyles:ht,heroBackgroundFollowsWidth:mt,setHeroBackgroundFollowsWidth:Wt,sectionBackgroundWidth:Et,setSectionBackgroundWidth:yt,sectionContentWidth:Tt,setSectionContentWidth:Ot,photographyGrayscale:ft,setPhotographyGrayscale:Rt,shareButtonOnPosts:Pt,setShareButtonOnPosts:Bt,themeFromDocument:_t},children:o})})}const Ct=()=>Kt(q);function re(o,s,l){return o?s===l?"read":"loading":"none"}function ue(o,s){return{value:o,readFor:s}}function ie(o,s,l){return{value:s,readFor:o.readFor===l?l:null}}function ce(){const{sectionContentWidth:o,themeFromDocument:s}=Ct();return s?null:o}export{q as PreviewHeaderContext,ne as PreviewHeaderProvider,re as siteThemeRow,ie as themeEdited,ue as themeSeeded,Ct as usePreviewHeader,ce as useSiteContentWidth};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Fragment as
|
|
1
|
+
"use client";import{Fragment as E,jsx as f,jsxs as O}from"react/jsx-runtime";import{createContext as P,useContext as m,useEffect as A,useId as k,useMemo as F,useRef as M}from"react";import{armEntrance as j}from"efficient-shell/format";import{blockDrawsTextStyle as D,partRuleForKind as y,partRuleForText as K,partStyleCss as L,publishedPartStyles as N}from"../lib/document/part-styles.js";import{useViewWidth as I}from"./SectionAnimation.js";import{useDrawsAtEdge as $}from"./InBoxContext.js";import{styleKeyForPart as B}from"../../format/lib/sections/section-text-kinds.js";import{NO_MOTIONS as H,PART_LIFT_ATTR as b,drawPartEntrance as J,drawPartScroll as W,ensurePartLiftSheet as Y,firstOnPage as R,partBoxOf as V,partMotionDrawn as q,partMoves as z}from"../lib/animation/part-motion.js";const S=P(null),T=P(null),_=P(null);function le({needles:e,styles:t,motions:r=H,type:o,atEdge:n=!1,children:i}){const u=k(),d=$(n?"edge":"by-box"),x=JSON.stringify([u,e,t,r,o]),c=F(()=>{const p=Object.keys(r).filter(l=>z(r[l]));return N(e,t,u,l=>B(o,l),l=>D(o,l),l=>p.includes(l)?q(r[l]):null,p)},[x]);if(!c)return f(E,{children:i});const s=L(c,{inBox:d});return O(E,{children:[s&&f("style",{href:`${G}${u}-${Q(s)}`,precedence:w,dangerouslySetInnerHTML:{__html:s.replace(/</g,"\\3c ")}}),f(S.Provider,{value:c,children:i})]})}const g=new WeakMap;function v(e,t){const r=R(t.filter(n=>n.arm)),o=t.some(n=>n.entering)?void 0:R(t.filter(n=>n.scroll));for(const n of t)n!==r&&n.undo&&(n.undo(),n.undo=void 0),n!==o&&n.undoScroll&&(n.undoScroll(),n.undoScroll=void 0);r?.arm&&!r.undo&&(r.undo=r.arm()),o?.scroll&&!o.undoScroll&&(o.undoScroll=o.scroll()),t.some(n=>n.lift)?(Y(e.ownerDocument),e.setAttribute(b,"")):e.removeAttribute(b)}function se(e){const t=M(null),r=e?.motion?.entrance??null,o=e?.motion?.scroll??null,n=e?.motion?.hover==="lift",i=I(t,r!==null||o!==null),u=r?r[i]:null,d=o&&o[i].effect!=="none"?o[i]:null,x=JSON.stringify([u,d]);return A(()=>{const c=t.current,s=V(c?.parentElement??null);if(!r&&!o&&!n||!c||!s)return;const p=u?()=>{const h=J(s,u),C=j(s);return()=>{C?.(),h()}}:null,l=g.get(s)??[];g.set(s,l);const a={element:c,arm:p,entering:u!==null&&u.kind!=="none",scroll:d?()=>W(s,d):null,lift:n};return l.push(a),v(s,l),()=>{const h=l.indexOf(a);h<0||(l.splice(h,1),a.undo?.(),a.undo=void 0,a.undoScroll?.(),a.undoScroll=void 0,v(s,l),l.length||g.delete(s))}},[x,n]),t}const w="sf-part-styles",G=`${w}-`;function Q(e){let t=2166136261;for(let r=0;r<e.length;r+=1)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function ue(e){const t=m(S),r=m(T),o=K(t,e);return o&&o.stamp!==r?o:null}function ce(e){return y(m(S),e)}function ie({stamp:e,children:t}){return f(T.Provider,{value:e,children:t})}function ae({children:e}){const t=m(S);return f(_.Provider,{value:t,children:e})}function de(e){return y(m(_),e)}export{ie as ClaimedStamp,w as PART_STYLES_PRECEDENCE,le as PublishedPartStyles,ae as SharedPartKinds,se as usePartEntrance,ce as usePublishedPartKindRule,ue as usePublishedPartRule,de as usePublishedSharedKindRule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as M}from"react/jsx-runtime";import{NO_HIDE as S,useTakeViewHide as
|
|
1
|
+
"use client";import{jsx as M}from"react/jsx-runtime";import{NO_HIDE as S,useTakeViewHide as b,withViewHide as A}from"./ViewHideRoot.js";import{useEffect as E,useRef as g,useState as L}from"react";import{armEntrance as R,entranceAttrs as V,playEntrance as v}from"efficient-shell/format";import{useCellLayer as J,useDrawsAtEdge as _}from"./InBoxContext.js";import{ENTRANCE_WRAPPER_CLASS as x}from"../lib/animation/entrance.js";import{viewMediaOf as N}from"../lib/document/part-styles.js";function K({views:e,editing:t,boxClass:n,boxAttrs:s,boxStyle:a,takesViewHide:f=!1,atEdge:u=!1,children:d}){const o=g(null),i=J(),c=b(),r=f?c:S,p=$(o,!0,u),{attrs:k,style:h}=V(e[p]),y=g(m.seed(e)),O=JSON.stringify(e);return E(()=>{const l=o.current;if(l){if(t){const w=m.next(y.current,e,p);y.current=w.seen,w.play&&v(l);return}return R(l)}},[O,p,t]),r.scope(M("div",{ref:o,className:A(`${x}${i.fill}${n?` ${n}`:""}`,r.className),...s,...r.attrs,...k,...Object.keys(h).length||a?{style:{...a,...h}}:{},children:i.inner(d)}))}const m={seed(e){return{desktop:JSON.stringify(e.desktop),tablet:JSON.stringify(e.tablet),phone:JSON.stringify(e.phone)}},next(e,t,n){const s=m.seed(t);return{play:s[n]!==e[n],seen:s}}};function q(e){return N(e).phone}function $(e,t=!0,n=!1){return j(e,t,n)??"desktop"}function j(e,t=!0,n=!1){const[s,a]=L(void 0),f=_(n?"edge":"by-box"),{phone:u,tablet:d}=N(f);return E(()=>{if(!t)return;const o=e.current?.ownerDocument?.defaultView??(typeof window>"u"?null:window);if(!o?.matchMedia){a("desktop");return}const i=o.matchMedia(u),c=o.matchMedia(d),r=()=>a(i.matches?"phone":c.matches?"tablet":"desktop");return r(),i.addEventListener("change",r),c.addEventListener("change",r),()=>{i.removeEventListener("change",r),c.removeEventListener("change",r)}},[e,t,u,d]),s}export{x as ENTRANCE_WRAPPER_CLASS,K as SectionAnimation,m as entranceReplay,q as phoneMediaOf,$ as useViewWidth,j as useViewWidthRead};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as i}from"react/jsx-runtime";import{alignViewAnswers as
|
|
1
|
+
import{jsx as e,jsxs as i}from"react/jsx-runtime";import{alignViewAnswers as H,alignViewClasses as V,BLOCK_ALIGN_TEXT as x}from"../../format/lib/content/block-align.js";import{SiteLink as T}from"../lib/site-runtime.js";import K from"./Btn.js";import{resolveImageTreatment as Z}from"../../format/lib/content/image-treatment.js";import $ from"./Placeholder.js";import{useSitePhotography as D}from"./SitePhotographyContext.js";import R from"./SectionEyebrow.js";import{renderGold as s,renderHeadline as Y,splitParagraphs as q}from"./goldPhrases.js";import{ON_MEDIA_INK_STYLE as J}from"../../format/lib/content/ink.js";import{scrim as Q}from"../../format/lib/content/scrim.js";import{SECTION_FILL_CLASS as W}from"../../format/lib/content/section-min-height.js";import{HALF_SIZES as E}from"../../format/lib/sized-image.js";const a={headingMediumUpTo800:"max-view-wide:text-[length:var(--size-headingMedium,36px)]",labelUpTo800:"max-view-wide:text-[length:var(--size-label,12px)]",headingMedium:"text-[length:min(var(--size-headingMedium,56px),var(--sf-heading-max,9999px))]",body:"text-[length:var(--size-body,16px)]",label:"text-[length:var(--size-label,13px)]"},z={words:{left:"min-[961px]:pl-[max(60px,calc(100%_-_var(--sf-content-cap,200%)/2_+_60px))]",right:"min-[961px]:pr-[max(60px,calc(100%_-_var(--sf-content-cap,200%)/2_+_60px))]"},buttons:{left:"min-[961px]:pl-[max(var(--sf-site-gutter,40px),calc(100%_-_var(--sf-content-cap,200%)/2_+_var(--sf-site-gutter,40px)))]",right:"min-[961px]:pr-[max(var(--sf-site-gutter,40px),calc(100%_-_var(--sf-content-cap,200%)/2_+_var(--sf-site-gutter,40px)))]"}};function B({imageLabel:f,imageSrc:v,imageTint:h=.4,imageObjectPosition:S,eyebrow:b,title:g,body:w,cta:c,reverse:n=!1,uppercase:I=!1,textAlign:m="left",textAlignTablet:u,textAlignPhone:_,textBgSrc:p,textBgLabel:C,textBgTint:y=.6,textBgObjectPosition:M,featureBar:r,imageButton:l,grayscale:O,pictureHover:P,fillHeight:U=!1}){const N=Z(O,D(),P),j={left:{items:"",text:x.left,cta:"self-start"},center:{items:"items-center",text:x.center,cta:"self-center"},right:{items:"items-end",text:x.right,cta:"self-end"}},d=j[m]??j.left,k={left:{items:"view-tablet:max-view-desktop:items-stretch",cta:"view-tablet:max-view-desktop:self-start"},center:{items:"view-tablet:max-view-desktop:items-center",cta:"view-tablet:max-view-desktop:self-center"},right:{items:"view-tablet:max-view-desktop:items-end",cta:"view-tablet:max-view-desktop:self-end"}},L={left:{items:"max-view-tablet:items-stretch",cta:"max-view-tablet:self-start"},center:{items:"max-view-tablet:items-center",cta:"max-view-tablet:self-center"},right:{items:"max-view-tablet:items-end",cta:"max-view-tablet:self-end"}},t=H(m,u,_),o={text:V("text",m,u,_,{atSectionLine:!0}),items:[t.tablet&&k[t.tablet].items,t.phone&&L[t.phone].items].filter(Boolean).join(" "),cta:[t.tablet&&k[t.tablet].cta,t.phone&&L[t.phone].cta].filter(Boolean).join(" ")},A=n?"right":"left",F=n?"left":"right";return e("section",{className:"relative z-[2] bg-bg p-0",children:i("div",{className:["grid min-h-[72vh] grid-cols-2 border-t border-b border-line","max-[960px]:grid-cols-1","max-[960px]:min-h-0",n?"min-[961px]:[direction:rtl]":"",...U?[W]:[]].join(" "),children:[i("div",{className:"sf-card relative flex items-center justify-center overflow-hidden bg-surface [direction:ltr] max-[960px]:aspect-[4/3] max-[960px]:order-2",style:n?{borderLeft:"1px solid var(--site-line)"}:{borderRight:"1px solid var(--site-line)"},children:[e($,{label:f,src:v,objectPosition:S,treatment:N,sizes:E}),v&&h>0&&e("div",{className:"absolute inset-0",style:{background:`rgba(0,0,0,${h})`}}),(r||l)&&i("div",{className:`pointer-events-none absolute inset-0 z-[3] flex flex-col items-center justify-center gap-4 px-[var(--sf-site-gutter,40px)] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))] ${z.buttons[A]}`,children:[r&&i(T,{newTab:"auto",href:r.href,className:`pointer-events-auto inline-flex items-center justify-center gap-3 border px-7 py-4 font-mono ${a.label} uppercase tracking-[0.18em] backdrop-blur-sm transition-colors max-view-wide:gap-2 max-view-wide:px-5 max-view-wide:py-3 ${a.labelUpTo800}`,style:{borderColor:"color-mix(in srgb, var(--overlay-fg) 30%, transparent)",color:"color-mix(in srgb, var(--overlay-fg) 85%, transparent)",background:Q(.45)},children:[e("span",{children:s(r.wheel)}),e("span",{"aria-hidden":!0,style:{opacity:.55},children:"·"}),e("span",{children:s(r.category)}),e("span",{"aria-hidden":!0,children:"→"}),e("span",{children:s(r.cta??"Shop now")})]}),l&&i(T,{newTab:"auto",href:l.href,className:`pointer-events-auto inline-flex items-center justify-center gap-2 border px-7 py-4 font-mono ${a.label} uppercase tracking-[0.18em] backdrop-blur-sm transition-colors hover:bg-[color-mix(in_srgb,var(--overlay-fg)_10%,transparent)] max-view-wide:gap-2 max-view-wide:px-5 max-view-wide:py-3 ${a.labelUpTo800}`,style:{borderColor:"color-mix(in srgb, var(--overlay-fg) 50%, transparent)",color:"color-mix(in srgb, var(--overlay-fg) 95%, transparent)",background:"transparent"},children:[e("span",{children:s(l.text??"Learn more")}),e("span",{"aria-hidden":!0,children:"→"})]})]})]}),i("div",{className:"relative overflow-hidden [direction:ltr] max-[960px]:order-1",children:[p&&i("div",{className:"absolute inset-0","aria-hidden":!0,children:[e($,{label:C??f,src:p,objectPosition:M,treatment:N,sizes:E}),y>0&&e("div",{className:"absolute inset-0",style:{background:`rgba(0,0,0,${y})`}})]}),e("div",{className:`relative z-[2] flex h-full min-h-full flex-col px-[60px] py-[100px] max-[960px]:px-6 max-[960px]:py-[60px] ${z.words[F]}`,style:p?J:void 0,children:i("div",{className:["flex flex-1 flex-col justify-center gap-6",d.items,d.text,o.items,o.text].filter(Boolean).join(" "),children:[b&&e(R,{text:b,size:14}),g&&e("h2",{className:[`font-heading2 ${a.headingMedium} font-normal leading-[1.05] tracking-[-0.03em]`,`${a.headingMediumUpTo800} max-view-wide:leading-[1]`,I?"uppercase":""].join(" "),children:Y(g,!1)}),w&&q(w).map((X,G)=>e("p",{className:[`max-w-[520px] ${a.body} leading-[1.7]`,"text-fg-dim"].join(" "),children:s(X)},G)),c.text&&e("div",{className:`mt-2 ${d.cta}${o.cta?` ${o.cta}`:""}`,children:e(K,{href:c.href,variant:"primary",children:s(c.text)})})]})})]})]})})}export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r,jsxs as
|
|
1
|
+
import{jsx as r,jsxs as B}from"react/jsx-runtime";import E from"./BlockFrame.js";import{renderGold as g,renderHeadline as G,renderPlain as _,splitParagraphs as H}from"./goldPhrases.js";import{headingLook as M}from"./Heading.js";import{alignViewClasses as U,BLOCK_ALIGN_PLACE as y}from"../../format/lib/content/block-align.js";import{useDrawsAtEdge as X}from"./InBoxContext.js";import{textTagOf as D}from"../../format/lib/content/text-tag.js";import{KICKER_NUMBER_ATTR as F,kickerLead as V}from"../lib/content/page-contents.js";import{isTextStyleId as W}from"../lib/document/part-styles.js";import{faceClassOf as w}from"../../format/lib/text-style-face.js";import{useMirroredCopy as Z}from"./MirrorContext.js";import{mirroredTextClasses as A}from"../../format/lib/content/mirror-cards.js";import q from"./PartStyledKind.js";import{SiteLink as J}from"../lib/site-runtime.js";import{markupHoldsLink as Q}from"../../format/lib/markup.js";const p={bodyUpTo800:"max-view-wide:text-[length:var(--size-body,14px)]",bodySmall:"text-[length:var(--size-body,15px)]",bodyLarge:"text-[length:var(--size-body,17px)]",label:"text-[length:var(--size-label,13px)]"},Y="underline underline-offset-2",n=e=>e?` ${e}`:"";function ee(e,o,l,a){const c=U("place",e,o,l,{atSectionLine:!a});return c?` ${c}`:""}const te={left:`text-left${n(y.left)}`,center:`text-left${n(y.center)}`,right:`text-left${n(y.right)}`},re=`max-w-[380px] ${p.bodySmall} leading-[1.5] opacity-80 ${p.bodyUpTo800}`,se={default:"text-fg",dim:"text-fg-dim"};function ne(e){return String(Math.min(Number(e.slice(8)),6))}function ae({text:e,labelId:o,number:l,align:a,alignTablet:c,alignPhone:O,tone:$,contained:T,hero:j=!1,pad:f,tag:z,textStyle:N,ownWidth:I=!1,partAlign:b,onLine:m=!1,partKey:L,partDeclare:K=!1,plain:u=!1,href:S}){const P=t=>L?r(q,{kind:L,declare:K,children:t}):t,k=S&&!Q(e)?S:void 0,h=t=>P(k?r(J,{href:k,className:Y,newTab:"auto",children:t}):t),v=Z(),R=X();if(j)return r("p",{className:re,children:g(e)});const d=l?r("span",{[F]:"",children:V(l)}):void 0,i=W(N)?N:void 0,C=`${i?`${w({id:i})} `:""}${I?"":"max-w-[680px] "}whitespace-pre-line ${i==="body-5"?p.label:p.bodyLarge} leading-[1.7]${n(a?te[a]:"")}${ee(a,c,O,R)}${n($?se[$]:"")}${n(A(v,a,b))}`,x=D(z);if(i?.startsWith("heading-")){const t=ne(i),s=M(t,w({id:i}));return r(E,{contained:T,className:m?"":"py-6",pad:f?{values:f,frame:m?0:24}:void 0,children:B(x,{id:o,className:`${s.className}${n(A(v,void 0,b))}`,style:s.style,children:[d,h(G(e.trim(),!1,u))]})})}return r(E,{contained:T,className:m?"":"py-4",pad:f?{values:f,frame:m?0:16}:void 0,children:x==="p"?H(e).map((t,s)=>r("p",{id:s===0?o:void 0,className:C,children:h(u?_(t,s===0?d:void 0):g(t,!1,s===0?d:void 0))},s)):r(x,{id:o,className:C,children:h(u?_(e.trim(),d):g(e.trim(),!1,d))})})}export{ae as default,ne as headingLevelOfStyle};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { type HTMLAttributes, type ReactNode } from "react";
|
|
2
|
+
import { type DrawLine } from "../../format/lib/content/view-lines.js";
|
|
2
3
|
type ViewHideClaim = {
|
|
3
4
|
readonly className: string;
|
|
4
5
|
readonly sectionClassName?: string;
|
|
5
6
|
readonly words: string;
|
|
6
7
|
readonly line?: ViewHideLineOf;
|
|
7
8
|
};
|
|
8
|
-
export type ViewHideLineOf =
|
|
9
|
+
export type ViewHideLineOf = DrawLine;
|
|
9
10
|
export declare const ViewHideContext: import("react").Context<ViewHideClaim | null>;
|
|
10
11
|
export declare const VIEW_HIDE_ATTR = "data-sf-view-hide";
|
|
11
12
|
export type ViewHideTake = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{createContext as u,createElement as l,useContext as r}from"react";import{CellFillContext as w,InBoxContext as d}from"./InBoxContext.js";import{SECTION_HEIGHT_FILL_ATTR as C}from"../../format/lib/content/section-min-height.js";const a=u(null),m="data-sf-view-hide",N=e=>l(a.Provider,{value:null},e),f={className:"",attrs:{},scope:N},
|
|
1
|
+
"use client";import{createContext as u,createElement as l,useContext as r}from"react";import{CellFillContext as w,InBoxContext as d}from"./InBoxContext.js";import{SECTION_HEIGHT_FILL_ATTR as C}from"../../format/lib/content/section-min-height.js";import{drawsAtEdge as v}from"../../format/lib/content/view-lines.js";const a=u(null),m="data-sf-view-hide",N=e=>l(a.Provider,{value:null},e),f={className:"",attrs:{},scope:N},H=f,p=u(null),F=(e,s)=>e?{className:e,views:s}:null,E=e=>l(a.Provider,{value:null},l(p.Provider,{value:null},l(w.Provider,{value:!0},e))),P=(e,s,o={})=>e?{className:e,words:s,...o}:null,x=(e,s)=>e.sectionClassName===void 0?{className:e.className,words:e.words}:v(e.line??"by-box",s)?{className:e.className,words:`${e.words} edge`}:{className:e.sectionClassName,words:e.words};function T(){const e=r(a),s=r(p),o=r(d)!==null;if(e===null&&s===null)return H;const t=e===null?null:x(e,o);return s===null?{className:t.className,attrs:{[m]:t.words},scope:N}:{className:t?`${t.className} ${s.className}`:s.className,attrs:{...t?{[m]:t.words}:{},[C]:s.views},scope:E}}function V(){const e=r(a),s=r(d)!==null;return e===null?"":x(e,s).className}const k=(e,s)=>s?e?`${e} ${s}`:s:e;function $(e){const s=T(),o=e.takes===!1?f:s,t={};let c=!1;for(const[n,i]of Object.entries(e))n==="as"||n==="takes"||n==="children"||(n==="className"?(t.className=k(i,o.className),c=!0):t[n]=i);return!c&&o.className&&(t.className=o.className),o.scope(l(e.as??"div",{...t,...o.attrs},e.children))}export{p as HeightFillContext,$ as HideTaker,f as NO_HIDE,m as VIEW_HIDE_ATTR,a as ViewHideContext,F as heightFillClaim,V as usePeekViewHide,T as useTakeViewHide,P as viewHideClaim,k as withViewHide};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FULL_SECTION_WIDTH as v,SITE_WIDTH_CAP as b,siteSideRoom as u}from"../../../format/lib/content/page-width.js";import{padSideAttrs as $}from"./section-padding.js";const y=" [--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))))]",h="[--sf-edge-g:0px] [--sf-edge-al:var(--sf-edge-l)] [--sf-edge-ar:var(--sf-edge-r)]",E="[--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-
|
|
1
|
+
import{FULL_SECTION_WIDTH as v,SITE_WIDTH_CAP as b,siteSideRoom as u}from"../../../format/lib/content/page-width.js";import{padSideAttrs as $}from"./section-padding.js";const y=" [--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))))]",h="[--sf-edge-g:0px] [--sf-edge-al:var(--sf-edge-l)] [--sf-edge-ar:var(--sf-edge-r)]",E="[--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]",N=`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 _(s){const r={},e=s.pad??{},g=$({left:e.left,right:e.right},{left:e.leftPhone,right:e.rightPhone},{left:e.leftTablet,right:e.rightTablet},{left:e.left,right:e.right},{desktop:e.unit,tablet:e.unitTablet,phone:e.unitPhone},0,s.site?"site":"box"),t=g.style;for(const[f,x]of[["l","paddingLeft"],["r","paddingRight"]]){const n=t[x];n!==void 0&&(r[`--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&&(r[`--sf-edge-${f}t`]=String(c)),o!==void 0&&(r[`--sf-edge-${f}p`]=String(o))}const a=u(s.site?"site":"box"),d=g.classes.includes(a.className.split(" ")[0]);return{className:`${s.gutter?`${a.className} ${a.edge}${y}`:`${h}${d?` ${a.className}`:""}`} ${E}`,style:r}}function D(s){const{className:r,style:e}=_(s);return{className:`${r} ${N}`,...Object.keys(e).length?{style:e}:{}}}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 S(s){const r=_(s).style,e=a=>{const d=r[`--sf-edge-${a}d`]??"0px",l=r[`--sf-edge-${a}t`]??d;return[d,l,r[`--sf-edge-${a}p`]??l]},[g,t]=[e("l"),e("r")];return g.every((a,d)=>a===t[d])}const m="--sf-edge-beyond";function R(s){return`max(0px,calc((${s===null?v:`min(${v},${s})`} - ${b}) / 2))`}function B(s){const r=s.beyond;return r===void 0||r==="0px"?null:{className:S(s)?"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 w=`${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 I(s){const{className:r,style:e}=_(s);return{className:`${r} ${w}`,style:{...e,[m]:s.beyond??"0px"}}}export{m as EDGE_BEYOND_VAR,R as groundBeyond,D as sectionEdgeAttrs,I as sectionEdgeBandAttrs,B as sectionEdgeBeyondAttrs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{siteLengthHeld as G,storedUnit as
|
|
1
|
+
import{siteLengthHeld as G,storedUnit as b}from"../../../../../format/lib/content/css-length.js";import{SECTION_WIDTH_KEYS as M}from"../../../../../format/lib/content/section-width.js";import{BLOCK_LENGTH_KEYS as C,blockLengthUnitKey as W}from"../../../content/block-size.js";import{viewStoreKeys as F}from"../../../../../format/lib/animation/views.js";import{BOX as Y,INNER_BOX as I,LABEL_FACE as U,TEXT as R,boxPadding as v,fillSlot as O,token as w}from"../../../../../format/lib/document/seed-parts.js";import{ENTRANCE_STORE_KEYS as X,LEGACY_ENTRANCE_KEY as V}from"../../../animation/entrance.js";import{SCROLL_STORE_KEYS as $}from"../../../../../format/lib/animation/scroll.js";import{SECTION_PIN_KEYS as j}from"../../../../../format/lib/content/section-sticky.js";import{SECTION_CORNERS_ROW as z}from"../../../../../format/lib/content/section-corners.js";import{SECTION_BORDER_UNIT_KEYS as J}from"../../../../../format/lib/content/borders.js";import{CARD_HOVER_KEYS as B}from"../../../../../format/lib/animation/hover.js";import{COUNT_KEY_PROP as q}from"../../../../../format/lib/content/block-sources.js";import{SITE_GUTTER as Q,SITE_GUTTER_PHONE as Z,normalizeSiteGutter as tt,normalizeSiteGutterPhone as ot,siteGutterPhoneFollows as et}from"../../../../../format/lib/content/page-width.js";import{BAND_TO_SECTION_PAD as A,bandTopBottom as nt}from"../../../content/section-padding.js";import{ButtonBlockMeta as it}from"../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";import{innerPaddingFallback as rt}from"../../passes/section-padding.js";import{finiteNumber as u}from"../../../../../format/lib/finite-number.js";import{convertTheme as x,hasWords as st}from"../../../sections/section-to-box.js";import{THEME_SECTION_BG as dt}from"../../../../../format/lib/content/section-background.js";import{fillSlotOfInk as H}from"../../../../../format/lib/document/part-inks.js";import{parseHexColor as ct}from"efficient-shell/format";import{convertLength as at}from"efficient-easel/screen/lib/content/length-units";import{bandPresetIndex as pt,surfacePresetIndex as lt,surfaceTwoTone as mt}from"../../../../../format/lib/theme.js";import{VIEW_HIDE_KEYS as gt}from"../../../../../format/lib/content/view-hide-class.js";import{tierOfView as Pt}from"../../../../../format/lib/content/view-tier.js";const s=(t,o,e,n)=>o===e?t:at(t,o,e,n,{min:0,max:200,step:4});import{BOX as Oo,DIM as Bo,INNER_BOX as So,TEXT as No}from"../../../../../format/lib/document/seed-parts.js";const zt={textFit:"line",textFitPhone:"wrap"},ht={...R,[q]:""},{label:Jt,href:qt,...ft}=it.defaultProps,Qt=ft,Zt={buttonFillOpacity:0,buttonBorder:{width:0},buttonPaddingTop:0,buttonPaddingRight:0,buttonPaddingBottom:0,buttonPaddingLeft:0},to={...Y,sectionAccent:0},oo={sectionAccent:-1},eo=["gridSpan","sectionHeightMode","sectionHeightValue","sectionHeightUnit","sectionHeightModeTablet","sectionHeightValueTablet","sectionHeightUnitTablet","sectionHeightModePhone","sectionHeightValuePhone","sectionHeightUnitPhone","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderTablet","sectionBorderPhone","sectionAccent",z.unitKey,...J,...j,"anchor",V,...gt,...X,...$,...F(["widthFit",...C,...C.map(W)]),...Object.values(M)],P="a section width key, ignored since efficient-web-builder 45 (an old key; a section's own width has new keys, lib/content/section-width), so dropping it changes nothing",no={sectionSurface:"read by nothing in src/ (searched 2026-10-24): a retired theme key that draws nothing today, so dropping it changes nothing",widthMode:P,fullWidth:P,pageWidth:P,backgroundWidth:P,contentWidth:P,contentMax:P},io=Object.fromEntries(["sectionPaddingLeft","sectionPaddingRight","sectionPaddingLeftTablet","sectionPaddingRightTablet","sectionPaddingLeftPhone","sectionPaddingRightPhone"].map(t=>[t,"needs Box side padding outside its gutter: the old section added it outside its frame, a Box's side padding replaces the gutter. 0 live nodes store it (JJ's read-only export, 2026-10-24)"]));function ut(t,o){const e=u(t.sectionPaddingTop)??0,n=u(t.sectionPaddingBottom)??0,i=u(t.sectionPaddingTopTablet),r=u(t.sectionPaddingBottomTablet),c=b(t.sectionPaddingUnit),l=b(t.sectionPaddingUnitTablet),m=b(t.sectionPaddingUnitPhone),h=(g,a,f,p)=>{const d=u(g);if(d!==void 0)return d+s(p,"px",m,"mobile");const N=a===void 0?{n:f,unit:c}:{n:a,unit:l};return s(N.n,N.unit,m,"mobile")+s(p,"px",m,"mobile")},T=(g,a,f,p,d)=>a!==void 0?{[g]:a+s(d??p,"px",l,"tablet")}:d===void 0?{}:{[g]:s(f,c,l,"tablet")+s(d,"px",l,"tablet")};return{sectionPaddingTop:e+s(o.top,"px",c,"desktop"),sectionPaddingBottom:n+s(o.bottom,"px",c,"desktop"),...T("sectionPaddingTopTablet",i,e,o.top,o.topTablet),...T("sectionPaddingBottomTablet",r,n,o.bottom,o.bottomTablet),sectionPaddingTopPhone:h(t.sectionPaddingTopPhone,i,e,o.topPhone),sectionPaddingBottomPhone:h(t.sectionPaddingBottomPhone,r,n,o.bottomPhone)}}const ro=t=>[...["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopTablet","sectionPaddingBottomTablet","sectionPaddingTopPhone","sectionPaddingBottomPhone"].map(o=>[o,o,(e,n)=>ut(n,typeof t=="function"?t(n):t)[o]]),["sectionPaddingUnit","sectionPaddingUnit"],["sectionPaddingUnitTablet","sectionPaddingUnitTablet"],["sectionPaddingUnitPhone","sectionPaddingUnitPhone"]];function S(t,o){const e={};for(const[i,r]of A)t[i]!==void 0&&(e[r]=t[i]);const n=nt(t,rt(o));return{...e,sectionPaddingTop:n.top,sectionPaddingBottom:n.bottom}}const so=t=>[...A.map(([o,e])=>[o,e,(n,i)=>S(i,t)[e]]),["sectionPaddingTop","sectionPaddingTop",(o,e)=>S(e,t).sectionPaddingTop],["sectionPaddingBottom","sectionPaddingBottom",(o,e)=>S(e,t).sectionPaddingBottom]],Tt={kind:"heading-case-upper",styles:["heading-1","heading-2","heading-3"]},co=t=>o=>st(o.props[t])?[Tt]:[],bt=(t,o)=>({kind:"text",key:t,role:"eyebrow",props:R,...o?{style:o}:{}}),ao=t=>({kind:"group",name:"Chip",props:{...I,...O("main"),...v(6,14)},parts:[bt(t,{color:"background",...w("label",12),weight:600,letterSpacing:.16})]}),k=t=>t.background!=="transparent",xt=(t,o)=>{const[e,n]=[t,o].map(i=>typeof i=="string"?i.trim():"");return e?n?`[${e} ]{color=text}${n}`:`[${e}]{color=text}`:n},L={align:"right",alignPhone:"left"},_t=(t,o,e)=>{const n=i=>xt(i[t],i[o]);return{kind:"block",type:"Text",when:(i,r)=>r!==void 0&&n(r)!=="",box:[[t,"text",(i,r)=>n(r)],[o,"text",(i,r)=>n(r)]],props:e}},po=(t,o,e,n={})=>_t(t,o,{...ht,...L,...n,_partStyles:{text:{...U,color:"labels",...e,case:U.case,...L}}}),_=(t,o)=>typeof t=="number"&&Number.isInteger(t)&&t>=0?t:x(o)?.selected??0,y="var(--site-surface-2)",K=(t,o)=>x(o)?.themes[_(t.sectionAccent??0,o)],Et=(t,o)=>(e,n)=>{if(!o?.(e,n))return O(t);const i=K(e,n)?.[t];return i?{fillColor:i}:{}},lo=(t,o)=>E(t,o)>=0,D=t=>t.startsWith("#")&&ct(t)!==null,mo=(t,o,e)=>{const n=t?.trim();if(n&&D(n))return{fillColor:n};const i=H(n);if(i)return O(i);const r=n===y?K(o,e):void 0;return r?{fillColor:mt(r)}:{}},go=t=>{const o=t?.trim();return!o||o==="transparent"||o===dt||H(o)||o===y||D(o)?void 0:"it paints a colour that no Box Fill can hold"},E=(t,o)=>{const e=x(o)?.themes;return e&&k(t)?pt(e,_(t.sectionAccent,o)):-1},Po=(t,o,e)=>{const n=E(o,e);return n>=0?n:t},ho=(t,o)=>{const e=x(o)?.themes,n=e?lt(e,_(t,o)):-1;return n>=0?n:t},fo=(t,o)=>{const e=E(t,o);return e>=0?{sectionAccent:e}:{}},uo=(t,o)=>k(t.props)&&E(t.props,o)<0?[{kind:"band-preset",page:_(t.props.sectionAccent,o)}]:[],To=(t,{view:o="desktop",to:e="px",maxPx:n=1/0}={})=>{const{siteGutter:i,siteGutterUnit:r,siteGutterPhone:c,siteGutterPhoneUnit:l}=t.site??{},m=Pt(o),h=(g,a,f)=>{const p=b(a),d=G(g,p,"spacing",f);return d===null?null:s(d,p,"px",m)},T=o==="desktop"?h(i,r,Q)??tt(i):h(c,l,Z)??ot(c)??et(i,r);return s(Math.min(n,T),"px",e,m)},Ot=Object.fromEntries(["Top","Right","Bottom","Left","TopPhone","RightPhone","BottomPhone","LeftPhone"].map(t=>[`sectionPadding${t}`,0])),bo=t=>({top:0,right:0,bottom:0,left:0,...t}),xo=(t,o,e,n=[])=>({kind:"group",name:t,keepEmpty:!0,props:(i,r)=>({...I,...Ot,...Et("surface")(i,r),...typeof e=="function"?e(i,r):e}),box:[[o,"bgImage"],B.kind,B.duration,B.delay],parts:n});export{zt as AUTO_COLUMN,Oo as BOX,Qt as BUTTON,Bo as DIM,no as DROP_COMMON,io as DROP_SIDE_PADDING,oo as FOLLOW_THE_BOX,Tt as HEADING_CASE_UPPER,So as INNER_BOX,Ot as NO_PAD,ht as NUMBER_TEXT,L as RIGHT_WORDS,eo as SAME_KEYS,to as SECTION_BOX,Zt as SH_LINK,No as TEXT,Po as bandAccent,E as bandIndex,_ as bandPage,fo as bandProps,uo as bandWrites,Et as fillFrom,go as fillNoBoxHolds,ao as filledChip,co as headingCaseOf,S as innerPad,so as innerPadKeys,po as leadLine,_t as leadText,bo as lineSides,xt as numberAndUnit,lo as onBandPreset,mo as ownFill,xo as pictureCell,K as sectionPage,To as siteGutterOf,bt as smallText,ho as surfaceAccent,ut as wrapperPad,ro as wrapperPadKeys};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as m}from"react/jsx-runtime";import{parseBlockWidthFit as K,phoneKey as c,tabletKey as
|
|
1
|
+
import{jsx as m}from"react/jsx-runtime";import{parseBlockWidthFit as K,phoneKey as c,tabletKey as o}from"efficient-easel/draw";import{blockCanWidenPastCell as L,blockFillInCellClass as X,blockSizeOf as B,blockSizeValuesOf as v,blockCanvasWidthAttrs as G}from"../../content/block-size.js";import{NoCellBound as Z}from"../../../components/BoxCellContext.js";import{CellWrap as U,useBoxCell as Y,useDrawsAtEdge as $}from"../../../components/InBoxContext.js";import{boxPhoneRowFits as M,boxRowColumnsClass as k,boxShareClasses as C,boxShareTabletOf as V,boxTabletColumnsClass as q}from"../../../../format/lib/content/box-layout.js";import{resolveContainerDirection as J}from"../../../../format/lib/content/container-direction.js";import{BOX_TYPE as Q,containerBlocksFor as tt}from"../../../../format/lib/document/container-blocks.js";import{readPartStyle as et}from"../part-styles.js";import{addShowWhenFacts as it,withRowRules as _}from"../../../../format/lib/document/show-when-attach.js";import{BOX_BLOCK_KEYS as nt}from"./cell-width.js";import{findParentNode as st}from"../../../../format/lib/document/passes/document-position.js";const rt=new Set(["Text","Heading"]),ot=new Set(["h1","h2","h3","h4","h5","h6"]);function z(t,e){return t==="Heading"?!0:t!=="Text"?!1:typeof e.tag=="string"&&ot.has(e.tag)?!0:et(e,"text").textStyle?.startsWith("heading-")===!0}const a={not:{context:"blockOutsideBox",is:!0}},E={all:[a,{not:{context:"boxSharesWidth",is:!0}}]},N={all:[a,{not:{context:"boxSharesWidthPhone",is:!0}}]},y={all:[a,{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 H(t,e,i){return{any:[{field:c(t),is:e},{all:[{field:c(t),set:!1},i??{field:t,is:e}]}]}}const R={any:[{field:"textFit",is:"shrink"},{all:[{field:"textFit",set:!1},{not:{context:"textWrapsByDefault",is:!0}}]}]},lt=[[["_gBlockSize","minWidth",o("minWidth"),c("minWidth"),"maxWidth",o("maxWidth"),c("maxWidth")],a],[["widthFit"],E],[[o("widthFit")],y],[[c("widthFit")],N],[["width"],{all:[E,{field:"widthFit",is:"fixed"}]}],[[o("width")],{all:[y,I("widthFit","fixed")]}],[[c("width")],{all:[N,H("widthFit","fixed")]}]],D=I("textFit","shrink",R),A=[[["_gText","textFit",o("textFit"),c("textFit")],a],[["minFont"],{all:[a,R]}],[[o("minFont")],{all:[a,D]}],[[c("minFont")],{all:[a,H("textFit","shrink",D)]}]],p=(t,e)=>st(e.appState,t.props?.id),S=t=>!!t&&typeof t.type=="string"&&tt(t.type)!==null,T=t=>(t.type==="Flex"||t.type==="HeroGroup")&&J(t.type,t.props?.direction)==="row",g=t=>{const e=K(t);return e!==void 0&&e!=="fit"},ct={blockOutsideBox:(t,e)=>!S(p(t,e)),boxSharesWidth:(t,e)=>{const i=p(t,e);return!S(i)||!T(i)?!1:k({...i.props,direction:"row"})!==""?!0:C(i.props?.share)!==""&&!g(t.props?.widthFit)},boxSharesWidthTablet:(t,e)=>{const i=p(t,e);if(!S(i)||!T(i))return!1;if(q(i.props?.[o("columns")])!==""||k({...i.props,direction:"row"})!=="")return!0;const n=V(i.props?.[o("share")])??i.props?.share;return C(n)!==""&&!g(t.props?.[o("widthFit")]??t.props?.widthFit)},boxSharesWidthPhone:(t,e)=>{const i=p(t,e);if(!S(i)||!T(i))return!1;const n=i.props?.phoneRow;return(Number(n)===2||Number(n)===3)&&!M(n,i.props?.[c("share")])&&!g(t.props?.[c("widthFit")]??t.props?.widthFit)}},at=t=>/^_[gds][A-Z]/.test(t);function dt(t,e,i){const n=Object.entries(t),s=n.findIndex(([l])=>l===e);if(s===-1)return null;let r=s+1;for(;r<n.length&&!at(n[r][0]);)r++;return Object.fromEntries([...n.slice(0,r),...Object.entries(i),...n.slice(r)])}function j(t,e,i){const n=Object.entries(t);return Object.fromEntries([...n.slice(0,e),...Object.entries(i),...n.slice(e)])}function ht(t,e,i){const n=Object.keys(e);if(n.includes("_dSize")){const{_gBlockSize:s,...r}=i;return j(e,n.indexOf("_dSize")+1,r)}return ut.has(t)&&n.includes("_gSpacing")?j(e,n.indexOf("_gSpacing"),i):{...e,...i}}const ut=new Set(["Text","Heading"]);function ft(t,e){const{_gText:i,...n}=e;return dt(t,"_gText",n)??{...t,...e}}function xt(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 s of["textFit",o("textFit"),c("textFit")])s in n&&(n[s]=t[s]);e.set(i,n)}return n}}const zt={name:"blockSize",applies:(t,e,i)=>nt.includes(t)&&!!i&&typeof i.render=="function",panel(t,e,i){const n=rt.has(e),{text:s}=i.blockSizeFields(n?{tablet:!0,textFit:e==="Heading"?"shrink":"wrap"}:{}),{size:r}=i.blockSizeFields({tablet:!0});let l=ht(e,t.fields??{},_(r,lt));if(n){const d=_(s,A);if(l=ft(l,d),e==="Text"){const f=_(i.blockSizeFields({tablet:!0,textFit:"shrink"}).text,A),h=xt(f),u=t.resolveFields,b=(x,w)=>{const F=u?u(x,w):w.fields,W=O=>z(e,x?.props??{})?h(O??w.fields):O;return F instanceof Promise?F.then(W):W(F)};t.resolveFields=b}}t.fields=l,it(t,{...ct,textWrapsByDefault:d=>!z(e,d.props??{})})},draw(t,e){pt(t,e)}};function pt(t,e){const i=t.render;t.render=n=>{const s=v(n),r=B(s),l=i(n),d=r&&B(s,{atSectionLine:!0});return r===null?l:m(St,{size:r,sectionSize:d??r,atEdge:e===Q,canvasAttrs:n.editor?.isEditing?G(s):P,inCell:X(s),widens:L(s),children:l})}}const P={};function St({size:t,sectionSize:e,atEdge:i,canvasAttrs:n,inCell:s,widens:r,children:l}){const d=Y(),f=$(i?"edge":"by-box"),h=f?t:e,u=h.className,b=d?.phoneCells===!0,x=r?m(Z,{children:l}):l;return m(U,{className:b&&s?`${u} ${s}`:u,...Object.keys(h.style).length?{style:h.style}:{},attrs:f&&n!==P?{...h.attrs,...n}:h.attrs,children:x})}export{zt as blockSize,z as textShrinksByDefault};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r,Fragment as o,jsxs as i}from"react/jsx-runtime";import{HideTaker as
|
|
1
|
+
import{jsx as r,Fragment as o,jsxs as i}from"react/jsx-runtime";import{HideTaker as d,usePeekViewHide as p,withViewHide as h}from"../../../components/ViewHideRoot.js";import{anchorSlug as t}from"../../../../format/lib/content/anchor-name.js";import{useBoxCell as m,useDrawsAtEdge as g,useFillsCell as x}from"../../../components/InBoxContext.js";import{drawsCopiesInTheBox as u}from"../../../../format/lib/content/copies-in-box.js";const w="!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:800px)_and_(max-width:1099.98px)]:[.sf-gap-zone>&]:-mb-[var(--sf-gap-len-tablet,var(--sf-gap-len))]","[@media(min-width:800px)_and_(max-width:1099.98px)]:[.sf-gap-zone>&]:-mr-[var(--sf-gap-len-tablet,var(--sf-gap-len))]","[@media(max-width:799.98px)]:[.sf-gap-zone>&]:-mb-[var(--sf-gap-len-phone,calc(var(--sf-gap-len)/2))]","[@media(max-width:799.98px)]:[.sf-gap-zone>&]:-mr-[var(--sf-gap-len-phone,calc(var(--sf-gap-len)/2))]"].join(" "),A="flex flex-col w-full min-w-0 [&>*]:grow";function l({anchor:e}){const a=t(e),n=g(),s=p();return a?r("span",{id:a,className:h(n?`sf-section-anchor ${w} ${_}`:"sf-section-anchor",s),"aria-hidden":"true"}):null}function C({anchor:e,copiesInBox:a,children:n}){const s=m()?.columnsRow===!0,c=x(),f=t(e)!=="";return a?r(o,{children:n}):s&&!c&&f?i(d,{className:A,children:[r(l,{anchor:e}),n]}):i(o,{children:[r(l,{anchor:e}),n]})}const b={name:"sectionAnchor",applies:(e,a,n)=>a.isSection(e)&&!!n&&typeof n.render=="function",panel(e,a,n){const s=n.anchorFields;e.fields={...e.fields,...s()}},draw(e,a){e.defaultProps={...e.defaultProps,anchor:""};const n=e.render;e.render=s=>r(C,{anchor:s.anchor,copiesInBox:u(a,s),children:n(s)})}};export{_ as ANCHOR_GAP_BACK_CLASS,w as SECTION_ANCHOR_IN_BOX_CLASS,b as sectionAnchor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as p}from"react/jsx-runtime";import{createElement as H}from"react";import{SECTION_MIN_HEIGHT_EXCLUDED as F,sectionHeightFillClass as E,sectionHeightFillViews as _,sectionHeightWrap as w}from"../../../../format/lib/content/section-min-height.js";import{CellWrap as x}from"../../../components/InBoxContext.js";import{HeightFillContext as C,heightFillClaim as T}from"../../../components/ViewHideRoot.js";import{drawsCopiesInTheBox as u}from"../../../../format/lib/content/copies-in-box.js";import{BOX_TYPE as g}from"../../../../format/lib/document/container-blocks.js";import{EDGE_LINE_ATTRS as M}from"../../../../format/lib/content/view-lines.js";import{findParentNode as N}from"../../../../format/lib/document/passes/document-position.js";const c=["sectionHeightMode","sectionHeightModeTablet","sectionHeightModePhone"];function I(e,n){const i=e.props??{};return c.some(r=>i[r]==="fill")?!0:("parent"in n?n.parent:N(n.appState,i.id))?.type===g}const P={name:"sectionHeight",applies:(e,n,i)=>n.isSection(e)&&!F.has(e)&&!!i&&typeof i.render=="function",panel(e,n,i){const t=i.heightFields;e.fields={...e.fields,...t()};const r=t({fill:!0}),a=new WeakMap,m=s=>{if(!s||!c.some(l=>l in s))return s;let o=a.get(s);if(!o){o={...s};for(const l of c)l in o&&(o[l]=r[l]);a.set(s,o)}return o},h=e.resolveFields;e.resolveFields=(s,o)=>{const l=h?h(s,o):o.fields,f=d=>I(s??{},o)?m(d??o.fields):d;return l instanceof Promise?l.then(f):f(l)}},draw(e,n){const i=e.render;e.render=t=>{if(u(n,t))return i(t);const r=w(t);return r?p(x,{className:r.className,style:r.style,...n===g?{attrs:M}:null,children:i(t)}):i(t)}}},b={name:"sectionHeightFillRoot",applies:P.applies,draw(e,n){const i=e.render;e.render=t=>{const r=u(n,t)?null:T(E(t),_(t).join(" "));return H(C.Provider,{value:r},i(t))}}};export{I as heightFillOffered,P as sectionHeight,b as sectionHeightFillRoot};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as _}from"react/jsx-runtime";import{HideTaker as E}from"../../../components/ViewHideRoot.js";import{LineChoice as w}from"../../../components/InBoxContext.js";import{isBackgroundBox as T}from"../../../../format/lib/content/box-background.js";import{boxSideSpaceOf as D}from"../../../../format/lib/content/box-side-space.js";import{BAND_PAD_KEYS as d,BAND_PAD_UNIT_KEY as I,SECTION_PAD_KEYS as x,padValuesOf as A,sectionPadAttrs as N}from"../../content/section-padding.js";import{sectionFillPassClass as S}from"../../../../format/lib/content/section-min-height.js";import{COPIES_IN_THE_BOX as O,drawsCopiesInTheBox as h}from"../../../../format/lib/content/copies-in-box.js";import{ownEntry as m}from"../../../../format/lib/own-entry.js";const g={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}},V=new Set(Object.keys(g));function l(e,t){return t?.innerPadding??m(g,e)}const X=e=>l(e)??{},v=e=>m({DetailRows:{top:100,bottom:100}},e),b=new Set(["Flex","Text","Heading","ImageBlock"]),B=new Set(["Divider"]),C=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),p=new Set(["ProductGrid"]);function c(e,t,n=!1){const r=e.render;e.render=i=>{if(t?.(i))return r(i);const o=N({...A(i,x,n),sideSpace:D(i.sideSpace)}),f=r(i);if(!o)return f;const P=a=>_(E,{className:a?`${o.className} ${a}`:o.className,style:o.style,children:f}),s=S(i,{atSectionLine:!0}),u=S(i);return s===u?P(s):_(w,{line:"by-box",draw:a=>P(a?u:s)})}}const y={name:"sectionPadding",applies:(e,t,n)=>t.isSection(e)&&!C.has(e)&&!!n&&typeof n.render=="function",panel(e,t,n){const r=l(t,e);if(r){e.fields={...e.fields,...n.sidesPaddingFields({keys:d,unitKey:I,fallback:r,tablet:!0,siteSide:!0})};return}if(p.has(t))return;const i=[d.top,d.bottom].filter(o=>e.fields!=null&&o in e.fields);if(i.length)throw new Error(`section-padding: ${t} declares its own ${i.join(" / ")} row; declare \`innerPadding: { top, bottom }\` in its meta and the one Padding row draws on its band`);e.fields={...e.fields,...n.sidesPaddingFields({tablet:!0,siteSide:!0})}},draw(e,t){if(!l(t,e)){if(p.has(t)){c(e);return}b.has(t)||B.has(t)||c(e,t==="Flex"?n=>T(n.bgImage):O.has(t)?n=>h(t,n):void 0,!0)}}},F=["Heading","Text","ImageBlock"],L=["LogoBlock"],G={name:"blockPadding",applies:(e,t,n)=>(F.includes(e)||L.includes(e))&&!!n&&typeof n.render=="function",panel(e,t,n){e.fields={...e.fields,...n.sidesPaddingFields({tablet:!0,siteSide:!0})}},draw(e,t){b.has(t)||c(e,void 0,!0)}};export{B as PADS_ITS_OWN_SPACE,b as PAD_ON_ROOT,V as SECTION_PAD_INNER,g as SECTION_PAD_INNER_DEFAULTS,G as blockPadding,X as innerPaddingFallback,v as ownPairDefault,y as sectionPadding};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as d}from"react/jsx-runtime";import{HideTaker as s}from"../../../components/ViewHideRoot.js";import{LineChoice as X}from"../../../components/InBoxContext.js";import{BOX_TYPE as q}from"../../../../format/lib/document/container-blocks.js";import{INTRO_EDGE_CLASS as z}from"../../../../format/lib/sections/intro-bleed-layout.js";import{cssLengthOf as G}from"../../../../format/lib/content/css-length.js";import{resolveContainerDirection as J}from"../../../../format/lib/content/container-direction.js";import{HERO_BACKGROUND_VAR as Q,HERO_CHROME_CAP_VAR as Z,HERO_CHROME_INSET_VAR as tt,FULL_SECTION_WIDTH as nt,SITE_WIDTH_CAP as _,centredCap as v,heroBackgroundTokens as et}from"../../../../format/lib/content/page-width.js";import{SECTION_WIDTH_FAMILY as D,SECTION_WIDTH_KEYS as F,hasOwnSectionWidth as ot,hasWidthFamily as it,resolveWidth as L,siteWidthsOf as rt}from"../../../../format/lib/content/section-width.js";import{boxCardProps as ct}from"../../../../format/lib/content/box-background.js";import{cardCopyPlace as lt}from"../../../../format/lib/content/card-template.js";import{BOX_GUTTER_KEY as dt,boxGutterOf as ut,boxPlaceOf as st,boxRunsEdgeToEdge as at,isFrameContainer as C,ownNodeWidth as ft,sectionGroundAnswer as ht,siteDrawsGutter as _t}from"../../../../format/lib/content/site-gutter.js";import{getEditorSiteContentWidth as Nt}from"../../../../format/lib/document/editor-site-widths.js";import{GroundStopsAt as H,NestedBoxChoice as wt,SectionGroupChoice as Ct,SectionGroupWidthsProvider as Et,SectionRootChoice as Ot,SplitBandAndColumn as M}from"../../../components/SiteGutterFrame.js";import{FRAME as P}from"../../../components/BlockFrame.js";import{sectionFillPassClass as x}from"../../../../format/lib/content/section-min-height.js";import{parentCapsWidth as Tt}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 mt,heldByANode as St,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 N="--sf-sw-site",pt="--sf-sw-content",Rt="--sf-bg-cap",At="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}),Wt=`contents view-wide:[--sf-site-width:100vw] ${z} view-wide:[--sf-site-gutter:var(--intro-edge)]`,I=(n,t,e)=>t==="content"?`min(${G(n,e)},var(${N}))`:G(n,e);function T({content:n,contentMax:t,contentMaxUnit:e},o){return n==="full"?o!=="content"?nt:null:t===null?null:I(t,o,e)}function m(n,t){return t===null?n:d(s,{className:"contents",style:{[N]:_},children:d(s,{className:At,style:{[pt]:t},children:n})})}const It="--sf-content-cap",bt="contents max-view-wide:[--sf-content-cap:none]";function gt({content:n,contentMax:t,contentMaxUnit:e},o){return n==="full"?null:t!==null?I(t,o,e):o==="content"?null:`var(${N})`}function Bt(n,t){return t===null?n:d(s,{className:"contents",style:{[N]:_},children:d(s,{className:bt,style:{[It]:t},children:n})})}const V=`var(${N},${_})`,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=T(e,o);return o==="content"&&i===null&&!e.own?n({...t,contained:!0}):h(o,m(d(M,{children:n({...t,contained:!0})}),i),c)}function Gt(n,t,e,o,c){if(e==="hero"){const l=m(n(t),T(o,o.band));return o.band==="full"?d(s,{style:{[Q]:"none",[tt]:"initial",[Z]:"initial"},children:l}):o.band==="content"?d(s,{style:et(!0),children:l}):l}const i=o.band??"full",r=x(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:{[N]:_},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,Wt,n({...t,fullWidth:!1})):m(n({...t,fullWidth:l}),l?null:T(o,i));return i==="content"?d(s,{className:"contents",style:{[Rt]:_},children:u}):u}switch(e){case"both":return h(i,Bt(n(t),gt(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})):m(n({...t,widthMode:u}),o.content==="full"?null:T(o,i));return e==="productGrid"&&!o.own?i==="content"?d(s,{className:r?`${P} ${r}`:P,children:a}):a:h(i,a,r)}default:return h(i,m(n(t),T(o,i)),r)}}function Y(n,t,e,o,c){const i=c===q?"edge":"by-box",r=l=>Gt(n,t,e,o,l);return i==="edge"?r(!0):x(t)===x(t,{atSectionLine:!0})?r(!1):d(X,{line:i,draw:r})}function vt(n,t){const e=U(D,t);if(!e)return;const o=n.render;n.render=c=>{const i=rt(c),r={band:i.background,content:i.content??"content",contentMax:null},l=()=>e==="rawMarkup"?o(c):d(Ct,{draw:f=>f?.background==="content"?d(H,{ground:V,children:u(f)}):u(f)}),u=f=>{const w=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,w,t);if(!C(t))return R;const g=ut(c),B=g===void 0?w.content:g?"content":"full";return B===w.content?R:d(wt,{atTop:R,nested:$(o,c,{...w,content:B,own:!1},w.band??"full",x(c))})},a=ft(t,c);if(!ot(a))return l();const S=e==="rawMarkup",b=ht(t,c),j=a.content??(S?"full":r.content),p={band:b,content:b==="content"?"content":j,contentMax:a.contentMax,contentMaxUnit:a.contentMaxUnit,own:!S,siteContent:r.content};return d(Ot,{own:()=>d(Et,{value:{background:p.band,content:p.content},children:Y(o,c,e,p,t)}),followed:l})}}const Dt={all:[y,{not:{context:"runsEdgeToEdge",is:!0}}]},un={name:"sectionWidth",applies:(n,t,e)=>it(n)&&!!e&&typeof e.render=="function",panel(n,t,e){const o=e.sectionOwnWidthFields({drawsFullOnItsOwn:U(D,t)==="rawMarkup"}),c=C(t)?e.boxGutterFields():{},i={...n.fields,...c,...o},r=C(t)?K(t,n,i,[dt]):i;E(n,{heldByANode:St}),C(t)&&E(n,{runsEdgeToEdge:(l,u)=>at(ct(l.props??{},lt(u.appState,l.props?.id)?.inCopy!==!1))}),n.fields=O(r,[F.background,F.content],C(t)?Dt:y)},draw(n,t){vt(n,t)}};function Ft(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 Lt=new Set(["Heading","Text","ImageBlock","ButtonBlock"]),sn={name:"containedWidth",applies:(n,t,e)=>Lt.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=S=>Ft(S,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"})}}},Ht={not:{context:"inHeroGroupRow",is:!0}},an={name:"buttonAlignInRow",applies:n=>n==="ButtonBlock",panel(n){const t=n;t.fields=O(t.fields??{},["align"],Ht),E(t,{inHeroGroupRow:(e,o)=>{const c=mt(o.appState,e.props?.id);return!!c&&c.type==="HeroGroup"&&J("HeroGroup",c.props?.direction)==="row"}})}};function Mt(n){return Object.values(n).some(t=>!!t&&typeof t=="object"&&t.type==="slot")}const Pt={any:[]},yt={all:[{not:{context:"outsideBox",is:!0}},{not:{context:"insideSiteGutter",is:!0}}]},Ut={not:{context:"widthCappedByParent",is:!0}};function K(n,t,e,o=["widthMode"]){if(n==="ButtonBlock")return O(e,["_gWidth",...o],Pt);if(Mt(e)){const c=(i,r)=>st(r.appState?.data?.content,i.props?.id,_t(Nt()));return E(t,{outsideBox:(i,r)=>c(i,r)?.inBox!==!0,insideSiteGutter:(i,r)=>c(i,r)?.insideGutter}),O(e,o,yt)}return E(t,{widthCappedByParent:(c,i)=>"parent"in i?Tt(i.parent):xt({props:c.props??{}},i)}),O(e,o,Ut)}export{Rt as SECTION_BACKGROUND_VAR,bt as SECTION_CONTENT_CAP_CLASS,It as SECTION_CONTENT_CAP_VAR,At as SECTION_CONTENT_CLASS,pt as SECTION_CONTENT_VAR,N as SITE_CONTENT_VAR,an as buttonAlignInRow,sn as containedWidth,un as sectionWidth,Ft as widthModeFields};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-web-builder",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "68.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",
|
|
@@ -42,19 +42,20 @@
|
|
|
42
42
|
"typecheck": "tsc --noEmit",
|
|
43
43
|
"test:boundary": "node scripts/test-boundary.mjs",
|
|
44
44
|
"test:screen": "node scripts/test-screen-in-easel.mjs",
|
|
45
|
+
"test:browser": "efficient-shell-browser-check --dir tests/browser --tailwind tests/browser/shell-ui.tailwind.css --css node_modules/efficient-easel/dist/screen/screen.css --css src/components/storefront-editor.css",
|
|
45
46
|
"test:own-ui": "node node_modules/efficient-shell-checker/dist/bin/ui-check.js",
|
|
46
47
|
"test:media-hosts": "efficient-shell-media-host-check",
|
|
47
48
|
"build": "node scripts/build.mjs",
|
|
48
49
|
"verify:dist": "node scripts/verify-dist.mjs && node scripts/verify-published-entries.mjs",
|
|
49
|
-
"verify": "pnpm run typecheck && pnpm run test:boundary && pnpm run test:screen && pnpm run test:own-ui && pnpm run test:media-hosts && pnpm run test:guards && pnpm run build && pnpm run verify:dist",
|
|
50
|
+
"verify": "pnpm run typecheck && pnpm run test:boundary && pnpm run test:screen && pnpm run test:own-ui && pnpm run test:media-hosts && pnpm run test:guards && pnpm run test:browser && pnpm run build && pnpm run verify:dist",
|
|
50
51
|
"test:guards": "tsc --noEmit -p scripts/tsconfig.json && node scripts/run-guards.mjs",
|
|
51
52
|
"words": "TSX_TSCONFIG_PATH=scripts/tsconfig.json tsx scripts/write-editor-words.ts",
|
|
52
53
|
"text-parts": "TSX_TSCONFIG_PATH=scripts/tsconfig.json tsx scripts/write-text-part-shapes.ts"
|
|
53
54
|
},
|
|
54
55
|
"peerDependencies": {
|
|
55
56
|
"@tabler/icons-react": "^3.46.0",
|
|
56
|
-
"efficient-easel": "^34.
|
|
57
|
-
"efficient-shell": "^
|
|
57
|
+
"efficient-easel": "^34.3.0",
|
|
58
|
+
"efficient-shell": "^13.0.0",
|
|
58
59
|
"isomorphic-dompurify": "^3.18.0",
|
|
59
60
|
"next": ">=16",
|
|
60
61
|
"react": ">=19",
|
|
@@ -68,21 +69,24 @@
|
|
|
68
69
|
},
|
|
69
70
|
"devDependencies": {
|
|
70
71
|
"@tabler/icons-react": "^3.46.0",
|
|
72
|
+
"@tailwindcss/cli": "^4.3.3",
|
|
71
73
|
"@tanstack/react-query": "^5.100.9",
|
|
72
74
|
"@types/node": "^20",
|
|
73
75
|
"@types/react": "^19",
|
|
74
76
|
"@types/react-dom": "^19",
|
|
75
|
-
"efficient-easel": "^34.
|
|
76
|
-
"efficient-shell": "^
|
|
77
|
+
"efficient-easel": "^34.3.0",
|
|
78
|
+
"efficient-shell": "^13.0.0",
|
|
77
79
|
"efficient-shell-checker": "npm:efficient-shell@12.37.0",
|
|
78
80
|
"esbuild": "^0.28.0",
|
|
79
81
|
"happy-dom": "^20.14.5",
|
|
80
82
|
"isomorphic-dompurify": "^3.18.0",
|
|
81
83
|
"maplibre-gl": "6.11.2",
|
|
82
84
|
"next": "16.2.11",
|
|
85
|
+
"playwright": "^1.63.0",
|
|
83
86
|
"react": "19.2.4",
|
|
84
87
|
"react-dom": "19.2.4",
|
|
85
88
|
"simple-icons": "^16.26.0",
|
|
89
|
+
"tailwindcss": "^4.3.3",
|
|
86
90
|
"tsx": "4.22.3",
|
|
87
91
|
"typescript": "^5"
|
|
88
92
|
}
|