efficient-storefront-blocks 0.65.0 → 0.66.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.
Files changed (63) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +0 -1
  3. package/dist/chunks/{EditorPreviewCheckout-4KZCYPQT.js → EditorPreviewCheckout-EXU5CRJ2.js} +1 -1
  4. package/dist/chunks/{SiteEditorProvider-ZYGNRWSB.js → SiteEditorProvider-KOPR3UDU.js} +1 -1
  5. package/dist/chunks/{chunk-I7BIOONR.js → chunk-S66TL4Z3.js} +1 -1
  6. package/dist/chunks/{chunk-YAO6XQYA.js → chunk-TAGGXC3A.js} +1 -1
  7. package/dist/chunks/{chunk-GR7OHU32.js → chunk-VWO54PMT.js} +1 -1
  8. package/dist/chunks/{chunk-OU2WWXMT.js → chunk-Z7PJKX2P.js} +1 -1
  9. package/dist/chunks/{fitment-data-IKFCBT6E.js → fitment-data-UQDOQP66.js} +1 -1
  10. package/dist/consent.js +1 -1
  11. package/dist/editor/components/CollectionPicker.js +1 -1
  12. package/dist/editor/components/EditProductLink.js +1 -1
  13. package/dist/editor/components/FormPicker.js +1 -1
  14. package/dist/editor/components/GalleryProductBinding.d.ts +1 -1
  15. package/dist/editor/components/GalleryProductBinding.js +1 -1
  16. package/dist/editor/components/GalleryShowcaseSource.d.ts +1 -1
  17. package/dist/editor/components/GalleryShowcaseSource.js +1 -1
  18. package/dist/editor/components/HeaderSettingsPanel.js +1 -1
  19. package/dist/editor/components/MenuLinkRangeField.js +1 -1
  20. package/dist/editor/components/PerViewStepperField.js +1 -1
  21. package/dist/editor/lib/puck/blocks/service/ContactRouting/fields.js +1 -1
  22. package/dist/editor/lib/puck/config.d.ts +0 -4
  23. package/dist/editor/lib/puck/config.js +1 -1
  24. package/dist/editor/lib/storefront-editor-words.d.ts +2 -4
  25. package/dist/editor/lib/storefront-editor-words.js +1 -1
  26. package/dist/index.d.ts +0 -17
  27. package/dist/index.js +43 -43
  28. package/dist/render/app/globals.css +18 -4
  29. package/dist/render/built-with.json +1 -1
  30. package/dist/render/components/ContactRouting.d.ts +11 -1
  31. package/dist/render/components/ContactRouting.js +1 -1
  32. package/dist/render/components/GalleryGrid.js +1 -1
  33. package/dist/render/components/GalleryItem.d.ts +1 -0
  34. package/dist/render/components/GalleryItem.js +1 -1
  35. package/dist/render/components/ProductGallery.js +1 -1
  36. package/dist/render/components/ProductGridSection.js +1 -1
  37. package/dist/render/components/fitment/FitmentPickerGrid.js +1 -1
  38. package/dist/render/components/fitment/PickerField.js +1 -1
  39. package/dist/render/components/pdp-dynamic/DynamicGalleryGrid.js +1 -1
  40. package/dist/render/lib/api/types.d.ts +1 -0
  41. package/dist/render/lib/consent/choice.d.ts +0 -2
  42. package/dist/render/lib/consent/choice.js +1 -1
  43. package/dist/render/lib/consent/rules.d.ts +0 -1
  44. package/dist/render/lib/consent/rules.js +1 -1
  45. package/dist/render/lib/content/source-values.d.ts +4 -0
  46. package/dist/render/lib/content/source-values.js +1 -0
  47. package/dist/render/lib/content/stock-words.d.ts +0 -4
  48. package/dist/render/lib/content/stock-words.js +1 -1
  49. package/dist/render/lib/puck/blocks/commerce/GalleryItem/render.js +1 -1
  50. package/dist/render/lib/puck/blocks/text-part-shapes.json +6 -3
  51. package/dist/render/lib/sections/fill-row.d.ts +8 -0
  52. package/dist/render/lib/sections/fill-row.js +1 -1
  53. package/dist/render/lib/sections/grid-no-hole.d.ts +12 -0
  54. package/dist/render/lib/sections/grid-no-hole.js +1 -0
  55. package/dist/render/lib/wheels/catalog-filters-to-listing.d.ts +0 -1
  56. package/dist/render/lib/wheels/catalog-filters-to-listing.js +1 -1
  57. package/dist/render/lib/wheels/catalog-filters.d.ts +0 -1
  58. package/dist/render/lib/wheels/catalog-filters.js +1 -1
  59. package/dist/words.d.ts +3 -4
  60. package/dist/words.js +2 -2
  61. package/package.json +1 -1
  62. /package/dist/chunks/{chunk-B44XQA2J.js → chunk-IHYVLVY3.js} +0 -0
  63. /package/dist/chunks/{chunk-YAO6XQYA.js.LEGAL.txt → chunk-TAGGXC3A.js.LEGAL.txt} +0 -0
@@ -2833,11 +2833,25 @@ em.text-accent {
2833
2833
  min-width: 0;
2834
2834
  }
2835
2835
 
2836
- /* The tile fills the cell it was given, through Puck's wrapper in the editor and
2837
- directly on the published page — the same "both are the grid item" fact the
2838
- nth-child rules rely on. */
2836
+ /* The tile fills the cell it was given. The cell is the grid's child: the tile
2837
+ itself on the published page, the editor's item on the canvas — the same
2838
+ "both are the grid item" fact the nth-child rules rely on.
2839
+
2840
+ ⚠️ THE TILE IS NAMED BY ITS ROLE, NOT BY HOW DEEP IT SITS (GG 2026-10-26,
2841
+ Lewis 2026-10-25: hartesmetal.com Home's "Vehicle gallery" drew its heading
2842
+ and an empty grid in the editor). This read `.sf-gallery-zone > * > *`, which
2843
+ on the canvas is the builder's part host (`[data-sf-part-host]`,
2844
+ `display: contents`), not the tile: the item and the part host stand between
2845
+ the grid and the tile, so the tile was a third level, had no height, and its
2846
+ absolutely placed photo drew 0 high. `[data-gallery-tile]` (GalleryItem's
2847
+ GALLERY_TILE_ATTR) is the tile on both surfaces, whatever wraps it, and
2848
+ `[data-gallery-tile] > *` is the tile's own box: the card, or, with the
2849
+ words below the photo, the box that holds the photo and the words. On the
2850
+ page those are the elements `> * > *` reached, so the page draws the same.
2851
+ scripts/test-gallery-wall-tile-on-canvas.tsx draws both. */
2839
2852
  .sf-gallery-zone > *,
