efficient-storefront-blocks 0.99.1 → 0.101.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -1
- package/dist/chunks/{EditorPreviewCheckout-EBG3NMJI.js → EditorPreviewCheckout-JMBBJSI7.js} +1 -1
- package/dist/chunks/{SiteEditorProvider-YAIB64UV.js → SiteEditorProvider-BKZW7KVN.js} +1 -1
- package/dist/chunks/chunk-AF5TRBQB.js +1 -0
- package/dist/chunks/chunk-GJZGQCDM.js +1 -0
- package/dist/chunks/chunk-KV3EHFHB.js +339 -0
- package/dist/chunks/chunk-XNUK2QNK.js +1 -0
- package/dist/chunks/chunk-YSKMBJ7V.js +74 -0
- package/dist/chunks/{fitment-data-PXY35OVC.js → fitment-data-HMD5DDDB.js} +1 -1
- package/dist/consent.js +1 -1
- package/dist/contract.js +1 -1
- package/dist/editor/lib/api/section-templates.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/AlloyWheelsListing/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/DetailRows/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/GalleryB/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/ProductGrid/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/index.d.ts +1 -1
- package/dist/editor/lib/document/blocks/service/FooterLogo/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/Subscribe/fields.js +1 -1
- package/dist/editor/lib/document/box-header.js +1 -1
- package/dist/editor/lib/document/config.js +1 -1
- package/dist/editor/lib/efficient-block-sources.js +1 -1
- package/dist/editor/lib/storefront-editor-words.d.ts +4 -0
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/editor.css +1 -1
- package/dist/index.js +39 -32
- package/dist/links.js +1 -1
- package/dist/render/app/globals.css +122 -16
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/ChatWidget.js +1 -1
- package/dist/render/components/Collections.js +1 -1
- package/dist/render/components/ConsentContext.d.ts +6 -0
- package/dist/render/components/ConsentContext.js +1 -1
- package/dist/render/components/ConsentPanel.d.ts +6 -0
- package/dist/render/components/ConsentPanel.js +1 -1
- package/dist/render/components/ConsentProvider.js +1 -1
- package/dist/render/components/CouponField.js +1 -1
- package/dist/render/components/DealerFinderSection.js +1 -1
- package/dist/render/components/DetailRows.d.ts +2 -3
- package/dist/render/components/DetailRows.js +1 -1
- package/dist/render/components/EmailCaptureForm.js +1 -1
- package/dist/render/components/Events.d.ts +2 -3
- package/dist/render/components/Events.js +1 -1
- package/dist/render/components/FooterEmailSignup.js +1 -1
- package/dist/render/components/FooterLogo.d.ts +1 -1
- package/dist/render/components/FooterLogo.js +1 -1
- package/dist/render/components/FooterMenu.d.ts +2 -1
- package/dist/render/components/FooterMenu.js +1 -1
- package/dist/render/components/GalleryGrid.d.ts +3 -3
- package/dist/render/components/GalleryGrid.js +3 -3
- package/dist/render/components/GridCardTemplate.js +1 -1
- package/dist/render/components/LegalLine.d.ts +10 -0
- package/dist/render/components/LegalLine.js +1 -1
- package/dist/render/components/ProductGridSection.d.ts +3 -2
- package/dist/render/components/ProductGridSection.js +1 -1
- package/dist/render/components/ProductHeroPanel.js +1 -1
- package/dist/render/components/SiteLegalContext.d.ts +19 -0
- package/dist/render/components/SiteLegalContext.js +1 -0
- package/dist/render/components/Subscribe.d.ts +9 -1
- package/dist/render/components/Subscribe.js +1 -1
- package/dist/render/components/booking/BookingFormState.js +1 -1
- package/dist/render/components/catalog/ShopperFilters.d.ts +3 -1
- package/dist/render/components/catalog/ShopperFilters.js +1 -1
- package/dist/render/components/fitment/FitmentFinder.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicDetailRows.d.ts +1 -2
- package/dist/render/components/pdp-dynamic/DynamicDetailRows.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicGalleryGrid.d.ts +1 -2
- package/dist/render/components/pdp-dynamic/DynamicGalleryGrid.js +1 -1
- package/dist/render/components/useProductSelection.d.ts +2 -1
- package/dist/render/components/useProductSelection.js +1 -1
- package/dist/render/components/wheels-plp/AlloyWheelsListing.d.ts +5 -3
- package/dist/render/components/wheels-plp/AlloyWheelsListing.js +1 -1
- package/dist/render/components/wheels-plp/PlpFacetRows.d.ts +5 -2
- package/dist/render/components/wheels-plp/PlpFacetRows.js +1 -1
- package/dist/render/components/wheels-plp/PlpSidebar.d.ts +17 -6
- package/dist/render/components/wheels-plp/PlpSidebar.js +1 -1
- package/dist/render/components/wheels-plp/usePlpFiltersInUrl.d.ts +3 -2
- package/dist/render/components/wheels-plp/usePlpFiltersInUrl.js +1 -1
- package/dist/render/lib/api/index.js +1 -1
- package/dist/render/lib/api/list-rows.d.ts +3 -0
- package/dist/render/lib/api/list-rows.js +1 -0
- package/dist/render/lib/api/types.d.ts +6 -0
- package/dist/render/lib/cache-evict.d.ts +1 -0
- package/dist/render/lib/cache-evict.js +1 -1
- package/dist/render/lib/catalog/default-variant.d.ts +2 -0
- package/dist/render/lib/catalog/default-variant.js +1 -0
- package/dist/render/lib/chrome-cache.js +1 -1
- package/dist/render/lib/consent/rules.d.ts +7 -0
- package/dist/render/lib/consent/rules.js +1 -1
- package/dist/render/lib/content/collection-card-look.d.ts +0 -4
- package/dist/render/lib/content/collection-card-look.js +1 -1
- package/dist/render/lib/content/facet-row-seed.d.ts +1 -0
- package/dist/render/lib/content/facet-row-seed.js +1 -1
- package/dist/render/lib/content/product-card-seed.js +1 -1
- package/dist/render/lib/content/rail-row-seed.d.ts +16 -0
- package/dist/render/lib/content/rail-row-seed.js +1 -0
- package/dist/render/lib/content/site.d.ts +4 -0
- package/dist/render/lib/content/site.js +1 -1
- package/dist/render/lib/content/tab-strip.d.ts +3 -1
- package/dist/render/lib/content/tab-strip.js +1 -1
- package/dist/render/lib/document/blocks/commerce/AlloyWheelsListing/meta.d.ts +8 -0
- package/dist/render/lib/document/blocks/commerce/AlloyWheelsListing/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/AlloyWheelsListing/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/DetailRows/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/DetailRows/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/FilterBlock/meta.d.ts +8 -0
- package/dist/render/lib/document/blocks/commerce/FilterBlock/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/FilterBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/GalleryB/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/GalleryB/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductGrid/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductGrid/render.js +1 -1
- package/dist/render/lib/document/blocks/service/DealerFinder/meta.js +1 -1
- package/dist/render/lib/document/blocks/service/Events/meta.js +1 -1
- package/dist/render/lib/document/blocks/service/Events/render.js +1 -1
- package/dist/render/lib/document/blocks/service/Subscribe/render.js +1 -1
- package/dist/render/lib/document/card-templates.js +1 -1
- package/dist/render/lib/document/current-product.d.ts +2 -1
- package/dist/render/lib/document/current-product.js +1 -1
- package/dist/render/lib/document/document-nodes.d.ts +2 -0
- package/dist/render/lib/document/document-nodes.js +1 -1
- package/dist/render/lib/document/footer-page-blocks.js +1 -1
- package/dist/render/lib/document/lazy-draws.js +1 -1
- package/dist/render/lib/document/section-to-box-rows-listing.js +1 -1
- package/dist/render/lib/field-input.d.ts +2 -0
- package/dist/render/lib/field-input.js +1 -1
- package/dist/render/lib/links/link-rules.d.ts +5 -0
- package/dist/render/lib/links/link-rules.js +1 -1
- package/dist/render/lib/sections/band-padding.d.ts +39 -0
- package/dist/render/lib/sections/band-padding.js +1 -0
- package/dist/render/lib/sections/gallery-toolbar.d.ts +2 -2
- package/dist/render/lib/sections/gallery-toolbar.js +1 -1
- package/dist/render/lib/sections/product-pictures.js +1 -1
- package/dist/render/lib/wheels/catalog-filters-to-listing.js +1 -1
- package/dist/render/lib/wheels/plp-filters.d.ts +2 -1
- package/dist/render/lib/wheels/plp-filters.js +1 -1
- package/dist/render/lib/wheels/plp-hydrate.d.ts +0 -3
- package/dist/render/lib/wheels/plp-hydrate.js +1 -1
- package/dist/render/lib/wheels/selected-ranges.d.ts +1 -0
- package/dist/render/lib/wheels/selected-ranges.js +1 -1
- package/dist/words.d.ts +13 -0
- package/dist/words.js +4 -4
- package/package.json +4 -4
- package/dist/chunks/chunk-5VSNQZU6.js +0 -1
- package/dist/chunks/chunk-B2IYTOE3.js +0 -1
- package/dist/chunks/chunk-DOJJTEJV.js +0 -1
- package/dist/chunks/chunk-KRMWJLBM.js +0 -412
- package/dist/chunks/chunk-QP2F42DV.js +0 -1
- package/dist/render/lib/sections/own-padding.d.ts +0 -3
- package/dist/render/lib/sections/own-padding.js +0 -1
- /package/dist/chunks/{chunk-KRMWJLBM.js.LEGAL.txt → chunk-KV3EHFHB.js.LEGAL.txt} +0 -0
package/dist/links.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var h={bold:{open:"**",close:"**",placeholder:"bold text"},italic:{open:"_",close:"_",placeholder:"italic text"},strike:{open:"~~",close:"~~",placeholder:"struck out"},code:{open:"`",close:"`",placeholder:"code"},highlight:{open:"==",close:"==",placeholder:"highlighted text"},quiet:{open:"^^",close:"^^",placeholder:"quiet text"},underline:{open:"[",close:"]{underline}",placeholder:"underlined text"},sup:{open:"[",close:"]{sup}",placeholder:"superscript"},sub:{open:"[",close:"]{sub}",placeholder:"subscript"}};var ce=["main","text","background","muted"],tn=[...ce,"surface"];var rn={bold:h.bold.placeholder,italic:h.italic.placeholder,strike:h.strike.placeholder,code:h.code.placeholder,highlight:h.highlight.placeholder,quiet:h.quiet.placeholder,link:"link text",underline:h.underline.placeholder,sup:h.sup.placeholder,sub:h.sub.placeholder,color:"colored text",style:"styled text"};var pe=[{style:"bold",label:"B",name:"Strong",title:"Strong \xB7 **words** \xB7 \u2318B",shortcut:"b"},{style:"italic",label:"I",name:"Italic",title:"Italic \xB7 _words_ \xB7 \u2318I",shortcut:"i"},{style:"strike",label:"S",name:"Strikethrough",title:"Strikethrough \xB7 ~~words~~"},{style:"highlight",label:"\u25C6",name:"Emphasis",title:"Emphasis \xB7 ==words=="},{style:"quiet",label:"a",name:"Quiet",title:"Quiet \xB7 ^^words^^"},{style:"code",label:"\u2039\u203A",name:"Code",title:"Code"},{style:"link",label:"\u{1F517}",name:"Link",title:"Link \xB7 [words](https://\u2026) \xB7 \u2318K",shortcut:"k"},{style:"bullet",label:"\u2022",name:"Bulleted list",title:"Bulleted list"},{style:"number",label:"1.",name:"Numbered list",title:"Numbered list"},{style:"quote",label:"\u275D",name:"Quote",title:"Quote"},{style:"clear",label:"T\xD7",name:"Clear marks",title:"Clear marks \xB7 \u2318\u21E7X",shortcut:"shift+x"}];var _=[{open:"**",close:"**",kind:"bold"},{open:"==",close:"==",kind:"highlight"},{open:"~~",close:"~~",kind:"strike"},{open:"_",close:"_",kind:"italic",wordBoundary:!0},{open:"^^",close:"^^",kind:"quiet"},{open:"@@",close:"@@",kind:"highlight"},{open:"++",close:"++",kind:"bold",wordStart:!0}],de=["highlight","quiet"],on=pe.map(e=>e.style).filter(e=>_.some(n=>n.kind===e)).filter(e=>!de.includes(e)),sn=[..._,{open:"*",close:"*",kind:"accent"}],ln=[..._,{open:"*",close:"*",kind:"accent"},{open:"#",close:"#",kind:"bold",notBefore:"0123456789"},{open:"[",close:"]",kind:"italic",notBefore:"(",notBeforeBlock:!0}];var an=["http","https","mailto","tel"];function $(e){if(e===""||/[\s\u0000-\u001f\u007f]/.test(e))return!1;let n=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(e);return!n||an.includes(n[1].toLowerCase())}var fe=["width","profile","rim"];var un=/^\s*(\d{2,3})\s*\/\s*(\d{2,3})\s*[A-Za-z]*\s*(\d{2}(?:\.\d+)?)\s*$/,cn={width:[100,500],profile:[20,100],rim:[10,30]};function B(e){let n=un.exec(e??"");if(!n)return null;let t={width:Number(n[1]),profile:Number(n[2]),rim:Number(n[3])};return fe.every(o=>{let[i,a]=cn[o];return t[o]>=i&&t[o]<=a})?t:null}function R(e){if(e.width==null)return"";if(e.profile==null)return String(e.width);let n=`${e.width}/${e.profile}`;return e.rim==null?n:`${n} R${e.rim}`}function me(e){return[R({width:e.width}),R({width:e.width,profile:e.profile}),R(e)]}var k=["alloy-wheel","tyre"],ge=["alloy-wheel"],F={"alloy-wheel":"Alloy wheels",tyre:"Tyres"};var St=k.map(e=>({value:e,label:F[e]}));function O(e){return e==null?[...ge]:Array.isArray(e)?k.filter(n=>e.includes(n)):[...ge]}var m=e=>e;function d(e){return m(e).kind==="tyre"?"tyre":"alloy-wheel"}function W(e){return m(e).brand??""}function he(e){return m(e).prices??void 0}function ye(e){return m(e).inStock!==!1}function Pe(e){let n=m(e),t=d(e)==="tyre"?n.rimDiameters:n.sizes;return Array.isArray(t)?t.filter(r=>typeof r=="number"&&Number.isFinite(r)):[]}function G(e){return d(e)==="tyre"?[]:(m(e).finishes??[]).filter(n=>typeof n?.family=="string").map(n=>({family:n.family,color:n.color??null}))}function Se(e){return G(e).map(n=>n.family)}function H(e){if(d(e)==="tyre")return[];let n=m(e);return Array.isArray(n.categories)?n.categories:n.process?[n.process]:[]}function be(e){return d(e)==="tyre"?[]:m(e).spec?.pcds??[]}function ke(e){return d(e)!=="tyre"?[]:m(e).tyreTypes??[]}function xe(e){return d(e)!=="tyre"?[]:m(e).speedRatings??[]}function we(e){if(d(e)!=="tyre")return[];let n=m(e).sizes;return Array.isArray(n)?n.map(t=>B(typeof t=="string"?t:null)).filter(t=>t!==null):[]}var Y=e=>typeof e=="string"&&e?e:void 0;function V(e,n){return Object.hasOwn(e,n)?e[n]:void 0}function Te(e,n){return Object.hasOwn(e,n)}var Le=null;function _e(e,n){return n?e.replace(/\{([A-Za-z][A-Za-z0-9_]*)\}/g,(t,r)=>Te(n,r)?String(V(n,r)):t):e}function y(e,n){let t=Le?V(Le,e):void 0;if(typeof t=="function"){try{let r=Y(t(n??{}));if(r)return r}catch{}return _e(e,n)}return _e(Y(t)??e,n)}function q(e){return(e??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}var A=(e,n,t,r)=>({default:e,min:n,max:t,step:r}),Rt=A(30,0,100,10),Ft=A(0,0,100,5),Ot=A(100,0,100,5),At=A(2,0,4,.5);function Re(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}var Fe="homepage";var E=[{value:"page",label:"Page"},{value:"anchor",label:"Anchor"},{value:"blog",label:"Blog post",needs:"service"},{value:"product",label:"Product",needs:"commerce"},{value:"popup",label:"Popup"},{value:"custom",label:"Custom URL"}];function I(e){return e.offersCommerce&&e.offersService?E:E.filter(n=>!n.needs||(n.needs==="commerce"?e.offersCommerce:e.offersService))}var j="#popup:";function Oe(e){return`${j}${e}`}function Ae(e){return e.startsWith(j)&&e.slice(j.length).trim()||null}function P(e){return e===Fe?"/":`/${e}`}function N(e){return`/journal/${e}`}function C(e){return`/wheels/${e}`}function v(e,n){return`${P(e)}#${n}`}function D(...e){let n=new Set,t=[];for(let r of e)for(let o of r?.content??[]){let i=Re(o?.props?.anchor);if(!i)continue;let a=q(i);!a||n.has(a)||(n.add(a),t.push({slug:a,name:i}))}return t}function Ee(e){return/^\/wheels\/[^/?#]+(?:[?#].*)?$/.test(e)}var pn=()=>({choosePage:y("Choose a page"),chooseSection:y("Choose a section"),noSections:y("No section anchors yet"),sectionHint:y("Jumps to a section on that page."),choosePost:y("Choose a post"),chooseProduct:y("Choose a product"),choosePopup:y("Choose a popup")});function K(e,n,t){if(!e)return"page";if(Ae(e))return"popup";if(e.startsWith("/journal/"))return"blog";if(Ee(e))return"product";if(e.includes("#")){let r=e.slice(0,e.indexOf("#"));if(r===""||r==="/"||n.includes(r))return"anchor"}return e==="/"||n.includes(e)||t&&t.listingPaths.includes(t.targetOf(e))?"page":"custom"}function Ie(e,n){let t=pn(),r=e.pages.map(s=>({value:P(s.slug),label:s.title})),o=n?.pageOptions?n.pageOptions(r):r,i=o.map(s=>s.value),a=e.pages.map(s=>({label:s.title,options:D(...s.docs).map(u=>({value:v(s.slug,u.slug),label:u.name}))})).filter(s=>s.options.length>0),p=s=>{switch(s){case"page":return{type:"select",options:o,placeholder:t.choosePage};case"anchor":return{type:"groups",groups:a,placeholder:a.length?t.chooseSection:t.noSections};case"blog":return{type:"select",options:e.posts.map(u=>({value:N(u.slug),label:u.title||u.slug})),placeholder:t.choosePost};case"product":return{type:"select",options:e.products.map(u=>({value:u.href,label:u.name||u.href})),placeholder:t.chooseProduct};case"popup":return{type:"select",options:(e.popups??[]).map(u=>({value:Oe(u.slug),label:u.title||u.slug})),placeholder:t.choosePopup};case"custom":return{type:"text"}}},l=I(e.offers).map(s=>({value:s.value,label:y(s.label),target:p(s.value),...s.value==="anchor"?{hint:t.sectionHint}:{},...s.value==="blog"||s.value==="product"||s.value==="popup"?{hideWhenEmpty:!0}:{}}));if(!n)return{kinds:l,rules:{kindOf:s=>K(s,i),targetOf:s=>s,readFilter:()=>null,withFilter:s=>s}};let c=s=>{let u=n.withFilter(s,null);return n.listingPaths.includes(u)?u:s};return{kinds:l,rules:{kindOf:s=>K(s,i,{listingPaths:n.listingPaths,targetOf:c}),targetOf:c,readFilter:n.readFilter,withFilter:n.withFilter},filtersFor:s=>n.listingPaths.includes(s)?n.filtersFor(s):null}}var Ne=Object.freeze([]);function Z(e,n){return e.length===0?e:e.filter(t=>t.kind===void 0||t.kind===n)}function Ce(e,n){let t=n==="filter"?"filterOrder":"cardOrder",r=new Map;for(let o of e){let i=o[t];if(typeof i!="number"||!Number.isFinite(i))continue;let a=r.get(o.fieldKey);(a===void 0||i<a)&&r.set(o.fieldKey,i)}return o=>o?r.get(o):void 0}function ve(e,n,t,r){let o=new Map;for(let l of t){let c=l[r];typeof c=="number"&&o.set(l.fieldKey,c)}if(o.size===0)return e;let i=[],a=[];e.forEach((l,c)=>{let s=n(l);s&&(i.push(c),a.push({item:l,index:c,order:o.get(s)}))}),a.sort((l,c)=>l.order!==void 0&&c.order!==void 0?l.order-c.order||l.index-c.index:l.order!==void 0?-1:c.order!==void 0?1:l.index-c.index);let p=[...e];return i.forEach((l,c)=>{p[l]=a[c].item}),p.every((l,c)=>l===e[c])?e:p}function De(e){return fn(e,"filter")}var dn="collection";function Q(e,n){return{tyreSizes:{},brands:{"alloy-wheel":"brand",tyre:"brand"},finishes:{"alloy-wheel":"wheel_finish_ref"},diameters:{"alloy-wheel":"diameter",tyre:"rim_diameter"},collections:{"alloy-wheel":dn},pcds:{"alloy-wheel":"pcd"},tyreTypes:{tyre:"tire_type"},speedRatings:{tyre:"speed_rating"}}[e]?.[n]}function fn(e,n){let t=new Set(e.filter(r=>r[n]===!1).map(r=>r.fieldKey));return r=>!r||!t.has(r)}var X={inStock:"In stock",outOfStock:"Out of stock",notInStockHere:"Not in stock here"};function mn(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function Ke(e,n){let t=e?.[n];return mn(t)?t:null}function Me(e,n,t,r){if(t==null&&r==null)return!0;let o=Ke(e,n);return!(o===null||t!=null&&o<t||r!=null&&o>r)}function Ue(e){let n=e.spec?.lugs;return typeof n=="number"?n:null}var gn={recommended:"Recommended","price-asc":"Price \xB7 low to high","price-desc":"Price \xB7 high to low",new:"Newest",name:"Name A\u2013Z"},mr=Object.keys(gn);var J=["tyreSizes","brands","finishes","diameters","collections","pcds","tyreTypes","speedRatings"],ee={tyreSizes:["tyre"],brands:["alloy-wheel","tyre"],finishes:["alloy-wheel"],diameters:["alloy-wheel","tyre"],collections:["alloy-wheel"],pcds:["alloy-wheel"],tyreTypes:["tyre"],speedRatings:["tyre"]},hn={diameters:"tyreSizes"};function yn(e){if(e.length===0)return[];let n=J.filter(t=>e.every(r=>ee[t].includes(r)));return n.filter(t=>{let r=hn[t];return!r||!n.includes(r)})}function Pn(e){let n=new Set;for(let t of e)n.add(d(t));return[...n]}var ne={tyreSizes:[],brands:[],finishes:[],diameters:[],collections:[],pcds:[],tyreTypes:[],speedRatings:[],priceMax:null,priceMin:null,inStockOnly:!1,kind:null,sort:"recommended",page:1};function ze(e,n,t,r=null,o="fail"){let i=d(e),a=p=>o==="fail"||(p==="lugs"?i==="alloy-wheel":ee[p].includes(i));if(r!=="kind"&&n.kind&&i!==n.kind)return!1;for(let p of J){if(r===p)continue;let l=n[p];if(l.length===0||!a(p))continue;let c=l.map(String);if(!$e(e,p).some(s=>c.includes(s)))return!1}if(r!=="lugs"&&n.lugs&&n.lugs.length>0&&a("lugs")){let p=Ue(e);if(p===null||!n.lugs.includes(p))return!1}return!(r!=="price"&&!Me(he(e),t,n.priceMin??null,n.priceMax)||r!=="inStock"&&n.inStockOnly&&!ye(e))}var Sn={tyreSizes:"Size",brands:"Brand",finishes:"Colour",diameters:"Size \xB7 diameter",collections:"Collection",pcds:"PCD \xB7 fitment",tyreTypes:"Tyre type",speedRatings:"Speed rating"};function $e(e,n){switch(n){case"tyreSizes":return[...new Set(we(e).flatMap(me))];case"brands":return W(e)?[W(e)]:[];case"finishes":return Se(e);case"diameters":return Pe(e).map(String);case"collections":return H(e);case"pcds":return be(e);case"tyreTypes":return ke(e);case"speedRatings":return xe(e)}}function bn(e){let n=new Map;for(let t of e)for(let r of G(t))r.color&&!n.has(r.family)&&n.set(r.family,r.color);return n}function Be(e,n,t,r=Pn(e),o=Ne,i="fail"){let a=u=>xn(u,r,o),p=bn(e),c=(i==="pass"?J.filter(u=>r.some(b=>ee[u].includes(b))):yn(r)).filter(u=>u!=="tyreSizes").filter(a).map(u=>{let b=n[u].map(String),ue=new Set,z=new Map,L=new Map;for(let f of e){let S=$e(f,u);for(let g of S)ue.add(g);for(let g of new Set(S))L.set(g,(L.get(g)??0)+1);if(ze(f,n,t,u,i))for(let g of new Set(S))z.set(g,(z.get(g)??0)+1)}let nn=[...ue].map(f=>({value:f,label:u==="diameters"?`${f}\u2033`:f,count:z.get(f)??0,checked:b.includes(f),swatch:u==="finishes"?p.get(f)??null:null})).sort((f,S)=>{if(u==="diameters")return Number(f.value)-Number(S.value);let g=(L.get(S.value)??0)-(L.get(f.value)??0);return g!==0?g:f.value.localeCompare(S.value)});return{key:u,label:Sn[u],options:nn}}).filter(u=>u.options.length>kn),s=[];for(let u of c){let b=wn(u.key,r,o);b!==void 0&&s.push({fieldKey:u.key,filterOrder:b})}return[...ve(c,u=>u.key,s,"filterOrder")]}var kn=1;function We(e){return e.showCollection===!1?["collections"]:[]}function xn(e,n,t){return n.length===0||t.length===0?!0:n.some(r=>De(Z(t,r))(Q(e,r)))}function wn(e,n,t){if(t.length===0)return;let r;for(let o of n){let i=Ce(Z(t,o),"filter")(Q(e,o));i!==void 0&&(r===void 0||i<r)&&(r=i)}return r}var te={tyreSizes:"tyreSize",brands:"brand",finishes:"colour",diameters:"size",collections:"collection",pcds:"pcd",tyreTypes:"tyreType",speedRatings:"speed"},re="type";var x="FilterBlock";function Ge(e){let n=e;return!!n&&typeof n=="object"&&typeof n.type=="string"&&!!n.props&&typeof n.props=="object"}function Tn(e){return Object.entries(e.props??{}).filter(n=>Array.isArray(n[1])&&n[1].length>0&&n[1].every(Ge))}function Ln(e){let n=e??{},t=[];Array.isArray(n.content)&&t.push(n.content);for(let r of Object.values(n.zones??{}))Array.isArray(r)&&t.push(r);return t}function He(e){let n=[],t=(r,o)=>{let i=[r,...o];for(let a of r)if(Ge(a)){n.push({node:a,order:n.length,lists:i});for(let[,p]of Tn(a))t(p,i)}};for(let r of Ln(e))t(r,[]);return n}function w(e){return He(e).map(n=>n.node)}var oe={vehicle:"My Car",process:"Process",size:"Size",lugs:"Lugs",finish:"Finish",price:"Price"};var Lr=[{value:"inStock",label:X.inStock},{value:"category",label:"Category"},{value:"lugs",label:oe.lugs},{value:"price",label:oe.price}];var Ve="AlloyWheelsListing";function qe(e){return $(e.trim())}var T="/wheels",M="Products";function je(e,n){return n>1?`${M} \xB7 ${e}`:M}function ie(...e){for(let n of[Ve,x])for(let t of e){let r=w({content:t?.content}).find(o=>o.type===n);if(r)return r.props??{}}return null}function U(...e){return ie(...e)!==null}function Ze(e,n){let t=e.filter(r=>U(...r.docs)).map(r=>P(r.slug));return n.fallback&&!t.includes(T)?[...t,T]:t}var se=[re,...Object.entries(te).filter(([e])=>e!=="tyreSizes").map(([,e])=>e)];function Qe(e){let n=e.indexOf("#"),t=n===-1?"":e.slice(n),r=n===-1?e:e.slice(0,n),o=r.indexOf("?");return{path:o===-1?r:r.slice(0,o),query:o===-1?"":r.slice(o+1),hash:t}}function On(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return e}}function Xe(e){let n=new URLSearchParams(Qe(e).query);for(let t of se){let r=n.get(t);if(r)return{param:t,value:r}}return null}function le(e,n){let{path:t,query:r,hash:o}=Qe(e),i=r.split("&").filter(a=>a&&!se.includes(On(a.split("=")[0])));return n?.value&&i.push(`${encodeURIComponent(n.param)}=${encodeURIComponent(n.value)}`),`${t}${i.length?`?${i.join("&")}`:""}${o}`}function Je(e,n){let t=le(e,null);return n.includes(t)?t:e}function An(e,n,t=[]){return K(e,n,{listingPaths:t,targetOf:r=>Je(r,t)})}function En(e){return Array.isArray(e)?e.filter(n=>typeof n?.kind=="string"&&typeof n.field_key=="string").map(n=>({kind:n.kind,fieldKey:n.field_key,...typeof n.filter=="boolean"?{filter:n.filter}:{},filterOrder:n.filter_order??null})):[]}var en="Product type",In="AUD";function ae(e,n){let t=n.listing??{},r=O(t.kinds),o=e.filter(l=>r.includes(d(l))),i=We(t),a=Be(o,ne,In,r,n.fieldUsage).filter(l=>!i.includes(l.key)).map(l=>({param:te[l.key],label:l.label,values:l.options.filter(c=>!c.value.includes(",")).map(c=>({value:c.value,label:c.label}))})).filter(l=>l.values.length>0),p=k.filter(l=>r.includes(l)&&o.some(c=>d(c)===l));return p.length>1&&a.unshift({param:re,label:en,values:p.map(l=>({value:l,label:F[l]}))}),a}function Nn(e){return n=>{let t=Ze(n,{fallback:e.offersCommerce}),r=n.filter(o=>U(...o.docs)).length;return{listingPaths:t,pageOptions:o=>{let i=o.map(a=>{let p=n.find(l=>P(l.slug)===a.value);return p&&U(...p.docs)?{...a,label:je(p.title,r)}:a});return r===0&&e.offersCommerce&&!i.some(a=>a.value===T)&&i.push({value:T,label:M}),i},filtersFor:o=>{if(!t.includes(o))return null;let i=n.find(a=>P(a.slug)===o);return ae(e.catalogue,{listing:i?ie(...i.docs):null,fieldUsage:e.fieldUsage})},readFilter:Xe,withFilter:le}}}function Cn(e){let n=Nn({catalogue:e.catalogue,fieldUsage:e.fieldUsage,offersCommerce:e.offers.offersCommerce})(e.pages),t=Ie({pages:e.pages,posts:e.posts,products:e.products.map(r=>({href:C(r.slug),name:r.name||r.slug})),offers:e.offers},n);return{...t,rules:{...t.rules,isSafe:qe},filtersFor:t.filtersFor??(()=>null)}}function yo(e,n){return ae(e,n)}export{T as BUILT_IN_LISTING_PATH,E as LINK_KINDS,se as LISTING_FILTER_PARAMS,M as LISTING_PAGE_LABEL,en as PRODUCT_TYPE_FILTER_LABEL,v as anchorPath,En as fieldUsageFromAdminRows,An as inferLinkKind,U as isProductListingPage,qe as isSafeLink,I as linkKindsFor,Cn as linkPickerSetup,yo as listingFilterFields,ie as listingNode,je as listingPageLabel,Je as listingTarget,D as pageAnchors,P as pagePath,N as postPath,Ze as productListingPaths,Xe as readListingFilter,C as wheelPath,le as withListingFilter};
|
|
1
|
+
var g={bold:{open:"**",close:"**",placeholder:"bold text"},italic:{open:"_",close:"_",placeholder:"italic text"},strike:{open:"~~",close:"~~",placeholder:"struck out"},code:{open:"`",close:"`",placeholder:"code"},highlight:{open:"==",close:"==",placeholder:"highlighted text"},quiet:{open:"^^",close:"^^",placeholder:"quiet text"},underline:{open:"[",close:"]{underline}",placeholder:"underlined text"},sup:{open:"[",close:"]{sup}",placeholder:"superscript"},sub:{open:"[",close:"]{sub}",placeholder:"subscript"}};var re=["main","text","background","muted"],Xe=[...re,"surface"];var Qe={bold:g.bold.placeholder,italic:g.italic.placeholder,strike:g.strike.placeholder,code:g.code.placeholder,highlight:g.highlight.placeholder,quiet:g.quiet.placeholder,link:"link text",underline:g.underline.placeholder,sup:g.sup.placeholder,sub:g.sub.placeholder,color:"colored text",style:"styled text"};var oe=[{style:"bold",label:"B",name:"Strong",title:"Strong \xB7 **words** \xB7 \u2318B",shortcut:"b"},{style:"italic",label:"I",name:"Italic",title:"Italic \xB7 _words_ \xB7 \u2318I",shortcut:"i"},{style:"strike",label:"S",name:"Strikethrough",title:"Strikethrough \xB7 ~~words~~"},{style:"highlight",label:"\u25C6",name:"Emphasis",title:"Emphasis \xB7 ==words=="},{style:"quiet",label:"a",name:"Quiet",title:"Quiet \xB7 ^^words^^"},{style:"code",label:"\u2039\u203A",name:"Code",title:"Code"},{style:"link",label:"\u{1F517}",name:"Link",title:"Link \xB7 [words](https://\u2026) \xB7 \u2318K",shortcut:"k"},{style:"bullet",label:"\u2022",name:"Bulleted list",title:"Bulleted list"},{style:"number",label:"1.",name:"Numbered list",title:"Numbered list"},{style:"quote",label:"\u275D",name:"Quote",title:"Quote"},{style:"clear",label:"T\xD7",name:"Clear marks",title:"Clear marks \xB7 \u2318\u21E7X",shortcut:"shift+x"}];var T=[{open:"**",close:"**",kind:"bold"},{open:"==",close:"==",kind:"highlight"},{open:"~~",close:"~~",kind:"strike"},{open:"_",close:"_",kind:"italic",wordBoundary:!0},{open:"^^",close:"^^",kind:"quiet"},{open:"@@",close:"@@",kind:"highlight"},{open:"++",close:"++",kind:"bold",wordStart:!0}],ie=["highlight","quiet"],Je=oe.map(e=>e.style).filter(e=>T.some(n=>n.kind===e)).filter(e=>!ie.includes(e)),en=[...T,{open:"*",close:"*",kind:"accent"}],nn=[...T,{open:"*",close:"*",kind:"accent"},{open:"#",close:"#",kind:"bold",notBefore:"0123456789"},{open:"[",close:"]",kind:"italic",notBefore:"(",notBeforeBlock:!0}];var tn=["http","https","mailto","tel"];function D(e){if(e===""||/[\s\u0000-\u001f\u007f]/.test(e))return!1;let n=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(e);return!n||tn.includes(n[1].toLowerCase())}var le=["width","profile","rim"];var rn=/^\s*(\d{2,3})\s*\/\s*(\d{2,3})\s*[A-Za-z]*\s*(\d{2}(?:\.\d+)?)\s*$/,on={width:[100,500],profile:[20,100],rim:[10,30]};function z(e){let n=rn.exec(e??"");if(!n)return null;let t={width:Number(n[1]),profile:Number(n[2]),rim:Number(n[3])};return le.every(o=>{let[i,a]=on[o];return t[o]>=i&&t[o]<=a})?t:null}function w(e){if(e.width==null)return"";if(e.profile==null)return String(e.width);let n=`${e.width}/${e.profile}`;return e.rim==null?n:`${n} R${e.rim}`}function se(e){return[w({width:e.width}),w({width:e.width,profile:e.profile}),w(e)]}var k=["alloy-wheel","tyre"],ae=["alloy-wheel"],_={"alloy-wheel":"Alloy wheels",tyre:"Tyres"};var ft=k.map(e=>({value:e,label:_[e]}));function ue(e){return e==null?[...ae]:Array.isArray(e)?k.filter(n=>e.includes(n)):[...ae]}var m=e=>e;function f(e){return m(e).kind==="tyre"?"tyre":"alloy-wheel"}function U(e){return m(e).brand??""}function ce(e){return m(e).prices??void 0}function pe(e){return m(e).inStock!==!1}function de(e){let n=m(e),t=f(e)==="tyre"?n.rimDiameters:n.sizes;return Array.isArray(t)?t.filter(r=>typeof r=="number"&&Number.isFinite(r)):[]}function $(e){return f(e)==="tyre"?[]:(m(e).finishes??[]).filter(n=>typeof n?.family=="string").map(n=>({family:n.family,color:n.color??null}))}function fe(e){return $(e).map(n=>n.family)}function me(e){if(f(e)==="tyre")return[];let n=m(e);return Array.isArray(n.categories)?n.categories:n.process?[n.process]:[]}function he(e){return f(e)==="tyre"?[]:m(e).spec?.pcds??[]}function ge(e){return f(e)!=="tyre"?[]:m(e).tyreTypes??[]}function ye(e){return f(e)!=="tyre"?[]:m(e).speedRatings??[]}function Pe(e){if(f(e)!=="tyre")return[];let n=m(e).sizes;return Array.isArray(n)?n.map(t=>z(typeof t=="string"?t:null)).filter(t=>t!==null):[]}var B=e=>typeof e=="string"&&e?e:void 0;function W(e,n){return Object.hasOwn(e,n)?e[n]:void 0}function be(e,n){return Object.hasOwn(e,n)}var Se=null;function ke(e,n){return n?e.replace(/\{([A-Za-z][A-Za-z0-9_]*)\}/g,(t,r)=>be(n,r)?String(W(n,r)):t):e}function y(e,n){let t=Se?W(Se,e):void 0;if(typeof t=="function"){try{let r=B(t(n??{}));if(r)return r}catch{}return ke(e,n)}return ke(B(t)??e,n)}function H(e){return(e??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}var F=(e,n,t,r)=>({default:e,min:n,max:t,step:r}),kt=F(30,0,100,10),xt=F(0,0,100,5),Lt=F(100,0,100,5),Tt=F(2,0,4,.5);function xe(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}var Le="homepage";var R=[{value:"page",label:"Page"},{value:"anchor",label:"Anchor"},{value:"blog",label:"Blog post",needs:"service"},{value:"product",label:"Product",needs:"commerce"},{value:"popup",label:"Popup"},{value:"custom",label:"Custom URL"}];function A(e){return e.offersCommerce&&e.offersService?R:R.filter(n=>!n.needs||(n.needs==="commerce"?e.offersCommerce:e.offersService))}var Y="#popup:";function Te(e){return`${Y}${e}`}function we(e){return e.startsWith(Y)&&e.slice(Y.length).trim()||null}function P(e){return e===Le?"/":`/${e}`}function E(e){return`/journal/${e}`}function I(e){return`/wheels/${e}`}function O(e,n){return`${P(e)}#${n}`}function N(...e){let n=new Set,t=[];for(let r of e)for(let o of r?.content??[]){let i=xe(o?.props?.anchor);if(!i)continue;let a=H(i);!a||n.has(a)||(n.add(a),t.push({slug:a,name:i}))}return t}function _e(e){return/^\/wheels\/[^/?#]+(?:[?#].*)?$/.test(e)}var ln=()=>({choosePage:y("Choose a page"),chooseSection:y("Choose a section"),noSections:y("No section anchors yet"),sectionHint:y("Jumps to a section on that page."),choosePost:y("Choose a post"),chooseProduct:y("Choose a product"),choosePopup:y("Choose a popup")});function C(e,n,t){if(!e)return"page";if(we(e))return"popup";if(e.startsWith("/journal/"))return"blog";if(_e(e))return"product";if(e.includes("#")){let r=e.slice(0,e.indexOf("#"));if(r===""||r==="/"||n.includes(r))return"anchor"}return e==="/"||n.includes(e)||t&&t.listingPaths.includes(t.targetOf(e))?"page":"custom"}function Fe(e,n){let t=ln(),r=e.pages.map(l=>({value:P(l.slug),label:l.title})),o=n?.pageOptions?n.pageOptions(r):r,i=o.map(l=>l.value),a=e.pages.map(l=>({label:l.title,options:N(...l.docs).map(u=>({value:O(l.slug,u.slug),label:u.name}))})).filter(l=>l.options.length>0),p=l=>{switch(l){case"page":return{type:"select",options:o,placeholder:t.choosePage};case"anchor":return{type:"groups",groups:a,placeholder:a.length?t.chooseSection:t.noSections};case"blog":return{type:"select",options:e.posts.map(u=>({value:E(u.slug),label:u.title||u.slug})),placeholder:t.choosePost};case"product":return{type:"select",options:e.products.map(u=>({value:u.href,label:u.name||u.href})),placeholder:t.chooseProduct};case"popup":return{type:"select",options:(e.popups??[]).map(u=>({value:Te(u.slug),label:u.title||u.slug})),placeholder:t.choosePopup};case"custom":return{type:"text"}}},s=A(e.offers).map(l=>({value:l.value,label:y(l.label),target:p(l.value),...l.value==="anchor"?{hint:t.sectionHint}:{},...l.value==="blog"||l.value==="product"||l.value==="popup"?{hideWhenEmpty:!0}:{}}));if(!n)return{kinds:s,rules:{kindOf:l=>C(l,i),targetOf:l=>l,readFilter:()=>null,withFilter:l=>l}};let c=l=>{let u=n.withFilter(l,null);return n.listingPaths.includes(u)?u:l};return{kinds:s,rules:{kindOf:l=>C(l,i,{listingPaths:n.listingPaths,targetOf:c}),targetOf:c,readFilter:n.readFilter,withFilter:n.withFilter},filtersFor:l=>n.listingPaths.includes(l)?n.filtersFor(l):null}}var Re=Object.freeze([]);function V(e,n){return e.length===0?e:e.filter(t=>t.kind===void 0||t.kind===n)}function Ae(e,n){let t=n==="filter"?"filterOrder":"cardOrder",r=new Map;for(let o of e){let i=o[t];if(typeof i!="number"||!Number.isFinite(i))continue;let a=r.get(o.fieldKey);(a===void 0||i<a)&&r.set(o.fieldKey,i)}return o=>o?r.get(o):void 0}function Ee(e,n,t,r){let o=new Map;for(let s of t){let c=s[r];typeof c=="number"&&o.set(s.fieldKey,c)}if(o.size===0)return e;let i=[],a=[];e.forEach((s,c)=>{let l=n(s);l&&(i.push(c),a.push({item:s,index:c,order:o.get(l)}))}),a.sort((s,c)=>s.order!==void 0&&c.order!==void 0?s.order-c.order||s.index-c.index:s.order!==void 0?-1:c.order!==void 0?1:s.index-c.index);let p=[...e];return i.forEach((s,c)=>{p[s]=a[c].item}),p.every((s,c)=>s===e[c])?e:p}function Ie(e){return an(e,"filter")}var sn="collection";function G(e,n){return{tyreSizes:{},brands:{"alloy-wheel":"brand",tyre:"brand"},finishes:{"alloy-wheel":"wheel_finish_ref"},diameters:{"alloy-wheel":"diameter",tyre:"rim_diameter"},collections:{"alloy-wheel":sn},pcds:{"alloy-wheel":"pcd"},tyreTypes:{tyre:"tire_type"},speedRatings:{tyre:"speed_rating"}}[e]?.[n]}function an(e,n){let t=new Set(e.filter(r=>r[n]===!1).map(r=>r.fieldKey));return r=>!r||!t.has(r)}function un(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function Oe(e,n){let t=e?.[n];return un(t)?t:null}function Ne(e,n,t,r){if(t==null&&r==null)return!0;let o=Oe(e,n);return!(o===null||t!=null&&o<t||r!=null&&o>r)}function Ce(e){let n=e.spec?.lugs;return typeof n=="number"?n:null}var cn={recommended:"Recommended","price-asc":"Price \xB7 low to high","price-desc":"Price \xB7 high to low",new:"Newest",name:"Name A\u2013Z"},ur=Object.keys(cn);var q=["tyreSizes","brands","finishes","diameters","collections","pcds","tyreTypes","speedRatings"],j={tyreSizes:["tyre"],brands:["alloy-wheel","tyre"],finishes:["alloy-wheel"],diameters:["alloy-wheel","tyre"],collections:["alloy-wheel"],pcds:["alloy-wheel"],tyreTypes:["tyre"],speedRatings:["tyre"]},pn={diameters:"tyreSizes"};function dn(e){if(e.length===0)return[];let n=q.filter(t=>e.every(r=>j[t].includes(r)));return n.filter(t=>{let r=pn[t];return!r||!n.includes(r)})}function fn(e){let n=new Set;for(let t of e)n.add(f(t));return[...n]}var ve={tyreSizes:[],brands:[],finishes:[],diameters:[],collections:[],pcds:[],tyreTypes:[],speedRatings:[],priceMax:null,priceMin:null,inStockOnly:!1,kind:null,sort:"recommended",page:1};function mn(e,n,t,r=null,o="fail"){let i=f(e),a=p=>o==="fail"||(p==="lugs"?i==="alloy-wheel":j[p].includes(i));if(r!=="kind"&&n.kind&&i!==n.kind)return!1;for(let p of q){if(r===p)continue;let s=n[p];if(s.length===0||!a(p))continue;let c=s.map(String);if(!Me(e,p).some(l=>c.includes(l)))return!1}if(r!=="lugs"&&n.lugs&&n.lugs.length>0&&a("lugs")){let p=Ce(e);if(p===null||!n.lugs.includes(p))return!1}return!(r!=="price"&&!Ne(ce(e),t,n.priceMin??null,n.priceMax)||r!=="inStock"&&n.inStockOnly&&!pe(e))}var hn={tyreSizes:"Size",brands:"Brand",finishes:"Colour",diameters:"Size \xB7 diameter",collections:"Collection",pcds:"PCD \xB7 fitment",tyreTypes:"Tyre type",speedRatings:"Speed rating"};function Me(e,n){switch(n){case"tyreSizes":return[...new Set(Pe(e).flatMap(se))];case"brands":return U(e)?[U(e)]:[];case"finishes":return fe(e);case"diameters":return de(e).map(String);case"collections":return me(e);case"pcds":return he(e);case"tyreTypes":return ge(e);case"speedRatings":return ye(e)}}function gn(e){let n=new Map;for(let t of e)for(let r of $(t))r.color&&!n.has(r.family)&&n.set(r.family,r.color);return n}function Ke(e,n,t,r=fn(e),o=Re,i="fail"){let a=u=>Pn(u,r,o),p=gn(e),c=(i==="pass"?q.filter(u=>r.some(S=>j[u].includes(S))):dn(r)).filter(u=>u!=="tyreSizes").filter(a).map(u=>{let S=n[u].map(String),te=new Set,K=new Map,L=new Map;for(let d of e){let b=Me(d,u);for(let h of b)te.add(h);for(let h of new Set(b))L.set(h,(L.get(h)??0)+1);if(mn(d,n,t,u,i))for(let h of new Set(b))K.set(h,(K.get(h)??0)+1)}let Ze=[...te].map(d=>({value:d,label:u==="diameters"?`${d}\u2033`:d,count:K.get(d)??0,checked:S.includes(d),swatch:u==="finishes"?p.get(d)??null:null})).sort((d,b)=>{if(u==="diameters")return Number(d.value)-Number(b.value);let h=(L.get(b.value)??0)-(L.get(d.value)??0);return h!==0?h:d.value.localeCompare(b.value)});return{key:u,label:hn[u],options:Ze}}).filter(u=>u.options.length>yn),l=[];for(let u of c){let S=bn(u.key,r,o);S!==void 0&&l.push({fieldKey:u.key,filterOrder:S})}return[...Ee(c,u=>u.key,l,"filterOrder")]}var yn=1;function De(e){return e.showCollection===!1?["collections"]:[]}function Pn(e,n,t){return n.length===0||t.length===0?!0:n.some(r=>Ie(V(t,r))(G(e,r)))}function bn(e,n,t){if(t.length===0)return;let r;for(let o of n){let i=Ae(V(t,o),"filter")(G(e,o));i!==void 0&&(r===void 0||i<r)&&(r=i)}return r}var Z={tyreSizes:"tyreSize",brands:"brand",finishes:"colour",diameters:"size",collections:"collection",pcds:"pcd",tyreTypes:"tyreType",speedRatings:"speed"},X="type";var ze="FilterBlock";var Ue="AlloyWheelsListing";function $e(e){let n=e;return!!n&&typeof n=="object"&&typeof n.type=="string"&&!!n.props&&typeof n.props=="object"}function Sn(e){return Object.entries(e.props??{}).filter(n=>Array.isArray(n[1])&&n[1].length>0&&n[1].every($e))}function kn(e){let n=e??{},t=[];Array.isArray(n.content)&&t.push(n.content);for(let r of Object.values(n.zones??{}))Array.isArray(r)&&t.push(r);return t}function xn(e){let n=[],t=(r,o)=>{let i=[r,...o];for(let a of r)if($e(a)){n.push({node:a,order:n.length,lists:i});for(let[,p]of Sn(a))t(p,i)}};for(let r of kn(e))t(r,[]);return n}function Be(e){return xn(e).map(n=>n.node)}function We(e){return D(e.trim())}var x="/wheels",v="Products";function He(e,n){return n>1?`${v} \xB7 ${e}`:v}function Q(...e){for(let n of[Ue,ze])for(let t of e){let r=Be({content:t?.content}).find(o=>o.type===n);if(r)return r.props??{}}return null}function M(...e){return Q(...e)!==null}function Ye(e,n){let t=e.filter(r=>M(...r.docs)).map(r=>P(r.slug));return n.fallback&&!t.includes(x)?[...t,x]:t}var J=[X,...Object.entries(Z).filter(([e])=>e!=="tyreSizes").map(([,e])=>e)];function Ve(e){let n=e.indexOf("#"),t=n===-1?"":e.slice(n),r=n===-1?e:e.slice(0,n),o=r.indexOf("?");return{path:o===-1?r:r.slice(0,o),query:o===-1?"":r.slice(o+1),hash:t}}function Ln(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return e}}function Ge(e){let n=new URLSearchParams(Ve(e).query);for(let t of J){let r=n.get(t);if(r)return{param:t,value:r}}return null}function ee(e,n){let{path:t,query:r,hash:o}=Ve(e),i=r.split("&").filter(a=>a&&!J.includes(Ln(a.split("=")[0])));return n?.value&&i.push(`${encodeURIComponent(n.param)}=${encodeURIComponent(n.value)}`),`${t}${i.length?`?${i.join("&")}`:""}${o}`}function qe(e,n){let t=ee(e,null);return n.includes(t)?t:e}function Tn(e,n,t=[]){return C(e,n,{listingPaths:t,targetOf:r=>qe(r,t)})}function wn(e){return Array.isArray(e)?e.filter(n=>typeof n?.kind=="string"&&typeof n.field_key=="string").map(n=>({kind:n.kind,fieldKey:n.field_key,...typeof n.filter=="boolean"?{filter:n.filter}:{},filterOrder:n.filter_order??null})):[]}var je="Product type",_n="AUD";function ne(e,n){let t=n.listing??{},r=ue(t.kinds),o=e.filter(s=>r.includes(f(s))),i=De(t),a=Ke(o,ve,_n,r,n.fieldUsage).filter(s=>!i.includes(s.key)).map(s=>({param:Z[s.key],label:s.label,values:s.options.filter(c=>!c.value.includes(",")).map(c=>({value:c.value,label:c.label}))})).filter(s=>s.values.length>0),p=k.filter(s=>r.includes(s)&&o.some(c=>f(c)===s));return p.length>1&&a.unshift({param:X,label:je,values:p.map(s=>({value:s,label:_[s]}))}),a}function Fn(e){return n=>{let t=Ye(n,{fallback:e.offersCommerce}),r=n.filter(o=>M(...o.docs)).length;return{listingPaths:t,pageOptions:o=>{let i=o.map(a=>{let p=n.find(s=>P(s.slug)===a.value);return p&&M(...p.docs)?{...a,label:He(p.title,r)}:a});return r===0&&e.offersCommerce&&!i.some(a=>a.value===x)&&i.push({value:x,label:v}),i},filtersFor:o=>{if(!t.includes(o))return null;let i=n.find(a=>P(a.slug)===o);return ne(e.catalogue,{listing:i?Q(...i.docs):null,fieldUsage:e.fieldUsage})},readFilter:Ge,withFilter:ee}}}function Rn(e){let n=Fn({catalogue:e.catalogue,fieldUsage:e.fieldUsage,offersCommerce:e.offers.offersCommerce})(e.pages),t=Fe({pages:e.pages,posts:e.posts,products:e.products.map(r=>({href:I(r.slug),name:r.name||r.slug})),offers:e.offers},n);return{...t,rules:{...t.rules,isSafe:We},filtersFor:t.filtersFor??(()=>null)}}function xr(e,n){return ne(e,n)}export{x as BUILT_IN_LISTING_PATH,R as LINK_KINDS,J as LISTING_FILTER_PARAMS,v as LISTING_PAGE_LABEL,je as PRODUCT_TYPE_FILTER_LABEL,O as anchorPath,wn as fieldUsageFromAdminRows,Tn as inferLinkKind,M as isProductListingPage,We as isSafeLink,A as linkKindsFor,Rn as linkPickerSetup,xr as listingFilterFields,Q as listingNode,He as listingPageLabel,qe as listingTarget,N as pageAnchors,P as pagePath,E as postPath,Ye as productListingPaths,Ge as readListingFilter,I as wheelPath,ee as withListingFilter};
|
|
@@ -2816,15 +2816,27 @@ em.text-accent {
|
|
|
2816
2816
|
(the reviewer 2026-11-03, the named exception in plan row 5b).
|
|
2817
2817
|
scripts/test-gap-tablet-css.ts holds all of it. */
|
|
2818
2818
|
@media (min-width: 720px) and (max-width: 1099.98px) {
|
|
2819
|
-
.sf-gap-zone {
|
|
2819
|
+
.sf-gap-zone:where(:not([data-sf-line~="edge"], [data-sf-line~="edge"] *)) {
|
|
2820
2820
|
gap: var(--sf-gap-len-tablet, var(--sf-gap-len));
|
|
2821
2821
|
}
|
|
2822
2822
|
}
|
|
2823
2823
|
@media (min-width: 720px) and (max-width: 800px) {
|
|
2824
|
-
.sf-gap-zone {
|
|
2824
|
+
.sf-gap-zone:where(:not([data-sf-line~="edge"], [data-sf-line~="edge"] *)) {
|
|
2825
2825
|
gap: var(--sf-gap-len-tablet, var(--sf-gap-len-phone, calc(var(--sf-gap-len) / 2)));
|
|
2826
2826
|
}
|
|
2827
2827
|
}
|
|
2828
|
+
/* A zone in a node on the ONE PHONE EDGE (800; it or an ancestor carries
|
|
2829
|
+
`data-sf-line="edge"`, the builder's view-lines `LINE_ATTR` / `LINE_EDGE`:
|
|
2830
|
+
a Box, efficient-web-builder 68): its passes turn at 800, so its tablet
|
|
2831
|
+
value starts there, and below 800 the phone rule above draws its phone
|
|
2832
|
+
value. The two blocks above are scoped to the zones off that line, so a
|
|
2833
|
+
stored section keeps the 720 line it always drew. Each scope is `:where()`,
|
|
2834
|
+
the specificity of the bare class. scripts/test-gap-tablet-css holds both. */
|
|
2835
|
+
@media (min-width: 800px) and (max-width: 1099.98px) {
|
|
2836
|
+
.sf-gap-zone:where([data-sf-line~="edge"], [data-sf-line~="edge"] *) {
|
|
2837
|
+
gap: var(--sf-gap-len-tablet, var(--sf-gap-len));
|
|
2838
|
+
}
|
|
2839
|
+
}
|
|
2828
2840
|
/* A shared-rows card grid (`.sf-card-rows`, components/WheelCardFrame) moves
|
|
2829
2841
|
its row gap onto the cards as a margin, so `gap` above does not reach it.
|
|
2830
2842
|
Its phone answer is this property, named by the grid ONLY when it stores a
|
|
@@ -2956,6 +2968,20 @@ em.text-accent {
|
|
|
2956
2968
|
.sf-grid-zone > [data-sf-span="12"],
|
|
2957
2969
|
.sf-grid-zone > *:has(> [data-sf-span="12"]) { grid-column: span 12; }
|
|
2958
2970
|
|
|
2971
|
+
/* How many ROWS one cell takes ("Rows tall", efficient-web-builder
|
|
2972
|
+
lib/content/grid-span.ts GRID_ROW_SPAN_ATTR, at most GRID_MAX_ROW_SPAN = 4).
|
|
2973
|
+
The same two halves as the column span above, for the same reason: the page
|
|
2974
|
+
half matches the block, the editor half matches the editor's wrapper. A cell
|
|
2975
|
+
with no row span stamps no attribute and auto-places in one row as before. */
|
|
2976
|
+
.sf-grid-zone > [data-sf-row-span="1"],
|
|
2977
|
+
.sf-grid-zone > *:has(> [data-sf-row-span="1"]) { grid-row: span 1; }
|
|
2978
|
+
.sf-grid-zone > [data-sf-row-span="2"],
|
|
2979
|
+
.sf-grid-zone > *:has(> [data-sf-row-span="2"]) { grid-row: span 2; }
|
|
2980
|
+
.sf-grid-zone > [data-sf-row-span="3"],
|
|
2981
|
+
.sf-grid-zone > *:has(> [data-sf-row-span="3"]) { grid-row: span 3; }
|
|
2982
|
+
.sf-grid-zone > [data-sf-row-span="4"],
|
|
2983
|
+
.sf-grid-zone > *:has(> [data-sf-row-span="4"]) { grid-row: span 4; }
|
|
2984
|
+
|
|
2959
2985
|
/* The phone. A span is a DESKTOP statement — twelve positions across a phone is
|
|
2960
2986
|
unreadable — so below the breakpoint every cell takes one position of a
|
|
2961
2987
|
1–3 column row. `grid-column: auto` beats the span rules above on order, not
|
|
@@ -2966,6 +2992,8 @@ em.text-accent {
|
|
|
2966
2992
|
}
|
|
2967
2993
|
.sf-grid-zone > [data-sf-span],
|
|
2968
2994
|
.sf-grid-zone > *:has(> [data-sf-span]) { grid-column: auto; }
|
|
2995
|
+
.sf-grid-zone > [data-sf-row-span],
|
|
2996
|
+
.sf-grid-zone > *:has(> [data-sf-row-span]) { grid-row: auto; }
|
|
2969
2997
|
}
|
|
2970
2998
|
|
|
2971
2999
|
/* A cell's HEIGHT — the same wrapper as the span rules above, and the same two
|
|
@@ -3327,18 +3355,22 @@ em.text-accent {
|
|
|
3327
3355
|
to, not including, VIEW_DESKTOP_MIN (1100) — the builder's
|
|
3328
3356
|
lib/content/view-values `TABLET_MEDIA`, the same string. `!important` and no
|
|
3329
3357
|
`var()` fallback, for the reasons the phone block gives.
|
|
3330
|
-
|
|
3358
|
+
These rules take a node WITHOUT the edge attribute (a stored section); a
|
|
3359
|
+
node with it (a band frame, a Box) switches at the one phone edge, block
|
|
3360
|
+
"A padding's view values on the ONE PHONE EDGE" below. `:where()` keeps the
|
|
3361
|
+
specificity of a bare class. scripts/test-tablet-padding-css.ts holds all
|
|
3362
|
+
of it. */
|
|
3331
3363
|
@media (min-width: 720px) and (max-width: 1099.98px) {
|
|
3332
|
-
.sf-pad-top-tablet {
|
|
3364
|
+
.sf-pad-top-tablet:where(:not([data-sf-line~="edge"])) {
|
|
3333
3365
|
padding-top: var(--sf-pad-t-tablet) !important;
|
|
3334
3366
|
}
|
|
3335
|
-
.sf-pad-bottom-tablet {
|
|
3367
|
+
.sf-pad-bottom-tablet:where(:not([data-sf-line~="edge"])) {
|
|
3336
3368
|
padding-bottom: var(--sf-pad-b-tablet) !important;
|
|
3337
3369
|
}
|
|
3338
|
-
.sf-pad-left-tablet {
|
|
3370
|
+
.sf-pad-left-tablet:where(:not([data-sf-line~="edge"])) {
|
|
3339
3371
|
padding-left: var(--sf-pad-l-tablet) !important;
|
|
3340
3372
|
}
|
|
3341
|
-
.sf-pad-right-tablet {
|
|
3373
|
+
.sf-pad-right-tablet:where(:not([data-sf-line~="edge"])) {
|
|
3342
3374
|
padding-right: var(--sf-pad-r-tablet) !important;
|
|
3343
3375
|
}
|
|
3344
3376
|
/* A picture's TABLET focus: the same split as `.sf-focus-phone`. The desktop
|
|
@@ -3371,12 +3403,14 @@ em.text-accent {
|
|
|
3371
3403
|
|
|
3372
3404
|
The boundary IS lib/content/view-tiers' VIEW_TABLET_MIN. Written as `not all
|
|
3373
3405
|
and (min-width: 720px)` rather than a `max-width` so the literal is the SAME
|
|
3374
|
-
720 the two blocks above use, with no fractional-pixel gap to get wrong.
|
|
3406
|
+
720 the two blocks above use, with no fractional-pixel gap to get wrong.
|
|
3407
|
+
The padding rules take a node WITHOUT the edge attribute only, as the tablet
|
|
3408
|
+
block above. */
|
|
3375
3409
|
@media not all and (min-width: 720px) {
|
|
3376
|
-
.sf-pad-top-phone {
|
|
3410
|
+
.sf-pad-top-phone:where(:not([data-sf-line~="edge"])) {
|
|
3377
3411
|
padding-top: var(--sf-pad-t-phone) !important;
|
|
3378
3412
|
}
|
|
3379
|
-
.sf-pad-bottom-phone {
|
|
3413
|
+
.sf-pad-bottom-phone:where(:not([data-sf-line~="edge"])) {
|
|
3380
3414
|
padding-bottom: var(--sf-pad-b-phone) !important;
|
|
3381
3415
|
}
|
|
3382
3416
|
/* The sideways pair. The builder's `padSideAttrs` (render
|
|
@@ -3386,10 +3420,10 @@ em.text-accent {
|
|
|
3386
3420
|
space ("site", efficient-web-builder 66): the builder then hands a full
|
|
3387
3421
|
CSS value, `var(--sf-pad-site, …)`, never a bare var, so these rules read
|
|
3388
3422
|
it as they read a number and need no fallback. */
|
|
3389
|
-
.sf-pad-left-phone {
|
|
3423
|
+
.sf-pad-left-phone:where(:not([data-sf-line~="edge"])) {
|
|
3390
3424
|
padding-left: var(--sf-pad-l-phone) !important;
|
|
3391
3425
|
}
|
|
3392
|
-
.sf-pad-right-phone {
|
|
3426
|
+
.sf-pad-right-phone:where(:not([data-sf-line~="edge"])) {
|
|
3393
3427
|
padding-right: var(--sf-pad-r-phone) !important;
|
|
3394
3428
|
}
|
|
3395
3429
|
/* A picture's PHONE focus (Lewis 2026-10-19: one picture, one dot; the view
|
|
@@ -3403,6 +3437,50 @@ em.text-accent {
|
|
|
3403
3437
|
}
|
|
3404
3438
|
}
|
|
3405
3439
|
|
|
3440
|
+
/* ── A padding's view values on the ONE PHONE EDGE ────────────────────────────
|
|
3441
|
+
For a node whose own layout steps at efficient-web-builder's PHONE_EDGE (800;
|
|
3442
|
+
format/lib/content/view-lines, its `EDGE_PHONE_MEDIA` / `EDGE_TABLET_MEDIA`):
|
|
3443
|
+
it carries the edge attribute, `data-sf-line="edge"` (the builder's
|
|
3444
|
+
view-lines `LINE_ATTR` / `LINE_EDGE`): a band frame that draws a view value, and a
|
|
3445
|
+
Box. Its phone value owns every width its phone layout owns, so between 720
|
|
3446
|
+
and 799 a stored phone top of 0 draws 0, not the frame's phone room.
|
|
3447
|
+
|
|
3448
|
+
A node without the attribute is a stored section and keeps the 720 blocks
|
|
3449
|
+
above (the stored sections' line, 2026-11-08), so a page nobody re-saved
|
|
3450
|
+
draws what it drew. The two scopes never meet: each rule is `:where()` of
|
|
3451
|
+
the attribute or of its absence, the specificity of a bare class.
|
|
3452
|
+
`!important` and no `var()` fallback, as the blocks above.
|
|
3453
|
+
scripts/test-tablet-padding-css and test-phone-override hold the widths to
|
|
3454
|
+
PHONE_EDGE and VIEW_TABLET_MIN. */
|
|
3455
|
+
@media (min-width: 800px) and (max-width: 1099.98px) {
|
|
3456
|
+
.sf-pad-top-tablet:where([data-sf-line~="edge"]) {
|
|
3457
|
+
padding-top: var(--sf-pad-t-tablet) !important;
|
|
3458
|
+
}
|
|
3459
|
+
.sf-pad-bottom-tablet:where([data-sf-line~="edge"]) {
|
|
3460
|
+
padding-bottom: var(--sf-pad-b-tablet) !important;
|
|
3461
|
+
}
|
|
3462
|
+
.sf-pad-left-tablet:where([data-sf-line~="edge"]) {
|
|
3463
|
+
padding-left: var(--sf-pad-l-tablet) !important;
|
|
3464
|
+
}
|
|
3465
|
+
.sf-pad-right-tablet:where([data-sf-line~="edge"]) {
|
|
3466
|
+
padding-right: var(--sf-pad-r-tablet) !important;
|
|
3467
|
+
}
|
|
3468
|
+
}
|
|
3469
|
+
@media not all and (min-width: 800px) {
|
|
3470
|
+
.sf-pad-top-phone:where([data-sf-line~="edge"]) {
|
|
3471
|
+
padding-top: var(--sf-pad-t-phone) !important;
|
|
3472
|
+
}
|
|
3473
|
+
.sf-pad-bottom-phone:where([data-sf-line~="edge"]) {
|
|
3474
|
+
padding-bottom: var(--sf-pad-b-phone) !important;
|
|
3475
|
+
}
|
|
3476
|
+
.sf-pad-left-phone:where([data-sf-line~="edge"]) {
|
|
3477
|
+
padding-left: var(--sf-pad-l-phone) !important;
|
|
3478
|
+
}
|
|
3479
|
+
.sf-pad-right-phone:where([data-sf-line~="edge"]) {
|
|
3480
|
+
padding-right: var(--sf-pad-r-phone) !important;
|
|
3481
|
+
}
|
|
3482
|
+
}
|
|
3483
|
+
|
|
3406
3484
|
/* ── A card owns the room at its own sides ────────────────────────────────────
|
|
3407
3485
|
Owner, 2026-09-09, choosing A over B when both were drawn: the card owns it,
|
|
3408
3486
|
and the number a merchant sets is the only one.
|
|
@@ -3436,12 +3514,12 @@ em.text-accent {
|
|
|
3436
3514
|
1100; the builder's `TABLET_MEDIA`). The builder adds the class only when the
|
|
3437
3515
|
tablet draws a height of its own. scripts/test-tablet-section-css.ts. */
|
|
3438
3516
|
@media (min-width: 720px) and (max-width: 1099.98px) {
|
|
3439
|
-
.sf-section-minh-tablet {
|
|
3517
|
+
.sf-section-minh-tablet:where(:not([data-sf-line~="edge"], [data-sf-line~="edge"] *)) {
|
|
3440
3518
|
display: grid !important;
|
|
3441
3519
|
min-height: var(--sf-section-minh-t) !important;
|
|
3442
3520
|
}
|
|
3443
3521
|
@supports (min-height: 1svh) {
|
|
3444
|
-
.sf-section-minh-tablet {
|
|
3522
|
+
.sf-section-minh-tablet:where(:not([data-sf-line~="edge"], [data-sf-line~="edge"] *)) {
|
|
3445
3523
|
min-height: var(--sf-section-minh-ts, var(--sf-section-minh-t)) !important;
|
|
3446
3524
|
}
|
|
3447
3525
|
}
|
|
@@ -3470,12 +3548,40 @@ em.text-accent {
|
|
|
3470
3548
|
use. The `@supports` leg mirrors the desktop pair: `svh` where the browser has
|
|
3471
3549
|
it, the plain unit as the fallback. */
|
|
3472
3550
|
@media not all and (min-width: 720px) {
|
|
3473
|
-
.sf-section-minh-phone {
|
|
3551
|
+
.sf-section-minh-phone:where(:not([data-sf-line~="edge"], [data-sf-line~="edge"] *)) {
|
|
3552
|
+
display: grid !important;
|
|
3553
|
+
min-height: var(--sf-section-minh-p) !important;
|
|
3554
|
+
}
|
|
3555
|
+
@supports (min-height: 1svh) {
|
|
3556
|
+
.sf-section-minh-phone:where(:not([data-sf-line~="edge"], [data-sf-line~="edge"] *)) {
|
|
3557
|
+
min-height: var(--sf-section-minh-ps, var(--sf-section-minh-p)) !important;
|
|
3558
|
+
}
|
|
3559
|
+
}
|
|
3560
|
+
}
|
|
3561
|
+
/* A section on the ONE PHONE EDGE (800; it or an ancestor carries
|
|
3562
|
+
`data-sf-line="edge"`: a Box, efficient-web-builder 68): its tablet and
|
|
3563
|
+
phone Heights turn at 800, not 720. The two blocks above are scoped to the
|
|
3564
|
+
sections off that line, so a stored section keeps the 720 line. Each scope
|
|
3565
|
+
is `:where()`, the specificity of the bare class.
|
|
3566
|
+
scripts/test-tablet-section-css holds both lines. */
|
|
3567
|
+
@media (min-width: 800px) and (max-width: 1099.98px) {
|
|
3568
|
+
.sf-section-minh-tablet:where([data-sf-line~="edge"], [data-sf-line~="edge"] *) {
|
|
3569
|
+
display: grid !important;
|
|
3570
|
+
min-height: var(--sf-section-minh-t) !important;
|
|
3571
|
+
}
|
|
3572
|
+
@supports (min-height: 1svh) {
|
|
3573
|
+
.sf-section-minh-tablet:where([data-sf-line~="edge"], [data-sf-line~="edge"] *) {
|
|
3574
|
+
min-height: var(--sf-section-minh-ts, var(--sf-section-minh-t)) !important;
|
|
3575
|
+
}
|
|
3576
|
+
}
|
|
3577
|
+
}
|
|
3578
|
+
@media not all and (min-width: 800px) {
|
|
3579
|
+
.sf-section-minh-phone:where([data-sf-line~="edge"], [data-sf-line~="edge"] *) {
|
|
3474
3580
|
display: grid !important;
|
|
3475
3581
|
min-height: var(--sf-section-minh-p) !important;
|
|
3476
3582
|
}
|
|
3477
3583
|
@supports (min-height: 1svh) {
|
|
3478
|
-
.sf-section-minh-phone {
|
|
3584
|
+
.sf-section-minh-phone:where([data-sf-line~="edge"], [data-sf-line~="edge"] *) {
|
|
3479
3585
|
min-height: var(--sf-section-minh-ps, var(--sf-section-minh-p)) !important;
|
|
3480
3586
|
}
|
|
3481
3587
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as n}from"react/jsx-runtime";import{useEffect as
|
|
1
|
+
"use client";import{jsx as e,jsxs as n}from"react/jsx-runtime";import{useEffect as I,useRef as A,useState as u}from"react";import{ROW_INPUT_CLASS as B}from"../lib/field-input.js";import{stripMarkup as W}from"efficient-web-builder/format/lib/markup";import{sizedImage as z}from"efficient-web-builder/format/lib/sized-image";import D,{chatLauncherOnLeft as U}from"./ChatLauncher.js";import{useChat as M}from"./ChatContext.js";import{scrollBehavior as O}from"efficient-web-builder/render/components/useReducedMotion";const R="Chat with us",$="We usually reply within a few minutes",F="Hi! Ask us anything — about a wheel, an order, or fitment. Leave your details and we’ll reply.";function G({m:t}){if(t.sender_role==="system")return e("div",{className:"text-center text-[11px] text-fg/50 py-1",children:t.body});const a=t.sender_role==="bot",s=t.sender_role==="employee"||a;return e("div",{className:`flex ${s?"justify-start":"justify-end"}`,children:n("div",{className:`max-w-[80%] rounded-2xl px-3 py-2 text-sm ${s?"bg-fg/5 text-fg":"bg-accent text-accent-ink"}`,children:[s&&n("div",{className:"mb-0.5 flex items-center gap-1 text-[10px] font-semibold uppercase tracking-wide text-fg/50",children:[a&&e("span",{"aria-hidden":"true",children:"✦"}),e("span",{children:a?t.sender_name||"Assistant":t.sender_name||"Support"}),a&&e("span",{className:"font-normal normal-case tracking-normal",children:"· automated"})]}),t.body&&e("p",{className:"whitespace-pre-wrap",children:t.body}),t.image_url&&e("a",{href:t.image_url,target:"_blank",rel:"noopener noreferrer",children:e("img",{...z(t.image_url,{fallbackWidth:640,maxWidth:1280}),sizes:"(max-width: 640px) 80vw, 320px",alt:"Attachment",className:"mt-2 max-h-48 w-auto rounded-lg"})})]})})}function K({title:t,subtitle:a,greeting:s,look:h}={}){const{isOpen:l,toggle:w,close:_,messages:o,sending:i,error:x,unread:f,hasConversation:k,isSignedIn:C,send:L}=M(),g=t?.trim()||R,E=a?.trim()||$,T=s?.trim()||F,[d,b]=u(""),[c,S]=u(""),[m,j]=u(""),y=A(null),p=!C&&!k;I(()=>{l&&y.current?.scrollIntoView({behavior:O(),block:"nearest"})},[o.length,l]);const v=d.trim().length>0&&(!p||c.trim()&&/.+@.+/.test(m)),N=()=>{!v||i||(L(d,p?{name:c.trim(),email:m.trim()}:void 0),b(""))};return l?n("aside",{role:"dialog","aria-label":"Chat with us","data-sf-floating":"",className:`fixed bottom-5 ${U(h)?"left-5":"right-5"} z-[61] flex h-[min(560px,80vh)] w-[min(380px,calc(100vw-2.5rem))] flex-col overflow-hidden rounded-2xl border border-line bg-bg shadow-[0_20px_60px_rgba(0,0,0,.45)]`,style:{color:"var(--fg)"},children:[n("div",{className:"flex items-center justify-between border-b border-line px-4 py-3",children:[n("div",{children:[e("div",{className:"text-sm font-semibold text-fg",children:g}),e("div",{className:"text-[11px] text-fg/50",children:E})]}),e("button",{type:"button",onClick:_,"aria-label":"Close chat",className:"rounded-md p-1 text-fg/60 hover:bg-fg/5",children:e("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),n("div",{className:"flex-1 space-y-2 overflow-y-auto px-3 py-3",children:[o.length===0&&e("p",{className:"px-2 py-4 text-center text-sm text-fg/50",children:T}),o.map(r=>e(G,{m:r},r.id)),e("div",{ref:y})]}),n("div",{className:"border-t border-line p-3",children:[p&&n("div",{className:"mb-2 grid grid-cols-2 gap-2",children:[e("input",{value:c,onChange:r=>S(r.target.value),placeholder:"Your name","aria-label":"Your name",className:"rounded-lg border border-line bg-transparent px-3 py-2 text-sm outline-none focus:border-accent"}),e("input",{value:m,onChange:r=>j(r.target.value),type:"email",placeholder:"Email","aria-label":"Email",className:"rounded-lg border border-line bg-transparent px-3 py-2 text-sm outline-none focus:border-accent"})]}),x&&e("p",{className:"mb-2 text-xs text-alert",children:x}),n("div",{className:"flex items-end gap-2",children:[e("textarea",{value:d,onChange:r=>b(r.target.value),onKeyDown:r=>{r.key==="Enter"&&!r.shiftKey&&(r.preventDefault(),N())},rows:1,placeholder:"Type a message…","aria-label":"Message",className:`${B} max-h-28 resize-none rounded-lg border border-line bg-transparent px-3 py-2 text-sm outline-none focus:border-accent`}),e("button",{type:"button",onClick:N,disabled:!v||i,className:"rounded-lg bg-btn px-3 py-2 text-sm font-semibold text-btn-ink disabled:opacity-40",children:i?"…":"Send"})]})]})]}):e(D,{label:W(g),onOpen:w,zIndex:60,look:h,badge:f>0&&e("span",{className:"absolute -top-1 -right-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-red-600 px-1 text-[11px] font-bold text-white",children:f})})}export{F as DEFAULT_GREETING,$ as DEFAULT_SUBTITLE,R as DEFAULT_TITLE,K as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Fragment as
|
|
1
|
+
"use client";import{Fragment as u,jsx as e,jsxs as o}from"react/jsx-runtime";import{useScopeClass as N}from"../lib/use-scope-class.js";import T from"efficient-web-builder/render/components/SectionHeader";import{SectionTextParts as h}from"efficient-web-builder/render/lib/document/editing-bridges";import{CollectionCardStyleContext as w}from"./CollectionCard.js";import{fillRowCss as $}from"../lib/sections/fill-row.js";import{renderHeadline as A}from"efficient-web-builder/render/components/goldPhrases";import{CONTENT_CAP_GUTTER as l}from"../lib/sections/content-cap-gutter.js";import{FRAME_ROOM_DESKTOP_BOTTOM as F,FRAME_ROOM_DESKTOP_Y as P,FRAME_ROOM_NO_TOP as v,FRAME_ROOM_NO_TOP_PHONE as S,FRAME_ROOM_PHONE_BOTTOM as y,FRAME_ROOM_PHONE_Y as H}from"../lib/sections/band-padding.js";function j({editing:n,nodeId:r,children:s}){return!n||!r?e(u,{children:s}):e(h,{nodeId:r,sectionType:"Collections",children:s})}const B=`${l} ${P} max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))] ${H}`,I=`${l} ${v} ${F} max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))] ${S} ${y}`,b=`${l} max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]`,L={2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5"};function k({eyebrow:n,heading:r,columns:s,showPrice:x,cardStyle:M,layout:g,limit:i,cards:c,template:a,omitHead:d=!1,nodeId:m,partStyles:E,editing:O=!1}={}){const t=N("cg"),C=typeof i=="number"&&i>0,R=g==="list"?"grid-cols-1":s===void 0?"grid-cols-3":L[Math.min(5,Math.max(2,Math.round(s)))]??"grid-cols-3",_=`${t} grid ${R} gap-4 max-view-wide:grid-cols-1 max-view-wide:gap-3`,f=$(t,_,{limit:i}),p=Number(a?.blockCount??0)>0;return o("section",{className:d?p?b:I:B,children:[d?null:e(T,{num:n!==void 0?n:"01 / Collections",accentNum:!0,title:r!==void 0?A(r,!1):o(u,{children:["Three ranges,",e("br",{}),"one standard."]}),link:{text:"View all",href:"/wheels"}}),c&&e(j,{editing:O,nodeId:m,children:o(w.Provider,{value:{showPrice:x,cardStyle:M,partStyles:E,editing:O,ownerId:m,Template:p?a:void 0},children:[C&&e("style",{children:`.${t} > *:nth-child(n+${i+1}){display:none}`}),f&&e("style",{children:f}),e(c,{className:_,minEmptyHeight:260})]})})]})}export{k as default};
|
|
@@ -20,3 +20,9 @@ export declare const ConsentStateContext: import("react").Context<ConsentState>;
|
|
|
20
20
|
export declare const ConsentControlsContext: import("react").Context<ConsentControls | null>;
|
|
21
21
|
export declare function useConsent(): ConsentState;
|
|
22
22
|
export declare function useConsentControls(): ConsentControls | null;
|
|
23
|
+
export interface CookieSettingsLink {
|
|
24
|
+
label: string;
|
|
25
|
+
required: boolean;
|
|
26
|
+
open: () => void;
|
|
27
|
+
}
|
|
28
|
+
export declare function useCookieSettingsLink(): CookieSettingsLink | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{createContext as
|
|
1
|
+
"use client";import{createContext as n,useContext as t}from"react";import{NOT_ASKED as o}from"../lib/consent/choice.js";import{CONSENT_BUTTONS as s}from"../lib/consent/rules.js";const c={...o,asked:!0,analytics:!1,ads:!1,chosen:!1},l=n(o),r=n(null);function p(){return t(l)}function f(){const e=t(r);return e&&e.state.asked?e:null}function C(){const e=t(r);return!e||!e.ready?null:e.state.asked?{label:e.rule.footerLink,required:!0,open:e.openPanel}:{label:s.cookieSettings,required:!1,open:e.openPanel}}export{r as ConsentControlsContext,l as ConsentStateContext,c as PENDING,p as useConsent,f as useConsentControls,C as useCookieSettingsLink};
|
|
@@ -13,3 +13,9 @@ export declare function ConsentPanelView({ rule, analytics: initialAnalytics, ad
|
|
|
13
13
|
onClose: () => void;
|
|
14
14
|
inline?: boolean;
|
|
15
15
|
}): import("react").JSX.Element | null;
|
|
16
|
+
export declare function NoTrackingPanelView({ privacyHref, open, onClose, inline, }: {
|
|
17
|
+
privacyHref: string | null;
|
|
18
|
+
open?: boolean;
|
|
19
|
+
onClose: () => void;
|
|
20
|
+
inline?: boolean;
|
|
21
|
+
}): import("react").JSX.Element | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as n}from"react/jsx-runtime";import{useEffect as
|
|
1
|
+
"use client";import{jsx as e,jsxs as n}from"react/jsx-runtime";import{useEffect as _,useRef as w,useState as k}from"react";import B from"./SiteSwitch.js";import{CONSENT_CHOICE_BUTTON as m,ConsentEyebrow as C}from"./ConsentBanner.js";import O from"./PopupFrame.js";import{Notice as I}from"./Notice.js";import{useEnglish as L}from"./EnglishVariant.js";import{useSiteSells as P}from"./SiteRecordContext.js";import{CONSENT_BUTTONS as i,GPC_HONOURED as E,NO_TRACKING_PANEL as p,PANEL_ROWS as c}from"../lib/consent/rules.js";const U="flex items-center justify-center gap-5 border border-btn bg-btn px-6 py-4 font-mono text-[14px] uppercase tracking-[0.3em] text-btn-ink transition-colors hover:border-fg hover:bg-fg",S="text-fg underline decoration-line underline-offset-4";function f({name:a,body:o,checked:r,onChange:t,locked:l=!1}){return n("div",{className:"flex items-start justify-between gap-6 border-t border-line py-5",children:[n("div",{className:"min-w-0",children:[e("div",{className:"font-display text-[17px] text-fg",children:a}),e("p",{className:"mt-1 font-body text-[14px] leading-[1.5] text-fg-dim",children:o})]}),e(B,{checked:r,onChange:s=>t?.(s),ariaLabel:a,disabled:l,className:"flex flex-none cursor-pointer items-center gap-3 pt-1",children:l&&e("span",{className:"order-first font-mono text-[11px] uppercase tracking-[0.18em] text-fg-dim",children:i.alwaysOn})})]})}function W({rule:a,analytics:o,ads:r,gpc:t,privacyHref:l,open:s=!0,onSave:d,onClose:x,inline:j=!1}){const[b,u]=k(o),[h,y]=k(r&&!t),N=P(),R=L(),g=w(null);if(_(()=>{s&&(u(o),y(r&&!t))},[s,o,r,t]),!s)return null;const v=n("div",{ref:g,tabIndex:-1,onClick:T=>T.stopPropagation(),className:"relative w-[min(640px,100%)] overflow-auto border border-line bg-bg p-10 outline-none [border-radius:var(--sf-section-radius,0px)] max-[880px]:max-h-[88dvh] max-[880px]:w-full max-[880px]:border-x-0 max-[880px]:border-b-0 max-[880px]:px-5 max-[880px]:pb-8 max-[880px]:pt-7 max-[880px]:[border-radius:0]",children:[e(C,{text:a.panelEyebrow}),n("h2",{id:"consent-panel-title",className:"mt-4 font-display text-[36px] leading-[1.05] tracking-[-0.01em] text-fg max-[880px]:text-[28px]",children:["Your privacy ",e("span",{className:"font-serif font-light italic text-accent",children:"choices."})]}),t&&e("div",{className:"mt-5",children:n(I,{tone:"quiet",children:[e("span",{className:"font-mono text-[12px] uppercase tracking-[0.18em] text-accent",children:R(E.title)}),e("br",{}),E.body]})}),n("div",{className:"mt-6",children:[e(f,{name:c.necessary.name,body:N?c.necessary.body:c.necessary.bodyNoSale,checked:!0,locked:!0}),e(f,{name:c.analytics.name,body:c.analytics.body,checked:b,onChange:u}),e(f,{name:a.adsRowName,body:N?c.ads.body:c.ads.bodyNoSale,checked:h,onChange:y,locked:t})]}),n("div",{className:"mt-2 grid grid-cols-3 gap-3 border-t border-line pt-6 max-[880px]:grid-cols-1",children:[e("button",{type:"button",className:U,onClick:()=>d({analytics:b,ads:h&&!t}),children:i.save}),e("button",{type:"button",className:m,onClick:()=>d({analytics:!1,ads:!1}),children:i.reject}),e("button",{type:"button",className:m,onClick:()=>d({analytics:!0,ads:!t}),children:i.accept})]}),l&&n("p",{className:"mt-5 font-body text-[13px] text-fg-dim",children:["More in our"," ",e("a",{className:S,href:l,children:i.privacyPolicy}),"."]})]});return j?e("div",{className:"flex w-full justify-center p-6",children:v}):e(O,{site:{blur:8,layer:"consent",sheetOnPhone:!0,focusRef:g},labelledBy:"consent-panel-title",onClose:x,children:v})}function $({privacyHref:a,open:o=!0,onClose:r,inline:t=!1}){const l=P(),s=w(null);if(!o)return null;const d=n("div",{ref:s,tabIndex:-1,onClick:x=>x.stopPropagation(),className:"relative w-[min(560px,100%)] overflow-auto border border-line bg-bg p-10 outline-none [border-radius:var(--sf-section-radius,0px)] max-[880px]:max-h-[88dvh] max-[880px]:w-full max-[880px]:border-x-0 max-[880px]:border-b-0 max-[880px]:px-5 max-[880px]:pb-8 max-[880px]:pt-7 max-[880px]:[border-radius:0]",children:[e(C,{text:p.eyebrow}),n("h2",{id:"consent-panel-title",className:"mt-4 font-display text-[36px] leading-[1.05] tracking-[-0.01em] text-fg max-[880px]:text-[28px]",children:["Your privacy ",e("span",{className:"font-serif font-light italic text-accent",children:"choices."})]}),e("p",{className:"mt-5 font-body text-[15px] leading-[1.6] text-fg-dim",children:l?p.body:p.bodyNoSale}),n("div",{className:"mt-6 flex flex-wrap items-center justify-between gap-4 border-t border-line pt-6",children:[a?e("a",{className:`${S} font-body text-[14px]`,href:a,children:i.privacyPolicy}):e("span",{}),e("button",{type:"button",className:m,onClick:r,children:i.close})]})]});return t?e("div",{className:"flex w-full justify-center p-6",children:d}):e(O,{site:{blur:8,layer:"consent",sheetOnPhone:!0,focusRef:s},labelledBy:"consent-panel-title",onClose:r,children:d})}export{W as ConsentPanelView,$ as NoTrackingPanelView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as n,jsxs as g}from"react/jsx-runtime";import{useCallback as m,useEffect as u,useMemo as h,useState as d}from"react";import{safeLocalStorage as w}from"efficient-web-builder/format/lib/safe-storage";import{bannerWords as O,CONSENT_RULES as N,visitorRegion as P}from"../lib/consent/rules.js";import{browserSendsGpc as x,NOT_ASKED as E,readStoredChoice as T,resolveConsent as H,setConsent as R,writeStoredChoice as _}from"../lib/consent/choice.js";import{COUNTRY_STORAGE_KEY as j,useActiveCountry as A}from"./CurrencyContext.js";import{ConsentBannerView as k}from"./ConsentBanner.js";import{ConsentPanelView as D,NoTrackingPanelView as G}from"./ConsentPanel.js";import{ConsentControlsContext as I,ConsentStateContext as V,PENDING as K}from"./ConsentContext.js";function L(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone??""}catch{return""}}function J({consent:e,children:f}){const[o,p]=d(e.enabled?K:E),[r,C]=d(!e.enabled),[i,t]=d(!1),v=A(),a=m(()=>{const c=P(L(),w.getItem(j));return H({asked:e.enabled,region:c,stored:T(),gpc:x()})},[e.enabled]);u(()=>{p(a()),C(!0)},[a,v]),u(()=>{R(o)},[o]);const l=m(c=>{_(c),p(a()),t(!1)},[a]),s=N[o.region],y=h(()=>({state:o,rule:s,ready:r,openPanel:()=>t(!0)}),[o,s,r]),b=e.enabled&&r&&o.model==="opt-in"&&!o.chosen,S=e.enabled&&r&&o.model==="opt-out"&&!o.chosen&&!o.gpc&&e.noticeOptOut;return n(V.Provider,{value:o,children:g(I.Provider,{value:y,children:[f,(b||S)&&!i&&n(k,{model:o.model,words:O(s,e.brand,e.tags),layout:e.layout,privacyHref:e.privacyHref,onAccept:()=>l({analytics:!0,ads:!0}),onReject:()=>l({analytics:!1,ads:!1}),onChoose:()=>t(!0)}),!e.enabled&&n(G,{open:i,privacyHref:e.privacyHref,onClose:()=>t(!1)}),e.enabled&&r&&n(D,{open:i,rule:s,analytics:o.analytics,ads:o.ads,gpc:o.gpc,privacyHref:e.privacyHref,onSave:l,onClose:()=>t(!1)})]})})}export{J as ConsentProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as i}from"react/jsx-runtime";import{useState as u}from"react";import{
|
|
1
|
+
"use client";import{jsx as t,jsxs as i}from"react/jsx-runtime";import{useState as u}from"react";import{ROW_INPUT_CLASS as m}from"../lib/field-input.js";import{COUPON_DEFERRED_MESSAGE as x}from"../lib/cart/coupon-preview.js";import{useCart as f}from"./CartContext.js";function b({customerEmail:c,disabled:o=!1}){const{coupon:e,applyCoupon:l,removeCoupon:d,couponBusy:n}=f(),[a,s]=u("");async function p(){o||n||!a.trim()||(await l(a,c),s(""))}return i("div",{className:"flex flex-col gap-2",children:[e===null?i("div",{className:"flex border border-line",children:[t("input",{type:"text",value:a,onChange:r=>s(r.target.value),onKeyDown:r=>{r.key==="Enter"&&(r.preventDefault(),p())},placeholder:"Coupon code","aria-label":"Coupon code",disabled:o,className:`${m} bg-transparent px-4 py-4 font-mono text-[11px] uppercase tracking-[0.18em] text-fg outline-none placeholder:text-fg-dim`}),t("button",{type:"button",onClick:()=>{p()},disabled:n||o,className:"border-l border-line px-4 font-mono text-[10px] uppercase tracking-[0.26em] text-btn transition-colors hover:bg-btn hover:text-btn-ink disabled:cursor-wait disabled:opacity-60",children:n?"…":"Apply"})]}):i("div",{className:["flex items-center justify-between gap-3 border px-4 py-3",e.valid?"border-accent":"border-line"].join(" "),style:e.valid?{background:"color-mix(in oklab, var(--accent) 8%, transparent)"}:void 0,children:[t("span",{className:["font-mono text-[11px] uppercase tracking-[0.22em]",e.valid?"text-accent":e.deferred||e.unchecked?"text-fg":"text-fg-dim line-through"].join(" "),children:e.code}),e.unchecked&&t("button",{type:"button",onClick:()=>{l(e.code,c)},disabled:n||o,className:"ml-auto font-mono text-[10px] uppercase tracking-[0.26em] text-btn transition-colors hover:text-fg disabled:cursor-wait disabled:opacity-60",children:n?"…":"Try again"}),!o&&t("button",{type:"button",onClick:d,"aria-label":`Remove coupon ${e.code}`,className:"font-mono text-[12px] text-fg-dim transition-colors hover:text-fg",children:"✕"})]}),e?.deferred?t("p",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-fg-dim",children:x}):e&&!e.valid&&e.message&&t("p",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-alert",children:e.message})]})}export{b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as a,jsxs as
|
|
1
|
+
"use client";import{jsx as a,jsxs as l}from"react/jsx-runtime";import{useState as h}from"react";import{ROW_INPUT_CLASS as b}from"../lib/field-input.js";import g from"efficient-web-builder/render/components/BlockFrame";import{renderHeadline as y}from"efficient-web-builder/render/components/goldPhrases";import{phoneHref as N}from"efficient-web-builder/format/lib/links/phone-href";import{fetchDealers as v}from"../lib/api/index.js";import{DEALER_WORDS as r,dealerFinderNotice as w,dealerPins as _,dealerTownLine as k,distanceLabel as S}from"../lib/sections/dealer-finder.js";function j({title:c,contained:d,sample:n}){const[t,m]=h(""),[p,i]=h(n??null),[s,o]=h(!1);return a(g,{contained:d,className:"py-6",children:a(D,{title:c,query:t,list:p,busy:s,onQuery:m,onSearch:async f=>{if(f.preventDefault(),!(n||!t.trim())){o(!0);try{i(await v(t))}catch{i({near:"try_again",dealers:[]})}finally{o(!1)}}}})})}function D({title:c,query:d,list:n,busy:t=!1,onQuery:m,onSearch:p}){const i=n?w(n.near):null,s=n&&n.near!=="not_found"?n.dealers:[],o=_(s);return l("div",{className:"flex flex-col gap-5",children:[c&&a("h2",{className:"font-heading3 text-[length:min(var(--size-headingSmall,28px),var(--sf-heading-max,9999px))] font-medium leading-[1.1] tracking-[-0.02em]",children:y(c,!1)}),l("form",{role:"search",className:"flex max-w-[560px] gap-2",onSubmit:p,children:[a("input",{type:"search",name:"near",value:d,onChange:e=>m?.(e.target.value),placeholder:r.placeholder,"aria-label":r.placeholder,maxLength:120,className:`${b} rounded-sm border border-line bg-transparent px-3 py-2 text-[15px]`}),a("button",{type:"submit",disabled:t,className:"rounded-sm bg-btn px-4 py-2 text-[15px] font-medium text-btn-ink disabled:opacity-60",children:t?r.searching:r.search})]}),i&&a("p",{role:"status",className:"text-[15px] opacity-80",children:i}),n&&n.near!=="not_found"&&!s.length&&a("p",{role:"status",className:"text-[15px] opacity-80",children:r.none}),s.length>0&&l("div",{className:"grid gap-5 md:grid-cols-2",children:[a("ol",{className:"flex flex-col text-[15px]",children:s.map((e,f)=>{const u=S(e.distanceKm),x=k(e);return l("li",{className:"flex gap-3 border-b border-line py-3 last:border-b-0",children:[a("span",{"aria-hidden":!0,className:"w-6 shrink-0 font-medium tabular-nums",children:f+1}),l("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[l("div",{className:"flex flex-wrap items-baseline justify-between gap-x-4",children:[a("span",{className:"font-medium",children:e.name}),u&&a("span",{className:"tabular-nums opacity-70",children:u})]}),e.address&&a("span",{children:e.address}),x&&a("span",{children:x}),e.phone&&a("a",{href:N(e.phone),className:"underline-offset-2 hover:underline",children:e.phone}),e.website&&a("a",{href:e.website,target:"_blank",rel:"noopener noreferrer",className:"underline-offset-2 hover:underline",children:r.website})]})]},e.id)})}),o.length>0&&a("div",{role:"img","aria-label":r.map,className:"relative min-h-[280px] overflow-hidden rounded-sm border border-line",style:{background:"color-mix(in oklab, var(--accent) 6%, transparent)"},children:o.map(e=>a("span",{"data-dealer-pin":e.index+1,className:"absolute flex h-6 w-6 -translate-x-1/2 -translate-y-full items-center justify-center rounded-full bg-accent text-[12px] font-medium text-accent-ink",style:{left:`${e.left}%`,top:`${e.top}%`},children:e.index+1},e.id))})]})]})}export{D as DealerFinderView,j as default};
|
|
@@ -18,12 +18,11 @@ export interface DetailRowsProps {
|
|
|
18
18
|
rows?: DetailRow[];
|
|
19
19
|
startLeft?: boolean;
|
|
20
20
|
layout?: "even" | "narrow";
|
|
21
|
-
|
|
22
|
-
padBottom?: number;
|
|
21
|
+
pads?: Record<string, unknown>;
|
|
23
22
|
editing?: boolean;
|
|
24
23
|
template?: unknown;
|
|
25
24
|
nodeId?: string;
|
|
26
25
|
}
|
|
27
26
|
export declare function detailCardRow(row: DetailRow): SourceRow;
|
|
28
27
|
export declare function templateCanDraw(rows: readonly DetailRow[]): boolean;
|
|
29
|
-
export default function DetailRows({ rows, startLeft, layout,
|
|
28
|
+
export default function DetailRows({ rows, startLeft, layout, pads, editing, template, nodeId, }: DetailRowsProps): import("react").JSX.Element | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as i,jsxs as o}from"react/jsx-runtime";import
|
|
1
|
+
import{jsx as i,jsxs as o}from"react/jsx-runtime";import k from"./SectionBand.js";import R from"efficient-web-builder/render/components/Placeholder";import{withRMark as c}from"efficient-web-builder/render/components/RMark";import{renderGold as b}from"efficient-web-builder/render/components/goldPhrases";import{say as g}from"efficient-web-builder/format/lib/editor-words";import{stripMarkup as j}from"efficient-web-builder/format/lib/markup";import{bandPadAttrs as _}from"efficient-web-builder/render/lib/content/section-padding";import{DETAIL_ROWS_ROOM as z,withBandClasses as C}from"../lib/sections/band-padding.js";import{CardTemplateRows as S}from"efficient-web-builder/render/components/CardRowContext";const p={body:"text-[length:var(--size-body,15px)]",labelSmall:"text-[length:var(--size-label,11px)]",label:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"};function T(t){return{eyebrow:t.eyebrow?.trim()?t.eyebrow:"",title:t.title?.trim()?t.title:"",copy:t.copy?.trim()?t.copy:"",image:t.image?.trim()?t.image:"",tag:t.tag?.trim()?t.tag:""}}function $(t){return t.every(r=>!r.media&&!(r.specs??[]).some(n=>(n?.label??"").trim()||(n?.value??"").trim()))}const O="[&:not(:first-child)]:border-t [&:not(:first-child)]:border-line";function D({rows:t,startLeft:r=!1,layout:n="even",pads:v,editing:u=!1,template:y,nodeId:w}){const a=n==="narrow",f=_(v??{},z),x=(t??[]).filter(e=>(e?.eyebrow??"").trim()||(e?.title??"").trim()||(e?.copy??"").trim()||(e?.tag??"").trim()||(e?.image??"").trim()),m=x.length>0?x:u?[{tag:g("Row {n}",{n:1})},{tag:g("Row {n}",{n:2})},{tag:g("Row {n}",{n:3})}]:[];return m.length===0?null:i(k,{className:C("relative z-[2] border-b border-line bg-bg",f),style:f.style,children:i(S,{ownerId:w??"",ownerType:"DetailRows",Template:$(m)?y:void 0,rows:m.map(T),fallback:m.map((e,s)=>{const d=s%2===1!==r;return o("div",{className:["grid items-center py-[60px]",a?"grid-cols-[1fr_460px] gap-[72px]":"grid-cols-2 gap-12","max-view-desktop:grid-cols-1",d?"[direction:rtl] max-view-desktop:[direction:ltr]":"",s>0?"border-t border-line":""].join(" "),children:[o("div",{className:["[direction:ltr] flex flex-col gap-4",a?"max-w-[560px]":"",a&&!d?"ml-auto max-view-desktop:ml-0":""].join(" "),children:[e.eyebrow?.trim()&&i("div",{className:`font-mono ${p.labelLarge} uppercase tracking-[0.2em] text-accent`,children:c(e.eyebrow)}),e.title?.trim()&&i("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(28px,3vw,42px)),var(--sf-heading-max,9999px))] [font-weight:var(--sf-heading-weight,500)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-[1.1] tracking-[-0.02em]",children:b(e.title,!0)}),e.copy?.trim()&&i("p",{className:`${p.body} leading-[1.6] text-fg-dim`,children:b(e.copy,!1)}),(()=>{const h=(e.specs??[]).filter(l=>(l?.label??"").trim()||(l?.value??"").trim());return h.length===0?null:i("dl",{className:`mt-2 border-t border-line pt-3 font-mono ${p.label} uppercase tracking-[0.1em] leading-[2.1]`,children:h.map((l,N)=>o("div",{className:"flex items-baseline justify-between gap-6",children:[i("dt",{className:"text-fg-dim",children:c(l.label??"")}),i("dd",{className:"text-fg",children:c(l.value??"")})]},N))})})()]}),o("div",{className:["[direction:ltr] flex flex-col gap-3",a?d?"items-end":"items-start":"",a?"max-view-desktop:items-start":""].join(" "),children:[e.media?i("div",{className:"w-full",children:e.media}):i("div",{className:["relative overflow-hidden max-w-full",a?e.imageShape==="wide"?"w-[460px] aspect-[16/9]":"w-[360px] aspect-square":"aspect-square"].join(" "),children:i(R,{label:e.tag?.trim()||e.title?.trim()||`row-${s+1}`,src:e.image||void 0,alt:j(e.title?.trim()||e.tag?.trim()||""),showBackground:!e.image,objectFit:"contain",sizes:a?"(max-width: 1100px) 100vw, 460px":"(max-width: 1100px) 100vw, 50vw"})}),e.tag?.trim()&&i("span",{className:`font-mono ${p.labelSmall} uppercase tracking-[0.2em] text-fg-dim ${d?"text-left":"text-right"}`,children:c(e.tag)})]})]},s)}),wrapCopy:e=>i("div",{className:O,children:e}),children:e=>e})})}export{D as default,T as detailCardRow,$ as templateCanDraw};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as r,jsxs as a}from"react/jsx-runtime";const
|
|
1
|
+
"use client";import{jsx as r,jsxs as a}from"react/jsx-runtime";import{ROW_INPUT_CLASS as x}from"../lib/field-input.js";const g="Please enter a valid email address.";function b({email:i,onEmailChange:o,status:e,onResetVerdict:n,onSubmit:d,submitLabel:t,errorMessage:c,inputAriaLabel:s,buttonClassName:m,className:p,placeholder:f="you@example.com"}){return a("form",{className:[p,"flex flex-col gap-2"].filter(Boolean).join(" "),noValidate:!0,onSubmit:l=>{l.preventDefault(),d()},children:[a("div",{className:"flex items-stretch gap-2",children:[r("input",{type:"email",value:i,onChange:l=>{o(l.target.value),(e==="invalid"||e==="error")&&n()},placeholder:f,"aria-label":s,disabled:e==="sending",className:`${x} border-2 border-line bg-bg px-4 py-3 font-display text-[15px] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent disabled:opacity-60`}),r("button",{type:"submit",disabled:e==="sending",className:m,children:e==="sending"?"Sending…":t})]}),(e==="error"||e==="invalid")&&r("p",{role:"alert",className:"font-mono text-[11px] uppercase tracking-[0.18em]",style:{color:"var(--alert)"},children:e==="invalid"?g:c})]})}export{b as default};
|
|
@@ -69,10 +69,9 @@ export interface EventsProps {
|
|
|
69
69
|
cardImage?: number | null;
|
|
70
70
|
omitHead?: boolean;
|
|
71
71
|
nameFilter?: boolean;
|
|
72
|
-
|
|
73
|
-
padBottom?: number;
|
|
72
|
+
pads?: Record<string, unknown>;
|
|
74
73
|
template?: unknown;
|
|
75
74
|
ownerId?: string;
|
|
76
75
|
}
|
|
77
76
|
export declare function matchesName(title: string, typed: string): boolean;
|
|
78
|
-
export default function Events({ num, title, link, posts, columns, limit, showAll, editing, cardImage, gap: gapProp, gapPhone, layout, featuredWidth, listCover, featuredDarken, omitHead, sample, nameFilter,
|
|
77
|
+
export default function Events({ num, title, link, posts, columns, limit, showAll, editing, cardImage, gap: gapProp, gapPhone, layout, featuredWidth, listCover, featuredDarken, omitHead, sample, nameFilter, pads, template, ownerId, }: EventsProps): import("react").JSX.Element | null;
|