efficient-storefront-blocks 0.89.0 → 0.91.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/chunks/{EditorPreviewCheckout-R7XG75DW.js → EditorPreviewCheckout-NFLTZCIQ.js} +1 -1
  3. package/dist/chunks/{SiteEditorProvider-YNUCDQ2D.js → SiteEditorProvider-UWRLDKJS.js} +1 -1
  4. package/dist/chunks/chunk-4VRLGKYU.js +387 -0
  5. package/dist/chunks/chunk-HRTZ7SYX.js +1 -0
  6. package/dist/chunks/chunk-PHQQRGQZ.js +1 -0
  7. package/dist/chunks/{chunk-E54FFOUS.js → chunk-YL2HPWVT.js} +1 -1
  8. package/dist/chunks/{fitment-data-URBK335I.js → fitment-data-6KHIA3AT.js} +1 -1
  9. package/dist/contract.js +3 -11
  10. package/dist/editor/components/GalleryPicturesSource.d.ts +33 -0
  11. package/dist/editor/components/GalleryPicturesSource.js +1 -0
  12. package/dist/editor/components/GalleryShowcaseSource.js +1 -1
  13. package/dist/editor/components/ProductSourceRows.d.ts +35 -0
  14. package/dist/editor/components/ProductSourceRows.js +1 -0
  15. package/dist/editor/components/ReviewsProductSource.js +1 -1
  16. package/dist/editor/lib/document/block-align-row.js +1 -1
  17. package/dist/editor/lib/document/blocks/commerce/GalleryB/fields.js +1 -1
  18. package/dist/editor/lib/document/blocks/commerce/GalleryItem/fields.js +1 -1
  19. package/dist/editor/lib/document/blocks/service/FooterDivider/fields.js +1 -1
  20. package/dist/editor/lib/document/blocks/service/index.d.ts +1 -1
  21. package/dist/editor/lib/document/config.d.ts +1 -0
  22. package/dist/editor/lib/document/config.js +1 -1
  23. package/dist/editor/lib/efficient-block-sources.js +1 -1
  24. package/dist/editor/lib/storefront-editor-words-kept.js +1 -0
  25. package/dist/editor/lib/storefront-editor-words.d.ts +7 -0
  26. package/dist/editor/lib/storefront-editor-words.js +1 -1
  27. package/dist/editor.css +1 -1
  28. package/dist/index.js +62 -43
  29. package/dist/links.js +1 -1
  30. package/dist/render/app/globals.css +10 -1
  31. package/dist/render/built-with.json +1 -1
  32. package/dist/render/components/AppointmentBooking.js +1 -1
  33. package/dist/render/components/ArticleBody.js +1 -1
  34. package/dist/render/components/BoxHeaderBar.js +1 -1
  35. package/dist/render/components/CollectionCard.d.ts +1 -1
  36. package/dist/render/components/CollectionCard.js +1 -1
  37. package/dist/render/components/ContactRouting.js +1 -1
  38. package/dist/render/components/EuTyreLabels.d.ts +2 -1
  39. package/dist/render/components/EuTyreLabels.js +1 -1
  40. package/dist/render/components/Events.js +1 -1
  41. package/dist/render/components/FooterDivider.d.ts +1 -2
  42. package/dist/render/components/FooterDivider.js +1 -1
  43. package/dist/render/components/FooterEmailSignup.js +1 -1
  44. package/dist/render/components/FooterGroup.js +1 -1
  45. package/dist/render/components/FooterLogo.js +1 -1
  46. package/dist/render/components/FooterMenu.d.ts +3 -1
  47. package/dist/render/components/FooterMenu.js +1 -1
  48. package/dist/render/components/FooterMessaging.js +1 -1
  49. package/dist/render/components/FooterPayment.js +1 -1
  50. package/dist/render/components/FooterSection.js +1 -1
  51. package/dist/render/components/FooterSocial.js +1 -1
  52. package/dist/render/components/FooterText.js +1 -1
  53. package/dist/render/components/GalleryCard.js +1 -1
  54. package/dist/render/components/GalleryGrid.d.ts +3 -1
  55. package/dist/render/components/GalleryGrid.js +3 -1
  56. package/dist/render/components/GalleryItem.d.ts +1 -0
  57. package/dist/render/components/GalleryItem.js +1 -1
  58. package/dist/render/components/GalleryShowcase.js +1 -1
  59. package/dist/render/components/GridCardTemplate.js +1 -1
  60. package/dist/render/components/HeaderNavItem.d.ts +1 -1
  61. package/dist/render/components/HeaderNavItem.js +1 -1
  62. package/dist/render/components/HeaderToolBlocks.js +1 -1
  63. package/dist/render/components/HeaderTools.d.ts +5 -3
  64. package/dist/render/components/HeaderTools.js +1 -1
  65. package/dist/render/components/LegalLine.js +1 -1
  66. package/dist/render/components/MenuLinkBlock.js +1 -1
  67. package/dist/render/components/MenuPlaceholderLabel.js +1 -1
  68. package/dist/render/components/ProductGallery.d.ts +2 -1
  69. package/dist/render/components/ProductGallery.js +1 -1
  70. package/dist/render/components/ProductRef.js +1 -1
  71. package/dist/render/components/PublishedFooter.js +1 -1
  72. package/dist/render/components/QuoteLink.d.ts +2 -1
  73. package/dist/render/components/QuoteLink.js +1 -1
  74. package/dist/render/components/RatingStars.js +1 -1
  75. package/dist/render/components/ReviewForm.js +1 -1
  76. package/dist/render/components/SectionBand.js +1 -1
  77. package/dist/render/components/SectionFootnote.d.ts +2 -1
  78. package/dist/render/components/SectionFootnote.js +1 -1
  79. package/dist/render/components/SectionGroupBody.js +1 -1
  80. package/dist/render/components/SectionNotice.js +1 -1
  81. package/dist/render/components/TyreFitVerdicts.js +1 -1
  82. package/dist/render/components/booking/BookingBox.js +1 -1
  83. package/dist/render/components/booking/BookingRegions.js +1 -1
  84. package/dist/render/components/card-pieces/CardBuyButton.d.ts +3 -1
  85. package/dist/render/components/card-pieces/CardBuyButton.js +1 -1
  86. package/dist/render/components/card-pieces/CardEyebrow.js +1 -1
  87. package/dist/render/components/card-pieces/CardName.js +1 -1
  88. package/dist/render/components/card-pieces/CardPrice.js +1 -1
  89. package/dist/render/components/card-pieces/CardProductPicture.js +1 -1
  90. package/dist/render/components/card-pieces/CardSpecs.js +1 -1
  91. package/dist/render/components/card-pieces/HostPart.js +1 -1
  92. package/dist/render/components/card-pieces/card-row.js +1 -1
  93. package/dist/render/components/catalog/ShopperChips.js +1 -1
  94. package/dist/render/components/catalog/ShopperFilters.js +1 -1
  95. package/dist/render/components/fitment/FitmentPickerGrid.js +1 -1
  96. package/dist/render/components/fitment/StockFitmentCard.js +1 -1
  97. package/dist/render/components/fitment/StockFitmentPart.js +1 -1
  98. package/dist/render/components/pdp-dynamic/DynamicEuTyreLabel.d.ts +4 -0
  99. package/dist/render/components/pdp-dynamic/DynamicEuTyreLabel.js +1 -1
  100. package/dist/render/components/pdp-dynamic/DynamicGalleryGrid.js +1 -1
  101. package/dist/render/components/pdp-dynamic/DynamicProductGallery.js +1 -1
  102. package/dist/render/components/pdp-dynamic/RecordPhotoGallery.d.ts +2 -1
  103. package/dist/render/components/pdp-dynamic/RecordPhotoGallery.js +1 -1
  104. package/dist/render/components/submit/SubmitBox.js +1 -1
  105. package/dist/render/lib/content/menu-card-seed.d.ts +4 -0
  106. package/dist/render/lib/content/menu-card-seed.js +1 -1
  107. package/dist/render/lib/content/menu-entry-type.d.ts +2 -0
  108. package/dist/render/lib/content/menu-entry-type.js +1 -0
  109. package/dist/render/lib/content/served-lists.d.ts +8 -0
  110. package/dist/render/lib/content/served-lists.js +1 -0
  111. package/dist/render/lib/document/blocks/commerce/GalleryB/render.js +1 -1
  112. package/dist/render/lib/document/blocks/commerce/ProductHero/render.js +1 -1
  113. package/dist/render/lib/document/blocks/commerce/ProductPrice/render.js +1 -1
  114. package/dist/render/lib/document/blocks/service/Events/render.js +1 -1
  115. package/dist/render/lib/document/blocks/service/FooterDivider/meta.js +1 -1
  116. package/dist/render/lib/document/blocks/service/FooterDivider/render.js +1 -1
  117. package/dist/render/lib/document/blocks/service/RatingBlock/render.js +1 -1
  118. package/dist/render/lib/document/card-templates.d.ts +2 -0
  119. package/dist/render/lib/document/card-templates.js +1 -1
  120. package/dist/render/lib/document/footer-page-blocks.js +1 -1
  121. package/dist/render/lib/document/lazy-draws.js +1 -1
  122. package/dist/render/lib/document/render-config.d.ts +1 -0
  123. package/dist/render/lib/document/render-config.js +1 -1
  124. package/dist/render/lib/document/section-to-box-rows-productgrid.d.ts +1 -0
  125. package/dist/render/lib/document/section-to-box-rows-productgrid.js +1 -0
  126. package/dist/render/lib/sections/product-pictures.d.ts +26 -0
  127. package/dist/render/lib/sections/product-pictures.js +1 -0
  128. package/dist/render/lib/sections/product-source.d.ts +8 -0
  129. package/dist/render/lib/sections/product-source.js +1 -0
  130. package/dist/render/lib/sections/reviews.js +1 -1
  131. package/dist/words.d.ts +18 -0
  132. package/dist/words.js +5 -5
  133. package/package.json +4 -3
  134. package/dist/chunks/chunk-BYBBZS7L.js +0 -1
  135. package/dist/chunks/chunk-G4Y7XXRV.js +0 -1
  136. package/dist/chunks/chunk-WRDUOJZO.js +0 -382
  137. package/dist/editor/lib/editor-words-kept.js +0 -1
  138. package/dist/render/lib/content/legacy-block-align.d.ts +0 -2
  139. package/dist/render/lib/content/legacy-block-align.js +0 -1
  140. /package/dist/chunks/{chunk-WRDUOJZO.js.LEGAL.txt → chunk-4VRLGKYU.js.LEGAL.txt} +0 -0
  141. /package/dist/chunks/{chunk-ZA3ULZOA.js → chunk-XMTQMRA3.js} +0 -0
  142. /package/dist/editor/lib/{editor-words-kept.d.ts → storefront-editor-words-kept.d.ts} +0 -0
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import{SAMPLE_CONFIRMATION as S,useBookingForm as z}from"./BookingFormState.js";import $ from"efficient-web-builder/render/components/Btn";import c from"../WebFormField.js";import{formatAppointment as w,formatAppointmentTime as T}from"../../lib/booking/appointment-time.js";import{formatMoneyInCurrency as B}from"../../lib/commerce.js";import{FREE_PRICE as A}from"../../lib/wheels/price-display.js";const d="w-full border-2 border-line bg-bg px-4 py-4 font-[family-name:var(--bk-value-font,var(--font-display))] text-[length:var(--bk-value-size,17px)] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent";function q(o,t){const a=Number(o);if(a===0)return A;try{return B(a,t)}catch{return`${t} ${o}`}}const p="font-[family-name:var(--bk-name-font,var(--font-mono))] text-[length:var(--bk-name-size,12px)]";function C({number:o,children:t}){return r("div",{className:"mb-4 flex items-center gap-3",children:[e("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full border border-line font-[family-name:var(--bk-step-font,var(--font-mono))] text-[length:var(--bk-step-size,11px)] font-semibold text-fg-dim",children:o}),e("h3",{className:"font-[family-name:var(--bk-step-font,var(--font-mono))] text-[length:var(--bk-step-size,12px)] font-semibold uppercase tracking-[0.2em] text-fg",children:t})]})}function j({eyebrow:o,heading:t,intro:a}){return r("div",{className:"mb-10 max-w-[760px]",children:[(o??"").trim()&&e("p",{className:"mb-4 font-mono text-[12px] font-semibold uppercase tracking-[0.24em] text-accent",children:o}),(t??"").trim()&&e("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.98] tracking-[-0.025em] text-fg max-view-wide:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:t}),(a??"").trim()&&e("p",{className:"mt-5 max-w-[660px] font-display text-[17px] leading-[1.65] text-fg-dim",children:a})]})}function R({style:o}={}){const{fieldPrefix:t,services:a,currency:u,serviceId:b,setServiceId:g,requiresPayment:x,date:h,earliestDate:v,setDate:k,setDateTouched:N,availability:i,loadingSlots:y,noSlotsMessage:s,selectedStart:f,setSelectedStart:l,customerTimezone:m}=z();return a?r("div",{className:"flex flex-col gap-10",style:o,children:[r("div",{children:[e(C,{number:"01",children:"Choose a service"}),e("div",{className:"grid gap-3 sm:grid-cols-2",children:a.map(n=>{const F=n.id===b;return r("button",{type:"button","aria-pressed":F,onClick:()=>g(n.id),className:`min-h-11 border p-4 text-left transition-colors ${F?"border-accent bg-accent/10":"border-line bg-bg hover:border-fg-dim"}`,children:[e("span",{className:"block font-[family-name:var(--bk-name-font,var(--font-display))] text-[length:var(--bk-name-size,18px)] font-medium text-fg",children:n.name}),r("span",{className:"mt-1 block font-[family-name:var(--bk-value-font,var(--font-mono))] text-[length:var(--bk-value-size,11px)] uppercase tracking-[0.14em] text-fg-dim",children:[n.durationMinutes," min · ",q(n.price,u)]}),n.description&&e("span",{className:"mt-3 block font-[family-name:var(--bk-note-font,var(--font-display))] text-[length:var(--bk-note-size,14px)] leading-[1.5] text-fg-dim",children:n.description})]},n.id)})}),x&&e("p",{className:"mt-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.14em] text-alert",role:"alert",children:"This service requires an upfront payment and cannot be booked through this form yet."})]}),r("div",{children:[e(C,{number:"02",children:"Choose a date and time"}),e(c,{separate:!0,htmlFor:`${t}-date`,label:"Date",required:!0,labelFace:p,children:e("input",{id:`${t}-date`,type:"date",min:v,value:h,onChange:n=>{N(!0),k(n.target.value)},className:d,required:!0})}),e("div",{className:"mt-4 grid grid-cols-2 gap-2 sm:grid-cols-3 min-[1200px]:grid-cols-4",role:"group","aria-label":"Available appointment times",children:y?e("p",{className:"col-span-full py-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.18em] text-fg-dim",children:"Loading times…"}):i?.slots.length?i.slots.map(n=>r("button",{type:"button","aria-pressed":f===n.start,onClick:()=>l(n.start),className:`min-h-11 border px-3 py-2 font-[family-name:var(--bk-value-font,var(--font-mono))] text-[length:var(--bk-value-size,12px)] font-semibold uppercase tracking-[0.12em] transition-colors ${f===n.start?"border-accent bg-accent text-bg":"border-line bg-bg text-fg hover:border-accent"}`,children:[e("span",{className:"block",children:T(n.start,m||i.timezone)}),m&&m!==i.timezone&&r("span",{className:"mt-0.5 block text-[9px] font-normal tracking-[0.08em] opacity-70",children:[T(n.start,i.timezone)," business"]})]},n.start)):s?e("p",{className:"col-span-full py-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.18em] text-fg-dim",role:"status",children:s}):null}),i?.timezone&&r("p",{className:"mt-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,10px)] uppercase tracking-[0.16em] text-fg-dim",children:["Times shown in ",m||i.timezone,m&&m!==i.timezone?` · business timezone ${i.timezone}`:""]})]})]}):null}function O({buttonLabel:o,style:t}){const{fieldPrefix:a,editing:u,name:b,setName:g,email:x,setEmail:h,phone:v,setPhone:k,notes:N,setNotes:i,submitting:y,error:s,canSubmit:f}=z();return r("div",{className:"sf-card border border-line bg-bg p-5 min-[640px]:p-8",style:t,children:[e(C,{number:"03",children:"Your details"}),r("div",{className:"flex flex-col gap-4",children:[e(c,{separate:!0,htmlFor:`${a}-name`,label:"Name",required:!0,labelFace:p,children:e("input",{id:`${a}-name`,type:"text",autoComplete:"name",value:b,onChange:l=>g(l.target.value),className:d,required:!0})}),e(c,{separate:!0,htmlFor:`${a}-email`,label:"Email",required:!0,labelFace:p,children:e("input",{id:`${a}-email`,type:"email",inputMode:"email",autoComplete:"email",value:x,onChange:l=>h(l.target.value),className:d,required:!0})}),e(c,{separate:!0,htmlFor:`${a}-phone`,label:"Phone",labelFace:p,children:e("input",{id:`${a}-phone`,type:"tel",inputMode:"tel",autoComplete:"tel",value:v,onChange:l=>k(l.target.value),className:d})}),e(c,{separate:!0,htmlFor:`${a}-notes`,label:"What would you like to cover?",labelFace:p,children:e("textarea",{id:`${a}-notes`,rows:4,value:N,onChange:l=>i(l.target.value),className:`${d} resize-y`})})]}),s&&e("p",{className:"mt-4 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.16em] text-alert",role:"alert",children:s}),e($,{type:u?"button":"submit",disabled:!f,arrow:null,className:"mt-6 w-full disabled:cursor-not-allowed disabled:opacity-50",children:y?"Submitting…":(o??"").trim()||"Book appointment"})]})}function U({successMessage:o}){const{confirmation:t,customerTimezone:a}=z();return t?r("div",{className:"sf-card max-w-[760px] border border-line bg-bg p-6 min-[640px]:p-10",role:"status",children:[r("p",{className:"font-mono text-[12px] font-semibold uppercase tracking-[0.22em] text-accent",children:["Request received · ",t.bookingNumber]}),e("h3",{className:"mt-4 font-display text-[28px] font-medium uppercase text-fg",children:t.service}),e("p",{className:"mt-2 font-display text-[17px] text-fg-dim",children:w(t.startAt,t.customerTimezone||a||t.timezone)}),t.customerTimezone&&t.timezone!==t.customerTimezone&&r("p",{className:"mt-1 font-mono text-[10px] uppercase tracking-[0.16em] text-fg-dim",children:["Business time: ",w(t.startAt,t.timezone)]}),(o??"").trim()&&e("p",{className:"mt-5 max-w-[620px] font-serif text-[18px] italic leading-[1.6] text-fg-dim",children:o}),e($,{href:`/book/${encodeURIComponent(t.manageToken)}`,newTab:t!==S,variant:"ghost",className:"mt-8",children:"Manage booking"})]}):null}export{R as BookingChoose,U as BookingConfirmed,O as BookingDetails,j as BookingHead};
1
+ "use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import{SAMPLE_CONFIRMATION as B,useBookingForm as z}from"./BookingFormState.js";import $ from"efficient-web-builder/render/components/Btn";import{HideTaker as T}from"efficient-web-builder/render/components/ViewHideRoot";import c from"../WebFormField.js";import{formatAppointment as w,formatAppointmentTime as S}from"../../lib/booking/appointment-time.js";import{formatMoneyInCurrency as A}from"../../lib/commerce.js";import{FREE_PRICE as q}from"../../lib/wheels/price-display.js";const d="w-full border-2 border-line bg-bg px-4 py-4 font-[family-name:var(--bk-value-font,var(--font-display))] text-[length:var(--bk-value-size,17px)] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent";function E(o,t){const a=Number(o);if(a===0)return q;try{return A(a,t)}catch{return`${t} ${o}`}}const p="font-[family-name:var(--bk-name-font,var(--font-mono))] text-[length:var(--bk-name-size,12px)]";function C({number:o,children:t}){return r("div",{className:"mb-4 flex items-center gap-3",children:[e("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full border border-line font-[family-name:var(--bk-step-font,var(--font-mono))] text-[length:var(--bk-step-size,11px)] font-semibold text-fg-dim",children:o}),e("h3",{className:"font-[family-name:var(--bk-step-font,var(--font-mono))] text-[length:var(--bk-step-size,12px)] font-semibold uppercase tracking-[0.2em] text-fg",children:t})]})}function H({eyebrow:o,heading:t,intro:a}){return r("div",{className:"mb-10 max-w-[760px]",children:[(o??"").trim()&&e("p",{className:"mb-4 font-mono text-[12px] font-semibold uppercase tracking-[0.24em] text-accent",children:o}),(t??"").trim()&&e("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.98] tracking-[-0.025em] text-fg max-view-wide:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:t}),(a??"").trim()&&e("p",{className:"mt-5 max-w-[660px] font-display text-[17px] leading-[1.65] text-fg-dim",children:a})]})}function O({style:o}={}){const{fieldPrefix:t,services:a,currency:u,serviceId:b,setServiceId:g,requiresPayment:x,date:h,earliestDate:v,setDate:k,setDateTouched:N,availability:i,loadingSlots:y,noSlotsMessage:s,selectedStart:f,setSelectedStart:l,customerTimezone:m}=z();return a?r(T,{className:"flex flex-col gap-10",style:o,children:[r("div",{children:[e(C,{number:"01",children:"Choose a service"}),e("div",{className:"grid gap-3 sm:grid-cols-2",children:a.map(n=>{const F=n.id===b;return r("button",{type:"button","aria-pressed":F,onClick:()=>g(n.id),className:`min-h-11 border p-4 text-left transition-colors ${F?"border-accent bg-accent/10":"border-line bg-bg hover:border-fg-dim"}`,children:[e("span",{className:"block font-[family-name:var(--bk-name-font,var(--font-display))] text-[length:var(--bk-name-size,18px)] font-medium text-fg",children:n.name}),r("span",{className:"mt-1 block font-[family-name:var(--bk-value-font,var(--font-mono))] text-[length:var(--bk-value-size,11px)] uppercase tracking-[0.14em] text-fg-dim",children:[n.durationMinutes," min · ",E(n.price,u)]}),n.description&&e("span",{className:"mt-3 block font-[family-name:var(--bk-note-font,var(--font-display))] text-[length:var(--bk-note-size,14px)] leading-[1.5] text-fg-dim",children:n.description})]},n.id)})}),x&&e("p",{className:"mt-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.14em] text-alert",role:"alert",children:"This service requires an upfront payment and cannot be booked through this form yet."})]}),r("div",{children:[e(C,{number:"02",children:"Choose a date and time"}),e(c,{separate:!0,htmlFor:`${t}-date`,label:"Date",required:!0,labelFace:p,children:e("input",{id:`${t}-date`,type:"date",min:v,value:h,onChange:n=>{N(!0),k(n.target.value)},className:d,required:!0})}),e("div",{className:"mt-4 grid grid-cols-2 gap-2 sm:grid-cols-3 min-[1200px]:grid-cols-4",role:"group","aria-label":"Available appointment times",children:y?e("p",{className:"col-span-full py-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.18em] text-fg-dim",children:"Loading times…"}):i?.slots.length?i.slots.map(n=>r("button",{type:"button","aria-pressed":f===n.start,onClick:()=>l(n.start),className:`min-h-11 border px-3 py-2 font-[family-name:var(--bk-value-font,var(--font-mono))] text-[length:var(--bk-value-size,12px)] font-semibold uppercase tracking-[0.12em] transition-colors ${f===n.start?"border-accent bg-accent text-bg":"border-line bg-bg text-fg hover:border-accent"}`,children:[e("span",{className:"block",children:S(n.start,m||i.timezone)}),m&&m!==i.timezone&&r("span",{className:"mt-0.5 block text-[9px] font-normal tracking-[0.08em] opacity-70",children:[S(n.start,i.timezone)," business"]})]},n.start)):s?e("p",{className:"col-span-full py-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.18em] text-fg-dim",role:"status",children:s}):null}),i?.timezone&&r("p",{className:"mt-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,10px)] uppercase tracking-[0.16em] text-fg-dim",children:["Times shown in ",m||i.timezone,m&&m!==i.timezone?` · business timezone ${i.timezone}`:""]})]})]}):null}function U({buttonLabel:o,style:t}){const{fieldPrefix:a,editing:u,name:b,setName:g,email:x,setEmail:h,phone:v,setPhone:k,notes:N,setNotes:i,submitting:y,error:s,canSubmit:f}=z();return r(T,{className:"sf-card border border-line bg-bg p-5 min-[640px]:p-8",style:t,children:[e(C,{number:"03",children:"Your details"}),r("div",{className:"flex flex-col gap-4",children:[e(c,{separate:!0,htmlFor:`${a}-name`,label:"Name",required:!0,labelFace:p,children:e("input",{id:`${a}-name`,type:"text",autoComplete:"name",value:b,onChange:l=>g(l.target.value),className:d,required:!0})}),e(c,{separate:!0,htmlFor:`${a}-email`,label:"Email",required:!0,labelFace:p,children:e("input",{id:`${a}-email`,type:"email",inputMode:"email",autoComplete:"email",value:x,onChange:l=>h(l.target.value),className:d,required:!0})}),e(c,{separate:!0,htmlFor:`${a}-phone`,label:"Phone",labelFace:p,children:e("input",{id:`${a}-phone`,type:"tel",inputMode:"tel",autoComplete:"tel",value:v,onChange:l=>k(l.target.value),className:d})}),e(c,{separate:!0,htmlFor:`${a}-notes`,label:"What would you like to cover?",labelFace:p,children:e("textarea",{id:`${a}-notes`,rows:4,value:N,onChange:l=>i(l.target.value),className:`${d} resize-y`})})]}),s&&e("p",{className:"mt-4 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.16em] text-alert",role:"alert",children:s}),e($,{type:u?"button":"submit",disabled:!f,arrow:null,className:"mt-6 w-full disabled:cursor-not-allowed disabled:opacity-50",children:y?"Submitting…":(o??"").trim()||"Book appointment"})]})}function W({successMessage:o}){const{confirmation:t,customerTimezone:a}=z();return t?r("div",{className:"sf-card max-w-[760px] border border-line bg-bg p-6 min-[640px]:p-10",role:"status",children:[r("p",{className:"font-mono text-[12px] font-semibold uppercase tracking-[0.22em] text-accent",children:["Request received · ",t.bookingNumber]}),e("h3",{className:"mt-4 font-display text-[28px] font-medium uppercase text-fg",children:t.service}),e("p",{className:"mt-2 font-display text-[17px] text-fg-dim",children:w(t.startAt,t.customerTimezone||a||t.timezone)}),t.customerTimezone&&t.timezone!==t.customerTimezone&&r("p",{className:"mt-1 font-mono text-[10px] uppercase tracking-[0.16em] text-fg-dim",children:["Business time: ",w(t.startAt,t.timezone)]}),(o??"").trim()&&e("p",{className:"mt-5 max-w-[620px] font-serif text-[18px] italic leading-[1.6] text-fg-dim",children:o}),e($,{href:`/book/${encodeURIComponent(t.manageToken)}`,newTab:t!==B,variant:"ghost",className:"mt-8",children:"Manage booking"})]}):null}export{O as BookingChoose,W as BookingConfirmed,U as BookingDetails,H as BookingHead};
@@ -1,14 +1,16 @@
1
1
  import { type CartLine } from "../CartContext.js";
