efficient-web-builder 47.2.0 → 48.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/dist/editor/components/HeroPartPanel.js +1 -1
  3. package/dist/editor/components/HoverEffectField.d.ts +1 -0
  4. package/dist/editor/components/HoverEffectField.js +1 -1
  5. package/dist/editor/components/MediaUploadField.d.ts +9 -0
  6. package/dist/editor/components/MediaUploadField.js +1 -1
  7. package/dist/editor/components/PartSettingsPanel.d.ts +2 -1
  8. package/dist/editor/components/PartSettingsPanel.js +1 -1
  9. package/dist/editor/components/PreviewPartAnchors.d.ts +3 -1
  10. package/dist/editor/components/PreviewPartAnchors.js +1 -1
  11. package/dist/editor/components/SameInEveryViewNote.d.ts +1 -0
  12. package/dist/editor/components/SameInEveryViewNote.js +1 -0
  13. package/dist/editor/components/SaveAsTemplateButton.d.ts +5 -0
  14. package/dist/editor/components/SaveAsTemplateButton.js +1 -0
  15. package/dist/editor/components/SectionIcon.js +1 -1
  16. package/dist/editor/components/SiteFields.d.ts +4 -1
  17. package/dist/editor/components/SiteFields.js +1 -1
  18. package/dist/editor/components/SiteRestoreNotice.js +1 -1
  19. package/dist/editor/components/SiteTextStylesField.js +1 -1
  20. package/dist/editor/components/TickerSettingsPanel.js +1 -1
  21. package/dist/editor/components/VersionHistoryDrawer.js +1 -1
  22. package/dist/editor/components/WebsitePreviewButton.d.ts +2 -1
  23. package/dist/editor/components/WebsitePreviewButton.js +1 -1
  24. package/dist/editor/components/WebsiteScreenParts.js +1 -1
  25. package/dist/editor/components/usePartMotion.d.ts +10 -0
  26. package/dist/editor/components/usePartMotion.js +1 -0
  27. package/dist/editor/components/useSocialSettings.d.ts +2 -2
  28. package/dist/editor/lib/animation/AnimationDurationRow.js +1 -1
  29. package/dist/editor/lib/animation/fields.d.ts +1 -1
  30. package/dist/editor/lib/animation/fields.js +1 -1
  31. package/dist/editor/lib/animation/hover-fields.d.ts +1 -0
  32. package/dist/editor/lib/animation/hover-fields.js +1 -0
  33. package/dist/editor/lib/document/add-target.d.ts +2 -1
  34. package/dist/editor/lib/document/add-target.js +1 -1
  35. package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
  36. package/dist/editor/lib/document/blocks/general/Contents/fields.d.ts +2 -0
  37. package/dist/editor/lib/document/blocks/general/Contents/fields.js +1 -0
  38. package/dist/editor/lib/document/blocks/general/Divider/fields.js +1 -1
  39. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  40. package/dist/editor/lib/document/blocks/general/HeroGroup/fields.js +1 -1
  41. package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
  42. package/dist/editor/lib/document/blocks/general/index.js +1 -1
  43. package/dist/editor/lib/document/build-config.js +1 -1
  44. package/dist/editor/lib/document/canvas-typing.d.ts +1 -0
  45. package/dist/editor/lib/document/canvas-typing.js +1 -1
  46. package/dist/editor/lib/document/card-display-chips.js +1 -1
  47. package/dist/editor/lib/document/controls.d.ts +7 -3
  48. package/dist/editor/lib/document/controls.js +1 -1
  49. package/dist/editor/lib/document/field-groups.js +1 -1
  50. package/dist/editor/lib/document/geocode-resolve.d.ts +1 -0
  51. package/dist/editor/lib/document/geocode-resolve.js +1 -1
  52. package/dist/editor/lib/document/overrides.js +1 -1
  53. package/dist/editor/lib/document/page-root.js +2 -2
  54. package/dist/editor/lib/document/part-motion-canvas.d.ts +9 -0
  55. package/dist/editor/lib/document/part-motion-canvas.js +1 -0
  56. package/dist/format/lib/animation/hover.d.ts +5 -0
  57. package/dist/format/lib/animation/hover.js +1 -0
  58. package/dist/format/lib/content/anchor-name.d.ts +2 -0
  59. package/dist/format/lib/content/anchor-name.js +1 -0
  60. package/dist/format/lib/content/box-layout.d.ts +8 -0
  61. package/dist/format/lib/content/box-layout.js +1 -1
  62. package/dist/format/lib/content/box-link.js +1 -1
  63. package/dist/format/lib/content/box-separator.js +1 -1
  64. package/dist/format/lib/content/card-template.d.ts +8 -0
  65. package/dist/format/lib/content/card-template.js +1 -1
  66. package/dist/format/lib/content/container-gap.d.ts +2 -1
  67. package/dist/format/lib/content/container-gap.js +1 -1
  68. package/dist/format/lib/content/list-number.d.ts +1 -0
  69. package/dist/format/lib/content/list-number.js +1 -0
  70. package/dist/format/lib/content/section-min-height.d.ts +3 -2
  71. package/dist/format/lib/content/section-min-height.js +1 -1
  72. package/dist/format/lib/content/section-sticky.js +1 -1
  73. package/dist/format/lib/content/sticky-aside.d.ts +2 -0
  74. package/dist/format/lib/content/sticky-aside.js +1 -0
  75. package/dist/format/lib/document/blocks/general/Contents/meta.d.ts +5 -0
  76. package/dist/format/lib/document/blocks/general/Contents/meta.js +1 -0
  77. package/dist/format/lib/document/blocks/general/metas.d.ts +1 -0
  78. package/dist/format/lib/document/blocks/general/metas.js +1 -1
  79. package/dist/format/lib/document/blocks/general/text-part-shapes.json +10 -0
  80. package/dist/format/lib/document/container-blocks.js +1 -1
  81. package/dist/format/lib/document/easel-row-words.d.ts +1 -0
  82. package/dist/format/lib/document/easel-row-words.js +1 -1
  83. package/dist/format/lib/document/general-order.d.ts +1 -1
  84. package/dist/format/lib/document/general-order.js +1 -1
  85. package/dist/format/lib/document/panel-tabs.d.ts +8 -0
  86. package/dist/format/lib/document/panel-tabs.js +1 -0
  87. package/dist/format/lib/document/part-records.d.ts +6 -0
  88. package/dist/format/lib/document/part-records.js +1 -0
  89. package/dist/format/lib/document/passes/registry-context.d.ts +1 -1
  90. package/dist/format/lib/document/passes/registry-context.js +1 -1
  91. package/dist/format/lib/document/passes/types.d.ts +2 -0
  92. package/dist/format/lib/document/section-groups.d.ts +1 -1
  93. package/dist/format/lib/editor-words-catalogue.d.ts +6 -0
  94. package/dist/format/lib/editor-words-catalogue.js +3 -3
  95. package/dist/format/lib/hero-ticker.d.ts +1 -0
  96. package/dist/format/lib/hero-ticker.js +1 -1
  97. package/dist/format/lib/links/page-link-rules.js +1 -1
  98. package/dist/format/lib/sections/contents-text-regions.d.ts +3 -0
  99. package/dist/format/lib/sections/contents-text-regions.js +1 -0
  100. package/dist/format/lib/sections/section-text-regions.js +1 -1
  101. package/dist/format/lib/sections/strip-shape.js +1 -1
  102. package/dist/render/components/CardRowContext.d.ts +3 -1
  103. package/dist/render/components/CardRowContext.js +1 -1
  104. package/dist/render/components/ContentsList.d.ts +14 -0
  105. package/dist/render/components/ContentsList.js +1 -0
  106. package/dist/render/components/DocBody.d.ts +18 -0
  107. package/dist/render/components/DocBody.js +5 -5
  108. package/dist/render/components/FAQ.js +1 -1
  109. package/dist/render/components/Flex.d.ts +3 -1
  110. package/dist/render/components/Flex.js +1 -1
  111. package/dist/render/components/Grid.d.ts +2 -1
  112. package/dist/render/components/Grid.js +1 -1
  113. package/dist/render/components/HeroGroup.d.ts +2 -1
  114. package/dist/render/components/HeroGroup.js +1 -1
  115. package/dist/render/components/HeroSection.d.ts +2 -1
  116. package/dist/render/components/HeroSection.js +1 -1
  117. package/dist/render/components/HeroSingle.d.ts +2 -1
  118. package/dist/render/components/HeroSingle.js +1 -1
  119. package/dist/render/components/PageContentsContext.d.ts +14 -0
  120. package/dist/render/components/PageContentsContext.js +1 -0
  121. package/dist/render/components/PartStyledKind.js +1 -1
  122. package/dist/render/components/PartStyledText.js +1 -1
  123. package/dist/render/components/PublishedPartStylesContext.d.ts +4 -1
  124. package/dist/render/components/PublishedPartStylesContext.js +1 -1
  125. package/dist/render/components/Reel.js +1 -1
  126. package/dist/render/components/SectionAnimation.d.ts +10 -3
  127. package/dist/render/components/SectionAnimation.js +1 -1
  128. package/dist/render/components/Text.d.ts +2 -1
  129. package/dist/render/components/Text.js +1 -1
  130. package/dist/render/components/Timeline.js +1 -1
  131. package/dist/render/components/goldPhrases.d.ts +1 -1
  132. package/dist/render/components/goldPhrases.js +2 -2
  133. package/dist/render/lib/animation/entrance.d.ts +1 -0
  134. package/dist/render/lib/animation/entrance.js +1 -1
  135. package/dist/render/lib/animation/part-motion.d.ts +25 -0
  136. package/dist/render/lib/animation/part-motion.js +2 -0
  137. package/dist/render/lib/content/button-look.js +1 -1
  138. package/dist/render/lib/content/page-contents.d.ts +17 -0
  139. package/dist/render/lib/content/page-contents.js +1 -0
  140. package/dist/render/lib/document/blocks/general/Contents/render.d.ts +2 -0
  141. package/dist/render/lib/document/blocks/general/Contents/render.js +1 -0
  142. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  143. package/dist/render/lib/document/blocks/general/Grid/render.js +1 -1
  144. package/dist/render/lib/document/blocks/general/Hero/render.js +1 -1
  145. package/dist/render/lib/document/blocks/general/HeroGroup/render.js +1 -1
  146. package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
  147. package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
  148. package/dist/render/lib/document/blocks/general/renders.d.ts +1 -0
  149. package/dist/render/lib/document/blocks/general/renders.js +1 -1
  150. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +3 -0
  151. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  152. package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -1
  153. package/dist/render/lib/document/blocks/general/section-to-box-rows-docbody.d.ts +2 -0
  154. package/dist/render/lib/document/blocks/general/section-to-box-rows-docbody.js +2 -0
  155. package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
  156. package/dist/render/lib/document/blocks/general/section-to-box-rows-pageheader.d.ts +2 -0
  157. package/dist/render/lib/document/blocks/general/section-to-box-rows-pageheader.js +1 -0
  158. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  159. package/dist/render/lib/document/hero-media-parts.d.ts +2 -2
  160. package/dist/render/lib/document/page-render.js +1 -1
  161. package/dist/render/lib/document/part-styles.d.ts +10 -1
  162. package/dist/render/lib/document/part-styles.js +2 -2
  163. package/dist/render/lib/document/passes/clickable-parts.js +1 -1
  164. package/dist/render/lib/document/passes/section-anchor.d.ts +1 -0
  165. package/dist/render/lib/document/passes/section-anchor.js +1 -1
  166. package/dist/render/lib/document/passes/section-padding.js +1 -1
  167. package/dist/render/lib/sections/section-to-box.d.ts +1 -0
  168. package/dist/render/lib/sections/section-to-box.js +1 -1
  169. package/dist/render/lib/text-styles/site-text-styles.d.ts +16 -4
  170. package/dist/render/lib/text-styles/site-text-styles.js +2 -2
  171. package/package.json +3 -3
  172. package/dist/editor/lib/document/selected-host.d.ts +0 -2
  173. package/dist/editor/lib/document/selected-host.js +0 -1
