efficient-web-builder 68.1.0 → 69.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 (57) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/editor/components/useSocialSettings.d.ts +2 -2
  3. package/dist/editor/lib/document/blocks/general/Logos/fields.js +1 -1
  4. package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
  5. package/dist/editor/lib/document/choice-pictures.js +1 -1
  6. package/dist/editor/lib/sections/text-layouts.js +1 -1
  7. package/dist/format/lib/content/block-align.d.ts +5 -0
  8. package/dist/format/lib/content/block-align.js +1 -1
  9. package/dist/format/lib/content/box-background.js +1 -1
  10. package/dist/format/lib/content/box-shape.d.ts +1 -1
  11. package/dist/format/lib/document/blocks/block-types.d.ts +1 -0
  12. package/dist/format/lib/document/passes/settings-groups.js +1 -1
  13. package/dist/format/lib/document/passes/types.d.ts +1 -0
  14. package/dist/format/lib/document/section-catalog.d.ts +1 -0
  15. package/dist/format/lib/document/section-catalog.js +8 -2
  16. package/dist/format/lib/document/seed-parts.d.ts +1 -0
  17. package/dist/format/lib/document/seed-parts.js +1 -1
  18. package/dist/format/lib/editor-words-catalogue.d.ts +1 -0
  19. package/dist/format/lib/editor-words-catalogue.js +1 -1
  20. package/dist/format/lib/sections/integrations-rows.d.ts +3 -0
  21. package/dist/format/lib/sections/integrations-rows.js +1 -0
  22. package/dist/format/lib/sections/logo-look.d.ts +1 -1
  23. package/dist/format/lib/sections/logo-look.js +1 -1
  24. package/dist/format/lib/source-rules/motion-vars-from-the-shell.js +3 -3
  25. package/dist/format/lib/source-rules/one-alignment-row.js +2 -2
  26. package/dist/format/lib/source-rules/one-items-align-map.d.ts +9 -0
  27. package/dist/format/lib/source-rules/one-items-align-map.js +34 -0
  28. package/dist/format/lib/source-rules/one-loop-module.js +2 -2
  29. package/dist/format/lib/source-rules/one-markup-grammar.js +2 -2
  30. package/dist/format/lib/source-rules/one-page-theme-reader.js +2 -2
  31. package/dist/format/lib/source-rules/support/source-file.d.ts +1 -0
  32. package/dist/format/lib/source-rules/support/source-file.js +1 -0
  33. package/dist/format/lib/source-rules/support/tailwind-variant.d.ts +1 -0
  34. package/dist/format/lib/source-rules/support/tailwind-variant.js +1 -0
  35. package/dist/render/components/Flex.js +1 -1
  36. package/dist/render/components/InBoxContext.d.ts +2 -0
  37. package/dist/render/components/IntegrationsSection.js +1 -1
  38. package/dist/render/components/Logos.d.ts +4 -0
  39. package/dist/render/components/Logos.js +1 -1
  40. package/dist/render/components/Split.js +1 -1
  41. package/dist/render/lib/content/block-size.d.ts +2 -0
  42. package/dist/render/lib/content/block-size.js +1 -1
  43. package/dist/render/lib/content/box-shared-columns.js +1 -1
  44. package/dist/render/lib/document/blocks/general/section-to-box-rows-integrations.d.ts +3 -0
  45. package/dist/render/lib/document/blocks/general/section-to-box-rows-integrations.js +2 -0
  46. package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.js +1 -1
  47. package/dist/render/lib/document/blocks/general/section-to-box-rows-proof.js +1 -1
  48. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  49. package/dist/render/lib/document/passes/block-size.js +1 -1
  50. package/dist/render/lib/document/passes/cell-width.d.ts +2 -2
  51. package/dist/render/lib/document/passes/cell-width.js +1 -1
  52. package/dist/render/lib/media.d.ts +0 -1
  53. package/dist/render/lib/media.js +1 -1
  54. package/dist/render/lib/sections/section-to-box.js +1 -1
  55. package/package.json +3 -5
  56. package/dist/render/components/integrationIcons.d.ts +0 -2
  57. package/dist/render/components/integrationIcons.js +0 -1
@@ -1 +1 @@
1
- import{jsx as e,jsxs as s}from"react/jsx-runtime";import{HideTaker as g}from"./ViewHideRoot.js";import{integrationIcon as u}from"./integrationIcons.js";import{renderGold as f,renderHeadline as v}from"./goldPhrases.js";import{say as w}from"../../format/lib/editor-words.js";function N(a,t){const r=Array.from({length:t},()=>[]);return a.forEach((i,n)=>r[n%t].push(i)),r.filter(i=>i.length>0)}function b({name:a}){const t=u(a);return s("span",{className:"flex flex-shrink-0 items-center gap-2.5 whitespace-nowrap rounded border border-line bg-bg px-5 py-2.5",children:[t&&e("svg",{viewBox:"0 0 24 24",className:"h-[16px] w-[16px] flex-shrink-0 fill-current text-fg/85","aria-hidden":!0,children:e("path",{d:t.path})}),e("span",{className:"text-[13px] font-medium tracking-wide text-fg/75",children:a})]})}function k({names:a,reverse:t}){return e("div",{className:"overflow-hidden","aria-hidden":!1,children:e("div",{className:"flex w-max gap-3 pr-3 [animation:sf-marquee_var(--sf-marquee-t)_linear_infinite] motion-reduce:[animation:none]",style:{"--sf-marquee-t":`${Math.max(a.length*6,30)}s`,animationDirection:t?"reverse":"normal"},children:[0,1].map(r=>e("div",{className:"flex gap-3","aria-hidden":r===1,children:a.map((i,n)=>e(b,{name:i},n))},r))})})}function y({eyebrow:a,title:t,body:r,apps:i,statValue:n,statLabel:l,note:x,editing:c=!1}={}){const d=(i??[]).map(m=>(m.text??"").trim()).filter(m=>c||m).map(m=>m||w("App")),h=!!(a??"").trim()||!!(t??"").trim();if(!c&&!h&&d.length===0)return null;const p=N(d,3);return s(g,{as:"section",className:"relative z-[2] overflow-hidden border-y border-line bg-surface py-[76px]",children:[s("div",{className:"mx-auto mb-12 max-w-[860px] px-10 text-center max-[960px]:px-6",children:[(a??"").trim()&&e("span",{className:"inline-block bg-accent px-3.5 py-1.5 font-mono text-[12px] font-semibold uppercase tracking-[0.16em] text-bg",children:f(a??"")}),(t??"").trim()&&e("h2",{className:"mt-5 font-display text-[40px] font-medium uppercase leading-[1.04] tracking-[-0.02em] text-fg max-view-wide:text-[30px]",children:v(t??"",!1)}),(r??"").trim()&&e("p",{className:"mx-auto mt-5 max-w-[60ch] text-[15px] leading-relaxed text-fg/65",children:r})]}),p.length>0&&e("div",{className:"flex flex-col gap-3",children:p.map((m,o)=>e(k,{names:m,reverse:o%2===1},o))}),((n??"").trim()||(x??"").trim())&&s("div",{className:"mx-auto mt-12 max-w-[860px] px-10 text-center max-[960px]:px-6",children:[(n??"").trim()&&e("div",{className:"font-display text-[min(64px,var(--sf-heading-max,9999px))] font-medium uppercase leading-none text-accent max-view-wide:text-[min(46px,var(--sf-heading-max,9999px))]",children:n}),(l??"").trim()&&e("div",{className:"mt-2 font-display text-[18px] font-medium uppercase tracking-[0.06em] text-fg",children:f(l??"")}),(x??"").trim()&&e("p",{className:"mx-auto mt-4 max-w-[52ch] text-[13px] leading-relaxed text-fg/50",children:x})]})]})}export{y as default};
1
+ import{jsx as e,jsxs as x}from"react/jsx-runtime";import{HideTaker as g}from"./ViewHideRoot.js";import{AppChip as u}from"./Logos.js";import{renderGold as f,renderHeadline as v}from"./goldPhrases.js";import{say as N}from"../../format/lib/editor-words.js";import{dealRows as w,INTEGRATION_ROWS as _,rowTurnSeconds as k}from"../../format/lib/sections/integrations-rows.js";const y=(a,t)=>w(a,t).filter(i=>i.length>0),b=({name:a})=>e(u,{alt:a});function j({names:a,reverse:t}){return e("div",{className:"overflow-hidden","aria-hidden":!1,children:e("div",{className:"flex w-max gap-3 pr-3 [animation:sf-marquee_var(--sf-marquee-t)_linear_infinite] motion-reduce:[animation:none]",style:{"--sf-marquee-t":`${k(a.length)}s`,animationDirection:t?"reverse":"normal"},children:[0,1].map(i=>e("div",{className:"flex gap-3","aria-hidden":i===1,children:a.map((m,n)=>e(b,{name:m},n))},i))})})}function q({eyebrow:a,title:t,body:i,apps:m,statValue:n,statLabel:l,note:s,editing:d=!1}={}){const p=(m??[]).map(r=>(r.text??"").trim()).filter(r=>d||r).map(r=>r||N("App")),h=!!(a??"").trim()||!!(t??"").trim();if(!d&&!h&&p.length===0)return null;const c=y(p,_);return x(g,{as:"section",className:"relative z-[2] overflow-hidden border-y border-line bg-surface py-[76px]",children:[x("div",{className:"mx-auto mb-12 max-w-[860px] px-10 text-center max-[960px]:px-6",children:[(a??"").trim()&&e("span",{className:"inline-block bg-accent px-3.5 py-1.5 font-mono text-[12px] font-semibold uppercase tracking-[0.16em] text-bg",children:f(a??"")}),(t??"").trim()&&e("h2",{className:"mt-5 font-display text-[40px] font-medium uppercase leading-[1.04] tracking-[-0.02em] text-fg max-view-wide:text-[30px]",children:v(t??"",!1)}),(i??"").trim()&&e("p",{className:"mx-auto mt-5 max-w-[60ch] text-[15px] leading-relaxed text-fg/65",children:i})]}),c.length>0&&e("div",{className:"flex flex-col gap-3",children:c.map((r,o)=>e(j,{names:r,reverse:o%2===1},o))}),((n??"").trim()||(s??"").trim())&&x("div",{className:"mx-auto mt-12 max-w-[860px] px-10 text-center max-[960px]:px-6",children:[(n??"").trim()&&e("div",{className:"font-display text-[min(64px,var(--sf-heading-max,9999px))] font-medium uppercase leading-none text-accent max-view-wide:text-[min(46px,var(--sf-heading-max,9999px))]",children:n}),(l??"").trim()&&e("div",{className:"mt-2 font-display text-[18px] font-medium uppercase tracking-[0.06em] text-fg",children:f(l??"")}),(s??"").trim()&&e("p",{className:"mx-auto mt-4 max-w-[52ch] text-[13px] leading-relaxed text-fg/50",children:s})]})]})}export{q as default};
@@ -24,6 +24,10 @@ interface LogosProps {
24
24
  }
25
25
  export default function Logos({ items, contained, heading, columns, grayscale, logoHeight, bandPadding, logos: LogoBlocks, look, omitHead, cards, align, alignTablet, alignPhone, labelledBy, }: LogosProps): import("react").JSX.Element;
26
26
  export declare const CARD_WORDS_CLASS = "font-mono text-[12px] uppercase tracking-[0.18em]";
