efficient-web-builder 74.9.0 → 74.10.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # Changelog
2
2
 
3
+ ## 74.10.0 - 2026-11-24
4
+
5
+ From main at `408a60de`: #849, #850, #851, #852.
6
+
7
+ A minor: new Hero rows and a new header-ink context. No export removed, no new peer.
8
+
9
+ **For hosts:**
10
+ - ⚠️ **Look change (#849):** the "®" mark now draws in its words' colour, on their line, at their size. Before, it was a gold, raised `<sup>`. A host that bumps to this version changes every page that draws a ® mark.
11
+ - A see-through host header may provide its custom top ink with `HeaderTopInkContext`; a LogoBlock on Auto contrast then draws in that ink. No provider: the same bytes as before.
12
+ - Hero poster `sizes` change: a phone asks for the cover width of the Hero's real frame, capped at 1280 device px; a wide screen asks for `100vw` as before.
13
+
14
+ ### Added
15
+
16
+ - **Hero words space on tablet and desktop** (`lib/hero-phone-stack` `heroWordsSpace`, #850): rows for the space above and below the words, beside the phone rows. With no row set, a hero draws the same bytes.
17
+ - **`HeaderTopInkContext`** (`components/HeaderTopInkContext`, #852): a host header's custom top ink while the bar is see-through; `LogoBlock` reads it.
18
+ - **`heroPosterSizes(phoneFrame)` and `heroPhoneFrame(heightMobile, heightFixedMobile)`** (`lib/hero-poster-sizes`, #851): the one helper for a Hero poster's `sizes`.
19
+
20
+ ### Changed
21
+
22
+ - **® mark** (`components/RMark`, #849): `RMark` / `withRMark` draw a plain `<span>` in the words' colour. The names stay.
23
+ - **Hero poster** (`components/HeroPoster`, #849, #851): takes a `phoneFrame` prop and asks for the width it draws.
24
+
25
+ ## 74.9.1 - 2026-11-23
26
+
27
+ From main at `7c260d96`: #845, #847.
28
+
29
+ A patch: two fixes. No export added or removed, no new peer.
30
+
31
+ **For hosts:**
32
+ - No step. A site whose Side space is stored in % now publishes it in vw; px and vw Side spaces publish the same bytes as before.
33
+
34
+ ### Fixed
35
+
36
+ - **Side space in %** (`lib/content/page-width`, #845): `siteGutterTokens` and `siteGutterPhoneTokens` publish a % Side space as vw, through one helper `sideSpaceCss`. A bare % inside a content-width box resolved against that box, so a full-bleed picture stopped short of the screen edge.
37
+ - **One-padding rule** (`lib/content/section-one-padding`, #847): `sectionOnePadding` leaves out a part with its own Padding row (a card copy, a Box part) and what it holds. A card that pads the same value as the stored total no longer fails the section.
38
+
3
39
  ## 74.9.0 - 2026-11-23
4
40
 
5
41
  From main at `2293b328`: #843.
@@ -1 +1 @@
1
- import{frameAt as B}from"../../../render/lib/content/section-padding.js";import{ownEntry as D}from"../../../format/lib/own-entry.js";const Z=/^(?:[^\s]*:)?p[ytb]-/,T=/(^|;)\s*padding-(top|bottom)\s*:/,z=/^p[ytb]-0$/,J={sectionPaddingTop:40,sectionPaddingBottom:50,sectionPaddingTopTablet:30,sectionPaddingBottomTablet:36,sectionPaddingTopPhone:20,sectionPaddingBottomPhone:24,padTotal:["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopTablet","sectionPaddingBottomTablet","sectionPaddingTopPhone","sectionPaddingBottomPhone"]};function K(t){const o=/^([pm])([ytb])-(?:(\d+(?:\.\d+)?)|\[(\d+(?:\.\d+)?)px\])$/.exec(t);return o?{kind:o[1],side:o[2],px:o[3]!==void 0?Number(o[3])*4:Number(o[4])}:null}const y=t=>(t.getAttribute("class")??"").split(/\s+/).filter(Boolean),a=t=>t.getAttribute("style")??"",Q=(t,o)=>new RegExp(`(?:^|;)\\s*padding-${o==="t"?"top":"bottom"}\\s*:\\s*(\\d+(?:\\.\\d+)?)px`).exec(a(t)),H={desktop:1440,tablet:1099,mobile:390},V={"view-desktop":1100,"view-wide":800,"view-tablet":720,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},q=/^max-(?:\[(\d+)px\]|(.+))$/,F=/^@(?:(max-|min-)?\[(\d+)px\])$/,W=t=>{const o=q.exec(t);return o?o[1]!==void 0?Number(o[1]):D(V,o[2]):void 0};function U(t,o){const c=F.exec(t);if(c)return c[1]==="max-"?o<Number(c[2]):o>=Number(c[2]);if(q.test(t)){const $=W(t);return $===void 0?void 0:o<$}const i=/^(?:min-\[(\d+)px\]|(.+))$/.exec(t),b=i?.[1]!==void 0?Number(i[1]):D(V,i?.[2]??"");return b===void 0?void 0:o>=b}function tt(t,o,c,i){const b=t.split(":"),$=K(b.pop()??"");if(!$)return null;let m=0;for(const d of b){const w=(d==="first"?!c.previousElementSibling:d==="last"?!c.nextElementSibling:void 0)??U(d,o);if(w===void 0)return i.push(t),null;if(!w)return null;const e=F.exec(d),l=e?e[1]==="max-"?Number(e[2]):void 0:W(d);m+=1+(l!==void 0?1/(1+l):0)}return{...$,rank:m}}function L(t,o,c,i,b=!1){let $=0;const m=[];for(let d=t;d;d=o==="t"?d.firstElementChild:d.lastElementChild){const E=Q(d,o);let w={px:E?Number(E[1]):0,rank:E?1/0:-1},e={px:0,rank:-1};for(const x of y(d)){const f=tt(x,c,d,i);!f||f.side!=="y"&&f.side!==o||(f.kind==="m"?e=f.rank>=e.rank?f:e:w=f.rank>=w.rank?f:w)}const l=(b&&d===t?0:w.px)+e.px;l&&m.push(`${d.tagName.toLowerCase()}:${l}`),$+=l}return{sum:$,seen:m.join(" > ")}}const X=(t,o,c=[])=>L(t,o,H.desktop,c),et=(t,o,c,i)=>t-c>=0&&o-i===t-c,R=t=>Z.test(t)&&!z.test(t);function it(t){const o=[];let c=0;const i=(e,l,x="")=>{c++,e||o.push(`${l}${x?` — ${x.slice(0,600)}`:""}`)},b=t.innerRoom??{},$=t.defaultsOf??(()=>({})),m=[],d=e=>t.sectionOf(e)?.querySelectorAll("*").length??0,E=t.types.filter(e=>{const l=t.draw(e,{sectionPaddingTop:40});return l.includes("sf-section-pad")&&d(l)===d(t.draw(e,{}))+1}),w=[];for(const e of E){const l=t.frameOf(e),x=t.draw(e,J),f=t.sectionOf(x);if(!f){i(!1,`§2 ${e}: draws`,x.slice(0,200));continue}const k=Array.from(f.querySelectorAll("*")),A=k.filter(n=>y(n).includes("sf-section-pad")&&!n.parentElement?.closest("section")),G=Array.from(t.sectionOf(t.draw(e,{}))?.querySelectorAll("*")??[]).some(n=>y(n).some(R)||T.test(a(n))),v=Object.prototype.hasOwnProperty.call(b,e);if(v&&i(typeof l!="function",`§1 ${e}: its padding is a column's (${b[e]}), so it declares no frame`),!G||v){i(A.length===1&&/padding-top\s*:\s*40px/.test(a(A[0])),`§2 ${e}: no padding of its own, so the wrapper draws the total once`,x.slice(0,300));continue}i(typeof l=="function",`§1 ${e}: has padding of its own, so it declares its own frame (the builder's table, or its meta's ownPad)`),w.push(e),i(A.every(n=>!T.test(a(n))),`§2 ${e}: no outer wrapper draws a top or bottom`,A.map(a).join(" | "));const N=k.filter(n=>/(^|;)\s*padding-top\s*:\s*40px/.test(a(n))),C=k.filter(n=>/(^|;)\s*padding-bottom\s*:\s*50px/.test(a(n)));i(N.length===1,`§2 ${e}: ONE element draws the total top 40`,`${N.length} found`),i(C.length===1,`§2 ${e}: ONE element draws the total bottom 50`,`${C.length} found`);const u=N[0],g=C[0];if(!u||!g)continue;if(u!==g){const n=(p,r)=>{for(let s=f;s;s=r==="t"?s.firstElementChild:s.lastElementChild)if(s===p)return!0;return!1};i(n(u,"t")&&n(g,"b"),`§2 ${e}: a split total draws its top on the section's first part and its bottom on its last part`,`${u.tagName.toLowerCase()} / ${g.tagName.toLowerCase()}`)}i(/--sf-pad-t-tablet\s*:\s*30px/.test(a(u))&&/--sf-pad-b-tablet\s*:\s*36px/.test(a(g)),`§2 ${e}: …its tablet 30 / 36`,`${a(u)} | ${a(g)}`),i(/--sf-pad-t-phone\s*:\s*20px/.test(a(u))&&/--sf-pad-b-phone\s*:\s*24px/.test(a(g)),`§2 ${e}: …its phone 20 / 24`,`${a(u)} | ${a(g)}`);const I={t:u,b:g};for(const n of new Set([u,g])){const p=y(n).filter(R);i(p.length===0,`§2 ${e}: the padded element keeps no vertical padding class`,p.join(" "));const r=[];for(let s=n.parentElement;s&&s!==f;s=s.parentElement){const h=y(s).filter(R);(h.length||T.test(a(s)))&&r.push(`${s.tagName.toLowerCase()}[${h.join(" ")}${T.test(a(s))?` style=${a(s)}`:""}]`)}i(r.length===0,`§2 ${e}: nothing between the section's edge and the padded element pads`,r.join(" > "))}if(typeof l!="function")continue;const M=t.sectionOf(t.draw(e,{})),_=n=>{const p=[];for(let s=n;s&&s!==f;s=s.parentElement)p.unshift(Array.from(s.parentElement?.children??[]).indexOf(s));let r=M;for(const s of p)r=r?.children[s];return r},O={t:_(u),b:_(g)};if(!O.t||!O.b){i(!1,`§3 ${e}: the padded element is drawn with nothing stored`);continue}const P=l({...$(e),editor:{isEditing:!0}}),Y=typeof P=="object"&&P!==null&&"top"in P,j=n=>Y?P[n==="t"?"top":"bottom"]:P;for(const[n,p]of[["t",40],["b",50]]){const r=B(j(n),"desktop"),s=X(O[n],n,m),h=X(I[n],n,m);i(et(s.sum,h.sum,r,p),`§3 ${e}: the ${n==="t"?"top":"bottom"} edge draws its frame ${r} once, and a total in its place`,`nothing stored ${s.sum} (${s.seen}); total ${p} draws ${h.sum} (${h.seen})`)}for(const n of["tablet","mobile"]){const p=(t.views??H)[n];for(const r of["t","b"]){const s=B(j(r),n),h=L(O[r],r,p,m),S=L(I[r],r,p,m,!0);i(h.sum-s===S.sum,`§3 ${e} ${n}: the ${r==="t"?"top":"bottom"} edge at ${p}px draws its frame ${s} once`,`nothing stored ${h.sum} (${h.seen}); content under the total ${S.sum} (${S.seen})`)}}}return i(m.length===0,"§3 every view prefix on an edge line is one the rule reads",[...new Set(m)].join(" ")),{wrapped:E,owns:w,checks:c,failures:o}}export{et as edgeHolds,X as edgeLine,L as edgeLineAt,it as sectionOnePadding};
1
+ import{frameAt as D}from"../../../render/lib/content/section-padding.js";import{ownEntry as H}from"../../../format/lib/own-entry.js";const J=/^(?:[^\s]*:)?p[ytb]-/,T=/(^|;)\s*padding-(top|bottom)\s*:/,K=/^p[ytb]-0$/,Q={sectionPaddingTop:40,sectionPaddingBottom:50,sectionPaddingTopTablet:30,sectionPaddingBottomTablet:36,sectionPaddingTopPhone:20,sectionPaddingBottomPhone:24,padTotal:["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopTablet","sectionPaddingBottomTablet","sectionPaddingTopPhone","sectionPaddingBottomPhone"]};function U(t){const o=/^([pm])([ytb])-(?:(\d+(?:\.\d+)?)|\[(\d+(?:\.\d+)?)px\])$/.exec(t);return o?{kind:o[1],side:o[2],px:o[3]!==void 0?Number(o[3])*4:Number(o[4])}:null}const P=t=>(t.getAttribute("class")??"").split(/\s+/).filter(Boolean),a=t=>t.getAttribute("style")??"",tt=(t,o)=>new RegExp(`(?:^|;)\\s*padding-${o==="t"?"top":"bottom"}\\s*:\\s*(\\d+(?:\\.\\d+)?)px`).exec(a(t)),V={desktop:1440,tablet:1099,mobile:390},q={"view-desktop":1100,"view-wide":800,"view-tablet":720,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},F=/^max-(?:\[(\d+)px\]|(.+))$/,W=/^@(?:(max-|min-)?\[(\d+)px\])$/,X=t=>{const o=F.exec(t);return o?o[1]!==void 0?Number(o[1]):H(q,o[2]):void 0};function et(t,o){const c=W.exec(t);if(c)return c[1]==="max-"?o<Number(c[2]):o>=Number(c[2]);if(F.test(t)){const $=X(t);return $===void 0?void 0:o<$}const i=/^(?:min-\[(\d+)px\]|(.+))$/.exec(t),b=i?.[1]!==void 0?Number(i[1]):H(q,i?.[2]??"");return b===void 0?void 0:o>=b}function nt(t,o,c,i){const b=t.split(":"),$=U(b.pop()??"");if(!$)return null;let m=0;for(const d of b){const w=(d==="first"?!c.previousElementSibling:d==="last"?!c.nextElementSibling:void 0)??et(d,o);if(w===void 0)return i.push(t),null;if(!w)return null;const e=W.exec(d),f=e?e[1]==="max-"?Number(e[2]):void 0:X(d);m+=1+(f!==void 0?1/(1+f):0)}return{...$,rank:m}}function L(t,o,c,i,b=!1){let $=0;const m=[];for(let d=t;d;d=o==="t"?d.firstElementChild:d.lastElementChild){const E=tt(d,o);let w={px:E?Number(E[1]):0,rank:E?1/0:-1},e={px:0,rank:-1};for(const x of P(d)){const p=nt(x,c,d,i);!p||p.side!=="y"&&p.side!==o||(p.kind==="m"?e=p.rank>=e.rank?p:e:w=p.rank>=w.rank?p:w)}const f=(b&&d===t?0:w.px)+e.px;f&&m.push(`${d.tagName.toLowerCase()}:${f}`),$+=f}return{sum:$,seen:m.join(" > ")}}const G=(t,o,c=[])=>L(t,o,V.desktop,c),ot=(t,o,c,i)=>t-c>=0&&o-i===t-c,R=t=>J.test(t)&&!K.test(t);function dt(t){const o=[];let c=0;const i=(e,f,x="")=>{c++,e||o.push(`${f}${x?` — ${x.slice(0,600)}`:""}`)},b=t.innerRoom??{},$=t.defaultsOf??(()=>({})),m=[],d=e=>t.sectionOf(e)?.querySelectorAll("*").length??0,E=t.types.filter(e=>{const f=t.draw(e,{sectionPaddingTop:40});return f.includes("sf-section-pad")&&d(f)===d(t.draw(e,{}))+1}),w=[];for(const e of E){const f=t.frameOf(e),x=t.draw(e,Q),p=t.sectionOf(x);if(!p){i(!1,`§2 ${e}: draws`,x.slice(0,200));continue}const k=Array.from(p.querySelectorAll("*")),y=k.filter(n=>P(n).includes("sf-section-pad")&&!n.parentElement?.closest("section")),M=Array.from(t.sectionOf(t.draw(e,{}))?.querySelectorAll("*")??[]).some(n=>P(n).some(R)||T.test(a(n))),v=Object.prototype.hasOwnProperty.call(b,e);if(v&&i(typeof f!="function",`§1 ${e}: its padding is a column's (${b[e]}), so it declares no frame`),!M||v){i(y.length===1&&/padding-top\s*:\s*40px/.test(a(y[0])),`§2 ${e}: no padding of its own, so the wrapper draws the total once`,x.slice(0,300));continue}i(typeof f=="function",`§1 ${e}: has padding of its own, so it declares its own frame (the builder's table, or its meta's ownPad)`),w.push(e),i(y.every(n=>!T.test(a(n))),`§2 ${e}: no outer wrapper draws a top or bottom`,y.map(a).join(" | "));const Y=k.filter(n=>P(n).includes("sf-section-pad")&&!y.includes(n)),I=k.filter(n=>!Y.some(l=>l===n||l.contains(n))),N=I.filter(n=>/(^|;)\s*padding-top\s*:\s*40px/.test(a(n))),C=I.filter(n=>/(^|;)\s*padding-bottom\s*:\s*50px/.test(a(n)));i(N.length===1,`§2 ${e}: ONE element draws the total top 40`,`${N.length} found`),i(C.length===1,`§2 ${e}: ONE element draws the total bottom 50`,`${C.length} found`);const u=N[0],g=C[0];if(!u||!g)continue;if(u!==g){const n=(l,r)=>{for(let s=p;s;s=r==="t"?s.firstElementChild:s.lastElementChild)if(s===l)return!0;return!1};i(n(u,"t")&&n(g,"b"),`§2 ${e}: a split total draws its top on the section's first part and its bottom on its last part`,`${u.tagName.toLowerCase()} / ${g.tagName.toLowerCase()}`)}i(/--sf-pad-t-tablet\s*:\s*30px/.test(a(u))&&/--sf-pad-b-tablet\s*:\s*36px/.test(a(g)),`§2 ${e}: …its tablet 30 / 36`,`${a(u)} | ${a(g)}`),i(/--sf-pad-t-phone\s*:\s*20px/.test(a(u))&&/--sf-pad-b-phone\s*:\s*24px/.test(a(g)),`§2 ${e}: …its phone 20 / 24`,`${a(u)} | ${a(g)}`);const _={t:u,b:g};for(const n of new Set([u,g])){const l=P(n).filter(R);i(l.length===0,`§2 ${e}: the padded element keeps no vertical padding class`,l.join(" "));const r=[];for(let s=n.parentElement;s&&s!==p;s=s.parentElement){const h=P(s).filter(R);(h.length||T.test(a(s)))&&r.push(`${s.tagName.toLowerCase()}[${h.join(" ")}${T.test(a(s))?` style=${a(s)}`:""}]`)}i(r.length===0,`§2 ${e}: nothing between the section's edge and the padded element pads`,r.join(" > "))}if(typeof f!="function")continue;const Z=t.sectionOf(t.draw(e,{})),j=n=>{const l=[];for(let s=n;s&&s!==p;s=s.parentElement)l.unshift(Array.from(s.parentElement?.children??[]).indexOf(s));let r=Z;for(const s of l)r=r?.children[s];return r},O={t:j(u),b:j(g)};if(!O.t||!O.b){i(!1,`§3 ${e}: the padded element is drawn with nothing stored`);continue}const A=f({...$(e),editor:{isEditing:!0}}),z=typeof A=="object"&&A!==null&&"top"in A,B=n=>z?A[n==="t"?"top":"bottom"]:A;for(const[n,l]of[["t",40],["b",50]]){const r=D(B(n),"desktop"),s=G(O[n],n,m),h=G(_[n],n,m);i(ot(s.sum,h.sum,r,l),`§3 ${e}: the ${n==="t"?"top":"bottom"} edge draws its frame ${r} once, and a total in its place`,`nothing stored ${s.sum} (${s.seen}); total ${l} draws ${h.sum} (${h.seen})`)}for(const n of["tablet","mobile"]){const l=(t.views??V)[n];for(const r of["t","b"]){const s=D(B(r),n),h=L(O[r],r,l,m),S=L(_[r],r,l,m,!0);i(h.sum-s===S.sum,`§3 ${e} ${n}: the ${r==="t"?"top":"bottom"} edge at ${l}px draws its frame ${s} once`,`nothing stored ${h.sum} (${h.seen}); content under the total ${S.sum} (${S.seen})`)}}}return i(m.length===0,"§3 every view prefix on an edge line is one the rule reads",[...new Set(m)].join(" ")),{wrapped:E,owns:w,checks:c,failures:o}}export{ot as edgeHolds,G as edgeLine,L as edgeLineAt,dt as sectionOnePadding};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{REEL_PLACEMENT_DEFAULT as d,REEL_SHAPE_DEFAULT as m,HERO_REEL_SHAPES as R,REEL_SHAPE_LABELS as A,REEL_SHOWN_DEFAULT as O}from"../../../../../../format/lib/reel.js";import{HERO_TEXTURE_SHOWN_DEFAULT as P}from"../../../../../../format/lib/hero-texture.js";import{HERO_ARROW_SHAPE_DEFAULT as H,HERO_ARROW_SHAPE_LABELS as L,HERO_ARROW_SHAPES as h,HERO_ARROWS_PLACEMENT_DEFAULT as u,HERO_ARROWS_SHOWN_DEFAULT as w}from"../../../../../../format/lib/hero-arrows.js";import{ClockIcon as T,EyeIcon as t,OpacityIcon as I,PhoneIcon as n,PlayIcon as W,SlideArrowsBareIcon as D,SlideArrowsRoundIcon as f,SlideArrowsSquareIcon as k,SlidePickerBarIcon as U,SlidePickerCardsIcon as g,SlidePickerDotsIcon as y,SlidePickerNumbersIcon as F,SlidePickerSquaresIcon as N,SquareIcon as p}from"efficient-easel/icons";import{SlideArrowsRoundSolidIcon as x}from"efficient-shell/icons/efficient-looks";const b=x,C={cards:o(g,{}),dots:o(y,{}),numbers:o(F,{}),bar:o(U,{}),squares:o(N,{})},B={outline:o(f,{}),solid:o(b,{}),square:o(k,{}),bare:o(D,{})};import{toggle as i}from"../../../controls.js";import{HERO_PHONE_WORDS_ROWS as s,HERO_TEXTURE_COLOR_ROW as q,heroHeightFields as j}from"../../hero-shared-fields.js";import{group as e}from"efficient-easel/screen/lib/document/box-fields";import{alignmentField as G,iconPickerRow as l,placementField as _,segmented as c,slider as S}from"../../../box-fields.js";import{deviceField as E,deviceNote as M}from"efficient-easel/screen/lib/document/device-fields";import{HERO_PHONE_SIDEWAYS_DEFAULT as X,HERO_PHONE_SIDEWAYS_LABEL as Y,HERO_PHONE_UPDOWN_DEFAULT as v,HERO_PHONE_UPDOWN_LABEL as K,phoneSidewaysPoints as z,phoneUpDownPoints as J}from"../../../../../../format/lib/hero-phone-stack.js";import{HeroSlots as a}from"../../../../../../format/lib/document/blocks/general/Hero/meta.js";const lo={fields:{_dDevice:M(),_gContent:e("Content"),slides:a.slides,strip:a.strip,_gStyle:e("Style"),alignment:G(),_gTexture:e("Texture"),showTexture:i("Show texture",P,o(t,{})),textureColor:q,textureOpacity:S("Texture opacity",o(I,{}),0,100,1,40,"%"),_gLayout:e("Layout"),...j(),_gAutoplay:e("Auto-slide"),autoplay:i("Auto-advance slides",!1,o(W,{})),autoplayInterval:S("Still time per slide",o(T,{}),2,15,1,6,"s"),_gPicker:e("Slide picker"),showPicker:i("Show slide picker",O,o(t,{})),pickerShape:l("Slide picker shape",o(p,{}),R.map(r=>({label:A[r],value:r,picture:C[r]})),m),pickerPlacement:_("Slide picker placement",{fallback:d}),_gArrows:e("Arrows"),showArrows:i("Show arrows",w,o(t,{})),arrowsShape:l("Arrows shape",o(p,{}),h.map(r=>({label:L[r],value:r,picture:B[r]})),H),arrowsPlacement:_("Arrows placement",{fallback:u}),_gPhone:E("mobile",e("On a phone")),phoneUpDown:E("mobile",c(K,o(n,{}),J(),v)),phoneSideways:E("mobile",c(Y,o(n,{}),z(),X)),phoneWordsTop:s.phoneWordsTop,phoneWordsBottom:s.phoneWordsBottom,phoneBoxGap:s.phoneBoxGap}};export{lo as HeroFields};
1
+ import{jsx as o}from"react/jsx-runtime";import{REEL_PLACEMENT_DEFAULT as R,REEL_SHAPE_DEFAULT as d,HERO_REEL_SHAPES as m,REEL_SHAPE_LABELS as A,REEL_SHOWN_DEFAULT as O}from"../../../../../../format/lib/reel.js";import{HERO_TEXTURE_SHOWN_DEFAULT as P}from"../../../../../../format/lib/hero-texture.js";import{HERO_ARROW_SHAPE_DEFAULT as H,HERO_ARROW_SHAPE_LABELS as L,HERO_ARROW_SHAPES as h,HERO_ARROWS_PLACEMENT_DEFAULT as u,HERO_ARROWS_SHOWN_DEFAULT as w}from"../../../../../../format/lib/hero-arrows.js";import{ClockIcon as T,EyeIcon as t,OpacityIcon as W,PhoneIcon as n,PlayIcon as I,SlideArrowsBareIcon as D,SlideArrowsRoundIcon as f,SlideArrowsSquareIcon as k,SlidePickerBarIcon as U,SlidePickerCardsIcon as g,SlidePickerDotsIcon as y,SlidePickerNumbersIcon as F,SlidePickerSquaresIcon as N,SquareIcon as _}from"efficient-easel/icons";import{SlideArrowsRoundSolidIcon as x}from"efficient-shell/icons/efficient-looks";const b=x,C={cards:o(g,{}),dots:o(y,{}),numbers:o(F,{}),bar:o(U,{}),squares:o(N,{})},B={outline:o(f,{}),solid:o(b,{}),square:o(k,{}),bare:o(D,{})};import{toggle as i}from"../../../controls.js";import{HERO_PHONE_WORDS_ROWS as s,HERO_WORDS_ROWS as q,HERO_TEXTURE_COLOR_ROW as j,heroHeightFields as G}from"../../hero-shared-fields.js";import{group as e}from"efficient-easel/screen/lib/document/box-fields";import{alignmentField as M,iconPickerRow as p,placementField as l,segmented as S,slider as c}from"../../../box-fields.js";import{deviceField as E,deviceNote as X}from"efficient-easel/screen/lib/document/device-fields";import{HERO_PHONE_SIDEWAYS_DEFAULT as Y,HERO_PHONE_SIDEWAYS_LABEL as v,HERO_PHONE_UPDOWN_DEFAULT as K,HERO_PHONE_UPDOWN_LABEL as z,phoneSidewaysPoints as J,phoneUpDownPoints as Q}from"../../../../../../format/lib/hero-phone-stack.js";import{HeroSlots as a}from"../../../../../../format/lib/document/blocks/general/Hero/meta.js";const lo={fields:{_dDevice:X(),_gContent:e("Content"),slides:a.slides,strip:a.strip,_gStyle:e("Style"),alignment:M(),_gTexture:e("Texture"),showTexture:i("Show texture",P,o(t,{})),textureColor:j,textureOpacity:c("Texture opacity",o(W,{}),0,100,1,40,"%"),_gLayout:e("Layout"),...G(),...q,_gAutoplay:e("Auto-slide"),autoplay:i("Auto-advance slides",!1,o(I,{})),autoplayInterval:c("Still time per slide",o(T,{}),2,15,1,6,"s"),_gPicker:e("Slide picker"),showPicker:i("Show slide picker",O,o(t,{})),pickerShape:p("Slide picker shape",o(_,{}),m.map(r=>({label:A[r],value:r,picture:C[r]})),d),pickerPlacement:l("Slide picker placement",{fallback:R}),_gArrows:e("Arrows"),showArrows:i("Show arrows",w,o(t,{})),arrowsShape:p("Arrows shape",o(_,{}),h.map(r=>({label:L[r],value:r,picture:B[r]})),H),arrowsPlacement:l("Arrows placement",{fallback:u}),_gPhone:E("mobile",e("On a phone")),phoneUpDown:E("mobile",S(z,o(n,{}),Q(),K)),phoneSideways:E("mobile",S(v,o(n,{}),J(),Y)),phoneWordsTop:s.phoneWordsTop,phoneWordsBottom:s.phoneWordsBottom,phoneBoxGap:s.phoneBoxGap}};export{lo as HeroFields};
@@ -65,4 +65,10 @@ export declare const HERO_PHONE_WORDS_ROWS: {
65
65
  phoneWordsBottom: BoxField<number>;
66
66
  phoneBoxGap: BoxField<number>;
67
67
  };
68
+ export declare const HERO_WORDS_ROWS: {
69
+ wordsTop: BoxField<number>;
70
+ wordsBottom: BoxField<number>;
71
+ wordsTopTablet: BoxField<number>;
72
+ wordsBottomTablet: BoxField<number>;
73
+ };
68
74
  export {};
@@ -1 +1 @@
1
- import{jsx as i,jsxs as ee,Fragment as oe}from"react/jsx-runtime";import{HeightIcon as te,ImageIcon as ie,ImagesIcon as ne,OpacityIcon as re,MediaLayoutSideBySideIcon as le,MediaLayoutStackedIcon as ae,GapIcon as de,PaddingBottomIcon as se,PaddingTopIcon as he,PlacementIcon as w,PlayIcon as ce,UploadIcon as ue}from"efficient-easel/icons";import{viewFocusKeys as F}from"../../../../format/lib/content/picture-focus-rows.js";import{HERO_FOCUS as p,MEDIA_LAYOUT_DEFAULT as pe,MEDIA_LAYOUT_LABELS as Oe,MEDIA_LAYOUTS as _e,resolvePhoneLayout as me}from"../../../../format/lib/hero-media-layout.js";import{useEasel as Ee,useSelectedHost as ge}from"efficient-easel/easel";import{SettingsDefaultReset as fe,SettingsField as be,SettingsSegmented as Re}from"efficient-easel/panel";import{describedAs as Te,FLAT_ACCESS as Se,iconOf as xe,onDesktopWords as ve,phoneTwinFields as b,useAccessPatch as ye}from"efficient-easel/screen/lib/document/box-fields";import{keptByRow as R}from"efficient-easel/screen/lib/document/style-fields";import{deviceField as T}from"efficient-easel/screen/lib/document/device-fields";import{HERO_PHONE_BOX_GAP_DEFAULT as k,HERO_PHONE_BOX_GAP_LABEL as He,HERO_PHONE_WORDS_BOTTOM_DEFAULT as U,HERO_PHONE_WORDS_BOTTOM_LABEL as Ae,HERO_PHONE_WORDS_MAX as S,HERO_PHONE_WORDS_MIN as x,HERO_PHONE_WORDS_TOP_DEFAULT as M,HERO_PHONE_WORDS_TOP_LABEL as Le}from"../../../../format/lib/hero-phone-stack.js";import{colorInput as W,edgePad as B,focusKeptField as Ie,plainText as Pe,Slider as Y,upload as Ce,useSelectedSibling as v}from"../controls.js";import{ColourRow as De,InheritedColourRow as we}from"../ColourControl.js";import{rowSay as Fe,segmented as y,slider as m}from"../box-fields.js";import{CUSTOM_SHAPE as ke,SHAPE_TABLE as Ue}from"../../../../format/lib/content/gallery-card-layout.js";import{ShapePicker as Me}from"../shape-picker.js";import{HERO_FIXED_DEFAULT as We,HERO_HEIGHT_PX as H,readHeroFixedHeight as Be,SECTION_HEIGHT as c}from"../../../../format/lib/content/section-height.js";import{DEFAULT_TINT as A}from"../../../../format/lib/content/tint.js";import{editorEaselWords as Ye,say as a}from"../../../../format/lib/editor-words.js";import{nonEmptyString as L}from"../../../../format/lib/non-empty-string.js";import{findParentNode as Ne}from"../../../../format/lib/document/passes/document-position.js";import{DEFAULT_OVERLAY_POSITION as N,OVERLAY_POSITION_OPTIONS as V,slideOverlayState as G}from"../../../../format/lib/sections/hero-overlay.js";import{VIDEO_PLAYBACK_DEFAULT as Ve,VIDEO_PLAYBACK_LABELS as Ge,VIDEO_PLAYBACKS as Ke,VIDEO_SOURCE_DEFAULT as je,VIDEO_SOURCE_LABELS as Xe,VIDEO_SOURCES as $e}from"../../../../format/lib/hero-video.js";function qe(){return Ue.filter(e=>e.ratio!==null||e.shape===ke)}const I={desktop:{number:"heightDesktop",fixed:"heightFixed"},tablet:{number:"heightTablet",fixed:"heightFixedTablet"},mobile:{number:"heightMobile",fixed:"heightFixedMobile"}},K={read:e=>e.heightMobile,write:(e,o,t)=>({heightMobile:t}),fieldKey:()=>"heightMobile",ownField:!0,tablet:{read:e=>e.heightTablet,write:(e,o,t)=>({heightTablet:t}),fieldKey:()=>"heightTablet",ownField:!0}};function j(e,{number:o,fixed:t}){const r=o===void 0?void 0:e[o];return Be(e[t])??(typeof r=="number"?{unit:"vh",vh:r}:null)}const ze="On Tablet, this hero uses the Desktop vh. Set vh in the Desktop view.";function Je({view:e,keys:o,props:t}){const r=ge(),d=ye(Se),{number:s}=o,O={...r?.values??{},...s?{[s]:t.value}:{}},g=j(O,o),n=e==="tablet"?j(O,I.desktop):null,h=g??n??{unit:"vh",vh:c.fallback},u=t.readOnly===!0,P=qe(),Q=l=>{if(l===h.unit)return;if(l!=="vh"){d([[o.fixed,n?.unit===l?n.value:We[l]]]);return}const Z=s!==void 0&&typeof O[s]!="number"&&n!==null&&n.unit!=="vh";d([[o.fixed,void 0],...Z?[[s,c.fallback]]:[]])},_=g===null&&e!=="desktop",f=s===void 0,C=f&&n!==null&&n.unit!=="vh",D=n===null?`${c.fallback} ${c.unit}`:n.unit==="vh"?`${n.vh} ${c.unit}`:n.unit==="px"?n.value:P.find(l=>l.image===n.value)?.label??n.value;return i(be,{label:a("Height"),icon:xe(i(te,{})),hint:f&&(h.unit==="vh"||C)?a(ze):void 0,action:e==="desktop"?void 0:i(fe,{words:Ye()?.panel,label:a("Height"),changed:g!==null||!!O[o.fixed],detail:e==="tablet"?ve(Fe,D):D,disabled:u,onReset:()=>d([...s?[[s,void 0]]:[],[o.fixed,void 0]])}),children:ee("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-8)",flex:"1 1 auto",minWidth:0},children:[i(Re,{options:[{id:"vh",label:a("vh"),disabled:C},{id:"ratio",label:a("Ratio")},{id:"px",label:a("px")}],value:h.unit,onChange:Q,ariaLabel:a("Unit"),disabled:u}),h.unit==="ratio"?i(Me,{label:"Height",lines:P,column:"image",value:h.value,disabled:u,onChange:l=>d([[o.fixed,l]])}):h.unit==="px"?Y({...H,value:_?null:h.px,..._?{placeholder:h.px}:{},suffix:H.unit,ariaLabel:"Height",disabled:u,onChange:l=>d([[o.fixed,`${l}${H.unit}`]])}):Y({min:c.min,max:c.max,step:c.step,value:_?null:h.vh,..._?{placeholder:h.vh}:{},suffix:c.unit,ariaLabel:"Height",disabled:u||f,onChange:l=>t.onChange(l)})]})})}const E=(e,o=I[e])=>({type:"custom",...Te({},{type:"number",label:"Height"}),render:t=>i(Je,{view:e,keys:o,props:t})}),Qe={read:e=>e.heightFixedTablet,write:(e,o,t)=>({heightFixedTablet:t}),fieldKey:()=>"heightFixedTablet",ownField:!0};function Fo({tabletNumber:e=!0}={}){const o=e?K:{...K,tablet:Qe},t=E("tablet",e?void 0:{fixed:I.tablet.fixed}),r=b("heightDesktop",E("desktop"),o,{phoneRow:t}),d=b("heightDesktop",E("desktop"),o,{phoneRow:E("mobile")});return{heightDesktop:r.heightDesktop,...e?{heightTablet:r.heightTablet,heightFixedTablet:R("heightTablet")}:{heightFixedTablet:r.heightFixedTablet},heightMobile:d.heightMobile,heightFixed:R("heightDesktop"),heightFixedMobile:R("heightMobile")}}const ko={overlayColor:W("Overlay color",A),overlayPosition:B("Overlay position",V,N,"A corner would need a diagonal ramp, which this overlay does not draw.",i(w,{}))},X="Texture",$=e=>B("Overlay position",V,e,"A corner would need a diagonal ramp, which this overlay does not draw.",i(w,{}),void 0,X);function Ze(){try{const{appState:e,selectedItem:o}=Ee(t=>t);return eo(e,o?.props?.id)}catch{return}}function eo(e,o){return L(Ne(e,o)?.props?.textureColor)}function oo({value:e,onChange:o}){const[t]=v("overlayPosition"),r=Ze(),d=L(e)??"",s=G({overlayColor:d,overlayPosition:t},r);return i(we,{label:a("Overlay color"),value:d,inherited:s.color,resetTo:a(X),onChange:o,onReset:()=>o("")})}const to=$(N),io=$("");function no(e){const[o]=v("overlayColor"),t=G({overlayColor:o,overlayPosition:e.value}).own?to:io;return i(oe,{children:t.render(e)})}function ro(e){if(!Array.isArray(e))return;const o=e.flatMap((t,r)=>L(t?.props?.overlayColor)?[r+1]:[]);if(o.length!==0)return o.length===1?a("Slide {n}: own Overlay color.",{n:o[0]}):a("Slides {n}: own Overlay color.",{n:o.join(", ")})}function lo({value:e,onChange:o}){const[t]=v("slides");return i(De,{label:a("Texture color"),value:e||A,onChange:o,hint:ro(t)})}const Uo={type:"custom",render:({value:e,onChange:o})=>i(lo,{value:e,onChange:o})},Mo={overlayColor:{type:"custom",render:({value:e,onChange:o})=>i(oo,{value:e,onChange:o})},overlayPosition:{type:"custom",render:({value:e,onChange:o})=>i(no,{value:e,onChange:o})}},ao={one:i(ie,{}),side:i(le,{}),stacked:i(ae,{})},q=e=>y("Layout",i(ne,{}),_e.map(o=>({label:Oe[o],value:o,picture:ao[o]})),pe,e?{phoneRest:o=>me(void 0,o)}:void 0),so={mediaLayout:q(),mediaLayoutPhone:b("mediaLayout",q(!0)).mediaLayoutPhone},ho=()=>m("Tint",i(re,{}),0,100,5,0,"%"),z=e=>Object.fromEntries(F(e).map(o=>[o,Ie()])),J=e=>Ce("Background image","image/*","Upload a background image",{focus:e}),co=()=>W("Tint color",A),Wo={mediaImage:J(p.image),...z(p.image)},uo={mediaImage2:J(p.image2),...z(p.image2),tintColor2:co(),tintOpacity2:ho()},Bo=Object.keys(so),Yo=Object.keys(uo),No=["mediaImage",...F(p.image)],Vo=e=>({mediaLayout:{all:[e,{not:{context:"device",is:"mobile"}}]},mediaLayoutPhone:{all:[e,{context:"device",is:"mobile"}]}}),Go={videoSource:y("Source",i(ue,{}),$e.map(e=>({label:Xe[e],value:e})),je),youtubeUrl:Pe("YouTube link","https://youtu.be/…"),videoPlayback:y("Playback",i(ce,{}),Ke.map(e=>({label:Ge[e],value:e})),Ve)},Ko={phoneWordsTop:T("mobile",m(Le,i(he,{}),x,S,1,M,{kind:"spacing"},{clear:{hint:M}})),phoneWordsBottom:T("mobile",m(Ae,i(se,{}),x,S,1,U,{kind:"spacing"},{clear:{hint:U}})),phoneBoxGap:T("mobile",m(He,i(de,{}),x,S,1,k,{kind:"spacing"},{clear:{hint:k}}))};export{Yo as HERO_IMAGE2_KEYS,uo as HERO_IMAGE2_ROWS,No as HERO_IMAGE_KEYS,Wo as HERO_IMAGE_ROWS,Bo as HERO_LAYOUT_KEYS,so as HERO_LAYOUT_ROWS,ko as HERO_OVERLAY_ROWS,Ko as HERO_PHONE_WORDS_ROWS,Mo as HERO_SLIDE_OVERLAY_ROWS,ze as HERO_TABLET_VH_HINT,Uo as HERO_TEXTURE_COLOR_ROW,Go as HERO_VIDEO_ROWS,Fo as heroHeightFields,Vo as heroLayoutRules,qe as heroRatioLines,co as heroTintColorRow,ho as heroTintRow,ro as textureColorHint,eo as textureColorOfSlide};
1
+ import{jsx as t,jsxs as de,Fragment as se}from"react/jsx-runtime";import{HeightIcon as ce,ImageIcon as he,ImagesIcon as ue,OpacityIcon as pe,MediaLayoutSideBySideIcon as Oe,MediaLayoutStackedIcon as _e,GapIcon as me,PaddingBottomIcon as H,PaddingTopIcon as v,PlacementIcon as Y,PlayIcon as Ee,UploadIcon as ge}from"efficient-easel/icons";import{viewFocusKeys as V}from"../../../../format/lib/content/picture-focus-rows.js";import{HERO_FOCUS as _,MEDIA_LAYOUT_DEFAULT as fe,MEDIA_LAYOUT_LABELS as Re,MEDIA_LAYOUTS as be,resolvePhoneLayout as Te}from"../../../../format/lib/hero-media-layout.js";import{useEasel as Se,useSelectedHost as xe}from"efficient-easel/easel";import{SettingsDefaultReset as He,SettingsField as ve,SettingsSegmented as ye}from"efficient-easel/panel";import{describedAs as Ae,FLAT_ACCESS as Le,iconOf as Ie,onDesktopWords as De,phoneTwinFields as y,useAccessPatch as Pe}from"efficient-easel/screen/lib/document/box-fields";import{keptByRow as A}from"efficient-easel/screen/lib/document/style-fields";import{deviceField as p}from"efficient-easel/screen/lib/document/device-fields";import{HERO_WORDS_BOTTOM_DEFAULT as g,HERO_WORDS_MAX as f,HERO_WORDS_MIN as R,HERO_WORDS_TOP_DEFAULT as b,HERO_PHONE_BOX_GAP_DEFAULT as G,HERO_PHONE_BOX_GAP_LABEL as we,HERO_PHONE_WORDS_BOTTOM_DEFAULT as K,HERO_PHONE_WORDS_BOTTOM_LABEL as L,HERO_PHONE_WORDS_MAX as I,HERO_PHONE_WORDS_MIN as D,HERO_PHONE_WORDS_TOP_DEFAULT as X,HERO_PHONE_WORDS_TOP_LABEL as P}from"../../../../format/lib/hero-phone-stack.js";import{colorInput as j,edgePad as $,focusKeptField as Ce,plainText as Fe,Slider as q,upload as ke,useSelectedSibling as w}from"../controls.js";import{ColourRow as Ue,InheritedColourRow as We}from"../ColourControl.js";import{rowSay as Me,segmented as C,slider as u}from"../box-fields.js";import{CUSTOM_SHAPE as Be,SHAPE_TABLE as Ne}from"../../../../format/lib/content/gallery-card-layout.js";import{ShapePicker as Ye}from"../shape-picker.js";import{HERO_FIXED_DEFAULT as Ve,HERO_HEIGHT_PX as F,readHeroFixedHeight as Ge,SECTION_HEIGHT as h}from"../../../../format/lib/content/section-height.js";import{DEFAULT_TINT as k}from"../../../../format/lib/content/tint.js";import{editorEaselWords as Ke,say as l}from"../../../../format/lib/editor-words.js";import{nonEmptyString as U}from"../../../../format/lib/non-empty-string.js";import{findParentNode as Xe}from"../../../../format/lib/document/passes/document-position.js";import{DEFAULT_OVERLAY_POSITION as z,OVERLAY_POSITION_OPTIONS as J,slideOverlayState as Q}from"../../../../format/lib/sections/hero-overlay.js";import{VIDEO_PLAYBACK_DEFAULT as je,VIDEO_PLAYBACK_LABELS as $e,VIDEO_PLAYBACKS as qe,VIDEO_SOURCE_DEFAULT as ze,VIDEO_SOURCE_LABELS as Je,VIDEO_SOURCES as Qe}from"../../../../format/lib/hero-video.js";function Ze(){return Ne.filter(e=>e.ratio!==null||e.shape===Be)}const W={desktop:{number:"heightDesktop",fixed:"heightFixed"},tablet:{number:"heightTablet",fixed:"heightFixedTablet"},mobile:{number:"heightMobile",fixed:"heightFixedMobile"}},Z={read:e=>e.heightMobile,write:(e,o,i)=>({heightMobile:i}),fieldKey:()=>"heightMobile",ownField:!0,tablet:{read:e=>e.heightTablet,write:(e,o,i)=>({heightTablet:i}),fieldKey:()=>"heightTablet",ownField:!0}};function ee(e,{number:o,fixed:i}){const r=o===void 0?void 0:e[o];return Ge(e[i])??(typeof r=="number"?{unit:"vh",vh:r}:null)}const eo="On Tablet, this hero uses the Desktop vh. Set vh in the Desktop view.";function oo({view:e,keys:o,props:i}){const r=xe(),d=Pe(Le),{number:s}=o,m={...r?.values??{},...s?{[s]:i.value}:{}},S=ee(m,o),n=e==="tablet"?ee(m,W.desktop):null,c=S??n??{unit:"vh",vh:h.fallback},O=i.readOnly===!0,M=Ze(),ae=a=>{if(a===c.unit)return;if(a!=="vh"){d([[o.fixed,n?.unit===a?n.value:Ve[a]]]);return}const le=s!==void 0&&typeof m[s]!="number"&&n!==null&&n.unit!=="vh";d([[o.fixed,void 0],...le?[[s,h.fallback]]:[]])},E=S===null&&e!=="desktop",x=s===void 0,B=x&&n!==null&&n.unit!=="vh",N=n===null?`${h.fallback} ${h.unit}`:n.unit==="vh"?`${n.vh} ${h.unit}`:n.unit==="px"?n.value:M.find(a=>a.image===n.value)?.label??n.value;return t(ve,{label:l("Height"),icon:Ie(t(ce,{})),hint:x&&(c.unit==="vh"||B)?l(eo):void 0,action:e==="desktop"?void 0:t(He,{words:Ke()?.panel,label:l("Height"),changed:S!==null||!!m[o.fixed],detail:e==="tablet"?De(Me,N):N,disabled:O,onReset:()=>d([...s?[[s,void 0]]:[],[o.fixed,void 0]])}),children:de("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-8)",flex:"1 1 auto",minWidth:0},children:[t(ye,{options:[{id:"vh",label:l("vh"),disabled:B},{id:"ratio",label:l("Ratio")},{id:"px",label:l("px")}],value:c.unit,onChange:ae,ariaLabel:l("Unit"),disabled:O}),c.unit==="ratio"?t(Ye,{label:"Height",lines:M,column:"image",value:c.value,disabled:O,onChange:a=>d([[o.fixed,a]])}):c.unit==="px"?q({...F,value:E?null:c.px,...E?{placeholder:c.px}:{},suffix:F.unit,ariaLabel:"Height",disabled:O,onChange:a=>d([[o.fixed,`${a}${F.unit}`]])}):q({min:h.min,max:h.max,step:h.step,value:E?null:c.vh,...E?{placeholder:c.vh}:{},suffix:h.unit,ariaLabel:"Height",disabled:O||x,onChange:a=>i.onChange(a)})]})})}const T=(e,o=W[e])=>({type:"custom",...Ae({},{type:"number",label:"Height"}),render:i=>t(oo,{view:e,keys:o,props:i})}),to={read:e=>e.heightFixedTablet,write:(e,o,i)=>({heightFixedTablet:i}),fieldKey:()=>"heightFixedTablet",ownField:!0};function Mo({tabletNumber:e=!0}={}){const o=e?Z:{...Z,tablet:to},i=T("tablet",e?void 0:{fixed:W.tablet.fixed}),r=y("heightDesktop",T("desktop"),o,{phoneRow:i}),d=y("heightDesktop",T("desktop"),o,{phoneRow:T("mobile")});return{heightDesktop:r.heightDesktop,...e?{heightTablet:r.heightTablet,heightFixedTablet:A("heightTablet")}:{heightFixedTablet:r.heightFixedTablet},heightMobile:d.heightMobile,heightFixed:A("heightDesktop"),heightFixedMobile:A("heightMobile")}}const Bo={overlayColor:j("Overlay color",k),overlayPosition:$("Overlay position",J,z,"A corner would need a diagonal ramp, which this overlay does not draw.",t(Y,{}))},oe="Texture",te=e=>$("Overlay position",J,e,"A corner would need a diagonal ramp, which this overlay does not draw.",t(Y,{}),void 0,oe);function io(){try{const{appState:e,selectedItem:o}=Se(i=>i);return no(e,o?.props?.id)}catch{return}}function no(e,o){return U(Xe(e,o)?.props?.textureColor)}function ro({value:e,onChange:o}){const[i]=w("overlayPosition"),r=io(),d=U(e)??"",s=Q({overlayColor:d,overlayPosition:i},r);return t(We,{label:l("Overlay color"),value:d,inherited:s.color,resetTo:l(oe),onChange:o,onReset:()=>o("")})}const ao=te(z),lo=te("");function so(e){const[o]=w("overlayColor"),i=Q({overlayColor:o,overlayPosition:e.value}).own?ao:lo;return t(se,{children:i.render(e)})}function co(e){if(!Array.isArray(e))return;const o=e.flatMap((i,r)=>U(i?.props?.overlayColor)?[r+1]:[]);if(o.length!==0)return o.length===1?l("Slide {n}: own Overlay color.",{n:o[0]}):l("Slides {n}: own Overlay color.",{n:o.join(", ")})}function ho({value:e,onChange:o}){const[i]=w("slides");return t(Ue,{label:l("Texture color"),value:e||k,onChange:o,hint:co(i)})}const No={type:"custom",render:({value:e,onChange:o})=>t(ho,{value:e,onChange:o})},Yo={overlayColor:{type:"custom",render:({value:e,onChange:o})=>t(ro,{value:e,onChange:o})},overlayPosition:{type:"custom",render:({value:e,onChange:o})=>t(so,{value:e,onChange:o})}},uo={one:t(he,{}),side:t(Oe,{}),stacked:t(_e,{})},ie=e=>C("Layout",t(ue,{}),be.map(o=>({label:Re[o],value:o,picture:uo[o]})),fe,e?{phoneRest:o=>Te(void 0,o)}:void 0),po={mediaLayout:ie(),mediaLayoutPhone:y("mediaLayout",ie(!0)).mediaLayoutPhone},Oo=()=>u("Tint",t(pe,{}),0,100,5,0,"%"),ne=e=>Object.fromEntries(V(e).map(o=>[o,Ce()])),re=e=>ke("Background image","image/*","Upload a background image",{focus:e}),_o=()=>j("Tint color",k),Vo={mediaImage:re(_.image),...ne(_.image)},mo={mediaImage2:re(_.image2),...ne(_.image2),tintColor2:_o(),tintOpacity2:Oo()},Go=Object.keys(po),Ko=Object.keys(mo),Xo=["mediaImage",...V(_.image)],jo=e=>({mediaLayout:{all:[e,{not:{context:"device",is:"mobile"}}]},mediaLayoutPhone:{all:[e,{context:"device",is:"mobile"}]}}),$o={videoSource:C("Source",t(ge,{}),Qe.map(e=>({label:Je[e],value:e})),ze),youtubeUrl:Fe("YouTube link","https://youtu.be/…"),videoPlayback:C("Playback",t(Ee,{}),qe.map(e=>({label:$e[e],value:e})),je)},qo={phoneWordsTop:p("mobile",u(P,t(v,{}),D,I,1,X,{kind:"spacing"},{clear:{hint:X}})),phoneWordsBottom:p("mobile",u(L,t(H,{}),D,I,1,K,{kind:"spacing"},{clear:{hint:K}})),phoneBoxGap:p("mobile",u(we,t(me,{}),D,I,1,G,{kind:"spacing"},{clear:{hint:G}}))},zo={wordsTop:p("desktop",u(P,t(v,{}),R,f,1,b,{kind:"spacing"},{clear:{hint:b}})),wordsBottom:p("desktop",u(L,t(H,{}),R,f,1,g,{kind:"spacing"},{clear:{hint:g}})),wordsTopTablet:p("tablet",u(P,t(v,{}),R,f,1,b,{kind:"spacing"},{clear:{hint:b}})),wordsBottomTablet:p("tablet",u(L,t(H,{}),R,f,1,g,{kind:"spacing"},{clear:{hint:g}}))};export{Ko as HERO_IMAGE2_KEYS,mo as HERO_IMAGE2_ROWS,Xo as HERO_IMAGE_KEYS,Vo as HERO_IMAGE_ROWS,Go as HERO_LAYOUT_KEYS,po as HERO_LAYOUT_ROWS,Bo as HERO_OVERLAY_ROWS,qo as HERO_PHONE_WORDS_ROWS,Yo as HERO_SLIDE_OVERLAY_ROWS,eo as HERO_TABLET_VH_HINT,No as HERO_TEXTURE_COLOR_ROW,$o as HERO_VIDEO_ROWS,zo as HERO_WORDS_ROWS,Mo as heroHeightFields,jo as heroLayoutRules,Ze as heroRatioLines,_o as heroTintColorRow,Oo as heroTintRow,co as textureColorHint,no as textureColorOfSlide};
@@ -1 +1 @@
1
- import{siteLengthCss as _,siteLengthHeld as H,storedUnit as P}from"./css-length.js";import{convertLength as D,rowGrid as G}from"efficient-easel/screen/lib/content/length-units";import{ownEntry as L}from"../own-entry.js";const i={min:1e3,max:2e3,step:50,default:1600};function E(e){return{maxWidth:e,marginInline:"auto",width:"100%"}}function ae(e,t){if(e!==!1)return null;const n=typeof t=="number"?t:i.default;return E(n)}const l="--sf-site-width",m=`var(${l},${i.default}px)`,pe="100vw",M=`max-w-[${m}]`,ue=`max-w-[${i.default}px]`;function O(e){return typeof e!="number"||!Number.isFinite(e)?i.default:Math.round(Math.min(Math.max(e,i.min),i.max))}function fe(e,t){const n=_(e,t,"size",i);if(n!==null)return{[l]:n};const r=O(e);return r===i.default?{}:{[l]:`${r}px`}}const o={min:0,max:80,step:4,default:40,typedMax:Number.POSITIVE_INFINITY},v="--sf-site-gutter",a={min:0,max:24,step:4,typedMax:Number.POSITIVE_INFINITY},U=G({kind:"spacing"},"vw",o).max;function T(e,t){return e<=t?`${e}px`:`min(${e}px, ${U}vw)`}const C="--sf-site-gutter-phone",W="max-view-tablet:[--sf-site-gutter:var(--sf-site-gutter-phone)]!",y="max-view-wide:[&_[data-sf-line~=edge]:not([data-sf-line~=edge]_*)]:[--sf-site-gutter:var(--sf-site-gutter-phone)]",s=`var(${v},${o.default}px)`,V=`px-[${s}]`,me=["px-10","px-[60px]"],x={md:`min(24px,${s})`,sm:`min(20px,${s})`,frame:`min(24px,${s})`,tabs:`min(16px,${s})`},k=[[`max-view-desktop:px-[${x.md}]`,"max-view-desktop:px-6"],[`max-view-desktop:px-[${x.tabs}]`,"max-view-desktop:px-4"],[`max-[960px]:px-[${x.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${x.md}]`,"max-[900px]:px-6"],[`max-view-wide:px-[${x.md}]`,"max-view-wide:px-6"],[`max-view-tablet:px-[${x.sm}]`,"max-view-tablet:px-5"],[`max-view-wide:px-[${x.sm}]`,"max-view-wide:px-5"],[`max-[640px]:px-[${x.sm}]`,"max-[640px]:px-5"],[`view-wide:px-[${s}]`,"view-wide:px-10"],[`max-view-tablet:px-[min(24px,${s})]`,"max-view-tablet:px-6"],[`max-view-wide:-mx-[min(20px,${s})]`,"max-view-wide:-mx-5"],[`max-view-tablet:-mx-[min(20px,${s})]`,"max-view-tablet:-mx-5"],[`-mx-[${s}]`,"-mx-10"],[V,"px-10"]];function ce(e){return k.reduce((t,[n,r])=>t.split(n).join(r),e)}const F="sideSpaceOnce",de="data-sf-side",B="once";function _e(e){if(!(!e||typeof e!="object"))return e[F]===!0?B:void 0}const R="max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]";function Ee(e){return u[e??"box"]}const c="[[data-sf-side=once]_&]:max-view-wide:px-[var(--sf-site-gutter-phone,min(24px,var(--sf-site-gutter,40px)))]",p="[[data-sf-side=once]_&]:max-view-wide:px-[var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]",d={"max-[960px]":c,"max-[900px]":c,"max-view-desktop":c,"max-[1100px]":c,"max-view-wide":p,"max-view-tablet":p,"max-[720px]":p,"max-[640px]":p,"max-[800px]":p},g="var(--sf-pad-site,var(--sf-box-g,var(--sf-site-gutter,40px)))",w="[--sf-edge-g:var(--sf-pad-site)]",u={box:{className:"[--sf-pad-site:var(--sf-box-g,var(--sf-site-gutter,40px))] max-[960px]:[--sf-pad-site:min(24px,var(--sf-box-g,var(--sf-site-gutter,40px)))]",value:g,edge:w,frame:"max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",once:"[[data-sf-side=once]_&]:max-view-wide:[--sf-pad-site:var(--sf-site-gutter-phone,min(24px,var(--sf-box-g,var(--sf-site-gutter,40px))))]",onceFrame:d["max-[960px]"],onceGutter:"[[data-sf-side=once]_&]:max-[960px]:[--sf-box-g:min(24px,var(--sf-site-gutter,40px))] [[data-sf-side=once]_&]:max-view-wide:[--sf-box-g:var(--sf-site-gutter-phone,min(24px,var(--sf-site-gutter,40px)))]"},site:{className:"[--sf-pad-site:var(--sf-box-g,var(--sf-site-gutter,40px))] max-view-wide:[--sf-pad-site:min(20px,var(--sf-box-g,var(--sf-site-gutter,40px)))]",value:g,edge:w,frame:R,once:"[[data-sf-side=once]_&]:max-view-wide:[--sf-pad-site:var(--sf-site-gutter-phone,min(20px,var(--sf-box-g,var(--sf-site-gutter,40px))))]",onceFrame:d["max-view-wide"],onceGutter:"[[data-sf-side=once]_&]:max-view-wide:[--sf-box-g:var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]"},none:{className:"[--sf-pad-site:0px] max-view-wide:[--sf-pad-site:min(20px,var(--sf-box-g,var(--sf-site-gutter,40px)))]",value:g,edge:w,frame:"view-wide:px-0 max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]",once:"[[data-sf-side=once]_&]:max-view-wide:[--sf-pad-site:var(--sf-site-gutter-phone,min(20px,var(--sf-box-g,var(--sf-site-gutter,40px))))]",onceFrame:d["max-view-wide"],onceGutter:"[[data-sf-side=once]_&]:max-view-wide:[--sf-box-g:var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]"}},le=`mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] ${R}`,h="[--sf-box-g:var(--sf-site-gutter,40px)] [&>*]:[--sf-site-gutter:0px]",j="[[data-sf-side=once]_&]:[&>*]:[--sf-site-gutter-phone:0px]";function ve(e){return`${j} ${u[e].onceGutter}`}const z="[[data-sf-side=once]_&]:[--sf-box-g:var(--sf-site-gutter,40px)] [[data-sf-side=once]_&]:[&>*]:[--sf-site-gutter:0px] [[data-sf-side=once]_&]:[&>*]:[--sf-site-gutter-phone:0px]",K="[[data-sf-side=once]_&]:max-view-wide:-mx-[var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]",Y=/^([^\s:]+):px-\[min\((?:20|24)px,var\(--sf-site-gutter,40px\)\)\]$/,X="max-view-wide:-mx-[min(20px,var(--sf-site-gutter,40px))]";function Z(e){if(!e)return"";const t=[];for(const n of e.split(/\s+/)){const r=Y.exec(n)?.[1],f=r?L(d,r):void 0;f?t.push(f):n===X&&t.push(K)}return t.join(" ")}const ge="[[data-sf-side=once]_&]:[--sf-pad-site:inherit]",we="[[data-sf-side=once]_&]:[--sf-edge-g:var(--sf-box-g,var(--sf-site-gutter,40px))]";function q(e){if(!e)return"";const t=e.split(" "),n=["none","site","box"].find(r=>u[r].className.split(" ").every(f=>t.includes(f)));return n?`${z} ${u[n].once} ${u[n].onceGutter}`:""}function Se(e,t){const n=t?[q(e),Z(e)].filter(Boolean).join(" "):"";return n?`${e} ${n}`:e}function Oe(e){const t=h.replace(/&/g,"&amp;").replace(/>/g,"&gt;");return e.split(` ${t}`).join("").split(` ${h}`).join("")}const Te="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]";function I(e){return typeof e!="number"||!Number.isFinite(e)?o.default:Math.round(Math.min(Math.max(e,o.min),o.typedMax))}function Ce(e,t){const n=_(e,t,"spacing",o);if(n!==null)return{[v]:n};const r=I(e);return r===o.default?{}:{[v]:T(r,o.max)}}function A(e){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,a.min),a.typedMax))}function Re(e){return typeof e=="number"&&Number.isFinite(e)?O(e):null}function he(e,t){const n=_(e,t,"spacing",a);if(n!==null)return{[C]:n};const r=A(e);return r===null?{}:{[C]:T(r,a.max)}}function Ie(e){return A(e)===null?"":`${W} ${y}`}function Ae(e,t){const n=H(e,t,"spacing",o),r=n===null?I(e):D(n,P(t),"px","mobile",a);return Math.min(a.max,r)}function J(e=0){return`calc(${m}/2 - ${s}*2 - ${e}px)`}function $e(e=0){return`max-w-[${J(e).replace(/ /g,"_")}]`}const $=m,Ne=`max-w-[${$}]`,be=`max-w-[min(var(--sf-page-cap,${i.default}px),${i.default}px)]`,N="--sf-hero-cap",Q=`var(${N},none)`,He=`max-w-[${Q}]`,ee="--sf-hero-bleed-m",te="--sf-hero-bleed-w",ne="--sf-hero-chrome-x",re="--sf-hero-chrome-cap";function Pe(e){return e===!0?{[N]:$,[ee]:"auto",[te]:"100%",[ne]:"24px",[re]:"none"}:{}}const S=`calc(${m} - ${s}*2)`,De=`max-w-[${S.replace(/ /g,"_")}]`,Ge=M;function Le(e){return e!==!1?null:E(b)}const se="--sf-chrome-cap",b=`var(${se},${S})`,Me="data-page-width";function Ue(e){return e==="full"?"full":null}function We(e){return e==="full"?null:E(e==="content"?S:b)}function ye(e){if(e==="full")return"full";if(e==="content")return"content"}export{h as BOX_HOLDS_NO_GUTTER_CLASS,b as CHROME_CAP_READ,se as CHROME_CAP_VAR,S as CHROME_WIDTH_CAP,De as CHROME_WIDTH_CAP_CLASS,Te as EDITORIAL_COLUMN,pe as FULL_SECTION_WIDTH,Q as HERO_BACKGROUND_CAP,He as HERO_BACKGROUND_CAP_CLASS,N as HERO_BACKGROUND_VAR,ee as HERO_BLEED_MARGIN_VAR,te as HERO_BLEED_WIDTH_VAR,$ as HERO_CAP,Ne as HERO_CAP_CLASS,re as HERO_CHROME_CAP_VAR,ne as HERO_CHROME_INSET_VAR,i as PAGE_WIDTH,Me as PAGE_WIDTH_ATTR,Ge as PRE_CHROME_WIDTH_CAP_CLASS,be as PRE_HERO_CAP_CLASS,me as PRE_SITE_GUTTER_CLASSES,ue as PRE_SITE_WIDTH_CAP_CLASS,de as SIDE_ONCE_ATTR,we as SIDE_ONCE_EDGE_GUTTER_CLASS,ge as SIDE_ONCE_EDGE_SIDE_CLASS,z as SIDE_ONCE_HOLDS_CLASS,B as SIDE_ONCE_VALUE,U as SIDE_SPACE_GUARD_VW,F as SIDE_SPACE_ONCE_PROP,le as SITE_COLUMN,R as SITE_COLUMN_NARROW,o as SITE_GUTTER,s as SITE_GUTTER_CAP,V as SITE_GUTTER_CLASS,x as SITE_GUTTER_NARROW,a as SITE_GUTTER_PHONE,W as SITE_GUTTER_PHONE_CLASS,y as SITE_GUTTER_PHONE_EDGE_CLASS,C as SITE_GUTTER_PHONE_VAR,k as SITE_GUTTER_SUBSTITUTIONS,v as SITE_GUTTER_VAR,m as SITE_WIDTH_CAP,M as SITE_WIDTH_CAP_CLASS,l as SITE_WIDTH_VAR,ce as asMainGutters,E as centredCap,We as chromeWidthStyle,Pe as heroBackgroundTokens,Re as normalizeSectionContentMax,I as normalizeSiteGutter,A as normalizeSiteGutterPhone,O as normalizeSiteWidth,Ue as pageWidthMarker,ae as pageWidthStyle,ye as resolveChromeWidth,ve as sideOnceFrameHolds,_e as sideSpaceOnceAttr,Ie as siteGutterPhoneClass,Ae as siteGutterPhoneFollows,he as siteGutterPhoneTokens,Ce as siteGutterTokens,J as siteHalfColumnCap,$e as siteHalfColumnCapClass,Ee as siteSideRoom,Le as siteWidthCapStyle,fe as siteWidthTokens,Se as withSideOnce,Oe as withoutBoxHoldsNoGutter};
1
+ import{cssLengthOf as P,siteLengthCss as D,siteLengthHeld as S,storedUnit as G}from"./css-length.js";import{convertLength as L,rowGrid as M}from"efficient-easel/screen/lib/content/length-units";import{ownEntry as U}from"../own-entry.js";const i={min:1e3,max:2e3,step:50,default:1600};function _(e){return{maxWidth:e,marginInline:"auto",width:"100%"}}function ue(e,t){if(e!==!1)return null;const n=typeof t=="number"?t:i.default;return _(n)}const E="--sf-site-width",m=`var(${E},${i.default}px)`,fe="100vw",W=`max-w-[${m}]`,me=`max-w-[${i.default}px]`;function O(e){return typeof e!="number"||!Number.isFinite(e)?i.default:Math.round(Math.min(Math.max(e,i.min),i.max))}function ce(e,t){const n=D(e,t,"size",i);if(n!==null)return{[E]:n};const r=O(e);return r===i.default?{}:{[E]:`${r}px`}}const o={min:0,max:80,step:4,default:40,typedMax:Number.POSITIVE_INFINITY},l="--sf-site-gutter",a={min:0,max:24,step:4,typedMax:Number.POSITIVE_INFINITY},y=M({kind:"spacing"},"vw",o).max;function T(e,t){return e<=t?`${e}px`:`min(${e}px, ${y}vw)`}const C="--sf-site-gutter-phone",V="max-view-tablet:[--sf-site-gutter:var(--sf-site-gutter-phone)]!",k="max-view-wide:[&_[data-sf-line~=edge]:not([data-sf-line~=edge]_*)]:[--sf-site-gutter:var(--sf-site-gutter-phone)]",s=`var(${l},${o.default}px)`,F=`px-[${s}]`,de=["px-10","px-[60px]"],x={md:`min(24px,${s})`,sm:`min(20px,${s})`,frame:`min(24px,${s})`,tabs:`min(16px,${s})`},B=[[`max-view-desktop:px-[${x.md}]`,"max-view-desktop:px-6"],[`max-view-desktop:px-[${x.tabs}]`,"max-view-desktop:px-4"],[`max-[960px]:px-[${x.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${x.md}]`,"max-[900px]:px-6"],[`max-view-wide:px-[${x.md}]`,"max-view-wide:px-6"],[`max-view-tablet:px-[${x.sm}]`,"max-view-tablet:px-5"],[`max-view-wide:px-[${x.sm}]`,"max-view-wide:px-5"],[`max-[640px]:px-[${x.sm}]`,"max-[640px]:px-5"],[`view-wide:px-[${s}]`,"view-wide:px-10"],[`max-view-tablet:px-[min(24px,${s})]`,"max-view-tablet:px-6"],[`max-view-wide:-mx-[min(20px,${s})]`,"max-view-wide:-mx-5"],[`max-view-tablet:-mx-[min(20px,${s})]`,"max-view-tablet:-mx-5"],[`-mx-[${s}]`,"-mx-10"],[F,"px-10"]];function _e(e){return B.reduce((t,[n,r])=>t.split(n).join(r),e)}const j="sideSpaceOnce",Ee="data-sf-side",z="once";function le(e){if(!(!e||typeof e!="object"))return e[j]===!0?z:void 0}const R="max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]";function ve(e){return u[e??"box"]}const c="[[data-sf-side=once]_&]:max-view-wide:px-[var(--sf-site-gutter-phone,min(24px,var(--sf-site-gutter,40px)))]",p="[[data-sf-side=once]_&]:max-view-wide:px-[var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]",d={"max-[960px]":c,"max-[900px]":c,"max-view-desktop":c,"max-[1100px]":c,"max-view-wide":p,"max-view-tablet":p,"max-[720px]":p,"max-[640px]":p,"max-[800px]":p},v="var(--sf-pad-site,var(--sf-box-g,var(--sf-site-gutter,40px)))",w="[--sf-edge-g:var(--sf-pad-site)]",u={box:{className:"[--sf-pad-site:var(--sf-box-g,var(--sf-site-gutter,40px))] max-[960px]:[--sf-pad-site:min(24px,var(--sf-box-g,var(--sf-site-gutter,40px)))]",value:v,edge:w,frame:"max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",once:"[[data-sf-side=once]_&]:max-view-wide:[--sf-pad-site:var(--sf-site-gutter-phone,min(24px,var(--sf-box-g,var(--sf-site-gutter,40px))))]",onceFrame:d["max-[960px]"],onceGutter:"[[data-sf-side=once]_&]:max-[960px]:[--sf-box-g:min(24px,var(--sf-site-gutter,40px))] [[data-sf-side=once]_&]:max-view-wide:[--sf-box-g:var(--sf-site-gutter-phone,min(24px,var(--sf-site-gutter,40px)))]"},site:{className:"[--sf-pad-site:var(--sf-box-g,var(--sf-site-gutter,40px))] max-view-wide:[--sf-pad-site:min(20px,var(--sf-box-g,var(--sf-site-gutter,40px)))]",value:v,edge:w,frame:R,once:"[[data-sf-side=once]_&]:max-view-wide:[--sf-pad-site:var(--sf-site-gutter-phone,min(20px,var(--sf-box-g,var(--sf-site-gutter,40px))))]",onceFrame:d["max-view-wide"],onceGutter:"[[data-sf-side=once]_&]:max-view-wide:[--sf-box-g:var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]"},none:{className:"[--sf-pad-site:0px] max-view-wide:[--sf-pad-site:min(20px,var(--sf-box-g,var(--sf-site-gutter,40px)))]",value:v,edge:w,frame:"view-wide:px-0 max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]",once:"[[data-sf-side=once]_&]:max-view-wide:[--sf-pad-site:var(--sf-site-gutter-phone,min(20px,var(--sf-box-g,var(--sf-site-gutter,40px))))]",onceFrame:d["max-view-wide"],onceGutter:"[[data-sf-side=once]_&]:max-view-wide:[--sf-box-g:var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]"}},we=`mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] ${R}`,h="[--sf-box-g:var(--sf-site-gutter,40px)] [&>*]:[--sf-site-gutter:0px]",K="[[data-sf-side=once]_&]:[&>*]:[--sf-site-gutter-phone:0px]";function ge(e){return`${K} ${u[e].onceGutter}`}const Y="[[data-sf-side=once]_&]:[--sf-box-g:var(--sf-site-gutter,40px)] [[data-sf-side=once]_&]:[&>*]:[--sf-site-gutter:0px] [[data-sf-side=once]_&]:[&>*]:[--sf-site-gutter-phone:0px]",X="[[data-sf-side=once]_&]:max-view-wide:-mx-[var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]",Z=/^([^\s:]+):px-\[min\((?:20|24)px,var\(--sf-site-gutter,40px\)\)\]$/,q="max-view-wide:-mx-[min(20px,var(--sf-site-gutter,40px))]";function J(e){if(!e)return"";const t=[];for(const n of e.split(/\s+/)){const r=Z.exec(n)?.[1],f=r?U(d,r):void 0;f?t.push(f):n===q&&t.push(X)}return t.join(" ")}const Se="[[data-sf-side=once]_&]:[--sf-pad-site:inherit]",Oe="[[data-sf-side=once]_&]:[--sf-edge-g:var(--sf-box-g,var(--sf-site-gutter,40px))]";function Q(e){if(!e)return"";const t=e.split(" "),n=["none","site","box"].find(r=>u[r].className.split(" ").every(f=>t.includes(f)));return n?`${Y} ${u[n].once} ${u[n].onceGutter}`:""}function Te(e,t){const n=t?[Q(e),J(e)].filter(Boolean).join(" "):"";return n?`${e} ${n}`:e}function Ce(e){const t=h.replace(/&/g,"&amp;").replace(/>/g,"&gt;");return e.split(` ${t}`).join("").split(` ${h}`).join("")}const Re="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]";function I(e){return typeof e!="number"||!Number.isFinite(e)?o.default:Math.round(Math.min(Math.max(e,o.min),o.typedMax))}function A(e,t,n){const r=S(e,t,"spacing",n);return r===null?null:P(r,"vw")}function he(e,t){const n=A(e,t,o);if(n!==null)return{[l]:n};const r=I(e);return r===o.default?{}:{[l]:T(r,o.max)}}function $(e){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,a.min),a.typedMax))}function Ie(e){return typeof e=="number"&&Number.isFinite(e)?O(e):null}function Ae(e,t){const n=A(e,t,a);if(n!==null)return{[C]:n};const r=$(e);return r===null?{}:{[C]:T(r,a.max)}}function $e(e){return $(e)===null?"":`${V} ${k}`}function Ne(e,t){const n=S(e,t,"spacing",o),r=n===null?I(e):L(n,G(t),"px","mobile",a);return Math.min(a.max,r)}function ee(e=0){return`calc(${m}/2 - ${s}*2 - ${e}px)`}function be(e=0){return`max-w-[${ee(e).replace(/ /g,"_")}]`}const N=m,He=`max-w-[${N}]`,Pe=`max-w-[min(var(--sf-page-cap,${i.default}px),${i.default}px)]`,b="--sf-hero-cap",te=`var(${b},none)`,De=`max-w-[${te}]`,ne="--sf-hero-bleed-m",re="--sf-hero-bleed-w",se="--sf-hero-chrome-x",ie="--sf-hero-chrome-cap";function Ge(e){return e===!0?{[b]:N,[ne]:"auto",[re]:"100%",[se]:"24px",[ie]:"none"}:{}}const g=`calc(${m} - ${s}*2)`,Le=`max-w-[${g.replace(/ /g,"_")}]`,Me=W;function Ue(e){return e!==!1?null:_(H)}const oe="--sf-chrome-cap",H=`var(${oe},${g})`,We="data-page-width";function ye(e){return e==="full"?"full":null}function Ve(e){return e==="full"?null:_(e==="content"?g:H)}function ke(e){if(e==="full")return"full";if(e==="content")return"content"}export{h as BOX_HOLDS_NO_GUTTER_CLASS,H as CHROME_CAP_READ,oe as CHROME_CAP_VAR,g as CHROME_WIDTH_CAP,Le as CHROME_WIDTH_CAP_CLASS,Re as EDITORIAL_COLUMN,fe as FULL_SECTION_WIDTH,te as HERO_BACKGROUND_CAP,De as HERO_BACKGROUND_CAP_CLASS,b as HERO_BACKGROUND_VAR,ne as HERO_BLEED_MARGIN_VAR,re as HERO_BLEED_WIDTH_VAR,N as HERO_CAP,He as HERO_CAP_CLASS,ie as HERO_CHROME_CAP_VAR,se as HERO_CHROME_INSET_VAR,i as PAGE_WIDTH,We as PAGE_WIDTH_ATTR,Me as PRE_CHROME_WIDTH_CAP_CLASS,Pe as PRE_HERO_CAP_CLASS,de as PRE_SITE_GUTTER_CLASSES,me as PRE_SITE_WIDTH_CAP_CLASS,Ee as SIDE_ONCE_ATTR,Oe as SIDE_ONCE_EDGE_GUTTER_CLASS,Se as SIDE_ONCE_EDGE_SIDE_CLASS,Y as SIDE_ONCE_HOLDS_CLASS,z as SIDE_ONCE_VALUE,y as SIDE_SPACE_GUARD_VW,j as SIDE_SPACE_ONCE_PROP,we as SITE_COLUMN,R as SITE_COLUMN_NARROW,o as SITE_GUTTER,s as SITE_GUTTER_CAP,F as SITE_GUTTER_CLASS,x as SITE_GUTTER_NARROW,a as SITE_GUTTER_PHONE,V as SITE_GUTTER_PHONE_CLASS,k as SITE_GUTTER_PHONE_EDGE_CLASS,C as SITE_GUTTER_PHONE_VAR,B as SITE_GUTTER_SUBSTITUTIONS,l as SITE_GUTTER_VAR,m as SITE_WIDTH_CAP,W as SITE_WIDTH_CAP_CLASS,E as SITE_WIDTH_VAR,_e as asMainGutters,_ as centredCap,Ve as chromeWidthStyle,Ge as heroBackgroundTokens,Ie as normalizeSectionContentMax,I as normalizeSiteGutter,$ as normalizeSiteGutterPhone,O as normalizeSiteWidth,ye as pageWidthMarker,ue as pageWidthStyle,ke as resolveChromeWidth,ge as sideOnceFrameHolds,le as sideSpaceOnceAttr,$e as siteGutterPhoneClass,Ne as siteGutterPhoneFollows,Ae as siteGutterPhoneTokens,he as siteGutterTokens,ee as siteHalfColumnCap,be as siteHalfColumnCapClass,ve as siteSideRoom,Ue as siteWidthCapStyle,ce as siteWidthTokens,Te as withSideOnce,Ce as withoutBoxHoldsNoGutter};
@@ -36,3 +36,15 @@ export declare function phoneSidewaysPoints(): {
36
36
  label: string;
37
37
  value: HeroPhoneSideways;
38
38
  }[];
