efficient-web-builder 67.1.0 → 67.3.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 (115) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/dist/editor/components/StorefrontEditor.js +1 -1
  3. package/dist/editor/components/storefront-editor.css +131 -0
  4. package/dist/editor/components/useSectionToBoxPass.d.ts +4 -0
  5. package/dist/editor/components/useSectionToBoxPass.js +1 -1
  6. package/dist/editor/lib/animation/fields.js +1 -1
  7. package/dist/editor/lib/animation/hover-fields.d.ts +8 -0
  8. package/dist/editor/lib/animation/hover-fields.js +1 -1
  9. package/dist/editor/lib/document/add-palette.js +1 -1
  10. package/dist/editor/lib/document/add-target.js +1 -1
  11. package/dist/editor/lib/document/block-offer.js +1 -1
  12. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  13. package/dist/editor/lib/document/blocks/shared-fields.js +1 -1
  14. package/dist/editor/lib/document/box-fields.d.ts +1 -1
  15. package/dist/editor/lib/document/card-display-chips.d.ts +1 -0
  16. package/dist/editor/lib/document/card-display-chips.js +1 -1
  17. package/dist/editor/lib/document/controls.js +1 -1
  18. package/dist/editor/lib/document/field-groups.js +1 -1
  19. package/dist/editor/lib/document/heading-outline.js +1 -1
  20. package/dist/editor/lib/document/page-root.js +2 -2
  21. package/dist/editor/lib/document/slot-new-children.js +1 -1
  22. package/dist/editor/lib/host-document-bridge.js +1 -1
  23. package/dist/editor/lib/sections/city-presets.js +1 -1
  24. package/dist/editor/lib/sections/new-section-node.js +1 -1
  25. package/dist/editor/lib/sections/section-dry-run.js +2 -2
  26. package/dist/editor/lib/sections/text-layouts.js +1 -1
  27. package/dist/format/lib/animation/hover.d.ts +3 -0
  28. package/dist/format/lib/animation/hover.js +1 -1
  29. package/dist/format/lib/content/box-layout.js +1 -1
  30. package/dist/format/lib/content/box-shape.d.ts +1 -1
  31. package/dist/format/lib/content/container-gap.d.ts +2 -2
  32. package/dist/format/lib/content/container-gap.js +1 -1
  33. package/dist/format/lib/content/css-length.d.ts +17 -1
  34. package/dist/format/lib/content/css-length.js +1 -1
  35. package/dist/format/lib/content/hover-media.d.ts +6 -1
  36. package/dist/format/lib/content/hover-media.js +1 -1
  37. package/dist/format/lib/content/image-treatment.d.ts +3 -0
  38. package/dist/format/lib/content/image-treatment.js +1 -1
  39. package/dist/format/lib/content/mirror-cards.js +1 -1
  40. package/dist/format/lib/content/page-width.d.ts +3 -3
  41. package/dist/format/lib/content/page-width.js +1 -1
  42. package/dist/format/lib/content/section-width.js +1 -1
  43. package/dist/format/lib/document/box-footer.js +1 -1
  44. package/dist/format/lib/document/container-blocks.js +1 -1
  45. package/dist/format/lib/document/media-drop.js +1 -1
  46. package/dist/format/lib/document/part-inks.js +1 -1
  47. package/dist/format/lib/document/part-records.js +1 -1
  48. package/dist/format/lib/document/passes/catalogue-labels.js +1 -1
  49. package/dist/format/lib/document/passes/media-values.js +1 -1
  50. package/dist/format/lib/document/row-hand.js +1 -1
  51. package/dist/format/lib/document/section-catalog.js +3 -3
  52. package/dist/format/lib/document/source-bound-parts.js +1 -1
  53. package/dist/format/lib/document/templateFields.js +1 -1
  54. package/dist/format/lib/document/theme-slots.js +1 -1
  55. package/dist/format/lib/editor-words-catalogue.d.ts +4 -0
  56. package/dist/format/lib/editor-words-catalogue.js +3 -3
  57. package/dist/format/lib/editor-words.js +1 -1
  58. package/dist/format/lib/logo/logo-size.d.ts +5 -0
  59. package/dist/format/lib/logo/logo-size.js +1 -1
  60. package/dist/format/lib/own-entry.d.ts +2 -0
  61. package/dist/format/lib/own-entry.js +1 -0
  62. package/dist/format/lib/preview-header-settings.d.ts +3 -0
  63. package/dist/format/lib/sections/active-press-context.js +1 -1
  64. package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
  65. package/dist/format/lib/sections/section-eyebrow-look.js +1 -1
  66. package/dist/format/lib/sections/section-head-placement.js +1 -1
  67. package/dist/format/lib/sections/section-presets.d.ts +2 -0
  68. package/dist/format/lib/sections/section-presets.js +1 -1
  69. package/dist/format/lib/sections/section-text-kinds.js +1 -1
  70. package/dist/format/lib/sections/section-text-regions.js +1 -1
  71. package/dist/format/lib/site-theme-row.d.ts +6 -0
  72. package/dist/format/lib/source-rules/editor-words.js +3 -3
  73. package/dist/format/lib/source-rules/import-time-work.js +4 -4
  74. package/dist/format/lib/source-rules/no-hard-coded-option-rows.d.ts +1 -1
  75. package/dist/format/lib/source-rules/no-hard-coded-option-rows.js +1 -1
  76. package/dist/format/lib/source-rules/own-key-reads.d.ts +26 -0
  77. package/dist/format/lib/source-rules/own-key-reads.js +7 -0
  78. package/dist/format/lib/source-rules/site-square-by-default.js +1 -1
  79. package/dist/format/lib/theme.d.ts +1 -1
  80. package/dist/format/lib/theme.js +4 -4
  81. package/dist/render/components/CardRowContext.d.ts +3 -1
  82. package/dist/render/components/CardRowContext.js +1 -1
  83. package/dist/render/components/Flex.d.ts +2 -1
  84. package/dist/render/components/Flex.js +1 -1
  85. package/dist/render/components/HoverMediaLayer.d.ts +16 -1
  86. package/dist/render/components/HoverMediaLayer.js +1 -1
  87. package/dist/render/components/ImageBlock.d.ts +1 -1
  88. package/dist/render/components/ImageBlock.js +1 -1
  89. package/dist/render/components/Logo.d.ts +2 -1
  90. package/dist/render/components/Logo.js +1 -1
  91. package/dist/render/components/PictureHoverMove.d.ts +1 -0
  92. package/dist/render/components/PictureHoverMove.js +1 -1
  93. package/dist/render/components/PreviewHeaderContext.d.ts +4 -1
  94. package/dist/render/components/PreviewHeaderContext.js +1 -1
  95. package/dist/render/lib/content/block-size.d.ts +6 -0
  96. package/dist/render/lib/content/block-size.js +1 -1
  97. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  98. package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
  99. package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -2
  100. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +6 -1
  101. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  102. package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
  103. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  104. package/dist/render/lib/document/head-core-boxes.js +1 -1
  105. package/dist/render/lib/document/migrate-legacy.js +1 -1
  106. package/dist/render/lib/document/part-styles.js +2 -2
  107. package/dist/render/lib/document/passes/block-size.js +1 -1
  108. package/dist/render/lib/document/passes/section-animation.js +1 -1
  109. package/dist/render/lib/document/passes/section-padding.js +1 -1
  110. package/dist/render/lib/document/passes/section-width.js +1 -1
  111. package/dist/render/lib/document/slot-counts.js +1 -1
  112. package/dist/render/lib/document/slot-specs.js +1 -1
  113. package/dist/render/lib/sections/section-to-box.d.ts +2 -0
  114. package/dist/render/lib/sections/section-to-box.js +1 -1
  115. package/package.json +1 -1