2840
- .sf-gallery-zone > * > * {
2853
+ .sf-gallery-zone [data-gallery-tile],
2854
+ .sf-gallery-zone [data-gallery-tile] > * {
2841
2855
  height: 100%;
2842
2856
  }
2843
2857
 
@@ -1,3 +1,3 @@
1
1
  {
2
- "efficient-web-builder": "40.1.0"
2
+ "efficient-web-builder": "40.1.1"
3
3
  }
@@ -1,8 +1,17 @@
1
1
  import { type ReactNode } from "react";
2
2
  import type { Form } from "../lib/api/index.js";
3
3
  import { type ContactChannel, type RoutingGroup } from "efficient-web-builder/format/lib/content/contact";
4
+ export declare const CHANNEL_HINTS: {
5
+ readonly label: "Label";
6
+ readonly value: "Value";
7
+ readonly sub: "Sub line";
8
+ };
9
+ type DrawnChannel = ContactChannel & {
10
+ at: number;
11
+ };
12
+ export declare function drawnChannels(channels: ContactChannel[], editing: boolean): DrawnChannel[];
4
13
  export declare function channelHref(c: ContactChannel): string | undefined;
5
- export declare function mergeChannelsForPhone(channels: ContactChannel[]): ContactChannel[];
14
+ export declare function mergeChannelsForPhone<C extends ContactChannel>(channels: C[]): C[];
6
15
  export declare function topicFieldOf(form: Pick<Form, "fields"> | null | undefined, groups: Pick<RoutingGroup, "id" | "title">[], otherLabel?: string): {
7
16
  key: string;
8
17
  optionFor: (id: string) => string | undefined;
@@ -31,3 +40,4 @@ export interface ContactRoutingProps {
31
40
  }
32
41
  export declare const fieldClass: string;
33
42
  export default function ContactRouting({ routingNumber, routingTagline, groups, formNumber, formHeading, metaLines, showOther, otherLabel, otherNoteTitle, otherNoteBody, buttonText, consent, channels, formSlug, form: injectedForm, editing, initialActiveId, onActiveChange, reasonExtras, }: ContactRoutingProps): import("react").JSX.Element;
43
+ export {};
@@ -1 +1 @@
1
- "use client";import{jsx as n,jsxs as l,Fragment as A}from"react/jsx-runtime";import T from"./SectionBand.js";import{useEffect as C,useState as M}from"react";import{OTHER_REASON_ID as y}from"efficient-web-builder/format/lib/content/contact";import{FormFieldInput as ee,FormHoneypot as ne,successMessageFor as te,useBoundForm as ae,useFormSubmission as re}from"./formSubmission.js";import le from"efficient-web-builder/render/components/SectionEyebrow";import oe,{FieldCaption as ie}from"./WebFormField.js";import{scrollBehavior as se}from"efficient-web-builder/render/components/useReducedMotion";import{renderChrome as L,renderGold as $,renderHeadline as ce,splitParagraphs as de}from"efficient-web-builder/render/components/goldPhrases";import{say as q}from"efficient-web-builder/format/lib/editor-words";import{phoneHref as me}from"efficient-web-builder/format/lib/links/phone-href";const t={bodySmall:"text-[length:var(--size-body,14px)]",body:"text-[length:var(--size-body,15px)]",bodyLarge:"text-[length:var(--size-body,18px)]",headingSmall1:"text-[length:var(--size-headingSmall,24px)]",headingSmall2:"text-[length:var(--size-headingSmall,26px)]",labelXs:"text-[length:var(--size-label,10px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]",labelXl:"text-[length:var(--size-label,14px)]"};function P(f){if(f.href)return f.href;const o=(f.value??"").trim();if(o.includes("@"))return`mailto:${o}`;if(/^\+?[\d\s().-]{6,}$/.test(o))return me(o)}function pe(f){const o=[],d=new Map;for(const r of f){if(!r.groupId){o.push(r);continue}const m=r.value.trim().toLowerCase(),u=d.get(m);if(u)u.label=`${u.label} · ${r.label}`;else{const b={...r};d.set(m,b),o.push(b)}}return o}function fe(f,o,d){const r=m=>String(m??"").trim().toLowerCase();for(const m of f?.fields??[]){if(m.type!=="select"||!Array.isArray(m.options))continue;const u=m.options.map(String);if(!o.some(s=>u.some(p=>r(p)===r(s.title))))continue;const b=s=>r(s===y?d:o.find(p=>p.id===s)?.title);return{key:m.key,optionFor:s=>u.find(p=>r(p)===b(s)&&b(s)!==""),idFor:s=>{const p=o.find(S=>r(S.title)===r(s));return p?p.id:d&&r(s)===r(d)?y:void 0}}}return null}const B=`border-b border-line bg-transparent py-4 font-display ${t.bodyLarge} tracking-[0.01em] text-fg outline-none transition-colors focus:border-accent`;function xe({routingNumber:f,routingTagline:o,groups:d,formNumber:r,formHeading:m,metaLines:u,showOther:b=!0,otherLabel:s="Other",otherNoteTitle:p,otherNoteBody:S,buttonText:O,consent:R,channels:V,formSlug:_,form:D,editing:w,initialActiveId:v,onActiveChange:H,reasonExtras:G}){const k=[...d.map(e=>e.id),...b?[y]:[]],W=v&&k.includes(v)?v:k[0]??y,[g,j]=M(W);C(()=>{k.includes(g)||j(k[0]??y)},[k.join("|")]),C(()=>{v&&k.includes(v)&&j(v)},[v]);const h=ae(_,D),c=re({form:h,formSlug:_,editing:w}),x=fe(h,d,b?s:void 0),z=e=>{j(e),I(null);const a=x?.optionFor(e);x&&a!==void 0&&c.set(x.key,a),H?.(e)};C(()=>{if(!x||c.valueOf(x.key))return;const e=x.optionFor(g);e!==void 0&&c.set(x.key,e)},[x?.key]);const[X,I]=M(null),N=(V??[]).filter(e=>!e.hidden),Z=e=>X!==null?!e.groupId&&e.value===X:e.groupId===g,J=h===void 0,E=!!h||!!w,[K,Q]=M(!1);C(()=>{const e=()=>Q(document.documentElement.getAttribute("data-theme")==="light");e();const a=new MutationObserver(e);return a.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>a.disconnect()},[]);const U=d.length>0||!!w;return l(A,{children:[U&&l(T,{className:"border-b border-line py-[60px]",style:K?void 0:{background:"var(--section-bg)"},children:[(f||o)&&l("div",{className:"mb-6 flex items-center gap-6 border-b border-line pb-6",children:[f&&n(le,{text:f}),o&&n("span",{className:`font-display ${t.bodySmall} uppercase tracking-[0.04em] text-fg-dim`,children:$(o)})]}),n("div",{className:"sf-card grid grid-cols-4 gap-[2px] border border-line bg-line max-[1100px]:grid-cols-2 max-[700px]:grid-cols-1",children:d.map(e=>{const a=g===e.id;return l("button",{type:"button",onClick:()=>{z(e.id),typeof window<"u"&&window.matchMedia("(max-width: 1100px)").matches&&document.getElementById("contact-form")?.scrollIntoView({behavior:se(),block:"start"})},className:["flex min-h-[240px] cursor-pointer flex-col gap-4 px-8 py-10 text-left transition-colors",a?"bg-surface outline outline-2 -outline-offset-2 outline-accent":"bg-bg hover:bg-surface"].join(" "),children:[e.eyebrow&&n("span",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.24em] text-accent`,children:e.eyebrow}),n("h3",{className:`whitespace-pre-line font-heading3 ${t.headingSmall2} font-medium uppercase leading-[1.05] tracking-[-0.02em]`,children:e.title}),e.copy&&n("p",{className:`mt-auto font-display ${t.bodySmall} leading-[1.5] text-fg-dim`,children:e.copy}),e.response&&l("div",{className:`mt-2 flex justify-between border-t border-line pt-4 font-mono ${t.labelSmall} uppercase tracking-[0.22em] text-fg-dim`,children:[n("span",{children:"Response"}),n("strong",{className:"font-normal text-fg",children:e.response})]})]},e.id)})})]}),(E||N.length>0)&&n("section",{id:"contact-form",className:"scroll-mt-[80px] border-b border-line py-20 max-[1100px]:py-[60px]",children:l("div",{className:["mx-auto grid max-w-[var(--sf-site-width,1600px)] gap-20 px-[var(--sf-site-gutter,40px)] max-[1100px]:grid-cols-1 max-[1100px]:gap-[60px] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))]",E&&N.length>0?"grid-cols-[1.3fr_1fr]":"grid-cols-1"].join(" "),children:[E&&l("div",{children:[l("div",{className:"mb-8 flex items-end justify-between gap-6 border-b border-line pb-6",children:[l("div",{children:[r&&n("div",{className:`pb-2 font-mono ${t.labelLarge} uppercase tracking-[0.3em] text-accent`,children:$(r)}),m&&n("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(36px,4vw,56px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em]",children:ce(m,!0)})]}),!!(u&&u.length)&&n("div",{className:`text-right font-mono ${t.labelSmall} uppercase leading-[1.8] tracking-[0.22em] text-fg-dim max-[700px]:text-left`,children:u.map((e,a)=>n("div",{children:e},a))})]}),h?c.done?n("div",{className:`border border-accent bg-accent/[0.08] p-8 font-display ${t.body} leading-[1.6] text-fg-dim`,children:te(h,"Thanks — we've received your message.")}):l("form",{className:"grid grid-cols-2 gap-5 max-[700px]:grid-cols-1",onSubmit:c.handleSubmit,children:[h.fields.map(e=>n(oe,{label:e.label,required:e.required,className:e.type==="textarea"||e.type==="checkbox"?"col-span-2 max-[700px]:col-span-1":void 0,children:n(ee,{field:e,value:c.valueOf(e.key),onChange:a=>{c.set(e.key,a);const i=x&&e.key===x.key?x.idFor(a):void 0;i!==void 0&&(j(i),I(null),H?.(i))},className:e.type==="textarea"?`${B} min-h-[140px] resize-y leading-[1.5]`:e.type==="checkbox"?"size-4 self-start accent-accent":B})},e.key)),l("div",{className:"col-span-2 flex flex-col gap-2 max-[700px]:col-span-1",children:[n(ie,{required:!0,children:"Reason"}),l("div",{className:"mt-1 flex flex-wrap gap-2",children:[d.map(e=>{const a=g===e.id;return n("button",{type:"button",onClick:()=>z(e.id),className:[`cursor-pointer border px-4 py-3 font-mono ${t.labelSmall} uppercase tracking-[0.2em] transition-colors`,a?"border-accent bg-accent text-bg":"border-line text-fg-dim hover:text-fg"].join(" "),children:e.title},e.id)}),b&&n("button",{type:"button",onClick:()=>z(y),className:[`cursor-pointer border px-4 py-3 font-mono ${t.labelSmall} uppercase tracking-[0.2em] transition-colors`,g===y?"border-accent bg-accent text-bg":"border-line text-fg-dim hover:text-fg"].join(" "),children:L(s)})]})]}),G?.(g),g===y&&(p||S)&&l("div",{className:"sf-card col-span-2 flex flex-col gap-2 border border-line bg-bg/40 p-5 max-[700px]:col-span-1",children:[p&&n("span",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.24em] text-accent`,children:$(p)}),S&&de(S).map((e,a)=>n("p",{className:`font-display ${t.body} leading-[1.55] text-fg-dim`,children:$(e)},a))]}),n(ne,{value:c.honeypot,onChange:c.setHoneypot}),c.error&&n("p",{role:"alert",className:`col-span-2 font-mono ${t.labelSmall} uppercase tracking-[0.18em] text-alert max-[700px]:col-span-1`,children:c.error}),l("div",{className:"col-span-2 mt-5 flex flex-wrap items-center justify-between gap-6 border-t border-line pt-6 max-[700px]:col-span-1 max-[700px]:flex-col max-[700px]:items-stretch",children:[R&&n("span",{className:`max-w-[380px] font-mono ${t.labelSmall} uppercase leading-[1.6] tracking-[0.18em] text-fg-dim`,children:$(R)}),n("button",{type:w?"button":"submit",disabled:c.submitting,className:`cursor-pointer bg-btn px-8 py-5 font-mono ${t.labelXl} uppercase tracking-[0.32em] text-btn-ink transition-colors hover:bg-fg disabled:cursor-wait disabled:opacity-60 max-[700px]:w-full`,children:c.submitting?"Sending…":O?L(O):"Send Message →"})]})]}):n("p",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.22em] text-fg-dim`,children:J?q("Loading form…"):q("Choose a form in the inspector, under Message form — until then this column is hidden on the live page and no message can be sent.")})]}),N.length>0&&n("aside",{className:"flex flex-col gap-0 max-[1100px]:hidden",children:N.map((e,a)=>{const i=Z(e),F=!!!e.groupId;return l("div",{onClick:F?()=>I(e.value):void 0,className:["relative flex flex-col gap-3 border-b border-line border-l-2 px-5 py-8 transition-all",F?"cursor-pointer border-t-2 border-t-accent":"",i?"border-l-accent pl-6":F?"border-l-transparent hover:bg-accent/[0.04]":"border-l-transparent"].join(" "),style:i?{background:"color-mix(in oklab, var(--accent) 8%, transparent)"}:void 0,children:[i&&!!h&&l("span",{className:"absolute right-[18px] top-6 flex flex-col items-end gap-0.5 text-right",children:[n("span",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.24em] text-accent`,children:"→ Message routes here"}),n("span",{className:`font-mono ${t.labelXs} uppercase tracking-[0.18em] text-fg-dim`,children:"Other inboxes filter as spam"})]}),n("span",{className:[`font-mono ${t.labelSmall} uppercase tracking-[0.3em] transition-colors`,i?"text-fg":"text-accent"].join(" "),children:e.label}),F?n("a",{href:e.href,onClick:Y=>Y.stopPropagation(),className:[`font-heading3 ${t.headingSmall1} font-medium leading-[1.2] tracking-[-0.02em] transition-colors hover:text-accent`,i?"text-accent":"text-fg"].join(" "),children:e.value}):n("a",{href:P(e),className:[`font-heading3 ${t.headingSmall1} font-medium leading-[1.2] tracking-[-0.02em]`,i?"text-accent":"text-fg"].join(" "),children:e.value}),e.sub&&n("span",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:e.sub})]},`${e.value}-${a}`)})}),N.length>0&&n("div",{"data-contact-phone-list":!0,className:"hidden flex-col gap-0 max-[1100px]:flex",children:pe(N).map((e,a)=>{const i=!!e.groupId;return l("div",{className:["flex flex-col gap-3 border-b border-line px-5 py-5",i?"":"border-t-2 border-t-accent"].join(" "),children:[n("span",{className:[`font-mono ${t.labelSmall} uppercase tracking-[0.3em]`,i?"text-fg":"text-accent"].join(" "),children:e.label}),n("a",{href:P(e),className:[`font-heading3 ${t.headingSmall1} font-medium leading-[1.2] tracking-[-0.02em] [overflow-wrap:anywhere]`,i?"text-accent":"text-fg"].join(" "),children:e.value}),e.sub&&n("span",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:e.sub})]},`${e.value}-${a}`)})})]})})]})}export{P as channelHref,xe as default,B as fieldClass,pe as mergeChannelsForPhone,fe as topicFieldOf};
1
+ "use client";import{jsx as n,jsxs as s,Fragment as ee}from"react/jsx-runtime";import ne from"./SectionBand.js";import{useEffect as z,useState as _}from"react";import{OTHER_REASON_ID as v}from"efficient-web-builder/format/lib/content/contact";import{FormFieldInput as te,FormHoneypot as ae,successMessageFor as le,useBoundForm as re,useFormSubmission as oe}from"./formSubmission.js";import se from"efficient-web-builder/render/components/SectionEyebrow";import ie,{FieldCaption as ce}from"./WebFormField.js";import{scrollBehavior as de}from"efficient-web-builder/render/components/useReducedMotion";import{renderChrome as q,renderGold as w,renderHeadline as me,splitParagraphs as pe}from"efficient-web-builder/render/components/goldPhrases";import{say as j}from"efficient-web-builder/format/lib/editor-words";import{phoneHref as fe}from"efficient-web-builder/format/lib/links/phone-href";import{PART_ROW_ATTR as ue,encodePartRow as xe}from"efficient-web-builder/render/lib/puck/text-parts";const t={bodySmall:"text-[length:var(--size-body,14px)]",body:"text-[length:var(--size-body,15px)]",bodyLarge:"text-[length:var(--size-body,18px)]",headingSmall1:"text-[length:var(--size-headingSmall,24px)]",headingSmall2:"text-[length:var(--size-headingSmall,26px)]",labelXs:"text-[length:var(--size-label,10px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]",labelXl:"text-[length:var(--size-label,14px)]"},M={label:"Label",value:"Value",sub:"Sub line"};function be(i,l){return i.map((r,a)=>l?{...r,at:a,label:r.label||j(M.label),value:r.value||j(M.value),sub:r.sub||j(M.sub)}:{...r,at:a}).filter(r=>!r.hidden)}function A(i,l){return l?{[ue]:xe("channels",i.at)}:{}}function T(i){if(i.href)return i.href;const l=(i.value??"").trim();if(l.includes("@"))return`mailto:${l}`;if(/^\+?[\d\s().-]{6,}$/.test(l))return fe(l)}function ge(i){const l=[],r=new Map;for(const a of i){if(!a.groupId){l.push(a);continue}const p=a.value.trim().toLowerCase(),x=r.get(p);if(x)x.label=`${x.label} · ${a.label}`;else{const b={...a};r.set(p,b),l.push(b)}}return l}function he(i,l,r){const a=p=>String(p??"").trim().toLowerCase();for(const p of i?.fields??[]){if(p.type!=="select"||!Array.isArray(p.options))continue;const x=p.options.map(String);if(!l.some(d=>x.some(f=>a(f)===a(d.title))))continue;const b=d=>a(d===v?r:l.find(f=>f.id===d)?.title);return{key:p.key,optionFor:d=>x.find(f=>a(f)===b(d)&&b(d)!==""),idFor:d=>{const f=l.find($=>a($.title)===a(d));return f?f.id:r&&a(d)===a(r)?v:void 0}}}return null}const V=`border-b border-line bg-transparent py-4 font-display ${t.bodyLarge} tracking-[0.01em] text-fg outline-none transition-colors focus:border-accent`;function ve({routingNumber:i,routingTagline:l,groups:r,formNumber:a,formHeading:p,metaLines:x,showOther:b=!0,otherLabel:d="Other",otherNoteTitle:f,otherNoteBody:$,buttonText:O,consent:H,channels:B,formSlug:L,form:W,editing:y,initialActiveId:k,onActiveChange:P,reasonExtras:D}){const N=[...r.map(e=>e.id),...b?[v]:[]],G=k&&N.includes(k)?k:N[0]??v,[g,C]=_(G);z(()=>{N.includes(g)||C(N[0]??v)},[N.join("|")]),z(()=>{k&&N.includes(k)&&C(k)},[k]);const h=re(L,W),m=oe({form:h,formSlug:L,editing:y}),u=he(h,r,b?d:void 0),I=e=>{C(e),R(null);const o=u?.optionFor(e);u&&o!==void 0&&m.set(u.key,o),P?.(e)};z(()=>{if(!u||m.valueOf(u.key))return;const e=u.optionFor(g);e!==void 0&&m.set(u.key,e)},[u?.key]);const[X,R]=_(null),S=be(B??[],!!y),Z=e=>X!==null?!e.groupId&&e.value===X:e.groupId===g,J=h===void 0,E=!!h||!!y,[K,Q]=_(!1);z(()=>{const e=()=>Q(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 U=r.length>0||!!y;return s(ee,{children:[U&&s(ne,{className:"border-b border-line py-[60px]",style:K?void 0:{background:"var(--section-bg)"},children:[(i||l)&&s("div",{className:"mb-6 flex items-center gap-6 border-b border-line pb-6",children:[i&&n(se,{text:i}),l&&n("span",{className:`font-display ${t.bodySmall} uppercase tracking-[0.04em] text-fg-dim`,children:w(l)})]}),n("div",{className:"sf-card grid grid-cols-4 gap-[2px] border border-line bg-line max-[1100px]:grid-cols-2 max-[700px]:grid-cols-1",children:r.map(e=>{const o=g===e.id;return s("button",{type:"button",onClick:()=>{I(e.id),typeof window<"u"&&window.matchMedia("(max-width: 1100px)").matches&&document.getElementById("contact-form")?.scrollIntoView({behavior:de(),block:"start"})},className:["flex min-h-[240px] cursor-pointer flex-col gap-4 px-8 py-10 text-left transition-colors",o?"bg-surface outline outline-2 -outline-offset-2 outline-accent":"bg-bg hover:bg-surface"].join(" "),children:[e.eyebrow&&n("span",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.24em] text-accent`,children:e.eyebrow}),n("h3",{className:`whitespace-pre-line font-heading3 ${t.headingSmall2} font-medium uppercase leading-[1.05] tracking-[-0.02em]`,children:e.title}),e.copy&&n("p",{className:`mt-auto font-display ${t.bodySmall} leading-[1.5] text-fg-dim`,children:e.copy}),e.response&&s("div",{className:`mt-2 flex justify-between border-t border-line pt-4 font-mono ${t.labelSmall} uppercase tracking-[0.22em] text-fg-dim`,children:[n("span",{children:"Response"}),n("strong",{className:"font-normal text-fg",children:e.response})]})]},e.id)})})]}),(E||S.length>0)&&n("section",{id:"contact-form",className:"scroll-mt-[80px] border-b border-line py-20 max-[1100px]:py-[60px]",children:s("div",{className:["mx-auto grid max-w-[var(--sf-site-width,1600px)] gap-20 px-[var(--sf-site-gutter,40px)] max-[1100px]:grid-cols-1 max-[1100px]:gap-[60px] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))]",E&&S.length>0?"grid-cols-[1.3fr_1fr]":"grid-cols-1"].join(" "),children:[E&&s("div",{children:[s("div",{className:"mb-8 flex items-end justify-between gap-6 border-b border-line pb-6",children:[s("div",{children:[a&&n("div",{className:`pb-2 font-mono ${t.labelLarge} uppercase tracking-[0.3em] text-accent`,children:w(a)}),p&&n("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(36px,4vw,56px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em]",children:me(p,!0)})]}),!!(x&&x.length)&&n("div",{className:`text-right font-mono ${t.labelSmall} uppercase leading-[1.8] tracking-[0.22em] text-fg-dim max-[700px]:text-left`,children:x.map((e,o)=>n("div",{children:e},o))})]}),h?m.done?n("div",{className:`border border-accent bg-accent/[0.08] p-8 font-display ${t.body} leading-[1.6] text-fg-dim`,children:le(h,"Thanks — we've received your message.")}):s("form",{className:"grid grid-cols-2 gap-5 max-[700px]:grid-cols-1",onSubmit:m.handleSubmit,children:[h.fields.map(e=>n(ie,{label:e.label,required:e.required,className:e.type==="textarea"||e.type==="checkbox"?"col-span-2 max-[700px]:col-span-1":void 0,children:n(te,{field:e,value:m.valueOf(e.key),onChange:o=>{m.set(e.key,o);const c=u&&e.key===u.key?u.idFor(o):void 0;c!==void 0&&(C(c),R(null),P?.(c))},className:e.type==="textarea"?`${V} min-h-[140px] resize-y leading-[1.5]`:e.type==="checkbox"?"size-4 self-start accent-accent":V})},e.key)),s("div",{className:"col-span-2 flex flex-col gap-2 max-[700px]:col-span-1",children:[n(ce,{required:!0,children:"Reason"}),s("div",{className:"mt-1 flex flex-wrap gap-2",children:[r.map(e=>{const o=g===e.id;return n("button",{type:"button",onClick:()=>I(e.id),className:[`cursor-pointer border px-4 py-3 font-mono ${t.labelSmall} uppercase tracking-[0.2em] transition-colors`,o?"border-accent bg-accent text-bg":"border-line text-fg-dim hover:text-fg"].join(" "),children:e.title},e.id)}),b&&n("button",{type:"button",onClick:()=>I(v),className:[`cursor-pointer border px-4 py-3 font-mono ${t.labelSmall} uppercase tracking-[0.2em] transition-colors`,g===v?"border-accent bg-accent text-bg":"border-line text-fg-dim hover:text-fg"].join(" "),children:q(d)})]})]}),D?.(g),g===v&&(f||$)&&s("div",{className:"sf-card col-span-2 flex flex-col gap-2 border border-line bg-bg/40 p-5 max-[700px]:col-span-1",children:[f&&n("span",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.24em] text-accent`,children:w(f)}),$&&pe($).map((e,o)=>n("p",{className:`font-display ${t.body} leading-[1.55] text-fg-dim`,children:w(e)},o))]}),n(ae,{value:m.honeypot,onChange:m.setHoneypot}),m.error&&n("p",{role:"alert",className:`col-span-2 font-mono ${t.labelSmall} uppercase tracking-[0.18em] text-alert max-[700px]:col-span-1`,children:m.error}),s("div",{className:"col-span-2 mt-5 flex flex-wrap items-center justify-between gap-6 border-t border-line pt-6 max-[700px]:col-span-1 max-[700px]:flex-col max-[700px]:items-stretch",children:[H&&n("span",{className:`max-w-[380px] font-mono ${t.labelSmall} uppercase leading-[1.6] tracking-[0.18em] text-fg-dim`,children:w(H)}),n("button",{type:y?"button":"submit",disabled:m.submitting,className:`cursor-pointer bg-btn px-8 py-5 font-mono ${t.labelXl} uppercase tracking-[0.32em] text-btn-ink transition-colors hover:bg-fg disabled:cursor-wait disabled:opacity-60 max-[700px]:w-full`,children:m.submitting?"Sending…":O?q(O):"Send Message →"})]})]}):n("p",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.22em] text-fg-dim`,children:J?j("Loading form…"):j("Choose a form in the inspector, under Message form — until then this column is hidden on the live page and no message can be sent.")})]}),S.length>0&&n("aside",{className:"flex flex-col gap-0 max-[1100px]:hidden",children:S.map((e,o)=>{const c=Z(e),F=!!!e.groupId;return s("div",{...A(e,y),onClick:F?()=>R(e.value):void 0,className:["relative flex flex-col gap-3 border-b border-line border-l-2 px-5 py-8 transition-all",F?"cursor-pointer border-t-2 border-t-accent":"",c?"border-l-accent pl-6":F?"border-l-transparent hover:bg-accent/[0.04]":"border-l-transparent"].join(" "),style:c?{background:"color-mix(in oklab, var(--accent) 8%, transparent)"}:void 0,children:[c&&!!h&&s("span",{className:"absolute right-[18px] top-6 flex flex-col items-end gap-0.5 text-right",children:[n("span",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.24em] text-accent`,children:"→ Message routes here"}),n("span",{className:`font-mono ${t.labelXs} uppercase tracking-[0.18em] text-fg-dim`,children:"Other inboxes filter as spam"})]}),n("span",{className:[`font-mono ${t.labelSmall} uppercase tracking-[0.3em] transition-colors`,c?"text-fg":"text-accent"].join(" "),children:e.label}),F?n("a",{href:e.href,onClick:Y=>Y.stopPropagation(),className:[`font-heading3 ${t.headingSmall1} font-medium leading-[1.2] tracking-[-0.02em] transition-colors hover:text-accent`,c?"text-accent":"text-fg"].join(" "),children:e.value}):n("a",{href:T(e),className:[`font-heading3 ${t.headingSmall1} font-medium leading-[1.2] tracking-[-0.02em]`,c?"text-accent":"text-fg"].join(" "),children:e.value}),e.sub&&n("span",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:e.sub})]},`${e.value}-${o}`)})}),S.length>0&&n("div",{"data-contact-phone-list":!0,className:"hidden flex-col gap-0 max-[1100px]:flex",children:ge(S).map((e,o)=>{const c=!!e.groupId;return s("div",{...A(e,y),className:["flex flex-col gap-3 border-b border-line px-5 py-5",c?"":"border-t-2 border-t-accent"].join(" "),children:[n("span",{className:[`font-mono ${t.labelSmall} uppercase tracking-[0.3em]`,c?"text-fg":"text-accent"].join(" "),children:e.label}),n("a",{href:T(e),className:[`font-heading3 ${t.headingSmall1} font-medium leading-[1.2] tracking-[-0.02em] [overflow-wrap:anywhere]`,c?"text-accent":"text-fg"].join(" "),children:e.value}),e.sub&&n("span",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:e.sub})]},`${e.value}-${o}`)})})]})})]})}export{M as CHANNEL_HINTS,T as channelHref,ve as default,be as drawnChannels,V as fieldClass,ge as mergeChannelsForPhone,he as topicFieldOf};
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as b}from"react/jsx-runtime";import{containerGapProps as S}from"efficient-web-builder/format/lib/content/container-gap";import C from"efficient-web-builder/render/components/Btn";import{GALLERY_GRID_ATTR as E,GalleryLinksContext as M}from"./GalleryItem.js";import{SharedPartKinds as R}from"efficient-web-builder/render/components/PublishedPartStylesContext";import{renderHeadline as j}from"efficient-web-builder/render/components/goldPhrases";import w from"efficient-web-builder/render/components/SectionHeader";import{resolveGridColumns as z,resolveGridMobileColumns as A}from"efficient-web-builder/format/lib/content/grid-span";import{galleryLayoutClass as I,galleryLayoutCss as P,resolveGalleryLayout as $}from"efficient-web-builder/format/lib/content/gallery-layout";const B="relative z-[2] bg-bg py-[120px] max-[800px]:py-[70px]",O="relative z-[2] bg-bg pt-0 pb-[120px] max-[800px]:pt-0 max-[800px]:pb-[70px]",T="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]";function k({items:t,num:c,title:a,linkText:i,linkHref:m,galleryHref:o="/gallery",submitHref:x="/contact",previewHover:g,display:f,displayPhone:y,styleOwner:h,layout:n,columns:s,columnsMobile:u,gap:v,omitHead:d=!1}){const p=$(n),l=p?n:null,N=!p&&s!=null&&s!=="",r=S("GalleryB",v,"both"),G=l?{className:`sf-card-grid sf-gallery-zone ${I(l)} grid${r.className}`,style:r.style}:N?{className:`sf-card-grid sf-grid-zone grid${r.className}`,style:{...r.style,"--sf-grid-cols":String(z(s)),"--sf-grid-cols-phone":String(A(u,s))}}:{className:`sf-card-grid grid grid-cols-4${r.className} max-[1500px]:grid-cols-3 max-[800px]:grid-cols-1`,style:r.style},_=i?{text:i,href:m||"#"}:void 0,L=a?j(a,!1):void 0;return e("section",{className:d?O:B,children:b("div",{className:T,children:[d?null:e(w,{num:c,title:L,link:_}),l&&e("style",{dangerouslySetInnerHTML:{__html:P(l)}}),t&&e(M.Provider,{value:{galleryHref:o,submitHref:x,previewHover:g,display:f,displayPhone:y,styleOwner:h},children:e(R,{children:e("div",{[E]:"",style:{display:"contents"},children:e(t,{...G,minEmptyHeight:320})})})}),e("div",{className:"mt-12 flex flex-col items-center gap-3",children:e(C,{href:o,variant:"ghost",children:"See Gallery"})})]})})}export{k as default};
1
+ "use client";import{jsx as e,jsxs as E}from"react/jsx-runtime";import{usePathname as w}from"next/navigation";import{containerGapProps as M}from"efficient-web-builder/format/lib/content/container-gap";import P from"efficient-web-builder/render/components/Btn";import{GALLERY_GRID_ATTR as R,GalleryLinksContext as j}from"./GalleryItem.js";import{useSiteSells as z}from"./SiteRecordContext.js";import{SharedPartKinds as A}from"efficient-web-builder/render/components/PublishedPartStylesContext";import{renderHeadline as I}from"efficient-web-builder/render/components/goldPhrases";import $ from"efficient-web-builder/render/components/SectionHeader";import{resolveGridColumns as k,resolveGridMobileColumns as B}from"efficient-web-builder/format/lib/content/grid-span";import{galleryLayoutClass as O,galleryLayoutCss as T,resolveGalleryLayout as F}from"efficient-web-builder/format/lib/content/gallery-layout";const K="relative z-[2] bg-bg py-[120px] max-[800px]:py-[70px]",D="relative z-[2] bg-bg pt-0 pb-[120px] max-[800px]:pt-0 max-[800px]:pb-[70px]",U="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]";function W({items:i,num:d,title:a,linkText:o,linkHref:p,galleryHref:r="/gallery",submitHref:x="/contact",previewHover:g,display:f,displayPhone:y,styleOwner:h,layout:n,columns:t,columnsMobile:u,gap:v,omitHead:m=!1}){const N=w(),G=z(),L=r!==N&&(G||r!=="/gallery"),c=F(n),l=c?n:null,S=!c&&t!=null&&t!=="",s=M("GalleryB",v,"both"),_=l?{className:`sf-card-grid sf-gallery-zone ${O(l)} grid${s.className}`,style:s.style}:S?{className:`sf-card-grid sf-grid-zone grid${s.className}`,style:{...s.style,"--sf-grid-cols":String(k(t)),"--sf-grid-cols-phone":String(B(u,t))}}:{className:`sf-card-grid grid grid-cols-4${s.className} max-[1500px]:grid-cols-3 max-[800px]:grid-cols-1`,style:s.style},b=o?{text:o,href:p||"#"}:void 0,C=a?I(a,!1):void 0;return e("section",{className:m?D:K,children:E("div",{className:U,children:[m?null:e($,{num:d,title:C,link:b}),l&&e("style",{dangerouslySetInnerHTML:{__html:T(l)}}),i&&e(j.Provider,{value:{galleryHref:r,submitHref:x,previewHover:g,display:f,displayPhone:y,styleOwner:h},children:e(A,{children:e("div",{[R]:"",style:{display:"contents"},children:e(i,{..._,minEmptyHeight:320})})})}),L&&e("div",{className:"mt-12 flex flex-col items-center gap-3",children:e(P,{href:r,variant:"ghost",children:"See Gallery"})})]})})}export{W as default};
@@ -6,6 +6,7 @@ export declare const GalleryLinksContext: import("react").Context<{
6
6
  display?: unknown;
7
7
  displayPhone?: unknown;
8
8
  styleOwner?: string;
9
+ photosOnly?: boolean;
9
10
  }>;