@@ -1 +1 @@
1
- import{Fragment as D,jsx as s,jsxs as po}from"react/jsx-runtime";import{useId as re}from"react";import{parseHexColor as le}from"efficient-shell/format";import ae from"./BoxTabs.js";import{BoxTabPaneContext as me,useIsTabPane as ce}from"./BoxTabPaneContext.js";import{CellFillContext as ie,InBoxContext as fe,useCellOfStretchedRow as ue,useFillsCell as de}from"./InBoxContext.js";import be,{InsideSiteColumn as xo}from"./SiteGutterFrame.js";import{BoxSurfaceProvider as pe}from"./BoxSurfaceContext.js";import{BoxCellWidthContext as xe}from"./BoxCellWidthContext.js";import{useInSiteHeader as Se}from"./PhoneMenuTools.js";import{FRAME_BASE as So,FRAME_GUTTER as Co}from"./BlockFrame.js";import{containerGapProps as Ce}from"../../format/lib/content/container-gap.js";import{boxLayoutClasses as he,boxBlockSpacingClass as $e,boxFitContentClass as _e,boxRowColumnsClass as Pe,boxPhoneRowClasses as S,boxPhoneRowFits as Le,boxShareClasses as I,boxWrapClass as ye}from"../../format/lib/content/box-layout.js";import{boxSeparatorClasses as Ae,boxSeparatorSeamClass as Be,boxSeparatorStyle as ge,isStripBox as Te}from"../../format/lib/content/box-separator.js";import{DEFAULT_LOOP_DELAY as Oe,DEFAULT_LOOP_DIRECTION as Ee,DEFAULT_LOOP_SECONDS as Ne}from"../../format/lib/animation/index.js";import{LoopTrack as Re}from"../lib/animation/LoopTrack.js";import{BOX_CARD_PAD as l,BOX_OWNS_SIDES_CLASS as ve,boxDarkenStyle as we,boxPlacementClasses as Fe,CARD_SHADOW_CLASS as ke,isBackgroundBox as ho}from"../../format/lib/content/box-background.js";import{boxShadowAttrs as De}from"../../format/lib/content/box-shadow.js";import{boxRunsEdgeToEdge as Ie}from"../../format/lib/content/site-gutter.js";import{boxShapeClass as Ue,boxShapeClasses as We}from"../../format/lib/content/box-shape.js";import{BOX_JUMP_ATTR as Xe,BOX_LINK_ATTR as $o,BOX_LINK_CLASS as _o,BOX_LINKED_CLASS as je,boxJumpBlocksClass as He,boxJumpCss as Me,boxJumpSlug as ze,boxLinkOf as Ge}from"../../format/lib/content/box-link.js";import{SiteLink as Je}from"../lib/site-runtime.js";import{sectionBorderStyle as Ke}from"../../format/lib/content/borders.js";import{finiteNumber as a}from"../../format/lib/finite-number.js";import{sectionPadAttrs as Ye}from"../lib/content/section-padding.js";import{SECTION_FILL_CLASS as U}from"../../format/lib/content/section-min-height.js";import{ON_MEDIA_INK_STYLE as qe}from"../../format/lib/content/ink.js";import{sizedBackground as W}from"../../format/lib/sized-image.js";import{BoxRail as Qe,BoxRailStop as Ve,RAIL_STOPS_CLASS as Ze,useTimelineRail as os}from"./TimelineRail.js";const X={"--sf-site-gutter":"0px"},es="bg-cover bg-center bg-[image:var(--sf-box-bg)] max-[720px]:bg-[image:var(--sf-box-bg-p)]";function ss({children:e}){return s(D,{children:e(re())})}function ts({direction:e,label:Po,tabShape:Lo,gap:yo,gapPhone:Ao,justify:y,align:f,wrap:Bo,share:C,sharePhone:A,wrapPhone:go,phoneRow:h,columns:j,separator:u,blockSpacing:To,bgImage:$,bgImagePhone:H,darken:Oo,darkenStyle:Eo,placement:No,padV2:Ro=!1,border:vo,borderPhone:wo,pad:n={},contained:Fo=!0,fillHeight:d=!1,shadow:ko,loop:B,scrollDirection:M=Ee,loopSeconds:Do=Ne,loopDelay:Io=Oe,editing:z=!1,fillColor:G,line:J,upcoming:Uo,link:Wo,boxShape:K,boxShapePhone:Xo,jumpHighlight:jo,anchor:Ho,content:g}){const b=z?"":Ge(Wo),m=d?"":We(K,Xo),Mo=!d&&Ue(K)!=="",c=ze(jo,Ho),Y=typeof G=="string"?le(G.trim()):null,q=Y?{backgroundColor:Y}:void 0,Q=os(),T=J===!0&&e!=="tabs",t=ho($),O=Se(),V=ce(),E=de(),zo=ue(),N=Te(e,u),i=B==="scroll"&&e!=="tabs",_=Pe({direction:e,separator:u,loop:B,line:J,columns:j}),Z=[I(C),e==="row"?_e(C):"",_,$e(To),Ae(e,u)].filter(Boolean).join(" "),Go=Z?` ${Z}`:"",oo=["flex",e==="row"?N||i?"flex-row":`flex-row ${S(h,A,go)}`:"flex-col",ye(i?!1:Bo),t?Fe(No??"center",e):he(i?void 0:y,f)].join(" ")+Go,p=d||t||m||E?` ${U}`:"",R=Mo?` ${m}`:m?`${p} ${m}`:p,eo=zo&&e==="column"&&!t&&!i&&I(C)===""&&typeof y=="string"&&y!=="start",so=p||(eo?` ${U}`:""),v=b?` ${je}`:"",w=t||O||Ro?"":" py-6",Jo=`${So}${w} ${Co}${R}${v}`,Ko=O?`${R}${v}`.trim():`w-full${w}${R}${v}`,x=Ce("Flex",yo,e==="row"?"inline":"block",Ao),Yo=N?{...x.style,...ge(e,u)}:x.style,to=(o="")=>s(g,{className:`${oo}${x.className}${so}${o?` ${o}`:""}${T?` ${Ze}`:""}${c?` ${He(c)}`:""}`,style:Yo,minEmptyHeight:120}),no=Be(e,u),ro=i?s(Re,{direction:M,seconds:Do,delay:Io,editing:z,copy:o=>to(o&&no?`${o} ${no}`:o)}):to(),lo=e==="tabs"?s(ae,{className:`${oo}${x.className}${E&&!d&&!t&&!m?"":p}`,style:x.style,shape:Lo,children:ro}):ro,qo=V?s(me.Provider,{value:!1,children:lo}):lo,Qo={stretchedRow:e==="row"&&!t&&(f===void 0||f==="stretch"),fillingColumn:e==="column"&&(E||eo),columnsRow:_!==""},ao=s(fe.Provider,{value:Qo,children:s(ie.Provider,{value:!1,children:qo})}),F=T?s(Qe,{row:e==="row",stops:g.blockCount??0,children:ao}):ao,Vo=Po?.trim()||(V?"":void 0),Zo={values:n,frame:w?24:0},oe=o=>Q?s(Ve,{on:Q,future:Uo===!0,children:o}):o,ee=o=>b.startsWith("/")?s(Je,{href:b,className:_o,"aria-labelledby":o,[$o]:""}):s("a",{href:b,className:_o,"aria-labelledby":o,[$o]:""}),mo=c?s("style",{dangerouslySetInnerHTML:{__html:Me(c)}}):null,se=o=>({...t?null:De(ko),...c?{[Xe]:c}:null,...o?{id:o}:null}),co=_!==""?Number(j):0,te=S(h,A)===S(void 0),ne=(e==="column"||e==="row"&&!N&&!i&&(co===1&&te||co===0&&g.blockCount===1))&&!t&&!T&&!O,P=Ie({loop:B,direction:e,scrollDirection:M,bgImage:$}),io=(o,r)=>oe(s(be,{contained:Fo&&!P,style:P?X:void 0,framedClass:Jo,fillClass:Ko,columnClass:`${So} ${Co}${so}`,tabLabel:Vo,pad:t?void 0:Zo,border:Ke(vo,wo),outerAttrs:se(r),box:!0,edge:ne,outerStyle:t?void 0:q,children:mo||r?po(D,{children:[mo,r?ee(r):null,P?s(xo,{children:o}):o]}):P?s(xo,{children:o}):o})),fo=o=>b?s(ss,{children:r=>io(o,r)}):io(o);if(!t){const o=f===void 0||f==="stretch",r=(I(C)!==""||_!=="")&&!Le(h,A)&&(o||S(h)!==S(void 0));return fo((e==="row"?r:e==="column"&&o)?s(xe.Provider,{value:!0,children:F}):F)}const L=we(Oo,Eo),uo=ho(H),k=Ye({...n,top:a(n.top)??l.desktop,bottom:a(n.bottom)??l.desktop,topPhone:a(n.topPhone)??l.phone,bottomPhone:a(n.bottomPhone)??l.phone,left:a(n.left)??l.side,right:a(n.right)??l.side,leftPhone:a(n.leftPhone)??l.sidePhone,rightPhone:a(n.rightPhone)??l.sidePhone}),bo=s("div",{className:`relative z-[1] ${ve} ${k?.className??""}${d||m?` ${U}`:""}`.trimEnd(),style:L?{...k?.style,...X,...qe}:{...k?.style,...X},children:F});return fo(s(D,{children:po("div",{className:`relative isolate overflow-hidden ${ke}${p}${uo?` ${es}`:""}`,style:{...q,...uo?{"--sf-box-bg":W($??""),"--sf-box-bg-p":W(H??"")}:{backgroundImage:W($??""),backgroundSize:"cover",backgroundPosition:"center"}},children:[L&&s("div",{className:"absolute inset-0 z-0",style:L,"aria-hidden":!0}),L?s(pe,{children:bo}):bo]})}))}export{ts as default};
1
+ import{Fragment as W,jsx as e,jsxs as xo}from"react/jsx-runtime";import{useId as ms}from"react";import{parseHexColor as cs}from"efficient-shell/format";import is from"./BoxTabs.js";import{BoxTabPaneContext as us,useIsTabPane as fs}from"./BoxTabPaneContext.js";import{CellFillContext as ds,InBoxContext as bs,useCellOfStretchedRow as ps,useFillsCell as xs}from"./InBoxContext.js";import Cs,{InsideSiteColumn as Co}from"./SiteGutterFrame.js";import{BoxSurfaceProvider as Ss}from"./BoxSurfaceContext.js";import{BoxCellWidthContext as hs}from"./BoxCellWidthContext.js";import{useInSiteHeader as $s}from"./PhoneMenuTools.js";import{FRAME_BASE as So,FRAME_GUTTER as ho}from"./BlockFrame.js";import{containerGapProps as _s}from"../../format/lib/content/container-gap.js";import{boxLayoutClasses as Ps,boxBlockSpacingClass as Ls,boxFitContentClass as ys,boxRowColumnsClass as As,boxRowTabletColumnsClass as Bs,boxPhoneRowClasses as C,boxPhoneRowFits as Ts,boxShareClasses as X,boxWrapClass as gs}from"../../format/lib/content/box-layout.js";import{boxSeparatorClasses as Os,boxSeparatorSeamClass as Es,boxSeparatorStyle as Rs,isStripBox as ws}from"../../format/lib/content/box-separator.js";import{DEFAULT_LOOP_DELAY as Ns,DEFAULT_LOOP_DIRECTION as vs,DEFAULT_LOOP_SECONDS as Fs,isVerticalLoop as ks}from"../../format/lib/animation/index.js";import{LoopTrack as Ds}from"../lib/animation/LoopTrack.js";import{BOX_CARD_PAD as r,BOX_OWNS_SIDES_CLASS as Is,boxDarkenStyle as Us,boxPlacementClasses as Ws,CARD_SHADOW_CLASS as Xs,isBackgroundBox as $o}from"../../format/lib/content/box-background.js";import{boxShadowAttrs as js}from"../../format/lib/content/box-shadow.js";import{boxRunsEdgeToEdge as Hs}from"../../format/lib/content/site-gutter.js";import{boxShapeClass as Ms,boxShapeClasses as zs}from"../../format/lib/content/box-shape.js";import{BOX_JUMP_ATTR as Gs,BOX_LINK_ATTR as _o,BOX_LINK_CLASS as Po,BOX_LINKED_CLASS as Js,boxJumpBlocksClass as Ks,boxJumpCss as Ys,boxJumpSlug as Vs,boxLinkOf as qs}from"../../format/lib/content/box-link.js";import{SiteLink as Qs}from"../lib/site-runtime.js";import{sectionBorderStyle as Zs}from"../../format/lib/content/borders.js";import{finiteNumber as a}from"../../format/lib/finite-number.js";import{sectionPadAttrs as oe}from"../lib/content/section-padding.js";import{SECTION_FILL_CLASS as j}from"../../format/lib/content/section-min-height.js";import{ON_MEDIA_INK_STYLE as se}from"../../format/lib/content/ink.js";import{sizedBackground as H}from"../../format/lib/sized-image.js";import{BoxRail as ee,BoxRailStop as te,RAIL_STOPS_CLASS as ne,useTimelineRail as le}from"./TimelineRail.js";const M={"--sf-site-gutter":"0px"},re="bg-cover bg-center bg-[image:var(--sf-box-bg)] max-[720px]:bg-[image:var(--sf-box-bg-p)]";function ae({children:s}){return e(W,{children:s(ms())})}function me({direction:s,label:Lo,tabShape:yo,gap:Ao,gapPhone:Bo,gapTablet:To,justify:B,align:f,wrap:go,share:S,sharePhone:T,wrapPhone:Oo,phoneRow:h,columns:z,columnsTablet:Eo,separator:c,blockSpacing:Ro,bgImage:$,bgImagePhone:G,darken:wo,darkenStyle:No,placement:vo,padV2:Fo=!1,border:ko,borderPhone:Do,pad:n={},contained:Io=!0,fillHeight:d=!1,shadow:Uo,loop:_,scrollDirection:g=vs,loopSeconds:Wo=Fs,loopDelay:Xo=Ns,editing:J=!1,fillColor:K,line:O,upcoming:jo,link:Ho,boxShape:Y,boxShapePhone:Mo,jumpHighlight:zo,anchor:Go,content:E}){const b=J?"":qs(Ho),i=d?"":zs(Y,Mo),Jo=!d&&Ms(Y)!=="",u=Vs(zo,Go),V=typeof K=="string"?cs(K.trim()):null,q=V?{backgroundColor:V}:void 0,Q=le(),R=O===!0&&s!=="tabs",t=$o($),w=$s(),Z=fs(),N=xs(),Ko=ps(),P=ws(s,c),m=_==="scroll"&&s!=="tabs",L=As({direction:s,separator:c,loop:_,line:O,columns:z}),v=Bs({direction:s,separator:c,loop:_,line:O,columnsTablet:Eo}),oo=[X(S),s==="row"?ys(S):"",L,v,Ls(Ro),Os(s,c)].filter(Boolean).join(" "),Yo=oo?` ${oo}`:"",so=["flex",s==="row"?P||m?"flex-row":`flex-row ${C(h,T,Oo)}`:"flex-col",gs(m?!1:go),t?Ws(vo??"center",s):Ps(m?void 0:B,f)].join(" ")+Yo,p=d||t||i||N?` ${j}`:"",F=Jo?` ${i}`:i?`${p} ${i}`:p,eo=Ko&&s==="column"&&!t&&!m&&X(S)===""&&typeof B=="string"&&B!=="start",to=p||(eo?` ${j}`:""),k=b?` ${Js}`:"",D=t||w||Fo?"":" py-6",Vo=`${So}${D} ${ho}${F}${k}`,qo=w?`${F}${k}`.trim():`w-full${D}${F}${k}`,x=_s("Flex",Ao,s==="row"?"inline":"block",Bo,P||m?void 0:To),Qo=P?{...x.style,...Rs(s,c)}:x.style,no=(o="")=>e(E,{className:`${so}${x.className}${to}${o?` ${o}`:""}${R?` ${ne}`:""}${u?` ${Ks(u)}`:""}`,style:Qo,minEmptyHeight:120}),lo=ks(g)?"":Es(s,c),ro=m?e(Ds,{direction:g,seconds:Wo,delay:Xo,editing:J,copy:o=>no(o&&lo?`${o} ${lo}`:o)}):no(),ao=s==="tabs"?e(is,{className:`${so}${x.className}${N&&!d&&!t&&!i?"":p}`,style:x.style,shape:yo,children:ro}):ro,Zo=Z?e(us.Provider,{value:!1,children:ao}):ao,os={stretchedRow:s==="row"&&!t&&(f===void 0||f==="stretch"),fillingColumn:s==="column"&&(N||eo),columnsRow:L!==""||v!==""},mo=e(bs.Provider,{value:os,children:e(ds.Provider,{value:!1,children:Zo})}),I=R?e(ee,{row:s==="row",stops:E.blockCount??0,children:mo}):mo,ss=Lo?.trim()||(Z?"":void 0),es={values:n,frame:D?24:0},ts=o=>Q?e(te,{on:Q,future:jo===!0,children:o}):o,ns=o=>b.startsWith("/")?e(Qs,{href:b,className:Po,"aria-labelledby":o,[_o]:""}):e("a",{href:b,className:Po,"aria-labelledby":o,[_o]:""}),co=u?e("style",{dangerouslySetInnerHTML:{__html:Ys(u)}}):null,ls=o=>({...t?null:js(Uo),...u?{[Gs]:u}:null,...o?{id:o}:null}),io=L!==""?Number(z):0,rs=C(h,T)===C(void 0),as=(s==="column"||s==="row"&&!P&&!m&&(io===1&&rs||io===0&&E.blockCount===1))&&!t&&!R&&!w,y=Hs({loop:_,direction:s,scrollDirection:g,bgImage:$}),uo=(o,l)=>ts(e(Cs,{contained:Io&&!y,style:y?M:void 0,framedClass:Vo,fillClass:qo,columnClass:`${So} ${ho}${to}`,tabLabel:ss,pad:t?void 0:es,border:Zs(ko,Do),outerAttrs:ls(l),box:!0,edge:as,outerStyle:t?void 0:q,children:co||l?xo(W,{children:[co,l?ns(l):null,y?e(Co,{children:o}):o]}):y?e(Co,{children:o}):o})),fo=o=>b?e(ae,{children:l=>uo(o,l)}):uo(o);if(!t){const o=f===void 0||f==="stretch",l=(X(S)!==""||L!==""||v!=="")&&!Ts(h,T)&&(o||C(h)!==C(void 0));return fo((s==="row"?l:s==="column"&&o)?e(hs.Provider,{value:!0,children:I}):I)}const A=Us(wo,No),bo=$o(G),U=oe({...n,top:a(n.top)??r.desktop,bottom:a(n.bottom)??r.desktop,topPhone:a(n.topPhone)??r.phone,bottomPhone:a(n.bottomPhone)??r.phone,left:a(n.left)??r.side,right:a(n.right)??r.side,leftPhone:a(n.leftPhone)??r.sidePhone,rightPhone:a(n.rightPhone)??r.sidePhone}),po=e("div",{className:`relative z-[1] ${Is} ${U?.className??""}${d||i?` ${j}`:""}`.trimEnd(),style:A?{...U?.style,...M,...se}:{...U?.style,...M},children:I});return fo(e(W,{children:xo("div",{className:`relative isolate overflow-hidden ${Xs}${p}${bo?` ${re}`:""}`,style:{...q,...bo?{"--sf-box-bg":H($??""),"--sf-box-bg-p":H(G??"")}:{backgroundImage:H($??""),backgroundSize:"cover",backgroundPosition:"center"}},children:[A&&e("div",{className:"absolute inset-0 z-0",style:A,"aria-hidden":!0}),A?e(Ss,{children:po}):po]})}))}export{me as default};
@@ -4,9 +4,10 @@ interface GridProps {
4
4
  mobileColumns?: number | string;
5
5
  gap?: number | string;
6
6
  gapPhone?: unknown;
7
+ gapTablet?: unknown;
7
8
  contained?: boolean;
8
9
  fillHeight?: boolean;
9
10
  content: SlotComponent;
10
11
  }
11
- export default function Grid({ columns, mobileColumns, gap, gapPhone, contained, fillHeight, content: Content, }: GridProps): import("react").JSX.Element;
12
+ export default function Grid({ columns, mobileColumns, gap, gapPhone, gapTablet, contained, fillHeight, content: Content, }: GridProps): import("react").JSX.Element;
12
13
  export {};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{FRAME_BASE as t,FRAME_GUTTER as e}from"./BlockFrame.js";import{SlotsStartAfresh as S,useFillsCell as g}from"./InBoxContext.js";import h from"./SiteGutterFrame.js";import{containerGapProps as G}from"../../format/lib/content/container-gap.js";import{resolveGridColumns as E,resolveGridMobileColumns as y}from"../../format/lib/content/grid-span.js";import{SECTION_FILL_CLASS as A}from"../../format/lib/content/section-min-height.js";function F({columns:r,mobileColumns:i,gap:n,gapPhone:m,contained:f=!0,fillHeight:a=!1,content:c}){const p=g(),s=a||p?` ${A}`:"",d=`${t} py-6 ${e}${s}`,C=`w-full py-6${s}`,u=E(r),$=y(i,r),l=G("Grid",n,"both",m);return o(h,{contained:f,framedClass:d,fillClass:C,columnClass:`${t} ${e}${s}`,box:!0,children:o(S,{children:o(c,{className:`sf-grid-zone grid${l.className}${s}`,style:{...l.style,"--sf-grid-cols":String(u),"--sf-grid-cols-phone":String($)},minEmptyHeight:120})})})}export{F as default};
