efficient-web-builder 49.1.0 → 50.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 (71) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/editor/components/EditorPagePathProvider.d.ts +4 -0
  3. package/dist/editor/components/EditorPagePathProvider.js +1 -0
  4. package/dist/editor/components/PagesPanel.js +1 -1
  5. package/dist/editor/components/SourceStatus.d.ts +3 -3
  6. package/dist/editor/components/SourceStatus.js +1 -1
  7. package/dist/editor/components/StorefrontEditor.js +1 -1
  8. package/dist/editor/components/WebsiteScreenParts.js +1 -1
  9. package/dist/editor/lib/document/add-target.js +1 -1
  10. package/dist/editor/lib/document/block-source-fields.d.ts +6 -0
  11. package/dist/editor/lib/document/block-source-fields.js +1 -1
  12. package/dist/editor/lib/document/blocks/general/Cards/fields.js +1 -1
  13. package/dist/editor/lib/document/blocks/general/ContactLocations/fields.js +1 -1
  14. package/dist/editor/lib/document/blocks/general/PaymentBadges/fields.js +1 -1
  15. package/dist/editor/lib/document/blocks/general/Text/fields.js +1 -1
  16. package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
  17. package/dist/editor/lib/document/card-display-chips.d.ts +7 -2
  18. package/dist/editor/lib/document/card-display-chips.js +1 -1
  19. package/dist/editor/lib/document/card-row-fields.js +1 -1
  20. package/dist/editor/lib/document/field-groups.js +1 -1
  21. package/dist/editor/lib/document/slot-new-children.d.ts +2 -0
  22. package/dist/editor/lib/document/slot-new-children.js +1 -0
  23. package/dist/editor/lib/sections/hero-ticker-to-strip.js +1 -1
  24. package/dist/editor/lib/sections/new-section-node.js +1 -1
  25. package/dist/format/lib/content/block-sources.d.ts +11 -0
  26. package/dist/format/lib/content/block-sources.js +1 -1
  27. package/dist/format/lib/content/card-place.d.ts +8 -0
  28. package/dist/format/lib/content/card-place.js +1 -0
  29. package/dist/format/lib/content/card-template.d.ts +14 -2
  30. package/dist/format/lib/content/card-template.js +1 -1
  31. package/dist/format/lib/document/blocks/general/Cards/card-seed.d.ts +15 -0
  32. package/dist/format/lib/document/blocks/general/Cards/card-seed.js +1 -0
  33. package/dist/format/lib/document/blocks/general/Cards/meta.d.ts +6 -0
  34. package/dist/format/lib/document/blocks/general/Cards/meta.js +1 -1
  35. package/dist/format/lib/document/blocks/general/text-part-shapes.json +8 -0
  36. package/dist/format/lib/document/cards-template-on-read.d.ts +4 -0
  37. package/dist/format/lib/document/cards-template-on-read.js +1 -0
  38. package/dist/format/lib/document/editor-page-context.js +1 -1
  39. package/dist/format/lib/document/renamed-props.js +1 -1
  40. package/dist/format/lib/document/section-catalog.js +22 -2
  41. package/dist/format/lib/document/seed-parts.d.ts +18 -0
  42. package/dist/format/lib/document/seed-parts.js +1 -0
  43. package/dist/format/lib/editor-page-rows.d.ts +2 -0
  44. package/dist/format/lib/editor-page-rows.js +1 -1
  45. package/dist/format/lib/editor-words-catalogue.d.ts +12 -4
  46. package/dist/format/lib/editor-words-catalogue.js +3 -3
  47. package/dist/format/lib/hero-ticker.d.ts +4 -0
  48. package/dist/format/lib/hero-ticker.js +1 -1
  49. package/dist/format/lib/page-at-own-slug.d.ts +9 -0
  50. package/dist/format/lib/page-at-own-slug.js +1 -0
  51. package/dist/format/lib/popup/new-popup.js +1 -1
  52. package/dist/render/components/Cards.d.ts +4 -2
  53. package/dist/render/components/Cards.js +1 -1
  54. package/dist/render/components/Flex.js +1 -1
  55. package/dist/render/components/Text.d.ts +2 -1
  56. package/dist/render/components/Text.js +1 -1
  57. package/dist/render/lib/document/blocks/general/Cards/render.js +1 -1
  58. package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
  59. package/dist/render/lib/document/blocks/general/section-head-looks.d.ts +1 -2
  60. package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -2
  61. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +1 -5
  62. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  63. package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -1
  64. package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
  65. package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.js +2 -2
  66. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  67. package/dist/render/lib/sections/section-to-box.d.ts +7 -7
  68. package/dist/render/lib/sections/section-to-box.js +1 -1
  69. package/dist/render/lib/site-runtime.d.ts +2 -0
  70. package/dist/render/lib/site-runtime.js +1 -1
  71. package/package.json +2 -2
@@ -4,7 +4,6 @@ export type HeadLook = "standard" | "editorial" | "simple" | "essay" | "shelf";
4
4
  export declare function headLookOf(type: string): HeadLook;
5
5
  export declare const HEAD_BELOW: Readonly<Record<HeadLook, number>>;
6
6
  export declare function editorialHeadTree(num: string, title: string, description: string): PartRow;
7
- export declare const token: (step: string, px: number, pxPhone?: number, stepPhone?: string) => Props;
7
+ export { token } from "../../../../../format/lib/document/seed-parts.js";
8
8
  export declare const fluidToken: (step: string, minPx: number, vw: number, px: number) => Props;
9
9
  export declare function headTree(type: string): PartRow;
