efficient-storefront-blocks 0.125.16 → 0.125.18

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.
@@ -4480,3 +4480,19 @@ em.text-accent {
4480
4480
  .sf-card-tracks:has(> :nth-child(12)):not(:has(> :nth-child(13))) {
4481
4481
  --sf-card-skip: calc(100% / 5 + 1px - clamp(0px, (100% - (min(6, var(--sf-cols)) * var(--sf-card-min) * 1px + (min(6, var(--sf-cols)) - 1) * var(--sf-card-gap))) * 1000, 100000px) - clamp(0px, (5 + 1 - var(--sf-cols)) * 100000px, 100000px));
4482
4482
  }
4483
+
4484
+ /* CARD HOVER ZOOM (2026-11-24, owner review of the new inovit.com home). A
4485
+ section at Show next image whose card has no next picture zooms the wheel a
4486
+ little instead (components/GridCardTemplate `useCardHoverZooms`). `scale`,
4487
+ not `transform`: no layout move, and the card's own lift (`transform` on
4488
+ .sf-card) is left alone. Only on a pointer that hovers; reduced motion
4489
+ keeps the wheel still. scripts/test-card-hover-next-rendering.tsx. */
4490
+ .sf-card-hover-zoom img {
4491
+ transition: scale calc(var(--motion-base) * 2) ease; /* 320 ms: about 300, from the shell token */
4492
+ }
4493
+ @media (hover: hover) and (prefers-reduced-motion: no-preference) {
4494
+ .sf-card:hover .sf-card-hover-zoom img,
4495
+ .sf-card:focus-within .sf-card-hover-zoom img {
4496
+ scale: 1.04;
4497
+ }
4498
+ }
@@ -1,6 +1,7 @@
1
1
  import { type CSSProperties, type ReactNode } from "react";
2
2
  import type { SlotComponent } from "efficient-easel/blocks";
3
3
  import { type CardHoverDrawn, type HoverMediaCover } from "efficient-web-builder/format/lib/animation/hover";
4
+ import { type HoverMediaRow } from "efficient-web-builder/format/lib/content/hover-media";
4
5
  import type { SourceRow } from "efficient-web-builder/format/lib/content/block-sources";
5
6
  import type { Bundle, TyreProductSummary, WheelSummary } from "../lib/api/index.js";
6
7
  import type { VehicleFitment } from "../lib/wheels/plp-fitment-match.js";
@@ -78,6 +79,9 @@ export declare function tyreCardRow(tyre: TyreProductSummary): SourceRow;
78
79
  export declare const bundlePagePath: (bundle: Bundle) => string;
79
80
  export declare function bundleCardRow(bundle: Bundle): SourceRow;
80
81
  export declare function useCardHoverLayer(cover: HoverMediaCover, ground?: string): ReactNode;
82
+ export declare function cardHoverRow(wheel: WheelSummary, finish: string | undefined): HoverMediaRow;
83
+ export declare const CARD_HOVER_ZOOM_CLASS = "sf-card-hover-zoom";
84
+ export declare function useCardHoverZooms(): boolean;
81
85
  export declare function GridCards({ wheels, finishes, children, }: {
82
86
  wheels: readonly WheelSummary[];
83
87
  finishes?: readonly (string | undefined)[];
@@ -1 +1 @@
1
- "use client";import{jsx as t,Fragment as h,jsxs as A}from"react/jsx-runtime";import{createContext as D,useContext as E,useMemo as x}from"react";import{parseOption as g}from"efficient-shell/format";import{CardRowContext as G,CardTemplateRows as p,useCardRow as L}from"efficient-web-builder/render/components/CardRowContext";import{InsideSiteColumn as k}from"efficient-web-builder/render/components/SiteGutterFrame";import{SECTION_FILL_PASS_CLASS as N}from"efficient-web-builder/format/lib/content/section-min-height";import{cardHoverOf as F}from"efficient-web-builder/format/lib/animation/hover";import{pickHoverMedia as U}from"efficient-web-builder/format/lib/content/hover-media";import W from"efficient-web-builder/render/components/HoverMediaLayer";import{NO_FIELD_ANSWERS as v}from"../lib/content/field-usage.js";import{CARD_IMAGE_SIZES as j}from"../lib/sections/card-image-sizes.js";import{productTone as $,productToneVaried as B,randomCardColour as b}from"../lib/sections/card-tone.js";import{CardLookContext as C}from"./card-pieces/card-row.js";import{CardBuyDialog as H}from"./card-pieces/CardBuyButton.js";import M from"./card-pieces/CardSurfaceFrame.js";import{BundleCardStateProvider as V,TyreCardStateProvider as z,useProductCardState as R,useWheelCardState as _,WheelCardStateProvider as q,tyreCardProduct as Y}from"./card-pieces/ProductCardState.js";import{tyrePagePath as K}from"../lib/tyres/tyre-page-path.js";import{say as X}from"efficient-web-builder/format/lib/editor-words";import{CARD_INDEX_OPTIONS as J,cardIndexCss as Q}from"efficient-web-builder/format/lib/sections/product-card-style";import{SHARED_ROWS_LIST_CLASS as Z}from"efficient-web-builder/render/lib/content/box-shared-columns";import{GAP_ZONE_CLASS as ee}from"efficient-web-builder/format/lib/content/container-gap";import{CARD_ROWS_GRID_CLASS as re,cardRowsGap as oe,cardRowsGridStyle as te}from"./WheelCardFrame.js";import{blockParts as ne}from"../lib/block-parts.js";const ae=ne("ProductCard");function Ke(e){return J.map(({value:r})=>r==="off"?"":Q(e,r).replace(".sf-card-index::before",`.sf-card-index[data-format="${r}"]::before`)).join("")}function Xe(e){return e.className.includes(ee)?{className:`${e.className} ${re} ${Z}`,style:{...e.style,...te(oe(e))}}:e}const se={sale:!1,axleSets:!0,setTotal:!1,wasFollowsSize:!1,quoteSets:!0,showSingle:!1,armOnContact:!1},Je={sale:!0,axleSets:!1,setTotal:!0,wasFollowsSize:!0,quoteSets:!1,showSingle:!0,armOnContact:!0},de={kindLabel:null,brand:!1,process:!0,tyreBrand:!0},le=[],ie=[{label:"Flat",value:"flat"},{label:"Soft grey",value:"soft"}],Qe=e=>g(ie.map(r=>r.value),"flat",e),ce=[{label:"Under the picture",value:"under"},{label:"Over the picture",value:"over"}],Ze=e=>g(ce.map(r=>r.value),"under",e),ue="sf-card-words-over",T={ownerId:"",ownerType:"ProductGrid",Template:void 0,hover:F({},"ProductGrid"),imageSizes:j,fieldUsage:v,tyreFieldUsage:v,reserveEyebrow:!1,editing:!1,eyebrow:de,fit:null,colours:le,rules:se,ground:"flat",words:"under"},O=D(T);function m(){return E(O)}function er({value:e,children:r}){const o=x(()=>({...T,...me(e)}),[e]);return t(O.Provider,{value:o,children:r})}const me=e=>Object.fromEntries(Object.entries(e).filter(([,r])=>r!==void 0));function w(e,r){const o=e.designCode??e.slug??"";return{name:e.name??"",eyebrow:e.process??"",note:"",href:e.slug?`/wheels/${e.slug}`:"",colour:$(r),colourVaried:B(r,o),colourRandom:b(o)}}function fe(e){const r=e.designCode||e.slug||"";return{name:e.name??"",eyebrow:e.brand??"",note:"",href:K(e.slug)??"",colour:"",colourVaried:"",colourRandom:b(r)}}const I=e=>`/bundles/${e.slug}`;function pe(e){return{name:e.name,eyebrow:"",note:e.subtitle??"",href:I(e),colour:"",colourVaried:"",colourRandom:""}}const Ce="sf-card sf-card-fill group relative flex flex-col bg-[var(--card-bg)] transition-colors duration-200 hover:bg-[var(--card-bg-hover)] [.sf-card-rows>&]:mb-[var(--sf-card-row-gap)]",we="sf-card group relative flex flex-col border border-line bg-bg transition-colors hover:border-accent",Se="col-span-2 max-view-wide:col-span-1 @max-[720px]:col-span-1 [&:has([data-set-picture=one])]:col-span-1",ye=`relative flex-1 ${N}`;function S({copy:e,href:r,label:o,wide:n=!1,kit:a=!1,probes:s,arm:f,layer:c}){const{editing:l,ground:d,words:u}=m(),i=[d==="soft"?"sf-card-ground-soft":"",u==="over"?ue:""].filter(Boolean);return t(M,{surface:a?we:[Ce,...i].join(" "),span:n?Se:void 0,href:r,label:o,linked:!l,probes:s,arm:f,layer:c,children:t("div",{className:ye,...ae("card-content"),children:t(k,{children:e})})})}const he="var(--card-bg)";function xe(e,r=he){const{hover:o}=m(),n=R();if(o.kind!=="nextImage"||o.media?.cover!==e||n.kind!=="wheel")return null;const a=U(n.wheel,o.media,n.sel.finish?.name);return a?t(W,{media:a,name:n.wheel.name,cover:e,ground:r}):null}function ge({children:e}){const r=L(),{wheel:o,sel:n}=_(),a=n.finish?.color,s=x(()=>r?{...r,row:w(o,a)}:null,[r,o,a]);return s?t(G.Provider,{value:s,children:e}):t(h,{children:e})}function ve({copy:e}){const{wheel:r,sel:o,isSet:n}=_(),{rules:a}=m(),s=xe("card");return A(h,{children:[t(S,{copy:t(ge,{children:e}),href:r.slug?`/wheels/${r.slug}`:"",label:r.name,wide:n,probes:o.probes,arm:a.armOnContact?o.arm:void 0,layer:s}),t(H,{})]})}function P(e,r,o,n){const a=r.item;return t(q,{wheel:a,colours:o.colours,defaultFinish:n?.[r.index],editing:o.editing,children:t(C.Provider,{value:"catalog",children:t(ve,{copy:e})})})}function rr({wheels:e,finishes:r,children:o}){const n=m(),{ownerId:a,ownerType:s,Template:f,editing:c}=n;return t(p,{ownerId:a,ownerType:s,Template:f,rows:e.map(l=>w(l)),items:e,fallback:c?t(y,{}):null,wrapCopy:(l,d)=>P(l,d,n,r),children:o})}function or({items:e,tyreOf:r,tyreFit:o}){const n=m(),{ownerId:a,ownerType:s,Template:f,editing:c}=n,l=e.map(d=>r(d));return t(p,{ownerId:a,ownerType:s,Template:f,rows:e.map((d,u)=>{const i=l[u];return i?fe(i):w(d)}),items:e,fallback:c?t(y,{}):null,wrapCopy:(d,u)=>{const i=l[u.index];return i?Re(d,Y(i,o?.(i)??null),c):P(d,u,n)},children:d=>d})}function be({copy:e}){const r=R();if(r.kind!=="tyre")throw new Error("A tyre card surface was drawn outside its tyre state.");return t(S,{copy:e,href:r.pagePath??"",label:r.tyre.name,arm:r.arm})}function Re(e,r,o){return t(z,{tyre:r,editing:o,children:t(C.Provider,{value:"catalog",children:t(be,{copy:e})})})}function _e(e,r){const o=r.item;return t(V,{bundle:o,children:t(C.Provider,{value:"catalog",children:t(S,{copy:e,href:I(o),label:o.name,kit:!0})})})}function tr({bundles:e,children:r}){const{ownerId:o,ownerType:n,Template:a,editing:s}=m();return t(p,{ownerId:o,ownerType:n,Template:a,rows:e.map(pe),items:e,fallback:s?t(y,{}):null,wrapCopy:_e,children:r})}function y(){return t("div",{"data-grid-card-empty":"",className:"p-4 text-center font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.2em] text-fg-dim",children:X("The card is empty. Add parts to its card template in Layers.")})}export{ie as CARD_GROUNDS,ce as CARD_WORDS,ue as CARD_WORDS_OVER_CLASS,se as GRID_CARD_RULES,tr as GridBundleCards,er as GridCardProvider,rr as GridCards,or as GridMixedCards,Je as LISTING_CARD_RULES,pe as bundleCardRow,I as bundlePagePath,Qe as cardGroundOf,Xe as cardRowsGrid,Ze as cardWordsOf,Ke as gridIndexCss,w as productCardRow,fe as tyreCardRow,xe as useCardHoverLayer,m as useGridCard};
1
+ "use client";import{jsx as t,Fragment as x,jsxs as D}from"react/jsx-runtime";import{createContext as E,useContext as G,useMemo as h}from"react";import{parseOption as v}from"efficient-shell/format";import{CardRowContext as k,CardTemplateRows as p,useCardRow as L}from"efficient-web-builder/render/components/CardRowContext";import{InsideSiteColumn as F}from"efficient-web-builder/render/components/SiteGutterFrame";import{SECTION_FILL_PASS_CLASS as N}from"efficient-web-builder/format/lib/content/section-min-height";import{cardHoverOf as U}from"efficient-web-builder/format/lib/animation/hover";import{pickHoverMedia as W}from"efficient-web-builder/format/lib/content/hover-media";import H from"efficient-web-builder/render/components/HoverMediaLayer";import{NO_FIELD_ANSWERS as y}from"../lib/content/field-usage.js";import{CARD_IMAGE_SIZES as j}from"../lib/sections/card-image-sizes.js";import{productTone as $,productToneVaried as B,randomCardColour as R}from"../lib/sections/card-tone.js";import{CardLookContext as C}from"./card-pieces/card-row.js";import{CardBuyDialog as M}from"./card-pieces/CardBuyButton.js";import V from"./card-pieces/CardSurfaceFrame.js";import{BundleCardStateProvider as z,TyreCardStateProvider as q,useProductCardState as b,useWheelCardState as _,WheelCardStateProvider as Y,tyreCardProduct as K}from"./card-pieces/ProductCardState.js";import{tyrePagePath as X}from"../lib/tyres/tyre-page-path.js";import{say as J}from"efficient-web-builder/format/lib/editor-words";import{CARD_INDEX_OPTIONS as Q,cardIndexCss as Z}from"efficient-web-builder/format/lib/sections/product-card-style";import{SHARED_ROWS_LIST_CLASS as ee}from"efficient-web-builder/render/lib/content/box-shared-columns";import{GAP_ZONE_CLASS as re}from"efficient-web-builder/format/lib/content/container-gap";import{CARD_ROWS_GRID_CLASS as oe,cardRowsGap as te,cardRowsGridStyle as ne}from"./WheelCardFrame.js";import{blockParts as ae}from"../lib/block-parts.js";const se=ae("ProductCard");function Je(e){return Q.map(({value:r})=>r==="off"?"":Z(e,r).replace(".sf-card-index::before",`.sf-card-index[data-format="${r}"]::before`)).join("")}function Qe(e){return e.className.includes(re)?{className:`${e.className} ${oe} ${ee}`,style:{...e.style,...ne(te(e))}}:e}const de={sale:!1,axleSets:!0,setTotal:!1,wasFollowsSize:!1,quoteSets:!0,showSingle:!1,armOnContact:!1},Ze={sale:!0,axleSets:!1,setTotal:!0,wasFollowsSize:!0,quoteSets:!1,showSingle:!0,armOnContact:!0},le={kindLabel:null,brand:!1,process:!0,tyreBrand:!0},ie=[],ce=[{label:"Flat",value:"flat"},{label:"Soft grey",value:"soft"}],er=e=>v(ce.map(r=>r.value),"flat",e),ue=[{label:"Under the picture",value:"under"},{label:"Over the picture",value:"over"}],rr=e=>v(ue.map(r=>r.value),"under",e),me="sf-card-words-over",O={ownerId:"",ownerType:"ProductGrid",Template:void 0,hover:U({},"ProductGrid"),imageSizes:j,fieldUsage:y,tyreFieldUsage:y,reserveEyebrow:!1,editing:!1,eyebrow:le,fit:null,colours:ie,rules:de,ground:"flat",words:"under"},T=E(O);function m(){return G(T)}function or({value:e,children:r}){const o=h(()=>({...O,...fe(e)}),[e]);return t(T.Provider,{value:o,children:r})}const fe=e=>Object.fromEntries(Object.entries(e).filter(([,r])=>r!==void 0));function w(e,r){const o=e.designCode??e.slug??"";return{name:e.name??"",eyebrow:e.process??"",note:"",href:e.slug?`/wheels/${e.slug}`:"",colour:$(r),colourVaried:B(r,o),colourRandom:R(o)}}function pe(e){const r=e.designCode||e.slug||"";return{name:e.name??"",eyebrow:e.brand??"",note:"",href:X(e.slug)??"",colour:"",colourVaried:"",colourRandom:R(r)}}const I=e=>`/bundles/${e.slug}`;function Ce(e){return{name:e.name,eyebrow:"",note:e.subtitle??"",href:I(e),colour:"",colourVaried:"",colourRandom:""}}const we="sf-card sf-card-fill group relative flex flex-col bg-[var(--card-bg)] transition-colors duration-200 hover:bg-[var(--card-bg-hover)] [.sf-card-rows>&]:mb-[var(--sf-card-row-gap)]",Se="sf-card group relative flex flex-col border border-line bg-bg transition-colors hover:border-accent",ge="col-span-2 max-view-wide:col-span-1 @max-[720px]:col-span-1 [&:has([data-set-picture=one])]:col-span-1",xe=`relative flex-1 ${N}`;function S({copy:e,href:r,label:o,wide:n=!1,kit:a=!1,probes:s,arm:f,layer:c}){const{editing:l,ground:d,words:u}=m(),i=[d==="soft"?"sf-card-ground-soft":"",u==="over"?me:""].filter(Boolean);return t(V,{surface:a?Se:[we,...i].join(" "),span:n?ge:void 0,href:r,label:o,linked:!l,probes:s,arm:f,layer:c,children:t("div",{className:xe,...se("card-content"),children:t(F,{children:e})})})}const he="var(--card-bg)";function ve(e,r=he){const o=A();return!o||o.cover!==e||!o.media?null:t(H,{media:o.media,name:o.name,cover:e,ground:r})}function A(){const{hover:e}=m(),r=b();if(e.kind!=="nextImage"||!e.media||r.kind!=="wheel")return null;const o=r.sel.finish?.name,n=ye(r.wheel,o);return{cover:e.media.cover,name:r.wheel.name,media:W(n,e.media,o)}}function ye(e,r){const o=e.finishes?.find(a=>a.name===r),n=o?.angles?.length?o.angles:r&&r===e.defaultFinish?e.defaultFinishRenderings??[]:[];return{...e,finishes:r?[{name:r,angles:n.slice(1)}]:[]}}const tr="sf-card-hover-zoom";function nr(){const e=A();return e!==null&&e.media===null}function Re({children:e}){const r=L(),{wheel:o,sel:n}=_(),a=n.finish?.color,s=h(()=>r?{...r,row:w(o,a)}:null,[r,o,a]);return s?t(k.Provider,{value:s,children:e}):t(x,{children:e})}function be({copy:e}){const{wheel:r,sel:o,isSet:n}=_(),{rules:a}=m(),s=ve("card");return D(x,{children:[t(S,{copy:t(Re,{children:e}),href:r.slug?`/wheels/${r.slug}`:"",label:r.name,wide:n,probes:o.probes,arm:a.armOnContact?o.arm:void 0,layer:s}),t(M,{})]})}function P(e,r,o,n){const a=r.item;return t(Y,{wheel:a,colours:o.colours,defaultFinish:n?.[r.index],editing:o.editing,children:t(C.Provider,{value:"catalog",children:t(be,{copy:e})})})}function ar({wheels:e,finishes:r,children:o}){const n=m(),{ownerId:a,ownerType:s,Template:f,editing:c}=n;return t(p,{ownerId:a,ownerType:s,Template:f,rows:e.map(l=>w(l)),items:e,fallback:c?t(g,{}):null,wrapCopy:(l,d)=>P(l,d,n,r),children:o})}function sr({items:e,tyreOf:r,tyreFit:o}){const n=m(),{ownerId:a,ownerType:s,Template:f,editing:c}=n,l=e.map(d=>r(d));return t(p,{ownerId:a,ownerType:s,Template:f,rows:e.map((d,u)=>{const i=l[u];return i?pe(i):w(d)}),items:e,fallback:c?t(g,{}):null,wrapCopy:(d,u)=>{const i=l[u.index];return i?Oe(d,K(i,o?.(i)??null),c):P(d,u,n)},children:d=>d})}function _e({copy:e}){const r=b();if(r.kind!=="tyre")throw new Error("A tyre card surface was drawn outside its tyre state.");return t(S,{copy:e,href:r.pagePath??"",label:r.tyre.name,arm:r.arm})}function Oe(e,r,o){return t(q,{tyre:r,editing:o,children:t(C.Provider,{value:"catalog",children:t(_e,{copy:e})})})}function Te(e,r){const o=r.item;return t(z,{bundle:o,children:t(C.Provider,{value:"catalog",children:t(S,{copy:e,href:I(o),label:o.name,kit:!0})})})}function dr({bundles:e,children:r}){const{ownerId:o,ownerType:n,Template:a,editing:s}=m();return t(p,{ownerId:o,ownerType:n,Template:a,rows:e.map(Ce),items:e,fallback:s?t(g,{}):null,wrapCopy:Te,children:r})}function g(){return t("div",{"data-grid-card-empty":"",className:"p-4 text-center font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.2em] text-fg-dim",children:J("The card is empty. Add parts to its card template in Layers.")})}export{ce as CARD_GROUNDS,tr as CARD_HOVER_ZOOM_CLASS,ue as CARD_WORDS,me as CARD_WORDS_OVER_CLASS,de as GRID_CARD_RULES,dr as GridBundleCards,or as GridCardProvider,ar as GridCards,sr as GridMixedCards,Ze as LISTING_CARD_RULES,Ce as bundleCardRow,I as bundlePagePath,er as cardGroundOf,ye as cardHoverRow,Qe as cardRowsGrid,rr as cardWordsOf,Je as gridIndexCss,w as productCardRow,pe as tyreCardRow,ve as useCardHoverLayer,nr as useCardHoverZooms,m as useGridCard};
@@ -69,6 +69,9 @@ export declare const FEW_CARDS: readonly [{
69
69
  }, {
70
70
  readonly label: "Keep card width";
71
71
  readonly value: "keep";
72
+ }, {
73
+ readonly label: "Center the row";
74
+ readonly value: "center";
72
75
  }];
73
76
  export type FewCards = (typeof FEW_CARDS)[number]["value"];
74
77
  export default function ProductGridSection({ num, catalog, catalogTotal, firstCountInChips, kinds, title, titleSize, pads, noTop, description, link, products: Products, wheels, source, columns, columnsPhone, columnsTablet, limit: limitProp, moreProducts, perPage, editing, contentCapped, hover, fieldUsage, ownerId, template, fewCards, cardGround, cardWords, gap: gapProp, gapPhone, }: Props): import("react").JSX.Element | null;
@@ -1 +1 @@
1
- "use client";import{jsx as t,jsxs as w,Fragment as ft}from"react/jsx-runtime";import{useScopeClass as ht}from"../lib/use-scope-class.js";import{useEffect as B,useMemo as u,useState as fe}from"react";import{cardHoverOf as xt}from"efficient-web-builder/format/lib/animation/hover";import{containerGapProps as wt}from"efficient-web-builder/format/lib/content/container-gap";import vt from"next/link";import{cardRowsGrid as yt,GridCardProvider as bt,GridMixedCards as St,gridIndexCss as Ct}from"./GridCardTemplate.js";import{gridClassImageSizes as Mt}from"../lib/sections/card-image-sizes.js";import{fillRowCss as he}from"../lib/sections/fill-row.js";import{hiddenCardsRule as xe,noHoleBands as we,noHoleCss as ve,ONE_WHEEL_MARK as Pt,oneWheelScope as ye,pairScope as _t,showsASetCard as be}from"../lib/sections/grid-no-hole.js";import{setIsWide as Et,summarySetBuild as Ot}from"../lib/wheels/set-mode.js";import{answersForKind as Se,NO_FIELD_ANSWERS as Ce}from"../lib/content/field-usage.js";import{wheelCardEyebrowShows as Tt}from"./ProductCardEyebrow.js";import Nt from"./NoCurrencyNote.js";import{SITE_WIDTH_CAP as Rt,centredCap as $t,withSideOnce as Me}from"efficient-web-builder/format/lib/content/page-width";import{ProductCatalogProvider as It,SectionWheelsProvider as zt}from"./ProductRef.js";import{useCurrency as At}from"./CurrencyContext.js";import{FRAME_ROOM_PRODUCT_GRID as Lt,FRAME_ROOM_PRODUCT_GRID_PHONE as Bt,framedBandPad as Gt,PRODUCT_GRID_ROOM as kt,withBandClasses as Ft}from"../lib/sections/band-padding.js";import{COLLECTION_ATTR as Ht,useCatalogFilter as Dt}from"./catalog/CatalogFilterContext.js";import{useShopperMember as Ut}from"./catalog/ShopperScope.js";import{useBrowserLayoutEffect as Wt}from"efficient-shell/hooks";import jt from"./wheels-plp/PlpPagination.js";import{CATALOG_TEXT_SIZE as Kt}from"../lib/sections/catalog-text-size.js";import{applyShopperFilters as Xt,hasActivePlpFilters as Zt,plpPricedAmounts as qt}from"../lib/wheels/plp-filters.js";import Yt from"./catalog/ClearAllButton.js";import{GRID_TOP_UP_SPARE as Vt,gridPagingOf as Jt,gridShownOf as Qt}from"../lib/sections/product-grid-pages.js";import er from"./SectionBand.js";import{useInsideBox as tr,useInsideSiteGutter as rr}from"efficient-web-builder/render/components/SiteGutterFrame";import{productGridColumnsClass as nr}from"../lib/sections/product-grid-columns.js";import{renderGold as re,renderHeadline as ir}from"efficient-web-builder/render/components/goldPhrases";import{applyCatalogFilters as or}from"../lib/wheels/catalog-filters.js";import{normalizeCatalogRows as sr}from"../lib/wheels/wheel-summary-casing.js";import{itemKind as G,plpKindNoun as Pe}from"../lib/catalog/plp-item.js";import{filterBarCategoryOf as ar,gridKindsOf as _e,gridRowsOf as lr}from"../lib/wheels/grid-source.js";import{useUnifiedProductCatalog as dr}from"./useProductCatalog.js";import{STICKY_UNDERHEADER_CLASS as mr}from"efficient-web-builder/render/lib/document/header-clearance";import{finishFamiliesOf as cr}from"../lib/wheels/finish-defaults.js";import{lugCountsOf as pr}from"../lib/wheels/lug-count.js";import{diametersOf as ur}from"../lib/wheels/size-range.js";import{say as gr}from"efficient-web-builder/format/lib/editor-words";import{DEFAULT_TITLE_SIZE as fr}from"../lib/sections/product-grid-title.js";import{blockParts as hr}from"../lib/block-parts.js";import{PRODUCT_GRID_TYPE as xr}from"../lib/document/document-nodes.js";import{useSideSpaceOnce as wr}from"efficient-web-builder/render/components/SideSpaceOnce";const d=hr(xr),vr=xt({},"ProductGrid"),i={headingMediumUpTo800Xs:"max-view-wide:text-[length:var(--size-headingMedium,28px)]",headingMediumUpTo800Small:"max-view-wide:text-[length:var(--size-headingMedium,32px)]",headingMediumUpTo800Large:"max-view-wide:text-[length:var(--size-headingMedium,36px)]",headingMediumUpTo800Xl:"max-view-wide:text-[length:var(--size-headingMedium,40px)]",body:"text-[length:var(--size-body,13px)]",headingMedium1:"text-[length:var(--size-headingMedium,40px)]",headingMedium2:"text-[length:var(--size-headingMedium,48px)]",headingMedium3:"text-[length:var(--size-headingMedium,56px)]",headingMedium4:"text-[length:var(--size-headingMedium,64px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"},Ee=[{value:"para",label:"Paragraph size — 13px",cls:`font-mono font-normal uppercase tracking-[0.22em] ${i.labelLarge}`},{value:"sm",label:"Small — 40px",cls:`font-heading2 font-medium tracking-[-0.03em] ${i.headingMedium1} ${i.headingMediumUpTo800Xs}`},{value:"md",label:"Medium — 48px",cls:`font-heading2 font-medium tracking-[-0.03em] ${i.headingMedium2} ${i.headingMediumUpTo800Small}`},{value:"lg",label:"Large — 56px",cls:`font-heading2 font-medium tracking-[-0.03em] ${i.headingMedium3} ${i.headingMediumUpTo800Large}`},{value:"xl",label:"Extra large — 64px",cls:`font-heading2 font-medium tracking-[-0.03em] ${i.headingMedium4} ${i.headingMediumUpTo800Xl}`}];function yr(P){return(Ee.find(v=>v.value===P)??Ee.find(v=>v.value===fr)).cls}const gn=[{label:"Fill the row",value:"fill"},{label:"Keep card width",value:"keep"}];function br({num:P,catalog:v,catalogTotal:Oe,firstCountInChips:Te=!1,kinds:T,title:k,titleSize:Ne,pads:Re,noTop:ne=!1,description:N,link:_,products:$e,wheels:Ie,source:p,columns:ze,columnsPhone:Ae,columnsTablet:Le,limit:Be,moreProducts:Ge,perPage:ke,editing:E,contentCapped:Fe=!1,hover:He,fieldUsage:y,ownerId:De="",template:Ue,fewCards:ie="fill",cardGround:We="flat",cardWords:je="under",gap:Ke,gapPhone:Xe}){const oe=wr(),F=u(()=>y?Se(y,"alloy-wheel"):void 0,[y]),Ze=u(()=>y?Se(y,"tyre"):void 0,[y]),e=ht("pg"),{paged:b,per:S,limit:a,cap:g}=Jt({moreProducts:Ge,perPage:ke,limit:Be}),m=nr(ze,Ae,Le),se=Fe,qe=rr(),Ye=tr(),Ve=qe||Ye,H=dr(E===!0&&!!p),o=u(()=>p?sr(lr(p,T,H??v??[])):null,[v,H,p,T]),D=Ut("grid",o),l=o?D.scope:null,f=ar(p),C=f!==null&&!l,{filters:R,reportCount:U,reportLugs:W,reportSizes:j,reportFinishes:K,reportCategories:X,reportPrices:Z,vehicle:ae}=Dt(),{currency:h}=At(),q=C&&!!R.process&&R.process!==f,Y=l?.state,r=u(()=>o?Y?Xt(o,Y,h):C?or(o,R,h,ae.fit):o:null,[o,Y,C,R,h,ae.fit]),[Je,Qe]=fe(1),V=b&&r?Math.max(1,Math.ceil(r.length/S)):1,M=Math.min(V,Math.max(1,l?l.state.page:Je)),{reportShown:J}=D,le=l!==null;Wt(()=>{if(!le||!r)return J(null);J(Qt(r.length,{paged:b,per:S,cap:g},M))},[le,r,J,b,M,S,g]);const et=n=>l?l.update({page:n}):Qe(n),s=u(()=>r&&(b?r.slice((M-1)*S,M*S):g?r.slice(0,Math.ceil(a)+Vt):r),[b,g,a,r,M,S]);B(()=>(X(e,f===null?[]:[f]),()=>X(e,[])),[f,X,e]),B(()=>{if(C)return U(e,q?0:r?.length??0),()=>U(e,0)},[C,q,r,U,e]);const O=u(()=>({lugs:pr(o??[]),sizes:ur(o??[]),finishes:cr(o??[]),prices:qt((o??[]).filter(n=>G(n)!=="tyre"),h)}),[o,h]);B(()=>(W(e,O.lugs),j(e,O.sizes),K(e,O.finishes),Z(e,O.prices),()=>{W(e,[]),j(e,[]),K(e,[]),Z(e,[])}),[O,W,j,K,Z,e]);const Q=wt("ProductGrid",Ke,"both",Xe),tt=`${e} grid${Q.className} bg-[var(--catalog-grid-bg)] ${m}`,de=yt(Q),rt=`${e} grid${de.className} bg-[var(--catalog-grid-bg)] ${m}`,nt=de.style,it=u(()=>{const n=(r??[]).filter(c=>G(c)!=="tyre");if(n.length===0)return!1;const x=n.some(c=>!!c.process);return n.some(c=>!!c.setWords)||Tt({kind:!1,brand:!1,process:x},F??[])},[r,F]),ot=s?s.length>0?t("div",{className:rt,style:nt,...d("grid"),children:t(St,{items:s,tyreOf:n=>G(n)==="tyre"?n:null})}):l&&Zt(l.state)?w("div",{className:"flex min-h-[320px] flex-col items-center justify-center gap-4 bg-surface-2 p-4 text-center",...d("grid-empty"),children:[t("span",{className:`font-mono ${i.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:`No ${Pe(_e(p,T)).many} match those filters`}),t(Yt,{onClick:l.clear})]}):E?t("div",{className:"flex min-h-[320px] items-center justify-center rounded bg-surface-2 p-4 text-center",...d("grid-empty"),children:t("span",{className:`font-mono ${i.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:gr("No products in “{name}” yet",{name:p?.name??""})})}):null:t($e,{className:tt,style:Q.style,minEmptyHeight:320}),st=l?l.countInChips:Te,$=r&&!st?r===o&&!H?Oe??r.length:r.length:null,me=Pe(_e(p,T)),at=P||k||N||_?w("div",{className:Me(`${mr} sticky top-[var(--sf-header-h,88px)] z-30 mb-5 flex items-center justify-between gap-4 max-view-wide:flex-wrap max-view-wide:gap-y-2 border-b border-line bg-bg/95 py-3 backdrop-blur-md ${se||Ve?"":"-mx-[var(--sf-site-gutter,40px)] px-[var(--sf-site-gutter,40px)] max-view-wide:-mx-[min(20px,var(--sf-site-gutter,40px))] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]"}`,oe),...d("grid-head"),children:[w("div",{className:"flex min-w-0 items-end gap-6 max-view-wide:flex-col max-view-wide:items-stretch max-view-wide:gap-3",children:[P&&t("span",{className:`font-mono ${i.labelLarge} leading-none uppercase tracking-[0.22em] text-fg-dim`,...d("grid-number"),children:re(P)}),k&&t("h2",{className:`${yr(Ne)} leading-none text-fg max-view-wide:leading-[1] [&>span]:block`,...d("heading"),children:ir(k,!1)})]}),(N||_||$!==null)&&w("div",{className:"flex items-center gap-5 max-view-wide:gap-3 view-wide:grow view-wide:justify-end",children:[N&&t("span",{className:`max-w-[340px] truncate font-display ${i.body} leading-[1.4] text-fg-dim max-view-wide:hidden view-wide:w-0 view-wide:grow view-wide:text-right`,...d("description"),children:re(N)}),_&&w(vt,{href:_.href,className:`inline-flex items-center gap-2 whitespace-nowrap font-mono ${i.labelLarge} uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg`,...d("view-all"),children:[re(_.text),t("span",{"aria-hidden":!0,children:"→"})]}),$!==null&&w("span",{className:`whitespace-nowrap font-mono ${i.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,...d("count"),children:[$," ",$===1?me.one:me.many]})]})]}):null,I=Gt(Re,kt,{noTop:ne}),{paddingTop:lt,...dt}=I.style,z=ne?0:lt,mt={...z===void 0?{}:{"--pg-pt":typeof z=="number"?`${z}px`:z},...dt},A=u(()=>{if(!s)return null;const n=s.map(x=>G(x)!=="tyre"&&Et(Ot(x))?2:1);return be(n,a)?we(m,n,a):null},[s,m,a]),[ct,pt]=fe("");B(()=>{if(s)return;const n=document.querySelector(`.${e}`);if(!n)return;const x=()=>{const c=[...n.children].map(ge=>ge.classList.contains("col-span-2")&&!ge.querySelector(Pt)?2:1);pt(be(c,a)?ve(e,we(m,c,a,!1),c.length):"")};x();const te=new MutationObserver(x);return te.observe(n,{childList:!0}),()=>te.disconnect()},[s,e,m,a]);const ut=A?A[0].tracks:s?g?Math.min(s.length,a):s.length:void 0,L=A?ve(_t(e),A,s.length)+(g?xe(ye(e),a+1):"")+(ie==="keep"?"":he(ye(e),m,{limit:a,cards:s.length})):ct,ce=L||ie==="keep"?"":he(e,m,{limit:a,cards:s?.length}),pe=Ct(e),ue=w(ft,{children:[g&&!L&&t("style",{children:xe(e,a+1)}),L&&t("style",{children:L}),ce&&t("style",{children:ce}),pe&&t("style",{children:pe}),at,ot,b&&V>1&&t(jt,{textSize:Kt.labelSmall,page:M,pageCount:V,onPage:et}),t(Nt,{editing:E})]});if(q)return null;const ee=t(er,{rootRef:D.ref,attrs:{...C&&f!==null?{...I.attrs,[Ht]:f}:I.attrs,...d("product-grid-block")},className:Ft(Me(`relative z-[2] bg-bg px-[var(--sf-site-gutter,40px)] ${Lt} max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))] ${Bt}`,oe),I),column:null,inAnyBox:!0,style:mt,defaults:{"--pg-pt":"120px"},children:se?t("div",{style:$t(Rt),children:ue}):ue}),gt=o?ee:E?t(It,{currency:h,children:ee}):t(zt,{wheels:Ie,currency:h,children:ee});return t(bt,{value:{ownerId:De,Template:Ue,hover:He??vr,imageSizes:Mt(m,ut),fieldUsage:F??Ce,tyreFieldUsage:Ze??Ce,reserveEyebrow:it,editing:E===!0,ground:We,words:je},children:gt})}export{gn as FEW_CARDS,Ee as TITLE_SIZES,br as default};
1
+ "use client";import{jsx as t,jsxs as y,Fragment as ft}from"react/jsx-runtime";import{useScopeClass as ht}from"../lib/use-scope-class.js";import{useEffect as B,useMemo as f,useState as fe}from"react";import{cardHoverOf as xt}from"efficient-web-builder/format/lib/animation/hover";import{containerGapProps as wt}from"efficient-web-builder/format/lib/content/container-gap";import vt from"next/link";import{cardRowsGrid as yt,GridCardProvider as bt,GridMixedCards as Ct,gridIndexCss as St}from"./GridCardTemplate.js";import{gridClassImageSizes as Mt}from"../lib/sections/card-image-sizes.js";import{centerRowCss as Pt,fillRowCss as _t}from"../lib/sections/fill-row.js";import{hiddenCardsRule as he,noHoleBands as xe,noHoleCss as we,ONE_WHEEL_MARK as Et,oneWheelScope as ve,pairScope as Ot,showsASetCard as ye}from"../lib/sections/grid-no-hole.js";import{setIsWide as Rt,summarySetBuild as Tt}from"../lib/wheels/set-mode.js";import{answersForKind as be,NO_FIELD_ANSWERS as Ce}from"../lib/content/field-usage.js";import{wheelCardEyebrowShows as Nt}from"./ProductCardEyebrow.js";import $t from"./NoCurrencyNote.js";import{SITE_WIDTH_CAP as It,centredCap as zt,withSideOnce as Se}from"efficient-web-builder/format/lib/content/page-width";import{ProductCatalogProvider as At,SectionWheelsProvider as Lt}from"./ProductRef.js";import{useCurrency as Bt}from"./CurrencyContext.js";import{FRAME_ROOM_PRODUCT_GRID as Gt,FRAME_ROOM_PRODUCT_GRID_PHONE as Ft,framedBandPad as Ht,PRODUCT_GRID_ROOM as kt,withBandClasses as Dt}from"../lib/sections/band-padding.js";import{COLLECTION_ATTR as Ut,useCatalogFilter as Wt}from"./catalog/CatalogFilterContext.js";import{useShopperMember as jt}from"./catalog/ShopperScope.js";import{useBrowserLayoutEffect as Kt}from"efficient-shell/hooks";import Xt from"./wheels-plp/PlpPagination.js";import{CATALOG_TEXT_SIZE as Zt}from"../lib/sections/catalog-text-size.js";import{applyShopperFilters as qt,hasActivePlpFilters as Yt,plpPricedAmounts as Vt}from"../lib/wheels/plp-filters.js";import Jt from"./catalog/ClearAllButton.js";import{GRID_TOP_UP_SPARE as Qt,gridPagingOf as er,gridShownOf as tr}from"../lib/sections/product-grid-pages.js";import rr from"./SectionBand.js";import{useInsideBox as nr,useInsideSiteGutter as ir}from"efficient-web-builder/render/components/SiteGutterFrame";import{productGridColumnsClass as or}from"../lib/sections/product-grid-columns.js";import{renderGold as re,renderHeadline as sr}from"efficient-web-builder/render/components/goldPhrases";import{applyCatalogFilters as ar}from"../lib/wheels/catalog-filters.js";import{normalizeCatalogRows as lr}from"../lib/wheels/wheel-summary-casing.js";import{itemKind as G,plpKindNoun as Me}from"../lib/catalog/plp-item.js";import{filterBarCategoryOf as dr,gridKindsOf as Pe,gridRowsOf as mr}from"../lib/wheels/grid-source.js";import{useUnifiedProductCatalog as cr}from"./useProductCatalog.js";import{STICKY_UNDERHEADER_CLASS as pr}from"efficient-web-builder/render/lib/document/header-clearance";import{finishFamiliesOf as ur}from"../lib/wheels/finish-defaults.js";import{lugCountsOf as gr}from"../lib/wheels/lug-count.js";import{diametersOf as fr}from"../lib/wheels/size-range.js";import{say as hr}from"efficient-web-builder/format/lib/editor-words";import{DEFAULT_TITLE_SIZE as xr}from"../lib/sections/product-grid-title.js";import{blockParts as wr}from"../lib/block-parts.js";import{PRODUCT_GRID_TYPE as vr}from"../lib/document/document-nodes.js";import{useSideSpaceOnce as yr}from"efficient-web-builder/render/components/SideSpaceOnce";const d=wr(vr),br=xt({},"ProductGrid"),i={headingMediumUpTo800Xs:"max-view-wide:text-[length:var(--size-headingMedium,28px)]",headingMediumUpTo800Small:"max-view-wide:text-[length:var(--size-headingMedium,32px)]",headingMediumUpTo800Large:"max-view-wide:text-[length:var(--size-headingMedium,36px)]",headingMediumUpTo800Xl:"max-view-wide:text-[length:var(--size-headingMedium,40px)]",body:"text-[length:var(--size-body,13px)]",headingMedium1:"text-[length:var(--size-headingMedium,40px)]",headingMedium2:"text-[length:var(--size-headingMedium,48px)]",headingMedium3:"text-[length:var(--size-headingMedium,56px)]",headingMedium4:"text-[length:var(--size-headingMedium,64px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"},_e=[{value:"para",label:"Paragraph size — 13px",cls:`font-mono font-normal uppercase tracking-[0.22em] ${i.labelLarge}`},{value:"sm",label:"Small — 40px",cls:`font-heading2 font-medium tracking-[-0.03em] ${i.headingMedium1} ${i.headingMediumUpTo800Xs}`},{value:"md",label:"Medium — 48px",cls:`font-heading2 font-medium tracking-[-0.03em] ${i.headingMedium2} ${i.headingMediumUpTo800Small}`},{value:"lg",label:"Large — 56px",cls:`font-heading2 font-medium tracking-[-0.03em] ${i.headingMedium3} ${i.headingMediumUpTo800Large}`},{value:"xl",label:"Extra large — 64px",cls:`font-heading2 font-medium tracking-[-0.03em] ${i.headingMedium4} ${i.headingMediumUpTo800Xl}`}];function Cr(u){return(_e.find(m=>m.value===u)??_e.find(m=>m.value===xr)).cls}const hn=[{label:"Fill the row",value:"fill"},{label:"Keep card width",value:"keep"},{label:"Center the row",value:"center"}],Ee=(u,...m)=>u==="keep"?"":u==="center"?Pt(...m):_t(...m);function Sr({num:u,catalog:m,catalogTotal:Oe,firstCountInChips:Re=!1,kinds:R,title:F,titleSize:Te,pads:Ne,noTop:ne=!1,description:T,link:_,products:$e,wheels:Ie,source:g,columns:ze,columnsPhone:Ae,columnsTablet:Le,limit:Be,moreProducts:Ge,perPage:Fe,editing:E,contentCapped:He=!1,hover:ke,fieldUsage:b,ownerId:De="",template:Ue,fewCards:ie="fill",cardGround:We="flat",cardWords:je="under",gap:Ke,gapPhone:Xe}){const oe=yr(),H=f(()=>b?be(b,"alloy-wheel"):void 0,[b]),Ze=f(()=>b?be(b,"tyre"):void 0,[b]),e=ht("pg"),{paged:C,per:S,limit:a,cap:h}=er({moreProducts:Ge,perPage:Fe,limit:Be}),c=or(ze,Ae,Le),se=He,qe=ir(),Ye=nr(),Ve=qe||Ye,k=cr(E===!0&&!!g),o=f(()=>g?lr(mr(g,R,k??m??[])):null,[m,k,g,R]),D=jt("grid",o),l=o?D.scope:null,x=dr(g),M=x!==null&&!l,{filters:N,reportCount:U,reportLugs:W,reportSizes:j,reportFinishes:K,reportCategories:X,reportPrices:Z,vehicle:ae}=Wt(),{currency:w}=Bt(),q=M&&!!N.process&&N.process!==x,Y=l?.state,r=f(()=>o?Y?qt(o,Y,w):M?ar(o,N,w,ae.fit):o:null,[o,Y,M,N,w,ae.fit]),[Je,Qe]=fe(1),V=C&&r?Math.max(1,Math.ceil(r.length/S)):1,P=Math.min(V,Math.max(1,l?l.state.page:Je)),{reportShown:J}=D,le=l!==null;Kt(()=>{if(!le||!r)return J(null);J(tr(r.length,{paged:C,per:S,cap:h},P))},[le,r,J,C,P,S,h]);const et=n=>l?l.update({page:n}):Qe(n),s=f(()=>r&&(C?r.slice((P-1)*S,P*S):h?r.slice(0,Math.ceil(a)+Qt):r),[C,h,a,r,P,S]);B(()=>(X(e,x===null?[]:[x]),()=>X(e,[])),[x,X,e]),B(()=>{if(M)return U(e,q?0:r?.length??0),()=>U(e,0)},[M,q,r,U,e]);const O=f(()=>({lugs:gr(o??[]),sizes:fr(o??[]),finishes:ur(o??[]),prices:Vt((o??[]).filter(n=>G(n)!=="tyre"),w)}),[o,w]);B(()=>(W(e,O.lugs),j(e,O.sizes),K(e,O.finishes),Z(e,O.prices),()=>{W(e,[]),j(e,[]),K(e,[]),Z(e,[])}),[O,W,j,K,Z,e]);const Q=wt("ProductGrid",Ke,"both",Xe),tt=`${e} grid${Q.className} bg-[var(--catalog-grid-bg)] ${c}`,de=yt(Q),rt=`${e} grid${de.className} bg-[var(--catalog-grid-bg)] ${c}`,nt=de.style,it=f(()=>{const n=(r??[]).filter(p=>G(p)!=="tyre");if(n.length===0)return!1;const v=n.some(p=>!!p.process);return n.some(p=>!!p.setWords)||Nt({kind:!1,brand:!1,process:v},H??[])},[r,H]),ot=s?s.length>0?t("div",{className:rt,style:nt,...d("grid"),children:t(Ct,{items:s,tyreOf:n=>G(n)==="tyre"?n:null})}):l&&Yt(l.state)?y("div",{className:"flex min-h-[320px] flex-col items-center justify-center gap-4 bg-surface-2 p-4 text-center",...d("grid-empty"),children:[t("span",{className:`font-mono ${i.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:`No ${Me(Pe(g,R)).many} match those filters`}),t(Jt,{onClick:l.clear})]}):E?t("div",{className:"flex min-h-[320px] items-center justify-center rounded bg-surface-2 p-4 text-center",...d("grid-empty"),children:t("span",{className:`font-mono ${i.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:hr("No products in “{name}” yet",{name:g?.name??""})})}):null:t($e,{className:tt,style:Q.style,minEmptyHeight:320}),st=l?l.countInChips:Re,$=r&&!st?r===o&&!k?Oe??r.length:r.length:null,me=Me(Pe(g,R)),at=u||F||T||_?y("div",{className:Se(`${pr} sticky top-[var(--sf-header-h,88px)] z-30 mb-5 flex items-center justify-between gap-4 max-view-wide:flex-wrap max-view-wide:gap-y-2 border-b border-line bg-bg/95 py-3 backdrop-blur-md ${se||Ve?"":"-mx-[var(--sf-site-gutter,40px)] px-[var(--sf-site-gutter,40px)] max-view-wide:-mx-[min(20px,var(--sf-site-gutter,40px))] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]"}`,oe),...d("grid-head"),children:[y("div",{className:"flex min-w-0 items-end gap-6 max-view-wide:flex-col max-view-wide:items-stretch max-view-wide:gap-3",children:[u&&t("span",{className:`font-mono ${i.labelLarge} leading-none uppercase tracking-[0.22em] text-fg-dim`,...d("grid-number"),children:re(u)}),F&&t("h2",{className:`${Cr(Te)} leading-none text-fg max-view-wide:leading-[1] [&>span]:block`,...d("heading"),children:sr(F,!1)})]}),(T||_||$!==null)&&y("div",{className:"flex items-center gap-5 max-view-wide:gap-3 view-wide:grow view-wide:justify-end",children:[T&&t("span",{className:`max-w-[340px] truncate font-display ${i.body} leading-[1.4] text-fg-dim max-view-wide:hidden view-wide:w-0 view-wide:grow view-wide:text-right`,...d("description"),children:re(T)}),_&&y(vt,{href:_.href,className:`inline-flex items-center gap-2 whitespace-nowrap font-mono ${i.labelLarge} uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg`,...d("view-all"),children:[re(_.text),t("span",{"aria-hidden":!0,children:"→"})]}),$!==null&&y("span",{className:`whitespace-nowrap font-mono ${i.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,...d("count"),children:[$," ",$===1?me.one:me.many]})]})]}):null,I=Ht(Ne,kt,{noTop:ne}),{paddingTop:lt,...dt}=I.style,z=ne?0:lt,mt={...z===void 0?{}:{"--pg-pt":typeof z=="number"?`${z}px`:z},...dt},A=f(()=>{if(!s)return null;const n=s.map(v=>G(v)!=="tyre"&&Rt(Tt(v))?2:1);return ye(n,a)?xe(c,n,a):null},[s,c,a]),[ct,pt]=fe("");B(()=>{if(s)return;const n=document.querySelector(`.${e}`);if(!n)return;const v=()=>{const p=[...n.children].map(ge=>ge.classList.contains("col-span-2")&&!ge.querySelector(Et)?2:1);pt(ye(p,a)?we(e,xe(c,p,a,!1),p.length):"")};v();const te=new MutationObserver(v);return te.observe(n,{childList:!0}),()=>te.disconnect()},[s,e,c,a]);const ut=A?A[0].tracks:s?h?Math.min(s.length,a):s.length:void 0,L=A?we(Ot(e),A,s.length)+(h?he(ve(e),a+1):"")+Ee(ie,ve(e),c,{limit:a,cards:s.length}):ct,ce=L?"":Ee(ie,e,c,{limit:a,cards:s?.length}),pe=St(e),ue=y(ft,{children:[h&&!L&&t("style",{children:he(e,a+1)}),L&&t("style",{children:L}),ce&&t("style",{children:ce}),pe&&t("style",{children:pe}),at,ot,C&&V>1&&t(Xt,{textSize:Zt.labelSmall,page:P,pageCount:V,onPage:et}),t($t,{editing:E})]});if(q)return null;const ee=t(rr,{rootRef:D.ref,attrs:{...M&&x!==null?{...I.attrs,[Ut]:x}:I.attrs,...d("product-grid-block")},className:Dt(Se(`relative z-[2] bg-bg px-[var(--sf-site-gutter,40px)] ${Gt} max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))] ${Ft}`,oe),I),column:null,inAnyBox:!0,style:mt,defaults:{"--pg-pt":"120px"},children:se?t("div",{style:zt(It),children:ue}):ue}),gt=o?ee:E?t(At,{currency:w,children:ee}):t(Lt,{wheels:Ie,currency:w,children:ee});return t(bt,{value:{ownerId:De,Template:Ue,hover:ke??br,imageSizes:Mt(c,ut),fieldUsage:H??Ce,tyreFieldUsage:Ze??Ce,reserveEyebrow:it,editing:E===!0,ground:We,words:je},children:gt})}export{hn as FEW_CARDS,_e as TITLE_SIZES,Sr as default};
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as d,Fragment as v}from"react/jsx-runtime";import{parseOption as Z}from"efficient-shell/format";import I from"next/image";import{useState as ne}from"react";import{HideTaker as _}from"efficient-web-builder/render/components/ViewHideRoot";import{CARD_INDEX_BADGE_CLASS as z,CARD_INDEX_CLASS as O,parseCardIndexFormat as q}from"efficient-web-builder/format/lib/sections/product-card-style";import{CARD_IMAGE_BG_OFF as oe,cardImageBackgroundPaints as J,resolveCardImageBackground as se}from"efficient-web-builder/format/lib/content/card-image-background";import{cardImageShapeTokens as A}from"efficient-web-builder/format/lib/content/card-image-shape";import{BOX_SWATCH_PROP as ie,boxSwatchFill as ce}from"efficient-web-builder/format/lib/content/box-background";import{useCardRow as de}from"efficient-web-builder/render/components/CardRowContext";import{pictureShadowFilter as me}from"efficient-easel/screen/lib/document/shadow-values";import{sayCount as ue}from"efficient-web-builder/format/lib/editor-words";import{parseSetPicture as fe,setSecondSrc as ge}from"../../lib/wheels/set-mode.js";import{coverSrcForWheel as pe,parseCoverIndex as he,resolvePaintedSrc as be}from"../../lib/wheels/cover-rendering.js";import Se from"../WheelPlaceholder.js";import we from"../BrandPlate.js";import ke from"../TyreImage.js";import{cardSpinOf as ye}from"../card-spin.js";import{useCardHoverLayer as Ce,useGridCard as j}from"../GridCardTemplate.js";import R from"./CardPicture.js";import D from"./CardProductBadge.js";import{useHeldCardPicture as Fe}from"./useHeldCardPicture.js";import{useProductCardState as xe}from"./ProductCardState.js";import{blockParts as Pe}from"../../lib/block-parts.js";const n=Pe("ProductCard"),ve=[{label:"Auto",value:"auto"},{label:"Always",value:"always"}],_e=a=>Z(ve.map(r=>r.value),"auto",a),Ae=["well","full"],Ne="well",G=a=>Z(Ae,Ne,a);function Be({children:a}){return e("div",{className:"h-full w-full transition-transform duration-500 motion-safe:group-hover:scale-[1.03]",children:a})}function T({fill:a,badge:r,children:o}){const m=J(a);return d("div",{className:`sf-card-image relative aspect-[4/3] overflow-hidden${m?"":" bg-surface"}`,style:m?{backgroundColor:a}:void 0,...n("image-frame"),children:[o,r]})}function H(a,r){const o=de();return ce({[ie]:a},o?.row)??se(r,oe)}function $e(a){const r=xe();return r.kind==="bundle"?e(Ee,{state:r,...a}):r.kind==="tyre"?e(Ie,{state:r,...a}):r.kind!=="wheel"?null:e(ze,{state:r,...a})}function Ee({state:a,imageBackground:r,cardImage:o,showBadge:m,frame:w,swatch:p}){const{bundle:t}=a,{imageSizes:h}=j(),u=G(w)==="full",b=t.components.length,S=t.image?u?e(I,{alt:t.name,src:t.image,fill:!0,sizes:h,className:"object-cover",draggable:!1,...n("image")}):e(I,{alt:t.name,src:t.image,width:1e3,height:1e3,sizes:h,className:"block h-full w-full object-cover",draggable:!1,...n("image")}):e("div",{className:"flex h-full w-full items-center justify-center font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.3em] text-fg-dim",children:ue("{n} piece","{n} pieces",b,{})}),f=e(Be,{children:S}),g=H(p,r),i=m!==!1?e(D,{edge:u}):null;return e(_,{style:A(o),...n("image-block"),children:u?e(T,{fill:g,badge:i,children:f}):d(v,{children:[i,e(R,{image:f,imageBackgroundFill:g})]})})}function Ie({state:a,imageBackground:r,cardImage:o,indexBadge:m,frame:w,swatch:p}){const{tyre:t}=a,{imageSizes:h}=j(),u=H(p,r),b=q(m),S=b!=="off"?e("span",{"aria-hidden":!0,"data-format":b,className:`${O} ${z}`,...n("card-number")}):null,f=e(ke,{image:t.image,className:"h-full w-full",sizes:h,showBackground:!1}),g=e(we,{brand:t.brand,logo:t.brandLogo});return e(_,{style:A(o),...n("image-block"),children:G(w)==="full"?d(T,{fill:u,badge:S,children:[f,g]}):d(v,{children:[S,e(R,{image:f,imageBackgroundFill:u,plate:g})]})})}function ze({state:a,imageBackground:r,cardImage:o,coverIndex:m,indexBadge:w,showBadge:p,setFlags:t,frame:h,setPicture:u,swatch:b,shadow:S,shadowColor:f,shadowOn:g}){const{wheel:i,sel:c,isSet:N}=a,{hover:Q,imageSizes:L,fit:V,rules:y,setGridGap:Y}=j(),C=ye(Q),ee=pe(i,he(m),c.finish?.name,c.shownSrc,V?.holes),[W,ae]=ne(()=>new Set),M=l=>{c.pictureFailed(l),ae(k=>k.has(l)?k:new Set(k).add(l))},U=be({overrideSrc:ee,hookSrc:c.shownSrc,failed:W}),B=i.rendersHaveAlpha===!0||_e(g)==="always"?me(S,f):null,re=B?{...C.style,filter:B}:C.style,$=(l,k)=>e(I,{alt:k,src:l,width:1e3,height:1e3,sizes:L,className:`block h-full w-full object-contain ${C.className}`,style:re,draggable:!1,onError:()=>M(l),...n("image")},l),te=c.finish?`${i.name} — ${c.finish.name}`:i.name,F=N&&fe(u)==="pair",le=F?ge(i.finishes?.find(l=>l.name===c.finish?.name),U):null,s=Fe({src:U,second:le,alt:te,sizes:L,failed:W,onFailed:M,near:c.nearScreen,holdEmpty:c.awaitingProbe}),X=d(v,{children:[s.src?$(s.src,s.alt):e(Se,{imageLabel:i.name,spin:C}),s.trial]}),E=q(w),x=E!=="off",P=H(b,r),K=Ce("picture",J(P)?P:void 0);if(G(h)==="full"){const l=d(v,{children:[x?e("span",{"aria-hidden":!0,"data-format":E,className:`${O} ${z}`,...n("card-number")}):null,e(D,{show:p!==!1,numbered:x,sale:y.sale,axleSets:y.axleSets,setFlags:t!==!1,edge:!0})]});return e(_,{style:A(o),"data-set-picture":N&&!F?"one":void 0,...n("image-block"),children:d(T,{fill:P,badge:l,children:[d("div",{className:"flex h-full w-full items-center justify-center",children:[X,s.second?$(s.second,`${s.alt} — right`):null]}),K]})})}return d(_,{style:A(o),"data-set-picture":N&&!F?"one":void 0,...n("image-block"),children:[x?e("span",{"aria-hidden":!0,"data-format":E,className:`${O} ${z}`,...n("card-number")}):null,e(D,{show:p!==!1,numbered:x,sale:y.sale,axleSets:y.axleSets,setFlags:t!==!1}),e(R,{image:X,imageSecond:s.second?$(s.second,`${s.alt} — right`):void 0,wide:F,imageBackgroundFill:P,setGridGap:Y,plate:K,shadowed:!!B})]})}export{Ne as DEFAULT_PICTURE_FRAME,Ae as PICTURE_FRAMES,ve as SHADOW_ON,$e as default,_e as shadowOnOf};
1
+ "use client";import{jsx as e,jsxs as d,Fragment as v}from"react/jsx-runtime";import{parseOption as V}from"efficient-shell/format";import $ from"next/image";import{useState as ne}from"react";import{HideTaker as _}from"efficient-web-builder/render/components/ViewHideRoot";import{CARD_INDEX_BADGE_CLASS as z,CARD_INDEX_CLASS as I,parseCardIndexFormat as q}from"efficient-web-builder/format/lib/sections/product-card-style";import{CARD_IMAGE_BG_OFF as se,cardImageBackgroundPaints as J,resolveCardImageBackground as ie}from"efficient-web-builder/format/lib/content/card-image-background";import{cardImageShapeTokens as A}from"efficient-web-builder/format/lib/content/card-image-shape";import{BOX_SWATCH_PROP as ce,boxSwatchFill as de}from"efficient-web-builder/format/lib/content/box-background";import{useCardRow as me}from"efficient-web-builder/render/components/CardRowContext";import{pictureShadowFilter as ue}from"efficient-easel/screen/lib/document/shadow-values";import{sayCount as fe}from"efficient-web-builder/format/lib/editor-words";import{parseSetPicture as ge,setSecondSrc as pe}from"../../lib/wheels/set-mode.js";import{coverSrcForWheel as he,parseCoverIndex as be,resolvePaintedSrc as Se}from"../../lib/wheels/cover-rendering.js";import we from"../WheelPlaceholder.js";import Ce from"../BrandPlate.js";import ke from"../TyreImage.js";import{cardSpinOf as ye}from"../card-spin.js";import{CARD_HOVER_ZOOM_CLASS as Fe,useCardHoverLayer as xe,useCardHoverZooms as Pe,useGridCard as R}from"../GridCardTemplate.js";import j from"./CardPicture.js";import D from"./CardProductBadge.js";import{useHeldCardPicture as ve}from"./useHeldCardPicture.js";import{useProductCardState as _e}from"./ProductCardState.js";import{blockParts as Ae}from"../../lib/block-parts.js";const o=Ae("ProductCard"),Ne=[{label:"Auto",value:"auto"},{label:"Always",value:"always"}],Oe=a=>V(Ne.map(r=>r.value),"auto",a),Be=["well","full"],Ee="well",G=a=>V(Be,Ee,a);function $e({children:a}){return e("div",{className:"h-full w-full transition-transform duration-500 motion-safe:group-hover:scale-[1.03]",children:a})}function H({fill:a,badge:r,children:n}){const m=J(a);return d("div",{className:`sf-card-image relative aspect-[4/3] overflow-hidden${m?"":" bg-surface"}`,style:m?{backgroundColor:a}:void 0,...o("image-frame"),children:[n,r]})}function T(a,r){const n=me();return de({[ce]:a},n?.row)??ie(r,se)}function ze(a){const r=_e();return r.kind==="bundle"?e(Ie,{state:r,...a}):r.kind==="tyre"?e(Re,{state:r,...a}):r.kind!=="wheel"?null:e(je,{state:r,...a})}function Ie({state:a,imageBackground:r,cardImage:n,showBadge:m,frame:w,swatch:p}){const{bundle:t}=a,{imageSizes:h}=R(),u=G(w)==="full",b=t.components.length,S=t.image?u?e($,{alt:t.name,src:t.image,fill:!0,sizes:h,className:"object-cover",draggable:!1,...o("image")}):e($,{alt:t.name,src:t.image,width:1e3,height:1e3,sizes:h,className:"block h-full w-full object-cover",draggable:!1,...o("image")}):e("div",{className:"flex h-full w-full items-center justify-center font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.3em] text-fg-dim",children:fe("{n} piece","{n} pieces",b,{})}),f=e($e,{children:S}),g=T(p,r),i=m!==!1?e(D,{edge:u}):null;return e(_,{style:A(n),...o("image-block"),children:u?e(H,{fill:g,badge:i,children:f}):d(v,{children:[i,e(j,{image:f,imageBackgroundFill:g})]})})}function Re({state:a,imageBackground:r,cardImage:n,indexBadge:m,frame:w,swatch:p}){const{tyre:t}=a,{imageSizes:h}=R(),u=T(p,r),b=q(m),S=b!=="off"?e("span",{"aria-hidden":!0,"data-format":b,className:`${I} ${z}`,...o("card-number")}):null,f=e(ke,{image:t.image,className:"h-full w-full",sizes:h,showBackground:!1}),g=e(Ce,{brand:t.brand,logo:t.brandLogo});return e(_,{style:A(n),...o("image-block"),children:G(w)==="full"?d(H,{fill:u,badge:S,children:[f,g]}):d(v,{children:[S,e(j,{image:f,imageBackgroundFill:u,plate:g})]})})}function je({state:a,imageBackground:r,cardImage:n,coverIndex:m,indexBadge:w,showBadge:p,setFlags:t,frame:h,setPicture:u,swatch:b,shadow:S,shadowColor:f,shadowOn:g}){const{wheel:i,sel:c,isSet:N}=a,{hover:Q,imageSizes:L,fit:Y,rules:k,setGridGap:ee}=R(),y=ye(Q),ae=he(i,be(m),c.finish?.name,c.shownSrc,Y?.holes),[W,re]=ne(()=>new Set),M=l=>{c.pictureFailed(l),re(C=>C.has(l)?C:new Set(C).add(l))},U=Se({overrideSrc:ae,hookSrc:c.shownSrc,failed:W}),O=i.rendersHaveAlpha===!0||Oe(g)==="always"?ue(S,f):null,te=O?{...y.style,filter:O}:y.style,B=(l,C)=>e($,{alt:C,src:l,width:1e3,height:1e3,sizes:L,className:`block h-full w-full object-contain ${y.className}`,style:te,draggable:!1,onError:()=>M(l),...o("image")},l),le=c.finish?`${i.name} — ${c.finish.name}`:i.name,F=N&&ge(u)==="pair",oe=F?pe(i.finishes?.find(l=>l.name===c.finish?.name),U):null,s=ve({src:U,second:oe,alt:le,sizes:L,failed:W,onFailed:M,near:c.nearScreen,holdEmpty:c.awaitingProbe}),X=d(v,{children:[s.src?B(s.src,s.alt):e(we,{imageLabel:i.name,spin:y}),s.trial]}),E=q(w),x=E!=="off",P=T(b,r),Z=xe("picture",J(P)?P:void 0),K=Pe()?Fe:void 0;if(G(h)==="full"){const l=d(v,{children:[x?e("span",{"aria-hidden":!0,"data-format":E,className:`${I} ${z}`,...o("card-number")}):null,e(D,{show:p!==!1,numbered:x,sale:k.sale,axleSets:k.axleSets,setFlags:t!==!1,edge:!0})]});return e(_,{className:K,style:A(n),"data-set-picture":N&&!F?"one":void 0,...o("image-block"),children:d(H,{fill:P,badge:l,children:[d("div",{className:"flex h-full w-full items-center justify-center",children:[X,s.second?B(s.second,`${s.alt} — right`):null]}),Z]})})}return d(_,{className:K,style:A(n),"data-set-picture":N&&!F?"one":void 0,...o("image-block"),children:[x?e("span",{"aria-hidden":!0,"data-format":E,className:`${I} ${z}`,...o("card-number")}):null,e(D,{show:p!==!1,numbered:x,sale:k.sale,axleSets:k.axleSets,setFlags:t!==!1}),e(j,{image:X,imageSecond:s.second?B(s.second,`${s.alt} — right`):void 0,wide:F,imageBackgroundFill:P,setGridGap:ee,plate:Z,shadowed:!!O})]})}export{Ee as DEFAULT_PICTURE_FRAME,Be as PICTURE_FRAMES,Ne as SHADOW_ON,ze as default,Oe as shadowOnOf};
@@ -16,7 +16,8 @@ export interface FillRowCards {
16
16
  limit?: number;
17
17
  cards?: number;
18
18
  }
19
- export declare function fillRowCss(cls: string, gridClass: string, { limit, cards }?: FillRowCards): string;
19
+ export declare function fillRowCss(cls: string, gridClass: string, cards?: FillRowCards): string;
20
+ export declare function centerRowCss(cls: string, gridClass: string, cards?: FillRowCards): string;
20
21
  export interface GridBand {
21
22
  min?: number;
22
23
  max?: number;
@@ -1 +1 @@
1
- import{breakpointOf as x}from"efficient-web-builder/format/lib/content/view-lines";function h(n){const o=/(?:^|\s)grid-cols-(\d+)(?=\s|$)/.exec(n);if(!o)throw new Error(`gridColumnsOf: no base grid-cols-N in "${n}"`);const e=[...n.matchAll(/(?:^|\s)(max-[\w[\]-]+):grid-cols-(\d+)(?=\s|$)/g)].flatMap(t=>{const s=x(t[1]);return s?.max?[{below:s.px,columns:Number(t[2])}]:[]}).sort((t,s)=>s.below-t.below);return{base:Number(o[1]),steps:e}}function f(n,o){return Math.max(1,Math.min(n,Math.floor(o)))}function M(n,o){return{base:f(n.base,o),steps:n.steps.map(e=>({below:e.below,columns:f(e.columns,o)}))}}const w="sf-card-tracks",$=n=>n.split(/\s+/).includes(w),p=(n,o=!1)=>o?`--sf-cols:${n}`:`grid-template-columns:repeat(${n},minmax(0,1fr))`;function C(n,o,{limit:e,cards:t}={}){const s=h(o),l=$(o),u=typeof e=="number"&&e>0?e:void 0,d=Math.max(s.base,...s.steps.map(r=>r.columns));if(t!==void 0&&Math.min(t,u??1/0)>=d)return"";const a=[];for(const r of b(s)){const c=u===void 0?r.columns:f(r.columns,u),m=[];c<r.columns&&m.push(`.${n}.${n}{${p(c,l)}}`);for(let i=c-1;i>=1;i--)m.push(`.${n}:not(:has(> :nth-child(${i+1}))){${p(i,l)}}`);a.push(g(r,m))}return a.join("")}function b({base:n,steps:o}){return[{min:o[0]?.below,max:void 0,columns:n},...o.map((e,t)=>({min:o[t+1]?.below,max:e.below,columns:e.columns}))]}function g(n,o){if(o.length===0)return"";const e=n.min!==void 0&&n.max!==void 0?`(${n.min}px <= width < ${n.max}px)`:n.max!==void 0?`(width < ${n.max}px)`:n.min!==void 0?`(width >= ${n.min}px)`:void 0;return e?`@media ${e}{${o.join("")}}`:o.join("")}export{w as CARD_TRACKS_CLASS,M as fillRow,f as fillRowColumns,C as fillRowCss,b as gridBands,h as gridColumnsOf,p as gridTracks,$ as hasCardTracks,g as inBand};
1
+ import{breakpointOf as x}from"efficient-web-builder/format/lib/content/view-lines";function $(n){const o=/(?:^|\s)grid-cols-(\d+)(?=\s|$)/.exec(n);if(!o)throw new Error(`gridColumnsOf: no base grid-cols-N in "${n}"`);const e=[...n.matchAll(/(?:^|\s)(max-[\w[\]-]+):grid-cols-(\d+)(?=\s|$)/g)].flatMap(t=>{const r=x(t[1]);return r?.max?[{below:r.px,columns:Number(t[2])}]:[]}).sort((t,r)=>r.below-t.below);return{base:Number(o[1]),steps:e}}function f(n,o){return Math.max(1,Math.min(n,Math.floor(o)))}function M(n,o){return{base:f(n.base,o),steps:n.steps.map(e=>({below:e.below,columns:f(e.columns,o)}))}}const h="sf-card-tracks",w=n=>n.split(/\s+/).includes(h),b=(n,o=!1)=>o?`--sf-cols:${n}`:`grid-template-columns:repeat(${n},minmax(0,1fr))`;function T(n,o,e={}){const t=w(o);return p(n,o,e,(r,i,u)=>[`${r}{${b(u,t)}}`])}function p(n,o,{limit:e,cards:t},r){const i=$(o),u=typeof e=="number"&&e>0?e:void 0,d=Math.max(i.base,...i.steps.map(s=>s.columns));if(t!==void 0&&Math.min(t,u??1/0)>=d)return"";const a=[];for(const s of R(i)){const m=u===void 0?s.columns:f(s.columns,u),l=[];m<s.columns&&l.push(...r(`.${n}.${n}`,s.columns,m));for(let c=m-1;c>=1;c--)l.push(...r(`.${n}:not(:has(> :nth-child(${c+1})))`,s.columns,c));a.push(k(s,l))}return a.join("")}function g(n,o,e){return[`${n}{grid-template-columns:repeat(${2*o},minmax(0,1fr))}`,`${n}>*{grid-column:span 2}`,`${n}>:first-child{grid-column:${o-e+1}/span 2}`]}function A(n,o,e={}){return p(n,o,e,g)}function R({base:n,steps:o}){return[{min:o[0]?.below,max:void 0,columns:n},...o.map((e,t)=>({min:o[t+1]?.below,max:e.below,columns:e.columns}))]}function k(n,o){if(o.length===0)return"";const e=n.min!==void 0&&n.max!==void 0?`(${n.min}px <= width < ${n.max}px)`:n.max!==void 0?`(width < ${n.max}px)`:n.min!==void 0?`(width >= ${n.min}px)`:void 0;return e?`@media ${e}{${o.join("")}}`:o.join("")}export{h as CARD_TRACKS_CLASS,A as centerRowCss,M as fillRow,f as fillRowColumns,T as fillRowCss,R as gridBands,$ as gridColumnsOf,b as gridTracks,w as hasCardTracks,k as inBand};