efficient-storefront-blocks 0.126.4 → 0.127.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 (37) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/chunks/{CustomHtmlCodeWindow-LBWGRQID.js → CustomHtmlCodeWindow-KYIRVDW4.js} +1 -1
  3. package/dist/chunks/{EditorPreviewCheckout-PWVUKVPS.js → EditorPreviewCheckout-ZKCDEXJB.js} +1 -1
  4. package/dist/chunks/SiteEditorProvider-WQG3BNYV.js +1 -0
  5. package/dist/chunks/{chunk-BLDYFJQ6.js → chunk-5LNWW4W3.js} +1 -1
  6. package/dist/chunks/{chunk-CKAOUQ5E.js → chunk-FP652PBZ.js} +1 -1
  7. package/dist/chunks/chunk-IEGDV4YL.js +1 -0
  8. package/dist/chunks/{chunk-JYZ42RYY.js → chunk-INU4IUCT.js} +3 -3
  9. package/dist/chunks/{chunk-3ZZ3Z6U5.js → chunk-KNFNQXH3.js} +1 -1
  10. package/dist/chunks/{chunk-SI2DLHOL.js → chunk-LFKRQYYH.js} +1 -1
  11. package/dist/chunks/{chunk-ADYUBBPE.js → chunk-N64MDCTX.js} +1 -1
  12. package/dist/chunks/{chunk-VUFE7ACW.js → chunk-WFSVFVZX.js} +1 -1
  13. package/dist/chunks/{fitment-data-VOATE5L5.js → fitment-data-GPEMPASJ.js} +1 -1
  14. package/dist/chunks/{section-css-style-42PP2TPA.js → section-css-style-UICZZ7D5.js} +1 -1
  15. package/dist/index.js +26 -26
  16. package/dist/render/app/globals.css +12 -10
  17. package/dist/render/built-with.json +1 -1
  18. package/dist/render/components/GridCardTemplate.js +1 -1
  19. package/dist/render/components/wheels-plp/PlpNotifyMeDialog.js +1 -1
  20. package/dist/render/lib/catalog/from-wheel.js +1 -1
  21. package/dist/render/lib/wheels/set-mode.d.ts +2 -3
  22. package/dist/render/lib/wheels/set-mode.js +1 -1
  23. package/dist/render/lib/wheels/variant-spec.d.ts +1 -0
  24. package/dist/render/lib/wheels/variant-spec.js +1 -1
  25. package/dist/render/lib/wheels/variants.js +1 -1
  26. package/dist/routine-index.json +1 -1
  27. package/dist/value-index.json +1 -1
  28. package/dist/words.d.ts +3 -2
  29. package/dist/words.js +1 -1
  30. package/package.json +2 -2
  31. package/dist/chunks/SiteEditorProvider-73GAIF7L.js +0 -1
  32. package/dist/chunks/chunk-WR3AVDA5.js +0 -1
  33. /package/dist/chunks/{chunk-D5HXXBSX.js → chunk-DIX2FLX7.js} +0 -0
  34. /package/dist/chunks/{chunk-CKAOUQ5E.js.LEGAL.txt → chunk-FP652PBZ.js.LEGAL.txt} +0 -0
  35. /package/dist/chunks/{chunk-JYZ42RYY.js.LEGAL.txt → chunk-INU4IUCT.js.LEGAL.txt} +0 -0
  36. /package/dist/chunks/{chunk-OHEU7JQW.js → chunk-VRXNUWWF.js} +0 -0
  37. /package/dist/chunks/{chunk-ZV2GXEDX.js → chunk-XSDGCHJH.js} +0 -0
@@ -4381,15 +4381,17 @@ em.text-accent {
4381
4381
  isolation: isolate;
4382
4382
  background-image: var(--sf-card-studio-ground);
4383
4383
  }
4384
- /* Show next image: the layer covers the whole picture box, so it paints the
4385
- same ellipse (opaque, over the card's flat ground colour the layer is
4386
- handed), holds the next rendering where the wheel sits, at its size (no
4387
- zoom, no crop), and draws the same floor shadows on itself (below). */
4388
- .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media] {
4384
+ /* Show next image of a RENDERING (`data-hover-fit="contain"`): the layer
4385
+ covers the whole picture box, so it paints the same ellipse (opaque, over
4386
+ the card's flat ground colour the layer is handed), holds the next
4387
+ rendering where the wheel sits, at its size (no zoom, no crop), and draws
4388
+ the same floor shadows on itself (below). A product PHOTO (fit cover) is
4389
+ left as the layer draws it: it covers the whole picture box. */
4390
+ .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media][data-hover-fit="contain"] {
4389
4391
  isolation: isolate;
4390
4392
  background-image: var(--sf-card-studio-ground);
4391
4393
  }
