efficient-web-builder 66.0.0 → 67.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/editor/components/MediaUploadField.js +1 -1
  3. package/dist/editor/components/PartSettingsPanel.js +1 -1
  4. package/dist/editor/components/PartTextBox.js +1 -1
  5. package/dist/editor/components/PreviewPartAnchors.js +1 -1
  6. package/dist/editor/components/SectionWidthRows.d.ts +3 -1
  7. package/dist/editor/components/SectionWidthRows.js +1 -1
  8. package/dist/editor/components/SiteTextStylesField.js +1 -1
  9. package/dist/editor/lib/animation/hover-fields.d.ts +1 -1
  10. package/dist/editor/lib/animation/hover-fields.js +1 -1
  11. package/dist/editor/lib/document/blocks/general/Divider/fields.js +1 -1
  12. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  13. package/dist/editor/lib/document/blocks/general/HeroGroup/fields.js +1 -1
  14. package/dist/editor/lib/document/blocks/general/ImageBlock/fields.js +1 -1
  15. package/dist/editor/lib/document/blocks/general/IntroBleed/fields.js +1 -1
  16. package/dist/editor/lib/document/blocks/general/PostCard/fields.js +1 -1
  17. package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -1
  18. package/dist/editor/lib/document/box-fields.d.ts +1 -1
  19. package/dist/editor/lib/document/controls.d.ts +20 -2
  20. package/dist/editor/lib/document/controls.js +1 -1
  21. package/dist/editor/lib/document/section-own-width-fields.js +1 -1
  22. package/dist/format/lib/animation/views.js +1 -1
  23. package/dist/format/lib/content/borders.d.ts +12 -2
  24. package/dist/format/lib/content/borders.js +1 -1
  25. package/dist/format/lib/content/card-corners.d.ts +3 -1
  26. package/dist/format/lib/content/card-corners.js +1 -1
  27. package/dist/format/lib/content/css-length.d.ts +6 -0
  28. package/dist/format/lib/content/css-length.js +1 -1
  29. package/dist/format/lib/content/image-corners.d.ts +3 -1
  30. package/dist/format/lib/content/image-corners.js +1 -1
  31. package/dist/format/lib/content/section-corners.d.ts +3 -1
  32. package/dist/format/lib/content/section-corners.js +1 -1
  33. package/dist/format/lib/content/section-sticky.d.ts +5 -0
  34. package/dist/format/lib/content/section-sticky.js +1 -1
  35. package/dist/format/lib/content/section-type-size.d.ts +12 -1
  36. package/dist/format/lib/content/section-type-size.js +1 -1
  37. package/dist/format/lib/content/section-width.d.ts +8 -0
  38. package/dist/format/lib/content/section-width.js +1 -1
  39. package/dist/format/lib/content/view-tier.d.ts +10 -0
  40. package/dist/format/lib/content/view-tier.js +1 -0
  41. package/dist/format/lib/post-card-layout.d.ts +3 -0
  42. package/dist/format/lib/post-card-layout.js +1 -1
  43. package/dist/format/lib/sections/divider-style.d.ts +9 -0
  44. package/dist/format/lib/sections/divider-style.js +1 -1
  45. package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
  46. package/dist/format/lib/source-rules/one-length-control.js +3 -3
  47. package/dist/format/lib/theme.d.ts +1 -1
  48. package/dist/format/lib/theme.js +4 -4
  49. package/dist/render/components/Divider.d.ts +3 -1
  50. package/dist/render/components/Divider.js +1 -1
  51. package/dist/render/components/Flex.d.ts +3 -1
  52. package/dist/render/components/Flex.js +1 -1
  53. package/dist/render/components/HeroGroup.d.ts +3 -1
  54. package/dist/render/components/HeroGroup.js +1 -1
  55. package/dist/render/components/ImageBlock.d.ts +2 -1
  56. package/dist/render/components/ImageBlock.js +1 -1
  57. package/dist/render/components/IntroBleed.d.ts +3 -2
  58. package/dist/render/components/IntroBleed.js +1 -1
  59. package/dist/render/components/PictureHoverMove.d.ts +18 -0
  60. package/dist/render/components/PictureHoverMove.js +1 -0
  61. package/dist/render/components/PictureWash.d.ts +2 -1
  62. package/dist/render/components/PictureWash.js +1 -1
  63. package/dist/render/lib/content/block-size.js +1 -1
  64. package/dist/render/lib/content/button-look.js +1 -1
  65. package/dist/render/lib/content/section-padding.js +1 -1
  66. package/dist/render/lib/document/blocks/general/Divider/render.js +1 -1
  67. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  68. package/dist/render/lib/document/blocks/general/HeroGroup/render.js +1 -1
  69. package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
  70. package/dist/render/lib/document/blocks/general/IntroBleed/render.js +1 -1
  71. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  72. package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
  73. package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
  74. package/dist/render/lib/document/part-styles.d.ts +13 -0
  75. package/dist/render/lib/document/part-styles.js +2 -2
  76. package/dist/render/lib/document/passes/borders.js +1 -1
  77. package/dist/render/lib/document/passes/corners.js +1 -1
  78. package/dist/render/lib/document/passes/section-width.js +1 -1
  79. package/dist/render/lib/sections/section-to-box.js +1 -1
  80. package/dist/render/lib/text-styles/site-text-styles.js +2 -2
  81. package/package.json +5 -5
@@ -1,6 +1,7 @@
1
1
  import type { CSSProperties } from "react";
