efficient-web-builder 67.3.0 → 67.5.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 (50) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/editor/lib/document/block-offer.d.ts +6 -0
  3. package/dist/editor/lib/document/block-offer.js +1 -1
  4. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  5. package/dist/editor/lib/document/blocks/general/Footprint/fields.js +1 -1
  6. package/dist/editor/lib/document/blocks/general/ParagraphsA/fields.js +1 -1
  7. package/dist/editor/lib/document/blocks/general/ProcessSteps/fields.js +1 -1
  8. package/dist/editor/lib/document/blocks/general/StatsParagraph/fields.js +1 -1
  9. package/dist/editor/lib/document/blocks/general/Timeline/fields.js +1 -1
  10. package/dist/editor/lib/document/blocks/general/TimelineTrack/fields.js +1 -1
  11. package/dist/editor/lib/document/blocks/general/TitleWithButtons/fields.js +1 -1
  12. package/dist/editor/lib/document/field-groups.js +1 -1
  13. package/dist/format/lib/content/accordion-row-style.d.ts +4 -1
  14. package/dist/format/lib/content/accordion-row-style.js +1 -1
  15. package/dist/format/lib/document/passes/types.d.ts +2 -0
  16. package/dist/format/lib/document/section-catalog.d.ts +2 -0
  17. package/dist/format/lib/document/section-catalog.js +3 -3
  18. package/dist/render/components/BoxAccordionRow.d.ts +2 -1
  19. package/dist/render/components/BoxAccordionRow.js +1 -1
  20. package/dist/render/components/Flex.js +1 -1
  21. package/dist/render/components/Footprint.d.ts +3 -1
  22. package/dist/render/components/Footprint.js +1 -1
  23. package/dist/render/components/ParagraphsA.d.ts +3 -1
  24. package/dist/render/components/ParagraphsA.js +1 -1
  25. package/dist/render/components/ProcessSteps.d.ts +3 -1
  26. package/dist/render/components/ProcessSteps.js +1 -1
  27. package/dist/render/components/StatsParagraph.d.ts +3 -1
  28. package/dist/render/components/StatsParagraph.js +1 -1
  29. package/dist/render/components/Timeline.d.ts +3 -1
  30. package/dist/render/components/Timeline.js +1 -1
  31. package/dist/render/components/TimelineTrack.d.ts +3 -1
  32. package/dist/render/components/TimelineTrack.js +1 -1
  33. package/dist/render/components/TitleWithButtons.d.ts +3 -1
  34. package/dist/render/components/TitleWithButtons.js +1 -1
  35. package/dist/render/lib/content/section-padding.d.ts +20 -0
  36. package/dist/render/lib/content/section-padding.js +1 -1
  37. package/dist/render/lib/document/blocks/general/Footprint/render.js +1 -1
  38. package/dist/render/lib/document/blocks/general/ParagraphsA/render.js +1 -1
  39. package/dist/render/lib/document/blocks/general/ProcessSteps/render.js +1 -1
  40. package/dist/render/lib/document/blocks/general/StatsParagraph/render.js +1 -1
  41. package/dist/render/lib/document/blocks/general/Timeline/render.js +1 -1
  42. package/dist/render/lib/document/blocks/general/TimelineTrack/render.js +1 -1
  43. package/dist/render/lib/document/blocks/general/TitleWithButtons/render.js +1 -1
  44. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  45. package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
  46. package/dist/render/lib/document/passes/section-padding.d.ts +4 -0
  47. package/dist/render/lib/document/passes/section-padding.js +1 -1
  48. package/dist/render/lib/sections/section-to-box.d.ts +1 -0
  49. package/dist/render/lib/sections/section-to-box.js +1 -1
  50. package/package.json +1 -1
