efficient-storefront-blocks 0.92.0 → 0.94.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 (85) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/chunks/{EditorPreviewCheckout-VHPWPS3N.js → EditorPreviewCheckout-OPDSFBJH.js} +1 -1
  3. package/dist/chunks/{SiteEditorProvider-C4HT4BT4.js → SiteEditorProvider-ZP6NAWYT.js} +1 -1
  4. package/dist/chunks/{chunk-RAOSZKA3.js → chunk-ATCBSW73.js} +1 -1
  5. package/dist/chunks/{chunk-7L5DVQZ4.js → chunk-CEFKTE5A.js} +1 -1
  6. package/dist/chunks/chunk-JKJ76CRT.js +388 -0
  7. package/dist/chunks/chunk-JTDOMQMQ.js +1 -0
  8. package/dist/chunks/{fitment-data-URJZ24LU.js → fitment-data-IPAMN5IH.js} +1 -1
  9. package/dist/editor/components/GalleryPicturesSource.d.ts +4 -16
  10. package/dist/editor/components/GalleryPicturesSource.js +1 -1
  11. package/dist/editor/components/GalleryProductBinding.js +1 -1
  12. package/dist/editor/components/GalleryShowcaseSource.js +1 -1
  13. package/dist/editor/lib/document/blocks/commerce/ProductHero/fields.js +1 -1
  14. package/dist/editor/lib/document/blocks/commerce/ProductPicture/fields.js +1 -1
  15. package/dist/editor/lib/document/blocks/commerce/index.d.ts +1 -1
  16. package/dist/editor/lib/storefront-document.js +1 -1
  17. package/dist/editor/lib/storefront-editor-words-kept.js +1 -1
  18. package/dist/editor/lib/storefront-editor-words.d.ts +4 -7
  19. package/dist/editor/lib/storefront-editor-words.js +1 -1
  20. package/dist/index.js +74 -80
  21. package/dist/links.js +1 -1
  22. package/dist/render/app/globals.css +42 -3
  23. package/dist/render/built-with.json +1 -1
  24. package/dist/render/components/DefaultProductHero.d.ts +12 -0
  25. package/dist/render/components/DefaultProductHero.js +1 -0
  26. package/dist/render/components/GridCardTemplate.d.ts +10 -6
  27. package/dist/render/components/GridCardTemplate.js +1 -1
  28. package/dist/render/components/ProductGridSection.js +1 -1
  29. package/dist/render/components/ProductHeroPanel.d.ts +2 -1
  30. package/dist/render/components/ProductHeroPanel.js +1 -1
  31. package/dist/render/components/PublishedFooter.js +1 -1
  32. package/dist/render/components/PublishedHeader.js +1 -1
  33. package/dist/render/components/card-pieces/CardBuyButton.js +1 -1
  34. package/dist/render/components/card-pieces/CardName.js +1 -1
  35. package/dist/render/components/card-pieces/CardProductPicture.d.ts +3 -0
  36. package/dist/render/components/card-pieces/CardProductPicture.js +1 -1
  37. package/dist/render/components/card-pieces/CardSizes.d.ts +10 -2
  38. package/dist/render/components/card-pieces/CardSizes.js +1 -1
  39. package/dist/render/components/card-pieces/CardSpecs.d.ts +2 -0
  40. package/dist/render/components/card-pieces/CardSpecs.js +1 -1
  41. package/dist/render/components/card-pieces/ProductCardState.d.ts +14 -4
  42. package/dist/render/components/card-pieces/ProductCardState.js +1 -1
  43. package/dist/render/components/catalog/ShopperChips.js +1 -1
  44. package/dist/render/components/pdp-dynamic/DynamicGalleryGrid.js +1 -1
  45. package/dist/render/components/useProductCatalog.d.ts +1 -0
  46. package/dist/render/components/wheels-plp/AlloyWheelsListing.d.ts +1 -1
  47. package/dist/render/components/wheels-plp/AlloyWheelsListing.js +1 -1
  48. package/dist/render/lib/api/types.d.ts +1 -0
  49. package/dist/render/lib/content/hero-option-seed.d.ts +28 -0
  50. package/dist/render/lib/content/hero-option-seed.js +1 -0
  51. package/dist/render/lib/content/product-card-seed.d.ts +12 -0
  52. package/dist/render/lib/content/product-card-seed.js +1 -1
  53. package/dist/render/lib/document/blocks/commerce/ProductEyebrow/render.js +1 -1
  54. package/dist/render/lib/document/blocks/commerce/ProductHero/meta.d.ts +4 -0
  55. package/dist/render/lib/document/blocks/commerce/ProductHero/meta.js +1 -1
  56. package/dist/render/lib/document/blocks/commerce/ProductHero/render.js +1 -1
  57. package/dist/render/lib/document/blocks/commerce/ProductPicture/render.js +1 -1
  58. package/dist/render/lib/document/blocks/commerce/ProductSpecs/render.js +1 -1
  59. package/dist/render/lib/document/blocks/service/SiteHeader/render.js +1 -1
  60. package/dist/render/lib/document/card-templates.js +1 -1
  61. package/dist/render/lib/document/published-header-bar.d.ts +10 -0
  62. package/dist/render/lib/document/published-header-bar.js +1 -0
  63. package/dist/render/lib/document/section-to-box-rows-service.js +1 -1
  64. package/dist/render/lib/logo/surface-is-light.js +1 -1
  65. package/dist/render/lib/sections/card-tone.d.ts +9 -0
  66. package/dist/render/lib/sections/card-tone.js +1 -0
  67. package/dist/render/lib/sections/filter-option-rows.d.ts +14 -0
  68. package/dist/render/lib/sections/filter-option-rows.js +1 -1
  69. package/dist/render/lib/sections/product-pictures.d.ts +3 -0
  70. package/dist/render/lib/sections/product-pictures.js +1 -1
  71. package/dist/render/lib/wheels/plp-hydrate.d.ts +4 -1
  72. package/dist/render/lib/wheels/plp-hydrate.js +1 -1
  73. package/dist/words.d.ts +19 -7
  74. package/dist/words.js +5 -5
  75. package/package.json +4 -4
  76. package/dist/chunks/chunk-PW7BA4ZJ.js +0 -1
  77. package/dist/chunks/chunk-S2WLJ6H2.js +0 -388
  78. package/dist/render/components/TyrePlpCard.d.ts +0 -20
  79. package/dist/render/components/TyrePlpCard.js +0 -1
  80. package/dist/render/components/TyreSummaryCard.d.ts +0 -12
  81. package/dist/render/components/TyreSummaryCard.js +0 -1
  82. package/dist/render/lib/document/published-chrome-data.d.ts +0 -2
  83. package/dist/render/lib/document/published-chrome-data.js +0 -1
  84. /package/dist/chunks/{chunk-S2WLJ6H2.js.LEGAL.txt → chunk-JKJ76CRT.js.LEGAL.txt} +0 -0
  85. /package/dist/chunks/{chunk-JB6ISWYA.js → chunk-LRLOANKA.js} +0 -0
@@ -1,9 +1,17 @@
1
- export declare const CARD_CHIP_ROW_CLASS = "mt-3 flex h-[26px] items-center gap-1";
2
- export declare const CARD_CHIP_LIST_CLASS = "flex min-w-0 items-center gap-1 overflow-hidden";
1
+ import { type TyreCardState } from "./ProductCardState.js";
2
+ export declare const CARD_CHIP_ROW_CLASS = "mt-3 @container";
3
+ export declare const CARD_CHIP_LINE_CLASS = "flex h-[26px] items-center overflow-hidden";
3
4
  export declare const CARD_CHIP_MORE_CLASS: string;
4
5
  export declare const CARD_CHIP_SHAPE_CLASS: string;
6
+ export declare function chipRowNeed(labels: readonly string[], k: number, total: number): string;
5
7
  export declare const CARD_CHIP_CLASS: string;
6
8
  export interface CardSizesSettings {
7
9
  shown?: number;
8
10
  }
11
+ export declare const SIZE_PART_ATTR = "data-card-size-part";
12
+ export declare const TYRE_BUY_CHIPS_CLASS = "[.sf-card:has([data-card-size-part])_&]:hidden";
13
+ export declare function TyreSizeChips({ state, shown }: {
14
+ state: TyreCardState;
15
+ shown?: number;
16
+ }): import("react").JSX.Element;
9
17
  export default function CardSizes({ shown }: CardSizesSettings): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{CARD_TEXT_SIZE as c,CardControlRow as C}from"./card-row.js";import{useProductCardState as _}from"./ProductCardState.js";const f="mt-3 flex h-[26px] items-center gap-1",u="flex min-w-0 items-center gap-1 overflow-hidden",g=`shrink-0 border border-line px-2 py-0.5 font-mono ${c.labelSmall} tracking-[0.08em] text-fg-dim`,h=`border px-2 py-0.5 font-mono ${c.labelSmall} tracking-[0.08em] whitespace-nowrap`,A=`${h} border-accent/60 text-accent`,b=r=>["cursor-pointer transition-colors",h,r?"border-accent bg-accent text-bg":"border-accent/60 text-accent hover:border-accent hover:bg-accent/10"].join(" ");function R({shown:r=2}){const s=_();if(s.kind!=="tyre")return t(C,{});const{tyre:o,variants:i,detailReady:S,chosen:a,setSize:x}=s,d=S&&i.length>0,p=d?i.map(e=>e.size):o.sizes,l=p.slice(0,r),m=p.length-l.length;return t(C,{children:n("div",{children:[o.fitSize&&n("p",{className:`font-mono ${c.labelSmall} font-medium uppercase tracking-[0.14em] text-green`,children:["Fits · ",o.fitSize]}),n("div",{className:f,children:[t("div",{className:u,children:l.map(e=>d?t("button",{type:"button",title:e,"aria-label":e,"aria-pressed":a===e,onClick:()=>x(e),className:b(a===e),children:e},e):t("span",{className:A,children:e},e))}),m>0&&n("span",{className:g,children:["+",m]})]})]})})}export{A as CARD_CHIP_CLASS,u as CARD_CHIP_LIST_CLASS,g as CARD_CHIP_MORE_CLASS,f as CARD_CHIP_ROW_CLASS,h as CARD_CHIP_SHAPE_CLASS,R as default};
1
+ "use client";import{jsxs as _,jsx as t}from"react/jsx-runtime";import{Fragment as N}from"react";import{CARD_TEXT_SIZE as A,CardControlRow as g}from"./card-row.js";import{useProductCardState as b}from"./ProductCardState.js";const k="mt-3 @container",v="flex h-[26px] items-center overflow-hidden",S=`font-mono ${A.labelSmall} tracking-[0.08em]`,y=`shrink-0 border border-line px-2 py-0.5 ${S} text-fg-dim`,$=`shrink-0 border px-2 py-0.5 ${S} whitespace-nowrap`,P=`shrink-0 overflow-hidden ${S} whitespace-nowrap`,R="ml-1",z=4,E=18;function u(n,r,a){const i=n.slice(0,r),l=a-r,p=i.reduce((o,c)=>o+c.length,0)+(l>0?`+${l}`.length:0),d=i.length+(l>0?1:0),h=d-1;return`(${p} * (1ch + 0.08em) + ${d*E+h*z+1}px)`}const I=n=>`max(0px, calc((100cqw - ${n}) * 999))`,H=n=>`max(0px, calc((${n} - 100cqw) * 999))`,L=`${$} border-accent/60 text-accent`,T=n=>["cursor-pointer transition-colors",$,n?"border-accent bg-accent text-bg":"border-accent/60 text-accent hover:border-accent hover:bg-accent/10"].join(" "),F="data-card-size-part",q="[.sf-card:has([data-card-size-part])_&]:hidden";function D({state:n,shown:r=2}){const{tyre:a,variants:i,detailReady:l,chosen:p,setSize:d}=n,h=l&&i.length>0,o=h?i.map(e=>e.size):a.sizes,c=o.slice(0,r);return _("div",{children:[a.fitSize&&_("p",{className:`font-mono ${A.labelSmall} font-medium uppercase tracking-[0.14em] text-green`,children:["Fits · ",a.fitSize]}),t("div",{className:k,children:_("div",{className:v,children:[c.map((e,m)=>{const s=h?t("button",{type:"button",title:e,"aria-label":e,"aria-pressed":p===e,onClick:()=>d(e),className:T(p===e),children:e}):t("span",{className:L,children:e});return m===0?t(N,{children:s},e):t("span",{className:P,style:{maxWidth:I(u(c,m+1,o.length))},children:t("span",{className:`inline-flex ${R}`,children:s})},e)}),c.map((e,m)=>{const s=m+1,f=o.length-s;if(f<=0)return null;const x=s>1?I(u(c,s,o.length)):null,C=s<c.length?H(u(c,s+1,o.length)):null,w=x&&C?`min(${x}, ${C})`:x??C??"none";return t("span",{className:P,style:{maxWidth:w},children:t("span",{className:`inline-flex ${R}`,children:_("span",{className:y,children:["+",f]})})},`more-${s}`)})]})})]})}function j({shown:n=2}){const r=b();return r.kind!=="tyre"?t(g,{}):t(g,{children:t("div",{[F]:"",children:t(D,{state:r,shown:n})})})}export{L as CARD_CHIP_CLASS,v as CARD_CHIP_LINE_CLASS,y as CARD_CHIP_MORE_CLASS,k as CARD_CHIP_ROW_CLASS,$ as CARD_CHIP_SHAPE_CLASS,F as SIZE_PART_ATTR,q as TYRE_BUY_CHIPS_CLASS,D as TyreSizeChips,u as chipRowNeed,j as default};
@@ -1,6 +1,7 @@
1
1
  import { type ReactNode } from "react";
2
2
  import { type FieldUsageAnswer } from "../../lib/content/field-usage.js";
3
3
  import { type VehicleFitment } from "../../lib/wheels/plp-fitment-match.js";
4
+ import { type TyreCardProduct } from "./ProductCardState.js";
4
5
  export declare const CARD_SPEC_FIELD_CLASS = "whitespace-nowrap";
5
6
  export type CardSpecField = string | {
6
7
  readonly text: string;
@@ -17,4 +18,5 @@ export interface CardSpecsSettings {
17
18
  fieldUsage?: readonly FieldUsageAnswer[];
18
19
  }
19
20
  export declare function CardSpecFacts({ sizes, car, separator, fieldUsage }: CardSpecsSettings): import("react").JSX.Element | null;
21
+ export declare function tyreSpecLine(tyre: Pick<TyreCardProduct, "sizes" | "rimDiameters">, fieldUsage: readonly FieldUsageAnswer[]): string;
20
22
  export default function CardSpecs(settings: CardSpecsSettings): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as n,Fragment as m,jsxs as p}from"react/jsx-runtime";import{Fragment as x}from"react";import{HideTaker as u}from"efficient-web-builder/render/components/ViewHideRoot";import{applyCardAnswers as h}from"../../lib/content/field-usage.js";import{wheelCardSpecFacts as f}from"../../lib/wheels/plp-fitment-match.js";import{CARD_TEXT_SIZE as i,useCatalogCard as g}from"./card-row.js";import{useProductCardState as C}from"./ProductCardState.js";const S="whitespace-nowrap",_=t=>typeof t=="string"?t:t.text,w=/^(.*\S) (\+\d+ more)$/;function $(t,r="·"){return t.map((a,c)=>{const e=_(a),l=typeof a!="string"&&a.accent,o=`${S}${l?" text-accent":""}`,d=c<t.length-1?`${e} ${r}`:e,s=w.exec(e);return p(x,{children:[s?p(m,{children:[n("span",{className:o,children:s[1]})," ",n("span",{className:o,children:c<t.length-1?`${s[2]} ${r}`:s[2]})]}):n("span",{className:o,children:d}),c<t.length-1?" ":null]},e)})}function F({children:t}){const r=g();return n(u,{className:r?`mt-2 h-[38px] overflow-hidden [.sf-card-rows_&]:h-auto [.sf-card-rows_&]:max-h-[76px] font-mono ${i.labelLarge} leading-[19px] tracking-[0.14em] text-fg-dim`:`mt-[4px] font-mono ${i.labelLarge} tracking-[0.1em] text-fg-dim`,children:t})}function E({sizes:t=!1,car:r=null,separator:a,fieldUsage:c=[]}){const e=C();if(e.kind!=="wheel")return null;const l=h(f(e.wheel,r,{sizes:t}),c).map(o=>o.text);return n(m,{children:$(l,a)})}function L(t){return n(F,{children:n(E,{...t})})}export{S as CARD_SPEC_FIELD_CLASS,E as CardSpecFacts,F as CardSpecLine,$ as cardSpecFields,L as default};
