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.
- package/CHANGELOG.md +23 -0
- package/dist/chunks/{EditorPreviewCheckout-RI5SBSCE.js → EditorPreviewCheckout-4XHYYAT2.js} +1 -1
- package/dist/chunks/{SiteEditorProvider-OQXY7YGK.js → SiteEditorProvider-X4YKBAJ4.js} +1 -1
- package/dist/chunks/{chunk-DX6JADLE.js → chunk-KKKMX6LH.js} +1 -1
- package/dist/chunks/{chunk-AUYTGAOU.js → chunk-NFXV7HDB.js} +1 -1
- package/dist/chunks/chunk-NNBMZAW4.js +340 -0
- package/dist/chunks/chunk-VG4SUIRK.js +1 -0
- package/dist/chunks/chunk-Y5LB56KB.js +1 -0
- package/dist/chunks/{fitment-data-64LXUHOU.js → fitment-data-2I2FDPXW.js} +1 -1
- package/dist/contract.js +2 -2
- package/dist/editor/lib/document/blocks/commerce/DetailRows/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/ProductHero/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/index.d.ts +1 -1
- package/dist/editor/lib/document/config.d.ts +1 -0
- package/dist/editor/lib/document/config.js +1 -1
- package/dist/editor/lib/document/popup-look-fields.d.ts +4 -0
- package/dist/editor/lib/document/popup-look-fields.js +1 -0
- package/dist/editor/lib/document/section-text-regions.js +1 -1
- package/dist/editor/lib/efficient-backend.js +1 -1
- package/dist/editor/lib/storefront-editor-words.d.ts +8 -1
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/editor.css +1 -1
- package/dist/index.js +136 -93
- package/dist/render/app/globals.css +156 -0
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/CartContext.d.ts +1 -0
- package/dist/render/components/CartContext.js +1 -1
- package/dist/render/components/CartDrawer.d.ts +4 -3
- package/dist/render/components/CartDrawer.js +1 -4
- package/dist/render/components/DetailRows.d.ts +6 -1
- package/dist/render/components/DetailRows.js +1 -1
- package/dist/render/components/FinishSwatches.js +2 -1
- package/dist/render/components/LinkedProductHero.d.ts +2 -2
- package/dist/render/components/PopupFrame.d.ts +10 -1
- package/dist/render/components/PopupFrame.js +5 -1
- package/dist/render/components/ProductCard.js +1 -1
- package/dist/render/components/ProductHeroPanel.d.ts +5 -5
- package/dist/render/components/ProductHeroPanel.js +1 -1
- package/dist/render/components/ProductRef.js +1 -1
- package/dist/render/components/Reviews.d.ts +1 -0
- package/dist/render/components/Reviews.js +1 -1
- package/dist/render/components/SpecTable.js +1 -1
- package/dist/render/components/card-pieces/CardPrice.d.ts +9 -1
- package/dist/render/components/card-pieces/CardPrice.js +1 -1
- package/dist/render/components/card-pieces/ClippedPictures.d.ts +10 -0
- package/dist/render/components/card-pieces/ClippedPictures.js +1 -0
- package/dist/render/components/card-pieces/HostPart.d.ts +2 -1
- package/dist/render/components/card-pieces/HostPart.js +1 -1
- package/dist/render/components/card-pieces/ProductCardState.d.ts +12 -0
- package/dist/render/components/card-pieces/ProductCardState.js +1 -1
- package/dist/render/components/card-pieces/useHeldCardPicture.d.ts +16 -0
- package/dist/render/components/card-pieces/useHeldCardPicture.js +1 -0
- package/dist/render/components/pdp-dynamic/DynamicDetailRows.d.ts +2 -0
- package/dist/render/components/pdp-dynamic/DynamicDetailRows.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicProductHero.d.ts +2 -2
- package/dist/render/components/product-hero/stage-photo.d.ts +6 -0
- package/dist/render/components/product-hero/stage-photo.js +3 -3
- package/dist/render/components/useFinishSelection.d.ts +3 -0
- package/dist/render/components/useFinishSelection.js +3 -1
- package/dist/render/components/useProductCatalog.d.ts +2 -0
- package/dist/render/components/wheels-plp/PlpCard.js +1 -1
- package/dist/render/lib/api/types.d.ts +15 -2
- package/dist/render/lib/content/hero-price-seed.d.ts +4 -0
- package/dist/render/lib/content/hero-price-seed.js +1 -0
- package/dist/render/lib/document/blocks/commerce/DetailRows/meta.d.ts +6 -0
- package/dist/render/lib/document/blocks/commerce/DetailRows/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/DetailRows/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductHero/meta.d.ts +4 -0
- package/dist/render/lib/document/blocks/commerce/ProductHero/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductHero/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductPrice/render.js +1 -1
- package/dist/render/lib/document/card-templates.js +1 -1
- package/dist/render/lib/document/current-record.d.ts +4 -15
- package/dist/render/lib/document/current-record.js +1 -1
- package/dist/render/lib/document/render-config.d.ts +1 -0
- package/dist/render/lib/document/render-config.js +1 -1
- package/dist/render/lib/document/section-to-box-rows-detail.d.ts +2 -0
- package/dist/render/lib/document/section-to-box-rows-detail.js +1 -0
- package/dist/render/lib/document/section-to-box-rows-reviews.js +1 -1
- package/dist/render/lib/document/section-to-box-rows-spec.js +1 -1
- package/dist/render/lib/document/storefront-root.js +1 -1
- package/dist/render/lib/sections/product-price-text-regions.d.ts +4 -0
- package/dist/render/lib/sections/product-price-text-regions.js +1 -0
- package/dist/render/lib/sections/section-band.d.ts +6 -0
- package/dist/render/lib/sections/section-band.js +1 -1
- package/dist/render/lib/sections/spec-table-band.d.ts +4 -0
- package/dist/render/lib/sections/spec-table-band.js +1 -0
- package/dist/render/lib/wheels/signed-url.d.ts +3 -0
- package/dist/render/lib/wheels/signed-url.js +1 -0
- package/dist/words.d.ts +34 -15
- package/dist/words.js +5 -5
- package/package.json +4 -3
- package/dist/chunks/chunk-CRXKVHUQ.js +0 -1
- package/dist/chunks/chunk-LMOEQBT7.js +0 -340
- package/dist/chunks/chunk-QOM2OL54.js +0 -1
- package/dist/render/lib/sections/product-hero-text-regions.d.ts +0 -3
- package/dist/render/lib/sections/product-hero-text-regions.js +0 -1
- /package/dist/chunks/{chunk-LMOEQBT7.js.LEGAL.txt → chunk-NNBMZAW4.js.LEGAL.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Fragment as
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
2
|
-
`);p(()=>{let
|
|
3
|
-
`):[])
|
|
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
|
|
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
|
|
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"]["
|
|
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 @@
|
|
|
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"}],
|
|
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
|
|
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 +1 @@
|
|
|
1
|
-
import{DEFAULT_HERO_PRICE_PLACEMENT as e}from"../../../../sections/hero-price-placement.js";import{DEFAULT_HERO_LAYOUT as
|
|
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
|
|
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
|
|
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{
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
|
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
|
|
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 @@
|
|
|
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
|
|
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
|
|
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});
|