39
+ export declare const HERO_WORDS_TOP_VAR = "--sf-hero-words-top";
40
+ export declare const HERO_WORDS_BOTTOM_VAR = "--sf-hero-words-bottom";
41
+ export declare const HERO_WORDS_TOP_TABLET_VAR = "--sf-hero-words-top-t";
42
+ export declare const HERO_WORDS_BOTTOM_TABLET_VAR = "--sf-hero-words-bottom-t";
43
+ export declare const HERO_WORDS_TOP_DEFAULT = 140;
44
+ export declare const HERO_WORDS_BOTTOM_DEFAULT = 56;
45
+ export declare const HERO_WORDS_MIN = 0;
46
+ export declare const HERO_WORDS_MAX = 400;
47
+ export declare function heroWordsSpace(top?: unknown, bottom?: unknown, topTablet?: unknown, bottomTablet?: unknown): {
48
+ className: string | null;
49
+ style: Record<string, string>;
50
+ };
@@ -1 +1 @@
1
- import{PHONE_EDGE as x}from"./content/view-lines.js";import{parseOption as p}from"efficient-shell/format";const T=x,s=["top","middle","bottom"],H=["left","center","right"],c="bottom",P="left",i={top:"Top",middle:"Middle",bottom:"Bottom"},R={left:"Left",center:"Center",right:"Right"},B="Up and down",b="Sideways",f={top:"flex-start",middle:"center",bottom:"flex-end"},N={left:"flex-start",center:"center",right:"flex-end"},d="--sf-hero-phone-y",S="--sf-hero-phone-x";function A(t){return p(s,c,t)}function D(t){return p(H,P,t)}function U(t,r){const n=A(t),o=D(r),e={};return n!==c&&(e[d]=f[n]),o!==P&&(e[S]=N[o]),e}const h="--sf-hero-phone-words-top",W="--sf-hero-phone-words-bottom",m="--sf-hero-phone-box-gap",y=100,w=90,M=28,L=0,a=200,F="Words space top",I="Words space bottom",g="Space between boxes";function _(t){if(!(typeof t!="number"||!Number.isFinite(t)))return Math.min(a,Math.max(L,Math.round(t)))}function X(t,r,n){const o={},e=_(t),O=_(r),E=_(n);return e!==void 0&&(o[h]=`${e}px`),O!==void 0&&(o[W]=`${O}px`),E!==void 0&&(o[m]=`${E}px`),o}function Y(){return s.map(t=>({label:i[t],value:t}))}function V(){return H.map(t=>({label:R[t],value:t}))}export{M as HERO_PHONE_BOX_GAP_DEFAULT,g as HERO_PHONE_BOX_GAP_LABEL,m as HERO_PHONE_BOX_GAP_VAR,T as HERO_PHONE_BREAKPOINT,H as HERO_PHONE_SIDEWAYS,P as HERO_PHONE_SIDEWAYS_DEFAULT,N as HERO_PHONE_SIDEWAYS_FLEX,b as HERO_PHONE_SIDEWAYS_LABEL,R as HERO_PHONE_SIDEWAYS_LABELS,S as HERO_PHONE_SIDEWAYS_VAR,s as HERO_PHONE_UPDOWN,c as HERO_PHONE_UPDOWN_DEFAULT,f as HERO_PHONE_UPDOWN_FLEX,B as HERO_PHONE_UPDOWN_LABEL,i as HERO_PHONE_UPDOWN_LABELS,d as HERO_PHONE_UPDOWN_VAR,w as HERO_PHONE_WORDS_BOTTOM_DEFAULT,I as HERO_PHONE_WORDS_BOTTOM_LABEL,W as HERO_PHONE_WORDS_BOTTOM_VAR,a as HERO_PHONE_WORDS_MAX,L as HERO_PHONE_WORDS_MIN,y as HERO_PHONE_WORDS_TOP_DEFAULT,F as HERO_PHONE_WORDS_TOP_LABEL,h as HERO_PHONE_WORDS_TOP_VAR,U as heroPhoneStackStyle,X as heroPhoneWordsStyle,D as normalisePhoneSideways,A as normalisePhoneUpDown,V as phoneSidewaysPoints,Y as phoneUpDownPoints};
1
+ import{PHONE_EDGE as h}from"./content/view-lines.js";import{parseOption as E}from"efficient-shell/format";const Y=h,c=["top","middle","bottom"],R=["left","center","right"],x="bottom",H="left",A={top:"Top",middle:"Middle",bottom:"Bottom"},D={left:"Left",center:"Center",right:"Right"},$="Up and down",k="Sideways",N={top:"flex-start",middle:"center",bottom:"flex-end"},a={left:"flex-start",center:"center",right:"flex-end"},m="--sf-hero-phone-y",W="--sf-hero-phone-x";function T(o){return E(c,x,o)}function u(o){return E(R,H,o)}function v(o,_){const r=T(o),e=u(_),t={};return r!==x&&(t[m]=N[r]),e!==H&&(t[W]=a[e]),t}const L="--sf-hero-phone-words-top",b="--sf-hero-phone-words-bottom",w="--sf-hero-phone-box-gap",G=100,C=90,j=28,l=0,B=200,K="Words space top",q="Words space bottom",z="Space between boxes";function s(o){if(!(typeof o!="number"||!Number.isFinite(o)))return Math.min(B,Math.max(l,Math.round(o)))}function J(o,_,r){const e={},t=s(o),n=s(_),O=s(r);return t!==void 0&&(e[L]=`${t}px`),n!==void 0&&(e[b]=`${n}px`),O!==void 0&&(e[w]=`${O}px`),e}function Q(){return c.map(o=>({label:A[o],value:o}))}function Z(){return R.map(o=>({label:D[o],value:o}))}const M="--sf-hero-words-top",U="--sf-hero-words-bottom",i="--sf-hero-words-top-t",f="--sf-hero-words-bottom-t",oo=140,to=56,y=0,F=400,d="pt-[var(--sf-hero-words-top,140px)] pb-[var(--sf-hero-words-bottom,56px)]",I="view-wide:max-view-desktop:pt-[var(--sf-hero-words-top-t,var(--sf-hero-words-top,140px))] view-wide:max-view-desktop:pb-[var(--sf-hero-words-bottom-t,var(--sf-hero-words-bottom,56px))]";function V(o){if(!(typeof o!="number"||!Number.isFinite(o)))return Math.min(F,Math.max(y,Math.round(o)))}function eo(o,_,r,e){const t={},n=(P,S)=>{const p=V(S);p!==void 0&&(t[P]=`${p}px`)};return n(M,o),n(U,_),n(i,r),n(f,e),Object.keys(t).length===0?{className:null,style:t}:{className:i in t||f in t?`${d} ${I}`:d,style:t}}export{j as HERO_PHONE_BOX_GAP_DEFAULT,z as HERO_PHONE_BOX_GAP_LABEL,w as HERO_PHONE_BOX_GAP_VAR,Y as HERO_PHONE_BREAKPOINT,R as HERO_PHONE_SIDEWAYS,H as HERO_PHONE_SIDEWAYS_DEFAULT,a as HERO_PHONE_SIDEWAYS_FLEX,k as HERO_PHONE_SIDEWAYS_LABEL,D as HERO_PHONE_SIDEWAYS_LABELS,W as HERO_PHONE_SIDEWAYS_VAR,c as HERO_PHONE_UPDOWN,x as HERO_PHONE_UPDOWN_DEFAULT,N as HERO_PHONE_UPDOWN_FLEX,$ as HERO_PHONE_UPDOWN_LABEL,A as HERO_PHONE_UPDOWN_LABELS,m as HERO_PHONE_UPDOWN_VAR,C as HERO_PHONE_WORDS_BOTTOM_DEFAULT,q as HERO_PHONE_WORDS_BOTTOM_LABEL,b as HERO_PHONE_WORDS_BOTTOM_VAR,B as HERO_PHONE_WORDS_MAX,l as HERO_PHONE_WORDS_MIN,G as HERO_PHONE_WORDS_TOP_DEFAULT,K as HERO_PHONE_WORDS_TOP_LABEL,L as HERO_PHONE_WORDS_TOP_VAR,to as HERO_WORDS_BOTTOM_DEFAULT,f as HERO_WORDS_BOTTOM_TABLET_VAR,U as HERO_WORDS_BOTTOM_VAR,F as HERO_WORDS_MAX,y as HERO_WORDS_MIN,oo as HERO_WORDS_TOP_DEFAULT,i as HERO_WORDS_TOP_TABLET_VAR,M as HERO_WORDS_TOP_VAR,v as heroPhoneStackStyle,J as heroPhoneWordsStyle,eo as heroWordsSpace,u as normalisePhoneSideways,T as normalisePhoneUpDown,Z as phoneSidewaysPoints,Q as phoneUpDownPoints};
@@ -0,0 +1 @@
1
+ export declare const HeaderTopInkContext: import("react").Context<string | null>;
@@ -0,0 +1 @@
1
+ import{createContext as t}from"react";const o=t(null);export{o as HeaderTopInkContext};
@@ -14,6 +14,7 @@ interface HeroPosterProps {
14
14
  slideShown?: boolean;
15
15
  laterSlide?: boolean;
16
16
  laterOfLead?: boolean;
17
+ phoneFrame?: string;
17
18
  }