@@ -1 +1 @@
1
- import{jsx as e,Fragment as se,jsxs as v}from"react/jsx-runtime";import{PagePicture as re}from"../lib/first-screen.js";import{SiteLink as le}from"../lib/site-runtime.js";import{siteLinkDraws as ie}from"../../format/lib/content/box-link.js";import me from"./BlockFrame.js";import{useCellPictureSizes as ae}from"./BoxCellContext.js";import{useBoxCell as ce,useFillsCell as ne}from"./InBoxContext.js";import{useInsideSiteGutter as fe,useSectionEdge as ue}from"./SiteGutterFrame.js";import{useSitePhotography as pe}from"./SitePhotographyContext.js";import{media as de}from"../lib/media.js";import{CONTENT_SIZES as R,sizedImage as ge}from"../../format/lib/sized-image.js";import{imageCornerStyle as he}from"../../format/lib/content/image-corners.js";import{FILL_ROW as Se,imageAspectClasses as ve,pictureLayerClass as we,imageFillFrom as Fe,imageAspectDrawn as Ne,imageAspectDrawsARatio as Ce,imageFocalPointActs as be,imageFocalPointActsIn as j,imageAspectPhoneOf as ye,imageFillRowClasses as xe,imageWidthFollowsBox as Ae}from"../../format/lib/content/image-aspect.js";import{drawsSiteGutter as Ie}from"../../format/lib/content/site-gutter.js";import{imageFitClass as $e,parseImageFit as ke}from"../../format/lib/content/image-fit.js";import{SECTION_FILL_CLASS as Pe}from"../../format/lib/content/section-min-height.js";import{PICTURE_WASH_CLASS as _e,resolveImageTreatment as Re}from"../../format/lib/content/image-treatment.js";import{boxDarkenStyle as je}from"../../format/lib/content/box-background.js";import{phoneFocus as Oe}from"../../format/lib/content/phone-focus.js";import{say as ze}from"../../format/lib/editor-words.js";import{sectionEdgeAttrs as Ee}from"../lib/content/section-edge.js";import He from"./PhotoHoverSheet.js";import Le from"./PictureWash.js";import Te from"./HoverMediaLayer.js";import{PictureHoverMoveSheet as De,PictureHoverZoom as Ge,pictureHoverMoveOf as We}from"./PictureHoverMove.js";import{PictureZoom as Be}from"./PictureZoom.js";const Me={picture:"var(--surface)",card:"var(--card-bg)"};function Ze({src:o,alt:O,aspect:z,aspectPhone:r,contained:w,grayscale:E,pictureHover:F,hoverLayer:s,darken:H,darkenStyle:N,href:L,fit:T,focal:C,focalPhone:D,focalTablet:G,corners:W,cornerSides:B,cornersUnit:M,pad:b,ownSize:Z=!1,editing:y=!1}){const c=Re(E,pe(),F),p=ce(),U=ne(),d=ue(),Y=ae(R),t=Ne(z,p?.picturesFillRow===!0),g=t===Se,x=Fe(p?.fillFrom,p?.phoneRowFills===!0,r),l=g?xe(x):null,A=ye(t,r),i=ke(T,"cover"),q=d||!Ae(t,A,i)?R:Y,I=he(W,B,M),J=be(i,t,r),h=Oe(j("mobile",i,t,r)?D:void 0,j("tablet",i,t,r)?G:void 0),$={...c.style??{},...C&&J?{objectPosition:C}:{},...h.style},n=o?ge(de(o)):null,m=We(F,N),K=je(H,N),Q=m?.washHover??null,k=m?.style??{},f=s&&o?e(Te,{media:s.media,name:s.name,cover:s.cover,ground:Me[s.cover]}):null,P=o&&n?e(re,{src:n.src,...n.srcSet?{srcSet:n.srcSet,sizes:q}:{},alt:O,className:`${l?`${l.img} `:""}h-full w-full ${Ce(t,r)?$e(i):""}${c.className?` ${c.className}`:""}${h.className?` ${h.className}`:""}`,...Object.keys($).length?{style:$}:{}}):null,S=P?v(se,{children:[e(He,{sheet:c.sheet}),e(De,{move:m}),e(Ge,{move:m,className:we(l),children:P}),e(Le,{wash:K,hover:Q,className:`pointer-events-none ${_e}`})]}):e("div",{className:"flex aspect-[16/9] items-center justify-center border border-dashed border-line font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim",children:ze("Image — set a path")}),u=(L??"").trim(),V=u&&o?ie(u)?e(le,{href:u,className:"block h-full w-full",newTab:"auto",children:S}):e("a",{href:u,className:"block h-full w-full",children:S}):S,X=fe(),a=d&&!Z?Ee(d):null,_=b?{values:b,frame:g?0:24}:void 0,ee=_!==void 0&&Ie(a?!1:w,X),te=g?U||y||ee?Pe:"":"py-6",oe=o&&i==="contain"?"":"bg-surface ";return!o&&!y?null:v(me,{contained:a?!1:w,className:te,pad:_,...a?{fillWidth:a.className,style:a.style}:{},children:[e("figure",{...l?{className:l.figure}:{},children:v("div",{className:`relative w-full overflow-hidden ${oe}${ve(t,A,x)}${m?` ${m.className}`:""}`,...I||Object.keys(k).length?{style:{...I,...k}}:{},children:[e(Be,{fill:l,children:V}),f&&s?.cover==="picture"?f:null]})}),f&&s?.cover==="card"?f:null]})}export{Ze as default};
1
+ import{jsx as e,Fragment as se,jsxs as v}from"react/jsx-runtime";import{PagePicture as le}from"../lib/first-screen.js";import{SiteLink as re}from"../lib/site-runtime.js";import{siteLinkDraws as ie}from"../../format/lib/content/box-link.js";import me from"./BlockFrame.js";import{useCellPictureSizes as ae}from"./BoxCellContext.js";import{useBoxCell as ne,useFillsCell as ce}from"./InBoxContext.js";import{useInsideSiteGutter as fe,useSectionEdge as ue}from"./SiteGutterFrame.js";import{useSitePhotography as pe}from"./SitePhotographyContext.js";import{media as de}from"../lib/media.js";import{CONTENT_SIZES as R,sizedImage as ge}from"../../format/lib/sized-image.js";import{imageCornerStyle as he}from"../../format/lib/content/image-corners.js";import{FILL_ROW as Se,imageAspectClasses as ve,pictureLayerClass as we,imageFillFrom as Fe,imageAspectDrawn as Ne,imageAspectDrawsARatio as Ce,imageFocalPointActs as be,imageFocalPointActsIn as O,imageAspectPhoneOf as ye,imageFillRowClasses as xe,imageWidthFollowsBox as Ae}from"../../format/lib/content/image-aspect.js";import{drawsSiteGutter as Ie}from"../../format/lib/content/site-gutter.js";import{imageFitClass as $e,parseImageFit as ke}from"../../format/lib/content/image-fit.js";import{SECTION_FILL_CLASS as _e}from"../../format/lib/content/section-min-height.js";import{PICTURE_WASH_CLASS as Pe,resolveImageTreatment as Re}from"../../format/lib/content/image-treatment.js";import{boxDarkenStyle as Oe}from"../../format/lib/content/box-background.js";import{HOVER_LAYER_GROUND as je}from"../../format/lib/content/hover-media.js";import{phoneFocus as Ee}from"../../format/lib/content/phone-focus.js";import{say as He}from"../../format/lib/editor-words.js";import{sectionEdgeAttrs as ze}from"../lib/content/section-edge.js";import Le from"./PhotoHoverSheet.js";import Te from"./PictureWash.js";import De from"./HoverMediaLayer.js";import{PictureHoverMoveSheet as Ge,PictureHoverZoom as We,pictureHoverMoveOf as Be}from"./PictureHoverMove.js";import{PictureZoom as Me}from"./PictureZoom.js";function Ze({src:o,alt:j,aspect:E,aspectPhone:l,contained:w,grayscale:H,pictureHover:F,hoverLayer:s,darken:z,darkenStyle:N,href:L,fit:T,focal:C,focalPhone:D,focalTablet:G,corners:W,cornerSides:B,cornersUnit:M,pad:b,ownSize:Z=!1,editing:y=!1}){const n=Re(H,pe(),F),p=ne(),U=ce(),d=ue(),V=ae(R),t=Ne(E,p?.picturesFillRow===!0),g=t===Se,x=Fe(p?.fillFrom,p?.phoneRowFills===!0,l),r=g?xe(x):null,A=ye(t,l),i=ke(T,"cover"),Y=d||!Ae(t,A,i)?R:V,I=he(W,B,M),q=be(i,t,l),h=Ee(O("mobile",i,t,l)?D:void 0,O("tablet",i,t,l)?G:void 0),$={...n.style??{},...C&&q?{objectPosition:C}:{},...h.style},c=o?ge(de(o)):null,m=Be(F,N),J=Oe(z,N),K=m?.washHover??null,k=m?.style??{},f=s&&o?e(De,{media:s.media,name:s.name,cover:s.cover,ground:je[s.cover]}):null,_=o&&c?e(le,{src:c.src,...c.srcSet?{srcSet:c.srcSet,sizes:Y}:{},alt:j,className:`${r?`${r.img} `:""}h-full w-full ${Ce(t,l)?$e(i):""}${n.className?` ${n.className}`:""}${h.className?` ${h.className}`:""}`,...Object.keys($).length?{style:$}:{}}):null,S=_?v(se,{children:[e(Le,{sheet:n.sheet}),e(Ge,{move:m}),e(We,{move:m,className:we(r),children:_}),e(Te,{wash:J,hover:K,className:`pointer-events-none ${Pe}`})]}):e("div",{className:"flex aspect-[16/9] items-center justify-center border border-dashed border-line font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim",children:He("Image — set a path")}),u=(L??"").trim(),Q=u&&o?ie(u)?e(re,{href:u,className:"block h-full w-full",newTab:"auto",children:S}):e("a",{href:u,className:"block h-full w-full",children:S}):S,X=fe(),a=d&&!Z?ze(d):null,P=b?{values:b,frame:g?0:24}:void 0,ee=P!==void 0&&Ie(a?!1:w,X),te=g?U||y||ee?_e:"":"py-6",oe=o&&i==="contain"?"":"bg-surface ";return!o&&!y?null:v(me,{contained:a?!1:w,className:te,pad:P,...a?{fillWidth:a.className,style:a.style}:{},children:[e("figure",{...r?{className:r.figure}:{},children:v("div",{className:`relative w-full overflow-hidden ${oe}${ve(t,A,x)}${m?` ${m.className}`:""}`,...I||Object.keys(k).length?{style:{...I,...k}}:{},children:[e(Me,{fill:r,children:Q}),f&&s?.cover==="picture"?f:null]})}),f&&s?.cover==="card"?f:null]})}export{Ze as default};
@@ -11,6 +11,7 @@ interface Props {
11
11
  inkIsDark?: boolean | null;
12
12
  size?: "small" | "medium" | "large";
13
13
  sizePx?: number | null;
14
+ sizeUnit?: unknown;
14
15
  wordmark?: string | null;
15
16
  siteName?: string;
16
17
  fitToContainer?: boolean;
@@ -19,4 +20,4 @@ interface Props {
19
20
  }
20
21
  export { FOOTER_LOGO_PX, HEADER_LOGO_PX, HEADER_LOGO_PX_MAX, HEADER_LOGO_PX_MIN, LOGO_BLOCK_PX_MAX } from "../../format/lib/logo/logo-size.js";
21
22
  export declare const WORDMARK_FIT_FLOOR_PX = 16;
22
- export default function Logo({ variant, scrolled, src, reverse, color, onLightSurface, reversedSrc, inkIsDark, size, sizePx, wordmark, siteName, fitToContainer, fitWordmarkToContainer, fitFloorPx, hideClass, hideAttrs }: Props): import("react").JSX.Element;
23
+ export default function Logo({ variant, scrolled, src, reverse, color, onLightSurface, reversedSrc, inkIsDark, size, sizePx, sizeUnit, wordmark, siteName, fitToContainer, fitWordmarkToContainer, fitFloorPx, hideClass, hideAttrs }: Props): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as i,jsxs as L}from"react/jsx-runtime";import{withViewHide as it}from"./ViewHideRoot.js";import{useEffect as d,useId as ct,useRef as M,useState as f}from"react";import{NEUTRAL_SITE_NAME as at}from"../../format/lib/content/site-name.js";import{useRootIsDark as ut}from"efficient-shell/theme";import{isSvgUrl as dt}from"../../format/lib/logo/reverse-svg.js";import{analyzeLogoViaServer as ft}from"../lib/logo/analyze-logo-client.js";import{FOOTER_LOGO_PX as ht,HEADER_LOGO_PX as mt}from"../../format/lib/logo/logo-size.js";import{FOOTER_LOGO_PX as Ft,HEADER_LOGO_PX as wt,HEADER_LOGO_PX_MAX as $t,HEADER_LOGO_PX_MIN as Xt,LOGO_BLOCK_PX_MAX as Gt}from"../../format/lib/logo/logo-size.js";const pt=202/22,_t=.88,kt=16,Ot="invert(1)";function gt({variant:N="header",scrolled:W=!0,src:h,reverse:b=!1,color:m=null,onLightSurface:j,reversedSrc:A,inkIsDark:C,size:K="medium",sizePx:p,wordmark:_,siteName:U=at,fitToContainer:v=!1,fitWordmarkToContainer:V=!1,fitFloorPx:O,hideClass:q,hideAttrs:z}){const c=_&&_.trim()?_.trim():U,[B,Z]=f(null),S=M(null),J=t=>{S.current=t};d(()=>{Z(S.current?.ownerDocument??null)},[]);const Q=!ut({doc:B,whenUnset:!0}),n=h&&h.trim()?h.trim():null,a=!!n&&dt(n),k=j??(Q&&W),l=m&&m.trim()?m.trim():null,u=b&&!l,D=`logo-color-${ct().replace(/[^A-Za-z0-9_-]/g,"")}`,y=u&&a&&n&&A!=null?{reversed:A,inkIsDark:C??null}:null,F=y!==null,[Y,g]=f(null);d(()=>{if(!u||!n||!a||F){g(null);return}let t=!1;return g(null),ft(n).then(r=>{t||g(r)}),()=>{t=!0}},[u,n,a,F]);const s=y??Y,w=!!s&&s.inkIsDark!==null&&(k?!s.inkIsDark:s.inkIsDark),tt=u&&!!n&&!a&&!k,E=w&&s?s.reversed:n,$=E?[E]:[],[X,R]=f(0);d(()=>{R(0)},[n,w]);const et=N==="footer"?ht:mt[K],o=p&&p>0?p:et,nt=Math.round(o*pt),e=X<$.length?$[X]:null,[lt,x]=f(E),G=e!==null&&e===lt,P=M(null);d(()=>{const t=P.current;if(!t||!t.complete)return;if(t.naturalWidth>0||t.naturalHeight>0){x(e);return}let r=!1;return t.decode().then(()=>!r&&x(e),()=>!r&&R(rt=>rt+1)),()=>{r=!0}},[e]);const T=v||V,H=`calc(100cqi / ${((c.length+1)*_t).toFixed(2)})`,I=T&&O&&O>0?Math.min(O,o):null,ot=T?I===null?`min(${o}px, ${H})`:`clamp(${I}px, ${H}, ${o}px)`:`${o}px`,st=L("span",{className:`font-display font-bold tracking-[0.18em] ${I===null?"whitespace-nowrap":"whitespace-normal"}`,style:{fontSize:ot,lineHeight:1,...l?{color:l}:{}},"aria-label":c,children:[c,i("span",{className:"text-accent",style:l?{color:l}:void 0,children:"."})]});return L("span",{ref:J,className:it("inline-flex items-center",q??""),...z,children:[!G&&st,l&&e&&i("svg",{"aria-hidden":"true",focusable:"false",width:"0",height:"0",style:{position:"absolute"},children:L("filter",{id:D,colorInterpolationFilters:"sRGB",children:[i("feFlood",{style:{floodColor:l}}),i("feComposite",{in2:"SourceAlpha",operator:"in"})]})}),e&&i("img",{ref:P,src:e,alt:c,width:nt,height:o,className:"shrink-0 object-contain",style:{...G?{height:`${o}px`,width:"auto",...v?{maxWidth:"100cqi"}:{}}:{display:"none"},...tt?{filter:Ot}:{},...l?{filter:`url(#${D})`}:{}},onLoad:()=>x(e),onError:()=>R(t=>t+1)},e)]})}export{Ft as FOOTER_LOGO_PX,wt as HEADER_LOGO_PX,$t as HEADER_LOGO_PX_MAX,Xt as HEADER_LOGO_PX_MIN,Gt as LOGO_BLOCK_PX_MAX,kt as WORDMARK_FIT_FLOOR_PX,gt as default};
1
+ "use client";import{jsx as a,jsxs as v}from"react/jsx-runtime";import{withViewHide as at}from"./ViewHideRoot.js";import{useEffect as h,useId as ut,useRef as W,useState as p}from"react";import{NEUTRAL_SITE_NAME as dt}from"../../format/lib/content/site-name.js";import{useRootIsDark as mt}from"efficient-shell/theme";import{isSvgUrl as ft}from"../../format/lib/logo/reverse-svg.js";import{analyzeLogoViaServer as ht}from"../lib/logo/analyze-logo-client.js";import{siteLengthCss as pt}from"../../format/lib/content/css-length.js";import{FOOTER_LOGO_PX as _t,HEADER_LOGO_GRID as Ot,HEADER_LOGO_PX as gt}from"../../format/lib/logo/logo-size.js";import{FOOTER_LOGO_PX as Ht,HEADER_LOGO_PX as Tt,HEADER_LOGO_PX_MAX as Mt,HEADER_LOGO_PX_MIN as Nt,LOGO_BLOCK_PX_MAX as Wt}from"../../format/lib/logo/logo-size.js";const Et=202/22,Rt=.88,Ft=16,It="invert(1)";function Lt({variant:b="header",scrolled:C=!0,src:_,reverse:j=!1,color:O=null,onLightSurface:P,reversedSrc:D,inkIsDark:K,size:U="medium",sizePx:l,sizeUnit:V,wordmark:g,siteName:q=dt,fitToContainer:x=!1,fitWordmarkToContainer:B=!1,fitFloorPx:u,hideClass:Z,hideAttrs:z}){const d=g&&g.trim()?g.trim():q,[J,Q]=p(null),S=W(null),Y=t=>{S.current=t};h(()=>{Q(S.current?.ownerDocument??null)},[]);const tt=!mt({doc:J,whenUnset:!0}),n=_&&_.trim()?_.trim():null,m=!!n&&ft(n),$=P??(tt&&C),o=O&&O.trim()?O.trim():null,f=j&&!o,k=`logo-color-${ut().replace(/[^A-Za-z0-9_-]/g,"")}`,y=f&&m&&n&&D!=null?{reversed:D,inkIsDark:K??null}:null,w=y!==null,[et,E]=p(null);h(()=>{if(!f||!n||!m||w){E(null);return}let t=!1;return E(null),ht(n).then(c=>{t||E(c)}),()=>{t=!0}},[f,n,m,w]);const s=y??et,F=!!s&&s.inkIsDark!==null&&($?!s.inkIsDark:s.inkIsDark),nt=f&&!!n&&!m&&!$,R=F&&s?s.reversed:n,G=R?[R]:[],[X,I]=p(0);h(()=>{I(0)},[n,F]);const ot=b==="footer"?_t:gt[U],i=l&&l>0?l:ot,r=(l&&l>0?pt(l,V,"size",Ot,{floor:!0}):null)??`${i}px`,lt=Math.round(i*Et),e=X<G.length?G[X]:null,[st,L]=p(R),H=e!==null&&e===st,T=W(null);h(()=>{const t=T.current;if(!t||!t.complete)return;if(t.naturalWidth>0||t.naturalHeight>0){L(e);return}let c=!1;return t.decode().then(()=>!c&&L(e),()=>!c&&I(ct=>ct+1)),()=>{c=!0}},[e]);const M=x||B,N=`calc(100cqi / ${((d.length+1)*Rt).toFixed(2)})`,A=M&&u&&u>0?r===`${i}px`?`${Math.min(u,i)}px`:`min(${u}px, ${r})`:null,rt=M?A===null?`min(${r}, ${N})`:`clamp(${A}, ${N}, ${r})`:r,it=v("span",{className:`font-display font-bold tracking-[0.18em] ${A===null?"whitespace-nowrap":"whitespace-normal"}`,style:{fontSize:rt,lineHeight:1,...o?{color:o}:{}},"aria-label":d,children:[d,a("span",{className:"text-accent",style:o?{color:o}:void 0,children:"."})]});return v("span",{ref:Y,className:at("inline-flex items-center",Z??""),...z,children:[!H&&it,o&&e&&a("svg",{"aria-hidden":"true",focusable:"false",width:"0",height:"0",style:{position:"absolute"},children:v("filter",{id:k,colorInterpolationFilters:"sRGB",children:[a("feFlood",{style:{floodColor:o}}),a("feComposite",{in2:"SourceAlpha",operator:"in"})]})}),e&&a("img",{ref:T,src:e,alt:d,width:lt,height:i,className:"shrink-0 object-contain",style:{...H?{height:r,width:"auto",...x?{maxWidth:"100cqi"}:{}}:{display:"none"},...nt?{filter:It}:{},...o?{filter:`url(#${k})`}:{}},onLoad:()=>L(e),onError:()=>I(t=>t+1)},e)]})}export{Ht as FOOTER_LOGO_PX,Tt as HEADER_LOGO_PX,Mt as HEADER_LOGO_PX_MAX,Nt as HEADER_LOGO_PX_MIN,Wt as LOGO_BLOCK_PX_MAX,Ft as WORDMARK_FIT_FLOOR_PX,Lt as default};
@@ -8,6 +8,7 @@ export interface PictureHoverMoveDrawn {
8
8
  washHover: CSSProperties | null;
9
9
  }
10
10
  export declare function pictureHoverMoveOf(pictureHover: PictureHoverDrawn | null | undefined, darkenStyle: unknown): PictureHoverMoveDrawn | null;
11
+ export declare const PICTURE_FRAME_ONLY: PictureHoverMoveDrawn;
11
12
  export declare function PictureHoverMoveSheet({ move }: {
12
13
  move: PictureHoverMoveDrawn | null;
13
14
  }): import("react").JSX.Element | null;
@@ -1 +1 @@
1
- import{jsx as n,Fragment as s}from"react/jsx-runtime";import{boxDarkenStyle as m}from"../../format/lib/content/box-background.js";import{PICTURE_MOVE_SHEET as l,PICTURE_ZOOM_CLASS as a,PICTURE_ZOOM_VAR as u,resolvePictureMove as i}from"../../format/lib/content/image-treatment.js";import c from"./PhotoHoverSheet.js";function P(e,t){const o=i(e);if(!o)return null;const r=e?.zoom??null;return{className:o.className??"",style:{...o.style??{},...r?{[u]:r}:{}},...o.sheet?{sheet:o.sheet}:{},zoom:r,washHover:e?.darken?m(e.darken,t):null}}function x({move:e}){return e?n(c,{sheet:e.sheet,name:l}):null}function E({move:e,className:t,children:o}){return e?.zoom?n("div",{className:`${t} ${a}`,children:o}):n(s,{children:o})}export{x as PictureHoverMoveSheet,E as PictureHoverZoom,P as pictureHoverMoveOf};
1
+ import{jsx as n,Fragment as s}from"react/jsx-runtime";import{boxDarkenStyle as l}from"../../format/lib/content/box-background.js";import{PICTURE_FRAME_CLASS as m,PICTURE_MOVE_SHEET as a,PICTURE_ZOOM_CLASS as u,PICTURE_ZOOM_VAR as c,resolvePictureMove as _}from"../../format/lib/content/image-treatment.js";import h from"./PhotoHoverSheet.js";function v(e,t){const o=_(e);if(!o)return null;const r=e?.zoom??null;return{className:o.className??"",style:{...o.style??{},...r?{[c]:r}:{}},...o.sheet?{sheet:o.sheet}:{},zoom:r,washHover:e?.darken?l(e.darken,t):null}}const M={className:m,style:{},zoom:null,washHover:null};function R({move:e}){return e?n(h,{sheet:e.sheet,name:a}):null}function S({move:e,className:t,children:o}){return e?.zoom?n("div",{className:`${t} ${u}`,children:o}):n(s,{children:o})}export{M as PICTURE_FRAME_ONLY,R as PictureHoverMoveSheet,S as PictureHoverZoom,v as pictureHoverMoveOf};
@@ -2,6 +2,7 @@ import { type ReactNode } from "react";
2
2
  import { type CardGap, type CardShadow, type HoverEffect, type HeadingCompression, type ResolvedHeadingTypography, type SizesValue, type ThemeMode, type ThemeValue } from "../../format/lib/theme.js";
3
3
  import { type FontsValue } from "../../format/lib/fonts.js";
4
4
  import type { PreviewHeaderSettings } from "../../format/lib/preview-header-settings.js";
5
+ import type { SiteLengthUnits } from "../../format/lib/content/css-length.js";
5
6
  import type { ResolvedWordStyle, WordStyleName } from "../../format/lib/word-styles.js";
6
7
  export type { PreviewHeaderSettings };
