efficient-web-builder 33.0.0 → 35.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 +71 -0
- package/dist/editor/components/CanvasPartsBridge.d.ts +4 -0
- package/dist/editor/components/CanvasPartsBridge.js +1 -0
- package/dist/editor/components/MediaUploadField.d.ts +2 -1
- package/dist/editor/components/MediaUploadField.js +1 -1
- package/dist/editor/components/PartSettingsPanel.js +1 -1
- package/dist/editor/components/PreviewPartAnchors.js +1 -1
- package/dist/editor/components/SectionTextPartBridge.js +1 -1
- package/dist/editor/components/StandaloneSectionEditor.js +1 -1
- package/dist/editor/components/StorefrontEditor.js +1 -1
- package/dist/editor/lib/puck/blocks/general/Cards/fields.js +1 -1
- package/dist/editor/lib/puck/blocks/general/Timeline/fields.js +1 -1
- package/dist/editor/lib/puck/blocks/general/index.d.ts +2 -2
- package/dist/editor/lib/puck/controls.d.ts +2 -1
- package/dist/editor/lib/puck/part-anchors.d.ts +4 -2
- package/dist/editor/lib/puck/part-anchors.js +1 -1
- package/dist/editor/lib/site-text-styles.d.ts +3 -2
- package/dist/editor/lib/site-text-styles.js +2 -2
- 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/editor-words-catalogue.d.ts +4 -0
- package/dist/format/lib/editor-words-catalogue.js +2 -2
- package/dist/format/lib/map-styles.d.ts +1 -27
- package/dist/format/lib/map-styles.js +1 -1
- package/dist/format/lib/media-value.d.ts +9 -0
- package/dist/format/lib/media-value.js +1 -0
- package/dist/format/lib/puck/passes/media-values.d.ts +3 -0
- package/dist/format/lib/puck/passes/media-values.js +1 -0
- package/dist/format/lib/puck/section-catalog.js +7 -1
- package/dist/format/lib/puck/templateFields.js +1 -1
- package/dist/format/lib/text-style-face.d.ts +3 -0
- package/dist/format/lib/text-style-face.js +1 -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/Heading.d.ts +7 -1
- package/dist/render/components/Heading.js +1 -1
- package/dist/render/components/PartStyledKind.js +1 -1
- package/dist/render/components/PartStyledText.js +1 -1
- package/dist/render/components/PublishedPartStylesContext.js +1 -1
- package/dist/render/components/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/Cards/render.d.ts +1 -0
- package/dist/render/lib/puck/blocks/general/Cards/render.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/KeyFeatures/render.d.ts +2 -0
- package/dist/render/lib/puck/blocks/general/KeyFeatures/render.js +1 -1
- package/dist/render/lib/puck/blocks/general/Text/render.js +1 -1
- package/dist/render/lib/puck/blocks/general/Timeline/render.d.ts +2 -0
- package/dist/render/lib/puck/blocks/general/Timeline/render.js +2 -2
- package/dist/render/lib/puck/blocks/general/TimelineTrack/render.d.ts +2 -0
- package/dist/render/lib/puck/blocks/general/TimelineTrack/render.js +1 -1
- package/dist/render/lib/puck/part-styles.d.ts +13 -3
- package/dist/render/lib/puck/part-styles.js +2 -2
- package/dist/render/lib/puck/passes/index.js +1 -1
- package/dist/render/lib/puck/text-parts.d.ts +1 -0
- package/dist/render/lib/puck/text-parts.js +1 -1
- package/package.json +3 -4
- 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
|
@@ -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,8 @@
|
|
|
1
1
|
import type { PadValues } from "../../format/lib/content/section-padding.js";
|
|
2
|
+
import type { CSSProperties } from "react";
|
|
2
3
|
import type { BlockAlign as Align } from "../../format/lib/content/block-align.js";
|
|
3
|
-
type
|
|
4
|
+
export type HeadingLevel = "1" | "2" | "3" | "4" | "5" | "6";
|
|
5
|
+
type Level = HeadingLevel;
|
|
4
6
|
interface HeadingProps {
|
|
5
7
|
pad?: PadValues;
|
|
6
8
|
level: Level;
|
|
@@ -9,5 +11,9 @@ interface HeadingProps {
|
|
|
9
11
|
contained: boolean;
|
|
10
12
|
hero?: boolean;
|
|
11
13
|
}
|
|
14
|
+
export declare function headingLook(level: Level, align: Align, face?: string): {
|
|
15
|
+
className: string;
|
|
16
|
+
style: CSSProperties;
|
|
17
|
+
};
|
|
12
18
|
export default function Heading({ level, text, align, contained, hero, pad }: HeadingProps): import("react").JSX.Element;
|
|
13
19
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as g}from"react/jsx-runtime";import{resolveTypeSize as r}from"../../format/lib/content/section-type-size.js";import p from"./BlockFrame.js";import{renderHeadline as o}from"./goldPhrases.js";const m={1:{size:"clamp(48px,7vw,96px)",role:"heading",step:"headingLarge",leading:"leading-[0.95]"},2:{size:"56px",sizeMobile:"36px",role:"heading",step:"headingMedium",rank:2,leading:"leading-none"},3:{size:"40px",sizeMobile:"28px",role:"heading",step:"headingSmall",rank:3,leading:"leading-[1.05]"},4:{size:"28px",role:"heading",step:"headingSmall",rank:3,leading:"leading-[1.1]"},5:{size:"22px",role:"body",step:"body",leading:"leading-[1.2]"},6:{size:"18px",role:"body",step:"body",leading:"leading-[1.3]"}},x="font-display font-medium leading-[0.92] tracking-[-0.04em] text-[length:min(var(--size-headingLarge,clamp(64px,9vw,144px)),var(--sf-heading-max,9999px))] max-[800px]:text-[length:min(var(--size-headingMedium,clamp(48px,12vw,76px)),var(--sf-heading-max,9999px))] max-[800px]:leading-[0.95]",f={left:"text-left",center:"text-center",right:"text-right"};function c(n,a,s="font-display"){const e=m[n],l=r(void 0,e.size,e.role,e.step),i=e.sizeMobile?r(void 0,e.sizeMobile,e.role,e.step):void 0,d={"--heading-size":l,...i?{"--heading-size-m":i}:{}},t=e.rank===2?"[font-weight:var(--sf-heading-2-weight,var(--sf-heading-weight,500))]":e.rank===3?"[font-weight:var(--sf-heading-3-weight,var(--sf-heading-weight,500))]":"[font-weight:var(--sf-heading-weight,500)]",h=["text-[length:var(--heading-size)]",e.leading,i?"max-[800px]:text-[length:var(--heading-size-m)]":""].filter(Boolean).join(" ");return{className:`${s} ${t} tracking-[-0.03em] text-fg ${h} ${f[a]}`,style:d}}function z({level:n,text:a,align:s,contained:e,hero:l=!1,pad:i}){if(l)return g("h1",{className:x,children:o(a,!1)});const d=`h${n}`,t=c(n,s);return g(p,{contained:e,className:"py-6",pad:i?{values:i,frame:24}:void 0,children:g(d,{className:t.className,style:t.style,children:o(a,!1)})})}export{z as default,c as headingLook};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Fragment as
|
|
1
|
+
"use client";import{Fragment as u,jsx as n}from"react/jsx-runtime";import{usePublishedPartKindRule as a,usePublishedSharedKindRule as i}from"./PublishedPartStylesContext.js";import{PART_STYLED_ATTR as m,TEXT_STYLE_ATTR as T}from"../lib/puck/part-styles.js";function d({kind:e,shared:s=!1,children:r}){const l=a(e),o=i(e),t=s?o:l;return t?n("span",{[m]:t.stamp,...t.textStyle?{[T]:t.textStyle}:{},children:r}):n(u,{children:r})}export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Fragment as m,jsx as
|
|
1
|
+
"use client";import{Fragment as m,jsx as e}from"react/jsx-runtime";import{ClaimedStamp as s,usePublishedPartRule as l}from"./PublishedPartStylesContext.js";import{PART_STYLED_ATTR as n,TEXT_STYLE_ATTR as i}from"../lib/puck/part-styles.js";function T({value:a,children:r}){const t=l(a);return t?e(s,{stamp:t.stamp,children:e("span",{[n]:t.stamp,...t.textStyle?{[i]:t.textStyle}:{},children:r})}):e(m,{children:r})}export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Fragment as
|
|
1
|
+
"use client";import{Fragment as d,jsx as s,jsxs as P}from"react/jsx-runtime";import{createContext as i,useContext as o,useId as f,useMemo as S}from"react";import{blockDrawsTextStyle as y,partRuleForKind as h,partRuleForText as C,partStyleCss as b,publishedPartStyles as v}from"../lib/puck/part-styles.js";import{styleKeyForPart as g}from"../../format/lib/sections/section-text-kinds.js";const l=i(null),m=i(null),p=i(null);function j({needles:e,styles:t,type:n,children:r}){const c=f(),x=JSON.stringify([c,e,t,n]),u=S(()=>v(e,t,c,a=>g(n,a),a=>y(n,a)),[x]);return u?P(d,{children:[s("style",{"data-sf-part-styles":"",dangerouslySetInnerHTML:{__html:b(u).replace(/</g,"\\3c ")}}),s(l.Provider,{value:u,children:r})]}):s(d,{children:r})}function T(e){const t=o(l),n=o(m),r=C(t,e);return r&&r.stamp!==n?r:null}function k(e){return h(o(l),e)}function I({stamp:e,children:t}){return s(m.Provider,{value:e,children:t})}function M({children:e}){const t=o(l);return s(p.Provider,{value:t,children:e})}function w(e){return h(o(p),e)}export{I as ClaimedStamp,j as PublishedPartStyles,M as SharedPartKinds,k as usePublishedPartKindRule,T as usePublishedPartRule,w as usePublishedSharedKindRule};
|
|
@@ -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};
|
|
@@ -7,8 +7,9 @@ interface TextProps {
|
|
|
7
7
|
align: Align;
|
|
8
8
|
tone: Tone;
|
|
9
9
|
tag?: string;
|
|
10
|
+
textStyle?: string;
|
|
10
11
|
contained: boolean;
|
|
11
12
|
hero?: boolean;
|
|
12
13
|
}
|
|
13
|
-
export default function Text({ text, align, tone, contained, hero, pad, tag }: TextProps): import("react").JSX.Element;
|
|
14
|
+
export default function Text({ text, align, tone, contained, hero, pad, tag, textStyle }: TextProps): import("react").JSX.Element;
|
|
14
15
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import p from"./BlockFrame.js";import{renderGold as n,renderHeadline as b,splitParagraphs as u}from"./goldPhrases.js";import{headingLook as N}from"./Heading.js";import{textTagOf as T}from"../../format/lib/content/text-tag.js";import{isTextStyleId as v}from"../lib/puck/part-styles.js";import{faceClassOf as x}from"../../format/lib/text-style-face.js";const s={bodyUpTo800:"max-[800px]:text-[length:var(--size-body,14px)]",bodySmall:"text-[length:var(--size-body,15px)]",bodyLarge:"text-[length:var(--size-body,17px)]",label:"text-[length:var(--size-label,13px)]"},$={left:"text-left",center:"text-center mx-auto",right:"text-right ml-auto"},S=`max-w-[380px] ${s.bodySmall} leading-[1.5] opacity-80 ${s.bodyUpTo800}`,L={default:"text-fg",dim:"text-fg-dim"};function z({text:a,align:d,tone:h,contained:m,hero:g=!1,pad:l,tag:y,textStyle:c}){if(g)return t("p",{className:S,children:n(a)});const e=v(c)?c:void 0,f=`${e?`${x({id:e})} `:""}max-w-[680px] whitespace-pre-line ${e==="body-5"?s.label:s.bodyLarge} leading-[1.7] ${$[d]} ${L[h]}`,o=T(y);if(e?.startsWith("heading-")){const i=String(Math.min(Number(e.slice(8)),6)),r=N(i,d,x({id:e}));return t(p,{contained:m,className:"py-4",pad:l?{values:l,frame:16}:void 0,children:t(o,{className:r.className,style:r.style,children:b(a.trim(),!1)})})}return t(p,{contained:m,className:"py-4",pad:l?{values:l,frame:16}:void 0,children:o==="p"?u(a).map((i,r)=>t("p",{className:f,children:n(i)},r)):t(o,{className:f,children:n(a.trim())})})}export{z 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 n}from"react/jsx-runtime";import
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import u from"../../../../../components/Cards.js";import b from"../../../../../components/KeyFeatures.js";import{hidableText as y}from"efficient-easel/draw";import{KEY_FEATURES_PH as d,keyFeaturesScaffoldItems as f}from"../KeyFeatures/render.js";import{parseSectionHeadPlacement as h}from"../../../../../../format/lib/sections/section-head-placement.js";import{parseSectionEyebrowLook as m}from"../../../../../../format/lib/sections/section-eyebrow-look.js";import{phRows as c,phHide as i}from"../../scaffold.js";import{say as t}from"../../../../../../format/lib/editor-words.js";const s={eyebrow:"Label",title:"Section *heading.*"},w=()=>[{title:t("Card title one"),body:t("A short line about this card.")},{title:t("Card title two"),body:t("A short line about this card.")},{title:t("Card title three"),body:t("A short line about this card.")}],F={label:"Cards",defaultProps:{eyebrow:"",title:"",items:[],columns:3},render:e=>{const a=h(e.headPlacement)==="own-box",o=r=>a?void 0:r;if(e.cardStyle==="label-only"){const r=Array.isArray(e.items)?e.items.map(l=>({label:y(l.title)??"",href:typeof l.href=="string"?l.href:void 0})):[];return n(b,{look:m(e.eyebrowLook,"KeyFeatures"),eyebrow:o(i(e.eyebrow,d.eyebrow,e.puck)),title:o(i(e.title,d.title,e.puck)),items:c(r,f(),e.puck),columns:e.columns,editing:e.puck?.isEditing})}return n(u,{look:m(e.eyebrowLook,"Cards"),eyebrow:o(i(e.eyebrow,s.eyebrow,e.puck)),title:o(i(e.title,s.title,e.puck)),omitHead:a,items:c(e.items,w(),e.puck),columns:e.columns,editing:e.puck?.isEditing})}};export{s as CARDS_PH,F as CardsRender};
|
|
@@ -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};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { type KeyFeatureItem } from "../../../../../components/KeyFeatures.js";
|
|
1
2
|
import type { BlockRender } from "../../../../../../format/lib/puck/blocks/block-types.js";
|
|
2
3
|
export declare const KEY_FEATURES_PH: {
|
|
3
4
|
eyebrow: string;
|
|
4
5
|
title: string;
|
|
5
6
|
};
|
|
7
|
+
export declare const keyFeaturesScaffoldItems: () => KeyFeatureItem[];
|
|
6
8
|
export declare const KeyFeaturesRender: BlockRender;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as m}from"react/jsx-runtime";import u from"../../../../../components/KeyFeatures.js";import{parseSectionEyebrowLook as y}from"../../../../../../format/lib/sections/section-eyebrow-look.js";import{phRows as F,phHide as
|
|
1
|
+
import{jsx as m}from"react/jsx-runtime";import u from"../../../../../components/KeyFeatures.js";import{parseSectionEyebrowLook as y}from"../../../../../../format/lib/sections/section-eyebrow-look.js";import{phRows as F,phHide as r}from"../../scaffold.js";import{say as e}from"../../../../../../format/lib/editor-words.js";const l={eyebrow:"Highlight",title:"Key *features.*"},f=()=>[{label:e("Feature label one")},{label:e("Feature label two")},{label:e("Feature label three")},{label:e("Feature label four")},{label:e("Feature label five")},{label:e("Feature label six")}],K={label:"Key Features",defaultProps:{eyebrow:"",title:"",items:[],columns:3},render:({eyebrow:o,title:a,items:s,columns:i,eyebrowLook:b,puck:t})=>m(u,{look:y(b,"KeyFeatures"),eyebrow:r(o,l.eyebrow,t),title:r(a,l.title,t),items:F(s,f(),t),columns:i,editing:t?.isEditing})};export{l as KEY_FEATURES_PH,K as KeyFeaturesRender,f as keyFeaturesScaffoldItems};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as m,jsx as r}from"react/jsx-runtime";import{padValuesOf as
|
|
1
|
+
import{Fragment as m,jsx as r}from"react/jsx-runtime";import{padValuesOf as l}from"../../../../../../format/lib/content/section-padding.js";import x from"../../../../../components/Text.js";import{hidableText as f,readHidable as p}from"efficient-easel/draw";import{PH as g}from"../../../../../../format/lib/puck/blocks/placeholders.js";import{phPrev as u}from"../../scaffold.js";import{readPartStyle as c}from"../../../part-styles.js";const j={label:"Text",defaultProps:{text:"",align:"left",tone:"default",tag:"p",contained:!0},render:t=>{const{text:e,align:a,tone:o,tag:n,contained:i,puck:d}=t;return p(e).hidden?r(m,{}):r(x,{text:u(f(e),g.body,d)??"",align:a,tone:o,tag:n,textStyle:c(t,"text").textStyle,contained:i,pad:l(t)})}};export{j as TextRender};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type TimelineLayout } from "../../../../../components/Timeline.js";
|
|
1
2
|
import type { BlockRender } from "../../../../../../format/lib/puck/blocks/block-types.js";
|
|
2
3
|
export declare const TIMELINE_PH: {
|
|
3
4
|
eyebrow: string;
|
|
@@ -7,4 +8,5 @@ export declare const TIMELINE_PH: {
|
|
|
7
8
|
imageMeta: string;
|
|
8
9
|
cta: string;
|
|
9
10
|
};
|
|
11
|
+
export type StoryTimelineDisplay = TimelineLayout | "track";
|
|
10
12
|
export declare const TimelineRender: BlockRender;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
2
|
-
*Highlight line*`,intro:n.body,imageCaption:n.imageCaption,imageMeta:n.imageMeta,cta:
|
|
1
|
+
import{jsx as m}from"react/jsx-runtime";import d from"../../../../../components/Timeline.js";import l from"../../../../../components/TimelineTrack.js";import{resolveSectionBackground as u}from"../../../../../../format/lib/content/section-background.js";import{SECTION_BG_BUILT_IN as b}from"../../../../../../format/lib/puck/blocks/general/section-bg-built-in.js";import{TIMELINE_TRACK_PH as o,timelineTrackScaffoldEntries as f}from"../TimelineTrack/render.js";import{CTA_PH as g,PH as n}from"../../../../../../format/lib/puck/blocks/placeholders.js";import{phRows as c,phHide as i,ctaHide as r}from"../../scaffold.js";import{say as t}from"../../../../../../format/lib/editor-words.js";const a={eyebrow:n.eyebrow,title:`Section heading
|
|
2
|
+
*Highlight line*`,intro:n.body,imageCaption:n.imageCaption,imageMeta:n.imageMeta,cta:g.text},y=()=>[{date:t("Year"),title:t("Milestone title."),body:t("Describe what happened, in a sentence or two.")},{date:t("Year"),title:t("Milestone title."),body:t("Describe what happened, in a sentence or two.")},{date:t("Year"),title:t("Milestone title."),body:t("Describe what happened, in a sentence or two.")}];function T(e){return{date:e.date,title:e.title,blurb:e.body,future:e.future}}const x={label:"Story Timeline",defaultProps:{layout:"split",eyebrow:"",title:"",intro:"",imageSrc:"",imageCaption:"",imageMeta:"",ctaText:"",ctaHref:"",entries:[],padTop:120,padBottom:120},render:e=>e.layout==="track"?m(l,{eyebrow:i(e.eyebrow,o.eyebrow,e.puck),title:i(e.title,o.title,e.puck),intro:i(e.intro,o.intro,e.puck),entries:c(Array.isArray(e.entries)?e.entries.map(T):[],f(),e.puck),cta:r(e.ctaText,e.ctaHref,e.puck),background:u(e.background,b.TimelineTrack),padTop:typeof e.padTop=="number"?e.padTop:120,padBottom:typeof e.padBottom=="number"?e.padBottom:120,editing:e.puck?.isEditing}):m(d,{layout:e.layout||"split",eyebrow:i(e.eyebrow,a.eyebrow,e.puck),title:i(e.title,a.title,e.puck),intro:i(e.intro,a.intro,e.puck),imageSrc:e.imageSrc||void 0,imageCaption:i(e.imageCaption,a.imageCaption,e.puck),imageMeta:i(e.imageMeta,a.imageMeta,e.puck),cta:r(e.ctaText,e.ctaHref,e.puck),entries:c(e.entries,y(),e.puck),padTop:typeof e.padTop=="number"?e.padTop:120,padBottom:typeof e.padBottom=="number"?e.padBottom:120,editing:e.puck?.isEditing})};export{a as TIMELINE_PH,x as TimelineRender};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type TimelineTrackEntry } from "../../../../../components/TimelineTrack.js";
|
|
1
2
|
import type { BlockRender } from "../../../../../../format/lib/puck/blocks/block-types.js";
|
|
2
3
|
export declare const TIMELINE_TRACK_PH: {
|
|
3
4
|
eyebrow: string;
|
|
@@ -5,4 +6,5 @@ export declare const TIMELINE_TRACK_PH: {
|
|
|
5
6
|
intro: string;
|
|
6
7
|
cta: string;
|
|
7
8
|
};
|
|
9
|
+
export declare const timelineTrackScaffoldEntries: () => TimelineTrackEntry[];
|
|
8
10
|
export declare const TimelineTrackRender: BlockRender;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as m}from"react/jsx-runtime";import c from"../../../../../components/TimelineTrack.js";import{SECTION_BG_INHERIT as d,resolveSectionBackground as u}from"../../../../../../format/lib/content/section-background.js";import{parseSectionHeadPlacement as b}from"../../../../../../format/lib/sections/section-head-placement.js";import{CTA_PH as f,PH as
|
|
1
|
+
import{jsx as m}from"react/jsx-runtime";import c from"../../../../../components/TimelineTrack.js";import{SECTION_BG_INHERIT as d,resolveSectionBackground as u}from"../../../../../../format/lib/content/section-background.js";import{parseSectionHeadPlacement as b}from"../../../../../../format/lib/sections/section-head-placement.js";import{CTA_PH as f,PH as r}from"../../../../../../format/lib/puck/blocks/placeholders.js";import{phRows as T,phHide as n,ctaHide as s}from"../../scaffold.js";import{SECTION_BG_BUILT_IN as k}from"../../../../../../format/lib/puck/blocks/general/section-bg-built-in.js";import{say as t}from"../../../../../../format/lib/editor-words.js";const a={eyebrow:r.eyebrow,title:r.headingAccent,intro:r.body,cta:f.text},h=()=>[{date:t("Year"),title:t("Milestone"),blurb:t("A short line about this milestone."),future:!1},{date:t("Year"),title:t("Milestone"),blurb:t("A short line about this milestone."),future:!1},{date:t("Year"),title:t("Milestone"),blurb:t("A short line about this milestone."),future:!1},{date:t("Year →"),title:t("Upcoming"),blurb:t("A milestone still to come."),future:!0}],A={label:"Milestone Timeline",defaultProps:{eyebrow:"",title:"",intro:"",entries:[],ctaText:"",ctaHref:"",background:d,padTop:120,padBottom:120},render:e=>{const o=b(e.headPlacement)==="own-box",i=l=>o?void 0:l;return m(c,{eyebrow:i(n(e.eyebrow,a.eyebrow,e.puck)),title:i(n(e.title,a.title,e.puck)),intro:i(n(e.intro,a.intro,e.puck)),omitHead:o,entries:T(e.entries,h(),e.puck),cta:s(e.ctaText,e.ctaHref,e.puck),background:u(e.background,k.TimelineTrack),padTop:o?0:typeof e.padTop=="number"?e.padTop:120,padBottom:typeof e.padBottom=="number"?e.padBottom:120,editing:e.puck?.isEditing})}};export{a as TIMELINE_TRACK_PH,A as TimelineTrackRender,h as timelineTrackScaffoldEntries};
|
|
@@ -4,6 +4,10 @@ import type { PartEl } from "../../../editor/lib/puck/part-anchors.js";
|
|
|
4
4
|
import { type PartNeedle } from "./text-parts.js";
|
|
5
5
|
export declare const PART_STYLES_PROP = "_partStyles";
|
|
6
6
|
export declare const PART_STYLED_ATTR = "data-sf-part-styled";
|
|
7
|
+
export declare const TEXT_STYLE_ATTR = "data-sf-text-style";
|
|
8
|
+
export declare function isTextStyleId(value: unknown): value is string;
|
|
9
|
+
export declare const STYLE_ID_OF_ROLE: Readonly<Partial<Record<FontRole, string>>>;
|
|
10
|
+
export declare function followedStyleOf(style: PartStyle): string | undefined;
|
|
7
11
|
export declare const PART_WEIGHTS: readonly [400, 500, 600, 700];
|
|
8
12
|
export type PartWeight = (typeof PART_WEIGHTS)[number];
|
|
9
13
|
export declare const PART_ALIGNS: readonly ["left", "center", "right", "justify"];
|
|
@@ -54,6 +58,7 @@ export declare const PART_PARAGRAPH_MAX = 400;
|
|
|
54
58
|
export type PartStyle = {
|
|
55
59
|
font?: string;
|
|
56
60
|
role?: FontRole;
|
|
61
|
+
textStyle?: string;
|
|
57
62
|
weight?: PartWeight;
|
|
58
63
|
size?: number;
|
|
59
64
|
line?: number;
|
|
@@ -96,6 +101,10 @@ export declare function propsWithPartStyleValue<K extends keyof PartStyle>(props
|
|
|
96
101
|
export declare function propsWithoutPartStyle(props: Record<string, unknown>, partKey: string): Record<string, unknown>;
|
|
97
102
|
export declare function partCaseOfTransform(transform: string | null | undefined): TextStyleCase;
|
|
98
103
|
export declare function partCaseTransform(value: TextStyleCase | undefined): string;
|
|
104
|
+
export type PartDeclarationOptions = {
|
|
105
|
+
blockDrawsStyle?: boolean;
|
|
106
|
+
};
|
|
107
|
+
export declare function blockDrawsTextStyle(type: string | undefined, partKey: string): boolean;
|
|
99
108
|
export declare function partSpacingOf(style: PartStyle): {
|
|
100
109
|
lineHeight?: number;
|
|
101
110
|
letterSpacingEm?: number;
|
|
@@ -104,7 +113,7 @@ export declare const PART_PARAGRAPH_VAR = "--sf-part-para";
|
|
|
104
113
|
export declare const PART_PHONE_MAX_CSS = "(max-width: 719.98px)";
|
|
105
114
|
export declare function partPhoneDeclarations(style: PartStyle): Record<string, string>;
|
|
106
115
|
export declare function partStyleForScreen(style: PartStyle, phone: boolean): PartStyle;
|
|
107
|
-
export declare function partStyleDeclarations(style: PartStyle, base: PartStyleBase): Record<string, string>;
|
|
116
|
+
export declare function partStyleDeclarations(style: PartStyle, base: PartStyleBase, options?: PartDeclarationOptions): Record<string, string>;
|
|
108
117
|
export declare function isHexColour(value: string): boolean;
|
|
109
118
|
export type MeasuredPartStyle = {
|
|
110
119
|
fontSize: string;
|
|
@@ -121,12 +130,13 @@ export declare function partFontKeyOf(family: string, resolve: (cssVar: string)
|
|
|
121
130
|
export declare function partStyleSource<E extends {
|
|
122
131
|
getAttribute(name: string): string | null;
|
|
123
132
|
}>(nodeId: string, selectedPartId: string | null, selectedElements: readonly E[], declaresStyle: (className: string | null) => boolean): E | null;
|
|
124
|
-
export declare function applyPartStyles(stamps: readonly StyledPartStamp[], styles: PartStyles, baseOf?: (element: StyledPartEl) => PartStyleBase, styleKeyOf?: (partKey: string) => string, isInline?: (element: StyledPartEl) => boolean, phone?: boolean): number;
|
|
133
|
+
export declare function applyPartStyles(stamps: readonly StyledPartStamp[], styles: PartStyles, baseOf?: (element: StyledPartEl) => PartStyleBase, styleKeyOf?: (partKey: string) => string, isInline?: (element: StyledPartEl) => boolean, phone?: boolean, drawsStyle?: (partKey: string) => boolean): number;
|
|
125
134
|
export declare const PART_PARAGRAPH_ATTR = "data-sf-part-para";
|
|
126
135
|
export declare const PART_STYLE_PROPERTIES: readonly string[];
|
|
127
136
|
export declare const SHARED_PART_PROPERTIES: readonly string[];
|
|
128
137
|
export type PublishedPartRule = {
|
|
129
138
|
stamp: string;
|
|
139
|
+
textStyle?: string;
|
|
130
140
|
declarations: Record<string, string>;
|
|
131
141
|
phone?: Record<string, string>;
|
|
132
142
|
};
|
|
@@ -135,7 +145,7 @@ export type PublishedPartSheet = {
|
|
|
135
145
|
kindRules: ReadonlyMap<string, PublishedPartRule>;
|
|
136
146
|
drawn: ReadonlySet<string>;
|
|
137
147
|
};
|
|
138
|
-
export declare function publishedPartStyles(needles: readonly PartNeedle[], styles: PartStyles, scope: string, styleKeyOf?: (partKey: string) => string): PublishedPartSheet | null;
|
|
148
|
+
export declare function publishedPartStyles(needles: readonly PartNeedle[], styles: PartStyles, scope: string, styleKeyOf?: (partKey: string) => string, drawsStyle?: (partKey: string) => boolean): PublishedPartSheet | null;
|
|
139
149
|
export declare function isPartKindKey(key: string): boolean;
|
|
140
150
|
export declare function partRuleForKind(sheet: PublishedPartSheet | null, kind: string): PublishedPartRule | null;
|
|
141
151
|
export declare function partStyleCss(sheet: PublishedPartSheet): string;
|