2
- export default function PictureWash({ wash, hover, className, }: {
2
+ export default function PictureWash({ wash, hover, className, restClassName, }: {
3
3
  wash: CSSProperties | null;
4
4
  hover?: CSSProperties | null;
5
5
  className?: string;
6
+ restClassName?: string;
6
7
  }): import("react").JSX.Element | null;
@@ -1 +1 @@
1
- import{jsx as r,Fragment as i,jsxs as n}from"react/jsx-runtime";import{PICTURE_WASH_HOVER_CLASS as d,PICTURE_WASH_REST_CLASS as l}from"../../format/lib/content/image-treatment.js";function u({wash:e,hover:s,className:a}){const t=`absolute inset-0 z-0${a?` ${a}`:""}`;return s?n(i,{children:[e&&r("div",{className:`${t} ${l}`,style:e,"aria-hidden":!0}),r("div",{className:`${t} ${d}`,style:s,"aria-hidden":!0})]}):e?r("div",{className:t,style:e,"aria-hidden":!0}):null}export{u as default};
1
+ import{jsx as t,Fragment as d,jsxs as u}from"react/jsx-runtime";import{PICTURE_WASH_HOVER_CLASS as l,PICTURE_WASH_REST_CLASS as _}from"../../format/lib/content/image-treatment.js";function $({wash:e,hover:r,className:s,restClassName:i}){const a=`absolute inset-0 z-0${s?` ${s}`:""}`,n=`${a}${i?` ${i}`:""}`;return r?u(d,{children:[e&&t("div",{className:`${n} ${_}`,style:e,"aria-hidden":!0}),t("div",{className:`${a} ${l}`,style:r,"aria-hidden":!0})]}):e?t("div",{className:n,style:e,"aria-hidden":!0}):null}export{$ as default};
@@ -1 +1 @@
1
- import{BLOCK_FIXED_WIDTH as Y,BLOCK_SIZE_KEYS as U,parseBlockWidthFit as c,phoneKey as A,parseTextFit as I,tabletKey as N}from"efficient-easel/draw";import{sideLengthAt as V,unitKeyAt as O}from"efficient-easel/screen/lib/content/length-units";import{TEXT_FIT_ATTR as m}from"../../../format/lib/fit-words.js";import{cssLengthOf as K}from"../../../format/lib/content/css-length.js";const X="sf-block-size",B=["width","minWidth","maxWidth"],D=e=>`${e}Unit`,x=e=>typeof e=="number"&&Number.isFinite(e)&&e>=0?e:void 0,g={desktop:"desktop",tablet:"tablet",phone:"mobile"},Z={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"}},P={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"}},$={desktop:P.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"}},G={two:{desktop:"view-wide:[.flex-row>*>&]:grow"},three:{desktop:"view-desktop:[.flex-row>*>&]:grow",tablet:"view-wide:max-view-desktop:[.flex-row>*>&]:grow"}},q={desktop:"--sf-bw",tablet:"--sf-bw-t",phone:"--sf-bw-p"},J={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)]"]}},L={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)]"]}},Q={minWidth:{desktop:L.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:L.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)]"]}},ee=["widthFit",...B],H={desktop:"view-wide:whitespace-nowrap view-wide:[&_*]:whitespace-nowrap!",phone:"max-view-wide:whitespace-nowrap max-view-wide:[&_*]:whitespace-nowrap!"},y={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!"},te={desktop:y.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!"};function we(e){const n=z(e);return n.sides.filter(o=>n.mode[o]==="fill").map(o=>G[n.three?"three":"two"][o]).filter(Boolean).join(" ")}function z(e){const n=ee.some(t=>{const s=e[t]?.tablet;return t==="widthFit"?c(s)!==void 0:x(s)!==void 0}),o=n?["desktop","tablet","phone"]:["desktop","phone"],a=(t,s)=>{const i=t(s?.desktop),p=n?t(s?.tablet)??i:i;return{desktop:i,tablet:p,phone:t(s?.phone)??p}};return{three:n,sides:o,perSide:a,lengthPerSide:t=>{const s=D(t),i={};for(const f of o)i[O(t,g[f])]=x(e[t]?.[f]),i[O(s,g[f])]=e.units?.[t]?.[f];const p=f=>V(i,{length:t},s,g[f],"length")??void 0;return{desktop:p("desktop"),tablet:p("tablet"),phone:p("phone")}},mode:a(c,e.widthFit)}}function de(e,{atSectionLine:n=!1}={}){const o=n?$:P,a=n?Q:L,l=n?te:y,t=[],s={},i={},{three:p,sides:f,lengthPerSide:C,mode:M}=z(e),W=C("width");for(const w of f){const d=M[w];!d||d==="fit"||(t.push(p?o[w][d]:Z[w][d]),d==="fixed"&&(s[q[w]]=K(W[w]?.value??Y.fallback,W[w]?.unit)))}for(const w of B.filter(d=>d!=="width")){const d=C(w);for(const h of f){const T=d[h];if(T===void 0)continue;const[j,R]=p?a[w][h]:J[w][h];s[j]=K(T.value,T.unit),t.push(R)}}const r=I(e.textFit?.desktop),v=I(e.textFit?.phone),k=w=>{const d=x(e.minFont?.[w]);return d===void 0?void 0:e.units?.minFont?.[w]==="vw"?`${d}vw`:String(d)},u=k("desktop"),_=k("phone"),E=I(e.textFit?.tablet),b=E!==r||v!==void 0?E:void 0,F=k("tablet"),S=F!==u||_!==void 0?F:void 0;return b?(r==="line"&&t.push(l.desktop),b==="line"&&t.push(l.tablet),(v??b)==="line"&&t.push(l.phone)):(r==="line"&&t.push(H.desktop),(v??r)==="line"&&t.push(H.phone)),r&&(i[m.fit]=r),b&&(i[m.fitTablet]=b),v&&(i[m.fitPhone]=v),u!==void 0&&(i[m.min]=u),S!==void 0&&(i[m.minTablet]=S),_!==void 0&&(i[m.minPhone]=_),!n&&(b||S!==void 0)&&(i[m.edge]=""),t.length===0&&Object.keys(i).length===0?null:{className:[X,...t].join(" "),style:s,attrs:i}}function ae(e){if(x(e.maxWidth?.desktop)!==void 0)return!0;const n=c(e.widthFit?.desktop);return n==="fill"||n==="fixed"}function pe(e){return["desktop","tablet","phone"].some(o=>{const a=c(e.widthFit?.[o]);return a==="fixed"||a==="fill"||x(e.minWidth?.[o])!==void 0})}function fe(e){const n={};for(const o of U){const a=e[o],l=e[N(o)],t=e[A(o)];(a!==void 0||l!==void 0||t!==void 0)&&(n[o]={desktop:a,tablet:l,phone:t});const s=D(o),i={desktop:e[s],tablet:e[N(s)],phone:e[A(s)]};(i.desktop!==void 0||i.tablet!==void 0||i.phone!==void 0)&&((n.units??={})[o]=i)}return n}export{B as BLOCK_LENGTH_KEYS,X as BLOCK_SIZE_CLASS,m as TEXT_FIT_ATTR,pe as blockCanWidenPastCell,we as blockFillInCellClass,D as blockLengthUnitKey,ae as blockSetsItsWidth,de as blockSizeOf,fe as blockSizeValuesOf};
1
+ import{BLOCK_FIXED_WIDTH as Y,BLOCK_SIZE_KEYS as R,parseBlockWidthFit as c,phoneKey as A,parseTextFit as g,tabletKey as N,viewKeyAt as O}from"efficient-easel/draw";import{sideLengthAt as U}from"efficient-easel/screen/lib/content/length-units";import{TEXT_FIT_ATTR as m}from"../../../format/lib/fit-words.js";import{cssLengthOf as K}from"../../../format/lib/content/css-length.js";import{tierOfView as I}from"../../../format/lib/content/view-tier.js";const X="sf-block-size",B=["width","minWidth","maxWidth"],D=e=>`${e}Unit`,x=e=>typeof e=="number"&&Number.isFinite(e)&&e>=0?e:void 0,Z={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"}},P={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"}},$={desktop:P.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"}},G={two:{desktop:"view-wide:[.flex-row>*>&]:grow"},three:{desktop:"view-desktop:[.flex-row>*>&]:grow",tablet:"view-wide:max-view-desktop:[.flex-row>*>&]:grow"}},q={desktop:"--sf-bw",tablet:"--sf-bw-t",phone:"--sf-bw-p"},J={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)]"]}},L={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)]"]}},Q={minWidth:{desktop:L.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:L.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)]"]}},ee=["widthFit",...B],H={desktop:"view-wide:whitespace-nowrap view-wide:[&_*]:whitespace-nowrap!",phone:"max-view-wide:whitespace-nowrap max-view-wide:[&_*]:whitespace-nowrap!"},y={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!"},te={desktop:y.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!"};function de(e){const n=z(e);return n.sides.filter(o=>n.mode[o]==="fill").map(o=>G[n.three?"three":"two"][o]).filter(Boolean).join(" ")}function z(e){const n=ee.some(t=>{const s=e[t]?.tablet;return t==="widthFit"?c(s)!==void 0:x(s)!==void 0}),o=n?["desktop","tablet","phone"]:["desktop","phone"],a=(t,s)=>{const i=t(s?.desktop),p=n?t(s?.tablet)??i:i;return{desktop:i,tablet:p,phone:t(s?.phone)??p}};return{three:n,sides:o,perSide:a,lengthPerSide:t=>{const s=D(t),i={};for(const f of o)i[O(t,I(f))]=x(e[t]?.[f]),i[O(s,I(f))]=e.units?.[t]?.[f];const p=f=>U(i,{length:t},s,I(f),"length")??void 0;return{desktop:p("desktop"),tablet:p("tablet"),phone:p("phone")}},mode:a(c,e.widthFit)}}function ae(e,{atSectionLine:n=!1}={}){const o=n?$:P,a=n?Q:L,r=n?te:y,t=[],s={},i={},{three:p,sides:f,lengthPerSide:C,mode:M}=z(e),W=C("width");for(const w of f){const d=M[w];!d||d==="fit"||(t.push(p?o[w][d]:Z[w][d]),d==="fixed"&&(s[q[w]]=K(W[w]?.value??Y.fallback,W[w]?.unit)))}for(const w of B.filter(d=>d!=="width")){const d=C(w);for(const h of f){const T=d[h];if(T===void 0)continue;const[j,V]=p?a[w][h]:J[w][h];s[j]=K(T.value,T.unit),t.push(V)}}const l=g(e.textFit?.desktop),b=g(e.textFit?.phone),k=w=>{const d=x(e.minFont?.[w]);return d===void 0?void 0:e.units?.minFont?.[w]==="vw"?`${d}vw`:String(d)},u=k("desktop"),_=k("phone"),E=g(e.textFit?.tablet),v=E!==l||b!==void 0?E:void 0,F=k("tablet"),S=F!==u||_!==void 0?F:void 0;return v?(l==="line"&&t.push(r.desktop),v==="line"&&t.push(r.tablet),(b??v)==="line"&&t.push(r.phone)):(l==="line"&&t.push(H.desktop),(b??l)==="line"&&t.push(H.phone)),l&&(i[m.fit]=l),v&&(i[m.fitTablet]=v),b&&(i[m.fitPhone]=b),u!==void 0&&(i[m.min]=u),S!==void 0&&(i[m.minTablet]=S),_!==void 0&&(i[m.minPhone]=_),!n&&(v||S!==void 0)&&(i[m.edge]=""),t.length===0&&Object.keys(i).length===0?null:{className:[X,...t].join(" "),style:s,attrs:i}}function pe(e){if(x(e.maxWidth?.desktop)!==void 0)return!0;const n=c(e.widthFit?.desktop);return n==="fill"||n==="fixed"}function fe(e){return["desktop","tablet","phone"].some(o=>{const a=c(e.widthFit?.[o]);return a==="fixed"||a==="fill"||x(e.minWidth?.[o])!==void 0})}function me(e){const n={};for(const o of R){const a=e[o],r=e[N(o)],t=e[A(o)];(a!==void 0||r!==void 0||t!==void 0)&&(n[o]={desktop:a,tablet:r,phone:t});const s=D(o),i={desktop:e[s],tablet:e[N(s)],phone:e[A(s)]};(i.desktop!==void 0||i.tablet!==void 0||i.phone!==void 0)&&((n.units??={})[o]=i)}return n}export{B as BLOCK_LENGTH_KEYS,X as BLOCK_SIZE_CLASS,m as TEXT_FIT_ATTR,fe as blockCanWidenPastCell,de as blockFillInCellClass,D as blockLengthUnitKey,pe as blockSetsItsWidth,ae as blockSizeOf,me as blockSizeValuesOf};
@@ -1 +1 @@
1
- import{BUTTON_PAD_KEYS as s,buttonBorderOf as T,buttonFillOpacityOf as h,buttonPadSidesOf as _}from"efficient-easel/draw";import{BUTTON_PAD_UNIT_KEY as l,isLengthUnit as O,lengthOf as y}from"efficient-easel/screen/lib/content/length-units";import{finiteNumber as x}from"../../../format/lib/finite-number.js";import{nonEmptyString as d}from"../../../format/lib/non-empty-string.js";import{padSideAttrs as N}from"./section-padding.js";import{cornerSidesShorthand as g,normalizeCornerSides as $}from"../../../format/lib/content/section-corners.js";import{cssLengthOf as U}from"../../../format/lib/content/css-length.js";const B="px-6 py-4",C=4,c=t=>{const o=new RegExp(`\\bp${t}-(?:\\[(\\d+)px\\]|(\\d+))`).exec(B);if(!o)throw new Error(`BUTTON_PAD_CLASSES has no p${t}`);return o[1]!==void 0?Number(o[1]):Number(o[2])*C},W={top:c("y"),right:c("x"),bottom:c("y"),left:c("x")},b="var(--btn)";function I(t){const o=t.variant==="ghost",n=h(t.buttonFillOpacity),r=T(t.buttonBorder),e=d(t.buttonColor);return{fillOpacity:n??(o?0:100),border:{width:r?.width??1,color:r?.color??e??(o?"currentColor":b)},changed:n!==void 0||r!==void 0}}function j(t){const o=I(t);if(!o.changed)return null;const n=d(t.buttonColor)??b;return{background:o.fillOpacity===0?"transparent":o.fillOpacity===100?n:`color-mix(in srgb, ${n} ${o.fillOpacity}%, transparent)`,borderWidth:y(o.border.width,O(t.buttonBorderUnit)?t.buttonBorderUnit:"px"),borderStyle:"solid",borderColor:o.border.color}}const P="var(--sf-button-radius, 0)";function v(t){const o=x(t.buttonCorners),n=$(t.buttonCornerSides);if(o===void 0&&n===null)return null;const r=o===void 0?P:U(Math.max(0,o),t.buttonCornersUnit);return{borderRadius:n===null?r:g(r,n)}}function F(t){const o=i=>_({top:t[`${s.top}${i}`],right:t[`${s.right}${i}`],bottom:t[`${s.bottom}${i}`],left:t[`${s.left}${i}`]})??{},n={desktop:t[l],tablet:t[`${l}Tablet`],phone:t[`${l}Phone`]},{classes:r,style:e}=N(o(""),o("Phone"),o("Tablet"),void 0,n);return Object.keys(e).length?{className:r.join(" "),style:e}:null}const f="upper";function K(t,o,n){const r=t&&typeof t=="object"?t:{},e=d(r.textStyle),i=e?d(o?.find(S=>S?.id===e)?.name):void 0,u=e?/^(heading|body)-(\d+)$/.exec(e):null,m=e?i||(u?n.styleName({kind:u[1],n:Number(u[2])}):e):n.noStyle,{cases:a}=n,p=d(r.case)??f;return`${m} · ${a[p]??a[f]}`}export{W as BUTTON_PAD_BUILT_IN,B as BUTTON_PAD_CLASSES,s as BUTTON_PAD_KEYS,f as BUTTON_WORDS_BUILT_IN_CASE,b as SITE_BUTTON_FILL,v as buttonCornersStyle,I as buttonLook,F as buttonPadAttrs,j as buttonPaint,K as buttonWordsSummary};
1
+ import{BUTTON_PAD_KEYS as d,buttonBorderOf as T,buttonFillOpacityOf as _,buttonPadSidesOf as h,viewKeyAt as O}from"efficient-easel/draw";import{BUTTON_PAD_UNIT_KEY as a,lengthOf as x}from"efficient-easel/screen/lib/content/length-units";import{finiteNumber as y}from"../../../format/lib/finite-number.js";import{nonEmptyString as c}from"../../../format/lib/non-empty-string.js";import{padSideAttrs as N}from"./section-padding.js";import{cornerSidesShorthand as g,normalizeCornerSides as U}from"../../../format/lib/content/section-corners.js";import{cssLengthOf as A,storedUnit as B}from"../../../format/lib/content/css-length.js";const C="px-6 py-4",I=4,u=o=>{const t=new RegExp(`\\bp${o}-(?:\\[(\\d+)px\\]|(\\d+))`).exec(C);if(!t)throw new Error(`BUTTON_PAD_CLASSES has no p${o}`);return t[1]!==void 0?Number(t[1]):Number(t[2])*I},w={top:u("y"),right:u("x"),bottom:u("y"),left:u("x")},f="var(--btn)";function E(o){const t=o.variant==="ghost",n=_(o.buttonFillOpacity),r=T(o.buttonBorder),e=c(o.buttonColor);return{fillOpacity:n??(t?0:100),border:{width:r?.width??1,color:r?.color??e??(t?"currentColor":f)},changed:n!==void 0||r!==void 0}}function F(o){const t=E(o);if(!t.changed)return null;const n=c(o.buttonColor)??f;return{background:t.fillOpacity===0?"transparent":t.fillOpacity===100?n:`color-mix(in srgb, ${n} ${t.fillOpacity}%, transparent)`,borderWidth:x(t.border.width,B(o.buttonBorderUnit)),borderStyle:"solid",borderColor:t.border.color}}const P="var(--sf-button-radius, 0)";function K(o){const t=y(o.buttonCorners),n=U(o.buttonCornerSides);if(t===void 0&&n===null)return null;const r=t===void 0?P:A(Math.max(0,t),o.buttonCornersUnit);return{borderRadius:n===null?r:g(r,n)}}function Y(o){const t=(i,l)=>o[O(i,l)],n=i=>h({top:t(d.top,i),right:t(d.right,i),bottom:t(d.bottom,i),left:t(d.left,i)})??{},r={desktop:t(a,"desktop"),tablet:t(a,"tablet"),phone:t(a,"mobile")},{classes:e,style:s}=N(n("desktop"),n("mobile"),n("tablet"),void 0,r);return Object.keys(s).length?{className:e.join(" "),style:s}:null}const p="upper";function v(o,t,n){const r=o&&typeof o=="object"?o:{},e=c(r.textStyle),s=e?c(t?.find(S=>S?.id===e)?.name):void 0,i=e?/^(heading|body)-(\d+)$/.exec(e):null,l=e?s||(i?n.styleName({kind:i[1],n:Number(i[2])}):e):n.noStyle,{cases:b}=n,m=c(r.case)??p;return`${l} · ${b[m]??b[p]}`}export{w as BUTTON_PAD_BUILT_IN,C as BUTTON_PAD_CLASSES,d as BUTTON_PAD_KEYS,p as BUTTON_WORDS_BUILT_IN_CASE,f as SITE_BUTTON_FILL,K as buttonCornersStyle,E as buttonLook,Y as buttonPadAttrs,F as buttonPaint,v as buttonWordsSummary};
@@ -1 +1 @@
1
- import{phoneKey as m,resolveViewValue as H,tabletKey as h}from"efficient-easel/draw";import{SECTION_PAD_UNIT_KEY as w,SITE_SIDE as F,convertLength as G,isLengthUnit as E,isSiteSide as L,sideLengthAt as M,sideValueAt as $,withLength as S}from"efficient-easel/screen/lib/content/length-units";import{siteSideRoom as O}from"../../../format/lib/content/page-width.js";import{viewRules as y}from"../../../format/lib/content/view-overrides.js";import{finiteNumber as c}from"../../../format/lib/finite-number.js";const j={min:10,max:200,step:10};function U(t,o,n,e=0){const s=c(t),i=c(o);if(s===void 0&&i===void 0)return;const b=x(n),a=r=>r===void 0?void 0:b==="px"?r:S(r,b,e);return{paddingTop:a(s),paddingBottom:a(i)}}const x=t=>E(t)?t:"px",Y="sf-pad-top-phone",k="sf-pad-bottom-phone",q="--sf-pad-t-phone",z="--sf-pad-b-phone",J="sf-pad-left-phone",Q="sf-pad-right-phone",W="--sf-pad-l-phone",X="--sf-pad-r-phone",Z="sf-pad-top-tablet",K="sf-pad-bottom-tablet",v="sf-pad-left-tablet",tt="sf-pad-right-tablet",et="--sf-pad-t-tablet",ot="--sf-pad-b-tablet",nt="--sf-pad-l-tablet",st="--sf-pad-r-tablet";function D(t){const o={desktop:t.unit,tablet:t.unitTablet,phone:t.unitPhone},n=U(t.top,t.bottom,t.unit,t.frame),e=pt({left:t.left,right:t.right},{top:t.topPhone,bottom:t.bottomPhone,left:t.leftPhone,right:t.rightPhone},{top:t.topTablet,bottom:t.bottomTablet,left:t.leftTablet,right:t.rightTablet},{top:t.top,bottom:t.bottom,left:t.left,right:t.right},o,t.frame,t.sideSpace);return n===void 0&&!e.classes.length&&!Object.keys(e.style).length?null:{className:["sf-section-pad",...e.classes].join(" "),style:{...n,...e.style}}}const it=t=>L(t)?t:c(t),dt=[["top","paddingTop",[Z,et],[Y,q]],["bottom","paddingBottom",[K,ot],[k,z]],["left","paddingLeft",[v,nt],[J,W]],["right","paddingRight",[tt,st],[Q,X]]];function bt(t,o,n){return!E(o)||o==="px"?t:G(t,"px",o,n,{min:0,max:j.max,step:1})}function rt(t,o,n,e={},s=0){const i=(l,f)=>{if(f==="px")return`${l}px`;const p=S(l,f,s);return typeof p=="number"?`${p}px`:p},b={n:t,[h("n")]:o,[m("n")]:n,u:e.desktop,[h("u")]:e.tablet,[m("u")]:e.phone},a=H("spacing",c(t),c(o),c(n),y()),r=(l,f,p)=>{if($(b,{side:"n"},l,"side",["side"])?.value===F)return O().value;const u=M(b,{side:"n"},"u",l,"side");if(!u)return;const A=f!==null&&!p&&u.unit==="px"&&typeof a[f]=="number";return i(A?a[f]:u.value,u.unit)},_=r("desktop",null,!0),T={},P=r("tablet","tablet",o!==void 0);P!==void 0&&(o!==void 0||P!==_)&&(T.tablet=P);const d=r("mobile","phone",n!==void 0);return d!==void 0&&(n!==void 0||d!==_)&&(T.phone=d),T}function pt(t,o,n={},e=t,s={},i=0,b="box"){const a={},r={},_=[],T=O(b);let P=!1;for(const[d,l,...f]of dt){const p=d==="left"||d==="right"?it:c,u=p(t[d]),A=d==="top"||d==="bottom"?i:0;L(u)?(a[l]=T.value,P=!0):u!==void 0&&(a[l]=x(s.desktop)==="px"?u:S(u,x(s.desktop),A));const R=rt(p(e[d]),p(n[d]),p(o[d]),s,A);for(const[V,[C,I]]of[["tablet",f[0]],["phone",f[1]]]){const g=R[V];g!==void 0&&(_.push(C),r[I]=g,g===T.value&&(P=!0))}}return P&&_.push(...T.className.split(" ")),{classes:_,style:{...a,...r}}}function B(t,o,n){const e=c(t)??n,s=c(o);return e===void 0?s:s===void 0?e:e+s}function Tt(t,o={}){return{top:B(t.padTop,t.sectionPaddingTop,o.top),bottom:B(t.padBottom,t.sectionPaddingBottom,o.bottom)}}const N={top:"sectionPaddingTop",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft",right:"sectionPaddingRight"};function Pt(t,o=N,n=!0,e=o===N?w:void 0){const s={};e&&(t[e]!==void 0&&(s.unit=t[e]),t[h(e)]!==void 0&&(s.unitTablet=t[h(e)]),t[m(e)]!==void 0&&(s.unitPhone=t[m(e)]));for(const i of n?["top","bottom","left","right"]:["top","bottom"])s[i]=t[o[i]],s[`${i}Tablet`]=t[h(o[i])],s[`${i}Phone`]=t[m(o[i])];return s}function _t(t){return D(t)}function mt(t,o){const n=(e,s)=>typeof e!="number"?void 0:x(s)==="px"?e+o:e;return D({...t,frame:o,top:n(t.top,t.unit),bottom:n(t.bottom,t.unit),topTablet:n(t.topTablet,t.unitTablet),bottomTablet:n(t.bottomTablet,t.unitTablet),topPhone:n(t.topPhone,t.unitPhone),bottomPhone:n(t.bottomPhone,t.unitPhone)})}export{k as PAD_BOTTOM_PHONE_CLASS,z as PAD_BOTTOM_PHONE_VAR,K as PAD_BOTTOM_TABLET_CLASS,ot as PAD_BOTTOM_TABLET_VAR,J as PAD_LEFT_PHONE_CLASS,W as PAD_LEFT_PHONE_VAR,v as PAD_LEFT_TABLET_CLASS,nt as PAD_LEFT_TABLET_VAR,Q as PAD_RIGHT_PHONE_CLASS,X as PAD_RIGHT_PHONE_VAR,tt as PAD_RIGHT_TABLET_CLASS,st as PAD_RIGHT_TABLET_VAR,Y as PAD_TOP_PHONE_CLASS,q as PAD_TOP_PHONE_VAR,Z as PAD_TOP_TABLET_CLASS,et as PAD_TOP_TABLET_VAR,j as SECTION_PADDING,N as SECTION_PAD_KEYS,bt as padDefaultIn,pt as padSideAttrs,it as padSideValue,Pt as padValuesOf,Tt as resolveSectionPadding,mt as rootPadAttrs,D as sectionPadAttrs,U as sectionPadStyle,rt as sideViewLengths,_t as wrapperPadAttrs};
1
+ import{storedUnit as w}from"../../../format/lib/content/css-length.js";import{phoneKey as S,resolveViewValue as H,tabletKey as E,viewKeyAt as P}from"efficient-easel/draw";import{SECTION_PAD_UNIT_KEY as y,SITE_SIDE as F,convertLength as G,isLengthUnit as M,isSiteSide as L,sideLengthAt as U,sideValueAt as j,withLength as g}from"efficient-easel/screen/lib/content/length-units";import{siteSideRoom as O}from"../../../format/lib/content/page-width.js";import{viewRules as k}from"../../../format/lib/content/view-overrides.js";import{finiteNumber as l}from"../../../format/lib/finite-number.js";const Y={min:10,max:200,step:10};function $(t,e,n,o=0){const s=l(t),i=l(e);if(s===void 0&&i===void 0)return;const r=h(n),a=p=>p===void 0?void 0:r==="px"?p:g(p,r,o);return{paddingTop:a(s),paddingBottom:a(i)}}const h=t=>w(t),K="sf-pad-top-phone",q="sf-pad-bottom-phone",z="--sf-pad-t-phone",J="--sf-pad-b-phone",Q="sf-pad-left-phone",W="sf-pad-right-phone",X="--sf-pad-l-phone",Z="--sf-pad-r-phone",v="sf-pad-top-tablet",tt="sf-pad-bottom-tablet",et="sf-pad-left-tablet",ot="sf-pad-right-tablet",nt="--sf-pad-t-tablet",st="--sf-pad-b-tablet",it="--sf-pad-l-tablet",dt="--sf-pad-r-tablet";function D(t){const e={desktop:t.unit,tablet:t.unitTablet,phone:t.unitPhone},n=$(t.top,t.bottom,t.unit,t.frame),o=at({left:t.left,right:t.right},{top:t.topPhone,bottom:t.bottomPhone,left:t.leftPhone,right:t.rightPhone},{top:t.topTablet,bottom:t.bottomTablet,left:t.leftTablet,right:t.rightTablet},{top:t.top,bottom:t.bottom,left:t.left,right:t.right},e,t.frame,t.sideSpace);return n===void 0&&!o.classes.length&&!Object.keys(o.style).length?null:{className:["sf-section-pad",...o.classes].join(" "),style:{...n,...o.style}}}const rt=t=>L(t)?t:l(t),pt=[["top","paddingTop",[v,nt],[K,z]],["bottom","paddingBottom",[tt,st],[q,J]],["left","paddingLeft",[et,it],[Q,X]],["right","paddingRight",[ot,dt],[W,Z]]];function _t(t,e,n){return!M(e)||e==="px"?t:G(t,"px",e,n,{min:0,max:Y.max,step:1})}function ft(t,e,n,o={},s=0){const i=(b,u)=>{if(u==="px")return`${b}px`;const f=g(b,u,s);return typeof f=="number"?`${f}px`:f},r={n:t,[E("n")]:e,[S("n")]:n,u:o.desktop,[E("u")]:o.tablet,[S("u")]:o.phone},a=H("spacing",l(t),l(e),l(n),k()),p=(b,u,f)=>{if(j(r,{side:"n"},b,"side",["side"])?.value===F)return O().value;const c=U(r,{side:"n"},"u",b,"side");if(!c)return;const A=u!==null&&!f&&c.unit==="px"&&typeof a[u]=="number";return i(A?a[u]:c.value,c.unit)},_=p("desktop",null,!0),m={},T=p("tablet","tablet",e!==void 0);T!==void 0&&(e!==void 0||T!==_)&&(m.tablet=T);const d=p("mobile","phone",n!==void 0);return d!==void 0&&(n!==void 0||d!==_)&&(m.phone=d),m}function at(t,e,n={},o=t,s={},i=0,r="box"){const a={},p={},_=[],m=O(r);let T=!1;for(const[d,b,...u]of pt){const f=d==="left"||d==="right"?rt:l,c=f(t[d]),A=d==="top"||d==="bottom"?i:0;L(c)?(a[b]=m.value,T=!0):c!==void 0&&(a[b]=h(s.desktop)==="px"?c:g(c,h(s.desktop),A));const R=ft(f(o[d]),f(n[d]),f(e[d]),s,A);for(const[V,[C,I]]of[["tablet",u[0]],["phone",u[1]]]){const x=R[V];x!==void 0&&(_.push(C),p[I]=x,x===m.value&&(T=!0))}}return T&&_.push(...m.className.split(" ")),{classes:_,style:{...a,...p}}}function B(t,e,n){const o=l(t)??n,s=l(e);return o===void 0?s:s===void 0?o:o+s}function Pt(t,e={}){return{top:B(t.padTop,t.sectionPaddingTop,e.top),bottom:B(t.padBottom,t.sectionPaddingBottom,e.bottom)}}const N={top:"sectionPaddingTop",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft",right:"sectionPaddingRight"};function At(t,e=N,n=!0,o=e===N?y:void 0){const s={};if(o){t[o]!==void 0&&(s.unit=t[o]);for(const i of["tablet","mobile"])t[P(o,i)]!==void 0&&(s[P("unit",i)]=t[P(o,i)])}for(const i of n?["top","bottom","left","right"]:["top","bottom"]){s[i]=t[e[i]];for(const r of["tablet","mobile"])s[P(i,r)]=t[P(e[i],r)]}return s}function ht(t){return D(t)}function xt(t,e){const n=(o,s)=>typeof o!="number"?void 0:h(s)==="px"?o+e:o;return D({...t,frame:e,top:n(t.top,t.unit),bottom:n(t.bottom,t.unit),topTablet:n(t.topTablet,t.unitTablet),bottomTablet:n(t.bottomTablet,t.unitTablet),topPhone:n(t.topPhone,t.unitPhone),bottomPhone:n(t.bottomPhone,t.unitPhone)})}export{q as PAD_BOTTOM_PHONE_CLASS,J as PAD_BOTTOM_PHONE_VAR,tt as PAD_BOTTOM_TABLET_CLASS,st as PAD_BOTTOM_TABLET_VAR,Q as PAD_LEFT_PHONE_CLASS,X as PAD_LEFT_PHONE_VAR,et as PAD_LEFT_TABLET_CLASS,it as PAD_LEFT_TABLET_VAR,W as PAD_RIGHT_PHONE_CLASS,Z as PAD_RIGHT_PHONE_VAR,ot as PAD_RIGHT_TABLET_CLASS,dt as PAD_RIGHT_TABLET_VAR,K as PAD_TOP_PHONE_CLASS,z as PAD_TOP_PHONE_VAR,v as PAD_TOP_TABLET_CLASS,nt as PAD_TOP_TABLET_VAR,Y as SECTION_PADDING,N as SECTION_PAD_KEYS,_t as padDefaultIn,at as padSideAttrs,rt as padSideValue,At as padValuesOf,Pt as resolveSectionPadding,xt as rootPadAttrs,D as sectionPadAttrs,$ as sectionPadStyle,ft as sideViewLengths,ht as wrapperPadAttrs};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import c from"../../../../../components/Divider.js";import{padValuesOf as a}from"../../../../content/section-padding.js";import{DividerMeta as d}from"../../../../../../format/lib/document/blocks/general/Divider/meta.js";const g={...d,render:e=>{const{spacing:t,contained:i,style:r,thickness:n,lengthPct:s}=e;return o(c,{spacing:t,contained:i,style:r,thickness:n,lengthPct:s,pad:a(e)})}};export{g as DividerRender};
1
+ import{jsx as a}from"react/jsx-runtime";import d from"../../../../../components/Divider.js";import{padValuesOf as h}from"../../../../content/section-padding.js";import{DividerMeta as m}from"../../../../../../format/lib/document/blocks/general/Divider/meta.js";const k={...m,render:t=>{const{spacing:e,contained:n,style:i,thickness:s,thicknessUnit:r,lengthPct:c,lengthPctUnit:o}=t;return a(d,{spacing:e,contained:n,style:i,thickness:s,thicknessUnit:r,lengthPct:c,lengthPctUnit:o,pad:h(t)})}};export{k as DividerRender};
@@ -1 +1 @@
1
- import{jsx as l}from"react/jsx-runtime";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 f,boxCardProps as d,boxPaintOf as S}from"../../../../../../format/lib/content/box-background.js";import{BOX_ROW_IMAGE_PROP as u}from"../../../../../../format/lib/content/box-card-rule.js";import{sharedColumnsDrawn as w,sharedRowsDrawn as P}from"../../../../content/box-shared-columns.js";import{CountRowsContext as O,NO_COUNTS as k}from"../../../../../components/CountRowsContext.js";import{RowEmptyGate as y}from"../../../../../components/CardRowContext.js";import{BOX_HIDE_WHEN_ROW_EMPTY as C,CARD_ROW_LINK_PROP as T,namedRowField as r}from"../../../../../../format/lib/content/card-template.js";import _ from"../../../../../components/Flex.js";import{loopDelayOf as R,loopSecondsOf as x,parseLoop as D,parseLoopDirection as B}from"../../../../../../format/lib/animation/index.js";import{COUNTS_SOURCE as j,declaredBlockSource as E,servedRows as H}from"../../../../../../format/lib/content/block-sources.js";import{padValuesOf as I}from"../../../../content/section-padding.js";import{sectionFillsHeight as N}from"../../../../../../format/lib/content/section-min-height.js";import{boxHighlightStyle as v,pictureHoverOf as A}from"../../../../../../format/lib/animation/hover.js";import{slotCountOf as F}from"../../../slot-counts.js";import{FlexMeta as L}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";const te={...L,render:e=>{const n=!!e.editor?.isEditing,h=l(_,{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:r(e,u),pictureHover:A(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,pad:I(e),contained:e.contained,fillHeight:N(e),shadow:e.shadow,shadowTablet:e[t("shadow")],shadowPhone:e[a("shadow")],loop:D(e.loop),scrollDirection:B(e.scrollDirection),loopSeconds:x({loopDuration:e.loopDuration}),loopDelay:R({loopDelay:e.loopDelay}),editing:n,fillColor:e.fillColor,fillColorTablet:e[t("fillColor")],fillColorPhone:e[a("fillColor")],swatch:e[f],line:e.line,upcoming:e.upcoming,link:e.link,rowLink:r(e,T),highlight:v(e,m=>S(m)??""),boxShape:e.boxShape,boxShapePhone:e[a("boxShape")],boxShapeTablet:e[t("boxShape")],angle:e[g],jumpHighlight:e.jumpHighlight,anchor:e.anchor,sharedSides:w(d(e,!1)),sharedRows:P(d(e,!1)),boxId:typeof e.id=="string"?e.id:void 0,slotCount:F(e),mirrorCards:e.mirrorCards,content:e.content,rowTitle:e.rowTitle,startsOpen:e.startsOpen,rowStyle:e.rowStyle,sideSpace:e[b]}),o=E(e),c=o?o===j?H(e):k:null,i=l(O.Provider,{value:c,children:h});return e[C]===void 0?i:l(y,{props:e,editing:n,children:i})}};export{te 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 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 +1 @@
1
- import{jsx as f}from"react/jsx-runtime";import{phoneKey as c,tabletKey as l}from"efficient-easel/draw";import s from"../../../../../components/HeroGroup.js";import{padValuesOf as h}from"../../../../content/section-padding.js";import{HeroGroupMeta as j}from"../../../../../../format/lib/document/blocks/general/HeroGroup/meta.js";const R={...j,render:e=>{const{placement:t,nudgeX:r,nudgeY:o,width:n,gap:a,direction:i,justify:p,align:d,wrap:g,content:m,editor:u}=e;return f(s,{placement:t,nudgeX:r,nudgeY:o,width:n,gap:a,gapPhone:e[c("gap")],gapTablet:e[l("gap")],direction:i,justify:p,align:d,wrap:g,pad:h(e),content:m,dragRef:u?.dragRef})}};export{R as HeroGroupRender};
1
+ import{jsx as l}from"react/jsx-runtime";import{phoneKey as h,tabletKey as w}from"efficient-easel/draw";import s from"../../../../../components/HeroGroup.js";import{padValuesOf as j}from"../../../../content/section-padding.js";import{HeroGroupMeta as y}from"../../../../../../format/lib/document/blocks/general/HeroGroup/meta.js";const b={...y,render:e=>{const{placement:t,nudgeX:n,nudgeY:r,nudgeUnit:o,width:i,widthUnit:a,gap:d,direction:g,justify:p,align:u,wrap:m,content:f,editor:c}=e;return l(s,{placement:t,nudgeX:n,nudgeY:r,width:i,widthUnit:a,nudgeUnit:o,gap:d,gapPhone:e[h("gap")],gapTablet:e[w("gap")],direction:g,justify:p,align:u,wrap:m,pad:j(e),content:f,dragRef:c?.dragRef})}};export{b as HeroGroupRender};
@@ -1 +1 @@
1
- import{jsx as g}from"react/jsx-runtime";import{phoneKey as I}from"efficient-easel/draw";import{CardRowDrawn as R}from"../../../../../components/CardRowContext.js";import v 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 S}from"../../../../../../format/lib/content/card-template.js";import{cardRowHoverMedia as P}from"../../../../../../format/lib/content/hover-media.js";import{blockSizeOf as b,blockSizeValuesOf as F}from"../../../../content/block-size.js";import{padValuesOf as _}from"../../../../content/section-padding.js";import{pictureHoverOf as z}from"../../../../../../format/lib/animation/hover.js";import{viewFocusValues as H}from"../../../../../../format/lib/content/picture-focus-rows.js";import{ImageBlockMeta as K}from"../../../../../../format/lib/document/blocks/general/ImageBlock/meta.js";const G={...K,render:e=>{const r=z(e,"ImageBlock"),o=h(e),a=h(e,x);return!o&&!a&&r.kind!=="nextImage"?w(e,e.src,e.alt,r):g(R,{type:"ImageBlock",props:e,children:(t,c,i)=>{const d=o?B(c,o):null,l=o?c?d?.alt:O(o):null,f=o?t.src:e.src,n=(l&&S(i,l))??e.alt,m=r.media?P(c,r.media):null,s=S(i,"name")??(typeof n=="string"?n:""),u=a?t.href:e.href;return w({...e,href:u},f,n,r,m&&r.media?{media:m,name:s,cover:r.media.cover}:null)}})}};function w(e,r,o,a,t=null){const{aspect:c,contained:i,grayscale:d,darken:l,darkenStyle:f,href:n,fit:m,corners:s,cornerSides:u,editor:y}=e,k=H(e,"focal");return g(v,{src:r,alt:o,aspect:c,aspectPhone:e[I("aspect")],contained:i,grayscale:d,darken:l,darkenStyle:f,pictureHover:a,...t?{hoverLayer:t}:{},href:n,fit:m,focal:k.desktop,focalPhone:k.phone,focalTablet:k.tablet,corners:s,cornerSides:u,pad:_(e),ownSize:b(F(e))!==null,editing:y?.isEditing===!0})}export{G as ImageBlockRender};
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 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{SITE_WIDTH_CAP as l,centredCap as d}from"../../../../../../format/lib/content/page-width.js";import a from"../../../../../components/IntroBleed.js";import{hidableText as r}from"efficient-easel/draw";import{parseIntroBleedLayout as n}from"../../../../../../format/lib/sections/intro-bleed-layout.js";import{phHide as i,ctaHide as b}from"../../scaffold.js";import{IntroBleedMeta as y,INTRO_PH as t}from"../../../../../../format/lib/document/blocks/general/IntroBleed/meta.js";function m(e){if(e===!1)return d(l)}const D={...y,render:e=>o(a,{eyebrow:i(e.eyebrow,t.eyebrow,e.editor),title:i(e.title,t.title,e.editor),body:i(e.body,t.body,e.editor),imageLabel:r(e.title)||t.title,imageSrc:e.imageSrc||void 0,imageSrcMobile:e.imageSrcMobile||void 0,cta:b(e.ctaText,e.ctaHref,e.editor),layout:n(e.layout),copyShareDesktop:e.copyShareDesktop,copyShareMobile:e.copyShareMobile,heightDesktop:e.heightDesktop,heightMobile:e.heightMobile,overlay:e.overlay,titleSizeDesktop:e.titleSizeDesktop,bodySizeDesktop:e.bodySizeDesktop,titleSizeMobile:e.titleSizeMobile,bodySizeMobile:e.bodySizeMobile,buttonColor:e.buttonColor||void 0,buttonTextColor:e.buttonTextColor||void 0,uppercase:e.uppercase,capStyle:m(e.fullWidth)})};export{D as IntroBleedRender};
1
+ import{jsx as o}from"react/jsx-runtime";import{SITE_WIDTH_CAP as l,centredCap as d}from"../../../../../../format/lib/content/page-width.js";import n from"../../../../../components/IntroBleed.js";import{hidableText as r}from"efficient-easel/draw";import{parseIntroBleedLayout as a}from"../../../../../../format/lib/sections/intro-bleed-layout.js";import{introSizeUnitsOf as b}from"../../../../../../format/lib/content/section-type-size.js";import{phHide as i,ctaHide as m}from"../../scaffold.js";import{IntroBleedMeta as y,INTRO_PH as t}from"../../../../../../format/lib/document/blocks/general/IntroBleed/meta.js";function S(e){if(e===!1)return d(l)}const k={...y,render:e=>o(n,{eyebrow:i(e.eyebrow,t.eyebrow,e.editor),title:i(e.title,t.title,e.editor),body:i(e.body,t.body,e.editor),imageLabel:r(e.title)||t.title,imageSrc:e.imageSrc||void 0,imageSrcMobile:e.imageSrcMobile||void 0,cta:m(e.ctaText,e.ctaHref,e.editor),layout:a(e.layout),copyShareDesktop:e.copyShareDesktop,copyShareMobile:e.copyShareMobile,heightDesktop:e.heightDesktop,heightMobile:e.heightMobile,overlay:e.overlay,titleSizeDesktop:e.titleSizeDesktop,bodySizeDesktop:e.bodySizeDesktop,titleSizeMobile:e.titleSizeMobile,bodySizeMobile:e.bodySizeMobile,sizeUnits:b(e),buttonColor:e.buttonColor||void 0,buttonTextColor:e.buttonTextColor||void 0,uppercase:e.uppercase,capStyle:S(e.fullWidth)})};export{k as IntroBleedRender};
@@ -1 +1 @@
1
- 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 U,TEXT as A,boxPadding as F,fillSlot as _,token as Y}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{CARD_HOVER_KEYS as E}from"../../../../../format/lib/animation/hover.js";import{COUNT_KEY_PROP as $}from"../../../../../format/lib/content/block-sources.js";import{normalizeSiteGutter as j}from"../../../../../format/lib/content/page-width.js";import{resolveSectionPadding as J}from"../../../content/section-padding.js";import{ButtonBlockMeta as z}from"../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";import{SECTION_PAD_INNER_DEFAULTS as q}from"../../passes/section-padding.js";import{finiteNumber as p}from"../../../../../format/lib/finite-number.js";import{convertTheme as h,hasWords as Q}from"../../../sections/section-to-box.js";import{THEME_SECTION_BG as Z}from"../../../../../format/lib/content/section-background.js";import{fillSlotOfInk as R}from"../../../../../format/lib/document/part-inks.js";import{parseHexColor as tt}from"efficient-shell/format";import{convertLength as ot,isLengthUnit as et}from"efficient-easel/screen/lib/content/length-units";import{bandPresetIndex as nt,surfacePresetIndex as it,surfaceTwoTone as rt}from"../../../../../format/lib/theme.js";import{VIEW_HIDE_KEYS as st}from"../../../../../format/lib/content/view-hide-class.js";const B=t=>et(t)?t:"px",s=(t,o,e,n)=>o===e?t:ot(t,o,e,n,{min:0,max:200,step:4});import{BOX as lo,DIM as go,INNER_BOX as mo,TEXT as Po}from"../../../../../format/lib/document/seed-parts.js";const yt={textFit:"line",textFitPhone:"wrap"},dt={...A,[$]:""},{label:vt,href:Mt,...ct}=z.defaultProps,Wt=ct,Ft={buttonFillOpacity:0,buttonBorder:{width:0},buttonPaddingTop:0,buttonPaddingRight:0,buttonPaddingBottom:0,buttonPaddingLeft:0},Yt={...W,sectionAccent:0},wt={sectionAccent:-1},Gt=["gridSpan","sectionHeightMode","sectionHeightValue","sectionHeightUnit","sectionHeightModeTablet","sectionHeightValueTablet","sectionHeightUnitTablet","sectionHeightModePhone","sectionHeightValuePhone","sectionHeightUnitPhone","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderTablet","sectionBorderPhone","sectionAccent",...V,"anchor",G,...st,...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",Xt={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},Vt=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 at(t,o){const e=p(t.sectionPaddingTop)??0,n=p(t.sectionPaddingBottom)??0,i=p(t.sectionPaddingTopTablet),r=p(t.sectionPaddingBottomTablet),l=B(t.sectionPaddingUnit),g=B(t.sectionPaddingUnitTablet),T=B(t.sectionPaddingUnitPhone),O=(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:O(t.sectionPaddingTopPhone,i,e,o.topPhone),sectionPaddingBottomPhone:O(t.sectionPaddingBottomPhone,r,n,o.bottomPhone)}}const $t=t=>[...["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopTablet","sectionPaddingBottomTablet","sectionPaddingTopPhone","sectionPaddingBottomPhone"].map(o=>[o,o,(e,n)=>at(n,typeof t=="function"?t(n):t)[o]]),["sectionPaddingUnit","sectionPaddingUnit"],["sectionPaddingUnitTablet","sectionPaddingUnitTablet"],["sectionPaddingUnitPhone","sectionPaddingUnitPhone"]];function f(t,o){const e=J(t,q[o]);return{sectionPaddingTop:e.top,sectionPaddingBottom:e.bottom}}const jt=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]],pt={kind:"heading-case-upper",styles:["heading-1","heading-2","heading-3"]},Jt=t=>o=>Q(o.props[t])?[pt]:[],lt=(t,o)=>({kind:"text",key:t,role:"eyebrow",props:A,...o?{style:o}:{}}),zt=t=>({kind:"group",name:"Chip",props:{...I,..._("main"),...F(6,14)},parts:[lt(t,{color:"background",...Y("label",12),weight:600,letterSpacing:.16})]}),L=t=>t.background!=="transparent",gt=(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},H={align:"right",alignPhone:"left"},mt=(t,o,e)=>{const n=i=>gt(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}},qt=(t,o,e,n={})=>mt(t,o,{...dt,...H,...n,_partStyles:{text:{...U,color:"labels",...e,case:U.case,...H}}}),u=(t,o)=>typeof t=="number"&&Number.isInteger(t)&&t>=0?t:h(o)?.selected??0,k="var(--site-surface-2)",D=(t,o)=>h(o)?.themes[u(t.sectionAccent??0,o)],Pt=(t,o)=>(e,n)=>{if(!o?.(e,n))return _(t);const i=D(e,n)?.[t];return i?{fillColor:i}:{}},Qt=(t,o)=>b(t,o)>=0,K=t=>t.startsWith("#")&&tt(t)!==null,Zt=(t,o,e)=>{const n=t?.trim();if(n&&K(n))return{fillColor:n};const i=R(n);if(i)return _(i);const r=n===k?D(o,e):void 0;return r?{fillColor:rt(r)}:{}},to=t=>{const o=t?.trim();return!o||o==="transparent"||o===Z||R(o)||o===k||K(o)?void 0:"it paints a colour that no Box Fill can hold"},b=(t,o)=>{const e=h(o)?.themes;return e&&L(t)?nt(e,u(t.sectionAccent,o)):-1},oo=(t,o,e)=>{const n=b(o,e);return n>=0?n:t},eo=(t,o)=>{const e=h(o)?.themes,n=e?it(e,u(t,o)):-1;return n>=0?n:t},no=(t,o)=>{const e=b(t,o);return e>=0?{sectionAccent:e}:{}},io=(t,o)=>L(t.props)&&b(t.props,o)<0?[{kind:"band-preset",page:u(t.props.sectionAccent,o)}]:[],ro=t=>j(t.site?.siteGutter),ht=Object.fromEntries(["Top","Right","Bottom","Left","TopPhone","RightPhone","BottomPhone","LeftPhone"].map(t=>[`sectionPadding${t}`,0])),so=t=>({top:0,right:0,bottom:0,left:0,...t}),co=(t,o,e,n=[])=>({kind:"group",name:t,keepEmpty:!0,props:(i,r)=>({...I,...ht,...Pt("surface")(i,r),...typeof e=="function"?e(i,r):e}),box:[[o,"bgImage"],E.kind,E.duration,E.delay],parts:n});export{yt as AUTO_COLUMN,lo as BOX,Wt as BUTTON,go as DIM,Xt as DROP_COMMON,Vt as DROP_SIDE_PADDING,wt as FOLLOW_THE_BOX,pt as HEADING_CASE_UPPER,mo as INNER_BOX,ht as NO_PAD,dt as NUMBER_TEXT,H as RIGHT_WORDS,Gt as SAME_KEYS,Yt as SECTION_BOX,Ft as SH_LINK,Po as TEXT,oo as bandAccent,b as bandIndex,u as bandPage,no as bandProps,io as bandWrites,Pt as fillFrom,to as fillNoBoxHolds,zt as filledChip,Jt as headingCaseOf,f as innerPad,jt as innerPadKeys,qt as leadLine,mt as leadText,so as lineSides,gt as numberAndUnit,Qt as onBandPreset,Zt as ownFill,co as pictureCell,D as sectionPage,ro as siteGutterOf,lt as smallText,eo as surfaceAccent,at as wrapperPad,$t as wrapperPadKeys};
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 +1 @@
1
- import{phoneKey as R}from"efficient-easel/draw";import{SITE_SIDE as U}from"efficient-easel/screen/lib/content/length-units";import{finiteNumber as a}from"../../../../../format/lib/finite-number.js";import{parseIntroBleedLayout as F}from"../../../../../format/lib/sections/intro-bleed-layout.js";import{fluidToken as L,token as n}from"./section-head-looks.js";import{labelStyle as C}from"../../../../../format/lib/document/seed-parts.js";import{BUTTON as g,DIM as k,DROP_COMMON as c,DROP_SIDE_PADDING as f,INNER_BOX as i,NO_PAD as p,NUMBER_TEXT as W,SAME_KEYS as u,SECTION_BOX as y,TEXT as m,fillFrom as S,lineSides as r,pictureCell as x,siteGutterOf as w,smallText as s,wrapperPad as T,wrapperPadKeys as B}from"./section-to-box-row-parts.js";const H=(e,t)=>{const o=a(e),b=a(t);return{...o===void 0?{}:{size:o},...b===void 0?{}:{sizePhone:b}}},V=e=>F(e.layout)==="stacked",M=e=>Math.min(Math.max(a(e.overlay)??60,0),100),d=e=>a(e)??100,X={textStyle:"heading-1",sizeToken:{...L("headingLarge",48,7,96).sizeToken,pxPhone:36},weight:500,lineHeight:.95,letterSpacing:-.03},j=[s("eyebrow",n("label",14)),...[!0,!1].map(e=>({kind:"text",key:"title",role:"heading",props:m,style:{...X,case:e?"upper":"none"},styleFrom:t=>H(t.titleSizeDesktop,t.titleSizeMobile),when:t=>t.uppercase===!0===e})),{kind:"text",key:"body",props:{...k,maxWidth:560},style:{textStyle:"body-1",...n("body",17,16),lineHeight:1.6,paragraphSpacing:24},styleFrom:e=>H(e.bodySizeDesktop,e.bodySizeMobile)},{kind:"group",name:"Button",props:{...i,align:"start",sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:g}]}],A=e=>`${e}: a Button block has no colour of its own (it follows the site Button colour, as the old fallback did); 0 of 3 live US nodes store one (CLI read, 2026-11-03)`,G=()=>({name:"Scroll-Over Text",skip:e=>V(e)?"the stacked layout: its words row's height floor (`copyShare*`) and the header subtraction have no Box setting; 0 live US nodes":void 0,boxProps:e=>({...y,direction:"column",justify:"center",align:"start",gap:24,gapPhone:24,share:"content",...p,placement:"left",darken:M(e),darkenStyle:"even",sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:d(e.heightDesktop),sectionHeightModePhone:"fixed",sectionHeightUnitPhone:"%",sectionHeightValuePhone:d(e.heightMobile)}),box:[...u.filter(e=>!String(typeof e=="string"?e:e[0]).startsWith("sectionHeight")),["imageSrc","bgImage"],["imageSrcMobile","bgImagePhone"],["overlay","darken",(e,t)=>M(t)],["heightDesktop","sectionHeightValue",e=>d(e)],["heightMobile","sectionHeightValuePhone",e=>d(e)]],parts:j,drop:{uppercase:"not a value of its own: it picks the heading part — Case Upper when on, None (as typed) when off",layout:"not a value of its own: the overlay layout is this tree; a stacked node is skipped (`skip`)",copyShareDesktop:"the stacked layout's words-row floor, read only there; a stacked node is skipped",copyShareMobile:"the stacked layout's words-row floor, read only there; a stacked node is skipped",sticky:"the old pin key, read as `stickTop` by the section pin's one reader (lib/content/section-sticky); the Box keeps a stored `stickTop` (SAME_KEYS), and this row is switched off until the stored pages hold `stickTop`",titleSizeDesktop:"read by the heading part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",titleSizeMobile:"read by the heading part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",bodySizeDesktop:"read by the words part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",bodySizeMobile:"read by the words part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",buttonColor:A("Button color"),buttonTextColor:A("Button text color"),...c}}),v={textStyle:"heading-2",...n("headingMedium",56,36),weight:400,lineHeight:1.05,letterSpacing:-.03},K={textStyle:"body-1",...n("body",16),lineHeight:1.7},O=e=>({kind:"text",key:"body",props:{...k,maxWidth:520},style:{...K,paragraphSpacing:e}}),l={top:0,bottom:0,topPhone:0,bottomPhone:0},P=(e,t)=>typeof e.sectionHeightMode=="string"&&e.sectionHeightMode!=="auto"?{}:{sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:t,sectionHeightModePhone:"auto"},Y=(e,t)=>{const o=P(e,t);return Object.keys(o).length?o:{sectionHeightMode:e.sectionHeightMode,...e.sectionHeightValue===void 0?{}:{sectionHeightValue:e.sectionHeightValue},...e.sectionHeightUnit===void 0?{}:{sectionHeightUnit:e.sectionHeightUnit},sectionHeightModePhone:"auto"}},I={boxShapePhone:"landscape"},_="needs a black-and-white setting on a Box picture (the old photograph followed it, else the site's Photography); 0 live US nodes store it (CLI read, 2026-11-03)",q=(e,t)=>({[e]:t,[R(e)]:t}),Z={textStyle:"heading-2",...n("headingMedium",40),weight:500,case:"none",lineHeight:1,letterSpacing:-.02},E=e=>(Array.isArray(e.stats)?e.stats:[]).filter(t=>t&&(String(t.value??"").trim()!==""||String(t.label??"").trim()!=="")),$=()=>({name:"Brand Text",boxProps:(e,t)=>({...y,...S("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...T(e,l),...P(e,100)}),box:[...u,...B(l)],parts:[{kind:"group",name:"Words",props:()=>({...i,justify:"center",gap:28,gapPhone:28,sectionBorder:r({right:1}),sectionBorderPhone:r({}),...p,sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60,sectionPaddingRight:U}),parts:[s("eyebrow",n("label",14)),{kind:"text",key:"heading",role:"heading",props:m,style:{...v,case:"none"},mark:"accentItalic"},O(28),{kind:"group",name:"Stats",props:{...i,sectionPaddingTop:16,sectionPaddingTopPhone:16},parts:[{kind:"group",name:"Figures",props:e=>({...i,direction:"row",share:"equal",gap:24,gapPhone:24,maxWidth:520,phoneRow:Math.min(Math.max(E(e).length,1),3),...q("sectionBorder",r({top:1})),sectionPaddingTop:28,sectionPaddingTopPhone:28}),parts:[{kind:"list",key:"stats",name:"Stat",of:E,props:{...i,gap:4,gapPhone:4},parts:[{kind:"text",key:"value",props:W,style:Z},s("label",{...n("label",13),color:"labels",letterSpacing:.2})]}]}]}]},x("Picture","imageSrc",I)],drop:{...c,grayscale:_,...f}}),h=e=>{const t=e.textAlign==="center"||e.textAlign==="right"?{align:e.textAlign}:{},o=e.textAlignPhone==="left"||e.textAlignPhone==="center"||e.textAlignPhone==="right"?{alignPhone:e.textAlignPhone}:{};return{...t,...o}},J=e=>e.textAlign==="center"?"center":e.textAlign==="right"?"end":"stretch",Q=e=>Math.min(Math.max(a(e.overlay)??60,0),100),D=e=>typeof e=="string"&&e.trim()!=="",ee={...g,align:"center",alignPhone:"center",buttonFillOpacity:0,buttonBorder:{width:1},buttonPaddingTop:16,buttonPaddingRight:28,buttonPaddingBottom:16,buttonPaddingLeft:28,buttonPaddingTopPhone:12,buttonPaddingRightPhone:20,buttonPaddingBottomPhone:12,buttonPaddingLeftPhone:20},N=e=>({...x("Picture","imageSrc",(t,o)=>({...D(t.imageSrc)?{darken:40,darkenStyle:"even"}:{},placement:"center",...I,sectionBorder:r(e?{left:1}:{right:1}),...z(e?"left":"right",w(o))}),[{kind:"button",key:"imageBtnText",href:"imageBtnHref",variant:"ghost",props:ee,style:{...C(13,12),letterSpacing:.18}}]),when:t=>t.reverse===!0===e}),z=(e,t)=>{const o=Math.max(60-t,0);return{sectionPaddingLeft:e==="left"?60:o,sectionPaddingRight:e==="right"?60:o}},te={kind:"group",name:"Words",props:(e,t)=>{const o=e.reverse===!0;return{...i,justify:"center",align:J(e),placement:e.textAlign==="center"?"center":e.textAlign==="right"?"right":"left",...Y(e,72),gap:24,gapPhone:24,...D(e.textBgSrc)?{darken:Q(e),darkenStyle:"even"}:{},...p,sectionPaddingTop:100,sectionPaddingBottom:100,...z(o?"right":"left",w(t)),sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60}},box:[["textBgSrc","bgImage"]],parts:[{...s("eyebrow",n("label",14)),styleFrom:h},{kind:"text",key:"title",role:"heading",props:m,style:v,styleFrom:e=>({case:e.uppercase===!0?"upper":"none",...h(e)})},{...O(24),styleFrom:h},{kind:"group",name:"Button",props:{...i,sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:e=>{const t=h(e);return{...g,...t.align?{align:t.align}:{},...t.alignPhone?{alignPhone:t.alignPhone}:{}}}}]}]},oe=()=>({name:"Image & Text Split",boxProps:(e,t)=>({...y,...S("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...T(e,l),...P(e,72)}),box:[...u,...B(l)],parts:[N(!1),te,N(!0)],drop:{reverse:"not a value of its own: it picks the order — the Picture Box first, or after the Words",uppercase:"not a value of its own: the heading part's Case — Upper when on, None (as typed) when off",textAlign:"read by each words part (its Align) and the Words Box (its Align); left writes nothing, as the old emitted no class",textAlignPhone:"read by each words part as its phone Align",textAlignTablet:"not carried to the words part's own tablet Align (`alignTablet`) yet: no old node stores it (new with the Tablet view's Text alignment row, 0 stored on the US sites 2026-11-06), so nothing moves",overlay:"read by the Words Box: its Darken over the words picture (60 when unset); no picture, no wash",grayscale:_,...c,...f}}),he={IntroBleed:G(),Manifesto:$(),Split:oe()};export{he as EDITORIAL_SECTION_TO_BOX};
1
+ import{phoneKey as V}from"efficient-easel/draw";import{SITE_SIDE as K}from"efficient-easel/screen/lib/content/length-units";import{finiteNumber as r}from"../../../../../format/lib/finite-number.js";import{INTRO_SIZE_UNIT_KEYS as Y,introSizeUnitsOf as x}from"../../../../../format/lib/content/section-type-size.js";import{PART_UNIT_KEY_OF as w}from"../../part-styles.js";import{parseIntroBleedLayout as j}from"../../../../../format/lib/sections/intro-bleed-layout.js";import{fluidToken as X,token as n}from"./section-head-looks.js";import{labelStyle as G}from"../../../../../format/lib/document/seed-parts.js";import{BUTTON as c,DIM as T,DROP_COMMON as p,DROP_SIDE_PADDING as B,INNER_BOX as i,NO_PAD as u,NUMBER_TEXT as q,SAME_KEYS as y,SECTION_BOX as m,TEXT as b,fillFrom as H,lineSides as s,pictureCell as M,siteGutterOf as A,smallText as a,wrapperPad as O,wrapperPadKeys as I}from"./section-to-box-row-parts.js";const _=(e,t,o)=>{const k=r(e),f=r(t),S=(W,g)=>g&&g!=="px"?{[W]:g}:{};return{...k===void 0?{}:{size:k,...S(w.size,o?.desktop)},...f===void 0?{}:{sizePhone:f,...S(w.sizePhone,o?.phone)}}},Z=e=>j(e.layout)==="stacked",v=e=>Math.min(Math.max(r(e.overlay)??60,0),100),d=e=>r(e)??100,$={textStyle:"heading-1",sizeToken:{...X("headingLarge",48,7,96).sizeToken,pxPhone:36},weight:500,lineHeight:.95,letterSpacing:-.03},J=[a("eyebrow",n("label",14)),...[!0,!1].map(e=>({kind:"text",key:"title",role:"heading",props:b,style:{...$,case:e?"upper":"none"},styleFrom:t=>{const o=x(t);return _(t.titleSizeDesktop,t.titleSizeMobile,{desktop:o.titleDesktop,phone:o.titleMobile})},when:t=>t.uppercase===!0===e})),{kind:"text",key:"body",props:{...T,maxWidth:560},style:{textStyle:"body-1",...n("body",17,16),lineHeight:1.6,paragraphSpacing:24},styleFrom:e=>{const t=x(e);return _(e.bodySizeDesktop,e.bodySizeMobile,{desktop:t.bodyDesktop,phone:t.bodyMobile})}},{kind:"group",name:"Button",props:{...i,align:"start",sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:c}]}],E=e=>`${e}: a Button block has no colour of its own (it follows the site Button colour, as the old fallback did); 0 of 3 live US nodes store one (CLI read, 2026-11-03)`,Q=()=>({name:"Scroll-Over Text",skip:e=>Z(e)?"the stacked layout: its words row's height floor (`copyShare*`) and the header subtraction have no Box setting; 0 live US nodes":void 0,boxProps:e=>({...m,direction:"column",justify:"center",align:"start",gap:24,gapPhone:24,share:"content",...u,placement:"left",darken:v(e),darkenStyle:"even",sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:d(e.heightDesktop),sectionHeightModePhone:"fixed",sectionHeightUnitPhone:"%",sectionHeightValuePhone:d(e.heightMobile)}),box:[...y.filter(e=>!String(typeof e=="string"?e:e[0]).startsWith("sectionHeight")),["imageSrc","bgImage"],["imageSrcMobile","bgImagePhone"],["overlay","darken",(e,t)=>v(t)],["heightDesktop","sectionHeightValue",e=>d(e)],["heightMobile","sectionHeightValuePhone",e=>d(e)]],parts:J,drop:{uppercase:"not a value of its own: it picks the heading part — Case Upper when on, None (as typed) when off",layout:"not a value of its own: the overlay layout is this tree; a stacked node is skipped (`skip`)",copyShareDesktop:"the stacked layout's words-row floor, read only there; a stacked node is skipped",copyShareMobile:"the stacked layout's words-row floor, read only there; a stacked node is skipped",sticky:"the old pin key, read as `stickTop` by the section pin's one reader (lib/content/section-sticky); the Box keeps a stored `stickTop` (SAME_KEYS), and this row is switched off until the stored pages hold `stickTop`",titleSizeDesktop:"read by the heading part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",titleSizeMobile:"read by the heading part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",bodySizeDesktop:"read by the words part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",bodySizeMobile:"read by the words part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",...Object.fromEntries(Y.map(e=>[e,"read by its part's `styleFrom`: the unit of that view's Size"])),buttonColor:E("Button color"),buttonTextColor:E("Button text color"),...p}}),D={textStyle:"heading-2",...n("headingMedium",56,36),weight:400,lineHeight:1.05,letterSpacing:-.03},ee={textStyle:"body-1",...n("body",16),lineHeight:1.7},N=e=>({kind:"text",key:"body",props:{...T,maxWidth:520},style:{...ee,paragraphSpacing:e}}),l={top:0,bottom:0,topPhone:0,bottomPhone:0},P=(e,t)=>typeof e.sectionHeightMode=="string"&&e.sectionHeightMode!=="auto"?{}:{sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:t,sectionHeightModePhone:"auto"},te=(e,t)=>{const o=P(e,t);return Object.keys(o).length?o:{sectionHeightMode:e.sectionHeightMode,...e.sectionHeightValue===void 0?{}:{sectionHeightValue:e.sectionHeightValue},...e.sectionHeightUnit===void 0?{}:{sectionHeightUnit:e.sectionHeightUnit},sectionHeightModePhone:"auto"}},z={boxShapePhone:"landscape"},U="needs a black-and-white setting on a Box picture (the old photograph followed it, else the site's Photography); 0 live US nodes store it (CLI read, 2026-11-03)",oe=(e,t)=>({[e]:t,[V(e)]:t}),ne={textStyle:"heading-2",...n("headingMedium",40),weight:500,case:"none",lineHeight:1,letterSpacing:-.02},R=e=>(Array.isArray(e.stats)?e.stats:[]).filter(t=>t&&(String(t.value??"").trim()!==""||String(t.label??"").trim()!=="")),ie=()=>({name:"Brand Text",boxProps:(e,t)=>({...m,...H("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...O(e,l),...P(e,100)}),box:[...y,...I(l)],parts:[{kind:"group",name:"Words",props:()=>({...i,justify:"center",gap:28,gapPhone:28,sectionBorder:s({right:1}),sectionBorderPhone:s({}),...u,sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60,sectionPaddingRight:K}),parts:[a("eyebrow",n("label",14)),{kind:"text",key:"heading",role:"heading",props:b,style:{...D,case:"none"},mark:"accentItalic"},N(28),{kind:"group",name:"Stats",props:{...i,sectionPaddingTop:16,sectionPaddingTopPhone:16},parts:[{kind:"group",name:"Figures",props:e=>({...i,direction:"row",share:"equal",gap:24,gapPhone:24,maxWidth:520,phoneRow:Math.min(Math.max(R(e).length,1),3),...oe("sectionBorder",s({top:1})),sectionPaddingTop:28,sectionPaddingTopPhone:28}),parts:[{kind:"list",key:"stats",name:"Stat",of:R,props:{...i,gap:4,gapPhone:4},parts:[{kind:"text",key:"value",props:q,style:ne},a("label",{...n("label",13),color:"labels",letterSpacing:.2})]}]}]}]},M("Picture","imageSrc",z)],drop:{...p,grayscale:U,...B}}),h=e=>{const t=e.textAlign==="center"||e.textAlign==="right"?{align:e.textAlign}:{},o=e.textAlignPhone==="left"||e.textAlignPhone==="center"||e.textAlignPhone==="right"?{alignPhone:e.textAlignPhone}:{};return{...t,...o}},re=e=>e.textAlign==="center"?"center":e.textAlign==="right"?"end":"stretch",se=e=>Math.min(Math.max(r(e.overlay)??60,0),100),F=e=>typeof e=="string"&&e.trim()!=="",ae={...c,align:"center",alignPhone:"center",buttonFillOpacity:0,buttonBorder:{width:1},buttonPaddingTop:16,buttonPaddingRight:28,buttonPaddingBottom:16,buttonPaddingLeft:28,buttonPaddingTopPhone:12,buttonPaddingRightPhone:20,buttonPaddingBottomPhone:12,buttonPaddingLeftPhone:20},L=e=>({...M("Picture","imageSrc",(t,o)=>({...F(t.imageSrc)?{darken:40,darkenStyle:"even"}:{},placement:"center",...z,sectionBorder:s(e?{left:1}:{right:1}),...C(e?"left":"right",A(o))}),[{kind:"button",key:"imageBtnText",href:"imageBtnHref",variant:"ghost",props:ae,style:{...G(13,12),letterSpacing:.18}}]),when:t=>t.reverse===!0===e}),C=(e,t)=>{const o=Math.max(60-t,0);return{sectionPaddingLeft:e==="left"?60:o,sectionPaddingRight:e==="right"?60:o}},de={kind:"group",name:"Words",props:(e,t)=>{const o=e.reverse===!0;return{...i,justify:"center",align:re(e),placement:e.textAlign==="center"?"center":e.textAlign==="right"?"right":"left",...te(e,72),gap:24,gapPhone:24,...F(e.textBgSrc)?{darken:se(e),darkenStyle:"even"}:{},...u,sectionPaddingTop:100,sectionPaddingBottom:100,...C(o?"right":"left",A(t)),sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60}},box:[["textBgSrc","bgImage"]],parts:[{...a("eyebrow",n("label",14)),styleFrom:h},{kind:"text",key:"title",role:"heading",props:b,style:D,styleFrom:e=>({case:e.uppercase===!0?"upper":"none",...h(e)})},{...N(24),styleFrom:h},{kind:"group",name:"Button",props:{...i,sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:e=>{const t=h(e);return{...c,...t.align?{align:t.align}:{},...t.alignPhone?{alignPhone:t.alignPhone}:{}}}}]}]},le=()=>({name:"Image & Text Split",boxProps:(e,t)=>({...m,...H("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...O(e,l),...P(e,72)}),box:[...y,...I(l)],parts:[L(!1),de,L(!0)],drop:{reverse:"not a value of its own: it picks the order — the Picture Box first, or after the Words",uppercase:"not a value of its own: the heading part's Case — Upper when on, None (as typed) when off",textAlign:"read by each words part (its Align) and the Words Box (its Align); left writes nothing, as the old emitted no class",textAlignPhone:"read by each words part as its phone Align",textAlignTablet:"not carried to the words part's own tablet Align (`alignTablet`) yet: no old node stores it (new with the Tablet view's Text alignment row, 0 stored on the US sites 2026-11-06), so nothing moves",overlay:"read by the Words Box: its Darken over the words picture (60 when unset); no picture, no wash",grayscale:U,...p,...B}}),ke={IntroBleed:Q(),Manifesto:ie(),Split:le()};export{ke as EDITORIAL_SECTION_TO_BOX};
@@ -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=["Collections","FAQ","Footprint","GalleryB","LongRead","ProcessSteps","RelatedProducts"],so=["Events","FitmentTable","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 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};
@@ -3,6 +3,7 @@ import { type FontRole } from "../../../format/lib/fonts.js";
3
3
  import type { PartEl } from "../../../editor/lib/document/part-anchors.js";
4
4
  import { type PartNeedle } from "./text-parts.js";
5
5
  import { type TextRegion } from "../../../format/lib/sections/text-regions.js";
6
+ import { type LengthUnit } from "efficient-easel/screen/lib/content/length-units";
6
7
  export declare const PART_STYLES_PROP = "_partStyles";
7
8
  export declare const PART_STYLED_ATTR = "data-sf-part-styled";
8
9
  export declare const TEXT_STYLE_ATTR = "data-sf-text-style";
@@ -84,6 +85,11 @@ export type PartStyle = {
84
85
  italic?: boolean;
85
86
  sizePhone?: number;
86
87
  sizeTablet?: number;
88
+ sizeUnit?: LengthUnit;
89
+ sizeUnitTablet?: LengthUnit;
90
+ sizeUnitPhone?: LengthUnit;
91
+ paragraphSpacingUnit?: LengthUnit;
92
+ paddingUnit?: LengthUnit;
87
93
  alignTablet?: PartAlign;
88
94
  alignPhone?: PartAlign;
89
95
  };
@@ -110,6 +116,13 @@ export type StyledPartStamp = {
110
116
  export declare function readPartStyles(props: Record<string, unknown> | undefined): PartStyles;
111
117
  export declare function readPartStyle(props: Record<string, unknown> | undefined, partKey: string): PartStyle;
112
118
  export declare function partStyleCount(props: Record<string, unknown> | undefined, partKey: string): number;
119
+ export declare const PART_UNIT_KEY_OF: {
120
+ readonly size: "sizeUnit" | "sizeUnitTablet" | "sizeUnitPhone";
121
+ readonly sizeTablet: "sizeUnit" | "sizeUnitTablet" | "sizeUnitPhone";
122
+ readonly sizePhone: "sizeUnit" | "sizeUnitTablet" | "sizeUnitPhone";
123
+ readonly paragraphSpacing: "paragraphSpacingUnit";
124
+ readonly padding: "paddingUnit";
125
+ };
113
126
  export declare function propsWithPartStyleValue<K extends keyof PartStyle>(props: Record<string, unknown>, partKey: string, prop: K, value: PartStyle[K] | null): Record<string, unknown>;
114
127
  export declare function propsWithoutPartStyle(props: Record<string, unknown>, partKey: string): Record<string, unknown>;
115
128
  export declare function partCaseOfTransform(transform: string | null | undefined): TextStyleCase;
@@ -1,2 +1,2 @@
1
- import{textStyleCaseCss as nt,textStyleCaseOfCss as ot}from"efficient-easel/draw";import{FONT_OPTIONS as it,fontOption as rt,fontRoleOf as _,SIZE_STEP_OF_ROLE as w}from"../../../format/lib/fonts.js";import{encodePartKey as v}from"../../../format/lib/document/part-key.js";import{decodePartId as C,normalizePartText as O}from"./text-parts.js";import{partInkCss as at}from"../../../format/lib/document/part-inks.js";import{regionStyle as st}from"../../../format/lib/sections/text-regions.js";import{EDGE_PHONE_MEDIA as ft,EDGE_TABLET_MEDIA as lt,PHONE_MEDIA as ct,TABLET_MEDIA as ut,viewOverrides as pt}from"../content/view-values.js";import{plainRecord as N,propsWithPartRecord as dt,readPartRecord as xt,readPartRecords as gt}from"../../../format/lib/document/part-records.js";const k="_partStyles",ht="data-sf-part-styled",W="data-sf-text-style",St=/^(heading|body)-[1-7]$/;function S(t){return typeof t=="string"&&St.test(t)}const G={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function bt(t){if(!t)return null;for(const[e,n]of Object.entries(G))if(n===t)return e;return null}function ze(t){if(S(t.textStyle))return t.textStyle;const e=_(t.role);return e?G[e]:void 0}const mt=[400,500,600,700],A=["left","center","right","justify"],I=5,y=1e3,Tt=-5,Pt=10,At=0,Rt=64,_t=2,B={size:{min:I,max:y,step:1},sizeTablet:{min:I,max:y,step:1},sizePhone:{min:I,max:y,step:1},padding:{min:At,max:Rt,step:_t}},zt=.05,Et=.01,$t=["line","letter"],wt=.5,Ot=2.5,Nt=-1,kt=1,It=0,yt=400,Ft=[...new Set(Object.values(w))];function Ee(t){return[`${t} { transition: translate var(--page-motion-hover-duration) var(--page-ease-media) var(--page-motion-hover-delay) }`,`${t}:hover, ${t}:active { translate: 0 calc(-1 * var(--page-hover-lift)) }`]}function $e(t){return gt(t,k)}function K(t,e){return xt(t,k,e)}function we(t,e){return Object.values(K(t,e)).filter(n=>n!==void 0).length}function X(t,e,n){return dt(t,k,e,Mt(n).length?n:null)}function Mt(t){return Object.entries(t).filter(([,e])=>e!==void 0)}function Lt(t){return $t.includes(t)}const R=(t,e,n)=>Math.min(n,Math.max(e,t));function Dt(t,e){if(Lt(t)){const n=Math.round(Number(e));return!Number.isFinite(n)||n===0?null:R(n,Tt,Pt)}if(t==="lineHeight"){const n=Number(e);return Number.isFinite(n)?P(R(n,wt,Ot),3):null}if(t==="letterSpacing"){const n=Number(e);return Number.isFinite(n)?P(R(n,Nt,kt),4):null}if(t==="paragraphSpacing"){const n=Math.round(Number(e));return!Number.isFinite(n)||n<=0?null:R(n,It,yt)}if(Object.hasOwn(B,t)){const{min:n,max:o}=B[t],i=Math.round(Number(e));return Number.isFinite(i)?R(i,n,o):null}return t==="italic"?typeof e=="boolean"?e:null:t==="role"||t==="fontRole"?_(e)?e:null:t==="sizeToken"?F(e)?e:null:t==="textStyle"?S(e)?e:null:t==="alignPhone"||t==="alignTablet"?A.includes(e)?e:null:e}const Ht=["weight","size","sizeTablet","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding"];function T(t){let e=null;const n=o=>{e??={...t},delete e[o]};for(const o of Ht){const i=t[o];i!==void 0&&!(typeof i=="number"&&Number.isFinite(i))&&n(o)}return t.align!==void 0&&!A.includes(t.align)&&n("align"),t.alignTablet!==void 0&&!A.includes(t.alignTablet)&&n("alignTablet"),t.alignPhone!==void 0&&!A.includes(t.alignPhone)&&n("alignPhone"),t.textStyle!==void 0&&!S(t.textStyle)&&n("textStyle"),t.sizeToken!==void 0&&!F(t.sizeToken)&&n("sizeToken"),t.fontRole!==void 0&&!_(t.fontRole)&&n("fontRole"),e??t}function F(t){if(!t||typeof t!="object")return!1;const{step:e,px:n,stepPhone:o,pxPhone:i,fluid:r}=t,l=c=>typeof c=="number"&&Number.isFinite(c)&&c>0,a=c=>typeof c=="string"&&Ft.includes(c);return a(e)&&l(n)&&(o===void 0||a(o))&&(i===void 0||l(i))&&(r===void 0||jt(r,n))}function jt(t,e){if(!t||typeof t!="object"||Array.isArray(t))return!1;const{minPx:n,vw:o,...i}=t;return Object.keys(i).length===0&&typeof n=="number"&&Number.isFinite(n)&&n>0&&n<e&&typeof o=="number"&&Number.isFinite(o)&&o>0&&o<=100}function M(t){return t?.pxPhone&&F(t)?{step:t.stepPhone??t.step,px:t.pxPhone}:null}function U({step:t,px:e,fluid:n}){const o=n?`clamp(${n.minPx}px, ${n.vw}vw, ${e}px)`:`${e}px`,i=`var(--size-${t}, ${o})`;return t.startsWith("heading")?`min(${i}, var(--sf-heading-max,9999px))`:i}const vt=[["font","role"],["font","fontRole"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function Ct(t){const e=[];for(const[n,o]of vt)n===t?e.push(o):o===t&&e.push(n);return e}function Oe(t,e,n,o){const i={...K(t,e)},r=o==null?null:Dt(n,o);if(r===null)delete i[n];else{i[n]=r;for(const l of Ct(n))delete i[l]}return X(t,e,i)}function Ne(t,e){return X(t,e,{})}function Wt(t){return ot(t)??"none"}function Gt(t){return nt(t)??""}const V={heading:"--font-role-heading",heading2:"--font-role-heading2",heading3:"--font-role-heading3",body:"--font-role-body",accent:"--font-role-accent",label:"--font-role-label"};function Bt(t,e){const n=_(t.role);return n||(e?.blockDrawsStyle?null:bt(t.textStyle))}function ke(t,e){return t==="Text"&&e==="text"}const Kt={headingLarge:"min(clamp(64px,9vw,144px), var(--sf-heading-max,9999px))",headingMedium:"min(32px, var(--sf-heading-max,9999px))",headingSmall:"min(24px, var(--sf-heading-max,9999px))",accent:"32px",body:"14px",label:"12px"};function Xt(t){const e=w[t],n=Kt[e];return n?`var(--size-${e}, ${n})`:`var(--size-${e})`}function Ut(t){const e={};return typeof t.lineHeight=="number"?e.lineHeight=t.lineHeight:t.line&&(e.lineHeight=P(Vt+t.line*zt,3)),typeof t.letterSpacing=="number"?e.letterSpacingEm=t.letterSpacing:t.letter&&(e.letterSpacingEm=P(t.letter*Et,4)),e}const Vt=1,b="--sf-part-para";function Yt(t){t=T(t);const e={};if(typeof t.sizePhone=="number"&&t.sizePhone>0)e.fontSize=`${t.sizePhone}px`;else{const o=M(t.sizeToken);if(o)e.fontSize=U(o);else{const i=E(t);i!==void 0&&(e.fontSize=`${i}px`)}}const n=t.alignPhone??z(t);return n&&(e.textAlign=n),e}function z(t){return t.alignTablet&&t.alignTablet!==t.align?t.alignTablet:void 0}function E(t){const e=pt("textSize",t.size,t.sizeTablet,void 0).tablet;return e&&e>0?e:void 0}function Zt(t){const e=T(t),n={},o=E(e);o!==void 0&&(n.fontSize=`${o}px`);const i=z(e);return i&&(n.textAlign=i),n}function Ie(t,e){if(e==="desktop")return;const n=T(t);return(e==="mobile"?z(n):void 0)??n.align}function qt(t,e){if(e==="desktop")return t;const n=T(t),o=E(n),i=z(n);if(e==="tablet"){let a=t;return o!==void 0&&(a={...a,size:o}),i&&(a={...a,align:i}),a}let r=t;if(typeof n.sizePhone=="number"&&n.sizePhone>0)r={...r,size:n.sizePhone};else{const a=M(n.sizeToken);a?r={...r,size:void 0,sizeToken:a}:o!==void 0&&(r={...r,size:o})}const l=n.alignPhone??i;return l&&(r={...r,align:l}),r}function L(t,e,n){return D(qt(t,e),$,n)}function Jt(t){return t==="mobile"?"sizePhone":t==="tablet"?"sizeTablet":"size"}function ye(t,e){if(e==="desktop")return null;const n=T(t);if(e==="mobile"){if(M(n.sizeToken))return null;const o=E(n);if(o!==void 0)return{px:o,view:"tablet"}}return typeof n.size=="number"&&n.size>0?{px:n.size,view:"desktop"}:null}function Y(t,e){const n=Jt(e);if(!Object.hasOwn(t,n))return t;const o={...t};return delete o[n],o}function Fe(t,e,n){const o=L(Y(t,e),e,n);return{fontFamily:o.fontFamily,fontSize:o.fontSize}}function D(t,e,n){t=T(t);const o=Bt(t,n),i=Ut(t),r=t.size?`${t.size}px`:t.sizeToken?U(t.sizeToken):o?Xt(o):"";return{fontFamily:t.font?ne(t.font):t.fontRole?`var(${V[t.fontRole]})`:o?`var(${V[o]})`:"",fontWeight:t.weight?String(t.weight):"",fontSize:r,minWidth:r?"0":"",overflowWrap:r?"break-word":"",lineHeight:i.lineHeight!==void 0?String(i.lineHeight):"",letterSpacing:i.letterSpacingEm!==void 0?`${i.letterSpacingEm}em`:"",[b]:t.paragraphSpacing?`${t.paragraphSpacing}px`:"",textTransform:Gt(t.case),textAlign:t.align??"",paddingTop:Z(t.padding),paddingBottom:Z(t.padding),color:Qt(t.color),fontStyle:t.italic===!0?"italic":t.italic===!1?"normal":""}}const Qt=t=>at(t),Z=t=>t===void 0?"":`${t}px`,P=(t,e)=>Number(t.toFixed(e));function Me(t,e){const n=Number.parseFloat(t.fontSize)||16,o=Number.parseFloat(t.lineHeight),i=Number.parseFloat(t.letterSpacing),r=Number.parseFloat(t.paddingTop);return{fontKey:e,sizePx:n,weight:te(Number.parseInt(t.fontWeight,10)),lineRatio:Number.isFinite(o)?P(o/n,3):1.2,letterEm:Number.isFinite(i)?P(i/n,4):0,align:ee(t.textAlign),case:Wt(t.textTransform),paddingPx:Number.isFinite(r)?Math.round(r):0}}function te(t){return Number.isFinite(t)?mt.reduce((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e):400}function ee(t){for(const e of A)if(e===t)return e;return t==="end"?"right":"left"}function Le(t,e){const n=q(t);if(!n)return"";for(const o of it)if(q(e(o.cssVar))===n)return o.key;return""}const q=t=>(t.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function ne(t){const e=rt(t);return e?`var(${e.cssVar})`:""}function De(t,e,n,o){return!e||C(e)?.nodeId!==t?null:n.find(r=>o(r.getAttribute("class")))??n[0]??null}function oe(t,e){return Object.hasOwn(t,e)?N(t[e])??{}:{}}function He(t,e,n=()=>$,o=a=>a,i=ae,r="desktop",l=()=>!1){let a=0;for(const{element:c,partId:h}of t){const x=C(h)?.propKey;if(!x)continue;const s=oe(e,o(x)),f=L(s,r,{blockDrawsStyle:l(x)});S(s.textStyle)?c.setAttribute?.(W,s.textStyle):c.removeAttribute?.(W);const d=j.some(g=>c.style[g]);let p=!1;for(const[g,u]of Object.entries(f))le(c,g,u),u&&(p=!0);if(d||j.some(g=>f[g]))for(const g of ie(c,i))for(const u of j)g.style[u]=f[u]??"";p&&(a+=1)}return a}function ie(t,e){const n=O(t.textContent??""),o=[];let i=t;for(let r=0;r<re&&e(i);r+=1){const l=i.parentElement;if(!l||O(l.textContent??"")!==n)break;o.push(l),i=l}return o}const re=8;function ae(t){const e=t;return typeof window>"u"||!e?.ownerDocument?!1:window.getComputedStyle(e).display==="inline"}const $={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0};function se(t){if(!t||typeof t!="object")return null;const e={};return S(t.textStyle)&&(e.textStyle=t.textStyle),typeof t.size=="number"&&t.size>0&&(e.size=t.size),typeof t.sizeTablet=="number"&&t.sizeTablet>0&&(e.sizeTablet=t.sizeTablet),typeof t.sizePhone=="number"&&t.sizePhone>0&&(e.sizePhone=t.sizePhone),Object.keys(e).length?e:null}function fe(t,e){const n=se(t);if(!n)return{};const o=L(n,e);return{...o.fontFamily?{fontFamily:o.fontFamily}:{},...o.fontSize?{fontSize:o.fontSize}:{}}}function je(t){return S(t?.textStyle)||!!t?.role||typeof t?.size=="number"&&t.size>0}function ve(t,e,n){if(!t||typeof t!="object")return{};const o=st(t.role,e,w)??{},i=e.sized?fe(Y(t,n),n):{};return{...o,...i}}function Ce(t,e,n){n.fontFamily&&t.fontFamily===n.fontFamily&&(t.fontFamily=e.fontFamily),n.fontSize&&t.fontSize===n.fontSize&&(t.fontSize=e.fontSize)}function le(t,e,n){if(!e.startsWith("--")){t.style[e]=n;return}const o=t.style;typeof o.setProperty=="function"?n?o.setProperty(e,n):o.removeProperty?.(e):o[e]=n;const i=t;e===b&&(n?i.setAttribute?.(J,""):i.removeAttribute?.(J))}const J="data-sf-part-para",ce=Object.keys(D({},$)),H=new Set(["color","overflowWrap",b,"fontStyle"]),j=ce.filter(t=>!H.has(t));function We(t,e,n,o=a=>a,i=()=>!1,r=()=>null,l=[]){const a=new Map;for(const s of t){const f=v(s.key,s.row);for(const d of s.texts){const p=a.get(d);p?(p.keys.add(s.key),p.partKeys.add(f)):a.set(d,{keys:new Set([s.key]),partKeys:new Set([f])})}}const c=new Map;for(const s of new Set([...Object.keys(e),...l])){if(!ue(s))continue;const f=Q(n,s,N(e[s])??{},!1,r(s));f&&c.set(s,f)}const h=s=>{const f=o(s),d=r(f);if(!Object.hasOwn(e,f)&&!d)return null;const p=N(e[f])??{};return Q(n,s,p,i(s),d)},x=new Map;for(const[s,{keys:f,partKeys:d}]of a){const p=d.size===1?[...d][0]:f.size===1?[...f][0]:null;if(!p)continue;const m=h(p);m&&x.set(s,m)}for(const s of t){if(!s.keyed)continue;const f=h(v(s.key,s.row));f&&c.set(s.key,f)}return x.size||c.size?{rules:x,kindRules:c,drawn:new Set(a.keys())}:null}function Q(t,e,n,o,i){const r=D(n,$,{blockDrawsStyle:o}),l=Zt(n),a=Yt(n),c=S(n.textStyle)?n.textStyle:void 0;return!Object.values(r).some(Boolean)&&!Object.keys(l).length&&!Object.keys(a).length&&!c&&!i?null:{stamp:pe(t,e),declarations:r,...Object.keys(l).length?{tablet:l}:{},...Object.keys(a).length?{phone:a}:{},...c?{textStyle:c}:{},...i?{motion:i}:{}}}function ue(t){return t.startsWith("@")}function Ge(t,e){return t?.kindRules.get(e)??null}function pe(t,e){const n=o=>o.replace(/[^A-Za-z0-9_-]+/g,"-");return`${n(t)}~${n(e)}`}function de(t){return t?{tablet:lt,phone:ft}:{tablet:ut,phone:ct}}function Be(t,{inBox:e=!1}={}){const{tablet:n,phone:o}=de(e),i=[],r=new Set,l=a=>{const{stamp:c,declarations:h}=a;if(r.has(c))return;r.add(c);const x=Object.entries(h).filter(([,u])=>u!==""),s=u=>u.map(([tt,et])=>`${ge(tt)}: ${et}`).join("; "),f=`[${ht}="${c}"]`,d=x.filter(([u])=>!H.has(u)),p=x.filter(([u])=>H.has(u));d.length&&i.push(`${f}, *:has(> ${f}) { ${s(d)} }`),p.length&&i.push(`${f} { ${s(p)} }`),h[b]&&(i.push(`*:has(> ${f}) { ${b}: ${h[b]} }`),i.push(...xe(f,`*:has(> ${f})`)));const m=Object.entries(a.tablet??{}).filter(([,u])=>u!=="");m.length&&i.push(`@media ${n} { ${f}, *:has(> ${f}) { ${s(m)} } }`);const g=Object.entries(a.phone??{}).filter(([,u])=>u!=="");g.length&&i.push(`@media ${o} { ${f}, *:has(> ${f}) { ${s(g)} } }`)};for(const a of t.rules.values())l(a);for(const a of t.kindRules.values())l(a);return i.join(`
2
- `)}function xe(t,e){const n=`var(${b})`,o=":is([data-sf-bullet], [data-sf-number])";return[`${t} br:not(br + br) { display: block; content: ""; margin-top: ${n} }`,`${t} ${o}:not(:first-child) { margin-top: ${n} }`,`${t} ${o}:not(:last-child) { margin-bottom: ${n} }`,`:is(${e}) + :is(${e}) { margin-top: ${n} }`]}const ge=t=>t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`);function Ke(t,e){if(!t)return null;const n=O(e),o=t.rules.get(n);if(o)return o;if(n.length<he||t.drawn.has(n))return null;let i=null;for(const[r,l]of t.rules)if(r.includes(n)){if(i&&i.stamp!==l.stamp)return null;i=l}return i}const he=8;export{A as PART_ALIGNS,kt as PART_LETTER_EM_MAX,Nt as PART_LETTER_EM_MIN,Et as PART_LETTER_STEP,Ot as PART_LINE_HEIGHT_MAX,wt as PART_LINE_HEIGHT_MIN,zt as PART_LINE_STEP,B as PART_MEASURED_TRACKS,Pt as PART_NUDGE_MAX,Tt as PART_NUDGE_MIN,Rt as PART_PADDING_MAX,At as PART_PADDING_MIN,_t as PART_PADDING_STEP,J as PART_PARAGRAPH_ATTR,yt as PART_PARAGRAPH_MAX,It as PART_PARAGRAPH_MIN,b as PART_PARAGRAPH_VAR,$t as PART_RELATIVE_PROPS,y as PART_SIZE_MAX,I as PART_SIZE_MIN,Ft as PART_SIZE_STEPS,ht as PART_STYLED_ATTR,k as PART_STYLES_PROP,ce as PART_STYLE_PROPERTIES,mt as PART_WEIGHTS,j as SHARED_PART_PROPERTIES,G as STYLE_ID_OF_ROLE,W as TEXT_STYLE_ATTR,He as applyPartStyles,ke as blockDrawsTextStyle,ze as followedStyleOf,ue as isPartKindKey,S as isTextStyleId,xe as paragraphRules,Ie as partAlignFollowed,L as partCanvasDeclarations,Wt as partCaseOfTransform,Gt as partCaseTransform,Le as partFontKeyOf,Ee as partLiftRules,Yt as partPhoneDeclarations,Ge as partRuleForKind,Ke as partRuleForText,Fe as partShownDeclarations,Jt as partSizeBoxOf,ye as partSizeFollowed,Ut as partSpacingOf,Me as partStyleBase,we as partStyleCount,Be as partStyleCss,D as partStyleDeclarations,qt as partStyleForScreen,De as partStyleSource,Y as partStyleWithoutSizeBox,Zt as partTabletDeclarations,Oe as propsWithPartStyleValue,Ne as propsWithoutPartStyle,We as publishedPartStyles,K as readPartStyle,$e as readPartStyles,fe as regionCanvasDeclarations,Ce as regionCanvasRestore,je as regionHasOwnLook,se as regionSheetStyle,ve as regionShownDeclarations,oe as storedPartStyle,de as viewMediaOf};
1
+ import{textStyleCaseCss as ce,textStyleCaseOfCss as le,viewKeyAt as K}from"efficient-easel/draw";import{FONT_OPTIONS as ue,fontOption as pe,fontRoleOf as w,SIZE_STEP_OF_ROLE as k}from"../../../format/lib/fonts.js";import{encodePartKey as B}from"../../../format/lib/document/part-key.js";import{decodePartId as X,normalizePartText as I}from"./text-parts.js";import{partInkCss as de}from"../../../format/lib/document/part-inks.js";import{regionStyle as ge}from"../../../format/lib/sections/text-regions.js";import{EDGE_PHONE_MEDIA as xe,EDGE_TABLET_MEDIA as he,PHONE_MEDIA as be,TABLET_MEDIA as Se,viewOverrides as me}from"../content/view-values.js";import{plainRecord as F,propsWithPartRecord as Te,readPartRecord as Pe,readPartRecords as ze}from"../../../format/lib/document/part-records.js";import{isLengthUnit as M}from"efficient-easel/screen/lib/content/length-units";import{cssLengthOf as _,storedUnit as _e}from"../../../format/lib/content/css-length.js";const y="_partStyles",Ae="data-sf-part-styled",Y="data-sf-text-style",Re=/^(heading|body)-[1-7]$/;function S(e){return typeof e=="string"&&Re.test(e)}const V={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function Ee(e){if(!e)return null;for(const[t,n]of Object.entries(V))if(n===e)return t;return null}function Lt(e){if(S(e.textStyle))return e.textStyle;const t=w(e.role);return t?V[t]:void 0}const we=[400,500,600,700],R=["left","center","right","justify"],L=5,D=1e3,Oe=-5,Ne=10,$e=0,ke=64,Ie=2,Z={size:{min:L,max:D,step:1},sizeTablet:{min:L,max:D,step:1},sizePhone:{min:L,max:D,step:1},padding:{min:$e,max:ke,step:Ie}},Fe=.05,Me=.01,ye=["line","letter"],Le=.5,De=2.5,je=-1,He=1,Ue=0,Ce=400,ve=[...new Set(Object.values(k))];function Dt(e){return[`${e} { transition: translate var(--page-motion-hover-duration) var(--page-ease-media) var(--page-motion-hover-delay) }`,`${e}:hover, ${e}:active { translate: 0 calc(-1 * var(--page-hover-lift)) }`]}function jt(e){return ze(e,y)}function q(e,t){return Pe(e,y,t)}function Ht(e,t){return Object.values(q(e,t)).filter(n=>n!==void 0).length}function J(e,t,n){return Te(e,y,t,We(n).length?n:null)}function We(e){return Object.entries(e).filter(([,t])=>t!==void 0)}function Ge(e){return ye.includes(e)}const E=(e,t,n)=>Math.min(n,Math.max(t,e)),Ke=["sizeUnit","sizeUnitTablet","sizeUnitPhone"];function j(e){const t=K("sizeUnit",e),n=Ke.find(o=>o===t);if(!n)throw new Error(`a part stores no unit key ${t}`);return n}const m={size:j("desktop"),sizeTablet:j("tablet"),sizePhone:j("mobile"),paragraphSpacing:"paragraphSpacingUnit",padding:"paddingUnit"},Q=Object.values(m);function h(e,t){return _e(e[m[t]])}function Be(e,t,n={}){if(Q.includes(e))return M(t)&&t!=="px"?t:null;if(Object.hasOwn(m,e)&&h(n,e)!=="px"){const o=P(Number(t),2);return!Number.isFinite(o)||o<0||o===0&&e!=="padding"?null:o}if(Ge(e)){const o=Math.round(Number(t));return!Number.isFinite(o)||o===0?null:E(o,Oe,Ne)}if(e==="lineHeight"){const o=Number(t);return Number.isFinite(o)?P(E(o,Le,De),3):null}if(e==="letterSpacing"){const o=Number(t);return Number.isFinite(o)?P(E(o,je,He),4):null}if(e==="paragraphSpacing"){const o=Math.round(Number(t));return!Number.isFinite(o)||o<=0?null:E(o,Ue,Ce)}if(Object.hasOwn(Z,e)){const{min:o,max:i}=Z[e],r=Math.round(Number(t));return Number.isFinite(r)?E(r,o,i):null}return e==="italic"?typeof t=="boolean"?t:null:e==="role"||e==="fontRole"?w(t)?t:null:e==="sizeToken"?H(t)?t:null:e==="textStyle"?S(t)?t:null:e==="alignPhone"||e==="alignTablet"?R.includes(t)?t:null:t}const Xe=["weight","size","sizeTablet","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding"];function A(e){let t=null;const n=o=>{t??={...e},delete t[o]};for(const o of Xe){const i=e[o];i!==void 0&&!(typeof i=="number"&&Number.isFinite(i))&&n(o)}e.align!==void 0&&!R.includes(e.align)&&n("align"),e.alignTablet!==void 0&&!R.includes(e.alignTablet)&&n("alignTablet"),e.alignPhone!==void 0&&!R.includes(e.alignPhone)&&n("alignPhone"),e.textStyle!==void 0&&!S(e.textStyle)&&n("textStyle"),e.sizeToken!==void 0&&!H(e.sizeToken)&&n("sizeToken"),e.fontRole!==void 0&&!w(e.fontRole)&&n("fontRole");for(const o of Q)e[o]!==void 0&&!M(e[o])&&n(o);return t??e}function H(e){if(!e||typeof e!="object")return!1;const{step:t,px:n,stepPhone:o,pxPhone:i,fluid:r}=e,c=l=>typeof l=="number"&&Number.isFinite(l)&&l>0,a=l=>typeof l=="string"&&ve.includes(l);return a(t)&&c(n)&&(o===void 0||a(o))&&(i===void 0||c(i))&&(r===void 0||Ye(r,n))}function Ye(e,t){if(!e||typeof e!="object"||Array.isArray(e))return!1;const{minPx:n,vw:o,...i}=e;return Object.keys(i).length===0&&typeof n=="number"&&Number.isFinite(n)&&n>0&&n<t&&typeof o=="number"&&Number.isFinite(o)&&o>0&&o<=100}function U(e){return e?.pxPhone&&H(e)?{step:e.stepPhone??e.step,px:e.pxPhone}:null}function ee({step:e,px:t,fluid:n}){const o=n?`clamp(${n.minPx}px, ${n.vw}vw, ${t}px)`:`${t}px`,i=`var(--size-${e}, ${o})`;return e.startsWith("heading")?`min(${i}, var(--sf-heading-max,9999px))`:i}const Ve=[["font","role"],["font","fontRole"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function Ze(e){const t=[];for(const[n,o]of Ve)n===e?t.push(o):o===e&&t.push(n);return t}function Ut(e,t,n,o){const i={...q(e,t)},r=o==null?null:Be(n,o,i);if(r===null)delete i[n];else{i[n]=r;for(const c of Ze(n))delete i[c]}return J(e,t,i)}function Ct(e,t){return J(e,t,{})}function qe(e){return le(e)??"none"}function Je(e){return ce(e)??""}const te={heading:"--font-role-heading",heading2:"--font-role-heading2",heading3:"--font-role-heading3",body:"--font-role-body",accent:"--font-role-accent",label:"--font-role-label"};function Qe(e,t){const n=w(e.role);return n||(t?.blockDrawsStyle?null:Ee(e.textStyle))}function vt(e,t){return e==="Text"&&t==="text"}const et={headingLarge:"min(clamp(64px,9vw,144px), var(--sf-heading-max,9999px))",headingMedium:"min(32px, var(--sf-heading-max,9999px))",headingSmall:"min(24px, var(--sf-heading-max,9999px))",accent:"32px",body:"14px",label:"12px"};function tt(e){const t=k[e],n=et[t];return n?`var(--size-${t}, ${n})`:`var(--size-${t})`}function nt(e){const t={};return typeof e.lineHeight=="number"?t.lineHeight=e.lineHeight:e.line&&(t.lineHeight=P(ot+e.line*Fe,3)),typeof e.letterSpacing=="number"?t.letterSpacingEm=e.letterSpacing:e.letter&&(t.letterSpacingEm=P(e.letter*Me,4)),t}const ot=1,T="--sf-part-para";function it(e){e=A(e);const t={};if(typeof e.sizePhone=="number"&&e.sizePhone>0)t.fontSize=_(e.sizePhone,h(e,"sizePhone"));else{const o=U(e.sizeToken);if(o)t.fontSize=ee(o);else{const i=N(e);i!==void 0&&(t.fontSize=_(i,h(e,"sizeTablet")))}}const n=e.alignPhone??O(e);return n&&(t.textAlign=n),t}function O(e){return e.alignTablet&&e.alignTablet!==e.align?e.alignTablet:void 0}function N(e){const n=e.sizeTablet!==void 0&&h(e,"sizeTablet")!==h(e,"size")?e.sizeTablet:me("textSize",e.size,e.sizeTablet,void 0).tablet;return n&&n>0?n:void 0}function rt(e){const t=A(e),n={},o=N(t);o!==void 0&&(n.fontSize=_(o,h(t,"sizeTablet")));const i=O(t);return i&&(n.textAlign=i),n}function Wt(e,t){if(t==="desktop")return;const n=A(e);return(t==="mobile"?O(n):void 0)??n.align}function at(e,t){if(t==="desktop")return e;const n=A(e),o=N(n),i=O(n);if(t==="tablet"){let a=e;return o!==void 0&&(a={...a,size:o,sizeUnit:n[m.sizeTablet]}),i&&(a={...a,align:i}),a}let r=e;if(typeof n.sizePhone=="number"&&n.sizePhone>0)r={...r,size:n.sizePhone,sizeUnit:n[m.sizePhone]};else{const a=U(n.sizeToken);a?r={...r,size:void 0,sizeToken:a}:o!==void 0&&(r={...r,size:o,sizeUnit:n[m.sizeTablet]})}const c=n.alignPhone??i;return c&&(r={...r,align:c}),r}function C(e,t,n){return v(at(e,t),$,n)}function st(e){return K("size",e)}function Gt(e,t){if(t==="desktop")return null;const n=A(e);if(t==="mobile"){if(U(n.sizeToken))return null;const o=N(n);if(o!==void 0)return{px:o,view:"tablet"}}return typeof n.size=="number"&&n.size>0?{px:n.size,view:"desktop"}:null}function ne(e,t){const n=st(t);if(!Object.hasOwn(e,n))return e;const o={...e};return delete o[n],o}function Kt(e,t,n){const o=C(ne(e,t),t,n);return{fontFamily:o.fontFamily,fontSize:o.fontSize}}function v(e,t,n){e=A(e);const o=Qe(e,n),i=nt(e),r=e.size?_(e.size,h(e,"size")):e.sizeToken?ee(e.sizeToken):o?tt(o):"";return{fontFamily:e.font?ut(e.font):e.fontRole?`var(${te[e.fontRole]})`:o?`var(${te[o]})`:"",fontWeight:e.weight?String(e.weight):"",fontSize:r,minWidth:r?"0":"",overflowWrap:r?"break-word":"",lineHeight:i.lineHeight!==void 0?String(i.lineHeight):"",letterSpacing:i.letterSpacingEm!==void 0?`${i.letterSpacingEm}em`:"",[T]:e.paragraphSpacing?_(e.paragraphSpacing,h(e,"paragraphSpacing")):"",textTransform:Je(e.case),textAlign:e.align??"",paddingTop:oe(e.padding,h(e,"padding")),paddingBottom:oe(e.padding,h(e,"padding")),color:ft(e.color),fontStyle:e.italic===!0?"italic":e.italic===!1?"normal":""}}const ft=e=>de(e),oe=(e,t)=>e===void 0?"":_(e,t),P=(e,t)=>Number(e.toFixed(t));function Bt(e,t){const n=Number.parseFloat(e.fontSize)||16,o=Number.parseFloat(e.lineHeight),i=Number.parseFloat(e.letterSpacing),r=Number.parseFloat(e.paddingTop);return{fontKey:t,sizePx:n,weight:ct(Number.parseInt(e.fontWeight,10)),lineRatio:Number.isFinite(o)?P(o/n,3):1.2,letterEm:Number.isFinite(i)?P(i/n,4):0,align:lt(e.textAlign),case:qe(e.textTransform),paddingPx:Number.isFinite(r)?Math.round(r):0}}function ct(e){return Number.isFinite(e)?we.reduce((t,n)=>Math.abs(n-e)<Math.abs(t-e)?n:t):400}function lt(e){for(const t of R)if(t===e)return t;return e==="end"?"right":"left"}function Xt(e,t){const n=ie(e);if(!n)return"";for(const o of ue)if(ie(t(o.cssVar))===n)return o.key;return""}const ie=e=>(e.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function ut(e){const t=pe(e);return t?`var(${t.cssVar})`:""}function Yt(e,t,n,o){return!t||X(t)?.nodeId!==e?null:n.find(r=>o(r.getAttribute("class")))??n[0]??null}function pt(e,t){return Object.hasOwn(e,t)?F(e[t])??{}:{}}function Vt(e,t,n=()=>$,o=a=>a,i=xt,r="desktop",c=()=>!1){let a=0;for(const{element:l,partId:b}of e){const g=X(b)?.propKey;if(!g)continue;const s=pt(t,o(g)),f=C(s,r,{blockDrawsStyle:c(g)});S(s.textStyle)?l.setAttribute?.(Y,s.textStyle):l.removeAttribute?.(Y);const d=G.some(x=>l.style[x]);let p=!1;for(const[x,u]of Object.entries(f))St(l,x,u),u&&(p=!0);if(d||G.some(x=>f[x]))for(const x of dt(l,i))for(const u of G)x.style[u]=f[u]??"";p&&(a+=1)}return a}function dt(e,t){const n=I(e.textContent??""),o=[];let i=e;for(let r=0;r<gt&&t(i);r+=1){const c=i.parentElement;if(!c||I(c.textContent??"")!==n)break;o.push(c),i=c}return o}const gt=8;function xt(e){const t=e;return typeof window>"u"||!t?.ownerDocument?!1:window.getComputedStyle(t).display==="inline"}const $={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0};function ht(e){if(!e||typeof e!="object")return null;const t={};S(e.textStyle)&&(t.textStyle=e.textStyle),typeof e.size=="number"&&e.size>0&&(t.size=e.size),typeof e.sizeTablet=="number"&&e.sizeTablet>0&&(t.sizeTablet=e.sizeTablet),typeof e.sizePhone=="number"&&e.sizePhone>0&&(t.sizePhone=e.sizePhone);for(const n of["size","sizeTablet","sizePhone"]){const o=m[n];t[n]!==void 0&&M(e[o])&&(t[o]=e[o])}return Object.keys(t).length?t:null}function bt(e,t){const n=ht(e);if(!n)return{};const o=C(n,t);return{...o.fontFamily?{fontFamily:o.fontFamily}:{},...o.fontSize?{fontSize:o.fontSize}:{}}}function Zt(e){return S(e?.textStyle)||!!e?.role||typeof e?.size=="number"&&e.size>0}function qt(e,t,n){if(!e||typeof e!="object")return{};const o=ge(e.role,t,k)??{},i=t.sized?bt(ne(e,n),n):{};return{...o,...i}}function Jt(e,t,n){n.fontFamily&&e.fontFamily===n.fontFamily&&(e.fontFamily=t.fontFamily),n.fontSize&&e.fontSize===n.fontSize&&(e.fontSize=t.fontSize)}function St(e,t,n){if(!t.startsWith("--")){e.style[t]=n;return}const o=e.style;typeof o.setProperty=="function"?n?o.setProperty(t,n):o.removeProperty?.(t):o[t]=n;const i=e;t===T&&(n?i.setAttribute?.(re,""):i.removeAttribute?.(re))}const re="data-sf-part-para",mt=Object.keys(v({},$)),W=new Set(["color","overflowWrap",T,"fontStyle"]),G=mt.filter(e=>!W.has(e));function Qt(e,t,n,o=a=>a,i=()=>!1,r=()=>null,c=[]){const a=new Map;for(const s of e){const f=B(s.key,s.row);for(const d of s.texts){const p=a.get(d);p?(p.keys.add(s.key),p.partKeys.add(f)):a.set(d,{keys:new Set([s.key]),partKeys:new Set([f])})}}const l=new Map;for(const s of new Set([...Object.keys(t),...c])){if(!Tt(s))continue;const f=ae(n,s,F(t[s])??{},!1,r(s));f&&l.set(s,f)}const b=s=>{const f=o(s),d=r(f);if(!Object.hasOwn(t,f)&&!d)return null;const p=F(t[f])??{};return ae(n,s,p,i(s),d)},g=new Map;for(const[s,{keys:f,partKeys:d}]of a){const p=d.size===1?[...d][0]:f.size===1?[...f][0]:null;if(!p)continue;const z=b(p);z&&g.set(s,z)}for(const s of e){if(!s.keyed)continue;const f=b(B(s.key,s.row));f&&l.set(s.key,f)}return g.size||l.size?{rules:g,kindRules:l,drawn:new Set(a.keys())}:null}function ae(e,t,n,o,i){const r=v(n,$,{blockDrawsStyle:o}),c=rt(n),a=it(n),l=S(n.textStyle)?n.textStyle:void 0;return!Object.values(r).some(Boolean)&&!Object.keys(c).length&&!Object.keys(a).length&&!l&&!i?null:{stamp:Pt(e,t),declarations:r,...Object.keys(c).length?{tablet:c}:{},...Object.keys(a).length?{phone:a}:{},...l?{textStyle:l}:{},...i?{motion:i}:{}}}function Tt(e){return e.startsWith("@")}function en(e,t){return e?.kindRules.get(t)??null}function Pt(e,t){const n=o=>o.replace(/[^A-Za-z0-9_-]+/g,"-");return`${n(e)}~${n(t)}`}function zt(e){return e?{tablet:he,phone:xe}:{tablet:Se,phone:be}}function tn(e,{inBox:t=!1}={}){const{tablet:n,phone:o}=zt(t),i=[],r=new Set,c=a=>{const{stamp:l,declarations:b}=a;if(r.has(l))return;r.add(l);const g=Object.entries(b).filter(([,u])=>u!==""),s=u=>u.map(([se,fe])=>`${At(se)}: ${fe}`).join("; "),f=`[${Ae}="${l}"]`,d=g.filter(([u])=>!W.has(u)),p=g.filter(([u])=>W.has(u));d.length&&i.push(`${f}, *:has(> ${f}) { ${s(d)} }`),p.length&&i.push(`${f} { ${s(p)} }`),b[T]&&(i.push(`*:has(> ${f}) { ${T}: ${b[T]} }`),i.push(..._t(f,`*:has(> ${f})`)));const z=Object.entries(a.tablet??{}).filter(([,u])=>u!=="");z.length&&i.push(`@media ${n} { ${f}, *:has(> ${f}) { ${s(z)} } }`);const x=Object.entries(a.phone??{}).filter(([,u])=>u!=="");x.length&&i.push(`@media ${o} { ${f}, *:has(> ${f}) { ${s(x)} } }`)};for(const a of e.rules.values())c(a);for(const a of e.kindRules.values())c(a);return i.join(`
2
+ `)}function _t(e,t){const n=`var(${T})`,o=":is([data-sf-bullet], [data-sf-number])";return[`${e} br:not(br + br) { display: block; content: ""; margin-top: ${n} }`,`${e} ${o}:not(:first-child) { margin-top: ${n} }`,`${e} ${o}:not(:last-child) { margin-bottom: ${n} }`,`:is(${t}) + :is(${t}) { margin-top: ${n} }`]}const At=e=>e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`);function nn(e,t){if(!e)return null;const n=I(t),o=e.rules.get(n);if(o)return o;if(n.length<Rt||e.drawn.has(n))return null;let i=null;for(const[r,c]of e.rules)if(r.includes(n)){if(i&&i.stamp!==c.stamp)return null;i=c}return i}const Rt=8;export{R as PART_ALIGNS,He as PART_LETTER_EM_MAX,je as PART_LETTER_EM_MIN,Me as PART_LETTER_STEP,De as PART_LINE_HEIGHT_MAX,Le as PART_LINE_HEIGHT_MIN,Fe as PART_LINE_STEP,Z as PART_MEASURED_TRACKS,Ne as PART_NUDGE_MAX,Oe as PART_NUDGE_MIN,ke as PART_PADDING_MAX,$e as PART_PADDING_MIN,Ie as PART_PADDING_STEP,re as PART_PARAGRAPH_ATTR,Ce as PART_PARAGRAPH_MAX,Ue as PART_PARAGRAPH_MIN,T as PART_PARAGRAPH_VAR,ye as PART_RELATIVE_PROPS,D as PART_SIZE_MAX,L as PART_SIZE_MIN,ve as PART_SIZE_STEPS,Ae as PART_STYLED_ATTR,y as PART_STYLES_PROP,mt as PART_STYLE_PROPERTIES,m as PART_UNIT_KEY_OF,we as PART_WEIGHTS,G as SHARED_PART_PROPERTIES,V as STYLE_ID_OF_ROLE,Y as TEXT_STYLE_ATTR,Vt as applyPartStyles,vt as blockDrawsTextStyle,Lt as followedStyleOf,Tt as isPartKindKey,S as isTextStyleId,_t as paragraphRules,Wt as partAlignFollowed,C as partCanvasDeclarations,qe as partCaseOfTransform,Je as partCaseTransform,Xt as partFontKeyOf,Dt as partLiftRules,it as partPhoneDeclarations,en as partRuleForKind,nn as partRuleForText,Kt as partShownDeclarations,st as partSizeBoxOf,Gt as partSizeFollowed,nt as partSpacingOf,Bt as partStyleBase,Ht as partStyleCount,tn as partStyleCss,v as partStyleDeclarations,at as partStyleForScreen,Yt as partStyleSource,ne as partStyleWithoutSizeBox,rt as partTabletDeclarations,Ut as propsWithPartStyleValue,Ct as propsWithoutPartStyle,Qt as publishedPartStyles,q as readPartStyle,jt as readPartStyles,bt as regionCanvasDeclarations,Jt as regionCanvasRestore,Zt as regionHasOwnLook,ht as regionSheetStyle,qt as regionShownDeclarations,pt as storedPartStyle,zt as viewMediaOf};
@@ -1 +1 @@
1
- import{jsx as s}from"react/jsx-runtime";import{HideTaker as d}from"../../../components/ViewHideRoot.js";import{SECTION_BORDER_CLASS as c,sectionBorderStyle as a}from"../../../../format/lib/content/borders.js";import{PAD_ON_ROOT as l}from"./section-padding.js";const O={name:"sectionBorder",applies:(e,o,r)=>o.isSection(e)&&!!r&&typeof r.render=="function",draw(e,o){if(l.has(o))return;const r=e.render;e.render=n=>{const t=a(n.sectionBorder,n.sectionBorderPhone,n.sectionBorderTablet),i=r(n);return t?s(d,{className:c,style:{display:"contents",...t},children:i}):i}}};export{O as sectionBorder};
1
+ import{jsx as s}from"react/jsx-runtime";import{HideTaker as d}from"../../../components/ViewHideRoot.js";import{SECTION_BORDER_CLASS as c,sectionBorderStyle as a,sectionBorderUnitsOf as l}from"../../../../format/lib/content/borders.js";import{PAD_ON_ROOT as B}from"./section-padding.js";const S={name:"sectionBorder",applies:(r,o,n)=>o.isSection(r)&&!!n&&typeof n.render=="function",draw(r,o){if(B.has(o))return;const n=r.render;r.render=e=>{const t=a(e.sectionBorder,e.sectionBorderPhone,e.sectionBorderTablet,l(e)),i=n(e);return t?s(d,{className:c,style:{display:"contents",...t},children:i}):i}}};export{S as sectionBorder};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{HideTaker as d}from"../../../components/ViewHideRoot.js";import{cardCornerStyle as i}from"../../../../format/lib/content/card-corners.js";import{sectionCornerStyle as c}from"../../../../format/lib/content/section-corners.js";const S={name:"sectionCorners",applies:(r,n,e)=>n.isSection(r)&&!!e&&typeof e.render=="function",panel(r,n,e){r.fields={...r.fields,...e.sectionShapeFields()}},draw(r){const n=r.render;r.render=e=>{const s=c(e.sectionCorners,e.sectionCornerSides),o=n(e);return s?t(d,{className:"sf-section-corners",style:{display:"contents",...s},children:o}):o}}},a=["CollectionCard"],m={name:"cardCorners",applies:(r,n,e)=>a.includes(r)&&!!e&&typeof e.render=="function",panel(r,n,e){r.fields={...r.fields,...e.cardShapeFields()}},draw(r){const n=r.render;r.render=e=>{const s=i(e.cardCorners,e.cardCornerSides),o=n(e);return s?t(d,{className:"sf-card-corners",style:{display:"contents",...s},children:o}):o}}};export{a as CARD_BLOCK_KEYS,m as cardCorners,S as sectionCorners};
1
+ import{jsx as o}from"react/jsx-runtime";import{HideTaker as i}from"../../../components/ViewHideRoot.js";import{cardCornerStyle as d}from"../../../../format/lib/content/card-corners.js";import{sectionCornerStyle as c}from"../../../../format/lib/content/section-corners.js";const S={name:"sectionCorners",applies:(r,n,e)=>n.isSection(r)&&!!e&&typeof e.render=="function",panel(r,n,e){r.fields={...r.fields,...e.sectionShapeFields()}},draw(r){const n=r.render;r.render=e=>{const s=c(e.sectionCorners,e.sectionCornerSides,e.sectionCornersUnit),t=n(e);return s?o(i,{className:"sf-section-corners",style:{display:"contents",...s},children:t}):t}}},a=["CollectionCard"],m={name:"cardCorners",applies:(r,n,e)=>a.includes(r)&&!!e&&typeof e.render=="function",panel(r,n,e){r.fields={...r.fields,...e.cardShapeFields()}},draw(r){const n=r.render;r.render=e=>{const s=d(e.cardCorners,e.cardCornerSides,e.cardCornersUnit),t=n(e);return s?o(i,{className:"sf-card-corners",style:{display:"contents",...s},children:t}):t}}};export{a as CARD_BLOCK_KEYS,m as cardCorners,S as sectionCorners};
@@ -1 +1 @@
1
- import{jsx as l}from"react/jsx-runtime";import{HideTaker as u}from"../../../components/ViewHideRoot.js";import{INTRO_EDGE_CLASS as K}from"../../../../format/lib/sections/intro-bleed-layout.js";import{resolveContainerDirection as j}from"../../../../format/lib/content/container-direction.js";import{HERO_BACKGROUND_VAR as X,HERO_CHROME_CAP_VAR as q,HERO_CHROME_INSET_VAR as z,FULL_SECTION_WIDTH as J,SITE_WIDTH_CAP as h,centredCap as g,heroBackgroundTokens as Q}from"../../../../format/lib/content/page-width.js";import{SECTION_WIDTH_FAMILY as G,SECTION_WIDTH_KEYS as v,hasOwnSectionWidth as Z,hasWidthFamily as tt,resolveWidth as D,siteWidthsOf as nt}from"../../../../format/lib/content/section-width.js";import{boxCardProps as et}from"../../../../format/lib/content/box-background.js";import{cardCopyPlace as ot}from"../../../../format/lib/content/card-template.js";import{BOX_GUTTER_KEY as it,boxGutterOf as ct,boxPlaceOf as rt,boxRunsEdgeToEdge as lt,isFrameContainer as C,ownNodeWidth as dt,sectionGroundAnswer as ut,siteDrawsGutter as st}from"../../../../format/lib/content/site-gutter.js";import{getEditorSiteContentWidth as at}from"../../../../format/lib/document/editor-site-widths.js";import{GroundStopsAt as F,NestedBoxChoice as ft,SectionGroupChoice as ht,SectionGroupWidthsProvider as _t,SectionRootChoice as Nt,SplitBandAndColumn as H}from"../../../components/SiteGutterFrame.js";import{FRAME as L}from"../../../components/BlockFrame.js";import{sectionFillPassClass as M}from"../../../../format/lib/content/section-min-height.js";import{parentCapsWidth as wt}from"../../../../format/lib/sections/section-head-placement.js";import{addShowWhenFacts as T,withRowsShownWhen as E}from"../../../../format/lib/document/show-when-attach.js";import{findParentNode as Ct,heldByANode as Tt,isNestedNode as Et,NOT_HELD_BY_A_NODE as P}from"../../../../format/lib/document/passes/document-position.js";const N="--sf-sw-site",Ot="--sf-sw-content",St="--sf-bg-cap",mt="contents [--sf-site-width:var(--sf-sw-content)] max-view-wide:[--sf-site-width:var(--sf-sw-site)]",R=({own:t,content:n,siteContent:e})=>t===!0&&n==="full"&&e!=="full",k="contents view-wide:[--sf-site-width:100vw]",A=({held:t},n,e)=>t?e:l(u,{className:n,children:e}),pt=`contents view-wide:[--sf-site-width:100vw] ${K} view-wide:[--sf-site-gutter:var(--intro-edge)]`,W=(t,n)=>n==="content"?`min(${t}px,var(${N}))`:`${t}px`;function O({content:t,contentMax:n},e){return t==="full"?e!=="content"?J:null:n===null?null:W(n,e)}function S(t,n){return n===null?t:l(u,{className:"contents",style:{[N]:h},children:l(u,{className:mt,style:{[Ot]:n},children:t})})}const xt="--sf-content-cap",Rt="contents max-view-wide:[--sf-content-cap:none]";function At({content:t,contentMax:n},e){return t==="full"?null:n!==null?W(n,e):e==="content"?null:`var(${N})`}function Wt(t,n){return n===null?t:l(u,{className:"contents",style:{[N]:h},children:l(u,{className:Rt,style:{[xt]:n},children:t})})}const y=`var(${N},${h})`,f=(t,n,e="")=>t==="content"?l(u,{className:e||void 0,style:g(h),children:l(F,{ground:y,children:n})}):n;function U(t,n,e,o,i){if(R(e))return f(o,A(e,k,l(H,{children:t({...n,contained:!0})})),i);if(e.content==="full")return f(o,t({...n,contained:!1}),i);const c=O(e,o);return o==="content"&&c===null&&!e.own?t({...n,contained:!0}):f(o,S(l(H,{children:t({...n,contained:!0})}),c),i)}function V(t,n,e,o){if(e==="hero"){const r=S(t(n),O(o,o.band));return o.band==="full"?l(u,{style:{[X]:"none",[z]:"initial",[q]:"initial"},children:r}):o.band==="content"?l(u,{style:Q(!0),children:r}):r}const i=o.band??"full",c=M(n);if(e==="rawMarkup"){if(o.content==="full")return f(i,t(n),c);const r=o.contentMax===null?h:W(o.contentMax,i);return l(u,{className:"contents",style:{[N]:h},children:f(i,l(u,{className:c||void 0,style:g(r),children:t(n)}),c)})}if(e==="scrollOver"){const r=o.content==="full",d=R(o)?A(o,pt,t({...n,fullWidth:!1})):S(t({...n,fullWidth:r}),r?null:O(o,i));return i==="content"?l(u,{className:"contents",style:{[St]:h},children:d}):d}switch(e){case"both":return f(i,Wt(t(n),At(o,i)),c);case"contained":return U(t,n,o,i,c);case"contentColumn":case"contentFull":case"productGrid":{const r=R(o),d=o.content==="full"&&!r?"full":"page",s=r?A(o,k,t({...n,widthMode:d})):S(t({...n,widthMode:d}),o.content==="full"?null:O(o,i));return e==="productGrid"&&!o.own?i==="content"?l(u,{className:c?`${L} ${c}`:L,children:s}):s:f(i,s,c)}default:return f(i,S(t(n),O(o,i)),c)}}function It(t,n){const e=G[n],o=t.render;t.render=i=>{const c=nt(i),r={band:c.background,content:c.content??"content",contentMax:null},d=()=>e==="rawMarkup"?o(i):l(ht,{draw:a=>a?.background==="content"?l(F,{ground:y,children:s(a)}):s(a)}),s=a=>{const w=a?{...r,band:a.background==="content"?r.band:a.background??r.band,content:a.content??r.content,own:a.background==="full"||a.content!==null,held:!0,siteContent:r.content}:r,x=V(o,i,e,w);if(!C(n))return x;const b=ct(i),B=b===void 0?w.content:b?"content":"full";return B===w.content?x:l(ft,{atTop:x,nested:U(o,i,{...w,content:B,own:!1},w.band??"full",M(i))})},_=dt(n,i);if(!Z(_))return d();const m=e==="rawMarkup",I=ut(n,i),Y=_.content??(m?"full":r.content),p={band:I,content:I==="content"?"content":Y,contentMax:_.contentMax,own:!m,siteContent:r.content};return l(Nt,{own:()=>l(_t,{value:{background:p.band,content:p.content},children:V(o,i,e,p)}),followed:d})}}const bt={all:[P,{not:{context:"runsEdgeToEdge",is:!0}}]},Zt={name:"sectionWidth",applies:(t,n,e)=>tt(t)&&!!e&&typeof e.render=="function",panel(t,n,e){const o=e.sectionOwnWidthFields({drawsFullOnItsOwn:G[n]==="rawMarkup"}),i=C(n)?e.boxGutterFields():{},c={...t.fields,...i,...o},r=C(n)?$(n,t,c,[it]):c;T(t,{heldByANode:Tt}),C(n)&&T(t,{runsEdgeToEdge:(d,s)=>lt(et(d.props??{},ot(s.appState,d.props?.id)?.inCopy!==!1))}),t.fields=E(r,[v.background,v.content],C(n)?bt:P)},draw(t,n){It(t,n)}};function Bt(t,n){if(!t||!("widthMode"in t))return t;const e={...t},o=e.widthMode;return o&&(e.widthMode={...o,currentValue:n.mode,inherited:n.inherited}),e}const gt=new Set(["Heading","Text","ImageBlock","ButtonBlock"]),tn={name:"containedWidth",applies:(t,n,e)=>gt.has(t)&&!!e&&typeof e.render=="function",panel(t,n,e){const o=e.widthField;t.fields=$(n,t,{...t.fields,...o("page")});const i=t.resolveFields;t.resolveFields=(c,r)=>{const d=i?i(c,r):r.fields,s=D(c?.props??{},"page"),_=m=>Bt(m,s);return d&&typeof d.then=="function"?d.then(_):_(d)}},draw(t){const n=t.render;t.render=e=>{const{mode:o}=D(e,"page");return n({...e,contained:o!=="full"})}}},Gt={not:{context:"inHeroGroupRow",is:!0}},nn={name:"buttonAlignInRow",applies:t=>t==="ButtonBlock",panel(t){const n=t;n.fields=E(n.fields??{},["align"],Gt),T(n,{inHeroGroupRow:(e,o)=>{const i=Ct(o.appState,e.props?.id);return!!i&&i.type==="HeroGroup"&&j("HeroGroup",i.props?.direction)==="row"}})}};function vt(t){return Object.values(t).some(n=>!!n&&typeof n=="object"&&n.type==="slot")}const Dt={any:[]},Ft={all:[{not:{context:"outsideBox",is:!0}},{not:{context:"insideSiteGutter",is:!0}}]},Ht={not:{context:"widthCappedByParent",is:!0}};function $(t,n,e,o=["widthMode"]){if(t==="ButtonBlock")return E(e,["_gWidth",...o],Dt);if(vt(e)){const i=(c,r)=>rt(r.appState?.data?.content,c.props?.id,st(at()));return T(n,{outsideBox:(c,r)=>i(c,r)?.inBox!==!0,insideSiteGutter:(c,r)=>i(c,r)?.insideGutter}),E(e,o,Ft)}return T(n,{widthCappedByParent:(i,c)=>"parent"in c?wt(c.parent):Et({props:i.props??{}},c)}),E(e,o,Ht)}export{St as SECTION_BACKGROUND_VAR,Rt as SECTION_CONTENT_CAP_CLASS,xt as SECTION_CONTENT_CAP_VAR,mt as SECTION_CONTENT_CLASS,Ot as SECTION_CONTENT_VAR,N as SITE_CONTENT_VAR,nn as buttonAlignInRow,tn as containedWidth,Zt as sectionWidth,Bt as widthModeFields};
1
+ import{jsx as l}from"react/jsx-runtime";import{HideTaker as u}from"../../../components/ViewHideRoot.js";import{INTRO_EDGE_CLASS as j}from"../../../../format/lib/sections/intro-bleed-layout.js";import{cssLengthOf as B}from"../../../../format/lib/content/css-length.js";import{resolveContainerDirection as X}from"../../../../format/lib/content/container-direction.js";import{HERO_BACKGROUND_VAR as q,HERO_CHROME_CAP_VAR as z,HERO_CHROME_INSET_VAR as J,FULL_SECTION_WIDTH as Q,SITE_WIDTH_CAP as _,centredCap as G,heroBackgroundTokens as Z}from"../../../../format/lib/content/page-width.js";import{SECTION_WIDTH_FAMILY as v,SECTION_WIDTH_KEYS as D,hasOwnSectionWidth as tt,hasWidthFamily as nt,resolveWidth as F,siteWidthsOf as et}from"../../../../format/lib/content/section-width.js";import{boxCardProps as ot}from"../../../../format/lib/content/box-background.js";import{cardCopyPlace as it}from"../../../../format/lib/content/card-template.js";import{BOX_GUTTER_KEY as ct,boxGutterOf as rt,boxPlaceOf as lt,boxRunsEdgeToEdge as dt,isFrameContainer as C,ownNodeWidth as ut,sectionGroundAnswer as st,siteDrawsGutter as at}from"../../../../format/lib/content/site-gutter.js";import{getEditorSiteContentWidth as ft}from"../../../../format/lib/document/editor-site-widths.js";import{GroundStopsAt as H,NestedBoxChoice as ht,SectionGroupChoice as _t,SectionGroupWidthsProvider as Nt,SectionRootChoice as wt,SplitBandAndColumn as M}from"../../../components/SiteGutterFrame.js";import{FRAME as L}from"../../../components/BlockFrame.js";import{sectionFillPassClass as P}from"../../../../format/lib/content/section-min-height.js";import{parentCapsWidth as Ct}from"../../../../format/lib/sections/section-head-placement.js";import{addShowWhenFacts as O,withRowsShownWhen as T}from"../../../../format/lib/document/show-when-attach.js";import{findParentNode as Ot,heldByANode as Tt,isNestedNode as Et,NOT_HELD_BY_A_NODE as k}from"../../../../format/lib/document/passes/document-position.js";const N="--sf-sw-site",St="--sf-sw-content",mt="--sf-bg-cap",pt="contents [--sf-site-width:var(--sf-sw-content)] max-view-wide:[--sf-site-width:var(--sf-sw-site)]",R=({own:t,content:n,siteContent:e})=>t===!0&&n==="full"&&e!=="full",y="contents view-wide:[--sf-site-width:100vw]",A=({held:t},n,e)=>t?e:l(u,{className:n,children:e}),xt=`contents view-wide:[--sf-site-width:100vw] ${j} view-wide:[--sf-site-gutter:var(--intro-edge)]`,W=(t,n,e)=>n==="content"?`min(${B(t,e)},var(${N}))`:B(t,e);function E({content:t,contentMax:n,contentMaxUnit:e},o){return t==="full"?o!=="content"?Q:null:n===null?null:W(n,o,e)}function S(t,n){return n===null?t:l(u,{className:"contents",style:{[N]:_},children:l(u,{className:pt,style:{[St]:n},children:t})})}const Rt="--sf-content-cap",At="contents max-view-wide:[--sf-content-cap:none]";function Wt({content:t,contentMax:n,contentMaxUnit:e},o){return t==="full"?null:n!==null?W(n,o,e):o==="content"?null:`var(${N})`}function It(t,n){return n===null?t:l(u,{className:"contents",style:{[N]:_},children:l(u,{className:At,style:{[Rt]:n},children:t})})}const U=`var(${N},${_})`,f=(t,n,e="")=>t==="content"?l(u,{className:e||void 0,style:G(_),children:l(H,{ground:U,children:n})}):n;function V(t,n,e,o,i){if(R(e))return f(o,A(e,y,l(M,{children:t({...n,contained:!0})})),i);if(e.content==="full")return f(o,t({...n,contained:!1}),i);const c=E(e,o);return o==="content"&&c===null&&!e.own?t({...n,contained:!0}):f(o,S(l(M,{children:t({...n,contained:!0})}),c),i)}function $(t,n,e,o){if(e==="hero"){const r=S(t(n),E(o,o.band));return o.band==="full"?l(u,{style:{[q]:"none",[J]:"initial",[z]:"initial"},children:r}):o.band==="content"?l(u,{style:Z(!0),children:r}):r}const i=o.band??"full",c=P(n);if(e==="rawMarkup"){if(o.content==="full")return f(i,t(n),c);const r=o.contentMax===null?_:W(o.contentMax,i,o.contentMaxUnit);return l(u,{className:"contents",style:{[N]:_},children:f(i,l(u,{className:c||void 0,style:G(r),children:t(n)}),c)})}if(e==="scrollOver"){const r=o.content==="full",d=R(o)?A(o,xt,t({...n,fullWidth:!1})):S(t({...n,fullWidth:r}),r?null:E(o,i));return i==="content"?l(u,{className:"contents",style:{[mt]:_},children:d}):d}switch(e){case"both":return f(i,It(t(n),Wt(o,i)),c);case"contained":return V(t,n,o,i,c);case"contentColumn":case"contentFull":case"productGrid":{const r=R(o),d=o.content==="full"&&!r?"full":"page",s=r?A(o,y,t({...n,widthMode:d})):S(t({...n,widthMode:d}),o.content==="full"?null:E(o,i));return e==="productGrid"&&!o.own?i==="content"?l(u,{className:c?`${L} ${c}`:L,children:s}):s:f(i,s,c)}default:return f(i,S(t(n),E(o,i)),c)}}function bt(t,n){const e=v[n],o=t.render;t.render=i=>{const c=et(i),r={band:c.background,content:c.content??"content",contentMax:null},d=()=>e==="rawMarkup"?o(i):l(_t,{draw:a=>a?.background==="content"?l(H,{ground:U,children:s(a)}):s(a)}),s=a=>{const w=a?{...r,band:a.background==="content"?r.band:a.background??r.band,content:a.content??r.content,own:a.background==="full"||a.content!==null,held:!0,siteContent:r.content}:r,x=$(o,i,e,w);if(!C(n))return x;const b=rt(i),g=b===void 0?w.content:b?"content":"full";return g===w.content?x:l(ht,{atTop:x,nested:V(o,i,{...w,content:g,own:!1},w.band??"full",P(i))})},h=ut(n,i);if(!tt(h))return d();const m=e==="rawMarkup",I=st(n,i),K=h.content??(m?"full":r.content),p={band:I,content:I==="content"?"content":K,contentMax:h.contentMax,contentMaxUnit:h.contentMaxUnit,own:!m,siteContent:r.content};return l(wt,{own:()=>l(Nt,{value:{background:p.band,content:p.content},children:$(o,i,e,p)}),followed:d})}}const gt={all:[k,{not:{context:"runsEdgeToEdge",is:!0}}]},nn={name:"sectionWidth",applies:(t,n,e)=>nt(t)&&!!e&&typeof e.render=="function",panel(t,n,e){const o=e.sectionOwnWidthFields({drawsFullOnItsOwn:v[n]==="rawMarkup"}),i=C(n)?e.boxGutterFields():{},c={...t.fields,...i,...o},r=C(n)?Y(n,t,c,[ct]):c;O(t,{heldByANode:Tt}),C(n)&&O(t,{runsEdgeToEdge:(d,s)=>dt(ot(d.props??{},it(s.appState,d.props?.id)?.inCopy!==!1))}),t.fields=T(r,[D.background,D.content],C(n)?gt:k)},draw(t,n){bt(t,n)}};function Bt(t,n){if(!t||!("widthMode"in t))return t;const e={...t},o=e.widthMode;return o&&(e.widthMode={...o,currentValue:n.mode,inherited:n.inherited}),e}const Gt=new Set(["Heading","Text","ImageBlock","ButtonBlock"]),en={name:"containedWidth",applies:(t,n,e)=>Gt.has(t)&&!!e&&typeof e.render=="function",panel(t,n,e){const o=e.widthField;t.fields=Y(n,t,{...t.fields,...o("page")});const i=t.resolveFields;t.resolveFields=(c,r)=>{const d=i?i(c,r):r.fields,s=F(c?.props??{},"page"),h=m=>Bt(m,s);return d&&typeof d.then=="function"?d.then(h):h(d)}},draw(t){const n=t.render;t.render=e=>{const{mode:o}=F(e,"page");return n({...e,contained:o!=="full"})}}},vt={not:{context:"inHeroGroupRow",is:!0}},on={name:"buttonAlignInRow",applies:t=>t==="ButtonBlock",panel(t){const n=t;n.fields=T(n.fields??{},["align"],vt),O(n,{inHeroGroupRow:(e,o)=>{const i=Ot(o.appState,e.props?.id);return!!i&&i.type==="HeroGroup"&&X("HeroGroup",i.props?.direction)==="row"}})}};function Dt(t){return Object.values(t).some(n=>!!n&&typeof n=="object"&&n.type==="slot")}const Ft={any:[]},Ht={all:[{not:{context:"outsideBox",is:!0}},{not:{context:"insideSiteGutter",is:!0}}]},Mt={not:{context:"widthCappedByParent",is:!0}};function Y(t,n,e,o=["widthMode"]){if(t==="ButtonBlock")return T(e,["_gWidth",...o],Ft);if(Dt(e)){const i=(c,r)=>lt(r.appState?.data?.content,c.props?.id,at(ft()));return O(n,{outsideBox:(c,r)=>i(c,r)?.inBox!==!0,insideSiteGutter:(c,r)=>i(c,r)?.insideGutter}),T(e,o,Ht)}return O(n,{widthCappedByParent:(i,c)=>"parent"in c?Ct(c.parent):Et({props:i.props??{}},c)}),T(e,o,Mt)}export{mt as SECTION_BACKGROUND_VAR,At as SECTION_CONTENT_CAP_CLASS,Rt as SECTION_CONTENT_CAP_VAR,pt as SECTION_CONTENT_CLASS,St as SECTION_CONTENT_VAR,N as SITE_CONTENT_VAR,on as buttonAlignInRow,en as containedWidth,nn as sectionWidth,Bt as widthModeFields};