efficient-web-builder 54.0.0 → 55.1.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 (187) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/editor/components/BlockGapField.js +1 -1
  3. package/dist/editor/components/CornersField.js +1 -1
  4. package/dist/editor/components/SectionWidthRows.d.ts +2 -1
  5. package/dist/editor/components/SectionWidthRows.js +1 -1
  6. package/dist/editor/components/SideSpaceField.js +1 -1
  7. package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
  8. package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
  9. package/dist/editor/lib/document/blocks/general/CardList/fields.d.ts +2 -0
  10. package/dist/editor/lib/document/blocks/general/CardList/fields.js +1 -0
  11. package/dist/editor/lib/document/blocks/general/Eyebrow/fields.js +1 -1
  12. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  13. package/dist/editor/lib/document/blocks/general/Hero/fields.js +1 -1
  14. package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
  15. package/dist/editor/lib/document/blocks/general/LogoBlock/fields.js +1 -1
  16. package/dist/editor/lib/document/blocks/general/Split/fields.js +1 -1
  17. package/dist/editor/lib/document/blocks/general/Text/fields.js +1 -1
  18. package/dist/editor/lib/document/blocks/general/TitleWithButtons/fields.js +1 -1
  19. package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
  20. package/dist/editor/lib/document/blocks/general/index.js +1 -1
  21. package/dist/editor/lib/document/blocks/hero-shared-fields.d.ts +29 -2
  22. package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -1
  23. package/dist/editor/lib/document/blocks/shared-fields.d.ts +1 -5
  24. package/dist/editor/lib/document/blocks/shared-fields.js +1 -1
  25. package/dist/editor/lib/document/box-accordion-seed.d.ts +3 -0
  26. package/dist/editor/lib/document/box-accordion-seed.js +1 -0
  27. package/dist/editor/lib/document/box-fields.d.ts +11 -0
  28. package/dist/editor/lib/document/box-fields.js +1 -1
  29. package/dist/editor/lib/document/card-row-fields.js +1 -1
  30. package/dist/editor/lib/document/controls.d.ts +3 -1
  31. package/dist/editor/lib/document/controls.js +1 -1
  32. package/dist/editor/lib/document/field-groups.js +1 -1
  33. package/dist/editor/lib/document/mirror-cards-field.d.ts +1 -0
  34. package/dist/editor/lib/document/mirror-cards-field.js +1 -1
  35. package/dist/editor/lib/document/passes/inspector.js +1 -1
  36. package/dist/editor/lib/document/section-own-width-fields.d.ts +4 -0
  37. package/dist/editor/lib/document/section-own-width-fields.js +1 -0
  38. package/dist/editor/lib/document/shape-picker.d.ts +8 -0
  39. package/dist/editor/lib/document/shape-picker.js +1 -1
  40. package/dist/format/lib/content/block-align.d.ts +4 -1
  41. package/dist/format/lib/content/block-align.js +1 -1
  42. package/dist/format/lib/content/box-background.d.ts +19 -0
  43. package/dist/format/lib/content/box-background.js +1 -1
  44. package/dist/format/lib/content/box-layout.d.ts +7 -0
  45. package/dist/format/lib/content/box-layout.js +1 -1
  46. package/dist/format/lib/content/box-phone-place.d.ts +3 -3
  47. package/dist/format/lib/content/box-phone-place.js +1 -1
  48. package/dist/format/lib/content/box-separator.js +1 -1
  49. package/dist/format/lib/content/box-shadow.d.ts +4 -0
  50. package/dist/format/lib/content/box-shadow.js +1 -1
  51. package/dist/format/lib/content/box-shape.d.ts +1 -1
  52. package/dist/format/lib/content/box-shape.js +1 -1
  53. package/dist/format/lib/content/card-state.d.ts +2 -0
  54. package/dist/format/lib/content/card-state.js +1 -1
  55. package/dist/format/lib/content/card-template.d.ts +11 -2
  56. package/dist/format/lib/content/card-template.js +1 -1
  57. package/dist/format/lib/content/container-direction.d.ts +1 -1
  58. package/dist/format/lib/content/container-direction.js +1 -1
  59. package/dist/format/lib/content/gallery-card-layout.d.ts +16 -1
  60. package/dist/format/lib/content/gallery-card-layout.js +1 -1
  61. package/dist/format/lib/content/image-aspect.d.ts +2 -0
  62. package/dist/format/lib/content/image-aspect.js +1 -1
  63. package/dist/format/lib/content/page-width.d.ts +3 -0
  64. package/dist/format/lib/content/page-width.js +1 -1
  65. package/dist/format/lib/content/phone-focus.js +1 -1
  66. package/dist/format/lib/content/picture-focus-rows.js +1 -0
  67. package/dist/format/lib/content/section-height.d.ts +31 -2
  68. package/dist/format/lib/content/section-height.js +1 -1
  69. package/dist/format/lib/content/section-min-height.d.ts +2 -1
  70. package/dist/format/lib/content/section-min-height.js +1 -1
  71. package/dist/format/lib/content/section-width.d.ts +38 -1
  72. package/dist/format/lib/content/section-width.js +1 -1
  73. package/dist/format/lib/content/site-gutter.d.ts +2 -0
  74. package/dist/format/lib/content/site-gutter.js +1 -1
  75. package/dist/format/lib/content/view-overrides.d.ts +7 -0
  76. package/dist/format/lib/content/view-overrides.js +1 -0
  77. package/dist/format/lib/content/view-var-split.d.ts +11 -0
  78. package/dist/format/lib/content/view-var-split.js +1 -0
  79. package/dist/format/lib/document/blocks/general/CardList/item-seed.d.ts +4 -0
  80. package/dist/format/lib/document/blocks/general/CardList/item-seed.js +1 -0
  81. package/dist/format/lib/document/blocks/general/CardList/meta.d.ts +8 -0
  82. package/dist/format/lib/document/blocks/general/CardList/meta.js +1 -0
  83. package/dist/format/lib/document/blocks/general/Flex/meta.d.ts +4 -0
  84. package/dist/format/lib/document/blocks/general/Flex/meta.js +1 -1
  85. package/dist/format/lib/document/blocks/general/metas.d.ts +1 -0
  86. package/dist/format/lib/document/blocks/general/metas.js +1 -1
  87. package/dist/format/lib/document/general-order.d.ts +1 -1
  88. package/dist/format/lib/document/general-order.js +1 -1
  89. package/dist/format/lib/document/passes/types.d.ts +3 -0
  90. package/dist/format/lib/document/section-catalog.js +1 -1
  91. package/dist/format/lib/editor-words-catalogue.d.ts +12 -0
  92. package/dist/format/lib/editor-words-catalogue.js +5 -5
  93. package/dist/format/lib/fit-words.d.ts +8 -0
  94. package/dist/format/lib/fit-words.js +23 -12
  95. package/dist/format/lib/markup.d.ts +1 -0
  96. package/dist/format/lib/markup.js +2 -2
  97. package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
  98. package/dist/format/lib/sections/intro-bleed-layout.d.ts +1 -0
  99. package/dist/format/lib/sections/intro-bleed-layout.js +1 -1
  100. package/dist/format/lib/source-rules/padding-units-declared.d.ts +2 -0
  101. package/dist/format/lib/source-rules/padding-units-declared.js +6 -0
  102. package/dist/render/components/AccordionMark.d.ts +4 -0
  103. package/dist/render/components/AccordionMark.js +1 -0
  104. package/dist/render/components/BoxAccordionRow.d.ts +7 -0
  105. package/dist/render/components/BoxAccordionRow.js +1 -0
  106. package/dist/render/components/BoxTabPaneContext.d.ts +3 -1
  107. package/dist/render/components/BoxTabPaneContext.js +1 -1
  108. package/dist/render/components/BoxTabs.js +1 -1
  109. package/dist/render/components/ButtonBlock.d.ts +1 -0
  110. package/dist/render/components/ButtonBlock.js +1 -1
  111. package/dist/render/components/CardRowContext.d.ts +3 -2
  112. package/dist/render/components/CardRowContext.js +1 -1
  113. package/dist/render/components/Divider.js +1 -1
  114. package/dist/render/components/Eyebrow.d.ts +2 -1
  115. package/dist/render/components/Eyebrow.js +1 -1
  116. package/dist/render/components/FAQ.js +1 -1
  117. package/dist/render/components/Flex.d.ts +20 -2
  118. package/dist/render/components/Flex.js +1 -1
  119. package/dist/render/components/HeroSection.d.ts +4 -1
  120. package/dist/render/components/HeroSection.js +1 -1
  121. package/dist/render/components/HeroSingle.d.ts +4 -1
  122. package/dist/render/components/HeroSingle.js +1 -1
  123. package/dist/render/components/HeroSlide.d.ts +1 -0
  124. package/dist/render/components/HeroSlide.js +1 -1
  125. package/dist/render/components/ImageBlock.js +1 -1
  126. package/dist/render/components/IntroBleed.js +1 -1
  127. package/dist/render/components/LogoBlock.d.ts +1 -0
  128. package/dist/render/components/LogoBlock.js +1 -1
  129. package/dist/render/components/Logos.js +1 -1
  130. package/dist/render/components/ProcessSteps.d.ts +1 -0
  131. package/dist/render/components/ProcessSteps.js +1 -1
  132. package/dist/render/components/SiteGutterFrame.d.ts +18 -1
  133. package/dist/render/components/SiteGutterFrame.js +1 -1
  134. package/dist/render/components/Split.d.ts +2 -1
  135. package/dist/render/components/Split.js +1 -1
  136. package/dist/render/components/Text.d.ts +2 -1
  137. package/dist/render/components/Text.js +1 -1
  138. package/dist/render/components/TitleWithButtons.d.ts +2 -1
  139. package/dist/render/components/TitleWithButtons.js +1 -1
  140. package/dist/render/lib/content/block-size.d.ts +2 -6
  141. package/dist/render/lib/content/block-size.js +1 -1
  142. package/dist/render/lib/content/box-shared-columns.d.ts +2 -2
  143. package/dist/render/lib/content/box-shared-columns.js +1 -1
  144. package/dist/render/lib/content/box-stack-line.d.ts +15 -0
  145. package/dist/render/lib/content/box-stack-line.js +1 -0
  146. package/dist/render/lib/content/button-look.js +1 -1
  147. package/dist/render/lib/content/empty-hides.d.ts +8 -0
  148. package/dist/render/lib/content/empty-hides.js +1 -0
  149. package/dist/render/lib/content/section-edge.d.ts +1 -1
  150. package/dist/render/lib/content/section-edge.js +1 -1
  151. package/dist/render/lib/content/section-padding.d.ts +17 -3
  152. package/dist/render/lib/content/section-padding.js +1 -1
  153. package/dist/render/lib/content/view-values.d.ts +1 -7
  154. package/dist/render/lib/content/view-values.js +1 -1
  155. package/dist/render/lib/document/blocks/general/CardList/render.d.ts +2 -0
  156. package/dist/render/lib/document/blocks/general/CardList/render.js +1 -0
  157. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  158. package/dist/render/lib/document/blocks/general/Hero/render.js +1 -1
  159. package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
  160. package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
  161. package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
  162. package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
  163. package/dist/render/lib/document/blocks/general/renders.d.ts +1 -0
  164. package/dist/render/lib/document/blocks/general/renders.js +1 -1
  165. package/dist/render/lib/document/blocks/general/section-head-looks.d.ts +1 -0
  166. package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -2
  167. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  168. package/dist/render/lib/document/blocks/general/section-to-box-rows-docbody.js +2 -2
  169. package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
  170. package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
  171. package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
  172. package/dist/render/lib/document/blocks/general/section-to-box-rows-pageheader.js +1 -1
  173. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  174. package/dist/render/lib/document/head-core-boxes.d.ts +1 -0
  175. package/dist/render/lib/document/head-core-boxes.js +1 -0
  176. package/dist/render/lib/document/page-render.js +1 -1
  177. package/dist/render/lib/document/passes/block-size.js +1 -1
  178. package/dist/render/lib/document/passes/clickable-parts.js +1 -1
  179. package/dist/render/lib/document/passes/head-core.d.ts +3 -0
  180. package/dist/render/lib/document/passes/head-core.js +1 -0
  181. package/dist/render/lib/document/passes/index.js +1 -1
  182. package/dist/render/lib/document/passes/section-theme.js +1 -1
  183. package/dist/render/lib/document/passes/section-width.js +1 -1
  184. package/dist/render/lib/sections/section-to-box.js +1 -1
  185. package/package.json +5 -5
  186. package/dist/render/lib/content/picture-focus-rows.js +0 -1
  187. /package/dist/{render → format}/lib/content/picture-focus-rows.d.ts +0 -0
