efficient-web-builder 62.0.0 → 64.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/dist/editor/components/PreviewPartAnchors.js +1 -1
  3. package/dist/editor/lib/animation/fields.js +1 -1
  4. package/dist/editor/lib/animation/loop-fields.js +1 -1
  5. package/dist/editor/lib/animation/scroll-fields.d.ts +3 -0
  6. package/dist/editor/lib/animation/scroll-fields.js +1 -0
  7. package/dist/editor/lib/document/blocks/general/IntroBleed/fields.js +1 -1
  8. package/dist/editor/lib/document/card-display-chips.d.ts +3 -2
  9. package/dist/editor/lib/document/card-display-chips.js +1 -1
  10. package/dist/editor/lib/document/card-row-fields.js +1 -1
  11. package/dist/editor/lib/document/controls.d.ts +7 -2
  12. package/dist/editor/lib/document/controls.js +1 -1
  13. package/dist/editor/lib/document/field-groups.js +1 -1
  14. package/dist/editor/lib/document/part-motion-canvas.d.ts +2 -1
  15. package/dist/editor/lib/document/part-motion-canvas.js +1 -1
  16. package/dist/format/lib/animation/hover.d.ts +4 -2
  17. package/dist/format/lib/animation/hover.js +1 -1
  18. package/dist/format/lib/animation/loop.d.ts +1 -0
  19. package/dist/format/lib/animation/loop.js +1 -1
  20. package/dist/format/lib/animation/mark-zoom.d.ts +11 -0
  21. package/dist/format/lib/animation/mark-zoom.js +1 -0
  22. package/dist/format/lib/animation/scroll.d.ts +20 -0
  23. package/dist/format/lib/animation/scroll.js +1 -0
  24. package/dist/format/lib/content/block-sources.js +1 -1
  25. package/dist/format/lib/content/box-shape.d.ts +1 -1
  26. package/dist/format/lib/content/card-state.d.ts +11 -1
  27. package/dist/format/lib/content/card-state.js +1 -1
  28. package/dist/format/lib/content/card-template.d.ts +10 -5
  29. package/dist/format/lib/content/card-template.js +1 -1
  30. package/dist/format/lib/content/image-aspect.d.ts +6 -0
  31. package/dist/format/lib/content/image-aspect.js +1 -1
  32. package/dist/format/lib/content/section-sticky.d.ts +29 -13
  33. package/dist/format/lib/content/section-sticky.js +1 -1
  34. package/dist/format/lib/content/slot-field-blocks.d.ts +1 -0
  35. package/dist/format/lib/content/slot-field-blocks.js +1 -0
  36. package/dist/format/lib/document/blocks/block-types.d.ts +2 -0
  37. package/dist/format/lib/document/blocks/general/Banner/meta.js +1 -1
  38. package/dist/format/lib/document/blocks/general/ContactLocations/meta.js +1 -1
  39. package/dist/format/lib/document/blocks/general/FeaturedCover/meta.js +1 -1
  40. package/dist/format/lib/document/blocks/general/Hero/meta.d.ts +1 -0
  41. package/dist/format/lib/document/blocks/general/Hero/meta.js +1 -1
  42. package/dist/format/lib/document/blocks/general/HeroSingle/meta.js +1 -1
  43. package/dist/format/lib/document/blocks/general/ImageBlock/meta.js +1 -1
  44. package/dist/format/lib/document/blocks/general/IntroBleed/meta.js +2 -2
  45. package/dist/format/lib/document/blocks/general/LogoBlock/meta.js +1 -1
  46. package/dist/format/lib/document/blocks/general/Logos/meta.js +1 -1
  47. package/dist/format/lib/document/blocks/general/LongRead/meta.js +1 -1
  48. package/dist/format/lib/document/blocks/general/Manifesto/meta.js +1 -1
  49. package/dist/format/lib/document/blocks/general/PaymentBadges/meta.js +1 -1
  50. package/dist/format/lib/document/blocks/general/PostCard/meta.js +1 -1
  51. package/dist/format/lib/document/blocks/general/ProcessSteps/meta.js +1 -1
  52. package/dist/format/lib/document/blocks/general/SectionHeader/meta.js +1 -1
  53. package/dist/format/lib/document/blocks/general/Split/meta.js +1 -1
  54. package/dist/format/lib/document/blocks/general/Timeline/meta.js +1 -1
  55. package/dist/format/lib/document/easel-row-words.d.ts +7 -0
  56. package/dist/format/lib/document/easel-row-words.js +1 -1
  57. package/dist/format/lib/document/passes/types.d.ts +5 -1
  58. package/dist/format/lib/editor-words-catalogue.d.ts +11 -0
  59. package/dist/format/lib/editor-words-catalogue.js +4 -4
  60. package/dist/format/lib/editor-words-kept.js +1 -1
  61. package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
  62. package/dist/format/lib/source-rules/no-hard-coded-option-rows.d.ts +30 -0
  63. package/dist/format/lib/source-rules/no-hard-coded-option-rows.js +1 -0
  64. package/dist/render/components/Banner.js +1 -1
  65. package/dist/render/components/CardRowContext.d.ts +1 -0
  66. package/dist/render/components/CardRowContext.js +1 -1
  67. package/dist/render/components/ContactLocations.js +2 -2
  68. package/dist/render/components/HeroPictures.d.ts +22 -2
  69. package/dist/render/components/HeroPictures.js +1 -1
  70. package/dist/render/components/HeroSection.js +1 -1
  71. package/dist/render/components/HeroSingle.js +1 -1
  72. package/dist/render/components/HeroSlide.js +1 -1
  73. package/dist/render/components/ImageBlock.js +1 -1
  74. package/dist/render/components/InBoxContext.d.ts +2 -1
  75. package/dist/render/components/InBoxContext.js +1 -1
  76. package/dist/render/components/IntroBleed.d.ts +1 -2
  77. package/dist/render/components/IntroBleed.js +1 -1
  78. package/dist/render/components/LogoBlock.js +1 -1
  79. package/dist/render/components/Logos.js +1 -1
  80. package/dist/render/components/PictureZoom.d.ts +24 -0
  81. package/dist/render/components/PictureZoom.js +1 -0
  82. package/dist/render/components/Placeholder.js +1 -1
  83. package/dist/render/components/PublishedPartStylesContext.js +1 -1
  84. package/dist/render/components/ScrollEffect.d.ts +14 -0
  85. package/dist/render/components/ScrollEffect.js +1 -0
  86. package/dist/render/components/ScrollProgressArm.d.ts +5 -0
  87. package/dist/render/components/ScrollProgressArm.js +1 -0
  88. package/dist/render/components/SectionAnimation.d.ts +4 -0
  89. package/dist/render/components/SectionAnimation.js +1 -1
  90. package/dist/render/components/SectionHeader.js +1 -1
  91. package/dist/render/components/Text.d.ts +2 -1
  92. package/dist/render/components/Text.js +1 -1
  93. package/dist/render/components/goldPhrases.d.ts +2 -1
  94. package/dist/render/components/goldPhrases.js +3 -2
  95. package/dist/render/lib/animation/part-motion.d.ts +4 -1
  96. package/dist/render/lib/animation/part-motion.js +2 -2
  97. package/dist/render/lib/document/blocks/general/CardList/render.js +1 -1
  98. package/dist/render/lib/document/blocks/general/IntroBleed/render.js +1 -1
  99. package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
  100. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  101. package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
  102. package/dist/render/lib/document/page-frame.d.ts +2 -1
  103. package/dist/render/lib/document/page-frame.js +1 -1
  104. package/dist/render/lib/document/part-styles.d.ts +9 -0
  105. package/dist/render/lib/document/part-styles.js +2 -2
  106. package/dist/render/lib/document/passes/index.js +1 -1
  107. package/dist/render/lib/document/passes/scroll-effect.d.ts +3 -0
  108. package/dist/render/lib/document/passes/scroll-effect.js +1 -0
  109. package/dist/render/lib/document/passes/section-sticky.js +1 -1
  110. package/dist/render/lib/document/passes/slots-start-afresh.js +1 -1
  111. package/package.json +3 -3
@@ -1,6 +1,7 @@
1
- import type { ReactNode } from "react";
1
+ import type { CSSProperties, ReactNode } from "react";
2
2
  import { type HeroMediaPart } from "../lib/document/hero-media-parts.js";
3
3
  import { entranceDrawn } from "../lib/animation/entrance.js";
4
+ import { scrollDrawn, type ScrollOrigins } from "../../format/lib/animation/scroll.js";
4
5
  import { type ImageTreatment } from "../../format/lib/content/image-treatment.js";
5
6
  import { type MediaLayout } from "../../format/lib/hero-media-layout.js";