@@ -1 +1 @@
1
- import{jsx as d}from"react/jsx-runtime";import S from"../../../../../components/StatsParagraph.js";import{resolveSectionBackground as g}from"../../../../../../format/lib/content/section-background.js";import{parseSectionHeadPlacement as P}from"../../../../../../format/lib/sections/section-head-placement.js";import{PH as t}from"../../../../../../format/lib/document/blocks/placeholders.js";import{phRows as H,phHide as s}from"../../scaffold.js";import{SECTION_BG_BUILT_IN as _}from"../../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{say as e}from"../../../../../../format/lib/editor-words.js";import{StatsParagraphMeta as v,STATS_PARAGRAPH_PH as i}from"../../../../../../format/lib/document/blocks/general/StatsParagraph/meta.js";const w=()=>[{value:"00",label:t.label,sub:e("Short description of this figure.")},{value:"00",label:t.label,sub:e("Short description of this figure.")},{value:"00",label:t.label,sub:e("Short description of this figure.")},{value:"00",label:t.label,sub:e("Short description of this figure.")}],E={...v,render:({eyebrow:p,title:f,desc:m,stats:b,background:u,padTop:l,padBottom:n,headPlacement:c,editor:r})=>{const o=P(c)==="own-box",a=h=>o?void 0:h;return d(S,{eyebrow:a(s(p,i.eyebrow,r)),title:a(s(f,i.title,r)),desc:a(s(m,i.desc,r)),omitHead:o,stats:H(b,w(),r),background:g(u,_.StatsParagraph),padTop:o?0:typeof l=="number"?l:120,padBottom:typeof n=="number"?n:120,editing:r?.isEditing})}};export{E as StatsParagraphRender};
1
+ import{jsx as h}from"react/jsx-runtime";import{bandPadAttrs as u}from"../../../../content/section-padding.js";import{innerPaddingFallback as g}from"../../../passes/section-padding.js";import S from"../../../../../components/StatsParagraph.js";import{resolveSectionBackground as P}from"../../../../../../format/lib/content/section-background.js";import{parseSectionHeadPlacement as w}from"../../../../../../format/lib/sections/section-head-placement.js";import{PH as r}from"../../../../../../format/lib/document/blocks/placeholders.js";import{phRows as H,phHide as i}from"../../scaffold.js";import{SECTION_BG_BUILT_IN as _}from"../../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{say as a}from"../../../../../../format/lib/editor-words.js";import{StatsParagraphMeta as v,STATS_PARAGRAPH_PH as s}from"../../../../../../format/lib/document/blocks/general/StatsParagraph/meta.js";const x=()=>[{value:"00",label:r.label,sub:a("Short description of this figure.")},{value:"00",label:r.label,sub:a("Short description of this figure.")},{value:"00",label:r.label,sub:a("Short description of this figure.")},{value:"00",label:r.label,sub:a("Short description of this figure.")}],C={...v,render:n=>{const{eyebrow:d,title:l,desc:m,stats:p,background:f,headPlacement:b,editor:t}=n,e=w(b)==="own-box",o=c=>e?void 0:c;return h(S,{eyebrow:o(i(d,s.eyebrow,t)),title:o(i(l,s.title,t)),desc:o(i(m,s.desc,t)),omitHead:e,stats:H(p,x(),t),background:P(f,_.StatsParagraph),bandPad:u(n,g("StatsParagraph"),{noTop:e}),editing:t?.isEditing})}};export{C as StatsParagraphRender};
@@ -1 +1 @@
1
- import{jsx as d}from"react/jsx-runtime";import n from"../../../../../components/Timeline.js";import r from"../../../../../components/TimelineTrack.js";import{resolveSectionBackground as f}from"../../../../../../format/lib/content/section-background.js";import{SECTION_BG_BUILT_IN as l}from"../../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{TIMELINE_TRACK_PH as a,timelineTrackScaffoldEntries as c}from"../../../../../../format/lib/document/blocks/general/TimelineTrack/meta.js";import{phRows as m,phHide as e,ctaHide as o}from"../../scaffold.js";import{TimelineMeta as T,TIMELINE_PH as i,timelineScaffoldEntries as u}from"../../../../../../format/lib/document/blocks/general/Timeline/meta.js";function b(t){return{date:t.date,title:t.title,blurb:t.body,future:t.future}}const H={...T,render:t=>t.layout==="track"?d(r,{eyebrow:e(t.eyebrow,a.eyebrow,t.editor),title:e(t.title,a.title,t.editor),intro:e(t.intro,a.intro,t.editor),entries:m(Array.isArray(t.entries)?t.entries.map(b):[],c(),t.editor),cta:o(t.ctaText,t.ctaHref,t.editor),background:f(t.background,l.TimelineTrack),padTop:typeof t.padTop=="number"?t.padTop:120,padBottom:typeof t.padBottom=="number"?t.padBottom:120,editing:t.editor?.isEditing}):d(n,{layout:t.layout||"split",eyebrow:e(t.eyebrow,i.eyebrow,t.editor),title:e(t.title,i.title,t.editor),intro:e(t.intro,i.intro,t.editor),imageSrc:t.imageSrc||void 0,imageCaption:e(t.imageCaption,i.imageCaption,t.editor),imageMeta:e(t.imageMeta,i.imageMeta,t.editor),cta:o(t.ctaText,t.ctaHref,t.editor),entries:m(t.entries,u(),t.editor),padTop:typeof t.padTop=="number"?t.padTop:120,padBottom:typeof t.padBottom=="number"?t.padBottom:120,editing:t.editor?.isEditing})};export{H as TimelineRender};
1
+ import{jsx as n}from"react/jsx-runtime";import{bandPadAttrs as r}from"../../../../content/section-padding.js";import{innerPaddingFallback as d}from"../../../passes/section-padding.js";import l from"../../../../../components/Timeline.js";import c from"../../../../../components/TimelineTrack.js";import{resolveSectionBackground as f}from"../../../../../../format/lib/content/section-background.js";import{SECTION_BG_BUILT_IN as T}from"../../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{TIMELINE_TRACK_PH as a,timelineTrackScaffoldEntries as g}from"../../../../../../format/lib/document/blocks/general/TimelineTrack/meta.js";import{phRows as m,phHide as i,ctaHide as o}from"../../scaffold.js";import{TimelineMeta as b,TIMELINE_PH as t,timelineScaffoldEntries as u}from"../../../../../../format/lib/document/blocks/general/Timeline/meta.js";function y(e){return{date:e.date,title:e.title,blurb:e.body,future:e.future}}const C={...b,render:e=>e.layout==="track"?n(c,{eyebrow:i(e.eyebrow,a.eyebrow,e.editor),title:i(e.title,a.title,e.editor),intro:i(e.intro,a.intro,e.editor),entries:m(Array.isArray(e.entries)?e.entries.map(y):[],g(),e.editor),cta:o(e.ctaText,e.ctaHref,e.editor),background:f(e.background,T.TimelineTrack),bandPad:r(e,d("Timeline")),editing:e.editor?.isEditing}):n(l,{layout:e.layout||"split",eyebrow:i(e.eyebrow,t.eyebrow,e.editor),title:i(e.title,t.title,e.editor),intro:i(e.intro,t.intro,e.editor),imageSrc:e.imageSrc||void 0,imageCaption:i(e.imageCaption,t.imageCaption,e.editor),imageMeta:i(e.imageMeta,t.imageMeta,e.editor),cta:o(e.ctaText,e.ctaHref,e.editor),entries:m(e.entries,u(),e.editor),bandPad:r(e,d("Timeline")),editing:e.editor?.isEditing})};export{C as TimelineRender};
@@ -1 +1 @@
1
- import{jsx as a}from"react/jsx-runtime";import d from"../../../../../components/TimelineTrack.js";import{resolveSectionBackground as m}from"../../../../../../format/lib/content/section-background.js";import{parseSectionHeadPlacement as c}from"../../../../../../format/lib/sections/section-head-placement.js";import{phRows as T,phHide as o,ctaHide as f}from"../../scaffold.js";import{SECTION_BG_BUILT_IN as l}from"../../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{TimelineTrackMeta as b,TIMELINE_TRACK_PH as n,timelineTrackScaffoldEntries as k}from"../../../../../../format/lib/document/blocks/general/TimelineTrack/meta.js";const y={...b,render:e=>{const t=c(e.headPlacement)==="own-box",i=r=>t?void 0:r;return a(d,{eyebrow:i(o(e.eyebrow,n.eyebrow,e.editor)),title:i(o(e.title,n.title,e.editor)),intro:i(o(e.intro,n.intro,e.editor)),omitHead:t,entries:T(e.entries,k(),e.editor),cta:f(e.ctaText,e.ctaHref,e.editor),background:m(e.background,l.TimelineTrack),padTop:t?0:typeof e.padTop=="number"?e.padTop:120,padBottom:typeof e.padBottom=="number"?e.padBottom:120,editing:e.editor?.isEditing})}};export{y as TimelineTrackRender};
1
+ import{jsx as a}from"react/jsx-runtime";import{bandPadAttrs as d}from"../../../../content/section-padding.js";import{innerPaddingFallback as m}from"../../../passes/section-padding.js";import c from"../../../../../components/TimelineTrack.js";import{resolveSectionBackground as T}from"../../../../../../format/lib/content/section-background.js";import{parseSectionHeadPlacement as l}from"../../../../../../format/lib/sections/section-head-placement.js";import{phRows as f,phHide as r,ctaHide as k}from"../../scaffold.js";import{SECTION_BG_BUILT_IN as b}from"../../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{TimelineTrackMeta as g,TIMELINE_TRACK_PH as n,timelineTrackScaffoldEntries as w}from"../../../../../../format/lib/document/blocks/general/TimelineTrack/meta.js";const S={...g,render:e=>{const i=l(e.headPlacement)==="own-box",t=o=>i?void 0:o;return a(c,{eyebrow:t(r(e.eyebrow,n.eyebrow,e.editor)),title:t(r(e.title,n.title,e.editor)),intro:t(r(e.intro,n.intro,e.editor)),omitHead:i,entries:f(e.entries,w(),e.editor),cta:k(e.ctaText,e.ctaHref,e.editor),background:T(e.background,b.TimelineTrack),bandPad:d(e,m("TimelineTrack"),{noTop:i}),editing:e.editor?.isEditing})}};export{S as TimelineTrackRender};
@@ -1 +1 @@
1
- import{jsx as p}from"react/jsx-runtime";import f from"../../../../../components/TitleWithButtons.js";import{readHidable as b}from"efficient-easel/draw";import{phRows as h,phHide as _}from"../../scaffold.js";import{TitleWithButtonsMeta as a,TITLE_WITH_BUTTONS_PH as c,TITLE_WITH_BUTTONS_SCAFFOLD_BUTTONS as g}from"../../../../../../format/lib/document/blocks/general/TitleWithButtons/meta.js";const I={...a,render:({title:n,buttons:s,padTop:o,padBottom:i,buttonsAlign:T,buttonsAlignTablet:m,buttonsAlignPhone:l,editor:t})=>{const e=T,d=e==="center"||e==="left",r=b(n),u=r.hidden?"":r.text.trim();return p(f,{title:d&&!u?void 0:_(n,c.title,t),buttons:h(s,[...g],t),padTop:typeof o=="number"?o:140,padBottom:typeof i=="number"?i:140,buttonsAlign:e,buttonsAlignTablet:m,buttonsAlignPhone:l,editing:t?.isEditing})}};export{I as TitleWithButtonsRender};
1
+ import{jsx as a}from"react/jsx-runtime";import{bandPadAttrs as b}from"../../../../content/section-padding.js";import{innerPaddingFallback as u}from"../../../passes/section-padding.js";import g from"../../../../../components/TitleWithButtons.js";import{readHidable as h}from"efficient-easel/draw";import{phRows as f,phHide as c}from"../../scaffold.js";import{TitleWithButtonsMeta as p,TITLE_WITH_BUTTONS_PH as A,TITLE_WITH_BUTTONS_SCAFFOLD_BUTTONS as _}from"../../../../../../format/lib/document/blocks/general/TitleWithButtons/meta.js";const S={...p,render:o=>{const{title:i,buttons:r,buttonsAlign:s,buttonsAlignTablet:l,buttonsAlignPhone:d,editor:t}=o,n=s,T=n==="center"||n==="left",e=h(i),m=e.hidden?"":e.text.trim();return a(g,{title:T&&!m?void 0:c(i,A.title,t),buttons:f(r,[..._],t),bandPad:b(o,u("TitleWithButtons")),buttonsAlign:n,buttonsAlignTablet:l,buttonsAlignPhone:d,editing:t?.isEditing})}};export{S as TitleWithButtonsRender};
@@ -1 +1 @@
1
- import{siteLengthHeld as D,storedUnit as x}from"../../../../../format/lib/content/css-length.js";import{SECTION_WIDTH_KEYS as G}from"../../../../../format/lib/content/section-width.js";import{BLOCK_LENGTH_KEYS as I,blockLengthUnitKey as M}from"../../../content/block-size.js";import{viewStoreKeys as v}from"../../../../../format/lib/animation/views.js";import{BOX as W,INNER_BOX as C,LABEL_FACE as U,TEXT as R,boxPadding as w,fillSlot as B,token as F}from"../../../../../format/lib/document/seed-parts.js";import{ENTRANCE_STORE_KEYS as Y,LEGACY_ENTRANCE_KEY as X}from"../../../animation/entrance.js";import{SCROLL_STORE_KEYS as V}from"../../../../../format/lib/animation/scroll.js";import{SECTION_PIN_KEYS as $}from"../../../../../format/lib/content/section-sticky.js";import{SECTION_CORNERS_ROW as j}from"../../../../../format/lib/content/section-corners.js";import{SECTION_BORDER_UNIT_KEYS as z}from"../../../../../format/lib/content/borders.js";import{CARD_HOVER_KEYS as N}from"../../../../../format/lib/animation/hover.js";import{COUNT_KEY_PROP as J}from"../../../../../format/lib/content/block-sources.js";import{SITE_GUTTER as q,SITE_GUTTER_PHONE as Q,normalizeSiteGutter as Z,normalizeSiteGutterPhone as tt,siteGutterPhoneFollows as ot}from"../../../../../format/lib/content/page-width.js";import{resolveSectionPadding as et}from"../../../content/section-padding.js";import{ButtonBlockMeta as nt}from"../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";import{SECTION_PAD_INNER_DEFAULTS as it}from"../../passes/section-padding.js";import{finiteNumber as b}from"../../../../../format/lib/finite-number.js";import{convertTheme as _,hasWords as rt}from"../../../sections/section-to-box.js";import{THEME_SECTION_BG as st}from"../../../../../format/lib/content/section-background.js";import{fillSlotOfInk as A}from"../../../../../format/lib/document/part-inks.js";import{parseHexColor as dt}from"efficient-shell/format";import{convertLength as ct}from"efficient-easel/screen/lib/content/length-units";import{bandPresetIndex as at,surfacePresetIndex as pt,surfaceTwoTone as lt}from"../../../../../format/lib/theme.js";import{VIEW_HIDE_KEYS as mt}from"../../../../../format/lib/content/view-hide-class.js";import{tierOfView as gt}from"../../../../../format/lib/content/view-tier.js";import{ownEntry as Pt}from"../../../../../format/lib/own-entry.js";const s=(t,o,e,n)=>o===e?t:ct(t,o,e,n,{min:0,max:200,step:4});import{BOX as So,DIM as Bo,INNER_BOX as No,TEXT as Io}from"../../../../../format/lib/document/seed-parts.js";const Jt={textFit:"line",textFitPhone:"wrap"},ht={...R,[J]:""},{label:qt,href:Qt,...ft}=nt.defaultProps,Zt=ft,to={buttonFillOpacity:0,buttonBorder:{width:0},buttonPaddingTop:0,buttonPaddingRight:0,buttonPaddingBottom:0,buttonPaddingLeft:0},oo={...W,sectionAccent:0},eo={sectionAccent:-1},no=["gridSpan","sectionHeightMode","sectionHeightValue","sectionHeightUnit","sectionHeightModeTablet","sectionHeightValueTablet","sectionHeightUnitTablet","sectionHeightModePhone","sectionHeightValuePhone","sectionHeightUnitPhone","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderTablet","sectionBorderPhone","sectionAccent",j.unitKey,...z,...$,"anchor",X,...mt,...Y,...V,...v(["widthFit",...I,...I.map(M)]),...Object.values(G)],P="a section width key, ignored since efficient-web-builder 45 (an old key; a section's own width has new keys, lib/content/section-width), so dropping it changes nothing",io={sectionSurface:"read by nothing in src/ (searched 2026-10-24): a retired theme key that draws nothing today, so dropping it changes nothing",widthMode:P,fullWidth:P,pageWidth:P,backgroundWidth:P,contentWidth:P,contentMax:P},ro=Object.fromEntries(["sectionPaddingLeft","sectionPaddingRight","sectionPaddingLeftTablet","sectionPaddingRightTablet","sectionPaddingLeftPhone","sectionPaddingRightPhone"].map(t=>[t,"needs Box side padding outside its gutter: the old section added it outside its frame, a Box's side padding replaces the gutter. 0 live nodes store it (JJ's read-only export, 2026-10-24)"]));function ut(t,o){const e=b(t.sectionPaddingTop)??0,n=b(t.sectionPaddingBottom)??0,i=b(t.sectionPaddingTopTablet),r=b(t.sectionPaddingBottomTablet),c=x(t.sectionPaddingUnit),p=x(t.sectionPaddingUnitTablet),l=x(t.sectionPaddingUnitPhone),h=(m,a,u,g)=>{const d=b(m);if(d!==void 0)return d+s(g,"px",l,"mobile");const T=a===void 0?{n:u,unit:c}:{n:a,unit:p};return s(T.n,T.unit,l,"mobile")+s(g,"px",l,"mobile")},f=(m,a,u,g,d)=>a!==void 0?{[m]:a+s(d??g,"px",p,"tablet")}:d===void 0?{}:{[m]:s(u,c,p,"tablet")+s(d,"px",p,"tablet")};return{sectionPaddingTop:e+s(o.top,"px",c,"desktop"),sectionPaddingBottom:n+s(o.bottom,"px",c,"desktop"),...f("sectionPaddingTopTablet",i,e,o.top,o.topTablet),...f("sectionPaddingBottomTablet",r,n,o.bottom,o.bottomTablet),sectionPaddingTopPhone:h(t.sectionPaddingTopPhone,i,e,o.topPhone),sectionPaddingBottomPhone:h(t.sectionPaddingBottomPhone,r,n,o.bottomPhone)}}const so=t=>[...["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopTablet","sectionPaddingBottomTablet","sectionPaddingTopPhone","sectionPaddingBottomPhone"].map(o=>[o,o,(e,n)=>ut(n,typeof t=="function"?t(n):t)[o]]),["sectionPaddingUnit","sectionPaddingUnit"],["sectionPaddingUnitTablet","sectionPaddingUnitTablet"],["sectionPaddingUnitPhone","sectionPaddingUnitPhone"]];function E(t,o){const e=et(t,Pt(it,o));return{sectionPaddingTop:e.top,sectionPaddingBottom:e.bottom}}const co=t=>[["padTop","sectionPaddingTop",(o,e)=>E(e,t).sectionPaddingTop],["padBottom","sectionPaddingBottom",(o,e)=>E(e,t).sectionPaddingBottom],["sectionPaddingTop","sectionPaddingTop",(o,e)=>E(e,t).sectionPaddingTop],["sectionPaddingBottom","sectionPaddingBottom",(o,e)=>E(e,t).sectionPaddingBottom]],Tt={kind:"heading-case-upper",styles:["heading-1","heading-2","heading-3"]},ao=t=>o=>rt(o.props[t])?[Tt]:[],bt=(t,o)=>({kind:"text",key:t,role:"eyebrow",props:R,...o?{style:o}:{}}),po=t=>({kind:"group",name:"Chip",props:{...C,...B("main"),...w(6,14)},parts:[bt(t,{color:"background",...F("label",12),weight:600,letterSpacing:.16})]}),H=t=>t.background!=="transparent",xt=(t,o)=>{const[e,n]=[t,o].map(i=>typeof i=="string"?i.trim():"");return e?n?`[${e} ]{color=text}${n}`:`[${e}]{color=text}`:n},k={align:"right",alignPhone:"left"},_t=(t,o,e)=>{const n=i=>xt(i[t],i[o]);return{kind:"block",type:"Text",when:(i,r)=>r!==void 0&&n(r)!=="",box:[[t,"text",(i,r)=>n(r)],[o,"text",(i,r)=>n(r)]],props:e}},lo=(t,o,e,n={})=>_t(t,o,{...ht,...k,...n,_partStyles:{text:{...U,color:"labels",...e,case:U.case,...k}}}),O=(t,o)=>typeof t=="number"&&Number.isInteger(t)&&t>=0?t:_(o)?.selected??0,L="var(--site-surface-2)",y=(t,o)=>_(o)?.themes[O(t.sectionAccent??0,o)],Et=(t,o)=>(e,n)=>{if(!o?.(e,n))return B(t);const i=y(e,n)?.[t];return i?{fillColor:i}:{}},mo=(t,o)=>S(t,o)>=0,K=t=>t.startsWith("#")&&dt(t)!==null,go=(t,o,e)=>{const n=t?.trim();if(n&&K(n))return{fillColor:n};const i=A(n);if(i)return B(i);const r=n===L?y(o,e):void 0;return r?{fillColor:lt(r)}:{}},Po=t=>{const o=t?.trim();return!o||o==="transparent"||o===st||A(o)||o===L||K(o)?void 0:"it paints a colour that no Box Fill can hold"},S=(t,o)=>{const e=_(o)?.themes;return e&&H(t)?at(e,O(t.sectionAccent,o)):-1},ho=(t,o,e)=>{const n=S(o,e);return n>=0?n:t},fo=(t,o)=>{const e=_(o)?.themes,n=e?pt(e,O(t,o)):-1;return n>=0?n:t},uo=(t,o)=>{const e=S(t,o);return e>=0?{sectionAccent:e}:{}},To=(t,o)=>H(t.props)&&S(t.props,o)<0?[{kind:"band-preset",page:O(t.props.sectionAccent,o)}]:[],bo=(t,{view:o="desktop",to:e="px",maxPx:n=1/0}={})=>{const{siteGutter:i,siteGutterUnit:r,siteGutterPhone:c,siteGutterPhoneUnit:p}=t.site??{},l=gt(o),h=(a,u,g)=>{const d=x(u),T=D(a,d,"spacing",g);return T===null?null:s(T,d,"px",l)},f=h(i,r,q)??Z(i),m=o==="desktop"?f:h(c,p,Q)??tt(c)??ot(f);return s(Math.min(n,m),"px",e,l)},Ot=Object.fromEntries(["Top","Right","Bottom","Left","TopPhone","RightPhone","BottomPhone","LeftPhone"].map(t=>[`sectionPadding${t}`,0])),xo=t=>({top:0,right:0,bottom:0,left:0,...t}),_o=(t,o,e,n=[])=>({kind:"group",name:t,keepEmpty:!0,props:(i,r)=>({...C,...Ot,...Et("surface")(i,r),...typeof e=="function"?e(i,r):e}),box:[[o,"bgImage"],N.kind,N.duration,N.delay],parts:n});export{Jt as AUTO_COLUMN,So as BOX,Zt as BUTTON,Bo as DIM,io as DROP_COMMON,ro as DROP_SIDE_PADDING,eo as FOLLOW_THE_BOX,Tt as HEADING_CASE_UPPER,No as INNER_BOX,Ot as NO_PAD,ht as NUMBER_TEXT,k as RIGHT_WORDS,no as SAME_KEYS,oo as SECTION_BOX,to as SH_LINK,Io as TEXT,ho as bandAccent,S as bandIndex,O as bandPage,uo as bandProps,To as bandWrites,Et as fillFrom,Po as fillNoBoxHolds,po as filledChip,ao as headingCaseOf,E as innerPad,co as innerPadKeys,lo as leadLine,_t as leadText,xo as lineSides,xt as numberAndUnit,mo as onBandPreset,go as ownFill,_o as pictureCell,y as sectionPage,bo as siteGutterOf,bt as smallText,fo as surfaceAccent,ut as wrapperPad,so as wrapperPadKeys};
1
+ import{siteLengthHeld as G,storedUnit as x}from"../../../../../format/lib/content/css-length.js";import{SECTION_WIDTH_KEYS as M}from"../../../../../format/lib/content/section-width.js";import{BLOCK_LENGTH_KEYS as C,blockLengthUnitKey as W}from"../../../content/block-size.js";import{viewStoreKeys as F}from"../../../../../format/lib/animation/views.js";import{BOX as Y,INNER_BOX as I,LABEL_FACE as U,TEXT as R,boxPadding as v,fillSlot as B,token as w}from"../../../../../format/lib/document/seed-parts.js";import{ENTRANCE_STORE_KEYS as X,LEGACY_ENTRANCE_KEY as V}from"../../../animation/entrance.js";import{SCROLL_STORE_KEYS as $}from"../../../../../format/lib/animation/scroll.js";import{SECTION_PIN_KEYS as j}from"../../../../../format/lib/content/section-sticky.js";import{SECTION_CORNERS_ROW as z}from"../../../../../format/lib/content/section-corners.js";import{SECTION_BORDER_UNIT_KEYS as J}from"../../../../../format/lib/content/borders.js";import{CARD_HOVER_KEYS as S}from"../../../../../format/lib/animation/hover.js";import{COUNT_KEY_PROP as q}from"../../../../../format/lib/content/block-sources.js";import{SITE_GUTTER as Q,SITE_GUTTER_PHONE as Z,normalizeSiteGutter as tt,normalizeSiteGutterPhone as ot,siteGutterPhoneFollows as et}from"../../../../../format/lib/content/page-width.js";import{BAND_TO_SECTION_PAD as A,bandTopBottom as nt}from"../../../content/section-padding.js";import{ButtonBlockMeta as it}from"../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";import{innerPaddingFallback as rt}from"../../passes/section-padding.js";import{finiteNumber as b}from"../../../../../format/lib/finite-number.js";import{convertTheme as _,hasWords as st}from"../../../sections/section-to-box.js";import{THEME_SECTION_BG as dt}from"../../../../../format/lib/content/section-background.js";import{fillSlotOfInk as k}from"../../../../../format/lib/document/part-inks.js";import{parseHexColor as ct}from"efficient-shell/format";import{convertLength as at}from"efficient-easel/screen/lib/content/length-units";import{bandPresetIndex as pt,surfacePresetIndex as lt,surfaceTwoTone as mt}from"../../../../../format/lib/theme.js";import{VIEW_HIDE_KEYS as gt}from"../../../../../format/lib/content/view-hide-class.js";import{tierOfView as Pt}from"../../../../../format/lib/content/view-tier.js";const s=(t,o,e,n)=>o===e?t:at(t,o,e,n,{min:0,max:200,step:4});import{BOX as Oo,DIM as Bo,INNER_BOX as So,TEXT as No}from"../../../../../format/lib/document/seed-parts.js";const zt={textFit:"line",textFitPhone:"wrap"},ht={...R,[q]:""},{label:Jt,href:qt,...ft}=it.defaultProps,Qt=ft,Zt={buttonFillOpacity:0,buttonBorder:{width:0},buttonPaddingTop:0,buttonPaddingRight:0,buttonPaddingBottom:0,buttonPaddingLeft:0},to={...Y,sectionAccent:0},oo={sectionAccent:-1},eo=["gridSpan","sectionHeightMode","sectionHeightValue","sectionHeightUnit","sectionHeightModeTablet","sectionHeightValueTablet","sectionHeightUnitTablet","sectionHeightModePhone","sectionHeightValuePhone","sectionHeightUnitPhone","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderTablet","sectionBorderPhone","sectionAccent",z.unitKey,...J,...j,"anchor",V,...gt,...X,...$,...F(["widthFit",...C,...C.map(W)]),...Object.values(M)],P="a section width key, ignored since efficient-web-builder 45 (an old key; a section's own width has new keys, lib/content/section-width), so dropping it changes nothing",no={sectionSurface:"read by nothing in src/ (searched 2026-10-24): a retired theme key that draws nothing today, so dropping it changes nothing",widthMode:P,fullWidth:P,pageWidth:P,backgroundWidth:P,contentWidth:P,contentMax:P},io=Object.fromEntries(["sectionPaddingLeft","sectionPaddingRight","sectionPaddingLeftTablet","sectionPaddingRightTablet","sectionPaddingLeftPhone","sectionPaddingRightPhone"].map(t=>[t,"needs Box side padding outside its gutter: the old section added it outside its frame, a Box's side padding replaces the gutter. 0 live nodes store it (JJ's read-only export, 2026-10-24)"]));function ut(t,o){const e=b(t.sectionPaddingTop)??0,n=b(t.sectionPaddingBottom)??0,i=b(t.sectionPaddingTopTablet),r=b(t.sectionPaddingBottomTablet),c=x(t.sectionPaddingUnit),p=x(t.sectionPaddingUnitTablet),l=x(t.sectionPaddingUnitPhone),h=(m,a,u,g)=>{const d=b(m);if(d!==void 0)return d+s(g,"px",l,"mobile");const T=a===void 0?{n:u,unit:c}:{n:a,unit:p};return s(T.n,T.unit,l,"mobile")+s(g,"px",l,"mobile")},f=(m,a,u,g,d)=>a!==void 0?{[m]:a+s(d??g,"px",p,"tablet")}:d===void 0?{}:{[m]:s(u,c,p,"tablet")+s(d,"px",p,"tablet")};return{sectionPaddingTop:e+s(o.top,"px",c,"desktop"),sectionPaddingBottom:n+s(o.bottom,"px",c,"desktop"),...f("sectionPaddingTopTablet",i,e,o.top,o.topTablet),...f("sectionPaddingBottomTablet",r,n,o.bottom,o.bottomTablet),sectionPaddingTopPhone:h(t.sectionPaddingTopPhone,i,e,o.topPhone),sectionPaddingBottomPhone:h(t.sectionPaddingBottomPhone,r,n,o.bottomPhone)}}const ro=t=>[...["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopTablet","sectionPaddingBottomTablet","sectionPaddingTopPhone","sectionPaddingBottomPhone"].map(o=>[o,o,(e,n)=>ut(n,typeof t=="function"?t(n):t)[o]]),["sectionPaddingUnit","sectionPaddingUnit"],["sectionPaddingUnitTablet","sectionPaddingUnitTablet"],["sectionPaddingUnitPhone","sectionPaddingUnitPhone"]];function N(t,o){const e={};for(const[i,r]of A)t[i]!==void 0&&(e[r]=t[i]);const n=nt(t,rt(o));return{...e,sectionPaddingTop:n.top,sectionPaddingBottom:n.bottom}}const so=t=>[...A.map(([o,e])=>[o,e,(n,i)=>N(i,t)[e]]),["sectionPaddingTop","sectionPaddingTop",(o,e)=>N(e,t).sectionPaddingTop],["sectionPaddingBottom","sectionPaddingBottom",(o,e)=>N(e,t).sectionPaddingBottom]],Tt={kind:"heading-case-upper",styles:["heading-1","heading-2","heading-3"]},co=t=>o=>st(o.props[t])?[Tt]:[],bt=(t,o)=>({kind:"text",key:t,role:"eyebrow",props:R,...o?{style:o}:{}}),ao=t=>({kind:"group",name:"Chip",props:{...I,...B("main"),...v(6,14)},parts:[bt(t,{color:"background",...w("label",12),weight:600,letterSpacing:.16})]}),H=t=>t.background!=="transparent",xt=(t,o)=>{const[e,n]=[t,o].map(i=>typeof i=="string"?i.trim():"");return e?n?`[${e} ]{color=text}${n}`:`[${e}]{color=text}`:n},L={align:"right",alignPhone:"left"},_t=(t,o,e)=>{const n=i=>xt(i[t],i[o]);return{kind:"block",type:"Text",when:(i,r)=>r!==void 0&&n(r)!=="",box:[[t,"text",(i,r)=>n(r)],[o,"text",(i,r)=>n(r)]],props:e}},po=(t,o,e,n={})=>_t(t,o,{...ht,...L,...n,_partStyles:{text:{...U,color:"labels",...e,case:U.case,...L}}}),E=(t,o)=>typeof t=="number"&&Number.isInteger(t)&&t>=0?t:_(o)?.selected??0,y="var(--site-surface-2)",K=(t,o)=>_(o)?.themes[E(t.sectionAccent??0,o)],Et=(t,o)=>(e,n)=>{if(!o?.(e,n))return B(t);const i=K(e,n)?.[t];return i?{fillColor:i}:{}},lo=(t,o)=>O(t,o)>=0,D=t=>t.startsWith("#")&&ct(t)!==null,mo=(t,o,e)=>{const n=t?.trim();if(n&&D(n))return{fillColor:n};const i=k(n);if(i)return B(i);const r=n===y?K(o,e):void 0;return r?{fillColor:mt(r)}:{}},go=t=>{const o=t?.trim();return!o||o==="transparent"||o===dt||k(o)||o===y||D(o)?void 0:"it paints a colour that no Box Fill can hold"},O=(t,o)=>{const e=_(o)?.themes;return e&&H(t)?pt(e,E(t.sectionAccent,o)):-1},Po=(t,o,e)=>{const n=O(o,e);return n>=0?n:t},ho=(t,o)=>{const e=_(o)?.themes,n=e?lt(e,E(t,o)):-1;return n>=0?n:t},fo=(t,o)=>{const e=O(t,o);return e>=0?{sectionAccent:e}:{}},uo=(t,o)=>H(t.props)&&O(t.props,o)<0?[{kind:"band-preset",page:E(t.props.sectionAccent,o)}]:[],To=(t,{view:o="desktop",to:e="px",maxPx:n=1/0}={})=>{const{siteGutter:i,siteGutterUnit:r,siteGutterPhone:c,siteGutterPhoneUnit:p}=t.site??{},l=Pt(o),h=(a,u,g)=>{const d=x(u),T=G(a,d,"spacing",g);return T===null?null:s(T,d,"px",l)},f=h(i,r,Q)??tt(i),m=o==="desktop"?f:h(c,p,Z)??ot(c)??et(f);return s(Math.min(n,m),"px",e,l)},Ot=Object.fromEntries(["Top","Right","Bottom","Left","TopPhone","RightPhone","BottomPhone","LeftPhone"].map(t=>[`sectionPadding${t}`,0])),bo=t=>({top:0,right:0,bottom:0,left:0,...t}),xo=(t,o,e,n=[])=>({kind:"group",name:t,keepEmpty:!0,props:(i,r)=>({...I,...Ot,...Et("surface")(i,r),...typeof e=="function"?e(i,r):e}),box:[[o,"bgImage"],S.kind,S.duration,S.delay],parts:n});export{zt as AUTO_COLUMN,Oo as BOX,Qt as BUTTON,Bo as DIM,no as DROP_COMMON,io as DROP_SIDE_PADDING,oo as FOLLOW_THE_BOX,Tt as HEADING_CASE_UPPER,So as INNER_BOX,Ot as NO_PAD,ht as NUMBER_TEXT,L as RIGHT_WORDS,eo as SAME_KEYS,to as SECTION_BOX,Zt as SH_LINK,No as TEXT,Po as bandAccent,O as bandIndex,E as bandPage,fo as bandProps,uo as bandWrites,Et as fillFrom,go as fillNoBoxHolds,ao as filledChip,co as headingCaseOf,N as innerPad,so as innerPadKeys,po as leadLine,_t as leadText,bo as lineSides,xt as numberAndUnit,lo as onBandPreset,mo as ownFill,xo as pictureCell,K as sectionPage,To as siteGutterOf,bt as smallText,ho as surfaceAccent,ut as wrapperPad,ro as wrapperPadKeys};
@@ -1 +1 @@
1
- import{SPLITTABLE_SECTIONS as b}from"../../../../../format/lib/sections/section-head-placement.js";import{SECTION_LABELS as g}from"../../../../../format/lib/document/section-catalog.js";import{SAME_KEYS as B,SECTION_BOX as A,innerPad as R}from"./section-to-box-row-parts.js";import{SITE_SIDE as l}from"efficient-easel/screen/lib/content/length-units";import{EDITORIAL_LINE as C,HEAD_BELOW as S,headLookOf as E,headReads as L,headTree as w}from"./section-head-looks.js";import{finiteNumber as I}from"../../../../../format/lib/finite-number.js";import{CARD_TEMPLATE_SLOT as P}from"../../../../../format/lib/content/card-template.js";import{footprintCardSeed as N}from"../../../../../format/lib/document/blocks/general/Footprint/card-seed.js";import{faqCardSeed as k,faqRunStyleKeys as D}from"../../../../../format/lib/document/blocks/general/FAQ/card-seed.js";import{PROCESS_COLUMNS_SLOT as H,processColumnSeeds as F}from"../../../../../format/lib/document/blocks/general/ProcessSteps/column-seed.js";import{BOX_SIDE_SPACE_PROP as y,BOX_SIDE_SPACE_SITE as j}from"../../../../../format/lib/content/box-side-space.js";import{INNER_BOX as x}from"../../../../../format/lib/document/seed-parts.js";import{SECTION_ACCENT_INHERIT as X}from"../../../../../format/lib/content/section-surface.js";import{ownEntry as c}from"../../../../../format/lib/own-entry.js";const Y=["FAQ","Footprint","LongRead","ProcessSteps","RelatedProducts"],io=["Collections","Events","FitmentTable","GalleryB","ProductGrid","SpecTable"],s=(e,o)=>()=>({top:e,topPhone:o}),_=e=>o=>{const r=R(o,e).sectionPaddingTop;return{top:r,topPhone:r}},M={Collections:s(120,70),Events:s(120,70),FAQ:s(120,70),GalleryB:s(120,70),FitmentTable:s(120,80),SpecTable:s(120,80),LongRead:s(120,80),RelatedProducts:s(0,0),Footprint:_("Footprint"),ProcessSteps:_("ProcessSteps"),ProductGrid:e=>({top:I(e.padTop)??120,topPhone:0})};function Q(e,o={}){const r=c(b,e),n=c(M,e);if(!r||!n)throw new Error(`section-to-box-rows-head: "${e}" has no head row or no head room`);const p=r.padKey,O=w(e),d=L(e),f=r.headRows.filter(t=>![r.num,r.title,r.description,"linkText","linkHref"].includes(t)),a={...Object.fromEntries(f.filter(t=>!(t in d)).map(t=>[t,"a head setting no Header Box part reads (lib/document/blocks/general/section-head-looks `headReads`)"])),...o.drop};return{name:c(g,e)??e,boxProps:(t,i)=>{const m=n(t),h=o.roomBelow?{sectionPaddingBottom:o.roomBelow.bottom,sectionPaddingBottomPhone:o.roomBelow.bottomPhone}:{},T=typeof o.boxProps=="function"?o.boxProps(t,i):o.boxProps??{},u=E(e)==="editorial"?C:{};return{...A,direction:"column",gap:S[E(e)],sectionPaddingTop:m.top,sectionPaddingTopPhone:m.topPhone,...u,...h,...T}},box:[...B,...p?[[p,"sectionPaddingTop",(t,i)=>n(i).top]]:[]],parts:[O,...(()=>{const t={...p?{[p]:0}:{},...o.coreProps},i={kind:"core",keep:"rest",...Object.keys(t).length?{props:t}:{},...o.slots?{slots:o.slots}:{}};return[o.coreBox?{kind:"group",name:o.coreBox.name,props:o.coreBox.props,parts:[i]}:i]})(),...o.partsAfter??[]],...Object.keys(d).length?{reads:d}:{},...Object.keys(a).length?{drop:a}:{},...o.pressHeading?{pressKeepsEmpty:[r.title]}:{},...o.skip?{skip:o.skip}:{}}}const G={...x,direction:"accordion",rowStyle:"numbered"},K={sectionPaddingLeft:l,sectionPaddingRight:l},v={Footprint:{slots:{[P]:[N()]},pressHeading:!0},ProcessSteps:{slots:(e,o)=>o.press?{[H]:F().map(r=>({...r,props:{...r.props,...K}}))}:{},boxProps:{gapPhone:S.editorial}},FAQ:{slots:{[P]:[k()]},pressHeading:!0,coreBox:{name:"Questions",props:G},coreProps:{sectionAccent:X},roomBelow:{bottom:120,bottomPhone:70},boxProps:(e,o)=>o.press?{}:{[y]:j},skip:e=>{const o=e._partStyles??{},r=D().filter(n=>o[n]!==void 0);return r.length?`held: its rows carry their own run style (_partStyles ${r.map(n=>`"${n}"`).join(", ")}), which the Box path does not draw the same`:void 0}}},po=Object.fromEntries(Y.map(e=>[e,Q(e,c(v,e))]));export{G as FAQ_ROWS_BOX,v as HEAD_ONLY_CARD_SEEDS,po as HEAD_ONLY_SECTION_TO_BOX,Y as HEAD_ONLY_TYPES,io as HOST_ROW_HEAD_TYPES,Q as headOnlyRow};
1
+ import{SPLITTABLE_SECTIONS as B}from"../../../../../format/lib/sections/section-head-placement.js";import{SECTION_LABELS as N}from"../../../../../format/lib/document/section-catalog.js";import{SAME_KEYS as R,SECTION_BOX as I}from"./section-to-box-row-parts.js";import{SITE_SIDE as S,sideLengthAt as C}from"efficient-easel/screen/lib/content/length-units";import{EDITORIAL_LINE as L,HEAD_BELOW as f,headLookOf as u,headReads as w,headTree as D}from"./section-head-looks.js";import{finiteNumber as T}from"../../../../../format/lib/finite-number.js";import{CARD_TEMPLATE_SLOT as b}from"../../../../../format/lib/content/card-template.js";import{footprintCardSeed as k}from"../../../../../format/lib/document/blocks/general/Footprint/card-seed.js";import{faqCardSeed as H,faqRunStyleKeys as F}from"../../../../../format/lib/document/blocks/general/FAQ/card-seed.js";import{PROCESS_COLUMNS_SLOT as x,processColumnSeeds as y}from"../../../../../format/lib/document/blocks/general/ProcessSteps/column-seed.js";import{BOX_SIDE_SPACE_PROP as Y,BOX_SIDE_SPACE_SITE as K}from"../../../../../format/lib/content/box-side-space.js";import{INNER_BOX as j}from"../../../../../format/lib/document/seed-parts.js";import{SECTION_ACCENT_INHERIT as X}from"../../../../../format/lib/content/section-surface.js";import{ownEntry as _}from"../../../../../format/lib/own-entry.js";import{BAND_PAD_KEYS as E,BAND_PAD_UNIT_KEY as v,bandTopBottom as M}from"../../../content/section-padding.js";import{SECTION_PAD_INNER as Q,innerPaddingFallback as G}from"../../passes/section-padding.js";import{viewKeyAt as P}from"efficient-easel/draw";const U=["FAQ","Footprint","LongRead","ProcessSteps","RelatedProducts"],So=["Collections","Events","FitmentTable","GalleryB","ProductGrid","SpecTable"],p=(e,o)=>()=>({top:e,topPhone:o}),h=e=>o=>{const t=G(e),s={...o,[E.top]:M(o,t).top},r=d=>{const n=C(s,E,v,d,"top");return n?.unit==="px"?n.value:void 0},m=d=>T(o[P(E.top,d)])===void 0?void 0:r(d),a=m("tablet"),l=m("mobile");return{top:r("desktop")??t.top??0,...a!==void 0?{topTablet:a}:{},...l!==void 0?{topPhone:l}:{}}},W={Collections:p(120,70),Events:p(120,70),FAQ:p(120,70),GalleryB:p(120,70),FitmentTable:p(120,80),SpecTable:p(120,80),LongRead:p(120,80),RelatedProducts:p(0,0),Footprint:h("Footprint"),ProcessSteps:h("ProcessSteps"),ProductGrid:e=>({top:T(e.padTop)??120,topPhone:0})};function $(e,o={}){const t=_(B,e),s=_(W,e);if(!t||!s)throw new Error(`section-to-box-rows-head: "${e}" has no head row or no head room`);const r=t.padKey,m=D(e),a=w(e),l=t.headRows.filter(n=>![t.num,t.title,t.description,"linkText","linkHref"].includes(n)),d={...Object.fromEntries(l.filter(n=>!(n in a)).map(n=>[n,"a head setting no Header Box part reads (lib/document/blocks/general/section-head-looks `headReads`)"])),...o.drop};return{name:_(N,e)??e,boxProps:(n,c)=>{const i=s(n),O=o.roomBelow?{sectionPaddingBottom:o.roomBelow.bottom,sectionPaddingBottomPhone:o.roomBelow.bottomPhone}:{},A=typeof o.boxProps=="function"?o.boxProps(n,c):o.boxProps??{},g=u(e)==="editorial"?L:{};return{...I,direction:"column",gap:f[u(e)],sectionPaddingTop:i.top,...i.topTablet!==void 0?{sectionPaddingTopTablet:i.topTablet}:{},...i.topPhone!==void 0?{sectionPaddingTopPhone:i.topPhone}:{},...g,...O,...A}},box:[...R,...r?[[r,"sectionPaddingTop",(n,c)=>s(c).top]]:[]],parts:[m,...(()=>{const n=r&&Q.has(e)?{[P(r,"tablet")]:0,[P(r,"mobile")]:0}:{},c={...r?{[r]:0}:{},...n,...o.coreProps},i={kind:"core",keep:"rest",...Object.keys(c).length?{props:c}:{},...o.slots?{slots:o.slots}:{}};return[o.coreBox?{kind:"group",name:o.coreBox.name,props:o.coreBox.props,parts:[i]}:i]})(),...o.partsAfter??[]],...Object.keys(a).length?{reads:a}:{},...Object.keys(d).length?{drop:d}:{},...o.pressHeading?{pressKeepsEmpty:[t.title]}:{},...o.skip?{skip:o.skip}:{}}}const q={...j,direction:"accordion",rowStyle:"numbered"},z={sectionPaddingLeft:S,sectionPaddingRight:S},J={Footprint:{slots:{[b]:[k()]},pressHeading:!0},ProcessSteps:{slots:(e,o)=>o.press?{[x]:y().map(t=>({...t,props:{...t.props,...z}}))}:{},boxProps:{gapPhone:f.editorial}},FAQ:{slots:{[b]:[H()]},pressHeading:!0,coreBox:{name:"Questions",props:q},coreProps:{sectionAccent:X},roomBelow:{bottom:120,bottomPhone:70},boxProps:(e,o)=>o.press?{}:{[Y]:K},skip:e=>{const o=e._partStyles??{},t=F().filter(s=>o[s]!==void 0);return t.length?`held: its rows carry their own run style (_partStyles ${t.map(s=>`"${s}"`).join(", ")}), which the Box path does not draw the same`:void 0}}},fo=Object.fromEntries(U.map(e=>[e,$(e,_(J,e))]));export{q as FAQ_ROWS_BOX,J as HEAD_ONLY_CARD_SEEDS,fo as HEAD_ONLY_SECTION_TO_BOX,U as HEAD_ONLY_TYPES,So as HOST_ROW_HEAD_TYPES,$ as headOnlyRow};
@@ -4,6 +4,10 @@ export declare const SECTION_PAD_INNER_DEFAULTS: Record<string, {
4
4
  bottom: number;
5
5
  }>;
