efficient-web-builder 51.0.0 → 53.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 (194) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/dist/editor/components/ChatSettingsPanel.js +1 -1
  3. package/dist/editor/components/MediaUploadField.d.ts +7 -7
  4. package/dist/editor/components/MediaUploadField.js +1 -1
  5. package/dist/editor/components/PartSettingsPanel.js +1 -1
  6. package/dist/editor/components/PartTextBox.js +1 -1
  7. package/dist/editor/components/PreviewPartAnchors.js +1 -1
  8. package/dist/editor/components/PreviewPartStyleContext.d.ts +2 -2
  9. package/dist/editor/components/SectionTextPartBridge.js +1 -1
  10. package/dist/editor/components/SiteAccentField.js +1 -1
  11. package/dist/editor/components/SiteTextStylesField.d.ts +3 -2
  12. package/dist/editor/components/SiteTextStylesField.js +1 -1
  13. package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
  14. package/dist/editor/components/storefront-editor.css +82 -64
  15. package/dist/editor/lib/animation/entrance-fields.js +1 -1
  16. package/dist/editor/lib/animation/hover-fields.js +1 -1
  17. package/dist/editor/lib/document/ColourControl.d.ts +11 -8
  18. package/dist/editor/lib/document/ColourControl.js +1 -1
  19. package/dist/editor/lib/document/blocks/general/Breadcrumb/fields.js +1 -1
  20. package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
  21. package/dist/editor/lib/document/blocks/general/Cards/fields.js +1 -1
  22. package/dist/editor/lib/document/blocks/general/Chart/fields.js +1 -1
  23. package/dist/editor/lib/document/blocks/general/Contents/fields.js +1 -1
  24. package/dist/editor/lib/document/blocks/general/Divider/fields.js +1 -1
  25. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  26. package/dist/editor/lib/document/blocks/general/Hero/fields.js +1 -1
  27. package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
  28. package/dist/editor/lib/document/blocks/general/HeroSlide/fields.js +1 -1
  29. package/dist/editor/lib/document/blocks/general/ImageBlock/fields.js +1 -1
  30. package/dist/editor/lib/document/blocks/general/IntroBleed/fields.js +1 -1
  31. package/dist/editor/lib/document/blocks/general/Logos/fields.js +1 -1
  32. package/dist/editor/lib/document/blocks/general/Mockup/fields.js +2 -2
  33. package/dist/editor/lib/document/blocks/general/PostCard/fields.js +1 -1
  34. package/dist/editor/lib/document/blocks/general/SectionHeader/fields.js +1 -1
  35. package/dist/editor/lib/document/blocks/general/Series/fields.js +1 -1
  36. package/dist/editor/lib/document/blocks/general/StatsParagraph/fields.js +1 -1
  37. package/dist/editor/lib/document/blocks/general/Timeline/fields.js +1 -1
  38. package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
  39. package/dist/editor/lib/document/blocks/shared-fields.d.ts +5 -0
  40. package/dist/editor/lib/document/blocks/shared-fields.js +1 -1
  41. package/dist/editor/lib/document/box-fields.d.ts +23 -2
  42. package/dist/editor/lib/document/box-fields.js +1 -1
  43. package/dist/editor/lib/document/card-row-fields.js +1 -1
  44. package/dist/editor/lib/document/choice-pictures.d.ts +21 -0
  45. package/dist/editor/lib/document/choice-pictures.js +1 -0
  46. package/dist/editor/lib/document/controls.d.ts +33 -9
  47. package/dist/editor/lib/document/controls.js +1 -1
  48. package/dist/editor/lib/document/hidable-rows-drawn.d.ts +1 -0
  49. package/dist/editor/lib/document/hidable-rows-drawn.js +1 -1
  50. package/dist/editor/lib/document/overrides.js +1 -1
  51. package/dist/editor/lib/document/part-panel-rows.d.ts +1 -0
  52. package/dist/editor/lib/document/part-panel-rows.js +1 -1
  53. package/dist/editor/lib/document/passes/inspector.js +1 -1
  54. package/dist/editor/lib/document/separator-field.d.ts +9 -1
  55. package/dist/editor/lib/document/separator-field.js +1 -1
  56. package/dist/editor/lib/document/shape-picker.d.ts +37 -0
  57. package/dist/editor/lib/document/shape-picker.js +1 -0
  58. package/dist/editor/lib/document/show-for-field.d.ts +6 -0
  59. package/dist/editor/lib/document/show-for-field.js +1 -0
  60. package/dist/format/lib/animation/hover.d.ts +0 -2
  61. package/dist/format/lib/animation/hover.js +1 -1
  62. package/dist/format/lib/content/borders.d.ts +4 -2
  63. package/dist/format/lib/content/borders.js +1 -1
  64. package/dist/format/lib/content/box-layout.d.ts +21 -6
  65. package/dist/format/lib/content/box-layout.js +1 -1
  66. package/dist/format/lib/content/box-shape.d.ts +1 -5
  67. package/dist/format/lib/content/box-shape.js +1 -1
  68. package/dist/format/lib/content/box-show-for-choices.d.ts +9 -0
  69. package/dist/format/lib/content/box-show-for-choices.js +1 -0
  70. package/dist/format/lib/content/button-icon.d.ts +1 -1
  71. package/dist/format/lib/content/button-icon.js +1 -1
  72. package/dist/format/lib/content/card-state.d.ts +8 -0
  73. package/dist/format/lib/content/card-state.js +1 -0
  74. package/dist/format/lib/content/card-template.js +1 -1
  75. package/dist/format/lib/content/gallery-card-layout.d.ts +45 -1
  76. package/dist/format/lib/content/gallery-card-layout.js +1 -1
  77. package/dist/format/lib/content/image-aspect.d.ts +47 -0
  78. package/dist/format/lib/content/image-aspect.js +1 -0
  79. package/dist/format/lib/content/list-number.d.ts +11 -0
  80. package/dist/format/lib/content/list-number.js +1 -1
  81. package/dist/format/lib/content/phone-focus.d.ts +4 -1
  82. package/dist/format/lib/content/phone-focus.js +1 -1
  83. package/dist/format/lib/content/record-row.d.ts +14 -0
  84. package/dist/format/lib/content/record-row.js +1 -0
  85. package/dist/format/lib/content/record-types.d.ts +1 -1
  86. package/dist/format/lib/content/record-types.js +1 -1
  87. package/dist/format/lib/content/section-background.d.ts +10 -3
  88. package/dist/format/lib/content/section-background.js +1 -1
  89. package/dist/format/lib/content/section-height.d.ts +8 -0
  90. package/dist/format/lib/content/section-height.js +1 -1
  91. package/dist/format/lib/content/section-min-height.d.ts +17 -1
  92. package/dist/format/lib/content/section-min-height.js +1 -1
  93. package/dist/format/lib/content/section-sticky.d.ts +9 -0
  94. package/dist/format/lib/content/section-sticky.js +1 -1
  95. package/dist/format/lib/document/blocks/general/text-part-shapes.json +2 -2
  96. package/dist/format/lib/document/card-template-layers.d.ts +1 -1
  97. package/dist/format/lib/document/card-template-layers.js +1 -1
  98. package/dist/format/lib/document/media-manifest.json +5 -2
  99. package/dist/format/lib/document/mockup-variant-fields.d.ts +1 -0
  100. package/dist/format/lib/document/mockup-variant-fields.js +1 -1
  101. package/dist/format/lib/document/part-inks.d.ts +5 -10
  102. package/dist/format/lib/document/part-inks.js +1 -1
  103. package/dist/format/lib/document/passes/types.d.ts +1 -0
  104. package/dist/format/lib/document/section-catalog.js +2 -2
  105. package/dist/format/lib/document/section-descriptions.js +1 -1
  106. package/dist/format/lib/document/show-when-attach.d.ts +2 -1
  107. package/dist/format/lib/document/show-when-attach.js +1 -1
  108. package/dist/format/lib/editor-words-catalogue.d.ts +25 -14
  109. package/dist/format/lib/editor-words-catalogue.js +4 -4
  110. package/dist/format/lib/fonts.js +1 -1
  111. package/dist/format/lib/sections/divider-style.d.ts +4 -0
  112. package/dist/format/lib/sections/divider-style.js +1 -1
  113. package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
  114. package/dist/format/lib/sections/section-presets.js +1 -1
  115. package/dist/format/lib/source-rules/editor-words.js +2 -2
  116. package/dist/format/lib/source-rules/mirrored-rows-agree.js +4 -4
  117. package/dist/format/lib/source-rules/panel-rows-use-the-shared-row.d.ts +4 -0
  118. package/dist/format/lib/source-rules/panel-rows-use-the-shared-row.js +37 -20
  119. package/dist/format/lib/source-rules/shape-rows-use-the-picker.d.ts +7 -0
  120. package/dist/format/lib/source-rules/shape-rows-use-the-picker.js +2 -0
  121. package/dist/format/lib/source-rules/support/part-slider-call-sites.d.ts +0 -1
  122. package/dist/format/lib/source-rules/support/part-slider-call-sites.js +6 -6
  123. package/dist/format/lib/text-styles/site-text-colours.d.ts +4 -0
  124. package/dist/format/lib/text-styles/site-text-colours.js +1 -0
  125. package/dist/format/lib/theme.d.ts +1 -0
  126. package/dist/format/lib/theme.js +3 -3
  127. package/dist/format/lib/word-styles.d.ts +0 -1
  128. package/dist/format/lib/word-styles.js +1 -1
  129. package/dist/render/components/Breadcrumb.d.ts +2 -1
  130. package/dist/render/components/Breadcrumb.js +1 -1
  131. package/dist/render/components/ButtonBlock.d.ts +1 -0
  132. package/dist/render/components/ButtonBlock.js +1 -1
  133. package/dist/render/components/CardRowContext.d.ts +6 -3
  134. package/dist/render/components/CardRowContext.js +1 -1
  135. package/dist/render/components/ContentsList.d.ts +4 -1
  136. package/dist/render/components/ContentsList.js +1 -1
  137. package/dist/render/components/CurrentRecord.d.ts +23 -0
  138. package/dist/render/components/CurrentRecord.js +1 -0
  139. package/dist/render/components/Flex.d.ts +3 -2
  140. package/dist/render/components/Flex.js +1 -1
  141. package/dist/render/components/HeroPictures.d.ts +2 -0
  142. package/dist/render/components/HeroPictures.js +1 -1
  143. package/dist/render/components/HeroPoster.d.ts +2 -1
  144. package/dist/render/components/HeroPoster.js +1 -1
  145. package/dist/render/components/HeroSection.d.ts +2 -1
  146. package/dist/render/components/HeroSection.js +1 -1
  147. package/dist/render/components/HeroSingle.d.ts +3 -1
  148. package/dist/render/components/HeroSingle.js +1 -1
  149. package/dist/render/components/HeroSlide.d.ts +3 -1
  150. package/dist/render/components/HeroSlide.js +1 -1
  151. package/dist/render/components/ImageBlock.d.ts +5 -3
  152. package/dist/render/components/ImageBlock.js +1 -1
  153. package/dist/render/components/InBoxContext.d.ts +3 -0
  154. package/dist/render/components/SiteGutterFrame.d.ts +1 -0
  155. package/dist/render/components/SiteGutterFrame.js +1 -1
  156. package/dist/render/components/goldPhrases.js +2 -2
  157. package/dist/render/lib/content/block-size.d.ts +3 -0
  158. package/dist/render/lib/content/block-size.js +1 -1
  159. package/dist/render/lib/content/box-shared-columns.js +1 -1
  160. package/dist/render/lib/content/box-show-for.d.ts +14 -0
  161. package/dist/render/lib/content/box-show-for.js +1 -0
  162. package/dist/render/lib/content/page-contents.d.ts +1 -0
  163. package/dist/render/lib/content/page-contents.js +1 -1
  164. package/dist/render/lib/content/picture-focus-rows.d.ts +13 -0
  165. package/dist/render/lib/content/picture-focus-rows.js +1 -0
  166. package/dist/render/lib/document/blocks/general/Breadcrumb/render.js +1 -1
  167. package/dist/render/lib/document/blocks/general/Cards/render.js +1 -1
  168. package/dist/render/lib/document/blocks/general/Contents/render.js +1 -1
  169. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  170. package/dist/render/lib/document/blocks/general/Hero/render.js +1 -1
  171. package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
  172. package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
  173. package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
  174. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +2 -0
  175. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  176. package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -1
  177. package/dist/render/lib/document/blocks/general/section-to-box-rows-stats.js +1 -1
  178. package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.js +2 -2
  179. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  180. package/dist/render/lib/document/part-styles.d.ts +21 -7
  181. package/dist/render/lib/document/part-styles.js +2 -2
  182. package/dist/render/lib/document/passes/block-size.js +1 -1
  183. package/dist/render/lib/document/passes/borders.js +1 -1
  184. package/dist/render/lib/document/passes/index.js +1 -1
  185. package/dist/render/lib/document/passes/section-height.js +1 -1
  186. package/dist/render/lib/document/passes/section-sticky.js +1 -1
  187. package/dist/render/lib/document/passes/show-for.d.ts +2 -0
  188. package/dist/render/lib/document/passes/show-for.js +1 -0
  189. package/dist/render/lib/document/show-when.d.ts +1 -1
  190. package/dist/render/lib/document/show-when.js +1 -1
  191. package/dist/render/lib/text-styles/site-text-styles.js +2 -2
  192. package/package.json +3 -3
  193. package/dist/editor/components/PartInkControl.d.ts +0 -7
  194. package/dist/editor/components/PartInkControl.js +0 -1
