efficient-web-builder 32.2.0 → 34.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 +64 -0
- package/dist/editor/components/SectionIcon.js +1 -1
- package/dist/editor/components/SiteRestoreNotice.d.ts +1 -0
- package/dist/editor/components/SiteRestoreNotice.js +1 -0
- package/dist/editor/components/StorefrontEditor.js +1 -1
- package/dist/editor/components/VersionHistoryDrawer.d.ts +21 -0
- package/dist/editor/components/VersionHistoryDrawer.js +1 -0
- package/dist/editor/components/WebsiteScreenParts.js +1 -1
- package/dist/editor/components/storefront-editor.css +17 -1
- package/dist/editor/components/useWebsiteMainAction.js +1 -1
- package/dist/editor/lib/editor-document-adapter.d.ts +2 -0
- package/dist/editor/lib/editor-document-adapter.js +1 -1
- package/dist/editor/lib/puck/blocks/general/Text/fields.js +1 -1
- package/dist/editor/lib/puck/heading-outline.js +1 -1
- package/dist/editor/lib/puck/overrides.js +1 -1
- package/dist/editor/lib/site-versions.d.ts +43 -0
- package/dist/editor/lib/site-versions.js +1 -0
- package/dist/format/lib/content/contact.d.ts +0 -2
- package/dist/format/lib/content/contact.js +2 -2
- package/dist/format/lib/content/footprint.d.ts +3 -3
- package/dist/format/lib/content/footprint.js +1 -1
- package/dist/format/lib/content/text-tag.d.ts +4 -0
- package/dist/format/lib/content/text-tag.js +1 -0
- package/dist/format/lib/editor-words-catalogue.d.ts +59 -0
- package/dist/format/lib/editor-words-catalogue.js +5 -5
- package/dist/format/lib/map-styles.d.ts +1 -27
- package/dist/format/lib/map-styles.js +1 -1
- package/dist/format/lib/puck/container-blocks.js +1 -1
- package/dist/format/lib/puck/passes/settings-groups.js +1 -1
- package/dist/format/lib/sections/section-head-style.d.ts +1 -0
- package/dist/format/lib/source-rules/flat-theme-palette.d.ts +1 -0
- package/dist/format/lib/source-rules/flat-theme-palette.js +5 -5
- package/dist/format/lib/source-rules/panel-rows-use-the-shared-row.d.ts +1 -0
- package/dist/format/lib/source-rules/panel-rows-use-the-shared-row.js +18 -18
- package/dist/format/lib/web-backend.d.ts +29 -0
- package/dist/render/components/ContactLocations.d.ts +1 -3
- package/dist/render/components/ContactLocations.js +6 -26
- package/dist/render/components/DealerFinder.d.ts +1 -1
- package/dist/render/components/DealerFinder.js +1 -1
- package/dist/render/components/Footprint.d.ts +2 -4
- package/dist/render/components/Footprint.js +1 -27
- package/dist/render/components/SectionHeader.d.ts +30 -3
- package/dist/render/components/SectionHeader.js +1 -1
- package/dist/render/components/SiteMap.d.ts +19 -0
- package/dist/render/components/SiteMap.js +1 -0
- package/dist/render/components/Text.d.ts +2 -1
- package/dist/render/components/Text.js +1 -1
- package/dist/render/components/useCountUp.js +1 -1
- package/dist/render/lib/puck/blocks/general/ContactLocations/render.js +1 -1
- package/dist/render/lib/puck/blocks/general/Footprint/render.js +2 -2
- package/dist/render/lib/puck/blocks/general/Text/render.js +1 -1
- package/package.json +5 -6
- package/dist/format/lib/maps-loader.d.ts +0 -8
- package/dist/format/lib/maps-loader.js +0 -1
- package/dist/render/lib/maps-config.d.ts +0 -16
- package/dist/render/lib/maps-config.js +0 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import{ruleChecks as
|
|
2
|
-
`),
|
|
3
|
-
`);
|
|
4
|
-
`).length+
|
|
5
|
-
`);
|
|
6
|
-
`);if(!
|
|
7
|
-
`);c.forEach((
|
|
8
|
-
`);/\blabel=/.test(
|
|
9
|
-
`)},
|
|
10
|
-
`)},r=
|
|
11
|
-
`).forEach((x,l)=>{const y=x.trim();
|
|
1
|
+
import{ruleChecks as W}from"./rule.js";import{builderModuleSpec as A}from"./support/ts-source.js";import{isRegistryPath as R,registryFiles as T}from"./support/registry-source.js";const k="lib/puck/controls.tsx",I={},N={},E=["boxShareField","edgePad","placementField","CoordsField","textList","segmented","select","slider"],_=/sf-field-label|<Label>/,C=/<[A-Z][A-Za-z0-9]*Icon\s*\/>/,G=n=>n.startsWith("//")||n.startsWith("*")||n.startsWith("/*");function z(n,o){const e=n.indexOf("(",o);if(e===-1)return"";let b=0;const c=[];let h=e+1;for(let d=e;d<n.length;d+=1){const i=n[d];if(i==="("||i==="["||i==="{")b+=1;else if(i===")"||i==="]"||i==="}"){if(b-=1,b===0){c.push(n.slice(h,d));break}}else if(i===","&&b===1&&(c.push(n.slice(h,d)),h=d+1,c.length===2))break}return c[1]??""}function M(n,o){const e=new RegExp(`(?:^|[^.\\w])${o}\\s*(?:<[^()]*?>)?\\s*\\(|\\bcontrols\\.${o}\\s*(?:<[^()]*?>)?\\s*\\(`).exec(n);return e?e.index+e[0].length-1:n.indexOf("(")}function U(n,o){const e=n.slice(0,o);return e.includes("//")?!1:(e.match(/"/g)??[]).length%2===0&&(e.match(/`/g)??[]).length%2===0&&(e.match(/'/g)??[]).length%2===0}const B=A("lib/puck/controls"),v=(n,o)=>new RegExp(`import \\{[^}]*\\b${o}\\b[^}]*\\} from "${B}"`).test(n)||new RegExp(`import \\* as controls from "${B}"`).test(n);function F(n,o,e){const b=new RegExp(`(^|[^.\\w])${o}\\s*(<[^()]*?>)?\\s*\\(|\\bcontrols\\.${o}\\s*(<[^()]*?>)?\\s*\\(`,"g"),c=new RegExp(`^(export )?function ${o}(<[^>]*>)?\\(`),h=[];let d=0;for(const i of n){const u=i.text.split(`
|
|
2
|
+
`),m=u.join(`
|
|
3
|
+
`);u.forEach((p,g)=>{const w=p.trim();if(G(w)||c.test(w))return;b.lastIndex=0;const $=b.exec(p);if(!$||!U(p,$.index))return;d+=1;const O=z(m,u.slice(0,g).join(`
|
|
4
|
+
`).length+M(p,o));C.test(O)||/<FieldGlyph\b/.test(O)||e.some(t=>t.test(O))||h.push(`${i.path}:${g+1} ${w.slice(0,80)}`)})}return{bare:h,total:d}}function J(n){const o={};for(const e of n){const b=e.text.split(`
|
|
5
|
+
`);b.forEach((c,h)=>{if(!/className="sf-field"/.test(c))return;const d=b.slice(h,h+9).join(`
|
|
6
|
+
`);if(!_.test(d))return;const i=d.match(/sf-field-label[^>]*>([^<{][^<]*)</),u=d.match(/sf-field-label[^>]*>\{([^}]*)\}/),m=d.match(/<Label>([^<{][^<]*)</),p=d.match(/<Label>\{([^}]*)\}/),g=$=>$.trim()==="label"?"{label}":"{...}",w=i?i[1].trim():u?g(u[1]):m?m[1].trim():p?g(p[1]):"{...}";(o[e.path]??=[]).push(w)})}return o}function K(n){const o=[];let e=0;for(const b of n){const c=b.text.split(`
|
|
7
|
+
`);c.forEach((h,d)=>{if(!/<SettingsField\b/.test(h))return;const i=[];let u=!1;for(let p=d;p<Math.min(d+40,c.length)&&!u;p+=1){let g=c[p];if(g=g.replace(/\/\*[\s\S]*?\*\//g," "),/\/\*/.test(g)&&(g=g.slice(0,g.indexOf("/*"))),/^\s*\*/.test(c[p]))continue;const w=g.indexOf("//");w!==-1&&(g=g.slice(0,w)),i.push(g),g.includes(">")&&(u=!0)}const m=i.join(`
|
|
8
|
+
`);/\blabel=/.test(m)&&(e+=1,!/\bicon=/.test(m)&&o.push(`${b.path}:${d+1} ${h.trim().slice(0,80)}`))})}return{seen:e,bare:o}}function Q(n,o){const{check:e,report:b}=W("panel rows use the shared row"),c=o.exceptions??[],{floors:h}=o;{const t={path:"fixture.tsx",text:['import { slider, textList } from "@/lib/puck/controls";','const a = { textList: () => controls.textList("Items", <ListIcon />, x) };','const b = slider("Thickness", 0, 10);','const c = slider("Gap", <GapIcon />, 0, 10);','// slider("In a comment", 0, 10) is not a row'].join(`
|
|
9
|
+
`)},s=F([t],"textList",[]),a=F([t],"slider",[]);e("the reader reads a namespaced call's own arguments, not the arrow's",s.total===1&&s.bare.length===0,JSON.stringify(s)),e("the reader flags a bare row whose neighbour has a glyph, and skips a comment",a.total===2&&a.bare.length===1&&a.bare[0].startsWith("fixture.tsx:3"),JSON.stringify(a));const f={path:"wrapped.tsx",text:['const a = { shape: withShowWhen(segmented("Shape", <SquareIcon />, opts), rule) };','const b = { size: withShowWhen(segmented("Size", opts), rule) };'].join(`
|
|
10
|
+
`)},r=F([f],"segmented",[]);e("the reader reads a wrapped call's own arguments: the glyphed row passes, the bare one is caught",r.total===2&&r.bare.length===1&&r.bare[0].startsWith("wrapped.tsx:2"),JSON.stringify(r))}const i=new Map(n.map(t=>[t.path,t])).get(k);e(o.writesBuilders?`read ${k}, where the builders are declared`:`${k} is not among this repository's files (it calls the builders, it does not declare them)`,!!i===o.writesBuilders);const u=T(n),m=o.holdsRegistry!==!1;e(m?`read this repository's share of the block registry (${u.length} files)`:`this repository holds no block registry, as it says (${u.length} registry files handed in)`,m?u.length>0:u.length===0);const p=n.filter(t=>/^components\/[^/]+\.tsx$/.test(t.path)),g=n.filter(t=>/^scripts\/[^/]+\.tsx$/.test(t.path)),w=[...u,...i?[i]:[],...p],$=t=>t.path===k;{const t=w.filter(r=>$(r)||v(r.text,"toggle")),s=t.filter(r=>$(r)||R(r.path));e("only the known files use the toggle builder",t.length===s.length&&(!o.writesBuilders||s.some($))&&(!m||s.some(r=>R(r.path))),t.map(r=>r.path).join(" · "));const a=[];let f=0;for(const r of s)r.text.split(`
|
|
11
|
+
`).forEach((x,l)=>{const y=x.trim();G(y)||/classList\.toggle/.test(x)||/^export function toggle\(/.test(y)||/(^|[^.\w])toggle\(/.test(x)&&(f+=1,!(C.test(x)||/<FieldGlyph\b/.test(x))&&a.push(`${r.path}:${l+1} ${y.slice(0,80)}`))});e("every toggle() row carries a glyph",a.length===0,`
|
|
12
12
|
${a.join(`
|
|
13
|
-
`)}`),e(`…and there are rows to check (${f} toggle() call sites, at least ${
|
|
13
|
+
`)}`),e(`…and there are rows to check (${f} toggle() call sites, at least ${h.toggle})`,f>=h.toggle,"the scan is reading nothing")}const O=[{builder:"textList",inControls:!1,accept:[/TICKER_ITEMS_ROW\.icon/],name:"every textList() row carries a glyph"},{builder:"segmented",inControls:!0,accept:[/\bnoGlyph\(/],name:"every segmented() row carries a glyph (or a ruled noGlyph)"},{builder:"select",inControls:!0,accept:[/\btextKindGlyph\(/,/\bnoGlyph\(/],name:"every select() row carries a glyph (or a ruled noGlyph)"},{builder:"slider",inControls:!0,accept:[/\bnoGlyph\(/],name:"every slider() row carries a glyph"}];for(const t of O){const s=[...u,...t.inControls&&i?[i]:[],...g].filter(r=>t.inControls&&$(r)||R(r.path)||v(r.text,t.builder)),{bare:a,total:f}=F(s,t.builder,t.accept);e(t.name,a.length===0,`
|
|
14
14
|
${a.join(`
|
|
15
|
-
`)}`),e(`…and the ${t.builder} scan actually read rows (${f} call sites in ${
|
|
15
|
+
`)}`),e(`…and the ${t.builder} scan actually read rows (${f} call sites in ${s.length} files, at least ${h[t.builder]})`,f>=h[t.builder])}{const t=J(w);for(const l of c)e(`the exception still names a real row — ${l.label}`,(t[l.file]??[]).includes(l.label),`${l.file} no longer draws it`);const s={};for(const[l,y]of Object.entries(t)){const S=y.filter(L=>!c.some(j=>j.file===l&&j.label===L));S.length&&(s[l]=S)}const a=l=>l.slice().sort(),f=[];for(const[l,y]of Object.entries(s)){const S=I[l];if(!S){f.push(`${l} — hand-rolls ${y.length} row(s) and is not in PENDING`);continue}const L=a(y),j=a(S);(L.length!==j.length||L.some((D,P)=>D!==j[P]))&&f.push(`${l} — found [${L.join(" · ")}] but PENDING says [${j.join(" · ")}]`)}e("no NEW hand-rolled settings row",f.length===0,`
|
|
16
16
|
${f.join(`
|
|
17
|
-
`)}`);const r=Object.keys(
|
|
17
|
+
`)}`);const r=Object.keys(I).filter(l=>!s[l]);e("no PENDING entry has outlived its subject",r.length===0,r.join(" · "));const x=Object.values(s).reduce((l,y)=>l+y.length,0);e("the hand-rolled rows are GONE — the count is zero",x===0,`${x}`),e("…and no file is left hand-rolling one",Object.keys(I).length===0,Object.keys(I).join(" · ")),e(`…and the rulings are exactly ${o.rulings} (a new one is argued in review, not added)`,c.length===o.rulings&&c.every(l=>l.why.trim().length>40),`${c.length}`),e("…and BlogSource is not among them, because its row is gone",!c.some(l=>l.file.endsWith("BlogSource.tsx")))}{const t=Object.values(N).reduce((s,a)=>s+a,0);if(e("every builder is finished — nothing left to count",t===0,`${t}`),e("…and the emptiness is because FOUR builders are done, not because the list was cleared",E.length===8&&["textList","segmented","select","slider"].every(s=>E.includes(s)),E.join(" · ")),e("…and a finished builder has left the list",E.every(s=>!(s in N)),E.join(" · ")),i){const s=Object.keys(N).filter(a=>!new RegExp(`(export )?function ${a}\\(`).test(i.text));e(`…and every builder it names is really declared in ${k}`,s.length===0,s.join(" · "))}}if(i){const t=i.text,s=t.indexOf("export function backgroundField("),a=s===-1?"":t.slice(s),f=a.slice(0,a.indexOf(`
|
|
18
18
|
}
|
|
19
|
-
`));e("backgroundField is declared",
|
|
19
|
+
`));e("backgroundField is declared",s!==-1),e("backgroundField renders SettingsField",/<SettingsField/.test(f)),e("…and hand-rolls no row of its own",f.length>0&&!/className="sf-field"/.test(f)),e("…and passes `BackgroundIcon`, not merely some glyph",/icon=\{<BackgroundIcon \/>\}/.test(f));const r=t.indexOf("export function cardImageBackgroundField("),x=r===-1?"":t.slice(r);e("…and cardImageBackgroundField still passes `GroundIcon`",/icon=\{<GroundIcon \/>\}/.test(x.slice(0,x.indexOf(`
|
|
20
20
|
}
|
|
21
|
-
`))))}{const{seen:t,bare:
|
|
22
|
-
${
|
|
23
|
-
`)}`)}return
|
|
21
|
+
`))))}{const{seen:t,bare:s}=K(p);e(`the hand-rolled row scan read something (${t} hand-drawn SettingsField rows across ${p.length} files, at least ${h.handDrawn})`,t>=h.handDrawn),e("no hand-rolled SettingsField row goes without a glyph",s.length===0,`
|
|
22
|
+
${s.join(`
|
|
23
|
+
`)}`)}return b()}export{k as CONTROLS_FILE,M as callParen,Q as panelRowsUseTheSharedRow,z as secondArg};
|
|
@@ -81,11 +81,40 @@ export interface SitePublishAnswer {
|
|
|
81
81
|
state: "live" | "changed";
|
|
82
82
|
published: SiteChange[];
|
|
83
83
|
}
|
|
84
|
+
export interface SiteVersion {
|
|
85
|
+
id: string;
|
|
86
|
+
number: number;
|
|
87
|
+
name: string;
|
|
88
|
+
kind: "publish" | "draft_before_restore";
|
|
89
|
+
createdAt: string;
|
|
90
|
+
createdBy: string;
|
|
91
|
+
changes: SiteChange[];
|
|
92
|
+
live: boolean;
|
|
93
|
+
pages: {
|
|
94
|
+
id: string;
|
|
95
|
+
name: string;
|
|
96
|
+
}[];
|
|
97
|
+
deletedPictures?: number;
|
|
98
|
+
}
|
|
99
|
+
export interface SiteRestoreAnswer {
|
|
100
|
+
liveState: SiteLiveState;
|
|
101
|
+
undo: string | null;
|
|
102
|
+
}
|
|
103
|
+
export interface SiteVersionPreview {
|
|
104
|
+
url: string;
|
|
105
|
+
expiresAt?: string;
|
|
106
|
+
}
|
|
84
107
|
export interface WebsiteSite {
|
|
85
108
|
get(scope?: SiteScope): Promise<SiteRecord>;
|
|
86
109
|
update?(patch: SiteRecordPatch, scope?: SiteScope): Promise<SiteRecord>;
|
|
87
110
|
publish?(scope?: SiteScope): Promise<SitePublishAnswer>;
|
|
88
111
|
liveState?(scope?: SiteScope): Promise<SiteLiveState>;
|
|
112
|
+
versions?(scope?: SiteScope): Promise<SiteVersion[]>;
|
|
113
|
+
nameVersion?(id: string, name: string, scope?: SiteScope): Promise<SiteVersion>;
|
|
114
|
+
restoreVersion?(id: string, options?: {
|
|
115
|
+
page?: string;
|
|
116
|
+
}, scope?: SiteScope): Promise<SiteRestoreAnswer>;
|
|
117
|
+
previewVersion?(id: string, scope?: SiteScope): Promise<SiteVersionPreview>;
|
|
89
118
|
languages?(): Promise<{
|
|
90
119
|
base: string;
|
|
91
120
|
others: string[];
|
|
@@ -7,11 +7,9 @@ export interface ContactLocationsProps {
|
|
|
7
7
|
galleryKicker?: string;
|
|
8
8
|
galleryHint?: string;
|
|
9
9
|
locations?: ContactLocationCard[];
|
|
10
|
-
apiKey?: string;
|
|
11
|
-
mapId?: string;
|
|
12
10
|
mapTheme?: MapThemeMode;
|
|
13
11
|
imageShape?: string;
|
|
14
12
|
editing?: boolean;
|
|
15
13
|
nodeId?: string;
|
|
16
14
|
}
|
|
17
|
-
export default function ContactLocations({ sectionNumber, heading, tagline, galleryKicker, galleryHint, locations,
|
|
15
|
+
export default function ContactLocations({ sectionNumber, heading, tagline, galleryKicker, galleryHint, locations, mapTheme, imageShape, editing, nodeId, }: ContactLocationsProps): import("react").JSX.Element;
|
|
@@ -1,24 +1,4 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as r,Fragment as
|
|
2
|
-
.studio-map .gmap-canvas img[src*="google"] {
|
|
3
|
-
filter: grayscale(1) brightness(0.55) contrast(0.9);
|
|
4
|
-
opacity: 0.7;
|
|
5
|
-
}
|
|
6
|
-
.studio-map .gmap-canvas a[href*="maps.google.com"] {
|
|
7
|
-
filter: grayscale(1) brightness(0.55);
|
|
8
|
-
opacity: 0.7;
|
|
9
|
-
}
|
|
10
|
-
.studio-map .gmap-canvas .gm-style-cc {
|
|
11
|
-
filter: grayscale(1) brightness(0.55);
|
|
12
|
-
opacity: 0.55;
|
|
13
|
-
}
|
|
14
|
-
.studio-map .gmap-canvas .gm-style-cc *,
|
|
15
|
-
.studio-map .gmap-canvas .gm-style-cc a {
|
|
16
|
-
color: var(--fg-dim) !important;
|
|
17
|
-
background: transparent !important;
|
|
18
|
-
}
|
|
19
|
-
.studio-map .gmap-canvas .gm-style {
|
|
20
|
-
font-family: var(--font-role-label), var(--font-mono-fallback) !important;
|
|
21
|
-
}
|
|
1
|
+
"use client";import{jsx as t,jsxs as r,Fragment as $}from"react/jsx-runtime";import{EDITORIAL_COLUMN as V}from"../../format/lib/content/page-width.js";import{SiteImage as X}from"../lib/site-runtime.js";import{markOverlayPortal as W}from"../../format/lib/puck/overlay-portal.js";import{useEffect as _,useMemo as Y,useRef as J,useState as P}from"react";import{stripMarkup as K}from"../../format/lib/markup.js";import Q from"./EditorialSectionHead.js";import Z from"./SectionEyebrow.js";import{scrollBehavior as H}from"./useReducedMotion.js";import{renderGold as R,renderHeadline as ee}from"./goldPhrases.js";import{CONTACT_LOCATIONS_CARDS_PLACEHOLDER as te,CONTACT_LOCATIONS_DEFAULTS as N,parseLocationTileShape as ne,splitLegacyRegion as re}from"../../format/lib/content/contact.js";import{galleryCardRatioClass as ae}from"../../format/lib/content/gallery-card-layout.js";import{hasMapCoords as oe}from"../../format/lib/map-styles.js";import{bucketByGroup as ie,groupColsClass as B}from"../../format/lib/locations-grid.js";import{encodeLocationPartId as D,usePreviewLocationPart as se}from"./PreviewLocationPartContext.js";import{LocationGroupHeader as ce}from"./LocationGroupHeader.js";import le from"./SiteMap.js";import{tk as F}from"../../format/components/floating-editor/tokens.js";import{phoneHref as de}from"../../format/lib/links/phone-href.js";const pe=`
|
|
22
2
|
.contact-loc {
|
|
23
3
|
outline: 2px solid transparent;
|
|
24
4
|
outline-offset: -2px;
|
|
@@ -30,7 +10,7 @@
|
|
|
30
10
|
.contact-loc[data-active="true"] > div:first-child { background-color: var(--accent); }
|
|
31
11
|
.contact-loc[data-active="true"] > div:first-child,
|
|
32
12
|
.contact-loc[data-active="true"] > div:first-child * { color: var(--bg) !important; }
|
|
33
|
-
`,
|
|
13
|
+
`,me=`
|
|
34
14
|
.loc-part-pick { cursor: pointer; position: relative; }
|
|
35
15
|
/* ⚠️ AN OVERLAY, NOT AN outline, AND THAT IS THE WHOLE FIX.
|
|
36
16
|
An inset outline is painted in the element's own box decoration and a
|
|
@@ -61,13 +41,13 @@
|
|
|
61
41
|
painted nothing — the exact failure this whole change is fixing, reproduced
|
|
62
42
|
one layer down. The [data-selected] rule below, which names a plain colour,
|
|
63
43
|
painted blue in the same breath. 73 is 45% of 255. */
|
|
64
|
-
box-shadow: inset 0 0 0 2px ${
|
|
44
|
+
box-shadow: inset 0 0 0 2px ${F.accent}73;
|
|
65
45
|
}
|
|
66
46
|
.loc-part-pick[data-selected]::after {
|
|
67
|
-
box-shadow: inset 0 0 0 2px ${
|
|
47
|
+
box-shadow: inset 0 0 0 2px ${F.accent};
|
|
68
48
|
}
|
|
69
49
|
@media (prefers-reduced-motion: reduce) {
|
|
70
50
|
.loc-part-pick::after { transition: none; }
|
|
71
51
|
}
|
|
72
|
-
`;function
|
|
73
|
-
`);return t(W,{children:a.map((y,s)=>r("span",{children:[y,s<a.length-1?t("br",{}):null]},s))})}return t(W,{children:p})}function Ee(){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:r("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 _e({sectionNumber:p=P.sectionNumber,heading:a=P.heading,tagline:y=P.tagline,galleryKicker:s=P.galleryKicker,galleryHint:u=P.galleryHint,locations:w=pe,apiKey:O="",mapId:E="",mapTheme:o="auto",imageShape:N,editing:c,nodeId:l}){const[f,h]=$(!1);z(()=>{const e=()=>h(document.documentElement.getAttribute("data-theme")==="light");e();const i=new MutationObserver(e);return i.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>i.disconnect()},[]);const[H,C]=$(null),I=e=>`loc-${e}`,R=e=>{C(e),typeof document<"u"&&document.getElementById(e)?.scrollIntoView({behavior:V(),block:"start"}),!c&&typeof window<"u"&&window.history?.replaceState&&window.history.replaceState(null,"",`#${e}`)};z(()=>{if(typeof window>"u")return;const e=window.location.hash.replace(/^#/,"");!e||!document.getElementById(e)||(C(e),requestAnimationFrame(()=>{document.getElementById(e)?.scrollIntoView({behavior:V(),block:"start"})}))},[]);const _=ge(ue(N)),{select:B,selectedLocationPartId:U}=Ie(),L=(e,i)=>l?Q(l,e,i):"",D=(e,i)=>!!(c&&l&&U===L(e,i)),A=(e,i)=>c&&l?`${e}:${i}`:void 0,j=K(null);z(()=>{if(!c||!l)return;const e=j.current;if(!e)return;const k=Array.from(e.querySelectorAll("[data-loc-pick]")).map(n=>{const b=ie(n),m=g=>{const S=n.getAttribute("data-loc-pick")??"",[v,M]=S.split(":");M!=="image"&&M!=="map"||(g.stopPropagation(),g.preventDefault(),B(Q(l,Number(v),M)))};return n.addEventListener("click",m,{capture:!0}),()=>{b?.(),n.removeEventListener("click",m,{capture:!0})}});return()=>k.forEach(n=>n())},[c,l,B,w.length]);const d=Ce(w,e=>String(e.group??""),e=>String(e.groupName??""));return t("section",{id:"studios",ref:j,className:"scroll-mt-24 border-b border-line py-[100px] max-[1100px]:py-[60px]",style:f?void 0:{background:"var(--section-bg)"},children:r("div",{className:ne,children:[t("style",{dangerouslySetInnerHTML:{__html:Me}}),c&&l&&t("style",{dangerouslySetInnerHTML:{__html:Oe}}),(p||a||y)&&t(ce,{num:p,title:a?de(a,!0):void 0,desc:y?X(y):void 0,spaceBelow:"mb-10"}),w.length>0&&r("div",{className:"mb-12",children:[(s||u)&&r("div",{className:"mb-5 flex items-baseline justify-between gap-6 border-b border-line pb-4",children:[s&&t(le,{text:s,size:12}),u&&t("span",{className:"font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.22em] text-fg-dim",children:X(u)})]}),t("div",{className:"flex flex-col gap-6",children:d.map((e,i)=>{const k=e.items.length===1;return r("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",Z(e.items.length),e.items.length>1?"max-[700px]:grid-cols-2":""].join(" "),children:e.items.map(({item:n,index:b})=>{const m=String(n?.name??""),g=String(n?.photo??""),S=I(b);return r("a",{href:`#${S}`,"aria-label":`Jump to ${m||"location"} map`,onClick:v=>{v.preventDefault(),R(S)},"data-loc-pick":A(b,"image"),className:["group relative block",_,"overflow-hidden bg-bg outline-none focus-visible:ring-2 focus-visible:ring-accent",k?"max-h-[440px]":"",...A(b,"image")?["loc-part-pick"]:[]].join(" "),"data-selected":D(b,"image")?"":void 0,children:[g?t(re,{src:g,alt:se(m||"Location"),fill:!0,sizes:k?"100vw":"(max-width: 700px) 50vw, 33vw",className:"object-cover grayscale transition-[filter] duration-500 group-hover:grayscale-0"}):t(Ee,{}),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:m})})]},b)})})]},e.key?`g:${e.key}`:`ungrouped:${i}`)})})]}),d.map((e,i)=>r("div",{className:i===0?"":"mt-10",children:[e.key&&t(Le,{groupKey:e.key,name:e.name,count:e.items.length}),t("div",{className:["grid gap-[2px] border border-line bg-line",Z(e.items.length),e.items.length>1?"max-[1100px]:grid-cols-1":""].join(" "),children:e.items.map(({item:k,index:n})=>t(je,{id:I(n),card:k,active:H===I(n),apiKey:O,mapId:E,mapTheme:o,mapPick:A(n,"map"),mapSelected:D(n,"map"),editing:c},n))})]},e.key?`g:${e.key}`:`ungrouped:${i}`)),w.length>0&&r("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 je({id:p,card:a,active:y,apiKey:s,mapId:u,mapTheme:w,mapPick:O,mapSelected:E,editing:o}){const N=Ae(a.phone),c=me(a.region),l=String(a.state??"").trim()||c.state,f=String(a.country??"").trim()||c.country,h=[l,f].filter(Boolean).join(" · ");return r("article",{id:p,"data-active":y?"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:[r("div",{className:"flex min-h-[280px] flex-col gap-3 border-b border-line px-7 py-7",children:[r("div",{className:"flex items-start justify-between gap-3.5",children:[r("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}),h&&t("div",{className:"mt-1.5 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.24em] text-accent",children:h})]}),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(te,{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(te,{value:a.hours})})]}),t($e,{name:String(a.name??""),state:l,country:f,lat:Number(a.lat),lng:Number(a.lng),mapsUrl:String(a.mapsUrl??""),apiKey:s,mapId:u,mapTheme:w,pick:O,selected:E,editing:o})]})}const ze=13;function $e({name:p,state:a,country:y,lat:s,lng:u,mapsUrl:w,apiKey:O,mapId:E,mapTheme:o="auto",pick:N,selected:c,editing:l}){const f=we(O,Se()),h=ke(E,Ne()),H=ve(s,u),C=!!f&&H,I=a,R=K(null),_=K(null),[B,U]=$(!1),L=`${f}|${s}|${u}|${h}|${o}`,[D,A]=$(null),j=D===L,d=o!=="auto",e=he(o),[i,k]=$(o==="auto"?fe.dark.background:T(o));z(()=>{k(T(o))},[o]),z(()=>{if(!C)return;const m=R.current;if(!m)return;let g=null,S=null,v=!1,M=null,F=null;const q=x=>({path:x.SymbolPath.CIRCLE,scale:7,fillColor:Y(o),fillOpacity:1,strokeColor:Y(o),strokeOpacity:.25,strokeWeight:10}),ae=async()=>{F=ye(()=>{v||A(L)});try{const x=await xe(f);if(v||!_.current)return;g=new x.Map(_.current,{center:{lat:s,lng:u},zoom:ze,disableDefaultUI:!0,gestureHandling:"cooperative",keyboardShortcuts:!1,clickableIcons:!1,backgroundColor:T(o),...h?{mapId:h}:{styles:J(o)}}),S=new x.Marker({map:g,position:{lat:s,lng:u},icon:q(x)}),g.addListener("tilesloaded",()=>{F?.ready(),v||U(!0)}),o==="auto"&&!h&&(M=be(()=>{v||!g||(g.setOptions({styles:J(o),backgroundColor:T(o)}),S?.setIcon(q(x)),k(T(o)))}))}catch(x){console.error("[StudioMap] Maps SDK failed:",x),F?.stop(),v||A(L)}},G=new IntersectionObserver(x=>{for(const oe of x)if(oe.isIntersecting){G.disconnect(),ae();break}},{rootMargin:"200px"});return G.observe(m),()=>{v=!0,G.disconnect(),F?.stop(),M?.()}},[C,f,s,u,h,o,L]);const n=w||(p?`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent([p,a,y].filter(Boolean).join(" "))}`:""),b=r("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:e.info.bg,borderColor:`color-mix(in oklab, ${e.info.fgDim} 35%, transparent)`,boxShadow:e.info.shadow}:void 0,children:[r("span",{className:"font-display text-[length:var(--size-body,14px)] font-medium tracking-[-0.01em]",style:d?{color:e.info.fg}:void 0,children:[p||"Location",I?`, ${I}`:""]}),n&&t("a",{href:n,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:e.info.accent}:void 0,children:"Get Directions ↗"})]});if(!C||j){const m=d?`linear-gradient(135deg, ${e.background}, ${e.info.bg})`:"linear-gradient(135deg, var(--site-surface-2), var(--site-surface))";return r("div",{"data-loc-pick":N,className:["relative overflow-hidden max-[1100px]:aspect-square",d?"":"bg-bg",...N?["loc-part-pick"]:[]].join(" "),"data-selected":c?"":void 0,style:{...d?{backgroundColor:e.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), ${m}`},children:[b,l&&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:e.info.fgDim,opacity:.4}:void 0,children:f?j?"The map could not load. Check the key":"Add latitude & longitude":"Add a Google Maps API key"})]})}return r("div",{ref:R,"data-loc-pick":N,className:["studio-map relative overflow-hidden max-[1100px]:aspect-square",...N?["loc-part-pick"]:[]].join(" "),"data-selected":c?"":void 0,style:{backgroundColor:i},children:[t("div",{ref:_,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…"}),b]})}export{_e as default};
|
|
52
|
+
`;function U({value:c}){if(typeof c=="string"){const n=c.split(`
|
|
53
|
+
`);return t($,{children:n.map((d,l)=>r("span",{children:[d,l<n.length-1?t("br",{}):null]},l))})}return t($,{children:c})}function ue(){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:r("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 he({sectionNumber:c=N.sectionNumber,heading:n=N.heading,tagline:d=N.tagline,galleryKicker:l=N.galleryKicker,galleryHint:p=N.galleryHint,locations:m=te,mapTheme:k="auto",imageShape:h,editing:i,nodeId:s}){const[u,g]=P(!1);_(()=>{const e=()=>g(document.documentElement.getAttribute("data-theme")==="light");e();const o=new MutationObserver(e);return o.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>o.disconnect()},[]);const[b,S]=P(null),x=e=>`loc-${e}`,L=e=>{S(e),typeof document<"u"&&document.getElementById(e)?.scrollIntoView({behavior:H(),block:"start"}),!i&&typeof window<"u"&&window.history?.replaceState&&window.history.replaceState(null,"",`#${e}`)};_(()=>{if(typeof window>"u")return;const e=window.location.hash.replace(/^#/,"");!e||!document.getElementById(e)||(S(e),requestAnimationFrame(()=>{document.getElementById(e)?.scrollIntoView({behavior:H(),block:"start"})}))},[]);const A=ae(ne(h)),{select:z,selectedLocationPartId:G}=se(),q=(e,o)=>s?D(s,e,o):"",O=(e,o)=>!!(i&&s&&G===q(e,o)),C=(e,o)=>i&&s?`${e}:${o}`:void 0,j=J(null);_(()=>{if(!i||!s)return;const e=j.current;if(!e)return;const v=Array.from(e.querySelectorAll("[data-loc-pick]")).map(a=>{const f=W(a),y=w=>{const T=a.getAttribute("data-loc-pick")??"",[I,E]=T.split(":");E!=="image"&&E!=="map"||(w.stopPropagation(),w.preventDefault(),z(D(s,Number(I),E)))};return a.addEventListener("click",y,{capture:!0}),()=>{f?.(),a.removeEventListener("click",y,{capture:!0})}});return()=>v.forEach(a=>a())},[i,s,z,m.length]);const M=ie(m,e=>String(e.group??""),e=>String(e.groupName??""));return t("section",{id:"studios",ref:j,className:"scroll-mt-24 border-b border-line py-[100px] max-[1100px]:py-[60px]",style:u?void 0:{background:"var(--section-bg)"},children:r("div",{className:V,children:[t("style",{dangerouslySetInnerHTML:{__html:pe}}),i&&s&&t("style",{dangerouslySetInnerHTML:{__html:me}}),(c||n||d)&&t(Q,{num:c,title:n?ee(n,!0):void 0,desc:d?R(d):void 0,spaceBelow:"mb-10"}),m.length>0&&r("div",{className:"mb-12",children:[(l||p)&&r("div",{className:"mb-5 flex items-baseline justify-between gap-6 border-b border-line pb-4",children:[l&&t(Z,{text:l,size:12}),p&&t("span",{className:"font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.22em] text-fg-dim",children:R(p)})]}),t("div",{className:"flex flex-col gap-6",children:M.map((e,o)=>{const v=e.items.length===1;return r("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",B(e.items.length),e.items.length>1?"max-[700px]:grid-cols-2":""].join(" "),children:e.items.map(({item:a,index:f})=>{const y=String(a?.name??""),w=String(a?.photo??""),T=x(f);return r("a",{href:`#${T}`,"aria-label":`Jump to ${y||"location"} map`,onClick:I=>{I.preventDefault(),L(T)},"data-loc-pick":C(f,"image"),className:["group relative block",A,"overflow-hidden bg-bg outline-none focus-visible:ring-2 focus-visible:ring-accent",v?"max-h-[440px]":"",...C(f,"image")?["loc-part-pick"]:[]].join(" "),"data-selected":O(f,"image")?"":void 0,children:[w?t(X,{src:w,alt:K(y||"Location"),fill:!0,sizes:v?"100vw":"(max-width: 700px) 50vw, 33vw",className:"object-cover grayscale transition-[filter] duration-500 group-hover:grayscale-0"}):t(ue,{}),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:y})})]},f)})})]},e.key?`g:${e.key}`:`ungrouped:${o}`)})})]}),M.map((e,o)=>r("div",{className:o===0?"":"mt-10",children:[e.key&&t(ce,{groupKey:e.key,name:e.name,count:e.items.length}),t("div",{className:["grid gap-[2px] border border-line bg-line",B(e.items.length),e.items.length>1?"max-[1100px]:grid-cols-1":""].join(" "),children:e.items.map(({item:v,index:a})=>t(ge,{id:x(a),card:v,active:b===x(a),mapTheme:k,mapPick:C(a,"map"),mapSelected:O(a,"map"),editing:i},a))})]},e.key?`g:${e.key}`:`ungrouped:${o}`)),m.length>0&&r("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 ge({id:c,card:n,active:d,mapTheme:l,mapPick:p,mapSelected:m,editing:k}){const h=de(n.phone),i=re(n.region),s=String(n.state??"").trim()||i.state,u=String(n.country??"").trim()||i.country,g=[s,u].filter(Boolean).join(" · ");return r("article",{id:c,"data-active":d?"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:[r("div",{className:"flex min-h-[280px] flex-col gap-3 border-b border-line px-7 py-7",children:[r("div",{className:"flex items-start justify-between gap-3.5",children:[r("div",{children:[n.name&&t("div",{className:"font-heading3 text-[length:var(--size-headingSmall,30px)] font-medium uppercase leading-none tracking-[-0.02em]",children:n.name}),g&&t("div",{className:"mt-1.5 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.24em] text-accent",children:g})]}),n.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:n.timezone})]}),n.address!=null&&n.address!==""&&t("div",{className:"mt-1.5 font-display text-[length:var(--size-body,14px)] leading-[1.5] text-fg-dim",children:t(U,{value:n.address})}),n.phone&&t("div",{children:t("a",{href:h,className:"font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-fg hover:text-accent",children:n.phone})}),n.hours!=null&&n.hours!==""&&t("div",{className:"font-mono text-[length:var(--size-label,12px)] uppercase leading-[1.7] tracking-[0.18em] text-fg-dim",children:t(U,{value:n.hours})})]}),t(fe,{name:String(n.name??""),state:s,country:u,lat:Number(n.lat),lng:Number(n.lng),mapsUrl:String(n.mapsUrl??""),mapTheme:l,pick:p,selected:m,editing:k})]})}function fe({name:c,state:n,country:d,lat:l,lng:p,mapsUrl:m,mapTheme:k="auto",pick:h,selected:i,editing:s}){const u=oe(l,p),g=n,b=c||"Location",S=Y(()=>u?[{key:"place",label:b,lat:l,lng:p,glyph:"",tone:""}]:[],[u,b,l,p]),x=m||(c?`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent([c,n,d].filter(Boolean).join(" "))}`:""),L=r("div",{className:"absolute left-5 top-5 z-10 flex max-w-[64%] flex-col gap-1.5 border border-line bg-bg p-3.5 shadow-[0_8px_24px_rgba(0,0,0,.4)]",children:[r("span",{className:"font-display text-[length:var(--size-body,14px)] font-medium tracking-[-0.01em]",children:[b,g?`, ${g}`:""]}),x&&t("a",{href:x,target:"_blank",rel:"noopener noreferrer",className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.24em] text-accent transition-colors hover:text-fg",children:"Get Directions ↗"})]}),A=["relative overflow-hidden max-[1100px]:aspect-square",...h?["loc-part-pick"]:[]].join(" ");return u?t("div",{"data-loc-pick":h,"data-selected":i?"":void 0,className:A,children:t(le,{pins:S,mapTheme:k,ariaLabel:b,className:"absolute inset-0",children:L})}):r("div",{"data-loc-pick":h,"data-selected":i?"":void 0,className:`${A} bg-bg`,style:{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), linear-gradient(135deg, var(--site-surface-2), var(--site-surface))"},children:[L,s&&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] text-fg-dim/40",children:"Add latitude & longitude"})]})}export{he as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { MapThemeMode } from "../../format/lib/map-styles.js";
|
|
2
2
|
import { type DealerListPosition } from "../lib/dealer-source.js";
|
|
3
3
|
export default function DealerFinder({ mapLabel, mapTheme, search, searchHint, noMatchText, listPosition, showDistance, editing, }: {
|
|
4
4
|
mapLabel: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as t,jsxs as a}from"react/jsx-runtime";import{useEffect as F,useMemo as v,useRef as K,useState as p}from"react";import{dealerDistanceLabel as V,dealerPins as W,parseDealerListPosition as O,useDealerSource as Q}from"../lib/dealer-source.js";import{groupColsClass as Y}from"../../format/lib/locations-grid.js";import{say as G}from"../../format/lib/editor-words.js";import J from"./SiteMap.js";const D={near:null,dealers:[]},U="max-h-[480px] overflow-y-auto overscroll-contain",X=5,Z="h-[480px] max-[800px]:h-[320px]";function H({mapLabel:n,mapTheme:m,search:h,searchHint:r,noMatchText:f,listPosition:u,showDistance:L,editing:z}){const o=Q(),[s,x]=p(D),[N,M]=p(""),[E,w]=p(!1),[S,g]=p(null),[I,B]=p(null),b=K(null);F(()=>{if(!o)return;let e=!0;return o({}).then(l=>e&&x(l)).catch(()=>e&&x(D)),()=>{e=!1}},[o]);const i=v(()=>W(s.dealers),[s.dealers]),T=v(()=>new Set(i.map(e=>e.key)),[i]),A=v(()=>s.near==="found"?i.slice(0,X).map(e=>e.key):null,[s.near,i]),P=e=>{g(e),T.has(e)&&B(l=>({key:e,n:(l?.n??0)+1}))},R=e=>{g(e),b.current?.querySelector(`[data-dealer="${CSS.escape(e)}"]`)?.scrollIntoView({block:"nearest"})};if(!o)return z?t("p",{"data-dealers-unavailable":!0,className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.24em] text-fg-dim",children:G("Dealers are not available on this website")}):null;const $=e=>{e.preventDefault();const l=N.trim();w(!0),g(null),o(l?{near:l}:{}).then(x).catch(()=>x(q=>({...q,near:"try_again"}))).finally(()=>w(!1))},c=O(u),k=c!=="below",y=s.near==="not_found"||s.near==="try_again",j=h?a("form",{role:"search",onSubmit:$,className:"mb-4 flex gap-2",children:[t("input",{type:"search",value:N,onChange:e=>M(e.target.value),placeholder:r,"aria-label":r,"aria-invalid":y||void 0,className:["min-w-0 flex-1 border bg-bg px-3 py-2 text-[length:var(--size-body,14px)] text-fg outline-none",y?"border-accent":"border-line focus:border-fg"].join(" ")}),t("button",{type:"submit","aria-label":r,disabled:E,className:"grid w-10 shrink-0 place-items-center bg-fg text-bg disabled:opacity-50",children:a("svg",{"aria-hidden":!0,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[t("circle",{cx:"11",cy:"11",r:"7"}),t("path",{d:"M20 20l-3.5-3.5"})]})})]}):null,_=y&&f?t("p",{role:"status",className:"mb-3 text-[length:var(--size-body,14px)] text-fg-dim",children:f}):null,d=s.dealers.map(e=>t(ee,{dealer:e,active:S===e.id,onSelect:()=>P(e.id),distance:L?V(e.distanceKm):"",tile:!k},e.id)),C=t(J,{pins:i,mapTheme:m,selectedKey:S,focus:I,onSelect:R,ariaLabel:n,className:Z,groupCrowded:!0,fitTo:A});return k?a("div",{"data-dealer-finder":c,className:["grid items-start gap-6 max-[800px]:grid-cols-1",c==="left"?"grid-cols-[minmax(260px,360px)_1fr]":"grid-cols-[1fr_minmax(260px,360px)]"].join(" "),children:[a("div",{className:["min-w-0",c==="right"?"order-2":"","max-[800px]:order-2"].join(" "),children:[j,_,t("div",{ref:b,className:[U,"max-[800px]:max-h-none"].join(" "),children:d})]}),t("div",{className:["min-w-0",c==="right"?"order-1":"","max-[800px]:order-1"].join(" "),children:C})]}):a("div",{"data-dealer-finder":"below",children:[j,_,C,d.length>0&&t("div",{ref:b,className:["mt-12 grid gap-[2px] bg-bg",Y(d.length),d.length>2?"max-[1100px]:grid-cols-2 max-[700px]:grid-cols-1":"max-[700px]:grid-cols-1"].join(" "),children:d})]})}function ee({dealer:n,active:m,onSelect:h,distance:r,tile:f}){const u=[n.city,[n.state,n.postcode].filter(Boolean).join(" ")].filter(Boolean).join(" ");return a("div",{"data-dealer":n.id,className:["flex gap-3 bg-bg text-left outline outline-1 -outline-offset-1",f?"px-6 py-5":"border-b border-line px-1 py-4",m?"outline-accent":"outline-transparent hover:outline-line"].join(" "),children:[a("button",{type:"button",onClick:h,"aria-pressed":m,className:"min-w-0 flex-1 text-left",children:[t("span",{className:"block font-display text-[length:var(--size-body,16px)] font-medium leading-[1.25] text-fg",children:n.name}),n.address&&t("span",{className:"mt-1 block text-[length:var(--size-body,14px)] text-fg-dim",children:n.address}),u&&t("span",{className:"block text-[length:var(--size-body,14px)] text-fg-dim",children:u})]}),a("span",{className:"flex shrink-0 flex-col items-end gap-1 text-[length:var(--size-body,14px)]",children:[r&&t("span",{className:"text-fg-dim",children:r}),n.phone&&t("a",{href:`tel:${n.phone.replace(/[^\d+]/g,"")}`,className:"text-fg underline underline-offset-2",children:n.phone}),n.website&&t("a",{href:n.website,target:"_blank",rel:"noopener noreferrer",className:"text-fg underline underline-offset-2",children:n.website.replace(/^https?:\/\//,"").replace(/\/$/,"")})]})]})}export{H as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { MapThemeMode } from "../../format/lib/map-styles.js";
|
|
2
2
|
import { type FootprintOffice } from "../../format/lib/content/footprint.js";
|
|
3
3
|
import { type DealerListPosition, type FootprintSource } from "../lib/dealer-source.js";
|
|
4
4
|
export interface FootprintProps {
|
|
@@ -6,8 +6,6 @@ export interface FootprintProps {
|
|
|
6
6
|
heading?: string;
|
|
7
7
|
tagline?: string;
|
|
8
8
|
offices?: FootprintOffice[];
|
|
9
|
-
apiKey?: string;
|
|
10
|
-
mapId?: string;
|
|
11
9
|
mapTheme?: MapThemeMode;
|
|
12
10
|
padTop?: number;
|
|
13
11
|
padBottom?: number;
|
|
@@ -20,4 +18,4 @@ export interface FootprintProps {
|
|
|
20
18
|
listPosition?: DealerListPosition;
|
|
21
19
|
showDistance?: boolean;
|
|
22
20
|
}
|
|
23
|
-
export default function Footprint({ sectionNumber, heading, tagline, offices,
|
|
21
|
+
export default function Footprint({ sectionNumber, heading, tagline, offices, mapTheme, padTop, padBottom, editing, omitHead, source, search, searchHint, noMatchText, listPosition, showDistance, }: FootprintProps): import("react").JSX.Element | null;
|
|
@@ -1,27 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
2
|
-
.footprint-map .gm-style { font-family: var(--font-role-label), var(--font-mono-fallback) !important; }
|
|
3
|
-
.footprint-map .gm-style .gm-style-iw-c {
|
|
4
|
-
background: ${t.bg} !important;
|
|
5
|
-
box-shadow: ${t.shadow} !important;
|
|
6
|
-
border-radius: 0 !important;
|
|
7
|
-
padding: 0 !important;
|
|
8
|
-
max-width: 280px !important;
|
|
9
|
-
}
|
|
10
|
-
.footprint-map .gm-style .gm-style-iw-d {
|
|
11
|
-
background: ${t.bg} !important;
|
|
12
|
-
overflow: hidden !important;
|
|
13
|
-
max-width: none !important;
|
|
14
|
-
}
|
|
15
|
-
.footprint-map .gm-style .gm-style-iw-tc::after { background: ${t.bg} !important; }
|
|
16
|
-
.footprint-map .gm-style button[aria-label="Close"] > span {
|
|
17
|
-
background-color: ${t.closeX} !important;
|
|
18
|
-
}
|
|
19
|
-
`}function lt({pal:t}){const r=t?t.marker:"var(--accent)",p=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 I(ct,{children:[n("div",{className:"pointer-events-none absolute inset-0",style:{backgroundImage:`radial-gradient(60% 70% at 50% 50%, color-mix(in oklab, ${r} 8%, ${p}) 0%, ${p} 60%, ${e} 100%)`}}),n("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 Et({sectionNumber:t="",heading:r="",tagline:p="",offices:e=[],apiKey:l="",mapId:N="",mapTheme:L="auto",padTop:o,padBottom:m,editing:f,omitHead:v=!1,source:E,search:D=!1,searchHint:P="",noMatchText:k="",listPosition:_="below",showDistance:$=!0}){const x=St(E)==="dealers",w=typeof o=="number"?o:120,A=typeof m=="number"?m:120,[M,C]=H(null),G=e.length===0&&!x&&!t&&!r&&!p;if(B(()=>{C(a=>a!==null&&a>=e.length?null:a)},[e]),G&&!f)return null;const z=xt(e,a=>String(a.group??""),()=>"");return n("section",{className:"relative z-[2] bg-bg",children:I("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:w,paddingBottom:A},children:[!v&&(t||r||p)&&n(ht,{num:t,title:r?$t(r):void 0,desc:p||void 0,spaceBelow:"mb-12"}),x?n(Lt,{mapLabel:r.replace(/[=*]/g,"").replace(/\s+/g," ").trim(),mapTheme:L,search:D,searchHint:P,noMatchText:k,listPosition:_,showDistance:$,editing:f}):n(At,{offices:e,apiKey:l,mapId:N,mapTheme:L,activeIndex:M,onSelect:C,editing:f}),!x&&e.length>0&&n("div",{className:"mt-12 flex flex-col gap-8",children:z.map((a,F)=>I("div",{children:[a.key&&n(vt,{groupKey:a.key,count:a.items.length}),n("div",{className:["grid gap-[2px] bg-bg",yt(a.items.length),a.items.length>2?"max-[1100px]:grid-cols-2 max-[700px]:grid-cols-1":a.items.length===2?"max-[700px]:grid-cols-1":""].join(" "),children:a.items.map(({item:u,index:R})=>{const j=M===R;return I("button",{type:"button",onClick:()=>C(R),"aria-pressed":j,className:["flex flex-col gap-1.5 bg-bg px-6 py-5 text-left transition-colors outline outline-1 -outline-offset-1",j?"outline-accent":"outline-transparent hover:outline-line"].join(" "),children:[I("span",{className:`flex items-center gap-2.5 font-mono ${S.labelSmall} uppercase tracking-[0.28em]`,children:[u.hq&&n("span",{className:`border border-accent bg-accent px-1.5 py-0.5 ${S.bodySmall} text-bg`,children:"HQ"}),u.role&&n("span",{className:"text-accent",children:u.role})]}),u.city&&n("span",{className:`font-display ${S.bodyLarge} font-medium leading-[1.2] tracking-[-0.01em] text-fg`,children:n(wt,{value:u.city,children:u.city})}),u.country&&n("span",{className:`font-mono ${S.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:u.country}),u.address&&n("span",{className:`font-mono ${S.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:kt(u.address)})]},R)})})]},a.key?`g:${a.key}`:`ungrouped:${F}`))}),!x&&e.length===0&&f&&n("p",{className:`mt-8 font-mono ${S.labelLarge} uppercase tracking-[0.24em] text-fg-dim`,children:Mt("Add an office in the inspector")})]})})}function At({offices:t,apiKey:r,mapId:p,mapTheme:e,activeIndex:l,onSelect:N,editing:L}){const o=ft(r,bt()),m=mt(p,gt()),f=!!o&&t.some(s=>rt(s.lat,s.lng)),v=e!=="auto",E=Q(e),D=g(null),P=g(null),k=g(null),_=g(null),$=g(new Map),x=g(null),w=g(null),A=g(null),M=g(N);M.current=N;const C=g(t);C.current=t;const G=g(l);G.current=l;const[z,a]=H(!1),F=`${o}|${m}|${e}`,[u,R]=H(null),j=u===F,[W,J]=H(tt.dark),[st,V]=H(tt.dark.background);return B(()=>{J(Q(e)),V(K(e))},[e]),B(()=>{if(!f)return;const s=D.current;if(!s)return;let i=!1,c=null,y=null;const q=async()=>{y=ut(()=>{i||R(F)});try{const d=await dt(o);if(i||!P.current)return;const h=new d.Map(P.current,{center:{lat:25,lng:0},zoom:2,minZoom:1,maxZoom:5,disableDefaultUI:!0,gestureHandling:"cooperative",keyboardShortcuts:!1,clickableIcons:!1,backgroundColor:K(e),...m?{mapId:m}:{styles:nt(e)}});k.current=h,_.current=d;const O=at(h,d,e,C.current,$.current,Z=>M.current(Z));w.current=O,O.isEmpty()||h.fitBounds(O,X);const Y=new d.InfoWindow({disableAutoPan:!0});Y.addListener("closeclick",()=>M.current(null)),x.current=Y,h.addListener("click",()=>M.current(null)),h.addListener("tilesloaded",()=>{y?.ready(),i||a(!0)}),e==="auto"&&!m&&(c=pt(()=>{i||!k.current||(k.current.setOptions({styles:nt(e),backgroundColor:K(e)}),$.current.forEach((Z,it)=>{const T=C.current[it];T&&Z.setIcon(ot(T,d,e))}),J(Q(e)),V(K(e)))}))}catch(d){console.error("[FootprintMap] Maps SDK failed:",d),y?.stop(),i||R(F)}},b=new IntersectionObserver(d=>{for(const h of d)if(h.isIntersecting){b.disconnect(),q();break}},{rootMargin:"200px"});return b.observe(s),()=>{i=!0,b.disconnect(),y?.stop(),c?.(),x.current?.close(),x.current=null,k.current=null,_.current=null,$.current.forEach(d=>d.setMap(null)),$.current.clear(),w.current=null,a(!1)}},[f,o,m,e,F]),B(()=>{const s=k.current,i=_.current;if(!s||!i)return;const c=at(s,i,e,t,$.current,y=>M.current(y));w.current=c,G.current===null&&!c.isEmpty()&&s.fitBounds(c,X)},[t,e]),B(()=>{const s=k.current,i=x.current;if(!s||!i)return;if(l===null){i.close(),A.current!==null&&w.current&&!w.current.isEmpty()&&s.fitBounds(w.current,X),A.current=null;return}const c=t[l],y=$.current.get(l);if(!c||!y){i.close(),A.current=l;return}s.panTo({lat:c.lat,lng:c.lng});const q=s.getZoom();q!=null&&q<4&&s.setZoom(4);const b=W.info,d=c.hq?`<span style="background:${b.accent};color:${b.bg};padding:1px 6px;font-size:10px;letter-spacing:0.18em;">HQ</span>`:"",h=c.role?`<span style="color:${b.accent};">${U(c.role)}</span>`:"";i.setContent(`
|
|
20
|
-
<div style="padding:10px 14px 12px;min-width:180px;color:${b.fg};">
|
|
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
|
-
${d}${h}
|
|
23
|
-
</div>
|
|
24
|
-
<div style="font-family:var(--font-display),Georgia,serif;font-size:20px;font-weight:500;line-height:1.2;margin-top:6px;color:${b.fg};">${U(c.city)}</div>
|
|
25
|
-
<div style="font-family:var(--font-role-label),var(--font-mono-fallback);font-size:11px;letter-spacing:0.2em;text-transform:uppercase;color:${b.fgDim};margin-top:4px;">${U(c.country)}</div>
|
|
26
|
-
</div>
|
|
27
|
-
`),i.open({map:s,anchor:y}),A.current=l},[l,z,W,t]),!f||j?L?I("div",{className:["relative aspect-[16/9] w-full overflow-hidden border border-line max-[720px]:aspect-[4/5]",v?"":"bg-bg"].join(" "),style:v?{backgroundColor:E.background}:void 0,children:[n(lt,{pal:v?E:void 0}),n("div",{className:[`absolute inset-0 flex items-center justify-center px-6 text-center font-mono ${S.labelLarge} uppercase tracking-[0.24em]`,v?"":"text-fg-dim"].join(" "),style:v?{color:E.info.fgDim}:void 0,children:o?j?"The map could not load. Check the Google Maps key":"Add office coordinates to plot the map":"Add a Google Maps API key to show the map"})]}):null:I("div",{ref:D,className:"sf-card footprint-map relative aspect-[16/9] w-full overflow-hidden border border-line max-[720px]:aspect-[4/5]",style:{backgroundColor:st},children:[n("style",{dangerouslySetInnerHTML:{__html:Nt(W.info)}}),n(lt,{pal:v?E:void 0}),n("div",{ref:P,className:"gmap-canvas absolute inset-0 transition-opacity duration-500",style:{opacity:z?1:0}}),n("div",{className:[`pointer-events-none absolute inset-0 flex items-center justify-center font-mono ${S.labelLarge} uppercase tracking-[0.24em] text-fg-dim transition-opacity duration-500`,z?"opacity-0":"opacity-100"].join(" "),children:"Loading map…"})]})}export{Et as default};
|
|
1
|
+
"use client";import{jsx as e,jsxs as m}from"react/jsx-runtime";import{useEffect as w,useMemo as z,useState as $}from"react";import{footprintPins as E}from"../../format/lib/content/footprint.js";import{bucketByGroup as F,groupColsClass as A}from"../../format/lib/locations-grid.js";import G from"./EditorialSectionHead.js";import{LocationGroupHeader as B}from"./LocationGroupHeader.js";import{renderGold as K,renderHeadline as P}from"./goldPhrases.js";import q from"./PartStyledText.js";import{say as L}from"../../format/lib/editor-words.js";import{parseFootprintSource as D}from"../lib/dealer-source.js";import Q from"./DealerFinder.js";import I from"./SiteMap.js";const a={bodySmall:"text-[length:var(--size-body,10px)]",bodyLarge:"text-[length:var(--size-body,18px)]",labelSmall:"text-[length:var(--size-label,11px)]",labelLarge:"text-[length:var(--size-label,12px)]"};function O({sectionNumber:o="",heading:s="",tagline:x="",offices:l=[],mapTheme:f="auto",padTop:g,padBottom:p,editing:d,omitHead:h=!1,source:i,search:u=!1,searchHint:n="",noMatchText:y="",listPosition:c="below",showDistance:M=!0}){const b=D(i)==="dealers",j=typeof g=="number"?g:120,C=typeof p=="number"?p:120,[k,v]=$(null),H=l.length===0&&!b&&!o&&!s&&!x;if(w(()=>{v(t=>t!==null&&t>=l.length?null:t)},[l]),H&&!d)return null;const T=F(l,t=>String(t.group??""),()=>"");return e("section",{className:"relative z-[2] bg-bg",children:m("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:j,paddingBottom:C},children:[!h&&(o||s||x)&&e(G,{num:o,title:s?P(s):void 0,desc:x||void 0,spaceBelow:"mb-12"}),b?e(Q,{mapLabel:s.replace(/[=*]/g,"").replace(/\s+/g," ").trim(),mapTheme:f,search:u,searchHint:n,noMatchText:y,listPosition:c,showDistance:M,editing:d}):e(W,{offices:l,mapLabel:s.replace(/[=*]/g,"").replace(/\s+/g," ").trim(),mapTheme:f,activeIndex:k,onSelect:v,editing:d}),!b&&l.length>0&&e("div",{className:"mt-12 flex flex-col gap-8",children:T.map((t,_)=>m("div",{children:[t.key&&e(B,{groupKey:t.key,count:t.items.length}),e("div",{className:["grid gap-[2px] bg-bg",A(t.items.length),t.items.length>2?"max-[1100px]:grid-cols-2 max-[700px]:grid-cols-1":t.items.length===2?"max-[700px]:grid-cols-1":""].join(" "),children:t.items.map(({item:r,index:N})=>{const S=k===N;return m("button",{type:"button",onClick:()=>v(N),"aria-pressed":S,className:["flex flex-col gap-1.5 bg-bg px-6 py-5 text-left transition-colors outline outline-1 -outline-offset-1",S?"outline-accent":"outline-transparent hover:outline-line"].join(" "),children:[m("span",{className:`flex items-center gap-2.5 font-mono ${a.labelSmall} uppercase tracking-[0.28em]`,children:[r.hq&&e("span",{className:`border border-accent bg-accent px-1.5 py-0.5 ${a.bodySmall} text-bg`,children:"HQ"}),r.role&&e("span",{className:"text-accent",children:r.role})]}),r.city&&e("span",{className:`font-display ${a.bodyLarge} font-medium leading-[1.2] tracking-[-0.01em] text-fg`,children:e(q,{value:r.city,children:r.city})}),r.country&&e("span",{className:`font-mono ${a.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:r.country}),r.address&&e("span",{className:`font-mono ${a.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:K(r.address)})]},N)})})]},t.key?`g:${t.key}`:`ungrouped:${_}`))}),!b&&l.length===0&&d&&e("p",{className:`mt-8 font-mono ${a.labelLarge} uppercase tracking-[0.24em] text-fg-dim`,children:L("Add an office in the inspector")})]})})}function W({offices:o,mapLabel:s,mapTheme:x,activeIndex:l,onSelect:f,editing:g}){const p=z(()=>E(o),[o]),[d,h]=$(null),i=l===null?null:String(l),u=i!==null&&p.some(c=>c.key===i);if(w(()=>{i!==null&&u&&h(c=>({key:i,n:(c?.n??0)+1}))},[i,u]),p.length===0)return g?e("div",{className:"relative flex aspect-[16/9] w-full items-center justify-center overflow-hidden border border-line bg-bg px-6 text-center max-[720px]:aspect-[4/5]",children:e("span",{className:`font-mono ${a.labelLarge} uppercase tracking-[0.24em] text-fg-dim`,children:L("Add office coordinates to plot the map")})}):null;const n=u&&l!==null?o[l]:null,y=n?m("div",{className:"flex items-start gap-3 border border-line bg-bg px-3.5 py-2.5 text-fg shadow-[0_8px_24px_rgba(0,0,0,.4)]",children:[m("div",{className:"min-w-0 flex-1",children:[m("div",{className:`flex items-center gap-2 font-mono ${a.labelSmall} uppercase tracking-[0.28em]`,children:[n.hq&&e("span",{className:`bg-accent px-1.5 py-px ${a.bodySmall} text-bg`,children:"HQ"}),n.role&&e("span",{className:"text-accent",children:n.role})]}),n.city&&e("div",{className:`mt-1.5 font-display ${a.bodyLarge} font-medium leading-[1.2] text-fg`,children:n.city}),n.country&&e("div",{className:`mt-1 font-mono ${a.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:n.country})]}),e("button",{type:"button",onClick:()=>f(null),"aria-label":"Close",className:"-mr-1 grid h-6 w-6 shrink-0 place-items-center text-fg-dim hover:text-fg",children:e("svg",{"aria-hidden":!0,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:e("path",{d:"M2 2l8 8M10 2l-8 8"})})})]}):null;return e(I,{pins:p,mapTheme:x,ariaLabel:s||"Offices",className:"sf-card relative aspect-[16/9] w-full overflow-hidden border border-line max-[720px]:aspect-[4/5]",selectedKey:u?i:null,focus:d,onSelect:c=>f(Number(c)),card:y})}export{O as default};
|
|
@@ -1,6 +1,30 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
1
2
|
import { type SectionNumberStyle } from "../../format/lib/sections/section-number-style.js";
|
|
2
3
|
import { type SectionEyebrowLook } from "../../format/lib/sections/section-eyebrow-look.js";
|
|
3
|
-
import type {
|
|
4
|
+
import type { SectionHeaderLook } from "../../format/lib/sections/section-head-style.js";
|
|
5
|
+
export declare const SHELF_TITLE_SIZES: readonly [{
|
|
6
|
+
readonly value: "para";
|
|
7
|
+
readonly label: "Paragraph size — 13px";
|
|
8
|
+
readonly cls: "font-mono font-normal uppercase tracking-[0.22em] text-[length:var(--size-label,13px)]";
|
|
9
|
+
}, {
|
|
10
|
+
readonly value: "sm";
|
|
11
|
+
readonly label: "Small — 40px";
|
|
12
|
+
readonly cls: "font-heading2 font-medium tracking-[-0.03em] text-[length:var(--size-headingMedium,40px)] max-[800px]:text-[length:var(--size-headingMedium,28px)]";
|
|
13
|
+
}, {
|
|
14
|
+
readonly value: "md";
|
|
15
|
+
readonly label: "Medium — 48px";
|
|
16
|
+
readonly cls: "font-heading2 font-medium tracking-[-0.03em] text-[length:var(--size-headingMedium,48px)] max-[800px]:text-[length:var(--size-headingMedium,32px)]";
|
|
17
|
+
}, {
|
|
18
|
+
readonly value: "lg";
|
|
19
|
+
readonly label: "Large — 56px";
|
|
20
|
+
readonly cls: "font-heading2 font-medium tracking-[-0.03em] text-[length:var(--size-headingMedium,56px)] max-[800px]:text-[length:var(--size-headingMedium,36px)]";
|
|
21
|
+
}, {
|
|
22
|
+
readonly value: "xl";
|
|
23
|
+
readonly label: "Extra large — 64px";
|
|
24
|
+
readonly cls: "font-heading2 font-medium tracking-[-0.03em] text-[length:var(--size-headingMedium,64px)] max-[800px]:text-[length:var(--size-headingMedium,40px)]";
|
|
25
|
+
}];
|
|
26
|
+
export type ShelfTitleSize = (typeof SHELF_TITLE_SIZES)[number]["value"];
|
|
27
|
+
export declare const DEFAULT_SHELF_TITLE_SIZE: ShelfTitleSize;
|
|
4
28
|
interface Props {
|
|
5
29
|
num?: React.ReactNode;
|
|
6
30
|
title?: React.ReactNode;
|
|
@@ -16,7 +40,7 @@ interface Props {
|
|
|
16
40
|
accent?: boolean;
|
|
17
41
|
accentNum?: boolean;
|
|
18
42
|
numStyle?: SectionNumberStyle;
|
|
19
|
-
look?:
|
|
43
|
+
look?: SectionHeaderLook;
|
|
20
44
|
titleAccent?: string;
|
|
21
45
|
accentTracking?: string;
|
|
22
46
|
spaceBelow?: string;
|
|
@@ -24,6 +48,9 @@ interface Props {
|
|
|
24
48
|
descriptionSize?: string;
|
|
25
49
|
className?: string;
|
|
26
50
|
eyebrowLook?: SectionEyebrowLook;
|
|
51
|
+
titleSize?: string;
|
|
52
|
+
count?: ReactNode;
|
|
53
|
+
capped?: boolean;
|
|
27
54
|
}
|
|
28
|
-
export default function SectionHeader({ num, title, link, logo, description, accent, accentNum, numStyle, look, titleAccent, accentTracking, spaceBelow, rowGap, descriptionSize, className, eyebrowLook, }: Props): import("react").JSX.Element;
|
|
55
|
+
export default function SectionHeader({ num, title, link, logo, description, accent, accentNum, numStyle, look, titleAccent, accentTracking, spaceBelow, rowGap, descriptionSize, className, eyebrowLook, titleSize, count, capped, }: Props): import("react").JSX.Element | null;
|
|
29
56
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as a,
|
|
1
|
+
import{jsx as a,jsxs as n,Fragment as B}from"react/jsx-runtime";import{SiteLink as T}from"../lib/site-runtime.js";import{media as D}from"../lib/media.js";import{sizedImage as R}from"../../format/lib/sized-image.js";import{DEFAULT_SECTION_NUMBER_STYLE as j,OUTLINED_NUMBER_CLASS as C,OUTLINED_NUMBER_CSS as F,OUTLINED_NUMBER_LAYOUT as A,parseSectionNumberStyle as X}from"../../format/lib/sections/section-number-style.js";import{DEFAULT_SECTION_EYEBROW_LOOK as Y}from"../../format/lib/sections/section-eyebrow-look.js";import{STICKY_UNDERHEADER_CLASS as W}from"../lib/puck/header-clearance.js";import{renderGold as Z,renderHeadline as K}from"./goldPhrases.js";import p from"./SectionEyebrow.js";const t={headingMediumUpTo800Small:"max-[800px]:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",headingMediumUpTo800Large:"max-[800px]:text-[length:min(var(--size-headingMedium,36px),var(--sf-heading-max,9999px))]",headingSmallUpTo800:"max-[800px]:text-[length:var(--size-headingSmall,28px)]",headingMedium2:"text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))]",headingMedium3:"text-[length:min(var(--size-headingMedium,56px),var(--sf-heading-max,9999px))]",headingMedium1:"text-[length:var(--sf-heading-max,var(--size-headingMedium,38px))]",bodySmall:"text-[length:var(--size-body,14px)]",bodyLarge:"text-[length:var(--size-body,16px)]",label:"text-[length:var(--size-label,14px)]",shelfLabel:"text-[length:var(--size-label,13px)]",shelfLabelSmall:"text-[length:var(--size-label,12px)]",shelfBody:"text-[length:var(--size-body,13px)]",shelfHeadingUpTo800Xs:"max-[800px]:text-[length:var(--size-headingMedium,28px)]",shelfHeadingUpTo800Small:"max-[800px]:text-[length:var(--size-headingMedium,32px)]",shelfHeadingUpTo800Large:"max-[800px]:text-[length:var(--size-headingMedium,36px)]",shelfHeadingUpTo800Xl:"max-[800px]:text-[length:var(--size-headingMedium,40px)]",shelfHeading1:"text-[length:var(--size-headingMedium,40px)]",shelfHeading2:"text-[length:var(--size-headingMedium,48px)]",shelfHeading3:"text-[length:var(--size-headingMedium,56px)]",shelfHeading4:"text-[length:var(--size-headingMedium,64px)]"},w=[{value:"para",label:"Paragraph size — 13px",cls:`font-mono font-normal uppercase tracking-[0.22em] ${t.shelfLabel}`},{value:"sm",label:"Small — 40px",cls:`font-heading2 font-medium tracking-[-0.03em] ${t.shelfHeading1} ${t.shelfHeadingUpTo800Xs}`},{value:"md",label:"Medium — 48px",cls:`font-heading2 font-medium tracking-[-0.03em] ${t.shelfHeading2} ${t.shelfHeadingUpTo800Small}`},{value:"lg",label:"Large — 56px",cls:`font-heading2 font-medium tracking-[-0.03em] ${t.shelfHeading3} ${t.shelfHeadingUpTo800Large}`},{value:"xl",label:"Extra large — 64px",cls:`font-heading2 font-medium tracking-[-0.03em] ${t.shelfHeading4} ${t.shelfHeadingUpTo800Xl}`}],G="lg";function P(e){return(w.find(i=>i.value===e)??w.find(i=>i.value===G)).cls}const g=(e,i=!1)=>typeof e=="string"?K(e,i):e,d=(e,i=!1)=>typeof e=="string"?Z(e,i):e;function q({num:e,title:i,link:r,logo:f,description:l,accent:u,accentNum:M,numStyle:E=j,look:m="standard",titleAccent:b,accentTracking:_="-0.02em",spaceBelow:y,rowGap:z,descriptionSize:L,className:x="",eyebrowLook:c=Y,titleSize:U,count:v,capped:H=!1}){const h=y??(m==="editorial"?"mb-[60px]":"");if(m==="shelf")return e||i||l||r?n("div",{className:`${W} sticky top-[var(--sf-header-h,88px)] z-30 mb-5 flex items-center justify-between gap-4 max-[800px]:flex-wrap max-[800px]:gap-y-2 border-b border-line bg-bg/95 py-3 backdrop-blur-md ${H?"":"-mx-[var(--sf-site-gutter,40px)] px-[var(--sf-site-gutter,40px)] max-[800px]:-mx-[min(20px,var(--sf-site-gutter,40px))] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]"}`,children:[n("div",{className:"flex min-w-0 items-end gap-6 max-[800px]:flex-col max-[800px]:items-stretch max-[800px]:gap-3",children:[e&&a("span",{className:`font-mono ${t.shelfLabel} leading-none uppercase tracking-[0.22em] text-fg-dim`,children:d(e)}),i&&a("h2",{className:`${P(U)} leading-none text-fg max-[800px]:leading-[1] [&>span]:block`,children:g(i)})]}),(l||r||v)&&n("div",{className:"flex items-center gap-5 max-[800px]:gap-3 min-[800px]:grow min-[800px]:justify-end",children:[l&&a("span",{className:`max-w-[340px] truncate font-display ${t.shelfBody} leading-[1.4] text-fg-dim max-[800px]:hidden min-[800px]:w-0 min-[800px]:grow min-[800px]:text-right`,children:d(l)}),r&&n(T,{href:r.href,className:`inline-flex items-center gap-2 whitespace-nowrap font-mono ${t.shelfLabel} uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg`,children:[d(r.text),a("span",{"aria-hidden":!0,children:"→"})]}),v&&a("span",{className:`whitespace-nowrap font-mono ${t.shelfLabelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:v})]})]}):null;if(m==="editorial"){const s=!!i||!!b;return n("header",{className:`${h} grid grid-cols-[auto_1fr_auto] items-end gap-10 border-b border-line pb-8 max-[1100px]:grid-cols-1 max-[1100px]:gap-3.5 ${x}`.trim(),children:[e&&(typeof e=="string"?a(p,{text:e,className:"pb-2"}):a("span",{className:"pb-2",children:e})),s&&n("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(40px,5.5vw,80px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em]",children:[i,b&&n(B,{children:[" ",a("em",{className:"font-serif font-normal italic text-accent",style:{letterSpacing:_},children:b})]})]}),l&&a("p",{className:`max-w-[360px] pb-1 text-right font-display ${t.bodySmall} leading-[1.5] text-fg-dim max-[1100px]:max-w-full max-[1100px]:text-left`,children:l})]})}if(m==="simple"){const s=`${h} ${x}`.trim();return n("div",{className:s||void 0,children:[e&&(typeof e=="string"?a(p,{text:e,look:c,className:"mb-4 block"}):a("span",{className:"mb-4 block",children:e})),i&&a("h2",{className:`font-heading2 ${t.headingMedium2} font-medium uppercase leading-none tracking-[-0.02em] text-fg ${t.headingMediumUpTo800Small}`,children:g(i)})]})}if(m==="statement"){const s=`${h} ${x}`.trim();return n("div",{className:s||void 0,children:[e&&(typeof e=="string"?a(p,{text:e,look:c,className:"mb-4 block"}):a("span",{className:"mb-4 block",children:e})),i&&a("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(40px,5vw,72px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em] text-fg",children:g(i,!0)})]})}if(m==="natural"){const s=`flex max-w-[680px] flex-col ${z??"gap-5"} ${h} ${x}`.replace(/\s+/g," ").trim();return n("div",{className:s,children:[e&&(typeof e=="string"?a(p,{text:e,look:c}):a("span",{children:e})),i&&a("h2",{className:`font-heading2 ${t.headingMedium2} font-medium leading-[1.05] tracking-[-0.03em] ${t.headingMediumUpTo800Small}`,children:g(i)}),l&&a("p",{className:`${L??`${t.bodyLarge}`} leading-[1.6] opacity-85`,children:l})]})}if(m==="essay"){const s=`${h} ${x}`.trim();return n("div",{className:s||void 0,children:[e&&(typeof e=="string"?a(p,{text:e,look:c,className:"mb-4 block"}):a("span",{className:"mb-4 block",children:e})),i&&a("h2",{className:`font-heading2 ${t.headingMedium1} [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-none tracking-[-0.02em] text-fg ${t.headingSmallUpTo800}`,children:g(i)})]})}const k=!!l||!!r,I=!!i,N=X(E)==="outlined",$=`font-mono ${t.label} uppercase tracking-[0.3em]`;let o=null;if(e)if(N)o=a("span",{className:`${A} text-fg-dim ${C}`,children:d(e)});else if(M&&!u&&typeof e=="string"){const s=e.indexOf("/"),O=s===-1?e:e.slice(0,s),S=s===-1?"":e.slice(s);o=n("span",{className:$,children:[a("span",{className:"text-accent",children:d(O)}),S&&a("span",{className:"text-fg-dim",children:d(S)})]})}else o=a("span",{className:`${$} ${u?"text-accent":"text-fg-dim"}`,children:d(e)});return n("div",{className:"mb-16 grid grid-cols-[auto_1fr_auto] items-end gap-10 border-b border-line pb-6 max-[800px]:mb-9 max-[800px]:grid-cols-1 max-[800px]:gap-3 max-[800px]:pb-5",children:[N&&e&&a("style",{children:F}),n("div",{className:"flex flex-col items-start gap-3",children:[f?.src&&a("img",{...J(D(f.src)),alt:f.alt,className:"h-8 w-auto object-contain"}),o]}),I&&a("h2",{className:u?"font-heading2 text-[length:min(var(--size-headingMedium,clamp(36px,5vw,64px)),var(--sf-heading-max,9999px))] [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-[0.95] tracking-[-0.025em]":`font-heading2 ${t.headingMedium3} [font-weight:var(--sf-heading-weight,500)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-none tracking-[-0.03em] whitespace-pre-line ${t.headingMediumUpTo800Large} max-[800px]:leading-[1]`,children:g(i)}),k&&n("div",{className:"flex flex-col items-end gap-3 max-[800px]:items-start",children:[l&&a("p",{className:`max-w-[340px] font-display ${t.bodySmall} leading-[1.5] text-fg-dim text-right max-[800px]:max-w-full max-[800px]:text-left`,children:d(l)}),r&&n(T,{href:r.href,className:`inline-flex items-center gap-2 whitespace-nowrap font-mono ${t.label} uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg`,children:[d(r.text),a("span",{"aria-hidden":!0,children:"→"})]})]})]})}function J(e){const i=R(e,{fallbackWidth:640,maxWidth:960});return i.srcSet?{src:i.src,srcSet:i.srcSet,sizes:"240px"}:{src:e}}export{G as DEFAULT_SHELF_TITLE_SIZE,w as SHELF_TITLE_SIZES,q as default};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type MapPin } from "efficient-shell/map";
|
|
3
|
+
import { type MapThemeMode } from "../../format/lib/map-styles.js";
|
|
4
|
+
export default function SiteMap({ pins, mapTheme, ariaLabel, className, selectedKey, focus, onSelect, fitTo, card, groupCrowded, children, }: {
|
|
5
|
+
pins: MapPin[];
|
|
6
|
+
mapTheme: MapThemeMode;
|
|
7
|
+
ariaLabel: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
selectedKey?: string | null;
|
|
10
|
+
focus?: {
|
|
11
|
+
key: string;
|
|
12
|
+
n: number;
|
|
13
|
+
} | null;
|
|
14
|
+
onSelect?: (key: string) => void;
|
|
15
|
+
fitTo?: string[] | null;
|
|
16
|
+
card?: ReactNode;
|
|
17
|
+
groupCrowded?: boolean;
|
|
18
|
+
children?: ReactNode;
|
|
19
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as v,jsxs as x}from"react/jsx-runtime";import{useEffect as u,useRef as b,useState as p}from"react";import{EntityMap as M}from"efficient-shell/map";import{mapModeIsLight as i,watchMapTheme as I}from"../../format/lib/map-styles.js";const S={"--rosh-map-pin":"var(--accent)","--rosh-map-pin-text":"var(--bg)","--rosh-map-pin-edge":"var(--bg)","--rosh-map-ring":"var(--fg)","--rosh-map-radius":"0px","--rosh-map-font":"var(--font-role-label)"};function j(e){const[t,r]=p(()=>i(e));return u(()=>(r(i(e)),I(()=>r(i(e)))),[e]),t?"light":"dark"}function y(e){const[t,r]=p(!1);return u(()=>{const s=e.current;if(!s||t)return;if(typeof IntersectionObserver>"u"){r(!0);return}const n=new IntersectionObserver(o=>{o.some(a=>a.isIntersecting)&&(n.disconnect(),r(!0))},{rootMargin:"200px"});return n.observe(s),()=>n.disconnect()},[e,t]),t}function L({pins:e,mapTheme:t,ariaLabel:r,className:s="",selectedKey:n=null,focus:o=null,onSelect:a,fitTo:f,card:l,groupCrowded:m=!1,children:h}){const c=b(null),d=y(c),g=j(t);return x("div",{ref:c,"data-site-map":"",className:s,style:S,children:[d&&v(M,{pins:e,selectedKey:n,focus:o,onSelect:a??(()=>{}),ariaLabel:r,fitTo:f,card:l,groupCrowded:m,look:"site",theme:g,cooperativeGestures:"coarse"}),h]})}export{L as default};
|
|
@@ -6,8 +6,9 @@ interface TextProps {
|
|
|
6
6
|
text: string;
|
|
7
7
|
align: Align;
|
|
8
8
|
tone: Tone;
|
|
9
|
+
tag?: string;
|
|
9
10
|
contained: boolean;
|
|
10
11
|
hero?: boolean;
|
|
11
12
|
}
|
|
12
|
-
export default function Text({ text, align, tone, contained, hero, pad }: TextProps): import("react").JSX.Element;
|
|
13
|
+
export default function Text({ text, align, tone, contained, hero, pad, tag }: TextProps): import("react").JSX.Element;
|
|
13
14
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import f from"./BlockFrame.js";import{renderGold as a,splitParagraphs as g}from"./goldPhrases.js";import{textTagOf as h}from"../../format/lib/content/text-tag.js";const r={bodyUpTo800:"max-[800px]:text-[length:var(--size-body,14px)]",bodySmall:"text-[length:var(--size-body,15px)]",bodyLarge:"text-[length:var(--size-body,17px)]"},y={left:"text-left",center:"text-center mx-auto",right:"text-right ml-auto"},b=`max-w-[380px] ${r.bodySmall} leading-[1.5] opacity-80 ${r.bodyUpTo800}`,u={default:"text-fg",dim:"text-fg-dim"};function T({text:t,align:s,tone:i,contained:m,hero:d=!1,pad:o,tag:p}){if(d)return e("p",{className:b,children:a(t)});const l=`max-w-[680px] whitespace-pre-line ${r.bodyLarge} leading-[1.7] ${y[s]} ${u[i]}`,n=h(p);return e(f,{contained:m,className:"py-4",pad:o?{values:o,frame:16}:void 0,children:n==="p"?g(t).map((c,x)=>e("p",{className:l,children:a(c)},x)):e(n,{className:l,children:a(t.trim())})})}export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useEffect as
|
|
1
|
+
"use client";import{useEffect as b,useRef as h,useState as y}from"react";const A=1400;function U(r,w={}){const{threshold:f=.1,replay:c=!0,durationMs:l=A}=w,a=h(null),e=h(null),[I,t]=y(r);return b(()=>{const d=a.current;if(!d)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){t(r);return}if(typeof IntersectionObserver>"u"){t(r);return}const o=()=>{e.current!==null&&(cancelAnimationFrame(e.current),e.current=null)},M=()=>{o();const i=performance.now(),n=v=>{const p=Math.min(1,(v-i)/l),F=1-Math.pow(1-p,3);t(Math.round(F*r)),p<1?e.current=requestAnimationFrame(n):e.current=null};e.current=requestAnimationFrame(n)};let m=!0,s=!1;const u=new IntersectionObserver(i=>{const n=i[0];if(n&&!(m&&(m=!1,t(0),s=!0,!n.isIntersecting)))if(n.isIntersecting){if(!s)return;s=!1,M(),c||u.disconnect()}else c&&(o(),t(0),s=!0)},{threshold:f});return u.observe(d),()=>{u.disconnect(),o()}},[r,f,c,l]),{ref:a,value:I}}export{A as COUNT_UP_DURATION_MS,U as useCountUp};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import l from"../../../../../components/ContactLocations.js";import{CONTACT_LOCATIONS_CARDS_PLACEHOLDER as n,CONTACT_LOCATIONS_DEFAULTS as i}from"../../../../../../format/lib/content/contact.js";import{phHideDefault as a}from"../../scaffold.js";const d={label:"Contact / Locations",defaultProps:{sectionNumber:i.sectionNumber,heading:i.heading,tagline:i.tagline,galleryKicker:i.galleryKicker,galleryHint:i.galleryHint,locations:n,mapTheme:i.mapTheme},render:e=>t(l,{sectionNumber:a(e.sectionNumber,i.sectionNumber,e.puck),heading:a(e.heading,i.heading,e.puck),tagline:a(e.tagline,i.tagline,e.puck),galleryKicker:a(e.galleryKicker,i.galleryKicker,e.puck),galleryHint:a(e.galleryHint,i.galleryHint,e.puck),locations:e.locations??n,mapTheme:e.mapTheme??i.mapTheme,imageShape:e.imageShape,editing:e.puck?.isEditing,nodeId:e.puck?.isEditing?e.id:void 0})};export{d as ContactLocationsRender};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
2
|
-
*${o.accent}*`,tagline:o.body},
|
|
1
|
+
import{jsx as d}from"react/jsx-runtime";import h from"../../../../../components/Footprint.js";import{FOOTPRINT_DEFAULTS as c}from"../../../../../../format/lib/content/footprint.js";import{parseDealerListPosition as f,parseFootprintSource as u}from"../../../../dealer-source.js";import{hidableText as m}from"efficient-easel/draw";import{parseSectionHeadPlacement as l}from"../../../../../../format/lib/sections/section-head-placement.js";import{PH as o}from"../../../../../../format/lib/puck/blocks/placeholders.js";import{phRows as T,phHide as n}from"../../scaffold.js";import{say as t}from"../../../../../../format/lib/editor-words.js";const r={sectionNumber:o.sectionNumber,heading:`${o.heading}
|
|
2
|
+
*${o.accent}*`,tagline:o.body},g=()=>[{role:t("Headquarters"),city:t("City"),country:t("Country"),address:t("Street address"),lat:0,lng:0,hq:!0},{role:t("Office"),city:t("City"),country:t("Country"),address:t("Street address"),lat:0,lng:0,hq:!1}],O={label:"Locations Map",defaultProps:{sectionNumber:"",heading:"",tagline:"",offices:[],mapTheme:c.mapTheme,padTop:120,padBottom:120,source:"typed",search:!1,searchHint:"",noMatchText:"",listPosition:"below",showDistance:!0},render:e=>{const i=l(e.headPlacement)==="own-box",a=s=>i?void 0:s;return d(h,{sectionNumber:a(n(e.sectionNumber,r.sectionNumber,e.puck)),heading:a(n(e.heading,r.heading,e.puck)),tagline:a(n(e.tagline,r.tagline,e.puck)),omitHead:i,offices:T(e.offices,g(),e.puck),mapTheme:e.mapTheme??c.mapTheme,padTop:i?0:typeof e.padTop=="number"?e.padTop:120,padBottom:typeof e.padBottom=="number"?e.padBottom:120,editing:e.puck?.isEditing,source:u(e.source),search:e.search===!0,searchHint:m(e.searchHint),noMatchText:m(e.noMatchText),listPosition:f(e.listPosition),showDistance:e.showDistance!==!1})}};export{r as FOOTPRINT_PH,O as FootprintRender};
|