efficient-web-builder 56.0.0 → 57.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/editor/components/HeroPartPanel.js +1 -1
  3. package/dist/editor/components/SectionEditor.js +1 -1
  4. package/dist/editor/components/SiteFields.d.ts +2 -1
  5. package/dist/editor/components/SiteFields.js +1 -1
  6. package/dist/editor/components/storefront-editor.css +5 -5
  7. package/dist/editor/components/useHostDocumentBridge.js +1 -1
  8. package/dist/editor/components/useSectionToBoxPass.js +1 -1
  9. package/dist/editor/lib/animation/entrance-fields.d.ts +0 -3
  10. package/dist/editor/lib/animation/entrance-fields.js +1 -1
  11. package/dist/editor/lib/animation/fields.js +1 -1
  12. package/dist/editor/lib/animation/hover-fields.js +1 -1
  13. package/dist/editor/lib/animation/loop-fields.d.ts +2 -0
  14. package/dist/editor/lib/animation/loop-fields.js +1 -1
  15. package/dist/editor/lib/document/controls.d.ts +2 -1
  16. package/dist/editor/lib/document/controls.js +1 -1
  17. package/dist/editor/lib/document/field-groups.js +1 -1
  18. package/dist/editor/lib/document/overrides.js +1 -1
  19. package/dist/editor/lib/editor-document-adapter.js +1 -1
  20. package/dist/editor/lib/host-document-bridge.d.ts +2 -1
  21. package/dist/editor/lib/host-document-bridge.js +1 -1
  22. package/dist/editor/lib/keyed-store.d.ts +7 -0
  23. package/dist/editor/lib/keyed-store.js +1 -0
  24. package/dist/editor/lib/page-live-state.js +1 -1
  25. package/dist/editor/lib/page-video-frames.d.ts +11 -0
  26. package/dist/editor/lib/page-video-frames.js +1 -0
  27. package/dist/editor/lib/pinned-chrome-doc.d.ts +1 -0
  28. package/dist/editor/lib/pinned-chrome-doc.js +1 -1
  29. package/dist/editor/lib/sections/new-section-node.js +1 -1
  30. package/dist/editor/lib/sections/text-layouts.js +1 -1
  31. package/dist/format/lib/animation/hover.d.ts +2 -3
  32. package/dist/format/lib/animation/hover.js +1 -1
  33. package/dist/format/lib/animation/loop.js +1 -1
  34. package/dist/format/lib/document/passes/settings-groups.js +1 -1
  35. package/dist/format/lib/document/section-catalog.js +6 -2
  36. package/dist/format/lib/editor-words-catalogue.d.ts +7 -2
  37. package/dist/format/lib/editor-words-catalogue.js +4 -4
  38. package/dist/format/lib/editor-words-kept.js +1 -1
  39. package/dist/format/lib/hero-video.d.ts +10 -0
  40. package/dist/format/lib/hero-video.js +1 -1
  41. package/dist/format/lib/sections/active-press-context.d.ts +4 -0
  42. package/dist/format/lib/sections/active-press-context.js +1 -0
  43. package/dist/format/lib/sections/section-head-placement.js +1 -1
  44. package/dist/format/lib/sections/section-presets.d.ts +5 -1
  45. package/dist/format/lib/sections/section-presets.js +1 -1
  46. package/dist/format/lib/theme.d.ts +2 -1
  47. package/dist/format/lib/theme.js +2 -2
  48. package/dist/format/lib/web-backend.d.ts +9 -0
  49. package/dist/render/components/{BoxCellWidthContext.d.ts → BoxCellContext.d.ts} +0 -1
  50. package/dist/render/components/BoxCellContext.js +1 -0
  51. package/dist/render/components/Flex.js +1 -1
  52. package/dist/render/components/ImageBlock.js +1 -1
  53. package/dist/render/components/LogoBlock.js +1 -1
  54. package/dist/render/components/Placeholder.js +1 -1
  55. package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
  56. package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
  57. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +0 -1
  58. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  59. package/dist/render/lib/document/blocks/general/section-to-box-rows-strip.js +1 -1
  60. package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.js +2 -2
  61. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  62. package/dist/render/lib/document/passes/block-size.js +1 -1
  63. package/dist/render/lib/document/sanitize.d.ts +1 -0
  64. package/dist/render/lib/document/sanitize.js +1 -1
  65. package/package.json +5 -5
  66. package/dist/render/components/BoxCellWidthContext.js +0 -1
