efficient-web-builder 45.0.0 → 46.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/editor/components/ApplyCornersToSiblings.d.ts +1 -3
- package/dist/editor/components/ApplyCornersToSiblings.js +1 -1
- package/dist/editor/components/PartSettingsPanel.js +1 -1
- package/dist/editor/components/SectionThumbnail.js +1 -1
- package/dist/editor/components/StorefrontEditor.js +1 -1
- package/dist/editor/components/WebsiteScreenParts.js +1 -1
- package/dist/editor/components/useSectionToBoxPass.d.ts +8 -1
- package/dist/editor/components/useSectionToBoxPass.js +1 -1
- package/dist/editor/components/useSocialSettings.d.ts +2 -2
- package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Eyebrow/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Heading/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Hero/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/LogoBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Split/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Text/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/TitleWithButtons/fields.js +1 -1
- package/dist/editor/lib/document/blocks/shared-fields.d.ts +0 -1
- package/dist/editor/lib/document/blocks/shared-fields.js +1 -1
- package/dist/editor/lib/document/box-fields.d.ts +4 -0
- package/dist/editor/lib/document/box-fields.js +1 -1
- package/dist/editor/lib/document/canvas-typing.js +1 -1
- package/dist/editor/lib/document/part-panel-rows.js +1 -1
- package/dist/editor/lib/sections/city-presets.d.ts +4 -0
- package/dist/editor/lib/sections/city-presets.js +1 -0
- package/dist/editor/lib/sections/text-layouts.d.ts +1 -1
- package/dist/editor/lib/sections/text-layouts.js +1 -1
- package/dist/format/lib/content/block-align.d.ts +2 -0
- package/dist/format/lib/content/block-align.js +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +4 -1
- package/dist/format/lib/editor-words-catalogue.js +2 -2
- package/dist/format/lib/source-rules/one-alignment-row.d.ts +9 -0
- package/dist/format/lib/source-rules/one-alignment-row.js +7 -0
- package/dist/format/lib/theme.d.ts +3 -0
- package/dist/format/lib/theme.js +4 -4
- package/dist/render/components/ButtonBlock.d.ts +1 -0
- package/dist/render/components/ButtonBlock.js +1 -1
- package/dist/render/components/Eyebrow.d.ts +2 -1
- package/dist/render/components/Eyebrow.js +1 -1
- package/dist/render/components/Heading.d.ts +2 -4
- package/dist/render/components/Heading.js +1 -1
- package/dist/render/components/LogoBlock.d.ts +1 -0
- package/dist/render/components/LogoBlock.js +1 -1
- package/dist/render/components/PreviewHeaderContext.d.ts +11 -1
- package/dist/render/components/PreviewHeaderContext.js +1 -1
- package/dist/render/components/Split.d.ts +2 -1
- package/dist/render/components/Split.js +1 -1
- package/dist/render/components/Text.d.ts +3 -2
- package/dist/render/components/Text.js +1 -1
- package/dist/render/components/TitleWithButtons.d.ts +2 -1
- package/dist/render/components/TitleWithButtons.js +1 -1
- package/dist/render/lib/document/blocks/general/ButtonBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Eyebrow/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Heading/render.js +1 -1
- package/dist/render/lib/document/blocks/general/LogoBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Split/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
- package/dist/render/lib/document/blocks/general/TitleWithButtons/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.d.ts +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.js +2 -2
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/page-render.js +1 -1
- package/dist/render/lib/document/part-styles.d.ts +1 -0
- package/dist/render/lib/document/part-styles.js +2 -2
- package/dist/render/lib/document/text-parts.d.ts +4 -0
- package/dist/render/lib/document/text-parts.js +1 -1
- package/dist/render/lib/sections/section-to-box.d.ts +5 -3
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/package.json +3 -3
|
@@ -183,3 +183,6 @@ export type ResolvedHeadingTypographyRow = {
|
|
|
183
183
|
heading_3_case: HeadingCase;
|
|
184
184
|
};
|
|
185
185
|
export declare function headingTypographyToRow(v?: HeadingTypographyValue | null): ResolvedHeadingTypographyRow;
|
|
186
|
+
export declare const SITE_THEME_KEY = "siteTheme";
|
|
187
|
+
export declare function siteThemeMetadata(theme: unknown): Record<string, ThemeValue>;
|
|
188
|
+
export declare function siteThemeOf(metadata: Readonly<Record<string, unknown>> | undefined): ThemeValue | undefined;
|
package/dist/format/lib/theme.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import{contrastRatio as
|
|
1
|
+
import{contrastRatio as B,hexToRgb as l,parseHexColor as h,readableInk as X,relativeLuminance as W}from"efficient-shell/format";const K="storefront-theme",Ne="sf:theme-mode",Oe="sf:theme-switch",Le="hide",ke="light",Pe=!1,w=7,y=18;function j(e){return e>=w&&e<y}function $e(e){const{mode:t,override:n,switchShown:r,hour:o}=e;return r&&(n==="light"||n==="dark")?n:t==="auto"?j(o)?"light":"dark":t==="light"?"light":"dark"}function Fe(e){const{mode:t,switchShown:n}=e;return`
|
|
2
2
|
try {
|
|
3
3
|
var mode = ${JSON.stringify(t)};
|
|
4
4
|
var shown = ${n?"true":"false"};
|
|
5
|
-
var override = localStorage.getItem(${JSON.stringify(
|
|
5
|
+
var override = localStorage.getItem(${JSON.stringify(K)});
|
|
6
6
|
var theme;
|
|
7
7
|
if (shown && (override === 'light' || override === 'dark')) {
|
|
8
8
|
theme = override;
|
|
9
9
|
} else if (mode === 'auto') {
|
|
10
10
|
var h = new Date().getHours();
|
|
11
|
-
theme = (h >= ${w} && h < ${
|
|
11
|
+
theme = (h >= ${w} && h < ${y}) ? 'light' : 'dark';
|
|
12
12
|
} else {
|
|
13
13
|
theme = mode === 'light' ? 'light' : 'dark';
|
|
14
14
|
}
|
|
15
15
|
if (theme === 'light') document.documentElement.setAttribute('data-theme', 'light');
|
|
16
16
|
else document.documentElement.removeAttribute('data-theme');
|
|
17
17
|
} catch (e) {}
|
|
18
|
-
`}const a={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},V=[{text:"#2e2e2e",accent:"#2e2e2e",background:"#ffffff",surface:"#f7f7f7",line:"#e0e0e0",muted:"#5c5c5c"},{text:"#f7f7f7",accent:"#f7f7f7",background:"#0a0a0a",surface:"#1b1b1b",line:"#363636",muted:"#a3a3a3"},{text:"#ffffff",accent:"#ffffff",background:"#2e2e2e",surface:"#3d3d3d",line:"#545454",muted:"#b0b0b0"},{text:"#0a0a0a",accent:"#0a0a0a",background:"#f7f7f7",surface:"#ffffff",line:"#d9d9d9",muted:"#5c5c5c"}],j={selected:0,themes:V};function M(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...j}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function x(e,t,n){const r=l(e),o=l(t);if(r===null||o===null)return e;const c=(i,s)=>Math.max(0,Math.min(255,Math.round(i+(s-i)*n))).toString(16).padStart(2,"0");return`#${c(r.r,o.r)}${c(r.g,o.g)}${c(r.b,o.b)}`}const Z={light:"#ffffff",dark:"#0a0a0a"},$e=["light","dark"];function Fe(e,t){const n=Z[t],r=t==="light"?"#ffffff":"#000000";return{text:n,accent:n,background:e,surface:x(e,r,.1),line:x(e,r,.22),muted:x(n,e,.35),brandInk:t}}function u(e){const t=M(e);return t.themes[t.selected]}function f(e){return{text:e.text,accent:e.accent,background:e.background||a.background,surface:e.surface||a.surface,line:e.line||a.line,muted:e.muted||a.muted}}function Ge(e){return{fill:f(e).background,accent:e.accent}}const q=.4,J=4.5,Q=3,Ue={good:"Good","large-only":"Large text only",hard:"Hard to read"};function Ye(e){return e>=J?"good":e>=Q?"large-only":"hard"}const v=["#000000","#ffffff"];function d(e){return B(e,v)}const ee=[.25,.4,.55];function ze(e){const t=l(e);return t===null?[]:ee.map(n=>"#"+[t.r,t.g,t.b].map(r=>Math.round(r*(1-n)).toString(16).padStart(2,"0")).join(""))}function Be(e){const t=u(e),n={"--theme-fg":t.text},r=X(t.text);return(r===null||r>=q)&&(n["--overlay-fg"]=t.text),n}const te=82;function p(e){return`color-mix(in srgb, ${e} ${te}%, #000)`}function Xe(e){const t=u(e);return{"--theme-accent":t.accent,"--theme-accent-2":p(t.accent),"--theme-accent-ink":d(t.accent)}}function _(e){const t=e?.button;return t&&h(t)===t.toLowerCase()?t.toLowerCase():null}function We(e){const t=u(e),n=_(t),r=R(t);if(n===null&&r===null)return{};const o={};return n!==null&&(o["--theme-btn"]=n,o["--theme-btn-2"]=p(n)),o["--theme-btn-ink"]=r??d(n),o}function R(e){const t=e?.buttonInk;return t&&h(t)===t.toLowerCase()?t.toLowerCase():null}function ne(e,t){return R(e)??d(_(e)??t)}function Ke(e){const t=u(e);return{fill:_(t)??t.accent.toLowerCase(),ink:ne(t,t.accent)}}function Ve(e){const t={};return M(e).themes.forEach((n,r)=>{const o=f(n);t[`--theme-preset-${r}-accent`]=o.accent,t[`--theme-preset-${r}-accent-2`]=p(o.accent),t[`--theme-preset-${r}-accent-ink`]=d(o.accent),t[`--theme-preset-${r}-bg`]=o.background,t[`--theme-preset-${r}-fg`]=o.text,t[`--theme-preset-${r}-surface`]=o.surface,t[`--theme-preset-${r}-surface-2`]=`color-mix(in srgb, ${o.surface} 60%, ${o.line})`,t[`--theme-preset-${r}-line`]=o.line,t[`--theme-preset-${r}-muted`]=o.muted}),t}const E=e=>{const t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},S=e=>255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055);function D([e,t,n]){const[r,o,c]=[E(e),E(t),E(n)],i=Math.cbrt(.4122214708*r+.5363325363*o+.0514459929*c),s=Math.cbrt(.2119034982*r+.6806995451*o+.1073969566*c),m=Math.cbrt(.0883024619*r+.2817188376*o+.6299787005*c);return[.2104542553*i+.793617785*s-.0040720468*m,1.9779984951*i-2.428592205*s+.4505937099*m,.0259040371*i+.7827717662*s-.808675766*m]}function re([e,t,n]){const r=(e+.3963377774*t+.2158037573*n)**3,o=(e-.1055613458*t-.0638541728*n)**3,c=(e-.0894841775*t-1.291485548*n)**3;return[S(4.0767416621*r-3.3077115913*o+.2309699292*c),S(-1.2684380046*r+2.6097574011*o-.3413193965*c),S(-.0041960863*r-.7034186147*o+1.707614701*c)]}const A=e=>{const t=l(e);return t===null?[0,0,0]:[t.r,t.g,t.b]},y=(e,t,n)=>[e[0]*n+t[0]*(1-n),e[1]*n+t[1]*(1-n),e[2]*n+t[2]*(1-n)],oe=e=>`#${e.map(t=>Math.max(0,Math.min(255,Math.round(t))).toString(16).padStart(2,"0")).join("")}`;function H(e){const t=f(e),n=y(A(t.surface),A(t.line),.6);return oe(re(y(D(n),D(A(t.text)),.92)))}function je(e){return{...e,background:H(e)}}function Ze(e,t){const n=e[t];if(!n)return-1;const r=H(n);return e.findIndex((o,c)=>c!==t&&h(o.background??"")===r)}const qe=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function Je(e){const t=f(u(e)),n=`color-mix(in srgb, ${t.surface} 60%, ${t.line})`,r={"--theme-bg":t.background,"--theme-surface":t.surface,"--theme-line":t.line,"--theme-muted":t.muted};return(t.surface!==a.surface||t.line!==a.line)&&(r["--theme-surface-2"]=n),r}const ce=["heading","body","label"],Qe={heading:"Headings",body:"Body",label:"Labels"};function ve(e){if(!e)return null;for(const t of ce)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}const N=["headingLarge","headingMedium","headingSmall","accent","body","label"],et={headingLarge:"heading",headingMedium:"heading",headingSmall:"heading",accent:"heading",body:"body",label:"label"},tt={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},ie=8,ae=200;function se(e){if(typeof e!="number"||!Number.isFinite(e))return null;const t=Math.round(e);return t>=ie&&t<=ae?t:null}function ue(e){const t={};for(const n of N)t[n]=se(e?.[n]);return t}function nt(e){const t=ue(e),n={};for(const r of N){const o=t[r];o!==null&&(n[`--size-${r}`]=`${o}px`)}return n}const le=["square","small","large"],he="small";function fe(e){return le.includes(e??"")?e:he}function rt(e){return k(ge[fe(e)])}const O=0,de=40,ge={square:0,small:null,large:16},me={"--sf-card-radius":1,"--sf-button-radius":.5,"--site-radius":.5,"--site-radius-xs":.25,"--site-radius-sm":.5,"--site-radius-md":.75,"--site-radius-lg":1,"--site-radius-xl":1.25,"--site-radius-2xl":1.5,"--site-radius-3xl":2,"--site-radius-4xl":2.5};function L(e){if(e==null||typeof e=="string"&&e.trim()==="")return null;const t=typeof e=="string"?Number(e):e;return Number.isFinite(t)?Math.min(de,Math.max(O,Math.round(t))):null}function k(e){const t=L(e);return t===null?{}:Object.fromEntries(Object.entries(me).map(([n,r])=>{const o=t*r/16;return[n,o===0?"0":`${o}rem`]}))}function ot(e){return k(L(e)??O)}const xe=["none","soft","lifted"],pe="soft",P="none",_e=["tight","normal","roomy"],Ee="normal",Se="normal",Ae=["none","lift","highlight"],Te="lift",be="highlight",$="#141416";function F(e){return xe.includes(e??"")?e:pe}function Ce(e){return _e.includes(e??"")?e:Ee}function G(e){return Ae.includes(e??"")?e:Te}function we(e){return e&&h(e)===e.toLowerCase()?e.toLowerCase():$}function ct(e){const t=F(e);return t===P?void 0:t}function it(e){const t=Ce(e);return t===Se?void 0:t}function at(e){const t=G(e);return t===be?void 0:t}function st(e,t,n){const r=we(t);return r===$?{}:F(e)!==P||G(n)==="lift"?{"--sf-shadow-color":r}:{}}const Ie=["normal","tight","compressed"],U="normal";function Y(e){return Ie.includes(e??"")?e:U}function ut(e){const t=Y(e);return t===U?void 0:t}function lt(e){switch(Y(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}const ht=["authored","sentence"],ft={case:"authored",weight:null,weightStrong:null,italicStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},T=100,b=900,Me=24,Re=200;function g(e,t,n){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),n))}function C(e){const t=g(e?.weight,T,b),n=e?.case==="sentence"?"sentence":"authored",r=c=>c==null?t:g(c,T,b),o=c=>c==="sentence"?"sentence":c==="authored"?"authored":n;return{case:n,weight:t,weightStrong:g(e?.weightStrong,T,b),italicStrong:typeof e?.italicStrong=="boolean"?e.italicStrong:null,maxPx:g(e?.maxPx,Me,Re),weight2:r(e?.weight2),weight3:r(e?.weight3),case2:o(e?.case2),case3:o(e?.case3)}}function dt(e){const t=C(e),n={};return t.case==="sentence"&&(n["--sf-heading-case"]="none"),t.weight!==null&&(n["--sf-heading-weight"]=String(t.weight)),t.weightStrong!==null&&(n["--sf-heading-weight-strong"]=String(t.weightStrong)),t.maxPx!==null&&(n["--sf-heading-max"]=`${t.maxPx}px`),t.weight2!==null&&t.weight2!==t.weight&&(n["--sf-heading-2-weight"]=String(t.weight2)),t.weight3!==null&&t.weight3!==t.weight&&(n["--sf-heading-3-weight"]=String(t.weight3)),t.case2!==t.case&&(n["--sf-heading-2-case"]=t.case2==="sentence"?"none":"uppercase"),t.case3!==t.case&&(n["--sf-heading-3-case"]=t.case3==="sentence"?"none":"uppercase"),n}function gt(e){return C({case:e?.heading_case??void 0,weight:e?.heading_weight,weightStrong:e?.heading_weight_strong,italicStrong:e?.accent_italic,maxPx:e?.heading_max_px,weight2:e?.heading_2_weight??void 0,weight3:e?.heading_3_weight??void 0,case2:e?.heading_2_case??void 0,case3:e?.heading_3_case??void 0})}function mt(e){const t=C(e);return{heading_case:t.case,heading_weight:t.weight,heading_weight_strong:t.weightStrong,heading_max_px:t.maxPx,heading_2_weight:t.weight2,heading_3_weight:t.weight3,heading_2_case:t.case2,heading_3_case:t.case3}}export{ee as ACCENT_DARKEN_STEPS,$e as BRAND_INKS,_e as CARD_GAPS,xe as CARD_SHADOWS,de as CORNER_RADIUS_MAX,O as CORNER_RADIUS_MIN,le as CORNER_STYLES,ge as CORNER_STYLE_TO_PX,Ee as DEFAULT_CARD_GAP,pe as DEFAULT_CARD_SHADOW,he as DEFAULT_CORNER_STYLE,U as DEFAULT_HEADING_COMPRESSION,ft as DEFAULT_HEADING_TYPOGRAPHY,Te as DEFAULT_HOVER_EFFECT,$ as DEFAULT_SHADOW_COLOR,tt as DEFAULT_SIZES,a as DEFAULT_SURFACES,Le as DEFAULT_SWITCH_SHOWN,V as DEFAULT_THEMES,Oe as DEFAULT_THEME_MODE,j as DEFAULT_THEME_VALUE,Ue as GRADE_LABEL,ht as HEADING_CASES,Ie as HEADING_COMPRESSIONS,Re as HEADING_MAX_PX_MAX,Me as HEADING_MAX_PX_MIN,b as HEADING_WEIGHT_MAX,T as HEADING_WEIGHT_MIN,Ae as HOVER_EFFECTS,Se as IDENTITY_CARD_GAP,P as IDENTITY_CARD_SHADOW,be as IDENTITY_HOVER_EFFECT,J as READABILITY_AA,Q as READABILITY_AA_LARGE,et as SCALE_OF_STEP,N as SIZE_STEPS,ae as TEXT_SIZE_MAX,ie as TEXT_SIZE_MIN,I as THEME_DAY_END_HOUR,w as THEME_DAY_START_HOUR,ye as THEME_MODE_KEY,W as THEME_STORAGE_KEY,qe as THEME_SURFACE_KEYS,Ne as THEME_SWITCH_HIDE,He as THEME_SWITCH_KEY,ce as TYPE_GROUPS,Qe as TYPE_GROUP_LABELS,d as accentInk,je as bandPresetFor,Ze as bandPresetIndex,Fe as brandTheme,Pe as buildThemeBootScript,it as cardGapAttr,ct as cardShadowAttr,lt as compressionMetrics,z as contrastRatio,k as cornerRadiusTokens,rt as cornerStyleTokens,ze as darkerAccents,Ye as gradeContrast,ut as headingCompressionAttr,gt as headingTypographyFromRow,dt as headingTypographyStyle,mt as headingTypographyToRow,at as hoverEffectAttr,K as isDayHour,Ce as normalizeCardGap,F as normalizeCardShadow,L as normalizeCornerRadius,fe as normalizeCornerStyle,Y as normalizeHeadingCompression,C as normalizeHeadingTypography,G as normalizeHoverEffect,we as normalizeShadowColor,se as normalizeSize,ue as normalizeSizes,M as normalizeTheme,f as normalizeThemeColors,ke as resolveTheme,ne as resolvedButtonInk,H as sectionBandTone,u as selectedThemeColors,st as shadowColorTokens,Ke as siteButtonPaint,ot as siteCornerRadiusTokens,Xe as themeAccentStyle,_ as themeButtonColour,R as themeButtonInk,We as themeButtonStyle,Be as themeColorStyle,Ve as themePresetAccentVars,Je as themeSurfaceStyle,Ge as themeSwatchColors,ve as typeScaleGroupOfClassName,nt as typeSizesStyle};
|
|
18
|
+
`}const s={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},V=[{text:"#2e2e2e",accent:"#2e2e2e",background:"#ffffff",surface:"#f7f7f7",line:"#e0e0e0",muted:"#5c5c5c"},{text:"#f7f7f7",accent:"#f7f7f7",background:"#0a0a0a",surface:"#1b1b1b",line:"#363636",muted:"#a3a3a3"},{text:"#ffffff",accent:"#ffffff",background:"#2e2e2e",surface:"#3d3d3d",line:"#545454",muted:"#b0b0b0"},{text:"#0a0a0a",accent:"#0a0a0a",background:"#f7f7f7",surface:"#ffffff",line:"#d9d9d9",muted:"#5c5c5c"}],Z={selected:0,themes:V};function M(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...Z}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function p(e,t,n){const r=l(e),o=l(t);if(r===null||o===null)return e;const c=(i,a)=>Math.max(0,Math.min(255,Math.round(i+(a-i)*n))).toString(16).padStart(2,"0");return`#${c(r.r,o.r)}${c(r.g,o.g)}${c(r.b,o.b)}`}const q={light:"#ffffff",dark:"#0a0a0a"},Ge=["light","dark"];function Ue(e,t){const n=q[t],r=t==="light"?"#ffffff":"#000000";return{text:n,accent:n,background:e,surface:p(e,r,.1),line:p(e,r,.22),muted:p(n,e,.35),brandInk:t}}function u(e){const t=M(e);return t.themes[t.selected]}function f(e){return{text:e.text,accent:e.accent,background:e.background||s.background,surface:e.surface||s.surface,line:e.line||s.line,muted:e.muted||s.muted}}function Ye(e){return{fill:f(e).background,accent:e.accent}}const J=.4,Q=4.5,v=3,ze={good:"Good","large-only":"Large text only",hard:"Hard to read"};function Be(e){return e>=Q?"good":e>=v?"large-only":"hard"}const ee=["#000000","#ffffff"];function d(e){return X(e,ee)}const te=[.25,.4,.55];function Xe(e){const t=l(e);return t===null?[]:te.map(n=>"#"+[t.r,t.g,t.b].map(r=>Math.round(r*(1-n)).toString(16).padStart(2,"0")).join(""))}function We(e){const t=u(e),n={"--theme-fg":t.text},r=W(t.text);return(r===null||r>=J)&&(n["--overlay-fg"]=t.text),n}const ne=82;function x(e){return`color-mix(in srgb, ${e} ${ne}%, #000)`}function Ke(e){const t=u(e);return{"--theme-accent":t.accent,"--theme-accent-2":x(t.accent),"--theme-accent-ink":d(t.accent)}}function _(e){const t=e?.button;return t&&h(t)===t.toLowerCase()?t.toLowerCase():null}function je(e){const t=u(e),n=_(t),r=R(t);if(n===null&&r===null)return{};const o={};return n!==null&&(o["--theme-btn"]=n,o["--theme-btn-2"]=x(n)),o["--theme-btn-ink"]=r??d(n),o}function R(e){const t=e?.buttonInk;return t&&h(t)===t.toLowerCase()?t.toLowerCase():null}function re(e,t){return R(e)??d(_(e)??t)}function Ve(e){const t=u(e);return{fill:_(t)??t.accent.toLowerCase(),ink:re(t,t.accent)}}function Ze(e){const t={};return M(e).themes.forEach((n,r)=>{const o=f(n);t[`--theme-preset-${r}-accent`]=o.accent,t[`--theme-preset-${r}-accent-2`]=x(o.accent),t[`--theme-preset-${r}-accent-ink`]=d(o.accent),t[`--theme-preset-${r}-bg`]=o.background,t[`--theme-preset-${r}-fg`]=o.text,t[`--theme-preset-${r}-surface`]=o.surface,t[`--theme-preset-${r}-surface-2`]=`color-mix(in srgb, ${o.surface} 60%, ${o.line})`,t[`--theme-preset-${r}-line`]=o.line,t[`--theme-preset-${r}-muted`]=o.muted}),t}const E=e=>{const t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},S=e=>255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055);function D([e,t,n]){const[r,o,c]=[E(e),E(t),E(n)],i=Math.cbrt(.4122214708*r+.5363325363*o+.0514459929*c),a=Math.cbrt(.2119034982*r+.6806995451*o+.1073969566*c),m=Math.cbrt(.0883024619*r+.2817188376*o+.6299787005*c);return[.2104542553*i+.793617785*a-.0040720468*m,1.9779984951*i-2.428592205*a+.4505937099*m,.0259040371*i+.7827717662*a-.808675766*m]}function oe([e,t,n]){const r=(e+.3963377774*t+.2158037573*n)**3,o=(e-.1055613458*t-.0638541728*n)**3,c=(e-.0894841775*t-1.291485548*n)**3;return[S(4.0767416621*r-3.3077115913*o+.2309699292*c),S(-1.2684380046*r+2.6097574011*o-.3413193965*c),S(-.0041960863*r-.7034186147*o+1.707614701*c)]}const A=e=>{const t=l(e);return t===null?[0,0,0]:[t.r,t.g,t.b]},H=(e,t,n)=>[e[0]*n+t[0]*(1-n),e[1]*n+t[1]*(1-n),e[2]*n+t[2]*(1-n)],ce=e=>`#${e.map(t=>Math.max(0,Math.min(255,Math.round(t))).toString(16).padStart(2,"0")).join("")}`;function N(e){const t=f(e),n=H(A(t.surface),A(t.line),.6);return ce(oe(H(D(n),D(A(t.text)),.92)))}function qe(e){return{...e,background:N(e)}}function Je(e,t){const n=e[t];if(!n)return-1;const r=N(n);return e.findIndex((o,c)=>c!==t&&h(o.background??"")===r)}const Qe=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function ve(e){const t=f(u(e)),n=`color-mix(in srgb, ${t.surface} 60%, ${t.line})`,r={"--theme-bg":t.background,"--theme-surface":t.surface,"--theme-line":t.line,"--theme-muted":t.muted};return(t.surface!==s.surface||t.line!==s.line)&&(r["--theme-surface-2"]=n),r}const ie=["heading","body","label"],et={heading:"Headings",body:"Body",label:"Labels"};function tt(e){if(!e)return null;for(const t of ie)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}const O=["headingLarge","headingMedium","headingSmall","accent","body","label"],nt={headingLarge:"heading",headingMedium:"heading",headingSmall:"heading",accent:"heading",body:"body",label:"label"},rt={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},se=8,ae=200;function ue(e){if(typeof e!="number"||!Number.isFinite(e))return null;const t=Math.round(e);return t>=se&&t<=ae?t:null}function le(e){const t={};for(const n of O)t[n]=ue(e?.[n]);return t}function ot(e){const t=le(e),n={};for(const r of O){const o=t[r];o!==null&&(n[`--size-${r}`]=`${o}px`)}return n}const he=["square","small","large"],fe="small";function de(e){return he.includes(e??"")?e:fe}function ct(e){return P(me[de(e)])}const L=0,ge=40,me={square:0,small:null,large:16},pe={"--sf-card-radius":1,"--sf-button-radius":.5,"--site-radius":.5,"--site-radius-xs":.25,"--site-radius-sm":.5,"--site-radius-md":.75,"--site-radius-lg":1,"--site-radius-xl":1.25,"--site-radius-2xl":1.5,"--site-radius-3xl":2,"--site-radius-4xl":2.5};function k(e){if(e==null||typeof e=="string"&&e.trim()==="")return null;const t=typeof e=="string"?Number(e):e;return Number.isFinite(t)?Math.min(ge,Math.max(L,Math.round(t))):null}function P(e){const t=k(e);return t===null?{}:Object.fromEntries(Object.entries(pe).map(([n,r])=>{const o=t*r/16;return[n,o===0?"0":`${o}rem`]}))}function it(e){return P(k(e)??L)}const xe=["none","soft","lifted"],_e="soft",$="none",Ee=["tight","normal","roomy"],Se="normal",Ae="normal",Te=["none","lift","highlight"],be="lift",Ce="highlight",F="#141416";function G(e){return xe.includes(e??"")?e:_e}function Ie(e){return Ee.includes(e??"")?e:Se}function U(e){return Te.includes(e??"")?e:be}function we(e){return e&&h(e)===e.toLowerCase()?e.toLowerCase():F}function st(e){const t=G(e);return t===$?void 0:t}function at(e){const t=Ie(e);return t===Ae?void 0:t}function ut(e){const t=U(e);return t===Ce?void 0:t}function lt(e,t,n){const r=we(t);return r===F?{}:G(e)!==$||U(n)==="lift"?{"--sf-shadow-color":r}:{}}const ye=["normal","tight","compressed"],Y="normal";function z(e){return ye.includes(e??"")?e:Y}function ht(e){const t=z(e);return t===Y?void 0:t}function ft(e){switch(z(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}const dt=["authored","sentence"],gt={case:"authored",weight:null,weightStrong:null,italicStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},T=100,b=900,Me=24,Re=200;function g(e,t,n){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),n))}function C(e){const t=g(e?.weight,T,b),n=e?.case==="sentence"?"sentence":"authored",r=c=>c==null?t:g(c,T,b),o=c=>c==="sentence"?"sentence":c==="authored"?"authored":n;return{case:n,weight:t,weightStrong:g(e?.weightStrong,T,b),italicStrong:typeof e?.italicStrong=="boolean"?e.italicStrong:null,maxPx:g(e?.maxPx,Me,Re),weight2:r(e?.weight2),weight3:r(e?.weight3),case2:o(e?.case2),case3:o(e?.case3)}}function mt(e){const t=C(e),n={};return t.case==="sentence"&&(n["--sf-heading-case"]="none"),t.weight!==null&&(n["--sf-heading-weight"]=String(t.weight)),t.weightStrong!==null&&(n["--sf-heading-weight-strong"]=String(t.weightStrong)),t.maxPx!==null&&(n["--sf-heading-max"]=`${t.maxPx}px`),t.weight2!==null&&t.weight2!==t.weight&&(n["--sf-heading-2-weight"]=String(t.weight2)),t.weight3!==null&&t.weight3!==t.weight&&(n["--sf-heading-3-weight"]=String(t.weight3)),t.case2!==t.case&&(n["--sf-heading-2-case"]=t.case2==="sentence"?"none":"uppercase"),t.case3!==t.case&&(n["--sf-heading-3-case"]=t.case3==="sentence"?"none":"uppercase"),n}function pt(e){return C({case:e?.heading_case??void 0,weight:e?.heading_weight,weightStrong:e?.heading_weight_strong,italicStrong:e?.accent_italic,maxPx:e?.heading_max_px,weight2:e?.heading_2_weight??void 0,weight3:e?.heading_3_weight??void 0,case2:e?.heading_2_case??void 0,case3:e?.heading_3_case??void 0})}function xt(e){const t=C(e);return{heading_case:t.case,heading_weight:t.weight,heading_weight_strong:t.weightStrong,heading_max_px:t.maxPx,heading_2_weight:t.weight2,heading_3_weight:t.weight3,heading_2_case:t.case2,heading_3_case:t.case3}}const I="siteTheme";function De(e){const t=e;if(!t||typeof t!="object"||!Array.isArray(t.themes)||!t.themes.every(r=>!!r&&typeof r=="object"))return{};const n=typeof t.selected=="number"&&Number.isInteger(t.selected)&&t.selected>=0?t.selected:0;return{[I]:{selected:n,themes:t.themes}}}function _t(e){return De(e?.[I])[I]}export{te as ACCENT_DARKEN_STEPS,Ge as BRAND_INKS,Ee as CARD_GAPS,xe as CARD_SHADOWS,ge as CORNER_RADIUS_MAX,L as CORNER_RADIUS_MIN,he as CORNER_STYLES,me as CORNER_STYLE_TO_PX,Se as DEFAULT_CARD_GAP,_e as DEFAULT_CARD_SHADOW,fe as DEFAULT_CORNER_STYLE,Y as DEFAULT_HEADING_COMPRESSION,gt as DEFAULT_HEADING_TYPOGRAPHY,be as DEFAULT_HOVER_EFFECT,F as DEFAULT_SHADOW_COLOR,rt as DEFAULT_SIZES,s as DEFAULT_SURFACES,Pe as DEFAULT_SWITCH_SHOWN,V as DEFAULT_THEMES,ke as DEFAULT_THEME_MODE,Z as DEFAULT_THEME_VALUE,ze as GRADE_LABEL,dt as HEADING_CASES,ye as HEADING_COMPRESSIONS,Re as HEADING_MAX_PX_MAX,Me as HEADING_MAX_PX_MIN,b as HEADING_WEIGHT_MAX,T as HEADING_WEIGHT_MIN,Te as HOVER_EFFECTS,Ae as IDENTITY_CARD_GAP,$ as IDENTITY_CARD_SHADOW,Ce as IDENTITY_HOVER_EFFECT,Q as READABILITY_AA,v as READABILITY_AA_LARGE,nt as SCALE_OF_STEP,I as SITE_THEME_KEY,O as SIZE_STEPS,ae as TEXT_SIZE_MAX,se as TEXT_SIZE_MIN,y as THEME_DAY_END_HOUR,w as THEME_DAY_START_HOUR,Ne as THEME_MODE_KEY,K as THEME_STORAGE_KEY,Qe as THEME_SURFACE_KEYS,Le as THEME_SWITCH_HIDE,Oe as THEME_SWITCH_KEY,ie as TYPE_GROUPS,et as TYPE_GROUP_LABELS,d as accentInk,qe as bandPresetFor,Je as bandPresetIndex,Ue as brandTheme,Fe as buildThemeBootScript,at as cardGapAttr,st as cardShadowAttr,ft as compressionMetrics,B as contrastRatio,P as cornerRadiusTokens,ct as cornerStyleTokens,Xe as darkerAccents,Be as gradeContrast,ht as headingCompressionAttr,pt as headingTypographyFromRow,mt as headingTypographyStyle,xt as headingTypographyToRow,ut as hoverEffectAttr,j as isDayHour,Ie as normalizeCardGap,G as normalizeCardShadow,k as normalizeCornerRadius,de as normalizeCornerStyle,z as normalizeHeadingCompression,C as normalizeHeadingTypography,U as normalizeHoverEffect,we as normalizeShadowColor,ue as normalizeSize,le as normalizeSizes,M as normalizeTheme,f as normalizeThemeColors,$e as resolveTheme,re as resolvedButtonInk,N as sectionBandTone,u as selectedThemeColors,lt as shadowColorTokens,Ve as siteButtonPaint,it as siteCornerRadiusTokens,De as siteThemeMetadata,_t as siteThemeOf,Ke as themeAccentStyle,_ as themeButtonColour,R as themeButtonInk,je as themeButtonStyle,We as themeColorStyle,Ze as themePresetAccentVars,ve as themeSurfaceStyle,Ye as themeSwatchColors,tt as typeScaleGroupOfClassName,ot as typeSizesStyle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import{buttonArrowShown as L}from"../../format/lib/content/button-arrow.js";import{buttonIconAtEnd as N,buttonIconSide as S,buttonWidthClass as T,storedButtonIcon as j}from"../../format/lib/content/button-icon.js";import{buttonPadAttrs as _,buttonPaint as v}from"../lib/content/button-look.js";import{ArrowLongRightIcon as O,ArrowRightIcon as F,ArrowUpRightIcon as G,BagIcon as R,CarIcon as U,CartIcon as $,ChevronRightIcon as E,DownloadIcon as K,EmailIcon as Y,ExternalIcon as z,LocationIcon as D,PlayIcon as H,SearchIcon as J,TagIcon as W}from"efficient-shell/icons/efficient";import q from"./BlockFrame.js";import M from"./Btn.js";import{renderGold as Q}from"./goldPhrases.js";import{alignPhoneClass as g,BLOCK_ALIGN_JUSTIFY as V}from"../../format/lib/content/block-align.js";const X="sf-button-block",Z={"arrow-right":F,"arrow-long-right":O,"arrow-up-right":G,"chevron-right":E,external:z,cart:$,bag:R,tag:W,email:Y,location:D,play:H,download:K,search:J,car:U};function oo(r){const{label:p,href:w,variant:c,align:a,alignPhone:i,contained:I,arrow:b,icon:C,iconPosition:s,widthFit:l,widthFitPhone:y,buttonColor:o,buttonTextColor:d}=r,t=j(C),h=t&&t!=="none"?Z[t]:void 0,B=t===void 0?L(b)?{}:{arrow:null}:h?{arrow:n(h,{size:16}),...S(s)==="before"?{glyphBefore:!0}:{}}:{arrow:null},m=_(r),u=[T(l,y),m?.className??""].filter(Boolean).join(" "),P=u?{className:u}:{},x=N(s,l)?{spread:!0}:{},e=v(r),A=e?e.background==="transparent"?"ghost":"primary":c,f={...e??(o?c==="ghost"?{borderColor:o}:{background:o,borderColor:o}:{}),...d?{color:d}:{},...m?.style??{}},k=Object.keys(f).length?{style:f}:{};return n(q,{contained:I,className:`${X} py-4`,children:n("div",{className:`flex ${V[a]}${g("justify",a,i)?` ${g("justify",a,i)}`:""}`,children:n(M,{href:w||"#",variant:A,...P,...x,...B,...k,children:Q(p)})})})}export{X as BUTTON_BLOCK_CLASS,oo as default};
|
|
@@ -4,6 +4,7 @@ export declare const ALIGN_JUSTIFY: Record<HeroCopyAlignment, string>;
|
|
|
4
4
|
export interface EyebrowProps {
|
|
5
5
|
text: string;
|
|
6
6
|
align?: HeroCopyAlignment;
|
|
7
|
+
alignPhone?: unknown;
|
|
7
8
|
look?: SectionEyebrowLook;
|
|
8
9
|
}
|
|
9
|
-
export default function Eyebrow({ text, align, look, }: EyebrowProps): import("react").JSX.Element;
|
|
10
|
+
export default function Eyebrow({ text, align, alignPhone, look, }: EyebrowProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as f}from"react/jsx-runtime";import i from"./SectionEyebrow.js";import{DEFAULT_EYEBROW_BLOCK_LOOK as n}from"../../format/lib/sections/section-eyebrow-look.js";import{alignPhoneClass as s}from"../../format/lib/content/block-align.js";const m={left:"",center:"justify-center",right:"justify-end"};function l({text:o,align:t="left",alignPhone:r,look:e=n}){return f(i,{text:o,look:e,classNameAfter:e==="line"?[m[t],s("justify",t,r)].filter(Boolean).join(" "):""})}export{m as ALIGN_JUSTIFY,l as default};
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import type { PadValues } from "../lib/content/section-padding.js";
|
|
2
2
|
import type { CSSProperties } from "react";
|
|
3
|
-
import type { BlockAlign as Align } from "../../format/lib/content/block-align.js";
|
|
4
3
|
export type HeadingLevel = "1" | "2" | "3" | "4" | "5" | "6";
|
|
5
4
|
type Level = HeadingLevel;
|
|
6
5
|
interface HeadingProps {
|
|
7
6
|
pad?: PadValues;
|
|
8
7
|
level: Level;
|
|
9
8
|
text: string;
|
|
10
|
-
align: Align;
|
|
11
9
|
contained: boolean;
|
|
12
10
|
hero?: boolean;
|
|
13
11
|
}
|
|
14
12
|
export declare function headingDefaultPx(level: HeadingLevel, width?: number): number;
|
|
15
|
-
export declare function headingLook(level: Level,
|
|
13
|
+
export declare function headingLook(level: Level, face?: string): {
|
|
16
14
|
className: string;
|
|
17
15
|
style: CSSProperties;
|
|
18
16
|
};
|
|
19
|
-
export default function Heading({ level, text,
|
|
17
|
+
export default function Heading({ level, text, contained, hero, pad }: HeadingProps): import("react").JSX.Element;
|
|
20
18
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as l}from"react/jsx-runtime";import{resolveTypeSize as r}from"../../format/lib/content/section-type-size.js";import h from"./BlockFrame.js";import{renderHeadline as o}from"./goldPhrases.js";const g={1:{size:"clamp(48px,7vw,96px)",role:"heading",step:"headingLarge",leading:"leading-[0.95]"},2:{size:"64px",sizeMobile:"36px",role:"heading",step:"headingMedium",rank:2,leading:"leading-none"},3:{size:"40px",sizeMobile:"28px",role:"heading",step:"headingSmall",rank:3,leading:"leading-[1.05]"},4:{size:"28px",role:"heading",step:"headingSmall",rank:3,leading:"leading-[1.1]"},5:{size:"22px",role:"body",step:"body",leading:"leading-[1.2]"},6:{size:"18px",role:"body",step:"body",leading:"leading-[1.3]"}};function b(a,n=1440){const e=g[a].size,i=/^clamp\((\d+(?:\.\d+)?)px,(\d+(?:\.\d+)?)vw,(\d+(?:\.\d+)?)px\)$/.exec(e);return i?Math.min(Number(i[3]),Math.max(Number(i[1]),Number(i[2])*n/100)):Number.parseFloat(e)}const m="font-display font-medium leading-[0.92] tracking-[-0.04em] text-[length:min(var(--size-headingLarge,clamp(64px,9vw,144px)),var(--sf-heading-max,9999px))] max-[800px]:text-[length:min(var(--size-headingMedium,clamp(48px,12vw,76px)),var(--sf-heading-max,9999px))] max-[800px]:leading-[0.95]";function x(a,n="font-display"){const e=g[a],i=r(void 0,e.size,e.role,e.step),s=e.sizeMobile?r(void 0,e.sizeMobile,e.role,e.step):void 0,d={"--heading-size":i,...s?{"--heading-size-m":s}:{}},t=e.rank===2?"[font-weight:var(--sf-heading-2-weight,var(--sf-heading-weight,500))]":e.rank===3?"[font-weight:var(--sf-heading-3-weight,var(--sf-heading-weight,500))]":"[font-weight:var(--sf-heading-weight,500)]",p=["text-[length:var(--heading-size)]",e.leading,s?"max-[800px]:text-[length:var(--heading-size-m)]":""].filter(Boolean).join(" ");return{className:`${n} ${t} tracking-[-0.03em] text-fg ${p} text-left`,style:d}}function f({level:a,text:n,contained:e,hero:i=!1,pad:s}){if(i)return l("h1",{className:m,children:o(n,!1)});const d=`h${a}`,t=x(a);return l(h,{contained:e,className:"py-6",pad:s?{values:s,frame:24}:void 0,children:l(d,{className:t.className,style:t.style,children:o(n,!1)})})}export{f as default,b as headingDefaultPx,x as headingLook};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as r}from"react/jsx-runtime";import{useContext as g}from"react";import{SiteLink as
|
|
1
|
+
"use client";import{jsx as r}from"react/jsx-runtime";import{useContext as g}from"react";import{SiteLink as h}from"../lib/site-runtime.js";import C,{FOOTER_LOGO_PX as I,WORDMARK_FIT_FLOOR_PX as O}from"./Logo.js";import{media as _}from"../lib/media.js";import{BoxSurfaceContext as N}from"./BoxSurfaceContext.js";import{useBoxCellHasWidth as B}from"./BoxCellWidthContext.js";import{useInSiteHeader as D}from"./PhoneMenuTools.js";import{useSiteLogo as H}from"./SiteLogoContext.js";import{useLogoWall as W}from"./LogoWallContext.js";import{LogoWallMark as j}from"./Logos.js";import{alignPhoneClass as u,BLOCK_ALIGN_JUSTIFY as y}from"../../format/lib/content/block-align.js";function F(t){const e=W();if(!e)return r(T,{...t});const n=(t.src??"").trim();return r("div",{className:"text-center",children:r(j,{src:n||void 0,alt:t.alt,look:e.look,logoHeight:e.logoHeight,grayscale:e.grayscale})})}function T({src:t,alt:e,href:n,heightPx:x=I,reverse:p=!0,align:i,alignPhone:c,color:L=null}){const s=H(),m=(t??"").trim(),l=m?{src:_(m),reversedSrc:null,inkIsDark:null,wordmark:e?.trim()||null}:{src:s.src,reversedSrc:s.reversedSrc,inkIsDark:s.inkIsDark,wordmark:s.wordmark},w=g(N),f=D(),S=B(),o=!f&&S,a=r(C,{variant:"footer",sizePx:x,src:l.src,reverse:p,color:L,reversedSrc:l.reversedSrc,inkIsDark:l.inkIsDark,wordmark:l.wordmark,siteName:s.siteName,fitToContainer:f,fitWordmarkToContainer:o,fitFloorPx:o?O:void 0,...w?.dark?{onLightSurface:!1}:{}}),d=o?"inline-flex max-w-full overflow-x-clip":"inline-flex",k=n?r(h,{href:n,className:d,children:a}):o?r("span",{className:d,children:a}):a;if(!i&&!o&&!u("justify",i,c))return k;const v=["flex min-w-0",i?y[i]:"",u("justify",i,c),o?"[container-type:inline-size]":""].filter(Boolean).join(" ");return r("div",{className:v,children:k})}export{F as default};
|
|
@@ -17,6 +17,7 @@ type Ctx = {
|
|
|
17
17
|
themeSwitchShown: boolean;
|
|
18
18
|
setThemeSwitchShown: (shown: boolean) => void;
|
|
19
19
|
theme: ThemeValue;
|
|
20
|
+
themeRow: ThemeRow;
|
|
20
21
|
setTheme: (v: ThemeValue) => void;
|
|
21
22
|
fonts: FontsValue;
|
|
22
23
|
setFonts: (v: FontsValue) => void;
|
|
@@ -58,7 +59,7 @@ type Ctx = {
|
|
|
58
59
|
themeFromDocument: boolean;
|
|
59
60
|
};
|
|
60
61
|
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, sectionBackgroundWidth, onSectionBackgroundWidthChange, sectionContentWidth, onSectionContentWidthChange, photographyGrayscale, onPhotographyGrayscaleChange, shareButtonOnPosts, onShareButtonOnPostsChange, themeFromDocument, }: {
|
|
62
|
+
export declare function PreviewHeaderProvider({ children, websiteName, templateChrome, templateName, chromePlaceholder, themeMode, onThemeModeChange, themeSwitchShown, onThemeSwitchShownChange, theme, themeRow, 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
63
|
children: ReactNode;
|
|
63
64
|
websiteName?: string | null;
|
|
64
65
|
templateChrome?: boolean;
|
|
@@ -69,6 +70,7 @@ export declare function PreviewHeaderProvider({ children, websiteName, templateC
|
|
|
69
70
|
themeSwitchShown?: boolean;
|
|
70
71
|
onThemeSwitchShownChange?: (shown: boolean) => void;
|
|
71
72
|
theme?: ThemeValue;
|
|
73
|
+
themeRow?: ThemeRow;
|
|
72
74
|
onThemeChange?: (v: ThemeValue) => void;
|
|
73
75
|
fonts?: FontsValue;
|
|
74
76
|
onFontsChange?: (v: FontsValue) => void;
|
|
@@ -110,4 +112,12 @@ export declare function PreviewHeaderProvider({ children, websiteName, templateC
|
|
|
110
112
|
themeFromDocument?: boolean;
|
|
111
113
|
}): import("react").JSX.Element;
|
|
112
114
|
export declare const usePreviewHeader: () => Ctx;
|
|
115
|
+
export type ThemeRow = "none" | "loading" | "read";
|
|
116
|
+
export declare function siteThemeRow(hasSiteTheme: boolean, readFor: string | null, target: string): ThemeRow;
|
|
117
|
+
export type SiteThemeHold = {
|
|
118
|
+
value: ThemeValue;
|
|
119
|
+
readFor: string | null;
|
|
120
|
+
};
|
|
121
|
+
export declare function themeSeeded(value: ThemeValue, target: string): SiteThemeHold;
|
|
122
|
+
export declare function themeEdited(hold: SiteThemeHold, value: ThemeValue, target: string): SiteThemeHold;
|
|
113
123
|
export declare function useSiteContentWidth(): "full" | "content" | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as U}from"react/jsx-runtime";import{createContext as Bt,useCallback as e,useContext as Mt,useMemo as
|
|
1
|
+
"use client";import{jsx as U}from"react/jsx-runtime";import{createContext as Bt,useCallback as e,useContext as Mt,useMemo as Nt,useState as Yt}from"react";import{EditorSiteLogoContext as jt}from"./SiteLogoContext.js";import{IDENTITY_CARD_GAP as R,DEFAULT_HEADING_COMPRESSION as O,DEFAULT_HEADING_TYPOGRAPHY as g,DEFAULT_SIZES as B,DEFAULT_SWITCH_SHOWN as M,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=Bt({settings:null,setSettings:()=>{},primeSettings:()=>{},websiteName:null,templateChrome:!1,templateName:null,chromePlaceholder:!1,themeMode:N,setThemeMode:()=>{},themeSwitchShown:M,setThemeSwitchShown:()=>{},theme:Y,themeRow:"none",setTheme:()=>{},fonts:j,setFonts:()=>{},sizes:B,setSizes:()=>{},cornerRadiusPx:null,setCornerRadiusPx:()=>{},cardShadow:null,setCardShadow:()=>{},shadowColor:null,setShadowColor:()=>{},cardGap:R,setCardGap:()=>{},hoverEffect:null,setHoverEffect:()=>{},headingCompression:O,setHeadingCompression:()=>{},siteWidth:null,setSiteWidth:()=>{},siteGutter:null,blockGap:null,setSiteGutter:()=>{},setBlockGap:()=>{},headingTypography:g,setHeadingTypography:()=>{},textStyles:null,setTextStyles:()=>{},wordStyles:null,heroBackgroundFollowsWidth:null,setHeroBackgroundFollowsWidth:()=>{},sectionBackgroundWidth:null,setSectionBackgroundWidth:()=>{},sectionContentWidth:null,setSectionContentWidth:()=>{},photographyGrayscale:null,setPhotographyGrayscale:()=>{},shareButtonOnPosts:null,setShareButtonOnPosts:()=>{},themeFromDocument:!1});function Kt({children:o,websiteName:s=null,templateChrome:l=!1,templateName:r=null,chromePlaceholder:u=!1,themeMode:b=N,onThemeModeChange:i,themeSwitchShown:V=M,onThemeSwitchShownChange:c,theme:Z=Y,themeRow:q="none",onThemeChange:d,fonts:J=j,onFontsChange:S,sizes:K=B,onSizesChange:a,cornerRadiusPx:Q=null,onCornerRadiusPxChange:p,cardShadow:X=null,onCardShadowChange:m,shadowColor:$=null,onShadowColorChange:f,cardGap:C=R,onCardGapChange:E,hoverEffect:tt=null,onHoverEffectChange:h,headingCompression:et=O,onHeadingCompressionChange:T,siteWidth:st=null,onSiteWidthChange:x,siteGutter:ot=null,blockGap:lt=null,onSiteGutterChange:w,onBlockGapChange:D,headingTypography:nt=g,onHeadingTypographyChange:F,textStyles:rt=null,onTextStylesChange:_,wordStyles:ut=null,heroBackgroundFollowsWidth:it=null,onHeroBackgroundFollowsWidthChange:H,sectionBackgroundWidth:ct=null,onSectionBackgroundWidthChange:P,sectionContentWidth:dt=null,onSectionContentWidthChange:A,photographyGrayscale:St=null,onPhotographyGrayscaleChange:k,shareButtonOnPosts:at=null,onShareButtonOnPostsChange:v,themeFromDocument:pt=!1}){const[n,G]=Yt(null),mt=e(t=>G(gt=>gt??t),[]),ft=e(t=>i?.(t),[i]),Et=e(t=>c?.(t),[c]),ht=e(t=>d?.(t),[d]),Tt=e(t=>S?.(t),[S]),xt=e(t=>a?.(t),[a]),wt=e(t=>x?.(t),[x]),Dt=e(t=>w?.(t),[w]),Ft=e(t=>D?.(t),[D]),_t=e(t=>H?.(t),[H]),Ht=e(t=>P?.(t),[P]),Pt=e(t=>A?.(t),[A]),At=e(t=>k?.(t),[k]),kt=e(t=>v?.(t),[v]),vt=e(t=>p?.(t),[p]),Gt=e(t=>m?.(t),[m]),Wt=e(t=>f?.(t),[f]),yt=e(t=>E?.(t),[E]),It=e(t=>h?.(t),[h]),Lt=e(t=>T?.(t),[T]),Ut=e(t=>F?.(t),[F]),Rt=e(t=>_?.(t),[_]),W=n?.logoUrl,y=n?.logoReversed,I=n?.logoInkIsDark,L=n!==null,Ot=Nt(()=>({logo:L?{logoUrl:W,logoReversed:y,logoInkIsDark:I}:null,placeholder:l||u,wordmark:l?r:s}),[L,W,y,I,l,u,r,s]);return U(jt.Provider,{value:Ot,children:U(z.Provider,{value:{settings:n,setSettings:G,primeSettings:mt,websiteName:s,templateChrome:l,templateName:r,chromePlaceholder:u,themeMode:b,setThemeMode:ft,themeSwitchShown:V,setThemeSwitchShown:Et,theme:Z,themeRow:q,setTheme:ht,fonts:J,setFonts:Tt,sizes:K,setSizes:xt,cornerRadiusPx:Q,setCornerRadiusPx:vt,cardShadow:X,setCardShadow:Gt,shadowColor:$,setShadowColor:Wt,cardGap:C,setCardGap:yt,hoverEffect:tt,setHoverEffect:It,headingCompression:et,setHeadingCompression:Lt,siteWidth:st,setSiteWidth:wt,siteGutter:ot,blockGap:lt,setSiteGutter:Dt,setBlockGap:Ft,headingTypography:nt,setHeadingTypography:Ut,textStyles:rt,setTextStyles:Rt,wordStyles:ut,heroBackgroundFollowsWidth:it,setHeroBackgroundFollowsWidth:_t,sectionBackgroundWidth:ct,setSectionBackgroundWidth:Ht,sectionContentWidth:dt,setSectionContentWidth:Pt,photographyGrayscale:St,setPhotographyGrayscale:At,shareButtonOnPosts:at,setShareButtonOnPosts:kt,themeFromDocument:pt},children:o})})}const zt=()=>Mt(z);function Qt(o,s,l){return o?s===l?"read":"loading":"none"}function Xt(o,s){return{value:o,readFor:s}}function $t(o,s,l){return{value:s,readFor:o.readFor===l?l:null}}function Ct(){const{sectionContentWidth:o,themeFromDocument:s}=zt();return s?null:o}export{z as PreviewHeaderContext,Kt as PreviewHeaderProvider,Qt as siteThemeRow,$t as themeEdited,Xt as themeSeeded,zt as usePreviewHeader,Ct as useSiteContentWidth};
|
|
@@ -13,6 +13,7 @@ interface Props {
|
|
|
13
13
|
reverse?: boolean;
|
|
14
14
|
uppercase?: boolean;
|
|
15
15
|
textAlign?: "left" | "center" | "right";
|
|
16
|
+
textAlignPhone?: unknown;
|
|
16
17
|
textBgSrc?: string;
|
|
17
18
|
textBgLabel?: string;
|
|
18
19
|
textBgTint?: number;
|
|
@@ -30,5 +31,5 @@ interface Props {
|
|
|
30
31
|
grayscale?: boolean;
|
|
31
32
|
fillHeight?: boolean;
|
|
32
33
|
}
|
|
33
|
-
export default function Split({ imageLabel, imageSrc, imageTint, imageObjectPosition, eyebrow, title, body, cta, reverse, uppercase, textAlign, textBgSrc, textBgLabel, textBgTint, textBgObjectPosition, featureBar, imageButton, grayscale, fillHeight, }: Props): import("react").JSX.Element;
|
|
34
|
+
export default function Split({ imageLabel, imageSrc, imageTint, imageObjectPosition, eyebrow, title, body, cta, reverse, uppercase, textAlign, textAlignPhone, textBgSrc, textBgLabel, textBgTint, textBgObjectPosition, featureBar, imageButton, grayscale, fillHeight, }: Props): import("react").JSX.Element;
|
|
34
35
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{alignPhoneClass as U,blockAlignOf as A}from"../../format/lib/content/block-align.js";import{SiteLink as j}from"../lib/site-runtime.js";import F from"./Btn.js";import{resolveImageTreatment as G}from"../../format/lib/content/image-treatment.js";import $ from"./Placeholder.js";import{useSitePhotography as H}from"./SitePhotographyContext.js";import X from"./SectionEyebrow.js";import{renderGold as i,renderHeadline as D,splitParagraphs as K}from"./goldPhrases.js";import{ON_MEDIA_INK_STYLE as R}from"../../format/lib/content/ink.js";import{scrim as Y}from"../../format/lib/content/scrim.js";import{SECTION_FILL_CLASS as Z}from"../../format/lib/content/section-min-height.js";const r={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)]"},k={words:{left:"min-[961px]:pl-[max(60px,calc(100%_-_var(--sf-content-cap,200%)/2_+_60px))]",right:"min-[961px]:pr-[max(60px,calc(100%_-_var(--sf-content-cap,200%)/2_+_60px))]"},buttons:{left:"min-[961px]:pl-[max(var(--sf-site-gutter,40px),calc(100%_-_var(--sf-content-cap,200%)/2_+_var(--sf-site-gutter,40px)))]",right:"min-[961px]:pr-[max(var(--sf-site-gutter,40px),calc(100%_-_var(--sf-content-cap,200%)/2_+_var(--sf-site-gutter,40px)))]"}};function q({imageLabel:x,imageSrc:m,imageTint:d=.4,imageObjectPosition:T,eyebrow:f,title:h,body:g,cta:o,reverse:n=!1,uppercase:z=!1,textAlign:b="left",textAlignPhone:v,textBgSrc:p,textBgLabel:E,textBgTint:u=.6,textBgObjectPosition:L,featureBar:a,imageButton:s,grayscale:w,fillHeight:I=!1}){const y=G(w,H()),_={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"}},c=_[b]??_.left,P={left:{items:"max-[720px]:items-stretch",cta:"max-[720px]:self-start"},center:{items:"max-[720px]:items-center",cta:"max-[720px]:self-center"},right:{items:"max-[720px]:items-end",cta:"max-[720px]:self-end"}},N=U("text",b,v),l=N?{...P[A(v)??"left"],text:N}:void 0,S=n?"right":"left",M=n?"left":"right";return e("section",{className:"relative z-[2] bg-bg p-0",children:t("div",{className:["grid min-h-[72vh] grid-cols-2 border-t border-b border-line","max-[960px]:grid-cols-1","max-[960px]:min-h-0",n?"min-[961px]:[direction:rtl]":"",...I?[Z]:[]].join(" "),children:[t("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:n?{borderLeft:"1px solid var(--site-line)"}:{borderRight:"1px solid var(--site-line)"},children:[e($,{label:x,src:m,objectPosition:T,treatment:y}),m&&d>0&&e("div",{className:"absolute inset-0",style:{background:`rgba(0,0,0,${d})`}}),(a||s)&&t("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))] ${k.buttons[S]}`,children:[a&&t(j,{href:a.href,className:`pointer-events-auto inline-flex items-center justify-center gap-3 border px-7 py-4 font-mono ${r.label} uppercase tracking-[0.18em] backdrop-blur-sm transition-colors max-[800px]:gap-2 max-[800px]:px-5 max-[800px]:py-3 ${r.labelUpTo800}`,style:{borderColor:"color-mix(in srgb, var(--overlay-fg) 30%, transparent)",color:"color-mix(in srgb, var(--overlay-fg) 85%, transparent)",background:Y(.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")})]}),s&&t(j,{href:s.href,className:`pointer-events-auto inline-flex items-center justify-center gap-2 border px-7 py-4 font-mono ${r.label} uppercase tracking-[0.18em] backdrop-blur-sm transition-colors hover:bg-[color-mix(in_srgb,var(--overlay-fg)_10%,transparent)] max-[800px]:gap-2 max-[800px]:px-5 max-[800px]:py-3 ${r.labelUpTo800}`,style:{borderColor:"color-mix(in srgb, var(--overlay-fg) 50%, transparent)",color:"color-mix(in srgb, var(--overlay-fg) 95%, transparent)",background:"transparent"},children:[e("span",{children:i(s.text??"Learn more")}),e("span",{"aria-hidden":!0,children:"→"})]})]})]}),t("div",{className:"relative overflow-hidden [direction:ltr] max-[960px]:order-1",children:[p&&t("div",{className:"absolute inset-0","aria-hidden":!0,children:[e($,{label:E??x,src:p,objectPosition:L,treatment:y}),u>0&&e("div",{className:"absolute inset-0",style:{background:`rgba(0,0,0,${u})`}})]}),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] ${k.words[M]}`,style:p?R:void 0,children:t("div",{className:["flex flex-1 flex-col justify-center gap-6",c.items,c.text,l?.items,l?.text].filter(Boolean).join(" "),children:[f&&e(X,{text:f,size:14}),h&&e("h2",{className:[`font-heading2 ${r.headingMedium} font-normal leading-[1.05] tracking-[-0.03em]`,`${r.headingMediumUpTo800} max-[800px]:leading-[1]`,z?"uppercase":""].join(" "),children:D(h,!1)}),g&&K(g).map((C,O)=>e("p",{className:[`max-w-[520px] ${r.body} leading-[1.7]`,"text-fg-dim"].join(" "),children:i(C)},O)),o.text&&e("div",{className:`mt-2 ${c.cta}${l?` ${l.cta}`:""}`,children:e(F,{href:o.href,variant:"primary",children:i(o.text)})})]})})]})]})})}export{q as default};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { PadValues } from "../lib/content/section-padding.js";
|
|
2
2
|
import { type HeadingLevel } from "./Heading.js";
|
|
3
|
-
import type
|
|
3
|
+
import { type BlockAlign as Align } from "../../format/lib/content/block-align.js";
|
|
4
4
|
type Tone = "default" | "dim";
|
|
5
5
|
interface TextProps {
|
|
6
6
|
pad?: PadValues;
|
|
7
7
|
text: string;
|
|
8
8
|
align: Align;
|
|
9
|
+
alignPhone?: unknown;
|
|
9
10
|
tone: Tone;
|
|
10
11
|
tag?: string;
|
|
11
12
|
textStyle?: string;
|
|
@@ -13,5 +14,5 @@ interface TextProps {
|
|
|
13
14
|
hero?: boolean;
|
|
14
15
|
}
|
|
15
16
|
export declare function headingLevelOfStyle(id: string): HeadingLevel;
|
|
16
|
-
export default function Text({ text, align, tone, contained, hero, pad, tag, textStyle }: TextProps): import("react").JSX.Element;
|
|
17
|
+
export default function Text({ text, align, alignPhone, tone, contained, hero, pad, tag, textStyle }: TextProps): import("react").JSX.Element;
|
|
17
18
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as a}from"react/jsx-runtime";import
|
|
1
|
+
import{jsx as a}from"react/jsx-runtime";import x from"./BlockFrame.js";import{renderGold as d,renderHeadline as b,splitParagraphs as N}from"./goldPhrases.js";import{headingLook as T}from"./Heading.js";import{alignPhoneClass as $}from"../../format/lib/content/block-align.js";import{textTagOf as v}from"../../format/lib/content/text-tag.js";import{isTextStyleId as S}from"../lib/document/part-styles.js";import{faceClassOf as h}from"../../format/lib/text-style-face.js";const s={bodyUpTo800:"max-[800px]:text-[length:var(--size-body,14px)]",bodySmall:"text-[length:var(--size-body,15px)]",bodyLarge:"text-[length:var(--size-body,17px)]",label:"text-[length:var(--size-label,13px)]"};function L(e,l){const n=$("place",e,l);return n?` ${n}`:""}const O={left:"text-left",center:"text-left mx-auto",right:"text-left ml-auto"},z=`max-w-[380px] ${s.bodySmall} leading-[1.5] opacity-80 ${s.bodyUpTo800}`,C={default:"text-fg",dim:"text-fg-dim"};function E(e){return String(Math.min(Number(e.slice(8)),6))}function k({text:e,align:l,alignPhone:n,tone:g,contained:c,hero:u=!1,pad:r,tag:y,textStyle:f}){if(u)return a("p",{className:z,children:d(e)});const t=S(f)?f:void 0,p=`${t?`${h({id:t})} `:""}max-w-[680px] whitespace-pre-line ${t==="body-5"?s.label:s.bodyLarge} leading-[1.7] ${O[l]}${L(l,n)} ${C[g]}`,i=v(y);if(t?.startsWith("heading-")){const m=E(t),o=T(m,h({id:t}));return a(x,{contained:c,className:"py-6",pad:r?{values:r,frame:24}:void 0,children:a(i,{className:o.className,style:o.style,children:b(e.trim(),!1)})})}return a(x,{contained:c,className:"py-4",pad:r?{values:r,frame:16}:void 0,children:i==="p"?N(e).map((m,o)=>a("p",{className:p,children:d(m)},o)):a(i,{className:p,children:d(e.trim())})})}export{k as default,E as headingLevelOfStyle};
|
|
@@ -9,6 +9,7 @@ export interface TitleWithButtonsProps {
|
|
|
9
9
|
padTop?: number;
|
|
10
10
|
padBottom?: number;
|
|
11
11
|
buttonsAlign?: "left" | "center" | "right";
|
|
12
|
+
buttonsAlignPhone?: unknown;
|
|
12
13
|
editing?: boolean;
|
|
13
14
|
}
|
|
14
|
-
export default function TitleWithButtons({ title, buttons, padTop, padBottom, buttonsAlign, editing, }?: TitleWithButtonsProps): import("react").JSX.Element | null;
|
|
15
|
+
export default function TitleWithButtons({ title, buttons, padTop, padBottom, buttonsAlign, buttonsAlignPhone, editing, }?: TitleWithButtonsProps): import("react").JSX.Element | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as r,jsxs as p}from"react/jsx-runtime";import{alignPhoneClass as w}from"../../format/lib/content/block-align.js";import{SiteLink as y}from"../lib/site-runtime.js";import{renderHeadline as j}from"./goldPhrases.js";import{say as N}from"../../format/lib/editor-words.js";function k({title:s,buttons:m,padTop:o,padBottom:x,buttonsAlign:n,buttonsAlignPhone:d,editing:l=!1}={}){const f=typeof o=="number"?o:140,c=typeof x=="number"?x:140,i=(m??[]).filter(t=>l||(t.label??"").trim()),e=!!(s??"").trim(),a=!e&&(n==="center"||n==="left")?n:null,g=e?"":w("items",a??"right",d);return!l&&!e&&i.length===0?null:r("section",{className:"relative z-[2] bg-bg",children:p("div",{className:[a==="center"?"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-1 items-center justify-items-center gap-[60px] border-b border-line px-[var(--sf-site-gutter,40px)] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))]":a==="left"?"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-1 items-center justify-items-start gap-[60px] border-b border-line px-[var(--sf-site-gutter,40px)] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))]":"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-[1fr_auto] items-center gap-[60px] border-b border-line px-[var(--sf-site-gutter,40px)] max-[1100px]:grid-cols-1 max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))]",g].filter(Boolean).join(" "),style:{paddingTop:f,paddingBottom:c},children:[a===null&&!e&&i.length>0&&r("div",{"aria-hidden":!0,className:"max-[1100px]:hidden"}),e&&r("h2",{className:"max-w-[1000px] font-display text-[length:min(var(--size-headingLarge,clamp(48px,7vw,108px)),var(--sf-heading-max,9999px))] [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-[0.94] tracking-[-0.035em] text-fg",children:j(s??"")}),i.length>0&&r("div",{className:"flex min-w-[280px] flex-col gap-3.5 max-[1100px]:min-w-0",children:i.map((t,h)=>{const u=(t.label??"").trim()||N("Button label"),b=t.href||"#",v=t.variant==="primary";return p(y,{href:b,className:["flex items-center justify-between gap-6 px-7 py-5","font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.3em] transition-colors",v?"border border-btn bg-btn text-btn-ink hover:border-fg hover:bg-fg":"border border-line text-fg hover:border-accent hover:text-accent"].join(" "),children:[u," ",r("span",{"aria-hidden":!0,children:"→"})]},h)})})]})})}export{k as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{CardRowDrawn as R}from"../../../../../components/CardRowContext.js";import g from"../../../../../components/ButtonBlock.js";import{CARD_ROW_LINK_PROP as p,namedRowField as i}from"../../../../../../format/lib/content/card-template.js";import{CTA_PH as O}from"../../../../../../format/lib/document/blocks/placeholders.js";import{phPrev as _}from"../../scaffold.js";import{phoneKey as j}from"efficient-easel/draw";import{ButtonBlockMeta as k}from"../../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";const H={...k,render:o=>{const{label:e,href:l,variant:a,align:c,alignPhone:m,contained:d,arrow:f,icon:h,iconPosition:u,widthFit:b,buttonColor:s,buttonTextColor:w,editor:P}=o,B=Object.fromEntries(Object.entries(o).filter(([t])=>t==="buttonFillOpacity"||t==="buttonBorder"||t.startsWith("buttonPadding"))),n=(t,F)=>r(g,{label:_(t,O.text,P)??"",href:F,variant:a,align:c,alignPhone:m,contained:d,arrow:f,icon:h,iconPosition:u,widthFit:b,widthFitPhone:o[j("widthFit")],buttonColor:s,buttonTextColor:w,...B}),C=i(o),x=i(o,p);return!C&&!x?n(e,l):r(R,{type:"ButtonBlock",props:o,children:t=>n(t.label,t.href)})}};export{H as ButtonBlockRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as
|
|
1
|
+
import{Fragment as a,jsx as o}from"react/jsx-runtime";import n from"../../../../../components/Eyebrow.js";import{hidableText as p,readHidable as f}from"efficient-easel/draw";import{parseEyebrowBlockLook as d}from"../../../../../../format/lib/sections/section-eyebrow-look.js";import{PH as b}from"../../../../../../format/lib/document/blocks/placeholders.js";import{phPrev as l}from"../../scaffold.js";import{EyebrowMeta as s}from"../../../../../../format/lib/document/blocks/general/Eyebrow/meta.js";const P={...s,render:({eyebrow:r,align:e,alignPhone:t,eyebrowLook:m,editor:i})=>f(r).hidden?o(a,{}):o(n,{text:l(p(r),b.eyebrow,i)??"",align:e,alignPhone:t,look:d(m)})};export{P as EyebrowRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as
|
|
1
|
+
import{Fragment as n,jsx as t}from"react/jsx-runtime";import{padValuesOf as d}from"../../../../content/section-padding.js";import m from"../../../../../components/Heading.js";import{hidableText as f,readHidable as p}from"efficient-easel/draw";import{PH as l}from"../../../../../../format/lib/document/blocks/placeholders.js";import{phPrev as g}from"../../scaffold.js";import{HeadingMeta as s}from"../../../../../../format/lib/document/blocks/general/Heading/meta.js";const j={...s,render:e=>{const{text:r,level:o,contained:i,editor:a}=e;return p(r).hidden?t(n,{}):t(m,{text:g(f(r),l.heading,a)??"",level:o,contained:i,pad:d(e)})}};export{j as HeadingRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as m}from"react/jsx-runtime";import c from"../../../../../components/LogoBlock.js";import{readHidable as
|
|
1
|
+
import{jsx as m}from"react/jsx-runtime";import c from"../../../../../components/LogoBlock.js";import{readHidable as s}from"efficient-easel/draw";import{readLogoColor as g}from"../../../../../../format/lib/logo/logo-color.js";import{LogoBlockMeta as p}from"../../../../../../format/lib/document/blocks/general/LogoBlock/meta.js";const k={...p,render:({src:r,alt:t,href:n,heightPx:d,reverse:f,customColor:i,align:o,alignPhone:l})=>{const e=g(f,i);return m(c,{src:r||void 0,alt:s(t).text||void 0,href:n||void 0,heightPx:d,reverse:e.reverse,color:e.color,align:o==="left"||o==="center"||o==="right"?o:void 0,alignPhone:l})}};export{k as LogoBlockRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import d from"../../../../../components/Split.js";import{sectionFillsHeight as m}from"../../../../../../format/lib/content/section-min-height.js";import{hidableText as g}from"efficient-easel/draw";import{phHide as t,ctaHide as f}from"../../scaffold.js";import{SplitMeta as c,SPLIT_PH as i,IMGBTN_PH as x}from"../../../../../../format/lib/document/blocks/general/Split/meta.js";function o(e,a,l){const n=t(e,x.text,l);if(n!==void 0)return{text:n,href:a||"#"}}const h={...c,render:e=>r(d,{eyebrow:t(e.eyebrow,i.eyebrow,e.editor),title:t(e.title,i.title,e.editor),body:t(e.body,i.body,e.editor),imageLabel:g(e.title)||i.title,imageSrc:e.imageSrc||void 0,reverse:e.reverse,uppercase:e.uppercase,textAlign:e.textAlign,textAlignPhone:e.textAlignPhone,cta:f(e.ctaText,e.ctaHref,e.editor),imageButton:o(e.imageBtnText,e.imageBtnHref,e.editor),textBgSrc:e.textBgSrc||void 0,textBgTint:(typeof e.overlay=="number"?e.overlay:60)/100,grayscale:e.grayscale,fillHeight:m(e)})};export{h as SplitRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as
|
|
1
|
+
import{Fragment as p,jsx as r}from"react/jsx-runtime";import{CardRowDrawn as s}from"../../../../../components/CardRowContext.js";import{namedRowField as y}from"../../../../../../format/lib/content/card-template.js";import{padValuesOf as P}from"../../../../content/section-padding.js";import T from"../../../../../components/Text.js";import{hidableText as i,readHidable as u}from"efficient-easel/draw";import{PH as d}from"../../../../../../format/lib/document/blocks/placeholders.js";import{phPrev as w}from"../../scaffold.js";import{readPartStyle as S}from"../../../part-styles.js";import{TextMeta as b}from"../../../../../../format/lib/document/blocks/general/Text/meta.js";const W={...b,render:t=>{const{text:o,align:m,alignPhone:l,tone:f,tag:x,contained:c,editor:g}=t;if(u(o).hidden)return r(p,{});const n=S(t,"text").textStyle,h=n?.startsWith("heading-")?d.heading:d.body,a=e=>r(T,{text:w(e,h,g)??"",align:m,alignPhone:l,tone:f,tag:x,textStyle:n,contained:c,pad:P(t)});return y(t)?r(s,{type:"Text",props:t,children:e=>a(i(e.text))}):a(i(o))}};export{W as TextRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as h}from"react/jsx-runtime";import p from"../../../../../components/TitleWithButtons.js";import{readHidable as d}from"efficient-easel/draw";import{CTA_PH as t}from"../../../../../../format/lib/document/blocks/placeholders.js";import{phRows as u,phHide as _}from"../../scaffold.js";import{TitleWithButtonsMeta as b,TITLE_WITH_BUTTONS_PH as c}from"../../../../../../format/lib/document/blocks/general/TitleWithButtons/meta.js";const x=[{label:t.text,href:t.href,variant:"primary"},{label:t.text,href:t.href,variant:"outline"}],O={...b,render:({title:n,buttons:m,padTop:r,padBottom:i,buttonsAlign:T,buttonsAlignPhone:l,editor:e})=>{const o=T,f=o==="center"||o==="left",s=d(n),a=s.hidden?"":s.text.trim();return h(p,{title:f&&!a?void 0:_(n,c.title,e),buttons:u(m,x,e),padTop:typeof r=="number"?r:140,padBottom:typeof i=="number"?i:140,buttonsAlign:o,buttonsAlignPhone:l,editing:e?.isEditing})}};export{O as TitleWithButtonsRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{phoneKey as P}from"efficient-easel/draw";import{ENTRANCE_KEYS as
|
|
1
|
+
import{phoneKey as P}from"efficient-easel/draw";import{ENTRANCE_KEYS as m}from"../../../animation/entrance.js";import{NESTED_BOX_PADDING as u}from"../../../../../format/lib/content/box-layout.js";import{resolveSectionPadding as f}from"../../../content/section-padding.js";import{ButtonBlockMeta as x}from"../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";import{TextMeta as b}from"../../../../../format/lib/document/blocks/general/Text/meta.js";import{SECTION_PAD_INNER_DEFAULTS as l}from"../../passes/section-padding.js";import{finiteNumber as d}from"../../../../../format/lib/finite-number.js";import{convertTheme as r,hasWords as T}from"../../../sections/section-to-box.js";import{bandPresetIndex as B}from"../../../../../format/lib/theme.js";const{text:C,tag:H,..._}=b.defaultProps,a=_,R={...a,tone:"dim"},{label:L,href:K,...E}=x.defaultProps,U=E,X={buttonFillOpacity:0,buttonBorder:{width:0},buttonPaddingTop:0,buttonPaddingRight:0,buttonPaddingBottom:0,buttonPaddingLeft:0},p={justify:"start",align:"stretch",wrap:!1,blockSpacing:"gap",padV2:!0},F={...p,direction:"column",...u},j={...p,sectionAccent:0},G=["gridSpan","sectionHeightMode","sectionHeightValue","sectionHeightUnit","sectionHeightModePhone","sectionHeightValuePhone","sectionHeightUnitPhone","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderPhone","sectionAccent","stickTop","stickTopDistance","stickTopPhone","stickTopDistancePhone","anchor","sectionAnimation","_hidden",...Object.values(m).flatMap(t=>[t,P(t)]),"widthFit","widthFitPhone","width","widthPhone","minWidth","minWidthPhone","maxWidth","maxWidthPhone"],i="a section width key, ignored since efficient-web-builder 45 (every section, and a section's root Box, follows Site styles only; Lewis 2026-10-29), so dropping it changes nothing",V={sectionSurface:"read by nothing in src/ (searched 2026-10-24): a retired theme key that draws nothing today, so dropping it changes nothing",widthMode:i,fullWidth:i,pageWidth:i,backgroundWidth:i,contentWidth:i,contentMax:i},J=Object.fromEntries(["sectionPaddingLeft","sectionPaddingRight","sectionPaddingLeftPhone","sectionPaddingRightPhone"].map(t=>[t,"needs Box side padding outside its gutter: the old section added it outside its frame, a Box's side padding replaces the gutter. 0 live nodes store it (JJ's read-only export, 2026-10-24)"]));function S(t,o){const e=d(t.sectionPaddingTop)??0,n=d(t.sectionPaddingBottom)??0;return{sectionPaddingTop:e+o.top,sectionPaddingBottom:n+o.bottom,sectionPaddingTopPhone:(d(t.sectionPaddingTopPhone)??e)+o.topPhone,sectionPaddingBottomPhone:(d(t.sectionPaddingBottomPhone)??n)+o.bottomPhone}}const Y=t=>["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopPhone","sectionPaddingBottomPhone"].map(o=>[o,o,(e,n)=>S(n,typeof t=="function"?t(n):t)[o]]);function s(t,o){const e=f(t,l[o]);return{sectionPaddingTop:e.top,sectionPaddingBottom:e.bottom}}const q=t=>[["padTop","sectionPaddingTop",(o,e)=>s(e,t).sectionPaddingTop],["padBottom","sectionPaddingBottom",(o,e)=>s(e,t).sectionPaddingBottom],["sectionPaddingTop","sectionPaddingTop",(o,e)=>s(e,t).sectionPaddingTop],["sectionPaddingBottom","sectionPaddingBottom",(o,e)=>s(e,t).sectionPaddingBottom]],N={kind:"heading-case-upper",styles:["heading-1","heading-2","heading-3"]},z=t=>o=>T(o.props[t])?[N]:[],Q=(t,o)=>({kind:"text",key:t,role:"eyebrow",props:a,...o?{style:o}:{}}),g=t=>t.background!=="transparent",h=(t,o)=>typeof t=="number"&&Number.isInteger(t)&&t>=0?t:r(o)?.selected??0,c=(t,o)=>{const e=r(o)?.themes;return e&&g(t)?B(e,h(t.sectionAccent,o)):-1},Z=(t,o,e)=>{const n=c(o,e);return n>=0?n:t},$=(t,o)=>{const e=c(t,o);return e>=0?{sectionAccent:e}:{}},tt=(t,o)=>g(t.props)&&c(t.props,o)<0?[{kind:"band-preset",page:h(t.props.sectionAccent,o)}]:[];export{p as BOX,U as BUTTON,R as DIM,V as DROP_COMMON,J as DROP_SIDE_PADDING,N as HEADING_CASE_UPPER,F as INNER_BOX,G as SAME_KEYS,j as SECTION_BOX,X as SH_LINK,a as TEXT,Z as bandAccent,c as bandIndex,h as bandPage,$ as bandProps,tt as bandWrites,z as headingCaseOf,s as innerPad,q as innerPadKeys,Q as smallText,S as wrapperPad,Y as wrapperPadKeys};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type SectionToBoxRow } from "../../../sections/section-to-box.js";
|
|
2
2
|
export declare const TIMELINE_SECTION_TO_BOX: Readonly<Record<string, SectionToBoxRow>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{BUTTON as g,DIM as s,bandAccent as
|
|
1
|
+
import{convertTheme as S}from"../../../sections/section-to-box.js";import{BUTTON as g,DIM as s,bandAccent as _,bandIndex as E,bandPage as I,bandWrites as B,DROP_COMMON as h,DROP_SIDE_PADDING as m,INNER_BOX as i,SAME_KEYS as b,SECTION_BOX as y,TEXT as l,headingCaseOf as u,innerPad as x,innerPadKeys as k}from"./section-to-box-row-parts.js";import{splitParagraphs as O}from"../../../../components/goldPhrases.js";import{TIMELINE_YEAR_BOX as A,TIMELINE_YEAR_HEAD as w}from"../../../../../format/lib/sections/timeline-year-shape.js";const H="jetbrains-mono",T="space-grotesk",r=(e,t,o={})=>({textStyle:"body-5",font:H,size:e,sizePhone:e,letterSpacing:t,lineHeight:1.5,weight:400,...o}),p=(e,t,o,d)=>({font:T,size:e,sizePhone:t,case:"upper",weight:500,letterSpacing:o,lineHeight:d}),a=(e,t,o,d={})=>({textStyle:"body-1",font:T,size:e,sizePhone:t,weight:400,case:"none",lineHeight:o,...d}),n=(e,t,o={})=>({kind:"text",key:e,props:l,style:t,...o}),P=(e,t)=>t?.future===!0,f=(e,t)=>{const o=S(t)?.themes[I(e.sectionAccent,t)]?.line;return o?{buttonBorder:{width:1,color:o}}:{}},c=e=>O(typeof e?.body=="string"?e.body:""),M={name:"Milestone Timeline",boxProps:(e,t)=>{const o=E(e,t);return{...y,direction:"column",gap:60,sectionBorder:{bottom:1},...x(e,"TimelineTrack"),...o>=0?{sectionAccent:o}:{}}},box:[...b.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",_],...k("TimelineTrack")],parts:[{kind:"group",name:"Heading",props:{...i,direction:"row",align:"end",justify:"between",gap:40,share:"content",sectionPaddingBottom:32,sectionBorder:{bottom:1}},parts:[{kind:"group",name:"Title",props:{...i,direction:"row",align:"end",gap:40,share:"content"},parts:[n("eyebrow",r(13,.3,{case:"upper",color:"accent",padding:8}),{role:"eyebrow"}),n("title",{textStyle:"heading-2",...p(79,40,-.03,1)},{role:"heading"})]},n("intro",a(14,14,1.5),{props:{...s,align:"right",maxWidth:360}})]},{kind:"group",name:"Years",props:{...i,direction:"row",share:"equal",gap:0,line:!0},parts:[{kind:"list",key:"entries",name:"Year",props:{...i,...A},item:e=>({props:e.future===!0?{upcoming:!0}:{}}),parts:[{kind:"group",name:w.name,props:{...i,...w},parts:[n("date",r(13,.22,{color:"accent"}),{when:(e,t)=>!P(e,t)}),n("date",r(13,.22,{color:"labels"}),{when:P}),n("title",{textStyle:"heading-3",...p(20,20,-.02,1.1)},{role:"heading"})]},n("blurb",a(13,13,1.55),{props:s})]}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"ghost",props:(e,t)=>({...g,align:"right",...f(e,t)}),style:r(13,.3,{case:"upper"})}],site:(e,t)=>[...u("title")(e),...B(e,t)],drop:{...h,...m,background:"the band is the Box's theme: the site's band preset (`sectionAccent`), or a declared band-preset write (`lib/theme` `bandPresetIndex`)",headPlacement:"needs a row per head placement: an own-box Milestone Timeline draws no head (its words sit in a Section Header above it), the row always draws the head"}},N={name:"Story Timeline",skip:e=>{const t=typeof e.layout=="string"?e.layout:"split";return t==="split"?void 0:`display "${t}": not converted (0 live pages; Spine and Alternating are not offered, a Track story is not stored anywhere)`},boxProps:e=>({...y,direction:"row",share:"twoThree",gap:80,align:"start",...x(e,"Timeline")}),box:[...b,...k("Timeline")],parts:[{kind:"group",name:"Heading",props:{...i,gap:24},parts:[n("eyebrow",r(12,.3,{case:"upper",color:"accent"}),{role:"eyebrow"}),n("title",{textStyle:"heading-2",...p(72,40,-.03,.94)},{role:"heading"}),n("intro",a(14,14,1.6),{props:{...s,maxWidth:360}}),{kind:"group",name:"Picture",keepEmpty:!0,box:[["imageSrc","bgImage"]],props:{...i,sectionBorder:{top:1,right:1,bottom:1,left:1},darken:75,darkenStyle:"bottom",placement:"bottom-center",sectionHeightMode:"fixed",sectionHeightValue:667,sectionHeightUnit:"px",sectionHeightModePhone:"fixed",sectionHeightValuePhone:419,sectionHeightUnitPhone:"px",sectionPaddingTop:12,sectionPaddingBottom:12,sectionPaddingLeft:16,sectionPaddingRight:16,sectionPaddingTopPhone:12,sectionPaddingBottomPhone:12,sectionPaddingLeftPhone:16,sectionPaddingRightPhone:16},when:e=>typeof e.imageSrc=="string"&&e.imageSrc.trim()!=="",parts:[{kind:"group",name:"Caption",props:{...i,direction:"row",justify:"between",align:"center",gap:12,share:"content",phoneRow:2},parts:[n("imageCaption",r(11,.24,{case:"upper",color:"text"})),n("imageMeta",r(11,.24,{case:"upper",color:"accent"}),{props:{...l,align:"right"}})]}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"ghost",props:(e,t)=>({...g,...f(e,t)}),style:r(13,.3,{case:"upper"})}]},{kind:"group",name:"Chapters",props:{...i,gap:48,line:!1},parts:[{kind:"list",key:"entries",name:"Chapter",props:{...i,direction:"row",gap:24,share:"biggerRight",align:"start"},parts:[n("date",r(13,.24,{color:"accent"})),{kind:"group",name:"Words",props:{...i,gap:14},parts:[n("title",{textStyle:"heading-3",...p(24,20,-.02,1.5)},{role:"heading"}),{kind:"block",type:"Text",props:{...l,_partStyles:{text:a(17,16,1.6)}},box:[["body","text",(e,t)=>c(t)[0]??""]],when:(e,t)=>c(t).length>0},{kind:"block",type:"Text",props:{...s,_partStyles:{text:a(17,16,1.6,{paragraphSpacing:14})}},box:[["body","text",(e,t)=>c(t).slice(1).join(`
|
|
2
2
|
|
|
3
|
-
`)]],when:(e,t)=>c(t).length>1}]}]}]}],site:u("title"),drop:{...h,...m,layout:"Split is the only display converted (see skip); the Box's own arrangement replaces it"}},
|
|
3
|
+
`)]],when:(e,t)=>c(t).length>1}]}]}]}],site:u("title"),drop:{...h,...m,layout:"Split is the only display converted (see skip); the Box's own arrangement replaces it"}},L={TimelineTrack:M,Timeline:N};export{L as TIMELINE_SECTION_TO_BOX};
|