efficient-web-builder 58.0.0 → 59.1.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 (127) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/editor/components/SwitchToBoxFooter.js +1 -1
  3. package/dist/editor/components/useCardContentSwitchPass.d.ts +1 -0
  4. package/dist/editor/components/useCardContentSwitchPass.js +1 -0
  5. package/dist/editor/components/usePinnedChromeSeed.js +1 -1
  6. package/dist/editor/lib/document/ColourControl.js +1 -1
  7. package/dist/editor/lib/document/blocks/general/CardList/fields.js +1 -1
  8. package/dist/editor/lib/document/blocks/general/Cards/fields.js +1 -1
  9. package/dist/editor/lib/document/blocks/general/Chart/fields.js +1 -1
  10. package/dist/editor/lib/document/blocks/general/Countdown/fields.js +1 -1
  11. package/dist/editor/lib/document/blocks/general/Logos/fields.js +1 -1
  12. package/dist/editor/lib/document/blocks/general/Mockup/fields.js +2 -2
  13. package/dist/editor/lib/document/box-footer-rows.d.ts +3 -0
  14. package/dist/editor/lib/document/box-footer-rows.js +1 -0
  15. package/dist/editor/lib/document/card-row-fields.d.ts +2 -1
  16. package/dist/editor/lib/document/card-row-fields.js +1 -1
  17. package/dist/editor/lib/document/choice-pictures.d.ts +2 -1
  18. package/dist/editor/lib/document/choice-pictures.js +1 -1
  19. package/dist/editor/lib/document/controls.d.ts +12 -6
  20. package/dist/editor/lib/document/controls.js +1 -1
  21. package/dist/editor/lib/document/page-root.js +2 -2
  22. package/dist/editor/lib/sections/text-layouts.js +1 -1
  23. package/dist/format/lib/content/block-align.d.ts +1 -0
  24. package/dist/format/lib/content/block-align.js +1 -1
  25. package/dist/format/lib/content/block-sources.d.ts +1 -0
  26. package/dist/format/lib/content/block-sources.js +1 -1
  27. package/dist/format/lib/content/box-background.d.ts +2 -2
  28. package/dist/format/lib/content/box-background.js +1 -1
  29. package/dist/format/lib/content/box-shape.d.ts +1 -1
  30. package/dist/format/lib/content/card-columns.d.ts +1 -0
  31. package/dist/format/lib/content/card-columns.js +1 -0
  32. package/dist/format/lib/content/card-place.js +1 -1
  33. package/dist/format/lib/content/card-state.d.ts +17 -0
  34. package/dist/format/lib/content/card-state.js +1 -1
  35. package/dist/format/lib/content/card-template.js +1 -1
  36. package/dist/format/lib/content/gallery-layout.d.ts +13 -1
  37. package/dist/format/lib/content/gallery-layout.js +1 -1
  38. package/dist/format/lib/content/page-background.js +1 -1
  39. package/dist/format/lib/content/page-width.d.ts +1 -0
  40. package/dist/format/lib/content/page-width.js +1 -1
  41. package/dist/format/lib/content/section-background.js +1 -1
  42. package/dist/format/lib/document/blocks/general/Cards/card-list-seed.d.ts +17 -0
  43. package/dist/format/lib/document/blocks/general/Cards/card-list-seed.js +1 -0
  44. package/dist/format/lib/document/blocks/general/Chart/meta.d.ts +1 -0
  45. package/dist/format/lib/document/blocks/general/Chart/meta.js +1 -1
  46. package/dist/format/lib/document/blocks/general/Countdown/meta.d.ts +1 -0
  47. package/dist/format/lib/document/blocks/general/Countdown/meta.js +1 -1
  48. package/dist/format/lib/document/blocks/general/Mockup/meta.d.ts +1 -0
  49. package/dist/format/lib/document/blocks/general/Mockup/meta.js +1 -1
  50. package/dist/format/lib/document/blocks/general/text-part-shapes.json +10 -0
  51. package/dist/format/lib/document/box-footer.d.ts +13 -2
  52. package/dist/format/lib/document/box-footer.js +1 -1
  53. package/dist/format/lib/document/card-content-switch.d.ts +21 -0
  54. package/dist/format/lib/document/card-content-switch.js +1 -0
  55. package/dist/format/lib/document/card-row-keys.d.ts +14 -0
  56. package/dist/format/lib/document/card-row-keys.js +1 -0
  57. package/dist/format/lib/document/cards-template-on-read.d.ts +1 -1
  58. package/dist/format/lib/document/cards-template-on-read.js +1 -1
  59. package/dist/format/lib/document/container-blocks.js +1 -1
  60. package/dist/format/lib/document/neutralization-contracts.js +1 -1
  61. package/dist/format/lib/document/part-inks.d.ts +5 -2
  62. package/dist/format/lib/document/part-inks.js +1 -1
  63. package/dist/format/lib/document/section-catalog.js +2 -10
  64. package/dist/format/lib/document/seed-parts.d.ts +2 -0
  65. package/dist/format/lib/document/seed-parts.js +1 -1
  66. package/dist/format/lib/document/theme-slots.d.ts +20 -0
  67. package/dist/format/lib/document/theme-slots.js +1 -0
  68. package/dist/format/lib/editor-words-catalogue.d.ts +4 -0
  69. package/dist/format/lib/editor-words-catalogue.js +2 -2
  70. package/dist/format/lib/sections/logo-look.d.ts +1 -1
  71. package/dist/format/lib/sections/logo-look.js +1 -1
  72. package/dist/format/lib/theme.d.ts +1 -0
  73. package/dist/format/lib/theme.js +4 -4
  74. package/dist/render/components/Cards.d.ts +2 -1
  75. package/dist/render/components/Cards.js +1 -1
  76. package/dist/render/components/ChartSection.d.ts +2 -1
  77. package/dist/render/components/ChartSection.js +1 -1
  78. package/dist/render/components/Countdown.d.ts +2 -1
  79. package/dist/render/components/Countdown.js +1 -1
  80. package/dist/render/components/FeaturedCover.d.ts +2 -1
  81. package/dist/render/components/FeaturedCover.js +1 -1
  82. package/dist/render/components/KeyFeatures.js +1 -1
  83. package/dist/render/components/Logos.d.ts +5 -1
  84. package/dist/render/components/Logos.js +1 -1
  85. package/dist/render/components/MockupSection.d.ts +2 -1
  86. package/dist/render/components/MockupSection.js +1 -1
  87. package/dist/render/components/SiteGutterFrame.d.ts +5 -1
  88. package/dist/render/components/SiteGutterFrame.js +1 -1
  89. package/dist/render/components/Text.d.ts +2 -1
  90. package/dist/render/components/Text.js +1 -1
  91. package/dist/render/lib/content/section-edge.d.ts +7 -0
  92. package/dist/render/lib/content/section-edge.js +1 -1
  93. package/dist/render/lib/document/blocks/general/CardList/render.js +1 -1
  94. package/dist/render/lib/document/blocks/general/Cards/render.js +1 -1
  95. package/dist/render/lib/document/blocks/general/Chart/render.js +1 -1
  96. package/dist/render/lib/document/blocks/general/Countdown/render.js +1 -1
  97. package/dist/render/lib/document/blocks/general/FeaturedCover/render.js +1 -1
  98. package/dist/render/lib/document/blocks/general/Logos/render.js +1 -1
  99. package/dist/render/lib/document/blocks/general/Logos/wall-rows.d.ts +2 -0
  100. package/dist/render/lib/document/blocks/general/Logos/wall-rows.js +1 -0
  101. package/dist/render/lib/document/blocks/general/Mockup/render.js +2 -2
  102. package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
  103. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +3 -1
  104. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  105. package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.d.ts +3 -0
  106. package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -1
  107. package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
  108. package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.d.ts +1 -0
  109. package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.js +1 -1
  110. package/dist/render/lib/document/blocks/general/section-to-box-rows-promo.d.ts +2 -0
  111. package/dist/render/lib/document/blocks/general/section-to-box-rows-promo.js +1 -0
  112. package/dist/render/lib/document/blocks/general/section-to-box-rows-proof.d.ts +2 -0
  113. package/dist/render/lib/document/blocks/general/section-to-box-rows-proof.js +1 -0
  114. package/dist/render/lib/document/blocks/general/section-to-box-rows-stats.js +1 -1
  115. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  116. package/dist/render/lib/document/head-core-boxes.d.ts +1 -0
  117. package/dist/render/lib/document/head-core-boxes.js +1 -1
  118. package/dist/render/lib/document/hero-media-parts.d.ts +2 -2
  119. package/dist/render/lib/document/page-render.js +1 -1
  120. package/dist/render/lib/document/passes/section-width.js +1 -1
  121. package/dist/render/lib/document/wall-labels.d.ts +3 -0
  122. package/dist/render/lib/document/wall-labels.js +1 -0
  123. package/dist/render/lib/sections/section-to-box.d.ts +1 -0
  124. package/dist/render/lib/sections/section-to-box.js +1 -1
  125. package/package.json +3 -3
  126. package/dist/editor/lib/document/theme-swatches.d.ts +0 -3
  127. package/dist/editor/lib/document/theme-swatches.js +0 -1