1
+ import{jsx as o}from"react/jsx-runtime";import{FRAME_BASE as t,FRAME_GUTTER as e}from"./BlockFrame.js";import{SlotsStartAfresh as g,useFillsCell as h}from"./InBoxContext.js";import G from"./SiteGutterFrame.js";import{containerGapProps as E}from"../../format/lib/content/container-gap.js";import{resolveGridColumns as y,resolveGridMobileColumns as A}from"../../format/lib/content/grid-span.js";import{SECTION_FILL_CLASS as F}from"../../format/lib/content/section-min-height.js";function _({columns:r,mobileColumns:i,gap:n,gapPhone:m,gapTablet:f,contained:a=!0,fillHeight:c=!1,content:p}){const d=h(),s=c||d?` ${F}`:"",C=`${t} py-6 ${e}${s}`,u=`w-full py-6${s}`,$=y(r),S=A(i,r),l=E("Grid",n,"both",m,f);return o(G,{contained:a,framedClass:C,fillClass:u,columnClass:`${t} ${e}${s}`,box:!0,children:o(g,{children:o(p,{className:`sf-grid-zone grid${l.className}${s}`,style:{...l.style,"--sf-grid-cols":String($),"--sf-grid-cols-phone":String(S)},minEmptyHeight:120})})})}export{_ as default};
@@ -8,6 +8,7 @@ export interface HeroGroupProps {
8
8
  width?: number;
9
9
  gap?: number | string;
10
10
  gapPhone?: unknown;
11
+ gapTablet?: unknown;
11
12
  direction?: string;
12
13
  justify?: string;
13
14
  align?: string;
@@ -16,4 +17,4 @@ export interface HeroGroupProps {
16
17
  content?: SlotComponent;
17
18
  dragRef?: ((element: Element | null) => void) | null;
18
19
  }
19
- export default function HeroGroup({ placement, nudgeX, nudgeY, width, gap, gapPhone, direction, justify, align, wrap, pad, content: Content, dragRef, }: HeroGroupProps): import("react").JSX.Element;
20
+ export default function HeroGroup({ placement, nudgeX, nudgeY, width, gap, gapPhone, gapTablet, direction, justify, align, wrap, pad, content: Content, dragRef, }: HeroGroupProps): import("react").JSX.Element;
@@ -1 +1 @@
1
- import{jsx as m}from"react/jsx-runtime";import{containerDirectionClass as G,resolveContainerDirection as H}from"../../format/lib/content/container-direction.js";import{containerGapProps as P}from"../../format/lib/content/container-gap.js";import{boxLayoutClasses as j,boxWrapClass as $}from"../../format/lib/content/box-layout.js";import{sectionPadAttrs as C}from"../lib/content/section-padding.js";import{clampNudge as p,clampWidth as k,normalisePlacement as v,placementParts as D,placementRow as W}from"../../format/lib/hero-group-placement.js";function w({placement:c,nudgeX:f,nudgeY:u,width:r,gap:g,gapPhone:d,direction:t,justify:y,align:h,wrap:x,pad:b={},content:n,dragRef:N}){const s=v(c),a=p(f),l=p(u),i=P("HeroGroup",g,H("HeroGroup",t)==="column"?"block":"inline",d),o={"--sf-hg-row":W(s),justifySelf:D(s).column};typeof r=="number"&&Number.isFinite(r)&&(o["--sf-hg-w"]=`${k(r)}%`),(a!==0||l!==0)&&(o["--sf-hg-nudge"]=`${a}px ${l}px`);const e=C(b);return m("div",{className:e?`sf-hero-group ${e.className}`:"sf-hero-group","data-hg":s,style:e?{...o,...e.style}:o,ref:N??void 0,children:n?m(n,{className:["sf-hero-group-blocks flex",G("HeroGroup",t),j(y,h),$(x)].filter(Boolean).join(" ")+i.className,style:i.style,minEmptyHeight:40}):null})}export{w as default};
1
+ import{jsx as m}from"react/jsx-runtime";import{containerDirectionClass as H,resolveContainerDirection as P}from"../../format/lib/content/container-direction.js";import{containerGapProps as j}from"../../format/lib/content/container-gap.js";import{boxLayoutClasses as $,boxWrapClass as C}from"../../format/lib/content/box-layout.js";import{sectionPadAttrs as k}from"../lib/content/section-padding.js";import{clampNudge as p,clampWidth as v,normalisePlacement as D,placementParts as W,placementRow as w}from"../../format/lib/hero-group-placement.js";function A({placement:c,nudgeX:f,nudgeY:u,width:r,gap:g,gapPhone:d,gapTablet:y,direction:t,justify:h,align:x,wrap:b,pad:N={},content:n,dragRef:G}){const s=D(c),a=p(f),l=p(u),i=j("HeroGroup",g,P("HeroGroup",t)==="column"?"block":"inline",d,y),o={"--sf-hg-row":w(s),justifySelf:W(s).column};typeof r=="number"&&Number.isFinite(r)&&(o["--sf-hg-w"]=`${v(r)}%`),(a!==0||l!==0)&&(o["--sf-hg-nudge"]=`${a}px ${l}px`);const e=k(N);return m("div",{className:e?`sf-hero-group ${e.className}`:"sf-hero-group","data-hg":s,style:e?{...o,...e.style}:o,ref:G??void 0,children:n?m(n,{className:["sf-hero-group-blocks flex",H("HeroGroup",t),$(h,x),C(b)].filter(Boolean).join(" ")+i.className,style:i.style,minEmptyHeight:40}):null})}export{A as default};
@@ -30,5 +30,6 @@ interface Props {
30
30
  arrowsShape?: HeroArrowShape;
31
31
  arrowsPlacement?: string;
32
32
  editing?: boolean;
33
+ partMotion?: Record<string, unknown>;
33
34
  }
34
- export default function HeroSection({ slides: Slides, alignment, textureOpacity, showTexture, textureColor, phoneUpDown, phoneSideways, autoplay, autoplayInterval, showTicker, tickerItems, heightDesktop, heightMobile, showPicker, pickerShape, pickerPlacement, showArrows, arrowsShape, arrowsPlacement, editing, }: Props): import("react").JSX.Element;
35
+ export default function HeroSection({ slides: Slides, 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;
@@ -1 +1 @@
1
- "use client";import{jsx as c,jsxs as A}from"react/jsx-runtime";import{useCallback as f,useEffect as x,useId as ke,useRef as i,useState as g}from"react";import{markOverlayPortal as K}from"../../format/lib/document/overlay-portal.js";import ge from"./Ticker.js";import{HeroSlideStyleContext as _e}from"./HeroSlide.js";import Se from"./HeroArrows.js";import Re from"./Reel.js";import{TICKER_PART_ATTR as Te}from"./PreviewTickerContext.js";import{useReducedMotion as Oe}from"./useReducedMotion.js";import{hasSectionHeight as He,resolveSectionHeight as U}from"../../format/lib/content/section-height.js";import{HEADER_HEIGHT_CSS as Le}from"../lib/document/header-clearance.js";import{nextReel as Ae,normaliseHeroReelShape as Ne,reelShown as Ce}from"../../format/lib/reel.js";import{arrowsShown as Me,arrowStep as Pe}from"../../format/lib/hero-arrows.js";import{swipeEnabled as De,swipeStep as Ie}from"../../format/lib/hero-swipe.js";import{videoControlShown as Ve,videoHeld as $e}from"../../format/lib/hero-video-control.js";import{HERO_SLIDER_GOTO_EVENT as N}from"efficient-easel/draw";import{say as J}from"../../format/lib/editor-words.js";import{markedChildren as Q}from"../../format/lib/marked-children.js";import{DEFAULT_TICKER_ITEMS as ze}from"../../format/lib/hero-ticker.js";import{scrim as Xe}from"../../format/lib/content/scrim.js";const Ge="Play video",je="Hold video",Be="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",Ye=()=>J("item"),W=new Map;function qe(_,b){const h=_?.ownerDocument?.defaultView;if(h)return h.addEventListener(N,b),()=>h.removeEventListener(N,b)}function Fe({slides:_,alignment:b,textureOpacity:h,showTexture:Z,textureColor:ee,phoneUpDown:te,phoneSideways:re,autoplay:C,autoplayInterval:S,showTicker:oe,tickerItems:ne,heightDesktop:M,heightMobile:P,showPicker:se,pickerShape:ce,pickerPlacement:ae,showArrows:ie,arrowsShape:le,arrowsPlacement:ue,editing:n}){const D=He(M,P),de=D?"h-[var(--sf-hero-h-m)] min-[720px]:h-[var(--sf-hero-h-d)]":"h-screen min-h-[680px]",me=D?{"--sf-hero-h-d":U(M),"--sf-hero-h-m":U(P)}:void 0,I=(ne??ze.map(e=>({text:e}))).map(e=>e?.text?.trim()?e.text:n?Ye():"").filter(Boolean),fe=oe!==!1,l=i(null),V=i(null),$=i(null),z=i(null),X=ke(),R=i(X),[w,he]=g([]),[pe,G]=g(0),p=i(0),[j,B]=g(!1),[y,ve]=g(!1),T=Oe(),E=f(()=>l.current?.querySelector(".hero-track")??null,[]),a=f((e,t=!1)=>{G(e),p.current=e,W.set(R.current,e);const r=l.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}%)`},[]);x(()=>{const e=l.current,t=e?.getAttribute("data-easel-block")||e?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||X;R.current=t;const r=W.get(t);typeof r=="number"&&(G(r),p.current=r)},[]),x(()=>{const e=E();if(!e)return;const t=()=>{he(o=>Ae(o,Q(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()}},[E]),x(()=>{if(!n)return;const e=t=>{const r=t.detail;if(!r||typeof r.index!="number")return;const o=l.current,m=o?.getAttribute("data-easel-block")||o?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||R.current;r.id&&r.id!==m||a(r.index,!0)};return qe(l.current,e)},[n,a]);const s=w.length,u=Math.min(Math.max(pe,0),Math.max(0,s-1)),O=Ce({shown:se,count:s}),Y=Me({shown:ie,count:s}),q=Ve({editing:n,shown:u,slides:w}),xe=$e({editing:n,playing:y,controlShown:q}),k=De({count:s,editing:n}),d=i(null),v=i(null),be=f(e=>{if(d.current=null,v.current=null,!k||e.touches.length!==1)return;const t=e.touches[0];d.current={x:t.clientX,y:t.clientY},v.current={x:t.clientX,y:t.clientY}},[k]),we=f(e=>{if(!d.current)return;if(e.touches.length!==1){d.current=null;return}const t=e.touches[0];v.current={x:t.clientX,y:t.clientY}},[]),ye=f(()=>{const e=d.current,t=v.current;if(d.current=null,v.current=null,!k||!e||!t)return;const r=Ie(t.x-e.x,t.y-e.y,p.current,s);r!==p.current&&a(r)},[k,s,a]);x(()=>{if(n||!C||j||T||s<=1)return;const t=Math.max(1,typeof S=="number"?S:6)*1e3,r=window.setTimeout(()=>a((u+1)%s),t);return()=>window.clearTimeout(r)},[n,C,S,j,T,s,u,a]),x(()=>{const e=[V.current,$.current,z.current].filter(Boolean),t=e.map(o=>K(o)),r=o=>{const m=o.target,H=m.closest("[data-hero-nav]"),F=H??m.closest("[data-idx]");if(!F)return;o.stopPropagation(),o.preventDefault();const L=H?Pe(H.dataset.heroNav,p.current,s):Number(F.dataset.idx);Number.isNaN(L)||(a(L,n),Q(E(),"data-slide-name")[L]?.click())};return e.forEach(o=>o.addEventListener("click",r,{capture:!0})),()=>{t.forEach(o=>o?.()),e.forEach(o=>o.removeEventListener("click",r,{capture:!0}))}},[s,a,E,n]);const Ee=f(e=>{if(!e)return;const t=K(e),r=o=>{o.stopPropagation(),o.preventDefault(),ve(m=>!m)};return e.addEventListener("click",r,{capture:!0}),()=>{t?.(),e.removeEventListener("click",r,{capture:!0})}},[]);return c(_e.Provider,{value:{alignment:b,textureOpacity:h,textureOn:Z,textureColor:ee,quietVideo:xe,phoneUpDown:te,phoneSideways:re},children:A("div",{ref:l,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${de} max-w-[var(--sf-hero-cap,none)] overflow-hidden`,style:me,onMouseEnter:()=>B(!0),onMouseLeave:()=>B(!1),onTouchStart:be,onTouchMove:we,onTouchEnd:ye,children:[c(_,{className:"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:`translateX(-${u*100}%)`,transition:T?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),q&&c("div",{ref:Ee,"data-hero-video-control":y?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${Le} + 16px)`},children:A("button",{type:"button",className:Be,children:[c("span",{"aria-hidden":"true",children:y?"❚❚":"▶"}),J(y?je:Ge)]})}),(O||Y)&&A("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:[O&&c(Re,{ref:V,slides:w,active:u,shape:Ne(ce),placement:ae}),Y&&c(Se,{ref:z,shape:le,placement:ue})]}),O&&c("div",{ref:$,className:"sf-hero-phone-dots absolute bottom-[80px] left-1/2 z-[6] hidden -translate-x-1/2 items-center gap-2",children:w.map((e,t)=>c("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))}),fe&&I.length>0&&c("div",{className:"sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5",...n?{[Te]:""}:{},style:{background:Xe(.55)},children:c(ge,{items:I,backdrop:"dark-media"})})]})})}export{N as HERO_SLIDER_GOTO_EVENT,je as HERO_VIDEO_HOLD_LABEL,Ge as HERO_VIDEO_PLAY_LABEL,Fe as default,qe as subscribeSliderGoto};
1
+ "use client";import{jsx as n,jsxs as C}from"react/jsx-runtime";import{useCallback as v,useEffect as w,useId as ge,useRef as u,useState as R}from"react";import{markOverlayPortal as Q}from"../../format/lib/document/overlay-portal.js";import Se from"./Ticker.js";import{HeroSlideStyleContext as Te}from"./HeroSlide.js";import Re from"./HeroArrows.js";import Oe from"./Reel.js";import{TICKER_PART_ATTR as He}from"./PreviewTickerContext.js";import{useReducedMotion as Ae}from"./useReducedMotion.js";import{hasSectionHeight as Le,resolveSectionHeight as W}from"../../format/lib/content/section-height.js";import{HEADER_HEIGHT_CSS as Me}from"../lib/document/header-clearance.js";import{nextReel as Ne,normaliseHeroReelShape as Ce,reelShown as Pe}from"../../format/lib/reel.js";import{arrowsShown as Ie,arrowStep as De}from"../../format/lib/hero-arrows.js";import{swipeEnabled as Ve,swipeStep as $e}from"../../format/lib/hero-swipe.js";import{videoControlShown as ze,videoHeld as Xe}from"../../format/lib/hero-video-control.js";import{HERO_SLIDER_GOTO_EVENT as P}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{DEFAULT_TICKER_ITEMS as Ge,TICKER_MOTION_PART as je}from"../../format/lib/hero-ticker.js";import{SectionAnimation as Be}from"./SectionAnimation.js";import{entranceDrawn as Ye}from"../lib/animation/entrance.js";import{readPartMotion as qe}from"../lib/animation/part-motion.js";import{scrim as Fe}from"../../format/lib/content/scrim.js";const Ke="Play video",Ue="Hold video",Je="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",Qe=()=>Z("item"),te=new Map;function We(d,a){const i=d?.ownerDocument?.defaultView;if(i)return i.addEventListener(P,a),()=>i.removeEventListener(P,a)}function Ze({slides:d,alignment:a,textureOpacity:i,showTexture:k,textureColor:y,phoneUpDown:E,phoneSideways:re,autoplay:I,autoplayInterval:O,showTicker:oe,tickerItems:ne,heightDesktop:D,heightMobile:V,showPicker:se,pickerShape:ce,pickerPlacement:ae,showArrows:ie,arrowsShape:le,arrowsPlacement:ue,editing:s,partMotion:de}){const $=Le(D,V),me=$?"h-[var(--sf-hero-h-m)] min-[720px]:h-[var(--sf-hero-h-d)]":"h-screen min-h-[680px]",fe=$?{"--sf-hero-h-d":W(D),"--sf-hero-h-m":W(V)}:void 0,z=(ne??Ge.map(e=>({text:e}))).map(e=>e?.text?.trim()?e.text:s?Qe():"").filter(Boolean),he=oe!==!1,pe=Ye(qe({_partMotion:de},je)),m=u(null),X=u(null),G=u(null),j=u(null),B=ge(),H=u(B),[_,ve]=R([]),[xe,Y]=R(0),x=u(0),[q,F]=R(!1),[g,be]=R(!1),A=Ae(),S=v(()=>m.current?.querySelector(".hero-track")??null,[]),l=v((e,t=!1)=>{Y(e),x.current=e,te.set(H.current,e);const r=m.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=m.current,t=e?.getAttribute("data-easel-block")||e?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||B;H.current=t;const r=te.get(t);typeof r=="number"&&(Y(r),x.current=r)},[]),w(()=>{const e=S();if(!e)return;const t=()=>{ve(o=>Ne(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()}},[S]),w(()=>{if(!s)return;const e=t=>{const r=t.detail;if(!r||typeof r.index!="number")return;const o=m.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 We(m.current,e)},[s,l]);const c=_.length,f=Math.min(Math.max(xe,0),Math.max(0,c-1)),L=Pe({shown:se,count:c}),K=Ie({shown:ie,count:c}),U=ze({editing:s,shown:f,slides:_}),we=Xe({editing:s,playing:g,controlShown:U}),T=Ve({count:c,editing:s}),h=u(null),b=u(null),ke=v(e=>{if(h.current=null,b.current=null,!T||e.touches.length!==1)return;const t=e.touches[0];h.current={x:t.clientX,y:t.clientY},b.current={x:t.clientX,y:t.clientY}},[T]),ye=v(e=>{if(!h.current)return;if(e.touches.length!==1){h.current=null;return}const t=e.touches[0];b.current={x:t.clientX,y:t.clientY}},[]),Ee=v(()=>{const e=h.current,t=b.current;if(h.current=null,b.current=null,!T||!e||!t)return;const r=$e(t.x-e.x,t.y-e.y,x.current,c);r!==x.current&&l(r)},[T,c,l]);w(()=>{if(s||!I||q||A||c<=1)return;const t=Math.max(1,typeof O=="number"?O:6)*1e3,r=window.setTimeout(()=>l((f+1)%c),t);return()=>window.clearTimeout(r)},[s,I,O,q,A,c,f,l]),w(()=>{const e=[X.current,G.current,j.current].filter(Boolean),t=e.map(o=>Q(o)),r=o=>{const p=o.target,M=p.closest("[data-hero-nav]"),J=M??p.closest("[data-idx]");if(!J)return;o.stopPropagation(),o.preventDefault();const N=M?De(M.dataset.heroNav,x.current,c):Number(J.dataset.idx);Number.isNaN(N)||(l(N,s),ee(S(),"data-slide-name")[N]?.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 _e=v(e=>{if(!e)return;const t=Q(e),r=o=>{o.stopPropagation(),o.preventDefault(),be(p=>!p)};return e.addEventListener("click",r,{capture:!0}),()=>{t?.(),e.removeEventListener("click",r,{capture:!0})}},[]);return n(Te.Provider,{value:{alignment:a,textureOpacity:i,textureOn:k,textureColor:y,quietVideo:we,phoneUpDown:E,phoneSideways:re},children:C("div",{ref:m,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${me} max-w-[var(--sf-hero-cap,none)] overflow-hidden`,style:fe,onMouseEnter:()=>F(!0),onMouseLeave:()=>F(!1),onTouchStart:ke,onTouchMove:ye,onTouchEnd:Ee,children:[n(d,{className:"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:`translateX(-${f*100}%)`,transition:A?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),U&&n("div",{ref:_e,"data-hero-video-control":g?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${Me} + 16px)`},children:C("button",{type:"button",className:Je,children:[n("span",{"aria-hidden":"true",children:g?"❚❚":"▶"}),Z(g?Ue:Ke)]})}),(L||K)&&C("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(Oe,{ref:X,slides:_,active:f,shape:Ce(ce),placement:ae}),K&&n(Re,{ref:j,shape:le,placement:ue})]}),L&&n("div",{ref:G,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===f?"w-5 bg-accent":"w-2 bg-white/45 hover:bg-white/70"}`},t))}),he&&z.length>0&&n(et,{editing:!!s,entrance:pe,children:n(Se,{items:z,backdrop:"dark-media"})})]})})}function et({editing:d,entrance:a,children:i}){const k="sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5",y=d?{[He]:""}:void 0,E={background:Fe(.55)};return a?n(Be,{desktop:a.desktop,phone:a.phone,editing:d,boxClass:k,boxAttrs:y,boxStyle:E,children:i}):n("div",{className:k,...y,style:E,children:i})}export{P as HERO_SLIDER_GOTO_EVENT,Ue as HERO_VIDEO_HOLD_LABEL,Ke as HERO_VIDEO_PLAY_LABEL,Ze as default,We as subscribeSliderGoto};
@@ -24,5 +24,6 @@ export interface HeroSingleProps {
24
24
  youtubeUrl?: string;
25
25
  videoPlayback?: string;
26
26
  editing?: boolean;
27
+ partMotion?: Record<string, unknown>;
27
28
  }
28
- 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, }: HeroSingleProps): import("react").JSX.Element;
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;
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as n}from"react/jsx-runtime";import{useRef as Q,useState as W}from"react";import x from"./HeroPoster.js";import{HeroVideoBackdrop as X,HeroVideoPlayer as Z}from"./HeroVideoPlay.js";import{resolveMedia as i}from"../lib/media.js";import{hasSectionHeight as ee,resolveSectionHeight as R}from"../../format/lib/content/section-height.js";import{DEFAULT_OVERLAY_POSITION as oe,overlayGradient as re}from"../../format/lib/sections/hero-overlay.js";import{ON_MEDIA_INK_STYLE as se}from"../../format/lib/content/ink.js";import{HERO_PART_ATTR as ie}from"../lib/document/hero-media-parts.js";import{hidableText as te}from"efficient-easel/draw";import{normaliseVideoPlayback as ne,normaliseVideoSource as ae,parseYouTubeId as ce}from"../../format/lib/hero-video.js";import{heroPictureCount as le,normaliseMediaLayout as de,resolvePhoneLayout as me}from"../../format/lib/hero-media-layout.js";import{DEFAULT_TINT as g}from"../../format/lib/content/tint.js";function pe({overlay:t=100,overlayColor:o=g,overlayPosition:d=oe,mediaType:a="image",mediaSrc:m,poster:b,objectPosition:y,objectPositionPhone:w,tintColor:P=g,tintOpacity:p=0,heightDesktop:N,heightMobile:T,boxes:_,videoSource:L,youtubeUrl:O,videoPlayback:D,mediaLayout:S,mediaLayoutPhone:k,mediaImage2:$,objectPosition2:Y,objectPosition2Phone:F,tintColor2:G=g,tintOpacity2:C=0,editing:r=!1}){const H=ee(N,T),K=H?"h-[var(--sf-hero-h-m)] min-[720px]:h-[var(--sf-hero-h-d)]":"h-screen min-h-[680px]",U=H?{"--sf-hero-h-d":R(N),"--sf-hero-h-m":R(T)}:void 0,s=a==="video",I=s?i(m):void 0,V=s?i(b):i(m)??i(b),c=s&&ae(L)==="youtube",u=s&&ne(D)==="click",j=c?ce(te(O)):null,E=s&&!c&&!u,[z,B]=W(!1),h=!z,q=Q(null),J=a==="video"?"media":"image",l=de(S),f=me(k,l),M=!s&&le({mediaLayout:S,mediaLayoutPhone:k})>1;return n("section",{ref:q,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${K} max-w-[var(--sf-hero-cap,none)] overflow-hidden`,style:U,children:[M?n("div",{className:`absolute inset-0 z-[1] grid ${ue[f]} ${he[l]}`,"data-hero-layout":l,"data-hero-layout-phone":f,children:[n(v,{part:"image",editing:r,className:"relative overflow-hidden",children:[e(x,{posterSrc:i(m),showVideo:!1,objectPosition:y,objectPositionPhone:w}),e(A,{color:P,opacity:p})]}),n(v,{part:"image2",editing:r,className:`relative overflow-hidden${f==="one"?" max-[719px]:hidden":""}${l==="one"?" min-[720px]:hidden":""}`,children:[e(x,{posterSrc:i($),showVideo:!1,objectPosition:Y,objectPositionPhone:F}),e(A,{color:G,opacity:C})]})]}):n(v,{part:J,editing:r,className:"absolute inset-0 z-[1]",children:[e(x,{videoSrc:E?I:void 0,posterSrc:V,showVideo:E,objectPosition:y,objectPositionPhone:w}),c&&e(X,{youTubeId:j,ownPoster:!!V,background:!u,editing:r})]}),u&&e(Z,{youTubeId:j,fileSrc:c?void 0:I,playing:z,onPlay:()=>B(!0),editing:r}),h&&!M&&p>0&&e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:P,opacity:Math.min(Math.max(p,0),100)/100}}),h&&e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:re(o,d),opacity:Math.min(Math.max(t,0),100)/100}}),h&&_&&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",r?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:se,children:e(_,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}const ue={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"},he={one:"min-[720px]:grid-cols-1 min-[720px]:grid-rows-1",side:"min-[720px]:grid-cols-2 min-[720px]:grid-rows-1",stacked:"min-[720px]:grid-cols-1 min-[720px]:grid-rows-2"};function A({color:t,opacity:o}){return o>0?e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:t,opacity:Math.min(Math.max(o,0),100)/100}}):null}function v({part:t,editing:o,className:d,children:a}){return e("div",{className:d,...o?{[ie]:t}:{},children:a})}export{pe as default};
1
+ "use client";import{jsx as e,jsxs as l}from"react/jsx-runtime";import{useRef as re,useState as ie}from"react";import y from"./HeroPoster.js";import{HeroVideoBackdrop as se,HeroVideoPlayer as te}from"./HeroVideoPlay.js";import{resolveMedia as t}from"../lib/media.js";import{hasSectionHeight as ne,resolveSectionHeight as D}from"../../format/lib/content/section-height.js";import{DEFAULT_OVERLAY_POSITION as ae,overlayGradient as ce}from"../../format/lib/sections/hero-overlay.js";import{ON_MEDIA_INK_STYLE as de}from"../../format/lib/content/ink.js";import{HERO_PART_ATTR as le}from"../lib/document/hero-media-parts.js";import{hidableText as me}from"efficient-easel/draw";import{normaliseVideoPlayback as pe,normaliseVideoSource as ue,parseYouTubeId as he}from"../../format/lib/hero-video.js";import{heroPictureCount as fe,normaliseMediaLayout as xe,resolvePhoneLayout as ge}from"../../format/lib/hero-media-layout.js";import{DEFAULT_TINT as w}from"../../format/lib/content/tint.js";import{SectionAnimation as $}from"./SectionAnimation.js";import{entranceDrawn as ve}from"../lib/animation/entrance.js";import{readPartMotion as be}from"../lib/animation/part-motion.js";function ye({overlay:n=100,overlayColor:o=w,overlayPosition:a=ae,mediaType:c="image",mediaSrc:i,poster:d,objectPosition:k,objectPositionPhone:T,tintColor:N=w,tintOpacity:f=0,heightDesktop:_,heightMobile:S,boxes:H,videoSource:Y,youtubeUrl:F,videoPlayback:G,mediaLayout:I,mediaLayoutPhone:M,mediaImage2:K,objectPosition2:U,objectPosition2Phone:B,tintColor2:q=w,tintOpacity2:J=0,editing:r=!1,partMotion:Q}){const V=ne(_,S),W=V?"h-[var(--sf-hero-h-m)] min-[720px]:h-[var(--sf-hero-h-d)]":"h-screen min-h-[680px]",X=V?{"--sf-hero-h-d":D(_),"--sf-hero-h-m":D(S)}:void 0,s=c==="video",j=s?t(i):void 0,z=s?t(d):t(i)??t(d),m=s&&ue(Y)==="youtube",x=s&&pe(G)==="click",A=m?he(me(F)):null,E=s&&!m&&!x,[R,Z]=ie(!1),g=!R,ee=re(null),L=c==="video"?"media":"image",p=h=>ve(be({_partMotion:Q},h)),oe=h=>{const b=p("media");return b?e($,{desktop:b.desktop,phone:b.phone,editing:r,boxClass:"absolute inset-0 z-[1]",children:h}):h},u=xe(I),v=ge(M,u),O=!s&&fe({mediaLayout:I,mediaLayoutPhone:M})>1;return l("section",{ref:ee,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${W} max-w-[var(--sf-hero-cap,none)] overflow-hidden`,style:X,children:[oe(O?l("div",{className:`absolute inset-0 z-[1] grid ${we[v]} ${Pe[u]}`,"data-hero-layout":u,"data-hero-layout-phone":v,children:[l(P,{part:"image",editing:r,entrance:p("image"),className:"relative overflow-hidden",children:[e(y,{posterSrc:t(i),showVideo:!1,objectPosition:k,objectPositionPhone:T}),e(C,{color:N,opacity:f})]}),l(P,{part:"image2",editing:r,entrance:p("image2"),className:`relative overflow-hidden${v==="one"?" max-[719px]:hidden":""}${u==="one"?" min-[720px]:hidden":""}`,children:[e(y,{posterSrc:t(K),showVideo:!1,objectPosition:U,objectPositionPhone:B}),e(C,{color:q,opacity:J})]})]}):l(P,{part:L,editing:r,entrance:L==="image"?p("image"):null,className:"absolute inset-0 z-[1]",children:[e(y,{videoSrc:E?j:void 0,posterSrc:z,showVideo:E,objectPosition:k,objectPositionPhone:T}),m&&e(se,{youTubeId:A,ownPoster:!!z,background:!x,editing:r})]})),x&&e(te,{youTubeId:A,fileSrc:m?void 0:j,playing:R,onPlay:()=>Z(!0),editing:r}),g&&!O&&f>0&&e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:N,opacity:Math.min(Math.max(f,0),100)/100}}),g&&e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:ce(o,a),opacity:Math.min(Math.max(n,0),100)/100}}),g&&H&&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",r?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:de,children:e(H,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}const we={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"},Pe={one:"min-[720px]:grid-cols-1 min-[720px]:grid-rows-1",side:"min-[720px]:grid-cols-2 min-[720px]:grid-rows-1",stacked:"min-[720px]:grid-cols-1 min-[720px]:grid-rows-2"};function C({color:n,opacity:o}){return o>0?e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:n,opacity:Math.min(Math.max(o,0),100)/100}}):null}function P({part:n,editing:o,entrance:a,className:c,children:i}){const d=o?{[le]:n}:void 0;return a?e($,{desktop:a.desktop,phone:a.phone,editing:o,boxClass:c,boxAttrs:d,children:i}):e("div",{className:c,...d,children:i})}export{ye as default};
@@ -0,0 +1,14 @@
1
+ import { type ReactNode } from "react";
2
+ import type { ContentsEntry } from "./ContentsList.js";
3
+ export declare function PageContentsFromDocument({ content, children }: {
4
+ content: readonly unknown[] | undefined;
5
+ children?: ReactNode;
6
+ }): import("react").JSX.Element;
7
+ export declare function ContentsEntriesDrawn({ id, children }: {
8
+ id: unknown;
9
+ children: (entries: ContentsEntry[] | undefined) => ReactNode;
10
+ }): import("react").JSX.Element;
11
+ export declare function KickerNumberDrawn({ id, children }: {
12
+ id: unknown;
13
+ children: (number: string | undefined) => ReactNode;
14
+ }): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as o,Fragment as i}from"react/jsx-runtime";import{createContext as a,useContext as u,useMemo as m}from"react";import{pageContentsDrawing as g}from"../lib/content/page-contents.js";const s=a(null),c=n=>n==null||n===""?void 0:String(n);function x({content:n,children:e}){const t=m(()=>g(n),[n]);return o(s.Provider,{value:t,children:e})}function p({id:n,children:e}){const t=u(s),r=c(n);return o(i,{children:e(r?t?.entries.get(r):void 0)})}function C({id:n,children:e}){const t=u(s),r=c(n);return o(i,{children:e(r?t?.numbers.get(r):void 0)})}export{p as ContentsEntriesDrawn,C as KickerNumberDrawn,x as PageContentsFromDocument};
@@ -1 +1 @@
1
- "use client";import{Fragment as u,jsx as n}from"react/jsx-runtime";import{usePublishedPartKindRule as a,usePublishedSharedKindRule as i}from"./PublishedPartStylesContext.js";import{PART_STYLED_ATTR as m,TEXT_STYLE_ATTR as T}from"../lib/document/part-styles.js";function d({kind:e,shared:s=!1,children:r}){const l=a(e),o=i(e),t=s?o:l;return t?n("span",{[m]:t.stamp,...t.textStyle?{[T]:t.textStyle}:{},children:r}):n(u,{children:r})}export{d as default};
1
+ "use client";import{Fragment as i,jsx as n}from"react/jsx-runtime";import{usePartEntrance as l,usePublishedPartKindRule as m,usePublishedSharedKindRule as f}from"./PublishedPartStylesContext.js";import{PART_STYLED_ATTR as T,TEXT_STYLE_ATTR as c}from"../lib/document/part-styles.js";function d({kind:e,shared:s=!1,children:r}){const o=m(e),a=f(e),t=s?a:o,u=l(t);return t?n("span",{ref:u,[T]:t.stamp,...t.textStyle?{[c]:t.textStyle}:{},children:r}):n(i,{children:r})}export{d as default};
@@ -1 +1 @@
1
- "use client";import{Fragment as m,jsx as e}from"react/jsx-runtime";import{ClaimedStamp as s,usePublishedPartRule as l}from"./PublishedPartStylesContext.js";import{PART_STYLED_ATTR as n,TEXT_STYLE_ATTR as i}from"../lib/document/part-styles.js";function T({value:a,children:r}){const t=l(a);return t?e(s,{stamp:t.stamp,children:e("span",{[n]:t.stamp,...t.textStyle?{[i]:t.textStyle}:{},children:r})}):e(m,{children:r})}export{T as default};
1
+ "use client";import{Fragment as m,jsx as e}from"react/jsx-runtime";import{ClaimedStamp as s,usePartEntrance as o,usePublishedPartRule as i}from"./PublishedPartStylesContext.js";import{PART_STYLED_ATTR as l,TEXT_STYLE_ATTR as u}from"../lib/document/part-styles.js";function T({value:a,children:r}){const t=i(a),n=o(t);return t?e(s,{stamp:t.stamp,children:e("span",{ref:n,[l]:t.stamp,...t.textStyle?{[u]:t.textStyle}:{},children:r})}):e(m,{children:r})}export{T as default};
@@ -1,12 +1,15 @@
1
1
  import { type ReactNode } from "react";
2
2
  import { type PartStyles, type PublishedPartRule } from "../lib/document/part-styles.js";
3
+ import { type PartMotion } from "../lib/animation/part-motion.js";
3
4
  import type { PartNeedle } from "../lib/document/text-parts.js";
4
- export declare function PublishedPartStyles({ needles, styles, type, children, }: {
5
+ export declare function PublishedPartStyles({ needles, styles, motions, type, children, }: {
5
6
  needles: PartNeedle[];
6
7
  styles: PartStyles;
8
+ motions?: Readonly<Record<string, PartMotion>>;
7
9
  type?: string;
8
10
  children: ReactNode;
9
11
  }): import("react").JSX.Element;
12
+ export declare function usePartEntrance(rule: PublishedPartRule | null): import("react").RefObject<HTMLSpanElement | null>;
10
13
  export declare const PART_STYLES_PRECEDENCE = "sf-part-styles";
11
14
  export declare function usePublishedPartRule(value: string): PublishedPartRule | null;
12
15
  export declare function usePublishedPartKindRule(kind: string): PublishedPartRule | null;
@@ -1 +1 @@
1
- "use client";import{Fragment as d,jsx as o,jsxs as f}from"react/jsx-runtime";import{createContext as c,useContext as s,useId as C,useMemo as R}from"react";import{blockDrawsTextStyle as _,partRuleForKind as h,partRuleForText as y,partStyleCss as p,publishedPartStyles as b}from"../lib/document/part-styles.js";import{styleKeyForPart as g}from"../../format/lib/sections/section-text-kinds.js";const u=c(null),x=c(null),m=c(null);function $({needles:e,styles:t,type:r,children:n}){const i=C(),S=JSON.stringify([i,e,t,r]),l=R(()=>b(e,t,i,a=>g(r,a),a=>_(r,a)),[S]);return l?f(d,{children:[o("style",{href:`${E}${i}-${T(p(l))}`,precedence:P,dangerouslySetInnerHTML:{__html:p(l).replace(/</g,"\\3c ")}}),o(u.Provider,{value:l,children:n})]}):o(d,{children:n})}const P="sf-part-styles",E=`${P}-`;function T(e){let t=2166136261;for(let r=0;r<e.length;r+=1)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function A(e){const t=s(u),r=s(x),n=y(t,e);return n&&n.stamp!==r?n:null}function H(e){return h(s(u),e)}function L({stamp:e,children:t}){return o(x.Provider,{value:e,children:t})}function M({children:e}){const t=s(u);return o(m.Provider,{value:t,children:e})}function k(e){return h(s(m),e)}export{L as ClaimedStamp,P as PART_STYLES_PRECEDENCE,$ as PublishedPartStyles,M as SharedPartKinds,H as usePublishedPartKindRule,A as usePublishedPartRule,k as usePublishedSharedKindRule};
1
+ "use client";import{Fragment as x,jsx as d,jsxs as C}from"react/jsx-runtime";import{createContext as h,useContext as f,useEffect as b,useId as v,useMemo as O,useRef as w}from"react";import{armEntrance as A}from"efficient-shell/format";import{blockDrawsTextStyle as F,partRuleForKind as S,partRuleForText as M,partStyleCss as k,publishedPartStyles as j}from"../lib/document/part-styles.js";import{usePhoneWidth as K}from"./SectionAnimation.js";import{styleKeyForPart as L}from"../../format/lib/sections/section-text-kinds.js";import{NO_MOTIONS as N,PART_LIFT_ATTR as g,drawPartEntrance as D,ensurePartLiftSheet as I,firstOnPage as $,partBoxOf as H,partMotionDrawn as B,partMoves as J}from"../lib/animation/part-motion.js";const p=h(null),E=h(null),R=h(null);function Z({needles:t,styles:n,motions:e=N,type:r,children:i}){const c=v(),l=JSON.stringify([c,t,n,e,r]),s=O(()=>{const u=Object.keys(e).filter(o=>J(e[o]));return j(t,n,c,o=>L(r,o),o=>F(r,o),o=>u.includes(o)?B(e[o]):null,u)},[l]);if(!s)return d(x,{children:i});const a=k(s);return C(x,{children:[a&&d("style",{href:`${W}${c}-${Y(a)}`,precedence:_,dangerouslySetInnerHTML:{__html:a.replace(/</g,"\\3c ")}}),d(p.Provider,{value:s,children:i})]})}const P=new WeakMap;function T(t,n){const e=$(n.filter(r=>r.arm));for(const r of n)r===e||!r.undo||(r.undo(),r.undo=void 0);e?.arm&&!e.undo&&(e.undo=e.arm()),n.some(r=>r.lift)?(I(t.ownerDocument),t.setAttribute(g,"")):t.removeAttribute(g)}function ee(t){const n=w(null),e=t?.motion?.entrance??null,r=t?.motion?.hover==="lift",i=K(n,e!==null),c=JSON.stringify(e);return b(()=>{const l=n.current,s=H(l?.parentElement??null);if(!e&&!r||!l||!s)return;const a=e?()=>{const m=D(s,i?e.phone:e.desktop),y=A(s);return()=>{y?.(),m()}}:null,u=P.get(s)??[];P.set(s,u);const o={element:l,arm:a,lift:r};return u.push(o),T(s,u),()=>{const m=u.indexOf(o);m<0||(u.splice(m,1),o.undo?.(),o.undo=void 0,T(s,u),u.length||P.delete(s))}},[c,r,i]),n}const _="sf-part-styles",W=`${_}-`;function Y(t){let n=2166136261;for(let e=0;e<t.length;e+=1)n^=t.charCodeAt(e),n=Math.imul(n,16777619);return(n>>>0).toString(36)}function te(t){const n=f(p),e=f(E),r=M(n,t);return r&&r.stamp!==e?r:null}function ne(t){return S(f(p),t)}function re({stamp:t,children:n}){return d(E.Provider,{value:t,children:n})}function oe({children:t}){const n=f(p);return d(R.Provider,{value:n,children:t})}function se(t){return S(f(R),t)}export{re as ClaimedStamp,_ as PART_STYLES_PRECEDENCE,Z as PublishedPartStyles,oe as SharedPartKinds,ee as usePartEntrance,ne as usePublishedPartKindRule,te as usePublishedPartRule,se as usePublishedSharedKindRule};
@@ -1 +1 @@
1
- "use client";import{jsx as t,jsxs as c,Fragment as s}from"react/jsx-runtime";import{normaliseReelShape as x,reelRailClass as g,reelSurfaceRailClass as u}from"../../format/lib/reel.js";function h({slides:a,active:r,shape:o,placement:e,ref:n,tone:i="media",label:m}){const l=x(o),p=i==="surface"?{"--overlay-fg":"var(--fg)","--overlay-chrome":"var(--fg)","--overlay-scrim":"var(--site-surface-2)"}:void 0;return c("aside",{ref:n,"aria-label":m??"Featured slides",className:i==="surface"?u(l):g(l,e),style:{color:"var(--overlay-fg)",...p},children:[l==="cards"&&t(b,{slides:a,active:r}),l==="dots"&&t(f,{count:a.length,active:r}),l==="numbers"&&t(v,{count:a.length,active:r}),l==="bar"&&t(N,{count:a.length,active:r}),l==="squares"&&t(y,{count:a.length,active:r}),l==="tabs"&&t($,{slides:a,active:r}),l==="largeTabs"&&t(k,{slides:a,active:r})]})}function b({slides:a,active:r}){return c(s,{children:[t("span",{className:"mb-1 font-mono text-[length:var(--size-label,10px)] uppercase tracking-[0.28em] text-overlay-chrome/55",children:"Reel · pick a slide"}),a.map((o,e)=>{const n=e===r;return c("button",{type:"button","data-idx":e,"aria-pressed":n,"aria-label":`Go to ${o.name||`slide ${e+1}`}`,className:["group flex w-[170px] cursor-pointer flex-col items-start gap-0.5 border bg-overlay-scrim/55 px-3 py-2.5 text-left transition-all motion-reduce:transition-none max-[1100px]:w-[140px]",n?"border-accent bg-overlay-scrim/70":"border-overlay-chrome/15 hover:border-overlay-chrome/45 hover:bg-overlay-scrim/70"].join(" "),children:[t("span",{className:["font-display text-[length:var(--size-body,13px)] font-medium uppercase leading-tight tracking-[-0.01em]",n?"text-accent":"text-overlay-fg"].join(" "),children:o.name||`Slide ${e+1}`}),t("span",{className:"font-mono text-[length:var(--size-label,9px)] uppercase tracking-[0.2em] text-overlay-chrome/55",children:n?"▶ Now playing":o.process||" "})]},e)})]})}function f({count:a,active:r}){return t(s,{children:Array.from({length:a},(o,e)=>t("button",{type:"button","data-idx":e,"aria-pressed":e===r,"aria-label":`Go to slide ${e+1}`,className:`h-2 cursor-pointer rounded-full transition-all motion-reduce:transition-none ${e===r?"w-5 bg-accent":"w-2 bg-overlay-chrome/45 hover:bg-overlay-chrome/70"}`},e))})}function v({count:a,active:r}){return t(s,{children:Array.from({length:a},(o,e)=>t("button",{type:"button","data-idx":e,"aria-pressed":e===r,"aria-label":`Go to slide ${e+1}`,className:`cursor-pointer font-mono text-[length:var(--size-label,11px)] leading-none tracking-[0.06em] transition-colors ${e===r?"text-overlay-fg":"text-overlay-chrome/45 hover:text-overlay-chrome/80"}`,children:String(e+1).padStart(2,"0")},e))})}function y({count:a,active:r}){return t(s,{children:Array.from({length:a},(o,e)=>t("button",{type:"button","data-idx":e,"aria-pressed":e===r,"aria-label":`Go to slide ${e+1}`,className:`grid h-8 w-8 cursor-pointer place-items-center border border-overlay-chrome/25 text-[length:var(--size-label,14px)] font-bold leading-none transition-colors motion-reduce:transition-none ${e===r?"bg-accent text-[color:var(--accent-ink)]":"bg-overlay-scrim/45 text-overlay-chrome/75 hover:text-overlay-chrome"}`,children:e+1},e))})}function N({count:a,active:r}){return t(s,{children:Array.from({length:a},(o,e)=>t("button",{type:"button","data-idx":e,"aria-pressed":e===r,"aria-label":`Go to slide ${e+1}`,className:`h-full flex-1 cursor-pointer transition-colors ${e<=r?"bg-overlay-fg":"bg-overlay-chrome/25"}`},e))})}function $({slides:a,active:r}){return t(s,{children:a.map((o,e)=>{const n=e===r;return t("button",{type:"button","data-idx":e,"aria-pressed":n,className:["flex min-w-[140px] flex-1 cursor-pointer items-end px-6 py-7 text-left transition-colors",e>0?"border-l border-overlay-chrome/15":"",n?"bg-overlay-scrim/70":"hover:bg-overlay-scrim/40"].join(" "),children:t("span",{className:["font-heading3 text-[length:var(--size-headingSmall,24px)] font-medium uppercase leading-tight tracking-[-0.02em]",n?"text-overlay-fg":"text-overlay-chrome/55"].join(" "),children:o.name})},e)})})}const d={label:"text-[length:var(--size-label,13px)]",labelUpTo720:"max-[720px]:text-[length:var(--size-label,11px)]",nameUpTo720:"max-[720px]:text-[length:var(--size-body,15px)]"};function k({slides:a,active:r}){return t(s,{children:a.map((o,e)=>{const n=e===r,i=o.name.trim().split(/\s+/),m=i.slice(0,-1).join(" "),l=i.slice(-1)[0]??"";return c("button",{type:"button","data-idx":e,"aria-pressed":n,className:["group relative grid flex-1 cursor-pointer grid-cols-[auto_1fr] items-end gap-5 px-6 py-8 text-left transition-colors",e<a.length-1?"border-r border-line":"","max-[720px]:grid-cols-[auto_1fr] max-[720px]:items-center max-[720px]:gap-2 max-[720px]:px-3 max-[720px]:py-3",n?"bg-surface":"hover:bg-fg/[0.04]"].join(" "),children:[t("span",{className:[`pb-2 font-mono ${d.label} tracking-[0.3em] max-[720px]:pb-0 ${d.labelUpTo720} max-[720px]:tracking-[0.24em]`,n?"text-accent":"text-fg-dim group-hover:text-accent"].join(" "),children:String.fromCharCode(65+e%26)}),c("span",{className:`font-heading2 text-[length:min(var(--size-headingMedium,clamp(28px,3.6vw,48px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.02em] ${d.nameUpTo720}`,children:[m?c(s,{children:[m," "]}):null,t("em",{className:"font-normal italic text-accent",children:l})]}),n&&t("span",{className:"pointer-events-none absolute inset-x-0 -bottom-px h-0.5 bg-accent"})]},e)})})}export{h as default};
1
+ "use client";import{jsx as t,jsxs as c,Fragment as s}from"react/jsx-runtime";import{listNumber as x}from"../../format/lib/content/list-number.js";import{normaliseReelShape as u,reelRailClass as g,reelSurfaceRailClass as h}from"../../format/lib/reel.js";function b({slides:a,active:r,shape:o,placement:e,ref:n,tone:i="media",label:m}){const l=u(o),d=i==="surface"?{"--overlay-fg":"var(--fg)","--overlay-chrome":"var(--fg)","--overlay-scrim":"var(--site-surface-2)"}:void 0;return c("aside",{ref:n,"aria-label":m??"Featured slides",className:i==="surface"?h(l):g(l,e),style:{color:"var(--overlay-fg)",...d},children:[l==="cards"&&t(f,{slides:a,active:r}),l==="dots"&&t(v,{count:a.length,active:r}),l==="numbers"&&t(y,{count:a.length,active:r}),l==="bar"&&t($,{count:a.length,active:r}),l==="squares"&&t(N,{count:a.length,active:r}),l==="tabs"&&t(k,{slides:a,active:r}),l==="largeTabs"&&t(j,{slides:a,active:r})]})}function f({slides:a,active:r}){return c(s,{children:[t("span",{className:"mb-1 font-mono text-[length:var(--size-label,10px)] uppercase tracking-[0.28em] text-overlay-chrome/55",children:"Reel · pick a slide"}),a.map((o,e)=>{const n=e===r;return c("button",{type:"button","data-idx":e,"aria-pressed":n,"aria-label":`Go to ${o.name||`slide ${e+1}`}`,className:["group flex w-[170px] cursor-pointer flex-col items-start gap-0.5 border bg-overlay-scrim/55 px-3 py-2.5 text-left transition-all motion-reduce:transition-none max-[1100px]:w-[140px]",n?"border-accent bg-overlay-scrim/70":"border-overlay-chrome/15 hover:border-overlay-chrome/45 hover:bg-overlay-scrim/70"].join(" "),children:[t("span",{className:["font-display text-[length:var(--size-body,13px)] font-medium uppercase leading-tight tracking-[-0.01em]",n?"text-accent":"text-overlay-fg"].join(" "),children:o.name||`Slide ${e+1}`}),t("span",{className:"font-mono text-[length:var(--size-label,9px)] uppercase tracking-[0.2em] text-overlay-chrome/55",children:n?"▶ Now playing":o.process||" "})]},e)})]})}function v({count:a,active:r}){return t(s,{children:Array.from({length:a},(o,e)=>t("button",{type:"button","data-idx":e,"aria-pressed":e===r,"aria-label":`Go to slide ${e+1}`,className:`h-2 cursor-pointer rounded-full transition-all motion-reduce:transition-none ${e===r?"w-5 bg-accent":"w-2 bg-overlay-chrome/45 hover:bg-overlay-chrome/70"}`},e))})}function y({count:a,active:r}){return t(s,{children:Array.from({length:a},(o,e)=>t("button",{type:"button","data-idx":e,"aria-pressed":e===r,"aria-label":`Go to slide ${e+1}`,className:`cursor-pointer font-mono text-[length:var(--size-label,11px)] leading-none tracking-[0.06em] transition-colors ${e===r?"text-overlay-fg":"text-overlay-chrome/45 hover:text-overlay-chrome/80"}`,children:x(e)},e))})}function N({count:a,active:r}){return t(s,{children:Array.from({length:a},(o,e)=>t("button",{type:"button","data-idx":e,"aria-pressed":e===r,"aria-label":`Go to slide ${e+1}`,className:`grid h-8 w-8 cursor-pointer place-items-center border border-overlay-chrome/25 text-[length:var(--size-label,14px)] font-bold leading-none transition-colors motion-reduce:transition-none ${e===r?"bg-accent text-[color:var(--accent-ink)]":"bg-overlay-scrim/45 text-overlay-chrome/75 hover:text-overlay-chrome"}`,children:e+1},e))})}function $({count:a,active:r}){return t(s,{children:Array.from({length:a},(o,e)=>t("button",{type:"button","data-idx":e,"aria-pressed":e===r,"aria-label":`Go to slide ${e+1}`,className:`h-full flex-1 cursor-pointer transition-colors ${e<=r?"bg-overlay-fg":"bg-overlay-chrome/25"}`},e))})}function k({slides:a,active:r}){return t(s,{children:a.map((o,e)=>{const n=e===r;return t("button",{type:"button","data-idx":e,"aria-pressed":n,className:["flex min-w-[140px] flex-1 cursor-pointer items-end px-6 py-7 text-left transition-colors",e>0?"border-l border-overlay-chrome/15":"",n?"bg-overlay-scrim/70":"hover:bg-overlay-scrim/40"].join(" "),children:t("span",{className:["font-heading3 text-[length:var(--size-headingSmall,24px)] font-medium uppercase leading-tight tracking-[-0.02em]",n?"text-overlay-fg":"text-overlay-chrome/55"].join(" "),children:o.name})},e)})})}const p={label:"text-[length:var(--size-label,13px)]",labelUpTo720:"max-[720px]:text-[length:var(--size-label,11px)]",nameUpTo720:"max-[720px]:text-[length:var(--size-body,15px)]"};function j({slides:a,active:r}){return t(s,{children:a.map((o,e)=>{const n=e===r,i=o.name.trim().split(/\s+/),m=i.slice(0,-1).join(" "),l=i.slice(-1)[0]??"";return c("button",{type:"button","data-idx":e,"aria-pressed":n,className:["group relative grid flex-1 cursor-pointer grid-cols-[auto_1fr] items-end gap-5 px-6 py-8 text-left transition-colors",e<a.length-1?"border-r border-line":"","max-[720px]:grid-cols-[auto_1fr] max-[720px]:items-center max-[720px]:gap-2 max-[720px]:px-3 max-[720px]:py-3",n?"bg-surface":"hover:bg-fg/[0.04]"].join(" "),children:[t("span",{className:[`pb-2 font-mono ${p.label} tracking-[0.3em] max-[720px]:pb-0 ${p.labelUpTo720} max-[720px]:tracking-[0.24em]`,n?"text-accent":"text-fg-dim group-hover:text-accent"].join(" "),children:String.fromCharCode(65+e%26)}),c("span",{className:`font-heading2 text-[length:min(var(--size-headingMedium,clamp(28px,3.6vw,48px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.02em] ${p.nameUpTo720}`,children:[m?c(s,{children:[m," "]}):null,t("em",{className:"font-normal italic text-accent",children:l})]}),n&&t("span",{className:"pointer-events-none absolute inset-x-0 -bottom-px h-0.5 bg-accent"})]},e)})})}export{b as default};
@@ -1,10 +1,14 @@
1
- import { type ReactNode } from "react";
1
+ import { type CSSProperties, type ReactNode } from "react";
2
2
  import { type EntranceValue } from "efficient-shell/format";
3
- export declare const ENTRANCE_WRAPPER_CLASS = "sf-entrance";
4
- export declare function SectionAnimation({ desktop, phone, editing, children, }: {
3
+ import { ENTRANCE_WRAPPER_CLASS } from "../lib/animation/entrance.js";
4
+ export { ENTRANCE_WRAPPER_CLASS };
5
+ export declare function SectionAnimation({ desktop, phone, editing, boxClass, boxAttrs, boxStyle, children, }: {
5
6
  desktop: EntranceValue;
6
7
  phone: EntranceValue;
7
8
  editing: boolean;
9
+ boxClass?: string;
10
+ boxAttrs?: Readonly<Record<string, string>>;
11
+ boxStyle?: CSSProperties;
8
12
  children: ReactNode;
9
13
  }): import("react").JSX.Element;
10
14
  export type SeenEntrance = {
@@ -18,3 +22,6 @@ export declare const entranceReplay: {
18
22
  seen: SeenEntrance;
19
23
  };
20
24
  };
25
+ export declare function usePhoneWidth(ref: {
26
+ current: HTMLElement | null;
27
+ }, enabled?: boolean): boolean;
@@ -1 +1 @@
1
- "use client";import{jsx as N}from"react/jsx-runtime";import{useEffect as m,useRef as p,useState as S}from"react";import{armEntrance as x,entranceAttrs as g,playEntrance as A}from"efficient-shell/format";import{PHONE_MEDIA as O}from"../lib/content/view-values.js";import{useCellLayer as P}from"./InBoxContext.js";const v="sf-entrance";function C({desktop:e,phone:n,editing:s,children:o}){const t=p(null),r=P(),c=R(t),y=c?n:e,{attrs:h,style:u}=g(y),f=p(i.seed(e,n)),d=JSON.stringify(e),E=JSON.stringify(n);return m(()=>{const a=t.current;if(a){if(s){const l=i.next(f.current,e,n,c);f.current=l.seen,l.play&&A(a);return}return x(a)}},[d,E,c,s]),N("div",{ref:t,className:`${v}${r.fill}`,...h,...Object.keys(u).length?{style:u}:{},children:r.inner(o)})}const i={seed(e,n){return{desktop:JSON.stringify(e),phone:JSON.stringify(n)}},next(e,n,s,o){const t=i.seed(n,s);return{play:o?t.phone!==e.phone:t.desktop!==e.desktop,seen:t}}};function R(e){const[n,s]=S(!1);return m(()=>{const o=e.current?.ownerDocument?.defaultView;if(!o?.matchMedia)return;const t=o.matchMedia(O),r=()=>s(t.matches);return r(),t.addEventListener("change",r),()=>t.removeEventListener("change",r)},[e]),n}export{v as ENTRANCE_WRAPPER_CLASS,C as SectionAnimation,i as entranceReplay};
1
+ "use client";import{jsx as x}from"react/jsx-runtime";import{useEffect as d,useRef as h,useState as A}from"react";import{armEntrance as O,entranceAttrs as P,playEntrance as v}from"efficient-shell/format";import{PHONE_MEDIA as R}from"../lib/content/view-values.js";import{useCellLayer as J}from"./InBoxContext.js";import{ENTRANCE_WRAPPER_CLASS as E}from"../lib/animation/entrance.js";function D({desktop:e,phone:t,editing:o,boxClass:s,boxAttrs:n,boxStyle:r,children:c}){const i=h(null),l=J(),u=L(i),w=u?t:e,{attrs:N,style:p}=P(w),m=h(f.seed(e,t)),S=JSON.stringify(e),g=JSON.stringify(t);return d(()=>{const a=i.current;if(a){if(o){const y=f.next(m.current,e,t,u);m.current=y.seen,y.play&&v(a);return}return O(a)}},[S,g,u,o]),x("div",{ref:i,className:`${E}${l.fill}${s?` ${s}`:""}`,...n,...N,...Object.keys(p).length||r?{style:{...r,...p}}:{},children:l.inner(c)})}const f={seed(e,t){return{desktop:JSON.stringify(e),phone:JSON.stringify(t)}},next(e,t,o,s){const n=f.seed(t,o);return{play:s?n.phone!==e.phone:n.desktop!==e.desktop,seen:n}}};function L(e,t=!0){const[o,s]=A(!1);return d(()=>{if(!t)return;const n=e.current?.ownerDocument?.defaultView??(typeof window>"u"?null:window);if(!n?.matchMedia)return;const r=n.matchMedia(R),c=()=>s(r.matches);return c(),r.addEventListener("change",c),()=>r.removeEventListener("change",c)},[e,t]),o}export{E as ENTRANCE_WRAPPER_CLASS,D as SectionAnimation,f as entranceReplay,L as usePhoneWidth};
@@ -6,6 +6,7 @@ interface TextProps {
6
6
  pad?: PadValues;
7
7
  ownWidth?: boolean;
8
8
  text: string;
9
+ number?: string;
9
10
  align: Align;
10
11
  alignPhone?: unknown;
11
12
  tone: Tone;
@@ -15,5 +16,5 @@ interface TextProps {
15
16
  hero?: boolean;
16
17
  }
17
18
  export declare function headingLevelOfStyle(id: string): HeadingLevel;
18
- export default function Text({ text, align, alignPhone, tone, contained, hero, pad, tag, textStyle, ownWidth }: TextProps): import("react").JSX.Element;
19
+ export default function Text({ text, number, align, alignPhone, tone, contained, hero, pad, tag, textStyle, ownWidth }: TextProps): import("react").JSX.Element;
19
20
  export {};
@@ -1 +1 @@
1
- import{jsx as a}from"react/jsx-runtime";import x from"./BlockFrame.js";import{renderGold as m,renderHeadline as N,splitParagraphs as $}from"./goldPhrases.js";import{headingLook as T}from"./Heading.js";import{alignPhoneClass as v}from"../../format/lib/content/block-align.js";import{textTagOf as S}from"../../format/lib/content/text-tag.js";import{isTextStyleId as L}from"../lib/document/part-styles.js";import{faceClassOf as h}from"../../format/lib/text-style-face.js";const s={bodyUpTo800:"max-[800px]:text-[length:var(--size-body,14px)]",bodySmall:"text-[length:var(--size-body,15px)]",bodyLarge:"text-[length:var(--size-body,17px)]",label:"text-[length:var(--size-label,13px)]"};function O(e,l){const n=v("place",e,l);return n?` ${n}`:""}const z={left:"text-left",center:"text-left mx-auto",right:"text-left ml-auto"},C=`max-w-[380px] ${s.bodySmall} leading-[1.5] opacity-80 ${s.bodyUpTo800}`,E={default:"text-fg",dim:"text-fg-dim"};function k(e){return String(Math.min(Number(e.slice(8)),6))}function w({text:e,align:l,alignPhone:n,tone:g,contained:d,hero:u=!1,pad:o,tag:y,textStyle:f,ownWidth:b=!1}){if(u)return a("p",{className:C,children:m(e)});const t=L(f)?f:void 0,p=`${t?`${h({id:t})} `:""}${b?"":"max-w-[680px] "}whitespace-pre-line ${t==="body-5"?s.label:s.bodyLarge} leading-[1.7] ${z[l]}${O(l,n)} ${E[g]}`,i=S(y);if(t?.startsWith("heading-")){const c=k(t),r=T(c,h({id:t}));return a(x,{contained:d,className:"py-6",pad:o?{values:o,frame:24}:void 0,children:a(i,{className:r.className,style:r.style,children:N(e.trim(),!1)})})}return a(x,{contained:d,className:"py-4",pad:o?{values:o,frame:16}:void 0,children:i==="p"?$(e).map((c,r)=>a("p",{className:p,children:m(c)},r)):a(i,{className:p,children:m(e.trim())})})}export{w as default,k as headingLevelOfStyle};
1
+ import{jsx as a,jsxs as $}from"react/jsx-runtime";import h from"./BlockFrame.js";import{renderGold as m,renderHeadline as v,splitParagraphs as L}from"./goldPhrases.js";import{headingLook as S}from"./Heading.js";import{alignPhoneClass as E}from"../../format/lib/content/block-align.js";import{textTagOf as _}from"../../format/lib/content/text-tag.js";import{KICKER_NUMBER_ATTR as k,kickerLead as C}from"../lib/content/page-contents.js";import{isTextStyleId as O}from"../lib/document/part-styles.js";import{faceClassOf as g}from"../../format/lib/text-style-face.js";const r={bodyUpTo800:"max-[800px]:text-[length:var(--size-body,14px)]",bodySmall:"text-[length:var(--size-body,15px)]",bodyLarge:"text-[length:var(--size-body,17px)]",label:"text-[length:var(--size-label,13px)]"};function j(e,s){const l=E("place",e,s);return l?` ${l}`:""}const z={left:"text-left",center:"text-left mx-auto",right:"text-left ml-auto"},A=`max-w-[380px] ${r.bodySmall} leading-[1.5] opacity-80 ${r.bodyUpTo800}`,I={default:"text-fg",dim:"text-fg-dim"};function R(e){return String(Math.min(Number(e.slice(8)),6))}function w({text:e,number:s,align:l,alignPhone:u,tone:y,contained:f,hero:b=!1,pad:o,tag:N,textStyle:p,ownWidth:T=!1}){if(b)return a("p",{className:A,children:m(e)});const i=s?a("span",{[k]:"",children:C(s)}):void 0,t=O(p)?p:void 0,x=`${t?`${g({id:t})} `:""}${T?"":"max-w-[680px] "}whitespace-pre-line ${t==="body-5"?r.label:r.bodyLarge} leading-[1.7] ${z[l]}${j(l,u)} ${I[y]}`,d=_(N);if(t?.startsWith("heading-")){const c=R(t),n=S(c,g({id:t}));return a(h,{contained:f,className:"py-6",pad:o?{values:o,frame:24}:void 0,children:$(d,{className:n.className,style:n.style,children:[i,v(e.trim(),!1)]})})}return a(h,{contained:f,className:"py-4",pad:o?{values:o,frame:16}:void 0,children:d==="p"?L(e).map((c,n)=>a("p",{className:x,children:m(c,!1,n===0?i:void 0)},n)):a(d,{className:x,children:m(e.trim(),!1,i)})})}export{w as default,R as headingLevelOfStyle};
@@ -1 +1 @@
1
- import{jsx as e,Fragment as N,jsxs as i}from"react/jsx-runtime";import{SiteLink as j}from"../lib/site-runtime.js";import{stripMarkup as T}from"../../format/lib/markup.js";import _ from"./Placeholder.js";import C from"./SectionEyebrow.js";import{renderGold as m,renderHeadline as w,splitParagraphs as E}from"./goldPhrases.js";import{CentreRailDot as I,CentreRailLine as U,railSideIsLeft as F,SPINE_LINE_CLASS as P,SpineDot as D}from"./TimelineRail.js";import{scrim as H}from"../../format/lib/content/scrim.js";const n={bodyUpTo800:"max-[800px]:text-[length:var(--size-body,16px)]",headingSmallUpTo800:"max-[800px]:text-[length:var(--size-headingSmall,20px)]",bodySmall:"text-[length:var(--size-body,14px)]",bodyLarge:"text-[length:var(--size-body,17px)]",headingSmall:"text-[length:var(--size-headingSmall,24px)]",labelSmall:"text-[length:var(--size-label,11px)]",labelLarge:"text-[length:var(--size-label,13px)]"};function y({eyebrow:a,title:t,intro:r,center:s=!1}){return i(N,{children:[a&&e(C,{text:a,size:12}),t&&e("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(40px,5vw,76px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.94] tracking-[-0.03em] text-fg",children:w(t)}),r&&e("p",{className:[`font-display ${n.bodySmall} leading-[1.6] text-fg-dim`,s?"max-w-[520px]":"max-w-[360px]"].join(" "),children:m(r,!0)})]})}function S({cta:a,className:t=""}){return a?.text?i(j,{href:a.href,className:["group inline-flex items-center gap-3.5 border border-line px-5 py-4",`font-mono ${n.labelLarge} uppercase tracking-[0.3em] text-fg`,"transition-colors hover:border-accent hover:text-accent",t].join(" "),children:[m(a.text),e("span",{"aria-hidden":!0,className:"text-accent transition-transform group-hover:translate-x-[3px]",children:"→"})]}):null}function z({src:a,caption:t,meta:r,aspectClass:s,editing:x,sizes:c="100vw",className:o=""}){return!a&&!x?null:i("figure",{className:["relative overflow-hidden border border-line bg-surface",s,o].join(" "),children:[e(_,{label:t||"Image",src:a,alt:T(t??""),sizes:c}),e("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0",style:{background:`linear-gradient(180deg, transparent 55%, ${H(.75)} 100%)`}}),(t||r)&&i("figcaption",{className:`absolute inset-x-0 bottom-0 z-[1] flex items-center justify-between gap-3 px-4 py-3 font-mono ${n.labelSmall} uppercase tracking-[0.24em] text-overlay-fg/85`,children:[e("span",{children:t?m(t):""}),r&&e("span",{className:"text-accent",children:m(r)})]})]})}function g({entry:a}){const t=E(a.body??"");return i(N,{children:[a.title&&e("h3",{className:`mb-3.5 font-heading3 ${n.headingSmall} font-medium uppercase tracking-[-0.02em] text-fg ${n.headingSmallUpTo800}`,children:w(a.title)}),t.length>0&&e("div",{className:`space-y-3.5 font-display ${n.bodyLarge} leading-[1.6] ${n.bodyUpTo800}`,children:t.map((r,s)=>e("p",{className:s===0?"text-fg":"text-fg-dim",children:m(r,!0)},s))})]})}function R({layout:a="split",eyebrow:t,title:r,intro:s,imageSrc:x,imageCaption:c,imageMeta:o,cta:h,entries:k,padTop:f,padBottom:u,editing:b}={}){const L=typeof f=="number"?f:120,$=typeof u=="number"?u:120,d=(k??[]).filter(l=>(l.date??"").trim()||(l.title??"").trim()||(l.body??"").trim());return e("section",{className:"relative z-[2] bg-bg",children:e("div",{className:"mx-auto max-w-[var(--sf-site-width,1600px)] border-b border-line px-[var(--sf-site-gutter,40px)] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]",style:{paddingTop:L,paddingBottom:$},children:a==="split"?i("div",{className:"grid grid-cols-[1fr_1.4fr] gap-20 max-[1100px]:grid-cols-1 max-[1100px]:gap-12",children:[i("aside",{className:"sticky top-[120px] flex flex-col gap-6 self-start max-[1100px]:static",children:[e(y,{eyebrow:t,title:r,intro:s}),e(z,{src:x,caption:c,meta:o,aspectClass:"mt-1 aspect-[4/5]",sizes:"(max-width: 1100px) 100vw, 420px",editing:b}),e(S,{cta:h,className:"mt-2 self-start"})]}),e("ol",{className:"flex flex-col gap-12",children:d.map((l,p)=>i("li",{className:"grid grid-cols-[80px_1fr] items-start gap-6 max-[700px]:grid-cols-1 max-[700px]:gap-2",children:[e("span",{className:`pt-1.5 font-mono ${n.labelLarge} tracking-[0.24em] text-accent`,children:l.date?m(l.date):""}),e("div",{className:"max-w-[640px]",children:e(g,{entry:l})})]},p))})]}):i("div",{children:[i("header",{className:"mx-auto flex max-w-[760px] flex-col items-center gap-6 text-center",children:[e(y,{eyebrow:t,title:r,intro:s,center:!0}),e(S,{cta:h})]}),e(z,{src:x,caption:c,meta:o,aspectClass:"mx-auto mt-12 aspect-[16/9] w-full max-w-[900px]",sizes:"(max-width: 900px) 100vw, 900px",editing:b}),a==="spine"?e("ol",{className:"relative mx-auto mt-16 max-w-[760px]",children:d.map((l,p)=>i("li",{className:`relative ${P} pb-12 pl-10 last:pb-0 max-[700px]:pl-8`,children:[e(D,{}),e("div",{className:`mb-2 font-mono ${n.labelLarge} tracking-[0.24em] text-accent`,children:l.date?m(l.date):""}),e("div",{className:"max-w-[640px]",children:e(g,{entry:l})})]},p))}):i("ol",{className:"relative mx-auto mt-16 max-w-[1000px]",children:[e(U,{}),d.map((l,p)=>{const v=F(p);return i("li",{className:"relative mb-14 pl-8 last:mb-0 min-[801px]:grid min-[801px]:grid-cols-2 min-[801px]:gap-16 min-[801px]:pl-0",children:[e(I,{}),i("div",{className:v?"min-[801px]:col-start-1 min-[801px]:pr-8 min-[801px]:text-right":"min-[801px]:col-start-2 min-[801px]:pl-8",children:[e("div",{className:`mb-2 font-mono ${n.labelLarge} tracking-[0.24em] text-accent`,children:l.date?m(l.date):""}),e("div",{className:["max-w-[520px] max-[800px]:max-w-none",v?"min-[801px]:ml-auto":""].join(" "),children:e(g,{entry:l})})]})]},p)})]})]})})})}export{R as default};
1
+ import{jsx as e,Fragment as N,jsxs as i}from"react/jsx-runtime";import{SiteLink as T}from"../lib/site-runtime.js";import{stripMarkup as _}from"../../format/lib/markup.js";import{STICKY_ASIDE_CLASS as j}from"../../format/lib/content/sticky-aside.js";import C from"./Placeholder.js";import E from"./SectionEyebrow.js";import{renderGold as m,renderHeadline as w,splitParagraphs as I}from"./goldPhrases.js";import{CentreRailDot as U,CentreRailLine as A,railSideIsLeft as D,SPINE_LINE_CLASS as F,SpineDot as P}from"./TimelineRail.js";import{scrim as H}from"../../format/lib/content/scrim.js";const n={bodyUpTo800:"max-[800px]:text-[length:var(--size-body,16px)]",headingSmallUpTo800:"max-[800px]:text-[length:var(--size-headingSmall,20px)]",bodySmall:"text-[length:var(--size-body,14px)]",bodyLarge:"text-[length:var(--size-body,17px)]",headingSmall:"text-[length:var(--size-headingSmall,24px)]",labelSmall:"text-[length:var(--size-label,11px)]",labelLarge:"text-[length:var(--size-label,13px)]"};function S({eyebrow:a,title:t,intro:r,center:s=!1}){return i(N,{children:[a&&e(E,{text:a,size:12}),t&&e("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(40px,5vw,76px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.94] tracking-[-0.03em] text-fg",children:w(t)}),r&&e("p",{className:[`font-display ${n.bodySmall} leading-[1.6] text-fg-dim`,s?"max-w-[520px]":"max-w-[360px]"].join(" "),children:m(r,!0)})]})}function y({cta:a,className:t=""}){return a?.text?i(T,{href:a.href,className:["group inline-flex items-center gap-3.5 border border-line px-5 py-4",`font-mono ${n.labelLarge} uppercase tracking-[0.3em] text-fg`,"transition-colors hover:border-accent hover:text-accent",t].join(" "),children:[m(a.text),e("span",{"aria-hidden":!0,className:"text-accent transition-transform group-hover:translate-x-[3px]",children:"→"})]}):null}function z({src:a,caption:t,meta:r,aspectClass:s,editing:x,sizes:c="100vw",className:o=""}){return!a&&!x?null:i("figure",{className:["relative overflow-hidden border border-line bg-surface",s,o].join(" "),children:[e(C,{label:t||"Image",src:a,alt:_(t??""),sizes:c}),e("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0",style:{background:`linear-gradient(180deg, transparent 55%, ${H(.75)} 100%)`}}),(t||r)&&i("figcaption",{className:`absolute inset-x-0 bottom-0 z-[1] flex items-center justify-between gap-3 px-4 py-3 font-mono ${n.labelSmall} uppercase tracking-[0.24em] text-overlay-fg/85`,children:[e("span",{children:t?m(t):""}),r&&e("span",{className:"text-accent",children:m(r)})]})]})}function g({entry:a}){const t=I(a.body??"");return i(N,{children:[a.title&&e("h3",{className:`mb-3.5 font-heading3 ${n.headingSmall} font-medium uppercase tracking-[-0.02em] text-fg ${n.headingSmallUpTo800}`,children:w(a.title)}),t.length>0&&e("div",{className:`space-y-3.5 font-display ${n.bodyLarge} leading-[1.6] ${n.bodyUpTo800}`,children:t.map((r,s)=>e("p",{className:s===0?"text-fg":"text-fg-dim",children:m(r,!0)},s))})]})}function R({layout:a="split",eyebrow:t,title:r,intro:s,imageSrc:x,imageCaption:c,imageMeta:o,cta:f,entries:L,padTop:h,padBottom:u,editing:b}={}){const $=typeof h=="number"?h:120,k=typeof u=="number"?u:120,d=(L??[]).filter(l=>(l.date??"").trim()||(l.title??"").trim()||(l.body??"").trim());return e("section",{className:"relative z-[2] bg-bg",children:e("div",{className:"mx-auto max-w-[var(--sf-site-width,1600px)] border-b border-line px-[var(--sf-site-gutter,40px)] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]",style:{paddingTop:$,paddingBottom:k},children:a==="split"?i("div",{className:"grid grid-cols-[1fr_1.4fr] gap-20 max-[1100px]:grid-cols-1 max-[1100px]:gap-12",children:[i("aside",{className:`${j} flex flex-col gap-6 self-start max-[1100px]:static`,children:[e(S,{eyebrow:t,title:r,intro:s}),e(z,{src:x,caption:c,meta:o,aspectClass:"mt-1 aspect-[4/5]",sizes:"(max-width: 1100px) 100vw, 420px",editing:b}),e(y,{cta:f,className:"mt-2 self-start"})]}),e("ol",{className:"flex flex-col gap-12",children:d.map((l,p)=>i("li",{className:"grid grid-cols-[80px_1fr] items-start gap-6 max-[700px]:grid-cols-1 max-[700px]:gap-2",children:[e("span",{className:`pt-1.5 font-mono ${n.labelLarge} tracking-[0.24em] text-accent`,children:l.date?m(l.date):""}),e("div",{className:"max-w-[640px]",children:e(g,{entry:l})})]},p))})]}):i("div",{children:[i("header",{className:"mx-auto flex max-w-[760px] flex-col items-center gap-6 text-center",children:[e(S,{eyebrow:t,title:r,intro:s,center:!0}),e(y,{cta:f})]}),e(z,{src:x,caption:c,meta:o,aspectClass:"mx-auto mt-12 aspect-[16/9] w-full max-w-[900px]",sizes:"(max-width: 900px) 100vw, 900px",editing:b}),a==="spine"?e("ol",{className:"relative mx-auto mt-16 max-w-[760px]",children:d.map((l,p)=>i("li",{className:`relative ${F} pb-12 pl-10 last:pb-0 max-[700px]:pl-8`,children:[e(P,{}),e("div",{className:`mb-2 font-mono ${n.labelLarge} tracking-[0.24em] text-accent`,children:l.date?m(l.date):""}),e("div",{className:"max-w-[640px]",children:e(g,{entry:l})})]},p))}):i("ol",{className:"relative mx-auto mt-16 max-w-[1000px]",children:[e(A,{}),d.map((l,p)=>{const v=D(p);return i("li",{className:"relative mb-14 pl-8 last:mb-0 min-[801px]:grid min-[801px]:grid-cols-2 min-[801px]:gap-16 min-[801px]:pl-0",children:[e(U,{}),i("div",{className:v?"min-[801px]:col-start-1 min-[801px]:pr-8 min-[801px]:text-right":"min-[801px]:col-start-2 min-[801px]:pl-8",children:[e("div",{className:`mb-2 font-mono ${n.labelLarge} tracking-[0.24em] text-accent`,children:l.date?m(l.date):""}),e("div",{className:["max-w-[520px] max-[800px]:max-w-none",v?"min-[801px]:ml-auto":""].join(" "),children:e(g,{entry:l})})]})]},p)})]})]})})})}export{R as default};
@@ -1,6 +1,6 @@
1
1
  import { type ReactNode } from "react";
2
2
  import { type ShopMarkupNode } from "../../format/lib/markup.js";
3
- export declare function renderGold(value: string, italic?: boolean): ReactNode;
3
+ export declare function renderGold(value: string, italic?: boolean, lead?: ReactNode): ReactNode;
4
4
  export declare function renderMarkupNodes(nodes: readonly ShopMarkupNode[], italic?: boolean): ReactNode;
5
5
  export declare function renderChrome(value: string): ReactNode;
6
6
  export declare function renderHeadline(value: string, italic?: boolean): ReactNode;
@@ -1,2 +1,2 @@
1
- import{jsx as t,jsxs as u}from"react/jsx-runtime";import{Fragment as d}from"react";import{parseHexColor as L}from"efficient-shell/format";import{linePrefix as N,storefrontLines as _}from"../../format/lib/markup.js";import{COLOUR_TOKEN as h,WORD_STYLE_ATTR as S,WORD_STYLE_BY_KIND as g}from"../../format/lib/word-styles.js";import a from"./PartStyledText.js";import{withRMark as f}from"./RMark.js";function E(e,n=!1){const s=m(n),r=_(e);if(r.length===1){const[c]=r,l=N(c),b=l?O(l,c.children):c.children;return t(a,{value:e,children:o(b,s)})}const i=[];return r.forEach((c,l)=>{if(c.bullet){i.push(t("span",{"data-sf-bullet":"",className:T,children:o(c.children,s)},l));return}if(c.number!=null){i.push(u("span",{"data-sf-number":c.number,className:C,children:[u("span",{className:R,children:[c.number,"."]}),o(c.children,s)]},l));return}l>0&&!k(r[l-1])&&i.push(t("br",{},`br${l}`)),i.push(t(d,{children:o(c.children,s)},l))}),t(a,{value:e,children:i})}const T="relative block pl-6 before:absolute before:left-1.5 before:font-bold before:text-accent before:content-['·']",C="relative block pl-[2em]",R="absolute left-0 w-[1.6em] text-right tabular-nums";function k(e){return e.bullet||e.number!=null}const w="text-accent underline underline-offset-[0.18em]";function O(e,n){const[s,...r]=n;return s?.kind==="text"?[{kind:"text",text:`${e}${s.text}`},...r]:[{kind:"text",text:e},...n]}function A(e){if(e)return L(e)===e.toLowerCase()?e:Object.hasOwn(h,e)?h[e]:void 0}function o(e,n){const s=[];let r=!1;return e.forEach((i,c)=>{if(i.kind==="text"){s.push(t("span",{children:f(i.text)},c)),r=!0;return}r||s.push(t("span",{},`e${c}`)),s.push(x(i,c,n)),r=!1}),r||s.push(t("span",{},"end")),s}function p(e,n){return e.length===1&&e[0].kind==="text"?f(e[0].text):e.map((s,r)=>s.kind==="text"?t(d,{children:f(s.text)},r):x(s,r,n))}function $(e,n=!1){return o(e,m(n))}function m(e){return e?"font-normal italic text-accent":"not-italic text-accent"}function D(e){return t(a,{value:e,children:t("span",{children:e})})}function x(e,n,s){if(e.kind==="link")return t("a",{href:e.href,className:w,children:p(e.children,s)},n);const r=p(e.children,s),i=g[e.kind];if(i)return t("span",{[S]:i,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 c=A(e.color);return c?t("span",{style:{color:c},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 P(e,n=!0){const s=e.split(`
2
- `);return t(a,{value:e,children:s.map((r,i)=>u("span",{children:[E(r,n),i<s.length-1?t("br",{}):null]},i))})}function Y(e){return e.split(/\n\s*\n/).map(n=>n.trim()).filter(Boolean)}export{D as renderChrome,E as renderGold,P as renderHeadline,$ as renderMarkupNodes,Y as splitParagraphs};
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,4 +1,5 @@
1
1
  import { type EntranceValue } from "efficient-shell/format";
2
+ export declare const ENTRANCE_WRAPPER_CLASS = "sf-entrance";
2
3
  export declare const ENTRANCE_KEYS: {
3
4
  readonly kind: "entrance";
4
5
  readonly from: "entranceFrom";
@@ -1 +1 @@
1
- import{phoneKey as c}from"efficient-easel/draw";import{readEntrance as d}from"efficient-shell/format";import{SECTION_THEME_EXCLUDED as l}from"../../../format/lib/content/section-surface.js";const i={kind:"entrance",from:"entranceFrom",duration:"entranceDuration",delay:"entranceDelay"},u="sectionAnimation",a=e=>e!=null&&e!=="";function f(e,n){const t=e[i[n]];return n==="kind"&&!a(t)?e[u]:t}function o(e,n,t){if(t==="phone"){const r=e[c(i[n])];if(a(r))return r}return f(e,n)}function s(e,n){return d(o(e,"kind",n),o(e,"from",n),o(e,"duration",n),o(e,"delay",n))}function b(e){const n=s(e,"desktop"),t=s(e,"phone");return n.kind==="none"&&t.kind==="none"?null:{desktop:n,phone:t}}const m={...Object.fromEntries([...l].map(e=>[e,"a root position: sticky bar; an outer box becomes its sticky containing block and the pin collapses (the same fact every wrapper pass excludes it for, lib/content/section-surface)"])),HeroSlide:"a slide is a direct child of the Hero's transform track ([&>*]:basis-full); a wrapper would take its width, and the Hero already moves one slide in at a time",HeroGroup:"a slide box is placed by grid-item properties on its own root (--sf-hg-row, justify-self); a wrapper becomes the grid item and the box loses its anchor (lib/document/blocks/general/HeroGroup/meta)"},h=new Set(Object.keys(m));export{h as ENTRANCE_EXCLUDED,m as ENTRANCE_EXCLUDED_WHY,i as ENTRANCE_KEYS,u as LEGACY_ENTRANCE_KEY,b as entranceDrawn,s as entranceOf};
1
+ import{phoneKey as c}from"efficient-easel/draw";import{readEntrance as d}from"efficient-shell/format";import{SECTION_THEME_EXCLUDED as l}from"../../../format/lib/content/section-surface.js";const b="sf-entrance",i={kind:"entrance",from:"entranceFrom",duration:"entranceDuration",delay:"entranceDelay"},u="sectionAnimation",a=e=>e!=null&&e!=="";function f(e,n){const t=e[i[n]];return n==="kind"&&!a(t)?e[u]:t}function o(e,n,t){if(t==="phone"){const r=e[c(i[n])];if(a(r))return r}return f(e,n)}function s(e,n){return d(o(e,"kind",n),o(e,"from",n),o(e,"duration",n),o(e,"delay",n))}function h(e){const n=s(e,"desktop"),t=s(e,"phone");return n.kind==="none"&&t.kind==="none"?null:{desktop:n,phone:t}}const E={...Object.fromEntries([...l].map(e=>[e,"a root position: sticky bar; an outer box becomes its sticky containing block and the pin collapses (the same fact every wrapper pass excludes it for, lib/content/section-surface)"])),HeroSlide:"a slide is a direct child of the Hero's transform track ([&>*]:basis-full); a wrapper would take its width, and the Hero already moves one slide in at a time",HeroGroup:"a slide box is placed by grid-item properties on its own root (--sf-hg-row, justify-self); a wrapper becomes the grid item and the box loses its anchor (lib/document/blocks/general/HeroGroup/meta)"},x=new Set(Object.keys(E));export{x as ENTRANCE_EXCLUDED,E as ENTRANCE_EXCLUDED_WHY,i as ENTRANCE_KEYS,b as ENTRANCE_WRAPPER_CLASS,u as LEGACY_ENTRANCE_KEY,h as entranceDrawn,s as entranceOf};
@@ -0,0 +1,25 @@
1
+ import { type EntranceValue } from "efficient-shell/format";
2
+ import { entranceDrawn } from "./entrance.js";
3
+ import { type PartHover } from "../../../format/lib/animation/hover.js";
4
+ export declare const NO_MOTIONS: Readonly<Record<string, PartMotion>>;
5
+ export declare const PART_MOTION_PROP = "_partMotion";
6
+ type Props = Readonly<Record<string, unknown>>;
7
+ export type PartMotion = Readonly<Record<string, unknown>>;
8
+ export declare const PART_MOTION_KEYS: readonly string[];
9
+ export declare function readPartMotions(props: Props | undefined): Readonly<Record<string, PartMotion>>;
10
+ export declare function readPartMotion(props: Props | undefined, part: string): PartMotion;
11
+ export declare function propsWithPartMotion(props: Props, part: string, key: string, value: unknown): Record<string, unknown>;
12
+ export declare function partMotionDrawn(record: PartMotion): {
13
+ entrance: ReturnType<typeof entranceDrawn>;
14
+ hover: PartHover;
15
+ };
16
+ export declare function partMoves(record: PartMotion): boolean;
17
+ export declare function drawPartEntrance(box: HTMLElement, value: EntranceValue): () => void;
18
+ export declare function firstOnPage<T extends {
19
+ element: Element;
20
+ }>(parts: readonly T[]): T | undefined;
21
+ export declare const PART_HOST_ATTR = "data-sf-part-host";
22
+ export declare function partBoxOf(start: Element | null): HTMLElement | null;
23
+ export declare const PART_LIFT_ATTR = "data-sf-part-lift";
24
+ export declare function ensurePartLiftSheet(doc: Document): void;
25
+ export {};
@@ -0,0 +1,2 @@
1
+ import{phoneKey as u}from"efficient-easel/draw";import{ENTRANCE_STATE_ATTR as m,entranceAttrs as d}from"efficient-shell/format";import{ENTRANCE_KEYS as f,ENTRANCE_WRAPPER_CLASS as T,entranceDrawn as O}from"./entrance.js";import{HOVER_KEY as p,hoverOf as _}from"../../../format/lib/animation/hover.js";import{propsWithPartRecord as E,readPartRecord as P,readPartRecords as A}from"../../../format/lib/document/part-records.js";import{partLiftRules as R}from"../document/part-styles.js";const v={},i="_partMotion",b=[...Object.values(f).flatMap(t=>[t,u(t)]),p];function D(t){return A(t,i)}function S(t,e){return P(t,i,e)}const h=new Set([f.kind,p]);function K(t,e,n,o){const{[n]:s,...r}=S(t,e),c=o==null||o===""||o==="none"&&h.has(n)?r:{...r,[n]:o};return E(t,i,e,Object.keys(c).length?c:null)}function N(t){return{entrance:O(t),hover:_(t)}}function W(t){const e=N(t);return e.entrance!==null||e.hover!=="none"}function F(t,e){const{attrs:n,style:o}=d(e),s=Object.keys(n).filter(r=>n[r]!==void 0);for(const r of s)t.setAttribute(r,String(n[r]));for(const[r,a]of Object.entries(o))t.style.setProperty(r,String(a));return()=>{for(const r of s)t.removeAttribute(r);for(const r of Object.keys(o))t.style.removeProperty(r);t.removeAttribute(m)}}const x=4;function H(t){let e;for(const n of t)(!e||n.element.compareDocumentPosition(e.element)&x)&&(e=n);return e}const y="data-sf-part-host";function Y(t){const e=t?.ownerDocument.defaultView;let n=t;for(;n&&!n.hasAttribute(y)&&!n.classList.contains(T);){const o=e?.getComputedStyle(n).display??"";if(o==="contents")return null;if(o!=="inline")return n;n=n.parentElement}return null}const M="data-sf-part-lift",l="sf-part-lift";function B(t){if(t.getElementById(l))return;const e=t.createElement("style");e.id=l,e.textContent=R(`[${M}]`).join(`
2
+ `),t.head.appendChild(e)}export{v as NO_MOTIONS,y as PART_HOST_ATTR,M as PART_LIFT_ATTR,b as PART_MOTION_KEYS,i as PART_MOTION_PROP,F as drawPartEntrance,B as ensurePartLiftSheet,H as firstOnPage,Y as partBoxOf,N as partMotionDrawn,W as partMoves,K as propsWithPartMotion,S as readPartMotion,D as readPartMotions};
@@ -1 +1 @@
1
- import{BUTTON_PAD_KEYS as i,buttonBorderOf as S,buttonFillOpacityOf as T,buttonPadSidesOf as h}from"efficient-easel/draw";import{finiteNumber as y}from"../../../format/lib/finite-number.js";import{nonEmptyString as c}from"../../../format/lib/non-empty-string.js";import{padSideAttrs as _}from"./section-padding.js";import{cornerSidesShorthand as x,normalizeCornerSides as O}from"../../../format/lib/content/section-corners.js";const N="px-6 py-4",$=4,s=o=>{const t=new RegExp(`\\bp${o}-(?:\\[(\\d+)px\\]|(\\d+))`).exec(N);if(!t)throw new Error(`BUTTON_PAD_CLASSES has no p${o}`);return t[1]!==void 0?Number(t[1]):Number(t[2])*$},U={top:s("y"),right:s("x"),bottom:s("y"),left:s("x")},a="var(--btn)";function g(o){const t=o.variant==="ghost",n=T(o.buttonFillOpacity),r=S(o.buttonBorder),e=c(o.buttonColor);return{fillOpacity:n??(t?0:100),border:{width:r?.width??1,color:r?.color??e??(t?"currentColor":a)},changed:n!==void 0||r!==void 0}}function L(o){const t=g(o);if(!t.changed)return null;const n=c(o.buttonColor)??a;return{background:t.fillOpacity===0?"transparent":t.fillOpacity===100?n:`color-mix(in srgb, ${n} ${t.fillOpacity}%, transparent)`,borderWidth:t.border.width,borderStyle:"solid",borderColor:t.border.color}}const C="var(--sf-button-radius, 0)";function D(o){const t=y(o.buttonCorners),n=O(o.buttonCornerSides);if(t===void 0&&n===null)return null;const r=t===void 0?C:`${Math.max(0,t)}px`;return{borderRadius:n===null?r:x(r,n)}}function k(o){const t=e=>h({top:o[`${i.top}${e}`],right:o[`${i.right}${e}`],bottom:o[`${i.bottom}${e}`],left:o[`${i.left}${e}`]})??{},{classes:n,style:r}=_(t(""),t("Phone"));return Object.keys(r).length?{className:n.join(" "),style:r}:null}const b="upper";function w(o,t,n){const r=o&&typeof o=="object"?o:{},e=c(r.textStyle),u=e?c(t?.find(f=>f?.id===e)?.name):void 0,d=e?/^(heading|body)-(\d+)$/.exec(e):null,p=e?u||(d?n.styleName({kind:d[1],n:Number(d[2])}):e):n.noStyle,{cases:l}=n,m=c(r.case)??b;return`${p} · ${l[m]??l[b]}`}export{U as BUTTON_PAD_BUILT_IN,N as BUTTON_PAD_CLASSES,i as BUTTON_PAD_KEYS,b as BUTTON_WORDS_BUILT_IN_CASE,a as SITE_BUTTON_FILL,D as buttonCornersStyle,g as buttonLook,k as buttonPadAttrs,L as buttonPaint,w as buttonWordsSummary};
1
+ import{BUTTON_PAD_KEYS as i,buttonBorderOf as S,buttonFillOpacityOf as T,buttonPadSidesOf as h}from"efficient-easel/draw";import{finiteNumber as y}from"../../../format/lib/finite-number.js";import{nonEmptyString as c}from"../../../format/lib/non-empty-string.js";import{padSideAttrs as _}from"./section-padding.js";import{cornerSidesShorthand as x,normalizeCornerSides as O}from"../../../format/lib/content/section-corners.js";const N="px-6 py-4",$=4,s=o=>{const t=new RegExp(`\\bp${o}-(?:\\[(\\d+)px\\]|(\\d+))`).exec(N);if(!t)throw new Error(`BUTTON_PAD_CLASSES has no p${o}`);return t[1]!==void 0?Number(t[1]):Number(t[2])*$},U={top:s("y"),right:s("x"),bottom:s("y"),left:s("x")},a="var(--btn)";function g(o){const t=o.variant==="ghost",n=T(o.buttonFillOpacity),r=S(o.buttonBorder),e=c(o.buttonColor);return{fillOpacity:n??(t?0:100),border:{width:r?.width??1,color:r?.color??e??(t?"currentColor":a)},changed:n!==void 0||r!==void 0}}function L(o){const t=g(o);if(!t.changed)return null;const n=c(o.buttonColor)??a;return{background:t.fillOpacity===0?"transparent":t.fillOpacity===100?n:`color-mix(in srgb, ${n} ${t.fillOpacity}%, transparent)`,borderWidth:t.border.width,borderStyle:"solid",borderColor:t.border.color}}const C="var(--sf-button-radius, 0)";function D(o){const t=y(o.buttonCorners),n=O(o.buttonCornerSides);if(t===void 0&&n===null)return null;const r=t===void 0?C:`${Math.max(0,t)}px`;return{borderRadius:n===null?r:x(r,n)}}function k(o){const t=e=>h({top:o[`${i.top}${e}`],right:o[`${i.right}${e}`],bottom:o[`${i.bottom}${e}`],left:o[`${i.left}${e}`]})??{},{classes:n,style:r}=_(t(""),t("Phone"),t("Tablet"));return Object.keys(r).length?{className:n.join(" "),style:r}:null}const b="upper";function w(o,t,n){const r=o&&typeof o=="object"?o:{},e=c(r.textStyle),l=e?c(t?.find(f=>f?.id===e)?.name):void 0,d=e?/^(heading|body)-(\d+)$/.exec(e):null,p=e?l||(d?n.styleName({kind:d[1],n:Number(d[2])}):e):n.noStyle,{cases:u}=n,m=c(r.case)??b;return`${p} · ${u[m]??u[b]}`}export{U as BUTTON_PAD_BUILT_IN,N as BUTTON_PAD_CLASSES,i as BUTTON_PAD_KEYS,b as BUTTON_WORDS_BUILT_IN_CASE,a as SITE_BUTTON_FILL,D as buttonCornersStyle,g as buttonLook,k as buttonPadAttrs,L as buttonPaint,w as buttonWordsSummary};
@@ -0,0 +1,17 @@
1
+ import type { ContentsEntry } from "../../components/ContentsList.js";
2
+ export declare const CONTENTS_ENTRIES_PROP = "_contentsEntries";
3
+ export declare const KICKER_NUMBER_PROP = "_kickerNumber";
4
+ export declare const KICKER_NUMBER_ATTR = "data-sf-kicker-number";
5
+ type Props = Record<string, unknown>;
6
+ type Node = {
7
+ type?: string;
8
+ props?: Props;
9
+ };
10
+ export type PageContentsDrawing = {
11
+ entries: ReadonlyMap<string, ContentsEntry[]>;
12
+ numbers: ReadonlyMap<string, string>;
13
+ };
14
+ export declare function pageContentsDrawing(content: readonly Node[] | undefined): PageContentsDrawing | null;
15
+ export declare const kickerLead: (number: string) => string;
16
+ export declare function withPageContents<T>(data: T): T;
17
+ export {};
@@ -0,0 +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};
@@ -0,0 +1,2 @@
1
+ import type { BlockRender } from "../../../../../../format/lib/document/blocks/block-types.js";
2
+ export declare const ContentsRender: BlockRender;