efficient-web-builder 73.1.0 → 73.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 (101) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/editor/components/SlotChildRows.js +1 -1
  3. package/dist/editor/components/StandaloneSectionEditor.js +1 -1
  4. package/dist/editor/components/StorefrontEditor.js +1 -1
  5. package/dist/editor/components/TickerSettingsPanel.js +1 -1
  6. package/dist/editor/components/useHostDocumentBridge.js +1 -1
  7. package/dist/editor/lib/document/blocks/general/Footprint/fields.js +1 -1
  8. package/dist/editor/lib/document/blocks/general/Hero/fields.js +1 -1
  9. package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
  10. package/dist/editor/lib/document/blocks/hero-shared-fields.d.ts +5 -0
  11. package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -1
  12. package/dist/editor/lib/document/controls.js +1 -1
  13. package/dist/editor/lib/document/footer-blocks.js +1 -1
  14. package/dist/editor/lib/document/own-pad-fields.d.ts +5 -0
  15. package/dist/editor/lib/document/own-pad-fields.js +1 -0
  16. package/dist/editor/lib/document/passes/inspector.js +1 -1
  17. package/dist/editor/lib/editor-document-adapter.js +1 -1
  18. package/dist/format/lib/animation/hover.js +1 -1
  19. package/dist/format/lib/content/accordion-row-style.d.ts +3 -1
  20. package/dist/format/lib/content/accordion-row-style.js +1 -1
  21. package/dist/format/lib/content/box-layout.js +1 -1
  22. package/dist/format/lib/content/box-shape.d.ts +1 -1
  23. package/dist/format/lib/content/button-icon.d.ts +3 -1
  24. package/dist/format/lib/content/button-icon.js +1 -1
  25. package/dist/format/lib/content/card-place.d.ts +3 -1
  26. package/dist/format/lib/content/card-place.js +1 -1
  27. package/dist/format/lib/content/chat-launcher.js +1 -1
  28. package/dist/format/lib/content/container-direction.js +1 -1
  29. package/dist/format/lib/content/footprint.d.ts +22 -0
  30. package/dist/format/lib/content/footprint.js +1 -1
  31. package/dist/format/lib/content/image-fit.js +1 -1
  32. package/dist/format/lib/content/image-text-rows.d.ts +5 -2
  33. package/dist/format/lib/content/image-text-rows.js +1 -1
  34. package/dist/format/lib/content/list-number.js +1 -1
  35. package/dist/format/lib/content/list-position.js +1 -1
  36. package/dist/format/lib/content/text-tag.js +1 -1
  37. package/dist/format/lib/document/blocks/general/Footprint/card-seed.js +1 -1
  38. package/dist/format/lib/document/box-footer.js +1 -1
  39. package/dist/format/lib/document/left-view.js +1 -1
  40. package/dist/format/lib/document/mockup-variant-fields.js +1 -1
  41. package/dist/format/lib/document/passes/types.d.ts +1 -0
  42. package/dist/format/lib/document/section-groups.js +1 -1
  43. package/dist/format/lib/editor-words-catalogue.d.ts +11 -0
  44. package/dist/format/lib/editor-words-catalogue.js +4 -4
  45. package/dist/format/lib/hero-arrows.js +1 -1
  46. package/dist/format/lib/hero-group-placement.js +1 -1
  47. package/dist/format/lib/hero-media-layout.js +1 -1
  48. package/dist/format/lib/hero-phone-stack.d.ts +12 -0
  49. package/dist/format/lib/hero-phone-stack.js +1 -1
  50. package/dist/format/lib/hero-video.js +1 -1
  51. package/dist/format/lib/reel.js +1 -1
  52. package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
  53. package/dist/format/lib/sections/section-head-placement.d.ts +3 -1
  54. package/dist/format/lib/sections/section-head-placement.js +1 -1
  55. package/dist/format/lib/source-rules/one-option-parser.d.ts +12 -0
  56. package/dist/format/lib/source-rules/one-option-parser.js +12 -0
  57. package/dist/format/lib/theme.d.ts +2 -1
  58. package/dist/format/lib/theme.js +4 -4
  59. package/dist/render/components/BoxTabPaneContext.d.ts +2 -3
  60. package/dist/render/components/ButtonBlock.d.ts +2 -0
  61. package/dist/render/components/ButtonBlock.js +1 -1
  62. package/dist/render/components/DealerFinder.d.ts +7 -1
  63. package/dist/render/components/DealerFinder.js +1 -1
  64. package/dist/render/components/Footprint.d.ts +6 -2
  65. package/dist/render/components/Footprint.js +1 -1
  66. package/dist/render/components/Heading.d.ts +1 -1
  67. package/dist/render/components/Heading.js +1 -1
  68. package/dist/render/components/HeroSection.d.ts +4 -1
  69. package/dist/render/components/HeroSection.js +1 -1
  70. package/dist/render/components/HeroSingle.d.ts +4 -1
  71. package/dist/render/components/HeroSingle.js +1 -1
  72. package/dist/render/components/HeroSlide.d.ts +3 -0
  73. package/dist/render/components/HeroSlide.js +1 -1
  74. package/dist/render/components/SideListLayout.d.ts +8 -2
  75. package/dist/render/components/SideListLayout.js +1 -1
  76. package/dist/render/components/SiteGutterFrame.js +1 -1
  77. package/dist/render/components/Text.d.ts +1 -1
  78. package/dist/render/components/Text.js +1 -1
  79. package/dist/render/lib/content/section-padding.d.ts +36 -2
  80. package/dist/render/lib/content/section-padding.js +1 -1
  81. package/dist/render/lib/document/blocks/general/ButtonBlock/render.js +1 -1
  82. package/dist/render/lib/document/blocks/general/CustomHTML/render.js +1 -1
  83. package/dist/render/lib/document/blocks/general/Footprint/render.js +1 -1
  84. package/dist/render/lib/document/blocks/general/Hero/render.js +1 -1
  85. package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
  86. package/dist/render/lib/document/blocks/general/LocationMap/render.js +1 -1
  87. package/dist/render/lib/document/blocks/general/LogoBlock/render.js +1 -1
  88. package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -2
  89. package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
  90. package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.js +1 -1
  91. package/dist/render/lib/document/custom-css.d.ts +4 -2
  92. package/dist/render/lib/document/custom-css.js +2 -2
  93. package/dist/render/lib/document/header-clearance.js +1 -1
  94. package/dist/render/lib/document/header-ink.js +1 -1
  95. package/dist/render/lib/document/passes/section-padding.d.ts +4 -0
  96. package/dist/render/lib/document/passes/section-padding.js +1 -1
  97. package/dist/render/lib/document/sanitize.d.ts +4 -1
  98. package/dist/render/lib/document/sanitize.js +1 -1
  99. package/dist/routine-index.json +1 -0
  100. package/dist/value-index.json +1 -0
  101. package/package.json +5 -4
