efficient-web-builder 67.8.1 → 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.
Files changed (71) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/editor/components/BlockGapField.d.ts +4 -1
  3. package/dist/editor/components/BlockGapField.js +1 -1
  4. package/dist/editor/components/CornersField.d.ts +3 -1
  5. package/dist/editor/components/CornersField.js +1 -1
  6. package/dist/editor/components/SideSpaceField.d.ts +5 -1
  7. package/dist/editor/components/SideSpaceField.js +1 -1
  8. package/dist/editor/components/StorefrontEditor.js +1 -1
  9. package/dist/editor/components/WebsiteSettingsPanel.d.ts +0 -5
  10. package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
  11. package/dist/editor/components/storefront-editor.css +6 -1
  12. package/dist/editor/components/useSiteLengthRow.d.ts +15 -0
  13. package/dist/editor/components/useSiteLengthRow.js +1 -0
  14. package/dist/editor/lib/content/site-length-rows.d.ts +15 -0
  15. package/dist/editor/lib/content/site-length-rows.js +1 -0
  16. package/dist/editor/lib/document/blocks/general/Logos/fields.js +1 -1
  17. package/dist/editor/lib/document/blocks/general/ProcessSteps/fields.js +1 -1
  18. package/dist/editor/lib/document/box-fields.d.ts +2 -0
  19. package/dist/editor/lib/document/box-fields.js +1 -1
  20. package/dist/editor/lib/document/choice-pictures.d.ts +2 -0
  21. package/dist/editor/lib/document/choice-pictures.js +1 -1
  22. package/dist/editor/lib/document/controls.js +1 -1
  23. package/dist/editor/lib/document/shape-picker.js +1 -1
  24. package/dist/format/lib/content/block-align.d.ts +2 -0
  25. package/dist/format/lib/content/block-align.js +1 -1
  26. package/dist/format/lib/content/container-gap.d.ts +1 -0
  27. package/dist/format/lib/content/container-gap.js +1 -1
  28. package/dist/format/lib/content/css-length.d.ts +5 -6
  29. package/dist/format/lib/content/css-length.js +1 -1
  30. package/dist/format/lib/content/gallery-layout.d.ts +25 -11
  31. package/dist/format/lib/content/gallery-layout.js +1 -1
  32. package/dist/format/lib/content/grid-span.js +1 -1
  33. package/dist/format/lib/content/image-text-rows.d.ts +1 -0
  34. package/dist/format/lib/content/image-text-rows.js +1 -1
  35. package/dist/format/lib/content/page-width.d.ts +2 -1
  36. package/dist/format/lib/content/page-width.js +1 -1
  37. package/dist/format/lib/content/section-min-height.d.ts +3 -1
  38. package/dist/format/lib/content/section-min-height.js +1 -1
  39. package/dist/format/lib/content/view-lines.d.ts +7 -0
  40. package/dist/format/lib/content/view-lines.js +1 -1
  41. package/dist/format/lib/editor-words-kept.js +1 -1
  42. package/dist/format/lib/sections/section-head-placement.js +1 -1
  43. package/dist/format/lib/source-rules/site-length-writes.d.ts +18 -0
  44. package/dist/format/lib/source-rules/site-length-writes.js +2 -0
  45. package/dist/format/lib/theme.d.ts +5 -0
  46. package/dist/format/lib/theme.js +1 -1
  47. package/dist/render/components/ButtonBlock.js +1 -1
  48. package/dist/render/components/CardRowContext.d.ts +2 -1
  49. package/dist/render/components/CardRowContext.js +1 -1
  50. package/dist/render/components/Eyebrow.js +1 -1
  51. package/dist/render/components/Flex.js +1 -1
  52. package/dist/render/components/InBoxContext.d.ts +6 -0
  53. package/dist/render/components/InBoxContext.js +1 -1
  54. package/dist/render/components/Logo.js +1 -1
  55. package/dist/render/components/LogoBlock.js +1 -1
  56. package/dist/render/components/PreviewHeaderContext.d.ts +3 -1
  57. package/dist/render/components/PreviewHeaderContext.js +1 -1
  58. package/dist/render/components/PublishedPartStylesContext.js +1 -1
  59. package/dist/render/components/SectionAnimation.js +1 -1
  60. package/dist/render/components/Split.js +1 -1
  61. package/dist/render/components/Text.js +1 -1
  62. package/dist/render/components/ViewHideRoot.d.ts +2 -1
  63. package/dist/render/components/ViewHideRoot.js +1 -1
  64. package/dist/render/lib/content/section-edge.js +1 -1
  65. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  66. package/dist/render/lib/document/passes/block-size.js +1 -1
  67. package/dist/render/lib/document/passes/section-anchor.js +1 -1
  68. package/dist/render/lib/document/passes/section-height.js +1 -1
  69. package/dist/render/lib/document/passes/section-padding.js +1 -1
  70. package/dist/render/lib/document/passes/section-width.js +1 -1
  71. package/package.json +10 -6
