efficient-web-builder 29.0.0 → 30.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +77 -0
- package/dist/editor/components/SectionWidthRows.d.ts +35 -0
- package/dist/editor/components/SectionWidthRows.js +1 -0
- package/dist/editor/components/StorefrontEditor.js +1 -1
- package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
- package/dist/editor/components/WidthFollowField.js +1 -1
- package/dist/editor/components/storefront-editor.css +1 -1
- package/dist/editor/lib/puck/blocks/general/IntroBleed/fields.js +1 -1
- package/dist/editor/lib/puck/blocks/general/SectionHeader/fields.js +1 -1
- package/dist/editor/lib/puck/blocks/general/Series/fields.js +1 -1
- package/dist/editor/lib/puck/blocks/general/Stats/fields.js +1 -1
- package/dist/editor/lib/puck/blocks/general/StatsParagraph/fields.js +1 -1
- package/dist/editor/lib/puck/blocks/general/TimelineTrack/fields.js +1 -1
- package/dist/editor/lib/puck/blocks/shared-fields.js +1 -1
- package/dist/editor/lib/puck/controls.d.ts +3 -0
- package/dist/editor/lib/puck/controls.js +1 -1
- package/dist/editor/lib/puck/field-groups.js +1 -1
- package/dist/editor/lib/puck/overrides.js +1 -1
- package/dist/editor/lib/puck/passes/inspector.js +1 -1
- package/dist/editor/lib/puck/section-width-fields.d.ts +2 -0
- package/dist/editor/lib/puck/section-width-fields.js +1 -0
- package/dist/format/lib/content/page-width.d.ts +1 -0
- package/dist/format/lib/content/page-width.js +1 -1
- package/dist/format/lib/content/section-width.d.ts +24 -0
- package/dist/format/lib/content/section-width.js +1 -1
- package/dist/format/lib/content/site-gutter.js +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +6 -2
- package/dist/format/lib/editor-words-catalogue.js +4 -4
- package/dist/format/lib/puck/blocks/block-types.d.ts +1 -0
- package/dist/format/lib/puck/passes/types.d.ts +1 -0
- package/dist/format/lib/site-theme-row.d.ts +2 -0
- package/dist/render/components/BlockFrame.js +1 -1
- package/dist/render/components/Breadcrumb.js +1 -1
- package/dist/render/components/ContactLocations.d.ts +1 -1
- package/dist/render/components/ContactLocations.js +2 -2
- package/dist/render/components/FeaturedCover.d.ts +1 -1
- package/dist/render/components/FeaturedCover.js +1 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/Grid.js +1 -1
- package/dist/render/components/HeroSection.js +1 -1
- package/dist/render/components/HeroSingle.js +2 -2
- package/dist/render/components/HeroSlide.js +1 -1
- package/dist/render/components/IntroBleed.js +1 -1
- package/dist/render/components/LongRead.d.ts +1 -1
- package/dist/render/components/LongRead.js +1 -1
- package/dist/render/components/Masthead.d.ts +1 -1
- package/dist/render/components/Masthead.js +1 -1
- package/dist/render/components/PreviewHeaderContext.d.ts +9 -1
- package/dist/render/components/PreviewHeaderContext.js +1 -1
- package/dist/render/components/ProcessSteps.d.ts +1 -1
- package/dist/render/components/ProcessSteps.js +1 -1
- package/dist/render/components/Series.d.ts +1 -1
- package/dist/render/components/Series.js +1 -1
- package/dist/render/components/SiteGutterFrame.d.ts +5 -1
- package/dist/render/components/SiteGutterFrame.js +1 -1
- package/dist/render/components/SpecStrip.js +1 -1
- package/dist/render/components/Split.js +1 -1
- package/dist/render/components/StatsParagraph.d.ts +1 -1
- package/dist/render/components/StatsParagraph.js +1 -1
- package/dist/render/components/TimelineTrack.js +1 -1
- package/dist/render/lib/puck/blocks/general/IntroBleed/render.js +2 -2
- package/dist/render/lib/puck/page-render.d.ts +2 -1
- package/dist/render/lib/puck/page-render.js +1 -1
- package/dist/render/lib/puck/passes/section-width.d.ts +9 -1
- package/dist/render/lib/puck/passes/section-width.js +1 -1
- package/package.json +1 -1
- package/dist/editor/components/HeroImageField.d.ts +0 -6
- package/dist/editor/components/HeroImageField.js +0 -1
- package/dist/editor/components/SiteWidthField.d.ts +0 -7
- package/dist/editor/components/SiteWidthField.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as
|
|
1
|
+
"use client";import{jsx as e,jsxs as p}from"react/jsx-runtime";import{useEffect as Z,useRef as $,useState as z}from"react";import N from"./HeroPoster.js";import{HeroVideoBackdrop as ee,HeroVideoPlayer as oe}from"./HeroVideoPlay.js";import{resolveMedia as l}from"../lib/media.js";import{hasSectionHeight as re,resolveSectionHeight as M}from"../../format/lib/content/section-height.js";import{DEFAULT_OVERLAY_COLOR as te,DEFAULT_OVERLAY_POSITION as se,overlayGradient as ne}from"../../format/lib/sections/hero-overlay.js";import{ON_MEDIA_INK_STYLE as ie}from"../../format/lib/content/ink.js";import{usePreviewHeroPart as ae}from"./PreviewHeroPartContext.js";import{tk as C}from"../../format/components/floating-editor/tokens.js";import{HERO_PART_ATTR as ce,heroPartId as le,readHeroPartId as de}from"../lib/puck/hero-media-parts.js";import{markOverlayPortal as me}from"../../format/lib/puck/overlay-portal.js";import{hidableText as pe}from"efficient-easel/draw";import{normaliseVideoPlayback as ue,normaliseVideoSource as fe,parseYouTubeId as he}from"../../format/lib/hero-video.js";import{heroPictureCount as xe,normaliseMediaLayout as ve,resolvePhoneLayout as ge}from"../../format/lib/hero-media-layout.js";const D=`
|
|
2
2
|
.hero-part-pick { cursor: pointer; }
|
|
3
3
|
.hero-part-pick:hover {
|
|
4
4
|
outline: 2px solid color-mix(in srgb, ${C.accent} 45%, transparent);
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
outline: 2px solid ${C.accent};
|
|
9
9
|
outline-offset: -2px;
|
|
10
10
|
}
|
|
11
|
-
`;function Pe({overlay:r=100,overlayColor:o=te,overlayPosition:y=se,mediaType:u="image",mediaSrc:i,poster:f,objectPosition:d,objectPositionPhone:
|
|
11
|
+
`;function Pe({overlay:r=100,overlayColor:o=te,overlayPosition:y=se,mediaType:u="image",mediaSrc:i,poster:f,objectPosition:d,objectPositionPhone:m,tintColor:h="#000000",tintOpacity:n=0,heightDesktop:x,heightMobile:t,boxes:a,videoSource:k,youtubeUrl:v,videoPlayback:g,mediaLayout:S,mediaLayoutPhone:T,mediaImage2:F,objectPosition2:G,objectPosition2Phone:K,tintColor2:U="#000000",tintOpacity2:B=0,editing:s=!1}){const E=re(x,t),q=E?"h-[var(--sf-hero-h-m)] min-[720px]:h-[var(--sf-hero-h-d)]":"h-screen min-h-[680px]",J=E?{"--sf-hero-h-d":M(x),"--sf-hero-h-m":M(t)}:void 0,c=u==="video",R=c?l(i):void 0,O=c?l(f):l(i)??l(f),P=c&&fe(k)==="youtube",w=c&&ue(g)==="click",V=P?he(pe(v)):null,A=c&&!P&&!w,[L,Q]=z(!1),_=!L,W=$(null),X=u==="video"?"media":"image",b=ve(S),I=ge(T,b),j=!c&&xe({mediaLayout:S,mediaLayoutPhone:T})>1;return p("section",{ref:W,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${q} max-w-[var(--sf-hero-cap,none)] overflow-hidden`,style:J,children:[j?p("div",{className:`absolute inset-0 z-[1] grid ${be[I]} ${ye[b]}`,"data-hero-layout":b,"data-hero-layout-phone":I,children:[s&&e("style",{children:D}),p(H,{part:"image",editing:s,className:"relative overflow-hidden",children:[e(N,{posterSrc:l(i),showVideo:!1,objectPosition:d,objectPositionPhone:m}),e(Y,{color:h,opacity:n})]}),p(H,{part:"image2",editing:s,className:`relative overflow-hidden${I==="one"?" max-[719px]:hidden":""}${b==="one"?" min-[720px]:hidden":""}`,children:[e(N,{posterSrc:l(F),showVideo:!1,objectPosition:G,objectPositionPhone:K}),e(Y,{color:U,opacity:B})]})]}):p(H,{part:X,editing:s,className:"absolute inset-0 z-[1]",children:[s&&e("style",{children:D}),e(N,{videoSrc:A?R:void 0,posterSrc:O,showVideo:A,objectPosition:d,objectPositionPhone:m}),P&&e(ee,{youTubeId:V,ownPoster:!!O,background:!w,editing:s})]}),w&&e(oe,{youTubeId:V,fileSrc:P?void 0:R,playing:L,onPlay:()=>Q(!0),editing:s}),_&&!j&&n>0&&e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:h,opacity:Math.min(Math.max(n,0),100)/100}}),_&&e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:ne(o,y),opacity:Math.min(Math.max(r,0),100)/100}}),_&&a&&e("div",{className:["sf-hero-group-layer absolute inset-0 z-[3] mx-auto","max-w-[var(--sf-site-width,1600px)]","px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",s?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:ie,children:e(a,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}const be={one:"max-[719px]:grid-cols-1 max-[719px]:grid-rows-1",side:"max-[719px]:grid-cols-2 max-[719px]:grid-rows-1",stacked:"max-[719px]:grid-cols-1 max-[719px]:grid-rows-2"},ye={one:"min-[720px]:grid-cols-1 min-[720px]:grid-rows-1",side:"min-[720px]:grid-cols-2 min-[720px]:grid-rows-1",stacked:"min-[720px]:grid-cols-1 min-[720px]:grid-rows-2"};function Y({color:r,opacity:o}){return o>0?e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:r,opacity:Math.min(Math.max(o,0),100)/100}}):null}function H({part:r,editing:o,className:y,children:u}){const i=$(null),{selectedHeroPart:f,select:d}=ae(),[m,h]=z(null);Z(()=>{if(!o)return;const t=i.current;if(!t)return;const a=t.closest("[data-puck-component]")?.getAttribute("data-puck-component")??null;h(a);const k=me(t),v=g=>{a&&(g.stopPropagation(),g.preventDefault(),d(le(a,r)))};return t.addEventListener("click",v,{capture:!0}),()=>{k(),t.removeEventListener("click",v,{capture:!0})}},[o,r,d]);const n=de(f),x=o&&m!=null&&n?.nodeId===m&&(n.part===r||n.part==="media");return e("div",{ref:i,className:`${y}${o?" hero-part-pick":""}`,...o?{[ce]:r}:{},"data-selected":x?"":void 0,children:u})}export{Pe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as N}from"react/jsx-runtime";import{createContext as k,useContext as H}from"react";import P from"./HeroPoster.js";import{resolveMedia as t}from"../lib/media.js";import{heroPhoneStackStyle as z}from"../../format/lib/hero-phone-stack.js";import{heroTextureGradient as C,heroTextureShown as D}from"../../format/lib/hero-texture.js";import{ON_MEDIA_INK_STYLE as M}from"../../format/lib/content/ink.js";const T=k({});function V({name:i,process:r,mediaType:u="video",mediaSrc:s,videoSpeed:a,poster:
|
|
1
|
+
"use client";import{jsx as e,jsxs as N}from"react/jsx-runtime";import{createContext as k,useContext as H}from"react";import P from"./HeroPoster.js";import{resolveMedia as t}from"../lib/media.js";import{heroPhoneStackStyle as z}from"../../format/lib/hero-phone-stack.js";import{heroTextureGradient as C,heroTextureShown as D}from"../../format/lib/hero-texture.js";import{ON_MEDIA_INK_STYLE as M}from"../../format/lib/content/ink.js";const T=k({});function V({name:i,process:r,mediaType:u="video",mediaSrc:s,videoSpeed:a,poster:l,objectPosition:f,objectPositionPhone:h,tintColor:x="#000000",tintOpacity:n=0,groups:d,editing:y=!1,themeClassName:c,themeStyle:v}){const{alignment:I="left",textureOpacity:p,textureOn:S,textureColor:g,quietVideo:b,phoneUpDown:w,phoneSideways:_}=H(T),o=u==="video",m=o?t(s):void 0,j=o?t(l):t(s)??t(l),E=typeof a=="number"?a/100:1;return N("section",{className:c?`relative h-full w-full overflow-hidden ${c}`:"relative h-full w-full overflow-hidden",style:v,"data-slide-name":i??"","data-slide-process":r??"","data-slide-media":m?"video":"still",children:[e(P,{videoSrc:m,posterSrc:j,showVideo:o,playbackRate:E,objectPosition:f,objectPositionPhone:o?void 0:h,quiet:b}),n>0&&e("div",{className:"absolute inset-0 z-[2]",style:{background:x,opacity:Math.min(Math.max(n,0),100)/100}}),D(S)&&e("div",{className:"absolute inset-0 z-[2]",style:{background:C(g),...p!==void 0?{opacity:p/100}:null}}),e("div",{className:["sf-hero-group-layer absolute inset-0 z-[3] mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",y?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{...M,...z(w,_)},children:d&&e(d,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}const K=Array.from({length:3},(i,r)=>({name:`Slide ${r+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));export{K as HERO_SLIDE_SEEDS,T as HeroSlideStyleContext,V as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as Q}from"react/jsx-runtime";import U from"./Btn.js";import u from"./Placeholder.js";import V from"./SectionEyebrow.js";import{renderGold as N,renderHeadline as W,splitParagraphs as X}from"./goldPhrases.js";import{resolveTypeSize as
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as Q}from"react/jsx-runtime";import U from"./Btn.js";import u from"./Placeholder.js";import V from"./SectionEyebrow.js";import{renderGold as N,renderHeadline as W,splitParagraphs as X}from"./goldPhrases.js";import{resolveTypeSize as o}from"../../format/lib/content/section-type-size.js";import{HEADER_HEIGHT_CSS as j}from"../lib/puck/header-clearance.js";import{resolveSectionHeight as k}from"../../format/lib/content/section-height.js";import{INTRO_BLEED_COPY_SHARE as _,parseIntroBleedLayout as Z,resolveCopyShare as E}from"../../format/lib/sections/intro-bleed-layout.js";import{ON_MEDIA_INK_STYLE as ee}from"../../format/lib/content/ink.js";function te({eyebrow:a,title:l,body:s,cta:i,imageLabel:d,imageSrc:c,imageSrcMobile:w,layout:I,copyShareDesktop:z,copyShareMobile:D,sticky:m=!0,heightDesktop:H,heightMobile:S,overlay:p,titleSizeDesktop:B,titleSizeMobile:T,bodySizeDesktop:C,bodySizeMobile:L,buttonColor:M,buttonTextColor:A,uppercase:F=!1,capStyle:h}){const r=Z(I)==="stacked",x=n=>r?`calc(${k(n)} - ${j})`:k(n),O=x(H),P=x(S),R=o(B,"clamp(48px,7vw,96px)","heading","headingLarge"),$=o(T,"clamp(36px,7vw,96px)","heading","headingLarge"),G=o(C,"17px","body","body"),Y=o(L,"16px","body","body"),K=p!=null?p/100:r?0:.6,v=M||"var(--btn)",q=A||"var(--btn-ink)",f={"--intro-h-d":O,"--intro-h-m":P,"--intro-title-d":R,"--intro-title-m":$,"--intro-body-d":G,"--intro-body-m":Y,...r?{"--intro-copy-d":E(z,_.desktop),"--intro-copy-m":E(D,_.mobile),marginTop:j}:{}},g=h?"px-[var(--sf-site-gutter,40px)] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]":"px-[60px] max-[960px]:px-6",b=t(Q,{children:[t("div",{className:"absolute inset-0",children:[e("div",{className:"absolute inset-0 hidden min-[960px]:block",children:e(u,{label:d,src:c})}),e("div",{className:"absolute inset-0 min-[960px]:hidden",children:e(u,{label:d,src:w||c})}),e("div",{className:"pointer-events-none absolute inset-0",style:{backgroundImage:"repeating-linear-gradient(45deg, transparent 0 80px, rgba(201,164,97,.04) 80px 81px)"}})]}),e("div",{className:"absolute inset-0",style:{background:`rgba(0,0,0,${K})`}})]}),y=t("div",{style:h,className:"flex flex-col gap-6",children:[a&&e(V,{text:a,size:14}),l&&e("h2",{className:["font-display font-medium leading-[0.95] tracking-[-0.03em]","text-[length:var(--intro-title-m)] min-[960px]:text-[length:var(--intro-title-d)]",F?"uppercase":""].join(" "),children:W(l,!1)}),s&&X(s).map((n,J)=>e("p",{className:"max-w-[560px] leading-[1.6] opacity-85 text-[length:var(--intro-body-m)] min-[960px]:text-[length:var(--intro-body-d)]",children:N(n)},J)),i.text&&e("div",{className:"mt-2 self-start",children:e(U,{href:i.href,variant:"ghost",style:{background:v,color:q,borderColor:v},children:N(i.text)})})]});return r?t("section",{style:f,className:[m?"sticky top-0":"relative","flex flex-col","h-[var(--intro-h-m)] min-[960px]:h-[var(--intro-h-d)] min-h-[420px]","overflow-hidden p-0 z-[1]"].join(" "),children:[e("div",{className:["relative z-[2] flex shrink-0 flex-col justify-center bg-bg py-10","min-h-[var(--intro-copy-m)] min-[960px]:min-h-[var(--intro-copy-d)]",g].join(" "),style:{color:"var(--fg)"},children:y}),e("div",{className:"relative min-h-0 flex-1 overflow-hidden",children:b})]}):t("section",{style:f,className:[m?"sticky top-0":"relative","h-[var(--intro-h-m)] min-[960px]:h-[var(--intro-h-d)] min-h-[420px]","overflow-hidden p-0 z-[1]","mx-auto w-full max-w-[var(--sf-bg-cap,none)]"].join(" "),children:[b,e("div",{className:["relative z-[2] flex h-full flex-col justify-center",g].join(" "),style:ee,children:y})]})}export{te as default};
|
|
@@ -17,4 +17,4 @@ export interface LongReadProps {
|
|
|
17
17
|
metaPublished?: string;
|
|
18
18
|
metaReads?: string;
|
|
19
19
|
}
|
|
20
|
-
export default function LongRead({ headNum, headTitle, headDesc, category, metaMiddle, readLabel, title, dek, quote, quoteAttribution, ctaText, ctaHref, image, imageLabel, metaPublished, metaReads, omitHead,
|
|
20
|
+
export default function LongRead({ headNum, headTitle, headDesc, category, metaMiddle, readLabel, title, dek, quote, quoteAttribution, ctaText, ctaHref, image, imageLabel, metaPublished, metaReads, omitHead, }: LongReadProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r,Fragment as
|
|
1
|
+
import{jsx as e,jsxs as r,Fragment as p}from"react/jsx-runtime";import{EDITORIAL_COLUMN as $}from"../../format/lib/content/page-width.js";import{Fragment as k}from"react";import{SiteLink as j}from"../lib/site-runtime.js";import{stripMarkup as E}from"../../format/lib/markup.js";import B from"./EditorialSectionHead.js";import F from"./Placeholder.js";import I from"./SectionEyebrow.js";import{renderGold as a,renderHeadline as z}from"./goldPhrases.js";const n={bodySmall:"text-[length:var(--size-body,14px)]",body:"text-[length:var(--size-body,17px)]",bodyLarge:"text-[length:var(--size-body,22px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"};function O({headNum:S,headTitle:m,headDesc:x,category:f,metaMiddle:g,readLabel:b,title:t,dek:h,quote:i,quoteAttribution:o,ctaText:u,ctaHref:L,image:w,imageLabel:v,metaPublished:s,metaReads:c,omitHead:y=!1}){const N=[f?e("span",{className:"text-accent",children:a(f)}):null,g?e("span",{children:a(g)}):null,b?e("span",{children:a(b)}):null].filter(Boolean),_=!!s||!!c;return e("section",{className:y?"border-b border-line pt-0 pb-[120px] max-[1100px]:pt-0 max-[1100px]:pb-20":"border-b border-line py-[120px] max-[1100px]:py-20",children:r("div",{className:$,children:[y?null:e(B,{num:S,title:m?z(m,!0):void 0,desc:x?a(x):void 0}),r("article",{className:"sf-card grid min-h-[640px] grid-cols-[1fr_1.2fr] border border-line max-[1100px]:grid-cols-1",children:[r("div",{className:"flex flex-col justify-center gap-7 border-r border-line bg-surface px-14 py-16 max-[1100px]:border-r-0 max-[1100px]:border-b max-[1100px]:px-7 max-[1100px]:py-12",children:[N.length>0&&e("div",{className:`flex items-center gap-3.5 font-mono ${n.labelSmall} uppercase tracking-[0.3em] text-fg-dim`,children:N.map((d,l)=>r(k,{children:[l>0&&e("span",{className:"opacity-40",children:"·"}),d]},l))}),t&&e("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(36px,4.2vw,68px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.95] tracking-[-0.035em]",children:z(t,!0)}),h&&e("p",{className:`font-serif ${n.bodyLarge} italic leading-[1.45] text-fg`,children:a(h)}),(i||o)&&r("blockquote",{className:`max-w-[520px] border-l-2 border-accent py-1.5 pl-[22px] font-serif ${n.body} italic leading-[1.6] text-fg-dim`,children:[i&&r(p,{children:["“",a(i),"”"]}),o&&e("strong",{className:`mt-2.5 block font-display ${n.bodySmall} font-normal not-italic uppercase tracking-[0.22em] text-fg`,children:a(o)})]}),u&&r(j,{href:L||"#",className:`inline-flex items-center gap-3.5 self-start border border-btn px-7 py-4 font-mono ${n.labelLarge} uppercase tracking-[0.3em] text-btn transition-colors hover:bg-btn hover:text-btn-ink`,children:[a(u)," ",e("span",{children:"→"})]})]}),r("div",{className:"relative overflow-hidden bg-surface-2 max-[1100px]:aspect-[4/3]",children:[e(F,{label:"long-read",src:w||void 0,alt:E(t||"Long read"),sizes:"(max-width: 1100px) 100vw, 56vw"}),e("div",{className:"pointer-events-none absolute inset-0 z-[1]",style:{background:"linear-gradient(180deg, rgba(10,10,10,0.55) 0%, transparent 25%, transparent 60%, rgba(10,10,10,0.7) 100%)"}}),v&&e(I,{text:v,size:12,className:"absolute right-6 top-6 z-[2]"}),_&&e("div",{className:`absolute bottom-6 left-6 z-[2] font-mono ${n.labelSmall} uppercase leading-[1.8] tracking-[0.22em] text-overlay-fg`,children:[s?r(p,{children:[e("strong",{className:"font-normal text-accent",children:"Published"})," ",a(s)]}):null,c?r(p,{children:[e("strong",{className:"font-normal text-accent",children:"Reads in"})," ",a(c)]}):null].filter(Boolean).map((d,l)=>r(k,{children:[l>0&&e("br",{}),d]},l))})]})]})]})})}export{O as default};
|
|
@@ -13,4 +13,4 @@ export interface MastheadProps {
|
|
|
13
13
|
issueTotal?: string;
|
|
14
14
|
editing?: boolean;
|
|
15
15
|
}
|
|
16
|
-
export default function Masthead({ eyebrow, issueMeta, lead, issueHeading, issueList, issueTotal,
|
|
16
|
+
export default function Masthead({ eyebrow, issueMeta, lead, issueHeading, issueList, issueTotal, }: MastheadProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t,Fragment as N,jsxs as a}from"react/jsx-runtime";import{EDITORIAL_COLUMN as v}from"../../format/lib/content/page-width.js";import u from"./SectionEyebrow.js";import{renderGold as r,renderHeadline as _,splitParagraphs as j}from"./goldPhrases.js";const n={body:"text-[length:var(--size-body,18px)]",headingSmall:"text-[length:var(--size-headingSmall,20px)]",label:"text-[length:var(--size-label,13px)]"};function k({eyebrow:s,issueMeta:x,lead:g,issueHeading:i,issueList:h,issueTotal:m}){const c=(x??[]).filter(e=>(e?.lead??"").trim()||(e?.rest??"").trim()),o=(h??[]).map(e=>e?.text??"").filter(e=>e.trim()),d=j(g??""),f=!!s||c.length>0,p=!!i||o.length>0||!!m,b=d.length>0||p;return t("section",{className:"border-b border-line pt-20 pb-10 max-[1100px]:pt-[60px] max-[1100px]:pb-8",children:a("div",{className:v,children:[f&&a("div",{className:"flex items-end justify-between gap-[60px] pb-8 max-[1100px]:flex-col max-[1100px]:items-start max-[1100px]:gap-4",children:[s&&t(u,{text:s,size:14,className:"pb-3.5"}),c.length>0&&t("div",{className:`pb-3.5 text-right font-mono ${n.label} uppercase leading-[1.8] tracking-[0.18em] text-fg-dim max-[1100px]:text-left`,children:c.map((e,l)=>a("div",{children:[t("strong",{className:"font-normal text-fg",children:r(e.lead??"")}),e.rest?.trim()?a(N,{children:[" ",r(e.rest)]}):null]},l))})]}),b&&a("div",{className:"grid grid-cols-[1fr_auto] items-start gap-[60px] border-t border-line pt-8 max-[1100px]:grid-cols-1 max-[1100px]:gap-4",children:[d.length>0&&t("div",{className:"max-w-[720px]",children:d.map((e,l)=>t("p",{className:`font-heading3 ${n.headingSmall} leading-[1.5] tracking-[-0.005em] text-fg [&:not(:first-child)]:mt-4`,children:r(e,!0)},l))}),p&&a("div",{className:`min-w-[240px] text-right font-mono ${n.label} uppercase leading-[1.9] tracking-[0.22em] text-fg-dim max-[1100px]:text-left`,children:[i&&t("strong",{className:`mb-1.5 block font-display ${n.body} font-normal tracking-[-0.01em] normal-case text-fg`,children:_(i,!1)}),o.map((e,l)=>a("span",{children:[r(e),t("br",{})]},l)),m&&t("span",{className:"text-accent",children:r(m)})]})]})]})})}export{k as default};
|
|
@@ -47,6 +47,10 @@ type Ctx = {
|
|
|
47
47
|
setBlockGap: (v: number | null) => void;
|
|
48
48
|
heroBackgroundFollowsWidth: boolean | null;
|
|
49
49
|
setHeroBackgroundFollowsWidth: (v: boolean | null) => void;
|
|
50
|
+
sectionBackgroundWidth: "full" | "content" | null;
|
|
51
|
+
setSectionBackgroundWidth: (v: "full" | "content" | null) => void;
|
|
52
|
+
sectionContentWidth: "full" | "content" | null;
|
|
53
|
+
setSectionContentWidth: (v: "full" | "content" | null) => void;
|
|
50
54
|
photographyGrayscale: boolean | null;
|
|
51
55
|
setPhotographyGrayscale: (v: boolean | null) => void;
|
|
52
56
|
shareButtonOnPosts: boolean | null;
|
|
@@ -58,7 +62,7 @@ type Ctx = {
|
|
|
58
62
|
setSelectHandler: (fn: () => void) => void;
|
|
59
63
|
};
|
|
60
64
|
export declare const PreviewHeaderContext: import("react").Context<Ctx>;
|
|
61
|
-
export declare function PreviewHeaderProvider({ children, websiteName, templateChrome, templateName, chromePlaceholder, themeMode, onThemeModeChange, themeSwitchShown, onThemeSwitchShownChange, theme, onThemeChange, fonts, onFontsChange, sizes, onSizesChange, cornerRadiusPx, onCornerRadiusPxChange, cardShadow, onCardShadowChange, shadowColor, onShadowColorChange, cardGap, onCardGapChange, hoverEffect, onHoverEffectChange, headingCompression, onHeadingCompressionChange, siteWidth, onSiteWidthChange, siteGutter, blockGap, onSiteGutterChange, onBlockGapChange, headingTypography, onHeadingTypographyChange, textStyles, onTextStylesChange, wordStyles, heroBackgroundFollowsWidth, onHeroBackgroundFollowsWidthChange, photographyGrayscale, onPhotographyGrayscaleChange, shareButtonOnPosts, onShareButtonOnPostsChange, themeFromDocument, }: {
|
|
65
|
+
export declare function PreviewHeaderProvider({ children, websiteName, templateChrome, templateName, chromePlaceholder, themeMode, onThemeModeChange, themeSwitchShown, onThemeSwitchShownChange, theme, onThemeChange, fonts, onFontsChange, sizes, onSizesChange, cornerRadiusPx, onCornerRadiusPxChange, cardShadow, onCardShadowChange, shadowColor, onShadowColorChange, cardGap, onCardGapChange, hoverEffect, onHoverEffectChange, headingCompression, onHeadingCompressionChange, siteWidth, onSiteWidthChange, siteGutter, blockGap, onSiteGutterChange, onBlockGapChange, headingTypography, onHeadingTypographyChange, textStyles, onTextStylesChange, wordStyles, heroBackgroundFollowsWidth, onHeroBackgroundFollowsWidthChange, sectionBackgroundWidth, onSectionBackgroundWidthChange, sectionContentWidth, onSectionContentWidthChange, photographyGrayscale, onPhotographyGrayscaleChange, shareButtonOnPosts, onShareButtonOnPostsChange, themeFromDocument, }: {
|
|
62
66
|
children: ReactNode;
|
|
63
67
|
websiteName?: string | null;
|
|
64
68
|
templateChrome?: boolean;
|
|
@@ -99,6 +103,10 @@ export declare function PreviewHeaderProvider({ children, websiteName, templateC
|
|
|
99
103
|
onHeadingTypographyChange?: (v: ResolvedHeadingTypography) => void;
|
|
100
104
|
heroBackgroundFollowsWidth?: boolean | null;
|
|
101
105
|
onHeroBackgroundFollowsWidthChange?: (v: boolean | null) => void;
|
|
106
|
+
sectionBackgroundWidth?: "full" | "content" | null;
|
|
107
|
+
onSectionBackgroundWidthChange?: (v: "full" | "content" | null) => void;
|
|
108
|
+
sectionContentWidth?: "full" | "content" | null;
|
|
109
|
+
onSectionContentWidthChange?: (v: "full" | "content" | null) => void;
|
|
102
110
|
photographyGrayscale?: boolean | null;
|
|
103
111
|
onPhotographyGrayscaleChange?: (v: boolean | null) => void;
|
|
104
112
|
shareButtonOnPosts?: boolean | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as U}from"react/jsx-runtime";import{createContext as jt,useCallback as e,useContext as zt,useMemo as bt,useState as W}from"react";import{EditorSiteLogoContext as Vt}from"./SiteLogoContext.js";import{useSelectHandler as Zt}from"efficient-easel/draw/client";import{IDENTITY_CARD_GAP as O,DEFAULT_HEADING_COMPRESSION as g,DEFAULT_HEADING_TYPOGRAPHY as B,DEFAULT_SIZES as M,DEFAULT_SWITCH_SHOWN as R,DEFAULT_THEME_MODE as N,DEFAULT_THEME_VALUE as Y}from"../../format/lib/theme.js";import{DEFAULT_FONTS as j}from"../../format/lib/fonts.js";const z=jt({settings:null,setSettings:()=>{},primeSettings:()=>{},websiteName:null,templateChrome:!1,templateName:null,chromePlaceholder:!1,themeMode:N,setThemeMode:()=>{},themeSwitchShown:R,setThemeSwitchShown:()=>{},theme:Y,setTheme:()=>{},fonts:j,setFonts:()=>{},sizes:M,setSizes:()=>{},cornerRadiusPx:null,setCornerRadiusPx:()=>{},cardShadow:null,setCardShadow:()=>{},shadowColor:null,setShadowColor:()=>{},cardGap:O,setCardGap:()=>{},hoverEffect:null,setHoverEffect:()=>{},headingCompression:g,setHeadingCompression:()=>{},siteWidth:null,setSiteWidth:()=>{},siteGutter:null,blockGap:null,setSiteGutter:()=>{},setBlockGap:()=>{},headingTypography:B,setHeadingTypography:()=>{},textStyles:null,setTextStyles:()=>{},wordStyles:null,heroBackgroundFollowsWidth:null,setHeroBackgroundFollowsWidth:()=>{},sectionBackgroundWidth:null,setSectionBackgroundWidth:()=>{},sectionContentWidth:null,setSectionContentWidth:()=>{},photographyGrayscale:null,setPhotographyGrayscale:()=>{},shareButtonOnPosts:null,setShareButtonOnPosts:()=>{},themeFromDocument:!1,selected:!1,setSelected:()=>{},select:()=>{},setSelectHandler:()=>{}});function Ct({children:b,websiteName:o=null,templateChrome:l=!1,templateName:n=null,chromePlaceholder:r=!1,themeMode:V=N,onThemeModeChange:c,themeSwitchShown:Z=R,onThemeSwitchShownChange:u,theme:q=Y,onThemeChange:i,fonts:J=j,onFontsChange:d,sizes:K=M,onSizesChange:S,cornerRadiusPx:Q=null,onCornerRadiusPxChange:a,cardShadow:X=null,onCardShadowChange:p,shadowColor:$=null,onShadowColorChange:E,cardGap:C=O,onCardGapChange:f,hoverEffect:tt=null,onHoverEffectChange:T,headingCompression:et=g,onHeadingCompressionChange:m,siteWidth:st=null,onSiteWidthChange:H,siteGutter:lt=null,blockGap:ot=null,onSiteGutterChange:D,onBlockGapChange:_,headingTypography:nt=B,onHeadingTypographyChange:h,textStyles:rt=null,onTextStylesChange:w,wordStyles:ct=null,heroBackgroundFollowsWidth:ut=null,onHeroBackgroundFollowsWidthChange:P,sectionBackgroundWidth:it=null,onSectionBackgroundWidthChange:x,sectionContentWidth:dt=null,onSectionContentWidthChange:A,photographyGrayscale:St=null,onPhotographyGrayscaleChange:k,shareButtonOnPosts:at=null,onShareButtonOnPostsChange:v,themeFromDocument:pt=!1}){const[s,F]=W(null),Et=e(t=>F(Yt=>Yt??t),[]),[ft,Tt]=W(!1),mt=e(t=>c?.(t),[c]),Ht=e(t=>u?.(t),[u]),Dt=e(t=>i?.(t),[i]),_t=e(t=>d?.(t),[d]),ht=e(t=>S?.(t),[S]),wt=e(t=>H?.(t),[H]),Pt=e(t=>D?.(t),[D]),xt=e(t=>_?.(t),[_]),At=e(t=>P?.(t),[P]),kt=e(t=>x?.(t),[x]),vt=e(t=>A?.(t),[A]),Ft=e(t=>k?.(t),[k]),Gt=e(t=>v?.(t),[v]),yt=e(t=>a?.(t),[a]),It=e(t=>p?.(t),[p]),Lt=e(t=>E?.(t),[E]),Ut=e(t=>f?.(t),[f]),Wt=e(t=>T?.(t),[T]),Ot=e(t=>m?.(t),[m]),gt=e(t=>h?.(t),[h]),Bt=e(t=>w?.(t),[w]),{select:Mt,setSelectHandler:Rt}=Zt(),G=s?.logoUrl,y=s?.logoReversed,I=s?.logoInkIsDark,L=s!==null,Nt=bt(()=>({logo:L?{logoUrl:G,logoReversed:y,logoInkIsDark:I}:null,placeholder:l||r,wordmark:l?n:o}),[L,G,y,I,l,r,n,o]);return U(Vt.Provider,{value:Nt,children:U(z.Provider,{value:{settings:s,setSettings:F,primeSettings:Et,websiteName:o,templateChrome:l,templateName:n,chromePlaceholder:r,themeMode:V,setThemeMode:mt,themeSwitchShown:Z,setThemeSwitchShown:Ht,theme:q,setTheme:Dt,fonts:J,setFonts:_t,sizes:K,setSizes:ht,cornerRadiusPx:Q,setCornerRadiusPx:yt,cardShadow:X,setCardShadow:It,shadowColor:$,setShadowColor:Lt,cardGap:C,setCardGap:Ut,hoverEffect:tt,setHoverEffect:Wt,headingCompression:et,setHeadingCompression:Ot,siteWidth:st,setSiteWidth:wt,siteGutter:lt,blockGap:ot,setSiteGutter:Pt,setBlockGap:xt,headingTypography:nt,setHeadingTypography:gt,textStyles:rt,setTextStyles:Bt,wordStyles:ct,heroBackgroundFollowsWidth:ut,setHeroBackgroundFollowsWidth:At,sectionBackgroundWidth:it,setSectionBackgroundWidth:kt,sectionContentWidth:dt,setSectionContentWidth:vt,photographyGrayscale:St,setPhotographyGrayscale:Ft,shareButtonOnPosts:at,setShareButtonOnPosts:Gt,themeFromDocument:pt,selected:ft,setSelected:Tt,select:Mt,setSelectHandler:Rt},children:b})})}const te=()=>zt(z);export{z as PreviewHeaderContext,Ct as PreviewHeaderProvider,te as usePreviewHeader};
|
|
@@ -29,4 +29,4 @@ export interface ProcessStepsProps {
|
|
|
29
29
|
cardText?: "below" | "on-image";
|
|
30
30
|
omitHead?: boolean;
|
|
31
31
|
}
|
|
32
|
-
export default function ProcessSteps({ num, title, description, boxes: Boxes, steps, columns, cta, padTop, padBottom, editing, omitHead, cardImage, cardText,
|
|
32
|
+
export default function ProcessSteps({ num, title, description, boxes: Boxes, steps, columns, cta, padTop, padBottom, editing, omitHead, cardImage, cardText, }: ProcessStepsProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as a,Fragment as
|
|
1
|
+
import{jsx as a,Fragment as C,jsxs as r}from"react/jsx-runtime";import{EDITORIAL_COLUMN as E}from"../../format/lib/content/page-width.js";import{cardImageShapeTokens as U}from"../../format/lib/content/card-image-shape.js";import{SiteLink as A}from"../lib/site-runtime.js";import G from"./EditorialSectionHead.js";import O from"./Placeholder.js";import{withRMark as i}from"./RMark.js";import{renderGold as m}from"./goldPhrases.js";import{say as R}from"../../format/lib/editor-words.js";const l={headingSmallUpTo700Small:"max-[700px]:text-[length:var(--size-headingSmall,26px)]",headingSmallUpTo700Large:"max-[700px]:text-[length:var(--size-headingSmall,28px)]",bodySmall:"text-[length:var(--size-body,15px)]",bodyLarge:"text-[length:var(--size-body,18px)]",headingSmall1:"text-[length:var(--size-headingSmall,28px)]",headingSmall2:"text-[length:var(--size-headingSmall,34px)]",labelSmall:"text-[length:var(--size-label,11px)]",label:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"},S={2:"grid-cols-2 max-[900px]:grid-cols-1",3:"grid-cols-3 max-[1100px]:grid-cols-1",4:"grid-cols-4 max-[1100px]:grid-cols-2 max-[700px]:grid-cols-1"},g="sf-itc-boxes",N="sf-itc-steps";function D({num:$,title:x,description:f,boxes:d,steps:z,columns:k=3,cta:c,padTop:b,padBottom:h,editing:L=!1,omitHead:T=!1,cardImage:_,cardText:w}){const I=typeof b=="number"?b:120,j=typeof h=="number"?h:120,u=(z??[]).filter(e=>(e?.tag??"").trim()||(e?.meta??"").trim()||(e?.title??"").trim()||(e?.copy??"").trim()||(e?.image??"").trim()||(e?.specs??[]).some(o=>(o?.label??"").trim()||(o?.value??"").trim())),v=u.length>0?u:L&&!d?[1,2,3].map(e=>({tag:R("Column {n}",{n:e})})):[],y=S[k]??S[3],n=w==="on-image";return a("section",{className:"relative z-[2] border-b border-line bg-bg",style:{paddingTop:I,paddingBottom:j,...U(_)},children:r("div",{className:E,children:[T?null:a(G,{num:$,title:x?.trim()?m(x,!0):void 0,desc:f?.trim()?m(f,!1):void 0}),d?r(C,{children:[a("style",{children:`.${g}:empty{display:none}.${g}:not(:empty)~.${N}{display:none}`}),a(d,{className:`${g} sf-card grid ${y} gap-[2px] border border-line bg-line [&>*]:min-h-[560px] [&>*]:bg-bg`,minEmptyHeight:260})]}):null,v.length>0&&a("div",{className:`${N} sf-card grid ${y} gap-[2px] border border-line bg-line`,children:v.map((e,o)=>{const s=(e.specs??[]).filter(t=>(t?.label??"").trim()||(t?.value??"").trim());return r("article",{className:n?"flex flex-col bg-bg":"flex min-h-[560px] flex-col bg-bg",children:[r("div",{className:n?"sf-card-image relative aspect-[5/3] overflow-hidden bg-surface max-[700px]:aspect-[4/3]":"sf-card-image relative aspect-[5/3] overflow-hidden border-b border-line bg-surface",children:[a(O,{label:e.tag?.trim()||e.title?.trim()||`column-${o+1}`,src:e.image||void 0,sizes:"(max-width: 1100px) 100vw, 33vw",...d?{deferFetch:!0}:{}}),a("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 z-[1]",style:{background:"linear-gradient(180deg, rgba(10,10,10,0.55) 0%, transparent 30%, transparent 70%, rgba(10,10,10,0.65) 100%)"}}),n&&a("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-x-0 bottom-0 z-[1] h-[78%]",style:{background:"linear-gradient(180deg, transparent 0%, rgba(10,10,10,0.73) 55%, rgba(10,10,10,0.92) 100%)"}}),e.tag?.trim()&&a("span",{className:`absolute left-5 top-[18px] z-[2] font-mono ${l.label} uppercase tracking-[0.3em] text-accent`,children:i(e.tag)}),e.meta?.trim()&&a("span",{className:n?`absolute right-5 top-[18px] z-[2] font-mono ${l.label} uppercase tracking-[0.24em] text-overlay-fg/80`:`absolute right-5 bottom-[18px] z-[2] font-mono ${l.label} uppercase tracking-[0.24em] text-overlay-fg/80`,children:i(e.meta)}),n&&(e.title?.trim()||e.copy?.trim())&&r("div",{className:"absolute inset-x-0 bottom-0 z-[2] flex flex-col gap-2.5 px-8 pb-7 pt-14 max-[700px]:px-6 max-[700px]:pb-6",children:[e.title?.trim()&&a("h3",{className:`flex min-h-[2em] flex-col justify-end font-heading3 ${l.headingSmall1} font-medium uppercase leading-none tracking-[-0.02em] text-overlay-fg ${l.headingSmallUpTo700Small}`,children:m(e.title,!0)}),e.copy?.trim()&&a("p",{className:`min-h-[3em] font-display ${l.bodySmall} leading-[1.5] text-overlay-fg/85`,children:m(e.copy,!1)})]})]}),n?s.length>0&&a("div",{className:"grid grid-cols-2 gap-2 border-t border-line px-8 py-7 max-[700px]:px-6 max-[700px]:py-6",children:s.map((t,p)=>r("div",{className:"flex flex-col gap-1",children:[t.label?.trim()&&a("span",{className:`font-mono ${l.labelSmall} uppercase tracking-[0.24em] text-fg-dim`,children:i(t.label)}),t.value?.trim()&&a("span",{className:`font-display ${l.bodyLarge} font-medium tracking-[-0.01em] text-fg`,children:i(t.value)})]},p))}):r("div",{className:"flex flex-1 flex-col gap-4 px-8 py-9 max-[700px]:px-6 max-[700px]:py-7",children:[e.title?.trim()&&a("h3",{className:`font-heading3 ${l.headingSmall2} font-medium uppercase leading-none tracking-[-0.02em] ${l.headingSmallUpTo700Large}`,children:m(e.title,!0)}),e.copy?.trim()&&a("p",{className:`font-display ${l.bodySmall} leading-[1.55] text-fg-dim`,children:m(e.copy,!1)}),s.length>0&&a("div",{className:"mt-auto grid grid-cols-2 gap-2 border-t border-line pt-4",children:s.map((t,p)=>r("div",{className:"flex flex-col gap-1",children:[t.label?.trim()&&a("span",{className:`font-mono ${l.labelSmall} uppercase tracking-[0.24em] text-fg-dim`,children:i(t.label)}),t.value?.trim()&&a("span",{className:`font-display ${l.bodyLarge} font-medium tracking-[-0.01em] text-fg`,children:i(t.value)})]},p))})]})]},o)})}),c?.text&&a("div",{className:"mt-12 flex justify-end border-t border-line pt-8",children:r(A,{href:c.href,className:`group inline-flex items-center gap-3.5 border border-line px-6 py-4 font-mono ${l.labelLarge} uppercase tracking-[0.3em] text-fg transition-colors hover:border-accent hover:text-accent`,children:[i(c.text),a("span",{"aria-hidden":!0,className:"text-accent transition-transform group-hover:translate-x-[3px]",children:"→"})]})})]})})}export{D as default};
|
|
@@ -16,4 +16,4 @@ export interface SeriesProps {
|
|
|
16
16
|
editing?: boolean;
|
|
17
17
|
omitHead?: boolean;
|
|
18
18
|
}
|
|
19
|
-
export default function Series({ headNum, headTitle, headDesc, cards, viewLabel, background, editing, omitHead,
|
|
19
|
+
export default function Series({ headNum, headTitle, headDesc, cards, viewLabel, background, editing, omitHead, }: SeriesProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as
|
|
1
|
+
import{jsx as t,jsxs as n,Fragment as S}from"react/jsx-runtime";import{EDITORIAL_COLUMN as j}from"../../format/lib/content/page-width.js";import v from"./EditorialSectionHead.js";import{renderGold as r,renderHeadline as o}from"./goldPhrases.js";import{say as E}from"../../format/lib/editor-words.js";const l={body:"text-[length:var(--size-body,14px)]",headingSmall:"text-[length:var(--size-headingSmall,28px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"};function L({headNum:p,headTitle:s,headDesc:x,cards:g,viewLabel:i,background:a,editing:h=!1,omitHead:m=!1}){const c=(g??[]).filter(e=>(e?.title??"").trim()||(e?.desc??"").trim()||(e?.num??"").trim()),b=c.length>0?c:h?[{title:E("Series title")}]:[],d=!!(a&&a!=="transparent");return t("section",{className:m?"border-b border-line pt-0 pb-[120px] max-[1100px]:pt-0 max-[1100px]:pb-20":"border-b border-line py-[120px] max-[1100px]:py-20",style:d?{backgroundColor:a}:void 0,children:n("div",{className:j,children:[m?null:t(v,{num:p,title:s?o(s):void 0,desc:x}),t("div",{className:`grid grid-cols-4 max-[1100px]:grid-cols-2 max-[700px]:grid-cols-1 ${d?"gap-[1px]":"gap-[2px] bg-bg"}`,children:b.map((e,f)=>{const u=!!(e.num?.trim()||e.since?.trim()),y=!!e.title?.trim(),N=!!(e.entries?.trim()||e.entriesLabel?.trim()||i);return n("article",{className:"flex min-h-[340px] flex-col gap-4 bg-bg px-7 pt-9 pb-8",children:[u&&n("div",{className:`flex items-baseline justify-between gap-3 font-mono ${l.labelLarge} uppercase tracking-[0.3em] text-accent`,children:[t("span",{children:e.num?r(e.num):null}),e.since?.trim()?t("span",{children:r(e.since)}):null]}),y&&t("h3",{className:`font-heading3 ${l.headingSmall} font-medium uppercase leading-[1.04] tracking-[-0.02em]`,children:o(e.title??"")}),e.desc?.trim()&&t("p",{className:`font-display ${l.body} leading-[1.6] text-fg-dim`,children:r(e.desc)}),N&&n("div",{className:`mt-auto flex items-center justify-between border-t border-line pt-4 font-mono ${l.labelSmall} uppercase tracking-[0.22em] text-fg-dim`,children:[n("span",{children:[e.entries?.trim()?t("strong",{className:"font-normal text-fg",children:r(e.entries)}):null,e.entriesLabel?.trim()?n(S,{children:[e.entries?.trim()?" ":"",r(e.entriesLabel)]}):null]}),i&&t("span",{className:"text-accent",children:r(i)})]})]},f)})})]})})}export{L as default};
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { type CSSProperties, type ReactNode } from "react";
|
|
2
2
|
import { type PadValues } from "../../format/lib/content/section-padding.js";
|
|
3
|
-
export
|
|
3
|
+
export declare function SplitBandAndColumn({ children }: {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
}): import("react").JSX.Element;
|
|
6
|
+
export default function SiteGutterFrame({ contained, framedClass, fillClass, columnClass, style, tabLabel, pad, border, children, }: {
|
|
4
7
|
contained: boolean;
|
|
5
8
|
framedClass: string;
|
|
6
9
|
fillClass: string;
|
|
10
|
+
columnClass: string;
|
|
7
11
|
style?: CSSProperties;
|
|
8
12
|
tabLabel?: string;
|
|
9
13
|
pad?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as t}from"react/jsx-runtime";import{createContext as p,useContext as C}from"react";import{rootPadAttrs as E,wrapperPadAttrs as O}from"../../format/lib/content/section-padding.js";import{SECTION_BORDER_CLASS as P,SECTION_BORDER_SELF_CLASS as I}from"../../format/lib/content/borders.js";import{drawsSiteGutter as j}from"../../format/lib/content/site-gutter.js";const N=p(!1),u=p(!1);function g({children:o}){return t(u.Provider,{value:!0,children:o})}function w({contained:o,framedClass:h,fillClass:x,columnClass:y,style:d,tabLabel:R,pad:e,border:n,children:m}){const _=C(N),f=C(u),l=j(o,_),s=l&&!f,r=e&&!s?E(e.values,e.frame):null,a=n&&!s?n:null,A=[s?h:x,r?.className,a?I:null].filter(Boolean).join(" "),B=r||a?{...d,...r?.style,...a}:d,i=l?t(N.Provider,{value:!0,children:m}):m,v=t("div",{className:A,style:B,"data-tab-label":R,children:f?t(u.Provider,{value:!1,children:l?t("div",{className:y,children:i}):i}):i}),c=e&&s?O(e.values):null,S=c?t("div",{className:c.className,style:c.style,children:v}):v;return n&&s?t("div",{className:P,style:{display:"contents",...n},children:S}):S}export{g as SplitBandAndColumn,w as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{say as a}from"../../format/lib/editor-words.js";const o=()=>[{text:a("Spec label"),tone:"normal"},{text:a("Spec value"),tone:"muted"},{text:a("Spec label"),tone:"normal"},{text:a("Spec value"),tone:"muted"}];function d({cells:
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{say as a}from"../../format/lib/editor-words.js";const o=()=>[{text:a("Spec label"),tone:"normal"},{text:a("Spec value"),tone:"muted"},{text:a("Spec label"),tone:"normal"},{text:a("Spec value"),tone:"muted"}];function d({cells:p,fill:x="dark",editing:i=!1}){const n=(p??[]).filter(e=>(e?.text??"").trim()),r=n.length>0?n:i?o():[];if(r.length===0)return null;const l=x!=="none",s=t("div",{className:"mx-auto flex max-w-[var(--sf-site-width,1600px)] flex-wrap items-baseline justify-between gap-x-8 gap-y-1 px-[var(--sf-site-gutter,40px)] py-4 text-[length:var(--size-label,12px)] uppercase tracking-[0.1em] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))] max-[800px]:py-3",children:r.map((e,m)=>t("span",{className:l?e.tone==="muted"?"text-plate-band-fg-dim":"text-plate-band-fg":e.tone==="muted"?"text-fg-dim":"text-fg",children:e.text},m))});return t("section",{className:"w-full",children:l?t("div",{className:"bg-plate-band",children:s}):t("div",{className:"border-t border-line",children:s})})}export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{SiteLink as v}from"../lib/site-runtime.js";import
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{SiteLink as v}from"../lib/site-runtime.js";import _ from"./Btn.js";import{resolveImageTreatment as E}from"../../format/lib/content/image-treatment.js";import y from"./Placeholder.js";import{useSitePhotography as I}from"./SitePhotographyContext.js";import L from"./SectionEyebrow.js";import{renderGold as i,renderHeadline as P,splitParagraphs as U}from"./goldPhrases.js";import{ON_MEDIA_INK_STYLE as S}from"../../format/lib/content/ink.js";const t={headingMediumUpTo800:"max-[800px]:text-[length:var(--size-headingMedium,36px)]",labelUpTo800:"max-[800px]:text-[length:var(--size-label,12px)]",headingMedium:"text-[length:min(var(--size-headingMedium,56px),var(--sf-heading-max,9999px))]",body:"text-[length:var(--size-body,16px)]",label:"text-[length:var(--size-label,13px)]"};function A({imageLabel:d,imageSrc:p,imageTint:c=.4,imageObjectPosition:N,eyebrow:x,title:m,body:h,cta:l,reverse:f=!1,uppercase:j=!1,textAlign:k="left",textBgSrc:s,textBgLabel:$,textBgTint:b=.6,textBgObjectPosition:z,featureBar:a,imageButton:n,grayscale:w}){const g=E(w,I()),u={left:{items:"",text:"",cta:"self-start"},center:{items:"items-center",text:"text-center",cta:"self-center"},right:{items:"items-end",text:"text-right",cta:"self-end"}},o=u[k]??u.left;return e("section",{className:"relative z-[2] bg-bg p-0",children:r("div",{className:["grid min-h-[72vh] grid-cols-2 border-t border-b border-line","mx-auto w-full max-w-[var(--sf-content-cap,none)]","max-[960px]:grid-cols-1","max-[960px]:min-h-0",f?"min-[961px]:[direction:rtl]":""].join(" "),children:[r("div",{className:"sf-card relative flex items-center justify-center overflow-hidden bg-surface [direction:ltr] max-[960px]:aspect-[4/3] max-[960px]:order-2",style:f?{borderLeft:"1px solid var(--site-line)"}:{borderRight:"1px solid var(--site-line)"},children:[e(y,{label:d,src:p,objectPosition:N,treatment:g}),p&&c>0&&e("div",{className:"absolute inset-0",style:{background:`rgba(0,0,0,${c})`}}),(a||n)&&r("div",{className:"pointer-events-none absolute inset-0 z-[3] flex flex-col items-center justify-center gap-4 px-[var(--sf-site-gutter,40px)] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]",children:[a&&r(v,{href:a.href,className:`pointer-events-auto inline-flex items-center justify-center gap-3 border px-7 py-4 font-mono ${t.label} uppercase tracking-[0.18em] backdrop-blur-sm transition-colors max-[800px]:gap-2 max-[800px]:px-5 max-[800px]:py-3 ${t.labelUpTo800}`,style:{borderColor:"rgba(245,241,232,0.3)",color:"rgba(245,241,232,0.85)",background:"rgba(0,0,0,0.45)"},children:[e("span",{children:i(a.wheel)}),e("span",{"aria-hidden":!0,style:{opacity:.55},children:"·"}),e("span",{children:i(a.category)}),e("span",{"aria-hidden":!0,children:"→"}),e("span",{children:i(a.cta??"Shop now")})]}),n&&r(v,{href:n.href,className:`pointer-events-auto inline-flex items-center justify-center gap-2 border px-7 py-4 font-mono ${t.label} uppercase tracking-[0.18em] backdrop-blur-sm transition-colors hover:bg-[rgba(245,241,232,0.1)] max-[800px]:gap-2 max-[800px]:px-5 max-[800px]:py-3 ${t.labelUpTo800}`,style:{borderColor:"rgba(245,241,232,0.5)",color:"rgba(245,241,232,0.95)",background:"transparent"},children:[e("span",{children:i(n.text??"Learn more")}),e("span",{"aria-hidden":!0,children:"→"})]})]})]}),r("div",{className:"relative overflow-hidden [direction:ltr] max-[960px]:order-1",children:[s&&r("div",{className:"absolute inset-0","aria-hidden":!0,children:[e(y,{label:$??d,src:s,objectPosition:z,treatment:g}),b>0&&e("div",{className:"absolute inset-0",style:{background:`rgba(0,0,0,${b})`}})]}),e("div",{className:"relative z-[2] flex h-full min-h-full flex-col px-[60px] py-[100px] max-[960px]:px-6 max-[960px]:py-[60px]",style:s?S:void 0,children:r("div",{className:["flex flex-1 flex-col justify-center gap-6",o.items,o.text].join(" "),children:[x&&e(L,{text:x,size:14}),m&&e("h2",{className:[`font-heading2 ${t.headingMedium} font-normal leading-[1.05] tracking-[-0.03em]`,`${t.headingMediumUpTo800} max-[800px]:leading-[1]`,j?"uppercase":""].join(" "),children:P(m,!1)}),h&&U(h).map((M,T)=>e("p",{className:[`max-w-[520px] ${t.body} leading-[1.7]`,"text-fg-dim"].join(" "),children:i(M)},T)),l.text&&e("div",{className:`mt-2 ${o.cta}`,children:e(_,{href:l.href,variant:"primary",children:i(l.text)})})]})})]})]})})}export{A as default};
|
|
@@ -18,4 +18,4 @@ export interface StatsParagraphProps {
|
|
|
18
18
|
editing?: boolean;
|
|
19
19
|
omitHead?: boolean;
|
|
20
20
|
}
|
|
21
|
-
export default function StatsParagraph({ eyebrow, title, desc, stats, background, padTop, padBottom, editing, omitHead,
|
|
21
|
+
export default function StatsParagraph({ eyebrow, title, desc, stats, background, padTop, padBottom, editing, omitHead, }?: StatsParagraphProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsxs as
|
|
1
|
+
"use client";import{jsxs as l,jsx as n,Fragment as y}from"react/jsx-runtime";import{EDITORIAL_COLUMN as S}from"../../format/lib/content/page-width.js";import C from"./EditorialSectionHead.js";import{renderGold as h,renderHeadline as E}from"./goldPhrases.js";import{useCountUp as _}from"./useCountUp.js";import{say as b}from"../../format/lib/editor-words.js";const x={body:"text-[length:var(--size-body,16px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"},v="font-normal italic text-accent";function k({value:g,prefix:c,suffix:r,supSuffix:d,emphasizeAll:i,label:t,sub:a}){const o=(g??"").trim(),p=/^\d+$/.test(o),{ref:f,value:u}=_(p?parseInt(o,10):0),s=p?String(u):o,m=c??"";return l("div",{className:"flex min-h-[240px] flex-col gap-3 bg-bg px-8 py-12",children:[l("div",{ref:f,className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(56px,7vw,96px)),var(--sf-heading-max,9999px))] font-medium leading-[0.9] tracking-[-0.04em] tabular-nums",children:[i?l("em",{className:v,children:[m,s]}):l(y,{children:[m,s,r?n("em",{className:v,children:r}):null]}),d?n("sup",{className:`ml-8 inline-block pt-[18px] align-top font-mono ${x.labelLarge} leading-none tracking-[0.18em] text-accent`,children:d}):null]}),(t||a)&&l("div",{className:`mt-auto font-mono ${x.labelSmall} uppercase tracking-[0.24em] text-fg-dim`,children:[t?n("strong",{className:`mb-1 block font-display ${x.body} font-normal normal-case tracking-[-0.01em] text-fg`,children:t}):null,a?h(a):null]})]})}function j({eyebrow:g,title:c,desc:r,stats:d,background:i,padTop:t,padBottom:a,editing:o=!1,omitHead:p=!1}={}){const f=typeof t=="number"?t:120,u=typeof a=="number"?a:120,s=(d??[]).filter(e=>(e.value??"").trim()!==""||(e.label??"").trim()!==""||(e.sub??"").trim()!==""||(e.suffix??"").trim()!==""||(e.supSuffix??"").trim()!==""),m=s.length>0?s:o?[{value:"0",label:b("Stat"),sub:b("Add your numbers.")}]:[];return n("section",{className:"border-b border-line",style:{paddingTop:f,paddingBottom:u,...!!(i&&i!=="transparent")?{backgroundColor:i}:{}},children:l("div",{className:S,children:[p?null:n(C,{num:g,title:c?E(c):void 0,desc:r?h(r):void 0}),m.length>0&&n("div",{className:"sf-card grid grid-cols-4 gap-[2px] border border-line bg-line max-[1100px]:grid-cols-2 max-[700px]:grid-cols-1",children:m.map((e,N)=>n(k,{...e},N))})]})})}export{j as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as a}from"react/jsx-runtime";import{SiteLink as S}from"../lib/site-runtime.js";import T from"./EditorialSectionHead.js";import f from"./PartStyledText.js";import{withRMark as o}from"./RMark.js";import{renderGold as b,renderHeadline as $}from"./goldPhrases.js";const n={body:"text-[length:var(--size-body,13px)]",headingSmall:"text-[length:var(--size-headingSmall,20px)]",label:"text-[length:var(--size-label,13px)]"};function z({eyebrow:g,title:p,intro:
|
|
1
|
+
import{jsx as t,jsxs as a}from"react/jsx-runtime";import{SiteLink as S}from"../lib/site-runtime.js";import T from"./EditorialSectionHead.js";import f from"./PartStyledText.js";import{withRMark as o}from"./RMark.js";import{renderGold as b,renderHeadline as $}from"./goldPhrases.js";const n={body:"text-[length:var(--size-body,13px)]",headingSmall:"text-[length:var(--size-headingSmall,20px)]",label:"text-[length:var(--size-label,13px)]"};function z({eyebrow:g,title:p,intro:s,entries:u,cta:l,padTop:x,padBottom:d,background:h,editing:v,omitHead:m=!1}={}){const N=typeof x=="number"?x:120,y=typeof d=="number"?d:120,c=h??"var(--section-bg)",j=c!=="transparent",r=(u??[]).filter(e=>(e.date??"").trim()||(e.title??"").trim()||(e.blurb??"").trim());if(r.length===0&&!v)return null;const k=r.filter(e=>!e.future).length,w=r.length?k/r.length*100:0;return t("section",{className:"relative z-[2]",children:t("div",{className:"border-b border-line",style:{paddingTop:N,paddingBottom:y,...j?{backgroundColor:c}:{}},children:a("div",{className:"mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]",children:[m?null:t(T,{num:g,title:p?$(p):void 0,desc:s?b(s,!0):void 0,spaceBelow:"",className:"text-fg"}),a("div",{className:m?"relative mt-0 grid grid-cols-[repeat(var(--cols),minmax(0,1fr))] gap-0 border-t border-line pt-[60px] max-[1100px]:mt-0 max-[1100px]:grid-cols-1 max-[1100px]:gap-0 max-[1100px]:border-t-0 max-[1100px]:pt-0":"relative mt-[60px] grid grid-cols-[repeat(var(--cols),minmax(0,1fr))] gap-0 border-t border-line pt-[60px] max-[1100px]:mt-9 max-[1100px]:grid-cols-1 max-[1100px]:gap-0 max-[1100px]:border-t-0 max-[1100px]:pt-0",style:{"--cols":r.length},children:[t("div",{className:"pointer-events-none absolute inset-x-0 top-0 h-px bg-line max-[1100px]:hidden",children:t("div",{className:"absolute -top-px left-0 h-[3px] bg-gradient-to-r from-accent to-transparent",style:{width:`${w}%`}})}),r.map((e,i)=>a("div",{className:["relative flex min-h-[280px] flex-col gap-3.5 px-3.5","border-l",e.future?"border-line":"max-[1100px]:border-accent border-line",i===0?"min-[1101px]:border-l-0":"","max-[1100px]:min-h-0 max-[1100px]:border-t-0 max-[1100px]:py-6 max-[1100px]:pl-7 max-[1100px]:ml-1.5"].join(" "),children:[t("span",{className:["pointer-events-none absolute h-2.5 w-2.5 rounded-full border-2 border-bg",e.future?"border-line bg-surface-2":"bg-accent",i===0?"-top-[66px] left-[-1px]":"-top-[66px] left-[-5px]","max-[1100px]:left-[-5px] max-[1100px]:top-7"].join(" ")}),t("span",{className:[`font-mono ${n.label} tracking-[0.22em]`,e.future?"text-fg-dim":"text-accent"].join(" "),children:e.date?t(f,{value:e.date,children:o(e.date)}):""}),e.title&&t("h3",{className:`whitespace-pre-line font-heading3 ${n.headingSmall} font-medium uppercase leading-[1.1] tracking-[-0.02em] text-fg`,children:t(f,{value:e.title,children:o(e.title)})}),e.blurb&&t("p",{className:`mt-auto font-display ${n.body} leading-[1.55] text-fg-dim`,children:b(e.blurb,!0)})]},i))]}),l?.text&&t("div",{className:"mt-12 flex justify-end border-t border-line pt-8",children:a(S,{href:l.href,className:`group inline-flex items-center gap-3.5 border border-line px-6 py-4 font-mono ${n.label} uppercase tracking-[0.3em] text-fg transition-colors hover:border-accent hover:text-accent`,children:[o(l.text),t("span",{"aria-hidden":!0,className:"text-accent transition-transform group-hover:translate-x-[3px]",children:"→"})]})})]})})})}export{z as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as l}from"react/jsx-runtime";import{
|
|
2
|
-
*Highlight line*`,body:"A sentence or two of supporting copy."};function y(e){if(e===!1)return b
|
|
1
|
+
import{jsx as l}from"react/jsx-runtime";import{SITE_WIDTH_CAP as b,centredCap as a}from"../../../../../../format/lib/content/page-width.js";import{TYPE_SIZE_INHERIT as t}from"../../../../../../format/lib/content/section-type-size.js";import n from"../../../../../components/IntroBleed.js";import{hidableText as r}from"efficient-easel/draw";import{parseIntroBleedLayout as c}from"../../../../../../format/lib/sections/intro-bleed-layout.js";import{phHide as o,ctaHide as d}from"../../scaffold.js";const i={eyebrow:"— Label",title:`Section headline
|
|
2
|
+
*Highlight line*`,body:"A sentence or two of supporting copy."};function y(e){if(e===!1)return a(b)}const M={label:"Scroll-Over Text",defaultProps:{eyebrow:"",title:"",body:"",imageSrc:"",imageSrcMobile:"",heightDesktop:100,heightMobile:100,overlay:60,titleSizeDesktop:t,bodySizeDesktop:t,titleSizeMobile:t,bodySizeMobile:t,ctaText:"",ctaHref:"",buttonColor:"",buttonTextColor:"",sticky:!0,uppercase:!1,contentWidth:"site"},render:e=>l(n,{eyebrow:o(e.eyebrow,i.eyebrow,e.puck),title:o(e.title,i.title,e.puck),body:o(e.body,i.body,e.puck),imageLabel:r(e.title)||i.title,imageSrc:e.imageSrc||void 0,imageSrcMobile:e.imageSrcMobile||void 0,cta:d(e.ctaText,e.ctaHref,e.puck),sticky:e.sticky,layout:c(e.layout),copyShareDesktop:e.copyShareDesktop,copyShareMobile:e.copyShareMobile,heightDesktop:e.heightDesktop,heightMobile:e.heightMobile,overlay:e.overlay,titleSizeDesktop:e.titleSizeDesktop,bodySizeDesktop:e.bodySizeDesktop,titleSizeMobile:e.titleSizeMobile,bodySizeMobile:e.bodySizeMobile,buttonColor:e.buttonColor||void 0,buttonTextColor:e.buttonTextColor||void 0,uppercase:e.uppercase,capStyle:y(e.fullWidth)})};export{i as INTRO_PH,M as IntroBleedRender};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Config } from "efficient-easel/blocks";
|
|
2
|
-
export default function PageRender({ config, data }: {
|
|
2
|
+
export default function PageRender({ config, data, metadata, }: {
|
|
3
3
|
config: Config;
|
|
4
4
|
data: unknown;
|
|
5
|
+
metadata?: Record<string, unknown>;
|
|
5
6
|
}): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as t}from"react/jsx-runtime";import{Render as a}from"efficient-easel/render";import{capHeroGroups as m}from"../../../format/lib/puck/cap-hero-groups.js";import{oneH1 as i}from"../../../format/lib/puck/one-h1.js";import{migrateLegacyPageData as p}from"./migrate-legacy.js";import{migrateRenamedProps as f}from"../../../format/lib/puck/renamed-props.js";function n({config:r,data:e,metadata:o}){return t(a,{config:r,metadata:o,data:i(m(f(p(e))))})}export{n as default};
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
import { type WidthMode } from "../../../../format/lib/content/section-width.js";
|
|
1
|
+
import { type SectionWidths, type WidthAnswer, type WidthMode } from "../../../../format/lib/content/section-width.js";
|
|
2
2
|
import type { BlockPass } from "../../../../format/lib/puck/passes/types.js";
|
|
3
|
+
export declare function drawsTwoWidthRows(key: string, comp?: object): boolean;
|
|
4
|
+
export declare const SITE_CONTENT_VAR = "--sf-sw-site";
|
|
5
|
+
export declare const SECTION_CONTENT_VAR = "--sf-sw-content";
|
|
6
|
+
export declare const SECTION_BACKGROUND_VAR = "--sf-bg-cap";
|
|
7
|
+
export declare const SECTION_CONTENT_CLASS = "contents [--sf-site-width:var(--sf-sw-content)] max-[800px]:[--sf-site-width:var(--sf-sw-site)]";
|
|
8
|
+
export declare function contentOverride(w: SectionWidths, background: WidthAnswer | null): string | null;
|
|
9
|
+
export declare const SECTION_CONTENT_CAP_VAR = "--sf-content-cap";
|
|
10
|
+
export declare const SECTION_CONTENT_CAP_CLASS = "contents max-[800px]:[--sf-content-cap:none]";
|
|
3
11
|
export declare const sectionWidth: BlockPass;
|
|
4
12
|
export declare function widthModeFields<T extends Record<string, unknown>>(fields: T, w: {
|
|
5
13
|
mode: WidthMode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as u}from"react/jsx-runtime";import{resolveContainerDirection as m}from"../../../../format/lib/content/container-direction.js";import{IMAGE_WIDTH as p}from"../../../../format/lib/content/image-width.js";import{HERO_BACKGROUND_VAR as A,HERO_CHROME_CAP_VAR as W,HERO_CHROME_INSET_VAR as b,SITE_WIDTH_CAP as h,centredCap as R,heroBackgroundTokens as B}from"../../../../format/lib/content/page-width.js";import{SECTION_WIDTH_FAMILY as I,resolveSectionWidth as g,resolveWidth as N,sectionHasWidthRows as y,siteWidthsOf as F}from"../../../../format/lib/content/section-width.js";import{isInsideSiteGutter as H}from"../../../../format/lib/content/site-gutter.js";import{SplitBandAndColumn as D}from"../../../components/SiteGutterFrame.js";import{parentCapsWidth as P}from"../../../../format/lib/sections/section-head-placement.js";import{addShowWhenFacts as E,withRowsShownWhen as O}from"../../../../format/lib/puck/show-when-attach.js";import{findParentNode as M,isNestedNode as G}from"../../../../format/lib/puck/passes/document-position.js";const k=new Set(["ProductGrid","RelatedProducts","DeliveryOptions","CheckoutCTA","Ticker","CategoryBar","DocTabs","CustomHTML","Spacer"]),L=new Set(["ProductHero"]),V=new Set(["Collections","Events","BrandStrip","CatalogFilterBar","AlloyWheelsListing","DeliveryOptions","CheckoutCTA","ProductHero","ProductGrid","DetailRows","FitmentTable","TyreSizes","TyreFitment","EuTyreLabel","BundleOffer","CompatibleTyres","RelatedProducts","FitmentFinder","SpecTable","Subscribe","SubscribeBlogs","ContactRouting","SubmitBuild"]);function S(t,n){return y(t)?!V.has(t)||n?.widthRows==="two":!1}const T="--sf-sw-site",j="--sf-sw-content",$="--sf-bg-cap",U="contents [--sf-site-width:var(--sf-sw-content)] max-[800px]:[--sf-site-width:var(--sf-sw-site)]";function C(t,n){const e=n==="content";return t.content==="full"?e?null:"100vw":t.content==="content"&&t.contentMax!==null?e?`min(${t.contentMax}px,var(${T}))`:`${t.contentMax}px`:null}function w(t,n){return n===null?t:u("div",{className:"contents",style:{[T]:h},children:u("div",{className:U,style:{[j]:n},children:t})})}const K="--sf-content-cap",Y="contents max-[800px]:[--sf-content-cap:none]";function z(t,n){if((t.content??"content")==="full")return null;const e=n==="content";return t.contentMax!==null?e?`min(${t.contentMax}px,var(${T}))`:`${t.contentMax}px`:e?null:`var(${T})`}function X(t,n){return n===null?t:u("div",{className:"contents",style:{[T]:h},children:u("div",{className:Y,style:{[K]:n},children:t})})}const _=(t,n)=>t==="content"?u("div",{style:R(h),children:n}):n;function q(t,n){const e=I[n],i=t.render;t.render=o=>{const s=F(o),l=g(n,o),r={...l,content:l.content??s.content};if(e==="hero"){const d=r.background??s.background,f=w(i(o),C(r,d));return d==="full"?u("div",{style:{[A]:"none",[b]:"initial",[W]:"initial"},children:f}):d==="content"?u("div",{style:B(!0),children:f}):f}const c=r.background??s.background??"full";if(e==="scrollOver"){const d=(r.content??"content")==="full",f=w(i({...o,fullWidth:d}),d?null:C(r,c));return c==="content"?u("div",{className:"contents",style:{[$]:h},children:f}):f}const a=r.content??"content";switch(e){case"both":return _(c,X(i(o),z(r,c)));case"contained":{if(a==="full")return _(c,i({...o,contained:!1}));const d=C(r,c);if(c==="content"&&d===null)return i({...o,contained:!0});const f=u(D,{children:i({...o,contained:!0})});return _(c,w(f,d))}case"contentColumn":case"contentFull":{const f={...o,widthMode:a==="full"?"full":"page",fullWidth:void 0,contained:void 0};return _(c,w(i(f),a==="full"?null:C(r,c)))}default:return _(c,w(i(o),C(r,c)))}}}const ht={name:"sectionWidth",applies:(t,n,e)=>(n.isSection(t)&&!k.has(t)||S(t,e))&&!!e&&typeof e.render=="function",panel(t,n,e){if(S(n,t)){const s=e.sectionWidthFields(n),l={...t.fields,...s};t.fields=I[n]==="contained"?v(n,t,l,Object.keys(s)):l;return}const i=e.widthField;t.fields={...t.fields,...i("full")};const o=t.resolveFields;t.resolveFields=(s,l)=>{const r=o?o(s,l):l.fields,c=N(s?.props??{},"full");return r&&typeof r.then=="function"?r.then(a=>x(a,c)):x(r,c)}},draw(t,n){if(S(n,t)){q(t,n);return}const e=L.has(n),i=t.render;t.render=o=>{const{mode:s}=N(o,"full"),l=i(o);if(s==="full")return l;const r=R(h);return e?u("div",{style:{"--sf-page-cap":h},children:l}):u("div",{style:r,children:l})}}};function x(t,n){if(!t||!("widthMode"in t))return t;const e={...t},i=e.widthMode;return i&&(e.widthMode={...i,currentValue:n.mode,inherited:n.inherited}),e}const J=new Set(["Heading","Text","ImageBlock","ButtonBlock","Banner","Stats","Logos","Divider","Flex","Grid","OrderSummary","DeliveryOptions","PaymentBadges","CheckoutCTA"]),pt={name:"containedWidth",applies:(t,n,e)=>J.has(t)&&!S(t,e)&&!!e&&typeof e.render=="function",panel(t,n,e){const i=e.widthField;t.fields=v(n,t,{...t.fields,...i("page")});const o=t.resolveFields;t.resolveFields=(s,l)=>{const r=o?o(s,l):l.fields,c=N(s?.props??{},"page"),a=d=>x(d,c);return r&&typeof r.then=="function"?r.then(a):a(r)}},draw(t){const n=t.render;t.render=e=>{const{mode:i}=N(e,"page");return n({...e,contained:i!=="full"})}}},Q={not:{context:"inHeroGroupRow",is:!0}},Tt={name:"buttonAlignInRow",applies:t=>t==="ButtonBlock",panel(t){const n=t;n.fields=O(n.fields??{},["align"],Q),E(n,{inHeroGroupRow:(e,i)=>{const o=M(i.appState,e.props?.id);return!!o&&o.type==="HeroGroup"&&m("HeroGroup",o.props?.direction)==="row"}})}};function Z(t){return Object.values(t).some(n=>!!n&&typeof n=="object"&&n.type==="slot")}const tt={any:[]},nt={not:{context:"insideSiteGutter",is:!0}},et={not:{context:"widthCappedByParent",is:!0}};function v(t,n,e,i=["widthMode","pageWidth"]){return t==="ButtonBlock"?O(e,["_gWidth",...i],tt):Z(e)?(E(n,{insideSiteGutter:(o,s)=>H(s.appState?.data?.content,o.props?.id)}),O(e,i,nt)):(E(n,{widthCappedByParent:(o,s)=>"parent"in s?P(s.parent):G({props:o.props??{}},s)}),O(e,i,et))}const Ct={name:"imageWidth",applies:t=>t==="ImageBlock",panel(t,n,e){const{slider:i,WidthIcon:o}=e;if(t?.fields){const s=i("Image width",u(o,{}),p.min,p.max,p.step,p.fallback,p.unit),l="focal",r=Object.entries(t.fields),c=r.findIndex(([a])=>a===l);t.fields=Object.fromEntries(c===-1?[...r,["width",s]]:[...r.slice(0,c+1),["width",s],...r.slice(c+1)])}}};export{$ as SECTION_BACKGROUND_VAR,Y as SECTION_CONTENT_CAP_CLASS,K as SECTION_CONTENT_CAP_VAR,U as SECTION_CONTENT_CLASS,j as SECTION_CONTENT_VAR,T as SITE_CONTENT_VAR,Tt as buttonAlignInRow,pt as containedWidth,C as contentOverride,S as drawsTwoWidthRows,Ct as imageWidth,ht as sectionWidth,x as widthModeFields};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-web-builder",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "30.1.0",
|
|
4
4
|
"description": "The EFFICIENT website builder: the website editor, the general sections and the renderer that draws them, compiled. Hostable by any EFFICIENT product; nothing here imports a host.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Efficient Pty Ltd",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{jsx as l}from"react/jsx-runtime";import{SettingsDefaultReset as h,SettingsField as g,SettingsSegmented as p}from"efficient-easel/panel";import{say as e,editorEaselWords as c}from"../../format/lib/editor-words.js";import{WIDTH_CHOICE_LABEL as d}from"../../format/lib/content/section-width.js";import{ImageIcon as m}from"efficient-easel/icons";const o="Hero image",i=[{followsWidth:!1,label:d.full},{followsWidth:!0,label:d.page}],u="Whether the big picture at the top of a page runs edge to edge, or sits inside the page width. The words follow the page width either way.";function w({value:a,onChange:n,showHint:f=!0}){const s=a===null,r=a??!1;return l(g,{label:e(o),icon:l(m,{}),value:e(i.find(t=>t.followsWidth===r).label),changed:!s,action:l(h,{words:c()?.panel,label:e(o),changed:!s,detail:e(i.find(t=>!t.followsWidth).label),onReset:()=>n(null)}),hint:f?e(u):void 0,children:l(p,{options:i.map(t=>({id:t.followsWidth,label:e(t.label)})),value:r,ariaLabel:e(o),onChange:n})})}export{o as HERO_IMAGE_LABEL,w as default};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const SITE_WIDTH_LABEL = "Content width";
|
|
2
|
-
export declare const SITE_WIDTH_HINT = "The standard width every page on this site renders at.";
|
|
3
|
-
export default function SiteWidthField({ value, onChange, showHint, }: {
|
|
4
|
-
value: number | null;
|
|
5
|
-
onChange: (v: number | null) => void;
|
|
6
|
-
showHint?: boolean;
|
|
7
|
-
}): import("react").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{jsx as e}from"react/jsx-runtime";import{SettingsDefaultReset as l,SettingsField as m}from"efficient-easel/panel";import{WidthIcon as p}from"efficient-easel/icons";import{PAGE_WIDTH as t}from"../../format/lib/content/page-width.js";import{say as i,editorEaselWords as f}from"../../format/lib/editor-words.js";import{Slider as c}from"../lib/puck/controls.js";const o="Content width",r=t.default,u="The standard width every page on this site renders at.";function h({value:n,onChange:s,showHint:d=!0}){const a=n===null;return e(m,{label:i(o),labelId:"sf-site-width",icon:e(p,{}),value:`${n??r}px`,changed:!a,action:e(l,{words:f()?.panel,label:i(o),changed:!a,detail:`${r}px`,onReset:()=>s(null)}),hint:d?i(u):void 0,children:e(c,{min:t.min,max:t.max,step:t.step,value:n??r,readout:!1,ariaLabel:i(o),onChange:s})})}export{u as SITE_WIDTH_HINT,o as SITE_WIDTH_LABEL,h as default};
|