@@ -1 +1 @@
1
- import{jsx as _}from"react/jsx-runtime";import{HideTaker as E}from"../../../components/ViewHideRoot.js";import{LineChoice as w}from"../../../components/InBoxContext.js";import{isBackgroundBox as T}from"../../../../format/lib/content/box-background.js";import{boxSideSpaceOf as D}from"../../../../format/lib/content/box-side-space.js";import{BAND_PAD_KEYS as d,BAND_PAD_UNIT_KEY as I,SECTION_PAD_KEYS as x,padValuesOf as A,sectionPadAttrs as N}from"../../content/section-padding.js";import{sectionFillPassClass as S}from"../../../../format/lib/content/section-min-height.js";import{COPIES_IN_THE_BOX as O,drawsCopiesInTheBox as h}from"../../../../format/lib/content/copies-in-box.js";import{ownEntry as m}from"../../../../format/lib/own-entry.js";const g={ParagraphsA:{top:60,bottom:80},StatsParagraph:{top:120,bottom:120},Timeline:{top:120,bottom:120},Footprint:{top:120,bottom:120},TimelineTrack:{top:120,bottom:120},TitleWithButtons:{top:140,bottom:140},ProcessSteps:{top:120,bottom:120}},V=new Set(Object.keys(g));function l(e,t){return t?.innerPadding??m(g,e)}const X=e=>l(e)??{},v=e=>m({DetailRows:{top:100,bottom:100}},e),b=new Set(["Flex","Text","Heading","ImageBlock"]),B=new Set(["Divider"]),C=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),p=new Set(["ProductGrid"]);function c(e,t,n=!1){const r=e.render;e.render=i=>{if(t?.(i))return r(i);const o=N({...A(i,x,n),sideSpace:D(i.sideSpace)}),f=r(i);if(!o)return f;const P=a=>_(E,{className:a?`${o.className} ${a}`:o.className,style:o.style,children:f}),s=S(i,{atSectionLine:!0}),u=S(i);return s===u?P(s):_(w,{line:"by-box",draw:a=>P(a?u:s)})}}const y={name:"sectionPadding",applies:(e,t,n)=>t.isSection(e)&&!C.has(e)&&!!n&&typeof n.render=="function",panel(e,t,n){const r=l(t,e);if(r){e.fields={...e.fields,...n.sidesPaddingFields({keys:d,unitKey:I,fallback:r,tablet:!0,siteSide:!0})};return}if(p.has(t))return;const i=[d.top,d.bottom].filter(o=>e.fields!=null&&o in e.fields);if(i.length)throw new Error(`section-padding: ${t} declares its own ${i.join(" / ")} row; declare \`innerPadding: { top, bottom }\` in its meta and the one Padding row draws on its band`);e.fields={...e.fields,...n.sidesPaddingFields({tablet:!0,siteSide:!0})}},draw(e,t){if(!l(t,e)){if(p.has(t)){c(e);return}b.has(t)||B.has(t)||c(e,t==="Flex"?n=>T(n.bgImage):O.has(t)?n=>h(t,n):void 0,!0)}}},F=["Heading","Text","ImageBlock"],L=["LogoBlock"],G={name:"blockPadding",applies:(e,t,n)=>(F.includes(e)||L.includes(e))&&!!n&&typeof n.render=="function",panel(e,t,n){e.fields={...e.fields,...n.sidesPaddingFields({tablet:!0,siteSide:!0})}},draw(e,t){b.has(t)||c(e,void 0,!0)}};export{B as PADS_ITS_OWN_SPACE,b as PAD_ON_ROOT,V as SECTION_PAD_INNER,g as SECTION_PAD_INNER_DEFAULTS,G as blockPadding,X as innerPaddingFallback,v as ownPairDefault,y as sectionPadding};
1
+ import{jsx as A}from"react/jsx-runtime";import{HideTaker as D}from"../../../components/ViewHideRoot.js";import{LineChoice as E}from"../../../components/InBoxContext.js";import{isBackgroundBox as T}from"../../../../format/lib/content/box-background.js";import{boxSideSpaceOf as w}from"../../../../format/lib/content/box-side-space.js";import{BAND_PAD_KEYS as g,BAND_PAD_UNIT_KEY as O,BLOCK_PAD_FRAME as u,PAD_TOTAL_KEY as c,SECTION_PAD_KEYS as p,padTotalKeys as x,padValuesOf as N,sectionPadAttrs as I}from"../../content/section-padding.js";import{readPartStyle as C}from"../part-styles.js";import{say as F}from"../../../../format/lib/editor-words.js";import{sectionFillPassClass as b}from"../../../../format/lib/content/section-min-height.js";import{COPIES_IN_THE_BOX as L,drawsCopiesInTheBox as R}from"../../../../format/lib/content/copies-in-box.js";import{ownEntry as P}from"../../../../format/lib/own-entry.js";const m={ParagraphsA:{top:60,bottom:80},StatsParagraph:{top:120,bottom:120},Timeline:{top:120,bottom:120},Footprint:{top:120,bottom:120},TimelineTrack:{top:120,bottom:120},TitleWithButtons:{top:140,bottom:140},ProcessSteps:{top:120,bottom:120}},tt=new Set(Object.keys(m));function _(t,e){return e?.innerPadding??P(m,t)}const et=t=>_(t)??{},nt=t=>P({DetailRows:{top:100,bottom:100}},t),h=new Set(["Flex","Text","Heading","ImageBlock","ButtonBlock"]),y=new Set(["Divider"]),K=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),B=new Set(["ProductGrid"]);function S(t,e,n=!1){const s=t.render;t.render=o=>{if(e?.(o))return s(o);const i=I({...N(o,p,n),sideSpace:w(o.sideSpace)}),d=s(o);if(!i)return d;const a=f=>A(D,{className:f?`${i.className} ${f}`:i.className,style:i.style,children:d}),r=b(o,{atSectionLine:!0}),l=b(o);return r===l?a(r):A(E,{line:"by-box",draw:f=>a(f?l:r)})}}const ot={name:"sectionPadding",applies:(t,e,n)=>e.isSection(t)&&!K.has(t)&&!!n&&typeof n.render=="function",panel(t,e,n){const s=_(e,t);if(s){t.fields={...t.fields,...n.sidesPaddingFields({keys:g,unitKey:O,fallback:s,tablet:!0,siteSide:!0})};return}if(B.has(e))return;const o=[g.top,g.bottom].filter(i=>t.fields!=null&&i in t.fields);if(o.length)throw new Error(`section-padding: ${e} declares its own ${o.join(" / ")} row; declare \`innerPadding: { top, bottom }\` in its meta and the one Padding row draws on its band`);t.fields={...t.fields,...n.sidesPaddingFields({tablet:!0,siteSide:!0})}},draw(t,e){if(!_(e,t)){if(B.has(e)){S(t);return}h.has(e)||y.has(e)||S(t,e==="Flex"?n=>T(n.bgImage):L.has(e)?n=>R(e,n):void 0,!0)}}},H=["Heading","Text","ImageBlock","ButtonBlock"],W=["LogoBlock"],v={Text:t=>C(t,"text").textStyle?.startsWith("heading-")?u.heading:u.text,Heading:()=>u.heading,ButtonBlock:()=>u.text},Y={ButtonBlock:"Outer padding"};function j(t,e){const n=t[c],s=Array.isArray(n)?n.filter(r=>typeof r=="string"):[],o=x().filter(r=>e?.[r]);if(!o.length)return t;const i=[...s.filter(r=>!o.includes(r)),...o.filter(r=>typeof t[r]=="number")];if(i.length===s.length&&i.every((r,l)=>r===s[l]))return t;const{[c]:d,...a}=t;return i.length?{...a,[c]:i}:a}function k(t,e){if(e<=0)return null;const n=Array.isArray(t[c])?t[c]:[];return x().some(o=>typeof t[o]=="number"&&!n.includes(o))?F("plus {n} px (older setting)",{n:e}):null}const rt={name:"blockPadding",applies:(t,e,n)=>(H.includes(t)||W.includes(t))&&!!n&&typeof n.render=="function",panel(t,e,n){const s=P(v,e);if(!s){t.fields={...t.fields,...n.sidesPaddingFields({tablet:!0,siteSide:!0})};return}t.fields={...t.fields,...n.ownPaddingFields?.(s,k,P(Y,e))??n.sidesPaddingFields({tablet:!0,siteSide:!0})};const o=t.resolveData;t.resolveData=(i,d)=>{const a=i.props??{},r=d?.trigger==="replace"?j(a,d.changed):a,l=r===a?i:{...i,props:r};return o?o(l,d):l}},draw(t,e){h.has(e)||S(t,void 0,!0)}};export{v as OWN_PAD_FRAME,Y as OWN_PAD_LABEL,y as PADS_ITS_OWN_SPACE,h as PAD_ON_ROOT,tt as SECTION_PAD_INNER,m as SECTION_PAD_INNER_DEFAULTS,rt as blockPadding,et as innerPaddingFallback,k as olderPadNote,nt as ownPairDefault,ot as sectionPadding,j as withPadTotals};
@@ -1,2 +1,5 @@
1
- export declare function sanitizeHtml(html: string): string;
1
+ export declare function sanitizeHtml(html: string, opts?: {
2
+ idPrefix?: string;
3
+ }): string;
4
+ export declare function sectionIds(html: string): ReadonlySet<string>;
2
5
  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")});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};
