efficient-web-builder 3.0.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -0
- package/dist/components/ChartSection.js +1 -1
- package/dist/components/ContactLocations.js +1 -1
- package/dist/components/Footprint.js +1 -1
- package/dist/components/HeroPoster.js +1 -1
- package/dist/components/Placeholder.js +1 -1
- package/dist/components/PostCard.js +1 -1
- package/dist/components/Reel.js +1 -1
- package/dist/components/Split.js +1 -1
- package/dist/lib/content/card-image-background.d.ts +1 -0
- package/dist/lib/content/card-image-background.js +1 -1
- package/dist/lib/content/section-background.d.ts +1 -0
- package/dist/lib/content/section-background.js +1 -1
- package/dist/lib/puck/controls.js +1 -1
- package/dist/lib/sections/section-number-style.js +1 -1
- package/dist/lib/source-rules/site-square-by-default.js +3 -3
- package/dist/lib/theme.js +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.0.0 - 2026-10-11
|
|
4
|
+
|
|
5
|
+
- **Breaking: efficient-easel ^2.0.0 and efficient-shell ^4.171.0** (peers;
|
|
6
|
+
were ^1.0.0 and ^4.165.0; Efficient-Pty-Ltd/efficient-easel#211, harness
|
|
7
|
+
UI-24 and UI-7). Easel 2.0.0 takes its glyphs from the shell's house set
|
|
8
|
+
(`efficient-shell/icons/efficient`) and its row and field corners from the
|
|
9
|
+
shell's role radius, and needs shell 4.171.0 for both. A host moves to this
|
|
10
|
+
release, easel 2.0.0 and a shell at or above 4.171.0 together.
|
|
11
|
+
- **Nothing in this package's own API changes.** The editor draws the same
|
|
12
|
+
glyphs (the set's data moved to the shell byte for byte) and the same
|
|
13
|
+
corners at the default theme; the theme's Corners setting now reaches the
|
|
14
|
+
editor's rows and fields through the role tokens. No guard had to change:
|
|
15
|
+
the 140 guards pass against easel 2.0.0 as they stood.
|
|
16
|
+
|
|
17
|
+
## 4.0.0 - 2026-10-11
|
|
18
|
+
|
|
19
|
+
- **Breaking: the site's corner tokens are `--site-radius-*`.**
|
|
20
|
+
`cornerRadiusTokens`, `siteCornerRadiusTokens` and `cornerStyleTokens`
|
|
21
|
+
publish `--site-radius` and `--site-radius-xs` … `--site-radius-4xl` where
|
|
22
|
+
they published Tailwind's `--radius` / `--radius-*`. efficient-shell's UI kit
|
|
23
|
+
reads `--radius-*` as its own tokens, and a host that puts the site's corners
|
|
24
|
+
on `<body>` squared the kit's dialogs and popovers on a site set to 0
|
|
25
|
+
(harness UI-24: editor chrome resolves to shell tokens). A host's stylesheet
|
|
26
|
+
points Tailwind's scale at the new names with `@theme inline`
|
|
27
|
+
(efficient-storefront-blocks does, in `app/globals.css`), and moves to this
|
|
28
|
+
release together with it.
|
|
29
|
+
- **Breaking: the sections paint `--site-surface`, `--site-surface-2` and
|
|
30
|
+
`--site-line`**, the names the site's sheet declares those colours under now,
|
|
31
|
+
for the same collision (the kit declares `--surface` and `--line`).
|
|
32
|
+
- **Stored fills keep their words.** A section's or a card's stored
|
|
33
|
+
`var(--surface)` / `var(--surface-2)` — the swatch values, and what the
|
|
34
|
+
backend's 66037 migration wrote into published Stats bands — is translated
|
|
35
|
+
where it is painted: `resolveSectionBackground`, `resolveCardImageBackground`
|
|
36
|
+
and `resolveBoundCardImageBackground` return the `--site-` spelling
|
|
37
|
+
(`paintedFill` in `lib/content/section-background`). No document changes.
|
|
38
|
+
The panel compares against the stored words through the new
|
|
39
|
+
`cardImageBackgroundChoice`.
|
|
40
|
+
|
|
3
41
|
## 3.0.0 - 2026-10-10
|
|
4
42
|
|
|
5
43
|
- **efficient-easel 1.0.0 and efficient-shell ^4.165.0** (peers; were
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as a,jsxs as o}from"react/jsx-runtime";import{renderGold as u,renderHeadline as y}from"./goldPhrases.js";function g(e){return Number.isInteger(e)?String(e):String(Math.round(e*10)/10)}const v=[100,70,46,30,19,12];function b(e){return`color-mix(in srgb, var(--accent) ${v[e%v.length]}%, var(--bg))`}function N({data:e,suffix:x}){const h=Math.max(...e.map(m=>m.value),0)||1;return a("div",{className:"flex w-full flex-col gap-6",children:e.map((m,t)=>o("div",{children:[o("div",{className:"mb-2 flex items-baseline justify-between gap-4",children:[a("span",{className:"font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.14em] text-fg/60",children:u(m.label)}),o("span",{className:"font-display text-[length:var(--size-body,16px)] font-medium text-fg",children:[g(m.value),x]})]}),a("div",{className:"h-[10px] border border-line bg-bg",children:a("div",{className:"h-full bg-accent",style:{width:`${Math.max(m.value/h*100,m.value===0?0:2)}%`}})})]},t))})}function k({data:e,suffix:x}){const t={l:42,r:42,t:36,b:38},f=640-t.l-t.r,c=300-t.t-t.b,n=Math.max(...e.map(l=>l.value),0)||1,s=e.length>1?f/(e.length-1):0,i=e.map((l,r)=>({x:t.l+(e.length>1?r*s:f/2),y:t.t+c-l.value/n*c})),d=i.map((l,r)=>`${r===0?"M":"L"}${l.x},${l.y}`).join(" "),p=`${d} L${i[i.length-1].x},${t.t+c} L${i[0].x},${t.t+c} Z`;return o("svg",{viewBox:"0 0 640 300",className:"w-full",role:"img","aria-hidden":!0,children:[[.25,.5,.75,1].map(l=>a("line",{x1:t.l,x2:640-t.r,y1:t.t+c*(1-l),y2:t.t+c*(1-l),stroke:"var(--line)",strokeWidth:"1"},l)),a("line",{x1:t.l,x2:640-t.r,y1:t.t+c,y2:t.t+c,stroke:"var(--line)",strokeWidth:"1.5"}),a("path",{d:p,fill:"var(--accent)",opacity:"0.13"}),a("path",{d,fill:"none",stroke:"var(--accent)",strokeWidth:"2.5"}),i.map((l,r)=>o("g",{children:[a("circle",{cx:l.x,cy:l.y,r:"4",fill:"var(--accent)"}),o("text",{x:l.x,y:l.y-12,textAnchor:"middle",className:"font-display",fontSize:"14",fill:"var(--fg)",children:[g(e[r].value),x]}),a("text",{x:l.x,y:288,textAnchor:"middle",className:"font-mono",fontSize:"10",letterSpacing:"0.1em",fill:"var(--fg)",opacity:"0.55",children:e[r].label.toUpperCase()})]},r))]})}function $({data:e,suffix:x}){const h=e.reduce((n,s)=>n+s.value,0)||1,m=80,t=2*Math.PI*m;let f=0;const c=e.map((n,s)=>{const i=n.value/h,d={frac:i,dash:Math.max(i*t-3,0),off:f,ink:b(s)};return f+=i*t,d});return o("div",{className:"flex w-full flex-wrap items-center justify-center gap-10",children:[a("svg",{viewBox:"0 0 200 200",className:"w-[220px] max-w-full -rotate-90",role:"img","aria-hidden":!0,children:c.map((n,s)=>a("circle",{cx:"100",cy:"100",r:m,fill:"none",stroke:n.ink,strokeWidth:"34",strokeDasharray:`${n.dash} ${t-n.dash}`,strokeDashoffset:-n.off},s))}),a("ul",{className:"flex min-w-[200px] flex-1 flex-col gap-3",children:e.map((n,s)=>o("li",{className:"flex items-baseline gap-3",children:[a("span",{"aria-hidden":!0,className:"h-[10px] w-[10px] flex-shrink-0 rotate-45",style:{background:b(s)}}),a("span",{className:"flex-1 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.12em] text-fg/60",children:u(n.label)}),a("span",{className:"font-display text-[length:var(--size-body,15px)] font-medium text-fg",children:x?`${g(n.value)}${x}`:`${Math.round(n.value/h*100)}%`})]},s))})]})}function w({eyebrow:e,title:x,body:h,chartStyle:m,items:t,valueSuffix:f,caption:c,editing:n=!1}={}){const s=(f??"").trim()===""?"":f??"",i=(t??[]).map(r=>({label:(r.label??"").trim(),value:parseFloat(r.value??"")})).filter(r=>n?!0:r.label&&Number.isFinite(r.value)).map(r=>({label:r.label||"—",value:Number.isFinite(r.value)?r.value:0})),d=!!(e??"").trim()||!!(x??"").trim();if(!n&&!d&&i.length===0)return null;const p=m??"bars",l=i.length===0?null:p==="line"&&i.length>1?a(k,{data:i,suffix:s}):p==="donut"?a($,{data:i,suffix:s}):a(N,{data:i,suffix:s});return a("section",{className:"relative z-[2] border-y border-line bg-surface",children:o("div",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] items-center gap-14 px-[var(--sf-site-gutter,40px)] py-[76px] min-[960px]:[grid-template-columns:minmax(0,5fr)_minmax(0,7fr)] max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",children:[o("div",{children:[(e??"").trim()&&a("span",{className:"inline-block bg-accent px-3.5 py-1.5 font-mono text-[length:var(--size-label,12px)] font-semibold uppercase tracking-[0.16em] text-bg",children:u(e??"")}),(x??"").trim()&&a("h2",{className:"mt-5 font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium uppercase leading-[1.04] tracking-[-0.02em] text-fg max-[800px]:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:y(x??"",!1)}),(h??"").trim()&&a("p",{className:"mt-5 max-w-[46ch] text-[length:var(--size-body,15px)] leading-relaxed text-fg/65",children:h})]}),o("div",{children:[l,(c??"").trim()&&a("p",{className:"mt-4 font-mono text-[length:var(--size-label,10px)] uppercase tracking-[0.14em] text-fg/40",children:c})]})]})})}export{w as default};
|
|
1
|
+
import{jsx as a,jsxs as o}from"react/jsx-runtime";import{renderGold as u,renderHeadline as y}from"./goldPhrases.js";function g(e){return Number.isInteger(e)?String(e):String(Math.round(e*10)/10)}const v=[100,70,46,30,19,12];function b(e){return`color-mix(in srgb, var(--accent) ${v[e%v.length]}%, var(--bg))`}function N({data:e,suffix:x}){const h=Math.max(...e.map(m=>m.value),0)||1;return a("div",{className:"flex w-full flex-col gap-6",children:e.map((m,t)=>o("div",{children:[o("div",{className:"mb-2 flex items-baseline justify-between gap-4",children:[a("span",{className:"font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.14em] text-fg/60",children:u(m.label)}),o("span",{className:"font-display text-[length:var(--size-body,16px)] font-medium text-fg",children:[g(m.value),x]})]}),a("div",{className:"h-[10px] border border-line bg-bg",children:a("div",{className:"h-full bg-accent",style:{width:`${Math.max(m.value/h*100,m.value===0?0:2)}%`}})})]},t))})}function k({data:e,suffix:x}){const t={l:42,r:42,t:36,b:38},f=640-t.l-t.r,c=300-t.t-t.b,n=Math.max(...e.map(l=>l.value),0)||1,s=e.length>1?f/(e.length-1):0,i=e.map((l,r)=>({x:t.l+(e.length>1?r*s:f/2),y:t.t+c-l.value/n*c})),d=i.map((l,r)=>`${r===0?"M":"L"}${l.x},${l.y}`).join(" "),p=`${d} L${i[i.length-1].x},${t.t+c} L${i[0].x},${t.t+c} Z`;return o("svg",{viewBox:"0 0 640 300",className:"w-full",role:"img","aria-hidden":!0,children:[[.25,.5,.75,1].map(l=>a("line",{x1:t.l,x2:640-t.r,y1:t.t+c*(1-l),y2:t.t+c*(1-l),stroke:"var(--site-line)",strokeWidth:"1"},l)),a("line",{x1:t.l,x2:640-t.r,y1:t.t+c,y2:t.t+c,stroke:"var(--site-line)",strokeWidth:"1.5"}),a("path",{d:p,fill:"var(--accent)",opacity:"0.13"}),a("path",{d,fill:"none",stroke:"var(--accent)",strokeWidth:"2.5"}),i.map((l,r)=>o("g",{children:[a("circle",{cx:l.x,cy:l.y,r:"4",fill:"var(--accent)"}),o("text",{x:l.x,y:l.y-12,textAnchor:"middle",className:"font-display",fontSize:"14",fill:"var(--fg)",children:[g(e[r].value),x]}),a("text",{x:l.x,y:288,textAnchor:"middle",className:"font-mono",fontSize:"10",letterSpacing:"0.1em",fill:"var(--fg)",opacity:"0.55",children:e[r].label.toUpperCase()})]},r))]})}function $({data:e,suffix:x}){const h=e.reduce((n,s)=>n+s.value,0)||1,m=80,t=2*Math.PI*m;let f=0;const c=e.map((n,s)=>{const i=n.value/h,d={frac:i,dash:Math.max(i*t-3,0),off:f,ink:b(s)};return f+=i*t,d});return o("div",{className:"flex w-full flex-wrap items-center justify-center gap-10",children:[a("svg",{viewBox:"0 0 200 200",className:"w-[220px] max-w-full -rotate-90",role:"img","aria-hidden":!0,children:c.map((n,s)=>a("circle",{cx:"100",cy:"100",r:m,fill:"none",stroke:n.ink,strokeWidth:"34",strokeDasharray:`${n.dash} ${t-n.dash}`,strokeDashoffset:-n.off},s))}),a("ul",{className:"flex min-w-[200px] flex-1 flex-col gap-3",children:e.map((n,s)=>o("li",{className:"flex items-baseline gap-3",children:[a("span",{"aria-hidden":!0,className:"h-[10px] w-[10px] flex-shrink-0 rotate-45",style:{background:b(s)}}),a("span",{className:"flex-1 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.12em] text-fg/60",children:u(n.label)}),a("span",{className:"font-display text-[length:var(--size-body,15px)] font-medium text-fg",children:x?`${g(n.value)}${x}`:`${Math.round(n.value/h*100)}%`})]},s))})]})}function w({eyebrow:e,title:x,body:h,chartStyle:m,items:t,valueSuffix:f,caption:c,editing:n=!1}={}){const s=(f??"").trim()===""?"":f??"",i=(t??[]).map(r=>({label:(r.label??"").trim(),value:parseFloat(r.value??"")})).filter(r=>n?!0:r.label&&Number.isFinite(r.value)).map(r=>({label:r.label||"—",value:Number.isFinite(r.value)?r.value:0})),d=!!(e??"").trim()||!!(x??"").trim();if(!n&&!d&&i.length===0)return null;const p=m??"bars",l=i.length===0?null:p==="line"&&i.length>1?a(k,{data:i,suffix:s}):p==="donut"?a($,{data:i,suffix:s}):a(N,{data:i,suffix:s});return a("section",{className:"relative z-[2] border-y border-line bg-surface",children:o("div",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] items-center gap-14 px-[var(--sf-site-gutter,40px)] py-[76px] min-[960px]:[grid-template-columns:minmax(0,5fr)_minmax(0,7fr)] max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",children:[o("div",{children:[(e??"").trim()&&a("span",{className:"inline-block bg-accent px-3.5 py-1.5 font-mono text-[length:var(--size-label,12px)] font-semibold uppercase tracking-[0.16em] text-bg",children:u(e??"")}),(x??"").trim()&&a("h2",{className:"mt-5 font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium uppercase leading-[1.04] tracking-[-0.02em] text-fg max-[800px]:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:y(x??"",!1)}),(h??"").trim()&&a("p",{className:"mt-5 max-w-[46ch] text-[length:var(--size-body,15px)] leading-relaxed text-fg/65",children:h})]}),o("div",{children:[l,(c??"").trim()&&a("p",{className:"mt-4 font-mono text-[length:var(--size-label,10px)] uppercase tracking-[0.14em] text-fg/40",children:c})]})]})})}export{w as default};
|
|
@@ -70,4 +70,4 @@
|
|
|
70
70
|
.loc-part-pick::after { transition: none; }
|
|
71
71
|
}
|
|
72
72
|
`;function Z({value:p}){if(typeof p=="string"){const a=p.split(`
|
|
73
|
-
`);return t(G,{children:a.map((b,l)=>i("span",{children:[b,l<a.length-1?t("br",{}):null]},l))})}return t(G,{children:p})}function Se(){return t("div",{className:"absolute inset-0 flex items-center justify-center",style:{background:"repeating-linear-gradient(45deg, rgba(201,164,97,.05) 0 1px, transparent 1px 14px), linear-gradient(135deg, var(--surface-2), var(--surface))"},children:i("svg",{width:"34",height:"34",viewBox:"0 0 24 24",fill:"none",stroke:"var(--fg-dim)",strokeWidth:1.4,"aria-hidden":"true",style:{opacity:.4},children:[t("rect",{x:"3",y:"4",width:"18",height:"16",rx:"1.5"}),t("circle",{cx:"8.5",cy:"9.5",r:"1.6"}),t("path",{d:"M21 16l-5-5-4 4-2-2-7 7"})]})})}function Ae({sectionNumber:p=z.sectionNumber,heading:a=z.heading,tagline:b=z.tagline,galleryKicker:l=z.galleryKicker,galleryHint:f=z.galleryHint,locations:k=ie,apiKey:C="",mapId:I="",mapTheme:n="auto",imageShape:x,editing:m,nodeId:s,...v}){const[R,L]=T(!1);j(()=>{const e=()=>L(document.documentElement.getAttribute("data-theme")==="light");e();const r=new MutationObserver(e);return r.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>r.disconnect()},[]);const[$,M]=T(null),N=e=>`loc-${e}`,B=e=>{M(e),typeof document<"u"&&document.getElementById(e)?.scrollIntoView({behavior:K(),block:"start"}),!m&&typeof window<"u"&&window.history?.replaceState&&window.history.replaceState(null,"",`#${e}`)};j(()=>{if(typeof window>"u")return;const e=window.location.hash.replace(/^#/,"");!e||!document.getElementById(e)||(M(e),requestAnimationFrame(()=>{document.getElementById(e)?.scrollIntoView({behavior:K(),block:"start"})}))},[]);const D=le(se(x)),{select:d,selectedLocationPartId:u}=ye(),F=(e,r)=>s?Y(s,e,r):"",O=(e,r)=>!!(m&&s&&u===F(e,r)),A=(e,r)=>m&&s?`${e}:${r}`:void 0,E=U(null);j(()=>{if(!m||!s)return;const e=E.current;if(!e)return;const g=Array.from(e.querySelectorAll("[data-loc-pick]")).map(o=>{const h=te(o),w=y=>{const c=o.getAttribute("data-loc-pick")??"",[_,H]=c.split(":");H!=="image"&&H!=="map"||(y.stopPropagation(),y.preventDefault(),d(Y(s,Number(_),H)))};return o.addEventListener("click",w,{capture:!0}),()=>{h?.(),o.removeEventListener("click",w,{capture:!0})}});return()=>g.forEach(o=>o())},[m,s,d,k.length]);const S=ve(k,e=>String(e.group??""),e=>String(e.groupName??""));return i("section",{id:"studios",ref:E,className:Q(v)?"scroll-mt-24 border-b border-line px-[var(--sf-site-gutter,40px)] py-[100px] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[1100px]:py-[60px]":"mx-auto max-w-[var(--sf-site-width,1600px)] scroll-mt-24 border-b border-line px-[var(--sf-site-gutter,40px)] py-[100px] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[1100px]:py-[60px]",style:R?void 0:{background:"var(--section-bg)"},children:[t("style",{dangerouslySetInnerHTML:{__html:we}}),m&&s&&t("style",{dangerouslySetInnerHTML:{__html:Ne}}),(p||a||b)&&t(ne,{num:p,title:a?re(a,!0):void 0,desc:b?q(b):void 0,spaceBelow:"mb-10"}),k.length>0&&i("div",{className:"mb-12",children:[(l||f)&&i("div",{className:"mb-5 flex items-baseline justify-between gap-6 border-b border-line pb-4",children:[l&&t(oe,{text:l,size:12}),f&&t("span",{className:"font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.22em] text-fg-dim",children:q(f)})]}),t("div",{className:"flex flex-col gap-6",children:S.map((e,r)=>{const g=e.items.length===1;return i("div",{children:[e.key&&t("div",{className:"mb-2.5 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.3em] text-accent",children:e.key}),t("div",{className:["grid gap-[2px] border border-line bg-line",X(e.items.length),e.items.length>1?"max-[700px]:grid-cols-2":""].join(" "),children:e.items.map(({item:o,index:h})=>{const w=String(o?.name??""),y=String(o?.photo??""),c=N(h);return i("a",{href:`#${c}`,"aria-label":`Jump to ${w||"location"} map`,onClick:_=>{_.preventDefault(),B(c)},"data-loc-pick":A(h,"image"),className:["group relative block",D,"overflow-hidden bg-bg outline-none focus-visible:ring-2 focus-visible:ring-accent",g?"max-h-[440px]":"",...A(h,"image")?["loc-part-pick"]:[]].join(" "),"data-selected":O(h,"image")?"":void 0,children:[y?t(ee,{src:y,alt:ae(w||"Location"),fill:!0,sizes:g?"100vw":"(max-width: 700px) 50vw, 33vw",className:"object-cover grayscale transition-[filter] duration-500 group-hover:grayscale-0"}):t(Se,{}),t("div",{className:"pointer-events-none absolute inset-0",style:{background:"linear-gradient(180deg, transparent 50%, rgba(10,10,10,0.85) 100%)"}}),t("figcaption",{className:"absolute inset-x-0 bottom-0 z-[1] flex items-center justify-start gap-2 px-3 py-3 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.22em] text-overlay-fg/85",children:t("span",{children:w})})]},h)})})]},e.key?`g:${e.key}`:`ungrouped:${r}`)})})]}),S.map((e,r)=>i("div",{className:r===0?"":"mt-10",children:[e.key&&t(ke,{groupKey:e.key,name:e.name,count:e.items.length}),t("div",{className:["grid gap-[2px] border border-line bg-line",X(e.items.length),e.items.length>1?"max-[1100px]:grid-cols-1":""].join(" "),children:e.items.map(({item:g,index:o})=>t(Ce,{id:N(o),card:g,active:$===N(o),apiKey:C,mapId:I,mapTheme:n,mapPick:A(o,"map"),mapSelected:O(o,"map")},o))})]},e.key?`g:${e.key}`:`ungrouped:${r}`)),k.length>0&&i("p",{className:"mt-8 text-right font-mono text-[10px] uppercase tracking-[0.25em] text-fg-dim/50",children:["Location coordinates ©"," ",t("a",{href:"https://www.openstreetmap.org/copyright",target:"_blank",rel:"noopener noreferrer",className:"hover:text-accent",children:"OpenStreetMap contributors"})]})]})}function Ce({id:p,card:a,active:b,apiKey:l,mapId:f,mapTheme:k,mapPick:C,mapSelected:I}){const n=a.phone?`tel:${String(a.phone).replace(/[^+\d]/g,"")}`:void 0,x=ce(a.region),m=String(a.state??"").trim()||x.state,s=String(a.country??"").trim()||x.country,v=[m,s].filter(Boolean).join(" · ");return i("article",{id:p,"data-active":b?"true":void 0,className:"contact-loc grid min-h-[840px] scroll-mt-[120px] grid-rows-[auto_1fr] bg-bg max-[1100px]:min-h-0",children:[i("div",{className:"flex min-h-[280px] flex-col gap-3 border-b border-line px-7 py-7",children:[i("div",{className:"flex items-start justify-between gap-3.5",children:[i("div",{children:[a.name&&t("div",{className:"font-heading3 text-[length:var(--size-headingSmall,30px)] font-medium uppercase leading-none tracking-[-0.02em]",children:a.name}),v&&t("div",{className:"mt-1.5 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.24em] text-accent",children:v})]}),a.timezone&&t("span",{className:"whitespace-nowrap border border-line px-2.5 py-1.5 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.22em] text-fg-dim",children:a.timezone})]}),a.address!=null&&a.address!==""&&t("div",{className:"mt-1.5 font-display text-[length:var(--size-body,14px)] leading-[1.5] text-fg-dim",children:t(Z,{value:a.address})}),a.phone&&t("div",{children:t("a",{href:n,className:"font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-fg hover:text-accent",children:a.phone})}),a.hours!=null&&a.hours!==""&&t("div",{className:"font-mono text-[length:var(--size-label,12px)] uppercase leading-[1.7] tracking-[0.18em] text-fg-dim",children:t(Z,{value:a.hours})})]}),t(Le,{name:String(a.name??""),state:m,country:s,lat:Number(a.lat),lng:Number(a.lng),mapsUrl:String(a.mapsUrl??""),apiKey:l,mapId:f,mapTheme:k,pick:C,selected:I})]})}const Ie=13;function Le({name:p,state:a,country:b,lat:l,lng:f,mapsUrl:k,apiKey:C,mapId:I,mapTheme:n="auto",pick:x,selected:m}){const s=he(C,xe()),v=fe(I,be()),R=ue(l,f),L=!!s&&R,$=a,M=U(null),N=U(null),[B,D]=T(!1),d=n!=="auto",u=pe(n),[F,O]=T(n==="auto"?de.dark.background:P(n));j(()=>{O(P(n))},[n]),j(()=>{if(!L)return;const S=M.current;if(!S)return;let e=null,r=null,g=!1,o=null;const h=c=>({path:c.SymbolPath.CIRCLE,scale:7,fillColor:W(n),fillOpacity:1,strokeColor:W(n),strokeOpacity:.25,strokeWeight:10}),w=async()=>{try{const c=await ge(s);if(g||!N.current)return;e=new c.Map(N.current,{center:{lat:l,lng:f},zoom:Ie,disableDefaultUI:!0,gestureHandling:"cooperative",keyboardShortcuts:!1,clickableIcons:!1,backgroundColor:P(n),...v?{mapId:v}:{styles:V(n)}}),r=new c.Marker({map:e,position:{lat:l,lng:f},icon:h(c)}),e.addListener("tilesloaded",()=>{g||D(!0)}),n==="auto"&&!v&&(o=me(()=>{g||!e||(e.setOptions({styles:V(n),backgroundColor:P(n)}),r?.setIcon(h(c)),O(P(n)))}))}catch(c){console.error("[StudioMap] Maps SDK failed:",c)}},y=new IntersectionObserver(c=>{for(const _ of c)if(_.isIntersecting){y.disconnect(),w();break}},{rootMargin:"200px"});return y.observe(S),()=>{g=!0,y.disconnect(),o?.()}},[L,s,l,f,v,n]);const A=k||(p?`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent([p,a,b].filter(Boolean).join(" "))}`:""),E=i("div",{className:["absolute left-5 top-5 z-10 flex max-w-[64%] flex-col gap-1.5 border p-3.5",d?"":"border-line bg-bg shadow-[0_8px_24px_rgba(0,0,0,.4)]"].join(" "),style:d?{backgroundColor:u.info.bg,borderColor:`color-mix(in oklab, ${u.info.fgDim} 35%, transparent)`,boxShadow:u.info.shadow}:void 0,children:[i("span",{className:"font-display text-[length:var(--size-body,14px)] font-medium tracking-[-0.01em]",style:d?{color:u.info.fg}:void 0,children:[p||"Location",$?`, ${$}`:""]}),A&&t("a",{href:A,target:"_blank",rel:"noopener noreferrer",className:["font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.24em] transition-colors",d?"":"text-accent hover:text-fg"].join(" "),style:d?{color:u.info.accent}:void 0,children:"Get Directions ↗"})]});if(!L){const S=d?`linear-gradient(135deg, ${u.background}, ${u.info.bg})`:"linear-gradient(135deg, var(--surface-2), var(--surface))";return i("div",{"data-loc-pick":x,className:["relative overflow-hidden max-[1100px]:aspect-square",d?"":"bg-bg",...x?["loc-part-pick"]:[]].join(" "),"data-selected":m?"":void 0,style:{...d?{backgroundColor:u.background}:null,backgroundImage:`repeating-linear-gradient(45deg, rgba(201,164,97,.04) 0 1px, transparent 1px 14px), repeating-linear-gradient(-45deg, rgba(201,164,97,.04) 0 1px, transparent 1px 14px), ${S}`},children:[E,t("div",{className:["absolute inset-0 flex items-center justify-center px-6 text-center font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.3em]",d?"":"text-fg-dim/40"].join(" "),style:d?{color:u.info.fgDim,opacity:.4}:void 0,children:s?"Add latitude & longitude":"Add a Google Maps API key"})]})}return i("div",{ref:M,"data-loc-pick":x,className:["studio-map relative overflow-hidden max-[1100px]:aspect-square",...x?["loc-part-pick"]:[]].join(" "),"data-selected":m?"":void 0,style:{backgroundColor:F},children:[t("div",{ref:N,className:"gmap-canvas absolute inset-0"}),t("div",{className:["pointer-events-none absolute inset-0 flex items-center justify-center font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.3em] text-fg-dim transition-opacity duration-500",B?"opacity-0":"opacity-100"].join(" "),children:"Loading map…"}),E]})}export{Ae as default};
|
|
73
|
+
`);return t(G,{children:a.map((b,l)=>i("span",{children:[b,l<a.length-1?t("br",{}):null]},l))})}return t(G,{children:p})}function Se(){return t("div",{className:"absolute inset-0 flex items-center justify-center",style:{background:"repeating-linear-gradient(45deg, rgba(201,164,97,.05) 0 1px, transparent 1px 14px), linear-gradient(135deg, var(--site-surface-2), var(--site-surface))"},children:i("svg",{width:"34",height:"34",viewBox:"0 0 24 24",fill:"none",stroke:"var(--fg-dim)",strokeWidth:1.4,"aria-hidden":"true",style:{opacity:.4},children:[t("rect",{x:"3",y:"4",width:"18",height:"16",rx:"1.5"}),t("circle",{cx:"8.5",cy:"9.5",r:"1.6"}),t("path",{d:"M21 16l-5-5-4 4-2-2-7 7"})]})})}function Ae({sectionNumber:p=z.sectionNumber,heading:a=z.heading,tagline:b=z.tagline,galleryKicker:l=z.galleryKicker,galleryHint:f=z.galleryHint,locations:k=ie,apiKey:C="",mapId:I="",mapTheme:n="auto",imageShape:x,editing:m,nodeId:s,...v}){const[R,L]=T(!1);j(()=>{const e=()=>L(document.documentElement.getAttribute("data-theme")==="light");e();const r=new MutationObserver(e);return r.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>r.disconnect()},[]);const[$,M]=T(null),N=e=>`loc-${e}`,B=e=>{M(e),typeof document<"u"&&document.getElementById(e)?.scrollIntoView({behavior:K(),block:"start"}),!m&&typeof window<"u"&&window.history?.replaceState&&window.history.replaceState(null,"",`#${e}`)};j(()=>{if(typeof window>"u")return;const e=window.location.hash.replace(/^#/,"");!e||!document.getElementById(e)||(M(e),requestAnimationFrame(()=>{document.getElementById(e)?.scrollIntoView({behavior:K(),block:"start"})}))},[]);const D=le(se(x)),{select:d,selectedLocationPartId:u}=ye(),F=(e,r)=>s?Y(s,e,r):"",O=(e,r)=>!!(m&&s&&u===F(e,r)),A=(e,r)=>m&&s?`${e}:${r}`:void 0,E=U(null);j(()=>{if(!m||!s)return;const e=E.current;if(!e)return;const g=Array.from(e.querySelectorAll("[data-loc-pick]")).map(o=>{const h=te(o),w=y=>{const c=o.getAttribute("data-loc-pick")??"",[_,H]=c.split(":");H!=="image"&&H!=="map"||(y.stopPropagation(),y.preventDefault(),d(Y(s,Number(_),H)))};return o.addEventListener("click",w,{capture:!0}),()=>{h?.(),o.removeEventListener("click",w,{capture:!0})}});return()=>g.forEach(o=>o())},[m,s,d,k.length]);const S=ve(k,e=>String(e.group??""),e=>String(e.groupName??""));return i("section",{id:"studios",ref:E,className:Q(v)?"scroll-mt-24 border-b border-line px-[var(--sf-site-gutter,40px)] py-[100px] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[1100px]:py-[60px]":"mx-auto max-w-[var(--sf-site-width,1600px)] scroll-mt-24 border-b border-line px-[var(--sf-site-gutter,40px)] py-[100px] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[1100px]:py-[60px]",style:R?void 0:{background:"var(--section-bg)"},children:[t("style",{dangerouslySetInnerHTML:{__html:we}}),m&&s&&t("style",{dangerouslySetInnerHTML:{__html:Ne}}),(p||a||b)&&t(ne,{num:p,title:a?re(a,!0):void 0,desc:b?q(b):void 0,spaceBelow:"mb-10"}),k.length>0&&i("div",{className:"mb-12",children:[(l||f)&&i("div",{className:"mb-5 flex items-baseline justify-between gap-6 border-b border-line pb-4",children:[l&&t(oe,{text:l,size:12}),f&&t("span",{className:"font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.22em] text-fg-dim",children:q(f)})]}),t("div",{className:"flex flex-col gap-6",children:S.map((e,r)=>{const g=e.items.length===1;return i("div",{children:[e.key&&t("div",{className:"mb-2.5 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.3em] text-accent",children:e.key}),t("div",{className:["grid gap-[2px] border border-line bg-line",X(e.items.length),e.items.length>1?"max-[700px]:grid-cols-2":""].join(" "),children:e.items.map(({item:o,index:h})=>{const w=String(o?.name??""),y=String(o?.photo??""),c=N(h);return i("a",{href:`#${c}`,"aria-label":`Jump to ${w||"location"} map`,onClick:_=>{_.preventDefault(),B(c)},"data-loc-pick":A(h,"image"),className:["group relative block",D,"overflow-hidden bg-bg outline-none focus-visible:ring-2 focus-visible:ring-accent",g?"max-h-[440px]":"",...A(h,"image")?["loc-part-pick"]:[]].join(" "),"data-selected":O(h,"image")?"":void 0,children:[y?t(ee,{src:y,alt:ae(w||"Location"),fill:!0,sizes:g?"100vw":"(max-width: 700px) 50vw, 33vw",className:"object-cover grayscale transition-[filter] duration-500 group-hover:grayscale-0"}):t(Se,{}),t("div",{className:"pointer-events-none absolute inset-0",style:{background:"linear-gradient(180deg, transparent 50%, rgba(10,10,10,0.85) 100%)"}}),t("figcaption",{className:"absolute inset-x-0 bottom-0 z-[1] flex items-center justify-start gap-2 px-3 py-3 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.22em] text-overlay-fg/85",children:t("span",{children:w})})]},h)})})]},e.key?`g:${e.key}`:`ungrouped:${r}`)})})]}),S.map((e,r)=>i("div",{className:r===0?"":"mt-10",children:[e.key&&t(ke,{groupKey:e.key,name:e.name,count:e.items.length}),t("div",{className:["grid gap-[2px] border border-line bg-line",X(e.items.length),e.items.length>1?"max-[1100px]:grid-cols-1":""].join(" "),children:e.items.map(({item:g,index:o})=>t(Ce,{id:N(o),card:g,active:$===N(o),apiKey:C,mapId:I,mapTheme:n,mapPick:A(o,"map"),mapSelected:O(o,"map")},o))})]},e.key?`g:${e.key}`:`ungrouped:${r}`)),k.length>0&&i("p",{className:"mt-8 text-right font-mono text-[10px] uppercase tracking-[0.25em] text-fg-dim/50",children:["Location coordinates ©"," ",t("a",{href:"https://www.openstreetmap.org/copyright",target:"_blank",rel:"noopener noreferrer",className:"hover:text-accent",children:"OpenStreetMap contributors"})]})]})}function Ce({id:p,card:a,active:b,apiKey:l,mapId:f,mapTheme:k,mapPick:C,mapSelected:I}){const n=a.phone?`tel:${String(a.phone).replace(/[^+\d]/g,"")}`:void 0,x=ce(a.region),m=String(a.state??"").trim()||x.state,s=String(a.country??"").trim()||x.country,v=[m,s].filter(Boolean).join(" · ");return i("article",{id:p,"data-active":b?"true":void 0,className:"contact-loc grid min-h-[840px] scroll-mt-[120px] grid-rows-[auto_1fr] bg-bg max-[1100px]:min-h-0",children:[i("div",{className:"flex min-h-[280px] flex-col gap-3 border-b border-line px-7 py-7",children:[i("div",{className:"flex items-start justify-between gap-3.5",children:[i("div",{children:[a.name&&t("div",{className:"font-heading3 text-[length:var(--size-headingSmall,30px)] font-medium uppercase leading-none tracking-[-0.02em]",children:a.name}),v&&t("div",{className:"mt-1.5 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.24em] text-accent",children:v})]}),a.timezone&&t("span",{className:"whitespace-nowrap border border-line px-2.5 py-1.5 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.22em] text-fg-dim",children:a.timezone})]}),a.address!=null&&a.address!==""&&t("div",{className:"mt-1.5 font-display text-[length:var(--size-body,14px)] leading-[1.5] text-fg-dim",children:t(Z,{value:a.address})}),a.phone&&t("div",{children:t("a",{href:n,className:"font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-fg hover:text-accent",children:a.phone})}),a.hours!=null&&a.hours!==""&&t("div",{className:"font-mono text-[length:var(--size-label,12px)] uppercase leading-[1.7] tracking-[0.18em] text-fg-dim",children:t(Z,{value:a.hours})})]}),t(Le,{name:String(a.name??""),state:m,country:s,lat:Number(a.lat),lng:Number(a.lng),mapsUrl:String(a.mapsUrl??""),apiKey:l,mapId:f,mapTheme:k,pick:C,selected:I})]})}const Ie=13;function Le({name:p,state:a,country:b,lat:l,lng:f,mapsUrl:k,apiKey:C,mapId:I,mapTheme:n="auto",pick:x,selected:m}){const s=he(C,xe()),v=fe(I,be()),R=ue(l,f),L=!!s&&R,$=a,M=U(null),N=U(null),[B,D]=T(!1),d=n!=="auto",u=pe(n),[F,O]=T(n==="auto"?de.dark.background:P(n));j(()=>{O(P(n))},[n]),j(()=>{if(!L)return;const S=M.current;if(!S)return;let e=null,r=null,g=!1,o=null;const h=c=>({path:c.SymbolPath.CIRCLE,scale:7,fillColor:W(n),fillOpacity:1,strokeColor:W(n),strokeOpacity:.25,strokeWeight:10}),w=async()=>{try{const c=await ge(s);if(g||!N.current)return;e=new c.Map(N.current,{center:{lat:l,lng:f},zoom:Ie,disableDefaultUI:!0,gestureHandling:"cooperative",keyboardShortcuts:!1,clickableIcons:!1,backgroundColor:P(n),...v?{mapId:v}:{styles:V(n)}}),r=new c.Marker({map:e,position:{lat:l,lng:f},icon:h(c)}),e.addListener("tilesloaded",()=>{g||D(!0)}),n==="auto"&&!v&&(o=me(()=>{g||!e||(e.setOptions({styles:V(n),backgroundColor:P(n)}),r?.setIcon(h(c)),O(P(n)))}))}catch(c){console.error("[StudioMap] Maps SDK failed:",c)}},y=new IntersectionObserver(c=>{for(const _ of c)if(_.isIntersecting){y.disconnect(),w();break}},{rootMargin:"200px"});return y.observe(S),()=>{g=!0,y.disconnect(),o?.()}},[L,s,l,f,v,n]);const A=k||(p?`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent([p,a,b].filter(Boolean).join(" "))}`:""),E=i("div",{className:["absolute left-5 top-5 z-10 flex max-w-[64%] flex-col gap-1.5 border p-3.5",d?"":"border-line bg-bg shadow-[0_8px_24px_rgba(0,0,0,.4)]"].join(" "),style:d?{backgroundColor:u.info.bg,borderColor:`color-mix(in oklab, ${u.info.fgDim} 35%, transparent)`,boxShadow:u.info.shadow}:void 0,children:[i("span",{className:"font-display text-[length:var(--size-body,14px)] font-medium tracking-[-0.01em]",style:d?{color:u.info.fg}:void 0,children:[p||"Location",$?`, ${$}`:""]}),A&&t("a",{href:A,target:"_blank",rel:"noopener noreferrer",className:["font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.24em] transition-colors",d?"":"text-accent hover:text-fg"].join(" "),style:d?{color:u.info.accent}:void 0,children:"Get Directions ↗"})]});if(!L){const S=d?`linear-gradient(135deg, ${u.background}, ${u.info.bg})`:"linear-gradient(135deg, var(--site-surface-2), var(--site-surface))";return i("div",{"data-loc-pick":x,className:["relative overflow-hidden max-[1100px]:aspect-square",d?"":"bg-bg",...x?["loc-part-pick"]:[]].join(" "),"data-selected":m?"":void 0,style:{...d?{backgroundColor:u.background}:null,backgroundImage:`repeating-linear-gradient(45deg, rgba(201,164,97,.04) 0 1px, transparent 1px 14px), repeating-linear-gradient(-45deg, rgba(201,164,97,.04) 0 1px, transparent 1px 14px), ${S}`},children:[E,t("div",{className:["absolute inset-0 flex items-center justify-center px-6 text-center font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.3em]",d?"":"text-fg-dim/40"].join(" "),style:d?{color:u.info.fgDim,opacity:.4}:void 0,children:s?"Add latitude & longitude":"Add a Google Maps API key"})]})}return i("div",{ref:M,"data-loc-pick":x,className:["studio-map relative overflow-hidden max-[1100px]:aspect-square",...x?["loc-part-pick"]:[]].join(" "),"data-selected":m?"":void 0,style:{backgroundColor:F},children:[t("div",{ref:N,className:"gmap-canvas absolute inset-0"}),t("div",{className:["pointer-events-none absolute inset-0 flex items-center justify-center font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.3em] text-fg-dim transition-opacity duration-500",B?"opacity-0":"opacity-100"].join(" "),children:"Loading map…"}),E]})}export{Ae as default};
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
.footprint-map .gm-style button[aria-label="Close"] > span {
|
|
17
17
|
background-color: ${t.closeX} !important;
|
|
18
18
|
}
|
|
19
|
-
`}function T({pal:t}){const o=t?t.marker:"var(--accent)",u=t?t.info.bg:"var(--surface)",e=t?t.background:"var(--bg)",l=t?`color-mix(in oklab, ${t.info.fgDim} 12%, transparent)`:"color-mix(in oklab, var(--fg) 3%, transparent)";return w(nt,{children:[r("div",{className:"pointer-events-none absolute inset-0",style:{backgroundImage:`radial-gradient(60% 70% at 50% 50%, color-mix(in oklab, ${o} 8%, ${u}) 0%, ${u} 60%, ${e} 100%)`}}),r("div",{className:"pointer-events-none absolute inset-0",style:{backgroundImage:`repeating-linear-gradient(0deg, transparent 0 22px, ${l} 22px 23px), repeating-linear-gradient(90deg, transparent 0 22px, ${l} 22px 23px)`}})]})}function vt({sectionNumber:t="",heading:o="",tagline:u="",offices:e=[],apiKey:l="",mapId:M="",mapTheme:g="auto",padTop:a,padBottom:x,editing:m,omitHead:$=!1}){const L=typeof a=="number"?a:120,z=typeof x=="number"?x:120,[b,h]=P(null),v=e.length===0&&!t&&!o&&!u;if(S(()=>{h(n=>n!==null&&n>=e.length?null:n)},[e]),v&&!m)return null;const N=ct(e,n=>String(n.group??""),()=>"");return r("section",{className:"relative z-[2] bg-bg",children:w("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:L,paddingBottom:z},children:[!$&&(t||o||u)&&r(ut,{num:t,title:o?ft(o):void 0,desc:u||void 0,spaceBelow:"mb-12"}),r(ht,{offices:e,apiKey:l,mapId:M,mapTheme:g,activeIndex:b,onSelect:h}),e.length>0&&r("div",{className:"mt-12 flex flex-col gap-8",children:N.map((n,C)=>w("div",{children:[n.key&&r(dt,{groupKey:n.key,count:n.items.length}),r("div",{className:["grid gap-[2px] bg-bg",pt(n.items.length),n.items.length>2?"max-[1100px]:grid-cols-2 max-[700px]:grid-cols-1":n.items.length===2?"max-[700px]:grid-cols-1":""].join(" "),children:n.items.map(({item:i,index:k})=>{const A=b===k;return w("button",{type:"button",onClick:()=>h(k),"aria-pressed":A,className:["flex flex-col gap-1.5 bg-bg px-6 py-5 text-left transition-colors outline outline-1 -outline-offset-1",A?"outline-accent":"outline-transparent hover:outline-line"].join(" "),children:[w("span",{className:"flex items-center gap-2.5 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.28em]",children:[i.hq&&r("span",{className:"border border-accent bg-accent px-1.5 py-0.5 text-[length:var(--size-body,10px)] text-bg",children:"HQ"}),i.role&&r("span",{className:"text-accent",children:i.role})]}),i.city&&r("span",{className:"font-display text-[length:var(--size-body,18px)] font-medium leading-[1.2] tracking-[-0.01em] text-fg",children:r(gt,{value:i.city,children:i.city})}),i.country&&r("span",{className:"font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.2em] text-fg-dim",children:i.country}),i.address&&r("span",{className:"font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.2em] text-fg-dim",children:mt(i.address)})]},k)})})]},n.key?`g:${n.key}`:`ungrouped:${C}`))}),e.length===0&&m&&r("p",{className:"mt-8 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.24em] text-fg-dim",children:"Add an office in the inspector"})]})})}function ht({offices:t,apiKey:o,mapId:u,mapTheme:e,activeIndex:l,onSelect:M}){const g=st(o,it()),a=at(u,lt()),x=!!g&&t.some(c=>J(c.lat,c.lng)),m=e!=="auto",$=H(e),L=f(null),z=f(null),b=f(null),h=f(null),v=f(new Map),N=f(null),n=f(null),C=f(null),i=f(M);i.current=M;const k=f(t);k.current=t;const A=f(l);A.current=l;const[_,D]=P(!1),[j,K]=P(Q.dark),[tt,W]=P(Q.dark.background);return S(()=>{K(H(e)),W(F(e))},[e]),S(()=>{if(!x)return;const c=L.current;if(!c)return;let d=!1,p=null;const I=async()=>{try{const s=await ot(g);if(d||!z.current)return;const y=new s.Map(z.current,{center:{lat:25,lng:0},zoom:2,minZoom:1,maxZoom:5,disableDefaultUI:!0,gestureHandling:"cooperative",keyboardShortcuts:!1,clickableIcons:!1,backgroundColor:F(e),...a?{mapId:a}:{styles:X(e)}});b.current=y,h.current=s;const R=Y(y,s,e,k.current,v.current,B=>i.current(B));n.current=R,R.isEmpty()||y.fitBounds(R,q);const O=new s.InfoWindow({disableAutoPan:!0});O.addListener("closeclick",()=>i.current(null)),N.current=O,y.addListener("click",()=>i.current(null)),y.addListener("tilesloaded",()=>{d||D(!0)}),e==="auto"&&!a&&(p=rt(()=>{d||!b.current||(b.current.setOptions({styles:X(e),backgroundColor:F(e)}),v.current.forEach((B,et)=>{const Z=k.current[et];Z&&B.setIcon(V(Z,s,e))}),K(H(e)),W(F(e)))}))}catch(s){console.error("[FootprintMap] Maps SDK failed:",s)}},E=new IntersectionObserver(s=>{for(const y of s)if(y.isIntersecting){E.disconnect(),I();break}},{rootMargin:"200px"});return E.observe(c),()=>{d=!0,E.disconnect(),p?.(),N.current?.close(),N.current=null,b.current=null,h.current=null,v.current.forEach(s=>s.setMap(null)),v.current.clear(),n.current=null,D(!1)}},[x,g,a,e]),S(()=>{const c=b.current,d=h.current;if(!c||!d)return;const p=Y(c,d,e,t,v.current,I=>i.current(I));n.current=p,A.current===null&&!p.isEmpty()&&c.fitBounds(p,q)},[t,e]),S(()=>{const c=b.current,d=N.current;if(!c||!d)return;if(l===null){d.close(),C.current!==null&&n.current&&!n.current.isEmpty()&&c.fitBounds(n.current,q),C.current=null;return}const p=t[l],I=v.current.get(l);if(!p||!I){d.close(),C.current=l;return}c.panTo({lat:p.lat,lng:p.lng});const E=c.getZoom();E!=null&&E<4&&c.setZoom(4);const s=j.info,y=p.hq?`<span style="background:${s.accent};color:${s.bg};padding:1px 6px;font-size:10px;letter-spacing:0.18em;">HQ</span>`:"",R=p.role?`<span style="color:${s.accent};">${G(p.role)}</span>`:"";d.setContent(`
|
|
19
|
+
`}function T({pal:t}){const o=t?t.marker:"var(--accent)",u=t?t.info.bg:"var(--site-surface)",e=t?t.background:"var(--bg)",l=t?`color-mix(in oklab, ${t.info.fgDim} 12%, transparent)`:"color-mix(in oklab, var(--fg) 3%, transparent)";return w(nt,{children:[r("div",{className:"pointer-events-none absolute inset-0",style:{backgroundImage:`radial-gradient(60% 70% at 50% 50%, color-mix(in oklab, ${o} 8%, ${u}) 0%, ${u} 60%, ${e} 100%)`}}),r("div",{className:"pointer-events-none absolute inset-0",style:{backgroundImage:`repeating-linear-gradient(0deg, transparent 0 22px, ${l} 22px 23px), repeating-linear-gradient(90deg, transparent 0 22px, ${l} 22px 23px)`}})]})}function vt({sectionNumber:t="",heading:o="",tagline:u="",offices:e=[],apiKey:l="",mapId:M="",mapTheme:g="auto",padTop:a,padBottom:x,editing:m,omitHead:$=!1}){const L=typeof a=="number"?a:120,z=typeof x=="number"?x:120,[b,h]=P(null),v=e.length===0&&!t&&!o&&!u;if(S(()=>{h(n=>n!==null&&n>=e.length?null:n)},[e]),v&&!m)return null;const N=ct(e,n=>String(n.group??""),()=>"");return r("section",{className:"relative z-[2] bg-bg",children:w("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:L,paddingBottom:z},children:[!$&&(t||o||u)&&r(ut,{num:t,title:o?ft(o):void 0,desc:u||void 0,spaceBelow:"mb-12"}),r(ht,{offices:e,apiKey:l,mapId:M,mapTheme:g,activeIndex:b,onSelect:h}),e.length>0&&r("div",{className:"mt-12 flex flex-col gap-8",children:N.map((n,C)=>w("div",{children:[n.key&&r(dt,{groupKey:n.key,count:n.items.length}),r("div",{className:["grid gap-[2px] bg-bg",pt(n.items.length),n.items.length>2?"max-[1100px]:grid-cols-2 max-[700px]:grid-cols-1":n.items.length===2?"max-[700px]:grid-cols-1":""].join(" "),children:n.items.map(({item:i,index:k})=>{const A=b===k;return w("button",{type:"button",onClick:()=>h(k),"aria-pressed":A,className:["flex flex-col gap-1.5 bg-bg px-6 py-5 text-left transition-colors outline outline-1 -outline-offset-1",A?"outline-accent":"outline-transparent hover:outline-line"].join(" "),children:[w("span",{className:"flex items-center gap-2.5 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.28em]",children:[i.hq&&r("span",{className:"border border-accent bg-accent px-1.5 py-0.5 text-[length:var(--size-body,10px)] text-bg",children:"HQ"}),i.role&&r("span",{className:"text-accent",children:i.role})]}),i.city&&r("span",{className:"font-display text-[length:var(--size-body,18px)] font-medium leading-[1.2] tracking-[-0.01em] text-fg",children:r(gt,{value:i.city,children:i.city})}),i.country&&r("span",{className:"font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.2em] text-fg-dim",children:i.country}),i.address&&r("span",{className:"font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.2em] text-fg-dim",children:mt(i.address)})]},k)})})]},n.key?`g:${n.key}`:`ungrouped:${C}`))}),e.length===0&&m&&r("p",{className:"mt-8 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.24em] text-fg-dim",children:"Add an office in the inspector"})]})})}function ht({offices:t,apiKey:o,mapId:u,mapTheme:e,activeIndex:l,onSelect:M}){const g=st(o,it()),a=at(u,lt()),x=!!g&&t.some(c=>J(c.lat,c.lng)),m=e!=="auto",$=H(e),L=f(null),z=f(null),b=f(null),h=f(null),v=f(new Map),N=f(null),n=f(null),C=f(null),i=f(M);i.current=M;const k=f(t);k.current=t;const A=f(l);A.current=l;const[_,D]=P(!1),[j,K]=P(Q.dark),[tt,W]=P(Q.dark.background);return S(()=>{K(H(e)),W(F(e))},[e]),S(()=>{if(!x)return;const c=L.current;if(!c)return;let d=!1,p=null;const I=async()=>{try{const s=await ot(g);if(d||!z.current)return;const y=new s.Map(z.current,{center:{lat:25,lng:0},zoom:2,minZoom:1,maxZoom:5,disableDefaultUI:!0,gestureHandling:"cooperative",keyboardShortcuts:!1,clickableIcons:!1,backgroundColor:F(e),...a?{mapId:a}:{styles:X(e)}});b.current=y,h.current=s;const R=Y(y,s,e,k.current,v.current,B=>i.current(B));n.current=R,R.isEmpty()||y.fitBounds(R,q);const O=new s.InfoWindow({disableAutoPan:!0});O.addListener("closeclick",()=>i.current(null)),N.current=O,y.addListener("click",()=>i.current(null)),y.addListener("tilesloaded",()=>{d||D(!0)}),e==="auto"&&!a&&(p=rt(()=>{d||!b.current||(b.current.setOptions({styles:X(e),backgroundColor:F(e)}),v.current.forEach((B,et)=>{const Z=k.current[et];Z&&B.setIcon(V(Z,s,e))}),K(H(e)),W(F(e)))}))}catch(s){console.error("[FootprintMap] Maps SDK failed:",s)}},E=new IntersectionObserver(s=>{for(const y of s)if(y.isIntersecting){E.disconnect(),I();break}},{rootMargin:"200px"});return E.observe(c),()=>{d=!0,E.disconnect(),p?.(),N.current?.close(),N.current=null,b.current=null,h.current=null,v.current.forEach(s=>s.setMap(null)),v.current.clear(),n.current=null,D(!1)}},[x,g,a,e]),S(()=>{const c=b.current,d=h.current;if(!c||!d)return;const p=Y(c,d,e,t,v.current,I=>i.current(I));n.current=p,A.current===null&&!p.isEmpty()&&c.fitBounds(p,q)},[t,e]),S(()=>{const c=b.current,d=N.current;if(!c||!d)return;if(l===null){d.close(),C.current!==null&&n.current&&!n.current.isEmpty()&&c.fitBounds(n.current,q),C.current=null;return}const p=t[l],I=v.current.get(l);if(!p||!I){d.close(),C.current=l;return}c.panTo({lat:p.lat,lng:p.lng});const E=c.getZoom();E!=null&&E<4&&c.setZoom(4);const s=j.info,y=p.hq?`<span style="background:${s.accent};color:${s.bg};padding:1px 6px;font-size:10px;letter-spacing:0.18em;">HQ</span>`:"",R=p.role?`<span style="color:${s.accent};">${G(p.role)}</span>`:"";d.setContent(`
|
|
20
20
|
<div style="padding:10px 14px 12px;min-width:180px;color:${s.fg};">
|
|
21
21
|
<div style="display:flex;align-items:center;gap:8px;font-family:var(--font-role-label),var(--font-mono-fallback);font-size:11px;letter-spacing:0.28em;text-transform:uppercase;">
|
|
22
22
|
${y}${R}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as a,jsxs as F}from"react/jsx-runtime";import{useEffect as u,useRef as k,useState as l}from"react";import{SiteImage as z}from"../lib/site-runtime.js";import I from"./HeroHeldFrame.js";import{hasAv1Variant as L,isExternalMediaUrl as N}from"../lib/media.js";const R=.5;function g({videoSrc:n,posterSrc:c,showVideo:m=!0,playbackRate:f=R,objectPosition:o="50% 50%",quiet:p=!1}){const r=c||"",e=n||"",[d,i]=l(!1),[x,v]=l(!1),[h,y]=l(!1),[w,E]=l(!1),b=k(null);u(()=>{i(!1),v(!1),y(!1)},[n,c]),u(()=>{if(typeof window>"u")return;const t=()=>{const s=window;s.requestIdleCallback?s.requestIdleCallback(()=>E(!0),{timeout:2e3}):setTimeout(()=>E(!0),800)};if(document.readyState==="complete"){t();return}return window.addEventListener("load",t,{once:!0}),()=>window.removeEventListener("load",t)},[]),u(()=>{const t=b.current;if(!t)return;const s=()=>{t.playbackRate=f};return s(),t.addEventListener("loadedmetadata",s),()=>t.removeEventListener("loadedmetadata",s)},[n,f]);const j=N(r);return F("div",{className:"absolute inset-0 z-[1]",children:[a("div",{className:"absolute inset-0",style:{background:"var(--surface)"}}),r&&(j?a("img",{src:r,alt:"",className:"absolute inset-0 z-[2] h-full w-full object-cover",style:{display:d?"none":"block",objectPosition:o},onError:()=>i(!0)},r):a(z,{src:r,alt:"",fill:!0,priority:!0,sizes:"100vw",className:"z-[2] object-cover",style:{display:d?"none":"block",objectPosition:o},onError:()=>i(!0)},r)),m&&!p&&e&&w&&!x&&F("video",{ref:b,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"metadata",className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:o},onError:()=>v(!0),children:[L(e)&&a("source",{src:e.replace(/\.mp4$/,".av1.mp4"),type:'video/mp4; codecs="av01.0.08M.10"'}),a("source",{src:e,type:"video/mp4"})]},e),m&&p&&e&&w&&!h&&(!r||d)&&a(I,{src:e,objectPosition:o,onError:()=>y(!0)},e)]})}export{g as default};
|
|
1
|
+
"use client";import{jsx as a,jsxs as F}from"react/jsx-runtime";import{useEffect as u,useRef as k,useState as l}from"react";import{SiteImage as z}from"../lib/site-runtime.js";import I from"./HeroHeldFrame.js";import{hasAv1Variant as L,isExternalMediaUrl as N}from"../lib/media.js";const R=.5;function g({videoSrc:n,posterSrc:c,showVideo:m=!0,playbackRate:f=R,objectPosition:o="50% 50%",quiet:p=!1}){const r=c||"",e=n||"",[d,i]=l(!1),[x,v]=l(!1),[h,y]=l(!1),[w,E]=l(!1),b=k(null);u(()=>{i(!1),v(!1),y(!1)},[n,c]),u(()=>{if(typeof window>"u")return;const t=()=>{const s=window;s.requestIdleCallback?s.requestIdleCallback(()=>E(!0),{timeout:2e3}):setTimeout(()=>E(!0),800)};if(document.readyState==="complete"){t();return}return window.addEventListener("load",t,{once:!0}),()=>window.removeEventListener("load",t)},[]),u(()=>{const t=b.current;if(!t)return;const s=()=>{t.playbackRate=f};return s(),t.addEventListener("loadedmetadata",s),()=>t.removeEventListener("loadedmetadata",s)},[n,f]);const j=N(r);return F("div",{className:"absolute inset-0 z-[1]",children:[a("div",{className:"absolute inset-0",style:{background:"var(--site-surface)"}}),r&&(j?a("img",{src:r,alt:"",className:"absolute inset-0 z-[2] h-full w-full object-cover",style:{display:d?"none":"block",objectPosition:o},onError:()=>i(!0)},r):a(z,{src:r,alt:"",fill:!0,priority:!0,sizes:"100vw",className:"z-[2] object-cover",style:{display:d?"none":"block",objectPosition:o},onError:()=>i(!0)},r)),m&&!p&&e&&w&&!x&&F("video",{ref:b,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"metadata",className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:o},onError:()=>v(!0),children:[L(e)&&a("source",{src:e.replace(/\.mp4$/,".av1.mp4"),type:'video/mp4; codecs="av01.0.08M.10"'}),a("source",{src:e,type:"video/mp4"})]},e),m&&p&&e&&w&&!h&&(!r||d)&&a(I,{src:e,objectPosition:o,onError:()=>y(!0)},e)]})}export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as i,jsxs as N}from"react/jsx-runtime";import{useEffect as h,useState as v}from"react";import{SiteImage as x}from"../lib/site-runtime.js";import{isExternalMediaUrl as w}from"../lib/media.js";function E({fallback:o,className:f,src:u,alt:c="",objectPosition:l,objectFit:n="cover",sizes:d="100vw",priority:m=!1,deferFetch:t=!1,showBackground:y=!0,treatment:s}){const[a,r]=v(!1),e=u||"";h(()=>{r(!1)},[e]);const g=w(e),p=!e||a;return N("div",{className:`relative h-full w-full overflow-hidden ${f??""}`,children:[i("div",{className:"absolute inset-0 flex items-center justify-center",style:y?{background:"var(--surface)"}:void 0,children:p?o:null}),e&&(g?i("img",{src:e,alt:c,decoding:"async",...t?{loading:"lazy"}:{},className:`absolute inset-0 h-full w-full${s?.className?` ${s.className}`:""}`,style:{display:a?"none":"block",objectFit:n,...l?{objectPosition:l}:{},...s?.style??{}},onError:()=>r(!0)}):i(x,{src:e,alt:c,fill:!0,sizes:d,priority:m,...s?.className?{className:s.className}:{},style:{display:a?"none":"block",objectFit:n,...l?{objectPosition:l}:{},...s?.style??{}},onError:()=>r(!0)}))]})}export{E as default};
|
|
1
|
+
"use client";import{jsx as i,jsxs as N}from"react/jsx-runtime";import{useEffect as h,useState as v}from"react";import{SiteImage as x}from"../lib/site-runtime.js";import{isExternalMediaUrl as w}from"../lib/media.js";function E({fallback:o,className:f,src:u,alt:c="",objectPosition:l,objectFit:n="cover",sizes:d="100vw",priority:m=!1,deferFetch:t=!1,showBackground:y=!0,treatment:s}){const[a,r]=v(!1),e=u||"";h(()=>{r(!1)},[e]);const g=w(e),p=!e||a;return N("div",{className:`relative h-full w-full overflow-hidden ${f??""}`,children:[i("div",{className:"absolute inset-0 flex items-center justify-center",style:y?{background:"var(--site-surface)"}:void 0,children:p?o:null}),e&&(g?i("img",{src:e,alt:c,decoding:"async",...t?{loading:"lazy"}:{},className:`absolute inset-0 h-full w-full${s?.className?` ${s.className}`:""}`,style:{display:a?"none":"block",objectFit:n,...l?{objectPosition:l}:{},...s?.style??{}},onError:()=>r(!0)}):i(x,{src:e,alt:c,fill:!0,sizes:d,priority:m,...s?.className?{className:s.className}:{},style:{display:a?"none":"block",objectFit:n,...l?{objectPosition:l}:{},...s?.style??{}},onError:()=>r(!0)}))]})}export{E as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as a,jsxs as l}from"react/jsx-runtime";import{SiteLink as d}from"../lib/site-runtime.js";import{boxDarkenStyle as p,boxPlacementClasses as N,CARD_SHADOW_CLASS as L}from"../lib/content/box-background.js";import c from"./Placeholder.js";import{renderGold as r,renderHeadline as s}from"./goldPhrases.js";const y=[{label:"Card",value:"card"},{label:"Photo behind the words",value:"cover"}],P="card",k={min:200,max:700,step:10,fallback:330,unit:"px"};function z({post:e,scaffold:n=!1,layout:m,showCover:o=!0,placement:x,darken:h,darkenStyle:g,href:f,minHeight:v}){const t=f||(n?"#":`/journal/${e.slug}`),b=m==="cover",u=(e.meta||e.dateLabel||e.read)&&l("div",{className:"flex gap-3.5 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-fg-dim",children:[e.meta&&a("span",{className:"text-accent",children:r(e.meta)}),e.dateLabel&&a("span",{children:r(e.dateLabel)}),e.read&&a("span",{children:r(e.read)})]});if(b){const i=p(h,g);return l(d,{href:t,className:`${L} group relative isolate flex overflow-hidden`,style:{minHeight:`${v??k.fallback}px`},"aria-disabled":n||void 0,tabIndex:n?-1:void 0,children:[a("div",{className:"absolute inset-0",children:a(c,{label:`post-${e.slug}`,src:e.cover||void 0,sizes:"(max-width: 800px) 100vw, 56vw"})}),i&&a("div",{className:"absolute inset-0 z-0",style:i,"aria-hidden":!0}),l("div",{className:`relative z-[1] flex w-full flex-col gap-2 p-8 text-overlay-fg max-[800px]:p-5 ${N(x??"bottom-left","column")}`,children:[e.meta&&a("div",{className:"font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-accent",children:r(e.meta)}),a("h3",{className:"font-heading3 text-[length:var(--size-headingSmall,30px)] font-medium leading-[1.2] tracking-[-0.02em]",children:s(e.title,!1)}),e.excerpt&&a("p",{className:"max-w-[46ch] text-[length:var(--size-body,14px)] leading-[1.55] opacity-80",children:r(e.excerpt)}),(e.dateLabel||e.read)&&l("div",{className:"flex gap-3.5 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] opacity-75",children:[e.dateLabel&&a("span",{children:r(e.dateLabel)}),e.read&&a("span",{children:r(e.read)})]})]})]})}return l(d,{href:t,style:{"--card-bg":"var(--surface)","--card-bg-hover":"var(--surface-2)"},className:"sf-card sf-card-fill group block bg-[var(--card-bg)] transition-colors duration-300 hover:bg-[var(--card-bg-hover)]","aria-disabled":n||void 0,tabIndex:n?-1:void 0,children:[o&&a("div",{className:"sf-card-image relative aspect-[16/10] overflow-hidden bg-bg",children:a(c,{label:`event-${e.slug}`,src:e.cover||void 0})}),l("div",{className:"flex flex-col gap-2.5 px-7 pb-8 pt-6",children:[u,a("h3",{className:"mt-1 font-heading3 text-[length:var(--size-headingSmall,22px)] font-medium leading-[1.2] tracking-[-0.02em]",children:s(e.title,!1)}),e.excerpt&&a("p",{className:"text-[length:var(--size-body,14px)] leading-[1.55] text-fg-dim",children:r(e.excerpt)}),l("span",{className:"mt-1.5 inline-flex items-center gap-2 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] transition-colors group-hover:text-accent",children:["Read more",a("span",{"aria-hidden":!0,children:"→"})]})]})]})}export{k as POST_CARD_HEIGHT,y as POST_CARD_LAYOUTS,P as POST_CARD_LAYOUT_FALLBACK,z as default};
|
|
1
|
+
import{jsx as a,jsxs as l}from"react/jsx-runtime";import{SiteLink as d}from"../lib/site-runtime.js";import{boxDarkenStyle as p,boxPlacementClasses as N,CARD_SHADOW_CLASS as L}from"../lib/content/box-background.js";import c from"./Placeholder.js";import{renderGold as r,renderHeadline as s}from"./goldPhrases.js";const y=[{label:"Card",value:"card"},{label:"Photo behind the words",value:"cover"}],P="card",k={min:200,max:700,step:10,fallback:330,unit:"px"};function z({post:e,scaffold:n=!1,layout:m,showCover:o=!0,placement:x,darken:h,darkenStyle:g,href:f,minHeight:v}){const t=f||(n?"#":`/journal/${e.slug}`),b=m==="cover",u=(e.meta||e.dateLabel||e.read)&&l("div",{className:"flex gap-3.5 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-fg-dim",children:[e.meta&&a("span",{className:"text-accent",children:r(e.meta)}),e.dateLabel&&a("span",{children:r(e.dateLabel)}),e.read&&a("span",{children:r(e.read)})]});if(b){const i=p(h,g);return l(d,{href:t,className:`${L} group relative isolate flex overflow-hidden`,style:{minHeight:`${v??k.fallback}px`},"aria-disabled":n||void 0,tabIndex:n?-1:void 0,children:[a("div",{className:"absolute inset-0",children:a(c,{label:`post-${e.slug}`,src:e.cover||void 0,sizes:"(max-width: 800px) 100vw, 56vw"})}),i&&a("div",{className:"absolute inset-0 z-0",style:i,"aria-hidden":!0}),l("div",{className:`relative z-[1] flex w-full flex-col gap-2 p-8 text-overlay-fg max-[800px]:p-5 ${N(x??"bottom-left","column")}`,children:[e.meta&&a("div",{className:"font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-accent",children:r(e.meta)}),a("h3",{className:"font-heading3 text-[length:var(--size-headingSmall,30px)] font-medium leading-[1.2] tracking-[-0.02em]",children:s(e.title,!1)}),e.excerpt&&a("p",{className:"max-w-[46ch] text-[length:var(--size-body,14px)] leading-[1.55] opacity-80",children:r(e.excerpt)}),(e.dateLabel||e.read)&&l("div",{className:"flex gap-3.5 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] opacity-75",children:[e.dateLabel&&a("span",{children:r(e.dateLabel)}),e.read&&a("span",{children:r(e.read)})]})]})]})}return l(d,{href:t,style:{"--card-bg":"var(--site-surface)","--card-bg-hover":"var(--site-surface-2)"},className:"sf-card sf-card-fill group block bg-[var(--card-bg)] transition-colors duration-300 hover:bg-[var(--card-bg-hover)]","aria-disabled":n||void 0,tabIndex:n?-1:void 0,children:[o&&a("div",{className:"sf-card-image relative aspect-[16/10] overflow-hidden bg-bg",children:a(c,{label:`event-${e.slug}`,src:e.cover||void 0})}),l("div",{className:"flex flex-col gap-2.5 px-7 pb-8 pt-6",children:[u,a("h3",{className:"mt-1 font-heading3 text-[length:var(--size-headingSmall,22px)] font-medium leading-[1.2] tracking-[-0.02em]",children:s(e.title,!1)}),e.excerpt&&a("p",{className:"text-[length:var(--size-body,14px)] leading-[1.55] text-fg-dim",children:r(e.excerpt)}),l("span",{className:"mt-1.5 inline-flex items-center gap-2 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] transition-colors group-hover:text-accent",children:["Read more",a("span",{"aria-hidden":!0,children:"→"})]})]})]})}export{k as POST_CARD_HEIGHT,y as POST_CARD_LAYOUTS,P as POST_CARD_LAYOUT_FALLBACK,z as default};
|
package/dist/components/Reel.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as a,jsxs as
|
|
1
|
+
"use client";import{jsx as a,jsxs as i,Fragment as s}from"react/jsx-runtime";import{normaliseReelShape as u,reelRailClass as p,reelSurfaceRailClass as h}from"../lib/reel.js";function g({slides:t,active:r,shape:o,placement:e,ref:n,tone:c="media",label:m}){const l=u(o),d=c==="surface"?{"--overlay-fg":"var(--fg)","--overlay-chrome":"var(--fg)","--overlay-scrim":"var(--site-surface-2)"}:void 0;return i("aside",{ref:n,"aria-label":m??"Featured slides",className:c==="surface"?h(l):p(l,e),style:{color:"var(--overlay-fg)",...d},children:[l==="cards"&&a(x,{slides:t,active:r}),l==="dots"&&a(f,{count:t.length,active:r}),l==="numbers"&&a(b,{count:t.length,active:r}),l==="bar"&&a(v,{count:t.length,active:r}),l==="tabs"&&a(y,{slides:t,active:r})]})}function x({slides:t,active:r}){return i(s,{children:[a("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"}),t.map((o,e)=>{const n=e===r;return i("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:[a("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}`}),a("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 f({count:t,active:r}){return a(s,{children:Array.from({length:t},(o,e)=>a("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 b({count:t,active:r}){return a(s,{children:Array.from({length:t},(o,e)=>a("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:String(e+1).padStart(2,"0")},e))})}function v({count:t,active:r}){return a(s,{children:Array.from({length:t},(o,e)=>a("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 y({slides:t,active:r}){return a(s,{children:t.map((o,e)=>{const n=e===r;return a("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:a("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)})})}export{g as default};
|
package/dist/components/Split.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{SiteLink as v}from"../lib/site-runtime.js";import $ from"./Btn.js";import{resolveImageTreatment as C}from"../lib/content/image-treatment.js";import u from"./Placeholder.js";import{useSitePhotography as G}from"./SitePhotographyContext.js";import I from"./SectionEyebrow.js";import{renderGold as a,renderHeadline as M,splitParagraphs as _}from"./goldPhrases.js";function A({imageLabel:o,imageSrc:p,imageTint:x=.4,imageObjectPosition:y,eyebrow:c,title:d,body:m,cta:l,reverse:h=!1,uppercase:N=!1,textAlign:j="left",textBgSrc:i,textBgLabel:k,textBgTint:f=.6,textBgObjectPosition:z,featureBar:t,imageButton:n,grayscale:w}){const g=C(w,G()),b={left:{items:"",text:"",cta:"self-start"},center:{items:"items-center",text:"text-center",cta:"self-center"},right:{items:"items-end",text:"text-right",cta:"self-end"}},s=b[j]??b.left;return e("section",{className:"relative z-[2] bg-bg p-0",children:r("div",{className:["grid min-h-[72vh] grid-cols-2 border-t border-b border-line","max-[960px]:grid-cols-1","max-[960px]:min-h-0",h?"min-[961px]:[direction:rtl]":""].join(" "),children:[r("div",{className:"sf-card relative flex items-center justify-center overflow-hidden bg-surface [direction:ltr] max-[960px]:aspect-[4/3] max-[960px]:order-2",style:h?{borderLeft:"1px solid var(--line)"}:{borderRight:"1px solid var(--line)"},children:[e(u,{label:o,src:p,objectPosition:y,treatment:g}),p&&x>0&&e("div",{className:"absolute inset-0",style:{background:`rgba(0,0,0,${x})`}}),(t||n)&&r("div",{className:"pointer-events-none absolute inset-0 z-[3] flex flex-col items-center justify-center gap-4 px-[var(--sf-site-gutter,40px)] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]",children:[t&&r(v,{href:t.href,className:"pointer-events-auto inline-flex items-center justify-center gap-3 border px-7 py-4 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] backdrop-blur-sm transition-colors max-[800px]:gap-2 max-[800px]:px-5 max-[800px]:py-3 max-[800px]:text-[length:var(--size-label,12px)]",style:{borderColor:"rgba(245,241,232,0.3)",color:"rgba(245,241,232,0.85)",background:"rgba(0,0,0,0.45)"},children:[e("span",{children:a(t.wheel)}),e("span",{"aria-hidden":!0,style:{opacity:.55},children:"·"}),e("span",{children:a(t.category)}),e("span",{"aria-hidden":!0,children:"→"}),e("span",{children:a(t.cta??"Shop now")})]}),n&&r(v,{href:n.href,className:"pointer-events-auto inline-flex items-center justify-center gap-2 border px-7 py-4 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] backdrop-blur-sm transition-colors hover:bg-[rgba(245,241,232,0.1)] max-[800px]:gap-2 max-[800px]:px-5 max-[800px]:py-3 max-[800px]:text-[length:var(--size-label,12px)]",style:{borderColor:"rgba(245,241,232,0.5)",color:"rgba(245,241,232,0.95)",background:"transparent"},children:[e("span",{children:a(n.text??"Learn more")}),e("span",{"aria-hidden":!0,children:"→"})]})]})]}),r("div",{className:"relative overflow-hidden [direction:ltr] max-[960px]:order-1",children:[i&&r("div",{className:"absolute inset-0","aria-hidden":!0,children:[e(u,{label:k??o,src:i,objectPosition:z,treatment:g}),f>0&&e("div",{className:"absolute inset-0",style:{background:`rgba(0,0,0,${f})`}})]}),e("div",{className:"relative z-[2] flex h-full min-h-full flex-col px-[60px] py-[100px] max-[960px]:px-6 max-[960px]:py-[60px]",style:i?{color:"var(--overlay-fg)"}:void 0,children:r("div",{className:["flex flex-1 flex-col justify-center gap-6",s.items,s.text].join(" "),children:[c&&e(I,{text:c,size:14}),d&&e("h2",{className:["font-heading2 text-[length:min(var(--size-headingMedium,56px),var(--sf-heading-max,9999px))] font-normal leading-[1.05] tracking-[-0.03em]","max-[800px]:text-[length:var(--size-headingMedium,36px)] max-[800px]:leading-[1]",N?"uppercase":""].join(" "),children:M(d,!1)}),m&&_(m).map((P,L)=>e("p",{className:["max-w-[520px] text-[length:var(--size-body,16px)] leading-[1.7]",i?"opacity-85":"text-fg-dim"].join(" "),children:a(P)},L)),l.text&&e("div",{className:`mt-2 ${s.cta}`,children:e($,{href:l.href,variant:"primary",children:a(l.text)})})]})})]})]})})}export{A as default};
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{SiteLink as v}from"../lib/site-runtime.js";import $ from"./Btn.js";import{resolveImageTreatment as C}from"../lib/content/image-treatment.js";import u from"./Placeholder.js";import{useSitePhotography as G}from"./SitePhotographyContext.js";import I from"./SectionEyebrow.js";import{renderGold as a,renderHeadline as M,splitParagraphs as _}from"./goldPhrases.js";function A({imageLabel:o,imageSrc:p,imageTint:x=.4,imageObjectPosition:y,eyebrow:c,title:d,body:m,cta:l,reverse:h=!1,uppercase:N=!1,textAlign:j="left",textBgSrc:i,textBgLabel:k,textBgTint:f=.6,textBgObjectPosition:z,featureBar:t,imageButton:n,grayscale:w}){const g=C(w,G()),b={left:{items:"",text:"",cta:"self-start"},center:{items:"items-center",text:"text-center",cta:"self-center"},right:{items:"items-end",text:"text-right",cta:"self-end"}},s=b[j]??b.left;return e("section",{className:"relative z-[2] bg-bg p-0",children:r("div",{className:["grid min-h-[72vh] grid-cols-2 border-t border-b border-line","max-[960px]:grid-cols-1","max-[960px]:min-h-0",h?"min-[961px]:[direction:rtl]":""].join(" "),children:[r("div",{className:"sf-card relative flex items-center justify-center overflow-hidden bg-surface [direction:ltr] max-[960px]:aspect-[4/3] max-[960px]:order-2",style:h?{borderLeft:"1px solid var(--site-line)"}:{borderRight:"1px solid var(--site-line)"},children:[e(u,{label:o,src:p,objectPosition:y,treatment:g}),p&&x>0&&e("div",{className:"absolute inset-0",style:{background:`rgba(0,0,0,${x})`}}),(t||n)&&r("div",{className:"pointer-events-none absolute inset-0 z-[3] flex flex-col items-center justify-center gap-4 px-[var(--sf-site-gutter,40px)] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]",children:[t&&r(v,{href:t.href,className:"pointer-events-auto inline-flex items-center justify-center gap-3 border px-7 py-4 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] backdrop-blur-sm transition-colors max-[800px]:gap-2 max-[800px]:px-5 max-[800px]:py-3 max-[800px]:text-[length:var(--size-label,12px)]",style:{borderColor:"rgba(245,241,232,0.3)",color:"rgba(245,241,232,0.85)",background:"rgba(0,0,0,0.45)"},children:[e("span",{children:a(t.wheel)}),e("span",{"aria-hidden":!0,style:{opacity:.55},children:"·"}),e("span",{children:a(t.category)}),e("span",{"aria-hidden":!0,children:"→"}),e("span",{children:a(t.cta??"Shop now")})]}),n&&r(v,{href:n.href,className:"pointer-events-auto inline-flex items-center justify-center gap-2 border px-7 py-4 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] backdrop-blur-sm transition-colors hover:bg-[rgba(245,241,232,0.1)] max-[800px]:gap-2 max-[800px]:px-5 max-[800px]:py-3 max-[800px]:text-[length:var(--size-label,12px)]",style:{borderColor:"rgba(245,241,232,0.5)",color:"rgba(245,241,232,0.95)",background:"transparent"},children:[e("span",{children:a(n.text??"Learn more")}),e("span",{"aria-hidden":!0,children:"→"})]})]})]}),r("div",{className:"relative overflow-hidden [direction:ltr] max-[960px]:order-1",children:[i&&r("div",{className:"absolute inset-0","aria-hidden":!0,children:[e(u,{label:k??o,src:i,objectPosition:z,treatment:g}),f>0&&e("div",{className:"absolute inset-0",style:{background:`rgba(0,0,0,${f})`}})]}),e("div",{className:"relative z-[2] flex h-full min-h-full flex-col px-[60px] py-[100px] max-[960px]:px-6 max-[960px]:py-[60px]",style:i?{color:"var(--overlay-fg)"}:void 0,children:r("div",{className:["flex flex-1 flex-col justify-center gap-6",s.items,s.text].join(" "),children:[c&&e(I,{text:c,size:14}),d&&e("h2",{className:["font-heading2 text-[length:min(var(--size-headingMedium,56px),var(--sf-heading-max,9999px))] font-normal leading-[1.05] tracking-[-0.03em]","max-[800px]:text-[length:var(--size-headingMedium,36px)] max-[800px]:leading-[1]",N?"uppercase":""].join(" "),children:M(d,!1)}),m&&_(m).map((P,L)=>e("p",{className:["max-w-[520px] text-[length:var(--size-body,16px)] leading-[1.7]",i?"opacity-85":"text-fg-dim"].join(" "),children:a(P)},L)),l.text&&e("div",{className:`mt-2 ${s.cta}`,children:e($,{href:l.href,variant:"primary",children:a(l.text)})})]})})]})]})})}export{A as default};
|
|
@@ -5,6 +5,7 @@ export declare const CARD_IMAGE_BG_OFF = "transparent";
|
|
|
5
5
|
export declare const CARD_IMAGE_BG_INHERIT: "inherit";
|
|
6
6
|
export type CardImageBackground = string | boolean | undefined;
|
|
7
7
|
export declare function resolveCardImageBackground(stored: CardImageBackground, builtIn: string): string;
|
|
8
|
+
export declare function cardImageBackgroundChoice(stored: CardImageBackground, builtIn: string): string;
|
|
8
9
|
export declare function resolveBoundCardImageBackground(stored: CardImageBackground): string;
|
|
9
10
|
export declare function cardImageBackgroundPaints(fill: string): boolean;
|
|
10
11
|
export declare function isCardImageBackgroundInheriting(stored: CardImageBackground, builtIn: string): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
import{paintedFill as a}from"./section-background.js";const c=["transparent","var(--wheel-stage)","var(--surface)","var(--surface-2)"],g={transparent:"No fill","var(--wheel-stage)":"Image stage","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},e="var(--wheel-stage)",u="transparent",t="inherit";function o(r,n){return a(f(r,n))}function f(r,n){return r===t?e:r==null?n:r===!0?e:r===!1?u:r}function p(r){return typeof r=="string"&&r!==t?a(r):e}function s(r){return r!==u&&r!=="none"&&r!==""}function _(r,n){return r===t||r===!0?!0:r==null?n===e:!1}function I(r,n){return typeof r=="string"||typeof r=="boolean"||r===void 0||r===null?o(r,n):n}export{t as CARD_IMAGE_BG_INHERIT,u as CARD_IMAGE_BG_OFF,c as CARD_IMAGE_BG_SWATCHES,g as CARD_IMAGE_BG_SWATCH_NAMES,e as THEME_CARD_IMAGE_BG,f as cardImageBackgroundChoice,s as cardImageBackgroundPaints,_ as isCardImageBackgroundInheriting,I as parseCardImageBackground,p as resolveBoundCardImageBackground,o as resolveCardImageBackground};
|
|
@@ -4,4 +4,5 @@ export declare const THEME_SECTION_BG = "var(--section-bg)";
|
|
|
4
4
|
export declare const SECTION_BG_INHERIT: "inherit";
|
|
5
5
|
export type SectionBackground = string | undefined;
|
|
6
6
|
export declare function resolveSectionBackground(stored: SectionBackground, builtIn: SectionBackground): SectionBackground;
|
|
7
|
+
export declare function paintedFill(stored: string): string;
|
|
7
8
|
export declare function isSectionBackgroundInheriting(stored: SectionBackground, builtIn: SectionBackground): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const i=["transparent","var(--section-bg)","var(--surface)","var(--surface-2)"],o={transparent:"No fill","var(--section-bg)":"Section band","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},e="var(--section-bg)",t="inherit";function s(r,n){return r===t?e:r===void 0?n:c(r)}const a=/var\(\s*--(surface-2|surface|line)\s*(?=[,)])/g;function c(r){return r.replace(a,"var(--site-$1")}function u(r,n){return r===t?!0:r===void 0&&n===e}export{t as SECTION_BG_INHERIT,i as SECTION_BG_SWATCHES,o as SECTION_BG_SWATCH_NAMES,e as THEME_SECTION_BG,u as isSectionBackgroundInheriting,c as paintedFill,s as resolveSectionBackground};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as r,jsxs as y,Fragment as E}from"react/jsx-runtime";import{cloneElement as qe,useId as Je,useRef as q,useState as ue}from"react";import{useEasel as N}from"efficient-easel/easel";import{readHidable as de,hidableText as pe}from"./hidable.js";import{FOCAL_DEFAULT as fe}from"../image-focus.js";import{FOLD_FIELD_MARKER as J,LINK_FIELD_MARKER as me,MEDIA_FIELD_MARKER as he,SCAFFOLD_FIELD_MARKER as ge,TEXT_FIELD_MARKER as T,foldMetaOf as Z,textFieldIdentifier as Ze}from"./field-markers.js";import Qe from"../../components/ApplyCornersToSiblings.js";import{CARD_IMAGE_RADIUS_STEP as et,CORNER_RADIUS_MAX as W,CORNER_RADIUS_MIN as B}from"../content/card-image-shape.js";import{IMAGE_CORNER_STEP as tt,IMAGE_CORNERS_LABEL as nt}from"../content/image-corners.js";import{GRID_MAX_COLUMNS as ot}from"../content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as rt,GALLERY_LAYOUTS as A,GALLERY_LAYOUT_KEYS as be}from"../content/gallery-layout.js";import{anchorSiblingsOf as it,HERO_GROUP_PLACEMENTS as lt,HERO_GROUP_PLACEMENT_DEFAULT as at,normalisePlacement as st,placementPoints as xe}from"../hero-group-placement.js";import ct from"../../components/KeepHint.js";import{AlignLeftIcon as ut,AlignSeparateIcon as dt,AnimationIcon as Ce,BackgroundIcon as pt,BlockSectionIcon as ft,CartIcon as mt,ColumnWidthsIcon as Se,ColumnsIcon as ht,CornerIcon as Ie,DirectionDownIcon as gt,DirectionLeftIcon as bt,DirectionRightIcon as xt,DirectionUpIcon as Ct,DollarIcon as St,FinishIcon as It,GapIcon as _e,GridIcon as _t,GroundIcon as yt,HashIcon as ye,ImageIcon as Et,LayoutIcon as Tt,ListIcon as Rt,LocationIcon as Q,PaddingBottomIcon as Lt,PaddingLeftIcon as vt,PaddingRightIcon as Ot,PaddingTopIcon as Nt,PageIcon as Ee,PhoneIcon as At,PlacementIcon as Ft,ProductSizeIcon as Pt,RotateIcon as wt,SquareIcon as kt,StylesIcon as Dt,TextLinesIcon as Ht,TypeIcon as Bt,WidthIcon as Gt,WrapIcon as Mt}from"efficient-easel/icons";import{FieldGlyph as Te}from"../../components/FieldGlyph.js";import{resolvePageBackground as $t}from"../content/page-background.js";import{CORNER_SIDES as F,CORNER_SIDE_POINTS as ee,CORNER_SIDES_LABEL as P,cornerSidesSummary as Re,hasOwnSectionCorners as Wt,normalizeCornerSides as U}from"../content/section-corners.js";import{hasOwnCardCorners as Ut}from"../content/card-corners.js";import{SECTION_MOTION_NONE as Kt,SECTION_MOTION_OPTIONS as Xt}from"../content/section-animation.js";import{enclosingSectionProps as Le}from"./enclosing-section.js";import{SettingsCorners as ve,SettingsDefaultReset as g,SettingsField as m,SettingsGroupHead as zt,SettingsGroupSub as Vt,SettingsPlacement as Yt,SettingsSegmented as jt,SettingsSwitch as qt}from"efficient-easel/panel";import{FieldSelect as Jt,ListField as Zt}from"efficient-easel/fields";import{Checkbox as Qt,Slider as en,Tooltip as K}from"efficient-shell/ui";import{ColourControl as Oe}from"./ColourControl.js";import Ne from"./MarkupToolbar.js";import{deviceField as R}from"./device-fields.js";import{noControlField as tn}from"./panel-no-control-mark.js";import{phoneKey as X,resolvePhoneValue as te}from"./phone-override.js";import{SuppressibleText as nn}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as on,CARD_OUTLINE_OPTIONS as rn,DEFAULT_CARD_INDEX_FORMAT as ln,DEFAULT_CARD_OUTLINE as an}from"../sections/product-card-style.js";import{COVER_INDEX_OPTIONS as sn,DEFAULT_COVER_INDEX as cn}from"../sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as un}from"./text-control-kinds.js";import dn from"../../components/ImageFocusRow.js";import pn from"../../components/MediaUploadField.js";import fn from"../../components/MultiSelectField.js";import mn from"../../components/SectionThemePicker.js";import hn from"../../components/SearchSelectField.js";import gn from"../../components/StorefrontLinkField.js";import Ae from"../../components/UiIcon.js";import{SECTION_PADDING as S}from"../content/section-padding.js";import{hasPhoneHeight as bn,resolveSectionMinHeight as xn}from"../content/section-min-height.js";import{VIEW_TIER_LABEL as ne}from"../content/view-tiers.js";import{SECTION_MIN_HEIGHT as Cn,SECTION_MIN_HEIGHT_GROUP_LABEL as G,SECTION_SCREEN_PCT as Sn}from"../content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as In,containerDirectionPoints as _n,resolveContainerDirection as Fe}from"../content/container-direction.js";import{BOX_ALIGN_POINTS as yn,BOX_BLOCK_SPACING_LABEL as En,BOX_BLOCK_SPACING_POINTS as Pe,BOX_JUSTIFY_POINTS as we,BOX_PHONE_ROW_LABEL as Tn,BOX_PHONE_ROW_MAX as Rn,BOX_PHONE_ROW_MIN as ke,BOX_SHARE_LABEL as De,BOX_SHARE_POINTS as oe,BOX_WRAP_LABEL as Ln,BOX_WRAP_POINTS as He}from"../content/box-layout.js";import{usePreviewHeader as z}from"../../components/PreviewHeaderContext.js";import{CONTAINER_GAP as re,CONTAINER_GAP_BUILT_IN as vn,GAP_FIELD_CONTAINER as On,hasOwnContainerGap as Nn,resolveContainerGap as An}from"../content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as Fn,CARD_IMAGE_BG_OFF as Pn,CARD_IMAGE_BG_SWATCH_NAMES as wn,CARD_IMAGE_BG_SWATCHES as kn,isCardImageBackgroundInheriting as Dn,resolveCardImageBackground as Hn,THEME_CARD_IMAGE_BG as Bn}from"../content/card-image-background.js";import{SECTION_BG_INHERIT as Gn,SECTION_BG_SWATCHES as Mn,SECTION_BG_SWATCH_NAMES as $n,THEME_SECTION_BG as Wn,isSectionBackgroundInheriting as Un}from"../content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Kn}from"../content/section-surface.js";import{TYPE_SIZE_FIXED as Xn,TYPE_SIZE_INHERIT as zn,isTypeSizeInheriting as Vn}from"../content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Yn,WIDTH_CHOICE_LABEL as jn,WIDTH_INHERIT as qn,resolveWidth as Jn,sectionRunsFullWidth as Be}from"../content/section-width.js";import{useFoldHeadingLevel as Ge}from"./panel-heading-scope.js";import{withStyleKind as Zn}from"efficient-easel/style-clipboard";function M(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!Z(n)&&Zn(n,`section:${t}`);return e}function Yr({children:e}){return r("div",{className:"sf-field-label",children:e})}function Me(){return null}function Qn(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return r(Me,{},e)}function eo(e){return e.type===Me}function V(e){return eo(e)?void 0:e}function w(e,t){return`${e} from ${t}`}function to(){const{appState:e}=N(i=>i),t=e.data.root?.props??{},{mode:n,pageWidth:o}=Jn(t,"full");return w(n==="page"?`${o}px`:n==="contained"?"Contained":"Full","the page")}function no(){const{blockGap:e}=z();return e===null?"this container's own spacing":w(`${e}px`,"Site styles")}function oo({inherited:e,onReset:t,label:n}){return r(g,{label:n,changed:!e,detail:no(),onReset:t})}function ro({inherited:e,onReset:t,label:n}){return r(g,{label:n,changed:!e,detail:to(),onReset:t})}function k({value:e,onChange:t,label:n,placeholder:o,hint:i,multiline:l,hideable:a=!0,markup:s=!0}){const{text:c,hidden:d}=de(e),f=q(null),u=q(null),p=_=>t(a?{text:_,hidden:d}:_),h=()=>t({text:c,hidden:!d}),b=a&&d,I=Je(),x=i?co(i)?r("span",{className:"sf-hint-keep sf-hint-while-typing",children:i}):r(ct,{children:i}):void 0;return r(m,{label:n,icon:r(Bt,{}),htmlFor:I,className:b?"is-hidden":void 0,hint:x,action:a?r(K,{content:d?`Show ${n} on the slide`:`Hide ${n} on the slide`,children:r("button",{type:"button",className:"sf-field-eye","aria-pressed":d,"aria-label":d?`Show ${n} on the slide`:`Hide ${n} on the slide`,onClick:h,children:d?r(Ae,{name:"eye-off",size:14}):r(Ae,{name:"eye",size:14})})}):void 0,children:y("div",{className:"sf-copybox",children:[s&&r(Ne,{target:l?u:f,value:c,onChange:p}),l?r("textarea",{id:I,ref:u,value:c,placeholder:o,onChange:_=>p(_.target.value)}):r("input",{id:I,ref:f,type:"text",value:c,placeholder:o,onChange:_=>p(_.target.value)})]})})}function jr(e,t){return{...e,[ge]:t}}function qr(e){const t=e[T];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[T]:{...t,offPage:!0}}}function Jr(e){return!e||typeof e!="object"?!1:e[T]?.offPage===!0}function Zr(e){const t=e[T];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[T]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as tl,SCALAR_TEXT_CONTROLS as nl}from"./text-control-kinds.js";const io=new Set(un),D=(e,t)=>{const n={...t,[T]:e};if(!io.has(e.control))return n;const o=t.render;return{...tn(n,"authored-copy"),render:i=>r(nn,{name:i.name,children:o(i)})}},Qr="Everything else on this block comes from the linked post. Unlink it to edit by hand.",lo="Select a word, then press the highlighter.",ao="A short name so a link can jump straight to this section, like yoursite.com/page#about.",so=new Set([lo]),co=e=>so.has(e);function ei(e,t,n){return D({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(k,{value:o,onChange:i,label:e,placeholder:t,hint:n})})}function ti(e,t,n){return D({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(k,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0})})}function uo(e,t,n){return D({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(k,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function ni(e,t,n){return D({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(k,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1})})}function oi(e){return{type:"custom",[me]:{label:e},render:({value:t,onChange:n})=>r(gn,{value:pe(t),onChange:n,label:e})}}function ri(e,t,n){return D({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(k,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const ii={Content:Ht,Style:Dt,Layout:Tt,Animation:Ce};function li(e,t){return e.includes("Content")?t!=="Content":null}function po({label:e}){return r(zt,{title:e,level:Ge(1)})}function fo({level:e,label:t}){return e===1?r(po,{label:t}):r(ho,{label:t})}function $e(e,t){return{type:"custom",[J]:{label:e,level:t},render:()=>r(fo,{level:t,label:e})}}function C(e){return $e(e,2)}function ai(e){return{type:"custom",render:()=>r(mo,{text:e})}}function mo({text:e}){return r("p",{className:"sf-note",children:e})}function si(e){return $e(e,1)}function ci(e){return Z(e)!==null&&e?.tabs!==void 0}const We=new Map;function ui(e,t){const n=`${e}\0${t?t.join(""):""}`,o=We.get(n)??{type:"custom",tabs:t,[J]:{label:e,level:1},bucket:e,marker:!0,render:()=>r(E,{})};return We.set(n,o),o}function ho({label:e}){return r(Vt,{title:e,level:Ge(2)})}function Ue({swatches:e,current:t,onPick:n,names:o}){const i=e.find(a=>a.toLowerCase()===t.toLowerCase()),l=(i?o?.[i]:void 0)??t;return y("div",{className:"sf-swatches",children:[e.map(a=>{const s=o?.[a]??a;return r(K,{content:s,children:r("button",{type:"button","aria-pressed":t.toLowerCase()===a.toLowerCase(),className:`sf-swatch ${t.toLowerCase()===a.toLowerCase()?"is-active":""}`,style:{background:a},onClick:()=>n(a),"aria-label":s})},a)}),r("span",{className:"sf-swatch-hex",children:l})]})}function di(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=Un(n,t);return r(m,{label:e,icon:r(pt,{}),changed:!i,action:r(g,{label:e,changed:!i,detail:"the theme's section background",onReset:()=>o(Gn)}),children:Ue({swatches:Mn,current:i?Wn:n??t??"",onPick:o,names:$n})})}}}function go(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=n,l=Dn(i,t);return r(m,{label:e,icon:r(yt,{}),changed:!l,action:r(g,{label:e,changed:!l,detail:"the theme's image stage",onReset:()=>o(Fn)}),children:Ue({swatches:kn,current:l?Bn:Hn(i,t),onPick:o,names:wn})})}}}function pi(e=n=>n,t){return M({_gSectionTheme:C(Kn),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>r(mn,{value:e(n),onChange:o,followLabel:t})}})}function v({min:e,max:t,step:n,value:o,onChange:i,suffix:l="",readout:a=!0,notch:s,ariaLabel:c,disabled:d=!1}){const f=s!==void 0&&Number.isFinite(s)&&s>=e&&s<=t;return r("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(s-e)/(t-e)}:void 0,children:r(en,{min:e,max:t,step:n,value:o,suffix:l||void 0,showInput:a,label:c,disabled:d,size:"sm",className:"sf-slider-track",onChange:u=>{u!==null&&u!==o&&i(u)}})})}function H(e,t,n,o,i,l,a="",s){return{type:"custom",render:c=>r(m,{label:e,icon:V(t),action:s?s("storedValue"in c?c.storedValue:c.value,c.onChange):void 0,children:v({min:n,max:o,step:i,value:typeof c.value=="number"?c.value:l,suffix:a,ariaLabel:e,onChange:c.onChange})})}}function Ke({min:e,max:t,step:n,px:o,label:i,onChange:l,disabled:a=!1}){const{cornerRadiusPx:s}=z();return r(E,{children:v({min:e,max:t,step:n,value:o??(typeof s=="number"?s:e),readout:!1,ariaLabel:i,disabled:a,onChange:l})})}function $(e,t){const{min:n,max:o,step:i=1,unsetLabel:l,hint:a,restAtSite:s=!1,restTrack:c,unsetMark:d}=t;return{type:"custom",render:({value:f,onChange:u})=>{const p=typeof f=="number"?f:null,h=p===null;return r(m,{label:e,value:h?d?void 0:l:`${p}px`,changed:!h,action:d?qe(d,{changed:!h,onReset:()=>u(null)}):r(g,{label:e,changed:!h,onReset:()=>u(null)}),hint:a,children:c?c({min:n,max:o,step:i,px:p,label:e,onChange:u}):s?r(Ke,{min:n,max:o,step:i,px:p,label:e,onChange:u}):v({min:n,max:o,step:i,value:p??n,readout:!1,ariaLabel:e,onChange:u})})}}}function fi(e){const t=H("Gap",r(_e,{}),re.min,re.max,re.step,vn[e],"px",(n,o)=>r(oo,{inherited:!Nn(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[On]:e,render:n=>t.render({...n,value:An(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}function bo(){return{type:"custom",render:({value:e,onChange:t})=>{const o=U(e)??[...F],i=o.length===F.length;return r(m,{label:P,icon:r(Ie,{}),value:Re(o),changed:!i,action:r(g,{label:P,changed:!i,onReset:()=>t(null)}),hint:"Corners left off stay square. The row above sets how round the others are.",children:r(_o,{value:o,onChange:l=>{const a=U(l)??[];t(a.length===F.length?null:a)}})})}}}function xo({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=z(),i=typeof o=="number"?`${o}px`:"not set";return r(g,{label:e,changed:t,detail:o==null?"the built-in corners":w(i,"Site styles"),onReset:n})}function Co(){return $("Corners",{min:B,max:W,unsetLabel:"Follows the site",unsetMark:r(xo,{label:"Corners"}),restTrack:e=>r(So,{...e}),hint:r(Io,{})})}const Xe="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function ie(){return Be(Y())}function So(e){return r(Ke,{...e,disabled:ie()})}function Io(){return r(E,{children:ie()?Xe:"Follows Site styles ▸ Basics ▸ Corners until you set a number here."})}function _o({value:e,onChange:t}){const n=ie();return r(ve,{label:P,value:e,corners:n?ee.map(o=>({...o,disabled:!0,title:Xe})):ee,onChange:t})}function mi(){return M({_gShape:C("Shape"),sectionCorners:Co(),sectionCornerSides:bo()})}function hi(){return{_gMotion:C("Motion"),sectionAnimation:ce("Entrance",r(Ce,{}),[...Xt],Kt)}}function le(){let e=null;try{const{appState:t,selectedItem:n}=N(i=>i),o=n?.props?.id?String(n.props.id):void 0;e=o?Le(t?.data,o):null}catch{e=null}return e!==null&&Be(e)}function ze(e){const{cornerRadiusPx:t}=z(),n=le(),o=typeof t=="number"?t:e;let i=null;try{const{appState:a,selectedItem:s}=N(d=>d),c=s?.props?.id?String(s.props.id):void 0;i=c?Le(a?.data,c):null}catch{i=null}if(n||!i)return o;const l=i.sectionCorners;return Wt(l)?l:o}function yo({min:e,max:t,step:n,px:o,label:i,onChange:l}){const a=ze(e);return r(E,{children:v({min:e,max:t,step:n,value:o??a,readout:!1,ariaLabel:i,onChange:l})})}function Eo({label:e,changed:t=!1,onReset:n=()=>{}}){const o=le(),i=ze(B),l=o?"Site":"Section";return r(g,{label:e,changed:t,detail:w(`${i}px`,o?"Site styles":"the section"),onReset:n})}function To(){return r(E,{children:le()?"The section is full width, so this card follows Site styles ▸ Basics ▸ Corners.":"Follows the section's Corners until you set a number here."})}function Ro(){return $("Corners",{min:B,max:W,unsetLabel:"Follows the section",unsetMark:r(Eo,{label:"Corners"}),restTrack:e=>r(yo,{...e}),hint:r(To,{})})}function Lo({value:e,onChange:t}){return r(ve,{label:P,value:e,corners:ee,onChange:t})}function vo({unset:e}){return r(E,{children:e?"Set a number above first — there is nothing to shape yet.":"Corners left off stay square. The row above sets how round the others are."})}function Oo(){return{type:"custom",render:({value:e,onChange:t})=>{const o=U(e)??[...F],i=o.length===F.length;return r(m,{label:P,icon:r(Ie,{}),value:Re(o),changed:!i,action:r(g,{label:P,changed:!i,onReset:()=>t(null)}),hint:r(vo,{unset:!Ut(e)}),children:r(Lo,{value:o,onChange:l=>{const a=U(l)??[];t(a.length===F.length?null:a)}})})}}}function No(){return{type:"custom",render:()=>r(Qe,{})}}function gi(){return{_gShape:C("Shape"),cardCorners:Ro(),cardCornerSides:Oo(),cardCornersApplyAll:No()}}function bi(){return L("Justify",r(dt,{}),we,we[0].value)}function xi(){return L("Item alignment",r(ut,{}),yn,"stretch")}function Ci(){return L(Ln,r(Mt,{}),He,He[0].value)}function Si(){return{type:"custom",render:({value:e,onChange:t})=>{const n=oe.find(o=>o.value===e)??oe[0];return r(m,{label:De,icon:r(Se,{}),value:n.label,children:r("div",{className:"sf-gallery-layouts",role:"group","aria-label":De,children:oe.map(o=>r(K,{content:o.label,className:"sf-tile-tip",children:r("button",{type:"button","aria-pressed":n.value===o.value,"aria-label":o.label,onClick:()=>t(o.value),children:r("span",{className:"sf-gallery-pic",children:Ao(o.weights).map((i,l)=>r("i",{style:{gridColumn:`span ${i}`}},l))})})},o.value))})})}}}function Ao(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function Ii(){return L(En,r(_e,{}),Pe,Pe[0].value)}function _i(){return H(Tn,r(At,{}),ke,Rn,1,ke)}function yi(e){const t=ce(In,Qn("`Direction` names how a container's children run — a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; editor-shell's own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),_n(e),Fe(e,void 0));return{type:"custom",render:n=>t.render({...n,value:Fe(e,n.value),onChange:o=>n.onChange(o)})}}function Ei(e,t,n,o,i,l){return{type:"custom",render:({value:a,onChange:s})=>r(m,{label:e,icon:r(Te,{noun:l}),action:r(g,{label:e,changed:!Vn(a),detail:"the Text style in Site styles",onReset:()=>s(zn),defaultAction:{onPress:()=>s(Xn),title:"Keep this section's own built-in size",icon:r(ft,{})}}),children:v({min:t,max:n,step:o,value:typeof a=="number"?a:i,suffix:"px",ariaLabel:e,onChange:s})})}}function Ti(){return{_gCellWidth:C("Cell width"),gridSpan:L("Positions",r(Se,{}),[{label:"Auto",value:""},...Array.from({length:ot},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function Y(){let e=null;try{e=N(t=>t).selectedItem}catch{e=null}return e?.props??{}}function Fo({min:e,max:t,step:n,px:o,label:i,onChange:l,desktopKey:a,fallback:s}){const c=Y()[a],d=te(void 0,c,s);return r(E,{children:v({min:e,max:t,step:n,value:te(o,c,s),readout:!1,ariaLabel:i,notch:d,onChange:l})})}function Po({label:e,desktopKey:t,fallback:n,changed:o=!1,onReset:i=()=>{}}){const l=Y()[t],a=te(void 0,l,n);return r(g,{label:e,changed:o,detail:`${a}px on ${ne.desktop.toLowerCase()}`,onReset:i})}function wo(e){return $(e.label,{min:e.min,max:e.max,step:e.step,unsetLabel:`Follows ${ne.desktop}`,unsetMark:r(Po,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>r(Fo,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}function Ri(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,i=x=>o?x:`Padding ${x.toLowerCase()}`,l=x=>H(i("Top"),r(Nt,{}),S.min,S.max,S.step,x,"px"),a=(x,_,je,j=S)=>R("mobile",wo({label:i(x),desktopKey:_,min:j.min,max:j.max,step:j.step,fallback:je})),s=e.top??S.min,c=e.bottom??S.min,d="sectionPaddingLeft",f="sectionPaddingRight",u=e.sideBounds??S,p=e.side??u.min,h=e.sidePhone??p,b=e.phone===!0,I=x=>b?R("desktop",x):x;return M({...o?{_gSpacing:C("Padding")}:{},[t]:I(l(s)),...b?{[X(t)]:a("Top",t,s)}:{},...e.only==="top"?{}:{[n]:I(H(i("Bottom"),r(Lt,{}),S.min,S.max,S.step,c,"px")),...b?{[X(n)]:a("Bottom",n,c)}:{}},...e.sides?{[d]:I(H(i("Left"),r(vt,{}),u.min,u.max,u.step,p,"px")),...b?{[X(d)]:a("Left",d,h,u)}:{},[f]:I(H(i("Right"),r(Ot,{}),u.min,u.max,u.step,p,"px")),...b?{[X(f)]:a("Right",f,h,u)}:{}}:{}})}const ko={contained:"Contained",page:"Page",full:"Full"},ae="Width";function Li(e,t=Yn,n=!0){const o=t.map(i=>({label:jn[i]??ko[i],value:i}));return M({...n?{_gWidth:C(ae)}:{},widthMode:{type:"custom",render:({onChange:i,field:l})=>r(m,{label:"Width",icon:r(Gt,{}),action:n?r(ro,{inherited:l?.inherited??!1,onReset:()=>i(qn),label:ae}):void 0,children:se({options:o,value:l?.currentValue||e,onChange:i,ariaLabel:ae})})}})}function vi(){const e=o=>({type:"custom",render:({value:i,onChange:l})=>y("div",{className:"sf-field",children:[o?y("div",{className:"sf-field-head",children:[r("span",{className:"sf-field-label sf-field-label--inline",children:G}),o(l)]}):null,r("div",{children:se({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(i)?i:"auto",onChange:l,ariaLabel:G})})]})}),t=()=>({type:"custom",render:({value:o,onChange:i,field:l})=>{const a=l?.unit==="%"?"%":"px",s=a==="%"?Sn:Cn;return r("div",{className:"sf-field",children:v({min:s.min,max:s.max,step:s.step,value:typeof o=="number"?o:s.fallback,suffix:a,ariaLabel:G,onChange:i})})}}),n=()=>ce("Unit",r(ye,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return M({_gHeight:C(G),sectionHeightMode:R("desktop",e()),sectionHeightValue:R("desktop",t()),sectionHeightUnit:R("desktop",n()),sectionHeightModePhone:R("mobile",e(o=>r(Do,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:R("mobile",t()),sectionHeightUnitPhone:R("mobile",n())})}function Do({onClear:e}){const t=Y(),n=bn(t),o=xn(t),i=`${o.mode==="auto"?"Auto":`${o.value}${o.unit}`} on ${ne.desktop.toLowerCase()}`;return r(g,{label:G,changed:n,detail:i,onReset:e})}function Oi(){return{_gAnchor:C("Anchor"),anchor:uo("Anchor name","e.g. about",ao)}}function O(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:l,name:a})=>{const s=typeof o=="boolean"?o:t,c=`${l??a??e}-label`;return r(m,{label:e,labelId:c,icon:n,action:r(qt,{checked:s,onChange:i,ariaLabelledBy:c})})}}}function Ni(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const i=`${String(n??o??"pageBackground")}-colour`;return r(m,{label:"Background",icon:r(Ee,{}),htmlFor:i,action:r(Oe,{id:i,label:"Background",value:$t(e),onChange:t})})}}}function Ai(e,t){return{type:"custom",render:({value:n,onChange:o,id:i})=>{const l=typeof n=="boolean"?n:t,a=`${i??e}-checkbox`;return r(m,{label:e,htmlFor:a,className:"sf-checkbox",action:r(Qt,{id:a,checked:l,onChange:o})})}}}function Fi(e,t){return{type:"custom",render:({value:n,onChange:o})=>r(m,{label:e,action:Oe({value:n||t,onChange:o,label:e})})}}const Ho=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function Ve({label:e,value:t,onChange:n,points:o=Ho}){return r(Yt,{label:e,value:t,points:o,onChange:n})}function Pi(e,t=fe,n="mediaImage"){return{type:"custom",render:({value:o,onChange:i})=>r("div",{className:"sf-focal-row",children:r(Bo,{label:e,value:o||t,onChange:i,imageProp:n})})}}function Bo({label:e,value:t,onChange:n,imageProp:o}){const{selectedItem:i}=N(a=>a),l=i?.props?.[o];return r(dn,{label:e,value:t,onChange:n,image:typeof l=="string"?l:void 0})}const Go=xe([]);function wi(e,{stacking:t,fallback:n=at}){return{type:"custom",render:({value:o,onChange:i})=>{const l=lt.includes(o)?o:n;return t?r(Mo,{label:e,value:l,onChange:i}):Ye({label:e,value:l,onChange:i,points:Go})}}}function Mo({label:e,value:t,onChange:n}){const{appState:o,selectedItem:i}=N(s=>s),l=i?.props?.id?String(i.props.id):void 0,a=l?it(o?.data,l):[];return Ye({label:e,value:t,onChange:n,points:xe(a,l)})}function Ye({label:e,value:t,onChange:n,points:o}){const i=o.find(l=>l.disabled);return r(m,{label:e,icon:r(Ft,{}),hint:i?i.title:void 0,children:Ve({label:e,value:st(t),onChange:n,points:o})})}const ki={top:r(Ct,{}),right:r(xt,{}),bottom:r(gt,{}),left:r(bt,{})};function Di(e,t,n,o,i,l){const a=f=>t.find(u=>u.value===f),s=f=>({value:f,label:"",disabled:!0,title:o}),c=f=>{const u=t.find(h=>h.cell===f);if(!u)return s(`missing-${f}`);const p=l?.[f];return p?{value:u.value,label:u.label,icon:p}:{value:u.value,label:u.label}},d=[s("corner-top-left"),c("top"),s("corner-top-right"),c("left"),s("centre"),c("right"),s("corner-bottom-left"),c("bottom"),s("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:u})=>{const p=t.some(h=>h.value===f)?f:n;return r(m,{label:e,icon:i,value:a(p)?.label??"",children:Ve({label:e,value:p,onChange:u,points:d})})}}}const $o="\0note";function L(e,t,n,o,i){return{type:"custom",options:n,fallback:o,...i?{note:i}:{},render:({value:l,onChange:a,field:s})=>{const c=s.options??n,d=s.fallback??o,f=c.some(u=>u.value===l)?l:d;return r(m,{label:e,icon:V(t),children:r(Jt,{value:f,ariaLabel:e,onChange:a,options:[...i?[{label:i,value:$o,disabled:!0}]:[],...c.map(u=>({label:u.label,value:u.value}))]})})}}}function Hi(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:i,field:l})=>r(fn,{label:e,options:l.options??t,value:Array.isArray(o)?o:[],onChange:i,...n?{emptyLabel:n}:{}})}}function Bi(e,t,n,o){return{type:"custom",options:t,fallback:n,render:({value:i,onChange:l,field:a})=>r(hn,{label:e,options:a.options??t,fallback:a.fallback??n,value:i,onChange:l,placeholder:o})}}function Gi(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const i={value:n,onChange:o,...t};return r(e,{...i})}}}function se({options:e,value:t,onChange:n,ariaLabel:o,disabled:i=!1}){return r(jt,{options:e.map(l=>({id:l.value,label:l.label,title:l.title})),value:t,onChange:n,ariaLabel:o,disabled:i})}const Mi=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function ce(e,t,n,o){const i=n.map(l=>typeof l=="string"?{label:l,value:l}:l);return{type:"custom",render:({value:l,onChange:a,field:s})=>r(m,{label:e,icon:V(t),children:se({options:i,value:i.some(c=>c.value===l)?l:l||s?.currentValue||o,onChange:a,ariaLabel:e})})}}function $i(e,t,n){return{type:"custom",[he]:!0,render:({value:o,onChange:i})=>r(pn,{value:o||"",onChange:i,label:e,accept:t,placeholder:n})}}const Wi={HeroSingle:["imageFocal"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Ui({value:e,onChange:t,label:n}){const o=e||{},i=!!o.pending,l=i?"var(--fg-dim, #888)":o.ok?"#1d9e75":"#d85a30",a=(s,c)=>t({...o,[s]:c===""?void 0:Number(c)});return y(m,{label:n,icon:r(Q,{}),children:[r("button",{type:"button",disabled:i,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"8px 10px",fontSize:13,cursor:i?"default":"pointer",opacity:i?.6:1,border:"1px solid var(--border-strong, #ccc)",borderRadius:6,background:"transparent",color:"inherit"},children:i?"Finding…":"Find coordinates"}),o.status&&r("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:l},children:o.status}),r("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:"Coordinates from OpenStreetMap"}),r("button",{type:"button",onClick:()=>t({...o,manual:!o.manual}),style:{marginTop:8,padding:0,border:"none",background:"none",font:"inherit",fontSize:12,color:"var(--sf-accent, #2563eb)",cursor:"pointer",textDecoration:"underline"},children:o.manual?"Hide manual coordinates":"Enter coordinates manually"}),o.manual&&y("div",{style:{marginTop:8,display:"grid",gap:8},children:[r(m,{label:"Latitude",icon:r(Q,{}),children:r("input",{type:"number",step:"any",placeholder:"e.g. 34.0990198",value:typeof o.lat=="number"?o.lat:"",onChange:s=>a("lat",s.target.value)})}),r(m,{label:"Longitude",icon:r(Q,{}),children:r("input",{type:"number",step:"any",placeholder:"e.g. -117.9842833",value:typeof o.lng=="number"?o.lng:"",onChange:s=>a("lng",s.target.value)})})]})]})}function Wo(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Uo(e,t,n){const o=e.map(i=>({text:i?.text??""}));return t===null||t<0||t>=e.length?o:o.map((i,l)=>l===t?{text:n}:i)}function Ki(e,t){return e===null?null:t>e?e:null}function Ko(e,t,n){if(n===null||n>=t.length)return null;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return null;return e[n]!==t[n]&&t.includes(e[n])||e[n]!==t[n]&&t.length!==e.length?null:n}const Xi={label:"Ticker items",icon:r(Rt,{})};function zi(e,t,n,o){return{type:"custom",[T]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},render:({value:i,onChange:l})=>r(Xo,{label:e,icon:V(t),items:Array.isArray(i)?i:[],placeholder:n,onChange:l,markup:o==="markup"})}}function Xo({label:e,icon:t,items:n,placeholder:o,onChange:i,markup:l=!1}){const a=q(null),[s,c]=ue(null),d=u=>u.map(p=>({text:p?.text??""}));return r(Zt,{label:e,icon:t,noun:"item",items:n,onChange:u=>{const p=Ko(n,u,s);p===null&&(a.current=null),c(p),i(d(u))},newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:l?r(Ne,{target:a,value:Wo(n,s),onChange:u=>i(Uo(n,s??-1,u)),disabled:s===null,label:s===null?"Formatting — click a row first":`Formatting — row ${s+1}`}):void 0,renderRow:(u,p,h)=>r("input",{type:"text",className:l&&s===p?"sf-list-marking":void 0,value:u?.text??"",placeholder:o,"aria-label":`${e} ${p+1}`,onChange:b=>h({text:b.target.value}),onFocus:b=>{a.current=b.currentTarget,c(p)}})})}function Vi(e,t){const n=`${e.label} — row ${t+1}`;return D({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:i})=>r(k,{value:o,onChange:i,label:n,placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function Yi(e){return{_gCards:C("Cards"),coverIndex:L("Cover image",r(Et,{}),sn,String(cn),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:go("Image background",Pn),cardImage:zo(),spinOnHover:O("Rotate on hover",e?.spinDefault??!0,r(wt,{}))}}function ji(){return{outline:L("Card outline",r(kt,{}),rn,an),indexBadge:L("Card number",r(ye,{}),on,ln),showBadge:O("Product badge",!0,r(Te,{noun:"tag"}))}}function qi(e){const t=e?.bottomDefault??!0;return{_gShowOnCard:C("Show on a card"),showCardPrice:O("Price",!0,r(St,{})),showCardFinishes:O("Finish swatches",!0,r(It,{})),showCardSizes:O("Sizes",t,r(Pt,{})),showCardBuy:O("Buy button",t,r(mt,{})),showCardPage:O("Page button",t,r(Ee,{}))}}function zo(){return $("Card image",{min:B,max:W,step:et,hint:"Rounds the picture. The card's own corner is in Site styles."})}function Ji(){return $(nt,{min:B,max:W,step:tt,unsetLabel:"Square",hint:"Rounds the picture. Left alone it stays square."})}function Zi(){return{type:"custom",render:({value:e,onChange:t})=>r(Vo,{value:typeof e=="string"?e:"",onChange:t})}}function Vo({value:e,onChange:t}){const[n,o]=ue(null),i=be.filter(a=>n===null||A[a].across===n),l=e&&e in A?A[e]:null;return y(E,{children:[r(m,{label:"Photos in a row",icon:r(ht,{}),children:y("div",{className:"sf-gallery-filter",children:[r("button",{type:"button","aria-pressed":n===null,onClick:()=>o(null),children:"All"}),rt.map(a=>r("button",{type:"button","aria-pressed":n===a,onClick:()=>o(a),children:a},a))]})}),r(m,{label:"Layout",icon:r(_t,{}),value:l?l.label:"Not chosen",hint:`${i.length} of ${be.length} layouts`,children:r("div",{className:"sf-gallery-layouts",children:i.map(a=>r(K,{content:A[a].label,className:"sf-tile-tip",children:r("button",{type:"button","aria-pressed":e===a,"aria-label":A[a].label,onClick:()=>t(e===a?"":a),children:r("span",{className:"sf-gallery-pic",children:A[a].desktop.map(([s,c],d)=>r("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${c}`}},d))})})},a))})})]})}export{ao as ANCHOR_HINT,Qr as BOUND_TO_POST_NOTE,ii as BUCKET_ICONS,Wi as CUSTOM_FIELD_MEDIA,Ui as CoordsField,ki as EDGE_ARROWS,fe as FOCAL_DEFAULT,Ho as FOCAL_POINTS,J as FOLD_FIELD_MARKER,Ve as FocalPicker,ho as GroupLabel,lo as HIGHLIGHT_HINT,k as HidableTextField,me as LINK_FIELD_MARKER,Yr as Label,he as MEDIA_FIELD_MARKER,Mi as MEDIA_TYPE_OPTIONS,mo as PanelNoteLine,Ye as PlacementGridView,ge as SCAFFOLD_FIELD_MARKER,nl as SCALAR_TEXT_CONTROLS,Xe as SECTION_BLEEDS_HINT,po as SectionHeading,se as Segmented,oo as SiteGapDefaultReset,v as Slider,Ue as Swatches,tl as TEXT_CONTROL_KINDS,T as TEXT_FIELD_MARKER,Xi as TICKER_ITEMS_ROW,Xo as TextListField,ro as WidthDefaultReset,Ko as aimAfterListChange,Oi as anchorFields,w as backTo,di as backgroundField,xi as boxAlignField,Ii as boxBlockSpacingField,bi as boxJustifyField,_i as boxPhoneRowField,Si as boxShareField,Ci as boxWrapField,ui as bucketHeader,Oo as cardCornerSidesField,Ro as cardCornersField,go as cardImageBackgroundField,zo as cardImageField,Yi as cardMediaFields,gi as cardShapeFields,qi as cardShowFields,ji as cardStyleFields,Ti as cellWidthFields,Ai as checkbox,Fi as colorInput,ni as copyText,yi as directionField,Di as edgePad,li as entriesHiddenForTab,Pi as focalPicker,Ki as focusAfterRemove,Z as foldMetaOf,Zi as galleryLayoutField,fi as gapField,C as group,vi as heightFields,pe as hidableText,co as hintIsWhileTyping,V as iconOf,Ji as imageCornersField,ci as isBucketHeader,eo as isNoGlyph,oi as linkField,Hi as multiSelect,Qn as noGlyph,Ni as pageBackgroundField,ai as panelNote,wo as phoneOverrideField,wi as placementField,uo as plainText,ri as plainTextarea,$ as pxField,de as readHidable,Wo as rowText,Bi as searchSelect,si as section,hi as sectionAnimationFields,bo as sectionCornerSidesField,Co as sectionCornersField,mi as sectionShapeFields,pi as sectionThemeFields,ce as segmented,L as select,Uo as setRowText,Ei as sizeField,H as slider,Gi as sourceField,Ri as spacingFields,ei as text,Ze as textFieldIdentifier,Jr as textFieldOffPage,zi as textList,Vi as textListRowField,ti as textarea,O as toggle,$i as upload,to as usePageWidthDetail,no as useSiteGapDetail,Li as widthField,Zr as withIdentifier,qr as withOffPage,jr as withScaffold};
|
|
1
|
+
"use client";import{jsx as r,jsxs as y,Fragment as E}from"react/jsx-runtime";import{cloneElement as qe,useId as Je,useRef as q,useState as ue}from"react";import{useEasel as N}from"efficient-easel/easel";import{readHidable as de,hidableText as pe}from"./hidable.js";import{FOCAL_DEFAULT as fe}from"../image-focus.js";import{FOLD_FIELD_MARKER as J,LINK_FIELD_MARKER as he,MEDIA_FIELD_MARKER as me,SCAFFOLD_FIELD_MARKER as ge,TEXT_FIELD_MARKER as T,foldMetaOf as Z,textFieldIdentifier as Ze}from"./field-markers.js";import Qe from"../../components/ApplyCornersToSiblings.js";import{CARD_IMAGE_RADIUS_STEP as et,CORNER_RADIUS_MAX as W,CORNER_RADIUS_MIN as B}from"../content/card-image-shape.js";import{IMAGE_CORNER_STEP as tt,IMAGE_CORNERS_LABEL as nt}from"../content/image-corners.js";import{GRID_MAX_COLUMNS as ot}from"../content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as rt,GALLERY_LAYOUTS as A,GALLERY_LAYOUT_KEYS as be}from"../content/gallery-layout.js";import{anchorSiblingsOf as it,HERO_GROUP_PLACEMENTS as lt,HERO_GROUP_PLACEMENT_DEFAULT as at,normalisePlacement as st,placementPoints as xe}from"../hero-group-placement.js";import ct from"../../components/KeepHint.js";import{AlignLeftIcon as ut,AlignSeparateIcon as dt,AnimationIcon as Ce,BackgroundIcon as pt,BlockSectionIcon as ft,CartIcon as ht,ColumnWidthsIcon as Se,ColumnsIcon as mt,CornerIcon as Ie,DirectionDownIcon as gt,DirectionLeftIcon as bt,DirectionRightIcon as xt,DirectionUpIcon as Ct,DollarIcon as St,FinishIcon as It,GapIcon as _e,GridIcon as _t,GroundIcon as yt,HashIcon as ye,ImageIcon as Et,LayoutIcon as Tt,ListIcon as Rt,LocationIcon as Q,PaddingBottomIcon as Lt,PaddingLeftIcon as vt,PaddingRightIcon as Ot,PaddingTopIcon as Nt,PageIcon as Ee,PhoneIcon as At,PlacementIcon as Ft,ProductSizeIcon as Pt,RotateIcon as wt,SquareIcon as kt,StylesIcon as Dt,TextLinesIcon as Ht,TypeIcon as Bt,WidthIcon as Gt,WrapIcon as Mt}from"efficient-easel/icons";import{FieldGlyph as Te}from"../../components/FieldGlyph.js";import{resolvePageBackground as $t}from"../content/page-background.js";import{CORNER_SIDES as F,CORNER_SIDE_POINTS as ee,CORNER_SIDES_LABEL as P,cornerSidesSummary as Re,hasOwnSectionCorners as Wt,normalizeCornerSides as U}from"../content/section-corners.js";import{hasOwnCardCorners as Ut}from"../content/card-corners.js";import{SECTION_MOTION_NONE as Kt,SECTION_MOTION_OPTIONS as Xt}from"../content/section-animation.js";import{enclosingSectionProps as Le}from"./enclosing-section.js";import{SettingsCorners as ve,SettingsDefaultReset as g,SettingsField as h,SettingsGroupHead as zt,SettingsGroupSub as Vt,SettingsPlacement as Yt,SettingsSegmented as jt,SettingsSwitch as qt}from"efficient-easel/panel";import{FieldSelect as Jt,ListField as Zt}from"efficient-easel/fields";import{Checkbox as Qt,Slider as en,Tooltip as K}from"efficient-shell/ui";import{ColourControl as Oe}from"./ColourControl.js";import Ne from"./MarkupToolbar.js";import{deviceField as R}from"./device-fields.js";import{noControlField as tn}from"./panel-no-control-mark.js";import{phoneKey as X,resolvePhoneValue as te}from"./phone-override.js";import{SuppressibleText as nn}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as on,CARD_OUTLINE_OPTIONS as rn,DEFAULT_CARD_INDEX_FORMAT as ln,DEFAULT_CARD_OUTLINE as an}from"../sections/product-card-style.js";import{COVER_INDEX_OPTIONS as sn,DEFAULT_COVER_INDEX as cn}from"../sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as un}from"./text-control-kinds.js";import dn from"../../components/ImageFocusRow.js";import pn from"../../components/MediaUploadField.js";import fn from"../../components/MultiSelectField.js";import hn from"../../components/SectionThemePicker.js";import mn from"../../components/SearchSelectField.js";import gn from"../../components/StorefrontLinkField.js";import Ae from"../../components/UiIcon.js";import{SECTION_PADDING as S}from"../content/section-padding.js";import{hasPhoneHeight as bn,resolveSectionMinHeight as xn}from"../content/section-min-height.js";import{VIEW_TIER_LABEL as ne}from"../content/view-tiers.js";import{SECTION_MIN_HEIGHT as Cn,SECTION_MIN_HEIGHT_GROUP_LABEL as G,SECTION_SCREEN_PCT as Sn}from"../content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as In,containerDirectionPoints as _n,resolveContainerDirection as Fe}from"../content/container-direction.js";import{BOX_ALIGN_POINTS as yn,BOX_BLOCK_SPACING_LABEL as En,BOX_BLOCK_SPACING_POINTS as Pe,BOX_JUSTIFY_POINTS as we,BOX_PHONE_ROW_LABEL as Tn,BOX_PHONE_ROW_MAX as Rn,BOX_PHONE_ROW_MIN as ke,BOX_SHARE_LABEL as De,BOX_SHARE_POINTS as oe,BOX_WRAP_LABEL as Ln,BOX_WRAP_POINTS as He}from"../content/box-layout.js";import{usePreviewHeader as z}from"../../components/PreviewHeaderContext.js";import{CONTAINER_GAP as re,CONTAINER_GAP_BUILT_IN as vn,GAP_FIELD_CONTAINER as On,hasOwnContainerGap as Nn,resolveContainerGap as An}from"../content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as Fn,CARD_IMAGE_BG_OFF as Pn,CARD_IMAGE_BG_SWATCH_NAMES as wn,CARD_IMAGE_BG_SWATCHES as kn,isCardImageBackgroundInheriting as Dn,cardImageBackgroundChoice as Hn,THEME_CARD_IMAGE_BG as Bn}from"../content/card-image-background.js";import{SECTION_BG_INHERIT as Gn,SECTION_BG_SWATCHES as Mn,SECTION_BG_SWATCH_NAMES as $n,THEME_SECTION_BG as Wn,isSectionBackgroundInheriting as Un}from"../content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Kn}from"../content/section-surface.js";import{TYPE_SIZE_FIXED as Xn,TYPE_SIZE_INHERIT as zn,isTypeSizeInheriting as Vn}from"../content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Yn,WIDTH_CHOICE_LABEL as jn,WIDTH_INHERIT as qn,resolveWidth as Jn,sectionRunsFullWidth as Be}from"../content/section-width.js";import{useFoldHeadingLevel as Ge}from"./panel-heading-scope.js";import{withStyleKind as Zn}from"efficient-easel/style-clipboard";function M(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!Z(n)&&Zn(n,`section:${t}`);return e}function Yr({children:e}){return r("div",{className:"sf-field-label",children:e})}function Me(){return null}function Qn(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return r(Me,{},e)}function eo(e){return e.type===Me}function V(e){return eo(e)?void 0:e}function w(e,t){return`${e} from ${t}`}function to(){const{appState:e}=N(i=>i),t=e.data.root?.props??{},{mode:n,pageWidth:o}=Jn(t,"full");return w(n==="page"?`${o}px`:n==="contained"?"Contained":"Full","the page")}function no(){const{blockGap:e}=z();return e===null?"this container's own spacing":w(`${e}px`,"Site styles")}function oo({inherited:e,onReset:t,label:n}){return r(g,{label:n,changed:!e,detail:no(),onReset:t})}function ro({inherited:e,onReset:t,label:n}){return r(g,{label:n,changed:!e,detail:to(),onReset:t})}function k({value:e,onChange:t,label:n,placeholder:o,hint:i,multiline:l,hideable:a=!0,markup:s=!0}){const{text:c,hidden:d}=de(e),f=q(null),u=q(null),p=_=>t(a?{text:_,hidden:d}:_),m=()=>t({text:c,hidden:!d}),b=a&&d,I=Je(),x=i?co(i)?r("span",{className:"sf-hint-keep sf-hint-while-typing",children:i}):r(ct,{children:i}):void 0;return r(h,{label:n,icon:r(Bt,{}),htmlFor:I,className:b?"is-hidden":void 0,hint:x,action:a?r(K,{content:d?`Show ${n} on the slide`:`Hide ${n} on the slide`,children:r("button",{type:"button",className:"sf-field-eye","aria-pressed":d,"aria-label":d?`Show ${n} on the slide`:`Hide ${n} on the slide`,onClick:m,children:d?r(Ae,{name:"eye-off",size:14}):r(Ae,{name:"eye",size:14})})}):void 0,children:y("div",{className:"sf-copybox",children:[s&&r(Ne,{target:l?u:f,value:c,onChange:p}),l?r("textarea",{id:I,ref:u,value:c,placeholder:o,onChange:_=>p(_.target.value)}):r("input",{id:I,ref:f,type:"text",value:c,placeholder:o,onChange:_=>p(_.target.value)})]})})}function jr(e,t){return{...e,[ge]:t}}function qr(e){const t=e[T];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[T]:{...t,offPage:!0}}}function Jr(e){return!e||typeof e!="object"?!1:e[T]?.offPage===!0}function Zr(e){const t=e[T];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[T]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as tl,SCALAR_TEXT_CONTROLS as nl}from"./text-control-kinds.js";const io=new Set(un),D=(e,t)=>{const n={...t,[T]:e};if(!io.has(e.control))return n;const o=t.render;return{...tn(n,"authored-copy"),render:i=>r(nn,{name:i.name,children:o(i)})}},Qr="Everything else on this block comes from the linked post. Unlink it to edit by hand.",lo="Select a word, then press the highlighter.",ao="A short name so a link can jump straight to this section, like yoursite.com/page#about.",so=new Set([lo]),co=e=>so.has(e);function ei(e,t,n){return D({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(k,{value:o,onChange:i,label:e,placeholder:t,hint:n})})}function ti(e,t,n){return D({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(k,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0})})}function uo(e,t,n){return D({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(k,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function ni(e,t,n){return D({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(k,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1})})}function oi(e){return{type:"custom",[he]:{label:e},render:({value:t,onChange:n})=>r(gn,{value:pe(t),onChange:n,label:e})}}function ri(e,t,n){return D({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(k,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const ii={Content:Ht,Style:Dt,Layout:Tt,Animation:Ce};function li(e,t){return e.includes("Content")?t!=="Content":null}function po({label:e}){return r(zt,{title:e,level:Ge(1)})}function fo({level:e,label:t}){return e===1?r(po,{label:t}):r(mo,{label:t})}function $e(e,t){return{type:"custom",[J]:{label:e,level:t},render:()=>r(fo,{level:t,label:e})}}function C(e){return $e(e,2)}function ai(e){return{type:"custom",render:()=>r(ho,{text:e})}}function ho({text:e}){return r("p",{className:"sf-note",children:e})}function si(e){return $e(e,1)}function ci(e){return Z(e)!==null&&e?.tabs!==void 0}const We=new Map;function ui(e,t){const n=`${e}\0${t?t.join(""):""}`,o=We.get(n)??{type:"custom",tabs:t,[J]:{label:e,level:1},bucket:e,marker:!0,render:()=>r(E,{})};return We.set(n,o),o}function mo({label:e}){return r(Vt,{title:e,level:Ge(2)})}function Ue({swatches:e,current:t,onPick:n,names:o}){const i=e.find(a=>a.toLowerCase()===t.toLowerCase()),l=(i?o?.[i]:void 0)??t;return y("div",{className:"sf-swatches",children:[e.map(a=>{const s=o?.[a]??a;return r(K,{content:s,children:r("button",{type:"button","aria-pressed":t.toLowerCase()===a.toLowerCase(),className:`sf-swatch ${t.toLowerCase()===a.toLowerCase()?"is-active":""}`,style:{background:a},onClick:()=>n(a),"aria-label":s})},a)}),r("span",{className:"sf-swatch-hex",children:l})]})}function di(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=Un(n,t);return r(h,{label:e,icon:r(pt,{}),changed:!i,action:r(g,{label:e,changed:!i,detail:"the theme's section background",onReset:()=>o(Gn)}),children:Ue({swatches:Mn,current:i?Wn:n??t??"",onPick:o,names:$n})})}}}function go(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=n,l=Dn(i,t);return r(h,{label:e,icon:r(yt,{}),changed:!l,action:r(g,{label:e,changed:!l,detail:"the theme's image stage",onReset:()=>o(Fn)}),children:Ue({swatches:kn,current:l?Bn:Hn(i,t),onPick:o,names:wn})})}}}function pi(e=n=>n,t){return M({_gSectionTheme:C(Kn),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>r(hn,{value:e(n),onChange:o,followLabel:t})}})}function v({min:e,max:t,step:n,value:o,onChange:i,suffix:l="",readout:a=!0,notch:s,ariaLabel:c,disabled:d=!1}){const f=s!==void 0&&Number.isFinite(s)&&s>=e&&s<=t;return r("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(s-e)/(t-e)}:void 0,children:r(en,{min:e,max:t,step:n,value:o,suffix:l||void 0,showInput:a,label:c,disabled:d,size:"sm",className:"sf-slider-track",onChange:u=>{u!==null&&u!==o&&i(u)}})})}function H(e,t,n,o,i,l,a="",s){return{type:"custom",render:c=>r(h,{label:e,icon:V(t),action:s?s("storedValue"in c?c.storedValue:c.value,c.onChange):void 0,children:v({min:n,max:o,step:i,value:typeof c.value=="number"?c.value:l,suffix:a,ariaLabel:e,onChange:c.onChange})})}}function Ke({min:e,max:t,step:n,px:o,label:i,onChange:l,disabled:a=!1}){const{cornerRadiusPx:s}=z();return r(E,{children:v({min:e,max:t,step:n,value:o??(typeof s=="number"?s:e),readout:!1,ariaLabel:i,disabled:a,onChange:l})})}function $(e,t){const{min:n,max:o,step:i=1,unsetLabel:l,hint:a,restAtSite:s=!1,restTrack:c,unsetMark:d}=t;return{type:"custom",render:({value:f,onChange:u})=>{const p=typeof f=="number"?f:null,m=p===null;return r(h,{label:e,value:m?d?void 0:l:`${p}px`,changed:!m,action:d?qe(d,{changed:!m,onReset:()=>u(null)}):r(g,{label:e,changed:!m,onReset:()=>u(null)}),hint:a,children:c?c({min:n,max:o,step:i,px:p,label:e,onChange:u}):s?r(Ke,{min:n,max:o,step:i,px:p,label:e,onChange:u}):v({min:n,max:o,step:i,value:p??n,readout:!1,ariaLabel:e,onChange:u})})}}}function fi(e){const t=H("Gap",r(_e,{}),re.min,re.max,re.step,vn[e],"px",(n,o)=>r(oo,{inherited:!Nn(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[On]:e,render:n=>t.render({...n,value:An(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}function bo(){return{type:"custom",render:({value:e,onChange:t})=>{const o=U(e)??[...F],i=o.length===F.length;return r(h,{label:P,icon:r(Ie,{}),value:Re(o),changed:!i,action:r(g,{label:P,changed:!i,onReset:()=>t(null)}),hint:"Corners left off stay square. The row above sets how round the others are.",children:r(_o,{value:o,onChange:l=>{const a=U(l)??[];t(a.length===F.length?null:a)}})})}}}function xo({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=z(),i=typeof o=="number"?`${o}px`:"not set";return r(g,{label:e,changed:t,detail:o==null?"the built-in corners":w(i,"Site styles"),onReset:n})}function Co(){return $("Corners",{min:B,max:W,unsetLabel:"Follows the site",unsetMark:r(xo,{label:"Corners"}),restTrack:e=>r(So,{...e}),hint:r(Io,{})})}const Xe="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function ie(){return Be(Y())}function So(e){return r(Ke,{...e,disabled:ie()})}function Io(){return r(E,{children:ie()?Xe:"Follows Site styles ▸ Basics ▸ Corners until you set a number here."})}function _o({value:e,onChange:t}){const n=ie();return r(ve,{label:P,value:e,corners:n?ee.map(o=>({...o,disabled:!0,title:Xe})):ee,onChange:t})}function hi(){return M({_gShape:C("Shape"),sectionCorners:Co(),sectionCornerSides:bo()})}function mi(){return{_gMotion:C("Motion"),sectionAnimation:ce("Entrance",r(Ce,{}),[...Xt],Kt)}}function le(){let e=null;try{const{appState:t,selectedItem:n}=N(i=>i),o=n?.props?.id?String(n.props.id):void 0;e=o?Le(t?.data,o):null}catch{e=null}return e!==null&&Be(e)}function ze(e){const{cornerRadiusPx:t}=z(),n=le(),o=typeof t=="number"?t:e;let i=null;try{const{appState:a,selectedItem:s}=N(d=>d),c=s?.props?.id?String(s.props.id):void 0;i=c?Le(a?.data,c):null}catch{i=null}if(n||!i)return o;const l=i.sectionCorners;return Wt(l)?l:o}function yo({min:e,max:t,step:n,px:o,label:i,onChange:l}){const a=ze(e);return r(E,{children:v({min:e,max:t,step:n,value:o??a,readout:!1,ariaLabel:i,onChange:l})})}function Eo({label:e,changed:t=!1,onReset:n=()=>{}}){const o=le(),i=ze(B),l=o?"Site":"Section";return r(g,{label:e,changed:t,detail:w(`${i}px`,o?"Site styles":"the section"),onReset:n})}function To(){return r(E,{children:le()?"The section is full width, so this card follows Site styles ▸ Basics ▸ Corners.":"Follows the section's Corners until you set a number here."})}function Ro(){return $("Corners",{min:B,max:W,unsetLabel:"Follows the section",unsetMark:r(Eo,{label:"Corners"}),restTrack:e=>r(yo,{...e}),hint:r(To,{})})}function Lo({value:e,onChange:t}){return r(ve,{label:P,value:e,corners:ee,onChange:t})}function vo({unset:e}){return r(E,{children:e?"Set a number above first — there is nothing to shape yet.":"Corners left off stay square. The row above sets how round the others are."})}function Oo(){return{type:"custom",render:({value:e,onChange:t})=>{const o=U(e)??[...F],i=o.length===F.length;return r(h,{label:P,icon:r(Ie,{}),value:Re(o),changed:!i,action:r(g,{label:P,changed:!i,onReset:()=>t(null)}),hint:r(vo,{unset:!Ut(e)}),children:r(Lo,{value:o,onChange:l=>{const a=U(l)??[];t(a.length===F.length?null:a)}})})}}}function No(){return{type:"custom",render:()=>r(Qe,{})}}function gi(){return{_gShape:C("Shape"),cardCorners:Ro(),cardCornerSides:Oo(),cardCornersApplyAll:No()}}function bi(){return L("Justify",r(dt,{}),we,we[0].value)}function xi(){return L("Item alignment",r(ut,{}),yn,"stretch")}function Ci(){return L(Ln,r(Mt,{}),He,He[0].value)}function Si(){return{type:"custom",render:({value:e,onChange:t})=>{const n=oe.find(o=>o.value===e)??oe[0];return r(h,{label:De,icon:r(Se,{}),value:n.label,children:r("div",{className:"sf-gallery-layouts",role:"group","aria-label":De,children:oe.map(o=>r(K,{content:o.label,className:"sf-tile-tip",children:r("button",{type:"button","aria-pressed":n.value===o.value,"aria-label":o.label,onClick:()=>t(o.value),children:r("span",{className:"sf-gallery-pic",children:Ao(o.weights).map((i,l)=>r("i",{style:{gridColumn:`span ${i}`}},l))})})},o.value))})})}}}function Ao(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function Ii(){return L(En,r(_e,{}),Pe,Pe[0].value)}function _i(){return H(Tn,r(At,{}),ke,Rn,1,ke)}function yi(e){const t=ce(In,Qn("`Direction` names how a container's children run — a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; editor-shell's own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),_n(e),Fe(e,void 0));return{type:"custom",render:n=>t.render({...n,value:Fe(e,n.value),onChange:o=>n.onChange(o)})}}function Ei(e,t,n,o,i,l){return{type:"custom",render:({value:a,onChange:s})=>r(h,{label:e,icon:r(Te,{noun:l}),action:r(g,{label:e,changed:!Vn(a),detail:"the Text style in Site styles",onReset:()=>s(zn),defaultAction:{onPress:()=>s(Xn),title:"Keep this section's own built-in size",icon:r(ft,{})}}),children:v({min:t,max:n,step:o,value:typeof a=="number"?a:i,suffix:"px",ariaLabel:e,onChange:s})})}}function Ti(){return{_gCellWidth:C("Cell width"),gridSpan:L("Positions",r(Se,{}),[{label:"Auto",value:""},...Array.from({length:ot},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function Y(){let e=null;try{e=N(t=>t).selectedItem}catch{e=null}return e?.props??{}}function Fo({min:e,max:t,step:n,px:o,label:i,onChange:l,desktopKey:a,fallback:s}){const c=Y()[a],d=te(void 0,c,s);return r(E,{children:v({min:e,max:t,step:n,value:te(o,c,s),readout:!1,ariaLabel:i,notch:d,onChange:l})})}function Po({label:e,desktopKey:t,fallback:n,changed:o=!1,onReset:i=()=>{}}){const l=Y()[t],a=te(void 0,l,n);return r(g,{label:e,changed:o,detail:`${a}px on ${ne.desktop.toLowerCase()}`,onReset:i})}function wo(e){return $(e.label,{min:e.min,max:e.max,step:e.step,unsetLabel:`Follows ${ne.desktop}`,unsetMark:r(Po,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>r(Fo,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}function Ri(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,i=x=>o?x:`Padding ${x.toLowerCase()}`,l=x=>H(i("Top"),r(Nt,{}),S.min,S.max,S.step,x,"px"),a=(x,_,je,j=S)=>R("mobile",wo({label:i(x),desktopKey:_,min:j.min,max:j.max,step:j.step,fallback:je})),s=e.top??S.min,c=e.bottom??S.min,d="sectionPaddingLeft",f="sectionPaddingRight",u=e.sideBounds??S,p=e.side??u.min,m=e.sidePhone??p,b=e.phone===!0,I=x=>b?R("desktop",x):x;return M({...o?{_gSpacing:C("Padding")}:{},[t]:I(l(s)),...b?{[X(t)]:a("Top",t,s)}:{},...e.only==="top"?{}:{[n]:I(H(i("Bottom"),r(Lt,{}),S.min,S.max,S.step,c,"px")),...b?{[X(n)]:a("Bottom",n,c)}:{}},...e.sides?{[d]:I(H(i("Left"),r(vt,{}),u.min,u.max,u.step,p,"px")),...b?{[X(d)]:a("Left",d,m,u)}:{},[f]:I(H(i("Right"),r(Ot,{}),u.min,u.max,u.step,p,"px")),...b?{[X(f)]:a("Right",f,m,u)}:{}}:{}})}const ko={contained:"Contained",page:"Page",full:"Full"},ae="Width";function Li(e,t=Yn,n=!0){const o=t.map(i=>({label:jn[i]??ko[i],value:i}));return M({...n?{_gWidth:C(ae)}:{},widthMode:{type:"custom",render:({onChange:i,field:l})=>r(h,{label:"Width",icon:r(Gt,{}),action:n?r(ro,{inherited:l?.inherited??!1,onReset:()=>i(qn),label:ae}):void 0,children:se({options:o,value:l?.currentValue||e,onChange:i,ariaLabel:ae})})}})}function vi(){const e=o=>({type:"custom",render:({value:i,onChange:l})=>y("div",{className:"sf-field",children:[o?y("div",{className:"sf-field-head",children:[r("span",{className:"sf-field-label sf-field-label--inline",children:G}),o(l)]}):null,r("div",{children:se({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(i)?i:"auto",onChange:l,ariaLabel:G})})]})}),t=()=>({type:"custom",render:({value:o,onChange:i,field:l})=>{const a=l?.unit==="%"?"%":"px",s=a==="%"?Sn:Cn;return r("div",{className:"sf-field",children:v({min:s.min,max:s.max,step:s.step,value:typeof o=="number"?o:s.fallback,suffix:a,ariaLabel:G,onChange:i})})}}),n=()=>ce("Unit",r(ye,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return M({_gHeight:C(G),sectionHeightMode:R("desktop",e()),sectionHeightValue:R("desktop",t()),sectionHeightUnit:R("desktop",n()),sectionHeightModePhone:R("mobile",e(o=>r(Do,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:R("mobile",t()),sectionHeightUnitPhone:R("mobile",n())})}function Do({onClear:e}){const t=Y(),n=bn(t),o=xn(t),i=`${o.mode==="auto"?"Auto":`${o.value}${o.unit}`} on ${ne.desktop.toLowerCase()}`;return r(g,{label:G,changed:n,detail:i,onReset:e})}function Oi(){return{_gAnchor:C("Anchor"),anchor:uo("Anchor name","e.g. about",ao)}}function O(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:l,name:a})=>{const s=typeof o=="boolean"?o:t,c=`${l??a??e}-label`;return r(h,{label:e,labelId:c,icon:n,action:r(qt,{checked:s,onChange:i,ariaLabelledBy:c})})}}}function Ni(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const i=`${String(n??o??"pageBackground")}-colour`;return r(h,{label:"Background",icon:r(Ee,{}),htmlFor:i,action:r(Oe,{id:i,label:"Background",value:$t(e),onChange:t})})}}}function Ai(e,t){return{type:"custom",render:({value:n,onChange:o,id:i})=>{const l=typeof n=="boolean"?n:t,a=`${i??e}-checkbox`;return r(h,{label:e,htmlFor:a,className:"sf-checkbox",action:r(Qt,{id:a,checked:l,onChange:o})})}}}function Fi(e,t){return{type:"custom",render:({value:n,onChange:o})=>r(h,{label:e,action:Oe({value:n||t,onChange:o,label:e})})}}const Ho=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function Ve({label:e,value:t,onChange:n,points:o=Ho}){return r(Yt,{label:e,value:t,points:o,onChange:n})}function Pi(e,t=fe,n="mediaImage"){return{type:"custom",render:({value:o,onChange:i})=>r("div",{className:"sf-focal-row",children:r(Bo,{label:e,value:o||t,onChange:i,imageProp:n})})}}function Bo({label:e,value:t,onChange:n,imageProp:o}){const{selectedItem:i}=N(a=>a),l=i?.props?.[o];return r(dn,{label:e,value:t,onChange:n,image:typeof l=="string"?l:void 0})}const Go=xe([]);function wi(e,{stacking:t,fallback:n=at}){return{type:"custom",render:({value:o,onChange:i})=>{const l=lt.includes(o)?o:n;return t?r(Mo,{label:e,value:l,onChange:i}):Ye({label:e,value:l,onChange:i,points:Go})}}}function Mo({label:e,value:t,onChange:n}){const{appState:o,selectedItem:i}=N(s=>s),l=i?.props?.id?String(i.props.id):void 0,a=l?it(o?.data,l):[];return Ye({label:e,value:t,onChange:n,points:xe(a,l)})}function Ye({label:e,value:t,onChange:n,points:o}){const i=o.find(l=>l.disabled);return r(h,{label:e,icon:r(Ft,{}),hint:i?i.title:void 0,children:Ve({label:e,value:st(t),onChange:n,points:o})})}const ki={top:r(Ct,{}),right:r(xt,{}),bottom:r(gt,{}),left:r(bt,{})};function Di(e,t,n,o,i,l){const a=f=>t.find(u=>u.value===f),s=f=>({value:f,label:"",disabled:!0,title:o}),c=f=>{const u=t.find(m=>m.cell===f);if(!u)return s(`missing-${f}`);const p=l?.[f];return p?{value:u.value,label:u.label,icon:p}:{value:u.value,label:u.label}},d=[s("corner-top-left"),c("top"),s("corner-top-right"),c("left"),s("centre"),c("right"),s("corner-bottom-left"),c("bottom"),s("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:u})=>{const p=t.some(m=>m.value===f)?f:n;return r(h,{label:e,icon:i,value:a(p)?.label??"",children:Ve({label:e,value:p,onChange:u,points:d})})}}}const $o="\0note";function L(e,t,n,o,i){return{type:"custom",options:n,fallback:o,...i?{note:i}:{},render:({value:l,onChange:a,field:s})=>{const c=s.options??n,d=s.fallback??o,f=c.some(u=>u.value===l)?l:d;return r(h,{label:e,icon:V(t),children:r(Jt,{value:f,ariaLabel:e,onChange:a,options:[...i?[{label:i,value:$o,disabled:!0}]:[],...c.map(u=>({label:u.label,value:u.value}))]})})}}}function Hi(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:i,field:l})=>r(fn,{label:e,options:l.options??t,value:Array.isArray(o)?o:[],onChange:i,...n?{emptyLabel:n}:{}})}}function Bi(e,t,n,o){return{type:"custom",options:t,fallback:n,render:({value:i,onChange:l,field:a})=>r(mn,{label:e,options:a.options??t,fallback:a.fallback??n,value:i,onChange:l,placeholder:o})}}function Gi(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const i={value:n,onChange:o,...t};return r(e,{...i})}}}function se({options:e,value:t,onChange:n,ariaLabel:o,disabled:i=!1}){return r(jt,{options:e.map(l=>({id:l.value,label:l.label,title:l.title})),value:t,onChange:n,ariaLabel:o,disabled:i})}const Mi=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function ce(e,t,n,o){const i=n.map(l=>typeof l=="string"?{label:l,value:l}:l);return{type:"custom",render:({value:l,onChange:a,field:s})=>r(h,{label:e,icon:V(t),children:se({options:i,value:i.some(c=>c.value===l)?l:l||s?.currentValue||o,onChange:a,ariaLabel:e})})}}function $i(e,t,n){return{type:"custom",[me]:!0,render:({value:o,onChange:i})=>r(pn,{value:o||"",onChange:i,label:e,accept:t,placeholder:n})}}const Wi={HeroSingle:["imageFocal"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Ui({value:e,onChange:t,label:n}){const o=e||{},i=!!o.pending,l=i?"var(--fg-dim, #888)":o.ok?"#1d9e75":"#d85a30",a=(s,c)=>t({...o,[s]:c===""?void 0:Number(c)});return y(h,{label:n,icon:r(Q,{}),children:[r("button",{type:"button",disabled:i,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"8px 10px",fontSize:13,cursor:i?"default":"pointer",opacity:i?.6:1,border:"1px solid var(--border-strong, #ccc)",borderRadius:6,background:"transparent",color:"inherit"},children:i?"Finding…":"Find coordinates"}),o.status&&r("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:l},children:o.status}),r("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:"Coordinates from OpenStreetMap"}),r("button",{type:"button",onClick:()=>t({...o,manual:!o.manual}),style:{marginTop:8,padding:0,border:"none",background:"none",font:"inherit",fontSize:12,color:"var(--sf-accent, #2563eb)",cursor:"pointer",textDecoration:"underline"},children:o.manual?"Hide manual coordinates":"Enter coordinates manually"}),o.manual&&y("div",{style:{marginTop:8,display:"grid",gap:8},children:[r(h,{label:"Latitude",icon:r(Q,{}),children:r("input",{type:"number",step:"any",placeholder:"e.g. 34.0990198",value:typeof o.lat=="number"?o.lat:"",onChange:s=>a("lat",s.target.value)})}),r(h,{label:"Longitude",icon:r(Q,{}),children:r("input",{type:"number",step:"any",placeholder:"e.g. -117.9842833",value:typeof o.lng=="number"?o.lng:"",onChange:s=>a("lng",s.target.value)})})]})]})}function Wo(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Uo(e,t,n){const o=e.map(i=>({text:i?.text??""}));return t===null||t<0||t>=e.length?o:o.map((i,l)=>l===t?{text:n}:i)}function Ki(e,t){return e===null?null:t>e?e:null}function Ko(e,t,n){if(n===null||n>=t.length)return null;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return null;return e[n]!==t[n]&&t.includes(e[n])||e[n]!==t[n]&&t.length!==e.length?null:n}const Xi={label:"Ticker items",icon:r(Rt,{})};function zi(e,t,n,o){return{type:"custom",[T]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},render:({value:i,onChange:l})=>r(Xo,{label:e,icon:V(t),items:Array.isArray(i)?i:[],placeholder:n,onChange:l,markup:o==="markup"})}}function Xo({label:e,icon:t,items:n,placeholder:o,onChange:i,markup:l=!1}){const a=q(null),[s,c]=ue(null),d=u=>u.map(p=>({text:p?.text??""}));return r(Zt,{label:e,icon:t,noun:"item",items:n,onChange:u=>{const p=Ko(n,u,s);p===null&&(a.current=null),c(p),i(d(u))},newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:l?r(Ne,{target:a,value:Wo(n,s),onChange:u=>i(Uo(n,s??-1,u)),disabled:s===null,label:s===null?"Formatting — click a row first":`Formatting — row ${s+1}`}):void 0,renderRow:(u,p,m)=>r("input",{type:"text",className:l&&s===p?"sf-list-marking":void 0,value:u?.text??"",placeholder:o,"aria-label":`${e} ${p+1}`,onChange:b=>m({text:b.target.value}),onFocus:b=>{a.current=b.currentTarget,c(p)}})})}function Vi(e,t){const n=`${e.label} — row ${t+1}`;return D({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:i})=>r(k,{value:o,onChange:i,label:n,placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function Yi(e){return{_gCards:C("Cards"),coverIndex:L("Cover image",r(Et,{}),sn,String(cn),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:go("Image background",Pn),cardImage:zo(),spinOnHover:O("Rotate on hover",e?.spinDefault??!0,r(wt,{}))}}function ji(){return{outline:L("Card outline",r(kt,{}),rn,an),indexBadge:L("Card number",r(ye,{}),on,ln),showBadge:O("Product badge",!0,r(Te,{noun:"tag"}))}}function qi(e){const t=e?.bottomDefault??!0;return{_gShowOnCard:C("Show on a card"),showCardPrice:O("Price",!0,r(St,{})),showCardFinishes:O("Finish swatches",!0,r(It,{})),showCardSizes:O("Sizes",t,r(Pt,{})),showCardBuy:O("Buy button",t,r(ht,{})),showCardPage:O("Page button",t,r(Ee,{}))}}function zo(){return $("Card image",{min:B,max:W,step:et,hint:"Rounds the picture. The card's own corner is in Site styles."})}function Ji(){return $(nt,{min:B,max:W,step:tt,unsetLabel:"Square",hint:"Rounds the picture. Left alone it stays square."})}function Zi(){return{type:"custom",render:({value:e,onChange:t})=>r(Vo,{value:typeof e=="string"?e:"",onChange:t})}}function Vo({value:e,onChange:t}){const[n,o]=ue(null),i=be.filter(a=>n===null||A[a].across===n),l=e&&e in A?A[e]:null;return y(E,{children:[r(h,{label:"Photos in a row",icon:r(mt,{}),children:y("div",{className:"sf-gallery-filter",children:[r("button",{type:"button","aria-pressed":n===null,onClick:()=>o(null),children:"All"}),rt.map(a=>r("button",{type:"button","aria-pressed":n===a,onClick:()=>o(a),children:a},a))]})}),r(h,{label:"Layout",icon:r(_t,{}),value:l?l.label:"Not chosen",hint:`${i.length} of ${be.length} layouts`,children:r("div",{className:"sf-gallery-layouts",children:i.map(a=>r(K,{content:A[a].label,className:"sf-tile-tip",children:r("button",{type:"button","aria-pressed":e===a,"aria-label":A[a].label,onClick:()=>t(e===a?"":a),children:r("span",{className:"sf-gallery-pic",children:A[a].desktop.map(([s,c],d)=>r("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${c}`}},d))})})},a))})})]})}export{ao as ANCHOR_HINT,Qr as BOUND_TO_POST_NOTE,ii as BUCKET_ICONS,Wi as CUSTOM_FIELD_MEDIA,Ui as CoordsField,ki as EDGE_ARROWS,fe as FOCAL_DEFAULT,Ho as FOCAL_POINTS,J as FOLD_FIELD_MARKER,Ve as FocalPicker,mo as GroupLabel,lo as HIGHLIGHT_HINT,k as HidableTextField,he as LINK_FIELD_MARKER,Yr as Label,me as MEDIA_FIELD_MARKER,Mi as MEDIA_TYPE_OPTIONS,ho as PanelNoteLine,Ye as PlacementGridView,ge as SCAFFOLD_FIELD_MARKER,nl as SCALAR_TEXT_CONTROLS,Xe as SECTION_BLEEDS_HINT,po as SectionHeading,se as Segmented,oo as SiteGapDefaultReset,v as Slider,Ue as Swatches,tl as TEXT_CONTROL_KINDS,T as TEXT_FIELD_MARKER,Xi as TICKER_ITEMS_ROW,Xo as TextListField,ro as WidthDefaultReset,Ko as aimAfterListChange,Oi as anchorFields,w as backTo,di as backgroundField,xi as boxAlignField,Ii as boxBlockSpacingField,bi as boxJustifyField,_i as boxPhoneRowField,Si as boxShareField,Ci as boxWrapField,ui as bucketHeader,Oo as cardCornerSidesField,Ro as cardCornersField,go as cardImageBackgroundField,zo as cardImageField,Yi as cardMediaFields,gi as cardShapeFields,qi as cardShowFields,ji as cardStyleFields,Ti as cellWidthFields,Ai as checkbox,Fi as colorInput,ni as copyText,yi as directionField,Di as edgePad,li as entriesHiddenForTab,Pi as focalPicker,Ki as focusAfterRemove,Z as foldMetaOf,Zi as galleryLayoutField,fi as gapField,C as group,vi as heightFields,pe as hidableText,co as hintIsWhileTyping,V as iconOf,Ji as imageCornersField,ci as isBucketHeader,eo as isNoGlyph,oi as linkField,Hi as multiSelect,Qn as noGlyph,Ni as pageBackgroundField,ai as panelNote,wo as phoneOverrideField,wi as placementField,uo as plainText,ri as plainTextarea,$ as pxField,de as readHidable,Wo as rowText,Bi as searchSelect,si as section,mi as sectionAnimationFields,bo as sectionCornerSidesField,Co as sectionCornersField,hi as sectionShapeFields,pi as sectionThemeFields,ce as segmented,L as select,Uo as setRowText,Ei as sizeField,H as slider,Gi as sourceField,Ri as spacingFields,ei as text,Ze as textFieldIdentifier,Jr as textFieldOffPage,zi as textList,Vi as textListRowField,ti as textarea,O as toggle,$i as upload,to as usePageWidthDetail,no as useSiteGapDetail,Li as widthField,Zr as withIdentifier,qr as withOffPage,jr as withScaffold};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parseOption as t}from"../parse-option.js";const o="solid",r=[{label:"Solid",value:"solid"},{label:"Outlined",value:"outlined"}];function l(e){return t(r,o,e)}const
|
|
1
|
+
import{parseOption as t}from"../parse-option.js";const o="solid",r=[{label:"Solid",value:"solid"},{label:"Outlined",value:"outlined"}];function l(e){return t(r,o,e)}const i="sf-secnum-outline",s="font-display text-[length:var(--size-headingMedium,clamp(48px,6vw,96px))] font-medium leading-[0.8] tracking-[-0.02em]",p=`@supports (-webkit-text-stroke: 1px currentColor){.${i}{color:var(--site-surface-2);-webkit-text-stroke:1px var(--site-line)}}`;export{o as DEFAULT_SECTION_NUMBER_STYLE,i as OUTLINED_NUMBER_CLASS,p as OUTLINED_NUMBER_CSS,s as OUTLINED_NUMBER_LAYOUT,r as SECTION_NUMBER_STYLE_OPTIONS,l as parseSectionNumberStyle};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{ruleChecks as f}from"./rule.js";const c=["--radius","--radius-xs","--radius-sm","--radius-md","--radius-lg","--radius-xl","--radius-2xl","--radius-3xl","--radius-4xl"],
|
|
2
|
-
`).forEach((s,u)=>{for(const o of s.matchAll(/["'`]([^"'`]*\brounded-full\b[^"'`]*)["'`]/g))/(^|\s)px-(?!0\b|0\.5\b|1\b|px\b)[\d[]/.test(o[1])&&r.push(`${
|
|
3
|
-
`)});s("the pill sweep flags a padded circle, and neither a count badge nor a dot",
|
|
1
|
+
import{ruleChecks as f}from"./rule.js";const c=["--site-radius","--site-radius-xs","--site-radius-sm","--site-radius-md","--site-radius-lg","--site-radius-xl","--site-radius-2xl","--site-radius-3xl","--site-radius-4xl"],a=(i,r)=>JSON.stringify(i)===JSON.stringify(r);function h(i){const r=[];return i.text.split(`
|
|
2
|
+
`).forEach((s,u)=>{for(const o of s.matchAll(/["'`]([^"'`]*\brounded-full\b[^"'`]*)["'`]/g))/(^|\s)px-(?!0\b|0\.5\b|1\b|px\b)[\d[]/.test(o[1])&&r.push(`${i.path}:${u+1}`)}),r}function g(i,r){const{check:s,report:u}=f("site square by default"),o=e=>i.find(n=>n.path===e),t=r.corners;if(t){const e=t.siteCornerRadiusTokens(null);s("a website that has chosen no corners publishes every step of the radius scale a `rounded-*` utility reads",c.every(n=>n in e),`missing: ${c.filter(n=>!(n in e)).join(", ")}`),s("…and the card's and the button's own properties","--sf-card-radius"in e&&"--sf-button-radius"in e),s("…every one of them 0 — square",Object.values(e).every(n=>n==="0"),JSON.stringify(e)),s("…exactly what a site that chose 0 publishes",a(e,t.cornerRadiusTokens(0))),s("an absent value and a blank one are the same statement",a(t.siteCornerRadiusTokens(void 0),e)&&a(t.siteCornerRadiusTokens(""),e)&&a(t.siteCornerRadiusTokens(" "),e)),s("a website that has chosen keeps its number",a(t.siteCornerRadiusTokens(16),t.cornerRadiusTokens(16))&&t.siteCornerRadiusTokens(16)["--site-radius-lg"]==="1rem"),s('the retired `large` word is still 16, and `small` is still "not set"',t.cornerStyleToPx[t.normalizeCornerStyle("large")]===16&&t.cornerStyleToPx[t.normalizeCornerStyle("small")]===null),s('`cornerRadiusTokens(null)` publishes NOTHING — not set there means "follow the site"',a(t.cornerRadiusTokens(null),{})),s("…so an untouched section declares no radius of its own",t.sectionCornerStyle(null)===void 0,JSON.stringify(t.sectionCornerStyle(null)))}if(r.livePage!==void 0){const e=o(r.livePage);if(s(`read the live page's layout ${r.livePage}`,!!e)){const n=e.text;s("the live page publishes the site's corners through siteCornerRadiusTokens",/const siteCornerTokens = siteCornerRadiusTokens\(/.test(n)&&/\.\.\.siteCornerTokens,/.test(n)),s("…and never through the two that publish nothing for an untouched site",!/\bcornerRadiusTokens\(|\bcornerStyleTokens\(/.test(n))}}if(r.canvas!==void 0){const e=o(r.canvas);if(s(`read the editor canvas ${r.canvas}`,!!e)){const n=e.text;s("the editor canvas publishes them through the same function",/\.\.\.siteCornerRadiusTokens\(cornerRadiusPx\),/.test(n)&&/siteCardRadiusTokens\(siteCornerRadiusTokens\(cornerRadiusPx\)\)/.test(n)),s("…and nowhere through the bare one",!/(?<![A-Za-z])cornerRadiusTokens\(/.test(n))}}{const e=h({path:"fixture.tsx",text:['<button className="rounded-full px-4 py-2">Sign in</button>','<span className="rounded-full px-1 text-xs">3</span>','<span className="h-2 w-2 rounded-full bg-fg" />',"<i className={`rounded-full px-[10px]`} />"].join(`
|
|
3
|
+
`)});s("the pill sweep flags a padded circle, and neither a count badge nor a dot",a(e,["fixture.tsx:1","fixture.tsx:4"]),JSON.stringify(e))}const l=i.filter(e=>e.path.endsWith(".tsx"));s(`the pill sweep read the .tsx files (${l.length}, at least ${r.minFiles})`,l.length>=r.minFiles&&l.length>0);const d=l.flatMap(h);return s("no control with horizontal padding wears the circle utility",d.length===0,d.join(", ")),u()}export{g as siteSquareByDefault};
|
package/dist/lib/theme.js
CHANGED
|
@@ -15,4 +15,4 @@ const L="storefront-theme",me="sf:theme-mode",pe="sf:theme-switch",xe="hide",_e=
|
|
|
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 i={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},P=[{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"}],$={selected:0,themes:P};function S(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...$}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function f(e,t,n){const r=u(e),o=u(t);if(r===null||o===null)return e;const c=a=>Math.max(0,Math.min(255,Math.round(a))).toString(16).padStart(2,"0");return`#${r.map((a,O)=>c(a+(o[O]-a)*n)).join("")}`}const F={light:"#ffffff",dark:"#0a0a0a"},Re=["light","dark"];function we(e,t){const n=F[t],r=t==="light"?"#ffffff":"#000000";return{text:n,accent:n,background:e,surface:f(e,r,.1),line:f(e,r,.22),muted:f(n,e,.35),brandInk:t}}function s(e){const t=S(e);return t.themes[t.selected]}function d(e){return{text:e.text,accent:e.accent,background:e.background||i.background,surface:e.surface||i.surface,line:e.line||i.line,muted:e.muted||i.muted}}function Ce(e){return{fill:d(e).background,accent:e.accent}}function u(e){const t=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e.trim());if(!t)return null;const n=t[1].length===3?[...t[1]].map(a=>a+a).join(""):t[1],[r,o,c]=[0,2,4].map(a=>parseInt(n.slice(a,a+2),16));return[r,o,c]}function g(e){const t=u(e);if(t===null)return null;const[n,r,o]=t.map(c=>{const a=c/255;return a<=.04045?a/12.92:((a+.055)/1.055)**2.4});return .2126*n+.7152*r+.0722*o}const U=.4,G=4.5,Y=3;function z(e,t){const n=g(e),r=g(t);if(n===null||r===null)return null;const[o,c]=n>=r?[n,r]:[r,n];return(o+.05)/(c+.05)}const De={good:"Good","large-only":"Large text only",hard:"Hard to read"};function He(e){return e>=G?"good":e>=Y?"large-only":"hard"}const m=["#000000","#ffffff"];function l(e){let t=m[0],n=-1;for(const r of m){const o=z(e,r);if(o===null)return m[0];o>n&&(n=o,t=r)}return t}const X=[.25,.4,.55];function Ie(e){const t=u(e);return t===null?[]:X.map(n=>"#"+t.map(r=>Math.round(r*(1-n)).toString(16).padStart(2,"0")).join(""))}function Me(e){const t=s(e),n={"--theme-fg":t.text},r=g(t.text);return(r===null||r>=U)&&(n["--overlay-fg"]=t.text),n}const B=82;function p(e){return`color-mix(in srgb, ${e} ${B}%, #000)`}function ye(e){const t=s(e);return{"--theme-accent":t.accent,"--theme-accent-2":p(t.accent),"--theme-accent-ink":l(t.accent)}}function A(e){const t=e?.button;return/^#[0-9a-fA-F]{6}$/.test(t??"")?t.toLowerCase():null}function Ne(e){const t=s(e),n=A(t),r=T(t);if(n===null&&r===null)return{};const o={};return n!==null&&(o["--theme-btn"]=n,o["--theme-btn-2"]=p(n)),o["--theme-btn-ink"]=r??l(n),o}function T(e){const t=e?.buttonInk;return/^#[0-9a-fA-F]{6}$/.test(t??"")?t.toLowerCase():null}function Oe(e,t){return T(e)??l(A(e)??t)}function Le(e){const t={};return S(e).themes.forEach((n,r)=>{const o=d(n);t[`--theme-preset-${r}-accent`]=o.accent,t[`--theme-preset-${r}-accent-2`]=p(o.accent),t[`--theme-preset-${r}-accent-ink`]=l(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 ke=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function Pe(e){const t=d(s(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!==i.surface||t.line!==i.line)&&(r["--theme-surface-2"]=n),r}const W=["heading","body","label"],$e={heading:"Headings",body:"Body",label:"Labels"},Fe="body";function Ue(e){if(!e)return null;for(const t of W)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}const b=["headingLarge","headingMedium","headingSmall","accent","body","label"],Ge={headingLarge:"heading",headingMedium:"heading",headingSmall:"heading",accent:"heading",body:"body",label:"label"},Ye={headingLarge:"Large",headingMedium:"Medium",headingSmall:"Small",accent:"Size",body:"Size",label:"Size"},ze={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},K=8,V=200,Xe=1;function Z(e){if(typeof e!="number"||!Number.isFinite(e))return null;const t=Math.round(e);return t>=K&&t<=V?t:null}function j(e){const t={};for(const n of b)t[n]=Z(e?.[n]);return t}function Be(e){const t=j(e),n={};for(const r of b){const o=t[r];o!==null&&(n[`--size-${r}`]=`${o}px`)}return n}const q=["square","small","large"],J="small";function Q(e){return q.includes(e??"")?e:J}function We(e){return C(ee[Q(e)])}const R=0,v=40,ee={square:0,small:null,large:16},te={"--sf-card-radius":1,"--sf-button-radius":.5,"--radius":.5,"--radius-xs":.25,"--radius-sm":.5,"--radius-md":.75,"--radius-lg":1,"--radius-xl":1.25,"--radius-2xl":1.5,"--radius-3xl":2,"--radius-4xl":2.5};function w(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(v,Math.max(R,Math.round(t))):null}function C(e){const t=w(e);return t===null?{}:Object.fromEntries(Object.entries(te).map(([n,r])=>{const o=t*r/16;return[n,o===0?"0":`${o}rem`]}))}function Ke(e){return C(w(e)??R)}const ne=["none","soft","lifted"],re="soft",D="none",oe=["tight","normal","roomy"],ce="normal",ae="normal",ie=["none","lift","highlight"],se="lift",ue="highlight",H="#141416";function I(e){return ne.includes(e??"")?e:re}function le(e){return oe.includes(e??"")?e:ce}function M(e){return ie.includes(e??"")?e:se}function he(e){return/^#[0-9a-fA-F]{6}$/.test(e??"")?e.toLowerCase():H}function Ve(e){const t=I(e);return t===D?void 0:t}function Ze(e){const t=le(e);return t===ae?void 0:t}function je(e){const t=M(e);return t===ue?void 0:t}function qe(e,t,n){const r=he(t);return r===H?{}:I(e)!==D||M(n)==="lift"?{"--sf-shadow-color":r}:{}}const fe=["normal","tight","compressed"],y="normal";function N(e){return fe.includes(e??"")?e:y}function Je(e){const t=N(e);return t===y?void 0:t}function Qe(e){switch(N(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}const ve=["authored","sentence"],et={case:"authored",weight:null,weightStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},x=100,_=900,de=24,ge=200;function h(e,t,n){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),n))}function E(e){const t=h(e?.weight,x,_),n=e?.case==="sentence"?"sentence":"authored",r=c=>c==null?t:h(c,x,_),o=c=>c==="sentence"?"sentence":c==="authored"?"authored":n;return{case:n,weight:t,weightStrong:h(e?.weightStrong,x,_),maxPx:h(e?.maxPx,de,ge),weight2:r(e?.weight2),weight3:r(e?.weight3),case2:o(e?.case2),case3:o(e?.case3)}}function tt(e){const t=E(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 nt(e){return E({case:e?.heading_case??void 0,weight:e?.heading_weight,weightStrong:e?.heading_weight_strong,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 rt(e){const t=E(e);return{heading_case:t.case,heading_weight:t.weight,heading_weight_strong:t.weightStrong,heading_max_px:t.maxPx,heading_2_weight:t.weight2,heading_3_weight:t.weight3,heading_2_case:t.case2,heading_3_case:t.case3}}export{X as ACCENT_DARKEN_STEPS,Re as BRAND_INKS,oe as CARD_GAPS,ne as CARD_SHADOWS,v as CORNER_RADIUS_MAX,R as CORNER_RADIUS_MIN,q as CORNER_STYLES,ee as CORNER_STYLE_TO_PX,ce as DEFAULT_CARD_GAP,re as DEFAULT_CARD_SHADOW,J as DEFAULT_CORNER_STYLE,y as DEFAULT_HEADING_COMPRESSION,et as DEFAULT_HEADING_TYPOGRAPHY,se as DEFAULT_HOVER_EFFECT,H as DEFAULT_SHADOW_COLOR,ze as DEFAULT_SIZES,i as DEFAULT_SURFACES,Ee as DEFAULT_SWITCH_SHOWN,P as DEFAULT_THEMES,_e as DEFAULT_THEME_MODE,$ as DEFAULT_THEME_VALUE,De as GRADE_LABEL,ve as HEADING_CASES,fe as HEADING_COMPRESSIONS,ge as HEADING_MAX_PX_MAX,de as HEADING_MAX_PX_MIN,_ as HEADING_WEIGHT_MAX,x as HEADING_WEIGHT_MIN,ie as HOVER_EFFECTS,ae as IDENTITY_CARD_GAP,D as IDENTITY_CARD_SHADOW,ue as IDENTITY_HOVER_EFFECT,Fe as NEUTRAL_TYPE_GROUP,G as READABILITY_AA,Y as READABILITY_AA_LARGE,Ge as SCALE_OF_STEP,b as SIZE_STEPS,Ye as SIZE_STEP_LABELS,V as TEXT_SIZE_MAX,K as TEXT_SIZE_MIN,Xe as TEXT_SIZE_STEP,Ae as THEME_DAY_END_HOUR,Se as THEME_DAY_START_HOUR,me as THEME_MODE_KEY,L as THEME_STORAGE_KEY,ke as THEME_SURFACE_KEYS,xe as THEME_SWITCH_HIDE,pe as THEME_SWITCH_KEY,W as TYPE_GROUPS,$e as TYPE_GROUP_LABELS,l as accentInk,we as brandTheme,be as buildThemeBootScript,Ze as cardGapAttr,Ve as cardShadowAttr,Qe as compressionMetrics,z as contrastRatio,C as cornerRadiusTokens,We as cornerStyleTokens,Ie as darkerAccents,He as gradeContrast,Je as headingCompressionAttr,nt as headingTypographyFromRow,tt as headingTypographyStyle,rt as headingTypographyToRow,je as hoverEffectAttr,k as isDayHour,le as normalizeCardGap,I as normalizeCardShadow,w as normalizeCornerRadius,Q as normalizeCornerStyle,N as normalizeHeadingCompression,E as normalizeHeadingTypography,M as normalizeHoverEffect,he as normalizeShadowColor,Z as normalizeSize,j as normalizeSizes,S as normalizeTheme,d as normalizeThemeColors,Te as resolveTheme,Oe as resolvedButtonInk,s as selectedThemeColors,qe as shadowColorTokens,Ke as siteCornerRadiusTokens,ye as themeAccentStyle,A as themeButtonColour,T as themeButtonInk,Ne as themeButtonStyle,Me as themeColorStyle,Le as themePresetAccentVars,Pe as themeSurfaceStyle,Ce as themeSwatchColors,Ue as typeScaleGroupOfClassName,Be as typeSizesStyle};
|
|
18
|
+
`}const a={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},P=[{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"}],$={selected:0,themes:P};function S(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...$}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function f(e,t,n){const r=u(e),o=u(t);if(r===null||o===null)return e;const i=c=>Math.max(0,Math.min(255,Math.round(c))).toString(16).padStart(2,"0");return`#${r.map((c,O)=>i(c+(o[O]-c)*n)).join("")}`}const F={light:"#ffffff",dark:"#0a0a0a"},Re=["light","dark"];function we(e,t){const n=F[t],r=t==="light"?"#ffffff":"#000000";return{text:n,accent:n,background:e,surface:f(e,r,.1),line:f(e,r,.22),muted:f(n,e,.35),brandInk:t}}function s(e){const t=S(e);return t.themes[t.selected]}function d(e){return{text:e.text,accent:e.accent,background:e.background||a.background,surface:e.surface||a.surface,line:e.line||a.line,muted:e.muted||a.muted}}function Ce(e){return{fill:d(e).background,accent:e.accent}}function u(e){const t=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e.trim());if(!t)return null;const n=t[1].length===3?[...t[1]].map(c=>c+c).join(""):t[1],[r,o,i]=[0,2,4].map(c=>parseInt(n.slice(c,c+2),16));return[r,o,i]}function g(e){const t=u(e);if(t===null)return null;const[n,r,o]=t.map(i=>{const c=i/255;return c<=.04045?c/12.92:((c+.055)/1.055)**2.4});return .2126*n+.7152*r+.0722*o}const U=.4,G=4.5,Y=3;function z(e,t){const n=g(e),r=g(t);if(n===null||r===null)return null;const[o,i]=n>=r?[n,r]:[r,n];return(o+.05)/(i+.05)}const De={good:"Good","large-only":"Large text only",hard:"Hard to read"};function He(e){return e>=G?"good":e>=Y?"large-only":"hard"}const m=["#000000","#ffffff"];function l(e){let t=m[0],n=-1;for(const r of m){const o=z(e,r);if(o===null)return m[0];o>n&&(n=o,t=r)}return t}const X=[.25,.4,.55];function Ie(e){const t=u(e);return t===null?[]:X.map(n=>"#"+t.map(r=>Math.round(r*(1-n)).toString(16).padStart(2,"0")).join(""))}function Me(e){const t=s(e),n={"--theme-fg":t.text},r=g(t.text);return(r===null||r>=U)&&(n["--overlay-fg"]=t.text),n}const B=82;function p(e){return`color-mix(in srgb, ${e} ${B}%, #000)`}function ye(e){const t=s(e);return{"--theme-accent":t.accent,"--theme-accent-2":p(t.accent),"--theme-accent-ink":l(t.accent)}}function A(e){const t=e?.button;return/^#[0-9a-fA-F]{6}$/.test(t??"")?t.toLowerCase():null}function Ne(e){const t=s(e),n=A(t),r=T(t);if(n===null&&r===null)return{};const o={};return n!==null&&(o["--theme-btn"]=n,o["--theme-btn-2"]=p(n)),o["--theme-btn-ink"]=r??l(n),o}function T(e){const t=e?.buttonInk;return/^#[0-9a-fA-F]{6}$/.test(t??"")?t.toLowerCase():null}function Oe(e,t){return T(e)??l(A(e)??t)}function Le(e){const t={};return S(e).themes.forEach((n,r)=>{const o=d(n);t[`--theme-preset-${r}-accent`]=o.accent,t[`--theme-preset-${r}-accent-2`]=p(o.accent),t[`--theme-preset-${r}-accent-ink`]=l(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 ke=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function Pe(e){const t=d(s(e)),n=`color-mix(in srgb, ${t.surface} 60%, ${t.line})`,r={"--theme-bg":t.background,"--theme-surface":t.surface,"--theme-line":t.line,"--theme-muted":t.muted};return(t.surface!==a.surface||t.line!==a.line)&&(r["--theme-surface-2"]=n),r}const W=["heading","body","label"],$e={heading:"Headings",body:"Body",label:"Labels"},Fe="body";function Ue(e){if(!e)return null;for(const t of W)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}const b=["headingLarge","headingMedium","headingSmall","accent","body","label"],Ge={headingLarge:"heading",headingMedium:"heading",headingSmall:"heading",accent:"heading",body:"body",label:"label"},Ye={headingLarge:"Large",headingMedium:"Medium",headingSmall:"Small",accent:"Size",body:"Size",label:"Size"},ze={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},K=8,V=200,Xe=1;function Z(e){if(typeof e!="number"||!Number.isFinite(e))return null;const t=Math.round(e);return t>=K&&t<=V?t:null}function j(e){const t={};for(const n of b)t[n]=Z(e?.[n]);return t}function Be(e){const t=j(e),n={};for(const r of b){const o=t[r];o!==null&&(n[`--size-${r}`]=`${o}px`)}return n}const q=["square","small","large"],J="small";function Q(e){return q.includes(e??"")?e:J}function We(e){return C(ee[Q(e)])}const R=0,v=40,ee={square:0,small:null,large:16},te={"--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 w(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(v,Math.max(R,Math.round(t))):null}function C(e){const t=w(e);return t===null?{}:Object.fromEntries(Object.entries(te).map(([n,r])=>{const o=t*r/16;return[n,o===0?"0":`${o}rem`]}))}function Ke(e){return C(w(e)??R)}const ne=["none","soft","lifted"],re="soft",D="none",oe=["tight","normal","roomy"],ie="normal",ce="normal",ae=["none","lift","highlight"],se="lift",ue="highlight",H="#141416";function I(e){return ne.includes(e??"")?e:re}function le(e){return oe.includes(e??"")?e:ie}function M(e){return ae.includes(e??"")?e:se}function he(e){return/^#[0-9a-fA-F]{6}$/.test(e??"")?e.toLowerCase():H}function Ve(e){const t=I(e);return t===D?void 0:t}function Ze(e){const t=le(e);return t===ce?void 0:t}function je(e){const t=M(e);return t===ue?void 0:t}function qe(e,t,n){const r=he(t);return r===H?{}:I(e)!==D||M(n)==="lift"?{"--sf-shadow-color":r}:{}}const fe=["normal","tight","compressed"],y="normal";function N(e){return fe.includes(e??"")?e:y}function Je(e){const t=N(e);return t===y?void 0:t}function Qe(e){switch(N(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}const ve=["authored","sentence"],et={case:"authored",weight:null,weightStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},x=100,_=900,de=24,ge=200;function h(e,t,n){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),n))}function E(e){const t=h(e?.weight,x,_),n=e?.case==="sentence"?"sentence":"authored",r=i=>i==null?t:h(i,x,_),o=i=>i==="sentence"?"sentence":i==="authored"?"authored":n;return{case:n,weight:t,weightStrong:h(e?.weightStrong,x,_),maxPx:h(e?.maxPx,de,ge),weight2:r(e?.weight2),weight3:r(e?.weight3),case2:o(e?.case2),case3:o(e?.case3)}}function tt(e){const t=E(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 nt(e){return E({case:e?.heading_case??void 0,weight:e?.heading_weight,weightStrong:e?.heading_weight_strong,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 rt(e){const t=E(e);return{heading_case:t.case,heading_weight:t.weight,heading_weight_strong:t.weightStrong,heading_max_px:t.maxPx,heading_2_weight:t.weight2,heading_3_weight:t.weight3,heading_2_case:t.case2,heading_3_case:t.case3}}export{X as ACCENT_DARKEN_STEPS,Re as BRAND_INKS,oe as CARD_GAPS,ne as CARD_SHADOWS,v as CORNER_RADIUS_MAX,R as CORNER_RADIUS_MIN,q as CORNER_STYLES,ee as CORNER_STYLE_TO_PX,ie as DEFAULT_CARD_GAP,re as DEFAULT_CARD_SHADOW,J as DEFAULT_CORNER_STYLE,y as DEFAULT_HEADING_COMPRESSION,et as DEFAULT_HEADING_TYPOGRAPHY,se as DEFAULT_HOVER_EFFECT,H as DEFAULT_SHADOW_COLOR,ze as DEFAULT_SIZES,a as DEFAULT_SURFACES,Ee as DEFAULT_SWITCH_SHOWN,P as DEFAULT_THEMES,_e as DEFAULT_THEME_MODE,$ as DEFAULT_THEME_VALUE,De as GRADE_LABEL,ve as HEADING_CASES,fe as HEADING_COMPRESSIONS,ge as HEADING_MAX_PX_MAX,de as HEADING_MAX_PX_MIN,_ as HEADING_WEIGHT_MAX,x as HEADING_WEIGHT_MIN,ae as HOVER_EFFECTS,ce as IDENTITY_CARD_GAP,D as IDENTITY_CARD_SHADOW,ue as IDENTITY_HOVER_EFFECT,Fe as NEUTRAL_TYPE_GROUP,G as READABILITY_AA,Y as READABILITY_AA_LARGE,Ge as SCALE_OF_STEP,b as SIZE_STEPS,Ye as SIZE_STEP_LABELS,V as TEXT_SIZE_MAX,K as TEXT_SIZE_MIN,Xe as TEXT_SIZE_STEP,Ae as THEME_DAY_END_HOUR,Se as THEME_DAY_START_HOUR,me as THEME_MODE_KEY,L as THEME_STORAGE_KEY,ke as THEME_SURFACE_KEYS,xe as THEME_SWITCH_HIDE,pe as THEME_SWITCH_KEY,W as TYPE_GROUPS,$e as TYPE_GROUP_LABELS,l as accentInk,we as brandTheme,be as buildThemeBootScript,Ze as cardGapAttr,Ve as cardShadowAttr,Qe as compressionMetrics,z as contrastRatio,C as cornerRadiusTokens,We as cornerStyleTokens,Ie as darkerAccents,He as gradeContrast,Je as headingCompressionAttr,nt as headingTypographyFromRow,tt as headingTypographyStyle,rt as headingTypographyToRow,je as hoverEffectAttr,k as isDayHour,le as normalizeCardGap,I as normalizeCardShadow,w as normalizeCornerRadius,Q as normalizeCornerStyle,N as normalizeHeadingCompression,E as normalizeHeadingTypography,M as normalizeHoverEffect,he as normalizeShadowColor,Z as normalizeSize,j as normalizeSizes,S as normalizeTheme,d as normalizeThemeColors,Te as resolveTheme,Oe as resolvedButtonInk,s as selectedThemeColors,qe as shadowColorTokens,Ke as siteCornerRadiusTokens,ye as themeAccentStyle,A as themeButtonColour,T as themeButtonInk,Ne as themeButtonStyle,Me as themeColorStyle,Le as themePresetAccentVars,Pe as themeSurfaceStyle,Ce as themeSwatchColors,Ue as typeScaleGroupOfClassName,Be as typeSizesStyle};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-web-builder",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "The EFFICIENT website builder: the website editor, the general sections and the renderer that draws them, compiled. Hostable by any EFFICIENT product; nothing here imports a host.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Efficient Pty Ltd",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"typecheck": "tsc --noEmit",
|
|
32
32
|
"test:boundary": "node scripts/test-boundary.mjs",
|
|
33
33
|
"test:screen": "node scripts/test-screen-in-easel.mjs",
|
|
34
|
-
"test:own-ui": "
|
|
34
|
+
"test:own-ui": "efficient-shell-ui-check",
|
|
35
35
|
"build": "node scripts/build.mjs",
|
|
36
36
|
"verify:dist": "node scripts/verify-dist.mjs",
|
|
37
37
|
"verify": "pnpm run typecheck && pnpm run test:boundary && pnpm run test:screen && pnpm run test:own-ui && pnpm run test:guards && pnpm run build && pnpm run verify:dist",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@tabler/icons-react": "^3.46.0",
|
|
42
|
-
"efficient-easel": "^
|
|
43
|
-
"efficient-shell": "^4.
|
|
42
|
+
"efficient-easel": "^2.0.0",
|
|
43
|
+
"efficient-shell": "^4.171.0",
|
|
44
44
|
"isomorphic-dompurify": "^3.18.0",
|
|
45
45
|
"next": ">=16",
|
|
46
46
|
"react": ">=19",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"@types/node": "^20",
|
|
59
59
|
"@types/react": "^19",
|
|
60
60
|
"@types/react-dom": "^19",
|
|
61
|
-
"efficient-easel": "^
|
|
62
|
-
"efficient-shell": "^4.
|
|
61
|
+
"efficient-easel": "^2.0.0",
|
|
62
|
+
"efficient-shell": "^4.171.0",
|
|
63
63
|
"esbuild": "^0.28.0",
|
|
64
64
|
"happy-dom": "^20.14.5",
|
|
65
65
|
"isomorphic-dompurify": "^3.18.0",
|