18
- export default function HeroPoster({ videoSrc, videoAv1Src, videoSrcPhone, videoAv1SrcPhone, posterSrc, posterSrcPhone, showVideo, playbackRate, objectPosition, objectPositionPhone, objectPositionTablet, quiet, slideShown, laterSlide, laterOfLead, }: HeroPosterProps): import("react").JSX.Element;
19
+ export default function HeroPoster({ videoSrc, videoAv1Src, videoSrcPhone, videoAv1SrcPhone, posterSrc, posterSrcPhone, showVideo, playbackRate, objectPosition, objectPositionPhone, objectPositionTablet, quiet, slideShown, laterSlide, laterOfLead, phoneFrame, }: HeroPosterProps): import("react").JSX.Element;
19
20
  export {};
@@ -1 +1 @@
1
- "use client";import{jsx as a,jsxs as H}from"react/jsx-runtime";import{useEffect as l,useRef as R,useState as n}from"react";import{SiteImage as oe}from"../lib/site-runtime.js";import ae from"./HeroHeldFrame.js";import{isExternalMediaUrl as ne,videoForView as ie,videoSources as le}from"../lib/media.js";import{EDGE_PHONE_MEDIA as T}from"../lib/content/view-values.js";import{EDGE_WIDE_MEDIA as ce}from"../../format/lib/content/view-lines.js";import{useViewWidthRead as de}from"./SectionAnimation.js";import{sizedImage as W}from"../../format/lib/sized-image.js";import{phoneFocus as ue}from"../../format/lib/content/phone-focus.js";import{useFirstScreenPlace as me}from"../lib/first-screen.js";import{partAttr as fe}from"../../format/lib/content/part-names.js";const pe=.5;function ve({videoSrc:$,videoAv1Src:M,videoSrcPhone:V,videoAv1SrcPhone:G,posterSrc:q,posterSrcPhone:B,showVideo:F=!0,playbackRate:z=pe,objectPosition:u="50% 50%",objectPositionPhone:K,objectPositionTablet:O,quiet:b=!1,slideShown:U,laterSlide:I=!1,laterOfLead:Y=!1}){const m=ue(K,O),v=me(),[h,J]=n(!1),w=v==="below"&&!h,Q=v==="first",t=q||"",r=B||"",L=R(null),N=de(L,!0,!0),y=N===void 0?void 0:N==="phone",k=ie({video:$,av1:M,videoPhone:V,av1Phone:G},y===!0),o=k.video||"",X=le(o,k.av1),[E,S]=n(!1),[x,_]=n(!1),[Z,A]=n(!1),[ee,C]=n(!1),f=U??!0,[g,te]=n(!1),i=v!=="first"&&!Y,[c,j]=n(!1),P=R(null);l(()=>{if(!i)return;if(document.readyState==="complete"){j(!0);return}const e=()=>j(!0);return window.addEventListener("load",e,{once:!0}),()=>window.removeEventListener("load",e)},[i]),l(()=>{S(!1),_(!1),A(!1),C(!1)},[o,t,r]),l(()=>{f&&te(!0)},[f]),l(()=>{const e=P.current;e&&(f?e.play()?.catch(()=>{}):e.pause())},[f,g,c]),l(()=>{if(!I||i&&!c)return;const e=()=>J(!0);if(typeof window.requestIdleCallback=="function"){const se=window.requestIdleCallback(e,{timeout:2e3});return()=>window.cancelIdleCallback(se)}const s=setTimeout(e,800);return()=>clearTimeout(s)},[I,i,c]),l(()=>{const e=P.current;if(!e)return;const s=()=>{e.playbackRate=z};return s(),e.addEventListener("loadedmetadata",s),()=>e.removeEventListener("loadedmetadata",s)},[o,z]);const D=ne(t),d=t&&(D||r)&&!x?W(t):{src:t},p=r&&!x?W(r):{src:r},re=r&&!w&&!h?[{sized:p,media:T},...t?[{sized:d,media:ce}]:[]]:[];return H("div",{ref:L,className:"absolute inset-0 z-[1]",...fe("hero-media"),children:[a("div",{className:"absolute inset-0",style:{background:"var(--site-surface)"}}),re.map(({sized:e,media:s})=>a("link",{rel:"preload",as:"image",href:e.src,media:s,fetchPriority:"high",...e.srcSet?{imageSrcSet:e.srcSet,imageSizes:"100vw"}:{}},s)),(t||r)&&(D||r?(()=>{const e=a("img",{...t?{src:d.src}:{},...d.srcSet?{srcSet:d.srcSet,sizes:"100vw"}:{},alt:"",...w?{loading:"lazy"}:{},...Q?{fetchPriority:"high"}:{},className:`absolute inset-0 z-[2] h-full w-full object-cover ${m.className}`.trim(),style:{display:E?"none":"block",objectPosition:u,...m.style},onError:s=>{s.currentTarget.currentSrc&&(d.srcSet||p.srcSet?_(!0):S(!0))}},r?void 0:t);return r?H("picture",{children:[a("source",{media:T,srcSet:p.srcSet||p.src,sizes:"100vw"}),e]},`${t} ${r}`):e})():a(oe,{src:t,alt:"",fill:!0,...w?{}:h?{loading:"eager"}:{priority:!0},sizes:"100vw",className:`z-[2] object-cover ${m.className}`.trim(),style:{display:E?"none":"block",objectPosition:u,...m.style},onError:()=>S(!0)},t)),F&&!b&&o&&y!==void 0&&g&&(!i||c)&&!Z&&a("video",{ref:P,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"metadata",className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:u},onError:()=>A(!0),children:X.map(e=>a("source",{src:e.src,type:e.type},e.src))},o),F&&b&&o&&y!==void 0&&g&&(!i||c)&&!ee&&(!t||E)&&a(ae,{src:o,objectPosition:u,onError:()=>C(!0)},o)]})}export{ve as default};
1
+ "use client";import{jsx as a,jsxs as R}from"react/jsx-runtime";import{useEffect as l,useRef as T,useState as n}from"react";import{SiteImage as ne}from"../lib/site-runtime.js";import ie from"./HeroHeldFrame.js";import{isExternalMediaUrl as le,videoForView as ce,videoSources as de}from"../lib/media.js";import{EDGE_PHONE_MEDIA as W}from"../lib/content/view-values.js";import{EDGE_WIDE_MEDIA as ue}from"../../format/lib/content/view-lines.js";import{useViewWidthRead as me}from"./SectionAnimation.js";import{sizedImage as $}from"../../format/lib/sized-image.js";import{phoneFocus as fe}from"../../format/lib/content/phone-focus.js";import{useFirstScreenPlace as pe}from"../lib/first-screen.js";import{partAttr as ve}from"../../format/lib/content/part-names.js";import{heroPosterSizes as he}from"../lib/hero-poster-sizes.js";const ye=.5;function we({videoSrc:M,videoAv1Src:V,videoSrcPhone:G,videoAv1SrcPhone:q,posterSrc:B,posterSrcPhone:K,showVideo:z=!0,playbackRate:b=ye,objectPosition:u="50% 50%",objectPositionPhone:O,objectPositionTablet:U,quiet:I=!1,slideShown:Y,laterSlide:L=!1,laterOfLead:J=!1,phoneFrame:Q}){const m=he(Q),f=fe(O,U),h=pe(),[y,X]=n(!1),w=h==="below"&&!y,Z=h==="first",t=B||"",r=K||"",N=T(null),k=me(N,!0,!0),S=k===void 0?void 0:k==="phone",x=ce({video:M,av1:V,videoPhone:G,av1Phone:q},S===!0),o=x.video||"",ee=de(o,x.av1),[E,P]=n(!1),[_,A]=n(!1),[te,C]=n(!1),[re,j]=n(!1),p=Y??!0,[g,se]=n(!1),i=h!=="first"&&!J,[c,D]=n(!1),F=T(null);l(()=>{if(!i)return;if(document.readyState==="complete"){D(!0);return}const e=()=>D(!0);return window.addEventListener("load",e,{once:!0}),()=>window.removeEventListener("load",e)},[i]),l(()=>{P(!1),A(!1),C(!1),j(!1)},[o,t,r]),l(()=>{p&&se(!0)},[p]),l(()=>{const e=F.current;e&&(p?e.play()?.catch(()=>{}):e.pause())},[p,g,c]),l(()=>{if(!L||i&&!c)return;const e=()=>X(!0);if(typeof window.requestIdleCallback=="function"){const ae=window.requestIdleCallback(e,{timeout:2e3});return()=>window.cancelIdleCallback(ae)}const s=setTimeout(e,800);return()=>clearTimeout(s)},[L,i,c]),l(()=>{const e=F.current;if(!e)return;const s=()=>{e.playbackRate=b};return s(),e.addEventListener("loadedmetadata",s),()=>e.removeEventListener("loadedmetadata",s)},[o,b]);const H=le(t),d=t&&(H||r)&&!_?$(t):{src:t},v=r&&!_?$(r):{src:r},oe=r&&!w&&!y?[{sized:v,media:W},...t?[{sized:d,media:ue}]:[]]:[];return R("div",{ref:N,className:"absolute inset-0 z-[1]",...ve("hero-media"),children:[a("div",{className:"absolute inset-0",style:{background:"var(--site-surface)"}}),oe.map(({sized:e,media:s})=>a("link",{rel:"preload",as:"image",href:e.src,media:s,fetchPriority:"high",...e.srcSet?{imageSrcSet:e.srcSet,imageSizes:m}:{}},s)),(t||r)&&(H||r?(()=>{const e=a("img",{...t?{src:d.src}:{},...d.srcSet?{srcSet:d.srcSet,sizes:m}:{},alt:"",...w?{loading:"lazy"}:{},...Z?{fetchPriority:"high"}:{},className:`absolute inset-0 z-[2] h-full w-full object-cover ${f.className}`.trim(),style:{display:E?"none":"block",objectPosition:u,...f.style},onError:s=>{s.currentTarget.currentSrc&&(d.srcSet||v.srcSet?A(!0):P(!0))}},r?void 0:t);return r?R("picture",{children:[a("source",{media:W,srcSet:v.srcSet||v.src,sizes:m}),e]},`${t} ${r}`):e})():a(ne,{src:t,alt:"",fill:!0,...w?{}:y?{loading:"eager"}:{priority:!0},sizes:m,className:`z-[2] object-cover ${f.className}`.trim(),style:{display:E?"none":"block",objectPosition:u,...f.style},onError:()=>P(!0)},t)),z&&!I&&o&&S!==void 0&&g&&(!i||c)&&!te&&a("video",{ref:F,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"metadata",className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:u},onError:()=>C(!0),children:ee.map(e=>a("source",{src:e.src,type:e.type},e.src))},o),z&&I&&o&&S!==void 0&&g&&(!i||c)&&!re&&(!t||E)&&a(ie,{src:o,objectPosition:u,onError:()=>j(!0)},o)]})}export{we as default};
@@ -19,6 +19,10 @@ interface Props {
19
19
  phoneWordsTop?: number;
20
20
  phoneWordsBottom?: number;
21
21
  phoneBoxGap?: number;
22
+ wordsTop?: number;
23
+ wordsBottom?: number;
24
+ wordsTopTablet?: number;
25
+ wordsBottomTablet?: number;
22
26
  autoplay?: boolean;
23
27
  autoplayInterval?: number;
24
28
  showTicker?: boolean;
@@ -40,4 +44,4 @@ interface Props {
40
44
  editing?: boolean;
41
45
  partMotion?: Record<string, unknown>;
42
46
  }
43
- export default function HeroSection({ slides: Slides, strip: Strip, alignment, textureOpacity, showTexture, textureColor, phoneUpDown, phoneSideways, phoneWordsTop, phoneWordsBottom, phoneBoxGap, autoplay, autoplayInterval, showTicker, tickerItems, heightDesktop, heightTablet, heightMobile, heightFixed, heightFixedTablet, heightFixedMobile, showPicker, pickerShape, pickerPlacement, showArrows, arrowsShape, arrowsPlacement, editing, partMotion, }: Props): import("react").JSX.Element;
47
+ export default function HeroSection({ slides: Slides, strip: Strip, alignment, textureOpacity, showTexture, textureColor, phoneUpDown, phoneSideways, phoneWordsTop, phoneWordsBottom, phoneBoxGap, wordsTop, wordsBottom, wordsTopTablet, wordsBottomTablet, autoplay, autoplayInterval, showTicker, tickerItems, heightDesktop, heightTablet, heightMobile, heightFixed, heightFixedTablet, heightFixedMobile, showPicker, pickerShape, pickerPlacement, showArrows, arrowsShape, arrowsPlacement, editing, partMotion, }: Props): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as n,jsxs as $}from"react/jsx-runtime";import{HideTaker as ze}from"./ViewHideRoot.js";import{useCallback as v,useEffect as k,useId as Xe,useRef as u,useState as y}from"react";import{markOverlayPortal as oe}from"../../format/lib/document/overlay-portal.js";import Ge from"./Ticker.js";import{HeroSlideStyleContext as Ye}from"./HeroSlide.js";import je from"./HeroArrows.js";import qe from"./Reel.js";import{TICKER_PART_ATTR as Ke}from"./PreviewTickerContext.js";import{useReducedMotion as Fe}from"./useReducedMotion.js";import{heroHeightBox as Je,heroStoresRatio as Qe}from"../../format/lib/content/section-height.js";import{HEADER_HEIGHT_CSS as Ue}from"../lib/document/header-clearance.js";import{nextReel as We,normaliseHeroReelShape as Ze,reelShown as et}from"../../format/lib/reel.js";import{arrowsShown as tt,arrowStep as rt}from"../../format/lib/hero-arrows.js";import{swipeEnabled as ot,swipeStep as nt}from"../../format/lib/hero-swipe.js";import{videoControlShown as st,videoHeld as ct}from"../../format/lib/hero-video-control.js";import{HERO_SLIDER_GOTO_EVENT as B}from"efficient-easel/draw";import{say as ne}from"../../format/lib/editor-words.js";import{markedChildren as se}from"../../format/lib/marked-children.js";import{legacyTickerDrawn as at,TICKER_MOTION_PART as ce}from"../../format/lib/hero-ticker.js";import{ON_MEDIA_INK_STYLE as lt}from"../../format/lib/content/ink.js";import{HeroPartBox as it,heroPartScroll as ut}from"./HeroPictures.js";import{entranceDrawn as dt}from"../lib/animation/entrance.js";import{readPartMotion as mt}from"../lib/animation/part-motion.js";import{scrim as ae}from"../../format/lib/content/scrim.js";import{partAttr as b}from"../../format/lib/content/part-names.js";const ft="Play video",ht="Hold video",pt="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",vt=()=>ne("item"),le=new Map;function bt(m,l){const d=m?.ownerDocument?.defaultView;if(d)return d.addEventListener(B,l),()=>d.removeEventListener(B,l)}function xt({slides:m,strip:l,alignment:d,textureOpacity:T,showTexture:S,textureColor:O,phoneUpDown:ie,phoneSideways:ue,phoneWordsTop:de,phoneWordsBottom:me,phoneBoxGap:fe,autoplay:z,autoplayInterval:H,showTicker:he,tickerItems:X,heightDesktop:pe,heightTablet:ve,heightMobile:be,heightFixed:xe,heightFixedTablet:we,heightFixedMobile:ke,showPicker:ye,pickerShape:Ee,pickerPlacement:ge,showArrows:_e,arrowsShape:Re,arrowsPlacement:Te,editing:s,partMotion:G}){const Y=Je({heightDesktop:pe,heightTablet:ve,heightMobile:be,heightFixed:xe,heightFixedTablet:we,heightFixedMobile:ke}),{className:Se,style:Oe}=Y,N=Qe(Y),j=(l?.blockCount??0)>0,He=!j&&at({showTicker:he,tickerItems:X}),q=(X??[]).map(e=>e?.text?.trim()?e.text:s?vt():"").filter(Boolean),Ne=dt(mt({_partMotion:G},ce)),Ae=ut(G,ce),f=u(null),K=u(null),F=u(null),A=u(null),J=Xe(),L=u(J),[E,Le]=y([]),[Me,Q]=y(0),x=u(0),[U,W]=y(!1),[Pe,Z]=y(null),[g,Ce]=y(!1),M=Fe(),_=v(()=>f.current?.querySelector(".hero-track")??null,[]),i=v((e,t=!1)=>{Q(e),Z(o=>o===e?o:null),x.current=e,le.set(L.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}%)`},[]);k(()=>{const e=f.current,t=e?.getAttribute("data-easel-block")||e?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||J;L.current=t;const r=le.get(t);typeof r=="number"&&(Q(r),x.current=r)},[]),k(()=>{const e=_();if(!e)return;const t=()=>{Le(o=>We(o,se(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()}},[_]),k(()=>{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")||L.current;r.id&&r.id!==p||i(r.index,!0)};return bt(f.current,e)},[s,i]);const c=E.length,a=Math.min(Math.max(Me,0),Math.max(0,c-1)),P=Pe===a,C=et({shown:ye,count:c}),ee=tt({shown:_e,count:c}),te=st({editing:s,shown:a,slides:E}),De=ct({editing:s,playing:g,controlShown:te}),R=ot({count:c,editing:s}),h=u(null),w=u(null),Ie=v(e=>{if(h.current=null,w.current=null,!R||e.touches.length!==1)return;const t=e.touches[0];h.current={x:t.clientX,y:t.clientY},w.current={x:t.clientX,y:t.clientY}},[R]),Ve=v(e=>{if(!h.current)return;if(e.touches.length!==1){h.current=null;return}const t=e.touches[0];w.current={x:t.clientX,y:t.clientY}},[]),$e=v(()=>{const e=h.current,t=w.current;if(h.current=null,w.current=null,!R||!e||!t)return;const r=nt(t.x-e.x,t.y-e.y,x.current,c);r!==x.current&&i(r)},[R,c,i]);k(()=>{if(s||!z||U||P||M||c<=1)return;const t=Math.max(1,typeof H=="number"?H:6)*1e3,r=window.setTimeout(()=>i((a+1)%c),t);return()=>window.clearTimeout(r)},[s,z,H,U,P,M,c,a,i]),k(()=>{const e=[K.current,F.current,A.current].filter(Boolean),t=e.map(o=>oe(o)),r=o=>{const p=o.target,D=p.closest("[data-hero-nav]");if(D&&!A.current?.contains(D))return;const I=D,re=I??p.closest("[data-idx]");if(!re)return;o.stopPropagation(),o.preventDefault();const V=I?rt(I.dataset.heroNav,x.current,c):Number(re.dataset.idx);Number.isNaN(V)||(i(V,s),se(_(),"data-slide-name")[V]?.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,_,s]);const Be=v(e=>{if(!e)return;const t=oe(e),r=o=>{o.stopPropagation(),o.preventDefault(),Ce(p=>!p)};return e.addEventListener("click",r,{capture:!0}),()=>{t?.(),e.removeEventListener("click",r,{capture:!0})}},[]);return n(Ye.Provider,{value:{alignment:d,textureOpacity:T,textureOn:S,textureColor:O,quietVideo:De,phoneUpDown:ie,phoneSideways:ue,phoneWordsTop:de,phoneWordsBottom:me,phoneBoxGap:fe,holdReel:()=>Z(a),reelHeld:P,shownSlide:a,ratioMin:N},children:$(ze,{ref:f,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${Se} max-w-[var(--sf-hero-cap,none)] ${N?"overflow-clip":"overflow-hidden"}`,style:Oe,onMouseEnter:()=>W(!0),onMouseLeave:()=>W(!1),onTouchStart:Ie,onTouchMove:Ve,onTouchEnd:$e,...b("hero"),children:[n(m,{className:N?"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:M?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),te&&n("div",{ref:Be,"data-hero-video-control":g?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${Ue} + 16px)`},children:$("button",{type:"button",className:pt,children:[n("span",{"aria-hidden":"true",children:g?"❚❚":"▶"}),ne(g?ht:ft)]})}),(C||ee)&&$("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(qe,{ref:K,slides:E,active:a,shape:Ze(Ee),placement:ge}),ee&&n(je,{ref:A,shape:Re,placement:Te,part:b("arrows"),buttonPart:b("arrow")})]}),C&&n("div",{ref:F,className:"sf-hero-phone-dots absolute bottom-[80px] left-1/2 z-[6] hidden -translate-x-1/2 items-center gap-2",...b("dots"),children:E.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"}`,...b("dot")},t))}),j&&l&&n("div",{className:"sf-hero-strip absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10",style:{background:ae(.55),...lt},...b("strip"),children:n(l,{})}),He&&q.length>0&&n(wt,{editing:!!s,entrance:Ne,scroll:Ae,children:n(Ge,{items:q,backdrop:"dark-media"})})]})})}function wt({editing:m,entrance:l,scroll:d,children:T}){const S="sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5",O=m?{[Ke]:""}:void 0;return n(it,{entrance:l,scroll:d,editing:m,className:S,attrs:O,style:{background:ae(.55)},children:T})}export{B as HERO_SLIDER_GOTO_EVENT,ht as HERO_VIDEO_HOLD_LABEL,ft as HERO_VIDEO_PLAY_LABEL,xt as default,bt as subscribeSliderGoto};
1
+ "use client";import{jsx as n,jsxs as $}from"react/jsx-runtime";import{HideTaker as je}from"./ViewHideRoot.js";import{useCallback as v,useEffect as k,useId as qe,useRef as u,useState as y}from"react";import{markOverlayPortal as se}from"../../format/lib/document/overlay-portal.js";import Fe from"./Ticker.js";import{HeroSlideStyleContext as Ke}from"./HeroSlide.js";import{heroPhoneFrame as Je}from"../lib/hero-poster-sizes.js";import Qe from"./HeroArrows.js";import Ue from"./Reel.js";import{TICKER_PART_ATTR as We}from"./PreviewTickerContext.js";import{useReducedMotion as Ze}from"./useReducedMotion.js";import{heroHeightBox as et,heroStoresRatio as tt}from"../../format/lib/content/section-height.js";import{HEADER_HEIGHT_CSS as rt}from"../lib/document/header-clearance.js";import{nextReel as ot,normaliseHeroReelShape as nt,reelShown as st}from"../../format/lib/reel.js";import{arrowsShown as ct,arrowStep as at}from"../../format/lib/hero-arrows.js";import{swipeEnabled as lt,swipeStep as it}from"../../format/lib/hero-swipe.js";import{videoControlShown as ut,videoHeld as mt}from"../../format/lib/hero-video-control.js";import{HERO_SLIDER_GOTO_EVENT as B}from"efficient-easel/draw";import{say as ce}from"../../format/lib/editor-words.js";import{markedChildren as ae}from"../../format/lib/marked-children.js";import{legacyTickerDrawn as dt,TICKER_MOTION_PART as le}from"../../format/lib/hero-ticker.js";import{ON_MEDIA_INK_STYLE as ft}from"../../format/lib/content/ink.js";import{HeroPartBox as ht,heroPartScroll as pt}from"./HeroPictures.js";import{entranceDrawn as vt}from"../lib/animation/entrance.js";import{readPartMotion as bt}from"../lib/animation/part-motion.js";import{scrim as ie}from"../../format/lib/content/scrim.js";import{partAttr as b}from"../../format/lib/content/part-names.js";const xt="Play video",wt="Hold video",kt="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",yt=()=>ce("item"),ue=new Map;function Et(d,l){const m=d?.ownerDocument?.defaultView;if(m)return m.addEventListener(B,l),()=>m.removeEventListener(B,l)}function gt({slides:d,strip:l,alignment:m,textureOpacity:T,showTexture:S,textureColor:O,phoneUpDown:me,phoneSideways:de,phoneWordsTop:fe,phoneWordsBottom:he,phoneBoxGap:pe,wordsTop:ve,wordsBottom:be,wordsTopTablet:xe,wordsBottomTablet:we,autoplay:z,autoplayInterval:H,showTicker:ke,tickerItems:X,heightDesktop:ye,heightTablet:Ee,heightMobile:G,heightFixed:ge,heightFixedTablet:_e,heightFixedMobile:Y,showPicker:Re,pickerShape:Te,pickerPlacement:Se,showArrows:Oe,arrowsShape:He,arrowsPlacement:Ne,editing:s,partMotion:j}){const q=et({heightDesktop:ye,heightTablet:Ee,heightMobile:G,heightFixed:ge,heightFixedTablet:_e,heightFixedMobile:Y}),{className:Ae,style:Le}=q,N=tt(q),F=(l?.blockCount??0)>0,Pe=!F&&dt({showTicker:ke,tickerItems:X}),K=(X??[]).map(e=>e?.text?.trim()?e.text:s?yt():"").filter(Boolean),Me=vt(bt({_partMotion:j},le)),Ce=pt(j,le),f=u(null),J=u(null),Q=u(null),A=u(null),U=qe(),L=u(U),[E,De]=y([]),[Ie,W]=y(0),x=u(0),[Z,ee]=y(!1),[Ve,te]=y(null),[g,$e]=y(!1),P=Ze(),_=v(()=>f.current?.querySelector(".hero-track")??null,[]),i=v((e,t=!1)=>{W(e),te(o=>o===e?o:null),x.current=e,ue.set(L.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}%)`},[]);k(()=>{const e=f.current,t=e?.getAttribute("data-easel-block")||e?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||U;L.current=t;const r=ue.get(t);typeof r=="number"&&(W(r),x.current=r)},[]),k(()=>{const e=_();if(!e)return;const t=()=>{De(o=>ot(o,ae(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()}},[_]),k(()=>{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")||L.current;r.id&&r.id!==p||i(r.index,!0)};return Et(f.current,e)},[s,i]);const c=E.length,a=Math.min(Math.max(Ie,0),Math.max(0,c-1)),M=Ve===a,C=st({shown:Re,count:c}),re=ct({shown:Oe,count:c}),oe=ut({editing:s,shown:a,slides:E}),Be=mt({editing:s,playing:g,controlShown:oe}),R=lt({count:c,editing:s}),h=u(null),w=u(null),ze=v(e=>{if(h.current=null,w.current=null,!R||e.touches.length!==1)return;const t=e.touches[0];h.current={x:t.clientX,y:t.clientY},w.current={x:t.clientX,y:t.clientY}},[R]),Xe=v(e=>{if(!h.current)return;if(e.touches.length!==1){h.current=null;return}const t=e.touches[0];w.current={x:t.clientX,y:t.clientY}},[]),Ge=v(()=>{const e=h.current,t=w.current;if(h.current=null,w.current=null,!R||!e||!t)return;const r=it(t.x-e.x,t.y-e.y,x.current,c);r!==x.current&&i(r)},[R,c,i]);k(()=>{if(s||!z||Z||M||P||c<=1)return;const t=Math.max(1,typeof H=="number"?H:6)*1e3,r=window.setTimeout(()=>i((a+1)%c),t);return()=>window.clearTimeout(r)},[s,z,H,Z,M,P,c,a,i]),k(()=>{const e=[J.current,Q.current,A.current].filter(Boolean),t=e.map(o=>se(o)),r=o=>{const p=o.target,D=p.closest("[data-hero-nav]");if(D&&!A.current?.contains(D))return;const I=D,ne=I??p.closest("[data-idx]");if(!ne)return;o.stopPropagation(),o.preventDefault();const V=I?at(I.dataset.heroNav,x.current,c):Number(ne.dataset.idx);Number.isNaN(V)||(i(V,s),ae(_(),"data-slide-name")[V]?.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,_,s]);const Ye=v(e=>{if(!e)return;const t=se(e),r=o=>{o.stopPropagation(),o.preventDefault(),$e(p=>!p)};return e.addEventListener("click",r,{capture:!0}),()=>{t?.(),e.removeEventListener("click",r,{capture:!0})}},[]);return n(Ke.Provider,{value:{alignment:m,textureOpacity:T,textureOn:S,textureColor:O,quietVideo:Be,phoneUpDown:me,phoneSideways:de,phoneWordsTop:fe,phoneWordsBottom:he,phoneBoxGap:pe,wordsTop:ve,wordsBottom:be,wordsTopTablet:xe,wordsBottomTablet:we,holdReel:()=>te(a),reelHeld:M,shownSlide:a,ratioMin:N,posterPhoneFrame:Je(G,Y)},children:$(je,{ref:f,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${Ae} max-w-[var(--sf-hero-cap,none)] ${N?"overflow-clip":"overflow-hidden"}`,style:Le,onMouseEnter:()=>ee(!0),onMouseLeave:()=>ee(!1),onTouchStart:ze,onTouchMove:Xe,onTouchEnd:Ge,...b("hero"),children:[n(d,{className:N?"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:P?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),oe&&n("div",{ref:Ye,"data-hero-video-control":g?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${rt} + 16px)`},children:$("button",{type:"button",className:kt,children:[n("span",{"aria-hidden":"true",children:g?"❚❚":"▶"}),ce(g?wt:xt)]})}),(C||re)&&$("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(Ue,{ref:J,slides:E,active:a,shape:nt(Te),placement:Se}),re&&n(Qe,{ref:A,shape:He,placement:Ne,part:b("arrows"),buttonPart:b("arrow")})]}),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",...b("dots"),children:E.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"}`,...b("dot")},t))}),F&&l&&n("div",{className:"sf-hero-strip absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10",style:{background:ie(.55),...ft},...b("strip"),children:n(l,{})}),Pe&&K.length>0&&n(_t,{editing:!!s,entrance:Me,scroll:Ce,children:n(Fe,{items:K,backdrop:"dark-media"})})]})})}function _t({editing:d,entrance:l,scroll:m,children:T}){const S="sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5",O=d?{[We]:""}:void 0;return n(ht,{entrance:l,scroll:m,editing:d,className:S,attrs:O,style:{background:ie(.55)},children:T})}export{B as HERO_SLIDER_GOTO_EVENT,wt as HERO_VIDEO_HOLD_LABEL,xt as HERO_VIDEO_PLAY_LABEL,gt as default,Et as subscribeSliderGoto};
@@ -12,11 +12,16 @@ export interface HeroSlideStyle {
12
12
  phoneWordsTop?: number;
13
13
  phoneWordsBottom?: number;
14
14
  phoneBoxGap?: number;
15
+ wordsTop?: number;
16
+ wordsBottom?: number;
17
+ wordsTopTablet?: number;
18
+ wordsBottomTablet?: number;
15
19
  quietVideo?: boolean;
16
20
  holdReel?: () => void;
17
21
  reelHeld?: boolean;
18
22
  shownSlide?: number;
19
23
  ratioMin?: boolean;
24
+ posterPhoneFrame?: string;
20
25
  }
21
26
  export declare const HeroSlideStyleContext: import("react").Context<HeroSlideStyle>;
22
27
  export interface HeroSlideProps {
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as M}from"react/jsx-runtime";import{useTakeViewHide as _e,withViewHide as Oe}from"./ViewHideRoot.js";import{SIDE_ONCE_HOLDS_CLASS as Ae}from"../../format/lib/content/page-width.js";import{useSideSpaceOnce as Le}from"./SideSpaceOnce.js";import{createContext as Ne,useContext as Ce,useEffect as Ie,useRef as De,useState as W}from"react";import Re from"./HeroPoster.js";import{HeroMediaLayer as Ve,heroMediaReading as Be,HeroPickArea as je,heroPartEntrance as ze,heroPartHover as Fe,heroPartScroll as $e,heroPictureOrigins as Me,HeroPictureHover as We,heroPicturesHover as Ye,HeroTint as qe,HeroTwoPictures as Ge}from"./HeroPictures.js";import{HeroVideoBackdrop as Ue,HeroVideoPlayer as Ke}from"./HeroVideoPlay.js";import{BelowFirstScreen as Je,useFirstScreenPlace as Qe}from"../lib/first-screen.js";import{markedChildren as Xe}from"../../format/lib/marked-children.js";import{resolveMedia as r}from"../lib/media.js";import{heroPhoneStackStyle as Ze,heroPhoneWordsStyle as eo}from"../../format/lib/hero-phone-stack.js";import{heroTextureGradient as oo,heroTextureShown as ro}from"../../format/lib/hero-texture.js";import{ON_MEDIA_INK_STYLE as to}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as Y}from"../../format/lib/content/tint.js";import{HERO_ABSENT_MEDIA_TYPE as io}from"../../format/lib/hero-media-layout.js";import{overlayGradient as no,slideOverlayState as so}from"../../format/lib/sections/hero-overlay.js";import ao from"./PhotoHoverSheet.js";import{partAttr as w}from"../../format/lib/content/part-names.js";const lo=Ne({});function co({name:g,process:d,mediaType:q=io.HeroSlide,mediaSrc:c,videoSpeed:H,poster:E,mediaAv1:G,mediaSrcPhone:U,mediaAv1Phone:K,posterPhone:J,objectPosition:f,objectPositionPhone:u,objectPositionTablet:p,tintColor:T=Y,tintOpacity:b=0,groups:k,editing:i=!1,themeClassName:_,themeStyle:Q,overlayColor:X,overlayPosition:Z,mediaLayout:ee,mediaLayoutPhone:oe,mediaImage2:re,objectPosition2:te,objectPosition2Phone:ie,objectPosition2Tablet:ne,tintColor2:se=Y,tintOpacity2:ae=0,videoSource:le,youtubeUrl:de,videoPlayback:ce,partMotion:n,laterSlide:m=!1}){const fe=Le(),h=_e(),{alignment:fo="left",textureOpacity:O,textureOn:ue,textureColor:pe,quietVideo:me,phoneUpDown:he,phoneSideways:Se,phoneWordsTop:ve,phoneWordsBottom:ye,phoneBoxGap:xe,holdReel:Pe,reelHeld:we,shownSlide:S,ratioMin:A}=Ce(lo),ge=Qe(),L=m&&ge==="first",N=De(null),[He,Ee]=W(S===void 0?void 0:!1);Ie(()=>{const P=N.current;Ee(S===void 0||!P?void 0:Xe(P.closest(".hero-track"),"data-slide-name")[S]===P)});const o=q==="video",v=o?r(c):void 0,C=o?r(E):r(c)??r(E),t=o?{av1:r(G),phone:r(U),av1Phone:r(K),poster:r(J)}:{},Te=typeof H=="number"?H/100:1,{fromYouTube:s,onClick:I,youTubeId:D,backgroundFile:a,desktopLayout:be,phoneLayout:ke,twoPictures:R}=Be({isVideo:o,videoSource:le,videoPlayback:ce,youtubeUrl:de,mediaLayout:ee,mediaLayoutPhone:oe}),[y,V]=W(!1);y&&we===!1&&V(!1);const x=!y,l=so({overlayColor:X,overlayPosition:Z},pe),B=o?null:ze(n,"image"),j=o?null:$e(n,"image"),z=Ye(n),F=e(We,{treatment:o?{}:Fe(n,"image"),children:e(Re,{videoSrc:a?v:void 0,videoAv1Src:a?t.av1:void 0,videoSrcPhone:a?t.phone:void 0,videoAv1SrcPhone:a?t.av1Phone:void 0,posterSrc:C,posterSrcPhone:t.poster,showVideo:a,playbackRate:Te,objectPosition:f,objectPositionPhone:o?void 0:u,objectPositionTablet:o?void 0:p,quiet:me,slideShown:He,laterSlide:m,laterOfLead:L})}),$=M("section",{ref:N,className:Oe(`${A?"relative flex min-h-full w-full flex-col overflow-clip":"relative h-full w-full overflow-hidden"}${_?` ${_}`:""}`,h.className),...h.attrs,style:Q,"data-slide-name":g??"","data-slide-process":d??"","data-slide-media":a&&v?"video":"still",...z.hostAttrs,...w("slide"),children:[e(ao,{sheet:z.sheet}),e(Ve,{partMotion:n,editing:i,children:R?e(Ge,{laterSlide:m,desktopLayout:be,phoneLayout:ke,editing:i,partMotion:n,first:{src:c,objectPosition:f,objectPositionPhone:u,objectPositionTablet:p,tintColor:T,tintOpacity:b},second:{src:re,objectPosition:te,objectPositionPhone:ie,objectPositionTablet:ne,tintColor:se,tintOpacity:ae}}):s||B||j?M(je,{part:o?"media":"image",editing:i,entrance:B,scroll:j,origins:Me({objectPosition:f,objectPositionTablet:p,objectPositionPhone:u}),className:"absolute inset-0 z-[1]",children:[F,s&&e(Ue,{youTubeId:D,ownPoster:!!C,background:!I,editing:i})]}):F}),I&&e(Ke,{youTubeId:D,fileSrc:s?void 0:v,fileAv1Src:s?void 0:t.av1,fileSrcPhone:s?void 0:t.phone,fileAv1SrcPhone:s?void 0:t.av1Phone,playing:y,onPlay:()=>{V(!0),Pe?.()},editing:i}),x&&!R&&e(qe,{color:T,opacity:b,passClicks:!1}),x&&ro(ue)&&e("div",{className:"absolute inset-0 z-[2]",style:{background:l.own?no(l.color,l.position??void 0):oo(l.color),...O!==void 0?{opacity:O/100}:null},...w("overlay")}),x&&e("div",{className:[A?"sf-hero-group-layer relative z-[3] mx-auto w-full flex-1 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",fe?Ae:"",i?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{...to,...Ze(he,Se),...eo(ve,ye,xe)},...w("hero-content"),children:k&&e(k,{className:"sf-hero-group-zone",minEmptyHeight:160})})]});return h.scope(L?e(Je,{children:$}):$)}const Lo=Array.from({length:3},(g,d)=>({name:`Slide ${d+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));export{Lo as HERO_SLIDE_SEEDS,lo as HeroSlideStyleContext,co as default};
1
+ "use client";import{jsx as e,jsxs as M}from"react/jsx-runtime";import{useTakeViewHide as Ie,withViewHide as Be}from"./ViewHideRoot.js";import{SIDE_ONCE_HOLDS_CLASS as De}from"../../format/lib/content/page-width.js";import{useSideSpaceOnce as Re}from"./SideSpaceOnce.js";import{createContext as Ve,useContext as Fe,useEffect as je,useRef as ze,useState as Y}from"react";import We from"./HeroPoster.js";import{HeroMediaLayer as $e,heroMediaReading as Me,HeroPickArea as Ye,heroPartEntrance as qe,heroPartHover as Ge,heroPartScroll as Ue,heroPictureOrigins as Ke,HeroPictureHover as Je,heroPicturesHover as Qe,HeroTint as Xe,HeroTwoPictures as Ze}from"./HeroPictures.js";import{HeroVideoBackdrop as eo,HeroVideoPlayer as oo}from"./HeroVideoPlay.js";import{BelowFirstScreen as ro,useFirstScreenPlace as to}from"../lib/first-screen.js";import{markedChildren as io}from"../../format/lib/marked-children.js";import{resolveMedia as r}from"../lib/media.js";import{heroPhoneStackStyle as so,heroPhoneWordsStyle as no,heroWordsSpace as ao}from"../../format/lib/hero-phone-stack.js";import{heroTextureGradient as lo,heroTextureShown as co}from"../../format/lib/hero-texture.js";import{ON_MEDIA_INK_STYLE as fo}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as q}from"../../format/lib/content/tint.js";import{HERO_ABSENT_MEDIA_TYPE as po}from"../../format/lib/hero-media-layout.js";import{overlayGradient as uo,slideOverlayState as mo}from"../../format/lib/sections/hero-overlay.js";import ho from"./PhotoHoverSheet.js";import{partAttr as P}from"../../format/lib/content/part-names.js";const So=Ve({});function vo({name:g,process:d,mediaType:G=po.HeroSlide,mediaSrc:c,videoSpeed:H,poster:T,mediaAv1:U,mediaSrcPhone:K,mediaAv1Phone:J,posterPhone:Q,objectPosition:f,objectPositionPhone:p,objectPositionTablet:u,tintColor:E=q,tintOpacity:b=0,groups:k,editing:i=!1,themeClassName:_,themeStyle:X,overlayColor:Z,overlayPosition:ee,mediaLayout:oe,mediaLayoutPhone:re,mediaImage2:te,objectPosition2:ie,objectPosition2Phone:se,objectPosition2Tablet:ne,tintColor2:ae=q,tintOpacity2:le=0,videoSource:de,youtubeUrl:ce,videoPlayback:fe,partMotion:s,laterSlide:m=!1}){const pe=Re(),h=Ie(),{alignment:yo="left",textureOpacity:O,textureOn:ue,textureColor:me,quietVideo:he,phoneUpDown:Se,phoneSideways:ve,phoneWordsTop:ye,phoneWordsBottom:we,phoneBoxGap:xe,wordsTop:Pe,wordsBottom:ge,wordsTopTablet:He,wordsBottomTablet:Te,holdReel:Ee,reelHeld:be,shownSlide:S,ratioMin:A,posterPhoneFrame:ke}=Fe(So),L=ao(Pe,ge,He,Te),_e=to(),N=m&&_e==="first",C=ze(null),[Oe,Ae]=Y(S===void 0?void 0:!1);je(()=>{const x=C.current;Ae(S===void 0||!x?void 0:io(x.closest(".hero-track"),"data-slide-name")[S]===x)});const o=G==="video",v=o?r(c):void 0,I=o?r(T):r(c)??r(T),t=o?{av1:r(U),phone:r(K),av1Phone:r(J),poster:r(Q)}:{},Le=typeof H=="number"?H/100:1,{fromYouTube:n,onClick:B,youTubeId:D,backgroundFile:a,desktopLayout:Ne,phoneLayout:Ce,twoPictures:R}=Me({isVideo:o,videoSource:de,videoPlayback:fe,youtubeUrl:ce,mediaLayout:oe,mediaLayoutPhone:re}),[y,V]=Y(!1);y&&be===!1&&V(!1);const w=!y,l=mo({overlayColor:Z,overlayPosition:ee},me),F=o?null:qe(s,"image"),j=o?null:Ue(s,"image"),z=Qe(s),W=e(Je,{treatment:o?{}:Ge(s,"image"),children:e(We,{videoSrc:a?v:void 0,videoAv1Src:a?t.av1:void 0,videoSrcPhone:a?t.phone:void 0,videoAv1SrcPhone:a?t.av1Phone:void 0,posterSrc:I,posterSrcPhone:t.poster,showVideo:a,playbackRate:Le,objectPosition:f,objectPositionPhone:o?void 0:p,objectPositionTablet:o?void 0:u,quiet:he,slideShown:Oe,laterSlide:m,laterOfLead:N,phoneFrame:ke})}),$=M("section",{ref:C,className:Be(`${A?"relative flex min-h-full w-full flex-col overflow-clip":"relative h-full w-full overflow-hidden"}${_?` ${_}`:""}`,h.className),...h.attrs,style:X,"data-slide-name":g??"","data-slide-process":d??"","data-slide-media":a&&v?"video":"still",...z.hostAttrs,...P("slide"),children:[e(ho,{sheet:z.sheet}),e($e,{partMotion:s,editing:i,children:R?e(Ze,{laterSlide:m,desktopLayout:Ne,phoneLayout:Ce,editing:i,partMotion:s,first:{src:c,objectPosition:f,objectPositionPhone:p,objectPositionTablet:u,tintColor:E,tintOpacity:b},second:{src:te,objectPosition:ie,objectPositionPhone:se,objectPositionTablet:ne,tintColor:ae,tintOpacity:le}}):n||F||j?M(Ye,{part:o?"media":"image",editing:i,entrance:F,scroll:j,origins:Ke({objectPosition:f,objectPositionTablet:u,objectPositionPhone:p}),className:"absolute inset-0 z-[1]",children:[W,n&&e(eo,{youTubeId:D,ownPoster:!!I,background:!B,editing:i})]}):W}),B&&e(oo,{youTubeId:D,fileSrc:n?void 0:v,fileAv1Src:n?void 0:t.av1,fileSrcPhone:n?void 0:t.phone,fileAv1SrcPhone:n?void 0:t.av1Phone,playing:y,onPlay:()=>{V(!0),Ee?.()},editing:i}),w&&!R&&e(Xe,{color:E,opacity:b,passClicks:!1}),w&&co(ue)&&e("div",{className:"absolute inset-0 z-[2]",style:{background:l.own?uo(l.color,l.position??void 0):lo(l.color),...O!==void 0?{opacity:O/100}:null},...P("overlay")}),w&&e("div",{className:[A?"sf-hero-group-layer relative z-[3] mx-auto w-full flex-1 max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)]":"sf-hero-group-layer absolute inset-0 z-[3] mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)]",L.className??"pt-[140px] pb-14",pe?De:"",i?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{...fo,...so(Se,ve),...no(ye,we,xe),...L.style},...P("hero-content"),children:k&&e(k,{className:"sf-hero-group-zone",minEmptyHeight:160})})]});return h.scope(N?e(ro,{children:$}):$)}const Vo=Array.from({length:3},(g,d)=>({name:`Slide ${d+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));export{Vo as HERO_SLIDE_SEEDS,So as HeroSlideStyleContext,vo as default};
@@ -1 +1 @@
1
- "use client";import{jsx as e}from"react/jsx-runtime";import{HideTaker as W,NO_HIDE as H,useTakeViewHide as j,withViewHide as k}from"./ViewHideRoot.js";import{useContext as y}from"react";import{SiteLink as A}from"../lib/site-runtime.js";import F,{FOOTER_LOGO_PX as R,WORDMARK_FIT_FLOOR_PX as M}from"./Logo.js";import{media as P}from"../lib/media.js";import{BoxSurfaceContext as E}from"./BoxSurfaceContext.js";import{useBoxCellHasWidth as V}from"./BoxCellContext.js";import{useInSiteHeader as z}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 I}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{useDrawsAtEdge as Y}from"./InBoxContext.js";import{partAttr as Z}from"../../format/lib/content/part-names.js";function b(t){const o=K(),s=J();if(!o)return e(q,{...t});const m=(t.src??"").trim();return e(W,{className:"text-center",children:e(X,{src:m||void 0,alt:t.alt,look:o.look,logoHeight:o.logoHeight,grayscale:o.grayscale,kind:s?.row.kind})})}function q({src:t,alt:o,href:s,heightPx:m=R,reverse:D=!0,align:i,alignTablet:u,alignPhone:p,color:O=null}){const n=G(),w=(t??"").trim(),c=w?{src:P(w),reversedSrc:null,inkIsDark:null,wordmark:o?.trim()||null}:{src:n.src,reversedSrc:n.reversedSrc,inkIsDark:n.inkIsDark,wordmark:n.wordmark},_=y(E),x=z(),T=V(),r=!x&&T,a=j(),L={atSectionLine:!Y()},h=!!(i||r||v("justify",i,u,p,L)),l=h?H:a,d=s||r?H:l,N=e(F,{variant:"footer",sizePx:m,src:c.src,reverse:D,color:O,reversedSrc:c.reversedSrc,inkIsDark:c.inkIsDark,wordmark:c.wordmark,siteName:n.siteName,fitToContainer:x,fitWordmarkToContainer:r,fitFloorPx:r?M:void 0,..._?.dark?{onLightSurface:!1}:{},...d.className?{hideClass:d.className,hideAttrs:d.attrs}:{},part:Z("logo")}),g=r?"inline-flex max-w-full overflow-x-clip":"inline-flex",f=r?N:e(I,{children:N}),C=s?e(A,{href:s,newTab:"auto",className:k(g,l.className),...l.attrs,children:f}):r?e("span",{className:k(g,l.className),...l.attrs,children:f}):f,S=r?e(I,{inCell:!0,children:C}):C;if(!h)return a.scope(S);const B=["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(B,a.className),...a.attrs,children:S}))}export{b as default};
1
+ "use client";import{jsx as o}from"react/jsx-runtime";import{HideTaker as A,NO_HIDE as H,useTakeViewHide as F,withViewHide as k}from"./ViewHideRoot.js";import{useContext as D}from"react";import{SiteLink as R}from"../lib/site-runtime.js";import M,{FOOTER_LOGO_PX as P,WORDMARK_FIT_FLOOR_PX as E}from"./Logo.js";import{media as V}from"../lib/media.js";import{BoxSurfaceContext as z}from"./BoxSurfaceContext.js";import{HeaderTopInkContext as G}from"./HeaderTopInkContext.js";import{useBoxCellHasWidth as K}from"./BoxCellContext.js";import{useInSiteHeader as X}from"./PhoneMenuTools.js";import{useSiteLogo as J}from"./SiteLogoContext.js";import{useLogoWall as U}from"./LogoWallContext.js";import{LogoWallMark as Y}from"./Logos.js";import{MarkZoom as O}from"./PictureZoom.js";import{useCardRow as Z}from"./CardRowContext.js";import{alignViewClasses as _,BLOCK_ALIGN_JUSTIFY as b}from"../../format/lib/content/block-align.js";import{useDrawsAtEdge as q}from"./InBoxContext.js";import{partAttr as Q}from"../../format/lib/content/part-names.js";function $(t){const e=U(),s=Z();if(!e)return o(rr,{...t});const m=(t.src??"").trim();return o(A,{className:"text-center",children:o(Y,{src:m||void 0,alt:t.alt,look:e.look,logoHeight:e.logoHeight,grayscale:e.grayscale,kind:s?.row.kind})})}function rr({src:t,alt:e,href:s,heightPx:m=P,reverse:u=!0,align:i,alignTablet:p,alignPhone:w,color:v=null}){const n=J(),x=(t??"").trim(),c=x?{src:V(x),reversedSrc:null,inkIsDark:null,wordmark:e?.trim()||null}:{src:n.src,reversedSrc:n.reversedSrc,inkIsDark:n.inkIsDark,wordmark:n.wordmark},T=D(z),B=D(G),W=v??(u?B:null),L=X(),j=K(),r=!L&&j,a=F(),C={atSectionLine:!q()},h=!!(i||r||_("justify",i,p,w,C)),l=h?H:a,d=s||r?H:l,N=o(M,{variant:"footer",sizePx:m,src:c.src,reverse:u,color:W,reversedSrc:c.reversedSrc,inkIsDark:c.inkIsDark,wordmark:c.wordmark,siteName:n.siteName,fitToContainer:L,fitWordmarkToContainer:r,fitFloorPx:r?E:void 0,...T?.dark?{onLightSurface:!1}:{},...d.className?{hideClass:d.className,hideAttrs:d.attrs}:{},part:Q("logo")}),g=r?"inline-flex max-w-full overflow-x-clip":"inline-flex",f=r?N:o(O,{children:N}),I=s?o(R,{href:s,newTab:"auto",className:k(g,l.className),...l.attrs,children:f}):r?o("span",{className:k(g,l.className),...l.attrs,children:f}):f,S=r?o(O,{inCell:!0,children:I}):I;if(!h)return a.scope(S);const y=["flex min-w-0",i?b[i]:"",_("justify",i,p,w,C),r?"[container-type:inline-size]":""].filter(Boolean).join(" ");return a.scope(o("div",{className:k(y,a.className),...a.attrs,children:S}))}export{$ as default};
@@ -1 +1 @@
1
- import{jsx as n,Fragment as i}from"react/jsx-runtime";function c({className:r=""}){return n("sup",{className:`text-accent tracking-normal text-[length:min(1em,max(0.75em,11px))] ${r}`,children:"®"})}function u(r){if(!r.includes("®"))return r;const e=r.split("®"),t=[];return e.forEach((a,s)=>{a&&t.push(a),s<e.length-1&&t.push(n(c,{},`r${s}`))}),n(i,{children:t})}var m=c;export{c as RMark,m as default,u as withRMark};
1
+ import{jsx as e,Fragment as i}from"react/jsx-runtime";function a({className:r}){return e("span",{className:r||void 0,children:"®"})}function c(r){if(!r.includes("®"))return r;const s=r.split("®"),n=[];return s.forEach((t,u)=>{t&&n.push(t),u<s.length-1&&n.push(e(a,{},`r${u}`))}),e(i,{children:n})}var f=a;export{a as RMark,f as default,c as withRMark};
@@ -1 +1 @@
1
- import{jsx as B}from"react/jsx-runtime";import D from"../../../../../components/HeroSection.js";import{HeroMeta as I}from"../../../../../../format/lib/document/blocks/general/Hero/meta.js";const C={...I,render:({slides:e,strip:o,alignment:t,textureOpacity:r,showTexture:i,textureColor:h,phoneUpDown:p,phoneSideways:a,phoneWordsTop:s,phoneWordsBottom:n,phoneBoxGap:l,autoplay:d,autoplayInterval:m,showTicker:c,tickerItems:x,heightDesktop:g,heightTablet:w,heightMobile:k,heightFixed:u,heightFixedTablet:T,heightFixedMobile:b,showPicker:y,pickerShape:M,pickerPlacement:S,showArrows:f,arrowsShape:F,arrowsPlacement:H,_partMotion:P,editor:j})=>B(D,{slides:e,strip:o,alignment:t,textureOpacity:r,showTexture:i,textureColor:h,phoneUpDown:p,phoneSideways:a,phoneWordsTop:s,phoneWordsBottom:n,phoneBoxGap:l,autoplay:d,autoplayInterval:m,showTicker:c,tickerItems:x,heightDesktop:g,heightTablet:w,heightMobile:k,heightFixed:u,heightFixedTablet:T,heightFixedMobile:b,showPicker:y,pickerShape:M,pickerPlacement:S,showArrows:f,arrowsShape:F,arrowsPlacement:H,editing:j?.isEditing,partMotion:P})};export{C as HeroRender};
1
+ import{jsx as v}from"react/jsx-runtime";import A from"../../../../../components/HeroSection.js";import{HeroMeta as C}from"../../../../../../format/lib/document/blocks/general/Hero/meta.js";const R={...C,render:({slides:e,strip:o,alignment:t,textureOpacity:r,showTexture:i,textureColor:p,phoneUpDown:s,phoneSideways:h,phoneWordsTop:a,phoneWordsBottom:n,phoneBoxGap:d,wordsTop:l,wordsBottom:m,wordsTopTablet:w,wordsBottomTablet:c,autoplay:x,autoplayInterval:g,showTicker:T,tickerItems:b,heightDesktop:k,heightTablet:u,heightMobile:y,heightFixed:B,heightFixedTablet:M,heightFixedMobile:S,showPicker:f,pickerShape:F,pickerPlacement:H,showArrows:P,arrowsShape:j,arrowsPlacement:D,_partMotion:I,editor:W})=>v(A,{slides:e,strip:o,alignment:t,textureOpacity:r,showTexture:i,textureColor:p,phoneUpDown:s,phoneSideways:h,phoneWordsTop:a,phoneWordsBottom:n,phoneBoxGap:d,wordsTop:l,wordsBottom:m,wordsTopTablet:w,wordsBottomTablet:c,autoplay:x,autoplayInterval:g,showTicker:T,tickerItems:b,heightDesktop:k,heightTablet:u,heightMobile:y,heightFixed:B,heightFixedTablet:M,heightFixedMobile:S,showPicker:f,pickerShape:F,pickerPlacement:H,showArrows:P,arrowsShape:j,arrowsPlacement:D,editing:W?.isEditing,partMotion:I})};export{R as HeroRender};
@@ -0,0 +1,8 @@
1
+ export declare const HERO_PHONE_COPY_MAX_PX = 1280;
2
+ export declare const HERO_POSTER_PHONE_TIERS: readonly {
3
+ minDppx: number | null;
4
+ dppx: number;
5
+ capPx: number;
6
+ }[];
7
+ export declare function heroPosterSizes(phoneFrame?: string): string;
8
+ export declare function heroPhoneFrame(heightMobile?: unknown, heightFixedMobile?: unknown): string | undefined;
@@ -0,0 +1 @@
1
+ import{EDGE_PHONE_MEDIA as x}from"./content/view-values.js";import{readHeroFixedHeight as a,SECTION_HEIGHT as i}from"../../format/lib/content/section-height.js";const t=1280,s="16 / 9",m="100svh",u=[{minDppx:3.01,dppx:4,capPx:Math.floor(t/4)},{minDppx:2.01,dppx:3,capPx:Math.floor(t/3)},{minDppx:1.01,dppx:2,capPx:Math.floor(t/2)},{minDppx:null,dppx:1,capPx:t}];function d(n=m){const e=`max(100vw, calc(${n} * ${s}))`;return[...u.map(({minDppx:p,capPx:r})=>`${p===null?x:`${x} and (min-resolution: ${p}dppx)`} min(${e}, ${r}px)`),"100vw"].join(", ")}function P(n,e){const o=a(e);if(o?.unit==="px")return o.css;if(o?.unit==="ratio"){const[p,r]=o.aspect.split("/").map(c=>c.trim());return p&&r?`calc(100vw * ${r} / ${p})`:void 0}if(typeof n=="number"&&n>=i.min&&n<=i.max)return`${n}svh`}export{t as HERO_PHONE_COPY_MAX_PX,u as HERO_POSTER_PHONE_TIERS,P as heroPhoneFrame,d as heroPosterSizes};