6
6
  export declare const SECTION_PAD_INNER: Set<string>;
7
+ export declare const innerPaddingFallback: (type: string) => {
8
+ top?: number;
9
+ bottom?: number;
10
+ };
7
11
  export declare const PAD_ON_ROOT: ReadonlySet<string>;
8
12
  export declare const PADS_ITS_OWN_SPACE: ReadonlySet<string>;
9
13
  export declare const sectionPadding: BlockPass;
@@ -1 +1 @@
1
- import{jsx as S}from"react/jsx-runtime";import{HideTaker as m}from"../../../components/ViewHideRoot.js";import{isBackgroundBox as _}from"../../../../format/lib/content/box-background.js";import{boxSideSpaceOf as u}from"../../../../format/lib/content/box-side-space.js";import{SECTION_PAD_KEYS as p,padValuesOf as T,resolveSectionPadding as g,sectionPadAttrs as I}from"../../content/section-padding.js";import{sectionFillPassClass as E}from"../../../../format/lib/content/section-min-height.js";import{COPIES_IN_THE_BOX as b,drawsCopiesInTheBox as O}from"../../../../format/lib/content/copies-in-box.js";import{ownEntry as x}from"../../../../format/lib/own-entry.js";const l={ParagraphsA:{top:60,bottom:80},StatsParagraph:{top:120,bottom:120},Timeline:{top:120,bottom:120},Footprint:{top:120,bottom:120},TimelineTrack:{top:120,bottom:120},TitleWithButtons:{top:140,bottom:140},ProcessSteps:{top:120,bottom:120},DetailRows:{top:100,bottom:100}},c=new Set(Object.keys(l)),f=new Set(["Flex","Text","Heading","ImageBlock"]),N=new Set(["Divider"]),h=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),P=new Set(["ProductGrid"]);function s(e,t,o=!1){const i=e.render;e.render=n=>{if(t?.(n))return i(n);const r=I({...T(n,p,o),sideSpace:u(n.sideSpace)}),a=i(n),d=E(n);return r?S(m,{className:d?`${r.className} ${d}`:r.className,style:r.style,children:a}):a}}const j={name:"sectionPadding",applies:(e,t,o)=>t.isSection(e)&&!h.has(e)&&!!o&&typeof o.render=="function",panel(e,t,o){c.has(t)||P.has(t)||(e.fields={...e.fields,...o.sidesPaddingFields({tablet:!0,siteSide:!0})})},draw(e,t){if(c.has(t)){const o=e.render,i=x(l,t);e.render=n=>{const r=g(n,i);return o({...n,padTop:r.top,padBottom:r.bottom})};return}if(P.has(t)){s(e);return}f.has(t)||N.has(t)||s(e,t==="Flex"?o=>_(o.bgImage):b.has(t)?o=>O(t,o):void 0,!0)}},A=["Heading","Text","ImageBlock"],B=["LogoBlock"],K={name:"blockPadding",applies:(e,t,o)=>(A.includes(e)||B.includes(e))&&!!o&&typeof o.render=="function",panel(e,t,o){e.fields={...e.fields,...o.sidesPaddingFields({tablet:!0,siteSide:!0})}},draw(e,t){f.has(t)||s(e,void 0,!0)}};export{N as PADS_ITS_OWN_SPACE,f as PAD_ON_ROOT,c as SECTION_PAD_INNER,l as SECTION_PAD_INNER_DEFAULTS,K as blockPadding,j as sectionPadding};
1
+ import{jsx as u}from"react/jsx-runtime";import{HideTaker as m}from"../../../components/ViewHideRoot.js";import{isBackgroundBox as p}from"../../../../format/lib/content/box-background.js";import{boxSideSpaceOf as T}from"../../../../format/lib/content/box-side-space.js";import{BAND_PAD_KEYS as I,BAND_PAD_UNIT_KEY as g,SECTION_PAD_KEYS as b,padValuesOf as A,resolveSectionPadding as D,sectionPadAttrs as E}from"../../content/section-padding.js";import{sectionFillPassClass as N}from"../../../../format/lib/content/section-min-height.js";import{COPIES_IN_THE_BOX as h,drawsCopiesInTheBox as O}from"../../../../format/lib/content/copies-in-box.js";import{ownEntry as x}from"../../../../format/lib/own-entry.js";const c={ParagraphsA:{top:60,bottom:80},StatsParagraph:{top:120,bottom:120},Timeline:{top:120,bottom:120},Footprint:{top:120,bottom:120},TimelineTrack:{top:120,bottom:120},TitleWithButtons:{top:140,bottom:140},ProcessSteps:{top:120,bottom:120},DetailRows:{top:100,bottom:100}},f=new Set(Object.keys(c)),P=e=>x(c,e)??{},r=new Set(["DetailRows"]),_=new Set(["Flex","Text","Heading","ImageBlock"]),B=new Set(["Divider"]),w=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),S=new Set(["ProductGrid"]);function a(e,t,o=!1){const s=e.render;e.render=n=>{if(t?.(n))return s(n);const i=E({...A(n,b,o),sideSpace:T(n.sideSpace)}),d=s(n),l=N(n);return i?u(m,{className:l?`${i.className} ${l}`:i.className,style:i.style,children:d}):d}}const v={name:"sectionPadding",applies:(e,t,o)=>t.isSection(e)&&!w.has(e)&&!!o&&typeof o.render=="function",panel(e,t,o){if(f.has(t)&&!r.has(t)){e.fields={...e.fields,...o.sidesPaddingFields({keys:I,unitKey:g,fallback:P(t),tablet:!0,siteSide:!0})};return}r.has(t)||S.has(t)||(e.fields={...e.fields,...o.sidesPaddingFields({tablet:!0,siteSide:!0})})},draw(e,t){if(!(f.has(t)&&!r.has(t))){if(r.has(t)){const o=e.render,s=P(t);e.render=n=>{const i=D(n,s);return o({...n,padTop:i.top,padBottom:i.bottom})};return}if(S.has(t)){a(e);return}_.has(t)||B.has(t)||a(e,t==="Flex"?o=>p(o.bgImage):h.has(t)?o=>O(t,o):void 0,!0)}}},C=["Heading","Text","ImageBlock"],R=["LogoBlock"],V={name:"blockPadding",applies:(e,t,o)=>(C.includes(e)||R.includes(e))&&!!o&&typeof o.render=="function",panel(e,t,o){e.fields={...e.fields,...o.sidesPaddingFields({tablet:!0,siteSide:!0})}},draw(e,t){_.has(t)||a(e,void 0,!0)}};export{B as PADS_ITS_OWN_SPACE,_ as PAD_ON_ROOT,f as SECTION_PAD_INNER,c as SECTION_PAD_INNER_DEFAULTS,V as blockPadding,P as innerPaddingFallback,v as sectionPadding};
@@ -168,6 +168,7 @@ export declare function sectionBoxIdOf(oldId: string, piece: number): string;
168
168
  export declare function registerBoxNativeSections(types: Readonly<Record<string, string>>): void;
