efficient-web-builder 59.2.0 → 60.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/dist/editor/components/SectionThumbnail.js +1 -1
  3. package/dist/editor/components/storefront-editor.css +21 -7
  4. package/dist/editor/lib/animation/fields.js +1 -1
  5. package/dist/editor/lib/animation/hover-fields.js +1 -1
  6. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  7. package/dist/editor/lib/document/blocks/general/Footprint/fields.js +1 -1
  8. package/dist/editor/lib/document/blocks/general/ListSearch/fields.js +1 -1
  9. package/dist/editor/lib/document/canvas-typing.js +1 -1
  10. package/dist/editor/lib/document/card-display-chips.d.ts +4 -2
  11. package/dist/editor/lib/document/card-display-chips.js +1 -1
  12. package/dist/editor/lib/document/card-row-fields.d.ts +3 -1
  13. package/dist/editor/lib/document/card-row-fields.js +1 -1
  14. package/dist/editor/lib/document/controls.js +1 -1
  15. package/dist/editor/lib/document/field-groups.js +1 -1
  16. package/dist/editor/lib/document/mirror-cards-field.js +1 -1
  17. package/dist/format/lib/animation/hover.d.ts +23 -1
  18. package/dist/format/lib/animation/hover.js +1 -1
  19. package/dist/format/lib/content/block-align.d.ts +3 -1
  20. package/dist/format/lib/content/block-align.js +1 -1
  21. package/dist/format/lib/content/box-background.d.ts +7 -0
  22. package/dist/format/lib/content/box-background.js +1 -1
  23. package/dist/format/lib/content/box-card-rule.d.ts +7 -0
  24. package/dist/format/lib/content/box-card-rule.js +1 -0
  25. package/dist/format/lib/content/box-layout.js +1 -1
  26. package/dist/format/lib/content/box-phone-place.d.ts +4 -4
  27. package/dist/format/lib/content/box-phone-place.js +1 -1
  28. package/dist/format/lib/content/box-shape.d.ts +1 -1
  29. package/dist/format/lib/content/box-shape.js +1 -1
  30. package/dist/format/lib/content/box-side-space.d.ts +2 -1
  31. package/dist/format/lib/content/box-side-space.js +1 -1
  32. package/dist/format/lib/content/button-icon.d.ts +3 -1
  33. package/dist/format/lib/content/button-icon.js +1 -1
  34. package/dist/format/lib/content/card-template.d.ts +9 -1
  35. package/dist/format/lib/content/card-template.js +1 -1
  36. package/dist/format/lib/content/cell-picture-sizes.js +1 -1
  37. package/dist/format/lib/content/footprint.d.ts +2 -0
  38. package/dist/format/lib/content/footprint.js +1 -1
  39. package/dist/format/lib/content/gallery-card-layout.d.ts +6 -1
  40. package/dist/format/lib/content/gallery-card-layout.js +1 -1
  41. package/dist/format/lib/content/hover-media.d.ts +30 -0
  42. package/dist/format/lib/content/hover-media.js +1 -0
  43. package/dist/format/lib/content/image-aspect.d.ts +3 -3
  44. package/dist/format/lib/content/image-aspect.js +1 -1
  45. package/dist/format/lib/content/ink.d.ts +3 -0
  46. package/dist/format/lib/content/ink.js +1 -1
  47. package/dist/format/lib/content/list-position.d.ts +3 -0
  48. package/dist/format/lib/content/list-position.js +1 -0
  49. package/dist/format/lib/content/list-query.d.ts +2 -0
  50. package/dist/format/lib/content/list-query.js +1 -1
  51. package/dist/format/lib/content/mirror-cards.d.ts +3 -0
  52. package/dist/format/lib/content/mirror-cards.js +1 -1
  53. package/dist/format/lib/content/part-display.d.ts +2 -1
  54. package/dist/format/lib/content/part-display.js +1 -1
  55. package/dist/format/lib/content/site-gutter.d.ts +2 -0
  56. package/dist/format/lib/content/site-gutter.js +1 -1
  57. package/dist/format/lib/content/view-hide-class.d.ts +5 -2
  58. package/dist/format/lib/content/view-hide-class.js +1 -1
  59. package/dist/format/lib/content/view-lines.d.ts +2 -1
  60. package/dist/format/lib/content/view-lines.js +1 -1
  61. package/dist/format/lib/document/blocks/general/Footprint/card-seed.d.ts +3 -0
  62. package/dist/format/lib/document/blocks/general/Footprint/card-seed.js +1 -1
  63. package/dist/format/lib/document/blocks/general/text-part-shapes.json +7 -0
  64. package/dist/format/lib/document/card-content-switch.js +1 -1
  65. package/dist/format/lib/document/panel-only.d.ts +2 -0
  66. package/dist/format/lib/document/panel-only.js +1 -0
  67. package/dist/format/lib/document/row-hand.js +1 -1
  68. package/dist/format/lib/document/section-catalog.d.ts +2 -1
  69. package/dist/format/lib/document/section-catalog.js +10 -10
  70. package/dist/format/lib/document/section-descriptions.js +1 -1
  71. package/dist/format/lib/document/seed-shape.d.ts +2 -0
  72. package/dist/format/lib/document/seed-shape.js +1 -0
  73. package/dist/format/lib/editor-words-catalogue.d.ts +21 -0
  74. package/dist/format/lib/editor-words-catalogue.js +4 -4
  75. package/dist/format/lib/editor-words-kept.js +1 -1
  76. package/dist/format/lib/fit-words.d.ts +1 -0
  77. package/dist/format/lib/fit-words.js +9 -8
  78. package/dist/format/lib/sized-image.js +1 -1
  79. package/dist/format/lib/source-rules/one-phone-edge.d.ts +13 -0
  80. package/dist/format/lib/source-rules/one-phone-edge.js +8 -0
  81. package/dist/format/lib/source-rules/published-mounts.d.ts +22 -0
  82. package/dist/format/lib/source-rules/published-mounts.js +58 -0
  83. package/dist/format/lib/source-rules/support/panel-select-cascade.js +1 -2
  84. package/dist/format/lib/source-rules/support/ts-program.d.ts +4 -0
  85. package/dist/format/lib/source-rules/support/ts-program.js +2 -0
  86. package/dist/format/lib/theme.d.ts +1 -0
  87. package/dist/format/lib/theme.js +3 -3
  88. package/dist/render/components/ButtonBlock.js +1 -1
  89. package/dist/render/components/CardRowContext.d.ts +5 -2
  90. package/dist/render/components/CardRowContext.js +1 -1
  91. package/dist/render/components/DealerFinder.js +1 -1
  92. package/dist/render/components/Eyebrow.js +1 -1
  93. package/dist/render/components/Flex.d.ts +2 -1
  94. package/dist/render/components/Flex.js +1 -1
  95. package/dist/render/components/Footprint.js +1 -1
  96. package/dist/render/components/HeroArrows.d.ts +6 -3
  97. package/dist/render/components/HeroArrows.js +1 -1
  98. package/dist/render/components/HeroPictures.js +1 -1
  99. package/dist/render/components/HoverMediaLayer.d.ts +9 -0
  100. package/dist/render/components/HoverMediaLayer.js +1 -0
  101. package/dist/render/components/InBoxContext.d.ts +3 -0
  102. package/dist/render/components/InBoxContext.js +1 -1
  103. package/dist/render/components/ListSearchBox.d.ts +2 -1
  104. package/dist/render/components/ListSearchBox.js +1 -1
  105. package/dist/render/components/LogoBlock.js +1 -1
  106. package/dist/render/components/Logos.js +1 -1
  107. package/dist/render/components/PublishedPartStylesContext.d.ts +2 -1
  108. package/dist/render/components/PublishedPartStylesContext.js +1 -1
  109. package/dist/render/components/SectionAnimation.d.ts +4 -2
  110. package/dist/render/components/SectionAnimation.js +1 -1
  111. package/dist/render/components/SideListLayout.d.ts +14 -0
  112. package/dist/render/components/SideListLayout.js +1 -0
  113. package/dist/render/components/Split.js +1 -1
  114. package/dist/render/components/Text.js +1 -1
  115. package/dist/render/components/TitleWithButtons.js +1 -1
  116. package/dist/render/components/ViewHideRoot.d.ts +7 -1
  117. package/dist/render/components/ViewHideRoot.js +1 -1
  118. package/dist/render/lib/content/block-size.d.ts +4 -1
  119. package/dist/render/lib/content/block-size.js +1 -1
  120. package/dist/render/lib/content/box-cell-bound.js +1 -1
  121. package/dist/render/lib/content/box-shared-columns.js +1 -1
  122. package/dist/render/lib/content/box-stack-line.d.ts +1 -0
  123. package/dist/render/lib/content/box-stack-line.js +1 -1
  124. package/dist/render/lib/content/view-values.d.ts +2 -0
  125. package/dist/render/lib/content/view-values.js +1 -1
  126. package/dist/render/lib/dealer-source.d.ts +3 -2
  127. package/dist/render/lib/dealer-source.js +1 -1
  128. package/dist/render/lib/document/blocks/general/CardList/render.js +1 -1
  129. package/dist/render/lib/document/blocks/general/Cards/render.js +1 -1
  130. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  131. package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
  132. package/dist/render/lib/document/blocks/general/ListSearch/render.js +1 -1
  133. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +1 -0
  134. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  135. package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -1
  136. package/dist/render/lib/document/blocks/general/section-to-box-rows-forms.js +1 -1
  137. package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
  138. package/dist/render/lib/document/blocks/general/section-to-box-rows-proof.js +1 -1
  139. package/dist/render/lib/document/page-render.js +1 -1
  140. package/dist/render/lib/document/part-styles.d.ts +3 -1
  141. package/dist/render/lib/document/part-styles.js +2 -2
  142. package/dist/render/lib/document/passes/block-size.js +1 -1
  143. package/dist/render/lib/document/passes/clickable-parts.js +1 -1
  144. package/dist/render/lib/document/passes/hidden-nodes.js +1 -1
  145. package/dist/render/lib/document/passes/section-animation.js +1 -1
  146. package/dist/render/lib/document/passes/section-width.js +1 -1
  147. package/dist/render/lib/document/published-passes.d.ts +13 -0
  148. package/dist/render/lib/document/published-passes.js +1 -0
  149. package/dist/render/lib/document/text-parts.d.ts +1 -0
  150. package/dist/render/lib/document/text-parts.js +1 -1
  151. package/dist/render/lib/sections/section-to-box.d.ts +4 -0
  152. package/dist/render/lib/sections/section-to-box.js +1 -1
  153. package/package.json +1 -1