@@ -1 +1 @@
1
- "use client";import{Fragment as y,jsx as f,jsxs as O}from"react/jsx-runtime";import{createContext as P,useContext as m,useEffect as k,useId as A,useMemo as F,useRef as M}from"react";import{armEntrance as j}from"efficient-shell/format";import{blockDrawsTextStyle as I,partRuleForKind as E,partRuleForText as K,partStyleCss as L,publishedPartStyles as N}from"../lib/document/part-styles.js";import{useViewWidth as B}from"./SectionAnimation.js";import{useInBox as D}from"./InBoxContext.js";import{styleKeyForPart as $}from"../../format/lib/sections/section-text-kinds.js";import{NO_MOTIONS as H,PART_LIFT_ATTR as R,drawPartEntrance as J,drawPartScroll as W,ensurePartLiftSheet as Y,firstOnPage as T,partBoxOf as V,partMotionDrawn as q,partMoves as z}from"../lib/animation/part-motion.js";const S=P(null),_=P(null),v=P(null);function le({needles:e,styles:n,motions:r=H,type:o,atEdge:t=!1,children:i}){const u=A(),d=D()||t,x=JSON.stringify([u,e,n,r,o]),c=F(()=>{const p=Object.keys(r).filter(l=>z(r[l]));return N(e,n,u,l=>$(o,l),l=>I(o,l),l=>p.includes(l)?q(r[l]):null,p)},[x]);if(!c)return f(y,{children:i});const s=L(c,{inBox:d});return O(y,{children:[s&&f("style",{href:`${G}${u}-${Q(s)}`,precedence:b,dangerouslySetInnerHTML:{__html:s.replace(/</g,"\\3c ")}}),f(S.Provider,{value:c,children:i})]})}const g=new WeakMap;function C(e,n){const r=T(n.filter(t=>t.arm)),o=n.some(t=>t.entering)?void 0:T(n.filter(t=>t.scroll));for(const t of n)t!==r&&t.undo&&(t.undo(),t.undo=void 0),t!==o&&t.undoScroll&&(t.undoScroll(),t.undoScroll=void 0);r?.arm&&!r.undo&&(r.undo=r.arm()),o?.scroll&&!o.undoScroll&&(o.undoScroll=o.scroll()),n.some(t=>t.lift)?(Y(e.ownerDocument),e.setAttribute(R,"")):e.removeAttribute(R)}function se(e){const n=M(null),r=e?.motion?.entrance??null,o=e?.motion?.scroll??null,t=e?.motion?.hover==="lift",i=B(n,r!==null||o!==null),u=r?r[i]:null,d=o&&o[i].effect!=="none"?o[i]:null,x=JSON.stringify([u,d]);return k(()=>{const c=n.current,s=V(c?.parentElement??null);if(!r&&!o&&!t||!c||!s)return;const p=u?()=>{const h=J(s,u),w=j(s);return()=>{w?.(),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:t};return l.push(a),C(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,C(s,l),l.length||g.delete(s))}},[x,t]),n}const b="sf-part-styles",G=`${b}-`;function Q(e){let n=2166136261;for(let r=0;r<e.length;r+=1)n^=e.charCodeAt(r),n=Math.imul(n,16777619);return(n>>>0).toString(36)}function ue(e){const n=m(S),r=m(_),o=K(n,e);return o&&o.stamp!==r?o:null}function ce(e){return E(m(S),e)}function ie({stamp:e,children:n}){return f(_.Provider,{value:e,children:n})}function ae({children:e}){const n=m(S);return f(v.Provider,{value:n,children:e})}function de(e){return E(m(v),e)}export{ie as ClaimedStamp,b as PART_STYLES_PRECEDENCE,le as PublishedPartStyles,ae as SharedPartKinds,se as usePartEntrance,ce as usePublishedPartKindRule,ue as usePublishedPartRule,de as usePublishedSharedKindRule};
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 L,withViewHide as R}from"./ViewHideRoot.js";import{useEffect as E,useRef as g,useState as V}from"react";import{armEntrance as v,entranceAttrs as A,playEntrance as b}from"efficient-shell/format";import{useCellLayer as J,useInBox 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 B({views:e,editing:t,boxClass:n,boxAttrs:s,boxStyle:a,takesViewHide:d=!1,atEdge:u=!1,children:f}){const o=g(null),i=J(),c=L(),r=d?c:S,p=$(o,!0,u),{attrs:k,style:h}=A(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&&b(l);return}return v(l)}},[O,p,t]),r.scope(M("div",{ref:o,className:R(`${x}${i.fill}${n?` ${n}`:""}`,r.className),...s,...r.attrs,...k,...Object.keys(h).length||a?{style:{...a,...h}}:{},children:i.inner(f)}))}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 K(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]=V(void 0),d=_()||n,{phone:u,tablet:f}=N(d);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(f),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,f]),s}export{x as ENTRANCE_WRAPPER_CLASS,B as SectionAnimation,m as entranceReplay,K as phoneMediaOf,$ as useViewWidth,j as useViewWidthRead};
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 V,alignViewClasses as X}from"../../format/lib/content/block-align.js";import{SiteLink as $}from"../lib/site-runtime.js";import G from"./Btn.js";import{resolveImageTreatment as Z}from"../../format/lib/content/image-treatment.js";import L from"./Placeholder.js";import{useSitePhotography as D}from"./SitePhotographyContext.js";import K from"./SectionEyebrow.js";import{renderGold as s,renderHeadline as R,splitParagraphs as Y}from"./goldPhrases.js";import{ON_MEDIA_INK_STYLE as q}from"../../format/lib/content/ink.js";import{scrim as J}from"../../format/lib/content/scrim.js";import{SECTION_FILL_CLASS as Q}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)]"},T={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 W({imageLabel:x,imageSrc:f,imageTint:v=.4,imageObjectPosition:z,eyebrow:h,title:b,body:g,cta:c,reverse:n=!1,uppercase:S=!1,textAlign:m="left",textAlignTablet:w,textAlignPhone:u,textBgSrc:p,textBgLabel:I,textBgTint:_=.6,textBgObjectPosition:M,featureBar:r,imageButton:l,grayscale:C,pictureHover:P,fillHeight:O=!1}){const y=Z(C,D(),P),N={left:{items:"",text:"",cta:"self-start"},center:{items:"items-center",text:"text-center",cta:"self-center"},right:{items:"items-end",text:"text-right",cta:"self-end"}},d=N[m]??N.left,j={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"}},k={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=V(m,w,u),o={text:X("text",m,w,u,{atSectionLine:!0}),items:[t.tablet&&j[t.tablet].items,t.phone&&k[t.phone].items].filter(Boolean).join(" "),cta:[t.tablet&&j[t.tablet].cta,t.phone&&k[t.phone].cta].filter(Boolean).join(" ")},U=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]":"",...O?[Q]:[]].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(L,{label:x,src:f,objectPosition:z,treatment:y,sizes:E}),f&&v>0&&e("div",{className:"absolute inset-0",style:{background:`rgba(0,0,0,${v})`}}),(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))] ${T.buttons[U]}`,children:[r&&i($,{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:J(.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($,{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(L,{label:I??x,src:p,objectPosition:M,treatment:y,sizes:E}),_>0&&e("div",{className:"absolute inset-0",style:{background:`rgba(0,0,0,${_})`}})]}),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] ${T.words[F]}`,style:p?q: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:[h&&e(K,{text:h,size:14}),b&&e("h2",{className:[`font-heading2 ${a.headingMedium} font-normal leading-[1.05] tracking-[-0.03em]`,`${a.headingMediumUpTo800} max-view-wide:leading-[1]`,S?"uppercase":""].join(" "),children:R(b,!1)}),g&&Y(g).map((A,H)=>e("p",{className:[`max-w-[520px] ${a.body} leading-[1.7]`,"text-fg-dim"].join(" "),children:s(A)},H)),c.text&&e("div",{className:`mt-2 ${d.cta}${o.cta?` ${o.cta}`:""}`,children:e(G,{href:c.href,variant:"primary",children:s(c.text)})})]})})]})]})})}export{W as default};
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 H}from"react/jsx-runtime";import C from"./BlockFrame.js";import{renderGold as y,renderHeadline as K,renderPlain as _,splitParagraphs as M}from"./goldPhrases.js";import{headingLook as P}from"./Heading.js";import{alignViewClasses as U}from"../../format/lib/content/block-align.js";import{useInBox as G}from"./InBoxContext.js";import{textTagOf as X}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 E}from"../../format/lib/text-style-face.js";import{useMirroredCopy as Z}from"./MirrorContext.js";import{mirroredTextClasses as w}from"../../format/lib/content/mirror-cards.js";import q from"./PartStyledKind.js";import{SiteLink as D}from"../lib/site-runtime.js";import{markupHoldsLink as J}from"../../format/lib/markup.js";const f={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)]"},Q="underline underline-offset-2",p=e=>e?` ${e}`:"";function Y(e,a,l,s){const d=U("place",e,a,l,{atSectionLine:!s});return d?` ${d}`:""}const ee={left:"text-left",center:"text-left mx-auto",right:"text-left ml-auto"},te=`max-w-[380px] ${f.bodySmall} leading-[1.5] opacity-80 ${f.bodyUpTo800}`,re={default:"text-fg",dim:"text-fg-dim"};function ne(e){return String(Math.min(Number(e.slice(8)),6))}function se({text:e,labelId:a,number:l,align:s,alignTablet:d,alignPhone:O,tone:g,contained:T,hero:j=!1,pad:m,tag:z,textStyle:$,ownWidth:A=!1,partAlign:N,onLine:c=!1,partKey:b,partDeclare:B=!1,plain:u=!1,href:S}){const I=t=>b?r(q,{kind:b,declare:B,children:t}):t,k=S&&!J(e)?S:void 0,x=t=>I(k?r(D,{href:k,className:Q,newTab:"auto",children:t}):t),v=Z(),R=G();if(j)return r("p",{className:te,children:y(e)});const i=l?r("span",{[F]:"",children:V(l)}):void 0,o=W($)?$:void 0,L=`${o?`${E({id:o})} `:""}${A?"":"max-w-[680px] "}whitespace-pre-line ${o==="body-5"?f.label:f.bodyLarge} leading-[1.7]${p(s?ee[s]:"")}${Y(s,d,O,R)}${p(g?re[g]:"")}${p(w(v,s,N))}`,h=X(z);if(o?.startsWith("heading-")){const t=ne(o),n=P(t,E({id:o}));return r(C,{contained:T,className:c?"":"py-6",pad:m?{values:m,frame:c?0:24}:void 0,children:H(h,{id:a,className:`${n.className}${p(w(v,void 0,N))}`,style:n.style,children:[i,x(K(e.trim(),!1,u))]})})}return r(C,{contained:T,className:c?"":"py-4",pad:m?{values:m,frame:c?0:16}:void 0,children:h==="p"?M(e).map((t,n)=>r("p",{id:n===0?a:void 0,className:L,children:x(u?_(t,n===0?i:void 0):y(t,!1,n===0?i:void 0))},n)):r(h,{id:a,className:L,children:x(u?_(e.trim(),i):y(e.trim(),!1,i))})})}export{se as default,ne as headingLevelOfStyle};
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 = "edge" | "section" | "by-box";
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},v=f,p=u(null),h=(e,s)=>e?{className:e,views:s}:null,H=e=>l(a.Provider,{value:null},l(p.Provider,{value:null},l(w.Provider,{value:!0},e))),_=(e,s,n={})=>e?{className:e,words:s,...n}:null,x=(e,s)=>e.sectionClassName===void 0?{className:e.className,words:e.words}:e.line==="edge"||e.line!=="section"&&s?{className:e.className,words:`${e.words} edge`}:{className:e.sectionClassName,words:e.words};function E(){const e=r(a),s=r(p),n=r(d)!==null;if(e===null&&s===null)return v;const t=e===null?null:x(e,n);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:H}}function F(){const e=r(a),s=r(d)!==null;return e===null?"":x(e,s).className}const T=(e,s)=>s?e?`${e} ${s}`:s:e;function P(e){const s=E(),n=e.takes===!1?f:s,t={};let c=!1;for(const[o,i]of Object.entries(e))o==="as"||o==="takes"||o==="children"||(o==="className"?(t.className=T(i,n.className),c=!0):t[o]=i);return!c&&n.className&&(t.className=n.className),n.scope(l(e.as??"div",{...t,...n.attrs},e.children))}export{p as HeightFillContext,P as HideTaker,f as NO_HIDE,m as VIEW_HIDE_ATTR,a as ViewHideContext,h as heightFillClaim,F as usePeekViewHide,E as useTakeViewHide,_ as viewHideClaim,T as withViewHide};
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-tablet:[--sf-edge-l:var(--sf-edge-lp,var(--sf-edge-lt,var(--sf-edge-ld,0px)))] max-view-tablet:[--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"),d=g.style;for(const[f,x]of[["l","paddingLeft"],["r","paddingRight"]]){const n=d[x];n!==void 0&&(r[`--sf-edge-${f}d`]=typeof n=="number"?`${n}px`:String(n));const c=d[`--sf-pad-${f}-tablet`],o=d[`--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"),t=g.classes.includes(a.className.split(" ")[0]);return{className:`${s.gutter?`${a.className} ${a.edge}${y}`:`${h}${t?` ${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 t=r[`--sf-edge-${a}d`]??"0px",l=r[`--sf-edge-${a}t`]??t;return[t,l,r[`--sf-edge-${a}p`]??l]},[g,d]=[e("l"),e("r")];return g.every((a,t)=>a===d[t])}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
+ 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 x}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 B,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 S}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 b}from"../../../../../format/lib/finite-number.js";import{convertTheme as _,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 k}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=b(t.sectionPaddingTop)??0,n=b(t.sectionPaddingBottom)??0,i=b(t.sectionPaddingTopTablet),r=b(t.sectionPaddingBottomTablet),c=x(t.sectionPaddingUnit),p=x(t.sectionPaddingUnitTablet),l=x(t.sectionPaddingUnitPhone),h=(m,a,u,g)=>{const d=b(m);if(d!==void 0)return d+s(g,"px",l,"mobile");const T=a===void 0?{n:u,unit:c}:{n:a,unit:p};return s(T.n,T.unit,l,"mobile")+s(g,"px",l,"mobile")},f=(m,a,u,g,d)=>a!==void 0?{[m]:a+s(d??g,"px",p,"tablet")}:d===void 0?{}:{[m]:s(u,c,p,"tablet")+s(d,"px",p,"tablet")};return{sectionPaddingTop:e+s(o.top,"px",c,"desktop"),sectionPaddingBottom:n+s(o.bottom,"px",c,"desktop"),...f("sectionPaddingTopTablet",i,e,o.top,o.topTablet),...f("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 N(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)=>N(i,t)[e]]),["sectionPaddingTop","sectionPaddingTop",(o,e)=>N(e,t).sectionPaddingTop],["sectionPaddingBottom","sectionPaddingBottom",(o,e)=>N(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,...B("main"),...v(6,14)},parts:[bt(t,{color:"background",...w("label",12),weight:600,letterSpacing:.16})]}),H=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}}}),E=(t,o)=>typeof t=="number"&&Number.isInteger(t)&&t>=0?t:_(o)?.selected??0,y="var(--site-surface-2)",K=(t,o)=>_(o)?.themes[E(t.sectionAccent??0,o)],Et=(t,o)=>(e,n)=>{if(!o?.(e,n))return B(t);const i=K(e,n)?.[t];return i?{fillColor:i}:{}},lo=(t,o)=>O(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=k(n);if(i)return B(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||k(o)||o===y||D(o)?void 0:"it paints a colour that no Box Fill can hold"},O=(t,o)=>{const e=_(o)?.themes;return e&&H(t)?pt(e,E(t.sectionAccent,o)):-1},Po=(t,o,e)=>{const n=O(o,e);return n>=0?n:t},ho=(t,o)=>{const e=_(o)?.themes,n=e?lt(e,E(t,o)):-1;return n>=0?n:t},fo=(t,o)=>{const e=O(t,o);return e>=0?{sectionAccent:e}:{}},uo=(t,o)=>H(t.props)&&O(t.props,o)<0?[{kind:"band-preset",page:E(t.props.sectionAccent,o)}]:[],To=(t,{view:o="desktop",to:e="px",maxPx:n=1/0}={})=>{const{siteGutter:i,siteGutterUnit:r,siteGutterPhone:c,siteGutterPhoneUnit:p}=t.site??{},l=Pt(o),h=(a,u,g)=>{const d=x(u),T=G(a,d,"spacing",g);return T===null?null:s(T,d,"px",l)},f=h(i,r,Q)??tt(i),m=o==="desktop"?f:h(c,p,Z)??ot(c)??et(f);return s(Math.min(n,m),"px",e,l)},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"],S.kind,S.duration,S.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,O as bandIndex,E as bandPage,fo as bandProps,uo as bandWrites,Et as fillFrom,go as fillNoBoxHolds,ao as filledChip,co as headingCaseOf,N 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
+ 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 r}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}from"../../../components/InBoxContext.js";import{boxPhoneRowFits as $,boxRowColumnsClass as k,boxShareClasses as C,boxShareTabletOf as M,boxTabletColumnsClass as V}from"../../../../format/lib/content/box-layout.js";import{resolveContainerDirection as q}from"../../../../format/lib/content/container-direction.js";import{BOX_TYPE as J,containerBlocksFor as Q}from"../../../../format/lib/document/container-blocks.js";import{readPartStyle as tt}from"../part-styles.js";import{addShowWhenFacts as et,withRowRules as _}from"../../../../format/lib/document/show-when-attach.js";import{BOX_BLOCK_KEYS as it}from"./cell-width.js";import{findParentNode as nt}from"../../../../format/lib/document/passes/document-position.js";const st=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:tt(e,"text").textStyle?.startsWith("heading-")===!0}const d={not:{context:"blockOutsideBox",is:!0}},E={all:[d,{not:{context:"boxSharesWidth",is:!0}}]},N={all:[d,{not:{context:"boxSharesWidthPhone",is:!0}}]},I={all:[d,{not:{context:"boxSharesWidthTablet",is:!0}}]};function y(t,e,i){return{any:[{field:r(t),is:e},{all:[{field:r(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}}]}]},rt=[[["_gBlockSize","minWidth",r("minWidth"),c("minWidth"),"maxWidth",r("maxWidth"),c("maxWidth")],d],[["widthFit"],E],[[r("widthFit")],I],[[c("widthFit")],N],[["width"],{all:[E,{field:"widthFit",is:"fixed"}]}],[[r("width")],{all:[I,y("widthFit","fixed")]}],[[c("width")],{all:[N,H("widthFit","fixed")]}]],D=y("textFit","shrink",R),j=[[["_gText","textFit",r("textFit"),c("textFit")],d],[["minFont"],{all:[d,R]}],[[r("minFont")],{all:[d,D]}],[[c("minFont")],{all:[d,H("textFit","shrink",D)]}]],p=(t,e)=>nt(e.appState,t.props?.id),S=t=>!!t&&typeof t.type=="string"&&Q(t.type)!==null,T=t=>(t.type==="Flex"||t.type==="HeroGroup")&&q(t.type,t.props?.direction)==="row",W=t=>{const e=K(t);return e!==void 0&&e!=="fit"},lt={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)!==""&&!W(t.props?.widthFit)},boxSharesWidthTablet:(t,e)=>{const i=p(t,e);if(!S(i)||!T(i))return!1;if(V(i.props?.[r("columns")])!==""||k({...i.props,direction:"row"})!=="")return!0;const n=M(i.props?.[r("share")])??i.props?.share;return C(n)!==""&&!W(t.props?.[r("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)&&!$(n,i.props?.[c("share")])&&!W(t.props?.[c("widthFit")]??t.props?.widthFit)}},ct=t=>/^_[gds][A-Z]/.test(t);function at(t,e,i){const n=Object.entries(t),s=n.findIndex(([l])=>l===e);if(s===-1)return null;let o=s+1;for(;o<n.length&&!ct(n[o][0]);)o++;return Object.fromEntries([...n.slice(0,o),...Object.entries(i),...n.slice(o)])}function A(t,e,i){const n=Object.entries(t);return Object.fromEntries([...n.slice(0,e),...Object.entries(i),...n.slice(e)])}function dt(t,e,i){const n=Object.keys(e);if(n.includes("_dSize")){const{_gBlockSize:s,...o}=i;return A(e,n.indexOf("_dSize")+1,o)}return ht.has(t)&&n.includes("_gSpacing")?A(e,n.indexOf("_gSpacing"),i):{...e,...i}}const ht=new Set(["Text","Heading"]);function ut(t,e){const{_gText:i,...n}=e;return at(t,"_gText",n)??{...t,...e}}function ft(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",r("textFit"),c("textFit")])s in n&&(n[s]=t[s]);e.set(i,n)}return n}}const Ct={name:"blockSize",applies:(t,e,i)=>it.includes(t)&&!!i&&typeof i.render=="function",panel(t,e,i){const n=st.has(e),{text:s}=i.blockSizeFields(n?{tablet:!0,textFit:e==="Heading"?"shrink":"wrap"}:{}),{size:o}=i.blockSizeFields({tablet:!0});let l=dt(e,t.fields??{},_(o,rt));if(n){const a=_(s,j);if(l=ut(l,a),e==="Text"){const f=_(i.blockSizeFields({tablet:!0,textFit:"shrink"}).text,j),h=ft(f),u=t.resolveFields,b=(x,w)=>{const F=u?u(x,w):w.fields,g=O=>z(e,x?.props??{})?h(O??w.fields):O;return F instanceof Promise?F.then(g):g(F)};t.resolveFields=b}}t.fields=l,et(t,{...lt,textWrapsByDefault:a=>!z(e,a.props??{})})},draw(t,e){xt(t,e)}};function xt(t,e){const i=t.render;t.render=n=>{const s=v(n),o=B(s),l=i(n),a=o&&B(s,{atSectionLine:!0});return o===null?l:m(pt,{size:o,sectionSize:a??o,atEdge:e===J,canvasAttrs:n.editor?.isEditing?G(s):P,inCell:X(s),widens:L(s),children:l})}}const P={};function pt({size:t,sectionSize:e,atEdge:i,canvasAttrs:n,inCell:s,widens:o,children:l}){const a=Y(),f=!!a||i,h=f?t:e,u=h.className,b=a?.phoneCells===!0,x=o?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{Ct as blockSize,z as textShrinksByDefault};
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 c,usePeekViewHide as d,withViewHide as m}from"../../../components/ViewHideRoot.js";import{anchorSlug as t}from"../../../../format/lib/content/anchor-name.js";import{useBoxCell as h,useFillsCell as g,useInBox as x}from"../../../components/InBoxContext.js";import{drawsCopiesInTheBox as w}from"../../../../format/lib/content/copies-in-box.js";const u="!grow-0 !shrink-0 !basis-0",_=["[.sf-gap-zone>&]:w-0","[.sf-gap-zone>&]:h-0","[.sf-gap-zone>&]:-mb-[var(--sf-gap-len)]","[.sf-gap-zone>&]:-mr-[var(--sf-gap-len)]","[@media(min-width:800.02px)_and_(max-width:1099.98px)]:[.sf-gap-zone>&]:-mb-[var(--sf-gap-len-tablet,var(--sf-gap-len))]","[@media(min-width:800.02px)_and_(max-width:1099.98px)]:[.sf-gap-zone>&]:-mr-[var(--sf-gap-len-tablet,var(--sf-gap-len))]","[@media(min-width:720px)_and_(max-width:800px)]:[.sf-gap-zone>&]:-mb-[var(--sf-gap-len-tablet,var(--sf-gap-len-phone,calc(var(--sf-gap-len)/2)))]","[@media(min-width:720px)_and_(max-width:800px)]:[.sf-gap-zone>&]:-mr-[var(--sf-gap-len-tablet,var(--sf-gap-len-phone,calc(var(--sf-gap-len)/2)))]","[@media(max-width:719.98px)]:[.sf-gap-zone>&]:-mb-[var(--sf-gap-len-phone,calc(var(--sf-gap-len)/2))]","[@media(max-width:719.98px)]:[.sf-gap-zone>&]:-mr-[var(--sf-gap-len-phone,calc(var(--sf-gap-len)/2))]"].join(" "),v="flex flex-col w-full min-w-0 [&>*]:grow";function l({anchor:n}){const a=t(n),e=x(),s=d();return a?r("span",{id:a,className:m(e?`sf-section-anchor ${u} ${_}`:"sf-section-anchor",s),"aria-hidden":"true"}):null}function A({anchor:n,copiesInBox:a,children:e}){const s=h()?.columnsRow===!0,p=g(),f=t(n)!=="";return a?r(o,{children:e}):s&&!p&&f?i(c,{className:v,children:[r(l,{anchor:n}),e]}):i(o,{children:[r(l,{anchor:n}),e]})}const N={name:"sectionAnchor",applies:(n,a,e)=>a.isSection(n)&&!!e&&typeof e.render=="function",panel(n,a,e){const s=e.anchorFields;n.fields={...n.fields,...s()}},draw(n,a){n.defaultProps={...n.defaultProps,anchor:""};const e=n.render;n.render=s=>r(A,{anchor:s.anchor,copiesInBox:w(a,s),children:e(s)})}};export{_ as ANCHOR_GAP_BACK_CLASS,u as SECTION_ANCHOR_IN_BOX_CLASS,N as sectionAnchor};
1
+ 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 m}from"react/jsx-runtime";import{createElement as H}from"react";import{SECTION_MIN_HEIGHT_EXCLUDED as p,sectionHeightFillClass as F,sectionHeightFillViews as w,sectionHeightWrap as E}from"../../../../format/lib/content/section-min-height.js";import{CellWrap as x}from"../../../components/InBoxContext.js";import{HeightFillContext as C,heightFillClaim as _}from"../../../components/ViewHideRoot.js";import{drawsCopiesInTheBox as g}from"../../../../format/lib/content/copies-in-box.js";import{BOX_TYPE as M}from"../../../../format/lib/document/container-blocks.js";import{findParentNode as y}from"../../../../format/lib/document/passes/document-position.js";const c=["sectionHeightMode","sectionHeightModeTablet","sectionHeightModePhone"];function N(e,o){const i=e.props??{};return c.some(r=>i[r]==="fill")?!0:("parent"in o?o.parent:y(o.appState,i.id))?.type===M}const P={name:"sectionHeight",applies:(e,o,i)=>o.isSection(e)&&!p.has(e)&&!!i&&typeof i.render=="function",panel(e,o,i){const t=i.heightFields;e.fields={...e.fields,...t()};const r=t({fill:!0}),h=new WeakMap,u=s=>{if(!s||!c.some(l=>l in s))return s;let n=h.get(s);if(!n){n={...s};for(const l of c)l in n&&(n[l]=r[l]);h.set(s,n)}return n},a=e.resolveFields;e.resolveFields=(s,n)=>{const l=a?a(s,n):n.fields,f=d=>N(s??{},n)?u(d??n.fields):d;return l instanceof Promise?l.then(f):f(l)}},draw(e,o){const i=e.render;e.render=t=>{if(g(o,t))return i(t);const r=E(t);return r?m(x,{className:r.className,style:r.style,children:i(t)}):i(t)}}},W={name:"sectionHeightFillRoot",applies:P.applies,draw(e,o){const i=e.render;e.render=t=>{const r=g(o,t)?null:_(F(t),w(t).join(" "));return H(C.Provider,{value:r},i(t))}}};export{N as heightFillOffered,P as sectionHeight,W as sectionHeightFillRoot};
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 T}from"react/jsx-runtime";import{HideTaker as g}from"../../../components/ViewHideRoot.js";import{isBackgroundBox as I}from"../../../../format/lib/content/box-background.js";import{boxSideSpaceOf as m}from"../../../../format/lib/content/box-side-space.js";import{BAND_PAD_KEYS as A,BAND_PAD_UNIT_KEY as E,SECTION_PAD_KEYS as N,padValuesOf as b,resolveSectionPadding as D,sectionPadAttrs as O}from"../../content/section-padding.js";import{sectionFillPassClass as p}from"../../../../format/lib/content/section-min-height.js";import{COPIES_IN_THE_BOX as x,drawsCopiesInTheBox as B}from"../../../../format/lib/content/copies-in-box.js";import{ownEntry as a}from"../../../../format/lib/own-entry.js";const P={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(P));function d(e,t){return t?.innerPadding??a(P,e)}const M=e=>d(e)??{},u={DetailRows:{top:100,bottom:100}},l=(e,t)=>t.innerPadding?void 0:a(u,e),V=e=>a(u,e),_=new Set(["Flex","Text","Heading","ImageBlock"]),w=new Set(["Divider"]),h=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),S=new Set(["ProductGrid"]);function c(e,t,n=!1){const o=e.render;e.render=i=>{if(t?.(i))return o(i);const r=O({...b(i,N,n),sideSpace:m(i.sideSpace)}),s=o(i),f=p(i);return r?T(g,{className:f?`${r.className} ${f}`:r.className,style:r.style,children:s}):s}}const X={name:"sectionPadding",applies:(e,t,n)=>t.isSection(e)&&!h.has(e)&&!!n&&typeof n.render=="function",panel(e,t,n){const o=l(t,e)?void 0:d(t,e);if(o){e.fields={...e.fields,...n.sidesPaddingFields({keys:A,unitKey:E,fallback:o,tablet:!0,siteSide:!0})};return}l(t,e)||S.has(t)||(e.fields={...e.fields,...n.sidesPaddingFields({tablet:!0,siteSide:!0})})},draw(e,t){const n=l(t,e);if(!(!n&&d(t,e))){if(n){const o=e.render,i=n;e.render=r=>{const s=D(r,i);return o({...r,padTop:s.top,padBottom:s.bottom})};return}if(S.has(t)){c(e);return}_.has(t)||w.has(t)||c(e,t==="Flex"?o=>I(o.bgImage):x.has(t)?o=>B(t,o):void 0,!0)}}},C=["Heading","Text","ImageBlock"],R=["LogoBlock"],$={name:"blockPadding",applies:(e,t,n)=>(C.includes(e)||R.includes(e))&&!!n&&typeof n.render=="function",panel(e,t,n){e.fields={...e.fields,...n.sidesPaddingFields({tablet:!0,siteSide:!0})}},draw(e,t){_.has(t)||c(e,void 0,!0)}};export{w as PADS_ITS_OWN_SPACE,_ as PAD_ON_ROOT,v as SECTION_PAD_INNER,P as SECTION_PAD_INNER_DEFAULTS,$ as blockPadding,M as innerPaddingFallback,V as ownPairDefault,X as sectionPadding};
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 l}from"react/jsx-runtime";import{HideTaker as u}from"../../../components/ViewHideRoot.js";import{INTRO_EDGE_CLASS as X}from"../../../../format/lib/sections/intro-bleed-layout.js";import{cssLengthOf as B}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 J,HERO_CHROME_INSET_VAR as Q,FULL_SECTION_WIDTH as Z,SITE_WIDTH_CAP as _,centredCap as G,heroBackgroundTokens as tt}from"../../../../format/lib/content/page-width.js";import{SECTION_WIDTH_FAMILY as v,SECTION_WIDTH_KEYS as D,hasOwnSectionWidth as nt,hasWidthFamily as et,resolveWidth as F,siteWidthsOf as ot}from"../../../../format/lib/content/section-width.js";import{boxCardProps as it}from"../../../../format/lib/content/box-background.js";import{cardCopyPlace as ct}from"../../../../format/lib/content/card-template.js";import{BOX_GUTTER_KEY as rt,boxGutterOf as lt,boxPlaceOf as dt,boxRunsEdgeToEdge as ut,isFrameContainer as C,ownNodeWidth as st,sectionGroundAnswer as at,siteDrawsGutter as ft}from"../../../../format/lib/content/site-gutter.js";import{getEditorSiteContentWidth as ht}from"../../../../format/lib/document/editor-site-widths.js";import{GroundStopsAt as H,NestedBoxChoice as _t,SectionGroupChoice as Nt,SectionGroupWidthsProvider as wt,SectionRootChoice as Ct,SplitBandAndColumn as M}from"../../../components/SiteGutterFrame.js";import{FRAME as L}from"../../../components/BlockFrame.js";import{sectionFillPassClass as P}from"../../../../format/lib/content/section-min-height.js";import{parentCapsWidth as Et}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 Ot,heldByANode as Tt,isNestedNode as St,NOT_HELD_BY_A_NODE as y}from"../../../../format/lib/document/passes/document-position.js";import{ownEntry as k}from"../../../../format/lib/own-entry.js";const N="--sf-sw-site",mt="--sf-sw-content",pt="--sf-bg-cap",xt="contents [--sf-site-width:var(--sf-sw-content)] max-view-wide:[--sf-site-width:var(--sf-sw-site)]",R=({own:t,content:n,siteContent:e})=>t===!0&&n==="full"&&e!=="full",U="contents view-wide:[--sf-site-width:100vw]",A=({held:t},n,e)=>t?e:l(u,{className:n,children:e}),Rt=`contents view-wide:[--sf-site-width:100vw] ${X} view-wide:[--sf-site-gutter:var(--intro-edge)]`,W=(t,n,e)=>n==="content"?`min(${B(t,e)},var(${N}))`:B(t,e);function T({content:t,contentMax:n,contentMaxUnit:e},o){return t==="full"?o!=="content"?Z:null:n===null?null:W(n,o,e)}function S(t,n){return n===null?t:l(u,{className:"contents",style:{[N]:_},children:l(u,{className:xt,style:{[mt]:n},children:t})})}const At="--sf-content-cap",Wt="contents max-view-wide:[--sf-content-cap:none]";function It({content:t,contentMax:n,contentMaxUnit:e},o){return t==="full"?null:n!==null?W(n,o,e):o==="content"?null:`var(${N})`}function bt(t,n){return n===null?t:l(u,{className:"contents",style:{[N]:_},children:l(u,{className:Wt,style:{[At]:n},children:t})})}const V=`var(${N},${_})`,f=(t,n,e="")=>t==="content"?l(u,{className:e||void 0,style:G(_),children:l(H,{ground:V,children:n})}):n;function $(t,n,e,o,i){if(R(e))return f(o,A(e,U,l(M,{children:t({...n,contained:!0})})),i);if(e.content==="full")return f(o,t({...n,contained:!1}),i);const c=T(e,o);return o==="content"&&c===null&&!e.own?t({...n,contained:!0}):f(o,S(l(M,{children:t({...n,contained:!0})}),c),i)}function Y(t,n,e,o){if(e==="hero"){const r=S(t(n),T(o,o.band));return o.band==="full"?l(u,{style:{[z]:"none",[Q]:"initial",[J]:"initial"},children:r}):o.band==="content"?l(u,{style:tt(!0),children:r}):r}const i=o.band??"full",c=P(n);if(e==="rawMarkup"){if(o.content==="full")return f(i,t(n),c);const r=o.contentMax===null?_:W(o.contentMax,i,o.contentMaxUnit);return l(u,{className:"contents",style:{[N]:_},children:f(i,l(u,{className:c||void 0,style:G(r),children:t(n)}),c)})}if(e==="scrollOver"){const r=o.content==="full",d=R(o)?A(o,Rt,t({...n,fullWidth:!1})):S(t({...n,fullWidth:r}),r?null:T(o,i));return i==="content"?l(u,{className:"contents",style:{[pt]:_},children:d}):d}switch(e){case"both":return f(i,bt(t(n),It(o,i)),c);case"contained":return $(t,n,o,i,c);case"contentColumn":case"contentFull":case"productGrid":{const r=R(o),d=o.content==="full"&&!r?"full":"page",s=r?A(o,U,t({...n,widthMode:d})):S(t({...n,widthMode:d}),o.content==="full"?null:T(o,i));return e==="productGrid"&&!o.own?i==="content"?l(u,{className:c?`${L} ${c}`:L,children:s}):s:f(i,s,c)}default:return f(i,S(t(n),T(o,i)),c)}}function gt(t,n){const e=k(v,n);if(!e)return;const o=t.render;t.render=i=>{const c=ot(i),r={band:c.background,content:c.content??"content",contentMax:null},d=()=>e==="rawMarkup"?o(i):l(Nt,{draw:a=>a?.background==="content"?l(H,{ground:V,children:s(a)}):s(a)}),s=a=>{const w=a?{...r,band:a.background==="content"?r.band:a.background??r.band,content:a.content??r.content,own:a.background==="full"||a.content!==null,held:!0,siteContent:r.content}:r,x=Y(o,i,e,w);if(!C(n))return x;const b=lt(i),g=b===void 0?w.content:b?"content":"full";return g===w.content?x:l(_t,{atTop:x,nested:$(o,i,{...w,content:g,own:!1},w.band??"full",P(i))})},h=st(n,i);if(!nt(h))return d();const m=e==="rawMarkup",I=at(n,i),j=h.content??(m?"full":r.content),p={band:I,content:I==="content"?"content":j,contentMax:h.contentMax,contentMaxUnit:h.contentMaxUnit,own:!m,siteContent:r.content};return l(Ct,{own:()=>l(wt,{value:{background:p.band,content:p.content},children:Y(o,i,e,p)}),followed:d})}}const Bt={all:[y,{not:{context:"runsEdgeToEdge",is:!0}}]},on={name:"sectionWidth",applies:(t,n,e)=>et(t)&&!!e&&typeof e.render=="function",panel(t,n,e){const o=e.sectionOwnWidthFields({drawsFullOnItsOwn:k(v,n)==="rawMarkup"}),i=C(n)?e.boxGutterFields():{},c={...t.fields,...i,...o},r=C(n)?K(n,t,c,[rt]):c;E(t,{heldByANode:Tt}),C(n)&&E(t,{runsEdgeToEdge:(d,s)=>ut(it(d.props??{},ct(s.appState,d.props?.id)?.inCopy!==!1))}),t.fields=O(r,[D.background,D.content],C(n)?Bt:y)},draw(t,n){gt(t,n)}};function Gt(t,n){if(!t||!("widthMode"in t))return t;const e={...t},o=e.widthMode;return o&&(e.widthMode={...o,currentValue:n.mode,inherited:n.inherited}),e}const vt=new Set(["Heading","Text","ImageBlock","ButtonBlock"]),cn={name:"containedWidth",applies:(t,n,e)=>vt.has(t)&&!!e&&typeof e.render=="function",panel(t,n,e){const o=e.widthField;t.fields=K(n,t,{...t.fields,...o("page")});const i=t.resolveFields;t.resolveFields=(c,r)=>{const d=i?i(c,r):r.fields,s=F(c?.props??{},"page"),h=m=>Gt(m,s);return d&&typeof d.then=="function"?d.then(h):h(d)}},draw(t){const n=t.render;t.render=e=>{const{mode:o}=F(e,"page");return n({...e,contained:o!=="full"})}}},Dt={not:{context:"inHeroGroupRow",is:!0}},rn={name:"buttonAlignInRow",applies:t=>t==="ButtonBlock",panel(t){const n=t;n.fields=O(n.fields??{},["align"],Dt),E(n,{inHeroGroupRow:(e,o)=>{const i=Ot(o.appState,e.props?.id);return!!i&&i.type==="HeroGroup"&&q("HeroGroup",i.props?.direction)==="row"}})}};function Ft(t){return Object.values(t).some(n=>!!n&&typeof n=="object"&&n.type==="slot")}const Ht={any:[]},Mt={all:[{not:{context:"outsideBox",is:!0}},{not:{context:"insideSiteGutter",is:!0}}]},Lt={not:{context:"widthCappedByParent",is:!0}};function K(t,n,e,o=["widthMode"]){if(t==="ButtonBlock")return O(e,["_gWidth",...o],Ht);if(Ft(e)){const i=(c,r)=>dt(r.appState?.data?.content,c.props?.id,ft(ht()));return E(n,{outsideBox:(c,r)=>i(c,r)?.inBox!==!0,insideSiteGutter:(c,r)=>i(c,r)?.insideGutter}),O(e,o,Mt)}return E(n,{widthCappedByParent:(i,c)=>"parent"in c?Et(c.parent):St({props:i.props??{}},c)}),O(e,o,Lt)}export{pt as SECTION_BACKGROUND_VAR,Wt as SECTION_CONTENT_CAP_CLASS,At as SECTION_CONTENT_CAP_VAR,xt as SECTION_CONTENT_CLASS,mt as SECTION_CONTENT_VAR,N as SITE_CONTENT_VAR,rn as buttonAlignInRow,cn as containedWidth,on as sectionWidth,Gt as widthModeFields};
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": "67.8.1",
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.1.0",
57
- "efficient-shell": "^12.33.0",
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.2.0",
76
- "efficient-shell": "^12.33.0",
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
  }