27
+ export declare function AppChip({ src, alt }: {
28
+ src?: string;
29
+ alt?: string;
30
+ }): import("react").JSX.Element;
27
31
  export declare function LogoWallMark({ src, alt, look, logoHeight, grayscale, kind, }: {
28
32
  src?: string;
29
33
  alt?: string;
@@ -1 +1 @@
1
- import{jsx as n,jsxs as p,Fragment as E}from"react/jsx-runtime";import{PagePicture as h}from"../lib/first-screen.js";import{PaymentMark as y,paymentMarkItems as P}from"efficient-shell/icons/payment";import D from"./BlockFrame.js";import{MarkZoom as u}from"./PictureZoom.js";import{renderChrome as Y,renderGold as N,renderHeadline as Z}from"./goldPhrases.js";import{LogoWallProvider as A}from"./LogoWallContext.js";import{EMPTY_ELSE_CLASS as U,EMPTY_HIDES_CLASS as J,EmptyHidesStyle as V}from"../lib/content/empty-hides.js";import{media as S}from"../lib/media.js";import{sizedImage as v}from"../../format/lib/sized-image.js";import{stripMarkup as _}from"../../format/lib/markup.js";import{DEFAULT_LOGO_LOOK as X}from"../../format/lib/sections/logo-look.js";import{paymentRowMark as W}from"../lib/sections/payment-rows.js";import{alignViewClasses as q,BLOCK_ALIGN_JUSTIFY as H,blockAlignOf as Q}from"../../format/lib/content/block-align.js";import{FOOTER_MARK_SIZES as C}from"../../format/lib/document/box-footer.js";import{say as ee}from"../../format/lib/editor-words.js";const R={label:"text-[length:var(--size-label,13px)]"},f="sf-logo-wall",te="sf-logo-items",ne="flex flex-wrap items-center",re=(t,e,a)=>{const r=Q(t)??"center";return[ne,H[r],q("justify",r,e,a,{atSectionLine:!0})].filter(Boolean).join(" ")},$="plain",g={plain:{x:3.5,y:2},cards:{x:.75,y:.75},marks:{x:.75,y:.5}},O=t=>({columnGap:`${g[t].x}rem`,rowGap:`${g[t].y}rem`}),k=(t,e)=>`calc((100% - ${(t-1)*g[e].x}rem) / ${t})`;function ae({items:t,contained:e,heading:a,columns:r,grayscale:d,logoHeight:o,bandPadding:l,logos:i,look:s=X,omitHead:c=!1,cards:m,align:T,alignTablet:j,alignPhone:G,labelledBy:B}){const x=re(T,j,G),b=s==="marks",F=r!=null?{flex:`0 0 ${k(r,$)}`}:void 0,L=!c;return p(D,{contained:e,fillWidth:b&&c?"w-auto max-w-full":void 0,className:L&&l==null?"py-10":"",style:!L||l==null?void 0:{paddingTop:`${l}px`,paddingBottom:`${l}px`},children:[!c&&a!=null&&a!==""?n("h2",{className:`mb-8 text-center font-mono ${R.label} uppercase tracking-[0.2em] text-fg-dim`,children:Z(a,!1)}):null,p(le,{listed:b,labelledBy:B,children:[m!==void 0?p(A,{value:{look:s,logoHeight:o,grayscale:d},children:[r!=null?n("style",{children:`.${f}-c${r}>*{flex:0 0 ${k(r,s)}}`}):null,n("div",{className:[f,r!=null?`${f}-c${r}`:"",x].filter(Boolean).join(" "),style:O(s),children:m})]}):i?p(A,{value:{look:s,logoHeight:o,grayscale:d},children:[n(V,{}),r!=null?n("style",{children:`.${f}-c${r}>*{flex:0 0 ${k(r,s)}}`}):null,n(i,{className:[f,J,r!=null?`${f}-c${r}`:"",x].filter(Boolean).join(" "),style:O(s),minEmptyHeight:80})]}):null,m!==void 0?null:n("div",{className:`${te} ${U} ${x}`,style:O($),children:(t??[]).map((M,K)=>n("div",{className:"text-center",style:F,children:n(de,{src:M.src,alt:M.alt,look:$,logoHeight:o,grayscale:d})},K))})]})]})}function le({listed:t,labelledBy:e,children:a}){return t?n("div",{className:"contents",role:"list",...e?{"aria-labelledby":e}:{"aria-label":ee("Ways to pay")},children:a}):n(E,{children:a})}const w="font-mono text-[12px] uppercase tracking-[0.18em]";function z(t){const e=P({name:_(t)});return!e.length||e.length===1&&e[0].kind==="words"&&!e[0].glyph?[]:e}function se({item:t,children:e}){return t.kind==="brand"?n(u,{children:e}):n(E,{children:e})}function ie(t){return t.length?n("span",{className:"flex items-center gap-3",children:t.map((e,a)=>n(y,{item:e,size:20,className:w},a))}):null}const oe=C.sm.mark,ce=Object.values(C),me=t=>ce.reduce((e,a)=>Math.abs(a.mark-t)<Math.abs(e.mark-t)?a:e).words;function de({src:t,alt:e,look:a,logoHeight:r,grayscale:d,kind:o}){if(a==="marks"){const l=r??oe,i=!t&&o!==void 0?W({label:e,kind:o}):null,s=i?[i]:!t&&e?z(e):[];return n("span",{role:"listitem",className:"flex items-center gap-3",style:{fontSize:`${me(l)}px`},children:s.length?s.map((c,m)=>n(se,{item:c,children:n(y,{item:c,size:l})},m)):t?n(u,{children:n(h,{...I(S(t)),alt:_(e||""),className:"w-auto",style:{height:`${l}px`}})}):e&&n("span",{children:N(e)})})}if(a==="cards"){const l=!t&&o!==void 0?W({label:e,kind:o}):null,i=!l&&!t&&e?z(e):[],s=n("div",{className:"sf-card flex h-10 items-center border border-line bg-surface px-4",children:l?n(y,{item:l,size:20,className:w}):i.length?ie(i):t?n(h,{...I(S(t)),alt:_(e||""),className:d===!1?"max-h-5 w-auto opacity-90":"max-h-5 w-auto opacity-90 grayscale"}):e&&n("span",{className:w,children:N(e)})});return(t?!0:l?l.kind==="brand":i.length>0&&i.every(m=>m.kind==="brand"))?n(u,{children:s}):s}return t?n(u,{children:n(h,{...fe(S(t)),alt:e,className:["mx-auto w-auto opacity-60 transition-opacity hover:opacity-100",r==null?"h-7":"",d===!1?"":"grayscale"].filter(Boolean).join(" "),style:r==null?void 0:{height:`${r}px`}})}):n("span",{className:`font-mono ${R.label} uppercase tracking-[0.2em] text-fg-dim`,children:Y(e||"Logo")})}function I(t){const e=v(t,{fallbackWidth:320,maxWidth:640});return e.srcSet?{src:e.src,srcSet:e.srcSet,sizes:"120px"}:{src:t}}function fe(t){const e=v(t,{fallbackWidth:640,maxWidth:960});return e.srcSet?{src:e.src,srcSet:e.srcSet,sizes:"240px"}:{src:t}}export{w as CARD_WORDS_CLASS,de as LogoWallMark,ae as default};
1
+ import{jsx as t,jsxs as f,Fragment as M}from"react/jsx-runtime";import{PagePicture as u}from"../lib/first-screen.js";import{BrandNameMark as H}from"efficient-shell/icons/brands";import{PaymentMark as y,paymentMarkItems as Y}from"efficient-shell/icons/payment";import Z from"./BlockFrame.js";import{MarkZoom as h}from"./PictureZoom.js";import{renderChrome as U,renderGold as _,renderHeadline as J}from"./goldPhrases.js";import{LogoWallProvider as I}from"./LogoWallContext.js";import{useBoxCell as V}from"./InBoxContext.js";import{EMPTY_ELSE_CLASS as X,EMPTY_HIDES_CLASS as q,EmptyHidesStyle as Q}from"../lib/content/empty-hides.js";import{media as x}from"../lib/media.js";import{sizedImage as v}from"../../format/lib/sized-image.js";import{stripMarkup as g}from"../../format/lib/markup.js";import{DEFAULT_LOGO_LOOK as ee}from"../../format/lib/sections/logo-look.js";import{paymentRowMark as R}from"../lib/sections/payment-rows.js";import{alignViewClasses as ne,BLOCK_ALIGN_JUSTIFY as te,blockAlignOf as re}from"../../format/lib/content/block-align.js";import{FOOTER_MARK_SIZES as P}from"../../format/lib/document/box-footer.js";import{say as ae}from"../../format/lib/editor-words.js";const N={label:"text-[length:var(--size-label,13px)]",chip:"text-[length:var(--size-label,14px)]"},p="sf-logo-wall",se="sf-logo-items",le="flex flex-wrap items-center",ie="flex flex-nowrap items-center",oe=(n,e,r,a=!1)=>{const o=re(n)??"center";return[a?ie:le,te[o],ne("justify",o,e,r,{atSectionLine:!0})].filter(Boolean).join(" ")},O="plain",$={plain:{x:3.5,y:2},cards:{x:.75,y:.75},marks:{x:.75,y:.5},chips:{x:.75,y:.75}},w=n=>({columnGap:`${$[n].x}rem`,rowGap:`${$[n].y}rem`}),L=(n,e)=>`calc((100% - ${(n-1)*$[e].x}rem) / ${n})`;function ce({items:n,contained:e,heading:r,columns:a,grayscale:o,logoHeight:c,bandPadding:s,logos:i,look:l=ee,omitHead:m=!1,cards:d,align:j,alignTablet:T,alignPhone:G,labelledBy:D}){const S=oe(j,T,G,V()?.loops===!0),C=l==="marks",F=a!=null?{flex:`0 0 ${L(a,O)}`}:void 0,b=!m;return f(Z,{contained:e,fillWidth:C&&m?"w-auto max-w-full":void 0,className:b&&s==null?"py-10":"",style:!b||s==null?void 0:{paddingTop:`${s}px`,paddingBottom:`${s}px`},children:[!m&&r!=null&&r!==""?t("h2",{className:`mb-8 text-center font-mono ${N.label} uppercase tracking-[0.2em] text-fg-dim`,children:J(r,!1)}):null,f(me,{listed:C,labelledBy:D,children:[d!==void 0?f(I,{value:{look:l,logoHeight:c,grayscale:o},children:[a!=null?t("style",{children:`.${p}-c${a}>*{flex:0 0 ${L(a,l)}}`}):null,t("div",{className:[p,a!=null?`${p}-c${a}`:"",S].filter(Boolean).join(" "),style:w(l),children:d})]}):i?f(I,{value:{look:l,logoHeight:c,grayscale:o},children:[t(Q,{}),a!=null?t("style",{children:`.${p}-c${a}>*{flex:0 0 ${L(a,l)}}`}):null,t(i,{className:[p,q,a!=null?`${p}-c${a}`:"",S].filter(Boolean).join(" "),style:w(l),minEmptyHeight:80})]}):null,d!==void 0?null:t("div",{className:`${se} ${X} ${S}`,style:w(O),children:(n??[]).map((E,K)=>t("div",{className:"text-center",style:F,children:t(Ne,{src:E.src,alt:E.alt,look:O,logoHeight:c,grayscale:o})},K))})]})]})}function me({listed:n,labelledBy:e,children:r}){return n?t("div",{className:"contents",role:"list",...e?{"aria-labelledby":e}:{"aria-label":ae("Ways to pay")},children:r}):t(M,{children:r})}const k="font-mono text-[12px] uppercase tracking-[0.18em]";function W(n){const e=Y({name:g(n)});return!e.length||e.length===1&&e[0].kind==="words"&&!e[0].glyph?[]:e}function de({item:n,children:e}){return n.kind==="brand"?t(h,{children:e}):t(M,{children:e})}function pe(n){return n.length?t("span",{className:"flex items-center gap-3",children:n.map((e,r)=>t(y,{item:e,size:20,className:k},r))}):null}const fe="shrink-0 gap-2 whitespace-nowrap rounded bg-bg px-5",ue=`${N.chip} font-medium tracking-wide text-fg-dim`,he="sf-logo-chip flex h-10 items-center border border-line",xe={lead:"sf-card",tail:"bg-surface px-4"},z={lead:"",tail:fe};function B({look:n,children:e}){const r=[n.lead,he,n.tail].filter(Boolean).join(" ");return n===z?t("div",{className:r,"data-sf-chip":"",children:e}):t("div",{className:r,children:e})}function Se({src:n,alt:e}){return f(B,{look:z,children:[n?t(u,{...A(x(n)),alt:"",className:"h-4 w-auto"}):e?t(H,{name:e,size:16,className:"shrink-0 text-fg"}):null,e?t("span",{className:ue,children:_(e)}):null]})}const ye=P.sm.mark,_e=Object.values(P),ge=n=>_e.reduce((e,r)=>Math.abs(r.mark-n)<Math.abs(e.mark-n)?r:e).words;function Ne({src:n,alt:e,look:r,logoHeight:a,grayscale:o,kind:c}){if(r==="marks"){const s=a??ye,i=!n&&c!==void 0?R({label:e,kind:c}):null,l=i?[i]:!n&&e?W(e):[];return t("span",{role:"listitem",className:"flex items-center gap-3",style:{fontSize:`${ge(s)}px`},children:l.length?l.map((m,d)=>t(de,{item:m,children:t(y,{item:m,size:s})},d)):n?t(h,{children:t(u,{...A(x(n)),alt:g(e||""),className:"w-auto",style:{height:`${s}px`}})}):e&&t("span",{children:_(e)})})}if(r==="chips")return t(Se,{src:n,alt:e});if(r==="cards"){const s=!n&&c!==void 0?R({label:e,kind:c}):null,i=!s&&!n&&e?W(e):[],l=t(B,{look:xe,children:s?t(y,{item:s,size:20,className:k}):i.length?pe(i):n?t(u,{...A(x(n)),alt:g(e||""),className:o===!1?"max-h-5 w-auto opacity-90":"max-h-5 w-auto opacity-90 grayscale"}):e&&t("span",{className:k,children:_(e)})});return(n?!0:s?s.kind==="brand":i.length>0&&i.every(d=>d.kind==="brand"))?t(h,{children:l}):l}return n?t(h,{children:t(u,{...Oe(x(n)),alt:e,className:["mx-auto w-auto opacity-60 transition-opacity hover:opacity-100",a==null?"h-7":"",o===!1?"":"grayscale"].filter(Boolean).join(" "),style:a==null?void 0:{height:`${a}px`}})}):t("span",{className:`font-mono ${N.label} uppercase tracking-[0.2em] text-fg-dim`,children:U(e||"Logo")})}function A(n){const e=v(n,{fallbackWidth:320,maxWidth:640});return e.srcSet?{src:e.src,srcSet:e.srcSet,sizes:"120px"}:{src:n}}function Oe(n){const e=v(n,{fallbackWidth:640,maxWidth:960});return e.srcSet?{src:e.src,srcSet:e.srcSet,sizes:"240px"}:{src:n}}export{Se as AppChip,k as CARD_WORDS_CLASS,Ne as LogoWallMark,ce as default};
@@ -1 +1 @@
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
+ import{jsx as e,jsxs as i}from"react/jsx-runtime";import{alignViewAnswers as V,alignViewClasses as D,BLOCK_ALIGN_BOX_WORD as T,BLOCK_ALIGN_TEXT as x}from"../../format/lib/content/block-align.js";import{BOX_ALIGN_CLASS as $}from"../../format/lib/content/box-layout.js";import{SiteLink as E}from"../lib/site-runtime.js";import R from"./Btn.js";import{resolveImageTreatment as Z}from"../../format/lib/content/image-treatment.js";import S from"./Placeholder.js";import{useSitePhotography as W}from"./SitePhotographyContext.js";import Y from"./SectionEyebrow.js";import{renderGold as s,renderHeadline as q,splitParagraphs as J}from"./goldPhrases.js";import{ON_MEDIA_INK_STYLE as Q}from"../../format/lib/content/ink.js";import{scrim as B}from"../../format/lib/content/scrim.js";import{SECTION_FILL_CLASS as ee}from"../../format/lib/content/section-min-height.js";import{HALF_SIZES as I}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 te({imageLabel:f,imageSrc:v,imageTint:h=.4,imageObjectPosition:O,eyebrow:b,title:g,body:w,cta:c,reverse:n=!1,uppercase:C=!1,textAlign:m="left",textAlignTablet:u,textAlignPhone:_,textBgSrc:p,textBgLabel:A,textBgTint:y=.6,textBgObjectPosition:M,featureBar:r,imageButton:l,grayscale:P,pictureHover:X,fillHeight:G=!1}){const N=Z(P,W(),X),L={left:{items:"",text:x.left,cta:"self-start"},center:{items:$[T.center],text:x.center,cta:"self-center"},right:{items:$[T.right],text:x.right,cta:"self-end"}},d=L[m]??L.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,u,_),o={text:D("text",m,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]":"",...G?[ee]:[]].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(S,{label:f,src:v,objectPosition:O,treatment:N,sizes:I}),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[U]}`,children:[r&&i(E,{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:B(.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(E,{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(S,{label:A??f,src:p,objectPosition:M,treatment:N,sizes:I}),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?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:[b&&e(Y,{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]`,C?"uppercase":""].join(" "),children:q(g,!1)}),w&&J(w).map((H,K)=>e("p",{className:[`max-w-[520px] ${a.body} leading-[1.7]`,"text-fg-dim"].join(" "),children:s(H)},K)),c.text&&e("div",{className:`mt-2 ${d.cta}${o.cta?` ${o.cta}`:""}`,children:e(R,{href:c.href,variant:"primary",children:s(c.text)})})]})})]})]})})}export{te as default};
@@ -17,6 +17,8 @@ export type BlockSize = {
17
17
  style: Record<string, string>;
18
18
  attrs: Record<string, string>;
19
19
  };
20
+ export declare const BLOCK_FILL_PHONE_ROW_CLASS = "max-view-wide:grow!";
21
+ export declare function blockFillsPhone(values: BlockSizeValues): boolean;
20
22
  export declare const BLOCK_WIDTH_MODE_ATTR: {
21
23
  readonly fill: "data-sf-width-fill";
22
24
  readonly fixed: "data-sf-width-fixed";
@@ -1 +1 @@
1
- import{BLOCK_FIXED_WIDTH as ie,BLOCK_SIZE_KEYS as oe,parseBlockWidthFit as T,phoneKey as y,parseTextFit as L,tabletKey as j,viewKeyAt as z}from"efficient-easel/draw";import{sideLengthAt as ne}from"efficient-easel/screen/lib/content/length-units";import{TEXT_FIT_ATTR as m}from"../../../format/lib/fit-words.js";import{cssLengthOf as V}from"../../../format/lib/content/css-length.js";import{TIER_OF_VIEW as Y,tierOfView as A}from"../../../format/lib/content/view-tier.js";const se="sf-block-size",U=["width","minWidth","maxWidth"],X=e=>`${e}Unit`,l=e=>typeof e=="number"&&Number.isFinite(e)&&e>=0?e:void 0,we={desktop:{fill:"view-wide:w-full view-wide:[.flex-row>&]:grow",fixed:"view-wide:w-[min(var(--sf-bw),100%)] view-wide:basis-auto! view-wide:grow-0! view-wide:shrink-0"},phone:{fill:"max-view-wide:w-full",fixed:"max-view-wide:w-[min(var(--sf-bw-p),100%)] max-view-wide:basis-auto! max-view-wide:grow-0! max-view-wide:shrink-0"}},Z={desktop:{fill:"view-desktop:w-full view-desktop:[.flex-row>&]:grow",fixed:"view-desktop:w-[min(var(--sf-bw),100%)] view-desktop:basis-auto! view-desktop:grow-0! view-desktop:shrink-0"},tablet:{fill:"view-wide:max-view-desktop:w-full view-wide:max-view-desktop:[.flex-row>&]:grow",fixed:"view-wide:max-view-desktop:w-[min(var(--sf-bw-t),100%)] view-wide:max-view-desktop:basis-auto! view-wide:max-view-desktop:grow-0! view-wide:max-view-desktop:shrink-0"},phone:{fill:"max-view-wide:w-full",fixed:"max-view-wide:w-[min(var(--sf-bw-p),100%)] max-view-wide:basis-auto! max-view-wide:grow-0! max-view-wide:shrink-0"}},de={desktop:Z.desktop,tablet:{fill:"view-tablet:max-view-desktop:w-full view-wide:max-view-desktop:[.flex-row>&]:grow",fixed:"view-tablet:max-view-desktop:w-[min(var(--sf-bw-t),100%)] view-tablet:max-view-desktop:basis-auto! view-tablet:max-view-desktop:grow-0! view-tablet:max-view-desktop:shrink-0"},phone:{fill:"max-view-tablet:w-full",fixed:"max-view-tablet:w-[min(var(--sf-bw-p),100%)] max-view-tablet:basis-auto! max-view-tablet:grow-0! max-view-tablet:shrink-0"}},ae={two:{desktop:"view-wide:[.flex-row>*>&]:grow"},three:{desktop:"view-desktop:[.flex-row>*>&]:grow",tablet:"view-wide:max-view-desktop:[.flex-row>*>&]:grow"}},pe={desktop:"--sf-bw",tablet:"--sf-bw-t",phone:"--sf-bw-p"},fe={fill:"data-sf-width-fill",fixed:"data-sf-width-fixed"},me="data-sf-min-width",$={two:{desktop:"wide",phone:Y.phone},three:Y},le={minWidth:{desktop:["--sf-bmin","view-wide:min-w-[var(--sf-bmin)]!"],phone:["--sf-bmin-p","max-view-wide:min-w-[var(--sf-bmin-p)]!"]},maxWidth:{desktop:["--sf-bmax","view-wide:max-w-[var(--sf-bmax)]"],phone:["--sf-bmax-p","max-view-wide:max-w-[var(--sf-bmax-p)]"]}},E={minWidth:{desktop:["--sf-bmin","view-desktop:min-w-[var(--sf-bmin)]!"],tablet:["--sf-bmin-t","view-wide:max-view-desktop:min-w-[var(--sf-bmin-t)]!"],phone:["--sf-bmin-p","max-view-wide:min-w-[var(--sf-bmin-p)]!"]},maxWidth:{desktop:["--sf-bmax","view-desktop:max-w-[var(--sf-bmax)]"],tablet:["--sf-bmax-t","view-wide:max-view-desktop:max-w-[var(--sf-bmax-t)]"],phone:["--sf-bmax-p","max-view-wide:max-w-[var(--sf-bmax-p)]"]}},re={minWidth:{desktop:E.minWidth.desktop,tablet:["--sf-bmin-t","view-tablet:max-view-desktop:min-w-[var(--sf-bmin-t)]!"],phone:["--sf-bmin-p","max-view-tablet:min-w-[var(--sf-bmin-p)]!"]},maxWidth:{desktop:E.maxWidth.desktop,tablet:["--sf-bmax-t","view-tablet:max-view-desktop:max-w-[var(--sf-bmax-t)]"],phone:["--sf-bmax-p","max-view-tablet:max-w-[var(--sf-bmax-p)]"]}},xe=["widthFit",...U],G={desktop:"view-wide:whitespace-nowrap view-wide:[&_*]:whitespace-nowrap!",phone:"max-view-wide:whitespace-nowrap max-view-wide:[&_*]:whitespace-nowrap!"},O={desktop:"view-desktop:whitespace-nowrap view-desktop:[&_*]:whitespace-nowrap!",tablet:"view-wide:max-view-desktop:whitespace-nowrap view-wide:max-view-desktop:[&_*]:whitespace-nowrap!",phone:"max-view-wide:whitespace-nowrap max-view-wide:[&_*]:whitespace-nowrap!"},he={desktop:O.desktop,tablet:"view-tablet:max-view-desktop:whitespace-nowrap view-tablet:max-view-desktop:[&_*]:whitespace-nowrap!",phone:"max-view-tablet:whitespace-nowrap max-view-tablet:[&_*]:whitespace-nowrap!"},q={desktop:"view-wide:min-w-0 view-wide:[&_*]:overflow-hidden view-wide:[&_*]:text-ellipsis",phone:"max-view-wide:min-w-0 max-view-wide:[&_*]:overflow-hidden max-view-wide:[&_*]:text-ellipsis"},ce={desktop:"view-desktop:min-w-0 view-desktop:[&_*]:overflow-hidden view-desktop:[&_*]:text-ellipsis",tablet:"view-wide:max-view-desktop:min-w-0 view-wide:max-view-desktop:[&_*]:overflow-hidden view-wide:max-view-desktop:[&_*]:text-ellipsis",phone:q.phone},J={desktop:"view-wide:max-w-full",phone:"max-view-wide:max-w-full"},Q={desktop:"view-desktop:max-w-full",tablet:"view-wide:max-view-desktop:max-w-full",phone:J.phone};function Se(e){const d=N(e);return d.sides.filter(s=>d.mode[s]==="fill").map(s=>ae[d.three?"three":"two"][s]).filter(Boolean).join(" ")}function Te(e){const{three:d,sides:s,mode:p,lengthPerSide:r}=N(e),w=t=>d?$.three[t]:$.two[t],o={fill:[],fixed:[],min:[]},i=r("minWidth");for(const t of s){const x=p[t];(x==="fill"||x==="fixed")&&o[x].push(w(t)),i[t]!==void 0&&o.min.push(w(t))}const f={};for(const t of["fill","fixed"])o[t].length&&(f[fe[t]]=o[t].join(" "));return o.min.length&&(f[me]=o.min.join(" ")),f}function N(e){const d=xe.some(w=>{const o=e[w]?.tablet;return w==="widthFit"?T(o)!==void 0:l(o)!==void 0}),s=d?["desktop","tablet","phone"]:["desktop","phone"],p=(w,o)=>{const i=w(o?.desktop),f=d?w(o?.tablet)??i:i;return{desktop:i,tablet:f,phone:w(o?.phone)??f}};return{three:d,sides:s,perSide:p,lengthPerSide:w=>{const o=X(w),i={};for(const t of s)i[z(w,A(t))]=l(e[w]?.[t]),i[z(o,A(t))]=e.units?.[w]?.[t];const f=t=>ne(i,{length:w},o,A(t),"length")??void 0;return{desktop:f("desktop"),tablet:f("tablet"),phone:f("phone")}},mode:p(T,e.widthFit)}}function Le(e,{atSectionLine:d=!1}={}){const s=["desktop","tablet","phone"].some(n=>L(e.textFit?.[n])==="ellipsis"),p=d&&!s,r=p?de:Z,w=p?re:E,o=p?he:O,i=[],f={},t={},{three:x,sides:F,lengthPerSide:D,mode:ee}=N(e),K=D("width");for(const n of F){const a=ee[n];!a||a==="fit"||(i.push(x?r[n][a]:we[n][a]),a==="fixed"&&(f[pe[n]]=V(K[n]?.value??ie.fallback,K[n]?.unit)))}for(const n of U.filter(a=>a!=="width")){const a=D(n);for(const h of F){const b=a[h];if(b===void 0)continue;const[k,u]=x?w[n][h]:le[n][h];f[k]=V(b.value,b.unit),i.push(u)}}const c=L(e.textFit?.desktop),_=L(e.textFit?.phone),I=n=>{const a=l(e.minFont?.[n]);return a===void 0?void 0:e.units?.minFont?.[n]==="vw"?`${a}vw`:String(a)},W=I("desktop"),C=I("phone"),B=L(e.textFit?.tablet),v=B!==c||_!==void 0?B:void 0,H=I("tablet"),g=H!==W||C!==void 0?H:void 0,P=l(e.maxWidth?.desktop),R=l(e.maxWidth?.tablet)??P,M={desktop:P!==void 0,tablet:R!==void 0,phone:(l(e.maxWidth?.phone)??R)!==void 0},S=(n,a,h)=>{if(a!=="line"&&a!=="ellipsis")return;const b=n==="tablet"?void 0:n,k=(u,te)=>h||!b?u[n]:te[b];if(a==="line"){i.push(k(o,G));return}if(i.push(k(O,G)),i.push(k(ce,q)),x&&!h&&n==="desktop")for(const u of["desktop","tablet"])M[u]||i.push(Q[u]);else M[n]||i.push(k(Q,J))};return v?(S("desktop",c,!0),S("tablet",v,!0),S("phone",_??v,!0)):(S("desktop",c,!1),S("phone",_??c,!1)),c&&(t[m.fit]=c),v&&(t[m.fitTablet]=v),_&&(t[m.fitPhone]=_),W!==void 0&&(t[m.min]=W),g!==void 0&&(t[m.minTablet]=g),C!==void 0&&(t[m.minPhone]=C),!p&&(v||g!==void 0)&&(t[m.edge]=""),i.length===0&&Object.keys(t).length===0?null:{className:[se,...i].join(" "),style:f,attrs:t}}function Ie(e){if(l(e.maxWidth?.desktop)!==void 0)return!0;const d=T(e.widthFit?.desktop);return d==="fill"||d==="fixed"}function We(e){return["desktop","tablet","phone"].some(s=>{const p=T(e.widthFit?.[s]);return p==="fixed"||p==="fill"||l(e.minWidth?.[s])!==void 0})}function Ce(e){const d={};for(const s of oe){const p=e[s],r=e[j(s)],w=e[y(s)];(p!==void 0||r!==void 0||w!==void 0)&&(d[s]={desktop:p,tablet:r,phone:w});const o=X(s),i={desktop:e[o],tablet:e[j(o)],phone:e[y(o)]};(i.desktop!==void 0||i.tablet!==void 0||i.phone!==void 0)&&((d.units??={})[s]=i)}return d}export{U as BLOCK_LENGTH_KEYS,me as BLOCK_MIN_WIDTH_ATTR,se as BLOCK_SIZE_CLASS,fe as BLOCK_WIDTH_MODE_ATTR,m as TEXT_FIT_ATTR,We as blockCanWidenPastCell,Te as blockCanvasWidthAttrs,Se as blockFillInCellClass,X as blockLengthUnitKey,Ie as blockSetsItsWidth,Le as blockSizeOf,Ce as blockSizeValuesOf};
1
+ import{BLOCK_FIXED_WIDTH as ie,BLOCK_SIZE_KEYS as oe,parseBlockWidthFit as L,phoneKey as y,parseTextFit as T,tabletKey as j,viewKeyAt as z}from"efficient-easel/draw";import{sideLengthAt as ne}from"efficient-easel/screen/lib/content/length-units";import{TEXT_FIT_ATTR as m}from"../../../format/lib/fit-words.js";import{cssLengthOf as V}from"../../../format/lib/content/css-length.js";import{TIER_OF_VIEW as Y,tierOfView as E}from"../../../format/lib/content/view-tier.js";const se="sf-block-size",U=["width","minWidth","maxWidth"],X=e=>`${e}Unit`,l=e=>typeof e=="number"&&Number.isFinite(e)&&e>=0?e:void 0,we={desktop:{fill:"view-wide:w-full view-wide:[.flex-row>&]:grow",fixed:"view-wide:w-[min(var(--sf-bw),100%)] view-wide:basis-auto! view-wide:grow-0! view-wide:shrink-0"},phone:{fill:"max-view-wide:w-full",fixed:"max-view-wide:w-[min(var(--sf-bw-p),100%)] max-view-wide:basis-auto! max-view-wide:grow-0! max-view-wide:shrink-0"}},Z={desktop:{fill:"view-desktop:w-full view-desktop:[.flex-row>&]:grow",fixed:"view-desktop:w-[min(var(--sf-bw),100%)] view-desktop:basis-auto! view-desktop:grow-0! view-desktop:shrink-0"},tablet:{fill:"view-wide:max-view-desktop:w-full view-wide:max-view-desktop:[.flex-row>&]:grow",fixed:"view-wide:max-view-desktop:w-[min(var(--sf-bw-t),100%)] view-wide:max-view-desktop:basis-auto! view-wide:max-view-desktop:grow-0! view-wide:max-view-desktop:shrink-0"},phone:{fill:"max-view-wide:w-full",fixed:"max-view-wide:w-[min(var(--sf-bw-p),100%)] max-view-wide:basis-auto! max-view-wide:grow-0! max-view-wide:shrink-0"}},de={desktop:Z.desktop,tablet:{fill:"view-tablet:max-view-desktop:w-full view-wide:max-view-desktop:[.flex-row>&]:grow",fixed:"view-tablet:max-view-desktop:w-[min(var(--sf-bw-t),100%)] view-tablet:max-view-desktop:basis-auto! view-tablet:max-view-desktop:grow-0! view-tablet:max-view-desktop:shrink-0"},phone:{fill:"max-view-tablet:w-full",fixed:"max-view-tablet:w-[min(var(--sf-bw-p),100%)] max-view-tablet:basis-auto! max-view-tablet:grow-0! max-view-tablet:shrink-0"}},ae={two:{desktop:"view-wide:[.flex-row>*>&]:grow"},three:{desktop:"view-desktop:[.flex-row>*>&]:grow",tablet:"view-wide:max-view-desktop:[.flex-row>*>&]:grow"}},Se="max-view-wide:grow!";function Le(e){return I(e).mode.phone==="fill"}const pe={desktop:"--sf-bw",tablet:"--sf-bw-t",phone:"--sf-bw-p"},fe={fill:"data-sf-width-fill",fixed:"data-sf-width-fixed"},me="data-sf-min-width",$={two:{desktop:"wide",phone:Y.phone},three:Y},le={minWidth:{desktop:["--sf-bmin","view-wide:min-w-[var(--sf-bmin)]!"],phone:["--sf-bmin-p","max-view-wide:min-w-[var(--sf-bmin-p)]!"]},maxWidth:{desktop:["--sf-bmax","view-wide:max-w-[var(--sf-bmax)]"],phone:["--sf-bmax-p","max-view-wide:max-w-[var(--sf-bmax-p)]"]}},O={minWidth:{desktop:["--sf-bmin","view-desktop:min-w-[var(--sf-bmin)]!"],tablet:["--sf-bmin-t","view-wide:max-view-desktop:min-w-[var(--sf-bmin-t)]!"],phone:["--sf-bmin-p","max-view-wide:min-w-[var(--sf-bmin-p)]!"]},maxWidth:{desktop:["--sf-bmax","view-desktop:max-w-[var(--sf-bmax)]"],tablet:["--sf-bmax-t","view-wide:max-view-desktop:max-w-[var(--sf-bmax-t)]"],phone:["--sf-bmax-p","max-view-wide:max-w-[var(--sf-bmax-p)]"]}},re={minWidth:{desktop:O.minWidth.desktop,tablet:["--sf-bmin-t","view-tablet:max-view-desktop:min-w-[var(--sf-bmin-t)]!"],phone:["--sf-bmin-p","max-view-tablet:min-w-[var(--sf-bmin-p)]!"]},maxWidth:{desktop:O.maxWidth.desktop,tablet:["--sf-bmax-t","view-tablet:max-view-desktop:max-w-[var(--sf-bmax-t)]"],phone:["--sf-bmax-p","max-view-tablet:max-w-[var(--sf-bmax-p)]"]}},xe=["widthFit",...U],G={desktop:"view-wide:whitespace-nowrap view-wide:[&_*]:whitespace-nowrap!",phone:"max-view-wide:whitespace-nowrap max-view-wide:[&_*]:whitespace-nowrap!"},F={desktop:"view-desktop:whitespace-nowrap view-desktop:[&_*]:whitespace-nowrap!",tablet:"view-wide:max-view-desktop:whitespace-nowrap view-wide:max-view-desktop:[&_*]:whitespace-nowrap!",phone:"max-view-wide:whitespace-nowrap max-view-wide:[&_*]:whitespace-nowrap!"},ce={desktop:F.desktop,tablet:"view-tablet:max-view-desktop:whitespace-nowrap view-tablet:max-view-desktop:[&_*]:whitespace-nowrap!",phone:"max-view-tablet:whitespace-nowrap max-view-tablet:[&_*]:whitespace-nowrap!"},q={desktop:"view-wide:min-w-0 view-wide:[&_*]:overflow-hidden view-wide:[&_*]:text-ellipsis",phone:"max-view-wide:min-w-0 max-view-wide:[&_*]:overflow-hidden max-view-wide:[&_*]:text-ellipsis"},he={desktop:"view-desktop:min-w-0 view-desktop:[&_*]:overflow-hidden view-desktop:[&_*]:text-ellipsis",tablet:"view-wide:max-view-desktop:min-w-0 view-wide:max-view-desktop:[&_*]:overflow-hidden view-wide:max-view-desktop:[&_*]:text-ellipsis",phone:q.phone},J={desktop:"view-wide:max-w-full",phone:"max-view-wide:max-w-full"},Q={desktop:"view-desktop:max-w-full",tablet:"view-wide:max-view-desktop:max-w-full",phone:J.phone};function Te(e){const d=I(e);return d.sides.filter(s=>d.mode[s]==="fill").map(s=>ae[d.three?"three":"two"][s]).filter(Boolean).join(" ")}function Ie(e){const{three:d,sides:s,mode:p,lengthPerSide:r}=I(e),w=t=>d?$.three[t]:$.two[t],o={fill:[],fixed:[],min:[]},i=r("minWidth");for(const t of s){const x=p[t];(x==="fill"||x==="fixed")&&o[x].push(w(t)),i[t]!==void 0&&o.min.push(w(t))}const f={};for(const t of["fill","fixed"])o[t].length&&(f[fe[t]]=o[t].join(" "));return o.min.length&&(f[me]=o.min.join(" ")),f}function I(e){const d=xe.some(w=>{const o=e[w]?.tablet;return w==="widthFit"?L(o)!==void 0:l(o)!==void 0}),s=d?["desktop","tablet","phone"]:["desktop","phone"],p=(w,o)=>{const i=w(o?.desktop),f=d?w(o?.tablet)??i:i;return{desktop:i,tablet:f,phone:w(o?.phone)??f}};return{three:d,sides:s,perSide:p,lengthPerSide:w=>{const o=X(w),i={};for(const t of s)i[z(w,E(t))]=l(e[w]?.[t]),i[z(o,E(t))]=e.units?.[w]?.[t];const f=t=>ne(i,{length:w},o,E(t),"length")??void 0;return{desktop:f("desktop"),tablet:f("tablet"),phone:f("phone")}},mode:p(L,e.widthFit)}}function Ce(e,{atSectionLine:d=!1}={}){const s=["desktop","tablet","phone"].some(n=>T(e.textFit?.[n])==="ellipsis"),p=d&&!s,r=p?de:Z,w=p?re:O,o=p?ce:F,i=[],f={},t={},{three:x,sides:N,lengthPerSide:D,mode:ee}=I(e),K=D("width");for(const n of N){const a=ee[n];!a||a==="fit"||(i.push(x?r[n][a]:we[n][a]),a==="fixed"&&(f[pe[n]]=V(K[n]?.value??ie.fallback,K[n]?.unit)))}for(const n of U.filter(a=>a!=="width")){const a=D(n);for(const c of N){const b=a[c];if(b===void 0)continue;const[k,u]=x?w[n][c]:le[n][c];f[k]=V(b.value,b.unit),i.push(u)}}const h=T(e.textFit?.desktop),_=T(e.textFit?.phone),C=n=>{const a=l(e.minFont?.[n]);return a===void 0?void 0:e.units?.minFont?.[n]==="vw"?`${a}vw`:String(a)},W=C("desktop"),g=C("phone"),B=T(e.textFit?.tablet),v=B!==h||_!==void 0?B:void 0,H=C("tablet"),A=H!==W||g!==void 0?H:void 0,P=l(e.maxWidth?.desktop),R=l(e.maxWidth?.tablet)??P,M={desktop:P!==void 0,tablet:R!==void 0,phone:(l(e.maxWidth?.phone)??R)!==void 0},S=(n,a,c)=>{if(a!=="line"&&a!=="ellipsis")return;const b=n==="tablet"?void 0:n,k=(u,te)=>c||!b?u[n]:te[b];if(a==="line"){i.push(k(o,G));return}if(i.push(k(F,G)),i.push(k(he,q)),x&&!c&&n==="desktop")for(const u of["desktop","tablet"])M[u]||i.push(Q[u]);else M[n]||i.push(k(Q,J))};return v?(S("desktop",h,!0),S("tablet",v,!0),S("phone",_??v,!0)):(S("desktop",h,!1),S("phone",_??h,!1)),h&&(t[m.fit]=h),v&&(t[m.fitTablet]=v),_&&(t[m.fitPhone]=_),W!==void 0&&(t[m.min]=W),A!==void 0&&(t[m.minTablet]=A),g!==void 0&&(t[m.minPhone]=g),!p&&(v||A!==void 0)&&(t[m.edge]=""),i.length===0&&Object.keys(t).length===0?null:{className:[se,...i].join(" "),style:f,attrs:t}}function We(e){if(l(e.maxWidth?.desktop)!==void 0)return!0;const d=L(e.widthFit?.desktop);return d==="fill"||d==="fixed"}function ge(e){return["desktop","tablet","phone"].some(s=>{const p=L(e.widthFit?.[s]);return p==="fixed"||p==="fill"||l(e.minWidth?.[s])!==void 0})}function Ae(e){const d={};for(const s of oe){const p=e[s],r=e[j(s)],w=e[y(s)];(p!==void 0||r!==void 0||w!==void 0)&&(d[s]={desktop:p,tablet:r,phone:w});const o=X(s),i={desktop:e[o],tablet:e[j(o)],phone:e[y(o)]};(i.desktop!==void 0||i.tablet!==void 0||i.phone!==void 0)&&((d.units??={})[s]=i)}return d}export{Se as BLOCK_FILL_PHONE_ROW_CLASS,U as BLOCK_LENGTH_KEYS,me as BLOCK_MIN_WIDTH_ATTR,se as BLOCK_SIZE_CLASS,fe as BLOCK_WIDTH_MODE_ATTR,m as TEXT_FIT_ATTR,ge as blockCanWidenPastCell,Ie as blockCanvasWidthAttrs,Te as blockFillInCellClass,Le as blockFillsPhone,X as blockLengthUnitKey,We as blockSetsItsWidth,Ce as blockSizeOf,Ae as blockSizeValuesOf};
@@ -1 +1 @@
1
- import{REPEAT_ATTRIBUTE as l,phoneKey as A,tabletKey as E}from"efficient-easel/draw";import{parseLoop as c}from"../../../format/lib/animation/loop.js";import{finiteNumber as O}from"../../../format/lib/finite-number.js";import{boxIsCard as $}from"../../../format/lib/content/box-background.js";import{isStripBox as g}from"../../../format/lib/content/box-separator.js";import{CARD_STATE_ATTR as N}from"../../../format/lib/content/card-state.js";import{BOX_ALIGN_CLASS as u,boxRowColumnsClass as y,boxRowTabletColumnsClass as T}from"../../../format/lib/content/box-layout.js";const d="sharedColumns",h="shared",m="own",p="scroll",X="Row columns",q=[{value:m,label:"Each row"},{value:h,label:"Shared"}],z=[{value:m,label:"Each row"},{value:p,label:"Shared, scroll"}],w="(width >= 800px)",D="(width < 800px)";function L(t){const o={direction:t.direction,separator:t.separator,loop:c(t.loop),line:t.line};return o.direction==="row"&&!g(o.direction,o.separator)&&o.loop!=="scroll"&&o.line!==!0&&!$(t)&&y({...o,columns:t.columns})===""&&T({...o,columnsTablet:t[E("columns")]})===""}function f(t){return Array.isArray(t)?t.filter(o=>typeof o?.type=="string").length:O(t?.blockCount)??0}function J(t){return L(t)&&r(f(t.content))>0?H(t[d],t[A(d)]):{desktop:!1,phone:!1}}const r=t=>Number.isInteger(t)&&t>0?t:0,S=(t,o)=>`sf-shared-cols-${t}${o===void 0?"":`-from-${o}`}`,R=t=>`sf-shared-cols-phone-${t}`;function H(t,o){return{desktop:t===h,phone:o===p}}function Q(t,o,e){const n=r(o);return n?`${t.desktop?` ${S(n,e)}`:""}${t.phone?` ${R(n)}`:""}`:""}function C(t){const o=`[${l}]`;return`:has(> ${o} ${t}):not(:has(> ${o} ${o} ${t}))`}function _(t,o,e=""){const n=C(t);return`${n}{display:grid;grid-template-columns:${o};column-gap:0${e}}${n}>:not(:has(${t})):not(${t}){grid-column:1/-1}${n} :has(${t}),${n} ${t}{display:grid;grid-template-columns:subgrid;grid-column:1/-1;min-width:0}`}const P="data-sf-shared-plain";function v(t){const o=`[${l}]`,e=`[${P}]`,n=C(t)+`:not(:has(> :not(${o}) > :not(${e}) ${t})):not(:has(> ${o} > * > :not(${e}) ${t})):not(:has(:not(${e}) > :not(${e}) > ${t})):not(:has(> ${o}[${N}]))`,s=`${n}>:not(style):not(:has(${t})):not(${t})`;return`${n}{display:table;width:100%;border-collapse:collapse}${n}>:has(${t}),${n}>${o}>:has(${t}),${n} ${e}:has(${t}),${n} ${e}>:has(${t}){display:contents}${n} ${t}{display:table-row}${n} ${t}>*{display:table-cell;width:auto;vertical-align:top}${n} ${t}.${u.center}>*{vertical-align:middle}${n} ${t}.${u.end}>*{vertical-align:bottom}${s}{display:table-caption;caption-side:bottom}${s}:has(~ ${o}){caption-side:top}`}function V(t,o,e){const n=r(o);if(!n)return"";let s="";if(t.desktop){const a=`.${S(n,e)}`;s+=`@media ${e===void 0?w:`(width >= ${e}px)`}{${_(a,`repeat(${n},auto)`)}${v(a)}}`}return t.phone&&(s+=`@media ${D}{${_(`.${R(n)}`,`repeat(${n},minmax(max-content,auto))`,";overflow-x:auto")}}`),s}const I="sharedRows",U="shared",k="sf-shared-rows-list";function M(t){const o=t.direction;return(o===void 0||o==="column")&&c(t.loop)!=="scroll"&&t.line!==!0&&!$(t)}function Z(t){return t[I]===U&&M(t)&&r(f(t.content))>0}const x=t=>`sf-shared-rows-${t}`;function tt(t,o){const e=r(o);return t&&e?` ${x(e)}`:""}function ot(t,o){const e=r(o);if(!t||!e)return"";const n=`.${x(e)}`,s=`.${k}`,a=`display:grid;grid-template-rows:subgrid;grid-row:span ${e};min-height:0;grid-template-columns:minmax(0,1fr)`,b=["start","center","end"].map(i=>`${s} ${n}.items-${i}{justify-items:${i}}`).join("");return`${s} :has(${n}){${a};row-gap:0}${s} ${n}{${a};justify-content:normal;align-items:stretch}${b}`}export{d as SHARED_COLUMNS_KEY,X as SHARED_COLUMNS_LABEL,m as SHARED_COLUMNS_OFF,z as SHARED_COLUMNS_PHONE_POINTS,q as SHARED_COLUMNS_POINTS,P as SHARED_PLAIN_ATTR,I as SHARED_ROWS_KEY,k as SHARED_ROWS_LIST_CLASS,Q as sharedColumnsClasses,V as sharedColumnsCss,J as sharedColumnsDrawn,L as sharedColumnsFits,tt as sharedRowsClasses,ot as sharedRowsCss,Z as sharedRowsDrawn,M as sharedRowsFits};
1
+ import{REPEAT_ATTRIBUTE as c,phoneKey as A,tabletKey as E}from"efficient-easel/draw";import{parseLoop as $}from"../../../format/lib/animation/loop.js";import{finiteNumber as O}from"../../../format/lib/finite-number.js";import{boxIsCard as u}from"../../../format/lib/content/box-background.js";import{isStripBox as g}from"../../../format/lib/content/box-separator.js";import{CARD_STATE_ATTR as N}from"../../../format/lib/content/card-state.js";import{BOX_ALIGN_CLASS as i,boxRowColumnsClass as y,boxRowTabletColumnsClass as T}from"../../../format/lib/content/box-layout.js";const d="sharedColumns",h="shared",m="own",p="scroll",X="Row columns",q=[{value:m,label:"Each row"},{value:h,label:"Shared"}],z=[{value:m,label:"Each row"},{value:p,label:"Shared, scroll"}],w="(width >= 800px)",D="(width < 800px)";function L(t){const o={direction:t.direction,separator:t.separator,loop:$(t.loop),line:t.line};return o.direction==="row"&&!g(o.direction,o.separator)&&o.loop!=="scroll"&&o.line!==!0&&!u(t)&&y({...o,columns:t.columns})===""&&T({...o,columnsTablet:t[E("columns")]})===""}function f(t){return Array.isArray(t)?t.filter(o=>typeof o?.type=="string").length:O(t?.blockCount)??0}function J(t){return L(t)&&r(f(t.content))>0?H(t[d],t[A(d)]):{desktop:!1,phone:!1}}const r=t=>Number.isInteger(t)&&t>0?t:0,S=(t,o)=>`sf-shared-cols-${t}${o===void 0?"":`-from-${o}`}`,R=t=>`sf-shared-cols-phone-${t}`;function H(t,o){return{desktop:t===h,phone:o===p}}function Q(t,o,e){const n=r(o);return n?`${t.desktop?` ${S(n,e)}`:""}${t.phone?` ${R(n)}`:""}`:""}function C(t){const o=`[${c}]`;return`:has(> ${o} ${t}):not(:has(> ${o} ${o} ${t}))`}function _(t,o,e=""){const n=C(t);return`${n}{display:grid;grid-template-columns:${o};column-gap:0${e}}${n}>:not(:has(${t})):not(${t}){grid-column:1/-1}${n} :has(${t}),${n} ${t}{display:grid;grid-template-columns:subgrid;grid-column:1/-1;min-width:0}`}const P="data-sf-shared-plain";function v(t){const o=`[${c}]`,e=`[${P}]`,n=C(t)+`:not(:has(> :not(${o}) > :not(${e}) ${t})):not(:has(> ${o} > * > :not(${e}) ${t})):not(:has(:not(${e}) > :not(${e}) > ${t})):not(:has(> ${o}[${N}]))`,s=`${n}>:not(style):not(:has(${t})):not(${t})`;return`${n}{display:table;width:100%;border-collapse:collapse}${n}>:has(${t}),${n}>${o}>:has(${t}),${n} ${e}:has(${t}),${n} ${e}>:has(${t}){display:contents}${n} ${t}{display:table-row}${n} ${t}>*{display:table-cell;width:auto;vertical-align:top}${n} ${t}.${i.center}>*{vertical-align:middle}${n} ${t}.${i.end}>*{vertical-align:bottom}${s}{display:table-caption;caption-side:bottom}${s}:has(~ ${o}){caption-side:top}`}function V(t,o,e){const n=r(o);if(!n)return"";let s="";if(t.desktop){const a=`.${S(n,e)}`;s+=`@media ${e===void 0?w:`(width >= ${e}px)`}{${_(a,`repeat(${n},auto)`)}${v(a)}}`}return t.phone&&(s+=`@media ${D}{${_(`.${R(n)}`,`repeat(${n},minmax(max-content,auto))`,";overflow-x:auto")}}`),s}const I="sharedRows",U="shared",k="sf-shared-rows-list";function M(t){const o=t.direction;return(o===void 0||o==="column")&&$(t.loop)!=="scroll"&&t.line!==!0&&!u(t)}function Z(t){return t[I]===U&&M(t)&&r(f(t.content))>0}const x=t=>`sf-shared-rows-${t}`;function tt(t,o){const e=r(o);return t&&e?` ${x(e)}`:""}function ot(t,o){const e=r(o);if(!t||!e)return"";const n=`.${x(e)}`,s=`.${k}`,a=`display:grid;grid-template-rows:subgrid;grid-row:span ${e};min-height:0;grid-template-columns:minmax(0,1fr)`,b=["start","center","end"].map(l=>`${s} ${n}.${i[l]}{justify-items:${l}}`).join("");return`${s} :has(${n}){${a};row-gap:0}${s} ${n}{${a};justify-content:normal;align-items:stretch}${b}`}export{d as SHARED_COLUMNS_KEY,X as SHARED_COLUMNS_LABEL,m as SHARED_COLUMNS_OFF,z as SHARED_COLUMNS_PHONE_POINTS,q as SHARED_COLUMNS_POINTS,P as SHARED_PLAIN_ATTR,I as SHARED_ROWS_KEY,k as SHARED_ROWS_LIST_CLASS,Q as sharedColumnsClasses,V as sharedColumnsCss,J as sharedColumnsDrawn,L as sharedColumnsFits,tt as sharedRowsClasses,ot as sharedRowsCss,Z as sharedRowsDrawn,M as sharedRowsFits};
@@ -0,0 +1,3 @@
1
+ import { type SectionToBoxRow } from "../../../sections/section-to-box.js";
2
+ export declare const INTEGRATIONS_SECTION_TO_BOX: Readonly<Record<string, SectionToBoxRow>>;
3
+ export declare const integrationsPressStarter: () => Readonly<Record<string, unknown>>;
@@ -0,0 +1,2 @@
1
+ import{phoneKey as c}from"efficient-easel/draw";import{DIM as g,DROP_COMMON as d,DROP_SIDE_PADDING as h,INNER_BOX as o,SAME_KEYS as y,SECTION_BOX as m,TEXT as n,filledChip as k,surfaceAccent as i,wrapperPad as u,wrapperPadKeys as S}from"./section-to-box-row-parts.js";import{relaxedBodyLook as w,token as r}from"../../../../../format/lib/document/seed-parts.js";import{say as s}from"../../../../../format/lib/editor-words.js";import{loopSecondsOf as f}from"../../../../../format/lib/animation/loop.js";import{INTEGRATION_ROWS as b,dealRows as x,rowTurnSeconds as P}from"../../../../../format/lib/sections/integrations-rows.js";const l={top:76,bottom:76,topPhone:76,bottomPhone:76},A=e=>(Array.isArray(e.apps)?e.apps:[]).map(t=>t&&typeof t=="object"&&typeof t.text=="string"?t.text.trim():"").filter(Boolean),a=e=>x(A(e)),O=e=>f({loopDuration:P(e)}),N={kind:"group",name:"Header",props:{...o,align:"center",gap:20,gapPhone:20},parts:[{kind:"group",name:"Chip row",props:{...o,direction:"row",justify:"center",phoneRow:2,[c("share")]:"content"},parts:[k("eyebrow")]},{kind:"text",key:"title",role:"heading",props:{...n,align:"center"},style:{textStyle:"heading-2",...r("headingMedium",40,30),weight:500,case:"upper",lineHeight:1.04,letterSpacing:-.02}},{kind:"text",key:"body",props:{...g,align:"center",maxWidth:568},style:w(16)}]},_=e=>({kind:"group",name:`Row ${e+1}`,when:t=>a(t)[e].length>0,props:t=>({...o,direction:"row",gap:12,gapPhone:12,loop:"scroll",...e%2===1?{scrollDirection:"right"}:{},loopDuration:O(a(t)[e].length)}),parts:[{kind:"block",type:"Logos",props:{contained:!1,headPlacement:"own-box",look:"chips",grayscale:!1},slot:"logos",parts:[{kind:"list",key:"apps",name:"Logo",flat:!0,of:t=>a(t)[e].map(p=>({alt:p})),parts:[{kind:"block",type:"LogoBlock",box:["alt"]}]}]}]}),I={kind:"group",name:"Stat",props:{...o,align:"center",gap:16,gapPhone:16},parts:[{kind:"group",name:"Figure",props:{...o,align:"center",gap:8,gapPhone:8},parts:[{kind:"text",key:"statValue",props:{...n,align:"center"},style:{textStyle:"heading-1",...r("headingLarge",64,46),weight:500,case:"upper",lineHeight:1,color:"accent"}},{kind:"text",key:"statLabel",props:{...n,align:"center"},style:{textStyle:"heading-3",...r("headingSmall",18),weight:500,case:"upper",letterSpacing:.06}}]},{kind:"text",key:"note",props:{...n,align:"center",maxWidth:428},style:{textStyle:"body-1",...r("label",14),lineHeight:1.625,color:"muted"}}]},D=[...y.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,t,p)=>i(e,p)],...S(l)],E={name:"Integrations",boxProps:(e,t)=>({...m,sectionAccent:i(e.sectionAccent??0,t),direction:"column",gap:48,gapPhone:48,sectionBorder:{top:1,bottom:1},...u(e,l)}),box:D,parts:[N,{kind:"group",name:"Rows",props:{...o,gap:12,gapPhone:12},parts:Array.from({length:b},(e,t)=>_(t))},I],pressKeepsEmpty:["body","statValue","statLabel","note"],reads:{apps:"a Logo block per app, dealt into the three Rows"},drop:{...d,...h}},H={Integrations:E},K=()=>({eyebrow:s("Integrations"),title:s(`Plays well with
2
+ *your favourite apps.*`),apps:["Shopify","Xero","Stripe","Mailchimp","Zapier","HubSpot","QuickBooks","PayPal","Google Analytics"].map(e=>({text:e}))});export{H as INTEGRATIONS_SECTION_TO_BOX,K as integrationsPressStarter};
@@ -1 +1 @@
1
- import{hasWords as s}from"../../../sections/section-to-box.js";import{DIM as x,DROP_COMMON as g,DROP_SIDE_PADDING as h,INNER_BOX as r,SAME_KEYS as P,SECTION_BOX as f,TEXT as a,smallText as O,wrapperPad as i,wrapperPadKeys as _}from"./section-to-box-row-parts.js";import{finiteNumber as L}from"../../../../../format/lib/finite-number.js";import{markBoxProps as w,token as R}from"../../../../../format/lib/document/seed-parts.js";import{LOGOS_PH as A,logosScaffoldItems as B}from"../../../../../format/lib/document/blocks/general/Logos/meta.js";import{logosCardSeed as b}from"../../../../../format/lib/document/blocks/general/Logos/card-seed.js";import{PAYMENT_PH as N,paymentScaffoldAssurances as C,paymentScaffoldBadges as I}from"../../../../../format/lib/document/blocks/general/PaymentBadges/meta.js";import{BLOCK_SOURCE_OPTIONS_PROP as n,BLOCK_SOURCE_PROP as t}from"../../../../../format/lib/content/block-sources.js";import{CARD_TEMPLATE_SLOT as k}from"../../../../../format/lib/content/card-template.js";import{legacyBlockAlignOf as M}from"../../../../../format/lib/content/block-align.js";import{FOOTER_PAYMENT_SEED as H}from"../../../../../format/lib/content/footer.js";import{CELL_SPAN_KEYS as D}from"../../../../../format/lib/content/grid-span.js";import{SECTION_ACCENT_INHERIT as F}from"../../../../../format/lib/content/section-surface.js";import{FOOTER_MARK_SIZES as K,FOOTER_TEXT_PX as v}from"../../../../../format/lib/document/box-footer.js";import{phoneKey as d,readHidable as X}from"efficient-easel/draw";const l={contained:!1},p=(o,e)=>({logos:[{kind:"list",key:o,name:"Logo",flat:!0,parts:[{kind:"block",type:"LogoBlock",box:["src",[e,"alt"]],when:(W,m)=>s(m?.src)||s(m?.[e])}]}]}),c=o=>{const e=L(o.bandPadding)??40;return{top:e,bottom:e,topPhone:e,bottomPhone:e}},Y={...O("heading",{color:"labels",letterSpacing:.2}),props:{...a,align:"center"}},z={name:"Logos",boxProps:o=>({...f,direction:"column",gap:32,...i(o,c(o))}),box:[...P,..._(c),["bandPadding","sectionPaddingTop",(o,e)=>i(e,c(e)).sectionPaddingTop]],parts:[Y,{kind:"core",keep:["columns","logoHeight","grayscale"],rename:{logosPerRow:"columns"},props:l,slots:p("items","alt")}],drop:{...g,...h,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)",headPlacement:"a Logos band has no split head (not in SPLITTABLE_SECTIONS): no stored node can hold one, and the converted block stores own-box"}},G={kind:"group",name:"Mark",keepEmpty:!0,parts:[],props:w(4,"main",{sectionCorners:2})},E={top:24,bottom:24,topPhone:24,bottomPhone:24},j={name:"Payment Methods",boxProps:o=>({...f,direction:"column",...i(o,E)}),box:[...P,..._(E)],parts:[{kind:"group",name:"Methods",props:{...r,align:"center",gap:20,gapPhone:20,sectionBorder:{top:1,bottom:1},sectionPaddingTop:32,sectionPaddingBottom:32},parts:[{...O("heading",{color:"labels"}),props:{...a,align:"center"}},{kind:"core",keep:[],as:"Logos",derive:{reads:[t,n],props:o=>s(o[t])?{[t]:o[t],...o[n]!==void 0?{[n]:o[n]}:{}}:{}},props:{...l,look:"cards",grayscale:!1},slots:o=>({...p("badges","label"),...s(o[t])?{[k]:[b()]}:{}})},{kind:"group",name:"Reassurance",props:{...r,direction:"row",wrap:!0,justify:"center",gap:24,gapPhone:24,phoneRow:2,[d("share")]:"content"},parts:[{kind:"list",key:"assurances",name:"Line",of:o=>(Array.isArray(o.assurances)?o.assurances:[]).filter(e=>s(e?.text)),props:{...r,direction:"row",align:"center",gap:8,gapPhone:8,phoneRow:2,[d("share")]:"content"},item:o=>X(o.text).hidden?{props:{_hidden:!0}}:{},parts:[G,{kind:"text",key:"text",props:{...a,align:"center"},style:{...R("label",13),color:"labels",lineHeight:1.5}}]}]}]}],drop:{...g,...h,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)"}},U={left:"start",center:"center",right:"end"},S=o=>M(o.align)??"left",T=o=>o.size==="md"?"md":"sm",y=12,u={name:"Payment logos",boxProps:o=>({...r,direction:"row",wrap:!0,align:"center",justify:U[S(o)],gap:y,gapPhone:y,phoneRow:2,[d("share")]:"content"}),box:[...D],parts:[{kind:"text",key:"lead",props:x,styleFrom:o=>({size:v[T(o)],lineHeight:1.5})},{kind:"core",keep:[],as:"Logos",derive:{reads:[t,n],props:o=>({logoHeight:K[T(o)].mark,align:S(o),...s(o[t])?{[t]:o[t],...o[n]!==void 0?{[n]:o[n]}:{}}:{}})},props:{...l,look:"marks",grayscale:!1,sectionAccent:F},slots:o=>({...p("methods","label"),...s(o[t])?{[k]:[b()]}:{}})}],drop:{size:"read as the wall's Logo height (S 16, M 20) and the lead's size (the footer size table, 12 / 13)",align:"read as the Box's justify and the wall's own Alignment (start is left, end is right)",editing:"the editor's preview flag, never a stored setting: the editor tells every block it is editing"}},po={Logos:z,PaymentBadges:j,FooterPayment:u,PaymentLogosBlock:u},co=()=>({heading:A.heading,items:B()}),mo=()=>({heading:N.heading,badges:I(),assurances:C()}),go=()=>({...H,methods:[]});export{po as LOGOS_SECTION_TO_BOX,go as footerPaymentPressStarter,co as logosPressStarter,mo as paymentPressStarter};
1
+ import{hasWords as s}from"../../../sections/section-to-box.js";import{DIM as L,DROP_COMMON as g,DROP_SIDE_PADDING as h,INNER_BOX as r,SAME_KEYS as P,SECTION_BOX as f,TEXT as a,smallText as O,wrapperPad as i,wrapperPadKeys as _}from"./section-to-box-row-parts.js";import{finiteNumber as x}from"../../../../../format/lib/finite-number.js";import{markBoxProps as w,token as A}from"../../../../../format/lib/document/seed-parts.js";import{LOGOS_PH as R,logosScaffoldItems as B}from"../../../../../format/lib/document/blocks/general/Logos/meta.js";import{logosCardSeed as b}from"../../../../../format/lib/document/blocks/general/Logos/card-seed.js";import{PAYMENT_PH as N,paymentScaffoldAssurances as C,paymentScaffoldBadges as I}from"../../../../../format/lib/document/blocks/general/PaymentBadges/meta.js";import{BLOCK_SOURCE_OPTIONS_PROP as n,BLOCK_SOURCE_PROP as t}from"../../../../../format/lib/content/block-sources.js";import{CARD_TEMPLATE_SLOT as k}from"../../../../../format/lib/content/card-template.js";import{BLOCK_ALIGN_BOX_WORD as M,legacyBlockAlignOf as D}from"../../../../../format/lib/content/block-align.js";import{FOOTER_PAYMENT_SEED as H}from"../../../../../format/lib/content/footer.js";import{CELL_SPAN_KEYS as K}from"../../../../../format/lib/content/grid-span.js";import{SECTION_ACCENT_INHERIT as X}from"../../../../../format/lib/content/section-surface.js";import{FOOTER_MARK_SIZES as v,FOOTER_TEXT_PX as z}from"../../../../../format/lib/document/box-footer.js";import{phoneKey as d,readHidable as F}from"efficient-easel/draw";const l={contained:!1},p=(o,e)=>({logos:[{kind:"list",key:o,name:"Logo",flat:!0,parts:[{kind:"block",type:"LogoBlock",box:["src",[e,"alt"]],when:(U,m)=>s(m?.src)||s(m?.[e])}]}]}),c=o=>{const e=x(o.bandPadding)??40;return{top:e,bottom:e,topPhone:e,bottomPhone:e}},G={...O("heading",{color:"labels",letterSpacing:.2}),props:{...a,align:"center"}},Y={name:"Logos",boxProps:o=>({...f,direction:"column",gap:32,...i(o,c(o))}),box:[...P,..._(c),["bandPadding","sectionPaddingTop",(o,e)=>i(e,c(e)).sectionPaddingTop]],parts:[G,{kind:"core",keep:["columns","logoHeight","grayscale"],rename:{logosPerRow:"columns"},props:l,slots:p("items","alt")}],drop:{...g,...h,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)",headPlacement:"a Logos band has no split head (not in SPLITTABLE_SECTIONS): no stored node can hold one, and the converted block stores own-box"}},j={kind:"group",name:"Mark",keepEmpty:!0,parts:[],props:w(4,"main",{sectionCorners:2})},E={top:24,bottom:24,topPhone:24,bottomPhone:24},W={name:"Payment Methods",boxProps:o=>({...f,direction:"column",...i(o,E)}),box:[...P,..._(E)],parts:[{kind:"group",name:"Methods",props:{...r,align:"center",gap:20,gapPhone:20,sectionBorder:{top:1,bottom:1},sectionPaddingTop:32,sectionPaddingBottom:32},parts:[{...O("heading",{color:"labels"}),props:{...a,align:"center"}},{kind:"core",keep:[],as:"Logos",derive:{reads:[t,n],props:o=>s(o[t])?{[t]:o[t],...o[n]!==void 0?{[n]:o[n]}:{}}:{}},props:{...l,look:"cards",grayscale:!1},slots:o=>({...p("badges","label"),...s(o[t])?{[k]:[b()]}:{}})},{kind:"group",name:"Reassurance",props:{...r,direction:"row",wrap:!0,justify:"center",gap:24,gapPhone:24,phoneRow:2,[d("share")]:"content"},parts:[{kind:"list",key:"assurances",name:"Line",of:o=>(Array.isArray(o.assurances)?o.assurances:[]).filter(e=>s(e?.text)),props:{...r,direction:"row",align:"center",gap:8,gapPhone:8,phoneRow:2,[d("share")]:"content"},item:o=>F(o.text).hidden?{props:{_hidden:!0}}:{},parts:[j,{kind:"text",key:"text",props:{...a,align:"center"},style:{...A("label",13),color:"labels",lineHeight:1.5}}]}]}]}],drop:{...g,...h,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)"}},S=o=>D(o.align)??"left",T=o=>o.size==="md"?"md":"sm",y=12,u={name:"Payment logos",boxProps:o=>({...r,direction:"row",wrap:!0,align:"center",justify:M[S(o)],gap:y,gapPhone:y,phoneRow:2,[d("share")]:"content"}),box:[...K],parts:[{kind:"text",key:"lead",props:L,styleFrom:o=>({size:z[T(o)],lineHeight:1.5})},{kind:"core",keep:[],as:"Logos",derive:{reads:[t,n],props:o=>({logoHeight:v[T(o)].mark,align:S(o),...s(o[t])?{[t]:o[t],...o[n]!==void 0?{[n]:o[n]}:{}}:{}})},props:{...l,look:"marks",grayscale:!1,sectionAccent:X},slots:o=>({...p("methods","label"),...s(o[t])?{[k]:[b()]}:{}})}],drop:{size:"read as the wall's Logo height (S 16, M 20) and the lead's size (the footer size table, 12 / 13)",align:"read as the Box's justify and the wall's own Alignment (start is left, end is right)",editing:"the editor's preview flag, never a stored setting: the editor tells every block it is editing"}},po={Logos:Y,PaymentBadges:W,FooterPayment:u,PaymentLogosBlock:u},co=()=>({heading:R.heading,items:B()}),mo=()=>({heading:N.heading,badges:I(),assurances:C()}),go=()=>({...H,methods:[]});export{po as LOGOS_SECTION_TO_BOX,go as footerPaymentPressStarter,co as logosPressStarter,mo as paymentPressStarter};
@@ -1 +1 @@
1
- import{DIM as g,DROP_COMMON as n,DROP_SIDE_PADDING as s,FOLLOW_THE_BOX as a,INNER_BOX as o,SAME_KEYS as _,SECTION_BOX as k,TEXT as y,filledChip as u,smallText as P,surfaceAccent as c,wrapperPad as C,wrapperPadKeys as b}from"./section-to-box-row-parts.js";import{token as r}from"../../../../../format/lib/document/seed-parts.js";import{phoneKey as E}from"efficient-easel/draw";import{CHART_OWN_BOX_WORDS as x}from"../../../../../format/lib/document/blocks/general/Chart/meta.js";import{MOCKUP_OWN_BOX_WORDS as S}from"../../../../../format/lib/document/blocks/general/Mockup/meta.js";const i={top:76,bottom:76,topPhone:76,bottomPhone:76},d=()=>({kind:"group",name:"Words",props:{...o,gap:20,gapPhone:20},parts:[{kind:"group",name:"Chip row",props:{...o,direction:"row",phoneRow:2,[E("share")]:"content"},parts:[u("eyebrow")]},{kind:"text",key:"title",role:"heading",props:y,style:{textStyle:"heading-2",...r("headingMedium",44,32),weight:500,case:"upper",lineHeight:1.04,letterSpacing:-.02}},{kind:"text",key:"body",props:{...g,maxWidth:435},style:{textStyle:"body-1",...r("body",15),lineHeight:1.625}}]}),m=e=>(t,p)=>({...k,sectionAccent:c(t.sectionAccent??0,p),direction:"row",align:"center",gap:56,gapPhone:56,share:e,sectionBorder:{top:1,bottom:1},...C(t,i)}),O=[..._.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,t,p)=>c(e,p)],...b(i)],f=()=>({name:"Chart",boxProps:m([42]),box:O,parts:[d(),{kind:"group",name:"Chart",props:{...o,gap:16,gapPhone:16},keepEmpty:!0,parts:[{kind:"core",keep:"rest",props:a},P("caption",{color:"muted",...r("label",10),letterSpacing:.14})]}],pressKeepsEmpty:[...x],drop:{...n,...s}}),h=e=>e.align==="left",l={kind:"group",name:"Card",keepEmpty:!0,props:o,parts:[{kind:"core",keep:"rest",props:a}]},w=()=>({name:"Mockup Card",boxProps:m("equal"),box:O,parts:[{...l,when:h},d(),{...l,when:e=>!h(e)}],pressKeepsEmpty:[...S],drop:{...n,...s}}),M={Chart:f(),Mockup:w()};export{M as PROOF_SECTION_TO_BOX};
1
+ import{DIM as k,DROP_COMMON as r,DROP_SIDE_PADDING as n,FOLLOW_THE_BOX as s,INNER_BOX as o,SAME_KEYS as _,SECTION_BOX as g,TEXT as u,filledChip as y,smallText as P,surfaceAccent as a,wrapperPad as C,wrapperPadKeys as E}from"./section-to-box-row-parts.js";import{relaxedBodyLook as x,token as c}from"../../../../../format/lib/document/seed-parts.js";import{phoneKey as b}from"efficient-easel/draw";import{CHART_OWN_BOX_WORDS as S}from"../../../../../format/lib/document/blocks/general/Chart/meta.js";import{MOCKUP_OWN_BOX_WORDS as f}from"../../../../../format/lib/document/blocks/general/Mockup/meta.js";const i={top:76,bottom:76,topPhone:76,bottomPhone:76},d=()=>({kind:"group",name:"Words",props:{...o,gap:20,gapPhone:20},parts:[{kind:"group",name:"Chip row",props:{...o,direction:"row",phoneRow:2,[b("share")]:"content"},parts:[y("eyebrow")]},{kind:"text",key:"title",role:"heading",props:u,style:{textStyle:"heading-2",...c("headingMedium",44,32),weight:500,case:"upper",lineHeight:1.04,letterSpacing:-.02}},{kind:"text",key:"body",props:{...k,maxWidth:435},style:x(16)}]}),m=e=>(t,p)=>({...g,sectionAccent:a(t.sectionAccent??0,p),direction:"row",align:"center",gap:56,gapPhone:56,share:e,sectionBorder:{top:1,bottom:1},...C(t,i)}),O=[..._.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,t,p)=>a(e,p)],...E(i)],w=()=>({name:"Chart",boxProps:m([42]),box:O,parts:[d(),{kind:"group",name:"Chart",props:{...o,gap:16,gapPhone:16},keepEmpty:!0,parts:[{kind:"core",keep:"rest",props:s},P("caption",{color:"muted",...c("label",10),letterSpacing:.14})]}],pressKeepsEmpty:[...S],drop:{...r,...n}}),h=e=>e.align==="left",l={kind:"group",name:"Card",keepEmpty:!0,props:o,parts:[{kind:"core",keep:"rest",props:s}]},A=()=>({name:"Mockup Card",boxProps:m("equal"),box:O,parts:[{...l,when:h},d(),{...l,when:e=>!h(e)}],pressKeepsEmpty:[...f],drop:{...r,...n}}),T={Chart:w(),Mockup:A()};export{T as PROOF_SECTION_TO_BOX};
@@ -1 +1 @@
1
- import{hasWords as X,registerSectionToBox as t}from"../../../sections/section-to-box.js";import{BUTTON as T,DIM as S,DROP_COMMON as s,DROP_SIDE_PADDING as P,INNER_BOX as o,leadLine as D,SAME_KEYS as d,SECTION_BOX as p,TEXT as l,innerPad as y,siteGutterOf as w,innerPadKeys as B,smallText as O,wrapperPad as u,wrapperPadKeys as _}from"./section-to-box-row-parts.js";import{CARDS_SECTION_TO_BOX as W}from"./section-to-box-rows-cards.js";import{storedUnit as k}from"../../../../../format/lib/content/css-length.js";import{finiteNumber as M}from"../../../../../format/lib/finite-number.js";import{STATS_SECTION_TO_BOX as U}from"./section-to-box-rows-stats.js";import{LOGOS_SECTION_TO_BOX as F}from"./section-to-box-rows-logos.js";import{STRIP_SECTION_TO_BOX as G}from"./section-to-box-rows-strip.js";import{TIMELINE_SECTION_TO_BOX as K}from"./section-to-box-rows-timeline.js";import{LOCATIONS_SECTION_TO_BOX as Y}from"./section-to-box-rows-locations.js";import{HEAD_ONLY_SECTION_TO_BOX as j}from"./section-to-box-rows-head.js";import{PAGE_HEADER_SECTION_TO_BOX as z}from"./section-to-box-rows-pageheader.js";import{TAB_BAR_SECTION_TO_BOX as q}from"./section-to-box-rows-tabbar.js";import{DOCBODY_SECTION_TO_BOX as J}from"./section-to-box-rows-docbody.js";import{EDITORIAL_SECTION_TO_BOX as Q}from"./section-to-box-rows-editorial.js";import{FORMS_SECTION_TO_BOX as V}from"./section-to-box-rows-forms.js";import{CHECKOUT_SECTION_TO_BOX as Z}from"./section-to-box-rows-checkout.js";import{PROOF_SECTION_TO_BOX as $}from"./section-to-box-rows-proof.js";import{PROMO_SECTION_TO_BOX as ee}from"./section-to-box-rows-promo.js";import{FITMENT_SECTION_TO_BOX as te}from"./section-to-box-rows-fitment.js";import{fluidToken as oe,headTree as E,token as i}from"./section-head-looks.js";import{CTA_PH as b,PH as ne,phAccentAsMarks as m}from"../../../../../format/lib/document/blocks/placeholders.js";import{PROSE_PH as f}from"../../../../../format/lib/document/blocks/general/Prose/meta.js";import{PARAGRAPHS_A_PH as g}from"../../../../../format/lib/document/blocks/general/ParagraphsA/meta.js";import{BANNER_PH as ie}from"../../../../../format/lib/document/blocks/general/Banner/meta.js";import{TITLE_WITH_BUTTONS_PH as re,TITLE_WITH_BUTTONS_SCAFFOLD_BUTTONS as ae}from"../../../../../format/lib/document/blocks/general/TitleWithButtons/meta.js";import{SECTION_HEADER_PH as a}from"../../../../../format/lib/document/blocks/general/SectionHeader/meta.js";import{boxPadding as se,fillSlot as de}from"../../../../../format/lib/document/seed-parts.js";const x={top:72,bottom:72,topPhone:72,bottomPhone:72},pe={name:"Editorial Text",boxProps:e=>({...p,direction:"column",gap:28,gapPhone:28,sectionBorder:{top:1},...u(e,x)}),box:[["topBorder","sectionBorder",e=>e===!1?void 0:{top:1}],...d,..._(x)],parts:[E("Prose"),{kind:"text",key:"body",props:S,style:{textStyle:"body-1",...i("body",16),lineHeight:1.7,paragraphSpacing:18}}],drop:{...s,...P,headPlacement:"needs a row per head placement: an own-box Prose draws no head (its words sit in a Section Header above it), the row always draws the head. 0 of 123 live nodes store it (the live export, 2026-10-24)"}},N={buttonPaddingTop:20,buttonPaddingBottom:20,buttonPaddingLeft:28,buttonPaddingRight:28},I=(e,n)=>n?.variant==="primary",H=(e,n)=>({kind:"list",key:"buttons",name:"Button",flat:!0,when:e,parts:[{kind:"button",key:"label",href:"href",when:I,variant:"primary",style:{letterSpacing:.3},props:{...T,...N,...n}},{kind:"button",key:"label",href:"href",when:(r,h)=>!I(r,h),variant:"ghost",style:{letterSpacing:.3},props:{...T,...N,...n}}]}),c=e=>X(e.title),le={name:"Call-to-Action Heading",boxProps:e=>({...p,direction:"row",align:"center",justify:c(e)?"between":"end",gap:60,gapPhone:60,share:"content",sectionBorder:{bottom:1},...y(e,"TitleWithButtons")}),box:[...d,...B("TitleWithButtons")],parts:[{kind:"group",name:"Title",props:{...o,maxWidth:1e3,widthFitPhone:"fill"},parts:[{kind:"text",key:"title",role:"heading",props:l,style:{textStyle:"heading-1",...oe("headingLarge",48,7,108),case:"upper",lineHeight:.94,letterSpacing:-.035},mark:"accentItalic"}]},{kind:"group",name:"Buttons",props:e=>({...o,gap:14,gapPhone:14,widthFitPhone:"fill",...c(e)?{minWidth:280,minWidthPhone:0}:{}}),parts:[H(c,{widthFit:"fill",iconPosition:"end"}),H(e=>!c(e),{})]}],drop:{...s,buttonsAlign:"moves the buttons only when there is no heading (4 of 128 live nodes), where the Box puts them at the end. 0 of 128 live nodes store it (the live export, 2026-10-24)",buttonsAlignPhone:"the phone's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Phone view's Block alignment row), so nothing moves",buttonsAlignTablet:"the tablet's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Tablet view's Block alignment row, 0 stored on the US sites 2026-11-05), so nothing moves"}};function he(e,n){const r=w(n,{to:k(e.sectionPaddingUnit)}),h=w(n,{view:"phone",to:k(e.sectionPaddingUnitPhone),maxPx:20});return{sectionPaddingLeft:r,sectionPaddingRight:r,sectionPaddingLeftPhone:h,sectionPaddingRightPhone:h}}const A={top:40,bottom:64,topPhone:24,bottomPhone:36},me={name:"Section Header",boxProps:(e,n)=>({...p,direction:"column",gap:0,...u(e,A),...he(e,n)}),box:[...d,..._(A)],parts:[E("SectionHeader")],drop:{...s,...P,headStyle:"needs a row per head look: the row draws the standard look; the editorial, simple, statement, natural and essay looks are other layouts. 0 of 69 live nodes store it (the live export, 2026-10-24)",eyebrowLook:"read only by the simple, statement, natural and essay looks, which this row does not draw. 0 of 69 live nodes store it",rowGap:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",descriptionSize:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",numStyle:"Solid (the default; 4 of 69 live nodes store it) IS the eyebrow Text the row draws; Outlined (0 live) needs an outlined-number text look"}},R={...o,direction:"row",share:[67],gap:32},C={...o,sectionPaddingLeft:24,sectionPaddingLeftPhone:0},v=(e,n,r)=>({kind:"group",name:e,props:n,parts:[r]}),ge={name:"Lead Text",boxProps:e=>({...p,direction:"column",gap:40,gapPhone:40,sectionBorder:{bottom:1},...y(e,"ParagraphsA")}),box:[...d,...B("ParagraphsA")],parts:[{kind:"group",name:"Numbers",props:{...R,gapPhone:24,sectionBorder:{bottom:1},sectionPaddingBottom:40,sectionPaddingBottomPhone:40},parts:[{kind:"group",name:"Eyebrow",props:{...o,sectionPaddingTop:5,sectionPaddingBottom:1,sectionPaddingTopPhone:5,sectionPaddingBottomPhone:1},parts:[O("eyebrow",{color:"labels",...i("label",12),letterSpacing:.24})]},v("Stats column",o,{kind:"group",name:"Stats",props:{...C,gap:0,gapPhone:0},parts:[{kind:"list",key:"stats",name:"Stat",flat:!0,parts:[D("value","label",{...i("label",13),letterSpacing:.18,lineHeight:1.8})]}]})]},{kind:"group",name:"Words",props:{...R,gapPhone:28},parts:[{kind:"group",name:"Lead",props:o,parts:[{kind:"group",name:"Measure",props:{...o,maxWidth:780},parts:[{kind:"text",key:"lead",props:l,style:{textStyle:"heading-3",...i("headingSmall",22,20),weight:400,case:"none",lineHeight:1.45,letterSpacing:-.005}}]}]},v("Note column",{...o,justify:"end"},{kind:"group",name:"Founders",props:{...C,gap:8,gapPhone:8},parts:[{kind:"group",name:"Note",props:{...o,gap:6,gapPhone:6},parts:[{kind:"text",key:"foundersHeading",props:l,style:{textStyle:"body-1",fontRole:"heading",...i("body",18,16),weight:500,letterSpacing:-.01,lineHeight:1.7}},{kind:"text",key:"foundersBody",props:S,style:{textStyle:"body-5",fontRole:"heading",...i("body",14,12),lineHeight:1.7}}]},O("attribution",{...i("label",12,10),letterSpacing:.24,lineHeight:1.7})]})]}],drop:{...s}},L={top:24,bottom:24,topPhone:24,bottomPhone:24},ce={name:"Banner",boxProps:e=>({...p,direction:"column",gap:0,...u(e,L)}),box:[...d,"contained",..._(L)],parts:[{kind:"group",name:"Card",keepEmpty:!0,props:{...o,gap:28,gapPhone:28,placement:"top-left",darken:60,darkenStyle:"even",sectionBorder:{width:1},...de("surface"),...se(64,40,40,24)},box:[["imageSrc","bgImage"],["overlay","darken",e=>Math.min(Math.max(M(e)??60,0),100)]],parts:[{kind:"group",name:"Words",props:{...o,gap:20,gapPhone:20},parts:[O("eyebrow"),{kind:"text",key:"title",role:"heading",props:{...l,maxWidth:680},style:{weight:500,lineHeight:1.05,letterSpacing:-.03,case:"none",...i("headingMedium",44,32)}},{kind:"text",key:"body",props:{...l,maxWidth:680},style:{textStyle:"body-1",lineHeight:1.6,...i("body",16)}}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:T}]}],drop:{...s,...P}},Te={Prose:pe,TitleWithButtons:le,SectionHeader:me,ParagraphsA:ge,Banner:ce},Ke={Prose:()=>({eyebrow:f.eyebrow,title:m(f.title),body:f.body}),TitleWithButtons:()=>({title:m(re.title),buttons:ae.map(e=>({...e}))}),SectionHeader:()=>({num:a.num,title:m(a.title),description:a.description,linkText:a.linkText,linkHref:b.href}),ParagraphsA:()=>({eyebrow:g.eyebrow,lead:ne.body,foundersHeading:g.foundersHeading,foundersBody:g.foundersBody,attribution:g.attribution}),Banner:()=>({...ie,ctaText:b.text,ctaHref:b.href}),ProcessSteps:()=>({num:a.num,title:m(a.title)})};function Ye(){t(Te),t(U),t(F),t(W),t(G),t(K),t(Y),t(j),t(z),t(q),t(J),t(Q),t(V),t(Z),t(te),t($),t(ee)}export{Te as GENERAL_SECTION_TO_BOX,Ke as TEXT_PRESS_STARTERS,Ye as registerGeneralSectionRows};
1
+ import{hasWords as L,registerSectionToBox as t}from"../../../sections/section-to-box.js";import{BUTTON as T,DIM as f,DROP_COMMON as s,DROP_SIDE_PADDING as O,INNER_BOX as o,leadLine as D,SAME_KEYS as d,SECTION_BOX as p,TEXT as l,innerPad as y,siteGutterOf as w,innerPadKeys as B,smallText as P,wrapperPad as _,wrapperPadKeys as u}from"./section-to-box-row-parts.js";import{CARDS_SECTION_TO_BOX as W}from"./section-to-box-rows-cards.js";import{storedUnit as k}from"../../../../../format/lib/content/css-length.js";import{finiteNumber as M}from"../../../../../format/lib/finite-number.js";import{STATS_SECTION_TO_BOX as G}from"./section-to-box-rows-stats.js";import{LOGOS_SECTION_TO_BOX as U}from"./section-to-box-rows-logos.js";import{STRIP_SECTION_TO_BOX as F}from"./section-to-box-rows-strip.js";import{TIMELINE_SECTION_TO_BOX as K}from"./section-to-box-rows-timeline.js";import{LOCATIONS_SECTION_TO_BOX as Y}from"./section-to-box-rows-locations.js";import{HEAD_ONLY_SECTION_TO_BOX as j}from"./section-to-box-rows-head.js";import{PAGE_HEADER_SECTION_TO_BOX as z}from"./section-to-box-rows-pageheader.js";import{TAB_BAR_SECTION_TO_BOX as q}from"./section-to-box-rows-tabbar.js";import{DOCBODY_SECTION_TO_BOX as J}from"./section-to-box-rows-docbody.js";import{EDITORIAL_SECTION_TO_BOX as Q}from"./section-to-box-rows-editorial.js";import{FORMS_SECTION_TO_BOX as V}from"./section-to-box-rows-forms.js";import{CHECKOUT_SECTION_TO_BOX as Z}from"./section-to-box-rows-checkout.js";import{PROOF_SECTION_TO_BOX as $}from"./section-to-box-rows-proof.js";import{INTEGRATIONS_SECTION_TO_BOX as ee}from"./section-to-box-rows-integrations.js";import{PROMO_SECTION_TO_BOX as te}from"./section-to-box-rows-promo.js";import{FITMENT_SECTION_TO_BOX as oe}from"./section-to-box-rows-fitment.js";import{fluidToken as ne,headTree as E,token as i}from"./section-head-looks.js";import{CTA_PH as b,PH as ie,phAccentAsMarks as m}from"../../../../../format/lib/document/blocks/placeholders.js";import{PROSE_PH as S}from"../../../../../format/lib/document/blocks/general/Prose/meta.js";import{PARAGRAPHS_A_PH as g}from"../../../../../format/lib/document/blocks/general/ParagraphsA/meta.js";import{BANNER_PH as re}from"../../../../../format/lib/document/blocks/general/Banner/meta.js";import{TITLE_WITH_BUTTONS_PH as ae,TITLE_WITH_BUTTONS_SCAFFOLD_BUTTONS as se}from"../../../../../format/lib/document/blocks/general/TitleWithButtons/meta.js";import{SECTION_HEADER_PH as a}from"../../../../../format/lib/document/blocks/general/SectionHeader/meta.js";import{boxPadding as de,fillSlot as pe}from"../../../../../format/lib/document/seed-parts.js";const x={top:72,bottom:72,topPhone:72,bottomPhone:72},le={name:"Editorial Text",boxProps:e=>({...p,direction:"column",gap:28,gapPhone:28,sectionBorder:{top:1},..._(e,x)}),box:[["topBorder","sectionBorder",e=>e===!1?void 0:{top:1}],...d,...u(x)],parts:[E("Prose"),{kind:"text",key:"body",props:f,style:{textStyle:"body-1",...i("body",16),lineHeight:1.7,paragraphSpacing:18}}],drop:{...s,...O,headPlacement:"needs a row per head placement: an own-box Prose draws no head (its words sit in a Section Header above it), the row always draws the head. 0 of 123 live nodes store it (the live export, 2026-10-24)"}},N={buttonPaddingTop:20,buttonPaddingBottom:20,buttonPaddingLeft:28,buttonPaddingRight:28},I=(e,n)=>n?.variant==="primary",A=(e,n)=>({kind:"list",key:"buttons",name:"Button",flat:!0,when:e,parts:[{kind:"button",key:"label",href:"href",when:I,variant:"primary",style:{letterSpacing:.3},props:{...T,...N,...n}},{kind:"button",key:"label",href:"href",when:(r,h)=>!I(r,h),variant:"ghost",style:{letterSpacing:.3},props:{...T,...N,...n}}]}),c=e=>L(e.title),he={name:"Call-to-Action Heading",boxProps:e=>({...p,direction:"row",align:"center",justify:c(e)?"between":"end",gap:60,gapPhone:60,share:"content",sectionBorder:{bottom:1},...y(e,"TitleWithButtons")}),box:[...d,...B("TitleWithButtons")],parts:[{kind:"group",name:"Title",props:{...o,maxWidth:1e3,widthFitPhone:"fill"},parts:[{kind:"text",key:"title",role:"heading",props:l,style:{textStyle:"heading-1",...ne("headingLarge",48,7,108),case:"upper",lineHeight:.94,letterSpacing:-.035},mark:"accentItalic"}]},{kind:"group",name:"Buttons",props:e=>({...o,gap:14,gapPhone:14,widthFitPhone:"fill",...c(e)?{minWidth:280,minWidthPhone:0}:{}}),parts:[A(c,{widthFit:"fill",iconPosition:"end"}),A(e=>!c(e),{})]}],drop:{...s,buttonsAlign:"moves the buttons only when there is no heading (4 of 128 live nodes), where the Box puts them at the end. 0 of 128 live nodes store it (the live export, 2026-10-24)",buttonsAlignPhone:"the phone's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Phone view's Block alignment row), so nothing moves",buttonsAlignTablet:"the tablet's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Tablet view's Block alignment row, 0 stored on the US sites 2026-11-05), so nothing moves"}};function me(e,n){const r=w(n,{to:k(e.sectionPaddingUnit)}),h=w(n,{view:"phone",to:k(e.sectionPaddingUnitPhone),maxPx:20});return{sectionPaddingLeft:r,sectionPaddingRight:r,sectionPaddingLeftPhone:h,sectionPaddingRightPhone:h}}const H={top:40,bottom:64,topPhone:24,bottomPhone:36},ge={name:"Section Header",boxProps:(e,n)=>({...p,direction:"column",gap:0,..._(e,H),...me(e,n)}),box:[...d,...u(H)],parts:[E("SectionHeader")],drop:{...s,...O,headStyle:"needs a row per head look: the row draws the standard look; the editorial, simple, statement, natural and essay looks are other layouts. 0 of 69 live nodes store it (the live export, 2026-10-24)",eyebrowLook:"read only by the simple, statement, natural and essay looks, which this row does not draw. 0 of 69 live nodes store it",rowGap:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",descriptionSize:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",numStyle:"Solid (the default; 4 of 69 live nodes store it) IS the eyebrow Text the row draws; Outlined (0 live) needs an outlined-number text look"}},R={...o,direction:"row",share:[67],gap:32},C={...o,sectionPaddingLeft:24,sectionPaddingLeftPhone:0},v=(e,n,r)=>({kind:"group",name:e,props:n,parts:[r]}),ce={name:"Lead Text",boxProps:e=>({...p,direction:"column",gap:40,gapPhone:40,sectionBorder:{bottom:1},...y(e,"ParagraphsA")}),box:[...d,...B("ParagraphsA")],parts:[{kind:"group",name:"Numbers",props:{...R,gapPhone:24,sectionBorder:{bottom:1},sectionPaddingBottom:40,sectionPaddingBottomPhone:40},parts:[{kind:"group",name:"Eyebrow",props:{...o,sectionPaddingTop:5,sectionPaddingBottom:1,sectionPaddingTopPhone:5,sectionPaddingBottomPhone:1},parts:[P("eyebrow",{color:"labels",...i("label",12),letterSpacing:.24})]},v("Stats column",o,{kind:"group",name:"Stats",props:{...C,gap:0,gapPhone:0},parts:[{kind:"list",key:"stats",name:"Stat",flat:!0,parts:[D("value","label",{...i("label",13),letterSpacing:.18,lineHeight:1.8})]}]})]},{kind:"group",name:"Words",props:{...R,gapPhone:28},parts:[{kind:"group",name:"Lead",props:o,parts:[{kind:"group",name:"Measure",props:{...o,maxWidth:780},parts:[{kind:"text",key:"lead",props:l,style:{textStyle:"heading-3",...i("headingSmall",22,20),weight:400,case:"none",lineHeight:1.45,letterSpacing:-.005}}]}]},v("Note column",{...o,justify:"end"},{kind:"group",name:"Founders",props:{...C,gap:8,gapPhone:8},parts:[{kind:"group",name:"Note",props:{...o,gap:6,gapPhone:6},parts:[{kind:"text",key:"foundersHeading",props:l,style:{textStyle:"body-1",fontRole:"heading",...i("body",18,16),weight:500,letterSpacing:-.01,lineHeight:1.7}},{kind:"text",key:"foundersBody",props:f,style:{textStyle:"body-5",fontRole:"heading",...i("body",14,12),lineHeight:1.7}}]},P("attribution",{...i("label",12,10),letterSpacing:.24,lineHeight:1.7})]})]}],drop:{...s}},X={top:24,bottom:24,topPhone:24,bottomPhone:24},Te={name:"Banner",boxProps:e=>({...p,direction:"column",gap:0,..._(e,X)}),box:[...d,"contained",...u(X)],parts:[{kind:"group",name:"Card",keepEmpty:!0,props:{...o,gap:28,gapPhone:28,placement:"top-left",darken:60,darkenStyle:"even",sectionBorder:{width:1},...pe("surface"),...de(64,40,40,24)},box:[["imageSrc","bgImage"],["overlay","darken",e=>Math.min(Math.max(M(e)??60,0),100)]],parts:[{kind:"group",name:"Words",props:{...o,gap:20,gapPhone:20},parts:[P("eyebrow"),{kind:"text",key:"title",role:"heading",props:{...l,maxWidth:680},style:{weight:500,lineHeight:1.05,letterSpacing:-.03,case:"none",...i("headingMedium",44,32)}},{kind:"text",key:"body",props:{...l,maxWidth:680},style:{textStyle:"body-1",lineHeight:1.6,...i("body",16)}}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:T}]}],drop:{...s,...O}},Oe={Prose:le,TitleWithButtons:he,SectionHeader:ge,ParagraphsA:ce,Banner:Te},je={Prose:()=>({eyebrow:S.eyebrow,title:m(S.title),body:S.body}),TitleWithButtons:()=>({title:m(ae.title),buttons:se.map(e=>({...e}))}),SectionHeader:()=>({num:a.num,title:m(a.title),description:a.description,linkText:a.linkText,linkHref:b.href}),ParagraphsA:()=>({eyebrow:g.eyebrow,lead:ie.body,foundersHeading:g.foundersHeading,foundersBody:g.foundersBody,attribution:g.attribution}),Banner:()=>({...re,ctaText:b.text,ctaHref:b.href}),ProcessSteps:()=>({num:a.num,title:m(a.title)})};function ze(){t(Oe),t(G),t(U),t(W),t(F),t(K),t(Y),t(j),t(z),t(q),t(J),t(Q),t(V),t(Z),t(oe),t($),t(ee),t(te)}export{Oe as GENERAL_SECTION_TO_BOX,je as TEXT_PRESS_STARTERS,ze as registerGeneralSectionRows};
@@ -1 +1 @@
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
+ import{jsx as m}from"react/jsx-runtime";import{parseBlockWidthFit as L,phoneKey as l,tabletKey as r}from"efficient-easel/draw";import{BLOCK_FILL_PHONE_ROW_CLASS as K,blockCanWidenPastCell as G,blockFillInCellClass as v,blockFillsPhone as X,blockSizeOf as B,blockSizeValuesOf as Z,blockCanvasWidthAttrs as U}from"../../content/block-size.js";import{NoCellBound as M}from"../../../components/BoxCellContext.js";import{CellWrap as V,useBoxCell as Y,useDrawsAtEdge as q}from"../../../components/InBoxContext.js";import{boxPhoneRowFits as J,boxRowColumnsClass as k,boxShareClasses as C,boxShareTabletOf as Q,boxTabletColumnsClass as $}from"../../../../format/lib/content/box-layout.js";import{resolveContainerDirection as tt}from"../../../../format/lib/content/container-direction.js";import{BOX_TYPE as et,containerBlocksFor as it}from"../../../../format/lib/document/container-blocks.js";import{readPartStyle as nt}from"../part-styles.js";import{addShowWhenFacts as st,withRowRules as _}from"../../../../format/lib/document/show-when-attach.js";import{sitsInBox as ot}from"./cell-width.js";import{findParentNode as rt}from"../../../../format/lib/document/passes/document-position.js";const lt=new Set(["Text","Heading"]),ct=new Set(["h1","h2","h3","h4","h5","h6"]);function z(t,e){return t==="Heading"?!0:t!=="Text"?!1:typeof e.tag=="string"&&ct.has(e.tag)?!0:nt(e,"text").textStyle?.startsWith("heading-")===!0}const d={not:{context:"blockOutsideBox",is:!0}},E={all:[d,{not:{context:"boxSharesWidth",is:!0}}]},I={all:[d,{not:{context:"boxSharesWidthPhone",is:!0}}]},N={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:l(t),is:e},{all:[{field:l(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}}]}]},at=[[["_gBlockSize","minWidth",r("minWidth"),l("minWidth"),"maxWidth",r("maxWidth"),l("maxWidth")],d],[["widthFit"],E],[[r("widthFit")],N],[[l("widthFit")],I],[["width"],{all:[E,{field:"widthFit",is:"fixed"}]}],[[r("width")],{all:[N,y("widthFit","fixed")]}],[[l("width")],{all:[I,H("widthFit","fixed")]}]],P=y("textFit","shrink",R),A=[[["_gText","textFit",r("textFit"),l("textFit")],d],[["minFont"],{all:[d,R]}],[[r("minFont")],{all:[d,P]}],[[l("minFont")],{all:[d,H("textFit","shrink",P)]}]],b=(t,e)=>rt(e.appState,t.props?.id),w=t=>!!t&&typeof t.type=="string"&&it(t.type)!==null,T=t=>(t.type==="Flex"||t.type==="HeroGroup")&&tt(t.type,t.props?.direction)==="row",g=t=>{const e=L(t);return e!==void 0&&e!=="fit"},ht={blockOutsideBox:(t,e)=>!w(b(t,e)),boxSharesWidth:(t,e)=>{const i=b(t,e);return!w(i)||!T(i)?!1:k({...i.props,direction:"row"})!==""?!0:C(i.props?.share)!==""&&!g(t.props?.widthFit)},boxSharesWidthTablet:(t,e)=>{const i=b(t,e);if(!w(i)||!T(i))return!1;if($(i.props?.[r("columns")])!==""||k({...i.props,direction:"row"})!=="")return!0;const n=Q(i.props?.[r("share")])??i.props?.share;return C(n)!==""&&!g(t.props?.[r("widthFit")]??t.props?.widthFit)},boxSharesWidthPhone:(t,e)=>{const i=b(t,e);if(!w(i)||!T(i))return!1;const n=i.props?.phoneRow;return(Number(n)===2||Number(n)===3)&&!J(n,i.props?.[l("share")])&&!g(t.props?.[l("widthFit")]??t.props?.widthFit)}},dt=t=>/^_[gds][A-Z]/.test(t);function ut(t,e,i){const n=Object.entries(t),s=n.findIndex(([c])=>c===e);if(s===-1)return null;let o=s+1;for(;o<n.length&&!dt(n[o][0]);)o++;return Object.fromEntries([...n.slice(0,o),...Object.entries(i),...n.slice(o)])}function D(t,e,i){const n=Object.entries(t);return Object.fromEntries([...n.slice(0,e),...Object.entries(i),...n.slice(e)])}function ft(t,e,i){const n=Object.keys(e);if(n.includes("_dSize")){const{_gBlockSize:s,...o}=i;return D(e,n.indexOf("_dSize")+1,o)}return xt.has(t)&&n.includes("_gSpacing")?D(e,n.indexOf("_gSpacing"),i):{...e,...i}}const xt=new Set(["Text","Heading"]);function pt(t,e){const{_gText:i,...n}=e;return ut(t,"_gText",n)??{...t,...e}}function St(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"),l("textFit")])s in n&&(n[s]=t[s]);e.set(i,n)}return n}}const It={name:"blockSize",applies:(t,e,i)=>ot(t,i)&&!!i&&typeof i.render=="function",panel(t,e,i){const n=lt.has(e),{text:s}=i.blockSizeFields(n?{tablet:!0,textFit:e==="Heading"?"shrink":"wrap"}:{}),{size:o}=i.blockSizeFields({tablet:!0});let c=ft(e,t.fields??{},_(o,at));if(n){const a=_(s,A);if(c=pt(c,a),e==="Text"){const x=_(i.blockSizeFields({tablet:!0,textFit:"shrink"}).text,A),p=St(x),h=t.resolveFields,F=(S,u)=>{const f=h?h(S,u):u.fields,W=O=>z(e,S?.props??{})?p(O??u.fields):O;return f instanceof Promise?f.then(W):W(f)};t.resolveFields=F}}t.fields=c,st(t,{...ht,textWrapsByDefault:a=>!z(e,a.props??{})})},draw(t,e){bt(t,e)}};function bt(t,e){const i=t.render;t.render=n=>{const s=Z(n),o=B(s),c=i(n),a=o&&B(s,{atSectionLine:!0});return o===null?c:m(wt,{size:o,sectionSize:a??o,atEdge:e===et,canvasAttrs:n.editor?.isEditing?U(s):j,inCell:v(s),fillsPhone:X(s),widens:G(s),children:c})}}const j={};function wt({size:t,sectionSize:e,atEdge:i,canvasAttrs:n,inCell:s,fillsPhone:o,widens:c,children:a}){const x=Y(),p=q(i?"edge":"by-box"),h=p?t:e,F=h.className,S=x?.phoneCells===!0,u=o&&x?.phoneRowFits===!0,f=c?m(M,{children:a}):a;return m(V,{className:[F,S?s:"",u?K:""].filter(Boolean).join(" "),...Object.keys(h.style).length?{style:h.style}:{},attrs:p&&n!==j?{...h.attrs,...n}:h.attrs,children:f})}export{It as blockSize,z as textShrinksByDefault};
@@ -1,5 +1,5 @@
1
1
  import { type ShowWhenRule } from "../../../../format/lib/document/show-when-attach.js";
2
- import type { BlockPass } from "../../../../format/lib/document/passes/types.js";
3
- export declare const BOX_BLOCK_KEYS: readonly string[];
2
+ import type { BlockPass, PassBlock } from "../../../../format/lib/document/passes/types.js";
3
+ export declare function sitsInBox(key: string, comp: Pick<PassBlock, "sitsInBox"> | undefined): boolean;
4
4
  export declare const CELL_WIDTH_SHOW_WHEN: ShowWhenRule;
5
5
  export declare const cellWidth: BlockPass;
@@ -1 +1 @@
1
- import{jsx as s}from"react/jsx-runtime";import{HideTaker as d}from"../../../components/ViewHideRoot.js";import{GRID_ROW_SPAN_ATTR as f,GRID_SPAN_ATTR as _,resolveGridRowSpan as a,resolveGridSpan as S}from"../../../../format/lib/content/grid-span.js";import{withRowsShownWhen as c}from"../../../../format/lib/document/show-when-attach.js";import{CONTAINER_BLOCK_CHOICES as m}from"../../../../format/lib/document/container-blocks.js";import{RETIRED_NESTABLE_SECTIONS as p}from"../../../../format/lib/document/section-catalog.js";import{BOX_MAY_HOLD as O}from"../../../../format/lib/document/passes/slot-rules.js";const E=Array.from(new Set([...m.map(e=>e.type),...O])),R=Array.from(new Set([...E,...p,"GalleryItem"])),T={not:{context:"parentOffersPositions",is:!1}},u={name:"cellWidth",applies:(e,t,r)=>R.includes(e)&&!!r&&typeof r.render=="function",panel(e,t,r){const n=r.cellWidthFields;e.fields={...e.fields,...n()},e.fields=c(e.fields??{},Object.keys(n()),T)},draw(e){const t=e.render;e.render=r=>{const n=S(r.gridSpan),i=a(r.gridRowSpan),l=t(r);if(n==null&&i==null)return l;const o={};return n!=null&&(o[_]=String(n)),i!=null&&(o[f]=String(i)),s(d,{className:"sf-grid-cell",...o,children:l})}}};export{E as BOX_BLOCK_KEYS,T as CELL_WIDTH_SHOW_WHEN,u as cellWidth};
1
+ import{jsx as d}from"react/jsx-runtime";import{HideTaker as f}from"../../../components/ViewHideRoot.js";import{GRID_ROW_SPAN_ATTR as _,GRID_SPAN_ATTR as a,resolveGridRowSpan as c,resolveGridSpan as S}from"../../../../format/lib/content/grid-span.js";import{withRowsShownWhen as m}from"../../../../format/lib/document/show-when-attach.js";import{CONTAINER_BLOCK_CHOICES as O}from"../../../../format/lib/document/container-blocks.js";import{RETIRED_NESTABLE_SECTIONS as p}from"../../../../format/lib/document/section-catalog.js";import{BOX_MAY_HOLD as u}from"../../../../format/lib/document/passes/slot-rules.js";const l=Array.from(new Set([...O.map(e=>e.type),...u]));function E(e,t){return l.includes(e)||t?.sitsInBox===!0}const I=Array.from(new Set([...l,...p,"GalleryItem"])),R={not:{context:"parentOffersPositions",is:!1}},L={name:"cellWidth",applies:(e,t,r)=>(I.includes(e)||E(e,r))&&!!r&&typeof r.render=="function",panel(e,t,r){const n=r.cellWidthFields;e.fields={...e.fields,...n()},e.fields=m(e.fields??{},Object.keys(n()),R)},draw(e){const t=e.render;e.render=r=>{const n=S(r.gridSpan),i=c(r.gridRowSpan),s=t(r);if(n==null&&i==null)return s;const o={};return n!=null&&(o[a]=String(n)),i!=null&&(o[_]=String(i)),d(f,{className:"sf-grid-cell",...o,children:s})}}};export{R as CELL_WIDTH_SHOW_WHEN,L as cellWidth,E as sitsInBox};
@@ -5,7 +5,6 @@ export declare const efficientMediaResolve: (ref: string) => string | null;
5
5
  export declare function absolutizeApiUrl(url: string | null | undefined): string | null;
6
6
  export declare function isExternalMediaUrl(src: string): boolean;
7
7
  export declare function resolveMedia(src?: string): string | undefined;
8
- export declare function hasAv1Variant(src?: string): boolean;
9
8
  export interface VideoFileSource {
10
9
  src: string;
11
10
  type: string;
@@ -1 +1 @@
1
- import{currentEaselSession as s}from"efficient-easel/screen/lib/session";const n=process.env.NEXT_PUBLIC_MEDIA_URL?.replace(/\/+$/,"");function r(e){const t=s().hostBackend?.media.resolve;if(!(!t||t===c))return t(e)??e}function u(e){return/^(?:https?:)?\/\//i.test(e)||/^(?:data|blob):/i.test(e)}function d(e){return r(e)??i(e)}function i(e){return!n||u(e)?e:n+e.replace(/^\/media/,"")}const c=e=>i(e),a=process.env.NEXT_PUBLIC_API_URL??"";function E(e){if(!e)return null;const t=r(e);return t!==void 0?t:e.startsWith("/")?`${a}${e}`:e}function _(e){return/^https?:\/\//i.test(e)&&!(n&&e.startsWith(n+"/"))}function h(e){if(!e)return;const t=r(e);return t!==void 0?t:e.startsWith("/media/")?d(e):e}const f="/videos/products/";function p(e){return!!e&&e.includes(f)}const v='video/mp4; codecs="av01.0.08M.10"';function l(e,t){if(!e)return[];const o=t||(p(e)?e.replace(/\.mp4$/,".av1.mp4"):"");return[...o?[{src:o,type:v}]:[],{src:e,type:"video/mp4"}]}function m(e,t){return t&&e.videoPhone?{video:e.videoPhone,av1:e.av1Phone}:{video:e.video,av1:e.av1}}export{E as absolutizeApiUrl,i as efficientMedia,c as efficientMediaResolve,p as hasAv1Variant,u as isAbsoluteUrl,_ as isExternalMediaUrl,d as media,h as resolveMedia,m as videoForView,l as videoSources};
1
+ import{currentEaselSession as s}from"efficient-easel/screen/lib/session";const n=process.env.NEXT_PUBLIC_MEDIA_URL?.replace(/\/+$/,"");function r(e){const t=s().hostBackend?.media.resolve;if(!(!t||t===c))return t(e)??e}function u(e){return/^(?:https?:)?\/\//i.test(e)||/^(?:data|blob):/i.test(e)}function d(e){return r(e)??i(e)}function i(e){return!n||u(e)?e:n+e.replace(/^\/media/,"")}const c=e=>i(e),a=process.env.NEXT_PUBLIC_API_URL??"";function _(e){if(!e)return null;const t=r(e);return t!==void 0?t:e.startsWith("/")?`${a}${e}`:e}function h(e){return/^https?:\/\//i.test(e)&&!(n&&e.startsWith(n+"/"))}function l(e){if(!e)return;const t=r(e);return t!==void 0?t:e.startsWith("/media/")?d(e):e}const f="/videos/products/";function p(e){return!!e&&e.includes(f)}const v='video/mp4; codecs="av01.0.08M.10"';function m(e,t){if(!e)return[];const o=t||(p(e)?e.replace(/\.mp4$/,".av1.mp4"):"");return[...o?[{src:o,type:v}]:[],{src:e,type:"video/mp4"}]}function x(e,t){return t&&e.videoPhone?{video:e.videoPhone,av1:e.av1Phone}:{video:e.video,av1:e.av1}}export{_ as absolutizeApiUrl,i as efficientMedia,c as efficientMediaResolve,u as isAbsoluteUrl,h as isExternalMediaUrl,d as media,l as resolveMedia,x as videoForView,m as videoSources};
@@ -1 +1 @@
1
- import{readHidable as Z}from"efficient-easel/draw";import{BOX_TYPE as ee,CONTAINER_BLOCKS_SLOT as te}from"../../../format/lib/document/container-blocks.js";import{headingTextSeed as oe,labelTextSeed as ne}from"../../../format/lib/document/text-seeds.js";import{SPLITTABLE_SECTIONS as se,parseSectionHeadPlacement as re}from"../../../format/lib/sections/section-head-placement.js";import{accentItalicRuns as ie}from"../../../format/lib/markup.js";import{seedNodes as ce}from"../../../format/lib/document/seed-parts.js";import{bucketByGroup as ae}from"../../../format/lib/locations-grid.js";import{normalizeTheme as z}from"../../../format/lib/theme.js";import{hasOwnEntry as R,ownEntry as E}from"../../../format/lib/own-entry.js";const v=ee,_=te;function Ie(t){if(t.theme)return z(t.theme);const o=t.site?.themePresets;return o?z({selected:t.site?.selectedPreset??0,themes:[...o]}):void 0}function de(t,o){return o===0?`${t}~box`:`${t}~box-${o+1}`}const A={Flex:"the Box itself",Hero:"its slides hold Boxes of real blocks (Hero › Slide › Box), and its Scrolling Bar is a Box in its strip slot (Hero › Box)",Divider:"one block with no text, picture or button",CustomHTML:"the HTML box is the whole section; it has no parts"};function Ne(t){for(const[o,s]of Object.entries(t)){if(R(A,o)&&E(A,o)!==s)throw new Error(`lib/sections/section-to-box: "${o}" is already Box-native`);A[o]=s}}function Re(t){return E(A,t)}const Y=new Set(["id"]),P={},W=[],fe={ProductGrid:["ProductColour","ProductEyebrow","ProductName","ProductPicture","ProductPrice","ProductRef","ProductSpecs"],Events:[],Collections:["CollectionCard"],GalleryB:["GalleryItem"],ContactRouting:[],ReviewForm:[],AppointmentBooking:["BookingBox"],Reviews:["RatingBlock"],CheckoutCTA:[],AlloyWheelsListing:["ProductBuy","ProductColour","ProductEyebrow","ProductName","ProductPicture","ProductPrice","ProductSpecs"],SpecTable:["EuTyreLabelBlock","WheelDiagram"]},le=Object.keys(fe),pe=["Breadcrumb","DocBody","Form","SubmitBuild","Footprint","FAQ","ProcessSteps",...le,"Stats","Logos","PaymentBadges","PaymentLogosBlock","FitmentFinder","DocMasthead","DocTabs","Timeline","TimelineTrack","OrderSummary","Chart","Mockup","Countdown","FeaturedCover","SectionHeader","TitleWithButtons","Prose","ParagraphsA","Banner","Cards"];function Ae(t){for(const[o,s]of Object.entries(t)){if(R(P,o)&&E(P,o)!==s)throw new Error(`lib/sections/section-to-box: "${o}" already has a row`);P[o]=s}}function Le(t){return E(P,t)}function He(){return Object.keys(P)}function ue(t){return R(P,t)&&W.includes(t)}function Fe(t,o=pe){return R(P,t)&&(o.includes(t)||ue(t))}function We(t){const o=E(se,t);if(!o)throw new Error(`lib/sections/section-to-box: "${t}" has no head row in SPLITTABLE_SECTIONS`);const s=[{kind:"text",key:o.num,role:"eyebrow"},{kind:"text",key:o.title,role:"heading"}];return o.description&&s.push({kind:"text",key:o.description,role:"body"}),o.headRows.includes("linkText")&&o.headRows.includes("linkHref")&&s.push({kind:"button",key:"linkText",href:"linkHref"}),s}const K=t=>Z(t),Ke=t=>K(t).text.trim()!=="";function he(t){if(t.includes("=="))return t;const o=t.indexOf("/"),s=o===-1?t:t.slice(0,o),r=s.trim();if(!r)return t;const a=s.indexOf(r);return`${s.slice(0,a)}==${r}==${s.slice(a+r.length)}${o===-1?"":t.slice(o)}`}const ye=t=>t==="heading"?oe():t==="eyebrow"?ne():{};function me(t,o,s,r){const c={...t._partStyles?.text??{},...o??{},...s??{}};return(r==="center"||r==="right")&&c.align===void 0&&(c.align=r),Object.keys(c).length?{_partStyles:{text:c}}:{}}function ke(t,o){if(t===void 0)return{};if(typeof t=="string")return{variant:t};const s=o[t.key];return{variant:(typeof s=="string"?E(t.map,s):void 0)??t.fallback}}function V(t,o,s,r,a={}){const c={...o};for(const u of t){const[m,$,j]=typeof u=="string"?[u,u,void 0]:u;if(s[m]===void 0)continue;const C=j?j(s[m],s,a):s[m];C===void 0?delete c[$]:c[$]=C,r(m,$,C===void 0)}return c}function be(t){const o=new Set([...Y,"headPlacement","_partStyles",...Object.keys(t.drop??{}),...Object.keys(t.reads??{})]),s=a=>{for(const c of a??[])o.add(typeof c=="string"?c:c[0])},r=a=>{for(const c of a)switch(c.kind){case"text":case"image":o.add(c.key),c.kind==="image"&&c.alt&&o.add(c.alt);break;case"button":o.add(c.key),o.add(c.href),typeof c.variant=="object"&&o.add(c.variant.key);break;case"list":o.add(c.key);break;case"group":case"block":s(c.box),r(c.parts??[]);break;case"core":if(c.keep!=="rest"&&c.keep.forEach(u=>o.add(u)),Object.keys(c.rename??{}).forEach(u=>o.add(u)),c.derive?.reads.forEach(u=>o.add(u)),typeof c.slots!="function")for(const u of Object.values(c.slots??{}))for(const m of u)"kind"in m&&o.add(m.key);break}};for(const a of[t,...t.also??[]])s(a.box),r(a.parts);return o}const ge=t=>re(t.headPlacement)==="own-box";function xe(t){return ge(t)?"its head sits in a Box of its own above it (own-box): the row draws the head inline":void 0}function we(t,o){const s=t[o];return Array.isArray(s)&&s.some(a=>!!a&&typeof a=="object"&&typeof a.type=="string")?"already on the Box path: its items draw from a filled card template":void 0}function Be(t){const o=new Set,s=r=>{for(const a of r)if(a.kind==="group"||a.kind==="block")s(a.parts??[]);else if(a.kind==="core"&&a.slots&&typeof a.slots!="function")for(const[c,u]of Object.entries(a.slots))u.length>0&&u.every(m=>!("kind"in m))&&o.add(c)};for(const r of[t,...t.also??[]])s(r.parts);return[...o]}function Se(t,o,s){if(!s.press)for(const r of Be(t)){const a=we(o,r);if(a!==void 0)return a}}function Q(t,o,s={}){const r=t.props,a=(o.ownBoxConverts?void 0:xe(r))??Se(o,r,s)??o.skip?.(r);if(a!==void 0)return{node:t,nodes:[t],carried:[],dropped:[],siteWrites:[],skipped:a};const c=String(r.id??t.type),u=[],m=[],$=new Set,j=(n,i)=>{u.push({key:n,home:i}),$.add(n)},C=r._partStyles??{},L=be(o);let M=0;const w=(n,i)=>({type:n,props:{...i,id:`${c}~${n}-${++M}`}}),X=(n,i,b,y,g,l,B)=>{if(g){for(const d of n??[]){const h=typeof d=="string"?d:d[0];b[h]!==void 0&&B(h,`nothing — the ${y} has no parts, so it is not drawn`)}return}const e=typeof i=="function"?i(r,s):i??{};return V(n??[],e,b,(d,h,f)=>B(d,f?`nothing — the old value draws nothing (${y}: no ${h})`:`${l}${y}: ${h}`),s)},q=n=>ce(n,i=>`${c}~${i}-${++M}`),D=(n,i,b)=>{const y=n.of?n.of(i):Array.isArray(i[n.key])?i[n.key]:[],g=typeof n.props=="function"?n.props(r,s):n.props??{},l=y.map((f,x)=>{const p=f??{},k=n.item?.(p,x,r)??{},S=I(k.reverse?[...n.parts].reverse():n.parts,p,!1,`item ${x+1}: `);return n.flat?k.props?S.map(T=>({...T,props:{...T.props,...k.props,id:T.props.id}})):S:[w(v,{name:`${n.name} ${x+1}`,...g,...k.props??{},[_]:S})]});if(n.groups){const f=n.groups;return b(n.key,y.length?`one Box per item (${y.length}), in a Box per group`:"nothing — the list is empty"),ae(y.map(x=>x??{}),f.of,f.of).map((x,p)=>{const k=x.items.map(O=>O.item),S=f.parts?I(f.parts,f.head?.(k,r)??{},!1,`group ${p+1}: `):[],T=x.items.map(O=>l[O.index]),H=f.perRow?.(k.length,r),N=Number.isInteger(H)&&H>=1?H:1,F=[];if(f.perRow&&N<T.length)for(let O=0;O*N<T.length;O++)F.push(T.slice(O*N,(O+1)*N).flat());return w(v,{name:`${f.name} ${p+1}`,...f.props??{},[_]:[...S,w(v,{name:`${f.itemsName} ${p+1}`,...f.itemsProps?.(k.length,r)??{},[_]:F.length?F.map((O,U)=>w(v,{name:`${f.rowName??`${f.itemsName} row`} ${U+1}`,...f.rowProps??{},[_]:O})):T.flat()})]})})}const B=n.perRow?.(r),e=n.perRow?Number.isInteger(B)&&B>=1?B:1:0;if(b(n.key,(y.length?n.flat?`each item's parts (${y.length} items), in order`:`one Box per item (${y.length}), its parts inside`:"nothing — the list is empty")+(e&&y.length?`, in rows of ${e}`:"")),!e)return l.flat();const d=typeof n.rowProps=="function"?n.rowProps(r,s):n.rowProps??{},h=[];for(let f=0;f*e<l.length;f++){const x=l.slice(f*e,(f+1)*e).flat(),p=n.rowFiller?e-l.slice(f*e,(f+1)*e).length:0;h.push(w(v,{name:`${n.rowName??`${n.name} row`} ${f+1}`,...d,[_]:[...x,...Array.from({length:p},(k,S)=>w(v,{name:`Empty ${S+1}`,...n.rowFiller,[_]:[]}))]}))}return h},I=(n,i,b,y)=>{const g=[],l=(e,d)=>b?j(e,d):void 0,B=e=>b?C[e]:void 0;for(const e of n)if(!(e.when&&!e.when(r,b?void 0:i)))switch(e.kind){case"text":{const d=K(i[e.key]);if(!d.text.trim()&&!(b&&s.press&&o.pressKeepsEmpty?.includes(e.key))){l(e.key,"nothing — empty words draw nothing, so no block");break}const h=ye(e.role??"body"),{_partStyles:f,...x}=h,p=me(h,e.styleFrom?{...e.style,...e.styleFrom(r,s)}:e.style,B(e.key),e.props?.align);g.push(w("Text",{text:e.mark==="accentLead"?he(d.text):e.mark==="accentItalic"?ie(d.text):d.text,...x,...e.props??{},...p,...d.hidden?{_hidden:!0}:{}})),l(e.key,`${y}Text block: its words${d.hidden?", hidden":""}`);break}case"button":{const d=K(i[e.key]);if(!d.text.trim()){l(e.key,"nothing — no words, no button"),l(e.href,"nothing — no button to link"),typeof e.variant=="object"&&l(e.variant.key,"nothing — no button to style");break}const h=typeof i[e.href]=="string"&&i[e.href]?i[e.href]:"#",f={...e.style??{},...B(e.key)??{}};g.push(w("ButtonBlock",{label:d.text,href:h,...typeof e.props=="function"?e.props(i,s):e.props??{},...ke(e.variant,i),...Object.keys(f).length?{_partStyles:{label:f}}:{},...d.hidden?{_hidden:!0}:{}})),l(e.key,`${y}Button block: its words`),l(e.href,`${y}Button block: its link`),typeof e.variant=="object"&&l(e.variant.key,`${y}Button block: its Style`);break}case"image":{const d=i[e.key];if(typeof d!="string"||!d){l(e.key,"nothing — no picture, no block"),e.alt&&l(e.alt,"nothing — no picture to describe");break}const h=e.alt&&typeof i[e.alt]=="string"?i[e.alt]:"";g.push(w("ImageBlock",{src:d,alt:h,...e.props??{}})),l(e.key,`${y}Image block: its picture`),e.alt&&l(e.alt,`${y}Image block: its alt text`);break}case"list":{g.push(...D(e,i,l));break}case"group":{const d=I(e.parts,i,b,y),h=X(e.box,e.props,i,`${e.name} Box`,!d.length&&!e.keepEmpty,y,l);h&&g.push(w(v,{name:e.name,...h,[_]:d}));break}case"block":{const d=e.parts?I(e.parts,i,b,y):[],h=X(e.box,e.props,i,`${e.type} block`,!!e.parts&&!d.length&&!e.keepEmpty,y,l);h&&g.push(w(e.type,{...h,...e.slot?{[e.slot]:d}:{}}));break}case"core":{const d=e.as??t.type,h={...e.headless?{}:{headPlacement:"own-box"},...e.props??{}},f=e.keep==="rest"?Object.keys(i).filter(p=>!L.has(p)&&!(p in h)):e.keep;for(const p of f)i[p]!==void 0&&(h[p]=i[p],l(p,`the ${d} block inside the Box`));if(e.keep==="rest"){for(const k of Object.keys(e.props??{}))i[k]!==void 0&&!L.has(k)&&l(k,`nothing — the ${d} block inside the Box has the row's own value`);i.headPlacement!==void 0&&l("headPlacement",`the ${d} block inside the Box: own-box`);const p=Object.fromEntries(Object.entries(C).filter(([k])=>!L.has(k)));Object.keys(p).length&&(h._partStyles=p)}for(const[p,k]of Object.entries(e.rename??{}))i[p]!==void 0&&(h[k]=i[p],l(p,`the ${d} block inside the Box: ${k}`));if(e.derive){Object.assign(h,e.derive.props(i,s));for(const p of e.derive.reads)i[p]!==void 0&&l(p,`the ${d} block inside the Box`)}const x=typeof e.slots=="function"?e.slots(i,s):e.slots??{};for(const[p,k]of Object.entries(x))h[p]=k.flatMap(S=>"kind"in S?D(S,i,l):q([S]));g.push(w(d,h));break}}return g},J=(n,i)=>{const b=i===0?"Box":`${n.name} Box`,y=I(n.parts,r,!0,i===0?"":`${b}: `),g=typeof n.boxProps=="function"?n.boxProps(r,s):n.boxProps??{},l=V(n.box??[],g,r,(B,e,d)=>j(B,d?`nothing — the old value draws nothing (${b}: no ${e})`:`${b}: ${e}`),s);return{type:v,props:{name:n.name,...l,[_]:y,id:de(c,i)}}},G=[o,...o.also??[]].map(J);r._partStyles!==void 0&&j("_partStyles","each old part's style moved to its new part");for(const[n,i]of Object.entries(o.reads??{}))r[n]!==void 0&&j(n,i);for(const[n,i]of Object.entries(o.drop??{}))n in r&&(m.push({key:n,why:i}),$.add(n));for(const n of Object.keys(r))Y.has(n)||$.has(n)||m.push({key:n,why:"not in the row — not carried"});return{node:G[0],nodes:G,carried:u,dropped:m,siteWrites:[...o.site?.(t,s)??[]]}}function Me(t,o=W,s={}){const r=t.content;if(!Array.isArray(r))return t;let a=!1;const c=r.flatMap(u=>{const m=u&&typeof u.type=="string"&&o.includes(u.type)?E(P,u.type):void 0;if(!m)return[u];const $=Q(u,m,s);return $.skipped!==void 0?[u]:(a=!0,$.nodes)});return a?{...t,content:c}:t}function Xe(t,o=W,s={}){if(!Array.isArray(t))return[];const r=[];return t.forEach((a,c)=>{const u=a&&typeof a.type=="string"&&o.includes(a.type)?E(P,a.type):void 0;if(!u)return;const m=Q(a,u,s);m.skipped===void 0&&r.push({index:c,node:m.node,nodes:m.nodes})}),r}export{fe as HOST_PRESS_BLOCKS,le as HOST_PRESS_TYPES,_ as SECTION_BOX_SLOT,v as SECTION_BOX_TYPE,W as SECTION_TO_BOX_ON,pe as SECTION_TO_BOX_PRESS,Re as boxNativeReason,Q as convertSection,Me as convertSectionsInPage,Ie as convertTheme,ue as convertsToBox,we as filledTemplateHold,Ke as hasWords,ge as headInOwnBox,We as headParts,xe as ownBoxHold,Fe as pressesAsBox,Ne as registerBoxNativeSections,Ae as registerSectionToBox,de as sectionBoxIdOf,Xe as sectionToBoxEdits,Le as sectionToBoxRow,He as sectionToBoxTypes};
1
+ import{readHidable as Z}from"efficient-easel/draw";import{BOX_TYPE as ee,CONTAINER_BLOCKS_SLOT as te}from"../../../format/lib/document/container-blocks.js";import{headingTextSeed as oe,labelTextSeed as ne}from"../../../format/lib/document/text-seeds.js";import{SPLITTABLE_SECTIONS as se,parseSectionHeadPlacement as re}from"../../../format/lib/sections/section-head-placement.js";import{accentItalicRuns as ie}from"../../../format/lib/markup.js";import{seedNodes as ce}from"../../../format/lib/document/seed-parts.js";import{bucketByGroup as ae}from"../../../format/lib/locations-grid.js";import{normalizeTheme as z}from"../../../format/lib/theme.js";import{hasOwnEntry as R,ownEntry as E}from"../../../format/lib/own-entry.js";const v=ee,_=te;function Ie(t){if(t.theme)return z(t.theme);const o=t.site?.themePresets;return o?z({selected:t.site?.selectedPreset??0,themes:[...o]}):void 0}function de(t,o){return o===0?`${t}~box`:`${t}~box-${o+1}`}const A={Flex:"the Box itself",Hero:"its slides hold Boxes of real blocks (Hero › Slide › Box), and its Scrolling Bar is a Box in its strip slot (Hero › Box)",Divider:"one block with no text, picture or button",CustomHTML:"the HTML box is the whole section; it has no parts"};function Ne(t){for(const[o,s]of Object.entries(t)){if(R(A,o)&&E(A,o)!==s)throw new Error(`lib/sections/section-to-box: "${o}" is already Box-native`);A[o]=s}}function Re(t){return E(A,t)}const Y=new Set(["id"]),P={},W=[],fe={ProductGrid:["ProductColour","ProductEyebrow","ProductName","ProductPicture","ProductPrice","ProductRef","ProductSpecs"],Events:[],Collections:["CollectionCard"],GalleryB:["GalleryItem"],ContactRouting:[],ReviewForm:[],AppointmentBooking:["BookingBox"],Reviews:["RatingBlock"],CheckoutCTA:[],AlloyWheelsListing:["ProductBuy","ProductColour","ProductEyebrow","ProductName","ProductPicture","ProductPrice","ProductSpecs"],SpecTable:["EuTyreLabelBlock","WheelDiagram"]},le=Object.keys(fe),pe=["Breadcrumb","DocBody","Form","SubmitBuild","Footprint","FAQ","ProcessSteps",...le,"Stats","Logos","PaymentBadges","PaymentLogosBlock","FitmentFinder","DocMasthead","DocTabs","Timeline","TimelineTrack","OrderSummary","Chart","Mockup","Integrations","Countdown","FeaturedCover","SectionHeader","TitleWithButtons","Prose","ParagraphsA","Banner","Cards"];function Ae(t){for(const[o,s]of Object.entries(t)){if(R(P,o)&&E(P,o)!==s)throw new Error(`lib/sections/section-to-box: "${o}" already has a row`);P[o]=s}}function Le(t){return E(P,t)}function He(){return Object.keys(P)}function ue(t){return R(P,t)&&W.includes(t)}function Fe(t,o=pe){return R(P,t)&&(o.includes(t)||ue(t))}function We(t){const o=E(se,t);if(!o)throw new Error(`lib/sections/section-to-box: "${t}" has no head row in SPLITTABLE_SECTIONS`);const s=[{kind:"text",key:o.num,role:"eyebrow"},{kind:"text",key:o.title,role:"heading"}];return o.description&&s.push({kind:"text",key:o.description,role:"body"}),o.headRows.includes("linkText")&&o.headRows.includes("linkHref")&&s.push({kind:"button",key:"linkText",href:"linkHref"}),s}const K=t=>Z(t),Ke=t=>K(t).text.trim()!=="";function he(t){if(t.includes("=="))return t;const o=t.indexOf("/"),s=o===-1?t:t.slice(0,o),r=s.trim();if(!r)return t;const a=s.indexOf(r);return`${s.slice(0,a)}==${r}==${s.slice(a+r.length)}${o===-1?"":t.slice(o)}`}const ye=t=>t==="heading"?oe():t==="eyebrow"?ne():{};function me(t,o,s,r){const c={...t._partStyles?.text??{},...o??{},...s??{}};return(r==="center"||r==="right")&&c.align===void 0&&(c.align=r),Object.keys(c).length?{_partStyles:{text:c}}:{}}function ke(t,o){if(t===void 0)return{};if(typeof t=="string")return{variant:t};const s=o[t.key];return{variant:(typeof s=="string"?E(t.map,s):void 0)??t.fallback}}function V(t,o,s,r,a={}){const c={...o};for(const u of t){const[m,$,j]=typeof u=="string"?[u,u,void 0]:u;if(s[m]===void 0)continue;const C=j?j(s[m],s,a):s[m];C===void 0?delete c[$]:c[$]=C,r(m,$,C===void 0)}return c}function be(t){const o=new Set([...Y,"headPlacement","_partStyles",...Object.keys(t.drop??{}),...Object.keys(t.reads??{})]),s=a=>{for(const c of a??[])o.add(typeof c=="string"?c:c[0])},r=a=>{for(const c of a)switch(c.kind){case"text":case"image":o.add(c.key),c.kind==="image"&&c.alt&&o.add(c.alt);break;case"button":o.add(c.key),o.add(c.href),typeof c.variant=="object"&&o.add(c.variant.key);break;case"list":o.add(c.key);break;case"group":case"block":s(c.box),r(c.parts??[]);break;case"core":if(c.keep!=="rest"&&c.keep.forEach(u=>o.add(u)),Object.keys(c.rename??{}).forEach(u=>o.add(u)),c.derive?.reads.forEach(u=>o.add(u)),typeof c.slots!="function")for(const u of Object.values(c.slots??{}))for(const m of u)"kind"in m&&o.add(m.key);break}};for(const a of[t,...t.also??[]])s(a.box),r(a.parts);return o}const ge=t=>re(t.headPlacement)==="own-box";function xe(t){return ge(t)?"its head sits in a Box of its own above it (own-box): the row draws the head inline":void 0}function we(t,o){const s=t[o];return Array.isArray(s)&&s.some(a=>!!a&&typeof a=="object"&&typeof a.type=="string")?"already on the Box path: its items draw from a filled card template":void 0}function Be(t){const o=new Set,s=r=>{for(const a of r)if(a.kind==="group"||a.kind==="block")s(a.parts??[]);else if(a.kind==="core"&&a.slots&&typeof a.slots!="function")for(const[c,u]of Object.entries(a.slots))u.length>0&&u.every(m=>!("kind"in m))&&o.add(c)};for(const r of[t,...t.also??[]])s(r.parts);return[...o]}function Se(t,o,s){if(!s.press)for(const r of Be(t)){const a=we(o,r);if(a!==void 0)return a}}function Q(t,o,s={}){const r=t.props,a=(o.ownBoxConverts?void 0:xe(r))??Se(o,r,s)??o.skip?.(r);if(a!==void 0)return{node:t,nodes:[t],carried:[],dropped:[],siteWrites:[],skipped:a};const c=String(r.id??t.type),u=[],m=[],$=new Set,j=(n,i)=>{u.push({key:n,home:i}),$.add(n)},C=r._partStyles??{},L=be(o);let M=0;const w=(n,i)=>({type:n,props:{...i,id:`${c}~${n}-${++M}`}}),X=(n,i,b,y,g,l,B)=>{if(g){for(const d of n??[]){const h=typeof d=="string"?d:d[0];b[h]!==void 0&&B(h,`nothing — the ${y} has no parts, so it is not drawn`)}return}const e=typeof i=="function"?i(r,s):i??{};return V(n??[],e,b,(d,h,f)=>B(d,f?`nothing — the old value draws nothing (${y}: no ${h})`:`${l}${y}: ${h}`),s)},q=n=>ce(n,i=>`${c}~${i}-${++M}`),D=(n,i,b)=>{const y=n.of?n.of(i):Array.isArray(i[n.key])?i[n.key]:[],g=typeof n.props=="function"?n.props(r,s):n.props??{},l=y.map((f,x)=>{const p=f??{},k=n.item?.(p,x,r)??{},S=I(k.reverse?[...n.parts].reverse():n.parts,p,!1,`item ${x+1}: `);return n.flat?k.props?S.map(T=>({...T,props:{...T.props,...k.props,id:T.props.id}})):S:[w(v,{name:`${n.name} ${x+1}`,...g,...k.props??{},[_]:S})]});if(n.groups){const f=n.groups;return b(n.key,y.length?`one Box per item (${y.length}), in a Box per group`:"nothing — the list is empty"),ae(y.map(x=>x??{}),f.of,f.of).map((x,p)=>{const k=x.items.map(O=>O.item),S=f.parts?I(f.parts,f.head?.(k,r)??{},!1,`group ${p+1}: `):[],T=x.items.map(O=>l[O.index]),H=f.perRow?.(k.length,r),N=Number.isInteger(H)&&H>=1?H:1,F=[];if(f.perRow&&N<T.length)for(let O=0;O*N<T.length;O++)F.push(T.slice(O*N,(O+1)*N).flat());return w(v,{name:`${f.name} ${p+1}`,...f.props??{},[_]:[...S,w(v,{name:`${f.itemsName} ${p+1}`,...f.itemsProps?.(k.length,r)??{},[_]:F.length?F.map((O,U)=>w(v,{name:`${f.rowName??`${f.itemsName} row`} ${U+1}`,...f.rowProps??{},[_]:O})):T.flat()})]})})}const B=n.perRow?.(r),e=n.perRow?Number.isInteger(B)&&B>=1?B:1:0;if(b(n.key,(y.length?n.flat?`each item's parts (${y.length} items), in order`:`one Box per item (${y.length}), its parts inside`:"nothing — the list is empty")+(e&&y.length?`, in rows of ${e}`:"")),!e)return l.flat();const d=typeof n.rowProps=="function"?n.rowProps(r,s):n.rowProps??{},h=[];for(let f=0;f*e<l.length;f++){const x=l.slice(f*e,(f+1)*e).flat(),p=n.rowFiller?e-l.slice(f*e,(f+1)*e).length:0;h.push(w(v,{name:`${n.rowName??`${n.name} row`} ${f+1}`,...d,[_]:[...x,...Array.from({length:p},(k,S)=>w(v,{name:`Empty ${S+1}`,...n.rowFiller,[_]:[]}))]}))}return h},I=(n,i,b,y)=>{const g=[],l=(e,d)=>b?j(e,d):void 0,B=e=>b?C[e]:void 0;for(const e of n)if(!(e.when&&!e.when(r,b?void 0:i)))switch(e.kind){case"text":{const d=K(i[e.key]);if(!d.text.trim()&&!(b&&s.press&&o.pressKeepsEmpty?.includes(e.key))){l(e.key,"nothing — empty words draw nothing, so no block");break}const h=ye(e.role??"body"),{_partStyles:f,...x}=h,p=me(h,e.styleFrom?{...e.style,...e.styleFrom(r,s)}:e.style,B(e.key),e.props?.align);g.push(w("Text",{text:e.mark==="accentLead"?he(d.text):e.mark==="accentItalic"?ie(d.text):d.text,...x,...e.props??{},...p,...d.hidden?{_hidden:!0}:{}})),l(e.key,`${y}Text block: its words${d.hidden?", hidden":""}`);break}case"button":{const d=K(i[e.key]);if(!d.text.trim()){l(e.key,"nothing — no words, no button"),l(e.href,"nothing — no button to link"),typeof e.variant=="object"&&l(e.variant.key,"nothing — no button to style");break}const h=typeof i[e.href]=="string"&&i[e.href]?i[e.href]:"#",f={...e.style??{},...B(e.key)??{}};g.push(w("ButtonBlock",{label:d.text,href:h,...typeof e.props=="function"?e.props(i,s):e.props??{},...ke(e.variant,i),...Object.keys(f).length?{_partStyles:{label:f}}:{},...d.hidden?{_hidden:!0}:{}})),l(e.key,`${y}Button block: its words`),l(e.href,`${y}Button block: its link`),typeof e.variant=="object"&&l(e.variant.key,`${y}Button block: its Style`);break}case"image":{const d=i[e.key];if(typeof d!="string"||!d){l(e.key,"nothing — no picture, no block"),e.alt&&l(e.alt,"nothing — no picture to describe");break}const h=e.alt&&typeof i[e.alt]=="string"?i[e.alt]:"";g.push(w("ImageBlock",{src:d,alt:h,...e.props??{}})),l(e.key,`${y}Image block: its picture`),e.alt&&l(e.alt,`${y}Image block: its alt text`);break}case"list":{g.push(...D(e,i,l));break}case"group":{const d=I(e.parts,i,b,y),h=X(e.box,e.props,i,`${e.name} Box`,!d.length&&!e.keepEmpty,y,l);h&&g.push(w(v,{name:e.name,...h,[_]:d}));break}case"block":{const d=e.parts?I(e.parts,i,b,y):[],h=X(e.box,e.props,i,`${e.type} block`,!!e.parts&&!d.length&&!e.keepEmpty,y,l);h&&g.push(w(e.type,{...h,...e.slot?{[e.slot]:d}:{}}));break}case"core":{const d=e.as??t.type,h={...e.headless?{}:{headPlacement:"own-box"},...e.props??{}},f=e.keep==="rest"?Object.keys(i).filter(p=>!L.has(p)&&!(p in h)):e.keep;for(const p of f)i[p]!==void 0&&(h[p]=i[p],l(p,`the ${d} block inside the Box`));if(e.keep==="rest"){for(const k of Object.keys(e.props??{}))i[k]!==void 0&&!L.has(k)&&l(k,`nothing — the ${d} block inside the Box has the row's own value`);i.headPlacement!==void 0&&l("headPlacement",`the ${d} block inside the Box: own-box`);const p=Object.fromEntries(Object.entries(C).filter(([k])=>!L.has(k)));Object.keys(p).length&&(h._partStyles=p)}for(const[p,k]of Object.entries(e.rename??{}))i[p]!==void 0&&(h[k]=i[p],l(p,`the ${d} block inside the Box: ${k}`));if(e.derive){Object.assign(h,e.derive.props(i,s));for(const p of e.derive.reads)i[p]!==void 0&&l(p,`the ${d} block inside the Box`)}const x=typeof e.slots=="function"?e.slots(i,s):e.slots??{};for(const[p,k]of Object.entries(x))h[p]=k.flatMap(S=>"kind"in S?D(S,i,l):q([S]));g.push(w(d,h));break}}return g},J=(n,i)=>{const b=i===0?"Box":`${n.name} Box`,y=I(n.parts,r,!0,i===0?"":`${b}: `),g=typeof n.boxProps=="function"?n.boxProps(r,s):n.boxProps??{},l=V(n.box??[],g,r,(B,e,d)=>j(B,d?`nothing — the old value draws nothing (${b}: no ${e})`:`${b}: ${e}`),s);return{type:v,props:{name:n.name,...l,[_]:y,id:de(c,i)}}},G=[o,...o.also??[]].map(J);r._partStyles!==void 0&&j("_partStyles","each old part's style moved to its new part");for(const[n,i]of Object.entries(o.reads??{}))r[n]!==void 0&&j(n,i);for(const[n,i]of Object.entries(o.drop??{}))n in r&&(m.push({key:n,why:i}),$.add(n));for(const n of Object.keys(r))Y.has(n)||$.has(n)||m.push({key:n,why:"not in the row — not carried"});return{node:G[0],nodes:G,carried:u,dropped:m,siteWrites:[...o.site?.(t,s)??[]]}}function Me(t,o=W,s={}){const r=t.content;if(!Array.isArray(r))return t;let a=!1;const c=r.flatMap(u=>{const m=u&&typeof u.type=="string"&&o.includes(u.type)?E(P,u.type):void 0;if(!m)return[u];const $=Q(u,m,s);return $.skipped!==void 0?[u]:(a=!0,$.nodes)});return a?{...t,content:c}:t}function Xe(t,o=W,s={}){if(!Array.isArray(t))return[];const r=[];return t.forEach((a,c)=>{const u=a&&typeof a.type=="string"&&o.includes(a.type)?E(P,a.type):void 0;if(!u)return;const m=Q(a,u,s);m.skipped===void 0&&r.push({index:c,node:m.node,nodes:m.nodes})}),r}export{fe as HOST_PRESS_BLOCKS,le as HOST_PRESS_TYPES,_ as SECTION_BOX_SLOT,v as SECTION_BOX_TYPE,W as SECTION_TO_BOX_ON,pe as SECTION_TO_BOX_PRESS,Re as boxNativeReason,Q as convertSection,Me as convertSectionsInPage,Ie as convertTheme,ue as convertsToBox,we as filledTemplateHold,Ke as hasWords,ge as headInOwnBox,We as headParts,xe as ownBoxHold,Fe as pressesAsBox,Ne as registerBoxNativeSections,Ae as registerSectionToBox,de as sectionBoxIdOf,Xe as sectionToBoxEdits,Le as sectionToBoxRow,He as sectionToBoxTypes};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-web-builder",
3
- "version": "68.1.0",
3
+ "version": "69.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",
@@ -55,11 +55,10 @@
55
55
  "peerDependencies": {
56
56
  "@tabler/icons-react": "^3.46.0",
57
57
  "efficient-easel": "^34.3.0",
58
- "efficient-shell": "^13.0.0",
58
+ "efficient-shell": "^13.3.0",
59
59
  "isomorphic-dompurify": "^3.18.0",
60
60
  "next": ">=16",
61
61
  "react": ">=19",
62
- "simple-icons": "^16.26.0",
63
62
  "typescript": "^5"
64
63
  },
65
64
  "peerDependenciesMeta": {
@@ -75,7 +74,7 @@
75
74
  "@types/react": "^19",
76
75
  "@types/react-dom": "^19",
77
76
  "efficient-easel": "^34.3.0",
78
- "efficient-shell": "^13.0.0",
77
+ "efficient-shell": "^13.3.0",
79
78
  "efficient-shell-checker": "npm:efficient-shell@12.37.0",
80
79
  "esbuild": "^0.28.0",
81
80
  "happy-dom": "^20.14.5",
@@ -85,7 +84,6 @@
85
84
  "playwright": "^1.63.0",
86
85
  "react": "19.2.4",
87
86
  "react-dom": "19.2.4",
88
- "simple-icons": "^16.26.0",
89
87
  "tailwindcss": "^4.3.3",
90
88
  "tsx": "4.22.3",
91
89
  "typescript": "^5"
@@ -1,2 +0,0 @@
1
- import { type SimpleIcon } from "simple-icons";
2
- export declare function integrationIcon(label: string): SimpleIcon | null;
@@ -1 +0,0 @@
1
- import{siAdyen as a,siAfterpay as o,siAircall as r,siAmericanexpress as e,siApplepay as l,siBigcommerce as t,siBrevo as n,siCalendly as p,siCampaignmonitor as g,siDhl as m,siDropbox as c,siEbay as y,siEtsy as d,siFacebook as u,siFedex as b,siGmail as k,siGoogleads as h,siGoogleanalytics as x,siGooglecalendar as f,siGoogledrive as G,siGooglepay as M,siGooglesheets as v,siHubspot as S,siInstagram as q,siIntercom as w,siKlarna as A,siMailchimp as z,siMailgun as C,siMake as I,siMastercard as W,siMessenger as T,siMeta as i,siMyob as Z,siNotion as B,siPaypal as D,siPinterest as E,siQuickbooks as F,siSage as N,siShopify as P,siSquare as V,siSquarespace as H,siStripe as K,siTelegram as L,siTiktok as O,siTrello as Q,siUps as U,siVisa as X,siVonage as Y,siWhatsapp as j,siWise as J,siWix as R,siWoocommerce as _,siXero as $,siYoutube as ee,siZapier as ie,siZendesk as se,siZoom as ae}from"simple-icons";const oe={adyen:a,afterpay:o,aircall:r,americanexpress:e,amex:e,applepay:l,bigcommerce:t,brevo:n,calendly:p,campaignmonitor:g,dhl:m,dropbox:c,ebay:y,etsy:d,facebook:u,fedex:b,gmail:k,googleads:h,googleanalytics:x,googlecalendar:f,googledrive:G,googlepay:M,googlesheets:v,hubspot:S,instagram:q,intercom:w,klarna:A,mailchimp:z,mailgun:C,make:I,mastercard:W,messenger:T,meta:i,metaads:i,myob:Z,notion:B,paypal:D,pinterest:E,quickbooks:F,sage:N,shopify:P,square:V,squarespace:H,stripe:K,telegram:L,tiktok:O,trello:Q,ups:U,visa:X,vonage:Y,whatsapp:j,wise:J,wix:R,woocommerce:_,xero:$,youtube:ee,zapier:ie,zendesk:se,zoom:ae};function le(s){return oe[s.toLowerCase().replace(/[^a-z0-9]/g,"")]??null}export{le as integrationIcon};