@@ -1 +1 @@
1
- import{hasWords as v,registerSectionToBox as t}from"../../../sections/section-to-box.js";import{BUTTON as m,DIM as g,DROP_COMMON as 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};
1
+ import{hasWords as v,registerSectionToBox as t}from"../../../sections/section-to-box.js";import{BUTTON as m,DIM as g,DROP_COMMON as a,DROP_SIDE_PADDING as c,INNER_BOX as o,leadLine as A,SAME_KEYS as s,SECTION_BOX as d,TEXT as l,innerPad as O,siteGutterOf as C,innerPadKeys as T,smallText as u,wrapperPad as b,wrapperPadKeys as P}from"./section-to-box-row-parts.js";import{CARDS_SECTION_TO_BOX as H}from"./section-to-box-rows-cards.js";import{normalizeSiteGutterPhone as R,siteGutterPhoneFollows as D}from"../../../../../format/lib/content/page-width.js";import{finiteNumber as L}from"../../../../../format/lib/finite-number.js";import{STATS_SECTION_TO_BOX as W}from"./section-to-box-rows-stats.js";import{LOGOS_SECTION_TO_BOX as X}from"./section-to-box-rows-logos.js";import{STRIP_SECTION_TO_BOX as G}from"./section-to-box-rows-strip.js";import{TIMELINE_SECTION_TO_BOX as M}from"./section-to-box-rows-timeline.js";import{LOCATIONS_SECTION_TO_BOX as F}from"./section-to-box-rows-locations.js";import{HEAD_ONLY_SECTION_TO_BOX as z}from"./section-to-box-rows-head.js";import{PAGE_HEADER_SECTION_TO_BOX as K}from"./section-to-box-rows-pageheader.js";import{DOCBODY_SECTION_TO_BOX as U}from"./section-to-box-rows-docbody.js";import{EDITORIAL_SECTION_TO_BOX as Y}from"./section-to-box-rows-editorial.js";import{FORMS_SECTION_TO_BOX as j}from"./section-to-box-rows-forms.js";import{FITMENT_SECTION_TO_BOX as q}from"./section-to-box-rows-fitment.js";import{fluidToken as J,headTree as S,token as i}from"./section-head-looks.js";import{boxPadding as Q}from"../../../../../format/lib/document/seed-parts.js";const w={top:72,bottom:72,topPhone:72,bottomPhone:72},V={name:"Editorial Text",boxProps:e=>({...d,direction:"column",gap:28,gapPhone:28,sectionBorder:{top:1},...b(e,w)}),box:[["topBorder","sectionBorder",e=>e===!1?void 0:{top:1}],...s,...P(w)],parts:[S("Prose"),{kind:"text",key:"body",props:g,style:{textStyle:"body-1",...i("body",16),lineHeight:1.7,paragraphSpacing:18}}],drop:{...a,...c,headPlacement:"needs a row per head placement: an own-box Prose draws no head (its words sit in a Section Header above it), the row always draws the head. 0 of 123 live nodes store it (the live export, 2026-10-24)"}},f={buttonPaddingTop:20,buttonPaddingBottom:20,buttonPaddingLeft:28,buttonPaddingRight:28},_=(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:(r,p)=>!_(r,p),variant:"ghost",style:{letterSpacing:.3},props:{...m,...f,...n}}]}),h=e=>v(e.title),Z={name:"Call-to-Action Heading",boxProps:e=>({...d,direction:"row",align:"center",justify:h(e)?"between":"end",gap:60,gapPhone:60,share:"content",sectionBorder:{bottom:1},...O(e,"TitleWithButtons")}),box:[...s,...T("TitleWithButtons")],parts:[{kind:"group",name:"Title",props:{...o,maxWidth:1e3,widthFitPhone:"fill"},parts:[{kind:"text",key:"title",role:"heading",props:l,style:{textStyle:"heading-1",...J("headingLarge",48,7,108),case:"upper",lineHeight:.94,letterSpacing:-.035}}]},{kind:"group",name:"Buttons",props:e=>({...o,gap:14,gapPhone:14,widthFitPhone:"fill",...h(e)?{minWidth:280,minWidthPhone:0}:{}}),parts:[k(h,{widthFit:"fill",iconPosition:"end"}),k(e=>!h(e),{})]}],drop:{...a,buttonsAlign:"moves the buttons only when there is no heading (4 of 128 live nodes), where the Box puts them at the end. 0 of 128 live nodes store it (the live export, 2026-10-24)",buttonsAlignPhone:"the phone's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Phone view's Block alignment row), so nothing moves",buttonsAlignTablet:"the tablet's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Tablet view's Block alignment row, 0 stored on the US sites 2026-11-05), so nothing moves"}};function $(e){const{siteGutter:n,siteGutterPhone:r}=e.site??{},p=C(e),y=Math.min(20,R(r)??D(n));return{sectionPaddingLeft:p,sectionPaddingRight:p,sectionPaddingLeftPhone:y,sectionPaddingRightPhone:y}}const B={top:40,bottom:64,topPhone:24,bottomPhone:36},ee={name:"Section Header",boxProps:(e,n)=>({...d,direction:"column",gap:0,...b(e,B),...$(n)}),box:[...s,...P(B)],parts:[S("SectionHeader")],drop:{...a,...c,headStyle:"needs a row per head look: the row draws the standard look; the editorial, simple, statement, natural and essay looks are other layouts. 0 of 69 live nodes store it (the live export, 2026-10-24)",eyebrowLook:"read only by the simple, statement, natural and essay looks, which this row does not draw. 0 of 69 live nodes store it",rowGap:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",descriptionSize:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",numStyle:"Solid (the default; 4 of 69 live nodes store it) IS the eyebrow Text the row draws; Outlined (0 live) needs an outlined-number text look"}},x={...o,direction:"row",share:[67],gap:30},E={...o,sectionPaddingLeft:30,sectionPaddingLeftPhone:0},N=(e,n,r)=>({kind:"group",name:e,props:n,parts:[r]}),te={name:"Lead Text",boxProps:e=>({...d,direction:"column",gap:40,gapPhone:40,sectionBorder:{bottom:1},...O(e,"ParagraphsA")}),box:[...s,...T("ParagraphsA")],parts:[{kind:"group",name:"Numbers",props:{...x,gapPhone:24,sectionBorder:{bottom:1},sectionPaddingBottom:40,sectionPaddingBottomPhone:40},parts:[{kind:"group",name:"Eyebrow",props:{...o,sectionPaddingTop:5,sectionPaddingBottom:1,sectionPaddingTopPhone:5,sectionPaddingBottomPhone:1},parts:[u("eyebrow",{color:"labels",...i("label",12),letterSpacing:.24})]},N("Stats column",o,{kind:"group",name:"Stats",props:{...E,gap:0,gapPhone:0},parts:[{kind:"list",key:"stats",name:"Stat",flat:!0,parts:[A("value","label",{...i("label",13),letterSpacing:.18,lineHeight:1.8})]}]})]},{kind:"group",name:"Words",props:{...x,gapPhone:28},parts:[{kind:"group",name:"Lead",props:o,parts:[{kind:"group",name:"Measure",props:{...o,maxWidth:780},parts:[{kind:"text",key:"lead",props:l,style:{textStyle:"heading-3",...i("headingSmall",22,20),weight:400,case:"none",lineHeight:1.45,letterSpacing:-.005}}]}]},N("Note column",{...o,justify:"end",widthFit:"fill"},{kind:"group",name:"Founders",props:{...E,gap:8,gapPhone:8},parts:[{kind:"group",name:"Note",props:{...o,gap:6,gapPhone:6},parts:[{kind:"text",key:"foundersHeading",props:l,style:{textStyle:"body-1",fontRole:"heading",...i("body",18,16),weight:500,letterSpacing:-.01,lineHeight:1.7}},{kind:"text",key:"foundersBody",props:g,style:{textStyle:"body-5",fontRole:"heading",...i("body",14,12),lineHeight:1.7}}]},u("attribution",{...i("label",12,10),letterSpacing:.24,lineHeight:1.7})]})]}],drop:{...a}},I={top:24,bottom:24,topPhone:24,bottomPhone:24},oe={name:"Banner",boxProps:e=>({...d,direction:"column",gap:0,...b(e,I)}),box:[...s,"contained",...P(I)],parts:[{kind:"group",name:"Card",keepEmpty:!0,props:{...o,gap:28,placement:"top-left",darken:60,darkenStyle:"even",sectionBorder:{width:1},...Q(64,40,40,24)},box:[["imageSrc","bgImage"],["overlay","darken",e=>Math.min(Math.max(L(e)??60,0),100)]],parts:[{kind:"group",name:"Words",props:{...o,gap:20},parts:[u("eyebrow"),{kind:"text",key:"title",role:"heading",props:{...l,maxWidth:680},style:{weight:500,lineHeight:1.05,letterSpacing:-.03,case:"none"}},{kind:"text",key:"body",props:{...g,maxWidth:680},style:{textStyle:"body-1",lineHeight:1.6},was:{size:16}}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:m}]}],drop:{...a,...c}},ne={Prose:V,TitleWithButtons:Z,SectionHeader:ee,ParagraphsA:te,Banner:oe};function we(){t(ne),t(W),t(X),t(H),t(G),t(M),t(F),t(z),t(K),t(U),t(Y),t(j),t(q)}export{ne as GENERAL_SECTION_TO_BOX,we as registerGeneralSectionRows};
@@ -1 +1 @@
1
- import{jsx as p}from"react/jsx-runtime";import{parseBlockWidthFit as P,phoneKey as l,tabletKey as o}from"efficient-easel/draw";import{blockCanWidenPastCell as K,blockFillInCellClass as A,blockPhoneHideClass as L,blockSizeOf as G,blockSizeValuesOf as X}from"../../content/block-size.js";import{NoCellBound as Z}from"../../../components/BoxCellWidthContext.js";import{CellWrap as $,useBoxCell as v}from"../../../components/InBoxContext.js";import{boxPhoneRowFits as U,boxRowColumnsClass as T,boxShareClasses as g,boxShareTabletOf as M,boxTabletColumnsClass as V}from"../../../../format/lib/content/box-layout.js";import{resolveContainerDirection as Y}from"../../../../format/lib/content/container-direction.js";import{containerBlocksFor as q}from"../../../../format/lib/document/container-blocks.js";import{readPartStyle as J}from"../part-styles.js";import{addShowWhenFacts as Q,withRowRules as S}from"../../../../format/lib/document/show-when-attach.js";import{BOX_BLOCK_KEYS as tt}from"./cell-width.js";import{findParentNode as et}from"../../../../format/lib/document/passes/document-position.js";const it=new Set(["Text","Heading"]),nt=new Set(["h1","h2","h3","h4","h5","h6"]);function O(t,e){return t==="Heading"?!0:t!=="Text"?!1:typeof e.tag=="string"&&nt.has(e.tag)?!0:J(e,"text").textStyle?.startsWith("heading-")===!0}const a={not:{context:"blockOutsideBox",is:!0}},B={all:[a,{not:{context:"boxSharesWidth",is:!0}}]},k={all:[a,{not:{context:"boxSharesWidthPhone",is:!0}}]},C={all:[a,{not:{context:"boxSharesWidthTablet",is:!0}}]};function H(t,e,i){return{any:[{field:o(t),is:e},{all:[{field:o(t),set:!1},i??{field:t,is:e}]}]}}function I(t,e,i){return{any:[{field:l(t),is:e},{all:[{field:l(t),set:!1},i??{field:t,is:e}]}]}}const N={any:[{field:"textFit",is:"shrink"},{all:[{field:"textFit",set:!1},{not:{context:"textWrapsByDefault",is:!0}}]}]},rt=[[["_gBlockSize","minWidth",o("minWidth"),l("minWidth"),"maxWidth",o("maxWidth"),l("maxWidth")],a],[["widthFit"],B],[[o("widthFit")],C],[[l("widthFit")],k],[["width"],{all:[B,{field:"widthFit",is:"fixed"}]}],[[o("width")],{all:[C,H("widthFit","fixed")]}],[[l("width")],{all:[k,I("widthFit","fixed")]}]],y=H("textFit","shrink",N),E=[[["_gText","textFit",o("textFit"),l("textFit")],a],[["minFont"],{all:[a,N]}],[[o("minFont")],{all:[a,y]}],[[l("minFont")],{all:[a,I("textFit","shrink",y)]}]],h=(t,e)=>et(e.appState,t.props?.id),d=t=>!!t&&typeof t.type=="string"&&q(t.type)!==null,b=t=>(t.type==="Flex"||t.type==="HeroGroup")&&Y(t.type,t.props?.direction)==="row",w=t=>{const e=P(t);return e!==void 0&&e!=="fit"},st={blockOutsideBox:(t,e)=>!d(h(t,e)),boxSharesWidth:(t,e)=>{const i=h(t,e);return!d(i)||!b(i)?!1:T({...i.props,direction:"row"})!==""?!0:g(i.props?.share)!==""&&!w(t.props?.widthFit)},boxSharesWidthTablet:(t,e)=>{const i=h(t,e);if(!d(i)||!b(i))return!1;if(V(i.props?.[o("columns")])!==""||T({...i.props,direction:"row"})!=="")return!0;const n=M(i.props?.[o("share")])??i.props?.share;return g(n)!==""&&!w(t.props?.[o("widthFit")]??t.props?.widthFit)},boxSharesWidthPhone:(t,e)=>{const i=h(t,e);if(!d(i)||!b(i))return!1;const n=i.props?.phoneRow;return(Number(n)===2||Number(n)===3)&&!U(n,i.props?.[l("share")])&&!w(t.props?.[l("widthFit")]??t.props?.widthFit)}},ot=t=>/^_[gds][A-Z]/.test(t);function lt(t,e,i){const n=Object.entries(t),r=n.findIndex(([c])=>c===e);if(r===-1)return null;let s=r+1;for(;s<n.length&&!ot(n[s][0]);)s++;return Object.fromEntries([...n.slice(0,s),...Object.entries(i),...n.slice(s)])}function R(t,e,i){const n=Object.entries(t);return Object.fromEntries([...n.slice(0,e),...Object.entries(i),...n.slice(e)])}function ct(t,e,i){const n=Object.keys(e);if(n.includes("_dSize")){const{_gBlockSize:r,...s}=i;return R(e,n.indexOf("_dSize")+1,s)}return at.has(t)&&n.includes("_gSpacing")?R(e,n.indexOf("_gSpacing"),i):{...e,...i}}const at=new Set(["Text","Heading"]);function ht(t,e){const{_gText:i,...n}=e;return lt(t,"_gText",n)??{...t,...e}}function dt(t){const e=new WeakMap;return i=>{if(!i||!("textFit"in i))return i;let n=e.get(i);if(!n){n={...i};for(const r of["textFit",o("textFit"),l("textFit")])r in n&&(n[r]=t[r]);e.set(i,n)}return n}}const Bt={name:"blockSize",applies:(t,e,i)=>tt.includes(t)&&!!i&&typeof i.render=="function",panel(t,e,i){const n=it.has(e),{text:r}=i.blockSizeFields(n?{tablet:!0,textFit:e==="Heading"?"shrink":"wrap"}:{}),{size:s}=i.blockSizeFields({tablet:!0});let c=ct(e,t.fields??{},S(s,rt));if(n){const u=S(r,E);if(c=ht(c,u),e==="Text"){const z=S(i.blockSizeFields({tablet:!0,textFit:"shrink"}).text,E),D=dt(z),F=t.resolveFields,j=(m,f)=>{const x=F?F(m,f):f.fields,_=W=>O(e,m?.props??{})?D(W??f.fields):W;return x instanceof Promise?x.then(_):_(x)};t.resolveFields=j}}t.fields=c,Q(t,{...st,textWrapsByDefault:u=>!O(e,u.props??{})})},draw(t){ut(t)}};function ut(t){const e=t.render;t.render=i=>{const n=X(i),r=G(n),s=e(i);if(r===null)return s;const c=L(i);return p(ft,{size:r,className:c?`${r.className} ${c}`:r.className,inCell:A(n),widens:K(n),children:s})}}function ft({size:t,className:e,inCell:i,widens:n,children:r}){const s=v()?.phoneCells===!0,c=n?p(Z,{children:r}):r;return p($,{className:s&&i?`${e} ${i}`:e,...Object.keys(t.style).length?{style:t.style}:{},attrs:t.attrs,children:c})}export{Bt as blockSize,O as textShrinksByDefault};
1
+ import{jsx as p}from"react/jsx-runtime";import{parseBlockWidthFit as P,phoneKey as l,tabletKey as o}from"efficient-easel/draw";import{blockCanWidenPastCell as K,blockFillInCellClass as A,blockPhoneHideClass as L,blockSizeOf as G,blockSizeValuesOf as X}from"../../content/block-size.js";import{NoCellBound as Z}from"../../../components/BoxCellContext.js";import{CellWrap as $,useBoxCell as v}from"../../../components/InBoxContext.js";import{boxPhoneRowFits as U,boxRowColumnsClass as T,boxShareClasses as g,boxShareTabletOf as M,boxTabletColumnsClass as V}from"../../../../format/lib/content/box-layout.js";import{resolveContainerDirection as Y}from"../../../../format/lib/content/container-direction.js";import{containerBlocksFor as q}from"../../../../format/lib/document/container-blocks.js";import{readPartStyle as J}from"../part-styles.js";import{addShowWhenFacts as Q,withRowRules as S}from"../../../../format/lib/document/show-when-attach.js";import{BOX_BLOCK_KEYS as tt}from"./cell-width.js";import{findParentNode as et}from"../../../../format/lib/document/passes/document-position.js";const it=new Set(["Text","Heading"]),nt=new Set(["h1","h2","h3","h4","h5","h6"]);function O(t,e){return t==="Heading"?!0:t!=="Text"?!1:typeof e.tag=="string"&&nt.has(e.tag)?!0:J(e,"text").textStyle?.startsWith("heading-")===!0}const a={not:{context:"blockOutsideBox",is:!0}},B={all:[a,{not:{context:"boxSharesWidth",is:!0}}]},k={all:[a,{not:{context:"boxSharesWidthPhone",is:!0}}]},C={all:[a,{not:{context:"boxSharesWidthTablet",is:!0}}]};function H(t,e,i){return{any:[{field:o(t),is:e},{all:[{field:o(t),set:!1},i??{field:t,is:e}]}]}}function I(t,e,i){return{any:[{field:l(t),is:e},{all:[{field:l(t),set:!1},i??{field:t,is:e}]}]}}const N={any:[{field:"textFit",is:"shrink"},{all:[{field:"textFit",set:!1},{not:{context:"textWrapsByDefault",is:!0}}]}]},rt=[[["_gBlockSize","minWidth",o("minWidth"),l("minWidth"),"maxWidth",o("maxWidth"),l("maxWidth")],a],[["widthFit"],B],[[o("widthFit")],C],[[l("widthFit")],k],[["width"],{all:[B,{field:"widthFit",is:"fixed"}]}],[[o("width")],{all:[C,H("widthFit","fixed")]}],[[l("width")],{all:[k,I("widthFit","fixed")]}]],y=H("textFit","shrink",N),E=[[["_gText","textFit",o("textFit"),l("textFit")],a],[["minFont"],{all:[a,N]}],[[o("minFont")],{all:[a,y]}],[[l("minFont")],{all:[a,I("textFit","shrink",y)]}]],h=(t,e)=>et(e.appState,t.props?.id),d=t=>!!t&&typeof t.type=="string"&&q(t.type)!==null,b=t=>(t.type==="Flex"||t.type==="HeroGroup")&&Y(t.type,t.props?.direction)==="row",w=t=>{const e=P(t);return e!==void 0&&e!=="fit"},st={blockOutsideBox:(t,e)=>!d(h(t,e)),boxSharesWidth:(t,e)=>{const i=h(t,e);return!d(i)||!b(i)?!1:T({...i.props,direction:"row"})!==""?!0:g(i.props?.share)!==""&&!w(t.props?.widthFit)},boxSharesWidthTablet:(t,e)=>{const i=h(t,e);if(!d(i)||!b(i))return!1;if(V(i.props?.[o("columns")])!==""||T({...i.props,direction:"row"})!=="")return!0;const n=M(i.props?.[o("share")])??i.props?.share;return g(n)!==""&&!w(t.props?.[o("widthFit")]??t.props?.widthFit)},boxSharesWidthPhone:(t,e)=>{const i=h(t,e);if(!d(i)||!b(i))return!1;const n=i.props?.phoneRow;return(Number(n)===2||Number(n)===3)&&!U(n,i.props?.[l("share")])&&!w(t.props?.[l("widthFit")]??t.props?.widthFit)}},ot=t=>/^_[gds][A-Z]/.test(t);function lt(t,e,i){const n=Object.entries(t),r=n.findIndex(([c])=>c===e);if(r===-1)return null;let s=r+1;for(;s<n.length&&!ot(n[s][0]);)s++;return Object.fromEntries([...n.slice(0,s),...Object.entries(i),...n.slice(s)])}function R(t,e,i){const n=Object.entries(t);return Object.fromEntries([...n.slice(0,e),...Object.entries(i),...n.slice(e)])}function ct(t,e,i){const n=Object.keys(e);if(n.includes("_dSize")){const{_gBlockSize:r,...s}=i;return R(e,n.indexOf("_dSize")+1,s)}return at.has(t)&&n.includes("_gSpacing")?R(e,n.indexOf("_gSpacing"),i):{...e,...i}}const at=new Set(["Text","Heading"]);function ht(t,e){const{_gText:i,...n}=e;return lt(t,"_gText",n)??{...t,...e}}function dt(t){const e=new WeakMap;return i=>{if(!i||!("textFit"in i))return i;let n=e.get(i);if(!n){n={...i};for(const r of["textFit",o("textFit"),l("textFit")])r in n&&(n[r]=t[r]);e.set(i,n)}return n}}const Bt={name:"blockSize",applies:(t,e,i)=>tt.includes(t)&&!!i&&typeof i.render=="function",panel(t,e,i){const n=it.has(e),{text:r}=i.blockSizeFields(n?{tablet:!0,textFit:e==="Heading"?"shrink":"wrap"}:{}),{size:s}=i.blockSizeFields({tablet:!0});let c=ct(e,t.fields??{},S(s,rt));if(n){const u=S(r,E);if(c=ht(c,u),e==="Text"){const z=S(i.blockSizeFields({tablet:!0,textFit:"shrink"}).text,E),D=dt(z),F=t.resolveFields,j=(m,f)=>{const x=F?F(m,f):f.fields,_=W=>O(e,m?.props??{})?D(W??f.fields):W;return x instanceof Promise?x.then(_):_(x)};t.resolveFields=j}}t.fields=c,Q(t,{...st,textWrapsByDefault:u=>!O(e,u.props??{})})},draw(t){ut(t)}};function ut(t){const e=t.render;t.render=i=>{const n=X(i),r=G(n),s=e(i);if(r===null)return s;const c=L(i);return p(ft,{size:r,className:c?`${r.className} ${c}`:r.className,inCell:A(n),widens:K(n),children:s})}}function ft({size:t,className:e,inCell:i,widens:n,children:r}){const s=v()?.phoneCells===!0,c=n?p(Z,{children:r}):r;return p($,{className:s&&i?`${e} ${i}`:e,...Object.keys(t.style).length?{style:t.style}:{},attrs:t.attrs,children:c})}export{Bt as blockSize,O as textShrinksByDefault};
@@ -1 +1,2 @@
1
1
  export declare function sanitizeHtml(html: string): string;
2
+ export declare function sanitizeHtmlFragment(html: string): DocumentFragment;
@@ -1 +1 @@
1
- import e from"isomorphic-dompurify";e.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener noreferrer")});function i(t){return e.sanitize(t,{ALLOWED_TAGS:["p","br","hr","span","div","section","article","header","footer","h1","h2","h3","h4","h5","h6","strong","em","b","i","u","small","sup","sub","mark","ul","ol","li","blockquote","a","img","picture","source","figure","figcaption","video","table","thead","tbody","tr","th","td"],ALLOWED_ATTR:["href","title","alt","src","srcset","sizes","class","style","target","rel","width","height","loading","poster","controls"],ALLOW_DATA_ATTR:!1})}export{i as sanitizeHtml};
1
+ import e from"isomorphic-dompurify";e.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener noreferrer")});const r={ALLOWED_TAGS:["p","br","hr","span","div","section","article","header","footer","h1","h2","h3","h4","h5","h6","strong","em","b","i","u","small","sup","sub","mark","ul","ol","li","blockquote","a","img","picture","source","figure","figcaption","video","table","thead","tbody","tr","th","td"],ALLOWED_ATTR:["href","title","alt","src","srcset","sizes","class","style","target","rel","width","height","loading","poster","controls"],ALLOW_DATA_ATTR:!1};function a(t){return e.sanitize(t,r)}function o(t){return e.sanitize(t,{...r,RETURN_DOM_FRAGMENT:!0})}export{a as sanitizeHtml,o as sanitizeHtmlFragment};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-web-builder",
3
- "version": "56.0.0",
3
+ "version": "57.0.0",
4
4
  "description": "The EFFICIENT website builder: the website editor, the general sections and the renderer that draws them, compiled. Hostable by any EFFICIENT product; nothing here imports a host.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Efficient Pty Ltd",
@@ -53,8 +53,8 @@
53
53
  },
