efficient-web-builder 55.3.1 → 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 (155) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/dist/editor/components/BlockGapField.d.ts +1 -2
  3. package/dist/editor/components/BlockGapField.js +1 -1
  4. package/dist/editor/components/CardShadowField.d.ts +1 -2
  5. package/dist/editor/components/CardShadowField.js +1 -1
  6. package/dist/editor/components/ChatSettingsPanel.js +1 -1
  7. package/dist/editor/components/CornersField.d.ts +1 -2
  8. package/dist/editor/components/CornersField.js +1 -1
  9. package/dist/editor/components/HeroPartPanel.js +1 -1
  10. package/dist/editor/components/HoverEffectField.d.ts +1 -2
  11. package/dist/editor/components/HoverEffectField.js +1 -1
  12. package/dist/editor/components/PartSettingsPanel.js +1 -1
  13. package/dist/editor/components/PhotographyField.d.ts +1 -2
  14. package/dist/editor/components/PhotographyField.js +1 -1
  15. package/dist/editor/components/SectionEditor.js +1 -1
  16. package/dist/editor/components/SectionThumbnail.js +1 -1
  17. package/dist/editor/components/ShadowColourField.d.ts +1 -2
  18. package/dist/editor/components/ShadowColourField.js +1 -1
  19. package/dist/editor/components/ShareButtonField.d.ts +1 -2
  20. package/dist/editor/components/ShareButtonField.js +1 -1
  21. package/dist/editor/components/SideSpaceField.d.ts +1 -2
  22. package/dist/editor/components/SideSpaceField.js +1 -1
  23. package/dist/editor/components/SiteFields.d.ts +2 -1
  24. package/dist/editor/components/SiteFields.js +1 -1
  25. package/dist/editor/components/SocialLinksPanel.js +1 -1
  26. package/dist/editor/components/SourceStatus.d.ts +2 -1
  27. package/dist/editor/components/SourceStatus.js +1 -1
  28. package/dist/editor/components/StandaloneSectionEditor.js +1 -1
  29. package/dist/editor/components/StorefrontEditor.js +1 -1
  30. package/dist/editor/components/StylesPanel.js +1 -1
  31. package/dist/editor/components/WebsiteHintsProvider.d.ts +8 -0
  32. package/dist/editor/components/WebsiteHintsProvider.js +1 -0
  33. package/dist/editor/components/WebsiteSettingsPanel.d.ts +6 -17
  34. package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
  35. package/dist/editor/components/storefront-editor.css +40 -39
  36. package/dist/editor/components/useHostDocumentBridge.js +1 -1
  37. package/dist/editor/components/useSectionToBoxPass.js +1 -1
  38. package/dist/editor/lib/animation/entrance-fields.d.ts +0 -3
  39. package/dist/editor/lib/animation/entrance-fields.js +1 -1
  40. package/dist/editor/lib/animation/fields.js +1 -1
  41. package/dist/editor/lib/animation/hover-fields.js +1 -1
  42. package/dist/editor/lib/animation/loop-fields.d.ts +2 -0
  43. package/dist/editor/lib/animation/loop-fields.js +1 -1
  44. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  45. package/dist/editor/lib/document/controls.d.ts +2 -1
  46. package/dist/editor/lib/document/controls.js +1 -1
  47. package/dist/editor/lib/document/field-groups.js +1 -1
  48. package/dist/editor/lib/document/overrides.js +1 -1
  49. package/dist/editor/lib/editor-document-adapter.js +1 -1
  50. package/dist/editor/lib/host-document-bridge.d.ts +2 -1
  51. package/dist/editor/lib/host-document-bridge.js +1 -1
  52. package/dist/editor/lib/keyed-store.d.ts +7 -0
  53. package/dist/editor/lib/keyed-store.js +1 -0
  54. package/dist/editor/lib/page-live-state.js +1 -1
  55. package/dist/editor/lib/page-video-frames.d.ts +11 -0
  56. package/dist/editor/lib/page-video-frames.js +1 -0
  57. package/dist/editor/lib/pinned-chrome-doc.d.ts +1 -0
  58. package/dist/editor/lib/pinned-chrome-doc.js +1 -1
  59. package/dist/editor/lib/sections/new-section-node.js +1 -1
  60. package/dist/editor/lib/sections/text-layouts.js +1 -1
  61. package/dist/format/lib/animation/hover.d.ts +2 -3
  62. package/dist/format/lib/animation/hover.js +1 -1
  63. package/dist/format/lib/animation/loop.js +1 -1
  64. package/dist/format/lib/content/box-layout.d.ts +5 -3
  65. package/dist/format/lib/content/box-layout.js +1 -1
  66. package/dist/format/lib/content/card-template.js +1 -1
  67. package/dist/format/lib/content/cell-picture-sizes.d.ts +31 -0
  68. package/dist/format/lib/content/cell-picture-sizes.js +1 -0
  69. package/dist/format/lib/content/image-aspect.d.ts +1 -0
  70. package/dist/format/lib/content/image-aspect.js +1 -1
  71. package/dist/format/lib/content/mirror-cards.d.ts +1 -1
  72. package/dist/format/lib/content/mirror-cards.js +1 -1
  73. package/dist/format/lib/document/article-body-seed.d.ts +10 -0
  74. package/dist/format/lib/document/article-body-seed.js +1 -0
  75. package/dist/format/lib/document/blocks/general/Timeline/meta.d.ts +2 -1
  76. package/dist/format/lib/document/blocks/general/Timeline/meta.js +2 -2
  77. package/dist/format/lib/document/blocks/placeholders.d.ts +1 -0
  78. package/dist/format/lib/document/blocks/placeholders.js +1 -1
  79. package/dist/format/lib/document/easel-row-words.d.ts +1 -1
  80. package/dist/format/lib/document/easel-row-words.js +1 -1
  81. package/dist/format/lib/document/passes/settings-groups.js +1 -1
  82. package/dist/format/lib/document/section-catalog.js +6 -2
  83. package/dist/format/lib/editor-words-catalogue.d.ts +13 -2
  84. package/dist/format/lib/editor-words-catalogue.js +5 -5
  85. package/dist/format/lib/editor-words-kept.js +1 -1
  86. package/dist/format/lib/fit-words.js +2 -2
  87. package/dist/format/lib/hero-video.d.ts +12 -0
  88. package/dist/format/lib/hero-video.js +1 -1
  89. package/dist/format/lib/sections/active-press-context.d.ts +4 -0
  90. package/dist/format/lib/sections/active-press-context.js +1 -0
  91. package/dist/format/lib/sections/section-head-placement.js +1 -1
  92. package/dist/format/lib/sections/section-presets.d.ts +5 -1
  93. package/dist/format/lib/sections/section-presets.js +1 -1
  94. package/dist/format/lib/sections/timeline-year-shape.js +1 -1
  95. package/dist/format/lib/sized-image.d.ts +1 -0
  96. package/dist/format/lib/sized-image.js +1 -1
  97. package/dist/format/lib/source-rules/page-picture-place.d.ts +6 -0
  98. package/dist/format/lib/source-rules/page-picture-place.js +4 -0
  99. package/dist/format/lib/source-rules/part-style-naming.js +2 -2
  100. package/dist/format/lib/theme.d.ts +2 -1
  101. package/dist/format/lib/theme.js +2 -2
  102. package/dist/format/lib/web-backend.d.ts +17 -0
  103. package/dist/render/components/Banner.js +1 -1
  104. package/dist/render/components/BoxCellContext.d.ts +14 -0
  105. package/dist/render/components/BoxCellContext.js +1 -0
  106. package/dist/render/components/Flex.d.ts +2 -1
  107. package/dist/render/components/Flex.js +1 -1
  108. package/dist/render/components/HeroPictures.d.ts +2 -1
  109. package/dist/render/components/HeroPictures.js +1 -1
  110. package/dist/render/components/HeroPoster.d.ts +4 -1
  111. package/dist/render/components/HeroPoster.js +1 -1
  112. package/dist/render/components/HeroSection.js +1 -1
  113. package/dist/render/components/HeroSlide.d.ts +3 -1
  114. package/dist/render/components/HeroSlide.js +1 -1
  115. package/dist/render/components/HeroVideoPlay.js +1 -1
  116. package/dist/render/components/ImageBlock.js +1 -1
  117. package/dist/render/components/LogoBlock.js +1 -1
  118. package/dist/render/components/Logos.js +1 -1
  119. package/dist/render/components/Manifesto.js +1 -1
  120. package/dist/render/components/Placeholder.d.ts +2 -1
  121. package/dist/render/components/Placeholder.js +1 -1
  122. package/dist/render/components/SectionHeader.js +1 -1
  123. package/dist/render/components/Split.js +1 -1
  124. package/dist/render/lib/content/block-size.d.ts +1 -0
  125. package/dist/render/lib/content/block-size.js +1 -1
  126. package/dist/render/lib/content/box-cell-bound.d.ts +17 -0
  127. package/dist/render/lib/content/box-cell-bound.js +1 -0
  128. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  129. package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
  130. package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
  131. package/dist/render/lib/document/blocks/general/Timeline/render.js +1 -1
  132. package/dist/render/lib/document/blocks/general/section-head-looks.d.ts +1 -0
  133. package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -2
  134. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +0 -1
  135. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  136. package/dist/render/lib/document/blocks/general/section-to-box-rows-pageheader.js +1 -1
  137. package/dist/render/lib/document/blocks/general/section-to-box-rows-strip.js +1 -1
  138. package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.d.ts +2 -0
  139. package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.js +2 -2
  140. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  141. package/dist/render/lib/document/page-render.js +1 -1
  142. package/dist/render/lib/document/passes/block-size.js +1 -1
  143. package/dist/render/lib/document/sanitize.d.ts +1 -0
  144. package/dist/render/lib/document/sanitize.js +1 -1
  145. package/dist/render/lib/document/slot-counts.d.ts +8 -0
  146. package/dist/render/lib/document/slot-counts.js +1 -0
  147. package/dist/render/lib/first-screen.d.ts +28 -0
  148. package/dist/render/lib/first-screen.js +1 -0
  149. package/dist/render/lib/sections/section-to-box.js +1 -1
  150. package/dist/render/lib/site-runtime.d.ts +1 -0
  151. package/package.json +5 -5
  152. package/dist/editor/components/KeepHint.d.ts +0 -5
  153. package/dist/editor/components/KeepHint.js +0 -1
  154. package/dist/render/components/BoxCellWidthContext.d.ts +0 -2
  155. package/dist/render/components/BoxCellWidthContext.js +0 -1