@@ -1 +1 @@
1
- import{HOVER_MOTION as m,hoverKindsOf as a,motionSeconds as c}from"efficient-shell/format";import{ANGLE_RANGE as v}from"../content/box-angle.js";import{finiteNumber as l}from"../finite-number.js";const i="hover",b="_gHover",h={none:"None",nextImage:"Show next image",rotate:"Rotate",zoom:"Zoom",lift:"Lift",mono:"Black and white"},u="highlight",g="Highlight",M=["none",u],U={none:h.none,[u]:g};function I(n){return n[i]===u?u:"none"}const X="transition-colors hover:bg-[var(--sf-hl-bg)]! hover:[--fg:var(--sf-hl-ink)] active:bg-[var(--sf-hl-bg)]! active:[--fg:var(--sf-hl-ink)]";function Y(n,e){return I(n)!==u?null:{"--sf-hl-bg":e("surface"),"--sf-hl-ink":e("main")}}const S=a(["none","lift"]);function z(n){const e=n[i];return S.includes(e)?e:"none"}const _=a(["none","rotate"]),r={kind:i,angle:"hoverAngle",duration:"hoverDuration",delay:"hoverDelay"},f="spinOnHover",x=v,R={ProductGrid:"rotate",RelatedProducts:"rotate",AlloyWheelsListing:"none"},Z=Object.keys(R);function N(n){return R[n]??"none"}const k=m.rotateFallbackDeg;function V(n,e){const t=n[r.kind];if(_.includes(t))return t;const o=n[f];return typeof o=="boolean"?o?"rotate":"none":e}function D(n){const e=l(n);return e===void 0?k:Math.min(x.max,Math.max(x.min,e))}function w(n,e){const t=N(e),o=V(n,t);return{kind:o,angle:o==="rotate"?D(n[r.angle]):null,duration:c("hover","duration",o==="rotate"?n[r.duration]:void 0),delay:c("hover","delay",o==="rotate"?n[r.delay]:void 0)}}function j(n){const e={field:r.kind,in:[..._]};return{any:[{field:r.kind,is:"rotate"},{all:[{not:e},n==="rotate"?{not:{field:f,is:!1}}:{field:f,is:!0}]}]}}const O=a(["none","mono"]),C=a(["none","nextImage","mono"]),H={ImageBlock:"none",Manifesto:"none",Split:"none",ContactLocations:"mono"},F=Object.keys(H);function L(n){return H[n]??"none"}const E={zoom:"hoverZoom",darken:"hoverDarken"},d={min:100,max:150,step:1,unit:"%"},s=["nextImage"];function T(n,e){if(!s.includes(e))return null;const t=l(n[E.zoom]);if(t===void 0)return null;const o=Math.min(d.max,Math.max(d.min,t));return o===d.min?null:String(o/100)}function A(n,e){if(!s.includes(e))return null;const t=l(n[E.darken]);return t!==void 0&&t>0?t:null}const K=["ImageBlock"];function G(n,e,t=O){const o=n[i];return t.includes(o)?o:e}function W(n,e=""){const t=K.includes(e)?C:O,o=G(n,L(e),t),p=o!=="none";return{kind:o,duration:c("hover","duration",p?n[r.duration]:void 0),delay:c("hover","delay",p?n[r.delay]:void 0),...s.includes(o)?{zoom:T(n,o),darken:A(n,o)}:{}}}function q(){return{field:i,in:[...s]}}function J(n){return n==="none"?{field:i,in:["mono","nextImage"]}:{not:{field:i,is:"none"}}}export{u as BOX_HIGHLIGHT,X as BOX_HIGHLIGHT_CLASS,M as BOX_HOVER_KINDS,U as BOX_HOVER_LABELS,x as CARD_HOVER_ANGLE,r as CARD_HOVER_KEYS,_ as CARD_HOVER_KINDS,Z as CARD_HOVER_SECTIONS,k as CARD_HOVER_TURN,g as HIGHLIGHT_LABEL,b as HOVER_GROUP_KEY,i as HOVER_KEY,h as HOVER_KIND_LABELS,K as NEXT_PICTURE_BLOCKS,C as NEXT_PICTURE_HOVER_KINDS,f as OLD_SPIN_KEY,S as PART_HOVER_KINDS,F as PICTURE_HOVER_BLOCKS,E as PICTURE_HOVER_KEYS,O as PICTURE_HOVER_KINDS,d as PICTURE_HOVER_ZOOM,Y as boxHighlightStyle,I as boxHoverOf,D as cardHoverAngleOf,V as cardHoverKindOf,w as cardHoverOf,N as cardHoverResting,j as cardRotatesRule,z as hoverOf,G as pictureHoverKindOf,q as pictureHoverMovesRule,W as pictureHoverOf,L as pictureHoverResting,J as pictureHoverRunsRule,T as pictureHoverZoomOf};
1
+ import{HOVER_MOTION as m,hoverKindsOf as c,motionSeconds as a}from"efficient-shell/format";import{ANGLE_RANGE as I}from"../content/box-angle.js";import{finiteNumber as l}from"../finite-number.js";const i="hover",z="_gHover",g={none:"None",nextImage:"Show next image",rotate:"Rotate",zoom:"Zoom",lift:"Lift",mono:"Black and white"},s="highlight",S="Highlight",Z=["none",s],F={none:g.none,[s]:S};function A(e){return e[i]===s?s:"none"}const W="transition-colors hover:bg-[var(--sf-hl-bg)]! hover:[--fg:var(--sf-hl-ink)] active:bg-[var(--sf-hl-bg)]! active:[--fg:var(--sf-hl-ink)]",j="hover:[--fg:var(--sf-hl-ink)]! hover:[--fg-dim:inherit]! hover:[--site-line:inherit]! hover:[color:inherit]! active:[--fg:var(--sf-hl-ink)]! active:[--fg-dim:inherit]! active:[--site-line:inherit]! active:[color:inherit]!";function q(e,n){return A(e)!==s?null:{"--sf-hl-bg":n("surface"),"--sf-hl-ink":n("main")}}const V=c(["none","lift"]);function J(e){const n=e[i];return V.includes(n)?n:"none"}const E=c(["none","nextImage","rotate"]),r={kind:i,angle:"hoverAngle",duration:"hoverDuration",delay:"hoverDelay",mediaKind:"hoverKind",mediaGroup:"hoverGroup",cover:"hoverCover"},f="spinOnHover",O=I,R={ProductGrid:"rotate",RelatedProducts:"rotate",AlloyWheelsListing:"none"},Q=Object.keys(R);function D(e){return R[e]??"none"}const L=m.rotateFallbackDeg,k=["photos","lifestyle","renderings","accessories","others"],$={photos:"Product photos",lifestyle:"Lifestyle photos",renderings:"Renderings",accessories:"Accessories",others:"Others"},N=["finish","first"],ee={finish:"Same finish",first:"First group"},C=["card","picture"],ne={card:"Whole card",picture:"Picture"},d={kind:"photos",group:"finish",cover:"card"},p=(e,n,t)=>e.includes(n)?n:t;function K(e){return{kind:p(k,e[r.mediaKind],d.kind),group:p(N,e[r.mediaGroup],d.group),cover:p(C,e[r.cover],d.cover)}}function oe(){return{field:r.kind,is:"nextImage"}}function G(e,n){const t=e[r.kind];if(E.includes(t))return t;const o=e[f];return typeof o=="boolean"?o?"rotate":"none":n}function T(e){const n=l(e);return n===void 0?L:Math.min(O.max,Math.max(O.min,n))}function te(e,n){const t=D(n),o=G(e,t);return{kind:o,angle:o==="rotate"?T(e[r.angle]):null,duration:a("hover","duration",o==="rotate"?e[r.duration]:void 0),delay:a("hover","delay",o==="rotate"?e[r.delay]:void 0),...o==="nextImage"?{media:K(e)}:{}}}function re(e){const n={field:r.kind,in:[...E]};return{any:[{field:r.kind,is:"rotate"},{all:[{not:n},e==="rotate"?{not:{field:f,is:!1}}:{field:f,is:!0}]}]}}const x=c(["none","mono"]),M=c(["none","nextImage","mono"]),v={ImageBlock:"none",Manifesto:"none",Split:"none",ContactLocations:"mono"},ie=Object.keys(v);function y(e){return v[e]??"none"}const H={zoom:"hoverZoom",darken:"hoverDarken"},_={min:100,max:150,step:1,unit:"%"},u=["nextImage"];function B(e,n){if(!u.includes(n))return null;const t=l(e[H.zoom]);if(t===void 0)return null;const o=Math.min(_.max,Math.max(_.min,t));return o===_.min?null:String(o/100)}function P(e,n){if(!u.includes(n))return null;const t=l(e[H.darken]);return t!==void 0&&t>0?t:null}const U=["ImageBlock"];function b(e,n,t=x){const o=e[i];return t.includes(o)?o:n}function se(e,n=""){const t=U.includes(n)?M:x,o=b(e,y(n),t),h=o!=="none";return{kind:o,duration:a("hover","duration",h?e[r.duration]:void 0),delay:a("hover","delay",h?e[r.delay]:void 0),...u.includes(o)?{zoom:B(e,o),darken:P(e,o)}:{}}}function ce(){return{field:i,in:[...u]}}function ae(e){return e==="none"?{field:i,in:["mono","nextImage"]}:{not:{field:i,is:"none"}}}export{s as BOX_HIGHLIGHT,W as BOX_HIGHLIGHT_CLASS,j as BOX_HIGHLIGHT_OVER_ROW_INK_CLASS,Z as BOX_HOVER_KINDS,F as BOX_HOVER_LABELS,O as CARD_HOVER_ANGLE,r as CARD_HOVER_KEYS,E as CARD_HOVER_KINDS,Q as CARD_HOVER_SECTIONS,L as CARD_HOVER_TURN,S as HIGHLIGHT_LABEL,z as HOVER_GROUP_KEY,i as HOVER_KEY,g as HOVER_KIND_LABELS,C as HOVER_MEDIA_COVERS,ne as HOVER_MEDIA_COVER_LABELS,d as HOVER_MEDIA_DEFAULTS,N as HOVER_MEDIA_GROUPS,ee as HOVER_MEDIA_GROUP_LABELS,k as HOVER_MEDIA_KINDS,$ as HOVER_MEDIA_KIND_LABELS,U as NEXT_PICTURE_BLOCKS,M as NEXT_PICTURE_HOVER_KINDS,f as OLD_SPIN_KEY,V as PART_HOVER_KINDS,ie as PICTURE_HOVER_BLOCKS,H as PICTURE_HOVER_KEYS,x as PICTURE_HOVER_KINDS,_ as PICTURE_HOVER_ZOOM,q as boxHighlightStyle,A as boxHoverOf,T as cardHoverAngleOf,G as cardHoverKindOf,K as cardHoverMediaOf,te as cardHoverOf,D as cardHoverResting,re as cardRotatesRule,oe as cardShowsNextRule,J as hoverOf,b as pictureHoverKindOf,ce as pictureHoverMovesRule,se as pictureHoverOf,y as pictureHoverResting,ae as pictureHoverRunsRule,B as pictureHoverZoomOf};
@@ -5,4 +5,6 @@ export type AlignKind = "text" | "place" | "justify" | "items";
5
5
  export declare function blockAlignOf(value: unknown): BlockAlign | undefined;
6
6
  export declare function legacyBlockAlignOf(value: unknown): BlockAlign | undefined;
7
7
  export declare function alignViewAnswers(desktop: unknown, tablet: unknown, phone: unknown): ViewOverrides<BlockAlign>;
8
- export declare function alignViewClasses(kind: AlignKind, desktop: unknown, tablet: unknown, phone: unknown): string;
8
+ export declare function alignViewClasses(kind: AlignKind, desktop: unknown, tablet: unknown, phone: unknown, { atSectionLine }?: {
9
+ readonly atSectionLine?: boolean;
10
+ }): string;
@@ -1 +1 @@
1
- import{viewOverrides as n}from"./view-overrides.js";const f={left:"justify-start",center:"justify-center",right:"justify-end"},o={text:{left:"view-tablet:max-view-desktop:text-left",center:"view-tablet:max-view-desktop:text-center",right:"view-tablet:max-view-desktop:text-right"},place:{left:"view-tablet:max-view-desktop:mx-0",center:"view-tablet:max-view-desktop:mx-auto",right:"view-tablet:max-view-desktop:ml-auto view-tablet:max-view-desktop:mr-0"},items:{left:"view-tablet:max-view-desktop:grid-cols-1 view-tablet:max-view-desktop:justify-items-start",center:"view-tablet:max-view-desktop:grid-cols-1 view-tablet:max-view-desktop:justify-items-center",right:"view-tablet:max-view-desktop:justify-items-end"},justify:{left:"view-tablet:max-view-desktop:justify-start",center:"view-tablet:max-view-desktop:justify-center",right:"view-tablet:max-view-desktop:justify-end"}},w={text:{left:"max-view-tablet:text-left",center:"max-view-tablet:text-center",right:"max-view-tablet:text-right"},place:{left:"max-view-tablet:mx-0",center:"max-view-tablet:mx-auto",right:"max-view-tablet:ml-auto max-view-tablet:mr-0"},items:{left:"max-view-tablet:grid-cols-1 max-view-tablet:justify-items-start",center:"max-view-tablet:grid-cols-1 max-view-tablet:justify-items-center",right:"max-view-tablet:justify-items-end"},justify:{left:"max-view-tablet:justify-start",center:"max-view-tablet:justify-center",right:"max-view-tablet:justify-end"}};function a(t){return t==="left"||t==="center"||t==="right"?t:void 0}function v(t){return t==="start"?"left":t==="end"?"right":a(t)}function m(t,r,s){const i=a(t)??"left",e=n("same",i,a(r),a(s)),l={};return e.tablet&&e.tablet!==i&&(l.tablet=e.tablet),e.phone&&e.phone!==i&&(l.phone=e.phone),l}function b(t,r,s,i){const e=m(r,s,i);return[e.tablet?o[t][e.tablet]:"",e.phone?w[t][e.phone]:""].filter(Boolean).join(" ")}export{f as BLOCK_ALIGN_JUSTIFY,m as alignViewAnswers,b as alignViewClasses,a as blockAlignOf,v as legacyBlockAlignOf};
1
+ import{viewOverrides as v}from"./view-overrides.js";const p={left:"justify-start",center:"justify-center",right:"justify-end"},o={text:{left:"view-wide:max-view-desktop:text-left",center:"view-wide:max-view-desktop:text-center",right:"view-wide:max-view-desktop:text-right"},place:{left:"view-wide:max-view-desktop:mx-0",center:"view-wide:max-view-desktop:mx-auto",right:"view-wide:max-view-desktop:ml-auto view-wide:max-view-desktop:mr-0"},items:{left:"view-wide:max-view-desktop:grid-cols-1 view-wide:max-view-desktop:justify-items-start",center:"view-wide:max-view-desktop:grid-cols-1 view-wide:max-view-desktop:justify-items-center",right:"view-wide:max-view-desktop:justify-items-end"},justify:{left:"view-wide:max-view-desktop:justify-start",center:"view-wide:max-view-desktop:justify-center",right:"view-wide:max-view-desktop:justify-end"}},n={text:{left:"max-view-wide:text-left",center:"max-view-wide:text-center",right:"max-view-wide:text-right"},place:{left:"max-view-wide:mx-0",center:"max-view-wide:mx-auto",right:"max-view-wide:ml-auto max-view-wide:mr-0"},items:{left:"max-view-wide:grid-cols-1 max-view-wide:justify-items-start",center:"max-view-wide:grid-cols-1 max-view-wide:justify-items-center",right:"max-view-wide:justify-items-end"},justify:{left:"max-view-wide:justify-start",center:"max-view-wide:justify-center",right:"max-view-wide:justify-end"}},l={text:{left:"view-tablet:max-view-desktop:text-left",center:"view-tablet:max-view-desktop:text-center",right:"view-tablet:max-view-desktop:text-right"},place:{left:"view-tablet:max-view-desktop:mx-0",center:"view-tablet:max-view-desktop:mx-auto",right:"view-tablet:max-view-desktop:ml-auto view-tablet:max-view-desktop:mr-0"},items:{left:"view-tablet:max-view-desktop:grid-cols-1 view-tablet:max-view-desktop:justify-items-start",center:"view-tablet:max-view-desktop:grid-cols-1 view-tablet:max-view-desktop:justify-items-center",right:"view-tablet:max-view-desktop:justify-items-end"},justify:{left:"view-tablet:max-view-desktop:justify-start",center:"view-tablet:max-view-desktop:justify-center",right:"view-tablet:max-view-desktop:justify-end"}},d={text:{left:"max-view-tablet:text-left",center:"max-view-tablet:text-center",right:"max-view-tablet:text-right"},place:{left:"max-view-tablet:mx-0",center:"max-view-tablet:mx-auto",right:"max-view-tablet:ml-auto max-view-tablet:mr-0"},items:{left:"max-view-tablet:grid-cols-1 max-view-tablet:justify-items-start",center:"max-view-tablet:grid-cols-1 max-view-tablet:justify-items-center",right:"max-view-tablet:justify-items-end"},justify:{left:"max-view-tablet:justify-start",center:"max-view-tablet:justify-center",right:"max-view-tablet:justify-end"}};function a(e){return e==="left"||e==="center"||e==="right"?e:void 0}function u(e){return e==="start"?"left":e==="end"?"right":a(e)}function f(e,s,r){const w=a(e)??"left",t=v("same",w,a(s),a(r)),i={};return t.tablet&&t.tablet!==w&&(i.tablet=t.tablet),t.phone&&t.phone!==w&&(i.phone=t.phone),i}function b(e,s,r,w,{atSectionLine:t=!1}={}){const i=f(s,r,w),m=t?l:o,x=t?d:n;return[i.tablet?m[e][i.tablet]:"",i.phone?x[e][i.phone]:""].filter(Boolean).join(" ")}export{p as BLOCK_ALIGN_JUSTIFY,f as alignViewAnswers,b as alignViewClasses,a as blockAlignOf,u as legacyBlockAlignOf};
@@ -1,6 +1,7 @@
1
1
  import type { CSSProperties } from "react";