1
+ import n from"isomorphic-dompurify";n.addHook("afterSanitizeAttributes",t=>{if(t.tagName==="A"&&t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener noreferrer"),!r)return;for(const i of u){const s=t.getAttribute?.(i);if(s==null)continue;const c=a=>i==="id"||l.has(a);t.setAttribute(i,s.trim().split(/\s+/).filter(Boolean).map(a=>c(a)?r+a:a).join(" "))}const e=t.tagName==="A"?t.getAttribute("href"):null;e&&e.startsWith("#")&&l.has(e.slice(1))&&t.setAttribute("href",`#${r}${e.slice(1)}`)});const u=["id","popovertarget","aria-controls","aria-labelledby","aria-describedby"];let r="",l=new Set;const o={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},f={...o,ALLOWED_TAGS:[...o.ALLOWED_TAGS,"button","details","summary"],ALLOWED_ATTR:[...o.ALLOWED_ATTR,"id","type","popover","popovertarget","popovertargetaction","open","aria-controls","aria-labelledby","aria-describedby"]};function b(t,e={}){const i=e.idPrefix&&/^[A-Za-z][\w-]*$/.test(e.idPrefix)?e.idPrefix:"";l=i?A(t):new Set,r=i;try{return n.sanitize(t,r?f:o)}finally{r="",l=new Set}}function A(t){const e=new Set,i=r;r="";try{const s=n.sanitize(t,{...f,RETURN_DOM_FRAGMENT:!0});for(const c of Array.from(s.querySelectorAll("[id]")))for(const a of(c.getAttribute("id")??"").trim().split(/\s+/))a&&e.add(a)}finally{r=i}return e}function p(t){return n.sanitize(t,{...o,RETURN_DOM_FRAGMENT:!0})}export{b as sanitizeHtml,p as sanitizeHtmlFragment,A as sectionIds};