efficient-web-builder 67.4.0 → 67.6.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 (79) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/editor/components/storefront-editor.css +3 -1
  3. package/dist/editor/lib/document/ColourControl.d.ts +2 -1
  4. package/dist/editor/lib/document/ColourControl.js +1 -1
  5. package/dist/editor/lib/document/block-offer.d.ts +6 -0
  6. package/dist/editor/lib/document/block-offer.js +1 -1
  7. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  8. package/dist/editor/lib/document/blocks/general/Footprint/fields.js +1 -1
  9. package/dist/editor/lib/document/blocks/general/HeroSlide/fields.js +1 -1
  10. package/dist/editor/lib/document/blocks/general/ParagraphsA/fields.js +1 -1
  11. package/dist/editor/lib/document/blocks/general/ProcessSteps/fields.js +1 -1
  12. package/dist/editor/lib/document/blocks/general/StatsParagraph/fields.js +1 -1
  13. package/dist/editor/lib/document/blocks/general/Timeline/fields.js +1 -1
  14. package/dist/editor/lib/document/blocks/general/TimelineTrack/fields.js +1 -1
  15. package/dist/editor/lib/document/blocks/general/TitleWithButtons/fields.js +1 -1
  16. package/dist/editor/lib/document/controls.js +1 -1
  17. package/dist/editor/lib/document/field-groups.js +1 -1
  18. package/dist/format/lib/content/accordion-row-style.d.ts +4 -1
  19. package/dist/format/lib/content/accordion-row-style.js +1 -1
  20. package/dist/format/lib/content/box-background.d.ts +12 -0
  21. package/dist/format/lib/content/box-background.js +1 -1
  22. package/dist/format/lib/content/image-treatment.js +1 -1
  23. package/dist/format/lib/content/view-lines.d.ts +1 -0
  24. package/dist/format/lib/content/view-lines.js +1 -1
  25. package/dist/format/lib/document/passes/types.d.ts +2 -0
  26. package/dist/format/lib/document/seed-parts.d.ts +1 -1
  27. package/dist/format/lib/document/seed-parts.js +1 -1
  28. package/dist/format/lib/editor-words-catalogue.d.ts +4 -0
  29. package/dist/format/lib/editor-words-catalogue.js +3 -3
  30. package/dist/format/lib/hero-video.d.ts +1 -1
  31. package/dist/format/lib/hero-video.js +1 -1
  32. package/dist/render/components/BoxAccordionRow.d.ts +2 -1
  33. package/dist/render/components/BoxAccordionRow.js +1 -1
  34. package/dist/render/components/Flex.d.ts +2 -1
  35. package/dist/render/components/Flex.js +1 -1
  36. package/dist/render/components/Footprint.d.ts +3 -1
  37. package/dist/render/components/Footprint.js +1 -1
  38. package/dist/render/components/HeroPoster.d.ts +5 -1
  39. package/dist/render/components/HeroPoster.js +1 -1
  40. package/dist/render/components/HeroSlide.d.ts +5 -1
  41. package/dist/render/components/HeroSlide.js +1 -1
  42. package/dist/render/components/HeroVideoPlay.d.ts +4 -1
  43. package/dist/render/components/HeroVideoPlay.js +1 -1
  44. package/dist/render/components/ParagraphsA.d.ts +3 -1
  45. package/dist/render/components/ParagraphsA.js +1 -1
  46. package/dist/render/components/ProcessSteps.d.ts +3 -1
  47. package/dist/render/components/ProcessSteps.js +1 -1
  48. package/dist/render/components/SectionAnimation.d.ts +3 -0
  49. package/dist/render/components/SectionAnimation.js +1 -1
  50. package/dist/render/components/StatsParagraph.d.ts +3 -1
  51. package/dist/render/components/StatsParagraph.js +1 -1
  52. package/dist/render/components/Timeline.d.ts +3 -1
  53. package/dist/render/components/Timeline.js +1 -1
  54. package/dist/render/components/TimelineTrack.d.ts +3 -1
  55. package/dist/render/components/TimelineTrack.js +1 -1
  56. package/dist/render/components/TitleWithButtons.d.ts +3 -1
  57. package/dist/render/components/TitleWithButtons.js +1 -1
  58. package/dist/render/lib/content/section-padding.d.ts +20 -0
  59. package/dist/render/lib/content/section-padding.js +1 -1
  60. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  61. package/dist/render/lib/document/blocks/general/Footprint/render.js +1 -1
  62. package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
  63. package/dist/render/lib/document/blocks/general/ParagraphsA/render.js +1 -1
  64. package/dist/render/lib/document/blocks/general/ProcessSteps/render.js +1 -1
  65. package/dist/render/lib/document/blocks/general/StatsParagraph/render.js +1 -1
  66. package/dist/render/lib/document/blocks/general/Timeline/render.js +1 -1
  67. package/dist/render/lib/document/blocks/general/TimelineTrack/render.js +1 -1
  68. package/dist/render/lib/document/blocks/general/TitleWithButtons/render.js +1 -1
  69. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  70. package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
  71. package/dist/render/lib/document/hero-media-parts.d.ts +2 -0
  72. package/dist/render/lib/document/hero-media-parts.js +1 -1
  73. package/dist/render/lib/document/passes/section-padding.d.ts +4 -0
  74. package/dist/render/lib/document/passes/section-padding.js +1 -1
  75. package/dist/render/lib/media.d.ts +15 -0
  76. package/dist/render/lib/media.js +1 -1
  77. package/dist/render/lib/sections/section-to-box.d.ts +1 -0
  78. package/dist/render/lib/sections/section-to-box.js +1 -1
  79. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