1
+ "use client";import{jsx as r,Fragment as l,jsxs as m}from"react/jsx-runtime";import{Fragment as u}from"react";import{HideTaker as h}from"efficient-web-builder/render/components/ViewHideRoot";import{applyCardAnswers as x,keepForCard as f}from"../../lib/content/field-usage.js";import{formatSizeRange as g}from"../../lib/wheels/size-range.js";import{wheelCardSpecFacts as C}from"../../lib/wheels/plp-fitment-match.js";import{CARD_TEXT_SIZE as p,useCatalogCard as S}from"./card-row.js";import{useProductCardState as _}from"./ProductCardState.js";const $="whitespace-nowrap",w=e=>typeof e=="string"?e:e.text,F=/^(.*\S) (\+\d+ more)$/;function k(e,n="·"){return e.map((o,a)=>{const t=w(o),i=typeof o!="string"&&o.accent,s=`${$}${i?" text-accent":""}`,d=a<e.length-1?`${t} ${n}`:t,c=F.exec(t);return m(u,{children:[c?m(l,{children:[r("span",{className:s,children:c[1]})," ",r("span",{className:s,children:a<e.length-1?`${c[2]} ${n}`:c[2]})]}):r("span",{className:s,children:d}),a<e.length-1?" ":null]},t)})}function z({children:e}){const n=S();return r(h,{className:n?`mt-2 h-[38px] overflow-hidden [.sf-card-rows_&]:h-auto [.sf-card-rows_&]:max-h-[76px] font-mono ${p.labelLarge} leading-[19px] tracking-[0.14em] text-fg-dim`:`mt-[4px] font-mono ${p.labelLarge} tracking-[0.1em] text-fg-dim`,children:e})}function L({sizes:e=!1,car:n=null,separator:o,fieldUsage:a=[]}){const t=_();if(t.kind==="tyre")return r(l,{children:j(t.tyre,a)});if(t.kind!=="wheel")return null;const i=x(C(t.wheel,n,{sizes:e}),a).map(s=>s.text);return r(l,{children:k(i,o)})}function j(e,n){const o=f(n);return[e.sizes.length>0?`${e.sizes.length} ${e.sizes.length===1?"size":"sizes"}`:null,o("rim_diameter")?g(e.rimDiameters):null].filter(Boolean).join(" · ")}function D(e){return r(z,{children:r(L,{...e})})}export{$ as CARD_SPEC_FIELD_CLASS,L as CardSpecFacts,z as CardSpecLine,k as cardSpecFields,D as default,j as tyreSpecLine};
@@ -1,9 +1,8 @@
1
1
  import { type ReactNode } from "react";
2
2
  import type { CartLine } from "../CartContext.js";
3
3
  import { type TyreDetailState } from "../useTyreDetail.js";
4
- import type { TyrePlpCardProps } from "../TyrePlpCard.js";
5
4
  import { type PlpCardSelection } from "../wheels-plp/usePlpCardSelection.js";
6
- import type { Bundle, Tyre, TyreVariant, WheelSummary } from "../../lib/api/index.js";
5
+ import type { Bundle, Tyre, TyreProductSummary, TyreVariant, WheelSummary } from "../../lib/api/index.js";
7
6
  import { type SelectionPriceDisplay } from "../../lib/wheels/price-display.js";
