efficient-storefront-blocks 0.119.2 → 0.120.1

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 (73) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/dist/chunks/{EditorPreviewCheckout-URRXDD74.js → EditorPreviewCheckout-BJXYQD6G.js} +1 -1
  3. package/dist/chunks/{SiteEditorProvider-IA4YGOTE.js → SiteEditorProvider-YXH7PBRW.js} +1 -1
  4. package/dist/chunks/{chunk-R4NVEFBL.js → chunk-3E2YAOJH.js} +1 -1
  5. package/dist/chunks/{chunk-P6T6KGL3.js → chunk-3K5ORZAD.js} +1 -1
  6. package/dist/chunks/{chunk-DJBGDTYI.js → chunk-JM7XA3F6.js} +26 -26
  7. package/dist/chunks/{fitment-data-PUHJNPTL.js → fitment-data-SMLFCY4A.js} +1 -1
  8. package/dist/contract.js +1 -1
  9. package/dist/editor/lib/document/blocks/commerce/ProductEyebrow/fields.js +1 -1
  10. package/dist/editor/lib/document/blocks/commerce/ProductGallery/fields.d.ts +0 -4
  11. package/dist/editor/lib/document/blocks/commerce/ProductGallery/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/ProductName/fields.js +1 -1
  14. package/dist/editor/lib/document/blocks/commerce/index.d.ts +1 -1
  15. package/dist/editor/lib/document/blocks/commerce/title-look-row.d.ts +4 -0
  16. package/dist/editor/lib/document/blocks/commerce/title-look-row.js +1 -0
  17. package/dist/editor/lib/document/config.d.ts +1 -0
  18. package/dist/editor/lib/document/config.js +1 -1
  19. package/dist/editor/lib/storefront-editor-words.d.ts +12 -5
  20. package/dist/editor/lib/storefront-editor-words.js +1 -1
  21. package/dist/index.js +30 -30
  22. package/dist/render/built-with.json +1 -1
  23. package/dist/render/components/LinkedProductHero.d.ts +4 -13
  24. package/dist/render/components/LinkedProductHero.js +1 -1
  25. package/dist/render/components/ProductHeroPanel.d.ts +4 -12
  26. package/dist/render/components/ProductHeroPanel.js +1 -1
  27. package/dist/render/components/PublishedFooter.d.ts +3 -1
  28. package/dist/render/components/PublishedFooter.js +1 -1
  29. package/dist/render/components/PublishedHeader.d.ts +3 -1
  30. package/dist/render/components/PublishedHeader.js +1 -1
  31. package/dist/render/components/SignUpFind.d.ts +2 -1
  32. package/dist/render/components/SignUpFind.js +1 -1
  33. package/dist/render/components/SignUpSection.d.ts +1 -0
  34. package/dist/render/components/SignUpSection.js +1 -1
  35. package/dist/render/components/card-pieces/CardName.d.ts +2 -0
  36. package/dist/render/components/card-pieces/CardName.js +1 -1
  37. package/dist/render/components/card-pieces/HeadlineEyebrow.d.ts +7 -0
  38. package/dist/render/components/card-pieces/HeadlineEyebrow.js +1 -0
  39. package/dist/render/components/card-pieces/HeadlineName.d.ts +6 -0
  40. package/dist/render/components/card-pieces/HeadlineName.js +1 -0
  41. package/dist/render/components/card-pieces/ProductCardState.d.ts +12 -0
  42. package/dist/render/components/card-pieces/ProductCardState.js +1 -1
  43. package/dist/render/components/pdp-dynamic/DynamicProductGallery.js +1 -1
  44. package/dist/render/components/pdp-dynamic/DynamicProductHero.d.ts +4 -13
  45. package/dist/render/components/pdp-dynamic/DynamicProductHero.js +1 -1
  46. package/dist/render/lib/content/hero-seed.d.ts +22 -0
  47. package/dist/render/lib/content/hero-seed.js +1 -0
  48. package/dist/render/lib/content/title-look.d.ts +8 -0
  49. package/dist/render/lib/content/title-look.js +1 -0
  50. package/dist/render/lib/document/blocks/commerce/ProductEyebrow/render.js +1 -1
  51. package/dist/render/lib/document/blocks/commerce/ProductHero/meta.d.ts +0 -4
  52. package/dist/render/lib/document/blocks/commerce/ProductHero/meta.js +1 -1
  53. package/dist/render/lib/document/blocks/commerce/ProductHero/render.js +1 -1
  54. package/dist/render/lib/document/blocks/commerce/ProductName/render.js +1 -1
  55. package/dist/render/lib/document/card-templates.js +1 -1
  56. package/dist/render/lib/document/render-config.d.ts +1 -0
  57. package/dist/render/lib/document/render-config.js +1 -1
  58. package/dist/render/lib/document/section-to-box-rows-producthero.d.ts +1 -0
  59. package/dist/render/lib/document/section-to-box-rows-producthero.js +1 -0
  60. package/dist/render/lib/sections/hero-price-placement.d.ts +2 -5
  61. package/dist/render/lib/sections/hero-price-placement.js +1 -1
  62. package/dist/render/lib/sections/hero-trust-bullets.d.ts +0 -1
  63. package/dist/render/lib/sections/hero-trust-bullets.js +1 -1
  64. package/dist/words.d.ts +12 -5
  65. package/dist/words.js +1 -1
  66. package/package.json +4 -3
  67. package/dist/render/components/product-hero/trust-bullets.d.ts +0 -5
  68. package/dist/render/components/product-hero/trust-bullets.js +0 -1
  69. package/dist/render/lib/content/hero-price-seed.d.ts +0 -4
  70. package/dist/render/lib/content/hero-price-seed.js +0 -1
  71. /package/dist/chunks/{chunk-YY4RMNWM.js → chunk-ITCY3GG4.js} +0 -0
  72. /package/dist/chunks/{chunk-DJBGDTYI.js.LEGAL.txt → chunk-JM7XA3F6.js.LEGAL.txt} +0 -0
  73. /package/dist/chunks/{chunk-5VQNKBJK.js → chunk-MR37ISPW.js} +0 -0
@@ -1,3 +1,3 @@
1
1
  {
2
- "efficient-web-builder": "70.4.0"
2
+ "efficient-web-builder": "71.1.0"
3
3
  }
@@ -1,31 +1,22 @@
1
- import { type ReactNode } from "react";
2
- import { type HeroPriceTemplateProps } from "./ProductHeroPanel.js";
3
- import type { HeroPricePlacement } from "../lib/sections/hero-price-placement.js";
1
+ import { type HeroTemplateProps } from "./ProductHeroPanel.js";
4
2
  import type { HeroLayout, HeroTextAlign } from "../lib/sections/hero-arrangement.js";
5
- import type { HeroGalleryMode, HeroImageFit } from "../lib/sections/hero-gallery.js";
6
3
  import { type LinkedHeroRecord } from "../lib/document/linked-hero-hydrate.js";
7
4
  export type { LinkedHeroRecord };
