efficient-web-builder 55.1.0 → 55.2.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 (69) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/editor/lib/document/block-source-fields.js +1 -1
  3. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  4. package/dist/editor/lib/document/blocks/general/Footprint/fields.js +1 -1
  5. package/dist/editor/lib/document/blocks/general/Logos/fields.js +1 -1
  6. package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
  7. package/dist/editor/lib/document/field-groups.js +1 -1
  8. package/dist/editor/lib/document/part-anchors.js +1 -1
  9. package/dist/editor/lib/host-document-bridge.d.ts +4 -1
  10. package/dist/editor/lib/host-document-bridge.js +1 -1
  11. package/dist/editor/lib/sections/text-layouts.d.ts +2 -1
  12. package/dist/editor/lib/sections/text-layouts.js +1 -1
  13. package/dist/format/lib/content/block-sources.d.ts +6 -1
  14. package/dist/format/lib/content/block-sources.js +1 -1
  15. package/dist/format/lib/content/box-shape.d.ts +1 -1
  16. package/dist/format/lib/content/card-state.d.ts +6 -0
  17. package/dist/format/lib/content/card-state.js +1 -1
  18. package/dist/format/lib/content/card-template.d.ts +8 -0
  19. package/dist/format/lib/content/card-template.js +1 -1
  20. package/dist/format/lib/content/footprint.d.ts +1 -0
  21. package/dist/format/lib/content/footprint.js +1 -1
  22. package/dist/format/lib/content/view-lines.d.ts +1 -1
  23. package/dist/format/lib/document/blocks/general/CardList/meta.js +1 -1
  24. package/dist/format/lib/document/blocks/general/Footprint/card-seed.d.ts +2 -0
  25. package/dist/format/lib/document/blocks/general/Footprint/card-seed.js +1 -0
  26. package/dist/format/lib/document/blocks/general/Footprint/meta.d.ts +6 -0
  27. package/dist/format/lib/document/blocks/general/Footprint/meta.js +2 -2
  28. package/dist/format/lib/document/blocks/general/Logos/meta.d.ts +7 -0
  29. package/dist/format/lib/document/blocks/general/Logos/meta.js +1 -1
  30. package/dist/format/lib/document/section-catalog.js +6 -2
  31. package/dist/format/lib/editor-words-kept.d.ts +1 -0
  32. package/dist/format/lib/editor-words-kept.js +1 -0
  33. package/dist/format/lib/fonts.js +1 -1
  34. package/dist/render/components/CardRowContext.d.ts +3 -2
  35. package/dist/render/components/CardRowContext.js +1 -1
  36. package/dist/render/components/Flex.d.ts +2 -1
  37. package/dist/render/components/Flex.js +1 -1
  38. package/dist/render/components/Footprint.d.ts +4 -1
  39. package/dist/render/components/Footprint.js +1 -1
  40. package/dist/render/components/HeroPictures.d.ts +2 -2
  41. package/dist/render/components/PartStyledKind.d.ts +2 -1
  42. package/dist/render/components/PartStyledKind.js +1 -1
  43. package/dist/render/components/Text.d.ts +3 -1
  44. package/dist/render/components/Text.js +1 -1
  45. package/dist/render/lib/content/box-shared-columns.d.ts +6 -0
  46. package/dist/render/lib/content/box-shared-columns.js +1 -1
  47. package/dist/render/lib/document/blocks/general/ButtonBlock/render.js +1 -1
  48. package/dist/render/lib/document/blocks/general/CardList/render.js +1 -1
  49. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  50. package/dist/render/lib/document/blocks/general/Footprint/render.js +1 -1
  51. package/dist/render/lib/document/blocks/general/Logos/render.js +1 -1
  52. package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
  53. package/dist/render/lib/document/blocks/general/section-to-box-rows-fitment.d.ts +2 -0
  54. package/dist/render/lib/document/blocks/general/section-to-box-rows-fitment.js +1 -0
  55. package/dist/render/lib/document/blocks/general/section-to-box-rows-forms.d.ts +2 -0
  56. package/dist/render/lib/document/blocks/general/section-to-box-rows-forms.js +1 -0
  57. package/dist/render/lib/document/blocks/general/section-to-box-rows-head.d.ts +2 -0
  58. package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
  59. package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.d.ts +1 -0
  60. package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.js +1 -1
  61. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  62. package/dist/render/lib/document/hero-media-parts.d.ts +2 -2
  63. package/dist/render/lib/document/part-styles.js +2 -2
  64. package/dist/render/lib/document/passes/clickable-parts.js +1 -1
  65. package/dist/render/lib/document/text-parts.d.ts +2 -1
  66. package/dist/render/lib/document/text-parts.js +1 -1
  67. package/dist/render/lib/sections/section-to-box.d.ts +2 -0
  68. package/dist/render/lib/sections/section-to-box.js +1 -1
  69. package/package.json +1 -1
@@ -0,0 +1,2 @@
1
+ import { type SectionToBoxRow } from "../../../sections/section-to-box.js";
2
+ export declare const FORMS_SECTION_TO_BOX: Readonly<Record<string, SectionToBoxRow>>;
@@ -0,0 +1 @@
1
+ import{DIM as m,DROP_COMMON as t,DROP_SIDE_PADDING as e,SAME_KEYS as r,SECTION_BOX as n,TEXT as b,smallText as h,wrapperPad as s,wrapperPadKeys as i}from"./section-to-box-row-parts.js";const a={headPlacement:void 0},p={top:0,bottom:0,topPhone:0,bottomPhone:0},l=()=>({name:"Form",boxProps:o=>({...n,direction:"column",...s(o,p)}),box:[...r,...i(p)],parts:[{kind:"core",keep:"rest",props:a}],drop:{...t,...e}}),d={top:120,bottom:120,topPhone:60,bottomPhone:60},u=()=>({name:"Photo Submission Form",boxProps:o=>({...n,direction:"column",gap:24,...s(o,d)}),box:[...r,...i(d)],parts:[h("eyebrow"),{kind:"text",key:"title",role:"heading",props:b,style:{textStyle:"heading-2"},mark:"accentItalic"},{kind:"text",key:"body",role:"body",props:m},{kind:"core",as:"Form",keep:["formSlug"],rename:{buttonText:"submitText",consent:"finePrint"},props:a}],skip:o=>o.layout==="boxes"?`its words are in its two SubmitBox regions (layout "boxes"); this row reads only the section's own words`:void 0,drop:{...t,...e,layout:'the marker of the two-region drawing; a node that has it is skipped (above), so here it is never "boxes"',boxes:'the SubmitBox regions, drawn only under layout "boxes", which this row skips (above); without that marker they draw nothing'}}),x={Form:l(),SubmitBuild:u()};export{x as FORMS_SECTION_TO_BOX};
@@ -5,6 +5,8 @@ export type HeadOnlyRowExtension = {
5
5
  slots?: Readonly<Record<string, readonly SlotFill[]>>;
6
6
  partsAfter?: readonly PartRow[];
7
7
  drop?: Readonly<Record<string, string>>;
8
+ pressHeading?: boolean;
8
9
  };
9
10
  export declare function headOnlyRow(type: string, ext?: HeadOnlyRowExtension): SectionToBoxRow;
11
+ export declare const HEAD_ONLY_CARD_SEEDS: Readonly<Record<string, HeadOnlyRowExtension>>;
10
12
  export declare const HEAD_ONLY_SECTION_TO_BOX: Readonly<Record<string, SectionToBoxRow>>;
@@ -1 +1 @@
1
- import{SPLITTABLE_SECTIONS as h}from"../../../../../format/lib/sections/section-head-placement.js";import{SECTION_LABELS as P}from"../../../../../format/lib/document/section-catalog.js";import{SAME_KEYS as E,SECTION_BOX as T,innerPad as O}from"./section-to-box-row-parts.js";import{HEAD_BELOW as S,headLookOf as f,headReads as _,headTree as b}from"./section-head-looks.js";import{finiteNumber as u}from"../../../../../format/lib/finite-number.js";const g=["Collections","Events","FAQ","Footprint","GalleryB","LongRead","ProcessSteps","ProductGrid","RelatedProducts"],x=["FitmentFinder","FitmentTable","SpecTable"],r=(o,t)=>()=>({top:o,topPhone:t}),p=o=>t=>{const e=O(t,o).sectionPaddingTop;return{top:e,topPhone:e}},A={Collections:r(120,70),Events:r(120,70),FAQ:r(120,70),GalleryB:r(120,70),FitmentTable:r(120,80),SpecTable:r(120,80),LongRead:r(120,80),FitmentFinder:o=>o.layout==="bar"?{top:32,topPhone:20}:{top:80,topPhone:60},RelatedProducts:r(0,0),Footprint:p("Footprint"),ProcessSteps:p("ProcessSteps"),ProductGrid:o=>({top:u(o.padTop)??120,topPhone:0})};function F(o,t={}){const e=h[o],d=A[o];if(!e||!d)throw new Error(`section-to-box-rows-head: "${o}" has no head row or no head room`);const s=e.padKey,l=b(o),a=_(o),m=e.headRows.filter(n=>![e.num,e.title,e.description,"linkText","linkHref"].includes(n)),c={...Object.fromEntries(m.filter(n=>!(n in a)).map(n=>[n,"a head setting no Header Box part reads (lib/document/blocks/general/section-head-looks `headReads`)"])),...t.drop};return{name:P[o]??o,boxProps:n=>{const i=d(n);return{...T,direction:"column",gap:S[f(o)],sectionPaddingTop:i.top,sectionPaddingTopPhone:i.topPhone}},box:[...E,...s?[[s,"sectionPaddingTop",(n,i)=>d(i).top]]:[]],parts:[l,{kind:"core",keep:"rest",...s?{props:{[s]:0}}:{},...t.slots?{slots:t.slots}:{}},...t.partsAfter??[]],...Object.keys(a).length?{reads:a}:{},...Object.keys(c).length?{drop:c}:{}}}const N=Object.fromEntries(g.map(o=>[o,F(o)]));export{N as HEAD_ONLY_SECTION_TO_BOX,g as HEAD_ONLY_TYPES,x as HOST_ROW_HEAD_TYPES,F as headOnlyRow};
1
+ import{SPLITTABLE_SECTIONS as E}from"../../../../../format/lib/sections/section-head-placement.js";import{SECTION_LABELS as T}from"../../../../../format/lib/document/section-catalog.js";import{SAME_KEYS as O,SECTION_BOX as P,innerPad as S}from"./section-to-box-row-parts.js";import{HEAD_BELOW as _,headLookOf as h,headReads as f,headTree as u}from"./section-head-looks.js";import{finiteNumber as A}from"../../../../../format/lib/finite-number.js";import{CARD_TEMPLATE_SLOT as b}from"../../../../../format/lib/content/card-template.js";import{footprintCardSeed as g}from"../../../../../format/lib/document/blocks/general/Footprint/card-seed.js";const L=["Collections","Events","FAQ","Footprint","GalleryB","LongRead","ProcessSteps","ProductGrid","RelatedProducts"],Y=["FitmentTable","SpecTable"],n=(o,t)=>()=>({top:o,topPhone:t}),c=o=>t=>{const e=S(t,o).sectionPaddingTop;return{top:e,topPhone:e}},R={Collections:n(120,70),Events:n(120,70),FAQ:n(120,70),GalleryB:n(120,70),FitmentTable:n(120,80),SpecTable:n(120,80),LongRead:n(120,80),RelatedProducts:n(0,0),Footprint:c("Footprint"),ProcessSteps:c("ProcessSteps"),ProductGrid:o=>({top:A(o.padTop)??120,topPhone:0})};function H(o,t={}){const e=E[o],d=R[o];if(!e||!d)throw new Error(`section-to-box-rows-head: "${o}" has no head row or no head room`);const s=e.padKey,l=u(o),a=f(o),m=e.headRows.filter(r=>![e.num,e.title,e.description,"linkText","linkHref"].includes(r)),p={...Object.fromEntries(m.filter(r=>!(r in a)).map(r=>[r,"a head setting no Header Box part reads (lib/document/blocks/general/section-head-looks `headReads`)"])),...t.drop};return{name:T[o]??o,boxProps:r=>{const i=d(r);return{...P,direction:"column",gap:_[h(o)],sectionPaddingTop:i.top,sectionPaddingTopPhone:i.topPhone}},box:[...O,...s?[[s,"sectionPaddingTop",(r,i)=>d(i).top]]:[]],parts:[l,{kind:"core",keep:"rest",...s?{props:{[s]:0}}:{},...t.slots?{slots:t.slots}:{}},...t.partsAfter??[]],...Object.keys(a).length?{reads:a}:{},...Object.keys(p).length?{drop:p}:{},...t.pressHeading?{pressKeepsEmpty:[e.title]}:{}}}const k={Footprint:{slots:{[b]:[g()]},pressHeading:!0}},I=Object.fromEntries(L.map(o=>[o,H(o,k[o])]));export{k as HEAD_ONLY_CARD_SEEDS,I as HEAD_ONLY_SECTION_TO_BOX,L as HEAD_ONLY_TYPES,Y as HOST_ROW_HEAD_TYPES,H as headOnlyRow};
@@ -1,2 +1,3 @@
1
1
  import { type SectionToBoxRow } from "../../../sections/section-to-box.js";
2
2
  export declare const LOGOS_SECTION_TO_BOX: Readonly<Record<string, SectionToBoxRow>>;