2
+ import { type ViewHideTake } from "efficient-web-builder/render/components/ViewHideRoot";
2
3
  import { type HeroBuyState } from "./ProductCardState.js";
3
4
  export declare const CARD_PAGE_WORDS = "View sizes & fitment";
4
5
  export interface CardBuyButtonSettings {
5
6
  buy?: boolean;
6
7
  page?: boolean;
7
8
  }
8
- export declare function HeroBuyButton({ buy, takesOrders, add, }: {
9
+ export declare function HeroBuyButton({ buy, takesOrders, add, take, }: {
9
10
  buy: HeroBuyState;
10
11
  takesOrders: boolean;
11
12
  add: (line: CartLine) => void;
13
+ take?: ViewHideTake;
12
14
  }): import("react").JSX.Element;
13
15
  export default function CardBuyButton({ buy, page }: CardBuyButtonSettings): import("react").JSX.Element | null;
14
16
  export declare function CardBuyDialog(): import("react").JSX.Element | null;
@@ -1 +1 @@
1
- "use client";import{jsx as n,jsxs as b}from"react/jsx-runtime";import D from"next/link";import{useEffect as h}from"react";import{useCart as A}from"../CartContext.js";import g from"../QuoteLink.js";import{useSiteTakesOrders as k}from"../SiteRecordContext.js";import E from"../wheels-plp/PlpNotifyMeDialog.js";import{DEFAULT_PURCHASE_STATE as _}from"../../lib/catalog/purchase.js";import{ADD_TO_BASKET_ATTR as x}from"../../lib/commerce.js";import{STOCK_WORDS as R}from"../../lib/content/stock-words.js";import{tyreCartLine as B}from"../../lib/tyres/tyre-purchase.js";import{UNPRICED_LABEL as L,priceIn as w,resolveWheelPrice as z}from"../../lib/wheels/price-display.js";import{isOneWheelDesign as $,setLabel as P}from"../../lib/wheels/variants.js";import{splitWheelName as H}from"../../lib/wheels/wheel-name.js";import{CARD_TEXT_SIZE as C,CardButtonRow as S}from"./card-row.js";import{useHeroStateOrNull as W,useProductCardStateOrNull as j,useWheelCardState as q}from"./ProductCardState.js";const O="mt-3 flex flex-col gap-2",u=`cursor-pointer bg-btn px-4 py-3 font-mono ${C.labelSmall} font-bold uppercase tracking-[0.24em] text-btn-ink transition-colors hover:bg-fg`,F=`border border-btn px-4 py-3 text-center font-mono ${C.labelSmall} font-bold uppercase tracking-[0.24em] text-btn transition-colors hover:bg-btn hover:text-btn-ink`,I="View sizes & fitment",V="mt-3 block font-mono text-[length:var(--size-label,11px)] font-bold uppercase tracking-[0.18em] text-accent underline-offset-4 group-hover:underline";function G({wheel:e,sel:t,price:o,editing:r}){const{addAndOpen:i,warmCatalog:s}=A();h(()=>{r||s()},[r,s]);const{arm:c}=t;h(()=>{c()},[c]);function d(){const a=t.selectedVariant;!a||!t.canAdd||o.priced&&(r||i({id:`${e.slug}|${a.finishName}|${a.size}|quick`,slug:e.slug,name:H(e.name),process:e.process,positionNo:"01",config:[{label:a.size},{label:a.finishName,gold:!0},{label:P(a)}],finishName:a.finishName,size:a.size,components:a.components,qty:1}))}return n("button",{type:"button",onClick:d,[x]:"",disabled:!t.canAdd,className:t.canAdd?u:`${u} opacity-80`,children:"Add to basket"})}function K(e,t,o){return $(e)?t.outOfStock?"notify":t.unsellable||!o||t.detailState==="ready"&&!t.canAdd?"choose":"add":"choose"}function U({state:e,buy:t,page:o}){const{wheel:r,sel:i,price:s,editing:c,setNotifyOpen:d}=e,a=k(),l=K(r,i,s.priced),f=t?l==="notify"?n("button",{type:"button",onClick:()=>d(!0),className:u,children:"Notify me when back"}):l==="add"?a?n(G,{wheel:r,sel:i,price:s,editing:c}):n(g,{className:u}):null:null,p=!o||f?null:b("span",{"aria-hidden":!0,className:V,children:[I," →"]});return n(S,{children:f||p?b("div",{className:O,children:[f,p]}):null})}function M({state:e}){const{tyre:t,currency:o,pagePath:r,detail:i,variant:s,canAdd:c,detailReady:d,unsellable:a,editing:l}=e,{addAndOpen:f,warmCatalog:p}=A(),m=k();h(()=>{!l&&m&&p("tyre")},[l,m,p]);const y=z(w(t.prices,o),null).priced;function v(){!i||!s||!c||l||f(B(i,s,_.choice,_.qty))}return n(S,{children:b("div",{className:O,children:[!a&&y&&!m&&n(g,{className:u}),!a&&y&&m&&n("button",{type:"button",onClick:v,[x]:"",disabled:d&&!c,className:c||!d?`${u}${c?"":" opacity-80"}`:`cursor-not-allowed border border-dashed border-accent/50 px-4 py-3 font-mono ${C.labelSmall} font-bold uppercase tracking-[0.24em] text-accent/70`,children:d&&!c?"Select a size":"Add to basket"}),r&&n(D,{href:r,className:F,children:"Open product page"})]})})}const X="flex-1 px-6 py-4 font-mono text-[length:var(--size-label,14px)] font-bold uppercase tracking-[0.32em]",Q="flex-1 cursor-not-allowed border-2 border-dashed border-fg-dim/20 px-6 py-4 font-mono text-[length:var(--size-label,14px)] font-bold uppercase tracking-[0.32em] text-fg-dim/40";function N(e,t){return!t||e.isSet&&!e.priced?"quote":e.priced?e.outOfStock?"outOfStock":"add":"unpriced"}function T({buy:e,takesOrders:t,add:o}){const r=N(e,t);return r==="quote"?n(g,{className:"flex-1 cursor-pointer bg-btn px-6 py-4 text-center font-mono text-[length:var(--size-label,14px)] font-bold uppercase tracking-[0.32em] text-btn-ink transition-colors hover:bg-fg"}):r!=="add"?n("button",{type:"button",disabled:!0,"aria-disabled":!0,className:Q,children:r==="outOfStock"?R.outOfStock:L}):b("button",{type:"button",[x]:"",onClick:()=>{const i=e.lineToAdd();i&&o(i)},"aria-disabled":!e.canAdd,className:[`${X} transition-colors`,e.canAdd?"cursor-pointer bg-btn text-btn-ink hover:bg-fg hover:text-bg":"cursor-pointer border-2 border-dashed border-accent/50 text-accent/80 hover:border-accent hover:text-accent"].join(" "),style:e.canAdd?void 0:{background:"color-mix(in oklab, var(--accent) 6%, transparent)"},children:["Add to Cart",e.totalLabel!=null?` · ${e.totalLabel}`:""]})}const Y=()=>{};function Z({buy:e}){const{addAndOpen:t}=A();return n(T,{buy:e,takesOrders:!0,add:o=>t(o)})}function J({buy:e}){const t=k();return N(e,t)==="add"?n(Z,{buy:e}):n(T,{buy:e,takesOrders:t,add:Y})}function ee({buy:e=!0,page:t=!0}){const o=W(),r=j();if(o)return o.buy?n(J,{buy:o.buy}):null;if(!r)throw new Error("A product card piece was drawn outside a product card (no ProductCardState).");return r.kind==="bundle"?n(S,{}):r.kind==="tyre"?n(M,{state:r}):n(U,{state:r,buy:e,page:t})}function Ae(){const{wheel:e,sel:t,editing:o,notifyOpen:r,setNotifyOpen:i}=q();return r?n(E,{wheelName:e.name,productSlug:e.slug,finishName:t.confirmedFinishName,variants:t.outOfStockVariants,initialSize:t.selectedVariant?.size,onClose:()=>i(!1),editing:o}):null}export{I as CARD_PAGE_WORDS,Ae as CardBuyDialog,T as HeroBuyButton,ee as default};
1
+ "use client";import{jsx as o,jsxs as b}from"react/jsx-runtime";import E from"next/link";import{useEffect as h}from"react";import{useCart as A}from"../CartContext.js";import g from"../QuoteLink.js";import{NO_HIDE as R,useTakeViewHide as B,withViewHide as k}from"efficient-web-builder/render/components/ViewHideRoot";import{useSiteTakesOrders as x}from"../SiteRecordContext.js";import w from"../wheels-plp/PlpNotifyMeDialog.js";import{DEFAULT_PURCHASE_STATE as _}from"../../lib/catalog/purchase.js";import{ADD_TO_BASKET_ATTR as C}from"../../lib/commerce.js";import{STOCK_WORDS as L}from"../../lib/content/stock-words.js";import{tyreCartLine as z}from"../../lib/tyres/tyre-purchase.js";import{UNPRICED_LABEL as H,priceIn as $,resolveWheelPrice as P}from"../../lib/wheels/price-display.js";import{isOneWheelDesign as W,setLabel as V}from"../../lib/wheels/variants.js";import{splitWheelName as j}from"../../lib/wheels/wheel-name.js";import{CARD_TEXT_SIZE as S,CardButtonRow as y}from"./card-row.js";import{useHeroStateOrNull as q,useProductCardStateOrNull as I,useWheelCardState as F}from"./ProductCardState.js";const O="mt-3 flex flex-col gap-2",u=`cursor-pointer bg-btn px-4 py-3 font-mono ${S.labelSmall} font-bold uppercase tracking-[0.24em] text-btn-ink transition-colors hover:bg-fg`,G=`border border-btn px-4 py-3 text-center font-mono ${S.labelSmall} font-bold uppercase tracking-[0.24em] text-btn transition-colors hover:bg-btn hover:text-btn-ink`,K="View sizes & fitment",U="mt-3 block font-mono text-[length:var(--size-label,11px)] font-bold uppercase tracking-[0.18em] text-accent underline-offset-4 group-hover:underline";function M({wheel:e,sel:t,price:n,editing:r}){const{addAndOpen:i,warmCatalog:s}=A();h(()=>{r||s()},[r,s]);const{arm:c}=t;h(()=>{c()},[c]);function d(){const a=t.selectedVariant;!a||!t.canAdd||n.priced&&(r||i({id:`${e.slug}|${a.finishName}|${a.size}|quick`,slug:e.slug,name:j(e.name),process:e.process,positionNo:"01",config:[{label:a.size},{label:a.finishName,gold:!0},{label:V(a)}],finishName:a.finishName,size:a.size,components:a.components,qty:1}))}return o("button",{type:"button",onClick:d,[C]:"",disabled:!t.canAdd,className:t.canAdd?u:`${u} opacity-80`,children:"Add to basket"})}function X(e,t,n){return W(e)?t.outOfStock?"notify":t.unsellable||!n||t.detailState==="ready"&&!t.canAdd?"choose":"add":"choose"}function Q({state:e,buy:t,page:n}){const{wheel:r,sel:i,price:s,editing:c,setNotifyOpen:d}=e,a=x(),l=X(r,i,s.priced),f=t?l==="notify"?o("button",{type:"button",onClick:()=>d(!0),className:u,children:"Notify me when back"}):l==="add"?a?o(M,{wheel:r,sel:i,price:s,editing:c}):o(g,{className:u}):null:null,p=!n||f?null:b("span",{"aria-hidden":!0,className:U,children:[K," →"]});return o(y,{children:f||p?b("div",{className:O,children:[f,p]}):null})}function Y({state:e}){const{tyre:t,currency:n,pagePath:r,detail:i,variant:s,canAdd:c,detailReady:d,unsellable:a,editing:l}=e,{addAndOpen:f,warmCatalog:p}=A(),m=x();h(()=>{!l&&m&&p("tyre")},[l,m,p]);const N=P($(t.prices,n),null).priced;function D(){!i||!s||!c||l||f(z(i,s,_.choice,_.qty))}return o(y,{children:b("div",{className:O,children:[!a&&N&&!m&&o(g,{className:u}),!a&&N&&m&&o("button",{type:"button",onClick:D,[C]:"",disabled:d&&!c,className:c||!d?`${u}${c?"":" opacity-80"}`:`cursor-not-allowed border border-dashed border-accent/50 px-4 py-3 font-mono ${S.labelSmall} font-bold uppercase tracking-[0.24em] text-accent/70`,children:d&&!c?"Select a size":"Add to basket"}),r&&o(E,{href:r,className:G,children:"Open product page"})]})})}const Z="flex-1 px-6 py-4 font-mono text-[length:var(--size-label,14px)] font-bold uppercase tracking-[0.32em]",J="flex-1 cursor-not-allowed border-2 border-dashed border-fg-dim/20 px-6 py-4 font-mono text-[length:var(--size-label,14px)] font-bold uppercase tracking-[0.32em] text-fg-dim/40";function T(e,t){return!t||e.isSet&&!e.priced?"quote":e.priced?e.outOfStock?"outOfStock":"add":"unpriced"}function v({buy:e,takesOrders:t,add:n,take:r=R}){const i=T(e,t);return i==="quote"?o(g,{className:k("flex-1 cursor-pointer bg-btn px-6 py-4 text-center font-mono text-[length:var(--size-label,14px)] font-bold uppercase tracking-[0.32em] text-btn-ink transition-colors hover:bg-fg",r.className)??"",attrs:r.attrs}):i!=="add"?o("button",{type:"button",disabled:!0,"aria-disabled":!0,className:k(J,r.className),...r.attrs,children:i==="outOfStock"?L.outOfStock:H}):b("button",{type:"button",[C]:"",onClick:()=>{const s=e.lineToAdd();s&&n(s)},"aria-disabled":!e.canAdd,className:k([`${Z} transition-colors`,e.canAdd?"cursor-pointer bg-btn text-btn-ink hover:bg-fg hover:text-bg":"cursor-pointer border-2 border-dashed border-accent/50 text-accent/80 hover:border-accent hover:text-accent"].join(" "),r.className),style:e.canAdd?void 0:{background:"color-mix(in oklab, var(--accent) 6%, transparent)"},...r.attrs,children:["Add to Cart",e.totalLabel!=null?` · ${e.totalLabel}`:""]})}const ee=()=>{};function te({buy:e,take:t}){const{addAndOpen:n}=A();return o(v,{buy:e,takesOrders:!0,add:r=>n(r),take:t})}function re({buy:e}){const t=x(),n=B();return n.scope(T(e,t)==="add"?o(te,{buy:e,take:n}):o(v,{buy:e,takesOrders:t,add:ee,take:n}))}function ne({buy:e=!0,page:t=!0}){const n=q(),r=I();if(n)return n.buy?o(re,{buy:n.buy}):null;if(!r)throw new Error("A product card piece was drawn outside a product card (no ProductCardState).");return r.kind==="bundle"?o(y,{}):r.kind==="tyre"?o(Y,{state:r}):o(Q,{state:r,buy:e,page:t})}function Ce(){const{wheel:e,sel:t,editing:n,notifyOpen:r,setNotifyOpen:i}=F();return r?o(w,{wheelName:e.name,productSlug:e.slug,finishName:t.confirmedFinishName,variants:t.outOfStockVariants,initialSize:t.selectedVariant?.size,onClose:()=>i(!1),editing:n}):null}export{K as CARD_PAGE_WORDS,Ce as CardBuyDialog,v as HeroBuyButton,ne as default};
@@ -1 +1 @@
1
- "use client";import{jsx as e}from"react/jsx-runtime";import{CARD_TEXT_SIZE as c,CardRow as l,useCatalogCard as s}from"./card-row.js";import{RegionBridge as d,RegionWords as m,regionAttr as u}from"./card-text-region.js";function g({children:o,reserve:a=!1,region:r}){const t=s(),n=`font-mono ${c.label} uppercase text-accent ${t?"tracking-[0.3em]":"tracking-[0.25em]"}`,i=o?e("div",{...u(r,"eyebrow"),className:n,children:e(m,{region:r,at:"eyebrow",children:o})}):t&&a?e("div",{"aria-hidden":!0,className:n,children:" "}):null;return e(d,{region:r,sectionType:"ProductEyebrow",children:e(l,{children:i})})}export{g as default};
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import{HideTaker as n}from"efficient-web-builder/render/components/ViewHideRoot";import{CARD_TEXT_SIZE as l,CardRow as s,useCatalogCard as d}from"./card-row.js";import{RegionBridge as m,RegionWords as u,regionAttr as f}from"./card-text-region.js";function g({children:o,reserve:i=!1,region:r}){const t=d(),a=`font-mono ${l.label} uppercase text-accent ${t?"tracking-[0.3em]":"tracking-[0.25em]"}`,c=o?e(n,{...f(r,"eyebrow"),className:a,children:e(u,{region:r,at:"eyebrow",children:o})}):t&&i?e(n,{"aria-hidden":!0,className:a,children:" "}):null;return e(m,{region:r,sectionType:"ProductEyebrow",children:e(s,{children:c})})}export{g as default};
@@ -1 +1 @@
1
- "use client";import{jsx as a}from"react/jsx-runtime";import{withRMark as m}from"efficient-web-builder/render/components/RMark";import{CARD_TEXT_SIZE as o,useCatalogCard as l}from"./card-row.js";import{useProductCardStateOrNull as s}from"./ProductCardState.js";import{RegionBridge as c,RegionWords as u,regionAttr as h}from"./card-text-region.js";function f({children:r,region:n,fixedHeight:d=!0}){const t=l(),e=s(),i=e?.kind==="wheel"?m(e.wheel.name):e?.kind==="bundle"?e.bundle.name:null;return r===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"),a(c,{region:n,sectionType:"ProductName",children:a("div",{...h(n,"name"),className:t&&!d?`font-heading3 ${o.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 ${o.headingSmall2} font-medium uppercase leading-none tracking-[-0.02em]`:`mt-2 font-heading3 ${o.headingSmall1} font-medium tracking-[-0.02em]`,children:a(u,{region:n,at:"name",children:r??i})})})}export{f as default};
1
+ "use client";import{jsx as a}from"react/jsx-runtime";import{HideTaker as m}from"efficient-web-builder/render/components/ViewHideRoot";import{withRMark as l}from"efficient-web-builder/render/components/RMark";import{CARD_TEXT_SIZE as o,useCatalogCard as s}from"./card-row.js";import{useProductCardStateOrNull as c}from"./ProductCardState.js";import{RegionBridge as u,RegionWords as f,regionAttr as h}from"./card-text-region.js";function g({children:r,region:n,fixedHeight:d=!0}){const t=s(),e=c(),i=e?.kind==="wheel"?l(e.wheel.name):e?.kind==="bundle"?e.bundle.name:null;return r===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"),a(u,{region:n,sectionType:"ProductName",children:a(m,{...h(n,"name"),className:t&&!d?`font-heading3 ${o.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 ${o.headingSmall2} font-medium uppercase leading-none tracking-[-0.02em]`:`mt-2 font-heading3 ${o.headingSmall1} font-medium tracking-[-0.02em]`,children:a(f,{region:n,at:"name",children:r??i})})})}export{g as default};
@@ -1 +1 @@
1
- "use client";import{jsx as r,jsxs as c,Fragment as b}from"react/jsx-runtime";import{formatPrice as v}from"../../lib/commerce.js";import{say as P}from"efficient-web-builder/format/lib/editor-words";import{setLabel as k}from"../../lib/wheels/variants.js";import{wheelCardPriceLine as u}from"../../lib/wheels/set-mode.js";import{EACH_UNIT as S,formatSelectionPrice as L,formatSelectionWasPrice as N,formatWheelPrice as p,formatWheelWasPrice as w,FROM_PREFIX as f,priceIn as y,resolveWheelPrice as h,SET_QUOTE_LABEL as T}from"../../lib/wheels/price-display.js";import{CARD_TEXT_SIZE as m,CardRow as g}from"./card-row.js";import{RegionBridge as _,RegionWords as C,regionAttr as E}from"./card-text-region.js";import{useHeroStateOrNull as R,useProductCardState as W}from"./ProductCardState.js";function z(e,n){if(e.kind==="tyre"){const d=h(y(e.tyre.prices,e.currency),null);return{was:null,amount:p(d,e.currency,f),note:d.priced?S:null}}const{wheel:i,currency:t,price:o,sel:l,isSet:x}=e,a=h(i.prices[t],i.msrpPrices?.[t]),s=n.setTotal&&o.priced&&o.setTotal!=null&&l.selectedVariant?`${k(l.selectedVariant)} · ${v(o.setTotal,t)}`:null;return x&&n.quoteSets?{was:null,amount:a.priced?u(p(a,t,f),!0):T,note:s}:{was:n.wasFollowsSize?N(o,t):w(a,t),amount:u(L(o,t),o.priced),note:s}}function B({state:e,region:n}){const i=c("div",{className:"flex items-baseline gap-5 border-t border-line pt-[18px]",children:[e.msrpLabel&&r("div",{className:"font-mono text-[length:var(--size-label,15px)] text-fg-dim line-through",children:e.msrpLabel}),r("div",{className:"font-heading2 text-[length:min(var(--size-headingMedium,36px),var(--sf-heading-max,9999px))] font-bold leading-none tracking-[-0.01em] text-fg",...E(n,"price"),children:r(C,{region:n,at:"price",children:e.amount})}),e.unitLabel&&r("div",{className:"font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.22em] text-fg",children:e.unitLabel}),e.packBadge&&r("div",{className:"ml-auto border border-accent px-3 py-2 font-mono text-[length:var(--size-label,13px)] font-bold uppercase tracking-[0.18em] text-accent",style:{background:"color-mix(in oklab, var(--accent) 14%, transparent)"},children:e.packBadge})]});return r(_,{region:n,sectionType:"ProductPrice",children:i})}function F({show:e=!0,region:n,...i}){const t=R();return t?r(B,{state:t,region:n}):r(j,{show:e,...i})}function $({state:e,show:n}){return!n||e.bundle.inStock?null:r("div",{className:`mt-1 font-mono ${m.labelSmall} uppercase tracking-[0.24em] text-fg-dim`,children:P("Currently unavailable")})}function j({show:e=!0,...n}){const i=W();if(i.kind==="bundle")return r($,{state:i,show:e});const{was:t,amount:o,note:l}=z(i,n);return c(b,{children:[r(g,{children:e?c("div",{className:`mt-2 font-mono ${m.labelLarge}`,children:[t&&r("span",{className:"mr-2 text-fg-dim line-through",children:t}),o]}):null}),r(g,{children:e&&l?r("div",{className:`mt-[2px] font-mono ${m.labelSmall} tracking-[0.08em] text-fg-dim`,children:l}):null})]})}export{F as default};
1
+ "use client";import{jsx as r,jsxs as c,Fragment as P}from"react/jsx-runtime";import{formatPrice as k}from"../../lib/commerce.js";import{say as v}from"efficient-web-builder/format/lib/editor-words";import{HideTaker as u}from"efficient-web-builder/render/components/ViewHideRoot";import{setLabel as S}from"../../lib/wheels/variants.js";import{wheelCardPriceLine as p}from"../../lib/wheels/set-mode.js";import{EACH_UNIT as L,formatSelectionPrice as N,formatSelectionWasPrice as w,formatWheelPrice as f,formatWheelWasPrice as y,FROM_PREFIX as h,priceIn as T,resolveWheelPrice as g,SET_QUOTE_LABEL as _}from"../../lib/wheels/price-display.js";import{CARD_TEXT_SIZE as m,CardRow as x}from"./card-row.js";import{RegionBridge as C,RegionWords as E,regionAttr as R}from"./card-text-region.js";import{useHeroStateOrNull as W,useProductCardState as z}from"./ProductCardState.js";function B(e,n){if(e.kind==="tyre"){const d=g(T(e.tyre.prices,e.currency),null);return{was:null,amount:f(d,e.currency,h),note:d.priced?L:null}}const{wheel:i,currency:t,price:o,sel:l,isSet:b}=e,a=g(i.prices[t],i.msrpPrices?.[t]),s=n.setTotal&&o.priced&&o.setTotal!=null&&l.selectedVariant?`${S(l.selectedVariant)} · ${k(o.setTotal,t)}`:null;return b&&n.quoteSets?{was:null,amount:a.priced?p(f(a,t,h),!0):_,note:s}:{was:n.wasFollowsSize?w(o,t):y(a,t),amount:p(N(o,t),o.priced),note:s}}function F({state:e,region:n}){const i=c(u,{className:"flex items-baseline gap-5 border-t border-line pt-[18px]",children:[e.msrpLabel&&r("div",{className:"font-mono text-[length:var(--size-label,15px)] text-fg-dim line-through",children:e.msrpLabel}),r("div",{className:"font-heading2 text-[length:min(var(--size-headingMedium,36px),var(--sf-heading-max,9999px))] font-bold leading-none tracking-[-0.01em] text-fg",...R(n,"price"),children:r(E,{region:n,at:"price",children:e.amount})}),e.unitLabel&&r("div",{className:"font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.22em] text-fg",children:e.unitLabel}),e.packBadge&&r("div",{className:"ml-auto border border-accent px-3 py-2 font-mono text-[length:var(--size-label,13px)] font-bold uppercase tracking-[0.18em] text-accent",style:{background:"color-mix(in oklab, var(--accent) 14%, transparent)"},children:e.packBadge})]});return r(C,{region:n,sectionType:"ProductPrice",children:i})}function $({show:e=!0,region:n,...i}){const t=W();return t?r(F,{state:t,region:n}):r(A,{show:e,...i})}function j({state:e,show:n}){return!n||e.bundle.inStock?null:r(u,{className:`mt-1 font-mono ${m.labelSmall} uppercase tracking-[0.24em] text-fg-dim`,children:v("Currently unavailable")})}function A({show:e=!0,...n}){const i=z();if(i.kind==="bundle")return r(j,{state:i,show:e});const{was:t,amount:o,note:l}=B(i,n);return c(P,{children:[r(x,{children:e?c("div",{className:`mt-2 font-mono ${m.labelLarge}`,children:[t&&r("span",{className:"mr-2 text-fg-dim line-through",children:t}),o]}):null}),r(x,{children:e&&l?r("div",{className:`mt-[2px] font-mono ${m.labelSmall} tracking-[0.08em] text-fg-dim`,children:l}):null})]})}export{$ as default};
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as m,Fragment as x}from"react/jsx-runtime";import P from"next/image";import{useState as W}from"react";import{CARD_INDEX_BADGE_CLASS as $,CARD_INDEX_CLASS as j,parseCardIndexFormat as X}from"efficient-web-builder/format/lib/sections/product-card-style";import{CARD_IMAGE_BG_OFF as z,cardImageBackgroundPaints as H,resolveCardImageBackground as B}from"efficient-web-builder/format/lib/content/card-image-background";import{cardImageShapeTokens as _}from"efficient-web-builder/format/lib/content/card-image-shape";import{sayCount as K}from"efficient-web-builder/format/lib/editor-words";import{parseSetPicture as Z,setSecondSrc as q}from"../../lib/wheels/set-mode.js";import{coverSrcForWheel as J,parseCoverIndex as Q,resolvePaintedSrc as V}from"../../lib/wheels/cover-rendering.js";import Y from"../WheelPlaceholder.js";import{cardSpinOf as ee}from"../card-spin.js";import{useGridCard as D}from"../GridCardTemplate.js";import R from"./CardPicture.js";import k from"./CardProductBadge.js";import{useHeldCardPicture as re}from"./useHeldCardPicture.js";import{useProductCardState as te}from"./ProductCardState.js";const Pe=["well","full"],ne="well",G=r=>r==="full"?"full":ne;function ae({children:r}){return e("div",{className:"h-full w-full transition-transform duration-500 motion-safe:group-hover:scale-[1.03]",children:r})}function L({fill:r,badge:a,children:o}){const c=H(r);return m("div",{className:`sf-card-image relative aspect-[4/3] overflow-hidden${c?"":" bg-surface"}`,style:c?{backgroundColor:r}:void 0,children:[o,a]})}function ie(r){const a=te();return a.kind==="bundle"?e(le,{state:a,...r}):a.kind!=="wheel"?null:e(se,{state:a,...r})}function le({state:r,imageBackground:a,cardImage:o,showBadge:c,frame:w}){const{bundle:l}=r,{imageSizes:g}=D(),f=G(w)==="full",s=l.components.length,t=l.image?f?e(P,{alt:l.name,src:l.image,fill:!0,sizes:g,className:"object-cover",draggable:!1}):e(P,{alt:l.name,src:l.image,width:1e3,height:1e3,sizes:g,className:"block h-full w-full object-cover",draggable:!1}):e("div",{className:"flex h-full w-full items-center justify-center font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.3em] text-fg-dim",children:K("{n} piece","{n} pieces",s,{})}),d=e(ae,{children:t}),p=B(a,z),u=c!==!1?e(k,{edge:f}):null;return e("div",{style:_(o),children:f?e(L,{fill:p,badge:u,children:d}):m(x,{children:[u,e(R,{image:d,imageBackgroundFill:p})]})})}function se({state:r,imageBackground:a,cardImage:o,coverIndex:c,indexBadge:w,showBadge:l,frame:g,setPicture:f}){const{wheel:s,sel:t,isSet:d}=r,{hover:p,imageSizes:u}=D(),C=ee(p),T=J(s,Q(c),t.finish?.name,t.shownSrc),[N,M]=W(()=>new Set),A=n=>{t.pictureFailed(n),M(h=>h.has(n)?h:new Set(h).add(n))},E=V({overrideSrc:T,hookSrc:t.shownSrc,failed:N}),v=(n,h)=>e(P,{alt:h,src:n,width:1e3,height:1e3,sizes:u,className:`block h-full w-full object-contain ${C.className}`,style:C.style,draggable:!1,onError:()=>A(n)},n),O=t.finish?`${s.name} — ${t.finish.name}`:s.name,S=d&&Z(f)==="pair",U=S?q(s.finishes?.find(n=>n.name===t.finish?.name),E):null,i=re({src:E,second:U,alt:O,sizes:u,failed:N,onFailed:A,near:t.nearScreen,holdEmpty:t.awaitingProbe}),y=m(x,{children:[i.src?v(i.src,i.alt):e(Y,{imageLabel:s.name,spin:C}),i.trial]}),F=X(w),b=F!=="off",I=B(a,z);if(G(g)==="full"){const n=m(x,{children:[b?e("span",{"aria-hidden":!0,"data-format":F,className:`${j} ${$}`}):null,e(k,{show:l!==!1,numbered:b,axleSets:!0,edge:!0})]});return e("div",{style:_(o),"data-set-picture":d&&!S?"one":void 0,children:e(L,{fill:I,badge:n,children:m("div",{className:"flex h-full w-full items-center justify-center",children:[y,i.second?v(i.second,`${i.alt} — right`):null]})})})}return m("div",{style:_(o),"data-set-picture":d&&!S?"one":void 0,children:[b?e("span",{"aria-hidden":!0,"data-format":F,className:`${j} ${$}`}):null,e(k,{show:l!==!1,numbered:b,axleSets:!0}),e(R,{image:y,imageSecond:i.second?v(i.second,`${i.alt} — right`):void 0,wide:S,imageBackgroundFill:I})]})}export{ne as DEFAULT_PICTURE_FRAME,Pe as PICTURE_FRAMES,ie as default};
1
+ "use client";import{jsx as e,jsxs as m,Fragment as P}from"react/jsx-runtime";import k from"next/image";import{useState as H}from"react";import{HideTaker as v}from"efficient-web-builder/render/components/ViewHideRoot";import{CARD_INDEX_BADGE_CLASS as j,CARD_INDEX_CLASS as z,parseCardIndexFormat as X}from"efficient-web-builder/format/lib/sections/product-card-style";import{CARD_IMAGE_BG_OFF as B,cardImageBackgroundPaints as K,resolveCardImageBackground as D}from"efficient-web-builder/format/lib/content/card-image-background";import{cardImageShapeTokens as _}from"efficient-web-builder/format/lib/content/card-image-shape";import{sayCount as Z}from"efficient-web-builder/format/lib/editor-words";import{parseSetPicture as q,setSecondSrc as J}from"../../lib/wheels/set-mode.js";import{coverSrcForWheel as Q,parseCoverIndex as V,resolvePaintedSrc as Y}from"../../lib/wheels/cover-rendering.js";import ee from"../WheelPlaceholder.js";import{cardSpinOf as re}from"../card-spin.js";import{useGridCard as R}from"../GridCardTemplate.js";import T from"./CardPicture.js";import N from"./CardProductBadge.js";import{useHeldCardPicture as te}from"./useHeldCardPicture.js";import{useProductCardState as ne}from"./ProductCardState.js";const _e=["well","full"],ae="well",G=r=>r==="full"?"full":ae;function le({children:r}){return e("div",{className:"h-full w-full transition-transform duration-500 motion-safe:group-hover:scale-[1.03]",children:r})}function L({fill:r,badge:a,children:o}){const c=K(r);return m("div",{className:`sf-card-image relative aspect-[4/3] overflow-hidden${c?"":" bg-surface"}`,style:c?{backgroundColor:r}:void 0,children:[o,a]})}function ie(r){const a=ne();return a.kind==="bundle"?e(se,{state:a,...r}):a.kind!=="wheel"?null:e(oe,{state:a,...r})}function se({state:r,imageBackground:a,cardImage:o,showBadge:c,frame:w}){const{bundle:i}=r,{imageSizes:g}=R(),f=G(w)==="full",s=i.components.length,t=i.image?f?e(k,{alt:i.name,src:i.image,fill:!0,sizes:g,className:"object-cover",draggable:!1}):e(k,{alt:i.name,src:i.image,width:1e3,height:1e3,sizes:g,className:"block h-full w-full object-cover",draggable:!1}):e("div",{className:"flex h-full w-full items-center justify-center font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.3em] text-fg-dim",children:Z("{n} piece","{n} pieces",s,{})}),d=e(le,{children:t}),p=D(a,B),u=c!==!1?e(N,{edge:f}):null;return e(v,{style:_(o),children:f?e(L,{fill:p,badge:u,children:d}):m(P,{children:[u,e(T,{image:d,imageBackgroundFill:p})]})})}function oe({state:r,imageBackground:a,cardImage:o,coverIndex:c,indexBadge:w,showBadge:i,frame:g,setPicture:f}){const{wheel:s,sel:t,isSet:d}=r,{hover:p,imageSizes:u}=R(),C=re(p),M=Q(s,V(c),t.finish?.name,t.shownSrc),[A,O]=H(()=>new Set),E=n=>{t.pictureFailed(n),O(h=>h.has(n)?h:new Set(h).add(n))},y=Y({overrideSrc:M,hookSrc:t.shownSrc,failed:A}),F=(n,h)=>e(k,{alt:h,src:n,width:1e3,height:1e3,sizes:u,className:`block h-full w-full object-contain ${C.className}`,style:C.style,draggable:!1,onError:()=>E(n)},n),U=t.finish?`${s.name} — ${t.finish.name}`:s.name,S=d&&q(f)==="pair",W=S?J(s.finishes?.find(n=>n.name===t.finish?.name),y):null,l=te({src:y,second:W,alt:U,sizes:u,failed:A,onFailed:E,near:t.nearScreen,holdEmpty:t.awaitingProbe}),I=m(P,{children:[l.src?F(l.src,l.alt):e(ee,{imageLabel:s.name,spin:C}),l.trial]}),x=X(w),b=x!=="off",$=D(a,B);if(G(g)==="full"){const n=m(P,{children:[b?e("span",{"aria-hidden":!0,"data-format":x,className:`${z} ${j}`}):null,e(N,{show:i!==!1,numbered:b,axleSets:!0,edge:!0})]});return e(v,{style:_(o),"data-set-picture":d&&!S?"one":void 0,children:e(L,{fill:$,badge:n,children:m("div",{className:"flex h-full w-full items-center justify-center",children:[I,l.second?F(l.second,`${l.alt} — right`):null]})})})}return m(v,{style:_(o),"data-set-picture":d&&!S?"one":void 0,children:[b?e("span",{"aria-hidden":!0,"data-format":x,className:`${z} ${j}`}):null,e(N,{show:i!==!1,numbered:b,axleSets:!0}),e(T,{image:I,imageSecond:l.second?F(l.second,`${l.alt} — right`):void 0,wide:S,imageBackgroundFill:$})]})}export{ae as DEFAULT_PICTURE_FRAME,_e as PICTURE_FRAMES,ie as default};
@@ -1 +1 @@
1
- "use client";import{jsx as n,Fragment as m,jsxs as p}from"react/jsx-runtime";import{Fragment as x}from"react";import{applyCardAnswers as u}from"../../lib/content/field-usage.js";import{wheelCardSpecFacts as h}from"../../lib/wheels/plp-fitment-match.js";import{CARD_TEXT_SIZE as i,useCatalogCard as f}from"./card-row.js";import{useProductCardState as g}from"./ProductCardState.js";const C="whitespace-nowrap",S=t=>typeof t=="string"?t:t.text,_=/^(.*\S) (\+\d+ more)$/;function w(t,r="·"){return t.map((a,c)=>{const e=S(a),l=typeof a!="string"&&a.accent,o=`${C}${l?" text-accent":""}`,d=c<t.length-1?`${e} ${r}`:e,s=_.exec(e);return p(x,{children:[s?p(m,{children:[n("span",{className:o,children:s[1]})," ",n("span",{className:o,children:c<t.length-1?`${s[2]} ${r}`:s[2]})]}):n("span",{className:o,children:d}),c<t.length-1?" ":null]},e)})}function $({children:t}){const r=f();return n("div",{className:r?`mt-2 h-[38px] overflow-hidden [.sf-card-rows_&]:h-auto [.sf-card-rows_&]:max-h-[76px] font-mono ${i.labelLarge} leading-[19px] tracking-[0.14em] text-fg-dim`:`mt-[4px] font-mono ${i.labelLarge} tracking-[0.1em] text-fg-dim`,children:t})}function F({sizes:t=!1,car:r=null,separator:a,fieldUsage:c=[]}){const e=g();if(e.kind!=="wheel")return null;const l=u(h(e.wheel,r,{sizes:t}),c).map(o=>o.text);return n(m,{children:w(l,a)})}function E(t){return n($,{children:n(F,{...t})})}export{C as CARD_SPEC_FIELD_CLASS,F as CardSpecFacts,$ as CardSpecLine,w as cardSpecFields,E as default};
1
+ "use client";import{jsx as n,Fragment as m,jsxs as p}from"react/jsx-runtime";import{Fragment as x}from"react";import{HideTaker as u}from"efficient-web-builder/render/components/ViewHideRoot";import{applyCardAnswers as h}from"../../lib/content/field-usage.js";import{wheelCardSpecFacts as f}from"../../lib/wheels/plp-fitment-match.js";import{CARD_TEXT_SIZE as i,useCatalogCard as g}from"./card-row.js";import{useProductCardState as C}from"./ProductCardState.js";const S="whitespace-nowrap",_=t=>typeof t=="string"?t:t.text,w=/^(.*\S) (\+\d+ more)$/;function $(t,r="·"){return t.map((a,c)=>{const e=_(a),l=typeof a!="string"&&a.accent,o=`${S}${l?" text-accent":""}`,d=c<t.length-1?`${e} ${r}`:e,s=w.exec(e);return p(x,{children:[s?p(m,{children:[n("span",{className:o,children:s[1]})," ",n("span",{className:o,children:c<t.length-1?`${s[2]} ${r}`:s[2]})]}):n("span",{className:o,children:d}),c<t.length-1?" ":null]},e)})}function F({children:t}){const r=g();return n(u,{className:r?`mt-2 h-[38px] overflow-hidden [.sf-card-rows_&]:h-auto [.sf-card-rows_&]:max-h-[76px] font-mono ${i.labelLarge} leading-[19px] tracking-[0.14em] text-fg-dim`:`mt-[4px] font-mono ${i.labelLarge} tracking-[0.1em] text-fg-dim`,children:t})}function E({sizes:t=!1,car:r=null,separator:a,fieldUsage:c=[]}){const e=C();if(e.kind!=="wheel")return null;const l=h(f(e.wheel,r,{sizes:t}),c).map(o=>o.text);return n(m,{children:$(l,a)})}function L(t){return n(F,{children:n(E,{...t})})}export{S as CARD_SPEC_FIELD_CLASS,E as CardSpecFacts,F as CardSpecLine,$ as cardSpecFields,L as default};
@@ -1 +1 @@
1
- "use client";import{Fragment as l,jsx as r}from"react/jsx-runtime";import{say as n}from"efficient-web-builder/format/lib/editor-words";import{useHeroStateOrNull as u,useProductCardStateOrNull as i}from"./ProductCardState.js";function m({label:t,editing:e,onHero:a=!1,children:o}){const s=u();return i()||a&&s?r(l,{children:o}):e?r("div",{"data-host-part-sample":"",className:"opacity-60",children:n(t)}):null}export{m as default};
1
+ "use client";import{Fragment as i,jsx as r}from"react/jsx-runtime";import{say as l}from"efficient-web-builder/format/lib/editor-words";import{useHeroStateOrNull as m,useProductCardStateOrNull as n}from"./ProductCardState.js";import{HideTaker as u}from"efficient-web-builder/render/components/ViewHideRoot";function f({label:t,editing:e,onHero:a=!1,children:o}){const s=m();return n()||a&&s?r(i,{children:o}):e?r(u,{as:"div","data-host-part-sample":"",className:"opacity-60",children:l(t)}):null}export{f as default};
@@ -1 +1 @@
1
- "use client";import{jsx as t,Fragment as r}from"react/jsx-runtime";import{createContext as n,useContext as o}from"react";const c={headingSmall1:"text-[length:var(--size-headingSmall,22px)]",headingSmall2:"text-[length:var(--size-headingSmall,30px)]",labelSmall:"text-[length:var(--size-label,11px)]",label:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"},i=n("catalog");function s(){return o(i)==="catalog"}function a({children:e}){const l=s();return t(r,{children:e??(l?t("div",{"aria-hidden":!0}):null)})}function g({children:e}){return t(a,{children:e?t("div",{className:"relative z-10",children:e}):null})}function u({children:e}){return t(a,{children:e?t("div",{className:"relative z-10 [.sf-card-rows>*>&]:self-end",children:e}):null})}export{c as CARD_TEXT_SIZE,u as CardButtonRow,g as CardControlRow,i as CardLookContext,a as CardRow,s as useCatalogCard};
1
+ "use client";import{jsx as t,Fragment as n}from"react/jsx-runtime";import{createContext as o,useContext as i}from"react";import{HideTaker as a}from"efficient-web-builder/render/components/ViewHideRoot";const u={headingSmall1:"text-[length:var(--size-headingSmall,22px)]",headingSmall2:"text-[length:var(--size-headingSmall,30px)]",labelSmall:"text-[length:var(--size-label,11px)]",label:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"},s=o("catalog");function x(){return i(s)==="catalog"}function l({children:e}){const r=x();return t(n,{children:e??(r?t(a,{"aria-hidden":!0}):null)})}function m({children:e}){return t(l,{children:e?t(a,{className:"relative z-10",children:e}):null})}function p({children:e}){return t(l,{children:e?t(a,{className:"relative z-10 [.sf-card-rows>*>&]:self-end",children:e}):null})}export{u as CARD_TEXT_SIZE,p as CardButtonRow,m as CardControlRow,s as CardLookContext,l as CardRow,x as useCatalogCard};
@@ -1 +1 @@
1
- "use client";import{jsx as e,Fragment as C,jsxs as L}from"react/jsx-runtime";import{CardTemplateRows as N}from"efficient-web-builder/render/components/CardRowContext";import{cardRow as G}from"efficient-web-builder/format/lib/content/card-template";import{say as K}from"efficient-web-builder/format/lib/editor-words";import{useCurrency as O}from"../CurrencyContext.js";import{formatPrice as B}from"../../lib/commerce.js";import{filterChipItems as I,filterStateWithoutChip as Y}from"../../lib/sections/filter-option-rows.js";import{PlpResultRange as T,PlpToolbar as R}from"../wheels-plp/PlpToolbar.js";import S from"./ClearAllButton.js";import A from"./SortSelect.js";import{hasActivePlpFilters as j,plpSortKeysFor as M,PLP_SORT_LABELS as U}from"../../lib/wheels/plp-filters.js";import{itemKind as W,plpKindNoun as X}from"../../lib/catalog/plp-item.js";import{CATALOG_TEXT_SIZE as Z}from"../../lib/sections/catalog-text-size.js";import{EMPTY_PLP_FILTERS as $}from"../../lib/wheels/plp-filters.js";import{GALLERY_SORT_KEYS as q,GALLERY_SORT_LABELS as z}from"../../lib/sections/gallery-toolbar.js";import{useShopperMember as D}from"./ShopperScope.js";const H="✕";function J({owner:n,showCount:r,showClear:l,showSort:s,firstShown:t,editing:a}){const{ref:i,scope:o,gallery:f}=D("chips",null,{count:r,sort:s}),{currency:c}=O(),m=(!o?.live&&t?{state:o?.state??{...$,sort:t.sort},update:()=>{},clear:()=>{},total:t.total,range:t.range,kinds:t.kinds}:null)??(o?{...o,kinds:[...new Set(o.rows.map(W))]}:null);if(!m&&f)return e("div",{ref:i,"data-shopper-chips":"",children:e(Q,{owner:n,gallery:f,showCount:r,showClear:l,showSort:s,editing:a})});if(!m)return e("div",{ref:i,"data-shopper-chips":"",children:a&&e("p",{className:`font-mono ${Z.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:"Filter chips show the picks of a Filters block, or the Tags of a Gallery, in this Box"})});const{state:d,update:u,clear:_,total:p,range:v,kinds:h}=m,x=X(h.length?h:["alloy-wheel"]),E=j(d),y=I(d,c,B).map(g=>({...g,mark:H,press:()=>u(F=>Y(F,g))})),P=L(C,{children:[r&&e("div",{"data-shopper-count":"",className:"contents",children:e(T,{total:p,range:v??{from:p?1:0,to:p},noun:x})}),y.length>0&&e(b,{owner:n,chips:y,editing:a}),l&&E&&e(S,{onClick:_})]}),w=M(h.length?h:["alloy-wheel"]);return e("div",{ref:i,"data-shopper-chips":"",children:e(R,{start:P,end:s?e(A,{value:d.sort,keys:w,labels:U,onChange:g=>u({sort:g,page:1})}):void 0})})}function b({owner:n,chips:r,selected:l,editing:s}){return e("ul",{className:"flex list-none flex-wrap items-center gap-2",children:e(N,{ownerId:n.id,ownerType:"FilterChipsBlock",Template:n.template,rows:r.map(G),items:r,states:l===void 0?void 0:r.map((t,a)=>a===l?{selected:!0}:void 0),actions:s?void 0:r.map(t=>({press:t.press})),fallback:null,wrapCopy:t=>e("li",{children:t}),children:t=>t})})}function Q({owner:n,gallery:r,showCount:l,showClear:s,showSort:t,editing:a}){const{tags:i,tag:o,sort:f,shown:c,pick:k,setSort:m,clear:d}=r,u=[{label:K("All"),mark:"",press:()=>k(null)},...i.map(p=>({label:p,mark:"",press:()=>k(p)}))],_=L(C,{children:[l&&e("div",{"data-shopper-count":"",className:"contents",children:e(T,{total:c,range:{from:c?1:0,to:c},noun:V})}),i.length>0&&e(b,{owner:n,chips:u,selected:o===null?0:i.indexOf(o)+1,editing:a}),s&&o!==null&&e(S,{onClick:d})]});return e(R,{start:_,end:t?e(A,{value:f,keys:q,labels:z,onChange:m}):void 0})}const V={many:"items"};export{J as default};
1
+ "use client";import{jsx as e,Fragment as T,jsxs as L}from"react/jsx-runtime";import{CardTemplateRows as G}from"efficient-web-builder/render/components/CardRowContext";import{cardRow as K}from"efficient-web-builder/format/lib/content/card-template";import{say as O}from"efficient-web-builder/format/lib/editor-words";import{useCurrency as B}from"../CurrencyContext.js";import{formatPrice as I}from"../../lib/commerce.js";import{filterChipItems as Y,filterStateWithoutChip as j}from"../../lib/sections/filter-option-rows.js";import{PlpResultRange as R,PlpToolbar as S}from"../wheels-plp/PlpToolbar.js";import A from"./ClearAllButton.js";import b from"./SortSelect.js";import{hasActivePlpFilters as M,plpSortKeysFor as H,PLP_SORT_LABELS as U}from"../../lib/wheels/plp-filters.js";import{itemKind as W,plpKindNoun as X}from"../../lib/catalog/plp-item.js";import{CATALOG_TEXT_SIZE as Z}from"../../lib/sections/catalog-text-size.js";import{EMPTY_PLP_FILTERS as $}from"../../lib/wheels/plp-filters.js";import{GALLERY_SORT_KEYS as q,GALLERY_SORT_LABELS as z}from"../../lib/sections/gallery-toolbar.js";import{useShopperMember as D}from"./ShopperScope.js";import{HideTaker as y}from"efficient-web-builder/render/components/ViewHideRoot";const J="✕";function Q({owner:n,showCount:r,showClear:s,showSort:l,firstShown:t,editing:a}){const{ref:i,scope:o,gallery:f}=D("chips",null,{count:r,sort:l}),{currency:c}=B(),m=(!o?.live&&t?{state:o?.state??{...$,sort:t.sort},update:()=>{},clear:()=>{},total:t.total,range:t.range,kinds:t.kinds}:null)??(o?{...o,kinds:[...new Set(o.rows.map(W))]}:null);if(!m&&f)return e(y,{as:"div",ref:i,"data-shopper-chips":"",children:e(V,{owner:n,gallery:f,showCount:r,showClear:s,showSort:l,editing:a})});if(!m)return e(y,{as:"div",ref:i,"data-shopper-chips":"",children:a&&e("p",{className:`font-mono ${Z.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:"Filter chips show the picks of a Filters block, or the Tags of a Gallery, in this Box"})});const{state:d,update:u,clear:_,total:p,range:x,kinds:h}=m,E=X(h.length?h:["alloy-wheel"]),P=M(d),C=Y(d,c,I).map(g=>({...g,mark:J,press:()=>u(N=>j(N,g))})),w=L(T,{children:[r&&e("div",{"data-shopper-count":"",className:"contents",children:e(R,{total:p,range:x??{from:p?1:0,to:p},noun:E})}),C.length>0&&e(v,{owner:n,chips:C,editing:a}),s&&P&&e(A,{onClick:_})]}),F=H(h.length?h:["alloy-wheel"]);return e(y,{as:"div",ref:i,"data-shopper-chips":"",children:e(S,{start:w,end:l?e(b,{value:d.sort,keys:F,labels:U,onChange:g=>u({sort:g,page:1})}):void 0})})}function v({owner:n,chips:r,selected:s,editing:l}){return e("ul",{className:"flex list-none flex-wrap items-center gap-2",children:e(G,{ownerId:n.id,ownerType:"FilterChipsBlock",Template:n.template,rows:r.map(K),items:r,states:s===void 0?void 0:r.map((t,a)=>a===s?{selected:!0}:void 0),actions:l?void 0:r.map(t=>({press:t.press})),fallback:null,wrapCopy:t=>e("li",{children:t}),children:t=>t})})}function V({owner:n,gallery:r,showCount:s,showClear:l,showSort:t,editing:a}){const{tags:i,tag:o,sort:f,shown:c,pick:k,setSort:m,clear:d}=r,u=[{label:O("All"),mark:"",press:()=>k(null)},...i.map(p=>({label:p,mark:"",press:()=>k(p)}))],_=L(T,{children:[s&&e("div",{"data-shopper-count":"",className:"contents",children:e(R,{total:c,range:{from:c?1:0,to:c},noun:ee})}),i.length>0&&e(v,{owner:n,chips:u,selected:o===null?0:i.indexOf(o)+1,editing:a}),l&&o!==null&&e(A,{onClick:d})]});return e(S,{start:_,end:t?e(b,{value:f,keys:q,labels:z,onChange:m}):void 0})}const ee={many:"items"};export{Q as default};
@@ -1 +1 @@
1
- "use client";import{jsx as l,Fragment as G,jsxs as d}from"react/jsx-runtime";import{useCallback as K,useMemo as F,useState as z}from"react";import{say as W}from"efficient-web-builder/format/lib/editor-words";import{CardTemplateRows as ee}from"efficient-web-builder/render/components/CardRowContext";import{cardRow as le}from"efficient-web-builder/format/lib/content/card-template";import{useCurrency as te}from"../CurrencyContext.js";import{useEnglish as re}from"../EnglishVariant.js";import ne from"./ClearAllButton.js";import se from"./PriceRange.js";import oe from"./SortSelect.js";import{DEFAULT_CATALOG_FILTER_LABELS as U}from"../../lib/content/catalog-filter-labels.js";import{itemKind as X}from"../../lib/catalog/plp-item.js";import{itemLugs as ie,lugFilterLabel as ce}from"../../lib/wheels/lug-count.js";import{CATALOG_TEXT_SIZE as L}from"../../lib/sections/catalog-text-size.js";import{buildPlpFacets as ae,itemMatchesPlp as ue,plpInStockCount as pe,plpPriceBounds as me,plpSortKeysFor as de,PLP_ONE_VALUE_MAX as fe,PLP_SORT_LABELS as ge}from"../../lib/wheels/plp-filters.js";import{FILTER_IN_STOCK_KEY as he,FILTER_PRICE_KEY as T,filterGroupItems as Se}from"../../lib/sections/filter-option-rows.js";import{hasActivePlpFilters as xe}from"../../lib/wheels/plp-filters.js";import{FilterPill as be,PillButton as we}from"./FilterPill.js";import{useShopperFilter as ye}from"./ShopperScope.js";const Y="lugs";function ke({owner:r,look:e,lookPhone:n,shown:s,showSort:c,openingSort:i,filtersBelow:t,fieldUsage:u,firstRows:b,editing:N}){const{currency:p}=te(),M=re(),{ref:V,scope:f}=ye({filtersBelow:t,openingSort:i}),{state:g}=f,h=f.live?f.rows:b??f.rows,w=F(()=>[...new Set(h.map(X))],[h]),A=F(()=>{const a=ae(h,g,p,w,u??[],"pass").filter(o=>o.key!=="collections"||s.includes("category"));if(s.includes("lugs")){const o=Ne(h,g,p);o&&a.push(o)}return a.map(o=>({...o,label:M(o.label)}))},[h,g,p,w,u,s,M]),I=s.includes("price")?me(h,p):null,P=s.includes("inStock")&&h.length>0?pe(h,g,p):null,Z=de(w.length?w:["alloy-wheel"]),y=f.update,v=K(a=>y({...a,page:1}),[y]),B=K((a,o)=>y(m=>{if(a===Y){const x=Number(o),J=(m.lugs??[]).includes(x);return{...m,page:1,lugs:J?(m.lugs??[]).filter(Q=>Q!==x):[...m.lugs??[],x]}}const _=m[a].map(String),j=_.includes(o)?_.filter(x=>x!==o):[..._,o];return{...m,page:1,[a]:a==="diameters"?j.map(Number):j}}),[y]),$=c&&!f.sortInChips,q=F(()=>{const a=Se(A,g,P).map(o=>({...o,options:o.options.map(m=>({...m,press:o.key===he?()=>v({inStockOnly:!g.inStockOnly}):()=>B(o.key,m.value)}))}));return I?[...a,{key:T,label:U.price,options:[]}]:a},[A,g,P,I,v,B]),S={owner:r,items:q,state:g,sorts:Z,showSort:$,set:v,clear:f.clear},O=e==="rail"?l(H,{...S}):l(E,{...S,columns:e==="bar-columns"}),R=(n==="rail"?e==="rail":n==="bar"&&e!=="rail")?null:n==="button"?l(ve,{...S}):n==="rail"?l(H,{...S}):l(E,{...S,columns:!1});return d("div",{ref:V,"data-shopper-filters":"",className:"w-full",children:[R?d(G,{children:[l("div",{className:"max-view-wide:hidden",children:O}),l("div",{className:"view-wide:hidden",children:R})]}):O,N&&f.grids===0&&l("p",{className:`mt-2 font-mono ${L.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:"Filters a Product Grid in this Box"})]})}function Ne(r,e,n){const s=new Map,c=new Set;for(const t of r){const u=X(t)==="alloy-wheel"?ie(t):null;u!==null&&(c.add(u),ue(t,e,n,"lugs","pass")&&s.set(u,(s.get(u)??0)+1))}if(c.size<=fe)return null;const i=e.lugs??[];return{key:Y,label:U.lugs,options:[...c].sort((t,u)=>t-u).map(t=>({value:String(t),label:ce(t),count:s.get(t)??0,checked:i.includes(t),swatch:null}))}}function k({state:r,sorts:e,set:n}){return l(oe,{value:r.sort,keys:e,labels:ge,onChange:s=>n({sort:s})})}function D(r,e){return r.key===T?(e.priceMin!=null?1:0)+(e.priceMax!=null?1:0):r.options.filter(n=>n.state.selected).length}function C({owner:r,items:e,state:n,set:s,wrap:c}){const i=(t,u)=>{const b=e[u.index],N=b.key===T?d(G,{children:[t,l(se,{min:n.priceMin,max:n.priceMax,onMin:p=>s({priceMin:p}),onMax:p=>s({priceMax:p})})]}):t;return c(N,b)};return l(ee,{ownerId:r.id,ownerType:"FilterBlock",Template:r.template,rows:e.map(le),items:e,fallback:null,wrapCopy:i,children:t=>t})}function E({columns:r,...e}){const[n,s]=z(null),c=i=>()=>s(t=>t===i?null:i);return r?d("div",{className:"flex flex-col gap-4",children:[l("div",{className:"grid grid-cols-[repeat(auto-fit,minmax(200px,1fr))] gap-6 border-y border-line py-4",children:l(C,{...e,wrap:(i,t)=>l("div",{children:i},t.key)})}),e.showSort&&l("div",{className:"flex flex-wrap items-center justify-end gap-4",children:l(k,{...e})})]}):d("div",{className:"flex flex-wrap items-center gap-2",children:[l(C,{...e,wrap:(i,t)=>l(be,{labelSize:L.labelSmall,name:t.key,label:t.label,badge:D(t,e.state),open:n===t.key,onToggle:c(t.key),children:i},t.key)}),e.showSort&&l("div",{className:"ml-auto",children:l(k,{...e})})]})}function H(r){return d("aside",{className:"flex w-full flex-col gap-4 lg:w-[268px]",children:[d("div",{className:"flex items-center justify-between",children:[l("h2",{className:"font-display text-[18px] font-medium uppercase tracking-[-0.01em]",children:W("Filter")}),xe(r.state)&&l(ne,{onClick:r.clear})]}),l("div",{className:"flex flex-col",children:l(C,{...r,wrap:(e,n)=>l("div",{className:"border-t border-line py-4",children:e},n.key)})}),r.showSort&&l(k,{...r})]})}function ve(r){const[e,n]=z(!1),s=r.items.reduce((c,i)=>c+D(i,r.state),0);return d("div",{className:"flex flex-col gap-4",children:[d("div",{className:"flex items-center justify-between gap-4",children:[l(we,{labelSize:L.labelSmall,label:"Filters",badge:s,open:e,onToggle:()=>n(c=>!c)}),r.showSort&&l(k,{...r})]}),e&&l(E,{...r,columns:!0,showSort:!1})]})}export{ke as default};
1
+ "use client";import{jsx as l,Fragment as G,jsxs as d}from"react/jsx-runtime";import{useCallback as K,useMemo as F,useState as z}from"react";import{say as W}from"efficient-web-builder/format/lib/editor-words";import{CardTemplateRows as ee}from"efficient-web-builder/render/components/CardRowContext";import{cardRow as le}from"efficient-web-builder/format/lib/content/card-template";import{useCurrency as re}from"../CurrencyContext.js";import{useEnglish as te}from"../EnglishVariant.js";import ne from"./ClearAllButton.js";import se from"./PriceRange.js";import oe from"./SortSelect.js";import{DEFAULT_CATALOG_FILTER_LABELS as H}from"../../lib/content/catalog-filter-labels.js";import{itemKind as U}from"../../lib/catalog/plp-item.js";import{itemLugs as ie,lugFilterLabel as ae}from"../../lib/wheels/lug-count.js";import{CATALOG_TEXT_SIZE as L}from"../../lib/sections/catalog-text-size.js";import{buildPlpFacets as ce,itemMatchesPlp as pe,plpInStockCount as ue,plpPriceBounds as me,plpSortKeysFor as de,PLP_ONE_VALUE_MAX as fe,PLP_SORT_LABELS as ge}from"../../lib/wheels/plp-filters.js";import{FILTER_IN_STOCK_KEY as he,FILTER_PRICE_KEY as T,filterGroupItems as Se}from"../../lib/sections/filter-option-rows.js";import{hasActivePlpFilters as xe}from"../../lib/wheels/plp-filters.js";import{FilterPill as be,PillButton as we}from"./FilterPill.js";import{useShopperFilter as ye}from"./ShopperScope.js";import{HideTaker as ke}from"efficient-web-builder/render/components/ViewHideRoot";const X="lugs";function Ne({owner:t,look:e,lookPhone:n,shown:s,showSort:a,openingSort:i,filtersBelow:r,fieldUsage:p,firstRows:b,editing:N}){const{currency:u}=re(),M=te(),{ref:V,scope:f}=ye({filtersBelow:r,openingSort:i}),{state:g}=f,h=f.live?f.rows:b??f.rows,w=F(()=>[...new Set(h.map(U))],[h]),A=F(()=>{const c=ce(h,g,u,w,p??[],"pass").filter(o=>o.key!=="collections"||s.includes("category"));if(s.includes("lugs")){const o=ve(h,g,u);o&&c.push(o)}return c.map(o=>({...o,label:M(o.label)}))},[h,g,u,w,p,s,M]),I=s.includes("price")?me(h,u):null,P=s.includes("inStock")&&h.length>0?ue(h,g,u):null,Z=de(w.length?w:["alloy-wheel"]),y=f.update,v=K(c=>y({...c,page:1}),[y]),B=K((c,o)=>y(m=>{if(c===X){const x=Number(o),J=(m.lugs??[]).includes(x);return{...m,page:1,lugs:J?(m.lugs??[]).filter(Q=>Q!==x):[...m.lugs??[],x]}}const _=m[c].map(String),j=_.includes(o)?_.filter(x=>x!==o):[..._,o];return{...m,page:1,[c]:c==="diameters"?j.map(Number):j}}),[y]),$=a&&!f.sortInChips,q=F(()=>{const c=Se(A,g,P).map(o=>({...o,options:o.options.map(m=>({...m,press:o.key===he?()=>v({inStockOnly:!g.inStockOnly}):()=>B(o.key,m.value)}))}));return I?[...c,{key:T,label:H.price,options:[]}]:c},[A,g,P,I,v,B]),S={owner:t,items:q,state:g,sorts:Z,showSort:$,set:v,clear:f.clear},O=e==="rail"?l(D,{...S}):l(E,{...S,columns:e==="bar-columns"}),R=(n==="rail"?e==="rail":n==="bar"&&e!=="rail")?null:n==="button"?l(_e,{...S}):n==="rail"?l(D,{...S}):l(E,{...S,columns:!1});return d(ke,{as:"div",ref:V,"data-shopper-filters":"",className:"w-full",children:[R?d(G,{children:[l("div",{className:"max-view-wide:hidden",children:O}),l("div",{className:"view-wide:hidden",children:R})]}):O,N&&f.grids===0&&l("p",{className:`mt-2 font-mono ${L.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:"Filters a Product Grid in this Box"})]})}function ve(t,e,n){const s=new Map,a=new Set;for(const r of t){const p=U(r)==="alloy-wheel"?ie(r):null;p!==null&&(a.add(p),pe(r,e,n,"lugs","pass")&&s.set(p,(s.get(p)??0)+1))}if(a.size<=fe)return null;const i=e.lugs??[];return{key:X,label:H.lugs,options:[...a].sort((r,p)=>r-p).map(r=>({value:String(r),label:ae(r),count:s.get(r)??0,checked:i.includes(r),swatch:null}))}}function k({state:t,sorts:e,set:n}){return l(oe,{value:t.sort,keys:e,labels:ge,onChange:s=>n({sort:s})})}function Y(t,e){return t.key===T?(e.priceMin!=null?1:0)+(e.priceMax!=null?1:0):t.options.filter(n=>n.state.selected).length}function C({owner:t,items:e,state:n,set:s,wrap:a}){const i=(r,p)=>{const b=e[p.index],N=b.key===T?d(G,{children:[r,l(se,{min:n.priceMin,max:n.priceMax,onMin:u=>s({priceMin:u}),onMax:u=>s({priceMax:u})})]}):r;return a(N,b)};return l(ee,{ownerId:t.id,ownerType:"FilterBlock",Template:t.template,rows:e.map(le),items:e,fallback:null,wrapCopy:i,children:r=>r})}function E({columns:t,...e}){const[n,s]=z(null),a=i=>()=>s(r=>r===i?null:i);return t?d("div",{className:"flex flex-col gap-4",children:[l("div",{className:"grid grid-cols-[repeat(auto-fit,minmax(200px,1fr))] gap-6 border-y border-line py-4",children:l(C,{...e,wrap:(i,r)=>l("div",{children:i},r.key)})}),e.showSort&&l("div",{className:"flex flex-wrap items-center justify-end gap-4",children:l(k,{...e})})]}):d("div",{className:"flex flex-wrap items-center gap-2",children:[l(C,{...e,wrap:(i,r)=>l(be,{labelSize:L.labelSmall,name:r.key,label:r.label,badge:Y(r,e.state),open:n===r.key,onToggle:a(r.key),children:i},r.key)}),e.showSort&&l("div",{className:"ml-auto",children:l(k,{...e})})]})}function D(t){return d("aside",{className:"flex w-full flex-col gap-4 lg:w-[268px]",children:[d("div",{className:"flex items-center justify-between",children:[l("h2",{className:"font-display text-[18px] font-medium uppercase tracking-[-0.01em]",children:W("Filter")}),xe(t.state)&&l(ne,{onClick:t.clear})]}),l("div",{className:"flex flex-col",children:l(C,{...t,wrap:(e,n)=>l("div",{className:"border-t border-line py-4",children:e},n.key)})}),t.showSort&&l(k,{...t})]})}function _e(t){const[e,n]=z(!1),s=t.items.reduce((a,i)=>a+Y(i,t.state),0);return d("div",{className:"flex flex-col gap-4",children:[d("div",{className:"flex items-center justify-between gap-4",children:[l(we,{labelSize:L.labelSmall,label:"Filters",badge:s,open:e,onToggle:()=>n(a=>!a)}),t.showSort&&l(k,{...t})]}),e&&l(E,{...t,columns:!0,showSort:!1})]})}export{Ne as default};
@@ -1 +1 @@
1
- "use client";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{PickerField as t}from"./PickerField.js";import{vehicleLevelStates as p}from"./vehicle-level-state.js";import{VEHICLE_FIELD_LABEL as a}from"../../lib/wheels/vehicle-field-focus.js";const b={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4"},u={1:"max-view-tablet:grid-cols-1",2:"max-view-tablet:grid-cols-2",3:"max-view-tablet:grid-cols-3",4:"max-view-tablet:grid-cols-4"},g=e=>e===1||e===2||e===3||e===4?e:void 0;function f(e,i,r){const d=g(i),n=g(r);if(d===void 0&&n===void 0)return e?"grid-cols-1 @min-[20rem]:grid-cols-2 @min-[39rem]:grid-cols-4":"grid-cols-4 max-view-desktop:grid-cols-2 max-[700px]:grid-cols-1";const l=d!==void 0?b[d]:e?"grid-cols-1 @min-[20rem]:grid-cols-2 @min-[39rem]:grid-cols-4":"grid-cols-4 max-view-desktop:grid-cols-2";return n!==void 0?`${l} ${u[n]}`:l}function h({cascade:e,compact:i=!1,editing:r=!1,columns:d,columnsPhone:n}){const{vehicle:l}=e,o=p(e),m=c("div",{className:["grid gap-[2px] border border-line bg-line",f(i,d,n)].join(" "),children:[s(t,{label:a.make,placeholder:o.make.placeholder,disabled:o.make.disabled,value:l.make,options:e.makeOptions,onChange:e.setMake,compact:i,editing:r}),s(t,{label:a.model,placeholder:o.model.placeholder,disabled:o.model.disabled,value:l.model,options:e.modelOptions,onChange:e.setModel,compact:i,editing:r}),s(t,{label:a.year,placeholder:o.year.placeholder,disabled:o.year.disabled,value:l.year!==null?String(l.year):"",options:e.yearOptions,onChange:e.setYear,compact:i,editing:r}),s(t,{label:a.trim,placeholder:o.trim.placeholder,disabled:o.trim.disabled,value:l.modification,options:e.modOptions,onChange:e.setModification,compact:i,editing:r})]});return i?s("div",{className:"@container",children:m}):m}export{h as default,f as pickerGridColumns};
1
+ "use client";import{jsx as s,jsxs as p}from"react/jsx-runtime";import{PickerField as t}from"./PickerField.js";import{vehicleLevelStates as b}from"./vehicle-level-state.js";import{VEHICLE_FIELD_LABEL as a}from"../../lib/wheels/vehicle-field-focus.js";import{HideTaker as g}from"efficient-web-builder/render/components/ViewHideRoot";const u={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4"},f={1:"max-view-tablet:grid-cols-1",2:"max-view-tablet:grid-cols-2",3:"max-view-tablet:grid-cols-3",4:"max-view-tablet:grid-cols-4"},c=e=>e===1||e===2||e===3||e===4?e:void 0;function h(e,i,r){const d=c(i),n=c(r);if(d===void 0&&n===void 0)return e?"grid-cols-1 @min-[20rem]:grid-cols-2 @min-[39rem]:grid-cols-4":"grid-cols-4 max-view-desktop:grid-cols-2 max-[700px]:grid-cols-1";const l=d!==void 0?u[d]:e?"grid-cols-1 @min-[20rem]:grid-cols-2 @min-[39rem]:grid-cols-4":"grid-cols-4 max-view-desktop:grid-cols-2";return n!==void 0?`${l} ${f[n]}`:l}function x({cascade:e,compact:i=!1,editing:r=!1,columns:d,columnsPhone:n}){const{vehicle:l}=e,o=b(e),m=p(g,{className:["grid gap-[2px] border border-line bg-line",h(i,d,n)].join(" "),children:[s(t,{label:a.make,placeholder:o.make.placeholder,disabled:o.make.disabled,value:l.make,options:e.makeOptions,onChange:e.setMake,compact:i,editing:r}),s(t,{label:a.model,placeholder:o.model.placeholder,disabled:o.model.disabled,value:l.model,options:e.modelOptions,onChange:e.setModel,compact:i,editing:r}),s(t,{label:a.year,placeholder:o.year.placeholder,disabled:o.year.disabled,value:l.year!==null?String(l.year):"",options:e.yearOptions,onChange:e.setYear,compact:i,editing:r}),s(t,{label:a.trim,placeholder:o.trim.placeholder,disabled:o.trim.disabled,value:l.modification,options:e.modOptions,onChange:e.setModification,compact:i,editing:r})]});return i?s(g,{className:"@container",children:m}):m}export{x as default,h as pickerGridColumns};
@@ -1 +1 @@
1
- "use client";import{jsx as l,jsxs as s}from"react/jsx-runtime";const t={body:"text-[length:var(--size-body,17px)]",labelSmall:"text-[length:var(--size-label,11px)]",labelLarge:"text-[length:var(--size-label,13px)]"};function a({loading:o,error:n,data:e}){return o?l("div",{className:`mt-10 border border-line bg-bg p-6 font-mono ${t.labelLarge} uppercase tracking-[0.24em] text-fg-dim`,children:"Loading stock fitment…"}):n?s("div",{className:`mt-10 border border-line bg-bg p-6 font-mono ${t.labelLarge} uppercase tracking-[0.22em] text-fg-dim`,children:["Couldn't load stock fitment — ",l("span",{className:"text-accent",children:n})]}):e?s("div",{className:"mt-10 grid grid-cols-4 gap-[2px] border border-line bg-line max-view-desktop:grid-cols-2 max-[700px]:grid-cols-1",children:[l(r,{label:"Bolt pattern",value:e.boltPattern??"—"}),l(r,{label:"PCD",value:e.pcd??"—"}),l(r,{label:"Hub bore",value:e.centreBore?`${e.centreBore} mm`:"—"}),l(r,{label:"ET range",value:e.etRange&&e.etRange.length===2?`${e.etRange[0]} – ${e.etRange[1]}`:"—"}),l(r,{label:"OEM front",value:e.frontWheels.length?e.frontWheels.join(" · "):"—"}),l(r,{label:"OEM rear",value:e.rearWheels.length?e.rearWheels.join(" · "):"—"}),l(r,{label:"OEM front tyres",value:e.frontTyres.length?e.frontTyres.join(" · "):"—"}),l(r,{label:"OEM rear tyres",value:e.rearTyres.length?e.rearTyres.join(" · "):"—"})]}):null}function r({label:o,value:n}){return s("div",{className:"flex min-h-[96px] flex-col gap-2 bg-bg px-5 py-5",children:[l("span",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.26em] text-fg-dim`,children:o}),l("span",{className:`mt-auto font-display ${t.body} font-medium tracking-[-0.01em] text-fg`,children:n})]})}export{a as default};
1
+ "use client";import{jsx as l,jsxs as a}from"react/jsx-runtime";import{HideTaker as s}from"efficient-web-builder/render/components/ViewHideRoot";const t={body:"text-[length:var(--size-body,17px)]",labelSmall:"text-[length:var(--size-label,11px)]",labelLarge:"text-[length:var(--size-label,13px)]"};function i({loading:o,error:n,data:e}){return o?l(s,{className:`mt-10 border border-line bg-bg p-6 font-mono ${t.labelLarge} uppercase tracking-[0.24em] text-fg-dim`,children:"Loading stock fitment…"}):n?a(s,{className:`mt-10 border border-line bg-bg p-6 font-mono ${t.labelLarge} uppercase tracking-[0.22em] text-fg-dim`,children:["Couldn't load stock fitment — ",l("span",{className:"text-accent",children:n})]}):e?a(s,{className:"mt-10 grid grid-cols-4 gap-[2px] border border-line bg-line max-view-desktop:grid-cols-2 max-[700px]:grid-cols-1",children:[l(r,{label:"Bolt pattern",value:e.boltPattern??"—"}),l(r,{label:"PCD",value:e.pcd??"—"}),l(r,{label:"Hub bore",value:e.centreBore?`${e.centreBore} mm`:"—"}),l(r,{label:"ET range",value:e.etRange&&e.etRange.length===2?`${e.etRange[0]} – ${e.etRange[1]}`:"—"}),l(r,{label:"OEM front",value:e.frontWheels.length?e.frontWheels.join(" · "):"—"}),l(r,{label:"OEM rear",value:e.rearWheels.length?e.rearWheels.join(" · "):"—"}),l(r,{label:"OEM front tyres",value:e.frontTyres.length?e.frontTyres.join(" · "):"—"}),l(r,{label:"OEM rear tyres",value:e.rearTyres.length?e.rearTyres.join(" · "):"—"})]}):null}function r({label:o,value:n}){return a("div",{className:"flex min-h-[96px] flex-col gap-2 bg-bg px-5 py-5",children:[l("span",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.26em] text-fg-dim`,children:o}),l("span",{className:`mt-auto font-display ${t.body} font-medium tracking-[-0.01em] text-fg`,children:n})]})}export{i as default};
@@ -1 +1 @@
1
- "use client";import{jsx as e}from"react/jsx-runtime";import{useSyncExternalStore as c}from"react";import{say as m}from"efficient-web-builder/format/lib/editor-words";import h from"./StockFitmentCard.js";import{fitmentAnswerFor as w}from"./fitment-answer-source.js";import l from"../TyreFitVerdicts.js";import{useTyreFitAnswer as S}from"../useTyreFitAnswer.js";import{useSampleProduct as v}from"../pdp-dynamic/useSampleProduct.js";import{useCurrentProduct as A}from"../../lib/document/current-product.js";import{tyreFitQuery as F,unknownAnswer as k}from"../../lib/tyres/tyre-vehicle-fitment.js";import{storefrontVehicleMemory as i}from"../../lib/wheels/vehicle-memory.js";const N=()=>null,x=()=>null,b=k({make:"",model:"",year:0,modification:""});function C({product:o,editing:r=!1,label:s=""}){const n=w(o),a=c(i.subscribeStock,i.readStock,N),u=c(i.subscribe,i.read,x),t=n.source==="tyreVerdicts"?n:null,{answer:p,loading:d,retry:f}=S(t?.slug??"",t&&!r?F(u?.vehicle):null),y=r?e("div",{"data-host-part-sample":"",className:"opacity-60",children:m(s)}):null;return t?r?e("div",{"data-host-part-sample":"",className:"opacity-60",children:e(l,{variants:t.variants,answer:b,headline:m("A sample. On the live page each size shows its own verdict for the shopper's car.")})}):e(l,{variants:t.variants,answer:p,loading:d,onRetry:f}):a?e(h,{loading:a.loading,error:a.error,data:a.stock}):y}function O({editing:o=!1,label:r=""}){const s=A(),n=v(o&&!s);return C({product:s?.product??n,editing:o,label:r})}export{O as default,C as useFitmentAnswerView};
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import{useSyncExternalStore as c}from"react";import{say as m}from"efficient-web-builder/format/lib/editor-words";import{HideTaker as l}from"efficient-web-builder/render/components/ViewHideRoot";import w from"./StockFitmentCard.js";import{fitmentAnswerFor as S}from"./fitment-answer-source.js";import u from"../TyreFitVerdicts.js";import{useTyreFitAnswer as k}from"../useTyreFitAnswer.js";import{useSampleProduct as A}from"../pdp-dynamic/useSampleProduct.js";import{useCurrentProduct as F}from"../../lib/document/current-product.js";import{tyreFitQuery as v,unknownAnswer as N}from"../../lib/tyres/tyre-vehicle-fitment.js";import{storefrontVehicleMemory as i}from"../../lib/wheels/vehicle-memory.js";const x=()=>null,b=()=>null,C=N({make:"",model:"",year:0,modification:""});function O({product:o,editing:r=!1,label:s=""}){const n=S(o),a=c(i.subscribeStock,i.readStock,x),p=c(i.subscribe,i.read,b),t=n.source==="tyreVerdicts"?n:null,{answer:d,loading:f,retry:y}=k(t?.slug??"",t&&!r?v(p?.vehicle):null),h=r?e(l,{"data-host-part-sample":"",className:"opacity-60",children:m(s)}):null;return t?r?e(l,{"data-host-part-sample":"",className:"opacity-60",children:e(u,{variants:t.variants,answer:C,headline:m("A sample. On the live page each size shows its own verdict for the shopper's car.")})}):e(u,{variants:t.variants,answer:d,loading:f,onRetry:y}):a?e(w,{loading:a.loading,error:a.error,data:a.stock}):h}function P({editing:o=!1,label:r=""}){const s=F(),n=A(o&&!s);return O({product:s?.product??n,editing:o,label:r})}export{P as default,O as useFitmentAnswerView};
@@ -1,4 +1,5 @@
1
1
  import type { ProductKind } from "../../lib/api/index.js";
2
+ import type { EuTyreLabel } from "../../lib/tyres/eu-tyre-label.js";
2
3
  export declare const supportedKinds: readonly ProductKind[];
3
4
  interface Props {
4
5
  num?: string;
@@ -8,4 +9,7 @@ export default function DynamicEuTyreLabel(props: Props): import("react").JSX.El
8
9
  export declare function DynamicEuTyreLabelBlock({ editing }: {
9
10
  editing?: boolean;
10
11
  }): import("react").JSX.Element;
12
+ export declare function EuTyreLabelBlockGrades({ labels }: {
13
+ labels: EuTyreLabel[];
14
+ }): import("react").JSX.Element;
11
15
  export {};
@@ -1 +1 @@
1
- "use client";import{jsx as r}from"react/jsx-runtime";import c,{EU_LABEL_BAND as m,EuTyreLabelGrades as d}from"../EuTyreLabels.js";import p from"../SectionBand.js";import a from"./KindGate.js";import{useEuTyreLabels as f}from"../useEuTyreLabels.js";import{useCurrentProduct as y}from"../../lib/document/current-product.js";import{useSampleProduct as b}from"./useSampleProduct.js";import{say as E}from"efficient-web-builder/format/lib/editor-words";const s=["tyre"];function L(e){return r(a,{kinds:s,type:"EuTyreLabel",editing:e.editing,children:r(T,{...e})})}function T({num:e,editing:t=!1}){const n=l(t);return n.length===0&&t?r(p,{className:m,children:r(i,{})}):r(c,{labels:n,num:e??"",capped:!1})}function _({editing:e=!1}){return r(a,{kinds:s,type:"EuTyreLabel",editing:e,children:r(h,{editing:e})})}function h({editing:e}){const t=l(e);return t.length===0?e?r(i,{}):null:r(d,{labels:t})}function l(e){const t=y(),n=b(e&&!t),o=t?.product??n,u=o?.kind==="tyre"?o.source.variants:[];return f(u)}function i(){return r("p",{className:"font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-fg-dim",children:E("The EU label appears here for every size with an EPREL registration number. It is read live from the registry and never stored.")})}export{_ as DynamicEuTyreLabelBlock,L as default,s as supportedKinds};
1
+ "use client";import{jsx as r}from"react/jsx-runtime";import c,{EU_LABEL_BAND as m,EuTyreLabelGrades as d}from"../EuTyreLabels.js";import p from"../SectionBand.js";import a from"./KindGate.js";import{useEuTyreLabels as f}from"../useEuTyreLabels.js";import{useCurrentProduct as y}from"../../lib/document/current-product.js";import{useSampleProduct as b}from"./useSampleProduct.js";import{say as E}from"efficient-web-builder/format/lib/editor-words";import{HideTaker as L,usePeekViewHide as T}from"efficient-web-builder/render/components/ViewHideRoot";const i=["tyre"];function h(e){return r(a,{kinds:i,type:"EuTyreLabel",editing:e.editing,children:r(x,{...e})})}function x({num:e,editing:t=!1}){const n=s(t);return n.length===0&&t?r(p,{className:m,children:r(l,{})}):r(c,{labels:n,num:e??"",capped:!1})}function j({editing:e=!1}){return r(a,{kinds:i,type:"EuTyreLabel",editing:e,children:r(g,{editing:e})})}function g({editing:e}){const t=s(e);return t.length===0?e?r(l,{}):null:r(k,{labels:t})}function k({labels:e}){return r(d,{labels:e,viewHide:T()})}function s(e){const t=y(),n=b(e&&!t),o=t?.product??n,u=o?.kind==="tyre"?o.source.variants:[];return f(u)}function l(){return r(L,{as:"p",className:"font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-fg-dim",children:E("The EU label appears here for every size with an EPREL registration number. It is read live from the registry and never stored.")})}export{j as DynamicEuTyreLabelBlock,k as EuTyreLabelBlockGrades,h as default,i as supportedKinds};
@@ -1 +1 @@
1
- "use client";import{jsx as t,jsxs as E}from"react/jsx-runtime";import I from"efficient-web-builder/render/components/Btn";import B,{GALLERY_GRID_ATTR as C,GalleryLinksContext as j}from"../GalleryItem.js";import{SharedPartKinds as D}from"efficient-web-builder/render/components/PublishedPartStylesContext";import{renderHeadline as F}from"efficient-web-builder/render/components/goldPhrases";import K from"efficient-web-builder/render/components/SectionHeader";import U from"./KindGate.js";import Z from"./RecordPhotoGallery.js";import{headIsEmpty as $,ownPadding as z}from"../../lib/sections/own-padding.js";import{PLP_KINDS as V}from"../../lib/catalog/plp-item.js";import{useCurrentProduct as W}from"../../lib/document/current-product.js";import{SAMPLE_PICTURE_COUNT as S,SAMPLE_RECORD as X,recordPictures as Y,useCurrentRecord as q,useDrawsOtherRecord as J}from"../../lib/document/current-record.js";import{mediaGroupVehicle as Q}from"../../lib/content/source-values.js";import{useSampleProduct as ee}from"./useSampleProduct.js";import{say as _}from"efficient-web-builder/format/lib/editor-words";import{resolveGalleryLayout as re}from"efficient-web-builder/format/lib/content/gallery-layout";const te=V,O=["photos","lifestyle","accessories","others"];function ie(e,o){if(!e)return[];if(o==="all")return O.flatMap(s=>e[s]??[]);const r=O.includes(o)?o:null;return r?e[r]??[]:[]}const T="relative z-[2] bg-bg py-[120px] max-view-wide:py-[70px]",L="relative z-[2] bg-bg pt-0 pb-[120px] max-view-wide:pt-0 max-view-wide:pb-[70px]",M="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]";function oe(e){return J(!!e.editing)?t(ae,{...e}):t(U,{kinds:te,type:"GalleryB",editing:e.editing,children:t(se,{...e})})}function ae(e){const{editing:o=!1}=e,r=q(),s=r?Y(r,{firstField:!0}).map(a=>({images:[a.url],eyebrow:a.alt&&a.alt!==r.title?a.alt:void 0,...a.video?{video:a.video}:{}})):o?Array.from({length:S},()=>({images:[""]})):[];return t(R,{...e,tiles:s,owner:{name:(r??X).title},photosOnly:!0,emptyHint:_("This record’s pictures appear here on its page. A record with no pictures draws nothing.")})}function Ne(e){const{rows:o,limit:r,layout:s,editing:a=!1,title:u}=e,d=typeof r=="number"&&r>0?Math.floor(r):void 0,h=o.filter(n=>typeof n.cover=="string"&&n.cover).map(n=>({images:[n.cover],...n.video?{video:n.video}:{}})),c=a&&h.length===0?Array.from({length:d??S},()=>({images:[""]})):h;return t(R,{...e,tiles:d?c.slice(0,d):c,owner:{name:(u??"").replace(/==/g,"").trim()},photosOnly:!0,tilesAcross:re(s)?.across===3?3:4,emptyHint:_("The website’s pictures appear here, in the order they are put in. A website with no pictures draws nothing.")})}function se({omitHead:e=!1,num:o,title:r,linkText:s,linkHref:a,galleryHref:u="/gallery",submitHref:d="/contact",zone:h="all",photoDisplay:c="covers",previewHover:n,display:b,displayPhone:g,styleOwner:v,editing:p=!1,padTop:G,padBottom:x}){const w=W(),N=ee(p&&!w),f=w?.product??N,y=ie(f?.mediaGroups,h).map(i=>({images:(i.items??[]).filter(m=>m.kind==="image").map(m=>m.url),vehicle:Q(i),finish:i.finish})).filter(i=>i.images.length>0),P=(c==="auto"?y.length>=4?"covers":"all":c)==="all"?y.flatMap(i=>i.images.map(m=>({images:[m],vehicle:i.vehicle,finish:i.finish}))):y;return t(R,{omitHead:e,num:o,title:r,linkText:s,linkHref:a,galleryHref:u,submitHref:d,previewHover:n,display:b,displayPhone:g,styleOwner:v,editing:p,padTop:G,padBottom:x,tiles:f?P.map(i=>({images:i.images,eyebrow:i.vehicle||void 0,meta:i.finish})):[],owner:{name:f?.name??"",href:f?.href,process:f?.eyebrow},emptyHint:_("This product’s photos appear here on a product page. Add media groups in the product’s Media tab.")})}function R({omitHead:e=!1,num:o,title:r,linkText:s,linkHref:a,galleryHref:u="/gallery",submitHref:d="/contact",previewHover:h,display:c,displayPhone:n,styleOwner:b,editing:g=!1,tiles:v,owner:p,emptyHint:G,photosOnly:x=!1,tilesAcross:w,padTop:N,padBottom:f}){const y=s?{text:s,href:a||"#"}:void 0,A=r?F(r,!1):void 0,P=e?null:t(K,{num:o,title:A,link:y}),i=!g&&$(o,r,y?.text)?null:P,m=z(N,f);return v.length===0?g?t("section",{className:e?L:T,style:m,children:E("div",{className:M,children:[i,t("p",{className:"mt-8 border-t border-line py-6 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-fg-dim",children:G})]})}):null:t("section",{className:e?L:T,style:m,children:E("div",{className:M,children:[i,x?t(Z,{pictures:v.map(l=>({url:l.images[0]??"",alt:l.eyebrow,video:l.video})),name:p.name,editing:g,...w?{fit:"tiles",across:w}:{}}):t(j.Provider,{value:{galleryHref:u,submitHref:d,previewHover:h,display:c,displayPhone:n,styleOwner:b,photosOnly:x},children:t(D,{children:t("div",{[C]:"",className:"grid grid-cols-4 gap-2 max-[1500px]:grid-cols-3 max-view-wide:grid-cols-1 max-view-wide:gap-1",children:v.map((l,k)=>t(B,{image:l.images[0],photos:l.images.slice(1).map(H=>({src:H})),href:p.href,process:p.process,eyebrow:l.eyebrow,name:p.name,meta:l.meta,editing:g},`${l.eyebrow}-${k}`))})})}),!x&&t("div",{className:"mt-12 flex flex-col items-center gap-3",children:t(I,{href:u,variant:"ghost",children:"See Gallery"})})]})})}export{Ne as SourcedGalleryGrid,oe as default,te as supportedKinds};
1
+ "use client";import{jsx as t,jsxs as S}from"react/jsx-runtime";import C from"efficient-web-builder/render/components/Btn";import j,{GALLERY_GRID_ATTR as D,GalleryLinksContext as F}from"../GalleryItem.js";import{SharedPartKinds as K}from"efficient-web-builder/render/components/PublishedPartStylesContext";import{renderHeadline as U}from"efficient-web-builder/render/components/goldPhrases";import Z from"efficient-web-builder/render/components/SectionHeader";import $ from"./KindGate.js";import z from"./RecordPhotoGallery.js";import{headIsEmpty as V,ownPadding as W}from"../../lib/sections/own-padding.js";import{PLP_KINDS as X}from"../../lib/catalog/plp-item.js";import{useCurrentProduct as Y}from"../../lib/document/current-product.js";import{SAMPLE_PICTURE_COUNT as T,SAMPLE_RECORD as q,recordPictures as J,useCurrentRecord as Q,useDrawsOtherRecord as ee}from"../../lib/document/current-record.js";import{mediaGroupVehicle as re}from"../../lib/content/source-values.js";import{useSampleProduct as te}from"./useSampleProduct.js";import{say as _}from"efficient-web-builder/format/lib/editor-words";import{galleryLayoutRatio as ie,resolveGalleryLayout as oe}from"efficient-web-builder/format/lib/content/gallery-layout";import{HideTaker as L}from"efficient-web-builder/render/components/ViewHideRoot";const ae=X,O=["photos","lifestyle","accessories","others"];function se(e,o){if(!e)return[];if(o==="all")return O.flatMap(s=>e[s]??[]);const r=O.includes(o)?o:null;return r?e[r]??[]:[]}const k="relative z-[2] bg-bg py-[120px] max-view-wide:py-[70px]",H="relative z-[2] bg-bg pt-0 pb-[120px] max-view-wide:pt-0 max-view-wide:pb-[70px]",M="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]";function ne(e){return ee(!!e.editing)?t(le,{...e}):t($,{kinds:ae,type:"GalleryB",editing:e.editing,children:t(me,{...e})})}function le(e){const{editing:o=!1}=e,r=Q(),s=r?J(r,{firstField:!0}).map(a=>({images:[a.url],eyebrow:a.alt&&a.alt!==r.title?a.alt:void 0,...a.video?{video:a.video}:{}})):o?Array.from({length:T},()=>({images:[""]})):[];return t(A,{...e,tiles:s,owner:{name:(r??q).title},photosOnly:!0,emptyHint:_("This record’s pictures appear here on its page. A record with no pictures draws nothing.")})}function Ae(e){const{rows:o,limit:r,layout:s,editing:a=!1,title:h}=e,d=oe(s),c=typeof r=="number"&&r>0?Math.floor(r):void 0,p=o.filter(n=>typeof n.cover=="string"&&n.cover).map(n=>({images:[n.cover],...n.video?{video:n.video}:{}})),g=a&&p.length===0?Array.from({length:c??T},()=>({images:[""]})):p;return t(A,{...e,tiles:c?g.slice(0,c):g,owner:{name:(h??"").replace(/==/g,"").trim()},photosOnly:!0,tilesAcross:d?.across===3?3:4,tileRatio:d?ie(d):null,emptyHint:_("The website’s pictures appear here, in the order they are put in. A website with no pictures draws nothing.")})}function me({omitHead:e=!1,num:o,title:r,linkText:s,linkHref:a,galleryHref:h="/gallery",submitHref:d="/contact",zone:c="all",photoDisplay:p="covers",previewHover:g,display:n,displayPhone:y,styleOwner:v,editing:f=!1,padTop:G,padBottom:x}){const w=Y(),N=te(f&&!w),u=w?.product??N,b=se(u?.mediaGroups,c).map(i=>({images:(i.items??[]).filter(m=>m.kind==="image").map(m=>m.url),vehicle:re(i),finish:i.finish})).filter(i=>i.images.length>0),R=(p==="auto"?b.length>=4?"covers":"all":p)==="all"?b.flatMap(i=>i.images.map(m=>({images:[m],vehicle:i.vehicle,finish:i.finish}))):b;return t(A,{omitHead:e,num:o,title:r,linkText:s,linkHref:a,galleryHref:h,submitHref:d,previewHover:g,display:n,displayPhone:y,styleOwner:v,editing:f,padTop:G,padBottom:x,tiles:u?R.map(i=>({images:i.images,eyebrow:i.vehicle||void 0,meta:i.finish})):[],owner:{name:u?.name??"",href:u?.href,process:u?.eyebrow},emptyHint:_("This product’s photos appear here on a product page. Add media groups in the product’s Media tab.")})}function A({omitHead:e=!1,num:o,title:r,linkText:s,linkHref:a,galleryHref:h="/gallery",submitHref:d="/contact",previewHover:c,display:p,displayPhone:g,styleOwner:n,editing:y=!1,tiles:v,owner:f,emptyHint:G,photosOnly:x=!1,tilesAcross:w,tileRatio:N=null,padTop:u,padBottom:b}){const P=s?{text:s,href:a||"#"}:void 0,R=r?U(r,!1):void 0,i=e?null:t(Z,{num:o,title:R,link:P}),m=!y&&V(o,r,P?.text)?null:i,E=W(u,b);return v.length===0?y?t(L,{as:"section",className:e?H:k,style:E,children:S("div",{className:M,children:[m,t("p",{className:"mt-8 border-t border-line py-6 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-fg-dim",children:G})]})}):null:t(L,{as:"section",className:e?H:k,style:E,children:S("div",{className:M,children:[m,x?t(z,{pictures:v.map(l=>({url:l.images[0]??"",alt:l.eyebrow,video:l.video})),name:f.name,editing:y,...w?{fit:"tiles",across:w,ratio:N}:{}}):t(F.Provider,{value:{galleryHref:h,submitHref:d,previewHover:c,display:p,displayPhone:g,styleOwner:n,photosOnly:x},children:t(K,{children:t("div",{[D]:"",className:"grid grid-cols-4 gap-2 max-[1500px]:grid-cols-3 max-view-wide:grid-cols-1 max-view-wide:gap-1",children:v.map((l,I)=>t(j,{image:l.images[0],photos:l.images.slice(1).map(B=>({src:B})),href:f.href,process:f.process,eyebrow:l.eyebrow,name:f.name,meta:l.meta,editing:y},`${l.eyebrow}-${I}`))})})}),!x&&t("div",{className:"mt-12 flex flex-col items-center gap-3",children:t(C,{href:h,variant:"ghost",children:"See Gallery"})})]})})}export{Ae as SourcedGalleryGrid,ne as default,ae as supportedKinds};
@@ -1 +1 @@
1
- "use client";import{jsx as e,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";function b({editing:o=!1,...t}){const r=h();return r?e(i,{product:r.product,selection:r.selection,onLightbox:r.openLightbox,editing:o,...t}):o?e(y,{...t}):null}function i({product:o,selection:t,onLightbox:r,editing:n,...u}){const s=!f({whenUnset:!0});return e(l,{product:o,view:d(o,t,n),angleIdx:t.angleIdx,onSelect:t.setAngleIdx,isLight:s,onLightbox:r,...u})}function y(o){const t=S(!0);return t?e(I,{product:t,...o}):e("p",{className:p,children:L("Loading sample product…")})}function I({product:o,...t}){const r=x(o,{editing:!0}),n=g();return c(m,{children:[e(i,{product:o,selection:r,onLightbox:n.open,editing:!0,...t}),e(a,{item:n.item,onClose:n.close})]})}export{b 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{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};
@@ -4,10 +4,11 @@ export interface GalleryPicture {
4
4
  video?: string;
5
5
  }
6
6
  export declare function pictureLabel(picture: GalleryPicture, name: string): string;
7
- export default function RecordPhotoGallery({ pictures, name, editing, fit, across, }: {
7
+ export default function RecordPhotoGallery({ pictures, name, editing, fit, across, ratio, }: {
8
8
  pictures: readonly GalleryPicture[];
9
9
  fit?: "section" | "column" | "tiles";
10
10
  across?: 3 | 4;
11
+ ratio?: readonly [number, number] | null;
11
12
  name: string;
12
13
  editing?: boolean;
13
14
  }): import("react").JSX.Element | null;
@@ -1 +1 @@
1
- "use client";import{jsx as t,Fragment as b,jsxs as c}from"react/jsx-runtime";import{useCallback as B,useRef as C,useState as E}from"react";import{sizedImage as M}from"efficient-web-builder/format/lib/sized-image";import P from"efficient-web-builder/render/components/Placeholder";import A,{LightboxClose as U,LIGHTBOX_CLOSE_TINT as z}from"../Lightbox.js";import{GALLERY_GRID_ATTR as L}from"../GalleryItem.js";const R="(max-width: 1600px) 100vw, 1600px",G="(max-width: 1100px) 100vw, 50vw",D="(max-width: 800px) 30vw, 200px",H="100vw";function p(r,l){return r.video?l?`Play video of ${l}`:"Play video":l?`Open photo of ${l}`:"Open photo"}function Z({small:r=!1}){return t("span",{"aria-hidden":!0,"data-play-badge":"",className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:t("span",{className:`flex items-center justify-center rounded-full bg-bg/75 text-fg ${r?"h-8 w-8 text-[length:12px]":"h-16 w-16 text-[length:22px]"}`,children:"▶"})})}const F="relative block w-full overflow-hidden bg-surface-2",X="block h-[min(78vh,820px)] w-full object-cover max-view-wide:h-[min(70vh,560px)]",W="block aspect-[4/5] max-h-[80vh] w-full object-cover",q="grid grid-cols-4 gap-2",Y="relative block aspect-square w-full overflow-hidden bg-surface-2",I="block h-full w-full object-cover",J="grid grid-cols-6 gap-2 max-view-wide:grid-cols-4",K={3:"grid grid-cols-3 gap-2 max-view-wide:grid-cols-2",4:"grid grid-cols-4 gap-2 max-view-wide:grid-cols-2"},Q="relative block aspect-[4/5] w-full overflow-hidden bg-surface-2",V="(max-width: 800px) 50vw, 25vw",ee="cursor-pointer text-left focus:outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2",$="absolute top-1/2 z-[2] flex h-14 w-14 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 font-mono text-[length:var(--size-label,22px)] text-fg-dim transition-colors hover:border-accent hover:text-accent max-[700px]:h-11 max-[700px]:w-11";function te({pictures:r,name:l,editing:g=!1,fit:v="section",across:S=4}){const[j,w]=E(!1),[i,f]=E(0),h=C(null),O=B(e=>{e?h.current=e:(h.current?.pause(),h.current=null)},[]),o=r.length,y=v==="column";if(o===0)return null;const _=()=>f(e=>(e-1+o)%o),N=()=>f(e=>(e+1)%o),T=e=>{f(e),w(!0)},a=r[Math.min(i,o-1)],d=(e,s,n,m)=>e.url?t("span",{className:`${n} relative`,children:t(P,{label:e.alt||l||"photo",src:e.url,alt:e.alt||l,sizes:s,objectFit:"cover",showBackground:!1})}):t("span",{"aria-hidden":!0,className:`${n} bg-surface-2`}),u=v==="tiles",x=(e,s,n)=>{const m=c(b,{children:[u?d(e,V,I,800):n?y?d(e,G,W,1200):d(e,R,X,1600):d(e,D,I,400),e.video&&t(Z,{small:!n&&!u})]}),k=u?Q:n?F:Y;return g?t("div",{className:k,children:m}):t("button",{type:"button","aria-label":p(e,l),onClick:()=>T(s),className:`${k} ${ee}`,children:m})};return c(b,{children:[u?t("ul",{[L]:"","data-record-gallery":"tiles",className:K[S===3?3:4],children:r.map((e,s)=>t("li",{children:x(e,s,!1)},`${e.url}-${s}`))}):c("div",{[L]:"","data-record-gallery":"",className:"flex flex-col gap-2",children:[x(r[0],0,!0),o>1&&t("ul",{className:y?q:J,children:r.slice(1).map((e,s)=>t("li",{children:x(e,s+1,!1)},`${e.url}-${s+1}`))})]}),!g&&t(A,{open:j,onClose:()=>w(!1),label:p(a,l),onPrev:o>1?_:void 0,onNext:o>1?N:void 0,className:"flex items-center justify-center p-6 max-[700px]:p-3",children:c("div",{onClick:e=>e.stopPropagation(),className:"relative flex h-full w-full items-center justify-center",children:[t(U,{className:"absolute right-0 top-0 z-[3] flex h-12 w-12 cursor-pointer items-center justify-center border border-line font-mono text-[length:var(--size-label,18px)] text-fg-dim transition-colors hover:border-accent hover:text-fg",style:{background:z},children:"✕"}),a.video?t("video",{ref:O,controls:!0,playsInline:!0,preload:"metadata",poster:a.url,src:a.video,"aria-label":p(a,l),className:"block max-h-[calc(100vh-120px)] max-w-full bg-bg"},`video-${i}`):t("img",{...M(a.url,{fallbackWidth:1600}),sizes:H,alt:`${a.alt||l||"Photo"} — ${i+1} of ${o}`,className:"block max-h-[calc(100vh-120px)] max-w-full object-contain"},`photo-${i}`),o>1&&c(b,{children:[t("button",{type:"button","aria-label":"Previous photo",onClick:_,className:`${$} left-0`,children:"◁"}),t("button",{type:"button","aria-label":"Next photo",onClick:N,className:`${$} right-0`,children:"▷"}),c("span",{"data-gallery-counter":"",className:"absolute bottom-0 left-1/2 -translate-x-1/2 border border-fg-dim/30 bg-overlay-scrim/50 px-4 py-1.5 font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.22em] text-fg-dim backdrop-blur-[4px]",children:[i+1," / ",o]})]})]})})]})}export{te as default,p as pictureLabel};
1
+ "use client";import{jsx as t,Fragment as v,jsxs as c}from"react/jsx-runtime";import{useCallback as M,useRef as P,useState as $}from"react";import{sizedImage as R}from"efficient-web-builder/format/lib/sized-image";import U from"efficient-web-builder/render/components/Placeholder";import z,{LightboxClose as G,LIGHTBOX_CLOSE_TINT as D}from"../Lightbox.js";import{GALLERY_GRID_ATTR as S}from"../GalleryItem.js";const H="(max-width: 1600px) 100vw, 1600px",X="(max-width: 1100px) 100vw, 50vw",Z="(max-width: 800px) 30vw, 200px",F="100vw";function g(s,l){return s.video?l?`Play video of ${l}`:"Play video":l?`Open photo of ${l}`:"Open photo"}function W({small:s=!1}){return t("span",{"aria-hidden":!0,"data-play-badge":"",className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:t("span",{className:`flex items-center justify-center rounded-full bg-bg/75 text-fg ${s?"h-8 w-8 text-[length:12px]":"h-16 w-16 text-[length:22px]"}`,children:"▶"})})}const q="relative block w-full overflow-hidden bg-surface-2",Y="block h-[min(78vh,820px)] w-full object-cover max-view-wide:h-[min(70vh,560px)]",J="block aspect-[4/5] max-h-[80vh] w-full object-cover",K="grid grid-cols-4 gap-2",Q="relative block aspect-square w-full overflow-hidden bg-surface-2",O="block h-full w-full object-cover",V="grid grid-cols-6 gap-2 max-view-wide:grid-cols-4",ee={3:"grid grid-cols-3 gap-2 max-view-wide:grid-cols-2",4:"grid grid-cols-4 gap-2 max-view-wide:grid-cols-2"},te="relative block aspect-[4/5] w-full overflow-hidden bg-surface-2",le="relative block w-full overflow-hidden bg-surface-2",oe="(max-width: 800px) 50vw, 25vw",se="cursor-pointer text-left focus:outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2",T="absolute top-1/2 z-[2] flex h-14 w-14 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 font-mono text-[length:var(--size-label,22px)] text-fg-dim transition-colors hover:border-accent hover:text-accent max-[700px]:h-11 max-[700px]:w-11";function ne({pictures:s,name:l,editing:w=!1,fit:y="section",across:j=4,ratio:f=null}){const[B,_]=$(!1),[i,h]=$(0),x=P(null),C=M(e=>{e?x.current=e:(x.current?.pause(),x.current=null)},[]),o=s.length,N=y==="column";if(o===0)return null;const k=()=>h(e=>(e-1+o)%o),E=()=>h(e=>(e+1)%o),A=e=>{h(e),_(!0)},r=s[Math.min(i,o-1)],u=(e,n,a,p)=>e.url?t("span",{className:`${a} relative`,children:t(U,{label:e.alt||l||"photo",src:e.url,alt:e.alt||l,sizes:n,objectFit:"cover",showBackground:!1})}):t("span",{"aria-hidden":!0,className:`${a} bg-surface-2`}),d=y==="tiles",b=f?{aspectRatio:`${f[0]} / ${f[1]}`}:null,m=(e,n,a)=>{const p=c(v,{children:[d?u(e,oe,O,800):a?N?u(e,X,J,1200):u(e,H,Y,1600):u(e,Z,O,400),e.video&&t(W,{small:!a&&!d})]}),I=d?b?le:te:a?q:Q,L=d&&b?b:void 0;return w?t("div",{className:I,style:L,children:p}):t("button",{type:"button","aria-label":g(e,l),onClick:()=>A(n),className:`${I} ${se}`,style:L,children:p})};return c(v,{children:[d?t("ul",{[S]:"","data-record-gallery":"tiles",className:ee[j===3?3:4],children:s.map((e,n)=>t("li",{children:m(e,n,!1)},`${e.url}-${n}`))}):c("div",{[S]:"","data-record-gallery":"",className:"flex flex-col gap-2",children:[m(s[0],0,!0),o>1&&t("ul",{className:N?K:V,children:s.slice(1).map((e,n)=>t("li",{children:m(e,n+1,!1)},`${e.url}-${n+1}`))})]}),!w&&t(z,{open:B,onClose:()=>_(!1),label:g(r,l),onPrev:o>1?k:void 0,onNext:o>1?E:void 0,className:"flex items-center justify-center p-6 max-[700px]:p-3",children:c("div",{onClick:e=>e.stopPropagation(),className:"relative flex h-full w-full items-center justify-center",children:[t(G,{className:"absolute right-0 top-0 z-[3] flex h-12 w-12 cursor-pointer items-center justify-center border border-line font-mono text-[length:var(--size-label,18px)] text-fg-dim transition-colors hover:border-accent hover:text-fg",style:{background:D},children:"✕"}),r.video?t("video",{ref:C,controls:!0,playsInline:!0,preload:"metadata",poster:r.url,src:r.video,"aria-label":g(r,l),className:"block max-h-[calc(100vh-120px)] max-w-full bg-bg"},`video-${i}`):t("img",{...R(r.url,{fallbackWidth:1600}),sizes:F,alt:`${r.alt||l||"Photo"} — ${i+1} of ${o}`,className:"block max-h-[calc(100vh-120px)] max-w-full object-contain"},`photo-${i}`),o>1&&c(v,{children:[t("button",{type:"button","aria-label":"Previous photo",onClick:k,className:`${T} left-0`,children:"◁"}),t("button",{type:"button","aria-label":"Next photo",onClick:E,className:`${T} right-0`,children:"▷"}),c("span",{"data-gallery-counter":"",className:"absolute bottom-0 left-1/2 -translate-x-1/2 border border-fg-dim/30 bg-overlay-scrim/50 px-4 py-1.5 font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.22em] text-fg-dim backdrop-blur-[4px]",children:[i+1," / ",o]})]})]})})]})}export{ne as default,g as pictureLabel};
@@ -1 +1 @@
1
- "use client";import{jsx as e}from"react/jsx-runtime";import{useBoundForm as b,useFormSubmission as p}from"../formSubmission.js";import S from"efficient-web-builder/render/components/SectionHeader";import{SubmitFormColumn as h}from"./SubmitRegions.js";import{submitKindStyle as x}from"../../lib/submit/text-kinds.js";const E=["head","form"],M={head:"Head",form:"Form"};function y({region:m,eyebrow:n,title:i,body:u,buttonText:d,consent:f,formSlug:r,form:l,editing:t=!1,...c}){const o=b(r,l),a=p({form:o,formSlug:r,editing:t}),s=x(c);return m==="head"?e("div",{style:s,children:e(S,{look:"statement",num:n,title:i})}):e("div",{style:s,children:e(h,{body:u??"",buttonLabel:d??"",consent:f??"",form:o,submission:a,showForm:!!o||t,resolving:o===void 0,editing:t})})}export{E as SUBMIT_REGIONS,M as SUBMIT_REGION_NAMES,y as default};
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import{useBoundForm as p,useFormSubmission as S}from"../formSubmission.js";import h from"efficient-web-builder/render/components/SectionHeader";import{SubmitFormColumn as x}from"./SubmitRegions.js";import{submitKindStyle as y}from"../../lib/submit/text-kinds.js";import{HideTaker as m}from"efficient-web-builder/render/components/ViewHideRoot";const M=["head","form"],N={head:"Head",form:"Form"};function F({region:i,eyebrow:n,title:u,body:d,buttonText:f,consent:l,formSlug:t,form:a,editing:r=!1,...c}){const o=p(t,a),b=S({form:o,formSlug:t,editing:r}),s=y(c);return i==="head"?e(m,{as:"div",style:s,children:e(h,{look:"statement",num:n,title:u})}):e(m,{as:"div",style:s,children:e(x,{body:d??"",buttonLabel:f??"",consent:l??"",form:o,submission:b,showForm:!!o||r,resolving:o===void 0,editing:r})})}export{M as SUBMIT_REGIONS,N as SUBMIT_REGION_NAMES,F as default};
@@ -2,5 +2,9 @@ import { type SeededNode } from "efficient-web-builder/format/lib/document/seed-
2
2
  type Props = Record<string, unknown>;
3
3
  export declare const MENU_LINK_BLOCK = "MenuLinkBlock";
4
4
  export declare function menuCardSeed(nodeId: string): SeededNode[];
5
+ export declare const MENU_BLOG_CATEGORIES_SOURCE = "blog-categories";
6
+ export declare const MENU_COUNT_FIELD = "count";
7
+ export declare function menuCountCardSeed(nodeId: string): SeededNode[];
8
+ export declare function menuTemplateFollowsContent(props: Props): Props;
5
9
  export declare function withMenuTemplate(props: Props): Props;
6
10
  export {};
@@ -1 +1 @@
1
- import{seedNodes as n}from"efficient-web-builder/format/lib/document/seed-parts";const i="MenuLinkBlock";function u(e){return n([{type:i}],()=>`${e}~link`)}function r(e){if(e.template!==void 0)return e;const t=typeof e.id=="string"&&e.id.trim()?e.id:"Menu";return{...e,template:u(t)}}export{i as MENU_LINK_BLOCK,u as menuCardSeed,r as withMenuTemplate};
1
+ import{INNER_BOX as g,TEXT as N,seedNodes as i}from"efficient-web-builder/format/lib/document/seed-parts";import{BOX_TYPE as c,CONTAINER_BLOCKS_SLOT as _}from"efficient-web-builder/format/lib/document/container-blocks";import{rowFieldTextSeed as O}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{declaredBlockSource as d}from"efficient-web-builder/format/lib/content/block-sources";import{MENU_ENTRY_SIZE_PX as C}from"./menu-entry-type.js";const r="MenuLinkBlock";function l(t){return i([{type:r}],()=>`${t}~link`)}const E="blog-categories",T="count",y={...g,direction:"row",align:"center",gap:8,gapPhone:8,phoneRow:2,sharePhone:"content",wrapPhone:!1,name:"Card"},S="main",h={size:C,lineHeight:1,color:S};function a(t){const e={0:`${t}~card`,"0.0":`${t}~link`,"0.1":`${t}~count`};return i([{type:c,props:y,slots:{[_]:[{type:r},O(T,{...N,tag:"p"},h)]}}],(o,n)=>e[n]??`${t}~${n}`)}const s=t=>typeof t.id=="string"&&t.id.trim()?t.id:"Menu",u=t=>d(t)===E,m=t=>(u(t)?a:l)(s(t)),w=(t,e)=>Array.isArray(t)&&t.length===e.length&&JSON.stringify(t)===JSON.stringify(e);function x(t){const e=t.template;if(!Array.isArray(e)||e.length!==1)return t;const o=e[0]?.type;if(o!==r&&o!==c)return t;const n=s(t),f=u(t)?l(n):a(n);return w(e,f)?{...t,template:m(t)}:t}function $(t){return t.template!==void 0?x(t):{...t,template:m(t)}}export{E as MENU_BLOG_CATEGORIES_SOURCE,T as MENU_COUNT_FIELD,r as MENU_LINK_BLOCK,l as menuCardSeed,a as menuCountCardSeed,x as menuTemplateFollowsContent,$ as withMenuTemplate};
@@ -0,0 +1,2 @@
1
+ export declare const MENU_ENTRY_SIZE_PX = 13;
2
+ export declare const MENU_ENTRY_SIZE_CLASS = "text-[13px]";
@@ -0,0 +1 @@
1
+ const t=13,E="text-[13px]";export{E as MENU_ENTRY_SIZE_CLASS,t as MENU_ENTRY_SIZE_PX};
@@ -0,0 +1,8 @@
1
+ import { type SourceRow } from "efficient-web-builder/format/lib/content/block-sources";
2
+ export interface ServedRowLists<T> {
3
+ byKey: Map<string, T>;
4
+ byIndex: T[];
5
+ }
6
+ export declare function servedRowLists<T>(props: Record<string, unknown>, read: (row: Record<string, unknown>) => T): ServedRowLists<T>;
7
+ export declare function servedListOf<T>(lists: ServedRowLists<T> | null, row: SourceRow, index: number): T | undefined;
8
+ export declare function servedWords(value: unknown, max: number): readonly string[] | undefined;
@@ -0,0 +1 @@
1
+ import{BLOCK_SOURCE_ROWS_PROP as c}from"efficient-web-builder/format/lib/content/block-sources";function d(e,t){const n=e[c],r=new Map,s=[];if(!Array.isArray(n))return{byKey:r,byIndex:s};for(const i of n){if(!i||typeof i!="object"||Array.isArray(i))continue;const o=i;if(!Object.values(o).some(y=>typeof y=="string"&&y))continue;const f=t(o);s.push(f),typeof o.key=="string"&&o.key&&r.set(o.key,f)}return{byKey:r,byIndex:s}}function p(e,t,n){if(e)return t.key?e.byKey.get(t.key):e.byIndex[n]}function a(e,t){if(!Array.isArray(e))return;const n=e.filter(r=>typeof r=="string"&&!!r.trim()).map(r=>r.trim()).slice(0,t);return n.length?n:void 0}export{p as servedListOf,d as servedRowLists,a as servedWords};
@@ -1 +1 @@
1
- import{jsx as m}from"react/jsx-runtime";import{phoneKey as y}from"efficient-easel/draw";import f,{SourcedGalleryGrid as r}from"../../../../../components/pdp-dynamic/DynamicGalleryGrid.js";import{declaredBlockSource as c,sourcedRows as H}from"efficient-web-builder/format/lib/content/block-sources";import g from"../../../../../components/GalleryGrid.js";import{hidableText as d}from"efficient-easel/screen/lib/document/hidable";import{parseSectionHeadPlacement as k}from"efficient-web-builder/format/lib/sections/section-head-placement";import{phHide as i}from"efficient-web-builder/render/lib/document/blocks/scaffold";import{GalleryBMeta as T,GALLERY_B_PH as n}from"./meta.js";const D={...T,render:e=>{const l=k(e.headPlacement)==="own-box",t=a=>l?void 0:a;if(c(e)!==""){const a=!!e.editor?.isEditing,{rows:o,sample:u}=H(e,a);return m(r,{num:t(i(e.num,n.num,e.editor)),title:t(i(e.title,n.title,e.editor)),linkText:t(i(e.linkText,n.link,e.editor)),linkHref:t(d(e.linkHref)||"/contact"),omitHead:l,rows:u?[]:o,limit:e.limit,layout:e.layout,editing:a,padTop:typeof e.padTop=="number"?e.padTop:void 0,padBottom:typeof e.padBottom=="number"?e.padBottom:void 0})}return e.dynamic?m(f,{num:t(i(e.num,n.num,e.editor)),title:t(i(e.title,n.title,e.editor)),linkText:t(i(e.linkText,n.link,e.editor)),linkHref:t(d(e.linkHref)||"/contact"),omitHead:l,galleryHref:d(e.galleryHref)||"/gallery",zone:e.mediaZone||"all",photoDisplay:e.photoDisplay||"covers",previewHover:e.previewHover,display:e.display,displayPhone:e.displayPhone,styleOwner:e.id,editing:e.editor?.isEditing,padTop:typeof e.padTop=="number"?e.padTop:void 0,padBottom:typeof e.padBottom=="number"?e.padBottom:void 0}):m(g,{num:t(i(e.num,n.num,e.editor)),title:t(i(e.title,n.title,e.editor)),omitHead:l,linkText:t(i(e.linkText,n.link,e.editor)),linkHref:t(d(e.linkHref)||"/contact"),galleryHref:d(e.galleryHref)||"/gallery",previewHover:e.previewHover,display:e.display,displayPhone:e.displayPhone,styleOwner:e.id,layout:e.layout,columns:e.columns,columnsMobile:e.columnsMobile,gap:e.gap,gapPhone:e[y("gap")],items:e.items,padTop:typeof e.padTop=="number"?e.padTop:void 0,padBottom:typeof e.padBottom=="number"?e.padBottom:void 0,editing:e.editor?.isEditing})}};export{D as GalleryBRender};
1
+ import{Fragment as f,jsx as l}from"react/jsx-runtime";import{phoneKey as g}from"efficient-easel/draw";import H,{SourcedGalleryGrid as T}from"../../../../../components/pdp-dynamic/DynamicGalleryGrid.js";import{declaredBlockSource as k,sourcedRows as B}from"efficient-web-builder/format/lib/content/block-sources";import y from"../../../../../components/GalleryGrid.js";import{PRODUCT_PICTURES_SOURCE as h,productPictureTiles as x,productPicturesLayout as P}from"../../../../sections/product-pictures.js";import{hidableText as a}from"efficient-easel/screen/lib/document/hidable";import{parseSectionHeadPlacement as w}from"efficient-web-builder/format/lib/sections/section-head-placement";import{phHide as i}from"efficient-web-builder/render/lib/document/blocks/scaffold";import{GalleryBMeta as b,GALLERY_B_PH as n}from"./meta.js";const M={...b,render:e=>{const o=w(e.headPlacement)==="own-box",t=d=>o?void 0:d,u={num:t(i(e.num,n.num,e.editor)),title:t(i(e.title,n.title,e.editor)),omitHead:o,linkText:t(i(e.linkText,n.link,e.editor)),linkHref:t(a(e.linkHref)||"/contact"),galleryHref:a(e.galleryHref)||"/gallery",previewHover:e.previewHover,display:e.display,displayPhone:e.displayPhone,styleOwner:e.id,layout:e.layout,columns:e.columns,columnsMobile:e.columnsMobile,gap:e.gap,gapPhone:e[g("gap")],padTop:typeof e.padTop=="number"?e.padTop:void 0,padBottom:typeof e.padBottom=="number"?e.padBottom:void 0,editing:e.editor?.isEditing},r=k(e);if(r===h){const d=!!e.editor?.isEditing,m=x(e,d,e.limit);return!d&&m.length===0?l(f,{}):l(y,{...u,layout:P(e),sourced:m})}if(r!==""){const d=!!e.editor?.isEditing,{rows:m,sample:c}=B(e,d);return l(T,{num:t(i(e.num,n.num,e.editor)),title:t(i(e.title,n.title,e.editor)),linkText:t(i(e.linkText,n.link,e.editor)),linkHref:t(a(e.linkHref)||"/contact"),omitHead:o,rows:c?[]:m,limit:e.limit,layout:e.layout,editing:d,padTop:typeof e.padTop=="number"?e.padTop:void 0,padBottom:typeof e.padBottom=="number"?e.padBottom:void 0})}return e.dynamic?l(H,{num:t(i(e.num,n.num,e.editor)),title:t(i(e.title,n.title,e.editor)),linkText:t(i(e.linkText,n.link,e.editor)),linkHref:t(a(e.linkHref)||"/contact"),omitHead:o,galleryHref:a(e.galleryHref)||"/gallery",zone:e.mediaZone||"all",photoDisplay:e.photoDisplay||"covers",previewHover:e.previewHover,display:e.display,displayPhone:e.displayPhone,styleOwner:e.id,editing:e.editor?.isEditing,padTop:typeof e.padTop=="number"?e.padTop:void 0,padBottom:typeof e.padBottom=="number"?e.padBottom:void 0}):l(y,{...u,items:e.items})}};export{M as GalleryBRender};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{SITE_WIDTH_CAP as h}from"efficient-web-builder/format/lib/content/page-width";import{resolveWidth as H}from"efficient-web-builder/format/lib/content/section-width";import L from"../../../../../components/LinkedProductHero.js";import m from"../../../../../components/pdp-dynamic/DynamicProductHero.js";import P from"../../../../../components/SectionNotice.js";import{trustBulletsRow as g,trustBulletsSlot as A}from"../../../../../components/product-hero/trust-bullets.js";import{TRUST_BULLETS_SLOT as R}from"../../../../sections/hero-trust-bullets.js";import{useCurrentProduct as F}from"../../../current-product.js";import{isEditorOnDynamicPage as y}from"efficient-web-builder/format/lib/document/editor-page-context";import{DEFAULT_HERO_PRICE_PLACEMENT as O,parseHeroPricePlacement as w}from"../../../../sections/hero-price-placement.js";import{DEFAULT_HERO_LAYOUT as D,DEFAULT_HERO_RATIO as I,DEFAULT_HERO_TEXT_ALIGN as U,parseHeroLayout as S,parseHeroRatio as M,parseHeroTextAlign as p}from"../../../../sections/hero-arrangement.js";import{DEFAULT_HERO_GALLERY_MODE as x,DEFAULT_HERO_IMAGE_FIT as B,parseHeroGalleryMode as C,parseHeroImageFit as k}from"../../../../sections/hero-gallery.js";import{say as G}from"efficient-web-builder/format/lib/editor-words";import{ProductHeroMeta as N}from"./meta.js";function V({source:e,editing:t=!1,pricePlacement:i=O,showVehicleFitment:o=!0,heroLayout:l=D,imageRatio:u=I,textAlign:a=U,showSpecTable:c=!0,showPriceQuote:d=!0,galleryMode:f=x,imageFit:s=B,trustBullets:E,nodeId:T,priceTemplate:_}){const n={heroLayout:l,imageRatio:u,textAlign:a,showSpecTable:c,showPriceQuote:d,galleryMode:f,imageFit:s,trustBullets:g(E,t),nodeId:T,priceTemplate:_};return F()||t&&y()?r(m,{editing:t,pricePlacement:i,showVehicleFitment:o,...n}):e?.slug?r(L,{slug:e.slug,kind:e.kind??"wheel",editing:t,pricePlacement:i,showVehicleFitment:o,...n}):t?r(P,{size:"tall",children:G("Pick a product in the panel to fill this hero.")}):r(m,{pricePlacement:i,showVehicleFitment:o,...n})}function b(e,t){return H(e,"full").mode!=="page"?t:r("div",{style:{"--sf-content-cap":h},children:t})}const oe={...N,render:e=>b(e,r(V,{source:e.source,editing:e.editor?.isEditing,pricePlacement:w(e.pricePlacement),showVehicleFitment:e.showVehicleFitment??!0,heroLayout:S(e.heroLayout),imageRatio:M(e.imageRatio),textAlign:p(e.textAlign),showSpecTable:e.showSpecTable??!0,showPriceQuote:e.showPriceQuote??!0,galleryMode:C(e.galleryMode),imageFit:k(e.imageFit),trustBullets:A(e[R]),nodeId:typeof e.id=="string"?e.id:void 0,priceTemplate:typeof e.template=="function"?e.template:void 0}))};export{oe as ProductHeroRender};
1
+ import{jsx as r}from"react/jsx-runtime";import{SITE_WIDTH_CAP as h}from"efficient-web-builder/format/lib/content/page-width";import{resolveWidth as H}from"efficient-web-builder/format/lib/content/section-width";import L from"../../../../../components/LinkedProductHero.js";import m from"../../../../../components/pdp-dynamic/DynamicProductHero.js";import P from"../../../../../components/SectionNotice.js";import{trustBulletsRow as g,trustBulletsSlot as A}from"../../../../../components/product-hero/trust-bullets.js";import{TRUST_BULLETS_SLOT as R}from"../../../../sections/hero-trust-bullets.js";import{useCurrentProduct as F}from"../../../current-product.js";import{isEditorOnDynamicPage as y}from"efficient-web-builder/format/lib/document/editor-page-context";import{DEFAULT_HERO_PRICE_PLACEMENT as O,parseHeroPricePlacement as w}from"../../../../sections/hero-price-placement.js";import{DEFAULT_HERO_LAYOUT as D,DEFAULT_HERO_RATIO as I,DEFAULT_HERO_TEXT_ALIGN as U,parseHeroLayout as S,parseHeroRatio as p,parseHeroTextAlign as M}from"../../../../sections/hero-arrangement.js";import{DEFAULT_HERO_GALLERY_MODE as k,DEFAULT_HERO_IMAGE_FIT as x,parseHeroGalleryMode as B,parseHeroImageFit as C}from"../../../../sections/hero-gallery.js";import{say as G}from"efficient-web-builder/format/lib/editor-words";import{ProductHeroMeta as N}from"./meta.js";import{HideTaker as V}from"efficient-web-builder/render/components/ViewHideRoot";function b({source:e,editing:t=!1,pricePlacement:i=O,showVehicleFitment:o=!0,heroLayout:l=D,imageRatio:a=I,textAlign:u=U,showSpecTable:c=!0,showPriceQuote:d=!0,galleryMode:f=k,imageFit:s=x,trustBullets:E,nodeId:T,priceTemplate:_}){const n={heroLayout:l,imageRatio:a,textAlign:u,showSpecTable:c,showPriceQuote:d,galleryMode:f,imageFit:s,trustBullets:g(E,t),nodeId:T,priceTemplate:_};return F()||t&&y()?r(m,{editing:t,pricePlacement:i,showVehicleFitment:o,...n}):e?.slug?r(L,{slug:e.slug,kind:e.kind??"wheel",editing:t,pricePlacement:i,showVehicleFitment:o,...n}):t?r(P,{size:"tall",children:G("Pick a product in the panel to fill this hero.")}):r(m,{pricePlacement:i,showVehicleFitment:o,...n})}function j(e,t){return H(e,"full").mode!=="page"?t:r(V,{as:"div",style:{"--sf-content-cap":h},children:t})}const me={...N,render:e=>j(e,r(b,{source:e.source,editing:e.editor?.isEditing,pricePlacement:w(e.pricePlacement),showVehicleFitment:e.showVehicleFitment??!0,heroLayout:S(e.heroLayout),imageRatio:p(e.imageRatio),textAlign:M(e.textAlign),showSpecTable:e.showSpecTable??!0,showPriceQuote:e.showPriceQuote??!0,galleryMode:B(e.galleryMode),imageFit:C(e.imageFit),trustBullets:A(e[R]),nodeId:typeof e.id=="string"?e.id:void 0,priceTemplate:typeof e.template=="function"?e.template:void 0}))};export{me as ProductHeroRender};
@@ -1 +1 @@
1
- import{jsx as e,Fragment as o}from"react/jsx-runtime";import n from"../../../../../components/card-pieces/CardPrice.js";import{useGridCard as d}from"../../../../../components/GridCardTemplate.js";import a from"../../../../../components/card-pieces/HostPart.js";import{readPartStyles as m}from"efficient-web-builder/render/lib/document/part-styles";import{ProductPriceMeta as i}from"./meta.js";function c({children:r}){return d().ownerId?e("div",{children:r}):e(o,{children:r})}const h={...i,render:r=>{const t=!!r.editor?.isEditing;return e(a,{label:i.label??"",editing:t,onHero:!0,children:e(c,{children:e(n,{quoteSets:!0,region:{nodeId:typeof r.id=="string"?r.id:void 0,partStyles:m(r),editing:t}})})})}};export{h as ProductPriceRender};
1
+ import{jsx as e,Fragment as o}from"react/jsx-runtime";import n from"../../../../../components/card-pieces/CardPrice.js";import{useGridCard as d}from"../../../../../components/GridCardTemplate.js";import m from"../../../../../components/card-pieces/HostPart.js";import{readPartStyles as a}from"efficient-web-builder/render/lib/document/part-styles";import{HideTaker as c}from"efficient-web-builder/render/components/ViewHideRoot";import{ProductPriceMeta as i}from"./meta.js";function f({children:r}){return d().ownerId?e(c,{children:r}):e(o,{children:r})}const x={...i,render:r=>{const t=!!r.editor?.isEditing;return e(m,{label:i.label??"",editing:t,onHero:!0,children:e(f,{children:e(n,{quoteSets:!0,region:{nodeId:typeof r.id=="string"?r.id:void 0,partStyles:a(r),editing:t}})})})}};export{x as ProductPriceRender};
@@ -1 +1 @@
1
- import{jsx as y}from"react/jsx-runtime";import{phoneKey as h}from"efficient-easel/draw";import g,{readFacets as k,readTags as b}from"../../../../../components/Events.js";import{BLOCK_SOURCE_ROWS_PROP as x,declaredBlockSource as A,sourcedRows as E}from"efficient-web-builder/format/lib/content/block-sources";import{hidableText as S}from"efficient-easel/screen/lib/document/hidable";import{parseSectionHeadPlacement as T}from"efficient-web-builder/format/lib/sections/section-head-placement";import{phHide as m}from"efficient-web-builder/render/lib/document/blocks/scaffold";import{say as n}from"efficient-web-builder/format/lib/editor-words";import{EventsMeta as v,EVENTS_PH as u}from"./meta.js";const B=()=>[{key:"sample-1",title:n("First card"),excerpt:n("A line about it appears here.")},{key:"sample-2",title:n("Second card"),excerpt:n("A line about it appears here.")},{key:"sample-3",title:n("Third card"),excerpt:n("A line about it appears here.")},{key:"sample-4",title:n("Fourth card"),excerpt:n("A line about it appears here.")}],f=(e,i,a)=>({slug:e.key||`card-${i}`,title:e.title??"",excerpt:e.excerpt??"",cover:e.cover??"",meta:e.meta||void 0,dateLabel:e.dateLabel||void 0,href:e.href||"#",...a?.facets?{facets:a.facets}:{},...a?.tags?{tags:a.tags}:{}});function P(e){const i=e[x],a=new Map,r=[];if(!Array.isArray(i))return{byKey:a,byIndex:r};for(const d of i){if(!d||typeof d!="object"||Array.isArray(d))continue;const t=d;if(!Object.values(t).some(s=>typeof s=="string"&&s))continue;const l={facets:k(t.facets),tags:b(t.tags)};r.push(l),typeof t.key=="string"&&t.key&&a.set(t.key,l)}return{byKey:a,byIndex:r}}const K={...v,render:e=>{const i=T(e.headPlacement)==="own-box",a=o=>i?void 0:o,r=m(e.linkText,u.link,e.editor),t=A(e)!==""?E(e,!!e.editor?.isEditing,B()):null,l=t&&!t.sample?P(e):null,s=t?t.sample?[]:t.rows.map((o,c)=>f(o,c,o.key?l?.byKey.get(o.key):l?.byIndex[c])):e.posts;return y(g,{num:a(m(e.num,u.num,e.editor)),title:a(m(e.title,u.title,e.editor)),link:a(r?{text:r,href:S(e.linkHref)||"/journal"}:void 0),omitHead:i,posts:s,sample:t?.sample?t.rows.map((o,c)=>f(o,c)):void 0,columns:e.columns,limit:e.limit,showAll:e.showAll,layout:e.layout,featuredWidth:e.featuredWidth,listCover:e.listCover,featuredDarken:e.featuredDarken,cardImage:e.cardImage,gap:e.gap,gapPhone:e[h("gap")],nameFilter:e.nameFilter===!0,padTop:typeof e.padTop=="number"?e.padTop:void 0,padBottom:typeof e.padBottom=="number"?e.padBottom:void 0,editing:e.editor?.isEditing})}};export{K as EventsRender};
1
+ import{jsx as f}from"react/jsx-runtime";import{phoneKey as h}from"efficient-easel/draw";import g,{readFacets as x,readTags as k}from"../../../../../components/Events.js";import{declaredBlockSource as y,sourcedRows as b}from"efficient-web-builder/format/lib/content/block-sources";import{servedListOf as v,servedRowLists as T}from"../../../../content/served-lists.js";import{hidableText as E}from"efficient-easel/screen/lib/document/hidable";import{parseSectionHeadPlacement as A}from"efficient-web-builder/format/lib/sections/section-head-placement";import{phHide as o}from"efficient-web-builder/render/lib/document/blocks/scaffold";import{say as a}from"efficient-web-builder/format/lib/editor-words";import{EventsMeta as B,EVENTS_PH as r}from"./meta.js";const S=()=>[{key:"sample-1",title:a("First card"),excerpt:a("A line about it appears here.")},{key:"sample-2",title:a("Second card"),excerpt:a("A line about it appears here.")},{key:"sample-3",title:a("Third card"),excerpt:a("A line about it appears here.")},{key:"sample-4",title:a("Fourth card"),excerpt:a("A line about it appears here.")}],s=(e,i,t)=>({slug:e.key||`card-${i}`,title:e.title??"",excerpt:e.excerpt??"",cover:e.cover??"",meta:e.meta||void 0,dateLabel:e.dateLabel||void 0,href:e.href||"#",...t?.facets?{facets:t.facets}:{},...t?.tags?{tags:t.tags}:{}}),F=e=>T(e,i=>({facets:x(i.facets),tags:k(i.tags)})),K={...B,render:e=>{const i=A(e.headPlacement)==="own-box",t=d=>i?void 0:d,m=o(e.linkText,r.link,e.editor),n=y(e)!==""?b(e,!!e.editor?.isEditing,S()):null,c=n&&!n.sample?F(e):null,u=n?n.sample?[]:n.rows.map((d,l)=>s(d,l,v(c,d,l))):e.posts;return f(g,{num:t(o(e.num,r.num,e.editor)),title:t(o(e.title,r.title,e.editor)),link:t(m?{text:m,href:E(e.linkHref)||"/journal"}:void 0),omitHead:i,posts:u,sample:n?.sample?n.rows.map((d,l)=>s(d,l)):void 0,columns:e.columns,limit:e.limit,showAll:e.showAll,layout:e.layout,featuredWidth:e.featuredWidth,listCover:e.listCover,featuredDarken:e.featuredDarken,cardImage:e.cardImage,gap:e.gap,gapPhone:e[h("gap")],nameFilter:e.nameFilter===!0,padTop:typeof e.padTop=="number"?e.padTop:void 0,padBottom:typeof e.padBottom=="number"?e.padBottom:void 0,editing:e.editor?.isEditing})}};export{K as EventsRender};