efficient-storefront-blocks 0.128.1 → 0.129.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 (34) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/dist/editor/lib/document/blocks/commerce/ProductGallery/fields.js +1 -1
  3. package/dist/editor/lib/document/blocks/service/SiteFooter/fields.js +1 -1
  4. package/dist/editor/lib/storefront-editor-words.d.ts +2 -0
  5. package/dist/editor/lib/storefront-editor-words.js +1 -1
  6. package/dist/index.js +26 -26
  7. package/dist/render/app/globals.css +82 -6
  8. package/dist/render/components/GridCardTemplate.js +1 -1
  9. package/dist/render/components/ProductGallery.d.ts +3 -2
  10. package/dist/render/components/ProductGallery.js +1 -1
  11. package/dist/render/components/SectionGroupBody.d.ts +2 -1
  12. package/dist/render/components/SectionGroupBody.js +1 -1
  13. package/dist/render/components/pdp-dynamic/DynamicProductGallery.d.ts +2 -1
  14. package/dist/render/components/product-hero/SpinLayer.js +1 -1
  15. package/dist/render/components/product-hero/hero-view.d.ts +4 -0
  16. package/dist/render/components/product-hero/hero-view.js +1 -1
  17. package/dist/render/lib/content/footer-reveal.d.ts +3 -0
  18. package/dist/render/lib/content/footer-reveal.js +1 -0
  19. package/dist/render/lib/document/blocks/commerce/ProductGallery/meta.js +1 -1
  20. package/dist/render/lib/document/blocks/commerce/ProductGallery/render.js +1 -1
  21. package/dist/render/lib/document/blocks/service/SiteFooter/render.js +1 -1
  22. package/dist/render/lib/sections/hero-gallery.d.ts +11 -0
  23. package/dist/render/lib/sections/hero-gallery.js +1 -1
  24. package/dist/render/lib/sections/picture-grounds.d.ts +11 -0
  25. package/dist/render/lib/sections/picture-grounds.js +1 -0
  26. package/dist/render/lib/sections/spin-sets.d.ts +1 -3
  27. package/dist/render/lib/sections/spin-sets.js +1 -1
  28. package/dist/render/lib/wheels/detail-shots.d.ts +4 -1
  29. package/dist/render/lib/wheels/detail-shots.js +1 -1
  30. package/dist/routine-index.json +1 -1
  31. package/dist/value-index.json +1 -1
  32. package/dist/words.d.ts +2 -0
  33. package/dist/words.js +1 -1
  34. package/package.json +1 -1
@@ -4368,19 +4368,22 @@ em.text-accent {
4368
4368
  .sf-card-ground-studio:hover {
4369
4369
  background-color: transparent;
4370
4370
  }
4371
- .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) {
4371
+ .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]),
4372
+ .sf-photo-ground-studio {
4372
4373
  --sf-card-studio-ground: radial-gradient(
4373
4374
  ellipse at 50% 42%,
4374
4375
  color-mix(in oklab, var(--bg) 96.4%, var(--fg)) 0%,
4375
4376
  color-mix(in oklab, var(--bg) 91.5%, var(--fg)) 75%,
4376
4377
  color-mix(in oklab, var(--bg) 88.5%, var(--fg)) 100%
4377
4378
  );
4378
- position: relative;
4379
- aspect-ratio: 10 / 13;
4380
4379
  container-type: inline-size;
4381
4380
  isolation: isolate;
4382
4381
  background-image: var(--sf-card-studio-ground);
4383
4382
  }
4383
+ .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) {
4384
+ position: relative;
4385
+ aspect-ratio: 10 / 13;
4386
+ }
4384
4387
  /* Show next image of a RENDERING (`data-hover-fit="contain"`): the layer
4385
4388
  covers the whole picture box, so it paints the same ellipse (opaque, over
4386
4389
  the card's flat ground colour the layer is handed), holds the next
@@ -4413,7 +4416,9 @@ em.text-accent {
4413
4416
  .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"])::before,
4414
4417
  .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"])::after,
4415
4418
  .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 {
4419
+ .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media][data-hover-fit="contain"]::after,
4420
+ .sf-photo-ground-studio::before,
4421
+ .sf-photo-ground-studio::after {
4417
4422
  content: "";
4418
4423
  position: absolute;
4419
4424
  z-index: -1;
@@ -4421,7 +4426,8 @@ em.text-accent {
4421
4426
  }
4422
4427
  /* The wide, faint shadow (`.s2`): 142% of the wheel wide, 1:5. */
4423
4428
  .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"])::before,