4392
- .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media] > img {
4394
+ .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media][data-hover-fit="contain"] > img {
4393
4395
  position: absolute;
4394
4396
  left: 11.5cqw;
4395
4397
  top: 28.6cqw;
@@ -4410,8 +4412,8 @@ em.text-accent {
4410
4412
  }
4411
4413
  .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"])::before,
4412
4414
  .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"])::after,
4413
- .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media]::before,
4414
- .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media]::after {
4415
+ .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media][data-hover-fit="contain"]::before,
4416
+ .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media][data-hover-fit="contain"]::after {
4415
4417
  content: "";
4416
4418
  position: absolute;
4417
4419
  z-index: -1;
@@ -4419,7 +4421,7 @@ em.text-accent {
4419
4421
  }
4420
4422
  /* The wide, faint shadow (`.s2`): 142% of the wheel wide, 1:5. */
4421
4423
  .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"])::before,
4422
- .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media]::before {
4424
+ .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media][data-hover-fit="contain"]::before {
4423
4425
  left: -2.36cqw;
4424
4426
  top: 96.41cqw;
4425
4427
  width: 109.34cqw;
@@ -4429,7 +4431,7 @@ em.text-accent {
4429
4431
  }
4430
4432
  /* The near, darker shadow (`.s1`): the wheel's width, 1:6. */
4431
4433
  .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"])::after,
4432
- .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media]::after {
4434
+ .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media][data-hover-fit="contain"]::after {
4433
4435
  left: 14.58cqw;
4434
4436
  top: 95.85cqw;
4435
4437
  width: 77cqw;
@@ -1,3 +1,3 @@
1
1
  {
2
- "efficient-web-builder": "74.13.0"
2
+ "efficient-web-builder": "75.0.0"
3
3
  }
@@ -1 +1 @@
1
- "use client";import{jsx as t,Fragment as x,jsxs as P}from"react/jsx-runtime";import{createContext as D,useContext as E,useMemo as y}from"react";import{parseOption as h}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 H,randomCardColour as R}from"../lib/sections/card-tone.js";import{CardLookContext as C}from"./card-pieces/card-row.js";import{CardBuyDialog as B}from"./card-pieces/CardBuyButton.js";import M from"./card-pieces/CardSurfaceFrame.js";import{BundleCardStateProvider as V,TyreCardStateProvider as z,useProductCardState as b,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 Qe(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 Ze(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},er={sale:!0,axleSets:!1,setTotal:!0,wasFollowsSize:!0,quoteSets:!1,showSingle:!0,armOnContact:!0},de={kindLabel:null,brand:!1,process:!0,tyreBrand:!0},ie=[],le=[{label:"Flat",value:"flat"},{label:"Soft grey",value:"soft"},{label:"Studio",value:"studio"}],ce={flat:"",soft:"sf-card-ground-soft",studio:"sf-card-ground-studio"},rr=e=>h(le.map(r=>r.value),"flat",e),ue=[{label:"Under the picture",value:"under"},{label:"Over the picture",value:"over"}],or=e=>h(ue.map(r=>r.value),"under",e),me="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:ie,rules:se,ground:"flat",words:"under"},O=D(T);function m(){return E(O)}function tr({value:e,children:r}){const o=y(()=>({...T,...fe(e)}),[e]);return t(O.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:H(r,o),colourRandom:R(o)}}function pe(e){const r=e.designCode||e.slug||"";return{name:e.name??"",eyebrow:e.brand??"",note:"",href:K(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:i,ground:d,words:u}=m(),l=[ce[d],u==="over"?me:""].filter(Boolean);return t(M,{surface:a?Se:[we,...l].join(" "),span:n?ge:void 0,href:r,label:o,linked:!i,probes:s,arm:f,layer:c,children:t("div",{className:xe,...ae("card-content"),children:t(k,{children:e})})})}const ye="var(--card-bg)";function he(e,r=ye){const o=ve();return!o||o.cover!==e||!o.media?null:t(W,{media:o.media,name:o.name,cover:e,ground:r})}function ve(){const{hover:e}=m(),r=b();if(e.kind!=="nextImage"||!e.media||r.kind!=="wheel")return null;const o=r.sel.finish?.name,n=Re(r.wheel,o);return{cover:e.media.cover,name:r.wheel.name,media:U(n,e.media,o)}}function Re(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)}]:[]}}function be({children:e}){const r=L(),{wheel:o,sel:n}=_(),a=n.finish?.color,s=y(()=>r?{...r,row:w(o,a)}:null,[r,o,a]);return s?t(G.Provider,{value:s,children:e}):t(x,{children:e})}function _e({copy:e}){const{wheel:r,sel:o,isSet:n}=_(),{rules:a}=m(),s=he("card");return P(x,{children:[t(S,{copy:t(be,{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(B,{})]})}function A(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(_e,{copy:e})})})}function nr({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(i=>w(i)),items:e,fallback:c?t(g,{}):null,wrapCopy:(i,d)=>A(i,d,n,r),children:o})}function ar({items:e,tyreOf:r,tyreFit:o}){const n=m(),{ownerId:a,ownerType:s,Template:f,editing:c}=n,i=e.map(d=>r(d));return t(p,{ownerId:a,ownerType:s,Template:f,rows:e.map((d,u)=>{const l=i[u];return l?pe(l):w(d)}),items:e,fallback:c?t(g,{}):null,wrapCopy:(d,u)=>{const l=i[u.index];return l?Oe(d,Y(l,o?.(l)??null),c):A(d,u,n)},children:d=>d})}function Te({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(z,{tyre:r,editing:o,children:t(C.Provider,{value:"catalog",children:t(Te,{copy:e})})})}function Ie(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 sr({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:Ie,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:X("The card is empty. Add parts to its card template in Layers.")})}export{le as CARD_GROUNDS,ue as CARD_WORDS,me as CARD_WORDS_OVER_CLASS,se as GRID_CARD_RULES,sr as GridBundleCards,tr as GridCardProvider,nr as GridCards,ar as GridMixedCards,er as LISTING_CARD_RULES,Ce as bundleCardRow,I as bundlePagePath,rr as cardGroundOf,Re as cardHoverRow,Ze as cardRowsGrid,or as cardWordsOf,Qe as gridIndexCss,w as productCardRow,pe as tyreCardRow,he as useCardHoverLayer,m as useGridCard};
1
+ "use client";import{jsx as t,Fragment as x,jsxs as P}from"react/jsx-runtime";import{createContext as D,useContext as E,useMemo as y}from"react";import{parseOption as v}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 h}from"../lib/content/field-usage.js";import{CARD_IMAGE_SIZES as j}from"../lib/sections/card-image-sizes.js";import{productTone as $,productToneVaried as H,randomCardColour as R}from"../lib/sections/card-tone.js";import{CardLookContext as C}from"./card-pieces/card-row.js";import{CardBuyDialog as B}from"./card-pieces/CardBuyButton.js";import M from"./card-pieces/CardSurfaceFrame.js";import{BundleCardStateProvider as V,TyreCardStateProvider as z,useProductCardState as b,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 Qe(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 Ze(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},er={sale:!0,axleSets:!1,setTotal:!0,wasFollowsSize:!0,quoteSets:!1,showSingle:!0,armOnContact:!0},de={kindLabel:null,brand:!1,process:!0,tyreBrand:!0},ie=[],le=[{label:"Flat",value:"flat"},{label:"Soft grey",value:"soft"},{label:"Studio",value:"studio"}],ce={flat:"",soft:"sf-card-ground-soft",studio:"sf-card-ground-studio"},rr=e=>v(le.map(r=>r.value),"flat",e),ue=[{label:"Under the picture",value:"under"},{label:"Over the picture",value:"over"}],or=e=>v(ue.map(r=>r.value),"under",e),fe="sf-card-words-over",T={ownerId:"",ownerType:"ProductGrid",Template:void 0,hover:F({},"ProductGrid"),imageSizes:j,fieldUsage:h,tyreFieldUsage:h,reserveEyebrow:!1,editing:!1,eyebrow:de,fit:null,colours:ie,rules:se,ground:"flat",words:"under"},O=D(T);function f(){return E(O)}function tr({value:e,children:r}){const o=y(()=>({...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:H(r,o),colourRandom:R(o)}}function pe(e){const r=e.designCode||e.slug||"";return{name:e.name??"",eyebrow:e.brand??"",note:"",href:K(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:m,layer:c}){const{editing:i,ground:d,words:u}=f(),l=[ce[d],u==="over"?fe:""].filter(Boolean);return t(M,{surface:a?Se:[we,...l].join(" "),span:n?ge:void 0,href:r,label:o,linked:!i,probes:s,arm:m,layer:c,children:t("div",{className:xe,...ae("card-content"),children:t(k,{children:e})})})}const ye="var(--card-bg)";function ve(e,r=ye){const o=he();return!o||o.cover!==e||!o.media?null:t(W,{media:o.media,cover:e,ground:r})}function he(){const{hover:e}=f(),r=b();if(e.kind!=="nextImage"||!e.media||r.kind!=="wheel")return null;const o=r.sel.finish?.name,n=Re(r.wheel,o);return{cover:e.media.cover,media:U(n,e.media,o)}}function Re(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)}]:[]}}function be({children:e}){const r=L(),{wheel:o,sel:n}=_(),a=n.finish?.color,s=y(()=>r?{...r,row:w(o,a)}:null,[r,o,a]);return s?t(G.Provider,{value:s,children:e}):t(x,{children:e})}function _e({copy:e}){const{wheel:r,sel:o,isSet:n}=_(),{rules:a}=f(),s=ve("card");return P(x,{children:[t(S,{copy:t(be,{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(B,{})]})}function A(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(_e,{copy:e})})})}function nr({wheels:e,finishes:r,children:o}){const n=f(),{ownerId:a,ownerType:s,Template:m,editing:c}=n;return t(p,{ownerId:a,ownerType:s,Template:m,rows:e.map(i=>w(i)),items:e,fallback:c?t(g,{}):null,wrapCopy:(i,d)=>A(i,d,n,r),children:o})}function ar({items:e,tyreOf:r,tyreFit:o}){const n=f(),{ownerId:a,ownerType:s,Template:m,editing:c}=n,i=e.map(d=>r(d));return t(p,{ownerId:a,ownerType:s,Template:m,rows:e.map((d,u)=>{const l=i[u];return l?pe(l):w(d)}),items:e,fallback:c?t(g,{}):null,wrapCopy:(d,u)=>{const l=i[u.index];return l?Oe(d,Y(l,o?.(l)??null),c):A(d,u,n)},children:d=>d})}function Te({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(z,{tyre:r,editing:o,children:t(C.Provider,{value:"catalog",children:t(Te,{copy:e})})})}function Ie(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 sr({bundles:e,children:r}){const{ownerId:o,ownerType:n,Template:a,editing:s}=f();return t(p,{ownerId:o,ownerType:n,Template:a,rows:e.map(Ce),items:e,fallback:s?t(g,{}):null,wrapCopy:Ie,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:X("The card is empty. Add parts to its card template in Layers.")})}export{le as CARD_GROUNDS,ue as CARD_WORDS,fe as CARD_WORDS_OVER_CLASS,se as GRID_CARD_RULES,sr as GridBundleCards,tr as GridCardProvider,nr as GridCards,ar as GridMixedCards,er as LISTING_CARD_RULES,Ce as bundleCardRow,I as bundlePagePath,rr as cardGroundOf,Re as cardHoverRow,Ze as cardRowsGrid,or as cardWordsOf,Qe as gridIndexCss,w as productCardRow,pe as tyreCardRow,ve as useCardHoverLayer,f as useGridCard};
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useId as y,useRef as S,useState as m}from"react";import{useCurrency as P}from"../CurrencyContext.js";import{formatPrice as _}from"../../lib/commerce.js";import{withRMark as k}from"efficient-web-builder/render/components/RMark";import I from"../PopupFrame.js";import{useStockAlertSignup as E}from"../useStockAlertSignup.js";import{UNPRICED_LABEL as A,resolveSetPrice as D}from"../../lib/wheels/price-display.js";function K({wheelName:p,productSlug:N,finishName:h,variants:i,initialSize:w,onClose:o,editing:C=!1}){const s=y(),f=y(),l=S(null),{currency:u}=P(),n=E(),[z,M]=m(()=>w??i[0]?.size??""),[c,W]=m(""),[x,j]=m(!1),a=i.find(r=>r.size===z)??i[0];if(!a)return null;const B=n.status==="sent",d=n.status==="sending",g=n.status==="invalid"?"Please enter a valid email address.":n.status==="error"?"Couldn't save that — please try again.":null;function R(){a&&n.submit({partNumbers:a.components.map(r=>r.partNumber),email:c,productSlug:N,subscribeToOffers:x,dryRun:C})}return e(I,{site:{blur:6,scroll:!0,focusRef:l,trapRef:l},labelledBy:s,onClose:o,children:t("div",{ref:l,tabIndex:-1,className:"relative w-[420px] max-w-full border-2 border-accent bg-surface text-left shadow-[0_24px_60px_rgba(0,0,0,0.55)] outline-none",children:[e("button",{type:"button",onClick:o,"aria-label":"Close",className:"absolute right-[10px] top-[10px] z-[2] flex h-9 w-9 cursor-pointer items-center justify-center text-fg-dim transition-colors hover:text-accent",children:e("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,children:e("path",{d:"M6 6l12 12M18 6 6 18"})})}),B?t("div",{className:"px-6 py-8 text-center",children:[e("span",{className:"mx-auto mb-4 grid h-16 w-16 place-items-center rounded-full border-[1.5px] border-accent bg-accent/15",children:e("svg",{width:"30",height:"30",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2.5","aria-hidden":!0,children:e("path",{d:"M20 6 9 17l-5-5"})})}),e("h3",{id:s,className:"font-display text-[22px] font-medium uppercase leading-tight tracking-[-0.02em]",children:"You're on the list"}),t("p",{className:"mx-auto mt-2 max-w-[34ch] text-[13px] leading-[1.6] text-fg-dim",children:["We'll alert ",e("strong",{className:"font-normal text-fg",children:c.trim()})," as soon as the ",k(p)," in ",a.size," is back. Keep an eye on your inbox."]}),e("button",{type:"button",onClick:o,className:"mt-6 w-full cursor-pointer border border-line px-4 py-3 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-fg transition-colors hover:border-accent hover:text-accent",children:"Continue browsing"})]}):t("form",{className:"p-6",noValidate:!0,onSubmit:r=>{r.preventDefault(),R()},children:[t("div",{className:"mb-2 flex items-center gap-3",children:[e("span",{className:"grid h-11 w-11 flex-none place-items-center border-[1.5px] border-accent bg-accent/15",children:t("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2","aria-hidden":!0,children:[e("path",{d:"M18 8a6 6 0 1 0-12 0c0 7-3 9-3 9h18s-3-2-3-9"}),e("path",{d:"M13.7 21a2 2 0 0 1-3.4 0"})]})}),t("div",{children:[e("div",{className:"font-mono text-[10px] uppercase tracking-[0.3em] text-accent",children:"Back-in-stock alert"}),e("h3",{id:s,className:"mt-0.5 font-display text-[22px] font-medium uppercase leading-tight tracking-[-0.02em]",children:"Notify me"})]})]}),t("p",{className:"mb-5 text-[13px] leading-[1.6] text-fg-dim",children:["We'll email you the moment the"," ",e("strong",{className:"font-normal text-fg",children:k(p)}),h?` in ${h}`:""," ","is back in stock. No spam — one alert, then we're done."]}),t("fieldset",{className:"mb-4 border-0 p-0",children:[e("legend",{className:"mb-2 font-mono text-[10px] uppercase tracking-[0.16em] text-fg-dim",children:"Which fitment?"}),e("div",{className:"flex flex-wrap gap-2",children:i.map(r=>{const b=r.size===a.size;return t("button",{type:"button","aria-pressed":b,onClick:()=>M(r.size),className:["flex min-w-[calc(50%-4px)] flex-1 cursor-pointer flex-col items-start gap-0.5 border-[1.5px] px-3 py-3 text-left transition-colors",b?"border-accent bg-accent/15":"border-line hover:border-accent/60"].join(" "),children:[e("span",{className:"font-mono text-[12px] font-bold tracking-[0.08em] text-fg",children:r.size}),e("span",{className:"font-mono text-[10px] tracking-[0.08em] text-fg-dim",children:(()=>{const v=D(r.components,u);return v.setTotal!=null?_(v.setTotal,u):A})()})]},r.size)})})]}),t("div",{className:"mb-4",children:[e("label",{htmlFor:f,className:"mb-2 block font-mono text-[10px] uppercase tracking-[0.16em] text-fg-dim",children:"Email address"}),e("input",{id:f,type:"email",value:c,onChange:r=>{W(r.target.value),(n.status==="invalid"||n.status==="error")&&n.reset()},placeholder:"you@example.com",disabled:d,className:"w-full border-2 border-line bg-bg px-4 py-3 font-display text-[15px] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent disabled:opacity-60"})]}),t("label",{className:"mb-5 flex cursor-pointer items-start gap-3 text-[12px] leading-[1.5] text-fg-dim",children:[e("input",{type:"checkbox",checked:x,onChange:r=>j(r.target.checked),className:"mt-0.5 h-[18px] w-[18px] flex-none cursor-pointer accent-[var(--accent)]"}),e("span",{children:"Also send me fitment tips and occasional offers for my vehicle."})]}),t("button",{type:"submit",disabled:d,className:"flex h-[50px] w-full cursor-pointer items-center justify-center gap-2 bg-btn px-4 font-mono text-[12px] font-bold uppercase tracking-[0.24em] text-btn-ink transition-colors hover:bg-fg disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:bg-btn",children:[t("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,children:[e("path",{d:"m22 2-7 20-4-9-9-4Z"}),e("path",{d:"M22 2 11 13"})]}),d?"Sending…":"Notify me when available"]}),g&&e("p",{role:"alert",className:"mt-3 text-[12px] leading-[1.5]",style:{color:"var(--alert)"},children:g}),t("div",{className:"mt-3 flex items-center justify-center gap-2 text-[11px] text-fg-dim",children:[t("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,children:[e("rect",{x:"3",y:"11",width:"18",height:"11",rx:"1"}),e("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]}),"We never share your details."]})]})]})})}export{K as default};
1
+ "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useId as y,useRef as P,useState as m}from"react";import{useCurrency as _}from"../CurrencyContext.js";import{formatPrice as I}from"../../lib/commerce.js";import{withRMark as k}from"efficient-web-builder/render/components/RMark";import E from"../PopupFrame.js";import{useStockAlertSignup as A}from"../useStockAlertSignup.js";import{UNPRICED_LABEL as D,resolveSetPrice as K}from"../../lib/wheels/price-display.js";import{variantOptionLabel as N}from"../../lib/wheels/variant-spec.js";function L({wheelName:p,productSlug:w,finishName:h,variants:i,initialSize:C,onClose:o,editing:z=!1}){const s=y(),f=y(),l=P(null),{currency:u}=_(),n=A(),[M,W]=m(()=>C??i[0]?.size??""),[c,j]=m(""),[x,B]=m(!1),a=i.find(r=>r.size===M)??i[0];if(!a)return null;const R=n.status==="sent",d=n.status==="sending",g=n.status==="invalid"?"Please enter a valid email address.":n.status==="error"?"Couldn't save that — please try again.":null;function S(){a&&n.submit({partNumbers:a.components.map(r=>r.partNumber),email:c,productSlug:w,subscribeToOffers:x,dryRun:z})}return e(E,{site:{blur:6,scroll:!0,focusRef:l,trapRef:l},labelledBy:s,onClose:o,children:t("div",{ref:l,tabIndex:-1,className:"relative w-[420px] max-w-full border-2 border-accent bg-surface text-left shadow-[0_24px_60px_rgba(0,0,0,0.55)] outline-none",children:[e("button",{type:"button",onClick:o,"aria-label":"Close",className:"absolute right-[10px] top-[10px] z-[2] flex h-9 w-9 cursor-pointer items-center justify-center text-fg-dim transition-colors hover:text-accent",children:e("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,children:e("path",{d:"M6 6l12 12M18 6 6 18"})})}),R?t("div",{className:"px-6 py-8 text-center",children:[e("span",{className:"mx-auto mb-4 grid h-16 w-16 place-items-center rounded-full border-[1.5px] border-accent bg-accent/15",children:e("svg",{width:"30",height:"30",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2.5","aria-hidden":!0,children:e("path",{d:"M20 6 9 17l-5-5"})})}),e("h3",{id:s,className:"font-display text-[22px] font-medium uppercase leading-tight tracking-[-0.02em]",children:"You're on the list"}),t("p",{className:"mx-auto mt-2 max-w-[34ch] text-[13px] leading-[1.6] text-fg-dim",children:["We'll alert ",e("strong",{className:"font-normal text-fg",children:c.trim()})," as soon as the ",k(p)," in ",N(a)," is back. Keep an eye on your inbox."]}),e("button",{type:"button",onClick:o,className:"mt-6 w-full cursor-pointer border border-line px-4 py-3 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-fg transition-colors hover:border-accent hover:text-accent",children:"Continue browsing"})]}):t("form",{className:"p-6",noValidate:!0,onSubmit:r=>{r.preventDefault(),S()},children:[t("div",{className:"mb-2 flex items-center gap-3",children:[e("span",{className:"grid h-11 w-11 flex-none place-items-center border-[1.5px] border-accent bg-accent/15",children:t("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2","aria-hidden":!0,children:[e("path",{d:"M18 8a6 6 0 1 0-12 0c0 7-3 9-3 9h18s-3-2-3-9"}),e("path",{d:"M13.7 21a2 2 0 0 1-3.4 0"})]})}),t("div",{children:[e("div",{className:"font-mono text-[10px] uppercase tracking-[0.3em] text-accent",children:"Back-in-stock alert"}),e("h3",{id:s,className:"mt-0.5 font-display text-[22px] font-medium uppercase leading-tight tracking-[-0.02em]",children:"Notify me"})]})]}),t("p",{className:"mb-5 text-[13px] leading-[1.6] text-fg-dim",children:["We'll email you the moment the"," ",e("strong",{className:"font-normal text-fg",children:k(p)}),h?` in ${h}`:""," ","is back in stock. No spam — one alert, then we're done."]}),t("fieldset",{className:"mb-4 border-0 p-0",children:[e("legend",{className:"mb-2 font-mono text-[10px] uppercase tracking-[0.16em] text-fg-dim",children:"Which fitment?"}),e("div",{className:"flex flex-wrap gap-2",children:i.map(r=>{const b=r.size===a.size;return t("button",{type:"button","aria-pressed":b,onClick:()=>W(r.size),className:["flex min-w-[calc(50%-4px)] flex-1 cursor-pointer flex-col items-start gap-0.5 border-[1.5px] px-3 py-3 text-left transition-colors",b?"border-accent bg-accent/15":"border-line hover:border-accent/60"].join(" "),children:[e("span",{className:"font-mono text-[12px] font-bold tracking-[0.08em] text-fg",children:N(r)}),e("span",{className:"font-mono text-[10px] tracking-[0.08em] text-fg-dim",children:(()=>{const v=K(r.components,u);return v.setTotal!=null?I(v.setTotal,u):D})()})]},r.size)})})]}),t("div",{className:"mb-4",children:[e("label",{htmlFor:f,className:"mb-2 block font-mono text-[10px] uppercase tracking-[0.16em] text-fg-dim",children:"Email address"}),e("input",{id:f,type:"email",value:c,onChange:r=>{j(r.target.value),(n.status==="invalid"||n.status==="error")&&n.reset()},placeholder:"you@example.com",disabled:d,className:"w-full border-2 border-line bg-bg px-4 py-3 font-display text-[15px] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent disabled:opacity-60"})]}),t("label",{className:"mb-5 flex cursor-pointer items-start gap-3 text-[12px] leading-[1.5] text-fg-dim",children:[e("input",{type:"checkbox",checked:x,onChange:r=>B(r.target.checked),className:"mt-0.5 h-[18px] w-[18px] flex-none cursor-pointer accent-[var(--accent)]"}),e("span",{children:"Also send me fitment tips and occasional offers for my vehicle."})]}),t("button",{type:"submit",disabled:d,className:"flex h-[50px] w-full cursor-pointer items-center justify-center gap-2 bg-btn px-4 font-mono text-[12px] font-bold uppercase tracking-[0.24em] text-btn-ink transition-colors hover:bg-fg disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:bg-btn",children:[t("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,children:[e("path",{d:"m22 2-7 20-4-9-9-4Z"}),e("path",{d:"M22 2 11 13"})]}),d?"Sending…":"Notify me when available"]}),g&&e("p",{role:"alert",className:"mt-3 text-[12px] leading-[1.5]",style:{color:"var(--alert)"},children:g}),t("div",{className:"mt-3 flex items-center justify-center gap-2 text-[11px] text-fg-dim",children:[t("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,children:[e("rect",{x:"3",y:"11",width:"18",height:"11",rx:"1"}),e("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]}),"We never share your details."]})]})]})})}export{L as default};
@@ -1 +1 @@
1
- import{variantsFittingVehicle as B}from"../wheels/plp-fitment-match.js";import{FALLBACK_FINISH as F}from"../wheels/finish-defaults.js";import{variantEtKey as S,variantSizeGroupKey as V,variantSizeGroupLabel as N,variantSizeGroupNote as I}from"../wheels/variant-spec.js";import{trimDecimal as y}from"../wheels/spec-format.js";import{itemCollections as A}from"./plp-item.js";import{BUILT_IN_LISTING_PATH as g,withListingFilter as D}from"../links/link-rules.js";import{PLP_PARAM as _}from"../wheels/plp-filters.js";import{findVariant as H,isVariantOutOfStock as L}from"../wheels/variants.js";import{HAND_WORDS as O,NOT_HANDED_WORDS as T,variantIsHanded as b}from"../wheels/set-mode.js";const P="handed",k="plain";function x(e){const n=A(e).find(o=>o.trim()!=="");return n?{label:n,href:D(g,{param:_.collections,value:n})}:{label:e.process,href:g}}function q(e){const n=e.variants??[],o=e.finishes.map(t=>({value:t.name,label:t.name,swatch:t.color}));function i(t){const a=[];for(const v of n){const h=t(v);!h||a.some(z=>z.value===h.value)||a.push(h)}return a}const f=i(t=>({value:V(t),label:N(t),note:I(t)})),p=i(t=>t.boltPattern?{value:t.boltPattern,label:t.boltPattern}:null),m=i(t=>{const a=S(t);return a===null?null:{value:a,label:`ET ${a}`}}),l=i(t=>t.centreBore==null?null:{value:y(t.centreBore),label:`${y(t.centreBore)} mm`}),s=n.some(b),r=s?i(t=>({value:b(t)?P:k,label:b(t)?O:T})):[],c=n.map(t=>({id:`${t.finishName}|${t.size}`,options:{finish:t.finishName,size:V(t),variantSize:t.size,...t.boltPattern?{boltPattern:t.boltPattern}:{},...S(t)!==null?{et:S(t)}:{},...t.centreBore==null?{}:{centreBore:y(t.centreBore)},...s?{pairing:b(t)?P:k}:{}},inStock:!L(t),image:null,components:t.components})),u=((e.defaultFinish?o.find(t=>t.value===e.defaultFinish):void 0)??o[0])?.value;return{kind:"alloy-wheel",source:e,slug:e.slug,name:e.name,eyebrow:e.process,badge:e.badge==="new"?"New 2026":e.badge?"Bestseller":"",href:`/wheels/${e.slug}`,crumbs:[{label:"Home",href:"/"},{label:"Wheels",href:"/wheels"},x(e),{label:e.name}],cover:e.coverImage??null,inStock:e.inStock===!0,mediaGroups:e.mediaGroups,optionFields:[{key:"finish",label:"Finish",prompt:"Select a finish",role:"resolves",display:"swatch",defaultValue:u},{key:"size",label:"Size",prompt:"Select a size",role:"resolves",display:"pill",empty:{text:"This wheel isn't available to order online in this finish.",linkText:"Contact us about it →",href:"/contact"}},{key:"boltPattern",label:"Bolt pattern",prompt:"Select a bolt pattern",role:"describes",display:"pill"},{key:"et",label:"Offset",prompt:"Select an offset",role:"describes",display:"pill"},{key:"centreBore",label:"Centre bore",prompt:"Select a centre bore",role:"describes",display:"pill"},{key:"pairing",label:"Wheels",prompt:"Select a pairing",role:"describes",display:"pill"}],optionValues:{finish:o,size:f,boltPattern:p,et:m,centreBore:l,pairing:r},parts:c,anchorPrices:e.prices,anchorMsrpPrices:e.msrpPrices??{}}}function J(e,n){if(e.kind!=="alloy-wheel"||n===null)return e;const o=new Set(B(e.source.variants??[],n));if(o.size===0)return e;const i=e.parts.filter(l=>{const s=G(e.source,l);return s!==null&&o.has(s)});if(i.length===0||i.length===e.parts.length)return e;const f=(l,s)=>new Set(l.map(r=>r.options[s]).filter(r=>r!==void 0)),p={},m=[];for(const l of e.optionFields){const s=f(e.parts,l.key),r=f(i,l.key),c=(e.optionValues[l.key]??[]).filter(u=>r.has(u.value)||!s.has(u.value));p[l.key]=c;const d=l.defaultValue!==void 0&&!c.some(u=>u.value===l.defaultValue)?c[0]?.value:l.defaultValue;m.push(d===l.defaultValue?l:{...l,defaultValue:d})}return{...e,optionFields:m,optionValues:p,parts:i}}function G(e,n){return n?H(e.variants??[],n.options.finish,n.options.variantSize)??null:null}function Q(e,n){return e.finishes.find(o=>o.name===n)??e.finishes[0]??F}export{q as fromWheel,G as partVariant,Q as wheelFinish,J as wheelForVehicle};
1
+ import{variantsFittingVehicle as B}from"../wheels/plp-fitment-match.js";import{FALLBACK_FINISH as F}from"../wheels/finish-defaults.js";import{variantEtKey as y,variantSizeGroupKey as V,variantSizeGroupLabel as N,variantSizeGroupNote as I}from"../wheels/variant-spec.js";import{trimDecimal as S}from"../wheels/spec-format.js";import{itemCollections as A}from"./plp-item.js";import{BUILT_IN_LISTING_PATH as g,withListingFilter as D}from"../links/link-rules.js";import{PLP_PARAM as _}from"../wheels/plp-filters.js";import{findVariant as L,isVariantOutOfStock as O}from"../wheels/variants.js";import{HAND_WORDS as T,NOT_HANDED_WORDS as x,variantIsHanded as f}from"../wheels/set-mode.js";const P="handed",k="plain";function G(e){const l=A(e).find(o=>o.trim()!=="");return l?{label:l,href:D(g,{param:_.collections,value:l})}:{label:e.process,href:g}}function q(e){const l=e.variants??[],o=e.finishes.map(t=>({value:t.name,label:t.name,swatch:t.color}));function i(t){const a=[];for(const v of l){const h=t(v);!h||a.some(z=>z.value===h.value)||a.push(h)}return a}const p=i(t=>({value:V(t),label:N(t),note:I(t)})),m=i(t=>t.boltPattern?{value:t.boltPattern,label:t.boltPattern}:null),b=i(t=>{const a=y(t);return a===null?null:{value:a,label:`ET ${a}`}}),n=i(t=>t.centreBore==null?null:{value:S(t.centreBore),label:`${S(t.centreBore)} mm`}),s=l.some(f)&&!l.every(f),r=s?i(t=>({value:f(t)?P:k,label:f(t)?T:x})):[],c=l.map(t=>({id:`${t.finishName}|${t.size}`,options:{finish:t.finishName,size:V(t),variantSize:t.size,...t.boltPattern?{boltPattern:t.boltPattern}:{},...y(t)!==null?{et:y(t)}:{},...t.centreBore==null?{}:{centreBore:S(t.centreBore)},...s?{pairing:f(t)?P:k}:{}},inStock:!O(t),image:null,components:t.components})),u=((e.defaultFinish?o.find(t=>t.value===e.defaultFinish):void 0)??o[0])?.value;return{kind:"alloy-wheel",source:e,slug:e.slug,name:e.name,eyebrow:e.process,badge:e.badge==="new"?"New 2026":e.badge?"Bestseller":"",href:`/wheels/${e.slug}`,crumbs:[{label:"Home",href:"/"},{label:"Wheels",href:"/wheels"},G(e),{label:e.name}],cover:e.coverImage??null,inStock:e.inStock===!0,mediaGroups:e.mediaGroups,optionFields:[{key:"finish",label:"Finish",prompt:"Select a finish",role:"resolves",display:"swatch",defaultValue:u},{key:"size",label:"Size",prompt:"Select a size",role:"resolves",display:"pill",empty:{text:"This wheel isn't available to order online in this finish.",linkText:"Contact us about it →",href:"/contact"}},{key:"boltPattern",label:"Bolt pattern",prompt:"Select a bolt pattern",role:"describes",display:"pill"},{key:"et",label:"Offset",prompt:"Select an offset",role:"describes",display:"pill"},{key:"centreBore",label:"Centre bore",prompt:"Select a centre bore",role:"describes",display:"pill"},{key:"pairing",label:"Wheels",prompt:"Select a pairing",role:"describes",display:"pill"}],optionValues:{finish:o,size:p,boltPattern:m,et:b,centreBore:n,pairing:r},parts:c,anchorPrices:e.prices,anchorMsrpPrices:e.msrpPrices??{}}}function J(e,l){if(e.kind!=="alloy-wheel"||l===null)return e;const o=new Set(B(e.source.variants??[],l));if(o.size===0)return e;const i=e.parts.filter(n=>{const s=H(e.source,n);return s!==null&&o.has(s)});if(i.length===0||i.length===e.parts.length)return e;const p=(n,s)=>new Set(n.map(r=>r.options[s]).filter(r=>r!==void 0)),m={},b=[];for(const n of e.optionFields){const s=p(e.parts,n.key),r=p(i,n.key),c=(e.optionValues[n.key]??[]).filter(u=>r.has(u.value)||!s.has(u.value));m[n.key]=c;const d=n.defaultValue!==void 0&&!c.some(u=>u.value===n.defaultValue)?c[0]?.value:n.defaultValue;b.push(d===n.defaultValue?n:{...n,defaultValue:d})}return{...e,optionFields:b,optionValues:m,parts:i}}function H(e,l){return l?L(e.variants??[],l.options.finish,l.options.variantSize)??null:null}function Q(e,l){return e.finishes.find(o=>o.name===l)??e.finishes[0]??F}export{q as fromWheel,H as partVariant,Q as wheelFinish,J as wheelForVehicle};
@@ -9,9 +9,8 @@ export interface WheelSetBuild {
9
9
  }
10
10
  export declare const TWO_OBJECT_ET_SPREAD_MM = 150;
11
11
  export declare const AXLE_WORDS = "Front + rear";
12
- export declare const HAND_WORDS = "L/R pair";
13
- export declare const NOT_HANDED_WORDS = "Not handed";
14
- export declare const CARD_HAND_WORDS = "L/R";
12
+ export declare const HAND_WORDS = "Directional pair";
13
+ export declare const NOT_HANDED_WORDS = "Standard";
15
14
  export declare function variantEtSpread(variant: WheelVariant): number;
16
15
  export declare function variantIsTwoObjects(variant: WheelVariant): boolean;
17
16
  export declare function productIsTwoObjects(product: StoreProduct): boolean;
@@ -1 +1 @@
1
- import{parseOption as u}from"efficient-shell/format";import{WHEELS_PER_SET as r}from"../commerce.js";function a(e){return(e.components??[]).reduce((o,s)=>o+s.wheels,0)>r}function O(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(a)}const c=150,l="Front + rear",m="L/R pair",T="Not handed",i="L/R";function p(e){return e.et==null||e.rearEt==null?0:Math.abs(e.rearEt-e.et)}function n(e){return p(e)>=c}function I(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(n)}function d(e){return e.directional===!0}function x(e){return e.kind==="staggered"}function P(e){return e.rearWidth!=null||e.rearEt!=null&&e.rearEt!==e.et}function g(e){return{twoObjects:n(e),handed:d(e),staggered:x(e)}}function W(e){return{twoObjects:S(e),handed:e.handed??!1,staggered:!1}}function b(e){const t=[e.twoObjects?l:"",e.handed?i:""].filter(Boolean);return t.length?t.join(" · "):null}function H(e){return e.handed}function E(e){return new Set((e.components??[]).map(t=>t.partNumber)).size>1}function C(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(E)}function S(e){return(e.setWheelCount??0)>r}const f=new Set(["boltPattern"]);function L(e,t){return e&&f.has(t)}function N(e,t){return!e?.srcRight||!t||t!==e.src?null:e.srcRight}const _="per wheel";function y(e,t){return t?`${e} ${_}`:e}const h=[{label:"Pair",value:"pair"},{label:"One wheel",value:"one"}],R="pair";function A(e){return u(h,R,e)}export{l as AXLE_WORDS,i as CARD_HAND_WORDS,m as HAND_WORDS,T as NOT_HANDED_WORDS,_ as PER_WHEEL_UNIT,R as SET_PICTURE_DEFAULT,h as SET_PICTURE_POINTS,c as TWO_OBJECT_ET_SPREAD_MM,A as parseSetPicture,C as productHasComposedRender,O as productIsDually,I as productIsTwoObjects,b as setBuildLabel,H as setIsWide,N as setSecondSrc,L as setSuppressesRow,S as summaryIsDually,W as summarySetBuild,p as variantEtSpread,E as variantHasComposedRender,P as variantHasDistinctRear,a as variantIsDually,d as variantIsHanded,x as variantIsStaggered,n as variantIsTwoObjects,g as variantSetBuild,y as wheelCardPriceLine};
1
+ import{parseOption as s}from"efficient-shell/format";import{WHEELS_PER_SET as r}from"../commerce.js";function a(e){return(e.components??[]).reduce((o,u)=>o+u.wheels,0)>r}function m(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(a)}const c=150,i="Front + rear",O="Directional pair",T="Standard";function l(e){return e.et==null||e.rearEt==null?0:Math.abs(e.rearEt-e.et)}function n(e){return l(e)>=c}function D(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(n)}function p(e){return e.directional===!0}function d(e){return e.kind==="staggered"}function I(e){return e.rearWidth!=null||e.rearEt!=null&&e.rearEt!==e.et}function P(e){return{twoObjects:n(e),handed:p(e),staggered:d(e)}}function b(e){return{twoObjects:E(e),handed:e.handed??!1,staggered:!1}}function g(e){return e.twoObjects?i:null}function W(e){return e.handed}function x(e){return new Set((e.components??[]).map(t=>t.partNumber)).size>1}function H(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(x)}function E(e){return(e.setWheelCount??0)>r}const S=new Set(["boltPattern"]);function y(e,t){return e&&S.has(t)}function C(e,t){return!e?.srcRight||!t||t!==e.src?null:e.srcRight}const f="per wheel";function L(e,t){return t?`${e} ${f}`:e}const _=[{label:"Pair",value:"pair"},{label:"One wheel",value:"one"}],h="pair";function N(e){return s(_,h,e)}export{i as AXLE_WORDS,O as HAND_WORDS,T as NOT_HANDED_WORDS,f as PER_WHEEL_UNIT,h as SET_PICTURE_DEFAULT,_ as SET_PICTURE_POINTS,c as TWO_OBJECT_ET_SPREAD_MM,N as parseSetPicture,H as productHasComposedRender,m as productIsDually,D as productIsTwoObjects,g as setBuildLabel,W as setIsWide,C as setSecondSrc,y as setSuppressesRow,E as summaryIsDually,b as summarySetBuild,l as variantEtSpread,x as variantHasComposedRender,I as variantHasDistinctRear,a as variantIsDually,p as variantIsHanded,d as variantIsStaggered,n as variantIsTwoObjects,P as variantSetBuild,L as wheelCardPriceLine};
@@ -1,6 +1,7 @@
1
1
  import type { WheelVariant } from "../api/index.js";
2
2
  export declare function variantSizeLabel(variant: WheelVariant): string;
3
3
  export declare function variantFitmentLabel(variant: WheelVariant): string;
4
+ export declare function variantOptionLabel(variant: WheelVariant): string;
4
5
  export declare function variantEtKey(variant: WheelVariant): string | null;
5
6
  export declare function variantSizeGroupKey(variant: WheelVariant): string;
6
7
  export declare function variantSizeGroupLabel(variant: WheelVariant): string;
@@ -1 +1 @@
1
- import{trimDecimal as u,wheelSizeLabel as i}from"./spec-format.js";import{variantHasDistinctRear as o}from"./set-mode.js";function h(e){return e.diameter==null||e.width==null?e.size:i(e.diameter,e.width,e.rearWidth)}function p(e){const r=[];e.boltPattern&&r.push(e.boltPattern),e.centreBore!=null&&r.push(`${u(e.centreBore)} bore`);const t=n(e);return t!==null&&r.push(`ET ${t}`),e.directional&&r.push("L/R pair"),r.join(" · ")}function n(e){return e.et==null?null:e.rearEt!=null&&e.rearEt!==e.et?`${e.et}/${e.rearEt}`:String(e.et)}function c(e){return e.diameter==null||e.width==null?JSON.stringify([e.size]):JSON.stringify([e.kind,e.diameter,e.width,e.rearWidth??null])}function s(e){return e.diameter==null||e.width==null?e.size:`${e.diameter}" ${e.kind}`}function m(e){return e.diameter==null||e.width==null?"":e.rearWidth!=null?`${u(e.width)} front / ${u(e.rearWidth)} rear`:`${u(e.width)} all round`}function $(e){if(e.diameter==null||e.width==null)return e.size;const r=(t,l)=>`${e.diameter} × ${u(t)}${l!=null?` ET ${l}`:""}`;return o(e)?`${r(e.width,e.et)} front · ${r(e.rearWidth??e.width,e.rearEt)} rear`:r(e.width,e.et)}function w(e,r){return r?e.filter(t=>t.finishName===r):[]}export{n as variantEtKey,p as variantFitmentLabel,c as variantSizeGroupKey,s as variantSizeGroupLabel,m as variantSizeGroupNote,h as variantSizeLabel,$ as variantSpecLabel,w as variantsForFinish};
1
+ import{trimDecimal as l,wheelSizeLabel as i}from"./spec-format.js";import{variantHasDistinctRear as n}from"./set-mode.js";function o(e){return e.diameter==null||e.width==null?e.size:i(e.diameter,e.width,e.rearWidth)}function d(e){const r=[];e.boltPattern&&r.push(e.boltPattern),e.centreBore!=null&&r.push(`${l(e.centreBore)} bore`);const t=f(e);return t!==null&&r.push(`ET ${t}`),r.join(" · ")}function c(e){return[o(e),d(e)].filter(Boolean).join(" · ")}function f(e){return e.et==null?null:e.rearEt!=null&&e.rearEt!==e.et?`${e.et}/${e.rearEt}`:String(e.et)}function s(e){return e.diameter==null||e.width==null?JSON.stringify([e.size]):JSON.stringify([e.kind,e.diameter,e.width,e.rearWidth??null])}function m(e){return e.diameter==null||e.width==null?e.size:`${e.diameter}" ${e.kind}`}function $(e){return e.diameter==null||e.width==null?"":e.rearWidth!=null?`${l(e.width)} front / ${l(e.rearWidth)} rear`:`${l(e.width)} all round`}function w(e){if(e.diameter==null||e.width==null)return e.size;const r=(t,u)=>`${e.diameter} × ${l(t)}${u!=null?` ET ${u}`:""}`;return n(e)?`${r(e.width,e.et)} front · ${r(e.rearWidth??e.width,e.rearEt)} rear`:r(e.width,e.et)}function b(e,r){return r?e.filter(t=>t.finishName===r):[]}export{f as variantEtKey,d as variantFitmentLabel,c as variantOptionLabel,s as variantSizeGroupKey,m as variantSizeGroupLabel,$ as variantSizeGroupNote,o as variantSizeLabel,w as variantSpecLabel,b as variantsForFinish};
@@ -1 +1 @@
1
- import{WHEELS_PER_SET as s}from"../commerce.js";import{variantIsHanded as f}from"./set-mode.js";const c="dually";function p(e){const t=e.components.reduce((r,o)=>r+o.wheels,0)||s,n=e.kind,i=[n==="staggered"?"Staggered":n===c?"Dually":"",f(e)?"L/R":""].filter(Boolean);return i.length?`${i.join(" ")} set of ${t}`:`Set of ${t}`}function u(e,t){return[...new Set(e.filter(n=>!t||n.finishName===t).map(n=>n.size))]}function g(e,t,n){if(!(!t||!n))return e.find(i=>i.finishName===t&&i.size===n)}function l(e){return e!=null&&e.inStock===!1}function h(e,t){return t?e.filter(n=>n.finishName===t&&l(n)):[]}function x(e,t,n){return t.findIndex((i,r)=>n[r]!==!1&&u(e,i).length>0)}function S(e){const t=new Set((e.sizePairs??[]).map(r=>`${r.diameter}x${r.width}`)),n=e.spec?.pcds??[],i=e.spec?.etRange??[];return t.size===1&&n.length<=1&&(i.length===0||i[0]===i[i.length-1])}export{g as findVariant,x as firstSellableFinishIndex,S as isOneWheelDesign,l as isVariantOutOfStock,h as outOfStockVariantsForFinish,p as setLabel,u as sizesForFinish};
1
+ import{WHEELS_PER_SET as s}from"../commerce.js";const f="dually";function d(e){const t=e.components.reduce((r,o)=>r+o.wheels,0)||s,n=e.kind,i=[n==="staggered"?"Staggered":n===f?"Dually":""].filter(Boolean);return i.length?`${i.join(" ")} set of ${t}`:`Set of ${t}`}function c(e,t){return[...new Set(e.filter(n=>!t||n.finishName===t).map(n=>n.size))]}function a(e,t,n){if(!(!t||!n))return e.find(i=>i.finishName===t&&i.size===n)}function u(e){return e!=null&&e.inStock===!1}function p(e,t){return t?e.filter(n=>n.finishName===t&&u(n)):[]}function g(e,t,n){return t.findIndex((i,r)=>n[r]!==!1&&c(e,i).length>0)}function h(e){const t=new Set((e.sizePairs??[]).map(r=>`${r.diameter}x${r.width}`)),n=e.spec?.pcds??[],i=e.spec?.etRange??[];return t.size===1&&n.length<=1&&(i.length===0||i[0]===i[i.length-1])}export{a as findVariant,g as firstSellableFinishIndex,h as isOneWheelDesign,u as isVariantOutOfStock,p as outOfStockVariantsForFinish,d as setLabel,c as sizesForFinish};