@@ -1 +1 @@
1
- import{isSectionGroupType as C,SITE_FOOTER_TYPE as E,SITE_HEADER_TYPE as O,siteFooterDocChrome as k}from"../../format/lib/document/section-groups.js";import{zoneOwner as F}from"../../render/lib/document/selection-parent.js";import{isNode as x}from"efficient-easel/data";const m="Footer",D=[O,m,E],y=e=>{const t=e?.content;return Array.isArray(t)?t:[]},p=e=>{const t=e?.zones;return t&&typeof t=="object"&&!Array.isArray(t)?t:null},h=e=>{const t=e?.props?.id;return typeof t=="string"?t:void 0},A=e=>F(e)?.ownerId??"";function I(e){const t=k(y(e)),o=t.some(r=>r?.type===E);return t.filter(r=>r?.type===O||r?.type===E||r?.type===m&&!o)}function z(e,t){const o=new Set,r=s=>{if(Array.isArray(s)){for(const c of s)r(c);return}if(!(!s||typeof s!="object")){if(x(s)){const c=h(s);c&&o.add(c)}for(const c of Object.values(s))r(c)}};if(r(e),t){let s=!0;const c=new Set;for(;s;){s=!1;for(const[d,u]of Object.entries(t))c.has(d)||!o.has(A(d))||(c.add(d),r(u),s=!0)}}return o}function T(e,t){const o={},r={};for(const[s,c]of Object.entries(e??{}))(t.has(A(s))?o:r)[s]=c;return{owned:o,rest:r}}function M(e,t){if(!t)return e;const o=I(t);if(!o.length)return e;const r=o.filter(u=>u.type===O),s=o.filter(u=>u.type!==O),c={...e,content:[...r,...y(e),...s]},{owned:d}=T(p(t),z(o,p(t)));return Object.keys(d).length&&(c.zones={...p(e)??{},...d}),c}function v(e,t){if(!t)return{page:e,chrome:null};const o=I(t),r=new Set(o.map(h).filter(n=>!!n)),s=[],c=[];for(const n of y(e)){const i=h(n);i&&r.has(i)||C(n?.type)?c.push(n):s.push(n)}const d=new Map(c.map(n=>[h(n),n])),u=new Set;let f=k(y(t)).flatMap(n=>{const i=h(n);if(!i||!r.has(i))return[n];const l=d.get(i);return l?(u.add(l),[l]):[]});for(const n of c)u.has(n)||f.some(i=>i?.type===n.type)||(f=n.type===O?[n,...f]:[...f,n]);f=k(f);const N=f.length===y(t).length&&f.every((n,i)=>n===y(t)[i]),g=p(e),P=z(f,g),{owned:w,rest:S}=T(g,P),_=T(p(t),z(o,p(t))).owned,b={...t,content:N?t.content:[...f]},a=p(t);if(a||Object.keys(w).length){const n={};for(const[i,l]of Object.entries(a??{}))i in _?i in w&&(n[i]=w[i]):n[i]=l;for(const[i,l]of Object.entries(w))i in n||(n[i]=l);b.zones=n,a&&R(b.zones,a)&&(b.zones=a)}const j={...e,content:s};return g&&(Object.keys(S).length||!Object.keys(_).length?j.zones=S:delete j.zones),{page:j,chrome:b}}function R(e,t){const o=Object.keys(e),r=Object.keys(t);return o.length===r.length&&o.every((s,c)=>s===r[c]&&e[s]===t[s])}function G(e,t){return o=>e(o)||o!==void 0&&D.includes(o)&&t()}export{D as PINNED_CHROME_TYPES,G as lockedWhileHeld,M as spliceChrome,v as splitChrome};
1
+ import{isSectionGroupType as C,SITE_FOOTER_TYPE as z,SITE_HEADER_TYPE as h,siteFooterDocChrome as k}from"../../format/lib/document/section-groups.js";import{zoneOwner as F}from"../../render/lib/document/selection-parent.js";import{isNode as D}from"efficient-easel/data";const m="Footer",A=[h,m,z],y=e=>{const t=e?.content;return Array.isArray(t)?t:[]},p=e=>{const t=e?.zones;return t&&typeof t=="object"&&!Array.isArray(t)?t:null},a=e=>{const t=e?.props?.id;return typeof t=="string"?t:void 0},I=e=>F(e)?.ownerId??"";function N(e){const t=k(y(e)),n=t.some(r=>r?.type===z);return t.filter(r=>r?.type===h||r?.type===z||r?.type===m&&!n)}function b(e,t){const n=new Set,r=o=>{if(Array.isArray(o)){for(const c of o)r(c);return}if(!(!o||typeof o!="object")){if(D(o)){const c=a(o);c&&n.add(c)}for(const c of Object.values(o))r(c)}};if(r(e),t){let o=!0;const c=new Set;for(;o;){o=!1;for(const[d,u]of Object.entries(t))c.has(d)||!n.has(I(d))||(c.add(d),r(u),o=!0)}}return n}function M(e,t){const n=y(e).filter(r=>{const o=a(r);return typeof r?.type=="string"&&A.includes(r.type)||o!==void 0&&t(o)});return n.length?b(n,p(e)):new Set}function T(e,t){const n={},r={};for(const[o,c]of Object.entries(e??{}))(t.has(I(o))?n:r)[o]=c;return{owned:n,rest:r}}function v(e,t){if(!t)return e;const n=N(t);if(!n.length)return e;const r=n.filter(u=>u.type===h),o=n.filter(u=>u.type!==h),c={...e,content:[...r,...y(e),...o]},{owned:d}=T(p(t),b(n,p(t)));return Object.keys(d).length&&(c.zones={...p(e)??{},...d}),c}function G(e,t){if(!t)return{page:e,chrome:null};const n=N(t),r=new Set(n.map(a).filter(s=>!!s)),o=[],c=[];for(const s of y(e)){const i=a(s);i&&r.has(i)||C(s?.type)?c.push(s):o.push(s)}const d=new Map(c.map(s=>[a(s),s])),u=new Set;let f=k(y(t)).flatMap(s=>{const i=a(s);if(!i||!r.has(i))return[s];const l=d.get(i);return l?(u.add(l),[l]):[]});for(const s of c)u.has(s)||f.some(i=>i?.type===s.type)||(f=s.type===h?[s,...f]:[...f,s]);f=k(f);const P=f.length===y(t).length&&f.every((s,i)=>s===y(t)[i]),j=p(e),x=b(f,j),{owned:w,rest:S}=T(j,x),_=T(p(t),b(n,p(t))).owned,g={...t,content:P?t.content:[...f]},O=p(t);if(O||Object.keys(w).length){const s={};for(const[i,l]of Object.entries(O??{}))i in _?i in w&&(s[i]=w[i]):s[i]=l;for(const[i,l]of Object.entries(w))i in s||(s[i]=l);g.zones=s,O&&R(g.zones,O)&&(g.zones=O)}const E={...e,content:o};return j&&(Object.keys(S).length||!Object.keys(_).length?E.zones=S:delete E.zones),{page:E,chrome:g}}function R(e,t){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((o,c)=>o===r[c]&&e[o]===t[o])}function W(e,t){return n=>e(n)||n!==void 0&&A.includes(n)&&t()}export{A as PINNED_CHROME_TYPES,M as idsNotThePagesOwn,W as lockedWhileHeld,v as spliceChrome,G as splitChrome};
@@ -1 +1 @@
1
- import{BOX_TYPE as m}from"../../../format/lib/document/container-blocks.js";import{cardsTemplateNodes as h}from"../../../format/lib/document/blocks/general/Cards/card-seed.js";import{SLOT_SECTION_SPECS as T}from"../../../render/lib/document/slot-specs.js";import{eyebrowLookFor as a}from"../../../format/lib/sections/section-eyebrow-look.js";import{SECTION_HEAD_TYPE as t,SPLITTABLE_SECTIONS as S,canSplitHead as E}from"../../../format/lib/sections/section-head-placement.js";import{layoutPresetFor as d}from"./text-layouts.js";function L(r,{nodeDefaults:i,newNodeId:o,sectionLabel:l,blockIsOffered:c}){const n=d(r);if(n)return n(i,o);if(E(r)&&c(m)&&c(t))return{type:m,props:{...i(m),id:o(m),direction:"column",name:`${l(r)} section`,content:[{type:t,props:{...i(t),id:o(t),...S[r]?.headStyle?{headStyle:S[r].headStyle}:{},...S[r]?.headRowGap?{rowGap:S[r].headRowGap}:{},...S[r]?.headDescriptionSize?{descriptionSize:S[r].headDescriptionSize}:{},...a(r)!==a(t)?{eyebrowLook:a(r)}:{}}},{type:r,props:{...i(r),id:o(r),headPlacement:"own-box",...e(r,o)}}]}};if(T[r]?.fixed===!0)return{type:r,props:{...i(r),id:o(r),layout:"boxes"}};const s=e(r,o);return Object.keys(s).length?{type:r,props:{...i(r),id:o(r),...s}}:null}function e(r,i){return r==="Cards"?{template:h(o=>i(o))}:{}}export{L as newSectionNode};
1
+ import{BOX_TYPE as e}from"../../../format/lib/document/container-blocks.js";import{cardsTemplateNodes as f}from"../../../format/lib/document/blocks/general/Cards/card-seed.js";import{ARTICLE_BODY_BLOCK as T,articleBodyTemplateNodes as p}from"../../../format/lib/document/article-body-seed.js";import{SLOT_SECTION_SPECS as h}from"../../../render/lib/document/slot-specs.js";import{eyebrowLookFor as a}from"../../../format/lib/sections/section-eyebrow-look.js";import{SECTION_HEAD_TYPE as m,SPLITTABLE_SECTIONS as t,canSplitHead as u}from"../../../format/lib/sections/section-head-placement.js";import{layoutPresetFor as E}from"./text-layouts.js";import{activePressContext as C}from"../../../format/lib/sections/active-press-context.js";function A(r,{nodeDefaults:i,newNodeId:o,sectionLabel:l,blockIsOffered:s}){const S=E(r);if(S)return S(i,o,C());if(u(r)&&s(e)&&s(m))return{type:e,props:{...i(e),id:o(e),direction:"column",name:`${l(r)} section`,content:[{type:m,props:{...i(m),id:o(m),...t[r]?.headStyle?{headStyle:t[r].headStyle}:{},...t[r]?.headRowGap?{rowGap:t[r].headRowGap}:{},...t[r]?.headDescriptionSize?{descriptionSize:t[r].headDescriptionSize}:{},...a(r)!==a(m)?{eyebrowLook:a(r)}:{}}},{type:r,props:{...i(r),id:o(r),headPlacement:"own-box",...n(r,o)}}]}};if(h[r]?.fixed===!0)return{type:r,props:{...i(r),id:o(r),layout:"boxes"}};const c=n(r,o);return Object.keys(c).length?{type:r,props:{...i(r),id:o(r),...c}}:null}function n(r,i){return r==="Cards"?{template:f(o=>i(o))}:r===T?{template:p(o=>i(o))}:{}}export{A as newSectionNode};
@@ -1 +1 @@
1
- import{convertSection as S,pressesAsBox as m,SECTION_TO_BOX_PRESS as E,sectionToBoxRow as l}from"../../../render/lib/sections/section-to-box.js";import{SECTION_PRESETS as y,presetFor as g}from"../../../format/lib/sections/section-presets.js";import{GENERAL_SECTION_TO_BOX as _}from"../../../render/lib/document/blocks/general/section-to-box-rows.js";import{statsBoxSeed as O,statsPressSeed as k,statsSeedRows as N}from"../../../render/lib/document/blocks/general/section-to-box-rows-stats.js";import{logosPressStarter as B}from"../../../render/lib/document/blocks/general/section-to-box-rows-logos.js";import{pageHeaderPressStarter as L}from"../../../render/lib/document/blocks/general/section-to-box-rows-pageheader.js";import{seedNodes as R}from"../../../format/lib/document/seed-parts.js";import{propsWithPartStyleValue as j}from"../../../render/lib/document/part-styles.js";import{isNodeList as a}from"efficient-easel/data";const w=Object.keys(_),P={Logos:B,DocMasthead:L};function u(t,r,o){const e={};for(const s of Object.keys(r(t.type)))e[s]=void 0;for(const[s,n]of Object.entries(t.props))e[s]=a(n)?n.map(p=>u(p,r,o)):n;return e.id=o(t.type),{type:t.type,props:e}}function v(t,r,o=0,e=()=>({})){return(s,n)=>{const{nodes:p}=S({type:t,props:{...s(t),...e(),id:n(t)}},r,{press:!0});return u(p[o],s,n)}}const A={Stats:C};function C(){const t=l("StatsParagraph");return t?(r,o)=>{const{nodes:e}=S({type:"StatsParagraph",props:{...r("StatsParagraph"),...k(),id:o("StatsParagraph")}},t),s=e[0],n=a(s.props.content)?s.props.content.filter(f=>f.props?.cardStyle===void 0):[],p=b(O(N(),"table")),c=n.map(T),i=u({...s,props:{...s.props,content:[...c,p]}},r,o);return{...i,props:{...i.props,name:"Stats section"}}}:null}function T(t){if(t.props?.name==="Words"){const r=a(t.props.content)?t.props.content.map(U):t.props.content;return{...t,props:{...t.props,widthFitPhone:"fill",content:r}}}return a(t.props?.content)?{...t,props:{...t.props,content:t.props.content.map(T)}}:t}function U(t){return t.type!=="Text"?t:{...t,props:j({...t.props,alignTablet:"left"},"text","alignTablet","left")}}const b=t=>R([t],(r,o)=>`${r}-seed-${o}`)[0];function W(t,r){if(!m(t,r))return null;const o=A[t];if(o)return o();const e=l(t);return e?v(t,e,0,P[t]):null}function X(t){return(r,o)=>{const e=s=>{if(s.type==="Stats"){const c=u(b(O([],"list")),r,o);return{...c,props:{...c.props,name:"Numbers"}}}let n=!1;const p={};for(const[c,i]of Object.entries(s.props))if(a(i)){const f=i.map(e);n||=f.some((x,h)=>x!==i[h]),p[c]=f}else p[c]=i;return n?{type:s.type,props:p}:s};return e(t(r,o))}}function z(t,r=E){const o=g(t);return o?X(o):W(t,r)}function I(){return[...Object.keys(y),...w.filter(t=>m(t)),...Object.keys(P).filter(t=>m(t))]}export{P as MERGE_LAYOUTS,w as TEXT_LAYOUTS,v as conversionPreset,z as layoutPresetFor,I as layoutTypes};
1
+ import{convertSection as S,pressesAsBox as l,SECTION_TO_BOX_PRESS as g,sectionToBoxRow as T}from"../../../render/lib/sections/section-to-box.js";import{SECTION_PRESETS as _,presetFor as k}from"../../../format/lib/sections/section-presets.js";import{GENERAL_SECTION_TO_BOX as N}from"../../../render/lib/document/blocks/general/section-to-box-rows.js";import{statsBoxSeed as P,statsPressSeed as B,statsSeedRows as L}from"../../../render/lib/document/blocks/general/section-to-box-rows-stats.js";import{logosPressStarter as R}from"../../../render/lib/document/blocks/general/section-to-box-rows-logos.js";import{pageHeaderPressStarter as j}from"../../../render/lib/document/blocks/general/section-to-box-rows-pageheader.js";import{milestoneTimelinePressStarter as w,storyTimelinePressStarter as v}from"../../../render/lib/document/blocks/general/section-to-box-rows-timeline.js";import{seedNodes as A}from"../../../format/lib/document/seed-parts.js";import{propsWithPartStyleValue as C}from"../../../render/lib/document/part-styles.js";import{isNodeList as f}from"efficient-easel/data";const U=Object.keys(N),O={Logos:R,DocMasthead:j,Timeline:v,TimelineTrack:w};function u(t,r,e){const o={};for(const n of Object.keys(r(t.type)))o[n]=void 0;for(const[n,s]of Object.entries(t.props))o[n]=f(s)?s.map(p=>u(p,r,e)):s;return o.id=e(t.type),{type:t.type,props:o}}const h=t=>({...t?.theme?{theme:t.theme}:{},press:!0});function W(t,r,e=0,o=()=>({})){return(n,s,p)=>{const{nodes:i}=S({type:t,props:{...n(t),...o(),id:s(t)}},r,h(p));return u(i[e],n,s)}}const X={Stats:G};function G(){const t=T("StatsParagraph");return t?(r,e,o)=>{const{nodes:n}=S({type:"StatsParagraph",props:{...r("StatsParagraph"),...B(),id:e("StatsParagraph")}},t,h(o)),s=n[0],p=f(s.props.content)?s.props.content.filter(m=>m.props?.cardStyle===void 0):[],i=x(P(L(),"table")),c=p.map(b),a=u({...s,props:{...s.props,content:[...c,i]}},r,e);return{...a,props:{...a.props,name:"Stats section"}}}:null}function b(t){if(t.props?.name==="Words"){const r=f(t.props.content)?t.props.content.map(M):t.props.content;return{...t,props:{...t.props,widthFitPhone:"fill",content:r}}}return f(t.props?.content)?{...t,props:{...t.props,content:t.props.content.map(b)}}:t}function M(t){return t.type!=="Text"?t:{...t,props:C({...t.props,alignTablet:"left"},"text","alignTablet","left")}}const x=t=>A([t],(r,e)=>`${r}-seed-${e}`)[0];function Y(t,r){if(!l(t,r))return null;const e=X[t];if(e)return e();const o=T(t);return o?W(t,o,0,O[t]):null}function $(t){return(r,e,o)=>{const n=s=>{if(s.type==="Stats"){const c=u(x(P([],"list")),r,e);return{...c,props:{...c.props,name:"Numbers"}}}let p=!1;const i={};for(const[c,a]of Object.entries(s.props))if(f(a)){const m=a.map(n);p||=m.some((E,y)=>E!==a[y]),i[c]=m}else i[c]=a;return p?{type:s.type,props:i}:s};return n(t(r,e,o))}}function Z(t,r=g){const e=k(t);return e?$(e):Y(t,r)}function F(){return[...Object.keys(_),...U.filter(t=>l(t)),...Object.keys(O).filter(t=>l(t))]}export{O as MERGE_LAYOUTS,U as TEXT_LAYOUTS,W as conversionPreset,Z as layoutPresetFor,F as layoutTypes};
@@ -1,8 +1,7 @@
1
- import { type ShowWhenRule } from "efficient-shell/format";
1
+ import { type HoverKind, type ShowWhenRule } from "efficient-shell/format";
2
2
  export declare const HOVER_KEY = "hover";
3
3
  export declare const HOVER_GROUP_KEY = "_gHover";
4
- export declare const HOVER_KINDS: readonly ["none", "nextImage", "rotate", "zoom", "lift", "mono"];
5
- export type HoverKind = (typeof HOVER_KINDS)[number];
4
+ export type { HoverKind };
6
5
  export declare const HOVER_KIND_LABELS: Readonly<Record<HoverKind, string>>;
7
6
  export type PartHover = Extract<HoverKind, "none" | "lift">;
8
7
  export declare const PART_HOVER_KINDS: readonly PartHover[];