2
2
  import { type FillColorSlot } from "efficient-shell/markup";
3
3
  import type { SourceRow } from "./block-sources.js";
4
+ import { BOX_ROW_IMAGE_PROP } from "./box-card-rule.js";
4
5
  import { type ViewVarNames } from "./view-var-split.js";
5
6
  export declare const CARD_SHADOW_CLASS = "sf-card";
6
7
  export declare const BOX_DARKEN: {
@@ -30,6 +31,12 @@ export declare const BOX_CARD_SIDE: {
30
31
  readonly step: 10;
31
32
  };
32
33
  export declare function isBackgroundBox(src?: string | null): boolean;
34
+ export declare function boxIsCard(props: {
35
+ bgImage?: unknown;
36
+ [BOX_ROW_IMAGE_PROP]?: unknown;
37
+ } | null | undefined): boolean;
38
+ export declare function boxCardProps<P extends object>(props: P, inCopy: boolean): P;
39
+ export declare function boxRowPicture(props: Record<string, unknown> | null | undefined, row: SourceRow | null | undefined): string | null;
33
40
  export declare function boxDarkenStyle(darken: unknown, style?: unknown): CSSProperties | null;
34
41
  export declare const boxFillOf: (value: unknown) => string | null;
35
42
  export declare const boxPaintOf: (value: unknown) => string | null;
@@ -1 +1 @@
1
- import{parseHexColor as k}from"efficient-shell/format";import{fillColorRole as _}from"efficient-shell/markup";import{namedRowField as g,rowFieldText as y}from"./card-template.js";import{fillInkCss as O,fillSlotNamed as C,inkTokenOf as F,partColourName as A}from"../document/part-inks.js";import{scrim as u}from"./scrim.js";import{viewVarSplit as b}from"./view-var-split.js";const L="sf-card",x={min:0,max:100,step:5,fallback:0,unit:"%"},T=[{label:"Even",value:"even"},{label:"From the bottom",value:"bottom"}],D="68%",$={desktop:20,phone:20,side:40,sidePhone:24},H="sf-box-sides",M={min:0,max:200,step:10};function j(t){return typeof t=="string"&&t.trim()!==""}function S(t,n){const e=typeof t=="number"?t:Number.parseFloat(String(t??""));if(!Number.isFinite(e)||e<=0)return null;const s=(Math.min(x.max,Math.max(x.min,e))/100).toFixed(2);return n!=="bottom"?{background:u(Number(s))}:{background:`linear-gradient(0deg, ${u(Number(s))} 0%, ${u(0)} ${D})`}}const h=t=>typeof t=="string"?k(t.trim()):null,p=t=>{const n=h(t);if(n!==null||typeof t!="string")return n;const e=t.trim();return e&&!e.startsWith("#")&&O(e)||null},w=t=>{if(typeof t!="string")return null;const n=_(A(t.trim()));return n?.kind==="slot"?n.slot:null},N="swatch";function K(t,n){if(!n)return null;const e=y(n,g(t,N)),r=C(e);return h(e)??(r&&F(r)||null)}const B={tabletClass:"sf-fill-tablet",tabletVar:"--sf-fill-tablet",phoneClass:"sf-fill-phone",phoneVar:"--sf-fill-phone"};function Y(t,n,e){return b(B,p(t),p(n),p(e))}const E={tabletClass:"sf-wash-tablet",tabletVar:"--sf-wash-tablet",phoneClass:"sf-wash-phone",phoneVar:"--sf-wash-phone"};function z(t){const n=S(t.darken,t.darkenStyle);if(!n)return{className:"",style:{}};const e=(o,f)=>String(S(o,f)?.background??"none"),r=o=>(typeof o=="number"||typeof o=="string"&&o.trim()!=="")&&Number.isFinite(Number(o))?o:void 0,s=o=>T.some(f=>f.value===o)?o:void 0,[l,a,i,c]=[r(t.darkenTablet),s(t.darkenStyleTablet),r(t.darkenPhone),s(t.darkenStylePhone)],m=l??t.darken,d=a??t.darkenStyle;return b(E,String(n.background),l!==void 0||a!==void 0?e(m,d):null,i!==void 0||c!==void 0?e(i??m,c??d):null)}function J(t,n){const e={"top-left":["start","start"],"top-center":["center","start"],"top-right":["end","start"],left:["start","center"],center:["center","center"],right:["end","center"],"bottom-left":["start","end"],"bottom-center":["center","end"],"bottom-right":["end","end"]},[r,s]=e[t]??e.center,[l,a]=n==="column"?[s,r]:[r,s],i={start:"justify-start",center:"justify-center",end:"justify-end"},c={start:"items-start",center:"items-center",end:"items-end"};return`${i[l]} ${c[a]}`}export{$ as BOX_CARD_PAD,M as BOX_CARD_SIDE,x as BOX_DARKEN,T as BOX_DARKEN_STYLES,B as BOX_FILL_VIEWS,H as BOX_OWNS_SIDES_CLASS,N as BOX_SWATCH_PROP,E as BOX_WASH_VIEWS,L as CARD_SHADOW_CLASS,S as boxDarkenStyle,h as boxFillOf,w as boxFillSlot,Y as boxFillViews,p as boxPaintOf,J as boxPlacementClasses,K as boxSwatchFill,z as boxWashViews,j as isBackgroundBox};
1
+ import{parseHexColor as O}from"efficient-shell/format";import{fillColorRole as y}from"efficient-shell/markup";import{BOX_ROW_IMAGE_PROP as u}from"./box-card-rule.js";import{namedRowField as f,rowFieldText as S}from"./card-template.js";import{fillInkCss as C,fillSlotNamed as P,inkTokenOf as A,partColourName as F}from"../document/part-inks.js";import{scrim as p}from"./scrim.js";import{viewVarSplit as h}from"./view-var-split.js";const w="sf-card",g={min:0,max:100,step:5,fallback:0,unit:"%"},T=[{label:"Even",value:"even"},{label:"From the bottom",value:"bottom"}],B="68%",H={desktop:20,phone:20,side:40,sidePhone:24},j="sf-box-sides",K={min:0,max:200,step:10};function D(t){return typeof t=="string"&&t.trim()!==""}function Y(t){return D(typeof t?.bgImage=="string"?t.bgImage:null)||f(t,u)!==""}function z(t,e){return e||f(t,u)===""?t:{...t,[u]:""}}function G(t,e){const o=S(e,f(t,u))?.trim();return o||null}function _(t,e){const n=typeof t=="number"?t:Number.parseFloat(String(t??""));if(!Number.isFinite(n)||n<=0)return null;const s=(Math.min(g.max,Math.max(g.min,n))/100).toFixed(2);return e!=="bottom"?{background:p(Number(s))}:{background:`linear-gradient(0deg, ${p(Number(s))} 0%, ${p(0)} ${B})`}}const k=t=>typeof t=="string"?O(t.trim()):null,d=t=>{const e=k(t);if(e!==null||typeof t!="string")return e;const n=t.trim();return n&&!n.startsWith("#")&&C(n)||null},J=t=>{if(typeof t!="string")return null;const e=y(F(t.trim()));return e?.kind==="slot"?e.slot:null},E="swatch";function U(t,e){if(!e)return null;const n=S(e,f(t,E)),o=P(n);return k(n)??(o&&A(o)||null)}const I={tabletClass:"sf-fill-tablet",tabletVar:"--sf-fill-tablet",phoneClass:"sf-fill-phone",phoneVar:"--sf-fill-phone"};function q(t,e,n){return h(I,d(t),d(e),d(n))}const N={tabletClass:"sf-wash-tablet",tabletVar:"--sf-wash-tablet",phoneClass:"sf-wash-phone",phoneVar:"--sf-wash-phone"};function Q(t){const e=_(t.darken,t.darkenStyle);if(!e)return{className:"",style:{}};const n=(r,m)=>String(_(r,m)?.background??"none"),o=r=>(typeof r=="number"||typeof r=="string"&&r.trim()!=="")&&Number.isFinite(Number(r))?r:void 0,s=r=>T.some(m=>m.value===r)?r:void 0,[l,i,a,c]=[o(t.darkenTablet),s(t.darkenStyleTablet),o(t.darkenPhone),s(t.darkenStylePhone)],b=l??t.darken,x=i??t.darkenStyle;return h(N,String(e.background),l!==void 0||i!==void 0?n(b,x):null,a!==void 0||c!==void 0?n(a??b,c??x):null)}function Z(t,e){const n={"top-left":["start","start"],"top-center":["center","start"],"top-right":["end","start"],left:["start","center"],center:["center","center"],right:["end","center"],"bottom-left":["start","end"],"bottom-center":["center","end"],"bottom-right":["end","end"]},[o,s]=n[t]??n.center,[l,i]=e==="column"?[s,o]:[o,s],a={start:"justify-start",center:"justify-center",end:"justify-end"},c={start:"items-start",center:"items-center",end:"items-end"};return`${a[l]} ${c[i]}`}export{H as BOX_CARD_PAD,K as BOX_CARD_SIDE,g as BOX_DARKEN,T as BOX_DARKEN_STYLES,I as BOX_FILL_VIEWS,j as BOX_OWNS_SIDES_CLASS,E as BOX_SWATCH_PROP,N as BOX_WASH_VIEWS,w as CARD_SHADOW_CLASS,z as boxCardProps,_ as boxDarkenStyle,k as boxFillOf,J as boxFillSlot,q as boxFillViews,Y as boxIsCard,d as boxPaintOf,Z as boxPlacementClasses,G as boxRowPicture,U as boxSwatchFill,Q as boxWashViews,D as isBackgroundBox};
@@ -0,0 +1,7 @@
1
+ import type { ShowWhenRule } from "efficient-shell/format";
2
+ export declare const BOX_ROW_IMAGE_PROP = "rowImageField";
3
+ export declare const BOX_OUTSIDE_COPY = "boxOutsideCopy";
4
+ export declare const BOX_IS_CARD_RULE: ShowWhenRule;
5
+ export declare const BOX_IN_COPY = "boxInCopy";
6
+ export declare const BOX_IS_NOT_CARD_RULE: ShowWhenRule;
7
+ export declare const PARENT_BOX_IS_NOT_CARD_RULE: ShowWhenRule;
@@ -0,0 +1 @@
1
+ const t="rowImageField",o="boxOutsideCopy",n={all:[{field:t,set:!0},{not:{context:o,is:!0}}]},r={any:[{field:"bgImage",set:!0},n]},e="boxInCopy",_={any:[{not:{field:t,set:!0}},{not:{context:e,is:!0}}]},s={all:[{not:{field:"bgImage",set:!0}},_]},O={all:[{not:{context:"parent.bgImage",set:!0}},{any:[{not:{context:`parent.${t}`,set:!0}},{not:{context:e,is:!0}}]}]};export{e as BOX_IN_COPY,r as BOX_IS_CARD_RULE,s as BOX_IS_NOT_CARD_RULE,o as BOX_OUTSIDE_COPY,t as BOX_ROW_IMAGE_PROP,O as PARENT_BOX_IS_NOT_CARD_RULE};
@@ -1 +1 @@
1
- import{isStripBox as b}from"./box-separator.js";import{viewOverrides as B}from"./view-overrides.js";const ne={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 oe(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 R(e){return e===!0||e==="wrap"?"flex-wrap":""}const P={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!"},I={start:"max-view-tablet:justify-start",center:"max-view-tablet:justify-center",between:"max-view-tablet:justify-between",end:"max-view-tablet:justify-end"},H={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!"},M={start:"max-view-tablet:items-start",center:"max-view-tablet:items-center",end:"max-view-tablet:items-end",stretch:"max-view-tablet:items-stretch"},$={wrap:"view-tablet:max-view-desktop:flex-wrap!",nowrap:"view-tablet:max-view-desktop:flex-nowrap!"};function w(e,t){return typeof t=="string"&&Object.prototype.hasOwnProperty.call(e,t)?t:void 0}function f(e,t,a){const i=B("same",e,t,a),s={};return i.tablet!==void 0&&i.tablet!==e&&(s.tablet=i.tablet),i.phone!==void 0&&i.phone!==e&&(s.phone=i.phone),s}function h(e,t,a){return[e.tablet?t[e.tablet]:"",e.phone?a[e.phone]:""].filter(Boolean).join(" ")}function X(e,t,a){return f(w(c,e)??"start",w(c,t),w(c,a))}function we(e,t,a){return h(X(e,t,a),P,I)}function re(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,H,M)}function m(e){if(e===!0||e==="wrap")return"wrap";if(e===!1||e==="nowrap")return"nowrap"}function le(e,t){const a=R(e)===""?"nowrap":"wrap",i=m(t);return i&&i!==a?$[i]:""}const de="Block widths",g=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{value:"bigLeft",weights:[2,1]},{value:"bigRight",weights:[1,2]},{value:"biggerLeft",weights:[3,1]},{value:"biggerRight",weights:[1,3]},{value:"twoThree",weights:[2,3]}],U="data-sf-box-items",j=new RegExp(`[ \\t]+[^\\s"'\`]*\\[${U}\\][^\\s"'\`]*`,"g");function ce(e){return e.replace(j,"")}const ve=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Custom",value:"custom",weights:[2,1]}];function xe(e){return Array.isArray(e)?"custom":e==="equal"?"equal":typeof e=="string"&&e in p?"custom":"content"}const u=4,S=10;function W(e,t){if(!Number.isInteger(t)||t<2||t>u||e.length!==t-1||!e.every(s=>typeof s=="number"&&Number.isFinite(s)))return;const a=[];let i=0;return e.forEach((s,n)=>{const o=100-i-S*(t-1-n),x=Math.min(o,Math.max(S,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<u;o+=1)n[`--${e}-${o+1}`]=s[o]??1;return n}function pe(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 F(e,t){const a=Array.from({length:t},()=>1),i=g.find(o=>o.value===e);if(!i?.weights||t<1)return a;const[s,n]=i.weights;return s>1&&(a[0]=s),n>1&&(a[t-1]=n),a}function be(e,t){if(typeof e!="string"||!(e in p)||e==="equal")return e;const a=F(e,t),i=a.reduce((s,n)=>s+n,0);return a.slice(0,-1).map(s=>Math.round(s/i*100))}const r="[&>*]: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:r,bigLeft:`${r} [&>*:first-child]:view-wide:grow-[2] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[2]`,bigRight:`${r} [&>*:last-child]:view-wide:grow-[2] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[2]`,biggerLeft:`${r} [&>*:first-child]:view-wide:grow-[3] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[3]`,biggerRight:`${r} [&>*:last-child]:view-wide:grow-[3] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[3]`,twoThree:`${r} [&>*: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]`},G=`${r} [&>*: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 q(e){return Array.isArray(e)?G:typeof e=="string"?p[e]??"":""}const fe={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)}]}]}]},O="view-tablet:max-view-desktop:flex-row!",l=`${O} [&>*: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!`,C={content:`${O} [&>*: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:l,bigLeft:`${l} [&>*: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:`${l} [&>*: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:`${l} [&>*: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:`${l} [&>*: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:`${l} [&>*: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]!`},D=`${l} [&>*: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 V(e){return Array.isArray(e)||typeof e=="string"&&e in C?e:null}function he(e){if(e.direction!=="row"||b(e.direction,e.separator)||e.loop==="scroll"||e.line===!0||A(e.columns)!==""||L(e.columnsTablet)!=="")return"";const t=V(e.shareTablet);return t===null?"":typeof t=="string"?C[t]:D}const K="[&>*]:view-wide:basis-[content] [&>[data-sf-box-items]>*]:view-wide:basis-[content]";function me(e){return q(e)===""?K:""}const _e="Columns",ge=1,ue=3,_={2:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},Se=g.filter(e=>e.value==="content"||e.value==="equal"),ke="equal",Oe=1,Ce=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!",J={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 A(e){return typeof e=="number"?J[e]??"":""}const Y={1:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc(100%/1)]!",2:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]!",3:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]!",4:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]!",5:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]!",6:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]!"};function L(e){return typeof e=="number"?Y[e]??"":""}function Ae(e){return e.direction!=="row"||b(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":L(e.columnsTablet)}function Le(e){return e.direction!=="row"||b(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":A(e.columns)}const N={2:"view-wide:grid view-wide:grid-cols-2",3:"view-wide:grid view-wide:grid-cols-3",4:"view-wide:grid view-wide:grid-cols-4",5:"view-wide:grid view-wide:grid-cols-5",6:"view-wide:grid view-wide:grid-cols-6"},E={2:"max-view-wide:grid max-view-wide:grid-cols-2",3:"max-view-wide:grid max-view-wide:grid-cols-3"},Ne=Object.keys(N).map(Number),Ee=Object.keys(E).map(Number);function Te(e,t,a=!1){const i=typeof e=="number"?N[e]??"":"",s=E[Number(t)]??"";return!i&&!s?"":[i,s,a?"gap-y-0!":""].filter(Boolean).join(" ")}const Q="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]",z={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)]"},Z="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 ee(e,t){return(m(e)??m(t)??"wrap")==="nowrap"}function ye(e,t,a,i){const s=_[Number(e)];if(!s)return"max-view-wide:flex-col";const n=ee(a,i);return T(e,t)?n?Z:Q:n?z[Number(e)]:s}function Be(e,t){return Number(e)in _&&!T(e,t)}function T(e,t){return Number(e)in _&&t==="content"}const Re="Block spacing",Pe=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],te="sf-box-gap-only";function Ie(e){return e==="gap"?te:""}const y={each:"sf-box-each-tablet",gap:"sf-box-gap-only-tablet"},ie={each:"sf-box-each-phone",gap:"sf-box-gap-only-phone"};function He(e,t,a){const i=n=>w(y,n),s=f(e==="gap"?"gap":"each",i(t),i(a));return h(s,y,ie)}export{Ne as ACCORDION_COLUMN_COUNTS,Ee as ACCORDION_PHONE_COLUMN_COUNTS,v as BOX_ALIGN_CLASS,Re as BOX_BLOCK_SPACING_LABEL,Pe as BOX_BLOCK_SPACING_POINTS,Ce as BOX_COLUMNS_MAX,Oe as BOX_COLUMNS_MIN,te as BOX_GAP_ONLY_CLASS,fe as BOX_GIVES_PICTURES_A_HEIGHT,U as BOX_ITEMS_ATTR,_e as BOX_PHONE_ROW_LABEL,ue as BOX_PHONE_ROW_MAX,ge as BOX_PHONE_ROW_MIN,ve as BOX_SHARE_CHOICES,de as BOX_SHARE_LABEL,ke as BOX_SHARE_PHONE_DEFAULT,Se as BOX_SHARE_PHONE_POINTS,g as BOX_SHARE_POINTS,ne as NESTED_BOX_PADDING,Te as boxAccordionColumnsClass,re as boxAlignViewClasses,Ie as boxBlockSpacingClass,He as boxBlockSpacingViewClasses,A as boxColumnsClass,me as boxFitContentClass,X as boxJustifyViewAnswers,we as boxJustifyViewClasses,oe as boxLayoutClasses,Be as boxPhoneCellsShareLine,ye as boxPhoneRowClasses,T as boxPhoneRowFits,ee as boxPhoneRowOneLine,Le as boxRowColumnsClass,Ae as boxRowTabletColumnsClass,he as boxRowTabletShareClass,xe as boxShareChoiceOf,q as boxShareClasses,V as boxShareTabletOf,pe as boxShareVars,be as boxShareWidthsOf,L as boxTabletColumnsClass,R as boxWrapClass,le as boxWrapTabletClass,m as boxWrapWordOf,ce as withoutBoxItemsHalf};
1
+ import{PARENT_BOX_IS_NOT_CARD_RULE as B}from"./box-card-rule.js";import{isStripBox as f}from"./box-separator.js";import{viewOverrides as R}from"./view-overrides.js";const oe={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 de(e,i){const s=typeof e=="string"&&e in c?c[e]:"",t=typeof i=="string"&&i in v?v[i]:"";return[s,t].filter(Boolean).join(" ")}function P(e){return e===!0||e==="wrap"?"flex-wrap":""}const I={start:"view-wide:max-view-desktop:justify-start!",center:"view-wide:max-view-desktop:justify-center!",between:"view-wide:max-view-desktop:justify-between!",end:"view-wide:max-view-desktop:justify-end!"},H={start:"max-view-wide:justify-start",center:"max-view-wide:justify-center",between:"max-view-wide:justify-between",end:"max-view-wide:justify-end"},M={start:"view-wide:max-view-desktop:items-start!",center:"view-wide:max-view-desktop:items-center!",end:"view-wide:max-view-desktop:items-end!",stretch:"view-wide:max-view-desktop:items-stretch!"},X={start:"max-view-wide:items-start",center:"max-view-wide:items-center",end:"max-view-wide:items-end",stretch:"max-view-wide:items-stretch"},$={wrap:"view-wide:max-view-desktop:flex-wrap!",nowrap:"view-wide:max-view-desktop:flex-nowrap!"};function o(e,i){return typeof i=="string"&&Object.prototype.hasOwnProperty.call(e,i)?i:void 0}function h(e,i,s){const t=R("same",e,i,s),a={};return t.tablet!==void 0&&t.tablet!==e&&(a.tablet=t.tablet),t.phone!==void 0&&t.phone!==e&&(a.phone=t.phone),a}function m(e,i,s){return[e.tablet?i[e.tablet]:"",e.phone?s[e.phone]:""].filter(Boolean).join(" ")}function U(e,i,s){return h(o(c,e)??"start",o(c,i),o(c,s))}function re(e,i,s){return m(U(e,i,s),I,H)}function le(e,i,s){const t=o(v,e)??"stretch";if(t==="stretch")return"";const a=h(t,o(v,i),o(v,s));return m(a,M,X)}function _(e){if(e===!0||e==="wrap")return"wrap";if(e===!1||e==="nowrap")return"nowrap"}function ce(e,i){const s=P(e)===""?"nowrap":"wrap",t=_(i);return t&&t!==s?$[t]:""}const ve="Block widths",g=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{value:"bigLeft",weights:[2,1]},{value:"bigRight",weights:[1,2]},{value:"biggerLeft",weights:[3,1]},{value:"biggerRight",weights:[1,3]},{value:"twoThree",weights:[2,3]}],j="data-sf-box-items",W=new RegExp(`[ \\t]+[^\\s"'\`]*\\[${j}\\][^\\s"'\`]*`,"g");function xe(e){return e.replace(W,"")}const pe=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Custom",value:"custom",weights:[2,1]}];function fe(e){return Array.isArray(e)?"custom":e==="equal"?"equal":typeof e=="string"&&e in p?"custom":"content"}const u=4,S=10;function F(e,i){if(!Number.isInteger(i)||i<2||i>u||e.length!==i-1||!e.every(a=>typeof a=="number"&&Number.isFinite(a)))return;const s=[];let t=0;return e.forEach((a,n)=>{const w=100-t-S*(i-1-n),x=Math.min(w,Math.max(S,Math.round(a)));s.push(x),t+=x}),s}function k(e,i,s){if(!Array.isArray(i))return;const t=F(i,s),a=t?[...t,100-t.reduce((w,x)=>w+x,0)]:[],n={};for(let w=0;w<u;w+=1)n[`--${e}-${w+1}`]=a[w]??1;return n}function he(e,i,s){const t=k("sf-share",e,s),a=k("sf-share-tablet",i,s);return t||a?{...t,...a}:void 0}function G(e,i){const s=Array.from({length:i},()=>1),t=g.find(w=>w.value===e);if(!t?.weights||i<1)return s;const[a,n]=t.weights;return a>1&&(s[0]=a),n>1&&(s[i-1]=n),s}function me(e,i){if(typeof e!="string"||!(e in p)||e==="equal")return e;const s=G(e,i),t=s.reduce((a,n)=>a+n,0);return s.slice(0,-1).map(a=>Math.round(a/t*100))}const d="[&>*]: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:d,bigLeft:`${d} [&>*:first-child]:view-wide:grow-[2] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[2]`,bigRight:`${d} [&>*:last-child]:view-wide:grow-[2] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[2]`,biggerLeft:`${d} [&>*:first-child]:view-wide:grow-[3] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[3]`,biggerRight:`${d} [&>*:last-child]:view-wide:grow-[3] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[3]`,twoThree:`${d} [&>*: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]`},q=`${d} [&>*: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 D(e){return Array.isArray(e)?q:typeof e=="string"?p[e]??"":""}const _e={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}},B,{any:[{context:"parent.columns",in:[2,3,4,5,6]},{all:[{not:{context:"parent.columns",is:1}},{context:"parent.share",in:Object.keys(p)}]}]}]},O="view-wide:max-view-desktop:flex-row!",r=`${O} [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-0!`,A={content:`${O} [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[content]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[content]!`,equal:r,bigLeft:`${r} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]!`,bigRight:`${r} [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]!`,biggerLeft:`${r} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`,biggerRight:`${r} [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`,twoThree:`${r} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`},V=`${r} [&>*:nth-child(1):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>[data-sf-box-items]>*:nth-child(1):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>*:nth-child(2):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>[data-sf-box-items]>*:nth-child(2):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>*:nth-child(3):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>[data-sf-box-items]>*:nth-child(3):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>*:nth-child(4):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]! [&>[data-sf-box-items]>*:nth-child(4):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]!`;function K(e){return Array.isArray(e)||typeof e=="string"&&e in A?e:null}function be(e){if(e.direction!=="row"||f(e.direction,e.separator)||e.loop==="scroll"||e.line===!0||C(e.columns)!==""||L(e.columnsTablet)!=="")return"";const i=K(e.shareTablet);return i===null?"":typeof i=="string"?A[i]:V}const J="[&>*]:view-wide:basis-[content] [&>[data-sf-box-items]>*]:view-wide:basis-[content]";function ge(e){return D(e)===""?J:""}const ue="Columns",Se=1,ke=3,b={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)]"},Oe=g.filter(e=>e.value==="content"||e.value==="equal"),Ae="equal",Ce=1,Le=6,l="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!",Y={1:`${l} [&>*]:view-wide:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc(100%/1)]!`,2:`${l} [&>*]: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:`${l} [&>*]: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:`${l} [&>*]: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:`${l} [&>*]: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:`${l} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]!`};function C(e){return typeof e=="number"?Y[e]??"":""}const Q={1:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc(100%/1)]!",2:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide: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-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]!",3:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide: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-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]!",4:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide: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-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]!",5:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide: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-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]!",6:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide: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-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]!"};function L(e){return typeof e=="number"?Q[e]??"":""}function Ne(e){return e.direction!=="row"||f(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":L(e.columnsTablet)}function Ee(e){return e.direction!=="row"||f(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":C(e.columns)}const N={2:"view-wide:grid view-wide:grid-cols-2",3:"view-wide:grid view-wide:grid-cols-3",4:"view-wide:grid view-wide:grid-cols-4",5:"view-wide:grid view-wide:grid-cols-5",6:"view-wide:grid view-wide:grid-cols-6"},E={2:"max-view-wide:grid max-view-wide:grid-cols-2",3:"max-view-wide:grid max-view-wide:grid-cols-3"},Te=Object.keys(N).map(Number),ye=Object.keys(E).map(Number);function Be(e,i,s=!1){const t=typeof e=="number"?N[e]??"":"",a=E[Number(i)]??"";return!t&&!a?"":[t,a,s?"gap-y-0!":""].filter(Boolean).join(" ")}const z="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]",Z={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)]"},ee="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 ie(e,i){return(_(e)??_(i)??"wrap")==="nowrap"}function Re(e,i,s,t){const a=b[Number(e)];if(!a)return"max-view-wide:flex-col";const n=ie(s,t);return T(e,i)?n?ee:z:n?Z[Number(e)]:a}function Pe(e,i){return Number(e)in b&&!T(e,i)}function T(e,i){return Number(e)in b&&i==="content"}const Ie="Block spacing",He=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],te="sf-box-gap-only";function Me(e){return e==="gap"?te:""}const y={each:"sf-box-each-tablet",gap:"sf-box-gap-only-tablet"},se={each:"sf-box-each-phone",gap:"sf-box-gap-only-phone"};function Xe(e,i,s){const t=n=>o(y,n),a=h(e==="gap"?"gap":"each",t(i),t(s));return m(a,y,se)}export{Te as ACCORDION_COLUMN_COUNTS,ye as ACCORDION_PHONE_COLUMN_COUNTS,v as BOX_ALIGN_CLASS,Ie as BOX_BLOCK_SPACING_LABEL,He as BOX_BLOCK_SPACING_POINTS,Le as BOX_COLUMNS_MAX,Ce as BOX_COLUMNS_MIN,te as BOX_GAP_ONLY_CLASS,_e as BOX_GIVES_PICTURES_A_HEIGHT,j as BOX_ITEMS_ATTR,ue as BOX_PHONE_ROW_LABEL,ke as BOX_PHONE_ROW_MAX,Se as BOX_PHONE_ROW_MIN,pe as BOX_SHARE_CHOICES,ve as BOX_SHARE_LABEL,Ae as BOX_SHARE_PHONE_DEFAULT,Oe as BOX_SHARE_PHONE_POINTS,g as BOX_SHARE_POINTS,oe as NESTED_BOX_PADDING,Be as boxAccordionColumnsClass,le as boxAlignViewClasses,Me as boxBlockSpacingClass,Xe as boxBlockSpacingViewClasses,C as boxColumnsClass,ge as boxFitContentClass,U as boxJustifyViewAnswers,re as boxJustifyViewClasses,de as boxLayoutClasses,Pe as boxPhoneCellsShareLine,Re as boxPhoneRowClasses,T as boxPhoneRowFits,ie as boxPhoneRowOneLine,Ee as boxRowColumnsClass,Ne as boxRowTabletColumnsClass,be as boxRowTabletShareClass,fe as boxShareChoiceOf,D as boxShareClasses,K as boxShareTabletOf,he as boxShareVars,me as boxShareWidthsOf,L as boxTabletColumnsClass,P as boxWrapClass,ce as boxWrapTabletClass,_ as boxWrapWordOf,xe as withoutBoxItemsHalf};
@@ -1,11 +1,11 @@
1
1
  import type { SlotCell } from "efficient-easel/render";
2
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)]";
3
+ export declare const BOX_PHONE_PLACE_TABLET_CLASS = "max-view-wide:[&>*]:order-[var(--sf-phone-place)] max-view-wide:[&>[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
- export declare const BOX_PHONE_PLACE_CANVAS_TABLET_CLASS = "max-view-tablet:order-[var(--sf-phone-place)]";
5
+ export declare const BOX_PHONE_PLACE_CANVAS_TABLET_CLASS = "max-view-wide:order-[var(--sf-phone-place)]";
6
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
- export declare function boxPhoneCell(order: readonly string[] | undefined, { tabletKeepsRow, editing }: {
9
- tabletKeepsRow: boolean;
8
+ export declare function boxPhoneCell(order: readonly string[] | undefined, { editing }: {
9
+ tabletKeepsRow?: boolean;
10
10
  editing: boolean;
11
11
  }): ((id: string) => SlotCell) | undefined;
@@ -1 +1 @@
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
+ import{readPhoneOrderIds as a}from"efficient-easel/data";const o="max-view-wide:[&>*]:order-[var(--sf-phone-place)] max-view-wide:[&>[data-sf-box-items]>*]:order-[var(--sf-phone-place)]",x=o,s="max-view-wide:order-[var(--sf-phone-place)]",A=s,h="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]",_="unnamed:";function c(e,r){const n=Array.isArray(e)?e.filter(t=>!(typeof t=="string"&&t.startsWith(_))):e;return a(n,r)}function f(e,{editing:r}){if(!e)return;const n=r?s:`${h} ${o}`;return t=>{const i=e.indexOf(t);return{className:n,style:{"--sf-phone-place":i<0?e.length:i}}}}export{h as BOX_CELL_CLASS,s as BOX_PHONE_PLACE_CANVAS_CLASS,A as BOX_PHONE_PLACE_CANVAS_TABLET_CLASS,o as BOX_PHONE_PLACE_CLASS,x as BOX_PHONE_PLACE_TABLET_CLASS,f as boxPhoneCell,c as boxPhoneOrder};
@@ -1,4 +1,4 @@
1
- export declare const BOX_SHAPES: ("square" | "auto" | "video" | "poster" | "tall" | "wide" | "landscape" | "portrait" | "panorama" | "story")[];
1
+ export declare const BOX_SHAPES: ("square" | "auto" | "video" | "screen" | "poster" | "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 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};
1
+ import{galleryCardRatioClass as p,SHAPE_TABLE as u}from"./gallery-card-layout.js";const t=u.map(e=>e.shape);function o(e){return t.includes(String(e??""))?e:"auto"}function d(e){const i=o(e);return i==="auto"?"":p(i)}const c={tall:"view-wide:aspect-[3/4]",square:"view-wide:aspect-square",landscape:"view-wide:aspect-[4/3]",screen:"view-wide:aspect-[16/10]",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]",screen:"max-view-wide:h-auto max-view-wide:aspect-[16/10]",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 x(e,i){return t.includes(String(i??""))?i===o(e)?null:i:null}const n={auto:"view-wide:max-view-desktop:aspect-auto!",tall:"view-wide:max-view-desktop:h-auto! view-wide:max-view-desktop:aspect-[3/4]!",square:"view-wide:max-view-desktop:h-auto! view-wide:max-view-desktop:aspect-square!",landscape:"view-wide:max-view-desktop:h-auto! view-wide:max-view-desktop:aspect-[4/3]!",screen:"view-wide:max-view-desktop:h-auto! view-wide:max-view-desktop:aspect-[16/10]!",video:"view-wide:max-view-desktop:h-auto! view-wide:max-view-desktop:aspect-[16/9]!",wide:"view-wide:max-view-desktop:h-auto! view-wide:max-view-desktop:aspect-[2/1]!",panorama:"view-wide:max-view-desktop:h-auto! view-wide:max-view-desktop:aspect-[21/9]!",story:"view-wide:max-view-desktop:h-auto! view-wide:max-view-desktop:aspect-[9/16]!",poster:"view-wide:max-view-desktop:h-auto! view-wide:max-view-desktop:aspect-[2/3]!",portrait:"view-wide:max-view-desktop:h-auto! view-wide:max-view-desktop:aspect-[4/5]!"};function m(e){return t.includes(String(e??""))?e:null}function h(e,i,v){const a=m(v),w=x(e,t.includes(String(i??""))?i:a);if(w===null&&a===null)return d(e);const s=o(e);return[w===null?d(e):s==="auto"?"":c[s],w===null?"":r[w],a===null?"":n[a]].filter(Boolean).join(" ")}export{t as BOX_SHAPES,d as boxShapeClass,h as boxShapeClasses,o as boxShapeOf,x as boxShapePhoneOf,m as boxShapeTabletOf};
@@ -1,4 +1,5 @@
1
1
  export declare const BOX_SIDE_SPACE_PROP = "sideSpace";
2
+ export declare const BOX_SIDE_SPACE_SITE = "site";
2
3
  export declare const BOX_SIDE_SPACE_OPTIONS: readonly [{
3
4
  readonly value: "box";
4
5
  readonly label: "Box";
@@ -10,4 +11,4 @@ export type BoxSideSpace = (typeof BOX_SIDE_SPACE_OPTIONS)[number]["value"];
10
11
  export declare const BOX_SIDE_SPACE_DEFAULT: BoxSideSpace;
11
12
  export declare const BOX_SIDE_SPACE_HINT = "Box: on small screens the Box keeps its own side space, up to 24 px. Site: it uses the site's Side space, as the site's own sections do. It has no effect when Content is Full width.";
12
13
  export declare function boxSideSpaceOf(value: unknown): BoxSideSpace;
13
- export declare function boxSideSpaceWrite(next: unknown): "site" | undefined;
14
+ export declare function boxSideSpaceWrite(next: unknown): typeof BOX_SIDE_SPACE_SITE | undefined;
@@ -1 +1 @@
1
- const t="sideSpace",s=[{value:"box",label:"Box"},{value:"site",label:"Site"}],o="box",i="Box: on small screens the Box keeps its own side space, up to 24 px. Site: it uses the site's Side space, as the site's own sections do. It has no effect when Content is Full width.";function n(e){return e==="site"?"site":"box"}function S(e){return e==="site"?"site":void 0}export{o as BOX_SIDE_SPACE_DEFAULT,i as BOX_SIDE_SPACE_HINT,s as BOX_SIDE_SPACE_OPTIONS,t as BOX_SIDE_SPACE_PROP,n as boxSideSpaceOf,S as boxSideSpaceWrite};
1
+ const o="sideSpace",e="site",s=[{value:"box",label:"Box"},{value:e,label:"Site"}],n="box",S="Box: on small screens the Box keeps its own side space, up to 24 px. Site: it uses the site's Side space, as the site's own sections do. It has no effect when Content is Full width.";function i(t){return t===e?e:"box"}function x(t){return t===e?e:void 0}export{n as BOX_SIDE_SPACE_DEFAULT,S as BOX_SIDE_SPACE_HINT,s as BOX_SIDE_SPACE_OPTIONS,o as BOX_SIDE_SPACE_PROP,e as BOX_SIDE_SPACE_SITE,i as boxSideSpaceOf,x as boxSideSpaceWrite};
@@ -8,4 +8,6 @@ export declare function buttonIconChoice(icon: unknown, arrow: unknown): ButtonI
8
8
  export declare function buttonIconSide(value: unknown): ButtonIconSide;
9
9
  export declare function buttonIconAtEnd(side: unknown, width: unknown): boolean;
10
10
  export declare function buttonWidth(value: unknown): ButtonWidth;
11
- export declare function buttonWidthClass(desktop: unknown, phone: unknown, tablet?: unknown): string;
11
+ export declare function buttonWidthClass(desktop: unknown, phone: unknown, tablet?: unknown, { atSectionLine }?: {
12
+ readonly atSectionLine?: boolean;
13
+ }): string;
@@ -1 +1 @@
1
- import{buttonArrowShown as w}from"./button-arrow.js";import{nonEmptyString as i}from"../non-empty-string.js";const a=["none","arrow-right","arrow-long-right","arrow-up-right","chevron-right","external","cart","bag","tag","email","location","play","download","search","car"];function c(t){return typeof t=="string"&&a.includes(t)?t:void 0}function x(t,o){return c(t)??(w(o)?"arrow-right":"none")}function d(t){return t==="before"?"before":t==="end"?"end":"after"}function b(t,o){return d(t)==="end"&&e(o)==="fill"}function e(t){return t==="fill"||t==="fixed"?"fill":"fit"}function m(t,o,l){const r=e(t);if(i(l)){const n=e(l),u=i(o)?e(o):n;return[r==="fill"?"view-desktop:w-full":"view-desktop:w-auto",n==="fill"?"view-tablet:max-view-desktop:w-full":"view-tablet:max-view-desktop:w-auto",u==="fill"?"max-view-tablet:w-full":"max-view-tablet:w-auto"].join(" ")}const f=r==="fill"?["w-full"]:[];if(i(o)){const n=e(o);n!==r&&f.push(n==="fill"?"max-view-wide:w-full":"max-view-wide:w-auto")}return f.join(" ")}export{a as BUTTON_ICONS,b as buttonIconAtEnd,x as buttonIconChoice,d as buttonIconSide,e as buttonWidth,m as buttonWidthClass,c as storedButtonIcon};
1
+ import{buttonArrowShown as a}from"./button-arrow.js";import{nonEmptyString as r}from"../non-empty-string.js";const d=["none","arrow-right","arrow-long-right","arrow-up-right","chevron-right","external","cart","bag","tag","email","location","play","download","search","car"];function c(t){return typeof t=="string"&&d.includes(t)?t:void 0}function m(t,o){return c(t)??(a(o)?"arrow-right":"none")}function s(t){return t==="before"?"before":t==="end"?"end":"after"}function v(t,o){return s(t)==="end"&&i(o)==="fill"}function i(t){return t==="fill"||t==="fixed"?"fill":"fit"}function b(t,o,l,{atSectionLine:u=!1}={}){const n=i(t);if(r(l)){const e=i(l),f=r(o)?i(o):e;return u?[n==="fill"?"view-desktop:w-full":"view-desktop:w-auto",e==="fill"?"view-tablet:max-view-desktop:w-full":"view-tablet:max-view-desktop:w-auto",f==="fill"?"max-view-tablet:w-full":"max-view-tablet:w-auto"].join(" "):[n==="fill"?"view-desktop:w-full":"view-desktop:w-auto",e==="fill"?"view-wide:max-view-desktop:w-full":"view-wide:max-view-desktop:w-auto",f==="fill"?"max-view-wide:w-full":"max-view-wide:w-auto"].join(" ")}const w=n==="fill"?["w-full"]:[];if(r(o)){const e=i(o);e!==n&&w.push(e==="fill"?"max-view-wide:w-full":"max-view-wide:w-auto")}return w.join(" ")}export{d as BUTTON_ICONS,v as buttonIconAtEnd,m as buttonIconChoice,s as buttonIconSide,i as buttonWidth,b as buttonWidthClass,c as storedButtonIcon};
@@ -62,6 +62,14 @@ export declare function cardTemplateField(type: string | undefined, key: string,
62
62
  type?: unknown;
63
63
  props?: Record<string, unknown>;
64
64
  } | null): CardRowFieldSpec | null;
65
+ export declare function rowFieldSpec(copy: {
66
+ ownerType?: string;
67
+ fields?: readonly CardRowFieldSpec[];
68
+ owner?: {
69
+ type?: unknown;
70
+ props?: Record<string, unknown>;
71
+ } | null;
72
+ } | null | undefined, key: string): CardRowFieldSpec | null;
65
73
  export declare function namedRowField(props: Record<string, unknown> | null | undefined, prop?: string): string;
66
74
  export declare function cardKeyOf(row: SourceRow, index: number): string;
67
75
  export declare function cardRow(value: unknown): SourceRow;
@@ -74,7 +82,7 @@ export declare function rowPartByKey(type: string, props: Record<string, unknown
74
82
  export declare function rowBound(type: string, props: Record<string, unknown> | null | undefined, key: string): boolean;
75
83
  export declare function rowFieldOf(type: string, props: Record<string, unknown> | null | undefined, key: string): string;
76
84
  export declare function rowFieldText(row: SourceRow | null | undefined, key: string): string | null;
77
- export declare function rowFilledProps(type: string, props: Record<string, unknown>, row: SourceRow | null | undefined, ownerType?: string): Record<string, unknown>;
85
+ export declare function rowFilledProps(type: string, props: Record<string, unknown>, row: SourceRow | null | undefined, ownerType?: string, fields?: readonly CardRowFieldSpec[]): Record<string, unknown>;
78
86
  type DocNode = {
79
87
  type?: unknown;
80
88
  props?: Record<string, unknown>;
@@ -1 +1 @@
1
- import{blockSourceSpec as x,declaredBlockSource as g}from"./block-sources.js";import{isNodeList as O}from"efficient-easel/data";import{BOX_TYPE as _}from"../document/container-blocks.js";import{globalRegistry as C}from"../global-registry.js";import{nonEmptyString as w}from"../non-empty-string.js";import{accentItalicRuns as h}from"../markup.js";import{withCardsTemplate as A}from"../document/cards-template-on-read.js";import{withCardListTemplate as S}from"../document/blocks/general/CardList/item-seed.js";import{ARTICLE_BODY_BLOCK as I,withArticleBodyTemplate as E}from"../document/article-body-seed.js";import{withLogosTemplate as P}from"../document/blocks/general/Logos/card-seed.js";import{withFaqTemplate as F}from"../document/blocks/general/FAQ/card-seed.js";const D="template",ce="Card template",y="CardList",B=["Text","ImageBlock","ButtonBlock","Flex"],f="rowField",v="rowLinkField";function ue(){return{type:"slot",allow:[...B]}}const W=B.filter(e=>e!=="ButtonBlock"),T="items",R="itemFields";function de(){return{type:"slot",allow:[...W]}}const M=[{block:"OrderSummary",typedRows:"rows",linesBetween:!0,fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:"FAQ",typedRows:"items",fields:[{key:"question",label:"Question"},{key:"answer",label:"Answer",multiline:!0}],seedOnInsert:e=>F(e)},{block:"Footprint",typedRows:"offices",fields:[{key:"badge",label:"HQ"},{key:"role",label:"Role"},{key:"city",label:"City"},{key:"country",label:"Region · country"},{key:"address",label:"Address"},{key:"linkLabel",label:"Button"},{key:"href",label:"Link",kind:"link"}]},{block:"Cards",typedRows:"items",fields:[{key:"num",label:"Number"},{key:"since",label:"Corner note"},{key:"label",label:"Label"},{key:"title",label:"Card title"},{key:"value",label:"Value"},{key:"body",label:"Card body",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:"count",label:"Count"},{key:"badge",label:"Highlight badge",everySource:!0}],seed:e=>A("Cards",e)},{block:"ProcessSteps",fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title",mark:"accentItalic"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"},{key:"specs",label:"Specs",kind:"list",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]}],blocks:[{type:y,label:"Card list"}]},{block:"Logos",fields:[{key:"label",label:"Name"},{key:"kind",label:"Kind"}],seed:e=>P(e)},{block:y,fields:[{key:"badge",label:"Highlight badge",everySource:!0}],typedRows:T,seed:e=>S(e)},{block:I,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:e=>E(e)}];function a(){return C("efficient.card-templates",()=>new Map(M.map(e=>[e.block,e])))}function fe(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=w(t.typedRows);a().set(t.block,{block:t.block,fields:t.fields.map(o=>({...o})),blocks:r,typedRows:n,...t.seed?{seed:t.seed}:{},...t.seedOnInsert?{seedOnInsert:t.seedOnInsert}:{},...t.linesBetween===!0?{linesBetween:!0}:{}})}}function N(e,t){const r=e?a().get(e)?.seed:void 0;return r?r(t):t}function pe(e,t){if(!(t.template===void 0||Array.isArray(t.template)&&t.template.length===0))return t;const{template:n,...o}=t,i=e?a().get(e)?.seedOnInsert:void 0,l=i?i(o):N(e,o);return l===o?t:l}function ye(){for(const e of a().values())if(e.blocks?.length)return!0;return!1}function me(e){return a().get(e)?.blocks??[]}function ke(e){for(const t of a().values())if(t.blocks?.some(r=>r.type===e))return!0;return!1}function be(e){return typeof e=="string"&&a().get(e)?.typedRows||""}function xe(e){return typeof e=="string"&&a().get(e)?.linesBetween===!0}function K(e){return typeof e=="string"&&a().has(e)}function j(e,t){const r=a().get(e)?.fields??[];return t?r.filter(n=>(n.kind??"text")===t):r}function H(e){return typeof e=="string"?j(e,"list")[0]?.key??"":""}function Y(e,t){return m(e)||H(t)}function L(e,t){const r=typeof e?.type=="string"?e.type:"";if(!r)return[];const n=a().get(r)?.fields??[],o=x(g(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 Q(e,t,r){return e?r?L(r).find(n=>n.key===t)??null:a().get(e)?.fields.find(n=>n.key===t)??null:null}function m(e,t=f){const r=e?.[t];return typeof r=="string"?r.trim():""}function ge(e,t){return e.key||String(t+1)}function we(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}const U="hideWhenRowEmpty";function Be(e,t){const r=e[U];return!t||!Array.isArray(r)||!r.length?!1:r.every(n=>typeof n!="string"||!t[n]?.trim())}function Te(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=w(typeof i=="string"?i.trim():void 0);if(l&&l!==r.trim())return l}return""}const k={Text:{text:f},ImageBlock:{src:f},ButtonBlock:{label:f,href:v},LogoBlock:{alt:f},Breadcrumb:{currentCrumb:f}},Re=k,$=new Set(["ButtonBlock.label","LogoBlock.alt"]);function Le(e,t,r){return q(e,t,r)&&!$.has(`${e}.${r}`)}function q(e,t,r){return V(e,t,r)!==""}function V(e,t,r){const n=k[e]?.[r];return n?m(t,n):""}function X(e,t){return!t||!e?null:e[t]??""}function Oe(e,t,r,n){if(!r)return t;let o=null;for(const[i,l]of Object.entries(k[e]??{})){const s=m(t,l),c=X(r,s);c!==null&&(o??={...t},o[i]=n&&Q(n,s)?.mark==="accentItalic"?h(c):c)}return o??t}function b(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[c,u]of Object.entries(s?.props??{})){if(!O(u))continue;const d=c===D&&K(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===_},p=n(u,d);if(p!==void 0)return p}}},o=n(r,null);return o===void 0?null:o}function z(e,t){const r=b(e,t);return r&&r.owner}function _e(e,t){const r=b(e,t);return r&&(r.direct?r.owner:null)}function Ce(e,t){const r=b(e,t);if(r!==void 0)return r===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:r.nested,underBox:r.underBox}}function he(e,t,r){if(t?.type!==y)return[];const n=z(e,t.props?.id);if(!n){const l=x(g(t.props))?.fields,s=l?.length?l.map(d=>({...d})):G(t.props),c=(a().get(y)?.fields??[]).filter(d=>d.everySource&&!s.some(p=>p.key===d.key)),u=[...s,...c];return r?u.filter(d=>(d.kind??"text")===r):u}const o=Y(t.props,n.type),i=o&&L(n,"list").find(l=>l.key===o)?.fields||[];return r?i.filter(l=>(l.kind??"text")===r):i}function Ae(e,t){return{[f]:"",[T]:e.map(r=>({...r})),[R]:t.map(r=>({...r}))}}function G(e,t){const r=e?.[R];if(!Array.isArray(r))return[];const n=r.flatMap(o=>{if(!o||typeof o!="object")return[];const{key:i,label:l,kind:s,multiline:c}=o;if(typeof i!="string"||!i||typeof l!="string")return[];const u=s==="image"||s==="link"||s==="colour"?s:void 0;return[{key:i,label:l,...u?{kind:u}:{},...c===!0?{multiline:!0}:{}}]});return t?n.filter(o=>(o.kind??"text")===t):n}export{U as BOX_HIDE_WHEN_ROW_EMPTY,R as CARD_LIST_FIELDS,W as CARD_LIST_ITEM_BLOCKS,T as CARD_LIST_ROWS,y as CARD_LIST_TYPE,f as CARD_ROW_FIELD_PROP,v as CARD_ROW_LINK_PROP,B as CARD_TEMPLATE_BLOCKS,ce as CARD_TEMPLATE_LABEL,D as CARD_TEMPLATE_SLOT,Re as ROW_BOUND_PROPS,$ as ROW_PART_BY_WORDS,Ce as cardCopyPlace,ge as cardKeyOf,he as cardListFieldsOf,de as cardListItemSlot,Ae as cardListProps,Y as cardListShows,we as cardRow,me as cardTemplateBlocks,_e as cardTemplateCardOwner,Q as cardTemplateField,j as cardTemplateFields,L as cardTemplateFieldsOf,xe as cardTemplateLinesBetween,z as cardTemplateOwner,ue as cardTemplateSlot,be as cardTemplateTypedRows,ye as cardTemplatesNameBlocks,H as defaultListField,K as hasCardTemplate,ke as isCardTemplateBlock,m as namedRowField,fe as registerCardTemplates,q as rowBound,V as rowFieldOf,X as rowFieldText,Oe as rowFilledProps,Te as rowNextPicture,Le as rowPartByKey,Be as templateBoxIsEmpty,pe as templateOnInsert,N as templateOnRead};
1
+ import{blockSourceSpec as x,declaredBlockSource as g}from"./block-sources.js";import{isNodeList as h}from"efficient-easel/data";import{BOX_TYPE as O}from"../document/container-blocks.js";import{globalRegistry as _}from"../global-registry.js";import{nonEmptyString as w}from"../non-empty-string.js";import{accentItalicRuns as C}from"../markup.js";import{withCardsTemplate as A}from"../document/cards-template-on-read.js";import{withCardListTemplate as S}from"../document/blocks/general/CardList/item-seed.js";import{ARTICLE_BODY_BLOCK as I,withArticleBodyTemplate as E}from"../document/article-body-seed.js";import{withLogosTemplate as P}from"../document/blocks/general/Logos/card-seed.js";import{withFaqTemplate as F}from"../document/blocks/general/FAQ/card-seed.js";import{withFootprintSideTemplate as D}from"../document/blocks/general/Footprint/card-seed.js";const v="template",fe="Card template",y="CardList",B=["Text","ImageBlock","ButtonBlock","Flex"],p="rowField",W="rowLinkField";function pe(){return{type:"slot",allow:[...B]}}const M=B.filter(e=>e!=="ButtonBlock"),T="items",R="itemFields";function ye(){return{type:"slot",allow:[...M]}}const N=[{block:"OrderSummary",typedRows:"rows",linesBetween:!0,fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:"FAQ",typedRows:"items",fields:[{key:"question",label:"Question"},{key:"answer",label:"Answer",multiline:!0}],seedOnInsert:e=>F(e)},{block:"Footprint",typedRows:"offices",fields:[{key:"badge",label:"HQ"},{key:"role",label:"Role"},{key:"city",label:"City"},{key:"country",label:"Region · country"},{key:"address",label:"Address"},{key:"phone",label:"Phone"},{key:"linkLabel",label:"Button"},{key:"href",label:"Link",kind:"link"}],seed:e=>D(e)},{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=>A("Cards",e)},{block:"ProcessSteps",fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title",mark:"accentItalic"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"},{key:"specs",label:"Specs",kind:"list",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]}],blocks:[{type:y,label:"Card list"}]},{block:"Logos",fields:[{key:"label",label:"Name"},{key:"kind",label:"Kind"}],seed:e=>P(e)},{block:y,fields:[{key:"badge",label:"Highlight badge",everySource:!0}],typedRows:T,seed:e=>S(e)},{block:I,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:e=>E(e)}];function c(){return _("efficient.card-templates",()=>new Map(N.map(e=>[e.block,e])))}function me(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=w(t.typedRows);c().set(t.block,{block:t.block,fields:t.fields.map(o=>({...o})),blocks:r,typedRows:n,...t.seed?{seed:t.seed}:{},...t.seedOnInsert?{seedOnInsert:t.seedOnInsert}:{},...t.linesBetween===!0?{linesBetween:!0}:{}})}}function K(e,t){const r=e?c().get(e)?.seed:void 0;return r?r(t):t}function ke(e,t){if(!(t.template===void 0||Array.isArray(t.template)&&t.template.length===0))return t;const{template:n,...o}=t,i=e?c().get(e)?.seedOnInsert:void 0,l=i?i(o):K(e,o);return l===o?t:l}function be(){for(const e of c().values())if(e.blocks?.length)return!0;return!1}function xe(e){return c().get(e)?.blocks??[]}function ge(e){for(const t of c().values())if(t.blocks?.some(r=>r.type===e))return!0;return!1}function we(e){return typeof e=="string"&&c().get(e)?.typedRows||""}function Be(e){return typeof e=="string"&&c().get(e)?.linesBetween===!0}function j(e){return typeof e=="string"&&c().has(e)}function H(e,t){const r=c().get(e)?.fields??[];return t?r.filter(n=>(n.kind??"text")===t):r}function Y(e){return typeof e=="string"?H(e,"list")[0]?.key??"":""}function Q(e,t){return m(e)||Y(t)}function L(e,t){const r=typeof e?.type=="string"?e.type:"";if(!r)return[];const n=c().get(r)?.fields??[],o=x(g(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 U(e,t,r){return e?r?L(r).find(n=>n.key===t)??null:c().get(e)?.fields.find(n=>n.key===t)??null:null}function $(e,t){return!e||!t?null:e.fields?.find(r=>r.key===t)??U(e.ownerType,t,e.owner)}function m(e,t=p){const r=e?.[t];return typeof r=="string"?r.trim():""}function Te(e,t){return e.key||String(t+1)}function Re(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}const q="hideWhenRowEmpty";function Le(e,t){const r=e[q];return!t||!Array.isArray(r)||!r.length?!1:r.every(n=>typeof n!="string"||!t[n]?.trim())}function he(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=w(typeof i=="string"?i.trim():void 0);if(l&&l!==r.trim())return l}return""}const k={Text:{text:p},ImageBlock:{src:p},ButtonBlock:{label:p,href:W},LogoBlock:{alt:p},Breadcrumb:{currentCrumb:p}},Oe=k,V=new Set(["ButtonBlock.label","LogoBlock.alt"]);function _e(e,t,r){return X(e,t,r)&&!V.has(`${e}.${r}`)}function X(e,t,r){return z(e,t,r)!==""}function z(e,t,r){const n=k[e]?.[r];return n?m(t,n):""}function G(e,t){return!t||!e?null:e[t]??""}function Ce(e,t,r,n,o){if(!r)return t;let i=null;for(const[l,s]of Object.entries(k[e]??{})){const d=m(t,s),a=G(r,d);a!==null&&(i??={...t},i[l]=$({ownerType:n,fields:o},d)?.mark==="accentItalic"?C(a):a)}return i??t}function b(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[d,a]of Object.entries(s?.props??{})){if(!h(a))continue;const u=d===v&&j(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===O},f=n(a,u);if(f!==void 0)return f}}},o=n(r,null);return o===void 0?null:o}function J(e,t){const r=b(e,t);return r&&r.owner}function Ae(e,t){const r=b(e,t);return r&&(r.direct?r.owner:null)}function Se(e,t){const r=b(e,t);if(r!==void 0)return r===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:r.nested,underBox:r.underBox}}function Ie(e,t,r){if(t?.type!==y)return[];const n=J(e,t.props?.id);if(!n){const l=x(g(t.props))?.fields,s=l?.length?l.map(u=>({...u})):Z(t.props),d=(c().get(y)?.fields??[]).filter(u=>u.everySource&&!s.some(f=>f.key===u.key)),a=[...s,...d];return r?a.filter(u=>(u.kind??"text")===r):a}const o=Q(t.props,n.type),i=o&&L(n,"list").find(l=>l.key===o)?.fields||[];return r?i.filter(l=>(l.kind??"text")===r):i}function Ee(e,t){return{[p]:"",[T]:e.map(r=>({...r})),[R]:t.map(r=>({...r}))}}function Z(e,t){const r=e?.[R];if(!Array.isArray(r))return[];const n=r.flatMap(o=>{if(!o||typeof o!="object")return[];const{key:i,label:l,kind:s,multiline:d,alt:a,next:u}=o;if(typeof i!="string"||!i||typeof l!="string")return[];const f=s==="image"||s==="link"||s==="colour"?s:void 0;return[{key:i,label:l,...f?{kind:f}:{},...d===!0?{multiline:!0}:{},...typeof a=="string"&&a?{alt:a}:{},...typeof u=="string"&&u?{next:u}:{}}]});return t?n.filter(o=>(o.kind??"text")===t):n}export{q as BOX_HIDE_WHEN_ROW_EMPTY,R as CARD_LIST_FIELDS,M as CARD_LIST_ITEM_BLOCKS,T as CARD_LIST_ROWS,y as CARD_LIST_TYPE,p as CARD_ROW_FIELD_PROP,W as CARD_ROW_LINK_PROP,B as CARD_TEMPLATE_BLOCKS,fe as CARD_TEMPLATE_LABEL,v as CARD_TEMPLATE_SLOT,Oe as ROW_BOUND_PROPS,V as ROW_PART_BY_WORDS,Se as cardCopyPlace,Te as cardKeyOf,Ie as cardListFieldsOf,ye as cardListItemSlot,Ee as cardListProps,Q as cardListShows,Re as cardRow,xe as cardTemplateBlocks,Ae as cardTemplateCardOwner,U as cardTemplateField,H as cardTemplateFields,L as cardTemplateFieldsOf,Be as cardTemplateLinesBetween,J as cardTemplateOwner,pe as cardTemplateSlot,we as cardTemplateTypedRows,be as cardTemplatesNameBlocks,Y as defaultListField,j as hasCardTemplate,ge as isCardTemplateBlock,m as namedRowField,me as registerCardTemplates,X as rowBound,z as rowFieldOf,$ as rowFieldSpec,G as rowFieldText,Ce as rowFilledProps,he as rowNextPicture,_e as rowPartByKey,Le as templateBoxIsEmpty,ke as templateOnInsert,K as templateOnRead};
@@ -1 +1 @@
1
- import{breakpointOf as g,VIEW_LINE_PX as u}from"./view-lines.js";const k=u["view-tablet"],v=u["view-desktop"];function E(t){const e=/(?:^|\s)grid-cols-(\d+)(?=\s|$)/.exec(t);if(!e)throw new Error(`gridColumnsOf: no base grid-cols-N in "${t}"`);const o=[...t.matchAll(/(?:^|\s)(max-[\w[\]-]+):grid-cols-(\d+)(?=\s|$)/g)].flatMap(s=>{const n=g(s[1]);return n?.max?[{below:n.px,columns:Number(s[2])}]:[]}).sort((s,n)=>n.below-s.below);return{base:Number(e[1]),steps:o}}function f(t,e){return Math.max(1,Math.min(t,Math.floor(e)))}function I(t,e){return{base:f(t.base,e),steps:t.steps.map(o=>({below:o.below,columns:f(o.columns,e)}))}}const M=t=>/^0+(?:\.0+)?[a-z%]*$/i.test(t.trim());function w(t,e="0px"){const o=t<=1?"100vw":`100vw / ${t}`;return M(e)?t<=1?o:`calc(${o})`:`calc(${o} - ${e})`}function d(t,e){return[...[...t].sort((s,n)=>s.below-n.below).map(s=>`(max-width: ${s.below-.02}px) ${s.slot}`),e].join(", ")}function S(t,e,o){const s=E(t),{base:n,steps:c}=e===void 0?s:I(s,e);return d(c.map(l=>({below:l.below,slot:w(l.columns,o)})),w(n,o))}const m=t=>`${Math.ceil(t*1e4-1e-6)/100}vw`,p=t=>{const e=/^([\d.]+)vw$/.exec(t??"");return e?Math.min(1,Number(e[1])/100):1};function O(t,e){return{phone:m(t.phone*p(e?.phone)),tablet:m(t.tablet*p(e?.tablet)),desktop:m(t.desktop*p(e?.desktop))}}function z(t){if([t.phone,t.tablet,t.desktop].every(s=>p(s)>=1))return;const e=[{below:k,slot:t.phone},{below:v,slot:t.tablet}],o=e.filter((s,n)=>s.slot!==(e[n+1]?.slot??t.desktop));return d(o,t.desktop)}function x(t){const e=t.split(/,\s*(?![^()]*\))/).map(n=>n.trim()),o=[];for(const n of e.slice(0,-1)){const c=/^\(max-width:\s*([\d.]+)px\)\s+(.+)$/.exec(n);if(!c)return null;const l=Number(c[1]);if(o.length&&l<=o[o.length-1].edge)return null;o.push({edge:l,slot:c[2]})}const s=e[e.length-1];return!s||s.startsWith("(")?null:{steps:o,last:s}}const b=(t,e)=>t.steps.find(o=>e<=o.edge)?.slot??t.last,h=t=>{const e=/^min\((.+)\)$/.exec(t);return e?e[1].split(/,\s*(?![^()]*\))/).map(o=>o.trim()):[t]};function $(t,e){if(t===e)return t;const o=[...h(t),...h(e)],s=l=>{const i=o.map(r=>new RegExp(`^([\\d.]+)${l}$`).exec(r)).filter(Boolean).map(r=>Number(r[1]));return i.length?[`${Math.min(...i)}${l}`]:[]},n=[...new Set(o.filter(l=>!/^[\d.]+(vw|px)$/.test(l)))],c=[...s("vw"),...s("px"),...n];return c.length===1?c[0]:`min(${c.join(", ")})`}function _(t,e){if(!e)return t;const o=x(t),s=x(e);if(!o||!s)return t;const c=[...new Set([...o.steps,...s.steps].map(r=>r.edge))].sort((r,a)=>r-a).map(r=>({edge:r,slot:$(b(o,r),b(s,r))})),l=$(o.last,s.last);return[...c.filter((r,a)=>r.slot!==(c[a+1]?.slot??l)).map(r=>`(max-width: ${r.edge}px) ${r.slot}`),l].join(", ")}export{O as boundOf,d as cardImageSizes,w as cardImageSlot,z as cellPictureSizesOf,I as fillRow,f as fillRowColumns,S as gridClassImageSizes,E as gridColumnsOf,_ as narrowerSizes};
1
+ import{breakpointOf as $,PHONE_EDGE as g,VIEW_LINE_PX as k}from"./view-lines.js";const v=k["view-desktop"];function E(t){const e=/(?:^|\s)grid-cols-(\d+)(?=\s|$)/.exec(t);if(!e)throw new Error(`gridColumnsOf: no base grid-cols-N in "${t}"`);const o=[...t.matchAll(/(?:^|\s)(max-[\w[\]-]+):grid-cols-(\d+)(?=\s|$)/g)].flatMap(s=>{const n=$(s[1]);return n?.max?[{below:n.px,columns:Number(s[2])}]:[]}).sort((s,n)=>n.below-s.below);return{base:Number(e[1]),steps:o}}function u(t,e){return Math.max(1,Math.min(t,Math.floor(e)))}function N(t,e){return{base:u(t.base,e),steps:t.steps.map(o=>({below:o.below,columns:u(o.columns,e)}))}}const O=t=>/^0+(?:\.0+)?[a-z%]*$/i.test(t.trim());function f(t,e="0px"){const o=t<=1?"100vw":`100vw / ${t}`;return O(e)?t<=1?o:`calc(${o})`:`calc(${o} - ${e})`}function w(t,e){return[...[...t].sort((s,n)=>s.below-n.below).map(s=>`(max-width: ${s.below-.02}px) ${s.slot}`),e].join(", ")}function M(t,e,o){const s=E(t),{base:n,steps:p}=e===void 0?s:N(s,e);return w(p.map(l=>({below:l.below,slot:f(l.columns,o)})),f(n,o))}const m=t=>`${Math.ceil(t*1e4-1e-6)/100}vw`,c=t=>{const e=/^([\d.]+)vw$/.exec(t??"");return e?Math.min(1,Number(e[1])/100):1};function I(t,e){return{phone:m(t.phone*c(e?.phone)),tablet:m(t.tablet*c(e?.tablet)),desktop:m(t.desktop*c(e?.desktop))}}function z(t){if([t.phone,t.tablet,t.desktop].every(s=>c(s)>=1))return;const e=[{below:g,slot:t.phone},{below:v,slot:t.tablet}],o=e.filter((s,n)=>s.slot!==(e[n+1]?.slot??t.desktop));return w(o,t.desktop)}function d(t){const e=t.split(/,\s*(?![^()]*\))/).map(n=>n.trim()),o=[];for(const n of e.slice(0,-1)){const p=/^\(max-width:\s*([\d.]+)px\)\s+(.+)$/.exec(n);if(!p)return null;const l=Number(p[1]);if(o.length&&l<=o[o.length-1].edge)return null;o.push({edge:l,slot:p[2]})}const s=e[e.length-1];return!s||s.startsWith("(")?null:{steps:o,last:s}}const x=(t,e)=>t.steps.find(o=>e<=o.edge)?.slot??t.last,b=t=>{const e=/^min\((.+)\)$/.exec(t);return e?e[1].split(/,\s*(?![^()]*\))/).map(o=>o.trim()):[t]};function h(t,e){if(t===e)return t;const o=[...b(t),...b(e)],s=l=>{const i=o.map(r=>new RegExp(`^([\\d.]+)${l}$`).exec(r)).filter(Boolean).map(r=>Number(r[1]));return i.length?[`${Math.min(...i)}${l}`]:[]},n=[...new Set(o.filter(l=>!/^[\d.]+(vw|px)$/.test(l)))],p=[...s("vw"),...s("px"),...n];return p.length===1?p[0]:`min(${p.join(", ")})`}function _(t,e){if(!e)return t;const o=d(t),s=d(e);if(!o||!s)return t;const p=[...new Set([...o.steps,...s.steps].map(r=>r.edge))].sort((r,a)=>r-a).map(r=>({edge:r,slot:h(x(o,r),x(s,r))})),l=h(o.last,s.last);return[...p.filter((r,a)=>r.slot!==(p[a+1]?.slot??l)).map(r=>`(max-width: ${r.edge}px) ${r.slot}`),l].join(", ")}export{I as boundOf,w as cardImageSizes,f as cardImageSlot,z as cellPictureSizesOf,N as fillRow,u as fillRowColumns,M as gridClassImageSizes,E as gridColumnsOf,_ as narrowerSizes};
@@ -6,6 +6,7 @@ export interface FootprintOffice {
6
6
  city: string;
7
7
  country: string;
8
8
  address?: string;
9
+ phone?: string;
9
10
  lat: number;
10
11
  lng: number;
11
12
  geocode?: GeocodeState;
@@ -16,6 +17,7 @@ export interface FootprintOffice {
16
17
  }
17
18
  export declare function footprintOfficeOfRow(row: Readonly<Record<string, string>>): FootprintOffice;
18
19
  export declare function footprintCardRow(office: FootprintOffice): Record<string, string>;
20
+ export declare function footprintSearchText(office: FootprintOffice): string;
19
21
  export interface FootprintContent {
20
22
  sectionNumber: string;
21
23
  heading: string;
@@ -1 +1 @@
1
- import{hasMapCoords as a,mapCoordOfText as e}from"../map-styles.js";const s=/^https?:\/\//i;function h(t){const r=(t.href??"").trim(),n=(t.linkLabel??"").trim();return{role:t.role??"",city:t.city??"",country:t.country??"",address:t.address??"",hq:t.hq==="true",lat:e(t.lat),lng:e(t.lng),...r&&n&&s.test(r)?{href:r,linkLabel:n}:{}}}function i(t){const r=n=>typeof n=="string"?n:"";return{badge:t.hq?"HQ":"",role:r(t.role),city:r(t.city),country:r(t.country),address:r(t.address),...t.href&&t.linkLabel?{href:t.href,linkLabel:t.linkLabel}:{}}}const p={sectionNumber:"",heading:"",tagline:"",mapTheme:"auto"};function u(t){const r=[];return t.forEach((n,l)=>{a(n.lat,n.lng)&&r.push({key:String(l),label:n.city||n.role||"Office",lat:n.lat,lng:n.lng,glyph:"",tone:"",...n.hq?{badge:"HQ"}:{}})}),r}export{p as FOOTPRINT_DEFAULTS,i as footprintCardRow,h as footprintOfficeOfRow,u as footprintPins};
1
+ import{hasMapCoords as a,mapCoordOfText as e}from"../map-styles.js";const o=/^https?:\/\//i;function p(t){const n=(t.href??"").trim(),r=(t.linkLabel??"").trim();return{role:t.role??"",city:t.city??"",country:t.country??"",address:t.address??"",hq:t.hq==="true",lat:e(t.lat),lng:e(t.lng),...n&&r&&o.test(n)?{href:n,linkLabel:r}:{}}}function h(t){const n=r=>typeof r=="string"?r:"";return{badge:t.hq?"HQ":"",role:n(t.role),city:n(t.city),country:n(t.country),address:n(t.address),phone:n(t.phone),...t.href&&t.linkLabel?{href:t.href,linkLabel:t.linkLabel}:{}}}function i(t){return[t.city,t.country,t.address,t.role].map(n=>typeof n=="string"?n.replace(/[=*]/g,"").trim():"").filter(Boolean).join(" ")}const u={sectionNumber:"",heading:"",tagline:"",mapTheme:"auto"};function d(t){const n=[];return t.forEach((r,l)=>{a(r.lat,r.lng)&&n.push({key:String(l),label:r.city||r.role||"Office",lat:r.lat,lng:r.lng,glyph:"",tone:"",...r.hq?{badge:"HQ"}:{}})}),n}export{u as FOOTPRINT_DEFAULTS,h as footprintCardRow,p as footprintOfficeOfRow,d as footprintPins,i as footprintSearchText};
@@ -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", "story", "poster", "auto"];
2
+ export declare const GALLERY_CARD_RATIOS: readonly ["square", "tall", "wide", "landscape", "portrait", "video", "panorama", "story", "poster", "screen", "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;
@@ -44,6 +44,11 @@ export declare const SHAPE_TABLE: readonly [{
44
44
  readonly image: "4/3";
45
45
  readonly ratio: readonly [4, 3];
46
46
  readonly label: "Landscape 4:3";
47
+ }, {
48
+ readonly shape: "screen";
49
+ readonly image: "16/10";
50
+ readonly ratio: readonly [16, 10];
51
+ readonly label: "Screen 16:10";
47
52
  }, {
48
53
  readonly shape: "video";
49
54
  readonly image: "16/9";
@@ -1 +1 @@
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};
1
+ import{normalisePlacement as s,placementParts as o}from"../hero-group-placement.js";import{scrim as t}from"./scrim.js";const g=["square","tall","wide","landscape","portrait","video","panorama","story","poster","screen","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"screen":return"aspect-[16/10]";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:"screen",image:"16/10",ratio:[16,10],label:"Screen 16:10"},{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}=o(s(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 x(e){return[l,c,i][o(s(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};
@@ -0,0 +1,30 @@
1
+ import type { HoverMediaGroup, HoverMediaKind } from "../animation/hover.js";
2
+ export declare const HOVER_MEDIA_LIMIT = 8;
3
+ export type HoverMediaItem = {
4
+ url?: string;
5
+ kind?: string;
6
+ };
7
+ export type HoverMediaGroupRow = {
8
+ finish?: string;
9
+ items?: readonly HoverMediaItem[];
10
+ };
11
+ type ZoneKind = Exclude<HoverMediaKind, "renderings">;
12
+ export type HoverMediaRow = {
13
+ hoverMedia?: Partial<Record<ZoneKind, readonly HoverMediaGroupRow[] | undefined>> | null;
14
+ finishes?: readonly {
15
+ name?: string;
16
+ angles?: readonly string[];
17
+ }[] | null;
18
+ };
19
+ export type HoverMediaPick = {
20
+ kind: HoverMediaKind;
21
+ fit: "cover" | "contain";
22
+ urls: readonly string[];
23
+ };
24
+ export declare function pickHoverMedia(row: HoverMediaRow | null | undefined, media: {
25
+ kind: HoverMediaKind;
26
+ group: HoverMediaGroup;
27
+ }, finish?: string): HoverMediaPick | null;
28
+ export declare function hoverArrowLabel(direction: "prev" | "next", name: string): string;
29
+ export declare function hoverMediaCount(index: number, count: number): string;
30
+ export {};
@@ -0,0 +1 @@
1
+ import{nonEmptyString as f}from"../non-empty-string.js";const a=8,c=(t,n)=>!!t&&!!n&&t.trim().toLowerCase()===n.trim().toLowerCase(),l=(t,n,e)=>{if(e){const o=n(e);if(o.length>0)return o}for(const o of t){const r=n(o);if(r.length>0)return r}return[]},d=t=>(t.items??[]).flatMap(n=>{const e=n.kind==="image"?f(n.url):void 0;return e?[e]:[]}),g=t=>(t.angles??[]).flatMap(n=>{const e=f(n);return e?[e]:[]});function h(t,n,e){if(!t)return null;const o=n.group==="finish";let r;if(n.kind==="renderings"){const i=t.finishes??[],s=o?i.find(u=>c(u.name,e)):void 0;r=l(i,g,s)}else{const i=t.hoverMedia?.[n.kind]??[],s=o?i.find(u=>c(u.finish,e)):void 0;r=l(i,d,s)}return r.length===0?null:{kind:n.kind,fit:n.kind==="renderings"?"contain":"cover",urls:r.slice(0,a)}}function m(t,n){return`${t==="prev"?"Previous":"Next"} photo of ${n}`}function k(t,n){return`Photo ${t+1} of ${n}`}export{a as HOVER_MEDIA_LIMIT,m as hoverArrowLabel,k as hoverMediaCount,h as pickHoverMedia};
@@ -20,9 +20,9 @@ declare const FILL_ROW_CLASSES: {
20
20
  readonly figure: "view-wide:h-full";
21
21
  };
22
22
  readonly tablet: {
23
- readonly frame: "view-tablet:h-full view-tablet:min-h-[240px] view-tablet:aspect-auto!";
24
- readonly img: "view-tablet:absolute view-tablet:inset-0";
25
- readonly figure: "view-tablet:h-full";
23
+ readonly frame: "view-wide:h-full view-wide:min-h-[240px]";
24
+ readonly img: "view-wide:absolute view-wide:inset-0";
25
+ readonly figure: "view-wide:h-full";
26
26
  };
27
27
  readonly desktop: {
28
28
  readonly frame: "view-desktop:h-full view-desktop:min-h-[240px] max-view-desktop:aspect-[4/3]";
@@ -1 +1 @@
1
- import{BOX_GIVES_PICTURES_A_HEIGHT as v}from"./box-layout.js";import{imageIsCropped as c,parseImageFit as n}from"./image-fit.js";import{SHAPE_TABLE as p}from"./gallery-card-layout.js";const f=p.map(e=>e.image),a="fill",E={label:"Fill row",value:a,showWhen:v},r="4/3",d={all:{frame:"h-full min-h-[240px]",img:"absolute inset-0",figure:"h-full"},wide:{frame:"view-wide:h-full view-wide:min-h-[240px]",img:"view-wide:absolute view-wide:inset-0",figure:"view-wide:h-full"},tablet:{frame:"view-tablet:h-full view-tablet:min-h-[240px] view-tablet:aspect-auto!",img:"view-tablet:absolute view-tablet:inset-0",figure:"view-tablet:h-full"},desktop:{frame:"view-desktop:h-full view-desktop:min-h-[240px] max-view-desktop:aspect-[4/3]",img:"view-desktop:absolute view-desktop:inset-0",figure:"view-desktop:h-full"}};function F(e,t,i){return t&&!s(i)?"all":e??"wide"}function u(e){return d[e]}const x={auto:"","3/4":"aspect-[3/4]","2/1":"aspect-[2/1]","21/9":"aspect-[21/9]","16/9":"aspect-[16/9]","4/3":"aspect-[4/3]","1/1":"aspect-square","9/16":"aspect-[9/16]","2/3":"aspect-[2/3]","4/5":"aspect-[4/5]"},g={auto:"","3/4":"view-wide:aspect-[3/4]","2/1":"view-wide:aspect-[2/1]","21/9":"view-wide:aspect-[21/9]","16/9":"view-wide:aspect-[16/9]","4/3":"view-wide:aspect-[4/3]","1/1":"view-wide:aspect-square","9/16":"view-wide:aspect-[9/16]","2/3":"view-wide:aspect-[2/3]","4/5":"view-wide:aspect-[4/5]"},A={auto:"","3/4":"max-view-wide:aspect-[3/4]","2/1":"max-view-wide:aspect-[2/1]","21/9":"max-view-wide:aspect-[21/9]","16/9":"max-view-wide:aspect-[16/9]","4/3":"max-view-wide:aspect-[4/3]","1/1":"max-view-wide:aspect-square","9/16":"max-view-wide:aspect-[9/16]","2/3":"max-view-wide:aspect-[2/3]","4/5":"max-view-wide:aspect-[4/5]"},_={auto:"max-view-wide:aspect-auto!","3/4":"max-view-wide:aspect-[3/4]!","2/1":"max-view-wide:aspect-[2/1]!","21/9":"max-view-wide:aspect-[21/9]!","16/9":"max-view-wide:aspect-[16/9]!","4/3":"","1/1":"max-view-wide:aspect-square!","9/16":"max-view-wide:aspect-[9/16]!","2/3":"max-view-wide:aspect-[2/3]!","4/5":"max-view-wide:aspect-[4/5]!"},w=e=>f.includes(e),s=w;function h(e){const t=w(e)?p.find(i=>i.image===e)?.ratio:null;return t?`${t[0]} / ${t[1]}`:null}function P(e,t,i){return i==="contain"?!0:[e,t??e].every(o=>o!==a&&(!w(o)||o==="auto"))}function S(e,t){return e===a&&!t?r:e}function k(e){return e===a?r:s(e)?e:void 0}function l(e,t){return s(t)?t===e?null:t:e===a?r:null}function L(e,t){const i=l(e,t);return c(e,"cover")||i!==null&&c(i,"cover")}function O(e,t,i){return n(e,"cover")==="cover"&&L(t,i)}function C(e,t,i,o){return e==="desktop"?O(t,i,o):n(t,"cover")!=="cover"?!1:m(e==="tablet"?i:l(i,o)??i)}const m=e=>e===a||s(e)&&e!=="auto";function B(e,t,i="wide"){return e===a&&i==="all"?u("all").frame:t===null?s(e)?x[e]:"":[e===a?u(i).frame:s(e)?g[e]:"",e===a&&i==="desktop"?_[t]:A[t]].filter(Boolean).join(" ")}export{a as FILL_ROW,E as FILL_ROW_OPTION,B as imageAspectClasses,S as imageAspectDrawn,L as imageAspectDrawsARatio,l as imageAspectPhoneOf,k as imageAspectPhoneRest,F as imageFillFrom,u as imageFillRowClasses,O as imageFocalPointActs,C as imageFocalPointActsIn,h as imageRatioAspect,P as imageWidthFollowsBox,w as isImageRatio};
1
+ import{BOX_GIVES_PICTURES_A_HEIGHT as v}from"./box-layout.js";import{imageIsCropped as w,parseImageFit as n}from"./image-fit.js";import{SHAPE_TABLE as p}from"./gallery-card-layout.js";const f=p.map(e=>e.image),a="fill",P={label:"Fill row",value:a,showWhen:v},r="4/3",u={frame:"view-wide:h-full view-wide:min-h-[240px]",img:"view-wide:absolute view-wide:inset-0",figure:"view-wide:h-full"},x={all:{frame:"h-full min-h-[240px]",img:"absolute inset-0",figure:"h-full"},wide:u,tablet:u,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 S(e,i,t){return i&&!o(t)?"all":e??"wide"}function m(e){return x[e]}const _={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]","16/10":"aspect-[16/10]","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]","16/10":"view-wide:aspect-[16/10]","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]","16/10":"max-view-wide:aspect-[16/10]","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]"},L={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":"","16/10":"max-view-wide:aspect-[16/10]!","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]!"},c=e=>f.includes(e),o=c;function h(e){const i=c(e)?p.find(t=>t.image===e)?.ratio:null;return i?`${i[0]} / ${i[1]}`:null}function k(e,i,t){return t==="contain"?!0:[e,i??e].every(s=>s!==a&&(!c(s)||s==="auto"))}function C(e,i){return e===a&&!i?r:e}function B(e){return e===a?r:o(e)?e:void 0}function l(e,i){return o(i)?i===e?null:i:e===a?r:null}function O(e,i){const t=l(e,i);return w(e,"cover")||t!==null&&w(t,"cover")}function I(e,i,t){return n(e,"cover")==="cover"&&O(i,t)}function W(e,i,t,s){return e==="desktop"?I(i,t,s):n(i,"cover")!=="cover"?!1:d(e==="tablet"?t:l(t,s)??t)}const d=e=>e===a||o(e)&&e!=="auto";function T(e,i,t="wide"){return e===a&&t==="all"?m("all").frame:i===null?o(e)?_[e]:"":[e===a?m(t).frame:o(e)?g[e]:"",e===a&&t==="desktop"?L[i]:A[i]].filter(Boolean).join(" ")}export{a as FILL_ROW,P as FILL_ROW_OPTION,T as imageAspectClasses,C as imageAspectDrawn,O as imageAspectDrawsARatio,l as imageAspectPhoneOf,B as imageAspectPhoneRest,S as imageFillFrom,m as imageFillRowClasses,I as imageFocalPointActs,W as imageFocalPointActsIn,h as imageRatioAspect,k as imageWidthFollowsBox,c as isImageRatio};
@@ -33,4 +33,7 @@ export type InkSource = Readonly<Record<InkRole, string>>;
33
33
  export declare function inkStyle(source: InkSource): Record<string, string>;
34
34
  export declare const ON_MEDIA_INK: InkSource;
35
35
  export declare const ON_MEDIA_INK_STYLE: Readonly<Record<string, string>>;
36
+ export declare const ON_LIGHT_INK: InkSource;
37
+ export declare const ON_LIGHT_INK_STYLE: Readonly<Record<string, string>>;
38
+ export declare function rowFillInkStyle(fill: string | null | undefined): Readonly<Record<string, string>> | null;
36
39
  export {};