efficient-web-builder 53.0.0 → 55.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/editor/components/BlockGapField.js +1 -1
  3. package/dist/editor/components/CornersField.js +1 -1
  4. package/dist/editor/components/DuplicateToPageMenu.d.ts +2 -0
  5. package/dist/editor/components/DuplicateToPageMenu.js +1 -1
  6. package/dist/editor/components/SectionWidthRows.d.ts +2 -1
  7. package/dist/editor/components/SectionWidthRows.js +1 -1
  8. package/dist/editor/components/SideSpaceField.js +1 -1
  9. package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
  10. package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
  11. package/dist/editor/lib/document/blocks/general/Eyebrow/fields.js +1 -1
  12. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  13. package/dist/editor/lib/document/blocks/general/Hero/fields.js +1 -1
  14. package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
  15. package/dist/editor/lib/document/blocks/general/LogoBlock/fields.js +1 -1
  16. package/dist/editor/lib/document/blocks/general/Split/fields.js +1 -1
  17. package/dist/editor/lib/document/blocks/general/Text/fields.js +1 -1
  18. package/dist/editor/lib/document/blocks/general/TitleWithButtons/fields.js +1 -1
  19. package/dist/editor/lib/document/blocks/hero-shared-fields.d.ts +29 -2
  20. package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -1
  21. package/dist/editor/lib/document/blocks/shared-fields.d.ts +1 -5
  22. package/dist/editor/lib/document/blocks/shared-fields.js +1 -1
  23. package/dist/editor/lib/document/box-accordion-seed.d.ts +3 -0
  24. package/dist/editor/lib/document/box-accordion-seed.js +1 -0
  25. package/dist/editor/lib/document/box-fields.d.ts +11 -0
  26. package/dist/editor/lib/document/box-fields.js +1 -1
  27. package/dist/editor/lib/document/box-phone-order-field.d.ts +8 -0
  28. package/dist/editor/lib/document/box-phone-order-field.js +1 -0
  29. package/dist/editor/lib/document/controls.d.ts +3 -1
  30. package/dist/editor/lib/document/controls.js +1 -1
  31. package/dist/editor/lib/document/mirror-cards-field.d.ts +1 -0
  32. package/dist/editor/lib/document/mirror-cards-field.js +1 -1
  33. package/dist/editor/lib/document/passes/inspector.js +1 -1
  34. package/dist/editor/lib/document/section-own-width-fields.d.ts +4 -0
  35. package/dist/editor/lib/document/section-own-width-fields.js +1 -0
  36. package/dist/editor/lib/document/shape-picker.d.ts +8 -0
  37. package/dist/editor/lib/document/shape-picker.js +1 -1
  38. package/dist/format/lib/content/block-align.d.ts +4 -1
  39. package/dist/format/lib/content/block-align.js +1 -1
  40. package/dist/format/lib/content/box-layout.d.ts +5 -0
  41. package/dist/format/lib/content/box-layout.js +1 -1
  42. package/dist/format/lib/content/box-phone-place.d.ts +11 -0
  43. package/dist/format/lib/content/box-phone-place.js +1 -0
  44. package/dist/format/lib/content/box-shadow.d.ts +4 -0
  45. package/dist/format/lib/content/box-shadow.js +1 -1
  46. package/dist/format/lib/content/box-shape.d.ts +1 -1
  47. package/dist/format/lib/content/box-shape.js +1 -1
  48. package/dist/format/lib/content/card-template.d.ts +2 -1
  49. package/dist/format/lib/content/card-template.js +1 -1
  50. package/dist/format/lib/content/container-direction.d.ts +1 -1
  51. package/dist/format/lib/content/container-direction.js +1 -1
  52. package/dist/format/lib/content/gallery-card-layout.d.ts +16 -1
  53. package/dist/format/lib/content/gallery-card-layout.js +1 -1
  54. package/dist/format/lib/content/image-aspect.d.ts +2 -0
  55. package/dist/format/lib/content/image-aspect.js +1 -1
  56. package/dist/format/lib/content/page-width.d.ts +3 -0
  57. package/dist/format/lib/content/page-width.js +1 -1
  58. package/dist/format/lib/content/picture-focus-rows.js +1 -0
  59. package/dist/format/lib/content/section-height.d.ts +31 -2
  60. package/dist/format/lib/content/section-height.js +1 -1
  61. package/dist/format/lib/content/section-min-height.d.ts +2 -1
  62. package/dist/format/lib/content/section-min-height.js +1 -1
  63. package/dist/format/lib/content/section-width.d.ts +38 -1
  64. package/dist/format/lib/content/section-width.js +1 -1
  65. package/dist/format/lib/content/site-gutter.d.ts +2 -0
  66. package/dist/format/lib/content/site-gutter.js +1 -1
  67. package/dist/format/lib/content/view-overrides.d.ts +7 -0
  68. package/dist/format/lib/content/view-overrides.js +1 -0
  69. package/dist/format/lib/document/blocks/block-types.d.ts +1 -1
  70. package/dist/format/lib/document/blocks/general/Flex/meta.d.ts +4 -0
  71. package/dist/format/lib/document/blocks/general/Flex/meta.js +1 -1
  72. package/dist/format/lib/document/passes/types.d.ts +3 -0
  73. package/dist/format/lib/document/section-catalog.js +1 -1
  74. package/dist/format/lib/editor-words-catalogue.d.ts +12 -0
  75. package/dist/format/lib/editor-words-catalogue.js +5 -5
  76. package/dist/format/lib/markup.d.ts +1 -0
  77. package/dist/format/lib/markup.js +2 -2
  78. package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
  79. package/dist/format/lib/sections/intro-bleed-layout.d.ts +1 -0
  80. package/dist/format/lib/sections/intro-bleed-layout.js +1 -1
  81. package/dist/format/lib/source-rules/padding-units-declared.d.ts +2 -0
  82. package/dist/format/lib/source-rules/padding-units-declared.js +6 -0
  83. package/dist/render/components/AccordionMark.d.ts +4 -0
  84. package/dist/render/components/AccordionMark.js +1 -0
  85. package/dist/render/components/BoxAccordionRow.d.ts +7 -0
  86. package/dist/render/components/BoxAccordionRow.js +1 -0
  87. package/dist/render/components/BoxTabPaneContext.d.ts +3 -1
  88. package/dist/render/components/BoxTabPaneContext.js +1 -1
  89. package/dist/render/components/BoxTabs.js +1 -1
  90. package/dist/render/components/ButtonBlock.d.ts +1 -0
  91. package/dist/render/components/ButtonBlock.js +1 -1
  92. package/dist/render/components/CardRowContext.js +1 -1
  93. package/dist/render/components/Divider.js +1 -1
  94. package/dist/render/components/Eyebrow.d.ts +2 -1
  95. package/dist/render/components/Eyebrow.js +1 -1
  96. package/dist/render/components/FAQ.js +1 -1
  97. package/dist/render/components/Flex.d.ts +15 -2
  98. package/dist/render/components/Flex.js +1 -1
  99. package/dist/render/components/HeroSection.d.ts +4 -1
  100. package/dist/render/components/HeroSection.js +1 -1
  101. package/dist/render/components/HeroSingle.d.ts +4 -1
  102. package/dist/render/components/HeroSingle.js +1 -1
  103. package/dist/render/components/HeroSlide.d.ts +1 -0
  104. package/dist/render/components/HeroSlide.js +1 -1
  105. package/dist/render/components/ImageBlock.js +1 -1
  106. package/dist/render/components/InBoxContext.d.ts +1 -0
  107. package/dist/render/components/IntroBleed.js +1 -1
  108. package/dist/render/components/LogoBlock.d.ts +1 -0
  109. package/dist/render/components/LogoBlock.js +1 -1
  110. package/dist/render/components/Logos.js +1 -1
  111. package/dist/render/components/ProcessSteps.d.ts +1 -0
  112. package/dist/render/components/ProcessSteps.js +1 -1
  113. package/dist/render/components/SiteGutterFrame.d.ts +16 -0
  114. package/dist/render/components/SiteGutterFrame.js +1 -1
  115. package/dist/render/components/Split.d.ts +2 -1
  116. package/dist/render/components/Split.js +1 -1
  117. package/dist/render/components/Text.d.ts +2 -1
  118. package/dist/render/components/Text.js +1 -1
  119. package/dist/render/components/TitleWithButtons.d.ts +2 -1
  120. package/dist/render/components/TitleWithButtons.js +1 -1
  121. package/dist/render/lib/content/block-size.d.ts +1 -0
  122. package/dist/render/lib/content/block-size.js +1 -1
  123. package/dist/render/lib/content/box-shared-columns.d.ts +2 -2
  124. package/dist/render/lib/content/box-shared-columns.js +1 -1
  125. package/dist/render/lib/content/box-stack-line.d.ts +15 -0
  126. package/dist/render/lib/content/box-stack-line.js +1 -0
  127. package/dist/render/lib/content/button-look.js +1 -1
  128. package/dist/render/lib/content/empty-hides.d.ts +8 -0
  129. package/dist/render/lib/content/empty-hides.js +1 -0
  130. package/dist/render/lib/content/section-edge.d.ts +1 -1
  131. package/dist/render/lib/content/section-edge.js +1 -1
  132. package/dist/render/lib/content/section-padding.d.ts +17 -3
  133. package/dist/render/lib/content/section-padding.js +1 -1
  134. package/dist/render/lib/content/view-values.d.ts +1 -7
  135. package/dist/render/lib/content/view-values.js +1 -1
  136. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  137. package/dist/render/lib/document/blocks/general/Hero/render.js +1 -1
  138. package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
  139. package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
  140. package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
  141. package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
  142. package/dist/render/lib/document/blocks/general/section-head-looks.d.ts +1 -0
  143. package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -2
  144. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  145. package/dist/render/lib/document/blocks/general/section-to-box-rows-docbody.js +2 -2
  146. package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
  147. package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
  148. package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
  149. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  150. package/dist/render/lib/document/head-core-boxes.d.ts +1 -0
  151. package/dist/render/lib/document/head-core-boxes.js +1 -0
  152. package/dist/render/lib/document/page-render.js +1 -1
  153. package/dist/render/lib/document/passes/block-size.js +1 -1
  154. package/dist/render/lib/document/passes/head-core.d.ts +3 -0
  155. package/dist/render/lib/document/passes/head-core.js +1 -0
  156. package/dist/render/lib/document/passes/index.js +1 -1
  157. package/dist/render/lib/document/passes/section-theme.js +1 -1
  158. package/dist/render/lib/document/passes/section-width.js +1 -1
  159. package/dist/render/lib/document/passes/slots-start-afresh.js +1 -1
  160. package/dist/render/lib/sections/section-to-box.js +1 -1
  161. package/package.json +5 -5
  162. package/dist/render/lib/content/picture-focus-rows.js +0 -1
  163. /package/dist/{render → format}/lib/content/picture-focus-rows.d.ts +0 -0