@@ -1 +1 @@
1
- import{HOVER_MOTION as E,motionSeconds as u}from"efficient-shell/format";import{finiteNumber as s}from"../finite-number.js";const i="hover",A="_gHover",H=["none","nextImage","rotate","zoom","lift","mono"],P={none:"None",nextImage:"Show next image",rotate:"Rotate",zoom:"Zoom",lift:"Lift",mono:"Black and white"};function a(n){return H.filter(e=>n.includes(e))}const v=a(["none","lift"]);function L(n){const e=n[i];return v.includes(e)?e:"none"}const R=a(["none","rotate"]),r={kind:i,angle:"hoverAngle",duration:"hoverDuration",delay:"hoverDelay"},l="spinOnHover",p={min:0,max:360,step:1},m={ProductGrid:"rotate",RelatedProducts:"rotate",AlloyWheelsListing:"none"},M=Object.keys(m);function I(n){return m[n]??"none"}const g=E.rotateFallbackDeg;function S(n,e){const t=n[r.kind];if(R.includes(t))return t;const o=n[l];return typeof o=="boolean"?o?"rotate":"none":e}function k(n){const e=s(n);return e===void 0?g:Math.min(p.max,Math.max(p.min,e))}function U(n,e){const t=I(e),o=S(n,t);return{kind:o,angle:o==="rotate"?k(n[r.angle]):null,duration:u("hover","duration",o==="rotate"?n[r.duration]:void 0),delay:u("hover","delay",o==="rotate"?n[r.delay]:void 0)}}function B(n){const e={field:r.kind,in:[...R]};return{any:[{field:r.kind,is:"rotate"},{all:[{not:e},n==="rotate"?{not:{field:l,is:!1}}:{field:l,is:!0}]}]}}const x=a(["none","mono"]),D=a(["none","nextImage","mono"]),O={ImageBlock:"none",Manifesto:"none",Split:"none",ContactLocations:"mono"},G=Object.keys(O);function N(n){return O[n]??"none"}const _={zoom:"hoverZoom",darken:"hoverDarken"},d={min:100,max:150,step:1,unit:"%"},c=["nextImage"];function V(n,e){if(!c.includes(e))return null;const t=s(n[_.zoom]);if(t===void 0)return null;const o=Math.min(d.max,Math.max(d.min,t));return o===d.min?null:String(o/100)}function h(n,e){if(!c.includes(e))return null;const t=s(n[_.darken]);return t!==void 0&&t>0?t:null}const C=["ImageBlock"];function K(n,e,t=x){const o=n[i];return t.includes(o)?o:e}function z(n,e=""){const t=C.includes(e)?D:x,o=K(n,N(e),t),f=o!=="none";return{kind:o,duration:u("hover","duration",f?n[r.duration]:void 0),delay:u("hover","delay",f?n[r.delay]:void 0),...c.includes(o)?{zoom:V(n,o),darken:h(n,o)}:{}}}function Y(){return{field:i,in:[...c]}}function b(n){return n==="none"?{field:i,in:["mono","nextImage"]}:{not:{field:i,is:"none"}}}export{p as CARD_HOVER_ANGLE,r as CARD_HOVER_KEYS,R as CARD_HOVER_KINDS,M as CARD_HOVER_SECTIONS,g as CARD_HOVER_TURN,A as HOVER_GROUP_KEY,i as HOVER_KEY,H as HOVER_KINDS,P as HOVER_KIND_LABELS,C as NEXT_PICTURE_BLOCKS,D as NEXT_PICTURE_HOVER_KINDS,l as OLD_SPIN_KEY,v as PART_HOVER_KINDS,G as PICTURE_HOVER_BLOCKS,_ as PICTURE_HOVER_KEYS,x as PICTURE_HOVER_KINDS,d as PICTURE_HOVER_ZOOM,k as cardHoverAngleOf,S as cardHoverKindOf,U as cardHoverOf,I as cardHoverResting,B as cardRotatesRule,L as hoverOf,K as pictureHoverKindOf,Y as pictureHoverMovesRule,z as pictureHoverOf,N as pictureHoverResting,b as pictureHoverRunsRule,V as pictureHoverZoomOf};
1
+ import{HOVER_MOTION as E,hoverKindsOf as u,motionSeconds as a}from"efficient-shell/format";import{finiteNumber as s}from"../finite-number.js";const i="hover",y="_gHover",A={none:"None",nextImage:"Show next image",rotate:"Rotate",zoom:"Zoom",lift:"Lift",mono:"Black and white"},H=u(["none","lift"]);function P(n){const e=n[i];return H.includes(e)?e:"none"}const R=u(["none","rotate"]),r={kind:i,angle:"hoverAngle",duration:"hoverDuration",delay:"hoverDelay"},l="spinOnHover",p={min:0,max:360,step:1},x={ProductGrid:"rotate",RelatedProducts:"rotate",AlloyWheelsListing:"none"},L=Object.keys(x);function v(n){return x[n]??"none"}const I=E.rotateFallbackDeg;function g(n,e){const t=n[r.kind];if(R.includes(t))return t;const o=n[l];return typeof o=="boolean"?o?"rotate":"none":e}function h(n){const e=s(n);return e===void 0?I:Math.min(p.max,Math.max(p.min,e))}function M(n,e){const t=v(e),o=g(n,t);return{kind:o,angle:o==="rotate"?h(n[r.angle]):null,duration:a("hover","duration",o==="rotate"?n[r.duration]:void 0),delay:a("hover","delay",o==="rotate"?n[r.delay]:void 0)}}function U(n){const e={field:r.kind,in:[...R]};return{any:[{field:r.kind,is:"rotate"},{all:[{not:e},n==="rotate"?{not:{field:l,is:!1}}:{field:l,is:!0}]}]}}const O=u(["none","mono"]),S=u(["none","nextImage","mono"]),_={ImageBlock:"none",Manifesto:"none",Split:"none",ContactLocations:"mono"},B=Object.keys(_);function k(n){return _[n]??"none"}const m={zoom:"hoverZoom",darken:"hoverDarken"},d={min:100,max:150,step:1,unit:"%"},c=["nextImage"];function D(n,e){if(!c.includes(e))return null;const t=s(n[m.zoom]);if(t===void 0)return null;const o=Math.min(d.max,Math.max(d.min,t));return o===d.min?null:String(o/100)}function N(n,e){if(!c.includes(e))return null;const t=s(n[m.darken]);return t!==void 0&&t>0?t:null}const V=["ImageBlock"];function C(n,e,t=O){const o=n[i];return t.includes(o)?o:e}function G(n,e=""){const t=V.includes(e)?S:O,o=C(n,k(e),t),f=o!=="none";return{kind:o,duration:a("hover","duration",f?n[r.duration]:void 0),delay:a("hover","delay",f?n[r.delay]:void 0),...c.includes(o)?{zoom:D(n,o),darken:N(n,o)}:{}}}function Y(){return{field:i,in:[...c]}}function b(n){return n==="none"?{field:i,in:["mono","nextImage"]}:{not:{field:i,is:"none"}}}export{p as CARD_HOVER_ANGLE,r as CARD_HOVER_KEYS,R as CARD_HOVER_KINDS,L as CARD_HOVER_SECTIONS,I as CARD_HOVER_TURN,y as HOVER_GROUP_KEY,i as HOVER_KEY,A as HOVER_KIND_LABELS,V as NEXT_PICTURE_BLOCKS,S as NEXT_PICTURE_HOVER_KINDS,l as OLD_SPIN_KEY,H as PART_HOVER_KINDS,B as PICTURE_HOVER_BLOCKS,m as PICTURE_HOVER_KEYS,O as PICTURE_HOVER_KINDS,d as PICTURE_HOVER_ZOOM,h as cardHoverAngleOf,g as cardHoverKindOf,M as cardHoverOf,v as cardHoverResting,U as cardRotatesRule,P as hoverOf,C as pictureHoverKindOf,Y as pictureHoverMovesRule,G as pictureHoverOf,k as pictureHoverResting,b as pictureHoverRunsRule,D as pictureHoverZoomOf};
@@ -1 +1 @@
1
- import{MOTION_EASING as p,MOTION_TIMING as e,motionSeconds as l}from"efficient-shell/format";import{parseOption as r}from"../parse-option.js";const i="none",O=[{label:"None",value:"none"},{label:"Scroll",value:"scroll"}];function x(o){return r(O,i,o)}const D={field:"loop",is:"scroll"},u="left",c=[{label:"Left",value:"left",cell:"left"},{label:"Right",value:"right",cell:"right"},{label:"Up",value:"up",cell:"top"},{label:"Down",value:"down",cell:"bottom"}],a={left:"storefront-ticker",right:"storefront-ticker-right",up:"storefront-ticker-up",down:"storefront-ticker-down"};function _(o){return r(c,u,o)}function d(o){return o==="up"||o==="down"}function N(o){return l("loop","duration",o.loopDuration!=null?o.loopDuration:o.speed)}const E=e.loop.duration.default,f=e.loop.delay.default;function I(o){return l("loop","delay",o.loopDelay)}function S(o,n,t=f){return`${a[o]} ${n}s ${p.loop}${t?` ${t}s`:""} infinite`}export{f as DEFAULT_LOOP_DELAY,u as DEFAULT_LOOP_DIRECTION,E as DEFAULT_LOOP_SECONDS,c as LOOP_DIRECTION_OPTIONS,i as LOOP_NONE,O as LOOP_OPTIONS,D as LOOP_SCROLLS,d as isVerticalLoop,S as loopAnimation,I as loopDelayOf,N as loopSecondsOf,x as parseLoop,_ as parseLoopDirection};
1
+ import{MOTION_EASING as p,MOTION_TIMING as e,motionSeconds as l}from"efficient-shell/format";import{parseOption as r}from"../parse-option.js";const i="none",u=[{label:"None",value:"none"},{label:"Marquee",value:"scroll"}];function x(o){return r(u,i,o)}const D={field:"loop",is:"scroll"},O="left",a=[{label:"Left",value:"left",cell:"left"},{label:"Right",value:"right",cell:"right"},{label:"Up",value:"up",cell:"top"},{label:"Down",value:"down",cell:"bottom"}],c={left:"storefront-ticker",right:"storefront-ticker-right",up:"storefront-ticker-up",down:"storefront-ticker-down"};function _(o){return r(a,O,o)}function d(o){return o==="up"||o==="down"}function N(o){return l("loop","duration",o.loopDuration!=null?o.loopDuration:o.speed)}const E=e.loop.duration.default,f=e.loop.delay.default;function I(o){return l("loop","delay",o.loopDelay)}function T(o,n,t=f){return`${c[o]} ${n}s ${p.loop}${t?` ${t}s`:""} infinite`}export{f as DEFAULT_LOOP_DELAY,O as DEFAULT_LOOP_DIRECTION,E as DEFAULT_LOOP_SECONDS,a as LOOP_DIRECTION_OPTIONS,i as LOOP_NONE,u as LOOP_OPTIONS,D as LOOP_SCROLLS,d as isVerticalLoop,T as loopAnimation,I as loopDelayOf,N as loopSecondsOf,x as parseLoop,_ as parseLoopDirection};
@@ -1,5 +1,6 @@
1
- import type { BoxAlign } from "efficient-easel/screen/lib/document/box-fields";
1
+ import type { BoxAlign, BoxJustify } from "efficient-easel/screen/lib/document/box-fields";
2
2
  import type { ShowWhenRule } from "efficient-shell/format";
