efficient-web-builder 48.0.0 → 48.1.1
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 +31 -0
- package/dist/editor/components/PreviewPartAnchors.js +1 -1
- package/dist/editor/components/SectionIcon.js +1 -1
- package/dist/editor/lib/document/blocks/general/Contents/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/general/Contents/fields.js +1 -0
- package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
- package/dist/editor/lib/document/blocks/general/index.js +1 -1
- package/dist/editor/lib/document/canvas-typing.d.ts +1 -0
- package/dist/editor/lib/document/canvas-typing.js +1 -1
- package/dist/editor/lib/document/overrides.js +1 -1
- package/dist/editor/lib/document/page-root.js +2 -2
- package/dist/editor/lib/document/part-motion-canvas.d.ts +2 -3
- package/dist/editor/lib/document/part-motion-canvas.js +1 -2
- package/dist/format/lib/content/anchor-name.d.ts +2 -0
- package/dist/format/lib/content/anchor-name.js +1 -0
- package/dist/format/lib/content/box-link.js +1 -1
- package/dist/format/lib/content/list-number.d.ts +1 -0
- package/dist/format/lib/content/list-number.js +1 -0
- package/dist/format/lib/content/section-min-height.d.ts +3 -2
- package/dist/format/lib/content/section-min-height.js +1 -1
- package/dist/format/lib/content/section-sticky.js +1 -1
- package/dist/format/lib/content/sticky-aside.d.ts +2 -0
- package/dist/format/lib/content/sticky-aside.js +1 -0
- package/dist/format/lib/document/blocks/general/Contents/meta.d.ts +5 -0
- package/dist/format/lib/document/blocks/general/Contents/meta.js +1 -0
- package/dist/format/lib/document/blocks/general/metas.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/metas.js +1 -1
- package/dist/format/lib/document/blocks/general/text-part-shapes.json +10 -0
- package/dist/format/lib/document/container-blocks.js +1 -1
- package/dist/format/lib/document/general-order.d.ts +1 -1
- package/dist/format/lib/document/general-order.js +1 -1
- package/dist/format/lib/document/section-catalog.js +1 -1
- package/dist/format/lib/links/page-link-rules.js +1 -1
- package/dist/format/lib/sections/contents-text-regions.d.ts +3 -0
- package/dist/format/lib/sections/contents-text-regions.js +1 -0
- package/dist/format/lib/sections/section-text-regions.js +1 -1
- package/dist/render/components/ContentsList.d.ts +14 -0
- package/dist/render/components/ContentsList.js +1 -0
- package/dist/render/components/DocBody.d.ts +18 -0
- package/dist/render/components/DocBody.js +5 -5
- package/dist/render/components/FAQ.js +1 -1
- package/dist/render/components/PageContentsContext.d.ts +14 -0
- package/dist/render/components/PageContentsContext.js +1 -0
- package/dist/render/components/PartStyledKind.js +1 -1
- package/dist/render/components/PartStyledText.js +1 -1
- package/dist/render/components/PublishedPartStylesContext.js +1 -1
- package/dist/render/components/Reel.js +1 -1
- package/dist/render/components/SectionAnimation.d.ts +3 -2
- package/dist/render/components/SectionAnimation.js +1 -1
- package/dist/render/components/Text.d.ts +2 -1
- package/dist/render/components/Text.js +1 -1
- package/dist/render/components/Timeline.js +1 -1
- package/dist/render/components/goldPhrases.d.ts +1 -1
- package/dist/render/components/goldPhrases.js +2 -2
- package/dist/render/lib/animation/entrance.d.ts +1 -0
- package/dist/render/lib/animation/entrance.js +1 -1
- package/dist/render/lib/animation/part-motion.d.ts +4 -0
- package/dist/render/lib/animation/part-motion.js +2 -1
- package/dist/render/lib/content/page-contents.d.ts +17 -0
- package/dist/render/lib/content/page-contents.js +1 -0
- package/dist/render/lib/document/blocks/general/Contents/render.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/Contents/render.js +1 -0
- package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
- package/dist/render/lib/document/blocks/general/renders.d.ts +1 -0
- package/dist/render/lib/document/blocks/general/renders.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-docbody.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-docbody.js +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/page-render.js +1 -1
- package/dist/render/lib/document/part-styles.js +2 -2
- package/dist/render/lib/document/passes/section-anchor.d.ts +1 -0
- package/dist/render/lib/document/passes/section-anchor.js +1 -1
- package/dist/render/lib/sections/section-to-box.d.ts +1 -0
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/package.json +1 -1
|
@@ -4,10 +4,28 @@ export interface DocBodySection {
|
|
|
4
4
|
body: string;
|
|
5
5
|
}
|
|
6
6
|
export declare function sectionAnchorId(label: string, index: number): string;
|
|
7
|
+
export declare function shownSections<S extends {
|
|
8
|
+
label?: unknown;
|
|
9
|
+
heading?: unknown;
|
|
10
|
+
body?: unknown;
|
|
11
|
+
}>(sections: readonly S[] | undefined): S[];
|
|
12
|
+
export declare function sectionAnchorIds(sections: readonly {
|
|
13
|
+
label?: string;
|
|
14
|
+
heading?: string;
|
|
15
|
+
}[]): string[];
|
|
7
16
|
export interface DocBodyProps {
|
|
8
17
|
tocTitle?: string;
|
|
9
18
|
sections?: DocBodySection[];
|
|
10
19
|
editing?: boolean;
|
|
11
20
|
stickyTop?: number;
|
|
12
21
|
}
|
|
22
|
+
type DocBlock = {
|
|
23
|
+
type: "p";
|
|
24
|
+
text: string;
|
|
25
|
+
} | {
|
|
26
|
+
type: "ul";
|
|
27
|
+
items: string[];
|
|
28
|
+
};
|
|
29
|
+
export declare function parseBlocks(body: string): DocBlock[];
|
|
13
30
|
export default function DocBody({ tocTitle, sections, editing, stickyTop, }: DocBodyProps): import("react").JSX.Element | null;
|
|
31
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{jsx as
|
|
2
|
-
`).split(/\n[ \t]*\n/))
|
|
3
|
-
`).map(
|
|
4
|
-
${
|
|
1
|
+
import{jsx as i,jsxs as f}from"react/jsx-runtime";import{slugify as b}from"efficient-shell/format";import{listNumber as y}from"../../format/lib/content/list-number.js";import{renderGold as m}from"./goldPhrases.js";import{storefrontLines as v}from"../../format/lib/markup.js";import{say as c}from"../../format/lib/editor-words.js";import w,{CONTENTS_STICKY_TOP as N}from"./ContentsList.js";function S(r,e){return b(r)||`section-${e+1}`}const x=r=>typeof r=="string"&&r.trim()!=="";function T(r){return(r??[]).filter(e=>x(e.heading)||x(e.label)||x(e.body))}function k(r){const e=new Set;return r.map((l,d)=>{const t=S(l.label||l.heading||"",d);let a=t,o=2;for(;e.has(a);)a=`${t}-${o++}`;return e.add(a),a})}function _(r){const e=[];for(const l of r.replace(/\r\n?/g,`
|
|
2
|
+
`).split(/\n[ \t]*\n/))l.split(`
|
|
3
|
+
`).map(t=>t.replace(/\s+$/,"")).filter(t=>t.trim()!=="").forEach((t,a)=>{const o=v(t)[0].bullet,n=e.at(-1),s=a===0||!n||n.type==="ul"!==o;if(o){const p=t.slice(2);!s&&n?.type==="ul"?n.items.push(p):e.push({type:"ul",items:[p]})}else!s&&n?.type==="p"?n.text+=`
|
|
4
|
+
${t}`:e.push({type:"p",text:t})});return e}const z=()=>[{label:c("First section"),heading:c("Your *first* section."),body:c(`Write the opening paragraph here.
|
|
5
5
|
|
|
6
6
|
- Start a line with a dash for a bullet.
|
|
7
|
-
- Add as many as you like.`)},{label:
|
|
7
|
+
- Add as many as you like.`)},{label:c("Second section"),heading:c("Your *second* section."),body:c("Leave a blank line between paragraphs to start a new one.")}],$=N;function A({tocTitle:r,sections:e,editing:l=!1,stickyTop:d=$}){const t=T(e);if(t.length===0&&!l)return null;const a=t.length===0&&l?z():t,o=k(a);return i("section",{className:"relative z-[2] bg-bg",children:f("div",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-[240px_1fr] items-start gap-20 border-b border-line px-[var(--sf-site-gutter,40px)] py-20 max-[900px]:grid-cols-1 max-[900px]:gap-10 max-[900px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[900px]:py-[60px]",children:[i(w,{title:r,entries:a.map((n,s)=>({label:n.label||"Section",anchor:o[s]})),stickyTop:d}),i("div",{className:"flex flex-col gap-16",children:a.map((n,s)=>f("article",{id:o[s],className:"flex flex-col gap-[18px]",style:{scrollMarginTop:d},children:[f("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.3em] text-accent",children:[y(s)," · ",m(n.label||"Section")]}),n.heading&&i("h2",{className:"mb-2 border-b border-line pb-[18px] font-heading2 text-[length:min(var(--size-headingMedium,clamp(28px,3.5vw,44px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[1.04] tracking-[-0.025em]",children:m(n.heading)}),_(n.body??"").map((p,h)=>p.type==="ul"?i("ul",{className:"flex max-w-[680px] list-none flex-col gap-2.5 pl-0",children:p.items.map((g,u)=>i("li",{className:"relative pl-6 font-serif text-[length:var(--size-body,17px)] leading-[1.65] text-fg-dim before:absolute before:-top-0.5 before:left-1.5 before:text-[length:var(--size-body,24px)] before:leading-none before:text-accent before:content-['·']",children:m(g)},u))},h):i("p",{className:"max-w-[680px] font-serif text-[length:var(--size-body,17px)] leading-[1.7] text-fg-dim",children:m(p.text)},h))]},o[s]))})]})})}export{A as default,_ as parseBlocks,S as sectionAnchorId,k as sectionAnchorIds,T as shownSections};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as E,jsx as e,jsxs as
|
|
1
|
+
import{Fragment as E,jsx as e,jsxs as o}from"react/jsx-runtime";import{stripMarkup as A}from"../../format/lib/markup.js";import{renderGold as i,renderHeadline as v}from"./goldPhrases.js";import F from"./SectionHeader.js";import{SectionTextParts as T}from"../lib/document/editing-bridges.js";import{TEXT_REGION_ATTR as I,regionStyle as O,textRegionPartKey as R}from"../../format/lib/sections/text-regions.js";import{FAQ_REGIONS as S}from"../../format/lib/sections/faq-text-regions.js";import{SIZE_STEP_OF_ROLE as z}from"../../format/lib/fonts.js";import{say as l}from"../../format/lib/editor-words.js";import{SITE_COLUMN as j}from"../../format/lib/content/page-width.js";import{listNumber as L}from"../../format/lib/content/list-number.js";function y(t){return A(t).trim()}function d(t,r){return t?{[I]:r}:{}}function x(t,r){const s=t?.[R(r)]?.role;return O(s,S[r],z)}function M({editing:t,nodeId:r,children:s}){return!t||!r?e(E,{children:s}):e(T,{nodeId:r,sectionType:"FAQ",children:s})}const Q="relative z-[2] bg-bg py-[120px] max-[800px]:py-[70px]",k="relative z-[2] bg-bg pt-0 pb-[120px] max-[800px]:pt-0 max-[800px]:pb-[70px]";function P({num:t,title:r,link:s,items:_,defaultOpen:b=!0,editing:a=!1,omitHead:f=!1,nodeId:N,partStyles:p}){const m=(_??[]).filter(n=>(n.question??"").trim()!==""),w=a&&m.length===0;if(m.length===0&&!a)return null;const u=w?[{question:l("Add your first question"),answer:l("Write the answer here.")},{question:l("Add another question"),answer:l("Write the answer here.")}]:m,h=u.filter(n=>(n.answer??"").trim()!=="").map(n=>({"@type":"Question",name:y(n.question??""),acceptedAnswer:{"@type":"Answer",text:y(n.answer??"")}})),g=!a&&h.length>0?JSON.stringify({"@context":"https://schema.org","@type":"FAQPage",mainEntity:h}).replace(/</g,"\\u003c"):null,q=r?v(r,!0):void 0;return o("section",{className:f?k:Q,children:[e("style",{children:".faq-acc__ico{transition:transform .2s ease}details[open]>summary .faq-acc__ico{transform:rotate(45deg)}"}),g&&e("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:g}}),o("div",{className:j,children:[f?null:e(F,{num:t!==void 0?i(t):void 0,title:q,link:s?{text:i(s.text),href:s.href}:void 0,accent:!0}),e(M,{editing:a,nodeId:N,children:e("div",{children:u.map((n,c)=>o("details",{open:c===0&&b,className:"border-b border-line",children:[o("summary",{className:"flex cursor-pointer list-none items-center gap-6 py-7 [&::-webkit-details-marker]:hidden max-[800px]:gap-4 max-[800px]:py-5",children:[e("span",{className:"font-mono text-[length:var(--size-label,14px)] tracking-[0.2em] text-accent",...d(a,"number"),style:x(p,"number"),children:L(c)}),e("span",{className:"flex-1 font-display text-[length:var(--size-body,18px)] font-medium uppercase tracking-[0.02em] text-fg max-[800px]:text-[length:var(--size-body,15px)]",...d(a,"question"),style:x(p,"question"),children:i(n.question??"")}),e("span",{"aria-hidden":!0,className:"faq-acc__ico shrink-0 text-[length:var(--size-body,22px)] leading-none text-fg-dim",children:"+"})]}),n.answer&&e("div",{className:"pb-8 pl-11 pr-8 max-[800px]:pl-0 max-[800px]:pr-0",children:e("p",{className:"max-w-[760px] text-[length:var(--size-body,15px)] leading-[1.7] text-fg-dim",...d(a,"answer"),style:x(p,"answer"),children:i(n.answer)})})]},c))})})]})]})}export{P as default};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { ContentsEntry } from "./ContentsList.js";
|
|
3
|
+
export declare function PageContentsFromDocument({ content, children }: {
|
|
4
|
+
content: readonly unknown[] | undefined;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
export declare function ContentsEntriesDrawn({ id, children }: {
|
|
8
|
+
id: unknown;
|
|
9
|
+
children: (entries: ContentsEntry[] | undefined) => ReactNode;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
export declare function KickerNumberDrawn({ id, children }: {
|
|
12
|
+
id: unknown;
|
|
13
|
+
children: (number: string | undefined) => ReactNode;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as o,Fragment as i}from"react/jsx-runtime";import{createContext as a,useContext as u,useMemo as m}from"react";import{pageContentsDrawing as g}from"../lib/content/page-contents.js";const s=a(null),c=n=>n==null||n===""?void 0:String(n);function x({content:n,children:e}){const t=m(()=>g(n),[n]);return o(s.Provider,{value:t,children:e})}function p({id:n,children:e}){const t=u(s),r=c(n);return o(i,{children:e(r?t?.entries.get(r):void 0)})}function C({id:n,children:e}){const t=u(s),r=c(n);return o(i,{children:e(r?t?.numbers.get(r):void 0)})}export{p as ContentsEntriesDrawn,C as KickerNumberDrawn,x as PageContentsFromDocument};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Fragment as
|
|
1
|
+
"use client";import{Fragment as i,jsx as n}from"react/jsx-runtime";import{usePartEntrance as l,usePublishedPartKindRule as m,usePublishedSharedKindRule as f}from"./PublishedPartStylesContext.js";import{PART_STYLED_ATTR as T,TEXT_STYLE_ATTR as c}from"../lib/document/part-styles.js";function d({kind:e,shared:s=!1,children:r}){const o=m(e),a=f(e),t=s?a:o,u=l(t);return t?n("span",{ref:u,[T]:t.stamp,...t.textStyle?{[c]:t.textStyle}:{},children:r}):n(i,{children:r})}export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Fragment as
|
|
1
|
+
"use client";import{Fragment as m,jsx as e}from"react/jsx-runtime";import{ClaimedStamp as s,usePartEntrance as o,usePublishedPartRule as i}from"./PublishedPartStylesContext.js";import{PART_STYLED_ATTR as l,TEXT_STYLE_ATTR as u}from"../lib/document/part-styles.js";function T({value:a,children:r}){const t=i(a),n=o(t);return t?e(s,{stamp:t.stamp,children:e("span",{ref:n,[l]:t.stamp,...t.textStyle?{[u]:t.textStyle}:{},children:r})}):e(m,{children:r})}export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Fragment as x,jsx as
|
|
1
|
+
"use client";import{Fragment as x,jsx as d,jsxs as C}from"react/jsx-runtime";import{createContext as h,useContext as f,useEffect as b,useId as v,useMemo as O,useRef as w}from"react";import{armEntrance as A}from"efficient-shell/format";import{blockDrawsTextStyle as F,partRuleForKind as S,partRuleForText as M,partStyleCss as k,publishedPartStyles as j}from"../lib/document/part-styles.js";import{usePhoneWidth as K}from"./SectionAnimation.js";import{styleKeyForPart as L}from"../../format/lib/sections/section-text-kinds.js";import{NO_MOTIONS as N,PART_LIFT_ATTR as g,drawPartEntrance as D,ensurePartLiftSheet as I,firstOnPage as $,partBoxOf as H,partMotionDrawn as B,partMoves as J}from"../lib/animation/part-motion.js";const p=h(null),E=h(null),R=h(null);function Z({needles:t,styles:n,motions:e=N,type:r,children:i}){const c=v(),l=JSON.stringify([c,t,n,e,r]),s=O(()=>{const u=Object.keys(e).filter(o=>J(e[o]));return j(t,n,c,o=>L(r,o),o=>F(r,o),o=>u.includes(o)?B(e[o]):null,u)},[l]);if(!s)return d(x,{children:i});const a=k(s);return C(x,{children:[a&&d("style",{href:`${W}${c}-${Y(a)}`,precedence:_,dangerouslySetInnerHTML:{__html:a.replace(/</g,"\\3c ")}}),d(p.Provider,{value:s,children:i})]})}const P=new WeakMap;function T(t,n){const e=$(n.filter(r=>r.arm));for(const r of n)r===e||!r.undo||(r.undo(),r.undo=void 0);e?.arm&&!e.undo&&(e.undo=e.arm()),n.some(r=>r.lift)?(I(t.ownerDocument),t.setAttribute(g,"")):t.removeAttribute(g)}function ee(t){const n=w(null),e=t?.motion?.entrance??null,r=t?.motion?.hover==="lift",i=K(n,e!==null),c=JSON.stringify(e);return b(()=>{const l=n.current,s=H(l?.parentElement??null);if(!e&&!r||!l||!s)return;const a=e?()=>{const m=D(s,i?e.phone:e.desktop),y=A(s);return()=>{y?.(),m()}}:null,u=P.get(s)??[];P.set(s,u);const o={element:l,arm:a,lift:r};return u.push(o),T(s,u),()=>{const m=u.indexOf(o);m<0||(u.splice(m,1),o.undo?.(),o.undo=void 0,T(s,u),u.length||P.delete(s))}},[c,r,i]),n}const _="sf-part-styles",W=`${_}-`;function Y(t){let n=2166136261;for(let e=0;e<t.length;e+=1)n^=t.charCodeAt(e),n=Math.imul(n,16777619);return(n>>>0).toString(36)}function te(t){const n=f(p),e=f(E),r=M(n,t);return r&&r.stamp!==e?r:null}function ne(t){return S(f(p),t)}function re({stamp:t,children:n}){return d(E.Provider,{value:t,children:n})}function oe({children:t}){const n=f(p);return d(R.Provider,{value:n,children:t})}function se(t){return S(f(R),t)}export{re as ClaimedStamp,_ as PART_STYLES_PRECEDENCE,Z as PublishedPartStyles,oe as SharedPartKinds,ee as usePartEntrance,ne as usePublishedPartKindRule,te as usePublishedPartRule,se as usePublishedSharedKindRule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as c,Fragment as s}from"react/jsx-runtime";import{normaliseReelShape as
|
|
1
|
+
"use client";import{jsx as t,jsxs as c,Fragment as s}from"react/jsx-runtime";import{listNumber as x}from"../../format/lib/content/list-number.js";import{normaliseReelShape as u,reelRailClass as g,reelSurfaceRailClass as h}from"../../format/lib/reel.js";function b({slides:a,active:r,shape:o,placement:e,ref:n,tone:i="media",label:m}){const l=u(o),d=i==="surface"?{"--overlay-fg":"var(--fg)","--overlay-chrome":"var(--fg)","--overlay-scrim":"var(--site-surface-2)"}:void 0;return c("aside",{ref:n,"aria-label":m??"Featured slides",className:i==="surface"?h(l):g(l,e),style:{color:"var(--overlay-fg)",...d},children:[l==="cards"&&t(f,{slides:a,active:r}),l==="dots"&&t(v,{count:a.length,active:r}),l==="numbers"&&t(y,{count:a.length,active:r}),l==="bar"&&t($,{count:a.length,active:r}),l==="squares"&&t(N,{count:a.length,active:r}),l==="tabs"&&t(k,{slides:a,active:r}),l==="largeTabs"&&t(j,{slides:a,active:r})]})}function f({slides:a,active:r}){return c(s,{children:[t("span",{className:"mb-1 font-mono text-[length:var(--size-label,10px)] uppercase tracking-[0.28em] text-overlay-chrome/55",children:"Reel · pick a slide"}),a.map((o,e)=>{const n=e===r;return c("button",{type:"button","data-idx":e,"aria-pressed":n,"aria-label":`Go to ${o.name||`slide ${e+1}`}`,className:["group flex w-[170px] cursor-pointer flex-col items-start gap-0.5 border bg-overlay-scrim/55 px-3 py-2.5 text-left transition-all motion-reduce:transition-none max-[1100px]:w-[140px]",n?"border-accent bg-overlay-scrim/70":"border-overlay-chrome/15 hover:border-overlay-chrome/45 hover:bg-overlay-scrim/70"].join(" "),children:[t("span",{className:["font-display text-[length:var(--size-body,13px)] font-medium uppercase leading-tight tracking-[-0.01em]",n?"text-accent":"text-overlay-fg"].join(" "),children:o.name||`Slide ${e+1}`}),t("span",{className:"font-mono text-[length:var(--size-label,9px)] uppercase tracking-[0.2em] text-overlay-chrome/55",children:n?"▶ Now playing":o.process||" "})]},e)})]})}function v({count:a,active:r}){return t(s,{children:Array.from({length:a},(o,e)=>t("button",{type:"button","data-idx":e,"aria-pressed":e===r,"aria-label":`Go to slide ${e+1}`,className:`h-2 cursor-pointer rounded-full transition-all motion-reduce:transition-none ${e===r?"w-5 bg-accent":"w-2 bg-overlay-chrome/45 hover:bg-overlay-chrome/70"}`},e))})}function y({count:a,active:r}){return t(s,{children:Array.from({length:a},(o,e)=>t("button",{type:"button","data-idx":e,"aria-pressed":e===r,"aria-label":`Go to slide ${e+1}`,className:`cursor-pointer font-mono text-[length:var(--size-label,11px)] leading-none tracking-[0.06em] transition-colors ${e===r?"text-overlay-fg":"text-overlay-chrome/45 hover:text-overlay-chrome/80"}`,children:x(e)},e))})}function N({count:a,active:r}){return t(s,{children:Array.from({length:a},(o,e)=>t("button",{type:"button","data-idx":e,"aria-pressed":e===r,"aria-label":`Go to slide ${e+1}`,className:`grid h-8 w-8 cursor-pointer place-items-center border border-overlay-chrome/25 text-[length:var(--size-label,14px)] font-bold leading-none transition-colors motion-reduce:transition-none ${e===r?"bg-accent text-[color:var(--accent-ink)]":"bg-overlay-scrim/45 text-overlay-chrome/75 hover:text-overlay-chrome"}`,children:e+1},e))})}function $({count:a,active:r}){return t(s,{children:Array.from({length:a},(o,e)=>t("button",{type:"button","data-idx":e,"aria-pressed":e===r,"aria-label":`Go to slide ${e+1}`,className:`h-full flex-1 cursor-pointer transition-colors ${e<=r?"bg-overlay-fg":"bg-overlay-chrome/25"}`},e))})}function k({slides:a,active:r}){return t(s,{children:a.map((o,e)=>{const n=e===r;return t("button",{type:"button","data-idx":e,"aria-pressed":n,className:["flex min-w-[140px] flex-1 cursor-pointer items-end px-6 py-7 text-left transition-colors",e>0?"border-l border-overlay-chrome/15":"",n?"bg-overlay-scrim/70":"hover:bg-overlay-scrim/40"].join(" "),children:t("span",{className:["font-heading3 text-[length:var(--size-headingSmall,24px)] font-medium uppercase leading-tight tracking-[-0.02em]",n?"text-overlay-fg":"text-overlay-chrome/55"].join(" "),children:o.name})},e)})})}const p={label:"text-[length:var(--size-label,13px)]",labelUpTo720:"max-[720px]:text-[length:var(--size-label,11px)]",nameUpTo720:"max-[720px]:text-[length:var(--size-body,15px)]"};function j({slides:a,active:r}){return t(s,{children:a.map((o,e)=>{const n=e===r,i=o.name.trim().split(/\s+/),m=i.slice(0,-1).join(" "),l=i.slice(-1)[0]??"";return c("button",{type:"button","data-idx":e,"aria-pressed":n,className:["group relative grid flex-1 cursor-pointer grid-cols-[auto_1fr] items-end gap-5 px-6 py-8 text-left transition-colors",e<a.length-1?"border-r border-line":"","max-[720px]:grid-cols-[auto_1fr] max-[720px]:items-center max-[720px]:gap-2 max-[720px]:px-3 max-[720px]:py-3",n?"bg-surface":"hover:bg-fg/[0.04]"].join(" "),children:[t("span",{className:[`pb-2 font-mono ${p.label} tracking-[0.3em] max-[720px]:pb-0 ${p.labelUpTo720} max-[720px]:tracking-[0.24em]`,n?"text-accent":"text-fg-dim group-hover:text-accent"].join(" "),children:String.fromCharCode(65+e%26)}),c("span",{className:`font-heading2 text-[length:min(var(--size-headingMedium,clamp(28px,3.6vw,48px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.02em] ${p.nameUpTo720}`,children:[m?c(s,{children:[m," "]}):null,t("em",{className:"font-normal italic text-accent",children:l})]}),n&&t("span",{className:"pointer-events-none absolute inset-x-0 -bottom-px h-0.5 bg-accent"})]},e)})})}export{b as default};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type CSSProperties, type ReactNode } from "react";
|
|
2
2
|
import { type EntranceValue } from "efficient-shell/format";
|
|
3
|
-
|
|
3
|
+
import { ENTRANCE_WRAPPER_CLASS } from "../lib/animation/entrance.js";
|
|
4
|
+
export { ENTRANCE_WRAPPER_CLASS };
|
|
4
5
|
export declare function SectionAnimation({ desktop, phone, editing, boxClass, boxAttrs, boxStyle, children, }: {
|
|
5
6
|
desktop: EntranceValue;
|
|
6
7
|
phone: EntranceValue;
|
|
@@ -23,4 +24,4 @@ export declare const entranceReplay: {
|
|
|
23
24
|
};
|
|
24
25
|
export declare function usePhoneWidth(ref: {
|
|
25
26
|
current: HTMLElement | null;
|
|
26
|
-
}): boolean;
|
|
27
|
+
}, enabled?: boolean): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as x}from"react/jsx-runtime";import{useEffect as d,useRef as h,useState as A}from"react";import{armEntrance as O,entranceAttrs as P,playEntrance as v}from"efficient-shell/format";import{PHONE_MEDIA as R}from"../lib/content/view-values.js";import{useCellLayer as J}from"./InBoxContext.js";import{ENTRANCE_WRAPPER_CLASS as E}from"../lib/animation/entrance.js";function D({desktop:e,phone:t,editing:o,boxClass:s,boxAttrs:n,boxStyle:r,children:c}){const i=h(null),l=J(),u=L(i),w=u?t:e,{attrs:N,style:p}=P(w),m=h(f.seed(e,t)),S=JSON.stringify(e),g=JSON.stringify(t);return d(()=>{const a=i.current;if(a){if(o){const y=f.next(m.current,e,t,u);m.current=y.seen,y.play&&v(a);return}return O(a)}},[S,g,u,o]),x("div",{ref:i,className:`${E}${l.fill}${s?` ${s}`:""}`,...n,...N,...Object.keys(p).length||r?{style:{...r,...p}}:{},children:l.inner(c)})}const f={seed(e,t){return{desktop:JSON.stringify(e),phone:JSON.stringify(t)}},next(e,t,o,s){const n=f.seed(t,o);return{play:s?n.phone!==e.phone:n.desktop!==e.desktop,seen:n}}};function L(e,t=!0){const[o,s]=A(!1);return d(()=>{if(!t)return;const n=e.current?.ownerDocument?.defaultView??(typeof window>"u"?null:window);if(!n?.matchMedia)return;const r=n.matchMedia(R),c=()=>s(r.matches);return c(),r.addEventListener("change",c),()=>r.removeEventListener("change",c)},[e,t]),o}export{E as ENTRANCE_WRAPPER_CLASS,D as SectionAnimation,f as entranceReplay,L as usePhoneWidth};
|
|
@@ -6,6 +6,7 @@ interface TextProps {
|
|
|
6
6
|
pad?: PadValues;
|
|
7
7
|
ownWidth?: boolean;
|
|
8
8
|
text: string;
|
|
9
|
+
number?: string;
|
|
9
10
|
align: Align;
|
|
10
11
|
alignPhone?: unknown;
|
|
11
12
|
tone: Tone;
|
|
@@ -15,5 +16,5 @@ interface TextProps {
|
|
|
15
16
|
hero?: boolean;
|
|
16
17
|
}
|
|
17
18
|
export declare function headingLevelOfStyle(id: string): HeadingLevel;
|
|
18
|
-
export default function Text({ text, align, alignPhone, tone, contained, hero, pad, tag, textStyle, ownWidth }: TextProps): import("react").JSX.Element;
|
|
19
|
+
export default function Text({ text, number, align, alignPhone, tone, contained, hero, pad, tag, textStyle, ownWidth }: TextProps): import("react").JSX.Element;
|
|
19
20
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as a}from"react/jsx-runtime";import
|
|
1
|
+
import{jsx as a,jsxs as $}from"react/jsx-runtime";import h from"./BlockFrame.js";import{renderGold as m,renderHeadline as v,splitParagraphs as L}from"./goldPhrases.js";import{headingLook as S}from"./Heading.js";import{alignPhoneClass as E}from"../../format/lib/content/block-align.js";import{textTagOf as _}from"../../format/lib/content/text-tag.js";import{KICKER_NUMBER_ATTR as k,kickerLead as C}from"../lib/content/page-contents.js";import{isTextStyleId as O}from"../lib/document/part-styles.js";import{faceClassOf as g}from"../../format/lib/text-style-face.js";const r={bodyUpTo800:"max-[800px]:text-[length:var(--size-body,14px)]",bodySmall:"text-[length:var(--size-body,15px)]",bodyLarge:"text-[length:var(--size-body,17px)]",label:"text-[length:var(--size-label,13px)]"};function j(e,s){const l=E("place",e,s);return l?` ${l}`:""}const z={left:"text-left",center:"text-left mx-auto",right:"text-left ml-auto"},A=`max-w-[380px] ${r.bodySmall} leading-[1.5] opacity-80 ${r.bodyUpTo800}`,I={default:"text-fg",dim:"text-fg-dim"};function R(e){return String(Math.min(Number(e.slice(8)),6))}function w({text:e,number:s,align:l,alignPhone:u,tone:y,contained:f,hero:b=!1,pad:o,tag:N,textStyle:p,ownWidth:T=!1}){if(b)return a("p",{className:A,children:m(e)});const i=s?a("span",{[k]:"",children:C(s)}):void 0,t=O(p)?p:void 0,x=`${t?`${g({id:t})} `:""}${T?"":"max-w-[680px] "}whitespace-pre-line ${t==="body-5"?r.label:r.bodyLarge} leading-[1.7] ${z[l]}${j(l,u)} ${I[y]}`,d=_(N);if(t?.startsWith("heading-")){const c=R(t),n=S(c,g({id:t}));return a(h,{contained:f,className:"py-6",pad:o?{values:o,frame:24}:void 0,children:$(d,{className:n.className,style:n.style,children:[i,v(e.trim(),!1)]})})}return a(h,{contained:f,className:"py-4",pad:o?{values:o,frame:16}:void 0,children:d==="p"?L(e).map((c,n)=>a("p",{className:x,children:m(c,!1,n===0?i:void 0)},n)):a(d,{className:x,children:m(e.trim(),!1,i)})})}export{w as default,R as headingLevelOfStyle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as N,jsxs as i}from"react/jsx-runtime";import{SiteLink as
|
|
1
|
+
import{jsx as e,Fragment as N,jsxs as i}from"react/jsx-runtime";import{SiteLink as T}from"../lib/site-runtime.js";import{stripMarkup as _}from"../../format/lib/markup.js";import{STICKY_ASIDE_CLASS as j}from"../../format/lib/content/sticky-aside.js";import C from"./Placeholder.js";import E from"./SectionEyebrow.js";import{renderGold as m,renderHeadline as w,splitParagraphs as I}from"./goldPhrases.js";import{CentreRailDot as U,CentreRailLine as A,railSideIsLeft as D,SPINE_LINE_CLASS as F,SpineDot as P}from"./TimelineRail.js";import{scrim as H}from"../../format/lib/content/scrim.js";const n={bodyUpTo800:"max-[800px]:text-[length:var(--size-body,16px)]",headingSmallUpTo800:"max-[800px]:text-[length:var(--size-headingSmall,20px)]",bodySmall:"text-[length:var(--size-body,14px)]",bodyLarge:"text-[length:var(--size-body,17px)]",headingSmall:"text-[length:var(--size-headingSmall,24px)]",labelSmall:"text-[length:var(--size-label,11px)]",labelLarge:"text-[length:var(--size-label,13px)]"};function S({eyebrow:a,title:t,intro:r,center:s=!1}){return i(N,{children:[a&&e(E,{text:a,size:12}),t&&e("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(40px,5vw,76px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.94] tracking-[-0.03em] text-fg",children:w(t)}),r&&e("p",{className:[`font-display ${n.bodySmall} leading-[1.6] text-fg-dim`,s?"max-w-[520px]":"max-w-[360px]"].join(" "),children:m(r,!0)})]})}function y({cta:a,className:t=""}){return a?.text?i(T,{href:a.href,className:["group inline-flex items-center gap-3.5 border border-line px-5 py-4",`font-mono ${n.labelLarge} uppercase tracking-[0.3em] text-fg`,"transition-colors hover:border-accent hover:text-accent",t].join(" "),children:[m(a.text),e("span",{"aria-hidden":!0,className:"text-accent transition-transform group-hover:translate-x-[3px]",children:"→"})]}):null}function z({src:a,caption:t,meta:r,aspectClass:s,editing:x,sizes:c="100vw",className:o=""}){return!a&&!x?null:i("figure",{className:["relative overflow-hidden border border-line bg-surface",s,o].join(" "),children:[e(C,{label:t||"Image",src:a,alt:_(t??""),sizes:c}),e("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0",style:{background:`linear-gradient(180deg, transparent 55%, ${H(.75)} 100%)`}}),(t||r)&&i("figcaption",{className:`absolute inset-x-0 bottom-0 z-[1] flex items-center justify-between gap-3 px-4 py-3 font-mono ${n.labelSmall} uppercase tracking-[0.24em] text-overlay-fg/85`,children:[e("span",{children:t?m(t):""}),r&&e("span",{className:"text-accent",children:m(r)})]})]})}function g({entry:a}){const t=I(a.body??"");return i(N,{children:[a.title&&e("h3",{className:`mb-3.5 font-heading3 ${n.headingSmall} font-medium uppercase tracking-[-0.02em] text-fg ${n.headingSmallUpTo800}`,children:w(a.title)}),t.length>0&&e("div",{className:`space-y-3.5 font-display ${n.bodyLarge} leading-[1.6] ${n.bodyUpTo800}`,children:t.map((r,s)=>e("p",{className:s===0?"text-fg":"text-fg-dim",children:m(r,!0)},s))})]})}function R({layout:a="split",eyebrow:t,title:r,intro:s,imageSrc:x,imageCaption:c,imageMeta:o,cta:f,entries:L,padTop:h,padBottom:u,editing:b}={}){const $=typeof h=="number"?h:120,k=typeof u=="number"?u:120,d=(L??[]).filter(l=>(l.date??"").trim()||(l.title??"").trim()||(l.body??"").trim());return e("section",{className:"relative z-[2] bg-bg",children:e("div",{className:"mx-auto max-w-[var(--sf-site-width,1600px)] border-b border-line px-[var(--sf-site-gutter,40px)] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]",style:{paddingTop:$,paddingBottom:k},children:a==="split"?i("div",{className:"grid grid-cols-[1fr_1.4fr] gap-20 max-[1100px]:grid-cols-1 max-[1100px]:gap-12",children:[i("aside",{className:`${j} flex flex-col gap-6 self-start max-[1100px]:static`,children:[e(S,{eyebrow:t,title:r,intro:s}),e(z,{src:x,caption:c,meta:o,aspectClass:"mt-1 aspect-[4/5]",sizes:"(max-width: 1100px) 100vw, 420px",editing:b}),e(y,{cta:f,className:"mt-2 self-start"})]}),e("ol",{className:"flex flex-col gap-12",children:d.map((l,p)=>i("li",{className:"grid grid-cols-[80px_1fr] items-start gap-6 max-[700px]:grid-cols-1 max-[700px]:gap-2",children:[e("span",{className:`pt-1.5 font-mono ${n.labelLarge} tracking-[0.24em] text-accent`,children:l.date?m(l.date):""}),e("div",{className:"max-w-[640px]",children:e(g,{entry:l})})]},p))})]}):i("div",{children:[i("header",{className:"mx-auto flex max-w-[760px] flex-col items-center gap-6 text-center",children:[e(S,{eyebrow:t,title:r,intro:s,center:!0}),e(y,{cta:f})]}),e(z,{src:x,caption:c,meta:o,aspectClass:"mx-auto mt-12 aspect-[16/9] w-full max-w-[900px]",sizes:"(max-width: 900px) 100vw, 900px",editing:b}),a==="spine"?e("ol",{className:"relative mx-auto mt-16 max-w-[760px]",children:d.map((l,p)=>i("li",{className:`relative ${F} pb-12 pl-10 last:pb-0 max-[700px]:pl-8`,children:[e(P,{}),e("div",{className:`mb-2 font-mono ${n.labelLarge} tracking-[0.24em] text-accent`,children:l.date?m(l.date):""}),e("div",{className:"max-w-[640px]",children:e(g,{entry:l})})]},p))}):i("ol",{className:"relative mx-auto mt-16 max-w-[1000px]",children:[e(A,{}),d.map((l,p)=>{const v=D(p);return i("li",{className:"relative mb-14 pl-8 last:mb-0 min-[801px]:grid min-[801px]:grid-cols-2 min-[801px]:gap-16 min-[801px]:pl-0",children:[e(U,{}),i("div",{className:v?"min-[801px]:col-start-1 min-[801px]:pr-8 min-[801px]:text-right":"min-[801px]:col-start-2 min-[801px]:pl-8",children:[e("div",{className:`mb-2 font-mono ${n.labelLarge} tracking-[0.24em] text-accent`,children:l.date?m(l.date):""}),e("div",{className:["max-w-[520px] max-[800px]:max-w-none",v?"min-[801px]:ml-auto":""].join(" "),children:e(g,{entry:l})})]})]},p)})]})]})})})}export{R as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import { type ShopMarkupNode } from "../../format/lib/markup.js";
|
|
3
|
-
export declare function renderGold(value: string, italic?: boolean): ReactNode;
|
|
3
|
+
export declare function renderGold(value: string, italic?: boolean, lead?: ReactNode): ReactNode;
|
|
4
4
|
export declare function renderMarkupNodes(nodes: readonly ShopMarkupNode[], italic?: boolean): ReactNode;
|
|
5
5
|
export declare function renderChrome(value: string): ReactNode;
|
|
6
6
|
export declare function renderHeadline(value: string, italic?: boolean): ReactNode;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`);return t(
|
|
1
|
+
import{jsxs as a,jsx as t}from"react/jsx-runtime";import{Fragment as h}from"react";import{parseHexColor as N}from"efficient-shell/format";import{linePrefix as _,storefrontLines as S}from"../../format/lib/markup.js";import{COLOUR_TOKEN as p,WORD_STYLE_ATTR as g,WORD_STYLE_BY_KIND as E}from"../../format/lib/word-styles.js";import f from"./PartStyledText.js";import{withRMark as d}from"./RMark.js";function T(e,n=!1,s){const r=x(n),c=S(e);if(c.length===1){const[o]=c,l=_(o),L=l?A(l,o.children):o.children;return a(f,{value:e,children:[s,u(L,r)]})}const i=[];return c.forEach((o,l)=>{if(o.bullet){i.push(t("span",{"data-sf-bullet":"",className:C,children:u(o.children,r)},l));return}if(o.number!=null){i.push(a("span",{"data-sf-number":o.number,className:R,children:[a("span",{className:k,children:[o.number,"."]}),u(o.children,r)]},l));return}l>0&&!w(c[l-1])&&i.push(t("br",{},`br${l}`)),i.push(t(h,{children:u(o.children,r)},l))}),a(f,{value:e,children:[s,i]})}const C="relative block pl-6 before:absolute before:left-1.5 before:font-bold before:text-accent before:content-['·']",R="relative block pl-[2em]",k="absolute left-0 w-[1.6em] text-right tabular-nums";function w(e){return e.bullet||e.number!=null}const O="text-accent underline underline-offset-[0.18em]";function A(e,n){const[s,...r]=n;return s?.kind==="text"?[{kind:"text",text:`${e}${s.text}`},...r]:[{kind:"text",text:e},...n]}function B(e){if(e)return N(e)===e.toLowerCase()?e:Object.hasOwn(p,e)?p[e]:void 0}function u(e,n){const s=[];let r=!1;return e.forEach((c,i)=>{if(c.kind==="text"){s.push(t("span",{children:d(c.text)},i)),r=!0;return}r||s.push(t("span",{},`e${i}`)),s.push(b(c,i,n)),r=!1}),r||s.push(t("span",{},"end")),s}function m(e,n){return e.length===1&&e[0].kind==="text"?d(e[0].text):e.map((s,r)=>s.kind==="text"?t(h,{children:d(s.text)},r):b(s,r,n))}function D(e,n=!1){return u(e,x(n))}function x(e){return e?"font-normal italic text-accent":"not-italic text-accent"}function P(e){return t(f,{value:e,children:t("span",{children:e})})}function b(e,n,s){if(e.kind==="link")return t("a",{href:e.href,className:O,children:m(e.children,s)},n);const r=m(e.children,s),c=E[e.kind];if(c)return t("span",{[g]:c,children:r},n);switch(e.kind){case"underline":return t("u",{children:r},n);case"sup":return t("sup",{children:r},n);case"sub":return t("sub",{children:r},n);case"color":{const i=B(e.color);return i?t("span",{style:{color:i},children:r},n):t("span",{children:r},n)}case"accent":case"highlight":return t("em",{className:s,children:r},n);case"bold":return t("strong",{className:"font-semibold",children:r},n);case"italic":return t("em",{className:"italic",children:r},n);case"strike":return t("s",{className:"line-through",children:r},n);default:return t("span",{children:r},n)}}function Y(e,n=!0){const s=e.split(`
|
|
2
|
+
`);return t(f,{value:e,children:s.map((r,c)=>a("span",{children:[T(r,n),c<s.length-1?t("br",{}):null]},c))})}function H(e){return e.split(/\n\s*\n/).map(n=>n.trim()).filter(Boolean)}export{P as renderChrome,T as renderGold,Y as renderHeadline,D as renderMarkupNodes,H as splitParagraphs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{phoneKey as c}from"efficient-easel/draw";import{readEntrance as d}from"efficient-shell/format";import{SECTION_THEME_EXCLUDED as l}from"../../../format/lib/content/section-surface.js";const i={kind:"entrance",from:"entranceFrom",duration:"entranceDuration",delay:"entranceDelay"},u="sectionAnimation",a=e=>e!=null&&e!=="";function f(e,n){const t=e[i[n]];return n==="kind"&&!a(t)?e[u]:t}function o(e,n,t){if(t==="phone"){const r=e[c(i[n])];if(a(r))return r}return f(e,n)}function s(e,n){return d(o(e,"kind",n),o(e,"from",n),o(e,"duration",n),o(e,"delay",n))}function
|
|
1
|
+
import{phoneKey as c}from"efficient-easel/draw";import{readEntrance as d}from"efficient-shell/format";import{SECTION_THEME_EXCLUDED as l}from"../../../format/lib/content/section-surface.js";const b="sf-entrance",i={kind:"entrance",from:"entranceFrom",duration:"entranceDuration",delay:"entranceDelay"},u="sectionAnimation",a=e=>e!=null&&e!=="";function f(e,n){const t=e[i[n]];return n==="kind"&&!a(t)?e[u]:t}function o(e,n,t){if(t==="phone"){const r=e[c(i[n])];if(a(r))return r}return f(e,n)}function s(e,n){return d(o(e,"kind",n),o(e,"from",n),o(e,"duration",n),o(e,"delay",n))}function h(e){const n=s(e,"desktop"),t=s(e,"phone");return n.kind==="none"&&t.kind==="none"?null:{desktop:n,phone:t}}const E={...Object.fromEntries([...l].map(e=>[e,"a root position: sticky bar; an outer box becomes its sticky containing block and the pin collapses (the same fact every wrapper pass excludes it for, lib/content/section-surface)"])),HeroSlide:"a slide is a direct child of the Hero's transform track ([&>*]:basis-full); a wrapper would take its width, and the Hero already moves one slide in at a time",HeroGroup:"a slide box is placed by grid-item properties on its own root (--sf-hg-row, justify-self); a wrapper becomes the grid item and the box loses its anchor (lib/document/blocks/general/HeroGroup/meta)"},x=new Set(Object.keys(E));export{x as ENTRANCE_EXCLUDED,E as ENTRANCE_EXCLUDED_WHY,i as ENTRANCE_KEYS,b as ENTRANCE_WRAPPER_CLASS,u as LEGACY_ENTRANCE_KEY,h as entranceDrawn,s as entranceOf};
|
|
@@ -18,4 +18,8 @@ export declare function drawPartEntrance(box: HTMLElement, value: EntranceValue)
|
|
|
18
18
|
export declare function firstOnPage<T extends {
|
|
19
19
|
element: Element;
|
|
20
20
|
}>(parts: readonly T[]): T | undefined;
|
|
21
|
+
export declare const PART_HOST_ATTR = "data-sf-part-host";
|
|
22
|
+
export declare function partBoxOf(start: Element | null): HTMLElement | null;
|
|
23
|
+
export declare const PART_LIFT_ATTR = "data-sf-part-lift";
|
|
24
|
+
export declare function ensurePartLiftSheet(doc: Document): void;
|
|
21
25
|
export {};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{phoneKey as
|
|
1
|
+
import{phoneKey as u}from"efficient-easel/draw";import{ENTRANCE_STATE_ATTR as m,entranceAttrs as d}from"efficient-shell/format";import{ENTRANCE_KEYS as f,ENTRANCE_WRAPPER_CLASS as T,entranceDrawn as O}from"./entrance.js";import{HOVER_KEY as p,hoverOf as _}from"../../../format/lib/animation/hover.js";import{propsWithPartRecord as E,readPartRecord as P,readPartRecords as A}from"../../../format/lib/document/part-records.js";import{partLiftRules as R}from"../document/part-styles.js";const v={},i="_partMotion",b=[...Object.values(f).flatMap(t=>[t,u(t)]),p];function D(t){return A(t,i)}function S(t,e){return P(t,i,e)}const h=new Set([f.kind,p]);function K(t,e,n,o){const{[n]:s,...r}=S(t,e),c=o==null||o===""||o==="none"&&h.has(n)?r:{...r,[n]:o};return E(t,i,e,Object.keys(c).length?c:null)}function N(t){return{entrance:O(t),hover:_(t)}}function W(t){const e=N(t);return e.entrance!==null||e.hover!=="none"}function F(t,e){const{attrs:n,style:o}=d(e),s=Object.keys(n).filter(r=>n[r]!==void 0);for(const r of s)t.setAttribute(r,String(n[r]));for(const[r,a]of Object.entries(o))t.style.setProperty(r,String(a));return()=>{for(const r of s)t.removeAttribute(r);for(const r of Object.keys(o))t.style.removeProperty(r);t.removeAttribute(m)}}const x=4;function H(t){let e;for(const n of t)(!e||n.element.compareDocumentPosition(e.element)&x)&&(e=n);return e}const y="data-sf-part-host";function Y(t){const e=t?.ownerDocument.defaultView;let n=t;for(;n&&!n.hasAttribute(y)&&!n.classList.contains(T);){const o=e?.getComputedStyle(n).display??"";if(o==="contents")return null;if(o!=="inline")return n;n=n.parentElement}return null}const M="data-sf-part-lift",l="sf-part-lift";function B(t){if(t.getElementById(l))return;const e=t.createElement("style");e.id=l,e.textContent=R(`[${M}]`).join(`
|
|
2
|
+
`),t.head.appendChild(e)}export{v as NO_MOTIONS,y as PART_HOST_ATTR,M as PART_LIFT_ATTR,b as PART_MOTION_KEYS,i as PART_MOTION_PROP,F as drawPartEntrance,B as ensurePartLiftSheet,H as firstOnPage,Y as partBoxOf,N as partMotionDrawn,W as partMoves,K as propsWithPartMotion,S as readPartMotion,D as readPartMotions};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ContentsEntry } from "../../components/ContentsList.js";
|
|
2
|
+
export declare const CONTENTS_ENTRIES_PROP = "_contentsEntries";
|
|
3
|
+
export declare const KICKER_NUMBER_PROP = "_kickerNumber";
|
|
4
|
+
export declare const KICKER_NUMBER_ATTR = "data-sf-kicker-number";
|
|
5
|
+
type Props = Record<string, unknown>;
|
|
6
|
+
type Node = {
|
|
7
|
+
type?: string;
|
|
8
|
+
props?: Props;
|
|
9
|
+
};
|
|
10
|
+
export type PageContentsDrawing = {
|
|
11
|
+
entries: ReadonlyMap<string, ContentsEntry[]>;
|
|
12
|
+
numbers: ReadonlyMap<string, string>;
|
|
13
|
+
};
|
|
14
|
+
export declare function pageContentsDrawing(content: readonly Node[] | undefined): PageContentsDrawing | null;
|
|
15
|
+
export declare const kickerLead: (number: string) => string;
|
|
16
|
+
export declare function withPageContents<T>(data: T): T;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{readHidable as h}from"efficient-easel/draw";import{isNodeList as x}from"efficient-easel/data";import{anchorSlug as R}from"../../../format/lib/content/anchor-name.js";import{namedRowField as w}from"../../../format/lib/content/card-template.js";import{linkedCount as y}from"../../../format/lib/content/count-numbers.js";import{listNumber as P}from"../../../format/lib/content/list-number.js";import{stripMarkup as I}from"../../../format/lib/markup.js";const g="Contents",M="Flex",E="Text",S="_contentsEntries",K="_kickerNumber",$="data-sf-kicker-number",v=t=>h(t).text.trim(),T=t=>R(t?.anchor),d=t=>String(t.props?.id??""),B=t=>!h(t.props?.text).hidden&&!y(t.props)&&!w(t.props);function m(t){return Object.values(t.props??{}).filter(x)}function _(t){for(const n of m(t))for(const e of n){if(e.props?._hidden)continue;if(e.type===E&&B(e))return e;if(e.type===E)continue;const s=_(e);if(s)return s}}function b(t){return m(t).some(n=>n.some(e=>e&&!e.props?._hidden&&(e.type===g||b(e))))}function L(t){const n=[],e=s=>{for(const o of s)if(!(!o||o.props?._hidden)){if(o.type===g){n.push({contents:o,sections:[]});continue}if(o.type===M&&T(o.props)&&n.length&&!b(o)){n[n.length-1].sections.push({box:o,kicker:_(o)});continue}for(const i of m(o))e(i)}};return e(t),n}function j(t){return t.map(n=>({label:n.kicker?I(v(n.kicker.props?.text)):"",anchor:T(n.box.props)}))}function F(t){const n=t?.length?L(t):[];if(!n.length)return null;const e=new Map,s=new Map;for(const o of n){const i=d(o.contents);i&&e.set(i,j(o.sections)),o.sections.forEach((c,r)=>{const p=c.kicker?d(c.kicker):"";p&&s.set(p,P(r))})}return{entries:e,numbers:s}}const q=t=>`${t} · `;function z(t){const n=t;if(!n?.content?.length)return t;const e=F(n.content);if(!e)return t;const{entries:s,numbers:o}=e,i=c=>{let r=c.props??{},p=!1;for(const[O,u]of Object.entries(r)){if(!x(u))continue;const k=u.map(i);k.some((C,N)=>C!==u[N])&&(r={...r,[O]:k},p=!0)}const f=d(c),l=f?s.get(f):void 0;l&&(r={...r,[S]:l},p=!0);const a=f?o.get(f):void 0;return a&&(r={...r,[K]:a},p=!0),p?{...c,props:r}:c};return{...n,content:n.content.map(i)}}export{S as CONTENTS_ENTRIES_PROP,$ as KICKER_NUMBER_ATTR,K as KICKER_NUMBER_PROP,q as kickerLead,F as pageContentsDrawing,z as withPageContents};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Fragment as d,jsx as n}from"react/jsx-runtime";import l,{CONTENTS_STICKY_TOP as m}from"../../../../../components/ContentsList.js";import{ContentsEntriesDrawn as f}from"../../../../../components/PageContentsContext.js";import{readHidable as T}from"efficient-easel/draw";import{CONTENTS_ENTRIES_PROP as g}from"../../../../content/page-contents.js";import{say as a}from"../../../../../../format/lib/editor-words.js";import{ContentsMeta as h}from"../../../../../../format/lib/document/blocks/general/Contents/meta.js";const C=()=>[{label:a("First section"),anchor:"first-section"},{label:a("Second section"),anchor:"second-section"}],O={...h,render:t=>{const i=T(t.title),e=!!t.editor?.isEditing,r=s=>{const c=s?.length?s:e?C():[];return!c.length&&!e?n(d,{}):n(l,{title:i.hidden?void 0:i.text,entries:c,stickyTop:m,sticky:t.sticky!==!1,editing:e,partStyles:t._partStyles})},o=t[g];return o?r(o):n(f,{id:t.id,children:r})}};export{O as ContentsRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as
|
|
1
|
+
import{Fragment as y,jsx as r}from"react/jsx-runtime";import{CardRowDrawn as b}from"../../../../../components/CardRowContext.js";import{CountDrawn as w}from"../../../../../components/CountRowsContext.js";import{KickerNumberDrawn as P}from"../../../../../components/PageContentsContext.js";import{KICKER_NUMBER_PROP as R}from"../../../../content/page-contents.js";import{namedRowField as S}from"../../../../../../format/lib/content/card-template.js";import{blockSetsItsWidth as T,blockSizeValuesOf as k}from"../../../../content/block-size.js";import{linkedCount as C}from"../../../../../../format/lib/content/count-numbers.js";import{padValuesOf as K}from"../../../../content/section-padding.js";import _ from"../../../../../components/Text.js";import{hidableText as i,readHidable as D}from"efficient-easel/draw";import{PH as f}from"../../../../../../format/lib/document/blocks/placeholders.js";import{phPrev as F}from"../../scaffold.js";import{readPartStyle as O}from"../../../part-styles.js";import{TextMeta as W}from"../../../../../../format/lib/document/blocks/general/Text/meta.js";const L={...W,render:t=>{const{text:o,align:l,alignPhone:c,tone:h,tag:x,contained:u,editor:s}=t;if(D(o).hidden)return r(y,{});const a=O(t,"text").textStyle,g=a?.startsWith("heading-")?f.heading:f.body,n=(e,m)=>r(_,{text:F(e,g,s)??"",number:m,align:l,alignPhone:c,tone:h,tag:x,textStyle:a,ownWidth:T(k(t)),contained:u,pad:K(t)}),p=S(t),d=C(t);if(d)return r(w,{countKey:d,children:e=>n(e??i(o))});if(!p){const e=t[R];return typeof e=="string"?n(i(o),e):r(P,{id:t.id,children:m=>n(i(o),m)})}return r(b,{type:"Text",props:t,children:e=>n(i(e.text))})}};export{L as TextRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BannerRender as r}from"./Banner/render.js";import{BreadcrumbRender as e}from"./Breadcrumb/render.js";import{ButtonBlockRender as o}from"./ButtonBlock/render.js";import{CardsRender as t}from"./Cards/render.js";import{CategoryBarRender as m}from"./CategoryBar/render.js";import{ChartRender as
|
|
1
|
+
import{BannerRender as r}from"./Banner/render.js";import{BreadcrumbRender as e}from"./Breadcrumb/render.js";import{ButtonBlockRender as o}from"./ButtonBlock/render.js";import{CardsRender as t}from"./Cards/render.js";import{CategoryBarRender as m}from"./CategoryBar/render.js";import{ChartRender as n}from"./Chart/render.js";import{ContactLocationsRender as i}from"./ContactLocations/render.js";import{CustomHTMLRender as d}from"./CustomHTML/render.js";import{DividerRender as a}from"./Divider/render.js";import{ContentsRender as p}from"./Contents/render.js";import{DocBodyRender as R}from"./DocBody/render.js";import{DocMastheadRender as f}from"./DocMasthead/render.js";import{DocMetaCardsRender as s}from"./DocMetaCards/render.js";import{DocTabsRender as c}from"./DocTabs/render.js";import{EyebrowRender as S}from"./Eyebrow/render.js";import{FAQRender as l}from"./FAQ/render.js";import{FeaturedCoverRender as g}from"./FeaturedCover/render.js";import{FlexRender as B}from"./Flex/render.js";import{FootprintRender as u}from"./Footprint/render.js";import{GridRender as C}from"./Grid/render.js";import{HeadingRender as T}from"./Heading/render.js";import{HeroRender as H}from"./Hero/render.js";import{HeroGroupRender as M}from"./HeroGroup/render.js";import{HeroSingleRender as L}from"./HeroSingle/render.js";import{HeroSlideRender as h}from"./HeroSlide/render.js";import{ImageBlockRender as k}from"./ImageBlock/render.js";import{IntegrationsRender as y}from"./Integrations/render.js";import{IntroBleedRender as P}from"./IntroBleed/render.js";import{CountdownRender as D}from"./Countdown/render.js";import{KeyFeaturesRender as F}from"./KeyFeatures/render.js";import{LocationMapRender as b}from"./LocationMap/render.js";import{LogoBlockRender as E}from"./LogoBlock/render.js";import{LogosRender as I}from"./Logos/render.js";import{LongReadRender as x}from"./LongRead/render.js";import{ManifestoRender as A}from"./Manifesto/render.js";import{MastheadRender as G}from"./Masthead/render.js";import{MockupRender as v}from"./Mockup/render.js";import{OrderSummaryRender as w}from"./OrderSummary/render.js";import{ParagraphsARender as K}from"./ParagraphsA/render.js";import{PaymentBadgesRender as N}from"./PaymentBadges/render.js";import{PostCardRender as O}from"./PostCard/render.js";import{ProcessStepsRender as Q}from"./ProcessSteps/render.js";import{ProseRender as W}from"./Prose/render.js";import{SectionHeaderRender as _}from"./SectionHeader/render.js";import{SeriesRender as j}from"./Series/render.js";import{SpacerRender as q}from"./Spacer/render.js";import{SpecStripRender as z}from"./SpecStrip/render.js";import{SplitRender as J}from"./Split/render.js";import{StatsRender as U}from"./Stats/render.js";import{StatsParagraphRender as V}from"./StatsParagraph/render.js";import{TestimonialsRender as X}from"./Testimonials/render.js";import{TextRender as Y}from"./Text/render.js";import{TickerRender as Z}from"./Ticker/render.js";import{TimelineRender as $}from"./Timeline/render.js";import{TimelineTrackRender as rr}from"./TimelineTrack/render.js";import{TitleWithButtonsRender as er}from"./TitleWithButtons/render.js";const me={Banner:r,Breadcrumb:e,ButtonBlock:o,Cards:t,CategoryBar:m,Chart:n,ContactLocations:i,CustomHTML:d,Divider:a,Contents:p,DocBody:R,DocMasthead:f,DocMetaCards:s,DocTabs:c,Eyebrow:S,FAQ:l,FeaturedCover:g,Flex:B,Footprint:u,Grid:C,Heading:T,Hero:H,HeroGroup:M,HeroSingle:L,HeroSlide:h,ImageBlock:k,Integrations:y,IntroBleed:P,Countdown:D,KeyFeatures:F,LocationMap:b,LogoBlock:E,Logos:I,LongRead:x,Manifesto:A,Masthead:G,Mockup:v,OrderSummary:w,ParagraphsA:K,PaymentBadges:N,PostCard:O,ProcessSteps:Q,Prose:W,SectionHeader:_,Series:j,Spacer:q,SpecStrip:z,Split:J,Stats:U,StatsParagraph:V,Testimonials:X,Text:Y,Ticker:Z,Timeline:$,TimelineTrack:rr,TitleWithButtons:er};export{me as GENERAL_RENDERS};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{parseBlocks as m,sectionAnchorIds as b,shownSections as x}from"../../../../components/DocBody.js";import{DIM as p,DROP_COMMON as P,INNER_BOX as o,SECTION_BOX as B,TEXT as a,smallText as r,wrapperPad as _,wrapperPadKeys as f}from"./section-to-box-row-parts.js";import{fluidToken as u,token as d}from"./section-head-looks.js";const c={top:80,bottom:80,topPhone:60,bottomPhone:60},l=18,h=18,g=8,w=10,i=t=>typeof t=="string"&&t.trim()!=="",y=t=>x(t.sections),T=t=>m(typeof t.body=="string"?t.body:"").map(e=>e.type==="ul"?{kind:"ul",text:e.items.map(n=>`- ${n}`).join(`
|
|
2
|
+
`)}:{kind:"p",text:e.text}),s={textStyle:"body-5",...d("label",12),case:"upper",letterSpacing:.3,color:"accent",lineHeight:1.5},k={textStyle:"body-1",fontRole:"accent",...d("body",17)},O=[r("label",s),{...r("title",s),when:(t,e)=>!i(e?.label)},{kind:"block",type:"Text",when:(t,e)=>!i(e?.label)&&!i(e?.title),props:{...a,text:"Section",_partStyles:{text:s}}},{kind:"group",name:"Heading",props:{...o,sectionPaddingBottom:g,sectionPaddingBottomPhone:g},parts:[{kind:"group",name:"Heading line",props:{...o,sectionBorder:{bottom:1},sectionPaddingBottom:h,sectionPaddingBottomPhone:h},parts:[{kind:"text",key:"heading",role:"heading",props:a,style:{textStyle:"heading-2",...u("headingMedium",28,3.5,44),case:"upper",weight:500,lineHeight:1.04,letterSpacing:-.025}}]}]},{kind:"list",key:"body",name:"Body",flat:!0,of:T,parts:[{kind:"text",key:"text",props:p,style:{...k,lineHeight:1.7},when:(t,e)=>e?.kind==="p"},{kind:"text",key:"text",props:p,style:{...k,lineHeight:1.65,paragraphSpacing:w},when:(t,e)=>e?.kind==="ul"}]}],S={name:"Document Text",boxProps:t=>({...B,direction:"row",gap:80,gapPhone:40,sectionBorder:{bottom:1},..._(t,c)}),box:["anchor","sectionAccent","_hidden",...f(c)],parts:[{kind:"block",type:"Contents",props:t=>({title:t.tocTitle??"",sticky:!0,widthFit:"fixed",width:240,widthFitPhone:"fill"})},{kind:"group",name:"Sections",props:{...o,gap:64,gapPhone:64,widthFit:"fill"},parts:[{kind:"list",key:"sections",name:"Section",of:t=>y(t),props:{...o,gap:l,gapPhone:l},item:(t,e,n)=>({props:{anchor:b(y(n))[e]??`section-${e+1}`}}),parts:O}]}],reads:{tocTitle:"the Contents block's Heading"},drop:{...P,stickyTop:"the Contents block draws DocBody's default (120px); 0 live nodes store it"}},C={DocBody:S};export{C as DOCBODY_SECTION_TO_BOX};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{tabletKey as I}from"efficient-easel/draw";import{SECTION_BOX_SLOT as G,SECTION_BOX_TYPE as
|
|
1
|
+
import{tabletKey as I}from"efficient-easel/draw";import{SECTION_BOX_SLOT as G,SECTION_BOX_TYPE as j}from"../../../sections/section-to-box.js";import{BUTTON as k,DIM as i,DROP_COMMON as D,DROP_SIDE_PADDING as W,INNER_BOX as o,SAME_KEYS as X,SECTION_BOX as P,SH_LINK as f,TEXT as p,bandAccent as v,bandIndex as K,bandPage as $,bandProps as S,bandWrites as z,smallText as d,wrapperPad as l}from"./section-to-box-row-parts.js";import{editorialHeadTree as U,token as c}from"./section-head-looks.js";import{readAnchorName as Y}from"../../../../../format/lib/content/anchor-name.js";import{declaredBlockSource as B}from"../../../../../format/lib/content/block-sources.js";import{parseLocationTileShape as F,splitLegacyRegion as T}from"../../../../../format/lib/content/contact.js";import{groupColumns as g}from"../../../../../format/lib/locations-grid.js";import{phoneHref as q}from"../../../../../format/lib/links/phone-href.js";import{hasMapCoords as V}from"../../../../../format/lib/map-styles.js";const a=e=>typeof e=="string"?e:e==null?"":String(e),m=e=>Array.isArray(e.locations)?e.locations.map(t=>t??{}):[],s=e=>a(e.group),w=e=>`loc-${e}`,x=e=>a(e.state).trim()||T(a(e.region)).state,O=e=>a(e.country).trim()||T(a(e.region)).country,_=e=>[x(e),O(e)].filter(Boolean).join(" · "),J=e=>m(e).some(t=>a(t.photo).trim()!==""),Q=e=>m(e).some(t=>V(Number(t.lat),Number(t.lng))),Z=(e,t)=>m(e).filter(n=>s(n)===s(t)).length,ee=(e,t)=>Z(e,t)===1?"wide":F(e.imageShape),h={top:100,bottom:100,topPhone:60,bottomPhone:60},N=48,r=(e,t={})=>({textStyle:"body-5",...c("label",e),case:"upper",...t}),y={top:1,right:1,bottom:1,left:1},u=(e,t)=>({sectionPaddingTop:e,sectionPaddingBottom:e,sectionPaddingLeft:t,sectionPaddingRight:t,sectionPaddingTopPhone:e,sectionPaddingBottomPhone:e,sectionPaddingLeftPhone:t,sectionPaddingRightPhone:t}),b={...o,direction:"row",share:"equal",gap:0},te=e=>t=>t>g(t)?{...o,gap:0}:{...b,...t>1?{phoneRow:e}:{}},oe={kind:"group",name:"Gallery",props:{...o,gap:20,_hidden:!0},when:J,parts:[{kind:"group",name:"Gallery head",props:{...o,direction:"row",justify:"between",align:"end",gap:24,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:16},parts:[d("galleryKicker",r(12,{color:"accent",letterSpacing:.3})),{kind:"text",key:"galleryHint",props:{...i,align:"right",alignPhone:"left"},style:r(11,{letterSpacing:.22,alignPhone:"left"})}]},{kind:"group",name:"Groups",props:{...o,gap:24},parts:[{kind:"list",key:"locations",name:"City picture",props:{...o,darken:85,darkenStyle:"bottom",placement:"bottom-left",sectionBorder:y,...u(12,12)},item:(e,t,n)=>({props:{...a(e.photo).trim()?{bgImage:a(e.photo)}:{},link:`#${w(t)}`,boxShape:ee(n,e)}}),parts:[{kind:"text",key:"name",props:p,style:r(11,{letterSpacing:.22,color:"text"})}],groups:{of:s,name:"Group",props:{...o,gap:10},head:e=>({label:s(e[0]??{})}),parts:[d("label",r(11,{color:"accent",letterSpacing:.3}))],itemsName:"Cities",itemsProps:te(2),perRow:g,rowName:"Row",rowProps:{...b,phoneRow:2}}}]}]},ne={kind:"group",name:"Words",props:{...o,gap:12,gapPhone:12,...u(28,28),sectionHeightMode:"fixed",sectionHeightValue:280,sectionHeightUnit:"px",sectionHeightModePhone:"auto"},parts:[{kind:"group",name:"Name row",props:{...o,direction:"row",justify:"between",align:"start",gap:14,share:"content",phoneRow:2,sharePhone:"content",wrapPhone:"wrap",sectionPaddingBottom:6,sectionPaddingBottomPhone:6},parts:[{kind:"group",name:"Name",props:{...o,gap:6,gapPhone:6},parts:[{kind:"text",key:"name",role:"heading",props:p,style:{textStyle:"heading-3",...c("headingSmall",30),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02}},{kind:"block",type:"Text",props:{...p,_partStyles:{text:r(12,{color:"accent",letterSpacing:.24,lineHeight:1.5})}},box:["region","state","country"].map(e=>[e,"text",(t,n)=>_(n)]),when:(e,t)=>_(t??{})!==""}]},{kind:"group",name:"Time zone",props:{...o,sectionBorder:y,...u(6,10)},parts:[{kind:"text",key:"timezone",props:{...i,textFit:"line"},style:r(12,{letterSpacing:.22,lineHeight:1.5})}]}]},{kind:"text",key:"address",props:i,style:{textStyle:"body-5",fontRole:"heading",...c("body",14),lineHeight:1.5}},{kind:"block",type:"ButtonBlock",props:{...k,...f,variant:"ghost",arrow:!1,_partStyles:{label:r(13,{letterSpacing:.18,color:"text",lineHeight:24/13})}},box:[["phone","label"],["phone","href",e=>q(a(e))??"#"]],when:(e,t)=>a(t?.phone).trim()!==""},{kind:"text",key:"hours",props:i,style:r(12,{letterSpacing:.18,lineHeight:1.7})}]},ae={kind:"block",type:"LocationMap",props:e=>({mapTheme:typeof e.mapTheme=="string"?e.mapTheme:"auto"}),box:["name","lat","lng","mapsUrl","geocode",...["region","state"].map(e=>[e,"state",(t,n)=>x(n)]),...["region","country"].map(e=>[e,"country",(t,n)=>O(n)])]},re={kind:"group",name:"Map",props:{...o,sectionBorder:{top:1,right:0,bottom:0,left:0}},parts:[ae]},ie={kind:"list",key:"locations",name:"City",props:(e,t)=>({...o,gap:0,justify:"between",sectionBorder:y,jumpHighlight:!0,sectionAccent:K(e,t)>=0?$(e.sectionAccent,t):-1}),item:(e,t)=>({props:{anchor:w(t)}}),parts:[ne,re],groups:{of:s,name:"Group",props:{...o,gap:20},head:e=>{const t=e[0]??{};return{key:s(t),groupName:a(t.groupName),count:`${e.length} location${e.length===1?"":"s"}`}},parts:[{kind:"group",name:"Group head",props:{...o,direction:"row",justify:"between",align:"end",gap:16,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:16},when:(e,t)=>a(t?.key).trim()!=="",parts:[d("key",r(13,{color:"accent",letterSpacing:.3})),{kind:"text",key:"groupName",role:"heading",props:p,style:{textStyle:"heading-3",...c("headingSmall",24),case:"upper",weight:500,letterSpacing:-.01}},{kind:"text",key:"count",props:i,style:r(12,{letterSpacing:.22})}]}],itemsName:"Cities",itemsProps:e=>({...b,columns:g(e),[I("columns")]:1})}},C=r(10,{letterSpacing:.25}),se={kind:"block",type:j,props:{...o,name:"Credit",direction:"row",justify:"end",align:"center",gap:6,share:"content",wrap:!0},when:Q,slot:G,keepEmpty:!0,parts:[{kind:"block",type:"Text",props:{...i,text:"Location coordinates ©",_partStyles:{text:C}}},{kind:"block",type:"ButtonBlock",props:{...k,...f,variant:"ghost",arrow:!1,label:"OpenStreetMap contributors",href:"https://www.openstreetmap.org/copyright",_partStyles:{label:{...C,color:"labels"}}}}]},M=(e,t)=>Object.fromEntries(t.filter(n=>e[n]!==void 0).map(n=>[n,e[n]])),E=["sectionPaddingTop","sectionPaddingTopTablet","sectionPaddingTopPhone"],H=["sectionPaddingBottom","sectionPaddingBottomTablet","sectionPaddingBottomPhone"],A=e=>e.map(t=>[t,t,(n,R)=>l(R,h)[t]]),L=["sectionAccent","sectionAccent",v],pe=["gridSpan","_hidden"],ce={name:"City pictures",skip:e=>B(e)?`fed by the data source "${B(e)}": its cities are read as the page is served, not stored on the node`:void 0,boxProps:(e,t)=>({...P,direction:"column",gap:40,anchor:"studios",...M(l(e,h),E),sectionPaddingBottom:N,sectionPaddingBottomPhone:N,...S(e,t)}),box:[...X.filter(e=>e!=="sectionAccent"&&e!=="anchor"),L,["anchor","anchor",e=>Y(e).trim()?e:"studios"],...A(E)],parts:[U("sectionNumber","heading","tagline"),oe],also:[{name:"City maps",boxProps:(e,t)=>({...P,direction:"column",gap:40,sectionBorder:{bottom:1},sectionPaddingTop:0,sectionPaddingTopPhone:0,...M(l(e,h),H),...S(e,t)}),box:[...pe,L,...A(H)],parts:[ie,se]}],reads:{mapTheme:"City maps Box: each Map block's Map theme",imageShape:"City pictures Box: each picture Box's Box shape"},site:z,drop:{...D,...W,apiKey:"a stored Google Maps key from before the map needed none: the website's one map (components/SiteMap) takes no key, and a key is a credential, never page content",mapId:"a Google Maps style id from the same retired map: nothing in src/ reads it",gallery:"the retired separate tile list: the wall is derived from the cities (`components/ContactLocations`), nothing in src/ reads it",dataSource:"always empty here: a node fed by a source is skipped (see skip)"}},fe={ContactLocations:ce};export{fe as LOCATIONS_SECTION_TO_BOX};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hasWords as
|
|
1
|
+
import{hasWords as v,registerSectionToBox as n}from"../../../sections/section-to-box.js";import{BUTTON as g,DIM as m,DROP_COMMON as s,DROP_SIDE_PADDING as c,INNER_BOX as t,leadLine as H,SAME_KEYS as d,SECTION_BOX as p,lineBorder as A,TEXT as l,innerPad as S,innerPadKeys as f,smallText as P,wrapperPad as u,wrapperPadKeys as b}from"./section-to-box-row-parts.js";import{CARDS_SECTION_TO_BOX as R}from"./section-to-box-rows-cards.js";import{normalizeSiteGutter as L,normalizeSiteGutterPhone as C,siteGutterPhoneFollows as D}from"../../../../../format/lib/content/page-width.js";import{finiteNumber as W}from"../../../../../format/lib/finite-number.js";import{STATS_SECTION_TO_BOX as X}from"./section-to-box-rows-stats.js";import{LOGOS_SECTION_TO_BOX as G}from"./section-to-box-rows-logos.js";import{STRIP_SECTION_TO_BOX as M}from"./section-to-box-rows-strip.js";import{TIMELINE_SECTION_TO_BOX as F}from"./section-to-box-rows-timeline.js";import{LOCATIONS_SECTION_TO_BOX as z}from"./section-to-box-rows-locations.js";import{HEAD_ONLY_SECTION_TO_BOX as K}from"./section-to-box-rows-head.js";import{PAGE_HEADER_SECTION_TO_BOX as Y}from"./section-to-box-rows-pageheader.js";import{DOCBODY_SECTION_TO_BOX as j}from"./section-to-box-rows-docbody.js";import{fluidToken as U,headTree as w,token as r}from"./section-head-looks.js";const T={top:72,bottom:72,topPhone:72,bottomPhone:72},q={name:"Editorial Text",boxProps:e=>({...p,direction:"column",gap:28,gapPhone:28,sectionBorder:{top:1},...u(e,T)}),box:[["topBorder","sectionBorder",e=>e===!1?void 0:{top:1}],...d,...b(T)],parts:[w("Prose"),{kind:"text",key:"body",props:m,style:{textStyle:"body-1",...r("body",16),lineHeight:1.7,paragraphSpacing:18}}],drop:{...s,...c,headPlacement:"needs a row per head placement: an own-box Prose draws no head (its words sit in a Section Header above it), the row always draws the head. 0 of 123 live nodes store it (the live export, 2026-10-24)"}},k={buttonPaddingTop:20,buttonPaddingBottom:20,buttonPaddingLeft:28,buttonPaddingRight:28},O=(e,o)=>o?.variant==="primary",_=(e,o)=>({kind:"list",key:"buttons",name:"Button",flat:!0,when:e,parts:[{kind:"button",key:"label",href:"href",when:O,variant:"primary",style:{letterSpacing:.3},props:{...g,...k,...o}},{kind:"button",key:"label",href:"href",when:(i,a)=>!O(i,a),variant:"ghost",style:{letterSpacing:.3},props:(i,a)=>({...g,...k,...o,...A(i,a)})}]}),h=e=>v(e.title),J={name:"Call-to-Action Heading",boxProps:e=>({...p,direction:"row",align:"center",justify:h(e)?"between":"end",gap:60,gapPhone:60,share:"content",sectionBorder:{bottom:1},...S(e,"TitleWithButtons")}),box:[...d,...f("TitleWithButtons")],parts:[{kind:"group",name:"Title",props:{...t,maxWidth:1e3,widthFitPhone:"fill"},parts:[{kind:"text",key:"title",role:"heading",props:l,style:{textStyle:"heading-1",...U("headingLarge",48,7,108),case:"upper",lineHeight:.94,letterSpacing:-.035}}]},{kind:"group",name:"Buttons",props:e=>({...t,gap:14,gapPhone:14,widthFitPhone:"fill",...h(e)?{minWidth:280,minWidthPhone:0}:{}}),parts:[_(h,{widthFit:"fill",iconPosition:"end"}),_(e=>!h(e),{})]}],drop:{...s,buttonsAlign:"moves the buttons only when there is no heading (4 of 128 live nodes), where the Box puts them at the end. 0 of 128 live nodes store it (the live export, 2026-10-24)",buttonsAlignPhone:"the phone's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Phone view's Block alignment row), so nothing moves"}};function Q(e){const{siteGutter:o,siteGutterPhone:i}=e.site??{},a=L(o),y=Math.min(20,C(i)??D(o));return{sectionPaddingLeft:a,sectionPaddingRight:a,sectionPaddingLeftPhone:y,sectionPaddingRightPhone:y}}const B={top:40,bottom:64,topPhone:24,bottomPhone:36},V={name:"Section Header",boxProps:(e,o)=>({...p,direction:"column",gap:0,...u(e,B),...Q(o)}),box:[...d,...b(B)],parts:[w("SectionHeader")],drop:{...s,...c,headStyle:"needs a row per head look: the row draws the standard look; the editorial, simple, statement, natural and essay looks are other layouts. 0 of 69 live nodes store it (the live export, 2026-10-24)",eyebrowLook:"read only by the simple, statement, natural and essay looks, which this row does not draw. 0 of 69 live nodes store it",rowGap:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",descriptionSize:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",numStyle:"Solid (the default; 4 of 69 live nodes store it) IS the eyebrow Text the row draws; Outlined (0 live) needs an outlined-number text look"}},x={...t,direction:"row",share:"bigLeft",gap:30},E={...t,sectionPaddingLeft:30,sectionPaddingLeftPhone:0},N=(e,o,i)=>({kind:"group",name:e,props:o,parts:[i]}),Z={name:"Lead Text",boxProps:e=>({...p,direction:"column",gap:40,gapPhone:40,sectionBorder:{bottom:1},...S(e,"ParagraphsA")}),box:[...d,...f("ParagraphsA")],parts:[{kind:"group",name:"Numbers",props:{...x,gapPhone:24,sectionBorder:{bottom:1},sectionPaddingBottom:40,sectionPaddingBottomPhone:40},parts:[{kind:"group",name:"Eyebrow",props:{...t,sectionPaddingTop:5,sectionPaddingBottom:1,sectionPaddingTopPhone:5,sectionPaddingBottomPhone:1},parts:[P("eyebrow",{color:"labels",...r("label",12),letterSpacing:.24})]},N("Stats column",t,{kind:"group",name:"Stats",props:{...E,gap:0,gapPhone:0},parts:[{kind:"list",key:"stats",name:"Stat",flat:!0,parts:[H("value","label",{...r("label",13),letterSpacing:.18,lineHeight:1.8})]}]})]},{kind:"group",name:"Words",props:{...x,gapPhone:28},parts:[{kind:"group",name:"Lead",props:t,parts:[{kind:"group",name:"Measure",props:{...t,maxWidth:780},parts:[{kind:"text",key:"lead",props:l,style:{textStyle:"heading-3",...r("headingSmall",22,20),weight:400,case:"none",lineHeight:1.45,letterSpacing:-.005}}]}]},N("Note column",{...t,justify:"end",widthFit:"fill"},{kind:"group",name:"Founders",props:{...E,gap:8,gapPhone:8},parts:[{kind:"group",name:"Note",props:{...t,gap:6,gapPhone:6},parts:[{kind:"text",key:"foundersHeading",props:l,style:{textStyle:"body-1",fontRole:"heading",...r("body",18,16),weight:500,letterSpacing:-.01,lineHeight:1.7}},{kind:"text",key:"foundersBody",props:m,style:{textStyle:"body-5",fontRole:"heading",...r("body",14,12),lineHeight:1.7}}]},P("attribution",{...r("label",12,10),letterSpacing:.24,lineHeight:1.7})]})]}],drop:{...s}},I={top:24,bottom:24,topPhone:24,bottomPhone:24},$={name:"Banner",boxProps:e=>({...p,direction:"column",gap:0,...u(e,I)}),box:[...d,"contained",...b(I)],parts:[{kind:"group",name:"Card",keepEmpty:!0,props:{...t,gap:28,placement:"top-left",darken:60,darkenStyle:"even",sectionBorder:{width:1},sectionPaddingTop:64,sectionPaddingBottom:64,sectionPaddingTopPhone:40,sectionPaddingBottomPhone:40,sectionPaddingLeft:40,sectionPaddingRight:40,sectionPaddingLeftPhone:24,sectionPaddingRightPhone:24},box:[["imageSrc","bgImage"],["overlay","darken",e=>Math.min(Math.max(W(e)??60,0),100)]],parts:[{kind:"group",name:"Words",props:{...t,gap:20},parts:[P("eyebrow"),{kind:"text",key:"title",role:"heading",props:{...l,maxWidth:680},style:{weight:500,lineHeight:1.05,letterSpacing:-.03,case:"none"}},{kind:"text",key:"body",props:{...m,maxWidth:680},style:{textStyle:"body-1",lineHeight:1.6},was:{size:16}}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:g}]}],drop:{...s,...c}},ee={Prose:q,TitleWithButtons:J,SectionHeader:V,ParagraphsA:Z,Banner:$};function Pe(){n(ee),n(X),n(G),n(R),n(M),n(F),n(z),n(K),n(Y),n(j)}export{ee as GENERAL_SECTION_TO_BOX,Pe as registerGeneralSectionRows};
|