54
54
  "peerDependencies": {
55
55
  "@tabler/icons-react": "^3.46.0",
56
- "efficient-easel": "^28.4.0",
57
- "efficient-shell": "^12.13.0",
56
+ "efficient-easel": "^29.0.0",
57
+ "efficient-shell": "^12.16.0",
58
58
  "isomorphic-dompurify": "^3.18.0",
59
59
  "next": ">=16",
60
60
  "react": ">=19",
@@ -72,8 +72,8 @@
72
72
  "@types/node": "^20",
73
73
  "@types/react": "^19",
74
74
  "@types/react-dom": "^19",
75
- "efficient-easel": "^28.4.0",
76
- "efficient-shell": "^12.13.0",
75
+ "efficient-easel": "^29.0.0",
76
+ "efficient-shell": "^12.16.0",
77
77
  "esbuild": "^0.28.0",
78
78
  "happy-dom": "^20.14.5",
79
79
  "isomorphic-dompurify": "^3.18.0",
@@ -1 +0,0 @@
1
- "use client";import{jsx as r,Fragment as l}from"react/jsx-runtime";import{createContext as s,useContext as o}from"react";import{cellPictureSizesOf as i,narrowerSizes as c}from"../../format/lib/content/cell-picture-sizes.js";const u={hasWidth:!1},n=s(u),a=s(!1);function C(){const t=o(n),e=o(a);return t.hasWidth||e}function f(t){const{bound:e}=o(n);return e&&i(e)||t}function p(t){const{bound:e}=o(n);return c(t,e&&i(e))}function m({children:t}){const e=o(n);return e.bound?r(n.Provider,{value:{hasWidth:e.hasWidth},children:t}):r(l,{children:t})}export{n as BoxCellContext,a as BoxCellWidthContext,m as NoCellBound,C as useBoxCellHasWidth,f as useCellPictureSizes,p as useSizesWithinCell};