3
+ import { type ViewOverrides } from "./view-overrides.js";
3
4
  export declare const NESTED_BOX_PADDING: {
4
5
  readonly sectionPaddingTop: 0;
5
6
  readonly sectionPaddingBottom: 0;
@@ -7,6 +8,7 @@ export declare const NESTED_BOX_PADDING: {
7
8
  export declare const BOX_ALIGN_CLASS: Record<BoxAlign, string>;
8
9
  export declare function boxLayoutClasses(justify: unknown, align: unknown): string;
9
10
  export declare function boxWrapClass(wrap: unknown): string;
11
+ export declare function boxJustifyViewAnswers(justify: unknown, justifyTablet: unknown, justifyPhone: unknown): ViewOverrides<BoxJustify>;
10
12
  export declare function boxJustifyViewClasses(justify: unknown, justifyTablet: unknown, justifyPhone: unknown): string;
11
13
  export declare function boxAlignViewClasses(align: unknown, alignTablet: unknown, alignPhone: unknown): string;
12
14
  export declare function boxWrapWordOf(wrap: unknown): "wrap" | "nowrap" | undefined;
@@ -101,8 +103,8 @@ export declare function boxRowColumnsClass(box: {
101
103
  line?: unknown;
102
104
  columns?: unknown;
103
105
  }): string;
104
- export declare function boxPhoneRowOneLine(wrapPhone: unknown): boolean;
105
- export declare function boxPhoneRowClasses(perRow: unknown, sharePhone?: unknown, wrapPhone?: unknown): string;
106
+ export declare function boxPhoneRowOneLine(wrapPhone: unknown, wrapTablet?: unknown): boolean;
107
+ export declare function boxPhoneRowClasses(perRow: unknown, sharePhone?: unknown, wrapPhone?: unknown, wrapTablet?: unknown): string;
106
108
  export declare function boxPhoneCellsShareLine(perRow: unknown, sharePhone: unknown): boolean;
107
109
  export declare function boxPhoneRowFits(perRow: unknown, sharePhone: unknown): boolean;
108
110
  export declare const BOX_BLOCK_SPACING_LABEL = "Block spacing";
@@ -1 +1 @@
1
- import{isStripBox as b}from"./box-separator.js";import{viewOverrides as T}from"./view-overrides.js";const ae={sectionPaddingTop:0,sectionPaddingBottom:0},c={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},v={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function se(e,t){const a=typeof e=="string"&&e in c?c[e]:"",i=typeof t=="string"&&t in v?v[t]:"";return[a,i].filter(Boolean).join(" ")}function B(e){return e===!0||e==="wrap"?"flex-wrap":""}const y={start:"view-tablet:max-view-desktop:justify-start!",center:"view-tablet:max-view-desktop:justify-center!",between:"view-tablet:max-view-desktop:justify-between!",end:"view-tablet:max-view-desktop:justify-end!"},N={start:"max-view-tablet:justify-start",center:"max-view-tablet:justify-center",between:"max-view-tablet:justify-between",end:"max-view-tablet:justify-end"},P={start:"view-tablet:max-view-desktop:items-start!",center:"view-tablet:max-view-desktop:items-center!",end:"view-tablet:max-view-desktop:items-end!",stretch:"view-tablet:max-view-desktop:items-stretch!"},R={start:"max-view-tablet:items-start",center:"max-view-tablet:items-center",end:"max-view-tablet:items-end",stretch:"max-view-tablet:items-stretch"},I={wrap:"view-tablet:max-view-desktop:flex-wrap!",nowrap:"view-tablet:max-view-desktop:flex-nowrap!"};function w(e,t){return typeof t=="string"&&Object.prototype.hasOwnProperty.call(e,t)?t:void 0}function f(e,t,a){const i=T("same",e,t,a),s={};return i.tablet!==void 0&&i.tablet!==e&&(s.tablet=i.tablet),i.phone!==void 0&&i.phone!==e&&(s.phone=i.phone),s}function h(e,t,a){return[e.tablet?t[e.tablet]:"",e.phone?a[e.phone]:""].filter(Boolean).join(" ")}function H(e,t,a){return f(w(c,e)??"start",w(c,t),w(c,a))}function ne(e,t,a){return h(H(e,t,a),y,N)}function oe(e,t,a){const i=w(v,e)??"stretch";if(i==="stretch")return"";const s=f(i,w(v,t),w(v,a));return h(s,P,R)}function $(e){if(e===!0||e==="wrap")return"wrap";if(e===!1||e==="nowrap")return"nowrap"}function we(e,t){const a=B(e)===""?"nowrap":"wrap",i=$(t);return i&&i!==a?I[i]:""}const le="Block widths",_=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{value:"bigLeft",weights:[2,1]},{value:"bigRight",weights:[1,2]},{value:"biggerLeft",weights:[3,1]},{value:"biggerRight",weights:[1,3]},{value:"twoThree",weights:[2,3]}],X="data-sf-box-items",M=new RegExp(`[ \\t]+[^\\s"'\`]*\\[${X}\\][^\\s"'\`]*`,"g");function re(e){return e.replace(M,"")}const de=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Custom",value:"custom",weights:[2,1]}];function ce(e){return Array.isArray(e)?"custom":e==="equal"?"equal":typeof e=="string"&&e in p?"custom":"content"}const g=4,u=10;function W(e,t){if(!Number.isInteger(t)||t<2||t>g||e.length!==t-1||!e.every(s=>typeof s=="number"&&Number.isFinite(s)))return;const a=[];let i=0;return e.forEach((s,n)=>{const o=100-i-u*(t-1-n),x=Math.min(o,Math.max(u,Math.round(s)));a.push(x),i+=x}),a}function k(e,t,a){if(!Array.isArray(t))return;const i=W(t,a),s=i?[...i,100-i.reduce((o,x)=>o+x,0)]:[],n={};for(let o=0;o<g;o+=1)n[`--${e}-${o+1}`]=s[o]??1;return n}function ve(e,t,a){const i=k("sf-share",e,a),s=k("sf-share-tablet",t,a);return i||s?{...i,...s}:void 0}function j(e,t){const a=Array.from({length:t},()=>1),i=_.find(o=>o.value===e);if(!i?.weights||t<1)return a;const[s,n]=i.weights;return s>1&&(a[0]=s),n>1&&(a[t-1]=n),a}function xe(e,t){if(typeof e!="string"||!(e in p)||e==="equal")return e;const a=j(e,t),i=a.reduce((s,n)=>s+n,0);return a.slice(0,-1).map(s=>Math.round(s/i*100))}const l="[&>*]:min-w-0 [&>[data-sf-box-items]>*]:min-w-0 [&>*]:flex-1 [&>[data-sf-box-items]>*]:flex-1 [&>*]:basis-0 [&>[data-sf-box-items]>*]:basis-0",p={equal:l,bigLeft:`${l} [&>*:first-child]:view-wide:grow-[2] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[2]`,bigRight:`${l} [&>*:last-child]:view-wide:grow-[2] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[2]`,biggerLeft:`${l} [&>*:first-child]:view-wide:grow-[3] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[3]`,biggerRight:`${l} [&>*:last-child]:view-wide:grow-[3] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[3]`,twoThree:`${l} [&>*:first-child]:view-wide:grow-[2] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[2] [&>*:last-child]:view-wide:grow-[3] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[3]`},U=`${l} [&>*:nth-child(1)]:view-wide:grow-[var(--sf-share-1,1)] [&>[data-sf-box-items]>*:nth-child(1)]:view-wide:grow-[var(--sf-share-1,1)] [&>*:nth-child(2)]:view-wide:grow-[var(--sf-share-2,1)] [&>[data-sf-box-items]>*:nth-child(2)]:view-wide:grow-[var(--sf-share-2,1)] [&>*:nth-child(3)]:view-wide:grow-[var(--sf-share-3,1)] [&>[data-sf-box-items]>*:nth-child(3)]:view-wide:grow-[var(--sf-share-3,1)] [&>*:nth-child(4)]:view-wide:grow-[var(--sf-share-4,1)] [&>[data-sf-box-items]>*:nth-child(4)]:view-wide:grow-[var(--sf-share-4,1)]`;function F(e){return Array.isArray(e)?U:typeof e=="string"?p[e]??"":""}const pe={all:[{context:"parentType",is:"Flex"},{context:"parent.direction",is:"row"},{any:[{not:{context:"parent.align",set:!0}},{context:"parent.align",is:"stretch"}]},{not:{context:"parent.separator",set:!0}},{not:{context:"parent.loop",is:"scroll"}},{not:{context:"parent.line",is:!0}},{not:{context:"parent.bgImage",set:!0}},{any:[{context:"parent.columns",in:[2,3,4,5,6]},{all:[{not:{context:"parent.columns",is:1}},{context:"parent.share",in:Object.keys(p)}]}]}]},S="view-tablet:max-view-desktop:flex-row!",r=`${S} [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-0!`,A={content:`${S} [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[content]! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[content]!`,equal:r,bigLeft:`${r} [&>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]!`,bigRight:`${r} [&>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]!`,biggerLeft:`${r} [&>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]!`,biggerRight:`${r} [&>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]!`,twoThree:`${r} [&>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]! [&>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]!`},G=`${r} [&>*:nth-child(1):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>[data-sf-box-items]>*:nth-child(1):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>*:nth-child(2):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>[data-sf-box-items]>*:nth-child(2):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>*:nth-child(3):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>[data-sf-box-items]>*:nth-child(3):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>*:nth-child(4):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]! [&>[data-sf-box-items]>*:nth-child(4):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]!`;function q(e){return Array.isArray(e)||typeof e=="string"&&e in A?e:null}function be(e){if(e.direction!=="row"||b(e.direction,e.separator)||e.loop==="scroll"||e.line===!0||O(e.columns)!==""||C(e.columnsTablet)!=="")return"";const t=q(e.shareTablet);return t===null?"":typeof t=="string"?A[t]:G}const V="[&>*]:view-wide:basis-[content] [&>[data-sf-box-items]>*]:view-wide:basis-[content]";function fe(e){return F(e)===""?V:""}const he="Columns",me=1,_e=3,m={2:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},ge=_.filter(e=>e.value==="content"||e.value==="equal"),ue="equal",ke=1,Se=6,d="view-wide:flex-wrap [&>*]:view-wide:min-w-0 [&>[data-sf-box-items]>*]:view-wide:min-w-0 [&>*]:view-wide:grow-0! [&>[data-sf-box-items]>*]:view-wide:grow-0!",K={1:`${d} [&>*]:view-wide:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc(100%/1)]!`,2:`${d} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]!`,3:`${d} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]!`,4:`${d} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]!`,5:`${d} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]!`,6:`${d} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]!`};function O(e){return typeof e=="number"?K[e]??"":""}const J={1:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc(100%/1)]!",2:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]!",3:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]!",4:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]!",5:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]!",6:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]!"};function C(e){return typeof e=="number"?J[e]??"":""}function Ae(e){return e.direction!=="row"||b(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":C(e.columnsTablet)}function Oe(e){return e.direction!=="row"||b(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":O(e.columns)}const D="max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:grow-0 [&>[data-sf-box-items]>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content] [&>[data-sf-box-items]>*]:max-view-wide:basis-[content]",Y={2:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},Q="max-view-wide:flex-nowrap [&>*]:max-view-wide:grow-0 [&>[data-sf-box-items]>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content] [&>[data-sf-box-items]>*]:max-view-wide:basis-[content]";function z(e){return e===!1||e==="nowrap"}function Ce(e,t,a){const i=m[Number(e)];if(!i)return"max-view-wide:flex-col";const s=z(a);return L(e,t)?s?Q:D:s?Y[Number(e)]:i}function Le(e,t){return Number(e)in m&&!L(e,t)}function L(e,t){return Number(e)in m&&t==="content"}const Ee="Block spacing",Te=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],Z="sf-box-gap-only";function Be(e){return e==="gap"?Z:""}const E={each:"sf-box-each-tablet",gap:"sf-box-gap-only-tablet"},ee={each:"sf-box-each-phone",gap:"sf-box-gap-only-phone"};function ye(e,t,a){const i=n=>w(E,n),s=f(e==="gap"?"gap":"each",i(t),i(a));return h(s,E,ee)}export{v as BOX_ALIGN_CLASS,Ee as BOX_BLOCK_SPACING_LABEL,Te as BOX_BLOCK_SPACING_POINTS,Se as BOX_COLUMNS_MAX,ke as BOX_COLUMNS_MIN,Z as BOX_GAP_ONLY_CLASS,pe as BOX_GIVES_PICTURES_A_HEIGHT,X as BOX_ITEMS_ATTR,he as BOX_PHONE_ROW_LABEL,_e as BOX_PHONE_ROW_MAX,me as BOX_PHONE_ROW_MIN,de as BOX_SHARE_CHOICES,le as BOX_SHARE_LABEL,ue as BOX_SHARE_PHONE_DEFAULT,ge as BOX_SHARE_PHONE_POINTS,_ as BOX_SHARE_POINTS,ae as NESTED_BOX_PADDING,oe as boxAlignViewClasses,Be as boxBlockSpacingClass,ye as boxBlockSpacingViewClasses,O as boxColumnsClass,fe as boxFitContentClass,ne as boxJustifyViewClasses,se as boxLayoutClasses,Le as boxPhoneCellsShareLine,Ce as boxPhoneRowClasses,L as boxPhoneRowFits,z as boxPhoneRowOneLine,Oe as boxRowColumnsClass,Ae as boxRowTabletColumnsClass,be as boxRowTabletShareClass,ce as boxShareChoiceOf,F as boxShareClasses,q as boxShareTabletOf,ve as boxShareVars,xe as boxShareWidthsOf,C as boxTabletColumnsClass,B as boxWrapClass,we as boxWrapTabletClass,$ as boxWrapWordOf,re as withoutBoxItemsHalf};
1
+ import{isStripBox as b}from"./box-separator.js";import{viewOverrides as B}from"./view-overrides.js";const ae={sectionPaddingTop:0,sectionPaddingBottom:0},c={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},v={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function se(e,t){const a=typeof e=="string"&&e in c?c[e]:"",i=typeof t=="string"&&t in v?v[t]:"";return[a,i].filter(Boolean).join(" ")}function y(e){return e===!0||e==="wrap"?"flex-wrap":""}const N={start:"view-tablet:max-view-desktop:justify-start!",center:"view-tablet:max-view-desktop:justify-center!",between:"view-tablet:max-view-desktop:justify-between!",end:"view-tablet:max-view-desktop:justify-end!"},P={start:"max-view-tablet:justify-start",center:"max-view-tablet:justify-center",between:"max-view-tablet:justify-between",end:"max-view-tablet:justify-end"},R={start:"view-tablet:max-view-desktop:items-start!",center:"view-tablet:max-view-desktop:items-center!",end:"view-tablet:max-view-desktop:items-end!",stretch:"view-tablet:max-view-desktop:items-stretch!"},I={start:"max-view-tablet:items-start",center:"max-view-tablet:items-center",end:"max-view-tablet:items-end",stretch:"max-view-tablet:items-stretch"},H={wrap:"view-tablet:max-view-desktop:flex-wrap!",nowrap:"view-tablet:max-view-desktop:flex-nowrap!"};function w(e,t){return typeof t=="string"&&Object.prototype.hasOwnProperty.call(e,t)?t:void 0}function f(e,t,a){const i=B("same",e,t,a),s={};return i.tablet!==void 0&&i.tablet!==e&&(s.tablet=i.tablet),i.phone!==void 0&&i.phone!==e&&(s.phone=i.phone),s}function h(e,t,a){return[e.tablet?t[e.tablet]:"",e.phone?a[e.phone]:""].filter(Boolean).join(" ")}function $(e,t,a){return f(w(c,e)??"start",w(c,t),w(c,a))}function ne(e,t,a){return h($(e,t,a),N,P)}function oe(e,t,a){const i=w(v,e)??"stretch";if(i==="stretch")return"";const s=f(i,w(v,t),w(v,a));return h(s,R,I)}function m(e){if(e===!0||e==="wrap")return"wrap";if(e===!1||e==="nowrap")return"nowrap"}function we(e,t){const a=y(e)===""?"nowrap":"wrap",i=m(t);return i&&i!==a?H[i]:""}const le="Block widths",g=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{value:"bigLeft",weights:[2,1]},{value:"bigRight",weights:[1,2]},{value:"biggerLeft",weights:[3,1]},{value:"biggerRight",weights:[1,3]},{value:"twoThree",weights:[2,3]}],X="data-sf-box-items",M=new RegExp(`[ \\t]+[^\\s"'\`]*\\[${X}\\][^\\s"'\`]*`,"g");function re(e){return e.replace(M,"")}const de=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Custom",value:"custom",weights:[2,1]}];function ce(e){return Array.isArray(e)?"custom":e==="equal"?"equal":typeof e=="string"&&e in p?"custom":"content"}const u=4,k=10;function W(e,t){if(!Number.isInteger(t)||t<2||t>u||e.length!==t-1||!e.every(s=>typeof s=="number"&&Number.isFinite(s)))return;const a=[];let i=0;return e.forEach((s,n)=>{const o=100-i-k*(t-1-n),x=Math.min(o,Math.max(k,Math.round(s)));a.push(x),i+=x}),a}function S(e,t,a){if(!Array.isArray(t))return;const i=W(t,a),s=i?[...i,100-i.reduce((o,x)=>o+x,0)]:[],n={};for(let o=0;o<u;o+=1)n[`--${e}-${o+1}`]=s[o]??1;return n}function ve(e,t,a){const i=S("sf-share",e,a),s=S("sf-share-tablet",t,a);return i||s?{...i,...s}:void 0}function j(e,t){const a=Array.from({length:t},()=>1),i=g.find(o=>o.value===e);if(!i?.weights||t<1)return a;const[s,n]=i.weights;return s>1&&(a[0]=s),n>1&&(a[t-1]=n),a}function xe(e,t){if(typeof e!="string"||!(e in p)||e==="equal")return e;const a=j(e,t),i=a.reduce((s,n)=>s+n,0);return a.slice(0,-1).map(s=>Math.round(s/i*100))}const l="[&>*]:min-w-0 [&>[data-sf-box-items]>*]:min-w-0 [&>*]:flex-1 [&>[data-sf-box-items]>*]:flex-1 [&>*]:basis-0 [&>[data-sf-box-items]>*]:basis-0",p={equal:l,bigLeft:`${l} [&>*:first-child]:view-wide:grow-[2] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[2]`,bigRight:`${l} [&>*:last-child]:view-wide:grow-[2] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[2]`,biggerLeft:`${l} [&>*:first-child]:view-wide:grow-[3] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[3]`,biggerRight:`${l} [&>*:last-child]:view-wide:grow-[3] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[3]`,twoThree:`${l} [&>*:first-child]:view-wide:grow-[2] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[2] [&>*:last-child]:view-wide:grow-[3] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[3]`},U=`${l} [&>*:nth-child(1)]:view-wide:grow-[var(--sf-share-1,1)] [&>[data-sf-box-items]>*:nth-child(1)]:view-wide:grow-[var(--sf-share-1,1)] [&>*:nth-child(2)]:view-wide:grow-[var(--sf-share-2,1)] [&>[data-sf-box-items]>*:nth-child(2)]:view-wide:grow-[var(--sf-share-2,1)] [&>*:nth-child(3)]:view-wide:grow-[var(--sf-share-3,1)] [&>[data-sf-box-items]>*:nth-child(3)]:view-wide:grow-[var(--sf-share-3,1)] [&>*:nth-child(4)]:view-wide:grow-[var(--sf-share-4,1)] [&>[data-sf-box-items]>*:nth-child(4)]:view-wide:grow-[var(--sf-share-4,1)]`;function F(e){return Array.isArray(e)?U:typeof e=="string"?p[e]??"":""}const pe={all:[{context:"parentType",is:"Flex"},{context:"parent.direction",is:"row"},{any:[{not:{context:"parent.align",set:!0}},{context:"parent.align",is:"stretch"}]},{not:{context:"parent.separator",set:!0}},{not:{context:"parent.loop",is:"scroll"}},{not:{context:"parent.line",is:!0}},{not:{context:"parent.bgImage",set:!0}},{any:[{context:"parent.columns",in:[2,3,4,5,6]},{all:[{not:{context:"parent.columns",is:1}},{context:"parent.share",in:Object.keys(p)}]}]}]},A="view-tablet:max-view-desktop:flex-row!",r=`${A} [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-0!`,O={content:`${A} [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[content]! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[content]!`,equal:r,bigLeft:`${r} [&>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]!`,bigRight:`${r} [&>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]!`,biggerLeft:`${r} [&>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]!`,biggerRight:`${r} [&>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]!`,twoThree:`${r} [&>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]! [&>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]!`},G=`${r} [&>*:nth-child(1):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>[data-sf-box-items]>*:nth-child(1):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>*:nth-child(2):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>[data-sf-box-items]>*:nth-child(2):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>*:nth-child(3):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>[data-sf-box-items]>*:nth-child(3):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>*:nth-child(4):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]! [&>[data-sf-box-items]>*:nth-child(4):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]!`;function q(e){return Array.isArray(e)||typeof e=="string"&&e in O?e:null}function be(e){if(e.direction!=="row"||b(e.direction,e.separator)||e.loop==="scroll"||e.line===!0||C(e.columns)!==""||L(e.columnsTablet)!=="")return"";const t=q(e.shareTablet);return t===null?"":typeof t=="string"?O[t]:G}const V="[&>*]:view-wide:basis-[content] [&>[data-sf-box-items]>*]:view-wide:basis-[content]";function fe(e){return F(e)===""?V:""}const he="Columns",me=1,_e=3,_={2:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},ge=g.filter(e=>e.value==="content"||e.value==="equal"),ue="equal",ke=1,Se=6,d="view-wide:flex-wrap [&>*]:view-wide:min-w-0 [&>[data-sf-box-items]>*]:view-wide:min-w-0 [&>*]:view-wide:grow-0! [&>[data-sf-box-items]>*]:view-wide:grow-0!",K={1:`${d} [&>*]:view-wide:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc(100%/1)]!`,2:`${d} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]!`,3:`${d} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]!`,4:`${d} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]!`,5:`${d} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]!`,6:`${d} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]!`};function C(e){return typeof e=="number"?K[e]??"":""}const J={1:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc(100%/1)]!",2:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]!",3:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]!",4:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]!",5:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]!",6:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]!"};function L(e){return typeof e=="number"?J[e]??"":""}function Ae(e){return e.direction!=="row"||b(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":L(e.columnsTablet)}function Oe(e){return e.direction!=="row"||b(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":C(e.columns)}const D="max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:grow-0 [&>[data-sf-box-items]>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content] [&>[data-sf-box-items]>*]:max-view-wide:basis-[content]",Y={2:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},Q="max-view-wide:flex-nowrap [&>*]:max-view-wide:grow-0 [&>[data-sf-box-items]>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content] [&>[data-sf-box-items]>*]:max-view-wide:basis-[content]";function z(e,t){return(m(e)??m(t)??"wrap")==="nowrap"}function Ce(e,t,a,i){const s=_[Number(e)];if(!s)return"max-view-wide:flex-col";const n=z(a,i);return E(e,t)?n?Q:D:n?Y[Number(e)]:s}function Le(e,t){return Number(e)in _&&!E(e,t)}function E(e,t){return Number(e)in _&&t==="content"}const Ee="Block spacing",Te=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],Z="sf-box-gap-only";function Be(e){return e==="gap"?Z:""}const T={each:"sf-box-each-tablet",gap:"sf-box-gap-only-tablet"},ee={each:"sf-box-each-phone",gap:"sf-box-gap-only-phone"};function ye(e,t,a){const i=n=>w(T,n),s=f(e==="gap"?"gap":"each",i(t),i(a));return h(s,T,ee)}export{v as BOX_ALIGN_CLASS,Ee as BOX_BLOCK_SPACING_LABEL,Te as BOX_BLOCK_SPACING_POINTS,Se as BOX_COLUMNS_MAX,ke as BOX_COLUMNS_MIN,Z as BOX_GAP_ONLY_CLASS,pe as BOX_GIVES_PICTURES_A_HEIGHT,X as BOX_ITEMS_ATTR,he as BOX_PHONE_ROW_LABEL,_e as BOX_PHONE_ROW_MAX,me as BOX_PHONE_ROW_MIN,de as BOX_SHARE_CHOICES,le as BOX_SHARE_LABEL,ue as BOX_SHARE_PHONE_DEFAULT,ge as BOX_SHARE_PHONE_POINTS,g as BOX_SHARE_POINTS,ae as NESTED_BOX_PADDING,oe as boxAlignViewClasses,Be as boxBlockSpacingClass,ye as boxBlockSpacingViewClasses,C as boxColumnsClass,fe as boxFitContentClass,$ as boxJustifyViewAnswers,ne as boxJustifyViewClasses,se as boxLayoutClasses,Le as boxPhoneCellsShareLine,Ce as boxPhoneRowClasses,E as boxPhoneRowFits,z as boxPhoneRowOneLine,Oe as boxRowColumnsClass,Ae as boxRowTabletColumnsClass,be as boxRowTabletShareClass,ce as boxShareChoiceOf,F as boxShareClasses,q as boxShareTabletOf,ve as boxShareVars,xe as boxShareWidthsOf,L as boxTabletColumnsClass,y as boxWrapClass,we as boxWrapTabletClass,m as boxWrapWordOf,re as withoutBoxItemsHalf};
@@ -1 +1 @@
1
- import{blockSourceSpec as B,declaredBlockSource as L}from"./block-sources.js";import{isNodeList as _}from"efficient-easel/data";import{BOX_TYPE as C}from"../document/container-blocks.js";import{globalRegistry as A}from"../global-registry.js";import{nonEmptyString as b}from"../non-empty-string.js";import{accentItalicRuns as O}from"../markup.js";import{withCardsTemplate as S}from"../document/cards-template-on-read.js";import{withCardListTemplate as h}from"../document/blocks/general/CardList/item-seed.js";import{withLogosTemplate as E}from"../document/blocks/general/Logos/card-seed.js";const I="template",ne="Card template",d="CardList",x=["Text","ImageBlock","ButtonBlock","Flex"],u="rowField",P="rowLinkField";function le(){return{type:"slot",allow:[...x]}}const F=x.filter(e=>e!=="ButtonBlock"),g="items",R="itemFields";function ie(){return{type:"slot",allow:[...F]}}const D=[{block:"OrderSummary",typedRows:"rows",fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:"Footprint",typedRows:"offices",fields:[{key:"badge",label:"HQ"},{key:"role",label:"Role"},{key:"city",label:"City"},{key:"country",label:"Region · country"},{key:"address",label:"Address"},{key:"linkLabel",label:"Button"},{key:"href",label:"Link",kind:"link"}]},{block:"Cards",typedRows:"items",fields:[{key:"num",label:"Number"},{key:"since",label:"Corner note"},{key:"label",label:"Label"},{key:"title",label:"Card title"},{key:"value",label:"Value"},{key:"body",label:"Card body",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:"count",label:"Count"},{key:"badge",label:"Highlight badge",everySource:!0}],seed:e=>S("Cards",e)},{block:"ProcessSteps",fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title",mark:"accentItalic"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"},{key:"specs",label:"Specs",kind:"list",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]}],blocks:[{type:d,label:"Card list"}]},{block:"Logos",fields:[{key:"label",label:"Name"},{key:"kind",label:"Kind"}],seed:e=>E(e)},{block:d,fields:[],typedRows:g,seed:e=>h(e)}];function c(){return A("efficient.card-templates",()=>new Map(D.map(e=>[e.block,e])))}function se(e){for(const t of e){if(typeof t.block!="string"||!t.block)throw new Error("A card template names no block.");const r=[];for(const n of t.blocks??[]){if(typeof n?.type!="string"||!n.type)throw new Error(`The card template of ${t.block} names an empty block.`);r.some(i=>i.type===n.type)||r.push({type:n.type,label:n.label||n.type})}const o=b(t.typedRows);c().set(t.block,{block:t.block,fields:t.fields.map(n=>({...n})),blocks:r,typedRows:o,...t.seed?{seed:t.seed}:{}})}}function W(e,t){const r=e?c().get(e)?.seed:void 0;return r?r(t):t}function ce(e,t){if(!(t.template===void 0||Array.isArray(t.template)&&t.template.length===0))return t;const{template:o,...n}=t,i=W(e,n);return i===n?t:i}function ae(){for(const e of c().values())if(e.blocks?.length)return!0;return!1}function ue(e){return c().get(e)?.blocks??[]}function fe(e){for(const t of c().values())if(t.blocks?.some(r=>r.type===e))return!0;return!1}function de(e){return typeof e=="string"&&c().get(e)?.typedRows||""}function M(e){return typeof e=="string"&&c().has(e)}function N(e,t){const r=c().get(e)?.fields??[];return t?r.filter(o=>(o.kind??"text")===t):r}function v(e){return typeof e=="string"?N(e,"list")[0]?.key??"":""}function K(e,t){return p(e)||v(t)}function T(e,t){const r=typeof e?.type=="string"?e.type:"";if(!r)return[];const o=c().get(r)?.fields??[],n=B(L(e?.props))?.fields,i=n?.length?[...n.map(l=>({...l})),...o.filter(l=>l.everySource&&!n.some(s=>s.key===l.key))]:o;return t?i.filter(l=>(l.kind??"text")===t):i}function j(e,t,r){return e?r?T(r).find(o=>o.key===t)??null:c().get(e)?.fields.find(o=>o.key===t)??null:null}function p(e,t=u){const r=e?.[t];return typeof r=="string"?r.trim():""}function pe(e,t){return e.key||String(t+1)}function ye(e){const t={};if(e&&typeof e=="object"&&!Array.isArray(e))for(const[r,o]of Object.entries(e))typeof o=="string"&&(t[r]=o);return t}const H="hideWhenRowEmpty";function me(e,t){const r=e[H];return!t||!Array.isArray(r)||!r.length?!1:r.every(o=>typeof o!="string"||!t[o]?.trim())}function ke(e,t,r=""){const o=t&&e&&typeof e=="object"?e[t]:void 0;if(!Array.isArray(o))return"";for(const n of o){const i=typeof n=="string"?n:n?.src,l=b(typeof i=="string"?i.trim():void 0);if(l&&l!==r.trim())return l}return""}const y={Text:{text:u},ImageBlock:{src:u},ButtonBlock:{label:u,href:P},LogoBlock:{alt:u},Breadcrumb:{currentCrumb:u}},be=y,Y=new Set(["ButtonBlock.label","LogoBlock.alt"]);function xe(e,t,r){return U(e,t,r)&&!Y.has(`${e}.${r}`)}function U(e,t,r){return $(e,t,r)!==""}function $(e,t,r){const o=y[e]?.[r];return o?p(t,o):""}function V(e,t){return!t||!e?null:e[t]??""}function ge(e,t,r,o){if(!r)return t;let n=null;for(const[i,l]of Object.entries(y[e]??{})){const s=p(t,l),a=V(r,s);a!==null&&(n??={...t},n[i]=o&&j(o,s)?.mark==="accentItalic"?O(a):a)}return n??t}function m(e,t){const r=e?.data?.content;if(!Array.isArray(r)||typeof t!="string")return;const o=(i,l)=>{for(const s of i){if(s?.props?.id===t)return l;for(const[a,f]of Object.entries(s?.props??{})){if(!_(f))continue;const w=a===I&&M(s.type)?{owner:s,direct:!0,nested:l!==null,underBox:!1}:l&&{owner:l.owner,direct:!1,nested:l.nested,underBox:l.underBox||s.type===C},k=o(f,w);if(k!==void 0)return k}}},n=o(r,null);return n===void 0?null:n}function X(e,t){const r=m(e,t);return r&&r.owner}function Re(e,t){const r=m(e,t);return r&&(r.direct?r.owner:null)}function Te(e,t){const r=m(e,t);if(r!==void 0)return r===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:r.nested,underBox:r.underBox}}function we(e,t,r){if(t?.type!==d)return[];const o=X(e,t.props?.id);if(!o)return Q(t.props,r);const n=K(t.props,o.type),i=n&&T(o,"list").find(l=>l.key===n)?.fields||[];return r?i.filter(l=>(l.kind??"text")===r):i}function Be(e,t){return{[u]:"",[g]:e.map(r=>({...r})),[R]:t.map(r=>({...r}))}}function Q(e,t){const r=e?.[R];if(!Array.isArray(r))return[];const o=r.flatMap(n=>{if(!n||typeof n!="object")return[];const{key:i,label:l,kind:s,multiline:a}=n;if(typeof i!="string"||!i||typeof l!="string")return[];const f=s==="image"||s==="link"||s==="colour"?s:void 0;return[{key:i,label:l,...f?{kind:f}:{},...a===!0?{multiline:!0}:{}}]});return t?o.filter(n=>(n.kind??"text")===t):o}export{H as BOX_HIDE_WHEN_ROW_EMPTY,R as CARD_LIST_FIELDS,F as CARD_LIST_ITEM_BLOCKS,g as CARD_LIST_ROWS,d as CARD_LIST_TYPE,u as CARD_ROW_FIELD_PROP,P as CARD_ROW_LINK_PROP,x as CARD_TEMPLATE_BLOCKS,ne as CARD_TEMPLATE_LABEL,I as CARD_TEMPLATE_SLOT,be as ROW_BOUND_PROPS,Y as ROW_PART_BY_WORDS,Te as cardCopyPlace,pe as cardKeyOf,we as cardListFieldsOf,ie as cardListItemSlot,Be as cardListProps,K as cardListShows,ye as cardRow,ue as cardTemplateBlocks,Re as cardTemplateCardOwner,j as cardTemplateField,N as cardTemplateFields,T as cardTemplateFieldsOf,X as cardTemplateOwner,le as cardTemplateSlot,de as cardTemplateTypedRows,ae as cardTemplatesNameBlocks,v as defaultListField,M as hasCardTemplate,fe as isCardTemplateBlock,p as namedRowField,se as registerCardTemplates,U as rowBound,$ as rowFieldOf,V as rowFieldText,ge as rowFilledProps,ke as rowNextPicture,xe as rowPartByKey,me as templateBoxIsEmpty,ce as templateOnInsert,W as templateOnRead};
1
+ import{blockSourceSpec as w,declaredBlockSource as L}from"./block-sources.js";import{isNodeList as _}from"efficient-easel/data";import{BOX_TYPE as C}from"../document/container-blocks.js";import{globalRegistry as A}from"../global-registry.js";import{nonEmptyString as b}from"../non-empty-string.js";import{accentItalicRuns as O}from"../markup.js";import{withCardsTemplate as h}from"../document/cards-template-on-read.js";import{withCardListTemplate as S}from"../document/blocks/general/CardList/item-seed.js";import{ARTICLE_BODY_BLOCK as E,withArticleBodyTemplate as I}from"../document/article-body-seed.js";import{withLogosTemplate as P}from"../document/blocks/general/Logos/card-seed.js";const D="template",se="Card template",d="CardList",x=["Text","ImageBlock","ButtonBlock","Flex"],u="rowField",F="rowLinkField";function ce(){return{type:"slot",allow:[...x]}}const W=x.filter(e=>e!=="ButtonBlock"),g="items",B="itemFields";function ae(){return{type:"slot",allow:[...W]}}const M=[{block:"OrderSummary",typedRows:"rows",fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:"Footprint",typedRows:"offices",fields:[{key:"badge",label:"HQ"},{key:"role",label:"Role"},{key:"city",label:"City"},{key:"country",label:"Region · country"},{key:"address",label:"Address"},{key:"linkLabel",label:"Button"},{key:"href",label:"Link",kind:"link"}]},{block:"Cards",typedRows:"items",fields:[{key:"num",label:"Number"},{key:"since",label:"Corner note"},{key:"label",label:"Label"},{key:"title",label:"Card title"},{key:"value",label:"Value"},{key:"body",label:"Card body",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:"count",label:"Count"},{key:"badge",label:"Highlight badge",everySource:!0}],seed:e=>h("Cards",e)},{block:"ProcessSteps",fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title",mark:"accentItalic"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"},{key:"specs",label:"Specs",kind:"list",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]}],blocks:[{type:d,label:"Card list"}]},{block:"Logos",fields:[{key:"label",label:"Name"},{key:"kind",label:"Kind"}],seed:e=>P(e)},{block:d,fields:[],typedRows:g,seed:e=>S(e)},{block:E,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:e=>I(e)}];function c(){return A("efficient.card-templates",()=>new Map(M.map(e=>[e.block,e])))}function ue(e){for(const t of e){if(typeof t.block!="string"||!t.block)throw new Error("A card template names no block.");const r=[];for(const n of t.blocks??[]){if(typeof n?.type!="string"||!n.type)throw new Error(`The card template of ${t.block} names an empty block.`);r.some(i=>i.type===n.type)||r.push({type:n.type,label:n.label||n.type})}const o=b(t.typedRows);c().set(t.block,{block:t.block,fields:t.fields.map(n=>({...n})),blocks:r,typedRows:o,...t.seed?{seed:t.seed}:{}})}}function N(e,t){const r=e?c().get(e)?.seed:void 0;return r?r(t):t}function fe(e,t){if(!(t.template===void 0||Array.isArray(t.template)&&t.template.length===0))return t;const{template:o,...n}=t,i=N(e,n);return i===n?t:i}function de(){for(const e of c().values())if(e.blocks?.length)return!0;return!1}function pe(e){return c().get(e)?.blocks??[]}function ye(e){for(const t of c().values())if(t.blocks?.some(r=>r.type===e))return!0;return!1}function me(e){return typeof e=="string"&&c().get(e)?.typedRows||""}function v(e){return typeof e=="string"&&c().has(e)}function K(e,t){const r=c().get(e)?.fields??[];return t?r.filter(o=>(o.kind??"text")===t):r}function j(e){return typeof e=="string"?K(e,"list")[0]?.key??"":""}function Y(e,t){return p(e)||j(t)}function T(e,t){const r=typeof e?.type=="string"?e.type:"";if(!r)return[];const o=c().get(r)?.fields??[],n=w(L(e?.props))?.fields,i=n?.length?[...n.map(l=>({...l})),...o.filter(l=>l.everySource&&!n.some(s=>s.key===l.key))]:o;return t?i.filter(l=>(l.kind??"text")===t):i}function H(e,t,r){return e?r?T(r).find(o=>o.key===t)??null:c().get(e)?.fields.find(o=>o.key===t)??null:null}function p(e,t=u){const r=e?.[t];return typeof r=="string"?r.trim():""}function ke(e,t){return e.key||String(t+1)}function be(e){const t={};if(e&&typeof e=="object"&&!Array.isArray(e))for(const[r,o]of Object.entries(e))typeof o=="string"&&(t[r]=o);return t}const U="hideWhenRowEmpty";function xe(e,t){const r=e[U];return!t||!Array.isArray(r)||!r.length?!1:r.every(o=>typeof o!="string"||!t[o]?.trim())}function ge(e,t,r=""){const o=t&&e&&typeof e=="object"?e[t]:void 0;if(!Array.isArray(o))return"";for(const n of o){const i=typeof n=="string"?n:n?.src,l=b(typeof i=="string"?i.trim():void 0);if(l&&l!==r.trim())return l}return""}const y={Text:{text:u},ImageBlock:{src:u},ButtonBlock:{label:u,href:F},LogoBlock:{alt:u},Breadcrumb:{currentCrumb:u}},Be=y,$=new Set(["ButtonBlock.label","LogoBlock.alt"]);function Te(e,t,r){return V(e,t,r)&&!$.has(`${e}.${r}`)}function V(e,t,r){return X(e,t,r)!==""}function X(e,t,r){const o=y[e]?.[r];return o?p(t,o):""}function Q(e,t){return!t||!e?null:e[t]??""}function Re(e,t,r,o){if(!r)return t;let n=null;for(const[i,l]of Object.entries(y[e]??{})){const s=p(t,l),a=Q(r,s);a!==null&&(n??={...t},n[i]=o&&H(o,s)?.mark==="accentItalic"?O(a):a)}return n??t}function m(e,t){const r=e?.data?.content;if(!Array.isArray(r)||typeof t!="string")return;const o=(i,l)=>{for(const s of i){if(s?.props?.id===t)return l;for(const[a,f]of Object.entries(s?.props??{})){if(!_(f))continue;const R=a===D&&v(s.type)?{owner:s,direct:!0,nested:l!==null,underBox:!1}:l&&{owner:l.owner,direct:!1,nested:l.nested,underBox:l.underBox||s.type===C},k=o(f,R);if(k!==void 0)return k}}},n=o(r,null);return n===void 0?null:n}function q(e,t){const r=m(e,t);return r&&r.owner}function we(e,t){const r=m(e,t);return r&&(r.direct?r.owner:null)}function Le(e,t){const r=m(e,t);if(r!==void 0)return r===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:r.nested,underBox:r.underBox}}function _e(e,t,r){if(t?.type!==d)return[];const o=q(e,t.props?.id);if(!o)return z(t.props,r);const n=Y(t.props,o.type),i=n&&T(o,"list").find(l=>l.key===n)?.fields||[];return r?i.filter(l=>(l.kind??"text")===r):i}function Ce(e,t){return{[u]:"",[g]:e.map(r=>({...r})),[B]:t.map(r=>({...r}))}}function z(e,t){const r=e?.[B];if(!Array.isArray(r))return[];const o=r.flatMap(n=>{if(!n||typeof n!="object")return[];const{key:i,label:l,kind:s,multiline:a}=n;if(typeof i!="string"||!i||typeof l!="string")return[];const f=s==="image"||s==="link"||s==="colour"?s:void 0;return[{key:i,label:l,...f?{kind:f}:{},...a===!0?{multiline:!0}:{}}]});return t?o.filter(n=>(n.kind??"text")===t):o}export{U as BOX_HIDE_WHEN_ROW_EMPTY,B as CARD_LIST_FIELDS,W as CARD_LIST_ITEM_BLOCKS,g as CARD_LIST_ROWS,d as CARD_LIST_TYPE,u as CARD_ROW_FIELD_PROP,F as CARD_ROW_LINK_PROP,x as CARD_TEMPLATE_BLOCKS,se as CARD_TEMPLATE_LABEL,D as CARD_TEMPLATE_SLOT,Be as ROW_BOUND_PROPS,$ as ROW_PART_BY_WORDS,Le as cardCopyPlace,ke as cardKeyOf,_e as cardListFieldsOf,ae as cardListItemSlot,Ce as cardListProps,Y as cardListShows,be as cardRow,pe as cardTemplateBlocks,we as cardTemplateCardOwner,H as cardTemplateField,K as cardTemplateFields,T as cardTemplateFieldsOf,q as cardTemplateOwner,ce as cardTemplateSlot,me as cardTemplateTypedRows,de as cardTemplatesNameBlocks,j as defaultListField,v as hasCardTemplate,ye as isCardTemplateBlock,p as namedRowField,ue as registerCardTemplates,V as rowBound,X as rowFieldOf,Q as rowFieldText,Re as rowFilledProps,ge as rowNextPicture,Te as rowPartByKey,xe as templateBoxIsEmpty,fe as templateOnInsert,N as templateOnRead};
@@ -0,0 +1,31 @@
1
+ export interface GridColumnStep {
2
+ below: number;
3
+ columns: number;
4
+ }
5
+ export interface GridColumns {
6
+ base: number;
7
+ steps: GridColumnStep[];
8
+ }
9
+ export declare function gridColumnsOf(gridClass: string): GridColumns;
10
+ export declare function fillRowColumns(columns: number, cards: number): number;
11
+ export declare function fillRow(grid: GridColumns, cards: number): GridColumns;
12
+ export interface CardImageStep {
13
+ below: number;
14
+ slot: string;
15
+ }
16
+ export declare function cardImageSlot(columns: number, inset?: string): string;
17
+ export declare function cardImageSizes(steps: readonly CardImageStep[], widest: string): string;
18
+ export declare function gridClassImageSizes(gridClass: string, cards?: number, inset?: string): string;
19
+ export interface ViewBound {
20
+ phone: string;
21
+ tablet: string;
22
+ desktop: string;
23
+ }
24
+ export interface ViewFractions {
25
+ phone: number;
26
+ tablet: number;
27
+ desktop: number;
28
+ }
29
+ export declare function boundOf(fractions: ViewFractions, outer?: ViewBound): ViewBound;
30
+ export declare function cellPictureSizesOf(bound: ViewBound): string | undefined;
31
+ export declare function narrowerSizes(own: string, cell: string | undefined): string;
@@ -0,0 +1 @@
1
+ import{breakpointOf as g,VIEW_LINE_PX as u}from"./view-lines.js";const k=u["view-tablet"],v=u["view-desktop"];function E(t){const e=/(?:^|\s)grid-cols-(\d+)(?=\s|$)/.exec(t);if(!e)throw new Error(`gridColumnsOf: no base grid-cols-N in "${t}"`);const o=[...t.matchAll(/(?:^|\s)(max-[\w[\]-]+):grid-cols-(\d+)(?=\s|$)/g)].flatMap(s=>{const n=g(s[1]);return n?.max?[{below:n.px,columns:Number(s[2])}]:[]}).sort((s,n)=>n.below-s.below);return{base:Number(e[1]),steps:o}}function f(t,e){return Math.max(1,Math.min(t,Math.floor(e)))}function I(t,e){return{base:f(t.base,e),steps:t.steps.map(o=>({below:o.below,columns:f(o.columns,e)}))}}const M=t=>/^0+(?:\.0+)?[a-z%]*$/i.test(t.trim());function w(t,e="0px"){const o=t<=1?"100vw":`100vw / ${t}`;return M(e)?t<=1?o:`calc(${o})`:`calc(${o} - ${e})`}function d(t,e){return[...[...t].sort((s,n)=>s.below-n.below).map(s=>`(max-width: ${s.below-.02}px) ${s.slot}`),e].join(", ")}function S(t,e,o){const s=E(t),{base:n,steps:c}=e===void 0?s:I(s,e);return d(c.map(l=>({below:l.below,slot:w(l.columns,o)})),w(n,o))}const m=t=>`${Math.ceil(t*1e4-1e-6)/100}vw`,p=t=>{const e=/^([\d.]+)vw$/.exec(t??"");return e?Math.min(1,Number(e[1])/100):1};function O(t,e){return{phone:m(t.phone*p(e?.phone)),tablet:m(t.tablet*p(e?.tablet)),desktop:m(t.desktop*p(e?.desktop))}}function z(t){if([t.phone,t.tablet,t.desktop].every(s=>p(s)>=1))return;const e=[{below:k,slot:t.phone},{below:v,slot:t.tablet}],o=e.filter((s,n)=>s.slot!==(e[n+1]?.slot??t.desktop));return d(o,t.desktop)}function x(t){const e=t.split(/,\s*(?![^()]*\))/).map(n=>n.trim()),o=[];for(const n of e.slice(0,-1)){const c=/^\(max-width:\s*([\d.]+)px\)\s+(.+)$/.exec(n);if(!c)return null;const l=Number(c[1]);if(o.length&&l<=o[o.length-1].edge)return null;o.push({edge:l,slot:c[2]})}const s=e[e.length-1];return!s||s.startsWith("(")?null:{steps:o,last:s}}const b=(t,e)=>t.steps.find(o=>e<=o.edge)?.slot??t.last,h=t=>{const e=/^min\((.+)\)$/.exec(t);return e?e[1].split(/,\s*(?![^()]*\))/).map(o=>o.trim()):[t]};function $(t,e){if(t===e)return t;const o=[...h(t),...h(e)],s=l=>{const i=o.map(r=>new RegExp(`^([\\d.]+)${l}$`).exec(r)).filter(Boolean).map(r=>Number(r[1]));return i.length?[`${Math.min(...i)}${l}`]:[]},n=[...new Set(o.filter(l=>!/^[\d.]+(vw|px)$/.test(l)))],c=[...s("vw"),...s("px"),...n];return c.length===1?c[0]:`min(${c.join(", ")})`}function _(t,e){if(!e)return t;const o=x(t),s=x(e);if(!o||!s)return t;const c=[...new Set([...o.steps,...s.steps].map(r=>r.edge))].sort((r,a)=>r-a).map(r=>({edge:r,slot:$(b(o,r),b(s,r))})),l=$(o.last,s.last);return[...c.filter((r,a)=>r.slot!==(c[a+1]?.slot??l)).map(r=>`(max-width: ${r.edge}px) ${r.slot}`),l].join(", ")}export{O as boundOf,d as cardImageSizes,w as cardImageSlot,z as cellPictureSizesOf,I as fillRow,f as fillRowColumns,S as gridClassImageSizes,E as gridColumnsOf,_ as narrowerSizes};
@@ -39,6 +39,7 @@ export declare function imageFillRowClasses(from: ImageFillFrom): {
39
39
  };
