efficient-storefront-blocks 0.83.0 → 0.85.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 (98) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/chunks/{EditorPreviewCheckout-RI5SBSCE.js → EditorPreviewCheckout-4XHYYAT2.js} +1 -1
  3. package/dist/chunks/{SiteEditorProvider-OQXY7YGK.js → SiteEditorProvider-X4YKBAJ4.js} +1 -1
  4. package/dist/chunks/{chunk-DX6JADLE.js → chunk-KKKMX6LH.js} +1 -1
  5. package/dist/chunks/{chunk-AUYTGAOU.js → chunk-NFXV7HDB.js} +1 -1
  6. package/dist/chunks/chunk-NNBMZAW4.js +340 -0
  7. package/dist/chunks/chunk-VG4SUIRK.js +1 -0
  8. package/dist/chunks/chunk-Y5LB56KB.js +1 -0
  9. package/dist/chunks/{fitment-data-64LXUHOU.js → fitment-data-2I2FDPXW.js} +1 -1
  10. package/dist/contract.js +2 -2
  11. package/dist/editor/lib/document/blocks/commerce/DetailRows/fields.js +1 -1
  12. package/dist/editor/lib/document/blocks/commerce/ProductHero/fields.js +1 -1
  13. package/dist/editor/lib/document/blocks/commerce/index.d.ts +1 -1
  14. package/dist/editor/lib/document/config.d.ts +1 -0
  15. package/dist/editor/lib/document/config.js +1 -1
  16. package/dist/editor/lib/document/popup-look-fields.d.ts +4 -0
  17. package/dist/editor/lib/document/popup-look-fields.js +1 -0
  18. package/dist/editor/lib/document/section-text-regions.js +1 -1
  19. package/dist/editor/lib/efficient-backend.js +1 -1
  20. package/dist/editor/lib/storefront-editor-words.d.ts +8 -1
  21. package/dist/editor/lib/storefront-editor-words.js +1 -1
  22. package/dist/editor.css +1 -1
  23. package/dist/index.js +136 -93
  24. package/dist/render/app/globals.css +156 -0
  25. package/dist/render/built-with.json +1 -1
  26. package/dist/render/components/CartContext.d.ts +1 -0
  27. package/dist/render/components/CartContext.js +1 -1
  28. package/dist/render/components/CartDrawer.d.ts +4 -3
  29. package/dist/render/components/CartDrawer.js +1 -4
  30. package/dist/render/components/DetailRows.d.ts +6 -1
  31. package/dist/render/components/DetailRows.js +1 -1
  32. package/dist/render/components/FinishSwatches.js +2 -1
  33. package/dist/render/components/LinkedProductHero.d.ts +2 -2
  34. package/dist/render/components/PopupFrame.d.ts +10 -1
  35. package/dist/render/components/PopupFrame.js +5 -1
  36. package/dist/render/components/ProductCard.js +1 -1
  37. package/dist/render/components/ProductHeroPanel.d.ts +5 -5
  38. package/dist/render/components/ProductHeroPanel.js +1 -1
  39. package/dist/render/components/ProductRef.js +1 -1
  40. package/dist/render/components/Reviews.d.ts +1 -0
  41. package/dist/render/components/Reviews.js +1 -1
  42. package/dist/render/components/SpecTable.js +1 -1
  43. package/dist/render/components/card-pieces/CardPrice.d.ts +9 -1
  44. package/dist/render/components/card-pieces/CardPrice.js +1 -1
  45. package/dist/render/components/card-pieces/ClippedPictures.d.ts +10 -0
  46. package/dist/render/components/card-pieces/ClippedPictures.js +1 -0
  47. package/dist/render/components/card-pieces/HostPart.d.ts +2 -1
  48. package/dist/render/components/card-pieces/HostPart.js +1 -1
  49. package/dist/render/components/card-pieces/ProductCardState.d.ts +12 -0
  50. package/dist/render/components/card-pieces/ProductCardState.js +1 -1
  51. package/dist/render/components/card-pieces/useHeldCardPicture.d.ts +16 -0
  52. package/dist/render/components/card-pieces/useHeldCardPicture.js +1 -0
  53. package/dist/render/components/pdp-dynamic/DynamicDetailRows.d.ts +2 -0
  54. package/dist/render/components/pdp-dynamic/DynamicDetailRows.js +1 -1
  55. package/dist/render/components/pdp-dynamic/DynamicProductHero.d.ts +2 -2
  56. package/dist/render/components/product-hero/stage-photo.d.ts +6 -0
  57. package/dist/render/components/product-hero/stage-photo.js +3 -3
  58. package/dist/render/components/useFinishSelection.d.ts +3 -0
  59. package/dist/render/components/useFinishSelection.js +3 -1
  60. package/dist/render/components/useProductCatalog.d.ts +2 -0
  61. package/dist/render/components/wheels-plp/PlpCard.js +1 -1
  62. package/dist/render/lib/api/types.d.ts +15 -2
  63. package/dist/render/lib/content/hero-price-seed.d.ts +4 -0
  64. package/dist/render/lib/content/hero-price-seed.js +1 -0
  65. package/dist/render/lib/document/blocks/commerce/DetailRows/meta.d.ts +6 -0
  66. package/dist/render/lib/document/blocks/commerce/DetailRows/meta.js +1 -1
  67. package/dist/render/lib/document/blocks/commerce/DetailRows/render.js +1 -1
  68. package/dist/render/lib/document/blocks/commerce/ProductHero/meta.d.ts +4 -0
  69. package/dist/render/lib/document/blocks/commerce/ProductHero/meta.js +1 -1
  70. package/dist/render/lib/document/blocks/commerce/ProductHero/render.js +1 -1
  71. package/dist/render/lib/document/blocks/commerce/ProductPrice/render.js +1 -1
  72. package/dist/render/lib/document/card-templates.js +1 -1
  73. package/dist/render/lib/document/current-record.d.ts +4 -15
  74. package/dist/render/lib/document/current-record.js +1 -1
  75. package/dist/render/lib/document/render-config.d.ts +1 -0
  76. package/dist/render/lib/document/render-config.js +1 -1
  77. package/dist/render/lib/document/section-to-box-rows-detail.d.ts +2 -0
  78. package/dist/render/lib/document/section-to-box-rows-detail.js +1 -0
  79. package/dist/render/lib/document/section-to-box-rows-reviews.js +1 -1
  80. package/dist/render/lib/document/section-to-box-rows-spec.js +1 -1
  81. package/dist/render/lib/document/storefront-root.js +1 -1
  82. package/dist/render/lib/sections/product-price-text-regions.d.ts +4 -0
  83. package/dist/render/lib/sections/product-price-text-regions.js +1 -0
  84. package/dist/render/lib/sections/section-band.d.ts +6 -0
  85. package/dist/render/lib/sections/section-band.js +1 -1
  86. package/dist/render/lib/sections/spec-table-band.d.ts +4 -0
  87. package/dist/render/lib/sections/spec-table-band.js +1 -0
  88. package/dist/render/lib/wheels/signed-url.d.ts +3 -0
  89. package/dist/render/lib/wheels/signed-url.js +1 -0
  90. package/dist/words.d.ts +34 -15
  91. package/dist/words.js +5 -5
  92. package/package.json +4 -3
  93. package/dist/chunks/chunk-CRXKVHUQ.js +0 -1
  94. package/dist/chunks/chunk-LMOEQBT7.js +0 -340
  95. package/dist/chunks/chunk-QOM2OL54.js +0 -1
  96. package/dist/render/lib/sections/product-hero-text-regions.d.ts +0 -3
  97. package/dist/render/lib/sections/product-hero-text-regions.js +0 -1
  98. /package/dist/chunks/{chunk-LMOEQBT7.js.LEGAL.txt → chunk-NNBMZAW4.js.LEGAL.txt} +0 -0