169
169
  export declare function boxNativeReason(type: string): string | undefined;
170
170
  export declare const SECTION_TO_BOX_ON: readonly string[];
171
+ export declare const HOST_PRESS_BLOCKS: Readonly<Record<string, readonly string[]>>;
171
172
  export declare const HOST_PRESS_TYPES: readonly string[];
172
173
  export declare const SECTION_TO_BOX_PRESS: readonly string[];
173
174
  export declare function registerSectionToBox(rows: Readonly<Record<string, SectionToBoxRow>>): void;
@@ -1 +1 @@
1
- import{readHidable as Z}from"efficient-easel/draw";import{BOX_TYPE as ee,CONTAINER_BLOCKS_SLOT as te}from"../../../format/lib/document/container-blocks.js";import{headingTextSeed as oe,labelTextSeed as ne}from"../../../format/lib/document/text-seeds.js";import{SPLITTABLE_SECTIONS as se,parseSectionHeadPlacement as re}from"../../../format/lib/sections/section-head-placement.js";import{accentItalicRuns as ie}from"../../../format/lib/markup.js";import{seedNodes as ae}from"../../../format/lib/document/seed-parts.js";import{bucketByGroup as ce}from"../../../format/lib/locations-grid.js";import{normalizeTheme as z}from"../../../format/lib/theme.js";import{hasOwnEntry as R,ownEntry as v}from"../../../format/lib/own-entry.js";const E=ee,_=te;function Ie(t){if(t.theme)return z(t.theme);const o=t.site?.themePresets;return o?z({selected:t.site?.selectedPreset??0,themes:[...o]}):void 0}function de(t,o){return o===0?`${t}~box`:`${t}~box-${o+1}`}const C={Flex:"the Box itself",Hero:"its slides hold Boxes of real blocks (Hero › Slide › Box), and its Scrolling Bar is a Box in its strip slot (Hero › Box)",Divider:"one block with no text, picture or button",CustomHTML:"the HTML box is the whole section; it has no parts"};function Ne(t){for(const[o,s]of Object.entries(t)){if(R(C,o)&&v(C,o)!==s)throw new Error(`lib/sections/section-to-box: "${o}" is already Box-native`);C[o]=s}}function Ae(t){return v(C,t)}const Y=new Set(["id"]),T={},M=[],fe=["ProductGrid","Events","Collections","GalleryB","ContactRouting","ReviewForm","AppointmentBooking","Reviews","CheckoutCTA","AlloyWheelsListing","SpecTable"],le=["Breadcrumb","DocBody","Form","SubmitBuild","Footprint","FAQ","ProcessSteps",...fe,"Stats","Logos","PaymentBadges","PaymentLogosBlock","FitmentFinder","DocMasthead","DocTabs","Timeline","TimelineTrack","OrderSummary","Chart","Mockup","Countdown","FeaturedCover","SectionHeader","TitleWithButtons","Prose","ParagraphsA","Banner","Cards"];function Re(t){for(const[o,s]of Object.entries(t)){if(R(T,o)&&v(T,o)!==s)throw new Error(`lib/sections/section-to-box: "${o}" already has a row`);T[o]=s}}function Ce(t){return v(T,t)}function He(){return Object.keys(T)}function pe(t){return R(T,t)&&M.includes(t)}function Le(t,o=le){return R(T,t)&&(o.includes(t)||pe(t))}function Fe(t){const o=v(se,t);if(!o)throw new Error(`lib/sections/section-to-box: "${t}" has no head row in SPLITTABLE_SECTIONS`);const s=[{kind:"text",key:o.num,role:"eyebrow"},{kind:"text",key:o.title,role:"heading"}];return o.description&&s.push({kind:"text",key:o.description,role:"body"}),o.headRows.includes("linkText")&&o.headRows.includes("linkHref")&&s.push({kind:"button",key:"linkText",href:"linkHref"}),s}const W=t=>Z(t),Me=t=>W(t).text.trim()!=="";function ue(t){if(t.includes("=="))return t;const o=t.indexOf("/"),s=o===-1?t:t.slice(0,o),r=s.trim();if(!r)return t;const c=s.indexOf(r);return`${s.slice(0,c)}==${r}==${s.slice(c+r.length)}${o===-1?"":t.slice(o)}`}const he=t=>t==="heading"?oe():t==="eyebrow"?ne():{};function ye(t,o,s,r){const a={...t._partStyles?.text??{},...o??{},...s??{}};return(r==="center"||r==="right")&&a.align===void 0&&(a.align=r),Object.keys(a).length?{_partStyles:{text:a}}:{}}function me(t,o){if(t===void 0)return{};if(typeof t=="string")return{variant:t};const s=o[t.key];return{variant:(typeof s=="string"?v(t.map,s):void 0)??t.fallback}}function V(t,o,s,r,c={}){const a={...o};for(const u of t){const[m,S,j]=typeof u=="string"?[u,u,void 0]:u;if(s[m]===void 0)continue;const I=j?j(s[m],s,c):s[m];I===void 0?delete a[S]:a[S]=I,r(m,S,I===void 0)}return a}function ke(t){const o=new Set([...Y,"headPlacement","_partStyles",...Object.keys(t.drop??{}),...Object.keys(t.reads??{})]),s=c=>{for(const a of c??[])o.add(typeof a=="string"?a:a[0])},r=c=>{for(const a of c)switch(a.kind){case"text":case"image":o.add(a.key),a.kind==="image"&&a.alt&&o.add(a.alt);break;case"button":o.add(a.key),o.add(a.href),typeof a.variant=="object"&&o.add(a.variant.key);break;case"list":o.add(a.key);break;case"group":case"block":s(a.box),r(a.parts??[]);break;case"core":if(a.keep!=="rest"&&a.keep.forEach(u=>o.add(u)),Object.keys(a.rename??{}).forEach(u=>o.add(u)),a.derive?.reads.forEach(u=>o.add(u)),typeof a.slots!="function")for(const u of Object.values(a.slots??{}))for(const m of u)"kind"in m&&o.add(m.key);break}};for(const c of[t,...t.also??[]])s(c.box),r(c.parts);return o}const be=t=>re(t.headPlacement)==="own-box";function ge(t){return be(t)?"its head sits in a Box of its own above it (own-box): the row draws the head inline":void 0}function xe(t,o){const s=t[o];return Array.isArray(s)&&s.some(c=>!!c&&typeof c=="object"&&typeof c.type=="string")?"already on the Box path: its items draw from a filled card template":void 0}function we(t){const o=new Set,s=r=>{for(const c of r)if(c.kind==="group"||c.kind==="block")s(c.parts??[]);else if(c.kind==="core"&&c.slots&&typeof c.slots!="function")for(const[a,u]of Object.entries(c.slots))u.length>0&&u.every(m=>!("kind"in m))&&o.add(a)};for(const r of[t,...t.also??[]])s(r.parts);return[...o]}function $e(t,o,s){if(!s.press)for(const r of we(t)){const c=xe(o,r);if(c!==void 0)return c}}function Q(t,o,s={}){const r=t.props,c=(o.ownBoxConverts?void 0:ge(r))??$e(o,r,s)??o.skip?.(r);if(c!==void 0)return{node:t,nodes:[t],carried:[],dropped:[],siteWrites:[],skipped:c};const a=String(r.id??t.type),u=[],m=[],S=new Set,j=(n,i)=>{u.push({key:n,home:i}),S.add(n)},I=r._partStyles??{},H=ke(o);let X=0;const w=(n,i)=>({type:n,props:{...i,id:`${a}~${n}-${++X}`}}),K=(n,i,b,y,g,l,$)=>{if(g){for(const d of n??[]){const h=typeof d=="string"?d:d[0];b[h]!==void 0&&$(h,`nothing — the ${y} has no parts, so it is not drawn`)}return}const e=typeof i=="function"?i(r,s):i??{};return V(n??[],e,b,(d,h,f)=>$(d,f?`nothing — the old value draws nothing (${y}: no ${h})`:`${l}${y}: ${h}`),s)},q=n=>ae(n,i=>`${a}~${i}-${++X}`),D=(n,i,b)=>{const y=n.of?n.of(i):Array.isArray(i[n.key])?i[n.key]:[],g=typeof n.props=="function"?n.props(r,s):n.props??{},l=y.map((f,x)=>{const p=f??{},k=n.item?.(p,x,r)??{},B=N(k.reverse?[...n.parts].reverse():n.parts,p,!1,`item ${x+1}: `);return n.flat?k.props?B.map(P=>({...P,props:{...P.props,...k.props,id:P.props.id}})):B:[w(E,{name:`${n.name} ${x+1}`,...g,...k.props??{},[_]:B})]});if(n.groups){const f=n.groups;return b(n.key,y.length?`one Box per item (${y.length}), in a Box per group`:"nothing — the list is empty"),ce(y.map(x=>x??{}),f.of,f.of).map((x,p)=>{const k=x.items.map(O=>O.item),B=f.parts?N(f.parts,f.head?.(k,r)??{},!1,`group ${p+1}: `):[],P=x.items.map(O=>l[O.index]),L=f.perRow?.(k.length,r),A=Number.isInteger(L)&&L>=1?L:1,F=[];if(f.perRow&&A<P.length)for(let O=0;O*A<P.length;O++)F.push(P.slice(O*A,(O+1)*A).flat());return w(E,{name:`${f.name} ${p+1}`,...f.props??{},[_]:[...B,w(E,{name:`${f.itemsName} ${p+1}`,...f.itemsProps?.(k.length,r)??{},[_]:F.length?F.map((O,U)=>w(E,{name:`${f.rowName??`${f.itemsName} row`} ${U+1}`,...f.rowProps??{},[_]:O})):P.flat()})]})})}const $=n.perRow?.(r),e=n.perRow?Number.isInteger($)&&$>=1?$:1:0;if(b(n.key,(y.length?n.flat?`each item's parts (${y.length} items), in order`:`one Box per item (${y.length}), its parts inside`:"nothing — the list is empty")+(e&&y.length?`, in rows of ${e}`:"")),!e)return l.flat();const d=typeof n.rowProps=="function"?n.rowProps(r,s):n.rowProps??{},h=[];for(let f=0;f*e<l.length;f++){const x=l.slice(f*e,(f+1)*e).flat(),p=n.rowFiller?e-l.slice(f*e,(f+1)*e).length:0;h.push(w(E,{name:`${n.rowName??`${n.name} row`} ${f+1}`,...d,[_]:[...x,...Array.from({length:p},(k,B)=>w(E,{name:`Empty ${B+1}`,...n.rowFiller,[_]:[]}))]}))}return h},N=(n,i,b,y)=>{const g=[],l=(e,d)=>b?j(e,d):void 0,$=e=>b?I[e]:void 0;for(const e of n)if(!(e.when&&!e.when(r,b?void 0:i)))switch(e.kind){case"text":{const d=W(i[e.key]);if(!d.text.trim()&&!(b&&s.press&&o.pressKeepsEmpty?.includes(e.key))){l(e.key,"nothing — empty words draw nothing, so no block");break}const h=he(e.role??"body"),{_partStyles:f,...x}=h,p=ye(h,e.styleFrom?{...e.style,...e.styleFrom(r,s)}:e.style,$(e.key),e.props?.align);g.push(w("Text",{text:e.mark==="accentLead"?ue(d.text):e.mark==="accentItalic"?ie(d.text):d.text,...x,...e.props??{},...p,...d.hidden?{_hidden:!0}:{}})),l(e.key,`${y}Text block: its words${d.hidden?", hidden":""}`);break}case"button":{const d=W(i[e.key]);if(!d.text.trim()){l(e.key,"nothing — no words, no button"),l(e.href,"nothing — no button to link"),typeof e.variant=="object"&&l(e.variant.key,"nothing — no button to style");break}const h=typeof i[e.href]=="string"&&i[e.href]?i[e.href]:"#",f={...e.style??{},...$(e.key)??{}};g.push(w("ButtonBlock",{label:d.text,href:h,...typeof e.props=="function"?e.props(i,s):e.props??{},...me(e.variant,i),...Object.keys(f).length?{_partStyles:{label:f}}:{},...d.hidden?{_hidden:!0}:{}})),l(e.key,`${y}Button block: its words`),l(e.href,`${y}Button block: its link`),typeof e.variant=="object"&&l(e.variant.key,`${y}Button block: its Style`);break}case"image":{const d=i[e.key];if(typeof d!="string"||!d){l(e.key,"nothing — no picture, no block"),e.alt&&l(e.alt,"nothing — no picture to describe");break}const h=e.alt&&typeof i[e.alt]=="string"?i[e.alt]:"";g.push(w("ImageBlock",{src:d,alt:h,...e.props??{}})),l(e.key,`${y}Image block: its picture`),e.alt&&l(e.alt,`${y}Image block: its alt text`);break}case"list":{g.push(...D(e,i,l));break}case"group":{const d=N(e.parts,i,b,y),h=K(e.box,e.props,i,`${e.name} Box`,!d.length&&!e.keepEmpty,y,l);h&&g.push(w(E,{name:e.name,...h,[_]:d}));break}case"block":{const d=e.parts?N(e.parts,i,b,y):[],h=K(e.box,e.props,i,`${e.type} block`,!!e.parts&&!d.length&&!e.keepEmpty,y,l);h&&g.push(w(e.type,{...h,...e.slot?{[e.slot]:d}:{}}));break}case"core":{const d=e.as??t.type,h={...e.headless?{}:{headPlacement:"own-box"},...e.props??{}},f=e.keep==="rest"?Object.keys(i).filter(p=>!H.has(p)&&!(p in h)):e.keep;for(const p of f)i[p]!==void 0&&(h[p]=i[p],l(p,`the ${d} block inside the Box`));if(e.keep==="rest"){for(const k of Object.keys(e.props??{}))i[k]!==void 0&&!H.has(k)&&l(k,`nothing — the ${d} block inside the Box has the row's own value`);i.headPlacement!==void 0&&l("headPlacement",`the ${d} block inside the Box: own-box`);const p=Object.fromEntries(Object.entries(I).filter(([k])=>!H.has(k)));Object.keys(p).length&&(h._partStyles=p)}for(const[p,k]of Object.entries(e.rename??{}))i[p]!==void 0&&(h[k]=i[p],l(p,`the ${d} block inside the Box: ${k}`));if(e.derive){Object.assign(h,e.derive.props(i,s));for(const p of e.derive.reads)i[p]!==void 0&&l(p,`the ${d} block inside the Box`)}const x=typeof e.slots=="function"?e.slots(i,s):e.slots??{};for(const[p,k]of Object.entries(x))h[p]=k.flatMap(B=>"kind"in B?D(B,i,l):q([B]));g.push(w(d,h));break}}return g},J=(n,i)=>{const b=i===0?"Box":`${n.name} Box`,y=N(n.parts,r,!0,i===0?"":`${b}: `),g=typeof n.boxProps=="function"?n.boxProps(r,s):n.boxProps??{},l=V(n.box??[],g,r,($,e,d)=>j($,d?`nothing — the old value draws nothing (${b}: no ${e})`:`${b}: ${e}`),s);return{type:E,props:{name:n.name,...l,[_]:y,id:de(a,i)}}},G=[o,...o.also??[]].map(J);r._partStyles!==void 0&&j("_partStyles","each old part's style moved to its new part");for(const[n,i]of Object.entries(o.reads??{}))r[n]!==void 0&&j(n,i);for(const[n,i]of Object.entries(o.drop??{}))n in r&&(m.push({key:n,why:i}),S.add(n));for(const n of Object.keys(r))Y.has(n)||S.has(n)||m.push({key:n,why:"not in the row — not carried"});return{node:G[0],nodes:G,carried:u,dropped:m,siteWrites:[...o.site?.(t,s)??[]]}}function We(t,o=M,s={}){const r=t.content;if(!Array.isArray(r))return t;let c=!1;const a=r.flatMap(u=>{const m=u&&typeof u.type=="string"&&o.includes(u.type)?v(T,u.type):void 0;if(!m)return[u];const S=Q(u,m,s);return S.skipped!==void 0?[u]:(c=!0,S.nodes)});return c?{...t,content:a}:t}function Xe(t,o=M,s={}){if(!Array.isArray(t))return[];const r=[];return t.forEach((c,a)=>{const u=c&&typeof c.type=="string"&&o.includes(c.type)?v(T,c.type):void 0;if(!u)return;const m=Q(c,u,s);m.skipped===void 0&&r.push({index:a,node:m.node,nodes:m.nodes})}),r}export{fe as HOST_PRESS_TYPES,_ as SECTION_BOX_SLOT,E as SECTION_BOX_TYPE,M as SECTION_TO_BOX_ON,le as SECTION_TO_BOX_PRESS,Ae as boxNativeReason,Q as convertSection,We as convertSectionsInPage,Ie as convertTheme,pe as convertsToBox,xe as filledTemplateHold,Me as hasWords,be as headInOwnBox,Fe as headParts,ge as ownBoxHold,Le as pressesAsBox,Ne as registerBoxNativeSections,Re as registerSectionToBox,de as sectionBoxIdOf,Xe as sectionToBoxEdits,Ce as sectionToBoxRow,He as sectionToBoxTypes};
1
+ import{readHidable as Z}from"efficient-easel/draw";import{BOX_TYPE as ee,CONTAINER_BLOCKS_SLOT as te}from"../../../format/lib/document/container-blocks.js";import{headingTextSeed as oe,labelTextSeed as ne}from"../../../format/lib/document/text-seeds.js";import{SPLITTABLE_SECTIONS as se,parseSectionHeadPlacement as re}from"../../../format/lib/sections/section-head-placement.js";import{accentItalicRuns as ie}from"../../../format/lib/markup.js";import{seedNodes as ce}from"../../../format/lib/document/seed-parts.js";import{bucketByGroup as ae}from"../../../format/lib/locations-grid.js";import{normalizeTheme as z}from"../../../format/lib/theme.js";import{hasOwnEntry as R,ownEntry as E}from"../../../format/lib/own-entry.js";const v=ee,_=te;function Ie(t){if(t.theme)return z(t.theme);const o=t.site?.themePresets;return o?z({selected:t.site?.selectedPreset??0,themes:[...o]}):void 0}function de(t,o){return o===0?`${t}~box`:`${t}~box-${o+1}`}const A={Flex:"the Box itself",Hero:"its slides hold Boxes of real blocks (Hero › Slide › Box), and its Scrolling Bar is a Box in its strip slot (Hero › Box)",Divider:"one block with no text, picture or button",CustomHTML:"the HTML box is the whole section; it has no parts"};function Ne(t){for(const[o,s]of Object.entries(t)){if(R(A,o)&&E(A,o)!==s)throw new Error(`lib/sections/section-to-box: "${o}" is already Box-native`);A[o]=s}}function Re(t){return E(A,t)}const Y=new Set(["id"]),P={},W=[],fe={ProductGrid:["ProductColour","ProductEyebrow","ProductName","ProductPicture","ProductPrice","ProductRef","ProductSpecs"],Events:[],Collections:["CollectionCard"],GalleryB:["GalleryItem"],ContactRouting:[],ReviewForm:[],AppointmentBooking:["BookingBox"],Reviews:["RatingBlock"],CheckoutCTA:[],AlloyWheelsListing:["ProductBuy","ProductColour","ProductEyebrow","ProductName","ProductPicture","ProductPrice","ProductSpecs"],SpecTable:["EuTyreLabelBlock","WheelDiagram"]},le=Object.keys(fe),pe=["Breadcrumb","DocBody","Form","SubmitBuild","Footprint","FAQ","ProcessSteps",...le,"Stats","Logos","PaymentBadges","PaymentLogosBlock","FitmentFinder","DocMasthead","DocTabs","Timeline","TimelineTrack","OrderSummary","Chart","Mockup","Countdown","FeaturedCover","SectionHeader","TitleWithButtons","Prose","ParagraphsA","Banner","Cards"];function Ae(t){for(const[o,s]of Object.entries(t)){if(R(P,o)&&E(P,o)!==s)throw new Error(`lib/sections/section-to-box: "${o}" already has a row`);P[o]=s}}function Le(t){return E(P,t)}function He(){return Object.keys(P)}function ue(t){return R(P,t)&&W.includes(t)}function Fe(t,o=pe){return R(P,t)&&(o.includes(t)||ue(t))}function We(t){const o=E(se,t);if(!o)throw new Error(`lib/sections/section-to-box: "${t}" has no head row in SPLITTABLE_SECTIONS`);const s=[{kind:"text",key:o.num,role:"eyebrow"},{kind:"text",key:o.title,role:"heading"}];return o.description&&s.push({kind:"text",key:o.description,role:"body"}),o.headRows.includes("linkText")&&o.headRows.includes("linkHref")&&s.push({kind:"button",key:"linkText",href:"linkHref"}),s}const K=t=>Z(t),Ke=t=>K(t).text.trim()!=="";function he(t){if(t.includes("=="))return t;const o=t.indexOf("/"),s=o===-1?t:t.slice(0,o),r=s.trim();if(!r)return t;const a=s.indexOf(r);return`${s.slice(0,a)}==${r}==${s.slice(a+r.length)}${o===-1?"":t.slice(o)}`}const ye=t=>t==="heading"?oe():t==="eyebrow"?ne():{};function me(t,o,s,r){const c={...t._partStyles?.text??{},...o??{},...s??{}};return(r==="center"||r==="right")&&c.align===void 0&&(c.align=r),Object.keys(c).length?{_partStyles:{text:c}}:{}}function ke(t,o){if(t===void 0)return{};if(typeof t=="string")return{variant:t};const s=o[t.key];return{variant:(typeof s=="string"?E(t.map,s):void 0)??t.fallback}}function V(t,o,s,r,a={}){const c={...o};for(const u of t){const[m,$,j]=typeof u=="string"?[u,u,void 0]:u;if(s[m]===void 0)continue;const C=j?j(s[m],s,a):s[m];C===void 0?delete c[$]:c[$]=C,r(m,$,C===void 0)}return c}function be(t){const o=new Set([...Y,"headPlacement","_partStyles",...Object.keys(t.drop??{}),...Object.keys(t.reads??{})]),s=a=>{for(const c of a??[])o.add(typeof c=="string"?c:c[0])},r=a=>{for(const c of a)switch(c.kind){case"text":case"image":o.add(c.key),c.kind==="image"&&c.alt&&o.add(c.alt);break;case"button":o.add(c.key),o.add(c.href),typeof c.variant=="object"&&o.add(c.variant.key);break;case"list":o.add(c.key);break;case"group":case"block":s(c.box),r(c.parts??[]);break;case"core":if(c.keep!=="rest"&&c.keep.forEach(u=>o.add(u)),Object.keys(c.rename??{}).forEach(u=>o.add(u)),c.derive?.reads.forEach(u=>o.add(u)),typeof c.slots!="function")for(const u of Object.values(c.slots??{}))for(const m of u)"kind"in m&&o.add(m.key);break}};for(const a of[t,...t.also??[]])s(a.box),r(a.parts);return o}const ge=t=>re(t.headPlacement)==="own-box";function xe(t){return ge(t)?"its head sits in a Box of its own above it (own-box): the row draws the head inline":void 0}function we(t,o){const s=t[o];return Array.isArray(s)&&s.some(a=>!!a&&typeof a=="object"&&typeof a.type=="string")?"already on the Box path: its items draw from a filled card template":void 0}function Be(t){const o=new Set,s=r=>{for(const a of r)if(a.kind==="group"||a.kind==="block")s(a.parts??[]);else if(a.kind==="core"&&a.slots&&typeof a.slots!="function")for(const[c,u]of Object.entries(a.slots))u.length>0&&u.every(m=>!("kind"in m))&&o.add(c)};for(const r of[t,...t.also??[]])s(r.parts);return[...o]}function Se(t,o,s){if(!s.press)for(const r of Be(t)){const a=we(o,r);if(a!==void 0)return a}}function Q(t,o,s={}){const r=t.props,a=(o.ownBoxConverts?void 0:xe(r))??Se(o,r,s)??o.skip?.(r);if(a!==void 0)return{node:t,nodes:[t],carried:[],dropped:[],siteWrites:[],skipped:a};const c=String(r.id??t.type),u=[],m=[],$=new Set,j=(n,i)=>{u.push({key:n,home:i}),$.add(n)},C=r._partStyles??{},L=be(o);let M=0;const w=(n,i)=>({type:n,props:{...i,id:`${c}~${n}-${++M}`}}),X=(n,i,b,y,g,l,B)=>{if(g){for(const d of n??[]){const h=typeof d=="string"?d:d[0];b[h]!==void 0&&B(h,`nothing — the ${y} has no parts, so it is not drawn`)}return}const e=typeof i=="function"?i(r,s):i??{};return V(n??[],e,b,(d,h,f)=>B(d,f?`nothing — the old value draws nothing (${y}: no ${h})`:`${l}${y}: ${h}`),s)},q=n=>ce(n,i=>`${c}~${i}-${++M}`),D=(n,i,b)=>{const y=n.of?n.of(i):Array.isArray(i[n.key])?i[n.key]:[],g=typeof n.props=="function"?n.props(r,s):n.props??{},l=y.map((f,x)=>{const p=f??{},k=n.item?.(p,x,r)??{},S=I(k.reverse?[...n.parts].reverse():n.parts,p,!1,`item ${x+1}: `);return n.flat?k.props?S.map(T=>({...T,props:{...T.props,...k.props,id:T.props.id}})):S:[w(v,{name:`${n.name} ${x+1}`,...g,...k.props??{},[_]:S})]});if(n.groups){const f=n.groups;return b(n.key,y.length?`one Box per item (${y.length}), in a Box per group`:"nothing — the list is empty"),ae(y.map(x=>x??{}),f.of,f.of).map((x,p)=>{const k=x.items.map(O=>O.item),S=f.parts?I(f.parts,f.head?.(k,r)??{},!1,`group ${p+1}: `):[],T=x.items.map(O=>l[O.index]),H=f.perRow?.(k.length,r),N=Number.isInteger(H)&&H>=1?H:1,F=[];if(f.perRow&&N<T.length)for(let O=0;O*N<T.length;O++)F.push(T.slice(O*N,(O+1)*N).flat());return w(v,{name:`${f.name} ${p+1}`,...f.props??{},[_]:[...S,w(v,{name:`${f.itemsName} ${p+1}`,...f.itemsProps?.(k.length,r)??{},[_]:F.length?F.map((O,U)=>w(v,{name:`${f.rowName??`${f.itemsName} row`} ${U+1}`,...f.rowProps??{},[_]:O})):T.flat()})]})})}const B=n.perRow?.(r),e=n.perRow?Number.isInteger(B)&&B>=1?B:1:0;if(b(n.key,(y.length?n.flat?`each item's parts (${y.length} items), in order`:`one Box per item (${y.length}), its parts inside`:"nothing — the list is empty")+(e&&y.length?`, in rows of ${e}`:"")),!e)return l.flat();const d=typeof n.rowProps=="function"?n.rowProps(r,s):n.rowProps??{},h=[];for(let f=0;f*e<l.length;f++){const x=l.slice(f*e,(f+1)*e).flat(),p=n.rowFiller?e-l.slice(f*e,(f+1)*e).length:0;h.push(w(v,{name:`${n.rowName??`${n.name} row`} ${f+1}`,...d,[_]:[...x,...Array.from({length:p},(k,S)=>w(v,{name:`Empty ${S+1}`,...n.rowFiller,[_]:[]}))]}))}return h},I=(n,i,b,y)=>{const g=[],l=(e,d)=>b?j(e,d):void 0,B=e=>b?C[e]:void 0;for(const e of n)if(!(e.when&&!e.when(r,b?void 0:i)))switch(e.kind){case"text":{const d=K(i[e.key]);if(!d.text.trim()&&!(b&&s.press&&o.pressKeepsEmpty?.includes(e.key))){l(e.key,"nothing — empty words draw nothing, so no block");break}const h=ye(e.role??"body"),{_partStyles:f,...x}=h,p=me(h,e.styleFrom?{...e.style,...e.styleFrom(r,s)}:e.style,B(e.key),e.props?.align);g.push(w("Text",{text:e.mark==="accentLead"?he(d.text):e.mark==="accentItalic"?ie(d.text):d.text,...x,...e.props??{},...p,...d.hidden?{_hidden:!0}:{}})),l(e.key,`${y}Text block: its words${d.hidden?", hidden":""}`);break}case"button":{const d=K(i[e.key]);if(!d.text.trim()){l(e.key,"nothing — no words, no button"),l(e.href,"nothing — no button to link"),typeof e.variant=="object"&&l(e.variant.key,"nothing — no button to style");break}const h=typeof i[e.href]=="string"&&i[e.href]?i[e.href]:"#",f={...e.style??{},...B(e.key)??{}};g.push(w("ButtonBlock",{label:d.text,href:h,...typeof e.props=="function"?e.props(i,s):e.props??{},...ke(e.variant,i),...Object.keys(f).length?{_partStyles:{label:f}}:{},...d.hidden?{_hidden:!0}:{}})),l(e.key,`${y}Button block: its words`),l(e.href,`${y}Button block: its link`),typeof e.variant=="object"&&l(e.variant.key,`${y}Button block: its Style`);break}case"image":{const d=i[e.key];if(typeof d!="string"||!d){l(e.key,"nothing — no picture, no block"),e.alt&&l(e.alt,"nothing — no picture to describe");break}const h=e.alt&&typeof i[e.alt]=="string"?i[e.alt]:"";g.push(w("ImageBlock",{src:d,alt:h,...e.props??{}})),l(e.key,`${y}Image block: its picture`),e.alt&&l(e.alt,`${y}Image block: its alt text`);break}case"list":{g.push(...D(e,i,l));break}case"group":{const d=I(e.parts,i,b,y),h=X(e.box,e.props,i,`${e.name} Box`,!d.length&&!e.keepEmpty,y,l);h&&g.push(w(v,{name:e.name,...h,[_]:d}));break}case"block":{const d=e.parts?I(e.parts,i,b,y):[],h=X(e.box,e.props,i,`${e.type} block`,!!e.parts&&!d.length&&!e.keepEmpty,y,l);h&&g.push(w(e.type,{...h,...e.slot?{[e.slot]:d}:{}}));break}case"core":{const d=e.as??t.type,h={...e.headless?{}:{headPlacement:"own-box"},...e.props??{}},f=e.keep==="rest"?Object.keys(i).filter(p=>!L.has(p)&&!(p in h)):e.keep;for(const p of f)i[p]!==void 0&&(h[p]=i[p],l(p,`the ${d} block inside the Box`));if(e.keep==="rest"){for(const k of Object.keys(e.props??{}))i[k]!==void 0&&!L.has(k)&&l(k,`nothing — the ${d} block inside the Box has the row's own value`);i.headPlacement!==void 0&&l("headPlacement",`the ${d} block inside the Box: own-box`);const p=Object.fromEntries(Object.entries(C).filter(([k])=>!L.has(k)));Object.keys(p).length&&(h._partStyles=p)}for(const[p,k]of Object.entries(e.rename??{}))i[p]!==void 0&&(h[k]=i[p],l(p,`the ${d} block inside the Box: ${k}`));if(e.derive){Object.assign(h,e.derive.props(i,s));for(const p of e.derive.reads)i[p]!==void 0&&l(p,`the ${d} block inside the Box`)}const x=typeof e.slots=="function"?e.slots(i,s):e.slots??{};for(const[p,k]of Object.entries(x))h[p]=k.flatMap(S=>"kind"in S?D(S,i,l):q([S]));g.push(w(d,h));break}}return g},J=(n,i)=>{const b=i===0?"Box":`${n.name} Box`,y=I(n.parts,r,!0,i===0?"":`${b}: `),g=typeof n.boxProps=="function"?n.boxProps(r,s):n.boxProps??{},l=V(n.box??[],g,r,(B,e,d)=>j(B,d?`nothing — the old value draws nothing (${b}: no ${e})`:`${b}: ${e}`),s);return{type:v,props:{name:n.name,...l,[_]:y,id:de(c,i)}}},G=[o,...o.also??[]].map(J);r._partStyles!==void 0&&j("_partStyles","each old part's style moved to its new part");for(const[n,i]of Object.entries(o.reads??{}))r[n]!==void 0&&j(n,i);for(const[n,i]of Object.entries(o.drop??{}))n in r&&(m.push({key:n,why:i}),$.add(n));for(const n of Object.keys(r))Y.has(n)||$.has(n)||m.push({key:n,why:"not in the row — not carried"});return{node:G[0],nodes:G,carried:u,dropped:m,siteWrites:[...o.site?.(t,s)??[]]}}function Me(t,o=W,s={}){const r=t.content;if(!Array.isArray(r))return t;let a=!1;const c=r.flatMap(u=>{const m=u&&typeof u.type=="string"&&o.includes(u.type)?E(P,u.type):void 0;if(!m)return[u];const $=Q(u,m,s);return $.skipped!==void 0?[u]:(a=!0,$.nodes)});return a?{...t,content:c}:t}function Xe(t,o=W,s={}){if(!Array.isArray(t))return[];const r=[];return t.forEach((a,c)=>{const u=a&&typeof a.type=="string"&&o.includes(a.type)?E(P,a.type):void 0;if(!u)return;const m=Q(a,u,s);m.skipped===void 0&&r.push({index:c,node:m.node,nodes:m.nodes})}),r}export{fe as HOST_PRESS_BLOCKS,le as HOST_PRESS_TYPES,_ as SECTION_BOX_SLOT,v as SECTION_BOX_TYPE,W as SECTION_TO_BOX_ON,pe as SECTION_TO_BOX_PRESS,Re as boxNativeReason,Q as convertSection,Me as convertSectionsInPage,Ie as convertTheme,ue as convertsToBox,we as filledTemplateHold,Ke as hasWords,ge as headInOwnBox,We as headParts,xe as ownBoxHold,Fe as pressesAsBox,Ne as registerBoxNativeSections,Ae as registerSectionToBox,de as sectionBoxIdOf,Xe as sectionToBoxEdits,Le as sectionToBoxRow,He as sectionToBoxTypes};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-web-builder",
3
- "version": "67.3.0",
3
+ "version": "67.5.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",