3
+ export declare const logosPressStarter: () => Readonly<Record<string, unknown>>;
@@ -1 +1 @@
1
- import{hasWords as t}from"../../../sections/section-to-box.js";import{DROP_COMMON as d,DROP_SIDE_PADDING as i,INNER_BOX as l,SAME_KEYS as c,SECTION_BOX as p,TEXT as n,smallText as g,wrapperPad as s,wrapperPadKeys as m}from"./section-to-box-row-parts.js";import{finiteNumber as P}from"../../../../../format/lib/finite-number.js";const h={contained:!1},b=(o,e)=>({logos:[{kind:"list",key:o,name:"Logo",flat:!0,parts:[{kind:"block",type:"LogoBlock",box:["src",[e,"alt"]],when:(S,r)=>t(r?.src)||t(r?.[e])}]}]}),a=o=>{const e=P(o.bandPadding)??40;return{top:e,bottom:e,topPhone:e,bottomPhone:e}},k={...g("heading",{color:"labels",letterSpacing:.2}),props:{...n,align:"center"}},O={name:"Logos",boxProps:o=>({...p,direction:"column",gap:32,...s(o,a(o))}),box:[...c,...m(a),["bandPadding","sectionPaddingTop",(o,e)=>s(e,a(e)).sectionPaddingTop]],parts:[k,{kind:"core",keep:["columns","logoHeight","grayscale"],rename:{logosPerRow:"columns"},props:h,slots:b("items","alt")}],drop:{...d,...i,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)",headPlacement:"a Logos band has no split head (not in SPLITTABLE_SECTIONS): no stored node can hold one, and the converted block stores own-box"}},u={top:24,bottom:24,topPhone:24,bottomPhone:24},f={name:"Payment Methods",boxProps:o=>({...p,direction:"column",...s(o,u)}),box:[...c,...m(u)],skip:o=>t(o.dataSource)?"its payment methods come from a data source (a venue's Setup): a sourced list needs the card template (plan §3.2), not built yet":void 0,parts:[{kind:"group",name:"Methods",props:{...l,align:"center",gap:20,sectionBorder:{top:1,bottom:1},sectionPaddingTop:32,sectionPaddingBottom:32},parts:[{...g("heading",{color:"labels"}),props:{...n,align:"center"}},{kind:"core",keep:[],as:"Logos",props:{...h,look:"cards",grayscale:!1},slots:b("badges","label")},{kind:"group",name:"Reassurance",props:{...l,direction:"row",wrap:!0,justify:"center",gap:24},parts:[{kind:"list",key:"assurances",name:"Line",flat:!0,parts:[{kind:"text",key:"text",props:{...n,align:"center"},style:{size:13,color:"labels"}}]}]}]}],drop:{...d,...i,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)",dataSource:"empty: no source, so the authored badges above are the list (a node that names a source is skipped, see `skip`)"}},L={Logos:O,PaymentBadges:f};export{L as LOGOS_SECTION_TO_BOX};
1
+ import{hasWords as t}from"../../../sections/section-to-box.js";import{DROP_COMMON as d,DROP_SIDE_PADDING as i,INNER_BOX as l,SAME_KEYS as c,SECTION_BOX as p,TEXT as s,smallText as g,wrapperPad as n,wrapperPadKeys as m}from"./section-to-box-row-parts.js";import{finiteNumber as P}from"../../../../../format/lib/finite-number.js";import{LOGOS_PH as k,logosScaffoldItems as f}from"../../../../../format/lib/document/blocks/general/Logos/meta.js";const h={contained:!1},b=(o,e)=>({logos:[{kind:"list",key:o,name:"Logo",flat:!0,parts:[{kind:"block",type:"LogoBlock",box:["src",[e,"alt"]],when:(_,r)=>t(r?.src)||t(r?.[e])}]}]}),a=o=>{const e=P(o.bandPadding)??40;return{top:e,bottom:e,topPhone:e,bottomPhone:e}},O={...g("heading",{color:"labels",letterSpacing:.2}),props:{...s,align:"center"}},S={name:"Logos",boxProps:o=>({...p,direction:"column",gap:32,...n(o,a(o))}),box:[...c,...m(a),["bandPadding","sectionPaddingTop",(o,e)=>n(e,a(e)).sectionPaddingTop]],parts:[O,{kind:"core",keep:["columns","logoHeight","grayscale"],rename:{logosPerRow:"columns"},props:h,slots:b("items","alt")}],drop:{...d,...i,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)",headPlacement:"a Logos band has no split head (not in SPLITTABLE_SECTIONS): no stored node can hold one, and the converted block stores own-box"}},u={top:24,bottom:24,topPhone:24,bottomPhone:24},x={name:"Payment Methods",boxProps:o=>({...p,direction:"column",...n(o,u)}),box:[...c,...m(u)],skip:o=>t(o.dataSource)?"its payment methods come from a data source (a venue's Setup): a sourced list needs the card template (plan §3.2), not built yet":void 0,parts:[{kind:"group",name:"Methods",props:{...l,align:"center",gap:20,sectionBorder:{top:1,bottom:1},sectionPaddingTop:32,sectionPaddingBottom:32},parts:[{...g("heading",{color:"labels"}),props:{...s,align:"center"}},{kind:"core",keep:[],as:"Logos",props:{...h,look:"cards",grayscale:!1},slots:b("badges","label")},{kind:"group",name:"Reassurance",props:{...l,direction:"row",wrap:!0,justify:"center",gap:24},parts:[{kind:"list",key:"assurances",name:"Line",flat:!0,parts:[{kind:"text",key:"text",props:{...s,align:"center"},style:{size:13,color:"labels"}}]}]}]}],drop:{...d,...i,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)",dataSource:"empty: no source, so the authored badges above are the list (a node that names a source is skipped, see `skip`)"}},B={Logos:S,PaymentBadges:x},E=()=>({heading:k.heading,items:f()});export{B as LOGOS_SECTION_TO_BOX,E as logosPressStarter};
@@ -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 w,siteGutterOf as C,innerPadKeys as S,smallText as u,wrapperPad as b,wrapperPadKeys as P}from"./section-to-box-row-parts.js";import{CARDS_SECTION_TO_BOX as R}from"./section-to-box-rows-cards.js";import{normalizeSiteGutterPhone as D,siteGutterPhoneFollows as L}from"../../../../../format/lib/content/page-width.js";import{finiteNumber as W}from"../../../../../format/lib/finite-number.js";import{STATS_SECTION_TO_BOX as X}from"./section-to-box-rows-stats.js";import{LOGOS_SECTION_TO_BOX as G}from"./section-to-box-rows-logos.js";import{STRIP_SECTION_TO_BOX as M}from"./section-to-box-rows-strip.js";import{TIMELINE_SECTION_TO_BOX as F}from"./section-to-box-rows-timeline.js";import{LOCATIONS_SECTION_TO_BOX as z}from"./section-to-box-rows-locations.js";import{HEAD_ONLY_SECTION_TO_BOX as K}from"./section-to-box-rows-head.js";import{PAGE_HEADER_SECTION_TO_BOX as U}from"./section-to-box-rows-pageheader.js";import{DOCBODY_SECTION_TO_BOX as Y}from"./section-to-box-rows-docbody.js";import{EDITORIAL_SECTION_TO_BOX as j}from"./section-to-box-rows-editorial.js";import{fluidToken as q,headTree as f,token as r}from"./section-head-looks.js";import{boxPadding as J}from"../../../../../format/lib/document/seed-parts.js";const O={top:72,bottom:72,topPhone:72,bottomPhone:72},Q={name:"Editorial Text",boxProps:e=>({...p,direction:"column",gap:28,gapPhone:28,sectionBorder:{top:1},...b(e,O)}),box:[["topBorder","sectionBorder",e=>e===!1?void 0:{top:1}],...d,...P(O)],parts:[f("Prose"),{kind:"text",key:"body",props:m,style:{textStyle:"body-1",...r("body",16),lineHeight:1.7,paragraphSpacing:18}}],drop:{...s,...c,headPlacement:"needs a row per head placement: an own-box Prose draws no head (its words sit in a Section Header above it), the row always draws the head. 0 of 123 live nodes store it (the live export, 2026-10-24)"}},T={buttonPaddingTop:20,buttonPaddingBottom:20,buttonPaddingLeft:28,buttonPaddingRight:28},k=(e,n)=>n?.variant==="primary",_=(e,n)=>({kind:"list",key:"buttons",name:"Button",flat:!0,when:e,parts:[{kind:"button",key:"label",href:"href",when:k,variant:"primary",style:{letterSpacing:.3},props:{...g,...T,...n}},{kind:"button",key:"label",href:"href",when:(i,a)=>!k(i,a),variant:"ghost",style:{letterSpacing:.3},props:(i,a)=>({...g,...T,...n,...H(i,a)})}]}),h=e=>v(e.title),V={name:"Call-to-Action Heading",boxProps:e=>({...p,direction:"row",align:"center",justify:h(e)?"between":"end",gap:60,gapPhone:60,share:"content",sectionBorder:{bottom:1},...w(e,"TitleWithButtons")}),box:[...d,...S("TitleWithButtons")],parts:[{kind:"group",name:"Title",props:{...t,maxWidth:1e3,widthFitPhone:"fill"},parts:[{kind:"text",key:"title",role:"heading",props:l,style:{textStyle:"heading-1",...q("headingLarge",48,7,108),case:"upper",lineHeight:.94,letterSpacing:-.035}}]},{kind:"group",name:"Buttons",props:e=>({...t,gap:14,gapPhone:14,widthFitPhone:"fill",...h(e)?{minWidth:280,minWidthPhone:0}:{}}),parts:[_(h,{widthFit:"fill",iconPosition:"end"}),_(e=>!h(e),{})]}],drop:{...s,buttonsAlign:"moves the buttons only when there is no heading (4 of 128 live nodes), where the Box puts them at the end. 0 of 128 live nodes store it (the live export, 2026-10-24)",buttonsAlignPhone:"the phone's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Phone view's Block alignment row), so nothing moves",buttonsAlignTablet:"the tablet's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Tablet view's Block alignment row, 0 stored on the US sites 2026-11-05), so nothing moves"}};function Z(e){const{siteGutter:n,siteGutterPhone:i}=e.site??{},a=C(e),y=Math.min(20,D(i)??L(n));return{sectionPaddingLeft:a,sectionPaddingRight:a,sectionPaddingLeftPhone:y,sectionPaddingRightPhone:y}}const B={top:40,bottom:64,topPhone:24,bottomPhone:36},$={name:"Section Header",boxProps:(e,n)=>({...p,direction:"column",gap:0,...b(e,B),...Z(n)}),box:[...d,...P(B)],parts:[f("SectionHeader")],drop:{...s,...c,headStyle:"needs a row per head look: the row draws the standard look; the editorial, simple, statement, natural and essay looks are other layouts. 0 of 69 live nodes store it (the live export, 2026-10-24)",eyebrowLook:"read only by the simple, statement, natural and essay looks, which this row does not draw. 0 of 69 live nodes store it",rowGap:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",descriptionSize:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",numStyle:"Solid (the default; 4 of 69 live nodes store it) IS the eyebrow Text the row draws; Outlined (0 live) needs an outlined-number text look"}},x={...t,direction:"row",share:[67],gap:30},E={...t,sectionPaddingLeft:30,sectionPaddingLeftPhone:0},N=(e,n,i)=>({kind:"group",name:e,props:n,parts:[i]}),ee={name:"Lead Text",boxProps:e=>({...p,direction:"column",gap:40,gapPhone:40,sectionBorder:{bottom:1},...w(e,"ParagraphsA")}),box:[...d,...S("ParagraphsA")],parts:[{kind:"group",name:"Numbers",props:{...x,gapPhone:24,sectionBorder:{bottom:1},sectionPaddingBottom:40,sectionPaddingBottomPhone:40},parts:[{kind:"group",name:"Eyebrow",props:{...t,sectionPaddingTop:5,sectionPaddingBottom:1,sectionPaddingTopPhone:5,sectionPaddingBottomPhone:1},parts:[u("eyebrow",{color:"labels",...r("label",12),letterSpacing:.24})]},N("Stats column",t,{kind:"group",name:"Stats",props:{...E,gap:0,gapPhone:0},parts:[{kind:"list",key:"stats",name:"Stat",flat:!0,parts:[A("value","label",{...r("label",13),letterSpacing:.18,lineHeight:1.8})]}]})]},{kind:"group",name:"Words",props:{...x,gapPhone:28},parts:[{kind:"group",name:"Lead",props:t,parts:[{kind:"group",name:"Measure",props:{...t,maxWidth:780},parts:[{kind:"text",key:"lead",props:l,style:{textStyle:"heading-3",...r("headingSmall",22,20),weight:400,case:"none",lineHeight:1.45,letterSpacing:-.005}}]}]},N("Note column",{...t,justify:"end",widthFit:"fill"},{kind:"group",name:"Founders",props:{...E,gap:8,gapPhone:8},parts:[{kind:"group",name:"Note",props:{...t,gap:6,gapPhone:6},parts:[{kind:"text",key:"foundersHeading",props:l,style:{textStyle:"body-1",fontRole:"heading",...r("body",18,16),weight:500,letterSpacing:-.01,lineHeight:1.7}},{kind:"text",key:"foundersBody",props:m,style:{textStyle:"body-5",fontRole:"heading",...r("body",14,12),lineHeight:1.7}}]},u("attribution",{...r("label",12,10),letterSpacing:.24,lineHeight:1.7})]})]}],drop:{...s}},I={top:24,bottom:24,topPhone:24,bottomPhone:24},te={name:"Banner",boxProps:e=>({...p,direction:"column",gap:0,...b(e,I)}),box:[...d,"contained",...P(I)],parts:[{kind:"group",name:"Card",keepEmpty:!0,props:{...t,gap:28,placement:"top-left",darken:60,darkenStyle:"even",sectionBorder:{width:1},...J(64,40,40,24)},box:[["imageSrc","bgImage"],["overlay","darken",e=>Math.min(Math.max(W(e)??60,0),100)]],parts:[{kind:"group",name:"Words",props:{...t,gap:20},parts:[u("eyebrow"),{kind:"text",key:"title",role:"heading",props:{...l,maxWidth:680},style:{weight:500,lineHeight:1.05,letterSpacing:-.03,case:"none"}},{kind:"text",key:"body",props:{...m,maxWidth:680},style:{textStyle:"body-1",lineHeight:1.6},was:{size:16}}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:g}]}],drop:{...s,...c}},oe={Prose:Q,TitleWithButtons:V,SectionHeader:$,ParagraphsA:ee,Banner:te};function we(){o(oe),o(X),o(G),o(R),o(M),o(F),o(z),o(K),o(U),o(Y),o(j)}export{oe as GENERAL_SECTION_TO_BOX,we as registerGeneralSectionRows};
1
+ import{hasWords as v,registerSectionToBox as t}from"../../../sections/section-to-box.js";import{BUTTON as m,DIM as g,DROP_COMMON as s,DROP_SIDE_PADDING as c,INNER_BOX as o,leadLine as A,SAME_KEYS as d,SECTION_BOX as p,lineBorder as C,TEXT as l,innerPad as O,siteGutterOf as H,innerPadKeys as T,smallText as u,wrapperPad as b,wrapperPadKeys as P}from"./section-to-box-row-parts.js";import{CARDS_SECTION_TO_BOX as R}from"./section-to-box-rows-cards.js";import{normalizeSiteGutterPhone as D,siteGutterPhoneFollows as L}from"../../../../../format/lib/content/page-width.js";import{finiteNumber as W}from"../../../../../format/lib/finite-number.js";import{STATS_SECTION_TO_BOX as X}from"./section-to-box-rows-stats.js";import{LOGOS_SECTION_TO_BOX as G}from"./section-to-box-rows-logos.js";import{STRIP_SECTION_TO_BOX as M}from"./section-to-box-rows-strip.js";import{TIMELINE_SECTION_TO_BOX as F}from"./section-to-box-rows-timeline.js";import{LOCATIONS_SECTION_TO_BOX as z}from"./section-to-box-rows-locations.js";import{HEAD_ONLY_SECTION_TO_BOX as K}from"./section-to-box-rows-head.js";import{PAGE_HEADER_SECTION_TO_BOX as U}from"./section-to-box-rows-pageheader.js";import{DOCBODY_SECTION_TO_BOX as Y}from"./section-to-box-rows-docbody.js";import{EDITORIAL_SECTION_TO_BOX as j}from"./section-to-box-rows-editorial.js";import{FORMS_SECTION_TO_BOX as q}from"./section-to-box-rows-forms.js";import{FITMENT_SECTION_TO_BOX as J}from"./section-to-box-rows-fitment.js";import{fluidToken as Q,headTree as S,token as r}from"./section-head-looks.js";import{boxPadding as V}from"../../../../../format/lib/document/seed-parts.js";const w={top:72,bottom:72,topPhone:72,bottomPhone:72},Z={name:"Editorial Text",boxProps:e=>({...p,direction:"column",gap:28,gapPhone:28,sectionBorder:{top:1},...b(e,w)}),box:[["topBorder","sectionBorder",e=>e===!1?void 0:{top:1}],...d,...P(w)],parts:[S("Prose"),{kind:"text",key:"body",props:g,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)"}},f={buttonPaddingTop:20,buttonPaddingBottom:20,buttonPaddingLeft:28,buttonPaddingRight:28},_=(e,n)=>n?.variant==="primary",k=(e,n)=>({kind:"list",key:"buttons",name:"Button",flat:!0,when:e,parts:[{kind:"button",key:"label",href:"href",when:_,variant:"primary",style:{letterSpacing:.3},props:{...m,...f,...n}},{kind:"button",key:"label",href:"href",when:(i,a)=>!_(i,a),variant:"ghost",style:{letterSpacing:.3},props:(i,a)=>({...m,...f,...n,...C(i,a)})}]}),h=e=>v(e.title),$={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},...O(e,"TitleWithButtons")}),box:[...d,...T("TitleWithButtons")],parts:[{kind:"group",name:"Title",props:{...o,maxWidth:1e3,widthFitPhone:"fill"},parts:[{kind:"text",key:"title",role:"heading",props:l,style:{textStyle:"heading-1",...Q("headingLarge",48,7,108),case:"upper",lineHeight:.94,letterSpacing:-.035}}]},{kind:"group",name:"Buttons",props:e=>({...o,gap:14,gapPhone:14,widthFitPhone:"fill",...h(e)?{minWidth:280,minWidthPhone:0}:{}}),parts:[k(h,{widthFit:"fill",iconPosition:"end"}),k(e=>!h(e),{})]}],drop:{...s,buttonsAlign:"moves the buttons only when there is no heading (4 of 128 live nodes), where the Box puts them at the end. 0 of 128 live nodes store it (the live export, 2026-10-24)",buttonsAlignPhone:"the phone's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Phone view's Block alignment row), so nothing moves",buttonsAlignTablet:"the tablet's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Tablet view's Block alignment row, 0 stored on the US sites 2026-11-05), so nothing moves"}};function ee(e){const{siteGutter:n,siteGutterPhone:i}=e.site??{},a=H(e),y=Math.min(20,D(i)??L(n));return{sectionPaddingLeft:a,sectionPaddingRight:a,sectionPaddingLeftPhone:y,sectionPaddingRightPhone:y}}const B={top:40,bottom:64,topPhone:24,bottomPhone:36},te={name:"Section Header",boxProps:(e,n)=>({...p,direction:"column",gap:0,...b(e,B),...ee(n)}),box:[...d,...P(B)],parts:[S("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={...o,direction:"row",share:[67],gap:30},E={...o,sectionPaddingLeft:30,sectionPaddingLeftPhone:0},N=(e,n,i)=>({kind:"group",name:e,props:n,parts:[i]}),oe={name:"Lead Text",boxProps:e=>({...p,direction:"column",gap:40,gapPhone:40,sectionBorder:{bottom:1},...O(e,"ParagraphsA")}),box:[...d,...T("ParagraphsA")],parts:[{kind:"group",name:"Numbers",props:{...x,gapPhone:24,sectionBorder:{bottom:1},sectionPaddingBottom:40,sectionPaddingBottomPhone:40},parts:[{kind:"group",name:"Eyebrow",props:{...o,sectionPaddingTop:5,sectionPaddingBottom:1,sectionPaddingTopPhone:5,sectionPaddingBottomPhone:1},parts:[u("eyebrow",{color:"labels",...r("label",12),letterSpacing:.24})]},N("Stats column",o,{kind:"group",name:"Stats",props:{...E,gap:0,gapPhone:0},parts:[{kind:"list",key:"stats",name:"Stat",flat:!0,parts:[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:o,parts:[{kind:"group",name:"Measure",props:{...o,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",{...o,justify:"end",widthFit:"fill"},{kind:"group",name:"Founders",props:{...E,gap:8,gapPhone:8},parts:[{kind:"group",name:"Note",props:{...o,gap:6,gapPhone:6},parts:[{kind:"text",key:"foundersHeading",props:l,style:{textStyle:"body-1",fontRole:"heading",...r("body",18,16),weight:500,letterSpacing:-.01,lineHeight:1.7}},{kind:"text",key:"foundersBody",props:g,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},ne={name:"Banner",boxProps:e=>({...p,direction:"column",gap:0,...b(e,I)}),box:[...d,"contained",...P(I)],parts:[{kind:"group",name:"Card",keepEmpty:!0,props:{...o,gap:28,placement:"top-left",darken:60,darkenStyle:"even",sectionBorder:{width:1},...V(64,40,40,24)},box:[["imageSrc","bgImage"],["overlay","darken",e=>Math.min(Math.max(W(e)??60,0),100)]],parts:[{kind:"group",name:"Words",props:{...o,gap:20},parts:[u("eyebrow"),{kind:"text",key:"title",role:"heading",props:{...l,maxWidth:680},style:{weight:500,lineHeight:1.05,letterSpacing:-.03,case:"none"}},{kind:"text",key:"body",props:{...g,maxWidth:680},style:{textStyle:"body-1",lineHeight:1.6},was:{size:16}}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:m}]}],drop:{...s,...c}},ie={Prose:Z,TitleWithButtons:$,SectionHeader:te,ParagraphsA:oe,Banner:ne};function fe(){t(ie),t(X),t(G),t(R),t(M),t(F),t(z),t(K),t(U),t(Y),t(j),t(q),t(J)}export{ie as GENERAL_SECTION_TO_BOX,fe as registerGeneralSectionRows};
@@ -12,8 +12,8 @@ export declare const VIDEO_FILE_LABEL = "Video file";
12
12
  export declare const VIDEO_FILE_PROMPT = "Upload a video file";
13
13
  export declare function forMediaType(type: "image" | "video", fallback: "image" | "video"): {
14
14
  readonly field: "mediaType";
15
- readonly is: "video" | "image";
16
- readonly default: "video" | "image";
15
+ readonly is: "image" | "video";
16
+ readonly default: "image" | "video";
17
17
  };
18
18
  export declare const HERO_MEDIA_PART_TYPES: ReadonlySet<string>;
19
19
  export declare function inPart<F extends object>(part: HeroMediaPart, field: F): F;
@@ -1,2 +1,2 @@
1
- import{textStyleCaseCss as J,textStyleCaseOfCss as Q}from"efficient-easel/draw";import{FONT_OPTIONS as tt,fontOption as et,fontRoleOf as z,SIZE_STEP_OF_ROLE as $}from"../../../format/lib/fonts.js";import{encodePartKey as nt}from"../../../format/lib/document/part-key.js";import{decodePartId as D,normalizePartText as O}from"./text-parts.js";import{partInkCss as ot}from"../../../format/lib/document/part-inks.js";import{regionStyle as rt}from"../../../format/lib/sections/text-regions.js";import{PHONE_MEDIA as it,TABLET_MEDIA as at,viewOverrides as st}from"../content/view-values.js";import{plainRecord as w,propsWithPartRecord as ft,readPartRecord as ct,readPartRecords as lt}from"../../../format/lib/document/part-records.js";const N="_partStyles",ut="data-sf-part-styled",v="data-sf-text-style",pt=/^(heading|body)-[1-7]$/;function m(t){return typeof t=="string"&&pt.test(t)}const C={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function dt(t){if(!t)return null;for(const[e,n]of Object.entries(C))if(n===t)return e;return null}function be(t){if(m(t.textStyle))return t.textStyle;const e=z(t.role);return e?C[e]:void 0}const xt=[400,500,600,700],_=["left","center","right","justify"],y=5,k=1e3,ht=-5,St=10,mt=0,gt=64,bt=2,W={size:{min:y,max:k,step:1},sizeTablet:{min:y,max:k,step:1},sizePhone:{min:y,max:k,step:1},padding:{min:mt,max:gt,step:bt}},Pt=.05,Tt=.01,Rt=["line","letter"],zt=.5,_t=2.5,At=-1,Et=1,$t=0,Ot=400,wt=[...new Set(Object.values($))];function Pe(t){return[`${t} { transition: translate var(--page-motion-hover-duration) var(--page-ease-media) var(--page-motion-hover-delay) }`,`${t}:hover, ${t}:active { translate: 0 calc(-1 * var(--page-hover-lift)) }`]}function Te(t){return lt(t,N)}function G(t,e){return ct(t,N,e)}function Re(t,e){return Object.values(G(t,e)).filter(n=>n!==void 0).length}function K(t,e,n){return ft(t,N,e,Nt(n).length?n:null)}function Nt(t){return Object.entries(t).filter(([,e])=>e!==void 0)}function yt(t){return Rt.includes(t)}const T=(t,e,n)=>Math.min(n,Math.max(e,t));function kt(t,e){if(yt(t)){const n=Math.round(Number(e));return!Number.isFinite(n)||n===0?null:T(n,ht,St)}if(t==="lineHeight"){const n=Number(e);return Number.isFinite(n)?b(T(n,zt,_t),3):null}if(t==="letterSpacing"){const n=Number(e);return Number.isFinite(n)?b(T(n,At,Et),4):null}if(t==="paragraphSpacing"){const n=Math.round(Number(e));return!Number.isFinite(n)||n<=0?null:T(n,$t,Ot)}if(Object.hasOwn(W,t)){const{min:n,max:o}=W[t],r=Math.round(Number(e));return Number.isFinite(r)?T(r,n,o):null}return t==="italic"?typeof e=="boolean"?e:null:t==="role"||t==="fontRole"?z(e)?e:null:t==="sizeToken"?I(e)?e:null:t==="textStyle"?m(e)?e:null:t==="alignPhone"?_.includes(e)?e:null:e}const It=["weight","size","sizeTablet","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding"];function R(t){let e=null;const n=o=>{e??={...t},delete e[o]};for(const o of It){const r=t[o];r!==void 0&&!(typeof r=="number"&&Number.isFinite(r))&&n(o)}return t.align!==void 0&&!_.includes(t.align)&&n("align"),t.alignPhone!==void 0&&!_.includes(t.alignPhone)&&n("alignPhone"),t.textStyle!==void 0&&!m(t.textStyle)&&n("textStyle"),t.sizeToken!==void 0&&!I(t.sizeToken)&&n("sizeToken"),t.fontRole!==void 0&&!z(t.fontRole)&&n("fontRole"),e??t}function I(t){if(!t||typeof t!="object")return!1;const{step:e,px:n,stepPhone:o,pxPhone:r,fluid:i}=t,s=a=>typeof a=="number"&&Number.isFinite(a)&&a>0,f=a=>typeof a=="string"&&wt.includes(a);return f(e)&&s(n)&&(o===void 0||f(o))&&(r===void 0||s(r))&&(i===void 0||Ft(i,n))}function Ft(t,e){if(!t||typeof t!="object"||Array.isArray(t))return!1;const{minPx:n,vw:o,...r}=t;return Object.keys(r).length===0&&typeof n=="number"&&Number.isFinite(n)&&n>0&&n<e&&typeof o=="number"&&Number.isFinite(o)&&o>0&&o<=100}function F(t){return t?.pxPhone&&I(t)?{step:t.stepPhone??t.step,px:t.pxPhone}:null}function B({step:t,px:e,fluid:n}){const o=n?`clamp(${n.minPx}px, ${n.vw}vw, ${e}px)`:`${e}px`,r=`var(--size-${t}, ${o})`;return t.startsWith("heading")?`min(${r}, var(--sf-heading-max,9999px))`:r}const Mt=[["font","role"],["font","fontRole"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function Lt(t){const e=[];for(const[n,o]of Mt)n===t?e.push(o):o===t&&e.push(n);return e}function ze(t,e,n,o){const r={...G(t,e)},i=o==null?null:kt(n,o);if(i===null)delete r[n];else{r[n]=i;for(const s of Lt(n))delete r[s]}return K(t,e,r)}function _e(t,e){return K(t,e,{})}function jt(t){return Q(t)??"none"}function Ht(t){return J(t)??""}const X={heading:"--font-role-heading",heading2:"--font-role-heading2",heading3:"--font-role-heading3",body:"--font-role-body",accent:"--font-role-accent",label:"--font-role-label"};function Dt(t,e){const n=z(t.role);return n||(e?.blockDrawsStyle?null:dt(t.textStyle))}function Ae(t,e){return t==="Text"&&e==="text"}const vt={headingLarge:"min(clamp(64px,9vw,144px), var(--sf-heading-max,9999px))",headingMedium:"min(32px, var(--sf-heading-max,9999px))",headingSmall:"min(24px, var(--sf-heading-max,9999px))",accent:"32px",body:"14px",label:"12px"};function Ct(t){const e=$[t],n=vt[e];return n?`var(--size-${e}, ${n})`:`var(--size-${e})`}function Wt(t){const e={};return typeof t.lineHeight=="number"?e.lineHeight=t.lineHeight:t.line&&(e.lineHeight=b(Gt+t.line*Pt,3)),typeof t.letterSpacing=="number"?e.letterSpacingEm=t.letterSpacing:t.letter&&(e.letterSpacingEm=b(t.letter*Tt,4)),e}const Gt=1,g="--sf-part-para";function Kt(t){t=R(t);const e={};if(typeof t.sizePhone=="number"&&t.sizePhone>0)e.fontSize=`${t.sizePhone}px`;else{const n=F(t.sizeToken);if(n)e.fontSize=B(n);else{const o=A(t);o!==void 0&&(e.fontSize=`${o}px`)}}return t.alignPhone&&(e.textAlign=t.alignPhone),e}function A(t){const e=st("textSize",t.size,t.sizeTablet,void 0).tablet;return e&&e>0?e:void 0}function Bt(t){const e=A(R(t));return e===void 0?{}:{fontSize:`${e}px`}}function Xt(t,e){if(e==="desktop")return t;const n=R(t),o=A(n);if(e==="tablet")return o===void 0?t:{...t,size:o};let r=t;if(typeof n.sizePhone=="number"&&n.sizePhone>0)r={...r,size:n.sizePhone};else{const i=F(n.sizeToken);i?r={...r,size:void 0,sizeToken:i}:o!==void 0&&(r={...r,size:o})}return n.alignPhone&&(r={...r,align:n.alignPhone}),r}function M(t,e,n){return L(Xt(t,e),E,n)}function Ut(t){return t==="mobile"?"sizePhone":t==="tablet"?"sizeTablet":"size"}function Ee(t,e){if(e==="desktop")return null;const n=R(t);if(e==="mobile"){if(F(n.sizeToken))return null;const o=A(n);if(o!==void 0)return{px:o,view:"tablet"}}return typeof n.size=="number"&&n.size>0?{px:n.size,view:"desktop"}:null}function U(t,e){const n=Ut(e);if(!Object.hasOwn(t,n))return t;const o={...t};return delete o[n],o}function $e(t,e,n){const o=M(U(t,e),e,n);return{fontFamily:o.fontFamily,fontSize:o.fontSize}}function L(t,e,n){t=R(t);const o=Dt(t,n),r=Wt(t),i=t.size?`${t.size}px`:t.sizeToken?B(t.sizeToken):o?Ct(o):"";return{fontFamily:t.font?qt(t.font):t.fontRole?`var(${X[t.fontRole]})`:o?`var(${X[o]})`:"",fontWeight:t.weight?String(t.weight):"",fontSize:i,minWidth:i?"0":"",overflowWrap:i?"break-word":"",lineHeight:r.lineHeight!==void 0?String(r.lineHeight):"",letterSpacing:r.letterSpacingEm!==void 0?`${r.letterSpacingEm}em`:"",[g]:t.paragraphSpacing?`${t.paragraphSpacing}px`:"",textTransform:Ht(t.case),textAlign:t.align??"",paddingTop:V(t.padding),paddingBottom:V(t.padding),color:Vt(t.color),fontStyle:t.italic===!0?"italic":t.italic===!1?"normal":""}}const Vt=t=>ot(t),V=t=>t===void 0?"":`${t}px`,b=(t,e)=>Number(t.toFixed(e));function Oe(t,e){const n=Number.parseFloat(t.fontSize)||16,o=Number.parseFloat(t.lineHeight),r=Number.parseFloat(t.letterSpacing),i=Number.parseFloat(t.paddingTop);return{fontKey:e,sizePx:n,weight:Yt(Number.parseInt(t.fontWeight,10)),lineRatio:Number.isFinite(o)?b(o/n,3):1.2,letterEm:Number.isFinite(r)?b(r/n,4):0,align:Zt(t.textAlign),case:jt(t.textTransform),paddingPx:Number.isFinite(i)?Math.round(i):0}}function Yt(t){return Number.isFinite(t)?xt.reduce((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e):400}function Zt(t){for(const e of _)if(e===t)return e;return t==="end"?"right":"left"}function we(t,e){const n=Y(t);if(!n)return"";for(const o of tt)if(Y(e(o.cssVar))===n)return o.key;return""}const Y=t=>(t.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function qt(t){const e=et(t);return e?`var(${e.cssVar})`:""}function Ne(t,e,n,o){return!e||D(e)?.nodeId!==t?null:n.find(i=>o(i.getAttribute("class")))??n[0]??null}function Jt(t,e){return Object.hasOwn(t,e)?w(t[e])??{}:{}}function ye(t,e,n=()=>E,o=f=>f,r=ee,i="desktop",s=()=>!1){let f=0;for(const{element:a,partId:u}of t){const c=D(u)?.propKey;if(!c)continue;const p=Jt(e,o(c)),x=M(p,i,{blockDrawsStyle:s(c)});m(p.textStyle)?a.setAttribute?.(v,p.textStyle):a.removeAttribute?.(v);const d=H.some(h=>a.style[h]);let l=!1;for(const[h,S]of Object.entries(x))re(a,h,S),S&&(l=!0);if(d||H.some(h=>x[h]))for(const h of Qt(a,r))for(const S of H)h.style[S]=x[S]??"";l&&(f+=1)}return f}function Qt(t,e){const n=O(t.textContent??""),o=[];let r=t;for(let i=0;i<te&&e(r);i+=1){const s=r.parentElement;if(!s||O(s.textContent??"")!==n)break;o.push(s),r=s}return o}const te=8;function ee(t){const e=t;return typeof window>"u"||!e?.ownerDocument?!1:window.getComputedStyle(e).display==="inline"}const E={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0};function ne(t){if(!t||typeof t!="object")return null;const e={};return m(t.textStyle)&&(e.textStyle=t.textStyle),typeof t.size=="number"&&t.size>0&&(e.size=t.size),typeof t.sizeTablet=="number"&&t.sizeTablet>0&&(e.sizeTablet=t.sizeTablet),typeof t.sizePhone=="number"&&t.sizePhone>0&&(e.sizePhone=t.sizePhone),Object.keys(e).length?e:null}function oe(t,e){const n=ne(t);if(!n)return{};const o=M(n,e);return{...o.fontFamily?{fontFamily:o.fontFamily}:{},...o.fontSize?{fontSize:o.fontSize}:{}}}function ke(t){return m(t?.textStyle)||!!t?.role||typeof t?.size=="number"&&t.size>0}function Ie(t,e,n){if(!t||typeof t!="object")return{};const o=rt(t.role,e,$)??{},r=e.sized?oe(U(t,n),n):{};return{...o,...r}}function Fe(t,e,n){n.fontFamily&&t.fontFamily===n.fontFamily&&(t.fontFamily=e.fontFamily),n.fontSize&&t.fontSize===n.fontSize&&(t.fontSize=e.fontSize)}function re(t,e,n){if(!e.startsWith("--")){t.style[e]=n;return}const o=t.style;typeof o.setProperty=="function"?n?o.setProperty(e,n):o.removeProperty?.(e):o[e]=n;const r=t;e===g&&(n?r.setAttribute?.(Z,""):r.removeAttribute?.(Z))}const Z="data-sf-part-para",ie=Object.keys(L({},E)),j=new Set(["color","overflowWrap",g,"fontStyle"]),H=ie.filter(t=>!j.has(t));function Me(t,e,n,o=f=>f,r=()=>!1,i=()=>null,s=[]){const f=new Map;for(const c of t){const p=nt(c.key,c.row);for(const x of c.texts){const d=f.get(x);d?(d.keys.add(c.key),d.partKeys.add(p)):f.set(x,{keys:new Set([c.key]),partKeys:new Set([p])})}}const a=new Map;for(const c of new Set([...Object.keys(e),...s])){if(!ae(c))continue;const p=q(n,c,w(e[c])??{},!1,i(c));p&&a.set(c,p)}const u=new Map;for(const[c,{keys:p,partKeys:x}]of f){const d=x.size===1?[...x][0]:p.size===1?[...p][0]:null;if(!d)continue;const l=o(d),P=i(l);if(!Object.hasOwn(e,l)&&!P)continue;const h=w(e[l])??{},S=q(n,d,h,r(d),P);S&&u.set(c,S)}return u.size||a.size?{rules:u,kindRules:a,drawn:new Set(f.keys())}:null}function q(t,e,n,o,r){const i=L(n,E,{blockDrawsStyle:o}),s=Bt(n),f=Kt(n),a=m(n.textStyle)?n.textStyle:void 0;return!Object.values(i).some(Boolean)&&!Object.keys(s).length&&!Object.keys(f).length&&!a&&!r?null:{stamp:se(t,e),declarations:i,...Object.keys(s).length?{tablet:s}:{},...Object.keys(f).length?{phone:f}:{},...a?{textStyle:a}:{},...r?{motion:r}:{}}}function ae(t){return t.startsWith("@")}function Le(t,e){return t?.kindRules.get(e)??null}function se(t,e){const n=o=>o.replace(/[^A-Za-z0-9_-]+/g,"-");return`${n(t)}~${n(e)}`}function je(t){const e=[],n=new Set,o=r=>{const{stamp:i,declarations:s}=r;if(n.has(i))return;n.add(i);const f=Object.entries(s).filter(([,l])=>l!==""),a=l=>l.map(([P,h])=>`${ce(P)}: ${h}`).join("; "),u=`[${ut}="${i}"]`,c=f.filter(([l])=>!j.has(l)),p=f.filter(([l])=>j.has(l));c.length&&e.push(`${u}, *:has(> ${u}) { ${a(c)} }`),p.length&&e.push(`${u} { ${a(p)} }`),s[g]&&(e.push(`*:has(> ${u}) { ${g}: ${s[g]} }`),e.push(...fe(u,`*:has(> ${u})`)));const x=Object.entries(r.tablet??{}).filter(([,l])=>l!=="");x.length&&e.push(`@media ${at} { ${u}, *:has(> ${u}) { ${a(x)} } }`);const d=Object.entries(r.phone??{}).filter(([,l])=>l!=="");d.length&&e.push(`@media ${it} { ${u}, *:has(> ${u}) { ${a(d)} } }`)};for(const r of t.rules.values())o(r);for(const r of t.kindRules.values())o(r);return e.join(`
2
- `)}function fe(t,e){const n=`var(${g})`,o=":is([data-sf-bullet], [data-sf-number])";return[`${t} br:not(br + br) { display: block; content: ""; margin-top: ${n} }`,`${t} ${o}:not(:first-child) { margin-top: ${n} }`,`${t} ${o}:not(:last-child) { margin-bottom: ${n} }`,`:is(${e}) + :is(${e}) { margin-top: ${n} }`]}const ce=t=>t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`);function He(t,e){if(!t)return null;const n=O(e),o=t.rules.get(n);if(o)return o;if(n.length<le||t.drawn.has(n))return null;let r=null;for(const[i,s]of t.rules)if(i.includes(n)){if(r&&r.stamp!==s.stamp)return null;r=s}return r}const le=8;export{_ as PART_ALIGNS,Et as PART_LETTER_EM_MAX,At as PART_LETTER_EM_MIN,Tt as PART_LETTER_STEP,_t as PART_LINE_HEIGHT_MAX,zt as PART_LINE_HEIGHT_MIN,Pt as PART_LINE_STEP,W as PART_MEASURED_TRACKS,St as PART_NUDGE_MAX,ht as PART_NUDGE_MIN,gt as PART_PADDING_MAX,mt as PART_PADDING_MIN,bt as PART_PADDING_STEP,Z as PART_PARAGRAPH_ATTR,Ot as PART_PARAGRAPH_MAX,$t as PART_PARAGRAPH_MIN,g as PART_PARAGRAPH_VAR,Rt as PART_RELATIVE_PROPS,k as PART_SIZE_MAX,y as PART_SIZE_MIN,wt as PART_SIZE_STEPS,ut as PART_STYLED_ATTR,N as PART_STYLES_PROP,ie as PART_STYLE_PROPERTIES,xt as PART_WEIGHTS,H as SHARED_PART_PROPERTIES,C as STYLE_ID_OF_ROLE,v as TEXT_STYLE_ATTR,ye as applyPartStyles,Ae as blockDrawsTextStyle,be as followedStyleOf,ae as isPartKindKey,m as isTextStyleId,fe as paragraphRules,M as partCanvasDeclarations,jt as partCaseOfTransform,Ht as partCaseTransform,we as partFontKeyOf,Pe as partLiftRules,Kt as partPhoneDeclarations,Le as partRuleForKind,He as partRuleForText,$e as partShownDeclarations,Ut as partSizeBoxOf,Ee as partSizeFollowed,Wt as partSpacingOf,Oe as partStyleBase,Re as partStyleCount,je as partStyleCss,L as partStyleDeclarations,Xt as partStyleForScreen,Ne as partStyleSource,U as partStyleWithoutSizeBox,Bt as partTabletDeclarations,ze as propsWithPartStyleValue,_e as propsWithoutPartStyle,Me as publishedPartStyles,G as readPartStyle,Te as readPartStyles,oe as regionCanvasDeclarations,Fe as regionCanvasRestore,ke as regionHasOwnLook,ne as regionSheetStyle,Ie as regionShownDeclarations,Jt as storedPartStyle};
1
+ import{textStyleCaseCss as Q,textStyleCaseOfCss as tt}from"efficient-easel/draw";import{FONT_OPTIONS as et,fontOption as nt,fontRoleOf as z,SIZE_STEP_OF_ROLE as $}from"../../../format/lib/fonts.js";import{encodePartKey as D}from"../../../format/lib/document/part-key.js";import{decodePartId as v,normalizePartText as w}from"./text-parts.js";import{partInkCss as ot}from"../../../format/lib/document/part-inks.js";import{regionStyle as rt}from"../../../format/lib/sections/text-regions.js";import{PHONE_MEDIA as it,TABLET_MEDIA as at,viewOverrides as st}from"../content/view-values.js";import{plainRecord as O,propsWithPartRecord as ft,readPartRecord as ct,readPartRecords as lt}from"../../../format/lib/document/part-records.js";const N="_partStyles",ut="data-sf-part-styled",C="data-sf-text-style",pt=/^(heading|body)-[1-7]$/;function S(t){return typeof t=="string"&&pt.test(t)}const W={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function dt(t){if(!t)return null;for(const[e,n]of Object.entries(W))if(n===t)return e;return null}function be(t){if(S(t.textStyle))return t.textStyle;const e=z(t.role);return e?W[e]:void 0}const xt=[400,500,600,700],_=["left","center","right","justify"],y=5,k=1e3,ht=-5,St=10,mt=0,gt=64,bt=2,G={size:{min:y,max:k,step:1},sizeTablet:{min:y,max:k,step:1},sizePhone:{min:y,max:k,step:1},padding:{min:mt,max:gt,step:bt}},Pt=.05,Tt=.01,Rt=["line","letter"],zt=.5,_t=2.5,At=-1,Et=1,$t=0,wt=400,Ot=[...new Set(Object.values($))];function Pe(t){return[`${t} { transition: translate var(--page-motion-hover-duration) var(--page-ease-media) var(--page-motion-hover-delay) }`,`${t}:hover, ${t}:active { translate: 0 calc(-1 * var(--page-hover-lift)) }`]}function Te(t){return lt(t,N)}function B(t,e){return ct(t,N,e)}function Re(t,e){return Object.values(B(t,e)).filter(n=>n!==void 0).length}function K(t,e,n){return ft(t,N,e,Nt(n).length?n:null)}function Nt(t){return Object.entries(t).filter(([,e])=>e!==void 0)}function yt(t){return Rt.includes(t)}const T=(t,e,n)=>Math.min(n,Math.max(e,t));function kt(t,e){if(yt(t)){const n=Math.round(Number(e));return!Number.isFinite(n)||n===0?null:T(n,ht,St)}if(t==="lineHeight"){const n=Number(e);return Number.isFinite(n)?g(T(n,zt,_t),3):null}if(t==="letterSpacing"){const n=Number(e);return Number.isFinite(n)?g(T(n,At,Et),4):null}if(t==="paragraphSpacing"){const n=Math.round(Number(e));return!Number.isFinite(n)||n<=0?null:T(n,$t,wt)}if(Object.hasOwn(G,t)){const{min:n,max:o}=G[t],r=Math.round(Number(e));return Number.isFinite(r)?T(r,n,o):null}return t==="italic"?typeof e=="boolean"?e:null:t==="role"||t==="fontRole"?z(e)?e:null:t==="sizeToken"?I(e)?e:null:t==="textStyle"?S(e)?e:null:t==="alignPhone"?_.includes(e)?e:null:e}const It=["weight","size","sizeTablet","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding"];function R(t){let e=null;const n=o=>{e??={...t},delete e[o]};for(const o of It){const r=t[o];r!==void 0&&!(typeof r=="number"&&Number.isFinite(r))&&n(o)}return t.align!==void 0&&!_.includes(t.align)&&n("align"),t.alignPhone!==void 0&&!_.includes(t.alignPhone)&&n("alignPhone"),t.textStyle!==void 0&&!S(t.textStyle)&&n("textStyle"),t.sizeToken!==void 0&&!I(t.sizeToken)&&n("sizeToken"),t.fontRole!==void 0&&!z(t.fontRole)&&n("fontRole"),e??t}function I(t){if(!t||typeof t!="object")return!1;const{step:e,px:n,stepPhone:o,pxPhone:r,fluid:i}=t,f=s=>typeof s=="number"&&Number.isFinite(s)&&s>0,u=s=>typeof s=="string"&&Ot.includes(s);return u(e)&&f(n)&&(o===void 0||u(o))&&(r===void 0||f(r))&&(i===void 0||Ft(i,n))}function Ft(t,e){if(!t||typeof t!="object"||Array.isArray(t))return!1;const{minPx:n,vw:o,...r}=t;return Object.keys(r).length===0&&typeof n=="number"&&Number.isFinite(n)&&n>0&&n<e&&typeof o=="number"&&Number.isFinite(o)&&o>0&&o<=100}function F(t){return t?.pxPhone&&I(t)?{step:t.stepPhone??t.step,px:t.pxPhone}:null}function X({step:t,px:e,fluid:n}){const o=n?`clamp(${n.minPx}px, ${n.vw}vw, ${e}px)`:`${e}px`,r=`var(--size-${t}, ${o})`;return t.startsWith("heading")?`min(${r}, var(--sf-heading-max,9999px))`:r}const Mt=[["font","role"],["font","fontRole"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function Lt(t){const e=[];for(const[n,o]of Mt)n===t?e.push(o):o===t&&e.push(n);return e}function ze(t,e,n,o){const r={...B(t,e)},i=o==null?null:kt(n,o);if(i===null)delete r[n];else{r[n]=i;for(const f of Lt(n))delete r[f]}return K(t,e,r)}function _e(t,e){return K(t,e,{})}function jt(t){return tt(t)??"none"}function Ht(t){return Q(t)??""}const U={heading:"--font-role-heading",heading2:"--font-role-heading2",heading3:"--font-role-heading3",body:"--font-role-body",accent:"--font-role-accent",label:"--font-role-label"};function Dt(t,e){const n=z(t.role);return n||(e?.blockDrawsStyle?null:dt(t.textStyle))}function Ae(t,e){return t==="Text"&&e==="text"}const vt={headingLarge:"min(clamp(64px,9vw,144px), var(--sf-heading-max,9999px))",headingMedium:"min(32px, var(--sf-heading-max,9999px))",headingSmall:"min(24px, var(--sf-heading-max,9999px))",accent:"32px",body:"14px",label:"12px"};function Ct(t){const e=$[t],n=vt[e];return n?`var(--size-${e}, ${n})`:`var(--size-${e})`}function Wt(t){const e={};return typeof t.lineHeight=="number"?e.lineHeight=t.lineHeight:t.line&&(e.lineHeight=g(Gt+t.line*Pt,3)),typeof t.letterSpacing=="number"?e.letterSpacingEm=t.letterSpacing:t.letter&&(e.letterSpacingEm=g(t.letter*Tt,4)),e}const Gt=1,m="--sf-part-para";function Bt(t){t=R(t);const e={};if(typeof t.sizePhone=="number"&&t.sizePhone>0)e.fontSize=`${t.sizePhone}px`;else{const n=F(t.sizeToken);if(n)e.fontSize=X(n);else{const o=A(t);o!==void 0&&(e.fontSize=`${o}px`)}}return t.alignPhone&&(e.textAlign=t.alignPhone),e}function A(t){const e=st("textSize",t.size,t.sizeTablet,void 0).tablet;return e&&e>0?e:void 0}function Kt(t){const e=A(R(t));return e===void 0?{}:{fontSize:`${e}px`}}function Xt(t,e){if(e==="desktop")return t;const n=R(t),o=A(n);if(e==="tablet")return o===void 0?t:{...t,size:o};let r=t;if(typeof n.sizePhone=="number"&&n.sizePhone>0)r={...r,size:n.sizePhone};else{const i=F(n.sizeToken);i?r={...r,size:void 0,sizeToken:i}:o!==void 0&&(r={...r,size:o})}return n.alignPhone&&(r={...r,align:n.alignPhone}),r}function M(t,e,n){return L(Xt(t,e),E,n)}function Ut(t){return t==="mobile"?"sizePhone":t==="tablet"?"sizeTablet":"size"}function Ee(t,e){if(e==="desktop")return null;const n=R(t);if(e==="mobile"){if(F(n.sizeToken))return null;const o=A(n);if(o!==void 0)return{px:o,view:"tablet"}}return typeof n.size=="number"&&n.size>0?{px:n.size,view:"desktop"}:null}function V(t,e){const n=Ut(e);if(!Object.hasOwn(t,n))return t;const o={...t};return delete o[n],o}function $e(t,e,n){const o=M(V(t,e),e,n);return{fontFamily:o.fontFamily,fontSize:o.fontSize}}function L(t,e,n){t=R(t);const o=Dt(t,n),r=Wt(t),i=t.size?`${t.size}px`:t.sizeToken?X(t.sizeToken):o?Ct(o):"";return{fontFamily:t.font?qt(t.font):t.fontRole?`var(${U[t.fontRole]})`:o?`var(${U[o]})`:"",fontWeight:t.weight?String(t.weight):"",fontSize:i,minWidth:i?"0":"",overflowWrap:i?"break-word":"",lineHeight:r.lineHeight!==void 0?String(r.lineHeight):"",letterSpacing:r.letterSpacingEm!==void 0?`${r.letterSpacingEm}em`:"",[m]:t.paragraphSpacing?`${t.paragraphSpacing}px`:"",textTransform:Ht(t.case),textAlign:t.align??"",paddingTop:Y(t.padding),paddingBottom:Y(t.padding),color:Vt(t.color),fontStyle:t.italic===!0?"italic":t.italic===!1?"normal":""}}const Vt=t=>ot(t),Y=t=>t===void 0?"":`${t}px`,g=(t,e)=>Number(t.toFixed(e));function we(t,e){const n=Number.parseFloat(t.fontSize)||16,o=Number.parseFloat(t.lineHeight),r=Number.parseFloat(t.letterSpacing),i=Number.parseFloat(t.paddingTop);return{fontKey:e,sizePx:n,weight:Yt(Number.parseInt(t.fontWeight,10)),lineRatio:Number.isFinite(o)?g(o/n,3):1.2,letterEm:Number.isFinite(r)?g(r/n,4):0,align:Zt(t.textAlign),case:jt(t.textTransform),paddingPx:Number.isFinite(i)?Math.round(i):0}}function Yt(t){return Number.isFinite(t)?xt.reduce((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e):400}function Zt(t){for(const e of _)if(e===t)return e;return t==="end"?"right":"left"}function Oe(t,e){const n=Z(t);if(!n)return"";for(const o of et)if(Z(e(o.cssVar))===n)return o.key;return""}const Z=t=>(t.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function qt(t){const e=nt(t);return e?`var(${e.cssVar})`:""}function Ne(t,e,n,o){return!e||v(e)?.nodeId!==t?null:n.find(i=>o(i.getAttribute("class")))??n[0]??null}function Jt(t,e){return Object.hasOwn(t,e)?O(t[e])??{}:{}}function ye(t,e,n=()=>E,o=u=>u,r=ee,i="desktop",f=()=>!1){let u=0;for(const{element:s,partId:p}of t){const x=v(p)?.propKey;if(!x)continue;const a=Jt(e,o(x)),l=M(a,i,{blockDrawsStyle:f(x)});S(a.textStyle)?s.setAttribute?.(C,a.textStyle):s.removeAttribute?.(C);const d=H.some(h=>s.style[h]);let c=!1;for(const[h,P]of Object.entries(l))re(s,h,P),P&&(c=!0);if(d||H.some(h=>l[h]))for(const h of Qt(s,r))for(const P of H)h.style[P]=l[P]??"";c&&(u+=1)}return u}function Qt(t,e){const n=w(t.textContent??""),o=[];let r=t;for(let i=0;i<te&&e(r);i+=1){const f=r.parentElement;if(!f||w(f.textContent??"")!==n)break;o.push(f),r=f}return o}const te=8;function ee(t){const e=t;return typeof window>"u"||!e?.ownerDocument?!1:window.getComputedStyle(e).display==="inline"}const E={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0};function ne(t){if(!t||typeof t!="object")return null;const e={};return S(t.textStyle)&&(e.textStyle=t.textStyle),typeof t.size=="number"&&t.size>0&&(e.size=t.size),typeof t.sizeTablet=="number"&&t.sizeTablet>0&&(e.sizeTablet=t.sizeTablet),typeof t.sizePhone=="number"&&t.sizePhone>0&&(e.sizePhone=t.sizePhone),Object.keys(e).length?e:null}function oe(t,e){const n=ne(t);if(!n)return{};const o=M(n,e);return{...o.fontFamily?{fontFamily:o.fontFamily}:{},...o.fontSize?{fontSize:o.fontSize}:{}}}function ke(t){return S(t?.textStyle)||!!t?.role||typeof t?.size=="number"&&t.size>0}function Ie(t,e,n){if(!t||typeof t!="object")return{};const o=rt(t.role,e,$)??{},r=e.sized?oe(V(t,n),n):{};return{...o,...r}}function Fe(t,e,n){n.fontFamily&&t.fontFamily===n.fontFamily&&(t.fontFamily=e.fontFamily),n.fontSize&&t.fontSize===n.fontSize&&(t.fontSize=e.fontSize)}function re(t,e,n){if(!e.startsWith("--")){t.style[e]=n;return}const o=t.style;typeof o.setProperty=="function"?n?o.setProperty(e,n):o.removeProperty?.(e):o[e]=n;const r=t;e===m&&(n?r.setAttribute?.(q,""):r.removeAttribute?.(q))}const q="data-sf-part-para",ie=Object.keys(L({},E)),j=new Set(["color","overflowWrap",m,"fontStyle"]),H=ie.filter(t=>!j.has(t));function Me(t,e,n,o=u=>u,r=()=>!1,i=()=>null,f=[]){const u=new Map;for(const a of t){const l=D(a.key,a.row);for(const d of a.texts){const c=u.get(d);c?(c.keys.add(a.key),c.partKeys.add(l)):u.set(d,{keys:new Set([a.key]),partKeys:new Set([l])})}}const s=new Map;for(const a of new Set([...Object.keys(e),...f])){if(!ae(a))continue;const l=J(n,a,O(e[a])??{},!1,i(a));l&&s.set(a,l)}const p=a=>{const l=o(a),d=i(l);if(!Object.hasOwn(e,l)&&!d)return null;const c=O(e[l])??{};return J(n,a,c,r(a),d)},x=new Map;for(const[a,{keys:l,partKeys:d}]of u){const c=d.size===1?[...d][0]:l.size===1?[...l][0]:null;if(!c)continue;const b=p(c);b&&x.set(a,b)}for(const a of t){if(!a.keyed)continue;const l=p(D(a.key,a.row));l&&s.set(a.key,l)}return x.size||s.size?{rules:x,kindRules:s,drawn:new Set(u.keys())}:null}function J(t,e,n,o,r){const i=L(n,E,{blockDrawsStyle:o}),f=Kt(n),u=Bt(n),s=S(n.textStyle)?n.textStyle:void 0;return!Object.values(i).some(Boolean)&&!Object.keys(f).length&&!Object.keys(u).length&&!s&&!r?null:{stamp:se(t,e),declarations:i,...Object.keys(f).length?{tablet:f}:{},...Object.keys(u).length?{phone:u}:{},...s?{textStyle:s}:{},...r?{motion:r}:{}}}function ae(t){return t.startsWith("@")}function Le(t,e){return t?.kindRules.get(e)??null}function se(t,e){const n=o=>o.replace(/[^A-Za-z0-9_-]+/g,"-");return`${n(t)}~${n(e)}`}function je(t){const e=[],n=new Set,o=r=>{const{stamp:i,declarations:f}=r;if(n.has(i))return;n.add(i);const u=Object.entries(f).filter(([,c])=>c!==""),s=c=>c.map(([b,h])=>`${ce(b)}: ${h}`).join("; "),p=`[${ut}="${i}"]`,x=u.filter(([c])=>!j.has(c)),a=u.filter(([c])=>j.has(c));x.length&&e.push(`${p}, *:has(> ${p}) { ${s(x)} }`),a.length&&e.push(`${p} { ${s(a)} }`),f[m]&&(e.push(`*:has(> ${p}) { ${m}: ${f[m]} }`),e.push(...fe(p,`*:has(> ${p})`)));const l=Object.entries(r.tablet??{}).filter(([,c])=>c!=="");l.length&&e.push(`@media ${at} { ${p}, *:has(> ${p}) { ${s(l)} } }`);const d=Object.entries(r.phone??{}).filter(([,c])=>c!=="");d.length&&e.push(`@media ${it} { ${p}, *:has(> ${p}) { ${s(d)} } }`)};for(const r of t.rules.values())o(r);for(const r of t.kindRules.values())o(r);return e.join(`
2
+ `)}function fe(t,e){const n=`var(${m})`,o=":is([data-sf-bullet], [data-sf-number])";return[`${t} br:not(br + br) { display: block; content: ""; margin-top: ${n} }`,`${t} ${o}:not(:first-child) { margin-top: ${n} }`,`${t} ${o}:not(:last-child) { margin-bottom: ${n} }`,`:is(${e}) + :is(${e}) { margin-top: ${n} }`]}const ce=t=>t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`);function He(t,e){if(!t)return null;const n=w(e),o=t.rules.get(n);if(o)return o;if(n.length<le||t.drawn.has(n))return null;let r=null;for(const[i,f]of t.rules)if(i.includes(n)){if(r&&r.stamp!==f.stamp)return null;r=f}return r}const le=8;export{_ as PART_ALIGNS,Et as PART_LETTER_EM_MAX,At as PART_LETTER_EM_MIN,Tt as PART_LETTER_STEP,_t as PART_LINE_HEIGHT_MAX,zt as PART_LINE_HEIGHT_MIN,Pt as PART_LINE_STEP,G as PART_MEASURED_TRACKS,St as PART_NUDGE_MAX,ht as PART_NUDGE_MIN,gt as PART_PADDING_MAX,mt as PART_PADDING_MIN,bt as PART_PADDING_STEP,q as PART_PARAGRAPH_ATTR,wt as PART_PARAGRAPH_MAX,$t as PART_PARAGRAPH_MIN,m as PART_PARAGRAPH_VAR,Rt as PART_RELATIVE_PROPS,k as PART_SIZE_MAX,y as PART_SIZE_MIN,Ot as PART_SIZE_STEPS,ut as PART_STYLED_ATTR,N as PART_STYLES_PROP,ie as PART_STYLE_PROPERTIES,xt as PART_WEIGHTS,H as SHARED_PART_PROPERTIES,W as STYLE_ID_OF_ROLE,C as TEXT_STYLE_ATTR,ye as applyPartStyles,Ae as blockDrawsTextStyle,be as followedStyleOf,ae as isPartKindKey,S as isTextStyleId,fe as paragraphRules,M as partCanvasDeclarations,jt as partCaseOfTransform,Ht as partCaseTransform,Oe as partFontKeyOf,Pe as partLiftRules,Bt as partPhoneDeclarations,Le as partRuleForKind,He as partRuleForText,$e as partShownDeclarations,Ut as partSizeBoxOf,Ee as partSizeFollowed,Wt as partSpacingOf,we as partStyleBase,Re as partStyleCount,je as partStyleCss,L as partStyleDeclarations,Xt as partStyleForScreen,Ne as partStyleSource,V as partStyleWithoutSizeBox,Kt as partTabletDeclarations,ze as propsWithPartStyleValue,_e as propsWithoutPartStyle,Me as publishedPartStyles,B as readPartStyle,Te as readPartStyles,oe as regionCanvasDeclarations,Fe as regionCanvasRestore,ke as regionHasOwnLook,ne as regionSheetStyle,Ie as regionShownDeclarations,Jt as storedPartStyle};
@@ -1 +1 @@
1
- import{jsx as n}from"react/jsx-runtime";import{CardRowDrawn as f}from"../../../components/CardRowContext.js";import{PublishedPartStyles as h}from"../../../components/PublishedPartStylesContext.js";import{readPartStyles as y}from"../part-styles.js";import{readPartMotions as p}from"../../animation/part-motion.js";import{partNeedles as P}from"../text-parts.js";import{CARD_LIST_TYPE as x}from"../../../../format/lib/content/card-template.js";const S={name:"clickableParts",applies:(o,e,s)=>typeof s?.render=="function"&&o!==x,draw(o,e,s){const r=o,d=()=>r.textParts??r.fields,i=r.render,m=s.inspector?.PartAnchors;r.render=t=>{const c=y(t),l=p(t);return t.editor?.isEditing&&m?n(f,{type:e,props:t,children:a=>n(m,{needles:P(d(),a),styles:c,motions:l,type:e,children:i(t)})}):!Object.keys(c).length&&!Object.keys(l).length?i(t):n(f,{type:e,props:t,children:a=>n(h,{needles:P(d(),a),styles:c,motions:l,type:e,children:i(t)})})}}};export{S as clickableParts};
1
+ import{jsx as s}from"react/jsx-runtime";import{CardRowDrawn as f}from"../../../components/CardRowContext.js";import{PublishedPartStyles as y}from"../../../components/PublishedPartStylesContext.js";import{readPartStyles as h}from"../part-styles.js";import{readPartMotions as x}from"../../animation/part-motion.js";import{partNeedles as b}from"../text-parts.js";import{CARD_LIST_TYPE as u,rowPartByKey as j}from"../../../../format/lib/content/card-template.js";const C={name:"clickableParts",applies:(i,e,c)=>typeof c?.render=="function"&&i!==u,draw(i,e,c){const o=i,P=()=>o.textParts??o.fields,l=o.render,d=c.inspector?.PartAnchors,m=(t,r)=>b(P(),r,n=>j(e,t,n));o.render=t=>{const r=h(t),n=x(t);return t.editor?.isEditing&&d?s(f,{type:e,props:t,children:a=>s(d,{needles:m(t,a),styles:r,motions:n,type:e,children:l(t)})}):!Object.keys(r).length&&!Object.keys(n).length?l(t):s(f,{type:e,props:t,children:a=>s(y,{needles:m(t,a),styles:r,motions:n,type:e,children:l(t)})})}}};export{C as clickableParts};
@@ -20,13 +20,14 @@ export type PartNeedle = {
20
20
  label: string;
21
21
  texts: string[];
22
22
  row?: PartRow;
23
+ keyed?: true;
23
24
  };
24
25
  export { decodePartId, encodePartId };
25
26
  export declare function normalizePartText(value: string): string;
26
27
  export declare function holdsAuthoredText(field: unknown): boolean;
27
28
  export declare function partLabel(field: Record<string, unknown>, key: string): string;
28
29
  export declare function partHeadLabel(label: string): string;
29
- export declare function partNeedles(fields: Record<string, unknown> | undefined, props: Record<string, unknown> | undefined): PartNeedle[];
30
+ export declare function partNeedles(fields: Record<string, unknown> | undefined, props: Record<string, unknown> | undefined, keyed?: (key: string) => boolean): PartNeedle[];
30
31
  export declare function canTypeOnCanvas(part: {
31
32
  offPage: boolean;
32
33
  hidden: boolean;
@@ -1 +1 @@
1
- import{decodePartId as g,encodePartId as O}from"efficient-easel/draw";import{stripMarkup as m}from"../../../format/lib/markup.js";import{LINK_FIELD_MARKER as R,SCAFFOLD_FIELD_MARKER as y,TEXT_FIELD_MARKER as u}from"efficient-easel/draw";import{readHidable as A}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as E}from"efficient-easel/draw";import{isStructuralTextProp as _}from"../../../format/lib/document/neutralization-contracts.js";import{fieldInOwnBox as L}from"../../../format/lib/document/own-box.js";import{partRowTexts as I}from"./part-rows.js";import{nonEmptyString as S}from"../../../format/lib/non-empty-string.js";const $="data-sf-part",G="data-sf-region-part",q="data-sf-part-row";function J(e,t){return`${e}[${t}]`}const Q="data-sf-part-kind",j="data-sf-part-style-owner",N="data-sf-part-style-kind";function U(e){for(let t=e;t;t=t.parentElement){const r=t.getAttribute(j),n=t.getAttribute(N);if(r&&n)return{owner:r,kind:n};if(t.getAttribute("data-easel-block"))return null}return null}const b=2;function h(e){return m(e).replace(/\s+/gu,"")}function l(e,t,r){const n=e[u];if(n){if(n.control==="textList"){const o=n.itemKey??"text";if(!Array.isArray(t))return;for(const s of t){const c=s?.[o];typeof c=="string"&&r.push(c)}return}const{text:i}=A(t);i?r.push(i):n.placeholder&&r.push(n.placeholder);return}if(!e[R]){if(e.type==="text"||e.type==="textarea"){const i=S(t);i&&r.push(i);return}if(e.arrayFields&&Array.isArray(t)){for(const i of t)for(const[o,s]of Object.entries(e.arrayFields))l(s,i?.[o],r);return}if(e.objectFields&&t&&typeof t=="object")for(const[i,o]of Object.entries(e.objectFields))l(o,t[i],r)}}function V(e){if(!e||typeof e!="object")return!1;const t=e;return t[R]?!1:!!t[u]||t.type==="text"||t.type==="textarea"}function w(e,t){const r=e[u];return r?.label?r.label:typeof e.label=="string"?e.label:t}function F(e){const t=e.indexOf(" (");return(t>0?e.slice(0,t):e).trim()}function Z(e,t){if(!e)return[];const r=[];for(const[n,i]of Object.entries(e)){if(!i||typeof i!="object"||_(n))continue;const o=i,s=[];l(o,t?.[n],s),!s.length&&o[y]!==void 0&&l(o,o[y],s);const c=w(o,n),a=new Set;for(const{row:d,text:f}of I(o,t?.[n])){const T=h(f);T.length<b||(a.add(T),r.push({key:n,label:c,texts:[T],row:d}))}const p=new Set(a),x=[];for(const d of s){const f=h(d);f.length<b||p.has(f)||(p.add(f),x.push(f))}x.length&&r.push({key:n,label:c,texts:x})}return r}function K(e){return!e.offPage&&!e.hidden}const k=E;function P(e,t){if(!t||typeof t!="object"||_(e)||L(t))return null;const r=t[u];return!r||!k.includes(r.control)?null:r}function v(e,t){const r=P(e,t);return r!==null&&r.identifier!==!0}function tt(e,t){if(!e)return[];const r=[];for(const[n,i]of Object.entries(e)){const o=P(n,i);if(!o)continue;const{text:s,hidden:c}=A(t?.[n]);if(K({offPage:o.offPage===!0,hidden:!!c}))continue;const a=s||o.placeholder||"",p=m(a).replace(/\s+/gu," ").trim();r.push({key:n,label:F(w(i,n)),preview:p,offPage:o.offPage===!0,identifier:o.identifier===!0,hidden:!!c})}return r}export{$ as PART_ATTR,Q as PART_KIND_ATTR,q as PART_ROW_ATTR,N as PART_STYLE_KIND_ATTR,j as PART_STYLE_OWNER_ATTR,G as REGION_PART_ATTR,K as canTypeOnCanvas,g as decodePartId,O as encodePartId,J as encodePartRow,P as entryPartMetaOf,v as fieldDrawsEntryRow,V as holdsAuthoredText,h as normalizePartText,F as partHeadLabel,w as partLabel,Z as partNeedles,U as partStyleOwnerOf,tt as sectionTextParts};
1
+ import{decodePartId as O,encodePartId as E}from"efficient-easel/draw";import{stripMarkup as R}from"../../../format/lib/markup.js";import{LINK_FIELD_MARKER as y,SCAFFOLD_FIELD_MARKER as A,TEXT_FIELD_MARKER as p}from"efficient-easel/draw";import{readHidable as h}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as L}from"efficient-easel/draw";import{isStructuralTextProp as _}from"../../../format/lib/document/neutralization-contracts.js";import{fieldInOwnBox as I}from"../../../format/lib/document/own-box.js";import{partRowTexts as S}from"./part-rows.js";import{nonEmptyString as j}from"../../../format/lib/non-empty-string.js";const q="data-sf-part",J="data-sf-region-part",Q="data-sf-part-row";function U(e,t){return`${e}[${t}]`}const V="data-sf-part-kind",N="data-sf-part-style-owner",F="data-sf-part-style-kind";function Z(e){for(let t=e;t;t=t.parentElement){const r=t.getAttribute(N),o=t.getAttribute(F);if(r&&o)return{owner:r,kind:o};if(t.getAttribute("data-easel-block"))return null}return null}const b=2;function g(e){return R(e).replace(/\s+/gu,"")}function l(e,t,r){const o=e[p];if(o){if(o.control==="textList"){const i=o.itemKey??"text";if(!Array.isArray(t))return;for(const s of t){const c=s?.[i];typeof c=="string"&&r.push(c)}return}const{text:n}=h(t);n?r.push(n):o.placeholder&&r.push(o.placeholder);return}if(!e[y]){if(e.type==="text"||e.type==="textarea"){const n=j(t);n&&r.push(n);return}if(e.arrayFields&&Array.isArray(t)){for(const n of t)for(const[i,s]of Object.entries(e.arrayFields))l(s,n?.[i],r);return}if(e.objectFields&&t&&typeof t=="object")for(const[n,i]of Object.entries(e.objectFields))l(i,t[n],r)}}function k(e){if(!e||typeof e!="object")return!1;const t=e;return t[y]?!1:!!t[p]||t.type==="text"||t.type==="textarea"}function w(e,t){const r=e[p];return r?.label?r.label:typeof e.label=="string"?e.label:t}function K(e){const t=e.indexOf(" (");return(t>0?e.slice(0,t):e).trim()}function v(e,t,r){if(!e)return[];const o=[];for(const[n,i]of Object.entries(e)){if(!i||typeof i!="object"||_(n))continue;const s=i,c=[];l(s,t?.[n],c),!c.length&&s[A]!==void 0&&l(s,s[A],c);const a=w(s,n);if(r?.(n)&&k(s)){c.length&&o.push({key:n,label:a,texts:[],keyed:!0});continue}const u=new Set;for(const{row:d,text:f}of S(s,t?.[n])){const T=g(f);T.length<b||(u.add(T),o.push({key:n,label:a,texts:[T],row:d}))}const m=new Set(u),x=[];for(const d of c){const f=g(d);f.length<b||m.has(f)||(m.add(f),x.push(f))}x.length&&o.push({key:n,label:a,texts:x})}return o}function D(e){return!e.offPage&&!e.hidden}const M=L;function P(e,t){if(!t||typeof t!="object"||_(e)||I(t))return null;const r=t[p];return!r||!M.includes(r.control)?null:r}function tt(e,t){const r=P(e,t);return r!==null&&r.identifier!==!0}function et(e,t){if(!e)return[];const r=[];for(const[o,n]of Object.entries(e)){const i=P(o,n);if(!i)continue;const{text:s,hidden:c}=h(t?.[o]);if(D({offPage:i.offPage===!0,hidden:!!c}))continue;const a=s||i.placeholder||"",u=R(a).replace(/\s+/gu," ").trim();r.push({key:o,label:K(w(n,o)),preview:u,offPage:i.offPage===!0,identifier:i.identifier===!0,hidden:!!c})}return r}export{q as PART_ATTR,V as PART_KIND_ATTR,Q as PART_ROW_ATTR,F as PART_STYLE_KIND_ATTR,N as PART_STYLE_OWNER_ATTR,J as REGION_PART_ATTR,D as canTypeOnCanvas,O as decodePartId,E as encodePartId,U as encodePartRow,P as entryPartMetaOf,tt as fieldDrawsEntryRow,k as holdsAuthoredText,g as normalizePartText,K as partHeadLabel,w as partLabel,v as partNeedles,Z as partStyleOwnerOf,et as sectionTextParts};
@@ -40,6 +40,7 @@ export type SiteFacts = {
40
40
  export type ConvertContext = {
41
41
  site?: SiteFacts;
42
42
  theme?: ThemeValue;
43
+ press?: boolean;
43
44
  };
44
45
  export declare function convertTheme(ctx: ConvertContext): ThemeValue | undefined;
45
46
  export type Restyled = {
@@ -162,6 +163,7 @@ export interface SectionToBoxRow {
162
163
  boxProps?: OwnProps;
163
164
  parts: readonly PartRow[];
164
165
  drop?: Readonly<Record<string, string>>;
166
+ pressKeepsEmpty?: readonly string[];
165
167
  site?: (node: SectionNode, ctx: ConvertContext) => readonly SiteWrite[];
166
168
  skip?: (props: Props) => string | undefined;
167
169
  also?: readonly SectionPiece[];
@@ -1 +1 @@
1
- import{readHidable as Z}from"efficient-easel/draw";import{BOX_TYPE as ee,CONTAINER_BLOCKS_SLOT as te}from"../../../format/lib/document/container-blocks.js";import{headingTextSeed as oe,labelTextSeed as ne}from"../../../format/lib/document/text-seeds.js";import{SPLITTABLE_SECTIONS as se}from"../../../format/lib/sections/section-head-placement.js";import{finiteNumber as R}from"../../../format/lib/finite-number.js";import{accentItalicRuns as ie}from"../../../format/lib/markup.js";import{seedNodes as re}from"../../../format/lib/document/seed-parts.js";import{bucketByGroup as ae}from"../../../format/lib/locations-grid.js";import{normalizeTheme as G}from"../../../format/lib/theme.js";const P=ee,v=te;function Se(t){if(t.theme)return G(t.theme);const o=t.site?.themePresets;return o?G({selected:t.site?.selectedPreset??0,themes:[...o]}):void 0}function ce(t,o){return o===0?`${t}~box`:`${t}~box-${o+1}`}const A={Flex:"the Box itself",Hero:"its slides hold Boxes of real blocks (Hero › Slide › Box), and its Scrolling Bar is a Box in its strip slot (Hero › Box)",Divider:"one block with no text, picture or button",CustomHTML:"the HTML box is the whole section; it has no parts"};function Te(t){for(const[o,i]of Object.entries(t)){if(o in A&&A[o]!==i)throw new Error(`lib/sections/section-to-box: "${o}" is already Box-native`);A[o]=i}}function _e(t){return A[t]}const V=new Set(["id"]),T={},H=[],fe=["Breadcrumb","DocBody"];function Ee(t){for(const[o,i]of Object.entries(t)){if(o in T&&T[o]!==i)throw new Error(`lib/sections/section-to-box: "${o}" already has a row`);T[o]=i}}function Pe(t){return T[t]}function ve(){return Object.keys(T)}function de(t){return t in T&&H.includes(t)}function je(t,o=fe){return t in T&&(o.includes(t)||de(t))}function Ne(t){const o=se[t];if(!o)throw new Error(`lib/sections/section-to-box: "${t}" has no head row in SPLITTABLE_SECTIONS`);const i=[{kind:"text",key:o.num,role:"eyebrow"},{kind:"text",key:o.title,role:"heading"}];return o.description&&i.push({kind:"text",key:o.description,role:"body"}),o.headRows.includes("linkText")&&o.headRows.includes("linkHref")&&i.push({kind:"button",key:"linkText",href:"linkHref"}),i}const X=t=>Z(t),Ie=t=>X(t).text.trim()!=="";function le(t){if(t.includes("=="))return t;const o=t.indexOf("/"),i=o===-1?t:t.slice(0,o),r=i.trim();if(!r)return t;const m=i.indexOf(r);return`${i.slice(0,m)}==${r}==${i.slice(m+r.length)}${o===-1?"":t.slice(o)}`}const pe=t=>t==="heading"?oe():t==="eyebrow"?ne():{};function ue(t,o,i,r){const a={...t._partStyles?.text??{},...o??{},...i??{}};return(r==="center"||r==="right")&&a.align===void 0&&(a.align=r),Object.keys(a).length?{_partStyles:{text:a}}:{}}function he(t,o){if(t===void 0)return{};if(typeof t=="string")return{variant:t};const i=o[t.key];return{variant:typeof i=="string"&&Object.hasOwn(t.map,i)?t.map[i]:t.fallback}}function Y(t,o,i,r,m={}){const a={...o};for(const h of t){const[k,S,j]=typeof h=="string"?[h,h,void 0]:h;if(i[k]===void 0)continue;const _=j?j(i[k],i,m):i[k];_===void 0?delete a[S]:a[S]=_,r(k,S,_===void 0)}return a}function ye(t){const o=new Set([...V,"headPlacement","_partStyles",...Object.keys(t.drop??{}),...Object.keys(t.reads??{})]),i=m=>{for(const a of m??[])o.add(typeof a=="string"?a:a[0])},r=m=>{for(const a of m)switch(a.kind){case"text":case"image":o.add(a.key),a.kind==="image"&&a.alt&&o.add(a.alt);break;case"button":o.add(a.key),o.add(a.href),typeof a.variant=="object"&&o.add(a.variant.key);break;case"list":o.add(a.key);break;case"group":case"block":i(a.box),r(a.parts??[]);break;case"core":if(a.keep!=="rest"&&a.keep.forEach(h=>o.add(h)),Object.keys(a.rename??{}).forEach(h=>o.add(h)),a.derive?.reads.forEach(h=>o.add(h)),typeof a.slots!="function")for(const h of Object.values(a.slots??{}))for(const k of h)"kind"in k&&o.add(k.key);break}};for(const m of[t,...t.also??[]])i(m.box),r(m.parts);return o}function q(t,o,i={}){const r=t.props,m=o.skip?.(r);if(m!==void 0)return{node:t,nodes:[t],carried:[],dropped:[],siteWrites:[],restyled:[],skipped:m};const a=String(r.id??t.type),h=[],k=[],S=[],j=new Set,_=(n,s)=>{h.push({key:n,home:s}),j.add(n)},F=r._partStyles??{},L=ye(o);let K=0;const $=(n,s)=>({type:n,props:{...s,id:`${a}~${n}-${++K}`}}),M=(n,s,b,y,x,d,w)=>{if(x){for(const c of n??[]){const p=typeof c=="string"?c:c[0];b[p]!==void 0&&w(p,`nothing — the ${y} has no parts, so it is not drawn`)}return}const e=typeof s=="function"?s(r,i):s??{};return Y(n??[],e,b,(c,p,f)=>w(c,f?`nothing — the old value draws nothing (${y}: no ${p})`:`${d}${y}: ${p}`),i)},J=n=>re(n,s=>`${a}~${s}-${++K}`),W=(n,s,b)=>{const y=n.of?n.of(s):Array.isArray(s[n.key])?s[n.key]:[],x=typeof n.props=="function"?n.props(r,i):n.props??{},d=y.map((f,g)=>{const l=f??{},u=n.item?.(l,g,r)??{},O=N(u.reverse?[...n.parts].reverse():n.parts,l,!1,`item ${g+1}: `);return n.flat?u.props?O.map(E=>({...E,props:{...E.props,...u.props,id:E.props.id}})):O:[$(P,{name:`${n.name} ${g+1}`,...x,...u.props??{},[v]:O})]});if(n.groups){const f=n.groups;return b(n.key,y.length?`one Box per item (${y.length}), in a Box per group`:"nothing — the list is empty"),ae(y.map(g=>g??{}),f.of,f.of).map((g,l)=>{const u=g.items.map(B=>B.item),O=f.parts?N(f.parts,f.head?.(u,r)??{},!1,`group ${l+1}: `):[],E=g.items.map(B=>d[B.index]),z=f.perRow?.(u.length,r),I=Number.isInteger(z)&&z>=1?z:1,C=[];if(f.perRow&&I<E.length)for(let B=0;B*I<E.length;B++)C.push(E.slice(B*I,(B+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((B,U)=>$(P,{name:`${f.rowName??`${f.itemsName} row`} ${U+1}`,...f.rowProps??{},[v]:B})):E.flat()})]})})}const w=n.perRow?.(r),e=n.perRow?Number.isInteger(w)&&w>=1?w:1:0;if(b(n.key,(y.length?n.flat?`each item's parts (${y.length} items), in order`:`one Box per item (${y.length}), its parts inside`:"nothing — the list is empty")+(e&&y.length?`, in rows of ${e}`:"")),!e)return d.flat();const c=typeof n.rowProps=="function"?n.rowProps(r,i):n.rowProps??{},p=[];for(let f=0;f*e<d.length;f++){const g=d.slice(f*e,(f+1)*e).flat(),l=n.rowFiller?e-d.slice(f*e,(f+1)*e).length:0;p.push($(P,{name:`${n.rowName??`${n.name} row`} ${f+1}`,...c,[v]:[...g,...Array.from({length:l},(u,O)=>$(P,{name:`Empty ${O+1}`,...n.rowFiller,[v]:[]}))]}))}return p},N=(n,s,b,y)=>{const x=[],d=(e,c)=>b?_(e,c):void 0,w=e=>b?F[e]:void 0;for(const e of n)if(!(e.when&&!e.when(r,b?void 0:s)))switch(e.kind){case"text":{const c=X(s[e.key]);if(!c.text.trim()){d(e.key,"nothing — empty words draw nothing, so no block");break}const p=pe(e.role??"body"),{_partStyles:f,...g}=p,l=ue(p,e.styleFrom?{...e.style,...e.styleFrom(r,i)}:e.style,w(e.key),e.props?.align);if(e.was&&b){const u=l._partStyles?.text??{};S.push({key:e.key,was:e.was,...typeof u.textStyle=="string"?{textStyle:u.textStyle}:{},...R(u.size)!==void 0?{size:R(u.size)}:{},...R(u.sizePhone)!==void 0?{sizePhone:R(u.sizePhone)}:{}})}x.push($("Text",{text:e.mark==="accentLead"?le(c.text):e.mark==="accentItalic"?ie(c.text):c.text,...g,...e.props??{},...l,...c.hidden?{_hidden:!0}:{}})),d(e.key,`${y}Text block: its words${c.hidden?", hidden":""}`);break}case"button":{const c=X(s[e.key]);if(!c.text.trim()){d(e.key,"nothing — no words, no button"),d(e.href,"nothing — no button to link"),typeof e.variant=="object"&&d(e.variant.key,"nothing — no button to style");break}const p=typeof s[e.href]=="string"&&s[e.href]?s[e.href]:"#",f={...e.style??{},...w(e.key)??{}};x.push($("ButtonBlock",{label:c.text,href:p,...typeof e.props=="function"?e.props(s,i):e.props??{},...he(e.variant,s),...Object.keys(f).length?{_partStyles:{label:f}}:{},...c.hidden?{_hidden:!0}:{}})),d(e.key,`${y}Button block: its words`),d(e.href,`${y}Button block: its link`),typeof e.variant=="object"&&d(e.variant.key,`${y}Button block: its Style`);break}case"image":{const c=s[e.key];if(typeof c!="string"||!c){d(e.key,"nothing — no picture, no block"),e.alt&&d(e.alt,"nothing — no picture to describe");break}const p=e.alt&&typeof s[e.alt]=="string"?s[e.alt]:"";x.push($("ImageBlock",{src:c,alt:p,...e.props??{}})),d(e.key,`${y}Image block: its picture`),e.alt&&d(e.alt,`${y}Image block: its alt text`);break}case"list":{x.push(...W(e,s,d));break}case"group":{const c=N(e.parts,s,b,y),p=M(e.box,e.props,s,`${e.name} Box`,!c.length&&!e.keepEmpty,y,d);p&&x.push($(P,{name:e.name,...p,[v]:c}));break}case"block":{const c=e.parts?N(e.parts,s,b,y):[],p=M(e.box,e.props,s,`${e.type} block`,!!e.parts&&!c.length&&!e.keepEmpty,y,d);p&&x.push($(e.type,{...p,...e.slot?{[e.slot]:c}:{}}));break}case"core":{const c=e.as??t.type,p={headPlacement:"own-box",...e.props??{}},f=e.keep==="rest"?Object.keys(s).filter(l=>!L.has(l)&&!(l in p)):e.keep;for(const l of f)s[l]!==void 0&&(p[l]=s[l],d(l,`the ${c} block inside the Box`));if(e.keep==="rest"){for(const u of Object.keys(e.props??{}))s[u]!==void 0&&!L.has(u)&&d(u,`nothing — the ${c} block inside the Box has the row's own value`);s.headPlacement!==void 0&&d("headPlacement",`the ${c} block inside the Box: own-box`);const l=Object.fromEntries(Object.entries(F).filter(([u])=>!L.has(u)));Object.keys(l).length&&(p._partStyles=l)}for(const[l,u]of Object.entries(e.rename??{}))s[l]!==void 0&&(p[u]=s[l],d(l,`the ${c} block inside the Box: ${u}`));if(e.derive){Object.assign(p,e.derive.props(s,i));for(const l of e.derive.reads)s[l]!==void 0&&d(l,`the ${c} block inside the Box`)}const g=typeof e.slots=="function"?e.slots(s,i):e.slots??{};for(const[l,u]of Object.entries(g))p[l]=u.flatMap(O=>"kind"in O?W(O,s,d):J([O]));x.push($(c,p));break}}return x},Q=(n,s)=>{const b=s===0?"Box":`${n.name} Box`,y=N(n.parts,r,!0,s===0?"":`${b}: `),x=typeof n.boxProps=="function"?n.boxProps(r,i):n.boxProps??{},d=Y(n.box??[],x,r,(w,e,c)=>_(w,c?`nothing — the old value draws nothing (${b}: no ${e})`:`${b}: ${e}`),i);return{type:P,props:{name:n.name,...d,[v]:y,id:ce(a,s)}}},D=[o,...o.also??[]].map(Q);r._partStyles!==void 0&&_("_partStyles","each old part's style moved to its new part");for(const[n,s]of Object.entries(o.reads??{}))r[n]!==void 0&&_(n,s);for(const[n,s]of Object.entries(o.drop??{}))n in r&&(k.push({key:n,why:s}),j.add(n));for(const n of Object.keys(r))V.has(n)||j.has(n)||k.push({key:n,why:"not in the row — not carried"});return{node:D[0],nodes:D,carried:h,dropped:k,siteWrites:[...o.site?.(t,i)??[]],restyled:S}}function Re(t,o=H,i={}){const r=t.content;if(!Array.isArray(r))return t;let m=!1;const a=r.flatMap(h=>{const k=h&&typeof h.type=="string"&&o.includes(h.type)?T[h.type]:void 0;if(!k)return[h];const S=q(h,k,i);return S.skipped!==void 0?[h]:(m=!0,S.nodes)});return m?{...t,content:a}:t}function Ae(t,o=H,i={}){if(!Array.isArray(t))return[];const r=[];return t.forEach((m,a)=>{const h=m&&typeof m.type=="string"&&o.includes(m.type)?T[m.type]:void 0;if(!h)return;const k=q(m,h,i);k.skipped===void 0&&r.push({index:a,node:k.node,nodes:k.nodes})}),r}export{v as SECTION_BOX_SLOT,P as SECTION_BOX_TYPE,H as SECTION_TO_BOX_ON,fe as SECTION_TO_BOX_PRESS,_e as boxNativeReason,q as convertSection,Re as convertSectionsInPage,Se as convertTheme,de as convertsToBox,Ie as hasWords,Ne as headParts,je as pressesAsBox,Te as registerBoxNativeSections,Ee as registerSectionToBox,ce as sectionBoxIdOf,Ae as sectionToBoxEdits,Pe as sectionToBoxRow,ve as sectionToBoxTypes};
1
+ import{readHidable as Z}from"efficient-easel/draw";import{BOX_TYPE as ee,CONTAINER_BLOCKS_SLOT as te}from"../../../format/lib/document/container-blocks.js";import{headingTextSeed as oe,labelTextSeed as ne}from"../../../format/lib/document/text-seeds.js";import{SPLITTABLE_SECTIONS as se}from"../../../format/lib/sections/section-head-placement.js";import{finiteNumber as R}from"../../../format/lib/finite-number.js";import{accentItalicRuns as ie}from"../../../format/lib/markup.js";import{seedNodes as re}from"../../../format/lib/document/seed-parts.js";import{bucketByGroup as ae}from"../../../format/lib/locations-grid.js";import{normalizeTheme as G}from"../../../format/lib/theme.js";const P=ee,v=te;function Se(t){if(t.theme)return G(t.theme);const o=t.site?.themePresets;return o?G({selected:t.site?.selectedPreset??0,themes:[...o]}):void 0}function ce(t,o){return o===0?`${t}~box`:`${t}~box-${o+1}`}const A={Flex:"the Box itself",Hero:"its slides hold Boxes of real blocks (Hero › Slide › Box), and its Scrolling Bar is a Box in its strip slot (Hero › Box)",Divider:"one block with no text, picture or button",CustomHTML:"the HTML box is the whole section; it has no parts"};function Te(t){for(const[o,i]of Object.entries(t)){if(o in A&&A[o]!==i)throw new Error(`lib/sections/section-to-box: "${o}" is already Box-native`);A[o]=i}}function _e(t){return A[t]}const V=new Set(["id"]),T={},F=[],fe=["Breadcrumb","DocBody","Form","SubmitBuild","Footprint","Logos","FitmentFinder"];function Ee(t){for(const[o,i]of Object.entries(t)){if(o in T&&T[o]!==i)throw new Error(`lib/sections/section-to-box: "${o}" already has a row`);T[o]=i}}function Pe(t){return T[t]}function ve(){return Object.keys(T)}function de(t){return t in T&&F.includes(t)}function je(t,o=fe){return t in T&&(o.includes(t)||de(t))}function Ne(t){const o=se[t];if(!o)throw new Error(`lib/sections/section-to-box: "${t}" has no head row in SPLITTABLE_SECTIONS`);const i=[{kind:"text",key:o.num,role:"eyebrow"},{kind:"text",key:o.title,role:"heading"}];return o.description&&i.push({kind:"text",key:o.description,role:"body"}),o.headRows.includes("linkText")&&o.headRows.includes("linkHref")&&i.push({kind:"button",key:"linkText",href:"linkHref"}),i}const H=t=>Z(t),Ie=t=>H(t).text.trim()!=="";function le(t){if(t.includes("=="))return t;const o=t.indexOf("/"),i=o===-1?t:t.slice(0,o),r=i.trim();if(!r)return t;const m=i.indexOf(r);return`${i.slice(0,m)}==${r}==${i.slice(m+r.length)}${o===-1?"":t.slice(o)}`}const pe=t=>t==="heading"?oe():t==="eyebrow"?ne():{};function ue(t,o,i,r){const a={...t._partStyles?.text??{},...o??{},...i??{}};return(r==="center"||r==="right")&&a.align===void 0&&(a.align=r),Object.keys(a).length?{_partStyles:{text:a}}:{}}function he(t,o){if(t===void 0)return{};if(typeof t=="string")return{variant:t};const i=o[t.key];return{variant:typeof i=="string"&&Object.hasOwn(t.map,i)?t.map[i]:t.fallback}}function Y(t,o,i,r,m={}){const a={...o};for(const h of t){const[k,S,j]=typeof h=="string"?[h,h,void 0]:h;if(i[k]===void 0)continue;const _=j?j(i[k],i,m):i[k];_===void 0?delete a[S]:a[S]=_,r(k,S,_===void 0)}return a}function ye(t){const o=new Set([...V,"headPlacement","_partStyles",...Object.keys(t.drop??{}),...Object.keys(t.reads??{})]),i=m=>{for(const a of m??[])o.add(typeof a=="string"?a:a[0])},r=m=>{for(const a of m)switch(a.kind){case"text":case"image":o.add(a.key),a.kind==="image"&&a.alt&&o.add(a.alt);break;case"button":o.add(a.key),o.add(a.href),typeof a.variant=="object"&&o.add(a.variant.key);break;case"list":o.add(a.key);break;case"group":case"block":i(a.box),r(a.parts??[]);break;case"core":if(a.keep!=="rest"&&a.keep.forEach(h=>o.add(h)),Object.keys(a.rename??{}).forEach(h=>o.add(h)),a.derive?.reads.forEach(h=>o.add(h)),typeof a.slots!="function")for(const h of Object.values(a.slots??{}))for(const k of h)"kind"in k&&o.add(k.key);break}};for(const m of[t,...t.also??[]])i(m.box),r(m.parts);return o}function q(t,o,i={}){const r=t.props,m=o.skip?.(r);if(m!==void 0)return{node:t,nodes:[t],carried:[],dropped:[],siteWrites:[],restyled:[],skipped:m};const a=String(r.id??t.type),h=[],k=[],S=[],j=new Set,_=(n,s)=>{h.push({key:n,home:s}),j.add(n)},X=r._partStyles??{},L=ye(o);let K=0;const $=(n,s)=>({type:n,props:{...s,id:`${a}~${n}-${++K}`}}),M=(n,s,b,y,g,d,w)=>{if(g){for(const c of n??[]){const p=typeof c=="string"?c:c[0];b[p]!==void 0&&w(p,`nothing — the ${y} has no parts, so it is not drawn`)}return}const e=typeof s=="function"?s(r,i):s??{};return Y(n??[],e,b,(c,p,f)=>w(c,f?`nothing — the old value draws nothing (${y}: no ${p})`:`${d}${y}: ${p}`),i)},J=n=>re(n,s=>`${a}~${s}-${++K}`),W=(n,s,b)=>{const y=n.of?n.of(s):Array.isArray(s[n.key])?s[n.key]:[],g=typeof n.props=="function"?n.props(r,i):n.props??{},d=y.map((f,x)=>{const l=f??{},u=n.item?.(l,x,r)??{},O=N(u.reverse?[...n.parts].reverse():n.parts,l,!1,`item ${x+1}: `);return n.flat?u.props?O.map(E=>({...E,props:{...E.props,...u.props,id:E.props.id}})):O:[$(P,{name:`${n.name} ${x+1}`,...g,...u.props??{},[v]:O})]});if(n.groups){const f=n.groups;return b(n.key,y.length?`one Box per item (${y.length}), in a Box per group`:"nothing — the list is empty"),ae(y.map(x=>x??{}),f.of,f.of).map((x,l)=>{const u=x.items.map(B=>B.item),O=f.parts?N(f.parts,f.head?.(u,r)??{},!1,`group ${l+1}: `):[],E=x.items.map(B=>d[B.index]),z=f.perRow?.(u.length,r),I=Number.isInteger(z)&&z>=1?z:1,C=[];if(f.perRow&&I<E.length)for(let B=0;B*I<E.length;B++)C.push(E.slice(B*I,(B+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((B,U)=>$(P,{name:`${f.rowName??`${f.itemsName} row`} ${U+1}`,...f.rowProps??{},[v]:B})):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 x=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]:[...x,...Array.from({length:l},(u,O)=>$(P,{name:`Empty ${O+1}`,...n.rowFiller,[v]:[]}))]}))}return p},N=(n,s,b,y)=>{const g=[],d=(e,c)=>b?_(e,c):void 0,w=e=>b?X[e]:void 0;for(const e of n)if(!(e.when&&!e.when(r,b?void 0:s)))switch(e.kind){case"text":{const c=H(s[e.key]);if(!c.text.trim()&&!(b&&i.press&&o.pressKeepsEmpty?.includes(e.key))){d(e.key,"nothing — empty words draw nothing, so no block");break}const p=pe(e.role??"body"),{_partStyles:f,...x}=p,l=ue(p,e.styleFrom?{...e.style,...e.styleFrom(r,i)}:e.style,w(e.key),e.props?.align);if(e.was&&b){const u=l._partStyles?.text??{};S.push({key:e.key,was:e.was,...typeof u.textStyle=="string"?{textStyle:u.textStyle}:{},...R(u.size)!==void 0?{size:R(u.size)}:{},...R(u.sizePhone)!==void 0?{sizePhone:R(u.sizePhone)}:{}})}g.push($("Text",{text:e.mark==="accentLead"?le(c.text):e.mark==="accentItalic"?ie(c.text):c.text,...x,...e.props??{},...l,...c.hidden?{_hidden:!0}:{}})),d(e.key,`${y}Text block: its words${c.hidden?", hidden":""}`);break}case"button":{const c=H(s[e.key]);if(!c.text.trim()){d(e.key,"nothing — no words, no button"),d(e.href,"nothing — no button to link"),typeof e.variant=="object"&&d(e.variant.key,"nothing — no button to style");break}const p=typeof s[e.href]=="string"&&s[e.href]?s[e.href]:"#",f={...e.style??{},...w(e.key)??{}};g.push($("ButtonBlock",{label:c.text,href:p,...typeof e.props=="function"?e.props(s,i):e.props??{},...he(e.variant,s),...Object.keys(f).length?{_partStyles:{label:f}}:{},...c.hidden?{_hidden:!0}:{}})),d(e.key,`${y}Button block: its words`),d(e.href,`${y}Button block: its link`),typeof e.variant=="object"&&d(e.variant.key,`${y}Button block: its Style`);break}case"image":{const c=s[e.key];if(typeof c!="string"||!c){d(e.key,"nothing — no picture, no block"),e.alt&&d(e.alt,"nothing — no picture to describe");break}const p=e.alt&&typeof s[e.alt]=="string"?s[e.alt]:"";g.push($("ImageBlock",{src:c,alt:p,...e.props??{}})),d(e.key,`${y}Image block: its picture`),e.alt&&d(e.alt,`${y}Image block: its alt text`);break}case"list":{g.push(...W(e,s,d));break}case"group":{const c=N(e.parts,s,b,y),p=M(e.box,e.props,s,`${e.name} Box`,!c.length&&!e.keepEmpty,y,d);p&&g.push($(P,{name:e.name,...p,[v]:c}));break}case"block":{const c=e.parts?N(e.parts,s,b,y):[],p=M(e.box,e.props,s,`${e.type} block`,!!e.parts&&!c.length&&!e.keepEmpty,y,d);p&&g.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 x=typeof e.slots=="function"?e.slots(s,i):e.slots??{};for(const[l,u]of Object.entries(x))p[l]=u.flatMap(O=>"kind"in O?W(O,s,d):J([O]));g.push($(c,p));break}}return g},Q=(n,s)=>{const b=s===0?"Box":`${n.name} Box`,y=N(n.parts,r,!0,s===0?"":`${b}: `),g=typeof n.boxProps=="function"?n.boxProps(r,i):n.boxProps??{},d=Y(n.box??[],g,r,(w,e,c)=>_(w,c?`nothing — the old value draws nothing (${b}: no ${e})`:`${b}: ${e}`),i);return{type:P,props:{name:n.name,...d,[v]:y,id:ce(a,s)}}},D=[o,...o.also??[]].map(Q);r._partStyles!==void 0&&_("_partStyles","each old part's style moved to its new part");for(const[n,s]of Object.entries(o.reads??{}))r[n]!==void 0&&_(n,s);for(const[n,s]of Object.entries(o.drop??{}))n in r&&(k.push({key:n,why:s}),j.add(n));for(const n of Object.keys(r))V.has(n)||j.has(n)||k.push({key:n,why:"not in the row — not carried"});return{node:D[0],nodes:D,carried:h,dropped:k,siteWrites:[...o.site?.(t,i)??[]],restyled:S}}function Re(t,o=F,i={}){const r=t.content;if(!Array.isArray(r))return t;let m=!1;const a=r.flatMap(h=>{const k=h&&typeof h.type=="string"&&o.includes(h.type)?T[h.type]:void 0;if(!k)return[h];const S=q(h,k,i);return S.skipped!==void 0?[h]:(m=!0,S.nodes)});return m?{...t,content:a}:t}function Ae(t,o=F,i={}){if(!Array.isArray(t))return[];const r=[];return t.forEach((m,a)=>{const h=m&&typeof m.type=="string"&&o.includes(m.type)?T[m.type]:void 0;if(!h)return;const k=q(m,h,i);k.skipped===void 0&&r.push({index:a,node:k.node,nodes:k.nodes})}),r}export{v as SECTION_BOX_SLOT,P as SECTION_BOX_TYPE,F as SECTION_TO_BOX_ON,fe as SECTION_TO_BOX_PRESS,_e as boxNativeReason,q as convertSection,Re as convertSectionsInPage,Se as convertTheme,de as convertsToBox,Ie as hasWords,Ne as headParts,je as pressesAsBox,Te as registerBoxNativeSections,Ee as registerSectionToBox,ce as sectionBoxIdOf,Ae as sectionToBoxEdits,Pe as sectionToBoxRow,ve as sectionToBoxTypes};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-web-builder",
3
- "version": "55.1.0",
3
+ "version": "55.2.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",