@@ -1 +1 @@
1
- "use client";import{Fragment as E,jsx as e,jsxs as l}from"react/jsx-runtime";import z from"./SectionBand.js";import{useScopeClass as I}from"../lib/use-scope-class.js";import{useState as C}from"react";import R from"efficient-web-builder/render/components/SectionHeader";import{CardTemplateRows as D}from"efficient-web-builder/render/components/CardRowContext";import j from"./WheelSvg.js";import{renderGold as w,renderHeadline as V}from"efficient-web-builder/render/components/goldPhrases";import{inchLabel as y}from"../lib/wheels/spec-format.js";import W from"./DimensionArrowMarkers.js";import B from"./SpecTablePartBridge.js";import{SPEC_REGION_ATTR as A}from"efficient-web-builder/format/lib/sections/spec-table-regions";import{say as _}from"efficient-web-builder/format/lib/editor-words";import{applyShopMark as M}from"efficient-web-builder/format/lib/markup";import{useEnglish as P}from"./EnglishVariant.js";import{sizedImage as G}from"efficient-web-builder/format/lib/sized-image";const $={between:"[&>*+*]:border-t [&>*+*]:border-line",every:"[&>*]:border-t [&>*]:border-line"},T="[&_sup.text-accent.tracking-normal]:static [&_sup.text-accent.tracking-normal]:align-baseline [&_sup.text-accent.tracking-normal]:[font-size:inherit] [&_sup.text-accent.tracking-normal]:text-current [&_sup.text-accent.tracking-normal]:tracking-[inherit]",H="(max-width: 1100px) 80vw, 290px",d={labelSmall:"text-[length:var(--size-label,11px)]",label:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,14px)]"};function r(i,a){return i?{[A]:a}:{}}function O({editing:i,nodeId:a,children:s}){return!i||!a?e(E,{children:s}):e(B,{nodeId:a,children:s})}function L({row:i,topBorder:a,editing:s}){return l("div",{className:`flex items-baseline justify-between gap-6 py-4 font-mono ${d.labelLarge} tracking-[0.05em] ${a?"border-t border-line":""}`,children:[e("span",{...r(s,"rowLabel"),className:"uppercase text-fg-dim",children:i.label}),e("span",{...r(s,"rowValue"),className:`text-right ${i.accent?"text-accent":"text-fg"}`,children:i.value})]})}function F({diagram:i,editing:a}){const[s,b]=C(!1),c=I("spec"),{wheelName:p,imageSrc:n,diameter:f,width:g,offset:h,holes:v,pcd:k,spokes:m,mesh:o,bore:S}=i,u=!!n&&!s;return l("div",{className:"sf-card bg-surface p-6 max-view-desktop:mt-8",children:[e("div",{...r(a,"diagramTitle"),className:`mb-3 font-mono ${d.label} uppercase tracking-[0.25em] text-fg-dim`,children:"Wheel Dimension Diagram"}),l("div",{className:"relative flex aspect-square items-center justify-center",children:[l("svg",{viewBox:"0 0 320 320",className:"absolute inset-0 h-full w-full text-fg-dim",fill:"none",stroke:"currentColor",children:[e("line",{x1:40,y1:20,x2:280,y2:20,strokeWidth:1,markerStart:`url(#${c}-L)`,markerEnd:`url(#${c}-R)`}),e("line",{x1:40,y1:15,x2:40,y2:25,strokeWidth:1}),e("line",{x1:280,y1:15,x2:280,y2:25,strokeWidth:1}),e(W,{id:c})]}),u?e("img",{...G(n,{fallbackWidth:960}),sizes:H,alt:`${p} — face`,onError:()=>b(!0),loading:"lazy",className:"relative z-[1] block h-[80%] w-[80%] object-contain"}):e(j,{spokes:m,mesh:o,className:"relative z-[1] block h-[72%] w-[72%] text-accent"}),l("span",{...r(a,"diagramCallout"),className:`absolute top-1.5 left-1/2 z-20 -translate-x-1/2 bg-surface px-2 font-mono ${d.label} tracking-[0.2em] text-accent`,children:["⌀ ",y(f)]}),l("span",{...r(a,"diagramCallout"),className:`absolute bottom-1.5 left-1/2 z-20 -translate-x-1/2 bg-surface px-2 font-mono ${d.label} tracking-[0.2em] text-fg`,children:["WIDTH ",y(g)]})]}),l("div",{className:`mt-4 grid grid-cols-5 gap-3 font-mono ${d.labelSmall} uppercase tracking-[0.2em] text-fg-dim max-[480px]:grid-cols-3`,children:[l("div",{children:[e("div",{...r(a,"diagramStatLabel"),className:"text-fg-dim/60",children:"Holes"}),e("div",{...r(a,"diagramStatValue"),className:"mt-1 text-fg",children:v})]}),l("div",{children:[e("div",{...r(a,"diagramStatLabel"),className:"text-fg-dim/60",children:"PCD"}),e("div",{...r(a,"diagramStatValue"),className:"mt-1 text-fg",children:k})]}),l("div",{children:[e("div",{...r(a,"diagramStatLabel"),className:"text-fg-dim/60",children:"Spokes"}),l("div",{...r(a,"diagramStatValue"),className:"mt-1 text-fg",children:[m,o?" + Mesh":""]})]}),l("div",{children:[e("div",{...r(a,"diagramStatLabel"),className:"text-fg-dim/60",children:"Bore"}),e("div",{...r(a,"diagramStatValue"),className:"mt-1 text-fg",children:S})]}),l("div",{children:[e("div",{...r(a,"diagramStatLabel"),className:"text-fg-dim/60",children:"ET"}),e("div",{...r(a,"diagramStatValue"),className:"mt-1 text-accent",children:h})]})]})]})}function Y({num:i,title:a,description:s,rows:b,builtInLabels:c=!1,diagram:p,editing:n=!1,omitHead:f=!1,nodeId:g,capped:h=!0,template:v}){const k=P(),m=(b??[]).filter(t=>(t?.label??"").trim()||(t?.value??"").trim()).map(t=>c&&t.label?{...t,label:k(t.label)}:t),o=m.length>0?m:n?[{label:_("Label"),value:_("Value")}]:[],S=o.map(t=>({label:t.label??"",value:t.accent&&t.value?M(t.value,0,t.value.length,"highlight").text:t.value??""})),u=t=>p?l("div",{className:"grid grid-cols-[1fr_400px] gap-12 max-view-desktop:grid-cols-1",children:[e("div",{className:t?`${$.between} ${T}`:void 0,children:t??o.map((N,x)=>e(L,{row:N,topBorder:x>0,editing:n},x))}),e(F,{diagram:p,editing:n})]}):e("div",{className:`grid grid-cols-2 gap-x-16 max-[900px]:grid-cols-1${t?` ${$.every} ${T}`:""}`,children:t??o.map((N,x)=>e(L,{row:N,topBorder:!0,editing:n},x))});return e(z,{className:f?"border-b border-line pt-0 pb-[120px] max-view-desktop:pt-0 max-view-desktop:pb-20":"border-b border-line py-[120px] max-view-desktop:py-20",capped:h,children:l(O,{editing:n,nodeId:g,children:[f?null:e(R,{num:i?w(i):void 0,title:a?V(a,!1):void 0,description:s?w(s):void 0,accent:!0}),e(D,{ownerId:g??"",ownerType:"SpecTable",Template:v,rows:S,fallback:u(),children:t=>u(t)})]})})}export{Y as default};
1
+ "use client";import{Fragment as z,jsx as e,jsxs as l}from"react/jsx-runtime";import C from"./SectionBand.js";import{SPEC_TABLE_BAND as w}from"../lib/sections/spec-table-band.js";import{useScopeClass as I}from"../lib/use-scope-class.js";import{useState as B}from"react";import D from"efficient-web-builder/render/components/SectionHeader";import{CardTemplateRows as R}from"efficient-web-builder/render/components/CardRowContext";import j from"./WheelSvg.js";import{renderGold as _,renderHeadline as A}from"efficient-web-builder/render/components/goldPhrases";import{inchLabel as y}from"../lib/wheels/spec-format.js";import V from"./DimensionArrowMarkers.js";import W from"./SpecTablePartBridge.js";import{SPEC_REGION_ATTR as P}from"efficient-web-builder/format/lib/sections/spec-table-regions";import{say as T}from"efficient-web-builder/format/lib/editor-words";import{applyShopMark as M}from"efficient-web-builder/format/lib/markup";import{useEnglish as G}from"./EnglishVariant.js";import{sizedImage as H}from"efficient-web-builder/format/lib/sized-image";const $={between:"[&>*+*]:border-t [&>*+*]:border-line",every:"[&>*]:border-t [&>*]:border-line"},E="[&_sup.text-accent.tracking-normal]:static [&_sup.text-accent.tracking-normal]:align-baseline [&_sup.text-accent.tracking-normal]:[font-size:inherit] [&_sup.text-accent.tracking-normal]:text-current [&_sup.text-accent.tracking-normal]:tracking-[inherit]",O="(max-width: 1100px) 80vw, 290px",d={labelSmall:"text-[length:var(--size-label,11px)]",label:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,14px)]"};function r(i,a){return i?{[P]:a}:{}}function F({editing:i,nodeId:a,children:n}){return!i||!a?e(z,{children:n}):e(W,{nodeId:a,children:n})}function L({row:i,topBorder:a,editing:n}){return l("div",{className:`flex items-baseline justify-between gap-6 py-4 font-mono ${d.labelLarge} tracking-[0.05em] ${a?"border-t border-line":""}`,children:[e("span",{...r(n,"rowLabel"),className:"uppercase text-fg-dim",children:i.label}),e("span",{...r(n,"rowValue"),className:`text-right ${i.accent?"text-accent":"text-fg"}`,children:i.value})]})}function Y({diagram:i,editing:a}){const[n,x]=B(!1),o=I("spec"),{wheelName:p,imageSrc:s,diameter:f,width:g,offset:b,holes:v,pcd:S,spokes:m,mesh:c,bore:N}=i,u=!!s&&!n;return l("div",{className:"sf-card bg-surface p-6 max-view-desktop:mt-8",children:[e("div",{...r(a,"diagramTitle"),className:`mb-3 font-mono ${d.label} uppercase tracking-[0.25em] text-fg-dim`,children:"Wheel Dimension Diagram"}),l("div",{className:"relative flex aspect-square items-center justify-center",children:[l("svg",{viewBox:"0 0 320 320",className:"absolute inset-0 h-full w-full text-fg-dim",fill:"none",stroke:"currentColor",children:[e("line",{x1:40,y1:20,x2:280,y2:20,strokeWidth:1,markerStart:`url(#${o}-L)`,markerEnd:`url(#${o}-R)`}),e("line",{x1:40,y1:15,x2:40,y2:25,strokeWidth:1}),e("line",{x1:280,y1:15,x2:280,y2:25,strokeWidth:1}),e(V,{id:o})]}),u?e("img",{...H(s,{fallbackWidth:960}),sizes:O,alt:`${p} — face`,onError:()=>x(!0),loading:"lazy",className:"relative z-[1] block h-[80%] w-[80%] object-contain"}):e(j,{spokes:m,mesh:c,className:"relative z-[1] block h-[72%] w-[72%] text-accent"}),l("span",{...r(a,"diagramCallout"),className:`absolute top-1.5 left-1/2 z-20 -translate-x-1/2 bg-surface px-2 font-mono ${d.label} tracking-[0.2em] text-accent`,children:["⌀ ",y(f)]}),l("span",{...r(a,"diagramCallout"),className:`absolute bottom-1.5 left-1/2 z-20 -translate-x-1/2 bg-surface px-2 font-mono ${d.label} tracking-[0.2em] text-fg`,children:["WIDTH ",y(g)]})]}),l("div",{className:`mt-4 grid grid-cols-5 gap-3 font-mono ${d.labelSmall} uppercase tracking-[0.2em] text-fg-dim max-[480px]:grid-cols-3`,children:[l("div",{children:[e("div",{...r(a,"diagramStatLabel"),className:"text-fg-dim/60",children:"Holes"}),e("div",{...r(a,"diagramStatValue"),className:"mt-1 text-fg",children:v})]}),l("div",{children:[e("div",{...r(a,"diagramStatLabel"),className:"text-fg-dim/60",children:"PCD"}),e("div",{...r(a,"diagramStatValue"),className:"mt-1 text-fg",children:S})]}),l("div",{children:[e("div",{...r(a,"diagramStatLabel"),className:"text-fg-dim/60",children:"Spokes"}),l("div",{...r(a,"diagramStatValue"),className:"mt-1 text-fg",children:[m,c?" + Mesh":""]})]}),l("div",{children:[e("div",{...r(a,"diagramStatLabel"),className:"text-fg-dim/60",children:"Bore"}),e("div",{...r(a,"diagramStatValue"),className:"mt-1 text-fg",children:N})]}),l("div",{children:[e("div",{...r(a,"diagramStatLabel"),className:"text-fg-dim/60",children:"ET"}),e("div",{...r(a,"diagramStatValue"),className:"mt-1 text-accent",children:b})]})]})]})}function Z({num:i,title:a,description:n,rows:x,builtInLabels:o=!1,diagram:p,editing:s=!1,omitHead:f=!1,nodeId:g,capped:b=!0,template:v}){const S=G(),m=(x??[]).filter(t=>(t?.label??"").trim()||(t?.value??"").trim()).map(t=>o&&t.label?{...t,label:S(t.label)}:t),c=m.length>0?m:s?[{label:T("Label"),value:T("Value")}]:[],N=c.map(t=>({label:t.label??"",value:t.accent&&t.value?M(t.value,0,t.value.length,"highlight").text:t.value??""})),u=t=>p?l("div",{className:"grid grid-cols-[1fr_400px] gap-12 max-view-desktop:grid-cols-1",children:[e("div",{className:t?`${$.between} ${E}`:void 0,children:t??c.map((k,h)=>e(L,{row:k,topBorder:h>0,editing:s},h))}),e(Y,{diagram:p,editing:s})]}):e("div",{className:`grid grid-cols-2 gap-x-16 max-[900px]:grid-cols-1${t?` ${$.every} ${E}`:""}`,children:t??c.map((k,h)=>e(L,{row:k,topBorder:!0,editing:s},h))});return e(C,{className:f?w.ownBox:w.inline,capped:b,children:l(F,{editing:s,nodeId:g,children:[f?null:e(D,{num:i?_(i):void 0,title:a?A(a,!1):void 0,description:n?_(n):void 0,accent:!0}),e(R,{ownerId:g??"",ownerType:"SpecTable",Template:v,rows:N,fallback:u(),children:t=>u(t)})]})})}export{Z as default};
@@ -1,7 +1,15 @@
1
+ import type { PartStyles } from "efficient-web-builder/render/lib/document/part-styles";
1
2
  export interface CardPriceSettings {
2
3
  show?: boolean;
3
4
  quoteSets?: boolean;
4
5
  setTotal?: boolean;
5
6
  wasFollowsSize?: boolean;
6
7
  }
7
- export default function CardPrice({ show, ...settings }: CardPriceSettings): import("react").JSX.Element;
8
+ export interface CardPriceRegion {
9
+ nodeId?: string;
10
+ partStyles?: PartStyles;
11
+ editing: boolean;
12
+ }
13
+ export default function CardPrice({ show, region, ...settings }: CardPriceSettings & {
14
+ region?: CardPriceRegion;
15
+ }): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as c,jsxs as m,Fragment as _}from"react/jsx-runtime";import{formatPrice as w}from"../../lib/commerce.js";import{setLabel as x}from"../../lib/wheels/variants.js";import{wheelCardPriceLine as u}from"../../lib/wheels/set-mode.js";import{EACH_UNIT as T,formatSelectionPrice as E,formatSelectionWasPrice as C,formatWheelPrice as d,formatWheelWasPrice as W,FROM_PREFIX as f,priceIn as g,resolveWheelPrice as p,SET_QUOTE_LABEL as y}from"../../lib/wheels/price-display.js";import{CARD_TEXT_SIZE as h,CardRow as P}from"./card-row.js";import{useProductCardState as F}from"./ProductCardState.js";function L(r,n){if(r.kind==="tyre"){const s=p(g(r.tyre.prices,r.currency),null);return{was:null,amount:d(s,r.currency,f),note:s.priced?T:null}}const{wheel:l,currency:e,price:t,sel:o,isSet:S}=r,i=p(l.prices[e],l.msrpPrices?.[e]),a=n.setTotal&&t.priced&&t.setTotal!=null&&o.selectedVariant?`${x(o.selectedVariant)} · ${w(t.setTotal,e)}`:null;return S&&n.quoteSets?{was:null,amount:i.priced?u(d(i,e,f),!0):y,note:a}:{was:n.wasFollowsSize?C(t,e):W(i,e),amount:u(E(t,e),t.priced),note:a}}function j({show:r=!0,...n}){const l=F(),{was:e,amount:t,note:o}=L(l,n);return m(_,{children:[c(P,{children:r?m("div",{className:`mt-2 font-mono ${h.labelLarge}`,children:[e&&c("span",{className:"mr-2 text-fg-dim line-through",children:e}),t]}):null}),c(P,{children:r&&o?c("div",{className:`mt-[2px] font-mono ${h.labelSmall} tracking-[0.08em] text-fg-dim`,children:o}):null})]})}export{j as default};
1
+ "use client";import{jsx as n,jsxs as c,Fragment as b}from"react/jsx-runtime";import P from"efficient-web-builder/render/components/TextRegionRun";import{SectionTextParts as S}from"efficient-web-builder/render/lib/document/editing-bridges";import{TEXT_REGION_ATTR as T}from"efficient-web-builder/format/lib/sections/text-regions";import{formatPrice as v}from"../../lib/commerce.js";import{setLabel as y}from"../../lib/wheels/variants.js";import{wheelCardPriceLine as d}from"../../lib/wheels/set-mode.js";import{EACH_UNIT as N,formatSelectionPrice as _,formatSelectionWasPrice as w,formatWheelPrice as p,formatWheelWasPrice as L,FROM_PREFIX as u,priceIn as k,resolveWheelPrice as f,SET_QUOTE_LABEL as E}from"../../lib/wheels/price-display.js";import{CARD_TEXT_SIZE as h,CardRow as x}from"./card-row.js";import{useHeroPriceStateOrNull as R,useProductCardState as I}from"./ProductCardState.js";function C(e,t){if(e.kind==="tyre"){const m=f(k(e.tyre.prices,e.currency),null);return{was:null,amount:p(m,e.currency,u),note:m.priced?N:null}}const{wheel:o,currency:r,price:i,sel:l,isSet:g}=e,a=f(o.prices[r],o.msrpPrices?.[r]),s=t.setTotal&&i.priced&&i.setTotal!=null&&l.selectedVariant?`${y(l.selectedVariant)} · ${v(i.setTotal,r)}`:null;return g&&t.quoteSets?{was:null,amount:a.priced?d(p(a,r,u),!0):E,note:s}:{was:t.wasFollowsSize?w(i,r):L(a,r),amount:d(_(i,r),i.priced),note:s}}function W({state:e,region:t}){const o=!!t?.editing,r=c("div",{className:"flex items-baseline gap-5 border-t border-line pt-[18px]",children:[e.msrpLabel&&n("div",{className:"font-mono text-[length:var(--size-label,15px)] text-fg-dim line-through",children:e.msrpLabel}),n("div",{className:"font-heading2 text-[length:min(var(--size-headingMedium,36px),var(--sf-heading-max,9999px))] font-bold leading-none tracking-[-0.01em] text-fg",...o?{[T]:"price"}:{},children:n(P,{region:"price",partStyles:t?.partStyles,children:e.amount})}),e.unitLabel&&n("div",{className:"font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.22em] text-fg",children:e.unitLabel}),e.packBadge&&n("div",{className:"ml-auto border border-accent px-3 py-2 font-mono text-[length:var(--size-label,13px)] font-bold uppercase tracking-[0.18em] text-accent",style:{background:"color-mix(in oklab, var(--accent) 14%, transparent)"},children:e.packBadge})]});return!o||!t?.nodeId?r:n(S,{nodeId:t.nodeId,sectionType:"ProductPrice",partStyles:t.partStyles,children:r})}function z({show:e=!0,region:t,...o}){const r=R();return r?n(W,{state:r,region:t}):n(F,{show:e,...o})}function F({show:e,...t}){const o=I(),{was:r,amount:i,note:l}=C(o,t);return c(b,{children:[n(x,{children:e?c("div",{className:`mt-2 font-mono ${h.labelLarge}`,children:[r&&n("span",{className:"mr-2 text-fg-dim line-through",children:r}),i]}):null}),n(x,{children:e&&l?n("div",{className:`mt-[2px] font-mono ${h.labelSmall} tracking-[0.08em] text-fg-dim`,children:l}):null})]})}export{z as default};
@@ -0,0 +1,10 @@
1
+ import type { Ref } from "react";
2
+ export declare function ClippedPictures({ clipRef, pictures, }: {
3
+ clipRef?: Ref<HTMLDivElement>;
4
+ pictures: readonly {
5
+ src: string;
6
+ sizes?: string;
7
+ onLoad: () => void;
8
+ onError: () => void;
9
+ }[];
10
+ }): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as s}from"react/jsx-runtime";import i from"next/image";function t({clipRef:r,pictures:o}){return s("div",{ref:r,className:"pointer-events-none absolute h-px w-px overflow-hidden opacity-0","aria-hidden":!0,children:o.map(e=>s(i,{src:e.src,alt:"",width:e.sizes?1e3:16,height:e.sizes?1e3:16,sizes:e.sizes,className:"absolute inset-0",loading:"lazy",onLoad:e.onLoad,onError:e.onError},e.src))})}export{t as ClippedPictures};
@@ -1,6 +1,7 @@
1
1
  import type { ReactNode } from "react";