10
- export {};
@@ -1,2 +1,2 @@
1
- import{readHidable as N}from"efficient-easel/draw";import{SPLITTABLE_SECTIONS as T}from"../../../../../format/lib/sections/section-head-placement.js";import{BUTTON as B,DIM as E,INNER_BOX as o,SH_LINK as L,TEXT as k,smallText as _}from"./section-to-box-row-parts.js";import{labelTextSeed as O}from"../../../../../format/lib/document/text-seeds.js";function M(e){if(e==="ProductGrid")return"shelf";const t=T[e]?.headStyle;return t==="editorial"||t==="simple"||t==="essay"?t:"standard"}const K={standard:64,editorial:60,simple:36,essay:28,shelf:20},I={SectionHeader:"accent",FAQ:"accent",FitmentFinder:"accent",FitmentTable:"accent",SpecTable:"accent",RelatedProducts:"accent",Collections:"accentNum"};function W(e){if(e==="SectionHeader")return{num:"num",title:"title",description:"description",link:!0};const t=T[e];if(!t)throw new Error(`section-head-looks: "${e}" has no head row in SPLITTABLE_SECTIONS`);return{num:t.num,title:t.title,description:t.description,link:t.headRows.includes("linkText")&&t.headRows.includes("linkHref")}}function U(e,t,n){const i=`editorial:${e}|${t}|${n}`,r=p.get(i);if(r)return r;const s=H({num:e,title:t,description:n,link:!1});return p.set(i,s),s}const h={top:0,right:0,bottom:1,left:0},a=(e,t,n,i)=>({sizeToken:{step:e,px:t,...i?{stepPhone:i}:{},...n?{pxPhone:n}:{}}}),P=(e,t,n,i)=>({sizeToken:{step:e,px:i,fluid:{minPx:t,vw:n}}}),l=(e,t,n={})=>_(e,{...a("label",t),...n}),A=(e,t)=>{const n=N(e).text.trim();return/\s/.test(n)?{minWidth:Math.ceil(n.length*t*.9),minWidthPhone:0,widthFitPhone:"fill"}:{}},c=(e,t)=>({kind:"text",key:e,role:"heading",props:k,style:{textStyle:"heading-2",...t}}),u=800,m=(e,t,n,i)=>({kind:"text",key:e,props:{...E,align:"right",alignPhone:"left",...n?{maxWidth:n,maxWidthPhone:u}:{}},style:{textStyle:"body-5",fontRole:"heading",alignPhone:"left",...a("body",t),...i}}),b={...B,align:"right",alignPhone:"left",...L,icon:"arrow-right",iconPosition:"after"},f=e=>({kind:"button",key:"linkText",href:"linkHref",variant:"ghost",props:b,style:{textStyle:"body-5",color:"labels",...a("label",e),letterSpacing:.2,case:"upper"}}),w=(e,t,n)=>{const i=n.role==="heading"?{tag:"h2"}:{};return{kind:"block",type:"Text",when:r=>r[e]===void 0,props:{...k,...i,...n.props,text:t,_partStyles:{text:{...n.role==="eyebrow"?C(O()):{},...n.style}}}}},C=e=>e._partStyles.text??{},d={widthFitPhone:"fill"};function F(e,t){const n=I[e],i=n==="accent",r=l(t.num,14,{color:i?"accent":"labels"}),s=n==="accentNum"&&r.kind==="text"?{...r,mark:"accentLead"}:r,S=c(t.title,i?{...P("headingMedium",36,5,64),case:"upper",lineHeight:.95,letterSpacing:-.025}:{...a("headingMedium",56,36),case:"none",lineHeight:1,letterSpacing:-.03}),g=e==="Collections";return{kind:"group",name:"Header",props:{...o,direction:"row",align:"end",justify:"between",gap:40,gapPhone:12,share:"content",sectionBorder:h,sectionPaddingBottom:24,sectionPaddingBottomPhone:20},parts:[{kind:"group",name:"Title",props:{...o,...d,direction:"row",align:"end",gap:40,gapPhone:12,share:"content"},parts:[{kind:"group",name:"Number",props:{...o,...d,align:"start",gap:12},parts:[{kind:"image",key:"logoSrc",alt:"logoAlt",props:{aspect:"auto",contained:!1}},s,...g?[w(t.num,"==01== / Collections",s)]:[]]},{kind:"group",name:"Heading",props:{...o,...d},parts:[S,...g?[w(t.title,`Three ranges,
2
- one standard.`,S)]:[]]}]},{kind:"group",name:"Words",props:{...o,...d,gap:12,maxWidth:340,maxWidthPhone:u},parts:[...t.description?[m(t.description,14,void 0,{lineHeight:1.5})]:[],...t.link?[f(14)]:[],...g?[{kind:"block",type:"ButtonBlock",props:{...b,variant:"ghost",label:"View all",href:"/wheels",_partStyles:{label:f(14).style}}}]:[]]}]}}function H(e){return{kind:"group",name:"Header",props:{...o,direction:"row",align:"end",justify:"between",gap:40,gapPhone:14,share:"content",sectionBorder:h,sectionPaddingBottom:32},parts:[{kind:"group",name:"Title",props:{...o,direction:"row",align:"end",gap:40,gapPhone:14,share:"content"},parts:[{kind:"group",name:"Number",props:t=>({...o,sectionPaddingBottom:8,...A(t[e.num],13)}),parts:[l(e.num,13)]},c(e.title,{...P("headingMedium",40,5.5,80),case:"upper",weight:500,lineHeight:1,letterSpacing:-.03})]},{kind:"group",name:"Words",props:{...o,sectionPaddingBottom:4,maxWidth:360,maxWidthPhone:u},parts:e.description?[m(e.description,14,void 0,{lineHeight:1.5})]:[]}]}}function x(e,t){return{kind:"group",name:"Header",props:{...o,gap:16,gapPhone:16},parts:[l(e.num,13),c(e.title,t)]}}const y=[["para",{textStyle:"body-5",...a("label",13),case:"upper",weight:400,lineHeight:1,letterSpacing:.22}],["sm",{...a("headingMedium",40,28),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["md",{...a("headingMedium",48,32),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["lg",{...a("headingMedium",56,36),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["xl",{...a("headingMedium",64,40),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}]],R=e=>y.some(([t])=>t===e.titleSize)?e.titleSize:"lg";function z(e){return{kind:"group",name:"Header",props:{...o,direction:"row",align:"center",justify:"between",gap:16,share:"content",stickTop:!0,sectionBorder:h,sectionPaddingTop:12,sectionPaddingBottom:12},parts:[{kind:"group",name:"Title",props:{...o,direction:"row",align:"end",gap:24,share:"content"},parts:[l(e.num,13,{color:"labels",letterSpacing:.22,lineHeight:1}),...y.map(([t,n])=>({...c(e.title,n),when:i=>R(i)===t}))]},{kind:"group",name:"Words",props:{...o,direction:"row",align:"center",justify:"end",gap:20,share:"content"},parts:[...e.description?[m(e.description,13,340,{lineHeight:1.4})]:[],...e.link?[f(13)]:[]]}]}}const p=new Map;function X(e){const t=p.get(e);if(t)return t;const n=W(e),i=M(e),r=i==="editorial"?H(n):i==="simple"?x(n,{...a("headingMedium",44,32),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02}):i==="essay"?x(n,{...a("headingMedium",38,28,"headingSmall"),case:"upper",lineHeight:1,letterSpacing:-.02}):i==="shelf"?z(n):F(e,n);return p.set(e,r),r}export{K as HEAD_BELOW,U as editorialHeadTree,P as fluidToken,M as headLookOf,X as headTree,a as token};
1
+ import{readHidable as N}from"efficient-easel/draw";import{SPLITTABLE_SECTIONS as T}from"../../../../../format/lib/sections/section-head-placement.js";import{BUTTON as B,DIM as E,INNER_BOX as o,SH_LINK as L,TEXT as P,smallText as _}from"./section-to-box-row-parts.js";import{labelTextSeed as O}from"../../../../../format/lib/document/text-seeds.js";import{token as a}from"../../../../../format/lib/document/seed-parts.js";function M(e){if(e==="ProductGrid")return"shelf";const t=T[e]?.headStyle;return t==="editorial"||t==="simple"||t==="essay"?t:"standard"}const U={standard:64,editorial:60,simple:36,essay:28,shelf:20},I={SectionHeader:"accent",FAQ:"accent",FitmentFinder:"accent",FitmentTable:"accent",SpecTable:"accent",RelatedProducts:"accent",Collections:"accentNum"};function W(e){if(e==="SectionHeader")return{num:"num",title:"title",description:"description",link:!0};const t=T[e];if(!t)throw new Error(`section-head-looks: "${e}" has no head row in SPLITTABLE_SECTIONS`);return{num:t.num,title:t.title,description:t.description,link:t.headRows.includes("linkText")&&t.headRows.includes("linkHref")}}function X(e,t,n){const i=`editorial:${e}|${t}|${n}`,r=p.get(i);if(r)return r;const s=H({num:e,title:t,description:n,link:!1});return p.set(i,s),s}const h={top:0,right:0,bottom:1,left:0};import{token as q}from"../../../../../format/lib/document/seed-parts.js";const k=(e,t,n,i)=>({sizeToken:{step:e,px:i,fluid:{minPx:t,vw:n}}}),l=(e,t,n={})=>_(e,{...a("label",t),...n}),A=(e,t)=>{const n=N(e).text.trim();return/\s/.test(n)?{minWidth:Math.ceil(n.length*t*.9),minWidthPhone:0,widthFitPhone:"fill"}:{}},c=(e,t)=>({kind:"text",key:e,role:"heading",props:P,style:{textStyle:"heading-2",...t}}),u=800,m=(e,t,n,i)=>({kind:"text",key:e,props:{...E,align:"right",alignPhone:"left",...n?{maxWidth:n,maxWidthPhone:u}:{}},style:{textStyle:"body-5",fontRole:"heading",alignPhone:"left",...a("body",t),...i}}),b={...B,align:"right",alignPhone:"left",...L,icon:"arrow-right",iconPosition:"after"},f=e=>({kind:"button",key:"linkText",href:"linkHref",variant:"ghost",props:b,style:{textStyle:"body-5",color:"labels",...a("label",e),letterSpacing:.2,case:"upper"}}),w=(e,t,n)=>{const i=n.role==="heading"?{tag:"h2"}:{};return{kind:"block",type:"Text",when:r=>r[e]===void 0,props:{...P,...i,...n.props,text:t,_partStyles:{text:{...n.role==="eyebrow"?C(O()):{},...n.style}}}}},C=e=>e._partStyles.text??{},d={widthFitPhone:"fill"};function F(e,t){const n=I[e],i=n==="accent",r=l(t.num,14,{color:i?"accent":"labels"}),s=n==="accentNum"&&r.kind==="text"?{...r,mark:"accentLead"}:r,S=c(t.title,i?{...k("headingMedium",36,5,64),case:"upper",lineHeight:.95,letterSpacing:-.025}:{...a("headingMedium",56,36),case:"none",lineHeight:1,letterSpacing:-.03}),g=e==="Collections";return{kind:"group",name:"Header",props:{...o,direction:"row",align:"end",justify:"between",gap:40,gapPhone:12,share:"content",sectionBorder:h,sectionPaddingBottom:24,sectionPaddingBottomPhone:20},parts:[{kind:"group",name:"Title",props:{...o,...d,direction:"row",align:"end",gap:40,gapPhone:12,share:"content"},parts:[{kind:"group",name:"Number",props:{...o,...d,align:"start",gap:12},parts:[{kind:"image",key:"logoSrc",alt:"logoAlt",props:{aspect:"auto",contained:!1}},s,...g?[w(t.num,"==01== / Collections",s)]:[]]},{kind:"group",name:"Heading",props:{...o,...d},parts:[S,...g?[w(t.title,`Three ranges,
2
+ one standard.`,S)]:[]]}]},{kind:"group",name:"Words",props:{...o,...d,gap:12,maxWidth:340,maxWidthPhone:u},parts:[...t.description?[m(t.description,14,void 0,{lineHeight:1.5})]:[],...t.link?[f(14)]:[],...g?[{kind:"block",type:"ButtonBlock",props:{...b,variant:"ghost",label:"View all",href:"/wheels",_partStyles:{label:f(14).style}}}]:[]]}]}}function H(e){return{kind:"group",name:"Header",props:{...o,direction:"row",align:"end",justify:"between",gap:40,gapPhone:14,share:"content",sectionBorder:h,sectionPaddingBottom:32},parts:[{kind:"group",name:"Title",props:{...o,direction:"row",align:"end",gap:40,gapPhone:14,share:"content"},parts:[{kind:"group",name:"Number",props:t=>({...o,sectionPaddingBottom:8,...A(t[e.num],13)}),parts:[l(e.num,13)]},c(e.title,{...k("headingMedium",40,5.5,80),case:"upper",weight:500,lineHeight:1,letterSpacing:-.03})]},{kind:"group",name:"Words",props:{...o,sectionPaddingBottom:4,maxWidth:360,maxWidthPhone:u},parts:e.description?[m(e.description,14,void 0,{lineHeight:1.5})]:[]}]}}function x(e,t){return{kind:"group",name:"Header",props:{...o,gap:16,gapPhone:16},parts:[l(e.num,13),c(e.title,t)]}}const y=[["para",{textStyle:"body-5",...a("label",13),case:"upper",weight:400,lineHeight:1,letterSpacing:.22}],["sm",{...a("headingMedium",40,28),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["md",{...a("headingMedium",48,32),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["lg",{...a("headingMedium",56,36),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["xl",{...a("headingMedium",64,40),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}]],R=e=>y.some(([t])=>t===e.titleSize)?e.titleSize:"lg";function j(e){return{kind:"group",name:"Header",props:{...o,direction:"row",align:"center",justify:"between",gap:16,share:"content",stickTop:!0,sectionBorder:h,sectionPaddingTop:12,sectionPaddingBottom:12},parts:[{kind:"group",name:"Title",props:{...o,direction:"row",align:"end",gap:24,share:"content"},parts:[l(e.num,13,{color:"labels",letterSpacing:.22,lineHeight:1}),...y.map(([t,n])=>({...c(e.title,n),when:i=>R(i)===t}))]},{kind:"group",name:"Words",props:{...o,direction:"row",align:"center",justify:"end",gap:20,share:"content"},parts:[...e.description?[m(e.description,13,340,{lineHeight:1.4})]:[],...e.link?[f(13)]:[]]}]}}const p=new Map;function G(e){const t=p.get(e);if(t)return t;const n=W(e),i=M(e),r=i==="editorial"?H(n):i==="simple"?x(n,{...a("headingMedium",44,32),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02}):i==="essay"?x(n,{...a("headingMedium",38,28,"headingSmall"),case:"upper",lineHeight:1,letterSpacing:-.02}):i==="shelf"?j(n):F(e,n);return p.set(e,r),r}export{U as HEAD_BELOW,X as editorialHeadTree,k as fluidToken,M as headLookOf,G as headTree,q as token};
@@ -1,13 +1,10 @@
1
1
  import { SECTION_PAD_INNER_DEFAULTS } from "../../passes/section-padding.js";
2
2
  import { type BoxEntry, type ConvertContext, type OwnProps, type PartRow, type SiteWrite } from "../../../sections/section-to-box.js";
3
3
  type Props = Record<string, unknown>;
4
- export declare const TEXT: Props;
4
+ export { BOX, DIM, INNER_BOX, TEXT } from "../../../../../format/lib/document/seed-parts.js";
5
5
  export declare const NUMBER_TEXT: Props;
6
- export declare const DIM: Props;
7
6
  export declare const BUTTON: Props;
8
7
  export declare const SH_LINK: Props;
9
- export declare const BOX: Props;
10
- export declare const INNER_BOX: Props;
11
8
  export declare const SECTION_BOX: Props;
12
9
  export declare const SAME_KEYS: readonly BoxEntry[];
13
10
  export declare const DROP_COMMON: Readonly<Record<string, string>>;
@@ -50,4 +47,3 @@ export declare const lineSides: (sides: {
50
47
  left?: number;
51
48
  }) => Props;
52
49
  export declare const pictureCell: (name: string, key: string, props: OwnProps, parts?: readonly PartRow[]) => PartRow;
53
- export {};
@@ -1 +1 @@
1
- import{phoneKey as b}from"efficient-easel/draw";import{ENTRANCE_KEYS as f}from"../../../animation/entrance.js";import{COUNT_KEY_PROP as x}from"../../../../../format/lib/content/block-sources.js";import{NESTED_BOX_PADDING as T}from"../../../../../format/lib/content/box-layout.js";import{normalizeSiteGutter as B}from"../../../../../format/lib/content/page-width.js";import{resolveSectionPadding as _}from"../../../content/section-padding.js";import{ButtonBlockMeta as E}from"../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";import{TextMeta as S}from"../../../../../format/lib/document/blocks/general/Text/meta.js";import{SECTION_PAD_INNER_DEFAULTS as O}from"../../passes/section-padding.js";import{finiteNumber as s}from"../../../../../format/lib/finite-number.js";import{convertTheme as a,hasWords as N}from"../../../sections/section-to-box.js";import{bandPresetIndex as A}from"../../../../../format/lib/theme.js";const{text:z,tag:q,...D}=S.defaultProps,p=D,y={...p,[x]:""},Q={...p,tone:"dim"},{label:Z,href:tt,...I}=E.defaultProps,ot=I,et={buttonFillOpacity:0,buttonBorder:{width:0},buttonPaddingTop:0,buttonPaddingRight:0,buttonPaddingBottom:0,buttonPaddingLeft:0},h={justify:"start",align:"stretch",wrap:!1,blockSpacing:"gap",padV2:!0},R={...h,direction:"column",...T},nt={...h,sectionAccent:0},it=["gridSpan","sectionHeightMode","sectionHeightValue","sectionHeightUnit","sectionHeightModePhone","sectionHeightValuePhone","sectionHeightUnitPhone","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderPhone","sectionAccent","stickTop","stickTopDistance","stickTopPhone","stickTopDistancePhone","anchor","sectionAnimation","_hidden",...Object.values(f).flatMap(t=>[t,b(t)]),"widthFit","widthFitPhone","width","widthPhone","minWidth","minWidthPhone","maxWidth","maxWidthPhone"],r="a section width key, ignored since efficient-web-builder 45 (every section, and a section's root Box, follows Site styles only; Lewis 2026-10-29), so dropping it changes nothing",dt={sectionSurface:"read by nothing in src/ (searched 2026-10-24): a retired theme key that draws nothing today, so dropping it changes nothing",widthMode:r,fullWidth:r,pageWidth:r,backgroundWidth:r,contentWidth:r,contentMax:r},st=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 k(t,o){const e=s(t.sectionPaddingTop)??0,n=s(t.sectionPaddingBottom)??0,i=s(t.sectionPaddingTopTablet),d=s(t.sectionPaddingBottomTablet);return{sectionPaddingTop:e+o.top,sectionPaddingBottom:n+o.bottom,...i===void 0?{}:{sectionPaddingTopTablet:i+o.top},...d===void 0?{}:{sectionPaddingBottomTablet:d+o.bottom},sectionPaddingTopPhone:(s(t.sectionPaddingTopPhone)??i??e)+o.topPhone,sectionPaddingBottomPhone:(s(t.sectionPaddingBottomPhone)??d??n)+o.bottomPhone}}const rt=t=>["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopTablet","sectionPaddingBottomTablet","sectionPaddingTopPhone","sectionPaddingBottomPhone"].map(o=>[o,o,(e,n)=>k(n,typeof t=="function"?t(n):t)[o]]);function c(t,o){const e=_(t,O[o]);return{sectionPaddingTop:e.top,sectionPaddingBottom:e.bottom}}const ct=t=>[["padTop","sectionPaddingTop",(o,e)=>c(e,t).sectionPaddingTop],["padBottom","sectionPaddingBottom",(o,e)=>c(e,t).sectionPaddingBottom],["sectionPaddingTop","sectionPaddingTop",(o,e)=>c(e,t).sectionPaddingTop],["sectionPaddingBottom","sectionPaddingBottom",(o,e)=>c(e,t).sectionPaddingBottom]],v={kind:"heading-case-upper",styles:["heading-1","heading-2","heading-3"]},at=t=>o=>N(o.props[t])?[v]:[],pt=(t,o)=>({kind:"text",key:t,role:"eyebrow",props:p,...o?{style:o}:{}}),m=t=>t.background!=="transparent",w=(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"},C=(t,o,e)=>{const n=i=>w(i[t],i[o]);return{kind:"block",type:"Text",when:(i,d)=>d!==void 0&&n(d)!=="",box:[[t,"text",(i,d)=>n(d)],[o,"text",(i,d)=>n(d)]],props:e}},gt=(t,o,e,n={})=>C(t,o,{...y,...l,...n,_partStyles:{text:{textStyle:"body-5",color:"labels",...e,case:"upper",...l}}}),g=(t,o)=>typeof t=="number"&&Number.isInteger(t)&&t>=0?t:a(o)?.selected??0,u=(t,o)=>a(o)?.themes[g(t.sectionAccent??0,o)],M=t=>(o,e)=>{const n=u(o,e)?.[t];return n?{fillColor:n}:{}},Pt=(t,o)=>{const e=u(t,o)?.line;return e?{buttonBorder:{width:1,color:e}}:{}},P=(t,o)=>{const e=a(o)?.themes;return e&&m(t)?A(e,g(t.sectionAccent,o)):-1},ht=(t,o,e)=>{const n=P(o,e);return n>=0?n:t},mt=(t,o)=>{const e=P(t,o);return e>=0?{sectionAccent:e}:{}},lt=(t,o)=>m(t.props)&&P(t.props,o)<0?[{kind:"band-preset",page:g(t.props.sectionAccent,o)}]:[],ut=t=>B(t.site?.siteGutter),W=Object.fromEntries(["Top","Right","Bottom","Left","TopPhone","RightPhone","BottomPhone","LeftPhone"].map(t=>[`sectionPadding${t}`,0])),bt=t=>({top:0,right:0,bottom:0,left:0,...t}),ft=(t,o,e,n=[])=>({kind:"group",name:t,keepEmpty:!0,props:(i,d)=>({...R,...W,...M("surface")(i,d),...typeof e=="function"?e(i,d):e}),box:[[o,"bgImage"]],parts:n});export{h as BOX,ot as BUTTON,Q as DIM,dt as DROP_COMMON,st as DROP_SIDE_PADDING,v as HEADING_CASE_UPPER,R as INNER_BOX,W as NO_PAD,y as NUMBER_TEXT,l as RIGHT_WORDS,it as SAME_KEYS,nt as SECTION_BOX,et as SH_LINK,p as TEXT,ht as bandAccent,P as bandIndex,g as bandPage,mt as bandProps,lt as bandWrites,M as fillFrom,at as headingCaseOf,c as innerPad,ct as innerPadKeys,gt as leadLine,C as leadText,Pt as lineBorder,bt as lineSides,w as numberAndUnit,ft as pictureCell,u as sectionPage,ut as siteGutterOf,pt as smallText,k as wrapperPad,rt as wrapperPadKeys};
1
+ import{phoneKey as b}from"efficient-easel/draw";import{BOX as u,INNER_BOX as T,TEXT as P}from"../../../../../format/lib/document/seed-parts.js";import{ENTRANCE_KEYS as f}from"../../../animation/entrance.js";import{COUNT_KEY_PROP as x}from"../../../../../format/lib/content/block-sources.js";import{normalizeSiteGutter as B}from"../../../../../format/lib/content/page-width.js";import{resolveSectionPadding as _}from"../../../content/section-padding.js";import{ButtonBlockMeta as E}from"../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";import{SECTION_PAD_INNER_DEFAULTS as O}from"../../passes/section-padding.js";import{finiteNumber as s}from"../../../../../format/lib/finite-number.js";import{convertTheme as a,hasWords as N}from"../../../sections/section-to-box.js";import{bandPresetIndex as S}from"../../../../../format/lib/theme.js";import{BOX as mt,DIM as lt,INNER_BOX as bt,TEXT as ut}from"../../../../../format/lib/document/seed-parts.js";const A={...P,[x]:""},{label:j,href:Y,...I}=E.defaultProps,J=I,V={buttonFillOpacity:0,buttonBorder:{width:0},buttonPaddingTop:0,buttonPaddingRight:0,buttonPaddingBottom:0,buttonPaddingLeft:0},z={...u,sectionAccent:0},q=["gridSpan","sectionHeightMode","sectionHeightValue","sectionHeightUnit","sectionHeightModePhone","sectionHeightValuePhone","sectionHeightUnitPhone","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderPhone","sectionAccent","stickTop","stickTopDistance","stickTopPhone","stickTopDistancePhone","anchor","sectionAnimation","_hidden",...Object.values(f).flatMap(t=>[t,b(t)]),"widthFit","widthFitPhone","width","widthPhone","minWidth","minWidthPhone","maxWidth","maxWidthPhone"],r="a section width key, ignored since efficient-web-builder 45 (every section, and a section's root Box, follows Site styles only; Lewis 2026-10-29), so dropping it changes nothing",Q={sectionSurface:"read by nothing in src/ (searched 2026-10-24): a retired theme key that draws nothing today, so dropping it changes nothing",widthMode:r,fullWidth:r,pageWidth:r,backgroundWidth:r,contentWidth:r,contentMax:r},Z=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 R(t,o){const e=s(t.sectionPaddingTop)??0,n=s(t.sectionPaddingBottom)??0,i=s(t.sectionPaddingTopTablet),d=s(t.sectionPaddingBottomTablet);return{sectionPaddingTop:e+o.top,sectionPaddingBottom:n+o.bottom,...i===void 0?{}:{sectionPaddingTopTablet:i+o.top},...d===void 0?{}:{sectionPaddingBottomTablet:d+o.bottom},sectionPaddingTopPhone:(s(t.sectionPaddingTopPhone)??i??e)+o.topPhone,sectionPaddingBottomPhone:(s(t.sectionPaddingBottomPhone)??d??n)+o.bottomPhone}}const tt=t=>["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopTablet","sectionPaddingBottomTablet","sectionPaddingTopPhone","sectionPaddingBottomPhone"].map(o=>[o,o,(e,n)=>R(n,typeof t=="function"?t(n):t)[o]]);function c(t,o){const e=_(t,O[o]);return{sectionPaddingTop:e.top,sectionPaddingBottom:e.bottom}}const ot=t=>[["padTop","sectionPaddingTop",(o,e)=>c(e,t).sectionPaddingTop],["padBottom","sectionPaddingBottom",(o,e)=>c(e,t).sectionPaddingBottom],["sectionPaddingTop","sectionPaddingTop",(o,e)=>c(e,t).sectionPaddingTop],["sectionPaddingBottom","sectionPaddingBottom",(o,e)=>c(e,t).sectionPaddingBottom]],y={kind:"heading-case-upper",styles:["heading-1","heading-2","heading-3"]},et=t=>o=>N(o.props[t])?[y]:[],nt=(t,o)=>({kind:"text",key:t,role:"eyebrow",props:P,...o?{style:o}:{}}),h=t=>t.background!=="transparent",D=(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},m={align:"right",alignPhone:"left"},k=(t,o,e)=>{const n=i=>D(i[t],i[o]);return{kind:"block",type:"Text",when:(i,d)=>d!==void 0&&n(d)!=="",box:[[t,"text",(i,d)=>n(d)],[o,"text",(i,d)=>n(d)]],props:e}},it=(t,o,e,n={})=>k(t,o,{...A,...m,...n,_partStyles:{text:{textStyle:"body-5",color:"labels",...e,case:"upper",...m}}}),p=(t,o)=>typeof t=="number"&&Number.isInteger(t)&&t>=0?t:a(o)?.selected??0,l=(t,o)=>a(o)?.themes[p(t.sectionAccent??0,o)],v=t=>(o,e)=>{const n=l(o,e)?.[t];return n?{fillColor:n}:{}},dt=(t,o)=>{const e=l(t,o)?.line;return e?{buttonBorder:{width:1,color:e}}:{}},g=(t,o)=>{const e=a(o)?.themes;return e&&h(t)?S(e,p(t.sectionAccent,o)):-1},st=(t,o,e)=>{const n=g(o,e);return n>=0?n:t},rt=(t,o)=>{const e=g(t,o);return e>=0?{sectionAccent:e}:{}},ct=(t,o)=>h(t.props)&&g(t.props,o)<0?[{kind:"band-preset",page:p(t.props.sectionAccent,o)}]:[],at=t=>B(t.site?.siteGutter),C=Object.fromEntries(["Top","Right","Bottom","Left","TopPhone","RightPhone","BottomPhone","LeftPhone"].map(t=>[`sectionPadding${t}`,0])),pt=t=>({top:0,right:0,bottom:0,left:0,...t}),gt=(t,o,e,n=[])=>({kind:"group",name:t,keepEmpty:!0,props:(i,d)=>({...T,...C,...v("surface")(i,d),...typeof e=="function"?e(i,d):e}),box:[[o,"bgImage"]],parts:n});export{mt as BOX,J as BUTTON,lt as DIM,Q as DROP_COMMON,Z as DROP_SIDE_PADDING,y as HEADING_CASE_UPPER,bt as INNER_BOX,C as NO_PAD,A as NUMBER_TEXT,m as RIGHT_WORDS,q as SAME_KEYS,z as SECTION_BOX,V as SH_LINK,ut as TEXT,st as bandAccent,g as bandIndex,p as bandPage,rt as bandProps,ct as bandWrites,v as fillFrom,et as headingCaseOf,c as innerPad,ot as innerPadKeys,it as leadLine,k as leadText,dt as lineBorder,pt as lineSides,D as numberAndUnit,gt as pictureCell,l as sectionPage,at as siteGutterOf,nt as smallText,R as wrapperPad,tt as wrapperPadKeys};
@@ -1 +1 @@
1
- import{phoneKey as W,readHidable as k}from"efficient-easel/draw";import{parseHexColor as M}from"efficient-shell/format";import{cardColumns as G}from"../../../../components/Cards.js";import{resolveSectionBackground as X,THEME_SECTION_BG as x}from"../../../../../format/lib/content/section-background.js";import{CardsMeta as J}from"../../../../../format/lib/document/blocks/general/Cards/meta.js";import{KeyFeaturesMeta as q}from"../../../../../format/lib/document/blocks/general/KeyFeatures/meta.js";import{finiteNumber as S}from"../../../../../format/lib/finite-number.js";import{parseSectionHeadPlacement as U}from"../../../../../format/lib/sections/section-head-placement.js";import{hasWords as d}from"../../../sections/section-to-box.js";import{labelTextSeed as V}from"../../../../../format/lib/document/text-seeds.js";import{bandAccent as j,bandProps as z,bandWrites as Y,BUTTON as Q,DIM as p,DROP_COMMON as l,DROP_SIDE_PADDING as c,INNER_BOX as t,leadText as Z,SAME_KEYS as h,SECTION_BOX as g,fillFrom as i,SH_LINK as $,TEXT as a,smallText as m,wrapperPad as w,wrapperPadKeys as u}from"./section-to-box-row-parts.js";import{headTree as _,token as s}from"./section-head-looks.js";import{SECTION_BG_BUILT_IN as ee}from"../../../../../format/lib/document/blocks/general/section-bg-built-in.js";const r=(e,o,n,y)=>({sectionBorder:{top:e,right:o,bottom:n,left:y}}),R=(e,o=e)=>({sectionPaddingTop:e,sectionPaddingRight:e,sectionPaddingBottom:e,sectionPaddingLeft:e,sectionPaddingTopPhone:o,sectionPaddingRightPhone:o,sectionPaddingBottomPhone:o,sectionPaddingLeftPhone:o}),O=e=>o=>G(S(o.columns)??S(e.columns)),T=e=>({kind:"group",name:"Grid",props:{...t,gap:0,...r(1,0,0,1)},parts:[e]}),b={...t,direction:"row",gap:0,share:"equal"},C="its head sits in a Box of its own above it (own-box): the row draws the head inline",N=e=>U(e.headPlacement)==="own-box",L="inline is the head the row draws; an own-box node is skipped (`skip`)",oe=e=>({kind:"group",name:"Heading",props:e,parts:[m("eyebrow"),{kind:"text",key:"title",role:"heading",props:a,style:{textStyle:"heading-3",case:"upper"},was:{size:44}}]}),B={top:72,bottom:72,topPhone:72,bottomPhone:72},te={...t,gap:12,gapPhone:12,...R(32,28),...r(0,1,1,0)},ne={name:"Cards",boxProps:(e,o)=>({...g,direction:"column",gap:36,gapPhone:28,...i("surface")(e,o),...w(e,B)}),box:[...h,...u(B)],skip:e=>N(e)?C:typeof e.dataSource=="string"&&e.dataSource?"its cards come from a source: a data list, which waits for the card template on Cards":e.cardStyle==="label-only"?"Label only is Key Features' look: no live node holds it, so it has no row of its own yet":void 0,parts:[_("Cards"),T({kind:"list",key:"items",name:"Card",perRow:O(J.defaultProps),rowName:"Row",rowProps:b,props:(e,o)=>({...te,...i("background")(e,o)}),parts:[{kind:"text",key:"title",props:a,style:{textStyle:"heading-3",...s("headingSmall",20),weight:500,case:"upper",lineHeight:1.5,letterSpacing:.02}},{kind:"text",key:"body",props:p,style:{textStyle:"body-1",...s("body",15),lineHeight:1.6}}]})],drop:{...l,...c,columns:"the rows of N: one Row Box per `columns` cards, which the Box draws as N equal blocks",cardStyle:"the standard card is what the row draws; a Label only node is skipped (0 live nodes)",dataSource:"an empty source is typed cards, what the row draws; a sourced node is skipped (0 live nodes)",dataSourceOptions:"read only with a source; a sourced node is skipped (0 live nodes)",headPlacement:L,eyebrowLook:"needs the eyebrow's Filled look on a Text block: Plain is the eyebrow start look the row draws; 2 of 62 live nodes store it (JJ's export, 2026-10-24)"}},E={top:76,bottom:76,topPhone:76,bottomPhone:76},se={...t,direction:"row",align:"center",gap:16,sectionPaddingTop:32,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,...r(0,1,1,0)},F={textStyle:"body-1",color:"text"},H=(e,o)=>typeof o?.href=="string"&&o.href.trim()!=="",re={name:"Key Features",boxProps:e=>({...g,direction:"column",gap:44,...r(1,0,1,0),...w(e,E)}),box:[...h,...u(E)],parts:[oe({...t,direction:"row",align:"end",gap:20,wrap:!0,share:"content"}),T({kind:"list",key:"items",name:"Feature",perRow:O(q.defaultProps),rowName:"Row",rowProps:b,props:se,parts:[{kind:"button",key:"label",href:"href",when:H,variant:"ghost",props:{...Q,...$,icon:"none"},style:F},{kind:"text",key:"label",when:(e,o)=>!H(e,o),props:a,style:F,was:{size:17}}]})],drop:{...l,...c,columns:"the rows of N: one Row Box per `columns` cells, which the Box draws as N equal blocks",eyebrowLook:"needs the eyebrow's Filled look on a Text block: Filled is Key Features' own default (lib/sections/section-eyebrow-look), so 20 of 21 published nodes draw it with nothing stored; the row draws the Plain start look (JJ's export, 2026-10-24)"}},D={top:120,bottom:120,topPhone:80,bottomPhone:80},P=e=>{const o=X(typeof e.background=="string"?e.background:void 0,ee.Series);return o&&o!=="transparent"?o:void 0},f=e=>P(e)===x,ie=(e,o)=>{const n=P(e);return!n||n===x?{}:n==="var(--site-surface)"?i("surface")(e,o):M(n.trim())?{fillColor:n.trim()}:{}},v=e=>{const o=P(e)?1:2;return{gap:o,gapPhone:o}},ae={...t,justify:"between",gap:16,gapPhone:16,sectionHeightMode:"fixed",sectionHeightValue:340,sectionHeightUnit:"px",sectionPaddingTop:36,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,sectionPaddingTopPhone:36,sectionPaddingRightPhone:28,sectionPaddingBottomPhone:32,sectionPaddingLeftPhone:28},I={...t,direction:"row",justify:"between",gap:12,share:"content",phoneRow:2,[W("share")]:"content"},A={textStyle:"body-5",...s("label",12),letterSpacing:.22,case:"upper",lineHeight:1.5},de=e=>d(e.viewLabel)&&!k(e.viewLabel).hidden,pe={name:"Recurring Columns",boxProps:(e,o)=>({...g,direction:"column",gap:60,gapPhone:60,...r(0,0,1,0),...f(e)?z(e,o):{},...ie(e,o),...w(e,D)}),box:[...h.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,o,n)=>f(o)?j(e,o,n):e],...u(D)],skip:e=>N(e)?C:void 0,site:(e,o)=>f(e.props)?Y(e,o):[],parts:[_("Series"),{kind:"group",name:"Grid",props:(e,o)=>({...t,...v(e),...P(e)?{}:i("background")(e,o)}),parts:[{kind:"list",key:"cards",name:"Column",perRow:()=>4,rowName:"Row",rowProps:e=>({...b,...v(e)}),rowFiller:t,props:(e,o)=>({...ae,...i("background")(e,o)}),parts:[{kind:"group",name:"Words",props:{...t,gap:16,gapPhone:16},parts:[{kind:"group",name:"Top",props:I,parts:[m("num",s("label",13)),m("since",s("label",13))]},{kind:"text",key:"title",props:{...a,tag:"h3"},style:{textStyle:"heading-3",...s("headingSmall",28),weight:500,case:"upper",lineHeight:1.04,letterSpacing:-.02}},{kind:"text",key:"desc",props:p,style:{textStyle:"body-5",fontRole:"heading",...s("body",14),lineHeight:1.6}}]},{kind:"group",name:"Footer",when:(e,o)=>d(o?.entries)||d(o?.entriesLabel)||de(e),props:{...I,align:"center",gap:0,gapPhone:0,sectionPaddingTop:16,sectionPaddingTopPhone:16,...r(1,0,0,0)},parts:[Z("entries","entriesLabel",{...p,_partStyles:{text:A}}),{kind:"group",name:"View",props:{...t,maxWidthPhone:266},parts:[{kind:"block",type:"Text",when:e=>d(e.viewLabel),props:e=>{const o=k(e.viewLabel),n=V()._partStyles,y=e._partStyles?.viewLabel;return{...a,text:o.text,_partStyles:{text:{...n.text,...A,...y}},...o.hidden?{_hidden:!0}:{}}}}]}]}]}]}],reads:{viewLabel:"a Text at the far end of every card's footer",background:"the Box's theme (the band preset) or its Fill; the grid's gap"},drop:{...l,...c,headPlacement:L}},K={top:60,bottom:60,topPhone:40,bottomPhone:40},le={...t,gap:8,gapPhone:8,...R(24),...r(1,1,1,1)},ce={name:"Document Detail Cards",boxProps:e=>({...g,direction:"column",gap:40,gapPhone:16,...r(0,0,1,0),...w(e,K)}),box:[...h,...u(K)],parts:[{kind:"list",key:"cards",name:"Card",perRow:()=>3,rowName:"Row",rowProps:{...b,gap:40,gapPhone:16},props:(e,o)=>({...le,...i("surface")(e,o)}),parts:[m("label",{...s("label",12),lineHeight:1.5}),{kind:"group",name:"Words",props:{...t,gap:14,gapPhone:14},parts:[{kind:"text",key:"value",props:a,style:{textStyle:"heading-3",...s("headingSmall",20),weight:500,letterSpacing:-.015,lineHeight:1.5}},{kind:"text",key:"desc",props:p,style:{textStyle:"body-5",fontRole:"accent",...s("body",14),italic:!0,lineHeight:1.5}}]}]}],drop:{...l,...c}},Re={Cards:ne,KeyFeatures:re,Series:pe,DocMetaCards:ce};export{Re as CARDS_SECTION_TO_BOX};
1
+ import{phoneKey as M,readHidable as f}from"efficient-easel/draw";import{parseHexColor as X}from"efficient-shell/format";import{cardColumns as j}from"../../../../components/Cards.js";import{resolveSectionBackground as G,THEME_SECTION_BG as S}from"../../../../../format/lib/content/section-background.js";import{CardsMeta as J}from"../../../../../format/lib/document/blocks/general/Cards/meta.js";import{KeyFeaturesMeta as q}from"../../../../../format/lib/document/blocks/general/KeyFeatures/meta.js";import{finiteNumber as x}from"../../../../../format/lib/finite-number.js";import{nonEmptyString as U}from"../../../../../format/lib/non-empty-string.js";import{parseSectionHeadPlacement as V}from"../../../../../format/lib/sections/section-head-placement.js";import{hasWords as Y}from"../../../sections/section-to-box.js";import{BOX_TYPE as l,CONTAINER_BLOCKS_SLOT as p}from"../../../../../format/lib/document/container-blocks.js";import{labelTextSeed as z}from"../../../../../format/lib/document/text-seeds.js";import{CARDS_BODY_LOOK as Q,CARDS_CARD as Z,CARDS_TITLE_LOOK as $,rowFieldTextSeed as a}from"../../../../../format/lib/document/blocks/general/Cards/card-seed.js";import{bandAccent as ee,bandProps as oe,bandWrites as te,BUTTON as re,DIM as h,DROP_COMMON as m,DROP_SIDE_PADDING as g,INNER_BOX as t,SAME_KEYS as w,SECTION_BOX as u,fillFrom as c,SH_LINK as ne,TEXT as n,smallText as se,wrapperPad as y,wrapperPadKeys as b}from"./section-to-box-row-parts.js";import{headTree as k,token as i}from"./section-head-looks.js";import{boxPadding as ae}from"../../../../../format/lib/document/seed-parts.js";import{SECTION_BG_BUILT_IN as ie}from"../../../../../format/lib/document/blocks/general/section-bg-built-in.js";const d=(e,o,r,W)=>({sectionBorder:{top:e,right:o,bottom:r,left:W}}),O=e=>o=>j(x(o.columns)??x(e.columns)),_=e=>({kind:"group",name:"Grid",props:{...t,gap:0,...d(1,0,0,1)},parts:[e]}),C={...t,direction:"row",gap:0,share:"equal"},R="its head sits in a Box of its own above it (own-box): the row draws the head inline",T=e=>V(e.headPlacement)==="own-box",E="inline is the head the row draws; an own-box node is skipped (`skip`)",de=e=>({kind:"group",name:"Heading",props:e,parts:[se("eyebrow"),{kind:"text",key:"title",role:"heading",props:n,style:{textStyle:"heading-3",case:"upper"},was:{size:44}}]}),B={top:72,bottom:72,topPhone:72,bottomPhone:72},le={...Z,...d(0,1,1,0)},pe={name:"Cards",boxProps:(e,o)=>({...u,direction:"column",gap:36,gapPhone:28,...c("surface")(e,o),...y(e,B)}),box:[...w,...b(B)],skip:e=>T(e)?R:typeof e.dataSource=="string"&&e.dataSource?"its cards come from a source: they are drawn from the card template on Cards":e.template!==void 0?"its cards are drawn from its own card template (an emptied one draws none): the shape the other rows land on":e.cardStyle==="label-only"?"Label only is Key Features' look: no live node holds it, so it has no row of its own yet":void 0,parts:[k("Cards"),_({kind:"list",key:"items",name:"Card",perRow:O(J.defaultProps),rowName:"Row",rowProps:C,props:(e,o)=>({...le,...c("background")(e,o)}),parts:[{kind:"text",key:"title",props:n,style:$},{kind:"text",key:"body",props:h,style:Q}]})],drop:{...m,...g,columns:"the rows of N: one Row Box per `columns` cards, which the Box draws as N equal blocks",cardStyle:"the standard card is what the row draws; a Label only node is skipped (0 live nodes)",dataSource:"an empty source is typed cards, what the row draws; a sourced node is skipped (0 live nodes)",dataSourceOptions:"read only with a source; a sourced node is skipped (0 live nodes)",template:"an empty card template is typed cards, what the row draws; a node with a template is skipped",highlightedCard:"read only with a card template; a node with a template is skipped",highlightBadge:"read only with a card template; a node with a template is skipped",headPlacement:E,eyebrowLook:"needs the eyebrow's Filled look on a Text block: Plain is the eyebrow start look the row draws; 2 of 62 live nodes store it (JJ's export, 2026-10-24)"}},N={top:76,bottom:76,topPhone:76,bottomPhone:76},ce={...t,direction:"row",align:"center",gap:16,sectionPaddingTop:32,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,...d(0,1,1,0)},L={textStyle:"body-1",color:"text"},A=(e,o)=>typeof o?.href=="string"&&o.href.trim()!=="",he={name:"Key Features",boxProps:e=>({...u,direction:"column",gap:44,...d(1,0,1,0),...y(e,N)}),box:[...w,...b(N)],parts:[de({...t,direction:"row",align:"end",gap:20,wrap:!0,share:"content"}),_({kind:"list",key:"items",name:"Feature",perRow:O(q.defaultProps),rowName:"Row",rowProps:C,props:ce,parts:[{kind:"button",key:"label",href:"href",when:A,variant:"ghost",props:{...re,...ne,icon:"none"},style:L},{kind:"text",key:"label",when:(e,o)=>!A(e,o),props:n,style:L,was:{size:17}}]})],drop:{...m,...g,columns:"the rows of N: one Row Box per `columns` cells, which the Box draws as N equal blocks",eyebrowLook:"needs the eyebrow's Filled look on a Text block: Filled is Key Features' own default (lib/sections/section-eyebrow-look), so 20 of 21 published nodes draw it with nothing stored; the row draws the Plain start look (JJ's export, 2026-10-24)"}},D={top:120,bottom:120,topPhone:80,bottomPhone:80},F=e=>{const o=G(typeof e.background=="string"?e.background:void 0,ie.Series);return o&&o!=="transparent"?o:void 0},P=e=>F(e)===S,me=(e,o)=>{const r=F(e);return!r||r===S?{}:r==="var(--site-surface)"?c("surface")(e,o):X(r.trim())?{fillColor:r.trim()}:{}},ge={...t,justify:"between",gap:16,gapPhone:16,sectionHeightMode:"fixed",sectionHeightValue:340,sectionHeightUnit:"px",sectionPaddingTop:36,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,sectionPaddingTopPhone:36,sectionPaddingRightPhone:28,sectionPaddingBottomPhone:32,sectionPaddingLeftPhone:28},I={...t,direction:"row",justify:"between",gap:12,share:"content",phoneRow:2,[M("share")]:"content"},v={textStyle:"body-5",...i("label",12),letterSpacing:.22,case:"upper",lineHeight:1.5},we=e=>Y(e.viewLabel)&&!f(e.viewLabel).hidden,s=e=>f(e).text?.trim?.()??"",H=e=>Object.fromEntries(Object.entries(e).filter(([,o])=>U(o)!==void 0)),ue={name:"Recurring Columns",boxProps:(e,o)=>({...u,direction:"column",gap:60,gapPhone:60,...d(0,0,1,0),...P(e)?oe(e,o):{},...me(e,o),...y(e,D)}),box:[...w.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,o,r)=>P(o)?ee(e,o,r):e],...b(D)],skip:e=>T(e)?R:void 0,site:(e,o)=>P(e.props)?te(e,o):[],parts:[k("Series"),{kind:"core",as:"Cards",keep:[],props:{columns:4},derive:{reads:["cards"],props:e=>({items:(Array.isArray(e.cards)?e.cards:[]).map(o=>H({num:s(o.num),since:s(o.since),title:s(o.title),body:s(o.desc),count:[s(o.entries),s(o.entriesLabel)].filter(Boolean).join(" ")}))})},slots:(e,o)=>({template:[{type:l,props:{...ge,...c("background")(e,o),name:"Card"},slots:{[p]:[{type:l,props:{...t,name:"Words",gap:16,gapPhone:16},slots:{[p]:[{type:l,props:{...I,name:"Top"},slots:{[p]:[a("num",n,i("label",13),!0),a("since",n,i("label",13),!0)]}},a("title",{...n,tag:"h3"},{textStyle:"heading-3",...i("headingSmall",28),weight:500,case:"upper",lineHeight:1.04,letterSpacing:-.02}),a("body",h,{textStyle:"body-5",fontRole:"heading",...i("body",14),lineHeight:1.6})]}},{type:l,props:{...I,name:"Footer",align:"center",gap:0,gapPhone:0,sectionPaddingTop:16,sectionPaddingTopPhone:16,...d(1,0,0,0)},slots:{[p]:[a("count",h,v),...we(e)?[{type:l,props:{...t,name:"View",maxWidthPhone:266},slots:{[p]:[{type:"Text",props:{...n,text:f(e.viewLabel).text,_partStyles:{text:{...z()._partStyles.text,...v}}}}]}}]:[]]}}]}}]})}],reads:{viewLabel:"a Text typed once in the card template: the far end of every card's footer",background:"the Box's theme (the band preset) or its Fill"},drop:{...m,...g,headPlacement:E}},K={top:60,bottom:60,topPhone:40,bottomPhone:40},ye={...t,gap:8,gapPhone:8,...ae(24),...d(1,1,1,1)},be={name:"Document Detail Cards",boxProps:e=>({...u,direction:"column",gap:40,gapPhone:16,...d(0,0,1,0),...y(e,K)}),box:[...w,...b(K)],parts:[{kind:"core",as:"Cards",keep:[],props:{columns:3},derive:{reads:["cards"],props:e=>({items:(Array.isArray(e.cards)?e.cards:[]).map(o=>H({label:s(o.label),value:s(o.value),body:s(o.desc)}))})},slots:(e,o)=>({template:[{type:l,props:{...ye,...c("surface")(e,o),name:"Card"},slots:{[p]:[a("label",n,{...i("label",12),lineHeight:1.5},!0),{type:l,props:{...t,name:"Words",gap:14,gapPhone:14},slots:{[p]:[a("value",n,{textStyle:"heading-3",...i("headingSmall",20),weight:500,letterSpacing:-.015,lineHeight:1.5}),a("body",h,{textStyle:"body-5",fontRole:"accent",...i("body",14),italic:!0,lineHeight:1.5})]}}]}}]})}],drop:{...m,...g}},Ie={Cards:pe,KeyFeatures:he,Series:ue,DocMetaCards:be};export{Ie as CARDS_SECTION_TO_BOX};
@@ -1 +1 @@
1
- import{tabletKey as I}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 X,SECTION_BOX as P,SH_LINK as f,TEXT as p,bandAccent as v,bandIndex as K,bandPage as $,bandProps as S,bandWrites as z,smallText as d,wrapperPad as l}from"./section-to-box-row-parts.js";import{editorialHeadTree as U,token as c}from"./section-head-looks.js";import{readAnchorName as Y}from"../../../../../format/lib/content/anchor-name.js";import{declaredBlockSource as B}from"../../../../../format/lib/content/block-sources.js";import{parseLocationTileShape as F,splitLegacyRegion as T}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 a=e=>typeof e=="string"?e:e==null?"":String(e),m=e=>Array.isArray(e.locations)?e.locations.map(t=>t??{}):[],s=e=>a(e.group),w=e=>`loc-${e}`,x=e=>a(e.state).trim()||T(a(e.region)).state,O=e=>a(e.country).trim()||T(a(e.region)).country,_=e=>[x(e),O(e)].filter(Boolean).join(" · "),J=e=>m(e).some(t=>a(t.photo).trim()!==""),Q=e=>m(e).some(t=>V(Number(t.lat),Number(t.lng))),Z=(e,t)=>m(e).filter(n=>s(n)===s(t)).length,ee=(e,t)=>Z(e,t)===1?"wide":F(e.imageShape),h={top:100,bottom:100,topPhone:60,bottomPhone:60},N=48,r=(e,t={})=>({textStyle:"body-5",...c("label",e),case:"upper",...t}),y={top:1,right:1,bottom:1,left:1},u=(e,t)=>({sectionPaddingTop:e,sectionPaddingBottom:e,sectionPaddingLeft:t,sectionPaddingRight:t,sectionPaddingTopPhone:e,sectionPaddingBottomPhone:e,sectionPaddingLeftPhone:t,sectionPaddingRightPhone:t}),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:[d("galleryKicker",r(12,{color:"accent",letterSpacing:.3})),{kind:"text",key:"galleryHint",props:{...i,align:"right",alignPhone:"left"},style:r(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:y,...u(12,12)},item:(e,t,n)=>({props:{...a(e.photo).trim()?{bgImage:a(e.photo)}:{},link:`#${w(t)}`,boxShape:ee(n,e)}}),parts:[{kind:"text",key:"name",props:p,style:r(11,{letterSpacing:.22,color:"text"})}],groups:{of:s,name:"Group",props:{...o,gap:10},head:e=>({label:s(e[0]??{})}),parts:[d("label",r(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,...u(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:r(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:y,...u(6,10)},parts:[{kind:"text",key:"timezone",props:{...i,textFit:"line"},style:r(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,...f,variant:"ghost",arrow:!1,_partStyles:{label:r(13,{letterSpacing:.18,color:"text",lineHeight:24/13})}},box:[["phone","label"],["phone","href",e=>q(a(e))??"#"]],when:(e,t)=>a(t?.phone).trim()!==""},{kind:"text",key:"hours",props:i,style:r(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)=>x(n)]),...["region","country"].map(e=>[e,"country",(t,n)=>O(n)])]},re={kind:"group",name:"Map",props:{...o,sectionBorder:{top:1,right:0,bottom:0,left:0}},parts:[ae]},ie={kind:"list",key:"locations",name:"City",props:(e,t)=>({...o,gap:0,justify:"between",sectionBorder:y,jumpHighlight:!0,sectionAccent:K(e,t)>=0?$(e.sectionAccent,t):-1}),item:(e,t)=>({props:{anchor:w(t)}}),parts:[ne,re],groups:{of:s,name:"Group",props:{...o,gap:20},head:e=>{const t=e[0]??{};return{key:s(t),groupName:a(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)=>a(t?.key).trim()!=="",parts:[d("key",r(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:r(12,{letterSpacing:.22})}]}],itemsName:"Cities",itemsProps:e=>({...b,columns:g(e),[I("columns")]:1})}},C=r(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,...f,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,R)=>l(R,h)[t]]),L=["sectionAccent","sectionAccent",v],pe=["gridSpan","_hidden"],ce={name:"City pictures",skip:e=>B(e)?`fed by the data source "${B(e)}": its cities are read as the page is served, not stored on the node`:void 0,boxProps:(e,t)=>({...P,direction:"column",gap:40,anchor:"studios",...M(l(e,h),E),sectionPaddingBottom:N,sectionPaddingBottomPhone:N,...S(e,t)}),box:[...X.filter(e=>e!=="sectionAccent"&&e!=="anchor"),L,["anchor","anchor",e=>Y(e).trim()?e:"studios"],...A(E)],parts:[U("sectionNumber","heading","tagline"),oe],also:[{name:"City maps",boxProps:(e,t)=>({...P,direction:"column",gap:40,sectionBorder:{bottom:1},sectionPaddingTop:0,sectionPaddingTopPhone:0,...M(l(e,h),H),...S(e,t)}),box:[...pe,L,...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)"}},fe={ContactLocations:ce};export{fe as LOCATIONS_SECTION_TO_BOX};
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 X,SECTION_BOX as f,SH_LINK as S,TEXT as p,bandAccent as v,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)}:{},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",v],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:[...X.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,3 +1,3 @@
1
- import{BUTTON as g,DIM as s,bandAccent as f,bandIndex as S,bandWrites as _,DROP_COMMON as h,DROP_SIDE_PADDING as m,INNER_BOX as o,SAME_KEYS as b,SECTION_BOX as y,lineBorder as u,TEXT as l,innerPad as x,innerPadKeys as k}from"./section-to-box-row-parts.js";import{splitParagraphs as E}from"../../../../components/goldPhrases.js";import{TIMELINE_YEAR_BOX as I,TIMELINE_YEAR_HEAD as w}from"../../../../../format/lib/sections/timeline-year-shape.js";const B="jetbrains-mono",T="space-grotesk",i=(e,t,r={})=>({textStyle:"body-5",font:B,size:e,sizePhone:e,letterSpacing:t,lineHeight:1.5,weight:400,...r}),p=(e,t,r,c)=>({font:T,size:e,sizePhone:t,case:"upper",weight:500,letterSpacing:r,lineHeight:c}),a=(e,t,r,c={})=>({textStyle:"body-1",font:T,size:e,sizePhone:t,weight:400,case:"none",lineHeight:r,...c}),n=(e,t,r={})=>({kind:"text",key:e,props:l,style:t,...r}),P=(e,t)=>t?.future===!0,d=e=>E(typeof e?.body=="string"?e.body:""),O={name:"Milestone Timeline",boxProps:(e,t)=>{const r=S(e,t);return{...y,direction:"column",gap:60,sectionBorder:{bottom:1},...x(e,"TimelineTrack"),...r>=0?{sectionAccent:r}:{}}},box:[...b.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",f],...k("TimelineTrack")],parts:[{kind:"group",name:"Heading",props:{...o,direction:"row",align:"end",justify:"between",gap:40,share:"content",sectionPaddingBottom:32,sectionBorder:{bottom:1}},parts:[{kind:"group",name:"Title",props:{...o,direction:"row",align:"end",gap:40,share:"content"},parts:[n("eyebrow",i(13,.3,{case:"upper",color:"accent",padding:8}),{role:"eyebrow"}),n("title",{textStyle:"heading-2",...p(79,40,-.03,1)},{role:"heading"})]},n("intro",a(14,14,1.5),{props:{...s,align:"right",maxWidth:360}})]},{kind:"group",name:"Years",props:{...o,direction:"row",share:"equal",gap:0,line:!0},parts:[{kind:"list",key:"entries",name:"Year",props:{...o,...I},item:e=>({props:e.future===!0?{upcoming:!0}:{}}),parts:[{kind:"group",name:w.name,props:{...o,...w},parts:[n("date",i(13,.22,{color:"accent"}),{when:(e,t)=>!P(e,t)}),n("date",i(13,.22,{color:"labels"}),{when:P}),n("title",{textStyle:"heading-3",...p(20,20,-.02,1.1)},{role:"heading"})]},n("blurb",a(13,13,1.55),{props:s})]}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"ghost",props:(e,t)=>({...g,align:"right",...u(e,t)}),style:i(13,.3,{case:"upper"})}],site:_,drop:{...h,...m,background:"the band is the Box's theme: the site's band preset (`sectionAccent`), or a declared band-preset write (`lib/theme` `bandPresetIndex`)",headPlacement:"needs a row per head placement: an own-box Milestone Timeline draws no head (its words sit in a Section Header above it), the row always draws the head"}},A={name:"Story Timeline",skip:e=>{const t=typeof e.layout=="string"?e.layout:"split";return t==="split"?void 0:`display "${t}": not converted (0 live pages; Spine and Alternating are not offered, a Track story is not stored anywhere)`},boxProps:e=>({...y,direction:"row",share:"twoThree",gap:80,align:"start",...x(e,"Timeline")}),box:[...b,...k("Timeline")],parts:[{kind:"group",name:"Heading",props:{...o,gap:24},parts:[n("eyebrow",i(12,.3,{case:"upper",color:"accent"}),{role:"eyebrow"}),n("title",{textStyle:"heading-2",...p(72,40,-.03,.94)},{role:"heading"}),n("intro",a(14,14,1.6),{props:{...s,maxWidth:360}}),{kind:"group",name:"Picture",keepEmpty:!0,box:[["imageSrc","bgImage"]],props:{...o,sectionBorder:{top:1,right:1,bottom:1,left:1},darken:75,darkenStyle:"bottom",placement:"bottom-center",sectionHeightMode:"fixed",sectionHeightValue:667,sectionHeightUnit:"px",sectionHeightModePhone:"fixed",sectionHeightValuePhone:419,sectionHeightUnitPhone:"px",sectionPaddingTop:12,sectionPaddingBottom:12,sectionPaddingLeft:16,sectionPaddingRight:16,sectionPaddingTopPhone:12,sectionPaddingBottomPhone:12,sectionPaddingLeftPhone:16,sectionPaddingRightPhone:16},when:e=>typeof e.imageSrc=="string"&&e.imageSrc.trim()!=="",parts:[{kind:"group",name:"Caption",props:{...o,direction:"row",justify:"between",align:"center",gap:12,share:"content",phoneRow:2},parts:[n("imageCaption",i(11,.24,{case:"upper",color:"text"})),n("imageMeta",i(11,.24,{case:"upper",color:"accent"}),{props:{...l,align:"right"}})]}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"ghost",props:(e,t)=>({...g,...u(e,t)}),style:i(13,.3,{case:"upper"})}]},{kind:"group",name:"Chapters",props:{...o,gap:48,line:!1},parts:[{kind:"list",key:"entries",name:"Chapter",props:{...o,direction:"row",gap:24,share:"biggerRight",align:"start"},parts:[n("date",i(13,.24,{color:"accent"})),{kind:"group",name:"Words",props:{...o,gap:14},parts:[n("title",{textStyle:"heading-3",...p(24,20,-.02,1.5)},{role:"heading"}),{kind:"block",type:"Text",props:{...l,_partStyles:{text:a(17,16,1.6)}},box:[["body","text",(e,t)=>d(t)[0]??""]],when:(e,t)=>d(t).length>0},{kind:"block",type:"Text",props:{...s,_partStyles:{text:a(17,16,1.6,{paragraphSpacing:14})}},box:[["body","text",(e,t)=>d(t).slice(1).join(`
1
+ import{BUTTON as g,DIM as s,bandAccent as S,bandIndex as _,bandWrites as P,DROP_COMMON as h,DROP_SIDE_PADDING as m,INNER_BOX as o,SAME_KEYS as b,SECTION_BOX as y,lineBorder as u,TEXT as l,innerPad as x,innerPadKeys as k}from"./section-to-box-row-parts.js";import{splitParagraphs as E}from"../../../../components/goldPhrases.js";import{TIMELINE_YEAR_BOX as I,TIMELINE_YEAR_HEAD as w}from"../../../../../format/lib/sections/timeline-year-shape.js";import{boxPadding as O}from"../../../../../format/lib/document/seed-parts.js";const A="jetbrains-mono",T="space-grotesk",i=(e,t,r={})=>({textStyle:"body-5",font:A,size:e,sizePhone:e,letterSpacing:t,lineHeight:1.5,weight:400,...r}),p=(e,t,r,d)=>({font:T,size:e,sizePhone:t,case:"upper",weight:500,letterSpacing:r,lineHeight:d}),a=(e,t,r,d={})=>({textStyle:"body-1",font:T,size:e,sizePhone:t,weight:400,case:"none",lineHeight:r,...d}),n=(e,t,r={})=>({kind:"text",key:e,props:l,style:t,...r}),f=(e,t)=>t?.future===!0,c=e=>E(typeof e?.body=="string"?e.body:""),H={name:"Milestone Timeline",boxProps:(e,t)=>{const r=_(e,t);return{...y,direction:"column",gap:60,sectionBorder:{bottom:1},...x(e,"TimelineTrack"),...r>=0?{sectionAccent:r}:{}}},box:[...b.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",S],...k("TimelineTrack")],parts:[{kind:"group",name:"Heading",props:{...o,direction:"row",align:"end",justify:"between",gap:40,share:"content",sectionPaddingBottom:32,sectionBorder:{bottom:1}},parts:[{kind:"group",name:"Title",props:{...o,direction:"row",align:"end",gap:40,share:"content"},parts:[n("eyebrow",i(13,.3,{case:"upper",color:"accent",padding:8}),{role:"eyebrow"}),n("title",{textStyle:"heading-2",...p(79,40,-.03,1)},{role:"heading"})]},n("intro",a(14,14,1.5),{props:{...s,align:"right",maxWidth:360}})]},{kind:"group",name:"Years",props:{...o,direction:"row",share:"equal",gap:0,line:!0},parts:[{kind:"list",key:"entries",name:"Year",props:{...o,...I},item:e=>({props:e.future===!0?{upcoming:!0}:{}}),parts:[{kind:"group",name:w.name,props:{...o,...w},parts:[n("date",i(13,.22,{color:"accent"}),{when:(e,t)=>!f(e,t)}),n("date",i(13,.22,{color:"labels"}),{when:f}),n("title",{textStyle:"heading-3",...p(20,20,-.02,1.1)},{role:"heading"})]},n("blurb",a(13,13,1.55),{props:s})]}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"ghost",props:(e,t)=>({...g,align:"right",...u(e,t)}),style:i(13,.3,{case:"upper"})}],site:P,drop:{...h,...m,background:"the band is the Box's theme: the site's band preset (`sectionAccent`), or a declared band-preset write (`lib/theme` `bandPresetIndex`)",headPlacement:"needs a row per head placement: an own-box Milestone Timeline draws no head (its words sit in a Section Header above it), the row always draws the head"}},M={name:"Story Timeline",skip:e=>{const t=typeof e.layout=="string"?e.layout:"split";return t==="split"?void 0:`display "${t}": not converted (0 live pages; Spine and Alternating are not offered, a Track story is not stored anywhere)`},boxProps:e=>({...y,direction:"row",share:"twoThree",gap:80,align:"start",...x(e,"Timeline")}),box:[...b,...k("Timeline")],parts:[{kind:"group",name:"Heading",props:{...o,gap:24},parts:[n("eyebrow",i(12,.3,{case:"upper",color:"accent"}),{role:"eyebrow"}),n("title",{textStyle:"heading-2",...p(72,40,-.03,.94)},{role:"heading"}),n("intro",a(14,14,1.6),{props:{...s,maxWidth:360}}),{kind:"group",name:"Picture",keepEmpty:!0,box:[["imageSrc","bgImage"]],props:{...o,sectionBorder:{top:1,right:1,bottom:1,left:1},darken:75,darkenStyle:"bottom",placement:"bottom-center",sectionHeightMode:"fixed",sectionHeightValue:667,sectionHeightUnit:"px",sectionHeightModePhone:"fixed",sectionHeightValuePhone:419,sectionHeightUnitPhone:"px",...O(12,16)},when:e=>typeof e.imageSrc=="string"&&e.imageSrc.trim()!=="",parts:[{kind:"group",name:"Caption",props:{...o,direction:"row",justify:"between",align:"center",gap:12,share:"content",phoneRow:2},parts:[n("imageCaption",i(11,.24,{case:"upper",color:"text"})),n("imageMeta",i(11,.24,{case:"upper",color:"accent"}),{props:{...l,align:"right"}})]}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"ghost",props:(e,t)=>({...g,...u(e,t)}),style:i(13,.3,{case:"upper"})}]},{kind:"group",name:"Chapters",props:{...o,gap:48,line:!1},parts:[{kind:"list",key:"entries",name:"Chapter",props:{...o,direction:"row",gap:24,share:"biggerRight",align:"start"},parts:[n("date",i(13,.24,{color:"accent"})),{kind:"group",name:"Words",props:{...o,gap:14},parts:[n("title",{textStyle:"heading-3",...p(24,20,-.02,1.5)},{role:"heading"}),{kind:"block",type:"Text",props:{...l,_partStyles:{text:a(17,16,1.6)}},box:[["body","text",(e,t)=>c(t)[0]??""]],when:(e,t)=>c(t).length>0},{kind:"block",type:"Text",props:{...s,_partStyles:{text:a(17,16,1.6,{paragraphSpacing:14})}},box:[["body","text",(e,t)=>c(t).slice(1).join(`
2
2
 
3
- `)]],when:(e,t)=>d(t).length>1}]}]}]}],drop:{...h,...m,layout:"Split is the only display converted (see skip); the Box's own arrangement replaces it"}},R={TimelineTrack:O,Timeline:A};export{R as TIMELINE_SECTION_TO_BOX};
3
+ `)]],when:(e,t)=>c(t).length>1}]}]}]}],drop:{...h,...m,layout:"Split is the only display converted (see skip); the Box's own arrangement replaces it"}},D={TimelineTrack:H,Timeline:M};export{D as TIMELINE_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 f,siteGutterOf as R,innerPadKeys as S,smallText as P,wrapperPad as u,wrapperPadKeys as b}from"./section-to-box-row-parts.js";import{CARDS_SECTION_TO_BOX as L}from"./section-to-box-rows-cards.js";import{normalizeSiteGutterPhone as C,siteGutterPhoneFollows as D}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";const T={top:72,bottom:72,topPhone:72,bottomPhone:72},J={name:"Editorial Text",boxProps:e=>({...p,direction:"column",gap:28,gapPhone:28,sectionBorder:{top:1},...u(e,T)}),box:[["topBorder","sectionBorder",e=>e===!1?void 0:{top:1}],...d,...b(T)],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)"}},w={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,...w,...n}},{kind:"button",key:"label",href:"href",when:(i,a)=>!k(i,a),variant:"ghost",style:{letterSpacing:.3},props:(i,a)=>({...g,...w,...n,...H(i,a)})}]}),h=e=>v(e.title),Q={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},...f(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"}};function V(e){const{siteGutter:n,siteGutterPhone:i}=e.site??{},a=R(e),y=Math.min(20,C(i)??D(n));return{sectionPaddingLeft:a,sectionPaddingRight:a,sectionPaddingLeftPhone:y,sectionPaddingRightPhone:y}}const B={top:40,bottom:64,topPhone:24,bottomPhone:36},Z={name:"Section Header",boxProps:(e,n)=>({...p,direction:"column",gap:0,...u(e,B),...V(n)}),box:[...d,...b(B)],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"}},x={...t,direction:"row",share:"bigLeft",gap:30},E={...t,sectionPaddingLeft:30,sectionPaddingLeftPhone:0},N=(e,n,i)=>({kind:"group",name:e,props:n,parts:[i]}),$={name:"Lead Text",boxProps:e=>({...p,direction:"column",gap:40,gapPhone:40,sectionBorder:{bottom:1},...f(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:[P("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}}]},P("attribution",{...r("label",12,10),letterSpacing:.24,lineHeight:1.7})]})]}],drop:{...s}},I={top:24,bottom:24,topPhone:24,bottomPhone:24},ee={name:"Banner",boxProps:e=>({...p,direction:"column",gap:0,...u(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},sectionPaddingTop:64,sectionPaddingBottom:64,sectionPaddingTopPhone:40,sectionPaddingBottomPhone:40,sectionPaddingLeft:40,sectionPaddingRight:40,sectionPaddingLeftPhone:24,sectionPaddingRightPhone: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:[P("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}},te={Prose:J,TitleWithButtons:Q,SectionHeader:Z,ParagraphsA:$,Banner:ee};function be(){o(te),o(X),o(G),o(L),o(M),o(F),o(z),o(K),o(Y),o(j),o(U)}export{te as GENERAL_SECTION_TO_BOX,be 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 f,siteGutterOf as C,innerPadKeys as S,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 L,siteGutterPhoneFollows as D}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},...f(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"}};function Z(e){const{siteGutter:n,siteGutterPhone:i}=e.site??{},a=C(e),y=Math.min(20,L(i)??D(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:"bigLeft",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},...f(e,"ParagraphsA")}),box:[...d,...S("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 fe(){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,fe as registerGeneralSectionRows};
@@ -1,3 +1,4 @@
1
+ import { type BlockSeed } from "../../../format/lib/document/seed-parts.js";
1
2
  import type { StoredTextStyle } from "../text-styles/site-text-styles.js";
2
3
  import { type ThemeColors, type ThemeValue } from "../../../format/lib/theme.js";
3
4
  type Props = Record<string, unknown>;
@@ -102,11 +103,7 @@ export type ListGroups = {
102
103
  rowName?: string;
103
104
  rowProps?: Props;
104
105
  };
105
- export type BlockSeed = {
106
- type: string;
107
- props?: Props;
108
- slots?: Readonly<Record<string, readonly BlockSeed[]>>;
109
- };
106
+ export type { BlockSeed } from "../../../format/lib/document/seed-parts.js";
110
107
  export type SlotFill = BlockSeed | ListPart;
111
108
  type PartRowKind = {
112
109
  kind: "text";
@@ -153,7 +150,11 @@ type PartRowKind = {
153
150
  as?: string;
154
151
  rename?: Readonly<Record<string, string>>;
155
152
  props?: Props;
156
- slots?: Readonly<Record<string, readonly SlotFill[]>>;
153
+ slots?: Readonly<Record<string, readonly SlotFill[]>> | ((node: Props, ctx: ConvertContext) => Readonly<Record<string, readonly SlotFill[]>>);
154
+ derive?: {
155
+ reads: readonly string[];
156
+ props: (node: Props, ctx: ConvertContext) => Props;
157
+ };
157
158
  };
158
159
  export interface SectionToBoxRow {
159
160
  name: string;
@@ -194,4 +195,3 @@ export type SectionToBoxEdit = {
194
195
  nodes: SectionNode[];
195
196
  };
196
197
  export declare function sectionToBoxEdits(content: unknown, on?: readonly string[], ctx?: ConvertContext): SectionToBoxEdit[];
197
- export {};
@@ -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{bucketByGroup as re}from"../../../format/lib/locations-grid.js";import{normalizeTheme as V}from"../../../format/lib/theme.js";const P=ee,E=te;function $e(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 ie(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 Oe(t){for(const[o,r]of Object.entries(t)){if(o in A&&A[o]!==r)throw new Error(`lib/sections/section-to-box: "${o}" is already Box-native`);A[o]=r}}function Se(t){return A[t]}const Y=new Set(["id"]),B={},H=[],ce=[];function Be(t){for(const[o,r]of Object.entries(t)){if(o in B&&B[o]!==r)throw new Error(`lib/sections/section-to-box: "${o}" already has a row`);B[o]=r}}function Te(t){return B[t]}function _e(){return Object.keys(B)}function ae(t){return t in B&&H.includes(t)}function Pe(t,o=ce){return t in B&&(o.includes(t)||ae(t))}function Ee(t){const o=se[t];if(!o)throw new Error(`lib/sections/section-to-box: "${t}" has no head row in SPLITTABLE_SECTIONS`);const r=[{kind:"text",key:o.num,role:"eyebrow"},{kind:"text",key:o.title,role:"heading"}];return o.description&&r.push({kind:"text",key:o.description,role:"body"}),o.headRows.includes("linkText")&&o.headRows.includes("linkHref")&&r.push({kind:"button",key:"linkText",href:"linkHref"}),r}const W=t=>Z(t),je=t=>W(t).text.trim()!=="";function fe(t){return t.replace(/==(.+?)==/g,(o,r)=>r.startsWith("_")&&r.endsWith("_")?o:`==_${r}_==`)}function le(t){if(t.includes("=="))return t;const o=t.indexOf("/"),r=o===-1?t:t.slice(0,o),i=r.trim();if(!i)return t;const h=r.indexOf(i);return`${r.slice(0,h)}==${i}==${r.slice(h+i.length)}${o===-1?"":t.slice(o)}`}const de=t=>t==="heading"?oe():t==="eyebrow"?ne():{};function pe(t,o,r,i){const a={...t._partStyles?.text??{},...o??{},...r??{}};return(i==="center"||i==="right")&&a.align===void 0&&(a.align=i),Object.keys(a).length?{_partStyles:{text:a}}:{}}function ue(t,o){if(t===void 0)return{};if(typeof t=="string")return{variant:t};const r=o[t.key];return{variant:typeof r=="string"&&Object.hasOwn(t.map,r)?t.map[r]:t.fallback}}function D(t,o,r,i,h={}){const a={...o};for(const y of t){const[x,S,v]=typeof y=="string"?[y,y,void 0]:y;if(r[x]===void 0)continue;const T=v?v(r[x],r,h):r[x];T===void 0?delete a[S]:a[S]=T,i(x,S,T===void 0)}return a}function he(t){const o=new Set([...Y,"headPlacement","_partStyles",...Object.keys(t.drop??{}),...Object.keys(t.reads??{})]),r=h=>{for(const a of h??[])o.add(typeof a=="string"?a:a[0])},i=h=>{for(const a of h)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":r(a.box),i(a.parts??[]);break;case"core":a.keep!=="rest"&&a.keep.forEach(y=>o.add(y)),Object.keys(a.rename??{}).forEach(y=>o.add(y));for(const y of Object.values(a.slots??{}))for(const x of y)"kind"in x&&o.add(x.key);break}};for(const h of[t,...t.also??[]])r(h.box),i(h.parts);return o}function q(t,o,r={}){const i=t.props,h=o.skip?.(i);if(h!==void 0)return{node:t,nodes:[t],carried:[],dropped:[],siteWrites:[],restyled:[],skipped:h};const a=String(i.id??t.type),y=[],x=[],S=[],v=new Set,T=(n,s)=>{y.push({key:n,home:s}),v.add(n)},X=i._partStyles??{},L=he(o);let J=0;const w=(n,s)=>({type:n,props:{...s,id:`${a}~${n}-${++J}`}}),F=(n,s,b,u,g,l,$)=>{if(g){for(const c of n??[]){const p=typeof c=="string"?c:c[0];b[p]!==void 0&&$(p,`nothing — the ${u} has no parts, so it is not drawn`)}return}const e=typeof s=="function"?s(i,r):s??{};return D(n??[],e,b,(c,p,f)=>$(c,f?`nothing — the old value draws nothing (${u}: no ${p})`:`${l}${u}: ${p}`),r)},K=n=>n.map(s=>{const b={...s.props??{}};for(const[u,g]of Object.entries(s.slots??{}))b[u]=K(g);return w(s.type,b)}),M=(n,s,b)=>{const u=n.of?n.of(s):Array.isArray(s[n.key])?s[n.key]:[],g=typeof n.props=="function"?n.props(i,r):n.props??{},l=u.map((f,d)=>{const k=f??{},m=n.item?.(k,d,i)??{},j=I(m.reverse?[...n.parts].reverse():n.parts,k,!1,`item ${d+1}: `);return n.flat?m.props?j.map(_=>({..._,props:{..._.props,...m.props,id:_.props.id}})):j:[w(P,{name:`${n.name} ${d+1}`,...g,...m.props??{},[E]:j})]});if(n.groups){const f=n.groups;return b(n.key,u.length?`one Box per item (${u.length}), in a Box per group`:"nothing — the list is empty"),re(u.map(d=>d??{}),f.of,f.of).map((d,k)=>{const m=d.items.map(O=>O.item),j=f.parts?I(f.parts,f.head?.(m,i)??{},!1,`group ${k+1}: `):[],_=d.items.map(O=>l[O.index]),z=f.perRow?.(m.length,i),N=Number.isInteger(z)&&z>=1?z:1,C=[];if(f.perRow&&N<_.length)for(let O=0;O*N<_.length;O++)C.push(_.slice(O*N,(O+1)*N).flat());return w(P,{name:`${f.name} ${k+1}`,...f.props??{},[E]:[...j,w(P,{name:`${f.itemsName} ${k+1}`,...f.itemsProps?.(m.length,i)??{},[E]:C.length?C.map((O,U)=>w(P,{name:`${f.rowName??`${f.itemsName} row`} ${U+1}`,...f.rowProps??{},[E]:O})):_.flat()})]})})}const $=n.perRow?.(i),e=n.perRow?Number.isInteger($)&&$>=1?$:1:0;if(b(n.key,(u.length?n.flat?`each item's parts (${u.length} items), in order`:`one Box per item (${u.length}), its parts inside`:"nothing — the list is empty")+(e&&u.length?`, in rows of ${e}`:"")),!e)return l.flat();const c=typeof n.rowProps=="function"?n.rowProps(i,r):n.rowProps??{},p=[];for(let f=0;f*e<l.length;f++){const d=l.slice(f*e,(f+1)*e).flat(),k=n.rowFiller?e-l.slice(f*e,(f+1)*e).length:0;p.push(w(P,{name:`${n.rowName??`${n.name} row`} ${f+1}`,...c,[E]:[...d,...Array.from({length:k},(m,j)=>w(P,{name:`Empty ${j+1}`,...n.rowFiller,[E]:[]}))]}))}return p},I=(n,s,b,u)=>{const g=[],l=(e,c)=>b?T(e,c):void 0,$=e=>b?X[e]:void 0;for(const e of n)if(!(e.when&&!e.when(i,b?void 0:s)))switch(e.kind){case"text":{const c=W(s[e.key]);if(!c.text.trim()){l(e.key,"nothing — empty words draw nothing, so no block");break}const p=de(e.role??"body"),{_partStyles:f,...d}=p,k=pe(p,e.styleFrom?{...e.style,...e.styleFrom(i,r)}:e.style,$(e.key),e.props?.align);if(e.was&&b){const m=k._partStyles?.text??{};S.push({key:e.key,was:e.was,...typeof m.textStyle=="string"?{textStyle:m.textStyle}:{},...R(m.size)!==void 0?{size:R(m.size)}:{},...R(m.sizePhone)!==void 0?{sizePhone:R(m.sizePhone)}:{}})}g.push(w("Text",{text:e.mark==="accentLead"?le(c.text):e.mark==="accentItalic"?fe(c.text):c.text,...d,...e.props??{},...k,...c.hidden?{_hidden:!0}:{}})),l(e.key,`${u}Text block: its words${c.hidden?", hidden":""}`);break}case"button":{const c=W(s[e.key]);if(!c.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 p=typeof s[e.href]=="string"&&s[e.href]?s[e.href]:"#",f={...e.style??{},...$(e.key)??{}};g.push(w("ButtonBlock",{label:c.text,href:p,...typeof e.props=="function"?e.props(s,r):e.props??{},...ue(e.variant,s),...Object.keys(f).length?{_partStyles:{label:f}}:{},...c.hidden?{_hidden:!0}:{}})),l(e.key,`${u}Button block: its words`),l(e.href,`${u}Button block: its link`),typeof e.variant=="object"&&l(e.variant.key,`${u}Button block: its Style`);break}case"image":{const c=s[e.key];if(typeof c!="string"||!c){l(e.key,"nothing — no picture, no block"),e.alt&&l(e.alt,"nothing — no picture to describe");break}const p=e.alt&&typeof s[e.alt]=="string"?s[e.alt]:"";g.push(w("ImageBlock",{src:c,alt:p,...e.props??{}})),l(e.key,`${u}Image block: its picture`),e.alt&&l(e.alt,`${u}Image block: its alt text`);break}case"list":{g.push(...M(e,s,l));break}case"group":{const c=I(e.parts,s,b,u),p=F(e.box,e.props,s,`${e.name} Box`,!c.length&&!e.keepEmpty,u,l);p&&g.push(w(P,{name:e.name,...p,[E]:c}));break}case"block":{const c=e.parts?I(e.parts,s,b,u):[],p=F(e.box,e.props,s,`${e.type} block`,!!e.parts&&!c.length&&!e.keepEmpty,u,l);p&&g.push(w(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(d=>!L.has(d)&&!(d in p)):e.keep;for(const d of f)s[d]!==void 0&&(p[d]=s[d],l(d,`the ${c} block inside the Box`));if(e.keep==="rest"){for(const k of Object.keys(e.props??{}))s[k]!==void 0&&!L.has(k)&&l(k,`nothing — the ${c} block inside the Box has the row's own value`);s.headPlacement!==void 0&&l("headPlacement",`the ${c} block inside the Box: own-box`);const d=Object.fromEntries(Object.entries(X).filter(([k])=>!L.has(k)));Object.keys(d).length&&(p._partStyles=d)}for(const[d,k]of Object.entries(e.rename??{}))s[d]!==void 0&&(p[k]=s[d],l(d,`the ${c} block inside the Box: ${k}`));for(const[d,k]of Object.entries(e.slots??{}))p[d]=k.flatMap(m=>"kind"in m?M(m,s,l):K([m]));g.push(w(c,p));break}}return g},Q=(n,s)=>{const b=s===0?"Box":`${n.name} Box`,u=I(n.parts,i,!0,s===0?"":`${b}: `),g=typeof n.boxProps=="function"?n.boxProps(i,r):n.boxProps??{},l=D(n.box??[],g,i,($,e,c)=>T($,c?`nothing — the old value draws nothing (${b}: no ${e})`:`${b}: ${e}`),r);return{type:P,props:{name:n.name,...l,[E]:u,id:ie(a,s)}}},G=[o,...o.also??[]].map(Q);i._partStyles!==void 0&&T("_partStyles","each old part's style moved to its new part");for(const[n,s]of Object.entries(o.reads??{}))i[n]!==void 0&&T(n,s);for(const[n,s]of Object.entries(o.drop??{}))n in i&&(x.push({key:n,why:s}),v.add(n));for(const n of Object.keys(i))Y.has(n)||v.has(n)||x.push({key:n,why:"not in the row — not carried"});return{node:G[0],nodes:G,carried:y,dropped:x,siteWrites:[...o.site?.(t,r)??[]],restyled:S}}function ve(t,o=H,r={}){const i=t.content;if(!Array.isArray(i))return t;let h=!1;const a=i.flatMap(y=>{const x=y&&typeof y.type=="string"&&o.includes(y.type)?B[y.type]:void 0;if(!x)return[y];const S=q(y,x,r);return S.skipped!==void 0?[y]:(h=!0,S.nodes)});return h?{...t,content:a}:t}function Ie(t,o=H,r={}){if(!Array.isArray(t))return[];const i=[];return t.forEach((h,a)=>{const y=h&&typeof h.type=="string"&&o.includes(h.type)?B[h.type]:void 0;if(!y)return;const x=q(h,y,r);x.skipped===void 0&&i.push({index:a,node:x.node,nodes:x.nodes})}),i}export{E as SECTION_BOX_SLOT,P as SECTION_BOX_TYPE,H as SECTION_TO_BOX_ON,ce as SECTION_TO_BOX_PRESS,Se as boxNativeReason,q as convertSection,ve as convertSectionsInPage,$e as convertTheme,ae as convertsToBox,je as hasWords,Ee as headParts,Pe as pressesAsBox,Oe as registerBoxNativeSections,Be as registerSectionToBox,ie as sectionBoxIdOf,Ie as sectionToBoxEdits,Te as sectionToBoxRow,_e 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{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};
@@ -15,12 +15,14 @@ export interface SiteImageProps {
15
15
  export interface SiteRuntime {
16
16
  Link: ComponentType<SiteLinkProps>;
17
17
  Image: ComponentType<SiteImageProps>;
18
+ pagePath?: string | null;
18
19
  }
19
20
  export declare function SiteRuntimeProvider({ runtime, children }: {
20
21
  runtime: SiteRuntime;
21
22
  children: ReactNode;
22
23
  }): import("react").JSX.Element;
23
24
  export declare function useSiteRuntime(): SiteRuntime;
25
+ export declare function useCurrentPagePath(): string | null;
24
26
  export declare function SiteLink({ hrefRewrite, ...props }: SiteLinkProps & {
25
27
  hrefRewrite?: string;
26
28
  }): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as i}from"react/jsx-runtime";import s from"next/image";import c from"next/link";import{Component as l,createContext as u,lazy as m,Suspense as h,useContext as d}from"react";import{linkHrefRewrite as k}from"../../format/lib/links/link-href-rewrites.js";import{isSafeLinkHref as p}from"../../format/lib/markup.js";import{nonEmptyString as x}from"../../format/lib/non-empty-string.js";const S={Link:c,Image:s},o=u(S);function E({runtime:t,children:e}){return i(o.Provider,{value:t,children:e})}function f(){return d(o)}function N({hrefRewrite:t,...e}){const{Link:r}=f(),n=k(t);return n?i(L,{name:n.name,href:e.href,fallback:i(r,{...e}),children:i(w,{Link:r,rewrite:n.rewrite,...e})},n.key):i(r,{...e})}function w({Link:t,rewrite:e,...r}){const n=x(e(r.href)),a=n&&p(n)?n:r.href;return i(t,{...r,href:a})}class L extends l{state={failed:!1,href:this.props.href};static getDerivedStateFromProps(e,r){return e.href===r.href?null:{failed:!1,href:e.href}}static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(e){console.error(`The link href rewrite ${this.props.name} failed; the link goes where it was typed.`,e)}render(){return this.state.failed?this.props.fallback:this.props.children}}function b(t){const{Image:e}=f();return i(e,{...t})}function B(t){const e=m(t);return function(n){return i(h,{fallback:null,children:i(e,{...n})})}}export{b as SiteImage,N as SiteLink,E as SiteRuntimeProvider,B as lazyInBrowser,f as useSiteRuntime};
1
+ "use client";import{jsx as i}from"react/jsx-runtime";import s from"next/image";import u from"next/link";import{Component as l,createContext as c,lazy as m,Suspense as h,useContext as d}from"react";import{linkHrefRewrite as p}from"../../format/lib/links/link-href-rewrites.js";import{isSafeLinkHref as k}from"../../format/lib/markup.js";import{nonEmptyString as x}from"../../format/lib/non-empty-string.js";const g={Link:u,Image:s},a=c(g);function z({runtime:t,children:e}){return i(a.Provider,{value:t,children:e})}function o(){return d(a)}function E(){return o().pagePath??null}function N({hrefRewrite:t,...e}){const{Link:r}=o(),n=p(t);return n?i(w,{name:n.name,href:e.href,fallback:i(r,{...e}),children:i(S,{Link:r,rewrite:n.rewrite,...e})},n.key):i(r,{...e})}function S({Link:t,rewrite:e,...r}){const n=x(e(r.href)),f=n&&k(n)?n:r.href;return i(t,{...r,href:f})}class w extends l{state={failed:!1,href:this.props.href};static getDerivedStateFromProps(e,r){return e.href===r.href?null:{failed:!1,href:e.href}}static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(e){console.error(`The link href rewrite ${this.props.name} failed; the link goes where it was typed.`,e)}render(){return this.state.failed?this.props.fallback:this.props.children}}function b(t){const{Image:e}=o();return i(e,{...t})}function B(t){const e=m(t);return function(n){return i(h,{fallback:null,children:i(e,{...n})})}}export{b as SiteImage,N as SiteLink,z as SiteRuntimeProvider,B as lazyInBrowser,E as useCurrentPagePath,o as useSiteRuntime};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-web-builder",
3
- "version": "49.1.0",
3
+ "version": "50.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",
@@ -72,7 +72,7 @@
72
72
  "@types/node": "^20",
73
73
  "@types/react": "^19",
74
74
  "@types/react-dom": "^19",
75
- "efficient-easel": "^27.0.0",
75
+ "efficient-easel": "^27.2.0",
76
76
  "efficient-shell": "^11.8.0",
77
77
  "esbuild": "^0.28.0",
78
78
  "happy-dom": "^20.14.5",