@@ -7,6 +7,10 @@ export declare const NESTED_BOX_PADDING: {
7
7
  export declare const BOX_ALIGN_CLASS: Record<BoxAlign, string>;
8
8
  export declare function boxLayoutClasses(justify: unknown, align: unknown): string;
9
9
  export declare function boxWrapClass(wrap: unknown): string;
10
+ export declare function boxJustifyViewClasses(justify: unknown, justifyTablet: unknown, justifyPhone: unknown): string;
11
+ export declare function boxAlignViewClasses(align: unknown, alignTablet: unknown, alignPhone: unknown): string;
12
+ export declare function boxWrapWordOf(wrap: unknown): "wrap" | "nowrap" | undefined;
13
+ export declare function boxWrapTabletClass(wrap: unknown, wrapTablet: unknown): string;
10
14
  export declare const BOX_SHARE_LABEL = "Block widths";
11
15
  export declare const BOX_SHARE_POINTS: readonly [{
12
16
  readonly label: "Fit content";
@@ -33,6 +37,8 @@ export declare const BOX_SHARE_POINTS: readonly [{
33
37
  readonly weights: readonly [2, 3];
34
38
  }];
35
39
  export type BoxShare = (typeof BOX_SHARE_POINTS)[number]["value"];
40
+ export declare const BOX_ITEMS_ATTR = "data-sf-box-items";
41
+ export declare function withoutBoxItemsHalf(text: string): string;
36
42
  export declare const BOX_SHARE_CHOICES: readonly [{
37
43
  readonly label: "Fit content";
38
44
  readonly value: "content";
@@ -110,3 +116,4 @@ export declare const BOX_BLOCK_SPACING_POINTS: readonly [{
110
116
  export type BoxBlockSpacing = (typeof BOX_BLOCK_SPACING_POINTS)[number]["value"];
111
117
  export declare const BOX_GAP_ONLY_CLASS = "sf-box-gap-only";
112
118
  export declare function boxBlockSpacingClass(spacing: unknown): string;
119
+ export declare function boxBlockSpacingViewClasses(spacing: unknown, spacingTablet: unknown, spacingPhone: unknown): string;
@@ -1 +1 @@
1
- import{isStripBox as p}from"./box-separator.js";const W={sectionPaddingTop:0,sectionPaddingBottom:0},x={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},h={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function U(e,t){const i=typeof e=="string"&&e in x?x[e]:"",n=typeof t=="string"&&t in h?h[t]:"";return[i,n].filter(Boolean).join(" ")}function q(e){return e===!0||e==="wrap"?"flex-wrap":""}const F="Block widths",f=[{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]}],G=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Custom",value:"custom",weights:[2,1]}];function j(e){return Array.isArray(e)?"custom":e==="equal"?"equal":typeof e=="string"&&e in v?"custom":"content"}const u=4,_=10;function k(e,t){if(!Number.isInteger(t)||t<2||t>u||e.length!==t-1||!e.every(a=>typeof a=="number"&&Number.isFinite(a)))return;const i=[];let n=0;return e.forEach((a,o)=>{const r=100-n-_*(t-1-o),c=Math.min(r,Math.max(_,Math.round(a)));i.push(c),n+=c}),i}function m(e,t,i){if(!Array.isArray(t))return;const n=k(t,i),a=n?[...n,100-n.reduce((r,c)=>r+c,0)]:[],o={};for(let r=0;r<u;r+=1)o[`--${e}-${r+1}`]=a[r]??1;return o}function D(e,t,i){const n=m("sf-share",e,i),a=m("sf-share-tablet",t,i);return n||a?{...n,...a}:void 0}function C(e,t){const i=Array.from({length:t},()=>1),n=f.find(r=>r.value===e);if(!n?.weights||t<1)return i;const[a,o]=n.weights;return a>1&&(i[0]=a),o>1&&(i[t-1]=o),i}function K(e,t){if(typeof e!="string"||!(e in v)||e==="equal")return e;const i=C(e,t),n=i.reduce((a,o)=>a+o,0);return i.slice(0,-1).map(a=>Math.round(a/n*100))}const s="[&>*]:min-w-0 [&>*]:flex-1 [&>*]:basis-0",v={equal:s,bigLeft:`${s} [&>*:first-child]:view-wide:grow-[2]`,bigRight:`${s} [&>*:last-child]:view-wide:grow-[2]`,biggerLeft:`${s} [&>*:first-child]:view-wide:grow-[3]`,biggerRight:`${s} [&>*:last-child]:view-wide:grow-[3]`,twoThree:`${s} [&>*:first-child]:view-wide:grow-[2] [&>*:last-child]:view-wide:grow-[3]`},L=`${s} [&>*:nth-child(1)]:view-wide:grow-[var(--sf-share-1,1)] [&>*:nth-child(2)]:view-wide:grow-[var(--sf-share-2,1)] [&>*:nth-child(3)]:view-wide:grow-[var(--sf-share-3,1)] [&>*:nth-child(4)]:view-wide:grow-[var(--sf-share-4,1)]`;function E(e){return Array.isArray(e)?L:typeof e=="string"?v[e]??"":""}const V={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(v)}]}]}]},b="view-tablet:max-view-desktop:flex-row!",l=`${b} [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-0!`,g={content:`${b} [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[content]!`,equal:l,bigLeft:`${l} [&>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]!`,bigRight:`${l} [&>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]!`,biggerLeft:`${l} [&>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]!`,biggerRight:`${l} [&>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]!`,twoThree:`${l} [&>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]! [&>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]!`},B=`${l} [&>*: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)]! [&>*: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)]!`;function N(e){return Array.isArray(e)||typeof e=="string"&&e in g?e:null}function Q(e){if(e.direction!=="row"||p(e.direction,e.separator)||e.loop==="scroll"||e.line===!0||S(e.columns)!==""||O(e.columnsTablet)!=="")return"";const t=N(e.shareTablet);return t===null?"":typeof t=="string"?g[t]:B}const T="[&>*]:view-wide:basis-[content]";function Y(e){return E(e)===""?T:""}const J="Columns",z=1,Z=3,d={2:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]: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 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},ee=f.filter(e=>e.value==="content"||e.value==="equal"),te="equal",ie=1,ne=6,w="view-wide:flex-wrap [&>*]:view-wide:min-w-0 [&>*]:view-wide:grow-0!",y={1:`${w} [&>*]:view-wide:basis-[calc(100%/1)]!`,2:`${w} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]!`,3:`${w} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]!`,4:`${w} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]!`,5:`${w} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]!`,6:`${w} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]!`};function S(e){return typeof e=="number"?y[e]??"":""}const R={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! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*: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! [&>*: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:"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! [&>*: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)]!",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! [&>*: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)]!",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! [&>*: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)]!",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! [&>*: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)]!"};function O(e){return typeof e=="number"?R[e]??"":""}function ae(e){return e.direction!=="row"||p(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":O(e.columnsTablet)}function re(e){return e.direction!=="row"||p(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":S(e.columns)}const P="max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content]",$={2:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>*]: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 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},H="max-view-wide:flex-nowrap [&>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content]";function X(e){return e===!1||e==="nowrap"}function oe(e,t,i){const n=d[Number(e)];if(!n)return"max-view-wide:flex-col";const a=X(i);return A(e,t)?a?H:P:a?$[Number(e)]:n}function se(e,t){return Number(e)in d&&!A(e,t)}function A(e,t){return Number(e)in d&&t==="content"}const le="Block spacing",we=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],I="sf-box-gap-only";function ce(e){return e==="gap"?I:""}export{h as BOX_ALIGN_CLASS,le as BOX_BLOCK_SPACING_LABEL,we as BOX_BLOCK_SPACING_POINTS,ne as BOX_COLUMNS_MAX,ie as BOX_COLUMNS_MIN,I as BOX_GAP_ONLY_CLASS,V as BOX_GIVES_PICTURES_A_HEIGHT,J as BOX_PHONE_ROW_LABEL,Z as BOX_PHONE_ROW_MAX,z as BOX_PHONE_ROW_MIN,G as BOX_SHARE_CHOICES,F as BOX_SHARE_LABEL,te as BOX_SHARE_PHONE_DEFAULT,ee as BOX_SHARE_PHONE_POINTS,f as BOX_SHARE_POINTS,W as NESTED_BOX_PADDING,ce as boxBlockSpacingClass,S as boxColumnsClass,Y as boxFitContentClass,U as boxLayoutClasses,se as boxPhoneCellsShareLine,oe as boxPhoneRowClasses,A as boxPhoneRowFits,X as boxPhoneRowOneLine,re as boxRowColumnsClass,ae as boxRowTabletColumnsClass,Q as boxRowTabletShareClass,j as boxShareChoiceOf,E as boxShareClasses,N as boxShareTabletOf,D as boxShareVars,K as boxShareWidthsOf,O as boxTabletColumnsClass,q as boxWrapClass};
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,9 +1,9 @@
1
1
  import type { SlotCell } from "efficient-easel/render";
2
- export declare const BOX_PHONE_PLACE_CLASS = "max-view-wide:[&>*]:order-[var(--sf-phone-place)]";
3
- export declare const BOX_PHONE_PLACE_TABLET_CLASS = "max-view-tablet:[&>*]:order-[var(--sf-phone-place)]";
2
+ export declare const BOX_PHONE_PLACE_CLASS = "max-view-wide:[&>*]:order-[var(--sf-phone-place)] max-view-wide:[&>[data-sf-box-items]>*]:order-[var(--sf-phone-place)]";
3
+ export declare const BOX_PHONE_PLACE_TABLET_CLASS = "max-view-tablet:[&>*]:order-[var(--sf-phone-place)] max-view-tablet:[&>[data-sf-box-items]>*]:order-[var(--sf-phone-place)]";
4
4
  export declare const BOX_PHONE_PLACE_CANVAS_CLASS = "max-view-wide:order-[var(--sf-phone-place)]";
5
5
  export declare const BOX_PHONE_PLACE_CANVAS_TABLET_CLASS = "max-view-tablet:order-[var(--sf-phone-place)]";
6
- export declare const BOX_CELL_CLASS = "contents [&>*]:grow-[inherit] [&>*]:shrink-[inherit] [&>*]:basis-[inherit] [&>*]:min-w-[inherit]";
6
+ export declare const BOX_CELL_CLASS = "contents [&>*]:grow-[inherit] [&>[data-sf-box-items]>*]:grow-[inherit] [&>*]:shrink-[inherit] [&>[data-sf-box-items]>*]:shrink-[inherit] [&>*]:basis-[inherit] [&>[data-sf-box-items]>*]:basis-[inherit] [&>*]:min-w-[inherit] [&>[data-sf-box-items]>*]:min-w-[inherit]";
7
7
  export declare function boxPhoneOrder(value: unknown, ids: readonly string[]): string[] | undefined;
8
8
  export declare function boxPhoneCell(order: readonly string[] | undefined, { tabletKeepsRow, editing }: {
9
9
  tabletKeepsRow: boolean;
@@ -1 +1 @@
1
- import{readPhoneOrderIds as s}from"efficient-easel/data";const a="max-view-wide:[&>*]:order-[var(--sf-phone-place)]",_="max-view-tablet:[&>*]:order-[var(--sf-phone-place)]",c="max-view-wide:order-[var(--sf-phone-place)]",p="max-view-tablet:order-[var(--sf-phone-place)]",A="contents [&>*]:grow-[inherit] [&>*]:shrink-[inherit] [&>*]:basis-[inherit] [&>*]:min-w-[inherit]",h="unnamed:";function d(e,r){const n=Array.isArray(e)?e.filter(t=>!(typeof t=="string"&&t.startsWith(h))):e;return s(n,r)}function f(e,{tabletKeepsRow:r,editing:n}){if(!e)return;const t=n?r?p:c:`${A} ${r?_:a}`;return i=>{const o=e.indexOf(i);return{className:t,style:{"--sf-phone-place":o<0?e.length:o}}}}export{A as BOX_CELL_CLASS,c as BOX_PHONE_PLACE_CANVAS_CLASS,p as BOX_PHONE_PLACE_CANVAS_TABLET_CLASS,a as BOX_PHONE_PLACE_CLASS,_ as BOX_PHONE_PLACE_TABLET_CLASS,f as boxPhoneCell,d as boxPhoneOrder};
1
+ import{readPhoneOrderIds as s}from"efficient-easel/data";const a="max-view-wide:[&>*]:order-[var(--sf-phone-place)] max-view-wide:[&>[data-sf-box-items]>*]:order-[var(--sf-phone-place)]",d="max-view-tablet:[&>*]:order-[var(--sf-phone-place)] max-view-tablet:[&>[data-sf-box-items]>*]:order-[var(--sf-phone-place)]",h="max-view-wide:order-[var(--sf-phone-place)]",p="max-view-tablet:order-[var(--sf-phone-place)]",x="contents [&>*]:grow-[inherit] [&>[data-sf-box-items]>*]:grow-[inherit] [&>*]:shrink-[inherit] [&>[data-sf-box-items]>*]:shrink-[inherit] [&>*]:basis-[inherit] [&>[data-sf-box-items]>*]:basis-[inherit] [&>*]:min-w-[inherit] [&>[data-sf-box-items]>*]:min-w-[inherit]",f="unnamed:";function _(e,t){const n=Array.isArray(e)?e.filter(r=>!(typeof r=="string"&&r.startsWith(f))):e;return s(n,t)}function m(e,{tabletKeepsRow:t,editing:n}){if(!e)return;const r=n?t?p:h:`${x} ${t?d:a}`;return o=>{const i=e.indexOf(o);return{className:r,style:{"--sf-phone-place":i<0?e.length:i}}}}export{x as BOX_CELL_CLASS,h as BOX_PHONE_PLACE_CANVAS_CLASS,p as BOX_PHONE_PLACE_CANVAS_TABLET_CLASS,a as BOX_PHONE_PLACE_CLASS,d as BOX_PHONE_PLACE_TABLET_CLASS,m as boxPhoneCell,_ as boxPhoneOrder};
@@ -1 +1 @@
1
- import{parseTickerSeparator as r,SEPARATOR_GLYPH as c,separatorScaleClass as f,TICKER_SEPARATOR_OPTIONS as n}from"../sections/ticker-style.js";const d=[{value:"none"},{value:"dot"},{value:"cross"},{value:"slash"},{value:"triangle"}];function o(h){return n.some(t=>t.value===h)?r(h):void 0}const a="overflow-x-clip [&>*]:shrink-0 [&>*]:max-view-wide:basis-[content] [&>*_:is(p,h1,h2,h3,h4,h5,h6)]:max-w-none [&>*_:is(.sf-button-block>div)]:font-mono [&>*_:is(.sf-button-block>div)]:text-[length:var(--size-label,14px)] [&>*_:is(.sf-button-block>div)]:tracking-[0.2em] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:inline-flex [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:items-center [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:align-top [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:h-[calc(1lh/var(--sf-sep-k,1))] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:mr-[var(--sf-gap-len,0px)] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:max-view-wide:before:mr-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-accent [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-[length:calc(var(--sf-sep-k,1)*1em)] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:content-[var(--sf-sep-mark)]";function i(h,t){return h==="row"&&o(t)!==void 0}function v(h,t){return i(h,t)?a:""}const p="[&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:inline-flex [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:items-center [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:align-top [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:h-[calc(1lh/var(--sf-sep-k,1))] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:ml-[var(--sf-gap-len,0px)] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:max-view-wide:after:ml-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:text-accent [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:text-[length:calc(var(--sf-sep-k,1)*1em)] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:content-[var(--sf-sep-mark)]";function u(h,t){return i(h,t)?p:""}function k(h,t){if(!i(h,t))return{};const s=o(t),e=/^text-\[([\d.]+)em\]$/.exec(f("small",s))?.[1],l=c[s];return{"--sf-sep-mark":l===""?"none":JSON.stringify(l),...e?{"--sf-sep-k":e}:{}}}export{d as BOX_SEPARATOR_POINTS,v as boxSeparatorClasses,o as boxSeparatorOf,u as boxSeparatorSeamClass,k as boxSeparatorStyle,i as isStripBox};
1
+ import{parseTickerSeparator as l,SEPARATOR_GLYPH as a,separatorScaleClass as r,TICKER_SEPARATOR_OPTIONS as c}from"../sections/ticker-style.js";const p=[{value:"none"},{value:"dot"},{value:"cross"},{value:"slash"},{value:"triangle"}];function f(h){return c.some(s=>s.value===h)?l(h):void 0}const n="overflow-x-clip [&>*]:shrink-0 [&>[data-sf-box-items]>*]:shrink-0 [&>*]:max-view-wide:basis-[content] [&>[data-sf-box-items]>*]:max-view-wide:basis-[content] [&>*_:is(p,h1,h2,h3,h4,h5,h6)]:max-w-none [&>[data-sf-box-items]>*_:is(p,h1,h2,h3,h4,h5,h6)]:max-w-none [&>*_:is(.sf-button-block>div)]:font-mono [&>[data-sf-box-items]>*_:is(.sf-button-block>div)]:font-mono [&>*_:is(.sf-button-block>div)]:text-[length:var(--size-label,14px)] [&>[data-sf-box-items]>*_:is(.sf-button-block>div)]:text-[length:var(--size-label,14px)] [&>*_:is(.sf-button-block>div)]:tracking-[0.2em] [&>[data-sf-box-items]>*_:is(.sf-button-block>div)]:tracking-[0.2em] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:inline-flex [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:inline-flex [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:items-center [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:items-center [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:align-top [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:align-top [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:h-[calc(1lh/var(--sf-sep-k,1))] [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:h-[calc(1lh/var(--sf-sep-k,1))] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:mr-[var(--sf-gap-len,0px)] [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:mr-[var(--sf-gap-len,0px)] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:max-view-wide:before:mr-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))] [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:max-view-wide:before:mr-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-accent [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-accent [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-[length:calc(var(--sf-sep-k,1)*1em)] [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-[length:calc(var(--sf-sep-k,1)*1em)] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:content-[var(--sf-sep-mark)] [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:content-[var(--sf-sep-mark)]";function t(h,s){return h==="row"&&f(s)!==void 0}function v(h,s){return t(h,s)?n:""}const b="[&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:inline-flex [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:items-center [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:align-top [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:h-[calc(1lh/var(--sf-sep-k,1))] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:ml-[var(--sf-gap-len,0px)] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:max-view-wide:after:ml-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:text-accent [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:text-[length:calc(var(--sf-sep-k,1)*1em)] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:content-[var(--sf-sep-mark)] [&>[data-sf-box-items]:last-child>*:not(:last-child)_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:content-none";function x(h,s){return t(h,s)?b:""}function u(h,s){if(!t(h,s))return{};const i=f(s),e=/^text-\[([\d.]+)em\]$/.exec(r("small",i))?.[1],o=a[i];return{"--sf-sep-mark":o===""?"none":JSON.stringify(o),...e?{"--sf-sep-k":e}:{}}}export{p as BOX_SEPARATOR_POINTS,v as boxSeparatorClasses,f as boxSeparatorOf,x as boxSeparatorSeamClass,u as boxSeparatorStyle,t as isStripBox};
@@ -1,3 +1,7 @@
1
1
  export declare const BOX_SHADOW_ATTR = "data-sf-box-shadow";
2
2
  export declare function boxShadowOn(value: unknown): boolean;
3
3
  export declare function boxShadowAttrs(value: unknown): Record<string, string>;
4
+ export declare const BOX_SHADOW_TABLET_ATTR = "data-sf-box-shadow-tablet";
5
+ export declare const BOX_SHADOW_PHONE_ATTR = "data-sf-box-shadow-phone";
6
+ export declare function boxShadowViewAttrs(desktop: unknown, tablet: unknown, phone: unknown): Record<string, string>;
7
+ export declare function boxShadowOnAnyView(desktop: unknown, tablet: unknown, phone: unknown): boolean;
@@ -1 +1 @@
1
- const t="data-sf-box-shadow";function r(o){return o===!0}function n(o){return r(o)?{[t]:""}:{}}export{t as BOX_SHADOW_ATTR,n as boxShadowAttrs,r as boxShadowOn};
1
+ import{viewOverrides as u}from"./view-overrides.js";const i="data-sf-box-shadow";function d(o){return o===!0}function w(o){return d(o)?{[i]:""}:{}}const b="data-sf-box-shadow-tablet",h="data-sf-box-shadow-phone",f=o=>typeof o=="boolean"?o:void 0;function s(o,e,r){const t=d(o),n=u("same",t,f(e),f(r)),a={};return n.tablet!==void 0&&n.tablet!==t&&(a.tablet=n.tablet),n.phone!==void 0&&n.phone!==t&&(a.phone=n.phone),a}function c(o,e,r){const t=s(o,e,r);return{...t.tablet===void 0?null:{[b]:t.tablet?"on":"off"},...t.phone===void 0?null:{[h]:t.phone?"on":"off"}}}function x(o,e,r){const t=s(o,e,r);return d(o)||t.tablet===!0||t.phone===!0}export{i as BOX_SHADOW_ATTR,h as BOX_SHADOW_PHONE_ATTR,b as BOX_SHADOW_TABLET_ATTR,w as boxShadowAttrs,d as boxShadowOn,x as boxShadowOnAnyView,c as boxShadowViewAttrs};
@@ -1,4 +1,4 @@
1
- export declare const BOX_SHAPES: readonly ["auto", "tall", "square", "landscape", "video", "wide", "panorama"];
1
+ export declare const BOX_SHAPES: ("square" | "video" | "poster" | "auto" | "tall" | "wide" | "landscape" | "portrait" | "panorama" | "story")[];
2
2
  export type BoxShape = (typeof BOX_SHAPES)[number];
3
3
  export declare function boxShapeOf(value: unknown): BoxShape;
4
4
  export declare function boxShapeClass(value: unknown): string;
@@ -1 +1 @@
1
- import{galleryCardRatioClass as u}from"./gallery-card-layout.js";const w=["auto","tall","square","landscape","video","wide","panorama"];function o(e){return w.includes(String(e??""))?e:"auto"}function l(e){const a=o(e);return a==="auto"?"":u(a)}const p={tall:"view-wide:aspect-[3/4]",square:"view-wide:aspect-square",landscape:"view-wide:aspect-[4/3]",video:"view-wide:aspect-[16/9]",wide:"view-wide:aspect-[2/1]",panorama:"view-wide:aspect-[21/9]"},v={auto:"max-view-wide:aspect-auto",tall:"max-view-wide:h-auto max-view-wide:aspect-[3/4]",square:"max-view-wide:h-auto max-view-wide:aspect-square",landscape:"max-view-wide:h-auto max-view-wide:aspect-[4/3]",video:"max-view-wide:h-auto max-view-wide:aspect-[16/9]",wide:"max-view-wide:h-auto max-view-wide:aspect-[2/1]",panorama:"max-view-wide:h-auto max-view-wide:aspect-[21/9]"};function d(e,a){return w.includes(String(a??""))?a===o(e)?null:a:null}const c={auto:"view-tablet:max-view-desktop:aspect-auto!",tall:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-[3/4]!",square:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-square!",landscape:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-[4/3]!",video:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-[16/9]!",wide:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-[2/1]!",panorama:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-[21/9]!"};function r(e){return w.includes(String(e??""))?e:null}function m(e,a,n){const t=r(n),i=d(e,w.includes(String(a??""))?a:t);if(i===null&&t===null)return l(e);const s=o(e);return[i===null?l(e):s==="auto"?"":p[s],i===null?"":v[i],t===null?"":c[t]].filter(Boolean).join(" ")}export{w as BOX_SHAPES,l as boxShapeClass,m as boxShapeClasses,o as boxShapeOf,d as boxShapePhoneOf,r as boxShapeTabletOf};
1
+ import{galleryCardRatioClass as d,SHAPE_TABLE as l}from"./gallery-card-layout.js";const w=l.map(e=>e.shape);function o(e){return w.includes(String(e??""))?e:"auto"}function p(e){const t=o(e);return t==="auto"?"":d(t)}const u={tall:"view-wide:aspect-[3/4]",square:"view-wide:aspect-square",landscape:"view-wide:aspect-[4/3]",video:"view-wide:aspect-[16/9]",wide:"view-wide:aspect-[2/1]",panorama:"view-wide:aspect-[21/9]",story:"view-wide:aspect-[9/16]",poster:"view-wide:aspect-[2/3]",portrait:"view-wide:aspect-[4/5]"},r={auto:"max-view-wide:aspect-auto",tall:"max-view-wide:h-auto max-view-wide:aspect-[3/4]",square:"max-view-wide:h-auto max-view-wide:aspect-square",landscape:"max-view-wide:h-auto max-view-wide:aspect-[4/3]",video:"max-view-wide:h-auto max-view-wide:aspect-[16/9]",wide:"max-view-wide:h-auto max-view-wide:aspect-[2/1]",panorama:"max-view-wide:h-auto max-view-wide:aspect-[21/9]",story:"max-view-wide:h-auto max-view-wide:aspect-[9/16]",poster:"max-view-wide:h-auto max-view-wide:aspect-[2/3]",portrait:"max-view-wide:h-auto max-view-wide:aspect-[4/5]"};function c(e,t){return w.includes(String(t??""))?t===o(e)?null:t:null}const n={auto:"view-tablet:max-view-desktop:aspect-auto!",tall:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-[3/4]!",square:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-square!",landscape:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-[4/3]!",video:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-[16/9]!",wide:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-[2/1]!",panorama:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-[21/9]!",story:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-[9/16]!",poster:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-[2/3]!",portrait:"view-tablet:max-view-desktop:h-auto! view-tablet:max-view-desktop:aspect-[4/5]!"};function x(e){return w.includes(String(e??""))?e:null}function b(e,t,v){const a=x(v),i=c(e,w.includes(String(t??""))?t:a);if(i===null&&a===null)return p(e);const s=o(e);return[i===null?p(e):s==="auto"?"":u[s],i===null?"":r[i],a===null?"":n[a]].filter(Boolean).join(" ")}export{w as BOX_SHAPES,p as boxShapeClass,b as boxShapeClasses,o as boxShapeOf,c as boxShapePhoneOf,x as boxShapeTabletOf};
@@ -3,6 +3,8 @@ type CardRowStateName = (typeof CARD_ROW_STATES)[number];
3
3
  export type CardRowState = Readonly<Partial<Record<CardRowStateName, boolean>>>;
4
4
  export declare const CARD_STATE_ATTR = "data-sf-card-state";
5
5
  export declare const CARD_STATE_LINE_CLASS = "pointer-events-none absolute inset-0 border border-accent";
6
+ export type CardStateLine = "frame" | "under";
7
+ export declare const CARD_STATE_UNDER_LINE_CLASS = "pointer-events-none absolute inset-x-0 bottom-0 border-b-2 border-accent";
6
8
  export declare function cardStateValue(state: CardRowState | undefined | null): string;
7
9
  export declare function cardStateAttrs(state: CardRowState | undefined | null): Record<string, string>;
8
10
  export {};
@@ -1 +1 @@
1
- const r=["selected","highlighted"],n="data-sf-card-state",a="pointer-events-none absolute inset-0 border border-accent";function o(t){return t?r.filter(e=>t[e]===!0).join(" "):""}function c(t){const e=o(t);return e?{[n]:e,className:"relative"}:{}}export{n as CARD_STATE_ATTR,a as CARD_STATE_LINE_CLASS,c as cardStateAttrs,o as cardStateValue};
1
+ const r=["selected","highlighted"],n="data-sf-card-state",a="pointer-events-none absolute inset-0 border border-accent",c="pointer-events-none absolute inset-x-0 bottom-0 border-b-2 border-accent";function o(e){return e?r.filter(t=>e[t]===!0).join(" "):""}function s(e){const t=o(e);return t?{[n]:t,className:"relative"}:{}}export{n as CARD_STATE_ATTR,a as CARD_STATE_LINE_CLASS,c as CARD_STATE_UNDER_LINE_CLASS,s as cardStateAttrs,o as cardStateValue};
@@ -2,6 +2,7 @@ import { type SourceRow } from "./block-sources.js";
2
2
  import type { CardCopyPlace } from "./mirror-cards.js";
3
3
  export declare const CARD_TEMPLATE_SLOT = "template";
4
4
  export declare const CARD_TEMPLATE_LABEL = "Card template";
5
+ export declare const CARD_LIST_TYPE = "CardList";
5
6
  export declare const CARD_TEMPLATE_BLOCKS: readonly ["Text", "ImageBlock", "ButtonBlock", "Flex"];
6
7
  export declare const CARD_ROW_FIELD_PROP = "rowField";
7
8
  export declare const CARD_ROW_LINK_PROP = "rowLinkField";
@@ -9,7 +10,7 @@ export declare function cardTemplateSlot(): {
9
10
  type: "slot";
10
11
  allow: string[];
11
12
  };
12
- export type CardRowFieldKind = "text" | "image" | "link";
13
+ export type CardRowFieldKind = "text" | "image" | "link" | "list";
13
14
  export interface CardRowFieldSpec {
14
15
  key: string;
15
16
  label: string;
@@ -18,6 +19,8 @@ export interface CardRowFieldSpec {
18
19
  alt?: string;
19
20
  next?: string;
20
21
  everySource?: boolean;
22
+ fields?: readonly CardRowFieldSpec[];
23
+ mark?: "accentItalic";
21
24
  }
22
25
  export interface CardTemplateSpec {
23
26
  block: string;
@@ -39,6 +42,8 @@ export declare function isCardTemplateBlock(type: string): boolean;
39
42
  export declare function cardTemplateTypedRows(type: unknown): string;
40
43
  export declare function hasCardTemplate(type: unknown): boolean;
41
44
  export declare function cardTemplateFields(type: string, kind?: CardRowFieldKind): readonly CardRowFieldSpec[];
45
+ export declare function defaultListField(type: unknown): string;
46
+ export declare function cardListShows(props: Record<string, unknown> | null | undefined, ownerType: unknown): string;
42
47
  export declare function cardTemplateFieldsOf(owner: {
43
48
  type?: unknown;
44
49
  props?: Record<string, unknown>;
@@ -54,7 +59,7 @@ export declare function rowNextPicture(item: unknown, next: string | undefined,
54
59
  export declare function rowBound(type: string, props: Record<string, unknown> | null | undefined, key: string): boolean;
55
60
  export declare function rowFieldOf(type: string, props: Record<string, unknown> | null | undefined, key: string): string;
56
61
  export declare function rowFieldText(row: SourceRow | null | undefined, key: string): string | null;
57
- export declare function rowFilledProps(type: string, props: Record<string, unknown>, row: SourceRow | null | undefined): Record<string, unknown>;
62
+ export declare function rowFilledProps(type: string, props: Record<string, unknown>, row: SourceRow | null | undefined, ownerType?: string): Record<string, unknown>;
58
63
  type DocNode = {
59
64
  type?: unknown;
60
65
  props?: Record<string, unknown>;
@@ -62,4 +67,8 @@ type DocNode = {
62
67
  export declare function cardTemplateOwner(appState: unknown, id: unknown): DocNode | null | undefined;
63
68
  export declare function cardTemplateCardOwner(appState: unknown, id: unknown): DocNode | null | undefined;
64
69
  export declare function cardCopyPlace(appState: unknown, id: unknown): CardCopyPlace | undefined;
70
+ export declare function cardListFieldsOf(appState: unknown, list: {
71
+ type?: unknown;
72
+ props?: Record<string, unknown>;
73
+ } | null | undefined, kind?: CardRowFieldKind): readonly CardRowFieldSpec[];
65
74
  export {};
@@ -1 +1 @@
1
- import{blockSourceSpec as x,declaredBlockSource as g}from"./block-sources.js";import{isNodeList as T}from"efficient-easel/data";import{BOX_TYPE as w}from"../document/container-blocks.js";import{globalRegistry as C}from"../global-registry.js";import{nonEmptyString as p}from"../non-empty-string.js";import{withCardsTemplate as B}from"../document/cards-template-on-read.js";const R="template",j="Card template",A=["Text","ImageBlock","ButtonBlock","Flex"],u="rowField",O="rowLinkField";function K(){return{type:"slot",allow:[...A]}}const h=[{block:"OrderSummary",typedRows:"rows",fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{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=>B("Cards",e)}];function i(){return C("efficient.card-templates",()=>new Map(h.map(e=>[e.block,e])))}function W(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 o of t.blocks??[]){if(typeof o?.type!="string"||!o.type)throw new Error(`The card template of ${t.block} names an empty block.`);r.some(c=>c.type===o.type)||r.push({type:o.type,label:o.label||o.type})}const n=p(t.typedRows);i().set(t.block,{block:t.block,fields:t.fields.map(o=>({...o})),blocks:r,typedRows:n,...t.seed?{seed:t.seed}:{}})}}function _(e,t){const r=e?i().get(e)?.seed:void 0;return r?r(t):t}function U(e,t){if(!(t.template===void 0||Array.isArray(t.template)&&t.template.length===0))return t;const{template:n,...o}=t,c=_(e,o);return c===o?t:c}function H(){for(const e of i().values())if(e.blocks?.length)return!0;return!1}function V(e){return i().get(e)?.blocks??[]}function X(e){for(const t of i().values())if(t.blocks?.some(r=>r.type===e))return!0;return!1}function Y(e){return typeof e=="string"&&i().get(e)?.typedRows||""}function E(e){return typeof e=="string"&&i().has(e)}function $(e,t){const r=i().get(e)?.fields??[];return t?r.filter(n=>(n.kind??"text")===t):r}function L(e,t){const r=typeof e?.type=="string"?e.type:"";if(!r)return[];const n=i().get(r)?.fields??[],o=x(g(e?.props))?.fields,c=o?.length?[...o.map(l=>({...l})),...n.filter(l=>l.everySource&&!o.some(s=>s.key===l.key))]:n;return t?c.filter(l=>(l.kind??"text")===t):c}function q(e,t,r){return e?r?L(r).find(n=>n.key===t)??null:i().get(e)?.fields.find(n=>n.key===t)??null:null}function y(e,t=u){const r=e?.[t];return typeof r=="string"?r.trim():""}function z(e,t){return e.key||String(t+1)}function G(e){const t={};if(e&&typeof e=="object"&&!Array.isArray(e))for(const[r,n]of Object.entries(e))typeof n=="string"&&(t[r]=n);return t}function J(e,t,r=""){const n=t&&e&&typeof e=="object"?e[t]:void 0;if(!Array.isArray(n))return"";for(const o of n){const c=typeof o=="string"?o:o?.src,l=p(typeof c=="string"?c.trim():void 0);if(l&&l!==r.trim())return l}return""}const m={Text:{text:u},ImageBlock:{src:u},ButtonBlock:{label:u,href:O},Breadcrumb:{currentCrumb:u}};function Q(e,t,r){return P(e,t,r)!==""}function P(e,t,r){const n=m[e]?.[r];return n?y(t,n):""}function S(e,t){return!t||!e?null:e[t]??""}function Z(e,t,r){if(!r)return t;let n=null;for(const[o,c]of Object.entries(m[e]??{})){const l=S(r,y(t,c));l!==null&&(n??={...t},n[o]=l)}return n??t}function f(e,t){const r=e?.data?.content;if(!Array.isArray(r)||typeof t!="string")return;const n=(c,l)=>{for(const s of c){if(s?.props?.id===t)return l;for(const[b,d]of Object.entries(s?.props??{})){if(!T(d))continue;const k=b===R&&E(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===w},a=n(d,k);if(a!==void 0)return a}}},o=n(r,null);return o===void 0?null:o}function ee(e,t){const r=f(e,t);return r&&r.owner}function te(e,t){const r=f(e,t);return r&&(r.direct?r.owner:null)}function re(e,t){const r=f(e,t);if(r!==void 0)return r===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:r.nested,underBox:r.underBox}}export{u as CARD_ROW_FIELD_PROP,O as CARD_ROW_LINK_PROP,A as CARD_TEMPLATE_BLOCKS,j as CARD_TEMPLATE_LABEL,R as CARD_TEMPLATE_SLOT,re as cardCopyPlace,z as cardKeyOf,G as cardRow,V as cardTemplateBlocks,te as cardTemplateCardOwner,q as cardTemplateField,$ as cardTemplateFields,L as cardTemplateFieldsOf,ee as cardTemplateOwner,K as cardTemplateSlot,Y as cardTemplateTypedRows,H as cardTemplatesNameBlocks,E as hasCardTemplate,X as isCardTemplateBlock,y as namedRowField,W as registerCardTemplates,Q as rowBound,P as rowFieldOf,S as rowFieldText,Z as rowFilledProps,J as rowNextPicture,U as templateOnInsert,_ as templateOnRead};
1
+ import{blockSourceSpec as T,declaredBlockSource as w}from"./block-sources.js";import{isNodeList as C}from"efficient-easel/data";import{BOX_TYPE as B}from"../document/container-blocks.js";import{globalRegistry as R}from"../global-registry.js";import{nonEmptyString as m}from"../non-empty-string.js";import{accentItalicRuns as A}from"../markup.js";import{withCardsTemplate as L}from"../document/cards-template-on-read.js";import{withCardListTemplate as O}from"../document/blocks/general/CardList/item-seed.js";const h="template",z="Card template",k="CardList",_=["Text","ImageBlock","ButtonBlock","Flex"],f="rowField",E="rowLinkField";function G(){return{type:"slot",allow:[..._]}}const P=[{block:"OrderSummary",typedRows:"rows",fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{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=>L("Cards",e)},{block:k,fields:[],seed:e=>O(e)}];function c(){return R("efficient.card-templates",()=>new Map(P.map(e=>[e.block,e])))}function J(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 o of t.blocks??[]){if(typeof o?.type!="string"||!o.type)throw new Error(`The card template of ${t.block} names an empty block.`);r.some(i=>i.type===o.type)||r.push({type:o.type,label:o.label||o.type})}const n=m(t.typedRows);c().set(t.block,{block:t.block,fields:t.fields.map(o=>({...o})),blocks:r,typedRows:n,...t.seed?{seed:t.seed}:{}})}}function S(e,t){const r=e?c().get(e)?.seed:void 0;return r?r(t):t}function Q(e,t){if(!(t.template===void 0||Array.isArray(t.template)&&t.template.length===0))return t;const{template:n,...o}=t,i=S(e,o);return i===o?t:i}function Z(){for(const e of c().values())if(e.blocks?.length)return!0;return!1}function ee(e){return c().get(e)?.blocks??[]}function te(e){for(const t of c().values())if(t.blocks?.some(r=>r.type===e))return!0;return!1}function re(e){return typeof e=="string"&&c().get(e)?.typedRows||""}function F(e){return typeof e=="string"&&c().has(e)}function I(e,t){const r=c().get(e)?.fields??[];return t?r.filter(n=>(n.kind??"text")===t):r}function D(e){return typeof e=="string"?I(e,"list")[0]?.key??"":""}function v(e,t){return d(e)||D(t)}function b(e,t){const r=typeof e?.type=="string"?e.type:"";if(!r)return[];const n=c().get(r)?.fields??[],o=T(w(e?.props))?.fields,i=o?.length?[...o.map(l=>({...l})),...n.filter(l=>l.everySource&&!o.some(s=>s.key===l.key))]:n;return t?i.filter(l=>(l.kind??"text")===t):i}function M(e,t,r){return e?r?b(r).find(n=>n.key===t)??null:c().get(e)?.fields.find(n=>n.key===t)??null:null}function d(e,t=f){const r=e?.[t];return typeof r=="string"?r.trim():""}function ne(e,t){return e.key||String(t+1)}function oe(e){const t={};if(e&&typeof e=="object"&&!Array.isArray(e))for(const[r,n]of Object.entries(e))typeof n=="string"&&(t[r]=n);return t}function le(e,t,r=""){const n=t&&e&&typeof e=="object"?e[t]:void 0;if(!Array.isArray(n))return"";for(const o of n){const i=typeof o=="string"?o:o?.src,l=m(typeof i=="string"?i.trim():void 0);if(l&&l!==r.trim())return l}return""}const x={Text:{text:f},ImageBlock:{src:f},ButtonBlock:{label:f,href:E},Breadcrumb:{currentCrumb:f}};function ie(e,t,r){return N(e,t,r)!==""}function N(e,t,r){const n=x[e]?.[r];return n?d(t,n):""}function j(e,t){return!t||!e?null:e[t]??""}function se(e,t,r,n){if(!r)return t;let o=null;for(const[i,l]of Object.entries(x[e]??{})){const s=d(t,l),u=j(r,s);u!==null&&(o??={...t},o[i]=n&&M(n,s)?.mark==="accentItalic"?A(u):u)}return o??t}function a(e,t){const r=e?.data?.content;if(!Array.isArray(r)||typeof t!="string")return;const n=(i,l)=>{for(const s of i){if(s?.props?.id===t)return l;for(const[u,p]of Object.entries(s?.props??{})){if(!C(p))continue;const g=u===h&&F(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===B},y=n(p,g);if(y!==void 0)return y}}},o=n(r,null);return o===void 0?null:o}function K(e,t){const r=a(e,t);return r&&r.owner}function ce(e,t){const r=a(e,t);return r&&(r.direct?r.owner:null)}function ue(e,t){const r=a(e,t);if(r!==void 0)return r===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:r.nested,underBox:r.underBox}}function fe(e,t,r){if(t?.type!==k)return[];const n=K(e,t.props?.id),o=n?v(t.props,n.type):"",i=o&&n&&b(n,"list").find(l=>l.key===o)?.fields||[];return r?i.filter(l=>(l.kind??"text")===r):i}export{k as CARD_LIST_TYPE,f as CARD_ROW_FIELD_PROP,E as CARD_ROW_LINK_PROP,_ as CARD_TEMPLATE_BLOCKS,z as CARD_TEMPLATE_LABEL,h as CARD_TEMPLATE_SLOT,ue as cardCopyPlace,ne as cardKeyOf,fe as cardListFieldsOf,v as cardListShows,oe as cardRow,ee as cardTemplateBlocks,ce as cardTemplateCardOwner,M as cardTemplateField,I as cardTemplateFields,b as cardTemplateFieldsOf,K as cardTemplateOwner,G as cardTemplateSlot,re as cardTemplateTypedRows,Z as cardTemplatesNameBlocks,D as defaultListField,F as hasCardTemplate,te as isCardTemplateBlock,d as namedRowField,J as registerCardTemplates,ie as rowBound,N as rowFieldOf,j as rowFieldText,se as rowFilledProps,le as rowNextPicture,Q as templateOnInsert,S as templateOnRead};
@@ -1,5 +1,5 @@
1
1
  export type DirectionContainer = "Flex" | "HeroGroup";
2
- export declare const CONTAINER_DIRECTIONS: readonly ["column", "row", "tabs"];
2
+ export declare const CONTAINER_DIRECTIONS: readonly ["column", "row", "tabs", "accordion"];
3
3
  export type ContainerDirection = (typeof CONTAINER_DIRECTIONS)[number];
4
4
  export declare const CONTAINER_DIRECTION_LABEL = "Direction";
5
5
  export declare const CONTAINER_DIRECTION_LABELS: Readonly<Record<ContainerDirection, string>>;
@@ -1 +1 @@
1
- const n=["column","row","tabs"],E="Direction",e={column:"Stacked",row:"One row",tabs:"Tabs"},t={Flex:n,HeroGroup:["column","row"]},c={Flex:"row",HeroGroup:"column"},I={column:"flex-col",row:"flex-row",tabs:"flex-col"};function N(r,o){return t[r].includes(o)?o:c[r]}function i(r,o){return I[N(r,o)]}function l(r){return t[r].map(o=>({label:e[o],value:o}))}export{n as CONTAINER_DIRECTIONS,c as CONTAINER_DIRECTION_BUILT_IN,I as CONTAINER_DIRECTION_CLASS,E as CONTAINER_DIRECTION_LABEL,e as CONTAINER_DIRECTION_LABELS,t as CONTAINER_DIRECTION_OFFERED,i as containerDirectionClass,l as containerDirectionPoints,N as resolveContainerDirection};
1
+ const c=["column","row","tabs","accordion"],N="Direction",t={column:"Stacked",row:"One row",tabs:"Tabs",accordion:"Accordion"},n={Flex:c,HeroGroup:["column","row"]},e={Flex:"row",HeroGroup:"column"},I={column:"flex-col",row:"flex-row",tabs:"flex-col",accordion:"flex-col"};function i(r,o){return n[r].includes(o)?o:e[r]}function l(r,o){return I[i(r,o)]}function E(r){return n[r].map(o=>({label:t[o],value:o}))}export{c as CONTAINER_DIRECTIONS,e as CONTAINER_DIRECTION_BUILT_IN,I as CONTAINER_DIRECTION_CLASS,N as CONTAINER_DIRECTION_LABEL,t as CONTAINER_DIRECTION_LABELS,n as CONTAINER_DIRECTION_OFFERED,l as containerDirectionClass,E as containerDirectionPoints,i as resolveContainerDirection};
@@ -1,5 +1,5 @@
1
1
  import { type HeroGroupPlacement } from "../hero-group-placement.js";
2
- export declare const GALLERY_CARD_RATIOS: readonly ["square", "tall", "wide", "landscape", "portrait", "video", "panorama", "auto"];
2
+ export declare const GALLERY_CARD_RATIOS: readonly ["square", "tall", "wide", "landscape", "portrait", "video", "panorama", "story", "poster", "auto"];
3
3
  export type GalleryCardRatio = (typeof GALLERY_CARD_RATIOS)[number];
4
4
  export declare const GALLERY_CARD_RATIO_DEFAULT: GalleryCardRatio;
5
5
  export declare function galleryCardRatioClass(ratio?: string): string;
@@ -14,11 +14,26 @@ export declare const SHAPE_TABLE: readonly [{
14
14
  readonly image: "auto";
15
15
  readonly ratio: null;
16
16
  readonly label: "Auto";
17
+ }, {
18
+ readonly shape: "story";
19
+ readonly image: "9/16";
20
+ readonly ratio: readonly [9, 16];
21
+ readonly label: "Story 9:16";
22
+ }, {
23
+ readonly shape: "poster";
24
+ readonly image: "2/3";
25
+ readonly ratio: readonly [2, 3];
26
+ readonly label: "Poster 2:3";
17
27
  }, {
18
28
  readonly shape: "tall";
19
29
  readonly image: "3/4";
20
30
  readonly ratio: readonly [3, 4];
21
31
  readonly label: "Tall 3:4";
32
+ }, {
33
+ readonly shape: "portrait";
34
+ readonly image: "4/5";
35
+ readonly ratio: readonly [4, 5];
36
+ readonly label: "Portrait 4:5";
22
37
  }, {
23
38
  readonly shape: "square";
24
39
  readonly image: "1/1";
@@ -1 +1 @@
1
- import{normalisePlacement as n,placementParts as o}from"../hero-group-placement.js";import{scrim as t}from"./scrim.js";const A=["square","tall","wide","landscape","portrait","video","panorama","auto"],g="square";function f(e){switch(e){case"tall":return"aspect-[3/4]";case"wide":return"aspect-[2/1]";case"landscape":return"aspect-[4/3]";case"portrait":return"aspect-[4/5]";case"video":return"aspect-[16/9]";case"panorama":return"aspect-[21/9]";case"auto":return"";default:return"aspect-square"}}const s=[{shape:"auto",image:"auto",ratio:null,label:"Auto"},{shape:"tall",image:"3/4",ratio:[3,4],label:"Tall 3:4"},{shape:"square",image:"1/1",ratio:[1,1],label:"Square 1:1"},{shape:"landscape",image:"4/3",ratio:[4,3],label:"Landscape 4:3"},{shape:"video",image:"16/9",ratio:[16,9],label:"Video 16:9"},{shape:"wide",image:"2/1",ratio:[2,1],label:"Wide 2:1"},{shape:"panorama",image:"21/9",ratio:[21,9],label:"Panorama 21:9"}];function L(e){return s.filter(a=>e.includes(a.shape))}const _=["overlay","below"];function h(e){return e==="below"}const b="bottom-left";function x(e){const{band:a,column:r}=o(n(e));return["justify-start","justify-center","justify-end"][a]+(r==="center"?" text-center":r==="end"?" text-right":"")}const i=`linear-gradient(180deg, transparent 40%, ${t(.85)} 100%)`,l=`linear-gradient(0deg, transparent 40%, ${t(.85)} 100%)`,c=t(.45);function C(e){return[l,c,i][o(n(e)).band]}export{b as GALLERY_CAPTION_ANCHOR_DEFAULT,_ as GALLERY_CAPTION_PLACES,A as GALLERY_CARD_RATIOS,g as GALLERY_CARD_RATIO_DEFAULT,s as SHAPE_TABLE,x as galleryCaptionAnchorClass,h as galleryCaptionIsBelow,C as galleryCaptionWash,f as galleryCardRatioClass,L as shapeLines};
1
+ import{normalisePlacement as o,placementParts as s}from"../hero-group-placement.js";import{scrim as t}from"./scrim.js";const g=["square","tall","wide","landscape","portrait","video","panorama","story","poster","auto"],A="square";function h(e){switch(e){case"tall":return"aspect-[3/4]";case"wide":return"aspect-[2/1]";case"landscape":return"aspect-[4/3]";case"portrait":return"aspect-[4/5]";case"video":return"aspect-[16/9]";case"panorama":return"aspect-[21/9]";case"story":return"aspect-[9/16]";case"poster":return"aspect-[2/3]";case"auto":return"";default:return"aspect-square"}}const n=[{shape:"auto",image:"auto",ratio:null,label:"Auto"},{shape:"story",image:"9/16",ratio:[9,16],label:"Story 9:16"},{shape:"poster",image:"2/3",ratio:[2,3],label:"Poster 2:3"},{shape:"tall",image:"3/4",ratio:[3,4],label:"Tall 3:4"},{shape:"portrait",image:"4/5",ratio:[4,5],label:"Portrait 4:5"},{shape:"square",image:"1/1",ratio:[1,1],label:"Square 1:1"},{shape:"landscape",image:"4/3",ratio:[4,3],label:"Landscape 4:3"},{shape:"video",image:"16/9",ratio:[16,9],label:"Video 16:9"},{shape:"wide",image:"2/1",ratio:[2,1],label:"Wide 2:1"},{shape:"panorama",image:"21/9",ratio:[21,9],label:"Panorama 21:9"}];function b(e){return n.filter(a=>e.includes(a.shape))}const f=["overlay","below"];function L(e){return e==="below"}const y="bottom-left";function _(e){const{band:a,column:r}=s(o(e));return["justify-start","justify-center","justify-end"][a]+(r==="center"?" text-center":r==="end"?" text-right":"")}const i=`linear-gradient(180deg, transparent 40%, ${t(.85)} 100%)`,l=`linear-gradient(0deg, transparent 40%, ${t(.85)} 100%)`,p=t(.45);function x(e){return[l,p,i][s(o(e)).band]}export{y as GALLERY_CAPTION_ANCHOR_DEFAULT,f as GALLERY_CAPTION_PLACES,g as GALLERY_CARD_RATIOS,A as GALLERY_CARD_RATIO_DEFAULT,n as SHAPE_TABLE,_ as galleryCaptionAnchorClass,L as galleryCaptionIsBelow,x as galleryCaptionWash,h as galleryCardRatioClass,b as shapeLines};
@@ -37,6 +37,8 @@ export declare function imageFillRowClasses(from: ImageFillFrom): {
37
37
  img: string;
38
38
  figure: string;
39
39
  };
40
+ export declare const isImageRatio: (value: unknown) => value is ImageRatio;
41
+ export declare function imageRatioAspect(value: unknown): string | null;
40
42
  export declare function imageAspectDrawn(aspect: unknown, rowGivesHeight: boolean): unknown;
41
43
  export declare function imageAspectPhoneRest(desktop: unknown): ImageRatio | undefined;
42
44
  export declare function imageAspectPhoneOf(drawn: unknown, phone: unknown): ImageRatio | null;
@@ -1 +1 @@
1
- import{BOX_GIVES_PICTURES_A_HEIGHT as p}from"./box-layout.js";import{imageIsCropped as n,parseImageFit as w}from"./image-fit.js";import{SHAPE_TABLE as m}from"./gallery-card-layout.js";const f=m.map(e=>e.image),a="fill",E={label:"Fill row",value:a,showWhen:p},r="4/3",v={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 R(e,t,i){return t&&!s(i)?"all":e??"wide"}function c(e){return v[e]}const d={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"},x={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"},_={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"},A={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!"},s=e=>f.includes(e);function F(e,t){return e===a&&!t?r:e}function h(e){return e===a?r:s(e)?e:void 0}function u(e,t){return s(t)?t===e?null:t:e===a?r:null}function g(e,t){const i=u(e,t);return n(e,"cover")||i!==null&&n(i,"cover")}function L(e,t,i){return w(e,"cover")==="cover"&&g(t,i)}function P(e,t,i,o){return e==="desktop"?L(t,i,o):w(t,"cover")!=="cover"?!1:l(e==="tablet"?i:u(i,o)??i)}const l=e=>e===a||s(e)&&e!=="auto";function S(e,t,i="wide"){return e===a&&i==="all"?c("all").frame:t===null?s(e)?d[e]:"":[e===a?c(i).frame:s(e)?x[e]:"",e===a&&i==="desktop"?A[t]:_[t]].filter(Boolean).join(" ")}export{a as FILL_ROW,E as FILL_ROW_OPTION,S as imageAspectClasses,F as imageAspectDrawn,g as imageAspectDrawsARatio,u as imageAspectPhoneOf,h as imageAspectPhoneRest,R as imageFillFrom,c as imageFillRowClasses,L as imageFocalPointActs,P as imageFocalPointActsIn};
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};
@@ -39,10 +39,13 @@ export declare const SITE_GUTTER_NARROW: {
39
39
  export declare const SITE_GUTTER_SUBSTITUTIONS: ReadonlyArray<readonly [string, string]>;
40
40
  export declare function asMainGutters(html: string): string;
41
41
  export declare const SITE_COLUMN = "mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]";
42
+ export declare const BOX_HOLDS_NO_GUTTER_CLASS = "[--sf-box-g:var(--sf-site-gutter,40px)] [&>*]:[--sf-site-gutter:0px]";
43
+ export declare function withoutBoxHoldsNoGutter(html: string): string;
42
44
  export declare const EDITORIAL_COLUMN = "mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]";
43
45
  export declare function normalizeSiteGutter(v?: number | null): number;
44
46
  export declare function siteGutterTokens(v?: number | null): Record<string, string>;
45
47
  export declare function normalizeSiteGutterPhone(v?: number | null): number | null;
48
+ export declare function normalizeSectionContentMax(v: unknown): number | null;
46
49
  export declare function siteGutterPhoneTokens(v?: number | null): Record<string, string>;
47
50
  export declare function siteGutterPhoneClass(v?: number | null): string;
48
51
  export declare function siteGutterPhoneFollows(gutter?: number | null): number;
@@ -1 +1 @@
1
- const r={min:1e3,max:2e3,step:50,default:1600};function a(t){return{maxWidth:t,marginInline:"auto",width:"100%"}}function M(t,e){if(t!==!1)return null;const i=typeof e=="number"?e:r.default;return a(i)}const m="--sf-site-width",p=`var(${m},${r.default}px)`,R=`max-w-[${p}]`,b=`max-w-[${r.default}px]`;function w(t){return typeof t!="number"||!Number.isFinite(t)?r.default:Math.round(Math.min(Math.max(t,r.min),r.max))}function g(t){const e=w(t);return e===r.default?{}:{[m]:`${e}px`}}const o={min:0,max:80,step:4,default:40},_="--sf-site-gutter",u={min:0,max:24,step:4},C="--sf-site-gutter-phone",S="max-view-tablet:[--sf-site-gutter:var(--sf-site-gutter-phone)]!",n=`var(${_},${o.default}px)`,A=`px-[${n}]`,D=["px-10","px-[60px]"],x={md:`min(24px,${n})`,sm:`min(20px,${n})`,frame:`min(24px,${n})`,tabs:`min(16px,${n})`},h=[[`max-view-desktop:px-[${x.md}]`,"max-view-desktop:px-6"],[`max-view-desktop:px-[${x.tabs}]`,"max-view-desktop:px-4"],[`max-[960px]:px-[${x.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${x.md}]`,"max-[900px]:px-6"],[`max-view-wide:px-[${x.md}]`,"max-view-wide:px-6"],[`max-view-tablet:px-[${x.sm}]`,"max-view-tablet:px-5"],[`max-view-wide:px-[${x.sm}]`,"max-view-wide:px-5"],[`max-[640px]:px-[${x.sm}]`,"max-[640px]:px-5"],[`view-wide:px-[${n}]`,"view-wide:px-10"],[`max-view-tablet:px-[min(24px,${n})]`,"max-view-tablet:px-6"],[`max-view-wide:-mx-[min(20px,${n})]`,"max-view-wide:-mx-5"],[`max-view-tablet:-mx-[min(20px,${n})]`,"max-view-tablet:-mx-5"],[`-mx-[${n}]`,"-mx-10"],[A,"px-10"]];function U(t){return h.reduce((e,[i,d])=>e.split(i).join(d),t)}const W="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]",L="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]";function c(t){return typeof t!="number"||!Number.isFinite(t)?o.default:Math.round(Math.min(Math.max(t,o.min),o.max))}function N(t){const e=c(t);return e===o.default?{}:{[_]:`${e}px`}}function f(t){return typeof t!="number"||!Number.isFinite(t)?null:Math.round(Math.min(Math.max(t,u.min),u.max))}function k(t){const e=f(t);return e===null?{}:{[C]:`${e}px`}}function V(t){return f(t)===null?"":S}function y(t){return Math.min(u.max,c(t))}function $(t=0){return`calc(${p}/2 - ${n}*2 - ${t}px)`}function B(t=0){return`max-w-[${$(t).replace(/ /g,"_")}]`}const l=p,F=`max-w-[${l}]`,z=`max-w-[min(var(--sf-page-cap,${r.default}px),${r.default}px)]`,E="--sf-hero-cap",H=`var(${E},none)`,K=`max-w-[${H}]`,I="--sf-hero-bleed-m",v="--sf-hero-bleed-w",O="--sf-hero-chrome-x",P="--sf-hero-chrome-cap";function j(t){return t===!0?{[E]:l,[I]:"auto",[v]:"100%",[O]:"24px",[P]:"none"}:{}}const s=`calc(${p} - ${n}*2)`,q=`max-w-[${s.replace(/ /g,"_")}]`,J=R;function Q(t){return t!==!1?null:a(T)}const G="--sf-chrome-cap",T=`var(${G},${s})`,X="data-page-width";function Y(t){return t==="full"?"full":null}function Z(t){return t==="full"?null:a(t==="content"?s:T)}function tt(t){if(t==="full")return"full";if(t==="content")return"content"}export{T as CHROME_CAP_READ,G as CHROME_CAP_VAR,s as CHROME_WIDTH_CAP,q as CHROME_WIDTH_CAP_CLASS,L as EDITORIAL_COLUMN,H as HERO_BACKGROUND_CAP,K as HERO_BACKGROUND_CAP_CLASS,E as HERO_BACKGROUND_VAR,I as HERO_BLEED_MARGIN_VAR,v as HERO_BLEED_WIDTH_VAR,l as HERO_CAP,F as HERO_CAP_CLASS,P as HERO_CHROME_CAP_VAR,O as HERO_CHROME_INSET_VAR,r as PAGE_WIDTH,X as PAGE_WIDTH_ATTR,J as PRE_CHROME_WIDTH_CAP_CLASS,z as PRE_HERO_CAP_CLASS,D as PRE_SITE_GUTTER_CLASSES,b as PRE_SITE_WIDTH_CAP_CLASS,W as SITE_COLUMN,o as SITE_GUTTER,n as SITE_GUTTER_CAP,A as SITE_GUTTER_CLASS,x as SITE_GUTTER_NARROW,u as SITE_GUTTER_PHONE,S as SITE_GUTTER_PHONE_CLASS,C as SITE_GUTTER_PHONE_VAR,h as SITE_GUTTER_SUBSTITUTIONS,_ as SITE_GUTTER_VAR,p as SITE_WIDTH_CAP,R as SITE_WIDTH_CAP_CLASS,m as SITE_WIDTH_VAR,U as asMainGutters,a as centredCap,Z as chromeWidthStyle,j as heroBackgroundTokens,c as normalizeSiteGutter,f as normalizeSiteGutterPhone,w as normalizeSiteWidth,Y as pageWidthMarker,M as pageWidthStyle,tt as resolveChromeWidth,V as siteGutterPhoneClass,y as siteGutterPhoneFollows,k as siteGutterPhoneTokens,N as siteGutterTokens,$ as siteHalfColumnCap,B as siteHalfColumnCapClass,Q as siteWidthCapStyle,g as siteWidthTokens};
1
+ const r={min:1e3,max:2e3,step:50,default:1600};function a(t){return{maxWidth:t,marginInline:"auto",width:"100%"}}function M(t,e){if(t!==!1)return null;const i=typeof e=="number"?e:r.default;return a(i)}const m="--sf-site-width",p=`var(${m},${r.default}px)`,w=`max-w-[${p}]`,b=`max-w-[${r.default}px]`;function c(t){return typeof t!="number"||!Number.isFinite(t)?r.default:Math.round(Math.min(Math.max(t,r.min),r.max))}function D(t){const e=c(t);return e===r.default?{}:{[m]:`${e}px`}}const x={min:0,max:80,step:4,default:40},_="--sf-site-gutter",u={min:0,max:24,step:4},C="--sf-site-gutter-phone",A="max-view-tablet:[--sf-site-gutter:var(--sf-site-gutter-phone)]!",n=`var(${_},${x.default}px)`,$=`px-[${n}]`,N=["px-10","px-[60px]"],o={md:`min(24px,${n})`,sm:`min(20px,${n})`,frame:`min(24px,${n})`,tabs:`min(16px,${n})`},h=[[`max-view-desktop:px-[${o.md}]`,"max-view-desktop:px-6"],[`max-view-desktop:px-[${o.tabs}]`,"max-view-desktop:px-4"],[`max-[960px]:px-[${o.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${o.md}]`,"max-[900px]:px-6"],[`max-view-wide:px-[${o.md}]`,"max-view-wide:px-6"],[`max-view-tablet:px-[${o.sm}]`,"max-view-tablet:px-5"],[`max-view-wide:px-[${o.sm}]`,"max-view-wide:px-5"],[`max-[640px]:px-[${o.sm}]`,"max-[640px]:px-5"],[`view-wide:px-[${n}]`,"view-wide:px-10"],[`max-view-tablet:px-[min(24px,${n})]`,"max-view-tablet:px-6"],[`max-view-wide:-mx-[min(20px,${n})]`,"max-view-wide:-mx-5"],[`max-view-tablet:-mx-[min(20px,${n})]`,"max-view-tablet:-mx-5"],[`-mx-[${n}]`,"-mx-10"],[$,"px-10"]];function U(t){return h.reduce((e,[i,S])=>e.split(i).join(S),t)}const L="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]",f="[--sf-box-g:var(--sf-site-gutter,40px)] [&>*]:[--sf-site-gutter:0px]";function W(t){const e=f.replace(/&/g,"&amp;").replace(/>/g,"&gt;");return t.split(` ${e}`).join("").split(` ${f}`).join("")}const k="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]";function l(t){return typeof t!="number"||!Number.isFinite(t)?x.default:Math.round(Math.min(Math.max(t,x.min),x.max))}function B(t){const e=l(t);return e===x.default?{}:{[_]:`${e}px`}}function E(t){return typeof t!="number"||!Number.isFinite(t)?null:Math.round(Math.min(Math.max(t,u.min),u.max))}function V(t){return typeof t=="number"&&Number.isFinite(t)?c(t):null}function y(t){const e=E(t);return e===null?{}:{[C]:`${e}px`}}function F(t){return E(t)===null?"":A}function z(t){return Math.min(u.max,l(t))}function H(t=0){return`calc(${p}/2 - ${n}*2 - ${t}px)`}function j(t=0){return`max-w-[${H(t).replace(/ /g,"_")}]`}const T=p,K=`max-w-[${T}]`,X=`max-w-[min(var(--sf-page-cap,${r.default}px),${r.default}px)]`,d="--sf-hero-cap",I=`var(${d},none)`,q=`max-w-[${I}]`,O="--sf-hero-bleed-m",P="--sf-hero-bleed-w",v="--sf-hero-chrome-x",G="--sf-hero-chrome-cap";function J(t){return t===!0?{[d]:T,[O]:"auto",[P]:"100%",[v]:"24px",[G]:"none"}:{}}const s=`calc(${p} - ${n}*2)`,Q=`max-w-[${s.replace(/ /g,"_")}]`,Y=w;function Z(t){return t!==!1?null:a(R)}const g="--sf-chrome-cap",R=`var(${g},${s})`,tt="data-page-width";function et(t){return t==="full"?"full":null}function nt(t){return t==="full"?null:a(t==="content"?s:R)}function rt(t){if(t==="full")return"full";if(t==="content")return"content"}export{f as BOX_HOLDS_NO_GUTTER_CLASS,R as CHROME_CAP_READ,g as CHROME_CAP_VAR,s as CHROME_WIDTH_CAP,Q as CHROME_WIDTH_CAP_CLASS,k as EDITORIAL_COLUMN,I as HERO_BACKGROUND_CAP,q as HERO_BACKGROUND_CAP_CLASS,d as HERO_BACKGROUND_VAR,O as HERO_BLEED_MARGIN_VAR,P as HERO_BLEED_WIDTH_VAR,T as HERO_CAP,K as HERO_CAP_CLASS,G as HERO_CHROME_CAP_VAR,v as HERO_CHROME_INSET_VAR,r as PAGE_WIDTH,tt as PAGE_WIDTH_ATTR,Y as PRE_CHROME_WIDTH_CAP_CLASS,X as PRE_HERO_CAP_CLASS,N as PRE_SITE_GUTTER_CLASSES,b as PRE_SITE_WIDTH_CAP_CLASS,L as SITE_COLUMN,x as SITE_GUTTER,n as SITE_GUTTER_CAP,$ as SITE_GUTTER_CLASS,o as SITE_GUTTER_NARROW,u as SITE_GUTTER_PHONE,A as SITE_GUTTER_PHONE_CLASS,C as SITE_GUTTER_PHONE_VAR,h as SITE_GUTTER_SUBSTITUTIONS,_ as SITE_GUTTER_VAR,p as SITE_WIDTH_CAP,w as SITE_WIDTH_CAP_CLASS,m as SITE_WIDTH_VAR,U as asMainGutters,a as centredCap,nt as chromeWidthStyle,J as heroBackgroundTokens,V as normalizeSectionContentMax,l as normalizeSiteGutter,E as normalizeSiteGutterPhone,c as normalizeSiteWidth,et as pageWidthMarker,M as pageWidthStyle,rt as resolveChromeWidth,F as siteGutterPhoneClass,z as siteGutterPhoneFollows,y as siteGutterPhoneTokens,B as siteGutterTokens,H as siteHalfColumnCap,j as siteHalfColumnCapClass,Z as siteWidthCapStyle,D as siteWidthTokens,W as withoutBoxHoldsNoGutter};
@@ -1 +1 @@
1
- import{formatFocal as c,parseFocal as r}from"efficient-shell/format";const f="sf-focus-phone",p="--sf-focus-phone",i="sf-focus-tablet",l="--sf-focus-tablet",e=t=>{if(typeof t!="string"||!/^\s*-?\d+(\.\d+)?%\s+-?\d+(\.\d+)?%\s*$/.test(t))return null;const{x:s,y:o}=r(t);return c(s,o)};function a(t,s){const o=e(s),n=e(t)??o;return{className:[o?i:"",n?f:""].filter(Boolean).join(" "),style:{...o?{[l]:o}:{},...n?{[p]:n}:{}}}}export{f as PHONE_FOCUS_CLASS,p as PHONE_FOCUS_VAR,i as TABLET_FOCUS_CLASS,l as TABLET_FOCUS_VAR,e as focusPoint,a as phoneFocus};
1
+ import{formatFocal as n,parseFocal as e}from"efficient-shell/format";import{viewVarSplit as c}from"./view-var-split.js";const p="sf-focus-phone",f="--sf-focus-phone",a="sf-focus-tablet",l="--sf-focus-tablet",s=o=>{if(typeof o!="string"||!/^\s*-?\d+(\.\d+)?%\s+-?\d+(\.\d+)?%\s*$/.test(o))return null;const{x:t,y:r}=e(o);return n(t,r)};function _(o,t){return c(S,null,s(t),s(o))}const S={tabletClass:a,tabletVar:l,phoneClass:p,phoneVar:f};export{p as PHONE_FOCUS_CLASS,f as PHONE_FOCUS_VAR,a as TABLET_FOCUS_CLASS,l as TABLET_FOCUS_VAR,s as focusPoint,_ as phoneFocus};
@@ -0,0 +1 @@
1
+ import{phoneKey as n,tabletKey as m}from"efficient-easel/screen/lib/content/view-tiers";const s=[{block:"HeroSlide",upload:"mediaImage",focus:"imageFocal"},{block:"HeroSingle",upload:"mediaImage",focus:"imageFocal"},{block:"HeroSingle",upload:"mediaImage2",focus:"imageFocal2"},{block:"ImageBlock",upload:"src",focus:"focal"}],a=e=>[e,m(e),n(e)],d=[...new Set(s.flatMap(e=>a(e.focus)))].sort();function p(e,t){const[c,l,i]=a(t).map(o=>typeof e[o]=="string"&&e[o]?e[o]:void 0);return{desktop:c,tablet:l,phone:i}}export{s as PICTURE_DOTS,d as PICTURE_FOCUS_KEYS,a as viewFocusKeys,p as viewFocusValues};
@@ -6,11 +6,40 @@ export declare const SECTION_HEIGHT: {
6
6
  readonly unit: "vh";
7
7
  };
8
8
  export declare function resolveSectionHeight(value: number | undefined): string;
9
- export declare function hasSectionHeight(...values: (number | undefined)[]): boolean;
10
- export declare function heroHeightBox({ heightDesktop, heightTablet, heightMobile }: {
9
+ export declare function hasSectionHeight(...values: unknown[]): boolean;
10
+ export declare const HERO_HEIGHT_PX: {
11
+ readonly fallback: 680;
12
+ readonly unit: "px";
13
+ readonly min: 40;
14
+ readonly max: 2000;
15
+ readonly step: 10;
16
+ };
17
+ export declare const HERO_FIXED_DEFAULT: {
18
+ readonly ratio: "16/9";
19
+ readonly px: "680px";
20
+ };
21
+ export type HeroFixedHeight = {
22
+ unit: "ratio";
23
+ value: string;
24
+ css: "auto";
25
+ aspect: string;
26
+ } | {
27
+ unit: "px";
28
+ value: string;
29
+ px: number;
30
+ css: string;
31
+ };
32
+ export declare function readHeroFixedHeight(value: unknown): HeroFixedHeight | null;
33
+ export declare function heroStoresRatio(box: {
34
+ style: Record<string, string> | undefined;
35
+ }): boolean;
36
+ export declare function heroHeightBox({ heightDesktop, heightTablet, heightMobile, heightFixed, heightFixedTablet, heightFixedMobile }: {
11
37
  heightDesktop?: number;
12
38
  heightTablet?: number;
13
39
  heightMobile?: number;
40
+ heightFixed?: string;
41
+ heightFixedTablet?: string;
42
+ heightFixedMobile?: string;
14
43
  }): {
15
44
  className: string;
16
45
  style: Record<string, string> | undefined;
@@ -1 +1 @@
1
- const a={min:40,max:100,step:5,fallback:100,unit:"vh"};function o(e){return`${typeof e=="number"?e:a.fallback}${a.unit}`}function f(...e){return e.some(t=>typeof t=="number")}function c({heightDesktop:e,heightTablet:t,heightMobile:h}){const r=f(e,h),n=typeof t=="number",s="view-tablet:max-view-desktop:h-[var(--sf-hero-h-t)]",i=r?n?`h-[var(--sf-hero-h-m)] ${s} view-desktop:h-[var(--sf-hero-h-d)]`:"h-[var(--sf-hero-h-m)] view-tablet:h-[var(--sf-hero-h-d)]":n?`h-screen min-h-[680px] ${s} view-tablet:max-view-desktop:min-h-0`:"h-screen min-h-[680px]";return!r&&!n?{className:i,style:void 0}:{className:i,style:{...r?{"--sf-hero-h-d":o(e)}:{},...n?{"--sf-hero-h-t":o(t)}:{},...r?{"--sf-hero-h-m":o(h)}:{}}}}export{a as SECTION_HEIGHT,f as hasSectionHeight,c as heroHeightBox,o as resolveSectionHeight};
1
+ import{imageRatioAspect as k}from"./image-aspect.js";import{SECTION_MIN_HEIGHT as E}from"./section-min-height.js";const d={min:40,max:100,step:5,fallback:100,unit:"vh"};function I(t){return`${typeof t=="number"?t:d.fallback}${d.unit}`}function b(...t){return t.some(e=>typeof e=="number"||u(e)!==null)}const f={...E,fallback:680,unit:"px"},S={ratio:"16/9",px:`${f.fallback}px`},_=/^(\d{1,5}(?:\.\d{1,3})?)px$/;function u(t){if(typeof t!="string")return null;const e=k(t);if(e!==null)return{unit:"ratio",value:t,css:"auto",aspect:e};const r=_.exec(t);if(r&&Number(r[1])>0){const s=Math.min(f.max,Math.max(f.min,Number(r[1])));return{unit:"px",value:`${s}px`,px:s,css:`${s}px`}}return null}function y(t){return Object.keys(t.style??{}).some(e=>e.startsWith("--sf-hero-ar-"))}function T({heightDesktop:t,heightTablet:e,heightMobile:r,heightFixed:s,heightFixedTablet:h,heightFixedMobile:m}){const i=n=>u(n)?.value,o=b(t,r,i(s),i(m)),a=b(e,i(h)),p=(n,$,w)=>{const c=u($);return c?.unit==="ratio"?{[`--sf-hero-h-${n}`]:c.css,[`--sf-hero-ar-${n}`]:c.aspect}:{[`--sf-hero-h-${n}`]:c?.css??I(w)}},x="view-tablet:max-view-desktop:h-[var(--sf-hero-h-t)]",l=o?a?`h-[var(--sf-hero-h-m)] ${x} view-desktop:h-[var(--sf-hero-h-d)]`:"h-[var(--sf-hero-h-m)] view-tablet:h-[var(--sf-hero-h-d)]":a?`h-screen min-h-[680px] ${x} view-tablet:max-view-desktop:min-h-0`:"h-screen min-h-[680px]";if(!o&&!a)return{className:l,style:void 0};const v={...o?p("d",s,t):{},...a?p("t",h,e):{},...o?p("m",m,r):{}},H=y({style:v})?o?a?" aspect-[var(--sf-hero-ar-m,auto)] view-tablet:max-view-desktop:aspect-[var(--sf-hero-ar-t,auto)] view-desktop:aspect-[var(--sf-hero-ar-d,auto)]":" aspect-[var(--sf-hero-ar-m,auto)] view-tablet:aspect-[var(--sf-hero-ar-d,auto)]":" view-tablet:max-view-desktop:aspect-[var(--sf-hero-ar-t,auto)]":"";return{className:`${l}${H}`,style:v}}export{S as HERO_FIXED_DEFAULT,f as HERO_HEIGHT_PX,d as SECTION_HEIGHT,b as hasSectionHeight,T as heroHeightBox,y as heroStoresRatio,u as readHeroFixedHeight,I as resolveSectionHeight};
@@ -1,7 +1,8 @@
1
1
  import type { CSSProperties } from "react";
2
+ import { type LengthUnit } from "efficient-easel/screen/lib/content/length-units";
2
3
  export type SectionHeightMode = "auto" | "fixed" | "screen";
3
4
  export declare const SECTION_HEIGHT_MODES: readonly SectionHeightMode[];
4
- export type SectionHeightUnit = "px" | "%";
5
+ export type SectionHeightUnit = Extract<LengthUnit, "px" | "%">;
5
6
  export declare const SECTION_HEIGHT_UNITS: readonly SectionHeightUnit[];
6
7
  export declare const VIEWPORT_UNIT: "svh";
7
8
  export declare const VIEWPORT_UNIT_FALLBACK: "vh";
@@ -1 +1 @@
1
- const N=["auto","fixed","screen"],C=["px","%"],p="svh",R="vh",b="var(--sf-header-h, 88px)",m={min:40,max:2e3,step:10,fallback:600},L={min:10,max:200,step:5,fallback:100},M="sf-section-minh",l="grid-cols-[minmax(0,1fr)]",h={base:"--sf-section-minh",small:"--sf-section-minh-s"},a=e=>typeof e=="string"&&N.includes(e),O=e=>typeof e=="string"&&C.includes(e);function r(e){const t=a(e.sectionHeightMode)?e.sectionHeightMode:"auto",i=t==="screen"?"%":O(e.sectionHeightUnit)?e.sectionHeightUnit:"px",n=t==="screen"?L.fallback:m.fallback,o=typeof e.sectionHeightValue=="number"?e.sectionHeightValue:n;return{mode:t,value:o,unit:i}}function H(e){const{mode:t,value:i,unit:n}=r(e);if(t==="auto")return;if(t==="fixed"&&n==="px")return[`${i}px`,null];const o=i/100,c=s=>t==="screen"?`(100${s} - ${b})`:`100${s}`;return[`calc(${c("vh")} * ${o})`,`calc(${c("svh")} * ${o})`]}function _(e){const t=H(e);if(!t)return;const[i,n]=t;return{display:"grid",[h.base]:i,...n?{[h.small]:n}:{}}}const $=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),v="Height",u="sf-section-minh-phone",I={base:"--sf-section-minh-p",small:"--sf-section-minh-ps"};function A(e){return a(e.sectionHeightModePhone)}function B(e){return r({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})}const T="sf-section-minh-tablet",f={base:"--sf-section-minh-t",small:"--sf-section-minh-ts"};function P(e){return a(e.sectionHeightModeTablet)}function F(e){return r({sectionHeightMode:e.sectionHeightModeTablet,sectionHeightValue:e.sectionHeightValueTablet,sectionHeightUnit:e.sectionHeightUnitTablet})}function g(e){const t=_(e),i=(E,x,d)=>H({sectionHeightMode:E,sectionHeightValue:x,sectionHeightUnit:d})??(t?["auto",null]:void 0),n=P(e)?i(e.sectionHeightModeTablet,e.sectionHeightValueTablet,e.sectionHeightUnitTablet):void 0,o=A(e)?i(e.sectionHeightModePhone,e.sectionHeightValuePhone,e.sectionHeightUnitPhone):n;if(!t&&!n&&!o)return null;const c=[M,l],s={...t??{}};return n&&(c.push(T),s[f.base]=n[0],n[1]&&(s[f.small]=n[1])),o&&(c.push(u),s[I.base]=o[0],o[1]&&(s[I.small]=o[1])),{className:c.join(" "),style:s}}function y(e){return g(e)!==null}const U=`grid ${l}`,D="h-full",V="view-tablet:max-view-desktop:grid",S="max-view-tablet:grid",G=`${S} ${l}`;function k(e){const t=g(e);if(!t)return"";if(_(e))return U;const i=t.className.split(" ");if(!i.includes(T))return G;const o=i.includes(u);return[V,o?S:"",l].filter(Boolean).join(" ")}export{b as HEADER_HEIGHT_VAR,D as SECTION_FILL_CLASS,U as SECTION_FILL_PASS_CLASS,G as SECTION_FILL_PASS_PHONE_CLASS,l as SECTION_GRID_COLUMN_CLASS,N as SECTION_HEIGHT_MODES,C as SECTION_HEIGHT_UNITS,m as SECTION_MIN_HEIGHT,M as SECTION_MIN_HEIGHT_CLASS,$ as SECTION_MIN_HEIGHT_EXCLUDED,v as SECTION_MIN_HEIGHT_GROUP_LABEL,u as SECTION_MIN_HEIGHT_PHONE_CLASS,I as SECTION_MIN_HEIGHT_PHONE_VARS,T as SECTION_MIN_HEIGHT_TABLET_CLASS,f as SECTION_MIN_HEIGHT_TABLET_VARS,h as SECTION_MIN_HEIGHT_VARS,L as SECTION_SCREEN_PCT,p as VIEWPORT_UNIT,R as VIEWPORT_UNIT_FALLBACK,A as hasPhoneHeight,P as hasTabletHeight,B as resolvePhoneHeight,r as resolveSectionMinHeight,F as resolveTabletHeight,k as sectionFillPassClass,y as sectionFillsHeight,g as sectionMinHeightAttrs,H as sectionMinHeightLengths,_ as sectionMinHeightStyle};
1
+ import{LENGTH_UNITS as N}from"efficient-easel/screen/lib/content/length-units";const m=["auto","fixed","screen"],C=N.filter(e=>e==="px"||e==="%"),b="svh",L="vh",M="var(--sf-header-h, 88px)",O={min:40,max:2e3,step:10,fallback:600},A={min:10,max:200,step:5,fallback:100},P="sf-section-minh",l="grid-cols-[minmax(0,1fr)]",h={base:"--sf-section-minh",small:"--sf-section-minh-s"},a=e=>typeof e=="string"&&m.includes(e),G=e=>typeof e=="string"&&C.includes(e);function r(e){const t=a(e.sectionHeightMode)?e.sectionHeightMode:"auto",i=t==="screen"?"%":G(e.sectionHeightUnit)?e.sectionHeightUnit:"px",n=t==="screen"?A.fallback:O.fallback,o=typeof e.sectionHeightValue=="number"?e.sectionHeightValue:n;return{mode:t,value:o,unit:i}}function H(e){const{mode:t,value:i,unit:n}=r(e);if(t==="auto")return;if(t==="fixed"&&n==="px")return[`${i}px`,null];const o=i/100,c=s=>t==="screen"?`(100${s} - ${M})`:`100${s}`;return[`calc(${c(L)} * ${o})`,`calc(${c(b)} * ${o})`]}function _(e){const t=H(e);if(!t)return;const[i,n]=t;return{display:"grid",[h.base]:i,...n?{[h.small]:n}:{}}}const y=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),B="Height",u="sf-section-minh-phone",f={base:"--sf-section-minh-p",small:"--sf-section-minh-ps"};function U(e){return a(e.sectionHeightModePhone)}function D(e){return r({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})}const I="sf-section-minh-tablet",T={base:"--sf-section-minh-t",small:"--sf-section-minh-ts"};function p(e){return a(e.sectionHeightModeTablet)}function F(e){return r({sectionHeightMode:e.sectionHeightModeTablet,sectionHeightValue:e.sectionHeightValueTablet,sectionHeightUnit:e.sectionHeightUnitTablet})}function g(e){const t=_(e),i=(E,x,d)=>H({sectionHeightMode:E,sectionHeightValue:x,sectionHeightUnit:d})??(t?["auto",null]:void 0),n=p(e)?i(e.sectionHeightModeTablet,e.sectionHeightValueTablet,e.sectionHeightUnitTablet):void 0,o=U(e)?i(e.sectionHeightModePhone,e.sectionHeightValuePhone,e.sectionHeightUnitPhone):n;if(!t&&!n&&!o)return null;const c=[P,l],s={...t??{}};return n&&(c.push(I),s[T.base]=n[0],n[1]&&(s[T.small]=n[1])),o&&(c.push(u),s[f.base]=o[0],o[1]&&(s[f.small]=o[1])),{className:c.join(" "),style:s}}function k(e){return g(e)!==null}const V=`grid ${l}`,w="h-full",R="view-tablet:max-view-desktop:grid",S="max-view-tablet:grid",$=`${S} ${l}`;function j(e){const t=g(e);if(!t)return"";if(_(e))return V;const i=t.className.split(" ");if(!i.includes(I))return $;const o=i.includes(u);return[R,o?S:"",l].filter(Boolean).join(" ")}export{M as HEADER_HEIGHT_VAR,w as SECTION_FILL_CLASS,V as SECTION_FILL_PASS_CLASS,$ as SECTION_FILL_PASS_PHONE_CLASS,l as SECTION_GRID_COLUMN_CLASS,m as SECTION_HEIGHT_MODES,C as SECTION_HEIGHT_UNITS,O as SECTION_MIN_HEIGHT,P as SECTION_MIN_HEIGHT_CLASS,y as SECTION_MIN_HEIGHT_EXCLUDED,B as SECTION_MIN_HEIGHT_GROUP_LABEL,u as SECTION_MIN_HEIGHT_PHONE_CLASS,f as SECTION_MIN_HEIGHT_PHONE_VARS,I as SECTION_MIN_HEIGHT_TABLET_CLASS,T as SECTION_MIN_HEIGHT_TABLET_VARS,h as SECTION_MIN_HEIGHT_VARS,A as SECTION_SCREEN_PCT,b as VIEWPORT_UNIT,L as VIEWPORT_UNIT_FALLBACK,U as hasPhoneHeight,p as hasTabletHeight,D as resolvePhoneHeight,r as resolveSectionMinHeight,F as resolveTabletHeight,j as sectionFillPassClass,k as sectionFillsHeight,g as sectionMinHeightAttrs,H as sectionMinHeightLengths,_ as sectionMinHeightStyle};