2
- export default function HostPart({ label, editing, children }: {
2
+ export default function HostPart({ label, editing, onHero, children, }: {
3
3
  label: string;
4
4
  editing: boolean;
5
+ onHero?: boolean;
5
6
  children: ReactNode;
6
7
  }): import("react").JSX.Element | null;
@@ -1 +1 @@
1
- "use client";import{Fragment as o,jsx as r}from"react/jsx-runtime";import{say as s}from"efficient-web-builder/format/lib/editor-words";import{useProductCardStateOrNull as i}from"./ProductCardState.js";function n({label:t,editing:a,children:e}){return i()?r(o,{children:e}):a?r("div",{"data-host-part-sample":"",className:"opacity-60",children:s(t)}):null}export{n as default};
1
+ "use client";import{Fragment as l,jsx as r}from"react/jsx-runtime";import{say as i}from"efficient-web-builder/format/lib/editor-words";import{useHeroPriceStateOrNull as n,useProductCardStateOrNull as u}from"./ProductCardState.js";function m({label:t,editing:e,onHero:a=!1,children:o}){const s=n();return u()||a&&s?r(l,{children:o}):e?r("div",{"data-host-part-sample":"",className:"opacity-60",children:i(t)}):null}export{m as default};
@@ -36,6 +36,18 @@ export interface TyreCardState {
36
36
  readonly editing: boolean;
37
37
  }
38
38
  export type ProductCardState = WheelCardState | TyreCardState;
39
+ export interface HeroPriceState {
40
+ readonly kind: "hero";
41
+ readonly msrpLabel: string | null;
42
+ readonly amount: string;
43
+ readonly unitLabel: string | null;
44
+ readonly packBadge: string | null;
45
+ }
46
+ export declare function useHeroPriceStateOrNull(): HeroPriceState | null;
47
+ export declare function HeroPriceStateProvider({ value, children }: {
48
+ value: HeroPriceState;
49
+ children: ReactNode;
50
+ }): import("react").JSX.Element;
39
51
  export declare function useProductCardState(): ProductCardState;
40
52
  export declare function useProductCardStateOrNull(): ProductCardState | null;
41
53
  export declare function useWheelCardState(): WheelCardState;
@@ -1 +1 @@
1
- "use client";import{jsx as v}from"react/jsx-runtime";import{createContext as z,useCallback as A,useContext as P,useMemo as W,useState as y}from"react";import{useCurrency as h}from"../CurrencyContext.js";import{useTyreDetail as b}from"../useTyreDetail.js";import{usePlpCardSelection as B}from"../wheels-plp/usePlpCardSelection.js";import{tyrePagePath as N}from"../../lib/tyres/tyre-page-path.js";import{canOrderTyreVariant as T}from"../../lib/tyres/tyre-purchase.js";import{resolveSelectionPrice as j}from"../../lib/wheels/price-display.js";import{setBuildLabel as E,setIsWide as L,summarySetBuild as R}from"../../lib/wheels/set-mode.js";const c=z(null);function V(){const e=P(c);if(!e)throw new Error("A product card piece was drawn outside a product card (no ProductCardState).");return e}function K(){return P(c)}function Q(){const e=V();if(e.kind!=="wheel")throw new Error("A wheel card piece was drawn on a tyre card.");return e}const _=[];function X({wheel:e,colours:i=_,defaultFinish:u,editing:l=!1,children:a}){const{currency:t}=h(),r=B(e,i,u),[d,f]=y(!1),s=R(e),n={kind:"wheel",wheel:e,sel:r,currency:t,price:j(e,r.selectedVariant,t,1),isSet:L(s),setWords:E(s),editing:l,notifyOpen:d,setNotifyOpen:f};return v(c.Provider,{value:n,children:a})}function Y({tyre:e,currency:i,editing:u=!1,children:l}){const{currency:a}=h(),{slug:t}=e,r=N(t),[d,f]=y(!1),s=A(()=>{t&&f(!0)},[t]),{state:n,tyre:m}=b(t??null,d),o=W(()=>m?.variants??[],[m]),[x,w]=y(null),O=o.length===1?o[0].size:null,C=x??O,p=o.find(k=>k.size===C),S=n==="ready",g={kind:"tyre",tyre:e,currency:i,activeCurrency:a,pagePath:r,arm:s,detailState:n,detail:m,variants:o,chosen:C,setSize:w,variant:p,canAdd:p!=null&&T(p,a),detailReady:S,unsellable:!r||n==="error"||S&&o.length===0,editing:u};return v(c.Provider,{value:g,children:l})}export{Y as TyreCardStateProvider,X as WheelCardStateProvider,V as useProductCardState,K as useProductCardStateOrNull,Q as useWheelCardState};
1
+ "use client";import{jsx as P}from"react/jsx-runtime";import{createContext as z,useCallback as A,useContext as S,useMemo as N,useState as v}from"react";import{useCurrency as C}from"../CurrencyContext.js";import{useTyreDetail as W}from"../useTyreDetail.js";import{usePlpCardSelection as b}from"../wheels-plp/usePlpCardSelection.js";import{tyrePagePath as B}from"../../lib/tyres/tyre-page-path.js";import{canOrderTyreVariant as T}from"../../lib/tyres/tyre-purchase.js";import{resolveSelectionPrice as j}from"../../lib/wheels/price-display.js";import{setBuildLabel as E,setIsWide as H,summarySetBuild as L}from"../../lib/wheels/set-mode.js";const r=z(null);function K(){const e=S(r);return e?.kind==="hero"?e:null}function Q({value:e,children:n}){return P(r.Provider,{value:e,children:n})}function R(){const e=S(r);if(!e||e.kind==="hero")throw new Error("A product card piece was drawn outside a product card (no ProductCardState).");return e}function X(){const e=S(r);return e?.kind==="hero"?null:e}function Y(){const e=R();if(e.kind!=="wheel")throw new Error("A wheel card piece was drawn on a tyre card.");return e}const V=[];function Z({wheel:e,colours:n=V,defaultFinish:u,editing:l=!1,children:c}){const{currency:t}=C(),o=b(e,n,u),[d,f]=v(!1),i=L(e),a={kind:"wheel",wheel:e,sel:o,currency:t,price:j(e,o.selectedVariant,t,1),isSet:H(i),setWords:E(i),editing:l,notifyOpen:d,setNotifyOpen:f};return P(r.Provider,{value:a,children:c})}function $({tyre:e,currency:n,editing:u=!1,children:l}){const{currency:c}=C(),{slug:t}=e,o=B(t),[d,f]=v(!1),i=A(()=>{t&&f(!0)},[t]),{state:a,tyre:p}=W(t??null,d),s=N(()=>p?.variants??[],[p]),[x,w]=v(null),O=s.length===1?s[0].size:null,y=x??O,m=s.find(g=>g.size===y),h=a==="ready",k={kind:"tyre",tyre:e,currency:n,activeCurrency:c,pagePath:o,arm:i,detailState:a,detail:p,variants:s,chosen:y,setSize:w,variant:m,canAdd:m!=null&&T(m,c),detailReady:h,unsellable:!o||a==="error"||h&&s.length===0,editing:u};return P(r.Provider,{value:k,children:l})}export{Q as HeroPriceStateProvider,$ as TyreCardStateProvider,Z as WheelCardStateProvider,K as useHeroPriceStateOrNull,R as useProductCardState,X as useProductCardStateOrNull,Y as useWheelCardState};
@@ -0,0 +1,16 @@
1
+ import { type ReactNode } from "react";
2
+ export declare function useHeldCardPicture({ src, second, alt, sizes, failed, onFailed, near, holdEmpty, }: {
3
+ src: string | null;
4
+ second?: string | null;
5
+ alt: string;
6
+ sizes: string;
7
+ failed: ReadonlySet<string>;
8
+ onFailed: (url: string) => void;
9
+ near: boolean;
10
+ holdEmpty?: boolean;
11
+ }): {
12
+ src: string | null;
13
+ alt: string;
14
+ second: string | null;
15
+ trial: ReactNode;
16
+ };
@@ -0,0 +1 @@
1
+ "use client";import{jsx as R}from"react/jsx-runtime";import{useEffect as U,useRef as i,useState as f}from"react";import{ClippedPictures as q}from"./ClippedPictures.js";import{decodePhotoAt as B,STAGE_HOLD_LIMIT_MS as J,useStagePhotoHold as K}from"../product-hero/stage-photo.js";import{holdSignedUrl as A}from"../../lib/wheels/signed-url.js";function Y({src:e,second:M=null,alt:m,sizes:S,failed:w,onFailed:C,near:o,holdEmpty:I=!1}){A(e),A(M);const[O]=f(e),[p,k]=f(!1);!p&&e!==O&&k(!0);const s=i(e),L=i(new Map),u=i(new Map);e&&(L.current.set(e,m),u.current.set(e,M));const[T,_]=f([]),l=i(new Map),b=t=>{for(const n of l.current.get(t)??[])n();l.current.delete(t),_(n=>n.filter(c=>c!==t))},x=i(null);x.current=o?e:null;const E=t=>B(t,S).catch(n=>{const c=x.current;if(t!==c&&(!c||t!==u.current.get(c)))throw n;return new Promise(G=>{l.current.set(t,[...l.current.get(t)??[],G]),_(P=>P.includes(t)?P:[...P,t])})}),y=async t=>{const n=u.current.get(t);await Promise.all([E(t),n?E(n):void 0])},g=!e&&I&&!!s.current&&!w.has(s.current),[D,H]=f(!1);U(()=>{if(!g){H(!1);return}const t=setTimeout(()=>H(!0),J);return()=>clearTimeout(t)},[g]);const a=e??(g&&!D?s.current:null),j=K(p&&o&&a?[a]:[],o?a??void 0:void 0,y),d=o?j.drawn:a??void 0,F=!s.current&&p&&o&&!!d&&!j.settled,r=d&&!w.has(d)&&!F?d:null;s.current=r;const v=T.length>0?R(q,{pictures:T.map(t=>({src:t,sizes:S,onLoad:()=>b(t),onError:()=>{C(t),b(t)}}))}):null;if(!r)return{src:null,alt:m,second:null,trial:v};const h=u.current.get(r)??null;return{src:r,alt:L.current.get(r)??m,second:h&&!w.has(h)?h:null,trial:v}}export{Y as useHeldCardPicture};
@@ -8,6 +8,8 @@ interface Props {
8
8
  padTop?: number;
9
9
  padBottom?: number;
10
10
  editing?: boolean;
11
+ template?: unknown;
12
+ nodeId?: string;
11
13
  }
12
14
  export default function DynamicDetailRows(props: Props): import("react").JSX.Element;
13
15
  export declare function recordDetailRows(record: CurrentRecord): DetailRow[];
@@ -1 +1 @@
1
- "use client";import{jsx as s}from"react/jsx-runtime";import y from"../SectionBand.js";import f from"../DetailRows.js";import R from"./KindGate.js";import D from"./RecordPhotoGallery.js";import{useCurrentProduct as x}from"../../lib/document/current-product.js";import{SAMPLE_RECORD as b,recordFacts as k,recordPictures as p,useCurrentRecord as S,useDrawsOtherRecord as B}from"../../lib/document/current-record.js";import{detailShotTag as P,pickDetailShots as T}from"../../lib/wheels/detail-shots.js";import{selectedStuds as v}from"../../lib/wheels/selected-studs.js";import{useSampleProduct as N}from"./useSampleProduct.js";import{say as C}from"efficient-web-builder/format/lib/editor-words";const F=["alloy-wheel"];function h(e,o){return e.finishes.find(t=>t.name===o)??e.finishes[0]}function L(e,o){return(h(e,o)?.features??[]).map(t=>({eyebrow:t.eyebrow,title:t.heading,copy:t.description,tag:t.mark,image:t.image||void 0}))}function j(e,o,t){const r=T(h(e,o),t);return r.rows.map(i=>({eyebrow:i.eyebrow?.trim()||void 0,title:i.title,copy:i.line||void 0,image:i.url,tag:P(i,r,t),imageShape:"square"}))}function E(e){return B(!!e.editing)?s(G,{...e}):s(R,{kinds:F,type:"DetailRows",editing:e.editing,children:s(K,{...e})})}function w(e){const o=k(e),t=p(e)[0];return!o.length&&!t&&!e.title.trim()?[]:[{title:e.title,specs:o,image:t?.url||void 0}]}function G({startLeft:e,padTop:o,padBottom:t,editing:r=!1}){const i=S(),n=i?w(i):r?w(b):[];if(n.length===0)return null;const a=i?p(i,{firstField:!0}):[];return a.length&&(n[0]={...n[0],media:s(D,{pictures:a,name:i?.title??"",editing:r,fit:"column"})}),s(f,{rows:n,startLeft:e,padTop:o,padBottom:t,editing:r})}function K({rowsFrom:e,startLeft:o,padTop:t,padBottom:r,editing:i=!1}){const n=x(),a=N(i&&!n),c=n?.product??a,l=c?.kind==="alloy-wheel"?c.source:null,d=n?n.selection.shown.finish:void 0,g=n?v(n.selection):null,u=e==="details",m=l?u?j(l,d,g):L(l,d):[];return u&&m.length===0?i?s(y,{className:"border-b border-line py-14 max-view-desktop:py-10",children:s("p",{className:"font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-fg-dim",children:C("No detail shots on this finish yet. Tick a close-up on the design's renderings and give it a title. This section is hidden on the live page until then.")})}):null:s(f,{rows:m,startLeft:o,padTop:t,padBottom:r,editing:i})}export{E as default,w as recordDetailRows,F as supportedKinds};
1
+ "use client";import{jsx as s}from"react/jsx-runtime";import D from"../SectionBand.js";import h from"../DetailRows.js";import x from"./KindGate.js";import b from"./RecordPhotoGallery.js";import{useCurrentProduct as k}from"../../lib/document/current-product.js";import{SAMPLE_RECORD as S,recordFacts as B,recordPictures as w,useCurrentRecord as P,useDrawsOtherRecord as T}from"../../lib/document/current-record.js";import{detailShotTag as v,pickDetailShots as N}from"../../lib/wheels/detail-shots.js";import{selectedStuds as C}from"../../lib/wheels/selected-studs.js";import{useSampleProduct as F}from"./useSampleProduct.js";import{say as L}from"efficient-web-builder/format/lib/editor-words";const j=["alloy-wheel"];function g(e,i){return e.finishes.find(t=>t.name===i)??e.finishes[0]}function E(e,i){return(g(e,i)?.features??[]).map(t=>({eyebrow:t.eyebrow,title:t.heading,copy:t.description,tag:t.mark,image:t.image||void 0}))}function G(e,i,t){const r=N(g(e,i),t);return r.rows.map(o=>({eyebrow:o.eyebrow?.trim()||void 0,title:o.title,copy:o.line||void 0,image:o.url,tag:v(o,r,t),imageShape:"square"}))}function I(e){return T(!!e.editing)?s(K,{...e}):s(x,{kinds:j,type:"DetailRows",editing:e.editing,children:s(O,{...e})})}function y(e){const i=B(e),t=w(e)[0];return!i.length&&!t&&!e.title.trim()?[]:[{title:e.title,specs:i,image:t?.url||void 0}]}function K({startLeft:e,padTop:i,padBottom:t,editing:r=!1,template:o,nodeId:c}){const a=P(),n=a?y(a):r?y(S):[];if(n.length===0)return null;const l=a?w(a,{firstField:!0}):[];return l.length&&(n[0]={...n[0],media:s(b,{pictures:l,name:a?.title??"",editing:r,fit:"column"})}),s(h,{rows:n,startLeft:e,padTop:i,padBottom:t,editing:r,template:o,nodeId:c})}function O({rowsFrom:e,startLeft:i,padTop:t,padBottom:r,editing:o=!1,template:c,nodeId:a}){const n=k(),l=F(o&&!n),u=n?.product??l,d=u?.kind==="alloy-wheel"?u.source:null,m=n?n.selection.shown.finish:void 0,R=n?C(n.selection):null,p=e==="details",f=d?p?G(d,m,R):E(d,m):[];return p&&f.length===0?o?s(D,{className:"border-b border-line py-14 max-view-desktop:py-10",children:s("p",{className:"font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-fg-dim",children:L("No detail shots on this finish yet. Tick a close-up on the design's renderings and give it a title. This section is hidden on the live page until then.")})}):null:s(h,{rows:f,startLeft:i,padTop:t,padBottom:r,editing:o,template:c,nodeId:a})}export{I as default,y as recordDetailRows,j as supportedKinds};
@@ -1,10 +1,10 @@
1
1
  import type { ReactNode } from "react";
2
- import { type HeroTextRegionProps } from "../ProductHeroPanel.js";
2
+ import { type HeroPriceTemplateProps } from "../ProductHeroPanel.js";
3
3
  import type { StoreProduct } from "../../lib/catalog/store-product.js";
4
4
  import type { HeroPricePlacement } from "../../lib/sections/hero-price-placement.js";
5
5
  import type { HeroLayout, HeroTextAlign } from "../../lib/sections/hero-arrangement.js";
6
6
  import type { HeroGalleryMode, HeroImageFit } from "../../lib/sections/hero-gallery.js";
7
- interface HeroArrangement extends HeroTextRegionProps {
7
+ interface HeroArrangement extends HeroPriceTemplateProps {
8
8
  heroLayout?: HeroLayout;
9
9
  imageRatio?: number;
10
10
  textAlign?: HeroTextAlign;
@@ -7,4 +7,10 @@ export interface StageControl {
7
7
  }
8
8
  export declare function stageControls(angleIdx: number, total: number, setAngleIdx: (i: number) => void): StageControl[];
9
9
  export declare function decodeStagePhoto(url: string): Promise<void>;
10
+ export declare function decodePhotoAt(url: string, sizes: string): Promise<void>;
11
+ export declare const STAGE_HOLD_LIMIT_MS = 8000;
12
+ export declare function useStagePhotoHold(photos: readonly string[], wanted: string | undefined, decode?: (url: string) => Promise<void>): {
13
+ drawn: string | undefined;
14
+ settled: boolean;
15
+ };
10
16
  export declare function useHeldStagePhoto(photos: readonly string[], wanted: string | undefined, decode?: (url: string) => Promise<void>): string | undefined;
@@ -1,3 +1,3 @@
1
- "use client";import{getImageProps as S}from"next/image";import{useEffect as p,useState as u}from"react";const d="(max-width: 720px) 88vw, (max-width: 1100px) 44vw, 700px";function a(t,e,s){return s<=1?0:((t+e)%s+s)%s}function v(t,e,s){return[{glyph:"◁",label:"Previous angle",onClick:()=>s(a(t,-1,e))},{glyph:"⟳",label:"Reset to first angle",onClick:()=>s(0)},{glyph:"▷",label:"Next angle",onClick:()=>s(a(t,1,e))}]}function x(t){const{props:e}=S({src:t,alt:"",fill:!0,sizes:d}),s=new window.Image;return e.sizes&&(s.sizes=e.sizes),e.srcSet&&(s.srcset=e.srcSet),s.src=e.src,s.decode()}function w(t,e,s=x){const[g,h]=u(()=>new Set),[n,m]=u(e),o=t.join(`
2
- `);p(()=>{let l=!0;const f=r=>{l&&h(c=>c.has(r)?c:new Set(c).add(r))};for(const r of o?o.split(`
3
- `):[])s(r).then(()=>f(r),()=>f(r));return()=>{l=!1}},[o]);const i=e===void 0||g.has(e)||n===void 0;return p(()=>{i&&n!==e&&m(e)},[i,n,e]),i?e:n}export{d as STAGE_IMAGE_SIZES,x as decodeStagePhoto,v as stageControls,a as stepGalleryAngle,w as useHeldStagePhoto};
1
+ "use client";import{getImageProps as P}from"next/image";import{useEffect as p,useState as a}from"react";const k="(max-width: 720px) 88vw, (max-width: 1100px) 44vw, 700px";function h(o,e,t){return t<=1?0:((o+e)%t+t)%t}function b(o,e,t){return[{glyph:"◁",label:"Previous angle",onClick:()=>t(h(o,-1,e))},{glyph:"⟳",label:"Reset to first angle",onClick:()=>t(0)},{glyph:"▷",label:"Next angle",onClick:()=>t(h(o,1,e))}]}function m(o){return E(o,k)}function E(o,e){const{props:t}=P({src:o,alt:"",fill:!0,sizes:e}),n=new window.Image;return t.sizes&&(n.sizes=t.sizes),t.srcSet&&(n.srcset=t.srcSet),n.src=t.src,n.decode()}const G=8e3;function T(o,e,t=m){const[n,S]=a(()=>new Set),[s,x]=a(e),[v,y]=a(),c=o.join(`
2
+ `);p(()=>{let i=!0;const g=r=>{S(l=>l.has(r)?l:new Set(l).add(r))};for(const r of c?c.split(`
3
+ `):[])n.has(r)||t(r).then(()=>g(r),()=>{i&&g(r)});return()=>{i=!1}},[c]);const u=e!==void 0&&(n.has(e)||v===e),d=e!==void 0&&!u&&o.includes(e);p(()=>{if(!d)return;const i=setTimeout(()=>y(e),G);return()=>clearTimeout(i)},[d,e]);const f=e===void 0||u||s===void 0;return p(()=>{f&&s!==e&&x(e)},[f,s,e]),{drawn:f?e:s,settled:u}}function z(o,e,t=m){return T(o,e,t).drawn}export{G as STAGE_HOLD_LIMIT_MS,k as STAGE_IMAGE_SIZES,E as decodePhotoAt,m as decodeStagePhoto,b as stageControls,h as stepGalleryAngle,z as useHeldStagePhoto,T as useStagePhotoHold};
@@ -12,6 +12,9 @@ export interface FinishSelection {
12
12
  finish: FinishSwatch | undefined;
13
13
  shownSrc: string | null;
14
14
  showSwatches: boolean;
15
+ awaitingProbe: boolean;
16
+ nearScreen: boolean;
17
+ pictureFailed: (url: string) => void;
15
18
  probes: React.ReactNode;
16
19
  }
17
20
  export declare function useFinishSelection(finishes: FinishSwatch[], cover: string | null, defaultFinish?: string): FinishSelection;
@@ -1 +1,3 @@
1
- "use client";import{jsx as h}from"react/jsx-runtime";import S from"next/image";import{useEffect as w,useMemo as y,useState as i}from"react";function A(s,x,d){const[n,o]=i(()=>{const e=d?s.findIndex(t=>t.name===d):-1;return e>=0?e:0}),[l,a]=i(null),[c,I]=i(()=>s.map(()=>!0)),g=e=>{I(t=>{if(t[e]===!1)return t;const f=[...t];return f[e]=!1,f})},r=y(()=>c.map((e,t)=>e?t:-1).filter(e=>e!==-1),[c]);w(()=>{if(r.length===0){n!==-1&&o(-1),l!==null&&a(null);return}n>=0&&!r.includes(n)&&o(r[0]),l!==null&&!r.includes(l)&&a(null)},[r,n,l]);const u=l??n,m=u>=0?s[u]:void 0,p=m?.src??x,b=r.length>=2,v=s.length>0?h("div",{className:"hidden","aria-hidden":!0,children:s.map((e,t)=>h(S,{src:e.src,alt:"",width:16,height:16,loading:"eager",onError:()=>g(t)},e.src))}):null;return{selectedIdx:n,setSelectedIdx:o,hoverIdx:l,setHoverIdx:a,availability:c,finish:m,shownSrc:p,showSwatches:b,probes:v}}export{A as useFinishSelection};
1
+ "use client";import{jsx as se}from"react/jsx-runtime";import{AppRouterContext as oe}from"next/dist/shared/lib/app-router-context.shared-runtime";import{useCallback as U,useContext as re,useEffect as j,useMemo as D,useRef as H,useState as c}from"react";import{ClippedPictures as ce}from"./card-pieces/ClippedPictures.js";import{STAGE_HOLD_LIMIT_MS as ae}from"./product-hero/stage-photo.js";import{holdSignedUrl as le,signedUrlExpired as N}from"../lib/wheels/signed-url.js";function l(n){const o=n.indexOf("?");if(o<0)return n;const d=n.slice(o+1).split("&").filter(u=>!/^x-amz-/i.test(u));return d.length>0?`${n.slice(0,o)}?${d.join("&")}`:n.slice(0,o)}const g=n=>n?{name:n.name,file:l(n.src)}:null,de=300*1e3,T=new WeakMap,ue="1250px";function xe(n,o,d){const[u,y]=c(()=>g(d?n.find(e=>e.name===d):void 0)??void 0),[h,v]=c(null),[f,G]=c(()=>new Set),$=e=>G(t=>t.has(l(e))?t:new Set(t).add(l(e))),w=H(n);w.current=n;const q=U(e=>y(e<0?null:g(w.current[e])),[]),z=U(e=>v(e===null?null:g(w.current[e])),[]),m=re(oe);for(const e of[o,...n.map(t=>t.src)])le(e);const E=()=>{m&&Date.now()-(T.get(m)??0)>=de&&(T.set(m,Date.now()),m.refresh())},K=e=>{N(e)&&E()},V=(e,t)=>{if(!N(t))return $(t);E()},[W,Y]=c(()=>new Set),B=e=>Y(t=>t.has(e)?t:new Set(t).add(e)),[_,J]=c(()=>new Set),R=e=>J(t=>t.has(e)?t:new Set(t).add(e)),M=H(null),[x,Q]=c(!1);j(()=>{const e=M.current;if(!e||typeof IntersectionObserver>"u")return;const t=new IntersectionObserver(s=>{const S=s[s.length-1];S&&Q(S.isIntersecting)},{rootMargin:ue});return t.observe(e),()=>t.disconnect()},[]);const I=n.map(e=>l(e.src)).join(`
2
+ `),i=D(()=>(I?I.split(`
3
+ `):[]).map(e=>!f.has(e)),[I,f]),O=D(()=>i.map((e,t)=>e?t:-1).filter(e=>e!==-1),[i]),k=e=>{const t=s=>s>=0&&i[s]?s:null;return t(n.findIndex(s=>s.name===e.name&&l(s.src)===e.file))??t(n.findIndex((s,S)=>s.name===e.name&&i[S]))},A=u===null?-1:(u===void 0?null:k(u))??O[0]??-1,L=h===null?null:k(h),r=L??A,a=r>=0?n[r]:void 0,X=a?.src??o,Z=O.length>=2,ee=r>=0&&!(a&&W.has(a.src)),[F,te]=c(()=>new Set),b=e=>_.has(n[e].src)||F.has(n[e].src)||f.has(l(n[e].src)),C=!a||b(r)?n.findIndex((e,t)=>!b(t)):-1,P=a&&!b(r)?r:C,p=P>=0?n[P].src:null;j(()=>{if(!x||!p)return;const e=setTimeout(()=>te(t=>t.has(p)?t:new Set(t).add(p)),ae);return()=>clearTimeout(e)},[x,p]);const ne=n.length>0?se(ce,{clipRef:M,pictures:n.flatMap((e,t)=>_.has(e.src)||F.has(e.src)||t===r||t===C?[{src:e.src,onLoad:()=>{R(e.src),B(e.src)},onError:()=>{R(e.src),V(t,e.src)}}]:[])}):null;return{selectedIdx:A,setSelectedIdx:q,hoverIdx:L,setHoverIdx:z,availability:i,finish:a,shownSrc:X,showSwatches:Z,awaitingProbe:ee,nearScreen:x,pictureFailed:K,probes:ne}}export{xe as useFinishSelection};
@@ -24,6 +24,8 @@ export declare const loadUnifiedProductCatalog: (force?: boolean) => Promise<(({
24
24
  defaultFinishRenderings?: string[];
25
25
  description: string;
26
26
  listable?: boolean;
27
+ } & {
28
+ hoverMedia?: import("../lib/api/types.js").components["schemas"]["HoverMedia"];
27
29
  } & {
28
30
  kind: "alloy-wheel";
29
31
  } & {
@@ -1 +1 @@
1
- "use client";import{jsx as r,Fragment as $,jsxs as j}from"react/jsx-runtime";import{CARD_IMAGE_SIZES as z}from"../../lib/sections/card-image-sizes.js";import{LISTING_CARD_SHOW as P}from"../../lib/sections/card-show-defaults.js";import M from"next/image";import{useState as U}from"react";import X from"../BrandPlate.js";import H,{CardBuyDialog as V}from"../card-pieces/CardBuyButton.js";import Z from"../card-pieces/CardFinishSwatches.js";import q from"../card-pieces/CardPrice.js";import J from"../card-pieces/CardProductBadge.js";import{useWheelCardState as K,WheelCardStateProvider as Q}from"../card-pieces/ProductCardState.js";import{wheelCardEyebrow as Y,wheelCardEyebrowShows as ee}from"../ProductCardEyebrow.js";import{withRMark as N}from"efficient-web-builder/render/components/RMark";import re from"../WheelPlaceholder.js";import{cardSpinOf as oe}from"../card-spin.js";import{cardHoverOf as ae,cardTurnFor as se}from"efficient-web-builder/format/lib/animation/hover";import{CardSpecFacts as te}from"../card-pieces/CardSpecs.js";import ne from"../WheelCardFrame.js";import{CARD_IMAGE_BG_OFF as ie}from"efficient-web-builder/format/lib/content/card-image-background";import{itemBrand as le}from"../../lib/catalog/plp-item.js";import{CARD_INDEX_BADGE_CLASS as me,CARD_INDEX_CLASS as de,DEFAULT_CARD_INDEX_FORMAT as ce,DEFAULT_CARD_OUTLINE as he}from"efficient-web-builder/format/lib/sections/product-card-style";import{setSecondSrc as ue}from"../../lib/wheels/set-mode.js";import{PLP_GRID_GAP_VAR as fe}from"../../lib/wheels/plp-grid.js";import{FITMENT_FIELD_SEPARATOR as pe}from"../../lib/wheels/plp-fitment-match.js";import{coverSrcForWheel as we,DEFAULT_COVER_INDEX as Se,resolvePaintedSrc as Ce}from"../../lib/wheels/cover-rendering.js";const ge=[],_e=ae({},"AlloyWheelsListing");function Ee({wheel:n,colours:c,fit:i=null,editing:l=!1,brandPlate:m=!1,kindLabel:h=null,showBrand:s=!0,showProcess:u=!1,coverIndex:f=Se,fieldUsage:p=ge,hover:w=_e,imageBackgroundFill:S=ie,showBadge:C=!0,outline:g=he,indexBadge:_=ce,showCardSizes:E=P.showCardSizes,showCardBuy:A=P.showCardBuy,showCardPage:F=P.showCardPage,showCardPrice:e=!0,showCardFinishes:o=!0,imageSizes:d=z}){return r(Q,{wheel:n,colours:c,editing:l,children:r(Ae,{fit:i,brandPlate:m,kindLabel:h,showBrand:s,showProcess:u,coverIndex:f,fieldUsage:p,hover:w,imageBackgroundFill:S,showBadge:C,outline:g,indexBadge:_,showCardSizes:E,showCardBuy:A,showCardPage:F,showCardPrice:e,showCardFinishes:o,imageSizes:d})})}function Ae({fit:n,brandPlate:c,kindLabel:i,showBrand:l,showProcess:m,coverIndex:h,fieldUsage:s,hover:u,imageBackgroundFill:f,showBadge:p,outline:w,indexBadge:S,showCardSizes:C,showCardBuy:g,showCardPage:_,showCardPrice:E,showCardFinishes:A,imageSizes:F}){const{wheel:e,sel:o,isSet:d}=K(),k=we(e,h,o.finish?.name,o.shownSrc,n?.holes),[y,G]=U(()=>new Set),x=a=>G(t=>t.has(a)?t:new Set(t).add(a)),b=Ce({overrideSrc:k,hookSrc:o.shownSrc,failed:y}),I=le(e),B=oe(se(u,e.spokes)),R=(a,t)=>r(M,{src:a,alt:t,width:800,height:800,sizes:F,className:["block h-full w-full object-contain",B.className].filter(Boolean).join(" "),style:B.style,draggable:!1,onError:()=>x(a)},a),L=o.finish?`${e.name} — ${o.finish.name}`:e.name,O=b?R(b,L):r(re,{imageLabel:e.name,spin:B}),D=d?ue(e.finishes?.find(a=>a.name===o.finish?.name),b):null,W=D&&!y.has(D)?R(D,`${L} — right`):void 0,T=S!=="off"?r("span",{"aria-hidden":!0,className:`${de} ${me}`}):null,v=Y({kindLabel:i,brand:l&&I?N(I):null,process:m&&e.process?N(e.process):null},s);return j($,{children:[r(ne,{href:`/wheels/${e.slug}`,wide:d,setGridGap:`var(${fe})`,identityLink:!0,containerProps:{onPointerEnter:o.arm,onTouchStart:o.arm,onFocusCapture:o.arm},probes:o.probes,outline:w,imageBackgroundFill:f,indexBadge:T,badges:r(J,{show:p,numbered:T!=null,sale:!0}),image:O,imageSecond:W,plate:c?r(X,{brand:I,logo:e.brandLogo}):null,eyebrow:v,wholeCardLink:!0,reserveEyebrow:ee({kind:!!i,brand:l,process:m},s),spec:r(te,{sizes:C,fieldUsage:s,car:n,separator:pe}),price:r(q,{show:E,setTotal:!0,wasFollowsSize:!0}),swatches:r(Z,{show:A,showSingle:!0}),buy:r(H,{buy:g,page:_})}),r(V,{})]})}export{Ee as default};
1
+ "use client";import{jsx as r,Fragment as T,jsxs as G}from"react/jsx-runtime";import{CARD_IMAGE_SIZES as M}from"../../lib/sections/card-image-sizes.js";import{LISTING_CARD_SHOW as B}from"../../lib/sections/card-show-defaults.js";import U from"next/image";import{useHeldCardPicture as X}from"../card-pieces/useHeldCardPicture.js";import{useState as H}from"react";import V from"../BrandPlate.js";import Z,{CardBuyDialog as q}from"../card-pieces/CardBuyButton.js";import J from"../card-pieces/CardFinishSwatches.js";import K from"../card-pieces/CardPrice.js";import Q from"../card-pieces/CardProductBadge.js";import{useWheelCardState as Y,WheelCardStateProvider as ee}from"../card-pieces/ProductCardState.js";import{wheelCardEyebrow as re,wheelCardEyebrowShows as oe}from"../ProductCardEyebrow.js";import{withRMark as k}from"efficient-web-builder/render/components/RMark";import ae from"../WheelPlaceholder.js";import{cardSpinOf as se}from"../card-spin.js";import{cardHoverOf as te}from"efficient-web-builder/format/lib/animation/hover";import{CardSpecFacts as ne}from"../card-pieces/CardSpecs.js";import ie from"../WheelCardFrame.js";import{CARD_IMAGE_BG_OFF as le}from"efficient-web-builder/format/lib/content/card-image-background";import{itemBrand as de}from"../../lib/catalog/plp-item.js";import{CARD_INDEX_BADGE_CLASS as me,CARD_INDEX_CLASS as ce,DEFAULT_CARD_INDEX_FORMAT as he,DEFAULT_CARD_OUTLINE as pe}from"efficient-web-builder/format/lib/sections/product-card-style";import{setSecondSrc as ue}from"../../lib/wheels/set-mode.js";import{PLP_GRID_GAP_VAR as fe}from"../../lib/wheels/plp-grid.js";import{FITMENT_FIELD_SEPARATOR as we}from"../../lib/wheels/plp-fitment-match.js";import{coverSrcForWheel as Se,DEFAULT_COVER_INDEX as Ce,resolvePaintedSrc as ge}from"../../lib/wheels/cover-rendering.js";const _e=[],Ee=te({},"AlloyWheelsListing");function Ae({wheel:i,colours:p,fit:l=null,editing:d=!1,brandPlate:m=!1,kindLabel:u=null,showBrand:t=!0,showProcess:f=!1,coverIndex:w=Ce,fieldUsage:S=_e,hover:C=Ee,imageBackgroundFill:g=le,showBadge:_=!0,outline:E=pe,indexBadge:A=he,showCardSizes:F=B.showCardSizes,showCardBuy:b=B.showCardBuy,showCardPage:c=B.showCardPage,showCardPrice:o=!0,showCardFinishes:e=!0,imageSizes:h=M}){return r(ee,{wheel:i,colours:p,editing:d,children:r(Fe,{fit:l,brandPlate:m,kindLabel:u,showBrand:t,showProcess:f,coverIndex:w,fieldUsage:S,hover:C,imageBackgroundFill:g,showBadge:_,outline:E,indexBadge:A,showCardSizes:F,showCardBuy:b,showCardPage:c,showCardPrice:o,showCardFinishes:e,imageSizes:h})})}function Fe({fit:i,brandPlate:p,kindLabel:l,showBrand:d,showProcess:m,coverIndex:u,fieldUsage:t,hover:f,imageBackgroundFill:w,showBadge:S,outline:C,indexBadge:g,showCardSizes:_,showCardBuy:E,showCardPage:A,showCardPrice:F,showCardFinishes:b,imageSizes:c}){const{wheel:o,sel:e,isSet:h}=Y(),x=Se(o,u,e.finish?.name,e.shownSrc,i?.holes),[D,O]=H(()=>new Set),y=a=>{e.pictureFailed(a),O(n=>n.has(a)?n:new Set(n).add(a))},R=ge({overrideSrc:x,hookSrc:e.shownSrc,failed:D}),P=de(o),I=se(f),L=(a,n)=>r(U,{alt:n,src:a,width:800,height:800,sizes:c,className:["block h-full w-full object-contain",I.className].filter(Boolean).join(" "),style:I.style,draggable:!1,onError:()=>y(a)},a),W=e.finish?`${o.name} — ${e.finish.name}`:o.name,v=h?ue(o.finishes?.find(a=>a.name===e.finish?.name),R):null,s=X({src:R,second:v,alt:W,sizes:c,failed:D,onFailed:y,near:e.nearScreen,holdEmpty:e.awaitingProbe}),$=G(T,{children:[s.src?L(s.src,s.alt):r(ae,{imageLabel:o.name,spin:I}),s.trial]}),j=s.second?L(s.second,`${s.alt} — right`):void 0,N=g!=="off"?r("span",{"aria-hidden":!0,className:`${ce} ${me}`}):null,z=re({kindLabel:l,brand:d&&P?k(P):null,process:m&&o.process?k(o.process):null},t);return G(T,{children:[r(ie,{href:`/wheels/${o.slug}`,wide:h,setGridGap:`var(${fe})`,identityLink:!0,containerProps:{onPointerEnter:e.arm,onTouchStart:e.arm,onFocusCapture:e.arm},probes:e.probes,outline:C,imageBackgroundFill:w,indexBadge:N,badges:r(Q,{show:S,numbered:N!=null,sale:!0}),image:$,imageSecond:j,plate:p?r(V,{brand:P,logo:o.brandLogo}):null,eyebrow:z,wholeCardLink:!0,reserveEyebrow:oe({kind:!!l,brand:d,process:m},t),spec:r(ne,{sizes:_,fieldUsage:t,car:i,separator:we}),price:r(K,{show:F,setTotal:!0,wasFollowsSize:!0}),swatches:r(J,{show:b,showSingle:!0}),buy:r(Z,{buy:E,page:A})}),r(q,{})]})}export{Ae as default};
@@ -1110,7 +1110,10 @@ export interface components {
1110
1110
  loadRating: string;
1111
1111
  inStock: boolean;
1112
1112
  };
1113
- WheelSummary: {
1113
+ WheelSummary: components["schemas"]["WheelCore"] & {
1114
+ hoverMedia?: components["schemas"]["HoverMedia"];
1115
+ };
1116
+ WheelCore: {
1114
1117
  name: string;
1115
1118
  slug: string;
1116
1119
  designCode?: string;
@@ -1141,6 +1144,16 @@ export interface components {
1141
1144
  thumbnailUrl: string;
1142
1145
  kind: "image" | "video";
1143
1146
  };
1147
+ HoverMediaGroup: {
1148
+ finish: string;
1149
+ items: components["schemas"]["MediaGroupItem"][];
1150
+ };
1151
+ HoverMedia: {
1152
+ photos?: components["schemas"]["HoverMediaGroup"][];
1153
+ lifestyle?: components["schemas"]["HoverMediaGroup"][];
1154
+ accessories?: components["schemas"]["HoverMediaGroup"][];
1155
+ others?: components["schemas"]["HoverMediaGroup"][];
1156
+ };
1144
1157
  MediaGroup: {
1145
1158
  name: string;
1146
1159
  vehicle?: string;
@@ -1276,7 +1289,7 @@ export interface components {
1276
1289
  oemSizes: string[];
1277
1290
  variants: components["schemas"]["TyreFitVariant"][];
1278
1291
  };
1279
- Wheel: components["schemas"]["WheelSummary"] & {
1292
+ Wheel: components["schemas"]["WheelCore"] & {
1280
1293
  fitments: components["schemas"]["FitmentRow"][];
1281
1294
  mediaGroups: components["schemas"]["MediaGroups"];
1282
1295
  relatedProducts: components["schemas"]["RelatedProduct"][];
@@ -0,0 +1,4 @@
1
+ type Props = Record<string, unknown>;
2
+ export declare const HERO_PRICE_BLOCK = "ProductPrice";
3
+ export declare function withHeroPriceTemplate(props: Props): Props;
4
+ export {};
@@ -0,0 +1 @@
1
+ import{PART_MOTION_PROP as s}from"efficient-web-builder/render/lib/animation/part-motion";import{PART_STYLES_PROP as m,readPartStyles as u}from"efficient-web-builder/render/lib/document/part-styles";import{seedNodes as p}from"efficient-web-builder/format/lib/document/seed-parts";const R="ProductPrice",d="@price";function _(e){const{[d]:o,...t}=e&&typeof e=="object"?e:{};return{price:o,others:t}}function T(e){if(e.template!==void 0)return e;const o=typeof e.id=="string"&&e.id.trim()?e.id:"ProductHero",[t]=p([{type:R}],()=>`${o}~price`),r={...e},c={};for(const[n,f]of[[m,u(e)],[s,e[s]]]){const{price:i,others:P}=_(f);i&&(c[n]={[d]:i},Object.keys(P).length>0?r[n]=P:delete r[n])}return r.template=[{...t,props:{...t.props,...c}}],r}export{R as HERO_PRICE_BLOCK,T as withHeroPriceTemplate};
@@ -1,4 +1,10 @@
1
1
  import type { BlockRender } from "efficient-web-builder/format/lib/document/blocks/block-types";
2
+ export declare const DetailRowsSlots: {
3
+ template: {
4
+ type: "slot";
5
+ allow: string[];
6
+ };
7
+ };
2
8
  export declare const DETAILROWS_SCAFFOLD_ROWS: {
3
9
  image: string;
4
10
  eyebrow: string;
@@ -1 +1 @@
1
- const e=[{image:"",eyebrow:"Feature eyebrow",title:"Feature *one.*",copy:"Describe this feature in a sentence or two.",tag:"01 · Detail"},{image:"",eyebrow:"Feature eyebrow",title:"Feature *two.*",copy:"Describe this feature in a sentence or two.",tag:"02 · Detail"},{image:"",eyebrow:"Feature eyebrow",title:"Feature *three.*",copy:"Describe this feature in a sentence or two.",tag:"03 · Detail"}],t={label:"Feature Rows",defaultProps:{dynamic:!1,rows:[],startLeft:!1,layout:"even",padTop:100,padBottom:100}};export{e as DETAILROWS_SCAFFOLD_ROWS,t as DetailRowsMeta};
1
+ import{cardTemplateSlot as e}from"efficient-web-builder/format/lib/content/card-template";const t={template:e()},o=[{image:"",eyebrow:"Feature eyebrow",title:"Feature *one.*",copy:"Describe this feature in a sentence or two.",tag:"01 · Detail"},{image:"",eyebrow:"Feature eyebrow",title:"Feature *two.*",copy:"Describe this feature in a sentence or two.",tag:"02 · Detail"},{image:"",eyebrow:"Feature eyebrow",title:"Feature *three.*",copy:"Describe this feature in a sentence or two.",tag:"03 · Detail"}],r={label:"Feature Rows",fields:t,defaultProps:{dynamic:!1,rows:[],startLeft:!1,layout:"even",padTop:100,padBottom:100}};export{o as DETAILROWS_SCAFFOLD_ROWS,r as DetailRowsMeta,t as DetailRowsSlots};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import o from"../../../../../components/pdp-dynamic/DynamicDetailRows.js";import d from"../../../../../components/DetailRows.js";import{phRows as i}from"efficient-web-builder/render/lib/document/blocks/scaffold";import{DetailRowsMeta as a,DETAILROWS_SCAFFOLD_ROWS as m}from"./meta.js";const y={...a,render:t=>t.dynamic?e(o,{rowsFrom:t.rowsFrom==="details"?"details":"story",startLeft:t.startLeft,padTop:typeof t.padTop=="number"?t.padTop:void 0,padBottom:typeof t.padBottom=="number"?t.padBottom:void 0,editing:t.editor?.isEditing}):e(d,{rows:i(t.rows,m,t.editor),startLeft:t.startLeft,layout:t.layout,padTop:typeof t.padTop=="number"?t.padTop:void 0,padBottom:typeof t.padBottom=="number"?t.padBottom:void 0,editing:t.editor?.isEditing})};export{y as DetailRowsRender};
1
+ import{jsx as e}from"react/jsx-runtime";import d from"../../../../../components/pdp-dynamic/DynamicDetailRows.js";import i from"../../../../../components/DetailRows.js";import{phRows as o}from"efficient-web-builder/render/lib/document/blocks/scaffold";import{DetailRowsMeta as a,DETAILROWS_SCAFFOLD_ROWS as n}from"./meta.js";const y={...a,render:t=>t.dynamic?e(d,{rowsFrom:t.rowsFrom==="details"?"details":"story",startLeft:t.startLeft,padTop:typeof t.padTop=="number"?t.padTop:void 0,padBottom:typeof t.padBottom=="number"?t.padBottom:void 0,editing:t.editor?.isEditing,template:t.template,nodeId:typeof t.id=="string"?t.id:void 0}):e(i,{rows:o(t.rows,n,t.editor),startLeft:t.startLeft,layout:t.layout,padTop:typeof t.padTop=="number"?t.padTop:void 0,padBottom:typeof t.padBottom=="number"?t.padBottom:void 0,editing:t.editor?.isEditing,template:t.template,nodeId:typeof t.id=="string"?t.id:void 0})};export{y as DetailRowsRender};
@@ -1,5 +1,9 @@
1
1
  import type { BlockRender } from "efficient-web-builder/format/lib/document/blocks/block-types";
2
2
  export declare const ProductHeroSlots: {
3
+ template: {
4
+ allow: string[];
5
+ type: "slot";
6
+ };
3
7
  trustBullets: {
4
8
  type: "slot";
5
9
  allow: string[];
@@ -1 +1 @@
1
- import{DEFAULT_HERO_PRICE_PLACEMENT as e}from"../../../../sections/hero-price-placement.js";import{DEFAULT_HERO_LAYOUT as t,DEFAULT_HERO_RATIO as r,DEFAULT_HERO_TEXT_ALIGN as E}from"../../../../sections/hero-arrangement.js";import{DEFAULT_HERO_GALLERY_MODE as T,DEFAULT_HERO_IMAGE_FIT as _}from"../../../../sections/hero-gallery.js";import{TRUST_BULLETS_ALLOW as L,TRUST_BULLETS_SLOT as o}from"../../../../sections/hero-trust-bullets.js";const l={[o]:{type:"slot",allow:L}},a={label:"Product Hero",fields:l,defaultProps:{source:null,pricePlacement:e,showVehicleFitment:!0,heroLayout:t,imageRatio:r,textAlign:E,showSpecTable:!0,showPriceQuote:!0,galleryMode:T,imageFit:_,[o]:[]}};export{a as ProductHeroMeta,l as ProductHeroSlots};
1
+ import{DEFAULT_HERO_PRICE_PLACEMENT as e}from"../../../../sections/hero-price-placement.js";import{DEFAULT_HERO_LAYOUT as r,DEFAULT_HERO_RATIO as l,DEFAULT_HERO_TEXT_ALIGN as E}from"../../../../sections/hero-arrangement.js";import{DEFAULT_HERO_GALLERY_MODE as _,DEFAULT_HERO_IMAGE_FIT as T}from"../../../../sections/hero-gallery.js";import{cardTemplateSlot as L}from"efficient-web-builder/format/lib/content/card-template";import{HERO_PRICE_BLOCK as m}from"../../../../content/hero-price-seed.js";import{TRUST_BULLETS_ALLOW as a,TRUST_BULLETS_SLOT as o}from"../../../../sections/hero-trust-bullets.js";const t=L(),i={template:{...t,allow:[...t.allow,m]},[o]:{type:"slot",allow:a}},u={label:"Product Hero",fields:i,defaultProps:{source:null,pricePlacement:e,showVehicleFitment:!0,heroLayout:r,imageRatio:l,textAlign:E,showSpecTable:!0,showPriceQuote:!0,galleryMode:_,imageFit:T,[o]:[]}};export{u as ProductHeroMeta,i as ProductHeroSlots};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{SITE_WIDTH_CAP as h}from"efficient-web-builder/format/lib/content/page-width";import{resolveWidth as P}from"efficient-web-builder/format/lib/content/section-width";import H from"../../../../../components/LinkedProductHero.js";import m from"../../../../../components/pdp-dynamic/DynamicProductHero.js";import L from"../../../../../components/SectionNotice.js";import{trustBulletsRow as g,trustBulletsSlot as A}from"../../../../../components/product-hero/trust-bullets.js";import{TRUST_BULLETS_SLOT as R}from"../../../../sections/hero-trust-bullets.js";import{useCurrentProduct as y}from"../../../current-product.js";import{isEditorOnDynamicPage as F}from"efficient-web-builder/format/lib/document/editor-page-context";import{DEFAULT_HERO_PRICE_PLACEMENT as O,parseHeroPricePlacement as w}from"../../../../sections/hero-price-placement.js";import{DEFAULT_HERO_LAYOUT as D,DEFAULT_HERO_RATIO as S,DEFAULT_HERO_TEXT_ALIGN as I,parseHeroLayout as U,parseHeroRatio as M,parseHeroTextAlign as x}from"../../../../sections/hero-arrangement.js";import{DEFAULT_HERO_GALLERY_MODE as B,DEFAULT_HERO_IMAGE_FIT as C,parseHeroGalleryMode as k,parseHeroImageFit as p}from"../../../../sections/hero-gallery.js";import{say as G}from"efficient-web-builder/format/lib/editor-words";import{readPartStyles as N}from"efficient-web-builder/render/lib/document/part-styles";import{ProductHeroMeta as V}from"./meta.js";function b({source:e,editing:t=!1,pricePlacement:o=O,showVehicleFitment:i=!0,heroLayout:l=D,imageRatio:a=S,textAlign:u=I,showSpecTable:c=!0,showPriceQuote:d=!0,galleryMode:f=B,imageFit:s=C,trustBullets:E,nodeId:T,partStyles:_}){const n={heroLayout:l,imageRatio:a,textAlign:u,showSpecTable:c,showPriceQuote:d,galleryMode:f,imageFit:s,trustBullets:g(E,t),nodeId:T,partStyles:_};return y()||t&&F()?r(m,{editing:t,pricePlacement:o,showVehicleFitment:i,...n}):e?.slug?r(H,{slug:e.slug,kind:e.kind??"wheel",editing:t,pricePlacement:o,showVehicleFitment:i,...n}):t?r(L,{size:"tall",children:G("Pick a product in the panel to fill this hero.")}):r(m,{pricePlacement:o,showVehicleFitment:i,...n})}function j(e,t){return P(e,"full").mode!=="page"?t:r("div",{style:{"--sf-content-cap":h},children:t})}const me={...V,render:e=>j(e,r(b,{source:e.source,editing:e.editor?.isEditing,pricePlacement:w(e.pricePlacement),showVehicleFitment:e.showVehicleFitment??!0,heroLayout:U(e.heroLayout),imageRatio:M(e.imageRatio),textAlign:x(e.textAlign),showSpecTable:e.showSpecTable??!0,showPriceQuote:e.showPriceQuote??!0,galleryMode:k(e.galleryMode),imageFit:p(e.imageFit),trustBullets:A(e[R]),nodeId:typeof e.id=="string"?e.id:void 0,partStyles:N(e)}))};export{me as ProductHeroRender};
1
+ import{jsx as r}from"react/jsx-runtime";import{SITE_WIDTH_CAP as h}from"efficient-web-builder/format/lib/content/page-width";import{resolveWidth as H}from"efficient-web-builder/format/lib/content/section-width";import L from"../../../../../components/LinkedProductHero.js";import m from"../../../../../components/pdp-dynamic/DynamicProductHero.js";import P from"../../../../../components/SectionNotice.js";import{trustBulletsRow as g,trustBulletsSlot as A}from"../../../../../components/product-hero/trust-bullets.js";import{TRUST_BULLETS_SLOT as R}from"../../../../sections/hero-trust-bullets.js";import{useCurrentProduct as F}from"../../../current-product.js";import{isEditorOnDynamicPage as y}from"efficient-web-builder/format/lib/document/editor-page-context";import{DEFAULT_HERO_PRICE_PLACEMENT as O,parseHeroPricePlacement as w}from"../../../../sections/hero-price-placement.js";import{DEFAULT_HERO_LAYOUT as D,DEFAULT_HERO_RATIO as I,DEFAULT_HERO_TEXT_ALIGN as U,parseHeroLayout as S,parseHeroRatio as M,parseHeroTextAlign as p}from"../../../../sections/hero-arrangement.js";import{DEFAULT_HERO_GALLERY_MODE as x,DEFAULT_HERO_IMAGE_FIT as B,parseHeroGalleryMode as C,parseHeroImageFit as k}from"../../../../sections/hero-gallery.js";import{say as G}from"efficient-web-builder/format/lib/editor-words";import{ProductHeroMeta as N}from"./meta.js";function V({source:e,editing:t=!1,pricePlacement:i=O,showVehicleFitment:o=!0,heroLayout:l=D,imageRatio:u=I,textAlign:a=U,showSpecTable:c=!0,showPriceQuote:d=!0,galleryMode:f=x,imageFit:s=B,trustBullets:E,nodeId:T,priceTemplate:_}){const n={heroLayout:l,imageRatio:u,textAlign:a,showSpecTable:c,showPriceQuote:d,galleryMode:f,imageFit:s,trustBullets:g(E,t),nodeId:T,priceTemplate:_};return F()||t&&y()?r(m,{editing:t,pricePlacement:i,showVehicleFitment:o,...n}):e?.slug?r(L,{slug:e.slug,kind:e.kind??"wheel",editing:t,pricePlacement:i,showVehicleFitment:o,...n}):t?r(P,{size:"tall",children:G("Pick a product in the panel to fill this hero.")}):r(m,{pricePlacement:i,showVehicleFitment:o,...n})}function b(e,t){return H(e,"full").mode!=="page"?t:r("div",{style:{"--sf-content-cap":h},children:t})}const oe={...N,render:e=>b(e,r(V,{source:e.source,editing:e.editor?.isEditing,pricePlacement:w(e.pricePlacement),showVehicleFitment:e.showVehicleFitment??!0,heroLayout:S(e.heroLayout),imageRatio:M(e.imageRatio),textAlign:p(e.textAlign),showSpecTable:e.showSpecTable??!0,showPriceQuote:e.showPriceQuote??!0,galleryMode:C(e.galleryMode),imageFit:k(e.imageFit),trustBullets:A(e[R]),nodeId:typeof e.id=="string"?e.id:void 0,priceTemplate:typeof e.template=="function"?e.template:void 0}))};export{oe as ProductHeroRender};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import i from"../../../../../components/card-pieces/CardPrice.js";import t from"../../../../../components/card-pieces/HostPart.js";import{ProductPriceMeta as o}from"./meta.js";const n={...o,render:e=>r(t,{label:o.label??"",editing:!!e.editor?.isEditing,children:r(i,{})})};export{n as ProductPriceRender};
1
+ import{jsx as t}from"react/jsx-runtime";import o from"../../../../../components/card-pieces/CardPrice.js";import d from"../../../../../components/card-pieces/HostPart.js";import{readPartStyles as n}from"efficient-web-builder/render/lib/document/part-styles";import{ProductPriceMeta as i}from"./meta.js";const s={...i,render:r=>{const e=!!r.editor?.isEditing;return t(d,{label:i.label??"",editing:e,onHero:!0,children:t(o,{region:{nodeId:typeof r.id=="string"?r.id:void 0,partStyles:n(r),editing:e}})})}};export{s as ProductPriceRender};
@@ -1 +1 @@
1
- import{registerCardTemplates as l}from"efficient-web-builder/format/lib/content/card-template";import{MENU_LINK_BLOCK as a,withMenuTemplate as b}from"../content/menu-card-seed.js";const e={fields:[{key:"label",label:"Label"},{key:"href",label:"Link",kind:"link"}],blocks:[{type:a,label:"Menu link"}],seed:b},o=[{block:"Reviews",fields:[{key:"quote",label:"Quote"},{key:"title",label:"Title"},{key:"name",label:"Name"},{key:"role",label:"Role · location"},{key:"rating",label:"Rating"},{key:"dateLabel",label:"Date"}]},{block:"SpecTable",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]},{block:"FooterMenu",...e},{block:"MenuBlock",...e}];l(o);export{o as STOREFRONT_CARD_TEMPLATES};
1
+ import{registerCardTemplates as l}from"efficient-web-builder/format/lib/content/card-template";import{HERO_PRICE_BLOCK as a,withHeroPriceTemplate as t}from"../content/hero-price-seed.js";import{MENU_LINK_BLOCK as o,withMenuTemplate as b}from"../content/menu-card-seed.js";const e={fields:[{key:"label",label:"Label"},{key:"href",label:"Link",kind:"link"}],blocks:[{type:o,label:"Menu link"}],seed:b},i=[{block:"Reviews",fields:[{key:"quote",label:"Quote"},{key:"title",label:"Title"},{key:"name",label:"Name"},{key:"role",label:"Role · location"},{key:"rating",label:"Rating"},{key:"dateLabel",label:"Date"}]},{block:"SpecTable",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]},{block:"DetailRows",fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"}]},{block:"FooterMenu",...e},{block:"MenuBlock",...e},{block:"ProductHero",fields:[],blocks:[{type:a,label:"Price"}],seed:t}];l(i);export{i as STOREFRONT_CARD_TEMPLATES};
@@ -1,17 +1,8 @@
1
1
  import { type ReactNode } from "react";
2
- export interface CurrentRecord<TValue = unknown> {
3
- type: string;
4
- key: string;
5
- title: string;
6
- fields: Readonly<Record<string, unknown>>;
7
- value: TValue;
8
- schema?: readonly RecordFieldSpec[];
9
- }
10
- export interface RecordFieldSpec {
11
- key: string;
12
- label: string;
13
- kind: string;
14
- }
2
+ import { useCurrentRecord, useCurrentRecordOf, type CurrentRecord, type RecordSchemaField } from "efficient-web-builder/render/components/CurrentRecord";
3
+ export type { CurrentRecord };
4
+ export { useCurrentRecord, useCurrentRecordOf };
5
+ export type RecordFieldSpec = RecordSchemaField;
15
6
  export interface RecordPicture {
16
7
  url: string;
17
8
  alt: string;
@@ -39,5 +30,3 @@ export declare function CurrentRecordProvider({ record, children, }: {
39
30
  record: CurrentRecord;
40
31
  children: ReactNode;
41
32
  }): import("react").JSX.Element;
42
- export declare function useCurrentRecord(): CurrentRecord | null;
43
- export declare function useCurrentRecordOf<TValue = unknown>(type: string): CurrentRecord<TValue> | null;
@@ -1 +1 @@
1
- "use client";import{jsx as y}from"react/jsx-runtime";import{createContext as m,useContext as i}from"react";import{say as o}from"efficient-web-builder/format/lib/editor-words";import{declaredRecordType as R,PRODUCT_RECORD_TYPE as s}from"efficient-web-builder/format/lib/content/record-types";function h(t){const e=t.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").trim().toLowerCase();return e?e[0].toUpperCase()+e.slice(1):t}const C=/^\d{4}-\d{2}-\d{2}$/;function x(t){return t?t.schema?.length?t.schema.filter(e=>typeof e?.key=="string"&&e.key in t.fields):Object.entries(t.fields).flatMap(([e,r])=>{const n=Array.isArray(r)?g(r[0])?"rows":"images":typeof r=="string"?C.test(r)?"date":"text":null;return n?[{key:e,label:h(e),kind:n}]:[]}):[]}function P(t,{firstField:e=!1}={}){if(!t)return[];const r=x(t).filter(n=>n.kind==="images");return(e?r.slice(0,1):r).flatMap(n=>{const a=t.fields[n.key];return Array.isArray(a)?a.flatMap(l=>{const c=l?.url;if(typeof c!="string"||!c)return[];const p=l.alt,d=l.video;return[{url:c,alt:typeof p=="string"?p:"",...typeof d=="string"&&d?{video:d}:{}}]}):[]})}function k(t){const e=new Date(`${t}T00:00:00Z`);return Number.isNaN(e.getTime())?t:e.toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"})}function g(t){const e=t;return typeof e?.label=="string"&&!!e.label.trim()&&typeof e.value=="string"&&!!e.value.trim()}function b(t){return t?x(t).flatMap(e=>{const r=t.fields[e.key];return e.kind==="rows"?Array.isArray(r)?r.filter(g).map(({label:n,value:a})=>({label:n,value:a})):[]:e.kind!=="text"&&e.kind!=="date"?[]:typeof r!="string"||!r.trim()?[]:[{label:e.label,value:e.kind==="date"?k(r):r}]}):[]}const u=m(null);function O(t){const e=t?.appState?.data?.root;return R(e?.props)!==s}const f=m(s);function _({type:t,children:e}){return y(f.Provider,{value:t,children:e})}function w(){return i(f)}function S(t){const e=i(u),r=i(f);return e?e.type!==s:t&&r!==s}const E={type:"sample",key:"sample",get title(){return o("Record title")},get fields(){return{first:o("A detail of this record"),second:o("Another detail"),third:o("A third")}},value:void 0,get schema(){return[{key:"first",label:o("First detail"),kind:"text"},{key:"second",label:o("Second detail"),kind:"text"},{key:"third",label:o("Third detail"),kind:"text"}]}},M=4;function U({record:t,children:e}){return y(u.Provider,{value:t,children:e})}function F(){return i(u)}function L(t){const e=i(u);return e!==null&&e.type===t?e:null}export{U as CurrentRecordProvider,_ as DeclaredRecordTypeProvider,M as SAMPLE_PICTURE_COUNT,E as SAMPLE_RECORD,O as editorPageDrawsOtherRecord,b as recordFacts,x as recordFieldSpecs,P as recordPictures,F as useCurrentRecord,L as useCurrentRecordOf,w as useDeclaredRecordType,S as useDrawsOtherRecord};
1
+ "use client";import{jsx as f}from"react/jsx-runtime";import{createContext as R,useContext as p}from"react";import{say as o}from"efficient-web-builder/format/lib/editor-words";import{declaredRecordType as h,PRODUCT_RECORD_TYPE as a}from"efficient-web-builder/format/lib/content/record-types";import{CurrentRecordProvider as k,useCurrentRecord as y,useCurrentRecordOf as C}from"efficient-web-builder/render/components/CurrentRecord";function A(t){const e=t.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").trim().toLowerCase();return e?e[0].toUpperCase()+e.slice(1):t}const v=/^\d{4}-\d{2}-\d{2}$/;function m(t){return t?t.schema?.length?t.schema.filter(e=>typeof e?.key=="string"&&e.key in t.fields):Object.entries(t.fields).flatMap(([e,r])=>{const n=Array.isArray(r)?g(r[0])?"rows":"images":typeof r=="string"?v.test(r)?"date":"text":null;return n?[{key:e,label:A(e),kind:n}]:[]}):[]}function _(t,{firstField:e=!1}={}){if(!t)return[];const r=m(t).filter(n=>n.kind==="images");return(e?r.slice(0,1):r).flatMap(n=>{const i=t.fields[n.key];return Array.isArray(i)?i.flatMap(s=>{const d=s?.url;if(typeof d!="string"||!d)return[];const u=s.alt,c=s.video;return[{url:d,alt:typeof u=="string"?u:"",...typeof c=="string"&&c?{video:c}:{}}]}):[]})}function x(t){const e=new Date(`${t}T00:00:00Z`);return Number.isNaN(e.getTime())?t:e.toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"})}function g(t){const e=t;return typeof e?.label=="string"&&!!e.label.trim()&&typeof e.value=="string"&&!!e.value.trim()}function w(t){return t?m(t).flatMap(e=>{const r=t.fields[e.key];return e.kind==="rows"?Array.isArray(r)?r.filter(g).map(({label:n,value:i})=>({label:n,value:i})):[]:e.kind!=="text"&&e.kind!=="date"?[]:typeof r!="string"||!r.trim()?[]:[{label:e.label,value:e.kind==="date"?x(r):r}]}):[]}function S(t){const e=t?.appState?.data?.root;return h(e?.props)!==a}const l=R(a);function E({type:t,children:e}){return f(l.Provider,{value:t,children:e})}function M(){return p(l)}function U(t){const e=y(),r=p(l);return e?e.type!==a:t&&r!==a}const B={type:"sample",key:"sample",get title(){return o("Record title")},get fields(){return{first:o("A detail of this record"),second:o("Another detail"),third:o("A third")}},value:void 0,get schema(){return[{key:"first",label:o("First detail"),kind:"text"},{key:"second",label:o("Second detail"),kind:"text"},{key:"third",label:o("Third detail"),kind:"text"}]}},F=4;function L({record:t,children:e}){return f(k,{record:t,dateWords:x,children:e})}export{L as CurrentRecordProvider,E as DeclaredRecordTypeProvider,F as SAMPLE_PICTURE_COUNT,B as SAMPLE_RECORD,S as editorPageDrawsOtherRecord,w as recordFacts,m as recordFieldSpecs,_ as recordPictures,y as useCurrentRecord,C as useCurrentRecordOf,M as useDeclaredRecordType,U as useDrawsOtherRecord};
@@ -3,5 +3,6 @@ import "./slot-seeds.js";
3
3
  import "./card-templates.js";
4
4
  import "./section-to-box-rows-reviews.js";
5
5
  import "./section-to-box-rows-spec.js";
6
+ import "./section-to-box-rows-detail.js";
6
7
  export declare function renderConfig(): Config;
7
8
  export declare function headerRenderConfig(): Config;
@@ -1 +1 @@
1
- import{Fragment as u,jsx as g}from"react/jsx-runtime";import{generalRenderMetas as E}from"efficient-web-builder/format/lib/document/blocks/general/metas";import{finishRenderRegistry as h}from"efficient-web-builder/render/lib/document/render-registry";import{buildBlockCategories as R}from"efficient-web-builder/format/lib/document/section-catalog";import{SITE_HEADER_TYPE as m}from"efficient-web-builder/format/lib/document/section-groups";import"./slot-seeds.js";import"./card-templates.js";import"./section-to-box-rows-reviews.js";import"./section-to-box-rows-spec.js";import{COMMERCE_METAS as y}from"./blocks/commerce/metas.js";import{SERVICE_METAS as S}from"./blocks/service/metas.js";import _ from"./blocks/text-part-shapes.json";import{addPageBlocksFromFooter as b}from"./footer-page-blocks.js";import{LAZY_DRAWS as p}from"./lazy-draws.js";import{drawPublishedStorefrontRoot as T}from"./storefront-root.js";const j=_,k=(o,r)=>{const t=j[o];return{...r,...t?{textParts:t}:null}};let f=null;function l(){if(f)return f;const o={},r=E();for(const e of Object.keys(r))o[e]={...r[e],render:p[e]};const t={...y,...S};for(const e of Object.keys(t))o[e]=k(e,{...t[e],render:p[e]});b(o);const n={root:{render:T},categories:R(),components:o};return h(n),f=n,n}function x(o=l()){const r=o.components,t=Object.keys(r),n=new Set([m]),e=[m];for(;e.length;){const a=e.shift();for(const c of Object.values(r[a]?.fields??{})){if(c?.type!=="slot")continue;const d=c.allow??t.filter(s=>!c.disallow?.includes(s));for(const s of d)n.has(s)||!(s in r)||(n.add(s),e.push(s))}}return[...n]}let i=null;function V(){if(i)return i;const o=l(),r=o.components;return i={...o,root:{render:({children:t})=>g(u,{children:t})},components:Object.fromEntries(x(o).map(t=>[t,r[t]]))},i}export{V as headerRenderConfig,l as renderConfig};
1
+ import{Fragment as u,jsx as g}from"react/jsx-runtime";import{generalRenderMetas as E}from"efficient-web-builder/format/lib/document/blocks/general/metas";import{finishRenderRegistry as h}from"efficient-web-builder/render/lib/document/render-registry";import{buildBlockCategories as R}from"efficient-web-builder/format/lib/document/section-catalog";import{SITE_HEADER_TYPE as f}from"efficient-web-builder/format/lib/document/section-groups";import"./slot-seeds.js";import"./card-templates.js";import"./section-to-box-rows-reviews.js";import"./section-to-box-rows-spec.js";import"./section-to-box-rows-detail.js";import{COMMERCE_METAS as y}from"./blocks/commerce/metas.js";import{SERVICE_METAS as S}from"./blocks/service/metas.js";import _ from"./blocks/text-part-shapes.json";import{addPageBlocksFromFooter as b}from"./footer-page-blocks.js";import{LAZY_DRAWS as p}from"./lazy-draws.js";import{drawPublishedStorefrontRoot as T}from"./storefront-root.js";const j=_,k=(o,r)=>{const t=j[o];return{...r,...t?{textParts:t}:null}};let m=null;function l(){if(m)return m;const o={},r=E();for(const e of Object.keys(r))o[e]={...r[e],render:p[e]};const t={...y,...S};for(const e of Object.keys(t))o[e]=k(e,{...t[e],render:p[e]});b(o);const n={root:{render:T},categories:R(),components:o};return h(n),m=n,n}function x(o=l()){const r=o.components,t=Object.keys(r),n=new Set([f]),e=[f];for(;e.length;){const a=e.shift();for(const c of Object.values(r[a]?.fields??{})){if(c?.type!=="slot")continue;const d=c.allow??t.filter(s=>!c.disallow?.includes(s));for(const s of d)n.has(s)||!(s in r)||(n.add(s),e.push(s))}}return[...n]}let i=null;function W(){if(i)return i;const o=l(),r=o.components;return i={...o,root:{render:({children:t})=>g(u,{children:t})},components:Object.fromEntries(x(o).map(t=>[t,r[t]]))},i}export{W as headerRenderConfig,l as renderConfig};
@@ -0,0 +1,2 @@
1
+ import { type BlockSeed } from "efficient-web-builder/render/lib/sections/section-to-box";
2
+ export declare const detailRowSeed: (startLeft: boolean) => BlockSeed;
@@ -0,0 +1 @@
1
+ import{SECTION_BOX_SLOT as o,SECTION_BOX_TYPE as i,registerSectionToBox as g}from"efficient-web-builder/render/lib/sections/section-to-box";import{DIM as a,INNER_BOX as r,NO_PAD as m,SAME_KEYS as y,SECTION_BOX as S,TEXT as p}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-row-parts";import{token as n}from"efficient-web-builder/render/lib/document/blocks/general/section-head-looks";import{CARD_ROW_FIELD_PROP as s}from"efficient-web-builder/format/lib/content/card-template";const c=e=>({textStyle:"body-5",...n("label",e),letterSpacing:.2,case:"upper"}),t=(e,l,d)=>({type:"Text",props:{...l,[s]:e,_partStyles:{text:d}}}),P=e=>({type:i,props:{...r,name:"Row",mirrorCards:e?"odd":"even",direction:"row",share:"equal",align:"center",gap:48,sectionPaddingTop:60,sectionPaddingBottom:60,sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60},slots:{[o]:[{type:i,props:{...r,name:"Words",direction:"column",gap:16},slots:{[o]:[t("eyebrow",p,{...c(13),color:"accent"}),t("title",p,{textStyle:"heading-2",...n("headingMedium",42,28),lineHeight:1.1,letterSpacing:-.02}),t("copy",a,{textStyle:"body-1",...n("body",15),lineHeight:1.6})]}},{type:i,props:{...r,name:"Picture",direction:"column",gap:12},slots:{[o]:[{type:"ImageBlock",props:{[s]:"image",aspect:"1/1",fit:"contain"}},t("tag",{...a,align:"right"},{...c(11),align:"right"})]}}]}}),_={name:"Feature Rows",boxProps:{...S,...m,direction:"column",gap:0},box:y,parts:[{kind:"core",keep:"rest",slots:e=>({template:[P(e.startLeft===!0)]})}]};g({DetailRows:_});export{P as detailRowSeed};
@@ -1 +1 @@
1
- import{SECTION_BOX_SLOT as i,SECTION_BOX_TYPE as n,headParts as l,registerSectionToBox as c}from"efficient-web-builder/render/lib/sections/section-to-box";import{DIM as a,DROP_COMMON as g,DROP_SIDE_PADDING as h,INNER_BOX as o,SAME_KEYS as P,SECTION_BOX as m,TEXT as e,headingCaseOf as T,wrapperPad as y,wrapperPadKeys as S}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-row-parts";import{CARD_ROW_FIELD_PROP as O}from"efficient-web-builder/format/lib/content/card-template";const p={top:84,bottom:0,topPhone:84,bottomPhone:0},[x,_]=l("Testimonials"),s=(t,r,d)=>({type:"Text",props:{...r,[O]:t,_partStyles:{text:d}}}),b={type:n,props:{...o,name:"Card",gap:20,sectionPaddingTop:36,sectionPaddingBottom:36,sectionPaddingLeft:36,sectionPaddingRight:36,sectionPaddingTopPhone:28,sectionPaddingBottomPhone:28,sectionPaddingLeftPhone:28,sectionPaddingRightPhone:28,sectionAccent:0},slots:{[i]:[{type:"Text",props:{...e,text:"“",_partStyles:{text:{textStyle:"heading-2",color:"accent",lineHeight:1}}}},s("quote",a,{size:16,lineHeight:1.6}),{type:n,props:{...o,name:"Name",gap:4,sectionPaddingTop:20,sectionBorder:{top:1}},slots:{[i]:[s("name",e,{textStyle:"body-5",weight:500,case:"upper",letterSpacing:.04}),s("role",a,{textStyle:"body-5"})]}}]}},w={name:"Testimonials",boxProps:t=>({...m,direction:"column",gap:44,sectionBorder:{top:1},...y(t,p)}),box:[...P,...S(p)],parts:[{kind:"group",name:"Heading",props:{...o,gap:16},parts:[{...x,props:e},{..._,props:e,style:{textStyle:"heading-2",lineHeight:1,letterSpacing:-.02}}]},{kind:"core",as:"Reviews",keep:["items","columns"],slots:{template:[b]}}],site:T("title"),drop:{...g,...h,eyebrowLook:"the eyebrow Text wears the plain eyebrow's start look (Testimonials' default); a stored `filled` look needs a filled Text look",headPlacement:"the head is the Text blocks above the Reviews block, which is always own-box here"}};c({Testimonials:w});
1
+ import{SECTION_BOX_SLOT as s,SECTION_BOX_TYPE as n,headParts as c,registerSectionToBox as m}from"efficient-web-builder/render/lib/sections/section-to-box";import{DIM as a,DROP_COMMON as h,DROP_SIDE_PADDING as g,INNER_BOX as o,SAME_KEYS as P,SECTION_BOX as T,TEXT as e,headingCaseOf as O,wrapperPad as y,wrapperPadKeys as S}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-row-parts";import{CARD_ROW_FIELD_PROP as _}from"efficient-web-builder/format/lib/content/card-template";import{FRAME_OWN_BOX as b}from"../../components/Reviews.js";import{bandRoomBelow as x}from"../sections/section-band.js";const p=x(b),r={top:84,bottom:p.bottom,topPhone:84,bottomPhone:p.bottomPhone},[w,E]=c("Testimonials"),i=(t,d,l)=>({type:"Text",props:{...d,[_]:t,_partStyles:{text:l}}}),R={type:n,props:{...o,name:"Card",gap:20,sectionPaddingTop:36,sectionPaddingBottom:36,sectionPaddingLeft:36,sectionPaddingRight:36,sectionPaddingTopPhone:28,sectionPaddingBottomPhone:28,sectionPaddingLeftPhone:28,sectionPaddingRightPhone:28,sectionAccent:0},slots:{[s]:[{type:"Text",props:{...e,text:"“",_partStyles:{text:{textStyle:"heading-2",color:"accent",lineHeight:1}}}},i("quote",a,{size:16,lineHeight:1.6}),{type:n,props:{...o,name:"Name",gap:4,sectionPaddingTop:20,sectionBorder:{top:1}},slots:{[s]:[i("name",e,{textStyle:"body-5",weight:500,case:"upper",letterSpacing:.04}),i("role",a,{textStyle:"body-5"})]}}]}},B={name:"Testimonials",boxProps:t=>({...T,direction:"column",gap:44,sectionBorder:{top:1},...y(t,r)}),box:[...P,...S(r)],parts:[{kind:"group",name:"Heading",props:{...o,gap:16},parts:[{...w,props:e},{...E,props:e,style:{textStyle:"heading-2",lineHeight:1,letterSpacing:-.02}}]},{kind:"core",as:"Reviews",keep:["items","columns"],slots:{template:[R]}}],site:O("title"),drop:{...h,...g,eyebrowLook:"the eyebrow Text wears the plain eyebrow's start look (Testimonials' default); a stored `filled` look needs a filled Text look",headPlacement:"the head is the Text blocks above the Reviews block, which is always own-box here"}};m({Testimonials:B});
@@ -1 +1 @@
1
- import{SECTION_BOX_SLOT as p,SECTION_BOX_TYPE as a,registerSectionToBox as s}from"efficient-web-builder/render/lib/sections/section-to-box";import{headOnlyRow as l}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-rows-head";import{DIM as c,INNER_BOX as m,TEXT as g}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-row-parts";import{token as T}from"efficient-web-builder/render/lib/document/blocks/general/section-head-looks";import{CARD_ROW_FIELD_PROP as S}from"efficient-web-builder/format/lib/content/card-template";import{phoneKey as t}from"efficient-easel/draw";const o={textStyle:"body-5",...T("label",14),letterSpacing:.05,lineHeight:1.5},e=(n,i,r)=>({type:"Text",props:{...i,[S]:n,_partStyles:{text:r}}}),_={type:a,props:{...m,name:"Row",direction:"row",justify:"between",align:"start",share:"content",phoneRow:2,[t("share")]:"content",[t("wrap")]:!1,gap:24,sectionPaddingTop:16,sectionPaddingBottom:16,sectionPaddingTopPhone:16,sectionPaddingBottomPhone:16},slots:{[p]:[e("label",c,{...o,case:"upper"}),e("value",{...g,align:"right"},{...o,align:"right"})]}},d=l("SpecTable",{slots:{template:[_]}});s({SpecTable:d});
1
+ import{SECTION_BOX_SLOT as a,SECTION_BOX_TYPE as m,registerSectionToBox as c}from"efficient-web-builder/render/lib/sections/section-to-box";import{headOnlyRow as l}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-rows-head";import{DIM as P,INNER_BOX as d,TEXT as g,lineSides as B}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-row-parts";import{bandRoomBelow as E}from"../sections/section-band.js";import{SPEC_TABLE_BAND as _}from"../sections/spec-table-band.js";import{token as b}from"efficient-web-builder/render/lib/document/blocks/general/section-head-looks";import{CARD_ROW_FIELD_PROP as S}from"efficient-web-builder/format/lib/content/card-template";import{phoneKey as i}from"efficient-easel/draw";const r={textStyle:"body-5",...b("label",14),letterSpacing:.05,lineHeight:1.5},s=(t,e,p)=>({type:"Text",props:{...e,[S]:t,_partStyles:{text:p}}}),T={type:m,props:{...d,name:"Row",direction:"row",justify:"between",align:"start",share:"content",phoneRow:2,[i("share")]:"content",[i("wrap")]:!1,gap:24,sectionPaddingTop:16,sectionPaddingBottom:16,sectionPaddingTopPhone:16,sectionPaddingBottomPhone:16},slots:{[a]:[s("label",P,{...r,case:"upper"}),s("value",{...g,align:"right"},{...r,align:"right"})]}},o=l("SpecTable",{slots:{template:[T]}}),n=E(_.ownBox),h={...o,boxProps:(t,e)=>({...typeof o.boxProps=="function"?o.boxProps(t,e):o.boxProps,sectionPaddingBottom:n.bottom,sectionPaddingBottomPhone:n.bottomPhone,...n.line?{sectionBorder:B({bottom:1})}:{}})};c({SpecTable:h});