7
8
  type Ctx = {
@@ -46,6 +47,7 @@ type Ctx = {
46
47
  siteGutterPhone: number | null;
47
48
  blockGap: number | null;
48
49
  blockGapPhone: number | null;
50
+ siteLengthUnits: SiteLengthUnits;
49
51
  setSiteGutter: (v: number | null) => void;
50
52
  setSiteGutterPhone: (v: number | null) => void;
51
53
  setBlockGap: (v: number | null) => void;
@@ -63,7 +65,7 @@ type Ctx = {
63
65
  themeFromDocument: boolean;
64
66
  };
65
67
  export declare const PreviewHeaderContext: import("react").Context<Ctx>;
66
- export declare function PreviewHeaderProvider({ children, websiteName, templateChrome, templateName, chromePlaceholder, themeMode, onThemeModeChange, themeSwitchShown, onThemeSwitchShownChange, theme, themeRow, onThemeChange, fonts, onFontsChange, sizes, onSizesChange, cornerRadiusPx, onCornerRadiusPxChange, cardShadow, onCardShadowChange, shadowColor, onShadowColorChange, cardGap, onCardGapChange, hoverEffect, onHoverEffectChange, headingCompression, onHeadingCompressionChange, siteWidth, onSiteWidthChange, siteGutter, siteGutterPhone, blockGap, blockGapPhone, onSiteGutterChange, onSiteGutterPhoneChange, onBlockGapChange, onBlockGapPhoneChange, headingTypography, onHeadingTypographyChange, textStyles, onTextStylesChange, wordStyles, heroBackgroundFollowsWidth, onHeroBackgroundFollowsWidthChange, sectionBackgroundWidth, onSectionBackgroundWidthChange, sectionContentWidth, onSectionContentWidthChange, photographyGrayscale, onPhotographyGrayscaleChange, shareButtonOnPosts, onShareButtonOnPostsChange, themeFromDocument, }: {
68
+ export declare function PreviewHeaderProvider({ children, websiteName, templateChrome, templateName, chromePlaceholder, themeMode, onThemeModeChange, themeSwitchShown, onThemeSwitchShownChange, theme, themeRow, onThemeChange, fonts, onFontsChange, sizes, onSizesChange, cornerRadiusPx, onCornerRadiusPxChange, cardShadow, onCardShadowChange, shadowColor, onShadowColorChange, cardGap, onCardGapChange, hoverEffect, onHoverEffectChange, headingCompression, onHeadingCompressionChange, siteWidth, onSiteWidthChange, siteGutter, siteGutterPhone, blockGap, blockGapPhone, siteLengthUnits, onSiteGutterChange, onSiteGutterPhoneChange, onBlockGapChange, onBlockGapPhoneChange, headingTypography, onHeadingTypographyChange, textStyles, onTextStylesChange, wordStyles, heroBackgroundFollowsWidth, onHeroBackgroundFollowsWidthChange, sectionBackgroundWidth, onSectionBackgroundWidthChange, sectionContentWidth, onSectionContentWidthChange, photographyGrayscale, onPhotographyGrayscaleChange, shareButtonOnPosts, onShareButtonOnPostsChange, themeFromDocument, }: {
67
69
  children: ReactNode;
68
70
  websiteName?: string | null;
69
71
  templateChrome?: boolean;
@@ -96,6 +98,7 @@ export declare function PreviewHeaderProvider({ children, websiteName, templateC
96
98
  siteGutter?: number | null;
97
99
  blockGap?: number | null;
98
100
  blockGapPhone?: number | null;
101
+ siteLengthUnits?: SiteLengthUnits;
99
102
  onSiteGutterChange?: (v: number | null) => void;
100
103
  siteGutterPhone?: number | null;
101
104
  onSiteGutterPhoneChange?: (v: number | null) => void;
@@ -1 +1 @@
1
- "use client";import{jsx as B}from"react/jsx-runtime";import{createContext as zt,useCallback as e,useContext as Vt,useMemo as Zt,useState as qt}from"react";import{EditorSiteLogoContext as Jt}from"./SiteLogoContext.js";import{IDENTITY_CARD_GAP as O,DEFAULT_HEADING_COMPRESSION as M,DEFAULT_HEADING_TYPOGRAPHY as g,DEFAULT_SIZES as N,DEFAULT_SWITCH_SHOWN as Y,DEFAULT_THEME_MODE as b,DEFAULT_THEME_VALUE as j}from"../../format/lib/theme.js";import{DEFAULT_FONTS as z}from"../../format/lib/fonts.js";const V=zt({settings:null,setSettings:()=>{},primeSettings:()=>{},websiteName:null,templateChrome:!1,templateName:null,chromePlaceholder:!1,themeMode:b,setThemeMode:()=>{},themeSwitchShown:Y,setThemeSwitchShown:()=>{},theme:j,themeRow:"none",setTheme:()=>{},fonts:z,setFonts:()=>{},sizes:N,setSizes:()=>{},cornerRadiusPx:null,setCornerRadiusPx:()=>{},cardShadow:null,setCardShadow:()=>{},shadowColor:null,setShadowColor:()=>{},cardGap:O,setCardGap:()=>{},hoverEffect:null,setHoverEffect:()=>{},headingCompression:M,setHeadingCompression:()=>{},siteWidth:null,setSiteWidth:()=>{},siteGutter:null,siteGutterPhone:null,blockGap:null,blockGapPhone:null,setSiteGutter:()=>{},setSiteGutterPhone:()=>{},setBlockGap:()=>{},setBlockGapPhone:()=>{},headingTypography:g,setHeadingTypography:()=>{},textStyles:null,setTextStyles:()=>{},wordStyles:null,heroBackgroundFollowsWidth:null,setHeroBackgroundFollowsWidth:()=>{},sectionBackgroundWidth:null,setSectionBackgroundWidth:()=>{},sectionContentWidth:null,setSectionContentWidth:()=>{},photographyGrayscale:null,setPhotographyGrayscale:()=>{},shareButtonOnPosts:null,setShareButtonOnPosts:()=>{},themeFromDocument:!1});function ee({children:o,websiteName:s=null,templateChrome:l=!1,templateName:r=null,chromePlaceholder:u=!1,themeMode:Z=b,onThemeModeChange:i,themeSwitchShown:q=Y,onThemeSwitchShownChange:c,theme:J=j,themeRow:K="none",onThemeChange:d,fonts:Q=z,onFontsChange:S,sizes:X=N,onSizesChange:a,cornerRadiusPx:$=null,onCornerRadiusPxChange:p,cardShadow:C=null,onCardShadowChange:m,shadowColor:tt=null,onShadowColorChange:h,cardGap:et=O,onCardGapChange:f,hoverEffect:st=null,onHoverEffectChange:E,headingCompression:ot=M,onHeadingCompressionChange:T,siteWidth:lt=null,onSiteWidthChange:P,siteGutter:nt=null,siteGutterPhone:rt=null,blockGap:ut=null,blockGapPhone:it=null,onSiteGutterChange:x,onSiteGutterPhoneChange:w,onBlockGapChange:D,onBlockGapPhoneChange:F,headingTypography:ct=g,onHeadingTypographyChange:G,textStyles:dt=null,onTextStylesChange:_,wordStyles:St=null,heroBackgroundFollowsWidth:at=null,onHeroBackgroundFollowsWidthChange:k,sectionBackgroundWidth:pt=null,onSectionBackgroundWidthChange:H,sectionContentWidth:mt=null,onSectionContentWidthChange:A,photographyGrayscale:ht=null,onPhotographyGrayscaleChange:v,shareButtonOnPosts:ft=null,onShareButtonOnPostsChange:W,themeFromDocument:Et=!1}){const[n,y]=qt(null),Tt=e(t=>y(jt=>jt??t),[]),Pt=e(t=>i?.(t),[i]),xt=e(t=>c?.(t),[c]),wt=e(t=>d?.(t),[d]),Dt=e(t=>S?.(t),[S]),Ft=e(t=>a?.(t),[a]),Gt=e(t=>P?.(t),[P]),_t=e(t=>x?.(t),[x]),kt=e(t=>w?.(t),[w]),Ht=e(t=>D?.(t),[D]),At=e(t=>F?.(t),[F]),vt=e(t=>k?.(t),[k]),Wt=e(t=>H?.(t),[H]),yt=e(t=>A?.(t),[A]),It=e(t=>v?.(t),[v]),Lt=e(t=>W?.(t),[W]),Ut=e(t=>p?.(t),[p]),Rt=e(t=>m?.(t),[m]),Bt=e(t=>h?.(t),[h]),Ot=e(t=>f?.(t),[f]),Mt=e(t=>E?.(t),[E]),gt=e(t=>T?.(t),[T]),Nt=e(t=>G?.(t),[G]),Yt=e(t=>_?.(t),[_]),I=n?.logoUrl,L=n?.logoReversed,U=n?.logoInkIsDark,R=n!==null,bt=Zt(()=>({logo:R?{logoUrl:I,logoReversed:L,logoInkIsDark:U}:null,placeholder:l||u,wordmark:l?r:s}),[R,I,L,U,l,u,r,s]);return B(Jt.Provider,{value:bt,children:B(V.Provider,{value:{settings:n,setSettings:y,primeSettings:Tt,websiteName:s,templateChrome:l,templateName:r,chromePlaceholder:u,themeMode:Z,setThemeMode:Pt,themeSwitchShown:q,setThemeSwitchShown:xt,theme:J,themeRow:K,setTheme:wt,fonts:Q,setFonts:Dt,sizes:X,setSizes:Ft,cornerRadiusPx:$,setCornerRadiusPx:Ut,cardShadow:C,setCardShadow:Rt,shadowColor:tt,setShadowColor:Bt,cardGap:et,setCardGap:Ot,hoverEffect:st,setHoverEffect:Mt,headingCompression:ot,setHeadingCompression:gt,siteWidth:lt,setSiteWidth:Gt,siteGutter:nt,siteGutterPhone:rt,blockGap:ut,blockGapPhone:it,setSiteGutter:_t,setSiteGutterPhone:kt,setBlockGap:Ht,setBlockGapPhone:At,headingTypography:ct,setHeadingTypography:Nt,textStyles:dt,setTextStyles:Yt,wordStyles:St,heroBackgroundFollowsWidth:at,setHeroBackgroundFollowsWidth:vt,sectionBackgroundWidth:pt,setSectionBackgroundWidth:Wt,sectionContentWidth:mt,setSectionContentWidth:yt,photographyGrayscale:ht,setPhotographyGrayscale:It,shareButtonOnPosts:ft,setShareButtonOnPosts:Lt,themeFromDocument:Et},children:o})})}const Kt=()=>Vt(V);function se(o,s,l){return o?s===l?"read":"loading":"none"}function oe(o,s){return{value:o,readFor:s}}function le(o,s,l){return{value:s,readFor:o.readFor===l?l:null}}function ne(){const{sectionContentWidth:o,themeFromDocument:s}=Kt();return s?null:o}export{V as PreviewHeaderContext,ee as PreviewHeaderProvider,se as siteThemeRow,le as themeEdited,oe as themeSeeded,Kt as usePreviewHeader,ne as useSiteContentWidth};
1
+ "use client";import{jsx as R}from"react/jsx-runtime";import{createContext as Zt,useCallback as e,useContext as qt,useMemo as Jt,useState as Kt}from"react";import{EditorSiteLogoContext as Qt}from"./SiteLogoContext.js";import{IDENTITY_CARD_GAP as B,DEFAULT_HEADING_COMPRESSION as M,DEFAULT_HEADING_TYPOGRAPHY as N,DEFAULT_SIZES as g,DEFAULT_SWITCH_SHOWN as Y,DEFAULT_THEME_MODE as b,DEFAULT_THEME_VALUE as j}from"../../format/lib/theme.js";import{DEFAULT_FONTS as z}from"../../format/lib/fonts.js";const V={},Z=Zt({settings:null,setSettings:()=>{},primeSettings:()=>{},websiteName:null,templateChrome:!1,templateName:null,chromePlaceholder:!1,themeMode:b,setThemeMode:()=>{},themeSwitchShown:Y,setThemeSwitchShown:()=>{},theme:j,themeRow:"none",setTheme:()=>{},fonts:z,setFonts:()=>{},sizes:g,setSizes:()=>{},cornerRadiusPx:null,setCornerRadiusPx:()=>{},cardShadow:null,setCardShadow:()=>{},shadowColor:null,setShadowColor:()=>{},cardGap:B,setCardGap:()=>{},hoverEffect:null,setHoverEffect:()=>{},headingCompression:M,setHeadingCompression:()=>{},siteWidth:null,setSiteWidth:()=>{},siteGutter:null,siteGutterPhone:null,blockGap:null,blockGapPhone:null,siteLengthUnits:V,setSiteGutter:()=>{},setSiteGutterPhone:()=>{},setBlockGap:()=>{},setBlockGapPhone:()=>{},headingTypography:N,setHeadingTypography:()=>{},textStyles:null,setTextStyles:()=>{},wordStyles:null,heroBackgroundFollowsWidth:null,setHeroBackgroundFollowsWidth:()=>{},sectionBackgroundWidth:null,setSectionBackgroundWidth:()=>{},sectionContentWidth:null,setSectionContentWidth:()=>{},photographyGrayscale:null,setPhotographyGrayscale:()=>{},shareButtonOnPosts:null,setShareButtonOnPosts:()=>{},themeFromDocument:!1});function oe({children:o,websiteName:s=null,templateChrome:l=!1,templateName:r=null,chromePlaceholder:u=!1,themeMode:q=b,onThemeModeChange:i,themeSwitchShown:J=Y,onThemeSwitchShownChange:c,theme:K=j,themeRow:Q="none",onThemeChange:d,fonts:X=z,onFontsChange:S,sizes:$=g,onSizesChange:a,cornerRadiusPx:C=null,onCornerRadiusPxChange:p,cardShadow:tt=null,onCardShadowChange:h,shadowColor:et=null,onShadowColorChange:m,cardGap:st=B,onCardGapChange:E,hoverEffect:ot=null,onHoverEffectChange:T,headingCompression:lt=M,onHeadingCompressionChange:f,siteWidth:nt=null,onSiteWidthChange:P,siteGutter:rt=null,siteGutterPhone:ut=null,blockGap:it=null,blockGapPhone:ct=null,siteLengthUnits:dt=V,onSiteGutterChange:_,onSiteGutterPhoneChange:x,onBlockGapChange:G,onBlockGapPhoneChange:w,headingTypography:St=N,onHeadingTypographyChange:D,textStyles:at=null,onTextStylesChange:F,wordStyles:pt=null,heroBackgroundFollowsWidth:ht=null,onHeroBackgroundFollowsWidthChange:H,sectionBackgroundWidth:mt=null,onSectionBackgroundWidthChange:k,sectionContentWidth:Et=null,onSectionContentWidthChange:A,photographyGrayscale:Tt=null,onPhotographyGrayscaleChange:I,shareButtonOnPosts:ft=null,onShareButtonOnPostsChange:v,themeFromDocument:Pt=!1}){const[n,L]=Kt(null),_t=e(t=>L(Vt=>Vt??t),[]),xt=e(t=>i?.(t),[i]),Gt=e(t=>c?.(t),[c]),wt=e(t=>d?.(t),[d]),Dt=e(t=>S?.(t),[S]),Ft=e(t=>a?.(t),[a]),Ht=e(t=>P?.(t),[P]),kt=e(t=>_?.(t),[_]),At=e(t=>x?.(t),[x]),It=e(t=>G?.(t),[G]),vt=e(t=>w?.(t),[w]),Lt=e(t=>H?.(t),[H]),Ut=e(t=>k?.(t),[k]),Wt=e(t=>A?.(t),[A]),yt=e(t=>I?.(t),[I]),Ot=e(t=>v?.(t),[v]),Rt=e(t=>p?.(t),[p]),Bt=e(t=>h?.(t),[h]),Mt=e(t=>m?.(t),[m]),Nt=e(t=>E?.(t),[E]),gt=e(t=>T?.(t),[T]),Yt=e(t=>f?.(t),[f]),bt=e(t=>D?.(t),[D]),jt=e(t=>F?.(t),[F]),U=n?.logoUrl,W=n?.logoReversed,y=n?.logoInkIsDark,O=n!==null,zt=Jt(()=>({logo:O?{logoUrl:U,logoReversed:W,logoInkIsDark:y}:null,placeholder:l||u,wordmark:l?r:s}),[O,U,W,y,l,u,r,s]);return R(Qt.Provider,{value:zt,children:R(Z.Provider,{value:{settings:n,setSettings:L,primeSettings:_t,websiteName:s,templateChrome:l,templateName:r,chromePlaceholder:u,themeMode:q,setThemeMode:xt,themeSwitchShown:J,setThemeSwitchShown:Gt,theme:K,themeRow:Q,setTheme:wt,fonts:X,setFonts:Dt,sizes:$,setSizes:Ft,cornerRadiusPx:C,setCornerRadiusPx:Rt,cardShadow:tt,setCardShadow:Bt,shadowColor:et,setShadowColor:Mt,cardGap:st,setCardGap:Nt,hoverEffect:ot,setHoverEffect:gt,headingCompression:lt,setHeadingCompression:Yt,siteWidth:nt,setSiteWidth:Ht,siteGutter:rt,siteGutterPhone:ut,blockGap:it,blockGapPhone:ct,siteLengthUnits:dt,setSiteGutter:kt,setSiteGutterPhone:At,setBlockGap:It,setBlockGapPhone:vt,headingTypography:St,setHeadingTypography:bt,textStyles:at,setTextStyles:jt,wordStyles:pt,heroBackgroundFollowsWidth:ht,setHeroBackgroundFollowsWidth:Lt,sectionBackgroundWidth:mt,setSectionBackgroundWidth:Ut,sectionContentWidth:Et,setSectionContentWidth:Wt,photographyGrayscale:Tt,setPhotographyGrayscale:yt,shareButtonOnPosts:ft,setShareButtonOnPosts:Ot,themeFromDocument:Pt},children:o})})}const Xt=()=>qt(Z);function le(o,s,l){return o?s===l?"read":"loading":"none"}function ne(o,s){return{value:o,readFor:s}}function re(o,s,l){return{value:s,readFor:o.readFor===l?l:null}}function ue(){const{sectionContentWidth:o,themeFromDocument:s}=Xt();return s?null:o}export{Z as PreviewHeaderContext,oe as PreviewHeaderProvider,le as siteThemeRow,re as themeEdited,ne as themeSeeded,Xt as usePreviewHeader,ue as useSiteContentWidth};
@@ -17,10 +17,16 @@ export type BlockSize = {
17
17
  style: Record<string, string>;
18
18
  attrs: Record<string, string>;
19
19
  };
20
+ export declare const BLOCK_WIDTH_MODE_ATTR: {
21
+ readonly fill: "data-sf-width-fill";
22
+ readonly fixed: "data-sf-width-fixed";
23
+ };
24
+ export declare const BLOCK_MIN_WIDTH_ATTR = "data-sf-min-width";
20
25
  export type BlockSizeLine = {
21
26
  readonly atSectionLine?: boolean;
22
27
  };
23
28
  export declare function blockFillInCellClass(values: BlockSizeValues): string;
29
+ export declare function blockCanvasWidthAttrs(values: BlockSizeValues): Record<string, string>;
24
30
  export declare function blockSizeOf(values: BlockSizeValues, { atSectionLine: storedLine }?: BlockSizeLine): BlockSize | null;
25
31
  export declare function blockSetsItsWidth(values: BlockSizeValues): boolean;
26
32
  export declare function blockCanWidenPastCell(values: BlockSizeValues): boolean;
@@ -1 +1 @@
1
- import{BLOCK_FIXED_WIDTH as ee,BLOCK_SIZE_KEYS as te,parseBlockWidthFit as S,phoneKey as R,parseTextFit as L,tabletKey as z,viewKeyAt as M}from"efficient-easel/draw";import{sideLengthAt as ie}from"efficient-easel/screen/lib/content/length-units";import{TEXT_FIT_ATTR as m}from"../../../format/lib/fit-words.js";import{cssLengthOf as j}from"../../../format/lib/content/css-length.js";import{tierOfView as W}from"../../../format/lib/content/view-tier.js";const oe="sf-block-size",V=["width","minWidth","maxWidth"],Y=e=>`${e}Unit`,l=e=>typeof e=="number"&&Number.isFinite(e)&&e>=0?e:void 0,ne={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"}},U={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"}},se={desktop:U.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"}},we={two:{desktop:"view-wide:[.flex-row>*>&]:grow"},three:{desktop:"view-desktop:[.flex-row>*>&]:grow",tablet:"view-wide:max-view-desktop:[.flex-row>*>&]:grow"}},de={desktop:"--sf-bw",tablet:"--sf-bw-t",phone:"--sf-bw-p"},ae={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)]"]}},pe={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)]"]}},fe=["widthFit",...V],X={desktop:"view-wide:whitespace-nowrap view-wide:[&_*]:whitespace-nowrap!",phone:"max-view-wide:whitespace-nowrap max-view-wide:[&_*]:whitespace-nowrap!"},N={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!"},me={desktop:N.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!"},Z={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"},le={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:Z.phone},$={desktop:"view-wide:max-w-full",phone:"max-view-wide:max-w-full"},G={desktop:"view-desktop:max-w-full",tablet:"view-wide:max-view-desktop:max-w-full",phone:$.phone};function be(e){const n=q(e);return n.sides.filter(o=>n.mode[o]==="fill").map(o=>we[n.three?"three":"two"][o]).filter(Boolean).join(" ")}function q(e){const n=fe.some(s=>{const a=e[s]?.tablet;return s==="widthFit"?S(a)!==void 0:l(a)!==void 0}),o=n?["desktop","tablet","phone"]:["desktop","phone"],p=(s,a)=>{const t=s(a?.desktop),f=n?s(a?.tablet)??t:t;return{desktop:t,tablet:f,phone:s(a?.phone)??f}};return{three:n,sides:o,perSide:p,lengthPerSide:s=>{const a=Y(s),t={};for(const d of o)t[M(s,W(d))]=l(e[s]?.[d]),t[M(a,W(d))]=e.units?.[s]?.[d];const f=d=>ie(t,{length:s},a,W(d),"length")??void 0;return{desktop:f("desktop"),tablet:f("tablet"),phone:f("phone")}},mode:p(S,e.widthFit)}}function ke(e,{atSectionLine:n=!1}={}){const o=["desktop","tablet","phone"].some(i=>L(e.textFit?.[i])==="ellipsis"),p=n&&!o,k=p?se:U,s=p?pe:E,a=p?me:N,t=[],f={},d={},{three:T,sides:F,lengthPerSide:O,mode:J}=q(e),K=O("width");for(const i of F){const w=J[i];!w||w==="fit"||(t.push(T?k[i][w]:ne[i][w]),w==="fixed"&&(f[de[i]]=j(K[i]?.value??ee.fallback,K[i]?.unit)))}for(const i of V.filter(w=>w!=="width")){const w=O(i);for(const r of F){const c=w[r];if(c===void 0)continue;const[h,b]=T?s[i][r]:ae[i][r];f[h]=j(c.value,c.unit),t.push(b)}}const v=L(e.textFit?.desktop),u=L(e.textFit?.phone),C=i=>{const w=l(e.minFont?.[i]);return w===void 0?void 0:e.units?.minFont?.[i]==="vw"?`${w}vw`:String(w)},g=C("desktop"),I=C("phone"),B=L(e.textFit?.tablet),x=B!==v||u!==void 0?B:void 0,D=C("tablet"),A=D!==g||I!==void 0?D:void 0,H=l(e.maxWidth?.desktop),P=l(e.maxWidth?.tablet)??H,y={desktop:H!==void 0,tablet:P!==void 0,phone:(l(e.maxWidth?.phone)??P)!==void 0},_=(i,w,r)=>{if(w!=="line"&&w!=="ellipsis")return;const c=i==="tablet"?void 0:i,h=(b,Q)=>r||!c?b[i]:Q[c];if(w==="line"){t.push(h(a,X));return}if(t.push(h(N,X)),t.push(h(le,Z)),T&&!r&&i==="desktop")for(const b of["desktop","tablet"])y[b]||t.push(G[b]);else y[i]||t.push(h(G,$))};return x?(_("desktop",v,!0),_("tablet",x,!0),_("phone",u??x,!0)):(_("desktop",v,!1),_("phone",u??v,!1)),v&&(d[m.fit]=v),x&&(d[m.fitTablet]=x),u&&(d[m.fitPhone]=u),g!==void 0&&(d[m.min]=g),A!==void 0&&(d[m.minTablet]=A),I!==void 0&&(d[m.minPhone]=I),!p&&(x||A!==void 0)&&(d[m.edge]=""),t.length===0&&Object.keys(d).length===0?null:{className:[oe,...t].join(" "),style:f,attrs:d}}function ue(e){if(l(e.maxWidth?.desktop)!==void 0)return!0;const n=S(e.widthFit?.desktop);return n==="fill"||n==="fixed"}function _e(e){return["desktop","tablet","phone"].some(o=>{const p=S(e.widthFit?.[o]);return p==="fixed"||p==="fill"||l(e.minWidth?.[o])!==void 0})}function Se(e){const n={};for(const o of te){const p=e[o],k=e[z(o)],s=e[R(o)];(p!==void 0||k!==void 0||s!==void 0)&&(n[o]={desktop:p,tablet:k,phone:s});const a=Y(o),t={desktop:e[a],tablet:e[z(a)],phone:e[R(a)]};(t.desktop!==void 0||t.tablet!==void 0||t.phone!==void 0)&&((n.units??={})[o]=t)}return n}export{V as BLOCK_LENGTH_KEYS,oe as BLOCK_SIZE_CLASS,m as TEXT_FIT_ATTR,_e as blockCanWidenPastCell,be as blockFillInCellClass,Y as blockLengthUnitKey,ue as blockSetsItsWidth,ke as blockSizeOf,Se as blockSizeValuesOf};
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 +1 @@
1
- import{jsx as n}from"react/jsx-runtime";import{sectionBorderUnitsOf as f}from"../../../../../../format/lib/content/borders.js";import{BOX_ANGLE_PROP as g}from"../../../../../../format/lib/content/box-angle.js";import{BOX_SIDE_SPACE_PROP as b}from"../../../../../../format/lib/content/box-side-space.js";import{phoneKey as a,tabletKey as t}from"efficient-easel/draw";import{BOX_SWATCH_PROP as S,boxCardProps as r,boxPaintOf as u}from"../../../../../../format/lib/content/box-background.js";import{BOX_ROW_IMAGE_PROP as w}from"../../../../../../format/lib/content/box-card-rule.js";import{sharedColumnsDrawn as P,sharedRowsDrawn as O}from"../../../../content/box-shared-columns.js";import{CountRowsContext as k,NO_COUNTS as y}from"../../../../../components/CountRowsContext.js";import{RowEmptyGate as C}from"../../../../../components/CardRowContext.js";import{BOX_HIDE_WHEN_ROW_EMPTY as T,CARD_ROW_LINK_PROP as _,namedRowField as d}from"../../../../../../format/lib/content/card-template.js";import R from"../../../../../components/Flex.js";import{loopDelayOf as x,loopSecondsOf as D,parseLoop as B,parseLoopDirection as j}from"../../../../../../format/lib/animation/index.js";import{COUNTS_SOURCE as E,declaredBlockSource as H,servedRows as I}from"../../../../../../format/lib/content/block-sources.js";import{padValuesOf as N}from"../../../../content/section-padding.js";import{sectionFillsHeight as v}from"../../../../../../format/lib/content/section-min-height.js";import{boxHighlightStyle as A,pictureHoverOf as F}from"../../../../../../format/lib/animation/hover.js";import{slotCountOf as L}from"../../../slot-counts.js";import{FlexMeta as U}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";const oe={...U,render:e=>{const o=!!e.editor?.isEditing,c=n(R,{direction:e.direction,label:e.label,tabShape:e.tabShape,gap:e.gap,gapPhone:e[a("gap")],gapTablet:e[t("gap")],justify:e.justify,justifyTablet:e[t("justify")],justifyPhone:e[a("justify")],align:e.align,alignTablet:e[t("align")],alignPhone:e[a("align")],wrap:e.wrap,wrapTablet:e[t("wrap")],share:e.share,sharePhone:e[a("share")],shareTablet:e[t("share")],wrapPhone:e[a("wrap")],orderPhone:e[a("order")],phoneRow:e.phoneRow,columns:e.columns,columnsTablet:e[t("columns")],separator:e.separator,stackBelow:e.stackBelow,blockSpacing:e.blockSpacing,blockSpacingTablet:e[t("blockSpacing")],blockSpacingPhone:e[a("blockSpacing")],bgImage:e.bgImage,bgImagePhone:e.bgImagePhone,rowImage:d(e,w),pictureHover:F(e),darken:e.darken,darkenStyle:e.darkenStyle,darkenTablet:e[t("darken")],darkenPhone:e[a("darken")],darkenStyleTablet:e[t("darkenStyle")],darkenStylePhone:e[a("darkenStyle")],placement:e.placement,padV2:e.padV2===!0,border:e.sectionBorder,borderTablet:e.sectionBorderTablet,borderPhone:e.sectionBorderPhone,borderUnits:f(e),pad:N(e),contained:e.contained,fillHeight:v(e),shadow:e.shadow,shadowTablet:e[t("shadow")],shadowPhone:e[a("shadow")],loop:B(e.loop),scrollDirection:j(e.scrollDirection),loopSeconds:D({loopDuration:e.loopDuration}),loopDelay:x({loopDelay:e.loopDelay}),editing:o,fillColor:e.fillColor,fillColorTablet:e[t("fillColor")],fillColorPhone:e[a("fillColor")],swatch:e[S],line:e.line,upcoming:e.upcoming,link:e.link,rowLink:d(e,_),highlight:A(e,m=>u(m)??""),boxShape:e.boxShape,boxShapePhone:e[a("boxShape")],boxShapeTablet:e[t("boxShape")],angle:e[g],jumpHighlight:e.jumpHighlight,anchor:e.anchor,sharedSides:P(r(e,!1)),sharedRows:O(r(e,!1)),boxId:typeof e.id=="string"?e.id:void 0,slotCount:L(e),mirrorCards:e.mirrorCards,content:e.content,rowTitle:e.rowTitle,startsOpen:e.startsOpen,rowStyle:e.rowStyle,sideSpace:e[b]}),l=H(e),h=l?l===E?I(e):y:null,i=n(k.Provider,{value:h,children:c});return e[T]===void 0?i:n(C,{props:e,editing:o,children:i})}};export{oe as FlexRender};
1
+ import{jsx as n}from"react/jsx-runtime";import{sectionBorderUnitsOf as f}from"../../../../../../format/lib/content/borders.js";import{BOX_ANGLE_PROP as g}from"../../../../../../format/lib/content/box-angle.js";import{BOX_SIDE_SPACE_PROP as b}from"../../../../../../format/lib/content/box-side-space.js";import{phoneKey as a,tabletKey as t}from"efficient-easel/draw";import{BOX_SWATCH_PROP as S,boxCardProps as r,boxPaintOf as u}from"../../../../../../format/lib/content/box-background.js";import{BOX_ROW_IMAGE_PROP as w}from"../../../../../../format/lib/content/box-card-rule.js";import{sharedColumnsDrawn as P,sharedRowsDrawn as O}from"../../../../content/box-shared-columns.js";import{CountRowsContext as k,NO_COUNTS as y}from"../../../../../components/CountRowsContext.js";import{RowEmptyGate as _}from"../../../../../components/CardRowContext.js";import{BOX_HIDE_WHEN_ROW_EMPTY as C,CARD_ROW_LINK_PROP as T,namedRowField as d}from"../../../../../../format/lib/content/card-template.js";import x from"../../../../../components/Flex.js";import{loopDelayOf as R,loopSecondsOf as B,parseLoop as D,parseLoopDirection as E}from"../../../../../../format/lib/animation/index.js";import{COUNTS_SOURCE as H,declaredBlockSource as j,servedRows as I}from"../../../../../../format/lib/content/block-sources.js";import{padValuesOf as v}from"../../../../content/section-padding.js";import{sectionFillsHeight as F}from"../../../../../../format/lib/content/section-min-height.js";import{BOX_SHOW_KEY as N,boxHighlightStyle as W,pictureHoverOf as X}from"../../../../../../format/lib/animation/hover.js";import{slotCountOf as A}from"../../../slot-counts.js";import{FlexMeta as L}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";const le={...L,render:e=>{const o=!!e.editor?.isEditing,h=n(x,{direction:e.direction,label:e.label,tabShape:e.tabShape,gap:e.gap,gapPhone:e[a("gap")],gapTablet:e[t("gap")],justify:e.justify,justifyTablet:e[t("justify")],justifyPhone:e[a("justify")],align:e.align,alignTablet:e[t("align")],alignPhone:e[a("align")],wrap:e.wrap,wrapTablet:e[t("wrap")],share:e.share,sharePhone:e[a("share")],shareTablet:e[t("share")],wrapPhone:e[a("wrap")],orderPhone:e[a("order")],phoneRow:e.phoneRow,columns:e.columns,columnsTablet:e[t("columns")],separator:e.separator,stackBelow:e.stackBelow,blockSpacing:e.blockSpacing,blockSpacingTablet:e[t("blockSpacing")],blockSpacingPhone:e[a("blockSpacing")],bgImage:e.bgImage,bgImagePhone:e.bgImagePhone,rowImage:d(e,w),pictureHover:X(e,"Flex"),hoverShow:e[N],darken:e.darken,darkenStyle:e.darkenStyle,darkenTablet:e[t("darken")],darkenPhone:e[a("darken")],darkenStyleTablet:e[t("darkenStyle")],darkenStylePhone:e[a("darkenStyle")],placement:e.placement,padV2:e.padV2===!0,border:e.sectionBorder,borderTablet:e.sectionBorderTablet,borderPhone:e.sectionBorderPhone,borderUnits:f(e),pad:v(e),contained:e.contained,fillHeight:F(e),shadow:e.shadow,shadowTablet:e[t("shadow")],shadowPhone:e[a("shadow")],loop:D(e.loop),scrollDirection:E(e.scrollDirection),loopSeconds:B({loopDuration:e.loopDuration}),loopDelay:R({loopDelay:e.loopDelay}),editing:o,fillColor:e.fillColor,fillColorTablet:e[t("fillColor")],fillColorPhone:e[a("fillColor")],swatch:e[S],line:e.line,upcoming:e.upcoming,link:e.link,rowLink:d(e,T),highlight:W(e,m=>u(m)??""),boxShape:e.boxShape,boxShapePhone:e[a("boxShape")],boxShapeTablet:e[t("boxShape")],angle:e[g],jumpHighlight:e.jumpHighlight,anchor:e.anchor,sharedSides:P(r(e,!1)),sharedRows:O(r(e,!1)),boxId:typeof e.id=="string"?e.id:void 0,slotCount:A(e),mirrorCards:e.mirrorCards,content:e.content,rowTitle:e.rowTitle,startsOpen:e.startsOpen,rowStyle:e.rowStyle,sideSpace:e[b]}),l=j(e),c=l?l===H?I(e):y:null,i=n(k.Provider,{value:c,children:h});return e[C]===void 0?i:n(_,{props:e,editing:o,children:i})}};export{le as FlexRender};
@@ -1 +1 @@
1
- import{jsx as g}from"react/jsx-runtime";import{phoneKey as R}from"efficient-easel/draw";import{CardRowDrawn as v}from"../../../../../components/CardRowContext.js";import O from"../../../../../components/ImageBlock.js";import{recordPictureAlt as x}from"../../../../../../format/lib/content/record-row.js";import{CARD_ROW_LINK_PROP as B,namedRowField as h,rowFieldSpec as P,rowFieldText as S}from"../../../../../../format/lib/content/card-template.js";import{cardRowHoverMedia as b}from"../../../../../../format/lib/content/hover-media.js";import{blockSizeOf as F,blockSizeValuesOf as _}from"../../../../content/block-size.js";import{padValuesOf as z}from"../../../../content/section-padding.js";import{pictureHoverOf as H}from"../../../../../../format/lib/animation/hover.js";import{viewFocusValues as K}from"../../../../../../format/lib/content/picture-focus-rows.js";import{ImageBlockMeta as V}from"../../../../../../format/lib/document/blocks/general/ImageBlock/meta.js";const G={...V,render:e=>{const r=H(e,"ImageBlock"),o=h(e),i=h(e,B);return!o&&!i&&r.kind!=="nextImage"?w(e,e.src,e.alt,r):g(v,{type:"ImageBlock",props:e,children:(t,n,a)=>{const d=o?P(n,o):null,l=o?n?d?.alt:x(o):null,f=o?t.src:e.src,c=(l&&S(a,l))??e.alt,m=r.media?b(n,r.media):null,s=S(a,"name")??(typeof c=="string"?c:""),u=i?t.href:e.href;return w({...e,href:u},f,c,r,m&&r.media?{media:m,name:s,cover:r.media.cover}:null)}})}};function w(e,r,o,i,t=null){const{aspect:n,contained:a,grayscale:d,darken:l,darkenStyle:f,href:c,fit:m,corners:s,cornerSides:u,cornersUnit:y,editor:I}=e,k=K(e,"focal");return g(O,{src:r,alt:o,aspect:n,aspectPhone:e[R("aspect")],contained:a,grayscale:d,darken:l,darkenStyle:f,pictureHover:i,...t?{hoverLayer:t}:{},href:c,fit:m,focal:k.desktop,focalPhone:k.phone,focalTablet:k.tablet,corners:s,cornerSides:u,cornersUnit:y,pad:z(e),ownSize:F(_(e))!==null,editing:I?.isEditing===!0})}export{G as ImageBlockRender};
1
+ import{jsx as g}from"react/jsx-runtime";import{phoneKey as w}from"efficient-easel/draw";import{CardRowDrawn as I}from"../../../../../components/CardRowContext.js";import R from"../../../../../components/ImageBlock.js";import{recordPictureAlt as O}from"../../../../../../format/lib/content/record-row.js";import{CARD_ROW_LINK_PROP as x,namedRowField as h,rowFieldSpec as B,rowFieldText as P}from"../../../../../../format/lib/content/card-template.js";import{cardRowHoverMedia as b,hoverLayerName as F}from"../../../../../../format/lib/content/hover-media.js";import{blockSizeOf as _,blockSizeValuesOf as z}from"../../../../content/block-size.js";import{padValuesOf as H}from"../../../../content/section-padding.js";import{pictureHoverOf as K}from"../../../../../../format/lib/animation/hover.js";import{viewFocusValues as V}from"../../../../../../format/lib/content/picture-focus-rows.js";import{ImageBlockMeta as j}from"../../../../../../format/lib/document/blocks/general/ImageBlock/meta.js";const G={...j,render:e=>{const r=K(e,"ImageBlock"),o=h(e),a=h(e,x);return!o&&!a&&r.kind!=="nextImage"?y(e,e.src,e.alt,r):g(I,{type:"ImageBlock",props:e,children:(t,n,i)=>{const d=o?B(n,o):null,l=o?n?d?.alt:O(o):null,f=o?t.src:e.src,c=(l&&P(i,l))??e.alt,m=r.media?b(n,r.media):null,s=F(i,typeof c=="string"?c:""),u=a?t.href:e.href;return y({...e,href:u},f,c,r,m&&r.media?{media:m,name:s,cover:r.media.cover}:null)}})}};function y(e,r,o,a,t=null){const{aspect:n,contained:i,grayscale:d,darken:l,darkenStyle:f,href:c,fit:m,corners:s,cornerSides:u,cornersUnit:S,editor:v}=e,k=V(e,"focal");return g(R,{src:r,alt:o,aspect:n,aspectPhone:e[w("aspect")],contained:i,grayscale:d,darken:l,darkenStyle:f,pictureHover:a,...t?{hoverLayer:t}:{},href:c,fit:m,focal:k.desktop,focalPhone:k.phone,focalTablet:k.tablet,corners:s,cornerSides:u,cornersUnit:S,pad:H(e),ownSize:_(z(e))!==null,editing:v?.isEditing===!0})}export{G as ImageBlockRender};
@@ -1,2 +1,2 @@
1
- import{SPLITTABLE_SECTIONS as k}from"../../../../../format/lib/sections/section-head-placement.js";import{AUTO_COLUMN as I,BUTTON as A,DIM as M,INNER_BOX as r,SH_LINK as W,TEXT as h,smallText as C}from"./section-to-box-row-parts.js";import{labelTextSeed as R}from"../../../../../format/lib/document/text-seeds.js";import{labelStyle as P,token as a}from"../../../../../format/lib/document/seed-parts.js";import{tabletKey as x}from"efficient-easel/draw";import{BOX_DESKTOP_LINE as H,STACK_BELOW_PROP as D}from"../../../content/box-stack-line.js";function w(e){if(e==="ProductGrid")return"shelf";const t=k[e]?.headStyle;return t==="editorial"||t==="simple"||t==="essay"?t:"standard"}const ee={standard:64,editorial:60,simple:36,essay:28,shelf:20},F={SectionHeader:"accent",FAQ:"accent",FitmentFinder:"accent",FitmentTable:"accent",SpecTable:"accent",RelatedProducts:"accent",Collections:"accentNum"};function K(e){if(e==="SectionHeader")return{num:"num",title:"title",description:"description",link:!0};const t=k[e];if(!t)throw new Error(`section-head-looks: "${e}" has no head row in SPLITTABLE_SECTIONS`);return{num:t.num,title:t.title,description:t.description,link:t.headRows.includes("linkText")&&t.headRows.includes("linkHref")}}function te(e,t,n){const i=`editorial:${e}|${t}|${n}`,o=p.get(i);if(o)return o;const l=L({num:e,title:t,description:n,link:!1});return p.set(i,l),l}const b={[D]:H},u={top:0,right:0,bottom:1,left:0};import{token as ae}from"../../../../../format/lib/document/seed-parts.js";const _=(e,t,n,i)=>({sizeToken:{step:e,px:i,fluid:{minPx:t,vw:n}}}),c=(e,t,n={})=>C(e,{...a("label",t),...n}),d=(e,t)=>({kind:"text",key:e,role:"heading",props:h,style:{textStyle:"heading-2",...t}}),m=800,z=H,f=(e,t,n,i,o={})=>({kind:"text",key:e,props:{...M,align:"right",alignPhone:"left",...n?{maxWidth:n,maxWidthPhone:m}:{},...o},style:{textStyle:"body-5",fontRole:"heading",alignPhone:"left",...a("body",t),...i,...o}}),E={...A,align:"right",alignPhone:"left",...W},T=e=>({kind:"button",key:"linkText",href:"linkHref",variant:"ghost",props:E,style:{...P(e),color:"labels"}}),N=(e,t,n)=>{const i=n.role==="heading"?{tag:"h2"}:{};return{kind:"block",type:"Text",when:o=>o[e]===void 0,props:{...h,...i,...n.props,text:t,_partStyles:{text:{...n.role==="eyebrow"?U(R()):{},...n.style}}}}},U=e=>e._partStyles.text??{},s={widthFitPhone:"fill"};function j(e){if(e.kind!=="group")return e;if(e.name==="Words"){const t=e.props;return{...e,props:typeof t=="function"?(n,i)=>({...t(n,i),...s}):{...t,...s}}}return{...e,parts:e.parts.map(j)}}function $(e,t){const n=F[e],i=n==="accent",o=c(t.num,14,{color:i?"accent":"labels"}),l=n==="accentNum"&&o.kind==="text"?{...o,mark:"accentLead"}:o,S=d(t.title,i?{..._("headingMedium",36,5,64),case:"upper",lineHeight:.95,letterSpacing:-.025}:{...a("headingMedium",56,36),case:"none",lineHeight:1,letterSpacing:-.03}),g=e==="Collections";return{kind:"group",name:"Header",props:{...r,direction:"row",align:"end",justify:"between",gap:40,gapPhone:12,share:"content",sectionBorder:u,sectionPaddingBottom:24,sectionPaddingBottomPhone:20},parts:[{kind:"group",name:"Title",props:{...r,...s,direction:"row",align:"end",gap:40,gapPhone:12,share:"content"},parts:[{kind:"group",name:"Number",props:{...r,...s,align:"start",gap:12},parts:[{kind:"image",key:"logoSrc",alt:"logoAlt",props:{aspect:"auto",contained:!1}},l,...g?[N(t.num,"==01== / Collections",l)]:[]]},{kind:"group",name:"Heading",props:{...r,...s},parts:[S,...g?[N(t.title,`Three ranges,
2
- one standard.`,S)]:[]]}]},{kind:"group",name:"Words",props:{...r,...s,gap:12,maxWidth:340,maxWidthPhone:m},parts:[...t.description?[f(t.description,14,void 0,{lineHeight:1.5})]:[],...t.link?[T(14)]:[],...g?[{kind:"block",type:"ButtonBlock",props:{...E,variant:"ghost",label:"View all",href:"/wheels",_partStyles:{label:T(14).style}}}]:[]]}]}}function O(e,t){return e.kind==="text"?t.includes(e.key)?{...e,mark:"accentItalic"}:e:e.kind==="group"?{...e,parts:e.parts.map(n=>O(n,t))}:e}function L(e){const t=d(e.title,{..._("headingMedium",40,5.5,80),case:"upper",weight:500,lineHeight:1,letterSpacing:-.03});return{kind:"group",name:"Header",props:{...r,direction:"row",align:"end",justify:"between",gap:40,gapPhone:14,share:"content",sectionBorder:u,sectionPaddingBottom:32,...b},parts:[{kind:"group",name:"Title",props:{...r,direction:"row",align:"end",gap:40,gapPhone:14,share:"content",...b},parts:[{kind:"group",name:"Number",props:{...r,sectionPaddingBottom:8},parts:[{...c(e.num,13),props:{...h,...I}}]},O(t,[e.title])]},{kind:"group",name:"Words",props:{...r,sectionPaddingBottom:4,maxWidth:360,[x("maxWidth")]:z,maxWidthPhone:m},parts:e.description?[f(e.description,14,void 0,{lineHeight:1.5},{[x("align")]:"left"})]:[]}]}}function y(e,t){return{kind:"group",name:"Header",props:{...r,gap:16,gapPhone:16},parts:[c(e.num,13),d(e.title,t)]}}const B=[["para",{...P(13),weight:400,lineHeight:1,letterSpacing:.22}],["sm",{...a("headingMedium",40,28),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["md",{...a("headingMedium",48,32),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["lg",{...a("headingMedium",56,36),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["xl",{...a("headingMedium",64,40),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}]],v=e=>B.some(([t])=>t===e.titleSize)?e.titleSize:"lg";function X(e){return{kind:"group",name:"Header",props:{...r,direction:"row",align:"center",justify:"between",gap:16,share:"content",stickTop:!0,sectionBorder:u,sectionPaddingTop:12,sectionPaddingBottom:12},parts:[{kind:"group",name:"Title",props:{...r,direction:"row",align:"end",gap:24,share:"content"},parts:[c(e.num,13,{color:"labels",letterSpacing:.22,lineHeight:1}),...B.map(([t,n])=>({...d(e.title,n),when:i=>v(i)===t}))]},{kind:"group",name:"Words",props:{...r,direction:"row",align:"center",justify:"end",gap:20,share:"content"},parts:[...e.description?[f(e.description,13,340,{lineHeight:1.4})]:[],...e.link?[T(13)]:[]]}]}}function ne(e){return w(e)==="shelf"?{titleSize:"the Header Box's title Text part: its size, as the old shelf title drew it (lib/document/blocks/general/section-head-looks)"}:{}}const p=new Map,G={...a("headingMedium",44,32),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02};function ie(e){const t=p.get(e);if(t)return t;const n=K(e),i=w(e),o=i==="editorial"?L(n):i==="simple"?y(n,G):i==="essay"?y(n,{...a("headingMedium",38,28,"headingSmall"),case:"upper",lineHeight:1,letterSpacing:-.02}):i==="shelf"?X(n):$(e,n);return p.set(e,o),o}export{b as EDITORIAL_LINE,ee as HEAD_BELOW,G as SIMPLE_HEADING_LOOK,te as editorialHeadTree,_ as fluidToken,w as headLookOf,ne as headReads,ie as headTree,j as headWordsOnPhoneLine,ae as token,O as withAccentItalic};
1
+ import{SPLITTABLE_SECTIONS as P}from"../../../../../format/lib/sections/section-head-placement.js";import{AUTO_COLUMN as A,BUTTON as M,DIM as W,INNER_BOX as r,SH_LINK as C,TEXT as h,smallText as R}from"./section-to-box-row-parts.js";import{labelTextSeed as D}from"../../../../../format/lib/document/text-seeds.js";import{labelStyle as x,token as a}from"../../../../../format/lib/document/seed-parts.js";import{tabletKey as w}from"efficient-easel/draw";import{BOX_DESKTOP_LINE as H,STACK_BELOW_PROP as F}from"../../../content/box-stack-line.js";import{ownEntry as u}from"../../../../../format/lib/own-entry.js";function b(e){if(e==="ProductGrid")return"shelf";const t=u(P,e)?.headStyle;return t==="editorial"||t==="simple"||t==="essay"?t:"standard"}const ne={standard:64,editorial:60,simple:36,essay:28,shelf:20},K={SectionHeader:"accent",FAQ:"accent",FitmentFinder:"accent",FitmentTable:"accent",SpecTable:"accent",RelatedProducts:"accent",Collections:"accentNum"};function z(e){if(e==="SectionHeader")return{num:"num",title:"title",description:"description",link:!0};const t=u(P,e);if(!t)throw new Error(`section-head-looks: "${e}" has no head row in SPLITTABLE_SECTIONS`);return{num:t.num,title:t.title,description:t.description,link:t.headRows.includes("linkText")&&t.headRows.includes("linkHref")}}function ie(e,t,n){const i=`editorial:${e}|${t}|${n}`,o=p.get(i);if(o)return o;const l=L({num:e,title:t,description:n,link:!1});return p.set(i,l),l}const E={[F]:H},m={top:0,right:0,bottom:1,left:0};import{token as le}from"../../../../../format/lib/document/seed-parts.js";const _=(e,t,n,i)=>({sizeToken:{step:e,px:i,fluid:{minPx:t,vw:n}}}),c=(e,t,n={})=>R(e,{...a("label",t),...n}),d=(e,t)=>({kind:"text",key:e,role:"heading",props:h,style:{textStyle:"heading-2",...t}}),f=800,U=H,T=(e,t,n,i,o={})=>({kind:"text",key:e,props:{...W,align:"right",alignPhone:"left",...n?{maxWidth:n,maxWidthPhone:f}:{},...o},style:{textStyle:"body-5",fontRole:"heading",alignPhone:"left",...a("body",t),...i,...o}}),N={...M,align:"right",alignPhone:"left",...C},S=e=>({kind:"button",key:"linkText",href:"linkHref",variant:"ghost",props:N,style:{...x(e),color:"labels"}}),O=(e,t,n)=>{const i=n.role==="heading"?{tag:"h2"}:{};return{kind:"block",type:"Text",when:o=>o[e]===void 0,props:{...h,...i,...n.props,text:t,_partStyles:{text:{...n.role==="eyebrow"?j(D()):{},...n.style}}}}},j=e=>e._partStyles.text??{},s={widthFitPhone:"fill"};function $(e){if(e.kind!=="group")return e;if(e.name==="Words"){const t=e.props;return{...e,props:typeof t=="function"?(n,i)=>({...t(n,i),...s}):{...t,...s}}}return{...e,parts:e.parts.map($)}}function v(e,t){const n=u(K,e),i=n==="accent",o=c(t.num,14,{color:i?"accent":"labels"}),l=n==="accentNum"&&o.kind==="text"?{...o,mark:"accentLead"}:o,k=d(t.title,i?{..._("headingMedium",36,5,64),case:"upper",lineHeight:.95,letterSpacing:-.025}:{...a("headingMedium",56,36),case:"none",lineHeight:1,letterSpacing:-.03}),g=e==="Collections";return{kind:"group",name:"Header",props:{...r,direction:"row",align:"end",justify:"between",gap:40,gapPhone:12,share:"content",sectionBorder:m,sectionPaddingBottom:24,sectionPaddingBottomPhone:20},parts:[{kind:"group",name:"Title",props:{...r,...s,direction:"row",align:"end",gap:40,gapPhone:12,share:"content"},parts:[{kind:"group",name:"Number",props:{...r,...s,align:"start",gap:12},parts:[{kind:"image",key:"logoSrc",alt:"logoAlt",props:{aspect:"auto",contained:!1}},l,...g?[O(t.num,"==01== / Collections",l)]:[]]},{kind:"group",name:"Heading",props:{...r,...s},parts:[k,...g?[O(t.title,`Three ranges,
2
+ one standard.`,k)]:[]]}]},{kind:"group",name:"Words",props:{...r,...s,gap:12,maxWidth:340,maxWidthPhone:f},parts:[...t.description?[T(t.description,14,void 0,{lineHeight:1.5})]:[],...t.link?[S(14)]:[],...g?[{kind:"block",type:"ButtonBlock",props:{...N,variant:"ghost",label:"View all",href:"/wheels",_partStyles:{label:S(14).style}}}]:[]]}]}}function y(e,t){return e.kind==="text"?t.includes(e.key)?{...e,mark:"accentItalic"}:e:e.kind==="group"?{...e,parts:e.parts.map(n=>y(n,t))}:e}function L(e){const t=d(e.title,{..._("headingMedium",40,5.5,80),case:"upper",weight:500,lineHeight:1,letterSpacing:-.03});return{kind:"group",name:"Header",props:{...r,direction:"row",align:"end",justify:"between",gap:40,gapPhone:14,share:"content",sectionBorder:m,sectionPaddingBottom:32,...E},parts:[{kind:"group",name:"Title",props:{...r,direction:"row",align:"end",gap:40,gapPhone:14,share:"content",...E},parts:[{kind:"group",name:"Number",props:{...r,sectionPaddingBottom:8},parts:[{...c(e.num,13),props:{...h,...A}}]},y(t,[e.title])]},{kind:"group",name:"Words",props:{...r,sectionPaddingBottom:4,maxWidth:360,[w("maxWidth")]:U,maxWidthPhone:f},parts:e.description?[T(e.description,14,void 0,{lineHeight:1.5},{[w("align")]:"left"})]:[]}]}}function B(e,t){return{kind:"group",name:"Header",props:{...r,gap:16,gapPhone:16},parts:[c(e.num,13),d(e.title,t)]}}const I=[["para",{...x(13),weight:400,lineHeight:1,letterSpacing:.22}],["sm",{...a("headingMedium",40,28),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["md",{...a("headingMedium",48,32),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["lg",{...a("headingMedium",56,36),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["xl",{...a("headingMedium",64,40),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}]],X=e=>I.some(([t])=>t===e.titleSize)?e.titleSize:"lg";function G(e){return{kind:"group",name:"Header",props:{...r,direction:"row",align:"center",justify:"between",gap:16,share:"content",stickTop:!0,sectionBorder:m,sectionPaddingTop:12,sectionPaddingBottom:12},parts:[{kind:"group",name:"Title",props:{...r,direction:"row",align:"end",gap:24,share:"content"},parts:[c(e.num,13,{color:"labels",letterSpacing:.22,lineHeight:1}),...I.map(([t,n])=>({...d(e.title,n),when:i=>X(i)===t}))]},{kind:"group",name:"Words",props:{...r,direction:"row",align:"center",justify:"end",gap:20,share:"content"},parts:[...e.description?[T(e.description,13,340,{lineHeight:1.4})]:[],...e.link?[S(13)]:[]]}]}}function oe(e){return b(e)==="shelf"?{titleSize:"the Header Box's title Text part: its size, as the old shelf title drew it (lib/document/blocks/general/section-head-looks)"}:{}}const p=new Map,Q={...a("headingMedium",44,32),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02};function re(e){const t=p.get(e);if(t)return t;const n=z(e),i=b(e),o=i==="editorial"?L(n):i==="simple"?B(n,Q):i==="essay"?B(n,{...a("headingMedium",38,28,"headingSmall"),case:"upper",lineHeight:1,letterSpacing:-.02}):i==="shelf"?G(n):v(e,n);return p.set(e,o),o}export{E as EDITORIAL_LINE,ne as HEAD_BELOW,Q as SIMPLE_HEADING_LOOK,ie as editorialHeadTree,_ as fluidToken,b as headLookOf,oe as headReads,re as headTree,$ as headWordsOnPhoneLine,le as token,y as withAccentItalic};
@@ -1,5 +1,6 @@
1
1
  import { SECTION_PAD_INNER_DEFAULTS } from "../../passes/section-padding.js";
2
2
  import { type BoxEntry, type ConvertContext, type OwnProps, type PartRow, type SiteWrite } from "../../../sections/section-to-box.js";
3
+ import { type LengthUnit } from "efficient-easel/screen/lib/content/length-units";
3
4
  type Props = Record<string, unknown>;
4
5
  export { BOX, DIM, INNER_BOX, TEXT } from "../../../../../format/lib/document/seed-parts.js";
5
6
  export declare const AUTO_COLUMN: Readonly<Record<string, unknown>>;
@@ -46,7 +47,11 @@ export declare const bandProps: (p: Props, ctx: ConvertContext) => Props;
46
47
  export declare const bandWrites: (node: {
47
48
  props: Props;
48
49
  }, ctx: ConvertContext) => SiteWrite[];
49
- export declare const siteGutterOf: (ctx: ConvertContext) => number;
50
+ export declare const siteGutterOf: (ctx: ConvertContext, { view, to, maxPx }?: {
51
+ view?: "desktop" | "phone";
52
+ to?: LengthUnit;
53
+ maxPx?: number;
54
+ }) => number;
50
55
  export declare const NO_PAD: Props;
51
56
  export declare const lineSides: (sides: {
52
57
  top?: number;
@@ -1 +1 @@
1
- import{storedUnit as _}from"../../../../../format/lib/content/css-length.js";import{SECTION_WIDTH_KEYS as y}from"../../../../../format/lib/content/section-width.js";import{BLOCK_LENGTH_KEYS as C,blockLengthUnitKey as v}from"../../../content/block-size.js";import{viewStoreKeys as M}from"../../../../../format/lib/animation/views.js";import{BOX as W,INNER_BOX as I,LABEL_FACE as R,TEXT as U,boxPadding as Y,fillSlot as E,token as F}from"../../../../../format/lib/document/seed-parts.js";import{ENTRANCE_STORE_KEYS as w,LEGACY_ENTRANCE_KEY as G}from"../../../animation/entrance.js";import{SCROLL_STORE_KEYS as X}from"../../../../../format/lib/animation/scroll.js";import{SECTION_PIN_KEYS as V}from"../../../../../format/lib/content/section-sticky.js";import{SECTION_CORNERS_ROW as $}from"../../../../../format/lib/content/section-corners.js";import{SECTION_BORDER_UNIT_KEYS as j}from"../../../../../format/lib/content/borders.js";import{CARD_HOVER_KEYS as O}from"../../../../../format/lib/animation/hover.js";import{COUNT_KEY_PROP as J}from"../../../../../format/lib/content/block-sources.js";import{normalizeSiteGutter as z}from"../../../../../format/lib/content/page-width.js";import{resolveSectionPadding as q}from"../../../content/section-padding.js";import{ButtonBlockMeta as Q}from"../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";import{SECTION_PAD_INNER_DEFAULTS as Z}from"../../passes/section-padding.js";import{finiteNumber as p}from"../../../../../format/lib/finite-number.js";import{convertTheme as h,hasWords as tt}from"../../../sections/section-to-box.js";import{THEME_SECTION_BG as ot}from"../../../../../format/lib/content/section-background.js";import{fillSlotOfInk as A}from"../../../../../format/lib/document/part-inks.js";import{parseHexColor as et}from"efficient-shell/format";import{convertLength as nt}from"efficient-easel/screen/lib/content/length-units";import{bandPresetIndex as it,surfacePresetIndex as rt,surfaceTwoTone as st}from"../../../../../format/lib/theme.js";import{VIEW_HIDE_KEYS as dt}from"../../../../../format/lib/content/view-hide-class.js";const s=(t,o,e,n)=>o===e?t:nt(t,o,e,n,{min:0,max:200,step:4});import{BOX as ho,DIM as fo,INNER_BOX as uo,TEXT as bo}from"../../../../../format/lib/document/seed-parts.js";const Yt={textFit:"line",textFitPhone:"wrap"},ct={...U,[J]:""},{label:Ft,href:wt,...at}=Q.defaultProps,Gt=at,Xt={buttonFillOpacity:0,buttonBorder:{width:0},buttonPaddingTop:0,buttonPaddingRight:0,buttonPaddingBottom:0,buttonPaddingLeft:0},Vt={...W,sectionAccent:0},$t={sectionAccent:-1},jt=["gridSpan","sectionHeightMode","sectionHeightValue","sectionHeightUnit","sectionHeightModeTablet","sectionHeightValueTablet","sectionHeightUnitTablet","sectionHeightModePhone","sectionHeightValuePhone","sectionHeightUnitPhone","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderTablet","sectionBorderPhone","sectionAccent",$.unitKey,...j,...V,"anchor",G,...dt,...w,...X,...M(["widthFit",...C,...C.map(v)]),...Object.values(y)],c="a section width key, ignored since efficient-web-builder 45 (an old key; a section's own width has new keys, lib/content/section-width), so dropping it changes nothing",Jt={sectionSurface:"read by nothing in src/ (searched 2026-10-24): a retired theme key that draws nothing today, so dropping it changes nothing",widthMode:c,fullWidth:c,pageWidth:c,backgroundWidth:c,contentWidth:c,contentMax:c},zt=Object.fromEntries(["sectionPaddingLeft","sectionPaddingRight","sectionPaddingLeftTablet","sectionPaddingRightTablet","sectionPaddingLeftPhone","sectionPaddingRightPhone"].map(t=>[t,"needs Box side padding outside its gutter: the old section added it outside its frame, a Box's side padding replaces the gutter. 0 live nodes store it (JJ's read-only export, 2026-10-24)"]));function pt(t,o){const e=p(t.sectionPaddingTop)??0,n=p(t.sectionPaddingBottom)??0,i=p(t.sectionPaddingTopTablet),r=p(t.sectionPaddingBottomTablet),l=_(t.sectionPaddingUnit),g=_(t.sectionPaddingUnitTablet),T=_(t.sectionPaddingUnitPhone),B=(m,a,x,P)=>{const d=p(m);if(d!==void 0)return d+s(P,"px",T,"mobile");const N=a===void 0?{n:x,unit:l}:{n:a,unit:g};return s(N.n,N.unit,T,"mobile")+s(P,"px",T,"mobile")},S=(m,a,x,P,d)=>a!==void 0?{[m]:a+s(d??P,"px",g,"tablet")}:d===void 0?{}:{[m]:s(x,l,g,"tablet")+s(d,"px",g,"tablet")};return{sectionPaddingTop:e+s(o.top,"px",l,"desktop"),sectionPaddingBottom:n+s(o.bottom,"px",l,"desktop"),...S("sectionPaddingTopTablet",i,e,o.top,o.topTablet),...S("sectionPaddingBottomTablet",r,n,o.bottom,o.bottomTablet),sectionPaddingTopPhone:B(t.sectionPaddingTopPhone,i,e,o.topPhone),sectionPaddingBottomPhone:B(t.sectionPaddingBottomPhone,r,n,o.bottomPhone)}}const qt=t=>[...["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopTablet","sectionPaddingBottomTablet","sectionPaddingTopPhone","sectionPaddingBottomPhone"].map(o=>[o,o,(e,n)=>pt(n,typeof t=="function"?t(n):t)[o]]),["sectionPaddingUnit","sectionPaddingUnit"],["sectionPaddingUnitTablet","sectionPaddingUnitTablet"],["sectionPaddingUnitPhone","sectionPaddingUnitPhone"]];function f(t,o){const e=q(t,Z[o]);return{sectionPaddingTop:e.top,sectionPaddingBottom:e.bottom}}const Qt=t=>[["padTop","sectionPaddingTop",(o,e)=>f(e,t).sectionPaddingTop],["padBottom","sectionPaddingBottom",(o,e)=>f(e,t).sectionPaddingBottom],["sectionPaddingTop","sectionPaddingTop",(o,e)=>f(e,t).sectionPaddingTop],["sectionPaddingBottom","sectionPaddingBottom",(o,e)=>f(e,t).sectionPaddingBottom]],lt={kind:"heading-case-upper",styles:["heading-1","heading-2","heading-3"]},Zt=t=>o=>tt(o.props[t])?[lt]:[],gt=(t,o)=>({kind:"text",key:t,role:"eyebrow",props:U,...o?{style:o}:{}}),to=t=>({kind:"group",name:"Chip",props:{...I,...E("main"),...Y(6,14)},parts:[gt(t,{color:"background",...F("label",12),weight:600,letterSpacing:.16})]}),H=t=>t.background!=="transparent",mt=(t,o)=>{const[e,n]=[t,o].map(i=>typeof i=="string"?i.trim():"");return e?n?`[${e} ]{color=text}${n}`:`[${e}]{color=text}`:n},L={align:"right",alignPhone:"left"},Pt=(t,o,e)=>{const n=i=>mt(i[t],i[o]);return{kind:"block",type:"Text",when:(i,r)=>r!==void 0&&n(r)!=="",box:[[t,"text",(i,r)=>n(r)],[o,"text",(i,r)=>n(r)]],props:e}},oo=(t,o,e,n={})=>Pt(t,o,{...ct,...L,...n,_partStyles:{text:{...R,color:"labels",...e,case:R.case,...L}}}),u=(t,o)=>typeof t=="number"&&Number.isInteger(t)&&t>=0?t:h(o)?.selected??0,k="var(--site-surface-2)",K=(t,o)=>h(o)?.themes[u(t.sectionAccent??0,o)],ht=(t,o)=>(e,n)=>{if(!o?.(e,n))return E(t);const i=K(e,n)?.[t];return i?{fillColor:i}:{}},eo=(t,o)=>b(t,o)>=0,D=t=>t.startsWith("#")&&et(t)!==null,no=(t,o,e)=>{const n=t?.trim();if(n&&D(n))return{fillColor:n};const i=A(n);if(i)return E(i);const r=n===k?K(o,e):void 0;return r?{fillColor:st(r)}:{}},io=t=>{const o=t?.trim();return!o||o==="transparent"||o===ot||A(o)||o===k||D(o)?void 0:"it paints a colour that no Box Fill can hold"},b=(t,o)=>{const e=h(o)?.themes;return e&&H(t)?it(e,u(t.sectionAccent,o)):-1},ro=(t,o,e)=>{const n=b(o,e);return n>=0?n:t},so=(t,o)=>{const e=h(o)?.themes,n=e?rt(e,u(t,o)):-1;return n>=0?n:t},co=(t,o)=>{const e=b(t,o);return e>=0?{sectionAccent:e}:{}},ao=(t,o)=>H(t.props)&&b(t.props,o)<0?[{kind:"band-preset",page:u(t.props.sectionAccent,o)}]:[],po=t=>z(t.site?.siteGutter),ft=Object.fromEntries(["Top","Right","Bottom","Left","TopPhone","RightPhone","BottomPhone","LeftPhone"].map(t=>[`sectionPadding${t}`,0])),lo=t=>({top:0,right:0,bottom:0,left:0,...t}),go=(t,o,e,n=[])=>({kind:"group",name:t,keepEmpty:!0,props:(i,r)=>({...I,...ft,...ht("surface")(i,r),...typeof e=="function"?e(i,r):e}),box:[[o,"bgImage"],O.kind,O.duration,O.delay],parts:n});export{Yt as AUTO_COLUMN,ho as BOX,Gt as BUTTON,fo as DIM,Jt as DROP_COMMON,zt as DROP_SIDE_PADDING,$t as FOLLOW_THE_BOX,lt as HEADING_CASE_UPPER,uo as INNER_BOX,ft as NO_PAD,ct as NUMBER_TEXT,L as RIGHT_WORDS,jt as SAME_KEYS,Vt as SECTION_BOX,Xt as SH_LINK,bo as TEXT,ro as bandAccent,b as bandIndex,u as bandPage,co as bandProps,ao as bandWrites,ht as fillFrom,io as fillNoBoxHolds,to as filledChip,Zt as headingCaseOf,f as innerPad,Qt as innerPadKeys,oo as leadLine,Pt as leadText,lo as lineSides,mt as numberAndUnit,eo as onBandPreset,no as ownFill,go as pictureCell,K as sectionPage,po as siteGutterOf,gt as smallText,so as surfaceAccent,pt as wrapperPad,qt as wrapperPadKeys};
1
+ import{siteLengthHeld as D,storedUnit as x}from"../../../../../format/lib/content/css-length.js";import{SECTION_WIDTH_KEYS as G}from"../../../../../format/lib/content/section-width.js";import{BLOCK_LENGTH_KEYS as I,blockLengthUnitKey as M}from"../../../content/block-size.js";import{viewStoreKeys as v}from"../../../../../format/lib/animation/views.js";import{BOX as W,INNER_BOX as C,LABEL_FACE as U,TEXT as R,boxPadding as w,fillSlot as B,token as F}from"../../../../../format/lib/document/seed-parts.js";import{ENTRANCE_STORE_KEYS as Y,LEGACY_ENTRANCE_KEY as X}from"../../../animation/entrance.js";import{SCROLL_STORE_KEYS as V}from"../../../../../format/lib/animation/scroll.js";import{SECTION_PIN_KEYS as $}from"../../../../../format/lib/content/section-sticky.js";import{SECTION_CORNERS_ROW as j}from"../../../../../format/lib/content/section-corners.js";import{SECTION_BORDER_UNIT_KEYS as z}from"../../../../../format/lib/content/borders.js";import{CARD_HOVER_KEYS as N}from"../../../../../format/lib/animation/hover.js";import{COUNT_KEY_PROP as J}from"../../../../../format/lib/content/block-sources.js";import{SITE_GUTTER as q,SITE_GUTTER_PHONE as Q,normalizeSiteGutter as Z,normalizeSiteGutterPhone as tt,siteGutterPhoneFollows as ot}from"../../../../../format/lib/content/page-width.js";import{resolveSectionPadding as et}from"../../../content/section-padding.js";import{ButtonBlockMeta as nt}from"../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";import{SECTION_PAD_INNER_DEFAULTS as it}from"../../passes/section-padding.js";import{finiteNumber as b}from"../../../../../format/lib/finite-number.js";import{convertTheme as _,hasWords as rt}from"../../../sections/section-to-box.js";import{THEME_SECTION_BG as st}from"../../../../../format/lib/content/section-background.js";import{fillSlotOfInk as A}from"../../../../../format/lib/document/part-inks.js";import{parseHexColor as dt}from"efficient-shell/format";import{convertLength as ct}from"efficient-easel/screen/lib/content/length-units";import{bandPresetIndex as at,surfacePresetIndex as pt,surfaceTwoTone as lt}from"../../../../../format/lib/theme.js";import{VIEW_HIDE_KEYS as mt}from"../../../../../format/lib/content/view-hide-class.js";import{tierOfView as gt}from"../../../../../format/lib/content/view-tier.js";import{ownEntry as Pt}from"../../../../../format/lib/own-entry.js";const s=(t,o,e,n)=>o===e?t:ct(t,o,e,n,{min:0,max:200,step:4});import{BOX as So,DIM as Bo,INNER_BOX as No,TEXT as Io}from"../../../../../format/lib/document/seed-parts.js";const Jt={textFit:"line",textFitPhone:"wrap"},ht={...R,[J]:""},{label:qt,href:Qt,...ft}=nt.defaultProps,Zt=ft,to={buttonFillOpacity:0,buttonBorder:{width:0},buttonPaddingTop:0,buttonPaddingRight:0,buttonPaddingBottom:0,buttonPaddingLeft:0},oo={...W,sectionAccent:0},eo={sectionAccent:-1},no=["gridSpan","sectionHeightMode","sectionHeightValue","sectionHeightUnit","sectionHeightModeTablet","sectionHeightValueTablet","sectionHeightUnitTablet","sectionHeightModePhone","sectionHeightValuePhone","sectionHeightUnitPhone","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderTablet","sectionBorderPhone","sectionAccent",j.unitKey,...z,...$,"anchor",X,...mt,...Y,...V,...v(["widthFit",...I,...I.map(M)]),...Object.values(G)],P="a section width key, ignored since efficient-web-builder 45 (an old key; a section's own width has new keys, lib/content/section-width), so dropping it changes nothing",io={sectionSurface:"read by nothing in src/ (searched 2026-10-24): a retired theme key that draws nothing today, so dropping it changes nothing",widthMode:P,fullWidth:P,pageWidth:P,backgroundWidth:P,contentWidth:P,contentMax:P},ro=Object.fromEntries(["sectionPaddingLeft","sectionPaddingRight","sectionPaddingLeftTablet","sectionPaddingRightTablet","sectionPaddingLeftPhone","sectionPaddingRightPhone"].map(t=>[t,"needs Box side padding outside its gutter: the old section added it outside its frame, a Box's side padding replaces the gutter. 0 live nodes store it (JJ's read-only export, 2026-10-24)"]));function ut(t,o){const e=b(t.sectionPaddingTop)??0,n=b(t.sectionPaddingBottom)??0,i=b(t.sectionPaddingTopTablet),r=b(t.sectionPaddingBottomTablet),c=x(t.sectionPaddingUnit),p=x(t.sectionPaddingUnitTablet),l=x(t.sectionPaddingUnitPhone),h=(m,a,u,g)=>{const d=b(m);if(d!==void 0)return d+s(g,"px",l,"mobile");const T=a===void 0?{n:u,unit:c}:{n:a,unit:p};return s(T.n,T.unit,l,"mobile")+s(g,"px",l,"mobile")},f=(m,a,u,g,d)=>a!==void 0?{[m]:a+s(d??g,"px",p,"tablet")}:d===void 0?{}:{[m]:s(u,c,p,"tablet")+s(d,"px",p,"tablet")};return{sectionPaddingTop:e+s(o.top,"px",c,"desktop"),sectionPaddingBottom:n+s(o.bottom,"px",c,"desktop"),...f("sectionPaddingTopTablet",i,e,o.top,o.topTablet),...f("sectionPaddingBottomTablet",r,n,o.bottom,o.bottomTablet),sectionPaddingTopPhone:h(t.sectionPaddingTopPhone,i,e,o.topPhone),sectionPaddingBottomPhone:h(t.sectionPaddingBottomPhone,r,n,o.bottomPhone)}}const so=t=>[...["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopTablet","sectionPaddingBottomTablet","sectionPaddingTopPhone","sectionPaddingBottomPhone"].map(o=>[o,o,(e,n)=>ut(n,typeof t=="function"?t(n):t)[o]]),["sectionPaddingUnit","sectionPaddingUnit"],["sectionPaddingUnitTablet","sectionPaddingUnitTablet"],["sectionPaddingUnitPhone","sectionPaddingUnitPhone"]];function E(t,o){const e=et(t,Pt(it,o));return{sectionPaddingTop:e.top,sectionPaddingBottom:e.bottom}}const co=t=>[["padTop","sectionPaddingTop",(o,e)=>E(e,t).sectionPaddingTop],["padBottom","sectionPaddingBottom",(o,e)=>E(e,t).sectionPaddingBottom],["sectionPaddingTop","sectionPaddingTop",(o,e)=>E(e,t).sectionPaddingTop],["sectionPaddingBottom","sectionPaddingBottom",(o,e)=>E(e,t).sectionPaddingBottom]],Tt={kind:"heading-case-upper",styles:["heading-1","heading-2","heading-3"]},ao=t=>o=>rt(o.props[t])?[Tt]:[],bt=(t,o)=>({kind:"text",key:t,role:"eyebrow",props:R,...o?{style:o}:{}}),po=t=>({kind:"group",name:"Chip",props:{...C,...B("main"),...w(6,14)},parts:[bt(t,{color:"background",...F("label",12),weight:600,letterSpacing:.16})]}),H=t=>t.background!=="transparent",xt=(t,o)=>{const[e,n]=[t,o].map(i=>typeof i=="string"?i.trim():"");return e?n?`[${e} ]{color=text}${n}`:`[${e}]{color=text}`:n},k={align:"right",alignPhone:"left"},_t=(t,o,e)=>{const n=i=>xt(i[t],i[o]);return{kind:"block",type:"Text",when:(i,r)=>r!==void 0&&n(r)!=="",box:[[t,"text",(i,r)=>n(r)],[o,"text",(i,r)=>n(r)]],props:e}},lo=(t,o,e,n={})=>_t(t,o,{...ht,...k,...n,_partStyles:{text:{...U,color:"labels",...e,case:U.case,...k}}}),O=(t,o)=>typeof t=="number"&&Number.isInteger(t)&&t>=0?t:_(o)?.selected??0,L="var(--site-surface-2)",y=(t,o)=>_(o)?.themes[O(t.sectionAccent??0,o)],Et=(t,o)=>(e,n)=>{if(!o?.(e,n))return B(t);const i=y(e,n)?.[t];return i?{fillColor:i}:{}},mo=(t,o)=>S(t,o)>=0,K=t=>t.startsWith("#")&&dt(t)!==null,go=(t,o,e)=>{const n=t?.trim();if(n&&K(n))return{fillColor:n};const i=A(n);if(i)return B(i);const r=n===L?y(o,e):void 0;return r?{fillColor:lt(r)}:{}},Po=t=>{const o=t?.trim();return!o||o==="transparent"||o===st||A(o)||o===L||K(o)?void 0:"it paints a colour that no Box Fill can hold"},S=(t,o)=>{const e=_(o)?.themes;return e&&H(t)?at(e,O(t.sectionAccent,o)):-1},ho=(t,o,e)=>{const n=S(o,e);return n>=0?n:t},fo=(t,o)=>{const e=_(o)?.themes,n=e?pt(e,O(t,o)):-1;return n>=0?n:t},uo=(t,o)=>{const e=S(t,o);return e>=0?{sectionAccent:e}:{}},To=(t,o)=>H(t.props)&&S(t.props,o)<0?[{kind:"band-preset",page:O(t.props.sectionAccent,o)}]:[],bo=(t,{view:o="desktop",to:e="px",maxPx:n=1/0}={})=>{const{siteGutter:i,siteGutterUnit:r,siteGutterPhone:c,siteGutterPhoneUnit:p}=t.site??{},l=gt(o),h=(a,u,g)=>{const d=x(u),T=D(a,d,"spacing",g);return T===null?null:s(T,d,"px",l)},f=h(i,r,q)??Z(i),m=o==="desktop"?f:h(c,p,Q)??tt(c)??ot(f);return s(Math.min(n,m),"px",e,l)},Ot=Object.fromEntries(["Top","Right","Bottom","Left","TopPhone","RightPhone","BottomPhone","LeftPhone"].map(t=>[`sectionPadding${t}`,0])),xo=t=>({top:0,right:0,bottom:0,left:0,...t}),_o=(t,o,e,n=[])=>({kind:"group",name:t,keepEmpty:!0,props:(i,r)=>({...C,...Ot,...Et("surface")(i,r),...typeof e=="function"?e(i,r):e}),box:[[o,"bgImage"],N.kind,N.duration,N.delay],parts:n});export{Jt as AUTO_COLUMN,So as BOX,Zt as BUTTON,Bo as DIM,io as DROP_COMMON,ro as DROP_SIDE_PADDING,eo as FOLLOW_THE_BOX,Tt as HEADING_CASE_UPPER,No as INNER_BOX,Ot as NO_PAD,ht as NUMBER_TEXT,k as RIGHT_WORDS,no as SAME_KEYS,oo as SECTION_BOX,to as SH_LINK,Io as TEXT,ho as bandAccent,S as bandIndex,O as bandPage,uo as bandProps,To as bandWrites,Et as fillFrom,Po as fillNoBoxHolds,po as filledChip,ao as headingCaseOf,E as innerPad,co as innerPadKeys,lo as leadLine,_t as leadText,xo as lineSides,xt as numberAndUnit,mo as onBandPreset,go as ownFill,_o as pictureCell,y as sectionPage,bo as siteGutterOf,bt as smallText,fo as surfaceAccent,ut as wrapperPad,so as wrapperPadKeys};
@@ -1 +1 @@
1
- import{SPLITTABLE_SECTIONS as u}from"../../../../../format/lib/sections/section-head-placement.js";import{SECTION_LABELS as b}from"../../../../../format/lib/document/section-catalog.js";import{SAME_KEYS as g,SECTION_BOX as B,innerPad as A}from"./section-to-box-row-parts.js";import{SITE_SIDE as m}from"efficient-easel/screen/lib/content/length-units";import{EDITORIAL_LINE as R,HEAD_BELOW as l,headLookOf as S,headReads as C,headTree as L}from"./section-head-looks.js";import{finiteNumber as I}from"../../../../../format/lib/finite-number.js";import{CARD_TEMPLATE_SLOT as E}from"../../../../../format/lib/content/card-template.js";import{footprintCardSeed as w}from"../../../../../format/lib/document/blocks/general/Footprint/card-seed.js";import{faqCardSeed as N,faqRunStyleKeys as k}from"../../../../../format/lib/document/blocks/general/FAQ/card-seed.js";import{PROCESS_COLUMNS_SLOT as D,processColumnSeeds as H}from"../../../../../format/lib/document/blocks/general/ProcessSteps/column-seed.js";import{BOX_SIDE_SPACE_PROP as F,BOX_SIDE_SPACE_SITE as y}from"../../../../../format/lib/content/box-side-space.js";import{INNER_BOX as j}from"../../../../../format/lib/document/seed-parts.js";import{SECTION_ACCENT_INHERIT as x}from"../../../../../format/lib/content/section-surface.js";const X=["FAQ","Footprint","LongRead","ProcessSteps","RelatedProducts"],so=["Collections","Events","FitmentTable","GalleryB","ProductGrid","SpecTable"],s=(e,o)=>()=>({top:e,topPhone:o}),P=e=>o=>{const r=A(o,e).sectionPaddingTop;return{top:r,topPhone:r}},Y={Collections:s(120,70),Events:s(120,70),FAQ:s(120,70),GalleryB:s(120,70),FitmentTable:s(120,80),SpecTable:s(120,80),LongRead:s(120,80),RelatedProducts:s(0,0),Footprint:P("Footprint"),ProcessSteps:P("ProcessSteps"),ProductGrid:e=>({top:I(e.padTop)??120,topPhone:0})};function M(e,o={}){const r=u[e],n=Y[e];if(!r||!n)throw new Error(`section-to-box-rows-head: "${e}" has no head row or no head room`);const p=r.padKey,_=L(e),c=C(e),O=r.headRows.filter(t=>![r.num,r.title,r.description,"linkText","linkHref"].includes(t)),d={...Object.fromEntries(O.filter(t=>!(t in c)).map(t=>[t,"a head setting no Header Box part reads (lib/document/blocks/general/section-head-looks `headReads`)"])),...o.drop};return{name:b[e]??e,boxProps:(t,i)=>{const a=n(t),h=o.roomBelow?{sectionPaddingBottom:o.roomBelow.bottom,sectionPaddingBottomPhone:o.roomBelow.bottomPhone}:{},f=typeof o.boxProps=="function"?o.boxProps(t,i):o.boxProps??{},T=S(e)==="editorial"?R:{};return{...B,direction:"column",gap:l[S(e)],sectionPaddingTop:a.top,sectionPaddingTopPhone:a.topPhone,...T,...h,...f}},box:[...g,...p?[[p,"sectionPaddingTop",(t,i)=>n(i).top]]:[]],parts:[_,...(()=>{const t={...p?{[p]:0}:{},...o.coreProps},i={kind:"core",keep:"rest",...Object.keys(t).length?{props:t}:{},...o.slots?{slots:o.slots}:{}};return[o.coreBox?{kind:"group",name:o.coreBox.name,props:o.coreBox.props,parts:[i]}:i]})(),...o.partsAfter??[]],...Object.keys(c).length?{reads:c}:{},...Object.keys(d).length?{drop:d}:{},...o.pressHeading?{pressKeepsEmpty:[r.title]}:{},...o.skip?{skip:o.skip}:{}}}const Q={...j,direction:"accordion",rowStyle:"numbered"},G={sectionPaddingLeft:m,sectionPaddingRight:m},K={Footprint:{slots:{[E]:[w()]},pressHeading:!0},ProcessSteps:{slots:(e,o)=>o.press?{[D]:H().map(r=>({...r,props:{...r.props,...G}}))}:{},boxProps:{gapPhone:l.editorial}},FAQ:{slots:{[E]:[N()]},pressHeading:!0,coreBox:{name:"Questions",props:Q},coreProps:{sectionAccent:x},roomBelow:{bottom:120,bottomPhone:70},boxProps:(e,o)=>o.press?{}:{[F]:y},skip:e=>{const o=e._partStyles??{},r=k().filter(n=>o[n]!==void 0);return r.length?`held: its rows carry their own run style (_partStyles ${r.map(n=>`"${n}"`).join(", ")}), which the Box path does not draw the same`:void 0}}},no=Object.fromEntries(X.map(e=>[e,M(e,K[e])]));export{Q as FAQ_ROWS_BOX,K as HEAD_ONLY_CARD_SEEDS,no as HEAD_ONLY_SECTION_TO_BOX,X as HEAD_ONLY_TYPES,so as HOST_ROW_HEAD_TYPES,M as headOnlyRow};
1
+ import{SPLITTABLE_SECTIONS as b}from"../../../../../format/lib/sections/section-head-placement.js";import{SECTION_LABELS as g}from"../../../../../format/lib/document/section-catalog.js";import{SAME_KEYS as B,SECTION_BOX as A,innerPad as R}from"./section-to-box-row-parts.js";import{SITE_SIDE as l}from"efficient-easel/screen/lib/content/length-units";import{EDITORIAL_LINE as C,HEAD_BELOW as S,headLookOf as E,headReads as L,headTree as w}from"./section-head-looks.js";import{finiteNumber as I}from"../../../../../format/lib/finite-number.js";import{CARD_TEMPLATE_SLOT as P}from"../../../../../format/lib/content/card-template.js";import{footprintCardSeed as N}from"../../../../../format/lib/document/blocks/general/Footprint/card-seed.js";import{faqCardSeed as k,faqRunStyleKeys as D}from"../../../../../format/lib/document/blocks/general/FAQ/card-seed.js";import{PROCESS_COLUMNS_SLOT as H,processColumnSeeds as F}from"../../../../../format/lib/document/blocks/general/ProcessSteps/column-seed.js";import{BOX_SIDE_SPACE_PROP as y,BOX_SIDE_SPACE_SITE as j}from"../../../../../format/lib/content/box-side-space.js";import{INNER_BOX as x}from"../../../../../format/lib/document/seed-parts.js";import{SECTION_ACCENT_INHERIT as X}from"../../../../../format/lib/content/section-surface.js";import{ownEntry as c}from"../../../../../format/lib/own-entry.js";const Y=["FAQ","Footprint","LongRead","ProcessSteps","RelatedProducts"],io=["Collections","Events","FitmentTable","GalleryB","ProductGrid","SpecTable"],s=(e,o)=>()=>({top:e,topPhone:o}),_=e=>o=>{const r=R(o,e).sectionPaddingTop;return{top:r,topPhone:r}},M={Collections:s(120,70),Events:s(120,70),FAQ:s(120,70),GalleryB:s(120,70),FitmentTable:s(120,80),SpecTable:s(120,80),LongRead:s(120,80),RelatedProducts:s(0,0),Footprint:_("Footprint"),ProcessSteps:_("ProcessSteps"),ProductGrid:e=>({top:I(e.padTop)??120,topPhone:0})};function Q(e,o={}){const r=c(b,e),n=c(M,e);if(!r||!n)throw new Error(`section-to-box-rows-head: "${e}" has no head row or no head room`);const p=r.padKey,O=w(e),d=L(e),f=r.headRows.filter(t=>![r.num,r.title,r.description,"linkText","linkHref"].includes(t)),a={...Object.fromEntries(f.filter(t=>!(t in d)).map(t=>[t,"a head setting no Header Box part reads (lib/document/blocks/general/section-head-looks `headReads`)"])),...o.drop};return{name:c(g,e)??e,boxProps:(t,i)=>{const m=n(t),h=o.roomBelow?{sectionPaddingBottom:o.roomBelow.bottom,sectionPaddingBottomPhone:o.roomBelow.bottomPhone}:{},T=typeof o.boxProps=="function"?o.boxProps(t,i):o.boxProps??{},u=E(e)==="editorial"?C:{};return{...A,direction:"column",gap:S[E(e)],sectionPaddingTop:m.top,sectionPaddingTopPhone:m.topPhone,...u,...h,...T}},box:[...B,...p?[[p,"sectionPaddingTop",(t,i)=>n(i).top]]:[]],parts:[O,...(()=>{const t={...p?{[p]:0}:{},...o.coreProps},i={kind:"core",keep:"rest",...Object.keys(t).length?{props:t}:{},...o.slots?{slots:o.slots}:{}};return[o.coreBox?{kind:"group",name:o.coreBox.name,props:o.coreBox.props,parts:[i]}:i]})(),...o.partsAfter??[]],...Object.keys(d).length?{reads:d}:{},...Object.keys(a).length?{drop:a}:{},...o.pressHeading?{pressKeepsEmpty:[r.title]}:{},...o.skip?{skip:o.skip}:{}}}const G={...x,direction:"accordion",rowStyle:"numbered"},K={sectionPaddingLeft:l,sectionPaddingRight:l},v={Footprint:{slots:{[P]:[N()]},pressHeading:!0},ProcessSteps:{slots:(e,o)=>o.press?{[H]:F().map(r=>({...r,props:{...r.props,...K}}))}:{},boxProps:{gapPhone:S.editorial}},FAQ:{slots:{[P]:[k()]},pressHeading:!0,coreBox:{name:"Questions",props:G},coreProps:{sectionAccent:X},roomBelow:{bottom:120,bottomPhone:70},boxProps:(e,o)=>o.press?{}:{[y]:j},skip:e=>{const o=e._partStyles??{},r=D().filter(n=>o[n]!==void 0);return r.length?`held: its rows carry their own run style (_partStyles ${r.map(n=>`"${n}"`).join(", ")}), which the Box path does not draw the same`:void 0}}},po=Object.fromEntries(Y.map(e=>[e,Q(e,c(v,e))]));export{G as FAQ_ROWS_BOX,v as HEAD_ONLY_CARD_SEEDS,po as HEAD_ONLY_SECTION_TO_BOX,Y as HEAD_ONLY_TYPES,io as HOST_ROW_HEAD_TYPES,Q as headOnlyRow};
@@ -1 +1 @@
1
- import{hasWords as L,registerSectionToBox as t}from"../../../sections/section-to-box.js";import{BUTTON as T,DIM as y,DROP_COMMON as s,DROP_SIDE_PADDING as u,INNER_BOX as o,leadLine as X,SAME_KEYS as d,SECTION_BOX as p,TEXT as l,innerPad as w,siteGutterOf as D,innerPadKeys as B,smallText as P,wrapperPad as O,wrapperPadKeys as _}from"./section-to-box-row-parts.js";import{CARDS_SECTION_TO_BOX as W}from"./section-to-box-rows-cards.js";import{normalizeSiteGutterPhone as M,siteGutterPhoneFollows as G}from"../../../../../format/lib/content/page-width.js";import{finiteNumber as F}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 K}from"./section-to-box-rows-logos.js";import{STRIP_SECTION_TO_BOX as Y}from"./section-to-box-rows-strip.js";import{TIMELINE_SECTION_TO_BOX as j}from"./section-to-box-rows-timeline.js";import{LOCATIONS_SECTION_TO_BOX as z}from"./section-to-box-rows-locations.js";import{HEAD_ONLY_SECTION_TO_BOX as q}from"./section-to-box-rows-head.js";import{PAGE_HEADER_SECTION_TO_BOX as J}from"./section-to-box-rows-pageheader.js";import{TAB_BAR_SECTION_TO_BOX as Q}from"./section-to-box-rows-tabbar.js";import{DOCBODY_SECTION_TO_BOX as V}from"./section-to-box-rows-docbody.js";import{EDITORIAL_SECTION_TO_BOX as Z}from"./section-to-box-rows-editorial.js";import{FORMS_SECTION_TO_BOX as $}from"./section-to-box-rows-forms.js";import{CHECKOUT_SECTION_TO_BOX as ee}from"./section-to-box-rows-checkout.js";import{PROOF_SECTION_TO_BOX as te}from"./section-to-box-rows-proof.js";import{PROMO_SECTION_TO_BOX as oe}from"./section-to-box-rows-promo.js";import{FITMENT_SECTION_TO_BOX as ne}from"./section-to-box-rows-fitment.js";import{fluidToken as ie,headTree as k,token as i}from"./section-head-looks.js";import{CTA_PH as b,PH as re,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 ae}from"../../../../../format/lib/document/blocks/general/Banner/meta.js";import{TITLE_WITH_BUTTONS_PH as se,TITLE_WITH_BUTTONS_SCAFFOLD_BUTTONS as de}from"../../../../../format/lib/document/blocks/general/TitleWithButtons/meta.js";import{SECTION_HEADER_PH as r}from"../../../../../format/lib/document/blocks/general/SectionHeader/meta.js";import{boxPadding as pe,fillSlot as le}from"../../../../../format/lib/document/seed-parts.js";const E={top:72,bottom:72,topPhone:72,bottomPhone:72},he={name:"Editorial Text",boxProps:e=>({...p,direction:"column",gap:28,gapPhone:28,sectionBorder:{top:1},...O(e,E)}),box:[["topBorder","sectionBorder",e=>e===!1?void 0:{top:1}],...d,..._(E)],parts:[k("Prose"),{kind:"text",key:"body",props:y,style:{textStyle:"body-1",...i("body",16),lineHeight:1.7,paragraphSpacing:18}}],drop:{...s,...u,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)"}},x={buttonPaddingTop:20,buttonPaddingBottom:20,buttonPaddingLeft:28,buttonPaddingRight:28},N=(e,n)=>n?.variant==="primary",I=(e,n)=>({kind:"list",key:"buttons",name:"Button",flat:!0,when:e,parts:[{kind:"button",key:"label",href:"href",when:N,variant:"primary",style:{letterSpacing:.3},props:{...T,...x,...n}},{kind:"button",key:"label",href:"href",when:(a,h)=>!N(a,h),variant:"ghost",style:{letterSpacing:.3},props:{...T,...x,...n}}]}),c=e=>L(e.title),me={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},...w(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",...ie("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:[I(c,{widthFit:"fill",iconPosition:"end"}),I(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 ge(e){const{siteGutter:n,siteGutterPhone:a}=e.site??{},h=D(e),f=Math.min(20,M(a)??G(n));return{sectionPaddingLeft:h,sectionPaddingRight:h,sectionPaddingLeftPhone:f,sectionPaddingRightPhone:f}}const H={top:40,bottom:64,topPhone:24,bottomPhone:36},ce={name:"Section Header",boxProps:(e,n)=>({...p,direction:"column",gap:0,...O(e,H),...ge(n)}),box:[...d,..._(H)],parts:[k("SectionHeader")],drop:{...s,...u,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"}},A={...o,direction:"row",share:[67],gap:32},R={...o,sectionPaddingLeft:24,sectionPaddingLeftPhone:0},C=(e,n,a)=>({kind:"group",name:e,props:n,parts:[a]}),Te={name:"Lead Text",boxProps:e=>({...p,direction:"column",gap:40,gapPhone:40,sectionBorder:{bottom:1},...w(e,"ParagraphsA")}),box:[...d,...B("ParagraphsA")],parts:[{kind:"group",name:"Numbers",props:{...A,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})]},C("Stats column",o,{kind:"group",name:"Stats",props:{...R,gap:0,gapPhone:0},parts:[{kind:"list",key:"stats",name:"Stat",flat:!0,parts:[X("value","label",{...i("label",13),letterSpacing:.18,lineHeight:1.8})]}]})]},{kind:"group",name:"Words",props:{...A,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}}]}]},C("Note column",{...o,justify:"end"},{kind:"group",name:"Founders",props:{...R,gap:8,gapPhone:8},parts:[{kind:"group",name:"Note",props:{...o,gap:6,gapPhone:6},parts:[{kind:"text",key:"foundersHeading",props:l,style:{textStyle:"body-1",fontRole:"heading",...i("body",18,16),weight:500,letterSpacing:-.01,lineHeight:1.7}},{kind:"text",key:"foundersBody",props:y,style:{textStyle:"body-5",fontRole:"heading",...i("body",14,12),lineHeight:1.7}}]},P("attribution",{...i("label",12,10),letterSpacing:.24,lineHeight:1.7})]})]}],drop:{...s}},v={top:24,bottom:24,topPhone:24,bottomPhone:24},ue={name:"Banner",boxProps:e=>({...p,direction:"column",gap:0,...O(e,v)}),box:[...d,"contained",..._(v)],parts:[{kind:"group",name:"Card",keepEmpty:!0,props:{...o,gap:28,gapPhone:28,placement:"top-left",darken:60,darkenStyle:"even",sectionBorder:{width:1},...le("surface"),...pe(64,40,40,24)},box:[["imageSrc","bgImage"],["overlay","darken",e=>Math.min(Math.max(F(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,...u}},Pe={Prose:he,TitleWithButtons:me,SectionHeader:ce,ParagraphsA:Te,Banner:ue},je={Prose:()=>({eyebrow:S.eyebrow,title:m(S.title),body:S.body}),TitleWithButtons:()=>({title:m(se.title),buttons:de.map(e=>({...e}))}),SectionHeader:()=>({num:r.num,title:m(r.title),description:r.description,linkText:r.linkText,linkHref:b.href}),ParagraphsA:()=>({eyebrow:g.eyebrow,lead:re.body,foundersHeading:g.foundersHeading,foundersBody:g.foundersBody,attribution:g.attribution}),Banner:()=>({...ae,ctaText:b.text,ctaHref:b.href}),ProcessSteps:()=>({num:r.num,title:m(r.title)})};function ze(){t(Pe),t(U),t(K),t(W),t(Y),t(j),t(z),t(q),t(J),t(Q),t(V),t(Z),t($),t(ee),t(ne),t(te),t(oe)}export{Pe as GENERAL_SECTION_TO_BOX,je as TEXT_PRESS_STARTERS,ze as registerGeneralSectionRows};
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 +1 @@
1
- import{isNode as k,isNodeList as u}from"efficient-easel/data";import{storedStepsShown as w}from"../../components/ProcessSteps.js";import{declaredBlockSource as l,servedRows as A,sourcedRows as L}from"../../../format/lib/content/block-sources.js";import{rowHoldsContent as P}from"../../../format/lib/content/card-state.js";import{CARD_LIST_TYPE as B}from"../../../format/lib/content/card-template.js";import{wallRows as C}from"./blocks/general/Logos/wall-rows.js";import{HEAD_CORE_PROP as R,HOLDS_HEAD_CORE_PROP as a}from"../content/empty-hides.js";import{parseSectionHeadPlacement as _}from"../../../format/lib/sections/section-head-placement.js";const p="Flex",v="Text",i=r=>Object.values(r??{}).filter(u),H=r=>r.type===B&&l(r.props)!=="",y=r=>{if(r.type!==p)return!1;const t=i(r.props).flat();return t.length>0&&t.every(H)},c=r=>_(r.props?.headPlacement)==="own-box"||y(r),m=r=>r===void 0||Array.isArray(r)&&r.length===0;function x(r){return r.type===v?!0:r.type===p&&i(r.props).every(t=>t.every(x))}const g={ProcessSteps:r=>m(r.boxes)&&w(r.steps).length===0,Logos:r=>l(r)?b(r):m(r.logos)&&m(r.items)};function b(r){return A(r)!==null&&C(r,!1).length===0}function T(r){return i(r.props).flat().every(t=>!L(t.props,!1).rows.some(P))}function f(r){const t=i(r.props).flat();return t.some(c)&&t.every(o=>c(o)||x(o))}function S(r){const t={...r.props};for(const[o,s]of Object.entries(r.props??{}))!u(s)||!s.some(e=>k(e)&&c(e))||(t[o]=s.map(e=>{if(!c(e))return e;const n=y(e)?T(e):g[String(e.type)]?.(e.props??{})===!0;return{...e,props:{...e.props,[R]:n?"empty":!0}}}));return{...r,props:t}}function E(r){const o=Object.entries(r.props??{}).filter(([,e])=>u(e)).filter(([,e])=>e.length>0);if(o.length!==1||o[0][1].length!==1)return null;const s=o[0][1][0];return s?.type===p&&s.props?{key:o[0][0],inner:s}:null}function h(r){if(r?.type!==p||!r.props)return r;if(f(r)){const o=S(r);return{...o,props:{...o.props,[a]:!0}}}const t=E(r);return!t||!f(t.inner)?r:{...r,props:{...r.props,[t.key]:[S(t.inner)],[a]:!0}}}function q(r){const t=r;if(!t||!Array.isArray(t.content))return r;let o=!1;const s=t.content.map(e=>{const n=h(e);return n!==e&&(o=!0),n});return o?{...t,content:s}:r}const d=r=>g[String(r.type)]?.(r.props??{})===!0;function j(r){if(r.type!==p||!r.props)return!1;const t=f(r)?null:E(r),o=t?t.inner:r;if(!f(o))return!1;const s=i(o.props).flat().filter(c);return s.some(e=>l(e.props)!=="")&&s.every(d)}function O(r){let t;for(const[o,s]of Object.entries(r.props??{})){if(!u(s))continue;const e=s,n=D(e);n!==e&&((t??={...r.props})[o]=n)}return t?{...r,props:t}:r}function D(r){let t=!1;const o=[];for(const s of r){if(j(s)){t=!0;continue}const e=O(s);e!==s&&(t=!0),o.push(e)}return t?o:r}function z(r){const t=r;if(!t||!Array.isArray(t.content))return r;let o=!1;const s=t.content.map(e=>{if(h(e)!==e)return e;const n=O(e);return n!==e&&(o=!0),n});return o?{...t,content:s}:r}export{z as dropEmptySourcedBoxes,q as markHeadCoreBoxes};
1
+ import{isNode as w,isNodeList as u}from"efficient-easel/data";import{storedStepsShown as A}from"../../components/ProcessSteps.js";import{declaredBlockSource as l,servedRows as L,sourcedRows as P}from"../../../format/lib/content/block-sources.js";import{rowHoldsContent as B}from"../../../format/lib/content/card-state.js";import{CARD_LIST_TYPE as C}from"../../../format/lib/content/card-template.js";import{wallRows as R}from"./blocks/general/Logos/wall-rows.js";import{HEAD_CORE_PROP as _,HOLDS_HEAD_CORE_PROP as a}from"../content/empty-hides.js";import{parseSectionHeadPlacement as v}from"../../../format/lib/sections/section-head-placement.js";import{ownEntry as y}from"../../../format/lib/own-entry.js";const p="Flex",H="Text",i=r=>Object.values(r??{}).filter(u),b=r=>r.type===C&&l(r.props)!=="",x=r=>{if(r.type!==p)return!1;const t=i(r.props).flat();return t.length>0&&t.every(b)},c=r=>v(r.props?.headPlacement)==="own-box"||x(r),m=r=>r===void 0||Array.isArray(r)&&r.length===0;function g(r){return r.type===H?!0:r.type===p&&i(r.props).every(t=>t.every(g))}const E={ProcessSteps:r=>m(r.boxes)&&A(r.steps).length===0,Logos:r=>l(r)?T(r):m(r.logos)&&m(r.items)};function T(r){return L(r)!==null&&R(r,!1).length===0}function d(r){return i(r.props).flat().every(t=>!P(t.props,!1).rows.some(B))}function f(r){const t=i(r.props).flat();return t.some(c)&&t.every(o=>c(o)||g(o))}function S(r){const t={...r.props};for(const[o,s]of Object.entries(r.props??{}))!u(s)||!s.some(e=>w(e)&&c(e))||(t[o]=s.map(e=>{if(!c(e))return e;const n=x(e)?d(e):y(E,String(e.type))?.(e.props??{})===!0;return{...e,props:{...e.props,[_]:n?"empty":!0}}}));return{...r,props:t}}function h(r){const o=Object.entries(r.props??{}).filter(([,e])=>u(e)).filter(([,e])=>e.length>0);if(o.length!==1||o[0][1].length!==1)return null;const s=o[0][1][0];return s?.type===p&&s.props?{key:o[0][0],inner:s}:null}function O(r){if(r?.type!==p||!r.props)return r;if(f(r)){const o=S(r);return{...o,props:{...o.props,[a]:!0}}}const t=h(r);return!t||!f(t.inner)?r:{...r,props:{...r.props,[t.key]:[S(t.inner)],[a]:!0}}}function G(r){const t=r;if(!t||!Array.isArray(t.content))return r;let o=!1;const s=t.content.map(e=>{const n=O(e);return n!==e&&(o=!0),n});return o?{...t,content:s}:r}const j=r=>y(E,String(r.type))?.(r.props??{})===!0;function D(r){if(r.type!==p||!r.props)return!1;const t=f(r)?null:h(r),o=t?t.inner:r;if(!f(o))return!1;const s=i(o.props).flat().filter(c);return s.some(e=>l(e.props)!=="")&&s.every(j)}function k(r){let t;for(const[o,s]of Object.entries(r.props??{})){if(!u(s))continue;const e=s,n=I(e);n!==e&&((t??={...r.props})[o]=n)}return t?{...r,props:t}:r}function I(r){let t=!1;const o=[];for(const s of r){if(D(s)){t=!0;continue}const e=k(s);e!==s&&(t=!0),o.push(e)}return t?o:r}function J(r){const t=r;if(!t||!Array.isArray(t.content))return r;let o=!1;const s=t.content.map(e=>{if(O(e)!==e)return e;const n=k(e);return n!==e&&(o=!0),n});return o?{...t,content:s}:r}export{J as dropEmptySourcedBoxes,G as markHeadCoreBoxes};
@@ -1 +1 @@
1
- import{pinnedDuplicateIndices as h}from"efficient-easel/draw";import{SLOT_SECTION_SPECS as A}from"./slot-specs.js";const S=["GalleryB"];function x(n){const o=n.content;if(!Array.isArray(o))return n;let i=!1;const c=o.map(t=>{const e=t?.type;if(!e||!S.includes(e))return t;const r=A[e];if(!r?.legacy)return t;const s=t.props??{},l=s[r.slot];if(Array.isArray(l)&&l.length>0)return t;const a=r.legacy(s);if(!a.length)return t;i=!0;const y=String(s.id??e),f=a.map((g,m)=>({type:r.childType,props:{id:`${r.childType}-${y}-${m}`,...g}}));return{...t,props:{...s,[r.slot]:f}}}),p=new Set(h(c)),u=p.size?c.filter((t,e)=>!p.has(e)):c;return p.size&&(i=!0),i?{...n,content:u}:n}export{x as migrateLegacyPageData};
1
+ import{pinnedDuplicateIndices as h}from"efficient-easel/draw";import{SLOT_SECTION_SPECS as A}from"./slot-specs.js";import{ownEntry as S}from"../../../format/lib/own-entry.js";const T=["GalleryB"];function I(n){const o=n.content;if(!Array.isArray(o))return n;let i=!1;const c=o.map(t=>{const r=t?.type;if(!r||!T.includes(r))return t;const e=S(A,r);if(!e?.legacy)return t;const s=t.props??{},l=s[e.slot];if(Array.isArray(l)&&l.length>0)return t;const a=e.legacy(s);if(!a.length)return t;i=!0;const u=String(s.id??r),f=a.map((g,m)=>({type:e.childType,props:{id:`${e.childType}-${u}-${m}`,...g}}));return{...t,props:{...s,[e.slot]:f}}}),p=new Set(h(c)),y=p.size?c.filter((t,r)=>!p.has(r)):c;return p.size&&(i=!0),i?{...n,content:y}:n}export{I as migrateLegacyPageData};