@@ -1,2 +1,2 @@
1
- import{parseBlocks as m,sectionAnchorIds as b,shownSections as x}from"../../../../components/DocBody.js";import{DIM as p,DROP_COMMON as P,INNER_BOX as o,SECTION_BOX as B,TEXT as a,smallText as r,wrapperPad as _,wrapperPadKeys as f}from"./section-to-box-row-parts.js";import{fluidToken as u,token as d}from"./section-head-looks.js";const c={top:80,bottom:80,topPhone:60,bottomPhone:60},l=18,h=18,g=8,w=10,i=t=>typeof t=="string"&&t.trim()!=="",y=t=>x(t.sections),T=t=>m(typeof t.body=="string"?t.body:"").map(e=>e.type==="ul"?{kind:"ul",text:e.items.map(n=>`- ${n}`).join(`
2
- `)}:{kind:"p",text:e.text}),s={textStyle:"body-5",...d("label",12),case:"upper",letterSpacing:.3,color:"accent",lineHeight:1.5},k={textStyle:"body-1",fontRole:"accent",...d("body",17)},O=[r("label",s),{...r("title",s),when:(t,e)=>!i(e?.label)},{kind:"block",type:"Text",when:(t,e)=>!i(e?.label)&&!i(e?.title),props:{...a,text:"Section",_partStyles:{text:s}}},{kind:"group",name:"Heading",props:{...o,sectionPaddingBottom:g,sectionPaddingBottomPhone:g},parts:[{kind:"group",name:"Heading line",props:{...o,sectionBorder:{bottom:1},sectionPaddingBottom:h,sectionPaddingBottomPhone:h},parts:[{kind:"text",key:"heading",role:"heading",props:a,style:{textStyle:"heading-2",...u("headingMedium",28,3.5,44),case:"upper",weight:500,lineHeight:1.04,letterSpacing:-.025}}]}]},{kind:"list",key:"body",name:"Body",flat:!0,of:T,parts:[{kind:"text",key:"text",props:p,style:{...k,lineHeight:1.7},when:(t,e)=>e?.kind==="p"},{kind:"text",key:"text",props:p,style:{...k,lineHeight:1.65,paragraphSpacing:w},when:(t,e)=>e?.kind==="ul"}]}],S={name:"Document Text",boxProps:t=>({...B,direction:"row",gap:80,gapPhone:40,sectionBorder:{bottom:1},..._(t,c)}),box:["anchor","sectionAccent","_hidden",...f(c)],parts:[{kind:"block",type:"Contents",props:t=>({title:t.tocTitle??"",sticky:!0,widthFit:"fixed",width:240,widthFitPhone:"fill"})},{kind:"group",name:"Sections",props:{...o,gap:64,gapPhone:64,widthFit:"fill"},parts:[{kind:"list",key:"sections",name:"Section",of:t=>y(t),props:{...o,gap:l,gapPhone:l},item:(t,e,n)=>({props:{anchor:b(y(n))[e]??`section-${e+1}`}}),parts:O}]}],reads:{tocTitle:"the Contents block's Heading"},drop:{...P,stickyTop:"the Contents block draws DocBody's default (120px); 0 live nodes store it"}},C={DocBody:S};export{C as DOCBODY_SECTION_TO_BOX};
1
+ import{parseBlocks as k,sectionAnchorIds as _,shownSections as P}from"../../../../components/DocBody.js";import{SECTION_WIDTH_KEYS as b}from"../../../../../format/lib/content/section-width.js";import{STACK_BELOW_PROP as x}from"../../../content/box-stack-line.js";import{DIM as p,DROP_COMMON as B,INNER_BOX as o,SECTION_BOX as O,TEXT as r,smallText as a,wrapperPad as T,wrapperPadKeys as S}from"./section-to-box-row-parts.js";import{fluidToken as f,token as c}from"./section-head-looks.js";const d={top:80,bottom:80,topPhone:60,bottomPhone:60},l=18,h=18,m=8,u=10,i=t=>typeof t=="string"&&t.trim()!=="",g=t=>P(t.sections),w=t=>k(typeof t.body=="string"?t.body:"").map(e=>e.type==="ul"?{kind:"ul",text:e.items.map(n=>`- ${n}`).join(`
2
+ `)}:{kind:"p",text:e.text}),s={textStyle:"body-5",...c("label",12),case:"upper",letterSpacing:.3,color:"accent",lineHeight:1.5},y={textStyle:"body-1",fontRole:"accent",...c("body",17)},D=[a("label",s),{...a("title",s),when:(t,e)=>!i(e?.label)},{kind:"block",type:"Text",when:(t,e)=>!i(e?.label)&&!i(e?.title),props:{...r,text:"Section",_partStyles:{text:s}}},{kind:"group",name:"Heading",props:{...o,sectionPaddingBottom:m,sectionPaddingBottomPhone:m},parts:[{kind:"group",name:"Heading line",props:{...o,sectionBorder:{bottom:1},sectionPaddingBottom:h,sectionPaddingBottomPhone:h},parts:[{kind:"text",key:"heading",role:"heading",props:r,style:{textStyle:"heading-2",...f("headingMedium",28,3.5,44),case:"upper",weight:500,lineHeight:1.04,letterSpacing:-.025}}]}]},{kind:"list",key:"body",name:"Body",flat:!0,of:w,parts:[{kind:"text",key:"text",props:p,style:{...y,lineHeight:1.7},when:(t,e)=>e?.kind==="p"},{kind:"text",key:"text",props:p,style:{...y,lineHeight:1.65,paragraphSpacing:u},when:(t,e)=>e?.kind==="ul"}]}],C=900,E={name:"Document Text",boxProps:t=>({...O,direction:"row",gap:80,gapPhone:40,[x]:C,sectionBorder:{bottom:1},...T(t,d)}),box:["anchor","sectionAccent","_hidden",...Object.values(b),...S(d)],parts:[{kind:"block",type:"Contents",props:t=>({title:t.tocTitle??"",sticky:!0,widthFit:"fixed",width:240,widthFitPhone:"fill"})},{kind:"group",name:"Sections",props:{...o,gap:64,gapPhone:64,widthFit:"fill"},parts:[{kind:"list",key:"sections",name:"Section",of:t=>g(t),props:{...o,gap:l,gapPhone:l},item:(t,e,n)=>({props:{anchor:_(g(n))[e]??`section-${e+1}`}}),parts:D}]}],reads:{tocTitle:"the Contents block's Heading"},drop:{...B,stickyTop:"the Contents block draws DocBody's default (120px); 0 live nodes store it"}},K={DocBody:E};export{K as DOCBODY_SECTION_TO_BOX};
@@ -1 +1 @@
1
- import{finiteNumber as a}from"../../../../../format/lib/finite-number.js";import{parseIntroBleedLayout as R}from"../../../../../format/lib/sections/intro-bleed-layout.js";import{fluidToken as U,token as n}from"./section-head-looks.js";import{BUTTON as g,DIM as f,DROP_COMMON as c,DROP_SIDE_PADDING as x,INNER_BOX as i,NO_PAD as p,NUMBER_TEXT as F,SAME_KEYS as u,SECTION_BOX as y,TEXT as P,fillFrom as S,lineSides as r,pictureCell as w,siteGutterOf as m,smallText as s,wrapperPad as T,wrapperPadKeys as B}from"./section-to-box-row-parts.js";const H=(e,t)=>{const o=a(e),k=a(t);return{...o===void 0?{}:{size:o},...k===void 0?{}:{sizePhone:k}}},L=e=>R(e.layout)==="stacked",M=e=>Math.min(Math.max(a(e.overlay)??60,0),100),d=e=>a(e)??100,C={textStyle:"heading-1",sizeToken:{...U("headingLarge",48,7,96).sizeToken,pxPhone:36},weight:500,lineHeight:.95,letterSpacing:-.03},W=[s("eyebrow",n("label",14)),...[!0,!1].map(e=>({kind:"text",key:"title",role:"heading",props:P,style:{...C,case:e?"upper":"none"},styleFrom:t=>H(t.titleSizeDesktop,t.titleSizeMobile),when:t=>t.uppercase===!0===e})),{kind:"text",key:"body",props:{...f,maxWidth:560},style:{textStyle:"body-1",...n("body",17,16),lineHeight:1.6,paragraphSpacing:24},styleFrom:e=>H(e.bodySizeDesktop,e.bodySizeMobile)},{kind:"group",name:"Button",props:{...i,align:"start",sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:g}]}],A=e=>`${e}: a Button block has no colour of its own (it follows the site Button colour, as the old fallback did); 0 of 3 live US nodes store one (CLI read, 2026-11-03)`,V=()=>({name:"Scroll-Over Text",skip:e=>L(e)?"the stacked layout: its words row's height floor (`copyShare*`) and the header subtraction have no Box setting; 0 live US nodes":void 0,boxProps:e=>({...y,direction:"column",justify:"center",align:"start",gap:24,gapPhone:24,share:"content",...p,placement:"left",darken:M(e),darkenStyle:"even",sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:d(e.heightDesktop),sectionHeightModePhone:"fixed",sectionHeightUnitPhone:"%",sectionHeightValuePhone:d(e.heightMobile)}),box:[...u.filter(e=>!String(typeof e=="string"?e:e[0]).startsWith("sectionHeight")),["imageSrc","bgImage"],["imageSrcMobile","bgImagePhone"],["overlay","darken",(e,t)=>M(t)],["heightDesktop","sectionHeightValue",e=>d(e)],["heightMobile","sectionHeightValuePhone",e=>d(e)]],parts:W,drop:{uppercase:"not a value of its own: it picks the heading part — Case Upper when on, None (as typed) when off",layout:"not a value of its own: the overlay layout is this tree; a stacked node is skipped (`skip`)",copyShareDesktop:"the stacked layout's words-row floor, read only there; a stacked node is skipped",copyShareMobile:"the stacked layout's words-row floor, read only there; a stacked node is skipped",sticky:"the old pin never held on a live page (its theme wrapper is as tall as the section; decision 3, 2026-10-14), so the Box does not pin",titleSizeDesktop:"read by the heading part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",titleSizeMobile:"read by the heading part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",bodySizeDesktop:"read by the words part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",bodySizeMobile:"read by the words part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",buttonColor:A("Button color"),buttonTextColor:A("Button text color"),...c}}),v={textStyle:"heading-2",...n("headingMedium",56,36),weight:400,lineHeight:1.05,letterSpacing:-.03},X={textStyle:"body-1",...n("body",16),lineHeight:1.7},O=e=>({kind:"text",key:"body",props:{...f,maxWidth:520},style:{...X,paragraphSpacing:e}}),l={top:0,bottom:0,topPhone:0,bottomPhone:0},b=(e,t)=>typeof e.sectionHeightMode=="string"&&e.sectionHeightMode!=="auto"?{}:{sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:t,sectionHeightModePhone:"auto"},j=(e,t)=>{const o=b(e,t);return Object.keys(o).length?o:{sectionHeightMode:e.sectionHeightMode,...e.sectionHeightValue===void 0?{}:{sectionHeightValue:e.sectionHeightValue},...e.sectionHeightUnit===void 0?{}:{sectionHeightUnit:e.sectionHeightUnit},sectionHeightModePhone:"auto"}},I={boxShapePhone:"landscape"},_="needs a black-and-white setting on a Box picture (the old photograph followed it, else the site's Photography); 0 live US nodes store it (CLI read, 2026-11-03)",G=(e,t)=>({[e]:t,[`${e}Phone`]:t}),q={textStyle:"heading-2",...n("headingMedium",40),weight:500,case:"none",lineHeight:1,letterSpacing:-.02},D=e=>(Array.isArray(e.stats)?e.stats:[]).filter(t=>t&&(String(t.value??"").trim()!==""||String(t.label??"").trim()!=="")),Y=()=>({name:"Brand Text",boxProps:(e,t)=>({...y,...S("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...T(e,l),...b(e,100)}),box:[...u,...B(l)],parts:[{kind:"group",name:"Words",props:(e,t)=>({...i,justify:"center",gap:28,gapPhone:28,sectionBorder:r({right:1}),sectionBorderPhone:r({}),...p,sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60,sectionPaddingRight:m(t)}),parts:[s("eyebrow",n("label",14)),{kind:"text",key:"heading",role:"heading",props:P,style:{...v,case:"none"},mark:"accentItalic"},O(28),{kind:"group",name:"Stats",props:{...i,sectionPaddingTop:16,sectionPaddingTopPhone:16},parts:[{kind:"group",name:"Figures",props:e=>({...i,direction:"row",share:"equal",gap:24,gapPhone:24,maxWidth:520,phoneRow:Math.min(Math.max(D(e).length,1),3),...G("sectionBorder",r({top:1})),sectionPaddingTop:28,sectionPaddingTopPhone:28}),parts:[{kind:"list",key:"stats",name:"Stat",of:D,props:{...i,gap:4,gapPhone:4},parts:[{kind:"text",key:"value",props:F,style:q},s("label",{...n("label",13),color:"labels",letterSpacing:.2})]}]}]}]},w("Picture","imageSrc",I)],drop:{...c,grayscale:_,...x}}),h=e=>{const t=e.textAlign==="center"||e.textAlign==="right"?{align:e.textAlign}:{},o=e.textAlignPhone==="left"||e.textAlignPhone==="center"||e.textAlignPhone==="right"?{alignPhone:e.textAlignPhone}:{};return{...t,...o}},K=e=>e.textAlign==="center"?"center":e.textAlign==="right"?"end":"stretch",$=e=>Math.min(Math.max(a(e.overlay)??60,0),100),N=e=>typeof e=="string"&&e.trim()!=="",Z={...g,align:"center",alignPhone:"center",buttonFillOpacity:0,buttonBorder:{width:1},buttonPaddingTop:16,buttonPaddingRight:28,buttonPaddingBottom:16,buttonPaddingLeft:28,buttonPaddingTopPhone:12,buttonPaddingRightPhone:20,buttonPaddingBottomPhone:12,buttonPaddingLeftPhone:20},E=e=>({...w("Picture","imageSrc",(t,o)=>({...N(t.imageSrc)?{darken:40,darkenStyle:"even"}:{},placement:"center",...I,sectionBorder:r(e?{left:1}:{right:1}),...z(e?"left":"right",m(o))}),[{kind:"button",key:"imageBtnText",href:"imageBtnHref",variant:"ghost",props:Z,style:{textStyle:"body-5",...n("label",13,12),case:"upper",letterSpacing:.18}}]),when:t=>t.reverse===!0===e}),z=(e,t)=>{const o=Math.max(60-t,0);return{sectionPaddingLeft:e==="left"?60:o,sectionPaddingRight:e==="right"?60:o}},J={kind:"group",name:"Words",props:(e,t)=>{const o=e.reverse===!0;return{...i,justify:"center",align:K(e),placement:e.textAlign==="center"?"center":e.textAlign==="right"?"right":"left",...j(e,72),gap:24,gapPhone:24,...N(e.textBgSrc)?{darken:$(e),darkenStyle:"even"}:{},...p,sectionPaddingTop:100,sectionPaddingBottom:100,...z(o?"right":"left",m(t)),sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60}},box:[["textBgSrc","bgImage"]],parts:[{...s("eyebrow",n("label",14)),styleFrom:h},{kind:"text",key:"title",role:"heading",props:P,style:v,styleFrom:e=>({case:e.uppercase===!0?"upper":"none",...h(e)})},{...O(24),styleFrom:h},{kind:"group",name:"Button",props:{...i,sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:e=>{const t=h(e);return{...g,...t.align?{align:t.align}:{},...t.alignPhone?{alignPhone:t.alignPhone}:{}}}}]}]},Q=()=>({name:"Image & Text Split",boxProps:(e,t)=>({...y,...S("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...T(e,l),...b(e,72)}),box:[...u,...B(l)],parts:[E(!1),J,E(!0)],drop:{reverse:"not a value of its own: it picks the order — the Picture Box first, or after the Words",uppercase:"not a value of its own: the heading part's Case — Upper when on, None (as typed) when off",textAlign:"read by each words part (its Align) and the Words Box (its Align); left writes nothing, as the old emitted no class",textAlignPhone:"read by each words part as its phone Align",overlay:"read by the Words Box: its Darken over the words picture (60 when unset); no picture, no wash",grayscale:_,...c,...x}}),ie={IntroBleed:V(),Manifesto:Y(),Split:Q()};export{ie as EDITORIAL_SECTION_TO_BOX};
1
+ import{finiteNumber as a}from"../../../../../format/lib/finite-number.js";import{parseIntroBleedLayout as R}from"../../../../../format/lib/sections/intro-bleed-layout.js";import{fluidToken as U,token as n}from"./section-head-looks.js";import{BUTTON as g,DIM as f,DROP_COMMON as c,DROP_SIDE_PADDING as x,INNER_BOX as i,NO_PAD as p,NUMBER_TEXT as F,SAME_KEYS as u,SECTION_BOX as y,TEXT as P,fillFrom as S,lineSides as s,pictureCell as w,siteGutterOf as m,smallText as r,wrapperPad as T,wrapperPadKeys as B}from"./section-to-box-row-parts.js";const H=(e,t)=>{const o=a(e),k=a(t);return{...o===void 0?{}:{size:o},...k===void 0?{}:{sizePhone:k}}},L=e=>R(e.layout)==="stacked",M=e=>Math.min(Math.max(a(e.overlay)??60,0),100),d=e=>a(e)??100,C={textStyle:"heading-1",sizeToken:{...U("headingLarge",48,7,96).sizeToken,pxPhone:36},weight:500,lineHeight:.95,letterSpacing:-.03},W=[r("eyebrow",n("label",14)),...[!0,!1].map(e=>({kind:"text",key:"title",role:"heading",props:P,style:{...C,case:e?"upper":"none"},styleFrom:t=>H(t.titleSizeDesktop,t.titleSizeMobile),when:t=>t.uppercase===!0===e})),{kind:"text",key:"body",props:{...f,maxWidth:560},style:{textStyle:"body-1",...n("body",17,16),lineHeight:1.6,paragraphSpacing:24},styleFrom:e=>H(e.bodySizeDesktop,e.bodySizeMobile)},{kind:"group",name:"Button",props:{...i,align:"start",sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:g}]}],A=e=>`${e}: a Button block has no colour of its own (it follows the site Button colour, as the old fallback did); 0 of 3 live US nodes store one (CLI read, 2026-11-03)`,V=()=>({name:"Scroll-Over Text",skip:e=>L(e)?"the stacked layout: its words row's height floor (`copyShare*`) and the header subtraction have no Box setting; 0 live US nodes":void 0,boxProps:e=>({...y,direction:"column",justify:"center",align:"start",gap:24,gapPhone:24,share:"content",...p,placement:"left",darken:M(e),darkenStyle:"even",sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:d(e.heightDesktop),sectionHeightModePhone:"fixed",sectionHeightUnitPhone:"%",sectionHeightValuePhone:d(e.heightMobile)}),box:[...u.filter(e=>!String(typeof e=="string"?e:e[0]).startsWith("sectionHeight")),["imageSrc","bgImage"],["imageSrcMobile","bgImagePhone"],["overlay","darken",(e,t)=>M(t)],["heightDesktop","sectionHeightValue",e=>d(e)],["heightMobile","sectionHeightValuePhone",e=>d(e)]],parts:W,drop:{uppercase:"not a value of its own: it picks the heading part — Case Upper when on, None (as typed) when off",layout:"not a value of its own: the overlay layout is this tree; a stacked node is skipped (`skip`)",copyShareDesktop:"the stacked layout's words-row floor, read only there; a stacked node is skipped",copyShareMobile:"the stacked layout's words-row floor, read only there; a stacked node is skipped",sticky:"the old pin never held on a live page (its theme wrapper is as tall as the section; decision 3, 2026-10-14), so the Box does not pin",titleSizeDesktop:"read by the heading part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",titleSizeMobile:"read by the heading part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",bodySizeDesktop:"read by the words part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",bodySizeMobile:"read by the words part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",buttonColor:A("Button color"),buttonTextColor:A("Button text color"),...c}}),v={textStyle:"heading-2",...n("headingMedium",56,36),weight:400,lineHeight:1.05,letterSpacing:-.03},X={textStyle:"body-1",...n("body",16),lineHeight:1.7},O=e=>({kind:"text",key:"body",props:{...f,maxWidth:520},style:{...X,paragraphSpacing:e}}),l={top:0,bottom:0,topPhone:0,bottomPhone:0},b=(e,t)=>typeof e.sectionHeightMode=="string"&&e.sectionHeightMode!=="auto"?{}:{sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:t,sectionHeightModePhone:"auto"},j=(e,t)=>{const o=b(e,t);return Object.keys(o).length?o:{sectionHeightMode:e.sectionHeightMode,...e.sectionHeightValue===void 0?{}:{sectionHeightValue:e.sectionHeightValue},...e.sectionHeightUnit===void 0?{}:{sectionHeightUnit:e.sectionHeightUnit},sectionHeightModePhone:"auto"}},I={boxShapePhone:"landscape"},_="needs a black-and-white setting on a Box picture (the old photograph followed it, else the site's Photography); 0 live US nodes store it (CLI read, 2026-11-03)",G=(e,t)=>({[e]:t,[`${e}Phone`]:t}),q={textStyle:"heading-2",...n("headingMedium",40),weight:500,case:"none",lineHeight:1,letterSpacing:-.02},D=e=>(Array.isArray(e.stats)?e.stats:[]).filter(t=>t&&(String(t.value??"").trim()!==""||String(t.label??"").trim()!=="")),Y=()=>({name:"Brand Text",boxProps:(e,t)=>({...y,...S("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...T(e,l),...b(e,100)}),box:[...u,...B(l)],parts:[{kind:"group",name:"Words",props:(e,t)=>({...i,justify:"center",gap:28,gapPhone:28,sectionBorder:s({right:1}),sectionBorderPhone:s({}),...p,sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60,sectionPaddingRight:m(t)}),parts:[r("eyebrow",n("label",14)),{kind:"text",key:"heading",role:"heading",props:P,style:{...v,case:"none"},mark:"accentItalic"},O(28),{kind:"group",name:"Stats",props:{...i,sectionPaddingTop:16,sectionPaddingTopPhone:16},parts:[{kind:"group",name:"Figures",props:e=>({...i,direction:"row",share:"equal",gap:24,gapPhone:24,maxWidth:520,phoneRow:Math.min(Math.max(D(e).length,1),3),...G("sectionBorder",s({top:1})),sectionPaddingTop:28,sectionPaddingTopPhone:28}),parts:[{kind:"list",key:"stats",name:"Stat",of:D,props:{...i,gap:4,gapPhone:4},parts:[{kind:"text",key:"value",props:F,style:q},r("label",{...n("label",13),color:"labels",letterSpacing:.2})]}]}]}]},w("Picture","imageSrc",I)],drop:{...c,grayscale:_,...x}}),h=e=>{const t=e.textAlign==="center"||e.textAlign==="right"?{align:e.textAlign}:{},o=e.textAlignPhone==="left"||e.textAlignPhone==="center"||e.textAlignPhone==="right"?{alignPhone:e.textAlignPhone}:{};return{...t,...o}},K=e=>e.textAlign==="center"?"center":e.textAlign==="right"?"end":"stretch",$=e=>Math.min(Math.max(a(e.overlay)??60,0),100),N=e=>typeof e=="string"&&e.trim()!=="",Z={...g,align:"center",alignPhone:"center",buttonFillOpacity:0,buttonBorder:{width:1},buttonPaddingTop:16,buttonPaddingRight:28,buttonPaddingBottom:16,buttonPaddingLeft:28,buttonPaddingTopPhone:12,buttonPaddingRightPhone:20,buttonPaddingBottomPhone:12,buttonPaddingLeftPhone:20},E=e=>({...w("Picture","imageSrc",(t,o)=>({...N(t.imageSrc)?{darken:40,darkenStyle:"even"}:{},placement:"center",...I,sectionBorder:s(e?{left:1}:{right:1}),...z(e?"left":"right",m(o))}),[{kind:"button",key:"imageBtnText",href:"imageBtnHref",variant:"ghost",props:Z,style:{textStyle:"body-5",...n("label",13,12),case:"upper",letterSpacing:.18}}]),when:t=>t.reverse===!0===e}),z=(e,t)=>{const o=Math.max(60-t,0);return{sectionPaddingLeft:e==="left"?60:o,sectionPaddingRight:e==="right"?60:o}},J={kind:"group",name:"Words",props:(e,t)=>{const o=e.reverse===!0;return{...i,justify:"center",align:K(e),placement:e.textAlign==="center"?"center":e.textAlign==="right"?"right":"left",...j(e,72),gap:24,gapPhone:24,...N(e.textBgSrc)?{darken:$(e),darkenStyle:"even"}:{},...p,sectionPaddingTop:100,sectionPaddingBottom:100,...z(o?"right":"left",m(t)),sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60}},box:[["textBgSrc","bgImage"]],parts:[{...r("eyebrow",n("label",14)),styleFrom:h},{kind:"text",key:"title",role:"heading",props:P,style:v,styleFrom:e=>({case:e.uppercase===!0?"upper":"none",...h(e)})},{...O(24),styleFrom:h},{kind:"group",name:"Button",props:{...i,sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:e=>{const t=h(e);return{...g,...t.align?{align:t.align}:{},...t.alignPhone?{alignPhone:t.alignPhone}:{}}}}]}]},Q=()=>({name:"Image & Text Split",boxProps:(e,t)=>({...y,...S("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...T(e,l),...b(e,72)}),box:[...u,...B(l)],parts:[E(!1),J,E(!0)],drop:{reverse:"not a value of its own: it picks the order — the Picture Box first, or after the Words",uppercase:"not a value of its own: the heading part's Case — Upper when on, None (as typed) when off",textAlign:"read by each words part (its Align) and the Words Box (its Align); left writes nothing, as the old emitted no class",textAlignPhone:"read by each words part as its phone Align",textAlignTablet:"a words part has no tablet Align yet (three-views follow-up); no old node stores it (new with the Tablet view's Text alignment row, 0 stored on the US sites 2026-11-05), so nothing moves",overlay:"read by the Words Box: its Darken over the words picture (60 when unset); no picture, no wash",grayscale:_,...c,...x}}),ie={IntroBleed:V(),Manifesto:Y(),Split:Q()};export{ie as EDITORIAL_SECTION_TO_BOX};
@@ -1 +1 @@
1
- import{SPLITTABLE_SECTIONS as m}from"../../../../../format/lib/sections/section-head-placement.js";import{SECTION_LABELS as P}from"../../../../../format/lib/document/section-catalog.js";import{SAME_KEYS as T,SECTION_BOX as E,innerPad as h}from"./section-to-box-row-parts.js";import{HEAD_BELOW as O,headLookOf as S,headTree as _}from"./section-head-looks.js";import{finiteNumber as f}from"../../../../../format/lib/finite-number.js";const u=["Collections","Events","FAQ","Footprint","GalleryB","LongRead","ProcessSteps","ProductGrid","RelatedProducts"],B=["FitmentFinder","FitmentTable","SpecTable"],n=(o,e)=>()=>({top:o,topPhone:e}),c=o=>e=>{const t=h(e,o).sectionPaddingTop;return{top:t,topPhone:t}},b={Collections:n(120,70),Events:n(120,70),FAQ:n(120,70),GalleryB:n(120,70),FitmentTable:n(120,80),SpecTable:n(120,80),LongRead:n(120,80),FitmentFinder:o=>o.layout==="bar"?{top:32,topPhone:20}:{top:80,topPhone:60},RelatedProducts:n(0,0),Footprint:c("Footprint"),ProcessSteps:c("ProcessSteps"),ProductGrid:o=>({top:f(o.padTop)??120,topPhone:0})};function g(o,e={}){const t=m[o],d=b[o];if(!t||!d)throw new Error(`section-to-box-rows-head: "${o}" has no head row or no head room`);const s=t.padKey,p=_(o),l=t.headRows.filter(r=>![t.num,t.title,t.description,"linkText","linkHref"].includes(r)),a={...Object.fromEntries(l.map(r=>[r,"a head setting: the Header Box's Text parts draw it (lib/document/blocks/general/section-head-looks)"])),...e.drop};return{name:P[o]??o,boxProps:r=>{const i=d(r);return{...E,direction:"column",gap:O[S(o)],sectionPaddingTop:i.top,sectionPaddingTopPhone:i.topPhone}},box:[...T,...s?[[s,"sectionPaddingTop",(r,i)=>d(i).top]]:[]],parts:[p,{kind:"core",keep:"rest",...s?{props:{[s]:0}}:{},...e.slots?{slots:e.slots}:{}},...e.partsAfter??[]],...Object.keys(a).length?{drop:a}:{}}}const H=Object.fromEntries(u.map(o=>[o,g(o)]));export{H as HEAD_ONLY_SECTION_TO_BOX,u as HEAD_ONLY_TYPES,B as HOST_ROW_HEAD_TYPES,g as headOnlyRow};
1
+ import{SPLITTABLE_SECTIONS as h}from"../../../../../format/lib/sections/section-head-placement.js";import{SECTION_LABELS as P}from"../../../../../format/lib/document/section-catalog.js";import{SAME_KEYS as E,SECTION_BOX as T,innerPad as O}from"./section-to-box-row-parts.js";import{HEAD_BELOW as S,headLookOf as f,headReads as _,headTree as b}from"./section-head-looks.js";import{finiteNumber as u}from"../../../../../format/lib/finite-number.js";const g=["Collections","Events","FAQ","Footprint","GalleryB","LongRead","ProcessSteps","ProductGrid","RelatedProducts"],x=["FitmentFinder","FitmentTable","SpecTable"],r=(o,t)=>()=>({top:o,topPhone:t}),p=o=>t=>{const e=O(t,o).sectionPaddingTop;return{top:e,topPhone:e}},A={Collections:r(120,70),Events:r(120,70),FAQ:r(120,70),GalleryB:r(120,70),FitmentTable:r(120,80),SpecTable:r(120,80),LongRead:r(120,80),FitmentFinder:o=>o.layout==="bar"?{top:32,topPhone:20}:{top:80,topPhone:60},RelatedProducts:r(0,0),Footprint:p("Footprint"),ProcessSteps:p("ProcessSteps"),ProductGrid:o=>({top:u(o.padTop)??120,topPhone:0})};function F(o,t={}){const e=h[o],d=A[o];if(!e||!d)throw new Error(`section-to-box-rows-head: "${o}" has no head row or no head room`);const s=e.padKey,l=b(o),a=_(o),m=e.headRows.filter(n=>![e.num,e.title,e.description,"linkText","linkHref"].includes(n)),c={...Object.fromEntries(m.filter(n=>!(n in a)).map(n=>[n,"a head setting no Header Box part reads (lib/document/blocks/general/section-head-looks `headReads`)"])),...t.drop};return{name:P[o]??o,boxProps:n=>{const i=d(n);return{...T,direction:"column",gap:S[f(o)],sectionPaddingTop:i.top,sectionPaddingTopPhone:i.topPhone}},box:[...E,...s?[[s,"sectionPaddingTop",(n,i)=>d(i).top]]:[]],parts:[l,{kind:"core",keep:"rest",...s?{props:{[s]:0}}:{},...t.slots?{slots:t.slots}:{}},...t.partsAfter??[]],...Object.keys(a).length?{reads:a}:{},...Object.keys(c).length?{drop:c}:{}}}const N=Object.fromEntries(g.map(o=>[o,F(o)]));export{N as HEAD_ONLY_SECTION_TO_BOX,g as HEAD_ONLY_TYPES,x as HOST_ROW_HEAD_TYPES,F as headOnlyRow};
@@ -1 +1 @@
1
- import{tabletKey as R}from"efficient-easel/draw";import{SECTION_BOX_SLOT as G,SECTION_BOX_TYPE as j}from"../../../sections/section-to-box.js";import{BUTTON as k,DIM as i,DROP_COMMON as D,DROP_SIDE_PADDING as W,INNER_BOX as o,SAME_KEYS as v,SECTION_BOX as f,SH_LINK as S,TEXT as p,bandAccent as X,bandIndex as K,bandPage as $,bandProps as P,bandWrites as z,smallText as l,wrapperPad as d}from"./section-to-box-row-parts.js";import{editorialHeadTree as U,token as c}from"./section-head-looks.js";import{boxPadding as m}from"../../../../../format/lib/document/seed-parts.js";import{readAnchorName as Y}from"../../../../../format/lib/content/anchor-name.js";import{declaredBlockSource as x}from"../../../../../format/lib/content/block-sources.js";import{parseLocationTileShape as F,splitLegacyRegion as w}from"../../../../../format/lib/content/contact.js";import{groupColumns as g}from"../../../../../format/lib/locations-grid.js";import{phoneHref as q}from"../../../../../format/lib/links/phone-href.js";import{hasMapCoords as V}from"../../../../../format/lib/map-styles.js";const r=e=>typeof e=="string"?e:e==null?"":String(e),h=e=>Array.isArray(e.locations)?e.locations.map(t=>t??{}):[],s=e=>r(e.group),B=e=>`loc-${e}`,T=e=>r(e.state).trim()||w(r(e.region)).state,O=e=>r(e.country).trim()||w(r(e.region)).country,_=e=>[T(e),O(e)].filter(Boolean).join(" · "),J=e=>h(e).some(t=>r(t.photo).trim()!==""),Q=e=>h(e).some(t=>V(Number(t.lat),Number(t.lng))),Z=(e,t)=>h(e).filter(n=>s(n)===s(t)).length,ee=(e,t)=>Z(e,t)===1?"wide":F(e.imageShape),y={top:100,bottom:100,topPhone:60,bottomPhone:60},N=48,a=(e,t={})=>({textStyle:"body-5",...c("label",e),case:"upper",...t}),u={top:1,right:1,bottom:1,left:1},b={...o,direction:"row",share:"equal",gap:0},te=e=>t=>t>g(t)?{...o,gap:0}:{...b,...t>1?{phoneRow:e}:{}},oe={kind:"group",name:"Gallery",props:{...o,gap:20,_hidden:!0},when:J,parts:[{kind:"group",name:"Gallery head",props:{...o,direction:"row",justify:"between",align:"end",gap:24,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:16},parts:[l("galleryKicker",a(12,{color:"accent",letterSpacing:.3})),{kind:"text",key:"galleryHint",props:{...i,align:"right",alignPhone:"left"},style:a(11,{letterSpacing:.22,alignPhone:"left"})}]},{kind:"group",name:"Groups",props:{...o,gap:24},parts:[{kind:"list",key:"locations",name:"City picture",props:{...o,darken:85,darkenStyle:"bottom",placement:"bottom-left",sectionBorder:u,...m(12,12)},item:(e,t,n)=>({props:{...r(e.photo).trim()?{bgImage:r(e.photo),hover:"mono"}:{},link:`#${B(t)}`,boxShape:ee(n,e)}}),parts:[{kind:"text",key:"name",props:p,style:a(11,{letterSpacing:.22,color:"text"})}],groups:{of:s,name:"Group",props:{...o,gap:10},head:e=>({label:s(e[0]??{})}),parts:[l("label",a(11,{color:"accent",letterSpacing:.3}))],itemsName:"Cities",itemsProps:te(2),perRow:g,rowName:"Row",rowProps:{...b,phoneRow:2}}}]}]},ne={kind:"group",name:"Words",props:{...o,gap:12,gapPhone:12,...m(28,28),sectionHeightMode:"fixed",sectionHeightValue:280,sectionHeightUnit:"px",sectionHeightModePhone:"auto"},parts:[{kind:"group",name:"Name row",props:{...o,direction:"row",justify:"between",align:"start",gap:14,share:"content",phoneRow:2,sharePhone:"content",wrapPhone:"wrap",sectionPaddingBottom:6,sectionPaddingBottomPhone:6},parts:[{kind:"group",name:"Name",props:{...o,gap:6,gapPhone:6},parts:[{kind:"text",key:"name",role:"heading",props:p,style:{textStyle:"heading-3",...c("headingSmall",30),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02}},{kind:"block",type:"Text",props:{...p,_partStyles:{text:a(12,{color:"accent",letterSpacing:.24,lineHeight:1.5})}},box:["region","state","country"].map(e=>[e,"text",(t,n)=>_(n)]),when:(e,t)=>_(t??{})!==""}]},{kind:"group",name:"Time zone",props:{...o,sectionBorder:u,...m(6,10)},parts:[{kind:"text",key:"timezone",props:{...i,textFit:"line"},style:a(12,{letterSpacing:.22,lineHeight:1.5})}]}]},{kind:"text",key:"address",props:i,style:{textStyle:"body-5",fontRole:"heading",...c("body",14),lineHeight:1.5}},{kind:"block",type:"ButtonBlock",props:{...k,...S,variant:"ghost",arrow:!1,_partStyles:{label:a(13,{letterSpacing:.18,color:"text",lineHeight:24/13})}},box:[["phone","label"],["phone","href",e=>q(r(e))??"#"]],when:(e,t)=>r(t?.phone).trim()!==""},{kind:"text",key:"hours",props:i,style:a(12,{letterSpacing:.18,lineHeight:1.7})}]},re={kind:"block",type:"LocationMap",props:e=>({mapTheme:typeof e.mapTheme=="string"?e.mapTheme:"auto"}),box:["name","lat","lng","mapsUrl","geocode",...["region","state"].map(e=>[e,"state",(t,n)=>T(n)]),...["region","country"].map(e=>[e,"country",(t,n)=>O(n)])]},ae={kind:"group",name:"Map",props:{...o,sectionBorder:{top:1,right:0,bottom:0,left:0}},parts:[re]},ie={kind:"list",key:"locations",name:"City",props:(e,t)=>({...o,gap:0,justify:"between",sectionBorder:u,jumpHighlight:!0,sectionAccent:K(e,t)>=0?$(e.sectionAccent,t):-1}),item:(e,t)=>({props:{anchor:B(t)}}),parts:[ne,ae],groups:{of:s,name:"Group",props:{...o,gap:20},head:e=>{const t=e[0]??{};return{key:s(t),groupName:r(t.groupName),count:`${e.length} location${e.length===1?"":"s"}`}},parts:[{kind:"group",name:"Group head",props:{...o,direction:"row",justify:"between",align:"end",gap:16,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:16},when:(e,t)=>r(t?.key).trim()!=="",parts:[l("key",a(13,{color:"accent",letterSpacing:.3})),{kind:"text",key:"groupName",role:"heading",props:p,style:{textStyle:"heading-3",...c("headingSmall",24),case:"upper",weight:500,letterSpacing:-.01}},{kind:"text",key:"count",props:i,style:a(12,{letterSpacing:.22})}]}],itemsName:"Cities",itemsProps:e=>({...b,columns:g(e),[R("columns")]:1})}},C=a(10,{letterSpacing:.25}),se={kind:"block",type:j,props:{...o,name:"Credit",direction:"row",justify:"end",align:"center",gap:6,share:"content",wrap:!0},when:Q,slot:G,keepEmpty:!0,parts:[{kind:"block",type:"Text",props:{...i,text:"Location coordinates ©",_partStyles:{text:C}}},{kind:"block",type:"ButtonBlock",props:{...k,...S,variant:"ghost",arrow:!1,label:"OpenStreetMap contributors",href:"https://www.openstreetmap.org/copyright",_partStyles:{label:{...C,color:"labels"}}}}]},M=(e,t)=>Object.fromEntries(t.filter(n=>e[n]!==void 0).map(n=>[n,e[n]])),E=["sectionPaddingTop","sectionPaddingTopTablet","sectionPaddingTopPhone"],H=["sectionPaddingBottom","sectionPaddingBottomTablet","sectionPaddingBottomPhone"],A=e=>e.map(t=>[t,t,(n,L)=>d(L,y)[t]]),I=["sectionAccent","sectionAccent",X],pe=["gridSpan","_hidden"],ce={name:"City pictures",skip:e=>x(e)?`fed by the data source "${x(e)}": its cities are read as the page is served, not stored on the node`:void 0,boxProps:(e,t)=>({...f,direction:"column",gap:40,anchor:"studios",...M(d(e,y),E),sectionPaddingBottom:N,sectionPaddingBottomPhone:N,...P(e,t)}),box:[...v.filter(e=>e!=="sectionAccent"&&e!=="anchor"),I,["anchor","anchor",e=>Y(e).trim()?e:"studios"],...A(E)],parts:[U("sectionNumber","heading","tagline"),oe],also:[{name:"City maps",boxProps:(e,t)=>({...f,direction:"column",gap:40,sectionBorder:{bottom:1},sectionPaddingTop:0,sectionPaddingTopPhone:0,...M(d(e,y),H),...P(e,t)}),box:[...pe,I,...A(H)],parts:[ie,se]}],reads:{mapTheme:"City maps Box: each Map block's Map theme",imageShape:"City pictures Box: each picture Box's Box shape"},site:z,drop:{...D,...W,apiKey:"a stored Google Maps key from before the map needed none: the website's one map (components/SiteMap) takes no key, and a key is a credential, never page content",mapId:"a Google Maps style id from the same retired map: nothing in src/ reads it",gallery:"the retired separate tile list: the wall is derived from the cities (`components/ContactLocations`), nothing in src/ reads it",dataSource:"always empty here: a node fed by a source is skipped (see skip)"}},Pe={ContactLocations:ce};export{Pe as LOCATIONS_SECTION_TO_BOX};
1
+ import{tabletKey as R}from"efficient-easel/draw";import{SECTION_WIDTH_KEYS as j}from"../../../../../format/lib/content/section-width.js";import{SECTION_BOX_SLOT as D,SECTION_BOX_TYPE as G}from"../../../sections/section-to-box.js";import{BUTTON as k,DIM as i,DROP_COMMON as W,DROP_SIDE_PADDING as v,INNER_BOX as o,SAME_KEYS as K,SECTION_BOX as f,SH_LINK as S,TEXT as p,bandAccent as X,bandIndex as $,bandPage as Y,bandProps as P,bandWrites as z,smallText as l,wrapperPad as d}from"./section-to-box-row-parts.js";import{editorialHeadTree as U,token as c}from"./section-head-looks.js";import{boxPadding as m}from"../../../../../format/lib/document/seed-parts.js";import{readAnchorName as F}from"../../../../../format/lib/content/anchor-name.js";import{declaredBlockSource as x}from"../../../../../format/lib/content/block-sources.js";import{parseLocationTileShape as q,splitLegacyRegion as T}from"../../../../../format/lib/content/contact.js";import{groupColumns as g}from"../../../../../format/lib/locations-grid.js";import{phoneHref as V}from"../../../../../format/lib/links/phone-href.js";import{hasMapCoords as J}from"../../../../../format/lib/map-styles.js";const r=e=>typeof e=="string"?e:e==null?"":String(e),h=e=>Array.isArray(e.locations)?e.locations.map(t=>t??{}):[],s=e=>r(e.group),w=e=>`loc-${e}`,B=e=>r(e.state).trim()||T(r(e.region)).state,O=e=>r(e.country).trim()||T(r(e.region)).country,_=e=>[B(e),O(e)].filter(Boolean).join(" · "),Q=e=>h(e).some(t=>r(t.photo).trim()!==""),Z=e=>h(e).some(t=>J(Number(t.lat),Number(t.lng))),ee=(e,t)=>h(e).filter(n=>s(n)===s(t)).length,te=(e,t)=>ee(e,t)===1?"wide":q(e.imageShape),y={top:100,bottom:100,topPhone:60,bottomPhone:60},N=48,a=(e,t={})=>({textStyle:"body-5",...c("label",e),case:"upper",...t}),u={top:1,right:1,bottom:1,left:1},b={...o,direction:"row",share:"equal",gap:0},oe=e=>t=>t>g(t)?{...o,gap:0}:{...b,...t>1?{phoneRow:e}:{}},ne={kind:"group",name:"Gallery",props:{...o,gap:20,_hidden:!0},when:Q,parts:[{kind:"group",name:"Gallery head",props:{...o,direction:"row",justify:"between",align:"end",gap:24,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:16},parts:[l("galleryKicker",a(12,{color:"accent",letterSpacing:.3})),{kind:"text",key:"galleryHint",props:{...i,align:"right",alignPhone:"left"},style:a(11,{letterSpacing:.22,alignPhone:"left"})}]},{kind:"group",name:"Groups",props:{...o,gap:24},parts:[{kind:"list",key:"locations",name:"City picture",props:{...o,darken:85,darkenStyle:"bottom",placement:"bottom-left",sectionBorder:u,...m(12,12)},item:(e,t,n)=>({props:{...r(e.photo).trim()?{bgImage:r(e.photo),hover:"mono"}:{},link:`#${w(t)}`,boxShape:te(n,e)}}),parts:[{kind:"text",key:"name",props:p,style:a(11,{letterSpacing:.22,color:"text"})}],groups:{of:s,name:"Group",props:{...o,gap:10},head:e=>({label:s(e[0]??{})}),parts:[l("label",a(11,{color:"accent",letterSpacing:.3}))],itemsName:"Cities",itemsProps:oe(2),perRow:g,rowName:"Row",rowProps:{...b,phoneRow:2}}}]}]},re={kind:"group",name:"Words",props:{...o,gap:12,gapPhone:12,...m(28,28),sectionHeightMode:"fixed",sectionHeightValue:280,sectionHeightUnit:"px",sectionHeightModePhone:"auto"},parts:[{kind:"group",name:"Name row",props:{...o,direction:"row",justify:"between",align:"start",gap:14,share:"content",phoneRow:2,sharePhone:"content",wrapPhone:"wrap",sectionPaddingBottom:6,sectionPaddingBottomPhone:6},parts:[{kind:"group",name:"Name",props:{...o,gap:6,gapPhone:6},parts:[{kind:"text",key:"name",role:"heading",props:p,style:{textStyle:"heading-3",...c("headingSmall",30),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02}},{kind:"block",type:"Text",props:{...p,_partStyles:{text:a(12,{color:"accent",letterSpacing:.24,lineHeight:1.5})}},box:["region","state","country"].map(e=>[e,"text",(t,n)=>_(n)]),when:(e,t)=>_(t??{})!==""}]},{kind:"group",name:"Time zone",props:{...o,sectionBorder:u,...m(6,10)},parts:[{kind:"text",key:"timezone",props:{...i,textFit:"line"},style:a(12,{letterSpacing:.22,lineHeight:1.5})}]}]},{kind:"text",key:"address",props:i,style:{textStyle:"body-5",fontRole:"heading",...c("body",14),lineHeight:1.5}},{kind:"block",type:"ButtonBlock",props:{...k,...S,variant:"ghost",arrow:!1,_partStyles:{label:a(13,{letterSpacing:.18,color:"text",lineHeight:24/13})}},box:[["phone","label"],["phone","href",e=>V(r(e))??"#"]],when:(e,t)=>r(t?.phone).trim()!==""},{kind:"text",key:"hours",props:i,style:a(12,{letterSpacing:.18,lineHeight:1.7})}]},ae={kind:"block",type:"LocationMap",props:e=>({mapTheme:typeof e.mapTheme=="string"?e.mapTheme:"auto"}),box:["name","lat","lng","mapsUrl","geocode",...["region","state"].map(e=>[e,"state",(t,n)=>B(n)]),...["region","country"].map(e=>[e,"country",(t,n)=>O(n)])]},ie={kind:"group",name:"Map",props:{...o,sectionBorder:{top:1,right:0,bottom:0,left:0}},parts:[ae]},se={kind:"list",key:"locations",name:"City",props:(e,t)=>({...o,gap:0,justify:"between",sectionBorder:u,jumpHighlight:!0,sectionAccent:$(e,t)>=0?Y(e.sectionAccent,t):-1}),item:(e,t)=>({props:{anchor:w(t)}}),parts:[re,ie],groups:{of:s,name:"Group",props:{...o,gap:20},head:e=>{const t=e[0]??{};return{key:s(t),groupName:r(t.groupName),count:`${e.length} location${e.length===1?"":"s"}`}},parts:[{kind:"group",name:"Group head",props:{...o,direction:"row",justify:"between",align:"end",gap:16,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:16},when:(e,t)=>r(t?.key).trim()!=="",parts:[l("key",a(13,{color:"accent",letterSpacing:.3})),{kind:"text",key:"groupName",role:"heading",props:p,style:{textStyle:"heading-3",...c("headingSmall",24),case:"upper",weight:500,letterSpacing:-.01}},{kind:"text",key:"count",props:i,style:a(12,{letterSpacing:.22})}]}],itemsName:"Cities",itemsProps:e=>({...b,columns:g(e),[R("columns")]:1})}},C=a(10,{letterSpacing:.25}),pe={kind:"block",type:G,props:{...o,name:"Credit",direction:"row",justify:"end",align:"center",gap:6,share:"content",wrap:!0},when:Z,slot:D,keepEmpty:!0,parts:[{kind:"block",type:"Text",props:{...i,text:"Location coordinates ©",_partStyles:{text:C}}},{kind:"block",type:"ButtonBlock",props:{...k,...S,variant:"ghost",arrow:!1,label:"OpenStreetMap contributors",href:"https://www.openstreetmap.org/copyright",_partStyles:{label:{...C,color:"labels"}}}}]},E=(e,t)=>Object.fromEntries(t.filter(n=>e[n]!==void 0).map(n=>[n,e[n]])),M=["sectionPaddingTop","sectionPaddingTopTablet","sectionPaddingTopPhone"],H=["sectionPaddingBottom","sectionPaddingBottomTablet","sectionPaddingBottomPhone"],A=e=>e.map(t=>[t,t,(n,L)=>d(L,y)[t]]),I=["sectionAccent","sectionAccent",X],ce=["gridSpan","_hidden",...Object.values(j)],le={name:"City pictures",skip:e=>x(e)?`fed by the data source "${x(e)}": its cities are read as the page is served, not stored on the node`:void 0,boxProps:(e,t)=>({...f,direction:"column",gap:40,anchor:"studios",...E(d(e,y),M),sectionPaddingBottom:N,sectionPaddingBottomPhone:N,...P(e,t)}),box:[...K.filter(e=>e!=="sectionAccent"&&e!=="anchor"),I,["anchor","anchor",e=>F(e).trim()?e:"studios"],...A(M)],parts:[U("sectionNumber","heading","tagline"),ne],also:[{name:"City maps",boxProps:(e,t)=>({...f,direction:"column",gap:40,sectionBorder:{bottom:1},sectionPaddingTop:0,sectionPaddingTopPhone:0,...E(d(e,y),H),...P(e,t)}),box:[...ce,I,...A(H)],parts:[se,pe]}],reads:{mapTheme:"City maps Box: each Map block's Map theme",imageShape:"City pictures Box: each picture Box's Box shape"},site:z,drop:{...W,...v,apiKey:"a stored Google Maps key from before the map needed none: the website's one map (components/SiteMap) takes no key, and a key is a credential, never page content",mapId:"a Google Maps style id from the same retired map: nothing in src/ reads it",gallery:"the retired separate tile list: the wall is derived from the cities (`components/ContactLocations`), nothing in src/ reads it",dataSource:"always empty here: a node fed by a source is skipped (see skip)"}},Te={ContactLocations:le};export{Te as LOCATIONS_SECTION_TO_BOX};
@@ -1 +1 @@
1
- import{hasWords as v,registerSectionToBox as o}from"../../../sections/section-to-box.js";import{BUTTON as g,DIM as m,DROP_COMMON as s,DROP_SIDE_PADDING as c,INNER_BOX as t,leadLine as A,SAME_KEYS as d,SECTION_BOX as p,lineBorder as H,TEXT as l,innerPad as S,siteGutterOf as C,innerPadKeys as f,smallText as u,wrapperPad as P,wrapperPadKeys as b}from"./section-to-box-row-parts.js";import{CARDS_SECTION_TO_BOX as R}from"./section-to-box-rows-cards.js";import{normalizeSiteGutterPhone as D,siteGutterPhoneFollows as L}from"../../../../../format/lib/content/page-width.js";import{finiteNumber as W}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 G}from"./section-to-box-rows-logos.js";import{STRIP_SECTION_TO_BOX as M}from"./section-to-box-rows-strip.js";import{TIMELINE_SECTION_TO_BOX as F}from"./section-to-box-rows-timeline.js";import{LOCATIONS_SECTION_TO_BOX as z}from"./section-to-box-rows-locations.js";import{HEAD_ONLY_SECTION_TO_BOX as K}from"./section-to-box-rows-head.js";import{PAGE_HEADER_SECTION_TO_BOX as Y}from"./section-to-box-rows-pageheader.js";import{DOCBODY_SECTION_TO_BOX as j}from"./section-to-box-rows-docbody.js";import{EDITORIAL_SECTION_TO_BOX as U}from"./section-to-box-rows-editorial.js";import{fluidToken as q,headTree as O,token as r}from"./section-head-looks.js";import{boxPadding as J}from"../../../../../format/lib/document/seed-parts.js";const w={top:72,bottom:72,topPhone:72,bottomPhone:72},Q={name:"Editorial Text",boxProps:e=>({...p,direction:"column",gap:28,gapPhone:28,sectionBorder:{top:1},...P(e,w)}),box:[["topBorder","sectionBorder",e=>e===!1?void 0:{top:1}],...d,...b(w)],parts:[O("Prose"),{kind:"text",key:"body",props:m,style:{textStyle:"body-1",...r("body",16),lineHeight:1.7,paragraphSpacing:18}}],drop:{...s,...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)"}},T={buttonPaddingTop:20,buttonPaddingBottom:20,buttonPaddingLeft:28,buttonPaddingRight:28},k=(e,n)=>n?.variant==="primary",_=(e,n)=>({kind:"list",key:"buttons",name:"Button",flat:!0,when:e,parts:[{kind:"button",key:"label",href:"href",when:k,variant:"primary",style:{letterSpacing:.3},props:{...g,...T,...n}},{kind:"button",key:"label",href:"href",when:(i,a)=>!k(i,a),variant:"ghost",style:{letterSpacing:.3},props:(i,a)=>({...g,...T,...n,...H(i,a)})}]}),h=e=>v(e.title),V={name:"Call-to-Action Heading",boxProps:e=>({...p,direction:"row",align:"center",justify:h(e)?"between":"end",gap:60,gapPhone:60,share:"content",sectionBorder:{bottom:1},...S(e,"TitleWithButtons")}),box:[...d,...f("TitleWithButtons")],parts:[{kind:"group",name:"Title",props:{...t,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=>({...t,gap:14,gapPhone:14,widthFitPhone:"fill",...h(e)?{minWidth:280,minWidthPhone:0}:{}}),parts:[_(h,{widthFit:"fill",iconPosition:"end"}),_(e=>!h(e),{})]}],drop:{...s,buttonsAlign:"moves the buttons only when there is no heading (4 of 128 live nodes), where the Box puts them at the end. 0 of 128 live nodes store it (the live export, 2026-10-24)",buttonsAlignPhone:"the phone's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Phone view's Block alignment row), so nothing moves"}};function Z(e){const{siteGutter:n,siteGutterPhone:i}=e.site??{},a=C(e),y=Math.min(20,D(i)??L(n));return{sectionPaddingLeft:a,sectionPaddingRight:a,sectionPaddingLeftPhone:y,sectionPaddingRightPhone:y}}const x={top:40,bottom:64,topPhone:24,bottomPhone:36},$={name:"Section Header",boxProps:(e,n)=>({...p,direction:"column",gap:0,...P(e,x),...Z(n)}),box:[...d,...b(x)],parts:[O("SectionHeader")],drop:{...s,...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"}},B={...t,direction:"row",share:[67],gap:30},E={...t,sectionPaddingLeft:30,sectionPaddingLeftPhone:0},N=(e,n,i)=>({kind:"group",name:e,props:n,parts:[i]}),ee={name:"Lead Text",boxProps:e=>({...p,direction:"column",gap:40,gapPhone:40,sectionBorder:{bottom:1},...S(e,"ParagraphsA")}),box:[...d,...f("ParagraphsA")],parts:[{kind:"group",name:"Numbers",props:{...B,gapPhone:24,sectionBorder:{bottom:1},sectionPaddingBottom:40,sectionPaddingBottomPhone:40},parts:[{kind:"group",name:"Eyebrow",props:{...t,sectionPaddingTop:5,sectionPaddingBottom:1,sectionPaddingTopPhone:5,sectionPaddingBottomPhone:1},parts:[u("eyebrow",{color:"labels",...r("label",12),letterSpacing:.24})]},N("Stats column",t,{kind:"group",name:"Stats",props:{...E,gap:0,gapPhone:0},parts:[{kind:"list",key:"stats",name:"Stat",flat:!0,parts:[A("value","label",{...r("label",13),letterSpacing:.18,lineHeight:1.8})]}]})]},{kind:"group",name:"Words",props:{...B,gapPhone:28},parts:[{kind:"group",name:"Lead",props:t,parts:[{kind:"group",name:"Measure",props:{...t,maxWidth:780},parts:[{kind:"text",key:"lead",props:l,style:{textStyle:"heading-3",...r("headingSmall",22,20),weight:400,case:"none",lineHeight:1.45,letterSpacing:-.005}}]}]},N("Note column",{...t,justify:"end",widthFit:"fill"},{kind:"group",name:"Founders",props:{...E,gap:8,gapPhone:8},parts:[{kind:"group",name:"Note",props:{...t,gap:6,gapPhone:6},parts:[{kind:"text",key:"foundersHeading",props:l,style:{textStyle:"body-1",fontRole:"heading",...r("body",18,16),weight:500,letterSpacing:-.01,lineHeight:1.7}},{kind:"text",key:"foundersBody",props:m,style:{textStyle:"body-5",fontRole:"heading",...r("body",14,12),lineHeight:1.7}}]},u("attribution",{...r("label",12,10),letterSpacing:.24,lineHeight:1.7})]})]}],drop:{...s}},I={top:24,bottom:24,topPhone:24,bottomPhone:24},te={name:"Banner",boxProps:e=>({...p,direction:"column",gap:0,...P(e,I)}),box:[...d,"contained",...b(I)],parts:[{kind:"group",name:"Card",keepEmpty:!0,props:{...t,gap:28,placement:"top-left",darken:60,darkenStyle:"even",sectionBorder:{width:1},...J(64,40,40,24)},box:[["imageSrc","bgImage"],["overlay","darken",e=>Math.min(Math.max(W(e)??60,0),100)]],parts:[{kind:"group",name:"Words",props:{...t,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:{...m,maxWidth:680},style:{textStyle:"body-1",lineHeight:1.6},was:{size:16}}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:g}]}],drop:{...s,...c}},oe={Prose:Q,TitleWithButtons:V,SectionHeader:$,ParagraphsA:ee,Banner:te};function Se(){o(oe),o(X),o(G),o(R),o(M),o(F),o(z),o(K),o(Y),o(j),o(U)}export{oe as GENERAL_SECTION_TO_BOX,Se as registerGeneralSectionRows};
1
+ import{hasWords as v,registerSectionToBox as o}from"../../../sections/section-to-box.js";import{BUTTON as g,DIM as m,DROP_COMMON as s,DROP_SIDE_PADDING as c,INNER_BOX as t,leadLine as A,SAME_KEYS as d,SECTION_BOX as p,lineBorder as H,TEXT as l,innerPad as w,siteGutterOf as C,innerPadKeys as S,smallText as u,wrapperPad as b,wrapperPadKeys as P}from"./section-to-box-row-parts.js";import{CARDS_SECTION_TO_BOX as R}from"./section-to-box-rows-cards.js";import{normalizeSiteGutterPhone as D,siteGutterPhoneFollows as L}from"../../../../../format/lib/content/page-width.js";import{finiteNumber as W}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 G}from"./section-to-box-rows-logos.js";import{STRIP_SECTION_TO_BOX as M}from"./section-to-box-rows-strip.js";import{TIMELINE_SECTION_TO_BOX as F}from"./section-to-box-rows-timeline.js";import{LOCATIONS_SECTION_TO_BOX as z}from"./section-to-box-rows-locations.js";import{HEAD_ONLY_SECTION_TO_BOX as 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 Y}from"./section-to-box-rows-docbody.js";import{EDITORIAL_SECTION_TO_BOX as j}from"./section-to-box-rows-editorial.js";import{fluidToken as q,headTree as f,token as r}from"./section-head-looks.js";import{boxPadding as J}from"../../../../../format/lib/document/seed-parts.js";const O={top:72,bottom:72,topPhone:72,bottomPhone:72},Q={name:"Editorial Text",boxProps:e=>({...p,direction:"column",gap:28,gapPhone:28,sectionBorder:{top:1},...b(e,O)}),box:[["topBorder","sectionBorder",e=>e===!1?void 0:{top:1}],...d,...P(O)],parts:[f("Prose"),{kind:"text",key:"body",props:m,style:{textStyle:"body-1",...r("body",16),lineHeight:1.7,paragraphSpacing:18}}],drop:{...s,...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)"}},T={buttonPaddingTop:20,buttonPaddingBottom:20,buttonPaddingLeft:28,buttonPaddingRight:28},k=(e,n)=>n?.variant==="primary",_=(e,n)=>({kind:"list",key:"buttons",name:"Button",flat:!0,when:e,parts:[{kind:"button",key:"label",href:"href",when:k,variant:"primary",style:{letterSpacing:.3},props:{...g,...T,...n}},{kind:"button",key:"label",href:"href",when:(i,a)=>!k(i,a),variant:"ghost",style:{letterSpacing:.3},props:(i,a)=>({...g,...T,...n,...H(i,a)})}]}),h=e=>v(e.title),V={name:"Call-to-Action Heading",boxProps:e=>({...p,direction:"row",align:"center",justify:h(e)?"between":"end",gap:60,gapPhone:60,share:"content",sectionBorder:{bottom:1},...w(e,"TitleWithButtons")}),box:[...d,...S("TitleWithButtons")],parts:[{kind:"group",name:"Title",props:{...t,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=>({...t,gap:14,gapPhone:14,widthFitPhone:"fill",...h(e)?{minWidth:280,minWidthPhone:0}:{}}),parts:[_(h,{widthFit:"fill",iconPosition:"end"}),_(e=>!h(e),{})]}],drop:{...s,buttonsAlign:"moves the buttons only when there is no heading (4 of 128 live nodes), where the Box puts them at the end. 0 of 128 live nodes store it (the live export, 2026-10-24)",buttonsAlignPhone:"the phone's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Phone view's Block alignment row), so nothing moves",buttonsAlignTablet:"the tablet's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Tablet view's Block alignment row, 0 stored on the US sites 2026-11-05), so nothing moves"}};function Z(e){const{siteGutter:n,siteGutterPhone:i}=e.site??{},a=C(e),y=Math.min(20,D(i)??L(n));return{sectionPaddingLeft:a,sectionPaddingRight:a,sectionPaddingLeftPhone:y,sectionPaddingRightPhone:y}}const B={top:40,bottom:64,topPhone:24,bottomPhone:36},$={name:"Section Header",boxProps:(e,n)=>({...p,direction:"column",gap:0,...b(e,B),...Z(n)}),box:[...d,...P(B)],parts:[f("SectionHeader")],drop:{...s,...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={...t,direction:"row",share:[67],gap:30},E={...t,sectionPaddingLeft:30,sectionPaddingLeftPhone:0},N=(e,n,i)=>({kind:"group",name:e,props:n,parts:[i]}),ee={name:"Lead Text",boxProps:e=>({...p,direction:"column",gap:40,gapPhone:40,sectionBorder:{bottom:1},...w(e,"ParagraphsA")}),box:[...d,...S("ParagraphsA")],parts:[{kind:"group",name:"Numbers",props:{...x,gapPhone:24,sectionBorder:{bottom:1},sectionPaddingBottom:40,sectionPaddingBottomPhone:40},parts:[{kind:"group",name:"Eyebrow",props:{...t,sectionPaddingTop:5,sectionPaddingBottom:1,sectionPaddingTopPhone:5,sectionPaddingBottomPhone:1},parts:[u("eyebrow",{color:"labels",...r("label",12),letterSpacing:.24})]},N("Stats column",t,{kind:"group",name:"Stats",props:{...E,gap:0,gapPhone:0},parts:[{kind:"list",key:"stats",name:"Stat",flat:!0,parts:[A("value","label",{...r("label",13),letterSpacing:.18,lineHeight:1.8})]}]})]},{kind:"group",name:"Words",props:{...x,gapPhone:28},parts:[{kind:"group",name:"Lead",props:t,parts:[{kind:"group",name:"Measure",props:{...t,maxWidth:780},parts:[{kind:"text",key:"lead",props:l,style:{textStyle:"heading-3",...r("headingSmall",22,20),weight:400,case:"none",lineHeight:1.45,letterSpacing:-.005}}]}]},N("Note column",{...t,justify:"end",widthFit:"fill"},{kind:"group",name:"Founders",props:{...E,gap:8,gapPhone:8},parts:[{kind:"group",name:"Note",props:{...t,gap:6,gapPhone:6},parts:[{kind:"text",key:"foundersHeading",props:l,style:{textStyle:"body-1",fontRole:"heading",...r("body",18,16),weight:500,letterSpacing:-.01,lineHeight:1.7}},{kind:"text",key:"foundersBody",props:m,style:{textStyle:"body-5",fontRole:"heading",...r("body",14,12),lineHeight:1.7}}]},u("attribution",{...r("label",12,10),letterSpacing:.24,lineHeight:1.7})]})]}],drop:{...s}},I={top:24,bottom:24,topPhone:24,bottomPhone:24},te={name:"Banner",boxProps:e=>({...p,direction:"column",gap:0,...b(e,I)}),box:[...d,"contained",...P(I)],parts:[{kind:"group",name:"Card",keepEmpty:!0,props:{...t,gap:28,placement:"top-left",darken:60,darkenStyle:"even",sectionBorder:{width:1},...J(64,40,40,24)},box:[["imageSrc","bgImage"],["overlay","darken",e=>Math.min(Math.max(W(e)??60,0),100)]],parts:[{kind:"group",name:"Words",props:{...t,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:{...m,maxWidth:680},style:{textStyle:"body-1",lineHeight:1.6},was:{size:16}}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:g}]}],drop:{...s,...c}},oe={Prose:Q,TitleWithButtons:V,SectionHeader:$,ParagraphsA:ee,Banner:te};function we(){o(oe),o(X),o(G),o(R),o(M),o(F),o(z),o(K),o(U),o(Y),o(j)}export{oe as GENERAL_SECTION_TO_BOX,we as registerGeneralSectionRows};
@@ -0,0 +1 @@
1
+ export declare function markHeadCoreBoxes<T>(data: T): T;
@@ -0,0 +1 @@
1
+ import{isNode as y,isNodeList as c}from"efficient-easel/data";import{storedStepsShown as l}from"../../components/ProcessSteps.js";import{HEAD_CORE_PROP as O,HOLDS_HEAD_CORE_PROP as P}from"../content/empty-hides.js";import{parseSectionHeadPlacement as x}from"../../../format/lib/sections/section-head-placement.js";const u="Flex",E="Text",m=t=>Object.values(t??{}).filter(c),p=t=>x(t.props?.headPlacement)==="own-box",i=t=>t===void 0||Array.isArray(t)&&t.length===0;function f(t){return t.type===E?!0:t.type===u&&m(t.props).every(e=>e.every(f))}const g={ProcessSteps:t=>i(t.boxes)&&l(t.steps).length===0,Logos:t=>i(t.logos)&&i(t.items)};function A(t){if(t?.type!==u||!t.props)return t;const e=m(t.props).flat();if(!e.some(p)||!e.every(o=>p(o)||f(o)))return t;const n={...t.props,[P]:!0};for(const[o,s]of Object.entries(t.props))!c(s)||!s.some(r=>y(r)&&p(r))||(n[o]=s.map(r=>{if(!p(r))return r;const a=g[String(r.type)]?.(r.props??{})===!0;return{...r,props:{...r.props,[O]:a?"empty":!0}}}));return{...t,props:n}}function b(t){const e=t;if(!e||!Array.isArray(e.content))return t;let n=!1;const o=e.content.map(s=>{const r=A(s);return r!==s&&(n=!0),r});return n?{...e,content:o}:t}export{b as markHeadCoreBoxes};
@@ -1 +1 @@
1
- "use client";import{jsx as t}from"react/jsx-runtime";import{Render as m}from"efficient-easel/render";import{capHeroGroups as i}from"../../../format/lib/document/cap-hero-groups.js";import{oneH1 as a}from"../../../format/lib/document/one-h1.js";import{withPageContents as n}from"../content/page-contents.js";import{migrateLegacyPageData as f}from"./migrate-legacy.js";import{migrateRenamedProps as p}from"../../../format/lib/document/renamed-props.js";import{convertSectionsInPage as s,SECTION_TO_BOX_ON as g}from"../sections/section-to-box.js";import{siteThemeOf as c}from"../../../format/lib/theme.js";import{registerGeneralSectionRows as d}from"./blocks/general/section-to-box-rows.js";function u({config:e,data:o,metadata:r}){return d(),t(m,{config:e,metadata:r,data:n(a(i(s(p(f(o)),g,{theme:c(r)}))))})}export{u as default};
1
+ "use client";import{jsx as t}from"react/jsx-runtime";import{Render as m}from"efficient-easel/render";import{capHeroGroups as i}from"../../../format/lib/document/cap-hero-groups.js";import{markHeadCoreBoxes as a}from"./head-core-boxes.js";import{oneH1 as n}from"../../../format/lib/document/one-h1.js";import{withPageContents as f}from"../content/page-contents.js";import{migrateLegacyPageData as p}from"./migrate-legacy.js";import{migrateRenamedProps as s}from"../../../format/lib/document/renamed-props.js";import{convertSectionsInPage as g,SECTION_TO_BOX_ON as c}from"../sections/section-to-box.js";import{siteThemeOf as d}from"../../../format/lib/theme.js";import{registerGeneralSectionRows as u}from"./blocks/general/section-to-box-rows.js";function O({config:e,data:o,metadata:r}){return u(),t(m,{config:e,metadata:r,data:f(a(n(i(g(s(p(o)),c,{theme:d(r)})))))})}export{O as default};
@@ -1 +1 @@
1
- import{jsx as C}from"react/jsx-runtime";import{parseBlockWidthFit as D,phoneKey as o,tabletKey as l}from"efficient-easel/draw";import{blockPhoneHideClass as j,blockSizeOf as P,blockSizeValuesOf as K}from"../../content/block-size.js";import{CellWrap as A}from"../../../components/InBoxContext.js";import{boxPhoneRowFits as L,boxRowColumnsClass as W,boxShareClasses as g,boxShareTabletOf as G,boxTabletColumnsClass as X}from"../../../../format/lib/content/box-layout.js";import{resolveContainerDirection as Z}from"../../../../format/lib/content/container-direction.js";import{containerBlocksFor as v}from"../../../../format/lib/document/container-blocks.js";import{readPartStyle as U}from"../part-styles.js";import{addShowWhenFacts as $,withRowRules as p}from"../../../../format/lib/document/show-when-attach.js";import{BOX_BLOCK_KEYS as M}from"./cell-width.js";import{findParentNode as V}from"../../../../format/lib/document/passes/document-position.js";const Y=new Set(["Text","Heading"]),q=new Set(["h1","h2","h3","h4","h5","h6"]);function O(t,e){return t==="Heading"?!0:t!=="Text"?!1:typeof e.tag=="string"&&q.has(e.tag)?!0:U(e,"text").textStyle?.startsWith("heading-")===!0}const c={not:{context:"blockOutsideBox",is:!0}},T={all:[c,{not:{context:"boxSharesWidth",is:!0}}]},B={all:[c,{not:{context:"boxSharesWidthPhone",is:!0}}]},k={all:[c,{not:{context:"boxSharesWidthTablet",is:!0}}]};function J(t,e){return{any:[{field:l(t),is:e},{all:[{field:l(t),set:!1},{field:t,is:e}]}]}}function y(t,e,i){return{any:[{field:o(t),is:e},{all:[{field:o(t),set:!1},i??{field:t,is:e}]}]}}const H={any:[{field:"textFit",is:"shrink"},{all:[{field:"textFit",set:!1},{not:{context:"textWrapsByDefault",is:!0}}]}]},Q=[[["_gBlockSize","minWidth",l("minWidth"),o("minWidth"),"maxWidth",l("maxWidth"),o("maxWidth")],c],[["widthFit"],T],[[l("widthFit")],k],[[o("widthFit")],B],[["width"],{all:[T,{field:"widthFit",is:"fixed"}]}],[[l("width")],{all:[k,J("widthFit","fixed")]}],[[o("width")],{all:[B,y("widthFit","fixed")]}]],I=[[["_gText","textFit",o("textFit")],c],[["minFont"],{all:[c,H]}],[[o("minFont")],{all:[c,y("textFit","shrink",H)]}]],h=(t,e)=>V(e.appState,t.props?.id),f=t=>!!t&&typeof t.type=="string"&&v(t.type)!==null,S=t=>(t.type==="Flex"||t.type==="HeroGroup")&&Z(t.type,t.props?.direction)==="row",w=t=>{const e=D(t);return e!==void 0&&e!=="fit"},tt={blockOutsideBox:(t,e)=>!f(h(t,e)),boxSharesWidth:(t,e)=>{const i=h(t,e);return!f(i)||!S(i)?!1:W({...i.props,direction:"row"})!==""?!0:g(i.props?.share)!==""&&!w(t.props?.widthFit)},boxSharesWidthTablet:(t,e)=>{const i=h(t,e);if(!f(i)||!S(i))return!1;if(X(i.props?.[l("columns")])!==""||W({...i.props,direction:"row"})!=="")return!0;const n=G(i.props?.[l("share")])??i.props?.share;return g(n)!==""&&!w(t.props?.[l("widthFit")]??t.props?.widthFit)},boxSharesWidthPhone:(t,e)=>{const i=h(t,e);if(!f(i)||!S(i))return!1;const n=i.props?.phoneRow;return(Number(n)===2||Number(n)===3)&&!L(n,i.props?.[o("share")])&&!w(t.props?.[o("widthFit")]??t.props?.widthFit)}},et=t=>/^_[gds][A-Z]/.test(t);function it(t,e,i){const n=Object.entries(t),r=n.findIndex(([a])=>a===e);if(r===-1)return null;let s=r+1;for(;s<n.length&&!et(n[s][0]);)s++;return Object.fromEntries([...n.slice(0,s),...Object.entries(i),...n.slice(s)])}function N(t,e,i){const n=Object.entries(t);return Object.fromEntries([...n.slice(0,e),...Object.entries(i),...n.slice(e)])}function nt(t,e,i){const n=Object.keys(e);if(n.includes("_dSize")){const{_gBlockSize:r,...s}=i;return N(e,n.indexOf("_dSize")+1,s)}return rt.has(t)&&n.includes("_gSpacing")?N(e,n.indexOf("_gSpacing"),i):{...e,...i}}const rt=new Set(["Text","Heading"]);function st(t,e){const{_gText:i,...n}=e;return it(t,"_gText",n)??{...t,...e}}function ot(t){const e=new WeakMap;return i=>{if(!i||!("textFit"in i))return i;let n=e.get(i);if(!n){n={...i};for(const r of["textFit",o("textFit")])r in n&&(n[r]=t[r]);e.set(i,n)}return n}}const Ft={name:"blockSize",applies:(t,e,i)=>M.includes(t)&&!!i&&typeof i.render=="function",panel(t,e,i){const n=Y.has(e),{text:r}=i.blockSizeFields(n?{textFit:e==="Heading"?"shrink":"wrap"}:{}),{size:s}=i.blockSizeFields({tablet:!0});let a=nt(e,t.fields??{},p(s,Q));if(n){const d=p(r,I);if(a=st(a,d),e==="Text"){const z=p(i.blockSizeFields({textFit:"shrink"}).text,I),E=ot(z),b=t.resolveFields,R=(F,u)=>{const x=b?b(F,u):u.fields,m=_=>O(e,F?.props??{})?E(_??u.fields):_;return x instanceof Promise?x.then(m):m(x)};t.resolveFields=R}}t.fields=a,$(t,{...tt,textWrapsByDefault:d=>!O(e,d.props??{})})},draw(t){lt(t)}};function lt(t){const e=t.render;t.render=i=>{const n=P(K(i)),r=e(i);if(n===null)return r;const s=j(i);return C(A,{className:s?`${n.className} ${s}`:n.className,...Object.keys(n.style).length?{style:n.style}:{},attrs:n.attrs,children:r})}}export{Ft as blockSize,O as textShrinksByDefault};
1
+ import{jsx as W}from"react/jsx-runtime";import{parseBlockWidthFit as D,phoneKey as o,tabletKey as l}from"efficient-easel/draw";import{blockFillInCellClass as j,blockPhoneHideClass as P,blockSizeOf as K,blockSizeValuesOf as A}from"../../content/block-size.js";import{CellWrap as L,useBoxCell as G}from"../../../components/InBoxContext.js";import{boxPhoneRowFits as X,boxRowColumnsClass as g,boxShareClasses as O,boxShareTabletOf as Z,boxTabletColumnsClass as $}from"../../../../format/lib/content/box-layout.js";import{resolveContainerDirection as v}from"../../../../format/lib/content/container-direction.js";import{containerBlocksFor as U}from"../../../../format/lib/document/container-blocks.js";import{readPartStyle as M}from"../part-styles.js";import{addShowWhenFacts as V,withRowRules as x}from"../../../../format/lib/document/show-when-attach.js";import{BOX_BLOCK_KEYS as Y}from"./cell-width.js";import{findParentNode as q}from"../../../../format/lib/document/passes/document-position.js";const J=new Set(["Text","Heading"]),Q=new Set(["h1","h2","h3","h4","h5","h6"]);function T(t,e){return t==="Heading"?!0:t!=="Text"?!1:typeof e.tag=="string"&&Q.has(e.tag)?!0:M(e,"text").textStyle?.startsWith("heading-")===!0}const a={not:{context:"blockOutsideBox",is:!0}},B={all:[a,{not:{context:"boxSharesWidth",is:!0}}]},k={all:[a,{not:{context:"boxSharesWidthPhone",is:!0}}]},C={all:[a,{not:{context:"boxSharesWidthTablet",is:!0}}]};function tt(t,e){return{any:[{field:l(t),is:e},{all:[{field:l(t),set:!1},{field:t,is:e}]}]}}function y(t,e,i){return{any:[{field:o(t),is:e},{all:[{field:o(t),set:!1},i??{field:t,is:e}]}]}}const H={any:[{field:"textFit",is:"shrink"},{all:[{field:"textFit",set:!1},{not:{context:"textWrapsByDefault",is:!0}}]}]},et=[[["_gBlockSize","minWidth",l("minWidth"),o("minWidth"),"maxWidth",l("maxWidth"),o("maxWidth")],a],[["widthFit"],B],[[l("widthFit")],C],[[o("widthFit")],k],[["width"],{all:[B,{field:"widthFit",is:"fixed"}]}],[[l("width")],{all:[C,tt("widthFit","fixed")]}],[[o("width")],{all:[k,y("widthFit","fixed")]}]],I=[[["_gText","textFit",o("textFit")],a],[["minFont"],{all:[a,H]}],[[o("minFont")],{all:[a,y("textFit","shrink",H)]}]],h=(t,e)=>q(e.appState,t.props?.id),f=t=>!!t&&typeof t.type=="string"&&U(t.type)!==null,S=t=>(t.type==="Flex"||t.type==="HeroGroup")&&v(t.type,t.props?.direction)==="row",w=t=>{const e=D(t);return e!==void 0&&e!=="fit"},it={blockOutsideBox:(t,e)=>!f(h(t,e)),boxSharesWidth:(t,e)=>{const i=h(t,e);return!f(i)||!S(i)?!1:g({...i.props,direction:"row"})!==""?!0:O(i.props?.share)!==""&&!w(t.props?.widthFit)},boxSharesWidthTablet:(t,e)=>{const i=h(t,e);if(!f(i)||!S(i))return!1;if($(i.props?.[l("columns")])!==""||g({...i.props,direction:"row"})!=="")return!0;const n=Z(i.props?.[l("share")])??i.props?.share;return O(n)!==""&&!w(t.props?.[l("widthFit")]??t.props?.widthFit)},boxSharesWidthPhone:(t,e)=>{const i=h(t,e);if(!f(i)||!S(i))return!1;const n=i.props?.phoneRow;return(Number(n)===2||Number(n)===3)&&!X(n,i.props?.[o("share")])&&!w(t.props?.[o("widthFit")]??t.props?.widthFit)}},nt=t=>/^_[gds][A-Z]/.test(t);function rt(t,e,i){const n=Object.entries(t),r=n.findIndex(([c])=>c===e);if(r===-1)return null;let s=r+1;for(;s<n.length&&!nt(n[s][0]);)s++;return Object.fromEntries([...n.slice(0,s),...Object.entries(i),...n.slice(s)])}function N(t,e,i){const n=Object.entries(t);return Object.fromEntries([...n.slice(0,e),...Object.entries(i),...n.slice(e)])}function st(t,e,i){const n=Object.keys(e);if(n.includes("_dSize")){const{_gBlockSize:r,...s}=i;return N(e,n.indexOf("_dSize")+1,s)}return ot.has(t)&&n.includes("_gSpacing")?N(e,n.indexOf("_gSpacing"),i):{...e,...i}}const ot=new Set(["Text","Heading"]);function lt(t,e){const{_gText:i,...n}=e;return rt(t,"_gText",n)??{...t,...e}}function ct(t){const e=new WeakMap;return i=>{if(!i||!("textFit"in i))return i;let n=e.get(i);if(!n){n={...i};for(const r of["textFit",o("textFit")])r in n&&(n[r]=t[r]);e.set(i,n)}return n}}const Wt={name:"blockSize",applies:(t,e,i)=>Y.includes(t)&&!!i&&typeof i.render=="function",panel(t,e,i){const n=J.has(e),{text:r}=i.blockSizeFields(n?{textFit:e==="Heading"?"shrink":"wrap"}:{}),{size:s}=i.blockSizeFields({tablet:!0});let c=st(e,t.fields??{},x(s,et));if(n){const d=x(r,I);if(c=lt(c,d),e==="Text"){const z=x(i.blockSizeFields({textFit:"shrink"}).text,I),E=ct(z),b=t.resolveFields,R=(F,u)=>{const p=b?b(F,u):u.fields,m=_=>T(e,F?.props??{})?E(_??u.fields):_;return p instanceof Promise?p.then(m):m(p)};t.resolveFields=R}}t.fields=c,V(t,{...it,textWrapsByDefault:d=>!T(e,d.props??{})})},draw(t){at(t)}};function at(t){const e=t.render;t.render=i=>{const n=A(i),r=K(n),s=e(i);if(r===null)return s;const c=P(i);return W(ht,{size:r,className:c?`${r.className} ${c}`:r.className,inCell:j(n),children:s})}}function ht({size:t,className:e,inCell:i,children:n}){const r=G()?.phoneCells===!0;return W(L,{className:r&&i?`${e} ${i}`:e,...Object.keys(t.style).length?{style:t.style}:{},attrs:t.attrs,children:n})}export{Wt as blockSize,T as textShrinksByDefault};
@@ -0,0 +1,3 @@
1
+ import type { BlockPass } from "../../../../format/lib/document/passes/types.js";
2
+ export declare const headCore: BlockPass;
3
+ export declare const headBox: BlockPass;
@@ -0,0 +1 @@
1
+ import{jsx as t,jsxs as a}from"react/jsx-runtime";import{EmptyHidesStyle as s,HEAD_BOX_CLASS as _,HEAD_CORE_CLASS as c,HEAD_CORE_PROP as d,HOLDS_HEAD_CORE_PROP as l}from"../../content/empty-hides.js";const o="Flex",i=(e,r)=>e[r]!==void 0&&e[r]!==!1&&!e.editor?.isEditing,m={name:"headCore",applies:(e,r,n)=>typeof n?.render=="function",draw(e){const r=e.render;e.render=n=>i(n,d)?t("div",{className:c,children:n[d]==="empty"?null:r(n)}):r(n)}},E={name:"headBox",applies:(e,r,n)=>e===o&&typeof n?.render=="function",draw(e){const r=e.render;e.render=n=>i(n,l)?a("div",{className:_,children:[t(s,{}),r(n)]}):r(n)}};export{E as headBox,m as headCore};
@@ -1 +1 @@
1
- import{catalogueLabel as e}from"../../../../format/lib/document/passes/catalogue-labels.js";import{blockSize as n}from"./block-size.js";import{cardTemplateOnInsert as s}from"../../../../format/lib/document/passes/card-template-on-insert.js";import{cellWidth as p}from"./cell-width.js";import{clickableParts as c}from"./clickable-parts.js";import{cardCorners as f,sectionCorners as a}from"./corners.js";import{emptyHeadings as l}from"../../../../format/lib/document/passes/empty-headings.js";import{showWhenRows as d}from"../../../../format/lib/document/passes/show-when-rows.js";import{hiddenNodes as h}from"../../../../format/lib/document/passes/hidden-nodes.js";import{showFor as u}from"./show-for.js";import{mediaValues as S}from"../../../../format/lib/document/passes/media-values.js";import{sectionAnchor as g}from"./section-anchor.js";import{blockEntrance as w,sectionAnimation as b}from"./section-animation.js";import{sectionHeight as A}from"./section-height.js";import{cardSticky as P,sectionSticky as k}from"./section-sticky.js";import{sectionBorder as C}from"./borders.js";import{blockPadding as W,sectionPadding as y}from"./section-padding.js";import{sectionTheme as B,slideTheme as G}from"./section-theme.js";import{buttonAlignInRow as T,containedWidth as E,sectionWidth as H}from"./section-width.js";import{blockGroups as I,sectionGroups as L}from"../../../../format/lib/document/passes/settings-groups.js";import{slotsStartAfresh as O}from"./slots-start-afresh.js";import{openSlotDisallow as R,sectionGroupAllow as z}from"../../../../format/lib/document/passes/slot-rules.js";import{registryPassContext as po}from"../../../../format/lib/document/passes/registry-context.js";const D=[O,S,z,R,y,a,C,f,W,w,p,H,E,T,A,g,B,b,k,P,G,n,L,I,d,l,c,u,h,e,s];function eo(r,m,o){const t=m;for(const i of D)i.applies(r,o,t)&&(o.inspector&&i.panel?.(t,r,o.inspector,o),i.draw?.(t,r,o));return m}export{D as BLOCK_PASSES,eo as applyBlockPasses,po as registryPassContext};
1
+ import{catalogueLabel as e}from"../../../../format/lib/document/passes/catalogue-labels.js";import{blockSize as n}from"./block-size.js";import{cardTemplateOnInsert as s}from"../../../../format/lib/document/passes/card-template-on-insert.js";import{cellWidth as p}from"./cell-width.js";import{clickableParts as c}from"./clickable-parts.js";import{cardCorners as f,sectionCorners as a}from"./corners.js";import{emptyHeadings as l}from"../../../../format/lib/document/passes/empty-headings.js";import{showWhenRows as d}from"../../../../format/lib/document/passes/show-when-rows.js";import{headBox as h,headCore as u}from"./head-core.js";import{hiddenNodes as S}from"../../../../format/lib/document/passes/hidden-nodes.js";import{showFor as g}from"./show-for.js";import{mediaValues as w}from"../../../../format/lib/document/passes/media-values.js";import{sectionAnchor as b}from"./section-anchor.js";import{blockEntrance as A,sectionAnimation as P}from"./section-animation.js";import{sectionHeight as k}from"./section-height.js";import{cardSticky as C,sectionSticky as B}from"./section-sticky.js";import{sectionBorder as W}from"./borders.js";import{blockPadding as y,sectionPadding as G}from"./section-padding.js";import{sectionTheme as T,slideTheme as E}from"./section-theme.js";import{buttonAlignInRow as H,containedWidth as I,sectionWidth as L}from"./section-width.js";import{blockGroups as O,sectionGroups as R}from"../../../../format/lib/document/passes/settings-groups.js";import{slotsStartAfresh as x}from"./slots-start-afresh.js";import{openSlotDisallow as z,sectionGroupAllow as D}from"../../../../format/lib/document/passes/slot-rules.js";import{registryPassContext as ao}from"../../../../format/lib/document/passes/registry-context.js";const F=[x,w,u,D,z,G,a,W,f,y,A,p,L,I,H,k,b,T,P,B,C,E,n,R,O,d,l,c,h,g,S,e,s];function po(r,m,o){const t=m;for(const i of F)i.applies(r,o,t)&&(o.inspector&&i.panel?.(t,r,o.inspector,o),i.draw?.(t,r,o));return m}export{F as BLOCK_PASSES,po as applyBlockPasses,ao as registryPassContext};
@@ -1 +1 @@
1
- import{jsx as a}from"react/jsx-runtime";import{CellWrap as d}from"../../../components/InBoxContext.js";import{SECTION_THEME_EXCLUDED as E,SECTION_THEME_NESTED_READING as o,nestedAccentValue as l,sectionThemeWrap as T}from"../../../../format/lib/content/section-surface.js";const h={name:"sectionTheme",applies:(e,t,s)=>t.isSection(e)&&!E.has(e)&&!!s&&typeof s.render=="function",panel(e,t,s){const{sectionThemeFields:i,SECTION_THEME_FOLLOW_LABEL:n}=s,r=o.has(t);e.fields={...e.fields,...r?i(l,n):i()}},draw(e,t){const s=o.has(t),i=e.render;e.render=n=>{const r=T(s?{...n,sectionAccent:l(n.sectionAccent)}:n),c=i(n);return r?a(d,{className:r.className,style:r.style,children:c}):c}}},L={name:"slideTheme",applies:e=>e==="HeroSlide",panel(e,t,s){const{sectionThemeFields:i,BLOCK_THEME_FOLLOW_LABEL:n}=s;e?.fields&&(e.fields={...e.fields,...i(l,n)})}};export{h as sectionTheme,L as slideTheme};
1
+ import{jsx as a}from"react/jsx-runtime";import{CellWrap as f}from"../../../components/InBoxContext.js";import{SectionRootChoice as T}from"../../../components/SiteGutterFrame.js";import{SITE_WIDTH_CAP as _,centredCap as h}from"../../../../format/lib/content/page-width.js";import{ownNodeWidth as L}from"../../../../format/lib/content/site-gutter.js";import{SECTION_THEME_EXCLUDED as C,SECTION_THEME_NESTED_READING as E,nestedAccentValue as l,sectionThemeWrap as N}from"../../../../format/lib/content/section-surface.js";const I={name:"sectionTheme",applies:(e,s,t)=>s.isSection(e)&&!C.has(e)&&!!t&&typeof t.render=="function",panel(e,s,t){const{sectionThemeFields:o,SECTION_THEME_FOLLOW_LABEL:n}=t,i=E.has(s);e.fields={...e.fields,...i?o(l,n):o()}},draw(e,s){const t=E.has(s),o=e.render;e.render=n=>{const i=N(t?{...n,sectionAccent:l(n.sectionAccent)}:n),d=o(n);if(!i)return d;const r=m=>a(f,{className:i.className,style:m,children:d}),c=i.style;return L(s,n).background!=="content"?r(c):a(T,{own:()=>r({...c,...h(_)}),followed:()=>r(c)})}}},W={name:"slideTheme",applies:e=>e==="HeroSlide",panel(e,s,t){const{sectionThemeFields:o,BLOCK_THEME_FOLLOW_LABEL:n}=t;e?.fields&&(e.fields={...e.fields,...o(l,n)})}};export{I as sectionTheme,W as slideTheme};
@@ -1 +1 @@
1
- import{jsx as u}from"react/jsx-runtime";import{resolveContainerDirection as S}from"../../../../format/lib/content/container-direction.js";import{HERO_BACKGROUND_VAR as v,HERO_CHROME_CAP_VAR as A,HERO_CHROME_INSET_VAR as B,SITE_WIDTH_CAP as f,centredCap as I,heroBackgroundTokens as W}from"../../../../format/lib/content/page-width.js";import{SECTION_WIDTH_FAMILY as y,hasWidthFamily as g,resolveWidth as C,siteWidthsOf as G}from"../../../../format/lib/content/section-width.js";import{boxGutterOf as b,boxPlaceOf as F,isFrameContainer as T,siteDrawsGutter as H}from"../../../../format/lib/content/site-gutter.js";import{getEditorSiteContentWidth as P}from"../../../../format/lib/document/editor-site-widths.js";import{NestedBoxChoice as D,SplitBandAndColumn as M}from"../../../components/SiteGutterFrame.js";import{FRAME as m}from"../../../components/BlockFrame.js";import{sectionFillPassClass as k}from"../../../../format/lib/content/section-min-height.js";import{parentCapsWidth as V}from"../../../../format/lib/sections/section-head-placement.js";import{addShowWhenFacts as p,withRowsShownWhen as h}from"../../../../format/lib/document/show-when-attach.js";import{findParentNode as j,isNestedNode as L}from"../../../../format/lib/document/passes/document-position.js";const N="--sf-sw-site",U="--sf-sw-content",K="--sf-bg-cap",Y="contents [--sf-site-width:var(--sf-sw-content)] max-view-wide:[--sf-site-width:var(--sf-sw-site)]";function O(t,e){return t==="full"&&e!=="content"?"100vw":null}function E(t,e){return e===null?t:u("div",{className:"contents",style:{[N]:f},children:u("div",{className:Y,style:{[U]:e},children:t})})}const $="--sf-content-cap",q="contents max-view-wide:[--sf-content-cap:none]";function z(t,e){return t==="full"||e==="content"?null:`var(${N})`}function J(t,e){return e===null?t:u("div",{className:"contents",style:{[N]:f},children:u("div",{className:q,style:{[$]:e},children:t})})}const _=(t,e,n="")=>t==="content"?u("div",{className:n||void 0,style:I(f),children:e}):e;function x(t,e,n,o,i){return n==="full"?_(o,t({...e,contained:!1}),i):o==="content"?t({...e,contained:!0}):u(M,{children:t({...e,contained:!0})})}function Q(t,e){const n=y[e],o=t.render;t.render=i=>{const s=G(i),r=s.content??"content";if(n==="hero"){const d=s.background,l=E(o(i),O(r,d));return d==="full"?u("div",{style:{[v]:"none",[B]:"initial",[A]:"initial"},children:l}):d==="content"?u("div",{style:W(!0),children:l}):l}const c=s.background??"full",a=k(i);if(n==="scrollOver"){const d=o({...i,fullWidth:r==="full"});return c==="content"?u("div",{className:"contents",style:{[K]:f},children:d}):d}switch(n){case"both":return _(c,J(o(i),z(r,c)),a);case"contained":{const d=x(o,i,r,c,a);if(!T(e))return d;const l=b(i),w=l===void 0?r:l?"content":"full";return w===r?d:u(D,{atTop:d,nested:x(o,i,w,c,a)})}case"contentColumn":case"contentFull":case"productGrid":{const l=o({...i,widthMode:r==="full"?"full":"page"});return n==="productGrid"?c==="content"?u("div",{className:a?`${m} ${a}`:m,children:l}):l:_(c,l,a)}default:return _(c,E(o(i),O(r,c)),a)}}}const wt={name:"sectionWidth",applies:(t,e,n)=>g(t)&&!!n&&typeof n.render=="function",panel(t,e,n){if(!T(e))return;const o=n.boxGutterFields();t.fields=R(e,t,{...t.fields,...o},Object.keys(o))},draw(t,e){Q(t,e)}};function X(t,e){if(!t||!("widthMode"in t))return t;const n={...t},o=n.widthMode;return o&&(n.widthMode={...o,currentValue:e.mode,inherited:e.inherited}),n}const Z=new Set(["Heading","Text","ImageBlock","ButtonBlock"]),Ct={name:"containedWidth",applies:(t,e,n)=>Z.has(t)&&!!n&&typeof n.render=="function",panel(t,e,n){const o=n.widthField;t.fields=R(e,t,{...t.fields,...o("page")});const i=t.resolveFields;t.resolveFields=(s,r)=>{const c=i?i(s,r):r.fields,a=C(s?.props??{},"page"),d=l=>X(l,a);return c&&typeof c.then=="function"?c.then(d):d(c)}},draw(t){const e=t.render;t.render=n=>{const{mode:o}=C(n,"page");return e({...n,contained:o!=="full"})}}},tt={not:{context:"inHeroGroupRow",is:!0}},Tt={name:"buttonAlignInRow",applies:t=>t==="ButtonBlock",panel(t){const e=t;e.fields=h(e.fields??{},["align"],tt),p(e,{inHeroGroupRow:(n,o)=>{const i=j(o.appState,n.props?.id);return!!i&&i.type==="HeroGroup"&&S("HeroGroup",i.props?.direction)==="row"}})}};function et(t){return Object.values(t).some(e=>!!e&&typeof e=="object"&&e.type==="slot")}const nt={any:[]},ot={all:[{not:{context:"outsideBox",is:!0}},{not:{context:"insideSiteGutter",is:!0}}]},it={not:{context:"widthCappedByParent",is:!0}};function R(t,e,n,o=["widthMode"]){if(t==="ButtonBlock")return h(n,["_gWidth",...o],nt);if(et(n)){const i=(s,r)=>F(r.appState?.data?.content,s.props?.id,H(P()));return p(e,{outsideBox:(s,r)=>i(s,r)?.inBox!==!0,insideSiteGutter:(s,r)=>i(s,r)?.insideGutter}),h(n,o,ot)}return p(e,{widthCappedByParent:(i,s)=>"parent"in s?V(s.parent):L({props:i.props??{}},s)}),h(n,o,it)}export{K as SECTION_BACKGROUND_VAR,q as SECTION_CONTENT_CAP_CLASS,$ as SECTION_CONTENT_CAP_VAR,Y as SECTION_CONTENT_CLASS,U as SECTION_CONTENT_VAR,N as SITE_CONTENT_VAR,Tt as buttonAlignInRow,Ct as containedWidth,wt as sectionWidth,X as widthModeFields};
1
+ import{jsx as l}from"react/jsx-runtime";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 h,centredCap as b,heroBackgroundTokens as X}from"../../../../format/lib/content/page-width.js";import{SECTION_WIDTH_FAMILY as B,SECTION_WIDTH_KEYS as I,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 N,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 G}from"../../../components/SiteGutterFrame.js";import{FRAME as D}from"../../../components/BlockFrame.js";import{sectionFillPassClass as F}from"../../../../format/lib/content/section-min-height.js";import{parentCapsWidth as ut}from"../../../../format/lib/sections/section-head-placement.js";import{addShowWhenFacts as w,withRowsShownWhen as E}from"../../../../format/lib/document/show-when-attach.js";import{findParentNode as H,isNestedNode as st}from"../../../../format/lib/document/passes/document-position.js";const O="--sf-sw-site",at="--sf-sw-content",ft="--sf-bg-cap",ht="contents [--sf-site-width:var(--sf-sw-content)] max-view-wide:[--sf-site-width:var(--sf-sw-site)]",x=({own:t,content:n,siteContent:e})=>t===!0&&n==="full"&&e!=="full",M="contents view-wide:[--sf-site-width:100vw]",R=({held:t},n,e)=>t?e:l("div",{className:n,children:e}),_t=`contents view-wide:[--sf-site-width:100vw] ${U} view-wide:[--sf-site-gutter:var(--intro-edge)]`,m=(t,n)=>n==="content"?`min(${t}px,var(${O}))`:`${t}px`;function C({content:t,contentMax:n},e){return t==="full"?e!=="content"?"100vw":null:n===null?null:m(n,e)}function T(t,n){return n===null?t:l("div",{className:"contents",style:{[O]:h},children:l("div",{className:ht,style:{[at]:n},children:t})})}const Nt="--sf-content-cap",wt="contents max-view-wide:[--sf-content-cap:none]";function Et({content:t,contentMax:n},e){return t==="full"?null:n!==null?m(n,e):e==="content"?null:`var(${O})`}function Ot(t,n){return n===null?t:l("div",{className:"contents",style:{[O]:h},children:l("div",{className:wt,style:{[Nt]:n},children:t})})}const s=(t,n,e="")=>t==="content"?l("div",{className:e||void 0,style:b(h),children:n}):n;function L(t,n,e,o,i){if(x(e))return s(o,R(e,M,l(G,{children:t({...n,contained:!0})})),i);if(e.content==="full")return s(o,t({...n,contained:!1}),i);const c=C(e,o);return o==="content"&&c===null&&!e.own?t({...n,contained:!0}):s(o,T(l(G,{children:t({...n,contained:!0})}),c),i)}function P(t,n,e,o){if(e==="hero"){const r=T(t(n),C(o,o.band));return o.band==="full"?l("div",{style:{[Y]:"none",[j]:"initial",[K]:"initial"},children:r}):o.band==="content"?l("div",{style:X(!0),children:r}):r}const i=o.band??"full",c=F(n);if(e==="rawMarkup"){if(o.content==="full")return s(i,t(n),c);const r=o.contentMax===null?h:m(o.contentMax,i);return l("div",{className:"contents",style:{[O]:h},children:s(i,l("div",{className:c||void 0,style:b(r),children:t(n)}),c)})}if(e==="scrollOver"){const r=o.content==="full",d=x(o)?R(o,_t,t({...n,fullWidth:!1})):T(t({...n,fullWidth:r}),r?null:C(o,i));return i==="content"?l("div",{className:"contents",style:{[ft]:h},children:d}):d}switch(e){case"both":return s(i,Ot(t(n),Et(o,i)),c);case"contained":return L(t,n,o,i,c);case"contentColumn":case"contentFull":case"productGrid":{const r=x(o),d=o.content==="full"&&!r?"full":"page",u=r?R(o,M,t({...n,widthMode:d})):T(t({...n,widthMode:d}),o.content==="full"?null:C(o,i));return e==="productGrid"&&!o.own?i==="content"?l("div",{className:c?`${D} ${c}`:D,children:u}):u:s(i,u,c)}default:return s(i,T(t(n),C(o,i)),c)}}function Ct(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:f=>{const _=f?{...r,band:f.background==="content"?r.band:f.background??r.band,content:f.content??r.content,own:f.background==="full"||f.content!==null,held:!0,siteContent:r.content}:r,v=P(o,i,e,_);if(!N(n))return v;const A=Z(i),W=A===void 0?_.content:A?"content":"full";return W===_.content?v:l(ct,{atTop:v,nested:L(o,i,{..._,content:W,own:!1},_.band??"full",F(i))})}}),u=et(n,i);if(!q(u))return d();const a=e==="rawMarkup",S=u.background??(a?"full":c.background),V=u.content??(a?"full":r.content),p={band:S,content:S==="content"?"content":V,contentMax:u.contentMax,own:!a,siteContent:r.content};return l(dt,{own:()=>l(lt,{value:{background:p.band,content:p.content},children:P(o,i,e,p)}),followed:d})}}const k={not:{context:"heldByANode",is:!0}},Tt={all:[k,{not:{context:"runsEdgeToEdge",is:!0}}]},yt={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=N(n)?e.boxGutterFields():{},c={...t.fields,...i,...o},r=N(n)?y(n,t,c,[Q]):c;w(t,{heldByANode:(d,u)=>"parent"in u?u.parent!=null:!!H(u.appState,d.props?.id)}),N(n)&&w(t,{runsEdgeToEdge:d=>nt(d.props??{})}),t.fields=E(r,[I.background,I.content],N(n)?Tt:k)},draw(t,n){Ct(t,n)}};function St(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 pt=new Set(["Heading","Text","ImageBlock","ButtonBlock"]),Vt={name:"containedWidth",applies:(t,n,e)=>pt.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,u=g(c?.props??{},"page"),a=S=>St(S,u);return d&&typeof d.then=="function"?d.then(a):a(d)}},draw(t){const n=t.render;t.render=e=>{const{mode:o}=g(e,"page");return n({...e,contained:o!=="full"})}}},vt={not:{context:"inHeroGroupRow",is:!0}},Ut={name:"buttonAlignInRow",applies:t=>t==="ButtonBlock",panel(t){const n=t;n.fields=E(n.fields??{},["align"],vt),w(n,{inHeroGroupRow:(e,o)=>{const i=H(o.appState,e.props?.id);return!!i&&i.type==="HeroGroup"&&$("HeroGroup",i.props?.direction)==="row"}})}};function xt(t){return Object.values(t).some(n=>!!n&&typeof n=="object"&&n.type==="slot")}const Rt={any:[]},mt={all:[{not:{context:"outsideBox",is:!0}},{not:{context:"insideSiteGutter",is:!0}}]},At={not:{context:"widthCappedByParent",is:!0}};function y(t,n,e,o=["widthMode"]){if(t==="ButtonBlock")return E(e,["_gWidth",...o],Rt);if(xt(e)){const i=(c,r)=>tt(r.appState?.data?.content,c.props?.id,ot(it()));return w(n,{outsideBox:(c,r)=>i(c,r)?.inBox!==!0,insideSiteGutter:(c,r)=>i(c,r)?.insideGutter}),E(e,o,mt)}return w(n,{widthCappedByParent:(i,c)=>"parent"in c?ut(c.parent):st({props:i.props??{}},c)}),E(e,o,At)}export{ft as SECTION_BACKGROUND_VAR,wt as SECTION_CONTENT_CAP_CLASS,Nt as SECTION_CONTENT_CAP_VAR,ht as SECTION_CONTENT_CLASS,at as SECTION_CONTENT_VAR,O as SITE_CONTENT_VAR,Ut as buttonAlignInRow,Vt as containedWidth,yt as sectionWidth,St as widthModeFields};
@@ -1 +1 @@
1
- import{jsx as s}from"react/jsx-runtime";import{SlotsStartAfresh as l}from"../../../components/InBoxContext.js";import{NotASectionEdge as d}from"../../../components/SiteGutterFrame.js";const u=new Set(["Flex","Grid"]),i=t=>Object.entries(t.fields??{}).filter(([,e])=>e?.type==="slot").map(([e])=>e),a=new WeakMap;function h(t){const e=a.get(t);if(e)return e;const r=t,n=o=>s(d,{children:s(l,{children:s(r,{...o})})});return Object.assign(n,t),Object.defineProperty(n,"blockCount",{get:()=>t.blockCount,configurable:!0}),a.set(t,n),n}const b={name:"slotsStartAfresh",applies:(t,e,r)=>!u.has(t)&&typeof r?.render=="function"&&i(r).length>0,draw(t){const e=i(t),r=t.render;t.render=n=>{const o={...n};for(const c of e){const f=n[c];typeof f=="function"&&(o[c]=h(f))}return r(o)}}};export{b as slotsStartAfresh};
1
+ import{jsx as s}from"react/jsx-runtime";import{SlotsStartAfresh as l}from"../../../components/InBoxContext.js";import{NotASectionEdge as d}from"../../../components/SiteGutterFrame.js";const u=new Set(["Flex","Grid"]),i=e=>Object.entries(e.fields??{}).filter(([,t])=>t?.type==="slot").map(([t])=>t),S=["blockCount","blockIds"],a=new WeakMap;function h(e){const t=a.get(e);if(t)return t;const o=e,n=r=>s(d,{children:s(l,{children:s(o,{...r})})});Object.assign(n,e);for(const r of S)Object.defineProperty(n,r,{get:()=>e[r],configurable:!0,enumerable:!0});return a.set(e,n),n}const k={name:"slotsStartAfresh",applies:(e,t,o)=>!u.has(e)&&typeof o?.render=="function"&&i(o).length>0,draw(e){const t=i(e),o=e.render;e.render=n=>{const r={...n};for(const c of t){const f=n[c];typeof f=="function"&&(r[c]=h(f))}return o(r)}}};export{k as slotsStartAfresh};
@@ -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{seedNodes as ie}from"../../../format/lib/document/seed-parts.js";import{bucketByGroup as re}from"../../../format/lib/locations-grid.js";import{normalizeTheme as V}from"../../../format/lib/theme.js";const P=ee,v=te;function Se(t){if(t.theme)return V(t.theme);const o=t.site?.themePresets;return o?V({selected:t.site?.selectedPreset??0,themes:[...o]}):void 0}function ae(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 Be(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 Te(t){return A[t]}const Y=new Set(["id"]),T={},H=[],ce=[];function _e(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 Pe(){return Object.keys(T)}function fe(t){return t in T&&H.includes(t)}function ve(t,o=ce){return t in T&&(o.includes(t)||fe(t))}function je(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 W=t=>Z(t),Ne=t=>W(t).text.trim()!=="";function de(t){return t.replace(/==(.+?)==/g,(o,i)=>i.startsWith("_")&&i.endsWith("_")?o:`==_${i}_==`)}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 k=i.indexOf(r);return`${i.slice(0,k)}==${r}==${i.slice(k+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 D(t,o,i,r,k={}){const a={...o};for(const h of t){const[m,B,j]=typeof h=="string"?[h,h,void 0]:h;if(i[m]===void 0)continue;const _=j?j(i[m],i,k):i[m];_===void 0?delete a[B]:a[B]=_,r(m,B,_===void 0)}return a}function ye(t){const o=new Set([...Y,"headPlacement","_partStyles",...Object.keys(t.drop??{}),...Object.keys(t.reads??{})]),i=k=>{for(const a of k??[])o.add(typeof a=="string"?a:a[0])},r=k=>{for(const a of k)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 m of h)"kind"in m&&o.add(m.key);break}};for(const k of[t,...t.also??[]])i(k.box),r(k.parts);return o}function q(t,o,i={}){const r=t.props,k=o.skip?.(r);if(k!==void 0)return{node:t,nodes:[t],carried:[],dropped:[],siteWrites:[],restyled:[],skipped:k};const a=String(r.id??t.type),h=[],m=[],B=[],j=new Set,_=(n,s)=>{h.push({key:n,home:s}),j.add(n)},X=r._partStyles??{},L=ye(o);let F=0;const $=(n,s)=>({type:n,props:{...s,id:`${a}~${n}-${++F}`}}),K=(n,s,b,y,x,d,w)=>{if(x){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 D(n??[],e,b,(c,p,f)=>w(c,f?`nothing — the old value draws nothing (${y}: no ${p})`:`${d}${y}: ${p}`),i)},J=n=>ie(n,s=>`${a}~${s}-${++F}`),M=(n,s,b)=>{const y=n.of?n.of(s):Array.isArray(s[n.key])?s[n.key]:[],x=typeof n.props=="function"?n.props(r,i):n.props??{},d=y.map((f,g)=>{const l=f??{},u=n.item?.(l,g,r)??{},O=N(u.reverse?[...n.parts].reverse():n.parts,l,!1,`item ${g+1}: `);return n.flat?u.props?O.map(E=>({...E,props:{...E.props,...u.props,id:E.props.id}})):O:[$(P,{name:`${n.name} ${g+1}`,...x,...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"),re(y.map(g=>g??{}),f.of,f.of).map((g,l)=>{const u=g.items.map(S=>S.item),O=f.parts?N(f.parts,f.head?.(u,r)??{},!1,`group ${l+1}: `):[],E=g.items.map(S=>d[S.index]),z=f.perRow?.(u.length,r),I=Number.isInteger(z)&&z>=1?z:1,C=[];if(f.perRow&&I<E.length)for(let S=0;S*I<E.length;S++)C.push(E.slice(S*I,(S+1)*I).flat());return $(P,{name:`${f.name} ${l+1}`,...f.props??{},[v]:[...O,$(P,{name:`${f.itemsName} ${l+1}`,...f.itemsProps?.(u.length,r)??{},[v]:C.length?C.map((S,U)=>$(P,{name:`${f.rowName??`${f.itemsName} row`} ${U+1}`,...f.rowProps??{},[v]:S})):E.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 g=d.slice(f*e,(f+1)*e).flat(),l=n.rowFiller?e-d.slice(f*e,(f+1)*e).length:0;p.push($(P,{name:`${n.rowName??`${n.name} row`} ${f+1}`,...c,[v]:[...g,...Array.from({length:l},(u,O)=>$(P,{name:`Empty ${O+1}`,...n.rowFiller,[v]:[]}))]}))}return p},N=(n,s,b,y)=>{const x=[],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=W(s[e.key]);if(!c.text.trim()){d(e.key,"nothing — empty words draw nothing, so no block");break}const p=pe(e.role??"body"),{_partStyles:f,...g}=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)}:{}})}x.push($("Text",{text:e.mark==="accentLead"?le(c.text):e.mark==="accentItalic"?de(c.text):c.text,...g,...e.props??{},...l,...c.hidden?{_hidden:!0}:{}})),d(e.key,`${y}Text block: its words${c.hidden?", hidden":""}`);break}case"button":{const c=W(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)??{}};x.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]:"";x.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":{x.push(...M(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&&x.push($(P,{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&&x.push($(e.type,{...p,...e.slot?{[e.slot]:c}:{}}));break}case"core":{const c=e.as??t.type,p={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 g=typeof e.slots=="function"?e.slots(s,i):e.slots??{};for(const[l,u]of Object.entries(g))p[l]=u.flatMap(O=>"kind"in O?M(O,s,d):J([O]));x.push($(c,p));break}}return x},Q=(n,s)=>{const b=s===0?"Box":`${n.name} Box`,y=N(n.parts,r,!0,s===0?"":`${b}: `),x=typeof n.boxProps=="function"?n.boxProps(r,i):n.boxProps??{},d=D(n.box??[],x,r,(w,e,c)=>_(w,c?`nothing — the old value draws nothing (${b}: no ${e})`:`${b}: ${e}`),i);return{type:P,props:{name:n.name,...d,[v]:y,id:ae(a,s)}}},G=[o,...o.also??[]].map(Q);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&&(m.push({key:n,why:s}),j.add(n));for(const n of Object.keys(r))Y.has(n)||j.has(n)||m.push({key:n,why:"not in the row — not carried"});return{node:G[0],nodes:G,carried:h,dropped:m,siteWrites:[...o.site?.(t,i)??[]],restyled:B}}function Ie(t,o=H,i={}){const r=t.content;if(!Array.isArray(r))return t;let k=!1;const a=r.flatMap(h=>{const m=h&&typeof h.type=="string"&&o.includes(h.type)?T[h.type]:void 0;if(!m)return[h];const B=q(h,m,i);return B.skipped!==void 0?[h]:(k=!0,B.nodes)});return k?{...t,content:a}:t}function Re(t,o=H,i={}){if(!Array.isArray(t))return[];const r=[];return t.forEach((k,a)=>{const h=k&&typeof k.type=="string"&&o.includes(k.type)?T[k.type]:void 0;if(!h)return;const m=q(k,h,i);m.skipped===void 0&&r.push({index:a,node:m.node,nodes:m.nodes})}),r}export{v as SECTION_BOX_SLOT,P as SECTION_BOX_TYPE,H as SECTION_TO_BOX_ON,ce as SECTION_TO_BOX_PRESS,Te as boxNativeReason,q as convertSection,Ie as convertSectionsInPage,Se as convertTheme,fe as convertsToBox,Ne as hasWords,je as headParts,ve as pressesAsBox,Be as registerBoxNativeSections,_e as registerSectionToBox,ae as sectionBoxIdOf,Re as sectionToBoxEdits,Ee as sectionToBoxRow,Pe 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 V}from"../../../format/lib/theme.js";const P=ee,v=te;function Be(t){if(t.theme)return V(t.theme);const o=t.site?.themePresets;return o?V({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 Y=new Set(["id"]),T={},H=[],fe=[];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 Pe(t){return T[t]}function ve(){return Object.keys(T)}function de(t){return t in T&&H.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 X=t=>Z(t),Ie=t=>X(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 D(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([...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,_=(n,s)=>{h.push({key:n,home:s}),j.add(n)},F=r._partStyles??{},L=ye(o);let K=0;const $=(n,s)=>({type:n,props:{...s,id:`${a}~${n}-${++K}`}}),M=(n,s,b,y,x,d,w)=>{if(x){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 D(n??[],e,b,(c,p,f)=>w(c,f?`nothing — the old value draws nothing (${y}: no ${p})`:`${d}${y}: ${p}`),i)},J=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]:[],x=typeof n.props=="function"?n.props(r,i):n.props??{},d=y.map((f,g)=>{const l=f??{},u=n.item?.(l,g,r)??{},O=N(u.reverse?[...n.parts].reverse():n.parts,l,!1,`item ${g+1}: `);return n.flat?u.props?O.map(E=>({...E,props:{...E.props,...u.props,id:E.props.id}})):O:[$(P,{name:`${n.name} ${g+1}`,...x,...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(g=>g??{}),f.of,f.of).map((g,l)=>{const u=g.items.map(S=>S.item),O=f.parts?N(f.parts,f.head?.(u,r)??{},!1,`group ${l+1}: `):[],E=g.items.map(S=>d[S.index]),z=f.perRow?.(u.length,r),I=Number.isInteger(z)&&z>=1?z:1,C=[];if(f.perRow&&I<E.length)for(let S=0;S*I<E.length;S++)C.push(E.slice(S*I,(S+1)*I).flat());return $(P,{name:`${f.name} ${l+1}`,...f.props??{},[v]:[...O,$(P,{name:`${f.itemsName} ${l+1}`,...f.itemsProps?.(u.length,r)??{},[v]:C.length?C.map((S,U)=>$(P,{name:`${f.rowName??`${f.itemsName} row`} ${U+1}`,...f.rowProps??{},[v]:S})):E.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 g=d.slice(f*e,(f+1)*e).flat(),l=n.rowFiller?e-d.slice(f*e,(f+1)*e).length:0;p.push($(P,{name:`${n.rowName??`${n.name} row`} ${f+1}`,...c,[v]:[...g,...Array.from({length:l},(u,O)=>$(P,{name:`Empty ${O+1}`,...n.rowFiller,[v]:[]}))]}))}return p},N=(n,s,b,y)=>{const x=[],d=(e,c)=>b?_(e,c):void 0,w=e=>b?F[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=X(s[e.key]);if(!c.text.trim()){d(e.key,"nothing — empty words draw nothing, so no block");break}const p=pe(e.role??"body"),{_partStyles:f,...g}=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)}:{}})}x.push($("Text",{text:e.mark==="accentLead"?le(c.text):e.mark==="accentItalic"?ie(c.text):c.text,...g,...e.props??{},...l,...c.hidden?{_hidden:!0}:{}})),d(e.key,`${y}Text block: its words${c.hidden?", hidden":""}`);break}case"button":{const c=X(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)??{}};x.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]:"";x.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":{x.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&&x.push($(P,{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&&x.push($(e.type,{...p,...e.slot?{[e.slot]:c}:{}}));break}case"core":{const c=e.as??t.type,p={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(F).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 g=typeof e.slots=="function"?e.slots(s,i):e.slots??{};for(const[l,u]of Object.entries(g))p[l]=u.flatMap(O=>"kind"in O?W(O,s,d):J([O]));x.push($(c,p));break}}return x},Q=(n,s)=>{const b=s===0?"Box":`${n.name} Box`,y=N(n.parts,r,!0,s===0?"":`${b}: `),x=typeof n.boxProps=="function"?n.boxProps(r,i):n.boxProps??{},d=D(n.box??[],x,r,(w,e,c)=>_(w,c?`nothing — the old value draws nothing (${b}: no ${e})`:`${b}: ${e}`),i);return{type:P,props:{name:n.name,...d,[v]:y,id:ce(a,s)}}},G=[o,...o.also??[]].map(Q);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))Y.has(n)||j.has(n)||k.push({key:n,why:"not in the row — not carried"});return{node:G[0],nodes:G,carried:h,dropped:k,siteWrites:[...o.site?.(t,i)??[]],restyled:B}}function Re(t,o=H,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=H,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,P as SECTION_BOX_TYPE,H 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,Ee as registerSectionToBox,ce as sectionBoxIdOf,Ae as sectionToBoxEdits,Pe as sectionToBoxRow,ve as sectionToBoxTypes};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-web-builder",
3
- "version": "53.0.0",
3
+ "version": "55.0.0",
4
4
  "description": "The EFFICIENT website builder: the website editor, the general sections and the renderer that draws them, compiled. Hostable by any EFFICIENT product; nothing here imports a host.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Efficient Pty Ltd",
@@ -53,8 +53,8 @@
53
53
  },
54
54
  "peerDependencies": {
55
55
  "@tabler/icons-react": "^3.46.0",
56
- "efficient-easel": "^27.6.0",
57
- "efficient-shell": "^11.8.0",
56
+ "efficient-easel": "^28.2.0",
57
+ "efficient-shell": "^12.13.0",
58
58
  "isomorphic-dompurify": "^3.18.0",
59
59
  "next": ">=16",
60
60
  "react": ">=19",
@@ -72,8 +72,8 @@
72
72
  "@types/node": "^20",
73
73
  "@types/react": "^19",
74
74
  "@types/react-dom": "^19",
75
- "efficient-easel": "^27.6.0",
76
- "efficient-shell": "^11.8.0",
75
+ "efficient-easel": "^28.2.0",
76
+ "efficient-shell": "^12.13.0",
77
77
  "esbuild": "^0.28.0",
78
78
  "happy-dom": "^20.14.5",
79
79
  "isomorphic-dompurify": "^3.18.0",
@@ -1 +0,0 @@
1
- import{phoneKey as n,tabletKey as m}from"efficient-easel/draw";const s=[{block:"HeroSlide",upload:"mediaImage",focus:"imageFocal"},{block:"HeroSingle",upload:"mediaImage",focus:"imageFocal"},{block:"HeroSingle",upload:"mediaImage2",focus:"imageFocal2"},{block:"ImageBlock",upload:"src",focus:"focal"}],a=e=>[e,m(e),n(e)],d=[...new Set(s.flatMap(e=>a(e.focus)))].sort();function p(e,t){const[c,l,i]=a(t).map(o=>typeof e[o]=="string"&&e[o]?e[o]:void 0);return{desktop:c,tablet:l,phone:i}}export{s as PICTURE_DOTS,d as PICTURE_FOCUS_KEYS,a as viewFocusKeys,p as viewFocusValues};