8
- interface HeroArrangement extends HeroPriceTemplateProps {
5
+ interface HeroArrangement extends HeroTemplateProps {
9
6
  heroLayout?: HeroLayout;
10
7
  imageRatio?: number;
11
8
  textAlign?: HeroTextAlign;
12
9
  showSpecTable?: boolean;
13
- showPriceQuote?: boolean;
14
- galleryMode?: HeroGalleryMode;
15
- imageFit?: HeroImageFit;
16
- trustBullets?: ReactNode;
17
10
  }
18
- export default function LinkedProductHero({ slug, kind, editing, pricePlacement, showVehicleFitment, initialRecord, ...arrangement }: {
11
+ export default function LinkedProductHero({ slug, kind, editing, showVehicleFitment, initialRecord, ...arrangement }: {
19
12
  slug: string;
20
13
  kind?: "wheel" | "tyre";
21
14
  editing?: boolean;
22
15
  initialRecord?: LinkedHeroRecord;
23
- pricePlacement?: HeroPricePlacement;
24
16
  showVehicleFitment?: boolean;
25
17
  } & HeroArrangement): import("react").JSX.Element;
26
- export declare function LinkedHeroLoaded({ record, editing, pricePlacement, showVehicleFitment, ...arrangement }: {
18
+ export declare function LinkedHeroLoaded({ record, editing, showVehicleFitment, ...arrangement }: {
27
19
  record: LinkedHeroRecord;
28
20
  editing?: boolean;
29
- pricePlacement?: HeroPricePlacement;
30
21
  showVehicleFitment?: boolean;
31
22
  } & HeroArrangement): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as i,Fragment as L,jsxs as P}from"react/jsx-runtime";import{useEffect as y,useState as h}from"react";import w from"./ProductHeroPanel.js";import b from"./ProductLightbox.js";import p from"./SectionNotice.js";import{useLightbox as j}from"./useLightbox.js";import{useProductSelection as k}from"./useProductSelection.js";import{fromTyre as F}from"../lib/catalog/from-tyre.js";import{fromWheel as H}from"../lib/catalog/from-wheel.js";import{products as x}from"../lib/api/index.js";import{matchingLinkedRecord as S}from"../lib/document/linked-hero-hydrate.js";function _({slug:e,kind:r="wheel",editing:c=!1,pricePlacement:l,showVehicleFitment:s=!0,initialRecord:n,...m}){const t=S(n,r,e),[f,d]=h(t??null),[g,a]=h(!1);return y(()=>{if(a(!1),t){d(t);return}let u=!1;return d(null),(r==="tyre"?x.getTyre(e).then(o=>({kind:"tyre",tyre:o})):x.getWheel(e).then(o=>({kind:"wheel",wheel:o}))).then(o=>{u||d(o)}).catch(()=>{u||a(!0)}),()=>{u=!0}},[e,r,t]),g?i(p,{size:"tall",children:"Couldn’t load this product."}):f?i(z,{record:f,editing:c,pricePlacement:l,showVehicleFitment:s,...m}):i(p,{size:"tall",children:"Loading product…"})}function z({record:e,editing:r=!1,pricePlacement:c,showVehicleFitment:l=!0,...s}){const n=e.kind==="tyre"?F(e.tyre):H(e.wheel),m=k(n,{editing:r}),t=j();return P(L,{children:[i(w,{product:n,selection:m,onLightbox:t.open,editing:r,pricePlacement:c,showVehicleFitment:l,...s}),i(b,{item:t.item,onClose:t.close})]})}export{z as LinkedHeroLoaded,_ as default};
1
+ "use client";import{jsx as i,Fragment as g,jsxs as L}from"react/jsx-runtime";import{useEffect as y,useState as a}from"react";import w from"./ProductHeroPanel.js";import P from"./ProductLightbox.js";import h from"./SectionNotice.js";import{useLightbox as b}from"./useLightbox.js";import{useProductSelection as j}from"./useProductSelection.js";import{fromTyre as k}from"../lib/catalog/from-tyre.js";import{fromWheel as F}from"../lib/catalog/from-wheel.js";import{products as p}from"../lib/api/index.js";import{matchingLinkedRecord as H}from"../lib/document/linked-hero-hydrate.js";function S({slug:e,kind:r="wheel",editing:c=!1,showVehicleFitment:s=!0,initialRecord:n,...l}){const t=H(n,r,e),[u,m]=a(t??null),[x,f]=a(!1);return y(()=>{if(f(!1),t){m(t);return}let d=!1;return m(null),(r==="tyre"?p.getTyre(e).then(o=>({kind:"tyre",tyre:o})):p.getWheel(e).then(o=>({kind:"wheel",wheel:o}))).then(o=>{d||m(o)}).catch(()=>{d||f(!0)}),()=>{d=!0}},[e,r,t]),x?i(h,{size:"tall",children:"Couldn’t load this product."}):u?i(_,{record:u,editing:c,showVehicleFitment:s,...l}):i(h,{size:"tall",children:"Loading product…"})}function _({record:e,editing:r=!1,showVehicleFitment:c=!0,...s}){const n=e.kind==="tyre"?k(e.tyre):F(e.wheel),l=j(n,{editing:r}),t=b();return L(g,{children:[i(w,{product:n,selection:l,onLightbox:t.open,editing:r,showVehicleFitment:c,...s}),i(P,{item:t.item,onClose:t.close})]})}export{_ as LinkedHeroLoaded,S as default};
@@ -1,33 +1,25 @@
1
- import { type ReactNode } from "react";
2
1
  import type { ProductSelection } from "./useProductSelection.js";
3
2
  import { type StoreProduct } from "../lib/catalog/store-product.js";
4
- import type { HeroPricePlacement } from "../lib/sections/hero-price-placement.js";
5
3
  import { type HeroLayout, type HeroTextAlign } from "../lib/sections/hero-arrangement.js";
6
- import { type HeroGalleryMode, type HeroImageFit } from "../lib/sections/hero-gallery.js";
7
4
  import type { CardPressTitle } from "efficient-web-builder/render/lib/document/card-press-titles";
8
5
  import type { SlotComponent } from "efficient-easel/blocks";
9
- export interface HeroPriceTemplateProps {
6
+ export interface HeroTemplateProps {
10
7
  nodeId?: string;
11
- priceTemplate: SlotComponent | undefined;
8
+ template: SlotComponent | undefined;
12
9
  optionTemplate?: SlotComponent;
13
10
  buyTemplate: SlotComponent | undefined;
14
11
  optionPressTitles?: readonly CardPressTitle[];
15
12
  }
16
- interface Props extends HeroPriceTemplateProps {
13
+ interface Props extends HeroTemplateProps {
17
14
  product: StoreProduct;
18
15
  selection: ProductSelection;
19
16
  onLightbox: (src: string, alt: string) => void;
20
17
  editing?: boolean;
21
- pricePlacement?: HeroPricePlacement;
22
18
  showVehicleFitment?: boolean;
23
19
  heroLayout?: HeroLayout;
24
20
  imageRatio?: number;
25
21
  textAlign?: HeroTextAlign;
26
22
  showSpecTable?: boolean;
27
- showPriceQuote?: boolean;
28
- galleryMode?: HeroGalleryMode;
29
- imageFit?: HeroImageFit;
30
- trustBullets?: ReactNode;
31
23
  }
32
- export default function ProductHeroPanel({ product, selection, onLightbox, editing, pricePlacement, showVehicleFitment, heroLayout, imageRatio, textAlign, showSpecTable, showPriceQuote, galleryMode, imageFit, trustBullets, nodeId, priceTemplate, optionTemplate, optionPressTitles, buyTemplate, }: Props): import("react").JSX.Element;
24
+ export default function ProductHeroPanel({ product, selection, onLightbox, editing, showVehicleFitment, heroLayout, imageRatio, textAlign, showSpecTable, nodeId, template, optionTemplate, optionPressTitles, buyTemplate, }: Props): import("react").JSX.Element;
33
25
  export {};
@@ -1 +1 @@
1
- "use client";import{jsx as a,Fragment as h,jsxs as n}from"react/jsx-runtime";import te from"next/link";import{useEffect as ae,useRef as Ce,useState as Ie}from"react";import{useCart as $e}from"./CartContext.js";import{useSiteTakesOrders as Pe}from"./SiteRecordContext.js";import He from"./EmailCaptureForm.js";import{useEnglish as le}from"./EnglishVariant.js";import{MarkedLabel as M,heroView as Me}from"./product-hero/hero-view.js";import De from"./ProductGallery.js";import{useRootIsDark as ze}from"efficient-shell/theme";import{useStockAlertSignup as Fe}from"./useStockAlertSignup.js";import{SPARE_WORDS as Ue,productCartLine as Be}from"../lib/catalog/purchase.js";import{OPTION_ROW_ATTR as je}from"../lib/catalog/store-product.js";import{resolvingRowsAnswered as Ge}from"../lib/catalog/product-options.js";import{trackViewItem as Ve}from"../lib/google-tag.js";import{DEFAULT_HERO_LAYOUT as We,DEFAULT_HERO_RATIO as Ye,DEFAULT_HERO_TEXT_ALIGN as Xe,parseHeroLayout as Ke,parseHeroRatio as qe,parseHeroTextAlign as Qe}from"../lib/sections/hero-arrangement.js";import{DEFAULT_HERO_GALLERY_MODE as Je,DEFAULT_HERO_IMAGE_FIT as Ze}from"../lib/sections/hero-gallery.js";import{MAX_SPARES as et,UNITS_PER_SET as ne,formatPrice as re}from"../lib/commerce.js";import{formatSelectionPrice as tt,setPriceLabel as at}from"../lib/wheels/price-display.js";import{productIsDually as lt,productIsTwoObjects as nt,setSuppressesRow as rt}from"../lib/wheels/set-mode.js";import{CONTENT_CAP_GUTTER as se}from"../lib/sections/content-cap-gutter.js";import{CardTemplateRows as D}from"efficient-web-builder/render/components/CardRowContext";import{InsideSiteColumn as ie}from"efficient-web-builder/render/components/SiteGutterFrame";import{BLOCK_ALIGN_BOX_WORD as st,BLOCK_ALIGN_TEXT as it}from"efficient-web-builder/format/lib/content/block-align";import{BOX_ALIGN_CLASS as ot}from"efficient-web-builder/format/lib/content/box-layout";import{cardRow as ct}from"efficient-web-builder/format/lib/content/card-template";import{optionCardRows as mt}from"../lib/sections/filter-option-rows.js";import{HERO_OPTION_SLOT as pt}from"../lib/content/hero-option-seed.js";import{HERO_BUY_SLOT as dt,HERO_QUANTITY_PART as ft,HERO_SAVE_PART as ht}from"../lib/content/hero-buy-seed.js";import ut from"./card-pieces/CardQuantity.js";import gt from"./card-pieces/CardSave.js";import bt from"./card-pieces/CardStatedFacts.js";import{HeroStateProvider as z}from"./card-pieces/ProductCardState.js";import{PRODUCT_HERO_TYPE as F}from"../lib/document/document-nodes.js";const xt=4e3;function vt(t){return t?[t.year,t.make,t.model,t.modification].join("-"):""}const oe=[{}],kt=oe,Tt=(t,r)=>r===ft?a(ut,{}):r===ht?a(gt,{}):null,yt=.72;function _t(t){const r=t.trim().split(/\s+/).filter(Boolean);if(r.length===0)return;const p=r.map((i,o)=>i.length+(r.length>1&&o===r.length-1?1:0));return`calc(100cqi / ${(Math.max(...p)*yt).toFixed(2)})`}function Nt({product:t,selection:r,onLightbox:p,editing:i=!1,pricePlacement:o="top",showVehicleFitment:d=!0,heroLayout:l=We,imageRatio:S=Ye,textAlign:me=Xe,showSpecTable:pe=!0,showPriceQuote:w=!0,galleryMode:de=Je,imageFit:fe=Ze,trustBullets:he,nodeId:O,priceTemplate:ue,optionTemplate:ge,optionPressTitles:be,buyTemplate:xe}){const ve=le(),b=Ke(l),U=Qe(me),_=qe(S),ke=b==="imageRight"?`${100-_}fr ${_}fr`:`${_}fr ${100-_}fr`,{picked:Te,pick:B,qty:j,setQty:ye,choice:v,setChoice:N,angleIdx:_e,setAngleIdx:Ne,showValidation:Se,setShowValidation:R,manualMode:G,vehicle:E,rows:V,facts:we,part:u,outOfStock:W,offer:c,preOrder:L,canAddToCart:Y,currency:x,price:f,set:X,msrpLabel:Oe}=r,s=Me(t,r,i),A=lt(t),Re=nt(t),C=d?s.vehicle:null,Ee=d?s.vehicleMemory:null,I=!ze({whenUnset:!0}),{warmCatalog:K}=$e(),g=Pe();ae(()=>{!i&&g&&K(t.kind,t.slug)},[i,g,t.kind,t.slug,K]);const q=V.filter(e=>!L||e.values.length>0),Q=q.filter(e=>e.role==="resolves"),$=q.filter(e=>e.role==="describes"&&!rt(Re,e.key)),J=$.findIndex(e=>e.chosen===null),Z=(!C||!s.vehicleAnswersSpecs||r.fitmentSet)&&Ge(V,L)?J===-1?$:$.slice(0,J+1):[],Le=[...Q,...Z];function Ae(){return Y?(R(!1),i?null:Be(t,u,Te,{choice:v,qty:j},{fitmentLabel:G?s.specCaption:E.appliedName?`For ${E.appliedName}`:"",fitmentKey:G?`manual|${s.specCaption}`:`vehicle|${vt(E.applied?.vehicle)}`})):(R(!0),window.setTimeout(()=>R(!1),xt),null)}const P={kind:"hero",msrpLabel:Oe||null,amount:A?at(f,x):tt(f,x),unitLabel:f.priced?s.unitLabel:null,packBadge:f.setTotal!=null?`${c.quantityLabel}: ${re(X,x)}`:null,buy:{isSet:A,priced:f.priced,outOfStock:W,canAdd:Y,totalLabel:f.setTotal!=null?re(X,x):null,lineToAdd:Ae},qty:j,setQty:ye,takesQty:g&&!(A&&!f.priced),save:{slug:t.slug,name:t.name},facts:pe?we:null},H=a(z,{value:P,children:a(D,{ownerId:O??"",ownerType:F,Template:ue,rows:oe,fallback:null,children:e=>e})}),k={nodeId:O??"",template:ge,pressTitles:be,editing:i},ee=Ce(null);return ae(()=>{i||ee.current===t.slug||(ee.current=t.slug,Ve({itemId:u?`${t.slug}|${u.id}`:t.slug,itemName:t.name,variant:s.metaValue,pricePerSet:f.setTotal??f.fromSetTotal??0,currency:x}))},[i,t.slug,t.name,s.metaValue,u,f,x]),n(h,{children:[a("nav",{className:`border-b border-line ${se} pt-4 pb-4 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim max-view-tablet:px-[min(20px,var(--sf-site-gutter,40px))]`,style:I?void 0:{background:"var(--section-bg)"},children:t.crumbs.map((e,m)=>n("span",{children:[m>0&&n(h,{children:[a("span",{className:"mx-3 text-accent",children:"/"}),a("wbr",{})]}),e.href?a(te,{href:e.href,className:"hover:text-fg",children:a(M,{text:e.label})}):a("span",{className:"text-fg",children:a(M,{text:e.label})})]},`${e.label}-${m}`))}),n("section",{"data-hero-layout":b,"data-hero-align":U,className:[`grid gap-10 ${se} py-14 max-view-tablet:px-[min(20px,var(--sf-site-gutter,40px))] max-view-tablet:py-8`,b==="stacked"?"grid-cols-1":"[grid-template-columns:var(--hero-cols)] max-view-desktop:[grid-template-columns:minmax(0,1fr)]"].join(" "),style:{...I?{}:{background:"var(--section-bg)"},...b==="stacked"?{}:{"--hero-cols":ke}},children:[a(De,{product:t,view:s,angleIdx:_e,onSelect:Ne,isLight:I,onLightbox:p,galleryMode:de,imageFit:fe,style:b==="imageRight"?{order:2}:void 0}),n("div",{className:["flex flex-col gap-7",U==="center"?`${ot[st.center]} ${it.center}`:""].filter(Boolean).join(" "),style:b==="imageRight"?{order:1}:void 0,children:[n("div",{className:"w-full [container-type:inline-size]",children:[n("div",{className:"mb-2.5 flex items-center gap-2.5 font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.2em] text-accent",children:[a("span",{children:a(M,{text:t.eyebrow})}),t.badge&&n(h,{children:[a("span",{children:"·"}),a("span",{children:t.badge})]})]}),a("h1",{className:"font-heading2 text-[length:min(min(var(--size-headingMedium,clamp(48px,5.5vw,84px)),var(--hero-name-fit,9999px)),var(--sf-heading-max,9999px))] [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] leading-[0.92] tracking-[-0.035em]",style:{"--hero-name-fit":_t(s.heading)},children:(()=>{const e=s.heading.lastIndexOf(" ");if(e===-1)return s.heading;const m=s.heading.slice(0,e),T=s.heading.slice(e+1);return n(h,{children:[m," ",n("em",{className:"font-normal italic text-accent",children:[T,"."]})]})})()})]}),o!=="belowSpecs"&&w&&H,Ee,Q.map(e=>a(ce,{row:e,onPick:B,options:k},e.key)),L&&s.preOrder?n(h,{children:[o==="belowSpecs"&&w&&H,s.preOrder]}):n(h,{children:[C,Z.map(e=>a(ce,{row:e,onPick:B,options:k},e.key)),a(z,{value:P,children:a(bt,{})}),(c.packs.length>0||g&&(c.extra||c.spareCounts.length>0))&&n("div",{className:"border-b border-line pb-[26px]",children:[c.packs.length>0&&n(h,{children:[a("div",{className:"mb-3.5 font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.22em] text-fg",children:"How many"}),a("div",{className:"flex flex-wrap gap-1.5",children:a(y,{hero:k,values:c.packs,item:e=>({label:e.label}),picked:e=>v.unit===e.value,press:e=>()=>N(m=>({...m,unit:e.value}))})})]}),g&&c.extra&&n("label",{className:`${c.packs.length>0?"mt-3.5 ":""}flex cursor-pointer items-center gap-3 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.16em] text-fg`,children:[a("input",{type:"checkbox",checked:v.spares>0,onChange:e=>N(m=>({...m,spares:e.target.checked?et:0})),className:"h-4 w-4 cursor-pointer accent-[var(--accent)]"}),c.extra.label]}),g&&c.spareCounts.length>0&&n(h,{children:[a("div",{className:"mb-3.5 font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.22em] text-fg",children:Ue.howMany}),a("div",{className:"flex flex-col gap-1.5 sm:flex-row sm:flex-wrap",children:a(y,{hero:k,values:c.spareCounts,item:e=>({label:`${e.value} · ${e.label}`}),picked:e=>v.spares===e.value-ne,press:e=>()=>N(m=>({...m,spares:e.value-ne}))})})]}),g&&c.spareSide&&n(h,{children:[a("div",{className:"mb-3.5 mt-[26px] font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.22em] text-fg",children:c.spareSide.label}),a("div",{className:"flex flex-wrap gap-1.5",children:a(y,{hero:k,values:c.spareSide.options,item:e=>({label:e.label}),picked:e=>v.spareSide===e.value,press:e=>()=>N(m=>({...m,spareSide:e.value}))})})]})]}),o==="belowSpecs"&&w&&H,a(z,{value:P,children:a(ie,{children:a(D,{ownerId:O??"",ownerType:F,slot:dt,Template:xe,rows:kt,fallback:null,hostParts:Tt,children:e=>e})})}),W&&u&&a(St,{partNumbers:u.components.map(e=>e.partNumber),productSlug:t.slug},u.id),Se&&(()=>{const e=Le.filter(T=>T.chosen===null).map(T=>ve(T.prompt).replace(/^Select\s+/i,""));if(C&&s.vehicleAnswersSpecs&&!r.fitmentSet&&e.push("vehicle fitment"),e.length===0)return null;const m=e.length===1?e[0]:e.length===2?`${e[0]} and ${e[1]}`:`${e.slice(0,-1).join(", ")}, and ${e.at(-1)}`;return n("p",{role:"alert",className:"-mt-1 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em]",style:{color:"var(--alert)"},children:["Please select ",m," first."]})})()]}),he]})]})]})}function ce({row:t,onPick:r,options:p}){const i=le();if(t.values.length===0&&!t.empty)return null;const o=t.values.find(l=>l.value===t.chosen),d=o&&[o.label,o.note].filter(Boolean).join(" · ");return n("div",{className:"border-b border-line pb-[26px]",[je]:t.key,children:[n("div",{className:"mb-3.5 font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.22em] text-fg",children:[i(t.label)," · ",a("span",{className:"text-accent",children:d??i(t.prompt)})]}),t.values.length===0?n("p",{className:"font-mono text-[length:var(--size-body,12px)] leading-relaxed tracking-[0.1em] text-fg-dim",children:[t.empty.text," ",a(te,{href:t.empty.href,className:"text-accent hover:underline",children:t.empty.linkText})]}):t.display==="swatch"?a("div",{className:"flex flex-wrap gap-2 [&>*]:max-w-full",children:a(y,{hero:p,values:t.values,item:l=>({swatch:l.swatch??"",name:l.label}),picked:l=>l.value===t.chosen,press:l=>()=>r(t.key,l.value)})}):a("div",{className:"flex flex-wrap gap-1.5",children:a(y,{hero:p,values:t.values,item:l=>({label:l.label,note:l.note??""}),picked:l=>l.value===t.chosen,press:l=>()=>r(t.key,l.value)})})]})}function y({hero:t,values:r,item:p,picked:i,press:o}){const d=mt(r,{item:p,selected:i,press:o});return a(ie,{children:a(D,{ownerId:t.nodeId,ownerType:F,slot:pt,Template:t.template,rows:d.items.map(ct),items:d.items,states:d.states,actions:t.editing?void 0:d.actions,pressTitles:t.pressTitles,fallback:null,children:l=>l})})}function St({partNumbers:t,productSlug:r}){const[p,i]=Ie(""),{status:o,submit:d,reset:l}=Fe();function S(){d({partNumbers:t,email:p,productSlug:r})}return o==="sent"?a("p",{className:"-mt-1 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em] text-accent",children:"We'll email you when it's back."}):a(He,{className:"-mt-1",email:p,onEmailChange:i,status:o,onResetVerdict:l,onSubmit:S,inputAriaLabel:"Email for the back-in-stock alert",submitLabel:"Notify me when back",buttonClassName:"cursor-pointer whitespace-nowrap border-2 border-btn px-4 font-mono text-[length:var(--size-label,11px)] font-bold uppercase tracking-[0.22em] text-btn transition-colors hover:bg-btn hover:text-btn-ink disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent disabled:hover:text-btn",errorMessage:"Couldn't save that — please try again."})}export{Nt as default};
1
+ "use client";import{jsx as t,Fragment as g,jsxs as c}from"react/jsx-runtime";import J from"next/link";import{useEffect as Z,useRef as Re,useState as Ee}from"react";import{useCart as Ae}from"./CartContext.js";import{useSiteTakesOrders as Le}from"./SiteRecordContext.js";import Ce from"./EmailCaptureForm.js";import{useEnglish as ee}from"./EnglishVariant.js";import{MarkedLabel as te,heroView as Pe}from"./product-hero/hero-view.js";import{useRootIsDark as Ie}from"efficient-shell/theme";import{useStockAlertSignup as $e}from"./useStockAlertSignup.js";import{SPARE_WORDS as He,productCartLine as Me}from"../lib/catalog/purchase.js";import{OPTION_ROW_ATTR as je}from"../lib/catalog/store-product.js";import{resolvingRowsAnswered as ze}from"../lib/catalog/product-options.js";import{trackViewItem as De}from"../lib/google-tag.js";import{DEFAULT_HERO_LAYOUT as Ue,DEFAULT_HERO_RATIO as Be,DEFAULT_HERO_TEXT_ALIGN as Ve,parseHeroLayout as Fe,parseHeroRatio as Qe,parseHeroTextAlign as Ye}from"../lib/sections/hero-arrangement.js";import{MAX_SPARES as Ke,UNITS_PER_SET as ae,formatPrice as le}from"../lib/commerce.js";import{formatSelectionPrice as We,setPriceLabel as Xe}from"../lib/wheels/price-display.js";import{productIsDually as Ge,productIsTwoObjects as qe,setSuppressesRow as Je}from"../lib/wheels/set-mode.js";import{CONTENT_CAP_GUTTER as ne}from"../lib/sections/content-cap-gutter.js";import{BLOCK_ALIGN_TEXT as Ze}from"efficient-web-builder/format/lib/content/block-align";import{CardTemplateRows as C}from"efficient-web-builder/render/components/CardRowContext";import{InsideSiteColumn as P}from"efficient-web-builder/render/components/SiteGutterFrame";import{cardRow as et}from"efficient-web-builder/format/lib/content/card-template";import{optionCardRows as tt}from"../lib/sections/filter-option-rows.js";import{HERO_OPTION_SLOT as at}from"../lib/content/hero-option-seed.js";import{HERO_BUY_SLOT as lt,HERO_QUANTITY_PART as nt,HERO_SAVE_PART as rt}from"../lib/content/hero-buy-seed.js";import{HERO_PART as f}from"../lib/content/hero-seed.js";import st from"./card-pieces/CardQuantity.js";import it from"./card-pieces/CardSave.js";import ot from"./card-pieces/CardStatedFacts.js";import{HeroStateProvider as ct}from"./card-pieces/ProductCardState.js";import{PRODUCT_HERO_TYPE as I}from"../lib/document/document-nodes.js";const mt=4e3;function pt(e){return e?[e.year,e.make,e.model,e.modification].join("-"):""}const re=[{}],dt=(e,r)=>r===nt?t(st,{}):r===rt?t(it,{}):null,ut="[&>[data-sf-repeat]]:contents [&>[data-sf-repeat]>div]:contents";function ft({product:e,selection:r,onLightbox:o,editing:s=!1,showVehicleFitment:i=!0,heroLayout:l=Ue,imageRatio:n=Be,textAlign:y=Ve,showSpecTable:ie=!0,nodeId:w,template:oe,optionTemplate:ce,optionPressTitles:me,buyTemplate:pe}){const de=ee(),v=Fe(l),$=Ye(y),k=Qe(n),ue=v==="imageRight"?`${100-k}fr ${k}fr`:`${k}fr ${100-k}fr`,{picked:fe,pick:H,qty:M,setQty:he,choice:j,setChoice:be,angleIdx:gt,setAngleIdx:xt,showValidation:ge,setShowValidation:S,manualMode:z,vehicle:N,rows:D,facts:xe,part:d,outOfStock:U,offer:B,preOrder:_,canAddToCart:V,currency:h,price:p,set:F,msrpLabel:ve}=r,m=Pe(e,r,s),O=Ge(e),ke=qe(e),R=i?m.vehicle:null,Te=i?m.vehicleMemory:null,Q=!Ie({whenUnset:!0}),{warmCatalog:Y}=Ae(),T=Le();Z(()=>{!s&&T&&Y(e.kind,e.slug)},[s,T,e.kind,e.slug,Y]);const K=D.filter(a=>!_||a.values.length>0),W=K.filter(a=>a.role==="resolves"),E=K.filter(a=>a.role==="describes"&&!Je(ke,a.key)),X=E.findIndex(a=>a.chosen===null),G=(!R||!m.vehicleAnswersSpecs||r.fitmentSet)&&ze(D,_)?X===-1?E:E.slice(0,X+1):[],ye=[...W,...G];function we(){return V?(S(!1),s?null:Me(e,d,fe,{choice:j,qty:M},{fitmentLabel:z?m.specCaption:N.appliedName?`For ${N.appliedName}`:"",fitmentKey:z?`manual|${m.specCaption}`:`vehicle|${pt(N.applied?.vehicle)}`})):(S(!0),window.setTimeout(()=>S(!1),mt),null)}const Se={kind:"hero",msrpLabel:ve||null,amount:O?Xe(p,h):We(p,h),unitLabel:p.priced?m.unitLabel:null,packBadge:p.setTotal!=null?`${B.quantityLabel}: ${le(F,h)}`:null,buy:{isSet:O,priced:p.priced,outOfStock:U,canAdd:V,totalLabel:p.setTotal!=null?le(F,h):null,lineToAdd:we},qty:M,setQty:he,takesQty:T&&!(O&&!p.priced),save:{slug:e.slug,name:e.name},facts:ie?xe:null,title:{eyebrow:e.eyebrow,name:m.heading,badge:e.badge||null},product:e,selection:r,openLightbox:o},A={nodeId:w??"",template:ce,pressTitles:me,editing:s},u=!!(_&&m.preOrder),Ne={[f.fitmentLine]:Te,[f.options]:c(g,{children:[W.map(a=>t(se,{row:a,onPick:H,options:A},a.key)),!u&&R,!u&&G.map(a=>t(se,{row:a,onPick:H,options:A},a.key))]}),[f.facts]:u?null:t(ot,{}),[f.howMany]:u?null:t(ht,{offer:B,takesOrders:T,choice:j,setChoice:be,options:A}),[f.buy]:u?m.preOrder:t(P,{children:t(C,{ownerId:w??"",ownerType:I,slot:lt,Template:pe,rows:re,fallback:null,hostParts:dt,children:a=>a})}),[f.notify]:!u&&U&&d?t(bt,{partNumbers:d.components.map(a=>a.partNumber),productSlug:e.slug},d.id):null,[f.reminder]:!u&&ge?Oe():null},_e=(a,b)=>Ne[b]??null;function Oe(){const a=ye.filter(L=>L.chosen===null).map(L=>de(L.prompt).replace(/^Select\s+/i,""));if(R&&m.vehicleAnswersSpecs&&!r.fitmentSet&&a.push("vehicle fitment"),a.length===0)return null;const b=a.length===1?a[0]:a.length===2?`${a[0]} and ${a[1]}`:`${a.slice(0,-1).join(", ")}, and ${a.at(-1)}`;return c("p",{role:"alert",className:"-mt-1 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em]",style:{color:"var(--alert)"},children:["Please select ",b," first."]})}const q=Re(null);return Z(()=>{s||q.current===e.slug||(q.current=e.slug,De({itemId:d?`${e.slug}|${d.id}`:e.slug,itemName:e.name,variant:m.metaValue,pricePerSet:p.setTotal??p.fromSetTotal??0,currency:h}))},[s,e.slug,e.name,m.metaValue,d,p,h]),c(g,{children:[t("nav",{className:`border-b border-line ${ne} pt-4 pb-4 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim max-view-tablet:px-[min(20px,var(--sf-site-gutter,40px))]`,style:Q?void 0:{background:"var(--section-bg)"},children:e.crumbs.map((a,b)=>c("span",{children:[b>0&&c(g,{children:[t("span",{className:"mx-3 text-accent",children:"/"}),t("wbr",{})]}),a.href?t(J,{href:a.href,className:"hover:text-fg",children:t(te,{text:a.label})}):t("span",{className:"text-fg",children:t(te,{text:a.label})})]},`${a.label}-${b}`))}),t("section",{"data-hero-layout":v,"data-hero-align":$,className:[`grid gap-10 ${ne} py-14 max-view-tablet:px-[min(20px,var(--sf-site-gutter,40px))] max-view-tablet:py-8 ${ut}`,$==="center"?Ze.center:"",v==="stacked"?"grid-cols-1":"[grid-template-columns:var(--hero-cols)] max-view-desktop:[grid-template-columns:minmax(0,1fr)]"].filter(Boolean).join(" "),style:{...Q?{}:{background:"var(--section-bg)"},...v==="stacked"?{}:{"--hero-cols":ue}},children:t(ct,{value:Se,children:t(P,{children:t(C,{ownerId:w??"",ownerType:I,Template:oe,rows:re,fallback:null,hostParts:_e,children:a=>a})})})})]})}function ht({offer:e,takesOrders:r,choice:o,setChoice:s,options:i}){return e.packs.length>0||r&&(e.extra||e.spareCounts.length>0)?c("div",{className:"border-b border-line pb-[26px]",children:[e.packs.length>0&&c(g,{children:[t("div",{className:"mb-3.5 font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.22em] text-fg",children:"How many"}),t("div",{className:"flex flex-wrap gap-1.5",children:t(x,{hero:i,values:e.packs,item:l=>({label:l.label}),picked:l=>o.unit===l.value,press:l=>()=>s(n=>({...n,unit:l.value}))})})]}),r&&e.extra&&c("label",{className:`${e.packs.length>0?"mt-3.5 ":""}flex cursor-pointer items-center gap-3 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.16em] text-fg`,children:[t("input",{type:"checkbox",checked:o.spares>0,onChange:l=>s(n=>({...n,spares:l.target.checked?Ke:0})),className:"h-4 w-4 cursor-pointer accent-[var(--accent)]"}),e.extra.label]}),r&&e.spareCounts.length>0&&c(g,{children:[t("div",{className:"mb-3.5 font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.22em] text-fg",children:He.howMany}),t("div",{className:"flex flex-col gap-1.5 sm:flex-row sm:flex-wrap",children:t(x,{hero:i,values:e.spareCounts,item:l=>({label:`${l.value} · ${l.label}`}),picked:l=>o.spares===l.value-ae,press:l=>()=>s(n=>({...n,spares:l.value-ae}))})})]}),r&&e.spareSide&&c(g,{children:[t("div",{className:"mb-3.5 mt-[26px] font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.22em] text-fg",children:e.spareSide.label}),t("div",{className:"flex flex-wrap gap-1.5",children:t(x,{hero:i,values:e.spareSide.options,item:l=>({label:l.label}),picked:l=>o.spareSide===l.value,press:l=>()=>s(n=>({...n,spareSide:l.value}))})})]})]}):null}function se({row:e,onPick:r,options:o}){const s=ee();if(e.values.length===0&&!e.empty)return null;const i=e.values.find(n=>n.value===e.chosen),l=i&&[i.label,i.note].filter(Boolean).join(" · ");return c("div",{className:"border-b border-line pb-[26px]",[je]:e.key,children:[c("div",{className:"mb-3.5 font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.22em] text-fg",children:[s(e.label)," · ",t("span",{className:"text-accent",children:l??s(e.prompt)})]}),e.values.length===0?c("p",{className:"font-mono text-[length:var(--size-body,12px)] leading-relaxed tracking-[0.1em] text-fg-dim",children:[e.empty.text," ",t(J,{href:e.empty.href,className:"text-accent hover:underline",children:e.empty.linkText})]}):e.display==="swatch"?t("div",{className:"flex flex-wrap gap-2 [&>*]:max-w-full",children:t(x,{hero:o,values:e.values,item:n=>({swatch:n.swatch??"",name:n.label}),picked:n=>n.value===e.chosen,press:n=>()=>r(e.key,n.value)})}):t("div",{className:"flex flex-wrap gap-1.5",children:t(x,{hero:o,values:e.values,item:n=>({label:n.label,note:n.note??""}),picked:n=>n.value===e.chosen,press:n=>()=>r(e.key,n.value)})})]})}function x({hero:e,values:r,item:o,picked:s,press:i}){const l=tt(r,{item:o,selected:s,press:i});return t(P,{children:t(C,{ownerId:e.nodeId,ownerType:I,slot:at,Template:e.template,rows:l.items.map(et),items:l.items,states:l.states,actions:e.editing?void 0:l.actions,pressTitles:e.pressTitles,fallback:null,children:n=>n})})}function bt({partNumbers:e,productSlug:r}){const[o,s]=Ee(""),{status:i,submit:l,reset:n}=$e();function y(){l({partNumbers:e,email:o,productSlug:r})}return i==="sent"?t("p",{className:"-mt-1 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em] text-accent",children:"We'll email you when it's back."}):t(Ce,{className:"-mt-1",email:o,onEmailChange:s,status:i,onResetVerdict:n,onSubmit:y,inputAriaLabel:"Email for the back-in-stock alert",submitLabel:"Notify me when back",buttonClassName:"cursor-pointer whitespace-nowrap border-2 border-btn px-4 font-mono text-[length:var(--size-label,11px)] font-bold uppercase tracking-[0.22em] text-btn transition-colors hover:bg-btn hover:text-btn-ink disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent disabled:hover:text-btn",errorMessage:"Couldn't save that — please try again."})}export{ft as default};
@@ -5,7 +5,7 @@ export type FooterLogoSource = {
5
5
  logoReversed?: string | null;
6
6
  logoInkIsDark?: boolean | null;
7
7
  };
8
- export default function PublishedFooter({ footerBlock, rootProps, headerSettings, siteName, legalName, foundedYear, socialLinks, }: {
8
+ declare function PublishedFooter({ footerBlock, rootProps, headerSettings, siteName, legalName, foundedYear, socialLinks, }: {
9
9
  footerBlock: FooterBlock;
10
10
  rootProps?: Record<string, unknown> | null;
11
11
  headerSettings?: FooterLogoSource | null;
@@ -14,3 +14,5 @@ export default function PublishedFooter({ footerBlock, rootProps, headerSettings
14
14
  foundedYear?: number | null;
15
15
  socialLinks?: SocialLinks;
16
16
  }): import("react").JSX.Element;
17
+ declare const _default: import("react").MemoExoticComponent<typeof PublishedFooter>;
18
+ export default _default;
@@ -1 +1 @@
1
- "use client";import{jsx as r}from"react/jsx-runtime";import{Render as p}from"efficient-easel/render";import d from"./PostListStartsProvider.js";import{postListStartsOf as f}from"../lib/content/post-list-continue.js";import{renderConfig as u}from"../lib/document/render-config.js";import{SITE_FOOTER_KIND as c}from"efficient-web-builder/format/lib/content/footer";import{PublishedFooterContext as I}from"efficient-web-builder/render/components/PublishedFooterContext";import{publishedChromeData as g}from"efficient-web-builder/render/lib/document/published-passes";import{EMPTY_SOCIAL_LINKS as k}from"efficient-web-builder/format/lib/content/social-links";function P({footerBlock:l,rootProps:e,headerSettings:o,siteName:i,legalName:n,foundedYear:m,socialLinks:a}){const t=g({root:{props:{...e??{},kind:c}},content:[l],zones:{}}),s=f(t);return r(I.Provider,{value:{logoUrl:o?.logoUrl??null,logoReversed:o?.logoReversed??null,logoInkIsDark:o?.logoInkIsDark??null,siteName:i,legalName:n??null,foundedYear:m??null,socialLinks:a??k},children:r(d,{starts:s.starts,posts:s.posts,children:r(p,{config:u(),data:t})})})}export{P as default};
1
+ "use client";import{jsx as r}from"react/jsx-runtime";import{memo as f}from"react";import{Render as d}from"efficient-easel/render";import{useRenderKeep as u}from"efficient-web-builder/render/lib/document/render-keep";import c from"./PostListStartsProvider.js";import{postListStartsOf as k}from"../lib/content/post-list-continue.js";import{renderConfig as I}from"../lib/document/render-config.js";import{SITE_FOOTER_KIND as g}from"efficient-web-builder/format/lib/content/footer";import{PublishedFooterContext as P}from"efficient-web-builder/render/components/PublishedFooterContext";import{publishedChromeData as v}from"efficient-web-builder/render/lib/document/published-passes";import{EMPTY_SOCIAL_LINKS as L}from"efficient-web-builder/format/lib/content/social-links";function R({footerBlock:s,rootProps:l,headerSettings:o,siteName:i,legalName:m,foundedYear:n,socialLinks:p}){const a=u(),t=v({root:{props:{...l??{},kind:g}},content:[s],zones:{}}),e=k(t);return r(P.Provider,{value:{logoUrl:o?.logoUrl??null,logoReversed:o?.logoReversed??null,logoInkIsDark:o?.logoInkIsDark??null,siteName:i,legalName:m??null,foundedYear:n??null,socialLinks:p??L},children:r(c,{starts:e.starts,posts:e.posts,children:r(d,{config:I(),data:t,keep:a})})})}var S=f(R);export{S as default};
@@ -1,4 +1,6 @@
1
1
  import type { FooterBlock } from "efficient-web-builder/format/lib/content/footer";
2
- export default function PublishedHeader({ group }: {
2
+ declare function PublishedHeader({ group }: {
3
3
  group: FooterBlock;
4
4
  }): import("react").JSX.Element;
5
+ declare const _default: import("react").MemoExoticComponent<typeof PublishedHeader>;
6
+ export default _default;
@@ -1 +1 @@
1
- "use client";import{jsx as r}from"react/jsx-runtime";import{Render as i}from"efficient-easel/render";import a from"./PostListStartsProvider.js";import{postListStartsOf as p}from"../lib/content/post-list-continue.js";import m from"./BoxHeaderBar.js";import{headerRenderConfig as d}from"../lib/document/render-config.js";import{headerBarOf as n}from"../lib/document/published-header-bar.js";import{publishedChromeData as f}from"efficient-web-builder/render/lib/document/published-passes";function h({group:s}){const o=f({root:{props:{}},content:[s],zones:{}}),t=n(o),e=p(o);return r(m,{sticky:t.sticky,topTextColor:t.topTextColor,heightPx:t.heightPx,theme:t.theme,bandCapped:t.bandCapped,children:r(a,{starts:e.starts,posts:e.posts,children:r(i,{config:d(),data:o})})})}export{h as default};
1
+ "use client";import{jsx as r}from"react/jsx-runtime";import{memo as p}from"react";import{Render as m}from"efficient-easel/render";import{useRenderKeep as a}from"efficient-web-builder/render/lib/document/render-keep";import n from"./PostListStartsProvider.js";import{postListStartsOf as d}from"../lib/content/post-list-continue.js";import f from"./BoxHeaderBar.js";import{headerRenderConfig as h}from"../lib/document/render-config.js";import{headerBarOf as c}from"../lib/document/published-header-bar.js";import{publishedChromeData as l}from"efficient-web-builder/render/lib/document/published-passes";function x({group:s}){const i=a(),o=l({root:{props:{}},content:[s],zones:{}}),t=c(o),e=d(o);return r(f,{sticky:t.sticky,topTextColor:t.topTextColor,heightPx:t.heightPx,theme:t.theme,bandCapped:t.bandCapped,children:r(n,{starts:e.starts,posts:e.posts,children:r(m,{config:h(),data:o,keep:i})})})}var H=p(x);export{H as default};
@@ -10,6 +10,7 @@ type FindStage = "form" | "sent" | "opening";
10
10
  export default function SignUpFind({ product, productName, startHref, inert }: SignUpFindProps): import("react").JSX.Element;
11
11
  interface SignUpFindViewProps {
12
12
  stage: FindStage;
13
+ focus?: FindStage;
13
14
  productName: string;
14
15
  startHref: string;
15
16
  email: string;
@@ -23,5 +24,5 @@ interface SignUpFindViewProps {
23
24
  onAnother?: () => void;
24
25
  onRetry?: () => void;
25
26
  }
26
- export declare function SignUpFindView({ stage, productName, startHref, email, wrong, trouble, linkGone, openTrouble, busy, onEmail, onSubmit, onAnother, onRetry, }: SignUpFindViewProps): import("react").JSX.Element;
27
+ export declare function SignUpFindView({ stage, focus, productName, startHref, email, wrong, trouble, linkGone, openTrouble, busy, onEmail, onSubmit, onAnother, onRetry, }: SignUpFindViewProps): import("react").JSX.Element;
27
28
  export {};
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as f,Fragment as O}from"react/jsx-runtime";import _ from"next/link";import{usePathname as C}from"next/navigation";import{useEffect as G,useId as L,useState as s}from"react";import{ApiError as j,askForWorkspaces as U,openWorkspaceFind as B}from"../lib/api/index.js";import{BANNER as v,CARD as E,PRIMARY as P,QUIET as N,TITLE as A}from"../lib/sections/sign-up-look.js";import{FIND_WORDS as t,SIGN_UP_WORDS as g,checkWaitingEmail as M,fill as V,findTokenOf as H,readFindOpenTrouble as Q,readFindRefusal as Y}from"../lib/sections/sign-up.js";function q({product:p,productName:y,startHref:h,inert:m=!1}){const n=m?"":H(C()),[b,i]=s(n?"opening":"form"),[r,x]=s(""),[k,u]=s(null),[F,d]=s(null),[o,c]=s(!1),[S,$]=s(null),[D,I]=s(0),[w,T]=s(!1);return G(()=>{if(!n)return;let l=!1;return B(n).then(a=>{l||(a?window.location.assign(a):(c(!0),i("form")))}).catch(a=>{l||($(a instanceof j?Q(a.status):"failed"),i("form"))}),()=>{l=!0}},[n,D]),e(z,{stage:b,productName:y,startHref:h,email:r,wrong:k,trouble:F,linkGone:o,openTrouble:S,busy:w,onEmail:l=>{x(l),u(null),d(null)},onSubmit:async l=>{if(l.preventDefault(),m||w)return;const a=M(r);if(u(a),d(null),!a){T(!0);try{await U(p,r),c(!1),$(null),i("sent")}catch(R){const W=R instanceof j?Y(R.status,R.data):{email:null,trouble:"failed"};u(W.email),d(W.trouble)}finally{T(!1)}}},onAnother:()=>i("form"),onRetry:()=>{$(null),i("opening"),I(l=>l+1)}})}function z({stage:p,productName:y,startHref:h,email:m,wrong:n,trouble:b,linkGone:i=!1,openTrouble:r=null,busy:x=!1,onEmail:k,onSubmit:u,onAnother:F,onRetry:d}){const o=L();if(p==="opening")return e("div",{className:E,role:"status",children:e("p",{className:N,children:t.opening})});if(p==="sent"){const[c,S]=t.sentBody.split("{email}");return f("div",{className:E,children:[e("h2",{className:A,children:t.sentTitle}),f("p",{className:"mt-[10px]",children:[c,e("span",{className:"font-medium",children:m.trim()}),S]}),e("p",{className:`${N} mt-[10px]`,children:t.sentNote}),e("button",{type:"button",onClick:F,className:"mt-[18px] flex h-11 w-full cursor-pointer items-center justify-center rounded-[10px] border border-line font-medium text-fg",children:t.another})]})}return f("form",{noValidate:!0,onSubmit:u,className:E,children:[e("h2",{className:A,children:t.title}),r?f(O,{children:[e("p",{role:"alert",className:`${v} mt-[10px]`,children:r==="unreachable"||r==="tooMany"?g.trouble[r]:t.openFailed}),e("button",{type:"button",onClick:d,className:"mt-3 flex h-11 w-full cursor-pointer items-center justify-center rounded-[10px] border border-line font-medium text-fg",children:t.retry})]}):i?e("p",{role:"alert",className:`${v} mt-[10px]`,children:t.linkGone}):e("p",{className:`${N} mt-1`,children:t.intro}),e("label",{htmlFor:`${o}-email`,className:"mb-1 mt-3 block text-[13px] font-medium",children:g.email}),e("div",{className:`flex h-11 items-center rounded-[10px] border bg-bg px-3 ${n?"border-alert":"border-line focus-within:border-accent"}`,children:e("input",{id:`${o}-email`,name:"email",type:"email",autoComplete:"email",maxLength:254,value:m,"aria-invalid":n?!0:void 0,"aria-describedby":n?`${o}-email-said`:void 0,onChange:c=>k?.(c.target.value),className:"h-full w-full bg-transparent text-[14px] text-fg outline-none focus-visible:outline-none!"})}),n&&e("p",{id:`${o}-email-said`,role:"alert",className:"mt-1 text-[13px] text-alert",children:n}),b&&e("p",{role:"alert",className:v,children:g.trouble[b]}),e("button",{type:"submit",disabled:x,className:P,children:x?g.sending:t.submit}),h&&f("p",{className:`${N} mt-3 text-center`,children:[V(t.newHere,{name:y})," ",e(_,{href:h,className:"text-accent",children:t.create})]})]})}export{z as SignUpFindView,q as default};
1
+ "use client";import{jsx as e,jsxs as x,Fragment as L}from"react/jsx-runtime";import U from"next/link";import{usePathname as B}from"next/navigation";import{useEffect as A,useId as P,useRef as D,useState as l}from"react";import{ApiError as O,askForWorkspaces as M,openWorkspaceFind as V}from"../lib/api/index.js";import{BANNER as w,CARD as I,PRIMARY as H,QUIET as g,TITLE as _}from"../lib/sections/sign-up-look.js";import{FIND_WORDS as t,SIGN_UP_WORDS as y,checkWaitingEmail as Q,fill as Y,findTokenOf as q,readFindOpenTrouble as z,readFindRefusal as J}from"../lib/sections/sign-up.js";function K({product:o,productName:k,startHref:F,inert:d=!1}){const c=d?"":q(B()),[m,r]=l(c?"opening":"form"),[$,s]=l(),[u,R]=l(""),[S,f]=l(null),[v,a]=l(null),[N,p]=l(!1),[h,b]=l(null),[C,G]=l(0),[T,W]=l(!1);return A(()=>{if(!c)return;let n=!1;return V(c).then(i=>{n||(i?window.location.assign(i):(p(!0),r("form")))}).catch(i=>{n||(b(i instanceof O?z(i.status):"failed"),r("form"))}),()=>{n=!0}},[c,C]),e(X,{stage:m,focus:$,productName:k,startHref:F,email:u,wrong:S,trouble:v,linkGone:N,openTrouble:h,busy:T,onEmail:n=>{R(n),f(null),a(null)},onSubmit:async n=>{if(n.preventDefault(),d||T)return;const i=Q(u);if(f(i),a(null),!i){W(!0);try{await M(o,u),p(!1),b(null),s("sent"),r("sent")}catch(E){const j=E instanceof O?J(E.status,E.data):{email:null,trouble:"failed"};f(j.email),a(j.trouble)}finally{W(!1)}}},onAnother:()=>{s("form"),r("form")},onRetry:()=>{b(null),s(void 0),r("opening"),G(n=>n+1)}})}function X({stage:o,focus:k,productName:F,startHref:d,email:c,wrong:m,trouble:r,linkGone:$=!1,openTrouble:s=null,busy:u=!1,onEmail:R,onSubmit:S,onAnother:f,onRetry:v}){const a=P(),N=D(null),p=D(null);if(A(()=>{k===o&&(o==="sent"?N:p).current?.focus()},[o]),o==="opening")return e("div",{className:I,role:"status",children:e("p",{className:g,children:t.opening})});if(o==="sent"){const[h,b]=t.sentBody.split("{email}");return x("div",{className:I,children:[e("h2",{ref:N,tabIndex:-1,className:`${_} outline-none`,children:t.sentTitle}),x("p",{className:"mt-[10px]",children:[h,e("span",{className:"font-medium",children:c.trim()}),b]}),e("p",{className:`${g} mt-[10px]`,children:t.sentNote}),e("button",{type:"button",onClick:f,className:"mt-[18px] flex h-11 w-full cursor-pointer items-center justify-center rounded-[10px] border border-line font-medium text-fg",children:t.another})]})}return x("form",{noValidate:!0,onSubmit:S,className:I,children:[e("h2",{className:_,children:t.title}),s?x(L,{children:[e("p",{role:"alert",className:`${w} mt-[10px]`,children:s==="unreachable"||s==="tooMany"?y.trouble[s]:t.openFailed}),e("button",{type:"button",onClick:v,className:"mt-3 flex h-11 w-full cursor-pointer items-center justify-center rounded-[10px] border border-line font-medium text-fg",children:t.retry})]}):$?e("p",{role:"alert",className:`${w} mt-[10px]`,children:t.linkGone}):e("p",{className:`${g} mt-1`,children:t.intro}),e("label",{htmlFor:`${a}-email`,className:"mb-1 mt-3 block text-[13px] font-medium",children:y.email}),e("div",{className:`flex h-11 items-center rounded-[10px] border bg-bg px-3 ${m?"border-alert":"border-line focus-within:border-accent"}`,children:e("input",{ref:p,id:`${a}-email`,name:"email",type:"email",autoComplete:"email",maxLength:254,value:c,"aria-invalid":m?!0:void 0,"aria-describedby":m?`${a}-email-said`:void 0,onChange:h=>R?.(h.target.value),className:"h-full w-full bg-transparent text-[14px] text-fg outline-none focus-visible:outline-none!"})}),m&&e("p",{id:`${a}-email-said`,role:"alert",className:"mt-1 text-[13px] text-alert",children:m}),r&&e("p",{role:"alert",className:w,children:y.trouble[r]}),e("button",{type:"submit",disabled:u,className:H,children:u?y.sending:t.submit}),d&&x("p",{className:`${g} mt-3 text-center`,children:[Y(t.newHere,{name:F})," ",e(U,{href:d,className:"text-accent",children:t.create})]})]})}export{X as SignUpFindView,K as default};
@@ -17,6 +17,7 @@ type Stage = "form" | "sent" | "closed";
17
17
  export default function SignUp(props: SignUpProps): import("react").JSX.Element;
18
18
  interface SignUpViewProps {
19
19
  stage: Stage;
20
+ focus?: Stage;
20
21
  product?: string;
21
22
  onOpen?: () => void;
22
23
  productName: string;
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as x,Fragment as K}from"react/jsx-runtime";import le from"next/link";import{usePathname as ce}from"next/navigation";import{useEffect as P,useId as J,useMemo as ee,useRef as oe,useState as m}from"react";import Q from"efficient-web-builder/render/components/BlockFrame";import{userZone as ue}from"efficient-shell/format";import{ApiError as ne,askToSignUp as de,fetchSignUpAvailability as te,joinSignUpWaitingList as me}from"../lib/api/index.js";import fe from"./SignUpFind.js";import he from"./SignUpLink.js";import{BANNER as X,CARD as Z,PRIMARY as re,QUIET as E,TITLE as q}from"../lib/sections/sign-up-look.js";import{ROW_INPUT_CLASS as pe}from"../lib/field-input.js";import{COUNTRY_CURRENCY as ge}from"../lib/sections/sign-up-catalogue.js";import{CHECK_AFTER_MS as be,EMPTY_DRAFT as Ne,SIGN_UP_WORDS as n,addressSuffix as ae,checkDraft as ye,checkWaitingEmail as xe,countryChoices as ve,currencyChoices as $e,fill as D,linkEnds as Se,linkTokenOf as ke,normaliseSlug as Ce,readSignUpRefusal as Ue,readWaitingRefusal as Re,signUpBody as Te,slugCheckOf as Ae,slugFromName as Ee}from"../lib/sections/sign-up.js";function Oe(t){return t.mode==="find"?e(Q,{contained:t.contained,className:"py-6",children:e(fe,{product:t.product,productName:t.productName,startHref:"/start",inert:!!t.sample})}):e(_e,{...t})}function _e({product:t,productName:a,freeLine:l,zone:i,askCountry:o,termsHref:u,privacyHref:c,findHref:s,contained:y,sample:p}){const[g,f]=m(p??Ne),[U,R]=m(!1),[B,O]=m({}),[T,S]=m(null),[b,h]=m("form"),[G,H]=m(null),[F,L]=m(!1),[_,j]=m(!1),[A,W]=m(()=>ae(i,"")),r=ke(ce()),k=!!r&&!p,w=we(t,g.slug,!!p||k);P(()=>{W(ae(i,window.location.hostname))},[i]),P(()=>{if(p||k)return;let d=!1;return te(t).then(N=>{d||(N.open||h("closed"),f(v=>({...v,country:v.country||N.country,currency:v.currency||N.currency})))}).catch(()=>{}),()=>{d=!0}},[t,p,k]);const C=d=>{f(N=>({...N,...d})),O(N=>{const v={...N};for(const se of Object.keys(d))delete v[se];return v}),S(null)},$=async d=>{L(!0),S(null);try{H(await de(Te(g,t,o))),j(d),h("sent")}catch(N){const v=N instanceof ne?Ue(N.status,N.data):{fields:{},trouble:"failed"};v.trouble==="closed"?h("closed"):Object.keys(v.fields).length?(O(v.fields),h("form")):S(v.trouble)}finally{L(!1)}},I=d=>{if(d.preventDefault(),p||F)return;const N=ye(g,w);O(N),!Object.keys(N).length&&$(!1)};return k?e(Q,{contained:y,className:"py-6",children:e(he,{token:r,productName:a,suffix:A,startHref:"/start",findHref:s})}):e(Q,{contained:y,className:"py-6",children:e(Be,{stage:b,product:t,onOpen:()=>h("form"),productName:a,freeLine:l,suffix:A,askCountry:o,termsHref:u,privacyHref:c,findHref:s,draft:g,wrong:B,slug:w,trouble:T,busy:F,sent:G,resent:_,onChange:C,onCompany:d=>C(U?{company:d}:{company:d,slug:Ee(d)}),onSlug:d=>{R(!0),C({slug:Ce(d)})},onCountry:d=>C({country:d,currency:ge[d]??g.currency}),onSubmit:I,onAgain:()=>{$(!0)},onEdit:()=>{R(!0),S(null),h("form")}})})}function we(t,a,l){const[i,o]=m({slug:"",found:{state:"empty"}}),u=oe("");return P(()=>{if(l||!a)return;u.current=a;const c=window.setTimeout(()=>{te(t,a).then(s=>{u.current===a&&o({slug:a,found:Ae(s)})}).catch(()=>{u.current===a&&o({slug:a,found:{state:"unknown"}})})},be);return()=>window.clearTimeout(c)},[t,a,l]),l?{state:"available"}:a?i.slug===a?i.found:{state:"checking"}:{state:"empty"}}const M="flex h-11 items-center rounded-[10px] border bg-bg px-3",z="h-full w-full bg-transparent text-[14px] text-fg outline-none focus-visible:outline-none! placeholder:text-fg-dim",ie="flex h-11 w-full cursor-pointer items-center justify-center rounded-[10px] border font-medium text-fg disabled:cursor-wait disabled:opacity-60";function Be(t){const{stage:a,productName:l,findHref:i,trouble:o}=t,u=i?x("p",{className:`${E} mt-[10px] text-center`,children:[n.haveOne," ",e(le,{href:i,className:"text-accent",children:n.find})]}):null;return a==="closed"?e(He,{...t,children:u}):a==="sent"?e(Le,{...t}):e(De,{...t,trouble:o,children:u})}function Y({id:t,label:a,error:l,hint:i,children:o}){return x("div",{className:"min-w-0",children:[e("label",{htmlFor:t,className:"mb-1 mt-3 block text-[13px] font-medium",children:a}),o,l?e("p",{id:`${t}-said`,role:"alert",className:"mt-1 text-[13px] text-alert",children:l}):i&&e("p",{id:`${t}-said`,className:"mt-1 text-[13px]",children:i})]})}const V=t=>t?"border-alert":"border-line focus-within:border-accent";function De({productName:t,freeLine:a,suffix:l,askCountry:i,termsHref:o,privacyHref:u,draft:c,wrong:s,slug:y,trouble:p,busy:g=!1,locale:f,onChange:U,onCompany:R,onSlug:B,onCountry:O,onSubmit:T,children:S}){const b=J(),[h,G]=m(f!==void 0);P(()=>G(!0),[]);const H=r=>r?[{value:r,label:r}]:[],F=ee(()=>i?h?ve(c.country,f):H(c.country):[],[i,h,c.country,f]),L=ee(()=>i?h?$e(c.currency,f):H(c.currency):[],[i,h,c.currency,f]),_=(r,k,w,C,$)=>e(Y,{id:`${b}-${r}`,label:k,error:s[r],children:e("div",{className:`${M} ${V(s[r])}`,children:e("input",{id:`${b}-${r}`,name:r,type:w,autoComplete:C,maxLength:$,value:c[r],"aria-invalid":s[r]?!0:void 0,"aria-describedby":s[r]?`${b}-${r}-said`:void 0,onChange:I=>r==="company"?R?.(I.target.value):U?.({[r]:I.target.value}),className:z})})}),j=(r,k,w,C)=>e(Y,{id:`${b}-${r}`,label:k,error:s[r],children:e("div",{className:`${M} ${V(s[r])}`,children:e("select",{id:`${b}-${r}`,name:r,value:c[r],"aria-invalid":s[r]?!0:void 0,onChange:$=>C($.target.value),className:`${z} cursor-pointer`,children:w.map($=>e("option",{value:$.value,children:$.label},$.value))})})}),A=s.slug??(y.state==="problem"?n.slugProblem[y.problem]:void 0),W=y.state==="checking"?e("span",{className:"text-fg-dim",children:n.checking}):y.state==="available"?x("span",{className:"text-green",children:[e("span",{"aria-hidden":!0,children:"✓ "}),n.available]}):void 0;return x("form",{noValidate:!0,onSubmit:T,className:Z,children:[e("h2",{className:q,children:D(n.title,{name:t})}),a&&e("p",{className:`${E} mt-1`,children:a}),x("div",{className:"grid grid-cols-2 gap-[10px]",children:[_("firstName",n.firstName,"text","given-name",150),_("lastName",n.lastName,"text","family-name",150)]}),_("email",n.email,"email","email",254),_("company",n.company,"text","organization",200),e(Y,{id:`${b}-slug`,label:n.address,error:A,hint:W,children:x("div",{className:`${M} gap-2 ${V(A)}`,children:[e("input",{id:`${b}-slug`,name:"slug",type:"text",autoComplete:"off",autoCapitalize:"none",spellCheck:!1,maxLength:30,value:c.slug,"aria-invalid":A?!0:void 0,"aria-describedby":A||W?`${b}-slug-said`:void 0,onChange:r=>B?.(r.target.value),className:`${pe} h-full bg-transparent text-[14px] text-fg outline-none focus-visible:outline-none!`}),l&&e("span",{className:`${E} shrink-0`,children:l})]})}),i&&x(K,{children:[j("country",n.country,F,r=>O?.(r)),j("currency",n.currency,L,r=>U?.({currency:r})),e("p",{className:`${E} mt-[6px]`,children:n.countryHint})]}),p&&e("p",{role:"alert",className:X,children:n.trouble[p]}),e("button",{type:"submit",disabled:g,className:re,children:g?n.sending:n.submit}),e("p",{className:`${E} mt-3 text-center`,children:e(Fe,{termsHref:o,privacyHref:u})}),S]})}function He({product:t="",productName:a,children:l,onOpen:i}){const o=J(),[u,c]=m(""),[s,y]=m(null),[p,g]=m(null),[f,U]=m(!1),[R,B]=m(!1);return x("form",{noValidate:!0,onSubmit:async T=>{if(T.preventDefault(),f)return;const S=xe(u);if(y(S),g(null),!S){U(!0);try{await me(t,u),B(!0)}catch(b){const h=b instanceof ne?Re(b.status,b.data):{open:!1,email:null,trouble:"failed"};h.open&&i?.(),y(h.email),g(h.trouble)}finally{U(!1)}}},className:Z,children:[e("h2",{className:q,children:n.closedTitle}),x("p",{className:"mt-[10px]",children:[D(n.closedBody,{name:a})," ",R?"":n.closedLeave]}),R?e("p",{role:"status",className:"mt-[10px] font-medium",children:D(n.waitingDone,{email:u.trim()})}):x(K,{children:[e(Y,{id:`${o}-email`,label:n.email,error:s??void 0,children:e("div",{className:`${M} ${V(s??void 0)}`,children:e("input",{id:`${o}-email`,name:"email",type:"email",autoComplete:"email",maxLength:254,value:u,"aria-invalid":s?!0:void 0,"aria-describedby":s?`${o}-email-said`:void 0,onChange:T=>{c(T.target.value),y(null),g(null)},className:z})})}),p&&e("p",{role:"alert",className:X,children:n.trouble[p]}),e("button",{type:"submit",disabled:f,className:re,children:f?n.sending:n.tellMe})]}),l]})}function Fe({termsHref:t,privacyHref:a}){const l=(c,s)=>c?e("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:s}):s,[i,o,u]=n.agree.split(/\{terms\}|\{privacy\}/);return x(K,{children:[i,l(t,n.terms),o,l(a,n.privacy),u]})}function Le({draft:t,sent:a,trouble:l,busy:i=!1,resent:o=!1,locale:u,timeZone:c,onAgain:s,onEdit:y}){const[p,g]=D(n.sentBody,{company:t.company.trim()}).split("{email}"),f=Se(a?.expiresAt??"",u,c??ue()??"");return x("div",{className:Z,children:[e("h2",{className:q,children:n.sentTitle}),x("p",{className:"mt-[10px]",children:[p,e("span",{className:"font-medium",children:t.email.trim()}),g]}),f&&e("p",{className:`${E} mt-[10px]`,children:D(n.sentUntil,{when:f})}),l?e("p",{role:"alert",className:X,children:n.trouble[l]}):o&&!i&&e("p",{role:"status",className:`${E} mt-[10px]`,children:n.sentAgain}),e("button",{type:"button",disabled:i,onClick:s,className:`${ie} mt-[18px] border-line`,children:i?n.sendingAgain:n.sendAgain}),e("button",{type:"button",disabled:i,onClick:y,className:`${ie} mt-2 border-transparent`,children:n.change})]})}export{Be as SignUpView,Oe as default};
1
+ "use client";import{jsx as e,jsxs as y,Fragment as X}from"react/jsx-runtime";import ue from"next/link";import{usePathname as de}from"next/navigation";import{useEffect as D,useId as te,useMemo as re,useRef as Z,useState as f}from"react";import q from"efficient-web-builder/render/components/BlockFrame";import{userZone as me}from"efficient-shell/format";import{ApiError as ae,askToSignUp as fe,fetchSignUpAvailability as se,joinSignUpWaitingList as he}from"../lib/api/index.js";import pe from"./SignUpFind.js";import ge from"./SignUpLink.js";import{BANNER as z,CARD as J,PRIMARY as ie,QUIET as O,TITLE as ee}from"../lib/sections/sign-up-look.js";import{ROW_INPUT_CLASS as be}from"../lib/field-input.js";import{COUNTRY_CURRENCY as Ne}from"../lib/sections/sign-up-catalogue.js";import{CHECK_AFTER_MS as ye,EMPTY_DRAFT as xe,SIGN_UP_WORDS as n,addressSuffix as le,checkDraft as ve,checkWaitingEmail as $e,countryChoices as Se,currencyChoices as ke,fill as H,linkEnds as Ce,linkTokenOf as Ue,normaliseSlug as Re,readSignUpRefusal as Te,readWaitingRefusal as Ae,signUpBody as Ee,slugCheckOf as Oe,slugFromName as _e}from"../lib/sections/sign-up.js";function we(t){return t.mode==="find"?e(q,{contained:t.contained,className:"py-6",children:e(pe,{product:t.product,productName:t.productName,startHref:"/start",inert:!!t.sample})}):e(Be,{...t})}function Be({product:t,productName:a,freeLine:l,zone:s,askCountry:o,termsHref:u,privacyHref:c,findHref:i,contained:b,sample:h}){const[p,$]=f(h??xe),[N,x]=f(!1),[F,_]=f({}),[R,k]=f(null),[T,d]=f("form"),[L,A]=f(),[Q,j]=f(null),[I,W]=f(!1),[w,P]=f(!1),[E,M]=f(()=>le(s,"")),r=Ue(de()),C=!!r&&!h,B=De(t,p.slug,!!h||C);D(()=>{M(le(s,window.location.hostname))},[s]),D(()=>{if(h||C)return;let m=!1;return se(t).then(g=>{m||(g.open||d("closed"),$(v=>({...v,country:v.country||g.country,currency:v.currency||g.currency})))}).catch(()=>{}),()=>{m=!0}},[t,h,C]);const U=m=>{$(g=>({...g,...m})),_(g=>{const v={...g};for(const oe of Object.keys(m))delete v[oe];return v}),k(null)},S=async m=>{W(!0),k(null);try{j(await fe(Ee(p,t,o))),P(m),m||A("sent"),d("sent")}catch(g){const v=g instanceof ae?Te(g.status,g.data):{fields:{},trouble:"failed"};v.trouble==="closed"?d("closed"):Object.keys(v.fields).length?(_(v.fields),d("form")):k(v.trouble)}finally{W(!1)}},Y=m=>{if(m.preventDefault(),h||I)return;const g=ve(p,B);_(g),!Object.keys(g).length&&S(!1)};return C?e(q,{contained:b,className:"py-6",children:e(ge,{token:r,productName:a,suffix:E,startHref:"/start",findHref:i})}):e(q,{contained:b,className:"py-6",children:e(Fe,{stage:T,focus:L,product:t,onOpen:()=>d("form"),productName:a,freeLine:l,suffix:E,askCountry:o,termsHref:u,privacyHref:c,findHref:i,draft:p,wrong:F,slug:B,trouble:R,busy:I,sent:Q,resent:w,onChange:U,onCompany:m=>U(N?{company:m}:{company:m,slug:_e(m)}),onSlug:m=>{x(!0),U({slug:Re(m)})},onCountry:m=>U({country:m,currency:Ne[m]??p.currency}),onSubmit:Y,onAgain:()=>{S(!0)},onEdit:()=>{x(!0),k(null),A("form"),d("form")}})})}function De(t,a,l){const[s,o]=f({slug:"",found:{state:"empty"}}),u=Z("");return D(()=>{if(l||!a)return;u.current=a;const c=window.setTimeout(()=>{se(t,a).then(i=>{u.current===a&&o({slug:a,found:Oe(i)})}).catch(()=>{u.current===a&&o({slug:a,found:{state:"unknown"}})})},ye);return()=>window.clearTimeout(c)},[t,a,l]),l?{state:"available"}:a?s.slug===a?s.found:{state:"checking"}:{state:"empty"}}const V="flex h-11 items-center rounded-[10px] border bg-bg px-3",ne="h-full w-full bg-transparent text-[14px] text-fg outline-none focus-visible:outline-none! placeholder:text-fg-dim",ce="flex h-11 w-full cursor-pointer items-center justify-center rounded-[10px] border font-medium text-fg disabled:cursor-wait disabled:opacity-60";function Fe(t){const{stage:a,productName:l,findHref:s,trouble:o}=t,u=s?y("p",{className:`${O} mt-[10px] text-center`,children:[n.haveOne," ",e(ue,{href:s,className:"text-accent",children:n.find})]}):null;return a==="closed"?e(Le,{...t,children:u}):a==="sent"?e(Ie,{...t}):e(He,{...t,trouble:o,children:u})}function G({id:t,label:a,error:l,hint:s,children:o}){return y("div",{className:"min-w-0",children:[e("label",{htmlFor:t,className:"mb-1 mt-3 block text-[13px] font-medium",children:a}),o,l?e("p",{id:`${t}-said`,role:"alert",className:"mt-1 text-[13px] text-alert",children:l}):s&&e("p",{id:`${t}-said`,className:"mt-1 text-[13px]",children:s})]})}const K=t=>t?"border-alert":"border-line focus-within:border-accent";function He({productName:t,freeLine:a,suffix:l,askCountry:s,termsHref:o,privacyHref:u,draft:c,wrong:i,slug:b,trouble:h,busy:p=!1,focus:$,locale:N,onChange:x,onCompany:F,onSlug:_,onCountry:R,onSubmit:k,children:T}){const d=te(),L=Z(null);D(()=>{$==="form"&&L.current?.focus()},[]);const[A,Q]=f(N!==void 0);D(()=>Q(!0),[]);const j=r=>r?[{value:r,label:r}]:[],I=re(()=>s?A?Se(c.country,N):j(c.country):[],[s,A,c.country,N]),W=re(()=>s?A?ke(c.currency,N):j(c.currency):[],[s,A,c.currency,N]),w=(r,C,B,U,S)=>e(G,{id:`${d}-${r}`,label:C,error:i[r],children:e("div",{className:`${V} ${K(i[r])}`,children:e("input",{ref:r==="firstName"?L:void 0,id:`${d}-${r}`,name:r,type:B,autoComplete:U,maxLength:S,value:c[r],"aria-invalid":i[r]?!0:void 0,"aria-describedby":i[r]?`${d}-${r}-said`:void 0,onChange:Y=>r==="company"?F?.(Y.target.value):x?.({[r]:Y.target.value}),className:ne})})}),P=(r,C,B,U)=>e(G,{id:`${d}-${r}`,label:C,error:i[r],children:e("div",{className:`${V} ${K(i[r])}`,children:e("select",{id:`${d}-${r}`,name:r,value:c[r],"aria-invalid":i[r]?!0:void 0,onChange:S=>U(S.target.value),className:`${ne} cursor-pointer`,children:B.map(S=>e("option",{value:S.value,children:S.label},S.value))})})}),E=i.slug??(b.state==="problem"?n.slugProblem[b.problem]:void 0),M=b.state==="checking"?e("span",{className:"text-fg-dim",children:n.checking}):b.state==="available"?y("span",{className:"text-green",children:[e("span",{"aria-hidden":!0,children:"✓ "}),n.available]}):void 0;return y("form",{noValidate:!0,onSubmit:k,className:J,children:[e("h2",{className:ee,children:H(n.title,{name:t})}),a&&e("p",{className:`${O} mt-1`,children:a}),y("div",{className:"grid grid-cols-2 gap-[10px]",children:[w("firstName",n.firstName,"text","given-name",150),w("lastName",n.lastName,"text","family-name",150)]}),w("email",n.email,"email","email",254),w("company",n.company,"text","organization",200),e(G,{id:`${d}-slug`,label:n.address,error:E,hint:M,children:y("div",{className:`${V} gap-2 ${K(E)}`,children:[e("input",{id:`${d}-slug`,name:"slug",type:"text",autoComplete:"off",autoCapitalize:"none",spellCheck:!1,maxLength:30,value:c.slug,"aria-invalid":E?!0:void 0,"aria-describedby":E||M?`${d}-slug-said`:void 0,onChange:r=>_?.(r.target.value),className:`${be} h-full bg-transparent text-[14px] text-fg outline-none focus-visible:outline-none!`}),l&&e("span",{className:`${O} shrink-0`,children:l})]})}),s&&y(X,{children:[P("country",n.country,I,r=>R?.(r)),P("currency",n.currency,W,r=>x?.({currency:r})),e("p",{className:`${O} mt-[6px]`,children:n.countryHint})]}),h&&e("p",{role:"alert",className:z,children:n.trouble[h]}),e("button",{type:"submit",disabled:p,className:ie,children:p?n.sending:n.submit}),e("p",{className:`${O} mt-3 text-center`,children:e(je,{termsHref:o,privacyHref:u})}),T]})}function Le({product:t="",productName:a,children:l,onOpen:s}){const o=te(),[u,c]=f(""),[i,b]=f(null),[h,p]=f(null),[$,N]=f(!1),[x,F]=f(!1);return y("form",{noValidate:!0,onSubmit:async R=>{if(R.preventDefault(),$)return;const k=$e(u);if(b(k),p(null),!k){N(!0);try{await he(t,u),F(!0)}catch(T){const d=T instanceof ae?Ae(T.status,T.data):{open:!1,email:null,trouble:"failed"};d.open&&s?.(),b(d.email),p(d.trouble)}finally{N(!1)}}},className:J,children:[e("h2",{className:ee,children:n.closedTitle}),y("p",{className:"mt-[10px]",children:[H(n.closedBody,{name:a})," ",x?"":n.closedLeave]}),x?e("p",{role:"status",className:"mt-[10px] font-medium",children:H(n.waitingDone,{email:u.trim()})}):y(X,{children:[e(G,{id:`${o}-email`,label:n.email,error:i??void 0,children:e("div",{className:`${V} ${K(i??void 0)}`,children:e("input",{id:`${o}-email`,name:"email",type:"email",autoComplete:"email",maxLength:254,value:u,"aria-invalid":i?!0:void 0,"aria-describedby":i?`${o}-email-said`:void 0,onChange:R=>{c(R.target.value),b(null),p(null)},className:ne})})}),h&&e("p",{role:"alert",className:z,children:n.trouble[h]}),e("button",{type:"submit",disabled:$,className:ie,children:$?n.sending:n.tellMe})]}),l]})}function je({termsHref:t,privacyHref:a}){const l=(c,i)=>c?e("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:i}):i,[s,o,u]=n.agree.split(/\{terms\}|\{privacy\}/);return y(X,{children:[s,l(t,n.terms),o,l(a,n.privacy),u]})}function Ie({draft:t,sent:a,trouble:l,busy:s=!1,resent:o=!1,focus:u,locale:c,timeZone:i,onAgain:b,onEdit:h}){const[p,$]=H(n.sentBody,{company:t.company.trim()}).split("{email}"),N=Ce(a?.expiresAt??"",c,i??me()??""),x=Z(null);return D(()=>{u==="sent"&&x.current?.focus()},[]),y("div",{className:J,children:[e("h2",{ref:x,tabIndex:-1,className:`${ee} outline-none`,children:n.sentTitle}),y("p",{className:"mt-[10px]",children:[p,e("span",{className:"font-medium",children:t.email.trim()}),$]}),N&&e("p",{className:`${O} mt-[10px]`,children:H(n.sentUntil,{when:N})}),l?e("p",{role:"alert",className:z,children:n.trouble[l]}):o&&!s&&e("p",{role:"status",className:`${O} mt-[10px]`,children:n.sentAgain}),e("button",{type:"button",disabled:s,onClick:b,className:`${ce} mt-[18px] border-line`,children:s?n.sendingAgain:n.sendAgain}),e("button",{type:"button",disabled:s,onClick:h,className:`${ce} mt-2 border-transparent`,children:n.change})]})}export{Fe as SignUpView,we as default};
@@ -1,5 +1,7 @@
1
1
  import type { ReactNode } from "react";
2
+ import { type ProductCardState } from "./ProductCardState.js";
2
3
  import { type CardTextRegion } from "./card-text-region.js";
4
+ export declare function cardNameWords(state: ProductCardState | null): string | null;
3
5
  export default function CardName({ children: name, region, fixedHeight, }: {
4
6
  children?: ReactNode;
5
7
  region?: CardTextRegion;
@@ -1 +1 @@
1
- "use client";import{jsx as t,jsxs as l}from"react/jsx-runtime";import{HideTaker as s}from"efficient-web-builder/render/components/ViewHideRoot";import{withRMark as c}from"efficient-web-builder/render/components/RMark";import{tyreModelLine as u}from"../../lib/tyres/tyre-brand-name.js";import{CARD_TEXT_SIZE as n,useCatalogCard as f}from"./card-row.js";import{useProductCardStateOrNull as p}from"./ProductCardState.js";import{RegionBridge as h,RegionWords as g,regionAttr as k}from"./card-text-region.js";function w({children:a,region:r,fixedHeight:m=!0}){const o=f(),e=p(),i=e?.kind==="wheel"?c(e.wheel.name):e?.kind==="bundle"?e.bundle.name:e?.kind==="tyre"?u(e.tyre.brand??"",e.tyre.name):null;a===void 0&&i===null&&process.env.NODE_ENV!=="production"&&console.warn("[CardName] no name given and no wheel card state: the name block is empty");const d=e?.kind==="tyre"?e.tyre.treadPattern?.trim():"";return l(h,{region:r,sectionType:"ProductName",children:[t(s,{...k(r,"name"),className:o&&!m?`font-heading3 ${n.headingSmall2} font-medium uppercase leading-none tracking-[-0.02em]`:o?`mt-2 h-[60px] overflow-hidden break-words [.sf-card-rows_&]:h-auto [.sf-card-rows_&]:max-h-[60px] font-heading3 ${n.headingSmall2} font-medium uppercase leading-none tracking-[-0.02em]`:`mt-2 font-heading3 ${n.headingSmall1} font-medium tracking-[-0.02em]`,children:t(g,{region:r,at:"name",children:a??i})}),d?t("div",{className:`sf-card-pattern mt-1 font-mono ${n.labelSmall} uppercase tracking-[0.18em] text-accent`,children:d}):null]})}export{w as default};
1
+ "use client";import{jsx as o,jsxs as l}from"react/jsx-runtime";import{HideTaker as c}from"efficient-web-builder/render/components/ViewHideRoot";import{withRMark as s}from"efficient-web-builder/render/components/RMark";import{tyreModelLine as u}from"../../lib/tyres/tyre-brand-name.js";import{CARD_TEXT_SIZE as r,useCatalogCard as f}from"./card-row.js";import{useProductCardStateOrNull as p}from"./ProductCardState.js";import{RegionBridge as h,RegionWords as g,regionAttr as k}from"./card-text-region.js";function w(e){return e?.kind==="wheel"?e.wheel.name:e?.kind==="bundle"?e.bundle.name:e?.kind==="tyre"?u(e.tyre.brand??"",e.tyre.name):null}function x({children:e,region:a,fixedHeight:m=!0}){const t=f(),n=p(),i=n?.kind==="wheel"?s(n.wheel.name):w(n);e===void 0&&i===null&&process.env.NODE_ENV!=="production"&&console.warn("[CardName] no name given and no wheel card state: the name block is empty");const d=n?.kind==="tyre"?n.tyre.treadPattern?.trim():"";return l(h,{region:a,sectionType:"ProductName",children:[o(c,{...k(a,"name"),className:t&&!m?`font-heading3 ${r.headingSmall2} font-medium uppercase leading-none tracking-[-0.02em]`:t?`mt-2 h-[60px] overflow-hidden break-words [.sf-card-rows_&]:h-auto [.sf-card-rows_&]:max-h-[60px] font-heading3 ${r.headingSmall2} font-medium uppercase leading-none tracking-[-0.02em]`:`mt-2 font-heading3 ${r.headingSmall1} font-medium tracking-[-0.02em]`,children:o(g,{region:a,at:"name",children:e??i})}),d?o("div",{className:`sf-card-pattern mt-1 font-mono ${r.labelSmall} uppercase tracking-[0.18em] text-accent`,children:d}):null]})}export{w as cardNameWords,x as default};
@@ -0,0 +1,7 @@
1
+ import type { ReactNode } from "react";
2
+ import { type CardTextRegion } from "./card-text-region.js";
3
+ export default function HeadlineEyebrow({ eyebrow, badge, region }: {
4
+ eyebrow: ReactNode;
5
+ badge: string | null;
6
+ region?: CardTextRegion;
7
+ }): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e,Fragment as o,jsxs as t}from"react/jsx-runtime";import{HideTaker as s}from"efficient-web-builder/render/components/ViewHideRoot";import{RegionBridge as a,RegionWords as c,regionAttr as l}from"./card-text-region.js";const d="mb-2.5 flex items-center gap-2.5 font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.2em] text-accent";function m({eyebrow:i,badge:n,region:r}){return e(a,{region:r,sectionType:"ProductEyebrow",children:e(s,{as:"div",...l(r,"eyebrow"),className:d,children:t(c,{region:r,at:"eyebrow",children:[e("span",{children:i}),n&&t(o,{children:[e("span",{children:"·"}),e("span",{children:n})]})]})})})}export{m as default};
@@ -0,0 +1,6 @@
1
+ import { type CardTextRegion } from "./card-text-region.js";
2
+ export default function HeadlineName({ name, accentLastWord, region, }: {
3
+ name: string;
4
+ region?: CardTextRegion;
5
+ accentLastWord: boolean;
6
+ }): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ "use client";import{jsxs as s,Fragment as o,jsx as a}from"react/jsx-runtime";import{HideTaker as c}from"efficient-web-builder/render/components/ViewHideRoot";import{RegionBridge as d,RegionWords as m,regionAttr as h}from"./card-text-region.js";const g=.72;function f(n,i=!0){const e=n.trim().split(/\s+/).filter(Boolean);if(e.length===0)return;const t=e.map((r,l)=>r.length+(i&&e.length>1&&l===e.length-1?1:0));return`calc(100cqi / ${(Math.max(...t)*g).toFixed(2)})`}const x="font-heading2 text-[length:min(min(var(--size-headingMedium,clamp(48px,5.5vw,84px)),var(--hero-name-fit,9999px)),var(--sf-heading-max,9999px))] [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] leading-[0.92] tracking-[-0.035em]";function p({name:n,accentLastWord:i,region:e}){const t=i?n.lastIndexOf(" "):-1,r=a(m,{region:e,at:"name",children:t===-1?n:s(o,{children:[n.slice(0,t)," ",s("em",{className:"font-normal italic text-accent",children:[n.slice(t+1),"."]})]})});return a(d,{region:e,sectionType:"ProductName",children:a(c,{as:"div",className:"w-full [container-type:inline-size]",children:a("h1",{...h(e,"name"),className:x,style:{"--hero-name-fit":f(n,i)},children:r})})})}export{p as default};
@@ -5,6 +5,8 @@ import { type PlpCardSelection } from "../wheels-plp/usePlpCardSelection.js";
5
5
  import type { Bundle, Tyre, TyreProductSummary, TyreVariant, WheelSummary } from "../../lib/api/index.js";
6
6
  import type { OptionFact } from "../../lib/catalog/product-options.js";
7
7
  import { type SelectionPriceDisplay } from "../../lib/wheels/price-display.js";
8
+ import type { StoreProduct } from "../../lib/catalog/store-product.js";
9
+ import type { ProductSelection } from "../useProductSelection.js";
8
10
  export interface WheelCardState {
9
11
  readonly kind: "wheel";
10
12
  readonly wheel: WheelSummary;
@@ -77,8 +79,18 @@ export interface HeroState {
77
79
  readonly name: string;
78
80
  } | null;
79
81
  readonly facts: readonly OptionFact[] | null;
82
+ readonly title: HeroTitle;
83
+ readonly product: StoreProduct;
84
+ readonly selection: ProductSelection;
85
+ readonly openLightbox: (src: string, alt: string) => void;
86
+ }
87
+ export interface HeroTitle {
88
+ readonly eyebrow: string;
89
+ readonly name: string;
90
+ readonly badge: string | null;
80
91
  }
81
92
  export declare function useHeroStateOrNull(): HeroState | null;
93
+ export declare function useNearestProduct(): Pick<HeroState, "product" | "selection" | "openLightbox"> | null;
82
94
  export declare function HeroStateProvider({ value, children }: {
83
95
  value: HeroState;
84
96
  children: ReactNode;
@@ -1 +1 @@
1
- "use client";import{jsx as l}from"react/jsx-runtime";import{createContext as O,useCallback as z,useContext as P,useMemo as A,useState as y}from"react";import{useCurrency as S}from"../CurrencyContext.js";import{useTyreDetail as B}from"../useTyreDetail.js";import{usePlpCardSelection as L}from"../wheels-plp/usePlpCardSelection.js";import{tyrePagePath as N}from"../../lib/tyres/tyre-page-path.js";import{canOrderTyreVariant as W}from"../../lib/tyres/tyre-purchase.js";import{resolveSelectionPrice as D}from"../../lib/wheels/price-display.js";import{setBuildLabel as T,setIsWide as j,summarySetBuild as E}from"../../lib/wheels/set-mode.js";function J(e,r=null){return{brand:e.brand,brandLogo:e.brandLogo,name:e.name,treadPattern:e.treadPattern,slug:e.slug,sizes:e.sizes,fitSize:r,rimDiameters:e.rimDiameters,prices:e.prices,image:e.coverImage}}const n=O(null);function K(){const e=P(n);return e?.kind==="hero"?e:null}function Q({value:e,children:r}){return l(n.Provider,{value:e,children:r})}function H(){const e=P(n);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=P(n);return e?.kind==="hero"?null:e}function Y(){const e=H();if(e.kind!=="wheel")throw new Error(`A wheel card piece was drawn on a ${e.kind} card.`);return e}const I=[];function Z({wheel:e,colours:r=I,defaultFinish:o,editing:a=!1,children:s}){const{currency:t}=S(),c=L(e,r,o),[p,f]=y(!1),d=E(e),u={kind:"wheel",wheel:e,sel:c,currency:t,price:D(e,c.selectedVariant,t,1),isSet:j(d),setWords:T(d),editing:a,notifyOpen:p,setNotifyOpen:f};return l(n.Provider,{value:u,children:s})}function ee({bundle:e,children:r}){const{currency:o}=S(),a={kind:"bundle",bundle:e,currency:o};return l(n.Provider,{value:a,children:r})}function re({tyre:e,currency:r,editing:o=!1,children:a}){const{currency:s}=S(),{slug:t}=e,c=N(t),[p,f]=y(!1),d=z(()=>{t&&f(!0)},[t]),{state:u,tyre:m}=B(t??null,p),i=A(()=>m?.variants??[],[m]),[x,g]=y(null),k=i.length===1?i[0].size:null,C=x??k,v=i.find(w=>w.size===C),h=u==="ready",b={kind:"tyre",tyre:e,currency:r??s,activeCurrency:s,pagePath:c,arm:d,detailState:u,detail:m,variants:i,chosen:C,setSize:g,variant:v,canAdd:v!=null&&W(v,s),detailReady:h,unsellable:!c||u==="error"||h&&i.length===0,editing:o};return l(n.Provider,{value:b,children:a})}export{ee as BundleCardStateProvider,Q as HeroStateProvider,re as TyreCardStateProvider,Z as WheelCardStateProvider,J as tyreCardProduct,K as useHeroStateOrNull,H as useProductCardState,X as useProductCardStateOrNull,Y as useWheelCardState};
1
+ "use client";import{jsx as l}from"react/jsx-runtime";import{createContext as L,useCallback as O,useContext as h,useMemo as z,useState as v}from"react";import{useCurrency as x}from"../CurrencyContext.js";import{useTyreDetail as N}from"../useTyreDetail.js";import{usePlpCardSelection as A}from"../wheels-plp/usePlpCardSelection.js";import{tyrePagePath as B}from"../../lib/tyres/tyre-page-path.js";import{canOrderTyreVariant as W}from"../../lib/tyres/tyre-purchase.js";import{resolveSelectionPrice as D}from"../../lib/wheels/price-display.js";import{setBuildLabel as T,setIsWide as j,summarySetBuild as E}from"../../lib/wheels/set-mode.js";import{useCurrentProduct as H}from"../../lib/document/current-product.js";function X(e,r=null){return{brand:e.brand,brandLogo:e.brandLogo,name:e.name,treadPattern:e.treadPattern,slug:e.slug,sizes:e.sizes,fitSize:r,rimDiameters:e.rimDiameters,prices:e.prices,image:e.coverImage}}const n=L(null);function I(){const e=h(n);return e?.kind==="hero"?e:null}function Y(){const e=I(),r=H();return e?{product:e.product,selection:e.selection,openLightbox:e.openLightbox}:r?{product:r.product,selection:r.selection,openLightbox:r.openLightbox}:null}function Z({value:e,children:r}){return l(n.Provider,{value:e,children:r})}function R(){const e=h(n);if(!e||e.kind==="hero")throw new Error("A product card piece was drawn outside a product card (no ProductCardState).");return e}function ee(){const e=h(n);return e?.kind==="hero"?null:e}function re(){const e=R();if(e.kind!=="wheel")throw new Error(`A wheel card piece was drawn on a ${e.kind} card.`);return e}const V=[];function te({wheel:e,colours:r=V,defaultFinish:o,editing:a=!1,children:s}){const{currency:t}=x(),c=A(e,r,o),[p,f]=v(!1),d=E(e),u={kind:"wheel",wheel:e,sel:c,currency:t,price:D(e,c.selectedVariant,t,1),isSet:j(d),setWords:T(d),editing:a,notifyOpen:p,setNotifyOpen:f};return l(n.Provider,{value:u,children:s})}function ne({bundle:e,children:r}){const{currency:o}=x(),a={kind:"bundle",bundle:e,currency:o};return l(n.Provider,{value:a,children:r})}function oe({tyre:e,currency:r,editing:o=!1,children:a}){const{currency:s}=x(),{slug:t}=e,c=B(t),[p,f]=v(!1),d=O(()=>{t&&f(!0)},[t]),{state:u,tyre:m}=N(t??null,p),i=z(()=>m?.variants??[],[m]),[S,g]=v(null),b=i.length===1?i[0].size:null,y=S??b,P=i.find(w=>w.size===y),C=u==="ready",k={kind:"tyre",tyre:e,currency:r??s,activeCurrency:s,pagePath:c,arm:d,detailState:u,detail:m,variants:i,chosen:y,setSize:g,variant:P,canAdd:P!=null&&W(P,s),detailReady:C,unsellable:!c||u==="error"||C&&i.length===0,editing:o};return l(n.Provider,{value:k,children:a})}export{ne as BundleCardStateProvider,Z as HeroStateProvider,oe as TyreCardStateProvider,te as WheelCardStateProvider,X as tyreCardProduct,I as useHeroStateOrNull,Y as useNearestProduct,R as useProductCardState,ee as useProductCardStateOrNull,re as useWheelCardState};
@@ -1 +1 @@
1
- "use client";import{jsx as o,Fragment as m,jsxs as c}from"react/jsx-runtime";import l from"../ProductGallery.js";import a from"../ProductLightbox.js";import{SECTION_NOTICE_TEXT_CLASS as p}from"../SectionNotice.js";import{heroView as d}from"../product-hero/hero-view.js";import{useRootIsDark as f}from"efficient-shell/theme";import{useLightbox as g}from"../useLightbox.js";import{useProductSelection as x}from"../useProductSelection.js";import{useCurrentProduct as h}from"../../lib/document/current-product.js";import{say as L}from"efficient-web-builder/format/lib/editor-words";import{useSampleProduct as S}from"./useSampleProduct.js";import{HideTaker as b}from"efficient-web-builder/render/components/ViewHideRoot";function y({editing:r=!1,...t}){const e=h();return e?o(n,{product:e.product,selection:e.selection,onLightbox:e.openLightbox,editing:r,...t}):r?o(I,{...t}):null}function n({product:r,selection:t,onLightbox:e,editing:i,...s}){const u=!f({whenUnset:!0});return o(l,{product:r,view:d(r,t,i),angleIdx:t.angleIdx,onSelect:t.setAngleIdx,isLight:u,onLightbox:e,...s,takesViewHide:!0})}function I(r){const t=S(!0);return t?o(P,{product:t,...r}):o(b,{as:"p",className:p,children:L("Loading sample product…")})}function P({product:r,...t}){const e=x(r,{editing:!0}),i=g();return c(m,{children:[o(n,{product:r,selection:e,onLightbox:i.open,editing:!0,...t}),o(a,{item:i.item,onClose:i.close})]})}export{y as default};
1
+ "use client";import{jsx as o,Fragment as m,jsxs as c}from"react/jsx-runtime";import l from"../ProductGallery.js";import a from"../ProductLightbox.js";import{SECTION_NOTICE_TEXT_CLASS as p}from"../SectionNotice.js";import{heroView as d}from"../product-hero/hero-view.js";import{useRootIsDark as f}from"efficient-shell/theme";import{useLightbox as g}from"../useLightbox.js";import{useProductSelection as x}from"../useProductSelection.js";import{useNearestProduct as h}from"../card-pieces/ProductCardState.js";import{say as L}from"efficient-web-builder/format/lib/editor-words";import{useSampleProduct as S}from"./useSampleProduct.js";import{HideTaker as b}from"efficient-web-builder/render/components/ViewHideRoot";function y({editing:e=!1,...t}){const r=h();return r?o(n,{product:r.product,selection:r.selection,onLightbox:r.openLightbox,editing:e,...t}):e?o(I,{...t}):null}function n({product:e,selection:t,onLightbox:r,editing:i,...s}){const u=!f({whenUnset:!0});return o(l,{product:e,view:d(e,t,i),angleIdx:t.angleIdx,onSelect:t.setAngleIdx,isLight:u,onLightbox:r,...s,takesViewHide:!0})}function I(e){const t=S(!0);return t?o(P,{product:t,...e}):o(b,{as:"p",className:p,children:L("Loading sample product…")})}function P({product:e,...t}){const r=x(e,{editing:!0}),i=g();return c(m,{children:[o(n,{product:e,selection:r,onLightbox:i.open,editing:!0,...t}),o(a,{item:i.item,onClose:i.close})]})}export{y as default};
@@ -1,28 +1,19 @@
1
- import type { ReactNode } from "react";
2
- import { type HeroPriceTemplateProps } from "../ProductHeroPanel.js";
1
+ import { type HeroTemplateProps } from "../ProductHeroPanel.js";
3
2
  import type { StoreProduct } from "../../lib/catalog/store-product.js";
4
- import type { HeroPricePlacement } from "../../lib/sections/hero-price-placement.js";
5
3
  import type { HeroLayout, HeroTextAlign } from "../../lib/sections/hero-arrangement.js";
6
- import type { HeroGalleryMode, HeroImageFit } from "../../lib/sections/hero-gallery.js";
7
- interface HeroArrangement extends HeroPriceTemplateProps {
4
+ interface HeroArrangement extends HeroTemplateProps {
8
5
  heroLayout?: HeroLayout;
9
6
  imageRatio?: number;
10
7
  textAlign?: HeroTextAlign;
11
8
  showSpecTable?: boolean;
12
- showPriceQuote?: boolean;
13
- galleryMode?: HeroGalleryMode;
14
- imageFit?: HeroImageFit;
15
- trustBullets?: ReactNode;
16
9
  }
17
10
  export declare const supportedKinds: readonly ("alloy-wheel" | "tyre")[];
18
- export default function DynamicProductHero({ editing, pricePlacement, showVehicleFitment, ...arrangement }: {
11
+ export default function DynamicProductHero({ editing, showVehicleFitment, ...arrangement }: {
19
12
  editing?: boolean;
20
- pricePlacement?: HeroPricePlacement;
21
13
  showVehicleFitment?: boolean;
22
14
  } & HeroArrangement): import("react").JSX.Element;
23
- export declare function SampleHeroLoaded({ product, pricePlacement, showVehicleFitment, ...arrangement }: {
15
+ export declare function SampleHeroLoaded({ product, showVehicleFitment, ...arrangement }: {
24
16
  product: StoreProduct;
25
- pricePlacement?: HeroPricePlacement;
26
17
  showVehicleFitment: boolean;
27
18
  } & HeroArrangement): import("react").JSX.Element;
28
19
  export {};
@@ -1 +1 @@
1
- "use client";import{jsx as t,Fragment as s,jsxs as u}from"react/jsx-runtime";import m from"../ProductHeroPanel.js";import l from"../ProductLightbox.js";import p from"../SectionNotice.js";import d from"./KindGate.js";import{useLightbox as a}from"../useLightbox.js";import{useProductSelection as f}from"../useProductSelection.js";import{PLP_KINDS as h}from"../../lib/catalog/plp-item.js";import{useCurrentProduct as P}from"../../lib/document/current-product.js";import{useSampleProduct as x}from"./useSampleProduct.js";import{say as g}from"efficient-web-builder/format/lib/editor-words";import{PRODUCT_HERO_TYPE as L}from"../../lib/document/document-nodes.js";const b=h;function S({editing:e=!1,pricePlacement:r,showVehicleFitment:i=!0,...o}){const n=P();return t(d,{kinds:b,type:L,editing:e,children:n?t(m,{product:n.product,selection:n.selection,onLightbox:n.openLightbox,editing:e,pricePlacement:r,showVehicleFitment:i,...o}):e?t(_,{pricePlacement:r,showVehicleFitment:i,...o}):t(p,{size:"tall",children:"Bound to the current product — preview on a product page."})})}function _({pricePlacement:e,showVehicleFitment:r,...i}){const o=x(!0);return o?t(F,{product:o,pricePlacement:e,showVehicleFitment:r,...i}):t(p,{size:"tall",children:g("Loading sample product…")})}function F({product:e,pricePlacement:r,showVehicleFitment:i,...o}){const n=f(e,{editing:!0}),c=a();return u(s,{children:[t(m,{product:e,selection:n,onLightbox:c.open,editing:!0,pricePlacement:r,showVehicleFitment:i,...o}),t(l,{item:c.item,onClose:c.close})]})}export{F as SampleHeroLoaded,S as default,b as supportedKinds};
1
+ "use client";import{jsx as t,Fragment as u,jsxs as m}from"react/jsx-runtime";import c from"../ProductHeroPanel.js";import p from"../ProductLightbox.js";import s from"../SectionNotice.js";import d from"./KindGate.js";import{useLightbox as l}from"../useLightbox.js";import{useProductSelection as a}from"../useProductSelection.js";import{PLP_KINDS as f}from"../../lib/catalog/plp-item.js";import{useCurrentProduct as h}from"../../lib/document/current-product.js";import{useSampleProduct as x}from"./useSampleProduct.js";import{say as g}from"efficient-web-builder/format/lib/editor-words";import{PRODUCT_HERO_TYPE as P}from"../../lib/document/document-nodes.js";const L=f;function b({editing:o=!1,showVehicleFitment:r=!0,...e}){const i=h();return t(d,{kinds:L,type:P,editing:o,children:i?t(c,{product:i.product,selection:i.selection,onLightbox:i.openLightbox,editing:o,showVehicleFitment:r,...e}):o?t(S,{showVehicleFitment:r,...e}):t(s,{size:"tall",children:"Bound to the current product — preview on a product page."})})}function S({showVehicleFitment:o,...r}){const e=x(!0);return e?t(_,{product:e,showVehicleFitment:o,...r}):t(s,{size:"tall",children:g("Loading sample product…")})}function _({product:o,showVehicleFitment:r,...e}){const i=a(o,{editing:!0}),n=l();return m(u,{children:[t(c,{product:o,selection:i,onLightbox:n.open,editing:!0,showVehicleFitment:r,...e}),t(p,{item:n.item,onClose:n.close})]})}export{_ as SampleHeroLoaded,b as default,L as supportedKinds};
@@ -0,0 +1,22 @@
1
+ import { type BlockSeed } from "efficient-web-builder/format/lib/document/seed-parts";
2
+ type Props = Record<string, unknown>;
3
+ export declare const HERO_GALLERY_BLOCK = "ProductGallery";
4
+ export declare const HERO_TEMPLATE_BLOCKS: readonly ["ProductGallery", "ProductEyebrow", "ProductName", "ProductPrice"];
5
+ export declare const HERO_PART: {
6
+ readonly fitmentLine: "fitment-line";
7
+ readonly options: "options";
8
+ readonly facts: "facts";
9
+ readonly howMany: "how-many";
10
+ readonly buy: "buy";
11
+ readonly notify: "notify";
12
+ readonly reminder: "reminder";
13
+ };
14
+ export declare function heroSeeds(props: Props, priceProps?: Props): BlockSeed[];
15
+ export declare const HERO_TEMPLATE_SHAPE_PROP = "templateShape";
16
+ export declare const HERO_TEMPLATE_SHAPE = "hero";
17
+ export declare function withHeroTemplate(props: Props): Props;
18
+ export declare function heroTemplateFollowsArrangement(props: Props, changed: Readonly<{
19
+ heroLayout?: boolean;
20
+ textAlign?: boolean;
21
+ }>): Props;
22
+ export {};
@@ -0,0 +1 @@
1
+ import{phoneKey as T}from"efficient-easel/draw";import{PART_MOTION_PROP as B}from"efficient-web-builder/render/lib/animation/part-motion";import{PART_STYLES_PROP as Y,readPartStyles as D}from"efficient-web-builder/render/lib/document/part-styles";import{BOX_TYPE as d,CONTAINER_BLOCKS_SLOT as y}from"efficient-web-builder/format/lib/document/container-blocks";import{INNER_BOX as k,boxPadding as G,seedNodes as F}from"efficient-web-builder/format/lib/document/seed-parts";import{CARD_TEMPLATE_SLOT as _}from"efficient-web-builder/format/lib/content/card-template";import{BOX_BLOCK_SPACING_POINTS as j}from"efficient-web-builder/format/lib/content/box-layout";import{say as p}from"efficient-web-builder/format/lib/editor-words";import{HIDDEN_KEY as C}from"efficient-easel/screen/lib/content/view-hide";import{isNode as X}from"efficient-easel/data";import{seedNodeId as v}from"./seed-ids.js";import{hostPartSeed as l}from"./host-part-seed.js";import{PRODUCT_EYEBROW_BLOCK as N,PRODUCT_NAME_BLOCK as x,PRODUCT_PRICE_BLOCK as E}from"./product-card-seed.js";import{PRODUCT_HERO_TYPE as Q}from"../document/document-nodes.js";import{parseHeroLayout as A,parseHeroTextAlign as H}from"../sections/hero-arrangement.js";import{parseHeroGalleryMode as W,parseHeroImageFit as $}from"../sections/hero-gallery.js";import{parseHeroPricePlacement as q}from"../sections/hero-price-placement.js";import{TRUST_BULLETS_SLOT as g}from"../sections/hero-trust-bullets.js";import{EYEBROW_BADGE_PROP as z,NAME_ACCENT_PROP as J,TITLE_LOOK_PROP as b}from"./title-look.js";const R="ProductGallery",he=[R,N,x,E],u={fitmentLine:"fitment-line",options:"options",facts:"facts",howMany:"how-many",buy:"buy",notify:"notify",reminder:"reminder"},V=28,M="@price";function Z(e){const{[M]:t,...r}=e&&typeof e=="object"?e:{};return{price:t,others:r}}const ee=j[0].value,L=(e,t,r={})=>({...k,name:e,gap:t,[T("gap")]:t,...G(0,0),blockSpacing:ee,...r});function te(e,t={}){const r=q(e.pricePlacement),o={type:E,props:I(e)?{...t,[C]:!0}:t},n={type:d,props:L("Stage",0),slots:{[y]:[{type:R,props:{galleryMode:W(e.galleryMode),imageFit:$(e.imageFit)}}]}},s={type:d,props:L("Buy column",V,H(e.textAlign)==="center"?{align:"center"}:{}),slots:{[y]:[{type:d,props:L("Title",0),slots:{[y]:[{type:N,props:{[b]:"headline",[z]:!0}},{type:x,props:{[b]:"headline",[J]:!0}}]}},...r==="top"?[o]:[],l(u.fitmentLine,p("Remembered car")),l(u.options,p("Options")),l(u.facts,p("Settled facts")),l(u.howMany,p("Quantity")),...r==="belowSpecs"?[o]:[],l(u.buy,p("Buy row")),l(u.notify,p("Notify me")),l(u.reminder,p("Reminder"))]}};return A(e.heroLayout)==="imageRight"?[s,n]:[n,s]}const I=e=>e.showPriceQuote===!1,re={sectionBorder:{top:1,style:"solid"}},K=20;function oe(e){return O(e).map((t,r)=>{if(r!==0)return t;const o={...t.props},n=i=>typeof i=="number"?i:void 0,s=n(t.props.sectionPaddingTop)??0;return o.sectionPaddingTop=K+s,o[T("sectionPaddingTop")]=K+(n(t.props[T("sectionPaddingTop")])??s),t.props.sectionBorder||Object.assign(o,re),{type:t.type,props:o}})}function O(e){return Array.isArray(e)?e.filter(t=>X(t)):[]}const U="templateShape",w="hero";function ne(e){const t=e[_];if(e[U]===w||!Array.isArray(t))return null;if(t.length===0)return[];const r=O(t);return r.length===t.length&&r.every(o=>o.type!==d)?r:null}function ie(e,t={},r=[],o){const n=v(e,Q),s=F(te(e,t),(c,m)=>`${n}~hero.${m}`);if(r.length===0&&!o)return s;const i=A(e.heroLayout)==="imageRight"?0:1;return s.map((c,m)=>{if(m!==i)return c;const P=f=>({...f,props:{...f.props,[C]:!0}}),a=o&&I(e)?o.map(P):o,S=c.props[y].flatMap(f=>a&&f.type===E?a.length>0?a:[P(f)]:[f]);return{...c,props:{...c.props,[y]:[...S,...r]}}})}function Se(e){const t=ne(e);if(e[_]!==void 0&&!t)return e;const r={...e,[U]:w},o={};for(const[n,s]of[[Y,D(e)],[B,e[B]]]){const{price:i,others:c}=Z(s);i&&(o[n]={[M]:i},Object.keys(c).length>0?r[n]=c:delete r[n])}return r[_]=ie(e,o,oe(e[g]),t??void 0),Array.isArray(e[g])&&(r[g]=[]),r}function h(e){if(e.type===R)return!0;const t=e.props[y];return Array.isArray(t)&&O(t).some(h)}function Be(e,t){const r=e[_];if(!t.heroLayout&&!t.textAlign||!Array.isArray(r)||r.length!==2)return e;const o=O(r);if(o.length!==2||o.some(a=>a.type!==d))return e;const n=o.findIndex(h);if(n===-1||h(o[1-n]))return e;const s=o[n];let i=o[1-n],c=!1;if(t.textAlign){const a=H(e.textAlign)==="center";if(a&&i.props.align!=="center")i={...i,props:{...i.props,align:"center"}},c=!0;else if(!a&&i.props.align==="center"){const{align:S,...f}=i.props;i={...i,props:f},c=!0}}const m=A(e.heroLayout)==="imageRight";if(t.heroLayout&&n===0===m&&(c=!0),!c)return e;const P=(t.heroLayout?m:n===1)?[i,s]:[s,i];return{...e,[_]:P}}export{R as HERO_GALLERY_BLOCK,u as HERO_PART,he as HERO_TEMPLATE_BLOCKS,w as HERO_TEMPLATE_SHAPE,U as HERO_TEMPLATE_SHAPE_PROP,te as heroSeeds,Be as heroTemplateFollowsArrangement,Se as withHeroTemplate};
@@ -0,0 +1,8 @@
1
+ export declare const TITLE_LOOK_PROP = "titleLook";
2
+ export declare const TITLE_LOOKS: readonly ["card", "headline"];
3
+ type TitleLook = (typeof TITLE_LOOKS)[number];
4
+ export declare const DEFAULT_TITLE_LOOK: TitleLook;
5
+ export declare const parseTitleLook: (v: unknown) => TitleLook;
6
+ export declare const NAME_ACCENT_PROP = "accentLastWord";
7
+ export declare const EYEBROW_BADGE_PROP = "showBadge";
8
+ export {};
@@ -0,0 +1 @@
1
+ const t="titleLook",c=["card","headline"],e="card",n=o=>o==="headline"?"headline":e,r="accentLastWord",L="showBadge";export{e as DEFAULT_TITLE_LOOK,L as EYEBROW_BADGE_PROP,r as NAME_ACCENT_PROP,c as TITLE_LOOKS,t as TITLE_LOOK_PROP,n as parseTitleLook};
@@ -1 +1 @@
1
- "use client";import{jsx as t}from"react/jsx-runtime";import{withRMark as l}from"efficient-web-builder/render/components/RMark";import a from"../../../../../components/card-pieces/CardEyebrow.js";import{readPartStyles as p}from"efficient-web-builder/render/lib/document/part-styles";import y from"../../../../../components/card-pieces/HostPart.js";import{useProductCardState as w}from"../../../../../components/card-pieces/ProductCardState.js";import{useGridCard as g}from"../../../../../components/GridCardTemplate.js";import{itemBrand as h,plpKindNoun as k}from"../../../../catalog/plp-item.js";import{productCardEyebrow as E,wheelCardEyebrow as C}from"../../../../../components/ProductCardEyebrow.js";import{keepForCard as P}from"../../../../content/field-usage.js";import{ProductEyebrowMeta as s}from"./meta.js";function v({region:r}){const e=w(),{fieldUsage:m,tyreFieldUsage:c,reserveEyebrow:d,eyebrow:n}=g();if(e.kind==="tyre"){const b=(n.tyreBrand??n.brand)&&P(c)("brand")&&e.tyre.brand||null,f=n.kindLabel?k(["tyre"]).one:null;return t(a,{reserve:d,region:r,children:E(f,b)})}const o=e.kind==="wheel"?e.wheel:null,i=o&&n.brand?h(o):null,u={kindLabel:o?n.kindLabel:null,brand:i?l(i):null,process:o&&n.process&&o.process?l(o.process):null};return t(a,{reserve:d,region:r,children:C(u,m)})}const I={...s,render:r=>{const e=!!r.editor?.isEditing;return t(y,{label:s.label??"",editing:e,children:t(v,{region:{nodeId:typeof r.id=="string"?r.id:void 0,partStyles:p(r),editing:e}})})}};export{I as ProductEyebrowRender};
1
+ "use client";import{Fragment as b,jsx as t}from"react/jsx-runtime";import{withRMark as s}from"efficient-web-builder/render/components/RMark";import f from"../../../../../components/card-pieces/CardEyebrow.js";import{readPartStyles as y}from"efficient-web-builder/render/lib/document/part-styles";import p from"../../../../../components/card-pieces/HostPart.js";import{useHeroStateOrNull as w,useProductCardStateOrNull as E}from"../../../../../components/card-pieces/ProductCardState.js";import g from"../../../../../components/card-pieces/HeadlineEyebrow.js";import{MarkedLabel as h}from"../../../../../components/product-hero/hero-view.js";import{EYEBROW_BADGE_PROP as k,TITLE_LOOK_PROP as P,parseTitleLook as C}from"../../../../content/title-look.js";import{useGridCard as m}from"../../../../../components/GridCardTemplate.js";import{itemBrand as L,plpKindNoun as O}from"../../../../catalog/plp-item.js";import{productCardEyebrow as _,wheelCardEyebrow as B}from"../../../../../components/ProductCardEyebrow.js";import{keepForCard as R}from"../../../../content/field-usage.js";import{ProductEyebrowMeta as c}from"./meta.js";function x(r){const{fieldUsage:e,tyreFieldUsage:l,eyebrow:o}=m();if(r.kind==="tyre"){const a=(o.tyreBrand??o.brand)&&R(l)("brand")&&r.tyre.brand||null,u=o.kindLabel?O(["tyre"]).one:null;return _(u,a)}const n=r.kind==="wheel"?r.wheel:null,d=n&&o.brand?L(n):null,i={kindLabel:n?o.kindLabel:null,brand:d?s(d):null,process:n&&o.process&&n.process?s(n.process):null};return B(i,e)}function F({state:r,children:e}){return t(b,{children:e(x(r),null)})}function H({props:r,region:e}){const l=w(),o=E(),{reserveEyebrow:n}=m(),d=C(r[P])==="headline",i=(a,u)=>d?t(g,{eyebrow:a,badge:r[k]===!0?u:null,region:e}):t(f,{reserve:n,region:e,children:a});return l?i(l.title.eyebrow?t(h,{text:l.title.eyebrow}):null,l.title.badge):o?t(F,{state:o,children:i}):null}const q={...c,render:r=>{const e=!!r.editor?.isEditing;return t(p,{label:c.label??"",editing:e,onHero:!0,children:t(H,{props:r,region:{nodeId:typeof r.id=="string"?r.id:void 0,partStyles:y(r),editing:e}})})}};export{q as ProductEyebrowRender};
@@ -12,9 +12,5 @@ export declare const ProductHeroSlots: {
12
12
  type: "slot";
13
13
  allow: ("Flex" | "ProductBuyButton")[];
14
14
  };
15
- trustBullets: {
16
- type: "slot";
17
- allow: string[];
18
- };
19
15
  };
20
16
  export declare const ProductHeroMeta: Omit<BlockRender, "render">;