efficient-web-builder 73.2.0 → 74.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 +32 -0
- package/dist/editor/components/CustomHtmlCodeWindow.d.ts +11 -0
- package/dist/editor/components/CustomHtmlCodeWindow.js +20 -0
- package/dist/editor/components/SectionThemePicker.d.ts +3 -2
- package/dist/editor/components/SectionThemePicker.js +1 -1
- package/dist/editor/components/SiteTextStylesField.d.ts +2 -1
- package/dist/editor/components/SiteTextStylesField.js +1 -1
- package/dist/editor/components/StandaloneSectionEditor.js +1 -1
- package/dist/editor/components/StorefrontEditor.js +1 -1
- package/dist/editor/components/WebsiteSettingsPanel.d.ts +2 -0
- package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
- package/dist/editor/components/storefront-editor.css +111 -0
- package/dist/editor/lib/document/blocks/general/CustomHTML/fields.d.ts +6 -0
- package/dist/editor/lib/document/blocks/general/CustomHTML/fields.js +1 -0
- package/dist/editor/lib/document/blocks/general/index.js +1 -1
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/custom-html-preview.d.ts +12 -0
- package/dist/editor/lib/document/custom-html-preview.js +1 -0
- package/dist/format/lib/animation/hover.js +1 -1
- package/dist/format/lib/animation/loop.js +1 -1
- package/dist/format/lib/content/accordion-row-style.js +1 -1
- package/dist/format/lib/content/box-layout.js +1 -1
- package/dist/format/lib/content/button-icon.js +1 -1
- package/dist/format/lib/content/card-place.js +1 -1
- package/dist/format/lib/content/chat-launcher.js +1 -1
- package/dist/format/lib/content/container-direction.js +1 -1
- package/dist/format/lib/content/footprint.js +1 -1
- package/dist/format/lib/content/image-fit.js +1 -1
- package/dist/format/lib/content/image-text-rows.js +1 -1
- package/dist/format/lib/content/list-number.js +1 -1
- package/dist/format/lib/content/list-position.js +1 -1
- package/dist/format/lib/content/text-tag.js +1 -1
- package/dist/format/lib/document/blocks/general/text-part-shapes.json +0 -6
- package/dist/format/lib/document/box-footer.js +1 -1
- package/dist/format/lib/document/custom-html-place.d.ts +19 -0
- package/dist/format/lib/document/custom-html-place.js +7 -0
- package/dist/format/lib/document/left-view.js +1 -1
- package/dist/format/lib/document/mockup-variant-fields.js +1 -1
- package/dist/format/lib/document/part-inks.d.ts +1 -0
- package/dist/format/lib/document/part-inks.js +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +17 -0
- package/dist/format/lib/editor-words-catalogue.js +4 -4
- package/dist/format/lib/hero-arrows.js +1 -1
- package/dist/format/lib/hero-group-placement.js +1 -1
- package/dist/format/lib/hero-media-layout.js +1 -1
- package/dist/format/lib/hero-phone-stack.js +1 -1
- package/dist/format/lib/hero-video.js +1 -1
- package/dist/format/lib/reel.js +1 -1
- package/dist/format/lib/sections/divider-style.js +1 -1
- package/dist/format/lib/sections/hero-overlay.js +1 -1
- package/dist/format/lib/sections/intro-bleed-layout.js +1 -1
- package/dist/format/lib/sections/logo-look.js +1 -1
- package/dist/format/lib/sections/product-card-style.js +1 -1
- package/dist/format/lib/sections/section-eyebrow-look.js +1 -1
- package/dist/format/lib/sections/section-head-placement.js +1 -1
- package/dist/format/lib/sections/section-head-style.js +1 -1
- package/dist/format/lib/sections/section-number-style.js +1 -1
- package/dist/format/lib/sections/ticker-style.js +1 -1
- package/dist/format/lib/text-style-face.d.ts +6 -0
- package/dist/format/lib/text-style-face.js +2 -1
- package/dist/format/lib/theme.js +2 -2
- package/dist/render/components/BoxTabs.js +1 -1
- package/dist/render/lib/document/blocks/general/CustomHTML/render.js +1 -1
- package/dist/render/lib/document/blocks/general/LocationMap/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-head-looks.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.js +1 -1
- package/dist/render/lib/document/custom-css.d.ts +4 -0
- package/dist/render/lib/document/custom-css.js +3 -2
- package/dist/render/lib/document/header-clearance.js +1 -1
- package/dist/render/lib/document/header-ink.js +1 -1
- package/dist/render/lib/text-styles/site-text-styles.js +2 -2
- package/dist/routine-index.json +1 -1
- package/dist/value-index.json +1 -1
- package/package.json +27 -6
- package/dist/format/lib/document/blocks/general/CustomHTML/fields.d.ts +0 -2
- package/dist/format/lib/document/blocks/general/CustomHTML/fields.js +0 -1
- package/dist/format/lib/parse-option.d.ts +0 -3
- package/dist/format/lib/parse-option.js +0 -1
- package/dist/format/lib/source-rules/one-option-parser.d.ts +0 -12
- package/dist/format/lib/source-rules/one-option-parser.js +0 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parseOption as o}from"
|
|
1
|
+
import{parseOption as o}from"efficient-shell/format";import{ownEntry as t}from"../own-entry.js";const l="plain",r=[{label:"Plain",value:"plain"},{label:"Filled",value:"filled"},{label:"Line",value:"line"}],E="line",O={KeyFeatures:"filled"};function i(e){return t(O,e)??l}function L(e,n){return o(r,i(n),e)}function _(e){return o(r,E,e)}export{E as DEFAULT_EYEBROW_BLOCK_LOOK,l as DEFAULT_SECTION_EYEBROW_LOOK,O as SECTION_EYEBROW_DEFAULTS,r as SECTION_EYEBROW_LOOK_OPTIONS,i as eyebrowLookFor,_ as parseEyebrowBlockLook,L as parseSectionEyebrowLook};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parseOption as n}from"
|
|
1
|
+
import{parseOption as n}from"efficient-shell/format";import{withRowsShownWhen as o}from"../document/show-when-attach.js";import{nonEmptyString as d}from"../non-empty-string.js";import{hasOwnEntry as l}from"../own-entry.js";const a="inline",s=[{label:"In this section",value:"inline"},{label:"In its own box",value:"own-box"},{label:"In the list column",value:"list-column",only:["Footprint"]}],y="list-column";function S(e){return[e.num,e.title,e.description,e.linkProp].filter(t=>d(t)!==void 0)}const p={ProductGrid:{num:"num",title:"title",description:"description",headRows:["num","title","titleSize","description","linkText","linkHref"],renderer:"ProductGridSection",padKey:"padTop",linkProp:"link"},TyreSizes:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicTyreSizes"},FitmentFinder:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"FitmentFinder"},TyreFitment:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicTyreFitment"},BundleOffer:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},CompatibleTyres:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},RelatedProducts:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},SpecTable:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"SpecTable"},FAQ:{num:"num",title:"title",linkProp:"link",headRows:["num","title","linkText","linkHref"],renderer:"FAQ"},GalleryB:{num:"num",title:"title",headRows:["num","title","linkText","linkHref"],renderer:"GalleryGrid"},FitmentTable:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"FitmentTable"},Events:{num:"num",title:"title",linkProp:"link",headRows:["num","title","linkText","linkHref"],renderer:"Events"},ProcessSteps:{num:"num",title:"title",description:"description",headRows:["num","title","description"],headStyle:"editorial",renderer:"ProcessSteps",padKey:"padTop"},LongRead:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"LongRead"},Series:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"Series"},Subscribe:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"Subscribe"},TimelineTrack:{num:"eyebrow",title:"title",description:"intro",headRows:["eyebrow","title","intro"],headStyle:"editorial",renderer:"TimelineTrack",padKey:"padTop"},StatsParagraph:{num:"eyebrow",title:"title",description:"desc",headRows:["eyebrow","title","desc"],headStyle:"editorial",renderer:"StatsParagraph"},Footprint:{num:"sectionNumber",title:"heading",description:"tagline",headRows:["sectionNumber","heading","tagline"],headStyle:"editorial",renderer:"Footprint",padKey:"padTop"},Collections:{num:"eyebrow",title:"heading",headRows:["eyebrow","heading"],renderer:"Collections"},Cards:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Cards"},Testimonials:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Testimonials"},Reviews:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Reviews"},Prose:{num:"eyebrow",title:"title",headRows:["eyebrow","title"],headStyle:"essay",renderer:"Prose"},ReviewForm:{num:"eyebrow",title:"title",headRows:["eyebrow","title"],headStyle:"simple",renderer:"ReviewForm"},DeliveryOptions:{num:"eyebrow",title:"title",description:"body",headRows:["eyebrow","title","body"],headStyle:"natural",headRowGap:"gap-3",headDescriptionSize:"text-[15px]",renderer:"DeliveryOptions"}},T="SectionHeader";function R(e){return l(p,e)}function b(e){return n(s,a,e)}const m=new Set(["Flex"]);function P(e){return!!e?.type&&m.has(e.type)}const i={not:{field:"headPlacement",is:"own-box"}},E={not:i};function x(e,t,r){return o(e,r,i)}export{a as DEFAULT_SECTION_HEAD_PLACEMENT,y as HEAD_IN_LIST_COLUMN,i as HEAD_ROWS_SHOW_WHEN,E as OWN_BOX_ROWS_SHOW_WHEN,s as SECTION_HEAD_PLACEMENT_OPTIONS,T as SECTION_HEAD_TYPE,p as SPLITTABLE_SECTIONS,R as canSplitHead,x as headFieldsForPlacement,S as headRoleProps,P as parentCapsWidth,b as parseSectionHeadPlacement};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parseOption as a}from"
|
|
1
|
+
import{parseOption as a}from"efficient-shell/format";import{shownForOption as c,withRowRules as _}from"../document/show-when-attach.js";const n="standard",s=[{label:"Standard",value:"standard"},{label:"Editorial",value:"editorial"},{label:"Simple",value:"simple"},{label:"Statement",value:"statement"},{label:"Natural",value:"natural"},{label:"Essay",value:"essay"}],o=["numStyle","logoSrc","logoAlt","linkText","linkHref","_gLogo"],r=[...o,"description"],p={standard:["eyebrowLook"],editorial:[...o,"eyebrowLook"],simple:r,statement:r,natural:o,essay:r},i=["gap-5","gap-3"],S=["text-[length:var(--size-body,16px)]","text-[15px]"];function D(e){return a(i,i[0],e)}function m(e){return a(S,S[0],e)}function A(e){return a(s,n,e)}function L(e){const l=s.map(t=>t.value),u=[...new Set(Object.values(p).flat())];return _(e,u.map(t=>[[t],c("headStyle",l,n,l.filter(E=>!p[E].includes(t)))]))}export{n as DEFAULT_SECTION_HEAD_STYLE,o as EDITORIAL_HEAD_UNUSED_FIELDS,p as HEAD_UNUSED_FIELDS,S as NATURAL_DESCRIPTION_SIZES,i as NATURAL_ROW_GAPS,s as SECTION_HEAD_STYLE_OPTIONS,r as SIMPLE_HEAD_UNUSED_FIELDS,m as parseNaturalDescriptionSize,D as parseNaturalRowGap,A as parseSectionHeadStyle,L as withHeadStyleRules};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parseOption as t}from"
|
|
1
|
+
import{parseOption as t}from"efficient-shell/format";const o="solid",r=[{label:"Solid",value:"solid"},{label:"Outlined",value:"outlined"}];function l(e){return t(r,o,e)}const i="sf-secnum-outline",s="font-display text-[length:var(--size-headingMedium,clamp(48px,6vw,96px))] font-medium leading-[0.8] tracking-[-0.02em]",p=`@supports (-webkit-text-stroke: 1px currentColor){.${i}{color:var(--site-surface-2);-webkit-text-stroke:1px var(--site-line)}}`;export{o as DEFAULT_SECTION_NUMBER_STYLE,i as OUTLINED_NUMBER_CLASS,p as OUTLINED_NUMBER_CSS,s as OUTLINED_NUMBER_LAYOUT,r as SECTION_NUMBER_STYLE_OPTIONS,l as parseSectionNumberStyle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parseOption as t}from"
|
|
1
|
+
import{parseOption as t}from"efficient-shell/format";const l="small",n="dot",s=[{label:"Small",value:"small"},{label:"Display",value:"display"}],o=[{label:"Dot ●",value:"dot"},{label:"Cross ✕",value:"cross"},{label:"Slash /",value:"slash"},{label:"Triangle ▼",value:"triangle"},{label:"None",value:"none"}],x={dot:"●",cross:"✕",slash:"/",triangle:"▼",none:""},r={small:"font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.25em] max-view-wide:text-[length:var(--size-label,12px)]",display:"font-display font-medium text-[length:var(--size-headingMedium,44px)] uppercase leading-none tracking-[0.005em] max-view-wide:text-[length:var(--size-headingMedium,28px)]"},i={small:{dot:"",cross:"text-[0.77em]",slash:"text-[0.77em]",triangle:"",none:""},display:{dot:"text-[0.3em]",cross:"text-[0.64em]",slash:"text-[0.64em]",triangle:"text-[0.3em]",none:""}};function c(e){return t(s,l,e)}function m(e){return t(o,n,e)}function u(e){return r[e]}function d(e,a){return i[e][a]}export{n as DEFAULT_TICKER_SEPARATOR,l as DEFAULT_TICKER_SIZE,x as SEPARATOR_GLYPH,o as TICKER_SEPARATOR_OPTIONS,s as TICKER_SIZE_OPTIONS,m as parseTickerSeparator,c as parseTickerSize,d as separatorScaleClass,u as tickerTypeClass};
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
export declare function faceClassOf(style: {
|
|
2
2
|
id: string;
|
|
3
3
|
}): string;
|
|
4
|
+
export declare const FACE_SIZE: Readonly<Record<string, {
|
|
5
|
+
step: string;
|
|
6
|
+
fallbackPx: number;
|
|
7
|
+
weight?: string;
|
|
8
|
+
}>>;
|
|
9
|
+
export declare function faceClassBaseCss(scope: string, markup: string): string;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
function e
|
|
1
|
+
function g(e){switch(e.id){case"heading-1":return"font-display";case"heading-2":return"font-heading2";case"heading-3":return"font-heading3";case"body-1":return"font-body";case"body-5":return"font-mono";default:return`font-${e.id}`}}const t="var(--sf-heading-weight, 500)",l={"heading-1":{step:"headingLarge",fallbackPx:76,weight:t},"heading-2":{step:"headingMedium",fallbackPx:44,weight:`var(--sf-heading-2-weight, ${t})`},"heading-3":{step:"headingSmall",fallbackPx:30,weight:`var(--sf-heading-3-weight, ${t})`},"body-1":{step:"body",fallbackPx:16},"body-5":{step:"label",fallbackPx:12}};function b(e,d){const s=new Set;for(const a of d.matchAll(/\bclass="([^"]*)"/g))for(const n of a[1].split(/\s+/))n&&s.add(n);const i=[];for(const[a,{step:n,fallbackPx:r,weight:o}]of Object.entries(l)){const f=g({id:a});if(!s.has(f))continue;const c=`var(--size-${n}, ${r}px)`,h=o?[`font-size: min(${c}, var(--sf-heading-max, 9999px))`,`font-weight: ${o}`]:[`font-size: ${c}`];i.push(`:where(${e} .${f}) { ${h.join("; ")} }`)}return i.join(`
|
|
2
|
+
`)}export{l as FACE_SIZE,b as faceClassBaseCss,g as faceClassOf};
|
package/dist/format/lib/theme.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{contrastRatio as v,hexToRgb as d,parseHexColor as s,readableInk as L,relativeLuminance as g}from"efficient-shell/format";import{DEFAULT_SHADOW_COLOR as ee,pictureShadowColor as te}from"efficient-easel/screen/lib/document/shadow-values";import{isLengthUnit as ne}from"efficient-easel/screen/lib/content/length-units";import{cssLengthOf as re,siteLengthHeld as oe}from"./content/css-length.js";
|
|
1
|
+
import{contrastRatio as v,hexToRgb as d,parseHexColor as s,readableInk as L,relativeLuminance as g,parseOption as E}from"efficient-shell/format";import{DEFAULT_SHADOW_COLOR as ee,pictureShadowColor as te}from"efficient-easel/screen/lib/document/shadow-values";import{isLengthUnit as ne}from"efficient-easel/screen/lib/content/length-units";import{cssLengthOf as re,siteLengthHeld as oe}from"./content/css-length.js";const ce="storefront-theme",Ze="sf:theme-mode",qe="sf:theme-switch",Je="hide",Qe=["light","dark","auto"],ve="light",et=!1,N=7,k=18;function ie(e){return e>=N&&e<k}function tt(e){const{mode:t,override:n,switchShown:r,hour:o}=e;return r&&(n==="light"||n==="dark")?n:t==="auto"?ie(o)?"light":"dark":E(["light","dark"],"dark",t)}function nt(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"};
|
|
@@ -15,4 +15,4 @@ import{contrastRatio as v,hexToRgb as d,parseHexColor as s,readableInk as L,rela
|
|
|
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 l={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},se=[{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"}],ae={selected:0,themes:se};function P(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...ae}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function S(e,t,n){const r=d(e),o=d(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 ue={light:"#ffffff",dark:"#0a0a0a"},ot=["light","dark"];function ct(e,t){const n=ue[t],r=t==="light"?"#ffffff":"#000000";return{text:n,accent:n,background:e,surface:S(e,r,.1),line:S(e,r,.22),muted:S(n,e,.35),brandInk:t}}function f(e){const t=P(e);return t.themes[t.selected]}function u(e){return{text:e.text,accent:e.accent,background:e.background||l.background,surface:e.surface||l.surface,line:e.line||l.line,muted:e.muted||l.muted}}function it(e){return{fill:u(e).background,accent:e.accent}}const le=.4,fe="#f5f1e8",F="#0a0a0a";function he(e){const t=f(e).text,n=g(t);return n===null||n>=le?t:null}const de=4.5,ge=3,st={good:"Good","large-only":"Large text only",hard:"Hard to read"};function at(e){return e>=de?"good":e>=ge?"large-only":"hard"}const me=["#000000","#ffffff"];function m(e){return L(e,me)}function ut(e,t){const n=t!==void 0&&g(t)!==null?t:fe;return L(e,[F,n])===n&&n!==F}const pe=[.25,.4,.55];function lt(e){const t=d(e);return t===null?[]:pe.map(n=>"#"+[t.r,t.g,t.b].map(r=>Math.round(r*(1-n)).toString(16).padStart(2,"0")).join(""))}function ft(e){const n={"--theme-fg":f(e).text},r=he(e);return r!==null&&(n["--overlay-fg"]=r),n}const xe=82;function A(e){return`color-mix(in srgb, ${e} ${xe}%, #000)`}function ht(e){const t=f(e);return{"--theme-accent":t.accent,"--theme-accent-2":A(t.accent),"--theme-accent-ink":m(t.accent)}}function T(e){const t=e?.button;return t&&s(t)===t.toLowerCase()?t.toLowerCase():null}function dt(e){const t=f(e),n=T(t),r=$(t);if(n===null&&r===null)return{};const o={};return n!==null&&(o["--theme-btn"]=n,o["--theme-btn-2"]=A(n)),o["--theme-btn-ink"]=r??m(n),o}function $(e){const t=e?.buttonInk;return t&&s(t)===t.toLowerCase()?t.toLowerCase():null}function _e(e,t){return $(e)??m(T(e)??t)}function gt(e){const t=f(e);return{fill:T(t)??t.accent.toLowerCase(),ink:_e(t,t.accent)}}function mt(e){const t={};return P(e).themes.forEach((n,r)=>{const o=u(n);t[`--theme-preset-${r}-accent`]=o.accent,t[`--theme-preset-${r}-accent-2`]=A(o.accent),t[`--theme-preset-${r}-accent-ink`]=m(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 b=e=>{const t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},I=e=>255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055);function U([e,t,n]){const[r,o,c]=[b(e),b(t),b(n)],i=Math.cbrt(.4122214708*r+.5363325363*o+.0514459929*c),a=Math.cbrt(.2119034982*r+.6806995451*o+.1073969566*c),h=Math.cbrt(.0883024619*r+.2817188376*o+.6299787005*c);return[.2104542553*i+.793617785*a-.0040720468*h,1.9779984951*i-2.428592205*a+.4505937099*h,.0259040371*i+.7827717662*a-.808675766*h]}function Ee([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[I(4.0767416621*r-3.3077115913*o+.2309699292*c),I(-1.2684380046*r+2.6097574011*o-.3413193965*c),I(-.0041960863*r-.7034186147*o+1.707614701*c)]}const R=e=>{const t=d(e);return t===null?[0,0,0]:[t.r,t.g,t.b]},G=(e,t,n)=>[e[0]*n+t[0]*(1-n),e[1]*n+t[1]*(1-n),e[2]*n+t[2]*(1-n)],Y=e=>`#${e.map(t=>Math.max(0,Math.min(255,Math.round(t))).toString(16).padStart(2,"0")).join("")}`,z=e=>G(R(e.surface),R(e.line),.6);function pt(e){return Y(z(u(e)))}function B(e){const t=u(e);return Y(Ee(G(U(z(t)),U(R(t.text)),.92)))}function xt(e){return{...e,background:B(e)}}function X(e,t,n,r){const o=e[t];if(!o)return-1;const c=n(o);if(!c)return-1;const i=u(o);return e.findIndex((a,h)=>{if(h===t)return!1;const _=u(a);return s(_.background)!==c?!1:!r||s(_.text??"")===s(i.text??"")&&s(_.accent??"")===s(i.accent??"")})}function _t(e,t){return X(e,t,B,!1)}function Et(e,t){return X(e,t,n=>s(n.surface??""),!0)}const Se=1;function Ae(e,t){const n=(e??[]).flatMap((r,o)=>{const c=g(r.background??""),i=g(r.text??"");return c!==null&&i!==null&&c<i?[o]:[]});return n.find(r=>r!==t)??n[0]??Se}function St(e){return Ae(e?.themes,e?.selected)}const At=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function Tt(e){const t=u(f(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!==l.surface||t.line!==l.line)&&(r["--theme-surface-2"]=n),r}const Te=["heading","body","label"],bt={heading:"Headings",body:"Body",label:"Labels"};function It(e){if(!e)return null;for(const t of Te)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}const K=["headingLarge","headingMedium","headingSmall","accent","body","label"],Rt={headingLarge:"heading",headingMedium:"heading",headingSmall:"heading",accent:"heading",body:"body",label:"label"},Ct={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},be=8,Ie=200;function Re(e){if(typeof e!="number"||!Number.isFinite(e))return null;const t=Math.round(e);return t>=be&&t<=Ie?t:null}function Ce(e){const t={};for(const n of K)t[n]=Re(e?.[n]);return t}function Dt(e){const t=Ce(e),n={};for(const r of K){const o=t[r];o!==null&&(n[`--size-${r}`]=`${o}px`)}return n}const De=["square","small","large"],Me="small";function Oe(e){return De.includes(e??"")?e:Me}function Mt(e){return M(we[Oe(e)])}const p=0,W=40,ye={min:p,max:W,step:1},we={square:0,small:null,large:16},C={"--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 D(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(W,Math.max(p,Math.round(t))):null}function M(e,t){if(ne(t)&&t!=="px"){if(typeof e!="number"||!Number.isFinite(e))return{};const r=Math.max(0,e);return Object.fromEntries(Object.entries(C).map(([o,c])=>{const i=Math.round(r*c*1e4)/1e4;return[o,i===0?"0":re(i,t)]}))}const n=D(e);return n===null?{}:Object.fromEntries(Object.entries(C).map(([r,o])=>{const c=n*o/16;return[r,c===0?"0":`${c}rem`]}))}function Ot(e){return(D(e)??p)*C["--sf-button-radius"]}function yt(e,t){const n=oe(e,t,"radius",ye);return n!==null?M(n,t):M(D(e)??p)}const He=["none","soft","lifted"],Le="soft",j="none",Ne=["tight","normal","roomy"],ke="normal",Pe="normal",Fe=["none","lift","highlight"],$e="lift",Ue="highlight";import{DEFAULT_SHADOW_COLOR as Xt}from"efficient-easel/screen/lib/document/shadow-values";function V(e){return He.includes(e??"")?e:Le}function Ge(e){return Ne.includes(e??"")?e:ke}function Z(e){return Fe.includes(e??"")?e:$e}function wt(e){const t=V(e);return t===j?void 0:t}function Ht(e){const t=Ge(e);return t===Pe?void 0:t}function Lt(e){const t=Z(e);return t===Ue?void 0:t}function Nt(e,t,n){const r=te(t);return r===ee?{}:V(e)!==j||Z(n)==="lift"?{"--sf-shadow-color":r}:{}}const Ye=["normal","tight","compressed"],q="normal";function J(e){return Ye.includes(e??"")?e:q}function kt(e){const t=J(e);return t===q?void 0:t}function Pt(e){switch(J(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}const Q=["authored","sentence"],Ft={case:"authored",weight:null,weightStrong:null,italicStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},O=100,y=900,ze=24,Be=200;function x(e,t,n){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),n))}function w(e){const t=x(e?.weight,O,y),n=E(Q,"authored",e?.case),r=c=>c==null?t:x(c,O,y),o=c=>E(Q,n,c);return{case:n,weight:t,weightStrong:x(e?.weightStrong,O,y),italicStrong:typeof e?.italicStrong=="boolean"?e.italicStrong:null,maxPx:x(e?.maxPx,ze,Be),weight2:r(e?.weight2),weight3:r(e?.weight3),case2:o(e?.case2),case3:o(e?.case3)}}function $t(e){const t=w(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 Ut(e){return w({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 Gt(e){const t=w(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 H="siteTheme";function Xe(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{[H]:{selected:n,themes:t.themes}}}function Yt(e){return Xe(e?.[H])[H]}export{pe as ACCENT_DARKEN_STEPS,ot as BRAND_INKS,Ne as CARD_GAPS,He as CARD_SHADOWS,ye as CORNER_RADIUS_GRID,W as CORNER_RADIUS_MAX,p as CORNER_RADIUS_MIN,De as CORNER_STYLES,we as CORNER_STYLE_TO_PX,ke as DEFAULT_CARD_GAP,Le as DEFAULT_CARD_SHADOW,Me as DEFAULT_CORNER_STYLE,q as DEFAULT_HEADING_COMPRESSION,Ft as DEFAULT_HEADING_TYPOGRAPHY,$e as DEFAULT_HOVER_EFFECT,Xt as DEFAULT_SHADOW_COLOR,Ct as DEFAULT_SIZES,l as DEFAULT_SURFACES,tt as DEFAULT_SWITCH_SHOWN,se as DEFAULT_THEMES,et as DEFAULT_THEME_MODE,ae as DEFAULT_THEME_VALUE,st as GRADE_LABEL,Q as HEADING_CASES,Ye as HEADING_COMPRESSIONS,Be as HEADING_MAX_PX_MAX,ze as HEADING_MAX_PX_MIN,y as HEADING_WEIGHT_MAX,O as HEADING_WEIGHT_MIN,Fe as HOVER_EFFECTS,Pe as IDENTITY_CARD_GAP,j as IDENTITY_CARD_SHADOW,Ue as IDENTITY_HOVER_EFFECT,F as OVERLAY_INK_DARK,fe as OVERLAY_INK_LIGHT,de as READABILITY_AA,ge as READABILITY_AA_LARGE,Rt as SCALE_OF_STEP,H as SITE_THEME_KEY,K as SIZE_STEPS,Ie as TEXT_SIZE_MAX,be as TEXT_SIZE_MIN,k as THEME_DAY_END_HOUR,N as THEME_DAY_START_HOUR,ve as THEME_MODES,qe as THEME_MODE_KEY,ce as THEME_STORAGE_KEY,At as THEME_SURFACE_KEYS,Qe as THEME_SWITCH_HIDE,Je as THEME_SWITCH_KEY,Te as TYPE_GROUPS,bt as TYPE_GROUP_LABELS,m as accentInk,xt as bandPresetFor,_t as bandPresetIndex,ct as brandTheme,rt as buildThemeBootScript,Ht as cardGapAttr,wt as cardShadowAttr,Pt as compressionMetrics,v as contrastRatio,M as cornerRadiusTokens,Mt as cornerStyleTokens,St as darkBandIndex,Ae as darkPresetIndex,lt as darkerAccents,ut as fillIsDark,at as gradeContrast,kt as headingCompressionAttr,Ut as headingTypographyFromRow,$t as headingTypographyStyle,Gt as headingTypographyToRow,Lt as hoverEffectAttr,ie as isDayHour,Ge as normalizeCardGap,V as normalizeCardShadow,D as normalizeCornerRadius,Oe as normalizeCornerStyle,J as normalizeHeadingCompression,w as normalizeHeadingTypography,Z as normalizeHoverEffect,Re as normalizeSize,Ce as normalizeSizes,P as normalizeTheme,u as normalizeThemeColors,nt as resolveTheme,_e as resolvedButtonInk,B as sectionBandTone,f as selectedThemeColors,Nt as shadowColorTokens,gt as siteButtonPaint,Ot as siteButtonRadiusPx,yt as siteCornerRadiusTokens,Xe as siteThemeMetadata,Yt as siteThemeOf,Et as surfacePresetIndex,pt as surfaceTwoTone,ht as themeAccentStyle,T as themeButtonColour,$ as themeButtonInk,dt as themeButtonStyle,ft as themeColorStyle,he as themeLightInk,mt as themePresetAccentVars,Tt as themeSurfaceStyle,it as themeSwatchColors,It as typeScaleGroupOfClassName,Dt as typeSizesStyle};
|
|
18
|
+
`}const l={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},se=[{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"}],ae={selected:0,themes:se};function P(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...ae}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function S(e,t,n){const r=d(e),o=d(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 ue={light:"#ffffff",dark:"#0a0a0a"},rt=["light","dark"];function ot(e,t){const n=ue[t],r=t==="light"?"#ffffff":"#000000";return{text:n,accent:n,background:e,surface:S(e,r,.1),line:S(e,r,.22),muted:S(n,e,.35),brandInk:t}}function f(e){const t=P(e);return t.themes[t.selected]}function u(e){return{text:e.text,accent:e.accent,background:e.background||l.background,surface:e.surface||l.surface,line:e.line||l.line,muted:e.muted||l.muted}}function ct(e){return{fill:u(e).background,accent:e.accent}}const le=.4,fe="#f5f1e8",F="#0a0a0a";function he(e){const t=f(e).text,n=g(t);return n===null||n>=le?t:null}const de=4.5,ge=3,it={good:"Good","large-only":"Large text only",hard:"Hard to read"};function st(e){return e>=de?"good":e>=ge?"large-only":"hard"}const me=["#000000","#ffffff"];function m(e){return L(e,me)}function at(e,t){const n=t!==void 0&&g(t)!==null?t:fe;return L(e,[F,n])===n&&n!==F}const pe=[.25,.4,.55];function ut(e){const t=d(e);return t===null?[]:pe.map(n=>"#"+[t.r,t.g,t.b].map(r=>Math.round(r*(1-n)).toString(16).padStart(2,"0")).join(""))}function lt(e){const n={"--theme-fg":f(e).text},r=he(e);return r!==null&&(n["--overlay-fg"]=r),n}const xe=82;function A(e){return`color-mix(in srgb, ${e} ${xe}%, #000)`}function ft(e){const t=f(e);return{"--theme-accent":t.accent,"--theme-accent-2":A(t.accent),"--theme-accent-ink":m(t.accent)}}function T(e){const t=e?.button;return t&&s(t)===t.toLowerCase()?t.toLowerCase():null}function ht(e){const t=f(e),n=T(t),r=$(t);if(n===null&&r===null)return{};const o={};return n!==null&&(o["--theme-btn"]=n,o["--theme-btn-2"]=A(n)),o["--theme-btn-ink"]=r??m(n),o}function $(e){const t=e?.buttonInk;return t&&s(t)===t.toLowerCase()?t.toLowerCase():null}function _e(e,t){return $(e)??m(T(e)??t)}function dt(e){const t=f(e);return{fill:T(t)??t.accent.toLowerCase(),ink:_e(t,t.accent)}}function gt(e){const t={};return P(e).themes.forEach((n,r)=>{const o=u(n);t[`--theme-preset-${r}-accent`]=o.accent,t[`--theme-preset-${r}-accent-2`]=A(o.accent),t[`--theme-preset-${r}-accent-ink`]=m(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 b=e=>{const t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},I=e=>255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055);function U([e,t,n]){const[r,o,c]=[b(e),b(t),b(n)],i=Math.cbrt(.4122214708*r+.5363325363*o+.0514459929*c),a=Math.cbrt(.2119034982*r+.6806995451*o+.1073969566*c),h=Math.cbrt(.0883024619*r+.2817188376*o+.6299787005*c);return[.2104542553*i+.793617785*a-.0040720468*h,1.9779984951*i-2.428592205*a+.4505937099*h,.0259040371*i+.7827717662*a-.808675766*h]}function Ee([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[I(4.0767416621*r-3.3077115913*o+.2309699292*c),I(-1.2684380046*r+2.6097574011*o-.3413193965*c),I(-.0041960863*r-.7034186147*o+1.707614701*c)]}const R=e=>{const t=d(e);return t===null?[0,0,0]:[t.r,t.g,t.b]},G=(e,t,n)=>[e[0]*n+t[0]*(1-n),e[1]*n+t[1]*(1-n),e[2]*n+t[2]*(1-n)],Y=e=>`#${e.map(t=>Math.max(0,Math.min(255,Math.round(t))).toString(16).padStart(2,"0")).join("")}`,z=e=>G(R(e.surface),R(e.line),.6);function mt(e){return Y(z(u(e)))}function B(e){const t=u(e);return Y(Ee(G(U(z(t)),U(R(t.text)),.92)))}function pt(e){return{...e,background:B(e)}}function X(e,t,n,r){const o=e[t];if(!o)return-1;const c=n(o);if(!c)return-1;const i=u(o);return e.findIndex((a,h)=>{if(h===t)return!1;const _=u(a);return s(_.background)!==c?!1:!r||s(_.text??"")===s(i.text??"")&&s(_.accent??"")===s(i.accent??"")})}function xt(e,t){return X(e,t,B,!1)}function _t(e,t){return X(e,t,n=>s(n.surface??""),!0)}const Se=1;function Ae(e,t){const n=(e??[]).flatMap((r,o)=>{const c=g(r.background??""),i=g(r.text??"");return c!==null&&i!==null&&c<i?[o]:[]});return n.find(r=>r!==t)??n[0]??Se}function Et(e){return Ae(e?.themes,e?.selected)}const St=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function At(e){const t=u(f(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!==l.surface||t.line!==l.line)&&(r["--theme-surface-2"]=n),r}const Te=["heading","body","label"],Tt={heading:"Headings",body:"Body",label:"Labels"};function bt(e){if(!e)return null;for(const t of Te)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}const K=["headingLarge","headingMedium","headingSmall","accent","body","label"],It={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},be=8,Ie=200;function Re(e){if(typeof e!="number"||!Number.isFinite(e))return null;const t=Math.round(e);return t>=be&&t<=Ie?t:null}function Ce(e){const t={};for(const n of K)t[n]=Re(e?.[n]);return t}function Ct(e){const t=Ce(e),n={};for(const r of K){const o=t[r];o!==null&&(n[`--size-${r}`]=`${o}px`)}return n}const De=["square","small","large"],Me="small";function Oe(e){return De.includes(e??"")?e:Me}function Dt(e){return M(we[Oe(e)])}const p=0,W=40,ye={min:p,max:W,step:1},we={square:0,small:null,large:16},C={"--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 D(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(W,Math.max(p,Math.round(t))):null}function M(e,t){if(ne(t)&&t!=="px"){if(typeof e!="number"||!Number.isFinite(e))return{};const r=Math.max(0,e);return Object.fromEntries(Object.entries(C).map(([o,c])=>{const i=Math.round(r*c*1e4)/1e4;return[o,i===0?"0":re(i,t)]}))}const n=D(e);return n===null?{}:Object.fromEntries(Object.entries(C).map(([r,o])=>{const c=n*o/16;return[r,c===0?"0":`${c}rem`]}))}function Mt(e){return(D(e)??p)*C["--sf-button-radius"]}function Ot(e,t){const n=oe(e,t,"radius",ye);return n!==null?M(n,t):M(D(e)??p)}const He=["none","soft","lifted"],Le="soft",j="none",Ne=["tight","normal","roomy"],ke="normal",Pe="normal",Fe=["none","lift","highlight"],$e="lift",Ue="highlight";import{DEFAULT_SHADOW_COLOR as Bt}from"efficient-easel/screen/lib/document/shadow-values";function V(e){return He.includes(e??"")?e:Le}function Ge(e){return Ne.includes(e??"")?e:ke}function Z(e){return Fe.includes(e??"")?e:$e}function yt(e){const t=V(e);return t===j?void 0:t}function wt(e){const t=Ge(e);return t===Pe?void 0:t}function Ht(e){const t=Z(e);return t===Ue?void 0:t}function Lt(e,t,n){const r=te(t);return r===ee?{}:V(e)!==j||Z(n)==="lift"?{"--sf-shadow-color":r}:{}}const Ye=["normal","tight","compressed"],q="normal";function J(e){return Ye.includes(e??"")?e:q}function Nt(e){const t=J(e);return t===q?void 0:t}function kt(e){switch(J(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}const Q=["authored","sentence"],Pt={case:"authored",weight:null,weightStrong:null,italicStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},O=100,y=900,ze=24,Be=200;function x(e,t,n){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),n))}function w(e){const t=x(e?.weight,O,y),n=E(Q,"authored",e?.case),r=c=>c==null?t:x(c,O,y),o=c=>E(Q,n,c);return{case:n,weight:t,weightStrong:x(e?.weightStrong,O,y),italicStrong:typeof e?.italicStrong=="boolean"?e.italicStrong:null,maxPx:x(e?.maxPx,ze,Be),weight2:r(e?.weight2),weight3:r(e?.weight3),case2:o(e?.case2),case3:o(e?.case3)}}function Ft(e){const t=w(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 $t(e){return w({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 Ut(e){const t=w(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 H="siteTheme";function Xe(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{[H]:{selected:n,themes:t.themes}}}function Gt(e){return Xe(e?.[H])[H]}export{pe as ACCENT_DARKEN_STEPS,rt as BRAND_INKS,Ne as CARD_GAPS,He as CARD_SHADOWS,ye as CORNER_RADIUS_GRID,W as CORNER_RADIUS_MAX,p as CORNER_RADIUS_MIN,De as CORNER_STYLES,we as CORNER_STYLE_TO_PX,ke as DEFAULT_CARD_GAP,Le as DEFAULT_CARD_SHADOW,Me as DEFAULT_CORNER_STYLE,q as DEFAULT_HEADING_COMPRESSION,Pt as DEFAULT_HEADING_TYPOGRAPHY,$e as DEFAULT_HOVER_EFFECT,Bt as DEFAULT_SHADOW_COLOR,Rt as DEFAULT_SIZES,l as DEFAULT_SURFACES,et as DEFAULT_SWITCH_SHOWN,se as DEFAULT_THEMES,ve as DEFAULT_THEME_MODE,ae as DEFAULT_THEME_VALUE,it as GRADE_LABEL,Q as HEADING_CASES,Ye as HEADING_COMPRESSIONS,Be as HEADING_MAX_PX_MAX,ze as HEADING_MAX_PX_MIN,y as HEADING_WEIGHT_MAX,O as HEADING_WEIGHT_MIN,Fe as HOVER_EFFECTS,Pe as IDENTITY_CARD_GAP,j as IDENTITY_CARD_SHADOW,Ue as IDENTITY_HOVER_EFFECT,F as OVERLAY_INK_DARK,fe as OVERLAY_INK_LIGHT,de as READABILITY_AA,ge as READABILITY_AA_LARGE,It as SCALE_OF_STEP,H as SITE_THEME_KEY,K as SIZE_STEPS,Ie as TEXT_SIZE_MAX,be as TEXT_SIZE_MIN,k as THEME_DAY_END_HOUR,N as THEME_DAY_START_HOUR,Qe as THEME_MODES,Ze as THEME_MODE_KEY,ce as THEME_STORAGE_KEY,St as THEME_SURFACE_KEYS,Je as THEME_SWITCH_HIDE,qe as THEME_SWITCH_KEY,Te as TYPE_GROUPS,Tt as TYPE_GROUP_LABELS,m as accentInk,pt as bandPresetFor,xt as bandPresetIndex,ot as brandTheme,nt as buildThemeBootScript,wt as cardGapAttr,yt as cardShadowAttr,kt as compressionMetrics,v as contrastRatio,M as cornerRadiusTokens,Dt as cornerStyleTokens,Et as darkBandIndex,Ae as darkPresetIndex,ut as darkerAccents,at as fillIsDark,st as gradeContrast,Nt as headingCompressionAttr,$t as headingTypographyFromRow,Ft as headingTypographyStyle,Ut as headingTypographyToRow,Ht as hoverEffectAttr,ie as isDayHour,Ge as normalizeCardGap,V as normalizeCardShadow,D as normalizeCornerRadius,Oe as normalizeCornerStyle,J as normalizeHeadingCompression,w as normalizeHeadingTypography,Z as normalizeHoverEffect,Re as normalizeSize,Ce as normalizeSizes,P as normalizeTheme,u as normalizeThemeColors,tt as resolveTheme,_e as resolvedButtonInk,B as sectionBandTone,f as selectedThemeColors,Lt as shadowColorTokens,dt as siteButtonPaint,Mt as siteButtonRadiusPx,Ot as siteCornerRadiusTokens,Xe as siteThemeMetadata,Gt as siteThemeOf,_t as surfacePresetIndex,mt as surfaceTwoTone,ft as themeAccentStyle,T as themeButtonColour,$ as themeButtonInk,ht as themeButtonStyle,lt as themeColorStyle,he as themeLightInk,gt as themePresetAccentVars,At as themeSurfaceStyle,ct as themeSwatchColors,bt as typeScaleGroupOfClassName,Ct as typeSizesStyle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as o,Fragment as _,jsxs as j}from"react/jsx-runtime";import{useEffect as i,useRef as A,useState as l}from"react";import B from"./Reel.js";import{BOX_TAB_SHAPES as S}from"../../format/lib/reel.js";import{parseOption as E}from"
|
|
1
|
+
"use client";import{jsx as o,Fragment as _,jsxs as j}from"react/jsx-runtime";import{useEffect as i,useRef as A,useState as l}from"react";import B from"./Reel.js";import{BOX_TAB_SHAPES as S}from"../../format/lib/reel.js";import{parseOption as E}from"efficient-shell/format";import{BoxTabPaneContext as F}from"./BoxTabPaneContext.js";import{markedChildren as c}from"../../format/lib/marked-children.js";function L({children:u,className:b,style:d,shape:m}){const s=A(null),[a,f]=l([]),p=E(S,"tabs",m),[h,x]=l(0);i(()=>{const t=s.current;if(!t)return;const r=()=>{const g=c(t,"data-tab-label");f(g.map((v,T)=>v.dataset.tabLabel?.trim()||`Tab ${T+1}`))};r();const e=new MutationObserver(r);return e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tab-label"]}),()=>e.disconnect()},[]);const n=a.length?Math.min(h,a.length-1):0;return i(()=>{const t=s.current;t&&c(t,"data-tab-label").forEach((r,e)=>{r.hidden=a.length>1&&e!==n})},[a,n]),j(_,{children:[a.length>1&&o(B,{slides:a.map(t=>({name:t,process:""})),active:n,shape:p,tone:"surface",label:"Tabs",ref:t=>{t&&(t.onclick=r=>{const e=r.target?.closest?.("[data-idx]")?.getAttribute("data-idx");e!=null&&x(Number(e))})}}),o("div",{ref:s,"data-box-tabs":!0,className:b,style:d,children:o(F.Provider,{value:"tabs",children:u})})]})}export{L as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{HideTaker as o}from"../../../../../components/ViewHideRoot.js";import{CUSTOM_HTML_SCOPE_ATTR as s,customHtmlDrawn as T}from"../../../custom-css.js";import{CustomHTMLMeta as _}from"../../../../../../format/lib/document/blocks/general/CustomHTML/meta.js";const p={..._,render:({html:n,id:r})=>{const{scoped:m,inner:t}=T(n??"",String(r??""));return m?e(o,{[s]:r,dangerouslySetInnerHTML:{__html:t}}):e(o,{dangerouslySetInnerHTML:{__html:t}})}};export{p as CustomHTMLRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as a,Fragment as m}from"react/jsx-runtime";import{readHidable as s}from"efficient-easel/draw";import{useBoxCell as d}from"../../../../../components/InBoxContext.js";import l from"../../../../../components/LocationMap.js";import{hasMapCoords as u}from"../../../../../../format/lib/map-styles.js";import{LocationMapMeta as c}from"../../../../../../format/lib/document/blocks/general/LocationMap/meta.js";import{parseOption as x}from"
|
|
1
|
+
import{jsx as a,Fragment as m}from"react/jsx-runtime";import{readHidable as s}from"efficient-easel/draw";import{useBoxCell as d}from"../../../../../components/InBoxContext.js";import l from"../../../../../components/LocationMap.js";import{hasMapCoords as u}from"../../../../../../format/lib/map-styles.js";import{LocationMapMeta as c}from"../../../../../../format/lib/document/blocks/general/LocationMap/meta.js";import{parseOption as x}from"efficient-shell/format";const h="relative overflow-hidden h-full min-h-[560px] max-view-desktop:h-auto max-view-desktop:min-h-0 max-view-desktop:aspect-square",p="relative overflow-hidden grow shrink-0 max-view-wide:shrink basis-0 min-h-[560px] max-view-desktop:basis-auto max-view-desktop:h-auto max-view-desktop:min-h-0 max-view-desktop:aspect-square",w=new Set(["auto","dark","light"]),t=e=>s(e).text.trim();function f(e){return a(l,{...e,takesViewHide:!0,boxClass:d()?.fillingColumn?p:h})}const L={...c,render:e=>{const o=Number(e.lat),i=Number(e.lng),n=e.editor?.isEditing===!0;if(!n&&!u(o,i))return a(m,{});const r=e.mapTheme;return a(f,{name:t(e.name),state:t(e.state),country:t(e.country),lat:o,lng:i,mapsUrl:t(e.mapsUrl),mapTheme:x([...w],"auto",r),editing:n})}};export{L as LocationMapRender};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{SPLITTABLE_SECTIONS as P}from"../../../../../format/lib/sections/section-head-placement.js";import{AUTO_COLUMN as A,BUTTON as M,DIM as W,INNER_BOX as r,SH_LINK as R,TEXT as h,smallText as C}from"./section-to-box-row-parts.js";import{labelTextSeed as D}from"../../../../../format/lib/document/text-seeds.js";import{labelStyle as x,token as a}from"../../../../../format/lib/document/seed-parts.js";import{tabletKey as H}from"efficient-easel/draw";import{BOX_DESKTOP_LINE as w,STACK_BELOW_PROP as K}from"../../../content/box-stack-line.js";import{PHONE_EDGE as F}from"../../../../../format/lib/content/view-lines.js";import{ownEntry as u}from"../../../../../format/lib/own-entry.js";import{parseOption as z}from"
|
|
1
|
+
import{SPLITTABLE_SECTIONS as P}from"../../../../../format/lib/sections/section-head-placement.js";import{AUTO_COLUMN as A,BUTTON as M,DIM as W,INNER_BOX as r,SH_LINK as R,TEXT as h,smallText as C}from"./section-to-box-row-parts.js";import{labelTextSeed as D}from"../../../../../format/lib/document/text-seeds.js";import{labelStyle as x,token as a}from"../../../../../format/lib/document/seed-parts.js";import{tabletKey as H}from"efficient-easel/draw";import{BOX_DESKTOP_LINE as w,STACK_BELOW_PROP as K}from"../../../content/box-stack-line.js";import{PHONE_EDGE as F}from"../../../../../format/lib/content/view-lines.js";import{ownEntry as u}from"../../../../../format/lib/own-entry.js";import{parseOption as z}from"efficient-shell/format";const U=["standard","editorial","simple","essay"];function E(e){if(e==="ProductGrid")return"shelf";const t=u(P,e)?.headStyle;return z(U,"standard",t)}const se={standard:64,editorial:60,simple:36,essay:28,shelf:20},j={SectionHeader:"accent",FAQ:"accent",FitmentFinder:"accent",FitmentTable:"accent",SpecTable:"accent",RelatedProducts:"accent",Collections:"accentNum"};function $(e){if(e==="SectionHeader")return{num:"num",title:"title",description:"description",link:!0};const t=u(P,e);if(!t)throw new Error(`section-head-looks: "${e}" has no head row in SPLITTABLE_SECTIONS`);return{num:t.num,title:t.title,description:t.description,link:t.headRows.includes("linkText")&&t.headRows.includes("linkHref")}}function le(e,t,n){const i=`editorial:${e}|${t}|${n}`,o=p.get(i);if(o)return o;const l=y({num:e,title:t,description:n,link:!1});return p.set(i,l),l}const O={[K]:w},m={top:0,right:0,bottom:1,left:0};import{token as he}from"../../../../../format/lib/document/seed-parts.js";const _=(e,t,n,i)=>({sizeToken:{step:e,px:i,fluid:{minPx:t,vw:n}}}),c=(e,t,n={})=>C(e,{...a("label",t),...n}),d=(e,t)=>({kind:"text",key:e,role:"heading",props:h,style:{textStyle:"heading-2",...t}}),f=F,v=w,T=(e,t,n,i,o={})=>({kind:"text",key:e,props:{...W,align:"right",alignPhone:"left",...n?{maxWidth:n,maxWidthPhone:f}:{},...o},style:{textStyle:"body-5",fontRole:"heading",alignPhone:"left",...a("body",t),...i,...o}}),b={...M,align:"right",alignPhone:"left",...R},S=e=>({kind:"button",key:"linkText",href:"linkHref",variant:"ghost",props:b,style:{...x(e),color:"labels"}}),N=(e,t,n)=>{const i=n.role==="heading"?{tag:"h2"}:{};return{kind:"block",type:"Text",when:o=>o[e]===void 0,props:{...h,...i,...n.props,text:t,_partStyles:{text:{...n.role==="eyebrow"?G(D()):{},...n.style}}}}},G=e=>e._partStyles.text??{},s={widthFitPhone:"fill"};function X(e){if(e.kind!=="group")return e;if(e.name==="Words"){const t=e.props;return{...e,props:typeof t=="function"?(n,i)=>({...t(n,i),...s}):{...t,...s}}}return{...e,parts:e.parts.map(X)}}function Q(e,t){const n=u(j,e),i=n==="accent",o=c(t.num,14,{color:i?"accent":"labels"}),l=n==="accentNum"&&o.kind==="text"?{...o,mark:"accentLead"}:o,k=d(t.title,i?{..._("headingMedium",36,5,64),case:"upper",lineHeight:.95,letterSpacing:-.025}:{...a("headingMedium",56,36),case:"none",lineHeight:1,letterSpacing:-.03}),g=e==="Collections";return{kind:"group",name:"Header",props:{...r,direction:"row",align:"end",justify:"between",gap:40,gapPhone:12,share:"content",sectionBorder:m,sectionPaddingBottom:24,sectionPaddingBottomPhone:20},parts:[{kind:"group",name:"Title",props:{...r,...s,direction:"row",align:"end",gap:40,gapPhone:12,share:"content"},parts:[{kind:"group",name:"Number",props:{...r,...s,align:"start",gap:12},parts:[{kind:"image",key:"logoSrc",alt:"logoAlt",props:{aspect:"auto",contained:!1}},l,...g?[N(t.num,"==01== / Collections",l)]:[]]},{kind:"group",name:"Heading",props:{...r,...s},parts:[k,...g?[N(t.title,`Three ranges,
|
|
2
2
|
one standard.`,k)]:[]]}]},{kind:"group",name:"Words",props:{...r,...s,gap:12,maxWidth:340,maxWidthPhone:f},parts:[...t.description?[T(t.description,14,void 0,{lineHeight:1.5})]:[],...t.link?[S(14)]:[],...g?[{kind:"block",type:"ButtonBlock",props:{...b,variant:"ghost",label:"View all",href:"/wheels",_partStyles:{label:S(14).style}}}]:[]]}]}}function L(e,t){return e.kind==="text"?t.includes(e.key)?{...e,mark:"accentItalic"}:e:e.kind==="group"?{...e,parts:e.parts.map(n=>L(n,t))}:e}function y(e){const t=d(e.title,{..._("headingMedium",40,5.5,80),case:"upper",weight:500,lineHeight:1,letterSpacing:-.03});return{kind:"group",name:"Header",props:{...r,direction:"row",align:"end",justify:"between",gap:40,gapPhone:14,share:"content",sectionBorder:m,sectionPaddingBottom:32,...O},parts:[{kind:"group",name:"Title",props:{...r,direction:"row",align:"end",gap:40,gapPhone:14,share:"content",...O},parts:[{kind:"group",name:"Number",props:{...r,sectionPaddingBottom:8},parts:[{...c(e.num,13),props:{...h,...A}}]},L(t,[e.title])]},{kind:"group",name:"Words",props:{...r,sectionPaddingBottom:4,maxWidth:360,[H("maxWidth")]:v,maxWidthPhone:f},parts:e.description?[T(e.description,14,void 0,{lineHeight:1.5},{[H("align")]:"left"})]:[]}]}}function B(e,t){return{kind:"group",name:"Header",props:{...r,gap:16,gapPhone:16},parts:[c(e.num,13),d(e.title,t)]}}const I=[["para",{...x(13),weight:400,lineHeight:1,letterSpacing:.22}],["sm",{...a("headingMedium",40,28),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["md",{...a("headingMedium",48,32),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["lg",{...a("headingMedium",56,36),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["xl",{...a("headingMedium",64,40),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}]],V=e=>I.some(([t])=>t===e.titleSize)?e.titleSize:"lg";function q(e){return{kind:"group",name:"Header",props:{...r,direction:"row",align:"center",justify:"between",gap:16,share:"content",stickTop:!0,sectionBorder:m,sectionPaddingTop:12,sectionPaddingBottom:12},parts:[{kind:"group",name:"Title",props:{...r,direction:"row",align:"end",gap:24,share:"content"},parts:[c(e.num,13,{color:"labels",letterSpacing:.22,lineHeight:1}),...I.map(([t,n])=>({...d(e.title,n),when:i=>V(i)===t}))]},{kind:"group",name:"Words",props:{...r,direction:"row",align:"center",justify:"end",gap:20,share:"content"},parts:[...e.description?[T(e.description,13,340,{lineHeight:1.4})]:[],...e.link?[S(13)]:[]]}]}}function ce(e){return E(e)==="shelf"?{titleSize:"the Header Box's title Text part: its size, as the old shelf title drew it (lib/document/blocks/general/section-head-looks)"}:{}}const p=new Map,J={...a("headingMedium",44,32),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02};function de(e){const t=p.get(e);if(t)return t;const n=$(e),i=E(e),o=i==="editorial"?y(n):i==="simple"?B(n,J):i==="essay"?B(n,{...a("headingMedium",38,28,"headingSmall"),case:"upper",lineHeight:1,letterSpacing:-.02}):i==="shelf"?q(n):Q(e,n);return p.set(e,o),o}export{O as EDITORIAL_LINE,se as HEAD_BELOW,J as SIMPLE_HEADING_LOOK,le as editorialHeadTree,_ as fluidToken,E as headLookOf,ce as headReads,de as headTree,X as headWordsOnPhoneLine,he as token,L as withAccentItalic};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{phoneKey as K}from"efficient-easel/draw";import{SITE_SIDE as Y}from"efficient-easel/screen/lib/content/length-units";import{finiteNumber as r}from"../../../../../format/lib/finite-number.js";import{BLOCK_ALIGN_BOX_WORD as X}from"../../../../../format/lib/content/block-align.js";import{splitImageOverlay as x}from"../../../../../format/lib/document/blocks/general/Split/meta.js";import{INTRO_SIZE_UNIT_KEYS as j,introSizeUnitsOf as T}from"../../../../../format/lib/content/section-type-size.js";import{PART_UNIT_KEY_OF as w}from"../../part-styles.js";import{parseIntroBleedLayout as G}from"../../../../../format/lib/sections/intro-bleed-layout.js";import{SECTION_PIN_STOP_KEY as q,SECTION_PIN_STOP_SCREEN as Z}from"../../../../../format/lib/content/section-sticky.js";import{fluidToken as $,token as n}from"./section-head-looks.js";import{labelStyle as J}from"../../../../../format/lib/document/seed-parts.js";import{BUTTON as c,DIM as B,DROP_COMMON as p,DROP_SIDE_PADDING as O,INNER_BOX as i,NO_PAD as u,NUMBER_TEXT as Q,SAME_KEYS as m,SECTION_BOX as y,TEXT as P,fillFrom as _,lineSides as a,pictureCell as H,siteGutterOf as I,smallText as s,wrapperPad as M,wrapperPadKeys as A}from"./section-to-box-row-parts.js";import{parseOption as ee}from"../../../../../format/lib/parse-option.js";const v=(e,t,o)=>{const f=r(e),k=r(t),S=(V,g)=>g&&g!=="px"?{[V]:g}:{};return{...f===void 0?{}:{size:f,...S(w.size,o?.desktop)},...k===void 0?{}:{sizePhone:k,...S(w.sizePhone,o?.phone)}}},te=e=>G(e.layout)==="stacked",E=e=>Math.min(Math.max(r(e.overlay)??60,0),100),d=e=>r(e)??100,oe={textStyle:"heading-1",sizeToken:{...$("headingLarge",48,7,96).sizeToken,pxPhone:36},weight:500,lineHeight:.95,letterSpacing:-.03},ne=[s("eyebrow",n("label",14)),...[!0,!1].map(e=>({kind:"text",key:"title",role:"heading",props:P,style:{...oe,case:e?"upper":"none"},styleFrom:t=>{const o=T(t);return v(t.titleSizeDesktop,t.titleSizeMobile,{desktop:o.titleDesktop,phone:o.titleMobile})},when:t=>t.uppercase===!0===e})),{kind:"text",key:"body",props:{...B,maxWidth:560},style:{textStyle:"body-1",...n("body",17,16),lineHeight:1.6,paragraphSpacing:24},styleFrom:e=>{const t=T(e);return v(e.bodySizeDesktop,e.bodySizeMobile,{desktop:t.bodyDesktop,phone:t.bodyMobile})}},{kind:"group",name:"Button",props:{...i,align:"start",sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:c}]}],N=e=>`${e}: a Button block has no colour of its own (it follows the site Button colour, as the old fallback did); 0 of 3 live US nodes store one (CLI read, 2026-11-03)`,ie=()=>({name:"Scroll-Over Text",skip:e=>te(e)?"the stacked layout: its words row's height floor (`copyShare*`) and the header subtraction have no Box setting; 0 live US nodes":void 0,boxProps:e=>({...y,direction:"column",justify:"center",align:"start",gap:24,gapPhone:24,share:"content",...u,placement:"left",darken:E(e),darkenStyle:"even",sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:d(e.heightDesktop),sectionHeightModePhone:"fixed",sectionHeightUnitPhone:"%",sectionHeightValuePhone:d(e.heightMobile),[q]:Z}),box:[...m.filter(e=>!String(typeof e=="string"?e:e[0]).startsWith("sectionHeight")),["imageSrc","bgImage"],["imageSrcMobile","bgImagePhone"],["overlay","darken",(e,t)=>E(t)],["heightDesktop","sectionHeightValue",e=>d(e)],["heightMobile","sectionHeightValuePhone",e=>d(e)]],parts:ne,drop:{uppercase:"not a value of its own: it picks the heading part — Case Upper when on, None (as typed) when off",layout:"not a value of its own: the overlay layout is this tree; a stacked node is skipped (`skip`)",copyShareDesktop:"the stacked layout's words-row floor, read only there; a stacked node is skipped",copyShareMobile:"the stacked layout's words-row floor, read only there; a stacked node is skipped",sticky:"the old pin key, read as `stickTop` by the section pin's one reader (lib/content/section-sticky); the Box keeps a stored `stickTop` (SAME_KEYS), and this row is switched off until the stored pages hold `stickTop`",titleSizeDesktop:"read by the heading part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",titleSizeMobile:"read by the heading part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",bodySizeDesktop:"read by the words part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",bodySizeMobile:"read by the words part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",...Object.fromEntries(j.map(e=>[e,"read by its part's `styleFrom`: the unit of that view's Size"])),buttonColor:N("Button color"),buttonTextColor:N("Button text color"),...p}}),D={textStyle:"heading-2",...n("headingMedium",56,36),weight:400,lineHeight:1.05,letterSpacing:-.03},re={textStyle:"body-1",...n("body",16),lineHeight:1.7},z=e=>({kind:"text",key:"body",props:{...B,maxWidth:520},style:{...re,paragraphSpacing:e}}),l={top:0,bottom:0,topPhone:0,bottomPhone:0},b=(e,t)=>typeof e.sectionHeightMode=="string"&&e.sectionHeightMode!=="auto"?{}:{sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:t,sectionHeightModePhone:"auto"},ae=(e,t)=>{const o=b(e,t);return Object.keys(o).length?o:{sectionHeightMode:e.sectionHeightMode,...e.sectionHeightValue===void 0?{}:{sectionHeightValue:e.sectionHeightValue},...e.sectionHeightUnit===void 0?{}:{sectionHeightUnit:e.sectionHeightUnit},sectionHeightModePhone:"auto"}},R={boxShapePhone:"landscape"},U="needs a black-and-white setting on a Box picture (the old photograph followed it, else the site's Photography); 0 live US nodes store it (CLI read, 2026-11-03)",se=(e,t)=>({[e]:t,[K(e)]:t}),de={textStyle:"heading-2",...n("headingMedium",40),weight:500,case:"none",lineHeight:1,letterSpacing:-.02},C=e=>(Array.isArray(e.stats)?e.stats:[]).filter(t=>t&&(String(t.value??"").trim()!==""||String(t.label??"").trim()!=="")),le=()=>({name:"Brand Text",boxProps:(e,t)=>({...y,..._("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...M(e,l),...b(e,100)}),box:[...m,...A(l)],parts:[{kind:"group",name:"Words",props:()=>({...i,justify:"center",gap:28,gapPhone:28,sectionBorder:a({right:1}),sectionBorderPhone:a({}),...u,sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60,sectionPaddingRight:Y}),parts:[s("eyebrow",n("label",14)),{kind:"text",key:"heading",role:"heading",props:P,style:{...D,case:"none"},mark:"accentItalic"},z(28),{kind:"group",name:"Stats",props:{...i,sectionPaddingTop:16,sectionPaddingTopPhone:16},parts:[{kind:"group",name:"Figures",props:e=>({...i,direction:"row",share:"equal",gap:24,gapPhone:24,maxWidth:520,phoneRow:Math.min(Math.max(C(e).length,1),3),...se("sectionBorder",a({top:1})),sectionPaddingTop:28,sectionPaddingTopPhone:28}),parts:[{kind:"list",key:"stats",name:"Stat",of:C,props:{...i,gap:4,gapPhone:4},parts:[{kind:"text",key:"value",props:Q,style:de},s("label",{...n("label",13),color:"labels",letterSpacing:.2})]}]}]}]},H("Picture","imageSrc",R)],drop:{...p,grayscale:U,...O}}),h=e=>{const t=e.textAlign==="center"||e.textAlign==="right"?{align:e.textAlign}:{},o=e.textAlignPhone==="left"||e.textAlignPhone==="center"||e.textAlignPhone==="right"?{alignPhone:e.textAlignPhone}:{};return{...t,...o}},he=e=>e.textAlign==="center"||e.textAlign==="right"?X[e.textAlign]:"stretch",ge=e=>Math.min(Math.max(r(e.overlay)??60,0),100),F=e=>typeof e=="string"&&e.trim()!=="",ce={...c,align:"center",alignPhone:"center",buttonFillOpacity:0,buttonBorder:{width:1},buttonPaddingTop:16,buttonPaddingRight:28,buttonPaddingBottom:16,buttonPaddingLeft:28,buttonPaddingTopPhone:12,buttonPaddingRightPhone:20,buttonPaddingBottomPhone:12,buttonPaddingLeftPhone:20},L=e=>({...H("Picture","imageSrc",(t,o)=>({...F(t.imageSrc)&&x(t.imageOverlay)>0?{darken:x(t.imageOverlay),darkenStyle:"even"}:{},placement:"center",...R,sectionBorder:a(e?{left:1}:{right:1}),...W(e?"left":"right",I(o))}),[{kind:"button",key:"imageBtnText",href:"imageBtnHref",variant:"ghost",props:ce,style:{...J(13,12),letterSpacing:.18}}]),when:t=>t.reverse===!0===e}),W=(e,t)=>{const o=Math.max(60-t,0);return{sectionPaddingLeft:e==="left"?60:o,sectionPaddingRight:e==="right"?60:o}},pe={kind:"group",name:"Words",props:(e,t)=>{const o=e.reverse===!0;return{...i,justify:"center",align:he(e),placement:ee(["left","center","right"],"left",e.textAlign),...ae(e,72),gap:24,gapPhone:24,...F(e.textBgSrc)?{darken:ge(e),darkenStyle:"even"}:{},...u,sectionPaddingTop:100,sectionPaddingBottom:100,...W(o?"right":"left",I(t)),sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60}},box:[["textBgSrc","bgImage"]],parts:[{...s("eyebrow",n("label",14)),styleFrom:h},{kind:"text",key:"title",role:"heading",props:P,style:D,styleFrom:e=>({case:e.uppercase===!0?"upper":"none",...h(e)})},{...z(24),styleFrom:h},{kind:"group",name:"Button",props:{...i,sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:e=>{const t=h(e);return{...c,...t.align?{align:t.align}:{},...t.alignPhone?{alignPhone:t.alignPhone}:{}}}}]}]},ue=()=>({name:"Image & Text Split",boxProps:(e,t)=>({...y,..._("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...M(e,l),...b(e,72)}),box:[...m,...A(l)],parts:[L(!1),pe,L(!0)],drop:{reverse:"not a value of its own: it picks the order — the Picture Box first, or after the Words",uppercase:"not a value of its own: the heading part's Case — Upper when on, None (as typed) when off",textAlign:"read by each words part (its Align) and the Words Box (its Align); left writes nothing, as the old emitted no class",textAlignPhone:"read by each words part as its phone Align",textAlignTablet:"not carried to the words part's own tablet Align (`alignTablet`) yet: no old node stores it (new with the Tablet view's Text alignment row, 0 stored on the US sites 2026-11-06), so nothing moves",overlay:"read by the Words Box: its Darken over the words picture (60 when unset); no picture, no wash",imageOverlay:"read by the Picture Box: its Darken over the image column's picture (40 when unset, none at 0); no picture, no wash",grayscale:U,...p,...O}}),He={IntroBleed:ie(),Manifesto:le(),Split:ue()};export{He as EDITORIAL_SECTION_TO_BOX};
|
|
1
|
+
import{phoneKey as K}from"efficient-easel/draw";import{SITE_SIDE as Y}from"efficient-easel/screen/lib/content/length-units";import{finiteNumber as r}from"../../../../../format/lib/finite-number.js";import{BLOCK_ALIGN_BOX_WORD as X}from"../../../../../format/lib/content/block-align.js";import{splitImageOverlay as x}from"../../../../../format/lib/document/blocks/general/Split/meta.js";import{INTRO_SIZE_UNIT_KEYS as j,introSizeUnitsOf as T}from"../../../../../format/lib/content/section-type-size.js";import{PART_UNIT_KEY_OF as w}from"../../part-styles.js";import{parseIntroBleedLayout as G}from"../../../../../format/lib/sections/intro-bleed-layout.js";import{SECTION_PIN_STOP_KEY as q,SECTION_PIN_STOP_SCREEN as Z}from"../../../../../format/lib/content/section-sticky.js";import{fluidToken as $,token as n}from"./section-head-looks.js";import{labelStyle as J}from"../../../../../format/lib/document/seed-parts.js";import{BUTTON as c,DIM as B,DROP_COMMON as p,DROP_SIDE_PADDING as O,INNER_BOX as i,NO_PAD as u,NUMBER_TEXT as Q,SAME_KEYS as m,SECTION_BOX as y,TEXT as P,fillFrom as _,lineSides as a,pictureCell as H,siteGutterOf as I,smallText as s,wrapperPad as M,wrapperPadKeys as A}from"./section-to-box-row-parts.js";import{parseOption as ee}from"efficient-shell/format";const v=(e,t,o)=>{const f=r(e),k=r(t),S=(V,g)=>g&&g!=="px"?{[V]:g}:{};return{...f===void 0?{}:{size:f,...S(w.size,o?.desktop)},...k===void 0?{}:{sizePhone:k,...S(w.sizePhone,o?.phone)}}},te=e=>G(e.layout)==="stacked",E=e=>Math.min(Math.max(r(e.overlay)??60,0),100),d=e=>r(e)??100,oe={textStyle:"heading-1",sizeToken:{...$("headingLarge",48,7,96).sizeToken,pxPhone:36},weight:500,lineHeight:.95,letterSpacing:-.03},ne=[s("eyebrow",n("label",14)),...[!0,!1].map(e=>({kind:"text",key:"title",role:"heading",props:P,style:{...oe,case:e?"upper":"none"},styleFrom:t=>{const o=T(t);return v(t.titleSizeDesktop,t.titleSizeMobile,{desktop:o.titleDesktop,phone:o.titleMobile})},when:t=>t.uppercase===!0===e})),{kind:"text",key:"body",props:{...B,maxWidth:560},style:{textStyle:"body-1",...n("body",17,16),lineHeight:1.6,paragraphSpacing:24},styleFrom:e=>{const t=T(e);return v(e.bodySizeDesktop,e.bodySizeMobile,{desktop:t.bodyDesktop,phone:t.bodyMobile})}},{kind:"group",name:"Button",props:{...i,align:"start",sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:c}]}],N=e=>`${e}: a Button block has no colour of its own (it follows the site Button colour, as the old fallback did); 0 of 3 live US nodes store one (CLI read, 2026-11-03)`,ie=()=>({name:"Scroll-Over Text",skip:e=>te(e)?"the stacked layout: its words row's height floor (`copyShare*`) and the header subtraction have no Box setting; 0 live US nodes":void 0,boxProps:e=>({...y,direction:"column",justify:"center",align:"start",gap:24,gapPhone:24,share:"content",...u,placement:"left",darken:E(e),darkenStyle:"even",sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:d(e.heightDesktop),sectionHeightModePhone:"fixed",sectionHeightUnitPhone:"%",sectionHeightValuePhone:d(e.heightMobile),[q]:Z}),box:[...m.filter(e=>!String(typeof e=="string"?e:e[0]).startsWith("sectionHeight")),["imageSrc","bgImage"],["imageSrcMobile","bgImagePhone"],["overlay","darken",(e,t)=>E(t)],["heightDesktop","sectionHeightValue",e=>d(e)],["heightMobile","sectionHeightValuePhone",e=>d(e)]],parts:ne,drop:{uppercase:"not a value of its own: it picks the heading part — Case Upper when on, None (as typed) when off",layout:"not a value of its own: the overlay layout is this tree; a stacked node is skipped (`skip`)",copyShareDesktop:"the stacked layout's words-row floor, read only there; a stacked node is skipped",copyShareMobile:"the stacked layout's words-row floor, read only there; a stacked node is skipped",sticky:"the old pin key, read as `stickTop` by the section pin's one reader (lib/content/section-sticky); the Box keeps a stored `stickTop` (SAME_KEYS), and this row is switched off until the stored pages hold `stickTop`",titleSizeDesktop:"read by the heading part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",titleSizeMobile:"read by the heading part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",bodySizeDesktop:"read by the words part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",bodySizeMobile:"read by the words part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",...Object.fromEntries(j.map(e=>[e,"read by its part's `styleFrom`: the unit of that view's Size"])),buttonColor:N("Button color"),buttonTextColor:N("Button text color"),...p}}),D={textStyle:"heading-2",...n("headingMedium",56,36),weight:400,lineHeight:1.05,letterSpacing:-.03},re={textStyle:"body-1",...n("body",16),lineHeight:1.7},z=e=>({kind:"text",key:"body",props:{...B,maxWidth:520},style:{...re,paragraphSpacing:e}}),l={top:0,bottom:0,topPhone:0,bottomPhone:0},b=(e,t)=>typeof e.sectionHeightMode=="string"&&e.sectionHeightMode!=="auto"?{}:{sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:t,sectionHeightModePhone:"auto"},ae=(e,t)=>{const o=b(e,t);return Object.keys(o).length?o:{sectionHeightMode:e.sectionHeightMode,...e.sectionHeightValue===void 0?{}:{sectionHeightValue:e.sectionHeightValue},...e.sectionHeightUnit===void 0?{}:{sectionHeightUnit:e.sectionHeightUnit},sectionHeightModePhone:"auto"}},R={boxShapePhone:"landscape"},U="needs a black-and-white setting on a Box picture (the old photograph followed it, else the site's Photography); 0 live US nodes store it (CLI read, 2026-11-03)",se=(e,t)=>({[e]:t,[K(e)]:t}),de={textStyle:"heading-2",...n("headingMedium",40),weight:500,case:"none",lineHeight:1,letterSpacing:-.02},C=e=>(Array.isArray(e.stats)?e.stats:[]).filter(t=>t&&(String(t.value??"").trim()!==""||String(t.label??"").trim()!=="")),le=()=>({name:"Brand Text",boxProps:(e,t)=>({...y,..._("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...M(e,l),...b(e,100)}),box:[...m,...A(l)],parts:[{kind:"group",name:"Words",props:()=>({...i,justify:"center",gap:28,gapPhone:28,sectionBorder:a({right:1}),sectionBorderPhone:a({}),...u,sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60,sectionPaddingRight:Y}),parts:[s("eyebrow",n("label",14)),{kind:"text",key:"heading",role:"heading",props:P,style:{...D,case:"none"},mark:"accentItalic"},z(28),{kind:"group",name:"Stats",props:{...i,sectionPaddingTop:16,sectionPaddingTopPhone:16},parts:[{kind:"group",name:"Figures",props:e=>({...i,direction:"row",share:"equal",gap:24,gapPhone:24,maxWidth:520,phoneRow:Math.min(Math.max(C(e).length,1),3),...se("sectionBorder",a({top:1})),sectionPaddingTop:28,sectionPaddingTopPhone:28}),parts:[{kind:"list",key:"stats",name:"Stat",of:C,props:{...i,gap:4,gapPhone:4},parts:[{kind:"text",key:"value",props:Q,style:de},s("label",{...n("label",13),color:"labels",letterSpacing:.2})]}]}]}]},H("Picture","imageSrc",R)],drop:{...p,grayscale:U,...O}}),h=e=>{const t=e.textAlign==="center"||e.textAlign==="right"?{align:e.textAlign}:{},o=e.textAlignPhone==="left"||e.textAlignPhone==="center"||e.textAlignPhone==="right"?{alignPhone:e.textAlignPhone}:{};return{...t,...o}},he=e=>e.textAlign==="center"||e.textAlign==="right"?X[e.textAlign]:"stretch",ge=e=>Math.min(Math.max(r(e.overlay)??60,0),100),F=e=>typeof e=="string"&&e.trim()!=="",ce={...c,align:"center",alignPhone:"center",buttonFillOpacity:0,buttonBorder:{width:1},buttonPaddingTop:16,buttonPaddingRight:28,buttonPaddingBottom:16,buttonPaddingLeft:28,buttonPaddingTopPhone:12,buttonPaddingRightPhone:20,buttonPaddingBottomPhone:12,buttonPaddingLeftPhone:20},L=e=>({...H("Picture","imageSrc",(t,o)=>({...F(t.imageSrc)&&x(t.imageOverlay)>0?{darken:x(t.imageOverlay),darkenStyle:"even"}:{},placement:"center",...R,sectionBorder:a(e?{left:1}:{right:1}),...W(e?"left":"right",I(o))}),[{kind:"button",key:"imageBtnText",href:"imageBtnHref",variant:"ghost",props:ce,style:{...J(13,12),letterSpacing:.18}}]),when:t=>t.reverse===!0===e}),W=(e,t)=>{const o=Math.max(60-t,0);return{sectionPaddingLeft:e==="left"?60:o,sectionPaddingRight:e==="right"?60:o}},pe={kind:"group",name:"Words",props:(e,t)=>{const o=e.reverse===!0;return{...i,justify:"center",align:he(e),placement:ee(["left","center","right"],"left",e.textAlign),...ae(e,72),gap:24,gapPhone:24,...F(e.textBgSrc)?{darken:ge(e),darkenStyle:"even"}:{},...u,sectionPaddingTop:100,sectionPaddingBottom:100,...W(o?"right":"left",I(t)),sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60}},box:[["textBgSrc","bgImage"]],parts:[{...s("eyebrow",n("label",14)),styleFrom:h},{kind:"text",key:"title",role:"heading",props:P,style:D,styleFrom:e=>({case:e.uppercase===!0?"upper":"none",...h(e)})},{...z(24),styleFrom:h},{kind:"group",name:"Button",props:{...i,sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:e=>{const t=h(e);return{...c,...t.align?{align:t.align}:{},...t.alignPhone?{alignPhone:t.alignPhone}:{}}}}]}]},ue=()=>({name:"Image & Text Split",boxProps:(e,t)=>({...y,..._("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...M(e,l),...b(e,72)}),box:[...m,...A(l)],parts:[L(!1),pe,L(!0)],drop:{reverse:"not a value of its own: it picks the order — the Picture Box first, or after the Words",uppercase:"not a value of its own: the heading part's Case — Upper when on, None (as typed) when off",textAlign:"read by each words part (its Align) and the Words Box (its Align); left writes nothing, as the old emitted no class",textAlignPhone:"read by each words part as its phone Align",textAlignTablet:"not carried to the words part's own tablet Align (`alignTablet`) yet: no old node stores it (new with the Tablet view's Text alignment row, 0 stored on the US sites 2026-11-06), so nothing moves",overlay:"read by the Words Box: its Darken over the words picture (60 when unset); no picture, no wash",imageOverlay:"read by the Picture Box: its Darken over the image column's picture (40 when unset, none at 0); no picture, no wash",grayscale:U,...p,...O}}),He={IntroBleed:ie(),Manifesto:le(),Split:ue()};export{He as EDITORIAL_SECTION_TO_BOX};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hasWords as n}from"../../../sections/section-to-box.js";import{DIM as L,DROP_COMMON as g,DROP_SIDE_PADDING as h,INNER_BOX as r,SAME_KEYS as P,SECTION_BOX as f,TEXT as a,smallText as O,wrapperPad as i,wrapperPadKeys as _}from"./section-to-box-row-parts.js";import{finiteNumber as x}from"../../../../../format/lib/finite-number.js";import{markBoxProps as w,token as A}from"../../../../../format/lib/document/seed-parts.js";import{LOGOS_PH as R,logosScaffoldItems as B}from"../../../../../format/lib/document/blocks/general/Logos/meta.js";import{logosCardSeed as b}from"../../../../../format/lib/document/blocks/general/Logos/card-seed.js";import{PAYMENT_PH as N,paymentScaffoldAssurances as C,paymentScaffoldBadges as I}from"../../../../../format/lib/document/blocks/general/PaymentBadges/meta.js";import{BLOCK_SOURCE_OPTIONS_PROP as s,BLOCK_SOURCE_PROP as t}from"../../../../../format/lib/content/block-sources.js";import{CARD_TEMPLATE_SLOT as k}from"../../../../../format/lib/content/card-template.js";import{BLOCK_ALIGN_BOX_WORD as M,legacyBlockAlignOf as D}from"../../../../../format/lib/content/block-align.js";import{FOOTER_PAYMENT_SEED as H}from"../../../../../format/lib/content/footer.js";import{CELL_SPAN_KEYS as K}from"../../../../../format/lib/content/grid-span.js";import{SECTION_ACCENT_INHERIT as X}from"../../../../../format/lib/content/section-surface.js";import{FOOTER_MARK_SIZES as v,FOOTER_TEXT_PX as z}from"../../../../../format/lib/document/box-footer.js";import{phoneKey as d,readHidable as F}from"efficient-easel/draw";import{parseOption as G}from"
|
|
1
|
+
import{hasWords as n}from"../../../sections/section-to-box.js";import{DIM as L,DROP_COMMON as g,DROP_SIDE_PADDING as h,INNER_BOX as r,SAME_KEYS as P,SECTION_BOX as f,TEXT as a,smallText as O,wrapperPad as i,wrapperPadKeys as _}from"./section-to-box-row-parts.js";import{finiteNumber as x}from"../../../../../format/lib/finite-number.js";import{markBoxProps as w,token as A}from"../../../../../format/lib/document/seed-parts.js";import{LOGOS_PH as R,logosScaffoldItems as B}from"../../../../../format/lib/document/blocks/general/Logos/meta.js";import{logosCardSeed as b}from"../../../../../format/lib/document/blocks/general/Logos/card-seed.js";import{PAYMENT_PH as N,paymentScaffoldAssurances as C,paymentScaffoldBadges as I}from"../../../../../format/lib/document/blocks/general/PaymentBadges/meta.js";import{BLOCK_SOURCE_OPTIONS_PROP as s,BLOCK_SOURCE_PROP as t}from"../../../../../format/lib/content/block-sources.js";import{CARD_TEMPLATE_SLOT as k}from"../../../../../format/lib/content/card-template.js";import{BLOCK_ALIGN_BOX_WORD as M,legacyBlockAlignOf as D}from"../../../../../format/lib/content/block-align.js";import{FOOTER_PAYMENT_SEED as H}from"../../../../../format/lib/content/footer.js";import{CELL_SPAN_KEYS as K}from"../../../../../format/lib/content/grid-span.js";import{SECTION_ACCENT_INHERIT as X}from"../../../../../format/lib/content/section-surface.js";import{FOOTER_MARK_SIZES as v,FOOTER_TEXT_PX as z}from"../../../../../format/lib/document/box-footer.js";import{phoneKey as d,readHidable as F}from"efficient-easel/draw";import{parseOption as G}from"efficient-shell/format";const l={contained:!1},p=(o,e)=>({logos:[{kind:"list",key:o,name:"Logo",flat:!0,parts:[{kind:"block",type:"LogoBlock",box:["src",[e,"alt"]],when:(Z,m)=>n(m?.src)||n(m?.[e])}]}]}),c=o=>{const e=x(o.bandPadding)??40;return{top:e,bottom:e,topPhone:e,bottomPhone:e}},Y={...O("heading",{color:"labels",letterSpacing:.2}),props:{...a,align:"center"}},j={name:"Logos",boxProps:o=>({...f,direction:"column",gap:32,...i(o,c(o))}),box:[...P,..._(c),["bandPadding","sectionPaddingTop",(o,e)=>i(e,c(e)).sectionPaddingTop]],parts:[Y,{kind:"core",keep:["columns","logoHeight","grayscale"],rename:{logosPerRow:"columns"},props:l,slots:p("items","alt")}],drop:{...g,...h,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)",headPlacement:"a Logos band has no split head (not in SPLITTABLE_SECTIONS): no stored node can hold one, and the converted block stores own-box"}},W={kind:"group",name:"Mark",keepEmpty:!0,parts:[],props:w(4,"main",{sectionCorners:2})},E={top:24,bottom:24,topPhone:24,bottomPhone:24},U={name:"Payment Methods",boxProps:o=>({...f,direction:"column",...i(o,E)}),box:[...P,..._(E)],parts:[{kind:"group",name:"Methods",props:{...r,align:"center",gap:20,gapPhone:20,sectionBorder:{top:1,bottom:1},sectionPaddingTop:32,sectionPaddingBottom:32},parts:[{...O("heading",{color:"labels"}),props:{...a,align:"center"}},{kind:"core",keep:[],as:"Logos",derive:{reads:[t,s],props:o=>n(o[t])?{[t]:o[t],...o[s]!==void 0?{[s]:o[s]}:{}}:{}},props:{...l,look:"cards",grayscale:!1},slots:o=>({...p("badges","label"),...n(o[t])?{[k]:[b()]}:{}})},{kind:"group",name:"Reassurance",props:{...r,direction:"row",wrap:!0,justify:"center",gap:24,gapPhone:24,phoneRow:2,[d("share")]:"content"},parts:[{kind:"list",key:"assurances",name:"Line",of:o=>(Array.isArray(o.assurances)?o.assurances:[]).filter(e=>n(e?.text)),props:{...r,direction:"row",align:"center",gap:8,gapPhone:8,phoneRow:2,[d("share")]:"content"},item:o=>F(o.text).hidden?{props:{_hidden:!0}}:{},parts:[W,{kind:"text",key:"text",props:{...a,align:"center"},style:{...A("label",13),color:"labels",lineHeight:1.5}}]}]}]}],drop:{...g,...h,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)"}},S=o=>D(o.align)??"left",T=o=>G(["sm","md"],"sm",o.size),y=12,u={name:"Payment logos",boxProps:o=>({...r,direction:"row",wrap:!0,align:"center",justify:M[S(o)],gap:y,gapPhone:y,phoneRow:2,[d("share")]:"content"}),box:[...K],parts:[{kind:"text",key:"lead",props:L,styleFrom:o=>({size:z[T(o)],lineHeight:1.5})},{kind:"core",keep:[],as:"Logos",derive:{reads:[t,s],props:o=>({logoHeight:v[T(o)].mark,align:S(o),...n(o[t])?{[t]:o[t],...o[s]!==void 0?{[s]:o[s]}:{}}:{}})},props:{...l,look:"marks",grayscale:!1,sectionAccent:X},slots:o=>({...p("methods","label"),...n(o[t])?{[k]:[b()]}:{}})}],drop:{size:"read as the wall's Logo height (S 16, M 20) and the lead's size (the footer size table, 12 / 13)",align:"read as the Box's justify and the wall's own Alignment (start is left, end is right)",editing:"the editor's preview flag, never a stored setting: the editor tells every block it is editing"}},mo={Logos:j,PaymentBadges:U,FooterPayment:u,PaymentLogosBlock:u},go=()=>({heading:R.heading,items:B()}),ho=()=>({heading:N.heading,badges:I(),assurances:C()}),Po=()=>({...H,methods:[]});export{mo as LOGOS_SECTION_TO_BOX,Po as footerPaymentPressStarter,go as logosPressStarter,ho as paymentPressStarter};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
`),markup:
|
|
1
|
+
import g from"isomorphic-dompurify";import E from"postcss";import _ from"postcss-selector-parser";import{sanitizeHtml as h,sectionIds as $}from"./sanitize.js";import{faceClassBaseCss as T}from"../../../format/lib/text-style-face.js";import{styleElementText as A}from"../../../format/lib/document/style-text.js";const w="data-sf-custom-html",v=/^[A-Za-z][\w-]*$/;function d(n){return v.test(n)?`${n}-`:""}function S(n,e=w){return`[${e}="${n}"]`}const y=new Set(["media","supports","container"]),x=new Set(["behavior","-moz-binding"]),N=/expression\s*\(|javascript:|vbscript:/i,R=/^[a-z][a-z0-9+.-]*:/i,D=new Set(["none","initial","inherit","unset","revert","revert-layer","default","auto","normal","ease","ease-in","ease-out","ease-in-out","linear","step-start","step-end","infinite","reverse","alternate","alternate-reverse","forwards","backwards","both","running","paused"]);function L(n){return n.replace(/\\([0-9a-f]{1,6})\s?|\\(.)/gi,(e,r,o)=>r?String.fromCodePoint(Math.min(+`0x${r}`,1114111)||65533):o??"")}function C(n){const e=n.trim();return e.startsWith("//")?!0:R.test(e)&&!/^https:\/\//i.test(e)}const O=/\/\*[\s\S]*?(?:\*\/|$)/g;function P(n,e){const r=L(e.replace(O,"")).replace(O,"");if(N.test(r))return!1;for(const o of r.matchAll(/url\(\s*(['"]?)(.*?)\1\s*\)/gi))if(C(o[2]))return!1;if(n.startsWith("--")||/(?:image-set|image|src)\(/i.test(r)){for(const o of r.matchAll(/(['"])(.*?)\1/g))if(C(o[2]))return!1}return!0}function b(n){const e=n.find(r=>r.type==="combinator");return e?e.value.trim()||" ":null}function k(n,e,r="",o=new Set){let a;try{a=_().astSync(n)}catch{return null}const l=[];for(const i of a.nodes){const u=i.nodes;if(u.length===0)return null;let p=!1;if(i.walkNesting(()=>{p=!0}),p)continue;r&&i.walkIds(f=>{o.has(f.value)&&(f.value=r+f.value)});const s=u[0],t=s.type==="tag"&&/^(html|body)$/i.test(s.value)||s.type==="pseudo"&&s.value.toLowerCase()===":root",c=s.type==="universal",m=b(u.slice(1));if((t||c)&&(m==="~"||m==="+"))c&&l.push(`${e} ${String(i).trim()}`);else if(t||c){const f=u.slice(1).map(String).join("").trimEnd();l.push(f?e+f:c?`${e} *`:e)}else{if(s.type==="combinator"&&/^[~+]$/.test(s.value.trim()))continue;l.push(`${e} ${String(i).trim()}`)}}return l.length?l.join(", "):null}function z(n,e,r=w,o=new Set){if(!v.test(e))return"";let a;try{a=E.parse(n)}catch{return""}const l=S(e,r),i=new Map;a.walkComments(s=>{s.remove()});const u=s=>{for(const t of[...s.nodes??[]])t.type==="atrule"?y.has(t.name.toLowerCase())&&t.nodes?u(t):t.remove():t.type==="rule"&&t.remove()},p=s=>{for(const t of[...s.nodes??[]])if(t.type==="atrule"){const c=t.name.toLowerCase();if(/^(-[a-z]+-)?keyframes$/.test(c)){const m=t.params.trim();if(!/^[A-Za-z_][\w-]*$/.test(m)||D.has(m.toLowerCase()))t.remove();else{const f=`${m}-${e}`;i.set(m,f),t.params=f}}else y.has(c)&&t.nodes?p(t):t.remove()}else if(t.type==="rule"){const c=k(t.selector,l,r===w?d(e):"",o);c===null?t.remove():(t.selector=c,u(t))}else t.type==="decl"&&t.remove()};return p(a),a.walkDecls(s=>{if(x.has(s.prop.toLowerCase())||!P(s.prop,s.raws.value?.raw??s.value)){s.remove();return}i.size>0&&/^(-[a-z]+-)?animation(-name)?$/i.test(s.prop)&&(s.value=s.value.replace(/(?<![\w-])[A-Za-z_][\w-]*(?![\w(-])/g,t=>i.get(t)??t))}),a.walkAtRules(s=>{s.nodes&&s.nodes.length===0&&s.remove()}),A(a.toString()).trim()}const M={ALLOWED_TAGS:["style","#text"],ALLOWED_ATTR:[],KEEP_CONTENT:!1,FORBID_CONTENTS:[],FORCE_BODY:!0,RETURN_DOM_FRAGMENT:!0};function I(n,e=""){const r=h(n,{idPrefix:d(e)});if(!/<style/i.test(n))return{css:"",markup:r,ids:new Set};const o=$(n),a=g.sanitize(n,M).querySelectorAll("style");return{css:Array.from(a,i=>i.textContent??"").join(`
|
|
2
|
+
`),markup:r,ids:o}}function U(n,e){const{css:r,markup:o,ids:a}=I(n,e),l=r?z(r,e,void 0,a):"",u=[v.test(e)?T(S(e),o):"",l].filter(Boolean).join(`
|
|
3
|
+
`);return u?{scoped:!0,inner:`<style>${u}</style>${o}`}:{scoped:!1,inner:o}}export{w as CUSTOM_HTML_SCOPE_ATTR,U as customHtmlDrawn,d as customHtmlIdPrefix,S as customHtmlScope,z as scopeCustomCss,I as splitCustomHtml};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{HEADER_TYPE as o,FOOTER_TYPE as a}from"efficient-easel/draw";import{parseOption as E}from"
|
|
1
|
+
import{HEADER_TYPE as o,FOOTER_TYPE as a}from"efficient-easel/draw";import{parseOption as E}from"efficient-shell/format";const s=new Set(["Hero","HeroSingle","IntroBleed"]),n={min:56,max:140,default:88},d={min:0,max:120,step:2,default:32},l=`var(--sf-header-h, ${n.default}px)`,_="--sf-header-set-h",T="--sf-header-h",R=`var(${_}, ${n.default}px)`,D="sf-header-clearance",P="sf-sticky-underheader";function c(e){return e?.find(t=>t?.type&&t.type!==o)??null}function p(e){const t=c(e)?.type;return!t||!s.has(t)}function h(e){return!p(e)}function C(e){return!!e?.some(t=>t?.type===o)}function m(e){return!e||e.length===0?!1:!e.some(t=>t?.type===o||t?.type===a)}const u=["auto","shared","own"],S="auto",f="topSpace",O="data-top-space";function i(e){return E(u,S,e)}function x(e,t){const r=i(e?.props?.[f]);return r==="own"?!0:r==="shared"?!1:p(t)}function L(e,t){return x(e,t)?"own":null}export{S as DEFAULT_TOP_SPACE,s as FULLBLEED_LEAD_SECTIONS,D as HEADER_CLEARANCE_CLASS,T as HEADER_DRAWN_HEIGHT_VAR,l as HEADER_HEIGHT_CSS,n as HEADER_HEIGHT_PX,d as HEADER_MENU_GAP_PX,R as HEADER_SET_HEIGHT_CSS,_ as HEADER_SET_HEIGHT_VAR,P as STICKY_UNDERHEADER_CLASS,O as TOP_SPACE_ATTR,u as TOP_SPACE_MODES,f as TOP_SPACE_PROP,m as isStandaloneSectionDocument,c as leadSection,p as pageClearsHeader,C as pageHasHeaderSection,h as pageLeadsWithFullBleed,x as pageTakesTopSpace,i as resolveTopSpace,L as topSpaceMarker};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parseIntroBleedLayout as r}from"../../../format/lib/sections/intro-bleed-layout.js";import{leadSection as n,pageLeadsWithFullBleed as a}from"./header-clearance.js";import{parseOption as l}from"
|
|
1
|
+
import{parseIntroBleedLayout as r}from"../../../format/lib/sections/intro-bleed-layout.js";import{leadSection as n,pageLeadsWithFullBleed as a}from"./header-clearance.js";import{parseOption as l}from"efficient-shell/format";const _="data-lead-ink",f="data-header-ink",u=["auto","light","dark"],d="auto";function i(e){return e.type==="IntroBleed"?r(e.props?.layout)!=="stacked":!0}function p(e){const t=n(e);return t&&a(e)&&i(t)?"light":null}function s(e){return l(u,d,e)}function k(e,t){const o=s(e);return o==="auto"?p(t):o}export{d as DEFAULT_HEADER_INK,_ as HEADER_INK_ATTR,u as HEADER_INK_MODES,f as HEADER_INK_OVERRIDE_ATTR,p as leadSectionInk,k as resolveHeaderInk,s as resolveHeaderInkMode};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{defaultTextStyles as Y,textStyleCaseCss as le}from"efficient-easel/text-styles/model";import{resolveViewValue as
|
|
2
|
-
`)}function
|
|
1
|
+
import{defaultTextStyles as Y,textStyleCaseCss as le}from"efficient-easel/text-styles/model";import{resolveViewValue as Z}from"efficient-easel/draw";import{viewKey as w}from"../../../format/lib/animation/views.js";import{FONT_OPTIONS as ce,normalizeFonts as B}from"../../../format/lib/fonts.js";import{PHONE_MEDIA as de,TABLET_MEDIA as pe,viewOverrides as H,viewRules as U}from"../content/view-values.js";import{STYLE_ID_OF_ROLE as fe,TEXT_STYLE_ATTR as ue,paragraphRules as X,partSpacingOf as ge}from"../document/part-styles.js";import{FACE_SIZE as he,faceClassOf as q}from"../../../format/lib/text-style-face.js";import{partColourName as Q,partInkCss as me}from"../../../format/lib/document/part-inks.js";import{compressionMetrics as Se,headingTypographyFromRow as ye,normalizeHeadingCompression as I,normalizeSizes as ee}from"../../../format/lib/theme.js";import{finiteNumber as v}from"../../../format/lib/finite-number.js";import{nonEmptyString as P}from"../../../format/lib/non-empty-string.js";const j=e=>e==="sentence"?"none":void 0,ne=["font","color","size","sizeTablet","sizePhone","weight","italic","lineHeight","lineHeightTablet","lineHeightPhone","letterSpacing","letterSpacingTablet","letterSpacingPhone","paragraphSpacing","paragraphSpacingTablet","paragraphSpacingPhone","letterCase","largestSize","largestSizeTablet","largestSizePhone"],O=["desktop","tablet","phone"],k=(e,i)=>w(e,i);function L(e,i,t,n=U()){return Z("textSize",i,e.sizeTablet,e.sizePhone,n)[t]}const xe=[["lineSpacing","lineHeight","line"],["letterSpacing","letterSpacing","letter"]];function R(e){for(const[i,t,n]of xe)for(const s of O)if(e===k(i,s))return{key:w(t,s),view:s,spacing:n};return{key:e,view:"desktop",spacing:null}}function x(e){const i={};for(const t of ne)e[t]!==void 0&&(i[t]=e[t]);return i}function F(e,i){const{auto:t,...n}=e,s=new Set(i??[]),r=ne.filter(o=>s.has(o)&&e.values[o]===void 0);return r.length?{...n,auto:r}:n}function te(e){const i=e.fonts,t=e.sizes,n=e.typography,s=Se(e.compression),r={"heading-1":{font:P(i.heading),size:v(t.headingLarge),weight:v(n.weight),lineHeight:s.lineHeight,letterSpacing:s.letterSpacing,letterCase:j(n.case),largestSize:v(n.maxPx)},"heading-2":{font:P(i.heading2),size:v(t.headingMedium),weight:v(n.weight2),lineHeight:s.lineHeight,letterSpacing:s.letterSpacing,letterCase:j(n.case2)},"heading-3":{font:P(i.heading3),size:v(t.headingSmall),weight:v(n.weight3),lineHeight:s.lineHeight,letterSpacing:s.letterSpacing,letterCase:j(n.case3)},"body-1":{font:P(i.body),size:v(t.body)},"body-5":{font:P(i.label),size:v(t.label)}};return Y().map(({id:o,kind:l,name:d})=>({id:o,kind:l,name:d,values:x(r[o]??{})}))}function N(e){return Array.isArray(e)&&e.every(t=>t&&typeof t=="object"&&typeof t.id=="string"&&(t.kind==="heading"||t.kind==="body")&&typeof t.name=="string")?e.map(t=>F({...t,values:x(t.values??{})},Array.isArray(t.auto)?t.auto:void 0)):null}function je(e){return N(e)??[]}function ie(e){return N(e)??Y().map(({id:i,kind:t,name:n})=>({id:i,kind:t,name:n,values:{}}))}function M(e,i){const t=te(i),n=N(e);return n?n.map(s=>{const r={...V(t,s.id)};for(const o of s.auto??[])delete r[o];return{...s,values:x({...r,...s.values})}}):t}const V=(e,i)=>e.find(t=>t.id===i)?.values??{},se=["heading-1","heading-2","heading-3"];function Le({saved:e,old:i,cur:t,next:n,sizeOf:s,panelView:r="desktop"}){const o=te(i),l=ie(e),d=M(l,i),c=[],f=n.map(a=>{const S=t.find(g=>g.id===a.id),h=l.find(g=>g.id===a.id);if(!S||!h){const g=be([a],s,r)[0],T=g.values.color;return T===void 0?g:{...g,values:{...g.values,color:Q(T)}}}const p={...h.values},b=new Set(h.auto??[]),y=a.values,_=S.values,z=[...new Set([...Object.keys(y),...Object.keys(_)])].filter(g=>JSON.stringify(y[g])!==JSON.stringify(_[g])),D=g=>R(g).spacing==="letter";z.sort((g,T)=>Number(D(g))-Number(D(T)));for(const g of z){const{key:T,view:re,spacing:K}=R(g),$=T,E=y[g];if(E===void 0){delete p[$],V(o,a.id)[$]!==void 0&&(c.push([a.id,$]),b.add($));continue}if(b.delete($),K==="line")p[$]=C(E/100,3);else if(K==="letter"){const W={...d.find(A=>A.id===a.id)?.values??{}};for(const A of z)y[A]===void 0&&delete W[R(A).key];const G=x({...W,...p}),J=L(G,s({...a,values:G}),re);p[$]=J?C(E/J,4):0}else p[$]=E}return F({id:a.id,kind:a.kind,name:a.name,values:x(p)},b)});let u=i.compression;if(c.some(([a,S])=>(S==="lineHeight"||S==="letterSpacing")&&se.includes(a))&&I(u)!=="normal"){for(const a of se){const S=f.find(p=>p.id===a);if(!S)continue;const h={...S.values};for(const p of["lineHeight","letterSpacing"])c.some(([b,y])=>b===a&&y===p)||h[p]===void 0&&!(S.auto??[]).includes(p)&&(h[p]=V(o,a)[p]);S.values=x(h)}u="normal"}return{saved:f,old:{...i,compression:u}}}function Re(e,i){const t={text_styles:e.saved};return e.old.compression!==i.compression&&(t.heading_compression=I(e.old.compression)),t}const C=(e,i)=>Number(e.toFixed(i)),oe=(e,i)=>O.indexOf(e)<O.indexOf(i)?i:e;function Fe(e,i,t="desktop"){return e.map(n=>{const s={...n.values},r=i(n);for(const o of O){const l=w("lineHeight",o),d=n.values[l],c=n.values[w("letterSpacing",o)];delete s[l],d!==void 0&&(s[k("lineSpacing",o)]=C(d*100,1));const f=oe(o,t);c!==void 0&&(s[k("letterSpacing",o)]=C(c*L(n.values,r,f),f===o?2:4))}return{id:n.id,kind:n.kind,name:n.name,values:s}})}function be(e,i,t="desktop"){return e.map(n=>{const s=n.values,r={...s};for(const c of O)delete r[k("lineSpacing",c)],delete r[k("letterSpacing",c)];const o={id:n.id,kind:n.kind,name:n.name,values:x(r)},l={...o.values},d=i({...o,values:{...o.values}});for(const c of O){const f=s[k("lineSpacing",c)],u=s[k("letterSpacing",c)];if(typeof f=="number"&&(l[w("lineHeight",c)]=C(f/100,3)),typeof u=="number"){const m=L(o.values,d,oe(c,t));l[w("letterSpacing",c)]=m?C(u/m,4):0}}return{...o,values:x(l)}})}function Me(e){const i={fonts:B({heading:e.heading_font??void 0,heading2:e.heading_2_font??void 0,heading3:e.heading_3_font??void 0,body:e.body_font??void 0,accent:e.accent_font??void 0,label:e.label_font??void 0}),sizes:ee({headingLarge:e.heading_size_large_px,headingMedium:e.heading_size_medium_px,headingSmall:e.heading_size_small_px,accent:e.accent_size_px,body:e.body_size_px,label:e.label_size_px}),compression:I(e.heading_compression),typography:ye(e)},t=e.text_styles??null,n=Array.isArray(t)?ae(M(t,i),i):i;return{fonts:B(n.fonts),sizes:ee(n.sizes),compression:I(n.compression),typography:n.typography,textStyles:t}}function ae(e,i){const t=m=>e.find(a=>a.id===m)?.values??{},n=t("heading-1"),s=t("heading-2"),r=t("heading-3"),o=t("body-1"),l=t("body-5"),d=i.fonts,c=i.sizes,f=i.typography,u=m=>m==="none"?"sentence":"authored";return{fonts:{...d,heading:n.font??d.heading,heading2:s.font??n.font??d.heading2,heading3:r.font??n.font??d.heading3,body:o.font??d.body,label:l.font??d.label},sizes:{...c,headingLarge:n.size??null,headingMedium:s.size??null,headingSmall:r.size??null,body:o.size??null,label:l.size??null},compression:i.compression,typography:{...f,case:u(n.letterCase),weight:n.weight??null,maxPx:n.largestSize??null,weight2:s.weight??null,weight3:r.weight??null,case2:u(s.letterCase),case3:u(r.letterCase)}}}function Ve(e){const i=N(e.textStyles);if(!i||i.every(s=>Object.keys(s.values).length===0&&!s.auto))return e;const t={fonts:e.fonts??{},sizes:e.sizes??{},compression:String(e.headingCompression??"normal"),typography:e.headingTypography??{}},n=ae(M(i,t),t);return{...e,fonts:n.fonts,sizes:n.sizes,headingCompression:n.compression,headingTypography:n.typography}}function De(e){const i=[];for(const t of e){const n=t.values,s=`.${q(t)}`,r=`[${ue}="${t.id}"]`,o=`${s}, ${r}`,l=[],d=n.font!==void 0?ce.find(m=>m.key===n.font)?.cssVar:void 0;if(d&&l.push(`font-family: var(${d})`),n.size!==void 0){const m=n.largestSize!==void 0?Math.min(n.size,n.largestSize):n.size;l.push(`font-size: ${m}px`)}const c=me(n.color);c&&l.push(`color: ${c}`),n.italic===!0&&l.push("font-style: italic"),n.weight!==void 0&&l.push(`font-weight: ${n.weight}`);const f=[];n.lineHeight!==void 0&&f.push(`line-height: ${n.lineHeight}`),n.letterSpacing!==void 0&&f.push(`letter-spacing: ${n.letterSpacing}em`),t.kind==="body"&&l.push(...f);const u=le(n.letterCase);u&&t.kind==="body"&&l.push(`text-transform: ${u}`),n.paragraphSpacing&&l.push(`--sf-part-para: ${n.paragraphSpacing}px`),l.length&&i.push(`${o} { ${l.join("; ")} }`),t.kind==="heading"&&f.length&&i.push(`${o}, ${s}:is(h1, h2, h3, h4), ${r}:is(h1, h2, h3, h4) { ${f.join("; ")} }`),t.kind==="heading"&&u&&i.push(`${r}, ${s}:is(h1, h2, h3, h4) { text-transform: ${u} }`),n.paragraphSpacing&&(i.push(`*:has(> ${r}) { --sf-part-para: ${n.paragraphSpacing}px }`),i.push(...X(`:is(${o})`,`*:has(> ${r})`))),i.push(...ze(t,o,s,r))}return i.join(`
|
|
2
|
+
`)}function ze(e,i,t,n){const s=e.values,r=H("textSize",s.size,s.sizeTablet,s.sizePhone),o=H("textSize",s.largestSize,s.largestSizeTablet,s.largestSizePhone),l=H("same",s.lineHeight,s.lineHeightTablet,s.lineHeightPhone),d=H("same",s.letterSpacing,s.letterSpacingTablet,s.letterSpacingPhone),c=H("spacing",s.paragraphSpacing,s.paragraphSpacingTablet,s.paragraphSpacingPhone),f=Z("textSize",s.size,s.sizeTablet,s.sizePhone,U()),u=ve[e.id],m=[];for(const[a,S]of[["tablet",pe],["phone",de]]){const h=[],p=[],b=f[a],y=o[a],_=r[a]===void 0&&y===void 0||b===void 0?void 0:y===void 0?b:Math.min(b,y);_!==void 0&&p.push(`font-size: ${_}px`);const z=[];l[a]!==void 0&&z.push(`line-height: ${l[a]}`),d[a]!==void 0&&z.push(`letter-spacing: ${d[a]}em`),e.kind==="body"&&p.push(...z),c[a]!==void 0&&p.push(`--sf-part-para: ${c[a]}px`),p.length&&h.push(`${i} { ${p.join("; ")} }`),e.kind==="heading"&&z.length&&h.push(`${i}, ${t}:is(h1, h2, h3, h4), ${n}:is(h1, h2, h3, h4) { ${z.join("; ")} }`),c[a]!==void 0&&h.push(`*:has(> ${n}) { --sf-part-para: ${c[a]}px }`),c[a]!==void 0&&!s.paragraphSpacing&&h.push(...X(`:is(${i})`,`*:has(> ${n})`)),_!==void 0&&u&&h.push(`.sf-themed-content { --size-${u}: ${_}px !important }`),h.length&&m.push(`@media ${S} { ${h.join(" ")} }`)}return m}const ve=Object.fromEntries(Object.entries(he).map(([e,{step:i}])=>[e,i]));function Ke(e){return e!==!0&&e!==!1?"":`em.text-accent { font-style: ${e?"italic":"normal"} }`}function We(e){return e?fe[e]:void 0}function $e(e){const i=ge(e);return x({font:e.font,color:e.color===void 0?void 0:Q(e.color),size:e.size,weight:e.weight,italic:e.italic,lineHeight:i.lineHeight,letterSpacing:i.letterSpacingEm,paragraphSpacing:e.paragraphSpacing,letterCase:e.case})}function Ge(e){return Object.keys($e(e)).length>0}function Je({saved:e,old:i,styleId:t,values:n}){const s=ie(e);return{saved:_e(s,t,n),old:i}}function _e(e,i,t){return e.map(n=>n.id===i?F({...n,values:x({...n.values,...t})},n.auto):n)}function Ye(e){const i=e.filter(t=>t.kind==="body").map(t=>Number(/^body-(\d+)$/.exec(t.id)?.[1])).filter(t=>Number.isInteger(t)&&t>0);return i.length?`body-${Math.max(...i)}`:"body-1"}export{Ke as accentItalicCss,Le as applyListChange,Ye as eyebrowStyleId,q as faceClassOf,be as fromPanelStyles,Ge as hasStyleChange,Re as listChangePatch,ie as listToWrite,$e as partStyleToTextStyleValues,Je as pushIntoStyle,M as resolveTextStyles,_e as setStyleValues,Me as siteTextFromRow,je as storedTextStyles,We as styleIdOfRole,De as textStylesCss,te as textStylesFromOld,ae as textStylesToOld,Ve as themeWithTextStyles,Fe as toPanelStyles,L as viewSizeOf};
|