@@ -1 +1 @@
1
- import{hasWords as t}from"../../../sections/section-to-box.js";import{DROP_COMMON as l,DROP_SIDE_PADDING as c,INNER_BOX as s,SAME_KEYS as g,SECTION_BOX as m,TEXT as r,smallText as h,wrapperPad as i,wrapperPadKeys as P}from"./section-to-box-row-parts.js";import{finiteNumber as u}from"../../../../../format/lib/finite-number.js";import{token as S}from"../../../../../format/lib/document/seed-parts.js";import{LOGOS_PH as k,logosScaffoldItems as x}from"../../../../../format/lib/document/blocks/general/Logos/meta.js";import{logosCardSeed as T}from"../../../../../format/lib/document/blocks/general/Logos/card-seed.js";import{PAYMENT_PH as E,paymentScaffoldAssurances as L,paymentScaffoldBadges as w}from"../../../../../format/lib/document/blocks/general/PaymentBadges/meta.js";import{BLOCK_SOURCE_OPTIONS_PROP as a,BLOCK_SOURCE_PROP as n}from"../../../../../format/lib/content/block-sources.js";import{CARD_TEMPLATE_SLOT as y}from"../../../../../format/lib/content/card-template.js";import{phoneKey as f,readHidable as B}from"efficient-easel/draw";const b={contained:!1},O=(o,e)=>({logos:[{kind:"list",key:o,name:"Logo",flat:!0,parts:[{kind:"block",type:"LogoBlock",box:["src",[e,"alt"]],when:(M,p)=>t(p?.src)||t(p?.[e])}]}]}),d=o=>{const e=u(o.bandPadding)??40;return{top:e,bottom:e,topPhone:e,bottomPhone:e}},R={...h("heading",{color:"labels",letterSpacing:.2}),props:{...r,align:"center"}},C={name:"Logos",boxProps:o=>({...m,direction:"column",gap:32,...i(o,d(o))}),box:[...g,...P(d),["bandPadding","sectionPaddingTop",(o,e)=>i(e,d(e)).sectionPaddingTop]],parts:[R,{kind:"core",keep:["columns","logoHeight","grayscale"],rename:{logosPerRow:"columns"},props:b,slots:O("items","alt")}],drop:{...l,...c,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)",headPlacement:"a Logos band has no split head (not in SPLITTABLE_SECTIONS): no stored node can hold one, and the converted block stores own-box"}},N={kind:"group",name:"Mark",keepEmpty:!0,parts:[],props:{...s,widthFit:"fixed",width:4,minWidth:4,sectionHeightMode:"fixed",sectionHeightValue:4,sectionHeightUnit:"px",sectionCorners:2,fillColor:"main"}},_={top:24,bottom:24,topPhone:24,bottomPhone:24},A={name:"Payment Methods",boxProps:o=>({...m,direction:"column",...i(o,_)}),box:[...g,...P(_)],parts:[{kind:"group",name:"Methods",props:{...s,align:"center",gap:20,gapPhone:20,sectionBorder:{top:1,bottom:1},sectionPaddingTop:32,sectionPaddingBottom:32},parts:[{...h("heading",{color:"labels"}),props:{...r,align:"center"}},{kind:"core",keep:[],as:"Logos",derive:{reads:[n,a],props:o=>t(o[n])?{[n]:o[n],...o[a]!==void 0?{[a]:o[a]}:{}}:{}},props:{...b,look:"cards",grayscale:!1},slots:o=>({...O("badges","label"),...t(o[n])?{[y]:[T()]}:{}})},{kind:"group",name:"Reassurance",props:{...s,direction:"row",wrap:!0,justify:"center",gap:24,gapPhone:24,phoneRow:2,[f("share")]:"content"},parts:[{kind:"list",key:"assurances",name:"Line",of:o=>(Array.isArray(o.assurances)?o.assurances:[]).filter(e=>t(e?.text)),props:{...s,direction:"row",align:"center",gap:8,gapPhone:8,phoneRow:2,[f("share")]:"content"},item:o=>B(o.text).hidden?{props:{_hidden:!0}}:{},parts:[N,{kind:"text",key:"text",props:{...r,align:"center"},style:{...S("label",13),color:"labels",lineHeight:1.5}}]}]}]}],drop:{...l,...c,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)"}},j={Logos:C,PaymentBadges:A},F=()=>({heading:k.heading,items:x()}),V=()=>({heading:E.heading,badges:w(),assurances:L()});export{j as LOGOS_SECTION_TO_BOX,F as logosPressStarter,V as paymentPressStarter};
1
+ import{hasWords as s}from"../../../sections/section-to-box.js";import{DIM as x,DROP_COMMON as m,DROP_SIDE_PADDING as h,INNER_BOX as r,SAME_KEYS as f,SECTION_BOX as P,TEXT as a,smallText as O,wrapperPad as i,wrapperPadKeys as _}from"./section-to-box-row-parts.js";import{finiteNumber as w}from"../../../../../format/lib/finite-number.js";import{fillSlot as R,token as L}from"../../../../../format/lib/document/seed-parts.js";import{LOGOS_PH as A,logosScaffoldItems as B}from"../../../../../format/lib/document/blocks/general/Logos/meta.js";import{logosCardSeed as b}from"../../../../../format/lib/document/blocks/general/Logos/card-seed.js";import{PAYMENT_PH as N,paymentScaffoldAssurances as M,paymentScaffoldBadges as C}from"../../../../../format/lib/document/blocks/general/PaymentBadges/meta.js";import{BLOCK_SOURCE_OPTIONS_PROP as n,BLOCK_SOURCE_PROP as t}from"../../../../../format/lib/content/block-sources.js";import{CARD_TEMPLATE_SLOT as k}from"../../../../../format/lib/content/card-template.js";import{legacyBlockAlignOf as I}from"../../../../../format/lib/content/block-align.js";import{FOOTER_PAYMENT_SEED as H}from"../../../../../format/lib/content/footer.js";import{SECTION_ACCENT_INHERIT as F}from"../../../../../format/lib/content/section-surface.js";import{FOOTER_MARK_SIZES as D,FOOTER_TEXT_PX as v}from"../../../../../format/lib/document/box-footer.js";import{phoneKey as d,readHidable as K}from"efficient-easel/draw";const l={contained:!1},c=(e,o)=>({logos:[{kind:"list",key:e,name:"Logo",flat:!0,parts:[{kind:"block",type:"LogoBlock",box:["src",[o,"alt"]],when:(j,g)=>s(g?.src)||s(g?.[o])}]}]}),p=e=>{const o=w(e.bandPadding)??40;return{top:o,bottom:o,topPhone:o,bottomPhone:o}},X={...O("heading",{color:"labels",letterSpacing:.2}),props:{...a,align:"center"}},z={name:"Logos",boxProps:e=>({...P,direction:"column",gap:32,...i(e,p(e))}),box:[...f,..._(p),["bandPadding","sectionPaddingTop",(e,o)=>i(o,p(o)).sectionPaddingTop]],parts:[X,{kind:"core",keep:["columns","logoHeight","grayscale"],rename:{logosPerRow:"columns"},props:l,slots:c("items","alt")}],drop:{...m,...h,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)",headPlacement:"a Logos band has no split head (not in SPLITTABLE_SECTIONS): no stored node can hold one, and the converted block stores own-box"}},Y={kind:"group",name:"Mark",keepEmpty:!0,parts:[],props:{...r,widthFit:"fixed",width:4,minWidth:4,sectionHeightMode:"fixed",sectionHeightValue:4,sectionHeightUnit:"px",sectionCorners:2,...R("main")}},S={top:24,bottom:24,topPhone:24,bottomPhone:24},G={name:"Payment Methods",boxProps:e=>({...P,direction:"column",...i(e,S)}),box:[...f,..._(S)],parts:[{kind:"group",name:"Methods",props:{...r,align:"center",gap:20,gapPhone:20,sectionBorder:{top:1,bottom:1},sectionPaddingTop:32,sectionPaddingBottom:32},parts:[{...O("heading",{color:"labels"}),props:{...a,align:"center"}},{kind:"core",keep:[],as:"Logos",derive:{reads:[t,n],props:e=>s(e[t])?{[t]:e[t],...e[n]!==void 0?{[n]:e[n]}:{}}:{}},props:{...l,look:"cards",grayscale:!1},slots:e=>({...c("badges","label"),...s(e[t])?{[k]:[b()]}:{}})},{kind:"group",name:"Reassurance",props:{...r,direction:"row",wrap:!0,justify:"center",gap:24,gapPhone:24,phoneRow:2,[d("share")]:"content"},parts:[{kind:"list",key:"assurances",name:"Line",of:e=>(Array.isArray(e.assurances)?e.assurances:[]).filter(o=>s(o?.text)),props:{...r,direction:"row",align:"center",gap:8,gapPhone:8,phoneRow:2,[d("share")]:"content"},item:e=>K(e.text).hidden?{props:{_hidden:!0}}:{},parts:[Y,{kind:"text",key:"text",props:{...a,align:"center"},style:{...L("label",13),color:"labels",lineHeight:1.5}}]}]}]}],drop:{...m,...h,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)"}},U={left:"start",center:"center",right:"end"},E=e=>I(e.align)??"left",T=e=>e.size==="md"?"md":"sm",u=12,y={name:"Payment logos",boxProps:e=>({...r,direction:"row",wrap:!0,align:"center",justify:U[E(e)],gap:u,gapPhone:u,phoneRow:2,[d("share")]:"content"}),parts:[{kind:"text",key:"lead",props:x,styleFrom:e=>({size:v[T(e)],lineHeight:1.5})},{kind:"core",keep:[],as:"Logos",derive:{reads:[t,n],props:e=>({logoHeight:D[T(e)].mark,align:E(e),...s(e[t])?{[t]:e[t],...e[n]!==void 0?{[n]:e[n]}:{}}:{}})},props:{...l,look:"marks",grayscale:!1,sectionAccent:F},slots:e=>({...c("methods","label"),...s(e[t])?{[k]:[b()]}:{}})}],drop:{size:"read as the wall's Logo height (S 16, M 20) and the lead's size (the footer size table, 12 / 13)",align:"read as the Box's justify and the wall's own Alignment (start is left, end is right)",editing:"the editor's preview flag, never a stored setting: the editor tells every block it is editing"}},ie={Logos:z,PaymentBadges:G,FooterPayment:y,PaymentLogosBlock:y},de=()=>({heading:A.heading,items:B()}),le=()=>({heading:N.heading,badges:C(),assurances:M()}),ce=()=>({...H,methods:[]});export{ie as LOGOS_SECTION_TO_BOX,ce as footerPaymentPressStarter,de as logosPressStarter,le as paymentPressStarter};
@@ -0,0 +1,2 @@
1
+ import type { SectionToBoxRow } from "../../../sections/section-to-box.js";
2
+ export declare const PROMO_SECTION_TO_BOX: Readonly<Record<string, SectionToBoxRow>>;
@@ -0,0 +1 @@
1
+ import{DROP_COMMON as t,DROP_SIDE_PADDING as e,FOLLOW_THE_BOX as r,SAME_KEYS as n,SECTION_BOX as p,TEXT as c,smallText as d,wrapperPad as O,wrapperPadKeys as a}from"./section-to-box-row-parts.js";import{labelLook as _}from"../../../../../format/lib/document/seed-parts.js";import{COUNTDOWN_OWN_BOX_WORDS as i}from"../../../../../format/lib/document/blocks/general/Countdown/meta.js";const s={top:48,bottom:48,topPhone:48,bottomPhone:48},b={...d("title",{..._(12),color:"muted"}),props:{...c,align:"center"}},P=()=>({name:"Countdown",boxProps:o=>({...p,direction:"column",align:"center",gap:16,gapPhone:16,...O(o,s)}),box:[...n,...a(s)],parts:[b,{kind:"core",keep:"rest",props:r}],pressKeepsEmpty:[...i],drop:{...t,...e}}),m={top:80,bottom:80,topTablet:60,bottomTablet:60,topPhone:60,bottomPhone:60},l=()=>({name:"Feature Banner",boxProps:o=>({...p,direction:"column",sectionBorder:{bottom:1},...O(o,m)}),box:[...n,...a(m)],parts:[{kind:"core",keep:"rest",props:r}],drop:{...t,...e}}),C={Countdown:P(),FeaturedCover:l()};export{C as PROMO_SECTION_TO_BOX};
@@ -0,0 +1,2 @@
1
+ import { type SectionToBoxRow } from "../../../sections/section-to-box.js";
2
+ export declare const PROOF_SECTION_TO_BOX: Readonly<Record<string, SectionToBoxRow>>;
@@ -0,0 +1 @@
1
+ import{DIM as u,DROP_COMMON as a,DROP_SIDE_PADDING as s,FOLLOW_THE_BOX as c,INNER_BOX as r,SAME_KEYS as _,SECTION_BOX as P,TEXT as b,bandPage as y,smallText as i,wrapperPad as C,wrapperPadKeys as S}from"./section-to-box-row-parts.js";import{boxPadding as f,fillSlot as x,token as p}from"../../../../../format/lib/document/seed-parts.js";import{phoneKey as E}from"efficient-easel/draw";import{convertTheme as w}from"../../../sections/section-to-box.js";import{surfacePresetIndex as A}from"../../../../../format/lib/theme.js";import{CHART_OWN_BOX_WORDS as N}from"../../../../../format/lib/document/blocks/general/Chart/meta.js";import{MOCKUP_OWN_BOX_WORDS as B}from"../../../../../format/lib/document/blocks/general/Mockup/meta.js";const m={top:76,bottom:76,topPhone:76,bottomPhone:76},d=()=>({kind:"group",name:"Words",props:{...r,gap:20,gapPhone:20},parts:[{kind:"group",name:"Chip row",props:{...r,direction:"row",phoneRow:2,[E("share")]:"content"},parts:[{kind:"group",name:"Chip",props:{...r,...x("main"),...f(6,14)},parts:[i("eyebrow",{color:"background",...p("label",12),weight:600,letterSpacing:.16})]}]},{kind:"text",key:"title",role:"heading",props:b,style:{textStyle:"heading-2",...p("headingMedium",44,32),weight:500,case:"upper",lineHeight:1.04,letterSpacing:-.02}},{kind:"text",key:"body",props:{...u,maxWidth:435},style:{textStyle:"body-1",...p("body",15),lineHeight:1.625}}]}),l=(e,o)=>{const t=w(o)?.themes,n=t?A(t,y(e,o)):-1;return n>=0?n:e},g=e=>(o,t)=>({...P,sectionAccent:l(o.sectionAccent??0,t),direction:"row",align:"center",gap:56,gapPhone:56,share:e,sectionBorder:{top:1,bottom:1},...C(o,m)}),h=[..._.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,o,t)=>l(e,t)],...S(m)],D=()=>({name:"Chart",boxProps:g([42]),box:h,parts:[d(),{kind:"group",name:"Chart",props:{...r,gap:16,gapPhone:16},keepEmpty:!0,parts:[{kind:"core",keep:"rest",props:c},i("caption",{color:"muted",...p("label",10),letterSpacing:.14})]}],pressKeepsEmpty:[...N],drop:{...a,...s}}),O=e=>e.align==="left",k={kind:"group",name:"Card",keepEmpty:!0,props:r,parts:[{kind:"core",keep:"rest",props:c}]},R=()=>({name:"Mockup Card",boxProps:g("equal"),box:h,parts:[{...k,when:O},d(),{...k,when:e=>!O(e)}],pressKeepsEmpty:[...B],drop:{...a,...s}}),F={Chart:D(),Mockup:R()};export{F as PROOF_SECTION_TO_BOX};
@@ -1 +1 @@
1
- import{phoneKey as D}from"efficient-easel/draw";import{newId as K}from"efficient-easel/data";import{COUNT_KEY_PROP as y}from"../../../../../format/lib/content/block-sources.js";import{resolveSectionBackground as _,THEME_SECTION_BG as M}from"../../../../../format/lib/content/section-background.js";import{finiteNumber as H}from"../../../../../format/lib/finite-number.js";import{hasWords as u}from"../../../sections/section-to-box.js";import{DROP_COMMON as k,DROP_SIDE_PADDING as x,INNER_BOX as r,NUMBER_TEXT as h,SAME_KEYS as T,SECTION_BOX as O,TEXT as i,bandAccent as Y,bandProps as U,bandWrites as W,fillFrom as G,innerPad as X,innerPadKeys as $,smallText as g,wrapperPad as q,wrapperPadKeys as j}from"./section-to-box-row-parts.js";import{fluidToken as z,headTree as V,token as n}from"./section-head-looks.js";import{SECTION_BG_BUILT_IN as P}from"../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{CARD_STYLES as s,CARD_STYLE_KEY as m}from"../../../sections/card-list-style.js";import{CARD_LIST_TYPE as J,CARD_TEMPLATE_SLOT as Q,cardListProps as Z}from"../../../../../format/lib/content/card-template.js";import{BOX_TYPE as d,CONTAINER_BLOCKS_SLOT as l}from"../../../../../format/lib/document/container-blocks.js";import{rowFieldTextSeed as c}from"../../../../../format/lib/document/blocks/general/Cards/card-seed.js";import{say as o}from"../../../../../format/lib/editor-words.js";const S=e=>typeof e=="string"?e.trim():"";function E(e){const t=`${S(e.prefix)}${S(e.value)}`,a=S(e.suffix);return e.emphasizeAll===!0?t?`==_${t}_==`:"":`${t}${a?`==_${a}_==`:""}`}const A={textStyle:"heading-2",...z("headingMedium",56,7,96),weight:500,case:"none",lineHeight:.9,letterSpacing:-.04},f={kind:"block",type:"Text",props:{...h,_partStyles:{text:A}},box:[["value","text",(e,t)=>E(t)]],when:(e,t)=>t!==void 0&&typeof t.value=="string"&&E(t)!==""},B=e=>u(e?.supSuffix),R={textStyle:"body-1",fontRole:"heading",...n("body",16),lineHeight:1.5,letterSpacing:-.01},C={color:"labels",...n("label",12),lineHeight:1.5,letterSpacing:.24},L={...r,direction:"row",align:"start",gap:32,gapPhone:32,share:"content",phoneRow:2,[D("share")]:"content"},N={textStyle:"body-5",...n("label",13),weight:500,color:"accent",letterSpacing:.18,lineHeight:1,padding:12},b=e=>_(e.background,P.StatsParagraph),p=e=>b(e)===M,w=e=>({...e,sectionAccent:e.sectionAccent??0}),ee=(e,t)=>p(e)?G("background")(e,t):{},te={name:"Stats with Text",skip:e=>b(e)&&b(e)!=="transparent"&&!p(e)?"it paints a colour of its own, not the section band":void 0,boxProps:(e,t)=>({...O,direction:"column",gap:60,gapPhone:60,sectionBorder:{bottom:1},...X(e,"StatsParagraph"),...p(e)?U(w(e),t):{}}),box:[...T.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,t,a)=>p(t)?Y(e,w(t),a):e],...$("StatsParagraph")],site:(e,t)=>p(e.props)?W({props:w(e.props)},t):[],parts:[V("StatsParagraph"),{kind:"group",name:"Stats",props:{...r,...s.table.grid,[m]:"table"},parts:[{kind:"list",key:"stats",name:"Stat",perRow:()=>4,rowName:"Stats row",rowProps:{...r,direction:"row",share:"equal",phoneRow:2,...s.table.row},props:(e,t)=>({...r,...s.table.card,...ee(e,t)}),parts:[{...f,when:(e,t)=>!B(t)&&f.when(e,t)},{kind:"group",name:"Figure",props:L,when:(e,t)=>B(t),parts:[f,{kind:"text",key:"supSuffix",props:i,style:N}]},{kind:"group",name:"Words",props:{...r,gap:4,gapPhone:4},parts:[{kind:"text",key:"label",props:i,style:R},g("sub",C)]}]}]}],drop:{...k,...x,background:"the band is the Box's theme: the site's band preset (`sectionAccent`), or a declared band-preset write; none paints nothing, and any other colour is skipped",headPlacement:"needs a row per head placement: an own-box Stats with Text draws no head (its words sit in a Section Header above it), the row always draws the head"}},oe=new Set(["value","label",y]),I={top:48,bottom:48,topPhone:48,bottomPhone:48},re=e=>{const t=_(typeof e.background=="string"?e.background:void 0,P.Stats);return!!t&&t!=="transparent"},ae={name:"Stats",skip:e=>re(e)?"it paints a colour inside its padding, and a Box paints its Fill over the padding too":u(e.dataSource)?"its figures come from a source":Array.isArray(e.items)&&e.items.some(t=>u(t?.[y]))?"a figure names a count, and each figure Text here is typed by hand until it is linked":Array.isArray(e.items)&&e.items.some(t=>Object.keys(t??{}).some(a=>!oe.has(a)))?"a figure has a key no part here reads":Object.keys(e._partStyles??{}).some(t=>t!=="heading")?"a figure or a name has a style of its own, kept by kind, which no part here reads":void 0,boxProps:e=>({...O,direction:"column",gap:24,gapPhone:24,...q(e,I)}),box:[...T,...j(I)],parts:[g("heading",{color:"labels",...n("label",12),letterSpacing:.2}),{kind:"group",name:"Stats",props:{...r,...s.list.grid,[m]:"list"},parts:[{kind:"list",key:"items",name:"Stat",perRow:e=>H(e.columns)??4,rowName:"Stats row",rowProps:{...r,direction:"row",share:"equal",phoneRow:2,...s.list.row},props:{...r,...s.list.card},parts:[{kind:"text",key:"value",props:h,style:{textStyle:"heading-2",...n("headingMedium",48,36),weight:500,case:"none",lineHeight:1,letterSpacing:-.03}},g("label",{color:"labels",...n("label",12),letterSpacing:.2})]}]}],drop:{...k,...x,columns:"the rows of N: one row Box per `columns` figures, which the Box draws",dataSource:"an empty source is typed figures, what the row draws; a sourced node is skipped (0 Hartes nodes)",dataSourceOptions:"read only with a source; a sourced node is skipped (0 Hartes nodes)",contained:"the Box draws the site frame now; each figure fills the Box's column",background:"only no fill reaches here: a node that paints a colour is skipped"}},_e={StatsParagraph:te,Stats:ae};function ke(){return{eyebrow:o("By the numbers"),title:o("What we count."),desc:o("A few numbers that matter to us."),stats:[],background:"transparent"}}const se=[{key:"figure",label:"Figure"},{key:"superscript",label:"Superscript"},{key:"label",label:"Label"},{key:"body",label:"Text",multiline:!0}];function xe(){const e=(t,a,F,v="")=>({key:K("stat"),figure:t,superscript:v,label:a,body:F});return[e("28==_yr_==",o("Years in business"),o("Privately held since day one. Same two founders.")),e("==_8_==",o("Operating footprint"),o("Los Angeles · Fort Lauderdale · Bewdley · Drachten · Mumbai · Selangor · Ho Chi Minh · Sydney. Three continents covered from one California design studio."),o("cities")),e("−21==_%_==",o("Avg. weight saving"),o("Versus OEM equivalents, across our forged catalog.")),e("14==_×_==",o("Finish steps"),o("Specified in California to a 14-step protocol. No two sets are identical."))]}function ne(e){return{type:d,props:{...r,name:"Card",...structuredClone(s[e].listCard)},slots:{[l]:[{type:d,props:{...L,name:"Figure"},slots:{[l]:[c("figure",h,A),c("superscript",i,N)]}},{type:d,props:{...r,name:"Words",gap:4,gapPhone:4},slots:{[l]:[c("label",{...i,widthFit:"fill"},R),c("body",{...i,widthFit:"fill"},C,!0)]}}]}}}function Te(e,t,a=4){return{type:d,props:{...r,name:"Stats",direction:"row",columns:a,...structuredClone(s[t].items),[m]:t},slots:{[l]:[{type:J,props:Z(e,se),slots:{[Q]:[ne(t)]}}]}}}export{_e as STATS_SECTION_TO_BOX,E as figureWords,Te as statsBoxSeed,ke as statsPressSeed,xe as statsSeedRows};
1
+ import{phoneKey as D}from"efficient-easel/draw";import{newId as K}from"efficient-easel/data";import{COUNT_KEY_PROP as _}from"../../../../../format/lib/content/block-sources.js";import{resolveSectionBackground as k,THEME_SECTION_BG as M}from"../../../../../format/lib/content/section-background.js";import{finiteNumber as H}from"../../../../../format/lib/finite-number.js";import{hasWords as g}from"../../../sections/section-to-box.js";import{DROP_COMMON as x,DROP_SIDE_PADDING as T,INNER_BOX as a,NUMBER_TEXT as m,SAME_KEYS as P,SECTION_BOX as O,TEXT as i,bandAccent as Y,bandProps as U,bandWrites as W,fillFrom as G,onBandPreset as X,innerPad as $,innerPadKeys as q,smallText as S,wrapperPad as j,wrapperPadKeys as z}from"./section-to-box-row-parts.js";import{fluidToken as V,headTree as J,token as n}from"./section-head-looks.js";import{SECTION_BG_BUILT_IN as E}from"../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{CARD_STYLES as s,CARD_STYLE_KEY as f}from"../../../sections/card-list-style.js";import{CARD_LIST_TYPE as Q,CARD_TEMPLATE_SLOT as Z,cardListProps as ee}from"../../../../../format/lib/content/card-template.js";import{BOX_TYPE as d,CONTAINER_BLOCKS_SLOT as l}from"../../../../../format/lib/document/container-blocks.js";import{rowFieldTextSeed as c}from"../../../../../format/lib/document/blocks/general/Cards/card-seed.js";import{say as r}from"../../../../../format/lib/editor-words.js";const b=e=>typeof e=="string"?e.trim():"";function A(e){const t=`${b(e.prefix)}${b(e.value)}`,o=b(e.suffix);return e.emphasizeAll===!0?t?`==_${t}_==`:"":`${t}${o?`==_${o}_==`:""}`}const B={textStyle:"heading-2",...V("headingMedium",56,7,96),weight:500,case:"none",lineHeight:.9,letterSpacing:-.04},w={kind:"block",type:"Text",props:{...m,_partStyles:{text:B}},box:[["value","text",(e,t)=>A(t)]],when:(e,t)=>t!==void 0&&typeof t.value=="string"&&A(t)!==""},R=e=>g(e?.supSuffix),C={textStyle:"body-1",fontRole:"heading",...n("body",16),lineHeight:1.5,letterSpacing:-.01},L={color:"labels",...n("label",12),lineHeight:1.5,letterSpacing:.24},N={...a,direction:"row",align:"start",gap:32,gapPhone:32,share:"content",phoneRow:2,[D("share")]:"content"},I={textStyle:"body-5",...n("label",13),weight:500,color:"accent",letterSpacing:.18,lineHeight:1,padding:12},y=e=>k(e.background,E.StatsParagraph),p=e=>y(e)===M,u=e=>({...e,sectionAccent:e.sectionAccent??0}),te=(e,t)=>p(e)?G("background",(o,h)=>X(u(o),h))(e,t):{},oe={name:"Stats with Text",skip:e=>y(e)&&y(e)!=="transparent"&&!p(e)?"it paints a colour of its own, not the section band":void 0,boxProps:(e,t)=>({...O,direction:"column",gap:60,gapPhone:60,sectionBorder:{bottom:1},...$(e,"StatsParagraph"),...p(e)?U(u(e),t):{}}),box:[...P.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,t,o)=>p(t)?Y(e,u(t),o):e],...q("StatsParagraph")],site:(e,t)=>p(e.props)?W({props:u(e.props)},t):[],parts:[J("StatsParagraph"),{kind:"group",name:"Stats",props:{...a,...s.table.grid,[f]:"table"},parts:[{kind:"list",key:"stats",name:"Stat",perRow:()=>4,rowName:"Stats row",rowProps:{...a,direction:"row",share:"equal",phoneRow:2,...s.table.row},props:(e,t)=>({...a,...s.table.card,...te(e,t)}),parts:[{...w,when:(e,t)=>!R(t)&&w.when(e,t)},{kind:"group",name:"Figure",props:N,when:(e,t)=>R(t),parts:[w,{kind:"text",key:"supSuffix",props:i,style:I}]},{kind:"group",name:"Words",props:{...a,gap:4,gapPhone:4},parts:[{kind:"text",key:"label",props:i,style:C},S("sub",L)]}]}]}],drop:{...x,...T,background:"the band is the Box's theme: the site's band preset (`sectionAccent`), or a declared band-preset write; none paints nothing, and any other colour is skipped",headPlacement:"needs a row per head placement: an own-box Stats with Text draws no head (its words sit in a Section Header above it), the row always draws the head"}},re=new Set(["value","label",_]),F={top:48,bottom:48,topPhone:48,bottomPhone:48},ae=e=>{const t=k(typeof e.background=="string"?e.background:void 0,E.Stats);return!!t&&t!=="transparent"},se={name:"Stats",skip:e=>ae(e)?"it paints a colour inside its padding, and a Box paints its Fill over the padding too":g(e.dataSource)?"its figures come from a source":Array.isArray(e.items)&&e.items.some(t=>g(t?.[_]))?"a figure names a count, and each figure Text here is typed by hand until it is linked":Array.isArray(e.items)&&e.items.some(t=>Object.keys(t??{}).some(o=>!re.has(o)))?"a figure has a key no part here reads":Object.keys(e._partStyles??{}).some(t=>t!=="heading")?"a figure or a name has a style of its own, kept by kind, which no part here reads":void 0,boxProps:e=>({...O,direction:"column",gap:24,gapPhone:24,...j(e,F)}),box:[...P,...z(F)],parts:[S("heading",{color:"labels",...n("label",12),letterSpacing:.2}),{kind:"group",name:"Stats",props:{...a,...s.list.grid,[f]:"list"},parts:[{kind:"list",key:"items",name:"Stat",perRow:e=>H(e.columns)??4,rowName:"Stats row",rowProps:{...a,direction:"row",share:"equal",phoneRow:2,...s.list.row},props:{...a,...s.list.card},parts:[{kind:"text",key:"value",props:m,style:{textStyle:"heading-2",...n("headingMedium",48,36),weight:500,case:"none",lineHeight:1,letterSpacing:-.03}},S("label",{color:"labels",...n("label",12),letterSpacing:.2})]}]}],drop:{...x,...T,columns:"the rows of N: one row Box per `columns` figures, which the Box draws",dataSource:"an empty source is typed figures, what the row draws; a sourced node is skipped (0 Hartes nodes)",dataSourceOptions:"read only with a source; a sourced node is skipped (0 Hartes nodes)",contained:"the Box draws the site frame now; each figure fills the Box's column",background:"only no fill reaches here: a node that paints a colour is skipped"}},ke={StatsParagraph:oe,Stats:se};function xe(){return{eyebrow:r("By the numbers"),title:r("What we count."),desc:r("A few numbers that matter to us."),stats:[],background:"transparent"}}const ne=[{key:"figure",label:"Figure"},{key:"superscript",label:"Superscript"},{key:"label",label:"Label"},{key:"body",label:"Text",multiline:!0}];function Te(){const e=(t,o,h,v="")=>({key:K("stat"),figure:t,superscript:v,label:o,body:h});return[e("28==_yr_==",r("Years in business"),r("Privately held since day one. Same two founders.")),e("==_8_==",r("Operating footprint"),r("Los Angeles · Fort Lauderdale · Bewdley · Drachten · Mumbai · Selangor · Ho Chi Minh · Sydney. Three continents covered from one California design studio."),r("cities")),e("−21==_%_==",r("Avg. weight saving"),r("Versus OEM equivalents, across our forged catalog.")),e("14==_×_==",r("Finish steps"),r("Specified in California to a 14-step protocol. No two sets are identical."))]}function ie(e){return{type:d,props:{...a,name:"Card",...structuredClone(s[e].listCard)},slots:{[l]:[{type:d,props:{...N,name:"Figure"},slots:{[l]:[c("figure",m,B),c("superscript",i,I)]}},{type:d,props:{...a,name:"Words",gap:4,gapPhone:4},slots:{[l]:[c("label",{...i,widthFit:"fill"},C),c("body",{...i,widthFit:"fill"},L,!0)]}}]}}}function Pe(e,t,o=4){return{type:d,props:{...a,name:"Stats",direction:"row",columns:o,...structuredClone(s[t].items),[f]:t},slots:{[l]:[{type:Q,props:ee(e,ne),slots:{[Z]:[ie(t)]}}]}}}export{ke as STATS_SECTION_TO_BOX,A as figureWords,Pe as statsBoxSeed,xe as statsPressSeed,Te as statsSeedRows};
@@ -1 +1 @@
1
- import{hasWords as v,registerSectionToBox as t}from"../../../sections/section-to-box.js";import{BUTTON as m,DIM as g,DROP_COMMON as a,DROP_SIDE_PADDING as c,INNER_BOX as o,leadLine as C,SAME_KEYS as s,SECTION_BOX as d,TEXT as l,innerPad as O,siteGutterOf as A,innerPadKeys as T,smallText as u,wrapperPad as b,wrapperPadKeys as P}from"./section-to-box-row-parts.js";import{CARDS_SECTION_TO_BOX as H}from"./section-to-box-rows-cards.js";import{normalizeSiteGutterPhone as R,siteGutterPhoneFollows as D}from"../../../../../format/lib/content/page-width.js";import{finiteNumber as L}from"../../../../../format/lib/finite-number.js";import{STATS_SECTION_TO_BOX as X}from"./section-to-box-rows-stats.js";import{LOGOS_SECTION_TO_BOX as W}from"./section-to-box-rows-logos.js";import{STRIP_SECTION_TO_BOX as G}from"./section-to-box-rows-strip.js";import{TIMELINE_SECTION_TO_BOX as M}from"./section-to-box-rows-timeline.js";import{LOCATIONS_SECTION_TO_BOX as F}from"./section-to-box-rows-locations.js";import{HEAD_ONLY_SECTION_TO_BOX as K}from"./section-to-box-rows-head.js";import{PAGE_HEADER_SECTION_TO_BOX as U}from"./section-to-box-rows-pageheader.js";import{DOCBODY_SECTION_TO_BOX as z}from"./section-to-box-rows-docbody.js";import{EDITORIAL_SECTION_TO_BOX as Y}from"./section-to-box-rows-editorial.js";import{FORMS_SECTION_TO_BOX as j}from"./section-to-box-rows-forms.js";import{CHECKOUT_SECTION_TO_BOX as q}from"./section-to-box-rows-checkout.js";import{FITMENT_SECTION_TO_BOX as J}from"./section-to-box-rows-fitment.js";import{fluidToken as Q,headTree as S,token as i}from"./section-head-looks.js";import{boxPadding as V}from"../../../../../format/lib/document/seed-parts.js";const f={top:72,bottom:72,topPhone:72,bottomPhone:72},Z={name:"Editorial Text",boxProps:e=>({...d,direction:"column",gap:28,gapPhone:28,sectionBorder:{top:1},...b(e,f)}),box:[["topBorder","sectionBorder",e=>e===!1?void 0:{top:1}],...s,...P(f)],parts:[S("Prose"),{kind:"text",key:"body",props:g,style:{textStyle:"body-1",...i("body",16),lineHeight:1.7,paragraphSpacing:18}}],drop:{...a,...c,headPlacement:"needs a row per head placement: an own-box Prose draws no head (its words sit in a Section Header above it), the row always draws the head. 0 of 123 live nodes store it (the live export, 2026-10-24)"}},w={buttonPaddingTop:20,buttonPaddingBottom:20,buttonPaddingLeft:28,buttonPaddingRight:28},_=(e,n)=>n?.variant==="primary",k=(e,n)=>({kind:"list",key:"buttons",name:"Button",flat:!0,when:e,parts:[{kind:"button",key:"label",href:"href",when:_,variant:"primary",style:{letterSpacing:.3},props:{...m,...w,...n}},{kind:"button",key:"label",href:"href",when:(r,p)=>!_(r,p),variant:"ghost",style:{letterSpacing:.3},props:{...m,...w,...n}}]}),h=e=>v(e.title),$={name:"Call-to-Action Heading",boxProps:e=>({...d,direction:"row",align:"center",justify:h(e)?"between":"end",gap:60,gapPhone:60,share:"content",sectionBorder:{bottom:1},...O(e,"TitleWithButtons")}),box:[...s,...T("TitleWithButtons")],parts:[{kind:"group",name:"Title",props:{...o,maxWidth:1e3,widthFitPhone:"fill"},parts:[{kind:"text",key:"title",role:"heading",props:l,style:{textStyle:"heading-1",...Q("headingLarge",48,7,108),case:"upper",lineHeight:.94,letterSpacing:-.035}}]},{kind:"group",name:"Buttons",props:e=>({...o,gap:14,gapPhone:14,widthFitPhone:"fill",...h(e)?{minWidth:280,minWidthPhone:0}:{}}),parts:[k(h,{widthFit:"fill",iconPosition:"end"}),k(e=>!h(e),{})]}],drop:{...a,buttonsAlign:"moves the buttons only when there is no heading (4 of 128 live nodes), where the Box puts them at the end. 0 of 128 live nodes store it (the live export, 2026-10-24)",buttonsAlignPhone:"the phone's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Phone view's Block alignment row), so nothing moves",buttonsAlignTablet:"the tablet's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Tablet view's Block alignment row, 0 stored on the US sites 2026-11-05), so nothing moves"}};function ee(e){const{siteGutter:n,siteGutterPhone:r}=e.site??{},p=A(e),y=Math.min(20,R(r)??D(n));return{sectionPaddingLeft:p,sectionPaddingRight:p,sectionPaddingLeftPhone:y,sectionPaddingRightPhone:y}}const B={top:40,bottom:64,topPhone:24,bottomPhone:36},te={name:"Section Header",boxProps:(e,n)=>({...d,direction:"column",gap:0,...b(e,B),...ee(n)}),box:[...s,...P(B)],parts:[S("SectionHeader")],drop:{...a,...c,headStyle:"needs a row per head look: the row draws the standard look; the editorial, simple, statement, natural and essay looks are other layouts. 0 of 69 live nodes store it (the live export, 2026-10-24)",eyebrowLook:"read only by the simple, statement, natural and essay looks, which this row does not draw. 0 of 69 live nodes store it",rowGap:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",descriptionSize:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",numStyle:"Solid (the default; 4 of 69 live nodes store it) IS the eyebrow Text the row draws; Outlined (0 live) needs an outlined-number text look"}},x={...o,direction:"row",share:[67],gap:30},E={...o,sectionPaddingLeft:30,sectionPaddingLeftPhone:0},N=(e,n,r)=>({kind:"group",name:e,props:n,parts:[r]}),oe={name:"Lead Text",boxProps:e=>({...d,direction:"column",gap:40,gapPhone:40,sectionBorder:{bottom:1},...O(e,"ParagraphsA")}),box:[...s,...T("ParagraphsA")],parts:[{kind:"group",name:"Numbers",props:{...x,gapPhone:24,sectionBorder:{bottom:1},sectionPaddingBottom:40,sectionPaddingBottomPhone:40},parts:[{kind:"group",name:"Eyebrow",props:{...o,sectionPaddingTop:5,sectionPaddingBottom:1,sectionPaddingTopPhone:5,sectionPaddingBottomPhone:1},parts:[u("eyebrow",{color:"labels",...i("label",12),letterSpacing:.24})]},N("Stats column",o,{kind:"group",name:"Stats",props:{...E,gap:0,gapPhone:0},parts:[{kind:"list",key:"stats",name:"Stat",flat:!0,parts:[C("value","label",{...i("label",13),letterSpacing:.18,lineHeight:1.8})]}]})]},{kind:"group",name:"Words",props:{...x,gapPhone:28},parts:[{kind:"group",name:"Lead",props:o,parts:[{kind:"group",name:"Measure",props:{...o,maxWidth:780},parts:[{kind:"text",key:"lead",props:l,style:{textStyle:"heading-3",...i("headingSmall",22,20),weight:400,case:"none",lineHeight:1.45,letterSpacing:-.005}}]}]},N("Note column",{...o,justify:"end",widthFit:"fill"},{kind:"group",name:"Founders",props:{...E,gap:8,gapPhone:8},parts:[{kind:"group",name:"Note",props:{...o,gap:6,gapPhone:6},parts:[{kind:"text",key:"foundersHeading",props:l,style:{textStyle:"body-1",fontRole:"heading",...i("body",18,16),weight:500,letterSpacing:-.01,lineHeight:1.7}},{kind:"text",key:"foundersBody",props:g,style:{textStyle:"body-5",fontRole:"heading",...i("body",14,12),lineHeight:1.7}}]},u("attribution",{...i("label",12,10),letterSpacing:.24,lineHeight:1.7})]})]}],drop:{...a}},I={top:24,bottom:24,topPhone:24,bottomPhone:24},ne={name:"Banner",boxProps:e=>({...d,direction:"column",gap:0,...b(e,I)}),box:[...s,"contained",...P(I)],parts:[{kind:"group",name:"Card",keepEmpty:!0,props:{...o,gap:28,placement:"top-left",darken:60,darkenStyle:"even",sectionBorder:{width:1},...V(64,40,40,24)},box:[["imageSrc","bgImage"],["overlay","darken",e=>Math.min(Math.max(L(e)??60,0),100)]],parts:[{kind:"group",name:"Words",props:{...o,gap:20},parts:[u("eyebrow"),{kind:"text",key:"title",role:"heading",props:{...l,maxWidth:680},style:{weight:500,lineHeight:1.05,letterSpacing:-.03,case:"none"}},{kind:"text",key:"body",props:{...g,maxWidth:680},style:{textStyle:"body-1",lineHeight:1.6},was:{size:16}}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:m}]}],drop:{...a,...c}},ie={Prose:Z,TitleWithButtons:$,SectionHeader:te,ParagraphsA:oe,Banner:ne};function _e(){t(ie),t(X),t(W),t(H),t(G),t(M),t(F),t(K),t(U),t(z),t(Y),t(j),t(q),t(J)}export{ie as GENERAL_SECTION_TO_BOX,_e as registerGeneralSectionRows};
1
+ import{hasWords as C,registerSectionToBox as t}from"../../../sections/section-to-box.js";import{BUTTON as m,DIM as g,DROP_COMMON as a,DROP_SIDE_PADDING as c,INNER_BOX as o,leadLine as v,SAME_KEYS as s,SECTION_BOX as d,TEXT as l,innerPad as T,siteGutterOf as A,innerPadKeys as y,smallText as O,wrapperPad as u,wrapperPadKeys as P}from"./section-to-box-row-parts.js";import{CARDS_SECTION_TO_BOX as H}from"./section-to-box-rows-cards.js";import{normalizeSiteGutterPhone as R,siteGutterPhoneFollows as X}from"../../../../../format/lib/content/page-width.js";import{finiteNumber as D}from"../../../../../format/lib/finite-number.js";import{STATS_SECTION_TO_BOX as L}from"./section-to-box-rows-stats.js";import{LOGOS_SECTION_TO_BOX as W}from"./section-to-box-rows-logos.js";import{STRIP_SECTION_TO_BOX as G}from"./section-to-box-rows-strip.js";import{TIMELINE_SECTION_TO_BOX as M}from"./section-to-box-rows-timeline.js";import{LOCATIONS_SECTION_TO_BOX as F}from"./section-to-box-rows-locations.js";import{HEAD_ONLY_SECTION_TO_BOX as K}from"./section-to-box-rows-head.js";import{PAGE_HEADER_SECTION_TO_BOX as U}from"./section-to-box-rows-pageheader.js";import{DOCBODY_SECTION_TO_BOX as z}from"./section-to-box-rows-docbody.js";import{EDITORIAL_SECTION_TO_BOX as Y}from"./section-to-box-rows-editorial.js";import{FORMS_SECTION_TO_BOX as j}from"./section-to-box-rows-forms.js";import{CHECKOUT_SECTION_TO_BOX as q}from"./section-to-box-rows-checkout.js";import{PROOF_SECTION_TO_BOX as J}from"./section-to-box-rows-proof.js";import{PROMO_SECTION_TO_BOX as Q}from"./section-to-box-rows-promo.js";import{FITMENT_SECTION_TO_BOX as V}from"./section-to-box-rows-fitment.js";import{fluidToken as Z,headTree as S,token as i}from"./section-head-looks.js";import{boxPadding as $}from"../../../../../format/lib/document/seed-parts.js";const _={top:72,bottom:72,topPhone:72,bottomPhone:72},ee={name:"Editorial Text",boxProps:e=>({...d,direction:"column",gap:28,gapPhone:28,sectionBorder:{top:1},...u(e,_)}),box:[["topBorder","sectionBorder",e=>e===!1?void 0:{top:1}],...s,...P(_)],parts:[S("Prose"),{kind:"text",key:"body",props:g,style:{textStyle:"body-1",...i("body",16),lineHeight:1.7,paragraphSpacing:18}}],drop:{...a,...c,headPlacement:"needs a row per head placement: an own-box Prose draws no head (its words sit in a Section Header above it), the row always draws the head. 0 of 123 live nodes store it (the live export, 2026-10-24)"}},f={buttonPaddingTop:20,buttonPaddingBottom:20,buttonPaddingLeft:28,buttonPaddingRight:28},w=(e,n)=>n?.variant==="primary",k=(e,n)=>({kind:"list",key:"buttons",name:"Button",flat:!0,when:e,parts:[{kind:"button",key:"label",href:"href",when:w,variant:"primary",style:{letterSpacing:.3},props:{...m,...f,...n}},{kind:"button",key:"label",href:"href",when:(r,p)=>!w(r,p),variant:"ghost",style:{letterSpacing:.3},props:{...m,...f,...n}}]}),h=e=>C(e.title),te={name:"Call-to-Action Heading",boxProps:e=>({...d,direction:"row",align:"center",justify:h(e)?"between":"end",gap:60,gapPhone:60,share:"content",sectionBorder:{bottom:1},...T(e,"TitleWithButtons")}),box:[...s,...y("TitleWithButtons")],parts:[{kind:"group",name:"Title",props:{...o,maxWidth:1e3,widthFitPhone:"fill"},parts:[{kind:"text",key:"title",role:"heading",props:l,style:{textStyle:"heading-1",...Z("headingLarge",48,7,108),case:"upper",lineHeight:.94,letterSpacing:-.035}}]},{kind:"group",name:"Buttons",props:e=>({...o,gap:14,gapPhone:14,widthFitPhone:"fill",...h(e)?{minWidth:280,minWidthPhone:0}:{}}),parts:[k(h,{widthFit:"fill",iconPosition:"end"}),k(e=>!h(e),{})]}],drop:{...a,buttonsAlign:"moves the buttons only when there is no heading (4 of 128 live nodes), where the Box puts them at the end. 0 of 128 live nodes store it (the live export, 2026-10-24)",buttonsAlignPhone:"the phone's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Phone view's Block alignment row), so nothing moves",buttonsAlignTablet:"the tablet's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Tablet view's Block alignment row, 0 stored on the US sites 2026-11-05), so nothing moves"}};function oe(e){const{siteGutter:n,siteGutterPhone:r}=e.site??{},p=A(e),b=Math.min(20,R(r)??X(n));return{sectionPaddingLeft:p,sectionPaddingRight:p,sectionPaddingLeftPhone:b,sectionPaddingRightPhone:b}}const B={top:40,bottom:64,topPhone:24,bottomPhone:36},ne={name:"Section Header",boxProps:(e,n)=>({...d,direction:"column",gap:0,...u(e,B),...oe(n)}),box:[...s,...P(B)],parts:[S("SectionHeader")],drop:{...a,...c,headStyle:"needs a row per head look: the row draws the standard look; the editorial, simple, statement, natural and essay looks are other layouts. 0 of 69 live nodes store it (the live export, 2026-10-24)",eyebrowLook:"read only by the simple, statement, natural and essay looks, which this row does not draw. 0 of 69 live nodes store it",rowGap:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",descriptionSize:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",numStyle:"Solid (the default; 4 of 69 live nodes store it) IS the eyebrow Text the row draws; Outlined (0 live) needs an outlined-number text look"}},x={...o,direction:"row",share:[67],gap:30},E={...o,sectionPaddingLeft:30,sectionPaddingLeftPhone:0},N=(e,n,r)=>({kind:"group",name:e,props:n,parts:[r]}),ie={name:"Lead Text",boxProps:e=>({...d,direction:"column",gap:40,gapPhone:40,sectionBorder:{bottom:1},...T(e,"ParagraphsA")}),box:[...s,...y("ParagraphsA")],parts:[{kind:"group",name:"Numbers",props:{...x,gapPhone:24,sectionBorder:{bottom:1},sectionPaddingBottom:40,sectionPaddingBottomPhone:40},parts:[{kind:"group",name:"Eyebrow",props:{...o,sectionPaddingTop:5,sectionPaddingBottom:1,sectionPaddingTopPhone:5,sectionPaddingBottomPhone:1},parts:[O("eyebrow",{color:"labels",...i("label",12),letterSpacing:.24})]},N("Stats column",o,{kind:"group",name:"Stats",props:{...E,gap:0,gapPhone:0},parts:[{kind:"list",key:"stats",name:"Stat",flat:!0,parts:[v("value","label",{...i("label",13),letterSpacing:.18,lineHeight:1.8})]}]})]},{kind:"group",name:"Words",props:{...x,gapPhone:28},parts:[{kind:"group",name:"Lead",props:o,parts:[{kind:"group",name:"Measure",props:{...o,maxWidth:780},parts:[{kind:"text",key:"lead",props:l,style:{textStyle:"heading-3",...i("headingSmall",22,20),weight:400,case:"none",lineHeight:1.45,letterSpacing:-.005}}]}]},N("Note column",{...o,justify:"end",widthFit:"fill"},{kind:"group",name:"Founders",props:{...E,gap:8,gapPhone:8},parts:[{kind:"group",name:"Note",props:{...o,gap:6,gapPhone:6},parts:[{kind:"text",key:"foundersHeading",props:l,style:{textStyle:"body-1",fontRole:"heading",...i("body",18,16),weight:500,letterSpacing:-.01,lineHeight:1.7}},{kind:"text",key:"foundersBody",props:g,style:{textStyle:"body-5",fontRole:"heading",...i("body",14,12),lineHeight:1.7}}]},O("attribution",{...i("label",12,10),letterSpacing:.24,lineHeight:1.7})]})]}],drop:{...a}},I={top:24,bottom:24,topPhone:24,bottomPhone:24},re={name:"Banner",boxProps:e=>({...d,direction:"column",gap:0,...u(e,I)}),box:[...s,"contained",...P(I)],parts:[{kind:"group",name:"Card",keepEmpty:!0,props:{...o,gap:28,placement:"top-left",darken:60,darkenStyle:"even",sectionBorder:{width:1},...$(64,40,40,24)},box:[["imageSrc","bgImage"],["overlay","darken",e=>Math.min(Math.max(D(e)??60,0),100)]],parts:[{kind:"group",name:"Words",props:{...o,gap:20},parts:[O("eyebrow"),{kind:"text",key:"title",role:"heading",props:{...l,maxWidth:680},style:{weight:500,lineHeight:1.05,letterSpacing:-.03,case:"none"}},{kind:"text",key:"body",props:{...g,maxWidth:680},style:{textStyle:"body-1",lineHeight:1.6},was:{size:16}}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:m}]}],drop:{...a,...c}},ae={Prose:ee,TitleWithButtons:te,SectionHeader:ne,ParagraphsA:ie,Banner:re};function Ee(){t(ae),t(L),t(W),t(H),t(G),t(M),t(F),t(K),t(U),t(z),t(Y),t(j),t(q),t(V),t(J),t(Q)}export{ae as GENERAL_SECTION_TO_BOX,Ee as registerGeneralSectionRows};
@@ -1 +1,2 @@
1
1
  export declare function markHeadCoreBoxes<T>(data: T): T;
2
+ export declare function dropEmptySourcedBoxes<T>(data: T): T;
@@ -1 +1 @@
1
- import{isNode as O,isNodeList as i}from"efficient-easel/data";import{storedStepsShown as g}from"../../components/ProcessSteps.js";import{declaredBlockSource as x}from"../../../format/lib/content/block-sources.js";import{HEAD_CORE_PROP as k,HOLDS_HEAD_CORE_PROP as f}from"../content/empty-hides.js";import{parseSectionHeadPlacement as P}from"../../../format/lib/sections/section-head-placement.js";const c="Flex",E="Text",m=r=>Object.values(r??{}).filter(i),p=r=>P(r.props?.headPlacement)==="own-box",u=r=>r===void 0||Array.isArray(r)&&r.length===0;function l(r){return r.type===E?!0:r.type===c&&m(r.props).every(t=>t.every(l))}const S={ProcessSteps:r=>u(r.boxes)&&g(r.steps).length===0,Logos:r=>!x(r)&&u(r.logos)&&u(r.items)};function a(r){const t=m(r.props).flat();return t.some(p)&&t.every(o=>p(o)||l(o))}function y(r){const t={...r.props};for(const[o,s]of Object.entries(r.props??{}))!i(s)||!s.some(e=>O(e)&&p(e))||(t[o]=s.map(e=>{if(!p(e))return e;const n=S[String(e.type)]?.(e.props??{})===!0;return{...e,props:{...e.props,[k]:n?"empty":!0}}}));return{...r,props:t}}function A(r){const o=Object.entries(r.props??{}).filter(([,e])=>i(e)).filter(([,e])=>e.length>0);if(o.length!==1||o[0][1].length!==1)return null;const s=o[0][1][0];return s?.type===c&&s.props?{key:o[0][0],inner:s}:null}function B(r){if(r?.type!==c||!r.props)return r;if(a(r)){const o=y(r);return{...o,props:{...o.props,[f]:!0}}}const t=A(r);return!t||!a(t.inner)?r:{...r,props:{...r.props,[t.key]:[y(t.inner)],[f]:!0}}}function L(r){const t=r;if(!t||!Array.isArray(t.content))return r;let o=!1;const s=t.content.map(e=>{const n=B(e);return n!==e&&(o=!0),n});return o?{...t,content:s}:r}export{L as markHeadCoreBoxes};
1
+ import{isNode as k,isNodeList as u}from"efficient-easel/data";import{storedStepsShown as w}from"../../components/ProcessSteps.js";import{declaredBlockSource as l,servedRows as A,sourcedRows as L}from"../../../format/lib/content/block-sources.js";import{rowHoldsContent as P}from"../../../format/lib/content/card-state.js";import{CARD_LIST_TYPE as B}from"../../../format/lib/content/card-template.js";import{wallRows as C}from"./blocks/general/Logos/wall-rows.js";import{HEAD_CORE_PROP as R,HOLDS_HEAD_CORE_PROP as a}from"../content/empty-hides.js";import{parseSectionHeadPlacement as _}from"../../../format/lib/sections/section-head-placement.js";const p="Flex",v="Text",i=r=>Object.values(r??{}).filter(u),H=r=>r.type===B&&l(r.props)!=="",y=r=>{if(r.type!==p)return!1;const t=i(r.props).flat();return t.length>0&&t.every(H)},c=r=>_(r.props?.headPlacement)==="own-box"||y(r),m=r=>r===void 0||Array.isArray(r)&&r.length===0;function x(r){return r.type===v?!0:r.type===p&&i(r.props).every(t=>t.every(x))}const g={ProcessSteps:r=>m(r.boxes)&&w(r.steps).length===0,Logos:r=>l(r)?b(r):m(r.logos)&&m(r.items)};function b(r){return A(r)!==null&&C(r,!1).length===0}function T(r){return i(r.props).flat().every(t=>!L(t.props,!1).rows.some(P))}function f(r){const t=i(r.props).flat();return t.some(c)&&t.every(o=>c(o)||x(o))}function S(r){const t={...r.props};for(const[o,s]of Object.entries(r.props??{}))!u(s)||!s.some(e=>k(e)&&c(e))||(t[o]=s.map(e=>{if(!c(e))return e;const n=y(e)?T(e):g[String(e.type)]?.(e.props??{})===!0;return{...e,props:{...e.props,[R]:n?"empty":!0}}}));return{...r,props:t}}function E(r){const o=Object.entries(r.props??{}).filter(([,e])=>u(e)).filter(([,e])=>e.length>0);if(o.length!==1||o[0][1].length!==1)return null;const s=o[0][1][0];return s?.type===p&&s.props?{key:o[0][0],inner:s}:null}function h(r){if(r?.type!==p||!r.props)return r;if(f(r)){const o=S(r);return{...o,props:{...o.props,[a]:!0}}}const t=E(r);return!t||!f(t.inner)?r:{...r,props:{...r.props,[t.key]:[S(t.inner)],[a]:!0}}}function q(r){const t=r;if(!t||!Array.isArray(t.content))return r;let o=!1;const s=t.content.map(e=>{const n=h(e);return n!==e&&(o=!0),n});return o?{...t,content:s}:r}const d=r=>g[String(r.type)]?.(r.props??{})===!0;function j(r){if(r.type!==p||!r.props)return!1;const t=f(r)?null:E(r),o=t?t.inner:r;if(!f(o))return!1;const s=i(o.props).flat().filter(c);return s.some(e=>l(e.props)!=="")&&s.every(d)}function O(r){let t;for(const[o,s]of Object.entries(r.props??{})){if(!u(s))continue;const e=s,n=D(e);n!==e&&((t??={...r.props})[o]=n)}return t?{...r,props:t}:r}function D(r){let t=!1;const o=[];for(const s of r){if(j(s)){t=!0;continue}const e=O(s);e!==s&&(t=!0),o.push(e)}return t?o:r}function z(r){const t=r;if(!t||!Array.isArray(t.content))return r;let o=!1;const s=t.content.map(e=>{if(h(e)!==e)return e;const n=O(e);return n!==e&&(o=!0),n});return o?{...t,content:s}:r}export{z as dropEmptySourcedBoxes,q as markHeadCoreBoxes};
@@ -12,8 +12,8 @@ export declare const VIDEO_FILE_LABEL = "Video file";
12
12
  export declare const VIDEO_FILE_PROMPT = "Upload a video file";
13
13
  export declare function forMediaType(type: "image" | "video", fallback: "image" | "video"): {
14
14
  readonly field: "mediaType";
15
- readonly is: "image" | "video";
16
- readonly default: "image" | "video";
15
+ readonly is: "video" | "image";
16
+ readonly default: "video" | "image";
17
17
  };
18
18
  export declare const HERO_MEDIA_PART_TYPES: ReadonlySet<string>;
19
19
  export declare function inPart<F extends object>(part: HeroMediaPart, field: F): F;
@@ -1 +1 @@
1
- "use client";import{jsx as t}from"react/jsx-runtime";import{Render as a}from"efficient-easel/render";import{capHeroGroups as c}from"../../../format/lib/document/cap-hero-groups.js";import{BelowFirstScreen as p,LATER_SLIDES_KEY as f,firstScreenLead as d,laterSlideIdsOf as g,useLeadDrawsFirst as S}from"../first-screen.js";import{markListSearchScopes as l}from"../../../format/lib/document/list-search-scopes.js";import{markHeadCoreBoxes as h}from"./head-core-boxes.js";import{oneH1 as u}from"../../../format/lib/document/one-h1.js";import{withPageContents as w}from"../content/page-contents.js";import{migrateLegacyPageData as L}from"./migrate-legacy.js";import{migrateRenamedProps as O}from"../../../format/lib/document/renamed-props.js";import{convertSectionsInPage as _,SECTION_TO_BOX_ON as P}from"../sections/section-to-box.js";import{siteThemeOf as R}from"../../../format/lib/theme.js";import{registerGeneralSectionRows as x}from"./blocks/general/section-to-box-rows.js";import{withSlotCounts as C}from"./slot-counts.js";function E({config:m,data:i,metadata:r}){x();const e=w(l(h(u(c(_(O(L(i)),P,{theme:R(r)})))))),n=S(m,d(e.content)),o=g(e.content),s=o.length>0?{...r,[f]:o}:r;return t(p,{children:t(a,{config:n,metadata:C(s,e.content),data:e})})}export{E as default};
1
+ "use client";import{jsx as t}from"react/jsx-runtime";import{Render as s}from"efficient-easel/render";import{capHeroGroups as p}from"../../../format/lib/document/cap-hero-groups.js";import{BelowFirstScreen as c,LATER_SLIDES_KEY as f,firstScreenLead as d,laterSlideIdsOf as l,useLeadDrawsFirst as S}from"../first-screen.js";import{markListSearchScopes as g}from"../../../format/lib/document/list-search-scopes.js";import{dropEmptySourcedBoxes as u,markHeadCoreBoxes as h}from"./head-core-boxes.js";import{oneH1 as L}from"../../../format/lib/document/one-h1.js";import{withPageContents as w}from"../content/page-contents.js";import{markWallLabels as O}from"./wall-labels.js";import{migrateLegacyPageData as _}from"./migrate-legacy.js";import{migrateRenamedProps as x}from"../../../format/lib/document/renamed-props.js";import{convertSectionsInPage as E,SECTION_TO_BOX_ON as P}from"../sections/section-to-box.js";import{siteThemeOf as R}from"../../../format/lib/theme.js";import{registerGeneralSectionRows as B}from"./blocks/general/section-to-box-rows.js";import{withSlotCounts as C}from"./slot-counts.js";function I({config:m,data:i,metadata:e}){B();const r=O(w(g(h(u(L(p(E(x(_(i)),P,{theme:R(e)})))))))),n=S(m,d(r.content)),o=l(r.content),a=o.length>0?{...e,[f]:o}:e;return t(c,{children:t(s,{config:n,metadata:C(a,r.content),data:r})})}export{I as default};
@@ -1 +1 @@
1
- import{jsx as l}from"react/jsx-runtime";import{HideTaker as u}from"../../../components/ViewHideRoot.js";import{INTRO_EDGE_CLASS as U}from"../../../../format/lib/sections/intro-bleed-layout.js";import{resolveContainerDirection as $}from"../../../../format/lib/content/container-direction.js";import{HERO_BACKGROUND_VAR as Y,HERO_CHROME_CAP_VAR as K,HERO_CHROME_INSET_VAR as j,SITE_WIDTH_CAP as _,centredCap as g,heroBackgroundTokens as X}from"../../../../format/lib/content/page-width.js";import{SECTION_WIDTH_FAMILY as B,SECTION_WIDTH_KEYS as v,hasOwnSectionWidth as q,hasWidthFamily as z,resolveWidth as G,siteWidthsOf as J}from"../../../../format/lib/content/section-width.js";import{BOX_GUTTER_KEY as Q,boxGutterOf as Z,boxPlaceOf as tt,boxRunsEdgeToEdge as nt,isFrameContainer as w,ownNodeWidth as et,siteDrawsGutter as ot}from"../../../../format/lib/content/site-gutter.js";import{getEditorSiteContentWidth as it}from"../../../../format/lib/document/editor-site-widths.js";import{NestedBoxChoice as ct,SectionGroupChoice as rt,SectionGroupWidthsProvider as lt,SectionRootChoice as dt,SplitBandAndColumn as D}from"../../../components/SiteGutterFrame.js";import{FRAME as F}from"../../../components/BlockFrame.js";import{sectionFillPassClass as H}from"../../../../format/lib/content/section-min-height.js";import{parentCapsWidth as ut}from"../../../../format/lib/sections/section-head-placement.js";import{addShowWhenFacts as E,withRowsShownWhen as O}from"../../../../format/lib/document/show-when-attach.js";import{findParentNode as st,heldByANode as at,isNestedNode as ft,NOT_HELD_BY_A_NODE as M}from"../../../../format/lib/document/passes/document-position.js";const C="--sf-sw-site",ht="--sf-sw-content",_t="--sf-bg-cap",Nt="contents [--sf-site-width:var(--sf-sw-content)] max-view-wide:[--sf-site-width:var(--sf-sw-site)]",p=({own:t,content:n,siteContent:e})=>t===!0&&n==="full"&&e!=="full",L="contents view-wide:[--sf-site-width:100vw]",A=({held:t},n,e)=>t?e:l(u,{className:n,children:e}),wt=`contents view-wide:[--sf-site-width:100vw] ${U} view-wide:[--sf-site-gutter:var(--intro-edge)]`,W=(t,n)=>n==="content"?`min(${t}px,var(${C}))`:`${t}px`;function T({content:t,contentMax:n},e){return t==="full"?e!=="content"?"100vw":null:n===null?null:W(n,e)}function S(t,n){return n===null?t:l(u,{className:"contents",style:{[C]:_},children:l(u,{className:Nt,style:{[ht]:n},children:t})})}const Et="--sf-content-cap",Ot="contents max-view-wide:[--sf-content-cap:none]";function Ct({content:t,contentMax:n},e){return t==="full"?null:n!==null?W(n,e):e==="content"?null:`var(${C})`}function Tt(t,n){return n===null?t:l(u,{className:"contents",style:{[C]:_},children:l(u,{className:Ot,style:{[Et]:n},children:t})})}const a=(t,n,e="")=>t==="content"?l(u,{className:e||void 0,style:g(_),children:n}):n;function P(t,n,e,o,i){if(p(e))return a(o,A(e,L,l(D,{children:t({...n,contained:!0})})),i);if(e.content==="full")return a(o,t({...n,contained:!1}),i);const c=T(e,o);return o==="content"&&c===null&&!e.own?t({...n,contained:!0}):a(o,S(l(D,{children:t({...n,contained:!0})}),c),i)}function k(t,n,e,o){if(e==="hero"){const r=S(t(n),T(o,o.band));return o.band==="full"?l(u,{style:{[Y]:"none",[j]:"initial",[K]:"initial"},children:r}):o.band==="content"?l(u,{style:X(!0),children:r}):r}const i=o.band??"full",c=H(n);if(e==="rawMarkup"){if(o.content==="full")return a(i,t(n),c);const r=o.contentMax===null?_:W(o.contentMax,i);return l(u,{className:"contents",style:{[C]:_},children:a(i,l(u,{className:c||void 0,style:g(r),children:t(n)}),c)})}if(e==="scrollOver"){const r=o.content==="full",d=p(o)?A(o,wt,t({...n,fullWidth:!1})):S(t({...n,fullWidth:r}),r?null:T(o,i));return i==="content"?l(u,{className:"contents",style:{[_t]:_},children:d}):d}switch(e){case"both":return a(i,Tt(t(n),Ct(o,i)),c);case"contained":return P(t,n,o,i,c);case"contentColumn":case"contentFull":case"productGrid":{const r=p(o),d=o.content==="full"&&!r?"full":"page",s=r?A(o,L,t({...n,widthMode:d})):S(t({...n,widthMode:d}),o.content==="full"?null:T(o,i));return e==="productGrid"&&!o.own?i==="content"?l(u,{className:c?`${F} ${c}`:F,children:s}):s:a(i,s,c)}default:return a(i,S(t(n),T(o,i)),c)}}function St(t,n){const e=B[n],o=t.render;t.render=i=>{const c=J(i),r={band:c.background,content:c.content??"content",contentMax:null},d=()=>e==="rawMarkup"?o(i):l(rt,{draw:h=>{const N=h?{...r,band:h.background==="content"?r.band:h.background??r.band,content:h.content??r.content,own:h.background==="full"||h.content!==null,held:!0,siteContent:r.content}:r,R=k(o,i,e,N);if(!w(n))return R;const b=Z(i),I=b===void 0?N.content:b?"content":"full";return I===N.content?R:l(ct,{atTop:R,nested:P(o,i,{...N,content:I,own:!1},N.band??"full",H(i))})}}),s=et(n,i);if(!q(s))return d();const f=e==="rawMarkup",m=s.background??(f?"full":c.background),V=s.content??(f?"full":r.content),x={band:m,content:m==="content"?"content":V,contentMax:s.contentMax,own:!f,siteContent:r.content};return l(dt,{own:()=>l(lt,{value:{background:x.band,content:x.content},children:k(o,i,e,x)}),followed:d})}}const mt={all:[M,{not:{context:"runsEdgeToEdge",is:!0}}]},$t={name:"sectionWidth",applies:(t,n,e)=>z(t)&&!!e&&typeof e.render=="function",panel(t,n,e){const o=e.sectionOwnWidthFields({drawsFullOnItsOwn:B[n]==="rawMarkup"}),i=w(n)?e.boxGutterFields():{},c={...t.fields,...i,...o},r=w(n)?y(n,t,c,[Q]):c;E(t,{heldByANode:at}),w(n)&&E(t,{runsEdgeToEdge:d=>nt(d.props??{})}),t.fields=O(r,[v.background,v.content],w(n)?mt:M)},draw(t,n){St(t,n)}};function xt(t,n){if(!t||!("widthMode"in t))return t;const e={...t},o=e.widthMode;return o&&(e.widthMode={...o,currentValue:n.mode,inherited:n.inherited}),e}const Rt=new Set(["Heading","Text","ImageBlock","ButtonBlock"]),Yt={name:"containedWidth",applies:(t,n,e)=>Rt.has(t)&&!!e&&typeof e.render=="function",panel(t,n,e){const o=e.widthField;t.fields=y(n,t,{...t.fields,...o("page")});const i=t.resolveFields;t.resolveFields=(c,r)=>{const d=i?i(c,r):r.fields,s=G(c?.props??{},"page"),f=m=>xt(m,s);return d&&typeof d.then=="function"?d.then(f):f(d)}},draw(t){const n=t.render;t.render=e=>{const{mode:o}=G(e,"page");return n({...e,contained:o!=="full"})}}},pt={not:{context:"inHeroGroupRow",is:!0}},Kt={name:"buttonAlignInRow",applies:t=>t==="ButtonBlock",panel(t){const n=t;n.fields=O(n.fields??{},["align"],pt),E(n,{inHeroGroupRow:(e,o)=>{const i=st(o.appState,e.props?.id);return!!i&&i.type==="HeroGroup"&&$("HeroGroup",i.props?.direction)==="row"}})}};function At(t){return Object.values(t).some(n=>!!n&&typeof n=="object"&&n.type==="slot")}const Wt={any:[]},bt={all:[{not:{context:"outsideBox",is:!0}},{not:{context:"insideSiteGutter",is:!0}}]},It={not:{context:"widthCappedByParent",is:!0}};function y(t,n,e,o=["widthMode"]){if(t==="ButtonBlock")return O(e,["_gWidth",...o],Wt);if(At(e)){const i=(c,r)=>tt(r.appState?.data?.content,c.props?.id,ot(it()));return E(n,{outsideBox:(c,r)=>i(c,r)?.inBox!==!0,insideSiteGutter:(c,r)=>i(c,r)?.insideGutter}),O(e,o,bt)}return E(n,{widthCappedByParent:(i,c)=>"parent"in c?ut(c.parent):ft({props:i.props??{}},c)}),O(e,o,It)}export{_t as SECTION_BACKGROUND_VAR,Ot as SECTION_CONTENT_CAP_CLASS,Et as SECTION_CONTENT_CAP_VAR,Nt as SECTION_CONTENT_CLASS,ht as SECTION_CONTENT_VAR,C as SITE_CONTENT_VAR,Kt as buttonAlignInRow,Yt as containedWidth,$t as sectionWidth,xt as widthModeFields};
1
+ import{jsx as l}from"react/jsx-runtime";import{HideTaker as u}from"../../../components/ViewHideRoot.js";import{INTRO_EDGE_CLASS as K}from"../../../../format/lib/sections/intro-bleed-layout.js";import{resolveContainerDirection as j}from"../../../../format/lib/content/container-direction.js";import{HERO_BACKGROUND_VAR as X,HERO_CHROME_CAP_VAR as q,HERO_CHROME_INSET_VAR as z,FULL_SECTION_WIDTH as J,SITE_WIDTH_CAP as _,centredCap as B,heroBackgroundTokens as Q}from"../../../../format/lib/content/page-width.js";import{SECTION_WIDTH_FAMILY as v,SECTION_WIDTH_KEYS as G,hasOwnSectionWidth as Z,hasWidthFamily as tt,resolveWidth as D,siteWidthsOf as nt}from"../../../../format/lib/content/section-width.js";import{BOX_GUTTER_KEY as et,boxGutterOf as ot,boxPlaceOf as it,boxRunsEdgeToEdge as ct,isFrameContainer as E,ownNodeWidth as rt,siteDrawsGutter as lt}from"../../../../format/lib/content/site-gutter.js";import{getEditorSiteContentWidth as dt}from"../../../../format/lib/document/editor-site-widths.js";import{GroundStopsAt as F,NestedBoxChoice as ut,SectionGroupChoice as st,SectionGroupWidthsProvider as at,SectionRootChoice as ft,SplitBandAndColumn as H}from"../../../components/SiteGutterFrame.js";import{FRAME as L}from"../../../components/BlockFrame.js";import{sectionFillPassClass as M}from"../../../../format/lib/content/section-min-height.js";import{parentCapsWidth as ht}from"../../../../format/lib/sections/section-head-placement.js";import{addShowWhenFacts as O,withRowsShownWhen as C}from"../../../../format/lib/document/show-when-attach.js";import{findParentNode as _t,heldByANode as Nt,isNestedNode as wt,NOT_HELD_BY_A_NODE as k}from"../../../../format/lib/document/passes/document-position.js";const N="--sf-sw-site",Tt="--sf-sw-content",Et="--sf-bg-cap",Ot="contents [--sf-site-width:var(--sf-sw-content)] max-view-wide:[--sf-site-width:var(--sf-sw-site)]",A=({own:t,content:n,siteContent:e})=>t===!0&&n==="full"&&e!=="full",P="contents view-wide:[--sf-site-width:100vw]",W=({held:t},n,e)=>t?e:l(u,{className:n,children:e}),Ct=`contents view-wide:[--sf-site-width:100vw] ${K} view-wide:[--sf-site-gutter:var(--intro-edge)]`,p=(t,n)=>n==="content"?`min(${t}px,var(${N}))`:`${t}px`;function S({content:t,contentMax:n},e){return t==="full"?e!=="content"?J:null:n===null?null:p(n,e)}function m(t,n){return n===null?t:l(u,{className:"contents",style:{[N]:_},children:l(u,{className:Ot,style:{[Tt]:n},children:t})})}const St="--sf-content-cap",mt="contents max-view-wide:[--sf-content-cap:none]";function Rt({content:t,contentMax:n},e){return t==="full"?null:n!==null?p(n,e):e==="content"?null:`var(${N})`}function xt(t,n){return n===null?t:l(u,{className:"contents",style:{[N]:_},children:l(u,{className:mt,style:{[St]:n},children:t})})}const y=`var(${N},${_})`,f=(t,n,e="")=>t==="content"?l(u,{className:e||void 0,style:B(_),children:l(F,{ground:y,children:n})}):n;function U(t,n,e,o,i){if(A(e))return f(o,W(e,P,l(H,{children:t({...n,contained:!0})})),i);if(e.content==="full")return f(o,t({...n,contained:!1}),i);const c=S(e,o);return o==="content"&&c===null&&!e.own?t({...n,contained:!0}):f(o,m(l(H,{children:t({...n,contained:!0})}),c),i)}function V(t,n,e,o){if(e==="hero"){const r=m(t(n),S(o,o.band));return o.band==="full"?l(u,{style:{[X]:"none",[z]:"initial",[q]:"initial"},children:r}):o.band==="content"?l(u,{style:Q(!0),children:r}):r}const i=o.band??"full",c=M(n);if(e==="rawMarkup"){if(o.content==="full")return f(i,t(n),c);const r=o.contentMax===null?_:p(o.contentMax,i);return l(u,{className:"contents",style:{[N]:_},children:f(i,l(u,{className:c||void 0,style:B(r),children:t(n)}),c)})}if(e==="scrollOver"){const r=o.content==="full",d=A(o)?W(o,Ct,t({...n,fullWidth:!1})):m(t({...n,fullWidth:r}),r?null:S(o,i));return i==="content"?l(u,{className:"contents",style:{[Et]:_},children:d}):d}switch(e){case"both":return f(i,xt(t(n),Rt(o,i)),c);case"contained":return U(t,n,o,i,c);case"contentColumn":case"contentFull":case"productGrid":{const r=A(o),d=o.content==="full"&&!r?"full":"page",a=r?W(o,P,t({...n,widthMode:d})):m(t({...n,widthMode:d}),o.content==="full"?null:S(o,i));return e==="productGrid"&&!o.own?i==="content"?l(u,{className:c?`${L} ${c}`:L,children:a}):a:f(i,a,c)}default:return f(i,m(t(n),S(o,i)),c)}}function At(t,n){const e=v[n],o=t.render;t.render=i=>{const c=nt(i),r={band:c.background,content:c.content??"content",contentMax:null},d=()=>e==="rawMarkup"?o(i):l(st,{draw:s=>s?.background==="content"?l(F,{ground:y,children:a(s)}):a(s)}),a=s=>{const T=s?{...r,band:s.background==="content"?r.band:s.background??r.band,content:s.content??r.content,own:s.background==="full"||s.content!==null,held:!0,siteContent:r.content}:r,x=V(o,i,e,T);if(!E(n))return x;const b=ot(i),g=b===void 0?T.content:b?"content":"full";return g===T.content?x:l(ut,{atTop:x,nested:U(o,i,{...T,content:g,own:!1},T.band??"full",M(i))})},h=rt(n,i);if(!Z(h))return d();const w=e==="rawMarkup",I=h.background??(w?"full":c.background),Y=h.content??(w?"full":r.content),R={band:I,content:I==="content"?"content":Y,contentMax:h.contentMax,own:!w,siteContent:r.content};return l(ft,{own:()=>l(at,{value:{background:R.band,content:R.content},children:V(o,i,e,R)}),followed:d})}}const Wt={all:[k,{not:{context:"runsEdgeToEdge",is:!0}}]},Xt={name:"sectionWidth",applies:(t,n,e)=>tt(t)&&!!e&&typeof e.render=="function",panel(t,n,e){const o=e.sectionOwnWidthFields({drawsFullOnItsOwn:v[n]==="rawMarkup"}),i=E(n)?e.boxGutterFields():{},c={...t.fields,...i,...o},r=E(n)?$(n,t,c,[et]):c;O(t,{heldByANode:Nt}),E(n)&&O(t,{runsEdgeToEdge:d=>ct(d.props??{})}),t.fields=C(r,[G.background,G.content],E(n)?Wt:k)},draw(t,n){At(t,n)}};function pt(t,n){if(!t||!("widthMode"in t))return t;const e={...t},o=e.widthMode;return o&&(e.widthMode={...o,currentValue:n.mode,inherited:n.inherited}),e}const It=new Set(["Heading","Text","ImageBlock","ButtonBlock"]),qt={name:"containedWidth",applies:(t,n,e)=>It.has(t)&&!!e&&typeof e.render=="function",panel(t,n,e){const o=e.widthField;t.fields=$(n,t,{...t.fields,...o("page")});const i=t.resolveFields;t.resolveFields=(c,r)=>{const d=i?i(c,r):r.fields,a=D(c?.props??{},"page"),h=w=>pt(w,a);return d&&typeof d.then=="function"?d.then(h):h(d)}},draw(t){const n=t.render;t.render=e=>{const{mode:o}=D(e,"page");return n({...e,contained:o!=="full"})}}},bt={not:{context:"inHeroGroupRow",is:!0}},zt={name:"buttonAlignInRow",applies:t=>t==="ButtonBlock",panel(t){const n=t;n.fields=C(n.fields??{},["align"],bt),O(n,{inHeroGroupRow:(e,o)=>{const i=_t(o.appState,e.props?.id);return!!i&&i.type==="HeroGroup"&&j("HeroGroup",i.props?.direction)==="row"}})}};function gt(t){return Object.values(t).some(n=>!!n&&typeof n=="object"&&n.type==="slot")}const Bt={any:[]},vt={all:[{not:{context:"outsideBox",is:!0}},{not:{context:"insideSiteGutter",is:!0}}]},Gt={not:{context:"widthCappedByParent",is:!0}};function $(t,n,e,o=["widthMode"]){if(t==="ButtonBlock")return C(e,["_gWidth",...o],Bt);if(gt(e)){const i=(c,r)=>it(r.appState?.data?.content,c.props?.id,lt(dt()));return O(n,{outsideBox:(c,r)=>i(c,r)?.inBox!==!0,insideSiteGutter:(c,r)=>i(c,r)?.insideGutter}),C(e,o,vt)}return O(n,{widthCappedByParent:(i,c)=>"parent"in c?ht(c.parent):wt({props:i.props??{}},c)}),C(e,o,Gt)}export{Et as SECTION_BACKGROUND_VAR,mt as SECTION_CONTENT_CAP_CLASS,St as SECTION_CONTENT_CAP_VAR,Ot as SECTION_CONTENT_CLASS,Tt as SECTION_CONTENT_VAR,N as SITE_CONTENT_VAR,zt as buttonAlignInRow,qt as containedWidth,Xt as sectionWidth,pt as widthModeFields};
@@ -0,0 +1,3 @@
1
+ export declare const WALL_LABEL_ID_PROP = "_wallLabelId";
2
+ export declare const WALL_LABELLED_BY_PROP = "_wallLabelledBy";
3
+ export declare function markWallLabels<T>(data: T): T;
@@ -0,0 +1 @@
1
+ import{isNodeList as i}from"efficient-easel/data";import{readHidable as f}from"efficient-easel/draw";const a="_wallLabelId",u="_wallLabelledBy",s=t=>t.props?.id==null?"":String(t.props.id);function L(t){if(!t||t.type!=="Text"||!s(t))return!1;const o=f(t.props?.text);return!o.hidden&&o.text.trim()!==""}const m=t=>!!t&&t.type==="Logos"&&t.props?.look==="marks"&&s(t)!=="",l=(t,o,e)=>({...t,props:{...t.props,[o]:e}});function p(t){let o=null;t.forEach((r,n)=>{const c=d(r);c!==r&&((o??=t.slice())[n]=c)});const e=o??t;for(let r=1;r<e.length;r++){if(!m(e[r])||!L(e[r-1]))continue;const n=`sf-wall-label-${s(e[r-1])}`;o??=t.slice(),o[r-1]=l(o[r-1],a,n),o[r]=l(o[r],u,n)}return o??t}function d(t){let o;for(const[e,r]of Object.entries(t.props??{})){if(!i(r))continue;const n=p(r);n!==r&&((o??={...t.props})[e]=n)}return o?{...t,props:o}:t}function x(t){const o=t;if(!o||!Array.isArray(o.content))return t;const e=p(o.content);return e===o.content?t:{...o,content:e}}export{u as WALL_LABELLED_BY_PROP,a as WALL_LABEL_ID_PROP,x as markWallLabels};
@@ -180,6 +180,7 @@ export declare function sectionBoxIdOf(oldId: string, piece: number): string;
180
180
  export declare function registerBoxNativeSections(types: Readonly<Record<string, string>>): void;
181
181
  export declare function boxNativeReason(type: string): string | undefined;
182
182
  export declare const SECTION_TO_BOX_ON: readonly string[];
183
+ export declare const HOST_PRESS_TYPES: readonly string[];
183
184
  export declare const SECTION_TO_BOX_PRESS: readonly string[];
184
185
  export declare function registerSectionToBox(rows: Readonly<Record<string, SectionToBoxRow>>): void;
185
186
  export declare function sectionToBoxRow(type: string): SectionToBoxRow | undefined;
@@ -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}from"../../../format/lib/sections/section-head-placement.js";import{finiteNumber as R}from"../../../format/lib/finite-number.js";import{accentItalicRuns as ie}from"../../../format/lib/markup.js";import{seedNodes as re}from"../../../format/lib/document/seed-parts.js";import{bucketByGroup as ae}from"../../../format/lib/locations-grid.js";import{normalizeTheme as G}from"../../../format/lib/theme.js";const E=ee,v=te;function Be(t){if(t.theme)return G(t.theme);const o=t.site?.themePresets;return o?G({selected:t.site?.selectedPreset??0,themes:[...o]}):void 0}function ce(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 Te(t){for(const[o,i]of Object.entries(t)){if(o in A&&A[o]!==i)throw new Error(`lib/sections/section-to-box: "${o}" is already Box-native`);A[o]=i}}function _e(t){return A[t]}const V=new Set(["id"]),T={},C=[],fe=["Breadcrumb","DocBody","Form","SubmitBuild","Footprint","FAQ","ProductGrid","Stats","Logos","PaymentBadges","FitmentFinder","DocMasthead","Timeline","TimelineTrack","OrderSummary"];function Pe(t){for(const[o,i]of Object.entries(t)){if(o in T&&T[o]!==i)throw new Error(`lib/sections/section-to-box: "${o}" already has a row`);T[o]=i}}function Ee(t){return T[t]}function ve(){return Object.keys(T)}function de(t){return t in T&&C.includes(t)}function je(t,o=fe){return t in T&&(o.includes(t)||de(t))}function Ne(t){const o=se[t];if(!o)throw new Error(`lib/sections/section-to-box: "${t}" has no head row in SPLITTABLE_SECTIONS`);const i=[{kind:"text",key:o.num,role:"eyebrow"},{kind:"text",key:o.title,role:"heading"}];return o.description&&i.push({kind:"text",key:o.description,role:"body"}),o.headRows.includes("linkText")&&o.headRows.includes("linkHref")&&i.push({kind:"button",key:"linkText",href:"linkHref"}),i}const H=t=>Z(t),Ie=t=>H(t).text.trim()!=="";function le(t){if(t.includes("=="))return t;const o=t.indexOf("/"),i=o===-1?t:t.slice(0,o),r=i.trim();if(!r)return t;const m=i.indexOf(r);return`${i.slice(0,m)}==${r}==${i.slice(m+r.length)}${o===-1?"":t.slice(o)}`}const pe=t=>t==="heading"?oe():t==="eyebrow"?ne():{};function ue(t,o,i,r){const a={...t._partStyles?.text??{},...o??{},...i??{}};return(r==="center"||r==="right")&&a.align===void 0&&(a.align=r),Object.keys(a).length?{_partStyles:{text:a}}:{}}function he(t,o){if(t===void 0)return{};if(typeof t=="string")return{variant:t};const i=o[t.key];return{variant:typeof i=="string"&&Object.hasOwn(t.map,i)?t.map[i]:t.fallback}}function Y(t,o,i,r,m={}){const a={...o};for(const h of t){const[k,B,j]=typeof h=="string"?[h,h,void 0]:h;if(i[k]===void 0)continue;const _=j?j(i[k],i,m):i[k];_===void 0?delete a[B]:a[B]=_,r(k,B,_===void 0)}return a}function ye(t){const o=new Set([...V,"headPlacement","_partStyles",...Object.keys(t.drop??{}),...Object.keys(t.reads??{})]),i=m=>{for(const a of m??[])o.add(typeof a=="string"?a:a[0])},r=m=>{for(const a of m)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":i(a.box),r(a.parts??[]);break;case"core":if(a.keep!=="rest"&&a.keep.forEach(h=>o.add(h)),Object.keys(a.rename??{}).forEach(h=>o.add(h)),a.derive?.reads.forEach(h=>o.add(h)),typeof a.slots!="function")for(const h of Object.values(a.slots??{}))for(const k of h)"kind"in k&&o.add(k.key);break}};for(const m of[t,...t.also??[]])i(m.box),r(m.parts);return o}function Q(t,o,i={}){const r=t.props,m=o.skip?.(r);if(m!==void 0)return{node:t,nodes:[t],carried:[],dropped:[],siteWrites:[],restyled:[],skipped:m};const a=String(r.id??t.type),h=[],k=[],B=[],j=new Set,_=(n,s)=>{h.push({key:n,home:s}),j.add(n)},X=r._partStyles??{},L=ye(o);let K=0;const $=(n,s)=>({type:n,props:{...s,id:`${a}~${n}-${++K}`}}),M=(n,s,b,y,g,d,w)=>{if(g){for(const c of n??[]){const p=typeof c=="string"?c:c[0];b[p]!==void 0&&w(p,`nothing — the ${y} has no parts, so it is not drawn`)}return}const e=typeof s=="function"?s(r,i):s??{};return Y(n??[],e,b,(c,p,f)=>w(c,f?`nothing — the old value draws nothing (${y}: no ${p})`:`${d}${y}: ${p}`),i)},q=n=>re(n,s=>`${a}~${s}-${++K}`),W=(n,s,b)=>{const y=n.of?n.of(s):Array.isArray(s[n.key])?s[n.key]:[],g=typeof n.props=="function"?n.props(r,i):n.props??{},d=y.map((f,x)=>{const l=f??{},u=n.item?.(l,x,r)??{},O=N(u.reverse?[...n.parts].reverse():n.parts,l,!1,`item ${x+1}: `);return n.flat?u.props?O.map(P=>({...P,props:{...P.props,...u.props,id:P.props.id}})):O:[$(E,{name:`${n.name} ${x+1}`,...g,...u.props??{},[v]:O})]});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,l)=>{const u=x.items.map(S=>S.item),O=f.parts?N(f.parts,f.head?.(u,r)??{},!1,`group ${l+1}: `):[],P=x.items.map(S=>d[S.index]),F=f.perRow?.(u.length,r),I=Number.isInteger(F)&&F>=1?F:1,z=[];if(f.perRow&&I<P.length)for(let S=0;S*I<P.length;S++)z.push(P.slice(S*I,(S+1)*I).flat());return $(E,{name:`${f.name} ${l+1}`,...f.props??{},[v]:[...O,$(E,{name:`${f.itemsName} ${l+1}`,...f.itemsProps?.(u.length,r)??{},[v]:z.length?z.map((S,U)=>$(E,{name:`${f.rowName??`${f.itemsName} row`} ${U+1}`,...f.rowProps??{},[v]:S})):P.flat()})]})})}const w=n.perRow?.(r),e=n.perRow?Number.isInteger(w)&&w>=1?w: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 d.flat();const c=typeof n.rowProps=="function"?n.rowProps(r,i):n.rowProps??{},p=[];for(let f=0;f*e<d.length;f++){const x=d.slice(f*e,(f+1)*e).flat(),l=n.rowFiller?e-d.slice(f*e,(f+1)*e).length:0;p.push($(E,{name:`${n.rowName??`${n.name} row`} ${f+1}`,...c,[v]:[...x,...Array.from({length:l},(u,O)=>$(E,{name:`Empty ${O+1}`,...n.rowFiller,[v]:[]}))]}))}return p},N=(n,s,b,y)=>{const g=[],d=(e,c)=>b?_(e,c):void 0,w=e=>b?X[e]:void 0;for(const e of n)if(!(e.when&&!e.when(r,b?void 0:s)))switch(e.kind){case"text":{const c=H(s[e.key]);if(!c.text.trim()&&!(b&&i.press&&o.pressKeepsEmpty?.includes(e.key))){d(e.key,"nothing — empty words draw nothing, so no block");break}const p=pe(e.role??"body"),{_partStyles:f,...x}=p,l=ue(p,e.styleFrom?{...e.style,...e.styleFrom(r,i)}:e.style,w(e.key),e.props?.align);if(e.was&&b){const u=l._partStyles?.text??{};B.push({key:e.key,was:e.was,...typeof u.textStyle=="string"?{textStyle:u.textStyle}:{},...R(u.size)!==void 0?{size:R(u.size)}:{},...R(u.sizePhone)!==void 0?{sizePhone:R(u.sizePhone)}:{}})}g.push($("Text",{text:e.mark==="accentLead"?le(c.text):e.mark==="accentItalic"?ie(c.text):c.text,...x,...e.props??{},...l,...c.hidden?{_hidden:!0}:{}})),d(e.key,`${y}Text block: its words${c.hidden?", hidden":""}`);break}case"button":{const c=H(s[e.key]);if(!c.text.trim()){d(e.key,"nothing — no words, no button"),d(e.href,"nothing — no button to link"),typeof e.variant=="object"&&d(e.variant.key,"nothing — no button to style");break}const p=typeof s[e.href]=="string"&&s[e.href]?s[e.href]:"#",f={...e.style??{},...w(e.key)??{}};g.push($("ButtonBlock",{label:c.text,href:p,...typeof e.props=="function"?e.props(s,i):e.props??{},...he(e.variant,s),...Object.keys(f).length?{_partStyles:{label:f}}:{},...c.hidden?{_hidden:!0}:{}})),d(e.key,`${y}Button block: its words`),d(e.href,`${y}Button block: its link`),typeof e.variant=="object"&&d(e.variant.key,`${y}Button block: its Style`);break}case"image":{const c=s[e.key];if(typeof c!="string"||!c){d(e.key,"nothing — no picture, no block"),e.alt&&d(e.alt,"nothing — no picture to describe");break}const p=e.alt&&typeof s[e.alt]=="string"?s[e.alt]:"";g.push($("ImageBlock",{src:c,alt:p,...e.props??{}})),d(e.key,`${y}Image block: its picture`),e.alt&&d(e.alt,`${y}Image block: its alt text`);break}case"list":{g.push(...W(e,s,d));break}case"group":{const c=N(e.parts,s,b,y),p=M(e.box,e.props,s,`${e.name} Box`,!c.length&&!e.keepEmpty,y,d);p&&g.push($(E,{name:e.name,...p,[v]:c}));break}case"block":{const c=e.parts?N(e.parts,s,b,y):[],p=M(e.box,e.props,s,`${e.type} block`,!!e.parts&&!c.length&&!e.keepEmpty,y,d);p&&g.push($(e.type,{...p,...e.slot?{[e.slot]:c}:{}}));break}case"core":{const c=e.as??t.type,p={...e.headless?{}:{headPlacement:"own-box"},...e.props??{}},f=e.keep==="rest"?Object.keys(s).filter(l=>!L.has(l)&&!(l in p)):e.keep;for(const l of f)s[l]!==void 0&&(p[l]=s[l],d(l,`the ${c} block inside the Box`));if(e.keep==="rest"){for(const u of Object.keys(e.props??{}))s[u]!==void 0&&!L.has(u)&&d(u,`nothing — the ${c} block inside the Box has the row's own value`);s.headPlacement!==void 0&&d("headPlacement",`the ${c} block inside the Box: own-box`);const l=Object.fromEntries(Object.entries(X).filter(([u])=>!L.has(u)));Object.keys(l).length&&(p._partStyles=l)}for(const[l,u]of Object.entries(e.rename??{}))s[l]!==void 0&&(p[u]=s[l],d(l,`the ${c} block inside the Box: ${u}`));if(e.derive){Object.assign(p,e.derive.props(s,i));for(const l of e.derive.reads)s[l]!==void 0&&d(l,`the ${c} block inside the Box`)}const x=typeof e.slots=="function"?e.slots(s,i):e.slots??{};for(const[l,u]of Object.entries(x))p[l]=u.flatMap(O=>"kind"in O?W(O,s,d):q([O]));g.push($(c,p));break}}return g},J=(n,s)=>{const b=s===0?"Box":`${n.name} Box`,y=N(n.parts,r,!0,s===0?"":`${b}: `),g=typeof n.boxProps=="function"?n.boxProps(r,i):n.boxProps??{},d=Y(n.box??[],g,r,(w,e,c)=>_(w,c?`nothing — the old value draws nothing (${b}: no ${e})`:`${b}: ${e}`),i);return{type:E,props:{name:n.name,...d,[v]:y,id:ce(a,s)}}},D=[o,...o.also??[]].map(J);r._partStyles!==void 0&&_("_partStyles","each old part's style moved to its new part");for(const[n,s]of Object.entries(o.reads??{}))r[n]!==void 0&&_(n,s);for(const[n,s]of Object.entries(o.drop??{}))n in r&&(k.push({key:n,why:s}),j.add(n));for(const n of Object.keys(r))V.has(n)||j.has(n)||k.push({key:n,why:"not in the row — not carried"});return{node:D[0],nodes:D,carried:h,dropped:k,siteWrites:[...o.site?.(t,i)??[]],restyled:B}}function Re(t,o=C,i={}){const r=t.content;if(!Array.isArray(r))return t;let m=!1;const a=r.flatMap(h=>{const k=h&&typeof h.type=="string"&&o.includes(h.type)?T[h.type]:void 0;if(!k)return[h];const B=Q(h,k,i);return B.skipped!==void 0?[h]:(m=!0,B.nodes)});return m?{...t,content:a}:t}function Ae(t,o=C,i={}){if(!Array.isArray(t))return[];const r=[];return t.forEach((m,a)=>{const h=m&&typeof m.type=="string"&&o.includes(m.type)?T[m.type]:void 0;if(!h)return;const k=Q(m,h,i);k.skipped===void 0&&r.push({index:a,node:k.node,nodes:k.nodes})}),r}export{v as SECTION_BOX_SLOT,E as SECTION_BOX_TYPE,C as SECTION_TO_BOX_ON,fe as SECTION_TO_BOX_PRESS,_e as boxNativeReason,Q as convertSection,Re as convertSectionsInPage,Be as convertTheme,de as convertsToBox,Ie as hasWords,Ne as headParts,je as pressesAsBox,Te as registerBoxNativeSections,Pe as registerSectionToBox,ce as sectionBoxIdOf,Ae as sectionToBoxEdits,Ee as sectionToBoxRow,ve 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}from"../../../format/lib/sections/section-head-placement.js";import{finiteNumber as R}from"../../../format/lib/finite-number.js";import{accentItalicRuns as ie}from"../../../format/lib/markup.js";import{seedNodes as re}from"../../../format/lib/document/seed-parts.js";import{bucketByGroup as ae}from"../../../format/lib/locations-grid.js";import{normalizeTheme as G}from"../../../format/lib/theme.js";const E=ee,v=te;function Te(t){if(t.theme)return G(t.theme);const o=t.site?.themePresets;return o?G({selected:t.site?.selectedPreset??0,themes:[...o]}):void 0}function ce(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 Pe(t){for(const[o,i]of Object.entries(t)){if(o in C&&C[o]!==i)throw new Error(`lib/sections/section-to-box: "${o}" is already Box-native`);C[o]=i}}function _e(t){return C[t]}const Y=new Set(["id"]),T={},z=[],fe=["ProductGrid","Events","ContactRouting","ReviewForm","AppointmentBooking","Reviews","CheckoutCTA"],de=["Breadcrumb","DocBody","Form","SubmitBuild","Footprint","FAQ",...fe,"Stats","Logos","PaymentBadges","PaymentLogosBlock","FitmentFinder","DocMasthead","Timeline","TimelineTrack","OrderSummary","Chart","Mockup","Countdown","FeaturedCover","Cards"];function Ee(t){for(const[o,i]of Object.entries(t)){if(o in T&&T[o]!==i)throw new Error(`lib/sections/section-to-box: "${o}" already has a row`);T[o]=i}}function ve(t){return T[t]}function je(){return Object.keys(T)}function le(t){return t in T&&z.includes(t)}function Ne(t,o=de){return t in T&&(o.includes(t)||le(t))}function Ie(t){const o=se[t];if(!o)throw new Error(`lib/sections/section-to-box: "${t}" has no head row in SPLITTABLE_SECTIONS`);const i=[{kind:"text",key:o.num,role:"eyebrow"},{kind:"text",key:o.title,role:"heading"}];return o.description&&i.push({kind:"text",key:o.description,role:"body"}),o.headRows.includes("linkText")&&o.headRows.includes("linkHref")&&i.push({kind:"button",key:"linkText",href:"linkHref"}),i}const H=t=>Z(t),Re=t=>H(t).text.trim()!=="";function pe(t){if(t.includes("=="))return t;const o=t.indexOf("/"),i=o===-1?t:t.slice(0,o),r=i.trim();if(!r)return t;const m=i.indexOf(r);return`${i.slice(0,m)}==${r}==${i.slice(m+r.length)}${o===-1?"":t.slice(o)}`}const ue=t=>t==="heading"?oe():t==="eyebrow"?ne():{};function he(t,o,i,r){const a={...t._partStyles?.text??{},...o??{},...i??{}};return(r==="center"||r==="right")&&a.align===void 0&&(a.align=r),Object.keys(a).length?{_partStyles:{text:a}}:{}}function ye(t,o){if(t===void 0)return{};if(typeof t=="string")return{variant:t};const i=o[t.key];return{variant:typeof i=="string"&&Object.hasOwn(t.map,i)?t.map[i]:t.fallback}}function V(t,o,i,r,m={}){const a={...o};for(const h of t){const[k,B,j]=typeof h=="string"?[h,h,void 0]:h;if(i[k]===void 0)continue;const P=j?j(i[k],i,m):i[k];P===void 0?delete a[B]:a[B]=P,r(k,B,P===void 0)}return a}function me(t){const o=new Set([...Y,"headPlacement","_partStyles",...Object.keys(t.drop??{}),...Object.keys(t.reads??{})]),i=m=>{for(const a of m??[])o.add(typeof a=="string"?a:a[0])},r=m=>{for(const a of m)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":i(a.box),r(a.parts??[]);break;case"core":if(a.keep!=="rest"&&a.keep.forEach(h=>o.add(h)),Object.keys(a.rename??{}).forEach(h=>o.add(h)),a.derive?.reads.forEach(h=>o.add(h)),typeof a.slots!="function")for(const h of Object.values(a.slots??{}))for(const k of h)"kind"in k&&o.add(k.key);break}};for(const m of[t,...t.also??[]])i(m.box),r(m.parts);return o}function Q(t,o,i={}){const r=t.props,m=o.skip?.(r);if(m!==void 0)return{node:t,nodes:[t],carried:[],dropped:[],siteWrites:[],restyled:[],skipped:m};const a=String(r.id??t.type),h=[],k=[],B=[],j=new Set,P=(n,s)=>{h.push({key:n,home:s}),j.add(n)},M=r._partStyles??{},A=me(o);let X=0;const $=(n,s)=>({type:n,props:{...s,id:`${a}~${n}-${++X}`}}),K=(n,s,b,y,g,d,w)=>{if(g){for(const c of n??[]){const p=typeof c=="string"?c:c[0];b[p]!==void 0&&w(p,`nothing — the ${y} has no parts, so it is not drawn`)}return}const e=typeof s=="function"?s(r,i):s??{};return V(n??[],e,b,(c,p,f)=>w(c,f?`nothing — the old value draws nothing (${y}: no ${p})`:`${d}${y}: ${p}`),i)},q=n=>re(n,s=>`${a}~${s}-${++X}`),W=(n,s,b)=>{const y=n.of?n.of(s):Array.isArray(s[n.key])?s[n.key]:[],g=typeof n.props=="function"?n.props(r,i):n.props??{},d=y.map((f,x)=>{const l=f??{},u=n.item?.(l,x,r)??{},S=N(u.reverse?[...n.parts].reverse():n.parts,l,!1,`item ${x+1}: `);return n.flat?u.props?S.map(_=>({..._,props:{..._.props,...u.props,id:_.props.id}})):S:[$(E,{name:`${n.name} ${x+1}`,...g,...u.props??{},[v]: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,l)=>{const u=x.items.map(O=>O.item),S=f.parts?N(f.parts,f.head?.(u,r)??{},!1,`group ${l+1}: `):[],_=x.items.map(O=>d[O.index]),L=f.perRow?.(u.length,r),I=Number.isInteger(L)&&L>=1?L:1,F=[];if(f.perRow&&I<_.length)for(let O=0;O*I<_.length;O++)F.push(_.slice(O*I,(O+1)*I).flat());return $(E,{name:`${f.name} ${l+1}`,...f.props??{},[v]:[...S,$(E,{name:`${f.itemsName} ${l+1}`,...f.itemsProps?.(u.length,r)??{},[v]:F.length?F.map((O,U)=>$(E,{name:`${f.rowName??`${f.itemsName} row`} ${U+1}`,...f.rowProps??{},[v]:O})):_.flat()})]})})}const w=n.perRow?.(r),e=n.perRow?Number.isInteger(w)&&w>=1?w: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 d.flat();const c=typeof n.rowProps=="function"?n.rowProps(r,i):n.rowProps??{},p=[];for(let f=0;f*e<d.length;f++){const x=d.slice(f*e,(f+1)*e).flat(),l=n.rowFiller?e-d.slice(f*e,(f+1)*e).length:0;p.push($(E,{name:`${n.rowName??`${n.name} row`} ${f+1}`,...c,[v]:[...x,...Array.from({length:l},(u,S)=>$(E,{name:`Empty ${S+1}`,...n.rowFiller,[v]:[]}))]}))}return p},N=(n,s,b,y)=>{const g=[],d=(e,c)=>b?P(e,c):void 0,w=e=>b?M[e]:void 0;for(const e of n)if(!(e.when&&!e.when(r,b?void 0:s)))switch(e.kind){case"text":{const c=H(s[e.key]);if(!c.text.trim()&&!(b&&i.press&&o.pressKeepsEmpty?.includes(e.key))){d(e.key,"nothing — empty words draw nothing, so no block");break}const p=ue(e.role??"body"),{_partStyles:f,...x}=p,l=he(p,e.styleFrom?{...e.style,...e.styleFrom(r,i)}:e.style,w(e.key),e.props?.align);if(e.was&&b){const u=l._partStyles?.text??{};B.push({key:e.key,was:e.was,...typeof u.textStyle=="string"?{textStyle:u.textStyle}:{},...R(u.size)!==void 0?{size:R(u.size)}:{},...R(u.sizePhone)!==void 0?{sizePhone:R(u.sizePhone)}:{}})}g.push($("Text",{text:e.mark==="accentLead"?pe(c.text):e.mark==="accentItalic"?ie(c.text):c.text,...x,...e.props??{},...l,...c.hidden?{_hidden:!0}:{}})),d(e.key,`${y}Text block: its words${c.hidden?", hidden":""}`);break}case"button":{const c=H(s[e.key]);if(!c.text.trim()){d(e.key,"nothing — no words, no button"),d(e.href,"nothing — no button to link"),typeof e.variant=="object"&&d(e.variant.key,"nothing — no button to style");break}const p=typeof s[e.href]=="string"&&s[e.href]?s[e.href]:"#",f={...e.style??{},...w(e.key)??{}};g.push($("ButtonBlock",{label:c.text,href:p,...typeof e.props=="function"?e.props(s,i):e.props??{},...ye(e.variant,s),...Object.keys(f).length?{_partStyles:{label:f}}:{},...c.hidden?{_hidden:!0}:{}})),d(e.key,`${y}Button block: its words`),d(e.href,`${y}Button block: its link`),typeof e.variant=="object"&&d(e.variant.key,`${y}Button block: its Style`);break}case"image":{const c=s[e.key];if(typeof c!="string"||!c){d(e.key,"nothing — no picture, no block"),e.alt&&d(e.alt,"nothing — no picture to describe");break}const p=e.alt&&typeof s[e.alt]=="string"?s[e.alt]:"";g.push($("ImageBlock",{src:c,alt:p,...e.props??{}})),d(e.key,`${y}Image block: its picture`),e.alt&&d(e.alt,`${y}Image block: its alt text`);break}case"list":{g.push(...W(e,s,d));break}case"group":{const c=N(e.parts,s,b,y),p=K(e.box,e.props,s,`${e.name} Box`,!c.length&&!e.keepEmpty,y,d);p&&g.push($(E,{name:e.name,...p,[v]:c}));break}case"block":{const c=e.parts?N(e.parts,s,b,y):[],p=K(e.box,e.props,s,`${e.type} block`,!!e.parts&&!c.length&&!e.keepEmpty,y,d);p&&g.push($(e.type,{...p,...e.slot?{[e.slot]:c}:{}}));break}case"core":{const c=e.as??t.type,p={...e.headless?{}:{headPlacement:"own-box"},...e.props??{}},f=e.keep==="rest"?Object.keys(s).filter(l=>!A.has(l)&&!(l in p)):e.keep;for(const l of f)s[l]!==void 0&&(p[l]=s[l],d(l,`the ${c} block inside the Box`));if(e.keep==="rest"){for(const u of Object.keys(e.props??{}))s[u]!==void 0&&!A.has(u)&&d(u,`nothing — the ${c} block inside the Box has the row's own value`);s.headPlacement!==void 0&&d("headPlacement",`the ${c} block inside the Box: own-box`);const l=Object.fromEntries(Object.entries(M).filter(([u])=>!A.has(u)));Object.keys(l).length&&(p._partStyles=l)}for(const[l,u]of Object.entries(e.rename??{}))s[l]!==void 0&&(p[u]=s[l],d(l,`the ${c} block inside the Box: ${u}`));if(e.derive){Object.assign(p,e.derive.props(s,i));for(const l of e.derive.reads)s[l]!==void 0&&d(l,`the ${c} block inside the Box`)}const x=typeof e.slots=="function"?e.slots(s,i):e.slots??{};for(const[l,u]of Object.entries(x))p[l]=u.flatMap(S=>"kind"in S?W(S,s,d):q([S]));g.push($(c,p));break}}return g},J=(n,s)=>{const b=s===0?"Box":`${n.name} Box`,y=N(n.parts,r,!0,s===0?"":`${b}: `),g=typeof n.boxProps=="function"?n.boxProps(r,i):n.boxProps??{},d=V(n.box??[],g,r,(w,e,c)=>P(w,c?`nothing — the old value draws nothing (${b}: no ${e})`:`${b}: ${e}`),i);return{type:E,props:{name:n.name,...d,[v]:y,id:ce(a,s)}}},D=[o,...o.also??[]].map(J);r._partStyles!==void 0&&P("_partStyles","each old part's style moved to its new part");for(const[n,s]of Object.entries(o.reads??{}))r[n]!==void 0&&P(n,s);for(const[n,s]of Object.entries(o.drop??{}))n in r&&(k.push({key:n,why:s}),j.add(n));for(const n of Object.keys(r))Y.has(n)||j.has(n)||k.push({key:n,why:"not in the row — not carried"});return{node:D[0],nodes:D,carried:h,dropped:k,siteWrites:[...o.site?.(t,i)??[]],restyled:B}}function Ce(t,o=z,i={}){const r=t.content;if(!Array.isArray(r))return t;let m=!1;const a=r.flatMap(h=>{const k=h&&typeof h.type=="string"&&o.includes(h.type)?T[h.type]:void 0;if(!k)return[h];const B=Q(h,k,i);return B.skipped!==void 0?[h]:(m=!0,B.nodes)});return m?{...t,content:a}:t}function Ae(t,o=z,i={}){if(!Array.isArray(t))return[];const r=[];return t.forEach((m,a)=>{const h=m&&typeof m.type=="string"&&o.includes(m.type)?T[m.type]:void 0;if(!h)return;const k=Q(m,h,i);k.skipped===void 0&&r.push({index:a,node:k.node,nodes:k.nodes})}),r}export{fe as HOST_PRESS_TYPES,v as SECTION_BOX_SLOT,E as SECTION_BOX_TYPE,z as SECTION_TO_BOX_ON,de as SECTION_TO_BOX_PRESS,_e as boxNativeReason,Q as convertSection,Ce as convertSectionsInPage,Te as convertTheme,le as convertsToBox,Re as hasWords,Ie as headParts,Ne as pressesAsBox,Pe as registerBoxNativeSections,Ee as registerSectionToBox,ce as sectionBoxIdOf,Ae as sectionToBoxEdits,ve as sectionToBoxRow,je as sectionToBoxTypes};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-web-builder",
3
- "version": "58.0.0",
3
+ "version": "59.1.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",
@@ -54,7 +54,7 @@
54
54
  "peerDependencies": {
55
55
  "@tabler/icons-react": "^3.46.0",
56
56
  "efficient-easel": "^29.0.0",
57
- "efficient-shell": "^12.16.0",
57
+ "efficient-shell": "^12.17.0",
58
58
  "isomorphic-dompurify": "^3.18.0",
59
59
  "next": ">=16",
60
60
  "react": ">=19",
@@ -73,7 +73,7 @@
73
73
  "@types/react": "^19",
74
74
  "@types/react-dom": "^19",
75
75
  "efficient-easel": "^29.0.0",
76
- "efficient-shell": "^12.16.0",
76
+ "efficient-shell": "^12.17.0",
77
77
  "esbuild": "^0.28.0",
78
78
  "happy-dom": "^20.14.5",
79
79
  "isomorphic-dompurify": "^3.18.0",
@@ -1,3 +0,0 @@
1
- import type { ThemeColour } from "efficient-easel/pick";
2
- import { type ThemeValue } from "../../../format/lib/theme.js";
3
- export declare function themeSwatches(value?: ThemeValue | null): ThemeColour[];
@@ -1 +0,0 @@
1
- import{say as t}from"../../../format/lib/editor-words.js";import{typedHex as h}from"efficient-easel/pick";import{normalizeTheme as u}from"../../../format/lib/theme.js";function p(m){const r=new Set,c=[];return u(m).themes.forEach((o,n)=>{const s=[[t("Theme {n} main color",{n:n+1}),o.accent],[t("Theme {n} text color",{n:n+1}),o.text],[t("Theme {n} background",{n:n+1}),o.background]];for(const[f,a]of s){const e=a?h(a):null;!e||r.has(e)||(r.add(e),c.push({name:f,value:e}))}}),c}export{p as themeSwatches};