40
40
  export declare const isImageRatio: (value: unknown) => value is ImageRatio;
41
41
  export declare function imageRatioAspect(value: unknown): string | null;
42
+ export declare function imageWidthFollowsBox(drawn: unknown, phone: unknown, fit: "cover" | "contain"): boolean;
42
43
  export declare function imageAspectDrawn(aspect: unknown, rowGivesHeight: boolean): unknown;
43
44
  export declare function imageAspectPhoneRest(desktop: unknown): ImageRatio | undefined;
44
45
  export declare function imageAspectPhoneOf(drawn: unknown, phone: unknown): ImageRatio | null;
@@ -1 +1 @@
1
- import{BOX_GIVES_PICTURES_A_HEIGHT as v}from"./box-layout.js";import{imageIsCropped as r,parseImageFit as c}from"./image-fit.js";import{SHAPE_TABLE as n}from"./gallery-card-layout.js";const d=n.map(e=>e.image),a="fill",E={label:"Fill row",value:a,showWhen:v},w="4/3",f={all:{frame:"h-full min-h-[240px]",img:"absolute inset-0",figure:"h-full"},wide:{frame:"view-wide:h-full view-wide:min-h-[240px]",img:"view-wide:absolute view-wide:inset-0",figure:"view-wide:h-full"},tablet:{frame:"view-tablet:h-full view-tablet:min-h-[240px] view-tablet:aspect-auto!",img:"view-tablet:absolute view-tablet:inset-0",figure:"view-tablet:h-full"},desktop:{frame:"view-desktop:h-full view-desktop:min-h-[240px] max-view-desktop:aspect-[4/3]",img:"view-desktop:absolute view-desktop:inset-0",figure:"view-desktop:h-full"}};function F(e,t,i){return t&&!s(i)?"all":e??"wide"}function p(e){return f[e]}const x={auto:"","3/4":"aspect-[3/4]","2/1":"aspect-[2/1]","21/9":"aspect-[21/9]","16/9":"aspect-[16/9]","4/3":"aspect-[4/3]","1/1":"aspect-square","9/16":"aspect-[9/16]","2/3":"aspect-[2/3]","4/5":"aspect-[4/5]"},g={auto:"","3/4":"view-wide:aspect-[3/4]","2/1":"view-wide:aspect-[2/1]","21/9":"view-wide:aspect-[21/9]","16/9":"view-wide:aspect-[16/9]","4/3":"view-wide:aspect-[4/3]","1/1":"view-wide:aspect-square","9/16":"view-wide:aspect-[9/16]","2/3":"view-wide:aspect-[2/3]","4/5":"view-wide:aspect-[4/5]"},A={auto:"","3/4":"max-view-wide:aspect-[3/4]","2/1":"max-view-wide:aspect-[2/1]","21/9":"max-view-wide:aspect-[21/9]","16/9":"max-view-wide:aspect-[16/9]","4/3":"max-view-wide:aspect-[4/3]","1/1":"max-view-wide:aspect-square","9/16":"max-view-wide:aspect-[9/16]","2/3":"max-view-wide:aspect-[2/3]","4/5":"max-view-wide:aspect-[4/5]"},_={auto:"max-view-wide:aspect-auto!","3/4":"max-view-wide:aspect-[3/4]!","2/1":"max-view-wide:aspect-[2/1]!","21/9":"max-view-wide:aspect-[21/9]!","16/9":"max-view-wide:aspect-[16/9]!","4/3":"","1/1":"max-view-wide:aspect-square!","9/16":"max-view-wide:aspect-[9/16]!","2/3":"max-view-wide:aspect-[2/3]!","4/5":"max-view-wide:aspect-[4/5]!"},u=e=>d.includes(e),s=u;function h(e){const t=u(e)?n.find(i=>i.image===e)?.ratio:null;return t?`${t[0]} / ${t[1]}`:null}function P(e,t){return e===a&&!t?w:e}function S(e){return e===a?w:s(e)?e:void 0}function l(e,t){return s(t)?t===e?null:t:e===a?w:null}function L(e,t){const i=l(e,t);return r(e,"cover")||i!==null&&r(i,"cover")}function O(e,t,i){return c(e,"cover")==="cover"&&L(t,i)}function k(e,t,i,o){return e==="desktop"?O(t,i,o):c(t,"cover")!=="cover"?!1:m(e==="tablet"?i:l(i,o)??i)}const m=e=>e===a||s(e)&&e!=="auto";function C(e,t,i="wide"){return e===a&&i==="all"?p("all").frame:t===null?s(e)?x[e]:"":[e===a?p(i).frame:s(e)?g[e]:"",e===a&&i==="desktop"?_[t]:A[t]].filter(Boolean).join(" ")}export{a as FILL_ROW,E as FILL_ROW_OPTION,C as imageAspectClasses,P as imageAspectDrawn,L as imageAspectDrawsARatio,l as imageAspectPhoneOf,S as imageAspectPhoneRest,F as imageFillFrom,p as imageFillRowClasses,O as imageFocalPointActs,k as imageFocalPointActsIn,h as imageRatioAspect,u as isImageRatio};
1
+ import{BOX_GIVES_PICTURES_A_HEIGHT as v}from"./box-layout.js";import{imageIsCropped as c,parseImageFit as n}from"./image-fit.js";import{SHAPE_TABLE as p}from"./gallery-card-layout.js";const f=p.map(e=>e.image),a="fill",E={label:"Fill row",value:a,showWhen:v},r="4/3",d={all:{frame:"h-full min-h-[240px]",img:"absolute inset-0",figure:"h-full"},wide:{frame:"view-wide:h-full view-wide:min-h-[240px]",img:"view-wide:absolute view-wide:inset-0",figure:"view-wide:h-full"},tablet:{frame:"view-tablet:h-full view-tablet:min-h-[240px] view-tablet:aspect-auto!",img:"view-tablet:absolute view-tablet:inset-0",figure:"view-tablet:h-full"},desktop:{frame:"view-desktop:h-full view-desktop:min-h-[240px] max-view-desktop:aspect-[4/3]",img:"view-desktop:absolute view-desktop:inset-0",figure:"view-desktop:h-full"}};function F(e,t,i){return t&&!s(i)?"all":e??"wide"}function u(e){return d[e]}const x={auto:"","3/4":"aspect-[3/4]","2/1":"aspect-[2/1]","21/9":"aspect-[21/9]","16/9":"aspect-[16/9]","4/3":"aspect-[4/3]","1/1":"aspect-square","9/16":"aspect-[9/16]","2/3":"aspect-[2/3]","4/5":"aspect-[4/5]"},g={auto:"","3/4":"view-wide:aspect-[3/4]","2/1":"view-wide:aspect-[2/1]","21/9":"view-wide:aspect-[21/9]","16/9":"view-wide:aspect-[16/9]","4/3":"view-wide:aspect-[4/3]","1/1":"view-wide:aspect-square","9/16":"view-wide:aspect-[9/16]","2/3":"view-wide:aspect-[2/3]","4/5":"view-wide:aspect-[4/5]"},A={auto:"","3/4":"max-view-wide:aspect-[3/4]","2/1":"max-view-wide:aspect-[2/1]","21/9":"max-view-wide:aspect-[21/9]","16/9":"max-view-wide:aspect-[16/9]","4/3":"max-view-wide:aspect-[4/3]","1/1":"max-view-wide:aspect-square","9/16":"max-view-wide:aspect-[9/16]","2/3":"max-view-wide:aspect-[2/3]","4/5":"max-view-wide:aspect-[4/5]"},_={auto:"max-view-wide:aspect-auto!","3/4":"max-view-wide:aspect-[3/4]!","2/1":"max-view-wide:aspect-[2/1]!","21/9":"max-view-wide:aspect-[21/9]!","16/9":"max-view-wide:aspect-[16/9]!","4/3":"","1/1":"max-view-wide:aspect-square!","9/16":"max-view-wide:aspect-[9/16]!","2/3":"max-view-wide:aspect-[2/3]!","4/5":"max-view-wide:aspect-[4/5]!"},w=e=>f.includes(e),s=w;function h(e){const t=w(e)?p.find(i=>i.image===e)?.ratio:null;return t?`${t[0]} / ${t[1]}`:null}function P(e,t,i){return i==="contain"?!0:[e,t??e].every(o=>o!==a&&(!w(o)||o==="auto"))}function S(e,t){return e===a&&!t?r:e}function k(e){return e===a?r:s(e)?e:void 0}function l(e,t){return s(t)?t===e?null:t:e===a?r:null}function L(e,t){const i=l(e,t);return c(e,"cover")||i!==null&&c(i,"cover")}function O(e,t,i){return n(e,"cover")==="cover"&&L(t,i)}function C(e,t,i,o){return e==="desktop"?O(t,i,o):n(t,"cover")!=="cover"?!1:m(e==="tablet"?i:l(i,o)??i)}const m=e=>e===a||s(e)&&e!=="auto";function B(e,t,i="wide"){return e===a&&i==="all"?u("all").frame:t===null?s(e)?x[e]:"":[e===a?u(i).frame:s(e)?g[e]:"",e===a&&i==="desktop"?_[t]:A[t]].filter(Boolean).join(" ")}export{a as FILL_ROW,E as FILL_ROW_OPTION,B as imageAspectClasses,S as imageAspectDrawn,L as imageAspectDrawsARatio,l as imageAspectPhoneOf,k as imageAspectPhoneRest,F as imageFillFrom,u as imageFillRowClasses,O as imageFocalPointActs,C as imageFocalPointActsIn,h as imageRatioAspect,P as imageWidthFollowsBox,w as isImageRatio};
@@ -29,7 +29,7 @@ export declare function mirrorCardsActs(box: MirrorCardsBox, ownsCard: boolean,
29
29
  export declare function isMirroredCopy(value: unknown, index: number | undefined): boolean;
30
30
  export declare const MIRROR_ROW_CLASS = "view-wide:flex-row-reverse";
31
31
  export declare function mirroredTextClasses(mirrored: boolean, align: unknown, partAlign: unknown): string;
32
- export declare function mirroredBoxClass(mirrored: boolean, direction: unknown, justify: unknown, align: unknown): string;
32
+ export declare function mirroredBoxClass(mirrored: boolean, direction: unknown, justify: unknown, align: unknown, justifyTablet?: unknown): string;
33
33
  export type RowHand = {
34
34
  mirror: MirrorCards | null;
35
35
  row?: {
@@ -1 +1 @@
1
- import{isBackgroundBox as i}from"./box-background.js";import{boxColumnsClass as s,boxShareClasses as u,boxTabletColumnsClass as d,boxWrapClass as a}from"./box-layout.js";import{isStripBox as l}from"./box-separator.js";const _="Mirror cards",c="off",A=[{value:c,label:"Off"},{value:"even",label:"Even cards"},{value:"odd",label:"Odd cards"}],v={even:"Cards 2, 4, 6 draw the other way round",odd:"Cards 1, 3, 5 draw the other way round"};function o(r){return r==="even"||r==="odd"?r:null}function O(r){return o(r)??void 0}function y(r){return r.inCopy&&!r.nestedCopy&&!r.underBox}function h(r,e,t){return!e||r.direction!=="row"||t||l("row",r.separator)||r.loop==="scroll"||r.line===!0||i(typeof r.bgImage=="string"?r.bgImage:void 0)||s(r.columns)!==""||d(r.columnsTablet)!==""?!1:!(u(r.share)===""&&a(r.wrap)!=="")}function T(r,e){const t=o(r);return!t||typeof e!="number"||!Number.isInteger(e)||e<0?!1:t==="even"?e%2===1:e%2===0}const x="view-wide:flex-row-reverse",m={left:"view-wide:ml-auto!",right:"view-wide:ml-0!"},p={left:"view-wide:text-right!",right:"view-wide:text-left!"},w={start:"view-wide:justify-end!",end:"view-wide:justify-start!"},C={start:"view-wide:items-end!",end:"view-wide:items-start!"},n=(r,e)=>typeof e=="string"&&Object.prototype.hasOwnProperty.call(r,e)?r[e]:"";function M(r,e,t){return r?[n(m,e),n(p,t)].filter(Boolean).join(" "):""}function B(r,e,t,f){return r?e==="row"?n(w,t):e==="column"?n(C,f):"":""}function R(r,e){return e||r.direction!==void 0&&r.direction!=="column"||r.loop==="scroll"||i(typeof r.bgImage=="string"?r.bgImage:void 0)?!1:s(r.columns)===""}function L(r,e){const t=o(r.mirrorCards);return t&&R(r,e)?{mirror:t}:null}export{_ as MIRROR_CARDS_LABEL,c as MIRROR_CARDS_OFF,A as MIRROR_CARDS_OPTIONS,v as MIRROR_CARDS_TITLES,x as MIRROR_ROW_CLASS,L as boxChildrenHand,T as isMirroredCopy,h as mirrorCardsActs,o as mirrorCardsOf,O as mirrorCardsWrite,R as mirrorChildrenActs,B as mirroredBoxClass,M as mirroredTextClasses,y as ownsCard};
1
+ import{isBackgroundBox as s}from"./box-background.js";import{boxColumnsClass as d,boxJustifyViewAnswers as u,boxShareClasses as l,boxTabletColumnsClass as w,boxWrapClass as c}from"./box-layout.js";import{isStripBox as m}from"./box-separator.js";const O="Mirror cards",p="off",x=[{value:p,label:"Off"},{value:"even",label:"Even cards"},{value:"odd",label:"Odd cards"}],T={even:"Cards 2, 4, 6 draw the other way round",odd:"Cards 1, 3, 5 draw the other way round"};function o(e){return e==="even"||e==="odd"?e:null}function h(e){return o(e)??void 0}function B(e){return e.inCopy&&!e.nestedCopy&&!e.underBox}function j(e,r,t){return!r||e.direction!=="row"||t||m("row",e.separator)||e.loop==="scroll"||e.line===!0||s(typeof e.bgImage=="string"?e.bgImage:void 0)||d(e.columns)!==""||w(e.columnsTablet)!==""?!1:!(l(e.share)===""&&c(e.wrap)!=="")}function L(e,r){const t=o(e);return!t||typeof r!="number"||!Number.isInteger(r)||r<0?!1:t==="even"?r%2===1:r%2===0}const M="view-wide:flex-row-reverse",C={left:"view-wide:ml-auto!",right:"view-wide:ml-0!"},v={left:"view-wide:text-right!",right:"view-wide:text-left!"},R={start:"view-wide:justify-end!",end:"view-wide:justify-start!"},A={start:"view-wide:items-end!",end:"view-wide:items-start!"},S={start:"view-wide:max-view-desktop:justify-end!",end:"view-wide:max-view-desktop:justify-start!",center:"view-wide:max-view-desktop:justify-center!",between:"view-wide:max-view-desktop:justify-between!"},n=(e,r)=>typeof r=="string"&&Object.prototype.hasOwnProperty.call(e,r)?e[r]:"";function P(e,r,t){return e?[n(C,r),n(v,t)].filter(Boolean).join(" "):""}function W(e,r,t,a,f){if(!e)return"";if(r==="row"){const i=u(t,f,void 0).tablet;return[n(R,t),i?S[i]:""].filter(Boolean).join(" ")}return r==="column"?n(A,a):""}function _(e,r){return r||e.direction!==void 0&&e.direction!=="column"||e.loop==="scroll"||s(typeof e.bgImage=="string"?e.bgImage:void 0)?!1:d(e.columns)===""}function E(e,r){const t=o(e.mirrorCards);return t&&_(e,r)?{mirror:t}:null}export{O as MIRROR_CARDS_LABEL,p as MIRROR_CARDS_OFF,x as MIRROR_CARDS_OPTIONS,T as MIRROR_CARDS_TITLES,M as MIRROR_ROW_CLASS,E as boxChildrenHand,L as isMirroredCopy,j as mirrorCardsActs,o as mirrorCardsOf,h as mirrorCardsWrite,_ as mirrorChildrenActs,W as mirroredBoxClass,P as mirroredTextClasses,B as ownsCard};
@@ -0,0 +1,10 @@
1
+ import { type SeededNode } from "./seed-parts.js";
2
+ type Props = Record<string, unknown>;
3
+ export declare const ARTICLE_BODY_BLOCK = "ArticleBody";
4
+ export declare const ARTICLE_HEADING_LOOK: Props;
5
+ export declare const ARTICLE_PARAGRAPH_LOOK: Props;
6
+ export declare const ARTICLE_MEASURE = 640;
7
+ export declare const articleBodyTemplateNodes: (idOf: (type: string, at: string) => string) => SeededNode[];
8
+ export declare function articleBodySeed(nodeId: string): SeededNode[];
9
+ export declare function withArticleBodyTemplate(props: Props): Props;
10
+ export {};
@@ -0,0 +1 @@
1
+ import{CARDS_BODY_LOOK as a,rowFieldTextSeed as n}from"./blocks/general/Cards/card-seed.js";import{DIM as o,TEXT as d,seedNodes as c,token as l}from"./seed-parts.js";const g="ArticleBody",h={textStyle:"heading-3",...l("headingSmall",20),weight:500,lineHeight:1.4,align:"center"},m={...a,align:"center"},i=640,A=()=>[n("heading",{...d,tag:"h2",align:"center",maxWidth:i},h),n("paragraph",{...o,tag:"p",align:"center",maxWidth:i},m)],x=e=>c(A(),e);function p(e){return x((t,r)=>`${e}~${r==="0"?"heading":"paragraph"}`)}function T(e){if(e.template!==void 0)return e;const t=typeof e.id=="string"&&e.id.trim()?e.id:g;return{...e,template:p(t)}}export{g as ARTICLE_BODY_BLOCK,h as ARTICLE_HEADING_LOOK,i as ARTICLE_MEASURE,m as ARTICLE_PARAGRAPH_LOOK,p as articleBodySeed,x as articleBodyTemplateNodes,T as withArticleBodyTemplate};
@@ -1,4 +1,4 @@
1
- import type { TimelineLayout } from "../../../../../../render/components/Timeline.js";
1
+ import type { TimelineEntry, TimelineLayout } from "../../../../../../render/components/Timeline.js";
2
2
  import type { BlockMeta } from "../../block-types.js";
3
3
  export declare const TIMELINE_PH: {
4
4
  eyebrow: string;
@@ -8,5 +8,6 @@ export declare const TIMELINE_PH: {
8
8
  imageMeta: string;
9
9
  cta: string;
10
10
  };
11
+ export declare const timelineScaffoldEntries: () => TimelineEntry[];
11
12
  export type StoryTimelineDisplay = TimelineLayout | "track";
12
13
  export declare const TimelineMeta: BlockMeta;
@@ -1,2 +1,2 @@
1
- import{CTA_PH as t,PH as e}from"../../placeholders.js";const a={eyebrow:e.eyebrow,title:`Section heading
2
- *Highlight line*`,intro:e.body,imageCaption:e.imageCaption,imageMeta:e.imageMeta,cta:t.text},o={label:"Story Timeline",defaultProps:{layout:"split",eyebrow:"",title:"",intro:"",imageSrc:"",imageCaption:"",imageMeta:"",ctaText:"",ctaHref:"",entries:[],padTop:120,padBottom:120}};export{a as TIMELINE_PH,o as TimelineMeta};
1
+ import{CTA_PH as i,PH as t}from"../../placeholders.js";import{say as e}from"../../../../editor-words.js";const n={eyebrow:t.eyebrow,title:`Section heading
2
+ *Highlight line*`,intro:t.body,imageCaption:t.imageCaption,imageMeta:t.imageMeta,cta:i.text},r=()=>[{date:e("Year"),title:e("Milestone title."),body:e("Describe what happened, in a sentence or two.")},{date:e("Year"),title:e("Milestone title."),body:e("Describe what happened, in a sentence or two.")},{date:e("Year"),title:e("Milestone title."),body:e("Describe what happened, in a sentence or two.")}],l={label:"Story Timeline",defaultProps:{layout:"split",eyebrow:"",title:"",intro:"",imageSrc:"",imageCaption:"",imageMeta:"",ctaText:"",ctaHref:"",entries:[],padTop:120,padBottom:120}};export{n as TIMELINE_PH,l as TimelineMeta,r as timelineScaffoldEntries};
@@ -2,6 +2,7 @@ export declare const CTA_PH: {
2
2
  text: string;
3
3
  href: string;
4
4
  };
5
+ export declare const phAccentAsMarks: (text: string) => string;
5
6
  export declare const PH: {
6
7
  eyebrow: string;
7
8
  heading: string;
@@ -1 +1 @@
1
- const e={text:"Button label",href:"#"},n={eyebrow:"Eyebrow",heading:"Main heading",accent:"Highlight line",body:"Add a sentence or two of supporting copy.",button:"Button label",link:"#",sectionHeading:"Section heading",slideName:"Slide name",boxName:"Box name",headingAccent:"Section heading *here.*",sectionNumber:"Section number",imageCaption:"Image caption",bookingConfirmation:"Thanks — we'll email you to confirm.",imageMeta:"Image meta",label:"Label",value:"Value",viewAll:"View all",date:"Month DD, YYYY",category:"Category"};export{e as CTA_PH,n as PH};
1
+ const n={text:"Button label",href:"#"},a=e=>e.replace(/\*([^*]+)\*/g,"==$1=="),o={eyebrow:"Eyebrow",heading:"Main heading",accent:"Highlight line",body:"Add a sentence or two of supporting copy.",button:"Button label",link:"#",sectionHeading:"Section heading",slideName:"Slide name",boxName:"Box name",headingAccent:"Section heading *here.*",sectionNumber:"Section number",imageCaption:"Image caption",bookingConfirmation:"Thanks — we'll email you to confirm.",imageMeta:"Image meta",label:"Label",value:"Value",viewAll:"View all",date:"Month DD, YYYY",category:"Category"};export{n as CTA_PH,o as PH,a as phAccentAsMarks};
@@ -2,7 +2,7 @@ export declare const EASEL_ROW_WORDS: {
2
2
  readonly fillColor: "Fill color";
3
3
  readonly textFit: "When the text does not fit";
4
4
  readonly wrap: "Wrap";
5
- readonly shrink: "Shrink to fit";
5
+ readonly shrink: "Shrink";
6
6
  readonly line: "One line";
7
7
  readonly onTablet: "{value} on tablet";
8
8
  readonly onDesktop: "{value} on desktop";
@@ -1 +1 @@
1
- const t={fillColor:"Fill color",textFit:"When the text does not fit",wrap:"Wrap",shrink:"Shrink to fit",line:"One line",onTablet:"{value} on tablet",onDesktop:"{value} on desktop"};export{t as EASEL_ROW_WORDS};
1
+ const e={fillColor:"Fill color",textFit:"When the text does not fit",wrap:"Wrap",shrink:"Shrink",line:"One line",onTablet:"{value} on tablet",onDesktop:"{value} on desktop"};export{e as EASEL_ROW_WORDS};
@@ -1 +1 @@
1
- import{ENTRANCE_GROUP_KEY as i}from"../../animation/index.js";const r=new Set(["Reviews","Cards","FAQ","Prose","ProductHero","SpecTable","ProductGrid","ParagraphsA","KeyFeatures","Stats","StatsParagraph","Chart","Mockup","Testimonials","Logos","ContactRouting","ContactLocations","SubmitBuild","ReviewForm","Form","AppointmentBooking","OrderSummary","DeliveryOptions","PaymentBadges","CheckoutCTA","Collections","AlloyWheelsListing","CatalogFilterBar","FitmentFinder","GalleryB","DocMasthead","DocBody","DocMetaCards","Masthead","FeaturedCover","LongRead","Series","Events","SectionHeader","Grid","Flex","Spacer","Divider","CustomHTML","Breadcrumb","CategoryBar","DocTabs","Hero","HeroSingle","IntroBleed","Manifesto","Timeline","TimelineTrack","Footprint","Banner","TitleWithButtons","Ticker","SubscribeBlogs","TyreSizes","TyreFitment","EuTyreLabel","SpecStrip","ProcessSteps","DetailRows","FitmentTable","CompatibleTyres","RelatedProducts","BundleOffer","Split","Gallery","Subscribe","Countdown"]),l={name:"sectionGroups",applies:(e,o)=>o.isSection(e)&&(r.has(e)||o.isHostBlock(e)),panel(e,o,t){const s=t.assignSectionGroups;e?.fields&&(e.fields=s(e.fields,o))}},a=new Set(["HeroSlide","HeroGroup"]),c={name:"blockGroups",applies:(e,o,t)=>a.has(e)||!o.isSection(e)&&i in(t?.fields??{}),panel(e,o,t){const s=t.assignSectionGroups;e?.fields&&(e.fields=s(e.fields,o))}};export{c as blockGroups,l as sectionGroups};
1
+ import{ENTRANCE_GROUP_KEY as i}from"../../animation/index.js";const r=new Set(["Reviews","Cards","FAQ","Prose","ProductHero","SpecTable","ProductGrid","ParagraphsA","KeyFeatures","Stats","StatsParagraph","Chart","Mockup","Testimonials","Logos","ContactRouting","ContactLocations","SubmitBuild","ReviewForm","Form","AppointmentBooking","OrderSummary","DeliveryOptions","PaymentBadges","CheckoutCTA","Collections","AlloyWheelsListing","CatalogFilterBar","FitmentFinder","GalleryB","DocMasthead","DocBody","DocMetaCards","Masthead","FeaturedCover","LongRead","Series","Events","ArticleBody","SectionHeader","Grid","Flex","Spacer","Divider","CustomHTML","Breadcrumb","CategoryBar","DocTabs","Hero","HeroSingle","IntroBleed","Manifesto","Timeline","TimelineTrack","Footprint","Banner","TitleWithButtons","Ticker","SubscribeBlogs","TyreSizes","TyreFitment","EuTyreLabel","SpecStrip","ProcessSteps","DetailRows","FitmentTable","CompatibleTyres","RelatedProducts","BundleOffer","Split","Gallery","Subscribe","Countdown"]),l={name:"sectionGroups",applies:(e,o)=>o.isSection(e)&&(r.has(e)||o.isHostBlock(e)),panel(e,o,t){const s=t.assignSectionGroups;e?.fields&&(e.fields=s(e.fields,o))}},a=new Set(["HeroSlide","HeroGroup"]),c={name:"blockGroups",applies:(e,o,t)=>a.has(e)||!o.isSection(e)&&i in(t?.fields??{}),panel(e,o,t){const s=t.assignSectionGroups;e?.fields&&(e.fields=s(e.fields,o))}};export{c as blockGroups,l as sectionGroups};
@@ -1,4 +1,4 @@
1
- const h=["general","commerce","service"],o=[{key:"openers",title:"Hero & intros",defaultExpanded:!0,templateable:!0,sections:[{type:"Hero",label:"Hero",set:"general"},{type:"HeroSingle",label:"Hero Single",set:"general"},{type:"IntroBleed",label:"Scroll-Over Text",set:"general"}]},{key:"shop",title:"Shop & galleries",templateable:!0,sections:[{type:"Collections",label:"Collections",set:"commerce"},{type:"AlloyWheelsListing",label:"List",set:"commerce"},{type:"CatalogFilterBar",label:"Catalog Filter Bar",set:"commerce"},{type:"ProductGrid",label:"Product Grid",set:"commerce"},{type:"FitmentFinder",label:"Fitment Form",set:"commerce"},{type:"Gallery",label:"Tabbed Gallery",set:"commerce"},{type:"GalleryB",label:"Customer Photo Grid",set:"commerce"}]},{key:"product",title:"Product page",templateable:!0,sections:[{type:"ProductHero",label:"Product Hero",set:"commerce"},{type:"SpecTable",label:"Spec Table",set:"commerce"},{type:"ProcessSteps",label:"Image & Text Columns",set:"general"},{type:"DetailRows",label:"Feature Rows",set:"commerce"},{type:"FitmentTable",label:"Fitment Table",set:"commerce"},{type:"TyreSizes",label:"Tyre Sizes",set:"commerce"},{type:"TyreFitment",label:"Tyre Fitment Form",set:"commerce"},{type:"EuTyreLabel",label:"EU Tyre Label",set:"commerce"},{type:"BundleOffer",label:"Bundle Products",set:"commerce"}]},{key:"checkout",title:"Checkout & ordering",templateable:!0,sections:[{type:"OrderSummary",label:"Order Table",set:"general"},{type:"PaymentBadges",label:"Payment Methods",set:"general"},{type:"CheckoutCTA",label:"Ready-to-Order Banner",set:"commerce"}]},{key:"about",title:"About & brand story",templateable:!0,sections:[{type:"Footprint",label:"Locations Map",set:"general"}]},{key:"content",title:"Text & content",templateable:!0,sections:[{type:"Prose",label:"Editorial Text",set:"general"},{type:"ParagraphsA",label:"Lead Text",set:"general"},{type:"Cards",label:"Cards",set:"general"}]},{key:"proof",title:"Stats & social proof",templateable:!0,sections:[{type:"Stats",label:"Stats",set:"general"},{type:"Chart",label:"Chart",set:"general"},{type:"Mockup",label:"Mockup Card",set:"general"},{type:"Reviews",label:"Reviews",set:"service"}]},{key:"promo",title:"Promotions & sign-ups",templateable:!0,sections:[{type:"Banner",label:"Banner",set:"general"},{type:"TitleWithButtons",label:"Call-to-Action Heading",set:"general"},{type:"Countdown",label:"Countdown",set:"general"}]},{key:"blog",title:"Blog & journal",templateable:!0,sections:[{type:"FeaturedCover",label:"Feature Banner",set:"general"},{type:"LongRead",label:"Article Text",set:"general"},{type:"Events",label:"Latest Posts",set:"service"}]},{key:"navigation",title:"Navigation & wayfinding",templateable:!0,sections:[{type:"Breadcrumb",label:"Breadcrumb",set:"general"},{type:"CategoryBar",label:"Category Bar",set:"general"},{type:"DocTabs",label:"Document Tabs",set:"general"}]},{key:"legal",title:"Legal & documents",templateable:!0,sections:[{type:"DocBody",label:"Document Text",set:"general"}]},{key:"contact",title:"Contact, FAQ & forms",templateable:!0,sections:[{type:"FAQ",label:"Q&A",set:"general"},{type:"ContactRouting",label:"Contact Form",set:"service"},{type:"ContactLocations",label:"Contact / Locations",set:"general"},{type:"SubmitBuild",label:"Photo Submission Form",set:"service"},{type:"ReviewForm",label:"Review Form",set:"service"},{type:"Form",label:"Form",set:"service"},{type:"AppointmentBooking",label:"Booking Form",set:"service"}]},{key:"structure",title:"Layout, structure & embeds",templateable:!1,sections:[{type:"SectionHeader",label:"Section Header",set:"general"},{type:"Flex",label:"Box",set:"general"},{type:"Divider",label:"Divider",set:"general"},{type:"CustomHTML",label:"Custom HTML",set:"general"}]},{key:"layouts",title:"Layouts",templateable:!0,sections:[{type:"Manifesto",label:"Brand Text",set:"general"},{type:"Split",label:"Image & Text Split",set:"general"},{type:"Subscribe",label:"Signup Form",set:"service"},{type:"Ticker",label:"Scrolling Bar",set:"general"},{type:"SpecStrip",label:"Spec Strip",set:"general"},{type:"TimelineTrack",label:"Milestone Timeline",set:"general"},{type:"Timeline",label:"Story Timeline",set:"general"},{type:"Logos",label:"Logos",set:"general"},{type:"DocMasthead",label:"Page Header",set:"general"}]}];function p(){return Object.fromEntries(o.map(e=>[e.key,{title:e.title,components:e.sections.map(t=>t.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}const i={Masthead:`Owner, 2026-10-10 (the page headers become ONE Layouts row): Issue Header and Document Header are one Page Header. Retired from the Add menu with no second preset (reviewer, 2026-11-06).
1
+ const h=["general","commerce","service"],o=[{key:"openers",title:"Hero & intros",defaultExpanded:!0,templateable:!0,sections:[{type:"Hero",label:"Hero",set:"general"},{type:"HeroSingle",label:"Hero Single",set:"general"},{type:"IntroBleed",label:"Scroll-Over Text",set:"general"}]},{key:"shop",title:"Shop & galleries",templateable:!0,sections:[{type:"Collections",label:"Collections",set:"commerce"},{type:"AlloyWheelsListing",label:"List",set:"commerce"},{type:"CatalogFilterBar",label:"Catalog Filter Bar",set:"commerce"},{type:"ProductGrid",label:"Product Grid",set:"commerce"},{type:"FitmentFinder",label:"Fitment Form",set:"commerce"},{type:"Gallery",label:"Tabbed Gallery",set:"commerce"},{type:"GalleryB",label:"Customer Photo Grid",set:"commerce"}]},{key:"product",title:"Product page",templateable:!0,sections:[{type:"ProductHero",label:"Product Hero",set:"commerce"},{type:"SpecTable",label:"Spec Table",set:"commerce"},{type:"ProcessSteps",label:"Image & Text Columns",set:"general"},{type:"DetailRows",label:"Feature Rows",set:"commerce"},{type:"FitmentTable",label:"Fitment Table",set:"commerce"},{type:"TyreSizes",label:"Tyre Sizes",set:"commerce"},{type:"TyreFitment",label:"Tyre Fitment Form",set:"commerce"},{type:"EuTyreLabel",label:"EU Tyre Label",set:"commerce"}]},{key:"checkout",title:"Checkout & ordering",templateable:!0,sections:[{type:"OrderSummary",label:"Order Table",set:"general"},{type:"PaymentBadges",label:"Payment Methods",set:"general"},{type:"CheckoutCTA",label:"Ready-to-Order Banner",set:"commerce"}]},{key:"about",title:"About & brand story",templateable:!0,sections:[{type:"Footprint",label:"Locations Map",set:"general"}]},{key:"content",title:"Text & content",templateable:!0,sections:[{type:"Prose",label:"Editorial Text",set:"general"},{type:"ParagraphsA",label:"Lead Text",set:"general"},{type:"Cards",label:"Cards",set:"general"}]},{key:"proof",title:"Stats & social proof",templateable:!0,sections:[{type:"Stats",label:"Stats",set:"general"},{type:"Chart",label:"Chart",set:"general"},{type:"Mockup",label:"Mockup Card",set:"general"},{type:"Reviews",label:"Reviews",set:"service"}]},{key:"promo",title:"Promotions & sign-ups",templateable:!0,sections:[{type:"Banner",label:"Banner",set:"general"},{type:"TitleWithButtons",label:"Call-to-Action Heading",set:"general"},{type:"Countdown",label:"Countdown",set:"general"}]},{key:"blog",title:"Blog & journal",templateable:!0,sections:[{type:"FeaturedCover",label:"Feature Banner",set:"general"},{type:"LongRead",label:"Article Text",set:"general"},{type:"ArticleBody",label:"Article Body",set:"service"},{type:"Events",label:"Latest Posts",set:"service"}]},{key:"navigation",title:"Navigation & wayfinding",templateable:!0,sections:[{type:"Breadcrumb",label:"Breadcrumb",set:"general"},{type:"CategoryBar",label:"Category Bar",set:"general"},{type:"DocTabs",label:"Document Tabs",set:"general"}]},{key:"legal",title:"Legal & documents",templateable:!0,sections:[{type:"DocBody",label:"Document Text",set:"general"}]},{key:"contact",title:"Contact, FAQ & forms",templateable:!0,sections:[{type:"FAQ",label:"Q&A",set:"general"},{type:"ContactRouting",label:"Contact Form",set:"service"},{type:"ContactLocations",label:"Contact / Locations",set:"general"},{type:"SubmitBuild",label:"Photo Submission Form",set:"service"},{type:"ReviewForm",label:"Review Form",set:"service"},{type:"Form",label:"Form",set:"service"},{type:"AppointmentBooking",label:"Booking Form",set:"service"}]},{key:"structure",title:"Layout, structure & embeds",templateable:!1,sections:[{type:"SectionHeader",label:"Section Header",set:"general"},{type:"Flex",label:"Box",set:"general"},{type:"Divider",label:"Divider",set:"general"},{type:"CustomHTML",label:"Custom HTML",set:"general"}]},{key:"layouts",title:"Layouts",templateable:!0,sections:[{type:"Manifesto",label:"Brand Text",set:"general"},{type:"Split",label:"Image & Text Split",set:"general"},{type:"Subscribe",label:"Signup Form",set:"service"},{type:"Ticker",label:"Scrolling Bar",set:"general"},{type:"SpecStrip",label:"Spec Strip",set:"general"},{type:"TimelineTrack",label:"Milestone Timeline",set:"general"},{type:"Timeline",label:"Story Timeline",set:"general"},{type:"Logos",label:"Logos",set:"general"},{type:"DocMasthead",label:"Page Header",set:"general"}]}];function p(){return Object.fromEntries(o.map(e=>[e.key,{title:e.title,components:e.sections.map(t=>t.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}const i={Masthead:`Owner, 2026-10-10 (the page headers become ONE Layouts row): Issue Header and Document Header are one Page Header. Retired from the Add menu with no second preset (reviewer, 2026-11-06).
2
2
 
3
3
  WHAT REPLACES IT: Page Header, a Box of Text blocks: a Header Box (the eyebrow, the title, a Details Box of one Text per line) over a Deck Box. Every Issue Header field is plain words with no data source, so the merchant makes the issue shape from Text blocks in that Box: the issue lines are Details lines, the lead is the Deck, and the "In this issue" panel is a Box of Texts beside it. Its converter row (\`section-to-box-rows-pageheader\` \`masthead\`, OFF) stays for a stored page that moves later.
4
4
 
@@ -50,4 +50,8 @@ THE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Stats with Te
50
50
 
51
51
  WHAT REPLACES IT: Product Grid, bound to the current product. Both draw every card through the grid's ONE card template (efficient-storefront-blocks, lib/content/product-card-seed).
52
52
 
53
- THE TYPE KEY STAYS AND SO DOES THE COMPONENT. A stored Related Products node is read as that grid by the host (\`relatedToGrid\`) and draws the same cards; no document is rewritten. Its footnote is the one value the grid has no home for.`},u=["Grid","Spacer"],m=Array.from(new Set([...o.flatMap(e=>e.sections.map(t=>t.type)),...Object.keys(i)])),y=Object.fromEntries(o.flatMap(e=>e.sections.map(t=>[t.type,t.label]))),l={Heading:"general",Text:"general",Eyebrow:"general",ImageBlock:"general",LogoBlock:"general",LocationMap:"general",Contents:"general",ButtonBlock:"general",CardList:"general",PostCard:"general",HeroSlide:"general",HeroGroup:"general",Integrations:"general",Grid:"general",KeyFeatures:"general",Spacer:"general",Series:"general",DocMetaCards:"general",StatsParagraph:"general",Testimonials:"general",Masthead:"general",CollectionCard:"commerce",GalleryItem:"commerce",ProductRef:"commerce",CompatibleTyres:"commerce",DeliveryOptions:"commerce",Header:"commerce",SearchBlock:"commerce",CartBlock:"commerce",CountrySwitchBlock:"commerce",AccountBlock:"commerce",ThemeSwitchBlock:"commerce",ProductGallery:"commerce",EuTyreLabelBlock:"commerce",SubmitBox:"service",BookingBox:"service",SubscribeBlogs:"service",RatingBlock:"service",Footer:"service",FooterLogo:"service",FooterMenu:"service",FooterDivider:"service",FooterGroup:"service",FooterText:"service",FooterEmailSignup:"service",FooterSocial:"service",FooterPayment:"service",MenuBlock:"service",MenuLinkBlock:"service",ArticleBody:"service",ProductPrice:"commerce",ProductSize:"commerce",ProductColour:"commerce",ProductPicture:"commerce",ProductEyebrow:"commerce",ProductName:"commerce",ProductSpecs:"commerce",ProductBuy:"commerce",FitmentPicker:"commerce",StockFitment:"commerce",RelatedProducts:"commerce",EmailFormBlock:"service",SocialLogosBlock:"service",PaymentLogosBlock:"service",LegalLineBlock:"service",SiteHeader:"service",SiteFooter:"service"},r={...l,...Object.fromEntries(o.flatMap(e=>e.sections.map(t=>[t.type,t.set])))};function b(e){return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0}function a(e){return Object.keys(r).filter(t=>r[t]===e).sort()}const g=a("general"),T=a("commerce"),w=a("service"),d="Flex",s="Box",E=`${s}es`;function c(e){return e==="section"?"Blank section":s}function S(e,t,n){return e===d?c(t):n}export{m as ALL_SECTION_TYPES,h as BLOCK_SETS,s as BOX_LABEL,E as BOX_LABEL_PLURAL,T as COMMERCE_BLOCKS,g as GENERAL_BLOCKS,d as LEVEL_NAMED_TYPE,u as RETIRED_NESTABLE_SECTIONS,i as RETIRED_SECTIONS,o as SECTION_CATALOG,y as SECTION_LABELS,w as SERVICE_BLOCKS,l as UNLISTED_BLOCK_SETS,b as blockSetOf,a as blocksInSet,p as buildBlockCategories,S as labelAtLevel,c as labelForFlex};
53
+ THE TYPE KEY STAYS AND SO DOES THE COMPONENT. A stored Related Products node is read as that grid by the host (\`relatedToGrid\`) and draws the same cards; no document is rewritten. Its footnote is the one value the grid has no home for.`,BundleOffer:`Plan section-parts bundles grid source (2026-11-07): a Product Grid that shows "Bundles with this product" IS the bundle section, so offering both asked a merchant to choose between two names for one section.
54
+
55
+ WHAT REPLACES IT: Product Grid, bound to the current product, Show set to its bundles. Both draw every kit through the grid's ONE card template (efficient-storefront-blocks, lib/content/product-card-seed).
56
+
57
+ THE TYPE KEY STAYS AND SO DOES THE DRAWING. A stored Bundle Products node is read as that grid by the host (\`bundleToGrid\`) and draws its kits; no document is rewritten.`},u=["Grid","Spacer"],m=Array.from(new Set([...o.flatMap(e=>e.sections.map(t=>t.type)),...Object.keys(i)])),y=Object.fromEntries(o.flatMap(e=>e.sections.map(t=>[t.type,t.label]))),l={Heading:"general",Text:"general",Eyebrow:"general",ImageBlock:"general",LogoBlock:"general",LocationMap:"general",Contents:"general",ButtonBlock:"general",CardList:"general",PostCard:"general",HeroSlide:"general",HeroGroup:"general",Integrations:"general",Grid:"general",KeyFeatures:"general",Spacer:"general",Series:"general",DocMetaCards:"general",StatsParagraph:"general",Testimonials:"general",Masthead:"general",CollectionCard:"commerce",GalleryItem:"commerce",ProductRef:"commerce",CompatibleTyres:"commerce",DeliveryOptions:"commerce",Header:"commerce",SearchBlock:"commerce",CartBlock:"commerce",CountrySwitchBlock:"commerce",AccountBlock:"commerce",ThemeSwitchBlock:"commerce",ProductGallery:"commerce",EuTyreLabelBlock:"commerce",SubmitBox:"service",BookingBox:"service",SubscribeBlogs:"service",RatingBlock:"service",Footer:"service",FooterLogo:"service",FooterMenu:"service",FooterDivider:"service",FooterGroup:"service",FooterText:"service",FooterEmailSignup:"service",FooterSocial:"service",FooterPayment:"service",MenuBlock:"service",MenuLinkBlock:"service",ProductPrice:"commerce",ProductSize:"commerce",ProductColour:"commerce",ProductPicture:"commerce",ProductEyebrow:"commerce",ProductName:"commerce",ProductSpecs:"commerce",ProductBuy:"commerce",FitmentPicker:"commerce",StockFitment:"commerce",RelatedProducts:"commerce",BundleOffer:"commerce",EmailFormBlock:"service",SocialLogosBlock:"service",PaymentLogosBlock:"service",LegalLineBlock:"service",SiteHeader:"service",SiteFooter:"service"},r={...l,...Object.fromEntries(o.flatMap(e=>e.sections.map(t=>[t.type,t.set])))};function b(e){return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0}function a(e){return Object.keys(r).filter(t=>r[t]===e).sort()}const g=a("general"),T=a("commerce"),w=a("service"),d="Flex",s="Box",E=`${s}es`;function c(e){return e==="section"?"Blank section":s}function S(e,t,n){return e===d?c(t):n}export{m as ALL_SECTION_TYPES,h as BLOCK_SETS,s as BOX_LABEL,E as BOX_LABEL_PLURAL,T as COMMERCE_BLOCKS,g as GENERAL_BLOCKS,d as LEVEL_NAMED_TYPE,u as RETIRED_NESTABLE_SECTIONS,i as RETIRED_SECTIONS,o as SECTION_CATALOG,y as SECTION_LABELS,w as SERVICE_BLOCKS,l as UNLISTED_BLOCK_SETS,b as blockSetOf,a as blocksInSet,p as buildBlockCategories,S as labelAtLevel,c as labelForFlex};