@@ -1 +1 @@
1
- import{Fragment as g,jsx as s,jsxs as eo}from"react/jsx-runtime";import{useId as Ie}from"react";import{parseHexColor as Me}from"efficient-shell/format";import We from"./BoxTabs.js";import{BoxTabPaneContext as je,useIsTabPane as He}from"./BoxTabPaneContext.js";import{CellFillContext as Ue,InBoxContext as Xe,useCellOfStretchedRow as Ge,useFillsCell as ze}from"./InBoxContext.js";import Je,{InsideSiteColumn as Jo,useInsideSiteGutter as Ke,useSectionRoot as Ye}from"./SiteGutterFrame.js";import{BoxSurfaceProvider as qe}from"./BoxSurfaceContext.js";import Qe from"./PictureWash.js";import{BoxCellWidthContext as Ve}from"./BoxCellWidthContext.js";import{useInSiteHeader as Ze}from"./PhoneMenuTools.js";import{useCardRow as os}from"./CardRowContext.js";import{framesItsCards as es}from"../../format/lib/content/card-place.js";import{MirrorContext as ss,useMirroredCopy as ts,useUnderCardBox as rs}from"./MirrorContext.js";import{isMirroredCopy as ns,mirrorCardsActs as ls,mirroredBoxClass as as,MIRROR_ROW_CLASS as cs,ownsCard as ms}from"../../format/lib/content/mirror-cards.js";import{FRAME_BASE as so,FRAME_GUTTER as to}from"./BlockFrame.js";import{containerGapProps as is}from"../../format/lib/content/container-gap.js";import{boxLayoutClasses as us,boxBlockSpacingClass as ds,boxFitContentClass as fs,boxRowColumnsClass as Cs,boxRowTabletColumnsClass as ps,boxRowTabletShareClass as Ss,boxPhoneRowClasses as L,boxPhoneRowFits as bs,boxShareClasses as F,boxWrapClass as xs}from"../../format/lib/content/box-layout.js";import{boxSeparatorClasses as hs,boxSeparatorSeamClass as $s,boxSeparatorStyle as _s,isStripBox as Ps}from"../../format/lib/content/box-separator.js";import{DEFAULT_LOOP_DELAY as Rs,DEFAULT_LOOP_DIRECTION as ys,DEFAULT_LOOP_SECONDS as Ls,isVerticalLoop as As}from"../../format/lib/animation/index.js";import{LoopTrack as ws}from"../lib/animation/LoopTrack.js";import{BOX_CARD_PAD as m,BOX_OWNS_SIDES_CLASS as Os,boxDarkenStyle as Bs,boxPlacementClasses as Ts,CARD_SHADOW_CLASS as vs,isBackgroundBox as Ko}from"../../format/lib/content/box-background.js";import{boxShadowAttrs as Yo}from"../../format/lib/content/box-shadow.js";import{boxRunsEdgeToEdge as Ns,drawsSiteGutter as Es}from"../../format/lib/content/site-gutter.js";import{boxShapeClass as ks,boxShapeClasses as gs}from"../../format/lib/content/box-shape.js";import{BOX_JUMP_ATTR as Fs,BOX_LINK_ATTR as qo,BOX_LINK_CLASS as Qo,BOX_LINKED_CLASS as Ds,boxJumpBlocksClass as Is,boxJumpCss as Ms,boxJumpSlug as Ws,boxLinkOf as js}from"../../format/lib/content/box-link.js";import{SiteLink as Hs}from"../lib/site-runtime.js";import{sectionBorderStyle as Vo}from"../../format/lib/content/borders.js";import{finiteNumber as i}from"../../format/lib/finite-number.js";import{sectionPadAttrs as Us}from"../lib/content/section-padding.js";import{SECTION_FILL_CLASS as D}from"../../format/lib/content/section-min-height.js";import{ON_MEDIA_INK_STYLE as Xs}from"../../format/lib/content/ink.js";import{sizedBackground as ro}from"../../format/lib/sized-image.js";import{PHOTO_HOST_ATTR as Gs,resolveImageTreatment as zs}from"../../format/lib/content/image-treatment.js";import{BoxRail as Js,BoxRailStop as Ks,RAIL_STOPS_CLASS as Ys,useTimelineRail as qs}from"./TimelineRail.js";import{SHARED_PLAIN_ATTR as Qs,sharedColumnsClasses as Vs,sharedColumnsCss as Zs}from"../lib/content/box-shared-columns.js";import ot from"./PhotoHoverSheet.js";const no={"--sf-site-gutter":"0px"},et={overflowX:"clip",overflowY:"visible"},st={desktop:!1,phone:!1},Zo="bg-cover bg-center bg-[image:var(--sf-box-bg)] max-view-tablet:bg-[image:var(--sf-box-bg-p)]",lo=o=>o==null||o==="",ao=o=>!lo(o)&&Number(o)===0;function tt({children:o}){return s(g,{children:o(Ie())})}function rt({direction:o,label:oe,tabShape:ee,gap:co,gapPhone:se,gapTablet:I,justify:A,align:C,wrap:mo,share:p,sharePhone:M,shareTablet:io,wrapPhone:te,phoneRow:w,columns:O,columnsTablet:W,separator:n,blockSpacing:re,bgImage:h,bgImagePhone:uo,pictureHover:ne,darken:le,darkenStyle:ae,placement:ce,padV2:fo=!1,border:Co,borderPhone:po,pad:r={},contained:j=!0,fillHeight:u=!1,shadow:So,loop:S,scrollDirection:H=ys,loopSeconds:me=Ls,loopDelay:ie=Rs,editing:bo=!1,fillColor:xo,line:$,upcoming:ue,link:de,boxShape:ho,boxShapePhone:fe,boxShapeTablet:Ce,jumpHighlight:pe,anchor:Se,sharedSides:B=st,boxId:$o,mirrorCards:be,content:_}){const b=bo?"":js(de),l=u?"":gs(ho,fe,Ce),xe=!u&&ks(ho)!=="",d=Ws(pe,Se),U=typeof xo=="string"?Me(xo.trim()):null,_o=U?{backgroundColor:U}:void 0,Po=qs(),X=$===!0&&o!=="tabs",t=Ko(h),T=Ze(),he=Ye(),Ro=He(),G=ze(),$e=Ge(),v=Ps(o,n),a=S==="scroll"&&o!=="tabs",x=os(),_e=ts(),Pe=rs(),N=ms({inCopy:x!==null,nestedCopy:x?.nested===!0,underBox:Pe}),z=N&&es(x?.ownerType),yo=ls({direction:o,separator:n,loop:S,line:$,bgImage:h,columns:O,columnsTablet:W,share:p,wrap:mo},N,B.desktop)&&ns(be,x?.index),Lo=t||N?"":as(_e,o,a?void 0:A,C),E=Cs({direction:o,separator:n,loop:S,line:$,columns:O}),J=ps({direction:o,separator:n,loop:S,line:$,columnsTablet:W}),Ao=Ss({direction:o,separator:n,loop:S,line:$,columns:O,columnsTablet:W,share:p,shareTablet:io}),Re=Ke(),k=Vs(B,_.blockCount??0),ye=k&&(!x||x.index===0)?Zs(B,_.blockCount??0):"",wo=[F(p),o==="row"?fs(p):"",E,J,Ao,ds(re),hs(o,n)].filter(Boolean).join(" "),Le=wo?` ${wo}`:"",Oo=["flex",o==="row"?v||a?"flex-row":`flex-row ${L(w,M,te)}`:"flex-col",xs(a?!1:mo),t?Ts(ce??"center",o):us(a?void 0:A,C)+(Lo?` ${Lo}`:"")].join(" ")+Le,P=u||t||l||G?` ${D}`:"",K=xe?` ${l}`:l?`${P} ${l}`:P,Bo=$e&&o==="column"&&!t&&!a&&F(p)===""&&typeof A=="string"&&A!=="start",To=P||(Bo?` ${D}`:""),Y=b?` ${Ds}`:"",q=t||T||fo?"":" py-6",Ae=`${so}${q} ${to}${K}${Y}`,we=T?`${K}${Y}`.trim():`w-full${q}${K}${Y}`,R=is("Flex",co,o==="row"?"inline":"block",se,v||a?void 0:I),Oe=v?{...R.style,..._s(o,n)}:R.style,vo=(e="")=>s(_,{className:`${Oo}${yo?` ${cs}`:""}${R.className}${To}${e?` ${e}`:""}${X?` ${Ys}`:""}${d?` ${Is(d)}`:""}${k}`,style:Oe,minEmptyHeight:120}),No=As(H)?"":$s(o,n),Eo=a?s(ws,{direction:H,seconds:me,delay:ie,editing:bo,copy:e=>vo(e&&No?`${e} ${No}`:e)}):vo(),ko=o==="tabs"?s(We,{className:`${Oo}${R.className}${G&&!u&&!t&&!l?"":P}`,style:R.style,shape:ee,children:Eo}):Eo,go=Ro?s(je.Provider,{value:!1,children:ko}):ko,Be={stretchedRow:o==="row"&&!t&&(C===void 0||C==="stretch"),fillingColumn:o==="column"&&(G||Bo),columnsRow:E!==""||J!==""||k!=="",...$o?{id:$o}:null},Fo=s(Xe.Provider,{value:Be,children:s(Ue.Provider,{value:!1,children:N?s(ss.Provider,{value:yo,children:go}):go})}),Q=X?s(Js,{row:o==="row",stops:_.blockCount??0,children:Fo}):Fo,Te=oe?.trim()||(Ro?"":void 0),ve={values:r,frame:q?24:0},Ne=e=>Po?s(Ks,{on:Po,future:ue===!0,children:e}):e,Ee=e=>b.startsWith("/")?s(Hs,{href:b,className:Qo,"aria-labelledby":e,[qo]:""}):s("a",{href:b,className:Qo,"aria-labelledby":e,[qo]:""}),Do=(d?Ms(d):"")+ye,Io=Do?s("style",{dangerouslySetInnerHTML:{__html:Do}}):null,y=Ns({loop:S,direction:o,scrollDirection:H,bgImage:h}),ke=B.desktop&&k!==""&&!U&&!Vo(Co,po)&&Object.keys(Yo(So)).length===0&&!b&&!l&&!u&&!d&&!Es(j&&!y,Re)&&ao(co)&&(lo(I)||ao(I))&&fo&&Object.values(r).every(e=>lo(e)||ao(e)),ge=e=>({...ke?{[Qs]:""}:null,...t?null:Yo(So),...d?{[Fs]:d}:null,...e?{id:e}:null}),Mo=E!==""?Number(O):0,Fe=L(w,M)===L(void 0),De=(o==="column"||o==="row"&&!v&&!a&&(Mo===1&&Fe||Mo===0&&_.blockCount===1))&&!t&&!X&&!T,Wo=t&&he&&!T,jo=(e,c)=>Ne(s(Je,{contained:j&&!y,style:y?no:void 0,framedClass:Ae,fillClass:we,columnClass:`${so} ${to}${To}`,tabLabel:Te,pad:t?void 0:ve,border:Vo(Co,po),outerAttrs:ge(c),box:!0,edge:De,outerStyle:t?void 0:_o,bleed:Wo,children:Io||c?eo(g,{children:[Io,c?Ee(c):null,y?s(Jo,{children:e}):e]}):y?s(Jo,{children:e}):e})),Ho=e=>b?s(tt,{children:c=>jo(e,c)}):jo(e);if(!t){const e=C===void 0||C==="stretch",c=(F(p)!==""||E!==""||J!=="")&&!bs(w,M)&&!(Ao!==""&&F(io)==="")&&(e||L(w)!==L(void 0));return Ho((o==="row"?c:o==="column"&&e)?s(Ve.Provider,{value:!0,children:Q}):Q)}const V=Bs(le,ae),Z=Ko(uo),Uo=Z?{"--sf-box-bg":ro(h??""),"--sf-box-bg-p":ro(uo??"")}:{backgroundImage:ro(h??""),backgroundSize:"cover",backgroundPosition:"center"},Xo=zs(void 0,void 0,ne),f=Xo.className?Xo:null,oo=Us({...r,top:i(r.top)??m.desktop,bottom:i(r.bottom)??m.desktop,topPhone:i(r.topPhone)??m.phone,bottomPhone:i(r.bottomPhone)??m.phone,left:i(r.left)??m.side,right:i(r.right)??m.side,leftPhone:i(r.leftPhone)??m.sidePhone,rightPhone:i(r.rightPhone)??m.sidePhone}),Go=s("div",{className:`relative z-[1] ${Os} ${oo?.className??""}${u||l?` ${D}`:""}`.trimEnd(),style:V?{...oo?.style,...no,...Xs}:{...oo?.style,...no},children:Q}),zo=Wo&&j?s("div",{className:`${so} ${to}${u||l?` ${D}`:""}`,children:Go}):Go;return Ho(s(g,{children:eo("div",{className:`relative isolate overflow-hidden ${vs}${P}${Z&&!f?` ${Zo}`:""}`,style:{...z?et:{},..._o,...f?{}:Uo},...f?{[Gs]:""}:{},children:[f&&eo(g,{children:[s(ot,{sheet:f.sheet}),s("div",{"aria-hidden":!0,className:`absolute inset-0${z?" rounded-[inherit]":""}${Z?` ${Zo}`:""} ${f.className}`,style:{...Uo,...f.style??{}}})]}),s(Qe,{wash:V,...z?{className:"rounded-[inherit]"}:{}}),V?s(qe,{children:zo}):zo]})}))}export{rt as default};
1
+ import{Fragment as j,jsx as e,jsxs as to}from"react/jsx-runtime";import{useId as zs}from"react";import{parseHexColor as Js}from"efficient-shell/format";import Ks from"./BoxTabs.js";import{BoxTabPaneContext as Ys,useIsTabPane as Vs}from"./BoxTabPaneContext.js";import{CellFillContext as qs,InBoxContext as Qs,useCellOfStretchedRow as Zs,useFillsCell as oe}from"./InBoxContext.js";import se,{InsideSiteColumn as Zo,useInsideSiteGutter as ee,useSectionRoot as te}from"./SiteGutterFrame.js";import{BoxSurfaceProvider as re}from"./BoxSurfaceContext.js";import ne from"./PictureWash.js";import{BoxCellWidthContext as le}from"./BoxCellWidthContext.js";import{useInSiteHeader as ae}from"./PhoneMenuTools.js";import{useCardRow as ce}from"./CardRowContext.js";import{framesItsCards as me}from"../../format/lib/content/card-place.js";import{MirrorContext as ie,useMirroredCopy as ue,useUnderCardBox as de}from"./MirrorContext.js";import{isMirroredCopy as fe,mirrorCardsActs as Ce,mirroredBoxClass as Se,MIRROR_ROW_CLASS as pe,ownsCard as be}from"../../format/lib/content/mirror-cards.js";import{FRAME_BASE as ro,FRAME_GUTTER as no}from"./BlockFrame.js";import{containerGapProps as xe}from"../../format/lib/content/container-gap.js";import{boxLayoutClasses as he,boxBlockSpacingClass as $e,boxFitContentClass as _e,boxRowColumnsClass as ye,boxRowTabletColumnsClass as Pe,boxRowTabletShareClass as Re,boxPhoneCellsShareLine as Ae,boxPhoneRowClasses as E,boxPhoneRowFits as Le,boxShareClasses as _,boxShareVars as we,boxWrapClass as Oe}from"../../format/lib/content/box-layout.js";import{boxSeparatorClasses as Be,boxSeparatorSeamClass as Ne,boxSeparatorStyle as ve,isStripBox as Ee}from"../../format/lib/content/box-separator.js";import{DEFAULT_LOOP_DELAY as Te,DEFAULT_LOOP_DIRECTION as ke,DEFAULT_LOOP_SECONDS as Fe,isVerticalLoop as ge}from"../../format/lib/animation/index.js";import{LoopTrack as De}from"../lib/animation/LoopTrack.js";import{BOX_CARD_PAD as i,BOX_OWNS_SIDES_CLASS as Ie,boxDarkenStyle as Me,boxPlacementClasses as We,CARD_SHADOW_CLASS as je,isBackgroundBox as os}from"../../format/lib/content/box-background.js";import{boxShadowAttrs as ss}from"../../format/lib/content/box-shadow.js";import{boxRunsEdgeToEdge as He,drawsSiteGutter as Ue}from"../../format/lib/content/site-gutter.js";import{boxShapeClass as Xe,boxShapeClasses as Ge}from"../../format/lib/content/box-shape.js";import{BOX_JUMP_ATTR as ze,BOX_LINK_ATTR as es,BOX_LINK_CLASS as ts,BOX_LINKED_CLASS as Je,boxJumpBlocksClass as Ke,boxJumpCss as Ye,boxJumpSlug as Ve,boxLinkOf as qe}from"../../format/lib/content/box-link.js";import{SiteLink as Qe}from"../lib/site-runtime.js";import{sectionBorderStyle as rs}from"../../format/lib/content/borders.js";import{finiteNumber as u}from"../../format/lib/finite-number.js";import{sectionPadAttrs as Ze}from"../lib/content/section-padding.js";import{SECTION_FILL_CLASS as H}from"../../format/lib/content/section-min-height.js";import{ON_MEDIA_INK_STYLE as ot}from"../../format/lib/content/ink.js";import{sizedBackground as lo}from"../../format/lib/sized-image.js";import{PHOTO_HOST_ATTR as st,resolveImageTreatment as et}from"../../format/lib/content/image-treatment.js";import{BoxRail as tt,BoxRailStop as rt,RAIL_STOPS_CLASS as nt,useTimelineRail as lt}from"./TimelineRail.js";import{SHARED_PLAIN_ATTR as at,sharedColumnsClasses as ct,sharedColumnsCss as mt}from"../lib/content/box-shared-columns.js";import it from"./PhotoHoverSheet.js";const ao={"--sf-site-gutter":"0px"},ut={overflowX:"clip",overflowY:"visible"},dt={desktop:!1,phone:!1},ns="bg-cover bg-center bg-[image:var(--sf-box-bg)] max-view-tablet:bg-[image:var(--sf-box-bg-p)]",co=o=>o==null||o==="",mo=o=>!co(o)&&Number(o)===0;function ft({children:o}){return e(j,{children:o(zs())})}function Ct({direction:o,label:ls,tabShape:as,gap:io,gapPhone:cs,gapTablet:U,justify:T,align:p,wrap:uo,share:n,sharePhone:k,shareTablet:y,wrapPhone:ms,phoneRow:P,columns:R,columnsTablet:F,separator:a,blockSpacing:is,bgImage:A,bgImagePhone:fo,pictureHover:us,darken:ds,darkenStyle:fs,placement:Cs,padV2:Co=!1,border:So,borderTablet:po,borderPhone:bo,pad:r={},contained:X=!0,fillHeight:d=!1,shadow:xo,loop:b,scrollDirection:G=ke,loopSeconds:Ss=Fe,loopDelay:ps=Te,editing:ho=!1,fillColor:$o,line:x,upcoming:bs,link:xs,boxShape:_o,boxShapePhone:hs,boxShapeTablet:$s,jumpHighlight:_s,anchor:ys,sharedSides:g=dt,boxId:yo,mirrorCards:Ps,content:f}){const h=ho?"":qe(xs),c=d?"":Ge(_o,hs,$s),Rs=!d&&Xe(_o)!=="",C=Ve(_s,ys),z=typeof $o=="string"?Js($o.trim()):null,Po=z?{backgroundColor:z}:void 0,Ro=lt(),J=x===!0&&o!=="tabs",t=os(A),D=ae(),As=te(),Ao=Vs(),K=oe(),Ls=Zs(),L=Ee(o,a),l=b==="scroll"&&o!=="tabs",$=ce(),ws=ue(),Os=de(),I=be({inCopy:$!==null,nestedCopy:$?.nested===!0,underBox:Os}),Y=I&&me($?.ownerType),Lo=Ce({direction:o,separator:a,loop:b,line:x,bgImage:A,columns:R,columnsTablet:F,share:n,wrap:uo},I,g.desktop)&&fe(Ps,$?.index),wo=t||I?"":Se(ws,o,l?void 0:T,p),w=ye({direction:o,separator:a,loop:b,line:x,columns:R}),O=Pe({direction:o,separator:a,loop:b,line:x,columnsTablet:F}),M=Re({direction:o,separator:a,loop:b,line:x,columns:R,columnsTablet:F,share:n,shareTablet:y}),Bs=ee(),W=ct(g,f.blockCount??0),Ns=W&&(!$||$.index===0)?mt(g,f.blockCount??0):"",Oo=O!==""?Number(F)>=2:M===""||_(y)!=="",Bo=O!==""||M!=="",vs=o==="row"&&!L&&!l&&x!==!0,Es=w!==""?Number(R)>=2:_(n)!=="",No=[_(n),o==="row"?_e(n):"",w,O,M,$e(is),Be(o,a)].filter(Boolean).join(" "),Ts=No?` ${No}`:"",vo=["flex",o==="row"?L||l?"flex-row":`flex-row ${E(P,k,ms)}`:"flex-col",Oe(l?!1:uo),t?We(Cs??"center",o):he(l?void 0:T,p)+(wo?` ${wo}`:"")].join(" ")+Ts,B=d||t||c||K?` ${H}`:"",V=Rs?` ${c}`:c?`${B} ${c}`:B,Eo=Ls&&o==="column"&&!t&&!l&&_(n)===""&&typeof T=="string"&&T!=="start",To=B||(Eo?` ${H}`:""),q=h?` ${Je}`:"",Q=t||D||Co?"":" py-6",ks=`${ro}${Q} ${no}${V}${q}`,Fs=D?`${V}${q}`.trim():`w-full${Q}${V}${q}`,N=xe("Flex",io,o==="row"?"inline":"block",cs,L||l?void 0:U),ko=we(n,y,o==="row"?f.blockCount??0:0),Fo=L?{...N.style,...ve(o,a)}:N.style,gs=ko?{...Fo,...ko}:Fo,go=(s="")=>e(f,{className:`${vo}${Lo?` ${pe}`:""}${N.className}${To}${s?` ${s}`:""}${J?` ${nt}`:""}${C?` ${Ke(C)}`:""}${W}`,style:gs,minEmptyHeight:120}),Do=ge(G)?"":Ne(o,a),Io=l?e(De,{direction:G,seconds:Ss,delay:ps,editing:ho,copy:s=>go(s&&Do?`${s} ${Do}`:s)}):go(),Mo=o==="tabs"?e(Ks,{className:`${vo}${N.className}${K&&!d&&!t&&!c?"":B}`,style:N.style,shape:as,children:Io}):Io,Wo=Ao?e(Ys.Provider,{value:!1,children:Mo}):Mo,jo=o==="row"&&!t&&(p===void 0||p==="stretch"),Ds={stretchedRow:jo,fillingColumn:o==="column"&&(K||Eo),columnsRow:w!==""||O!==""||W!==""||o==="row"&&(Array.isArray(n)||Array.isArray(y)),...jo&&vs&&(f.blockCount??0)>=2&&Es?{picturesFillRow:!0}:null,...Bo?{fillFrom:Oo?"tablet":"desktop"}:null,...Ae(P,k)&&(!Bo||Oo)?{phoneRowFills:!0}:null,...yo?{id:yo}:null},Ho=e(Qs.Provider,{value:Ds,children:e(qs.Provider,{value:!1,children:I?e(ie.Provider,{value:Lo,children:Wo}):Wo})}),Z=J?e(tt,{row:o==="row",stops:f.blockCount??0,children:Ho}):Ho,Is=ls?.trim()||(Ao?"":void 0),Ms={values:r,frame:Q?24:0},Ws=s=>Ro?e(rt,{on:Ro,future:bs===!0,children:s}):s,js=s=>h.startsWith("/")?e(Qe,{href:h,className:ts,"aria-labelledby":s,[es]:""}):e("a",{href:h,className:ts,"aria-labelledby":s,[es]:""}),Uo=(C?Ye(C):"")+Ns,Xo=Uo?e("style",{dangerouslySetInnerHTML:{__html:Uo}}):null,v=He({loop:b,direction:o,scrollDirection:G,bgImage:A}),Hs=g.desktop&&W!==""&&!z&&!rs(So,bo,po)&&Object.keys(ss(xo)).length===0&&!h&&!c&&!d&&!C&&!Ue(X&&!v,Bs)&&mo(io)&&(co(U)||mo(U))&&Co&&Object.values(r).every(s=>co(s)||mo(s)),Us=s=>({...Hs?{[at]:""}:null,...t?null:ss(xo),...C?{[ze]:C}:null,...s?{id:s}:null}),Go=w!==""?Number(R):0,Xs=E(P,k)===E(void 0),Gs=(o==="column"||o==="row"&&!L&&!l&&(Go===1&&Xs||Go===0&&f.blockCount===1))&&!t&&!J&&!D,zo=t&&As&&!D,Jo=(s,m)=>Ws(e(se,{contained:X&&!v,style:v?ao:void 0,framedClass:ks,fillClass:Fs,columnClass:`${ro} ${no}${To}`,tabLabel:Is,pad:t?void 0:Ms,border:rs(So,bo,po),outerAttrs:Us(m),box:!0,edge:Gs,outerStyle:t?void 0:Po,bleed:zo,children:Xo||m?to(j,{children:[Xo,m?js(m):null,v?e(Zo,{children:s}):s]}):v?e(Zo,{children:s}):s})),Ko=s=>h?e(ft,{children:m=>Jo(s,m)}):Jo(s);if(!t){const s=p===void 0||p==="stretch",m=(_(n)!==""||w!==""||O!=="")&&!Le(P,k)&&!(M!==""&&_(y)==="")&&(s||E(P)!==E(void 0));return Ko((o==="row"?m:o==="column"&&s)?e(le.Provider,{value:!0,children:Z}):Z)}const oo=Me(ds,fs),so=os(fo),Yo=so?{"--sf-box-bg":lo(A??""),"--sf-box-bg-p":lo(fo??"")}:{backgroundImage:lo(A??""),backgroundSize:"cover",backgroundPosition:"center"},Vo=et(void 0,void 0,us),S=Vo.className?Vo:null,eo=Ze({...r,top:u(r.top)??i.desktop,bottom:u(r.bottom)??i.desktop,topPhone:u(r.topPhone)??i.phone,bottomPhone:u(r.bottomPhone)??i.phone,left:u(r.left)??i.side,right:u(r.right)??i.side,leftPhone:u(r.leftPhone)??i.sidePhone,rightPhone:u(r.rightPhone)??i.sidePhone}),qo=e("div",{className:`relative z-[1] ${Ie} ${eo?.className??""}${d||c?` ${H}`:""}`.trimEnd(),style:oo?{...eo?.style,...ao,...ot}:{...eo?.style,...ao},children:Z}),Qo=zo&&X?e("div",{className:`${ro} ${no}${d||c?` ${H}`:""}`,children:qo}):qo;return Ko(e(j,{children:to("div",{className:`relative isolate overflow-hidden ${je}${B}${so&&!S?` ${ns}`:""}`,style:{...Y?ut:{},...Po,...S?{}:Yo},...S?{[st]:""}:{},children:[S&&to(j,{children:[e(it,{sheet:S.sheet}),e("div",{"aria-hidden":!0,className:`absolute inset-0${Y?" rounded-[inherit]":""}${so?` ${ns}`:""} ${S.className}`,style:{...Yo,...S.style??{}}})]}),e(ne,{wash:oo,...Y?{className:"rounded-[inherit]"}:{}}),oo?e(re,{children:Qo}):Qo]})}))}export{Ct as default};
@@ -60,6 +60,7 @@ export declare function HeroTwoPictures({ desktopLayout, phoneLayout, editing, m
60
60
  src?: string;
61
61
  objectPosition?: string;
62
62
  objectPositionPhone?: string;
63
+ objectPositionTablet?: string;
63
64
  tintColor: string;
64
65
  tintOpacity: number;
65
66
  };
@@ -67,6 +68,7 @@ export declare function HeroTwoPictures({ desktopLayout, phoneLayout, editing, m
67
68
  src?: string;
68
69
  objectPosition?: string;
69
70
  objectPositionPhone?: string;
71
+ objectPositionTablet?: string;
70
72
  tintColor: string;
71
73
  tintOpacity: number;
72
74
  };
@@ -1 +1 @@
1
- "use client";import{Fragment as m,jsx as i,jsxs as l}from"react/jsx-runtime";import u from"./HeroPoster.js";import{SectionAnimation as h}from"./SectionAnimation.js";import{resolveMedia as p}from"../lib/media.js";import{HERO_MEDIA_PARTS as g,HERO_PART_ATTR as v}from"../lib/document/hero-media-parts.js";import{entranceDrawn as y}from"../lib/animation/entrance.js";import{readPartMotion as b}from"../lib/animation/part-motion.js";import{pictureHoverOf as w}from"../../format/lib/animation/hover.js";import{PHOTO_HOST_ATTR as T,SITE_PHOTO_CSS as H,resolveImageTreatment as _}from"../../format/lib/content/image-treatment.js";import{heroPictureCount as k,normaliseMediaLayout as j,resolvePhoneLayout as N}from"../../format/lib/hero-media-layout.js";import{normaliseVideoPlayback as O,normaliseVideoSource as S,parseYouTubeId as A}from"../../format/lib/hero-video.js";import{hidableText as R}from"efficient-easel/draw";const V={one:"max-[719px]:grid-cols-1 max-[719px]:grid-rows-1",side:"max-[719px]:grid-cols-2 max-[719px]:grid-rows-1",stacked:"max-[719px]:grid-cols-1 max-[719px]:grid-rows-2"},C={one:"view-tablet:grid-cols-1 view-tablet:grid-rows-1",side:"view-tablet:grid-cols-2 view-tablet:grid-rows-1",stacked:"view-tablet:grid-cols-1 view-tablet:grid-rows-2"};function q(e){const o=e.isVideo&&S(e.videoSource)==="youtube",r=e.isVideo&&O(e.videoPlayback)==="click",n=o?A(R(e.youtubeUrl)):null,t=j(e.mediaLayout);return{fromYouTube:o,onClick:r,youTubeId:n,backgroundFile:e.isVideo&&!o&&!r,desktopLayout:t,phoneLayout:N(e.mediaLayoutPhone,t),twoPictures:!e.isVideo&&k(e)>1}}function d(e,o){return y(b({_partMotion:e},o))}function c(e,o){return _(void 0,void 0,w(b({_partMotion:e},o)))}function B(e){return g.some(r=>c(e,r).className)?{hostAttrs:{[T]:""},sheet:H}:{}}function x({treatment:e,children:o}){return e.className?i("div",{className:`absolute inset-0 ${e.className}`,...e.style?{style:e.style}:{},children:o}):i(m,{children:o})}function P({color:e,opacity:o,passClicks:r=!0}){return o>0?i("div",{className:r?"pointer-events-none absolute inset-0 z-[2]":"absolute inset-0 z-[2]",style:{background:e,opacity:Math.min(Math.max(o,0),100)/100}}):null}function f({part:e,editing:o,marked:r=!0,entrance:n,className:t,children:s}){const a=o&&r?{[v]:e}:void 0;return n?i(h,{desktop:n.desktop,phone:n.phone,editing:o,boxClass:t,boxAttrs:a,children:s}):i("div",{className:t,...a,children:s})}function J({partMotion:e,editing:o,children:r}){const n=d(e,"media"),t=c(e,"media"),s=t.className?i("div",{className:`absolute inset-0 z-[1] ${t.className}`,...t.style?{style:t.style}:{},children:r}):r;return n?i(h,{desktop:n.desktop,phone:n.phone,editing:o,boxClass:"absolute inset-0 z-[1]",children:s}):i(m,{children:s})}function Q({desktopLayout:e,phoneLayout:o,editing:r,marked:n=!0,partMotion:t,first:s,second:a}){return l("div",{className:`absolute inset-0 z-[1] grid ${V[o]} ${C[e]}`,"data-hero-layout":e,"data-hero-layout-phone":o,children:[i(f,{part:"image",editing:r,marked:n,entrance:d(t,"image"),className:"relative overflow-hidden",children:l(x,{treatment:c(t,"image"),children:[i(u,{posterSrc:p(s.src),showVideo:!1,objectPosition:s.objectPosition,objectPositionPhone:s.objectPositionPhone}),i(P,{color:s.tintColor,opacity:s.tintOpacity})]})}),i(f,{part:"image2",editing:r,marked:n,entrance:d(t,"image2"),className:`relative overflow-hidden${o==="one"?" max-[719px]:hidden":""}${e==="one"?" view-tablet:hidden":""}`,children:l(x,{treatment:c(t,"image2"),children:[i(u,{posterSrc:p(a.src),showVideo:!1,objectPosition:a.objectPosition,objectPositionPhone:a.objectPositionPhone}),i(P,{color:a.tintColor,opacity:a.tintOpacity})]})})]})}export{J as HeroMediaLayer,f as HeroPickArea,x as HeroPictureHover,P as HeroTint,Q as HeroTwoPictures,q as heroMediaReading,d as heroPartEntrance,c as heroPartHover,B as heroPicturesHover};
1
+ "use client";import{Fragment as m,jsx as r,jsxs as l}from"react/jsx-runtime";import u from"./HeroPoster.js";import{SectionAnimation as b}from"./SectionAnimation.js";import{resolveMedia as h}from"../lib/media.js";import{HERO_MEDIA_PARTS as g,HERO_PART_ATTR as v}from"../lib/document/hero-media-parts.js";import{entranceDrawn as y}from"../lib/animation/entrance.js";import{readPartMotion as P}from"../lib/animation/part-motion.js";import{pictureHoverOf as T}from"../../format/lib/animation/hover.js";import{PHOTO_HOST_ATTR as w,SITE_PHOTO_CSS as j,resolveImageTreatment as H}from"../../format/lib/content/image-treatment.js";import{heroPictureCount as _,normaliseMediaLayout as k,resolvePhoneLayout as N}from"../../format/lib/hero-media-layout.js";import{normaliseVideoPlayback as O,normaliseVideoSource as S,parseYouTubeId as A}from"../../format/lib/hero-video.js";import{hidableText as R}from"efficient-easel/draw";const V={one:"max-[719px]:grid-cols-1 max-[719px]:grid-rows-1",side:"max-[719px]:grid-cols-2 max-[719px]:grid-rows-1",stacked:"max-[719px]:grid-cols-1 max-[719px]:grid-rows-2"},C={one:"view-tablet:grid-cols-1 view-tablet:grid-rows-1",side:"view-tablet:grid-cols-2 view-tablet:grid-rows-1",stacked:"view-tablet:grid-cols-1 view-tablet:grid-rows-2"};function q(e){const o=e.isVideo&&S(e.videoSource)==="youtube",i=e.isVideo&&O(e.videoPlayback)==="click",n=o?A(R(e.youtubeUrl)):null,t=k(e.mediaLayout);return{fromYouTube:o,onClick:i,youTubeId:n,backgroundFile:e.isVideo&&!o&&!i,desktopLayout:t,phoneLayout:N(e.mediaLayoutPhone,t),twoPictures:!e.isVideo&&_(e)>1}}function d(e,o){return y(P({_partMotion:e},o))}function c(e,o){return H(void 0,void 0,T(P({_partMotion:e},o)))}function B(e){return g.some(i=>c(e,i).className)?{hostAttrs:{[w]:""},sheet:j}:{}}function p({treatment:e,children:o}){return e.className?r("div",{className:`absolute inset-0 ${e.className}`,...e.style?{style:e.style}:{},children:o}):r(m,{children:o})}function x({color:e,opacity:o,passClicks:i=!0}){return o>0?r("div",{className:i?"pointer-events-none absolute inset-0 z-[2]":"absolute inset-0 z-[2]",style:{background:e,opacity:Math.min(Math.max(o,0),100)/100}}):null}function f({part:e,editing:o,marked:i=!0,entrance:n,className:t,children:a}){const s=o&&i?{[v]:e}:void 0;return n?r(b,{desktop:n.desktop,phone:n.phone,editing:o,boxClass:t,boxAttrs:s,children:a}):r("div",{className:t,...s,children:a})}function J({partMotion:e,editing:o,children:i}){const n=d(e,"media"),t=c(e,"media"),a=t.className?r("div",{className:`absolute inset-0 z-[1] ${t.className}`,...t.style?{style:t.style}:{},children:i}):i;return n?r(b,{desktop:n.desktop,phone:n.phone,editing:o,boxClass:"absolute inset-0 z-[1]",children:a}):r(m,{children:a})}function Q({desktopLayout:e,phoneLayout:o,editing:i,marked:n=!0,partMotion:t,first:a,second:s}){return l("div",{className:`absolute inset-0 z-[1] grid ${V[o]} ${C[e]}`,"data-hero-layout":e,"data-hero-layout-phone":o,children:[r(f,{part:"image",editing:i,marked:n,entrance:d(t,"image"),className:"relative overflow-hidden",children:l(p,{treatment:c(t,"image"),children:[r(u,{posterSrc:h(a.src),showVideo:!1,objectPosition:a.objectPosition,objectPositionPhone:a.objectPositionPhone,objectPositionTablet:a.objectPositionTablet}),r(x,{color:a.tintColor,opacity:a.tintOpacity})]})}),r(f,{part:"image2",editing:i,marked:n,entrance:d(t,"image2"),className:`relative overflow-hidden${o==="one"?" max-[719px]:hidden":""}${e==="one"?" view-tablet:hidden":""}`,children:l(p,{treatment:c(t,"image2"),children:[r(u,{posterSrc:h(s.src),showVideo:!1,objectPosition:s.objectPosition,objectPositionPhone:s.objectPositionPhone,objectPositionTablet:s.objectPositionTablet}),r(x,{color:s.tintColor,opacity:s.tintOpacity})]})})]})}export{J as HeroMediaLayer,f as HeroPickArea,p as HeroPictureHover,x as HeroTint,Q as HeroTwoPictures,q as heroMediaReading,d as heroPartEntrance,c as heroPartHover,B as heroPicturesHover};
@@ -5,7 +5,8 @@ interface HeroPosterProps {
5
5
  playbackRate?: number;
6
6
  objectPosition?: string;
7
7
  objectPositionPhone?: string;
8
+ objectPositionTablet?: string;
8
9
  quiet?: boolean;
9
10
  }
10
- export default function HeroPoster({ videoSrc, posterSrc, showVideo, playbackRate, objectPosition, objectPositionPhone, quiet, }: HeroPosterProps): import("react").JSX.Element;
11
+ export default function HeroPoster({ videoSrc, posterSrc, showVideo, playbackRate, objectPosition, objectPositionPhone, objectPositionTablet, quiet, }: HeroPosterProps): import("react").JSX.Element;
11
12
  export {};
@@ -1 +1 @@
1
- "use client";import{jsx as o,jsxs as N}from"react/jsx-runtime";import{useEffect as m,useRef as C,useState as a}from"react";import{SiteImage as L}from"../lib/site-runtime.js";import P from"./HeroHeldFrame.js";import{hasAv1Variant as R,isExternalMediaUrl as A}from"../lib/media.js";import{sizedImage as H}from"../../format/lib/sized-image.js";import{phoneFocus as S}from"../../format/lib/content/phone-focus.js";const _=.5;function $({videoSrc:d,posterSrc:f,showVideo:p=!0,playbackRate:v=_,objectPosition:l="50% 50%",objectPositionPhone:I,quiet:y=!1}){const n=S(I),e=f||"",t=d||"",[c,u]=a(!1),[g,w]=a(!1),[j,F]=a(!1),[k,E]=a(!1),[b,h]=a(!1),z=C(null);m(()=>{u(!1),w(!1),F(!1),E(!1)},[d,f]),m(()=>{if(typeof window>"u")return;const s=()=>{const r=window;r.requestIdleCallback?r.requestIdleCallback(()=>h(!0),{timeout:2e3}):setTimeout(()=>h(!0),800)};if(document.readyState==="complete"){s();return}return window.addEventListener("load",s,{once:!0}),()=>window.removeEventListener("load",s)},[]),m(()=>{const s=z.current;if(!s)return;const r=()=>{s.playbackRate=v};return r(),s.addEventListener("loadedmetadata",r),()=>s.removeEventListener("loadedmetadata",r)},[d,v]);const x=A(e),i=e&&x&&!g?H(e):{src:e};return N("div",{className:"absolute inset-0 z-[1]",children:[o("div",{className:"absolute inset-0",style:{background:"var(--site-surface)"}}),e&&(x?o("img",{src:i.src,...i.srcSet?{srcSet:i.srcSet,sizes:"100vw"}:{},alt:"",className:`absolute inset-0 z-[2] h-full w-full object-cover ${n.className}`.trim(),style:{display:c?"none":"block",objectPosition:l,...n.style},onError:()=>i.srcSet?w(!0):u(!0)},e):o(L,{src:e,alt:"",fill:!0,priority:!0,sizes:"100vw",className:`z-[2] object-cover ${n.className}`.trim(),style:{display:c?"none":"block",objectPosition:l,...n.style},onError:()=>u(!0)},e)),p&&!y&&t&&b&&!j&&N("video",{ref:z,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"metadata",className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:l},onError:()=>F(!0),children:[R(t)&&o("source",{src:t.replace(/\.mp4$/,".av1.mp4"),type:'video/mp4; codecs="av01.0.08M.10"'}),o("source",{src:t,type:"video/mp4"})]},t),p&&y&&t&&b&&!k&&(!e||c)&&o(P,{src:t,objectPosition:l,onError:()=>E(!0)},t)]})}export{$ as default};
1
+ "use client";import{jsx as o,jsxs as N}from"react/jsx-runtime";import{useEffect as m,useRef as L,useState as a}from"react";import{SiteImage as P}from"../lib/site-runtime.js";import R from"./HeroHeldFrame.js";import{hasAv1Variant as A,isExternalMediaUrl as H}from"../lib/media.js";import{sizedImage as S}from"../../format/lib/sized-image.js";import{phoneFocus as _}from"../../format/lib/content/phone-focus.js";const $=.5;function M({videoSrc:d,posterSrc:f,showVideo:p=!0,playbackRate:v=$,objectPosition:l="50% 50%",objectPositionPhone:I,objectPositionTablet:g,quiet:y=!1}){const n=_(I,g),e=f||"",t=d||"",[c,u]=a(!1),[j,w]=a(!1),[k,F]=a(!1),[C,E]=a(!1),[b,h]=a(!1),z=L(null);m(()=>{u(!1),w(!1),F(!1),E(!1)},[d,f]),m(()=>{if(typeof window>"u")return;const s=()=>{const r=window;r.requestIdleCallback?r.requestIdleCallback(()=>h(!0),{timeout:2e3}):setTimeout(()=>h(!0),800)};if(document.readyState==="complete"){s();return}return window.addEventListener("load",s,{once:!0}),()=>window.removeEventListener("load",s)},[]),m(()=>{const s=z.current;if(!s)return;const r=()=>{s.playbackRate=v};return r(),s.addEventListener("loadedmetadata",r),()=>s.removeEventListener("loadedmetadata",r)},[d,v]);const x=H(e),i=e&&x&&!j?S(e):{src:e};return N("div",{className:"absolute inset-0 z-[1]",children:[o("div",{className:"absolute inset-0",style:{background:"var(--site-surface)"}}),e&&(x?o("img",{src:i.src,...i.srcSet?{srcSet:i.srcSet,sizes:"100vw"}:{},alt:"",className:`absolute inset-0 z-[2] h-full w-full object-cover ${n.className}`.trim(),style:{display:c?"none":"block",objectPosition:l,...n.style},onError:()=>i.srcSet?w(!0):u(!0)},e):o(P,{src:e,alt:"",fill:!0,priority:!0,sizes:"100vw",className:`z-[2] object-cover ${n.className}`.trim(),style:{display:c?"none":"block",objectPosition:l,...n.style},onError:()=>u(!0)},e)),p&&!y&&t&&b&&!k&&N("video",{ref:z,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"metadata",className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:l},onError:()=>F(!0),children:[A(t)&&o("source",{src:t.replace(/\.mp4$/,".av1.mp4"),type:'video/mp4; codecs="av01.0.08M.10"'}),o("source",{src:t,type:"video/mp4"})]},t),p&&y&&t&&b&&!C&&(!e||c)&&o(R,{src:t,objectPosition:l,onError:()=>E(!0)},t)]})}export{M as default};
@@ -23,6 +23,7 @@ interface Props {
23
23
  text?: string;
24
24
  }[];