10
11
  export declare const GALLERY_TILE_PARTS: readonly [{
11
12
  readonly id: "tag";
@@ -1 +1 @@
1
- "use client";import{jsx as t,jsxs as n,Fragment as d}from"react/jsx-runtime";import{createContext as R,useCallback as $,useContext as A,useEffect as I,useRef as G,useState as N}from"react";import k from"next/link";import H from"./GalleryCard.js";import O,{LightboxClose as M}from"./Lightbox.js";import{renderGold as p,renderHeadline as Y}from"efficient-web-builder/render/components/goldPhrases";import{sizedImage as D}from"efficient-web-builder/format/lib/sized-image";const F="(max-width: 1100px) 100vw, min(59vw, 1050px)",B=R({}),oe=[{id:"tag",label:"Tag"},{id:"eyebrow",label:"Eyebrow"},{id:"title",label:"Title"},{id:"meta",label:"Meta"},{id:"number",label:"Card number"}],V="data-gallery-grid",L="data-gallery-tile";function W(r,l){const[s,m]=N(null);return I(()=>{const i=r.current,o=i?.closest(`[${V}]`);if(!i||!o)return;const h=()=>{const u=Array.from(o.querySelectorAll(`[${L}]`)),g=u.indexOf(i),x=g>=0?{index:g+1,total:u.length}:null;m(e=>e?.index===x?.index&&e?.total===x?.total?e:x)};if(h(),!l)return;const b=new MutationObserver(h);return b.observe(o,{childList:!0,subtree:!0}),()=>b.disconnect()},[r,l]),s}const le={process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},q=()=>({image:"",href:"#",process:"",eyebrow:"",name:"",meta:""}),ae=Array.from({length:6},q);function U(r,l){return(r??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||l}function Z(r){const l=(r.photos??[]).map(o=>o?.src).filter(o=>!!o),s=r.image||l[0]||"",m=[s,...l].filter(o=>!!o),i=U(r.name,"gallery-item");return{car:r.eyebrow??"",wheel:r.name??"",process:r.process??"",finish:r.meta??"",imageLabel:`${i}.jpg`,detailLabel:`${i}-detail.jpg`,imageSrc:s||void 0,detailSrc:l[0]||s||void 0,photos:m,href:r.href}}function J({editing:r=!1,previewHover:l,ratio:s,captionPlace:m,...i}){const{galleryHref:o="/gallery",submitHref:h="/contact",previewHover:b,display:u,displayPhone:g,styleOwner:x}=A(B),e=Z(i),a=e.photos??(e.imageSrc?[e.imageSrc]:[]),C=G(null),S=$(c=>{C.current=c},[]),_=W(C,r),E=r&&(!!l||!!b),[T,f]=N(!1),[v,y]=N(0),j=()=>y(c=>(c-1+a.length)%a.length),z=()=>y(c=>(c+1)%a.length),w=a[v]??e.imageSrc??"",P=t(H,{build:e,forceHover:E,index:_?.index,total:_?.total,ratio:s,captionPlace:m,display:u,displayPhone:g,styleOwner:x,editing:r});return n(d,{children:[r?t("div",{ref:S,[L]:"",className:"block w-full text-left",children:P}):t("button",{ref:S,[L]:"",type:"button","aria-label":`Open ${e.car||"build"} on ${e.wheel||"wheel"}`,onClick:()=>{y(0),f(!0)},className:"block w-full cursor-pointer text-left focus:outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2",children:P}),t(O,{open:T,onClose:()=>f(!1),label:`${e.car} on ${e.wheel}`,onPrev:a.length>1?j:void 0,onNext:a.length>1?z:void 0,className:"flex items-center justify-center p-6 backdrop-blur-[8px] max-[700px]:p-3",style:{background:"color-mix(in oklab, var(--bg) 78%, transparent)"},children:n("div",{onClick:c=>c.stopPropagation(),className:"relative grid w-[min(1800px,100%)] max-h-[calc(100vh-48px)] grid-cols-[1.4fr_1fr] overflow-hidden border border-line bg-bg max-[1100px]:grid-cols-1 max-[1100px]:overflow-auto",style:{boxShadow:"0 60px 120px -20px color-mix(in srgb, var(--sf-shadow-color, #141416) 70%, transparent)"},children:[t(M,{label:"Close popup",className:"absolute right-[24px] top-[24px] z-[5] flex h-[56px] w-[56px] items-center justify-center border border-line font-mono text-[length:var(--size-label,21px)] text-fg-dim transition-colors hover:border-accent hover:text-fg",style:{background:"color-mix(in oklab, var(--bg) 70%, transparent)"},children:"✕"}),n("div",{className:"relative flex min-h-[690px] items-center justify-center overflow-hidden bg-surface-2 max-[1100px]:min-h-[450px]",children:[w&&t("img",{...D(w,{fallbackWidth:1280}),sizes:F,alt:`${e.car} — ${v+1} of ${a.length}`,className:"block h-full max-h-[88vh] w-full object-cover"},w),a.length>1&&n(d,{children:[t("button",{type:"button","aria-label":"Previous photo",onClick:j,className:"absolute left-4 top-1/2 flex h-16 w-16 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 font-mono text-[length:var(--size-label,24px)] text-fg-dim transition-colors hover:border-accent hover:text-accent",children:"◁"}),t("button",{type:"button","aria-label":"Next photo",onClick:z,className:"absolute right-4 top-1/2 flex h-16 w-16 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 font-mono text-[length:var(--size-label,24px)] text-fg-dim transition-colors hover:border-accent hover:text-accent",children:"▷"}),n("span",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 border border-fg-dim/30 bg-overlay-scrim/50 px-4 py-1.5 font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.22em] text-fg-dim backdrop-blur-[4px]",children:[v+1," / ",a.length]})]})]}),n("div",{className:"flex flex-col gap-[30px] px-[60px] py-[72px] max-[1100px]:px-9 max-[1100px]:py-[54px]",children:[e.process&&t("span",{className:"font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.3em] text-accent",children:p(e.process)}),e.wheel&&t("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(42px,4.5vw,60px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.95] tracking-[-0.025em]",children:Y(e.wheel,!1)}),e.car&&n("div",{className:"font-heading3 text-[length:var(--size-headingSmall,27px)] leading-[1.4] text-fg",children:["on ",t("em",{className:"font-serif font-normal italic text-accent tracking-[-0.01em]",children:p(e.car,!0)})]}),n("dl",{className:"mt-3 grid grid-cols-[auto_1fr] gap-x-7 gap-y-[18px] border-y border-line py-[30px] font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.22em]",children:[e.wheel&&n(d,{children:[t("dt",{className:"text-fg-dim",children:"Wheel"}),t("dd",{className:"text-fg",children:p(e.wheel)})]}),e.process&&n(d,{children:[t("dt",{className:"text-fg-dim",children:"Process"}),t("dd",{className:"text-fg",children:p(e.process)})]}),e.finish&&n(d,{children:[t("dt",{className:"text-fg-dim",children:"Finish"}),t("dd",{className:"text-fg",children:p(e.finish)})]}),e.car&&n(d,{children:[t("dt",{className:"text-fg-dim",children:"Vehicle"}),t("dd",{className:"text-fg",children:p(e.car)})]})]}),n("div",{className:"mt-auto flex flex-col gap-3.5 pt-6",children:[n(k,{href:e.href||"/wheels",onClick:()=>f(!1),className:"group flex items-center justify-between gap-6 border border-btn bg-btn px-9 py-6 font-mono text-[length:var(--size-label,16px)] uppercase tracking-[0.3em] text-btn-ink transition-colors hover:border-fg hover:bg-fg",children:[t("span",{children:"View product"}),t("span",{className:"transition-transform group-hover:translate-x-[6px]",children:"→"})]}),n(k,{href:o,onClick:()=>f(!1),className:"flex items-center justify-between gap-6 border border-line px-9 py-6 font-mono text-[length:var(--size-label,16px)] uppercase tracking-[0.3em] text-fg transition-colors hover:border-accent hover:text-accent",children:[t("span",{children:"See more builds"}),t("span",{children:"→"})]}),n(k,{href:h,onClick:()=>f(!1),className:"flex items-center justify-between gap-6 border border-line px-9 py-6 font-mono text-[length:var(--size-label,16px)] uppercase tracking-[0.3em] text-fg transition-colors hover:border-accent hover:text-accent",children:[t("span",{children:"Submit your build"}),t("span",{children:"→"})]})]})]})]})})]})}export{V as GALLERY_GRID_ATTR,le as GALLERY_ITEM_HINTS,ae as GALLERY_ITEM_SEEDS,L as GALLERY_TILE_ATTR,oe as GALLERY_TILE_PARTS,B as GalleryLinksContext,J as default};
1
+ "use client";import{jsx as r,jsxs as o,Fragment as x}from"react/jsx-runtime";import{createContext as G,useCallback as M,useContext as Y,useEffect as W,useRef as B,useState as L}from"react";import S from"next/link";import D from"./GalleryCard.js";import F,{LightboxClose as V}from"./Lightbox.js";import{useSiteSells as q}from"./SiteRecordContext.js";import{renderGold as d,renderHeadline as O}from"efficient-web-builder/render/components/goldPhrases";import{sizedImage as U}from"efficient-web-builder/format/lib/sized-image";const Z="(max-width: 1100px) 100vw, min(59vw, 1050px)",J=G({}),he=[{id:"tag",label:"Tag"},{id:"eyebrow",label:"Eyebrow"},{id:"title",label:"Title"},{id:"meta",label:"Meta"},{id:"number",label:"Card number"}],K="data-gallery-grid",C="data-gallery-tile";function Q(e,n){const[l,s]=L(null);return W(()=>{const c=e.current,a=c?.closest(`[${K}]`);if(!c||!a)return;const u=()=>{const v=Array.from(a.querySelectorAll(`[${C}]`)),y=v.indexOf(c),m=y>=0?{index:y+1,total:v.length}:null;s(h=>h?.index===m?.index&&h?.total===m?.total?h:m)};if(u(),!n)return;const b=new MutationObserver(u);return b.observe(a,{childList:!0,subtree:!0}),()=>b.disconnect()},[e,n]),l}const fe={process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},X=()=>({image:"",href:"#",process:"",eyebrow:"",name:"",meta:""}),ge=Array.from({length:6},X);function ee(e,n){return(e??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||n}function te(e){const n=(e.photos??[]).map(a=>a?.src).filter(a=>!!a),l=e.image||n[0]||"",s=[l,...n].filter(a=>!!a),c=ee(e.name,"gallery-item");return{car:e.eyebrow??"",wheel:e.name??"",process:e.process??"",finish:e.meta??"",imageLabel:`${c}.jpg`,detailLabel:`${c}-detail.jpg`,imageSrc:l||void 0,detailSrc:n[0]||l||void 0,photos:s,href:e.href}}function re({editing:e=!1,previewHover:n,ratio:l,captionPlace:s,...c}){const{galleryHref:a="/gallery",submitHref:u="/contact",previewHover:b,display:v,displayPhone:y,styleOwner:m,photosOnly:h=!1}=Y(J),t=te(c),f=q()&&!h,z=!f&&!ne(t),i=t.photos??(t.imageSrc?[t.imageSrc]:[]),P=B(null),_=M(p=>{P.current=p},[]),j=Q(P,e),H=e&&(!!n||!!b),[I,g]=L(!1),[w,N]=L(0),E=()=>N(p=>(p-1+i.length)%i.length),T=()=>N(p=>(p+1)%i.length),k=i[w]??t.imageSrc??"",$=r(D,{build:t,forceHover:H,index:j?.index,total:j?.total,ratio:l,captionPlace:s,display:v,displayPhone:y,styleOwner:m,editing:e});return o(x,{children:[e?r("div",{ref:_,[C]:"",className:"block w-full text-left",children:$}):r("button",{ref:_,[C]:"",type:"button","aria-label":f?`Open ${t.car||"build"} on ${t.wheel||"wheel"}`:R(t),onClick:()=>{N(0),g(!0)},className:"block w-full cursor-pointer text-left focus:outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2",children:$}),r(F,{open:I,onClose:()=>g(!1),label:f?`${t.car} on ${t.wheel}`:R(t),onPrev:i.length>1?E:void 0,onNext:i.length>1?T:void 0,className:"flex items-center justify-center p-6 backdrop-blur-[8px] max-[700px]:p-3",style:{background:"color-mix(in oklab, var(--bg) 78%, transparent)"},children:o("div",{onClick:p=>p.stopPropagation(),className:`relative grid w-[min(1800px,100%)] max-h-[calc(100vh-48px)] ${z?"grid-cols-1":"grid-cols-[1.4fr_1fr]"} overflow-hidden border border-line bg-bg max-[1100px]:grid-cols-1 max-[1100px]:overflow-auto`,style:{boxShadow:"0 60px 120px -20px color-mix(in srgb, var(--sf-shadow-color, #141416) 70%, transparent)"},children:[r(V,{label:"Close popup",className:"absolute right-[24px] top-[24px] z-[5] flex h-[56px] w-[56px] items-center justify-center border border-line font-mono text-[length:var(--size-label,21px)] text-fg-dim transition-colors hover:border-accent hover:text-fg",style:{background:"color-mix(in oklab, var(--bg) 70%, transparent)"},children:"✕"}),o("div",{className:"relative flex min-h-[690px] items-center justify-center overflow-hidden bg-surface-2 max-[1100px]:min-h-[450px]",children:[k&&r("img",{...U(k,{fallbackWidth:1280}),sizes:Z,alt:`${(f?t.car:t.wheel||t.car)||"Photo"} — ${w+1} of ${i.length}`,className:"block h-full max-h-[88vh] w-full object-cover"},k),i.length>1&&o(x,{children:[r("button",{type:"button","aria-label":"Previous photo",onClick:E,className:"absolute left-4 top-1/2 flex h-16 w-16 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 font-mono text-[length:var(--size-label,24px)] text-fg-dim transition-colors hover:border-accent hover:text-accent",children:"◁"}),r("button",{type:"button","aria-label":"Next photo",onClick:T,className:"absolute right-4 top-1/2 flex h-16 w-16 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 font-mono text-[length:var(--size-label,24px)] text-fg-dim transition-colors hover:border-accent hover:text-accent",children:"▷"}),o("span",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 border border-fg-dim/30 bg-overlay-scrim/50 px-4 py-1.5 font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.22em] text-fg-dim backdrop-blur-[4px]",children:[w+1," / ",i.length]})]})]}),f?o("div",{className:"flex flex-col gap-[30px] px-[60px] py-[72px] max-[1100px]:px-9 max-[1100px]:py-[54px]",children:[t.process&&r("span",{className:"font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.3em] text-accent",children:d(t.process)}),t.wheel&&r("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(42px,4.5vw,60px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.95] tracking-[-0.025em]",children:O(t.wheel,!1)}),t.car&&o("div",{className:"font-heading3 text-[length:var(--size-headingSmall,27px)] leading-[1.4] text-fg",children:["on ",r("em",{className:"font-serif font-normal italic text-accent tracking-[-0.01em]",children:d(t.car,!0)})]}),o("dl",{className:"mt-3 grid grid-cols-[auto_1fr] gap-x-7 gap-y-[18px] border-y border-line py-[30px] font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.22em]",children:[t.wheel&&o(x,{children:[r("dt",{className:"text-fg-dim",children:"Wheel"}),r("dd",{className:"text-fg",children:d(t.wheel)})]}),t.process&&o(x,{children:[r("dt",{className:"text-fg-dim",children:"Process"}),r("dd",{className:"text-fg",children:d(t.process)})]}),t.finish&&o(x,{children:[r("dt",{className:"text-fg-dim",children:"Finish"}),r("dd",{className:"text-fg",children:d(t.finish)})]}),t.car&&o(x,{children:[r("dt",{className:"text-fg-dim",children:"Vehicle"}),r("dd",{className:"text-fg",children:d(t.car)})]})]}),o("div",{className:"mt-auto flex flex-col gap-3.5 pt-6",children:[o(S,{href:t.href||"/wheels",onClick:()=>g(!1),className:"group flex items-center justify-between gap-6 border border-btn bg-btn px-9 py-6 font-mono text-[length:var(--size-label,16px)] uppercase tracking-[0.3em] text-btn-ink transition-colors hover:border-fg hover:bg-fg",children:[r("span",{children:"View product"}),r("span",{className:"transition-transform group-hover:translate-x-[6px]",children:"→"})]}),o(S,{href:a,onClick:()=>g(!1),className:"flex items-center justify-between gap-6 border border-line px-9 py-6 font-mono text-[length:var(--size-label,16px)] uppercase tracking-[0.3em] text-fg transition-colors hover:border-accent hover:text-accent",children:[r("span",{children:"See more builds"}),r("span",{children:"→"})]}),o(S,{href:u,onClick:()=>g(!1),className:"flex items-center justify-between gap-6 border border-line px-9 py-6 font-mono text-[length:var(--size-label,16px)] uppercase tracking-[0.3em] text-fg transition-colors hover:border-accent hover:text-accent",children:[r("span",{children:"Submit your build"}),r("span",{children:"→"})]})]})]}):!z&&r(oe,{build:t})]})})]})}function A(e){return[e.process,e.car,e.finish].filter((n,l,s)=>!!n&&n!==e.wheel&&s.indexOf(n)===l)}function ne(e){return!!e.wheel||A(e).length>0}function R(e){const n=e.wheel||e.car;return n?`Open photo of ${n}`:"Open photo"}function oe({build:e}){const n=e.wheel,l=A(e);return o("div",{className:"flex flex-col gap-[24px] px-[60px] py-[72px] max-[1100px]:px-9 max-[1100px]:py-[54px]",children:[n&&r("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(42px,4.5vw,60px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.95] tracking-[-0.025em]",children:O(n,!1)}),l.map(s=>r("p",{className:"text-[length:var(--size-body,18px)] leading-[1.5] text-fg",children:d(s)},s))]})}export{K as GALLERY_GRID_ATTR,fe as GALLERY_ITEM_HINTS,ge as GALLERY_ITEM_SEEDS,C as GALLERY_TILE_ATTR,he as GALLERY_TILE_PARTS,J as GalleryLinksContext,re as default};
@@ -1 +1 @@
1
- "use client";import{jsx as t,jsxs as r,Fragment as b}from"react/jsx-runtime";import{photoLabel as h}from"./product-hero/hero-view.js";import{stageControls as H,useHeldStagePhoto as k}from"./product-hero/stage-photo.js";import{DEFAULT_HERO_GALLERY_MODE as z,DEFAULT_HERO_IMAGE_FIT as L,parseHeroGalleryMode as M,parseHeroImageFit as S,resolveHeroImageFit as $}from"../lib/sections/hero-gallery.js";import{productHasComposedRender as F}from"../lib/wheels/set-mode.js";function A({product:a,view:e,angleIdx:s,onSelect:m,isLight:c,onLightbox:p,galleryMode:i=z,imageFit:x=L,style:o}){const l=M(i),d=$(S(x),F(a));return r("div",{"data-hero-gallery":l,"data-hero-fit":d,className:l==="tiled"?"flex items-start gap-3 max-[720px]:gap-2":void 0,style:o,children:[r("div",{className:l==="tiled"?"min-w-0 flex-1":void 0,children:[t(R,{name:a.name,view:e,angleIdx:s,onSelect:m,isLight:c,onLightbox:p,fit:d}),e.referenceNote&&t("p",{"data-hero-reference-note":!0,className:"mt-2 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.18em] text-fg-dim",children:e.referenceNote}),e.galleryHint&&t("p",{"data-hero-gallery-hint":!0,className:"mt-2 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.18em] text-fg-dim",children:e.galleryHint})]}),l!=="main"&&t(T,{name:a.name,view:e,angleIdx:s,onSelect:m,isLight:c,tiled:l==="tiled"})]})}function y(a){return a.photos.length>0?a.photos.length:a.thumbFallbackCells}const E=6;function R({name:a,view:e,angleIdx:s,onSelect:m,isLight:c,onLightbox:p,fit:i}){const x=e.photos[Math.min(s,e.photos.length-1)],o=k(e.photos,x),l=y(e),d=l>=2,N=String(l).padStart(2,"0"),f=Math.min(s,Math.max(e.photos.length-1,0)),_=d||e.captions[f]?h(e,f):"",u=[a,e.metaValue,_].filter(Boolean).join(" — "),g="max-[720px]:static",j=["relative flex aspect-square items-center justify-center overflow-hidden max-[720px]:col-span-2",c?"bg-bg":""].join(" ");return r("div",{className:"relative max-[720px]:grid max-[720px]:grid-cols-[minmax(0,1fr)_auto] max-[720px]:items-start max-[720px]:gap-x-3 max-[720px]:gap-y-2",style:{color:e.tint},children:[r("div",{className:`absolute left-0 top-0 z-10 flex items-center gap-3 font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.2em] text-fg ${g} max-[720px]:min-w-0 max-[720px]:flex-wrap max-[720px]:gap-x-2 max-[720px]:gap-y-1`,children:[d&&r(b,{children:[r("span",{className:"text-accent",children:[String(s+1).padStart(2,"0")," / ",N]}),t("span",{className:"text-fg-dim",children:"·"})]}),t("span",{children:a}),e.metaValue&&r(b,{children:[t("span",{className:"text-fg-dim",children:"·"}),t("span",{className:"text-accent",children:e.metaValue})]})]}),d&&t("div",{className:`absolute right-5 top-5 z-10 flex gap-1 ${g}`,children:H(s,l,m).map(n=>t("button",{type:"button","aria-label":n.label,title:n.label,onClick:n.onClick,className:"flex h-7 w-7 items-center justify-center border border-fg-dim/60 text-fg transition-colors hover:border-accent hover:text-accent",children:n.glyph},n.label))}),r("div",{className:j,children:[["top-3 left-3","top-3 right-3","bottom-3 left-3","bottom-3 right-3"].map((n,C)=>t("span",{className:`absolute ${n} h-3 w-3 border border-fg-dim/40`,style:{borderTop:n.includes("top")?"1px solid var(--site-line)":"none",borderBottom:n.includes("bottom")?"1px solid var(--site-line)":"none",borderLeft:n.includes("left")?"1px solid var(--site-line)":"none",borderRight:n.includes("right")?"1px solid var(--site-line)":"none"}},C)),e.stageImage({photo:o,alt:u,label:`Open ${[a,e.metaValue].filter(Boolean).join(" ")} at full resolution`,onZoom:()=>p(o,u),fit:i})]}),r("div",{className:`absolute bottom-5 left-5 right-5 z-10 flex items-center justify-between gap-3 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em] text-fg-dim ${g} max-[720px]:col-span-2 max-[720px]:flex-wrap`,children:[t("span",{children:e.specCaption}),t("span",{children:e.originCaption})]})]})}function T({name:a,view:e,angleIdx:s,onSelect:m,isLight:c,tiled:p=!1}){const i=y(e);return i<2?null:t("div",{className:p?"order-[-1] flex w-16 flex-col gap-2 max-[720px]:w-12 max-[720px]:gap-1":"mt-2 grid grid-cols-4 gap-2 max-[720px]:gap-1",style:!p&&i>4?{gridTemplateColumns:`repeat(${Math.min(i,E)}, minmax(0, 1fr))`}:void 0,children:Array.from({length:i}).map((x,o)=>{const l=e.photos[o];return r("button",{type:"button",onClick:()=>m(o),"aria-label":`View ${h(e,o)}`,className:["relative flex aspect-square items-center justify-center overflow-hidden transition-colors",c?"bg-bg":"",o===s?"border border-accent":"border border-transparent hover:border-fg-dim"].join(" "),style:{color:e.tint},children:[t("span",{className:"absolute top-1.5 left-2 z-10 font-mono text-[length:var(--size-label,8px)] uppercase tracking-[0.18em] text-fg-dim",children:String(o+1).padStart(2,"0")}),e.thumbImage({photo:l,alt:`${a} — ${h(e,o)}`})]},o)})})}export{A as default};
1
+ "use client";import{jsx as t,jsxs as r,Fragment as b}from"react/jsx-runtime";import{photoLabel as g}from"./product-hero/hero-view.js";import{stageControls as H,useHeldStagePhoto as L}from"./product-hero/stage-photo.js";import{DEFAULT_HERO_GALLERY_MODE as M,DEFAULT_HERO_IMAGE_FIT as S,parseHeroGalleryMode as $,parseHeroImageFit as F,resolveHeroImageFit as k}from"../lib/sections/hero-gallery.js";import{productHasComposedRender as z}from"../lib/wheels/set-mode.js";function A({product:a,view:e,angleIdx:s,onSelect:c,isLight:m,onLightbox:p,galleryMode:i=M,imageFit:x=S,style:n}){const o=$(i),d=k(F(x),z(a));return r("div",{"data-hero-gallery":o,"data-hero-fit":d,className:o==="tiled"?"flex items-start gap-3 max-[720px]:gap-2":void 0,style:n,children:[t("div",{className:o==="tiled"?"min-w-0 flex-1":void 0,children:t(R,{name:a.name,view:e,angleIdx:s,onSelect:c,isLight:m,onLightbox:p,fit:d})}),o!=="main"&&t(T,{name:a.name,view:e,angleIdx:s,onSelect:c,isLight:m,tiled:o==="tiled"})]})}function y(a){return a.photos.length>0?a.photos.length:a.thumbFallbackCells}const E=6;function R({name:a,view:e,angleIdx:s,onSelect:c,isLight:m,onLightbox:p,fit:i}){const x=e.photos[Math.min(s,e.photos.length-1)],n=L(e.photos,x),o=y(e),d=o>=2,N=String(o).padStart(2,"0"),f=Math.min(s,Math.max(e.photos.length-1,0)),_=d||e.captions[f]?g(e,f):"",u=[a,e.metaValue,_].filter(Boolean).join(" — "),h="max-[720px]:static",j=["relative flex aspect-square items-center justify-center overflow-hidden max-[720px]:col-span-2",m?"bg-bg":""].join(" ");return r("div",{className:"relative max-[720px]:grid max-[720px]:grid-cols-[minmax(0,1fr)_auto] max-[720px]:items-start max-[720px]:gap-x-3 max-[720px]:gap-y-2",style:{color:e.tint},children:[r("div",{className:`absolute left-0 top-0 z-10 flex items-center gap-3 font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.2em] text-fg ${h} max-[720px]:min-w-0 max-[720px]:flex-wrap max-[720px]:gap-x-2 max-[720px]:gap-y-1`,children:[d&&r(b,{children:[r("span",{className:"text-accent",children:[String(s+1).padStart(2,"0")," / ",N]}),t("span",{className:"text-fg-dim",children:"·"})]}),t("span",{children:a}),e.metaValue&&r(b,{children:[t("span",{className:"text-fg-dim",children:"·"}),t("span",{className:"text-accent",children:e.metaValue})]})]}),d&&t("div",{className:`absolute right-5 top-5 z-10 flex gap-1 ${h}`,children:H(s,o,c).map(l=>t("button",{type:"button","aria-label":l.label,title:l.label,onClick:l.onClick,className:"flex h-7 w-7 items-center justify-center border border-fg-dim/60 text-fg transition-colors hover:border-accent hover:text-accent",children:l.glyph},l.label))}),r("div",{className:j,children:[["top-3 left-3","top-3 right-3","bottom-3 left-3","bottom-3 right-3"].map((l,C)=>t("span",{className:`absolute ${l} h-3 w-3 border border-fg-dim/40`,style:{borderTop:l.includes("top")?"1px solid var(--site-line)":"none",borderBottom:l.includes("bottom")?"1px solid var(--site-line)":"none",borderLeft:l.includes("left")?"1px solid var(--site-line)":"none",borderRight:l.includes("right")?"1px solid var(--site-line)":"none"}},C)),e.stageImage({photo:n,alt:u,label:`Open ${[a,e.metaValue].filter(Boolean).join(" ")} at full resolution`,onZoom:()=>p(n,u),fit:i})]}),r("div",{className:`absolute bottom-0 left-0 right-0 z-10 flex items-end justify-between gap-3 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em] text-fg-dim ${h} max-[720px]:col-span-2 max-[720px]:flex-wrap`,children:[r("span",{className:"flex min-w-0 flex-col gap-1",children:[e.specCaption&&t("span",{children:e.specCaption}),e.referenceNote&&t("span",{"data-hero-reference-note":!0,children:e.referenceNote}),e.galleryHint&&t("span",{"data-hero-gallery-hint":!0,children:e.galleryHint})]}),t("span",{children:e.originCaption})]})]})}function T({name:a,view:e,angleIdx:s,onSelect:c,isLight:m,tiled:p=!1}){const i=y(e);return i<2?null:t("div",{className:p?"order-[-1] flex w-16 flex-col gap-2 max-[720px]:w-12 max-[720px]:gap-1":"mt-2 grid grid-cols-4 gap-2 max-[720px]:gap-1",style:!p&&i>4?{gridTemplateColumns:`repeat(${Math.min(i,E)}, minmax(0, 1fr))`}:void 0,children:Array.from({length:i}).map((x,n)=>{const o=e.photos[n];return r("button",{type:"button",onClick:()=>c(n),"aria-label":`View ${g(e,n)}`,className:["relative flex aspect-square items-center justify-center overflow-hidden transition-colors",m?"bg-bg":"",n===s?"border border-accent":"border border-transparent hover:border-fg-dim"].join(" "),style:{color:e.tint},children:[t("span",{className:"absolute top-1.5 left-2 z-10 font-mono text-[length:var(--size-label,8px)] uppercase tracking-[0.18em] text-fg-dim",children:String(n+1).padStart(2,"0")}),e.thumbImage({photo:o,alt:`${a} — ${g(e,n)}`})]},n)})})}export{A as default};
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as d,Fragment as Ne}from"react/jsx-runtime";import{GRID_CARD_SHOW as R}from"../lib/sections/card-show-defaults.js";import{useEffect as V,useId as Te,useMemo as p}from"react";import{CARD_IMAGE_BG_OFF as ze,resolveCardImageBackground as Ie}from"efficient-web-builder/format/lib/content/card-image-background";import{cardImageShapeTokens as Le}from"efficient-web-builder/format/lib/content/card-image-shape";import{containerGapProps as Pe,GAP_LENGTH_VAR as Ae,GAP_ZONE_CLASS as Fe}from"efficient-web-builder/format/lib/content/container-gap";import Re from"next/link";import Oe from"./ProductCard.js";import{CARD_ROWS_GRID_CLASS as De,cardRowsGridStyle as Ge}from"./WheelCardFrame.js";import{ProductCardChromeProvider as ke}from"./ProductCardChrome.js";import{gridClassImageSizes as Be}from"../lib/sections/card-image-sizes.js";import{fillRowCss as Ue}from"../lib/sections/fill-row.js";import{answersForKind as Y}from"../lib/content/field-usage.js";import{wheelCardEyebrowShows as He}from"./ProductCardEyebrow.js";import je from"./NoCurrencyNote.js";import{DEFAULT_CARD_OUTLINE as Ke,cardIndexCss as We,parseCardIndexFormat as Xe}from"efficient-web-builder/format/lib/sections/product-card-style";import{DEFAULT_COVER_INDEX as Ze}from"../lib/wheels/cover-rendering.js";import{SITE_WIDTH_CAP as Ve,centredCap as Ye}from"efficient-web-builder/format/lib/content/page-width";import{ProductCatalogProvider as qe,SectionWheelsProvider as Je}from"./ProductRef.js";import{useCurrency as Qe}from"./CurrencyContext.js";import{COLLECTION_ATTR as er,useCatalogFilter as rr}from"./catalog/CatalogFilterContext.js";import{renderGold as O,renderHeadline as tr}from"efficient-web-builder/render/components/goldPhrases";import{applyCatalogFilters as ar}from"../lib/wheels/catalog-filters.js";import{normalizeCatalogRows as sr}from"../lib/wheels/wheel-summary-casing.js";import nr from"./TyreSummaryCard.js";import{itemKind as q,plpItemsOfKinds as or,plpKindNoun as ir,resolvePlpKinds as J}from"../lib/catalog/plp-item.js";import{rowsForGridSource as lr}from"../lib/wheels/grid-source.js";import{useUnifiedProductCatalog as mr}from"./useProductCatalog.js";import{STICKY_UNDERHEADER_CLASS as dr}from"efficient-web-builder/render/lib/puck/header-clearance";import{finishFamiliesOf as pr}from"../lib/wheels/finish-defaults.js";import{lugCountsOf as cr}from"../lib/wheels/lug-count.js";import{diametersOf as gr}from"../lib/wheels/size-range.js";import{say as xr}from"efficient-web-builder/format/lib/editor-words";import{DEFAULT_TITLE_SIZE as ur}from"../lib/sections/product-grid-title.js";const t={headingMediumUpTo800Xs:"max-[800px]:text-[length:var(--size-headingMedium,28px)]",headingMediumUpTo800Small:"max-[800px]:text-[length:var(--size-headingMedium,32px)]",headingMediumUpTo800Large:"max-[800px]:text-[length:var(--size-headingMedium,36px)]",headingMediumUpTo800Xl:"max-[800px]:text-[length:var(--size-headingMedium,40px)]",body:"text-[length:var(--size-body,13px)]",headingMedium1:"text-[length:var(--size-headingMedium,40px)]",headingMedium2:"text-[length:var(--size-headingMedium,48px)]",headingMedium3:"text-[length:var(--size-headingMedium,56px)]",headingMedium4:"text-[length:var(--size-headingMedium,64px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"},Q={1:"grid-cols-1",2:"grid-cols-2 max-[800px]:grid-cols-1",3:"grid-cols-3 max-[800px]:grid-cols-1",4:"grid-cols-4 max-[1100px]:grid-cols-2 max-[800px]:grid-cols-1",5:"grid-cols-5 max-[1100px]:grid-cols-2 max-[800px]:grid-cols-1",6:"grid-cols-6 max-[1100px]:grid-cols-3 max-[800px]:grid-cols-1"},ee=[{value:"para",label:"Paragraph size — 13px",cls:`font-mono font-normal uppercase tracking-[0.22em] ${t.labelLarge}`},{value:"sm",label:"Small — 40px",cls:`font-heading2 font-medium tracking-[-0.03em] ${t.headingMedium1} ${t.headingMediumUpTo800Xs}`},{value:"md",label:"Medium — 48px",cls:`font-heading2 font-medium tracking-[-0.03em] ${t.headingMedium2} ${t.headingMediumUpTo800Small}`},{value:"lg",label:"Large — 56px",cls:`font-heading2 font-medium tracking-[-0.03em] ${t.headingMedium3} ${t.headingMediumUpTo800Large}`},{value:"xl",label:"Extra large — 64px",cls:`font-heading2 font-medium tracking-[-0.03em] ${t.headingMedium4} ${t.headingMediumUpTo800Xl}`}];function hr(c){return(ee.find(o=>o.value===c)??ee.find(o=>o.value===ur)).cls}function fr({num:c,catalog:o,kinds:S,title:$,titleSize:re,padTop:D,description:y,link:g,products:te,wheels:ae,source:i,columns:se,limit:x,editing:u,contentCapped:ne=!1,imageBackground:oe,spinOnHover:ie,coverIndex:le,indexBadge:me,outline:de,showBadge:pe,fieldUsage:l,showCardPrice:ce,showCardFinishes:ge,showCardSizes:xe,showCardBuy:ue,showCardPage:he,cardImage:fe,gap:ye}){const M=p(()=>l?Y(l,"alloy-wheel"):void 0,[l]),Ce=p(()=>l?Y(l,"tyre"):void 0,[l]),r=`pg-${Te().replace(/:/g,"")}`,_=Q[Math.min(6,Math.max(1,se??4))]??Q[4],G=typeof x=="number"&&x>0,k=ne,B=mr(u===!0&&!!i),n=p(()=>i?sr(lr(i,or(B??o??[],J(S)))):null,[o,B,i,S]),E=i?.process,m=!!E,{filters:C,reportCount:N,reportLugs:T,reportSizes:z,reportFinishes:I,vehicle:U}=rr(),{currency:L}=Qe(),P=m&&!!C.process&&C.process!==E,a=p(()=>n?m?ar(n,C,L,U.fit):n:null,[n,m,C,L,U.fit]);V(()=>{if(m)return N(r,P?0:a?.length??0),()=>N(r,0)},[m,P,a,N,r]);const ve=p(()=>{const s=(a??[]).filter(f=>q(f)!=="tyre");if(s.length===0)return!1;const w=s.some(f=>!!f.process);return s.some(f=>!!f.setWords)||He({kind:!1,brand:!1,process:w},M??[])},[a,M]),v=p(()=>({lugs:cr(n??[]),sizes:gr(n??[]),finishes:pr(n??[])}),[n]);V(()=>(T(r,v.lugs),z(r,v.sizes),I(r,v.finishes),()=>{T(r,[]),z(r,[]),I(r,[])}),[v,T,z,I,r]);const h=Pe("ProductGrid",ye,"both"),H=h.className.includes(Fe),A=`${r} grid${h.className} bg-[var(--catalog-grid-bg)] ${_}`,be=H?`${A} ${De}`:A,we=H?{...h.style,...Ge(`var(${Ae})`)}:h.style,Se=a?a.length>0?e("div",{className:be,style:we,children:a.map((s,w)=>q(s)==="tyre"?e(nr,{item:s,currency:L,editing:u,fieldUsage:Ce},`tyre:${s.slug}-${w}`):e(Oe,{wheel:s,variant:"catalog"},`${s.slug}-${w}`))}):u?e("div",{className:"flex min-h-[320px] items-center justify-center rounded bg-surface-2 p-4 text-center",children:e("span",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:xr("No products in “{name}” yet",{name:i?.name??""})})}):null:e(te,{className:A,style:h.style,minEmptyHeight:320}),b=a?a.length:null,j=ir(J(S)),$e=c||$||y||g?d("div",{className:`${dr} 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 ${k?"":"-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:[d("div",{className:"flex min-w-0 items-end gap-6 max-[800px]:flex-col max-[800px]:items-stretch max-[800px]:gap-3",children:[c&&e("span",{className:`font-mono ${t.labelLarge} leading-none uppercase tracking-[0.22em] text-fg-dim`,children:O(c)}),$&&e("h2",{className:`${hr(re)} leading-none text-fg max-[800px]:leading-[1] [&>span]:block`,children:tr($,!1)})]}),(y||g||b!==null)&&d("div",{className:"flex items-center gap-5 max-[800px]:gap-3 min-[800px]:grow min-[800px]:justify-end",children:[y&&e("span",{className:`max-w-[340px] truncate font-display ${t.body} leading-[1.4] text-fg-dim max-[800px]:hidden min-[800px]:w-0 min-[800px]:grow min-[800px]:text-right`,children:O(y)}),g&&d(Re,{href:g.href,className:`inline-flex items-center gap-2 whitespace-nowrap font-mono ${t.labelLarge} uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg`,children:[O(g.text),e("span",{"aria-hidden":!0,children:"→"})]}),b!==null&&d("span",{className:`whitespace-nowrap font-mono ${t.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:[b," ",b===1?j.one:j.many]})]})]}):null,Me=typeof D=="number"?D:120,K=Xe(me),_e=a?G?Math.min(a.length,x):a.length:void 0,W=Ue(r,_,{limit:x,cards:a?.length}),X=We(r,K),Z=d(Ne,{children:[G&&e("style",{children:`.${r} > *:nth-child(n+${x+1}){display:none}`}),W&&e("style",{children:W}),X&&e("style",{children:X}),$e,Se,e(je,{editing:u})]});if(P)return null;const F=e("section",{...m?{[er]:E}:{},className:"relative z-[2] bg-bg px-[var(--sf-site-gutter,40px)] pt-[var(--pg-pt)] pb-[120px] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))] max-[800px]:pt-[70px] max-[800px]:pb-[70px]",style:{"--pg-pt":`${Me}px`,...Le(fe)},children:k?e("div",{style:Ye(Ve),children:Z}):Z}),Ee=n?F:u?e(qe,{children:F}):e(Je,{wheels:ae,children:F});return e(ke,{imageSizes:Be(_,_e),imageBackgroundFill:Ie(oe,ze),spinOnHover:ie??!0,coverIndex:le??Ze,indexBadge:K,outline:de??Ke,showBadge:pe??!0,fieldUsage:M,reserveEyebrow:ve,showCardPrice:ce??!0,showCardFinishes:ge??!0,showCardSizes:xe??R.showCardSizes,showCardBuy:ue??R.showCardBuy,showCardPage:he??R.showCardPage,children:Ee})}export{ee as TITLE_SIZES,fr as default};
1
+ "use client";import{jsx as e,jsxs as x,Fragment as He}from"react/jsx-runtime";import{GRID_CARD_SHOW as k}from"../lib/sections/card-show-defaults.js";import{useEffect as B,useId as Oe,useMemo as d,useState as ke}from"react";import{CARD_IMAGE_BG_OFF as Be,resolveCardImageBackground as De}from"efficient-web-builder/format/lib/content/card-image-background";import{cardImageShapeTokens as Ge}from"efficient-web-builder/format/lib/content/card-image-shape";import{containerGapProps as Ue,GAP_LENGTH_VAR as je,GAP_ZONE_CLASS as We}from"efficient-web-builder/format/lib/content/container-gap";import Ke from"next/link";import Xe from"./ProductCard.js";import{CARD_ROWS_GRID_CLASS as Ze,cardRowsGridStyle as Ve}from"./WheelCardFrame.js";import{ProductCardChromeProvider as qe}from"./ProductCardChrome.js";import{gridClassImageSizes as Ye}from"../lib/sections/card-image-sizes.js";import{fillRowCss as Je}from"../lib/sections/fill-row.js";import{noHoleBands as ee,noHoleCss as re,showsASetCard as te}from"../lib/sections/grid-no-hole.js";import{setIsWide as Qe,summarySetBuild as er}from"../lib/wheels/set-mode.js";import{answersForKind as se}from"../lib/content/field-usage.js";import{wheelCardEyebrowShows as rr}from"./ProductCardEyebrow.js";import tr from"./NoCurrencyNote.js";import{DEFAULT_CARD_OUTLINE as sr,cardIndexCss as nr,parseCardIndexFormat as or}from"efficient-web-builder/format/lib/sections/product-card-style";import{DEFAULT_COVER_INDEX as ar}from"../lib/wheels/cover-rendering.js";import{SITE_WIDTH_CAP as ir,centredCap as lr}from"efficient-web-builder/format/lib/content/page-width";import{ProductCatalogProvider as mr,SectionWheelsProvider as dr}from"./ProductRef.js";import{useCurrency as pr}from"./CurrencyContext.js";import{COLLECTION_ATTR as cr,useCatalogFilter as gr}from"./catalog/CatalogFilterContext.js";import{renderGold as D,renderHeadline as ur}from"efficient-web-builder/render/components/goldPhrases";import{applyCatalogFilters as xr}from"../lib/wheels/catalog-filters.js";import{normalizeCatalogRows as hr}from"../lib/wheels/wheel-summary-casing.js";import fr from"./TyreSummaryCard.js";import{itemKind as G,plpItemsOfKinds as yr,plpKindNoun as Cr,resolvePlpKinds as ne}from"../lib/catalog/plp-item.js";import{rowsForGridSource as vr}from"../lib/wheels/grid-source.js";import{useUnifiedProductCatalog as br}from"./useProductCatalog.js";import{STICKY_UNDERHEADER_CLASS as wr}from"efficient-web-builder/render/lib/puck/header-clearance";import{finishFamiliesOf as Sr}from"../lib/wheels/finish-defaults.js";import{lugCountsOf as $r}from"../lib/wheels/lug-count.js";import{diametersOf as Mr}from"../lib/wheels/size-range.js";import{say as Nr}from"efficient-web-builder/format/lib/editor-words";import{DEFAULT_TITLE_SIZE as _r}from"../lib/sections/product-grid-title.js";const n={headingMediumUpTo800Xs:"max-[800px]:text-[length:var(--size-headingMedium,28px)]",headingMediumUpTo800Small:"max-[800px]:text-[length:var(--size-headingMedium,32px)]",headingMediumUpTo800Large:"max-[800px]:text-[length:var(--size-headingMedium,36px)]",headingMediumUpTo800Xl:"max-[800px]:text-[length:var(--size-headingMedium,40px)]",body:"text-[length:var(--size-body,13px)]",headingMedium1:"text-[length:var(--size-headingMedium,40px)]",headingMedium2:"text-[length:var(--size-headingMedium,48px)]",headingMedium3:"text-[length:var(--size-headingMedium,56px)]",headingMedium4:"text-[length:var(--size-headingMedium,64px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"},oe={1:"grid-cols-1",2:"grid-cols-2 max-[800px]:grid-cols-1",3:"grid-cols-3 max-[800px]:grid-cols-1",4:"grid-cols-4 max-[1100px]:grid-cols-2 max-[800px]:grid-cols-1",5:"grid-cols-5 max-[1100px]:grid-cols-2 max-[800px]:grid-cols-1",6:"grid-cols-6 max-[1100px]:grid-cols-3 max-[800px]:grid-cols-1"},ae=[{value:"para",label:"Paragraph size — 13px",cls:`font-mono font-normal uppercase tracking-[0.22em] ${n.labelLarge}`},{value:"sm",label:"Small — 40px",cls:`font-heading2 font-medium tracking-[-0.03em] ${n.headingMedium1} ${n.headingMediumUpTo800Xs}`},{value:"md",label:"Medium — 48px",cls:`font-heading2 font-medium tracking-[-0.03em] ${n.headingMedium2} ${n.headingMediumUpTo800Small}`},{value:"lg",label:"Large — 56px",cls:`font-heading2 font-medium tracking-[-0.03em] ${n.headingMedium3} ${n.headingMediumUpTo800Large}`},{value:"xl",label:"Extra large — 64px",cls:`font-heading2 font-medium tracking-[-0.03em] ${n.headingMedium4} ${n.headingMediumUpTo800Xl}`}];function Er(h){return(ae.find(p=>p.value===h)??ae.find(p=>p.value===_r)).cls}function Tr({num:h,catalog:p,kinds:N,title:_,titleSize:ie,padTop:U,description:v,link:f,products:le,wheels:me,source:c,columns:de,limit:o,editing:y,contentCapped:pe=!1,imageBackground:ce,spinOnHover:ge,coverIndex:ue,indexBadge:xe,outline:he,showBadge:fe,fieldUsage:g,showCardPrice:ye,showCardFinishes:Ce,showCardSizes:ve,showCardBuy:be,showCardPage:we,cardImage:Se,gap:$e}){const E=d(()=>g?se(g,"alloy-wheel"):void 0,[g]),Me=d(()=>g?se(g,"tyre"):void 0,[g]),t=`pg-${Oe().replace(/:/g,"")}`,m=oe[Math.min(6,Math.max(1,de??4))]??oe[4],j=typeof o=="number"&&o>0,W=pe,K=br(y===!0&&!!c),i=d(()=>c?hr(vr(c,yr(K??p??[],ne(N)))):null,[p,K,c,N]),T=c?.process,u=!!T,{filters:b,reportCount:L,reportLugs:z,reportSizes:I,reportFinishes:P,vehicle:X}=gr(),{currency:A}=pr(),F=u&&!!b.process&&b.process!==T,r=d(()=>i?u?xr(i,b,A,X.fit):i:null,[i,u,b,A,X.fit]);B(()=>{if(u)return L(t,F?0:r?.length??0),()=>L(t,0)},[u,F,r,L,t]);const Ne=d(()=>{const s=(r??[]).filter(l=>G(l)!=="tyre");if(s.length===0)return!1;const a=s.some(l=>!!l.process);return s.some(l=>!!l.setWords)||rr({kind:!1,brand:!1,process:a},E??[])},[r,E]),w=d(()=>({lugs:$r(i??[]),sizes:Mr(i??[]),finishes:Sr(i??[])}),[i]);B(()=>(z(t,w.lugs),I(t,w.sizes),P(t,w.finishes),()=>{z(t,[]),I(t,[]),P(t,[])}),[w,z,I,P,t]);const C=Ue("ProductGrid",$e,"both"),Z=C.className.includes(We),R=`${t} grid${C.className} bg-[var(--catalog-grid-bg)] ${m}`,_e=Z?`${R} ${Ze}`:R,Ee=Z?{...C.style,...Ve(`var(${je})`)}:C.style,Te=r?r.length>0?e("div",{className:_e,style:Ee,children:r.map((s,a)=>G(s)==="tyre"?e(fr,{item:s,currency:A,editing:y,fieldUsage:Me},`tyre:${s.slug}-${a}`):e(Xe,{wheel:s,variant:"catalog"},`${s.slug}-${a}`))}):y?e("div",{className:"flex min-h-[320px] items-center justify-center rounded bg-surface-2 p-4 text-center",children:e("span",{className:`font-mono ${n.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:Nr("No products in “{name}” yet",{name:c?.name??""})})}):null:e(le,{className:R,style:C.style,minEmptyHeight:320}),S=r?r.length:null,V=Cr(ne(N)),Le=h||_||v||f?x("div",{className:`${wr} 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 ${W?"":"-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:[x("div",{className:"flex min-w-0 items-end gap-6 max-[800px]:flex-col max-[800px]:items-stretch max-[800px]:gap-3",children:[h&&e("span",{className:`font-mono ${n.labelLarge} leading-none uppercase tracking-[0.22em] text-fg-dim`,children:D(h)}),_&&e("h2",{className:`${Er(ie)} leading-none text-fg max-[800px]:leading-[1] [&>span]:block`,children:ur(_,!1)})]}),(v||f||S!==null)&&x("div",{className:"flex items-center gap-5 max-[800px]:gap-3 min-[800px]:grow min-[800px]:justify-end",children:[v&&e("span",{className:`max-w-[340px] truncate font-display ${n.body} leading-[1.4] text-fg-dim max-[800px]:hidden min-[800px]:w-0 min-[800px]:grow min-[800px]:text-right`,children:D(v)}),f&&x(Ke,{href:f.href,className:`inline-flex items-center gap-2 whitespace-nowrap font-mono ${n.labelLarge} uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg`,children:[D(f.text),e("span",{"aria-hidden":!0,children:"→"})]}),S!==null&&x("span",{className:`whitespace-nowrap font-mono ${n.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:[S," ",S===1?V.one:V.many]})]})]}):null,ze=typeof U=="number"?U:120,q=or(xe),$=d(()=>{if(!r)return null;const s=r.map(a=>G(a)!=="tyre"&&Qe(er(a))?2:1);return te(s,o)?ee(m,s,o):null},[r,m,o]),[Ie,Pe]=ke("");B(()=>{if(r)return;const s=document.querySelector(`.${t}`);if(!s)return;const a=()=>{const l=[...s.children].map(Re=>Re.classList.contains("col-span-2")?2:1);Pe(te(l,o)?re(t,ee(m,l,o,!1),l.length):"")};a();const O=new MutationObserver(a);return O.observe(s,{childList:!0}),()=>O.disconnect()},[r,t,m,o]);const Ae=$?$[0].tracks:r?j?Math.min(r.length,o):r.length:void 0,M=$?re(t,$,r.length):Ie,Y=M?"":Je(t,m,{limit:o,cards:r?.length}),J=nr(t,q),Q=x(He,{children:[j&&!M&&e("style",{children:`.${t} > *:nth-child(n+${o+1}){display:none}`}),M&&e("style",{children:M}),Y&&e("style",{children:Y}),J&&e("style",{children:J}),Le,Te,e(tr,{editing:y})]});if(F)return null;const H=e("section",{...u?{[cr]:T}:{},className:"relative z-[2] bg-bg px-[var(--sf-site-gutter,40px)] pt-[var(--pg-pt)] pb-[120px] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))] max-[800px]:pt-[70px] max-[800px]:pb-[70px]",style:{"--pg-pt":`${ze}px`,...Ge(Se)},children:W?e("div",{style:lr(ir),children:Q}):Q}),Fe=i?H:y?e(mr,{children:H}):e(dr,{wheels:me,children:H});return e(qe,{imageSizes:Ye(m,Ae),imageBackgroundFill:De(ce,Be),spinOnHover:ge??!0,coverIndex:ue??ar,indexBadge:q,outline:he??sr,showBadge:fe??!0,fieldUsage:E,reserveEyebrow:Ne,showCardPrice:ye??!0,showCardFinishes:Ce??!0,showCardSizes:ve??k.showCardSizes,showCardBuy:be??k.showCardBuy,showCardPage:we??k.showCardPage,children:Fe})}export{ae as TITLE_SIZES,Tr as default};
@@ -1 +1 @@
1
- "use client";import{jsx as d,jsxs as n}from"react/jsx-runtime";import{PickerField as a}from"./PickerField.js";import{vehicleLevelStates as s}from"./vehicle-level-state.js";import{VEHICLE_FIELD_LABEL as t}from"../../lib/wheels/vehicle-field-focus.js";function m({cascade:e,compact:o=!1,editing:r=!1}){const{vehicle:i}=e,l=s(e);return n("div",{className:["grid gap-[2px] border border-line bg-line",o?"grid-cols-4 max-[900px]:grid-cols-2":"grid-cols-4 max-[1100px]:grid-cols-2 max-[700px]:grid-cols-1"].join(" "),children:[d(a,{label:t.make,placeholder:l.make.placeholder,disabled:l.make.disabled,value:i.make,options:e.makeOptions,onChange:e.setMake,compact:o,editing:r}),d(a,{label:t.model,placeholder:l.model.placeholder,disabled:l.model.disabled,value:i.model,options:e.modelOptions,onChange:e.setModel,compact:o,editing:r}),d(a,{label:t.year,placeholder:l.year.placeholder,disabled:l.year.disabled,value:i.year!==null?String(i.year):"",options:e.yearOptions,onChange:e.setYear,compact:o,editing:r}),d(a,{label:t.trim,placeholder:l.trim.placeholder,disabled:l.trim.disabled,value:i.modification,options:e.modOptions,onChange:e.setModification,compact:o,editing:r})]})}export{m as default};
1
+ "use client";import{jsx as r,jsxs as t}from"react/jsx-runtime";import{PickerField as a}from"./PickerField.js";import{vehicleLevelStates as m}from"./vehicle-level-state.js";import{VEHICLE_FIELD_LABEL as n}from"../../lib/wheels/vehicle-field-focus.js";function p({cascade:e,compact:i=!1,editing:d=!1}){const{vehicle:o}=e,l=m(e),s=t("div",{className:["grid gap-[2px] border border-line bg-line",i?"grid-cols-1 @min-[20rem]:grid-cols-2 @min-[39rem]:grid-cols-4":"grid-cols-4 max-[1100px]:grid-cols-2 max-[700px]:grid-cols-1"].join(" "),children:[r(a,{label:n.make,placeholder:l.make.placeholder,disabled:l.make.disabled,value:o.make,options:e.makeOptions,onChange:e.setMake,compact:i,editing:d}),r(a,{label:n.model,placeholder:l.model.placeholder,disabled:l.model.disabled,value:o.model,options:e.modelOptions,onChange:e.setModel,compact:i,editing:d}),r(a,{label:n.year,placeholder:l.year.placeholder,disabled:l.year.disabled,value:o.year!==null?String(o.year):"",options:e.yearOptions,onChange:e.setYear,compact:i,editing:d}),r(a,{label:n.trim,placeholder:l.trim.placeholder,disabled:l.trim.disabled,value:o.modification,options:e.modOptions,onChange:e.setModification,compact:i,editing:d})]});return i?r("div",{className:"@container",children:s}):s}export{p as default};
@@ -1 +1 @@
1
- "use client";import{jsx as a,jsxs as m}from"react/jsx-runtime";import g from"efficient-web-builder/render/components/PartStyledKind";import{ThemedSelectList as y,useThemedSelect as k}from"../ThemedSelect.js";import{PART_KIND_ATTR as f}from"efficient-web-builder/render/lib/puck/text-parts";import{TEXT_KIND_BODY as b,TEXT_KIND_NAME as u}from"efficient-web-builder/format/lib/sections/section-text-kinds";const n={body:"text-[length:var(--size-body,15px)]",headingSmall:"text-[length:var(--size-headingSmall,24px)]",labelXs:"text-[length:var(--size-label,10px)]",labelSmall:"text-[length:var(--size-label,11px)]",labelLarge:"text-[length:var(--size-label,12px)]",labelXl:"text-[length:var(--size-label,14px)]"};function I(o,l){return[{value:"",label:l??"—"},...o.map(i=>({value:i.value,label:i.label}))]}function z({label:o,value:l,options:i,onChange:h,placeholder:p,disabled:t,compact:s=!1,editing:d=!1}){const v=(i.find(r=>r.value===l)?.label??l)||p||"—",x=I(i,p),e=k({items:x,value:l,onPick:h}),c=e.open;return m("div",{ref:e.wrapRef,className:"relative",children:[m("div",{ref:r=>{e.triggerRef.current=r},role:"button",tabIndex:t?-1:0,"aria-haspopup":"listbox","aria-expanded":c,"aria-controls":c?e.listId:void 0,"aria-activedescendant":e.activeId,"aria-label":o,"aria-disabled":t||void 0,onClick:()=>!t&&e.toggle(),onKeyDown:r=>!t&&e.onTriggerKeyDown(r),className:["relative flex flex-col bg-bg transition-colors",s?"gap-1 px-4 py-3":"min-h-[160px] gap-4 px-6 py-8",t?"opacity-50":"cursor-pointer hover:bg-surface"].join(" "),children:[a("span",{...d?{[f]:u}:{},className:["font-mono uppercase text-accent",s?`${n.labelXs} tracking-[0.2em]`:`${n.labelLarge} tracking-[0.3em]`].join(" "),children:a(g,{kind:u,children:o})}),a("span",{className:["font-display font-medium tracking-[-0.02em]",s?`break-words ${n.body} leading-[1.2]`:`mt-auto ${n.headingSmall} leading-[1.1]`,l?"text-fg":"text-fg-dim"].join(" "),...d?{[f]:b}:{},children:a(g,{kind:b,children:v})}),a("span",{className:["pointer-events-none absolute font-mono text-accent",s?`right-3 top-3 ${n.labelSmall}`:`right-[22px] top-[22px] ${n.labelXl}`].join(" "),children:"▾"})]}),c&&!t&&a(y,{id:e.listId,tone:"cell",items:x,value:l,focusIdx:e.focusIdx,onFocus:e.setFocusIdx,onPick:e.pick,listRef:e.listRef})]})}export{z as PickerField,I as pickerItems};
1
+ "use client";import{jsx as a,jsxs as f}from"react/jsx-runtime";import g from"efficient-web-builder/render/components/PartStyledKind";import{ThemedSelectList as y,useThemedSelect as I}from"../ThemedSelect.js";import{PART_KIND_ATTR as u}from"efficient-web-builder/render/lib/puck/text-parts";import{TEXT_KIND_BODY as b,TEXT_KIND_NAME as h}from"efficient-web-builder/format/lib/sections/section-text-kinds";const n={body:"text-[length:var(--size-body,15px)]",headingSmall:"text-[length:var(--size-headingSmall,24px)]",labelXs:"text-[length:var(--size-label,10px)]",labelSmall:"text-[length:var(--size-label,11px)]",labelLarge:"text-[length:var(--size-label,12px)]",labelXl:"text-[length:var(--size-label,14px)]"};function T(o,l){return[{value:"",label:l??"—"},...o.map(i=>({value:i.value,label:i.label}))]}function z({label:o,value:l,options:i,onChange:v,placeholder:p,disabled:t,compact:s=!1,editing:d=!1}){const m=(i.find(r=>r.value===l)?.label??l)||p||"—",x=T(i,p),e=I({items:x,value:l,onPick:v}),c=e.open;return f("div",{ref:e.wrapRef,className:"relative min-w-0",children:[f("div",{ref:r=>{e.triggerRef.current=r},role:"button",tabIndex:t?-1:0,"aria-haspopup":"listbox","aria-expanded":c,"aria-controls":c?e.listId:void 0,"aria-activedescendant":e.activeId,"aria-label":o,"aria-disabled":t||void 0,onClick:()=>!t&&e.toggle(),onKeyDown:r=>!t&&e.onTriggerKeyDown(r),className:["relative flex h-full flex-col bg-bg transition-colors",s?"gap-1 px-3 py-3":"min-h-[160px] gap-4 px-6 py-8",t?"opacity-50":"cursor-pointer hover:bg-surface"].join(" "),children:[a("span",{...d?{[u]:h}:{},className:["font-mono uppercase text-accent",s?`${n.labelXs} tracking-[0.2em]`:`${n.labelLarge} tracking-[0.3em]`].join(" "),children:a(g,{kind:h,children:o})}),a("span",{title:m,className:["truncate font-display font-medium tracking-[-0.02em]",s?`${n.body} leading-[1.2]`:`mt-auto ${n.headingSmall} leading-[1.1]`,l?"text-fg":"text-fg-dim"].join(" "),...d?{[u]:b}:{},children:a(g,{kind:b,children:m})}),a("span",{className:["pointer-events-none absolute font-mono text-accent",s?`right-3 top-3 ${n.labelSmall}`:`right-[22px] top-[22px] ${n.labelXl}`].join(" "),children:"▾"})]}),c&&!t&&a(y,{id:e.listId,tone:"cell",items:x,value:l,focusIdx:e.focusIdx,onFocus:e.setFocusIdx,onPick:e.pick,listRef:e.listRef})]})}export{z as PickerField,T as pickerItems};
@@ -1 +1 @@
1
- "use client";import{jsx as t,jsxs as _}from"react/jsx-runtime";import A from"efficient-web-builder/render/components/Btn";import k,{GALLERY_GRID_ATTR as L,GalleryLinksContext as M}from"../GalleryItem.js";import{SharedPartKinds as T}from"efficient-web-builder/render/components/PublishedPartStylesContext";import{renderHeadline as C}from"efficient-web-builder/render/components/goldPhrases";import H from"efficient-web-builder/render/components/SectionHeader";import I from"./KindGate.js";import{PLP_KINDS as B}from"../../lib/catalog/plp-item.js";import{useCurrentProduct as j}from"../../lib/puck/current-product.js";import{SAMPLE_PICTURE_COUNT as D,SAMPLE_RECORD as F,recordPictures as K,useCurrentRecord as U,useDrawsOtherRecord as Z}from"../../lib/puck/current-record.js";import{useSampleProduct as $}from"./useSampleProduct.js";import{say as G}from"efficient-web-builder/format/lib/editor-words";const z=B,P=["photos","lifestyle","accessories","others"];function W(e,a){if(!e)return[];if(a==="all")return P.flatMap(n=>e[n]??[]);const i=P.includes(a)?a:null;return i?e[i]??[]:[]}const R="relative z-[2] bg-bg py-[120px] max-[800px]:py-[70px]",E="relative z-[2] bg-bg pt-0 pb-[120px] max-[800px]:pt-0 max-[800px]:pb-[70px]",O="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]";function X(e){return Z(!!e.editing)?t(Y,{...e}):t(I,{kinds:z,type:"GalleryB",editing:e.editing,children:t(q,{...e})})}function Y(e){const{editing:a=!1}=e,i=U(),n=i?K(i,{firstField:!0}).map(o=>({images:[o.url],eyebrow:o.alt||void 0})):a?Array.from({length:D},()=>({images:[""]})):[];return t(S,{...e,tiles:n,owner:{name:(i??F).title},emptyHint:G("This record’s pictures appear here on its page. A record with no pictures draws nothing.")})}function q({omitHead:e=!1,num:a,title:i,linkText:n,linkHref:o,galleryHref:p="/gallery",submitHref:x="/contact",zone:y="all",photoDisplay:f="covers",previewHover:b,display:v,displayPhone:u,styleOwner:h,editing:l=!1}){const g=j(),N=$(l&&!g),s=g?.product??N,m=W(s?.mediaGroups,y).map(r=>({images:(r.items??[]).filter(d=>d.kind==="image").map(d=>d.url),name:r.name,finish:r.finish})).filter(r=>r.images.length>0),w=(f==="auto"?m.length>=4?"covers":"all":f)==="all"?m.flatMap(r=>r.images.map(d=>({images:[d],name:r.name,finish:r.finish}))):m;return t(S,{omitHead:e,num:a,title:i,linkText:n,linkHref:o,galleryHref:p,submitHref:x,previewHover:b,display:v,displayPhone:u,styleOwner:h,editing:l,tiles:s?w.map(r=>({images:r.images,eyebrow:r.name,meta:r.finish})):[],owner:{name:s?.name??"",href:s?.href,process:s?.eyebrow},emptyHint:G("This product’s photos appear here on a product page. Add media groups in the product’s Media tab.")})}function S({omitHead:e=!1,num:a,title:i,linkText:n,linkHref:o,galleryHref:p="/gallery",submitHref:x="/contact",previewHover:y,display:f,displayPhone:b,styleOwner:v,editing:u=!1,tiles:h,owner:l,emptyHint:g}){const N=n?{text:n,href:o||"#"}:void 0,s=i?C(i,!1):void 0,m=e?null:t(H,{num:a,title:s,link:N});return h.length===0?u?t("section",{className:e?E:R,children:_("div",{className:O,children:[m,t("p",{className:"mt-8 border-t border-line py-6 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-fg-dim",children:g})]})}):null:t("section",{className:e?E:R,children:_("div",{className:O,children:[m,t(M.Provider,{value:{galleryHref:p,submitHref:x,previewHover:y,display:f,displayPhone:b,styleOwner:v},children:t(T,{children:t("div",{[L]:"",className:"grid grid-cols-4 gap-2 max-[1500px]:grid-cols-3 max-[800px]:grid-cols-1 max-[800px]:gap-1",children:h.map((c,w)=>t(k,{image:c.images[0],photos:c.images.slice(1).map(r=>({src:r})),href:l.href,process:l.process,eyebrow:c.eyebrow,name:l.name,meta:c.meta,editing:u},`${c.eyebrow}-${w}`))})})}),t("div",{className:"mt-12 flex flex-col items-center gap-3",children:t(A,{href:p,variant:"ghost",children:"See Gallery"})})]})})}export{X as default,z as supportedKinds};
1
+ "use client";import{jsx as t,jsxs as G}from"react/jsx-runtime";import A from"efficient-web-builder/render/components/Btn";import k,{GALLERY_GRID_ATTR as L,GalleryLinksContext as M}from"../GalleryItem.js";import{SharedPartKinds as T}from"efficient-web-builder/render/components/PublishedPartStylesContext";import{renderHeadline as C}from"efficient-web-builder/render/components/goldPhrases";import H from"efficient-web-builder/render/components/SectionHeader";import I from"./KindGate.js";import{PLP_KINDS as B}from"../../lib/catalog/plp-item.js";import{useCurrentProduct as j}from"../../lib/puck/current-product.js";import{SAMPLE_PICTURE_COUNT as D,SAMPLE_RECORD as F,recordPictures as K,useCurrentRecord as U,useDrawsOtherRecord as Z}from"../../lib/puck/current-record.js";import{mediaGroupVehicle as $}from"../../lib/content/source-values.js";import{useSampleProduct as z}from"./useSampleProduct.js";import{say as _}from"efficient-web-builder/format/lib/editor-words";const V=B,P=["photos","lifestyle","accessories","others"];function W(e,a){if(!e)return[];if(a==="all")return P.flatMap(s=>e[s]??[]);const i=P.includes(a)?a:null;return i?e[i]??[]:[]}const R="relative z-[2] bg-bg py-[120px] max-[800px]:py-[70px]",E="relative z-[2] bg-bg pt-0 pb-[120px] max-[800px]:pt-0 max-[800px]:pb-[70px]",O="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]";function X(e){return Z(!!e.editing)?t(Y,{...e}):t(I,{kinds:V,type:"GalleryB",editing:e.editing,children:t(q,{...e})})}function Y(e){const{editing:a=!1}=e,i=U(),s=i?K(i,{firstField:!0}).map(n=>({images:[n.url],eyebrow:n.alt&&n.alt!==i.title?n.alt:void 0})):a?Array.from({length:D},()=>({images:[""]})):[];return t(S,{...e,tiles:s,owner:{name:(i??F).title},photosOnly:!0,emptyHint:_("This record’s pictures appear here on its page. A record with no pictures draws nothing.")})}function q({omitHead:e=!1,num:a,title:i,linkText:s,linkHref:n,galleryHref:p="/gallery",submitHref:y="/contact",zone:v="all",photoDisplay:f="covers",previewHover:b,display:N,displayPhone:u,styleOwner:h,editing:c=!1}){const g=j(),x=z(c&&!g),o=g?.product??x,d=W(o?.mediaGroups,v).map(r=>({images:(r.items??[]).filter(m=>m.kind==="image").map(m=>m.url),vehicle:$(r),finish:r.finish})).filter(r=>r.images.length>0),l=(f==="auto"?d.length>=4?"covers":"all":f)==="all"?d.flatMap(r=>r.images.map(m=>({images:[m],vehicle:r.vehicle,finish:r.finish}))):d;return t(S,{omitHead:e,num:a,title:i,linkText:s,linkHref:n,galleryHref:p,submitHref:y,previewHover:b,display:N,displayPhone:u,styleOwner:h,editing:c,tiles:o?l.map(r=>({images:r.images,eyebrow:r.vehicle||void 0,meta:r.finish})):[],owner:{name:o?.name??"",href:o?.href,process:o?.eyebrow},emptyHint:_("This product’s photos appear here on a product page. Add media groups in the product’s Media tab.")})}function S({omitHead:e=!1,num:a,title:i,linkText:s,linkHref:n,galleryHref:p="/gallery",submitHref:y="/contact",previewHover:v,display:f,displayPhone:b,styleOwner:N,editing:u=!1,tiles:h,owner:c,emptyHint:g,photosOnly:x=!1}){const o=s?{text:s,href:n||"#"}:void 0,d=i?C(i,!1):void 0,w=e?null:t(H,{num:a,title:d,link:o});return h.length===0?u?t("section",{className:e?E:R,children:G("div",{className:O,children:[w,t("p",{className:"mt-8 border-t border-line py-6 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-fg-dim",children:g})]})}):null:t("section",{className:e?E:R,children:G("div",{className:O,children:[w,t(M.Provider,{value:{galleryHref:p,submitHref:y,previewHover:v,display:f,displayPhone:b,styleOwner:N,photosOnly:x},children:t(T,{children:t("div",{[L]:"",className:"grid grid-cols-4 gap-2 max-[1500px]:grid-cols-3 max-[800px]:grid-cols-1 max-[800px]:gap-1",children:h.map((l,r)=>t(k,{image:l.images[0],photos:l.images.slice(1).map(m=>({src:m})),href:c.href,process:c.process,eyebrow:l.eyebrow,name:c.name,meta:l.meta,editing:u},`${l.eyebrow}-${r}`))})})}),!x&&t("div",{className:"mt-12 flex flex-col items-center gap-3",children:t(A,{href:p,variant:"ghost",children:"See Gallery"})})]})})}export{X as default,V as supportedKinds};
@@ -1127,6 +1127,7 @@ export interface components {
1127
1127
  };
1128
1128
  MediaGroup: {
1129
1129
  name: string;
1130
+ vehicle?: string;
1130
1131
  finish: string;
1131
1132
  items: components["schemas"]["MediaGroupItem"][];
1132
1133
  };
@@ -28,8 +28,6 @@ export declare function resolveConsent({ asked, region, stored, gpc, }: {
28
28
  stored: StoredChoice | null;
29
29
  gpc: boolean;
30
30
  }): ConsentState;
31
- export declare function getConsent(): ConsentState;
32
31
  export declare function setConsent(next: ConsentState): void;
33
- export declare function subscribeConsent(listener: () => void): () => void;
34
32
  export declare function adConsentForOrder(state?: ConsentState): "granted" | "denied" | undefined;
35
33
  export declare function googleConsentMode(state: ConsentState): Record<"ad_storage" | "ad_user_data" | "ad_personalization" | "analytics_storage", "granted" | "denied">;
@@ -1 +1 @@
1
- import{safeLocalStorage as i}from"efficient-web-builder/format/lib/safe-storage";import{CONSENT_RULES as u,CONSENT_RULES_VERSION as c}from"./rules.js";const d="sf:consent",l={asked:!1,region:"other",model:"opt-in",analytics:!0,ads:!0,chosen:!0,gpc:!1};function p(){const e=i.getItem(d);if(!e)return null;try{const t=JSON.parse(e);return t.v!==c||typeof t.analytics!="boolean"||typeof t.ads!="boolean"?null:{v:t.v,analytics:t.analytics,ads:t.ads,t:typeof t.t=="number"?t.t:0}}catch{return null}}function S(e,t=Date.now()){i.setItem(d,JSON.stringify({v:c,analytics:e.analytics,ads:e.ads,t}))}function C(){return typeof navigator>"u"?!1:navigator.globalPrivacyControl===!0}function g({asked:e,region:t,stored:o,gpc:r}){if(!e)return{...l,region:t,gpc:r};const a=u[t].model;return o?{asked:e,region:t,model:a,analytics:o.analytics,ads:o.ads&&!r,chosen:!0,gpc:r}:a==="opt-out"?{asked:e,region:t,model:a,analytics:!0,ads:!r,chosen:!1,gpc:r}:{asked:e,region:t,model:a,analytics:!1,ads:!1,chosen:!1,gpc:r}}let n=l;const s=new Set;function _(){return n}function h(e){e.asked===n.asked&&e.region===n.region&&e.analytics===n.analytics&&e.ads===n.ads&&e.chosen===n.chosen&&e.gpc===n.gpc||(n=e,s.forEach(t=>t()))}function m(e){return s.add(e),()=>s.delete(e)}function E(e=n){if(e.asked)return e.ads?"granted":"denied"}function N(e){const t=e.ads?"granted":"denied";return{ad_storage:t,ad_user_data:t,ad_personalization:t,analytics_storage:e.analytics?"granted":"denied"}}export{d as CONSENT_STORAGE_KEY,l as NOT_ASKED,E as adConsentForOrder,C as browserSendsGpc,_ as getConsent,N as googleConsentMode,p as readStoredChoice,g as resolveConsent,h as setConsent,m as subscribeConsent,S as writeStoredChoice};
1
+ import{safeLocalStorage as s}from"efficient-web-builder/format/lib/safe-storage";import{CONSENT_RULES as c,CONSENT_RULES_VERSION as i}from"./rules.js";const l="sf:consent",d={asked:!1,region:"other",model:"opt-in",analytics:!0,ads:!0,chosen:!0,gpc:!1};function y(){const e=s.getItem(l);if(!e)return null;try{const t=JSON.parse(e);return t.v!==i||typeof t.analytics!="boolean"||typeof t.ads!="boolean"?null:{v:t.v,analytics:t.analytics,ads:t.ads,t:typeof t.t=="number"?t.t:0}}catch{return null}}function p(e,t=Date.now()){s.setItem(l,JSON.stringify({v:i,analytics:e.analytics,ads:e.ads,t}))}function S(){return typeof navigator>"u"?!1:navigator.globalPrivacyControl===!0}function _({asked:e,region:t,stored:o,gpc:a}){if(!e)return{...d,region:t,gpc:a};const r=c[t].model;return o?{asked:e,region:t,model:r,analytics:o.analytics,ads:o.ads&&!a,chosen:!0,gpc:a}:r==="opt-out"?{asked:e,region:t,model:r,analytics:!0,ads:!a,chosen:!1,gpc:a}:{asked:e,region:t,model:r,analytics:!1,ads:!1,chosen:!1,gpc:a}}let n=d;function g(e){e.asked===n.asked&&e.region===n.region&&e.analytics===n.analytics&&e.ads===n.ads&&e.chosen===n.chosen&&e.gpc===n.gpc||(n=e)}function m(e=n){if(e.asked)return e.ads?"granted":"denied"}function C(e){const t=e.ads?"granted":"denied";return{ad_storage:t,ad_user_data:t,ad_personalization:t,analytics_storage:e.analytics?"granted":"denied"}}export{l as CONSENT_STORAGE_KEY,d as NOT_ASKED,m as adConsentForOrder,S as browserSendsGpc,C as googleConsentMode,y as readStoredChoice,_ as resolveConsent,g as setConsent,p as writeStoredChoice};
@@ -45,7 +45,6 @@ export declare const PANEL_ROWS: {
45
45
  readonly bodyNoSale: "Google Ads and Meta (Facebook, Instagram) tags, which measure our ads.";
46
46
  };
47
47
  };
48
- export declare const PANEL_HEADING = "Your privacy choices.";
49
48
  export declare const GPC_HONOURED: {
50
49
  readonly title: "Opt-out request honoured";
51
50
  readonly body: "Your browser sent a Global Privacy Control signal. We have turned off sale and sharing of your information for ads.";
@@ -1 +1 @@
1
- const g=1,s="Ads on. Shopper can opt out.",i="Ads and analytics off until Accept",r={us:{region:"us",name:"United States",model:"opt-out",law:"California CCPA / CPRA, other state laws",beforeChoice:s,footerLink:"Do Not Sell or Share My Personal Information",panelEyebrow:"Do not sell or share",adsRowName:"Sale or sharing for ads"},ca:{region:"ca",name:"Canada",model:"opt-in",law:"PIPEDA, Quebec Law 25",beforeChoice:i,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},au:{region:"au",name:"Australia",model:"opt-out",law:"Privacy Act 1988 (APPs)",beforeChoice:s,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},nz:{region:"nz",name:"New Zealand",model:"opt-out",law:"Privacy Act 2020",beforeChoice:s,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},uk:{region:"uk",name:"United Kingdom",model:"opt-in",law:"PECR, UK GDPR",beforeChoice:i,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"},eu:{region:"eu",name:"European Union",model:"opt-in",law:"ePrivacy Directive, GDPR",beforeChoice:i,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"},other:{region:"other",name:"All other countries",model:"opt-in",law:"Safe default",beforeChoice:i,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"}},m="Honoured: ads off",l=new Set(["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","IS","LI","NO"]),c={US:"us",PR:"us",GU:"us",VI:"us",AS:"us",MP:"us",CA:"ca",AU:"au",NZ:"nz",GB:"uk"};function u(o){const e=(o??"").trim().toUpperCase();return e?c[e]?c[e]:l.has(e)?"eu":"other":"other"}const h=new Set(["Pacific/Honolulu","Pacific/Guam","Pacific/Saipan","Pacific/Pago_Pago","America/Puerto_Rico","America/St_Thomas"]),d=new Set(["New_York","Chicago","Denver","Los_Angeles","Phoenix","Anchorage","Adak","Boise","Detroit","Juneau","Sitka","Metlakatla","Yakutat","Nome","Menominee","Indianapolis","Louisville","Fort_Wayne","Knox_IN"]),f=new Set(["Toronto","Vancouver","Edmonton","Winnipeg","Halifax","St_Johns","Regina","Montreal","Moncton","Glace_Bay","Goose_Bay","Iqaluit","Whitehorse","Dawson","Dawson_Creek","Fort_Nelson","Creston","Cambridge_Bay","Inuvik","Rankin_Inlet","Resolute","Swift_Current","Atikokan","Blanc-Sablon","Nipigon","Thunder_Bay","Rainy_River","Pangnirtung","Yellowknife","Coral_Harbour"]);function y(o){const e=(o??"").trim();if(!e)return"other";if(e==="Europe/London"||e==="Europe/Belfast"||e==="GB"||e==="GB-Eire"||e==="Europe/Guernsey"||e==="Europe/Jersey"||e==="Europe/Isle_of_Man")return"uk";if(e.startsWith("Europe/")||e==="Atlantic/Canary"||e==="Atlantic/Madeira"||e==="Atlantic/Azores"||e==="Atlantic/Reykjavik"||e==="Atlantic/Faroe")return"eu";if(e.startsWith("Australia/")||e==="Antarctica/Macquarie")return"au";if(e==="Pacific/Auckland"||e==="Pacific/Chatham"||e==="NZ"||e==="NZ-CHAT")return"nz";if(e.startsWith("US/")||h.has(e))return"us";if(e.startsWith("Canada/"))return"ca";if(e.startsWith("America/")){const n=e.slice(8),t=n.split("/")[0];if(t==="Indiana"||t==="Kentucky"||t==="North_Dakota"||d.has(n))return"us";if(f.has(n))return"ca"}return"other"}function C(o,e){const n=y(o);if(!e)return n;const t=u(e);return r[n].model==="opt-in"?n:(r[t].model==="opt-in",t)}function A(o){const e=new Set,n=[];for(const t of o){const a=u(t);a==="other"||e.has(a)||(e.add(a),n.push(r[a]))}return n.push(r.other),n}function p(o){const e=[...o.googleAds?["Google"]:[],...o.meta?["Facebook","Instagram"]:[]];return e.length<=1?e.join(""):`${e.slice(0,-1).join(", ")} and ${e[e.length-1]}`}function k(o,e,n){const t=p(n),a=t?`We use cookies to count visits and to show you ${e} ads on ${t}.`:"We use cookies to count visits.";return o.model==="opt-in"?{heading:t?"Cookies and ads":"Cookies",before:`${a} Nothing loads until you choose. You can change this at any time with `,link:o.footerLink,after:" at the bottom of every page."}:{heading:t?"Cookies and ads":"Cookies",before:`${a} You can say no at any time: choose Privacy choices, or use `,link:o.footerLink,after:" at the bottom of every page."}}const w={necessary:{name:"Necessary",body:"Cart, checkout, your country and currency, sign-in, and this choice. The site cannot work without them.",bodyNoSale:"What the site needs to work, such as remembering this choice. The site cannot work without them."},analytics:{name:"Analytics",body:"Counts visits and pages so we can improve the site. Google Analytics and our own visit count."},ads:{body:"Google Ads and Meta (Facebook, Instagram) tags, and the order details we send to them to measure our ads.",bodyNoSale:"Google Ads and Meta (Facebook, Instagram) tags, which measure our ads."}},E="Your privacy choices.",P={title:"Opt-out request honoured",body:"Your browser sent a Global Privacy Control signal. We have turned off sale and sharing of your information for ads."},N={accept:"Accept all",reject:"Reject all",choose:"Choose",save:"Save",ok:"OK",privacyChoices:"Privacy choices",privacyPolicy:"Privacy Policy",alwaysOn:"Always on"};export{N as CONSENT_BUTTONS,m as CONSENT_GPC_RULE,r as CONSENT_RULES,g as CONSENT_RULES_VERSION,P as GPC_HONOURED,E as PANEL_HEADING,w as PANEL_ROWS,p as adPlaces,k as bannerWords,u as regionOfCountry,y as regionOfTimeZone,A as rulesForCountries,C as visitorRegion};
1
+ const m=1,s="Ads on. Shopper can opt out.",i="Ads and analytics off until Accept",r={us:{region:"us",name:"United States",model:"opt-out",law:"California CCPA / CPRA, other state laws",beforeChoice:s,footerLink:"Do Not Sell or Share My Personal Information",panelEyebrow:"Do not sell or share",adsRowName:"Sale or sharing for ads"},ca:{region:"ca",name:"Canada",model:"opt-in",law:"PIPEDA, Quebec Law 25",beforeChoice:i,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},au:{region:"au",name:"Australia",model:"opt-out",law:"Privacy Act 1988 (APPs)",beforeChoice:s,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},nz:{region:"nz",name:"New Zealand",model:"opt-out",law:"Privacy Act 2020",beforeChoice:s,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},uk:{region:"uk",name:"United Kingdom",model:"opt-in",law:"PECR, UK GDPR",beforeChoice:i,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"},eu:{region:"eu",name:"European Union",model:"opt-in",law:"ePrivacy Directive, GDPR",beforeChoice:i,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"},other:{region:"other",name:"All other countries",model:"opt-in",law:"Safe default",beforeChoice:i,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"}},p="Honoured: ads off",l=new Set(["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","IS","LI","NO"]),c={US:"us",PR:"us",GU:"us",VI:"us",AS:"us",MP:"us",CA:"ca",AU:"au",NZ:"nz",GB:"uk"};function u(o){const e=(o??"").trim().toUpperCase();return e?c[e]?c[e]:l.has(e)?"eu":"other":"other"}const h=new Set(["Pacific/Honolulu","Pacific/Guam","Pacific/Saipan","Pacific/Pago_Pago","America/Puerto_Rico","America/St_Thomas"]),d=new Set(["New_York","Chicago","Denver","Los_Angeles","Phoenix","Anchorage","Adak","Boise","Detroit","Juneau","Sitka","Metlakatla","Yakutat","Nome","Menominee","Indianapolis","Louisville","Fort_Wayne","Knox_IN"]),f=new Set(["Toronto","Vancouver","Edmonton","Winnipeg","Halifax","St_Johns","Regina","Montreal","Moncton","Glace_Bay","Goose_Bay","Iqaluit","Whitehorse","Dawson","Dawson_Creek","Fort_Nelson","Creston","Cambridge_Bay","Inuvik","Rankin_Inlet","Resolute","Swift_Current","Atikokan","Blanc-Sablon","Nipigon","Thunder_Bay","Rainy_River","Pangnirtung","Yellowknife","Coral_Harbour"]);function y(o){const e=(o??"").trim();if(!e)return"other";if(e==="Europe/London"||e==="Europe/Belfast"||e==="GB"||e==="GB-Eire"||e==="Europe/Guernsey"||e==="Europe/Jersey"||e==="Europe/Isle_of_Man")return"uk";if(e.startsWith("Europe/")||e==="Atlantic/Canary"||e==="Atlantic/Madeira"||e==="Atlantic/Azores"||e==="Atlantic/Reykjavik"||e==="Atlantic/Faroe")return"eu";if(e.startsWith("Australia/")||e==="Antarctica/Macquarie")return"au";if(e==="Pacific/Auckland"||e==="Pacific/Chatham"||e==="NZ"||e==="NZ-CHAT")return"nz";if(e.startsWith("US/")||h.has(e))return"us";if(e.startsWith("Canada/"))return"ca";if(e.startsWith("America/")){const n=e.slice(8),t=n.split("/")[0];if(t==="Indiana"||t==="Kentucky"||t==="North_Dakota"||d.has(n))return"us";if(f.has(n))return"ca"}return"other"}function C(o,e){const n=y(o);if(!e)return n;const t=u(e);return r[n].model==="opt-in"?n:(r[t].model==="opt-in",t)}function A(o){const e=new Set,n=[];for(const t of o){const a=u(t);a==="other"||e.has(a)||(e.add(a),n.push(r[a]))}return n.push(r.other),n}function g(o){const e=[...o.googleAds?["Google"]:[],...o.meta?["Facebook","Instagram"]:[]];return e.length<=1?e.join(""):`${e.slice(0,-1).join(", ")} and ${e[e.length-1]}`}function k(o,e,n){const t=g(n),a=t?`We use cookies to count visits and to show you ${e} ads on ${t}.`:"We use cookies to count visits.";return o.model==="opt-in"?{heading:t?"Cookies and ads":"Cookies",before:`${a} Nothing loads until you choose. You can change this at any time with `,link:o.footerLink,after:" at the bottom of every page."}:{heading:t?"Cookies and ads":"Cookies",before:`${a} You can say no at any time: choose Privacy choices, or use `,link:o.footerLink,after:" at the bottom of every page."}}const w={necessary:{name:"Necessary",body:"Cart, checkout, your country and currency, sign-in, and this choice. The site cannot work without them.",bodyNoSale:"What the site needs to work, such as remembering this choice. The site cannot work without them."},analytics:{name:"Analytics",body:"Counts visits and pages so we can improve the site. Google Analytics and our own visit count."},ads:{body:"Google Ads and Meta (Facebook, Instagram) tags, and the order details we send to them to measure our ads.",bodyNoSale:"Google Ads and Meta (Facebook, Instagram) tags, which measure our ads."}},E={title:"Opt-out request honoured",body:"Your browser sent a Global Privacy Control signal. We have turned off sale and sharing of your information for ads."},P={accept:"Accept all",reject:"Reject all",choose:"Choose",save:"Save",ok:"OK",privacyChoices:"Privacy choices",privacyPolicy:"Privacy Policy",alwaysOn:"Always on"};export{P as CONSENT_BUTTONS,p as CONSENT_GPC_RULE,r as CONSENT_RULES,m as CONSENT_RULES_VERSION,E as GPC_HONOURED,w as PANEL_ROWS,g as adPlaces,k as bannerWords,u as regionOfCountry,y as regionOfTimeZone,A as rulesForCountries,C as visitorRegion};
@@ -35,9 +35,13 @@ export interface GalleryProductValue {
35
35
  href?: string;
36
36
  cover?: string;
37
37
  photos?: string[];
38
+ vehicle?: string;
38
39
  eyebrow?: string;
39
40
  hideName?: boolean;
40
41
  hideProcess?: boolean;
41
42
  hideEyebrow?: boolean;
42
43
  hideFinish?: boolean;
43
44
  }
45
+ export declare function mediaGroupVehicle(group: {
46
+ vehicle?: string | null;
47
+ } | null | undefined): string;
@@ -0,0 +1 @@
1
+ function i(e){return(e?.vehicle??"").trim()}export{i as mediaGroupVehicle};
@@ -3,8 +3,4 @@ export declare const STOCK_WORDS: {
3
3
  readonly outOfStock: "Out of stock";
4
4
  readonly notInStockHere: "Not in stock here";
5
5
  };
6
- export declare function unitsInStock(n: number): string;
7
- export declare function setsInStock(n: number): string;
8
- export declare function pickupAt(place: string): string;
9
- export declare function pickupAtCount(n: number): string;
10
6
  export declare function stockWord(inStock: boolean): string;
@@ -1 +1 @@
1
- const o={inStock:"In stock",outOfStock:"Out of stock",notInStockHere:"Not in stock here"};function n(t){return`${t} in stock`}function c(t){return`${t} ${t===1?"set":"sets"} in stock`}function e(t){return`Pickup available at ${t}`}function r(t){return`Pickup available at ${t} ${t===1?"place":"places"}`}function u(t){return t?o.inStock:o.outOfStock}export{o as STOCK_WORDS,e as pickupAt,r as pickupAtCount,c as setsInStock,u as stockWord,n as unitsInStock};
1
+ const o={inStock:"In stock",outOfStock:"Out of stock",notInStockHere:"Not in stock here"};function c(t){return t?o.inStock:o.outOfStock}export{o as STOCK_WORDS,c as stockWord};
@@ -1 +1 @@
1
- import{jsx as c}from"react/jsx-runtime";import d,{GALLERY_ITEM_HINTS as r}from"../../../../../components/GalleryItem.js";import{phHide as n}from"efficient-web-builder/render/lib/puck/blocks/scaffold";import{GalleryItemMeta as f}from"./meta.js";function o(e,t){if(typeof e=="string")return e.trim()===t?"":e;if(e&&typeof e=="object"){const i=e;if(typeof i.text=="string"&&i.text.trim()===t)return{...i,text:""}}return e}const b={...f,render:e=>{const t=e.product??{},i=e.fromProduct===!0&&!!t.code;return c(d,{image:i?t.cover:e.image,photos:i?(t.photos??[]).map(m=>({src:m})):e.photos,href:i?t.href:e.href,process:i?t.hideProcess?void 0:t.category:n(o(e.process,r.process),r.process,e.puck),eyebrow:i?t.hideEyebrow?void 0:t.eyebrow:n(o(e.eyebrow,r.eyebrow),r.eyebrow,e.puck),name:i?t.hideName?void 0:t.name:n(o(e.name,r.name),r.name,e.puck),meta:i?t.hideFinish?void 0:t.finish:n(o(e.meta,r.meta),r.meta,e.puck),previewHover:e.previewHover,ratio:e.ratio,captionPlace:e.captionPlace,editing:e.puck?.isEditing})}};export{b as GalleryItemRender};
1
+ import{jsx as c}from"react/jsx-runtime";import d,{GALLERY_ITEM_HINTS as n}from"../../../../../components/GalleryItem.js";import{phHide as r}from"efficient-web-builder/render/lib/puck/blocks/scaffold";import{GalleryItemMeta as f}from"./meta.js";function o(e,t){if(typeof e=="string")return e.trim()===t?"":e;if(e&&typeof e=="object"){const i=e;if(typeof i.text=="string"&&i.text.trim()===t)return{...i,text:""}}return e}const s={...f,render:e=>{const t=e.product??{},i=e.fromProduct===!0&&!!t.code;return c(d,{image:i?t.cover:e.image,photos:i?(t.photos??[]).map(m=>({src:m})):e.photos,href:i?t.href:e.href,process:i?t.hideProcess?void 0:t.category:r(o(e.process,n.process),n.process,e.puck),eyebrow:i?t.hideEyebrow?void 0:t.vehicle||void 0:r(o(e.eyebrow,n.eyebrow),n.eyebrow,e.puck),name:i?t.hideName?void 0:t.name:r(o(e.name,n.name),n.name,e.puck),meta:i?t.hideFinish?void 0:t.finish:r(o(e.meta,n.meta),n.meta,e.puck),previewHover:e.previewHover,ratio:e.ratio,captionPlace:e.captionPlace,editing:e.puck?.isEditing})}};export{s as GalleryItemRender};
@@ -1131,14 +1131,16 @@
1131
1131
  "type": "custom",
1132
1132
  "__text": {
1133
1133
  "control": "plainText",
1134
- "label": "Label"
1134
+ "label": "Label",
1135
+ "placeholder": "Label"
1135
1136
  }
1136
1137
  },
1137
1138
  "value": {
1138
1139
  "type": "custom",
1139
1140
  "__text": {
1140
1141
  "control": "plainText",
1141
- "label": "Value"
1142
+ "label": "Value",
1143
+ "placeholder": "Value"
1142
1144
  }
1143
1145
  },
1144
1146
  "href": {
@@ -1152,7 +1154,8 @@
1152
1154
  "type": "custom",
1153
1155
  "__text": {
1154
1156
  "control": "plainText",
1155
- "label": "Sub line"
1157
+ "label": "Sub line",
1158
+ "placeholder": "Sub line"
1156
1159
  }
1157
1160
  }
1158
1161
  }
@@ -9,8 +9,16 @@ export interface GridColumns {
9
9
  export declare function gridColumnsOf(gridClass: string): GridColumns;
10
10
  export declare function fillRowColumns(columns: number, cards: number): number;
11
11
  export declare function fillRow(grid: GridColumns, cards: number): GridColumns;
12
+ export declare const gridTracks: (n: number) => string;
12
13
  export interface FillRowCards {
13
14
  limit?: number;
14
15
  cards?: number;
15
16
  }
16
17
  export declare function fillRowCss(cls: string, gridClass: string, { limit, cards }?: FillRowCards): string;
18
+ export interface GridBand {
19
+ min?: number;
20
+ max?: number;
21
+ columns: number;
22
+ }
23
+ export declare function gridBands({ base, steps }: GridColumns): GridBand[];
24
+ export declare function inBand(band: GridBand, rules: readonly string[]): string;
@@ -1 +1 @@
1
- function h(o){const e=/(?:^|\s)grid-cols-(\d+)(?=\s|$)/.exec(o);if(!e)throw new Error(`gridColumnsOf: no base grid-cols-N in "${o}"`);const t=[...o.matchAll(/(?:^|\s)max-\[(\d+)px\]:grid-cols-(\d+)(?=\s|$)/g)].map(s=>({below:Number(s[1]),columns:Number(s[2])})).sort((s,i)=>i.below-s.below);return{base:Number(e[1]),steps:t}}function a(o,e){return Math.max(1,Math.min(o,Math.floor(e)))}function w(o,e){return{base:a(o.base,e),steps:o.steps.map(t=>({below:t.below,columns:a(t.columns,e)}))}}const p=o=>`grid-template-columns:repeat(${o},minmax(0,1fr))`;function $(o,e,{limit:t,cards:s}={}){const{base:i,steps:l}=h(e),r=typeof t=="number"&&t>0?t:void 0,b=Math.max(i,...l.map(n=>n.columns));if(s!==void 0&&Math.min(s,r??1/0)>=b)return"";const x=[{min:l[0]?.below,max:void 0,columns:i},...l.map((n,u)=>({min:l[u+1]?.below,max:n.below,columns:n.columns}))],d=[];for(const n of x){const u=r===void 0?n.columns:a(n.columns,r),m=[];u<n.columns&&m.push(`.${o}.${o}{${p(u)}}`);for(let c=u-1;c>=1;c--)m.push(`.${o}:not(:has(> :nth-child(${c+1}))){${p(c)}}`);if(m.length===0)continue;const f=n.min!==void 0&&n.max!==void 0?`(${n.min}px <= width < ${n.max}px)`:n.max!==void 0?`(width < ${n.max}px)`:n.min!==void 0?`(width >= ${n.min}px)`:void 0;d.push(f?`@media ${f}{${m.join("")}}`:m.join(""))}return d.join("")}export{w as fillRow,a as fillRowColumns,$ as fillRowCss,h as gridColumnsOf};
1
+ function a(n){const o=/(?:^|\s)grid-cols-(\d+)(?=\s|$)/.exec(n);if(!o)throw new Error(`gridColumnsOf: no base grid-cols-N in "${n}"`);const e=[...n.matchAll(/(?:^|\s)max-\[(\d+)px\]:grid-cols-(\d+)(?=\s|$)/g)].map(t=>({below:Number(t[1]),columns:Number(t[2])})).sort((t,u)=>u.below-t.below);return{base:Number(o[1]),steps:e}}function f(n,o){return Math.max(1,Math.min(n,Math.floor(o)))}function w(n,o){return{base:f(n.base,o),steps:n.steps.map(e=>({below:e.below,columns:f(e.columns,o)}))}}const d=n=>`grid-template-columns:repeat(${n},minmax(0,1fr))`;function $(n,o,{limit:e,cards:t}={}){const u=a(o),r=typeof e=="number"&&e>0?e:void 0,p=Math.max(u.base,...u.steps.map(i=>i.columns));if(t!==void 0&&Math.min(t,r??1/0)>=p)return"";const l=[];for(const i of x(u)){const s=r===void 0?i.columns:f(i.columns,r),c=[];s<i.columns&&c.push(`.${n}.${n}{${d(s)}}`);for(let m=s-1;m>=1;m--)c.push(`.${n}:not(:has(> :nth-child(${m+1}))){${d(m)}}`);l.push(h(i,c))}return l.join("")}function x({base:n,steps:o}){return[{min:o[0]?.below,max:void 0,columns:n},...o.map((e,t)=>({min:o[t+1]?.below,max:e.below,columns:e.columns}))]}function h(n,o){if(o.length===0)return"";const e=n.min!==void 0&&n.max!==void 0?`(${n.min}px <= width < ${n.max}px)`:n.max!==void 0?`(width < ${n.max}px)`:n.min!==void 0?`(width >= ${n.min}px)`:void 0;return e?`@media ${e}{${o.join("")}}`:o.join("")}export{w as fillRow,f as fillRowColumns,$ as fillRowCss,x as gridBands,a as gridColumnsOf,d as gridTracks,h as inBand};
@@ -0,0 +1,12 @@
1
+ import { type GridBand } from "./fill-row.js";
2
+ export declare const SET_CARD_SINGLE_BELOW = 800;
3
+ export declare function packsFull(spans: readonly number[], columns: number): boolean;
4
+ export declare function cardsWithoutHole(spans: readonly number[], columns: number, limit: number | undefined, topUp?: boolean): number;
5
+ export interface NoHoleBand {
6
+ band: GridBand;
7
+ cards: number;
8
+ tracks: number;
9
+ }
10
+ export declare function noHoleBands(gridClass: string, spans: readonly number[], limit: number | undefined, topUp?: boolean): NoHoleBand[];
11
+ export declare function showsASetCard(spans: readonly number[], limit: number | undefined): boolean;
12
+ export declare function noHoleCss(cls: string, bands: readonly NoHoleBand[], cards: number): string;
@@ -0,0 +1 @@
1
+ import{gridBands as l,gridColumnsOf as h,gridTracks as d,inBand as x}from"./fill-row.js";const m=800;function p(t,r){const n=[],f=(o,e,i)=>{for(let c=e;c<e+i;c++)if(n[o][c])return!1;return!0};for(const o of t){const e=Math.max(1,Math.min(r,o));for(let i=0;;i++){n[i]??=Array(r).fill(!1);let c=0;for(;c+e<=r&&!f(i,c,e);)c++;if(!(c+e>r)){for(let s=c;s<c+e;s++)n[i][s]=!0;break}}}return n.every(o=>o.every(Boolean))}const a=(t,r)=>t.reduce((n,f)=>n+Math.max(1,Math.min(r,f)),0),u=(t,r)=>p(t,Math.min(r,Math.max(1,a(t,r))));function w(t,r,n,f=!0){const o=Math.min(t.length,n&&n>0?n:t.length);if(o===0||u(t.slice(0,o),r))return o;if(f){for(let e=o+1;e<=t.length;e++)if(u(t.slice(0,e),r))return e}for(let e=o-1;e>=1;e--)if(u(t.slice(0,e),r))return e;return o}const M=(t,r)=>r.max!==void 0&&r.max<=m?t.map(()=>1):t;function k(t,r,n,f=!0){return l(h(t)).map(o=>{const e=M(r,o),i=w(e,o.columns,n,f),c=a(e.slice(0,i),o.columns);return{band:o,cards:i,tracks:Math.min(o.columns,Math.max(1,c))}})}function $(t,r){return t.slice(0,r&&r>0?r:t.length).some(n=>n>1)}function B(t,r,n){const f=[`.${t}{grid-auto-flow:row dense}`];for(const{band:o,cards:e,tracks:i}of r){const c=[];e<n&&c.push(`.${t} > *:nth-child(n+${e+1}){display:none}`),i<o.columns&&c.push(`.${t}.${t}{${d(i)}}`),f.push(x(o,c))}return f.join("")}export{m as SET_CARD_SINGLE_BELOW,w as cardsWithoutHole,k as noHoleBands,B as noHoleCss,p as packsFull,$ as showsASetCard};