6
7
  export declare function heroMediaReading(p: {
@@ -23,6 +24,23 @@ export declare function heroPartEntrance(partMotion: Record<string, unknown> | u
23
24
  desktop: import("efficient-shell/ui").EntranceValue;
24
25
  phone: import("efficient-shell/ui").EntranceValue;
25
26
  } | null;
27
+ export declare function heroPartScroll(partMotion: Record<string, unknown> | undefined, part: string): Readonly<Record<import("../../format/lib/animation/scroll.js").ScrollView, import("efficient-shell/format").ScrollValue>> | null;
28
+ export declare const heroPictureOrigins: (p: {
29
+ objectPosition?: string;
30
+ objectPositionTablet?: string;
31
+ objectPositionPhone?: string;
32
+ }) => ScrollOrigins;
33
+ export declare function HeroPartBox({ entrance, scroll, origins, editing, className, attrs, style, zoomLayerClass, children, }: {
34
+ entrance: ReturnType<typeof entranceDrawn>;
35
+ scroll: ReturnType<typeof scrollDrawn>;
36
+ origins?: ScrollOrigins;
37
+ editing: boolean;
38
+ className: string;
39
+ attrs?: Record<string, string>;
40
+ style?: CSSProperties;
41
+ zoomLayerClass?: string;
42
+ children: ReactNode;
43
+ }): import("react").JSX.Element;
26
44
  export declare function heroPartHover(partMotion: Record<string, unknown> | undefined, part: HeroMediaPart): ImageTreatment;
27
45
  export declare function heroPicturesHover(partMotion: Record<string, unknown> | undefined): {
28
46
  hostAttrs?: Record<string, string>;
@@ -37,11 +55,13 @@ export declare function HeroTint({ color, opacity, passClicks }: {
37
55
  opacity: number;
38
56
  passClicks?: boolean;
39
57
  }): import("react").JSX.Element | null;
40
- export declare function HeroPickArea({ part, editing, marked, entrance, className, children, }: {
58
+ export declare function HeroPickArea({ part, editing, marked, entrance, scroll, origins, className, children, }: {
41
59
  part: HeroMediaPart;
42
60
  editing: boolean;
43
61
  marked?: boolean;
44
62
  entrance: ReturnType<typeof entranceDrawn>;
63
+ scroll?: ReturnType<typeof scrollDrawn>;
64
+ origins?: ScrollOrigins;
45
65
  className: string;
46
66
  children: ReactNode;
47
67
  }): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{Fragment as u,jsx as r,jsxs as c}from"react/jsx-runtime";import b from"./HeroPoster.js";import{SectionAnimation as h}from"./SectionAnimation.js";import{resolveMedia as P}from"../lib/media.js";import{HERO_MEDIA_PARTS as w,HERO_PART_ATTR as x}from"../lib/document/hero-media-parts.js";import{entranceDrawn as y}from"../lib/animation/entrance.js";import{readPartMotion as v}from"../lib/animation/part-motion.js";import{pictureHoverOf as T}from"../../format/lib/animation/hover.js";import{PHOTO_HOST_ATTR as H,SITE_PHOTO_CSS as j,resolveImageTreatment as _}from"../../format/lib/content/image-treatment.js";import{heroPictureCount as k,normaliseMediaLayout as S,resolvePhoneLayout as N}from"../../format/lib/hero-media-layout.js";import{normaliseVideoPlayback as O,normaliseVideoSource as A,parseYouTubeId as R}from"../../format/lib/hero-video.js";import{hidableText as C}from"efficient-easel/draw";import{viewHideClass as E}from"../../format/lib/content/view-hide-class.js";const V={one:"max-view-tablet:grid-cols-1 max-view-tablet:grid-rows-1",side:"max-view-tablet:grid-cols-2 max-view-tablet:grid-rows-1",stacked:"max-view-tablet:grid-cols-1 max-view-tablet:grid-rows-2"},I={one:"view-tablet:grid-cols-1 view-tablet:grid-rows-1",side:"view-tablet:grid-cols-2 view-tablet:grid-rows-1",stacked:"view-tablet:grid-cols-1 view-tablet:grid-rows-2"};function Q(e){const o=e.isVideo&&A(e.videoSource)==="youtube",i=e.isVideo&&O(e.videoPlayback)==="click",a=o?R(C(e.youtubeUrl)):null,t=S(e.mediaLayout);return{fromYouTube:o,onClick:i,youTubeId:a,backgroundFile:e.isVideo&&!o&&!i,desktopLayout:t,phoneLayout:N(e.mediaLayoutPhone,t),twoPictures:!e.isVideo&&k(e)>1}}function d(e,o){return y(v({_partMotion:e},o))}function l(e,o){return _(void 0,void 0,T(v({_partMotion:e},o)))}function W(e){return w.some(i=>l(e,i).className)?{hostAttrs:{[H]:""},sheet:j}:{}}function f({treatment:e,children:o}){return e.className?r("div",{className:`absolute inset-0 ${e.className}`,...e.style?{style:e.style}:{},children:o}):r(u,{children:o})}function p({color:e,opacity:o,passClicks:i=!0}){return o>0?r("div",{className:i?"pointer-events-none absolute inset-0 z-[2]":"absolute inset-0 z-[2]",style:{background:e,opacity:Math.min(Math.max(o,0),100)/100}}):null}function g({part:e,editing:o,marked:i=!0,entrance:a,className:t,children:n}){const s=o&&i?{[x]:e}:void 0;return a?r(h,{desktop:a.desktop,phone:a.phone,editing:o,boxClass:t,boxAttrs:s,children:n}):r("div",{className:t,...s,children:n})}function X({partMotion:e,editing:o,children:i}){const a=d(e,"media"),t=l(e,"media"),n=t.className?r("div",{className:`absolute inset-0 z-[1] ${t.className}`,...t.style?{style:t.style}:{},children:i}):i;return a?r(h,{desktop:a.desktop,phone:a.phone,editing:o,boxClass:"absolute inset-0 z-[1]",children:n}):r(u,{children:n})}function Z({desktopLayout:e,phoneLayout:o,editing:i,marked:a=!0,partMotion:t,first:n,second:s,laterSlide:m=!1}){return c("div",{className:`absolute inset-0 z-[1] grid ${V[o]} ${I[e]}`,"data-hero-layout":e,"data-hero-layout-phone":o,children:[r(g,{part:"image",editing:i,marked:a,entrance:d(t,"image"),className:"relative overflow-hidden",children:c(f,{treatment:l(t,"image"),children:[r(b,{posterSrc:P(n.src),showVideo:!1,laterSlide:m,objectPosition:n.objectPosition,objectPositionPhone:n.objectPositionPhone,objectPositionTablet:n.objectPositionTablet}),r(p,{color:n.tintColor,opacity:n.tintOpacity})]})}),r(g,{part:"image2",editing:i,marked:a,entrance:d(t,"image2"),className:`relative overflow-hidden ${E({desktop:e==="one",tablet:e==="one",mobile:o==="one"},{atSectionLine:!0})}`.trimEnd(),children:c(f,{treatment:l(t,"image2"),children:[r(b,{posterSrc:P(s.src),showVideo:!1,laterSlide:m,objectPosition:s.objectPosition,objectPositionPhone:s.objectPositionPhone,objectPositionTablet:s.objectPositionTablet}),r(p,{color:s.tintColor,opacity:s.tintOpacity})]})})]})}export{X as HeroMediaLayer,g as HeroPickArea,f as HeroPictureHover,p as HeroTint,Z as HeroTwoPictures,Q as heroMediaReading,d as heroPartEntrance,l as heroPartHover,W as heroPicturesHover};
1
+ "use client";import{jsx as n,Fragment as h,jsxs as d}from"react/jsx-runtime";import f from"./HeroPoster.js";import{PictureZoom as S}from"./PictureZoom.js";import{ScrollEffect as _}from"./ScrollEffect.js";import{SectionAnimation as H}from"./SectionAnimation.js";import{resolveMedia as g}from"../lib/media.js";import{HERO_MEDIA_PARTS as O,HERO_PART_ATTR as k}from"../lib/document/hero-media-parts.js";import{entranceDrawn as N}from"../lib/animation/entrance.js";import{scrollDrawn as A,scrollOrigins as E}from"../../format/lib/animation/scroll.js";import{readPartMotion as u}from"../lib/animation/part-motion.js";import{pictureHoverOf as R}from"../../format/lib/animation/hover.js";import{FILLS_ITS_FRAME as v}from"../../format/lib/content/image-aspect.js";import{PHOTO_HOST_ATTR as C,SITE_PHOTO_CSS as I,resolveImageTreatment as V}from"../../format/lib/content/image-treatment.js";import{heroPictureCount as L,normaliseMediaLayout as z,resolvePhoneLayout as D}from"../../format/lib/hero-media-layout.js";import{normaliseVideoPlayback as F,normaliseVideoSource as M,parseYouTubeId as $}from"../../format/lib/hero-video.js";import{hidableText as Y}from"efficient-easel/draw";import{viewHideClass as G}from"../../format/lib/content/view-hide-class.js";const U={one:"max-view-tablet:grid-cols-1 max-view-tablet:grid-rows-1",side:"max-view-tablet:grid-cols-2 max-view-tablet:grid-rows-1",stacked:"max-view-tablet:grid-cols-1 max-view-tablet:grid-rows-2"},B={one:"view-tablet:grid-cols-1 view-tablet:grid-rows-1",side:"view-tablet:grid-cols-2 view-tablet:grid-rows-1",stacked:"view-tablet:grid-cols-1 view-tablet:grid-rows-2"};function me(e){const o=e.isVideo&&M(e.videoSource)==="youtube",a=e.isVideo&&F(e.videoPlayback)==="click",s=o?$(Y(e.youtubeUrl)):null,i=z(e.mediaLayout);return{fromYouTube:o,onClick:a,youTubeId:s,backgroundFile:e.isVideo&&!o&&!a,desktopLayout:i,phoneLayout:D(e.mediaLayoutPhone,i),twoPictures:!e.isVideo&&L(e)>1}}function b(e,o){return N(u({_partMotion:e},o))}function P(e,o){return A(u({_partMotion:e},o))}const p=e=>E({desktop:e.objectPosition,tablet:e.objectPositionTablet,phone:e.objectPositionPhone}),x=v.img;function w({entrance:e,scroll:o,origins:a,editing:s,className:i,attrs:r,style:t,zoomLayerClass:l,children:c}){return e?n(H,{desktop:e.desktop,phone:e.phone,editing:s,boxClass:i,boxAttrs:r,...t?{boxStyle:t}:{},children:c}):o?n(_,{views:o,...a?{origins:a}:{},boxClass:i,boxAttrs:r,...t?{boxStyle:t}:{},...l?{zoomLayerClass:l}:{},children:c}):n("div",{className:i,...r,...t?{style:t}:{},children:c})}function m(e,o){return V(void 0,void 0,R(u({_partMotion:e},o)))}function de(e){return O.some(a=>m(e,a).className)?{hostAttrs:{[C]:""},sheet:I}:{}}function T({treatment:e,children:o}){return e.className?n("div",{className:`absolute inset-0 ${e.className}`,...e.style?{style:e.style}:{},children:o}):n(h,{children:o})}function y({color:e,opacity:o,passClicks:a=!0}){return o>0?n("div",{className:a?"pointer-events-none absolute inset-0 z-[2]":"absolute inset-0 z-[2]",style:{background:e,opacity:Math.min(Math.max(o,0),100)/100}}):null}function j({part:e,editing:o,marked:a=!0,entrance:s,scroll:i=null,origins:r,className:t,children:l}){const c=o&&a?{[k]:e}:void 0;return n(w,{entrance:s,scroll:i,origins:r,editing:o,className:t,attrs:c,zoomLayerClass:x,children:l})}function ue({partMotion:e,editing:o,children:a}){const s=b(e,"media"),i=P(e,"media"),r=m(e,"media"),t=n(S,{fill:v,children:a}),l=r.className?n("div",{className:`absolute inset-0 z-[1] ${r.className}`,...r.style?{style:r.style}:{},children:t}):t;return s||i?n(w,{entrance:s,scroll:i,editing:o,className:"absolute inset-0 z-[1]",zoomLayerClass:x,children:l}):n(h,{children:l})}function be({desktopLayout:e,phoneLayout:o,editing:a,marked:s=!0,partMotion:i,first:r,second:t,laterSlide:l=!1}){return d("div",{className:`absolute inset-0 z-[1] grid ${U[o]} ${B[e]}`,"data-hero-layout":e,"data-hero-layout-phone":o,children:[n(j,{part:"image",editing:a,marked:s,entrance:b(i,"image"),scroll:P(i,"image"),origins:p(r),className:"relative overflow-hidden",children:d(T,{treatment:m(i,"image"),children:[n(f,{posterSrc:g(r.src),showVideo:!1,laterSlide:l,objectPosition:r.objectPosition,objectPositionPhone:r.objectPositionPhone,objectPositionTablet:r.objectPositionTablet}),n(y,{color:r.tintColor,opacity:r.tintOpacity})]})}),n(j,{part:"image2",editing:a,marked:s,entrance:b(i,"image2"),scroll:P(i,"image2"),origins:p(t),className:`relative overflow-hidden ${G({desktop:e==="one",tablet:e==="one",mobile:o==="one"},{atSectionLine:!0})}`.trimEnd(),children:d(T,{treatment:m(i,"image2"),children:[n(f,{posterSrc:g(t.src),showVideo:!1,laterSlide:l,objectPosition:t.objectPosition,objectPositionPhone:t.objectPositionPhone,objectPositionTablet:t.objectPositionTablet}),n(y,{color:t.tintColor,opacity:t.tintOpacity})]})})]})}export{ue as HeroMediaLayer,w as HeroPartBox,j as HeroPickArea,T as HeroPictureHover,y as HeroTint,be as HeroTwoPictures,me as heroMediaReading,b as heroPartEntrance,m as heroPartHover,P as heroPartScroll,p as heroPictureOrigins,de as heroPicturesHover};
@@ -1 +1 @@
1
- "use client";import{jsx as n,jsxs as V}from"react/jsx-runtime";import{HideTaker as Pe}from"./ViewHideRoot.js";import{useCallback as v,useEffect as w,useId as De,useRef as d,useState as k}from"react";import{markOverlayPortal as te}from"../../format/lib/document/overlay-portal.js";import Ie from"./Ticker.js";import{HeroSlideStyleContext as Ve}from"./HeroSlide.js";import $e from"./HeroArrows.js";import ze from"./Reel.js";import{TICKER_PART_ATTR as Be}from"./PreviewTickerContext.js";import{useReducedMotion as Xe}from"./useReducedMotion.js";import{heroHeightBox as Ge,heroStoresRatio as Ye}from"../../format/lib/content/section-height.js";import{HEADER_HEIGHT_CSS as je}from"../lib/document/header-clearance.js";import{nextReel as qe,normaliseHeroReelShape as Ke,reelShown as Fe}from"../../format/lib/reel.js";import{arrowsShown as Je,arrowStep as Qe}from"../../format/lib/hero-arrows.js";import{swipeEnabled as Ue,swipeStep as We}from"../../format/lib/hero-swipe.js";import{videoControlShown as Ze,videoHeld as et}from"../../format/lib/hero-video-control.js";import{HERO_SLIDER_GOTO_EVENT as $}from"efficient-easel/draw";import{say as re}from"../../format/lib/editor-words.js";import{markedChildren as oe}from"../../format/lib/marked-children.js";import{legacyTickerDrawn as tt,TICKER_MOTION_PART as rt}from"../../format/lib/hero-ticker.js";import{ON_MEDIA_INK_STYLE as ot}from"../../format/lib/content/ink.js";import{SectionAnimation as nt}from"./SectionAnimation.js";import{entranceDrawn as st}from"../lib/animation/entrance.js";import{readPartMotion as ct}from"../lib/animation/part-motion.js";import{scrim as ne}from"../../format/lib/content/scrim.js";const at="Play video",lt="Hold video",it="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",ut=()=>re("item"),se=new Map;function dt(m,a){const i=m?.ownerDocument?.defaultView;if(i)return i.addEventListener($,a),()=>i.removeEventListener($,a)}function mt({slides:m,strip:a,alignment:i,textureOpacity:y,showTexture:E,textureColor:g,phoneUpDown:ce,phoneSideways:ae,autoplay:z,autoplayInterval:O,showTicker:le,tickerItems:B,heightDesktop:ie,heightTablet:ue,heightMobile:de,heightFixed:me,heightFixedTablet:fe,heightFixedMobile:he,showPicker:pe,pickerShape:ve,pickerPlacement:be,showArrows:xe,arrowsShape:we,arrowsPlacement:ke,editing:s,partMotion:ye}){const X=Ge({heightDesktop:ie,heightTablet:ue,heightMobile:de,heightFixed:me,heightFixedTablet:fe,heightFixedMobile:he}),{className:Ee,style:ge}=X,H=Ye(X),G=(a?.blockCount??0)>0,_e=!G&&tt({showTicker:le,tickerItems:B}),Y=(B??[]).map(e=>e?.text?.trim()?e.text:s?ut():"").filter(Boolean),Re=st(ct({_partMotion:ye},rt)),f=d(null),j=d(null),q=d(null),N=d(null),K=De(),A=d(K),[_,Te]=k([]),[Se,F]=k(0),b=d(0),[J,Q]=k(!1),[Oe,U]=k(null),[R,He]=k(!1),M=Xe(),T=v(()=>f.current?.querySelector(".hero-track")??null,[]),u=v((e,t=!1)=>{F(e),U(o=>o===e?o:null),b.current=e,se.set(A.current,e);const r=f.current?.querySelector(".hero-track");if(r)if(t){const o=r.style.transition;r.style.transition="none",r.style.transform=`translateX(-${Math.max(0,e)*100}%)`,r.offsetHeight,r.style.transition=o}else r.style.transform=`translateX(-${Math.max(0,e)*100}%)`},[]);w(()=>{const e=f.current,t=e?.getAttribute("data-easel-block")||e?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||K;A.current=t;const r=se.get(t);typeof r=="number"&&(F(r),b.current=r)},[]),w(()=>{const e=T();if(!e)return;const t=()=>{Te(o=>qe(o,oe(e,"data-slide-name")))};t();const r=new MutationObserver(t);return r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-slide-name","data-slide-process","data-slide-media"]}),()=>{r.disconnect()}},[T]),w(()=>{if(!s)return;const e=t=>{const r=t.detail;if(!r||typeof r.index!="number")return;const o=f.current,p=o?.getAttribute("data-easel-block")||o?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||A.current;r.id&&r.id!==p||u(r.index,!0)};return dt(f.current,e)},[s,u]);const c=_.length,l=Math.min(Math.max(Se,0),Math.max(0,c-1)),L=Oe===l,C=Fe({shown:pe,count:c}),W=Je({shown:xe,count:c}),Z=Ze({editing:s,shown:l,slides:_}),Ne=et({editing:s,playing:R,controlShown:Z}),S=Ue({count:c,editing:s}),h=d(null),x=d(null),Ae=v(e=>{if(h.current=null,x.current=null,!S||e.touches.length!==1)return;const t=e.touches[0];h.current={x:t.clientX,y:t.clientY},x.current={x:t.clientX,y:t.clientY}},[S]),Me=v(e=>{if(!h.current)return;if(e.touches.length!==1){h.current=null;return}const t=e.touches[0];x.current={x:t.clientX,y:t.clientY}},[]),Le=v(()=>{const e=h.current,t=x.current;if(h.current=null,x.current=null,!S||!e||!t)return;const r=We(t.x-e.x,t.y-e.y,b.current,c);r!==b.current&&u(r)},[S,c,u]);w(()=>{if(s||!z||J||L||M||c<=1)return;const t=Math.max(1,typeof O=="number"?O:6)*1e3,r=window.setTimeout(()=>u((l+1)%c),t);return()=>window.clearTimeout(r)},[s,z,O,J,L,M,c,l,u]),w(()=>{const e=[j.current,q.current,N.current].filter(Boolean),t=e.map(o=>te(o)),r=o=>{const p=o.target,P=p.closest("[data-hero-nav]");if(P&&!N.current?.contains(P))return;const D=P,ee=D??p.closest("[data-idx]");if(!ee)return;o.stopPropagation(),o.preventDefault();const I=D?Qe(D.dataset.heroNav,b.current,c):Number(ee.dataset.idx);Number.isNaN(I)||(u(I,s),oe(T(),"data-slide-name")[I]?.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,u,T,s]);const Ce=v(e=>{if(!e)return;const t=te(e),r=o=>{o.stopPropagation(),o.preventDefault(),He(p=>!p)};return e.addEventListener("click",r,{capture:!0}),()=>{t?.(),e.removeEventListener("click",r,{capture:!0})}},[]);return n(Ve.Provider,{value:{alignment:i,textureOpacity:y,textureOn:E,textureColor:g,quietVideo:Ne,phoneUpDown:ce,phoneSideways:ae,holdReel:()=>U(l),reelHeld:L,shownSlide:l,ratioMin:H},children:V(Pe,{ref:f,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${Ee} max-w-[var(--sf-hero-cap,none)] ${H?"overflow-clip":"overflow-hidden"}`,style:ge,onMouseEnter:()=>Q(!0),onMouseLeave:()=>Q(!1),onTouchStart:Ae,onTouchMove:Me,onTouchEnd:Le,children:[n(m,{className:H?"hero-track flex min-h-full [&>*]:min-h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full":"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:`translateX(-${l*100}%)`,transition:M?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),Z&&n("div",{ref:Ce,"data-hero-video-control":R?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${je} + 16px)`},children:V("button",{type:"button",className:it,children:[n("span",{"aria-hidden":"true",children:R?"❚❚":"▶"}),re(R?lt:at)]})}),(C||W)&&V("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:[C&&n(ze,{ref:j,slides:_,active:l,shape:Ke(ve),placement:be}),W&&n($e,{ref:N,shape:we,placement:ke})]}),C&&n("div",{ref:q,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===l?"w-5 bg-accent":"w-2 bg-white/45 hover:bg-white/70"}`},t))}),G&&a&&n("div",{className:"sf-hero-strip absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10",style:{background:ne(.55),...ot},children:n(a,{})}),_e&&Y.length>0&&n(ft,{editing:!!s,entrance:Re,children:n(Ie,{items:Y,backdrop:"dark-media"})})]})})}function ft({editing:m,entrance:a,children:i}){const y="sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5",E=m?{[Be]:""}:void 0,g={background:ne(.55)};return a?n(nt,{desktop:a.desktop,phone:a.phone,editing:m,boxClass:y,boxAttrs:E,boxStyle:g,children:i}):n("div",{className:y,...E,style:g,children:i})}export{$ as HERO_SLIDER_GOTO_EVENT,lt as HERO_VIDEO_HOLD_LABEL,at as HERO_VIDEO_PLAY_LABEL,mt as default,dt as subscribeSliderGoto};
1
+ "use client";import{jsx as n,jsxs as V}from"react/jsx-runtime";import{HideTaker as Ie}from"./ViewHideRoot.js";import{useCallback as v,useEffect as w,useId as Ve,useRef as u,useState as k}from"react";import{markOverlayPortal as re}from"../../format/lib/document/overlay-portal.js";import $e from"./Ticker.js";import{HeroSlideStyleContext as Be}from"./HeroSlide.js";import ze from"./HeroArrows.js";import Xe from"./Reel.js";import{TICKER_PART_ATTR as Ge}from"./PreviewTickerContext.js";import{useReducedMotion as Ye}from"./useReducedMotion.js";import{heroHeightBox as je,heroStoresRatio as qe}from"../../format/lib/content/section-height.js";import{HEADER_HEIGHT_CSS as Ke}from"../lib/document/header-clearance.js";import{nextReel as Fe,normaliseHeroReelShape as Je,reelShown as Qe}from"../../format/lib/reel.js";import{arrowsShown as Ue,arrowStep as We}from"../../format/lib/hero-arrows.js";import{swipeEnabled as Ze,swipeStep as et}from"../../format/lib/hero-swipe.js";import{videoControlShown as tt,videoHeld as rt}from"../../format/lib/hero-video-control.js";import{HERO_SLIDER_GOTO_EVENT as $}from"efficient-easel/draw";import{say as oe}from"../../format/lib/editor-words.js";import{markedChildren as ne}from"../../format/lib/marked-children.js";import{legacyTickerDrawn as ot,TICKER_MOTION_PART as se}from"../../format/lib/hero-ticker.js";import{ON_MEDIA_INK_STYLE as nt}from"../../format/lib/content/ink.js";import{HeroPartBox as st,heroPartScroll as ct}from"./HeroPictures.js";import{entranceDrawn as at}from"../lib/animation/entrance.js";import{readPartMotion as lt}from"../lib/animation/part-motion.js";import{scrim as ce}from"../../format/lib/content/scrim.js";const it="Play video",ut="Hold video",dt="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",mt=()=>oe("item"),ae=new Map;function ft(m,l){const d=m?.ownerDocument?.defaultView;if(d)return d.addEventListener($,l),()=>d.removeEventListener($,l)}function ht({slides:m,strip:l,alignment:d,textureOpacity:R,showTexture:T,textureColor:S,phoneUpDown:le,phoneSideways:ie,autoplay:B,autoplayInterval:O,showTicker:ue,tickerItems:z,heightDesktop:de,heightTablet:me,heightMobile:fe,heightFixed:he,heightFixedTablet:pe,heightFixedMobile:ve,showPicker:be,pickerShape:xe,pickerPlacement:we,showArrows:ke,arrowsShape:ye,arrowsPlacement:Ee,editing:s,partMotion:X}){const G=je({heightDesktop:de,heightTablet:me,heightMobile:fe,heightFixed:he,heightFixedTablet:pe,heightFixedMobile:ve}),{className:ge,style:_e}=G,H=qe(G),Y=(l?.blockCount??0)>0,Re=!Y&&ot({showTicker:ue,tickerItems:z}),j=(z??[]).map(e=>e?.text?.trim()?e.text:s?mt():"").filter(Boolean),Te=at(lt({_partMotion:X},se)),Se=ct(X,se),f=u(null),q=u(null),K=u(null),N=u(null),F=Ve(),A=u(F),[y,Oe]=k([]),[He,J]=k(0),b=u(0),[Q,U]=k(!1),[Ne,W]=k(null),[E,Ae]=k(!1),L=Ye(),g=v(()=>f.current?.querySelector(".hero-track")??null,[]),i=v((e,t=!1)=>{J(e),W(o=>o===e?o:null),b.current=e,ae.set(A.current,e);const r=f.current?.querySelector(".hero-track");if(r)if(t){const o=r.style.transition;r.style.transition="none",r.style.transform=`translateX(-${Math.max(0,e)*100}%)`,r.offsetHeight,r.style.transition=o}else r.style.transform=`translateX(-${Math.max(0,e)*100}%)`},[]);w(()=>{const e=f.current,t=e?.getAttribute("data-easel-block")||e?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||F;A.current=t;const r=ae.get(t);typeof r=="number"&&(J(r),b.current=r)},[]),w(()=>{const e=g();if(!e)return;const t=()=>{Oe(o=>Fe(o,ne(e,"data-slide-name")))};t();const r=new MutationObserver(t);return r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-slide-name","data-slide-process","data-slide-media"]}),()=>{r.disconnect()}},[g]),w(()=>{if(!s)return;const e=t=>{const r=t.detail;if(!r||typeof r.index!="number")return;const o=f.current,p=o?.getAttribute("data-easel-block")||o?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||A.current;r.id&&r.id!==p||i(r.index,!0)};return ft(f.current,e)},[s,i]);const c=y.length,a=Math.min(Math.max(He,0),Math.max(0,c-1)),M=Ne===a,C=Qe({shown:be,count:c}),Z=Ue({shown:ke,count:c}),ee=tt({editing:s,shown:a,slides:y}),Le=rt({editing:s,playing:E,controlShown:ee}),_=Ze({count:c,editing:s}),h=u(null),x=u(null),Me=v(e=>{if(h.current=null,x.current=null,!_||e.touches.length!==1)return;const t=e.touches[0];h.current={x:t.clientX,y:t.clientY},x.current={x:t.clientX,y:t.clientY}},[_]),Ce=v(e=>{if(!h.current)return;if(e.touches.length!==1){h.current=null;return}const t=e.touches[0];x.current={x:t.clientX,y:t.clientY}},[]),Pe=v(()=>{const e=h.current,t=x.current;if(h.current=null,x.current=null,!_||!e||!t)return;const r=et(t.x-e.x,t.y-e.y,b.current,c);r!==b.current&&i(r)},[_,c,i]);w(()=>{if(s||!B||Q||M||L||c<=1)return;const t=Math.max(1,typeof O=="number"?O:6)*1e3,r=window.setTimeout(()=>i((a+1)%c),t);return()=>window.clearTimeout(r)},[s,B,O,Q,M,L,c,a,i]),w(()=>{const e=[q.current,K.current,N.current].filter(Boolean),t=e.map(o=>re(o)),r=o=>{const p=o.target,P=p.closest("[data-hero-nav]");if(P&&!N.current?.contains(P))return;const D=P,te=D??p.closest("[data-idx]");if(!te)return;o.stopPropagation(),o.preventDefault();const I=D?We(D.dataset.heroNav,b.current,c):Number(te.dataset.idx);Number.isNaN(I)||(i(I,s),ne(g(),"data-slide-name")[I]?.click())};return e.forEach(o=>o.addEventListener("click",r,{capture:!0})),()=>{t.forEach(o=>o?.()),e.forEach(o=>o.removeEventListener("click",r,{capture:!0}))}},[c,i,g,s]);const De=v(e=>{if(!e)return;const t=re(e),r=o=>{o.stopPropagation(),o.preventDefault(),Ae(p=>!p)};return e.addEventListener("click",r,{capture:!0}),()=>{t?.(),e.removeEventListener("click",r,{capture:!0})}},[]);return n(Be.Provider,{value:{alignment:d,textureOpacity:R,textureOn:T,textureColor:S,quietVideo:Le,phoneUpDown:le,phoneSideways:ie,holdReel:()=>W(a),reelHeld:M,shownSlide:a,ratioMin:H},children:V(Ie,{ref:f,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${ge} max-w-[var(--sf-hero-cap,none)] ${H?"overflow-clip":"overflow-hidden"}`,style:_e,onMouseEnter:()=>U(!0),onMouseLeave:()=>U(!1),onTouchStart:Me,onTouchMove:Ce,onTouchEnd:Pe,children:[n(m,{className:H?"hero-track flex min-h-full [&>*]:min-h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full":"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:`translateX(-${a*100}%)`,transition:L?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),ee&&n("div",{ref:De,"data-hero-video-control":E?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${Ke} + 16px)`},children:V("button",{type:"button",className:dt,children:[n("span",{"aria-hidden":"true",children:E?"❚❚":"▶"}),oe(E?ut:it)]})}),(C||Z)&&V("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:[C&&n(Xe,{ref:q,slides:y,active:a,shape:Je(xe),placement:we}),Z&&n(ze,{ref:N,shape:ye,placement:Ee})]}),C&&n("div",{ref:K,className:"sf-hero-phone-dots absolute bottom-[80px] left-1/2 z-[6] hidden -translate-x-1/2 items-center gap-2",children:y.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===a?"w-5 bg-accent":"w-2 bg-white/45 hover:bg-white/70"}`},t))}),Y&&l&&n("div",{className:"sf-hero-strip absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10",style:{background:ce(.55),...nt},children:n(l,{})}),Re&&j.length>0&&n(pt,{editing:!!s,entrance:Te,scroll:Se,children:n($e,{items:j,backdrop:"dark-media"})})]})})}function pt({editing:m,entrance:l,scroll:d,children:R}){const T="sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5",S=m?{[Ge]:""}:void 0;return n(st,{entrance:l,scroll:d,editing:m,className:T,attrs:S,style:{background:ce(.55)},children:R})}export{$ as HERO_SLIDER_GOTO_EVENT,ut as HERO_VIDEO_HOLD_LABEL,it as HERO_VIDEO_PLAY_LABEL,ht as default,ft as subscribeSliderGoto};
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as L}from"react/jsx-runtime";import{HideTaker as ee}from"./ViewHideRoot.js";import{useRef as oe,useState as re}from"react";import te from"./HeroPoster.js";import{HeroMediaLayer as ie,heroMediaReading as se,HeroPickArea as ae,heroPartEntrance as ne,heroPartHover as ce,HeroPictureHover as le,heroPicturesHover as me,HeroTint as ue,HeroTwoPictures as de}from"./HeroPictures.js";import{HeroVideoBackdrop as he,HeroVideoPlayer as fe}from"./HeroVideoPlay.js";import{resolveMedia as t}from"../lib/media.js";import{heroHeightBox as pe,heroStoresRatio as ve}from"../../format/lib/content/section-height.js";import{DEFAULT_OVERLAY_POSITION as ge,overlayGradient as ye}from"../../format/lib/sections/hero-overlay.js";import{ON_MEDIA_INK_STYLE as be}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as c}from"../../format/lib/content/tint.js";import Pe from"./PhotoHoverSheet.js";function xe({overlay:S=100,overlayColor:j=c,overlayPosition:I=ge,mediaType:l="image",mediaSrc:i,poster:m,objectPosition:u,objectPositionPhone:d,objectPositionTablet:h,tintColor:f=c,tintOpacity:p=0,heightDesktop:E,heightMobile:A,heightFixed:V,heightFixedTablet:z,heightFixedMobile:M,boxes:v,videoSource:O,youtubeUrl:R,videoPlayback:B,mediaLayout:D,mediaLayoutPhone:F,mediaImage2:Y,objectPosition2:C,objectPosition2Phone:U,objectPosition2Tablet:$,tintColor2:G=c,tintOpacity2:K=0,editing:o=!1,partMotion:r}){const g=pe({heightDesktop:E,heightMobile:A,heightFixed:V,heightFixedTablet:z,heightFixedMobile:M}),{className:q,style:J}=g,y=ve(g),s=l==="video",b=s?t(i):void 0,P=s?t(m):t(i)??t(m),{fromYouTube:x,onClick:H,youTubeId:w,backgroundFile:T,desktopLayout:Q,phoneLayout:W,twoPictures:N}=se({isVideo:s,videoSource:O,videoPlayback:B,youtubeUrl:R,mediaLayout:D,mediaLayoutPhone:F}),[_,X]=re(!1),a=!_,Z=oe(null),n=l==="video"?"media":"image",k=me(r);return L(ee,{as:"section",ref:Z,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${q} max-w-[var(--sf-hero-cap,none)] ${y?"overflow-clip":"overflow-hidden"}`,style:J,...k.hostAttrs,children:[e(Pe,{sheet:k.sheet}),e(ie,{partMotion:r,editing:o,children:N?e(de,{desktopLayout:Q,phoneLayout:W,editing:o,partMotion:r,first:{src:i,objectPosition:u,objectPositionPhone:d,objectPositionTablet:h,tintColor:f,tintOpacity:p},second:{src:Y,objectPosition:C,objectPositionPhone:U,objectPositionTablet:$,tintColor:G,tintOpacity:K}}):e(ae,{part:n,editing:o,entrance:n==="image"?ne(r,"image"):null,className:"absolute inset-0 z-[1]",children:L(le,{treatment:n==="image"?ce(r,"image"):{},children:[e(te,{videoSrc:T?b:void 0,posterSrc:P,showVideo:T,objectPosition:u,objectPositionPhone:d,objectPositionTablet:h}),x&&e(he,{youTubeId:w,ownPoster:!!P,background:!H,editing:o})]})})}),H&&e(fe,{youTubeId:w,fileSrc:x?void 0:b,playing:_,onPlay:()=>X(!0),editing:o}),a&&!N&&e(ue,{color:f,opacity:p}),a&&e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:ye(j,I),opacity:Math.min(Math.max(S,0),100)/100}}),a&&v&&e("div",{className:[y?"sf-hero-group-layer relative min-h-full z-[3] mx-auto":"sf-hero-group-layer absolute inset-0 z-[3] mx-auto","max-w-[var(--sf-site-width,1600px)]","px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",o?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:be,children:e(v,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}export{xe as default};
1
+ "use client";import{jsx as e,jsxs as k}from"react/jsx-runtime";import{HideTaker as ee}from"./ViewHideRoot.js";import{useRef as oe,useState as re}from"react";import te from"./HeroPoster.js";import{HeroMediaLayer as ie,heroMediaReading as se,HeroPickArea as ae,heroPartEntrance as ne,heroPartHover as le,heroPartScroll as ce,heroPictureOrigins as me,HeroPictureHover as ue,heroPicturesHover as de,HeroTint as he,HeroTwoPictures as fe}from"./HeroPictures.js";import{HeroVideoBackdrop as pe,HeroVideoPlayer as ge}from"./HeroVideoPlay.js";import{resolveMedia as i}from"../lib/media.js";import{heroHeightBox as ve,heroStoresRatio as ye}from"../../format/lib/content/section-height.js";import{DEFAULT_OVERLAY_POSITION as xe,overlayGradient as He}from"../../format/lib/sections/hero-overlay.js";import{ON_MEDIA_INK_STYLE as Pe}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as u}from"../../format/lib/content/tint.js";import be from"./PhotoHoverSheet.js";function we({overlay:L=100,overlayColor:I=u,overlayPosition:E=xe,mediaType:d="image",mediaSrc:s,poster:h,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l,tintColor:f=u,tintOpacity:p=0,heightDesktop:A,heightMobile:O,heightFixed:V,heightFixedTablet:j,heightFixedMobile:z,boxes:g,videoSource:R,youtubeUrl:M,videoPlayback:B,mediaLayout:D,mediaLayoutPhone:F,mediaImage2:Y,objectPosition2:C,objectPosition2Phone:U,objectPosition2Tablet:$,tintColor2:G=u,tintOpacity2:K=0,editing:o=!1,partMotion:r}){const v=ve({heightDesktop:A,heightMobile:O,heightFixed:V,heightFixedTablet:j,heightFixedMobile:z}),{className:q,style:J}=v,y=ye(v),c=d==="video",x=c?i(s):void 0,H=c?i(h):i(s)??i(h),{fromYouTube:P,onClick:b,youTubeId:w,backgroundFile:T,desktopLayout:Q,phoneLayout:W,twoPictures:N}=se({isVideo:c,videoSource:R,videoPlayback:B,youtubeUrl:M,mediaLayout:D,mediaLayoutPhone:F}),[S,X]=re(!1),m=!S,Z=oe(null),t=d==="video"?"media":"image",_=de(r);return k(ee,{as:"section",ref:Z,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${q} max-w-[var(--sf-hero-cap,none)] ${y?"overflow-clip":"overflow-hidden"}`,style:J,..._.hostAttrs,children:[e(be,{sheet:_.sheet}),e(ie,{partMotion:r,editing:o,children:N?e(fe,{desktopLayout:Q,phoneLayout:W,editing:o,partMotion:r,first:{src:s,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l,tintColor:f,tintOpacity:p},second:{src:Y,objectPosition:C,objectPositionPhone:U,objectPositionTablet:$,tintColor:G,tintOpacity:K}}):e(ae,{part:t,editing:o,entrance:t==="image"?ne(r,"image"):null,scroll:t==="image"?ce(r,"image"):null,origins:me({objectPosition:a,objectPositionTablet:l,objectPositionPhone:n}),className:"absolute inset-0 z-[1]",children:k(ue,{treatment:t==="image"?le(r,"image"):{},children:[e(te,{videoSrc:T?x:void 0,posterSrc:H,showVideo:T,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l}),P&&e(pe,{youTubeId:w,ownPoster:!!H,background:!b,editing:o})]})})}),b&&e(ge,{youTubeId:w,fileSrc:P?void 0:x,playing:S,onPlay:()=>X(!0),editing:o}),m&&!N&&e(he,{color:f,opacity:p}),m&&e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:He(I,E),opacity:Math.min(Math.max(L,0),100)/100}}),m&&g&&e("div",{className:[y?"sf-hero-group-layer relative min-h-full z-[3] mx-auto":"sf-hero-group-layer absolute inset-0 z-[3] mx-auto","max-w-[var(--sf-site-width,1600px)]","px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",o?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:Pe,children:e(g,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}export{we as default};
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as F}from"react/jsx-runtime";import{useTakeViewHide as xe,withViewHide as ve}from"./ViewHideRoot.js";import{createContext as we,useContext as Se,useEffect as ge,useRef as He,useState as $}from"react";import be from"./HeroPoster.js";import{HeroMediaLayer as Pe,heroMediaReading as ke,HeroPickArea as Te,heroPartEntrance as Ee,heroPartHover as Le,HeroPictureHover as _e,heroPicturesHover as je,HeroTint as Ne,HeroTwoPictures as Oe}from"./HeroPictures.js";import{HeroVideoBackdrop as Ve,HeroVideoPlayer as Ce}from"./HeroVideoPlay.js";import{BelowFirstScreen as Ie,useFirstScreenPlace as Re}from"../lib/first-screen.js";import{markedChildren as ze}from"../../format/lib/marked-children.js";import{resolveMedia as s}from"../lib/media.js";import{heroPhoneStackStyle as Ae}from"../../format/lib/hero-phone-stack.js";import{heroTextureGradient as De,heroTextureShown as Fe}from"../../format/lib/hero-texture.js";import{ON_MEDIA_INK_STYLE as $e}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as B}from"../../format/lib/content/tint.js";import{overlayGradient as Be,slideOverlayState as Me}from"../../format/lib/sections/hero-overlay.js";import qe from"./PhotoHoverSheet.js";const Ue=we({});function Ye({name:x,process:a,mediaType:M="video",mediaSrc:n,videoSpeed:v,poster:w,objectPosition:S,objectPositionPhone:g,objectPositionTablet:H,tintColor:b=B,tintOpacity:P=0,groups:k,editing:t=!1,themeClassName:T,themeStyle:q,overlayColor:U,overlayPosition:Y,mediaLayout:G,mediaLayoutPhone:K,mediaImage2:J,objectPosition2:Q,objectPosition2Phone:W,objectPosition2Tablet:X,tintColor2:Z=B,tintOpacity2:ee=0,videoSource:oe,youtubeUrl:te,videoPlayback:re,partMotion:r,laterSlide:l=!1}){const d=xe(),{alignment:Ge="left",textureOpacity:E,textureOn:ie,textureColor:se,quietVideo:ae,phoneUpDown:ne,phoneSideways:le,holdReel:de,reelHeld:ce,shownSlide:c,ratioMin:L}=Se(Ue),ue=Re(),_=l&&ue==="first",j=He(null),[fe,pe]=$(c===void 0?void 0:!1);ge(()=>{const y=j.current;pe(c===void 0||!y?void 0:ze(y.closest(".hero-track"),"data-slide-name")[c]===y)});const o=M==="video",u=o?s(n):void 0,N=o?s(w):s(n)??s(w),me=typeof v=="number"?v/100:1,{fromYouTube:f,onClick:O,youTubeId:V,backgroundFile:p,desktopLayout:he,phoneLayout:ye,twoPictures:C}=ke({isVideo:o,videoSource:oe,videoPlayback:re,youtubeUrl:te,mediaLayout:G,mediaLayoutPhone:K}),[m,I]=$(!1);m&&ce===!1&&I(!1);const h=!m,i=Me({overlayColor:U,overlayPosition:Y},se),R=o?null:Ee(r,"image"),z=je(r),A=e(_e,{treatment:o?{}:Le(r,"image"),children:e(be,{videoSrc:p?u:void 0,posterSrc:N,showVideo:p,playbackRate:me,objectPosition:S,objectPositionPhone:o?void 0:g,objectPositionTablet:o?void 0:H,quiet:ae,slideShown:fe,laterSlide:l,laterOfLead:_})}),D=F("section",{ref:j,className:ve(`${L?"relative min-h-full w-full overflow-clip":"relative h-full w-full overflow-hidden"}${T?` ${T}`:""}`,d.className),...d.attrs,style:q,"data-slide-name":x??"","data-slide-process":a??"","data-slide-media":p&&u?"video":"still",...z.hostAttrs,children:[e(qe,{sheet:z.sheet}),e(Pe,{partMotion:r,editing:t,children:C?e(Oe,{laterSlide:l,desktopLayout:he,phoneLayout:ye,editing:t,marked:!1,partMotion:r,first:{src:n,objectPosition:S,objectPositionPhone:g,objectPositionTablet:H,tintColor:b,tintOpacity:P},second:{src:J,objectPosition:Q,objectPositionPhone:W,objectPositionTablet:X,tintColor:Z,tintOpacity:ee}}):f||R?F(Te,{part:o?"media":"image",editing:t,marked:!1,entrance:R,className:"absolute inset-0 z-[1]",children:[A,f&&e(Ve,{youTubeId:V,ownPoster:!!N,background:!O,editing:t})]}):A}),O&&e(Ce,{youTubeId:V,fileSrc:f?void 0:u,playing:m,onPlay:()=>{I(!0),de?.()},editing:t}),h&&!C&&e(Ne,{color:b,opacity:P,passClicks:!1}),h&&Fe(ie)&&e("div",{className:"absolute inset-0 z-[2]",style:{background:i.own?Be(i.color,i.position??void 0):De(i.color),...E!==void 0?{opacity:E/100}:null}}),h&&e("div",{className:[L?"sf-hero-group-layer relative min-h-full z-[3] mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14":"sf-hero-group-layer absolute inset-0 z-[3] mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",t?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{...$e,...Ae(ne,le)},children:k&&e(k,{className:"sf-hero-group-zone",minEmptyHeight:160})})]});return d.scope(_?e(Ie,{children:D}):D)}const co=Array.from({length:3},(x,a)=>({name:`Slide ${a+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));export{co as HERO_SLIDE_SEEDS,Ue as HeroSlideStyleContext,Ye as default};
1
+ "use client";import{jsx as e,jsxs as $}from"react/jsx-runtime";import{useTakeViewHide as Se,withViewHide as ge}from"./ViewHideRoot.js";import{createContext as ve,useContext as we,useEffect as He,useRef as ke,useState as B}from"react";import Pe from"./HeroPoster.js";import{HeroMediaLayer as be,heroMediaReading as Te,HeroPickArea as Ee,heroPartEntrance as Le,heroPartHover as Oe,heroPartScroll as _e,heroPictureOrigins as Ne,HeroPictureHover as Ve,heroPicturesHover as Ce,HeroTint as Ie,HeroTwoPictures as Re}from"./HeroPictures.js";import{HeroVideoBackdrop as je,HeroVideoPlayer as ze}from"./HeroVideoPlay.js";import{BelowFirstScreen as Ae,useFirstScreenPlace as De}from"../lib/first-screen.js";import{markedChildren as Fe}from"../../format/lib/marked-children.js";import{resolveMedia as s}from"../lib/media.js";import{heroPhoneStackStyle as $e}from"../../format/lib/hero-phone-stack.js";import{heroTextureGradient as Be,heroTextureShown as qe}from"../../format/lib/hero-texture.js";import{ON_MEDIA_INK_STYLE as Me}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as q}from"../../format/lib/content/tint.js";import{overlayGradient as Ue,slideOverlayState as Ye}from"../../format/lib/sections/hero-overlay.js";import Ge from"./PhotoHoverSheet.js";const Ke=ve({});function Je({name:v,process:a,mediaType:M="video",mediaSrc:n,videoSpeed:w,poster:H,objectPosition:l,objectPositionPhone:d,objectPositionTablet:c,tintColor:k=q,tintOpacity:P=0,groups:b,editing:r=!1,themeClassName:T,themeStyle:U,overlayColor:Y,overlayPosition:G,mediaLayout:K,mediaLayoutPhone:J,mediaImage2:Q,objectPosition2:W,objectPosition2Phone:X,objectPosition2Tablet:Z,tintColor2:ee=q,tintOpacity2:oe=0,videoSource:re,youtubeUrl:te,videoPlayback:ie,partMotion:t,laterSlide:u=!1}){const f=Se(),{alignment:Qe="left",textureOpacity:E,textureOn:se,textureColor:ae,quietVideo:ne,phoneUpDown:le,phoneSideways:de,holdReel:ce,reelHeld:ue,shownSlide:p,ratioMin:L}=we(Ke),fe=De(),O=u&&fe==="first",_=ke(null),[pe,me]=B(p===void 0?void 0:!1);He(()=>{const g=_.current;me(p===void 0||!g?void 0:Fe(g.closest(".hero-track"),"data-slide-name")[p]===g)});const o=M==="video",m=o?s(n):void 0,N=o?s(H):s(n)??s(H),he=typeof w=="number"?w/100:1,{fromYouTube:h,onClick:V,youTubeId:C,backgroundFile:y,desktopLayout:ye,phoneLayout:xe,twoPictures:I}=Te({isVideo:o,videoSource:re,videoPlayback:ie,youtubeUrl:te,mediaLayout:K,mediaLayoutPhone:J}),[x,R]=B(!1);x&&ue===!1&&R(!1);const S=!x,i=Ye({overlayColor:Y,overlayPosition:G},ae),j=o?null:Le(t,"image"),z=o?null:_e(t,"image"),A=Ce(t),D=e(Ve,{treatment:o?{}:Oe(t,"image"),children:e(Pe,{videoSrc:y?m:void 0,posterSrc:N,showVideo:y,playbackRate:he,objectPosition:l,objectPositionPhone:o?void 0:d,objectPositionTablet:o?void 0:c,quiet:ne,slideShown:pe,laterSlide:u,laterOfLead:O})}),F=$("section",{ref:_,className:ge(`${L?"relative min-h-full w-full overflow-clip":"relative h-full w-full overflow-hidden"}${T?` ${T}`:""}`,f.className),...f.attrs,style:U,"data-slide-name":v??"","data-slide-process":a??"","data-slide-media":y&&m?"video":"still",...A.hostAttrs,children:[e(Ge,{sheet:A.sheet}),e(be,{partMotion:t,editing:r,children:I?e(Re,{laterSlide:u,desktopLayout:ye,phoneLayout:xe,editing:r,marked:!1,partMotion:t,first:{src:n,objectPosition:l,objectPositionPhone:d,objectPositionTablet:c,tintColor:k,tintOpacity:P},second:{src:Q,objectPosition:W,objectPositionPhone:X,objectPositionTablet:Z,tintColor:ee,tintOpacity:oe}}):h||j||z?$(Ee,{part:o?"media":"image",editing:r,marked:!1,entrance:j,scroll:z,origins:Ne({objectPosition:l,objectPositionTablet:c,objectPositionPhone:d}),className:"absolute inset-0 z-[1]",children:[D,h&&e(je,{youTubeId:C,ownPoster:!!N,background:!V,editing:r})]}):D}),V&&e(ze,{youTubeId:C,fileSrc:h?void 0:m,playing:x,onPlay:()=>{R(!0),ce?.()},editing:r}),S&&!I&&e(Ie,{color:k,opacity:P,passClicks:!1}),S&&qe(se)&&e("div",{className:"absolute inset-0 z-[2]",style:{background:i.own?Ue(i.color,i.position??void 0):Be(i.color),...E!==void 0?{opacity:E/100}:null}}),S&&e("div",{className:[L?"sf-hero-group-layer relative min-h-full z-[3] mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14":"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:{...Me,...$e(le,de)},children:b&&e(b,{className:"sf-hero-group-zone",minEmptyHeight:160})})]});return f.scope(O?e(Ae,{children:F}):F)}const po=Array.from({length:3},(v,a)=>({name:`Slide ${a+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));export{po as HERO_SLIDE_SEEDS,Ke as HeroSlideStyleContext,Je as default};
@@ -1 +1 @@
1
- import{jsx as e,Fragment as re,jsxs as w}from"react/jsx-runtime";import{PagePicture as ie}from"../lib/first-screen.js";import{SiteLink as ae}from"../lib/site-runtime.js";import ne from"./BlockFrame.js";import{useCellPictureSizes as me}from"./BoxCellContext.js";import{useBoxCell as ce,useFillsCell as fe}from"./InBoxContext.js";import{useInsideSiteGutter as ue,useSectionEdge as de}from"./SiteGutterFrame.js";import{useSitePhotography as pe}from"./SitePhotographyContext.js";import{media as ge}from"../lib/media.js";import{CONTENT_SIZES as O,sizedImage as he}from"../../format/lib/sized-image.js";import{imageCornerStyle as Se}from"../../format/lib/content/image-corners.js";import{FILL_ROW as Ce,imageAspectClasses as Fe,imageFillFrom as Ne,imageAspectDrawn as we,imageAspectDrawsARatio as be,imageFocalPointActs as ve,imageFocalPointActsIn as P,imageAspectPhoneOf as _e,imageFillRowClasses as Ae,imageWidthFollowsBox as Ie}from"../../format/lib/content/image-aspect.js";import{drawsSiteGutter as $e}from"../../format/lib/content/site-gutter.js";import{imageFitClass as xe,parseImageFit as ye}from"../../format/lib/content/image-fit.js";import{SECTION_FILL_CLASS as Ee}from"../../format/lib/content/section-min-height.js";import{PICTURE_MOVE_SHEET as Re,PICTURE_WASH_CLASS as ke,PICTURE_ZOOM_CLASS as Oe,PICTURE_ZOOM_VAR as Pe,resolveImageTreatment as ze,resolvePictureMove as Te}from"../../format/lib/content/image-treatment.js";import{boxDarkenStyle as z}from"../../format/lib/content/box-background.js";import{phoneFocus as je}from"../../format/lib/content/phone-focus.js";import{say as We}from"../../format/lib/editor-words.js";import{sectionEdgeAttrs as Ge}from"../lib/content/section-edge.js";import T from"./PhotoHoverSheet.js";import Le from"./PictureWash.js";import Me from"./HoverMediaLayer.js";const Ue={picture:"var(--surface)",card:"var(--card-bg)"};function Be({src:l,alt:j,aspect:W,aspectPhone:r,contained:b,grayscale:G,pictureHover:a,hoverLayer:o,darken:L,darkenStyle:v,href:M,fit:U,focal:_,focalPhone:B,focalTablet:D,corners:Z,cornerSides:V,pad:A,ownSize:H=!1,editing:I=!1}){const m=ze(G,pe(),a),g=ce(),Y=fe(),h=de(),q=me(O),t=we(W,g?.picturesFillRow===!0),c=t===Ce,$=Ne(g?.fillFrom,g?.phoneRowFills===!0,r),f=c?Ae($):null,x=_e(t,r),i=ye(U,"cover"),J=h||!Ie(t,x,i)?O:q,y=Se(Z,V),K=ve(i,t,r),S=je(P("mobile",i,t,r)?B:void 0,P("tablet",i,t,r)?D:void 0),E={...m.style??{},..._&&K?{objectPosition:_}:{},...S.style},u=l?he(ge(l)):null,s=Te(a),C=s?a?.zoom??null:null,Q=z(L,v),X=s&&a?.darken?z(a.darken,v):null,R=s?{...s.style??{},...C?{[Pe]:C}:{}}:{},d=o&&l?e(Me,{media:o.media,name:o.name,cover:o.cover,ground:Ue[o.cover]}):null,F=l&&u?e(ie,{src:u.src,...u.srcSet?{srcSet:u.srcSet,sizes:J}:{},alt:j,className:`${f?`${f.img} `:""}h-full w-full ${be(t,r)?xe(i):""}${m.className?` ${m.className}`:""}${S.className?` ${S.className}`:""}`,...Object.keys(E).length?{style:E}:{}}):null,N=F?w(re,{children:[e(T,{sheet:m.sheet}),s?e(T,{sheet:s.sheet,name:Re}):null,C?e("div",{className:`${c?"absolute inset-0":"relative h-full w-full"} ${Oe}`,children:F}):F,e(Le,{wash:Q,hover:X,className:`pointer-events-none ${ke}`})]}):e("div",{className:"flex aspect-[16/9] items-center justify-center border border-dashed border-line font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim",children:We("Image — set a path")}),p=(M??"").trim(),ee=p&&l?p.startsWith("/")?e(ae,{href:p,className:"block h-full w-full",children:N}):e("a",{href:p,className:"block h-full w-full",children:N}):N,te=ue(),n=h&&!H?Ge(h):null,k=A?{values:A,frame:c?0:24}:void 0,se=k!==void 0&&$e(n?!1:b,te),le=c?Y||I||se?Ee:"":"py-6",oe=l&&i==="contain"?"":"bg-surface ";return!l&&!I?null:w(ne,{contained:n?!1:b,className:le,pad:k,...n?{fillWidth:n.className,style:n.style}:{},children:[e("figure",{...f?{className:f.figure}:{},children:w("div",{className:`relative w-full overflow-hidden ${oe}${Fe(t,x,$)}${s?` ${s.className}`:""}`,...y||Object.keys(R).length?{style:{...y,...R}}:{},children:[ee,d&&o?.cover==="picture"?d:null]})}),d&&o?.cover==="card"?d:null]})}export{Be as default};
1
+ import{jsx as e,Fragment as re,jsxs as w}from"react/jsx-runtime";import{PagePicture as ie}from"../lib/first-screen.js";import{SiteLink as ae}from"../lib/site-runtime.js";import me from"./BlockFrame.js";import{useCellPictureSizes as ne}from"./BoxCellContext.js";import{useBoxCell as ce,useFillsCell as fe}from"./InBoxContext.js";import{useInsideSiteGutter as ue,useSectionEdge as de}from"./SiteGutterFrame.js";import{useSitePhotography as pe}from"./SitePhotographyContext.js";import{media as ge}from"../lib/media.js";import{CONTENT_SIZES as O,sizedImage as he}from"../../format/lib/sized-image.js";import{imageCornerStyle as Se}from"../../format/lib/content/image-corners.js";import{FILL_ROW as Ce,imageAspectClasses as Fe,pictureLayerClass as Ne,imageFillFrom as we,imageAspectDrawn as _e,imageAspectDrawsARatio as be,imageFocalPointActs as ve,imageFocalPointActsIn as P,imageAspectPhoneOf as Ae,imageFillRowClasses as Ie,imageWidthFollowsBox as ye}from"../../format/lib/content/image-aspect.js";import{drawsSiteGutter as $e}from"../../format/lib/content/site-gutter.js";import{imageFitClass as xe,parseImageFit as Ee}from"../../format/lib/content/image-fit.js";import{SECTION_FILL_CLASS as Re}from"../../format/lib/content/section-min-height.js";import{PICTURE_MOVE_SHEET as ke,PICTURE_WASH_CLASS as Oe,PICTURE_ZOOM_CLASS as Pe,PICTURE_ZOOM_VAR as ze,resolveImageTreatment as Te,resolvePictureMove as je}from"../../format/lib/content/image-treatment.js";import{boxDarkenStyle as z}from"../../format/lib/content/box-background.js";import{phoneFocus as Le}from"../../format/lib/content/phone-focus.js";import{say as We}from"../../format/lib/editor-words.js";import{sectionEdgeAttrs as Ge}from"../lib/content/section-edge.js";import T from"./PhotoHoverSheet.js";import Me from"./PictureWash.js";import Ue from"./HoverMediaLayer.js";import{PictureZoom as Be}from"./PictureZoom.js";const De={picture:"var(--surface)",card:"var(--card-bg)"};function Ze({src:l,alt:j,aspect:L,aspectPhone:r,contained:_,grayscale:W,pictureHover:m,hoverLayer:o,darken:G,darkenStyle:b,href:M,fit:U,focal:v,focalPhone:B,focalTablet:D,corners:Z,cornerSides:V,pad:A,ownSize:H=!1,editing:I=!1}){const c=Te(W,pe(),m),p=ce(),Y=fe(),g=de(),q=ne(O),t=_e(L,p?.picturesFillRow===!0),h=t===Ce,y=we(p?.fillFrom,p?.phoneRowFills===!0,r),i=h?Ie(y):null,$=Ae(t,r),a=Ee(U,"cover"),J=g||!ye(t,$,a)?O:q,x=Se(Z,V),K=ve(a,t,r),S=Le(P("mobile",a,t,r)?B:void 0,P("tablet",a,t,r)?D:void 0),E={...c.style??{},...v&&K?{objectPosition:v}:{},...S.style},f=l?he(ge(l)):null,s=je(m),C=s?m?.zoom??null:null,Q=z(G,b),X=s&&m?.darken?z(m.darken,b):null,R=s?{...s.style??{},...C?{[ze]:C}:{}}:{},u=o&&l?e(Ue,{media:o.media,name:o.name,cover:o.cover,ground:De[o.cover]}):null,F=l&&f?e(ie,{src:f.src,...f.srcSet?{srcSet:f.srcSet,sizes:J}:{},alt:j,className:`${i?`${i.img} `:""}h-full w-full ${be(t,r)?xe(a):""}${c.className?` ${c.className}`:""}${S.className?` ${S.className}`:""}`,...Object.keys(E).length?{style:E}:{}}):null,N=F?w(re,{children:[e(T,{sheet:c.sheet}),s?e(T,{sheet:s.sheet,name:ke}):null,C?e("div",{className:`${Ne(i)} ${Pe}`,children:F}):F,e(Me,{wash:Q,hover:X,className:`pointer-events-none ${Oe}`})]}):e("div",{className:"flex aspect-[16/9] items-center justify-center border border-dashed border-line font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim",children:We("Image — set a path")}),d=(M??"").trim(),ee=d&&l?d.startsWith("/")?e(ae,{href:d,className:"block h-full w-full",children:N}):e("a",{href:d,className:"block h-full w-full",children:N}):N,te=ue(),n=g&&!H?Ge(g):null,k=A?{values:A,frame:h?0:24}:void 0,se=k!==void 0&&$e(n?!1:_,te),le=h?Y||I||se?Re:"":"py-6",oe=l&&a==="contain"?"":"bg-surface ";return!l&&!I?null:w(me,{contained:n?!1:_,className:le,pad:k,...n?{fillWidth:n.className,style:n.style}:{},children:[e("figure",{...i?{className:i.figure}:{},children:w("div",{className:`relative w-full overflow-hidden ${oe}${Fe(t,$,y)}${s?` ${s.className}`:""}`,...x||Object.keys(R).length?{style:{...x,...R}}:{},children:[e(Be,{fill:i,children:ee}),u&&o?.cover==="picture"?u:null]})}),u&&o?.cover==="card"?u:null]})}export{Ze as default};
@@ -29,6 +29,7 @@ export declare function CellWrap({ className, style, attrs, children, }: {
29
29
  export declare function CardCopyCell({ children }: {
30
30
  children: ReactNode;
31
31
  }): import("react").JSX.Element;
32
- export declare function SlotsStartAfresh({ children }: {
32
+ export declare function SlotsStartAfresh({ children, ownPictures }: {
33
33
  children: ReactNode;
34
+ ownPictures?: boolean;
34
35
  }): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as l}from"react/jsx-runtime";import{createContext as a,useContext as t}from"react";import{SECTION_FILL_CLASS as C}from"../../format/lib/content/section-min-height.js";import{useTakeViewHide as p,withViewHide as v}from"./ViewHideRoot.js";const x={stretchedRow:!1,fillingColumn:!1},r=a(null),y=()=>t(r)!==null,B=()=>t(r),F=()=>t(r)?.id??null,c=a(!1);function h(){const e=t(r)?.stretchedRow===!0,o=t(c);return e&&!o}const m=()=>t(c);function w(){const e=t(r),o=h(),n=m();return{fill:n?` ${C}`:"",inner:s=>{const i=o||n?l(c.Provider,{value:!0,children:s}):s;return e?.columnsRow?l(r.Provider,{value:{...e,columnsRow:!1},children:i}):i}}}function L({className:e,style:o,attrs:n,children:s}){const{fill:i,inner:u}=w(),d=p();return d.scope(l("div",{className:v(`${e}${i}`,d.className),...o?{style:o}:{},...n,...d.attrs,children:u(s)}))}const f=a(!1);function A({children:e}){return l(f.Provider,{value:!0,children:l(c.Provider,{value:!0,children:e})})}function H({children:e}){const o=t(r),n=t(f),s=t(c),i=n&&s,u=o===null?null:o.id===void 0?x:{...x,id:o.id};return l(r.Provider,{value:u,children:l(f.Provider,{value:!1,children:l(c.Provider,{value:i,children:e})})})}export{A as CardCopyCell,c as CellFillContext,L as CellWrap,r as InBoxContext,H as SlotsStartAfresh,B as useBoxCell,F as useBoxId,w as useCellLayer,h as useCellOfStretchedRow,m as useFillsCell,y as useInBox};
1
+ "use client";import{jsx as t}from"react/jsx-runtime";import{createContext as a,useContext as o}from"react";import{PictureZoomEnds as C}from"./PictureZoom.js";import{SECTION_FILL_CLASS as p}from"../../format/lib/content/section-min-height.js";import{useTakeViewHide as m,withViewHide as v}from"./ViewHideRoot.js";const x={stretchedRow:!1,fillingColumn:!1},n=a(null),F=()=>o(n)!==null,L=()=>o(n),A=()=>o(n)?.id??null,c=a(!1);function h(){const e=o(n)?.stretchedRow===!0,r=o(c);return e&&!r}const w=()=>o(c);function P(){const e=o(n),r=h(),l=w();return{fill:l?` ${p}`:"",inner:s=>{const i=r||l?t(c.Provider,{value:!0,children:s}):s;return e?.columnsRow?t(n.Provider,{value:{...e,columnsRow:!1},children:i}):i}}}function E({className:e,style:r,attrs:l,children:s}){const{fill:i,inner:d}=P(),u=m();return u.scope(t("div",{className:v(`${e}${i}`,u.className),...r?{style:r}:{},...l,...u.attrs,children:d(s)}))}const f=a(!1);function H({children:e}){return t(f.Provider,{value:!0,children:t(c.Provider,{value:!0,children:e})})}function N({children:e,ownPictures:r=!1}){const l=o(n),s=o(f),i=o(c),d=s&&i,u=l===null?null:l.id===void 0?x:{...x,id:l.id};return t(n.Provider,{value:u,children:t(f.Provider,{value:!1,children:t(c.Provider,{value:d,children:r?e:t(C,{children:e})})})})}export{H as CardCopyCell,c as CellFillContext,E as CellWrap,n as InBoxContext,N as SlotsStartAfresh,L as useBoxCell,A as useBoxId,P as useCellLayer,h as useCellOfStretchedRow,w as useFillsCell,F as useInBox};
@@ -15,7 +15,6 @@ interface Props {
15
15
  layout?: IntroBleedLayout;
16
16
  copyShareDesktop?: number;
17
17
  copyShareMobile?: number;
18
- sticky?: boolean;
19
18
  heightDesktop?: number;
20
19
  heightMobile?: number;
21
20
  overlay?: number;
@@ -28,5 +27,5 @@ interface Props {
28
27
  uppercase?: boolean;
29
28
  capStyle?: CSSProperties;
30
29
  }
31
- export default function IntroBleed({ eyebrow, title, body, cta, imageLabel, imageSrc, imageSrcMobile, layout, copyShareDesktop, copyShareMobile, sticky, heightDesktop, heightMobile, overlay, titleSizeDesktop, titleSizeMobile, bodySizeDesktop, bodySizeMobile, buttonColor, buttonTextColor, uppercase, capStyle, }: Props): import("react").JSX.Element;
30
+ export default function IntroBleed({ eyebrow, title, body, cta, imageLabel, imageSrc, imageSrcMobile, layout, copyShareDesktop, copyShareMobile, heightDesktop, heightMobile, overlay, titleSizeDesktop, titleSizeMobile, bodySizeDesktop, bodySizeMobile, buttonColor, buttonTextColor, uppercase, capStyle, }: Props): import("react").JSX.Element;
32
31
  export {};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t,Fragment as U}from"react/jsx-runtime";import{HideTaker as u}from"./ViewHideRoot.js";import W from"./Btn.js";import N from"./Placeholder.js";import X from"./SectionEyebrow.js";import{renderGold as _,renderHeadline as Z,splitParagraphs as ee}from"./goldPhrases.js";import{resolveTypeSize as i}from"../../format/lib/content/section-type-size.js";import{HEADER_HEIGHT_CSS as k}from"../lib/document/header-clearance.js";import{resolveSectionHeight as E}from"../../format/lib/content/section-height.js";import{INTRO_BLEED_COPY_SHARE as j,parseIntroBleedLayout as te,resolveCopyShare as S,INTRO_EDGE_CLASS as re}from"../../format/lib/sections/intro-bleed-layout.js";import{ON_MEDIA_INK_STYLE as oe}from"../../format/lib/content/ink.js";import{SCROLL_OVER_CLASS as w}from"../../format/lib/content/section-sticky.js";function ie({eyebrow:a,title:s,body:l,cta:n,imageLabel:d,imageSrc:c,imageSrcMobile:I,layout:L,copyShareDesktop:C,copyShareMobile:D,sticky:m=!0,heightDesktop:H,heightMobile:T,overlay:p,titleSizeDesktop:z,titleSizeMobile:O,bodySizeDesktop:R,bodySizeMobile:$,buttonColor:A,buttonTextColor:B,uppercase:M=!1,capStyle:h}){const r=te(L)==="stacked",x=o=>r?`calc(${E(o)} - ${k})`:E(o),F=x(H),G=x(T),P=i(z,"clamp(48px,7vw,96px)","heading","headingLarge"),Y=i(O,"clamp(36px,7vw,96px)","heading","headingLarge"),K=i(R,"17px","body","body"),V=i($,"16px","body","body"),q=p!=null?p/100:r?0:.6,v=A||"var(--btn)",J=B||"var(--btn-ink)",f={"--intro-h-d":F,"--intro-h-m":G,"--intro-title-d":P,"--intro-title-m":Y,"--intro-body-d":K,"--intro-body-m":V,...r?{"--intro-copy-d":S(C,j.desktop),"--intro-copy-m":S(D,j.mobile),marginTop:k}:{}},g=h?"px-[var(--sf-site-gutter,40px)] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]":`${re} px-[var(--intro-edge)]`,b=t(U,{children:[t("div",{className:"absolute inset-0",children:[e("div",{className:"absolute inset-0 hidden min-[960px]:block",children:e(N,{label:d,src:c})}),e("div",{className:"absolute inset-0 min-[960px]:hidden",children:e(N,{label:d,src:I||c})}),e("div",{className:"pointer-events-none absolute inset-0",style:{backgroundImage:"repeating-linear-gradient(45deg, transparent 0 80px, rgba(201,164,97,.04) 80px 81px)"}})]}),e("div",{className:"absolute inset-0",style:{background:`rgba(0,0,0,${q})`}})]}),y=t("div",{style:h,className:"flex flex-col gap-6",children:[a&&e(X,{text:a,size:14}),s&&e("h2",{className:["font-display font-medium leading-[0.95] tracking-[-0.03em]","text-[length:var(--intro-title-m)] min-[960px]:text-[length:var(--intro-title-d)]",M?"uppercase":""].join(" "),children:Z(s,!1)}),l&&ee(l).map((o,Q)=>e("p",{className:"max-w-[560px] leading-[1.6] opacity-85 text-[length:var(--intro-body-m)] min-[960px]:text-[length:var(--intro-body-d)]",children:_(o)},Q)),n.text&&e("div",{className:"mt-2 self-start",children:e(W,{href:n.href,variant:"ghost",style:{background:v,color:J,borderColor:v},children:_(n.text)})})]});return r?t(u,{as:"section",style:f,className:[m?`sticky top-0 ${w}`:"relative","flex flex-col","h-[var(--intro-h-m)] min-[960px]:h-[var(--intro-h-d)] min-h-[420px]","overflow-hidden p-0 z-[1]"].join(" "),children:[e("div",{className:["relative z-[2] flex shrink-0 flex-col justify-center bg-bg py-10","min-h-[var(--intro-copy-m)] min-[960px]:min-h-[var(--intro-copy-d)]",g].join(" "),style:{color:"var(--fg)"},children:y}),e("div",{className:"relative min-h-0 flex-1 overflow-hidden",children:b})]}):t(u,{as:"section",style:f,className:[m?`sticky top-0 ${w}`:"relative","h-[var(--intro-h-m)] min-[960px]:h-[var(--intro-h-d)] min-h-[420px]","overflow-hidden p-0 z-[1]","mx-auto w-full max-w-[var(--sf-bg-cap,none)]"].join(" "),children:[b,e("div",{className:["relative z-[2] flex h-full flex-col justify-center",g].join(" "),style:oe,children:y})]})}export{ie as default};
1
+ import{jsx as e,jsxs as t,Fragment as Q}from"react/jsx-runtime";import{HideTaker as y}from"./ViewHideRoot.js";import U from"./Btn.js";import u from"./Placeholder.js";import V from"./SectionEyebrow.js";import{renderGold as N,renderHeadline as W,splitParagraphs as X}from"./goldPhrases.js";import{resolveTypeSize as i}from"../../format/lib/content/section-type-size.js";import{HEADER_HEIGHT_CSS as _}from"../lib/document/header-clearance.js";import{resolveSectionHeight as j}from"../../format/lib/content/section-height.js";import{INTRO_BLEED_COPY_SHARE as k,parseIntroBleedLayout as Z,resolveCopyShare as E,INTRO_EDGE_CLASS as ee}from"../../format/lib/sections/intro-bleed-layout.js";import{ON_MEDIA_INK_STYLE as te}from"../../format/lib/content/ink.js";function re({eyebrow:a,title:l,body:s,cta:o,imageLabel:d,imageSrc:c,imageSrcMobile:w,layout:I,copyShareDesktop:S,copyShareMobile:D,heightDesktop:H,heightMobile:T,overlay:m,titleSizeDesktop:B,titleSizeMobile:C,bodySizeDesktop:L,bodySizeMobile:z,buttonColor:A,buttonTextColor:M,uppercase:O=!1,capStyle:p}){const r=Z(I)==="stacked",h=n=>r?`calc(${j(n)} - ${_})`:j(n),R=h(H),$=h(T),F=i(B,"clamp(48px,7vw,96px)","heading","headingLarge"),G=i(C,"clamp(36px,7vw,96px)","heading","headingLarge"),P=i(L,"17px","body","body"),Y=i(z,"16px","body","body"),K=m!=null?m/100:r?0:.6,x=A||"var(--btn)",q=M||"var(--btn-ink)",v={"--intro-h-d":R,"--intro-h-m":$,"--intro-title-d":F,"--intro-title-m":G,"--intro-body-d":P,"--intro-body-m":Y,...r?{"--intro-copy-d":E(S,k.desktop),"--intro-copy-m":E(D,k.mobile),marginTop:_}:{}},f=p?"px-[var(--sf-site-gutter,40px)] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]":`${ee} px-[var(--intro-edge)]`,g=t(Q,{children:[t("div",{className:"absolute inset-0",children:[e("div",{className:"absolute inset-0 hidden min-[960px]:block",children:e(u,{label:d,src:c})}),e("div",{className:"absolute inset-0 min-[960px]:hidden",children:e(u,{label:d,src:w||c})}),e("div",{className:"pointer-events-none absolute inset-0",style:{backgroundImage:"repeating-linear-gradient(45deg, transparent 0 80px, rgba(201,164,97,.04) 80px 81px)"}})]}),e("div",{className:"absolute inset-0",style:{background:`rgba(0,0,0,${K})`}})]}),b=t("div",{style:p,className:"flex flex-col gap-6",children:[a&&e(V,{text:a,size:14}),l&&e("h2",{className:["font-display font-medium leading-[0.95] tracking-[-0.03em]","text-[length:var(--intro-title-m)] min-[960px]:text-[length:var(--intro-title-d)]",O?"uppercase":""].join(" "),children:W(l,!1)}),s&&X(s).map((n,J)=>e("p",{className:"max-w-[560px] leading-[1.6] opacity-85 text-[length:var(--intro-body-m)] min-[960px]:text-[length:var(--intro-body-d)]",children:N(n)},J)),o.text&&e("div",{className:"mt-2 self-start",children:e(U,{href:o.href,variant:"ghost",style:{background:x,color:q,borderColor:x},children:N(o.text)})})]});return r?t(y,{as:"section",style:v,className:["relative flex flex-col","h-[var(--intro-h-m)] min-[960px]:h-[var(--intro-h-d)] min-h-[420px]","overflow-hidden p-0"].join(" "),children:[e("div",{className:["relative z-[2] flex shrink-0 flex-col justify-center bg-bg py-10","min-h-[var(--intro-copy-m)] min-[960px]:min-h-[var(--intro-copy-d)]",f].join(" "),style:{color:"var(--fg)"},children:b}),e("div",{className:"relative min-h-0 flex-1 overflow-hidden",children:g})]}):t(y,{as:"section",style:v,className:["relative","h-[var(--intro-h-m)] min-[960px]:h-[var(--intro-h-d)] min-h-[420px]","overflow-hidden p-0","mx-auto w-full max-w-[var(--sf-bg-cap,none)]"].join(" "),children:[g,e("div",{className:["relative z-[2] flex h-full flex-col justify-center",f].join(" "),style:te,children:b})]})}export{re as default};
@@ -1 +1 @@
1
- "use client";import{jsx as e}from"react/jsx-runtime";import{HideTaker as D,NO_HIDE as C,useTakeViewHide as B,withViewHide as k}from"./ViewHideRoot.js";import{useContext as T}from"react";import{SiteLink as W}from"../lib/site-runtime.js";import j,{FOOTER_LOGO_PX as y,WORDMARK_FIT_FLOOR_PX as F}from"./Logo.js";import{media as R}from"../lib/media.js";import{BoxSurfaceContext as P}from"./BoxSurfaceContext.js";import{useBoxCellHasWidth as A}from"./BoxCellContext.js";import{useInSiteHeader as M}from"./PhoneMenuTools.js";import{useSiteLogo as V}from"./SiteLogoContext.js";import{useLogoWall as z}from"./LogoWallContext.js";import{LogoWallMark as E}from"./Logos.js";import{useCardRow as G}from"./CardRowContext.js";import{alignViewClasses as I,BLOCK_ALIGN_JUSTIFY as K}from"../../format/lib/content/block-align.js";import{useInBox as X}from"./InBoxContext.js";function J(s){const o=z(),t=G();if(!o)return e(U,{...s});const m=(s.src??"").trim();return e(D,{className:"text-center",children:e(E,{src:m||void 0,alt:s.alt,look:o.look,logoHeight:o.logoHeight,grayscale:o.grayscale,kind:t?.row.kind})})}function U({src:s,alt:o,href:t,heightPx:m=y,reverse:H=!0,align:i,alignTablet:u,alignPhone:w,color:g=null}){const n=V(),p=(s??"").trim(),l=p?{src:R(p),reversedSrc:null,inkIsDark:null,wordmark:o?.trim()||null}:{src:n.src,reversedSrc:n.reversedSrc,inkIsDark:n.inkIsDark,wordmark:n.wordmark},v=T(P),x=M(),O=A(),r=!x&&O,a=B(),L={atSectionLine:!X()},N=!!(i||r||I("justify",i,u,w,L)),c=N?C:a,d=t||r?C:c,f=e(j,{variant:"footer",sizePx:m,src:l.src,reverse:H,color:g,reversedSrc:l.reversedSrc,inkIsDark:l.inkIsDark,wordmark:l.wordmark,siteName:n.siteName,fitToContainer:x,fitWordmarkToContainer:r,fitFloorPx:r?F:void 0,...v?.dark?{onLightSurface:!1}:{},...d.className?{hideClass:d.className,hideAttrs:d.attrs}:{}}),S=r?"inline-flex max-w-full overflow-x-clip":"inline-flex",h=t?e(W,{href:t,className:k(S,c.className),...c.attrs,children:f}):r?e("span",{className:k(S,c.className),...c.attrs,children:f}):f;if(!N)return a.scope(h);const _=["flex min-w-0",i?K[i]:"",I("justify",i,u,w,L),r?"[container-type:inline-size]":""].filter(Boolean).join(" ");return a.scope(e("div",{className:k(_,a.className),...a.attrs,children:h}))}export{J as default};
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import{HideTaker as W,NO_HIDE as g,useTakeViewHide as j,withViewHide as k}from"./ViewHideRoot.js";import{useContext as y}from"react";import{SiteLink as F}from"../lib/site-runtime.js";import R,{FOOTER_LOGO_PX as M,WORDMARK_FIT_FLOOR_PX as P}from"./Logo.js";import{media as A}from"../lib/media.js";import{BoxSurfaceContext as V}from"./BoxSurfaceContext.js";import{useBoxCellHasWidth as z}from"./BoxCellContext.js";import{useInSiteHeader as E}from"./PhoneMenuTools.js";import{useSiteLogo as G}from"./SiteLogoContext.js";import{useLogoWall as K}from"./LogoWallContext.js";import{LogoWallMark as X}from"./Logos.js";import{MarkZoom as H}from"./PictureZoom.js";import{useCardRow as J}from"./CardRowContext.js";import{alignViewClasses as v,BLOCK_ALIGN_JUSTIFY as U}from"../../format/lib/content/block-align.js";import{useInBox as Y}from"./InBoxContext.js";function Z(s){const o=K(),t=J();if(!o)return e(q,{...s});const m=(s.src??"").trim();return e(W,{className:"text-center",children:e(X,{src:m||void 0,alt:s.alt,look:o.look,logoHeight:o.logoHeight,grayscale:o.grayscale,kind:t?.row.kind})})}function q({src:s,alt:o,href:t,heightPx:m=M,reverse:O=!0,align:i,alignTablet:u,alignPhone:p,color:_=null}){const n=G(),w=(s??"").trim(),l=w?{src:A(w),reversedSrc:null,inkIsDark:null,wordmark:o?.trim()||null}:{src:n.src,reversedSrc:n.reversedSrc,inkIsDark:n.inkIsDark,wordmark:n.wordmark},D=y(V),x=E(),B=z(),r=!x&&B,a=j(),L={atSectionLine:!Y()},h=!!(i||r||v("justify",i,u,p,L)),c=h?g:a,d=t||r?g:c,N=e(R,{variant:"footer",sizePx:m,src:l.src,reverse:O,color:_,reversedSrc:l.reversedSrc,inkIsDark:l.inkIsDark,wordmark:l.wordmark,siteName:n.siteName,fitToContainer:x,fitWordmarkToContainer:r,fitFloorPx:r?P:void 0,...D?.dark?{onLightSurface:!1}:{},...d.className?{hideClass:d.className,hideAttrs:d.attrs}:{}}),C=r?"inline-flex max-w-full overflow-x-clip":"inline-flex",f=r?N:e(H,{children:N}),S=t?e(F,{href:t,className:k(C,c.className),...c.attrs,children:f}):r?e("span",{className:k(C,c.className),...c.attrs,children:f}):f,I=r?e(H,{inCell:!0,children:S}):S;if(!h)return a.scope(I);const T=["flex min-w-0",i?U[i]:"",v("justify",i,u,p,L),r?"[container-type:inline-size]":""].filter(Boolean).join(" ");return a.scope(e("div",{className:k(T,a.className),...a.attrs,children:I}))}export{Z as default};
@@ -1 +1 @@
1
- import{jsx as n,jsxs as d,Fragment as K}from"react/jsx-runtime";import{PagePicture as h}from"../lib/first-screen.js";import{PaymentMark as y,paymentMarkItems as P}from"efficient-shell/icons/payment";import D from"./BlockFrame.js";import{renderChrome as Y,renderGold as A,renderHeadline as Z}from"./goldPhrases.js";import{LogoWallProvider as M}from"./LogoWallContext.js";import{EMPTY_ELSE_CLASS as U,EMPTY_HIDES_CLASS as J,EmptyHidesStyle as V}from"../lib/content/empty-hides.js";import{media as S}from"../lib/media.js";import{sizedImage as v}from"../../format/lib/sized-image.js";import{stripMarkup as _}from"../../format/lib/markup.js";import{DEFAULT_LOGO_LOOK as X}from"../../format/lib/sections/logo-look.js";import{paymentRowMark as W}from"../lib/sections/payment-rows.js";import{alignViewClasses as q,BLOCK_ALIGN_JUSTIFY as H,blockAlignOf as Q}from"../../format/lib/content/block-align.js";import{FOOTER_MARK_SIZES as C}from"../../format/lib/document/box-footer.js";import{say as ee}from"../../format/lib/editor-words.js";const R={label:"text-[length:var(--size-label,13px)]"},f="sf-logo-wall",te="sf-logo-items",ne="flex flex-wrap items-center",re=(t,e,s)=>{const r=Q(t)??"center";return[ne,H[r],q("justify",r,e,s,{atSectionLine:!0})].filter(Boolean).join(" ")},$="plain",g={plain:{x:3.5,y:2},cards:{x:.75,y:.75},marks:{x:.75,y:.5}},L=t=>({columnGap:`${g[t].x}rem`,rowGap:`${g[t].y}rem`}),w=(t,e)=>`calc((100% - ${(t-1)*g[e].x}rem) / ${t})`;function se({items:t,contained:e,heading:s,columns:r,grayscale:c,logoHeight:o,bandPadding:a,logos:i,look:l=X,omitHead:m=!1,cards:p,align:u,alignTablet:j,alignPhone:k,labelledBy:G}){const x=re(u,j,k),N=l==="marks",B=r!=null?{flex:`0 0 ${w(r,$)}`}:void 0,O=!m;return d(D,{contained:e,fillWidth:N&&m?"w-auto max-w-full":void 0,className:O&&a==null?"py-10":"",style:!O||a==null?void 0:{paddingTop:`${a}px`,paddingBottom:`${a}px`},children:[!m&&s!=null&&s!==""?n("h2",{className:`mb-8 text-center font-mono ${R.label} uppercase tracking-[0.2em] text-fg-dim`,children:Z(s,!1)}):null,d(le,{listed:N,labelledBy:G,children:[p!==void 0?d(M,{value:{look:l,logoHeight:o,grayscale:c},children:[r!=null?n("style",{children:`.${f}-c${r}>*{flex:0 0 ${w(r,l)}}`}):null,n("div",{className:[f,r!=null?`${f}-c${r}`:"",x].filter(Boolean).join(" "),style:L(l),children:p})]}):i?d(M,{value:{look:l,logoHeight:o,grayscale:c},children:[n(V,{}),r!=null?n("style",{children:`.${f}-c${r}>*{flex:0 0 ${w(r,l)}}`}):null,n(i,{className:[f,J,r!=null?`${f}-c${r}`:"",x].filter(Boolean).join(" "),style:L(l),minEmptyHeight:80})]}):null,p!==void 0?null:n("div",{className:`${te} ${U} ${x}`,style:L($),children:(t??[]).map((b,F)=>n("div",{className:"text-center",style:B,children:n(ce,{src:b.src,alt:b.alt,look:$,logoHeight:o,grayscale:c})},F))})]})]})}function le({listed:t,labelledBy:e,children:s}){return t?n("div",{className:"contents",role:"list",...e?{"aria-labelledby":e}:{"aria-label":ee("Ways to pay")},children:s}):n(K,{children:s})}const E="font-mono text-[12px] uppercase tracking-[0.18em]";function z(t){const e=P({name:_(t)});return!e.length||e.length===1&&e[0].kind==="words"&&!e[0].glyph?[]:e}function I(t){const e=z(t);return e.length?n("span",{className:"flex items-center gap-3",children:e.map((s,r)=>n(y,{item:s,size:20,className:E},r))}):null}const ae=C.sm.mark,ie=Object.values(C),oe=t=>ie.reduce((e,s)=>Math.abs(s.mark-t)<Math.abs(e.mark-t)?s:e).words;function ce({src:t,alt:e,look:s,logoHeight:r,grayscale:c,kind:o,mark:a}){if(s==="marks"){const i=r??ae,l=!t&&o!==void 0?W({label:e,kind:o}):null,m=l?[l]:!t&&e?z(e):[];return n("span",{role:"listitem",className:"flex items-center gap-3",style:{fontSize:`${oe(i)}px`},children:a||(m.length?m.map((p,u)=>n(y,{item:p,size:i},u)):t?n(h,{...T(S(t)),alt:_(e||""),className:"w-auto",style:{height:`${i}px`}}):e&&n("span",{children:A(e)}))})}if(s==="cards"){const i=!t&&o!==void 0?W({label:e,kind:o}):null;return n("div",{className:"sf-card flex h-10 items-center border border-line bg-surface px-4",children:a||(i?n(y,{item:i,size:20,className:E}):!t&&e&&I(e)?I(e):t?n(h,{...T(S(t)),alt:_(e||""),className:c===!1?"max-h-5 w-auto opacity-90":"max-h-5 w-auto opacity-90 grayscale"}):e&&n("span",{className:E,children:A(e)}))})}return t?n(h,{...me(S(t)),alt:e,className:["mx-auto w-auto opacity-60 transition-opacity hover:opacity-100",r==null?"h-7":"",c===!1?"":"grayscale"].filter(Boolean).join(" "),style:r==null?void 0:{height:`${r}px`}}):n("span",{className:`font-mono ${R.label} uppercase tracking-[0.2em] text-fg-dim`,children:Y(e||"Logo")})}function T(t){const e=v(t,{fallbackWidth:320,maxWidth:640});return e.srcSet?{src:e.src,srcSet:e.srcSet,sizes:"120px"}:{src:t}}function me(t){const e=v(t,{fallbackWidth:640,maxWidth:960});return e.srcSet?{src:e.src,srcSet:e.srcSet,sizes:"240px"}:{src:t}}export{E as CARD_WORDS_CLASS,ce as LogoWallMark,se as default};
1
+ import{jsx as n,jsxs as u,Fragment as k}from"react/jsx-runtime";import{PagePicture as y}from"../lib/first-screen.js";import{PaymentMark as S,paymentMarkItems as P}from"efficient-shell/icons/payment";import D from"./BlockFrame.js";import{MarkZoom as x}from"./PictureZoom.js";import{renderChrome as Y,renderGold as A,renderHeadline as Z}from"./goldPhrases.js";import{LogoWallProvider as v}from"./LogoWallContext.js";import{EMPTY_ELSE_CLASS as U,EMPTY_HIDES_CLASS as J,EmptyHidesStyle as V}from"../lib/content/empty-hides.js";import{media as _}from"../lib/media.js";import{sizedImage as W}from"../../format/lib/sized-image.js";import{stripMarkup as $}from"../../format/lib/markup.js";import{DEFAULT_LOGO_LOOK as X}from"../../format/lib/sections/logo-look.js";import{paymentRowMark as C}from"../lib/sections/payment-rows.js";import{alignViewClasses as q,BLOCK_ALIGN_JUSTIFY as H,blockAlignOf as Q}from"../../format/lib/content/block-align.js";import{FOOTER_MARK_SIZES as R}from"../../format/lib/document/box-footer.js";import{say as ee}from"../../format/lib/editor-words.js";const z={label:"text-[length:var(--size-label,13px)]"},f="sf-logo-wall",te="sf-logo-items",ne="flex flex-wrap items-center",re=(t,e,l)=>{const r=Q(t)??"center";return[ne,H[r],q("justify",r,e,l,{atSectionLine:!0})].filter(Boolean).join(" ")},g="plain",O={plain:{x:3.5,y:2},cards:{x:.75,y:.75},marks:{x:.75,y:.5}},w=t=>({columnGap:`${O[t].x}rem`,rowGap:`${O[t].y}rem`}),b=(t,e)=>`calc((100% - ${(t-1)*O[e].x}rem) / ${t})`;function le({items:t,contained:e,heading:l,columns:r,grayscale:d,logoHeight:c,bandPadding:i,logos:s,look:a=X,omitHead:o=!1,cards:m,align:p,alignTablet:j,alignPhone:G,labelledBy:B}){const h=re(p,j,G),M=a==="marks",F=r!=null?{flex:`0 0 ${b(r,g)}`}:void 0,E=!o;return u(D,{contained:e,fillWidth:M&&o?"w-auto max-w-full":void 0,className:E&&i==null?"py-10":"",style:!E||i==null?void 0:{paddingTop:`${i}px`,paddingBottom:`${i}px`},children:[!o&&l!=null&&l!==""?n("h2",{className:`mb-8 text-center font-mono ${z.label} uppercase tracking-[0.2em] text-fg-dim`,children:Z(l,!1)}):null,u(ae,{listed:M,labelledBy:B,children:[m!==void 0?u(v,{value:{look:a,logoHeight:c,grayscale:d},children:[r!=null?n("style",{children:`.${f}-c${r}>*{flex:0 0 ${b(r,a)}}`}):null,n("div",{className:[f,r!=null?`${f}-c${r}`:"",h].filter(Boolean).join(" "),style:w(a),children:m})]}):s?u(v,{value:{look:a,logoHeight:c,grayscale:d},children:[n(V,{}),r!=null?n("style",{children:`.${f}-c${r}>*{flex:0 0 ${b(r,a)}}`}):null,n(s,{className:[f,J,r!=null?`${f}-c${r}`:"",h].filter(Boolean).join(" "),style:w(a),minEmptyHeight:80})]}):null,m!==void 0?null:n("div",{className:`${te} ${U} ${h}`,style:w(g),children:(t??[]).map((N,K)=>n("div",{className:"text-center",style:F,children:n(de,{src:N.src,alt:N.alt,look:g,logoHeight:c,grayscale:d})},K))})]})]})}function ae({listed:t,labelledBy:e,children:l}){return t?n("div",{className:"contents",role:"list",...e?{"aria-labelledby":e}:{"aria-label":ee("Ways to pay")},children:l}):n(k,{children:l})}const L="font-mono text-[12px] uppercase tracking-[0.18em]";function I(t){const e=P({name:$(t)});return!e.length||e.length===1&&e[0].kind==="words"&&!e[0].glyph?[]:e}function se({item:t,children:e}){return t.kind==="brand"?n(x,{children:e}):n(k,{children:e})}function ie(t){return t.length?n("span",{className:"flex items-center gap-3",children:t.map((e,l)=>n(S,{item:e,size:20,className:L},l))}):null}const oe=R.sm.mark,ce=Object.values(R),me=t=>ce.reduce((e,l)=>Math.abs(l.mark-t)<Math.abs(e.mark-t)?l:e).words;function de({src:t,alt:e,look:l,logoHeight:r,grayscale:d,kind:c,mark:i}){if(l==="marks"){const s=r??oe,a=!t&&c!==void 0?C({label:e,kind:c}):null,o=a?[a]:!t&&e?I(e):[];return n("span",{role:"listitem",className:"flex items-center gap-3",style:{fontSize:`${me(s)}px`},children:i||(o.length?o.map((m,p)=>n(se,{item:m,children:n(S,{item:m,size:s})},p)):t?n(x,{children:n(y,{...T(_(t)),alt:$(e||""),className:"w-auto",style:{height:`${s}px`}})}):e&&n("span",{children:A(e)}))})}if(l==="cards"){const s=!t&&c!==void 0?C({label:e,kind:c}):null,a=!i&&!s&&!t&&e?I(e):[],o=n("div",{className:"sf-card flex h-10 items-center border border-line bg-surface px-4",children:i||(s?n(S,{item:s,size:20,className:L}):a.length?ie(a):t?n(y,{...T(_(t)),alt:$(e||""),className:d===!1?"max-h-5 w-auto opacity-90":"max-h-5 w-auto opacity-90 grayscale"}):e&&n("span",{className:L,children:A(e)}))});return!i&&(t?!0:s?s.kind==="brand":a.length>0&&a.every(p=>p.kind==="brand"))?n(x,{children:o}):o}return t?n(x,{children:n(y,{...fe(_(t)),alt:e,className:["mx-auto w-auto opacity-60 transition-opacity hover:opacity-100",r==null?"h-7":"",d===!1?"":"grayscale"].filter(Boolean).join(" "),style:r==null?void 0:{height:`${r}px`}})}):n("span",{className:`font-mono ${z.label} uppercase tracking-[0.2em] text-fg-dim`,children:Y(e||"Logo")})}function T(t){const e=W(t,{fallbackWidth:320,maxWidth:640});return e.srcSet?{src:e.src,srcSet:e.srcSet,sizes:"120px"}:{src:t}}function fe(t){const e=W(t,{fallbackWidth:640,maxWidth:960});return e.srcSet?{src:e.src,srcSet:e.srcSet,sizes:"240px"}:{src:t}}export{L as CARD_WORDS_CLASS,de as LogoWallMark,le as default};
@@ -0,0 +1,24 @@
1
+ import { type CSSProperties, type ReactNode } from "react";
2
+ type GivenZoom = {
3
+ attrs: Readonly<Record<string, string>>;
4
+ style: CSSProperties;
5
+ };
6
+ export declare function PictureZoomGiven({ attrs, style, children }: GivenZoom & {
7
+ children: ReactNode;
8
+ }): import("react").JSX.Element;
9
+ export declare function PictureZoomEnds({ children }: {
10
+ children: ReactNode;
11
+ }): import("react").JSX.Element;
12
+ export declare function PictureZoom({ fill, children }: {
13
+ fill?: {
14
+ readonly img: string;
15
+ } | null;
16
+ children: ReactNode;
17
+ }): import("react").JSX.Element;
18
+ export declare const MARK_ATTR = "data-sf-mark";
19
+ export declare function measureMarkCap(mark: HTMLElement, zoom: number): number;
20
+ export declare function MarkZoom({ inCell, children }: {
21
+ inCell?: boolean;
22
+ children: ReactNode;
23
+ }): import("react").JSX.Element;
24
+ export {};
@@ -0,0 +1 @@
1
+ "use client";import{jsx as c,Fragment as x}from"react/jsx-runtime";import{createContext as v,useContext as y,useEffect as N,useRef as R,useState as A}from"react";import{ENTRANCE_WRAPPER_CLASS as P}from"../lib/animation/entrance.js";import{markZoomCap as S}from"../../format/lib/animation/mark-zoom.js";import{pictureLayerClass as Z}from"../../format/lib/content/image-aspect.js";const l=v(null);function z({attrs:t,style:o,children:e}){return c(l.Provider,{value:{attrs:t,style:o},children:e})}function T({children:t}){return c(l.Provider,{value:null,children:t})}function $({fill:t=null,children:o}){const e=y(l);return e?c("div",{className:Z(t),...e.attrs,style:e.style,children:o}):c(x,{children:o})}const a="data-sf-mark",g="--motion-zoom";function b(t){const o=t.getBoundingClientRect(),e=t.firstElementChild,s=e&&typeof e.offsetWidth=="number"?e:t,r=Math.max(s.offsetWidth,t.offsetWidth),n=Math.max(s.offsetHeight,t.offsetHeight);return{left:o.left+o.width/2-r/2,top:o.top+o.height/2-n/2,width:r,height:n}}function E(t){return t.closest(`[${a}]`)||t.closest("style, script")?!1:[...t.childNodes].some(o=>o.nodeType===3&&(o.textContent??"").trim()!=="")}const w=t=>t.closest(`.${P}`)??t.ownerDocument.body;function M(t,o){const e=w(t),s=[];for(const r of e.querySelectorAll(`[${a}]`))r!==t&&s.push({rect:b(r),mark:!0});for(const r of e.querySelectorAll("*")){if(r.contains(t)||!E(r))continue;const n=r.getBoundingClientRect();n.width===0||n.height===0||s.push({rect:{left:n.left,top:n.top,width:n.width,height:n.height},mark:!1})}return S(b(t),s,o)}function q({inCell:t=!1,children:o}){const e=y(l),s=R(null),[r,n]=A(null),u=e?Number.parseFloat(String(e.style[g])):Number.NaN;if(N(()=>{const i=s.current;if(!i||!Number.isFinite(u))return;const m=()=>n(M(i,u));m();const h=i.ownerDocument.defaultView?.ResizeObserver;if(!h)return;const f=new h(m),d=w(i);f.observe(i),f.observe(d);for(const p of d.querySelectorAll(`[${a}]`))p!==i&&f.observe(p);return()=>f.disconnect()},[u]),!e)return c(x,{children:o});const C=Number.isFinite(u)?{...e.style,[g]:String(r??1)}:e.style;return c("span",{ref:s,className:t?"inline-flex min-w-0 max-w-full items-center justify-center":"inline-flex items-center justify-center",[a]:"",...e.attrs,style:C,children:o})}export{a as MARK_ATTR,q as MarkZoom,$ as PictureZoom,T as PictureZoomEnds,z as PictureZoomGiven,M as measureMarkCap};
@@ -1 +1 @@
1
- "use client";import{jsx as a,jsxs as E}from"react/jsx-runtime";import{useEffect as k,useState as u}from"react";import{SiteImage as $}from"../lib/site-runtime.js";import{isExternalMediaUrl as C}from"../lib/media.js";import{useDeferredPicture as F}from"../lib/first-screen.js";import{sizedImage as _}from"../../format/lib/sized-image.js";import b from"./PhotoHoverSheet.js";import{useSizesWithinCell as j}from"./BoxCellContext.js";function D({fallback:p,className:y,src:h,alt:c="",objectPosition:l,objectFit:t="cover",sizes:f="100vw",sizesFromCell:g=!1,priority:S=!1,deferFetch:v=!1,showBackground:N=!0,treatment:e}){const x=F(),z=j(f),n=g?z:f,[i,o]=u(!1),[I,d]=u(!1),s=h||"";k(()=>{o(!1),d(!1)},[s]);const m=C(s),r=m&&!I?_(s):{src:s},w=!s||i;return E("div",{className:`relative h-full w-full overflow-hidden ${y??""}`,children:[a("div",{className:"absolute inset-0 flex items-center justify-center",style:N?{background:"var(--site-surface)"}:void 0,children:w?p:null}),s&&(m?a("img",{src:r.src,alt:c,...r.srcSet?{srcSet:r.srcSet,sizes:n}:{},decoding:"async",...v?{loading:"lazy"}:x,className:`absolute inset-0 h-full w-full${e?.className?` ${e.className}`:""}`,style:{display:i?"none":"block",objectFit:t,...l?{objectPosition:l}:{},...e?.style??{}},onError:()=>r.srcSet?d(!0):o(!0)}):a($,{src:s,alt:c,fill:!0,sizes:n,priority:S,...e?.className?{className:e.className}:{},style:{display:i?"none":"block",objectFit:t,...l?{objectPosition:l}:{},...e?.style??{}},onError:()=>o(!0)})),a(b,{sheet:e?.sheet})]})}export{D as default};
1
+ "use client";import{jsx as l,jsxs as w}from"react/jsx-runtime";import{useEffect as F,useState as u}from"react";import{SiteImage as _}from"../lib/site-runtime.js";import{isExternalMediaUrl as k}from"../lib/media.js";import{useDeferredPicture as $}from"../lib/first-screen.js";import{sizedImage as C}from"../../format/lib/sized-image.js";import L from"./PhotoHoverSheet.js";import{PictureZoom as M}from"./PictureZoom.js";import{FILLS_ITS_FRAME as P}from"../../format/lib/content/image-aspect.js";import{useSizesWithinCell as b}from"./BoxCellContext.js";function j({fallback:p,className:h,src:y,alt:c="",objectPosition:r,objectFit:t="cover",sizes:f="100vw",sizesFromCell:S=!1,priority:g=!1,deferFetch:v=!1,showBackground:N=!0,treatment:e}){const x=$(),z=b(f),m=S?z:f,[o,a]=u(!1),[I,n]=u(!1),s=y||"";F(()=>{a(!1),n(!1)},[s]);const d=k(s),i=d&&!I?C(s):{src:s},E=!s||o;return w("div",{className:`relative h-full w-full overflow-hidden ${h??""}`,children:[l("div",{className:"absolute inset-0 flex items-center justify-center",style:N?{background:"var(--site-surface)"}:void 0,children:E?p:null}),l(M,{fill:P,children:s&&(d?l("img",{src:i.src,alt:c,...i.srcSet?{srcSet:i.srcSet,sizes:m}:{},decoding:"async",...v?{loading:"lazy"}:x,className:`absolute inset-0 h-full w-full${e?.className?` ${e.className}`:""}`,style:{display:o?"none":"block",objectFit:t,...r?{objectPosition:r}:{},...e?.style??{}},onError:()=>i.srcSet?n(!0):a(!0)}):l(_,{src:s,alt:c,fill:!0,sizes:m,priority:g,...e?.className?{className:e.className}:{},style:{display:o?"none":"block",objectFit:t,...r?{objectPosition:r}:{},...e?.style??{}},onError:()=>a(!0)}))}),l(L,{sheet:e?.sheet})]})}export{j as default};
@@ -1 +1 @@
1
- "use client";import{Fragment as S,jsx as a,jsxs as C}from"react/jsx-runtime";import{createContext as x,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 g,partRuleForText as M,partStyleCss as k,publishedPartStyles as j}from"../lib/document/part-styles.js";import{usePhoneWidth as I}from"./SectionAnimation.js";import{useInBox as K}from"./InBoxContext.js";import{styleKeyForPart as L}from"../../format/lib/sections/section-text-kinds.js";import{NO_MOTIONS as N,PART_LIFT_ATTR as E,drawPartEntrance as B,ensurePartLiftSheet as D,firstOnPage as $,partBoxOf as H,partMotionDrawn as J,partMoves as W}from"../lib/animation/part-motion.js";const p=x(null),R=x(null),T=x(null);function te({needles:t,styles:n,motions:e=N,type:r,atEdge:d=!1,children:m}){const c=v(),s=K()||d,h=JSON.stringify([c,t,n,e,r]),o=O(()=>{const l=Object.keys(e).filter(u=>W(e[u]));return j(t,n,c,u=>L(r,u),u=>F(r,u),u=>l.includes(u)?J(e[u]):null,l)},[h]);if(!o)return a(S,{children:m});const i=k(o,{inBox:s});return C(S,{children:[i&&a("style",{href:`${Y}${c}-${q(i)}`,precedence:y,dangerouslySetInnerHTML:{__html:i.replace(/</g,"\\3c ")}}),a(p.Provider,{value:o,children:m})]})}const P=new WeakMap;function _(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)?(D(t.ownerDocument),t.setAttribute(E,"")):t.removeAttribute(E)}function ne(t){const n=w(null),e=t?.motion?.entrance??null,r=t?.motion?.hover==="lift",d=I(n,e!==null),m=JSON.stringify(e);return b(()=>{const c=n.current,s=H(c?.parentElement??null);if(!e&&!r||!c||!s)return;const h=e?()=>{const l=B(s,d?e.phone:e.desktop),u=A(s);return()=>{u?.(),l()}}:null,o=P.get(s)??[];P.set(s,o);const i={element:c,arm:h,lift:r};return o.push(i),_(s,o),()=>{const l=o.indexOf(i);l<0||(o.splice(l,1),i.undo?.(),i.undo=void 0,_(s,o),o.length||P.delete(s))}},[m,r,d]),n}const y="sf-part-styles",Y=`${y}-`;function q(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 re(t){const n=f(p),e=f(R),r=M(n,t);return r&&r.stamp!==e?r:null}function oe(t){return g(f(p),t)}function se({stamp:t,children:n}){return a(R.Provider,{value:t,children:n})}function ue({children:t}){const n=f(p);return a(T.Provider,{value:n,children:t})}function ie(t){return g(f(T),t)}export{se as ClaimedStamp,y as PART_STYLES_PRECEDENCE,te as PublishedPartStyles,ue as SharedPartKinds,ne as usePartEntrance,oe as usePublishedPartKindRule,re as usePublishedPartRule,ie as usePublishedSharedKindRule};
1
+ "use client";import{Fragment as R,jsx as p,jsxs as A}from"react/jsx-runtime";import{createContext as g,useContext as h,useEffect as F,useId as M,useMemo as j,useRef as I}from"react";import{armEntrance as K}from"efficient-shell/format";import{blockDrawsTextStyle as L,partRuleForKind as T,partRuleForText as N,partStyleCss as B,publishedPartStyles as D}from"../lib/document/part-styles.js";import{useViewWidth as $}from"./SectionAnimation.js";import{useInBox as H}from"./InBoxContext.js";import{styleKeyForPart as J}from"../../format/lib/sections/section-text-kinds.js";import{NO_MOTIONS as V,PART_LIFT_ATTR as _,drawPartEntrance as W,drawPartScroll as Y,ensurePartLiftSheet as q,firstOnPage as v,partBoxOf as z,partMotionDrawn as G,partMoves as Q}from"../lib/animation/part-motion.js";const x=g(null),w=g(null),C=g(null);function ce({needles:e,styles:n,motions:t=V,type:o,atEdge:r=!1,children:f}){const m=M(),S=H()||r,a=JSON.stringify([m,e,n,t,o]),c=j(()=>{const u=Object.keys(t).filter(s=>Q(t[s]));return D(e,n,m,s=>J(o,s),s=>L(o,s),s=>u.includes(s)?G(t[s]):null,u)},[a]);if(!c)return p(R,{children:f});const l=B(c,{inBox:S});return A(R,{children:[l&&p("style",{href:`${U}${m}-${X(l)}`,precedence:O,dangerouslySetInnerHTML:{__html:l.replace(/</g,"\\3c ")}}),p(x.Provider,{value:c,children:f})]})}const y=new WeakMap;function b(e,n){const t=v(n.filter(r=>r.arm)),o=n.some(r=>r.entering)?void 0:v(n.filter(r=>r.scroll));for(const r of n)r!==t&&r.undo&&(r.undo(),r.undo=void 0),r!==o&&r.undoScroll&&(r.undoScroll(),r.undoScroll=void 0);t?.arm&&!t.undo&&(t.undo=t.arm()),o?.scroll&&!o.undoScroll&&(o.undoScroll=o.scroll()),n.some(r=>r.lift)?(q(e.ownerDocument),e.setAttribute(_,"")):e.removeAttribute(_)}function ue(e){const n=I(null),t=e?.motion?.entrance??null,o=e?.motion?.scroll??null,r=e?.motion?.hover==="lift",f=$(n,t!==null||o!==null),m=JSON.stringify([t,o]),S=f==="phone",a=o?f:null;return F(()=>{const c=n.current,l=z(c?.parentElement??null);if(!t&&!o&&!r||!c||!l)return;const u=t?S?t.phone:t.desktop:null,s=u?()=>{const P=W(l,u),k=K(l);return()=>{k?.(),P()}}:null,E=o&&a&&o[a].effect!=="none"?o[a]:null,i=y.get(l)??[];y.set(l,i);const d={element:c,arm:s,entering:u!==null&&u.kind!=="none",scroll:E?()=>Y(l,E):null,lift:r};return i.push(d),b(l,i),()=>{const P=i.indexOf(d);P<0||(i.splice(P,1),d.undo?.(),d.undo=void 0,d.undoScroll?.(),d.undoScroll=void 0,b(l,i),i.length||y.delete(l))}},[m,r,S,a]),n}const O="sf-part-styles",U=`${O}-`;function X(e){let n=2166136261;for(let t=0;t<e.length;t+=1)n^=e.charCodeAt(t),n=Math.imul(n,16777619);return(n>>>0).toString(36)}function ie(e){const n=h(x),t=h(w),o=N(n,e);return o&&o.stamp!==t?o:null}function ae(e){return T(h(x),e)}function de({stamp:e,children:n}){return p(w.Provider,{value:e,children:n})}function fe({children:e}){const n=h(x);return p(C.Provider,{value:n,children:e})}function me(e){return T(h(C),e)}export{de as ClaimedStamp,O as PART_STYLES_PRECEDENCE,ce as PublishedPartStyles,fe as SharedPartKinds,ue as usePartEntrance,ae as usePublishedPartKindRule,ie as usePublishedPartRule,me as usePublishedSharedKindRule};
@@ -0,0 +1,14 @@
1
+ import { type CSSProperties, type ReactNode } from "react";
2
+ import type { ScrollOrigins, ScrollViews } from "../../format/lib/animation/scroll.js";
3
+ export declare function ScrollEffect({ views, origins, boxClass, boxAttrs, boxStyle, takesViewHide, atEdge, zoomInside, zoomLayerClass, children, }: {
4
+ views: ScrollViews;
5
+ origins?: ScrollOrigins;
6
+ boxClass?: string;
7
+ boxAttrs?: Readonly<Record<string, string>>;
8
+ boxStyle?: CSSProperties;
9
+ takesViewHide?: boolean;
10
+ atEdge?: boolean;
11
+ zoomInside?: "layer" | "picture";
12
+ zoomLayerClass?: string;
13
+ children: ReactNode;
14
+ }): ReactNode;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as r}from"react/jsx-runtime";import{useRef as R}from"react";import{SCROLL_EFFECTS_WITH_ZOOM as C,scrollAttrs as H}from"efficient-shell/format";import{NO_HIDE as L,useTakeViewHide as P,withViewHide as T}from"./ViewHideRoot.js";import{useCellLayer as $}from"./InBoxContext.js";import{useViewWidth as j}from"./SectionAnimation.js";import{ENTRANCE_WRAPPER_CLASS as k}from"../lib/animation/entrance.js";import{PictureZoomEnds as V,PictureZoomGiven as W}from"./PictureZoom.js";function M({views:a,origins:N={},boxClass:m,boxAttrs:n,boxStyle:s,takesViewHide:E=!1,atEdge:w=!1,zoomInside:_="layer",zoomLayerClass:v,children:d}){const t=R(null),i=$(),y=P(),e=E?y:L,o=j(t,!0,w),{attrs:l,style:c}=H(a[o],N[o]),u=C.includes(a[o].effect),f=T(`${k}${i.fill}${m?` ${m}`:""}`,e.className);if(u&&_==="picture")return e.scope(r("div",{ref:t,className:f,...n,...e.attrs,...s?{style:s}:{},children:r(W,{attrs:l,style:c,children:i.inner(d)})}));const p=r(V,{children:i.inner(d)});if(u){const h=v??(i.fill?"h-full":void 0);return e.scope(r("div",{ref:t,className:f,...n,...e.attrs,style:{...s,overflow:"clip"},children:r("div",{...h?{className:h}:{},...l,style:c,children:p})}))}const O=Object.keys(c).length||s?{style:{...s,...c}}:{};return e.scope(r("div",{ref:t,className:f,...n,...e.attrs,...l,...O,children:p}))}export{M as ScrollEffect};
@@ -0,0 +1,5 @@
1
+ import { type ReactNode } from "react";
2
+ export declare function ScrollProgressArm({ armed, children }: {
3
+ armed: boolean;
4
+ children?: ReactNode;
5
+ }): ReactNode;
@@ -0,0 +1 @@
1
+ "use client";import{useEffect as e}from"react";import{armScrollProgress as t}from"efficient-shell/format";function s({armed:r,children:o}){return e(()=>r?t():void 0,[r]),o}export{s as ScrollProgressArm};
@@ -1,6 +1,7 @@
1
1
  import { type CSSProperties, type ReactNode } from "react";
2
2
  import { type EntranceValue } from "efficient-shell/format";
3
3
  import { ENTRANCE_WRAPPER_CLASS } from "../lib/animation/entrance.js";
4
+ import type { ScrollView } from "../../format/lib/animation/scroll.js";
4
5
  export { ENTRANCE_WRAPPER_CLASS };
5
6
  export declare function SectionAnimation({ desktop, phone, editing, boxClass, boxAttrs, boxStyle, takesViewHide, atEdge, children, }: {
6
7
  desktop: EntranceValue;
@@ -25,6 +26,9 @@ export declare const entranceReplay: {
25
26
  };
26
27
  };
27
28
  export declare function phoneMediaOf(atEdge: boolean): string;
29
+ export declare function useViewWidth(ref: {
30
+ current: HTMLElement | null;
31
+ }, enabled?: boolean, atEdge?: boolean): ScrollView;
28
32
  export declare function usePhoneWidth(ref: {
29
33
  current: HTMLElement | null;
30
34
  }, enabled?: boolean, atEdge?: boolean): boolean;
@@ -1 +1 @@
1
- "use client";import{jsx as g}from"react/jsx-runtime";import{NO_HIDE as v,useTakeViewHide as D,withViewHide as H}from"./ViewHideRoot.js";import{useEffect as w,useRef as N,useState as M}from"react";import{armEntrance as R,entranceAttrs as k,playEntrance as I}from"efficient-shell/format";import{EDGE_PHONE_MEDIA as J,PHONE_MEDIA as L}from"../lib/content/view-values.js";import{useCellLayer as V,useInBox as $}from"./InBoxContext.js";import{ENTRANCE_WRAPPER_CLASS as O}from"../lib/animation/entrance.js";function F({desktop:e,phone:t,editing:r,boxClass:o,boxAttrs:n,boxStyle:s,takesViewHide:a=!1,atEdge:i=!1,children:c}){const u=N(null),d=V(),x=D(),f=a?x:v,l=C(u,!0,i),A=l?t:e,{attrs:P,style:y}=k(A),h=N(m.seed(e,t)),S=JSON.stringify(e),_=JSON.stringify(t);return w(()=>{const p=u.current;if(p){if(r){const E=m.next(h.current,e,t,l);h.current=E.seen,E.play&&I(p);return}return R(p)}},[S,_,l,r]),f.scope(g("div",{ref:u,className:H(`${O}${d.fill}${o?` ${o}`:""}`,f.className),...n,...f.attrs,...P,...Object.keys(y).length||s?{style:{...s,...y}}:{},children:d.inner(c)}))}const m={seed(e,t){return{desktop:JSON.stringify(e),phone:JSON.stringify(t)}},next(e,t,r,o){const n=m.seed(t,r);return{play:o?n.phone!==e.phone:n.desktop!==e.desktop,seen:n}}};function j(e){return e?J:L}function C(e,t=!0,r=!1){const[o,n]=M(!1),s=j($()||r);return w(()=>{if(!t)return;const a=e.current?.ownerDocument?.defaultView??(typeof window>"u"?null:window);if(!a?.matchMedia)return;const i=a.matchMedia(s),c=()=>n(i.matches);return c(),i.addEventListener("change",c),()=>i.removeEventListener("change",c)},[e,t,s]),o}export{O as ENTRANCE_WRAPPER_CLASS,F as SectionAnimation,m as entranceReplay,j as phoneMediaOf,C as usePhoneWidth};
1
+ "use client";import{jsx as L}from"react/jsx-runtime";import{NO_HIDE as V,useTakeViewHide as A,withViewHide as R}from"./ViewHideRoot.js";import{useEffect as v,useRef as g,useState as J}from"react";import{armEntrance as P,entranceAttrs as _,playEntrance as $}from"efficient-shell/format";import{useCellLayer as j,useInBox as H}from"./InBoxContext.js";import{ENTRANCE_WRAPPER_CLASS as x}from"../lib/animation/entrance.js";import{viewMediaOf as N}from"../lib/document/part-styles.js";function z({desktop:e,phone:t,editing:n,boxClass:i,boxAttrs:r,boxStyle:a,takesViewHide:f=!1,atEdge:p=!1,children:u}){const o=g(null),c=j(),s=A(),l=f?s:V,d=b(o,!0,p),O=d?t:e,{attrs:M,style:y}=_(O),w=g(h.seed(e,t)),S=JSON.stringify(e),k=JSON.stringify(t);return v(()=>{const m=o.current;if(m){if(n){const E=h.next(w.current,e,t,d);w.current=E.seen,E.play&&$(m);return}return P(m)}},[S,k,d,n]),l.scope(L("div",{ref:o,className:R(`${x}${c.fill}${i?` ${i}`:""}`,l.className),...r,...l.attrs,...M,...Object.keys(y).length||a?{style:{...a,...y}}:{},children:c.inner(u)}))}const h={seed(e,t){return{desktop:JSON.stringify(e),phone:JSON.stringify(t)}},next(e,t,n,i){const r=h.seed(t,n);return{play:i?r.phone!==e.phone:r.desktop!==e.desktop,seen:r}}};function F(e){return N(e).phone}function W(e,t=!0,n=!1){const[i,r]=J("desktop"),a=H()||n,{phone:f,tablet:p}=N(a);return v(()=>{if(!t)return;const u=e.current?.ownerDocument?.defaultView??(typeof window>"u"?null:window);if(!u?.matchMedia)return;const o=u.matchMedia(f),c=u.matchMedia(p),s=()=>r(o.matches?"phone":c.matches?"tablet":"desktop");return s(),o.addEventListener("change",s),c.addEventListener("change",s),()=>{o.removeEventListener("change",s),c.removeEventListener("change",s)}},[e,t,f,p]),i}function b(e,t=!0,n=!1){return W(e,t,n)==="phone"}export{x as ENTRANCE_WRAPPER_CLASS,z as SectionAnimation,h as entranceReplay,F as phoneMediaOf,b as usePhoneWidth,W as useViewWidth};
@@ -1 +1 @@
1
- import{jsx as a,jsxs as n,Fragment as B}from"react/jsx-runtime";import{PagePicture as D}from"../lib/first-screen.js";import{SiteLink as S}from"../lib/site-runtime.js";import{media as R}from"../lib/media.js";import{sizedImage as j}from"../../format/lib/sized-image.js";import{DEFAULT_SECTION_NUMBER_STYLE as C,OUTLINED_NUMBER_CLASS as F,OUTLINED_NUMBER_CSS as A,OUTLINED_NUMBER_LAYOUT as X,parseSectionNumberStyle as Y}from"../../format/lib/sections/section-number-style.js";import{DEFAULT_SECTION_EYEBROW_LOOK as P}from"../../format/lib/sections/section-eyebrow-look.js";import{STICKY_UNDERHEADER_CLASS as W}from"../lib/document/header-clearance.js";import{renderGold as Z,renderHeadline as K}from"./goldPhrases.js";import x from"./SectionEyebrow.js";const t={headingMediumUpTo800Small:"max-view-wide:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",headingMediumUpTo800Large:"max-view-wide:text-[length:min(var(--size-headingMedium,36px),var(--sf-heading-max,9999px))]",headingSmallUpTo800:"max-view-wide:text-[length:var(--size-headingSmall,28px)]",headingMedium2:"text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))]",headingMedium3:"text-[length:min(var(--size-headingMedium,56px),var(--sf-heading-max,9999px))]",headingMedium1:"text-[length:var(--sf-heading-max,var(--size-headingMedium,38px))]",bodySmall:"text-[length:var(--size-body,14px)]",bodyLarge:"text-[length:var(--size-body,16px)]",label:"text-[length:var(--size-label,14px)]",shelfLabel:"text-[length:var(--size-label,13px)]",shelfLabelSmall:"text-[length:var(--size-label,12px)]",shelfBody:"text-[length:var(--size-body,13px)]",shelfHeadingUpTo800Xs:"max-view-wide:text-[length:var(--size-headingMedium,28px)]",shelfHeadingUpTo800Small:"max-view-wide:text-[length:var(--size-headingMedium,32px)]",shelfHeadingUpTo800Large:"max-view-wide:text-[length:var(--size-headingMedium,36px)]",shelfHeadingUpTo800Xl:"max-view-wide:text-[length:var(--size-headingMedium,40px)]",shelfHeading1:"text-[length:var(--size-headingMedium,40px)]",shelfHeading2:"text-[length:var(--size-headingMedium,48px)]",shelfHeading3:"text-[length:var(--size-headingMedium,56px)]",shelfHeading4:"text-[length:var(--size-headingMedium,64px)]"},T=[{value:"para",label:"Paragraph size — 13px",cls:`font-mono font-normal uppercase tracking-[0.22em] ${t.shelfLabel}`},{value:"sm",label:"Small — 40px",cls:`font-heading2 font-medium tracking-[-0.03em] ${t.shelfHeading1} ${t.shelfHeadingUpTo800Xs}`},{value:"md",label:"Medium — 48px",cls:`font-heading2 font-medium tracking-[-0.03em] ${t.shelfHeading2} ${t.shelfHeadingUpTo800Small}`},{value:"lg",label:"Large — 56px",cls:`font-heading2 font-medium tracking-[-0.03em] ${t.shelfHeading3} ${t.shelfHeadingUpTo800Large}`},{value:"xl",label:"Extra large — 64px",cls:`font-heading2 font-medium tracking-[-0.03em] ${t.shelfHeading4} ${t.shelfHeadingUpTo800Xl}`}],G="lg";function q(e){return(T.find(i=>i.value===e)??T.find(i=>i.value===G)).cls}const g=(e,i=!1)=>typeof e=="string"?K(e,i):e,r=(e,i=!1)=>typeof e=="string"?Z(e,i):e;function J({num:e,title:i,link:l,logo:f,description:d,accent:w,accentNum:M,numStyle:E=C,look:m="standard",titleAccent:v,accentTracking:_="-0.02em",spaceBelow:y,rowGap:z,descriptionSize:L,className:h="",eyebrowLook:c=P,titleSize:U,count:u,capped:H=!1}){const o=y??(m==="editorial"?"mb-[60px]":"");if(m==="shelf")return e||i||d||l?n("div",{className:`${W} sticky top-[var(--sf-header-h,88px)] z-30 mb-5 flex items-center justify-between gap-4 max-view-wide:flex-wrap max-view-wide:gap-y-2 border-b border-line bg-bg/95 py-3 backdrop-blur-md ${H?"":"-mx-[var(--sf-site-gutter,40px)] px-[var(--sf-site-gutter,40px)] max-view-wide:-mx-[min(20px,var(--sf-site-gutter,40px))] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]"}`,children:[n("div",{className:"flex min-w-0 items-end gap-6 max-view-wide:flex-col max-view-wide:items-stretch max-view-wide:gap-3",children:[e&&a("span",{className:`font-mono ${t.shelfLabel} leading-none uppercase tracking-[0.22em] text-fg-dim`,children:r(e)}),i&&a("h2",{className:`${q(U)} leading-none text-fg max-view-wide:leading-[1] [&>span]:block`,children:g(i)})]}),(d||l||u)&&n("div",{className:"flex items-center gap-5 max-view-wide:gap-3 view-wide:grow view-wide:justify-end",children:[d&&a("span",{className:`max-w-[340px] truncate font-display ${t.shelfBody} leading-[1.4] text-fg-dim max-view-wide:hidden view-wide:w-0 view-wide:grow view-wide:text-right`,children:r(d)}),l&&n(S,{href:l.href,className:`inline-flex items-center gap-2 whitespace-nowrap font-mono ${t.shelfLabel} uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg`,children:[r(l.text),a("span",{"aria-hidden":!0,children:"→"})]}),u&&a("span",{className:`whitespace-nowrap font-mono ${t.shelfLabelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:u})]})]}):null;if(m==="editorial"){const s=!!i||!!v;return n("header",{className:`${o} grid grid-cols-[auto_1fr_auto] items-end gap-10 border-b border-line pb-8 max-view-desktop:grid-cols-1 max-view-desktop:gap-3.5 ${h}`.trim(),children:[e&&(typeof e=="string"?a(x,{text:e,className:"pb-2"}):a("span",{className:"pb-2",children:e})),s&&n("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(40px,5.5vw,80px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em]",children:[i,v&&n(B,{children:[" ",a("em",{className:"font-serif font-normal italic text-accent",style:{letterSpacing:_},children:v})]})]}),d&&a("p",{className:`max-w-[360px] pb-1 text-right font-display ${t.bodySmall} leading-[1.5] text-fg-dim max-view-desktop:max-w-full max-view-desktop:text-left`,children:d})]})}if(m==="simple"){const s=`${o} ${h}`.trim();return n("div",{className:s||void 0,children:[e&&(typeof e=="string"?a(x,{text:e,look:c,className:"mb-4 block"}):a("span",{className:"mb-4 block",children:e})),i&&a("h2",{className:`font-heading2 ${t.headingMedium2} font-medium uppercase leading-none tracking-[-0.02em] text-fg ${t.headingMediumUpTo800Small}`,children:g(i)})]})}if(m==="statement"){const s=`${o} ${h}`.trim();return n("div",{className:s||void 0,children:[e&&(typeof e=="string"?a(x,{text:e,look:c,className:"mb-4 block"}):a("span",{className:"mb-4 block",children:e})),i&&a("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(40px,5vw,72px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em] text-fg",children:g(i,!0)})]})}if(m==="natural"){const s=`flex max-w-[680px] flex-col ${z??"gap-5"} ${o} ${h}`.replace(/\s+/g," ").trim();return n("div",{className:s,children:[e&&(typeof e=="string"?a(x,{text:e,look:c}):a("span",{children:e})),i&&a("h2",{className:`font-heading2 ${t.headingMedium2} font-medium leading-[1.05] tracking-[-0.03em] ${t.headingMediumUpTo800Small}`,children:g(i)}),d&&a("p",{className:`${L??`${t.bodyLarge}`} leading-[1.6] opacity-85`,children:d})]})}if(m==="essay"){const s=`${o} ${h}`.trim();return n("div",{className:s||void 0,children:[e&&(typeof e=="string"?a(x,{text:e,look:c,className:"mb-4 block"}):a("span",{className:"mb-4 block",children:e})),i&&a("h2",{className:`font-heading2 ${t.headingMedium1} [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-none tracking-[-0.02em] text-fg ${t.headingSmallUpTo800}`,children:g(i)})]})}const k=!!d||!!l,I=!!i,b=Y(E)==="outlined",N=`font-mono ${t.label} uppercase tracking-[0.3em]`;let p=null;if(e)if(b)p=a("span",{className:`${X} text-fg-dim ${F}`,children:r(e)});else if(M&&!w&&typeof e=="string"){const s=e.indexOf("/"),O=s===-1?e:e.slice(0,s),$=s===-1?"":e.slice(s);p=n("span",{className:N,children:[a("span",{className:"text-accent",children:r(O)}),$&&a("span",{className:"text-fg-dim",children:r($)})]})}else p=a("span",{className:`${N} ${w?"text-accent":"text-fg-dim"}`,children:r(e)});return n("div",{className:"mb-16 grid grid-cols-[auto_1fr_auto] items-end gap-10 border-b border-line pb-6 max-view-wide:mb-9 max-view-wide:grid-cols-1 max-view-wide:gap-3 max-view-wide:pb-5",children:[b&&e&&a("style",{children:A}),n("div",{className:"flex flex-col items-start gap-3",children:[f?.src&&a(D,{...Q(R(f.src)),alt:f.alt,className:"h-8 w-auto object-contain"}),p]}),I&&a("h2",{className:w?"font-heading2 text-[length:min(var(--size-headingMedium,clamp(36px,5vw,64px)),var(--sf-heading-max,9999px))] [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-[0.95] tracking-[-0.025em]":`font-heading2 ${t.headingMedium3} [font-weight:var(--sf-heading-weight,500)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-none tracking-[-0.03em] whitespace-pre-line ${t.headingMediumUpTo800Large} max-view-wide:leading-[1]`,children:g(i)}),k&&n("div",{className:"flex flex-col items-end gap-3 max-view-wide:items-start",children:[d&&a("p",{className:`max-w-[340px] font-display ${t.bodySmall} leading-[1.5] text-fg-dim text-right max-view-wide:max-w-full max-view-wide:text-left`,children:r(d)}),l&&n(S,{href:l.href,className:`inline-flex items-center gap-2 whitespace-nowrap font-mono ${t.label} uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg`,children:[r(l.text),a("span",{"aria-hidden":!0,children:"→"})]})]})]})}function Q(e){const i=j(e,{fallbackWidth:640,maxWidth:960});return i.srcSet?{src:i.src,srcSet:i.srcSet,sizes:"240px"}:{src:e}}export{G as DEFAULT_SHELF_TITLE_SIZE,T as SHELF_TITLE_SIZES,J as default};
1
+ import{jsx as a,jsxs as n,Fragment as B}from"react/jsx-runtime";import{PagePicture as D}from"../lib/first-screen.js";import{MarkZoom as R}from"./PictureZoom.js";import{SiteLink as S}from"../lib/site-runtime.js";import{media as j}from"../lib/media.js";import{sizedImage as C}from"../../format/lib/sized-image.js";import{DEFAULT_SECTION_NUMBER_STYLE as F,OUTLINED_NUMBER_CLASS as A,OUTLINED_NUMBER_CSS as X,OUTLINED_NUMBER_LAYOUT as Y,parseSectionNumberStyle as Z}from"../../format/lib/sections/section-number-style.js";import{DEFAULT_SECTION_EYEBROW_LOOK as P}from"../../format/lib/sections/section-eyebrow-look.js";import{STICKY_UNDERHEADER_CLASS as W}from"../lib/document/header-clearance.js";import{renderGold as K,renderHeadline as G}from"./goldPhrases.js";import x from"./SectionEyebrow.js";const t={headingMediumUpTo800Small:"max-view-wide:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",headingMediumUpTo800Large:"max-view-wide:text-[length:min(var(--size-headingMedium,36px),var(--sf-heading-max,9999px))]",headingSmallUpTo800:"max-view-wide:text-[length:var(--size-headingSmall,28px)]",headingMedium2:"text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))]",headingMedium3:"text-[length:min(var(--size-headingMedium,56px),var(--sf-heading-max,9999px))]",headingMedium1:"text-[length:var(--sf-heading-max,var(--size-headingMedium,38px))]",bodySmall:"text-[length:var(--size-body,14px)]",bodyLarge:"text-[length:var(--size-body,16px)]",label:"text-[length:var(--size-label,14px)]",shelfLabel:"text-[length:var(--size-label,13px)]",shelfLabelSmall:"text-[length:var(--size-label,12px)]",shelfBody:"text-[length:var(--size-body,13px)]",shelfHeadingUpTo800Xs:"max-view-wide:text-[length:var(--size-headingMedium,28px)]",shelfHeadingUpTo800Small:"max-view-wide:text-[length:var(--size-headingMedium,32px)]",shelfHeadingUpTo800Large:"max-view-wide:text-[length:var(--size-headingMedium,36px)]",shelfHeadingUpTo800Xl:"max-view-wide:text-[length:var(--size-headingMedium,40px)]",shelfHeading1:"text-[length:var(--size-headingMedium,40px)]",shelfHeading2:"text-[length:var(--size-headingMedium,48px)]",shelfHeading3:"text-[length:var(--size-headingMedium,56px)]",shelfHeading4:"text-[length:var(--size-headingMedium,64px)]"},T=[{value:"para",label:"Paragraph size — 13px",cls:`font-mono font-normal uppercase tracking-[0.22em] ${t.shelfLabel}`},{value:"sm",label:"Small — 40px",cls:`font-heading2 font-medium tracking-[-0.03em] ${t.shelfHeading1} ${t.shelfHeadingUpTo800Xs}`},{value:"md",label:"Medium — 48px",cls:`font-heading2 font-medium tracking-[-0.03em] ${t.shelfHeading2} ${t.shelfHeadingUpTo800Small}`},{value:"lg",label:"Large — 56px",cls:`font-heading2 font-medium tracking-[-0.03em] ${t.shelfHeading3} ${t.shelfHeadingUpTo800Large}`},{value:"xl",label:"Extra large — 64px",cls:`font-heading2 font-medium tracking-[-0.03em] ${t.shelfHeading4} ${t.shelfHeadingUpTo800Xl}`}],q="lg";function J(e){return(T.find(i=>i.value===e)??T.find(i=>i.value===q)).cls}const g=(e,i=!1)=>typeof e=="string"?G(e,i):e,r=(e,i=!1)=>typeof e=="string"?K(e,i):e;function Q({num:e,title:i,link:l,logo:f,description:d,accent:w,accentNum:M,numStyle:E=F,look:m="standard",titleAccent:v,accentTracking:_="-0.02em",spaceBelow:y,rowGap:z,descriptionSize:L,className:h="",eyebrowLook:c=P,titleSize:U,count:u,capped:H=!1}){const o=y??(m==="editorial"?"mb-[60px]":"");if(m==="shelf")return e||i||d||l?n("div",{className:`${W} sticky top-[var(--sf-header-h,88px)] z-30 mb-5 flex items-center justify-between gap-4 max-view-wide:flex-wrap max-view-wide:gap-y-2 border-b border-line bg-bg/95 py-3 backdrop-blur-md ${H?"":"-mx-[var(--sf-site-gutter,40px)] px-[var(--sf-site-gutter,40px)] max-view-wide:-mx-[min(20px,var(--sf-site-gutter,40px))] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]"}`,children:[n("div",{className:"flex min-w-0 items-end gap-6 max-view-wide:flex-col max-view-wide:items-stretch max-view-wide:gap-3",children:[e&&a("span",{className:`font-mono ${t.shelfLabel} leading-none uppercase tracking-[0.22em] text-fg-dim`,children:r(e)}),i&&a("h2",{className:`${J(U)} leading-none text-fg max-view-wide:leading-[1] [&>span]:block`,children:g(i)})]}),(d||l||u)&&n("div",{className:"flex items-center gap-5 max-view-wide:gap-3 view-wide:grow view-wide:justify-end",children:[d&&a("span",{className:`max-w-[340px] truncate font-display ${t.shelfBody} leading-[1.4] text-fg-dim max-view-wide:hidden view-wide:w-0 view-wide:grow view-wide:text-right`,children:r(d)}),l&&n(S,{href:l.href,className:`inline-flex items-center gap-2 whitespace-nowrap font-mono ${t.shelfLabel} uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg`,children:[r(l.text),a("span",{"aria-hidden":!0,children:"→"})]}),u&&a("span",{className:`whitespace-nowrap font-mono ${t.shelfLabelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:u})]})]}):null;if(m==="editorial"){const s=!!i||!!v;return n("header",{className:`${o} grid grid-cols-[auto_1fr_auto] items-end gap-10 border-b border-line pb-8 max-view-desktop:grid-cols-1 max-view-desktop:gap-3.5 ${h}`.trim(),children:[e&&(typeof e=="string"?a(x,{text:e,className:"pb-2"}):a("span",{className:"pb-2",children:e})),s&&n("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(40px,5.5vw,80px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em]",children:[i,v&&n(B,{children:[" ",a("em",{className:"font-serif font-normal italic text-accent",style:{letterSpacing:_},children:v})]})]}),d&&a("p",{className:`max-w-[360px] pb-1 text-right font-display ${t.bodySmall} leading-[1.5] text-fg-dim max-view-desktop:max-w-full max-view-desktop:text-left`,children:d})]})}if(m==="simple"){const s=`${o} ${h}`.trim();return n("div",{className:s||void 0,children:[e&&(typeof e=="string"?a(x,{text:e,look:c,className:"mb-4 block"}):a("span",{className:"mb-4 block",children:e})),i&&a("h2",{className:`font-heading2 ${t.headingMedium2} font-medium uppercase leading-none tracking-[-0.02em] text-fg ${t.headingMediumUpTo800Small}`,children:g(i)})]})}if(m==="statement"){const s=`${o} ${h}`.trim();return n("div",{className:s||void 0,children:[e&&(typeof e=="string"?a(x,{text:e,look:c,className:"mb-4 block"}):a("span",{className:"mb-4 block",children:e})),i&&a("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(40px,5vw,72px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em] text-fg",children:g(i,!0)})]})}if(m==="natural"){const s=`flex max-w-[680px] flex-col ${z??"gap-5"} ${o} ${h}`.replace(/\s+/g," ").trim();return n("div",{className:s,children:[e&&(typeof e=="string"?a(x,{text:e,look:c}):a("span",{children:e})),i&&a("h2",{className:`font-heading2 ${t.headingMedium2} font-medium leading-[1.05] tracking-[-0.03em] ${t.headingMediumUpTo800Small}`,children:g(i)}),d&&a("p",{className:`${L??`${t.bodyLarge}`} leading-[1.6] opacity-85`,children:d})]})}if(m==="essay"){const s=`${o} ${h}`.trim();return n("div",{className:s||void 0,children:[e&&(typeof e=="string"?a(x,{text:e,look:c,className:"mb-4 block"}):a("span",{className:"mb-4 block",children:e})),i&&a("h2",{className:`font-heading2 ${t.headingMedium1} [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-none tracking-[-0.02em] text-fg ${t.headingSmallUpTo800}`,children:g(i)})]})}const k=!!d||!!l,I=!!i,b=Z(E)==="outlined",N=`font-mono ${t.label} uppercase tracking-[0.3em]`;let p=null;if(e)if(b)p=a("span",{className:`${Y} text-fg-dim ${A}`,children:r(e)});else if(M&&!w&&typeof e=="string"){const s=e.indexOf("/"),O=s===-1?e:e.slice(0,s),$=s===-1?"":e.slice(s);p=n("span",{className:N,children:[a("span",{className:"text-accent",children:r(O)}),$&&a("span",{className:"text-fg-dim",children:r($)})]})}else p=a("span",{className:`${N} ${w?"text-accent":"text-fg-dim"}`,children:r(e)});return n("div",{className:"mb-16 grid grid-cols-[auto_1fr_auto] items-end gap-10 border-b border-line pb-6 max-view-wide:mb-9 max-view-wide:grid-cols-1 max-view-wide:gap-3 max-view-wide:pb-5",children:[b&&e&&a("style",{children:X}),n("div",{className:"flex flex-col items-start gap-3",children:[f?.src&&a(R,{children:a(D,{...V(j(f.src)),alt:f.alt,className:"h-8 w-auto object-contain"})}),p]}),I&&a("h2",{className:w?"font-heading2 text-[length:min(var(--size-headingMedium,clamp(36px,5vw,64px)),var(--sf-heading-max,9999px))] [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-[0.95] tracking-[-0.025em]":`font-heading2 ${t.headingMedium3} [font-weight:var(--sf-heading-weight,500)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-none tracking-[-0.03em] whitespace-pre-line ${t.headingMediumUpTo800Large} max-view-wide:leading-[1]`,children:g(i)}),k&&n("div",{className:"flex flex-col items-end gap-3 max-view-wide:items-start",children:[d&&a("p",{className:`max-w-[340px] font-display ${t.bodySmall} leading-[1.5] text-fg-dim text-right max-view-wide:max-w-full max-view-wide:text-left`,children:r(d)}),l&&n(S,{href:l.href,className:`inline-flex items-center gap-2 whitespace-nowrap font-mono ${t.label} uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg`,children:[r(l.text),a("span",{"aria-hidden":!0,children:"→"})]})]})]})}function V(e){const i=C(e,{fallbackWidth:640,maxWidth:960});return i.srcSet?{src:i.src,srcSet:i.srcSet,sizes:"240px"}:{src:e}}export{q as DEFAULT_SHELF_TITLE_SIZE,T as SHELF_TITLE_SIZES,Q as default};