8
7
  export interface WheelCardState {
9
8
  readonly kind: "wheel";
@@ -17,7 +16,18 @@ export interface WheelCardState {
17
16
  readonly notifyOpen: boolean;
18
17
  readonly setNotifyOpen: (open: boolean) => void;
19
18
  }
20
- export type TyreCardProduct = Pick<TyrePlpCardProps, "brand" | "brandLogo" | "name" | "slug" | "sizes" | "fitSize" | "rimDiameters" | "prices" | "image">;
19
+ export interface TyreCardProduct {
20
+ brand?: string | null;
21
+ brandLogo?: string | null;
22
+ name: string;
23
+ slug?: string | null;
24
+ sizes: string[];
25
+ fitSize?: string | null;
26
+ rimDiameters: number[];
27
+ prices?: Record<string, number | null>;
28
+ image?: string | null;
29
+ }
30
+ export declare function tyreCardProduct(item: TyreProductSummary, fitSize?: string | null): TyreCardProduct;
21
31
  export interface TyreCardState {
22
32
  readonly kind: "tyre";
23
33
  readonly tyre: TyreCardProduct;
@@ -79,7 +89,7 @@ export declare function BundleCardStateProvider({ bundle, children }: {
79
89
  }): import("react").JSX.Element;
80
90
  export declare function TyreCardStateProvider({ tyre, currency, editing, children, }: {
81
91
  tyre: TyreCardProduct;
82
- currency: string;
92
+ currency?: string;
83
93
  editing?: boolean;
84
94
  children: ReactNode;
85
95
  }): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as l}from"react/jsx-runtime";import{createContext as b,useCallback as z,useContext as S,useMemo as A,useState as P}from"react";import{useCurrency as h}from"../CurrencyContext.js";import{useTyreDetail as B}from"../useTyreDetail.js";import{usePlpCardSelection as N}from"../wheels-plp/usePlpCardSelection.js";import{tyrePagePath as W}from"../../lib/tyres/tyre-page-path.js";import{canOrderTyreVariant as T}from"../../lib/tyres/tyre-purchase.js";import{resolveSelectionPrice as j}from"../../lib/wheels/price-display.js";import{setBuildLabel as E,setIsWide as H,summarySetBuild as L}from"../../lib/wheels/set-mode.js";const n=b(null);function J(){const e=S(n);return e?.kind==="hero"?e:null}function K({value:e,children:t}){return l(n.Provider,{value:e,children:t})}function R(){const e=S(n);if(!e||e.kind==="hero")throw new Error("A product card piece was drawn outside a product card (no ProductCardState).");return e}function Q(){const e=S(n);return e?.kind==="hero"?null:e}function X(){const e=R();if(e.kind!=="wheel")throw new Error(`A wheel card piece was drawn on a ${e.kind} card.`);return e}const V=[];function Y({wheel:e,colours:t=V,defaultFinish:o,editing:a=!1,children:u}){const{currency:r}=h(),s=N(e,t,o),[f,p]=P(!1),d=L(e),c={kind:"wheel",wheel:e,sel:s,currency:r,price:j(e,s.selectedVariant,r,1),isSet:H(d),setWords:E(d),editing:a,notifyOpen:f,setNotifyOpen:p};return l(n.Provider,{value:c,children:u})}function Z({bundle:e,children:t}){const{currency:o}=h(),a={kind:"bundle",bundle:e,currency:o};return l(n.Provider,{value:a,children:t})}function ee({tyre:e,currency:t,editing:o=!1,children:a}){const{currency:u}=h(),{slug:r}=e,s=W(r),[f,p]=P(!1),d=z(()=>{r&&p(!0)},[r]),{state:c,tyre:m}=B(r??null,f),i=A(()=>m?.variants??[],[m]),[x,k]=P(null),w=i.length===1?i[0].size:null,y=x??w,v=i.find(g=>g.size===y),C=c==="ready",O={kind:"tyre",tyre:e,currency:t,activeCurrency:u,pagePath:s,arm:d,detailState:c,detail:m,variants:i,chosen:y,setSize:k,variant:v,canAdd:v!=null&&T(v,u),detailReady:C,unsellable:!s||c==="error"||C&&i.length===0,editing:o};return l(n.Provider,{value:O,children:a})}export{Z as BundleCardStateProvider,K as HeroStateProvider,ee as TyreCardStateProvider,Y as WheelCardStateProvider,J as useHeroStateOrNull,R as useProductCardState,Q as useProductCardStateOrNull,X as useWheelCardState};
1
+ "use client";import{jsx as l}from"react/jsx-runtime";import{createContext as O,useCallback as z,useContext as y,useMemo as A,useState as P}from"react";import{useCurrency as S}from"../CurrencyContext.js";import{useTyreDetail as B}from"../useTyreDetail.js";import{usePlpCardSelection as L}from"../wheels-plp/usePlpCardSelection.js";import{tyrePagePath as N}from"../../lib/tyres/tyre-page-path.js";import{canOrderTyreVariant as W}from"../../lib/tyres/tyre-purchase.js";import{resolveSelectionPrice as D}from"../../lib/wheels/price-display.js";import{setBuildLabel as T,setIsWide as j,summarySetBuild as E}from"../../lib/wheels/set-mode.js";function J(e,r=null){return{brand:e.brand,brandLogo:e.brandLogo,name:e.name,slug:e.slug,sizes:e.sizes,fitSize:r,rimDiameters:e.rimDiameters,prices:e.prices,image:e.coverImage}}const n=O(null);function K(){const e=y(n);return e?.kind==="hero"?e:null}function Q({value:e,children:r}){return l(n.Provider,{value:e,children:r})}function H(){const e=y(n);if(!e||e.kind==="hero")throw new Error("A product card piece was drawn outside a product card (no ProductCardState).");return e}function X(){const e=y(n);return e?.kind==="hero"?null:e}function Y(){const e=H();if(e.kind!=="wheel")throw new Error(`A wheel card piece was drawn on a ${e.kind} card.`);return e}const I=[];function Z({wheel:e,colours:r=I,defaultFinish:o,editing:a=!1,children:s}){const{currency:t}=S(),c=L(e,r,o),[p,f]=P(!1),d=E(e),i={kind:"wheel",wheel:e,sel:c,currency:t,price:D(e,c.selectedVariant,t,1),isSet:j(d),setWords:T(d),editing:a,notifyOpen:p,setNotifyOpen:f};return l(n.Provider,{value:i,children:s})}function ee({bundle:e,children:r}){const{currency:o}=S(),a={kind:"bundle",bundle:e,currency:o};return l(n.Provider,{value:a,children:r})}function re({tyre:e,currency:r,editing:o=!1,children:a}){const{currency:s}=S(),{slug:t}=e,c=N(t),[p,f]=P(!1),d=z(()=>{t&&f(!0)},[t]),{state:i,tyre:m}=B(t??null,p),u=A(()=>m?.variants??[],[m]),[x,g]=P(null),k=u.length===1?u[0].size:null,C=x??k,v=u.find(w=>w.size===C),h=i==="ready",b={kind:"tyre",tyre:e,currency:r??s,activeCurrency:s,pagePath:c,arm:d,detailState:i,detail:m,variants:u,chosen:C,setSize:g,variant:v,canAdd:v!=null&&W(v,s),detailReady:h,unsellable:!c||i==="error"||h&&u.length===0,editing:o};return l(n.Provider,{value:b,children:a})}export{ee as BundleCardStateProvider,Q as HeroStateProvider,re as TyreCardStateProvider,Z as WheelCardStateProvider,J as tyreCardProduct,K as useHeroStateOrNull,H as useProductCardState,X as useProductCardStateOrNull,Y as useWheelCardState};
@@ -1 +1 @@
1
- "use client";import{jsx as e,Fragment as T,jsxs as L}from"react/jsx-runtime";import{CardTemplateRows as G}from"efficient-web-builder/render/components/CardRowContext";import{cardRow as K}from"efficient-web-builder/format/lib/content/card-template";import{say as O}from"efficient-web-builder/format/lib/editor-words";import{useCurrency as B}from"../CurrencyContext.js";import{formatPrice as I}from"../../lib/commerce.js";import{filterChipItems as Y,filterStateWithoutChip as j}from"../../lib/sections/filter-option-rows.js";import{PlpResultRange as R,PlpToolbar as S}from"../wheels-plp/PlpToolbar.js";import A from"./ClearAllButton.js";import b from"./SortSelect.js";import{hasActivePlpFilters as M,plpSortKeysFor as H,PLP_SORT_LABELS as U}from"../../lib/wheels/plp-filters.js";import{itemKind as W,plpKindNoun as X}from"../../lib/catalog/plp-item.js";import{CATALOG_TEXT_SIZE as Z}from"../../lib/sections/catalog-text-size.js";import{EMPTY_PLP_FILTERS as $}from"../../lib/wheels/plp-filters.js";import{GALLERY_SORT_KEYS as q,GALLERY_SORT_LABELS as z}from"../../lib/sections/gallery-toolbar.js";import{useShopperMember as D}from"./ShopperScope.js";import{HideTaker as y}from"efficient-web-builder/render/components/ViewHideRoot";const J="✕";function Q({owner:n,showCount:r,showClear:s,showSort:l,firstShown:t,editing:a}){const{ref:i,scope:o,gallery:f}=D("chips",null,{count:r,sort:l}),{currency:c}=B(),m=(!o?.live&&t?{state:o?.state??{...$,sort:t.sort},update:()=>{},clear:()=>{},total:t.total,range:t.range,kinds:t.kinds}:null)??(o?{...o,kinds:[...new Set(o.rows.map(W))]}:null);if(!m&&f)return e(y,{as:"div",ref:i,"data-shopper-chips":"",children:e(V,{owner:n,gallery:f,showCount:r,showClear:s,showSort:l,editing:a})});if(!m)return e(y,{as:"div",ref:i,"data-shopper-chips":"",children:a&&e("p",{className:`font-mono ${Z.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:"Filter chips show the picks of a Filters block, or the Tags of a Gallery, in this Box"})});const{state:d,update:u,clear:_,total:p,range:x,kinds:h}=m,E=X(h.length?h:["alloy-wheel"]),P=M(d),C=Y(d,c,I).map(g=>({...g,mark:J,press:()=>u(N=>j(N,g))})),w=L(T,{children:[r&&e("div",{"data-shopper-count":"",className:"contents",children:e(R,{total:p,range:x??{from:p?1:0,to:p},noun:E})}),C.length>0&&e(v,{owner:n,chips:C,editing:a}),s&&P&&e(A,{onClick:_})]}),F=H(h.length?h:["alloy-wheel"]);return e(y,{as:"div",ref:i,"data-shopper-chips":"",children:e(S,{start:w,end:l?e(b,{value:d.sort,keys:F,labels:U,onChange:g=>u({sort:g,page:1})}):void 0})})}function v({owner:n,chips:r,selected:s,editing:l}){return e("ul",{className:"flex list-none flex-wrap items-center gap-2",children:e(G,{ownerId:n.id,ownerType:"FilterChipsBlock",Template:n.template,rows:r.map(K),items:r,states:s===void 0?void 0:r.map((t,a)=>a===s?{selected:!0}:void 0),actions:l?void 0:r.map(t=>({press:t.press})),fallback:null,wrapCopy:t=>e("li",{children:t}),children:t=>t})})}function V({owner:n,gallery:r,showCount:s,showClear:l,showSort:t,editing:a}){const{tags:i,tag:o,sort:f,shown:c,pick:k,setSort:m,clear:d}=r,u=[{label:O("All"),mark:"",press:()=>k(null)},...i.map(p=>({label:p,mark:"",press:()=>k(p)}))],_=L(T,{children:[s&&e("div",{"data-shopper-count":"",className:"contents",children:e(R,{total:c,range:{from:c?1:0,to:c},noun:ee})}),i.length>0&&e(v,{owner:n,chips:u,selected:o===null?0:i.indexOf(o)+1,editing:a}),l&&o!==null&&e(A,{onClick:d})]});return e(S,{start:_,end:t?e(b,{value:f,keys:q,labels:z,onChange:m}):void 0})}const ee={many:"items"};export{Q as default};
1
+ "use client";import{jsx as e,Fragment as T,jsxs as L}from"react/jsx-runtime";import{CardTemplateRows as G}from"efficient-web-builder/render/components/CardRowContext";import{cardRow as K}from"efficient-web-builder/format/lib/content/card-template";import{say as O}from"efficient-web-builder/format/lib/editor-words";import{useCurrency as B}from"../CurrencyContext.js";import{formatPrice as I}from"../../lib/commerce.js";import{filterChipItems as Y,filterStateWithoutChip as j,optionCardRows as M}from"../../lib/sections/filter-option-rows.js";import{PlpResultRange as R,PlpToolbar as S}from"../wheels-plp/PlpToolbar.js";import A from"./ClearAllButton.js";import b from"./SortSelect.js";import{hasActivePlpFilters as H,plpSortKeysFor as U,PLP_SORT_LABELS as W}from"../../lib/wheels/plp-filters.js";import{itemKind as X,plpKindNoun as Z}from"../../lib/catalog/plp-item.js";import{CATALOG_TEXT_SIZE as $}from"../../lib/sections/catalog-text-size.js";import{EMPTY_PLP_FILTERS as q}from"../../lib/wheels/plp-filters.js";import{GALLERY_SORT_KEYS as z,GALLERY_SORT_LABELS as D}from"../../lib/sections/gallery-toolbar.js";import{useShopperMember as J}from"./ShopperScope.js";import{HideTaker as _}from"efficient-web-builder/render/components/ViewHideRoot";const Q="✕";function V({owner:n,showCount:l,showClear:a,showSort:i,firstShown:r,editing:t}){const{ref:o,scope:s,gallery:f}=J("chips",null,{count:l,sort:i}),{currency:c}=B(),m=(!s?.live&&r?{state:s?.state??{...q,sort:r.sort},update:()=>{},clear:()=>{},total:r.total,range:r.range,kinds:r.kinds}:null)??(s?{...s,kinds:[...new Set(s.rows.map(X))]}:null);if(!m&&f)return e(_,{as:"div",ref:o,"data-shopper-chips":"",children:e(ee,{owner:n,gallery:f,showCount:l,showClear:a,showSort:i,editing:t})});if(!m)return e(_,{as:"div",ref:o,"data-shopper-chips":"",children:t&&e("p",{className:`font-mono ${$.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:"Filter chips show the picks of a Filters block, or the Tags of a Gallery, in this Box"})});const{state:d,update:u,clear:C,total:p,range:w,kinds:h}=m,x=Z(h.length?h:["alloy-wheel"]),E=H(d),y=Y(d,c,I).map(g=>({...g,mark:Q,press:()=>u(N=>j(N,g))})),P=L(T,{children:[l&&e("div",{"data-shopper-count":"",className:"contents",children:e(R,{total:p,range:w??{from:p?1:0,to:p},noun:x})}),y.length>0&&e(v,{owner:n,chips:y,editing:t}),a&&E&&e(A,{onClick:C})]}),F=U(h.length?h:["alloy-wheel"]);return e(_,{as:"div",ref:o,"data-shopper-chips":"",children:e(S,{start:P,end:i?e(b,{value:d.sort,keys:F,labels:W,onChange:g=>u({sort:g,page:1})}):void 0})})}function v({owner:n,chips:l,selected:a,editing:i}){const r=M(l,{item:t=>t,selected:(t,o)=>o===a,press:t=>t.press});return e("ul",{className:"flex list-none flex-wrap items-center gap-2",children:e(G,{ownerId:n.id,ownerType:"FilterChipsBlock",Template:n.template,rows:r.items.map(K),items:r.items,states:a===void 0?void 0:r.states,actions:i?void 0:r.actions,fallback:null,wrapCopy:t=>e("li",{children:t}),children:t=>t})})}function ee({owner:n,gallery:l,showCount:a,showClear:i,showSort:r,editing:t}){const{tags:o,tag:s,sort:f,shown:c,pick:k,setSort:m,clear:d}=l,u=[{label:O("All"),mark:"",press:()=>k(null)},...o.map(p=>({label:p,mark:"",press:()=>k(p)}))],C=L(T,{children:[a&&e("div",{"data-shopper-count":"",className:"contents",children:e(R,{total:c,range:{from:c?1:0,to:c},noun:te})}),o.length>0&&e(v,{owner:n,chips:u,selected:s===null?0:o.indexOf(s)+1,editing:t}),i&&s!==null&&e(A,{onClick:d})]});return e(S,{start:C,end:r?e(b,{value:f,keys:z,labels:D,onChange:m}):void 0})}const te={many:"items"};export{V as default};
@@ -1 +1 @@
1
- "use client";import{jsx as t,jsxs as S}from"react/jsx-runtime";import C from"efficient-web-builder/render/components/Btn";import j,{GALLERY_GRID_ATTR as D,GalleryLinksContext as F}from"../GalleryItem.js";import{SharedPartKinds as K}from"efficient-web-builder/render/components/PublishedPartStylesContext";import{renderHeadline as U}from"efficient-web-builder/render/components/goldPhrases";import Z from"efficient-web-builder/render/components/SectionHeader";import $ from"./KindGate.js";import z from"./RecordPhotoGallery.js";import{headIsEmpty as V,ownPadding as W}from"../../lib/sections/own-padding.js";import{PLP_KINDS as X}from"../../lib/catalog/plp-item.js";import{useCurrentProduct as Y}from"../../lib/document/current-product.js";import{SAMPLE_PICTURE_COUNT as T,SAMPLE_RECORD as q,recordPictures as J,useCurrentRecord as Q,useDrawsOtherRecord as ee}from"../../lib/document/current-record.js";import{mediaGroupVehicle as re}from"../../lib/content/source-values.js";import{useSampleProduct as te}from"./useSampleProduct.js";import{say as _}from"efficient-web-builder/format/lib/editor-words";import{galleryLayoutRatio as ie,resolveGalleryLayout as oe}from"efficient-web-builder/format/lib/content/gallery-layout";import{HideTaker as L}from"efficient-web-builder/render/components/ViewHideRoot";const ae=X,O=["photos","lifestyle","accessories","others"];function se(e,o){if(!e)return[];if(o==="all")return O.flatMap(s=>e[s]??[]);const r=O.includes(o)?o:null;return r?e[r]??[]:[]}const k="relative z-[2] bg-bg py-[120px] max-view-wide:py-[70px]",H="relative z-[2] bg-bg pt-0 pb-[120px] max-view-wide:pt-0 max-view-wide:pb-[70px]",M="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]";function ne(e){return ee(!!e.editing)?t(le,{...e}):t($,{kinds:ae,type:"GalleryB",editing:e.editing,children:t(me,{...e})})}function le(e){const{editing:o=!1}=e,r=Q(),s=r?J(r,{firstField:!0}).map(a=>({images:[a.url],eyebrow:a.alt&&a.alt!==r.title?a.alt:void 0,...a.video?{video:a.video}:{}})):o?Array.from({length:T},()=>({images:[""]})):[];return t(A,{...e,tiles:s,owner:{name:(r??q).title},photosOnly:!0,emptyHint:_("This record’s pictures appear here on its page. A record with no pictures draws nothing.")})}function Ae(e){const{rows:o,limit:r,layout:s,editing:a=!1,title:h}=e,d=oe(s),c=typeof r=="number"&&r>0?Math.floor(r):void 0,p=o.filter(n=>typeof n.cover=="string"&&n.cover).map(n=>({images:[n.cover],...n.video?{video:n.video}:{}})),g=a&&p.length===0?Array.from({length:c??T},()=>({images:[""]})):p;return t(A,{...e,tiles:c?g.slice(0,c):g,owner:{name:(h??"").replace(/==/g,"").trim()},photosOnly:!0,tilesAcross:d?.across===3?3:4,tileRatio:d?ie(d):null,emptyHint:_("The website’s pictures appear here, in the order they are put in. A website with no pictures draws nothing.")})}function me({omitHead:e=!1,num:o,title:r,linkText:s,linkHref:a,galleryHref:h="/gallery",submitHref:d="/contact",zone:c="all",photoDisplay:p="covers",previewHover:g,display:n,displayPhone:y,styleOwner:v,editing:f=!1,padTop:G,padBottom:x}){const w=Y(),N=te(f&&!w),u=w?.product??N,b=se(u?.mediaGroups,c).map(i=>({images:(i.items??[]).filter(m=>m.kind==="image").map(m=>m.url),vehicle:re(i),finish:i.finish})).filter(i=>i.images.length>0),R=(p==="auto"?b.length>=4?"covers":"all":p)==="all"?b.flatMap(i=>i.images.map(m=>({images:[m],vehicle:i.vehicle,finish:i.finish}))):b;return t(A,{omitHead:e,num:o,title:r,linkText:s,linkHref:a,galleryHref:h,submitHref:d,previewHover:g,display:n,displayPhone:y,styleOwner:v,editing:f,padTop:G,padBottom:x,tiles:u?R.map(i=>({images:i.images,eyebrow:i.vehicle||void 0,meta:i.finish})):[],owner:{name:u?.name??"",href:u?.href,process:u?.eyebrow},emptyHint:_("This product’s photos appear here on a product page. Add media groups in the product’s Media tab.")})}function A({omitHead:e=!1,num:o,title:r,linkText:s,linkHref:a,galleryHref:h="/gallery",submitHref:d="/contact",previewHover:c,display:p,displayPhone:g,styleOwner:n,editing:y=!1,tiles:v,owner:f,emptyHint:G,photosOnly:x=!1,tilesAcross:w,tileRatio:N=null,padTop:u,padBottom:b}){const P=s?{text:s,href:a||"#"}:void 0,R=r?U(r,!1):void 0,i=e?null:t(Z,{num:o,title:R,link:P}),m=!y&&V(o,r,P?.text)?null:i,E=W(u,b);return v.length===0?y?t(L,{as:"section",className:e?H:k,style:E,children:S("div",{className:M,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(L,{as:"section",className:e?H:k,style:E,children:S("div",{className:M,children:[m,x?t(z,{pictures:v.map(l=>({url:l.images[0]??"",alt:l.eyebrow,video:l.video})),name:f.name,editing:y,...w?{fit:"tiles",across:w,ratio:N}:{}}):t(F.Provider,{value:{galleryHref:h,submitHref:d,previewHover:c,display:p,displayPhone:g,styleOwner:n,photosOnly:x},children:t(K,{children:t("div",{[D]:"",className:"grid grid-cols-4 gap-2 max-[1500px]:grid-cols-3 max-view-wide:grid-cols-1 max-view-wide:gap-1",children:v.map((l,I)=>t(j,{image:l.images[0],photos:l.images.slice(1).map(B=>({src:B})),href:f.href,process:f.process,eyebrow:l.eyebrow,name:f.name,meta:l.meta,editing:y},`${l.eyebrow}-${I}`))})})}),!x&&t("div",{className:"mt-12 flex flex-col items-center gap-3",children:t(C,{href:h,variant:"ghost",children:"See Gallery"})})]})})}export{Ae as SourcedGalleryGrid,ne as default,ae as supportedKinds};
1
+ "use client";import{jsx as t,jsxs as S}from"react/jsx-runtime";import C from"efficient-web-builder/render/components/Btn";import j,{GALLERY_GRID_ATTR as D,GalleryLinksContext as F}from"../GalleryItem.js";import{SharedPartKinds as K}from"efficient-web-builder/render/components/PublishedPartStylesContext";import{renderHeadline as U}from"efficient-web-builder/render/components/goldPhrases";import Z from"efficient-web-builder/render/components/SectionHeader";import $ from"./KindGate.js";import z from"./RecordPhotoGallery.js";import{headIsEmpty as V,ownPadding as W}from"../../lib/sections/own-padding.js";import{PLP_KINDS as X}from"../../lib/catalog/plp-item.js";import{useCurrentProduct as Y}from"../../lib/document/current-product.js";import{SAMPLE_PICTURE_COUNT as L,SAMPLE_RECORD as q,recordPictures as J,useCurrentRecord as Q,useDrawsOtherRecord as ee}from"../../lib/document/current-record.js";import{mediaGroupVehicle as re}from"../../lib/content/source-values.js";import{IMAGE_ZONES as M}from"../../lib/sections/product-pictures.js";import{useSampleProduct as te}from"./useSampleProduct.js";import{say as _}from"efficient-web-builder/format/lib/editor-words";import{galleryLayoutRatio as ie,resolveGalleryLayout as oe}from"efficient-web-builder/format/lib/content/gallery-layout";import{HideTaker as T}from"efficient-web-builder/render/components/ViewHideRoot";const ae=X;function ne(e,o){if(!e)return[];if(o==="all")return M.flatMap(n=>e[n]??[]);const r=M.includes(o)?o:null;return r?e[r]??[]:[]}const k="relative z-[2] bg-bg py-[120px] max-view-wide:py-[70px]",I="relative z-[2] bg-bg pt-0 pb-[120px] max-view-wide:pt-0 max-view-wide:pb-[70px]",H="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]";function se(e){return ee(!!e.editing)?t(le,{...e}):t($,{kinds:ae,type:"GalleryB",editing:e.editing,children:t(me,{...e})})}function le(e){const{editing:o=!1}=e,r=Q(),n=r?J(r,{firstField:!0}).map(a=>({images:[a.url],eyebrow:a.alt&&a.alt!==r.title?a.alt:void 0,...a.video?{video:a.video}:{}})):o?Array.from({length:L},()=>({images:[""]})):[];return t(A,{...e,tiles:n,owner:{name:(r??q).title},photosOnly:!0,emptyHint:_("This record’s pictures appear here on its page. A record with no pictures draws nothing.")})}function Ee(e){const{rows:o,limit:r,layout:n,editing:a=!1,title:h}=e,d=oe(n),c=typeof r=="number"&&r>0?Math.floor(r):void 0,p=o.filter(s=>typeof s.cover=="string"&&s.cover).map(s=>({images:[s.cover],...s.video?{video:s.video}:{}})),g=a&&p.length===0?Array.from({length:c??L},()=>({images:[""]})):p;return t(A,{...e,tiles:c?g.slice(0,c):g,owner:{name:(h??"").replace(/==/g,"").trim()},photosOnly:!0,tilesAcross:d?.across===3?3:4,tileRatio:d?ie(d):null,emptyHint:_("The website’s pictures appear here, in the order they are put in. A website with no pictures draws nothing.")})}function me({omitHead:e=!1,num:o,title:r,linkText:n,linkHref:a,galleryHref:h="/gallery",submitHref:d="/contact",zone:c="all",photoDisplay:p="covers",previewHover:g,display:s,displayPhone:y,styleOwner:v,editing:f=!1,padTop:G,padBottom:x}){const w=Y(),N=te(f&&!w),u=w?.product??N,b=ne(u?.mediaGroups,c).map(i=>({images:(i.items??[]).filter(m=>m.kind==="image").map(m=>m.url),vehicle:re(i),finish:i.finish})).filter(i=>i.images.length>0),P=(p==="auto"?b.length>=4?"covers":"all":p)==="all"?b.flatMap(i=>i.images.map(m=>({images:[m],vehicle:i.vehicle,finish:i.finish}))):b;return t(A,{omitHead:e,num:o,title:r,linkText:n,linkHref:a,galleryHref:h,submitHref:d,previewHover:g,display:s,displayPhone:y,styleOwner:v,editing:f,padTop:G,padBottom:x,tiles:u?P.map(i=>({images:i.images,eyebrow:i.vehicle||void 0,meta:i.finish})):[],owner:{name:u?.name??"",href:u?.href,process:u?.eyebrow},emptyHint:_("This product’s photos appear here on a product page. Add media groups in the product’s Media tab.")})}function A({omitHead:e=!1,num:o,title:r,linkText:n,linkHref:a,galleryHref:h="/gallery",submitHref:d="/contact",previewHover:c,display:p,displayPhone:g,styleOwner:s,editing:y=!1,tiles:v,owner:f,emptyHint:G,photosOnly:x=!1,tilesAcross:w,tileRatio:N=null,padTop:u,padBottom:b}){const R=n?{text:n,href:a||"#"}:void 0,P=r?U(r,!1):void 0,i=e?null:t(Z,{num:o,title:P,link:R}),m=!y&&V(o,r,R?.text)?null:i,E=W(u,b);return v.length===0?y?t(T,{as:"section",className:e?I:k,style:E,children:S("div",{className:H,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(T,{as:"section",className:e?I:k,style:E,children:S("div",{className:H,children:[m,x?t(z,{pictures:v.map(l=>({url:l.images[0]??"",alt:l.eyebrow,video:l.video})),name:f.name,editing:y,...w?{fit:"tiles",across:w,ratio:N}:{}}):t(F.Provider,{value:{galleryHref:h,submitHref:d,previewHover:c,display:p,displayPhone:g,styleOwner:s,photosOnly:x},children:t(K,{children:t("div",{[D]:"",className:"grid grid-cols-4 gap-2 max-[1500px]:grid-cols-3 max-view-wide:grid-cols-1 max-view-wide:gap-1",children:v.map((l,O)=>t(j,{image:l.images[0],photos:l.images.slice(1).map(B=>({src:B})),href:f.href,process:f.process,eyebrow:l.eyebrow,name:f.name,meta:l.meta,editing:y},`${l.eyebrow}-${O}`))})})}),!x&&t("div",{className:"mt-12 flex flex-col items-center gap-3",children:t(C,{href:h,variant:"ghost",children:"See Gallery"})})]})})}export{Ee as SourcedGalleryGrid,se as default,ae as supportedKinds};
@@ -21,6 +21,7 @@ export declare const loadUnifiedProductCatalog: (force?: boolean) => Promise<(({
21
21
  spec: import("../lib/api/types.js").components["schemas"]["WheelSpec"] | null;
22
22
  coverImage: string | null;
23
23
  defaultFinish?: string | null;
24
+ rendersHaveAlpha?: boolean;
24
25
  defaultFinishRenderings?: string[];
25
26
  description: string;
26
27
  listable?: boolean;
@@ -32,4 +32,4 @@ export declare const PLP_GATE_DEFAULTS: {
32
32
  readonly heading: "Let's find wheels that fit your car.";
33
33
  readonly intro: "Tell us what you drive and we'll show you every set that bolts straight on — bolt pattern, offset and hub bore checked for you.";
34
34
  };
35
- export default function AlloyWheelsListing({ heading, intro, askForCar, gateHeading, gateIntro, perPage, columns, defaultSort, hiddenFacets, fieldUsage, showPrice, showInStock, kinds, products, wheels, requestQuery, editing, ownerId, template, cardImage, hover, titleLevel, }: AlloyWheelsListingProps): import("react").JSX.Element | null;
35
+ export default function AlloyWheelsListing({ heading, intro, askForCar, gateHeading, gateIntro, perPage, columns, defaultSort, hiddenFacets, fieldUsage, showPrice, showInStock, kinds, products, wheels, requestQuery, editing, ownerId, template, hover, titleLevel, }: AlloyWheelsListingProps): import("react").JSX.Element | null;
@@ -1 +1 @@
1
- "use client";import{jsx as r,jsxs as p,Fragment as $e}from"react/jsx-runtime";import{useScopeClass as He}from"../../lib/use-scope-class.js";import{useCallback as m,useEffect as Ye,useMemo as i,useRef as qe,useState as Je}from"react";import{cardHoverOf as Qe}from"efficient-web-builder/format/lib/animation/hover";import{SHARED_ROWS_LIST_CLASS as Ue}from"efficient-web-builder/render/lib/content/box-shared-columns";import{NO_FIELD_ANSWERS as Xe,answersForKind as ne}from"../../lib/content/field-usage.js";import{useCurrency as Ze}from"../CurrencyContext.js";import et from"../NoCurrencyNote.js";import{usePreviewDevice as tt}from"efficient-easel/screen/components/PreviewDeviceContext";import{renderGold as ot,renderHeadline as rt}from"efficient-web-builder/render/components/goldPhrases";import{useUnifiedProductCatalog as nt}from"../useProductCatalog.js";import{scrollBehavior as st}from"efficient-web-builder/render/components/useReducedMotion";import{normalizePlpColumns as it,PLP_GRID_GAP_VAR as se,plpGridVars as lt}from"../../lib/wheels/plp-grid.js";import{plpCardImageSizes as at}from"../../lib/sections/card-image-sizes.js";import{CARD_ROWS_GRID_CLASS as ct,cardRowsGridStyle as pt}from"../WheelCardFrame.js";import{applyPlpFilters as mt,buildPlpFacets as dt,buildPlpTypeOptions as ut,buildTyreSizeBoxes as ht,EMPTY_PLP_FILTERS as ie,hasActivePlpFilters as ft,paginatePlp as gt,pickTyreSize as yt,plpTyreSizeBoxesShown as St,plpInStockCount as xt,plpOpeningSort as wt,plpPriceBounds as bt,plpShownKinds as vt,plpSortKeysFor as Pt,PLP_SORT_LABELS as kt}from"../../lib/wheels/plp-filters.js";import{itemKind as L,itemSlug as le,itemTyreSizes as Ct,plpBrandVaries as Nt,plpProcessVaries as Tt,plpItemsOfKinds as _t,plpKindNoun as V,resolvePlpKinds as At}from"../../lib/catalog/plp-item.js";import{plpGateWords as zt,plpVehicleCopy as Lt}from"../../lib/catalog/plp-vehicle-copy.js";import{oemBadgeSize as It,oemTyreSizes as Ot}from"../../lib/tyres/tyre-vehicle-fitment.js";import Rt from"../TyreSummaryCard.js";import{wheelsFittingVehicle as Gt}from"../../lib/wheels/plp-fitment-match.js";import Vt from"./PlpActiveChips.js";import{GridCardProvider as Ft,GridMixedCards as Bt,gridIndexCss as Et,LISTING_CARD_RULES as Kt}from"../GridCardTemplate.js";import{wheelCardEyebrowShows as jt}from"../ProductCardEyebrow.js";import Mt from"./PlpPagination.js";import Dt from"./PlpSidebar.js";import{PlpResultRange as Wt,PlpToolbar as $t}from"./PlpToolbar.js";import Ht from"../catalog/SortSelect.js";import Yt from"./PlpVehicleBar.js";import qt from"./PlpVehicleGate.js";import{useVehicleCatalog as Jt}from"./useVehicleCatalog.js";import{useVehicleFit as Qt}from"../fitment/useVehicleFit.js";import{usePlpFiltersInUrl as Ut}from"./usePlpFiltersInUrl.js";import{say as F}from"efficient-web-builder/format/lib/editor-words";const Vo={heading:"Let's find wheels that fit your car.",intro:"Tell us what you drive and we'll show you every set that bolts straight on — bolt pattern, offset and hub bore checked for you."};function Xt({level:v,className:P,children:k}){return r(v===2?"h2":"h1",{className:P,children:k})}const Zt=Qe({},"AlloyWheelsListing");function eo({heading:v="",intro:P="",askForCar:k=!0,gateHeading:B="",gateIntro:ae="",perPage:E=24,columns:ce,defaultSort:pe="recommended",hiddenFacets:me=[],fieldUsage:f=Xe,showPrice:K=!0,showInStock:de=!0,kinds:ue,products:he,wheels:fe,requestQuery:ge,editing:d=!1,ownerId:ye="",template:Se,cardImage:xe,hover:we=Zt,titleLevel:be}){const{currency:l}=Ze(),u=At(ue),j=tt(),M=it(ce),ve=lt(M,d?j:null),Pe=at(M,d?j:null),D=He("plp"),ke=Et(D),Ce=nt(),W=he??fe??Ce??[],$=i(()=>_t(W,u),[W,u.join(",")]),o=Qt({editing:d,enabled:k,autoApply:!0}),[Ne,I]=Je(!1),Te=wt(pe,u),g=o.applied?.vehicle??null,[e,x]=Ut({editing:d,openingSort:Te,appliedVehicle:g,vehicleRestored:o.restored,requestQuery:ge}),c=vt(u,e.kind),s=m(t=>x(t),[x]),H=m((t,h)=>{const a=e[t],De=a.map(String).includes(h)?a.filter(We=>String(We)!==h):[...a,t==="diameters"?Number(h):h];s({...e,[t]:De,page:1})},[e,s]),Y=m(t=>s({...e,priceMax:t,page:1}),[e,s]),q=m(t=>s({...e,inStockOnly:t,page:1}),[e,s]),J=m(t=>s({...ie,kind:t,inStockOnly:e.inStockOnly,priceMax:e.priceMax,sort:e.sort}),[e.inStockOnly,e.priceMax,e.sort,s]),_e=m(t=>s({...e,sort:t,page:1}),[e,s]),Ae=m(t=>{s({...e,page:t}),typeof window<"u"&&window.scrollTo({top:0,behavior:st()})},[e,s]),Q=m(()=>s({...ie,sort:e.sort}),[e.sort,s]),{clear:N}=o,U=m(()=>{N(),I(!0),x(t=>({...t,page:1}))},[N]),ze=m(()=>{N(),I(!1),x(t=>({...t,page:1}))},[N]),T=g?[g.make,g.model,g.year,g.modification].join("|"):"",_=qe(null);Ye(()=>{if(o.restored){if(_.current===null){_.current=T;return}_.current!==T&&(_.current=T,x(t=>t.page===1?t:{...t,page:1}))}},[o.restored,T,x]);const A=Jt({catalog:$,shownKinds:u,vehicle:g,editing:d}),n=i(()=>{if(!o.fit)return A;const t=A.filter(a=>L(a)==="alloy-wheel"),h=new Set(Gt(t,o.fit).map(a=>a.slug));return A.filter(a=>L(a)!=="alloy-wheel"||h.has(le(a)))},[A,o.fit]),w=me.join(","),Le=i(()=>{const t=new Set(w?w.split(","):[]);return dt(n,e,l,c,f).filter(h=>!t.has(h.key))},[n,e,l,w,c.join(","),f]),y=i(()=>mt(n,e,l),[n,e,l]),X=c.length>1,Z=i(()=>ne(f,"alloy-wheel"),[f]),Ie=i(()=>ne(f,"tyre"),[f]),z=i(()=>Nt(y),[y]),O=i(()=>Tt(y),[y]),R=X?V(["alloy-wheel"]).one:null,Oe=i(()=>({kindLabel:R,brand:z,process:O}),[R,z,O]),Re=jt({kind:!!R,brand:z,process:O},Z),Ge=i(()=>K?bt(n,l):null,[n,l,K]),Ve=i(()=>xt(n,e,l),[n,e,l]),Fe=i(()=>ut(n,u,e,l),[n,u.join(","),e,l]),Be=m((t,h)=>{const a=yt(n.flatMap(Ct),e.tyreSizes[0]??"",t,h);s({...e,tyreSizes:a?[a]:[],page:1})},[n,e,s]),Ee=i(()=>{const t=new Set(w?w.split(","):[]);return!St(n,c)||t.has("tyreSizes")?null:ht(n,e,l)},[n,e,l,w,c.join(","),f]),S=i(()=>gt(y,e.page,E),[y,e.page,E]),b=V(c),G=Lt(c),ee=zt(B,ae,c,u),te=c.length===1&&c[0]==="tyre",oe=o.applied?.stock??null,C=i(()=>Ot(oe),[oe]),Ke=i(()=>n.filter(t=>c.includes(L(t))).length,[n,c.join(",")]),re=$.length===0,je=!re&&n.length===0,Me=k&&!d&&!o.applied&&!Ne;return u.length===0?null:p("section",{children:[k&&r(Yt,{cascade:o.cascade,appliedName:o.appliedName,fit:o.fit,fitSummary:te&&C.length>0?`Takes ${C.join(" · ")}`:null,resolving:o.resolving,unresolved:te?!!o.applied&&!o.resolving&&C.length===0:o.unresolved,matchCount:Ke,copy:G,onAmend:ze,onClear:U}),Me&&r(qt,{cascade:o.cascade,heading:ee.heading,intro:ee.intro,ready:o.restored,copy:G,onSkip:()=>I(!0)}),p("div",{className:"px-5 py-10 md:px-[max(2.5rem,calc((100%_-_var(--sf-content-cap,100%))/2_+_2.5rem))]",children:[(v||P)&&p("header",{className:"mb-6",children:[v&&r(Xt,{level:be,className:"font-display text-[clamp(28px,4vw,40px)] [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] leading-[1.05] tracking-[-0.02em]",children:rt(v,!1)}),P&&r("p",{className:"mt-2 max-w-[60ch] text-[15px] text-fg-dim",children:ot(P)})]}),p("div",{className:"flex flex-col gap-8 lg:flex-row lg:items-start",children:[r(Dt,{facets:Le,filters:e,typeOptions:Fe,sizeBoxes:Ee,sizeMatches:e.tyreSizes.length>0?y.length:null,noun:b,priceBounds:Ge,inStockCount:de?Ve:null,onToggle:H,onPickType:J,onPickSize:Be,onPriceMax:Y,onInStockOnly:q,onClearAll:Q}),p("div",{className:"min-w-0 flex-1",children:[r($t,{className:"mb-4",start:p($e,{children:[r(Wt,{total:S.total,range:{from:S.from,to:S.to},noun:b}),r(Vt,{filters:e,onToggle:H,onPriceMax:Y,onInStockOnly:q,onPickType:J})]}),end:r(Ht,{value:e.sort,keys:Pt(u),labels:kt,onChange:_e})}),re?r("div",{className:"border border-dashed border-line p-10",children:r("p",{className:"font-mono text-[12px] uppercase tracking-[0.16em] text-fg-dim",children:d?b.many==="wheels"?F("No wheels in this website's catalog yet — curate products to see them here."):b.many==="tyres"?F("No tyres in this website's catalog yet — curate products to see them here."):F("No products in this website's catalog yet — curate products to see them here."):"Our catalog is being updated. Please check back shortly."})}):je?p("div",{className:"border border-line p-10",children:[p("h3",{className:"font-display text-[22px] font-medium uppercase tracking-[-0.01em]",children:["No confirmed fit for your ",o.appliedName]}),r("p",{className:"mt-2 max-w-[52ch] text-[14px] text-fg-dim",children:G.nothingFits}),p("button",{type:"button",onClick:U,className:"mt-4 cursor-pointer bg-btn px-4 py-3 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-btn-ink hover:bg-fg",children:["Show all ",b.many]})]}):S.total===0?p("div",{className:"border border-line p-10",children:[p("h3",{className:"font-display text-[22px] font-medium uppercase tracking-[-0.01em]",children:["No ",b.many," match those filters"]}),r("p",{className:"mt-2 max-w-[46ch] text-[14px] text-fg-dim",children:"Try widening the price range or clearing a filter."}),ft(e)&&r("button",{type:"button",onClick:Q,className:"mt-4 cursor-pointer bg-btn px-4 py-3 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-btn-ink hover:bg-fg",children:"Clear all filters"})]}):p(Ft,{value:{ownerId:ye,ownerType:"AlloyWheelsListing",Template:Se,hover:we,imageSizes:Pe,fieldUsage:Z,reserveEyebrow:Re,editing:d,eyebrow:Oe,fit:o.fit,colours:e.finishes,setGridGap:`var(${se})`,rules:Kt},children:[r("style",{children:ke}),r("div",{className:`plp-card-grid ${D} ${ct} ${Ue}`,style:{...ve,...pt(`var(${se})`)},children:r(Bt,{items:S.items,isWheel:t=>L(t)!=="tyre",other:t=>r(Rt,{item:t,currency:l,fitSize:C.length>0?It(t.sizes,C):null,kindLabel:X?V(["tyre"]).one:null,showBrand:z,editing:d,fieldUsage:Ie,cardImage:xe},`tyre:${le(t)}`)})})]}),r(Mt,{page:S.page,pageCount:S.pageCount,onPage:Ae}),r(et,{editing:d})]})]})]})]})}export{Vo as PLP_GATE_DEFAULTS,eo as default};
1
+ "use client";import{jsx as r,jsxs as p,Fragment as De}from"react/jsx-runtime";import{useScopeClass as We}from"../../lib/use-scope-class.js";import{useCallback as m,useEffect as $e,useMemo as i,useRef as He,useState as Ye}from"react";import{cardHoverOf as qe}from"efficient-web-builder/format/lib/animation/hover";import{SHARED_ROWS_LIST_CLASS as Je}from"efficient-web-builder/render/lib/content/box-shared-columns";import{NO_FIELD_ANSWERS as Qe,answersForKind as oe}from"../../lib/content/field-usage.js";import{useCurrency as Ue}from"../CurrencyContext.js";import Xe from"../NoCurrencyNote.js";import{usePreviewDevice as Ze}from"efficient-easel/screen/components/PreviewDeviceContext";import{renderGold as et,renderHeadline as tt}from"efficient-web-builder/render/components/goldPhrases";import{useUnifiedProductCatalog as ot}from"../useProductCatalog.js";import{scrollBehavior as rt}from"efficient-web-builder/render/components/useReducedMotion";import{normalizePlpColumns as nt,PLP_GRID_GAP_VAR as re,plpGridVars as st}from"../../lib/wheels/plp-grid.js";import{plpCardImageSizes as it}from"../../lib/sections/card-image-sizes.js";import{CARD_ROWS_GRID_CLASS as lt,cardRowsGridStyle as at}from"../WheelCardFrame.js";import{applyPlpFilters as ct,buildPlpFacets as pt,buildPlpTypeOptions as mt,buildTyreSizeBoxes as dt,EMPTY_PLP_FILTERS as ne,hasActivePlpFilters as ut,paginatePlp as ht,pickTyreSize as ft,plpTyreSizeBoxesShown as gt,plpInStockCount as yt,plpOpeningSort as St,plpPriceBounds as xt,plpShownKinds as wt,plpSortKeysFor as bt,PLP_SORT_LABELS as vt}from"../../lib/wheels/plp-filters.js";import{itemKind as z,itemSlug as Pt,itemTyreSizes as kt,plpBrandVaries as Nt,plpProcessVaries as Ct,plpItemsOfKinds as Tt,plpKindNoun as se,resolvePlpKinds as _t}from"../../lib/catalog/plp-item.js";import{plpGateWords as At,plpVehicleCopy as zt}from"../../lib/catalog/plp-vehicle-copy.js";import{oemBadgeSize as Lt,oemTyreSizes as Ot}from"../../lib/tyres/tyre-vehicle-fitment.js";import{wheelsFittingVehicle as It}from"../../lib/wheels/plp-fitment-match.js";import Rt from"./PlpActiveChips.js";import{GridCardProvider as Ft,GridMixedCards as Gt,gridIndexCss as Vt,LISTING_CARD_RULES as Et}from"../GridCardTemplate.js";import{wheelCardEyebrowShows as Kt}from"../ProductCardEyebrow.js";import jt from"./PlpPagination.js";import Bt from"./PlpSidebar.js";import{PlpResultRange as Mt,PlpToolbar as Dt}from"./PlpToolbar.js";import Wt from"../catalog/SortSelect.js";import $t from"./PlpVehicleBar.js";import Ht from"./PlpVehicleGate.js";import{useVehicleCatalog as Yt}from"./useVehicleCatalog.js";import{useVehicleFit as qt}from"../fitment/useVehicleFit.js";import{usePlpFiltersInUrl as Jt}from"./usePlpFiltersInUrl.js";import{say as G}from"efficient-web-builder/format/lib/editor-words";const Io={heading:"Let's find wheels that fit your car.",intro:"Tell us what you drive and we'll show you every set that bolts straight on — bolt pattern, offset and hub bore checked for you."};function Qt({level:v,className:P,children:k}){return r(v===2?"h2":"h1",{className:P,children:k})}const Ut=qe({},"AlloyWheelsListing");function Xt({heading:v="",intro:P="",askForCar:k=!0,gateHeading:V="",gateIntro:ie="",perPage:E=24,columns:le,defaultSort:ae="recommended",hiddenFacets:ce=[],fieldUsage:f=Qe,showPrice:K=!0,showInStock:pe=!0,kinds:me,products:de,wheels:ue,requestQuery:he,editing:h=!1,ownerId:fe="",template:ge,hover:ye=Ut,titleLevel:Se}){const{currency:a}=Ue(),d=_t(me),j=Ze(),B=nt(le),xe=st(B,h?j:null),we=it(B,h?j:null),M=We("plp"),be=Vt(M),ve=ot(),D=de??ue??ve??[],W=i(()=>Tt(D,d),[D,d.join(",")]),o=qt({editing:h,enabled:k,autoApply:!0}),[Pe,L]=Ye(!1),ke=St(ae,d),g=o.applied?.vehicle??null,[e,x]=Jt({editing:h,openingSort:ke,appliedVehicle:g,vehicleRestored:o.restored,requestQuery:he}),c=wt(d,e.kind),s=m(t=>x(t),[x]),$=m((t,u)=>{const l=e[t],Be=l.map(String).includes(u)?l.filter(Me=>String(Me)!==u):[...l,t==="diameters"?Number(u):u];s({...e,[t]:Be,page:1})},[e,s]),H=m(t=>s({...e,priceMax:t,page:1}),[e,s]),Y=m(t=>s({...e,inStockOnly:t,page:1}),[e,s]),q=m(t=>s({...ne,kind:t,inStockOnly:e.inStockOnly,priceMax:e.priceMax,sort:e.sort}),[e.inStockOnly,e.priceMax,e.sort,s]),Ne=m(t=>s({...e,sort:t,page:1}),[e,s]),Ce=m(t=>{s({...e,page:t}),typeof window<"u"&&window.scrollTo({top:0,behavior:rt()})},[e,s]),J=m(()=>s({...ne,sort:e.sort}),[e.sort,s]),{clear:C}=o,Q=m(()=>{C(),L(!0),x(t=>({...t,page:1}))},[C]),Te=m(()=>{C(),L(!1),x(t=>({...t,page:1}))},[C]),T=g?[g.make,g.model,g.year,g.modification].join("|"):"",_=He(null);$e(()=>{if(o.restored){if(_.current===null){_.current=T;return}_.current!==T&&(_.current=T,x(t=>t.page===1?t:{...t,page:1}))}},[o.restored,T,x]);const A=Yt({catalog:W,shownKinds:d,vehicle:g,editing:h}),n=i(()=>{if(!o.fit)return A;const t=A.filter(l=>z(l)==="alloy-wheel"),u=new Set(It(t,o.fit).map(l=>l.slug));return A.filter(l=>z(l)!=="alloy-wheel"||u.has(Pt(l)))},[A,o.fit]),w=ce.join(","),_e=i(()=>{const t=new Set(w?w.split(","):[]);return pt(n,e,a,c,f).filter(u=>!t.has(u.key))},[n,e,a,w,c.join(","),f]),y=i(()=>ct(n,e,a),[n,e,a]),Ae=c.length>1,U=i(()=>oe(f,"alloy-wheel"),[f]),ze=i(()=>oe(f,"tyre"),[f]),O=i(()=>Nt(y),[y]),I=i(()=>Ct(y),[y]),R=Ae?se(["alloy-wheel"]).one:null,Le=i(()=>({kindLabel:R,brand:O,process:I}),[R,O,I]),Oe=Kt({kind:!!R,brand:O,process:I},U),Ie=i(()=>K?xt(n,a):null,[n,a,K]),Re=i(()=>yt(n,e,a),[n,e,a]),Fe=i(()=>mt(n,d,e,a),[n,d.join(","),e,a]),Ge=m((t,u)=>{const l=ft(n.flatMap(kt),e.tyreSizes[0]??"",t,u);s({...e,tyreSizes:l?[l]:[],page:1})},[n,e,s]),Ve=i(()=>{const t=new Set(w?w.split(","):[]);return!gt(n,c)||t.has("tyreSizes")?null:dt(n,e,a)},[n,e,a,w,c.join(","),f]),S=i(()=>ht(y,e.page,E),[y,e.page,E]),b=se(c),F=zt(c),X=At(V,ie,c,d),Z=c.length===1&&c[0]==="tyre",ee=o.applied?.stock??null,N=i(()=>Ot(ee),[ee]),Ee=i(()=>n.filter(t=>c.includes(z(t))).length,[n,c.join(",")]),te=W.length===0,Ke=!te&&n.length===0,je=k&&!h&&!o.applied&&!Pe;return d.length===0?null:p("section",{children:[k&&r($t,{cascade:o.cascade,appliedName:o.appliedName,fit:o.fit,fitSummary:Z&&N.length>0?`Takes ${N.join(" · ")}`:null,resolving:o.resolving,unresolved:Z?!!o.applied&&!o.resolving&&N.length===0:o.unresolved,matchCount:Ee,copy:F,onAmend:Te,onClear:Q}),je&&r(Ht,{cascade:o.cascade,heading:X.heading,intro:X.intro,ready:o.restored,copy:F,onSkip:()=>L(!0)}),p("div",{className:"px-5 py-10 md:px-[max(2.5rem,calc((100%_-_var(--sf-content-cap,100%))/2_+_2.5rem))]",children:[(v||P)&&p("header",{className:"mb-6",children:[v&&r(Qt,{level:Se,className:"font-display text-[clamp(28px,4vw,40px)] [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] leading-[1.05] tracking-[-0.02em]",children:tt(v,!1)}),P&&r("p",{className:"mt-2 max-w-[60ch] text-[15px] text-fg-dim",children:et(P)})]}),p("div",{className:"flex flex-col gap-8 lg:flex-row lg:items-start",children:[r(Bt,{facets:_e,filters:e,typeOptions:Fe,sizeBoxes:Ve,sizeMatches:e.tyreSizes.length>0?y.length:null,noun:b,priceBounds:Ie,inStockCount:pe?Re:null,onToggle:$,onPickType:q,onPickSize:Ge,onPriceMax:H,onInStockOnly:Y,onClearAll:J}),p("div",{className:"min-w-0 flex-1",children:[r(Dt,{className:"mb-4",start:p(De,{children:[r(Mt,{total:S.total,range:{from:S.from,to:S.to},noun:b}),r(Rt,{filters:e,onToggle:$,onPriceMax:H,onInStockOnly:Y,onPickType:q})]}),end:r(Wt,{value:e.sort,keys:bt(d),labels:vt,onChange:Ne})}),te?r("div",{className:"border border-dashed border-line p-10",children:r("p",{className:"font-mono text-[12px] uppercase tracking-[0.16em] text-fg-dim",children:h?b.many==="wheels"?G("No wheels in this website's catalog yet — curate products to see them here."):b.many==="tyres"?G("No tyres in this website's catalog yet — curate products to see them here."):G("No products in this website's catalog yet — curate products to see them here."):"Our catalog is being updated. Please check back shortly."})}):Ke?p("div",{className:"border border-line p-10",children:[p("h3",{className:"font-display text-[22px] font-medium uppercase tracking-[-0.01em]",children:["No confirmed fit for your ",o.appliedName]}),r("p",{className:"mt-2 max-w-[52ch] text-[14px] text-fg-dim",children:F.nothingFits}),p("button",{type:"button",onClick:Q,className:"mt-4 cursor-pointer bg-btn px-4 py-3 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-btn-ink hover:bg-fg",children:["Show all ",b.many]})]}):S.total===0?p("div",{className:"border border-line p-10",children:[p("h3",{className:"font-display text-[22px] font-medium uppercase tracking-[-0.01em]",children:["No ",b.many," match those filters"]}),r("p",{className:"mt-2 max-w-[46ch] text-[14px] text-fg-dim",children:"Try widening the price range or clearing a filter."}),ut(e)&&r("button",{type:"button",onClick:J,className:"mt-4 cursor-pointer bg-btn px-4 py-3 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-btn-ink hover:bg-fg",children:"Clear all filters"})]}):p(Ft,{value:{ownerId:fe,ownerType:"AlloyWheelsListing",Template:ge,hover:ye,imageSizes:we,fieldUsage:U,tyreFieldUsage:ze,reserveEyebrow:Oe,editing:h,eyebrow:Le,fit:o.fit,colours:e.finishes,setGridGap:`var(${re})`,rules:Et},children:[r("style",{children:be}),r("div",{className:`plp-card-grid ${M} ${lt} ${Je}`,style:{...xe,...at(`var(${re})`)},children:r(Gt,{items:S.items,tyreOf:t=>z(t)==="tyre"?t:null,tyreFit:t=>N.length>0?Lt(t.sizes,N):null})})]}),r(jt,{page:S.page,pageCount:S.pageCount,onPage:Ce}),r(Xe,{editing:h})]})]})]})]})}export{Io as PLP_GATE_DEFAULTS,Xt as default};
@@ -1135,6 +1135,7 @@ export interface components {
1135
1135
  spec: components["schemas"]["WheelSpec"] | null;
1136
1136
  coverImage: string | null;
1137
1137
  defaultFinish?: string | null;
1138
+ rendersHaveAlpha?: boolean;
1138
1139
  defaultFinishRenderings?: string[];
1139
1140
  description: string;
1140
1141
  listable?: boolean;
@@ -0,0 +1,28 @@
1
+ import { type SeededNode } from "efficient-web-builder/format/lib/document/seed-parts";
2
+ type Props = Record<string, unknown>;
3
+ export declare const HERO_OPTION_SLOT = "optionTemplate";
4
+ export declare const HERO_OPTION_SLOT_LABEL = "Option template";
5
+ export declare const HERO_OPTION_FIELDS: readonly [{
6
+ readonly key: "swatch";
7
+ readonly label: "Finish colour";
8
+ readonly kind: "colour";
9
+ }, {
10
+ readonly key: "name";
11
+ readonly label: "Finish name";
12
+ }, {
13
+ readonly key: "label";
14
+ readonly label: "Option";
15
+ }, {
16
+ readonly key: "note";
17
+ readonly label: "Option note";
18
+ }];
19
+ export interface HeroOptionRow {
20
+ swatch?: string;
21
+ name?: string;
22
+ label?: string;
23
+ note?: string;
24
+ }
25
+ export declare const HERO_OPTION_ALLOW: readonly ["Text", "Flex"];
26
+ export declare function heroOptionSeed(nodeId: string): SeededNode[];
27
+ export declare function withHeroOptionTemplate(props: Props): Props;
28
+ export {};
@@ -0,0 +1 @@
1
+ import{BOX_SWATCH_PROP as d}from"efficient-web-builder/format/lib/content/box-background";import{BOX_HIDE_WHEN_ROW_EMPTY as O}from"efficient-web-builder/format/lib/content/card-template";import{BOX_TYPE as t,CONTAINER_BLOCKS_SLOT as i}from"efficient-web-builder/format/lib/document/container-blocks";import{rowFieldTextSeed as r}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{BOX as l,DIM as _,INNER_BOX as p,TEXT as c,boxPadding as a,seedNodes as h,token as T}from"efficient-web-builder/format/lib/document/seed-parts";const m="optionTemplate",b="Option template",f=[{key:"swatch",label:"Finish colour",kind:"colour"},{key:"name",label:"Finish name"},{key:"label",label:"Option"},{key:"note",label:"Option note"}],x=["Text",t],s=(e,o,n={})=>({textStyle:"body-5",...T("label",e),case:"upper",letterSpacing:o,lineHeight:1.5,...n}),w={...l,direction:"row",align:"center",phoneRow:2,sharePhone:"content",wrapPhone:"nowrap"},E=()=>({type:t,props:{...l,direction:"column",name:"Option",...a(12,12),sectionBorder:{width:2}},slots:{[i]:[{type:t,props:{...w,name:"Finish",gap:12,gapPhone:12,[O]:["swatch"]},slots:{[i]:[{type:t,props:{...p,name:"Swatch"},slots:{[i]:[{type:t,props:{...p,name:"Dot",...a(9,9),sectionCorners:10,sectionBorder:{width:1},[d]:"swatch"}}]}},r("name",{...c,tag:"span",minWidth:0},s(12,.18,{weight:700}))]}},{type:t,props:{...p,name:"Words",gap:4,gapPhone:4,...a(0,4),[O]:["label"]},slots:{[i]:[r("label",{...c,tag:"span"},s(14,.18)),r("note",{..._,tag:"span"},s(11,.12))]}}]}});function P(e){return h([E()],(o,n)=>n==="0"?`${e}~option`:`${e}~option.${n.slice(2)}`)}function H(e){if(e[m]!==void 0)return e;const o=typeof e.id=="string"&&e.id.trim()?e.id:"ProductHero";return{...e,[m]:P(o)}}export{x as HERO_OPTION_ALLOW,f as HERO_OPTION_FIELDS,m as HERO_OPTION_SLOT,b as HERO_OPTION_SLOT_LABEL,P as heroOptionSeed,H as withHeroOptionTemplate};
@@ -22,6 +22,18 @@ export declare const PRODUCT_CARD_FIELDS: readonly [{
22
22
  readonly key: "href";
23
23
  readonly label: "Product page";
24
24
  readonly kind: "link";
25
+ }, {
26
+ readonly key: "colour";
27
+ readonly label: "Product colour";
28
+ readonly kind: "colour";
29
+ }, {
30
+ readonly key: "colourVaried";
31
+ readonly label: "Product colour, varied";
32
+ readonly kind: "colour";
33
+ }, {
34
+ readonly key: "colourRandom";
35
+ readonly label: "Random colour";
36
+ readonly kind: "colour";
25
37
  }];
26
38
  export interface ProductCardSeedOptions {
27
39
  legacyWellHonoured?: boolean;
@@ -1 +1 @@
1
- import{BOX_TYPE as s,CONTAINER_BLOCKS_SLOT as u}from"efficient-web-builder/format/lib/document/container-blocks";import{DIM as D,INNER_BOX as C,boxPadding as _,seedNodes as y,token as x}from"efficient-web-builder/format/lib/document/seed-parts";import{CARD_ROW_FIELD_PROP as S}from"efficient-web-builder/format/lib/content/card-template";import{CARDS_BODY_LOOK as w}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{THEME_CARD_IMAGE_BG as E,resolveBoundCardImageBackground as I}from"efficient-web-builder/format/lib/content/card-image-background";import{SHARED_ROWS_KEY as L}from"efficient-web-builder/render/lib/content/box-shared-columns";import{GRID_CARD_SHOW as K,LISTING_CARD_SHOW as b}from"../sections/card-show-defaults.js";const g="ProductPicture",P="ProductSpecs",m="ProductBuy",p="ProductPrice",f="ProductColour",k="ProductSize",h="ProductEyebrow",l="ProductName",J=[g,h,l,P,p,f,k,m],Q=[{key:"name",label:"Name"},{key:"eyebrow",label:"Eyebrow"},{key:"note",label:"Note"},{key:"href",label:"Product page",kind:"link"}],A={...C,gap:0,gapPhone:0,..._(32,32,32,32),[L]:"shared"},R=(e,t="ProductGrid")=>typeof e.id=="string"&&e.id.trim()?e.id:t,a=(e,t)=>typeof e=="boolean"?e:t,U={type:"Text",props:{...D,tag:"p",text:"",[S]:"note",_partStyles:{text:{...w,...x("body",14),lineHeight:1.375}}}};function N(e,t={}){const n=e.dynamic===!0,o={},i=n?t.legacyWellHonoured?e.imageBackground??E:I(e.imageBackground):e.imageBackground;i!==void 0&&(o.imageBackground=i);for(const c of["cardImage","coverIndex","indexBadge","showBadge"])e[c]!==void 0&&(o[c]=e[c]);const d=t.showRest??K,r={price:a(e.showCardPrice,!0),finishes:a(e.showCardFinishes,!0),sizes:a(e.showCardSizes,d.showCardSizes),buy:a(e.showCardBuy,d.showCardBuy),page:a(e.showCardPage,d.showCardPage)},O={...A,name:"Card"};e.outline==="hairline"&&(O.sectionBorder={width:1,style:"solid"});const T=[{type:g,props:o},{type:h},{type:l},{type:P,props:{sizes:r.sizes}},...r.price?[{type:p}]:[],...r.finishes?[{type:f}]:[],...r.buy||r.page?[{type:m,props:{buy:r.buy,page:r.page}}]:[]];return{type:s,props:O,slots:{[u]:T}}}const H={...C,gap:0,gapPhone:0,..._(0,0,0,0)},z={...C,gap:8,gapPhone:8,..._(16,20,16,20)},G={role:"heading",size:18,weight:500,case:"none",letterSpacing:-.015,lineHeight:1.2},B=24;function W(e){const t={frame:"full"};for(const o of["cardImage","showBadge"])e[o]!==void 0&&(t[o]=e[o]);const n={type:s,props:{...z,name:"Copy"},slots:{[u]:[{type:l,props:{fixedHeight:!1,_partStyles:{"@name":G}}},U,{type:p}]}};return{type:s,props:{...H,name:"Card"},slots:{[u]:[{type:g,props:t},n]}}}function V(e){if(e.template!==void 0)return e;const t=R(e);return{...e,gap:e.gap??B,gapPhone:e.gapPhone??B,template:y([W(e)],(n,o)=>`${t}~card-${o}-${n}`)}}function X(e,t={}){const n=R(e,t.section);return y([N(e,t)],(o,i)=>`${n}~card-${i}-${o}`)}function ee(e){return Y(e,{showRest:b,section:"AlloyWheelsListing"})}function Y(e,t={}){return e.template!==void 0?e:{...e,template:X(e,t)}}export{m as PRODUCT_BUY_BLOCK,Q as PRODUCT_CARD_FIELDS,J as PRODUCT_CARD_SLOT_BLOCKS,f as PRODUCT_COLOUR_BLOCK,h as PRODUCT_EYEBROW_BLOCK,l as PRODUCT_NAME_BLOCK,g as PRODUCT_PICTURE_BLOCK,p as PRODUCT_PRICE_BLOCK,k as PRODUCT_SIZE_BLOCK,P as PRODUCT_SPECS_BLOCK,W as kitCardSeed,N as productCardSeed,X as productCardTemplate,V as withKitCardTemplate,ee as withListingCardTemplate,Y as withProductCardTemplate};
1
+ import{BOX_TYPE as s,CONTAINER_BLOCKS_SLOT as u}from"efficient-web-builder/format/lib/document/container-blocks";import{DIM as D,INNER_BOX as l,boxPadding as C,seedNodes as O,token as x}from"efficient-web-builder/format/lib/document/seed-parts";import{CARD_ROW_FIELD_PROP as S}from"efficient-web-builder/format/lib/content/card-template";import{CARDS_BODY_LOOK as k}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{THEME_CARD_IMAGE_BG as w,resolveBoundCardImageBackground as E}from"efficient-web-builder/format/lib/content/card-image-background";import{SHARED_ROWS_KEY as I}from"efficient-web-builder/render/lib/content/box-shared-columns";import{GRID_CARD_SHOW as b,LISTING_CARD_SHOW as L}from"../sections/card-show-defaults.js";const _="ProductPicture",P="ProductSpecs",m="ProductBuy",g="ProductPrice",f="ProductColour",K="ProductSize",R="ProductEyebrow",p="ProductName",q=[_,R,p,P,g,f,K,m],J=[{key:"name",label:"Name"},{key:"eyebrow",label:"Eyebrow"},{key:"note",label:"Note"},{key:"href",label:"Product page",kind:"link"},{key:"colour",label:"Product colour",kind:"colour"},{key:"colourVaried",label:"Product colour, varied",kind:"colour"},{key:"colourRandom",label:"Random colour",kind:"colour"}],A={...l,gap:0,gapPhone:0,...C(32,32,32,32),[I]:"shared"},h=(e,t="ProductGrid")=>typeof e.id=="string"&&e.id.trim()?e.id:t,a=(e,t)=>typeof e=="boolean"?e:t,U={type:"Text",props:{...D,tag:"p",text:"",[S]:"note",_partStyles:{text:{...k,...x("body",14),lineHeight:1.375}}}};function N(e,t={}){const r=e.dynamic===!0,o={},i=r?t.legacyWellHonoured?e.imageBackground??w:E(e.imageBackground):e.imageBackground;i!==void 0&&(o.imageBackground=i);for(const d of["cardImage","coverIndex","indexBadge","showBadge"])e[d]!==void 0&&(o[d]=e[d]);const c=t.showRest??b,n={price:a(e.showCardPrice,!0),finishes:a(e.showCardFinishes,!0),sizes:a(e.showCardSizes,c.showCardSizes),buy:a(e.showCardBuy,c.showCardBuy),page:a(e.showCardPage,c.showCardPage)},y={...A,name:"Card"};e.outline==="hairline"&&(y.sectionBorder={width:1,style:"solid"});const T=[{type:_,props:o},{type:R},{type:p},{type:P,props:{sizes:n.sizes}},...n.price?[{type:g}]:[],...n.finishes?[{type:f}]:[],...n.buy||n.page?[{type:m,props:{buy:n.buy,page:n.page}}]:[]];return{type:s,props:y,slots:{[u]:T}}}const H={...l,gap:0,gapPhone:0,...C(0,0,0,0)},z={...l,gap:8,gapPhone:8,...C(16,20,16,20)},G={role:"heading",size:18,weight:500,case:"none",letterSpacing:-.015,lineHeight:1.2},B=24;function W(e){const t={frame:"full"};for(const o of["cardImage","showBadge"])e[o]!==void 0&&(t[o]=e[o]);const r={type:s,props:{...z,name:"Copy"},slots:{[u]:[{type:p,props:{fixedHeight:!1,_partStyles:{"@name":G}}},U,{type:g}]}};return{type:s,props:{...H,name:"Card"},slots:{[u]:[{type:_,props:t},r]}}}function Q(e){if(e.template!==void 0)return e;const t=h(e);return{...e,gap:e.gap??B,gapPhone:e.gapPhone??B,template:O([W(e)],(r,o)=>`${t}~card-${o}-${r}`)}}function X(e,t={}){const r=h(e,t.section);return O([N(e,t)],(o,i)=>`${r}~card-${i}-${o}`)}function ee(e){return Y(e,{showRest:L,section:"AlloyWheelsListing"})}function Y(e,t={}){return e.template!==void 0?e:{...e,template:X(e,t)}}export{m as PRODUCT_BUY_BLOCK,J as PRODUCT_CARD_FIELDS,q as PRODUCT_CARD_SLOT_BLOCKS,f as PRODUCT_COLOUR_BLOCK,R as PRODUCT_EYEBROW_BLOCK,p as PRODUCT_NAME_BLOCK,_ as PRODUCT_PICTURE_BLOCK,g as PRODUCT_PRICE_BLOCK,K as PRODUCT_SIZE_BLOCK,P as PRODUCT_SPECS_BLOCK,W as kitCardSeed,N as productCardSeed,X as productCardTemplate,Q as withKitCardTemplate,ee as withListingCardTemplate,Y as withProductCardTemplate};
@@ -1 +1 @@
1
- "use client";import{jsx as n}from"react/jsx-runtime";import{withRMark as d}from"efficient-web-builder/render/components/RMark";import c from"../../../../../components/card-pieces/CardEyebrow.js";import{readPartStyles as u}from"efficient-web-builder/render/lib/document/part-styles";import b from"../../../../../components/card-pieces/HostPart.js";import{useProductCardState as f}from"../../../../../components/card-pieces/ProductCardState.js";import{useGridCard as w}from"../../../../../components/GridCardTemplate.js";import{itemBrand as p}from"../../../../catalog/plp-item.js";import{wheelCardEyebrow as y}from"../../../../../components/ProductCardEyebrow.js";import{ProductEyebrowMeta as s}from"./meta.js";function g({region:r}){const o=f(),{fieldUsage:l,reserveEyebrow:a,eyebrow:t}=w(),e=o.kind==="wheel"?o.wheel:null,i=e&&t.brand?p(e):null,m={kindLabel:e?t.kindLabel:null,brand:i?d(i):null,process:e&&t.process&&e.process?d(e.process):null};return n(c,{reserve:a,region:r,children:y(m,l)})}const L={...s,render:r=>{const o=!!r.editor?.isEditing;return n(b,{label:s.label??"",editing:o,children:n(g,{region:{nodeId:typeof r.id=="string"?r.id:void 0,partStyles:u(r),editing:o}})})}};export{L as ProductEyebrowRender};
1
+ "use client";import{jsx as t}from"react/jsx-runtime";import{withRMark as l}from"efficient-web-builder/render/components/RMark";import a from"../../../../../components/card-pieces/CardEyebrow.js";import{readPartStyles as p}from"efficient-web-builder/render/lib/document/part-styles";import y from"../../../../../components/card-pieces/HostPart.js";import{useProductCardState as w}from"../../../../../components/card-pieces/ProductCardState.js";import{useGridCard as g}from"../../../../../components/GridCardTemplate.js";import{itemBrand as h,plpKindNoun as k}from"../../../../catalog/plp-item.js";import{productCardEyebrow as E,wheelCardEyebrow as C}from"../../../../../components/ProductCardEyebrow.js";import{keepForCard as P}from"../../../../content/field-usage.js";import{ProductEyebrowMeta as s}from"./meta.js";function v({region:r}){const e=w(),{fieldUsage:m,tyreFieldUsage:c,reserveEyebrow:d,eyebrow:n}=g();if(e.kind==="tyre"){const b=(n.tyreBrand??n.brand)&&P(c)("brand")&&e.tyre.brand||null,f=n.kindLabel?k(["tyre"]).one:null;return t(a,{reserve:d,region:r,children:E(f,b)})}const o=e.kind==="wheel"?e.wheel:null,i=o&&n.brand?h(o):null,u={kindLabel:o?n.kindLabel:null,brand:i?l(i):null,process:o&&n.process&&o.process?l(o.process):null};return t(a,{reserve:d,region:r,children:C(u,m)})}const I={...s,render:r=>{const e=!!r.editor?.isEditing;return t(y,{label:s.label??"",editing:e,children:t(v,{region:{nodeId:typeof r.id=="string"?r.id:void 0,partStyles:p(r),editing:e}})})}};export{I as ProductEyebrowRender};
@@ -4,6 +4,10 @@ export declare const ProductHeroSlots: {
4
4
  allow: string[];
5
5
  type: "slot";
6
6
  };
7
+ optionTemplate: {
8
+ type: "slot";
9
+ allow: ("Flex" | "Text")[];
10
+ };
7
11
  trustBullets: {
8
12
  type: "slot";
9
13
  allow: string[];
@@ -1 +1 @@
1
- import{DEFAULT_HERO_PRICE_PLACEMENT as e}from"../../../../sections/hero-price-placement.js";import{DEFAULT_HERO_LAYOUT as r,DEFAULT_HERO_RATIO as l,DEFAULT_HERO_TEXT_ALIGN as E}from"../../../../sections/hero-arrangement.js";import{DEFAULT_HERO_GALLERY_MODE as _,DEFAULT_HERO_IMAGE_FIT as L}from"../../../../sections/hero-gallery.js";import{cardTemplateSlot as T}from"efficient-web-builder/format/lib/content/card-template";import{HERO_PRICE_BLOCK as m}from"../../../../content/hero-price-seed.js";import{TRUST_BULLETS_ALLOW as a,TRUST_BULLETS_SLOT as o}from"../../../../sections/hero-trust-bullets.js";const t=T(),i="ProductBuyButton",c={template:{...t,allow:[...t.allow,m,i]},[o]:{type:"slot",allow:a}},U={label:"Product Hero",fields:c,defaultProps:{source:null,pricePlacement:e,showVehicleFitment:!0,heroLayout:r,imageRatio:l,textAlign:E,showSpecTable:!0,showPriceQuote:!0,galleryMode:_,imageFit:L,[o]:[]}};export{U as ProductHeroMeta,c as ProductHeroSlots};
1
+ import{DEFAULT_HERO_PRICE_PLACEMENT as e}from"../../../../sections/hero-price-placement.js";import{DEFAULT_HERO_LAYOUT as r,DEFAULT_HERO_RATIO as _,DEFAULT_HERO_TEXT_ALIGN as l}from"../../../../sections/hero-arrangement.js";import{DEFAULT_HERO_GALLERY_MODE as E,DEFAULT_HERO_IMAGE_FIT as L}from"../../../../sections/hero-gallery.js";import{cardTemplateSlot as T}from"efficient-web-builder/format/lib/content/card-template";import{HERO_PRICE_BLOCK as O}from"../../../../content/hero-price-seed.js";import{HERO_OPTION_ALLOW as m,HERO_OPTION_SLOT as a}from"../../../../content/hero-option-seed.js";import{TRUST_BULLETS_ALLOW as i,TRUST_BULLETS_SLOT as o}from"../../../../sections/hero-trust-bullets.js";const t=T(),R="ProductBuyButton",p={template:{...t,allow:[...t.allow,O,R]},[a]:{type:"slot",allow:[...m]},[o]:{type:"slot",allow:i}},S={label:"Product Hero",fields:p,defaultProps:{source:null,pricePlacement:e,showVehicleFitment:!0,heroLayout:r,imageRatio:_,textAlign:l,showSpecTable:!0,showPriceQuote:!0,galleryMode:E,imageFit:L,[o]:[]}};export{S as ProductHeroMeta,p as ProductHeroSlots};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{SITE_WIDTH_CAP as h}from"efficient-web-builder/format/lib/content/page-width";import{resolveWidth as H}from"efficient-web-builder/format/lib/content/section-width";import L from"../../../../../components/LinkedProductHero.js";import m from"../../../../../components/pdp-dynamic/DynamicProductHero.js";import P from"../../../../../components/SectionNotice.js";import{trustBulletsRow as g,trustBulletsSlot as A}from"../../../../../components/product-hero/trust-bullets.js";import{TRUST_BULLETS_SLOT as R}from"../../../../sections/hero-trust-bullets.js";import{useCurrentProduct as F}from"../../../current-product.js";import{isEditorOnDynamicPage as y}from"efficient-web-builder/format/lib/document/editor-page-context";import{DEFAULT_HERO_PRICE_PLACEMENT as O,parseHeroPricePlacement as w}from"../../../../sections/hero-price-placement.js";import{DEFAULT_HERO_LAYOUT as D,DEFAULT_HERO_RATIO as I,DEFAULT_HERO_TEXT_ALIGN as U,parseHeroLayout as S,parseHeroRatio as p,parseHeroTextAlign as M}from"../../../../sections/hero-arrangement.js";import{DEFAULT_HERO_GALLERY_MODE as k,DEFAULT_HERO_IMAGE_FIT as x,parseHeroGalleryMode as B,parseHeroImageFit as C}from"../../../../sections/hero-gallery.js";import{say as G}from"efficient-web-builder/format/lib/editor-words";import{ProductHeroMeta as N}from"./meta.js";import{HideTaker as V}from"efficient-web-builder/render/components/ViewHideRoot";function b({source:e,editing:t=!1,pricePlacement:i=O,showVehicleFitment:o=!0,heroLayout:l=D,imageRatio:a=I,textAlign:u=U,showSpecTable:c=!0,showPriceQuote:d=!0,galleryMode:f=k,imageFit:s=x,trustBullets:E,nodeId:T,priceTemplate:_}){const n={heroLayout:l,imageRatio:a,textAlign:u,showSpecTable:c,showPriceQuote:d,galleryMode:f,imageFit:s,trustBullets:g(E,t),nodeId:T,priceTemplate:_};return F()||t&&y()?r(m,{editing:t,pricePlacement:i,showVehicleFitment:o,...n}):e?.slug?r(L,{slug:e.slug,kind:e.kind??"wheel",editing:t,pricePlacement:i,showVehicleFitment:o,...n}):t?r(P,{size:"tall",children:G("Pick a product in the panel to fill this hero.")}):r(m,{pricePlacement:i,showVehicleFitment:o,...n})}function j(e,t){return H(e,"full").mode!=="page"?t:r(V,{as:"div",style:{"--sf-content-cap":h},children:t})}const me={...N,render:e=>j(e,r(b,{source:e.source,editing:e.editor?.isEditing,pricePlacement:w(e.pricePlacement),showVehicleFitment:e.showVehicleFitment??!0,heroLayout:S(e.heroLayout),imageRatio:p(e.imageRatio),textAlign:M(e.textAlign),showSpecTable:e.showSpecTable??!0,showPriceQuote:e.showPriceQuote??!0,galleryMode:B(e.galleryMode),imageFit:C(e.imageFit),trustBullets:A(e[R]),nodeId:typeof e.id=="string"?e.id:void 0,priceTemplate:typeof e.template=="function"?e.template:void 0}))};export{me as ProductHeroRender};
1
+ import{jsx as r}from"react/jsx-runtime";import{SITE_WIDTH_CAP as L}from"efficient-web-builder/format/lib/content/page-width";import{resolveWidth as P}from"efficient-web-builder/format/lib/content/section-width";import g from"../../../../../components/LinkedProductHero.js";import m from"../../../../../components/pdp-dynamic/DynamicProductHero.js";import A from"../../../../../components/SectionNotice.js";import{trustBulletsRow as R,trustBulletsSlot as O}from"../../../../../components/product-hero/trust-bullets.js";import{TRUST_BULLETS_SLOT as y}from"../../../../sections/hero-trust-bullets.js";import{HERO_OPTION_SLOT as l}from"../../../../content/hero-option-seed.js";import{useCurrentProduct as F}from"../../../current-product.js";import{isEditorOnDynamicPage as w}from"efficient-web-builder/format/lib/document/editor-page-context";import{DEFAULT_HERO_PRICE_PLACEMENT as D,parseHeroPricePlacement as I}from"../../../../sections/hero-price-placement.js";import{DEFAULT_HERO_LAYOUT as S,DEFAULT_HERO_RATIO as U,DEFAULT_HERO_TEXT_ALIGN as p,parseHeroLayout as M,parseHeroRatio as k,parseHeroTextAlign as x}from"../../../../sections/hero-arrangement.js";import{DEFAULT_HERO_GALLERY_MODE as B,DEFAULT_HERO_IMAGE_FIT as C,parseHeroGalleryMode as G,parseHeroImageFit as N}from"../../../../sections/hero-gallery.js";import{say as V}from"efficient-web-builder/format/lib/editor-words";import{ProductHeroMeta as b}from"./meta.js";import{HideTaker as j}from"efficient-web-builder/render/components/ViewHideRoot";function v({source:e,editing:t=!1,pricePlacement:i=D,showVehicleFitment:o=!0,heroLayout:a=S,imageRatio:u=U,textAlign:c=p,showSpecTable:f=!0,showPriceQuote:d=!0,galleryMode:T=B,imageFit:s=C,trustBullets:E,nodeId:_,priceTemplate:H,optionTemplate:h}){const n={heroLayout:a,imageRatio:u,textAlign:c,showSpecTable:f,showPriceQuote:d,galleryMode:T,imageFit:s,trustBullets:R(E,t),nodeId:_,priceTemplate:H,optionTemplate:h};return F()||t&&w()?r(m,{editing:t,pricePlacement:i,showVehicleFitment:o,...n}):e?.slug?r(g,{slug:e.slug,kind:e.kind??"wheel",editing:t,pricePlacement:i,showVehicleFitment:o,...n}):t?r(A,{size:"tall",children:V("Pick a product in the panel to fill this hero.")}):r(m,{pricePlacement:i,showVehicleFitment:o,...n})}function Q(e,t){return P(e,"full").mode!=="page"?t:r(j,{as:"div",style:{"--sf-content-cap":L},children:t})}const ue={...b,render:e=>Q(e,r(v,{source:e.source,editing:e.editor?.isEditing,pricePlacement:I(e.pricePlacement),showVehicleFitment:e.showVehicleFitment??!0,heroLayout:M(e.heroLayout),imageRatio:k(e.imageRatio),textAlign:x(e.textAlign),showSpecTable:e.showSpecTable??!0,showPriceQuote:e.showPriceQuote??!0,galleryMode:G(e.galleryMode),imageFit:N(e.imageFit),trustBullets:O(e[y]),nodeId:typeof e.id=="string"?e.id:void 0,priceTemplate:typeof e.template=="function"?e.template:void 0,optionTemplate:typeof e[l]=="function"?e[l]:void 0}))};export{ue as ProductHeroRender};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import t from"../../../../../components/card-pieces/CardProductPicture.js";import a from"../../../../../components/card-pieces/HostPart.js";import{ProductPictureMeta as d}from"./meta.js";const n={...d,render:e=>r(a,{label:d.label??"",editing:!!e.editor?.isEditing,children:r(t,{imageBackground:e.imageBackground,cardImage:e.cardImage,coverIndex:e.coverIndex,indexBadge:e.indexBadge,showBadge:e.showBadge,frame:e.frame,setPicture:e.setPicture})})};export{n as ProductPictureRender};
1
+ import{jsx as a}from"react/jsx-runtime";import r from"../../../../../components/card-pieces/CardProductPicture.js";import t from"../../../../../components/card-pieces/HostPart.js";import{ProductPictureMeta as d}from"./meta.js";const n={...d,render:e=>a(t,{label:d.label??"",editing:!!e.editor?.isEditing,children:a(r,{imageBackground:e.imageBackground,cardImage:e.cardImage,coverIndex:e.coverIndex,indexBadge:e.indexBadge,showBadge:e.showBadge,frame:e.frame,setPicture:e.setPicture,swatch:e.swatch,shadow:e.shadow,shadowColor:e.shadowColor})})};export{n as ProductPictureRender};
@@ -1 +1 @@
1
- "use client";import{jsx as r}from"react/jsx-runtime";import o from"../../../../../components/card-pieces/HostPart.js";import{CardSpecFacts as c,CardSpecLine as d}from"../../../../../components/card-pieces/CardSpecs.js";import{useGridCard as n}from"../../../../../components/GridCardTemplate.js";import{ProductSpecsMeta as i}from"./meta.js";function a({sizes:e}){const{fieldUsage:t,fit:s}=n();return r(d,{children:r(c,{sizes:e,fieldUsage:t,car:s})})}const S={...i,render:e=>r(o,{label:i.label??"",editing:!!e.editor?.isEditing,children:r(a,{sizes:e.sizes===!0})})};export{S as ProductSpecsRender};
1
+ "use client";import{jsx as r}from"react/jsx-runtime";import c from"../../../../../components/card-pieces/HostPart.js";import{CardSpecFacts as a,CardSpecLine as n}from"../../../../../components/card-pieces/CardSpecs.js";import{useGridCard as m}from"../../../../../components/GridCardTemplate.js";import{useProductCardState as l}from"../../../../../components/card-pieces/ProductCardState.js";import{ProductSpecsMeta as t}from"./meta.js";function f({sizes:e}){const{fieldUsage:i,tyreFieldUsage:o,fit:s}=m(),d=l().kind==="tyre";return r(n,{children:r(a,{sizes:e,fieldUsage:d?o:i,car:s})})}const x={...t,render:e=>r(c,{label:t.label??"",editing:!!e.editor?.isEditing,children:r(f,{sizes:e.sizes===!0})})};export{x as ProductSpecsRender};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import c from"../../../../../components/BoxHeaderBar.js";import h from"../../../../../components/SectionGroupBody.js";import{chromeOwnWidth as x}from"efficient-web-builder/format/lib/content/section-width";import{SiteHeaderMeta as f}from"./meta.js";const B={...f,render:({sections:i,navTextCase:n,menuRow:d,sticky:a,topTextColor:m,heightPx:p,sectionAccent:s,editor:e,...r})=>{const t=o(h,{place:"header",sections:i,widths:r,navTextCase:n,menuRow:d,editing:e?.isEditing});return e?.isEditing?o(c,{sticky:a,topTextColor:m,heightPx:p,theme:s,bandCapped:x(r).background==="content",children:t}):t}};export{B as SiteHeaderRender};
1
+ import{jsx as i}from"react/jsx-runtime";import h from"../../../../../components/BoxHeaderBar.js";import x from"../../../../../components/SectionGroupBody.js";import{headerBarFromProps as f}from"../../../published-header-bar.js";import{SiteHeaderMeta as g}from"./meta.js";const B={...g,render:({sections:a,navTextCase:n,menuRow:d,sticky:p,topTextColor:m,heightPx:s,sectionAccent:c,editor:r,...t})=>{const o=i(x,{place:"header",sections:a,widths:t,navTextCase:n,menuRow:d,editing:r?.isEditing});if(!r?.isEditing)return o;const e=f({sticky:p,topTextColor:m,heightPx:s,sectionAccent:c,...t});return i(h,{sticky:e.sticky,topTextColor:e.topTextColor,heightPx:e.heightPx,theme:e.theme,bandCapped:e.bandCapped,children:o})}};export{B as SiteHeaderRender};
@@ -1 +1 @@
1
- import{CARD_ROW_FIELD_PROP as h,CARD_ROW_LINK_PROP as g,registerCardTemplates as D}from"efficient-web-builder/format/lib/content/card-template";import{DIM as o,INNER_BOX as a,TEXT as s,boxPadding as d,fillSlot as w,labelLook as N,labelStyle as B,seedNodes as A,token as p}from"efficient-web-builder/format/lib/document/seed-parts";import{BOX_TYPE as i,CONTAINER_BLOCKS_SLOT as n}from"efficient-web-builder/format/lib/document/container-blocks";import{BOX_ROW_IMAGE_PROP as F}from"efficient-web-builder/format/lib/content/box-card-rule";import{POST_CARD_HEIGHT as I}from"efficient-web-builder/format/lib/post-card-layout";import{EVENTS_FEATURED_DARKEN as K,EVENTS_FEATURED_DARKEN_STYLE as P,EVENTS_FEATURED_PLACEMENT as U}from"../content/events-featured-look.js";import{SH_LINK as H}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-row-parts";import{rowFieldTextSeed as l}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{withRelatedTabletColumns as b}from"../sections/product-grid-columns.js";import{bundleColumns as x}from"../sections/bundle-to-grid.js";import{HERO_PRICE_BLOCK as M,withHeroPriceTemplate as V}from"../content/hero-price-seed.js";import{CARD_LIST_TYPE as E}from"efficient-web-builder/format/lib/content/card-template";import{FILTER_OPTIONS_FIELD as v,withFilterChipsTemplate as W,withFilterTemplate as G}from"../content/filter-card-seed.js";import{MENU_LINK_BLOCK as Y,withMenuTemplate as $}from"../content/menu-card-seed.js";import{ARTICLE_BODY_BLOCK as X,withArticleBodyTemplate as j}from"../content/article-body-seed.js";import{PRODUCT_BUY_BLOCK as z,PRODUCT_CARD_FIELDS as q,PRODUCT_COLOUR_BLOCK as Q,PRODUCT_EYEBROW_BLOCK as Z,PRODUCT_NAME_BLOCK as J,PRODUCT_PICTURE_BLOCK as ee,PRODUCT_PRICE_BLOCK as te,PRODUCT_SIZE_BLOCK as le,PRODUCT_SPECS_BLOCK as oe,productCardSeed as ae,withKitCardTemplate as m,withListingCardTemplate as ie,withProductCardTemplate as T}from"../content/product-card-seed.js";const u="tags",r=N(12),O={textStyle:"heading-3",...p("headingSmall",20),weight:500,lineHeight:1.2,letterSpacing:-.02},C={textStyle:"body-1",...p("body",14),lineHeight:1.55},ne={...O,...p("headingSmall",30)},re={sectionPaddingTop:24,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,sectionPaddingTopPhone:24,sectionPaddingRightPhone:28,sectionPaddingBottomPhone:32,sectionPaddingLeftPhone:28},se=I.fallback,de=480,ce=70,pe=()=>({type:i,props:{...a,name:"Featured",[F]:"cover",darken:K,darkenStyle:P,darkenPhone:ce,darkenStylePhone:P,placement:U,direction:"column",gap:8,gapPhone:8,...d(32,32,20,20),sectionHeightMode:"fixed",sectionHeightValue:se,sectionHeightUnit:"px",sectionHeightModePhone:"fixed",sectionHeightValuePhone:de,sectionHeightUnitPhone:"px",[g]:"href"},slots:{[n]:[l("meta",{...s,tag:"p"},r,!0),l("title",{...s,tag:"h3",widthFit:"fill"},ne),l("excerpt",{...o,tag:"p",widthFit:"fill",maxWidth:384},C),l("dateLabel",{...o,tag:"p"},{...r,color:"muted"})]}}),be=()=>({type:i,props:{...a,name:"Post",gap:0,gapPhone:0,...d(0,0,0,0),...w("surface"),shadow:!0},slots:{[n]:[{type:"ImageBlock",props:{[h]:"cover",aspect:"16/10",contained:!1}},{type:i,props:{...a,name:"Words",gap:12,gapPhone:12,...re},slots:{[n]:[{type:i,props:{...a,name:"Meta",direction:"row",wrap:!0,share:"content",sharePhone:"content",phoneRow:2,gap:12,gapPhone:12,...d(0,0,0,0)},slots:{[n]:[l("meta",{...s,tag:"p"},r,!0),l("dateLabel",{...o,tag:"p"},{...r,color:"muted"},!0)]}},l("title",{...s,tag:"h3",widthFit:"fill"},O),l("excerpt",{...o,tag:"p",widthFit:"fill"},C),{type:E,props:{[h]:u},slots:{template:[{type:i,props:{...a,name:"Chip",...d(4,8,4,8),sectionBorder:{width:1}},slots:{[n]:[l("label",{...o,tag:"p"},r)]}}]}},{type:"ButtonBlock",props:{variant:"ghost",label:"Read more",href:"",[g]:"href",...H,icon:"arrow-right",iconPosition:"after",_partStyles:{label:B(12)}}}]}}]}}),Ee=()=>[pe(),be()];function me(e){if(e.template!==void 0)return e;const t=typeof e.id=="string"&&e.id.trim()?e.id:"Events",L=["featured","post"];return{...e,template:A(Ee(),(he,S)=>{const[_,...k]=S.split("."),y=L[Number(_)]??`card${_}`;return k.length?`${t}~${y}.${k.join(".")}`:`${t}~${y}`})}}const Te={fields:[{key:"cover",label:"Cover",kind:"image",alt:"title"},{key:"meta",label:"Eyebrow"},{key:"dateLabel",label:"Date"},{key:"title",label:"Title"},{key:"excerpt",label:"Excerpt",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:u,label:"Tags",kind:"list",fields:[{key:"label",label:"Tag"}]}],blocks:[{type:E,label:"Card list"}],seedOnInsert:me},_e=["showCardPrice","showCardFinishes","showCardSizes","showCardBuy","showCardPage"],ke=e=>Object.fromEntries(Object.entries(e).filter(([t])=>!_e.includes(t))),R={fields:[{key:"label",label:"Label"},{key:"href",label:"Link",kind:"link"}],blocks:[{type:Y,label:"Menu link"}],seed:$},f=e=>e.dynamic===!0&&e.relationship==="bundles",Ke=(e={})=>ae(e),c={fields:q,blocks:[{type:ee,label:"Picture"},{type:Z,label:"Eyebrow"},{type:J,label:"Name"},{type:oe,label:"Specs"},{type:te,label:"Price"},{type:Q,label:"Colour"},{type:le,label:"Size"},{type:z,label:"Buy"}],seed:e=>{if(e.dynamic!==!0)return T(e);const t=b(e);return f(e)?m(t):T(t)}},ye=[{block:"Reviews",fields:[{key:"quote",label:"Quote"},{key:"title",label:"Title"},{key:"name",label:"Name"},{key:"role",label:"Role · location"},{key:"rating",label:"Rating"},{key:"dateLabel",label:"Date"}],blocks:[{type:"RatingBlock",label:"Rating"}]},{block:"SpecTable",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]},{block:"DetailRows",fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"}]},{block:"FooterMenu",...R},{block:"MenuBlock",...R},{block:"ProductGrid",...c},{block:"AlloyWheelsListing",...c,seed:ie},{block:"RelatedProducts",...c,seed:e=>{const t=b({...ke(e),dynamic:!0});return f(t)?m(t):T(t,{legacyWellHonoured:!0})}},{block:"BundleOffer",...c,seed:e=>m(b({...e,columns:x(e),dynamic:!0}))},{block:"ProductHero",fields:[],blocks:[{type:M,label:"Price"}],seed:V},{block:"FilterBlock",fields:[{key:"label",label:"Filter name"},{key:v,label:"Options",kind:"list",fields:[{key:"label",label:"Option"},{key:"count",label:"Count"}]}],blocks:[{type:E,label:"Card list"}],seed:G},{block:"FilterChipsBlock",fields:[{key:"label",label:"Pick"},{key:"mark",label:"Remove mark"}],seed:W},{block:X,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:j},{block:"Events",...Te}];D(ye);export{ye as STOREFRONT_CARD_TEMPLATES,f as drawsKits,Ee as eventsCardSeeds,Ke as productGridCardSeed,me as withEventsTemplate};
1
+ import{CARD_ROW_FIELD_PROP as h,CARD_ROW_LINK_PROP as O,registerCardTemplates as D}from"efficient-web-builder/format/lib/content/card-template";import{DIM as o,INNER_BOX as a,TEXT as s,boxPadding as d,fillSlot as N,labelLook as w,labelStyle as B,seedNodes as A,token as E}from"efficient-web-builder/format/lib/document/seed-parts";import{BOX_TYPE as i,CONTAINER_BLOCKS_SLOT as n}from"efficient-web-builder/format/lib/document/container-blocks";import{BOX_ROW_IMAGE_PROP as I}from"efficient-web-builder/format/lib/content/box-card-rule";import{POST_CARD_HEIGHT as F}from"efficient-web-builder/format/lib/post-card-layout";import{EVENTS_FEATURED_DARKEN as H,EVENTS_FEATURED_DARKEN_STYLE as P,EVENTS_FEATURED_PLACEMENT as K}from"../content/events-featured-look.js";import{SH_LINK as U}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-row-parts";import{rowFieldTextSeed as l}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{withRelatedTabletColumns as p}from"../sections/product-grid-columns.js";import{bundleColumns as M}from"../sections/bundle-to-grid.js";import{HERO_PRICE_BLOCK as x,withHeroPriceTemplate as V}from"../content/hero-price-seed.js";import{HERO_OPTION_FIELDS as v,HERO_OPTION_SLOT as W,HERO_OPTION_SLOT_LABEL as G,withHeroOptionTemplate as Y}from"../content/hero-option-seed.js";import{CARD_LIST_TYPE as b,CARD_TEMPLATE_SLOT as $}from"efficient-web-builder/format/lib/content/card-template";import{FILTER_OPTIONS_FIELD as X,withFilterChipsTemplate as j,withFilterTemplate as z}from"../content/filter-card-seed.js";import{MENU_LINK_BLOCK as q,withMenuTemplate as Q}from"../content/menu-card-seed.js";import{ARTICLE_BODY_BLOCK as Z,withArticleBodyTemplate as J}from"../content/article-body-seed.js";import{PRODUCT_BUY_BLOCK as ee,PRODUCT_CARD_FIELDS as te,PRODUCT_COLOUR_BLOCK as le,PRODUCT_EYEBROW_BLOCK as oe,PRODUCT_NAME_BLOCK as ae,PRODUCT_PICTURE_BLOCK as ie,PRODUCT_PRICE_BLOCK as ne,PRODUCT_SIZE_BLOCK as re,PRODUCT_SPECS_BLOCK as se,productCardSeed as de,withKitCardTemplate as m,withListingCardTemplate as ce,withProductCardTemplate as T}from"../content/product-card-seed.js";const g="tags",r=w(12),u={textStyle:"heading-3",...E("headingSmall",20),weight:500,lineHeight:1.2,letterSpacing:-.02},R={textStyle:"body-1",...E("body",14),lineHeight:1.55},Ee={...u,...E("headingSmall",30)},pe={sectionPaddingTop:24,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,sectionPaddingTopPhone:24,sectionPaddingRightPhone:28,sectionPaddingBottomPhone:32,sectionPaddingLeftPhone:28},be=F.fallback,me=480,Te=70,_e=()=>({type:i,props:{...a,name:"Featured",[I]:"cover",darken:H,darkenStyle:P,darkenPhone:Te,darkenStylePhone:P,placement:K,direction:"column",gap:8,gapPhone:8,...d(32,32,20,20),sectionHeightMode:"fixed",sectionHeightValue:be,sectionHeightUnit:"px",sectionHeightModePhone:"fixed",sectionHeightValuePhone:me,sectionHeightUnitPhone:"px",[O]:"href"},slots:{[n]:[l("meta",{...s,tag:"p"},r,!0),l("title",{...s,tag:"h3",widthFit:"fill"},Ee),l("excerpt",{...o,tag:"p",widthFit:"fill",maxWidth:384},R),l("dateLabel",{...o,tag:"p"},{...r,color:"muted"})]}}),ke=()=>({type:i,props:{...a,name:"Post",gap:0,gapPhone:0,...d(0,0,0,0),...N("surface"),shadow:!0},slots:{[n]:[{type:"ImageBlock",props:{[h]:"cover",aspect:"16/10",contained:!1}},{type:i,props:{...a,name:"Words",gap:12,gapPhone:12,...pe},slots:{[n]:[{type:i,props:{...a,name:"Meta",direction:"row",wrap:!0,share:"content",sharePhone:"content",phoneRow:2,gap:12,gapPhone:12,...d(0,0,0,0)},slots:{[n]:[l("meta",{...s,tag:"p"},r,!0),l("dateLabel",{...o,tag:"p"},{...r,color:"muted"},!0)]}},l("title",{...s,tag:"h3",widthFit:"fill"},u),l("excerpt",{...o,tag:"p",widthFit:"fill"},R),{type:b,props:{[h]:g},slots:{template:[{type:i,props:{...a,name:"Chip",...d(4,8,4,8),sectionBorder:{width:1}},slots:{[n]:[l("label",{...o,tag:"p"},r)]}}]}},{type:"ButtonBlock",props:{variant:"ghost",label:"Read more",href:"",[O]:"href",...U,icon:"arrow-right",iconPosition:"after",_partStyles:{label:B(12)}}}]}}]}}),ye=()=>[_e(),ke()];function he(e){if(e.template!==void 0)return e;const t=typeof e.id=="string"&&e.id.trim()?e.id:"Events",f=["featured","post"];return{...e,template:A(ye(),(Re,S)=>{const[_,...k]=S.split("."),y=f[Number(_)]??`card${_}`;return k.length?`${t}~${y}.${k.join(".")}`:`${t}~${y}`})}}const Oe={fields:[{key:"cover",label:"Cover",kind:"image",alt:"title"},{key:"meta",label:"Eyebrow"},{key:"dateLabel",label:"Date"},{key:"title",label:"Title"},{key:"excerpt",label:"Excerpt",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:g,label:"Tags",kind:"list",fields:[{key:"label",label:"Tag"}]}],blocks:[{type:b,label:"Card list"}],seedOnInsert:he},Pe=["showCardPrice","showCardFinishes","showCardSizes","showCardBuy","showCardPage"],ge=e=>Object.fromEntries(Object.entries(e).filter(([t])=>!Pe.includes(t))),C={fields:[{key:"label",label:"Label"},{key:"href",label:"Link",kind:"link"}],blocks:[{type:q,label:"Menu link"}],seed:Q},L=e=>e.dynamic===!0&&e.relationship==="bundles",ve=(e={})=>de(e),c={fields:te,blocks:[{type:ie,label:"Picture"},{type:oe,label:"Eyebrow"},{type:ae,label:"Name"},{type:se,label:"Specs"},{type:ne,label:"Price"},{type:le,label:"Colour"},{type:re,label:"Size"},{type:ee,label:"Buy"}],seed:e=>{if(e.dynamic!==!0)return T(e);const t=p(e);return L(e)?m(t):T(t)}},ue=[{block:"Reviews",fields:[{key:"quote",label:"Quote"},{key:"title",label:"Title"},{key:"name",label:"Name"},{key:"role",label:"Role · location"},{key:"rating",label:"Rating"},{key:"dateLabel",label:"Date"}],blocks:[{type:"RatingBlock",label:"Rating"}]},{block:"SpecTable",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]},{block:"DetailRows",fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"}]},{block:"FooterMenu",...C},{block:"MenuBlock",...C},{block:"ProductGrid",...c},{block:"AlloyWheelsListing",...c,seed:ce},{block:"RelatedProducts",...c,seed:e=>{const t=p({...ge(e),dynamic:!0});return L(t)?m(t):T(t,{legacyWellHonoured:!0})}},{block:"BundleOffer",...c,seed:e=>m(p({...e,columns:M(e),dynamic:!0}))},{block:"ProductHero",slots:[{slot:$},{slot:W,label:G}],fields:v,blocks:[{type:x,label:"Price"}],seed:e=>Y(V(e))},{block:"FilterBlock",fields:[{key:"label",label:"Filter name"},{key:X,label:"Options",kind:"list",fields:[{key:"label",label:"Option"},{key:"count",label:"Count"}]}],blocks:[{type:b,label:"Card list"}],seed:z},{block:"FilterChipsBlock",fields:[{key:"label",label:"Pick"},{key:"mark",label:"Remove mark"}],seed:j},{block:Z,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:J},{block:"Events",...Oe}];D(ue);export{ue as STOREFRONT_CARD_TEMPLATES,L as drawsKits,ye as eventsCardSeeds,ve as productGridCardSeed,he as withEventsTemplate};
@@ -0,0 +1,10 @@
1
+ import type { Data } from "efficient-easel/blocks";
2
+ export type HeaderBarSettings = {
3
+ readonly sticky: unknown;
4
+ readonly topTextColor: unknown;
5
+ readonly heightPx: unknown;
6
+ readonly theme: unknown;
7
+ readonly bandCapped: boolean;
8
+ };
9
+ export declare function headerBarFromProps(props: Readonly<Record<string, unknown>>): HeaderBarSettings;
10
+ export declare function headerBarOf(data: Data): HeaderBarSettings;
@@ -0,0 +1 @@
1
+ import{chromeOwnWidth as e}from"efficient-web-builder/format/lib/content/section-width";function o(t){return{sticky:t.sticky,topTextColor:t.topTextColor,heightPx:t.heightPx,theme:t.sectionAccent,bandCapped:e(t).background==="content"}}function r(t){return o(t.content[0]?.props??{})}export{o as headerBarFromProps,r as headerBarOf};
@@ -1 +1 @@
1
- import{SECTION_BOX_SLOT as f,SECTION_BOX_TYPE as O,convertTheme as C,headParts as _,registerSectionToBox as H}from"efficient-web-builder/render/lib/sections/section-to-box";import{BUTTON as I,DIM as a,DROP_COMMON as s,DROP_SIDE_PADDING as c,FOLLOW_THE_BOX as W,INNER_BOX as p,SAME_KEYS as E,SECTION_BOX as g,SH_LINK as D,TEXT as r,bandPage as R,smallText as m,wrapperPad as y,wrapperPadKeys as S}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-row-parts";import{boxPadding as F,token as o}from"efficient-web-builder/format/lib/document/seed-parts";import{surfacePresetIndex as K}from"efficient-web-builder/format/lib/theme";import{CARD_ROW_FIELD_PROP as L}from"efficient-web-builder/format/lib/content/card-template";import{phoneKey as b}from"efficient-easel/draw";import{REVIEWS_BAND_OWN as M}from"./section-to-box-rows-reviews.js";import{rowFieldTextSeed as d}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";const w=(e,t)=>{const n=C(t)?.themes,i=n?K(n,R(e,t)):-1;return i>=0?i:e},l=e=>[...E.filter(t=>t!=="sectionAccent"),["sectionAccent","sectionAccent",(t,n,i)=>w(t,i)],...S(e)],x=(e,t,n)=>(i,N)=>({...g,sectionAccent:w(i.sectionAccent??0,N),direction:"column",gap:t,gapPhone:n,sectionBorder:{top:1},...y(i,e)}),P=(e,t,n)=>({kind:"text",key:e,role:"heading",props:r,style:{textStyle:"heading-2",...o("headingMedium",44,32),weight:500,case:"upper",lineHeight:t,letterSpacing:n}}),u=(e,t,n={})=>({kind:"group",name:"Heading",props:{...p,gap:e,gapPhone:e,...n},parts:t}),k=(e={})=>({kind:"core",keep:"rest",props:W,...e}),h=M,[X]=_("ReviewForm"),G=()=>({name:"Review Form",boxProps:x(h,48,32),box:l(h),parts:[u(16,[{...X,props:r},P("title",1,-.02)]),k()],pressKeepsEmpty:["eyebrow","title"],drop:{...s,...c,headPlacement:"the head is the Text blocks above the form, which is always own-box here"}}),[V]=_("Reviews"),T=e=>({textStyle:"body-5",...o("label",12),case:"upper",letterSpacing:e}),j={type:O,props:{...p,name:"Card",gap:16,...F(40,40,32,32),sectionAccent:0},slots:{[f]:[{type:"RatingBlock",props:{[L]:"rating"}},d("title",r,{textStyle:"heading-1",...o("body",19),weight:500,case:"upper",lineHeight:1.2,letterSpacing:-.01}),d("quote",a,{textStyle:"body-1",...o("body",15),lineHeight:1.65}),{type:O,props:{...p,name:"Byline",direction:"row",justify:"between",align:"start",share:"content",phoneRow:2,[b("share")]:"content",gap:16,sectionPaddingTop:20,sectionPaddingTopPhone:20,sectionBorder:{top:1}},slots:{[f]:[d("name",r,T(.22)),d("dateLabel",{...a,align:"right"},{...T(.18),align:"right"}),d("role",{...a,align:"right"},{...T(.18),align:"right"})]}}]}},Y=()=>({name:"Reviews",boxProps:x(h,48,32),box:l(h),parts:[u(16,[{...V,props:r},P("title",1,-.02)]),k({slots:{template:[j]}})],pressKeepsEmpty:["eyebrow","title"],drop:{...s,...c,eyebrowLook:"the eyebrow Text wears the plain eyebrow's start look (Reviews' default); a stored `filled` look needs a filled Text look",headPlacement:"the head is the Text blocks above the reviews, which are always own-box here"}}),B={top:88,bottom:88,topTablet:88,bottomTablet:88,topPhone:64,bottomPhone:64},q=()=>({name:"Booking Form",boxProps:x(B,40,40),box:l(B),parts:[u(16,[m("eyebrow",{...o("label",12),weight:600,letterSpacing:.24,color:"accent"}),P("heading",.98,-.025),{kind:"text",key:"intro",props:{...a,maxWidth:660},style:{textStyle:"heading-1",...o("body",17),weight:400,case:"none",lineHeight:1.65,color:"muted"}}],{maxWidth:760}),k()],pressKeepsEmpty:["eyebrow","heading","intro"],drop:{...s,...c}}),A={top:88,bottom:88,topPhone:64,bottomPhone:64},U=()=>({name:"Ready-to-Order Banner",boxProps:e=>({...g,direction:"column",align:"center",gap:20,gapPhone:20,...y(e,A)}),box:[...E,...S(A)],parts:[{...m("eyebrow"),props:{...r,align:"center"}},{kind:"text",key:"title",role:"heading",props:{...r,align:"center",maxWidth:720},style:{textStyle:"heading-1",...o("headingMedium",44,30),weight:500,case:"none",lineHeight:1.05,letterSpacing:-.03,align:"center"}},{kind:"text",key:"body",props:{...r,align:"center",maxWidth:560},style:{textStyle:"body-1",...o("body",16),lineHeight:1.6,align:"center"}},{kind:"group",name:"Buttons",props:{...p,direction:"row",align:"center",justify:"center",share:"content",phoneRow:2,[b("share")]:"content",gap:24,gapPhone:24,sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:e=>({...I,align:"center",href:typeof e.ctaHref=="string"&&e.ctaHref?e.ctaHref:"/checkout"})},{kind:"button",key:"secondaryText",href:"secondaryHref",variant:"ghost",props:{...D,align:"center",icon:"none"},style:{...o("label",13),case:"upper",letterSpacing:.2,color:"muted"}}]}],pressKeepsEmpty:["eyebrow","title","body"],drop:{...s,...c}}),v={top:60,bottom:0,topPhone:60,bottomPhone:0},z=()=>({name:"Contact Form",boxProps:(e,t)=>({...g,sectionAccent:w(e.sectionAccent??0,t),direction:"column",gap:0,gapPhone:0,...y(e,v)}),box:l(v),parts:[{kind:"group",name:"Header",props:{...p,direction:"row",align:"center",share:"content",phoneRow:2,[b("share")]:"content",gap:24,gapPhone:24,sectionPaddingBottom:24,sectionPaddingBottomPhone:24,sectionBorder:{bottom:1}},parts:[m("routingNumber"),{kind:"text",key:"routingTagline",props:a,style:{textStyle:"heading-1",...o("body",14),weight:400,case:"upper",letterSpacing:.04,color:"muted"}}]},{kind:"core",keep:"rest",derive:{reads:["sectionAccent"],props:(e,t)=>({sectionAccent:R(e.sectionAccent??0,t)})}}],drop:{...s,...c}});H({ContactRouting:z(),ReviewForm:G(),AppointmentBooking:q(),Reviews:Y(),CheckoutCTA:U()});
1
+ import{SECTION_BOX_SLOT as O,SECTION_BOX_TYPE as f,headParts as _,registerSectionToBox as v}from"efficient-web-builder/render/lib/sections/section-to-box";import{BUTTON as C,DIM as i,DROP_COMMON as a,DROP_SIDE_PADDING as s,FOLLOW_THE_BOX as H,INNER_BOX as c,SAME_KEYS as E,SECTION_BOX as h,SH_LINK as W,TEXT as n,bandPage as I,smallText as m,surfaceAccent as y,wrapperPad as b,wrapperPadKeys as R}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-row-parts";import{boxPadding as D,token as o}from"efficient-web-builder/format/lib/document/seed-parts";import{CARD_ROW_FIELD_PROP as F}from"efficient-web-builder/format/lib/content/card-template";import{phoneKey as w}from"efficient-easel/draw";import{REVIEWS_BAND_OWN as K}from"./section-to-box-rows-reviews.js";import{rowFieldTextSeed as p}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";const l=e=>[...E.filter(t=>t!=="sectionAccent"),["sectionAccent","sectionAccent",(t,r,d)=>y(t,d)],...R(e)],x=(e,t,r)=>(d,N)=>({...h,sectionAccent:y(d.sectionAccent??0,N),direction:"column",gap:t,gapPhone:r,sectionBorder:{top:1},...b(d,e)}),P=(e,t,r)=>({kind:"text",key:e,role:"heading",props:n,style:{textStyle:"heading-2",...o("headingMedium",44,32),weight:500,case:"upper",lineHeight:t,letterSpacing:r}}),u=(e,t,r={})=>({kind:"group",name:"Heading",props:{...c,gap:e,gapPhone:e,...r},parts:t}),k=(e={})=>({kind:"core",keep:"rest",props:H,...e}),g=K,[L]=_("ReviewForm"),M=()=>({name:"Review Form",boxProps:x(g,48,32),box:l(g),parts:[u(16,[{...L,props:n},P("title",1,-.02)]),k()],pressKeepsEmpty:["eyebrow","title"],drop:{...a,...s,headPlacement:"the head is the Text blocks above the form, which is always own-box here"}}),[X]=_("Reviews"),T=e=>({textStyle:"body-5",...o("label",12),case:"upper",letterSpacing:e}),G={type:f,props:{...c,name:"Card",gap:16,...D(40,40,32,32),sectionAccent:0},slots:{[O]:[{type:"RatingBlock",props:{[F]:"rating"}},p("title",n,{textStyle:"heading-1",...o("body",19),weight:500,case:"upper",lineHeight:1.2,letterSpacing:-.01}),p("quote",i,{textStyle:"body-1",...o("body",15),lineHeight:1.65}),{type:f,props:{...c,name:"Byline",direction:"row",justify:"between",align:"start",share:"content",phoneRow:2,[w("share")]:"content",gap:16,sectionPaddingTop:20,sectionPaddingTopPhone:20,sectionBorder:{top:1}},slots:{[O]:[p("name",n,T(.22)),p("dateLabel",{...i,align:"right"},{...T(.18),align:"right"}),p("role",{...i,align:"right"},{...T(.18),align:"right"})]}}]}},V=()=>({name:"Reviews",boxProps:x(g,48,32),box:l(g),parts:[u(16,[{...X,props:n},P("title",1,-.02)]),k({slots:{template:[G]}})],pressKeepsEmpty:["eyebrow","title"],drop:{...a,...s,eyebrowLook:"the eyebrow Text wears the plain eyebrow's start look (Reviews' default); a stored `filled` look needs a filled Text look",headPlacement:"the head is the Text blocks above the reviews, which are always own-box here"}}),S={top:88,bottom:88,topTablet:88,bottomTablet:88,topPhone:64,bottomPhone:64},j=()=>({name:"Booking Form",boxProps:x(S,40,40),box:l(S),parts:[u(16,[m("eyebrow",{...o("label",12),weight:600,letterSpacing:.24,color:"accent"}),P("heading",.98,-.025),{kind:"text",key:"intro",props:{...i,maxWidth:660},style:{textStyle:"heading-1",...o("body",17),weight:400,case:"none",lineHeight:1.65,color:"muted"}}],{maxWidth:760}),k()],pressKeepsEmpty:["eyebrow","heading","intro"],drop:{...a,...s}}),B={top:88,bottom:88,topPhone:64,bottomPhone:64},Y=()=>({name:"Ready-to-Order Banner",boxProps:e=>({...h,direction:"column",align:"center",gap:20,gapPhone:20,...b(e,B)}),box:[...E,...R(B)],parts:[{...m("eyebrow"),props:{...n,align:"center"}},{kind:"text",key:"title",role:"heading",props:{...n,align:"center",maxWidth:720},style:{textStyle:"heading-1",...o("headingMedium",44,30),weight:500,case:"none",lineHeight:1.05,letterSpacing:-.03,align:"center"}},{kind:"text",key:"body",props:{...n,align:"center",maxWidth:560},style:{textStyle:"body-1",...o("body",16),lineHeight:1.6,align:"center"}},{kind:"group",name:"Buttons",props:{...c,direction:"row",align:"center",justify:"center",share:"content",phoneRow:2,[w("share")]:"content",gap:24,gapPhone:24,sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:e=>({...C,align:"center",href:typeof e.ctaHref=="string"&&e.ctaHref?e.ctaHref:"/checkout"})},{kind:"button",key:"secondaryText",href:"secondaryHref",variant:"ghost",props:{...W,align:"center",icon:"none"},style:{...o("label",13),case:"upper",letterSpacing:.2,color:"muted"}}]}],pressKeepsEmpty:["eyebrow","title","body"],drop:{...a,...s}}),A={top:60,bottom:0,topPhone:60,bottomPhone:0},q=()=>({name:"Contact Form",boxProps:(e,t)=>({...h,sectionAccent:y(e.sectionAccent??0,t),direction:"column",gap:0,gapPhone:0,...b(e,A)}),box:l(A),parts:[{kind:"group",name:"Header",props:{...c,direction:"row",align:"center",share:"content",phoneRow:2,[w("share")]:"content",gap:24,gapPhone:24,sectionPaddingBottom:24,sectionPaddingBottomPhone:24,sectionBorder:{bottom:1}},parts:[m("routingNumber"),{kind:"text",key:"routingTagline",props:i,style:{textStyle:"heading-1",...o("body",14),weight:400,case:"upper",letterSpacing:.04,color:"muted"}}]},{kind:"core",keep:"rest",derive:{reads:["sectionAccent"],props:(e,t)=>({sectionAccent:I(e.sectionAccent??0,t)})}}],drop:{...a,...s}});v({ContactRouting:q(),ReviewForm:M(),AppointmentBooking:j(),Reviews:V(),CheckoutCTA:Y()});
@@ -1 +1 @@
1
- import{accentInk as n,contrastRatio as o}from"efficient-web-builder/format/lib/theme";function u(r){const t=(r??"").trim();return o(t,"#000000")===null?null:n(t)==="#000000"}export{u as surfaceIsLight};
1
+ import{contrastRatio as o,fillIsDark as n}from"efficient-web-builder/format/lib/theme";function l(t){const r=(t??"").trim();return o(r,"#000000")===null?null:!n(r)}export{l as surfaceIsLight};
@@ -0,0 +1,9 @@
1
+ export declare const CARD_TONES: {
2
+ readonly light: readonly ["#dcdde0", "#e2e0db", "#d7dadd", "#dddbd8"];
3
+ readonly dark: readonly ["#35373b", "#3a3b38", "#33363b", "#3b393b"];
4
+ };
5
+ export declare const CARD_RANDOM_COLOURS: readonly ["#ccd5df", "#e2dace", "#d2dbd1", "#dbd3df"];
6
+ export declare function cardHash(key: string): number;
7
+ export declare function productTone(colour: unknown): string;
8
+ export declare function productToneVaried(colour: unknown, key: string): string;
9
+ export declare function randomCardColour(key: string): string;
@@ -0,0 +1 @@
1
+ import{hexToRgb as l,parseHexColor as c}from"efficient-shell/format";import{fillIsDark as u}from"efficient-web-builder/format/lib/theme";const d={light:["#dcdde0","#e2e0db","#d7dadd","#dddbd8"],dark:["#35373b","#3a3b38","#33363b","#3b393b"]},e=["#ccd5df","#e2dace","#d2dbd1","#dbd3df"];function o(t){let r=2166136261;for(let n=0;n<t.length;n++)r^=t.charCodeAt(n),r=Math.imul(r,16777619)>>>0;return r}const a=t=>typeof t=="string"&&l(t.trim())!==null?c(t):null;function i(t){const r=a(t);return r===null?null:u(r)?d.light:d.dark}function p(t){return i(t)?.[0]??""}function x(t,r){const n=i(t);return n?n[o(r)%n.length]:""}function b(t){return t?e[o(t)%e.length]:""}export{e as CARD_RANDOM_COLOURS,d as CARD_TONES,o as cardHash,p as productTone,x as productToneVaried,b as randomCardColour};