4424
- .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media][data-hover-fit="contain"]::before {
4429
+ .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media][data-hover-fit="contain"]::before,
4430
+ .sf-photo-ground-studio::before {
4425
4431
  left: -2.36cqw;
4426
4432
  top: 96.41cqw;
4427
4433
  width: 109.34cqw;
@@ -4431,7 +4437,8 @@ em.text-accent {
4431
4437
  }
4432
4438
  /* The near, darker shadow (`.s1`): the wheel's width, 1:6. */
4433
4439
  .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"])::after,
4434
- .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media][data-hover-fit="contain"]::after {
4440
+ .sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media][data-hover-fit="contain"]::after,
4441
+ .sf-photo-ground-studio::after {
4435
4442
  left: 14.58cqw;
4436
4443
  top: 95.85cqw;
4437
4444
  width: 77cqw;
@@ -4440,6 +4447,46 @@ em.text-accent {
4440
4447
  filter: blur(9px);
4441
4448
  }
4442
4449
 
4450
+ /* ─── "Image ground: Studio" (Product Gallery; INOVIT product page 2026-11-23) ───
4451
+ The product page's pictures and its 360° view on a studio ground, drawn by
4452
+ the card's Studio rules above (one set of rules, two users): the same two
4453
+ floor shadows, under the picture's children.
4454
+ Two values are the product page's own, measured on the approved design
4455
+ (pdp 1440, picture 1): the ground is a wall-to-floor fall, darker at the
4456
+ top (#d4: the text mixed in at 18.3%), #dc at 59% down (14.9%), lighter at
4457
+ the foot (#ee: 7.2%), where the card's is a soft ellipse (on a white page
4458
+ with near-black text these mixes give the design's greys; its faint blue is
4459
+ not copied, as no colour is typed); and the well is square with the
4460
+ wheel centred (77% of the well wide, so its foot is 88.5% down), so the
4461
+ shadows sit 17.1% of the width higher than on a card. */
4462
+ .sf-photo-ground-studio {
4463
+ --sf-card-studio-ground: linear-gradient(
4464
+ to bottom,
4465
+ color-mix(in srgb, var(--bg) 81.7%, var(--fg)) 0%,
4466
+ color-mix(in srgb, var(--bg) 85.1%, var(--fg)) 59%,
4467
+ color-mix(in srgb, var(--bg) 92.8%, var(--fg)) 100%
4468
+ );
4469
+ }
4470
+ .sf-photo-ground-studio::before {
4471
+ top: 79.31cqw;
4472
+ }
4473
+ /* The 360° frames are white-ground renders: multiplied, their white is the
4474
+ ground and the floor shadows show under the wheel (SpinLayer). */
4475
+ .sf-photo-ground-studio [data-spin-frame] {
4476
+ mix-blend-mode: multiply;
4477
+ }
4478
+ /* The Flat ground on a light page (the well's `bg-bg`, ProductGallery
4479
+ groundClass): multiplied too, so the frame's white is the page colour and no
4480
+ white square shows on an off-white page. On a dark page the well has no
4481
+ paint and the frame is drawn as it is: a white-ground render cannot sit on
4482
+ a dark ground without its white. */
4483
+ .bg-bg > [data-spin-well] [data-spin-frame] {
4484
+ mix-blend-mode: multiply;
4485
+ }
4486
+ .sf-photo-ground-studio::after {
4487
+ top: 78.75cqw;
4488
+ }
4489
+
4443
4490
  /* ─── "Words: Over the picture" (Product Grid; INOVIT /wheels design 2026-11-18) ───
4444
4491
  The card's words sit at the foot of the card, on the picture's ground,
4445
4492
  and the wheel sits in the space above them. A choice of the grid
@@ -4580,3 +4627,32 @@ em.text-accent {
4580
4627
  .sf-card-tracks:has(> :nth-child(12)):not(:has(> :nth-child(13))) {
4581
4628
  --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));
4582
4629
  }
4630
+
4631
+ /* ─── The footer's `Reveal on scroll` ──────────────────────────────────────
4632
+ The Site Footer carries `data-footer-reveal="on"` only while its setting is
4633
+ on, the page is not being edited and the footer fits in the window
4634
+ (lib/content/footer-reveal, components/SectionGroupBody). Then the footer
4635
+ stays fixed at the bottom of the window and the page slides up off it.
4636
+
4637
+ ⚠️ WHY THE WRAPPER AND NOT THE <footer> ITSELF. Live, the footer sits three
4638
+ wrappers deep inside the box that is <main>'s sibling (measured in a real
4639
+ browser, 2026-11-25: body > .contents > header, main, div > div > div >
4640
+ footer). `position: sticky` holds an element only inside its parent, and
4641
+ each of those wrappers is exactly the footer's height, so a sticky <footer>
4642
+ would never move. The sibling of <main> that holds the footer is the box
4643
+ whose parent (via the `display: contents` carrier) is <body>, the page's
4644
+ full height, so that is the one made sticky. `:has()` reaches it, as the
4645
+ page-width rules above do.
4646
+
4647
+ <main> is lifted over it and paints the page colour, so the footer is
4648
+ hidden under the page until the page's bottom passes it. */
4649
+ body:has([data-footer-reveal="on"]) main.sf-themed-content {
4650
+ position: relative;
4651
+ z-index: 1;
4652
+ background: var(--bg);
4653
+ }
4654
+ main.sf-themed-content ~ :has([data-footer-reveal="on"]) {
4655
+ position: sticky;
4656
+ bottom: 0;
4657
+ z-index: 0;
4658
+ }
@@ -1 +1 @@
1
- "use client";import{jsx as t,Fragment as y,jsxs as P}from"react/jsx-runtime";import{createContext as D,useContext as G,useMemo as v}from"react";import{parseOption as h}from"efficient-shell/format";import{CardRowContext as E,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 x}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 Y,tyreCardProduct as K}from"./card-pieces/ProductCardState.js";import{tyrePagePath as X}from"../lib/tyres/tyre-page-path.js";import{say as q}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 Je(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 Qe(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,showSingle:!1,armOnContact:!1},Ze={sale:!0,axleSets:!1,setTotal:!0,wasFollowsSize:!0,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"},er=e=>h(le.map(r=>r.value),"flat",e),ue=[{label:"Under the picture",value:"under"},{label:"Over the picture",value:"over"}],rr=e=>h(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:x,tyreFieldUsage:x,reserveEyebrow:!1,editing:!1,eyebrow:de,fit:null,colours:ie,rules:se,ground:"flat",words:"under"},O=D(T);function f(){return G(O)}function or({value:e,children:r}){const o=v(()=>({...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 g(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:X(e.slug)??"",colour:"",colourVaried:"",colourRandom:R(r)}}const A=e=>`/bundles/${e.slug}`;function Ce(e){return{name:e.name,eyebrow:"",note:e.subtitle??"",href:A(e),colour:"",colourVaried:"",colourRandom:""}}const ge="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=`relative flex-1 ${N}`;function w({copy:e,href:r,label:o,kit:n=!1,probes:a,arm:d,layer:m}){const{editing:l,ground:i,words:s}=f(),c=[ce[i],s==="over"?fe:""].filter(Boolean);return t(M,{surface:n?we:[ge,...c].join(" "),href:r,label:o,linked:!l,probes:a,arm:d,layer:m,children:t("div",{className:Se,...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=xe(r.wheel,o);return{cover:e.media.cover,media:U(n,e.media,o)}}function xe(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 Re({children:e}){const r=L(),{wheel:o,sel:n}=_(),a=n.finish?.color,d=v(()=>r?{...r,row:g(o,a)}:null,[r,o,a]);return d?t(E.Provider,{value:d,children:e}):t(y,{children:e})}function be({copy:e}){const{wheel:r,sel:o}=_(),{rules:n}=f(),a=ve("card");return P(y,{children:[t(w,{copy:t(Re,{children:e}),href:r.slug?`/wheels/${r.slug}`:"",label:r.name,probes:o.probes,arm:n.armOnContact?o.arm:void 0,layer:a}),t(B,{})]})}function I(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 tr({wheels:e,finishes:r,children:o}){const n=f(),{ownerId:a,ownerType:d,Template:m,editing:l}=n;return t(p,{ownerId:a,ownerType:d,Template:m,rows:e.map(i=>g(i)),items:e,fallback:l?t(S,{}):null,wrapCopy:(i,s)=>I(i,s,n,r),children:o})}function nr({items:e,tyreOf:r,tyreFit:o}){const n=f(),{ownerId:a,ownerType:d,Template:m,editing:l}=n,i=e.map(s=>r(s));return t(p,{ownerId:a,ownerType:d,Template:m,rows:e.map((s,c)=>{const u=i[c];return u?pe(u):g(s)}),items:e,fallback:l?t(S,{}):null,wrapCopy:(s,c)=>{const u=i[c.index];return u?Te(s,K(u,o?.(u)??null),l):I(s,c,n)},children:s=>s})}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(w,{copy:e,href:r.pagePath??"",label:r.tyre.name,arm:r.arm})}function Te(e,r,o){return t(z,{tyre:r,editing:o,children:t(C.Provider,{value:"catalog",children:t(_e,{copy:e})})})}function Oe(e,r){const o=r.item;return t(V,{bundle:o,children:t(C.Provider,{value:"catalog",children:t(w,{copy:e,href:A(o),label:o.name,kit:!0})})})}function ar({bundles:e,children:r}){const{ownerId:o,ownerType:n,Template:a,editing:d}=f();return t(p,{ownerId:o,ownerType:n,Template:a,rows:e.map(Ce),items:e,fallback:d?t(S,{}):null,wrapCopy:Oe,children:r})}function S(){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:q("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,ar as GridBundleCards,or as GridCardProvider,tr as GridCards,nr as GridMixedCards,Ze as LISTING_CARD_RULES,Ce as bundleCardRow,A as bundlePagePath,er as cardGroundOf,xe as cardHoverRow,Qe as cardRowsGrid,rr as cardWordsOf,Je as gridIndexCss,g as productCardRow,pe as tyreCardRow,ve as useCardHoverLayer,f as useGridCard};
1
+ "use client";import{jsx as t,Fragment as y,jsxs as A}from"react/jsx-runtime";import{createContext as D,useContext as G,useMemo as h}from"react";import{parseOption as x}from"efficient-shell/format";import{CardRowContext as E,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 R}from"../lib/content/field-usage.js";import{CARD_IMAGE_SIZES as j}from"../lib/sections/card-image-sizes.js";import{PICTURE_GROUNDS as $}from"../lib/sections/picture-grounds.js";import{productTone as H,productToneVaried as B,randomCardColour as v}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 Y,useProductCardState as b,useWheelCardState as _,WheelCardStateProvider as K,tyreCardProduct as X}from"./card-pieces/ProductCardState.js";import{tyrePagePath as q}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 rr}from"efficient-web-builder/render/lib/content/box-shared-columns";import{GAP_ZONE_CLASS as er}from"efficient-web-builder/format/lib/content/container-gap";import{CARD_ROWS_GRID_CLASS as or,cardRowsGap as tr,cardRowsGridStyle as nr}from"./WheelCardFrame.js";import{blockParts as ar}from"../lib/block-parts.js";const sr=ar("ProductCard");function Zr(r){return Q.map(({value:e})=>e==="off"?"":Z(r,e).replace(".sf-card-index::before",`.sf-card-index[data-format="${e}"]::before`)).join("")}function re(r){return r.className.includes(er)?{className:`${r.className} ${or} ${rr}`,style:{...r.style,...nr(tr(r))}}:r}const dr={sale:!1,axleSets:!0,setTotal:!1,wasFollowsSize:!1,showSingle:!1,armOnContact:!1},ee={sale:!0,axleSets:!1,setTotal:!0,wasFollowsSize:!0,showSingle:!0,armOnContact:!0},ir={kindLabel:null,brand:!1,process:!0,tyreBrand:!0},cr=[],lr=$,ur={flat:"",soft:"sf-card-ground-soft",studio:"sf-card-ground-studio"},oe=r=>x(lr.map(e=>e.value),"flat",r),mr=[{label:"Under the picture",value:"under"},{label:"Over the picture",value:"over"}],te=r=>x(mr.map(e=>e.value),"under",r),fr="sf-card-words-over",T={ownerId:"",ownerType:"ProductGrid",Template:void 0,hover:F({},"ProductGrid"),imageSizes:j,fieldUsage:R,tyreFieldUsage:R,reserveEyebrow:!1,editing:!1,eyebrow:ir,fit:null,colours:cr,rules:dr,ground:"flat",words:"under"},O=D(T);function m(){return G(O)}function ne({value:r,children:e}){const o=h(()=>({...T,...pr(r)}),[r]);return t(O.Provider,{value:o,children:e})}const pr=r=>Object.fromEntries(Object.entries(r).filter(([,e])=>e!==void 0));function w(r,e){const o=r.designCode??r.slug??"";return{name:r.name??"",eyebrow:r.process??"",note:"",href:r.slug?`/wheels/${r.slug}`:"",colour:H(e),colourVaried:B(e,o),colourRandom:v(o)}}function Cr(r){const e=r.designCode||r.slug||"";return{name:r.name??"",eyebrow:r.brand??"",note:"",href:q(r.slug)??"",colour:"",colourVaried:"",colourRandom:v(e)}}const I=r=>`/bundles/${r.slug}`;function wr(r){return{name:r.name,eyebrow:"",note:r.subtitle??"",href:I(r),colour:"",colourVaried:"",colourRandom:""}}const gr="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)]",Sr="sf-card group relative flex flex-col border border-line bg-bg transition-colors hover:border-accent",yr=`relative flex-1 ${N}`;function g({copy:r,href:e,label:o,kit:n=!1,probes:a,arm:d,layer:f}){const{editing:c,ground:i,words:s}=m(),l=[ur[i],s==="over"?fr:""].filter(Boolean);return t(V,{surface:n?Sr:[gr,...l].join(" "),href:e,label:o,linked:!c,probes:a,arm:d,layer:f,children:t("div",{className:yr,...sr("card-content"),children:t(k,{children:r})})})}const hr="var(--card-bg)";function xr(r,e=hr){const o=Rr();return!o||o.cover!==r||!o.media?null:t(W,{media:o.media,cover:r,ground:e})}function Rr(){const{hover:r}=m(),e=b();if(r.kind!=="nextImage"||!r.media||e.kind!=="wheel")return null;const o=e.sel.finish?.name,n=vr(e.wheel,o);return{cover:r.media.cover,media:U(n,r.media,o)}}function vr(r,e){const o=r.finishes?.find(a=>a.name===e),n=o?.angles?.length?o.angles:e&&e===r.defaultFinish?r.defaultFinishRenderings??[]:[];return{...r,finishes:e?[{name:e,angles:n.slice(1)}]:[]}}function br({children:r}){const e=L(),{wheel:o,sel:n}=_(),a=n.finish?.color,d=h(()=>e?{...e,row:w(o,a)}:null,[e,o,a]);return d?t(E.Provider,{value:d,children:r}):t(y,{children:r})}function _r({copy:r}){const{wheel:e,sel:o}=_(),{rules:n}=m(),a=xr("card");return A(y,{children:[t(g,{copy:t(br,{children:r}),href:e.slug?`/wheels/${e.slug}`:"",label:e.name,probes:o.probes,arm:n.armOnContact?o.arm:void 0,layer:a}),t(M,{})]})}function P(r,e,o,n){const a=e.item;return t(K,{wheel:a,colours:o.colours,defaultFinish:n?.[e.index],editing:o.editing,children:t(C.Provider,{value:"catalog",children:t(_r,{copy:r})})})}function ae({wheels:r,finishes:e,children:o}){const n=m(),{ownerId:a,ownerType:d,Template:f,editing:c}=n;return t(p,{ownerId:a,ownerType:d,Template:f,rows:r.map(i=>w(i)),items:r,fallback:c?t(S,{}):null,wrapCopy:(i,s)=>P(i,s,n,e),children:o})}function se({items:r,tyreOf:e,tyreFit:o}){const n=m(),{ownerId:a,ownerType:d,Template:f,editing:c}=n,i=r.map(s=>e(s));return t(p,{ownerId:a,ownerType:d,Template:f,rows:r.map((s,l)=>{const u=i[l];return u?Cr(u):w(s)}),items:r,fallback:c?t(S,{}):null,wrapCopy:(s,l)=>{const u=i[l.index];return u?Or(s,X(u,o?.(u)??null),c):P(s,l,n)},children:s=>s})}function Tr({copy:r}){const e=b();if(e.kind!=="tyre")throw new Error("A tyre card surface was drawn outside its tyre state.");return t(g,{copy:r,href:e.pagePath??"",label:e.tyre.name,arm:e.arm})}function Or(r,e,o){return t(Y,{tyre:e,editing:o,children:t(C.Provider,{value:"catalog",children:t(Tr,{copy:r})})})}function Ir(r,e){const o=e.item;return t(z,{bundle:o,children:t(C.Provider,{value:"catalog",children:t(g,{copy:r,href:I(o),label:o.name,kit:!0})})})}function de({bundles:r,children:e}){const{ownerId:o,ownerType:n,Template:a,editing:d}=m();return t(p,{ownerId:o,ownerType:n,Template:a,rows:r.map(wr),items:r,fallback:d?t(S,{}):null,wrapCopy:Ir,children:e})}function S(){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{lr as CARD_GROUNDS,mr as CARD_WORDS,fr as CARD_WORDS_OVER_CLASS,dr as GRID_CARD_RULES,de as GridBundleCards,ne as GridCardProvider,ae as GridCards,se as GridMixedCards,ee as LISTING_CARD_RULES,wr as bundleCardRow,I as bundlePagePath,oe as cardGroundOf,vr as cardHoverRow,re as cardRowsGrid,te as cardWordsOf,Zr as gridIndexCss,w as productCardRow,Cr as tyreCardRow,xr as useCardHoverLayer,m as useGridCard};
@@ -1,9 +1,9 @@
1
1
  import { type CSSProperties } from "react";
2
2
  import { type HeroView } from "./product-hero/hero-view.js";
3
3
  import type { StoreProduct } from "../lib/catalog/store-product.js";
4
- import { type HeroGalleryMode, type HeroImageFit } from "../lib/sections/hero-gallery.js";
4
+ import { type HeroGalleryMode, type HeroImageFit, type HeroPhotoGround } from "../lib/sections/hero-gallery.js";
5
5
  import { type SpinSets } from "../lib/sections/spin-sets.js";
6
- export default function ProductGallery({ product, view, angleIdx, onSelect, isLight, onLightbox, galleryMode, imageFit, style, takesViewHide, spin, }: {
6
+ export default function ProductGallery({ product, view, angleIdx, onSelect, isLight, onLightbox, galleryMode, imageFit, style, takesViewHide, spin, ground, }: {
7
7
  product: StoreProduct;
8
8
  view: HeroView;
9
9
  angleIdx: number;
@@ -15,4 +15,5 @@ export default function ProductGallery({ product, view, angleIdx, onSelect, isLi
15
15
  style?: CSSProperties;
16
16
  takesViewHide?: boolean;
17
17
  spin?: SpinSets;
18
+ ground?: HeroPhotoGround;
18
19
  }): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as n,Fragment as N,jsxs as m}from"react/jsx-runtime";import{useRef as j}from"react";import{photoLabel as x}from"./product-hero/hero-view.js";import v from"./product-hero/SpinLayer.js";import{stageControls as $,useHeldStagePhoto as F}from"./product-hero/stage-photo.js";import{DEFAULT_HERO_GALLERY_MODE as z,DEFAULT_HERO_IMAGE_FIT as A,parseHeroGalleryMode as O,parseHeroImageFit as P,resolveHeroImageFit as R}from"../lib/sections/hero-gallery.js";import{spinSetFor as B}from"../lib/sections/spin-sets.js";import{productHasComposedRender as I}from"../lib/wheels/set-mode.js";import{HideTaker as C}from"efficient-web-builder/render/components/ViewHideRoot";import{swipeEnabled as V,swipeStep as G}from"efficient-web-builder/format/lib/hero-swipe";function D({product:a,view:e,angleIdx:o,onSelect:d,isLight:l,onLightbox:r,galleryMode:i=z,imageFit:c=A,style:t,takesViewHide:s=!1,spin:u=U}){const g=B(u,a.slug,e.metaValue),h=O(i),f=R(P(c),I(a)),b=n(X,{name:a.name,view:e,angleIdx:o,onSelect:d,isLight:l,onLightbox:r,fit:f,spinSet:g});return h==="stacked"?n(C,{as:"div",takes:s,"data-hero-gallery":h,"data-hero-fit":f,style:t,children:e.photos.length<2?b:m(N,{children:[n(q,{name:a.name,view:e,isLight:l,onLightbox:r,fit:f,spinSet:g}),n(w,{angleIdx:o,total:S(e),onSelect:d,children:b})]})}):m(C,{as:"div",takes:s,"data-hero-gallery":h,"data-hero-fit":f,className:h==="tiled"?"flex items-start gap-3 max-view-tablet:gap-2":void 0,style:t,children:[n("div",{className:h==="tiled"?"min-w-0 flex-1":void 0,children:b}),h!=="main"&&n(Y,{name:a.name,view:e,angleIdx:o,onSelect:d,isLight:l,tiled:h==="tiled"})]})}function S(a){return a.photos.length>0?a.photos.length:a.thumbFallbackCells}const L="relative flex aspect-square items-center justify-center overflow-hidden",U={},k=(a,e,o)=>[a,e.metaValue,o].filter(Boolean).join(" — "),T=(a,e)=>[a,e.metaValue].filter(Boolean).join(" "),H=(a,e)=>`Open ${[a,e.metaValue].filter(Boolean).join(" ")} at full resolution`;function q({name:a,view:e,isLight:o,onLightbox:d,fit:l,spinSet:r}){const i=r?n(v,{set:r,name:T(a,e)}):null;return n("div",{"data-hero-stack":!0,className:"flex flex-col gap-2 max-view-tablet:hidden",children:e.photos.map((c,t)=>{const s=k(a,e,x(e,t));return m("div",{"data-hero-stack-photo":!0,className:[L,o?"bg-bg":""].join(" "),style:{color:e.tint},children:[e.stageImage({photo:c,alt:s,label:H(a,e),onZoom:()=>d(c,s),fit:l,eager:t===0}),t===0&&i]},c)})})}function w({angleIdx:a,total:e,onSelect:o,children:d}){const l=j(null),r=j(null),i=V({count:e}),c=t=>({x:t.touches[0].clientX,y:t.touches[0].clientY});return n("div",{"data-hero-phone-stage":!0,className:"view-tablet:hidden",onTouchStart:t=>{l.current=i&&t.touches.length===1?c(t):null,r.current=l.current},onTouchMove:t=>{l.current&&(t.touches.length!==1?l.current=null:r.current=c(t))},onTouchEnd:()=>{const t=l.current,s=r.current;if(l.current=null,r.current=null,!t||!s)return;const u=G(s.x-t.x,s.y-t.y,a,e);u!==a&&o(u)},children:d})}const W=6;function X({name:a,view:e,angleIdx:o,onSelect:d,isLight:l,onLightbox:r,fit:i,spinSet:c}){const t=e.photos[Math.min(o,e.photos.length-1)],s=F(e.photos,t),u=S(e),g=u>=2,h=String(u).padStart(2,"0"),f=Math.min(o,Math.max(e.photos.length-1,0)),b=g||e.captions[f]?x(e,f):"",_=k(a,e,b),y="max-view-tablet:static",E=[`${L} max-view-tablet:col-span-2`,l?"bg-bg":""].join(" ");return m("div",{className:"relative max-view-tablet:grid max-view-tablet:grid-cols-[minmax(0,1fr)_auto] max-view-tablet:items-start max-view-tablet:gap-x-3 max-view-tablet:gap-y-2",style:{color:e.tint},children:[m("div",{className:`absolute left-0 top-0 z-10 flex items-center gap-3 font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.2em] text-fg ${y} max-view-tablet:min-w-0 max-view-tablet:flex-wrap max-view-tablet:gap-x-2 max-view-tablet:gap-y-1`,children:[g&&m(N,{children:[m("span",{className:"text-accent",children:[String(o+1).padStart(2,"0")," / ",h]}),n("span",{className:"text-fg-dim",children:"·"})]}),n("span",{children:a}),e.metaValue&&m(N,{children:[n("span",{className:"text-fg-dim",children:"·"}),n("span",{className:"text-accent",children:e.metaValue})]})]}),g&&n("div",{className:`absolute right-5 top-5 z-10 flex gap-1 ${y}`,children:$(o,u,d).map(p=>n("button",{type:"button","aria-label":p.label,title:p.label,onClick:p.onClick,className:"flex h-7 w-7 items-center justify-center border border-fg-dim/60 text-fg transition-colors hover:border-accent hover:text-accent",children:p.glyph},p.label))}),m("div",{className:E,children:[["top-3 left-3","top-3 right-3","bottom-3 left-3","bottom-3 right-3"].map((p,M)=>n("span",{className:`absolute ${p} h-3 w-3 border border-fg-dim/40`,style:{borderTop:p.includes("top")?"1px solid var(--site-line)":"none",borderBottom:p.includes("bottom")?"1px solid var(--site-line)":"none",borderLeft:p.includes("left")?"1px solid var(--site-line)":"none",borderRight:p.includes("right")?"1px solid var(--site-line)":"none"}},M)),e.stageImage({photo:s,alt:_,label:H(a,e),onZoom:()=>r(s,_),fit:i}),c&&n(v,{set:c,name:T(a,e)})]}),m("div",{className:`absolute bottom-0 left-0 right-0 z-10 flex items-end justify-between gap-3 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em] text-fg-dim ${y} max-view-tablet:col-span-2 max-view-tablet:flex-wrap`,children:[m("span",{className:"flex min-w-0 flex-col gap-1",children:[e.specCaption&&n("span",{children:e.specCaption}),e.referenceNote&&n("span",{"data-hero-reference-note":!0,children:e.referenceNote}),e.galleryHint&&n("span",{"data-hero-gallery-hint":!0,children:e.galleryHint})]}),n("span",{children:e.originCaption})]})]})}function Y({name:a,view:e,angleIdx:o,onSelect:d,isLight:l,tiled:r=!1}){const i=S(e);return i<2?null:n("div",{className:r?"order-[-1] flex w-16 flex-col gap-2 max-view-tablet:w-12 max-view-tablet:gap-1":"mt-2 grid grid-cols-4 gap-2 max-view-tablet:gap-1",style:!r&&i>4?{gridTemplateColumns:`repeat(${Math.min(i,W)}, minmax(0, 1fr))`}:void 0,children:Array.from({length:i}).map((c,t)=>{const s=e.photos[t];return m("button",{type:"button",onClick:()=>d(t),"aria-label":`View ${x(e,t)}`,"aria-pressed":t===o,className:["relative flex aspect-square items-center justify-center overflow-hidden transition-colors",l?"bg-bg":"",t===o?"border border-accent":"border border-transparent hover:border-fg-dim"].join(" "),style:{color:e.tint},children:[n("span",{className:"absolute top-1.5 left-2 z-10 font-mono text-[length:var(--size-label,8px)] uppercase tracking-[0.18em] text-fg-dim",children:String(t+1).padStart(2,"0")}),e.thumbImage({photo:s,alt:`${a} — ${x(e,t)}`})]},t)})})}export{D as default};
1
+ "use client";import{jsx as n,Fragment as S,jsxs as p}from"react/jsx-runtime";import{useRef as T}from"react";import{photoLabel as _}from"./product-hero/hero-view.js";import j from"./product-hero/SpinLayer.js";import{stageControls as F,useHeldStagePhoto as G}from"./product-hero/stage-photo.js";import{DEFAULT_HERO_GALLERY_MODE as M,DEFAULT_HERO_IMAGE_FIT as P,DEFAULT_HERO_PHOTO_GROUND as U,parseHeroGalleryMode as $,parseHeroImageFit as v,parseHeroPhotoGround as z,resolveHeroImageFit as B}from"../lib/sections/hero-gallery.js";import{spinSetFor as D}from"../lib/sections/spin-sets.js";import{productHasComposedRender as I}from"../lib/wheels/set-mode.js";import{HideTaker as H}from"efficient-web-builder/render/components/ViewHideRoot";import{swipeEnabled as V,swipeStep as q}from"efficient-web-builder/format/lib/hero-swipe";function w({product:e,view:t,angleIdx:o,onSelect:m,isLight:l,onLightbox:r,galleryMode:s=M,imageFit:c=P,style:a,takesViewHide:i=!1,spin:h=W,ground:y=U}){const b=D(h,e.slug,t.metaValue),x=X(z(y),l),g=b?Y(t):t,u=$(s),f=B(v(c),I(e)),N=n(Q,{name:e.name,view:g,wellGround:x,angleIdx:o,onSelect:m,onLightbox:r,fit:f,spinSet:b});return u==="stacked"?n(H,{as:"div",takes:i,"data-hero-gallery":u,"data-hero-fit":f,style:a,children:g.photos.length<2&&!b?N:p(S,{children:[n(Z,{name:e.name,view:g,wellGround:x,onLightbox:r,fit:f,spinSet:b}),n(J,{angleIdx:o,total:C(g),onSelect:m,children:N})]})}):p(H,{as:"div",takes:i,"data-hero-gallery":u,"data-hero-fit":f,className:u==="tiled"?"flex items-start gap-3 max-view-tablet:gap-2":void 0,style:a,children:[n("div",{className:u==="tiled"?"min-w-0 flex-1":void 0,children:N}),u!=="main"&&n(tt,{name:e.name,view:g,angleIdx:o,onSelect:m,isLight:l,tiled:u==="tiled"})]})}function C(e){return e.photos.length>0?e.photos.length:e.thumbFallbackCells}const L="relative flex aspect-square items-center justify-center overflow-hidden",W={},O="sf-photo-ground-studio";function X(e,t){return e==="studio"?O:t?"bg-bg":""}function Y(e){return e.photos.length===0||e.closeUps.length===0?e:{...e,photos:[e.photos[0],...e.closeUps.map(t=>t.url)],captions:[e.captions[0],...e.closeUps.map(t=>t.title)]}}const k=(e,t,o)=>[e,t.metaValue,o].filter(Boolean).join(" — "),E=(e,t)=>[e,t.metaValue].filter(Boolean).join(" "),R=(e,t)=>`Open ${[e,t.metaValue].filter(Boolean).join(" ")} at full resolution`;function Z({name:e,view:t,wellGround:o,onLightbox:m,fit:l,spinSet:r}){const s=r?n(j,{set:r,name:E(e,t)}):null;return n("div",{"data-hero-stack":!0,className:"flex flex-col gap-2 max-view-tablet:hidden",children:t.photos.map((c,a)=>{const i=k(e,t,_(t,a));return n("div",{"data-hero-stack-photo":!0,className:[L,o].join(" "),style:{color:t.tint},children:a===0&&s?s:t.stageImage({photo:c,alt:i,label:R(e,t),onZoom:()=>m(c,i),fit:l,eager:a===0})},c)})})}function J({angleIdx:e,total:t,onSelect:o,children:m}){const l=T(null),r=T(null),s=V({count:t}),c=a=>({x:a.touches[0].clientX,y:a.touches[0].clientY});return n("div",{"data-hero-phone-stage":!0,className:"view-tablet:hidden",onTouchStart:a=>{l.current=s&&a.touches.length===1?c(a):null,r.current=l.current},onTouchMove:a=>{l.current&&(a.touches.length!==1?l.current=null:r.current=c(a))},onTouchEnd:()=>{const a=l.current,i=r.current;if(l.current=null,r.current=null,!a||!i)return;const h=q(i.x-a.x,i.y-a.y,e,t);h!==e&&o(h)},children:m})}const K=6;function Q({name:e,view:t,angleIdx:o,onSelect:m,onLightbox:l,fit:r,spinSet:s,wellGround:c}){const a=t.photos[Math.min(o,t.photos.length-1)],i=G(t.photos,a),h=C(t),y=h>=2,b=String(h).padStart(2,"0"),x=Math.min(o,Math.max(t.photos.length-1,0)),g=y||t.captions[x]?_(t,x):"",u=k(e,t,g),f="max-view-tablet:static",N=[`${L} max-view-tablet:col-span-2`,c].join(" ");return p("div",{className:"relative max-view-tablet:grid max-view-tablet:grid-cols-[minmax(0,1fr)_auto] max-view-tablet:items-start max-view-tablet:gap-x-3 max-view-tablet:gap-y-2",style:{color:t.tint},children:[p("div",{className:`absolute left-0 top-0 z-10 flex items-center gap-3 font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.2em] text-fg ${f} max-view-tablet:min-w-0 max-view-tablet:flex-wrap max-view-tablet:gap-x-2 max-view-tablet:gap-y-1`,children:[y&&p(S,{children:[p("span",{className:"text-accent",children:[String(o+1).padStart(2,"0")," / ",b]}),n("span",{className:"text-fg-dim",children:"·"})]}),n("span",{children:e}),t.metaValue&&p(S,{children:[n("span",{className:"text-fg-dim",children:"·"}),n("span",{className:"text-accent",children:t.metaValue})]})]}),y&&n("div",{className:`absolute right-5 top-5 z-10 flex gap-1 ${f}`,children:F(o,h,m).map(d=>n("button",{type:"button","aria-label":d.label,title:d.label,onClick:d.onClick,className:"flex h-7 w-7 items-center justify-center border border-fg-dim/60 text-fg transition-colors hover:border-accent hover:text-accent",children:d.glyph},d.label))}),p("div",{className:N,children:[c!==O&&["top-3 left-3","top-3 right-3","bottom-3 left-3","bottom-3 right-3"].map((d,A)=>n("span",{className:`absolute ${d} h-3 w-3 border border-fg-dim/40`,style:{borderTop:d.includes("top")?"1px solid var(--site-line)":"none",borderBottom:d.includes("bottom")?"1px solid var(--site-line)":"none",borderLeft:d.includes("left")?"1px solid var(--site-line)":"none",borderRight:d.includes("right")?"1px solid var(--site-line)":"none"}},A)),s&&x===0?n(j,{set:s,name:E(e,t)}):t.stageImage({photo:i,alt:u,label:R(e,t),onZoom:()=>l(i,u),fit:r})]}),p("div",{className:`absolute bottom-0 left-0 right-0 z-10 flex items-end justify-between gap-3 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em] text-fg-dim ${f} max-view-tablet:col-span-2 max-view-tablet:flex-wrap`,children:[p("span",{className:"flex min-w-0 flex-col gap-1",children:[t.specCaption&&n("span",{children:t.specCaption}),t.referenceNote&&n("span",{"data-hero-reference-note":!0,children:t.referenceNote}),t.galleryHint&&n("span",{"data-hero-gallery-hint":!0,children:t.galleryHint})]}),n("span",{children:t.originCaption})]})]})}function tt({name:e,view:t,angleIdx:o,onSelect:m,isLight:l,tiled:r=!1}){const s=C(t);return s<2?null:n("div",{className:r?"order-[-1] flex w-16 flex-col gap-2 max-view-tablet:w-12 max-view-tablet:gap-1":"mt-2 grid grid-cols-4 gap-2 max-view-tablet:gap-1",style:!r&&s>4?{gridTemplateColumns:`repeat(${Math.min(s,K)}, minmax(0, 1fr))`}:void 0,children:Array.from({length:s}).map((c,a)=>{const i=t.photos[a];return p("button",{type:"button",onClick:()=>m(a),"aria-label":`View ${_(t,a)}`,"aria-pressed":a===o,className:["relative flex aspect-square items-center justify-center overflow-hidden transition-colors",l?"bg-bg":"",a===o?"border border-accent":"border border-transparent hover:border-fg-dim"].join(" "),style:{color:t.tint},children:[n("span",{className:"absolute top-1.5 left-2 z-10 font-mono text-[length:var(--size-label,8px)] uppercase tracking-[0.18em] text-fg-dim",children:String(a+1).padStart(2,"0")}),t.thumbImage({photo:i,alt:`${e} — ${_(t,a)}`})]},a)})})}export{w as default};
@@ -1,5 +1,5 @@
1
1
  import type { SlotComponent } from "efficient-easel/blocks";
2
- export default function SectionGroupBody({ place, sections: Sections, editing, widths, navTextCase, menuRow, toolTextStyle, iconSize, cartIcon, }: {
2
+ export default function SectionGroupBody({ place, sections: Sections, editing, widths, navTextCase, menuRow, toolTextStyle, iconSize, cartIcon, revealOnScroll, }: {
3
3
  place: "header" | "footer";
4
4
  sections: SlotComponent;
5
5
  editing?: boolean;
@@ -9,4 +9,5 @@ export default function SectionGroupBody({ place, sections: Sections, editing, w
9
9
  toolTextStyle?: unknown;
10
10
  iconSize?: unknown;
11
11
  cartIcon?: unknown;
12
+ revealOnScroll?: unknown;
12
13
  }): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as t}from"react/jsx-runtime";import{PhoneMenuToolsProvider as g}from"efficient-web-builder/render/components/PhoneMenuTools";import{AccountInPhoneMenuProvider as P}from"./PhoneMenuAccount.js";import{SectionGroupWidthsProvider as b}from"efficient-web-builder/render/components/SiteGutterFrame";import{chromeOwnWidth as x}from"efficient-web-builder/format/lib/content/section-width";import{centredCap as k,SITE_WIDTH_CAP as S}from"efficient-web-builder/format/lib/content/page-width";import{resolveHeaderToolLook as y,resolveMenuRow as H,resolveNavTextCase as _}from"../lib/content/header-bar.js";import{HeaderToolLookContext as w}from"./HeaderTools.js";import{HideTaker as A}from"efficient-web-builder/render/components/ViewHideRoot";import{textKindVars as E}from"../lib/content/text-kind-vars.js";import{blockParts as a}from"../lib/block-parts.js";const O=a("SiteHeader")("header-content"),R=a("SiteFooter")("footer"),M={font:"--sf-header-tool-font",size:"--sf-header-tool-size"};function C(o){const n=E(o,M);return Object.keys(n).length?n:null}function L({place:o,sections:n,editing:c=!1,widths:u,navTextCase:f,menuRow:m,toolTextStyle:s,iconSize:h,cartIcon:v}){const p=o==="footer"?"footer":"div",e=x(u),r=e.content==="full"?"100vw":e.contentMax===null?null:`${e.contentMax}px`,d=o==="footer"&&e.background==="content"?k(S):null,l=o==="header"?C(s):null,T=r===null&&d===null&&l===null?void 0:{...d,...r===null?null:{"--sf-site-width":r},...l},i=t(A,{as:p,"data-section-group":o,...o==="header"?{"data-header-nav-case":_(f),"data-header-menu-row":H(m)??"top",...l?{"data-header-tool-style":String(s)}:null}:null,className:c&&o==="footer"?"sf-theme-surfaces bg-bg text-fg":void 0,style:T,...o==="header"?O:R,children:t(b,{value:{background:e.background,content:e.content==="content"?"content":null},children:t(n,{minEmptyHeight:120})})});return o==="header"?t(g,{children:t(P,{children:t(w.Provider,{value:y({cartIcon:v,iconSize:h}),children:i})})}):i}export{L as default};
1
+ "use client";import{jsx as r}from"react/jsx-runtime";import{useEffect as g,useState as b}from"react";import{PhoneMenuToolsProvider as E}from"efficient-web-builder/render/components/PhoneMenuTools";import{AccountInPhoneMenuProvider as O}from"./PhoneMenuAccount.js";import{SectionGroupWidthsProvider as P}from"efficient-web-builder/render/components/SiteGutterFrame";import{chromeOwnWidth as S}from"efficient-web-builder/format/lib/content/section-width";import{centredCap as x,SITE_WIDTH_CAP as y}from"efficient-web-builder/format/lib/content/page-width";import{resolveHeaderToolLook as _,resolveMenuRow as k,resolveNavTextCase as A}from"../lib/content/header-bar.js";import{HeaderToolLookContext as H}from"./HeaderTools.js";import{HideTaker as L}from"efficient-web-builder/render/components/ViewHideRoot";import{textKindVars as z}from"../lib/content/text-kind-vars.js";import{blockParts as h}from"../lib/block-parts.js";import{FOOTER_REVEAL_ATTR as C,footerRevealOn as M,footerRevealWanted as F}from"../lib/content/footer-reveal.js";const V=h("SiteHeader")("header-content"),W=h("SiteFooter")("footer"),j={font:"--sf-header-tool-font",size:"--sf-header-tool-size"};function I(e){const o=z(e,j);return Object.keys(o).length?o:null}function B(e,o){const s=F(e)&&!o,[d,l]=b(!1);return g(()=>{if(!s){l(!1);return}const i=document.querySelector('[data-section-group="footer"]');if(!i)return;const t=()=>l(M(e,i.getBoundingClientRect().height,window.innerHeight,o));t(),window.addEventListener("resize",t);const a=typeof ResizeObserver>"u"?null:new ResizeObserver(t);return a?.observe(i),()=>{window.removeEventListener("resize",t),a?.disconnect()}},[s,e,o]),d}function D({place:e,sections:o,editing:s=!1,widths:d,navTextCase:l,menuRow:i,toolTextStyle:t,iconSize:a,cartIcon:v,revealOnScroll:p}){const w=e==="footer"?"footer":"div",n=S(d),u=n.content==="full"?"100vw":n.contentMax===null?null:`${n.contentMax}px`,f=e==="footer"&&n.background==="content"?x(y):null,c=e==="header"?I(t):null,R=B(e==="footer"?p:void 0,s),T=u===null&&f===null&&c===null?void 0:{...f,...u===null?null:{"--sf-site-width":u},...c},m=r(L,{as:w,"data-section-group":e,...e==="header"?{"data-header-nav-case":A(l),"data-header-menu-row":k(i)??"top",...c?{"data-header-tool-style":String(t)}:null}:null,...R?{[C]:"on"}:null,className:s&&e==="footer"?"sf-theme-surfaces bg-bg text-fg":void 0,style:T,...e==="header"?V:W,children:r(P,{value:{background:n.background,content:n.content==="content"?"content":null},children:r(o,{minEmptyHeight:120})})});return e==="header"?r(E,{children:r(O,{children:r(H.Provider,{value:_({cartIcon:v,iconSize:a}),children:m})})}):m}export{D as default};
@@ -1,9 +1,10 @@
1
- import type { HeroGalleryMode, HeroImageFit } from "../../lib/sections/hero-gallery.js";
1
+ import type { HeroGalleryMode, HeroImageFit, HeroPhotoGround } from "../../lib/sections/hero-gallery.js";
2
2
  import type { SpinSets } from "../../lib/sections/spin-sets.js";
3
3
  interface GalleryLook {
4
4
  galleryMode?: HeroGalleryMode;
5
5
  imageFit?: HeroImageFit;
6
6
  spin?: SpinSets;
7
+ ground?: HeroPhotoGround;
7
8
  }
8
9
  export default function DynamicProductGallery({ editing, ...look }: {
9
10
  editing?: boolean;
@@ -1 +1 @@
1
- "use client";import{jsx as p,jsxs as T,Fragment as ut}from"react/jsx-runtime";import{useCallback as x,useEffect as k,useRef as a,useState as A}from"react";import{HALF_SIZES as j,sizedImage as U}from"efficient-web-builder/format/lib/sized-image";import{prefersReducedMotion as q}from"efficient-web-builder/render/components/useReducedMotion";import{SPIN_MAX_ZOOM as B,clampSpinZoom as mt,isFullTurn as pt,spinClampPosition as dt,spinFrameIndex as ft,spinPositionAfterDrag as G,spinStartPosition as ht}from"../../lib/sections/spin-sets.js";const xt=.25,gt=.3,bt=.85,K=24,zt=300,yt=.0015,V=4,J=1e3,wt=1920,Q=c=>U(c,{fallbackWidth:J,maxWidth:J}),Mt=c=>U(c,{fallbackWidth:wt});function vt({set:c,name:v}){const[l,nt]=A(!1),[W,et]=A(()=>ht(c)),[g,rt]=A({z:1,x:0,y:0}),[L,O]=A(0),b=a(null),z=a(0),P=a(W),F=a(1),d=a(g),y=a(null),u=a(new Map),h=a(null),S=a(0),I=a(null),m=c.frames.length,D=pt(c),Y=ft(W,m,D),_=x(t=>{const n=dt(t,m,D);return P.current=n,et(n),n},[m,D]),f=x(()=>cancelAnimationFrame(z.current),[]),w=x(t=>{d.current=t,rt(t)},[]),M=x((t,n,e)=>{const r=b.current;if(!r)return;const o=r.getBoundingClientRect(),s=d.current,i=mt(t),E=n-o.left-o.width/2,Z=e-o.top-o.height/2;if(i<=1.01){w({z:1,x:0,y:0});return}const $=r.clientWidth*(i-1)/2,H=r.clientHeight*(i-1)/2,at=E-(E-s.x)*i/s.z,lt=Z-(Z-s.y)*i/s.z;w({z:i,x:Math.max(-$,Math.min($,at)),y:Math.max(-H,Math.min(H,lt))})},[w]),N=x(()=>{const t=c.frames[0];if(I.current===t)return;I.current=t,O(0);const n=[];for(let e=0;e<V;e+=1)for(let r=e;r<m;r+=V)n.push(r);for(const e of n){const r=Q(c.frames[e]),o=new Image;o.onload=()=>{I.current===t&&O(s=>s+1)},o.sizes=j,r.srcSet&&(o.srcset=r.srcSet),o.src=r.src}},[m,c.frames]),ot=x(()=>{const t=()=>{const n=P.current+xt*F.current;_(n)!==n&&(F.current=-F.current),z.current=requestAnimationFrame(t)};z.current=requestAnimationFrame(t)},[_]),st=()=>{const t=!l;if(nt(t),f(),!t){w({z:1,x:0,y:0});return}q()||ot()};k(()=>{l&&N()},[l,N]),k(()=>{const t=b.current;if(!l||!t)return;const n=e=>{e.preventDefault(),f(),M(d.current.z*Math.exp(-e.deltaY*yt),e.clientX,e.clientY)};return t.addEventListener("wheel",n,{passive:!1}),()=>t.removeEventListener("wheel",n)},[l,f,M]),k(()=>f,[f]);const ct=t=>{if(f(),u.current.set(t.pointerId,{x:t.clientX,y:t.clientY}),t.currentTarget.setPointerCapture?.(t.pointerId),u.current.size===2){const[n,e]=[...u.current.values()];h.current={d0:Math.hypot(n.x-e.x,n.y-e.y),z0:d.current.z},y.current=null;return}if(t.pointerType==="touch"){const n=Date.now();if(n-S.current<zt){S.current=0,M(d.current.z>1.01?1:B,t.clientX,t.clientY);return}S.current=n}y.current={x0:t.clientX,f0:P.current,last:{x:t.clientX,y:t.clientY},speed:0}},it=t=>{if(!u.current.has(t.pointerId))return;if(u.current.set(t.pointerId,{x:t.clientX,y:t.clientY}),u.current.size===2&&h.current){const[o,s]=[...u.current.values()],i=Math.hypot(o.x-s.x,o.y-s.y);h.current.d0>0&&M(h.current.z0*i/h.current.d0,(o.x+s.x)/2,(o.y+s.y)/2);return}const n=y.current,e=b.current;if(!n||!e)return;const r=d.current;if(r.z>1.01){const o=e.clientWidth*(r.z-1)/2,s=e.clientHeight*(r.z-1)/2,i=Math.max(-o,Math.min(o,r.x+t.clientX-n.last.x)),E=Math.max(-s,Math.min(s,r.y+t.clientY-n.last.y));n.last={x:t.clientX,y:t.clientY},w({z:r.z,x:i,y:E});return}n.speed=t.clientX-n.last.x,n.last={x:t.clientX,y:t.clientY},_(G(n.f0,t.clientX-n.x0,e.clientWidth,m))},C=t=>{if(u.current.delete(t.pointerId),u.current.size>0)return;h.current=null;const n=y.current;y.current=null;const e=b.current;if(!n||!e||d.current.z>1.01||q())return;let r=Math.max(-K,Math.min(K,n.speed));const o=()=>{if(Math.abs(r)<gt)return;const s=G(P.current,r,e.clientWidth,m);_(s)===s&&(r*=bt,z.current=requestAnimationFrame(o))};z.current=requestAnimationFrame(o)},X=g.z>1.01,R=`translate(${g.x}px, ${g.y}px) scale(${g.z})`;return T(ut,{children:[l&&T("div",{ref:b,"data-spin-well":!0,"aria-hidden":"true",className:`absolute inset-0 z-20 select-none overflow-hidden bg-bg ${X?"cursor-move":"cursor-grab active:cursor-grabbing"}`,style:{touchAction:X?"none":"pan-y"},onPointerDown:ct,onPointerMove:it,onPointerUp:C,onPointerCancel:C,onDoubleClick:t=>{f(),M(d.current.z>1.01?1:B,t.clientX,t.clientY)},onTouchStart:t=>t.stopPropagation(),onTouchMove:t=>t.stopPropagation(),onTouchEnd:t=>t.stopPropagation(),onClick:t=>t.stopPropagation(),children:[p(tt,{sized:Q(c.frames[Y]),transform:R}),X&&p(tt,{sized:Mt(c.zoomFrames[Y]),transform:R}),p("span",{className:"pointer-events-none absolute bottom-8 left-1/2 -translate-x-1/2 whitespace-nowrap text-xs tracking-[0.04em] text-fg-dim max-view-tablet:bottom-auto max-view-tablet:top-4",children:"Drag to turn · scroll or pinch to zoom"}),L<m&&p("span",{className:"absolute inset-x-0 bottom-0 h-0.5 bg-fg/10",children:p("span",{className:"block h-full bg-fg transition-[width]",style:{width:`${L/m*100}%`}})})]}),T("button",{type:"button","data-spin-toggle":!0,"aria-pressed":l,"aria-label":l?`Show the photo of ${v}`:`Turn ${v} through 360°`,onClick:t=>{t.stopPropagation(),st()},className:"absolute bottom-6 left-6 z-30 inline-flex h-10 items-center gap-2 whitespace-nowrap border border-fg bg-bg px-4 text-xs font-medium uppercase tracking-[0.06em] text-fg transition-colors hover:bg-fg hover:text-bg max-view-tablet:bottom-4 max-view-tablet:left-4",children:[T("svg",{viewBox:"0 0 24 24","aria-hidden":"true",className:"h-4 w-4 fill-none stroke-current",strokeWidth:1.4,children:[p("path",{d:"M20 12a8 8 0 1 1-2.3-5.6"}),p("path",{d:"M20 4v4h-4"})]}),p("span",{children:l?"Show photo":"View 360°"})]})]})}function tt({sized:c,transform:v}){return p("img",{...c,sizes:j,alt:"",draggable:!1,className:"pointer-events-none absolute inset-[6%] h-[88%] w-[88%] object-contain",style:{transform:v}})}export{vt as default};
1
+ "use client";import{jsx as y}from"react/jsx-runtime";import{useCallback as S,useEffect as k,useRef as u,useState as N}from"react";import{HALF_SIZES as D,sizedImage as U}from"efficient-web-builder/format/lib/sized-image";import{prefersReducedMotion as q}from"efficient-web-builder/render/components/useReducedMotion";import{isFullTurn as I,spinClampPosition as O,spinFrameIndex as M,spinPositionAfterDrag as x,spinStartPosition as F}from"../../lib/sections/spin-sets.js";const Z=.3,B=.85,_=24,T=4,L=1e3,R=77/72,C=`${(1-R)/2*100}%`,X=`${R*100}%`,z=new Set,W=o=>U(o,{fallbackWidth:L,maxWidth:L});function J({set:o,name:$}){const[E,K]=N(()=>F(o)),h=u(null),g=u(0),f=u(E),p=u(null),P=u(null),n=o.frames.length,w=I(o),A=M(E,n,w),i=S(t=>{const e=O(t,n,w);return f.current=e,K(e),e},[n,w]),d=S(()=>cancelAnimationFrame(g.current),[]);k(()=>{const t=o.frames[0];if(P.current===t||(P.current=t,z.has(t)))return;z.add(t);const e=M(F(o),n,I(o)),r=[];for(let l=0;l<T;l+=1)for(let s=l;s<n;s+=T)r.push((e+s)%n);const a=l=>{const s=W(o.frames[l]),m=new Image;return m.sizes=D,s.srcSet&&(m.srcset=s.srcSet),m.src=s.src,m},c=a(r[0]),b=()=>r.slice(1).forEach(a);c.onload=b,c.onerror=b},[n,o]),k(()=>d,[d]);const j=t=>{d(),t.currentTarget.setPointerCapture?.(t.pointerId),p.current={x0:t.clientX,f0:f.current,last:t.clientX,speed:0}},G=t=>{const e=p.current,r=h.current;!e||!r||(e.speed=t.clientX-e.last,e.last=t.clientX,i(x(e.f0,t.clientX-e.x0,r.clientWidth,n)))},v=()=>{const t=p.current;p.current=null;const e=h.current;if(!t||!e||q())return;let r=Math.max(-_,Math.min(_,t.speed));const a=()=>{if(Math.abs(r)<Z)return;const c=x(f.current,r,e.clientWidth,n);i(c)===c&&(r*=B,g.current=requestAnimationFrame(a))};g.current=requestAnimationFrame(a)},H=t=>{const e=t.key==="ArrowRight"||t.key==="ArrowUp"?1:t.key==="ArrowLeft"||t.key==="ArrowDown"?-1:0;if(t.key==="Home")i(0);else if(t.key==="End")i(n-1);else if(e)i(Math.round(f.current)+e);else return;d(),t.preventDefault()};return y("div",{ref:h,"data-spin-well":!0,role:"slider",tabIndex:0,"aria-label":`${$}, 360° view: drag or use the arrow keys to turn`,"aria-valuemin":1,"aria-valuemax":n,"aria-valuenow":A+1,"aria-valuetext":`Angle ${A+1} of ${n}`,onKeyDown:H,className:"absolute inset-0 select-none overflow-hidden cursor-grab active:cursor-grabbing focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-fg",style:{touchAction:"pan-y"},onPointerDown:j,onPointerMove:G,onPointerUp:v,onPointerCancel:v,onTouchStart:t=>t.stopPropagation(),onTouchMove:t=>t.stopPropagation(),onTouchEnd:t=>t.stopPropagation(),onClick:t=>t.stopPropagation(),children:y("img",{...W(o.frames[A]),sizes:D,alt:"",draggable:!1,fetchPriority:"high","data-spin-frame":!0,className:"pointer-events-none absolute max-w-none object-contain",style:{left:C,top:C,width:X,height:X}})})}export{J as default};
@@ -19,6 +19,10 @@ export interface HeroView {
19
19
  alt: string;
20
20
  }) => ReactNode;
21
21
  captions: readonly (string | undefined)[];
22
+ closeUps: readonly {
23
+ url: string;
24
+ title: string;
25
+ }[];
22
26
  galleryHint: string;
23
27
  referenceNote: string;
24
28
  thumbFallbackCells: number;
@@ -1 +1 @@
1
- "use client";import{jsx as a,Fragment as b,jsxs as x}from"react/jsx-runtime";import N from"./TyreHeroFitment.js";import{STAGE_IMAGE_SIZES as y}from"./stage-photo.js";import{HeroVehicleMemory as w}from"./VehicleQuestion.js";import E from"./WheelHeroFitment.js";import C from"../PreOrderPanel.js";import j from"efficient-web-builder/render/components/RMark";import z from"../TyreImage.js";import F from"../WheelImage.js";import k from"../WheelSvg.js";import{partVariant as P,wheelFinish as H}from"../../lib/catalog/from-wheel.js";import{tyreModelLine as L}from"../../lib/tyres/tyre-brand-name.js";import{axisRenderingsFor as R,lugRenderingsFor as S}from"../../lib/wheels/cover-rendering.js";import{finishAngles as _}from"../../lib/wheels/finish-photos.js";import{selectedStuds as A}from"../../lib/wheels/selected-studs.js";import{REFERENCE_NOTE as T,stageIsFallback as B}from"../../lib/wheels/render-fit.js";import{PER_WHEEL_UNIT as O}from"../../lib/wheels/set-mode.js";import{variantSpecLabel as I}from"../../lib/wheels/variant-spec.js";function ne(t,e){return t.captions[e]?.trim()||`Photo ${e+1}`}function se({text:t}){return t==="FusionForge®"?x(b,{children:["FusionForge",a(j,{})]}):a(b,{children:t})}function le(t,e,p){if(t.kind==="tyre"){const r=t.source,l=e.shown.size??r.sizes[0]??"",s=r.variants.find(m=>m.size===l),f=s?.specs.tireType??r.variants[0]?.specs.tireType??null,d=[s?.image,r.coverImage].filter(m=>!!m);return{heading:L(r.brand,r.name),photos:d.slice(0,1),tint:void 0,stageImage:()=>a(z,{image:s?.image??r.coverImage,size:l,type:f,sizes:y,priority:!0,className:"h-full w-full"}),thumbImage:()=>null,captions:[],thumbFallbackCells:0,galleryHint:"",referenceNote:"",metaValue:l,specCaption:s?[s.specs.loadIndex,s.specs.speedRating].filter(Boolean).join(""):"",originCaption:r.brand,unitLabel:"per tyre",vehicle:a(N,{slug:r.slug,variants:r.variants,vehicle:e.vehicle,manualMode:e.manualMode,setManualMode:e.setManualMode}),vehicleMemory:e.manualMode?null:a(w,{vehicle:e.vehicle}),vehicleAnswersSpecs:!1,preOrder:null}}const o=t.source,n=H(o,e.shown.finish),i=P(o,e.part),h=A(e),M=i?.components.find(r=>r.hand!=="right")??i?.components[0],c=R(n,M?.renderKey),u=c?null:S(n,h),v=c?[...c]:u?[...u]:_(n),g=v.length>0?v:o.coverImage?[o.coverImage]:[];return{heading:t.name,photos:g,tint:n.color,stageImage:({photo:r,alt:l,label:s,onZoom:f,fit:d,eager:m=!0})=>a(F,{src:r,alt:l,fill:!0,sizes:y,className:d==="cover"?"object-cover":"object-contain",priority:m,onImageClick:f,imageButtonClassName:"relative block h-[88%] w-[88%] cursor-zoom-in",imageButtonLabel:s,fallback:a(k,{spokes:o.spokes,mesh:o.mesh,className:"block h-[70%] w-[70%]"})}),thumbImage:({photo:r,alt:l})=>a(F,{src:r,alt:l,fill:!0,sizes:"(max-width: 720px) 20vw, (max-width: 1100px) 10vw, 120px",className:"object-contain",imageWrapperClassName:"relative h-[80%] w-[80%]",fallback:a(k,{spokes:o.spokes,mesh:o.mesh,className:"block h-[55%] w-[55%]"})}),captions:g.map(r=>n.captions?.[r]),thumbFallbackCells:4,galleryHint:V(g,n,h,e.manualMode),referenceNote:!c&&B(n,i,h,u!=null)?T:"",metaValue:n.name,specCaption:i?I(i):"",originCaption:o.process==="FusionForge®"?"FusionForge® · Hybrid":`${o.process} · 1-piece`,unitLabel:O,vehicle:a(E,{selection:e,spec:i?I(i):"",vehicle:e.vehicle,wheel:o}),vehicleMemory:e.manualMode?null:a(w,{vehicle:e.vehicle}),vehicleAnswersSpecs:!0,preOrder:a(C,{wheel:o,editing:p})}}function V(t,e,p,o){return t.length>=2||p!=null||!Object.values(e.lugRenderings??{}).some(i=>Array.isArray(i)&&i.filter(Boolean).length>=2)?"":o?"Pick a bolt pattern to see every angle":"Pick your vehicle to see every angle"}export{se as MarkedLabel,le as heroView,ne as photoLabel};
1
+ "use client";import{jsx as a,Fragment as b,jsxs as x}from"react/jsx-runtime";import N from"./TyreHeroFitment.js";import{STAGE_IMAGE_SIZES as y}from"./stage-photo.js";import{HeroVehicleMemory as w}from"./VehicleQuestion.js";import E from"./WheelHeroFitment.js";import C from"../PreOrderPanel.js";import j from"efficient-web-builder/render/components/RMark";import z from"../TyreImage.js";import F from"../WheelImage.js";import k from"../WheelSvg.js";import{partVariant as P,wheelFinish as S}from"../../lib/catalog/from-wheel.js";import{tyreModelLine as H}from"../../lib/tyres/tyre-brand-name.js";import{axisRenderingsFor as L,lugRenderingsFor as R}from"../../lib/wheels/cover-rendering.js";import{namedDetailShots as _}from"../../lib/wheels/detail-shots.js";import{finishAngles as A}from"../../lib/wheels/finish-photos.js";import{selectedStuds as T}from"../../lib/wheels/selected-studs.js";import{REFERENCE_NOTE as B,stageIsFallback as O}from"../../lib/wheels/render-fit.js";import{PER_WHEEL_UNIT as V}from"../../lib/wheels/set-mode.js";import{variantSpecLabel as I}from"../../lib/wheels/variant-spec.js";function le(t,e){return t.captions[e]?.trim()||`Photo ${e+1}`}function me({text:t}){return t==="FusionForge®"?x(b,{children:["FusionForge",a(j,{})]}):a(b,{children:t})}function ce(t,e,h){if(t.kind==="tyre"){const r=t.source,l=e.shown.size??r.sizes[0]??"",n=r.variants.find(m=>m.size===l),f=n?.specs.tireType??r.variants[0]?.specs.tireType??null,d=[n?.image,r.coverImage].filter(m=>!!m);return{heading:H(r.brand,r.name),photos:d.slice(0,1),tint:void 0,stageImage:()=>a(z,{image:n?.image??r.coverImage,size:l,type:f,sizes:y,priority:!0,className:"h-full w-full"}),thumbImage:()=>null,captions:[],closeUps:[],thumbFallbackCells:0,galleryHint:"",referenceNote:"",metaValue:l,specCaption:n?[n.specs.loadIndex,n.specs.speedRating].filter(Boolean).join(""):"",originCaption:r.brand,unitLabel:"per tyre",vehicle:a(N,{slug:r.slug,variants:r.variants,vehicle:e.vehicle,manualMode:e.manualMode,setManualMode:e.setManualMode}),vehicleMemory:e.manualMode?null:a(w,{vehicle:e.vehicle}),vehicleAnswersSpecs:!1,preOrder:null}}const o=t.source,i=S(o,e.shown.finish),s=P(o,e.part),c=T(e),M=s?.components.find(r=>r.hand!=="right")??s?.components[0],p=L(i,M?.renderKey),u=p?null:R(i,c),v=p?[...p]:u?[...u]:A(i),g=v.length>0?v:o.coverImage?[o.coverImage]:[];return{heading:t.name,photos:g,tint:i.color,stageImage:({photo:r,alt:l,label:n,onZoom:f,fit:d,eager:m=!0})=>a(F,{src:r,alt:l,fill:!0,sizes:y,className:d==="cover"?"object-cover":"object-contain",priority:m,onImageClick:f,imageButtonClassName:"relative block h-[88%] w-[88%] cursor-zoom-in",imageButtonLabel:n,fallback:a(k,{spokes:o.spokes,mesh:o.mesh,className:"block h-[70%] w-[70%]"})}),thumbImage:({photo:r,alt:l})=>a(F,{src:r,alt:l,fill:!0,sizes:"(max-width: 720px) 20vw, (max-width: 1100px) 10vw, 120px",className:"object-contain",imageWrapperClassName:"relative h-[80%] w-[80%]",fallback:a(k,{spokes:o.spokes,mesh:o.mesh,className:"block h-[55%] w-[55%]"})}),captions:g.map(r=>i.captions?.[r]),closeUps:_(i,c),thumbFallbackCells:4,galleryHint:W(g,i,c,e.manualMode),referenceNote:!p&&O(i,s,c,u!=null)?B:"",metaValue:i.name,specCaption:s?I(s):"",originCaption:o.process==="FusionForge®"?"FusionForge® · Hybrid":`${o.process} · 1-piece`,unitLabel:V,vehicle:a(E,{selection:e,spec:s?I(s):"",vehicle:e.vehicle,wheel:o}),vehicleMemory:e.manualMode?null:a(w,{vehicle:e.vehicle}),vehicleAnswersSpecs:!0,preOrder:a(C,{wheel:o,editing:h})}}function W(t,e,h,o){return t.length>=2||h!=null||!Object.values(e.lugRenderings??{}).some(s=>Array.isArray(s)&&s.filter(Boolean).length>=2)?"":o?"Pick a bolt pattern to see every angle":"Pick your vehicle to see every angle"}export{me as MarkedLabel,ce as heroView,le as photoLabel};
@@ -0,0 +1,3 @@
1
+ export declare const FOOTER_REVEAL_ATTR = "data-footer-reveal";
2
+ export declare function footerRevealWanted(stored: unknown): boolean;
3
+ export declare function footerRevealOn(stored: unknown, footerHeight: number, windowHeight: number, editing: boolean): boolean;
@@ -0,0 +1 @@
1
+ const a="data-footer-reveal";function o(e){return e===!0}function f(e,r,t,n){return!o(e)||n||!(r>0)||!(t>0)?!1:r<=t}export{a as FOOTER_REVEAL_ATTR,f as footerRevealOn,o as footerRevealWanted};
@@ -1 +1 @@
1
- import{DEFAULT_HERO_GALLERY_MODE as e,DEFAULT_HERO_IMAGE_FIT as l}from"../../../../sections/hero-gallery.js";const o={label:"Product Gallery",defaultProps:{galleryMode:e,imageFit:l,spin:{}}};export{o as ProductGalleryMeta};
1
+ import{DEFAULT_HERO_GALLERY_MODE as r,DEFAULT_HERO_IMAGE_FIT as e,DEFAULT_HERO_PHOTO_GROUND as l}from"../../../../sections/hero-gallery.js";const E={label:"Product Gallery",defaultProps:{galleryMode:r,imageFit:e,ground:l,spin:{}}};export{E as ProductGalleryMeta};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import i from"../../../../../components/pdp-dynamic/DynamicProductGallery.js";import{parseHeroGalleryMode as o,parseHeroImageFit as t}from"../../../../sections/hero-gallery.js";import{parseSpinSets as a}from"../../../../sections/spin-sets.js";import{ProductGalleryMeta as m}from"./meta.js";const y={...m,render:e=>r(i,{editing:e.editor?.isEditing,galleryMode:o(e.galleryMode),imageFit:t(e.imageFit),spin:a(e.spin)})};export{y as ProductGalleryRender};
1
+ import{jsx as e}from"react/jsx-runtime";import o from"../../../../../components/pdp-dynamic/DynamicProductGallery.js";import{parseHeroGalleryMode as i,parseHeroImageFit as t,parseHeroPhotoGround as a}from"../../../../sections/hero-gallery.js";import{parseSpinSets as d}from"../../../../sections/spin-sets.js";import{ProductGalleryMeta as m}from"./meta.js";const u={...m,render:r=>e(o,{editing:r.editor?.isEditing,galleryMode:i(r.galleryMode),imageFit:t(r.imageFit),spin:d(r.spin),ground:a(r.ground)})};export{u as ProductGalleryRender};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import i from"../../../../../components/SectionGroupBody.js";import{SiteFooterMeta as s}from"./meta.js";const p={...s,render:({sections:o,editor:t,...e})=>r(i,{place:"footer",sections:o,widths:e,editing:t?.isEditing})};export{p as SiteFooterRender};
1
+ import{jsx as i}from"react/jsx-runtime";import n from"../../../../../components/SectionGroupBody.js";import{SiteFooterMeta as s}from"./meta.js";const c={...s,render:({sections:o,editor:e,revealOnScroll:r,...t})=>i(n,{place:"footer",sections:o,widths:t,editing:e?.isEditing,revealOnScroll:r})};export{c as SiteFooterRender};
@@ -1,3 +1,4 @@
1
+ import { type PictureGround } from "./picture-grounds.js";
1
2
  import { type ImageFit } from "efficient-web-builder/format/lib/content/image-fit";
2
3
  export type HeroGalleryMode = "main" | "thumbs" | "tiled" | "stacked";
3
4
  export declare const HERO_GALLERY_MODES: readonly ["main", "thumbs", "tiled", "stacked"];
@@ -12,3 +13,13 @@ export declare function heroImageFitOptions(): {
12
13
  value: HeroImageFit;
13
14
  }[];
14
15
  export declare function resolveHeroImageFit(fit: HeroImageFit, composed: boolean): HeroImageFit;
16
+ export type HeroPhotoGround = Extract<PictureGround, "flat" | "studio">;
17
+ export declare const HERO_PHOTO_GROUNDS: ({
18
+ readonly label: "Flat";
19
+ readonly value: "flat";
20
+ } | {
21
+ readonly label: "Studio";
22
+ readonly value: "studio";
23
+ })[];
24
+ export declare const DEFAULT_HERO_PHOTO_GROUND: HeroPhotoGround;
25
+ export declare function parseHeroPhotoGround(v: unknown): HeroPhotoGround;
@@ -1 +1 @@
1
- import{parseOption as e}from"efficient-shell/format";import{IMAGE_FIT_LABEL as r,parseImageFit as n}from"efficient-web-builder/format/lib/content/image-fit";const i=["main","thumbs","tiled","stacked"],p="thumbs";function m(t){return e(i,p,t)}const a=["contain","cover"],E="contain";function _(t){return n(t,E)}function I(){return a.map(t=>({label:r[t],value:t}))}function u(t,o){return o?"contain":t}export{p as DEFAULT_HERO_GALLERY_MODE,E as DEFAULT_HERO_IMAGE_FIT,i as HERO_GALLERY_MODES,a as HERO_IMAGE_FITS,I as heroImageFitOptions,m as parseHeroGalleryMode,_ as parseHeroImageFit,u as resolveHeroImageFit};
1
+ import{parseOption as r}from"efficient-shell/format";import{PICTURE_GROUNDS as e}from"./picture-grounds.js";import{IMAGE_FIT_LABEL as n,parseImageFit as p}from"efficient-web-builder/format/lib/content/image-fit";const a=["main","thumbs","tiled","stacked"],i="thumbs";function H(t){return r(a,i,t)}const E=["contain","cover"],_="contain";function R(t){return p(t,_)}function f(){return E.map(t=>({label:n[t],value:t}))}function x(t,o){return o?"contain":t}const s=e.filter(t=>t.value!=="soft"),O="flat";function I(t){return r(s.map(o=>o.value),O,t)}export{i as DEFAULT_HERO_GALLERY_MODE,_ as DEFAULT_HERO_IMAGE_FIT,O as DEFAULT_HERO_PHOTO_GROUND,a as HERO_GALLERY_MODES,E as HERO_IMAGE_FITS,s as HERO_PHOTO_GROUNDS,f as heroImageFitOptions,H as parseHeroGalleryMode,R as parseHeroImageFit,I as parseHeroPhotoGround,x as resolveHeroImageFit};
@@ -0,0 +1,11 @@
1
+ export declare const PICTURE_GROUNDS: readonly [{
2
+ readonly label: "Flat";
3
+ readonly value: "flat";
4
+ }, {
5
+ readonly label: "Soft grey";
6
+ readonly value: "soft";
7
+ }, {
8
+ readonly label: "Studio";
9
+ readonly value: "studio";
10
+ }];
11
+ export type PictureGround = (typeof PICTURE_GROUNDS)[number]["value"];
@@ -0,0 +1 @@
1
+ const l=[{label:"Flat",value:"flat"},{label:"Soft grey",value:"soft"},{label:"Studio",value:"studio"}];export{l as PICTURE_GROUNDS};
@@ -1,10 +1,9 @@
1
1
  export interface SpinSet {
2
2
  frames: string[];
3
- zoomFrames: string[];
4
3
  arc?: number;
4
+ start?: number;
5
5
  }
6
6
  export type SpinSets = Record<string, Record<string, SpinSet>>;
7
- export declare const SPIN_MAX_ZOOM = 2;
8
7
  export declare function parseSpinSets(v: unknown): SpinSets;
9
8
  export declare function spinSetFor(sets: SpinSets, productSlug: string, finishName: string | undefined): SpinSet | null;
10
9
  export declare function isFullTurn(set: SpinSet): boolean;
@@ -12,4 +11,3 @@ export declare function spinStartPosition(set: SpinSet): number;
12
11
  export declare function spinFrameIndex(position: number, count: number, loop?: boolean): number;
13
12
  export declare function spinClampPosition(position: number, count: number, loop: boolean): number;
14
13
  export declare function spinPositionAfterDrag(start: number, dx: number, width: number, count: number): number;
15
- export declare function clampSpinZoom(z: number): number;
@@ -1 +1 @@
1
- const p=2,l=360,m=.9,f=r=>Array.isArray(r)&&r.length>0&&r.every(t=>typeof t=="string"&&t.length>0);function a(r){if(!r||typeof r!="object")return null;const{frames:t,zoomFrames:n}=r;if(!f(t)||!f(n)||t.length!==n.length)return null;const{arc:e}=r;return e===void 0?{frames:[...t],zoomFrames:[...n]}:typeof e!="number"||!(e>0&&e<=360)?null:{frames:[...t],zoomFrames:[...n],arc:e}}function h(r){if(!r||typeof r!="object"||Array.isArray(r))return{};const t={};for(const[n,e]of Object.entries(r)){if(!e||typeof e!="object"||Array.isArray(e))continue;const o={};for(const[s,u]of Object.entries(e)){const i=a(u);i&&(o[s]=i)}Object.keys(o).length>0&&(t[n]=o)}return t}function x(r,t,n){return n?r[t]?.[n]??null:null}function c(r){return r.arc===void 0||r.arc>=360}function y(r){return c(r)?0:Math.floor(r.frames.length/2)}function M(r,t,n=!0){return n?(Math.floor(r)%t+t)%t:Math.max(0,Math.min(t-1,Math.floor(r)))}function L(r,t,n){return n?r:Math.max(0,Math.min(t-1,r))}function _(r,t,n,e){return n<=0?r:r-t/n*e*.9}function g(r){return Math.max(1,Math.min(2,r))}export{p as SPIN_MAX_ZOOM,g as clampSpinZoom,c as isFullTurn,h as parseSpinSets,L as spinClampPosition,M as spinFrameIndex,_ as spinPositionAfterDrag,x as spinSetFor,y as spinStartPosition};
1
+ const l=360,y=.9,u=r=>Array.isArray(r)&&r.length>0&&r.every(t=>typeof t=="string"&&t.length>0);function a(r){if(!r||typeof r!="object")return null;const{frames:t,arc:n,start:e}=r;if(!u(t))return null;const i={frames:[...t]};if(n!==void 0){if(typeof n!="number"||!(n>0&&n<=360))return null;i.arc=n}return Number.isInteger(e)&&e>=0&&e<t.length&&(i.start=e),i}function h(r){if(!r||typeof r!="object"||Array.isArray(r))return{};const t={};for(const[n,e]of Object.entries(r)){if(!e||typeof e!="object"||Array.isArray(e))continue;const i={};for(const[f,s]of Object.entries(e)){const o=a(s);o&&(i[f]=o)}Object.keys(i).length>0&&(t[n]=i)}return t}function x(r,t,n){return n?r[t]?.[n]??null:null}function c(r){return r.arc===void 0||r.arc>=360}function p(r){return c(r)?0:Math.floor(r.frames.length/2)}function L(r){return r.start??p(r)}function m(r,t,n=!0){return n?(Math.floor(r)%t+t)%t:Math.max(0,Math.min(t-1,Math.floor(r)))}function g(r,t,n){return n?r:Math.max(0,Math.min(t-1,r))}function b(r,t,n,e){return n<=0?r:r-t/n*e*.9}export{c as isFullTurn,h as parseSpinSets,g as spinClampPosition,m as spinFrameIndex,b as spinPositionAfterDrag,x as spinSetFor,L as spinStartPosition};
@@ -5,6 +5,9 @@ export interface DetailShotPick {
5
5
  shownFor: number | null;
6
6
  }
7
7
  export declare function pickDetailShots(finish: Pick<Finish, "detailShots"> | undefined, carStuds: number | null): DetailShotPick;
8
- export declare function detailShotsFor(finish: Pick<Finish, "detailShots"> | undefined, carStuds: number | null): DetailShot[];
8
+ export declare function namedDetailShots(finish: Pick<Finish, "detailShots"> | undefined, carStuds: number | null): {
9
+ url: string;
10
+ title: string;
11
+ }[];
9
12
  export declare function detailShotTag(shot: DetailShot, pick: DetailShotPick, carStuds: number | null): string | undefined;
10
13
  export declare function variesByCar(shot: DetailShot, all: readonly DetailShot[]): boolean;
@@ -1 +1 @@
1
- function d(e,r){const t=e?.detailShots;if(!Array.isArray(t)||t.length===0)return{rows:[],shownFor:null};const s=t.filter(n=>!!n&&typeof n.url=="string"&&!!n.url&&typeof n.title=="string"&&!!n.title);if(s.length===0)return{rows:[],shownFor:null};const o=s.filter(n=>f(n).length>0).flatMap(f);let l=r,a=null;if(l==null)l=o.length?Math.min(...o):null;else if(o.length&&!o.includes(l)){const n=l;l=o.reduce((u,i)=>{const g=Math.abs(i-n),c=Math.abs(u-n);return g<c||g===c&&i>u?i:u}),a=l}const h=new Set;return{rows:s.filter(n=>{const u=f(n);if(u.length>0&&(l==null||!u.includes(l)))return!1;const i=JSON.stringify([n.eyebrow??"",n.title,n.line??"",[...u].sort()]);return h.has(i)?!1:(h.add(i),!0)}),shownFor:a}}function y(e,r){return d(e,r).rows}function f(e){return Array.isArray(e.lugs)?e.lugs.filter(r=>typeof r=="number"):[]}function p(e,r,t){if(t!=null)return r.shownFor!=null?f(e).length>0?`Shown on the ${r.shownFor} lug wheel. Your ${t} lug wheel may look different.`:void 0:w(e,r.rows)?`Shown for your ${t} lug`:void 0}function w(e,r){const t=Array.isArray(e.lugs)?e.lugs:[];if(t.length===0)return!1;const s=new Set;for(const o of r)for(const l of o.lugs??[])s.add(l);return t.length<s.size}export{p as detailShotTag,y as detailShotsFor,d as pickDetailShots,w as variesByCar};
1
+ function w(t,r){const n=t?.detailShots;if(!Array.isArray(n)||n.length===0)return{rows:[],shownFor:null};const l=n.filter(e=>!!e&&typeof e.url=="string"&&!!e.url&&typeof e.title=="string"&&!!e.title);if(l.length===0)return{rows:[],shownFor:null};const o=l.filter(e=>f(e).length>0).flatMap(f);let u=r,a=null;if(u==null)u=o.length?Math.min(...o):null;else if(o.length&&!o.includes(u)){const e=u;u=o.reduce((i,s)=>{const c=Math.abs(s-e),h=Math.abs(i-e);return c<h||c===h&&s>i?s:i}),a=u}const g=new Set;return{rows:l.filter(e=>{const i=f(e);if(i.length>0&&(u==null||!i.includes(u)))return!1;const s=JSON.stringify([e.eyebrow??"",e.title,e.line??"",[...i].sort()]);return g.has(s)?!1:(g.add(s),!0)}),shownFor:a}}function p(t,r){const n=w(t,r);return n.rows.map(l=>{const o=d(l,n,r);return{url:l.url,title:o?`${l.title}. ${o}`:l.title}})}function f(t){return Array.isArray(t.lugs)?t.lugs.filter(r=>typeof r=="number"):[]}function d(t,r,n){if(n!=null)return r.shownFor!=null?f(t).length>0?`Shown on the ${r.shownFor} lug wheel. Your ${n} lug wheel may look different.`:void 0:y(t,r.rows)?`Shown for your ${n} lug`:void 0}function y(t,r){const n=Array.isArray(t.lugs)?t.lugs:[];if(n.length===0)return!1;const l=new Set;for(const o of r)for(const u of o.lugs??[])l.add(u);return n.length<l.size}export{d as detailShotTag,p as namedDetailShots,w as pickDetailShots,y as variesByCar};