efficient-web-builder 56.0.0 → 57.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +52 -0
- package/dist/editor/components/HeroPartPanel.js +1 -1
- package/dist/editor/components/SectionEditor.js +1 -1
- package/dist/editor/components/SiteFields.d.ts +2 -1
- package/dist/editor/components/SiteFields.js +1 -1
- package/dist/editor/components/storefront-editor.css +5 -5
- package/dist/editor/components/useHostDocumentBridge.js +1 -1
- package/dist/editor/components/useSectionToBoxPass.js +1 -1
- package/dist/editor/lib/animation/entrance-fields.d.ts +0 -3
- package/dist/editor/lib/animation/entrance-fields.js +1 -1
- package/dist/editor/lib/animation/fields.js +1 -1
- package/dist/editor/lib/animation/hover-fields.js +1 -1
- package/dist/editor/lib/animation/loop-fields.d.ts +2 -0
- package/dist/editor/lib/animation/loop-fields.js +1 -1
- package/dist/editor/lib/document/controls.d.ts +2 -1
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/editor/lib/document/overrides.js +1 -1
- package/dist/editor/lib/document/panel-drop-empty-headings.js +1 -1
- package/dist/editor/lib/editor-document-adapter.js +1 -1
- package/dist/editor/lib/host-document-bridge.d.ts +2 -1
- package/dist/editor/lib/host-document-bridge.js +1 -1
- package/dist/editor/lib/keyed-store.d.ts +7 -0
- package/dist/editor/lib/keyed-store.js +1 -0
- package/dist/editor/lib/page-live-state.js +1 -1
- package/dist/editor/lib/page-video-frames.d.ts +11 -0
- package/dist/editor/lib/page-video-frames.js +1 -0
- package/dist/editor/lib/pinned-chrome-doc.d.ts +1 -0
- package/dist/editor/lib/pinned-chrome-doc.js +1 -1
- package/dist/editor/lib/sections/new-section-node.js +1 -1
- package/dist/editor/lib/sections/text-layouts.js +1 -1
- package/dist/format/lib/animation/hover.d.ts +2 -3
- package/dist/format/lib/animation/hover.js +1 -1
- package/dist/format/lib/animation/loop.js +1 -1
- package/dist/format/lib/document/passes/settings-groups.js +1 -1
- package/dist/format/lib/document/section-catalog.d.ts +1 -1
- package/dist/format/lib/document/section-catalog.js +14 -2
- package/dist/format/lib/editor-words-catalogue.d.ts +7 -2
- package/dist/format/lib/editor-words-catalogue.js +4 -4
- package/dist/format/lib/editor-words-kept.js +1 -1
- package/dist/format/lib/hero-video.d.ts +10 -0
- package/dist/format/lib/hero-video.js +1 -1
- package/dist/format/lib/sections/active-press-context.d.ts +4 -0
- package/dist/format/lib/sections/active-press-context.js +1 -0
- package/dist/format/lib/sections/section-head-placement.js +1 -1
- package/dist/format/lib/sections/section-presets.d.ts +5 -1
- package/dist/format/lib/sections/section-presets.js +1 -1
- package/dist/format/lib/theme.d.ts +2 -1
- package/dist/format/lib/theme.js +2 -2
- package/dist/format/lib/web-backend.d.ts +9 -0
- package/dist/render/components/{BoxCellWidthContext.d.ts → BoxCellContext.d.ts} +0 -1
- package/dist/render/components/BoxCellContext.js +1 -0
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/ImageBlock.js +1 -1
- package/dist/render/components/LogoBlock.js +1 -1
- package/dist/render/components/Placeholder.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +0 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-strip.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.js +2 -2
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/passes/block-size.js +1 -1
- package/dist/render/lib/document/sanitize.d.ts +1 -0
- package/dist/render/lib/document/sanitize.js +1 -1
- package/package.json +5 -5
- package/dist/render/components/BoxCellWidthContext.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={relatedProducts:"Related Products",documentHeader:"Document Header",documentHeaderBlurb:"A document header — headline, metadata and standfirst.",shrinkToFit:"Shrink to fit"};export{e as KEPT_EDITOR_PHRASES};
|
|
1
|
+
const e={relatedProducts:"Related Products",bundleProducts:"Bundle Products",documentHeader:"Document Header",documentHeaderBlurb:"A document header — headline, metadata and standfirst.",shrinkToFit:"Shrink to fit",tyreFitmentForm:"Tyre Fitment Form"};export{e as KEPT_EDITOR_PHRASES};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ShowWhenRule } from "efficient-shell/format";
|
|
2
|
+
import type { VideoFrame } from "./web-backend.js";
|
|
2
3
|
export declare const VIDEO_SOURCES: readonly ["upload", "youtube"];
|
|
3
4
|
export type VideoSource = (typeof VIDEO_SOURCES)[number];
|
|
4
5
|
export declare const VIDEO_SOURCE_DEFAULT: VideoSource;
|
|
@@ -22,3 +23,12 @@ export declare function loadingShowsOf(props: Readonly<Record<string, unknown>>)
|
|
|
22
23
|
export declare function loadingStill(props: Readonly<Record<string, unknown>>): string | undefined;
|
|
23
24
|
export type LoadingStillHint = "frame-missing-image" | "frame-missing-surface" | "image-missing-frame" | "image-missing-surface";
|
|
24
25
|
export declare function loadingStillHint(props: Readonly<Record<string, unknown>>): LoadingStillHint | undefined;
|
|
26
|
+
export declare const VIDEO_FRAMES_KEY = "videoFrames";
|
|
27
|
+
export declare const VIDEO_FRAMES_NOT_OWN_KEY = "videoFramesNotOwn";
|
|
28
|
+
export type KnownVideoFrame = VideoFrame & {
|
|
29
|
+
noted?: "load" | "save";
|
|
30
|
+
};
|
|
31
|
+
export type FirstFrameHint = "save-makes-frame" | "starts-dark" | "outside" | "unsupported" | "failed" | "image-no-frame";
|
|
32
|
+
export declare function firstFrameHint(props: Readonly<Record<string, unknown>>, frames: Readonly<Record<string, KnownVideoFrame>> | undefined, hasUnsavedEdits: boolean): FirstFrameHint | null | undefined;
|
|
33
|
+
export declare function readyVideoFrame(video: unknown, frames: Readonly<Record<string, KnownVideoFrame>> | undefined): string | undefined;
|
|
34
|
+
export declare function editorVideoFrame(nodeId: unknown, video: unknown, metadata: Readonly<Record<string, unknown>> | undefined): string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mediaValueSrc as
|
|
1
|
+
import{mediaValueSrc as o}from"./media-value.js";const d=["upload","youtube"],l="upload",x={upload:"Upload",youtube:"YouTube"},c=["background","click"],f="background",_={background:"Background",click:"Click to play"};function O(e){return d.includes(e)?e:l}function E(e){return c.includes(e)?e:f}const a=/^[A-Za-z0-9_-]{11}$/,m=/^(?:www\.|m\.|music\.)?(?:youtube\.com|youtube-nocookie\.com|youtu\.be)$/;function b(e){const t=typeof e=="string"?e.trim():"";if(!t)return null;if(a.test(t))return t;let n;try{n=new URL(/^[a-z]+:\/\//i.test(t)?t:`https://${t}`)}catch{return null}if(n.protocol!=="https:"&&n.protocol!=="http:"||!m.test(n.hostname))return null;const r=n.pathname.split("/").filter(Boolean),i=n.hostname.endsWith("youtu.be")?r[0]:r[0]==="watch"?n.searchParams.get("v"):r[0]==="embed"||r[0]==="shorts"||r[0]==="live"||r[0]==="v"?r[1]:null;return i&&a.test(i)?i:null}function A(e,t){const n=t==="click"?"autoplay=1&playsinline=1&rel=0":`autoplay=1&mute=1&loop=1&playlist=${e}&controls=0&playsinline=1&rel=0&disablekb=1`;return`https://www.youtube-nocookie.com/embed/${e}?${n}`}function h(e){return`https://i.ytimg.com/vi/${e}/maxresdefault.jpg`}function k(e){return`https://i.ytimg.com/vi/${e}/hqdefault.jpg`}const L="Play video",w=["frame","image"],I={frame:"Video frame",image:"Image"},V={any:[{field:"loadingShows",is:"image"},{all:[{not:{field:"loadingShows",set:!0}},{field:"poster",set:!0}]}]};function u(e){const t=e.loadingShows;return t==="image"?"image":t!=null&&t!==""?"frame":o(e.poster)?"image":"frame"}function v(e){const[t,n]=u(e)==="image"?[e.poster,e.videoFrame]:[e.videoFrame,e.poster];return o(t)||o(n)||void 0}function D(e){if(o(e.mediaVideo)){if(u(e)==="frame")return o(e.videoFrame)?void 0:o(e.poster)?"frame-missing-image":"frame-missing-surface";if(!o(e.poster))return o(e.videoFrame)?"image-missing-frame":"image-missing-surface"}}const p="videoFrames",g="videoFramesNotOwn";function F(e,t,n){const r=o(e.mediaVideo);if(!r||!t||u(e)!=="frame"||o(e.videoFrame))return;const i=t[r],s=!!o(e.poster);if(i?.state==="ready")return null;if(s)return!i||i.state==="pending"?void 0:"image-no-frame";if(!i)return n?"save-makes-frame":void 0;switch(i.state){case"pending":return i.noted!=="save"&&n?"save-makes-frame":null;case"dark":return"starts-dark";case"outside":return"outside";case"unsupported":return"unsupported";case"failed":return"failed";default:return null}}function y(e,t){const n=o(e),r=n&&t?t[n]:void 0;return r?.state==="ready"&&r.frame?r.frame:void 0}function B(e,t,n){const r=n?.[g];if(!(Array.isArray(r)&&r.includes(e)))return y(t,n?.[p])}export{w as LOADING_SHOWS,V as LOADING_SHOWS_IMAGE,I as LOADING_SHOWS_LABELS,L as PLAY_VIDEO_LABEL,p as VIDEO_FRAMES_KEY,g as VIDEO_FRAMES_NOT_OWN_KEY,c as VIDEO_PLAYBACKS,f as VIDEO_PLAYBACK_DEFAULT,_ as VIDEO_PLAYBACK_LABELS,d as VIDEO_SOURCES,l as VIDEO_SOURCE_DEFAULT,x as VIDEO_SOURCE_LABELS,B as editorVideoFrame,F as firstFrameHint,u as loadingShowsOf,v as loadingStill,D as loadingStillHint,E as normaliseVideoPlayback,O as normaliseVideoSource,b as parseYouTubeId,y as readyVideoFrame,k as youTubeCoverFallbackUrl,h as youTubeCoverUrl,A as youTubeEmbedUrl};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { PressContext } from "./section-presets.js";
|
|
2
|
+
export declare function setActivePressContext(ctx: PressContext | null): PressContext;
|
|
3
|
+
export declare function clearActivePressContext(set: PressContext): void;
|
|
4
|
+
export declare function activePressContext(): PressContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e={};function n(t){return e=t?.theme?{theme:t.theme}:{},e}function r(t){e===t&&(e={})}function o(){return e}export{o as activePressContext,r as clearActivePressContext,n as setActivePressContext};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parseOption as n}from"../parse-option.js";import{withRowsShownWhen as o}from"../document/show-when-attach.js";import{nonEmptyString as d}from"../non-empty-string.js";const l="inline",a=[{label:"In this section",value:"inline"},{label:"In its own box",value:"own-box"}];function h(e){return[e.num,e.title,e.description,e.linkProp].filter(t=>d(t)!==void 0)}const s={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:"
|
|
1
|
+
import{parseOption as n}from"../parse-option.js";import{withRowsShownWhen as o}from"../document/show-when-attach.js";import{nonEmptyString as d}from"../non-empty-string.js";const l="inline",a=[{label:"In this section",value:"inline"},{label:"In its own box",value:"own-box"}];function h(e){return[e.num,e.title,e.description,e.linkProp].filter(t=>d(t)!==void 0)}const s={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"},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"}},w="SectionHeader";function y(e){return e in s}function S(e){return n(a,l,e)}const p=new Set(["Flex"]);function R(e){return!!e?.type&&p.has(e.type)}const i={not:{field:"headPlacement",is:"own-box"}},T={not:i};function b(e,t,r){return o(e,r,i)}export{l as DEFAULT_SECTION_HEAD_PLACEMENT,i as HEAD_ROWS_SHOW_WHEN,T as OWN_BOX_ROWS_SHOW_WHEN,a as SECTION_HEAD_PLACEMENT_OPTIONS,w as SECTION_HEAD_TYPE,s as SPLITTABLE_SECTIONS,y as canSplitHead,b as headFieldsForPlacement,h as headRoleProps,R as parentCapsWidth,S as parseSectionHeadPlacement};
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import { type ThemeValue } from "../theme.js";
|
|
1
2
|
export type NodeDefaults = (type: string) => Record<string, unknown>;
|
|
2
3
|
export type NewNodeId = (type: string) => string;
|
|
3
4
|
export interface PresetNode {
|
|
4
5
|
type: string;
|
|
5
6
|
props: Record<string, unknown>;
|
|
6
7
|
}
|
|
7
|
-
export type
|
|
8
|
+
export type PressContext = {
|
|
9
|
+
theme?: ThemeValue;
|
|
10
|
+
};
|
|
11
|
+
export type SectionPreset = (defaultsFor: NodeDefaults, newId: NewNodeId, ctx?: PressContext) => PresetNode;
|
|
8
12
|
export declare const SECTION_PRESETS: Readonly<Record<string, SectionPreset>>;
|
|
9
13
|
export declare function presetFor(type: string): SectionPreset | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BOX_TYPE as i}from"../document/container-blocks.js";import{headingTextSeed as
|
|
1
|
+
import{BOX_TYPE as i}from"../document/container-blocks.js";import{headingTextSeed as m,labelTextSeed as a}from"../document/text-seeds.js";import{TICKER_SCAFFOLD_ITEMS as x}from"../document/blocks/general/Ticker/meta.js";import{specStripScaffold as d}from"../document/blocks/general/SpecStrip/meta.js";import{darkBandIndex as s,normalizeTheme as h}from"../theme.js";import{SPEC_PAD as u,SPEC_STRIP as g,SPEC_TEXT as B,STRIP_BOX as E,TICKER_PAD as _,TICKER_SMALL as b,TICKER_STRIP as R}from"./strip-shape.js";function n(t,e,o,c={}){return{type:t,props:{...e(t),id:o(t),...c}}}function S(t,e,o){return n(i,t,e,{...o,sectionPaddingTop:void 0,sectionPaddingBottom:void 0})}const C={Manifesto:(t,e)=>({type:i,props:{...t(i),id:e(i),direction:"row",share:"equal",sectionHeightMode:"screen",name:"Brand Text",content:[n(i,t,e,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:40,sectionPaddingRight:40,content:[n("Text",t,e,a()),n("Text",t,e,m()),n("Text",t,e),n("Stats",t,e)]}),S(t,e,{direction:"column",name:"Picture",content:[]})]}}),Split:(t,e)=>({type:i,props:{...t(i),id:e(i),direction:"row",share:"equal",sectionHeightMode:"screen",sectionHeightValue:70,name:"Image & Text Split",content:[n(i,t,e,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:60,sectionPaddingRight:60,content:[n("Text",t,e,a()),n("Text",t,e,m()),n("Text",t,e),n("ButtonBlock",t,e)]}),S(t,e,{direction:"column",name:"Image",content:[n("ImageBlock",t,e)]})]}}),Subscribe:(t,e)=>({type:i,props:{...t(i),id:e(i),direction:"column",name:"Subscribe",content:[n("Text",t,e,m()),n("Text",t,e),n("Form",t,e)]}}),Ticker:(t,e)=>P("Scrolling Bar",R,_,x.map(o=>({text:o.text,style:b,muted:!0})),t,e),SpecStrip:(t,e,o)=>P("Spec Strip",o?.theme?{...g,sectionAccent:s(h(o.theme))}:{...g,sectionBorder:{top:1}},u,d().map(c=>({text:c.text??"",style:B,muted:c.tone==="muted"})),t,e)};function P(t,e,o,c,p,T){return n(i,p,T,{...E,...e,blockSpacing:"gap",padV2:!0,name:t,sectionPaddingTop:o.top,sectionPaddingBottom:o.bottom,sectionPaddingTopPhone:o.topPhone,sectionPaddingBottomPhone:o.bottomPhone,content:c.map(r=>n("Text",p,T,{text:r.text,...r.muted?{tone:"dim"}:{},_partStyles:{text:r.style}}))})}function K(t){return C[t]??null}export{C as SECTION_PRESETS,K as presetFor};
|
|
@@ -73,7 +73,8 @@ export declare function surfaceTwoTone(preset: ThemeColors): string;
|
|
|
73
73
|
export declare function sectionBandTone(preset: ThemeColors): string;
|
|
74
74
|
export declare function bandPresetFor(preset: ThemeColors): ThemeColors;
|
|
75
75
|
export declare function bandPresetIndex(presets: readonly ThemeColors[], page: number): number;
|
|
76
|
-
export declare function darkPresetIndex(presets: readonly ThemeColors[] | null | undefined): number;
|
|
76
|
+
export declare function darkPresetIndex(presets: readonly ThemeColors[] | null | undefined, page?: number): number;
|
|
77
|
+
export declare function darkBandIndex(theme: ThemeValue | null | undefined): number;
|
|
77
78
|
export declare const THEME_SURFACE_KEYS: readonly ["--theme-bg", "--theme-surface", "--theme-surface-2", "--theme-line", "--theme-muted"];
|
|
78
79
|
export declare function themeSurfaceStyle(v?: ThemeValue | null): Record<string, string>;
|
|
79
80
|
export declare const TYPE_GROUPS: readonly ["heading", "body", "label"];
|
package/dist/format/lib/theme.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{contrastRatio as j,hexToRgb as h,parseHexColor as f,readableInk as V,relativeLuminance as x}from"efficient-shell/format";const Z="storefront-theme",Le="sf:theme-mode",
|
|
1
|
+
import{contrastRatio as j,hexToRgb as h,parseHexColor as f,readableInk as V,relativeLuminance as x}from"efficient-shell/format";const Z="storefront-theme",Le="sf:theme-mode",Pe="sf:theme-switch",$e="hide",Fe="light",Ue=!1,R=7,D=18;function q(e){return e>=R&&e<D}function Ge(e){const{mode:t,override:n,switchShown:r,hour:o}=e;return r&&(n==="light"||n==="dark")?n:t==="auto"?q(o)?"light":"dark":t==="light"?"light":"dark"}function Ye(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 j,hexToRgb as h,parseHexColor as f,readableInk as V,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 s={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},J=[{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"}],Q={selected:0,themes:J};function H(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...Q}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function p(e,t,n){const r=h(e),o=h(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 v={light:"#ffffff",dark:"#0a0a0a"},Ye=["light","dark"];function ze(e,t){const n=v[t],r=t==="light"?"#ffffff":"#000000";return{text:n,accent:n,background:e,surface:p(e,r,.1),line:p(e,r,.22),muted:p(n,e,.35),brandInk:t}}function u(e){const t=H(e);return t.themes[t.selected]}function l(e){return{text:e.text,accent:e.accent,background:e.background||s.background,surface:e.surface||s.surface,line:e.line||s.line,muted:e.muted||s.muted}}function Be(e){return{fill:l(e).background,accent:e.accent}}const ee=.4,te=4.5,ne=3,Xe={good:"Good","large-only":"Large text only",hard:"Hard to read"};function We(e){return e>=te?"good":e>=ne?"large-only":"hard"}const re=["#000000","#ffffff"];function d(e){return V(e,re)}const oe=[.25,.4,.55];function Ke(e){const t=h(e);return t===null?[]:oe.map(n=>"#"+[t.r,t.g,t.b].map(r=>Math.round(r*(1-n)).toString(16).padStart(2,"0")).join(""))}function je(e){const t=u(e),n={"--theme-fg":t.text},r=x(t.text);return(r===null||r>=ee)&&(n["--overlay-fg"]=t.text),n}const ce=82;function _(e){return`color-mix(in srgb, ${e} ${ce}%, #000)`}function Ve(e){const t=u(e);return{"--theme-accent":t.accent,"--theme-accent-2":_(t.accent),"--theme-accent-ink":d(t.accent)}}function E(e){const t=e?.button;return t&&f(t)===t.toLowerCase()?t.toLowerCase():null}function Ze(e){const t=u(e),n=E(t),r=N(t);if(n===null&&r===null)return{};const o={};return n!==null&&(o["--theme-btn"]=n,o["--theme-btn-2"]=_(n)),o["--theme-btn-ink"]=r??d(n),o}function N(e){const t=e?.buttonInk;return t&&f(t)===t.toLowerCase()?t.toLowerCase():null}function ie(e,t){return N(e)??d(E(e)??t)}function qe(e){const t=u(e);return{fill:E(t)??t.accent.toLowerCase(),ink:ie(t,t.accent)}}function Je(e){const t={};return H(e).themes.forEach((n,r)=>{const o=l(n);t[`--theme-preset-${r}-accent`]=o.accent,t[`--theme-preset-${r}-accent-2`]=_(o.accent),t[`--theme-preset-${r}-accent-ink`]=d(o.accent),t[`--theme-preset-${r}-bg`]=o.background,t[`--theme-preset-${r}-fg`]=o.text,t[`--theme-preset-${r}-surface`]=o.surface,t[`--theme-preset-${r}-surface-2`]=`color-mix(in srgb, ${o.surface} 60%, ${o.line})`,t[`--theme-preset-${r}-line`]=o.line,t[`--theme-preset-${r}-muted`]=o.muted}),t}const S=e=>{const t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},A=e=>255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055);function O([e,t,n]){const[r,o,c]=[S(e),S(t),S(n)],i=Math.cbrt(.4122214708*r+.5363325363*o+.0514459929*c),a=Math.cbrt(.2119034982*r+.6806995451*o+.1073969566*c),m=Math.cbrt(.0883024619*r+.2817188376*o+.6299787005*c);return[.2104542553*i+.793617785*a-.0040720468*m,1.9779984951*i-2.428592205*a+.4505937099*m,.0259040371*i+.7827717662*a-.808675766*m]}function se([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[A(4.0767416621*r-3.3077115913*o+.2309699292*c),A(-1.2684380046*r+2.6097574011*o-.3413193965*c),A(-.0041960863*r-.7034186147*o+1.707614701*c)]}const T=e=>{const t=h(e);return t===null?[0,0,0]:[t.r,t.g,t.b]},L=(e,t,n)=>[e[0]*n+t[0]*(1-n),e[1]*n+t[1]*(1-n),e[2]*n+t[2]*(1-n)],k=e=>`#${e.map(t=>Math.max(0,Math.min(255,Math.round(t))).toString(16).padStart(2,"0")).join("")}`,P=e=>L(T(e.surface),T(e.line),.6);function Qe(e){return k(P(l(e)))}function $(e){const t=l(e);return k(se(L(O(P(t)),O(T(t.text)),.92)))}function ve(e){return{...e,background:$(e)}}function et(e,t){const n=e[t];if(!n)return-1;const r=$(n);return e.findIndex((o,c)=>c!==t&&f(o.background??"")===r)}const ae=1;function tt(e){const t=(e??[]).findIndex(n=>{const r=x(n.background??""),o=x(n.text??"");return r!==null&&o!==null&&r<o});return t>=0?t:ae}const nt=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function rt(e){const t=l(u(e)),n=`color-mix(in srgb, ${t.surface} 60%, ${t.line})`,r={"--theme-bg":t.background,"--theme-surface":t.surface,"--theme-line":t.line,"--theme-muted":t.muted};return(t.surface!==s.surface||t.line!==s.line)&&(r["--theme-surface-2"]=n),r}const ue=["heading","body","label"],ot={heading:"Headings",body:"Body",label:"Labels"};function ct(e){if(!e)return null;for(const t of ue)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}const F=["headingLarge","headingMedium","headingSmall","accent","body","label"],it={headingLarge:"heading",headingMedium:"heading",headingSmall:"heading",accent:"heading",body:"body",label:"label"},st={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},le=8,he=200;function fe(e){if(typeof e!="number"||!Number.isFinite(e))return null;const t=Math.round(e);return t>=le&&t<=he?t:null}function de(e){const t={};for(const n of F)t[n]=fe(e?.[n]);return t}function at(e){const t=de(e),n={};for(const r of F){const o=t[r];o!==null&&(n[`--size-${r}`]=`${o}px`)}return n}const ge=["square","small","large"],me="small";function xe(e){return ge.includes(e??"")?e:me}function ut(e){return G(_e[xe(e)])}const b=0,pe=40,_e={square:0,small:null,large:16},U={"--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 C(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(pe,Math.max(b,Math.round(t))):null}function G(e){const t=C(e);return t===null?{}:Object.fromEntries(Object.entries(U).map(([n,r])=>{const o=t*r/16;return[n,o===0?"0":`${o}rem`]}))}function lt(e){return(C(e)??b)*U["--sf-button-radius"]}function ht(e){return G(C(e)??b)}const Ee=["none","soft","lifted"],Se="soft",Y="none",Ae=["tight","normal","roomy"],Te="normal",be="normal",Ce=["none","lift","highlight"],Ie="lift",we="highlight",z="#141416";function B(e){return Ee.includes(e??"")?e:Se}function ye(e){return Ae.includes(e??"")?e:Te}function X(e){return Ce.includes(e??"")?e:Ie}function Me(e){return e&&f(e)===e.toLowerCase()?e.toLowerCase():z}function ft(e){const t=B(e);return t===Y?void 0:t}function dt(e){const t=ye(e);return t===be?void 0:t}function gt(e){const t=X(e);return t===we?void 0:t}function mt(e,t,n){const r=Me(t);return r===z?{}:B(e)!==Y||X(n)==="lift"?{"--sf-shadow-color":r}:{}}const Re=["normal","tight","compressed"],W="normal";function K(e){return Re.includes(e??"")?e:W}function xt(e){const t=K(e);return t===W?void 0:t}function pt(e){switch(K(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}const _t=["authored","sentence"],Et={case:"authored",weight:null,weightStrong:null,italicStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},I=100,w=900,De=24,He=200;function g(e,t,n){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),n))}function y(e){const t=g(e?.weight,I,w),n=e?.case==="sentence"?"sentence":"authored",r=c=>c==null?t:g(c,I,w),o=c=>c==="sentence"?"sentence":c==="authored"?"authored":n;return{case:n,weight:t,weightStrong:g(e?.weightStrong,I,w),italicStrong:typeof e?.italicStrong=="boolean"?e.italicStrong:null,maxPx:g(e?.maxPx,De,He),weight2:r(e?.weight2),weight3:r(e?.weight3),case2:o(e?.case2),case3:o(e?.case3)}}function St(e){const t=y(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 At(e){return y({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 Tt(e){const t=y(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 M="siteTheme";function Ne(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{[M]:{selected:n,themes:t.themes}}}function bt(e){return Ne(e?.[M])[M]}export{oe as ACCENT_DARKEN_STEPS,Ye as BRAND_INKS,Ae as CARD_GAPS,Ee as CARD_SHADOWS,pe as CORNER_RADIUS_MAX,b as CORNER_RADIUS_MIN,ge as CORNER_STYLES,_e as CORNER_STYLE_TO_PX,Te as DEFAULT_CARD_GAP,Se as DEFAULT_CARD_SHADOW,me as DEFAULT_CORNER_STYLE,W as DEFAULT_HEADING_COMPRESSION,Et as DEFAULT_HEADING_TYPOGRAPHY,Ie as DEFAULT_HOVER_EFFECT,z as DEFAULT_SHADOW_COLOR,st as DEFAULT_SIZES,s as DEFAULT_SURFACES,Fe as DEFAULT_SWITCH_SHOWN,J as DEFAULT_THEMES,$e as DEFAULT_THEME_MODE,Q as DEFAULT_THEME_VALUE,Xe as GRADE_LABEL,_t as HEADING_CASES,Re as HEADING_COMPRESSIONS,He as HEADING_MAX_PX_MAX,De as HEADING_MAX_PX_MIN,w as HEADING_WEIGHT_MAX,I as HEADING_WEIGHT_MIN,Ce as HOVER_EFFECTS,be as IDENTITY_CARD_GAP,Y as IDENTITY_CARD_SHADOW,we as IDENTITY_HOVER_EFFECT,te as READABILITY_AA,ne as READABILITY_AA_LARGE,it as SCALE_OF_STEP,M as SITE_THEME_KEY,F as SIZE_STEPS,he as TEXT_SIZE_MAX,le as TEXT_SIZE_MIN,D as THEME_DAY_END_HOUR,R as THEME_DAY_START_HOUR,Le as THEME_MODE_KEY,Z as THEME_STORAGE_KEY,nt as THEME_SURFACE_KEYS,Pe as THEME_SWITCH_HIDE,ke as THEME_SWITCH_KEY,ue as TYPE_GROUPS,ot as TYPE_GROUP_LABELS,d as accentInk,ve as bandPresetFor,et as bandPresetIndex,ze as brandTheme,Ge as buildThemeBootScript,dt as cardGapAttr,ft as cardShadowAttr,pt as compressionMetrics,j as contrastRatio,G as cornerRadiusTokens,ut as cornerStyleTokens,tt as darkPresetIndex,Ke as darkerAccents,We as gradeContrast,xt as headingCompressionAttr,At as headingTypographyFromRow,St as headingTypographyStyle,Tt as headingTypographyToRow,gt as hoverEffectAttr,q as isDayHour,ye as normalizeCardGap,B as normalizeCardShadow,C as normalizeCornerRadius,xe as normalizeCornerStyle,K as normalizeHeadingCompression,y as normalizeHeadingTypography,X as normalizeHoverEffect,Me as normalizeShadowColor,fe as normalizeSize,de as normalizeSizes,H as normalizeTheme,l as normalizeThemeColors,Ue as resolveTheme,ie as resolvedButtonInk,$ as sectionBandTone,u as selectedThemeColors,mt as shadowColorTokens,qe as siteButtonPaint,lt as siteButtonRadiusPx,ht as siteCornerRadiusTokens,Ne as siteThemeMetadata,bt as siteThemeOf,Qe as surfaceTwoTone,Ve as themeAccentStyle,E as themeButtonColour,N as themeButtonInk,Ze as themeButtonStyle,je as themeColorStyle,Je as themePresetAccentVars,rt as themeSurfaceStyle,Be as themeSwatchColors,ct as typeScaleGroupOfClassName,at as typeSizesStyle};
|
|
18
|
+
`}const s={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},J=[{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"}],Q={selected:0,themes:J};function H(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...Q}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function p(e,t,n){const r=h(e),o=h(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 v={light:"#ffffff",dark:"#0a0a0a"},ze=["light","dark"];function Be(e,t){const n=v[t],r=t==="light"?"#ffffff":"#000000";return{text:n,accent:n,background:e,surface:p(e,r,.1),line:p(e,r,.22),muted:p(n,e,.35),brandInk:t}}function u(e){const t=H(e);return t.themes[t.selected]}function l(e){return{text:e.text,accent:e.accent,background:e.background||s.background,surface:e.surface||s.surface,line:e.line||s.line,muted:e.muted||s.muted}}function Xe(e){return{fill:l(e).background,accent:e.accent}}const ee=.4,te=4.5,ne=3,We={good:"Good","large-only":"Large text only",hard:"Hard to read"};function Ke(e){return e>=te?"good":e>=ne?"large-only":"hard"}const re=["#000000","#ffffff"];function d(e){return V(e,re)}const oe=[.25,.4,.55];function je(e){const t=h(e);return t===null?[]:oe.map(n=>"#"+[t.r,t.g,t.b].map(r=>Math.round(r*(1-n)).toString(16).padStart(2,"0")).join(""))}function Ve(e){const t=u(e),n={"--theme-fg":t.text},r=x(t.text);return(r===null||r>=ee)&&(n["--overlay-fg"]=t.text),n}const ce=82;function _(e){return`color-mix(in srgb, ${e} ${ce}%, #000)`}function Ze(e){const t=u(e);return{"--theme-accent":t.accent,"--theme-accent-2":_(t.accent),"--theme-accent-ink":d(t.accent)}}function E(e){const t=e?.button;return t&&f(t)===t.toLowerCase()?t.toLowerCase():null}function qe(e){const t=u(e),n=E(t),r=N(t);if(n===null&&r===null)return{};const o={};return n!==null&&(o["--theme-btn"]=n,o["--theme-btn-2"]=_(n)),o["--theme-btn-ink"]=r??d(n),o}function N(e){const t=e?.buttonInk;return t&&f(t)===t.toLowerCase()?t.toLowerCase():null}function ie(e,t){return N(e)??d(E(e)??t)}function Je(e){const t=u(e);return{fill:E(t)??t.accent.toLowerCase(),ink:ie(t,t.accent)}}function Qe(e){const t={};return H(e).themes.forEach((n,r)=>{const o=l(n);t[`--theme-preset-${r}-accent`]=o.accent,t[`--theme-preset-${r}-accent-2`]=_(o.accent),t[`--theme-preset-${r}-accent-ink`]=d(o.accent),t[`--theme-preset-${r}-bg`]=o.background,t[`--theme-preset-${r}-fg`]=o.text,t[`--theme-preset-${r}-surface`]=o.surface,t[`--theme-preset-${r}-surface-2`]=`color-mix(in srgb, ${o.surface} 60%, ${o.line})`,t[`--theme-preset-${r}-line`]=o.line,t[`--theme-preset-${r}-muted`]=o.muted}),t}const S=e=>{const t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},A=e=>255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055);function O([e,t,n]){const[r,o,c]=[S(e),S(t),S(n)],i=Math.cbrt(.4122214708*r+.5363325363*o+.0514459929*c),a=Math.cbrt(.2119034982*r+.6806995451*o+.1073969566*c),m=Math.cbrt(.0883024619*r+.2817188376*o+.6299787005*c);return[.2104542553*i+.793617785*a-.0040720468*m,1.9779984951*i-2.428592205*a+.4505937099*m,.0259040371*i+.7827717662*a-.808675766*m]}function se([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[A(4.0767416621*r-3.3077115913*o+.2309699292*c),A(-1.2684380046*r+2.6097574011*o-.3413193965*c),A(-.0041960863*r-.7034186147*o+1.707614701*c)]}const T=e=>{const t=h(e);return t===null?[0,0,0]:[t.r,t.g,t.b]},k=(e,t,n)=>[e[0]*n+t[0]*(1-n),e[1]*n+t[1]*(1-n),e[2]*n+t[2]*(1-n)],L=e=>`#${e.map(t=>Math.max(0,Math.min(255,Math.round(t))).toString(16).padStart(2,"0")).join("")}`,P=e=>k(T(e.surface),T(e.line),.6);function ve(e){return L(P(l(e)))}function $(e){const t=l(e);return L(se(k(O(P(t)),O(T(t.text)),.92)))}function et(e){return{...e,background:$(e)}}function tt(e,t){const n=e[t];if(!n)return-1;const r=$(n);return e.findIndex((o,c)=>c!==t&&f(o.background??"")===r)}const ae=1;function ue(e,t){const n=(e??[]).flatMap((r,o)=>{const c=x(r.background??""),i=x(r.text??"");return c!==null&&i!==null&&c<i?[o]:[]});return n.find(r=>r!==t)??n[0]??ae}function nt(e){return ue(e?.themes,e?.selected)}const rt=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function ot(e){const t=l(u(e)),n=`color-mix(in srgb, ${t.surface} 60%, ${t.line})`,r={"--theme-bg":t.background,"--theme-surface":t.surface,"--theme-line":t.line,"--theme-muted":t.muted};return(t.surface!==s.surface||t.line!==s.line)&&(r["--theme-surface-2"]=n),r}const le=["heading","body","label"],ct={heading:"Headings",body:"Body",label:"Labels"};function it(e){if(!e)return null;for(const t of le)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}const F=["headingLarge","headingMedium","headingSmall","accent","body","label"],st={headingLarge:"heading",headingMedium:"heading",headingSmall:"heading",accent:"heading",body:"body",label:"label"},at={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},he=8,fe=200;function de(e){if(typeof e!="number"||!Number.isFinite(e))return null;const t=Math.round(e);return t>=he&&t<=fe?t:null}function ge(e){const t={};for(const n of F)t[n]=de(e?.[n]);return t}function ut(e){const t=ge(e),n={};for(const r of F){const o=t[r];o!==null&&(n[`--size-${r}`]=`${o}px`)}return n}const me=["square","small","large"],xe="small";function pe(e){return me.includes(e??"")?e:xe}function lt(e){return G(Ee[pe(e)])}const b=0,_e=40,Ee={square:0,small:null,large:16},U={"--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 C(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(_e,Math.max(b,Math.round(t))):null}function G(e){const t=C(e);return t===null?{}:Object.fromEntries(Object.entries(U).map(([n,r])=>{const o=t*r/16;return[n,o===0?"0":`${o}rem`]}))}function ht(e){return(C(e)??b)*U["--sf-button-radius"]}function ft(e){return G(C(e)??b)}const Se=["none","soft","lifted"],Ae="soft",Y="none",Te=["tight","normal","roomy"],be="normal",Ce="normal",Ie=["none","lift","highlight"],we="lift",Me="highlight",z="#141416";function B(e){return Se.includes(e??"")?e:Ae}function ye(e){return Te.includes(e??"")?e:be}function X(e){return Ie.includes(e??"")?e:we}function Re(e){return e&&f(e)===e.toLowerCase()?e.toLowerCase():z}function dt(e){const t=B(e);return t===Y?void 0:t}function gt(e){const t=ye(e);return t===Ce?void 0:t}function mt(e){const t=X(e);return t===Me?void 0:t}function xt(e,t,n){const r=Re(t);return r===z?{}:B(e)!==Y||X(n)==="lift"?{"--sf-shadow-color":r}:{}}const De=["normal","tight","compressed"],W="normal";function K(e){return De.includes(e??"")?e:W}function pt(e){const t=K(e);return t===W?void 0:t}function _t(e){switch(K(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}const Et=["authored","sentence"],St={case:"authored",weight:null,weightStrong:null,italicStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},I=100,w=900,He=24,Ne=200;function g(e,t,n){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),n))}function M(e){const t=g(e?.weight,I,w),n=e?.case==="sentence"?"sentence":"authored",r=c=>c==null?t:g(c,I,w),o=c=>c==="sentence"?"sentence":c==="authored"?"authored":n;return{case:n,weight:t,weightStrong:g(e?.weightStrong,I,w),italicStrong:typeof e?.italicStrong=="boolean"?e.italicStrong:null,maxPx:g(e?.maxPx,He,Ne),weight2:r(e?.weight2),weight3:r(e?.weight3),case2:o(e?.case2),case3:o(e?.case3)}}function At(e){const t=M(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 Tt(e){return M({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 bt(e){const t=M(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 y="siteTheme";function Oe(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{[y]:{selected:n,themes:t.themes}}}function Ct(e){return Oe(e?.[y])[y]}export{oe as ACCENT_DARKEN_STEPS,ze as BRAND_INKS,Te as CARD_GAPS,Se as CARD_SHADOWS,_e as CORNER_RADIUS_MAX,b as CORNER_RADIUS_MIN,me as CORNER_STYLES,Ee as CORNER_STYLE_TO_PX,be as DEFAULT_CARD_GAP,Ae as DEFAULT_CARD_SHADOW,xe as DEFAULT_CORNER_STYLE,W as DEFAULT_HEADING_COMPRESSION,St as DEFAULT_HEADING_TYPOGRAPHY,we as DEFAULT_HOVER_EFFECT,z as DEFAULT_SHADOW_COLOR,at as DEFAULT_SIZES,s as DEFAULT_SURFACES,Ue as DEFAULT_SWITCH_SHOWN,J as DEFAULT_THEMES,Fe as DEFAULT_THEME_MODE,Q as DEFAULT_THEME_VALUE,We as GRADE_LABEL,Et as HEADING_CASES,De as HEADING_COMPRESSIONS,Ne as HEADING_MAX_PX_MAX,He as HEADING_MAX_PX_MIN,w as HEADING_WEIGHT_MAX,I as HEADING_WEIGHT_MIN,Ie as HOVER_EFFECTS,Ce as IDENTITY_CARD_GAP,Y as IDENTITY_CARD_SHADOW,Me as IDENTITY_HOVER_EFFECT,te as READABILITY_AA,ne as READABILITY_AA_LARGE,st as SCALE_OF_STEP,y as SITE_THEME_KEY,F as SIZE_STEPS,fe as TEXT_SIZE_MAX,he as TEXT_SIZE_MIN,D as THEME_DAY_END_HOUR,R as THEME_DAY_START_HOUR,Le as THEME_MODE_KEY,Z as THEME_STORAGE_KEY,rt as THEME_SURFACE_KEYS,$e as THEME_SWITCH_HIDE,Pe as THEME_SWITCH_KEY,le as TYPE_GROUPS,ct as TYPE_GROUP_LABELS,d as accentInk,et as bandPresetFor,tt as bandPresetIndex,Be as brandTheme,Ye as buildThemeBootScript,gt as cardGapAttr,dt as cardShadowAttr,_t as compressionMetrics,j as contrastRatio,G as cornerRadiusTokens,lt as cornerStyleTokens,nt as darkBandIndex,ue as darkPresetIndex,je as darkerAccents,Ke as gradeContrast,pt as headingCompressionAttr,Tt as headingTypographyFromRow,At as headingTypographyStyle,bt as headingTypographyToRow,mt as hoverEffectAttr,q as isDayHour,ye as normalizeCardGap,B as normalizeCardShadow,C as normalizeCornerRadius,pe as normalizeCornerStyle,K as normalizeHeadingCompression,M as normalizeHeadingTypography,X as normalizeHoverEffect,Re as normalizeShadowColor,de as normalizeSize,ge as normalizeSizes,H as normalizeTheme,l as normalizeThemeColors,Ge as resolveTheme,ie as resolvedButtonInk,$ as sectionBandTone,u as selectedThemeColors,xt as shadowColorTokens,Je as siteButtonPaint,ht as siteButtonRadiusPx,ft as siteCornerRadiusTokens,Oe as siteThemeMetadata,Ct as siteThemeOf,ve as surfaceTwoTone,Ze as themeAccentStyle,E as themeButtonColour,N as themeButtonInk,qe as themeButtonStyle,Ve as themeColorStyle,Qe as themePresetAccentVars,ot as themeSurfaceStyle,Xe as themeSwatchColors,it as typeScaleGroupOfClassName,ut as typeSizesStyle};
|
|
@@ -18,8 +18,16 @@ export type PageDocument = PageBundle & {
|
|
|
18
18
|
version: string | null;
|
|
19
19
|
kind?: string | null;
|
|
20
20
|
live?: PageLiveState;
|
|
21
|
+
videoFrames?: VideoFrames;
|
|
21
22
|
};
|
|
22
23
|
export type PageLiveState = "live" | "changed" | "never";
|
|
24
|
+
export type VideoFrameState = "ready" | "dark" | "pending" | "unsupported" | "outside" | "failed";
|
|
25
|
+
export type VideoFrame = {
|
|
26
|
+
frame: string | null;
|
|
27
|
+
state: VideoFrameState;
|
|
28
|
+
stale: boolean;
|
|
29
|
+
};
|
|
30
|
+
export type VideoFrames = Readonly<Record<string, VideoFrame>>;
|
|
23
31
|
export type SiteScope = {
|
|
24
32
|
siteId?: string;
|
|
25
33
|
};
|
|
@@ -54,6 +62,7 @@ export interface WebsitePages {
|
|
|
54
62
|
save(id: string, doc: PageBundle, expect: SaveExpectation): Promise<{
|
|
55
63
|
version: string | null;
|
|
56
64
|
live?: PageLiveState;
|
|
65
|
+
videoFrames?: VideoFrames;
|
|
57
66
|
}>;
|
|
58
67
|
version?(id: string): Promise<string | null>;
|
|
59
68
|
publish?(id: string, expect?: {
|
|
@@ -6,7 +6,6 @@ export interface BoxCellValue {
|
|
|
6
6
|
bound?: ViewBound;
|
|
7
7
|
}
|
|
8
8
|
export declare const BoxCellContext: import("react").Context<BoxCellValue>;
|
|
9
|
-
export declare const BoxCellWidthContext: import("react").Context<boolean>;
|
|
10
9
|
export declare function useBoxCellHasWidth(): boolean;
|
|
11
10
|
export declare function useCellPictureSizes(fallback: string): string;
|
|
12
11
|
export declare function useSizesWithinCell(own: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as r,Fragment as i}from"react/jsx-runtime";import{createContext as u,useContext as n}from"react";import{cellPictureSizesOf as s,narrowerSizes as l}from"../../format/lib/content/cell-picture-sizes.js";const c={hasWidth:!1},o=u(c);function h(){return n(o).hasWidth}function f(t){const{bound:e}=n(o);return e&&s(e)||t}function C(t){const{bound:e}=n(o);return l(t,e&&s(e))}function m({children:t}){const e=n(o);return e.bound?r(o.Provider,{value:{hasWidth:e.hasWidth},children:t}):r(i,{children:t})}export{o as BoxCellContext,m as NoCellBound,h as useBoxCellHasWidth,f as useCellPictureSizes,C as useSizesWithinCell};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as to,jsx as o,jsxs as Lo}from"react/jsx-runtime";import{useContext as rt,useId as lt}from"react";import it from"./BoxTabs.js";import{BoxTabPaneContext as yo,useBoxPaneKind as ct,useIsTabPane as at}from"./BoxTabPaneContext.js";import dt from"./BoxAccordionRow.js";import{boxPhoneCell as ut,boxPhoneOrder as mt}from"../../format/lib/content/box-phone-place.js";import{CellFillContext as Ve,InBoxContext as He,useCellOfStretchedRow as ft,useFillsCell as Ct}from"./InBoxContext.js";import ht,{InsideSiteColumn as We,useInsideSiteGutter as bt,useSectionRoot as xt}from"./SiteGutterFrame.js";import{BoxSurfaceProvider as pt}from"./BoxSurfaceContext.js";import wt from"./PictureWash.js";import{BoxCellContext as Ge,BoxCellWidthContext as St,NoCellBound as $t}from"./BoxCellWidthContext.js";import{boxCellFractions as Pt}from"../lib/content/box-cell-bound.js";import{boundOf as Rt}from"../../format/lib/content/cell-picture-sizes.js";import{useInSiteHeader as _t}from"./PhoneMenuTools.js";import{useCardRow as vt}from"./CardRowContext.js";import{framesItsCards as At}from"../../format/lib/content/card-place.js";import{HandedMirrorContext as Lt,MirrorContext as yt,RowHandContext as Xe,boxPlace as kt,useHandedMirrorAbove as Ot,useHandedRows as Nt,useMirroredCopy as Bt,useUnderCardBox as Et}from"./MirrorContext.js";import{boxChildrenHand as Ft,isMirroredCopy as Tt,mirrorCardsActs as Ue,mirrorCardsOf as Dt,mirroredBoxClass as It,MIRROR_ROW_CLASS as gt,ownsCard as Mt}from"../../format/lib/content/mirror-cards.js";import{FRAME_BASE as ko,FRAME_GUTTER as Oo}from"./BlockFrame.js";import{containerGapProps as Vt}from"../../format/lib/content/container-gap.js";import{boxLayoutClasses as Ht,boxAlignViewClasses as Wt,boxBlockSpacingClass as Gt,boxBlockSpacingViewClasses as Xt,boxJustifyViewClasses as Ut,boxWrapTabletClass as jt,boxFitContentClass as Kt,boxRowColumnsClass as Jt,boxRowTabletColumnsClass as zt,boxRowTabletShareClass as Yt,boxPhoneCellsShareLine as qt,boxPhoneRowClasses as K,boxPhoneRowFits as Qt,boxShareClasses as M,boxShareVars as Zt,boxWrapClass as on,BOX_GAP_ONLY_CLASS as en}from"../../format/lib/content/box-layout.js";import{boxSeparatorClasses as sn,boxSeparatorSeamClass as tn,boxSeparatorStyle as nn,isStripBox as rn}from"../../format/lib/content/box-separator.js";import{DEFAULT_LOOP_DELAY as ln,DEFAULT_LOOP_DIRECTION as cn,DEFAULT_LOOP_SECONDS as an,isVerticalLoop as dn}from"../../format/lib/animation/index.js";import{LoopTrack as un}from"../lib/animation/LoopTrack.js";import{BOX_CARD_PAD as P,BOX_OWNS_SIDES_CLASS as mn,boxDarkenStyle as fn,boxFillOf as Cn,boxFillViews as hn,boxPlacementClasses as bn,boxSwatchFill as xn,boxWashViews as pn,CARD_SHADOW_CLASS as wn,isBackgroundBox as je}from"../../format/lib/content/box-background.js";import{boxShadowAttrs as Sn,boxShadowOnAnyView as $n,boxShadowViewAttrs as Pn}from"../../format/lib/content/box-shadow.js";import{boxRunsEdgeToEdge as Rn,drawsSiteGutter as _n}from"../../format/lib/content/site-gutter.js";import{boxShapeClass as vn,boxShapeClasses as An}from"../../format/lib/content/box-shape.js";import{BOX_JUMP_ATTR as Ln,BOX_LINK_ATTR as Ke,BOX_LINK_CLASS as Je,BOX_LINKED_CLASS as yn,boxJumpBlocksClass as kn,boxJumpCss as On,boxJumpSlug as Nn,boxLinkOf as Bn}from"../../format/lib/content/box-link.js";import{SiteLink as En}from"../lib/site-runtime.js";import{sectionBorderStyle as ze}from"../../format/lib/content/borders.js";import{finiteNumber as R}from"../../format/lib/finite-number.js";import{padDefaultIn as _,sectionPadAttrs as Fn}from"../lib/content/section-padding.js";import{SECTION_FILL_CLASS as no}from"../../format/lib/content/section-min-height.js";import{ON_MEDIA_INK_STYLE as Tn}from"../../format/lib/content/ink.js";import{sizedBackground as No}from"../../format/lib/sized-image.js";import{PHOTO_HOST_ATTR as Dn,resolveImageTreatment as In}from"../../format/lib/content/image-treatment.js";import{BoxRail as gn,BoxRailStop as Mn,RAIL_STOPS_CLASS as Vn,useTimelineRail as Hn}from"./TimelineRail.js";import{SHARED_PLAIN_ATTR as Wn,sharedColumnsClasses as Gn,sharedColumnsCss as Xn,sharedRowsClasses as Un,sharedRowsCss as jn}from"../lib/content/box-shared-columns.js";import Kn from"./PhotoHoverSheet.js";import{stackGutterClass as Jn,stackLineCss as zn,stackOuterClass as Yn,stackRowClass as qn,storedStackLine as Qn}from"../lib/content/box-stack-line.js";const Bo={"--sf-site-gutter":"0px"},Zn={overflowX:"clip",overflowY:"visible"},or={stretchedRow:!1,fillingColumn:!1,columnsRow:!1},er={desktop:!1,phone:!1},Ye="bg-cover bg-center bg-[image:var(--sf-box-bg)] max-view-tablet:bg-[image:var(--sf-box-bg-p)]",Eo=u=>u==null||u==="",Fo=u=>!Eo(u)&&Number(u)===0;function sr({children:u}){return o(to,{children:u(lt())})}function tr({direction:u,label:qe,tabShape:Qe,gap:To,gapPhone:Ze,gapTablet:ro,justify:V,align:v,wrap:J,share:os,sharePhone:H,shareTablet:N,wrapPhone:es,orderPhone:ss,phoneRow:B,columns:b,columnsTablet:A,separator:m,stackBelow:Do,blockSpacing:Io,bgImage:L,bgImagePhone:go,pictureHover:ts,darken:Mo,darkenStyle:Vo,darkenTablet:ns,darkenPhone:rs,darkenStyleTablet:ls,darkenStylePhone:is,placement:cs,padV2:Ho=!1,border:Wo,borderTablet:Go,borderPhone:Xo,pad:t={},contained:lo=!0,fillHeight:y=!1,shadow:io,shadowTablet:Uo,shadowPhone:jo,justifyTablet:Ko,justifyPhone:as,alignTablet:ds,alignPhone:us,wrapTablet:Jo,blockSpacingTablet:ms,blockSpacingPhone:fs,loop:C,scrollDirection:co=cn,loopSeconds:Cs=an,loopDelay:hs=ln,editing:E=!1,fillColor:zo,fillColorTablet:bs,fillColorPhone:xs,swatch:ps,line:x,upcoming:ws,link:Ss,boxShape:Yo,boxShapePhone:$s,boxShapeTablet:Ps,jumpHighlight:Rs,anchor:_s,sharedSides:l=er,sharedRows:vs=!1,boxId:F,slotCount:As,mirrorCards:qo,content:i,rowTitle:ao,startsOpen:Ls}){const r=vt(),Qo=rt(Ge),ys=Ot(),Zo=Et()&&!(ys&&r!==null),p=Nt(),z=Mt({inCopy:r!==null,nestedCopy:r?.nested===!0,underBox:Zo}),oe=r===null&&!Zo&&p?.ids&&F?p.ids.indexOf(F):-1,Y=oe>=0&&p&&F?kt(p,F,oe):-1,h=Y>=0?p?.hand??null:z&&p?.copies===!0?p.hand:null,e=h?.row?"row":u,a=h?.row?h.row.share:os,ks=h?.row?h.row.phoneReverse?[...i.blockIds??[]].reverse():void 0:ss,q=vs&&!h?.row,T=E?"":Bn(Ss),w=y?"":An(Yo,$s,Ps),Os=!y&&vn(Yo)!=="",k=Nn(Rs,_s),ee=xn({swatch:ps},r?.row),Q=ee??Cn(zo),D=ee?{className:"",style:{}}:hn(zo,bs,xs),se=Q||D.className?{...Q?{backgroundColor:Q}:{},...D.style}:void 0,te=Hn(),Z=x===!0&&e!=="tabs"&&e!=="accordion",n=je(L),oo=_t(),Ns=xt(),Bs=at(),ne=ct(),d=e==="accordion",uo=Ct(),Es=ft(),I=rn(e,m),c=C==="scroll"&&e!=="tabs"&&!d,Fs=Bt(),eo=z||Y>=0&&h!==null,re=h?h.mirror:qo,Ts=Y>=0?Y:r?.index,mo=z&&At(r?.ownerType),le=Ue({direction:e,separator:m,loop:C,line:x,bgImage:L,columns:b,columnsTablet:A,share:a,wrap:J},eo,l.desktop)&&Tt(re,Ts),Ds=Ue({direction:e,separator:m,loop:C,line:x,bgImage:L,columns:b,columnsTablet:A,share:a,wrap:J},eo,l.desktop)&&Dt(re)!==null,g=Jt({direction:e,separator:m,loop:C,line:x,columns:b}),S=zt({direction:e,separator:m,loop:C,line:x,columnsTablet:A}),W=Yt({direction:e,separator:m,loop:C,line:x,columns:b,columnsTablet:A,share:a,shareTablet:N}),f=e==="row"&&!n&&!I&&!c&&!Z&&S===""&&W===""?Qn(Do):void 0,Is=bt(),so=Gn(l,i.blockCount??0,f),gs=(so&&(!r||r.index===0)?Xn(l,i.blockCount??0,f):"")+(q&&(!r||r.index===0)?jn(q,i.blockCount??0):""),ie=Un(q,i.blockCount??0),ce=S!==""?Number(A)>=2:W===""||M(N)!=="",fo=S!==""||W!=="",Ms=fo&&!(S!==""&&Number(A)<2),ae=e==="row"&&!I&&!c&&x!==!0,Co=ae&&!l.phone&&!l.desktop?ut(mt(ks,i.blockIds??[]),{tabletKeepsRow:Ms,editing:E}):void 0,de=Co!==void 0&&!E,Vs=g!==""?Number(b)>=2:M(a)!=="",ue=!n&&!d&&!Ds&&!l.desktop&&!l.phone,ho=ue&&!c?Ut(V,Ko,as):"",me=n||eo?"":It(Fs,e,c?void 0:V,v,ho?Ko:void 0),Hs=ue&&e==="row"?Wt(v,ds,us):"",Ws=!c&&!d&&g===""&&S===""&&!l.desktop?jt(J,Jo):"",fe=[d?"":M(a),e==="row"?Kt(a):"",g,S,W,Gt(d?"gap":Io),sn(e,m),d?"border-t border-line":"",ho,Hs,Ws,d?"":Xt(Io,ms,fs)].filter(Boolean).join(" "),Gs=fe?` ${fe}`:"",Ce=["flex",e==="row"?I||c?"flex-row":`flex-row ${K(B,H,es,Jo)}`:"flex-col",on(c||d?!1:J),n?bn(cs??"center",e):Ht(c||d?void 0:V,d?void 0:v)+(me?` ${me}`:"")].join(" ")+Gs,G=y||n||w||uo?` ${no}`:"",bo=Os?` ${w}`:w?`${G} ${w}`:G,he=Es&&e==="column"&&!n&&!c&&M(a)===""&&(typeof V=="string"&&V!=="start"||ho!==""),be=G||(he?` ${no}`:""),xo=T?` ${yn}`:"",po=n||oo||Ho?"":" py-6",Xs=f===void 0?"":` ${qn(f)}`,xe=f===void 0?"":` ${Jn(f)}`,wo=f===void 0?"":` ${Yn(f)}`,Us=`${ko}${po} ${Oo}${bo}${xo}${xe}${wo}`,js=oo?`${bo}${xo}${wo}`.trim():`w-full${po}${bo}${xo}${wo}`,X=Vt("Flex",To,e==="row"?"inline":"block",Ze,I||c?void 0:ro),pe=Zt(a,N,e==="row"?i.blockCount??0:0),we=I?{...X.style,...nn(e,m)}:X.style,Ks=pe?{...we,...pe}:we,Se=(s="")=>o(i,{className:`${Ce}${le?` ${gt}`:""}${X.className}${be}${Xs}${s?` ${s}`:""}${Z?` ${Vn}`:""}${k?` ${kn(k)}`:""}${so}${ie}`,style:Ks,minEmptyHeight:120,...Co?{cell:Co}:null}),$e=dn(co)?"":tn(e,m),Pe=c?o(un,{direction:co,seconds:Cs,delay:hs,editing:E,copy:s=>Se(s&&$e?`${s} ${$e}`:s)}):Se(),So=e==="tabs"?o(it,{className:`${Ce}${X.className}${uo&&!y&&!n&&!w?"":G}`,style:X.style,shape:Qe,children:Pe}):Pe,$o=d?o(yo.Provider,{value:"accordion",children:So}):ne?o(yo.Provider,{value:!1,children:So}):So,Re=e==="row"&&!n&&(v===void 0||v==="stretch"),Js={stretchedRow:Re,fillingColumn:e==="column"&&(uo||he),columnsRow:g!==""||S!==""||so!==""||ie!==""||e==="row"&&(Array.isArray(a)||Array.isArray(N))||de,...de?{phoneCells:!0}:null,...Re&&ae&&(i.blockCount??0)>=2&&Vs?{picturesFillRow:!0}:null,...fo?{fillFrom:ce?"tablet":"desktop"}:null,...qt(B,H)&&(!fo||ce)?{phoneRowFills:!0}:null,...F?{id:F}:null},_e=r===null?Ft({direction:e,loop:C,bgImage:L,columns:b,mirrorCards:qo},!1):null,ve=_e?o(Xe.Provider,{value:{hand:_e,ids:i.blockIds??[],boxes:[]},children:$o}):p?o(Xe.Provider,{value:null,children:$o}):$o,Ae=o(He.Provider,{value:Js,children:o(Ve.Provider,{value:!1,children:eo?o(yt.Provider,{value:le,children:o(Lt.Provider,{value:!z,children:ve})}):ve})}),zs=ao?.blockCount??0,Le=ne==="accordion"&&!!ao&&(E||zs>0)?o(dt,{startsOpen:Ls===!0,editing:E,title:o(He.Provider,{value:or,children:o(Ve.Provider,{value:!1,children:o(yo.Provider,{value:!1,children:o(ao,{className:`min-w-0 flex-1 ${en}`,minEmptyHeight:24})})})}),children:Ae}):Ae,Po=Z?o(gn,{row:e==="row",stops:i.blockCount??0,children:Le}):Le,Ys=qe?.trim()||(Bs?"":void 0),qs={values:t,frame:po?24:0},Qs=s=>te?o(Mn,{on:te,future:ws===!0,children:s}):s,Zs=s=>T.startsWith("/")?o(En,{href:T,className:Je,"aria-labelledby":s,[Ke]:""}):o("a",{href:T,className:Je,"aria-labelledby":s,[Ke]:""}),ye=(k?On(k):"")+gs+(f===void 0||r&&r.index!==0?"":zn(f)),ke=ye?o("style",{dangerouslySetInnerHTML:{__html:ye}}):null,U=Rn({loop:C,direction:e,scrollDirection:co,bgImage:L}),ot=l.desktop&&so!==""&&!Q&&!D.className&&!ze(Wo,Xo,Go)&&!$n(io,Uo,jo)&&!T&&!w&&!y&&!k&&!_n(lo&&!U,Is)&&Fo(To)&&(Eo(ro)||Fo(ro))&&Ho&&Object.values(t).every(s=>Eo(s)||Fo(s)),et=s=>({...ot?{[Wn]:""}:null,...n?null:{...Sn(io),...Pn(io,Uo,jo)},...k?{[Ln]:k}:null,...s?{id:s}:null}),Oe=g!==""?Number(b):0,st=K(B,H)===K(void 0),tt=(e==="column"||e==="row"&&!I&&!c&&(Oe===1&&st||Oe===0&&i.blockCount===1))&&!n&&!Z&&!oo,Ne=n&&Ns&&!oo,Be=(s,$)=>Qs(o(ht,{contained:lo&&!U,style:U?Bo:void 0,framedClass:Us,fillClass:js,columnClass:`${ko} ${Oo}${be}${xe}`,tabLabel:Ys,pad:n?void 0:qs,border:ze(Wo,Xo,Go),outerAttrs:et($),box:!0,edge:tt,outerStyle:n?void 0:se,outerClass:n?void 0:D.className||void 0,bleed:Ne,children:ke||$?Lo(to,{children:[ke,$?Zs($):null,U?o(We,{children:s}):s]}):U?o(We,{children:s}):s})),Ro=s=>T?o(sr,{children:$=>Be(s,$)}):Be(s),Ee=s=>Qo.bound?o($t,{children:s}):s;if(!n){const s=v===void 0||v==="stretch",$=(M(a)!==""||g!==""||S!=="")&&!Qt(B,H)&&!(W!==""&&M(N)==="")&&(s||K(B)!==K(void 0));if(!(e==="row"?$:e==="column"&&s))return Ro(Ee(Po));const Me=Pt({direction:e,separator:m,loop:C,line:x,share:a,shareTablet:N,sharePhone:H,phoneRow:B,columns:b,columnsTablet:A,stackBelow:Do,shared:l.desktop||l.phone||q,count:As}),nt={hasWidth:!0,...Me?{bound:Rt(Me,Qo.bound)}:null};return Ro(o(Ge.Provider,{value:nt,children:o(St.Provider,{value:!0,children:Po})}))}const j=fn(Mo,Vo),_o=pn({darken:Mo,darkenStyle:Vo,darkenTablet:ns,darkenStyleTablet:ls,darkenPhone:rs,darkenStylePhone:is}),Fe=[mo?"rounded-[inherit]":"",_o.className].filter(Boolean).join(" "),vo=je(go),Te=vo?{"--sf-box-bg":No(L??""),"--sf-box-bg-p":No(go??"")}:{backgroundImage:No(L??""),backgroundSize:"cover",backgroundPosition:"center"},De=In(void 0,void 0,ts),O=De.className?De:null,Ao=Fn({...t,top:R(t.top)??_(P.desktop,t.unit,"desktop"),bottom:R(t.bottom)??_(P.desktop,t.unit,"desktop"),topPhone:R(t.topPhone)??_(P.phone,t.unitPhone,"mobile"),bottomPhone:R(t.bottomPhone)??_(P.phone,t.unitPhone,"mobile"),left:R(t.left)??_(P.side,t.unit,"desktop"),right:R(t.right)??_(P.side,t.unit,"desktop"),leftPhone:R(t.leftPhone)??_(P.sidePhone,t.unitPhone,"mobile"),rightPhone:R(t.rightPhone)??_(P.sidePhone,t.unitPhone,"mobile")}),Ie=o("div",{className:`relative z-[1] ${mn} ${Ao?.className??""}${y||w?` ${no}`:""}`.trimEnd(),style:j?{...Ao?.style,...Bo,...Tn}:{...Ao?.style,...Bo},children:Ee(Po)}),ge=Ne&&lo?o("div",{className:`${ko} ${Oo}${y||w?` ${no}`:""}`,children:Ie}):Ie;return Ro(o(to,{children:Lo("div",{className:`relative isolate overflow-hidden ${wn}${G}${vo&&!O?` ${Ye}`:""}${D.className?` ${D.className}`:""}`,style:{...mo?Zn:{},...se,...O?{}:Te},...O?{[Dn]:""}:{},children:[O&&Lo(to,{children:[o(Kn,{sheet:O.sheet}),o("div",{"aria-hidden":!0,className:`absolute inset-0${mo?" rounded-[inherit]":""}${vo?` ${Ye}`:""} ${O.className}`,style:{...Te,...O.style??{}}})]}),o(wt,{wash:j&&_o.className?{...j,..._o.style}:j,...Fe?{className:Fe}:{}}),j?o(pt,{children:ge}):ge]})}))}export{tr as default};
|
|
1
|
+
import{Fragment as to,jsx as e,jsxs as Lo}from"react/jsx-runtime";import{useContext as rt,useId as lt}from"react";import it from"./BoxTabs.js";import{BoxTabPaneContext as yo,useBoxPaneKind as ct,useIsTabPane as at}from"./BoxTabPaneContext.js";import dt from"./BoxAccordionRow.js";import{boxPhoneCell as ut,boxPhoneOrder as mt}from"../../format/lib/content/box-phone-place.js";import{CellFillContext as Ve,InBoxContext as He,useCellOfStretchedRow as ft,useFillsCell as Ct}from"./InBoxContext.js";import ht,{InsideSiteColumn as We,useInsideSiteGutter as bt,useSectionRoot as xt}from"./SiteGutterFrame.js";import{BoxSurfaceProvider as pt}from"./BoxSurfaceContext.js";import wt from"./PictureWash.js";import{BoxCellContext as Ge,NoCellBound as St}from"./BoxCellContext.js";import{boxCellFractions as $t}from"../lib/content/box-cell-bound.js";import{boundOf as Pt}from"../../format/lib/content/cell-picture-sizes.js";import{useInSiteHeader as Rt}from"./PhoneMenuTools.js";import{useCardRow as _t}from"./CardRowContext.js";import{framesItsCards as vt}from"../../format/lib/content/card-place.js";import{HandedMirrorContext as At,MirrorContext as Lt,RowHandContext as Xe,boxPlace as yt,useHandedMirrorAbove as kt,useHandedRows as Ot,useMirroredCopy as Nt,useUnderCardBox as Bt}from"./MirrorContext.js";import{boxChildrenHand as Et,isMirroredCopy as Ft,mirrorCardsActs as Ue,mirrorCardsOf as Tt,mirroredBoxClass as Dt,MIRROR_ROW_CLASS as It,ownsCard as gt}from"../../format/lib/content/mirror-cards.js";import{FRAME_BASE as ko,FRAME_GUTTER as Oo}from"./BlockFrame.js";import{containerGapProps as Mt}from"../../format/lib/content/container-gap.js";import{boxLayoutClasses as Vt,boxAlignViewClasses as Ht,boxBlockSpacingClass as Wt,boxBlockSpacingViewClasses as Gt,boxJustifyViewClasses as Xt,boxWrapTabletClass as Ut,boxFitContentClass as jt,boxRowColumnsClass as Kt,boxRowTabletColumnsClass as Jt,boxRowTabletShareClass as zt,boxPhoneCellsShareLine as Yt,boxPhoneRowClasses as K,boxPhoneRowFits as qt,boxShareClasses as M,boxShareVars as Qt,boxWrapClass as Zt,BOX_GAP_ONLY_CLASS as on}from"../../format/lib/content/box-layout.js";import{boxSeparatorClasses as en,boxSeparatorSeamClass as sn,boxSeparatorStyle as tn,isStripBox as nn}from"../../format/lib/content/box-separator.js";import{DEFAULT_LOOP_DELAY as rn,DEFAULT_LOOP_DIRECTION as ln,DEFAULT_LOOP_SECONDS as cn,isVerticalLoop as an}from"../../format/lib/animation/index.js";import{LoopTrack as dn}from"../lib/animation/LoopTrack.js";import{BOX_CARD_PAD as P,BOX_OWNS_SIDES_CLASS as un,boxDarkenStyle as mn,boxFillOf as fn,boxFillViews as Cn,boxPlacementClasses as hn,boxSwatchFill as bn,boxWashViews as xn,CARD_SHADOW_CLASS as pn,isBackgroundBox as je}from"../../format/lib/content/box-background.js";import{boxShadowAttrs as wn,boxShadowOnAnyView as Sn,boxShadowViewAttrs as $n}from"../../format/lib/content/box-shadow.js";import{boxRunsEdgeToEdge as Pn,drawsSiteGutter as Rn}from"../../format/lib/content/site-gutter.js";import{boxShapeClass as _n,boxShapeClasses as vn}from"../../format/lib/content/box-shape.js";import{BOX_JUMP_ATTR as An,BOX_LINK_ATTR as Ke,BOX_LINK_CLASS as Je,BOX_LINKED_CLASS as Ln,boxJumpBlocksClass as yn,boxJumpCss as kn,boxJumpSlug as On,boxLinkOf as Nn}from"../../format/lib/content/box-link.js";import{SiteLink as Bn}from"../lib/site-runtime.js";import{sectionBorderStyle as ze}from"../../format/lib/content/borders.js";import{finiteNumber as R}from"../../format/lib/finite-number.js";import{padDefaultIn as _,sectionPadAttrs as En}from"../lib/content/section-padding.js";import{SECTION_FILL_CLASS as no}from"../../format/lib/content/section-min-height.js";import{ON_MEDIA_INK_STYLE as Fn}from"../../format/lib/content/ink.js";import{sizedBackground as No}from"../../format/lib/sized-image.js";import{PHOTO_HOST_ATTR as Tn,resolveImageTreatment as Dn}from"../../format/lib/content/image-treatment.js";import{BoxRail as In,BoxRailStop as gn,RAIL_STOPS_CLASS as Mn,useTimelineRail as Vn}from"./TimelineRail.js";import{SHARED_PLAIN_ATTR as Hn,sharedColumnsClasses as Wn,sharedColumnsCss as Gn,sharedRowsClasses as Xn,sharedRowsCss as Un}from"../lib/content/box-shared-columns.js";import jn from"./PhotoHoverSheet.js";import{stackGutterClass as Kn,stackLineCss as Jn,stackOuterClass as zn,stackRowClass as Yn,storedStackLine as qn}from"../lib/content/box-stack-line.js";const Bo={"--sf-site-gutter":"0px"},Qn={overflowX:"clip",overflowY:"visible"},Zn={stretchedRow:!1,fillingColumn:!1,columnsRow:!1},or={desktop:!1,phone:!1},Ye="bg-cover bg-center bg-[image:var(--sf-box-bg)] max-view-tablet:bg-[image:var(--sf-box-bg-p)]",Eo=u=>u==null||u==="",Fo=u=>!Eo(u)&&Number(u)===0;function er({children:u}){return e(to,{children:u(lt())})}function sr({direction:u,label:qe,tabShape:Qe,gap:To,gapPhone:Ze,gapTablet:ro,justify:V,align:v,wrap:J,share:os,sharePhone:H,shareTablet:N,wrapPhone:es,orderPhone:ss,phoneRow:B,columns:b,columnsTablet:A,separator:m,stackBelow:Do,blockSpacing:Io,bgImage:L,bgImagePhone:go,pictureHover:ts,darken:Mo,darkenStyle:Vo,darkenTablet:ns,darkenPhone:rs,darkenStyleTablet:ls,darkenStylePhone:is,placement:cs,padV2:Ho=!1,border:Wo,borderTablet:Go,borderPhone:Xo,pad:t={},contained:lo=!0,fillHeight:y=!1,shadow:io,shadowTablet:Uo,shadowPhone:jo,justifyTablet:Ko,justifyPhone:as,alignTablet:ds,alignPhone:us,wrapTablet:Jo,blockSpacingTablet:ms,blockSpacingPhone:fs,loop:C,scrollDirection:co=ln,loopSeconds:Cs=cn,loopDelay:hs=rn,editing:E=!1,fillColor:zo,fillColorTablet:bs,fillColorPhone:xs,swatch:ps,line:x,upcoming:ws,link:Ss,boxShape:Yo,boxShapePhone:$s,boxShapeTablet:Ps,jumpHighlight:Rs,anchor:_s,sharedSides:l=or,sharedRows:vs=!1,boxId:F,slotCount:As,mirrorCards:qo,content:i,rowTitle:ao,startsOpen:Ls}){const r=_t(),Qo=rt(Ge),ys=kt(),Zo=Bt()&&!(ys&&r!==null),p=Ot(),z=gt({inCopy:r!==null,nestedCopy:r?.nested===!0,underBox:Zo}),oe=r===null&&!Zo&&p?.ids&&F?p.ids.indexOf(F):-1,Y=oe>=0&&p&&F?yt(p,F,oe):-1,h=Y>=0?p?.hand??null:z&&p?.copies===!0?p.hand:null,o=h?.row?"row":u,a=h?.row?h.row.share:os,ks=h?.row?h.row.phoneReverse?[...i.blockIds??[]].reverse():void 0:ss,q=vs&&!h?.row,T=E?"":Nn(Ss),w=y?"":vn(Yo,$s,Ps),Os=!y&&_n(Yo)!=="",k=On(Rs,_s),ee=bn({swatch:ps},r?.row),Q=ee??fn(zo),D=ee?{className:"",style:{}}:Cn(zo,bs,xs),se=Q||D.className?{...Q?{backgroundColor:Q}:{},...D.style}:void 0,te=Vn(),Z=x===!0&&o!=="tabs"&&o!=="accordion",n=je(L),oo=Rt(),Ns=xt(),Bs=at(),ne=ct(),d=o==="accordion",uo=Ct(),Es=ft(),I=nn(o,m),c=C==="scroll"&&o!=="tabs"&&!d,Fs=Nt(),eo=z||Y>=0&&h!==null,re=h?h.mirror:qo,Ts=Y>=0?Y:r?.index,mo=z&&vt(r?.ownerType),le=Ue({direction:o,separator:m,loop:C,line:x,bgImage:L,columns:b,columnsTablet:A,share:a,wrap:J},eo,l.desktop)&&Ft(re,Ts),Ds=Ue({direction:o,separator:m,loop:C,line:x,bgImage:L,columns:b,columnsTablet:A,share:a,wrap:J},eo,l.desktop)&&Tt(re)!==null,g=Kt({direction:o,separator:m,loop:C,line:x,columns:b}),S=Jt({direction:o,separator:m,loop:C,line:x,columnsTablet:A}),W=zt({direction:o,separator:m,loop:C,line:x,columns:b,columnsTablet:A,share:a,shareTablet:N}),f=o==="row"&&!n&&!I&&!c&&!Z&&S===""&&W===""?qn(Do):void 0,Is=bt(),so=Wn(l,i.blockCount??0,f),gs=(so&&(!r||r.index===0)?Gn(l,i.blockCount??0,f):"")+(q&&(!r||r.index===0)?Un(q,i.blockCount??0):""),ie=Xn(q,i.blockCount??0),ce=S!==""?Number(A)>=2:W===""||M(N)!=="",fo=S!==""||W!=="",Ms=fo&&!(S!==""&&Number(A)<2),ae=o==="row"&&!I&&!c&&x!==!0,Co=ae&&!l.phone&&!l.desktop?ut(mt(ks,i.blockIds??[]),{tabletKeepsRow:Ms,editing:E}):void 0,de=Co!==void 0&&!E,Vs=g!==""?Number(b)>=2:M(a)!=="",ue=!n&&!d&&!Ds&&!l.desktop&&!l.phone,ho=ue&&!c?Xt(V,Ko,as):"",me=n||eo?"":Dt(Fs,o,c?void 0:V,v,ho?Ko:void 0),Hs=ue&&o==="row"?Ht(v,ds,us):"",Ws=!c&&!d&&g===""&&S===""&&!l.desktop?Ut(J,Jo):"",fe=[d?"":M(a),o==="row"?jt(a):"",g,S,W,Wt(d?"gap":Io),en(o,m),d?"border-t border-line":"",ho,Hs,Ws,d?"":Gt(Io,ms,fs)].filter(Boolean).join(" "),Gs=fe?` ${fe}`:"",Ce=["flex",o==="row"?I||c?"flex-row":`flex-row ${K(B,H,es,Jo)}`:"flex-col",Zt(c||d?!1:J),n?hn(cs??"center",o):Vt(c||d?void 0:V,d?void 0:v)+(me?` ${me}`:"")].join(" ")+Gs,G=y||n||w||uo?` ${no}`:"",bo=Os?` ${w}`:w?`${G} ${w}`:G,he=Es&&o==="column"&&!n&&!c&&M(a)===""&&(typeof V=="string"&&V!=="start"||ho!==""),be=G||(he?` ${no}`:""),xo=T?` ${Ln}`:"",po=n||oo||Ho?"":" py-6",Xs=f===void 0?"":` ${Yn(f)}`,xe=f===void 0?"":` ${Kn(f)}`,wo=f===void 0?"":` ${zn(f)}`,Us=`${ko}${po} ${Oo}${bo}${xo}${xe}${wo}`,js=oo?`${bo}${xo}${wo}`.trim():`w-full${po}${bo}${xo}${wo}`,X=Mt("Flex",To,o==="row"?"inline":"block",Ze,I||c?void 0:ro),pe=Qt(a,N,o==="row"?i.blockCount??0:0),we=I?{...X.style,...tn(o,m)}:X.style,Ks=pe?{...we,...pe}:we,Se=(s="")=>e(i,{className:`${Ce}${le?` ${It}`:""}${X.className}${be}${Xs}${s?` ${s}`:""}${Z?` ${Mn}`:""}${k?` ${yn(k)}`:""}${so}${ie}`,style:Ks,minEmptyHeight:120,...Co?{cell:Co}:null}),$e=an(co)?"":sn(o,m),Pe=c?e(dn,{direction:co,seconds:Cs,delay:hs,editing:E,copy:s=>Se(s&&$e?`${s} ${$e}`:s)}):Se(),So=o==="tabs"?e(it,{className:`${Ce}${X.className}${uo&&!y&&!n&&!w?"":G}`,style:X.style,shape:Qe,children:Pe}):Pe,$o=d?e(yo.Provider,{value:"accordion",children:So}):ne?e(yo.Provider,{value:!1,children:So}):So,Re=o==="row"&&!n&&(v===void 0||v==="stretch"),Js={stretchedRow:Re,fillingColumn:o==="column"&&(uo||he),columnsRow:g!==""||S!==""||so!==""||ie!==""||o==="row"&&(Array.isArray(a)||Array.isArray(N))||de,...de?{phoneCells:!0}:null,...Re&&ae&&(i.blockCount??0)>=2&&Vs?{picturesFillRow:!0}:null,...fo?{fillFrom:ce?"tablet":"desktop"}:null,...Yt(B,H)&&(!fo||ce)?{phoneRowFills:!0}:null,...F?{id:F}:null},_e=r===null?Et({direction:o,loop:C,bgImage:L,columns:b,mirrorCards:qo},!1):null,ve=_e?e(Xe.Provider,{value:{hand:_e,ids:i.blockIds??[],boxes:[]},children:$o}):p?e(Xe.Provider,{value:null,children:$o}):$o,Ae=e(He.Provider,{value:Js,children:e(Ve.Provider,{value:!1,children:eo?e(Lt.Provider,{value:le,children:e(At.Provider,{value:!z,children:ve})}):ve})}),zs=ao?.blockCount??0,Le=ne==="accordion"&&!!ao&&(E||zs>0)?e(dt,{startsOpen:Ls===!0,editing:E,title:e(He.Provider,{value:Zn,children:e(Ve.Provider,{value:!1,children:e(yo.Provider,{value:!1,children:e(ao,{className:`min-w-0 flex-1 ${on}`,minEmptyHeight:24})})})}),children:Ae}):Ae,Po=Z?e(In,{row:o==="row",stops:i.blockCount??0,children:Le}):Le,Ys=qe?.trim()||(Bs?"":void 0),qs={values:t,frame:po?24:0},Qs=s=>te?e(gn,{on:te,future:ws===!0,children:s}):s,Zs=s=>T.startsWith("/")?e(Bn,{href:T,className:Je,"aria-labelledby":s,[Ke]:""}):e("a",{href:T,className:Je,"aria-labelledby":s,[Ke]:""}),ye=(k?kn(k):"")+gs+(f===void 0||r&&r.index!==0?"":Jn(f)),ke=ye?e("style",{dangerouslySetInnerHTML:{__html:ye}}):null,U=Pn({loop:C,direction:o,scrollDirection:co,bgImage:L}),ot=l.desktop&&so!==""&&!Q&&!D.className&&!ze(Wo,Xo,Go)&&!Sn(io,Uo,jo)&&!T&&!w&&!y&&!k&&!Rn(lo&&!U,Is)&&Fo(To)&&(Eo(ro)||Fo(ro))&&Ho&&Object.values(t).every(s=>Eo(s)||Fo(s)),et=s=>({...ot?{[Hn]:""}:null,...n?null:{...wn(io),...$n(io,Uo,jo)},...k?{[An]:k}:null,...s?{id:s}:null}),Oe=g!==""?Number(b):0,st=K(B,H)===K(void 0),tt=(o==="column"||o==="row"&&!I&&!c&&(Oe===1&&st||Oe===0&&i.blockCount===1))&&!n&&!Z&&!oo,Ne=n&&Ns&&!oo,Be=(s,$)=>Qs(e(ht,{contained:lo&&!U,style:U?Bo:void 0,framedClass:Us,fillClass:js,columnClass:`${ko} ${Oo}${be}${xe}`,tabLabel:Ys,pad:n?void 0:qs,border:ze(Wo,Xo,Go),outerAttrs:et($),box:!0,edge:tt,outerStyle:n?void 0:se,outerClass:n?void 0:D.className||void 0,bleed:Ne,children:ke||$?Lo(to,{children:[ke,$?Zs($):null,U?e(We,{children:s}):s]}):U?e(We,{children:s}):s})),Ro=s=>T?e(er,{children:$=>Be(s,$)}):Be(s),Ee=s=>Qo.bound?e(St,{children:s}):s;if(!n){const s=v===void 0||v==="stretch",$=(M(a)!==""||g!==""||S!=="")&&!qt(B,H)&&!(W!==""&&M(N)==="")&&(s||K(B)!==K(void 0));if(!(o==="row"?$:o==="column"&&s))return Ro(Ee(Po));const Me=$t({direction:o,separator:m,loop:C,line:x,share:a,shareTablet:N,sharePhone:H,phoneRow:B,columns:b,columnsTablet:A,stackBelow:Do,shared:l.desktop||l.phone||q,count:As}),nt={hasWidth:!0,...Me?{bound:Pt(Me,Qo.bound)}:null};return Ro(e(Ge.Provider,{value:nt,children:Po}))}const j=mn(Mo,Vo),_o=xn({darken:Mo,darkenStyle:Vo,darkenTablet:ns,darkenStyleTablet:ls,darkenPhone:rs,darkenStylePhone:is}),Fe=[mo?"rounded-[inherit]":"",_o.className].filter(Boolean).join(" "),vo=je(go),Te=vo?{"--sf-box-bg":No(L??""),"--sf-box-bg-p":No(go??"")}:{backgroundImage:No(L??""),backgroundSize:"cover",backgroundPosition:"center"},De=Dn(void 0,void 0,ts),O=De.className?De:null,Ao=En({...t,top:R(t.top)??_(P.desktop,t.unit,"desktop"),bottom:R(t.bottom)??_(P.desktop,t.unit,"desktop"),topPhone:R(t.topPhone)??_(P.phone,t.unitPhone,"mobile"),bottomPhone:R(t.bottomPhone)??_(P.phone,t.unitPhone,"mobile"),left:R(t.left)??_(P.side,t.unit,"desktop"),right:R(t.right)??_(P.side,t.unit,"desktop"),leftPhone:R(t.leftPhone)??_(P.sidePhone,t.unitPhone,"mobile"),rightPhone:R(t.rightPhone)??_(P.sidePhone,t.unitPhone,"mobile")}),Ie=e("div",{className:`relative z-[1] ${un} ${Ao?.className??""}${y||w?` ${no}`:""}`.trimEnd(),style:j?{...Ao?.style,...Bo,...Fn}:{...Ao?.style,...Bo},children:Ee(Po)}),ge=Ne&&lo?e("div",{className:`${ko} ${Oo}${y||w?` ${no}`:""}`,children:Ie}):Ie;return Ro(e(to,{children:Lo("div",{className:`relative isolate overflow-hidden ${pn}${G}${vo&&!O?` ${Ye}`:""}${D.className?` ${D.className}`:""}`,style:{...mo?Qn:{},...se,...O?{}:Te},...O?{[Tn]:""}:{},children:[O&&Lo(to,{children:[e(jn,{sheet:O.sheet}),e("div",{"aria-hidden":!0,className:`absolute inset-0${mo?" rounded-[inherit]":""}${vo?` ${Ye}`:""} ${O.className}`,style:{...Te,...O.style??{}}})]}),e(wt,{wash:j&&_o.className?{...j,..._o.style}:j,...Fe?{className:Fe}:{}}),j?e(pt,{children:ge}):ge]})}))}export{sr as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as w,jsxs as O}from"react/jsx-runtime";import{PagePicture as fe}from"../lib/first-screen.js";import{SiteLink as ue}from"../lib/site-runtime.js";import de from"./BlockFrame.js";import{useCellPictureSizes as he}from"./
|
|
1
|
+
import{jsx as e,Fragment as w,jsxs as O}from"react/jsx-runtime";import{PagePicture as fe}from"../lib/first-screen.js";import{SiteLink as ue}from"../lib/site-runtime.js";import de from"./BlockFrame.js";import{useCellPictureSizes as he}from"./BoxCellContext.js";import{useBoxCell as pe,useFillsCell as ge}from"./InBoxContext.js";import{useInsideSiteGutter as Se,useSectionEdge as Ce}from"./SiteGutterFrame.js";import{useSitePhotography as Ne}from"./SitePhotographyContext.js";import{media as T}from"../lib/media.js";import{CONTENT_SIZES as j,sizedImage as W}from"../../format/lib/sized-image.js";import{imageCornerStyle as ye}from"../../format/lib/content/image-corners.js";import{FILL_ROW as Fe,imageAspectClasses as we,imageFillFrom as be,imageAspectDrawn as $e,imageAspectDrawsARatio as Ae,imageFocalPointActs as _e,imageFocalPointActsIn as B,imageAspectPhoneOf as xe,imageFillRowClasses as Ie,imageWidthFollowsBox as ke}from"../../format/lib/content/image-aspect.js";import{drawsSiteGutter as ve}from"../../format/lib/content/site-gutter.js";import{imageFitClass as U,parseImageFit as Re}from"../../format/lib/content/image-fit.js";import{SECTION_FILL_CLASS as ze}from"../../format/lib/content/section-min-height.js";import{NEXT_PICTURE_CLASS as Ee,PICTURE_FRAME_CLASS as Le,PICTURE_WASH_CLASS as Pe,PICTURE_ZOOM_CLASS as Oe,PICTURE_ZOOM_VAR as Te,resolveImageTreatment as je,resolveNextPicture as We}from"../../format/lib/content/image-treatment.js";import{boxDarkenStyle as G}from"../../format/lib/content/box-background.js";import{phoneFocus as Be}from"../../format/lib/content/phone-focus.js";import{say as Ue}from"../../format/lib/editor-words.js";import{sectionEdgeAttrs as Ge}from"../lib/content/section-edge.js";import D from"./PhotoHoverSheet.js";import De from"./PictureWash.js";function Me({src:o,alt:M,aspect:Z,aspectPhone:r,contained:b,grayscale:V,pictureHover:i,nextSrc:$,darken:X,darkenStyle:A,href:q,fit:J,focal:_,focalPhone:K,focalTablet:Q,corners:Y,cornerSides:H,pad:x,ownSize:ee=!1,editing:I=!1}){const c=je(V,Ne(),i),S=pe(),se=ge(),C=Ce(),te=he(j),t=$e(Z,S?.picturesFillRow===!0),f=t===Fe,k=be(S?.fillFrom,S?.phoneRowFills===!0,r),u=f?Ie(k):null,v=xe(t,r),l=Re(J,"cover"),R=C||!ke(t,v,l)?j:te,z=ye(Y,H),le=_e(l,t,r),a=Be(B("mobile",l,t,r)?K:void 0,B("tablet",l,t,r)?Q:void 0),d={...c.style??{},..._&&le?{objectPosition:_}:{},...a.style},h=o?W(T(o)):null,s=We(i),n=s&&$?W(T($)):null,p=s?i?.zoom??null:null,oe=G(X,A),E=s&&i?.darken?G(i.darken,A):null,N=!!(s&&(n||p||E)),L=N?{...s?.style??{},...p?{[Te]:p}:{}}:{},re=s&&n?e(w,{children:e("img",{src:n.src,...n.srcSet?{srcSet:n.srcSet,sizes:R}:{},alt:"","aria-hidden":"true",loading:"lazy",decoding:"async",className:`absolute inset-0 h-full w-full bg-surface ${U(l)}${a.className?` ${a.className}`:""} ${s.className}`,...Object.keys(d).length?{style:d}:{}})}):null,y=o&&h?O(w,{children:[e(fe,{src:h.src,...h.srcSet?{srcSet:h.srcSet,sizes:R}:{},alt:M,className:`${u?`${u.img} `:""}h-full w-full ${Ae(t,r)?U(l):""}${c.className?` ${c.className}`:""}${a.className?` ${a.className}`:""}`,...Object.keys(d).length?{style:d}:{}}),re]}):null,F=y?O(w,{children:[e(D,{sheet:c.sheet}),N&&s?e(D,{sheet:s.sheet,name:Ee}):null,p?e("div",{className:`${f?"absolute inset-0":"relative h-full w-full"} ${Oe}`,children:y}):y,e(De,{wash:oe,hover:E,className:`pointer-events-none ${Pe}`})]}):e("div",{className:"flex aspect-[16/9] items-center justify-center border border-dashed border-line font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim",children:Ue("Image — set a path")}),g=(q??"").trim(),ie=g&&o?g.startsWith("/")?e(ue,{href:g,className:"block h-full w-full",children:F}):e("a",{href:g,className:"block h-full w-full",children:F}):F,ae=Se(),m=C&&!ee?Ge(C):null,P=x?{values:x,frame:f?0:24}:void 0,ne=P!==void 0&&ve(m?!1:b,ae),me=f?se||I||ne?ze:"":"py-6",ce=o&&l==="contain"?"":"bg-surface ";return!o&&!I?null:e(de,{contained:m?!1:b,className:me,pad:P,...m?{fillWidth:m.className,style:m.style}:{},children:e("figure",{...u?{className:u.figure}:{},children:e("div",{className:`relative w-full overflow-hidden ${ce}${we(t,v,k)}${N?` ${Le}`:""}`,...z||Object.keys(L).length?{style:{...z,...L}}:{},children:ie})})})}export{Me as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as r}from"react/jsx-runtime";import{useContext as I}from"react";import{SiteLink as g}from"../lib/site-runtime.js";import h,{FOOTER_LOGO_PX as O,WORDMARK_FIT_FLOOR_PX as _}from"./Logo.js";import{media as N}from"../lib/media.js";import{BoxSurfaceContext as B}from"./BoxSurfaceContext.js";import{useBoxCellHasWidth as D}from"./
|
|
1
|
+
"use client";import{jsx as r}from"react/jsx-runtime";import{useContext as I}from"react";import{SiteLink as g}from"../lib/site-runtime.js";import h,{FOOTER_LOGO_PX as O,WORDMARK_FIT_FLOOR_PX as _}from"./Logo.js";import{media as N}from"../lib/media.js";import{BoxSurfaceContext as B}from"./BoxSurfaceContext.js";import{useBoxCellHasWidth as D}from"./BoxCellContext.js";import{useInSiteHeader as H}from"./PhoneMenuTools.js";import{useSiteLogo as W}from"./SiteLogoContext.js";import{useLogoWall as j}from"./LogoWallContext.js";import{LogoWallMark as y}from"./Logos.js";import{useCardRow as F}from"./CardRowContext.js";import{alignViewClasses as x,BLOCK_ALIGN_JUSTIFY as R}from"../../format/lib/content/block-align.js";function T(t){const o=j(),n=F();if(!o)return r(P,{...t});const l=(t.src??"").trim();return r("div",{className:"text-center",children:r(y,{src:l||void 0,alt:t.alt,look:o.look,logoHeight:o.logoHeight,grayscale:o.grayscale,kind:n?.row.kind})})}function P({src:t,alt:o,href:n,heightPx:l=O,reverse:p=!0,align:i,alignTablet:m,alignPhone:f,color:L=null}){const s=W(),d=(t??"").trim(),a=d?{src:N(d),reversedSrc:null,inkIsDark:null,wordmark:o?.trim()||null}:{src:s.src,reversedSrc:s.reversedSrc,inkIsDark:s.inkIsDark,wordmark:s.wordmark},S=I(B),k=H(),v=D(),e=!k&&v,c=r(h,{variant:"footer",sizePx:l,src:a.src,reverse:p,color:L,reversedSrc:a.reversedSrc,inkIsDark:a.inkIsDark,wordmark:a.wordmark,siteName:s.siteName,fitToContainer:k,fitWordmarkToContainer:e,fitFloorPx:e?_:void 0,...S?.dark?{onLightSurface:!1}:{}}),u=e?"inline-flex max-w-full overflow-x-clip":"inline-flex",w=n?r(g,{href:n,className:u,children:c}):e?r("span",{className:u,children:c}):c;if(!i&&!e&&!x("justify",i,m,f))return w;const C=["flex min-w-0",i?R[i]:"",x("justify",i,m,f),e?"[container-type:inline-size]":""].filter(Boolean).join(" ");return r("div",{className:C,children:w})}export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as a,jsxs as E}from"react/jsx-runtime";import{useEffect as k,useState as u}from"react";import{SiteImage as $}from"../lib/site-runtime.js";import{isExternalMediaUrl as C}from"../lib/media.js";import{useDeferredPicture as F}from"../lib/first-screen.js";import{sizedImage as _}from"../../format/lib/sized-image.js";import b from"./PhotoHoverSheet.js";import{useSizesWithinCell as j}from"./
|
|
1
|
+
"use client";import{jsx as a,jsxs as E}from"react/jsx-runtime";import{useEffect as k,useState as u}from"react";import{SiteImage as $}from"../lib/site-runtime.js";import{isExternalMediaUrl as C}from"../lib/media.js";import{useDeferredPicture as F}from"../lib/first-screen.js";import{sizedImage as _}from"../../format/lib/sized-image.js";import b from"./PhotoHoverSheet.js";import{useSizesWithinCell as j}from"./BoxCellContext.js";function D({fallback:p,className:y,src:h,alt:c="",objectPosition:l,objectFit:t="cover",sizes:f="100vw",sizesFromCell:g=!1,priority:S=!1,deferFetch:v=!1,showBackground:N=!0,treatment:e}){const x=F(),z=j(f),n=g?z:f,[i,o]=u(!1),[I,d]=u(!1),s=h||"";k(()=>{o(!1),d(!1)},[s]);const m=C(s),r=m&&!I?_(s):{src:s},w=!s||i;return E("div",{className:`relative h-full w-full overflow-hidden ${y??""}`,children:[a("div",{className:"absolute inset-0 flex items-center justify-center",style:N?{background:"var(--site-surface)"}:void 0,children:w?p:null}),s&&(m?a("img",{src:r.src,alt:c,...r.srcSet?{srcSet:r.srcSet,sizes:n}:{},decoding:"async",...v?{loading:"lazy"}:x,className:`absolute inset-0 h-full w-full${e?.className?` ${e.className}`:""}`,style:{display:i?"none":"block",objectFit:t,...l?{objectPosition:l}:{},...e?.style??{}},onError:()=>r.srcSet?d(!0):o(!0)}):a($,{src:s,alt:c,fill:!0,sizes:n,priority:S,...e?.className?{className:e.className}:{},style:{display:i?"none":"block",objectFit:t,...l?{objectPosition:l}:{},...e?.style??{}},onError:()=>o(!0)})),a(b,{sheet:e?.sheet})]})}export{D as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as H}from"react/jsx-runtime";import I from"../../../../../components/HeroSingle.js";import{HeroSingleMeta as V}from"../../../../../../format/lib/document/blocks/general/HeroSingle/meta.js";import{viewFocusValues as d}from"../../../../../../format/lib/content/picture-focus-rows.js";import{editorVideoFrame as w}from"../../../../../../format/lib/hero-video.js";const q={...V,render:o=>{const{mediaType:e,mediaImage:r,mediaVideo:a,poster:m,tintColor:l,tintOpacity:g,overlay:h,overlayColor:s,overlayPosition:c,heightDesktop:b,heightMobile:u,heightFixed:y,heightFixedTablet:p,heightFixedMobile:P,boxes:f,videoSource:v,youtubeUrl:x,videoPlayback:F,mediaLayout:j,mediaLayoutPhone:k,mediaImage2:M,tintColor2:C,tintOpacity2:S,_partMotion:T,editor:n,id:L}=o,i=d(o,"imageFocal"),t=d(o,"imageFocal2"),O=e==="image"?void 0:w(L,a,n?.metadata);return H(I,{mediaType:e,videoSource:v,youtubeUrl:x,videoPlayback:F,mediaLayout:j,mediaLayoutPhone:k,mediaImage2:M||void 0,objectPosition2:t.desktop,objectPosition2Phone:t.phone,objectPosition2Tablet:t.tablet,tintColor2:C,tintOpacity2:S,mediaSrc:(e==="image"?r:a)||void 0,poster:m||O||void 0,objectPosition:e==="image"?i.desktop:void 0,objectPositionPhone:e==="image"?i.phone:void 0,objectPositionTablet:e==="image"?i.tablet:void 0,tintColor:l,tintOpacity:e==="image"?g:0,overlay:h,overlayColor:s,overlayPosition:c,heightDesktop:b,heightMobile:u,heightFixed:y,heightFixedTablet:p,heightFixedMobile:P,boxes:f,editing:n?.isEditing,partMotion:T})}};export{q as HeroSingleRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as w}from"react/jsx-runtime";import x from"../../../../../components/HeroSlide.js";import{nestedAccentValue as M,sectionThemeWrap as O}from"../../../../../../format/lib/content/section-surface.js";import{phHide as
|
|
1
|
+
import{jsx as w}from"react/jsx-runtime";import x from"../../../../../components/HeroSlide.js";import{nestedAccentValue as M,sectionThemeWrap as O}from"../../../../../../format/lib/content/section-surface.js";import{phHide as N}from"../../scaffold.js";import{HeroSlideMeta as R}from"../../../../../../format/lib/document/blocks/general/HeroSlide/meta.js";import{editorVideoFrame as U,loadingStill as D}from"../../../../../../format/lib/hero-video.js";import{LATER_SLIDES_KEY as K}from"../../../../first-screen.js";import{viewFocusValues as y}from"../../../../../../format/lib/content/picture-focus-rows.js";const X={...R,render:t=>{const{name:f,process:g,mediaType:e,mediaVideo:n,mediaImage:b,poster:S,loadingShows:v,videoFrame:P,mediaSrc:r,videoSpeed:d,tintColor:h,overlay:j,groups:C,editor:o,overlayColor:m,overlayPosition:s,mediaLayout:F,mediaLayoutPhone:L,mediaImage2:A,tintColor2:T,tintOpacity2:k,videoSource:E,youtubeUrl:H,videoPlayback:I,_partMotion:V,id:l,...c}=t,i=y(t,"imageFocal"),a=y(t,"imageFocal2"),p=o?.metadata?.[K],_=U(l,n||r,o?.metadata),u=O({...c,sectionAccent:M(c.sectionAccent)});return w(x,{themeClassName:u?.className,themeStyle:u?.style,name:f||void 0,process:N(g,"Label",o),mediaType:e,mediaSrc:(e==="image"?b:n||r)||void 0,videoSpeed:typeof d=="number"?d:void 0,poster:D({loadingShows:v,poster:S,videoFrame:P||_}),objectPosition:e==="image"?i.desktop:void 0,objectPositionPhone:e==="image"?i.phone:void 0,objectPositionTablet:e==="image"?i.tablet:void 0,tintColor:h,tintOpacity:e==="image"?j:0,groups:C,editing:o?.isEditing,overlayColor:typeof m=="string"?m:void 0,overlayPosition:typeof s=="string"?s:void 0,mediaLayout:F,mediaLayoutPhone:L,mediaImage2:A||void 0,objectPosition2:a.desktop,objectPosition2Phone:a.phone,objectPosition2Tablet:a.tablet,tintColor2:T,tintOpacity2:k,videoSource:E,youtubeUrl:H,videoPlayback:I,partMotion:V,...Array.isArray(p)&&p.includes(l)?{laterSlide:!0}:{}})}};export{X as HeroSlideRender};
|
|
@@ -36,7 +36,6 @@ export declare const sectionPage: (p: Props, ctx: ConvertContext) => import("../
|
|
|
36
36
|
export declare const fillFrom: (colour: "surface" | "background") => (p: Props, ctx: ConvertContext) => Props;
|
|
37
37
|
export declare const ownFill: (painted: string | undefined, p: Props, ctx: ConvertContext) => Props;
|
|
38
38
|
export declare const fillNoBoxHolds: (painted: string | undefined) => string | undefined;
|
|
39
|
-
export declare const lineBorder: (p: Props, ctx: ConvertContext) => Props;
|
|
40
39
|
export declare const bandIndex: (p: Props, ctx: ConvertContext) => number;
|
|
41
40
|
export declare const bandAccent: (stored: unknown, p: Props, ctx: ConvertContext) => unknown;
|
|
42
41
|
export declare const bandProps: (p: Props, ctx: ConvertContext) => Props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SECTION_WIDTH_KEYS as W}from"../../../../../format/lib/content/section-width.js";import{phoneKey as v}from"efficient-easel/draw";import{BOX as L,INNER_BOX as
|
|
1
|
+
import{SECTION_WIDTH_KEYS as W}from"../../../../../format/lib/content/section-width.js";import{phoneKey as v}from"efficient-easel/draw";import{BOX as L,INNER_BOX as M,LABEL_FACE as U,TEXT as N}from"../../../../../format/lib/document/seed-parts.js";import{ENTRANCE_KEYS as w}from"../../../animation/entrance.js";import{CARD_HOVER_KEYS as b}from"../../../../../format/lib/animation/hover.js";import{COUNT_KEY_PROP as y}from"../../../../../format/lib/content/block-sources.js";import{normalizeSiteGutter as F}from"../../../../../format/lib/content/page-width.js";import{resolveSectionPadding as K}from"../../../content/section-padding.js";import{ButtonBlockMeta as X}from"../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";import{SECTION_PAD_INNER_DEFAULTS as G}from"../../passes/section-padding.js";import{finiteNumber as p}from"../../../../../format/lib/finite-number.js";import{convertTheme as f,hasWords as Y}from"../../../sections/section-to-box.js";import{THEME_SECTION_BG as j}from"../../../../../format/lib/content/section-background.js";import{parseHexColor as V}from"efficient-shell/format";import{convertLength as $,isLengthUnit as J}from"efficient-easel/screen/lib/content/length-units";import{bandPresetIndex as z,surfaceTwoTone as q}from"../../../../../format/lib/theme.js";const x=t=>J(t)?t:"px",d=(t,o,e,n)=>o===e?t:$(t,o,e,n,{min:0,max:200,step:4});import{BOX as Yt,DIM as jt,INNER_BOX as Vt,TEXT as $t}from"../../../../../format/lib/document/seed-parts.js";const _t={textFit:"line",textFitPhone:"wrap"},Q={...N,[y]:""},{label:Bt,href:Et,...Z}=X.defaultProps,Ot=Z,St={buttonFillOpacity:0,buttonBorder:{width:0},buttonPaddingTop:0,buttonPaddingRight:0,buttonPaddingBottom:0,buttonPaddingLeft:0},Ut={...L,sectionAccent:0},Nt=["gridSpan","sectionHeightMode","sectionHeightValue","sectionHeightUnit","sectionHeightModeTablet","sectionHeightValueTablet","sectionHeightUnitTablet","sectionHeightModePhone","sectionHeightValuePhone","sectionHeightUnitPhone","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderTablet","sectionBorderPhone","sectionAccent","stickTop","stickTopDistance","stickTopTablet","stickTopDistanceTablet","stickTopPhone","stickTopDistancePhone","anchor","sectionAnimation","_hidden",...Object.values(w).flatMap(t=>[t,v(t)]),"widthFit","widthFitTablet","widthFitPhone","width","widthTablet","widthPhone","minWidth","minWidthTablet","minWidthPhone","maxWidth","maxWidthTablet","maxWidthPhone",...Object.values(W)],a="a section width key, ignored since efficient-web-builder 45 (an old key; a section's own width has new keys, lib/content/section-width), so dropping it changes nothing",At={sectionSurface:"read by nothing in src/ (searched 2026-10-24): a retired theme key that draws nothing today, so dropping it changes nothing",widthMode:a,fullWidth:a,pageWidth:a,backgroundWidth:a,contentWidth:a,contentMax:a},Ct=Object.fromEntries(["sectionPaddingLeft","sectionPaddingRight","sectionPaddingLeftTablet","sectionPaddingRightTablet","sectionPaddingLeftPhone","sectionPaddingRightPhone"].map(t=>[t,"needs Box side padding outside its gutter: the old section added it outside its frame, a Box's side padding replaces the gutter. 0 live nodes store it (JJ's read-only export, 2026-10-24)"]));function tt(t,o){const e=p(t.sectionPaddingTop)??0,n=p(t.sectionPaddingBottom)??0,i=p(t.sectionPaddingTopTablet),s=p(t.sectionPaddingBottomTablet),l=x(t.sectionPaddingUnit),g=x(t.sectionPaddingUnitTablet),u=x(t.sectionPaddingUnitPhone),E=(h,c,T,P)=>{const r=p(h);if(r!==void 0)return r+d(P,"px",u,"mobile");const S=c===void 0?{n:T,unit:l}:{n:c,unit:g};return d(S.n,S.unit,u,"mobile")+d(P,"px",u,"mobile")},O=(h,c,T,P,r)=>c!==void 0?{[h]:c+d(r??P,"px",g,"tablet")}:r===void 0?{}:{[h]:d(T,l,g,"tablet")+d(r,"px",g,"tablet")};return{sectionPaddingTop:e+d(o.top,"px",l,"desktop"),sectionPaddingBottom:n+d(o.bottom,"px",l,"desktop"),...O("sectionPaddingTopTablet",i,e,o.top,o.topTablet),...O("sectionPaddingBottomTablet",s,n,o.bottom,o.bottomTablet),sectionPaddingTopPhone:E(t.sectionPaddingTopPhone,i,e,o.topPhone),sectionPaddingBottomPhone:E(t.sectionPaddingBottomPhone,s,n,o.bottomPhone)}}const It=t=>[...["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopTablet","sectionPaddingBottomTablet","sectionPaddingTopPhone","sectionPaddingBottomPhone"].map(o=>[o,o,(e,n)=>tt(n,typeof t=="function"?t(n):t)[o]]),["sectionPaddingUnit","sectionPaddingUnit"],["sectionPaddingUnitTablet","sectionPaddingUnitTablet"],["sectionPaddingUnitPhone","sectionPaddingUnitPhone"]];function m(t,o){const e=K(t,G[o]);return{sectionPaddingTop:e.top,sectionPaddingBottom:e.bottom}}const Rt=t=>[["padTop","sectionPaddingTop",(o,e)=>m(e,t).sectionPaddingTop],["padBottom","sectionPaddingBottom",(o,e)=>m(e,t).sectionPaddingBottom],["sectionPaddingTop","sectionPaddingTop",(o,e)=>m(e,t).sectionPaddingTop],["sectionPaddingBottom","sectionPaddingBottom",(o,e)=>m(e,t).sectionPaddingBottom]],ot={kind:"heading-case-upper",styles:["heading-1","heading-2","heading-3"]},kt=t=>o=>Y(o.props[t])?[ot]:[],Ht=(t,o)=>({kind:"text",key:t,role:"eyebrow",props:N,...o?{style:o}:{}}),A=t=>t.background!=="transparent",et=(t,o)=>{const[e,n]=[t,o].map(i=>typeof i=="string"?i.trim():"");return e?n?`[${e} ]{color=text}${n}`:`[${e}]{color=text}`:n},C={align:"right",alignPhone:"left"},nt=(t,o,e)=>{const n=i=>et(i[t],i[o]);return{kind:"block",type:"Text",when:(i,s)=>s!==void 0&&n(s)!=="",box:[[t,"text",(i,s)=>n(s)],[o,"text",(i,s)=>n(s)]],props:e}},Dt=(t,o,e,n={})=>nt(t,o,{...Q,...C,...n,_partStyles:{text:{...U,color:"labels",...e,case:U.case,...C}}}),_=(t,o)=>typeof t=="number"&&Number.isInteger(t)&&t>=0?t:f(o)?.selected??0,I="var(--site-surface)",R="var(--site-surface-2)",k=(t,o)=>f(o)?.themes[_(t.sectionAccent??0,o)],H=t=>(o,e)=>{const n=k(o,e)?.[t];return n?{fillColor:n}:{}},D=t=>t.startsWith("#")&&V(t)!==null,Wt=(t,o,e)=>{const n=t?.trim();if(n&&D(n))return{fillColor:n};if(n===I)return H("surface")(o,e);const i=n===R?k(o,e):void 0;return i?{fillColor:q(i)}:{}},vt=t=>{const o=t?.trim();return!o||o==="transparent"||o===j||o===I||o===R||D(o)?void 0:"it paints a colour that no Box Fill can hold"},B=(t,o)=>{const e=f(o)?.themes;return e&&A(t)?z(e,_(t.sectionAccent,o)):-1},Lt=(t,o,e)=>{const n=B(o,e);return n>=0?n:t},Mt=(t,o)=>{const e=B(t,o);return e>=0?{sectionAccent:e}:{}},wt=(t,o)=>A(t.props)&&B(t.props,o)<0?[{kind:"band-preset",page:_(t.props.sectionAccent,o)}]:[],yt=t=>F(t.site?.siteGutter),it=Object.fromEntries(["Top","Right","Bottom","Left","TopPhone","RightPhone","BottomPhone","LeftPhone"].map(t=>[`sectionPadding${t}`,0])),Ft=t=>({top:0,right:0,bottom:0,left:0,...t}),Kt=(t,o,e,n=[])=>({kind:"group",name:t,keepEmpty:!0,props:(i,s)=>({...M,...it,...H("surface")(i,s),...typeof e=="function"?e(i,s):e}),box:[[o,"bgImage"],b.kind,b.duration,b.delay],parts:n});export{_t as AUTO_COLUMN,Yt as BOX,Ot as BUTTON,jt as DIM,At as DROP_COMMON,Ct as DROP_SIDE_PADDING,ot as HEADING_CASE_UPPER,Vt as INNER_BOX,it as NO_PAD,Q as NUMBER_TEXT,C as RIGHT_WORDS,Nt as SAME_KEYS,Ut as SECTION_BOX,St as SH_LINK,$t as TEXT,Lt as bandAccent,B as bandIndex,_ as bandPage,Mt as bandProps,wt as bandWrites,H as fillFrom,vt as fillNoBoxHolds,kt as headingCaseOf,m as innerPad,Rt as innerPadKeys,Dt as leadLine,nt as leadText,Ft as lineSides,et as numberAndUnit,Wt as ownFill,Kt as pictureCell,k as sectionPage,yt as siteGutterOf,Ht as smallText,tt as wrapperPad,It as wrapperPadKeys};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mixHex as
|
|
1
|
+
import{mixHex as P}from"efficient-shell/format";import{resolveSectionAccent as r,SECTION_ACCENT_INHERIT as x}from"../../../../../format/lib/content/section-surface.js";import{parseLoopDirection as E}from"../../../../../format/lib/animation/index.js";import{parseTickerSeparator as i,SEPARATOR_GLYPH as A}from"../../../../../format/lib/sections/ticker-style.js";import{tickerJoinSide as y}from"../../../../../format/lib/sections/ticker-join.js";import{convertTheme as h}from"../../../sections/section-to-box.js";import{darkBandIndex as C}from"../../../../../format/lib/theme.js";import{DIM as s,DROP_COMMON as a,DROP_SIDE_PADDING as l,fillFrom as R,SAME_KEYS as c,sectionPage as b,SECTION_BOX as p,TEXT as B,wrapperPad as d,wrapperPadKeys as m}from"./section-to-box-row-parts.js";import{SPEC_PAD as S,SPEC_STRIP as O,SPEC_TEXT as T,STRIP_BOX as _,TICKER_BARE_GAP as g,TICKER_DISPLAY as N,TICKER_PAD as f,TICKER_SMALL as K,TICKER_STRIP as M}from"../../../../../format/lib/sections/strip-shape.js";const I=e=>e.size==="display",w=(e,t)=>{const o=b(e,t),n=e.tone!=="plain"&&o?.text&&o.background?P(o.text,o.background,.3):null;return n?{color:n}:{}},L=(e,t)=>e.tone!=="plain"&&r(e.sectionAccent)===null?R("background")(e,t):{},k=(e,t)=>({kind:"list",key:"items",name:"Item",flat:!0,when:t,parts:[{kind:"text",key:"text",props:s,style:e,styleFrom:w}]}),X={name:"Scrolling Bar",boxProps:(e,t)=>({...p,..._,...M,...A[i(e.separator)]===""?g:{},...d(e,f),...L(e,t)}),box:[["scrollDirection","scrollDirection",e=>E(e)],["speed","loopDuration",(e,t)=>t.loopDuration!=null?t.loopDuration:e],["loopDuration","loopDuration",(e,t)=>e??t.speed],["loopDelay","loopDelay",e=>e],["separator","separator",e=>i(e)],["join","join",e=>y(e)??void 0],["borders","sectionBorder",e=>e===!1?void 0:{top:1,bottom:1}],...c,["tone","sectionAccent",(e,t)=>r(t.sectionAccent)??x],...m(f)],parts:[k(K,e=>!I(e)),k(N,I)],drop:{...a,...l,size:"each item's Text style: Small → Body 5, Display → Heading 3"}},D=e=>e?.tone==="muted",u=e=>C(h(e)),H={name:"Spec Strip",boxProps:(e,t)=>({...p,..._,...O,...e.fill==="none"?{sectionBorder:{top:1}}:{sectionAccent:u(t)},...d(e,S)}),box:[...c.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,t,o)=>t.fill==="none"?e:u(o)],...m(S)],parts:[{kind:"list",key:"cells",name:"Cell",flat:!0,parts:[{kind:"text",key:"text",props:B,style:T,when:(e,t)=>!D(t)},{kind:"text",key:"text",props:s,style:T,when:(e,t)=>D(t)}]}],drop:{...a,...l,fill:"None → no fill and a line on top. Dark band (the default) → the Box's theme is the site's first dark preset that is not its page (lib/theme `darkBandIndex`; Theme 2 with no site theme): the old fixed `plate-band` colour, as a theme"}},U={Ticker:X,SpecStrip:H};export{U as STRIP_SECTION_TO_BOX};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{resolveSectionBackground as G,THEME_SECTION_BG as K}from"../../../../../format/lib/content/section-background.js";import{SECTION_BG_BUILT_IN as j}from"../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{BUTTON as _,DIM as p,bandAccent as V,bandIndex as q,bandWrites as z,fillNoBoxHolds as J,ownFill as Q,DROP_COMMON as B,DROP_SIDE_PADDING as H,INNER_BOX as o,SAME_KEYS as A,SECTION_BOX as u,
|
|
1
|
+
import{resolveSectionBackground as G,THEME_SECTION_BG as K}from"../../../../../format/lib/content/section-background.js";import{SECTION_BG_BUILT_IN as j}from"../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{BUTTON as _,DIM as p,bandAccent as V,bandIndex as q,bandWrites as z,fillNoBoxHolds as J,ownFill as Q,DROP_COMMON as B,DROP_SIDE_PADDING as H,INNER_BOX as o,SAME_KEYS as A,SECTION_BOX as u,TEXT as c,innerPad as b,innerPadKeys as C}from"./section-to-box-row-parts.js";import{splitParagraphs as Z}from"../../../../components/goldPhrases.js";import{accentItalicRuns as O}from"../../../../../format/lib/markup.js";import{TIMELINE_YEAR_BOX as $,TIMELINE_YEAR_HEAD as M}from"../../../../../format/lib/sections/timeline-year-shape.js";import{boxPadding as ee,LABEL_FACE as te}from"../../../../../format/lib/document/seed-parts.js";import{editorialHeadTree as ne,fluidToken as oe,headWordsOnPhoneLine as re,token as i}from"./section-head-looks.js";import{CTA_PH as d,phAccentAsMarks as N}from"../../../../../format/lib/document/blocks/placeholders.js";import{TIMELINE_PH as y,timelineScaffoldEntries as ie}from"../../../../../format/lib/document/blocks/general/Timeline/meta.js";import{TIMELINE_TRACK_PH as T,timelineTrackScaffoldEntries as ae}from"../../../../../format/lib/document/blocks/general/TimelineTrack/meta.js";const L={buttonBorder:{width:0}},l=(e,t,n={})=>({textStyle:"body-5",...i("label",e),letterSpacing:t,lineHeight:1.5,weight:400,...n}),a=(e,t,n={})=>({...l(e,t),...te,...n}),g=(e,t,n)=>({...e,case:"upper",weight:500,letterSpacing:t,lineHeight:n}),s=(e,t,n={})=>({textStyle:"body-1",fontRole:"heading",...e,weight:400,case:"none",lineHeight:t,...n}),r=(e,t,n={})=>({kind:"text",key:e,props:c,style:t,...n});function R(e,t){return e.kind==="text"?t.includes(e.key)?{...e,mark:"accentItalic"}:e:e.kind==="group"?{...e,parts:e.parts.map(n=>R(n,t))}:e}const W=(e,t)=>t?.future===!0,h=e=>Z(typeof e?.body=="string"?e.body:""),f=e=>G(typeof e.background=="string"?e.background:void 0,j.TimelineTrack),w=e=>f(e)===K?e:{...e,background:"transparent"},se={name:"Milestone Timeline",skip:e=>J(f(e)),boxProps:(e,t)=>{const n=q(w(e),t);return{...u,direction:"column",gap:60,gapPhone:36,sectionBorder:{bottom:1},...b(e,"TimelineTrack"),...Q(f(e),e,t),...n>=0?{sectionAccent:n}:{}}},box:[...A.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,t,n)=>V(e,w(t),n)],...C("TimelineTrack")],parts:[re(R(ne("eyebrow","title","intro"),["title","intro"])),{kind:"group",name:"Track",props:{...o,gap:48,gapPhone:48},parts:[{kind:"group",name:"Years",props:{...o,direction:"row",share:"equal",gap:0,line:!0},parts:[{kind:"list",key:"entries",name:"Year",props:{...o,...$},item:e=>({props:e.future===!0?{upcoming:!0}:{}}),parts:[{kind:"group",name:M.name,props:{...o,...M},parts:[r("date",l(13,.22,{color:"accent"}),{when:(e,t)=>!W(e,t)}),r("date",l(13,.22,{color:"labels"}),{when:W}),r("title",{textStyle:"heading-3",...g(i("headingSmall",20),-.02,1.1)},{role:"heading"})]},r("blurb",s(i("body",13),1.55),{props:p,mark:"accentItalic"})]}]},{kind:"group",name:"Button row",props:{...o,sectionBorder:{top:1,right:0,bottom:0,left:0},sectionPaddingTop:32},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"ghost",props:{..._,align:"right",...L},style:a(13,.3)}]}]}],site:(e,t)=>z({props:w(e.props)},t),drop:{...B,...H,background:"another colour is the Box's Fill, or a skip if no Fill holds it; the band is the Box's theme: the site's band preset (`sectionAccent`), or a declared band-preset write (`lib/theme` `bandPresetIndex`)",headPlacement:"needs a row per head placement: an own-box Milestone Timeline draws no head (its words sit in a Section Header above it), the row always draws the head"}},x=e=>typeof e.layout=="string"?e.layout:"split",m=e=>x(e)==="split",P=e=>!m(e),F=e=>x(e)==="spine",pe=e=>P(e)&&!F(e),v=(e,t,n,U)=>({kind:"group",name:"Picture",keepEmpty:!0,box:[["imageSrc","bgImage"]],props:{...o,sectionBorder:{top:1,right:1,bottom:1,left:1},darken:75,darkenStyle:"bottom",placement:"bottom-center",sectionHeightMode:"fixed",sectionHeightValue:e,sectionHeightUnit:"px",sectionHeightModePhone:"fixed",sectionHeightValuePhone:t,sectionHeightUnitPhone:"px",...ee(12,16),...n},when:k=>U(k)&&typeof k.imageSrc=="string"&&k.imageSrc.trim()!=="",parts:[{kind:"group",name:"Caption",props:{...o,direction:"row",justify:"between",align:"center",gap:12,gapPhone:12,share:"content",phoneRow:2},parts:[r("imageCaption",a(11,.24,{color:"text"})),r("imageMeta",a(11,.24,{color:"accent"}),{props:{...c,align:"right"}})]}]}),D=(e={})=>({kind:"button",key:"ctaText",href:"ctaHref",variant:"ghost",props:{..._,...e,...L},style:a(13,.3)}),S=()=>[r("title",{textStyle:"heading-3",...g(i("headingSmall",24,20),-.02,1.5)},{role:"heading",mark:"accentItalic"}),{kind:"block",type:"Text",props:{...c,_partStyles:{text:s(i("body",17,16),1.6)}},box:[["body","text",(e,t)=>O(h(t)[0]??"")]],when:(e,t)=>h(t).length>0},{kind:"block",type:"Text",props:{...p,_partStyles:{text:s(i("body",17,16),1.6,{paragraphSpacing:14})}},box:[["body","text",(e,t)=>O(h(t).slice(1).join(`
|
|
2
2
|
|
|
3
|
-
`))]],when:(e,t)=>h(t).length>1}],E=()=>r("date",
|
|
3
|
+
`))]],when:(e,t)=>h(t).length>1}],E=()=>r("date",l(13,.24,{color:"accent"})),I=(e,t,n={})=>r(e,t,{...n,props:{...c,...n.props??{},align:"center"}}),Y=oe("headingMedium",40,5,76),X={sectionBorder:{bottom:1}},ce={name:"Story Timeline",skip:e=>x(e)==="track"?'display "track": not converted (it draws the Milestone rail; a Track story is not stored anywhere)':void 0,boxProps:e=>m(e)?{...u,direction:"row",share:[40],gap:80,gapPhone:48,align:"start",...X,...b(e,"Timeline")}:{...u,direction:"column",gap:48,gapPhone:48,align:"center",...X,...b(e,"Timeline")},box:[...A,...C("Timeline")],parts:[{kind:"group",name:"Heading",props:{...o,gap:24,gapPhone:24},when:m,parts:[r("eyebrow",a(12,.3,{color:"accent"}),{role:"eyebrow"}),r("title",{textStyle:"heading-2",...g(Y,-.03,.94)},{role:"heading",mark:"accentItalic"}),r("intro",s(i("body",14),1.6),{props:{...p,maxWidth:360},mark:"accentItalic"}),v(667,419,{},()=>!0),D()]},{kind:"group",name:"Chapters",props:{...o,gap:48,gapPhone:48,line:!1},when:m,parts:[{kind:"list",key:"entries",name:"Chapter",props:{...o,direction:"row",gap:24,gapPhone:8,share:[12],align:"start"},parts:[E(),{kind:"group",name:"Words",props:{...o,gap:14,gapPhone:14},parts:S()}]}]},{kind:"group",name:"Heading",props:{...o,gap:24,gapPhone:24,align:"center",maxWidth:760,widthFit:"fill"},when:P,parts:[I("eyebrow",a(12,.3,{color:"accent"}),{role:"eyebrow"}),I("title",{textStyle:"heading-2",...g(Y,-.03,.94)},{role:"heading",mark:"accentItalic"}),I("intro",s(i("body",14),1.6),{props:{...p,maxWidth:520},mark:"accentItalic"}),D({align:"center"})]},v(506,192,{maxWidth:900,widthFit:"fill"},P),{kind:"group",name:"Chapters",props:{...o,gap:48,gapPhone:48,line:!0,maxWidth:760,widthFit:"fill",sectionPaddingTop:16},when:F,parts:[{kind:"list",key:"entries",name:"Chapter",props:{...o,gap:8,gapPhone:8},parts:[E(),{kind:"group",name:"Words",props:{...o,gap:14,gapPhone:14},parts:S()}]}]},{kind:"group",name:"Chapters",props:{...o,gap:56,gapPhone:56,maxWidth:1e3,widthFit:"fill",sectionPaddingTop:16,mirrorCards:"even"},when:pe,parts:[{kind:"list",key:"entries",name:"Chapter",props:{...o,direction:"row",gap:64,gapPhone:0,share:[50],align:"start"},parts:[{kind:"group",name:"Entry",props:{...o,gap:8,gapPhone:8},parts:[E(),{kind:"group",name:"Words",props:{...o,gap:14,gapPhone:14},parts:S()}]},{kind:"group",name:"Spacer",props:{...o},keepEmpty:!0,parts:[]}]}]}],drop:{...B,...H,layout:"the Box's own arrangement replaces it: Split a row of two Boxes; Spine and Alternating a centred column (Track is skipped)"}},we=()=>({eyebrow:y.eyebrow,title:N(y.title),intro:y.intro,ctaText:d.text,ctaHref:d.href,entries:ie()}),xe=()=>({eyebrow:T.eyebrow,title:N(T.title),intro:T.intro,ctaText:d.text,ctaHref:d.href,entries:ae()}),Pe={TimelineTrack:se,Timeline:ce};export{Pe as TIMELINE_SECTION_TO_BOX,xe as milestoneTimelinePressStarter,we as storyTimelinePressStarter};
|