efficient-web-builder 2.1.0 → 4.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 +54 -0
- package/README.md +7 -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/PartInkControl.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/SectionEditor.js +1 -1
- package/dist/components/Split.js +1 -1
- package/dist/components/StylesPanel.js +1 -1
- package/dist/components/SwitchToBoxFooter.js +1 -1
- package/dist/components/TextStyleRow.js +1 -1
- package/dist/components/TextStylesField.js +1 -1
- package/dist/components/WebsiteScreenParts.js +1 -1
- package/dist/components/WebsiteSettingsPanel.d.ts +5 -9
- package/dist/components/WebsiteSettingsPanel.js +1 -1
- package/dist/components/storefront-editor.css +242 -335
- 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/ColourControl.d.ts +5 -0
- package/dist/lib/puck/ColourControl.js +1 -1
- package/dist/lib/puck/controls.d.ts +0 -10
- package/dist/lib/puck/controls.js +1 -1
- package/dist/lib/sections/section-number-style.js +1 -1
- package/dist/lib/source-rules/label-vocabulary.js +4 -4
- package/dist/lib/source-rules/one-colour-control.js +2 -2
- package/dist/lib/source-rules/site-square-by-default.js +3 -3
- package/dist/lib/source-rules/support/label-extraction.js +5 -5
- package/dist/lib/theme.js +1 -1
- package/package.json +5 -5
- package/dist/lib/puck/slider-typing.d.ts +0 -9
- package/dist/lib/puck/slider-typing.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,59 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.0.0 - 2026-10-11
|
|
4
|
+
|
|
5
|
+
- **Breaking: the site's corner tokens are `--site-radius-*`.**
|
|
6
|
+
`cornerRadiusTokens`, `siteCornerRadiusTokens` and `cornerStyleTokens`
|
|
7
|
+
publish `--site-radius` and `--site-radius-xs` … `--site-radius-4xl` where
|
|
8
|
+
they published Tailwind's `--radius` / `--radius-*`. efficient-shell's UI kit
|
|
9
|
+
reads `--radius-*` as its own tokens, and a host that puts the site's corners
|
|
10
|
+
on `<body>` squared the kit's dialogs and popovers on a site set to 0
|
|
11
|
+
(harness UI-24: editor chrome resolves to shell tokens). A host's stylesheet
|
|
12
|
+
points Tailwind's scale at the new names with `@theme inline`
|
|
13
|
+
(efficient-storefront-blocks does, in `app/globals.css`), and moves to this
|
|
14
|
+
release together with it.
|
|
15
|
+
- **Breaking: the sections paint `--site-surface`, `--site-surface-2` and
|
|
16
|
+
`--site-line`**, the names the site's sheet declares those colours under now,
|
|
17
|
+
for the same collision (the kit declares `--surface` and `--line`).
|
|
18
|
+
- **Stored fills keep their words.** A section's or a card's stored
|
|
19
|
+
`var(--surface)` / `var(--surface-2)` — the swatch values, and what the
|
|
20
|
+
backend's 66037 migration wrote into published Stats bands — is translated
|
|
21
|
+
where it is painted: `resolveSectionBackground`, `resolveCardImageBackground`
|
|
22
|
+
and `resolveBoundCardImageBackground` return the `--site-` spelling
|
|
23
|
+
(`paintedFill` in `lib/content/section-background`). No document changes.
|
|
24
|
+
The panel compares against the stored words through the new
|
|
25
|
+
`cardImageBackgroundChoice`.
|
|
26
|
+
|
|
27
|
+
## 3.0.0 - 2026-10-10
|
|
28
|
+
|
|
29
|
+
- **efficient-easel 1.0.0 and efficient-shell ^4.165.0** (peers; were
|
|
30
|
+
^0.106.0 and ^4.163.0; Efficient-Pty-Ltd/efficient-easel#199, harness
|
|
31
|
+
UI-24). The editor's controls are efficient-shell's: buttons, tabs,
|
|
32
|
+
segmented strips, switches, dropdowns, number boxes, sliders, menus, the
|
|
33
|
+
Layers tree, the rail and the resize grips. A host loads
|
|
34
|
+
`efficient-shell/ui.css`, compiled by its own Tailwind, before easel's
|
|
35
|
+
sheets and `components/storefront-editor.css`, which follows them.
|
|
36
|
+
- **Breaking:** `WebsiteSettingsPanel` no longer exports `TABPANEL_ID`. The
|
|
37
|
+
Site styles tabs are wired by `SettingsTabs` `idPrefix`
|
|
38
|
+
(`SITE_STYLES_ID_PREFIX`, `tabButtonId` / `tabPanelId`), the panel's look
|
|
39
|
+
hangs on `TABPANEL_CLASS`, and `SITE_STYLES_TABS` items lose `htmlId` /
|
|
40
|
+
`panelId`.
|
|
41
|
+
- **The website's own buttons are the shell's:** Switch to Box footer and
|
|
42
|
+
Save as Template are `Button`; the Preview link wears `buttonClasses`.
|
|
43
|
+
- **storefront-editor.css** drops the rules drawn by no file
|
|
44
|
+
(`.sf-colstep-btn`, `.sf-blogsource-btn`, `.sf-actions-slot`) and its own
|
|
45
|
+
look for the copy box's mark buttons (the shell's `IconButton` with
|
|
46
|
+
`aria-pressed`).
|
|
47
|
+
- **Fix:** the inspector's Duplicate section and Remove section refuse a page
|
|
48
|
+
somebody else holds, as every other edit already did.
|
|
49
|
+
- **Also ships #46**, which 2.1.0 lacks: every slider is the shell's `Slider`
|
|
50
|
+
(`SliderValue` and `lib/puck/slider-typing` are gone), the colour control is
|
|
51
|
+
the shell's `ColorPicker` + `HexInput`, the last chrome `title=` are the
|
|
52
|
+
shell's `Tooltip`, and the chrome's sheet reads only shell tokens.
|
|
53
|
+
- **Lost until efficient-shell adds it:** a dropdown's closed value is no
|
|
54
|
+
longer drawn in its own face (the Text style and part font rows); the shell
|
|
55
|
+
`Select` takes no `renderValue`.
|
|
56
|
+
|
|
3
57
|
## 2.1.0 - 2026-10-10
|
|
4
58
|
|
|
5
59
|
- **The editor's chrome takes its UI from `efficient-shell`** (#44, harness
|
package/README.md
CHANGED
|
@@ -89,6 +89,13 @@ import "efficient-web-builder/components/storefront-editor.css";
|
|
|
89
89
|
Inside the package `@/…` is already a relative path, so a host needs no
|
|
90
90
|
mapping of its own. It installs the peer dependencies the manifest lists.
|
|
91
91
|
|
|
92
|
+
The sheets load in one order. Since `efficient-easel` 1.0 the editor's
|
|
93
|
+
controls are `efficient-shell/ui`'s, and easel's tokens resolve to the
|
|
94
|
+
shell's with no fallback, so `efficient-shell/ui.css` comes first, compiled
|
|
95
|
+
by the host's own Tailwind (its `@source` scans the shell's `dist/`). Then
|
|
96
|
+
easel's sheets (`efficient-easel/screen.css`), then
|
|
97
|
+
`components/storefront-editor.css`.
|
|
98
|
+
|
|
92
99
|
### Releasing
|
|
93
100
|
|
|
94
101
|
A merge is not a release. The pull request that wants hosts to see a change
|
|
@@ -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
|
|
1
|
+
"use client";import{jsx as s,jsxs as o}from"react/jsx-runtime";import{ColorSwatch as c,Tooltip as m}from"efficient-shell/ui";import{AnyColourSwatch as f}from"../lib/puck/ColourControl.js";function x({value:r,label:t,colors:i,onChange:d}){const p=r===null,a=r||void 0,n=i.find(e=>e.key===a),l=n?n.value:a&&/^#[0-9a-f]{6}$/i.test(a)?a:void 0;return o("div",{className:"sf-part-ink",children:[o("div",{className:"sf-part-ink-top",children:[s("span",{className:"sf-part-ink-label",children:t}),s("span",{className:"sf-part-ink-read",children:l?l.toUpperCase():p?"Mixed":"Follows the style"})]}),o("div",{className:"sf-part-ink-swatches",role:"group","aria-label":t,children:[i.map(e=>s(m,{content:`${e.name} · ${e.value.toUpperCase()}`,children:s(c,{color:e.value,"aria-label":e.name,size:"sm",selected:a===e.key,onClick:()=>d(a===e.key?null:e.key)})},e.key)),f({value:n?"":(l??"").toLowerCase(),label:"Any color",onChange:d})]})]})}export{x as PartInkControl};
|
|
@@ -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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsxs as l,jsx as n,Fragment as w}from"react/jsx-runtime";import{useState as
|
|
1
|
+
"use client";import{jsxs as l,jsx as n,Fragment as w}from"react/jsx-runtime";import{useState as de}from"react";import{useEasel as me}from"efficient-easel/easel";import{InspectorHead as fe,InspectorIconButton as F}from"efficient-easel/chrome";import{DuplicateIcon as ue,TrashIcon as he}from"efficient-easel/icons";import{panelFieldsOf as Se}from"../lib/puck/panel-fields.js";import{TICKER_PART_LABEL as x}from"./PreviewTickerContext.js";import be from"./SectionIcon.js";import{PanelHideButton as B}from"./SidePanelHead.js";import{useEditorSession as ge}from"../lib/editor-session-context.js";import ke,{HintsToggle as we,SHOW_HINTS_DEFAULT as ve}from"./WebsiteSettingsPanel.js";import Pe from"./ChatSettingsPanel.js";import ye from"./SocialLinksPanel.js";import Ie from"./TickerSettingsPanel.js";import Ee,{PartSourceNote as Te,partStyleName as Le}from"./PartSettingsPanel.js";import Ne from"./DuplicateToPageMenu.js";import{useStorefrontDocument as Oe}from"./StorefrontDocumentContext.js";import{usePreviewHeader as He}from"./PreviewHeaderContext.js";import{usePartStyle as _e}from"./PreviewPartStyleContext.js";import{useSectionOps as Re}from"../lib/puck/use-section-ops.js";import{SELECTION_MODE as Ce}from"../lib/editor-screen.js";import{usePreviewParts as De}from"./PreviewPartsContext.js";import{SectionTextEntries as Ae}from"./SectionTextEntries.js";import{SectionTextSuppressProvider as Fe}from"../lib/puck/section-text-suppress.js";import{HEADER_TYPE as xe,ROOT_ZONE as z}from"../lib/puck/content-tree.js";import{duplicateBlocked as Be}from"../lib/hero-group-placement.js";import{FOOTER_TYPE as v}from"../lib/puck/footer-blocks.js";import ze from"./SwitchToBoxFooter.js";import{SiteFields as K}from"./SiteFields.js";import{SITE_FOOTER_SLUG as Ke}from"../lib/content/footer.js";import{SettingsSwitch as Me}from"efficient-easel/panel";import{foldTopTier as We}from"../lib/puck/field-groups.js";import{FoldHeadingScope as $e}from"../lib/puck/panel-heading-scope.js";import{partRowField as je}from"../lib/puck/part-row-field.js";import{decodePartKey as Ue,partRowHeadLabel as Ye}from"../lib/puck/part-rows.js";import{encodePartId as M,partHeadLabel as Ge,partLabel as Ze,sectionTextParts as qe}from"../lib/puck/text-parts.js";import{partSourceOf as Je,sourceSlugOf as Qe}from"../lib/puck/source-bound-parts.js";const Mt=Ce,Wt={kind:"header"},$t={kind:"website"},jt={kind:"chat"},Ut={kind:"social"},f="Part";function Ve(t,o,i){const p=t.describeNode(o);return{name:i,kindLabel:p?`${f} of ${p.label}`:f}}function W({what:t}){return l("div",{className:"sf-note",children:[n("p",{children:l("strong",{children:[t," settings belong to a website."]})}),l("p",{children:["A template is a blueprint — it has no website of its own, so there is nothing here to change. Each website created from this template sets its own ",t.toLowerCase()," afterwards."]})]})}const Xe={header:{name:"Header",kindLabel:"Site settings",icon:"header",render:(t,o)=>{const i=o.hostPanels?.header;return i?n(i,{placeholderMode:o.capabilities.placeholderFrames,tokenRef:o.tokenRef,siteId:o.siteId,websiteName:o.websiteName,onOpenWebsiteSettings:o.onOpenWebsiteSettings,onAuthExpired:()=>o.notifyParent("storefront-editor:auth-expired")}):null}},website:{name:"Appearance",kindLabel:"Site settings",icon:"website",render:(t,o)=>n(ke,{themeFromDocument:!o.capabilities.hasSiteTheme,tokenRef:o.tokenRef,siteId:o.siteId,onNotify:o.onNotify})},chat:{name:"Live chat",kindLabel:"Site settings",icon:"chat",render:()=>n(Pe,{})},social:{name:"Social links",kindLabel:"Site settings",icon:"social",render:()=>n(ye,{unavailable:n(W,{what:"Social link"})})},ticker:{name:x,kindLabel:f,icon:"ticker",head:(t,o)=>t.kind==="ticker"?Ve(o,t.heroId,x):null,render:t=>n(Ie,{heroId:t.kind==="ticker"?t.heroId:""})},part:{name:f,kindLabel:f,icon:"Text",head:(t,o)=>{if(t.kind!=="part")return null;const i=o.describeNode(t.nodeId);if(!i)return null;const{key:p,row:u}=Ue(t.propKey),b=u?je(i.fields[p],u):i.fields[p],m=Ye(Ge(Ze(b??{},p)),u);return{name:o.styleNameOfPart(t.nodeId,t.propKey)??m,kindLabel:`${f} of ${i.label}`}},render:(t,o)=>t.kind==="part"?n(Ee,{nodeId:t.nodeId,propKey:t.propKey,onBack:()=>o.onSelectNode(t.nodeId),onEditStyle:o.onOpenSiteStyles}):null}},et=new Set(["header","website","chat"]);function tt(t,o){if(t==="puck")return null;const i=Xe[t];return et.has(t)&&!o.hasSiteSettings?{...i,kindLabel:"Not part of a template",render:()=>n(W,{what:i.name})}:i}function nt({mode:t,onOpenWebsiteSettings:o,onOpenSiteStyles:i,onSelectNode:p,hideNodeActions:u=!1,onNotify:b,onHidePanel:m}){const{capabilities:h,tokenRef:P,notifyParent:$,currentSlug:y,siteId:I,runAuthed:j,readOnly:U}=Oe(),{websiteName:Y,fonts:G}=He(),{partStyle:E}=_e(),g=Re({readOnly:U}),{select:Z}=De(),{selectedItem:e,getItemById:T,getSelectorForId:q,config:c,appState:J}=me(a=>a),Q=Se(c,e?{type:e.type,props:e.props}:null),V=a=>c.components[a]?.label??a,r=e?q(e.props.id):void 0,s=tt(t.kind,h),L=ge(),N=L.chrome?.panels?.chromePage,O={capabilities:h,tokenRef:P,hostPanels:L.chrome?.panels,describeNode:a=>{const d=T(a);if(!d)return null;const S=c.components[d.type];return{type:d.type,label:S?.label??d.type,fields:S?.fields??{}}},styleNameOfPart:(a,d)=>{const S=T(a);if(!S)return null;const pe=M(a,d),ce=E?.partId===pe?E:null;return Le(S.props,d,ce,G)},siteId:I,websiteName:Y??null,notifyParent:$,onNotify:b,onOpenWebsiteSettings:o,onOpenSiteStyles:i,onSelectNode:p},H=s?.head?.(t,O)??null,X=H?.name??(s?s.name:e?V(e.type):"Page settings"),ee=H?.kindLabel??(s?s.kindLabel:e?r&&r.zone!==z?"Block":"Section":"Page"),te=s?s.icon:e?e.type:"page",_=s?null:e?c.components[e.type]?.fields??null:c.root?.fields??null,ne=_?We(_):2,R=t.kind==="puck"&&e?Je(e.type):null,oe=!!e&&!!r&&r.zone===z&&e.type!==v&&e.type!==xe,k=Be(J?.data,e),ie=()=>{k||r&&g.duplicateComponent(r.zone,r.index)},re=()=>{r&&(g.removeComponent(r.zone,r.index),g.select(null))},se=e?c.components[e.type]?.defaultProps?.previewHover:void 0,C=t.kind==="puck"&&!!e&&!!r&&se!==void 0,D=C&&e.props.previewHover===!0,ae=()=>{!e||!r||g.replaceComponent(r.zone,r.index,{...e,props:{...e.props,previewHover:!D}})},[A,le]=de(ve);return l("div",{className:`es-sidepanel es-sidepanel--right sf-panel sf-panel--right${A||!(!s&&!!e)?"":" sf-hints-folded"}`,children:[n(fe,{icon:n(be,{type:te,size:15}),name:X,kind:ee,actions:!u&&t.kind==="puck"&&e&&e.type!==v?l(w,{children:[n(F,{label:"Duplicate section",title:k??void 0,disabled:k!==null,onClick:ie,children:n(ue,{size:15})}),oe&&h.hasSiteSettings&&n(Ne,{node:e,currentSlug:y,siteId:I??void 0,tokenRef:P,runAuthed:j,onNotify:b}),n(F,{label:"Remove section",danger:!0,onClick:re,children:n(he,{size:15})}),m?n(B,{side:"right",onHide:m,divider:!0}):null]}):m?n(B,{side:"right",onHide:m}):void 0}),C&&l("div",{className:"sf-preview-pin",children:[l("div",{className:"sf-preview-pin-text",children:[n("span",{className:"sf-preview-pin-label",children:"Preview hover state"}),n("span",{className:"sf-preview-pin-hint",children:"not shown live"})]}),n(Me,{checked:D,onChange:ae,ariaLabel:"Preview hover state"})]}),n($e,{tier:ne,children:n("div",{className:"sf-insp-body sf-scroll",children:s?s.render(t,O):e?l(w,{children:[n(Fe,{children:n(K,{entries:n(Ae,{parts:qe(Q??c.components[e.type]?.fields,e.props),onOpen:a=>Z(M(e.props.id,a))})})}),e.type===v&&h.hasSiteSettings&&n(ze,{}),R&&n(Te,{source:R,slug:Qe(e?.props)}),n(we,{shown:A,onChange:le})]}):l(w,{children:[n(K,{}),y===Ke&&h.hasSiteSettings&&N&&n(N,{})]})})})]})}export{jt as CHAT_MODE,Wt as HEADER_MODE,Mt as PUCK_MODE,Ut as SOCIAL_MODE,$t as WEBSITE_MODE,nt as default,tt as resolvePanel};
|
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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import m,{useWebsiteName as c}from"./WebsiteSettingsPanel.js";import
|
|
1
|
+
"use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import m,{useWebsiteName as c}from"./WebsiteSettingsPanel.js";import f from"./SidePanelHead.js";import{StylesIcon as d}from"efficient-easel/rail";import{Tooltip as p}from"efficient-shell/ui";function S({tokenRef:t,siteId:n,onClose:i,onNotify:o,tab:a,onTabChange:l}){const s=c();return r("div",{className:"sf-styles",children:[e(f,{icon:e(d,{}),title:"Site styles",context:e(p,{content:`${s} — renamed in the Console: Storefront ▸ Sites ▸ Settings.`,className:"sf-name-tip",children:e("span",{className:"sf-name-text",children:s})}),onHide:i}),e("div",{className:"sf-insp-body sf-scroll",children:e(m,{tokenRef:t,siteId:n,onNotify:o,tab:a,onTabChange:l})})]})}export{S as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as
|
|
1
|
+
"use client";import{jsx as e,jsxs as i}from"react/jsx-runtime";import{useState as w}from"react";import{createNode as x,newId as k}from"efficient-easel/data";import{useEasel as g}from"efficient-easel/easel";import{Button as s}from"efficient-shell/ui";import{useStorefrontDocument as y}from"./StorefrontDocumentContext.js";import{boxFooterFromFooter as S}from"../lib/puck/box-footer.js";import{FOOTER_TYPE as E}from"../lib/puck/footer-blocks.js";import{SITE_FOOTER_TYPE as a,withSectionGroup as F}from"../lib/puck/section-groups.js";function T(){const{appState:c,dispatch:l,config:m}=g(o=>o),{readOnly:f}=y(),[p,r]=w(!1),n=c.data.content;if(f||n.some(o=>o.type===a))return null;const d=n.find(o=>o.type===E)??null,u=(o,t)=>x(m,o,t),h=()=>{const o=S(d,u,k(a));l({type:"setData",data:t=>({...t,content:[...F(t.content,o)]}),recordHistory:!0}),r(!1)};return i("div",{className:"sf-box-footer-switch",children:[e("p",{className:"sf-box-footer-switch-text",children:"Build this footer out of Boxes and blocks, like a page: the same menus, signup, social links and logo, with the copyright as a Legal Line. Your current footer is kept."}),p?i("div",{className:"sf-box-footer-switch-row",children:[e(s,{variant:"primary",size:"sm",onClick:h,children:"Switch now"}),e(s,{variant:"secondary",size:"sm",onClick:()=>r(!1),children:"Cancel"})]}):e(s,{variant:"secondary",size:"sm",onClick:()=>r(!0),children:"Switch to Box footer"})]})}export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as s,jsxs as i}from"react/jsx-runtime";import{ChevronIcon as f}from"efficient-easel/icons";import{Tooltip as h}from"efficient-shell/ui";function m({styleKey:a,label:r,icon:l,value:e,sampleStyle:t,open:n,onToggle:o,saved:d=!1,children:c}){return i("div",{"data-sf-style-row":a,className:`sf-style-row${n?" is-open":""}`,children:[i("button",{type:"button",className:"sf-style-head","aria-expanded":n,onClick:o,children:[s("span",{className:"sf-style-caret","aria-hidden":"true",children:s(f,{size:13})}),l?s("span",{className:"es-field-icon",children:l}):null,s("span",{className:"sf-style-name",children:r}),e!=null?typeof e=="string"?s(h,{content:e,className:"sf-style-sample-tip",children:s("span",{className:"sf-style-sample",style:t,children:e})}):s("span",{className:"sf-style-sample",style:t,children:e}):null,s("span",{className:`sf-style-slot${d?" is-saved":""}`,children:s(p,{})})]}),n&&s("div",{className:"sf-style-body",children:c})]})}function p(){return s("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:s("polyline",{points:"20 6 9 17 4 12"})})}export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as
|
|
1
|
+
"use client";import{jsx as t,jsxs as A,Fragment as T}from"react/jsx-runtime";import{FieldSelect as G}from"efficient-easel/fields";import{SettingsField as v}from"efficient-easel/panel";import{Tooltip as C}from"efficient-shell/ui";import{AccentIcon as D,CaseIcon as X,StylesIcon as B,TextLinesIcon as L,TextSizeIcon as b,TextSmallIcon as $,TypeIcon as W,WeightIcon as k}from"efficient-easel/icons";import{PartResetDot as x}from"./PartSettingsPanel.js";import{Slider as R}from"../lib/puck/controls.js";import z from"./TextStyleRow.js";import{DEFAULT_FONTS as O,FONT_CATEGORY_LABELS as K,fontItalicIsUsable as j,fontOption as E,fontsByCategory as Z,isHeadingRole as m}from"../lib/fonts.js";import{compressionMetrics as U,DEFAULT_HEADING_COMPRESSION as F,HEADING_MAX_PX_MAX as V,HEADING_MAX_PX_MIN as Y,HEADING_WEIGHT_MAX as q,HEADING_WEIGHT_MIN as J,TEXT_SIZE_MAX as Q,TEXT_SIZE_MIN as w,SIZE_STEPS as H,TEXT_SIZE_STEP as ee}from"../lib/theme.js";const te=[{role:"heading",title:"Heading 1",group:"heading",step:"headingLarge",base:17,icon:t(b,{})},{role:"heading2",title:"Heading 2",group:"heading",step:"headingMedium",base:15,icon:t(b,{})},{role:"heading3",title:"Heading 3",group:"heading",step:"headingSmall",base:13,icon:t(b,{})},{role:"accent",title:"Accent",step:"accent",base:15,icon:t(D,{})},{role:"body",title:"Body",group:"body",step:"body",base:14,icon:t(L,{})},{role:"label",title:"Labels",group:"label",step:"label",base:11,icon:t($,{})}];function ye(n){return n==="heading"?H.filter(i=>i.startsWith("heading")):H.filter(i=>i===n)}const le=9,g=500,ne=100,ae=80,ie=4,se=600,oe=700,ce=400,re="0.18em";function ue({id:n,value:i,onChange:a}){const o=Z().flatMap(([l,c])=>c.map(s=>({label:s.label,value:s.key,group:K[l]}))),r=(l,c)=>t("span",{style:{fontFamily:`var(${E(l)?.cssVar??"--font-body"})`},children:c});return t(G,{id:n,value:i,onChange:a,options:o,renderOption:l=>r(l.value,l.label),renderValue:l=>l?r(l.value,l.label):null})}function he({label:n,icon:i,readout:a,min:o,max:r,step:l,value:c,onChange:s,action:h,hint:d}){return t(v,{label:n,icon:i,value:a,action:h,hint:d,children:t(R,{min:o,max:r,step:l,value:c,readout:!1,ariaLabel:n,onChange:s})})}function y({label:n,icon:i,value:a,fallback:o,min:r,max:l,step:c,suffix:s="",hint:h,onChange:d}){const p=a===null;return t(he,{label:n,icon:i,readout:p?"Auto":`${a}${s}`,min:r,max:l,step:c,value:p?o:a,onChange:d,action:p?null:t(x,{label:n,what:"change",onClear:()=>d(null)}),hint:h})}function P({label:n,icon:i,options:a,value:o,onChange:r,hint:l,action:c}){return t(v,{label:n,icon:i,value:a.find(s=>s.value===o)?.label,hint:l,action:c,children:t("div",{className:"sf-rungs",children:a.map(s=>t("button",{type:"button","aria-pressed":s.value===o,onClick:()=>r(s.value),className:`sf-rung${s.value===o?" is-active":""}`,children:s.label},s.value))})})}const de=[{value:"authored",label:"As designed"},{value:"sentence",label:"As typed"}],ge=[{value:"normal",label:"Normal"},{value:"tight",label:"Tight"},{value:"compressed",label:"Compressed"}];function fe({fontKey:n,weight:i,fallbackWeight:a,onWeight:o}){const l=(i??a)>=se,c=j(n),s=E(n)?.label??"This face";return t(v,{label:"Style",icon:t(B,{}),value:l?"Bold":"Normal",hint:"Bold is the weight above — one value, two ways to set it.",children:A("div",{className:"sf-rungs",children:[t(C,{content:"Bold",className:"sf-rung-tip",children:t("button",{type:"button","aria-pressed":l,"aria-label":"Bold",onClick:()=>o(l?ce:oe),className:`sf-rung sf-rung--glyph${l?" is-active":""}`,style:{fontWeight:700},children:"B"})}),t(C,{className:"sf-rung-tip",content:c?"Italic is not saved yet — the theme row has no column for it (card 66162.b).":`${s} is loaded without an italic, so it cannot be set in italic. Slanting it would deform the letters rather than style them.`,children:t("span",{className:"sf-tip-disabled",tabIndex:0,children:t("button",{type:"button","aria-pressed":!1,"aria-label":"Italic",disabled:!0,className:"sf-rung sf-rung--glyph",style:{fontStyle:"italic"},children:"I"})})})]})})}function be({fonts:n,compression:i,headingTypography:a,openRole:o,onOpenRole:r,onFontChange:l,sizes:c,onSizeChange:s,onCompressionChange:h,onHeadingTypographyChange:d,livePx:p,savedRole:M=null}){const f=e=>d({...a,...e}),S=e=>e==="accent"?"weightStrong":e==="heading2"?"weight2":e==="heading3"?"weight3":"weight",_=e=>e==="heading2"?"case2":e==="heading3"?"case3":"case",I=U(i);return t("div",{className:"sf-style-list",children:te.map(e=>{const N=o===e.role;return t(z,{styleKey:e.role,label:e.title,icon:e.icon,value:E(n[e.role])?.label??n[e.role],sampleStyle:me(e,n,a,I),open:N,onToggle:()=>r(N?null:e.role),saved:M===e.role,children:N&&A(T,{children:[t(v,{label:"Font",icon:t(W,{}),htmlFor:`sf-font-${e.role}`,action:n[e.role]===O[e.role]?null:t(x,{label:"Font",what:"change",onClear:()=>l(e.role,O[e.role])}),children:t(ue,{id:`sf-font-${e.role}`,value:n[e.role],onChange:u=>l(e.role,u)})}),e.step&&s&&t(y,{label:"Size",icon:t(b,{}),value:c[e.step],fallback:e.base*2,min:w,max:Q,step:ee,suffix:"px",hint:c[e.step]===null?"Auto = this style states no size, and text following it keeps the size its section drew.":"The size a text takes when you set it to follow this style. Sections keep their own sizes.",onChange:u=>s(e.step,u)}),(m(e.role)||e.role==="accent")&&A(T,{children:[t(y,{label:"Weight",icon:t(k,{}),value:a[S(e.role)],fallback:m(e.role)?g:a.weight??g,min:J,max:q,step:ne,hint:e.role==="accent"?"Auto = the accent phrase takes the heading's own weight.":void 0,onChange:u=>f({[S(e.role)]:u})}),t(fe,{fontKey:n[e.role],weight:a[S(e.role)],fallbackWeight:m(e.role)?g:a.weight??g,onWeight:u=>f({[S(e.role)]:u})})]}),m(e.role)&&A(T,{children:[t(P,{label:"Line & text gap",icon:t(L,{}),options:ge,value:i,onChange:h,hint:I.lineHeight===void 0?"The built-in spacing.":`Line gap ${I.lineHeight} · text gap ${I.letterSpacing}em.`,action:i===F?null:t(x,{label:"Line & text gap",what:"change",onClear:()=>h(F)})}),t(P,{label:"Capitals",icon:t(X,{}),options:de,value:a[_(e.role)],onChange:u=>f({[_(e.role)]:u}),hint:"The only setting that changes a heading's capitals.",action:a[_(e.role)]==="authored"?null:t(x,{label:"Capitals",what:"change",onClear:()=>f({[_(e.role)]:"authored"})})}),t(y,{label:"Largest size",icon:t(b,{}),value:a.maxPx,fallback:ae,min:Y,max:V,step:ie,suffix:"px",hint:"Caps the biggest heading on the site. Auto = each section's own.",onChange:u=>f({maxPx:u})})]})]})},e.role)})})}function me(n,i,a,o){const r=Math.max(le,n.base),l={fontFamily:`var(${E(i[n.role])?.cssVar??"--font-body"})`,fontSize:`${r.toFixed(1)}px`,lineHeight:1.15};return m(n.role)?(l.fontWeight=a.weight??g,l.textTransform=a.case==="sentence"?"none":"uppercase",o.letterSpacing!==void 0&&(l.letterSpacing=`${o.letterSpacing}em`)):n.role==="accent"?(l.fontWeight=a.weightStrong??a.weight??g,o.letterSpacing!==void 0&&(l.letterSpacing=`${o.letterSpacing}em`)):n.role==="label"&&(l.textTransform="uppercase",l.letterSpacing=re),l}export{be as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as e,jsxs as b}from"react/jsx-runtime";import{useCallback as k,useEffect as f,useState as Y}from"react";import{ExternalIcon as F}from"efficient-easel/icons";import{Button as G,Tooltip as O,buttonClasses as j}from"efficient-shell/ui";import{SettingsSwitch as z}from"efficient-easel/panel";import{PagesIcon as K,StylesIcon as U}from"efficient-easel/rail";import{TreeRow as Z}from"efficient-easel/tree";import q from"./HeadingAudit.js";import{LocationsTreeContext as X}from"./LocationsTreeContext.js";import J from"./PagesPanel.js";import{usePreviewChat as Q}from"./PreviewChatContext.js";import{PREVIEW_DEVICES as $}from"./preview-devices.js";import{PreviewDeviceContext as ee}from"./PreviewDeviceContext.js";import{usePreviewHeader as te}from"./PreviewHeaderContext.js";import{usePreviewSocial as oe}from"./PreviewSocialContext.js";import{usePreviewSurface as re}from"./PreviewSurfaceContext.js";import{TICKER_PART_LABEL as ie,usePreviewTicker as se}from"./PreviewTickerContext.js";import ne,{CHAT_MODE as ae,HEADER_MODE as y,SOCIAL_MODE as ce,WEBSITE_MODE as B}from"./SectionEditor.js";import g from"./SectionIcon.js";import le from"./SectionThumbnail.js";import{useStorefrontDocument as I}from"./StorefrontDocumentContext.js";import de from"./StylesPanel.js";import pe from"./TemplateGlyph.js";import{useFooterFocus as me}from"./useFooterFocus.js";import{LOCATIONS_TYPE as fe,useLocationsTree as ue}from"./useLocationsTree.js";import{usePinnedChromeSeed as Se}from"./usePinnedChromeSeed.js";import{usePreviewHref as Ee}from"./usePreviewHref.js";import{SITE_STYLES_TABS as Te,SITE_STYLES_TEXT_TAB as he,useWebsiteName as we}from"./WebsiteSettingsPanel.js";import{HERO_GROUP_TYPE as Pe,duplicateBlocked as ve,heroGroupNestDepth as be}from"../lib/hero-group-placement.js";import{stripMarkup as ke}from"../lib/markup.js";import{categoryShortLabel as ge,PINNED_SECTION_TYPE as Ie}from"../lib/puck/add-palette.js";import{canAddTo as Ce}from"../lib/puck/add-target.js";import{blockIsOffered as _e}from"../lib/puck/block-offer.js";import{sectionIdOfBoxZone as Le,setBookingPreview as Oe}from"../lib/puck/booking-preview.js";import{footerBlockRowName as ye}from"../lib/puck/footer-block-row-name.js";import{FOOTER_TYPE as Be,HEADER_TYPE as A}from"../lib/puck/footer-blocks.js";import{leftViewForSelection as Ae,readLeftView as Ne,resolveLeftView as Re,writeLeftView as He}from"../lib/puck/left-view.js";import{isLockedBlock as De}from"../lib/puck/locked-blocks.js";import{scrollPreviewToSection as xe,scrollPreviewToTop as N}from"../lib/puck/preview-dom.js";import{SiteCanvas as Ve}from"../lib/puck/overrides.js";import{labelAtLevel as We}from"../lib/puck/section-catalog.js";import{SECTION_DESCRIPTIONS as Me}from"../lib/puck/section-descriptions.js";import{isSectionGroupType as Ye,sectionGroupZone as Fe,SITE_FOOTER_TYPE as Ge,SITE_HEADER_TYPE as je}from"../lib/puck/section-groups.js";import{resolveSaveAsTemplateAction as ze,SAVE_AS_TEMPLATE_EVENT as Ke}from"../lib/save-as-template-action.js";import{newSectionNode as Ue}from"../lib/sections/new-section-node.js";import{useHostProducts as Ze}from"../lib/use-host-products.js";function R({mode:t,open:o}){const{setSelectedHeroId:r,setSelectHandler:c}=se(),l=t,n=l.kind==="ticker"?l.heroId:null,a=k(i=>{if(!i)return;o({kind:"ticker",heroId:i}),xe(i)},[o]);return f(()=>{r(n)},[n,r]),f(()=>{c(a)},[c,a]),{partRows:(i,{rowClick:m})=>{const s=String(i.props.id);return i.type==="Hero"&&e(Z,{icon:e(g,{type:"ticker",size:13}),name:ie,onSelect:()=>a(s),selected:n===s,rowProps:{onClick:m(()=>a(s))}})}}}function qe(){const{adapter:t,capabilities:o,currentSlug:r,siteId:c,hasUnsavedEdits:l,bridgeCapabilities:n,notifyParent:a,token:i}=I(),{hasPreviewLink:m}=o,s=ze({hasTrustedConsole:!!i,canCreatePlatformTemplate:n.canCreatePlatformTemplate,capabilities:o,siteId:c,hasUnsavedEdits:l}),T=k(()=>{!c||!r||a(Ke,{siteId:c,slug:r})},[a,c,r]),u=Ee({pageSlug:r,siteId:c,token:i}),S=t.previewHref?.(r)??u;return{barLead:()=>s.visible&&e(O,{side:"bottom",content:s.enabled?"Save this website as a platform template":s.disabledReason,children:e("span",{className:"sf-tip-disabled",tabIndex:s.enabled?void 0:0,children:e(G,{variant:"secondary",disabled:!s.enabled,onClick:T,rightIcon:e(pe,{}),children:"Save as Template"})})}),barTrail:()=>m&&r&&e(O,{content:"Preview the live site (opens in a new tab)",children:b("a",{className:j({variant:"secondary"}),href:S,target:"_blank",rel:"noopener noreferrer","aria-label":"Preview the live site in a new tab",children:["Preview",e(F,{size:15})]})})}}function Xe(){return b("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[e("path",{d:"M12 3a9 9 0 0 0 0 18 2.3 2.3 0 0 0 2.3-2.3c0-.55-.22-1.05-.57-1.42-.34-.37-.56-.87-.56-1.43A2.35 2.35 0 0 1 15.6 13.5H18a3 3 0 0 0 3-3c0-4.14-4-7.5-9-7.5z"}),e("circle",{cx:"7.7",cy:"11.3",r:"1.05",fill:"currentColor",stroke:"none"}),e("circle",{cx:"12",cy:"8",r:"1.05",fill:"currentColor",stroke:"none"}),e("circle",{cx:"16",cy:"11",r:"1.05",fill:"currentColor",stroke:"none"})]})}function Je(t,o){const{capabilities:r,templateId:c,siteId:l,tokenRef:n,navigate:a}=I(),{hasSiteTheme:i,explainsSiteSettings:m}=r,s=d=>o.setView(d),[T,u]=Y(Te[0].id),{surface:S,setSurface:w}=re(),P=()=>{if(i){s("styles"),o.reveal(),N();return}t.show(B),t.reveal(),N()},v={id:"pages",label:"Pages",icon:e(K,{}),panel:({onHide:d})=>e(J,{activeSurface:S,onPreviewSurface:w,onNavigate:p=>{w(null),a(c?{kind:"template",id:c,pageSlug:p}:{kind:"page",slug:p,siteId:l??void 0})},onClose:d})},E=[];return!i&&m&&E.push({id:"appearance",label:"Appearance",icon:e(Xe,{}),active:t.kind==="website",onSelect:P}),i&&E.push({id:"styles",label:"Site styles",icon:e(U,{}),panel:({onHide:d,notify:p})=>e(de,{tokenRef:n,siteId:l??void 0,onClose:d,onNotify:p,tab:T,onTabChange:u})}),{railLead:[v],railTrail:E,resolveLeftView:(d,p)=>Re(d,i,p),openSettings:P,openStyles:()=>{u(he),s("styles")}}}function Qe(t,o,r,c){const{kind:l,open:n}=t,{selected:a,zoneOf:i}=o,m=me(o,r);f(()=>{Oe(a?.type==="BookingBox"&&a.props.region==="confirm"?Le(i(String(a.props.id))):null)},[a?.props.id]);const s=ue(t,o),{capabilities:{hasSiteSettings:T}}=I(),{setSelected:u,setSelectHandler:S}=te(),{chat:w,setChat:P,setSelected:v,setSelectHandler:E}=Q(),d=l==="header";f(()=>{u(d)},[d,u]),f(()=>{S(()=>n(y))},[S,n]);const p=k(()=>n(ae),[n]),C=l==="chat";f(()=>{v(C)},[C,v]),f(()=>{E(p)},[E,p]);const{setOpenHandler:_}=oe(),L=k(()=>n(ce),[n]);f(()=>{_(L)},[_,L]);const D=R(t),x=qe(),V=Je(t,c),W=r.device;return{...m,...D,...x,...V,treeFoot:()=>e("div",{className:"sf-tree-tool",children:e(q,{})}),hasOwnRows:h=>h.type===fe,ownRows:s.renderLocationTree,sectionPressed:s.sectionPressed,wrap:h=>e(X.Provider,{value:!0,children:e(ee.Provider,{value:W,children:h})}),addPanelRow:h=>T?b("div",{className:"sf-addside-sitewide",children:[e("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:e(g,{type:"chat",size:16})}),b("button",{type:"button",className:"sf-addside-sitewide-name",onClick:()=>{h(),p()},children:["Live chat",e("span",{className:"sf-addside-sitewide-desc",children:"A chat bubble on every page"})]}),e(z,{checked:w.enabled,onChange:M=>P({enabled:M}),ariaLabel:"Show the chat bubble on the whole site"})]}):void 0}}const $e={isLockedBlock:De,duplicateBlocked:ve,nestDepth:(t,o,r)=>o===Pe?be(t,r):0,newSectionNode:Ue,canAddTo:Ce,blockIsOffered:_e},et={labelAtLevel:We,descriptions:Me,categoryLabel:ge,firstSection:Ie,blockRowName:ye,plainText:ke,Icon:g,Thumbnail:le,useProducts:Ze},tt={desktop:2e3,tablet:800,mobile:390},H="desktop",ot={options:$,initial:H,fluid:H,widths:tt},rt={read:Ne,write:t=>He(t),forSelection:(t,o)=>Ae(t,o)},it={first:A,last:Be,firstGroup:je,lastGroup:Ge,isSectionGroup:Ye,sectionGroupZone:Fe,panelOf:t=>t===A?y:null};function st(t){return{...R(t),openSettings:()=>t.show(B)}}const Qt={useOwnerName:we,useBridges:Qe,useStandaloneBridges:st,useDocumentPass:Se,blockRules:$e,blockLook:et,devices:ot,leftView:rt,pinned:it,Canvas:Ve,Inspector:ne};export{Qt as WEBSITE_SCREEN};
|
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
import { type SettingsTabItem } from "efficient-easel/panel";
|
|
2
3
|
import type { SiteThemeRowPatch } from "../lib/site-theme-row.js";
|
|
3
4
|
import { type CardShadow, type HoverEffect } from "../lib/theme.js";
|
|
4
|
-
export declare const
|
|
5
|
+
export declare const SITE_STYLES_ID_PREFIX = "sf-site-styles";
|
|
6
|
+
export declare const TABPANEL_CLASS = "sf-site-styles-tabpanel";
|
|
5
7
|
export declare const SHOW_HINTS_DEFAULT = false;
|
|
6
8
|
export declare function HintsToggle({ shown, onChange, }: {
|
|
7
9
|
shown: boolean;
|
|
8
10
|
onChange: (v: boolean) => void;
|
|
9
11
|
}): import("react").JSX.Element;
|
|
10
12
|
export declare const SITE_STYLES_TEXT_TAB = "text";
|
|
11
|
-
export declare const SITE_STYLES_TABS:
|
|
12
|
-
id: string;
|
|
13
|
-
label: string;
|
|
14
|
-
icon?: ReactNode;
|
|
15
|
-
htmlId: string;
|
|
16
|
-
panelId: string;
|
|
17
|
-
}[];
|
|
13
|
+
export declare const SITE_STYLES_TABS: SettingsTabItem[];
|
|
18
14
|
export declare function siteWidthPatch(v: number | null): SiteThemeRowPatch;
|
|
19
15
|
export declare function blockGapPatch(v: number | null): SiteThemeRowPatch;
|
|
20
16
|
export declare function siteGutterPatch(v: number | null): SiteThemeRowPatch;
|