25
25
  heightDesktop?: number;
26
+ heightTablet?: number;
26
27
  heightMobile?: number;
27
28
  showPicker?: boolean;
28
29
  pickerShape?: HeroReelShape;
@@ -33,4 +34,4 @@ interface Props {
33
34
  editing?: boolean;
34
35
  partMotion?: Record<string, unknown>;
35
36
  }
36
- export default function HeroSection({ slides: Slides, strip: Strip, alignment, textureOpacity, showTexture, textureColor, phoneUpDown, phoneSideways, autoplay, autoplayInterval, showTicker, tickerItems, heightDesktop, heightMobile, showPicker, pickerShape, pickerPlacement, showArrows, arrowsShape, arrowsPlacement, editing, partMotion, }: Props): import("react").JSX.Element;
37
+ export default function HeroSection({ slides: Slides, strip: Strip, alignment, textureOpacity, showTexture, textureColor, phoneUpDown, phoneSideways, autoplay, autoplayInterval, showTicker, tickerItems, heightDesktop, heightTablet, heightMobile, showPicker, pickerShape, pickerPlacement, showArrows, arrowsShape, arrowsPlacement, editing, partMotion, }: Props): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as n,jsxs as P}from"react/jsx-runtime";import{useCallback as v,useEffect as w,useId as Ae,useRef as d,useState as k}from"react";import{markOverlayPortal as te}from"../../format/lib/document/overlay-portal.js";import Ne from"./Ticker.js";import{HeroSlideStyleContext as Le}from"./HeroSlide.js";import Me from"./HeroArrows.js";import Ce from"./Reel.js";import{TICKER_PART_ATTR as Pe}from"./PreviewTickerContext.js";import{useReducedMotion as De}from"./useReducedMotion.js";import{hasSectionHeight as Ie,resolveSectionHeight as re}from"../../format/lib/content/section-height.js";import{HEADER_HEIGHT_CSS as Ve}from"../lib/document/header-clearance.js";import{nextReel as ze,normaliseHeroReelShape as $e,reelShown as Xe}from"../../format/lib/reel.js";import{arrowsShown as Ge,arrowStep as Ye}from"../../format/lib/hero-arrows.js";import{swipeEnabled as je,swipeStep as Be}from"../../format/lib/hero-swipe.js";import{videoControlShown as qe,videoHeld as Ke}from"../../format/lib/hero-video-control.js";import{HERO_SLIDER_GOTO_EVENT as D}from"efficient-easel/draw";import{say as oe}from"../../format/lib/editor-words.js";import{markedChildren as ne}from"../../format/lib/marked-children.js";import{legacyTickerDrawn as Fe,TICKER_MOTION_PART as Je}from"../../format/lib/hero-ticker.js";import{ON_MEDIA_INK_STYLE as Qe}from"../../format/lib/content/ink.js";import{SectionAnimation as Ue}from"./SectionAnimation.js";import{entranceDrawn as We}from"../lib/animation/entrance.js";import{readPartMotion as Ze}from"../lib/animation/part-motion.js";import{scrim as se}from"../../format/lib/content/scrim.js";const et="Play video",tt="Hold video",rt="flex h-7 cursor-pointer items-center gap-1.5 rounded-full border border-overlay-chrome/25 bg-overlay-scrim/80 px-[11px] font-mono text-[11px] leading-none tracking-[0.05em] text-overlay-fg",ot=()=>oe("item"),ce=new Map;function nt(m,a){const i=m?.ownerDocument?.defaultView;if(i)return i.addEventListener(D,a),()=>i.removeEventListener(D,a)}function st({slides:m,strip:a,alignment:i,textureOpacity:y,showTexture:E,textureColor:g,phoneUpDown:ae,phoneSideways:ie,autoplay:I,autoplayInterval:O,showTicker:le,tickerItems:V,heightDesktop:z,heightMobile:$,showPicker:ue,pickerShape:de,pickerPlacement:me,showArrows:fe,arrowsShape:he,arrowsPlacement:pe,editing:s,partMotion:ve}){const X=Ie(z,$),be=X?"h-[var(--sf-hero-h-m)] view-tablet:h-[var(--sf-hero-h-d)]":"h-screen min-h-[680px]",xe=X?{"--sf-hero-h-d":re(z),"--sf-hero-h-m":re($)}:void 0,G=(a?.blockCount??0)>0,we=!G&&Fe({showTicker:le,tickerItems:V}),Y=(V??[]).map(e=>e?.text?.trim()?e.text:s?ot():"").filter(Boolean),ke=We(Ze({_partMotion:ve},Je)),f=d(null),j=d(null),B=d(null),q=d(null),K=Ae(),H=d(K),[_,ye]=k([]),[Ee,F]=k(0),b=d(0),[J,Q]=k(!1),[ge,U]=k(null),[R,_e]=k(!1),A=De(),S=v(()=>f.current?.querySelector(".hero-track")??null,[]),l=v((e,t=!1)=>{F(e),U(o=>o===e?o:null),b.current=e,ce.set(H.current,e);const r=f.current?.querySelector(".hero-track");if(r)if(t){const o=r.style.transition;r.style.transition="none",r.style.transform=`translateX(-${Math.max(0,e)*100}%)`,r.offsetHeight,r.style.transition=o}else r.style.transform=`translateX(-${Math.max(0,e)*100}%)`},[]);w(()=>{const e=f.current,t=e?.getAttribute("data-easel-block")||e?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||K;H.current=t;const r=ce.get(t);typeof r=="number"&&(F(r),b.current=r)},[]),w(()=>{const e=S();if(!e)return;const t=()=>{ye(o=>ze(o,ne(e,"data-slide-name")))};t();const r=new MutationObserver(t);return r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-slide-name","data-slide-process","data-slide-media"]}),()=>{r.disconnect()}},[S]),w(()=>{if(!s)return;const e=t=>{const r=t.detail;if(!r||typeof r.index!="number")return;const o=f.current,p=o?.getAttribute("data-easel-block")||o?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||H.current;r.id&&r.id!==p||l(r.index,!0)};return nt(f.current,e)},[s,l]);const c=_.length,u=Math.min(Math.max(Ee,0),Math.max(0,c-1)),N=ge===u,L=Xe({shown:ue,count:c}),W=Ge({shown:fe,count:c}),Z=qe({editing:s,shown:u,slides:_}),Re=Ke({editing:s,playing:R,controlShown:Z}),T=je({count:c,editing:s}),h=d(null),x=d(null),Se=v(e=>{if(h.current=null,x.current=null,!T||e.touches.length!==1)return;const t=e.touches[0];h.current={x:t.clientX,y:t.clientY},x.current={x:t.clientX,y:t.clientY}},[T]),Te=v(e=>{if(!h.current)return;if(e.touches.length!==1){h.current=null;return}const t=e.touches[0];x.current={x:t.clientX,y:t.clientY}},[]),Oe=v(()=>{const e=h.current,t=x.current;if(h.current=null,x.current=null,!T||!e||!t)return;const r=Be(t.x-e.x,t.y-e.y,b.current,c);r!==b.current&&l(r)},[T,c,l]);w(()=>{if(s||!I||J||N||A||c<=1)return;const t=Math.max(1,typeof O=="number"?O:6)*1e3,r=window.setTimeout(()=>l((u+1)%c),t);return()=>window.clearTimeout(r)},[s,I,O,J,N,A,c,u,l]),w(()=>{const e=[j.current,B.current,q.current].filter(Boolean),t=e.map(o=>te(o)),r=o=>{const p=o.target,M=p.closest("[data-hero-nav]"),ee=M??p.closest("[data-idx]");if(!ee)return;o.stopPropagation(),o.preventDefault();const C=M?Ye(M.dataset.heroNav,b.current,c):Number(ee.dataset.idx);Number.isNaN(C)||(l(C,s),ne(S(),"data-slide-name")[C]?.click())};return e.forEach(o=>o.addEventListener("click",r,{capture:!0})),()=>{t.forEach(o=>o?.()),e.forEach(o=>o.removeEventListener("click",r,{capture:!0}))}},[c,l,S,s]);const He=v(e=>{if(!e)return;const t=te(e),r=o=>{o.stopPropagation(),o.preventDefault(),_e(p=>!p)};return e.addEventListener("click",r,{capture:!0}),()=>{t?.(),e.removeEventListener("click",r,{capture:!0})}},[]);return n(Le.Provider,{value:{alignment:i,textureOpacity:y,textureOn:E,textureColor:g,quietVideo:Re,phoneUpDown:ae,phoneSideways:ie,holdReel:()=>U(u),reelHeld:N},children:P("div",{ref:f,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${be} max-w-[var(--sf-hero-cap,none)] overflow-hidden`,style:xe,onMouseEnter:()=>Q(!0),onMouseLeave:()=>Q(!1),onTouchStart:Se,onTouchMove:Te,onTouchEnd:Oe,children:[n(m,{className:"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:`translateX(-${u*100}%)`,transition:A?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),Z&&n("div",{ref:He,"data-hero-video-control":R?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${Ve} + 16px)`},children:P("button",{type:"button",className:rt,children:[n("span",{"aria-hidden":"true",children:R?"❚❚":"▶"}),oe(R?tt:et)]})}),(L||W)&&P("div",{className:"pointer-events-none absolute inset-y-0 left-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] right-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] z-[6] mx-auto max-w-[var(--sf-hero-chrome-cap,calc(var(--sf-site-width,1600px)_-_var(--sf-site-gutter,40px)*2))]",children:[L&&n(Ce,{ref:j,slides:_,active:u,shape:$e(de),placement:me}),W&&n(Me,{ref:q,shape:he,placement:pe})]}),L&&n("div",{ref:B,className:"sf-hero-phone-dots absolute bottom-[80px] left-1/2 z-[6] hidden -translate-x-1/2 items-center gap-2",children:_.map((e,t)=>n("button",{type:"button","data-idx":t,"aria-label":`Go to slide ${t+1}`,className:`h-2 rounded-full transition-all motion-reduce:transition-none ${t===u?"w-5 bg-accent":"w-2 bg-white/45 hover:bg-white/70"}`},t))}),G&&a&&n("div",{className:"sf-hero-strip absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10",style:{background:se(.55),...Qe},children:n(a,{})}),we&&Y.length>0&&n(ct,{editing:!!s,entrance:ke,children:n(Ne,{items:Y,backdrop:"dark-media"})})]})})}function ct({editing:m,entrance:a,children:i}){const y="sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5",E=m?{[Pe]:""}:void 0,g={background:se(.55)};return a?n(Ue,{desktop:a.desktop,phone:a.phone,editing:m,boxClass:y,boxAttrs:E,boxStyle:g,children:i}):n("div",{className:y,...E,style:g,children:i})}export{D as HERO_SLIDER_GOTO_EVENT,tt as HERO_VIDEO_HOLD_LABEL,et as HERO_VIDEO_PLAY_LABEL,st as default,nt as subscribeSliderGoto};
1
+ "use client";import{jsx as n,jsxs as P}from"react/jsx-runtime";import{useCallback as v,useEffect as w,useId as Ne,useRef as d,useState as k}from"react";import{markOverlayPortal as W}from"../../format/lib/document/overlay-portal.js";import Ae from"./Ticker.js";import{HeroSlideStyleContext as He}from"./HeroSlide.js";import Le from"./HeroArrows.js";import Me from"./Reel.js";import{TICKER_PART_ATTR as Ce}from"./PreviewTickerContext.js";import{useReducedMotion as Pe}from"./useReducedMotion.js";import{heroHeightBox as De}from"../../format/lib/content/section-height.js";import{HEADER_HEIGHT_CSS as Ie}from"../lib/document/header-clearance.js";import{nextReel as Ve,normaliseHeroReelShape as $e,reelShown as ze}from"../../format/lib/reel.js";import{arrowsShown as Xe,arrowStep as Be}from"../../format/lib/hero-arrows.js";import{swipeEnabled as Ge,swipeStep as Ye}from"../../format/lib/hero-swipe.js";import{videoControlShown as je,videoHeld as qe}from"../../format/lib/hero-video-control.js";import{HERO_SLIDER_GOTO_EVENT as D}from"efficient-easel/draw";import{say as Z}from"../../format/lib/editor-words.js";import{markedChildren as ee}from"../../format/lib/marked-children.js";import{legacyTickerDrawn as Ke,TICKER_MOTION_PART as Fe}from"../../format/lib/hero-ticker.js";import{ON_MEDIA_INK_STYLE as Je}from"../../format/lib/content/ink.js";import{SectionAnimation as Qe}from"./SectionAnimation.js";import{entranceDrawn as Ue}from"../lib/animation/entrance.js";import{readPartMotion as We}from"../lib/animation/part-motion.js";import{scrim as te}from"../../format/lib/content/scrim.js";const Ze="Play video",et="Hold video",tt="flex h-7 cursor-pointer items-center gap-1.5 rounded-full border border-overlay-chrome/25 bg-overlay-scrim/80 px-[11px] font-mono text-[11px] leading-none tracking-[0.05em] text-overlay-fg",rt=()=>Z("item"),re=new Map;function ot(m,a){const l=m?.ownerDocument?.defaultView;if(l)return l.addEventListener(D,a),()=>l.removeEventListener(D,a)}function nt({slides:m,strip:a,alignment:l,textureOpacity:y,showTexture:E,textureColor:g,phoneUpDown:oe,phoneSideways:ne,autoplay:I,autoplayInterval:S,showTicker:se,tickerItems:V,heightDesktop:ce,heightTablet:ae,heightMobile:le,showPicker:ie,pickerShape:ue,pickerPlacement:de,showArrows:me,arrowsShape:fe,arrowsPlacement:he,editing:s,partMotion:pe}){const{className:ve,style:be}=De({heightDesktop:ce,heightTablet:ae,heightMobile:le}),$=(a?.blockCount??0)>0,xe=!$&&Ke({showTicker:se,tickerItems:V}),z=(V??[]).map(e=>e?.text?.trim()?e.text:s?rt():"").filter(Boolean),we=Ue(We({_partMotion:pe},Fe)),f=d(null),X=d(null),B=d(null),G=d(null),Y=Ne(),N=d(Y),[_,ke]=k([]),[ye,j]=k(0),b=d(0),[q,K]=k(!1),[Ee,F]=k(null),[R,ge]=k(!1),A=Pe(),T=v(()=>f.current?.querySelector(".hero-track")??null,[]),i=v((e,t=!1)=>{j(e),F(o=>o===e?o:null),b.current=e,re.set(N.current,e);const r=f.current?.querySelector(".hero-track");if(r)if(t){const o=r.style.transition;r.style.transition="none",r.style.transform=`translateX(-${Math.max(0,e)*100}%)`,r.offsetHeight,r.style.transition=o}else r.style.transform=`translateX(-${Math.max(0,e)*100}%)`},[]);w(()=>{const e=f.current,t=e?.getAttribute("data-easel-block")||e?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||Y;N.current=t;const r=re.get(t);typeof r=="number"&&(j(r),b.current=r)},[]),w(()=>{const e=T();if(!e)return;const t=()=>{ke(o=>Ve(o,ee(e,"data-slide-name")))};t();const r=new MutationObserver(t);return r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-slide-name","data-slide-process","data-slide-media"]}),()=>{r.disconnect()}},[T]),w(()=>{if(!s)return;const e=t=>{const r=t.detail;if(!r||typeof r.index!="number")return;const o=f.current,p=o?.getAttribute("data-easel-block")||o?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||N.current;r.id&&r.id!==p||i(r.index,!0)};return ot(f.current,e)},[s,i]);const c=_.length,u=Math.min(Math.max(ye,0),Math.max(0,c-1)),H=Ee===u,L=ze({shown:ie,count:c}),J=Xe({shown:me,count:c}),Q=je({editing:s,shown:u,slides:_}),_e=qe({editing:s,playing:R,controlShown:Q}),O=Ge({count:c,editing:s}),h=d(null),x=d(null),Re=v(e=>{if(h.current=null,x.current=null,!O||e.touches.length!==1)return;const t=e.touches[0];h.current={x:t.clientX,y:t.clientY},x.current={x:t.clientX,y:t.clientY}},[O]),Te=v(e=>{if(!h.current)return;if(e.touches.length!==1){h.current=null;return}const t=e.touches[0];x.current={x:t.clientX,y:t.clientY}},[]),Oe=v(()=>{const e=h.current,t=x.current;if(h.current=null,x.current=null,!O||!e||!t)return;const r=Ye(t.x-e.x,t.y-e.y,b.current,c);r!==b.current&&i(r)},[O,c,i]);w(()=>{if(s||!I||q||H||A||c<=1)return;const t=Math.max(1,typeof S=="number"?S:6)*1e3,r=window.setTimeout(()=>i((u+1)%c),t);return()=>window.clearTimeout(r)},[s,I,S,q,H,A,c,u,i]),w(()=>{const e=[X.current,B.current,G.current].filter(Boolean),t=e.map(o=>W(o)),r=o=>{const p=o.target,M=p.closest("[data-hero-nav]"),U=M??p.closest("[data-idx]");if(!U)return;o.stopPropagation(),o.preventDefault();const C=M?Be(M.dataset.heroNav,b.current,c):Number(U.dataset.idx);Number.isNaN(C)||(i(C,s),ee(T(),"data-slide-name")[C]?.click())};return e.forEach(o=>o.addEventListener("click",r,{capture:!0})),()=>{t.forEach(o=>o?.()),e.forEach(o=>o.removeEventListener("click",r,{capture:!0}))}},[c,i,T,s]);const Se=v(e=>{if(!e)return;const t=W(e),r=o=>{o.stopPropagation(),o.preventDefault(),ge(p=>!p)};return e.addEventListener("click",r,{capture:!0}),()=>{t?.(),e.removeEventListener("click",r,{capture:!0})}},[]);return n(He.Provider,{value:{alignment:l,textureOpacity:y,textureOn:E,textureColor:g,quietVideo:_e,phoneUpDown:oe,phoneSideways:ne,holdReel:()=>F(u),reelHeld:H},children:P("div",{ref:f,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${ve} max-w-[var(--sf-hero-cap,none)] overflow-hidden`,style:be,onMouseEnter:()=>K(!0),onMouseLeave:()=>K(!1),onTouchStart:Re,onTouchMove:Te,onTouchEnd:Oe,children:[n(m,{className:"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:`translateX(-${u*100}%)`,transition:A?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),Q&&n("div",{ref:Se,"data-hero-video-control":R?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${Ie} + 16px)`},children:P("button",{type:"button",className:tt,children:[n("span",{"aria-hidden":"true",children:R?"❚❚":"▶"}),Z(R?et:Ze)]})}),(L||J)&&P("div",{className:"pointer-events-none absolute inset-y-0 left-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] right-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] z-[6] mx-auto max-w-[var(--sf-hero-chrome-cap,calc(var(--sf-site-width,1600px)_-_var(--sf-site-gutter,40px)*2))]",children:[L&&n(Me,{ref:X,slides:_,active:u,shape:$e(ue),placement:de}),J&&n(Le,{ref:G,shape:fe,placement:he})]}),L&&n("div",{ref:B,className:"sf-hero-phone-dots absolute bottom-[80px] left-1/2 z-[6] hidden -translate-x-1/2 items-center gap-2",children:_.map((e,t)=>n("button",{type:"button","data-idx":t,"aria-label":`Go to slide ${t+1}`,className:`h-2 rounded-full transition-all motion-reduce:transition-none ${t===u?"w-5 bg-accent":"w-2 bg-white/45 hover:bg-white/70"}`},t))}),$&&a&&n("div",{className:"sf-hero-strip absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10",style:{background:te(.55),...Je},children:n(a,{})}),xe&&z.length>0&&n(st,{editing:!!s,entrance:we,children:n(Ae,{items:z,backdrop:"dark-media"})})]})})}function st({editing:m,entrance:a,children:l}){const y="sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5",E=m?{[Ce]:""}:void 0,g={background:te(.55)};return a?n(Qe,{desktop:a.desktop,phone:a.phone,editing:m,boxClass:y,boxAttrs:E,boxStyle:g,children:l}):n("div",{className:y,...E,style:g,children:l})}export{D as HERO_SLIDER_GOTO_EVENT,et as HERO_VIDEO_HOLD_LABEL,Ze as HERO_VIDEO_PLAY_LABEL,nt as default,ot as subscribeSliderGoto};
@@ -8,6 +8,7 @@ export interface HeroSingleProps {
8
8
  poster?: string;
9
9
  objectPosition?: string;
10
10
  objectPositionPhone?: string;
11
+ objectPositionTablet?: string;
11
12
  tintColor?: string;
12
13
  tintOpacity?: number;
13
14
  heightDesktop?: number;
@@ -18,6 +19,7 @@ export interface HeroSingleProps {
18
19
  mediaImage2?: string;
19
20
  objectPosition2?: string;
20
21
  objectPosition2Phone?: string;
22
+ objectPosition2Tablet?: string;
21
23
  tintColor2?: string;
22
24
  tintOpacity2?: number;
23
25
  videoSource?: string;
@@ -26,4 +28,4 @@ export interface HeroSingleProps {
26
28
  editing?: boolean;
27
29
  partMotion?: Record<string, unknown>;
28
30
  }
29
- export default function HeroSingle({ overlay, overlayColor, overlayPosition, mediaType, mediaSrc, poster, objectPosition, objectPositionPhone, tintColor, tintOpacity, heightDesktop, heightMobile, boxes: Boxes, videoSource, youtubeUrl, videoPlayback, mediaLayout, mediaLayoutPhone, mediaImage2, objectPosition2, objectPosition2Phone, tintColor2, tintOpacity2, editing, partMotion, }: HeroSingleProps): import("react").JSX.Element;
31
+ export default function HeroSingle({ overlay, overlayColor, overlayPosition, mediaType, mediaSrc, poster, objectPosition, objectPositionPhone, objectPositionTablet, tintColor, tintOpacity, heightDesktop, heightMobile, boxes: Boxes, videoSource, youtubeUrl, videoPlayback, mediaLayout, mediaLayoutPhone, mediaImage2, objectPosition2, objectPosition2Phone, objectPosition2Tablet, tintColor2, tintOpacity2, editing, partMotion, }: HeroSingleProps): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as N}from"react/jsx-runtime";import{useRef as J,useState as Q}from"react";import W from"./HeroPoster.js";import{HeroMediaLayer as X,heroMediaReading as Z,HeroPickArea as ee,heroPartEntrance as oe,heroPartHover as re,HeroPictureHover as te,heroPicturesHover as se,HeroTint as ie,HeroTwoPictures as ae}from"./HeroPictures.js";import{HeroVideoBackdrop as ne,HeroVideoPlayer as ce}from"./HeroVideoPlay.js";import{resolveMedia as t}from"../lib/media.js";import{hasSectionHeight as le,resolveSectionHeight as I}from"../../format/lib/content/section-height.js";import{DEFAULT_OVERLAY_POSITION as de,overlayGradient as he}from"../../format/lib/sections/hero-overlay.js";import{ON_MEDIA_INK_STYLE as me}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as c}from"../../format/lib/content/tint.js";import ue from"./PhotoHoverSheet.js";function fe({overlay:j=100,overlayColor:k=c,overlayPosition:E=de,mediaType:l="image",mediaSrc:s,poster:d,objectPosition:h,objectPositionPhone:m,tintColor:u=c,tintOpacity:f=0,heightDesktop:p,heightMobile:v,boxes:g,videoSource:A,youtubeUrl:V,videoPlayback:z,mediaLayout:O,mediaLayoutPhone:R,mediaImage2:F,objectPosition2:M,objectPosition2Phone:Y,tintColor2:C=c,tintOpacity2:D=0,editing:o=!1,partMotion:r}){const y=le(p,v),U=y?"h-[var(--sf-hero-h-m)] view-tablet:h-[var(--sf-hero-h-d)]":"h-screen min-h-[680px]",B=y?{"--sf-hero-h-d":I(p),"--sf-hero-h-m":I(v)}:void 0,i=l==="video",H=i?t(s):void 0,P=i?t(d):t(s)??t(d),{fromYouTube:b,onClick:x,youTubeId:w,backgroundFile:T,desktopLayout:G,phoneLayout:K,twoPictures:S}=Z({isVideo:i,videoSource:A,videoPlayback:z,youtubeUrl:V,mediaLayout:O,mediaLayoutPhone:R}),[_,$]=Q(!1),a=!_,q=J(null),n=l==="video"?"media":"image",L=se(r);return N("section",{ref:q,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${U} max-w-[var(--sf-hero-cap,none)] overflow-hidden`,style:B,...L.hostAttrs,children:[e(ue,{sheet:L.sheet}),e(X,{partMotion:r,editing:o,children:S?e(ae,{desktopLayout:G,phoneLayout:K,editing:o,partMotion:r,first:{src:s,objectPosition:h,objectPositionPhone:m,tintColor:u,tintOpacity:f},second:{src:F,objectPosition:M,objectPositionPhone:Y,tintColor:C,tintOpacity:D}}):e(ee,{part:n,editing:o,entrance:n==="image"?oe(r,"image"):null,className:"absolute inset-0 z-[1]",children:N(te,{treatment:n==="image"?re(r,"image"):{},children:[e(W,{videoSrc:T?H:void 0,posterSrc:P,showVideo:T,objectPosition:h,objectPositionPhone:m}),b&&e(ne,{youTubeId:w,ownPoster:!!P,background:!x,editing:o})]})})}),x&&e(ce,{youTubeId:w,fileSrc:b?void 0:H,playing:_,onPlay:()=>$(!0),editing:o}),a&&!S&&e(ie,{color:u,opacity:f}),a&&e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:he(k,E),opacity:Math.min(Math.max(j,0),100)/100}}),a&&g&&e("div",{className:["sf-hero-group-layer absolute inset-0 z-[3] mx-auto","max-w-[var(--sf-site-width,1600px)]","px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",o?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:me,children:e(g,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}export{fe as default};
1
+ "use client";import{jsx as e,jsxs as _}from"react/jsx-runtime";import{useRef as J,useState as Q}from"react";import W from"./HeroPoster.js";import{HeroMediaLayer as X,heroMediaReading as Z,HeroPickArea as ee,heroPartEntrance as oe,heroPartHover as re,HeroPictureHover as te,heroPicturesHover as se,HeroTint as ie,HeroTwoPictures as ae}from"./HeroPictures.js";import{HeroVideoBackdrop as ne,HeroVideoPlayer as ce}from"./HeroVideoPlay.js";import{resolveMedia as t}from"../lib/media.js";import{heroHeightBox as le}from"../../format/lib/content/section-height.js";import{DEFAULT_OVERLAY_POSITION as me,overlayGradient as de}from"../../format/lib/sections/hero-overlay.js";import{ON_MEDIA_INK_STYLE as ue}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as c}from"../../format/lib/content/tint.js";import he from"./PhotoHoverSheet.js";function fe({overlay:L=100,overlayColor:j=c,overlayPosition:k=me,mediaType:l="image",mediaSrc:s,poster:m,objectPosition:d,objectPositionPhone:u,objectPositionTablet:h,tintColor:f=c,tintOpacity:p=0,heightDesktop:I,heightMobile:S,boxes:v,videoSource:E,youtubeUrl:A,videoPlayback:V,mediaLayout:O,mediaLayoutPhone:z,mediaImage2:M,objectPosition2:R,objectPosition2Phone:D,objectPosition2Tablet:F,tintColor2:Y=c,tintOpacity2:B=0,editing:o=!1,partMotion:r}){const{className:C,style:U}=le({heightDesktop:I,heightMobile:S}),i=l==="video",g=i?t(s):void 0,y=i?t(m):t(s)??t(m),{fromYouTube:b,onClick:P,youTubeId:H,backgroundFile:x,desktopLayout:G,phoneLayout:K,twoPictures:w}=Z({isVideo:i,videoSource:E,videoPlayback:V,youtubeUrl:A,mediaLayout:O,mediaLayoutPhone:z}),[T,$]=Q(!1),a=!T,q=J(null),n=l==="video"?"media":"image",N=se(r);return _("section",{ref:q,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${C} max-w-[var(--sf-hero-cap,none)] overflow-hidden`,style:U,...N.hostAttrs,children:[e(he,{sheet:N.sheet}),e(X,{partMotion:r,editing:o,children:w?e(ae,{desktopLayout:G,phoneLayout:K,editing:o,partMotion:r,first:{src:s,objectPosition:d,objectPositionPhone:u,objectPositionTablet:h,tintColor:f,tintOpacity:p},second:{src:M,objectPosition:R,objectPositionPhone:D,objectPositionTablet:F,tintColor:Y,tintOpacity:B}}):e(ee,{part:n,editing:o,entrance:n==="image"?oe(r,"image"):null,className:"absolute inset-0 z-[1]",children:_(te,{treatment:n==="image"?re(r,"image"):{},children:[e(W,{videoSrc:x?g:void 0,posterSrc:y,showVideo:x,objectPosition:d,objectPositionPhone:u,objectPositionTablet:h}),b&&e(ne,{youTubeId:H,ownPoster:!!y,background:!P,editing:o})]})})}),P&&e(ce,{youTubeId:H,fileSrc:b?void 0:g,playing:T,onPlay:()=>$(!0),editing:o}),a&&!w&&e(ie,{color:f,opacity:p}),a&&e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:de(j,k),opacity:Math.min(Math.max(L,0),100)/100}}),a&&v&&e("div",{className:["sf-hero-group-layer absolute inset-0 z-[3] mx-auto","max-w-[var(--sf-site-width,1600px)]","px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",o?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:ue,children:e(v,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}export{fe as default};
@@ -22,6 +22,7 @@ export interface HeroSlideProps {
22
22
  poster?: string;
23
23
  objectPosition?: string;
24
24
  objectPositionPhone?: string;
25
+ objectPositionTablet?: string;
25
26
  tintColor?: string;
26
27
  tintOpacity?: number;
27
28
  themeClassName?: string;
@@ -35,6 +36,7 @@ export interface HeroSlideProps {
35
36
  mediaImage2?: string;
36
37
  objectPosition2?: string;
37
38
  objectPosition2Phone?: string;
39
+ objectPosition2Tablet?: string;
38
40
  tintColor2?: string;
39
41
  tintOpacity2?: number;
40
42
  videoSource?: string;
@@ -42,5 +44,5 @@ export interface HeroSlideProps {
42
44
  videoPlayback?: string;
43
45
  partMotion?: Record<string, unknown>;
44
46
  }
45
- export default function HeroSlide({ name, process, mediaType, mediaSrc, videoSpeed, poster, objectPosition, objectPositionPhone, tintColor, tintOpacity, groups: Groups, editing, themeClassName, themeStyle, overlayColor, overlayPosition, mediaLayout, mediaLayoutPhone, mediaImage2, objectPosition2, objectPosition2Phone, tintColor2, tintOpacity2, videoSource, youtubeUrl, videoPlayback, partMotion, }: HeroSlideProps): import("react").JSX.Element;
47
+ export default function HeroSlide({ name, process, mediaType, mediaSrc, videoSpeed, poster, objectPosition, objectPositionPhone, objectPositionTablet, tintColor, tintOpacity, groups: Groups, editing, themeClassName, themeStyle, overlayColor, overlayPosition, mediaLayout, mediaLayoutPhone, mediaImage2, objectPosition2, objectPosition2Phone, objectPosition2Tablet, tintColor2, tintOpacity2, videoSource, youtubeUrl, videoPlayback, partMotion, }: HeroSlideProps): import("react").JSX.Element;
46
48
  export declare const HERO_SLIDE_SEEDS: Record<string, unknown>[];
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as I}from"react/jsx-runtime";import{createContext as re,useContext as ie,useState as se}from"react";import ae from"./HeroPoster.js";import{HeroMediaLayer as ne,heroMediaReading as le,HeroPickArea as de,heroPartEntrance as ce,heroPartHover as ue,HeroPictureHover as pe,heroPicturesHover as fe,HeroTint as me,HeroTwoPictures as he}from"./HeroPictures.js";import{HeroVideoBackdrop as ye,HeroVideoPlayer as ve}from"./HeroVideoPlay.js";import{resolveMedia as s}from"../lib/media.js";import{heroPhoneStackStyle as xe}from"../../format/lib/hero-phone-stack.js";import{heroTextureGradient as ge,heroTextureShown as He}from"../../format/lib/hero-texture.js";import{ON_MEDIA_INK_STYLE as Pe}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as N}from"../../format/lib/content/tint.js";import{overlayGradient as Se,slideOverlayState as be}from"../../format/lib/sections/hero-overlay.js";import we from"./PhotoHoverSheet.js";const ke=re({});function Te({name:f,process:a,mediaType:C="video",mediaSrc:n,videoSpeed:m,poster:h,objectPosition:y,objectPositionPhone:v,tintColor:x=N,tintOpacity:g=0,groups:H,editing:t=!1,themeClassName:P,themeStyle:O,overlayColor:V,overlayPosition:A,mediaLayout:D,mediaLayoutPhone:R,mediaImage2:z,objectPosition2:q,objectPosition2Phone:B,tintColor2:F=N,tintOpacity2:M=0,videoSource:U,youtubeUrl:Y,videoPlayback:$,partMotion:r}){const{alignment:Ee="left",textureOpacity:S,textureOn:G,textureColor:K,quietVideo:J,phoneUpDown:Q,phoneSideways:W,holdReel:X,reelHeld:Z}=ie(ke),o=C==="video",l=o?s(n):void 0,b=o?s(h):s(n)??s(h),ee=typeof m=="number"?m/100:1,{fromYouTube:d,onClick:w,youTubeId:k,backgroundFile:c,desktopLayout:oe,phoneLayout:te,twoPictures:T}=le({isVideo:o,videoSource:U,videoPlayback:$,youtubeUrl:Y,mediaLayout:D,mediaLayoutPhone:R}),[u,E]=se(!1);u&&Z===!1&&E(!1);const p=!u,i=be({overlayColor:V,overlayPosition:A},K),L=o?null:ce(r,"image"),_=fe(r),j=e(pe,{treatment:o?{}:ue(r,"image"),children:e(ae,{videoSrc:c?l:void 0,posterSrc:b,showVideo:c,playbackRate:ee,objectPosition:y,objectPositionPhone:o?void 0:v,quiet:J})});return I("section",{className:P?`relative h-full w-full overflow-hidden ${P}`:"relative h-full w-full overflow-hidden",style:O,"data-slide-name":f??"","data-slide-process":a??"","data-slide-media":c&&l?"video":"still",..._.hostAttrs,children:[e(we,{sheet:_.sheet}),e(ne,{partMotion:r,editing:t,children:T?e(he,{desktopLayout:oe,phoneLayout:te,editing:t,marked:!1,partMotion:r,first:{src:n,objectPosition:y,objectPositionPhone:v,tintColor:x,tintOpacity:g},second:{src:z,objectPosition:q,objectPositionPhone:B,tintColor:F,tintOpacity:M}}):d||L?I(de,{part:o?"media":"image",editing:t,marked:!1,entrance:L,className:"absolute inset-0 z-[1]",children:[j,d&&e(ye,{youTubeId:k,ownPoster:!!b,background:!w,editing:t})]}):j}),w&&e(ve,{youTubeId:k,fileSrc:d?void 0:l,playing:u,onPlay:()=>{E(!0),X?.()},editing:t}),p&&!T&&e(me,{color:x,opacity:g,passClicks:!1}),p&&He(G)&&e("div",{className:"absolute inset-0 z-[2]",style:{background:i.own?Se(i.color,i.position??void 0):ge(i.color),...S!==void 0?{opacity:S/100}:null}}),p&&e("div",{className:["sf-hero-group-layer absolute inset-0 z-[3] mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",t?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{...Pe,...xe(Q,W)},children:H&&e(H,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}const qe=Array.from({length:3},(f,a)=>({name:`Slide ${a+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));export{qe as HERO_SLIDE_SEEDS,ke as HeroSlideStyleContext,Te as default};
1
+ "use client";import{jsx as e,jsxs as N}from"react/jsx-runtime";import{createContext as se,useContext as ae,useState as ne}from"react";import le from"./HeroPoster.js";import{HeroMediaLayer as de,heroMediaReading as ce,HeroPickArea as ue,heroPartEntrance as pe,heroPartHover as fe,HeroPictureHover as me,heroPicturesHover as he,HeroTint as ye,HeroTwoPictures as ve}from"./HeroPictures.js";import{HeroVideoBackdrop as xe,HeroVideoPlayer as ge}from"./HeroVideoPlay.js";import{resolveMedia as s}from"../lib/media.js";import{heroPhoneStackStyle as be}from"../../format/lib/hero-phone-stack.js";import{heroTextureGradient as He,heroTextureShown as Pe}from"../../format/lib/hero-texture.js";import{ON_MEDIA_INK_STYLE as Se}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as C}from"../../format/lib/content/tint.js";import{overlayGradient as we,slideOverlayState as ke}from"../../format/lib/sections/hero-overlay.js";import Te from"./PhotoHoverSheet.js";const Ee=se({});function Le({name:f,process:a,mediaType:O="video",mediaSrc:n,videoSpeed:m,poster:h,objectPosition:y,objectPositionPhone:v,objectPositionTablet:x,tintColor:g=C,tintOpacity:b=0,groups:H,editing:t=!1,themeClassName:P,themeStyle:V,overlayColor:A,overlayPosition:D,mediaLayout:R,mediaLayoutPhone:z,mediaImage2:q,objectPosition2:B,objectPosition2Phone:F,objectPosition2Tablet:M,tintColor2:U=C,tintOpacity2:Y=0,videoSource:$,youtubeUrl:G,videoPlayback:K,partMotion:r}){const{alignment:_e="left",textureOpacity:S,textureOn:J,textureColor:Q,quietVideo:W,phoneUpDown:X,phoneSideways:Z,holdReel:ee,reelHeld:oe}=ae(Ee),o=O==="video",l=o?s(n):void 0,w=o?s(h):s(n)??s(h),te=typeof m=="number"?m/100:1,{fromYouTube:d,onClick:k,youTubeId:T,backgroundFile:c,desktopLayout:re,phoneLayout:ie,twoPictures:E}=ce({isVideo:o,videoSource:$,videoPlayback:K,youtubeUrl:G,mediaLayout:R,mediaLayoutPhone:z}),[u,L]=ne(!1);u&&oe===!1&&L(!1);const p=!u,i=ke({overlayColor:A,overlayPosition:D},Q),_=o?null:pe(r,"image"),j=he(r),I=e(me,{treatment:o?{}:fe(r,"image"),children:e(le,{videoSrc:c?l:void 0,posterSrc:w,showVideo:c,playbackRate:te,objectPosition:y,objectPositionPhone:o?void 0:v,objectPositionTablet:o?void 0:x,quiet:W})});return N("section",{className:P?`relative h-full w-full overflow-hidden ${P}`:"relative h-full w-full overflow-hidden",style:V,"data-slide-name":f??"","data-slide-process":a??"","data-slide-media":c&&l?"video":"still",...j.hostAttrs,children:[e(Te,{sheet:j.sheet}),e(de,{partMotion:r,editing:t,children:E?e(ve,{desktopLayout:re,phoneLayout:ie,editing:t,marked:!1,partMotion:r,first:{src:n,objectPosition:y,objectPositionPhone:v,objectPositionTablet:x,tintColor:g,tintOpacity:b},second:{src:q,objectPosition:B,objectPositionPhone:F,objectPositionTablet:M,tintColor:U,tintOpacity:Y}}):d||_?N(ue,{part:o?"media":"image",editing:t,marked:!1,entrance:_,className:"absolute inset-0 z-[1]",children:[I,d&&e(xe,{youTubeId:T,ownPoster:!!w,background:!k,editing:t})]}):I}),k&&e(ge,{youTubeId:T,fileSrc:d?void 0:l,playing:u,onPlay:()=>{L(!0),ee?.()},editing:t}),p&&!E&&e(ye,{color:g,opacity:b,passClicks:!1}),p&&Pe(J)&&e("div",{className:"absolute inset-0 z-[2]",style:{background:i.own?we(i.color,i.position??void 0):He(i.color),...S!==void 0?{opacity:S/100}:null}}),p&&e("div",{className:["sf-hero-group-layer absolute inset-0 z-[3] mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",t?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{...Se,...be(X,Z)},children:H&&e(H,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}const Fe=Array.from({length:3},(f,a)=>({name:`Slide ${a+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));export{Fe as HERO_SLIDE_SEEDS,Ee as HeroSlideStyleContext,Le as default};
@@ -1,12 +1,13 @@
1
+ import { type ImageAspect } from "../../format/lib/content/image-aspect.js";
1
2
  import { type ImageFit } from "../../format/lib/content/image-fit.js";
2
3
  import type { PictureHoverDrawn } from "../../format/lib/animation/hover.js";
3
4
  import type { PadValues } from "../lib/content/section-padding.js";
4
- type Aspect = "auto" | "21/9" | "16/9" | "4/3" | "1/1";
5
5
  interface ImageBlockProps {
6
6
  editing?: boolean;
7
7
  src: string;
8
8
  alt: string;
9
- aspect: Aspect;
9
+ aspect: ImageAspect;
10
+ aspectPhone?: unknown;
10
11
  caption?: string;
11
12
  contained: boolean;
12
13
  grayscale?: boolean;
@@ -18,10 +19,11 @@ interface ImageBlockProps {
18
19
  fit?: ImageFit;
19
20
  focal?: string;
20
21
  focalPhone?: string;
22
+ focalTablet?: string;
21
23
  corners?: number;
22
24
  cornerSides?: string[] | null;
23
25
  pad?: PadValues;
24
26
  ownSize?: boolean;
25
27
  }
26
- export default function ImageBlock({ src, alt, aspect, contained, grayscale, pictureHover, nextSrc, darken, darkenStyle, href, fit, focal, focalPhone, corners, cornerSides, pad, ownSize, editing, }: ImageBlockProps): import("react").JSX.Element | null;
28
+ export default function ImageBlock({ src, alt, aspect: storedAspect, aspectPhone, contained, grayscale, pictureHover, nextSrc, darken, darkenStyle, href, fit, focal, focalPhone, focalTablet, corners, cornerSides, pad, ownSize, editing, }: ImageBlockProps): import("react").JSX.Element | null;
27
29
  export {};
@@ -1 +1 @@
1
- import{jsx as e,Fragment as S,jsxs as E}from"react/jsx-runtime";import{SiteLink as J}from"../lib/site-runtime.js";import K from"./BlockFrame.js";import{useSectionEdge as Q}from"./SiteGutterFrame.js";import{useSitePhotography as Y}from"./SitePhotographyContext.js";import{media as I}from"../lib/media.js";import{CONTENT_SIZES as P,sizedImage as w}from"../../format/lib/sized-image.js";import{imageCornerStyle as H}from"../../format/lib/content/image-corners.js";import{imageFitClass as T,imageIsCropped as ee,parseImageFit as se}from"../../format/lib/content/image-fit.js";import{NEXT_PICTURE_CLASS as te,PICTURE_FRAME_CLASS as le,PICTURE_WASH_CLASS as oe,PICTURE_ZOOM_CLASS as ae,PICTURE_ZOOM_VAR as re,resolveImageTreatment as ne,resolveNextPicture as ce}from"../../format/lib/content/image-treatment.js";import{boxDarkenStyle as j}from"../../format/lib/content/box-background.js";import{phoneFocus as me}from"../../format/lib/content/phone-focus.js";import{say as ie}from"../../format/lib/editor-words.js";import{sectionEdgeAttrs as fe}from"../lib/content/section-edge.js";import z from"./PhotoHoverSheet.js";import de from"./PictureWash.js";const he={auto:"","21/9":"aspect-[21/9]","16/9":"aspect-[16/9]","4/3":"aspect-[4/3]","1/1":"aspect-square"};function ue({src:t,alt:A,aspect:d,contained:F,grayscale:O,pictureHover:l,nextSrc:y,darken:L,darkenStyle:N,href:R,fit:U,focal:b,focalPhone:W,corners:B,cornerSides:M,pad:C,ownSize:Z=!1,editing:q=!1}){const r=ne(O,Y(),l),h=se(U,"cover"),_=H(B,M),$=ee(d,h),o=me($?W:void 0),n={...r.style??{},...b&&$?{objectPosition:b}:{},...o.style},c=t?w(I(t)):null,s=ce(l),a=s&&y?w(I(y)):null,m=s?l?.zoom??null:null,D=j(L,N),k=s&&l?.darken?j(l.darken,N):null,u=!!(s&&(a||m||k)),v=u?{...s?.style??{},...m?{[re]:m}:{}}:{},V=s&&a?e(S,{children:e("img",{src:a.src,...a.srcSet?{srcSet:a.srcSet,sizes:P}:{},alt:"","aria-hidden":"true",loading:"lazy",decoding:"async",className:`absolute inset-0 h-full w-full bg-surface ${T(h)}${o.className?` ${o.className}`:""} ${s.className}`,...Object.keys(n).length?{style:n}:{}})}):null,p=t&&c?E(S,{children:[e("img",{src:c.src,...c.srcSet?{srcSet:c.srcSet,sizes:P}:{},alt:A,className:`h-full w-full ${d==="auto"?"":T(h)}${r.className?` ${r.className}`:""}${o.className?` ${o.className}`:""}`,...Object.keys(n).length?{style:n}:{}}),V]}):null,g=p?E(S,{children:[e(z,{sheet:r.sheet}),u&&s?e(z,{sheet:s.sheet,name:te}):null,m?e("div",{className:`relative h-full w-full ${ae}`,children:p}):p,e(de,{wash:D,hover:k,className:`pointer-events-none ${oe}`})]}):e("div",{className:"flex aspect-[16/9] items-center justify-center border border-dashed border-line font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim",children:ie("Image — set a path")}),i=(R??"").trim(),X=i&&t?i.startsWith("/")?e(J,{href:i,className:"block h-full w-full",children:g}):e("a",{href:i,className:"block h-full w-full",children:g}):g,x=Q(),f=x&&!Z?fe(x):null,G=C?{values:C,frame:24}:void 0;return!t&&!q?null:e(K,{contained:f?!1:F,className:"py-6",pad:G,...f?{fillWidth:f.className,style:f.style}:{},children:e("figure",{children:e("div",{className:`relative w-full overflow-hidden bg-surface ${he[d]}${u?` ${le}`:""}`,..._||Object.keys(v).length?{style:{..._,...v}}:{},children:X})})})}export{ue as default};
1
+ import{jsx as e,Fragment as F,jsxs as O}from"react/jsx-runtime";import{SiteLink as ne}from"../lib/site-runtime.js";import me from"./BlockFrame.js";import{useBoxCell as ce,useFillsCell as fe}from"./InBoxContext.js";import{useInsideSiteGutter as de,useSectionEdge as ue}from"./SiteGutterFrame.js";import{useSitePhotography as he}from"./SitePhotographyContext.js";import{media as T}from"../lib/media.js";import{CONTENT_SIZES as j,sizedImage as z}from"../../format/lib/sized-image.js";import{imageCornerStyle as pe}from"../../format/lib/content/image-corners.js";import{FILL_ROW as ge,imageAspectClasses as Se,imageFillFrom as Ne,imageAspectDrawn as ye,imageAspectDrawsARatio as Ce,imageFocalPointActs as Fe,imageFocalPointActsIn as P,imageAspectPhoneOf as be,imageFillRowClasses as we}from"../../format/lib/content/image-aspect.js";import{drawsSiteGutter as Ae}from"../../format/lib/content/site-gutter.js";import{imageFitClass as U,parseImageFit as _e}from"../../format/lib/content/image-fit.js";import{SECTION_FILL_CLASS as $e}from"../../format/lib/content/section-min-height.js";import{NEXT_PICTURE_CLASS as Ie,PICTURE_FRAME_CLASS as xe,PICTURE_WASH_CLASS as ke,PICTURE_ZOOM_CLASS as ve,PICTURE_ZOOM_VAR as Re,resolveImageTreatment as Ee,resolveNextPicture as Le}from"../../format/lib/content/image-treatment.js";import{boxDarkenStyle as W}from"../../format/lib/content/box-background.js";import{phoneFocus as Oe}from"../../format/lib/content/phone-focus.js";import{say as Te}from"../../format/lib/editor-words.js";import{sectionEdgeAttrs as je}from"../lib/content/section-edge.js";import B from"./PhotoHoverSheet.js";import ze from"./PictureWash.js";function Pe({src:o,alt:G,aspect:D,aspectPhone:l,contained:b,grayscale:M,pictureHover:r,nextSrc:w,darken:Z,darkenStyle:A,href:V,fit:X,focal:_,focalPhone:q,focalTablet:J,corners:K,cornerSides:Q,pad:$,ownSize:Y=!1,editing:I=!1}){const c=Ee(M,he(),r),S=ce(),H=fe(),t=ye(D,S?.picturesFillRow===!0),f=t===ge,x=Ne(S?.fillFrom,S?.phoneRowFills===!0,l),d=f?we(x):null,ee=be(t,l),a=_e(X,"cover"),k=pe(K,Q),se=Fe(a,t,l),i=Oe(P("mobile",a,t,l)?q:void 0,P("tablet",a,t,l)?J:void 0),u={...c.style??{},..._&&se?{objectPosition:_}:{},...i.style},h=o?z(T(o)):null,s=Le(r),n=s&&w?z(T(w)):null,p=s?r?.zoom??null:null,te=W(Z,A),v=s&&r?.darken?W(r.darken,A):null,N=!!(s&&(n||p||v)),R=N?{...s?.style??{},...p?{[Re]:p}:{}}:{},le=s&&n?e(F,{children:e("img",{src:n.src,...n.srcSet?{srcSet:n.srcSet,sizes:j}:{},alt:"","aria-hidden":"true",loading:"lazy",decoding:"async",className:`absolute inset-0 h-full w-full bg-surface ${U(a)}${i.className?` ${i.className}`:""} ${s.className}`,...Object.keys(u).length?{style:u}:{}})}):null,y=o&&h?O(F,{children:[e("img",{src:h.src,...h.srcSet?{srcSet:h.srcSet,sizes:j}:{},alt:G,className:`${d?`${d.img} `:""}h-full w-full ${Ce(t,l)?U(a):""}${c.className?` ${c.className}`:""}${i.className?` ${i.className}`:""}`,...Object.keys(u).length?{style:u}:{}}),le]}):null,C=y?O(F,{children:[e(B,{sheet:c.sheet}),N&&s?e(B,{sheet:s.sheet,name:Ie}):null,p?e("div",{className:`${f?"absolute inset-0":"relative h-full w-full"} ${ve}`,children:y}):y,e(ze,{wash:te,hover:v,className:`pointer-events-none ${ke}`})]}):e("div",{className:"flex aspect-[16/9] items-center justify-center border border-dashed border-line font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim",children:Te("Image — set a path")}),g=(V??"").trim(),oe=g&&o?g.startsWith("/")?e(ne,{href:g,className:"block h-full w-full",children:C}):e("a",{href:g,className:"block h-full w-full",children:C}):C,E=ue(),re=de(),m=E&&!Y?je(E):null,L=$?{values:$,frame:f?0:24}:void 0,ae=L!==void 0&&Ae(m?!1:b,re),ie=f?H||I||ae?$e:"":"py-6";return!o&&!I?null:e(me,{contained:m?!1:b,className:ie,pad:L,...m?{fillWidth:m.className,style:m.style}:{},children:e("figure",{...d?{className:d.figure}:{},children:e("div",{className:`relative w-full overflow-hidden bg-surface ${Se(t,ee,x)}${N?` ${xe}`:""}`,...k||Object.keys(R).length?{style:{...k,...R}}:{},children:oe})})})}export{Pe as default};
@@ -3,6 +3,9 @@ export type BoxCell = {
3
3
  stretchedRow: boolean;
4
4
  fillingColumn: boolean;
5
5
  columnsRow?: boolean;
6
+ picturesFillRow?: boolean;
7
+ fillFrom?: "tablet" | "desktop";
8
+ phoneRowFills?: boolean;
6
9
  id?: string;
7
10
  };
8
11
  export declare const InBoxContext: import("react").Context<BoxCell | null>;
@@ -8,6 +8,7 @@ export declare function InsideSiteColumn({ children }: {
8
8
  export declare function SplitBandAndColumn({ children }: {
9
9
  children?: ReactNode;
10
10
  }): import("react").JSX.Element;
11
+ export declare function useInsideBox(): boolean;
11
12
  export declare function NestedBoxChoice({ atTop, nested }: {
12
13
  atTop: ReactNode;
13
14
  nested: ReactNode;
@@ -1 +1 @@
1
- "use client";import{jsx as e,Fragment as T}from"react/jsx-runtime";import{createContext as f,useContext as t}from"react";import{rootPadAttrs as k,wrapperPadAttrs as q}from"../lib/content/section-padding.js";import{SECTION_BORDER_CLASS as z,SECTION_BORDER_SELF_CLASS as H}from"../../format/lib/content/borders.js";import{drawsSiteGutter as J}from"../../format/lib/content/site-gutter.js";const i=f(!1);function Y(){return t(i)}function Z({children:n}){return e(i.Provider,{value:!0,children:n})}const S=f(!1);function $({children:n}){return e(S.Provider,{value:!0,children:n})}const x=f(!1);function b({atTop:n,nested:r}){return e(T,{children:t(x)?r:n})}const c=f(void 0);function ee({children:n}){return e(c.Provider,{value:null,children:n})}function ne(){return t(c)===void 0&&!t(x)&&!t(i)}function te(){return t(c)??null}function K({contained:n,framedClass:r,fillClass:j,columnClass:w,style:C,tabLabel:y,pad:o,border:u,outerAttrs:m,box:g=!1,edge:A=!1,outerStyle:a,bleed:N=!1,children:P}){const F=t(i),B=t(S),d=J(n,F),s=d&&!B,v=o&&!s?k(o.values,o.frame):null,p=u&&!s?u:null,G=[s?r:j,v?.className,p?H:null].filter(Boolean).join(" "),E=M(N&&s,v||p?{...C,...v?.style,...p}:C),L=t(c),D=g&&A&&L===void 0?{gutter:d,...o?{pad:o.values}:{}}:null,R=g?e(x.Provider,{value:!0,children:e(c.Provider,{value:D,children:P})}):P,h=d?e(i.Provider,{value:!0,children:R}):R,l=o&&s?q(o.values):null,I=m&&Object.keys(m).length>0?m:null,O=e("div",{...l?null:I,className:G,style:l||!a?E:{...E,...a},"data-tab-label":y,children:B?e(S.Provider,{value:!1,children:d&&!N?e("div",{className:w,children:h}):h}):h}),_=l?e("div",{...I,className:l.className,style:a?{...l.style,...a}:l.style,children:O}):O;return u&&s?e("div",{className:z,style:{display:"contents",...u},children:_}):_}function M(n,r){return n?{...r,paddingLeft:0,paddingRight:0}:r}export{Z as InsideSiteColumn,b as NestedBoxChoice,ee as NotASectionEdge,$ as SplitBandAndColumn,K as default,Y as useInsideSiteGutter,te as useSectionEdge,ne as useSectionRoot};
1
+ "use client";import{jsx as e,Fragment as T}from"react/jsx-runtime";import{createContext as f,useContext as t}from"react";import{rootPadAttrs as k,wrapperPadAttrs as q}from"../lib/content/section-padding.js";import{SECTION_BORDER_CLASS as z,SECTION_BORDER_SELF_CLASS as H}from"../../format/lib/content/borders.js";import{drawsSiteGutter as J}from"../../format/lib/content/site-gutter.js";const l=f(!1);function Z(){return t(l)}function $({children:n}){return e(l.Provider,{value:!0,children:n})}const h=f(!1);function b({children:n}){return e(h.Provider,{value:!0,children:n})}const S=f(!1);function K(){return t(S)}function ee({atTop:n,nested:r}){return e(T,{children:K()?r:n})}const u=f(void 0);function ne({children:n}){return e(u.Provider,{value:null,children:n})}function te(){return t(u)===void 0&&!t(S)&&!t(l)}function oe(){return t(u)??null}function M({contained:n,framedClass:r,fillClass:j,columnClass:w,style:C,tabLabel:y,pad:o,border:c,outerAttrs:m,box:g=!1,edge:A=!1,outerStyle:a,bleed:N=!1,children:B}){const F=t(l),P=t(h),d=J(n,F),s=d&&!P,v=o&&!s?k(o.values,o.frame):null,p=c&&!s?c:null,G=[s?r:j,v?.className,p?H:null].filter(Boolean).join(" "),E=Q(N&&s,v||p?{...C,...v?.style,...p}:C),L=t(u),D=g&&A&&L===void 0?{gutter:d,...o?{pad:o.values}:{}}:null,I=g?e(S.Provider,{value:!0,children:e(u.Provider,{value:D,children:B})}):B,x=d?e(l.Provider,{value:!0,children:I}):I,i=o&&s?q(o.values):null,R=m&&Object.keys(m).length>0?m:null,O=e("div",{...i?null:R,className:G,style:i||!a?E:{...E,...a},"data-tab-label":y,children:P?e(h.Provider,{value:!1,children:d&&!N?e("div",{className:w,children:x}):x}):x}),_=i?e("div",{...R,className:i.className,style:a?{...i.style,...a}:i.style,children:O}):O;return c&&s?e("div",{className:z,style:{display:"contents",...c},children:_}):_}function Q(n,r){return n?{...r,paddingLeft:0,paddingRight:0}:r}export{$ as InsideSiteColumn,ee as NestedBoxChoice,ne as NotASectionEdge,b as SplitBandAndColumn,M as default,K as useInsideBox,Z as useInsideSiteGutter,oe as useSectionEdge,te as useSectionRoot};
@@ -1,2 +1,2 @@
1
- import{jsxs as a,jsx as t}from"react/jsx-runtime";import{Fragment as h}from"react";import{parseHexColor as N}from"efficient-shell/format";import{linePrefix as _,storefrontLines as S}from"../../format/lib/markup.js";import{COLOUR_TOKEN as p,WORD_STYLE_ATTR as g,WORD_STYLE_BY_KIND as E}from"../../format/lib/word-styles.js";import f from"./PartStyledText.js";import{withRMark as d}from"./RMark.js";function T(e,n=!1,s){const r=x(n),c=S(e);if(c.length===1){const[o]=c,l=_(o),L=l?A(l,o.children):o.children;return a(f,{value:e,children:[s,u(L,r)]})}const i=[];return c.forEach((o,l)=>{if(o.bullet){i.push(t("span",{"data-sf-bullet":"",className:C,children:u(o.children,r)},l));return}if(o.number!=null){i.push(a("span",{"data-sf-number":o.number,className:R,children:[a("span",{className:k,children:[o.number,"."]}),u(o.children,r)]},l));return}l>0&&!w(c[l-1])&&i.push(t("br",{},`br${l}`)),i.push(t(h,{children:u(o.children,r)},l))}),a(f,{value:e,children:[s,i]})}const C="relative block pl-6 before:absolute before:left-1.5 before:font-bold before:text-accent before:content-['·']",R="relative block pl-[2em]",k="absolute left-0 w-[1.6em] text-right tabular-nums";function w(e){return e.bullet||e.number!=null}const O="text-accent underline underline-offset-[0.18em]";function A(e,n){const[s,...r]=n;return s?.kind==="text"?[{kind:"text",text:`${e}${s.text}`},...r]:[{kind:"text",text:e},...n]}function B(e){if(e)return N(e)===e.toLowerCase()?e:Object.hasOwn(p,e)?p[e]:void 0}function u(e,n){const s=[];let r=!1;return e.forEach((c,i)=>{if(c.kind==="text"){s.push(t("span",{children:d(c.text)},i)),r=!0;return}r||s.push(t("span",{},`e${i}`)),s.push(b(c,i,n)),r=!1}),r||s.push(t("span",{},"end")),s}function m(e,n){return e.length===1&&e[0].kind==="text"?d(e[0].text):e.map((s,r)=>s.kind==="text"?t(h,{children:d(s.text)},r):b(s,r,n))}function D(e,n=!1){return u(e,x(n))}function x(e){return e?"font-normal italic text-accent":"not-italic text-accent"}function P(e){return t(f,{value:e,children:t("span",{children:e})})}function b(e,n,s){if(e.kind==="link")return t("a",{href:e.href,className:O,children:m(e.children,s)},n);const r=m(e.children,s),c=E[e.kind];if(c)return t("span",{[g]:c,children:r},n);switch(e.kind){case"underline":return t("u",{children:r},n);case"sup":return t("sup",{children:r},n);case"sub":return t("sub",{children:r},n);case"color":{const i=B(e.color);return i?t("span",{style:{color:i},children:r},n):t("span",{children:r},n)}case"accent":case"highlight":return t("em",{className:s,children:r},n);case"bold":return t("strong",{className:"font-semibold",children:r},n);case"italic":return t("em",{className:"italic",children:r},n);case"strike":return t("s",{className:"line-through",children:r},n);default:return t("span",{children:r},n)}}function Y(e,n=!0){const s=e.split(`
2
- `);return t(f,{value:e,children:s.map((r,c)=>a("span",{children:[T(r,n),c<s.length-1?t("br",{}):null]},c))})}function H(e){return e.split(/\n\s*\n/).map(n=>n.trim()).filter(Boolean)}export{P as renderChrome,T as renderGold,Y as renderHeadline,D as renderMarkupNodes,H as splitParagraphs};
1
+ import{jsxs as a,jsx as t}from"react/jsx-runtime";import{Fragment as h}from"react";import{linePrefix as N,storefrontLines as L}from"../../format/lib/markup.js";import{WORD_STYLE_ATTR as _,WORD_STYLE_BY_KIND as S}from"../../format/lib/word-styles.js";import{partInkCss as g}from"../../format/lib/document/part-inks.js";import f from"./PartStyledText.js";import{withRMark as d}from"./RMark.js";function E(e,n=!1,s){const r=m(n),c=L(e);if(c.length===1){const[i]=c,o=N(i),b=o?C(o,i.children):i.children;return a(f,{value:e,children:[s,u(b,r)]})}const l=[];return c.forEach((i,o)=>{if(i.bullet){l.push(t("span",{"data-sf-bullet":"",className:k,children:u(i.children,r)},o));return}if(i.number!=null){l.push(a("span",{"data-sf-number":i.number,className:T,children:[a("span",{className:R,children:[i.number,"."]}),u(i.children,r)]},o));return}o>0&&!A(c[o-1])&&l.push(t("br",{},`br${o}`)),l.push(t(h,{children:u(i.children,r)},o))}),a(f,{value:e,children:[s,l]})}const k="relative block pl-6 before:absolute before:left-1.5 before:font-bold before:text-accent before:content-['·']",T="relative block pl-[2em]",R="absolute left-0 w-[1.6em] text-right tabular-nums";function A(e){return e.bullet||e.number!=null}const B="text-accent underline underline-offset-[0.18em]";function C(e,n){const[s,...r]=n;return s?.kind==="text"?[{kind:"text",text:`${e}${s.text}`},...r]:[{kind:"text",text:e},...n]}function I(e){return g(e)||void 0}function u(e,n){const s=[];let r=!1;return e.forEach((c,l)=>{if(c.kind==="text"){s.push(t("span",{children:d(c.text)},l)),r=!0;return}r||s.push(t("span",{},`e${l}`)),s.push(x(c,l,n)),r=!1}),r||s.push(t("span",{},"end")),s}function p(e,n){return e.length===1&&e[0].kind==="text"?d(e[0].text):e.map((s,r)=>s.kind==="text"?t(h,{children:d(s.text)},r):x(s,r,n))}function P(e,n=!1){return u(e,m(n))}function m(e){return e?"font-normal italic text-accent":"not-italic text-accent"}function U(e){return t(f,{value:e,children:t("span",{children:e})})}function x(e,n,s){if(e.kind==="link")return t("a",{href:e.href,className:B,children:p(e.children,s)},n);const r=p(e.children,s),c=S[e.kind];if(c)return t("span",{[_]:c,children:r},n);switch(e.kind){case"underline":return t("u",{children:r},n);case"sup":return t("sup",{children:r},n);case"sub":return t("sub",{children:r},n);case"color":{const l=I(e.color);return l?t("span",{style:{color:l},children:r},n):t("span",{children:r},n)}case"accent":case"highlight":return t("em",{className:s,children:r},n);case"bold":return t("strong",{className:"font-semibold",children:r},n);case"italic":return t("em",{className:"italic",children:r},n);case"strike":return t("s",{className:"line-through",children:r},n);default:return t("span",{children:r},n)}}function Y(e,n=!0){const s=e.split(`
2
+ `);return t(f,{value:e,children:s.map((r,c)=>a("span",{children:[E(r,n),c<s.length-1?t("br",{}):null]},c))})}function v(e){return e.split(/\n\s*\n/).map(n=>n.trim()).filter(Boolean)}export{U as renderChrome,E as renderGold,Y as renderHeadline,P as renderMarkupNodes,v as splitParagraphs};
@@ -1,5 +1,7 @@
1
1
  import { type BlockSizeKey } from "efficient-easel/draw";
2
2
  export declare const BLOCK_SIZE_CLASS = "sf-block-size";
3
+ export declare const BLOCK_SHOW_KEY = "show";
4
+ export declare const blockPhoneHideClass: (props: Readonly<Record<string, unknown>>) => string;
3
5
  export declare const TEXT_FIT_ATTR: {
4
6
  readonly fit: "data-fit";
5
7
  readonly fitPhone: "data-fit-phone";
@@ -8,6 +10,7 @@ export declare const TEXT_FIT_ATTR: {
8
10
  };
9
11
  export type BlockSizeTwin = {
10
12
  desktop?: unknown;
13
+ tablet?: unknown;
11
14
  phone?: unknown;
12
15
  };
13
16
  export type BlockSizeValues = Partial<Record<BlockSizeKey, BlockSizeTwin>>;
@@ -1 +1 @@
1
- import{BLOCK_FIXED_WIDTH as W,BLOCK_SIZE_KEYS as I,parseBlockWidthFit as m,phoneKey as T,parseTextFit as b}from"efficient-easel/draw";const L="sf-block-size",p={fit:"data-fit",fitPhone:"data-fit-phone",min:"data-fit-min",minPhone:"data-fit-min-phone"},s=e=>typeof e=="number"&&Number.isFinite(e)&&e>=0?e:void 0,g={desktop:{fill:"view-wide:w-full view-wide:[.flex-row>&]:grow",fixed:"view-wide:w-[min(var(--sf-bw),100%)] view-wide:basis-auto! view-wide:grow-0! view-wide:shrink-0"},phone:{fill:"max-view-wide:w-full",fixed:"max-view-wide:w-[min(var(--sf-bw-p),100%)] max-view-wide:basis-auto! max-view-wide:grow-0! max-view-wide:shrink-0"}},E={desktop:"--sf-bw",phone:"--sf-bw-p"},O={minWidth:{desktop:["--sf-bmin","view-wide:min-w-[var(--sf-bmin)]!"],phone:["--sf-bmin-p","max-view-wide:min-w-[var(--sf-bmin-p)]!"]},maxWidth:{desktop:["--sf-bmax","view-wide:max-w-[var(--sf-bmax)]"],phone:["--sf-bmax-p","max-view-wide:max-w-[var(--sf-bmax-p)]"]}},u={desktop:"view-wide:whitespace-nowrap view-wide:[&_*]:whitespace-nowrap!",phone:"max-view-wide:whitespace-nowrap max-view-wide:[&_*]:whitespace-nowrap!"};function C(e){const i=[],n={},t={},f=m(e.widthFit?.desktop),l=m(e.widthFit?.phone)??f,r=s(e.width?.desktop),v=s(e.width?.phone)??r;for(const[d,o,c]of[["desktop",f,r],["phone",l,v]])!o||o==="fit"||(i.push(g[d][o]),o==="fixed"&&(n[E[d]]=`${c??W.fallback}px`));for(const d of["minWidth","maxWidth"]){const o=s(e[d]?.desktop),c=s(e[d]?.phone)??o;for(const[S,k]of[["desktop",o],["phone",c]]){if(k===void 0)continue;const[_,F]=O[d][S];n[_]=`${k}px`,i.push(F)}}const w=b(e.textFit?.desktop),h=b(e.textFit?.phone),a=s(e.minFont?.desktop),x=s(e.minFont?.phone);return w==="line"&&i.push(u.desktop),(h??w)==="line"&&i.push(u.phone),w&&(t[p.fit]=w),h&&(t[p.fitPhone]=h),a!==void 0&&(t[p.min]=String(a)),x!==void 0&&(t[p.minPhone]=String(x)),i.length===0&&Object.keys(t).length===0?null:{className:[L,...i].join(" "),style:n,attrs:t}}function P(e){if(s(e.maxWidth?.desktop)!==void 0)return!0;const i=m(e.widthFit?.desktop);return i==="fill"||i==="fixed"}function A(e){const i={};for(const n of I){const t=e[n],f=e[T(n)];(t!==void 0||f!==void 0)&&(i[n]={desktop:t,phone:f})}return i}export{L as BLOCK_SIZE_CLASS,p as TEXT_FIT_ATTR,P as blockSetsItsWidth,C as blockSizeOf,A as blockSizeValuesOf};
1
+ import{BLOCK_FIXED_WIDTH as T,BLOCK_SIZE_KEYS as F,parseBlockWidthFit as x,phoneKey as v,parseTextFit as k,tabletKey as g}from"efficient-easel/draw";import{partDisplayClass as L}from"../../../format/lib/content/part-display.js";const C="sf-block-size",E="show",N=e=>L(void 0,{block:e[v(E)]!==!1},"block"),r={fit:"data-fit",fitPhone:"data-fit-phone",min:"data-fit-min",minPhone:"data-fit-min-phone"},d=e=>typeof e=="number"&&Number.isFinite(e)&&e>=0?e:void 0,K={desktop:{fill:"view-wide:w-full view-wide:[.flex-row>&]:grow",fixed:"view-wide:w-[min(var(--sf-bw),100%)] view-wide:basis-auto! view-wide:grow-0! view-wide:shrink-0"},phone:{fill:"max-view-wide:w-full",fixed:"max-view-wide:w-[min(var(--sf-bw-p),100%)] max-view-wide:basis-auto! max-view-wide:grow-0! max-view-wide:shrink-0"}},O={desktop:{fill:"view-desktop:w-full view-desktop:[.flex-row>&]:grow",fixed:"view-desktop:w-[min(var(--sf-bw),100%)] view-desktop:basis-auto! view-desktop:grow-0! view-desktop:shrink-0"},tablet:{fill:"view-tablet:max-view-desktop:w-full view-wide:max-view-desktop:[.flex-row>&]:grow",fixed:"view-tablet:max-view-desktop:w-[min(var(--sf-bw-t),100%)] view-tablet:max-view-desktop:basis-auto! view-tablet:max-view-desktop:grow-0! view-tablet:max-view-desktop:shrink-0"},phone:{fill:"max-view-tablet:w-full",fixed:"max-view-tablet:w-[min(var(--sf-bw-p),100%)] max-view-tablet:basis-auto! max-view-tablet:grow-0! max-view-tablet:shrink-0"}},y={desktop:"--sf-bw",tablet:"--sf-bw-t",phone:"--sf-bw-p"},A={minWidth:{desktop:["--sf-bmin","view-wide:min-w-[var(--sf-bmin)]!"],phone:["--sf-bmin-p","max-view-wide:min-w-[var(--sf-bmin-p)]!"]},maxWidth:{desktop:["--sf-bmax","view-wide:max-w-[var(--sf-bmax)]"],phone:["--sf-bmax-p","max-view-wide:max-w-[var(--sf-bmax-p)]"]}},D={minWidth:{desktop:["--sf-bmin","view-desktop:min-w-[var(--sf-bmin)]!"],tablet:["--sf-bmin-t","view-tablet:max-view-desktop:min-w-[var(--sf-bmin-t)]!"],phone:["--sf-bmin-p","max-view-tablet:min-w-[var(--sf-bmin-p)]!"]},maxWidth:{desktop:["--sf-bmax","view-desktop:max-w-[var(--sf-bmax)]"],tablet:["--sf-bmax-t","view-tablet:max-view-desktop:max-w-[var(--sf-bmax-t)]"],phone:["--sf-bmax-p","max-view-tablet:max-w-[var(--sf-bmax-p)]"]}},H=["widthFit","width","minWidth","maxWidth"],u={desktop:"view-wide:whitespace-nowrap view-wide:[&_*]:whitespace-nowrap!",phone:"max-view-wide:whitespace-nowrap max-view-wide:[&_*]:whitespace-nowrap!"};function z(e){const n=[],s={},o={},w=H.some(t=>{const i=e[t]?.tablet;return t==="widthFit"?x(i)!==void 0:d(i)!==void 0}),f=w?["desktop","tablet","phone"]:["desktop","phone"],b=(t,i)=>{const a=t(i?.desktop),m=w?t(i?.tablet)??a:a;return{desktop:a,tablet:m,phone:t(i?.phone)??m}},_=b(x,e.widthFit),S=b(d,e.width);for(const t of f){const i=_[t];!i||i==="fit"||(n.push(w?O[t][i]:K[t][i]),i==="fixed"&&(s[y[t]]=`${S[t]??T.fallback}px`))}for(const t of["minWidth","maxWidth"]){const i=b(d,e[t]);for(const a of f){const m=i[a];if(m===void 0)continue;const[W,I]=w?D[t][a]:A[t][a];s[W]=`${m}px`,n.push(I)}}const p=k(e.textFit?.desktop),l=k(e.textFit?.phone),c=d(e.minFont?.desktop),h=d(e.minFont?.phone);return p==="line"&&n.push(u.desktop),(l??p)==="line"&&n.push(u.phone),p&&(o[r.fit]=p),l&&(o[r.fitPhone]=l),c!==void 0&&(o[r.min]=String(c)),h!==void 0&&(o[r.minPhone]=String(h)),n.length===0&&Object.keys(o).length===0?null:{className:[C,...n].join(" "),style:s,attrs:o}}function Y(e){if(d(e.maxWidth?.desktop)!==void 0)return!0;const n=x(e.widthFit?.desktop);return n==="fill"||n==="fixed"}function j(e){const n={};for(const s of F){const o=e[s],w=e[g(s)],f=e[v(s)];(o!==void 0||w!==void 0||f!==void 0)&&(n[s]={desktop:o,tablet:w,phone:f})}return n}export{E as BLOCK_SHOW_KEY,C as BLOCK_SIZE_CLASS,r as TEXT_FIT_ATTR,N as blockPhoneHideClass,Y as blockSetsItsWidth,z as blockSizeOf,j as blockSizeValuesOf};
@@ -1 +1 @@
1
- import{REPEAT_ATTRIBUTE as l,phoneKey as f,tabletKey as b}from"efficient-easel/draw";import{parseLoop as C}from"../../../format/lib/animation/loop.js";import{finiteNumber as S}from"../../../format/lib/finite-number.js";import{isBackgroundBox as _}from"../../../format/lib/content/box-background.js";import{isStripBox as g}from"../../../format/lib/content/box-separator.js";import{BOX_ALIGN_CLASS as r,boxRowColumnsClass as x,boxRowTabletColumnsClass as E}from"../../../format/lib/content/box-layout.js";const i="sharedColumns",c="shared",$="own",u="scroll",U="Row columns",M=[{value:$,label:"Each row"},{value:c,label:"Shared"}],B=[{value:$,label:"Each row"},{value:u,label:"Shared, scroll"}],O="(width >= 800px)",N="(width < 800px)";function A(t){const o={direction:t.direction,separator:t.separator,loop:C(t.loop),line:t.line};return o.direction==="row"&&!g(o.direction,o.separator)&&o.loop!=="scroll"&&o.line!==!0&&!_(typeof t.bgImage=="string"?t.bgImage:void 0)&&x({...o,columns:t.columns})===""&&E({...o,columnsTablet:t[b("columns")]})===""}function R(t){return Array.isArray(t)?t.filter(o=>typeof o?.type=="string").length:S(t?.blockCount)??0}function K(t){return A(t)&&a(R(t.content))>0?y(t[i],t[f(i)]):{desktop:!1,phone:!1}}const a=t=>Number.isInteger(t)&&t>0?t:0,d=t=>`sf-shared-cols-${t}`,m=t=>`sf-shared-cols-phone-${t}`;function y(t,o){return{desktop:t===c,phone:o===u}}function F(t,o){const n=a(o);return n?`${t.desktop?` ${d(n)}`:""}${t.phone?` ${m(n)}`:""}`:""}function p(t){const o=`[${l}]`;return`:has(> ${o} ${t}):not(:has(> ${o} ${o} ${t}))`}function h(t,o,n=""){const e=p(t);return`${e}{display:grid;grid-template-columns:${o};column-gap:0${n}}${e}>:not(:has(${t})):not(${t}){grid-column:1/-1}${e} :has(${t}),${e} ${t}{display:grid;grid-template-columns:subgrid;grid-column:1/-1;min-width:0}`}const L="data-sf-shared-plain";function H(t){const o=`[${l}]`,n=`[${L}]`,e=p(t)+`:not(:has(> :not(${o}) > :not(${n}) ${t})):not(:has(> ${o} > * > :not(${n}) ${t})):not(:has(:not(${n}) > :not(${n}) > ${t}))`,s=`${e}>:not(style):not(:has(${t})):not(${t})`;return`${e}{display:table;width:100%;border-collapse:collapse}${e}>:has(${t}),${e}>${o}>:has(${t}),${e} ${n}:has(${t}),${e} ${n}>:has(${t}){display:contents}${e} ${t}{display:table-row}${e} ${t}>*{display:table-cell;width:auto;vertical-align:top}${e} ${t}.${r.center}>*{vertical-align:middle}${e} ${t}.${r.end}>*{vertical-align:bottom}${s}{display:table-caption;caption-side:bottom}${s}:has(~ ${o}){caption-side:top}`}function w(t,o){const n=a(o);if(!n)return"";let e="";if(t.desktop){const s=`.${d(n)}`;e+=`@media ${O}{${h(s,`repeat(${n},auto)`)}${H(s)}}`}return t.phone&&(e+=`@media ${N}{${h(`.${m(n)}`,`repeat(${n},minmax(max-content,auto))`,";overflow-x:auto")}}`),e}export{i as SHARED_COLUMNS_KEY,U as SHARED_COLUMNS_LABEL,$ as SHARED_COLUMNS_OFF,B as SHARED_COLUMNS_PHONE_POINTS,M as SHARED_COLUMNS_POINTS,L as SHARED_PLAIN_ATTR,F as sharedColumnsClasses,w as sharedColumnsCss,K as sharedColumnsDrawn,A as sharedColumnsFits};
1
+ import{REPEAT_ATTRIBUTE as l,phoneKey as f,tabletKey as b}from"efficient-easel/draw";import{parseLoop as C}from"../../../format/lib/animation/loop.js";import{finiteNumber as S}from"../../../format/lib/finite-number.js";import{isBackgroundBox as _}from"../../../format/lib/content/box-background.js";import{isStripBox as g}from"../../../format/lib/content/box-separator.js";import{CARD_STATE_ATTR as A}from"../../../format/lib/content/card-state.js";import{BOX_ALIGN_CLASS as r,boxRowColumnsClass as E,boxRowTabletColumnsClass as x}from"../../../format/lib/content/box-layout.js";const i="sharedColumns",$="shared",c="own",u="scroll",B="Row columns",K=[{value:c,label:"Each row"},{value:$,label:"Shared"}],F=[{value:c,label:"Each row"},{value:u,label:"Shared, scroll"}],O="(width >= 800px)",R="(width < 800px)";function N(t){const o={direction:t.direction,separator:t.separator,loop:C(t.loop),line:t.line};return o.direction==="row"&&!g(o.direction,o.separator)&&o.loop!=="scroll"&&o.line!==!0&&!_(typeof t.bgImage=="string"?t.bgImage:void 0)&&E({...o,columns:t.columns})===""&&x({...o,columnsTablet:t[b("columns")]})===""}function y(t){return Array.isArray(t)?t.filter(o=>typeof o?.type=="string").length:S(t?.blockCount)??0}function w(t){return N(t)&&a(y(t.content))>0?T(t[i],t[f(i)]):{desktop:!1,phone:!1}}const a=t=>Number.isInteger(t)&&t>0?t:0,d=t=>`sf-shared-cols-${t}`,m=t=>`sf-shared-cols-phone-${t}`;function T(t,o){return{desktop:t===$,phone:o===u}}function G(t,o){const n=a(o);return n?`${t.desktop?` ${d(n)}`:""}${t.phone?` ${m(n)}`:""}`:""}function p(t){const o=`[${l}]`;return`:has(> ${o} ${t}):not(:has(> ${o} ${o} ${t}))`}function h(t,o,n=""){const e=p(t);return`${e}{display:grid;grid-template-columns:${o};column-gap:0${n}}${e}>:not(:has(${t})):not(${t}){grid-column:1/-1}${e} :has(${t}),${e} ${t}{display:grid;grid-template-columns:subgrid;grid-column:1/-1;min-width:0}`}const L="data-sf-shared-plain";function D(t){const o=`[${l}]`,n=`[${L}]`,e=p(t)+`:not(:has(> :not(${o}) > :not(${n}) ${t})):not(:has(> ${o} > * > :not(${n}) ${t})):not(:has(:not(${n}) > :not(${n}) > ${t})):not(:has(> ${o}[${A}]))`,s=`${e}>:not(style):not(:has(${t})):not(${t})`;return`${e}{display:table;width:100%;border-collapse:collapse}${e}>:has(${t}),${e}>${o}>:has(${t}),${e} ${n}:has(${t}),${e} ${n}>:has(${t}){display:contents}${e} ${t}{display:table-row}${e} ${t}>*{display:table-cell;width:auto;vertical-align:top}${e} ${t}.${r.center}>*{vertical-align:middle}${e} ${t}.${r.end}>*{vertical-align:bottom}${s}{display:table-caption;caption-side:bottom}${s}:has(~ ${o}){caption-side:top}`}function X(t,o){const n=a(o);if(!n)return"";let e="";if(t.desktop){const s=`.${d(n)}`;e+=`@media ${O}{${h(s,`repeat(${n},auto)`)}${D(s)}}`}return t.phone&&(e+=`@media ${R}{${h(`.${m(n)}`,`repeat(${n},minmax(max-content,auto))`,";overflow-x:auto")}}`),e}export{i as SHARED_COLUMNS_KEY,B as SHARED_COLUMNS_LABEL,c as SHARED_COLUMNS_OFF,F as SHARED_COLUMNS_PHONE_POINTS,K as SHARED_COLUMNS_POINTS,L as SHARED_PLAIN_ATTR,G as sharedColumnsClasses,X as sharedColumnsCss,w as sharedColumnsDrawn,N as sharedColumnsFits};
@@ -0,0 +1,14 @@
1
+ import { type ReactNode } from "react";
2
+ export interface SelectedRanges {
3
+ selected: readonly string[];
4
+ known: readonly string[];
5
+ }
6
+ export declare const SelectedRangesProvider: import("react").Provider<SelectedRanges | null>;
7
+ export declare const useSelectedRanges: () => readonly string[] | null;
8
+ export declare function boxDrawsForRange(name: string | undefined, selected: readonly string[] | null, known: readonly string[]): boolean;
9
+ export declare const useInHiddenBox: () => boolean;
10
+ export declare function ShowForGate({ name, editing, children }: {
11
+ name: string | undefined;
12
+ editing: boolean;
13
+ children?: ReactNode;
14
+ }): ReactNode;
@@ -0,0 +1 @@
1
+ "use client";import{createContext as s,createElement as l,useContext as r}from"react";const o=s(null),i=s(!1),x=o.Provider,a=()=>r(o)?.selected??null;function d(e,t,n){return e===void 0||e===""||t===null||t.length===0||!n.includes(e)?!0:t.includes(e)}const f=()=>r(i);function p({name:e,editing:t,children:n}){const u=r(o);return t||d(e,u?.selected??null,u?.known??[])?n:l("div",{hidden:!0,style:{display:"none"}},l(i.Provider,{value:!0},n))}export{x as SelectedRangesProvider,p as ShowForGate,d as boxDrawsForRange,f as useInHiddenBox,a as useSelectedRanges};
@@ -1,4 +1,5 @@
1
1
  import type { ContentsEntry } from "../../components/ContentsList.js";
2
+ export declare const CONTENTS_NUMBER_FORM_KEY = "numberForm";
2
3
  export declare const CONTENTS_ENTRIES_PROP = "_contentsEntries";
3
4
  export declare const KICKER_NUMBER_PROP = "_kickerNumber";
4
5
  export declare const KICKER_NUMBER_ATTR = "data-sf-kicker-number";
@@ -1 +1 @@
1
- import{readHidable as h}from"efficient-easel/draw";import{isNodeList as x}from"efficient-easel/data";import{anchorSlug as R}from"../../../format/lib/content/anchor-name.js";import{namedRowField as w}from"../../../format/lib/content/card-template.js";import{linkedCount as y}from"../../../format/lib/content/count-numbers.js";import{listNumber as P}from"../../../format/lib/content/list-number.js";import{stripMarkup as I}from"../../../format/lib/markup.js";const g="Contents",M="Flex",E="Text",S="_contentsEntries",K="_kickerNumber",$="data-sf-kicker-number",v=t=>h(t).text.trim(),T=t=>R(t?.anchor),d=t=>String(t.props?.id??""),B=t=>!h(t.props?.text).hidden&&!y(t.props)&&!w(t.props);function m(t){return Object.values(t.props??{}).filter(x)}function _(t){for(const n of m(t))for(const e of n){if(e.props?._hidden)continue;if(e.type===E&&B(e))return e;if(e.type===E)continue;const s=_(e);if(s)return s}}function b(t){return m(t).some(n=>n.some(e=>e&&!e.props?._hidden&&(e.type===g||b(e))))}function L(t){const n=[],e=s=>{for(const o of s)if(!(!o||o.props?._hidden)){if(o.type===g){n.push({contents:o,sections:[]});continue}if(o.type===M&&T(o.props)&&n.length&&!b(o)){n[n.length-1].sections.push({box:o,kicker:_(o)});continue}for(const i of m(o))e(i)}};return e(t),n}function j(t){return t.map(n=>({label:n.kicker?I(v(n.kicker.props?.text)):"",anchor:T(n.box.props)}))}function F(t){const n=t?.length?L(t):[];if(!n.length)return null;const e=new Map,s=new Map;for(const o of n){const i=d(o.contents);i&&e.set(i,j(o.sections)),o.sections.forEach((c,r)=>{const p=c.kicker?d(c.kicker):"";p&&s.set(p,P(r))})}return{entries:e,numbers:s}}const q=t=>`${t} · `;function z(t){const n=t;if(!n?.content?.length)return t;const e=F(n.content);if(!e)return t;const{entries:s,numbers:o}=e,i=c=>{let r=c.props??{},p=!1;for(const[O,u]of Object.entries(r)){if(!x(u))continue;const k=u.map(i);k.some((C,N)=>C!==u[N])&&(r={...r,[O]:k},p=!0)}const f=d(c),l=f?s.get(f):void 0;l&&(r={...r,[S]:l},p=!0);const a=f?o.get(f):void 0;return a&&(r={...r,[K]:a},p=!0),p?{...c,props:r}:c};return{...n,content:n.content.map(i)}}export{S as CONTENTS_ENTRIES_PROP,$ as KICKER_NUMBER_ATTR,K as KICKER_NUMBER_PROP,q as kickerLead,F as pageContentsDrawing,z as withPageContents};
1
+ import{readHidable as x}from"efficient-easel/draw";import{isNodeList as h}from"efficient-easel/data";import{anchorSlug as M}from"../../../format/lib/content/anchor-name.js";import{namedRowField as I}from"../../../format/lib/content/card-template.js";import{linkedCount as P}from"../../../format/lib/content/count-numbers.js";import{resolveContainerDirection as S}from"../../../format/lib/content/container-direction.js";import{listNumberIn as B,readListNumberForm as F}from"../../../format/lib/content/list-number.js";import{stripMarkup as K}from"../../../format/lib/markup.js";const a="Contents",l="Flex",E="Text",v="numberForm",L="_contentsEntries",U="_kickerNumber",V="data-sf-kicker-number",j=n=>x(n).text.trim(),_=n=>M(n?.anchor),d=n=>String(n.props?.id??""),D=n=>!x(n.props?.text).hidden&&!P(n.props)&&!I(n.props);function u(n){return Object.values(n.props??{}).filter(h)}function R(n){for(const o of u(n))for(const t of o){if(t.props?._hidden)continue;if(t.type===E&&D(t))return t;if(t.type===E)continue;const s=R(t);if(s)return s}}function T(n){return u(n).some(o=>o.some(t=>t&&!t.props?._hidden&&(t.type===a||T(t))))}const N=n=>n.type===l&&S(l,n.props?.direction)==="row";function C(n){return u(n).some(o=>o.some(t=>t&&!t.props?._hidden&&(t.type===a||!N(t)&&C(t))))}function W(n){const o=[],t=(s,r)=>{for(const e of s){if(!e||e.props?._hidden)continue;if(e.type===a){r.open={contents:e,sections:r.waiting??[]},r.waiting=null,o.push(r.open);continue}if(N(e)&&C(e)){const i={inRow:!0,open:null,waiting:[]};for(const p of u(e))t(p,i);r.inRow||(r.open=null);continue}const c=r.open?.sections??r.waiting;if(e.type===l&&_(e.props)&&c&&!T(e)){c.push({box:e,kicker:R(e)});continue}for(const i of u(e))t(i,r)}};return t(n,{inRow:!1,open:null,waiting:null}),o}function X(n){return n.map(o=>({label:o.kicker?K(j(o.kicker.props?.text)):"",anchor:_(o.box.props)}))}function Y(n){const o=n?.length?W(n):[];if(!o.length)return null;const t=new Map,s=new Map;for(const r of o){const e=d(r.contents);e&&t.set(e,X(r.sections));const c=F(r.contents.props?.[v]);r.sections.forEach((i,p)=>{const f=i.kicker?d(i.kicker):"";f&&s.set(f,B(c,p))})}return{entries:t,numbers:s}}const Z=n=>n.endsWith(".")?`${n} `:`${n} · `;function nn(n){const o=n;if(!o?.content?.length)return n;const t=Y(o.content);if(!t)return n;const{entries:s,numbers:r}=t,e=c=>{let i=c.props??{},p=!1;for(const[O,m]of Object.entries(i)){if(!h(m))continue;const g=m.map(e);g.some((b,y)=>b!==m[y])&&(i={...i,[O]:g},p=!0)}const f=d(c),k=f?s.get(f):void 0;k&&(i={...i,[L]:k},p=!0);const w=f?r.get(f):void 0;return w&&(i={...i,[U]:w},p=!0),p?{...c,props:i}:c};return{...o,content:o.content.map(e)}}export{L as CONTENTS_ENTRIES_PROP,v as CONTENTS_NUMBER_FORM_KEY,V as KICKER_NUMBER_ATTR,U as KICKER_NUMBER_PROP,Z as kickerLead,Y as pageContentsDrawing,nn as withPageContents};