+ import { type BandPad } from "../lib/content/section-padding.js";
1
2
  export interface TitleButton {
2
3
  label?: string;
3
4
  href?: string;
@@ -8,9 +9,10 @@ export interface TitleWithButtonsProps {
8
9
  buttons?: TitleButton[];
9
10
  padTop?: number;
10
11
  padBottom?: number;
12
+ bandPad?: BandPad;
11
13
  buttonsAlign?: "left" | "center" | "right";
12
14
  buttonsAlignTablet?: unknown;
13
15
  buttonsAlignPhone?: unknown;
14
16
  editing?: boolean;
15
17
  }
16
- export default function TitleWithButtons({ title, buttons, padTop, padBottom, buttonsAlign, buttonsAlignTablet, buttonsAlignPhone, editing, }?: TitleWithButtonsProps): import("react").JSX.Element | null;
18
+ export default function TitleWithButtons({ title, buttons, padTop, padBottom, bandPad, buttonsAlign, buttonsAlignTablet, buttonsAlignPhone, editing, }?: TitleWithButtonsProps): import("react").JSX.Element | null;
@@ -1 +1 @@
1
- import{jsx as r,jsxs as m}from"react/jsx-runtime";import{HideTaker as k}from"./ViewHideRoot.js";import{alignViewClasses as y}from"../../format/lib/content/block-align.js";import{SiteLink as j}from"../lib/site-runtime.js";import{renderHeadline as N}from"./goldPhrases.js";import{say as L}from"../../format/lib/editor-words.js";function T({title:n,buttons:x,padTop:o,padBottom:l,buttonsAlign:s,buttonsAlignTablet:d,buttonsAlignPhone:f,editing:p=!1}={}){const c=typeof o=="number"?o:140,g=typeof l=="number"?l:140,i=(x??[]).filter(t=>p||(t.label??"").trim()),e=!!(n??"").trim(),a=!e&&(s==="center"||s==="left")?s:null,h=e?"":y("items",a??"right",d,f,{atSectionLine:!0});return!p&&!e&&i.length===0?null:r(k,{as:"section",className:"relative z-[2] bg-bg",children:m("div",{className:[a==="center"?"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-1 items-center justify-items-center gap-[60px] border-b border-line px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]":a==="left"?"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-1 items-center justify-items-start gap-[60px] border-b border-line px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]":"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-[1fr_auto] items-center gap-[60px] border-b border-line px-[var(--sf-site-gutter,40px)] max-view-desktop:grid-cols-1 max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]",h].filter(Boolean).join(" "),style:{paddingTop:c,paddingBottom:g},children:[a===null&&!e&&i.length>0&&r("div",{"aria-hidden":!0,className:"max-view-desktop:hidden"}),e&&r("h2",{className:"max-w-[1000px] font-display text-[length:min(var(--size-headingLarge,clamp(48px,7vw,108px)),var(--sf-heading-max,9999px))] [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-[0.94] tracking-[-0.035em] text-fg",children:N(n??"")}),i.length>0&&r("div",{className:"flex min-w-[280px] flex-col gap-3.5 max-view-desktop:min-w-0",children:i.map((t,v)=>{const u=(t.label??"").trim()||L("Button label"),b=t.href||"#",w=t.variant==="primary";return m(j,{newTab:"auto",href:b,className:["flex items-center justify-between gap-6 px-7 py-5","font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.3em] transition-colors",w?"border border-btn bg-btn text-btn-ink hover:border-fg hover:bg-fg":"border border-line text-fg hover:border-accent hover:text-accent"].join(" "),children:[u," ",r("span",{"aria-hidden":!0,children:"→"})]},v)})})]})})}export{T as default};
1
+ import{jsx as r,jsxs as m}from"react/jsx-runtime";import{HideTaker as k}from"./ViewHideRoot.js";import{bandPadAttrs as y}from"../lib/content/section-padding.js";import{innerPaddingFallback as j}from"../lib/document/passes/section-padding.js";import{alignViewClasses as N}from"../../format/lib/content/block-align.js";import{SiteLink as T}from"../lib/site-runtime.js";import{renderHeadline as B}from"./goldPhrases.js";import{say as L}from"../../format/lib/editor-words.js";function _({title:n,buttons:p,padTop:d,padBottom:x,bandPad:c,buttonsAlign:s,buttonsAlignTablet:f,buttonsAlignPhone:g,editing:o=!1}={}){const l=c??y({padTop:d,padBottom:x},j("TitleWithButtons")),i=(p??[]).filter(t=>o||(t.label??"").trim()),e=!!(n??"").trim(),a=!e&&(s==="center"||s==="left")?s:null,h=e?"":N("items",a??"right",f,g,{atSectionLine:!0});return!o&&!e&&i.length===0?null:r(k,{as:"section",className:"relative z-[2] bg-bg",children:m("div",{className:[a==="center"?"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-1 items-center justify-items-center gap-[60px] border-b border-line px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]":a==="left"?"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-1 items-center justify-items-start gap-[60px] border-b border-line px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]":"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-[1fr_auto] items-center gap-[60px] border-b border-line px-[var(--sf-site-gutter,40px)] max-view-desktop:grid-cols-1 max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]",h,l.className].filter(Boolean).join(" "),style:l.style,children:[a===null&&!e&&i.length>0&&r("div",{"aria-hidden":!0,className:"max-view-desktop:hidden"}),e&&r("h2",{className:"max-w-[1000px] font-display text-[length:min(var(--size-headingLarge,clamp(48px,7vw,108px)),var(--sf-heading-max,9999px))] [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-[0.94] tracking-[-0.035em] text-fg",children:B(n??"")}),i.length>0&&r("div",{className:"flex min-w-[280px] flex-col gap-3.5 max-view-desktop:min-w-0",children:i.map((t,v)=>{const u=(t.label??"").trim()||L("Button label"),b=t.href||"#",w=t.variant==="primary";return m(T,{newTab:"auto",href:b,className:["flex items-center justify-between gap-6 px-7 py-5","font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.3em] transition-colors",w?"border border-btn bg-btn text-btn-ink hover:border-fg hover:bg-fg":"border border-line text-fg hover:border-accent hover:text-accent"].join(" "),children:[u," ",r("span",{"aria-hidden":!0,children:"→"})]},v)})})]})})}export{_ as default};
@@ -22,6 +22,7 @@ export declare const PAD_TOP_TABLET_VAR = "--sf-pad-t-tablet";
22
22
  export declare const PAD_BOTTOM_TABLET_VAR = "--sf-pad-b-tablet";
23
23
  export declare const PAD_LEFT_TABLET_VAR = "--sf-pad-l-tablet";
24
24
  export declare const PAD_RIGHT_TABLET_VAR = "--sf-pad-r-tablet";
25
+ export declare const SECTION_PAD_CLASS = "sf-section-pad";
25
26
  export declare function sectionPadAttrs(v: PadValues): {
26
27
  className: string;
27
28
  style: CSSProperties;
@@ -61,6 +62,24 @@ export declare function resolveSectionPadding(props: SectionPaddingProps, fallba
61
62
  top?: number;
62
63
  bottom?: number;
63
64
  };
65
+ export declare const BAND_PAD_KEYS: {
66
+ readonly top: "padTop";
67
+ readonly bottom: "padBottom";
68
+ readonly left: "padLeft";
69
+ readonly right: "padRight";
70
+ };
71
+ export declare const BAND_PAD_UNIT_KEY = "padUnit";
72
+ export type BandPad = {
73
+ className?: string;
74
+ style: CSSProperties;
75
+ };
76
+ export declare function bandTopBottom(props: Record<string, unknown>, fallback: SectionPaddingDefault): {
77
+ top?: number;
78
+ bottom?: number;
79
+ };
80
+ export declare function bandPadAttrs(props: Record<string, unknown>, fallback: SectionPaddingDefault, opts?: {
81
+ noTop?: boolean;
82
+ }): BandPad;
64
83
  export type PadValues = {
65
84
  top?: unknown;
66
85
  bottom?: unknown;
@@ -86,6 +105,7 @@ export declare const SECTION_PAD_KEYS: {
86
105
  readonly left: "sectionPaddingLeft";
87
106
  readonly right: "sectionPaddingRight";
88
107
  };
108
+ export declare const BAND_TO_SECTION_PAD: ReadonlyArray<readonly [string, string]>;
89
109
  export declare function padValuesOf(props: Record<string, unknown>, keys?: Record<"top" | "bottom" | "left" | "right", string>, sides?: boolean, unitKey?: string | undefined): PadValues;
90
110
  export declare function wrapperPadAttrs(v: PadValues): {
91
111
  className: string;
@@ -1 +1 @@
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
+ import{storedUnit as M}from"../../../format/lib/content/css-length.js";import{phoneKey as O,resolveViewValue as U,tabletKey as L,viewKeyAt as _}from"efficient-easel/draw";import{SECTION_PAD_UNIT_KEY as N,SITE_SIDE as j,convertLength as Y,isLengthUnit as k,isSiteSide as B,sideLengthAt as K,sideValueAt as $,withLength as g}from"efficient-easel/screen/lib/content/length-units";import{siteSideRoom as R}from"../../../format/lib/content/page-width.js";import{viewRules as q}from"../../../format/lib/content/view-overrides.js";import{finiteNumber as f}from"../../../format/lib/finite-number.js";const z={min:10,max:200,step:10};function J(t,o,e,n=0){const s=f(t),i=f(o);if(s===void 0&&i===void 0)return;const d=h(e),r=p=>p===void 0?void 0:d==="px"?p:g(p,d,n);return{paddingTop:r(s),paddingBottom:r(i)}}const h=t=>M(t),Q="sf-pad-top-phone",W="sf-pad-bottom-phone",X="--sf-pad-t-phone",Z="--sf-pad-b-phone",v="sf-pad-left-phone",tt="sf-pad-right-phone",ot="--sf-pad-l-phone",et="--sf-pad-r-phone",nt="sf-pad-top-tablet",st="sf-pad-bottom-tablet",it="sf-pad-left-tablet",dt="sf-pad-right-tablet",rt="--sf-pad-t-tablet",pt="--sf-pad-b-tablet",at="--sf-pad-l-tablet",ft="--sf-pad-r-tablet",C="sf-section-pad";function S(t){const o={desktop:t.unit,tablet:t.unitTablet,phone:t.unitPhone},e=J(t.top,t.bottom,t.unit,t.frame),n=mt({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 e===void 0&&!n.classes.length&&!Object.keys(n.style).length?null:{className:[C,...n.classes].join(" "),style:{...e,...n.style}}}const ct=t=>B(t)?t:f(t),ut=[["top","paddingTop",[nt,rt],[Q,X]],["bottom","paddingBottom",[st,pt],[W,Z]],["left","paddingLeft",[it,at],[v,ot]],["right","paddingRight",[dt,ft],[tt,et]]];function I(t,o,e){return!k(o)||o==="px"?t:Y(t,"px",o,e,{min:0,max:z.max,step:1})}function lt(t,o,e,n={},s=0){const i=(m,u)=>{if(u==="px")return`${m}px`;const c=g(m,u,s);return typeof c=="number"?`${c}px`:c},d={n:t,[L("n")]:o,[O("n")]:e,u:n.desktop,[L("u")]:n.tablet,[O("u")]:n.phone},r=U("spacing",f(t),f(o),f(e),q()),p=(m,u,c)=>{if($(d,{side:"n"},m,"side",["side"])?.value===j)return R().value;const l=K(d,{side:"n"},"u",m,"side");if(!l)return;const A=u!==null&&!c&&l.unit==="px"&&typeof r[u]=="number";return i(A?r[u]:l.value,l.unit)},P=p("desktop",null,!0),b={},T=p("tablet","tablet",o!==void 0);T!==void 0&&(o!==void 0||T!==P)&&(b.tablet=T);const a=p("mobile","phone",e!==void 0);return a!==void 0&&(e!==void 0||a!==P)&&(b.phone=a),b}function mt(t,o,e={},n=t,s={},i=0,d="box"){const r={},p={},P=[],b=R(d);let T=!1;for(const[a,m,...u]of ut){const c=a==="left"||a==="right"?ct:f,l=c(t[a]),A=a==="top"||a==="bottom"?i:0;B(l)?(r[m]=b.value,T=!0):l!==void 0&&(r[m]=h(s.desktop)==="px"?l:g(l,h(s.desktop),A));const w=lt(c(n[a]),c(e[a]),c(o[a]),s,A);for(const[y,[F,G]]of[["tablet",u[0]],["phone",u[1]]]){const x=w[y];x!==void 0&&(P.push(F),p[G]=x,x===b.value&&(T=!0))}}return T&&P.push(...b.className.split(" ")),{classes:P,style:{...r,...p}}}function V(t,o,e){const n=f(t)??e,s=f(o);return n===void 0?s:s===void 0?n:n+s}function St(t,o={}){return{top:V(t.padTop,t.sectionPaddingTop,o.top),bottom:V(t.padBottom,t.sectionPaddingBottom,o.bottom)}}const H={top:"padTop",bottom:"padBottom",left:"padLeft",right:"padRight"},E="padUnit";function bt(t,o){const e=t[E],n=(s,i,d)=>{const r=f(s)??(d===void 0?void 0:I(d,e,"desktop")),p=f(i);return p===void 0?r:(r??0)+I(p,e,"desktop")};return{top:n(t.padTop,t.sectionPaddingTop,o.top),bottom:n(t.padBottom,t.sectionPaddingBottom,o.bottom)}}function Et(t,o,e={}){const n=bt(t,o),s={...Tt(t,H,!0,E),top:n.top,bottom:n.bottom};e.noTop&&Object.assign(s,{top:0,topTablet:void 0,topPhone:void 0});const i=S(s),d=i?i.className.split(" ").filter(r=>r!==C):[];return{...d.length?{className:d.join(" ")}:{},style:i?.style??{}}}const D={top:"sectionPaddingTop",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft",right:"sectionPaddingRight"},Dt=[...["top","bottom","left","right"].map(t=>[H[t],D[t]]),[E,N]].flatMap(([t,o])=>[[t,o],...["tablet","mobile"].map(e=>[_(t,e),_(o,e)])]);function Tt(t,o=D,e=!0,n=o===D?N:void 0){const s={};if(n){t[n]!==void 0&&(s.unit=t[n]);for(const i of["tablet","mobile"])t[_(n,i)]!==void 0&&(s[_("unit",i)]=t[_(n,i)])}for(const i of e?["top","bottom","left","right"]:["top","bottom"]){s[i]=t[o[i]];for(const d of["tablet","mobile"])s[_(i,d)]=t[_(o[i],d)]}return s}function Ot(t){return S(t)}function Lt(t,o){const e=(n,s)=>typeof n!="number"?void 0:h(s)==="px"?n+o:n;return S({...t,frame:o,top:e(t.top,t.unit),bottom:e(t.bottom,t.unit),topTablet:e(t.topTablet,t.unitTablet),bottomTablet:e(t.bottomTablet,t.unitTablet),topPhone:e(t.topPhone,t.unitPhone),bottomPhone:e(t.bottomPhone,t.unitPhone)})}export{H as BAND_PAD_KEYS,E as BAND_PAD_UNIT_KEY,Dt as BAND_TO_SECTION_PAD,W as PAD_BOTTOM_PHONE_CLASS,Z as PAD_BOTTOM_PHONE_VAR,st as PAD_BOTTOM_TABLET_CLASS,pt as PAD_BOTTOM_TABLET_VAR,v as PAD_LEFT_PHONE_CLASS,ot as PAD_LEFT_PHONE_VAR,it as PAD_LEFT_TABLET_CLASS,at as PAD_LEFT_TABLET_VAR,tt as PAD_RIGHT_PHONE_CLASS,et as PAD_RIGHT_PHONE_VAR,dt as PAD_RIGHT_TABLET_CLASS,ft as PAD_RIGHT_TABLET_VAR,Q as PAD_TOP_PHONE_CLASS,X as PAD_TOP_PHONE_VAR,nt as PAD_TOP_TABLET_CLASS,rt as PAD_TOP_TABLET_VAR,z as SECTION_PADDING,C as SECTION_PAD_CLASS,D as SECTION_PAD_KEYS,Et as bandPadAttrs,bt as bandTopBottom,I as padDefaultIn,mt as padSideAttrs,ct as padSideValue,Tt as padValuesOf,St as resolveSectionPadding,Lt as rootPadAttrs,S as sectionPadAttrs,J as sectionPadStyle,lt as sideViewLengths,Ot as wrapperPadAttrs};
@@ -1 +1 @@
1
- import{jsx as n}from"react/jsx-runtime";import{sectionBorderUnitsOf as f}from"../../../../../../format/lib/content/borders.js";import{BOX_ANGLE_PROP as g}from"../../../../../../format/lib/content/box-angle.js";import{BOX_SIDE_SPACE_PROP as b}from"../../../../../../format/lib/content/box-side-space.js";import{phoneKey as a,tabletKey as t}from"efficient-easel/draw";import{BOX_SWATCH_PROP as S,boxCardProps as r,boxPaintOf as u}from"../../../../../../format/lib/content/box-background.js";import{BOX_ROW_IMAGE_PROP as w}from"../../../../../../format/lib/content/box-card-rule.js";import{sharedColumnsDrawn as P,sharedRowsDrawn as O}from"../../../../content/box-shared-columns.js";import{CountRowsContext as k,NO_COUNTS as y}from"../../../../../components/CountRowsContext.js";import{RowEmptyGate as _}from"../../../../../components/CardRowContext.js";import{BOX_HIDE_WHEN_ROW_EMPTY as C,CARD_ROW_LINK_PROP as T,namedRowField as d}from"../../../../../../format/lib/content/card-template.js";import x from"../../../../../components/Flex.js";import{loopDelayOf as R,loopSecondsOf as B,parseLoop as D,parseLoopDirection as E}from"../../../../../../format/lib/animation/index.js";import{COUNTS_SOURCE as H,declaredBlockSource as j,servedRows as I}from"../../../../../../format/lib/content/block-sources.js";import{padValuesOf as v}from"../../../../content/section-padding.js";import{sectionFillsHeight as F}from"../../../../../../format/lib/content/section-min-height.js";import{BOX_SHOW_KEY as N,boxHighlightStyle as W,pictureHoverOf as X}from"../../../../../../format/lib/animation/hover.js";import{slotCountOf as A}from"../../../slot-counts.js";import{FlexMeta as L}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";const le={...L,render:e=>{const o=!!e.editor?.isEditing,h=n(x,{direction:e.direction,label:e.label,tabShape:e.tabShape,gap:e.gap,gapPhone:e[a("gap")],gapTablet:e[t("gap")],justify:e.justify,justifyTablet:e[t("justify")],justifyPhone:e[a("justify")],align:e.align,alignTablet:e[t("align")],alignPhone:e[a("align")],wrap:e.wrap,wrapTablet:e[t("wrap")],share:e.share,sharePhone:e[a("share")],shareTablet:e[t("share")],wrapPhone:e[a("wrap")],orderPhone:e[a("order")],phoneRow:e.phoneRow,columns:e.columns,columnsTablet:e[t("columns")],separator:e.separator,stackBelow:e.stackBelow,blockSpacing:e.blockSpacing,blockSpacingTablet:e[t("blockSpacing")],blockSpacingPhone:e[a("blockSpacing")],bgImage:e.bgImage,bgImagePhone:e.bgImagePhone,rowImage:d(e,w),pictureHover:X(e,"Flex"),hoverShow:e[N],darken:e.darken,darkenStyle:e.darkenStyle,darkenTablet:e[t("darken")],darkenPhone:e[a("darken")],darkenStyleTablet:e[t("darkenStyle")],darkenStylePhone:e[a("darkenStyle")],placement:e.placement,padV2:e.padV2===!0,border:e.sectionBorder,borderTablet:e.sectionBorderTablet,borderPhone:e.sectionBorderPhone,borderUnits:f(e),pad:v(e),contained:e.contained,fillHeight:F(e),shadow:e.shadow,shadowTablet:e[t("shadow")],shadowPhone:e[a("shadow")],loop:D(e.loop),scrollDirection:E(e.scrollDirection),loopSeconds:B({loopDuration:e.loopDuration}),loopDelay:R({loopDelay:e.loopDelay}),editing:o,fillColor:e.fillColor,fillColorTablet:e[t("fillColor")],fillColorPhone:e[a("fillColor")],swatch:e[S],line:e.line,upcoming:e.upcoming,link:e.link,rowLink:d(e,T),highlight:W(e,m=>u(m)??""),boxShape:e.boxShape,boxShapePhone:e[a("boxShape")],boxShapeTablet:e[t("boxShape")],angle:e[g],jumpHighlight:e.jumpHighlight,anchor:e.anchor,sharedSides:P(r(e,!1)),sharedRows:O(r(e,!1)),boxId:typeof e.id=="string"?e.id:void 0,slotCount:A(e),mirrorCards:e.mirrorCards,content:e.content,rowTitle:e.rowTitle,startsOpen:e.startsOpen,rowStyle:e.rowStyle,sideSpace:e[b]}),l=j(e),c=l?l===H?I(e):y:null,i=n(k.Provider,{value:c,children:h});return e[C]===void 0?i:n(_,{props:e,editing:o,children:i})}};export{le as FlexRender};
1
+ import{jsx as l}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_FILL_FADE_PROP as S,BOX_SWATCH_PROP as u,boxCardProps as d,boxPaintOf as w}from"../../../../../../format/lib/content/box-background.js";import{BOX_ROW_IMAGE_PROP as P}from"../../../../../../format/lib/content/box-card-rule.js";import{sharedColumnsDrawn as O,sharedRowsDrawn as _}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 R,CARD_ROW_LINK_PROP as T,namedRowField as r}from"../../../../../../format/lib/content/card-template.js";import x from"../../../../../components/Flex.js";import{loopDelayOf as B,loopSecondsOf as D,parseLoop as E,parseLoopDirection as H}from"../../../../../../format/lib/animation/index.js";import{COUNTS_SOURCE as I,declaredBlockSource as j,servedRows as F}from"../../../../../../format/lib/content/block-sources.js";import{padValuesOf as L}from"../../../../content/section-padding.js";import{sectionFillsHeight as X}from"../../../../../../format/lib/content/section-min-height.js";import{BOX_SHOW_KEY as v,boxHighlightStyle as A,pictureHoverOf as N}from"../../../../../../format/lib/animation/hover.js";import{slotCountOf as W}from"../../../slot-counts.js";import{FlexMeta as U}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";const ie={...U,render:e=>{const n=!!e.editor?.isEditing,h=l(x,{direction:e.direction,label:e.label,tabShape:e.tabShape,gap:e.gap,gapPhone:e[a("gap")],gapTablet:e[t("gap")],justify:e.justify,justifyTablet:e[t("justify")],justifyPhone:e[a("justify")],align:e.align,alignTablet:e[t("align")],alignPhone:e[a("align")],wrap:e.wrap,wrapTablet:e[t("wrap")],share:e.share,sharePhone:e[a("share")],shareTablet:e[t("share")],wrapPhone:e[a("wrap")],orderPhone:e[a("order")],phoneRow:e.phoneRow,columns:e.columns,columnsTablet:e[t("columns")],separator:e.separator,stackBelow:e.stackBelow,blockSpacing:e.blockSpacing,blockSpacingTablet:e[t("blockSpacing")],blockSpacingPhone:e[a("blockSpacing")],bgImage:e.bgImage,bgImagePhone:e.bgImagePhone,rowImage:r(e,P),pictureHover:N(e,"Flex"),hoverShow:e[v],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:L(e),contained:e.contained,fillHeight:X(e),shadow:e.shadow,shadowTablet:e[t("shadow")],shadowPhone:e[a("shadow")],loop:E(e.loop),scrollDirection:H(e.scrollDirection),loopSeconds:D({loopDuration:e.loopDuration}),loopDelay:B({loopDelay:e.loopDelay}),editing:n,fillColor:e.fillColor,fillColorTablet:e[t("fillColor")],fillColorPhone:e[a("fillColor")],fillFade:e[S],swatch:e[u],line:e.line,upcoming:e.upcoming,link:e.link,rowLink:r(e,T),highlight:A(e,m=>w(m)??""),boxShape:e.boxShape,boxShapePhone:e[a("boxShape")],boxShapeTablet:e[t("boxShape")],angle:e[g],jumpHighlight:e.jumpHighlight,anchor:e.anchor,sharedSides:O(d(e,!1)),sharedRows:_(d(e,!1)),boxId:typeof e.id=="string"?e.id:void 0,slotCount:W(e),mirrorCards:e.mirrorCards,content:e.content,rowTitle:e.rowTitle,startsOpen:e.startsOpen,rowStyle:e.rowStyle,sideSpace:e[b]}),o=j(e),c=o?o===I?F(e):y:null,i=l(k.Provider,{value:c,children:h});return e[R]===void 0?i:l(C,{props:e,editing:n,children:i})}};export{ie as FlexRender};
@@ -1 +1 @@
1
- import{jsx as f}from"react/jsx-runtime";import l from"../../../../../components/Footprint.js";import{FOOTPRINT_DEFAULTS as u,footprintOfficeOfRow as h}from"../../../../../../format/lib/content/footprint.js";import{DEALERS_SOURCE as c,declaredBlockSource as s,sourcedRows as y}from"../../../../../../format/lib/content/block-sources.js";import{parseDealerListPosition as T}from"../../../../dealer-source.js";import{hidableText as m}from"efficient-easel/draw";import{parseSectionHeadPlacement as g}from"../../../../../../format/lib/sections/section-head-placement.js";import{phRows as S,phHide as a}from"../../scaffold.js";import{say as t}from"../../../../../../format/lib/editor-words.js";import{CARD_TEMPLATE_SLOT as O}from"../../../../../../format/lib/content/card-template.js";import{cardPressTitlesOf as w}from"../../../card-press-titles.js";import{FootprintMeta as C,FOOTPRINT_PH as d}from"../../../../../../format/lib/document/blocks/general/Footprint/meta.js";const P=()=>[{role:t("Headquarters"),city:t("City"),country:t("Country"),address:t("Street address"),lat:0,lng:0,hq:!0},{role:t("Office"),city:t("City"),country:t("Country"),address:t("Street address"),lat:0,lng:0,hq:!1}],R=()=>[{role:t("Headquarters"),city:t("City"),country:t("Country"),address:t("Street address"),hq:"true"},{role:t("Office"),city:t("City"),country:t("Country"),address:t("Street address")}];function x(e){const o=()=>S(e.offices,P(),e.editor),i=s(e);if(!i||i===c)return o();const n=e.editor?.isEditing===!0,r=y(e,n,R());return!r.sample&&!r.rows.length?o():r.rows.map(h)}const I={...C,render:e=>{const o=g(e.headPlacement)==="own-box",i=r=>o?void 0:r,n=x(e);return f(l,{sectionNumber:i(a(e.sectionNumber,d.sectionNumber,e.editor)),heading:i(a(e.heading,d.heading,e.editor)),tagline:i(a(e.tagline,d.tagline,e.editor)),omitHead:o,offices:n,mapTheme:e.mapTheme??u.mapTheme,padTop:o?0:typeof e.padTop=="number"?e.padTop:120,padBottom:typeof e.padBottom=="number"?e.padBottom:120,editing:e.editor?.isEditing,dealers:s(e)===c,search:e.search===!0,searchHint:m(e.searchHint),noMatchText:m(e.noMatchText),listPosition:T(e.listPosition),showDistance:e.showDistance!==!1,template:e.template,ownerId:String(e.id??""),pressTitles:w(e,O)})}};export{I as FootprintRender};
1
+ import{jsx as f}from"react/jsx-runtime";import{bandPadAttrs as l}from"../../../../content/section-padding.js";import{innerPaddingFallback as u}from"../../../passes/section-padding.js";import h from"../../../../../components/Footprint.js";import{FOOTPRINT_DEFAULTS as y,footprintOfficeOfRow as T}from"../../../../../../format/lib/content/footprint.js";import{DEALERS_SOURCE as s,declaredBlockSource as c,sourcedRows as g}from"../../../../../../format/lib/content/block-sources.js";import{parseDealerListPosition as S}from"../../../../dealer-source.js";import{hidableText as m}from"efficient-easel/draw";import{parseSectionHeadPlacement as O}from"../../../../../../format/lib/sections/section-head-placement.js";import{phRows as P,phHide as a}from"../../scaffold.js";import{say as e}from"../../../../../../format/lib/editor-words.js";import{CARD_TEMPLATE_SLOT as w}from"../../../../../../format/lib/content/card-template.js";import{cardPressTitlesOf as C}from"../../../card-press-titles.js";import{FootprintMeta as R,FOOTPRINT_PH as d}from"../../../../../../format/lib/document/blocks/general/Footprint/meta.js";const b=()=>[{role:e("Headquarters"),city:e("City"),country:e("Country"),address:e("Street address"),lat:0,lng:0,hq:!0},{role:e("Office"),city:e("City"),country:e("Country"),address:e("Street address"),lat:0,lng:0,hq:!1}],x=()=>[{role:e("Headquarters"),city:e("City"),country:e("Country"),address:e("Street address"),hq:"true"},{role:e("Office"),city:e("City"),country:e("Country"),address:e("Street address")}];function E(t){const i=()=>P(t.offices,b(),t.editor),r=c(t);if(!r||r===s)return i();const n=t.editor?.isEditing===!0,o=g(t,n,x());return!o.sample&&!o.rows.length?i():o.rows.map(T)}const v={...R,render:t=>{const i=O(t.headPlacement)==="own-box",r=o=>i?void 0:o,n=E(t);return f(h,{sectionNumber:r(a(t.sectionNumber,d.sectionNumber,t.editor)),heading:r(a(t.heading,d.heading,t.editor)),tagline:r(a(t.tagline,d.tagline,t.editor)),omitHead:i,offices:n,mapTheme:t.mapTheme??y.mapTheme,bandPad:l(t,u("Footprint"),{noTop:i}),editing:t.editor?.isEditing,dealers:c(t)===s,search:t.search===!0,searchHint:m(t.searchHint),noMatchText:m(t.noMatchText),listPosition:S(t.listPosition),showDistance:t.showDistance!==!1,template:t.template,ownerId:String(t.id??""),pressTitles:C(t,w)})}};export{v as FootprintRender};
@@ -1 +1 @@
1
- import{jsx as w}from"react/jsx-runtime";import x from"../../../../../components/HeroSlide.js";import{nestedAccentValue as M,sectionThemeWrap as O}from"../../../../../../format/lib/content/section-surface.js";import{phHide as N}from"../../scaffold.js";import{HeroSlideMeta as R}from"../../../../../../format/lib/document/blocks/general/HeroSlide/meta.js";import{editorVideoFrame as U,loadingStill as D}from"../../../../../../format/lib/hero-video.js";import{LATER_SLIDES_KEY as K}from"../../../../first-screen.js";import{viewFocusValues as y}from"../../../../../../format/lib/content/picture-focus-rows.js";const X={...R,render:t=>{const{name:f,process:g,mediaType:e,mediaVideo:n,mediaImage:b,poster:S,loadingShows:v,videoFrame:P,mediaSrc:r,videoSpeed:d,tintColor:h,overlay:j,groups:C,editor:o,overlayColor:m,overlayPosition:s,mediaLayout:F,mediaLayoutPhone:L,mediaImage2:A,tintColor2:T,tintOpacity2:k,videoSource:E,youtubeUrl:H,videoPlayback:I,_partMotion:V,id:l,...c}=t,i=y(t,"imageFocal"),a=y(t,"imageFocal2"),p=o?.metadata?.[K],_=U(l,n||r,o?.metadata),u=O({...c,sectionAccent:M(c.sectionAccent)});return w(x,{themeClassName:u?.className,themeStyle:u?.style,name:f||void 0,process:N(g,"Label",o),mediaType:e,mediaSrc:(e==="image"?b:n||r)||void 0,videoSpeed:typeof d=="number"?d:void 0,poster:D({loadingShows:v,poster:S,videoFrame:P||_}),objectPosition:e==="image"?i.desktop:void 0,objectPositionPhone:e==="image"?i.phone:void 0,objectPositionTablet:e==="image"?i.tablet:void 0,tintColor:h,tintOpacity:e==="image"?j:0,groups:C,editing:o?.isEditing,overlayColor:typeof m=="string"?m:void 0,overlayPosition:typeof s=="string"?s:void 0,mediaLayout:F,mediaLayoutPhone:L,mediaImage2:A||void 0,objectPosition2:a.desktop,objectPosition2Phone:a.phone,objectPosition2Tablet:a.tablet,tintColor2:T,tintOpacity2:k,videoSource:E,youtubeUrl:H,videoPlayback:I,partMotion:V,...Array.isArray(p)&&p.includes(l)?{laterSlide:!0}:{}})}};export{X as HeroSlideRender};
1
+ import{jsx as Y}from"react/jsx-runtime";import q from"../../../../../components/HeroSlide.js";import{nestedAccentValue as z,sectionThemeWrap as B}from"../../../../../../format/lib/content/section-surface.js";import{phHide as G}from"../../scaffold.js";import{HeroSlideMeta as J}from"../../../../../../format/lib/document/blocks/general/HeroSlide/meta.js";import{editorVideoFrame as g,loadingStill as v}from"../../../../../../format/lib/hero-video.js";import{mediaValueSrc as r}from"../../../../../../format/lib/media-value.js";import{LATER_SLIDES_KEY as Q}from"../../../../first-screen.js";import{viewFocusValues as b}from"../../../../../../format/lib/content/picture-focus-rows.js";const ae={...J,render:i=>{const{name:S,process:A,mediaType:e,mediaVideo:m,mediaVideoAv1:F,mediaVideoPhone:V,mediaVideoAv1Phone:j,mediaImage:C,poster:s,posterPhone:L,loadingShows:c,videoFrame:k,videoFramePhone:T,mediaSrc:l,videoSpeed:u,tintColor:E,overlay:H,groups:I,editor:o,overlayColor:p,overlayPosition:f,mediaLayout:_,mediaLayoutPhone:w,mediaImage2:x,tintColor2:M,tintOpacity2:O,videoSource:N,youtubeUrl:R,videoPlayback:U,_partMotion:D,id:t,...y}=i,n=b(i,"imageFocal"),d=b(i,"imageFocal2"),h=o?.metadata?.[Q],K=g(t,m||l,o?.metadata),a=e==="image"?void 0:r(V)||void 0,W=a?g(t,a,o?.metadata):void 0,P=B({...y,sectionAccent:z(y.sectionAccent)});return Y(q,{themeClassName:P?.className,themeStyle:P?.style,name:S||void 0,process:G(A,"Label",o),mediaType:e,mediaSrc:(e==="image"?C:m||l)||void 0,videoSpeed:typeof u=="number"?u:void 0,poster:v({loadingShows:c,poster:s,videoFrame:k||K}),mediaAv1:e==="image"?void 0:r(F)||void 0,mediaSrcPhone:a,mediaAv1Phone:e==="image"?void 0:r(j)||void 0,posterPhone:e==="image"?void 0:v({loadingShows:c,poster:s,posterPhone:L,videoFramePhone:T||W},"phone"),objectPosition:e==="image"?n.desktop:void 0,objectPositionPhone:e==="image"?n.phone:void 0,objectPositionTablet:e==="image"?n.tablet:void 0,tintColor:E,tintOpacity:e==="image"?H:0,groups:I,editing:o?.isEditing,overlayColor:typeof p=="string"?p:void 0,overlayPosition:typeof f=="string"?f:void 0,mediaLayout:_,mediaLayoutPhone:w,mediaImage2:x||void 0,objectPosition2:d.desktop,objectPosition2Phone:d.phone,objectPosition2Tablet:d.tablet,tintColor2:M,tintOpacity2:O,videoSource:N,youtubeUrl:R,videoPlayback:U,partMotion:D,...Array.isArray(h)&&h.includes(t)?{laterSlide:!0}:{}})}};export{ae as HeroSlideRender};
@@ -1 +1 @@
1
- import{jsx as f}from"react/jsx-runtime";import u from"../../../../../components/ParagraphsA.js";import{PH as A}from"../../../../../../format/lib/document/blocks/placeholders.js";import{phHide as o}from"../../scaffold.js";import{ParagraphsAMeta as H,PARAGRAPHS_A_PH as a}from"../../../../../../format/lib/document/blocks/general/ParagraphsA/meta.js";const w={...H,render:({eyebrow:e,lead:t,stats:s,foundersHeading:p,foundersBody:d,attribution:m,padTop:n,padBottom:i,editor:r})=>f(u,{takesViewHide:!0,eyebrow:o(e,a.eyebrow,r),lead:o(t,A.body,r),stats:s,foundersHeading:o(p,a.foundersHeading,r),foundersBody:o(d,a.foundersBody,r),attribution:o(m,a.attribution,r),padTop:n,padBottom:i})};export{w as ParagraphsARender};
1
+ import{jsx as f}from"react/jsx-runtime";import{bandPadAttrs as p}from"../../../../content/section-padding.js";import{innerPaddingFallback as u}from"../../../passes/section-padding.js";import P from"../../../../../components/ParagraphsA.js";import{PH as b}from"../../../../../../format/lib/document/blocks/placeholders.js";import{phHide as o}from"../../scaffold.js";import{ParagraphsAMeta as A,PARAGRAPHS_A_PH as a}from"../../../../../../format/lib/document/blocks/general/ParagraphsA/meta.js";const x={...A,render:e=>{const{eyebrow:t,lead:d,stats:i,foundersHeading:n,foundersBody:s,attribution:m,editor:r}=e;return f(P,{takesViewHide:!0,eyebrow:o(t,a.eyebrow,r),lead:o(d,b.body,r),stats:i,foundersHeading:o(n,a.foundersHeading,r),foundersBody:o(s,a.foundersBody,r),attribution:o(m,a.attribution,r),bandPad:p(e,u("ParagraphsA"))})}};export{x as ParagraphsARender};
@@ -1 +1 @@
1
- import{jsx as r,Fragment as g}from"react/jsx-runtime";import h from"../../../../../components/ProcessSteps.js";import{CardTemplateRows as x}from"../../../../../components/CardRowContext.js";import{ClientRowsReader as R,clientRowsKey as T}from"../../../../../components/ClientRows.js";import{blockSourceSpec as y,declaredBlockSource as b,sourcedRows as P}from"../../../../../../format/lib/content/block-sources.js";import{imageTextRowsHand as H}from"../../../../../../format/lib/content/image-text-rows.js";import{parseSectionHeadPlacement as B}from"../../../../../../format/lib/sections/section-head-placement.js";import{PH as t}from"../../../../../../format/lib/document/blocks/placeholders.js";import{phRows as C,phHide as s,ctaHide as k}from"../../scaffold.js";import{say as l}from"../../../../../../format/lib/editor-words.js";import{ProcessStepsMeta as p,PROCESS_PH as v}from"../../../../../../format/lib/document/blocks/general/ProcessSteps/meta.js";const D=()=>[{image:"",tag:l("{letter} · Step",{letter:"A"}),meta:l("Short detail line"),title:l("Step *one*"),copy:l("Describe this step in a sentence or two."),specs:[{label:t.label,value:t.value},{label:t.label,value:t.value},{label:t.label,value:t.value},{label:t.label,value:t.value}]},{image:"",tag:l("{letter} · Step",{letter:"B"}),meta:l("Short detail line"),title:l("Step *two*"),copy:l("Describe this step in a sentence or two."),specs:[{label:t.label,value:t.value},{label:t.label,value:t.value},{label:t.label,value:t.value},{label:t.label,value:t.value}]},{image:"",tag:l("{letter} · Step",{letter:"C"}),meta:l("Short detail line"),title:l("Step *three*"),copy:l("Describe this step in a sentence or two."),specs:[{label:t.label,value:t.value},{label:t.label,value:t.value},{label:t.label,value:t.value},{label:t.label,value:t.value}]}];function E(e,o){const i=b(e);return!o&&y(i)?.useRows?{client:i,rows:[]}:{client:null,rows:[...P(e,o).rows]}}const J={...p,render:e=>{const o=B(e.headPlacement)==="own-box",i=a=>o?void 0:a,u=e.editor?.isEditing===!0,w=H(e),n=a=>r(h,{rows:w,...a!==void 0?{copies:a}:{},num:i(s(e.num,v.num,e.editor)),title:i(s(e.title,v.title,e.editor)),description:i(s(e.description,t.body,e.editor)),omitHead:o,boxes:e.boxes,steps:C(e.steps,D(),e.editor),columns:typeof e.columns=="number"?e.columns:3,cta:k(e.ctaText,e.ctaHref),padTop:o?0:typeof e.padTop=="number"?e.padTop:120,padBottom:typeof e.padBottom=="number"?e.padBottom:120,cardImage:e.cardImage,cardText:e.cardText,editing:e.editor?.isEditing});if(!b(e))return n();const m=(a,d)=>a.length?r(x,{ownerId:String(e.id??""),ownerType:"ProcessSteps",Template:e.template,rows:a,...d?{items:d}:{},fallback:n(null),children:S=>n(S)}):u?n(null):r(g,{}),{client:c,rows:f}=E(e,u);return c?r(R,{source:c,props:e,children:a=>m(a?.rows??[],a?.items)},T(c)):m(f)}};export{J as ProcessStepsRender,E as imageTextSourceRows};
1
+ import{jsx as n,Fragment as g}from"react/jsx-runtime";import{bandPadAttrs as h}from"../../../../content/section-padding.js";import{innerPaddingFallback as x}from"../../../passes/section-padding.js";import P from"../../../../../components/ProcessSteps.js";import{CardTemplateRows as R}from"../../../../../components/CardRowContext.js";import{ClientRowsReader as T,clientRowsKey as y}from"../../../../../components/ClientRows.js";import{blockSourceSpec as H,declaredBlockSource as b,sourcedRows as k}from"../../../../../../format/lib/content/block-sources.js";import{imageTextRowsHand as C}from"../../../../../../format/lib/content/image-text-rows.js";import{parseSectionHeadPlacement as B}from"../../../../../../format/lib/sections/section-head-placement.js";import{PH as t}from"../../../../../../format/lib/document/blocks/placeholders.js";import{phRows as D,phHide as s,ctaHide as E}from"../../scaffold.js";import{say as l}from"../../../../../../format/lib/editor-words.js";import{ProcessStepsMeta as F,PROCESS_PH as v}from"../../../../../../format/lib/document/blocks/general/ProcessSteps/meta.js";const I=()=>[{image:"",tag:l("{letter} · Step",{letter:"A"}),meta:l("Short detail line"),title:l("Step *one*"),copy:l("Describe this step in a sentence or two."),specs:[{label:t.label,value:t.value},{label:t.label,value:t.value},{label:t.label,value:t.value},{label:t.label,value:t.value}]},{image:"",tag:l("{letter} · Step",{letter:"B"}),meta:l("Short detail line"),title:l("Step *two*"),copy:l("Describe this step in a sentence or two."),specs:[{label:t.label,value:t.value},{label:t.label,value:t.value},{label:t.label,value:t.value},{label:t.label,value:t.value}]},{image:"",tag:l("{letter} · Step",{letter:"C"}),meta:l("Short detail line"),title:l("Step *three*"),copy:l("Describe this step in a sentence or two."),specs:[{label:t.label,value:t.value},{label:t.label,value:t.value},{label:t.label,value:t.value},{label:t.label,value:t.value}]}];function _(e,o){const r=b(e);return!o&&H(r)?.useRows?{client:r,rows:[]}:{client:null,rows:[...k(e,o).rows]}}const V={...F,render:e=>{const o=B(e.headPlacement)==="own-box",r=a=>o?void 0:a,u=e.editor?.isEditing===!0,w=C(e),i=a=>n(P,{rows:w,...a!==void 0?{copies:a}:{},num:r(s(e.num,v.num,e.editor)),title:r(s(e.title,v.title,e.editor)),description:r(s(e.description,t.body,e.editor)),omitHead:o,boxes:e.boxes,steps:D(e.steps,I(),e.editor),columns:typeof e.columns=="number"?e.columns:3,cta:E(e.ctaText,e.ctaHref),bandPad:h(e,x("ProcessSteps"),{noTop:o}),cardImage:e.cardImage,cardText:e.cardText,editing:e.editor?.isEditing});if(!b(e))return i();const m=(a,d)=>a.length?n(R,{ownerId:String(e.id??""),ownerType:"ProcessSteps",Template:e.template,rows:a,...d?{items:d}:{},fallback:i(null),children:f=>i(f)}):u?i(null):n(g,{}),{client:c,rows:S}=_(e,u);return c?n(T,{source:c,props:e,children:a=>m(a?.rows??[],a?.items)},y(c)):m(S)}};export{V as ProcessStepsRender,_ as imageTextSourceRows};
@@ -1 +1 @@
1
- import{jsx as d}from"react/jsx-runtime";import S from"../../../../../components/StatsParagraph.js";import{resolveSectionBackground as g}from"../../../../../../format/lib/content/section-background.js";import{parseSectionHeadPlacement as P}from"../../../../../../format/lib/sections/section-head-placement.js";import{PH as t}from"../../../../../../format/lib/document/blocks/placeholders.js";import{phRows as H,phHide as s}from"../../scaffold.js";import{SECTION_BG_BUILT_IN as _}from"../../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{say as e}from"../../../../../../format/lib/editor-words.js";import{StatsParagraphMeta as v,STATS_PARAGRAPH_PH as i}from"../../../../../../format/lib/document/blocks/general/StatsParagraph/meta.js";const w=()=>[{value:"00",label:t.label,sub:e("Short description of this figure.")},{value:"00",label:t.label,sub:e("Short description of this figure.")},{value:"00",label:t.label,sub:e("Short description of this figure.")},{value:"00",label:t.label,sub:e("Short description of this figure.")}],E={...v,render:({eyebrow:p,title:f,desc:m,stats:b,background:u,padTop:l,padBottom:n,headPlacement:c,editor:r})=>{const o=P(c)==="own-box",a=h=>o?void 0:h;return d(S,{eyebrow:a(s(p,i.eyebrow,r)),title:a(s(f,i.title,r)),desc:a(s(m,i.desc,r)),omitHead:o,stats:H(b,w(),r),background:g(u,_.StatsParagraph),padTop:o?0:typeof l=="number"?l:120,padBottom:typeof n=="number"?n:120,editing:r?.isEditing})}};export{E as StatsParagraphRender};
1
+ import{jsx as h}from"react/jsx-runtime";import{bandPadAttrs as u}from"../../../../content/section-padding.js";import{innerPaddingFallback as g}from"../../../passes/section-padding.js";import S from"../../../../../components/StatsParagraph.js";import{resolveSectionBackground as P}from"../../../../../../format/lib/content/section-background.js";import{parseSectionHeadPlacement as w}from"../../../../../../format/lib/sections/section-head-placement.js";import{PH as r}from"../../../../../../format/lib/document/blocks/placeholders.js";import{phRows as H,phHide as i}from"../../scaffold.js";import{SECTION_BG_BUILT_IN as _}from"../../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{say as a}from"../../../../../../format/lib/editor-words.js";import{StatsParagraphMeta as v,STATS_PARAGRAPH_PH as s}from"../../../../../../format/lib/document/blocks/general/StatsParagraph/meta.js";const x=()=>[{value:"00",label:r.label,sub:a("Short description of this figure.")},{value:"00",label:r.label,sub:a("Short description of this figure.")},{value:"00",label:r.label,sub:a("Short description of this figure.")},{value:"00",label:r.label,sub:a("Short description of this figure.")}],C={...v,render:n=>{const{eyebrow:d,title:l,desc:m,stats:p,background:f,headPlacement:b,editor:t}=n,e=w(b)==="own-box",o=c=>e?void 0:c;return h(S,{eyebrow:o(i(d,s.eyebrow,t)),title:o(i(l,s.title,t)),desc:o(i(m,s.desc,t)),omitHead:e,stats:H(p,x(),t),background:P(f,_.StatsParagraph),bandPad:u(n,g("StatsParagraph"),{noTop:e}),editing:t?.isEditing})}};export{C as StatsParagraphRender};
@@ -1 +1 @@
1
- import{jsx as d}from"react/jsx-runtime";import n from"../../../../../components/Timeline.js";import r from"../../../../../components/TimelineTrack.js";import{resolveSectionBackground as f}from"../../../../../../format/lib/content/section-background.js";import{SECTION_BG_BUILT_IN as l}from"../../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{TIMELINE_TRACK_PH as a,timelineTrackScaffoldEntries as c}from"../../../../../../format/lib/document/blocks/general/TimelineTrack/meta.js";import{phRows as m,phHide as e,ctaHide as o}from"../../scaffold.js";import{TimelineMeta as T,TIMELINE_PH as i,timelineScaffoldEntries as u}from"../../../../../../format/lib/document/blocks/general/Timeline/meta.js";function b(t){return{date:t.date,title:t.title,blurb:t.body,future:t.future}}const H={...T,render:t=>t.layout==="track"?d(r,{eyebrow:e(t.eyebrow,a.eyebrow,t.editor),title:e(t.title,a.title,t.editor),intro:e(t.intro,a.intro,t.editor),entries:m(Array.isArray(t.entries)?t.entries.map(b):[],c(),t.editor),cta:o(t.ctaText,t.ctaHref,t.editor),background:f(t.background,l.TimelineTrack),padTop:typeof t.padTop=="number"?t.padTop:120,padBottom:typeof t.padBottom=="number"?t.padBottom:120,editing:t.editor?.isEditing}):d(n,{layout:t.layout||"split",eyebrow:e(t.eyebrow,i.eyebrow,t.editor),title:e(t.title,i.title,t.editor),intro:e(t.intro,i.intro,t.editor),imageSrc:t.imageSrc||void 0,imageCaption:e(t.imageCaption,i.imageCaption,t.editor),imageMeta:e(t.imageMeta,i.imageMeta,t.editor),cta:o(t.ctaText,t.ctaHref,t.editor),entries:m(t.entries,u(),t.editor),padTop:typeof t.padTop=="number"?t.padTop:120,padBottom:typeof t.padBottom=="number"?t.padBottom:120,editing:t.editor?.isEditing})};export{H as TimelineRender};
1
+ import{jsx as n}from"react/jsx-runtime";import{bandPadAttrs as r}from"../../../../content/section-padding.js";import{innerPaddingFallback as d}from"../../../passes/section-padding.js";import l from"../../../../../components/Timeline.js";import c from"../../../../../components/TimelineTrack.js";import{resolveSectionBackground as f}from"../../../../../../format/lib/content/section-background.js";import{SECTION_BG_BUILT_IN as T}from"../../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{TIMELINE_TRACK_PH as a,timelineTrackScaffoldEntries as g}from"../../../../../../format/lib/document/blocks/general/TimelineTrack/meta.js";import{phRows as m,phHide as i,ctaHide as o}from"../../scaffold.js";import{TimelineMeta as b,TIMELINE_PH as t,timelineScaffoldEntries as u}from"../../../../../../format/lib/document/blocks/general/Timeline/meta.js";function y(e){return{date:e.date,title:e.title,blurb:e.body,future:e.future}}const C={...b,render:e=>e.layout==="track"?n(c,{eyebrow:i(e.eyebrow,a.eyebrow,e.editor),title:i(e.title,a.title,e.editor),intro:i(e.intro,a.intro,e.editor),entries:m(Array.isArray(e.entries)?e.entries.map(y):[],g(),e.editor),cta:o(e.ctaText,e.ctaHref,e.editor),background:f(e.background,T.TimelineTrack),bandPad:r(e,d("Timeline")),editing:e.editor?.isEditing}):n(l,{layout:e.layout||"split",eyebrow:i(e.eyebrow,t.eyebrow,e.editor),title:i(e.title,t.title,e.editor),intro:i(e.intro,t.intro,e.editor),imageSrc:e.imageSrc||void 0,imageCaption:i(e.imageCaption,t.imageCaption,e.editor),imageMeta:i(e.imageMeta,t.imageMeta,e.editor),cta:o(e.ctaText,e.ctaHref,e.editor),entries:m(e.entries,u(),e.editor),bandPad:r(e,d("Timeline")),editing:e.editor?.isEditing})};export{C as TimelineRender};
@@ -1 +1 @@
1
- import{jsx as a}from"react/jsx-runtime";import d from"../../../../../components/TimelineTrack.js";import{resolveSectionBackground as m}from"../../../../../../format/lib/content/section-background.js";import{parseSectionHeadPlacement as c}from"../../../../../../format/lib/sections/section-head-placement.js";import{phRows as T,phHide as o,ctaHide as f}from"../../scaffold.js";import{SECTION_BG_BUILT_IN as l}from"../../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{TimelineTrackMeta as b,TIMELINE_TRACK_PH as n,timelineTrackScaffoldEntries as k}from"../../../../../../format/lib/document/blocks/general/TimelineTrack/meta.js";const y={...b,render:e=>{const t=c(e.headPlacement)==="own-box",i=r=>t?void 0:r;return a(d,{eyebrow:i(o(e.eyebrow,n.eyebrow,e.editor)),title:i(o(e.title,n.title,e.editor)),intro:i(o(e.intro,n.intro,e.editor)),omitHead:t,entries:T(e.entries,k(),e.editor),cta:f(e.ctaText,e.ctaHref,e.editor),background:m(e.background,l.TimelineTrack),padTop:t?0:typeof e.padTop=="number"?e.padTop:120,padBottom:typeof e.padBottom=="number"?e.padBottom:120,editing:e.editor?.isEditing})}};export{y as TimelineTrackRender};
1
+ import{jsx as a}from"react/jsx-runtime";import{bandPadAttrs as d}from"../../../../content/section-padding.js";import{innerPaddingFallback as m}from"../../../passes/section-padding.js";import c from"../../../../../components/TimelineTrack.js";import{resolveSectionBackground as T}from"../../../../../../format/lib/content/section-background.js";import{parseSectionHeadPlacement as l}from"../../../../../../format/lib/sections/section-head-placement.js";import{phRows as f,phHide as r,ctaHide as k}from"../../scaffold.js";import{SECTION_BG_BUILT_IN as b}from"../../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{TimelineTrackMeta as g,TIMELINE_TRACK_PH as n,timelineTrackScaffoldEntries as w}from"../../../../../../format/lib/document/blocks/general/TimelineTrack/meta.js";const S={...g,render:e=>{const i=l(e.headPlacement)==="own-box",t=o=>i?void 0:o;return a(c,{eyebrow:t(r(e.eyebrow,n.eyebrow,e.editor)),title:t(r(e.title,n.title,e.editor)),intro:t(r(e.intro,n.intro,e.editor)),omitHead:i,entries:f(e.entries,w(),e.editor),cta:k(e.ctaText,e.ctaHref,e.editor),background:T(e.background,b.TimelineTrack),bandPad:d(e,m("TimelineTrack"),{noTop:i}),editing:e.editor?.isEditing})}};export{S as TimelineTrackRender};
@@ -1 +1 @@
1
- import{jsx as p}from"react/jsx-runtime";import f from"../../../../../components/TitleWithButtons.js";import{readHidable as b}from"efficient-easel/draw";import{phRows as h,phHide as _}from"../../scaffold.js";import{TitleWithButtonsMeta as a,TITLE_WITH_BUTTONS_PH as c,TITLE_WITH_BUTTONS_SCAFFOLD_BUTTONS as g}from"../../../../../../format/lib/document/blocks/general/TitleWithButtons/meta.js";const I={...a,render:({title:n,buttons:s,padTop:o,padBottom:i,buttonsAlign:T,buttonsAlignTablet:m,buttonsAlignPhone:l,editor:t})=>{const e=T,d=e==="center"||e==="left",r=b(n),u=r.hidden?"":r.text.trim();return p(f,{title:d&&!u?void 0:_(n,c.title,t),buttons:h(s,[...g],t),padTop:typeof o=="number"?o:140,padBottom:typeof i=="number"?i:140,buttonsAlign:e,buttonsAlignTablet:m,buttonsAlignPhone:l,editing:t?.isEditing})}};export{I as TitleWithButtonsRender};
1
+ import{jsx as a}from"react/jsx-runtime";import{bandPadAttrs as b}from"../../../../content/section-padding.js";import{innerPaddingFallback as u}from"../../../passes/section-padding.js";import g from"../../../../../components/TitleWithButtons.js";import{readHidable as h}from"efficient-easel/draw";import{phRows as f,phHide as c}from"../../scaffold.js";import{TitleWithButtonsMeta as p,TITLE_WITH_BUTTONS_PH as A,TITLE_WITH_BUTTONS_SCAFFOLD_BUTTONS as _}from"../../../../../../format/lib/document/blocks/general/TitleWithButtons/meta.js";const S={...p,render:o=>{const{title:i,buttons:r,buttonsAlign:s,buttonsAlignTablet:l,buttonsAlignPhone:d,editor:t}=o,n=s,T=n==="center"||n==="left",e=h(i),m=e.hidden?"":e.text.trim();return a(g,{title:T&&!m?void 0:c(i,A.title,t),buttons:f(r,[..._],t),bandPad:b(o,u("TitleWithButtons")),buttonsAlign:n,buttonsAlignTablet:l,buttonsAlignPhone:d,editing:t?.isEditing})}};export{S as TitleWithButtonsRender};
@@ -1 +1 @@
1
- import{siteLengthHeld as D,storedUnit as x}from"../../../../../format/lib/content/css-length.js";import{SECTION_WIDTH_KEYS as G}from"../../../../../format/lib/content/section-width.js";import{BLOCK_LENGTH_KEYS as I,blockLengthUnitKey as M}from"../../../content/block-size.js";import{viewStoreKeys as v}from"../../../../../format/lib/animation/views.js";import{BOX as W,INNER_BOX as C,LABEL_FACE as U,TEXT as R,boxPadding as w,fillSlot as B,token as F}from"../../../../../format/lib/document/seed-parts.js";import{ENTRANCE_STORE_KEYS as Y,LEGACY_ENTRANCE_KEY as X}from"../../../animation/entrance.js";import{SCROLL_STORE_KEYS as V}from"../../../../../format/lib/animation/scroll.js";import{SECTION_PIN_KEYS as $}from"../../../../../format/lib/content/section-sticky.js";import{SECTION_CORNERS_ROW as j}from"../../../../../format/lib/content/section-corners.js";import{SECTION_BORDER_UNIT_KEYS as z}from"../../../../../format/lib/content/borders.js";import{CARD_HOVER_KEYS as N}from"../../../../../format/lib/animation/hover.js";import{COUNT_KEY_PROP as J}from"../../../../../format/lib/content/block-sources.js";import{SITE_GUTTER as q,SITE_GUTTER_PHONE as Q,normalizeSiteGutter as Z,normalizeSiteGutterPhone as tt,siteGutterPhoneFollows as ot}from"../../../../../format/lib/content/page-width.js";import{resolveSectionPadding as et}from"../../../content/section-padding.js";import{ButtonBlockMeta as nt}from"../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";import{SECTION_PAD_INNER_DEFAULTS as it}from"../../passes/section-padding.js";import{finiteNumber as b}from"../../../../../format/lib/finite-number.js";import{convertTheme as _,hasWords as rt}from"../../../sections/section-to-box.js";import{THEME_SECTION_BG as st}from"../../../../../format/lib/content/section-background.js";import{fillSlotOfInk as A}from"../../../../../format/lib/document/part-inks.js";import{parseHexColor as dt}from"efficient-shell/format";import{convertLength as ct}from"efficient-easel/screen/lib/content/length-units";import{bandPresetIndex as at,surfacePresetIndex as pt,surfaceTwoTone as lt}from"../../../../../format/lib/theme.js";import{VIEW_HIDE_KEYS as mt}from"../../../../../format/lib/content/view-hide-class.js";import{tierOfView as gt}from"../../../../../format/lib/content/view-tier.js";import{ownEntry as Pt}from"../../../../../format/lib/own-entry.js";const s=(t,o,e,n)=>o===e?t:ct(t,o,e,n,{min:0,max:200,step:4});import{BOX as So,DIM as Bo,INNER_BOX as No,TEXT as Io}from"../../../../../format/lib/document/seed-parts.js";const Jt={textFit:"line",textFitPhone:"wrap"},ht={...R,[J]:""},{label:qt,href:Qt,...ft}=nt.defaultProps,Zt=ft,to={buttonFillOpacity:0,buttonBorder:{width:0},buttonPaddingTop:0,buttonPaddingRight:0,buttonPaddingBottom:0,buttonPaddingLeft:0},oo={...W,sectionAccent:0},eo={sectionAccent:-1},no=["gridSpan","sectionHeightMode","sectionHeightValue","sectionHeightUnit","sectionHeightModeTablet","sectionHeightValueTablet","sectionHeightUnitTablet","sectionHeightModePhone","sectionHeightValuePhone","sectionHeightUnitPhone","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderTablet","sectionBorderPhone","sectionAccent",j.unitKey,...z,...$,"anchor",X,...mt,...Y,...V,...v(["widthFit",...I,...I.map(M)]),...Object.values(G)],P="a section width key, ignored since efficient-web-builder 45 (an old key; a section's own width has new keys, lib/content/section-width), so dropping it changes nothing",io={sectionSurface:"read by nothing in src/ (searched 2026-10-24): a retired theme key that draws nothing today, so dropping it changes nothing",widthMode:P,fullWidth:P,pageWidth:P,backgroundWidth:P,contentWidth:P,contentMax:P},ro=Object.fromEntries(["sectionPaddingLeft","sectionPaddingRight","sectionPaddingLeftTablet","sectionPaddingRightTablet","sectionPaddingLeftPhone","sectionPaddingRightPhone"].map(t=>[t,"needs Box side padding outside its gutter: the old section added it outside its frame, a Box's side padding replaces the gutter. 0 live nodes store it (JJ's read-only export, 2026-10-24)"]));function ut(t,o){const e=b(t.sectionPaddingTop)??0,n=b(t.sectionPaddingBottom)??0,i=b(t.sectionPaddingTopTablet),r=b(t.sectionPaddingBottomTablet),c=x(t.sectionPaddingUnit),p=x(t.sectionPaddingUnitTablet),l=x(t.sectionPaddingUnitPhone),h=(m,a,u,g)=>{const d=b(m);if(d!==void 0)return d+s(g,"px",l,"mobile");const T=a===void 0?{n:u,unit:c}:{n:a,unit:p};return s(T.n,T.unit,l,"mobile")+s(g,"px",l,"mobile")},f=(m,a,u,g,d)=>a!==void 0?{[m]:a+s(d??g,"px",p,"tablet")}:d===void 0?{}:{[m]:s(u,c,p,"tablet")+s(d,"px",p,"tablet")};return{sectionPaddingTop:e+s(o.top,"px",c,"desktop"),sectionPaddingBottom:n+s(o.bottom,"px",c,"desktop"),...f("sectionPaddingTopTablet",i,e,o.top,o.topTablet),...f("sectionPaddingBottomTablet",r,n,o.bottom,o.bottomTablet),sectionPaddingTopPhone:h(t.sectionPaddingTopPhone,i,e,o.topPhone),sectionPaddingBottomPhone:h(t.sectionPaddingBottomPhone,r,n,o.bottomPhone)}}const so=t=>[...["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopTablet","sectionPaddingBottomTablet","sectionPaddingTopPhone","sectionPaddingBottomPhone"].map(o=>[o,o,(e,n)=>ut(n,typeof t=="function"?t(n):t)[o]]),["sectionPaddingUnit","sectionPaddingUnit"],["sectionPaddingUnitTablet","sectionPaddingUnitTablet"],["sectionPaddingUnitPhone","sectionPaddingUnitPhone"]];function E(t,o){const e=et(t,Pt(it,o));return{sectionPaddingTop:e.top,sectionPaddingBottom:e.bottom}}const co=t=>[["padTop","sectionPaddingTop",(o,e)=>E(e,t).sectionPaddingTop],["padBottom","sectionPaddingBottom",(o,e)=>E(e,t).sectionPaddingBottom],["sectionPaddingTop","sectionPaddingTop",(o,e)=>E(e,t).sectionPaddingTop],["sectionPaddingBottom","sectionPaddingBottom",(o,e)=>E(e,t).sectionPaddingBottom]],Tt={kind:"heading-case-upper",styles:["heading-1","heading-2","heading-3"]},ao=t=>o=>rt(o.props[t])?[Tt]:[],bt=(t,o)=>({kind:"text",key:t,role:"eyebrow",props:R,...o?{style:o}:{}}),po=t=>({kind:"group",name:"Chip",props:{...C,...B("main"),...w(6,14)},parts:[bt(t,{color:"background",...F("label",12),weight:600,letterSpacing:.16})]}),H=t=>t.background!=="transparent",xt=(t,o)=>{const[e,n]=[t,o].map(i=>typeof i=="string"?i.trim():"");return e?n?`[${e} ]{color=text}${n}`:`[${e}]{color=text}`:n},k={align:"right",alignPhone:"left"},_t=(t,o,e)=>{const n=i=>xt(i[t],i[o]);return{kind:"block",type:"Text",when:(i,r)=>r!==void 0&&n(r)!=="",box:[[t,"text",(i,r)=>n(r)],[o,"text",(i,r)=>n(r)]],props:e}},lo=(t,o,e,n={})=>_t(t,o,{...ht,...k,...n,_partStyles:{text:{...U,color:"labels",...e,case:U.case,...k}}}),O=(t,o)=>typeof t=="number"&&Number.isInteger(t)&&t>=0?t:_(o)?.selected??0,L="var(--site-surface-2)",y=(t,o)=>_(o)?.themes[O(t.sectionAccent??0,o)],Et=(t,o)=>(e,n)=>{if(!o?.(e,n))return B(t);const i=y(e,n)?.[t];return i?{fillColor:i}:{}},mo=(t,o)=>S(t,o)>=0,K=t=>t.startsWith("#")&&dt(t)!==null,go=(t,o,e)=>{const n=t?.trim();if(n&&K(n))return{fillColor:n};const i=A(n);if(i)return B(i);const r=n===L?y(o,e):void 0;return r?{fillColor:lt(r)}:{}},Po=t=>{const o=t?.trim();return!o||o==="transparent"||o===st||A(o)||o===L||K(o)?void 0:"it paints a colour that no Box Fill can hold"},S=(t,o)=>{const e=_(o)?.themes;return e&&H(t)?at(e,O(t.sectionAccent,o)):-1},ho=(t,o,e)=>{const n=S(o,e);return n>=0?n:t},fo=(t,o)=>{const e=_(o)?.themes,n=e?pt(e,O(t,o)):-1;return n>=0?n:t},uo=(t,o)=>{const e=S(t,o);return e>=0?{sectionAccent:e}:{}},To=(t,o)=>H(t.props)&&S(t.props,o)<0?[{kind:"band-preset",page:O(t.props.sectionAccent,o)}]:[],bo=(t,{view:o="desktop",to:e="px",maxPx:n=1/0}={})=>{const{siteGutter:i,siteGutterUnit:r,siteGutterPhone:c,siteGutterPhoneUnit:p}=t.site??{},l=gt(o),h=(a,u,g)=>{const d=x(u),T=D(a,d,"spacing",g);return T===null?null:s(T,d,"px",l)},f=h(i,r,q)??Z(i),m=o==="desktop"?f:h(c,p,Q)??tt(c)??ot(f);return s(Math.min(n,m),"px",e,l)},Ot=Object.fromEntries(["Top","Right","Bottom","Left","TopPhone","RightPhone","BottomPhone","LeftPhone"].map(t=>[`sectionPadding${t}`,0])),xo=t=>({top:0,right:0,bottom:0,left:0,...t}),_o=(t,o,e,n=[])=>({kind:"group",name:t,keepEmpty:!0,props:(i,r)=>({...C,...Ot,...Et("surface")(i,r),...typeof e=="function"?e(i,r):e}),box:[[o,"bgImage"],N.kind,N.duration,N.delay],parts:n});export{Jt as AUTO_COLUMN,So as BOX,Zt as BUTTON,Bo as DIM,io as DROP_COMMON,ro as DROP_SIDE_PADDING,eo as FOLLOW_THE_BOX,Tt as HEADING_CASE_UPPER,No as INNER_BOX,Ot as NO_PAD,ht as NUMBER_TEXT,k as RIGHT_WORDS,no as SAME_KEYS,oo as SECTION_BOX,to as SH_LINK,Io as TEXT,ho as bandAccent,S as bandIndex,O as bandPage,uo as bandProps,To as bandWrites,Et as fillFrom,Po as fillNoBoxHolds,po as filledChip,ao as headingCaseOf,E as innerPad,co as innerPadKeys,lo as leadLine,_t as leadText,xo as lineSides,xt as numberAndUnit,mo as onBandPreset,go as ownFill,_o as pictureCell,y as sectionPage,bo as siteGutterOf,bt as smallText,fo as surfaceAccent,ut as wrapperPad,so as wrapperPadKeys};
1
+ import{siteLengthHeld as G,storedUnit as x}from"../../../../../format/lib/content/css-length.js";import{SECTION_WIDTH_KEYS as M}from"../../../../../format/lib/content/section-width.js";import{BLOCK_LENGTH_KEYS as C,blockLengthUnitKey as W}from"../../../content/block-size.js";import{viewStoreKeys as F}from"../../../../../format/lib/animation/views.js";import{BOX as Y,INNER_BOX as I,LABEL_FACE as U,TEXT as R,boxPadding as v,fillSlot as B,token as w}from"../../../../../format/lib/document/seed-parts.js";import{ENTRANCE_STORE_KEYS as X,LEGACY_ENTRANCE_KEY as V}from"../../../animation/entrance.js";import{SCROLL_STORE_KEYS as $}from"../../../../../format/lib/animation/scroll.js";import{SECTION_PIN_KEYS as j}from"../../../../../format/lib/content/section-sticky.js";import{SECTION_CORNERS_ROW as z}from"../../../../../format/lib/content/section-corners.js";import{SECTION_BORDER_UNIT_KEYS as J}from"../../../../../format/lib/content/borders.js";import{CARD_HOVER_KEYS as S}from"../../../../../format/lib/animation/hover.js";import{COUNT_KEY_PROP as q}from"../../../../../format/lib/content/block-sources.js";import{SITE_GUTTER as Q,SITE_GUTTER_PHONE as Z,normalizeSiteGutter as tt,normalizeSiteGutterPhone as ot,siteGutterPhoneFollows as et}from"../../../../../format/lib/content/page-width.js";import{BAND_TO_SECTION_PAD as A,bandTopBottom as nt}from"../../../content/section-padding.js";import{ButtonBlockMeta as it}from"../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";import{innerPaddingFallback as rt}from"../../passes/section-padding.js";import{finiteNumber as b}from"../../../../../format/lib/finite-number.js";import{convertTheme as _,hasWords as st}from"../../../sections/section-to-box.js";import{THEME_SECTION_BG as dt}from"../../../../../format/lib/content/section-background.js";import{fillSlotOfInk as k}from"../../../../../format/lib/document/part-inks.js";import{parseHexColor as ct}from"efficient-shell/format";import{convertLength as at}from"efficient-easel/screen/lib/content/length-units";import{bandPresetIndex as pt,surfacePresetIndex as lt,surfaceTwoTone as mt}from"../../../../../format/lib/theme.js";import{VIEW_HIDE_KEYS as gt}from"../../../../../format/lib/content/view-hide-class.js";import{tierOfView as Pt}from"../../../../../format/lib/content/view-tier.js";const s=(t,o,e,n)=>o===e?t:at(t,o,e,n,{min:0,max:200,step:4});import{BOX as Oo,DIM as Bo,INNER_BOX as So,TEXT as No}from"../../../../../format/lib/document/seed-parts.js";const zt={textFit:"line",textFitPhone:"wrap"},ht={...R,[q]:""},{label:Jt,href:qt,...ft}=it.defaultProps,Qt=ft,Zt={buttonFillOpacity:0,buttonBorder:{width:0},buttonPaddingTop:0,buttonPaddingRight:0,buttonPaddingBottom:0,buttonPaddingLeft:0},to={...Y,sectionAccent:0},oo={sectionAccent:-1},eo=["gridSpan","sectionHeightMode","sectionHeightValue","sectionHeightUnit","sectionHeightModeTablet","sectionHeightValueTablet","sectionHeightUnitTablet","sectionHeightModePhone","sectionHeightValuePhone","sectionHeightUnitPhone","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderTablet","sectionBorderPhone","sectionAccent",z.unitKey,...J,...j,"anchor",V,...gt,...X,...$,...F(["widthFit",...C,...C.map(W)]),...Object.values(M)],P="a section width key, ignored since efficient-web-builder 45 (an old key; a section's own width has new keys, lib/content/section-width), so dropping it changes nothing",no={sectionSurface:"read by nothing in src/ (searched 2026-10-24): a retired theme key that draws nothing today, so dropping it changes nothing",widthMode:P,fullWidth:P,pageWidth:P,backgroundWidth:P,contentWidth:P,contentMax:P},io=Object.fromEntries(["sectionPaddingLeft","sectionPaddingRight","sectionPaddingLeftTablet","sectionPaddingRightTablet","sectionPaddingLeftPhone","sectionPaddingRightPhone"].map(t=>[t,"needs Box side padding outside its gutter: the old section added it outside its frame, a Box's side padding replaces the gutter. 0 live nodes store it (JJ's read-only export, 2026-10-24)"]));function ut(t,o){const e=b(t.sectionPaddingTop)??0,n=b(t.sectionPaddingBottom)??0,i=b(t.sectionPaddingTopTablet),r=b(t.sectionPaddingBottomTablet),c=x(t.sectionPaddingUnit),p=x(t.sectionPaddingUnitTablet),l=x(t.sectionPaddingUnitPhone),h=(m,a,u,g)=>{const d=b(m);if(d!==void 0)return d+s(g,"px",l,"mobile");const T=a===void 0?{n:u,unit:c}:{n:a,unit:p};return s(T.n,T.unit,l,"mobile")+s(g,"px",l,"mobile")},f=(m,a,u,g,d)=>a!==void 0?{[m]:a+s(d??g,"px",p,"tablet")}:d===void 0?{}:{[m]:s(u,c,p,"tablet")+s(d,"px",p,"tablet")};return{sectionPaddingTop:e+s(o.top,"px",c,"desktop"),sectionPaddingBottom:n+s(o.bottom,"px",c,"desktop"),...f("sectionPaddingTopTablet",i,e,o.top,o.topTablet),...f("sectionPaddingBottomTablet",r,n,o.bottom,o.bottomTablet),sectionPaddingTopPhone:h(t.sectionPaddingTopPhone,i,e,o.topPhone),sectionPaddingBottomPhone:h(t.sectionPaddingBottomPhone,r,n,o.bottomPhone)}}const ro=t=>[...["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopTablet","sectionPaddingBottomTablet","sectionPaddingTopPhone","sectionPaddingBottomPhone"].map(o=>[o,o,(e,n)=>ut(n,typeof t=="function"?t(n):t)[o]]),["sectionPaddingUnit","sectionPaddingUnit"],["sectionPaddingUnitTablet","sectionPaddingUnitTablet"],["sectionPaddingUnitPhone","sectionPaddingUnitPhone"]];function N(t,o){const e={};for(const[i,r]of A)t[i]!==void 0&&(e[r]=t[i]);const n=nt(t,rt(o));return{...e,sectionPaddingTop:n.top,sectionPaddingBottom:n.bottom}}const so=t=>[...A.map(([o,e])=>[o,e,(n,i)=>N(i,t)[e]]),["sectionPaddingTop","sectionPaddingTop",(o,e)=>N(e,t).sectionPaddingTop],["sectionPaddingBottom","sectionPaddingBottom",(o,e)=>N(e,t).sectionPaddingBottom]],Tt={kind:"heading-case-upper",styles:["heading-1","heading-2","heading-3"]},co=t=>o=>st(o.props[t])?[Tt]:[],bt=(t,o)=>({kind:"text",key:t,role:"eyebrow",props:R,...o?{style:o}:{}}),ao=t=>({kind:"group",name:"Chip",props:{...I,...B("main"),...v(6,14)},parts:[bt(t,{color:"background",...w("label",12),weight:600,letterSpacing:.16})]}),H=t=>t.background!=="transparent",xt=(t,o)=>{const[e,n]=[t,o].map(i=>typeof i=="string"?i.trim():"");return e?n?`[${e} ]{color=text}${n}`:`[${e}]{color=text}`:n},L={align:"right",alignPhone:"left"},_t=(t,o,e)=>{const n=i=>xt(i[t],i[o]);return{kind:"block",type:"Text",when:(i,r)=>r!==void 0&&n(r)!=="",box:[[t,"text",(i,r)=>n(r)],[o,"text",(i,r)=>n(r)]],props:e}},po=(t,o,e,n={})=>_t(t,o,{...ht,...L,...n,_partStyles:{text:{...U,color:"labels",...e,case:U.case,...L}}}),E=(t,o)=>typeof t=="number"&&Number.isInteger(t)&&t>=0?t:_(o)?.selected??0,y="var(--site-surface-2)",K=(t,o)=>_(o)?.themes[E(t.sectionAccent??0,o)],Et=(t,o)=>(e,n)=>{if(!o?.(e,n))return B(t);const i=K(e,n)?.[t];return i?{fillColor:i}:{}},lo=(t,o)=>O(t,o)>=0,D=t=>t.startsWith("#")&&ct(t)!==null,mo=(t,o,e)=>{const n=t?.trim();if(n&&D(n))return{fillColor:n};const i=k(n);if(i)return B(i);const r=n===y?K(o,e):void 0;return r?{fillColor:mt(r)}:{}},go=t=>{const o=t?.trim();return!o||o==="transparent"||o===dt||k(o)||o===y||D(o)?void 0:"it paints a colour that no Box Fill can hold"},O=(t,o)=>{const e=_(o)?.themes;return e&&H(t)?pt(e,E(t.sectionAccent,o)):-1},Po=(t,o,e)=>{const n=O(o,e);return n>=0?n:t},ho=(t,o)=>{const e=_(o)?.themes,n=e?lt(e,E(t,o)):-1;return n>=0?n:t},fo=(t,o)=>{const e=O(t,o);return e>=0?{sectionAccent:e}:{}},uo=(t,o)=>H(t.props)&&O(t.props,o)<0?[{kind:"band-preset",page:E(t.props.sectionAccent,o)}]:[],To=(t,{view:o="desktop",to:e="px",maxPx:n=1/0}={})=>{const{siteGutter:i,siteGutterUnit:r,siteGutterPhone:c,siteGutterPhoneUnit:p}=t.site??{},l=Pt(o),h=(a,u,g)=>{const d=x(u),T=G(a,d,"spacing",g);return T===null?null:s(T,d,"px",l)},f=h(i,r,Q)??tt(i),m=o==="desktop"?f:h(c,p,Z)??ot(c)??et(f);return s(Math.min(n,m),"px",e,l)},Ot=Object.fromEntries(["Top","Right","Bottom","Left","TopPhone","RightPhone","BottomPhone","LeftPhone"].map(t=>[`sectionPadding${t}`,0])),bo=t=>({top:0,right:0,bottom:0,left:0,...t}),xo=(t,o,e,n=[])=>({kind:"group",name:t,keepEmpty:!0,props:(i,r)=>({...I,...Ot,...Et("surface")(i,r),...typeof e=="function"?e(i,r):e}),box:[[o,"bgImage"],S.kind,S.duration,S.delay],parts:n});export{zt as AUTO_COLUMN,Oo as BOX,Qt as BUTTON,Bo as DIM,no as DROP_COMMON,io as DROP_SIDE_PADDING,oo as FOLLOW_THE_BOX,Tt as HEADING_CASE_UPPER,So as INNER_BOX,Ot as NO_PAD,ht as NUMBER_TEXT,L as RIGHT_WORDS,eo as SAME_KEYS,to as SECTION_BOX,Zt as SH_LINK,No as TEXT,Po as bandAccent,O as bandIndex,E as bandPage,fo as bandProps,uo as bandWrites,Et as fillFrom,go as fillNoBoxHolds,ao as filledChip,co as headingCaseOf,N as innerPad,so as innerPadKeys,po as leadLine,_t as leadText,bo as lineSides,xt as numberAndUnit,lo as onBandPreset,mo as ownFill,xo as pictureCell,K as sectionPage,To as siteGutterOf,bt as smallText,ho as surfaceAccent,ut as wrapperPad,ro as wrapperPadKeys};
@@ -1 +1 @@
1
- import{SPLITTABLE_SECTIONS as b}from"../../../../../format/lib/sections/section-head-placement.js";import{SECTION_LABELS as g}from"../../../../../format/lib/document/section-catalog.js";import{SAME_KEYS as B,SECTION_BOX as A,innerPad as R}from"./section-to-box-row-parts.js";import{SITE_SIDE as l}from"efficient-easel/screen/lib/content/length-units";import{EDITORIAL_LINE as C,HEAD_BELOW as S,headLookOf as E,headReads as L,headTree as w}from"./section-head-looks.js";import{finiteNumber as I}from"../../../../../format/lib/finite-number.js";import{CARD_TEMPLATE_SLOT as P}from"../../../../../format/lib/content/card-template.js";import{footprintCardSeed as N}from"../../../../../format/lib/document/blocks/general/Footprint/card-seed.js";import{faqCardSeed as k,faqRunStyleKeys as D}from"../../../../../format/lib/document/blocks/general/FAQ/card-seed.js";import{PROCESS_COLUMNS_SLOT as H,processColumnSeeds as F}from"../../../../../format/lib/document/blocks/general/ProcessSteps/column-seed.js";import{BOX_SIDE_SPACE_PROP as y,BOX_SIDE_SPACE_SITE as j}from"../../../../../format/lib/content/box-side-space.js";import{INNER_BOX as x}from"../../../../../format/lib/document/seed-parts.js";import{SECTION_ACCENT_INHERIT as X}from"../../../../../format/lib/content/section-surface.js";import{ownEntry as c}from"../../../../../format/lib/own-entry.js";const Y=["FAQ","Footprint","LongRead","ProcessSteps","RelatedProducts"],io=["Collections","Events","FitmentTable","GalleryB","ProductGrid","SpecTable"],s=(e,o)=>()=>({top:e,topPhone:o}),_=e=>o=>{const r=R(o,e).sectionPaddingTop;return{top:r,topPhone:r}},M={Collections:s(120,70),Events:s(120,70),FAQ:s(120,70),GalleryB:s(120,70),FitmentTable:s(120,80),SpecTable:s(120,80),LongRead:s(120,80),RelatedProducts:s(0,0),Footprint:_("Footprint"),ProcessSteps:_("ProcessSteps"),ProductGrid:e=>({top:I(e.padTop)??120,topPhone:0})};function Q(e,o={}){const r=c(b,e),n=c(M,e);if(!r||!n)throw new Error(`section-to-box-rows-head: "${e}" has no head row or no head room`);const p=r.padKey,O=w(e),d=L(e),f=r.headRows.filter(t=>![r.num,r.title,r.description,"linkText","linkHref"].includes(t)),a={...Object.fromEntries(f.filter(t=>!(t in d)).map(t=>[t,"a head setting no Header Box part reads (lib/document/blocks/general/section-head-looks `headReads`)"])),...o.drop};return{name:c(g,e)??e,boxProps:(t,i)=>{const m=n(t),h=o.roomBelow?{sectionPaddingBottom:o.roomBelow.bottom,sectionPaddingBottomPhone:o.roomBelow.bottomPhone}:{},T=typeof o.boxProps=="function"?o.boxProps(t,i):o.boxProps??{},u=E(e)==="editorial"?C:{};return{...A,direction:"column",gap:S[E(e)],sectionPaddingTop:m.top,sectionPaddingTopPhone:m.topPhone,...u,...h,...T}},box:[...B,...p?[[p,"sectionPaddingTop",(t,i)=>n(i).top]]:[]],parts:[O,...(()=>{const t={...p?{[p]:0}:{},...o.coreProps},i={kind:"core",keep:"rest",...Object.keys(t).length?{props:t}:{},...o.slots?{slots:o.slots}:{}};return[o.coreBox?{kind:"group",name:o.coreBox.name,props:o.coreBox.props,parts:[i]}:i]})(),...o.partsAfter??[]],...Object.keys(d).length?{reads:d}:{},...Object.keys(a).length?{drop:a}:{},...o.pressHeading?{pressKeepsEmpty:[r.title]}:{},...o.skip?{skip:o.skip}:{}}}const G={...x,direction:"accordion",rowStyle:"numbered"},K={sectionPaddingLeft:l,sectionPaddingRight:l},v={Footprint:{slots:{[P]:[N()]},pressHeading:!0},ProcessSteps:{slots:(e,o)=>o.press?{[H]:F().map(r=>({...r,props:{...r.props,...K}}))}:{},boxProps:{gapPhone:S.editorial}},FAQ:{slots:{[P]:[k()]},pressHeading:!0,coreBox:{name:"Questions",props:G},coreProps:{sectionAccent:X},roomBelow:{bottom:120,bottomPhone:70},boxProps:(e,o)=>o.press?{}:{[y]:j},skip:e=>{const o=e._partStyles??{},r=D().filter(n=>o[n]!==void 0);return r.length?`held: its rows carry their own run style (_partStyles ${r.map(n=>`"${n}"`).join(", ")}), which the Box path does not draw the same`:void 0}}},po=Object.fromEntries(Y.map(e=>[e,Q(e,c(v,e))]));export{G as FAQ_ROWS_BOX,v as HEAD_ONLY_CARD_SEEDS,po as HEAD_ONLY_SECTION_TO_BOX,Y as HEAD_ONLY_TYPES,io as HOST_ROW_HEAD_TYPES,Q as headOnlyRow};
1
+ import{SPLITTABLE_SECTIONS as B}from"../../../../../format/lib/sections/section-head-placement.js";import{SECTION_LABELS as N}from"../../../../../format/lib/document/section-catalog.js";import{SAME_KEYS as R,SECTION_BOX as I}from"./section-to-box-row-parts.js";import{SITE_SIDE as S,sideLengthAt as C}from"efficient-easel/screen/lib/content/length-units";import{EDITORIAL_LINE as L,HEAD_BELOW as f,headLookOf as u,headReads as w,headTree as D}from"./section-head-looks.js";import{finiteNumber as T}from"../../../../../format/lib/finite-number.js";import{CARD_TEMPLATE_SLOT as b}from"../../../../../format/lib/content/card-template.js";import{footprintCardSeed as k}from"../../../../../format/lib/document/blocks/general/Footprint/card-seed.js";import{faqCardSeed as H,faqRunStyleKeys as F}from"../../../../../format/lib/document/blocks/general/FAQ/card-seed.js";import{PROCESS_COLUMNS_SLOT as x,processColumnSeeds as y}from"../../../../../format/lib/document/blocks/general/ProcessSteps/column-seed.js";import{BOX_SIDE_SPACE_PROP as Y,BOX_SIDE_SPACE_SITE as K}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";import{ownEntry as _}from"../../../../../format/lib/own-entry.js";import{BAND_PAD_KEYS as E,BAND_PAD_UNIT_KEY as v,bandTopBottom as M}from"../../../content/section-padding.js";import{SECTION_PAD_INNER as Q,innerPaddingFallback as G}from"../../passes/section-padding.js";import{viewKeyAt as P}from"efficient-easel/draw";const U=["FAQ","Footprint","LongRead","ProcessSteps","RelatedProducts"],So=["Collections","Events","FitmentTable","GalleryB","ProductGrid","SpecTable"],p=(e,o)=>()=>({top:e,topPhone:o}),h=e=>o=>{const t=G(e),s={...o,[E.top]:M(o,t).top},r=d=>{const n=C(s,E,v,d,"top");return n?.unit==="px"?n.value:void 0},m=d=>T(o[P(E.top,d)])===void 0?void 0:r(d),a=m("tablet"),l=m("mobile");return{top:r("desktop")??t.top??0,...a!==void 0?{topTablet:a}:{},...l!==void 0?{topPhone:l}:{}}},W={Collections:p(120,70),Events:p(120,70),FAQ:p(120,70),GalleryB:p(120,70),FitmentTable:p(120,80),SpecTable:p(120,80),LongRead:p(120,80),RelatedProducts:p(0,0),Footprint:h("Footprint"),ProcessSteps:h("ProcessSteps"),ProductGrid:e=>({top:T(e.padTop)??120,topPhone:0})};function $(e,o={}){const t=_(B,e),s=_(W,e);if(!t||!s)throw new Error(`section-to-box-rows-head: "${e}" has no head row or no head room`);const r=t.padKey,m=D(e),a=w(e),l=t.headRows.filter(n=>![t.num,t.title,t.description,"linkText","linkHref"].includes(n)),d={...Object.fromEntries(l.filter(n=>!(n in a)).map(n=>[n,"a head setting no Header Box part reads (lib/document/blocks/general/section-head-looks `headReads`)"])),...o.drop};return{name:_(N,e)??e,boxProps:(n,c)=>{const i=s(n),O=o.roomBelow?{sectionPaddingBottom:o.roomBelow.bottom,sectionPaddingBottomPhone:o.roomBelow.bottomPhone}:{},A=typeof o.boxProps=="function"?o.boxProps(n,c):o.boxProps??{},g=u(e)==="editorial"?L:{};return{...I,direction:"column",gap:f[u(e)],sectionPaddingTop:i.top,...i.topTablet!==void 0?{sectionPaddingTopTablet:i.topTablet}:{},...i.topPhone!==void 0?{sectionPaddingTopPhone:i.topPhone}:{},...g,...O,...A}},box:[...R,...r?[[r,"sectionPaddingTop",(n,c)=>s(c).top]]:[]],parts:[m,...(()=>{const n=r&&Q.has(e)?{[P(r,"tablet")]:0,[P(r,"mobile")]:0}:{},c={...r?{[r]:0}:{},...n,...o.coreProps},i={kind:"core",keep:"rest",...Object.keys(c).length?{props:c}:{},...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(a).length?{reads:a}:{},...Object.keys(d).length?{drop:d}:{},...o.pressHeading?{pressKeepsEmpty:[t.title]}:{},...o.skip?{skip:o.skip}:{}}}const q={...j,direction:"accordion",rowStyle:"numbered"},z={sectionPaddingLeft:S,sectionPaddingRight:S},J={Footprint:{slots:{[b]:[k()]},pressHeading:!0},ProcessSteps:{slots:(e,o)=>o.press?{[x]:y().map(t=>({...t,props:{...t.props,...z}}))}:{},boxProps:{gapPhone:f.editorial}},FAQ:{slots:{[b]:[H()]},pressHeading:!0,coreBox:{name:"Questions",props:q},coreProps:{sectionAccent:X},roomBelow:{bottom:120,bottomPhone:70},boxProps:(e,o)=>o.press?{}:{[Y]:K},skip:e=>{const o=e._partStyles??{},t=F().filter(s=>o[s]!==void 0);return t.length?`held: its rows carry their own run style (_partStyles ${t.map(s=>`"${s}"`).join(", ")}), which the Box path does not draw the same`:void 0}}},fo=Object.fromEntries(U.map(e=>[e,$(e,_(J,e))]));export{q as FAQ_ROWS_BOX,J as HEAD_ONLY_CARD_SEEDS,fo as HEAD_ONLY_SECTION_TO_BOX,U as HEAD_ONLY_TYPES,So as HOST_ROW_HEAD_TYPES,$ as headOnlyRow};
@@ -10,6 +10,8 @@ export declare const HERO_PART_MODE: {
10
10
  export declare function heroPartLabel(part: HeroMediaPart, props: Record<string, unknown>): string;
11
11
  export declare const VIDEO_FILE_LABEL = "Video file";
12
12
  export declare const VIDEO_FILE_PROMPT = "Upload a video file";
13
+ export declare const AV1_FILE_LABEL = "AV1 file";
14
+ export declare const AV1_FILE_PROMPT = "Upload an AV1 file";
13
15
  export declare function forMediaType(type: "image" | "video", fallback: "image" | "video"): {
14
16
  readonly field: "mediaType";
15
17
  readonly is: "video" | "image";
@@ -1 +1 @@
1
- import{withShowWhen as s}from"./show-when.js";import{heroPictureCount as c}from"../../../format/lib/hero-media-layout.js";const f=["media","image","image2"],u={media:"Media",image:"Image",image2:"Image 2"},P={media:"heroMedia",image:"heroImage",image2:"heroImage2"};function l(e,t){return e==="image"&&c(t)>1?"Image 1":u[e]}const I="Video file",O="Upload a video file";function d(e,t){return{field:"mediaType",is:e,default:t}}const g=new Set(["HeroSingle"]),m="heroPart";function h(e,t){return{...t,[m]:e}}function R(e,{parts:t={},onlyFor:i,fallback:p,rules:a}){const n={...e};for(const r of["image","video"])for(const o of i[r])n[o]=s(n[o],d(r,p));for(const[r,o]of Object.entries(a??{}))o&&(n[r]=s(n[r],o));for(const r of f)for(const o of t[r]??[])n[o]=h(r,n[o]);return n}function E(e){const t=e?.[m];return f.includes(t)?t:null}function T(e,t){const i={};for(const[p,a]of Object.entries(e))E(a)===t&&(i[p]=a);return i}function A(e){if(!g.has(e.type))return[];const t=[{part:"media",label:u.media,depth:0}];return(e.props.mediaType??"image")!=="video"&&(t.push({part:"image",label:l("image",e.props),depth:1}),c(e.props)>1&&t.push({part:"image2",label:l("image2",e.props),depth:1})),t}function M(e,t){return`${e}::${t}`}function y(e){if(!e)return null;const t=e.lastIndexOf("::");if(t<=0)return null;const i=e.slice(t+2);return f.includes(i)?{nodeId:e.slice(0,t),part:i}:null}const H="data-sf-hero-part";export{f as HERO_MEDIA_PARTS,u as HERO_MEDIA_PART_LABELS,g as HERO_MEDIA_PART_TYPES,H as HERO_PART_ATTR,P as HERO_PART_MODE,I as VIDEO_FILE_LABEL,O as VIDEO_FILE_PROMPT,E as fieldPartOf,T as fieldsOfPart,d as forMediaType,R as heroMediaFields,A as heroMediaRows,M as heroPartId,l as heroPartLabel,h as inPart,y as readHeroPartId};
1
+ import{withShowWhen as s}from"./show-when.js";import{heroPictureCount as c}from"../../../format/lib/hero-media-layout.js";const f=["media","image","image2"],u={media:"Media",image:"Image",image2:"Image 2"},P={media:"heroMedia",image:"heroImage",image2:"heroImage2"};function l(e,t){return e==="image"&&c(t)>1?"Image 1":u[e]}const I="Video file",A="Upload a video file",O="AV1 file",R="Upload an AV1 file";function m(e,t){return{field:"mediaType",is:e,default:t}}const _=new Set(["HeroSingle"]),d="heroPart";function E(e,t){return{...t,[d]:e}}function T(e,{parts:t={},onlyFor:i,fallback:p,rules:a}){const n={...e};for(const o of["image","video"])for(const r of i[o])n[r]=s(n[r],m(o,p));for(const[o,r]of Object.entries(a??{}))r&&(n[o]=s(n[o],r));for(const o of f)for(const r of t[o]??[])n[r]=E(o,n[r]);return n}function g(e){const t=e?.[d];return f.includes(t)?t:null}function L(e,t){const i={};for(const[p,a]of Object.entries(e))g(a)===t&&(i[p]=a);return i}function M(e){if(!_.has(e.type))return[];const t=[{part:"media",label:u.media,depth:0}];return(e.props.mediaType??"image")!=="video"&&(t.push({part:"image",label:l("image",e.props),depth:1}),c(e.props)>1&&t.push({part:"image2",label:l("image2",e.props),depth:1})),t}function y(e,t){return`${e}::${t}`}function H(e){if(!e)return null;const t=e.lastIndexOf("::");if(t<=0)return null;const i=e.slice(t+2);return f.includes(i)?{nodeId:e.slice(0,t),part:i}:null}const V="data-sf-hero-part";export{O as AV1_FILE_LABEL,R as AV1_FILE_PROMPT,f as HERO_MEDIA_PARTS,u as HERO_MEDIA_PART_LABELS,_ as HERO_MEDIA_PART_TYPES,V as HERO_PART_ATTR,P as HERO_PART_MODE,I as VIDEO_FILE_LABEL,A as VIDEO_FILE_PROMPT,g as fieldPartOf,L as fieldsOfPart,m as forMediaType,T as heroMediaFields,M as heroMediaRows,y as heroPartId,l as heroPartLabel,E as inPart,H as readHeroPartId};
@@ -4,6 +4,10 @@ export declare const SECTION_PAD_INNER_DEFAULTS: Record<string, {
4
4
  bottom: number;
5
5
  }>;
6
6
  export declare const SECTION_PAD_INNER: Set<string>;
7
+ export declare const innerPaddingFallback: (type: string) => {
8
+ top?: number;
9
+ bottom?: number;
10
+ };
7
11
  export declare const PAD_ON_ROOT: ReadonlySet<string>;
8
12
  export declare const PADS_ITS_OWN_SPACE: ReadonlySet<string>;
9
13
  export declare const sectionPadding: BlockPass;
@@ -1 +1 @@
1
- import{jsx as S}from"react/jsx-runtime";import{HideTaker as m}from"../../../components/ViewHideRoot.js";import{isBackgroundBox as _}from"../../../../format/lib/content/box-background.js";import{boxSideSpaceOf as u}from"../../../../format/lib/content/box-side-space.js";import{SECTION_PAD_KEYS as p,padValuesOf as T,resolveSectionPadding as g,sectionPadAttrs as I}from"../../content/section-padding.js";import{sectionFillPassClass as E}from"../../../../format/lib/content/section-min-height.js";import{COPIES_IN_THE_BOX as b,drawsCopiesInTheBox as O}from"../../../../format/lib/content/copies-in-box.js";import{ownEntry as x}from"../../../../format/lib/own-entry.js";const l={ParagraphsA:{top:60,bottom:80},StatsParagraph:{top:120,bottom:120},Timeline:{top:120,bottom:120},Footprint:{top:120,bottom:120},TimelineTrack:{top:120,bottom:120},TitleWithButtons:{top:140,bottom:140},ProcessSteps:{top:120,bottom:120},DetailRows:{top:100,bottom:100}},c=new Set(Object.keys(l)),f=new Set(["Flex","Text","Heading","ImageBlock"]),N=new Set(["Divider"]),h=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),P=new Set(["ProductGrid"]);function s(e,t,o=!1){const i=e.render;e.render=n=>{if(t?.(n))return i(n);const r=I({...T(n,p,o),sideSpace:u(n.sideSpace)}),a=i(n),d=E(n);return r?S(m,{className:d?`${r.className} ${d}`:r.className,style:r.style,children:a}):a}}const j={name:"sectionPadding",applies:(e,t,o)=>t.isSection(e)&&!h.has(e)&&!!o&&typeof o.render=="function",panel(e,t,o){c.has(t)||P.has(t)||(e.fields={...e.fields,...o.sidesPaddingFields({tablet:!0,siteSide:!0})})},draw(e,t){if(c.has(t)){const o=e.render,i=x(l,t);e.render=n=>{const r=g(n,i);return o({...n,padTop:r.top,padBottom:r.bottom})};return}if(P.has(t)){s(e);return}f.has(t)||N.has(t)||s(e,t==="Flex"?o=>_(o.bgImage):b.has(t)?o=>O(t,o):void 0,!0)}},A=["Heading","Text","ImageBlock"],B=["LogoBlock"],K={name:"blockPadding",applies:(e,t,o)=>(A.includes(e)||B.includes(e))&&!!o&&typeof o.render=="function",panel(e,t,o){e.fields={...e.fields,...o.sidesPaddingFields({tablet:!0,siteSide:!0})}},draw(e,t){f.has(t)||s(e,void 0,!0)}};export{N as PADS_ITS_OWN_SPACE,f as PAD_ON_ROOT,c as SECTION_PAD_INNER,l as SECTION_PAD_INNER_DEFAULTS,K as blockPadding,j as sectionPadding};
1
+ import{jsx as u}from"react/jsx-runtime";import{HideTaker as m}from"../../../components/ViewHideRoot.js";import{isBackgroundBox as p}from"../../../../format/lib/content/box-background.js";import{boxSideSpaceOf as T}from"../../../../format/lib/content/box-side-space.js";import{BAND_PAD_KEYS as I,BAND_PAD_UNIT_KEY as g,SECTION_PAD_KEYS as b,padValuesOf as A,resolveSectionPadding as D,sectionPadAttrs as E}from"../../content/section-padding.js";import{sectionFillPassClass as N}from"../../../../format/lib/content/section-min-height.js";import{COPIES_IN_THE_BOX as h,drawsCopiesInTheBox as O}from"../../../../format/lib/content/copies-in-box.js";import{ownEntry as x}from"../../../../format/lib/own-entry.js";const c={ParagraphsA:{top:60,bottom:80},StatsParagraph:{top:120,bottom:120},Timeline:{top:120,bottom:120},Footprint:{top:120,bottom:120},TimelineTrack:{top:120,bottom:120},TitleWithButtons:{top:140,bottom:140},ProcessSteps:{top:120,bottom:120},DetailRows:{top:100,bottom:100}},f=new Set(Object.keys(c)),P=e=>x(c,e)??{},r=new Set(["DetailRows"]),_=new Set(["Flex","Text","Heading","ImageBlock"]),B=new Set(["Divider"]),w=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),S=new Set(["ProductGrid"]);function a(e,t,o=!1){const s=e.render;e.render=n=>{if(t?.(n))return s(n);const i=E({...A(n,b,o),sideSpace:T(n.sideSpace)}),d=s(n),l=N(n);return i?u(m,{className:l?`${i.className} ${l}`:i.className,style:i.style,children:d}):d}}const v={name:"sectionPadding",applies:(e,t,o)=>t.isSection(e)&&!w.has(e)&&!!o&&typeof o.render=="function",panel(e,t,o){if(f.has(t)&&!r.has(t)){e.fields={...e.fields,...o.sidesPaddingFields({keys:I,unitKey:g,fallback:P(t),tablet:!0,siteSide:!0})};return}r.has(t)||S.has(t)||(e.fields={...e.fields,...o.sidesPaddingFields({tablet:!0,siteSide:!0})})},draw(e,t){if(!(f.has(t)&&!r.has(t))){if(r.has(t)){const o=e.render,s=P(t);e.render=n=>{const i=D(n,s);return o({...n,padTop:i.top,padBottom:i.bottom})};return}if(S.has(t)){a(e);return}_.has(t)||B.has(t)||a(e,t==="Flex"?o=>p(o.bgImage):h.has(t)?o=>O(t,o):void 0,!0)}}},C=["Heading","Text","ImageBlock"],R=["LogoBlock"],V={name:"blockPadding",applies:(e,t,o)=>(C.includes(e)||R.includes(e))&&!!o&&typeof o.render=="function",panel(e,t,o){e.fields={...e.fields,...o.sidesPaddingFields({tablet:!0,siteSide:!0})}},draw(e,t){_.has(t)||a(e,void 0,!0)}};export{B as PADS_ITS_OWN_SPACE,_ as PAD_ON_ROOT,f as SECTION_PAD_INNER,c as SECTION_PAD_INNER_DEFAULTS,V as blockPadding,P as innerPaddingFallback,v as sectionPadding};
@@ -6,3 +6,18 @@ export declare function absolutizeApiUrl(url: string | null | undefined): string
6
6
  export declare function isExternalMediaUrl(src: string): boolean;
7
7
  export declare function resolveMedia(src?: string): string | undefined;
8
8
  export declare function hasAv1Variant(src?: string): boolean;
9
+ export interface VideoFileSource {
10
+ src: string;
11
+ type: string;
12
+ }
13
+ export declare function videoSources(video?: string, av1?: string): VideoFileSource[];
14
+ export interface ViewVideoFiles {
15
+ video?: string;
16
+ av1?: string;
17
+ videoPhone?: string;
18
+ av1Phone?: string;
19
+ }
20
+ export declare function videoForView(files: ViewVideoFiles, phone: boolean): {
21
+ video?: string;
22
+ av1?: string;
23
+ };
@@ -1 +1 @@
1
- import{currentEaselSession as o}from"efficient-easel/screen/lib/session";const n=process.env.NEXT_PUBLIC_MEDIA_URL?.replace(/\/+$/,"");function i(e){const t=o().hostBackend?.media.resolve;if(!(!t||t===d))return t(e)??e}function s(e){return/^(?:https?:)?\/\//i.test(e)||/^(?:data|blob):/i.test(e)}function u(e){return i(e)??r(e)}function r(e){return!n||s(e)?e:n+e.replace(/^\/media/,"")}const d=e=>r(e),f=process.env.NEXT_PUBLIC_API_URL??"";function p(e){if(!e)return null;const t=i(e);return t!==void 0?t:e.startsWith("/")?`${f}${e}`:e}function l(e){return/^https?:\/\//i.test(e)&&!(n&&e.startsWith(n+"/"))}function x(e){if(!e)return;const t=i(e);return t!==void 0?t:e.startsWith("/media/")?u(e):e}const a="/videos/products/";function E(e){return!!e&&e.includes(a)}export{p as absolutizeApiUrl,r as efficientMedia,d as efficientMediaResolve,E as hasAv1Variant,s as isAbsoluteUrl,l as isExternalMediaUrl,u as media,x as resolveMedia};
1
+ import{currentEaselSession as s}from"efficient-easel/screen/lib/session";const n=process.env.NEXT_PUBLIC_MEDIA_URL?.replace(/\/+$/,"");function r(e){const t=s().hostBackend?.media.resolve;if(!(!t||t===c))return t(e)??e}function u(e){return/^(?:https?:)?\/\//i.test(e)||/^(?:data|blob):/i.test(e)}function d(e){return r(e)??i(e)}function i(e){return!n||u(e)?e:n+e.replace(/^\/media/,"")}const c=e=>i(e),a=process.env.NEXT_PUBLIC_API_URL??"";function E(e){if(!e)return null;const t=r(e);return t!==void 0?t:e.startsWith("/")?`${a}${e}`:e}function _(e){return/^https?:\/\//i.test(e)&&!(n&&e.startsWith(n+"/"))}function h(e){if(!e)return;const t=r(e);return t!==void 0?t:e.startsWith("/media/")?d(e):e}const f="/videos/products/";function p(e){return!!e&&e.includes(f)}const v='video/mp4; codecs="av01.0.08M.10"';function l(e,t){if(!e)return[];const o=t||(p(e)?e.replace(/\.mp4$/,".av1.mp4"):"");return[...o?[{src:o,type:v}]:[],{src:e,type:"video/mp4"}]}function m(e,t){return t&&e.videoPhone?{video:e.videoPhone,av1:e.av1Phone}:{video:e.video,av1:e.av1}}export{E as absolutizeApiUrl,i as efficientMedia,c as efficientMediaResolve,p as hasAv1Variant,u as isAbsoluteUrl,_ as isExternalMediaUrl,d as media,h as resolveMedia,m as videoForView,l as videoSources};
@@ -168,6 +168,7 @@ export declare function sectionBoxIdOf(oldId: string, piece: number): string;
168
168
  export declare function registerBoxNativeSections(types: Readonly<Record<string, string>>): void;
169
169
  export declare function boxNativeReason(type: string): string | undefined;
170
170
  export declare const SECTION_TO_BOX_ON: readonly string[];
171
+ export declare const HOST_PRESS_BLOCKS: Readonly<Record<string, readonly string[]>>;
171
172
  export declare const HOST_PRESS_TYPES: readonly string[];
172
173
  export declare const SECTION_TO_BOX_PRESS: readonly string[];
173
174
  export declare function registerSectionToBox(rows: Readonly<Record<string, SectionToBoxRow>>): void;
@@ -1 +1 @@
1
- import{readHidable as Z}from"efficient-easel/draw";import{BOX_TYPE as ee,CONTAINER_BLOCKS_SLOT as te}from"../../../format/lib/document/container-blocks.js";import{headingTextSeed as oe,labelTextSeed as ne}from"../../../format/lib/document/text-seeds.js";import{SPLITTABLE_SECTIONS as se,parseSectionHeadPlacement as re}from"../../../format/lib/sections/section-head-placement.js";import{accentItalicRuns as ie}from"../../../format/lib/markup.js";import{seedNodes as ae}from"../../../format/lib/document/seed-parts.js";import{bucketByGroup as ce}from"../../../format/lib/locations-grid.js";import{normalizeTheme as z}from"../../../format/lib/theme.js";import{hasOwnEntry as R,ownEntry as v}from"../../../format/lib/own-entry.js";const E=ee,_=te;function Ie(t){if(t.theme)return z(t.theme);const o=t.site?.themePresets;return o?z({selected:t.site?.selectedPreset??0,themes:[...o]}):void 0}function de(t,o){return o===0?`${t}~box`:`${t}~box-${o+1}`}const C={Flex:"the Box itself",Hero:"its slides hold Boxes of real blocks (Hero › Slide › Box), and its Scrolling Bar is a Box in its strip slot (Hero › Box)",Divider:"one block with no text, picture or button",CustomHTML:"the HTML box is the whole section; it has no parts"};function Ne(t){for(const[o,s]of Object.entries(t)){if(R(C,o)&&v(C,o)!==s)throw new Error(`lib/sections/section-to-box: "${o}" is already Box-native`);C[o]=s}}function Ae(t){return v(C,t)}const Y=new Set(["id"]),T={},M=[],fe=["ProductGrid","Events","Collections","GalleryB","ContactRouting","ReviewForm","AppointmentBooking","Reviews","CheckoutCTA","AlloyWheelsListing","SpecTable"],le=["Breadcrumb","DocBody","Form","SubmitBuild","Footprint","FAQ","ProcessSteps",...fe,"Stats","Logos","PaymentBadges","PaymentLogosBlock","FitmentFinder","DocMasthead","DocTabs","Timeline","TimelineTrack","OrderSummary","Chart","Mockup","Countdown","FeaturedCover","SectionHeader","TitleWithButtons","Prose","ParagraphsA","Banner","Cards"];function Re(t){for(const[o,s]of Object.entries(t)){if(R(T,o)&&v(T,o)!==s)throw new Error(`lib/sections/section-to-box: "${o}" already has a row`);T[o]=s}}function Ce(t){return v(T,t)}function He(){return Object.keys(T)}function pe(t){return R(T,t)&&M.includes(t)}function Le(t,o=le){return R(T,t)&&(o.includes(t)||pe(t))}function Fe(t){const o=v(se,t);if(!o)throw new Error(`lib/sections/section-to-box: "${t}" has no head row in SPLITTABLE_SECTIONS`);const s=[{kind:"text",key:o.num,role:"eyebrow"},{kind:"text",key:o.title,role:"heading"}];return o.description&&s.push({kind:"text",key:o.description,role:"body"}),o.headRows.includes("linkText")&&o.headRows.includes("linkHref")&&s.push({kind:"button",key:"linkText",href:"linkHref"}),s}const W=t=>Z(t),Me=t=>W(t).text.trim()!=="";function ue(t){if(t.includes("=="))return t;const o=t.indexOf("/"),s=o===-1?t:t.slice(0,o),r=s.trim();if(!r)return t;const c=s.indexOf(r);return`${s.slice(0,c)}==${r}==${s.slice(c+r.length)}${o===-1?"":t.slice(o)}`}const he=t=>t==="heading"?oe():t==="eyebrow"?ne():{};function ye(t,o,s,r){const a={...t._partStyles?.text??{},...o??{},...s??{}};return(r==="center"||r==="right")&&a.align===void 0&&(a.align=r),Object.keys(a).length?{_partStyles:{text:a}}:{}}function me(t,o){if(t===void 0)return{};if(typeof t=="string")return{variant:t};const s=o[t.key];return{variant:(typeof s=="string"?v(t.map,s):void 0)??t.fallback}}function V(t,o,s,r,c={}){const a={...o};for(const u of t){const[m,S,j]=typeof u=="string"?[u,u,void 0]:u;if(s[m]===void 0)continue;const I=j?j(s[m],s,c):s[m];I===void 0?delete a[S]:a[S]=I,r(m,S,I===void 0)}return a}function ke(t){const o=new Set([...Y,"headPlacement","_partStyles",...Object.keys(t.drop??{}),...Object.keys(t.reads??{})]),s=c=>{for(const a of c??[])o.add(typeof a=="string"?a:a[0])},r=c=>{for(const a of c)switch(a.kind){case"text":case"image":o.add(a.key),a.kind==="image"&&a.alt&&o.add(a.alt);break;case"button":o.add(a.key),o.add(a.href),typeof a.variant=="object"&&o.add(a.variant.key);break;case"list":o.add(a.key);break;case"group":case"block":s(a.box),r(a.parts??[]);break;case"core":if(a.keep!=="rest"&&a.keep.forEach(u=>o.add(u)),Object.keys(a.rename??{}).forEach(u=>o.add(u)),a.derive?.reads.forEach(u=>o.add(u)),typeof a.slots!="function")for(const u of Object.values(a.slots??{}))for(const m of u)"kind"in m&&o.add(m.key);break}};for(const c of[t,...t.also??[]])s(c.box),r(c.parts);return o}const be=t=>re(t.headPlacement)==="own-box";function ge(t){return be(t)?"its head sits in a Box of its own above it (own-box): the row draws the head inline":void 0}function xe(t,o){const s=t[o];return Array.isArray(s)&&s.some(c=>!!c&&typeof c=="object"&&typeof c.type=="string")?"already on the Box path: its items draw from a filled card template":void 0}function we(t){const o=new Set,s=r=>{for(const c of r)if(c.kind==="group"||c.kind==="block")s(c.parts??[]);else if(c.kind==="core"&&c.slots&&typeof c.slots!="function")for(const[a,u]of Object.entries(c.slots))u.length>0&&u.every(m=>!("kind"in m))&&o.add(a)};for(const r of[t,...t.also??[]])s(r.parts);return[...o]}function $e(t,o,s){if(!s.press)for(const r of we(t)){const c=xe(o,r);if(c!==void 0)return c}}function Q(t,o,s={}){const r=t.props,c=(o.ownBoxConverts?void 0:ge(r))??$e(o,r,s)??o.skip?.(r);if(c!==void 0)return{node:t,nodes:[t],carried:[],dropped:[],siteWrites:[],skipped:c};const a=String(r.id??t.type),u=[],m=[],S=new Set,j=(n,i)=>{u.push({key:n,home:i}),S.add(n)},I=r._partStyles??{},H=ke(o);let X=0;const w=(n,i)=>({type:n,props:{...i,id:`${a}~${n}-${++X}`}}),K=(n,i,b,y,g,l,$)=>{if(g){for(const d of n??[]){const h=typeof d=="string"?d:d[0];b[h]!==void 0&&$(h,`nothing — the ${y} has no parts, so it is not drawn`)}return}const e=typeof i=="function"?i(r,s):i??{};return V(n??[],e,b,(d,h,f)=>$(d,f?`nothing — the old value draws nothing (${y}: no ${h})`:`${l}${y}: ${h}`),s)},q=n=>ae(n,i=>`${a}~${i}-${++X}`),D=(n,i,b)=>{const y=n.of?n.of(i):Array.isArray(i[n.key])?i[n.key]:[],g=typeof n.props=="function"?n.props(r,s):n.props??{},l=y.map((f,x)=>{const p=f??{},k=n.item?.(p,x,r)??{},B=N(k.reverse?[...n.parts].reverse():n.parts,p,!1,`item ${x+1}: `);return n.flat?k.props?B.map(P=>({...P,props:{...P.props,...k.props,id:P.props.id}})):B:[w(E,{name:`${n.name} ${x+1}`,...g,...k.props??{},[_]:B})]});if(n.groups){const f=n.groups;return b(n.key,y.length?`one Box per item (${y.length}), in a Box per group`:"nothing — the list is empty"),ce(y.map(x=>x??{}),f.of,f.of).map((x,p)=>{const k=x.items.map(O=>O.item),B=f.parts?N(f.parts,f.head?.(k,r)??{},!1,`group ${p+1}: `):[],P=x.items.map(O=>l[O.index]),L=f.perRow?.(k.length,r),A=Number.isInteger(L)&&L>=1?L:1,F=[];if(f.perRow&&A<P.length)for(let O=0;O*A<P.length;O++)F.push(P.slice(O*A,(O+1)*A).flat());return w(E,{name:`${f.name} ${p+1}`,...f.props??{},[_]:[...B,w(E,{name:`${f.itemsName} ${p+1}`,...f.itemsProps?.(k.length,r)??{},[_]:F.length?F.map((O,U)=>w(E,{name:`${f.rowName??`${f.itemsName} row`} ${U+1}`,...f.rowProps??{},[_]:O})):P.flat()})]})})}const $=n.perRow?.(r),e=n.perRow?Number.isInteger($)&&$>=1?$:1:0;if(b(n.key,(y.length?n.flat?`each item's parts (${y.length} items), in order`:`one Box per item (${y.length}), its parts inside`:"nothing — the list is empty")+(e&&y.length?`, in rows of ${e}`:"")),!e)return l.flat();const d=typeof n.rowProps=="function"?n.rowProps(r,s):n.rowProps??{},h=[];for(let f=0;f*e<l.length;f++){const x=l.slice(f*e,(f+1)*e).flat(),p=n.rowFiller?e-l.slice(f*e,(f+1)*e).length:0;h.push(w(E,{name:`${n.rowName??`${n.name} row`} ${f+1}`,...d,[_]:[...x,...Array.from({length:p},(k,B)=>w(E,{name:`Empty ${B+1}`,...n.rowFiller,[_]:[]}))]}))}return h},N=(n,i,b,y)=>{const g=[],l=(e,d)=>b?j(e,d):void 0,$=e=>b?I[e]:void 0;for(const e of n)if(!(e.when&&!e.when(r,b?void 0:i)))switch(e.kind){case"text":{const d=W(i[e.key]);if(!d.text.trim()&&!(b&&s.press&&o.pressKeepsEmpty?.includes(e.key))){l(e.key,"nothing — empty words draw nothing, so no block");break}const h=he(e.role??"body"),{_partStyles:f,...x}=h,p=ye(h,e.styleFrom?{...e.style,...e.styleFrom(r,s)}:e.style,$(e.key),e.props?.align);g.push(w("Text",{text:e.mark==="accentLead"?ue(d.text):e.mark==="accentItalic"?ie(d.text):d.text,...x,...e.props??{},...p,...d.hidden?{_hidden:!0}:{}})),l(e.key,`${y}Text block: its words${d.hidden?", hidden":""}`);break}case"button":{const d=W(i[e.key]);if(!d.text.trim()){l(e.key,"nothing — no words, no button"),l(e.href,"nothing — no button to link"),typeof e.variant=="object"&&l(e.variant.key,"nothing — no button to style");break}const h=typeof i[e.href]=="string"&&i[e.href]?i[e.href]:"#",f={...e.style??{},...$(e.key)??{}};g.push(w("ButtonBlock",{label:d.text,href:h,...typeof e.props=="function"?e.props(i,s):e.props??{},...me(e.variant,i),...Object.keys(f).length?{_partStyles:{label:f}}:{},...d.hidden?{_hidden:!0}:{}})),l(e.key,`${y}Button block: its words`),l(e.href,`${y}Button block: its link`),typeof e.variant=="object"&&l(e.variant.key,`${y}Button block: its Style`);break}case"image":{const d=i[e.key];if(typeof d!="string"||!d){l(e.key,"nothing — no picture, no block"),e.alt&&l(e.alt,"nothing — no picture to describe");break}const h=e.alt&&typeof i[e.alt]=="string"?i[e.alt]:"";g.push(w("ImageBlock",{src:d,alt:h,...e.props??{}})),l(e.key,`${y}Image block: its picture`),e.alt&&l(e.alt,`${y}Image block: its alt text`);break}case"list":{g.push(...D(e,i,l));break}case"group":{const d=N(e.parts,i,b,y),h=K(e.box,e.props,i,`${e.name} Box`,!d.length&&!e.keepEmpty,y,l);h&&g.push(w(E,{name:e.name,...h,[_]:d}));break}case"block":{const d=e.parts?N(e.parts,i,b,y):[],h=K(e.box,e.props,i,`${e.type} block`,!!e.parts&&!d.length&&!e.keepEmpty,y,l);h&&g.push(w(e.type,{...h,...e.slot?{[e.slot]:d}:{}}));break}case"core":{const d=e.as??t.type,h={...e.headless?{}:{headPlacement:"own-box"},...e.props??{}},f=e.keep==="rest"?Object.keys(i).filter(p=>!H.has(p)&&!(p in h)):e.keep;for(const p of f)i[p]!==void 0&&(h[p]=i[p],l(p,`the ${d} block inside the Box`));if(e.keep==="rest"){for(const k of Object.keys(e.props??{}))i[k]!==void 0&&!H.has(k)&&l(k,`nothing — the ${d} block inside the Box has the row's own value`);i.headPlacement!==void 0&&l("headPlacement",`the ${d} block inside the Box: own-box`);const p=Object.fromEntries(Object.entries(I).filter(([k])=>!H.has(k)));Object.keys(p).length&&(h._partStyles=p)}for(const[p,k]of Object.entries(e.rename??{}))i[p]!==void 0&&(h[k]=i[p],l(p,`the ${d} block inside the Box: ${k}`));if(e.derive){Object.assign(h,e.derive.props(i,s));for(const p of e.derive.reads)i[p]!==void 0&&l(p,`the ${d} block inside the Box`)}const x=typeof e.slots=="function"?e.slots(i,s):e.slots??{};for(const[p,k]of Object.entries(x))h[p]=k.flatMap(B=>"kind"in B?D(B,i,l):q([B]));g.push(w(d,h));break}}return g},J=(n,i)=>{const b=i===0?"Box":`${n.name} Box`,y=N(n.parts,r,!0,i===0?"":`${b}: `),g=typeof n.boxProps=="function"?n.boxProps(r,s):n.boxProps??{},l=V(n.box??[],g,r,($,e,d)=>j($,d?`nothing — the old value draws nothing (${b}: no ${e})`:`${b}: ${e}`),s);return{type:E,props:{name:n.name,...l,[_]:y,id:de(a,i)}}},G=[o,...o.also??[]].map(J);r._partStyles!==void 0&&j("_partStyles","each old part's style moved to its new part");for(const[n,i]of Object.entries(o.reads??{}))r[n]!==void 0&&j(n,i);for(const[n,i]of Object.entries(o.drop??{}))n in r&&(m.push({key:n,why:i}),S.add(n));for(const n of Object.keys(r))Y.has(n)||S.has(n)||m.push({key:n,why:"not in the row — not carried"});return{node:G[0],nodes:G,carried:u,dropped:m,siteWrites:[...o.site?.(t,s)??[]]}}function We(t,o=M,s={}){const r=t.content;if(!Array.isArray(r))return t;let c=!1;const a=r.flatMap(u=>{const m=u&&typeof u.type=="string"&&o.includes(u.type)?v(T,u.type):void 0;if(!m)return[u];const S=Q(u,m,s);return S.skipped!==void 0?[u]:(c=!0,S.nodes)});return c?{...t,content:a}:t}function Xe(t,o=M,s={}){if(!Array.isArray(t))return[];const r=[];return t.forEach((c,a)=>{const u=c&&typeof c.type=="string"&&o.includes(c.type)?v(T,c.type):void 0;if(!u)return;const m=Q(c,u,s);m.skipped===void 0&&r.push({index:a,node:m.node,nodes:m.nodes})}),r}export{fe as HOST_PRESS_TYPES,_ as SECTION_BOX_SLOT,E as SECTION_BOX_TYPE,M as SECTION_TO_BOX_ON,le as SECTION_TO_BOX_PRESS,Ae as boxNativeReason,Q as convertSection,We as convertSectionsInPage,Ie as convertTheme,pe as convertsToBox,xe as filledTemplateHold,Me as hasWords,be as headInOwnBox,Fe as headParts,ge as ownBoxHold,Le as pressesAsBox,Ne as registerBoxNativeSections,Re as registerSectionToBox,de as sectionBoxIdOf,Xe as sectionToBoxEdits,Ce as sectionToBoxRow,He as sectionToBoxTypes};
1
+ import{readHidable as Z}from"efficient-easel/draw";import{BOX_TYPE as ee,CONTAINER_BLOCKS_SLOT as te}from"../../../format/lib/document/container-blocks.js";import{headingTextSeed as oe,labelTextSeed as ne}from"../../../format/lib/document/text-seeds.js";import{SPLITTABLE_SECTIONS as se,parseSectionHeadPlacement as re}from"../../../format/lib/sections/section-head-placement.js";import{accentItalicRuns as ie}from"../../../format/lib/markup.js";import{seedNodes as ce}from"../../../format/lib/document/seed-parts.js";import{bucketByGroup as ae}from"../../../format/lib/locations-grid.js";import{normalizeTheme as z}from"../../../format/lib/theme.js";import{hasOwnEntry as R,ownEntry as E}from"../../../format/lib/own-entry.js";const v=ee,_=te;function Ie(t){if(t.theme)return z(t.theme);const o=t.site?.themePresets;return o?z({selected:t.site?.selectedPreset??0,themes:[...o]}):void 0}function de(t,o){return o===0?`${t}~box`:`${t}~box-${o+1}`}const A={Flex:"the Box itself",Hero:"its slides hold Boxes of real blocks (Hero › Slide › Box), and its Scrolling Bar is a Box in its strip slot (Hero › Box)",Divider:"one block with no text, picture or button",CustomHTML:"the HTML box is the whole section; it has no parts"};function Ne(t){for(const[o,s]of Object.entries(t)){if(R(A,o)&&E(A,o)!==s)throw new Error(`lib/sections/section-to-box: "${o}" is already Box-native`);A[o]=s}}function Re(t){return E(A,t)}const Y=new Set(["id"]),P={},W=[],fe={ProductGrid:["ProductColour","ProductEyebrow","ProductName","ProductPicture","ProductPrice","ProductRef","ProductSpecs"],Events:[],Collections:["CollectionCard"],GalleryB:["GalleryItem"],ContactRouting:[],ReviewForm:[],AppointmentBooking:["BookingBox"],Reviews:["RatingBlock"],CheckoutCTA:[],AlloyWheelsListing:["ProductBuy","ProductColour","ProductEyebrow","ProductName","ProductPicture","ProductPrice","ProductSpecs"],SpecTable:["EuTyreLabelBlock","WheelDiagram"]},le=Object.keys(fe),pe=["Breadcrumb","DocBody","Form","SubmitBuild","Footprint","FAQ","ProcessSteps",...le,"Stats","Logos","PaymentBadges","PaymentLogosBlock","FitmentFinder","DocMasthead","DocTabs","Timeline","TimelineTrack","OrderSummary","Chart","Mockup","Countdown","FeaturedCover","SectionHeader","TitleWithButtons","Prose","ParagraphsA","Banner","Cards"];function Ae(t){for(const[o,s]of Object.entries(t)){if(R(P,o)&&E(P,o)!==s)throw new Error(`lib/sections/section-to-box: "${o}" already has a row`);P[o]=s}}function Le(t){return E(P,t)}function He(){return Object.keys(P)}function ue(t){return R(P,t)&&W.includes(t)}function Fe(t,o=pe){return R(P,t)&&(o.includes(t)||ue(t))}function We(t){const o=E(se,t);if(!o)throw new Error(`lib/sections/section-to-box: "${t}" has no head row in SPLITTABLE_SECTIONS`);const s=[{kind:"text",key:o.num,role:"eyebrow"},{kind:"text",key:o.title,role:"heading"}];return o.description&&s.push({kind:"text",key:o.description,role:"body"}),o.headRows.includes("linkText")&&o.headRows.includes("linkHref")&&s.push({kind:"button",key:"linkText",href:"linkHref"}),s}const K=t=>Z(t),Ke=t=>K(t).text.trim()!=="";function he(t){if(t.includes("=="))return t;const o=t.indexOf("/"),s=o===-1?t:t.slice(0,o),r=s.trim();if(!r)return t;const a=s.indexOf(r);return`${s.slice(0,a)}==${r}==${s.slice(a+r.length)}${o===-1?"":t.slice(o)}`}const ye=t=>t==="heading"?oe():t==="eyebrow"?ne():{};function me(t,o,s,r){const c={...t._partStyles?.text??{},...o??{},...s??{}};return(r==="center"||r==="right")&&c.align===void 0&&(c.align=r),Object.keys(c).length?{_partStyles:{text:c}}:{}}function ke(t,o){if(t===void 0)return{};if(typeof t=="string")return{variant:t};const s=o[t.key];return{variant:(typeof s=="string"?E(t.map,s):void 0)??t.fallback}}function V(t,o,s,r,a={}){const c={...o};for(const u of t){const[m,$,j]=typeof u=="string"?[u,u,void 0]:u;if(s[m]===void 0)continue;const C=j?j(s[m],s,a):s[m];C===void 0?delete c[$]:c[$]=C,r(m,$,C===void 0)}return c}function be(t){const o=new Set([...Y,"headPlacement","_partStyles",...Object.keys(t.drop??{}),...Object.keys(t.reads??{})]),s=a=>{for(const c of a??[])o.add(typeof c=="string"?c:c[0])},r=a=>{for(const c of a)switch(c.kind){case"text":case"image":o.add(c.key),c.kind==="image"&&c.alt&&o.add(c.alt);break;case"button":o.add(c.key),o.add(c.href),typeof c.variant=="object"&&o.add(c.variant.key);break;case"list":o.add(c.key);break;case"group":case"block":s(c.box),r(c.parts??[]);break;case"core":if(c.keep!=="rest"&&c.keep.forEach(u=>o.add(u)),Object.keys(c.rename??{}).forEach(u=>o.add(u)),c.derive?.reads.forEach(u=>o.add(u)),typeof c.slots!="function")for(const u of Object.values(c.slots??{}))for(const m of u)"kind"in m&&o.add(m.key);break}};for(const a of[t,...t.also??[]])s(a.box),r(a.parts);return o}const ge=t=>re(t.headPlacement)==="own-box";function xe(t){return ge(t)?"its head sits in a Box of its own above it (own-box): the row draws the head inline":void 0}function we(t,o){const s=t[o];return Array.isArray(s)&&s.some(a=>!!a&&typeof a=="object"&&typeof a.type=="string")?"already on the Box path: its items draw from a filled card template":void 0}function Be(t){const o=new Set,s=r=>{for(const a of r)if(a.kind==="group"||a.kind==="block")s(a.parts??[]);else if(a.kind==="core"&&a.slots&&typeof a.slots!="function")for(const[c,u]of Object.entries(a.slots))u.length>0&&u.every(m=>!("kind"in m))&&o.add(c)};for(const r of[t,...t.also??[]])s(r.parts);return[...o]}function Se(t,o,s){if(!s.press)for(const r of Be(t)){const a=we(o,r);if(a!==void 0)return a}}function Q(t,o,s={}){const r=t.props,a=(o.ownBoxConverts?void 0:xe(r))??Se(o,r,s)??o.skip?.(r);if(a!==void 0)return{node:t,nodes:[t],carried:[],dropped:[],siteWrites:[],skipped:a};const c=String(r.id??t.type),u=[],m=[],$=new Set,j=(n,i)=>{u.push({key:n,home:i}),$.add(n)},C=r._partStyles??{},L=be(o);let M=0;const w=(n,i)=>({type:n,props:{...i,id:`${c}~${n}-${++M}`}}),X=(n,i,b,y,g,l,B)=>{if(g){for(const d of n??[]){const h=typeof d=="string"?d:d[0];b[h]!==void 0&&B(h,`nothing — the ${y} has no parts, so it is not drawn`)}return}const e=typeof i=="function"?i(r,s):i??{};return V(n??[],e,b,(d,h,f)=>B(d,f?`nothing — the old value draws nothing (${y}: no ${h})`:`${l}${y}: ${h}`),s)},q=n=>ce(n,i=>`${c}~${i}-${++M}`),D=(n,i,b)=>{const y=n.of?n.of(i):Array.isArray(i[n.key])?i[n.key]:[],g=typeof n.props=="function"?n.props(r,s):n.props??{},l=y.map((f,x)=>{const p=f??{},k=n.item?.(p,x,r)??{},S=I(k.reverse?[...n.parts].reverse():n.parts,p,!1,`item ${x+1}: `);return n.flat?k.props?S.map(T=>({...T,props:{...T.props,...k.props,id:T.props.id}})):S:[w(v,{name:`${n.name} ${x+1}`,...g,...k.props??{},[_]:S})]});if(n.groups){const f=n.groups;return b(n.key,y.length?`one Box per item (${y.length}), in a Box per group`:"nothing — the list is empty"),ae(y.map(x=>x??{}),f.of,f.of).map((x,p)=>{const k=x.items.map(O=>O.item),S=f.parts?I(f.parts,f.head?.(k,r)??{},!1,`group ${p+1}: `):[],T=x.items.map(O=>l[O.index]),H=f.perRow?.(k.length,r),N=Number.isInteger(H)&&H>=1?H:1,F=[];if(f.perRow&&N<T.length)for(let O=0;O*N<T.length;O++)F.push(T.slice(O*N,(O+1)*N).flat());return w(v,{name:`${f.name} ${p+1}`,...f.props??{},[_]:[...S,w(v,{name:`${f.itemsName} ${p+1}`,...f.itemsProps?.(k.length,r)??{},[_]:F.length?F.map((O,U)=>w(v,{name:`${f.rowName??`${f.itemsName} row`} ${U+1}`,...f.rowProps??{},[_]:O})):T.flat()})]})})}const B=n.perRow?.(r),e=n.perRow?Number.isInteger(B)&&B>=1?B:1:0;if(b(n.key,(y.length?n.flat?`each item's parts (${y.length} items), in order`:`one Box per item (${y.length}), its parts inside`:"nothing — the list is empty")+(e&&y.length?`, in rows of ${e}`:"")),!e)return l.flat();const d=typeof n.rowProps=="function"?n.rowProps(r,s):n.rowProps??{},h=[];for(let f=0;f*e<l.length;f++){const x=l.slice(f*e,(f+1)*e).flat(),p=n.rowFiller?e-l.slice(f*e,(f+1)*e).length:0;h.push(w(v,{name:`${n.rowName??`${n.name} row`} ${f+1}`,...d,[_]:[...x,...Array.from({length:p},(k,S)=>w(v,{name:`Empty ${S+1}`,...n.rowFiller,[_]:[]}))]}))}return h},I=(n,i,b,y)=>{const g=[],l=(e,d)=>b?j(e,d):void 0,B=e=>b?C[e]:void 0;for(const e of n)if(!(e.when&&!e.when(r,b?void 0:i)))switch(e.kind){case"text":{const d=K(i[e.key]);if(!d.text.trim()&&!(b&&s.press&&o.pressKeepsEmpty?.includes(e.key))){l(e.key,"nothing — empty words draw nothing, so no block");break}const h=ye(e.role??"body"),{_partStyles:f,...x}=h,p=me(h,e.styleFrom?{...e.style,...e.styleFrom(r,s)}:e.style,B(e.key),e.props?.align);g.push(w("Text",{text:e.mark==="accentLead"?he(d.text):e.mark==="accentItalic"?ie(d.text):d.text,...x,...e.props??{},...p,...d.hidden?{_hidden:!0}:{}})),l(e.key,`${y}Text block: its words${d.hidden?", hidden":""}`);break}case"button":{const d=K(i[e.key]);if(!d.text.trim()){l(e.key,"nothing — no words, no button"),l(e.href,"nothing — no button to link"),typeof e.variant=="object"&&l(e.variant.key,"nothing — no button to style");break}const h=typeof i[e.href]=="string"&&i[e.href]?i[e.href]:"#",f={...e.style??{},...B(e.key)??{}};g.push(w("ButtonBlock",{label:d.text,href:h,...typeof e.props=="function"?e.props(i,s):e.props??{},...ke(e.variant,i),...Object.keys(f).length?{_partStyles:{label:f}}:{},...d.hidden?{_hidden:!0}:{}})),l(e.key,`${y}Button block: its words`),l(e.href,`${y}Button block: its link`),typeof e.variant=="object"&&l(e.variant.key,`${y}Button block: its Style`);break}case"image":{const d=i[e.key];if(typeof d!="string"||!d){l(e.key,"nothing — no picture, no block"),e.alt&&l(e.alt,"nothing — no picture to describe");break}const h=e.alt&&typeof i[e.alt]=="string"?i[e.alt]:"";g.push(w("ImageBlock",{src:d,alt:h,...e.props??{}})),l(e.key,`${y}Image block: its picture`),e.alt&&l(e.alt,`${y}Image block: its alt text`);break}case"list":{g.push(...D(e,i,l));break}case"group":{const d=I(e.parts,i,b,y),h=X(e.box,e.props,i,`${e.name} Box`,!d.length&&!e.keepEmpty,y,l);h&&g.push(w(v,{name:e.name,...h,[_]:d}));break}case"block":{const d=e.parts?I(e.parts,i,b,y):[],h=X(e.box,e.props,i,`${e.type} block`,!!e.parts&&!d.length&&!e.keepEmpty,y,l);h&&g.push(w(e.type,{...h,...e.slot?{[e.slot]:d}:{}}));break}case"core":{const d=e.as??t.type,h={...e.headless?{}:{headPlacement:"own-box"},...e.props??{}},f=e.keep==="rest"?Object.keys(i).filter(p=>!L.has(p)&&!(p in h)):e.keep;for(const p of f)i[p]!==void 0&&(h[p]=i[p],l(p,`the ${d} block inside the Box`));if(e.keep==="rest"){for(const k of Object.keys(e.props??{}))i[k]!==void 0&&!L.has(k)&&l(k,`nothing — the ${d} block inside the Box has the row's own value`);i.headPlacement!==void 0&&l("headPlacement",`the ${d} block inside the Box: own-box`);const p=Object.fromEntries(Object.entries(C).filter(([k])=>!L.has(k)));Object.keys(p).length&&(h._partStyles=p)}for(const[p,k]of Object.entries(e.rename??{}))i[p]!==void 0&&(h[k]=i[p],l(p,`the ${d} block inside the Box: ${k}`));if(e.derive){Object.assign(h,e.derive.props(i,s));for(const p of e.derive.reads)i[p]!==void 0&&l(p,`the ${d} block inside the Box`)}const x=typeof e.slots=="function"?e.slots(i,s):e.slots??{};for(const[p,k]of Object.entries(x))h[p]=k.flatMap(S=>"kind"in S?D(S,i,l):q([S]));g.push(w(d,h));break}}return g},J=(n,i)=>{const b=i===0?"Box":`${n.name} Box`,y=I(n.parts,r,!0,i===0?"":`${b}: `),g=typeof n.boxProps=="function"?n.boxProps(r,s):n.boxProps??{},l=V(n.box??[],g,r,(B,e,d)=>j(B,d?`nothing — the old value draws nothing (${b}: no ${e})`:`${b}: ${e}`),s);return{type:v,props:{name:n.name,...l,[_]:y,id:de(c,i)}}},G=[o,...o.also??[]].map(J);r._partStyles!==void 0&&j("_partStyles","each old part's style moved to its new part");for(const[n,i]of Object.entries(o.reads??{}))r[n]!==void 0&&j(n,i);for(const[n,i]of Object.entries(o.drop??{}))n in r&&(m.push({key:n,why:i}),$.add(n));for(const n of Object.keys(r))Y.has(n)||$.has(n)||m.push({key:n,why:"not in the row — not carried"});return{node:G[0],nodes:G,carried:u,dropped:m,siteWrites:[...o.site?.(t,s)??[]]}}function Me(t,o=W,s={}){const r=t.content;if(!Array.isArray(r))return t;let a=!1;const c=r.flatMap(u=>{const m=u&&typeof u.type=="string"&&o.includes(u.type)?E(P,u.type):void 0;if(!m)return[u];const $=Q(u,m,s);return $.skipped!==void 0?[u]:(a=!0,$.nodes)});return a?{...t,content:c}:t}function Xe(t,o=W,s={}){if(!Array.isArray(t))return[];const r=[];return t.forEach((a,c)=>{const u=a&&typeof a.type=="string"&&o.includes(a.type)?E(P,a.type):void 0;if(!u)return;const m=Q(a,u,s);m.skipped===void 0&&r.push({index:c,node:m.node,nodes:m.nodes})}),r}export{fe as HOST_PRESS_BLOCKS,le as HOST_PRESS_TYPES,_ as SECTION_BOX_SLOT,v as SECTION_BOX_TYPE,W as SECTION_TO_BOX_ON,pe as SECTION_TO_BOX_PRESS,Re as boxNativeReason,Q as convertSection,Me as convertSectionsInPage,Ie as convertTheme,ue as convertsToBox,we as filledTemplateHold,Ke as hasWords,ge as headInOwnBox,We as headParts,xe as ownBoxHold,Fe as pressesAsBox,Ne as registerBoxNativeSections,Ae as registerSectionToBox,de as sectionBoxIdOf,Xe as sectionToBoxEdits,Le as sectionToBoxRow,He as sectionToBoxTypes};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-web-builder",
3
- "version": "67.4.0",
3
+ "version": "67.6.0",
4
4
  "description": "The EFFICIENT website builder: the website editor, the general sections and the renderer that draws them, compiled. Hostable by any EFFICIENT product; nothing here imports a host.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Efficient Pty Ltd",