efficient-storefront-blocks 0.92.0 → 0.93.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 (49) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/chunks/{EditorPreviewCheckout-VHPWPS3N.js → EditorPreviewCheckout-FSEFJZSO.js} +1 -1
  3. package/dist/chunks/{SiteEditorProvider-C4HT4BT4.js → SiteEditorProvider-N76XROIW.js} +1 -1
  4. package/dist/chunks/{chunk-RAOSZKA3.js → chunk-ITIVEB2I.js} +1 -1
  5. package/dist/chunks/chunk-IZEIMAJI.js +1 -0
  6. package/dist/chunks/{chunk-7L5DVQZ4.js → chunk-NSW5PCGW.js} +1 -1
  7. package/dist/chunks/chunk-OERUEODX.js +388 -0
  8. package/dist/chunks/{fitment-data-URJZ24LU.js → fitment-data-2SHEWSDK.js} +1 -1
  9. package/dist/editor/components/GalleryPicturesSource.d.ts +4 -16
  10. package/dist/editor/components/GalleryPicturesSource.js +1 -1
  11. package/dist/editor/components/GalleryProductBinding.js +1 -1
  12. package/dist/editor/lib/document/blocks/commerce/ProductPicture/fields.js +1 -1
  13. package/dist/editor/lib/storefront-editor-words.d.ts +1 -7
  14. package/dist/editor/lib/storefront-editor-words.js +1 -1
  15. package/dist/index.js +73 -79
  16. package/dist/links.js +1 -1
  17. package/dist/render/app/globals.css +5 -2
  18. package/dist/render/built-with.json +1 -1
  19. package/dist/render/components/GridCardTemplate.d.ts +3 -2
  20. package/dist/render/components/GridCardTemplate.js +1 -1
  21. package/dist/render/components/PublishedFooter.js +1 -1
  22. package/dist/render/components/PublishedHeader.js +1 -1
  23. package/dist/render/components/card-pieces/CardProductPicture.d.ts +3 -0
  24. package/dist/render/components/card-pieces/CardProductPicture.js +1 -1
  25. package/dist/render/components/pdp-dynamic/DynamicGalleryGrid.js +1 -1
  26. package/dist/render/components/useProductCatalog.d.ts +1 -0
  27. package/dist/render/lib/api/types.d.ts +1 -0
  28. package/dist/render/lib/content/product-card-seed.d.ts +12 -0
  29. package/dist/render/lib/content/product-card-seed.js +1 -1
  30. package/dist/render/lib/document/blocks/commerce/ProductPicture/render.js +1 -1
  31. package/dist/render/lib/document/blocks/service/SiteHeader/render.js +1 -1
  32. package/dist/render/lib/document/published-header-bar.d.ts +10 -0
  33. package/dist/render/lib/document/published-header-bar.js +1 -0
  34. package/dist/render/lib/document/section-to-box-rows-service.js +1 -1
  35. package/dist/render/lib/logo/surface-is-light.js +1 -1
  36. package/dist/render/lib/sections/card-tone.d.ts +9 -0
  37. package/dist/render/lib/sections/card-tone.js +1 -0
  38. package/dist/render/lib/sections/product-pictures.d.ts +3 -0
  39. package/dist/render/lib/sections/product-pictures.js +1 -1
  40. package/dist/render/lib/wheels/plp-hydrate.js +1 -1
  41. package/dist/words.d.ts +15 -7
  42. package/dist/words.js +5 -5
  43. package/package.json +4 -4
  44. package/dist/chunks/chunk-PW7BA4ZJ.js +0 -1
  45. package/dist/chunks/chunk-S2WLJ6H2.js +0 -388
  46. package/dist/render/lib/document/published-chrome-data.d.ts +0 -2
  47. package/dist/render/lib/document/published-chrome-data.js +0 -1
  48. /package/dist/chunks/{chunk-S2WLJ6H2.js.LEGAL.txt → chunk-OERUEODX.js.LEGAL.txt} +0 -0
  49. /package/dist/chunks/{chunk-JB6ISWYA.js → chunk-XYG76Y4H.js} +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 ue=["main","text","background","muted"],en=[...ue,"surface"];var nn={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 ce=[{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 F=[{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}],pe=["highlight","quiet"],tn=ce.map(e=>e.style).filter(e=>F.some(n=>n.kind===e)).filter(e=>!pe.includes(e)),rn=[...F,{open:"*",close:"*",kind:"accent"}],on=[...F,{open:"*",close:"*",kind:"accent"},{open:"#",close:"#",kind:"bold",notBefore:"0123456789"},{open:"[",close:"]",kind:"italic",notBefore:"(",notBeforeBlock:!0}];var sn=["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||sn.includes(n[1].toLowerCase())}var de=["width","profile","rim"];var ln=/^\s*(\d{2,3})\s*\/\s*(\d{2,3})\s*[A-Za-z]*\s*(\d{2}(?:\.\d+)?)\s*$/,an={width:[100,500],profile:[20,100],rim:[10,30]};function B(e){let n=ln.exec(e??"");if(!n)return null;let t={width:Number(n[1]),profile:Number(n[2]),rim:Number(n[3])};return de.every(o=>{let[i,a]=an[o];return t[o]>=i&&t[o]<=a})?t:null}function _(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 fe(e){return[_({width:e.width}),_({width:e.width,profile:e.profile}),_(e)]}var k=["alloy-wheel","tyre"],me=["alloy-wheel"],R={"alloy-wheel":"Alloy wheels",tyre:"Tyres"};var yt=k.map(e=>({value:e,label:R[e]}));function O(e){return e==null?[...me]:Array.isArray(e)?k.filter(n=>e.includes(n)):[...me]}var m=e=>e;function d(e){return m(e).kind==="tyre"?"tyre":"alloy-wheel"}function W(e){return m(e).brand??""}function ge(e){return m(e).prices??void 0}function he(e){return m(e).inStock!==!1}function ye(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 Pe(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 Se(e){return d(e)==="tyre"?[]:m(e).spec?.pcds??[]}function be(e){return d(e)!=="tyre"?[]:m(e).tyreTypes??[]}function ke(e){return d(e)!=="tyre"?[]:m(e).speedRatings??[]}function xe(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;var we=null;function Le(e,n){return n?e.replace(/\{([A-Za-z][A-Za-z0-9_]*)\}/g,(t,r)=>Object.prototype.hasOwnProperty.call(n,r)?String(n[r]):t):e}function y(e,n){let t=we?we[e]:void 0;if(typeof t=="function"){try{let r=Y(t(n??{}));if(r)return r}catch{}return Le(e,n)}return Le(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}),wt=A(30,0,100,10),Lt=A(0,0,100,5),Tt=A(100,0,100,5),Ft=A(2,0,4,.5);function Te(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 _e(e){return`${j}${e}`}function Re(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 K(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=Te(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 Oe(e){return/^\/wheels\/[^/?#]+(?:[?#].*)?$/.test(e)}var un=()=>({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 v(e,n,t){if(!e)return"page";if(Re(e))return"popup";if(e.startsWith("/journal/"))return"blog";if(Oe(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 Ae(e,n){let t=un(),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:K(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:_e(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=>v(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=>v(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 Ee=Object.freeze([]);function V(e,n){return e.length===0?e:e.filter(t=>t.kind===void 0||t.kind===n)}function Ie(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 Ne(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 Ce(e){return pn(e,"filter")}var cn="collection";function Z(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":cn},pcds:{"alloy-wheel":"pcd"},tyreTypes:{tyre:"tire_type"},speedRatings:{tyre:"speed_rating"}}[e]?.[n]}function pn(e,n){let t=new Set(e.filter(r=>r[n]===!1).map(r=>r.fieldKey));return r=>!r||!t.has(r)}var Q={inStock:"In stock",outOfStock:"Out of stock",notInStockHere:"Not in stock here"};function dn(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function Ke(e,n){let t=e?.[n];return dn(t)?t:null}function De(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 ve(e){let n=e.spec?.lugs;return typeof n=="number"?n:null}var fn={recommended:"Recommended","price-asc":"Price \xB7 low to high","price-desc":"Price \xB7 high to low",new:"Newest",name:"Name A\u2013Z"},cr=Object.keys(fn);var X=["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"]},mn={diameters:"tyreSizes"};function gn(e){if(e.length===0)return[];let n=X.filter(t=>e.every(r=>J[t].includes(r)));return n.filter(t=>{let r=mn[t];return!r||!n.includes(r)})}function hn(e){let n=new Set;for(let t of e)n.add(d(t));return[...n]}var ee={tyreSizes:[],brands:[],finishes:[],diameters:[],collections:[],pcds:[],tyreTypes:[],speedRatings:[],priceMax:null,inStockOnly:!1,kind:null,sort:"recommended",page:1};function Me(e,n,t,r=null,o="fail"){let i=d(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 X){if(r===p)continue;let l=n[p];if(l.length===0||!a(p))continue;let c=l.map(String);if(!Ue(e,p).some(s=>c.includes(s)))return!1}if(r!=="lugs"&&n.lugs&&n.lugs.length>0&&a("lugs")){let p=ve(e);if(p===null||!n.lugs.includes(p))return!1}return!(r!=="price"&&!De(ge(e),t,n.priceMin??null,n.priceMax)||r!=="inStock"&&n.inStockOnly&&!he(e))}var yn={tyreSizes:"Size",brands:"Brand",finishes:"Colour",diameters:"Size \xB7 diameter",collections:"Collection",pcds:"PCD \xB7 fitment",tyreTypes:"Tyre type",speedRatings:"Speed rating"};function Ue(e,n){switch(n){case"tyreSizes":return[...new Set(xe(e).flatMap(fe))];case"brands":return W(e)?[W(e)]:[];case"finishes":return Pe(e);case"diameters":return ye(e).map(String);case"collections":return H(e);case"pcds":return Se(e);case"tyreTypes":return be(e);case"speedRatings":return ke(e)}}function Pn(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 ze(e,n,t,r=hn(e),o=Ee,i="fail"){let a=u=>bn(u,r,o),p=Pn(e),c=(i==="pass"?X.filter(u=>r.some(b=>J[u].includes(b))):gn(r)).filter(u=>u!=="tyreSizes").filter(a).map(u=>{let b=n[u].map(String),ae=new Set,z=new Map,T=new Map;for(let f of e){let S=Ue(f,u);for(let g of S)ae.add(g);for(let g of new Set(S))T.set(g,(T.get(g)??0)+1);if(Me(f,n,t,u,i))for(let g of new Set(S))z.set(g,(z.get(g)??0)+1)}let Je=[...ae].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=(T.get(S.value)??0)-(T.get(f.value)??0);return g!==0?g:f.value.localeCompare(S.value)});return{key:u,label:yn[u],options:Je}}).filter(u=>u.options.length>Sn),s=[];for(let u of c){let b=kn(u.key,r,o);b!==void 0&&s.push({fieldKey:u.key,filterOrder:b})}return[...Ne(c,u=>u.key,s,"filterOrder")]}var Sn=1;function $e(e){return e.showCollection===!1?["collections"]:[]}function bn(e,n,t){return n.length===0||t.length===0?!0:n.some(r=>Ce(V(t,r))(Z(e,r)))}function kn(e,n,t){if(t.length===0)return;let r;for(let o of n){let i=Ie(V(t,o),"filter")(Z(e,o));i!==void 0&&(r===void 0||i<r)&&(r=i)}return r}var ne={tyreSizes:"tyreSize",brands:"brand",finishes:"colour",diameters:"size",collections:"collection",pcds:"pcd",tyreTypes:"tyreType",speedRatings:"speed"},te="type";var x="FilterBlock";function Be(e){let n=e;return!!n&&typeof n=="object"&&typeof n.type=="string"&&!!n.props&&typeof n.props=="object"}function xn(e){return Object.entries(e.props??{}).filter(n=>Array.isArray(n[1])&&n[1].length>0&&n[1].every(Be))}function wn(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 We(e){let n=[],t=(r,o)=>{let i=[r,...o];for(let a of r)if(Be(a)){n.push({node:a,order:n.length,lists:i});for(let[,p]of xn(a))t(p,i)}};for(let r of wn(e))t(r,[]);return n}function w(e){return We(e).map(n=>n.node)}var re={vehicle:"My Car",process:"Process",size:"Size",lugs:"Lugs",finish:"Finish",price:"Price"};var kr=[{value:"inStock",label:Q.inStock},{value:"category",label:"Category"},{value:"lugs",label:re.lugs},{value:"price",label:re.price}];var He="AlloyWheelsListing";function Ye(e){return $(e.trim())}var L="/wheels",M="Products";function qe(e,n){return n>1?`${M} \xB7 ${e}`:M}function oe(...e){for(let n of[He,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 oe(...e)!==null}function je(e,n){let t=e.filter(r=>U(...r.docs)).map(r=>P(r.slug));return n.fallback&&!t.includes(L)?[...t,L]:t}var ie=[te,...Object.entries(ne).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 _n(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return e}}function Ze(e){let n=new URLSearchParams(Ve(e).query);for(let t of ie){let r=n.get(t);if(r)return{param:t,value:r}}return null}function se(e,n){let{path:t,query:r,hash:o}=Ve(e),i=r.split("&").filter(a=>a&&!ie.includes(_n(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=se(e,null);return n.includes(t)?t:e}function Rn(e,n,t=[]){return v(e,n,{listingPaths:t,targetOf:r=>Qe(r,t)})}function On(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 Xe="Product type",An="AUD";function le(e,n){let t=n.listing??{},r=O(t.kinds),o=e.filter(l=>r.includes(d(l))),i=$e(t),a=ze(o,ee,An,r,n.fieldUsage).filter(l=>!i.includes(l.key)).map(l=>({param:ne[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:te,label:Xe,values:p.map(l=>({value:l,label:R[l]}))}),a}function En(e){return n=>{let t=je(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:qe(p.title,r)}:a});return r===0&&e.offersCommerce&&!i.some(a=>a.value===L)&&i.push({value:L,label:M}),i},filtersFor:o=>{if(!t.includes(o))return null;let i=n.find(a=>P(a.slug)===o);return le(e.catalogue,{listing:i?oe(...i.docs):null,fieldUsage:e.fieldUsage})},readFilter:Ze,withFilter:se}}}function In(e){let n=En({catalogue:e.catalogue,fieldUsage:e.fieldUsage,offersCommerce:e.offers.offersCommerce})(e.pages),t=Ae({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:Ye},filtersFor:t.filtersFor??(()=>null)}}function fo(e,n){return le(e,n)}export{L as BUILT_IN_LISTING_PATH,E as LINK_KINDS,ie as LISTING_FILTER_PARAMS,M as LISTING_PAGE_LABEL,Xe as PRODUCT_TYPE_FILTER_LABEL,K as anchorPath,On as fieldUsageFromAdminRows,Rn as inferLinkKind,U as isProductListingPage,Ye as isSafeLink,I as linkKindsFor,In as linkPickerSetup,fo as listingFilterFields,oe as listingNode,qe as listingPageLabel,Qe as listingTarget,D as pageAnchors,P as pagePath,N as postPath,je as productListingPaths,Ze as readListingFilter,C as wheelPath,se as withListingFilter};
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 ue=["main","text","background","muted"],en=[...ue,"surface"];var nn={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 ce=[{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 F=[{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}],pe=["highlight","quiet"],tn=ce.map(e=>e.style).filter(e=>F.some(n=>n.kind===e)).filter(e=>!pe.includes(e)),rn=[...F,{open:"*",close:"*",kind:"accent"}],on=[...F,{open:"*",close:"*",kind:"accent"},{open:"#",close:"#",kind:"bold",notBefore:"0123456789"},{open:"[",close:"]",kind:"italic",notBefore:"(",notBeforeBlock:!0}];var sn=["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||sn.includes(n[1].toLowerCase())}var de=["width","profile","rim"];var ln=/^\s*(\d{2,3})\s*\/\s*(\d{2,3})\s*[A-Za-z]*\s*(\d{2}(?:\.\d+)?)\s*$/,an={width:[100,500],profile:[20,100],rim:[10,30]};function B(e){let n=ln.exec(e??"");if(!n)return null;let t={width:Number(n[1]),profile:Number(n[2]),rim:Number(n[3])};return de.every(o=>{let[i,a]=an[o];return t[o]>=i&&t[o]<=a})?t:null}function _(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 fe(e){return[_({width:e.width}),_({width:e.width,profile:e.profile}),_(e)]}var k=["alloy-wheel","tyre"],me=["alloy-wheel"],R={"alloy-wheel":"Alloy wheels",tyre:"Tyres"};var yt=k.map(e=>({value:e,label:R[e]}));function O(e){return e==null?[...me]:Array.isArray(e)?k.filter(n=>e.includes(n)):[...me]}var m=e=>e;function d(e){return m(e).kind==="tyre"?"tyre":"alloy-wheel"}function W(e){return m(e).brand??""}function ge(e){return m(e).prices??void 0}function he(e){return m(e).inStock!==!1}function ye(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 Pe(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 Se(e){return d(e)==="tyre"?[]:m(e).spec?.pcds??[]}function be(e){return d(e)!=="tyre"?[]:m(e).tyreTypes??[]}function ke(e){return d(e)!=="tyre"?[]:m(e).speedRatings??[]}function xe(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;var we=null;function Le(e,n){return n?e.replace(/\{([A-Za-z][A-Za-z0-9_]*)\}/g,(t,r)=>Object.prototype.hasOwnProperty.call(n,r)?String(n[r]):t):e}function y(e,n){let t=we?we[e]:void 0;if(typeof t=="function"){try{let r=Y(t(n??{}));if(r)return r}catch{}return Le(e,n)}return Le(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}),wt=A(30,0,100,10),Lt=A(0,0,100,5),Tt=A(100,0,100,5),Ft=A(2,0,4,.5);function Te(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 _e(e){return`${j}${e}`}function Re(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 K(...e){let n=new Set,t=[];for(let r of e)for(let o of r?.content??[]){let i=Te(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 Oe(e){return/^\/wheels\/[^/?#]+(?:[?#].*)?$/.test(e)}var un=()=>({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 D(e,n,t){if(!e)return"page";if(Re(e))return"popup";if(e.startsWith("/journal/"))return"blog";if(Oe(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 Ae(e,n){let t=un(),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:K(...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:_e(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=>D(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=>D(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 Ee=Object.freeze([]);function V(e,n){return e.length===0?e:e.filter(t=>t.kind===void 0||t.kind===n)}function Ie(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 Ne(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 Ce(e){return pn(e,"filter")}var cn="collection";function Z(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":cn},pcds:{"alloy-wheel":"pcd"},tyreTypes:{tyre:"tire_type"},speedRatings:{tyre:"speed_rating"}}[e]?.[n]}function pn(e,n){let t=new Set(e.filter(r=>r[n]===!1).map(r=>r.fieldKey));return r=>!r||!t.has(r)}var Q={inStock:"In stock",outOfStock:"Out of stock",notInStockHere:"Not in stock here"};function dn(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function ve(e,n){let t=e?.[n];return dn(t)?t:null}function Ke(e,n,t,r){if(t==null&&r==null)return!0;let o=ve(e,n);return!(o===null||t!=null&&o<t||r!=null&&o>r)}function De(e){let n=e.spec?.lugs;return typeof n=="number"?n:null}var fn={recommended:"Recommended","price-asc":"Price \xB7 low to high","price-desc":"Price \xB7 high to low",new:"Newest",name:"Name A\u2013Z"},cr=Object.keys(fn);var X=["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"]},mn={diameters:"tyreSizes"};function gn(e){if(e.length===0)return[];let n=X.filter(t=>e.every(r=>J[t].includes(r)));return n.filter(t=>{let r=mn[t];return!r||!n.includes(r)})}function hn(e){let n=new Set;for(let t of e)n.add(d(t));return[...n]}var ee={tyreSizes:[],brands:[],finishes:[],diameters:[],collections:[],pcds:[],tyreTypes:[],speedRatings:[],priceMax:null,inStockOnly:!1,kind:null,sort:"recommended",page:1};function Me(e,n,t,r=null,o="fail"){let i=d(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 X){if(r===p)continue;let l=n[p];if(l.length===0||!a(p))continue;let c=l.map(String);if(!Ue(e,p).some(s=>c.includes(s)))return!1}if(r!=="lugs"&&n.lugs&&n.lugs.length>0&&a("lugs")){let p=De(e);if(p===null||!n.lugs.includes(p))return!1}return!(r!=="price"&&!Ke(ge(e),t,n.priceMin??null,n.priceMax)||r!=="inStock"&&n.inStockOnly&&!he(e))}var yn={tyreSizes:"Size",brands:"Brand",finishes:"Colour",diameters:"Size \xB7 diameter",collections:"Collection",pcds:"PCD \xB7 fitment",tyreTypes:"Tyre type",speedRatings:"Speed rating"};function Ue(e,n){switch(n){case"tyreSizes":return[...new Set(xe(e).flatMap(fe))];case"brands":return W(e)?[W(e)]:[];case"finishes":return Pe(e);case"diameters":return ye(e).map(String);case"collections":return H(e);case"pcds":return Se(e);case"tyreTypes":return be(e);case"speedRatings":return ke(e)}}function Pn(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 ze(e,n,t,r=hn(e),o=Ee,i="fail"){let a=u=>bn(u,r,o),p=Pn(e),c=(i==="pass"?X.filter(u=>r.some(b=>J[u].includes(b))):gn(r)).filter(u=>u!=="tyreSizes").filter(a).map(u=>{let b=n[u].map(String),ae=new Set,z=new Map,T=new Map;for(let f of e){let S=Ue(f,u);for(let g of S)ae.add(g);for(let g of new Set(S))T.set(g,(T.get(g)??0)+1);if(Me(f,n,t,u,i))for(let g of new Set(S))z.set(g,(z.get(g)??0)+1)}let Je=[...ae].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=(T.get(S.value)??0)-(T.get(f.value)??0);return g!==0?g:f.value.localeCompare(S.value)});return{key:u,label:yn[u],options:Je}}).filter(u=>u.options.length>Sn),s=[];for(let u of c){let b=kn(u.key,r,o);b!==void 0&&s.push({fieldKey:u.key,filterOrder:b})}return[...Ne(c,u=>u.key,s,"filterOrder")]}var Sn=1;function $e(e){return e.showCollection===!1?["collections"]:[]}function bn(e,n,t){return n.length===0||t.length===0?!0:n.some(r=>Ce(V(t,r))(Z(e,r)))}function kn(e,n,t){if(t.length===0)return;let r;for(let o of n){let i=Ie(V(t,o),"filter")(Z(e,o));i!==void 0&&(r===void 0||i<r)&&(r=i)}return r}var ne={tyreSizes:"tyreSize",brands:"brand",finishes:"colour",diameters:"size",collections:"collection",pcds:"pcd",tyreTypes:"tyreType",speedRatings:"speed"},te="type";var x="FilterBlock";function Be(e){let n=e;return!!n&&typeof n=="object"&&typeof n.type=="string"&&!!n.props&&typeof n.props=="object"}function xn(e){return Object.entries(e.props??{}).filter(n=>Array.isArray(n[1])&&n[1].length>0&&n[1].every(Be))}function wn(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 We(e){let n=[],t=(r,o)=>{let i=[r,...o];for(let a of r)if(Be(a)){n.push({node:a,order:n.length,lists:i});for(let[,p]of xn(a))t(p,i)}};for(let r of wn(e))t(r,[]);return n}function w(e){return We(e).map(n=>n.node)}var re={vehicle:"My Car",process:"Process",size:"Size",lugs:"Lugs",finish:"Finish",price:"Price"};var kr=[{value:"inStock",label:Q.inStock},{value:"category",label:"Category"},{value:"lugs",label:re.lugs},{value:"price",label:re.price}];var He="AlloyWheelsListing";function Ye(e){return $(e.trim())}var L="/wheels",M="Products";function qe(e,n){return n>1?`${M} \xB7 ${e}`:M}function oe(...e){for(let n of[He,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 oe(...e)!==null}function je(e,n){let t=e.filter(r=>U(...r.docs)).map(r=>P(r.slug));return n.fallback&&!t.includes(L)?[...t,L]:t}var ie=[te,...Object.entries(ne).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 _n(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return e}}function Ze(e){let n=new URLSearchParams(Ve(e).query);for(let t of ie){let r=n.get(t);if(r)return{param:t,value:r}}return null}function se(e,n){let{path:t,query:r,hash:o}=Ve(e),i=r.split("&").filter(a=>a&&!ie.includes(_n(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=se(e,null);return n.includes(t)?t:e}function Rn(e,n,t=[]){return D(e,n,{listingPaths:t,targetOf:r=>Qe(r,t)})}function On(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 Xe="Product type",An="AUD";function le(e,n){let t=n.listing??{},r=O(t.kinds),o=e.filter(l=>r.includes(d(l))),i=$e(t),a=ze(o,ee,An,r,n.fieldUsage).filter(l=>!i.includes(l.key)).map(l=>({param:ne[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:te,label:Xe,values:p.map(l=>({value:l,label:R[l]}))}),a}function En(e){return n=>{let t=je(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:qe(p.title,r)}:a});return r===0&&e.offersCommerce&&!i.some(a=>a.value===L)&&i.push({value:L,label:M}),i},filtersFor:o=>{if(!t.includes(o))return null;let i=n.find(a=>P(a.slug)===o);return le(e.catalogue,{listing:i?oe(...i.docs):null,fieldUsage:e.fieldUsage})},readFilter:Ze,withFilter:se}}}function In(e){let n=En({catalogue:e.catalogue,fieldUsage:e.fieldUsage,offersCommerce:e.offers.offersCommerce})(e.pages),t=Ae({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:Ye},filtersFor:t.filtersFor??(()=>null)}}function fo(e,n){return le(e,n)}export{L as BUILT_IN_LISTING_PATH,E as LINK_KINDS,ie as LISTING_FILTER_PARAMS,M as LISTING_PAGE_LABEL,Xe as PRODUCT_TYPE_FILTER_LABEL,v as anchorPath,On as fieldUsageFromAdminRows,Rn as inferLinkKind,U as isProductListingPage,Ye as isSafeLink,I as linkKindsFor,In as linkPickerSetup,fo as listingFilterFields,oe as listingNode,qe as listingPageLabel,Qe as listingTarget,K as pageAnchors,P as pagePath,N as postPath,je as productListingPaths,Ze as readListingFilter,C as wheelPath,se as withListingFilter};
@@ -119,9 +119,12 @@
119
119
  /* Its mirror: foreground text that sits over a LIGHT surface and must stay
120
120
  near-black in BOTH themes. Same contract as --overlay-fg above — declared
121
121
  once here and deliberately NOT overridden in the [data-theme="light"] block
122
- below. Its one consumer is the site header's "Text colour at the top =
122
+ below. Its two consumers: the site header's "Text colour at the top =
123
123
  Dark" override, which is a merchant saying "the thing under my nav is
124
- light" about a page in either theme, so it cannot be var(--fg). The value
124
+ light" about a page in either theme, so it cannot be var(--fg); and a
125
+ Box filled from its card row with a light colour (efficient-web-builder
126
+ `ON_LIGHT_INK`, `rowFillInkStyle`), whose words must be dark whatever the
127
+ theme. The value
125
128
  is the same near-black the deleted light surface class used to paint. */
126
129
  --overlay-fg-on-light: #0a0a0a;
127
130
  /* Alert / destructive accent — a muted terracotta. Used for inline
@@ -1,3 +1,3 @@
1
1
  {
2
- "efficient-web-builder": "59.3.0"
2
+ "efficient-web-builder": "61.0.0"
3
3
  }
@@ -1,6 +1,6 @@
1
1
  import { type CSSProperties, type ReactNode } from "react";
2
2
  import type { SlotComponent } from "efficient-easel/blocks";
3
- import { type CardHoverDrawn } from "efficient-web-builder/format/lib/animation/hover";
3
+ import { type CardHoverDrawn, type HoverMediaCover } from "efficient-web-builder/format/lib/animation/hover";
4
4
  import type { SourceRow } from "efficient-web-builder/format/lib/content/block-sources";
5
5
  import type { Bundle, WheelSummary } from "../lib/api/index.js";
6
6
  import type { VehicleFitment } from "../lib/wheels/plp-fitment-match.js";
@@ -50,9 +50,10 @@ export declare function GridCardProvider({ value, children }: {
50
50
  value: GridCardValues;
51
51
  children: ReactNode;
52
52
  }): import("react").JSX.Element;
53
- export declare function productCardRow(wheel: WheelSummary): SourceRow;
53
+ export declare function productCardRow(wheel: WheelSummary, finishColour?: string): SourceRow;
54
54
  export declare const bundlePagePath: (bundle: Bundle) => string;
55
55
  export declare function bundleCardRow(bundle: Bundle): SourceRow;
56
+ export declare function useCardHoverLayer(cover: HoverMediaCover, ground?: string): ReactNode;
56
57
  export declare function GridCards({ wheels, finishes, children, }: {
57
58
  wheels: readonly WheelSummary[];
58
59
  finishes?: readonly (string | undefined)[];
@@ -1 +1 @@
1
- "use client";import{jsx as o,jsxs as f,Fragment as p}from"react/jsx-runtime";import _ from"next/link";import{createContext as v,useContext as y,useMemo as R}from"react";import{CardTemplateRows as m}from"efficient-web-builder/render/components/CardRowContext";import{InsideSiteColumn as I}from"efficient-web-builder/render/components/SiteGutterFrame";import{HideTaker as T}from"efficient-web-builder/render/components/ViewHideRoot";import{cardHoverOf as E}from"efficient-web-builder/format/lib/animation/hover";import{NO_FIELD_ANSWERS as O}from"../lib/content/field-usage.js";import{CARD_IMAGE_SIZES as G}from"../lib/sections/card-image-sizes.js";import{CardLookContext as x}from"./card-pieces/card-row.js";import{CardBuyDialog as A}from"./card-pieces/CardBuyButton.js";import{BundleCardStateProvider as N,useWheelCardState as P,WheelCardStateProvider as D}from"./card-pieces/ProductCardState.js";import{say as L}from"efficient-web-builder/format/lib/editor-words";import{CARD_INDEX_OPTIONS as F,cardIndexCss as k}from"efficient-web-builder/format/lib/sections/product-card-style";import{SHARED_ROWS_LIST_CLASS as $}from"efficient-web-builder/render/lib/content/box-shared-columns";import{GAP_ZONE_CLASS as j}from"efficient-web-builder/format/lib/content/container-gap";import{CARD_ROWS_GRID_CLASS as U,cardRowsGap as z,cardRowsGridStyle as W}from"./WheelCardFrame.js";function he(e){return F.map(({value:r})=>r==="off"?"":k(e,r).replace(".sf-card-index::before",`.sf-card-index[data-format="${r}"]::before`)).join("")}function ge(e){return e.className.includes(j)?{className:`${e.className} ${U} ${$}`,style:{...e.style,...W(z(e))}}:e}const B={sale:!1,axleSets:!0,setTotal:!1,wasFollowsSize:!1,quoteSets:!0,showSingle:!1,armOnContact:!1},_e={sale:!0,axleSets:!1,setTotal:!0,wasFollowsSize:!0,quoteSets:!1,showSingle:!0,armOnContact:!0},H={kindLabel:null,brand:!1,process:!0},M=[],C={ownerId:"",ownerType:"ProductGrid",Template:void 0,hover:E({},"ProductGrid"),imageSizes:G,fieldUsage:O,reserveEyebrow:!1,editing:!1,eyebrow:H,fit:null,colours:M,rules:B},w=v(C);function u(){return y(w)}function ve({value:e,children:r}){const t=R(()=>({...C,...Y(e)}),[e]);return o(w.Provider,{value:t,children:r})}const Y=e=>Object.fromEntries(Object.entries(e).filter(([,r])=>r!==void 0));function q(e){return{name:e.name??"",eyebrow:e.process??"",note:"",href:e.slug?`/wheels/${e.slug}`:""}}const S=e=>`/bundles/${e.slug}`;function K(e){return{name:e.name,eyebrow:"",note:e.subtitle??"",href:S(e)}}const V="sf-card sf-card-fill group relative flex flex-col bg-[var(--card-bg)] transition-colors duration-200 hover:bg-[var(--card-bg-hover)] [.sf-card-rows>&]:mb-[var(--sf-card-row-gap)]",X="sf-card group relative flex flex-col border border-line bg-bg transition-colors hover:border-accent",J="col-span-2 max-view-wide:col-span-1 @max-[720px]:col-span-1 [&:has([data-set-picture=one])]:col-span-1",Q="relative z-[2] flex flex-1 flex-col pointer-events-none [&_a]:pointer-events-auto [&_button]:pointer-events-auto [&_input]:pointer-events-auto [&_select]:pointer-events-auto [&_label]:pointer-events-auto",Z="relative flex flex-1 flex-col";function b({copy:e,href:r,label:t,wide:a=!1,kit:s=!1,probes:i,arm:n}){const{editing:l}=u(),c=s?X:V,d=n?{onPointerEnter:n,onTouchStart:n,onFocusCapture:n}:{};return f(T,{as:"article",className:a?`${c} ${J}`:c,...d,children:[i,!l&&r?o(_,{href:r,"aria-label":t,className:"absolute inset-0 z-[1]"}):null,o("div",{className:l?Z:Q,children:o(I,{children:e})})]})}function ee({copy:e}){const{wheel:r,sel:t,isSet:a}=P(),{rules:s}=u();return f(p,{children:[o(b,{copy:e,href:r.slug?`/wheels/${r.slug}`:"",label:r.name,wide:a,probes:t.probes,arm:s.armOnContact?t.arm:void 0}),o(A,{})]})}function re(e,r,t,a){const s=r.item;return o(D,{wheel:s,colours:t.colours,defaultFinish:a?.[r.index],editing:t.editing,children:o(x.Provider,{value:"catalog",children:o(ee,{copy:e})})})}function h({wheels:e,finishes:r,children:t}){const a=u(),{ownerId:s,ownerType:i,Template:n,editing:l}=a;return o(m,{ownerId:s,ownerType:i,Template:n,rows:e.map(q),items:e,fallback:l?o(g,{}):null,wrapCopy:(c,d)=>re(c,d,a,r),children:t})}function ye({items:e,isWheel:r,other:t}){const{Template:a}=u(),s=e.filter(r),i=n=>{let l=0;return e.map((c,d)=>r(c)?n[l++]??null:t(c,d))};return!a||(a.blockCount??0)<=0?f(p,{children:[e.map((n,l)=>r(n)?null:t(n,l)),s.length>0&&o(h,{wheels:s,children:n=>n})]}):o(h,{wheels:s,children:n=>i(n)})}function te(e,r){const t=r.item;return o(N,{bundle:t,children:o(x.Provider,{value:"catalog",children:o(b,{copy:e,href:S(t),label:t.name,kit:!0})})})}function Re({bundles:e,children:r}){const{ownerId:t,ownerType:a,Template:s,editing:i}=u();return o(m,{ownerId:t,ownerType:a,Template:s,rows:e.map(K),items:e,fallback:i?o(g,{}):null,wrapCopy:te,children:r})}function g(){return o("div",{"data-grid-card-empty":"",className:"p-4 text-center font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.2em] text-fg-dim",children:L("The card is empty. Add parts to its card template in Layers.")})}export{B as GRID_CARD_RULES,Re as GridBundleCards,ve as GridCardProvider,h as GridCards,ye as GridMixedCards,_e as LISTING_CARD_RULES,K as bundleCardRow,S as bundlePagePath,ge as cardRowsGrid,he as gridIndexCss,q as productCardRow,u as useGridCard};
1
+ "use client";import{jsx as t,jsxs as f,Fragment as m}from"react/jsx-runtime";import I from"next/link";import{createContext as O,useContext as E,useMemo as p}from"react";import{CardRowContext as G,CardTemplateRows as C,useCardRow as P}from"efficient-web-builder/render/components/CardRowContext";import{InsideSiteColumn as A}from"efficient-web-builder/render/components/SiteGutterFrame";import{HideTaker as D}from"efficient-web-builder/render/components/ViewHideRoot";import{cardHoverOf as L}from"efficient-web-builder/format/lib/animation/hover";import{pickHoverMedia as N}from"efficient-web-builder/format/lib/content/hover-media";import{PHOTO_HOST_ATTR as k}from"efficient-web-builder/format/lib/content/image-treatment";import F from"efficient-web-builder/render/components/HoverMediaLayer";import{NO_FIELD_ANSWERS as $}from"../lib/content/field-usage.js";import{CARD_IMAGE_SIZES as H}from"../lib/sections/card-image-sizes.js";import{productTone as U,productToneVaried as j,randomCardColour as z}from"../lib/sections/card-tone.js";import{CardLookContext as x}from"./card-pieces/card-row.js";import{CardBuyDialog as M}from"./card-pieces/CardBuyButton.js";import{BundleCardStateProvider as W,useProductCardState as B,useWheelCardState as w,WheelCardStateProvider as V}from"./card-pieces/ProductCardState.js";import{say as Y}from"efficient-web-builder/format/lib/editor-words";import{CARD_INDEX_OPTIONS as q,cardIndexCss as K}from"efficient-web-builder/format/lib/sections/product-card-style";import{SHARED_ROWS_LIST_CLASS as X}from"efficient-web-builder/render/lib/content/box-shared-columns";import{GAP_ZONE_CLASS as J}from"efficient-web-builder/format/lib/content/container-gap";import{CARD_ROWS_GRID_CLASS as Q,cardRowsGap as Z,cardRowsGridStyle as ee}from"./WheelCardFrame.js";function $e(e){return q.map(({value:r})=>r==="off"?"":K(e,r).replace(".sf-card-index::before",`.sf-card-index[data-format="${r}"]::before`)).join("")}function He(e){return e.className.includes(J)?{className:`${e.className} ${Q} ${X}`,style:{...e.style,...ee(Z(e))}}:e}const re={sale:!1,axleSets:!0,setTotal:!1,wasFollowsSize:!1,quoteSets:!0,showSingle:!1,armOnContact:!1},Ue={sale:!0,axleSets:!1,setTotal:!0,wasFollowsSize:!0,quoteSets:!1,showSingle:!0,armOnContact:!0},oe={kindLabel:null,brand:!1,process:!0},te=[],h={ownerId:"",ownerType:"ProductGrid",Template:void 0,hover:L({},"ProductGrid"),imageSizes:H,fieldUsage:$,reserveEyebrow:!1,editing:!1,eyebrow:oe,fit:null,colours:te,rules:re},S=O(h);function u(){return E(S)}function je({value:e,children:r}){const o=p(()=>({...h,...ne(e)}),[e]);return t(S.Provider,{value:o,children:r})}const ne=e=>Object.fromEntries(Object.entries(e).filter(([,r])=>r!==void 0));function v(e,r){const o=e.designCode??e.slug??"";return{name:e.name??"",eyebrow:e.process??"",note:"",href:e.slug?`/wheels/${e.slug}`:"",colour:U(r),colourVaried:j(r,o),colourRandom:z(o)}}const b=e=>`/bundles/${e.slug}`;function ae(e){return{name:e.name,eyebrow:"",note:e.subtitle??"",href:b(e),colour:"",colourVaried:"",colourRandom:""}}const se="sf-card sf-card-fill group relative flex flex-col bg-[var(--card-bg)] transition-colors duration-200 hover:bg-[var(--card-bg-hover)] [.sf-card-rows>&]:mb-[var(--sf-card-row-gap)]",le="sf-card group relative flex flex-col border border-line bg-bg transition-colors hover:border-accent",ie="col-span-2 max-view-wide:col-span-1 @max-[720px]:col-span-1 [&:has([data-set-picture=one])]:col-span-1",ce="relative z-[2] flex flex-1 flex-col pointer-events-none [&_a]:pointer-events-auto [&_button]:pointer-events-auto [&_input]:pointer-events-auto [&_select]:pointer-events-auto [&_label]:pointer-events-auto",de="relative flex flex-1 flex-col";function g({copy:e,href:r,label:o,wide:n=!1,kit:a=!1,probes:l,arm:s,layer:c}){const{editing:i}=u(),d=a?le:se,y=s?{onPointerEnter:s,onTouchStart:s,onFocusCapture:s}:{},T=c?{[k]:""}:{};return f(D,{as:"article",className:n?`${d} ${ie}`:d,...T,...y,children:[l,!i&&r?t(I,{href:r,"aria-label":o,className:"absolute inset-0 z-[1]"}):null,t("div",{className:i?de:ce,children:t(A,{children:e})}),c]})}const ue="var(--card-bg)";function fe(e,r=ue){const{hover:o}=u(),n=B();if(o.kind!=="nextImage"||o.media?.cover!==e||n.kind!=="wheel")return null;const a=N(n.wheel,o.media,n.sel.finish?.name);return a?t(F,{media:a,name:n.wheel.name,cover:e,ground:r}):null}function me({children:e}){const r=P(),{wheel:o,sel:n}=w(),a=n.finish?.color,l=p(()=>r?{...r,row:v(o,a)}:null,[r,o,a]);return l?t(G.Provider,{value:l,children:e}):t(m,{children:e})}function pe({copy:e}){const{wheel:r,sel:o,isSet:n}=w(),{rules:a}=u(),l=fe("card");return f(m,{children:[t(g,{copy:t(me,{children:e}),href:r.slug?`/wheels/${r.slug}`:"",label:r.name,wide:n,probes:o.probes,arm:a.armOnContact?o.arm:void 0,layer:l}),t(M,{})]})}function Ce(e,r,o,n){const a=r.item;return t(V,{wheel:a,colours:o.colours,defaultFinish:n?.[r.index],editing:o.editing,children:t(x.Provider,{value:"catalog",children:t(pe,{copy:e})})})}function _({wheels:e,finishes:r,children:o}){const n=u(),{ownerId:a,ownerType:l,Template:s,editing:c}=n;return t(C,{ownerId:a,ownerType:l,Template:s,rows:e.map(i=>v(i)),items:e,fallback:c?t(R,{}):null,wrapCopy:(i,d)=>Ce(i,d,n,r),children:o})}function ze({items:e,isWheel:r,other:o}){const{Template:n}=u(),a=e.filter(r),l=s=>{let c=0;return e.map((i,d)=>r(i)?s[c++]??null:o(i,d))};return!n||(n.blockCount??0)<=0?f(m,{children:[e.map((s,c)=>r(s)?null:o(s,c)),a.length>0&&t(_,{wheels:a,children:s=>s})]}):t(_,{wheels:a,children:s=>l(s)})}function xe(e,r){const o=r.item;return t(W,{bundle:o,children:t(x.Provider,{value:"catalog",children:t(g,{copy:e,href:b(o),label:o.name,kit:!0})})})}function Me({bundles:e,children:r}){const{ownerId:o,ownerType:n,Template:a,editing:l}=u();return t(C,{ownerId:o,ownerType:n,Template:a,rows:e.map(ae),items:e,fallback:l?t(R,{}):null,wrapCopy:xe,children:r})}function R(){return t("div",{"data-grid-card-empty":"",className:"p-4 text-center font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.2em] text-fg-dim",children:Y("The card is empty. Add parts to its card template in Layers.")})}export{re as GRID_CARD_RULES,Me as GridBundleCards,je as GridCardProvider,_ as GridCards,ze as GridMixedCards,Ue as LISTING_CARD_RULES,ae as bundleCardRow,b as bundlePagePath,He as cardRowsGrid,$e as gridIndexCss,v as productCardRow,fe as useCardHoverLayer,u as useGridCard};
@@ -1 +1 @@
1
- "use client";import{jsx as r}from"react/jsx-runtime";import{Render as u}from"efficient-easel/render";import{renderConfig as a}from"../lib/document/render-config.js";import{publishedChromeData as d}from"../lib/document/published-chrome-data.js";import{SITE_FOOTER_KIND as f}from"efficient-web-builder/format/lib/content/footer";import{PublishedFooterContext as p}from"efficient-web-builder/render/components/PublishedFooterContext";import{EMPTY_SOCIAL_LINKS as I}from"efficient-web-builder/format/lib/content/social-links";function c({footerBlock:l,rootProps:e,headerSettings:o,siteName:n,legalName:t,foundedYear:i,socialLinks:m}){const s=d({root:{props:{...e??{},kind:f}},content:[l],zones:{}});return r(p.Provider,{value:{logoUrl:o?.logoUrl??null,logoReversed:o?.logoReversed??null,logoInkIsDark:o?.logoInkIsDark??null,siteName:n,legalName:t??null,foundedYear:i??null,socialLinks:m??I},children:r(u,{config:a(),data:s})})}export{c as default};
1
+ "use client";import{jsx as r}from"react/jsx-runtime";import{Render as u}from"efficient-easel/render";import{renderConfig as a}from"../lib/document/render-config.js";import{SITE_FOOTER_KIND as d}from"efficient-web-builder/format/lib/content/footer";import{PublishedFooterContext as f}from"efficient-web-builder/render/components/PublishedFooterContext";import{publishedChromeData as p}from"efficient-web-builder/render/lib/document/published-passes";import{EMPTY_SOCIAL_LINKS as I}from"efficient-web-builder/format/lib/content/social-links";function c({footerBlock:l,rootProps:e,headerSettings:o,siteName:n,legalName:t,foundedYear:i,socialLinks:m}){const s=p({root:{props:{...e??{},kind:d}},content:[l],zones:{}});return r(f.Provider,{value:{logoUrl:o?.logoUrl??null,logoReversed:o?.logoReversed??null,logoInkIsDark:o?.logoInkIsDark??null,siteName:n,legalName:t??null,foundedYear:i??null,socialLinks:m??I},children:r(u,{config:a(),data:s})})}export{c as default};
@@ -1 +1 @@
1
- "use client";import{jsx as e}from"react/jsx-runtime";import{Render as n}from"efficient-easel/render";import i from"./BoxHeaderBar.js";import{headerRenderConfig as p}from"../lib/document/render-config.js";import{publishedChromeData as s}from"../lib/document/published-chrome-data.js";import{chromeOwnWidth as a}from"efficient-web-builder/format/lib/content/section-width";function c({group:t}){const r=s({root:{props:{}},content:[t],zones:{}}),o=t.props??{};return e(i,{sticky:o.sticky,topTextColor:o.topTextColor,heightPx:o.heightPx,theme:o.sectionAccent,bandCapped:a(t.props??{}).background==="content",children:e(n,{config:p(),data:r})})}export{c as default};
1
+ "use client";import{jsx as r}from"react/jsx-runtime";import{Render as a}from"efficient-easel/render";import i from"./BoxHeaderBar.js";import{headerRenderConfig as d}from"../lib/document/render-config.js";import{headerBarOf as n}from"../lib/document/published-header-bar.js";import{publishedChromeData as p}from"efficient-web-builder/render/lib/document/published-passes";function m({group:t}){const o=p({root:{props:{}},content:[t],zones:{}}),e=n(o);return r(i,{sticky:e.sticky,topTextColor:e.topTextColor,heightPx:e.heightPx,theme:e.theme,bandCapped:e.bandCapped,children:r(a,{config:d(),data:o})})}export{m as default};
@@ -6,6 +6,9 @@ export interface CardProductPictureSettings {
6
6
  showBadge?: unknown;
7
7
  frame?: unknown;
8
8
  setPicture?: unknown;
9
+ swatch?: unknown;
10
+ shadow?: unknown;
11
+ shadowColor?: unknown;
9
12
  }
10
13
  export declare const PICTURE_FRAMES: readonly ["well", "full"];
11
14
  export type PictureFrame = (typeof PICTURE_FRAMES)[number];
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as m,Fragment as k}from"react/jsx-runtime";import v from"next/image";import{useState as Z}from"react";import{HideTaker as _}from"efficient-web-builder/render/components/ViewHideRoot";import{CARD_INDEX_BADGE_CLASS as z,CARD_INDEX_CLASS as G,parseCardIndexFormat as q}from"efficient-web-builder/format/lib/sections/product-card-style";import{CARD_IMAGE_BG_OFF as B,cardImageBackgroundPaints as J,resolveCardImageBackground as D}from"efficient-web-builder/format/lib/content/card-image-background";import{cardImageShapeTokens as N}from"efficient-web-builder/format/lib/content/card-image-shape";import{sayCount as Q}from"efficient-web-builder/format/lib/editor-words";import{parseSetPicture as V,setSecondSrc as Y}from"../../lib/wheels/set-mode.js";import{coverSrcForWheel as ee,parseCoverIndex as re,resolvePaintedSrc as te}from"../../lib/wheels/cover-rendering.js";import ae from"../WheelPlaceholder.js";import{cardSpinOf as ne}from"../card-spin.js";import{useGridCard as R}from"../GridCardTemplate.js";import T from"./CardPicture.js";import A from"./CardProductBadge.js";import{useHeldCardPicture as le}from"./useHeldCardPicture.js";import{useProductCardState as se}from"./ProductCardState.js";const Ee=["well","full"],ie="well",L=r=>r==="full"?"full":ie;function oe({children:r}){return e("div",{className:"h-full w-full transition-transform duration-500 motion-safe:group-hover:scale-[1.03]",children:r})}function M({fill:r,badge:n,children:o}){const c=J(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,n]})}function ce(r){const n=se();return n.kind==="bundle"?e(de,{state:n,...r}):n.kind!=="wheel"?null:e(me,{state:n,...r})}function de({state:r,imageBackground:n,cardImage:o,showBadge:c,frame:x}){const{bundle:s}=r,{imageSizes:p}=R(),f=L(x)==="full",i=s.components.length,t=s.image?f?e(v,{alt:s.name,src:s.image,fill:!0,sizes:p,className:"object-cover",draggable:!1}):e(v,{alt:s.name,src:s.image,width:1e3,height:1e3,sizes:p,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:Q("{n} piece","{n} pieces",i,{})}),d=e(oe,{children:t}),g=D(n,B),u=c!==!1?e(A,{edge:f}):null;return e(_,{style:N(o),children:f?e(M,{fill:g,badge:u,children:d}):m(k,{children:[u,e(T,{image:d,imageBackgroundFill:g})]})})}function me({state:r,imageBackground:n,cardImage:o,coverIndex:c,indexBadge:x,showBadge:s,frame:p,setPicture:f}){const{wheel:i,sel:t,isSet:d}=r,{hover:g,imageSizes:u,fit:O,rules:S,setGridGap:U}=R(),C=ne(g),W=ee(i,re(c),t.finish?.name,t.shownSrc,O?.holes),[E,H]=Z(()=>new Set),y=a=>{t.pictureFailed(a),H(h=>h.has(a)?h:new Set(h).add(a))},I=te({overrideSrc:W,hookSrc:t.shownSrc,failed:E}),F=(a,h)=>e(v,{alt:h,src:a,width:1e3,height:1e3,sizes:u,className:`block h-full w-full object-contain ${C.className}`,style:C.style,draggable:!1,onError:()=>y(a)},a),X=t.finish?`${i.name} — ${t.finish.name}`:i.name,b=d&&V(f)==="pair",K=b?Y(i.finishes?.find(a=>a.name===t.finish?.name),I):null,l=le({src:I,second:K,alt:X,sizes:u,failed:E,onFailed:y,near:t.nearScreen,holdEmpty:t.awaitingProbe}),$=m(k,{children:[l.src?F(l.src,l.alt):e(ae,{imageLabel:i.name,spin:C}),l.trial]}),P=q(x),w=P!=="off",j=D(n,B);if(L(p)==="full"){const a=m(k,{children:[w?e("span",{"aria-hidden":!0,"data-format":P,className:`${G} ${z}`}):null,e(A,{show:s!==!1,numbered:w,sale:S.sale,axleSets:S.axleSets,edge:!0})]});return e(_,{style:N(o),"data-set-picture":d&&!b?"one":void 0,children:e(M,{fill:j,badge:a,children:m("div",{className:"flex h-full w-full items-center justify-center",children:[$,l.second?F(l.second,`${l.alt} — right`):null]})})})}return m(_,{style:N(o),"data-set-picture":d&&!b?"one":void 0,children:[w?e("span",{"aria-hidden":!0,"data-format":P,className:`${G} ${z}`}):null,e(A,{show:s!==!1,numbered:w,sale:S.sale,axleSets:S.axleSets}),e(T,{image:$,imageSecond:l.second?F(l.second,`${l.alt} — right`):void 0,wide:b,imageBackgroundFill:j,setGridGap:U})]})}export{ie as DEFAULT_PICTURE_FRAME,Ee as PICTURE_FRAMES,ce as default};
1
+ "use client";import{jsx as e,jsxs as c,Fragment as k}from"react/jsx-runtime";import y from"next/image";import{useState as ee}from"react";import{HideTaker as A}from"efficient-web-builder/render/components/ViewHideRoot";import{CARD_INDEX_BADGE_CLASS as D,CARD_INDEX_CLASS as T,parseCardIndexFormat as re}from"efficient-web-builder/format/lib/sections/product-card-style";import{CARD_IMAGE_BG_OFF as te,cardImageBackgroundPaints as H,resolveCardImageBackground as ae}from"efficient-web-builder/format/lib/content/card-image-background";import{cardImageShapeTokens as N}from"efficient-web-builder/format/lib/content/card-image-shape";import{BOX_SWATCH_PROP as ne,boxSwatchFill as le}from"efficient-web-builder/format/lib/content/box-background";import{useCardRow as se}from"efficient-web-builder/render/components/CardRowContext";import{pictureShadowFilter as ie}from"efficient-easel/screen/lib/document/shadow-values";import{sayCount as oe}from"efficient-web-builder/format/lib/editor-words";import{parseSetPicture as ce,setSecondSrc as de}from"../../lib/wheels/set-mode.js";import{coverSrcForWheel as me,parseCoverIndex as ue,resolvePaintedSrc as fe}from"../../lib/wheels/cover-rendering.js";import he from"../WheelPlaceholder.js";import{cardSpinOf as pe}from"../card-spin.js";import{useCardHoverLayer as ge,useGridCard as L}from"../GridCardTemplate.js";import O from"./CardPicture.js";import E from"./CardProductBadge.js";import{useHeldCardPicture as Se}from"./useHeldCardPicture.js";import{useProductCardState as we}from"./ProductCardState.js";const Me=["well","full"],be="well",W=r=>r==="full"?"full":be;function Ce({children:r}){return e("div",{className:"h-full w-full transition-transform duration-500 motion-safe:group-hover:scale-[1.03]",children:r})}function M({fill:r,badge:t,children:i}){const d=H(r);return c("div",{className:`sf-card-image relative aspect-[4/3] overflow-hidden${d?"":" bg-surface"}`,style:d?{backgroundColor:r}:void 0,children:[i,t]})}function U(r,t){const i=se();return le({[ne]:r},i?.row)??ae(t,te)}function Fe(r){const t=we();return t.kind==="bundle"?e(xe,{state:t,...r}):t.kind!=="wheel"?null:e(Pe,{state:t,...r})}function xe({state:r,imageBackground:t,cardImage:i,showBadge:d,frame:F,swatch:h}){const{bundle:o}=r,{imageSizes:p}=L(),u=W(F)==="full",x=o.components.length,P=o.image?u?e(y,{alt:o.name,src:o.image,fill:!0,sizes:p,className:"object-cover",draggable:!1}):e(y,{alt:o.name,src:o.image,width:1e3,height:1e3,sizes:p,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:oe("{n} piece","{n} pieces",x,{})}),s=e(Ce,{children:P}),a=U(h,t),m=d!==!1?e(E,{edge:u}):null;return e(A,{style:N(i),children:u?e(M,{fill:a,badge:m,children:s}):c(k,{children:[m,e(O,{image:s,imageBackgroundFill:a})]})})}function Pe({state:r,imageBackground:t,cardImage:i,coverIndex:d,indexBadge:F,showBadge:h,frame:o,setPicture:p,swatch:u,shadow:x,shadowColor:P}){const{wheel:s,sel:a,isSet:m}=r,{hover:X,imageSizes:I,fit:K,rules:g,setGridGap:Z}=L(),S=pe(X),q=me(s,ue(d),a.finish?.name,a.shownSrc,K?.holes),[$,J]=ee(()=>new Set),j=n=>{a.pictureFailed(n),J(f=>f.has(n)?f:new Set(f).add(n))},R=fe({overrideSrc:q,hookSrc:a.shownSrc,failed:$}),z=s.rendersHaveAlpha===!0?ie(x,P):null,Q=z?{...S.style,filter:z}:S.style,v=(n,f)=>e(y,{alt:f,src:n,width:1e3,height:1e3,sizes:I,className:`block h-full w-full object-contain ${S.className}`,style:Q,draggable:!1,onError:()=>j(n)},n),V=a.finish?`${s.name} — ${a.finish.name}`:s.name,w=m&&ce(p)==="pair",Y=w?de(s.finishes?.find(n=>n.name===a.finish?.name),R):null,l=Se({src:R,second:Y,alt:V,sizes:I,failed:$,onFailed:j,near:a.nearScreen,holdEmpty:a.awaitingProbe}),B=c(k,{children:[l.src?v(l.src,l.alt):e(he,{imageLabel:s.name,spin:S}),l.trial]}),_=re(F),b=_!=="off",C=U(u,t),G=ge("picture",H(C)?C:void 0);if(W(o)==="full"){const n=c(k,{children:[b?e("span",{"aria-hidden":!0,"data-format":_,className:`${T} ${D}`}):null,e(E,{show:h!==!1,numbered:b,sale:g.sale,axleSets:g.axleSets,edge:!0})]});return e(A,{style:N(i),"data-set-picture":m&&!w?"one":void 0,children:c(M,{fill:C,badge:n,children:[c("div",{className:"flex h-full w-full items-center justify-center",children:[B,l.second?v(l.second,`${l.alt} — right`):null]}),G]})})}return c(A,{style:N(i),"data-set-picture":m&&!w?"one":void 0,children:[b?e("span",{"aria-hidden":!0,"data-format":_,className:`${T} ${D}`}):null,e(E,{show:h!==!1,numbered:b,sale:g.sale,axleSets:g.axleSets}),e(O,{image:B,imageSecond:l.second?v(l.second,`${l.alt} — right`):void 0,wide:w,imageBackgroundFill:C,setGridGap:Z,plate:G})]})}export{be as DEFAULT_PICTURE_FRAME,Me as PICTURE_FRAMES,Fe as default};
@@ -1 +1 @@
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
+ "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 L,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{IMAGE_ZONES as M}from"../../lib/sections/product-pictures.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 T}from"efficient-web-builder/render/components/ViewHideRoot";const ae=X;function ne(e,o){if(!e)return[];if(o==="all")return M.flatMap(n=>e[n]??[]);const r=M.includes(o)?o:null;return r?e[r]??[]:[]}const k="relative z-[2] bg-bg py-[120px] max-view-wide:py-[70px]",I="relative z-[2] bg-bg pt-0 pb-[120px] max-view-wide:pt-0 max-view-wide:pb-[70px]",H="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 se(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(),n=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:L},()=>({images:[""]})):[];return t(A,{...e,tiles:n,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 Ee(e){const{rows:o,limit:r,layout:n,editing:a=!1,title:h}=e,d=oe(n),c=typeof r=="number"&&r>0?Math.floor(r):void 0,p=o.filter(s=>typeof s.cover=="string"&&s.cover).map(s=>({images:[s.cover],...s.video?{video:s.video}:{}})),g=a&&p.length===0?Array.from({length:c??L},()=>({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:n,linkHref:a,galleryHref:h="/gallery",submitHref:d="/contact",zone:c="all",photoDisplay:p="covers",previewHover:g,display:s,displayPhone:y,styleOwner:v,editing:f=!1,padTop:G,padBottom:x}){const w=Y(),N=te(f&&!w),u=w?.product??N,b=ne(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),P=(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:n,linkHref:a,galleryHref:h,submitHref:d,previewHover:g,display:s,displayPhone:y,styleOwner:v,editing:f,padTop:G,padBottom:x,tiles:u?P.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:n,linkHref:a,galleryHref:h="/gallery",submitHref:d="/contact",previewHover:c,display:p,displayPhone:g,styleOwner:s,editing:y=!1,tiles:v,owner:f,emptyHint:G,photosOnly:x=!1,tilesAcross:w,tileRatio:N=null,padTop:u,padBottom:b}){const R=n?{text:n,href:a||"#"}:void 0,P=r?U(r,!1):void 0,i=e?null:t(Z,{num:o,title:P,link:R}),m=!y&&V(o,r,R?.text)?null:i,E=W(u,b);return v.length===0?y?t(T,{as:"section",className:e?I:k,style:E,children:S("div",{className:H,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(T,{as:"section",className:e?I:k,style:E,children:S("div",{className:H,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:s,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,O)=>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}-${O}`))})})}),!x&&t("div",{className:"mt-12 flex flex-col items-center gap-3",children:t(C,{href:h,variant:"ghost",children:"See Gallery"})})]})})}export{Ee as SourcedGalleryGrid,se as default,ae as supportedKinds};
@@ -21,6 +21,7 @@ export declare const loadUnifiedProductCatalog: (force?: boolean) => Promise<(({
21
21
  spec: import("../lib/api/types.js").components["schemas"]["WheelSpec"] | null;
22
22
  coverImage: string | null;
23
23
  defaultFinish?: string | null;
24
+ rendersHaveAlpha?: boolean;
24
25
  defaultFinishRenderings?: string[];
25
26
  description: string;
26
27
  listable?: boolean;
@@ -1135,6 +1135,7 @@ export interface components {
1135
1135
  spec: components["schemas"]["WheelSpec"] | null;
1136
1136
  coverImage: string | null;
1137
1137
  defaultFinish?: string | null;
1138
+ rendersHaveAlpha?: boolean;
1138
1139
  defaultFinishRenderings?: string[];
1139
1140
  description: string;
1140
1141
  listable?: boolean;
@@ -22,6 +22,18 @@ export declare const PRODUCT_CARD_FIELDS: readonly [{
22
22
  readonly key: "href";
23
23
  readonly label: "Product page";
24
24
  readonly kind: "link";
25
+ }, {
26
+ readonly key: "colour";
27
+ readonly label: "Product colour";
28
+ readonly kind: "colour";
29
+ }, {
30
+ readonly key: "colourVaried";
31
+ readonly label: "Product colour, varied";
32
+ readonly kind: "colour";
33
+ }, {
34
+ readonly key: "colourRandom";
35
+ readonly label: "Random colour";
36
+ readonly kind: "colour";
25
37
  }];
26
38
  export interface ProductCardSeedOptions {
27
39
  legacyWellHonoured?: boolean;
@@ -1 +1 @@
1
- import{BOX_TYPE as s,CONTAINER_BLOCKS_SLOT as u}from"efficient-web-builder/format/lib/document/container-blocks";import{DIM as D,INNER_BOX as C,boxPadding as _,seedNodes as y,token as x}from"efficient-web-builder/format/lib/document/seed-parts";import{CARD_ROW_FIELD_PROP as S}from"efficient-web-builder/format/lib/content/card-template";import{CARDS_BODY_LOOK as w}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{THEME_CARD_IMAGE_BG as E,resolveBoundCardImageBackground as I}from"efficient-web-builder/format/lib/content/card-image-background";import{SHARED_ROWS_KEY as L}from"efficient-web-builder/render/lib/content/box-shared-columns";import{GRID_CARD_SHOW as K,LISTING_CARD_SHOW as b}from"../sections/card-show-defaults.js";const g="ProductPicture",P="ProductSpecs",m="ProductBuy",p="ProductPrice",f="ProductColour",k="ProductSize",h="ProductEyebrow",l="ProductName",J=[g,h,l,P,p,f,k,m],Q=[{key:"name",label:"Name"},{key:"eyebrow",label:"Eyebrow"},{key:"note",label:"Note"},{key:"href",label:"Product page",kind:"link"}],A={...C,gap:0,gapPhone:0,..._(32,32,32,32),[L]:"shared"},R=(e,t="ProductGrid")=>typeof e.id=="string"&&e.id.trim()?e.id:t,a=(e,t)=>typeof e=="boolean"?e:t,U={type:"Text",props:{...D,tag:"p",text:"",[S]:"note",_partStyles:{text:{...w,...x("body",14),lineHeight:1.375}}}};function N(e,t={}){const n=e.dynamic===!0,o={},i=n?t.legacyWellHonoured?e.imageBackground??E:I(e.imageBackground):e.imageBackground;i!==void 0&&(o.imageBackground=i);for(const c of["cardImage","coverIndex","indexBadge","showBadge"])e[c]!==void 0&&(o[c]=e[c]);const d=t.showRest??K,r={price:a(e.showCardPrice,!0),finishes:a(e.showCardFinishes,!0),sizes:a(e.showCardSizes,d.showCardSizes),buy:a(e.showCardBuy,d.showCardBuy),page:a(e.showCardPage,d.showCardPage)},O={...A,name:"Card"};e.outline==="hairline"&&(O.sectionBorder={width:1,style:"solid"});const T=[{type:g,props:o},{type:h},{type:l},{type:P,props:{sizes:r.sizes}},...r.price?[{type:p}]:[],...r.finishes?[{type:f}]:[],...r.buy||r.page?[{type:m,props:{buy:r.buy,page:r.page}}]:[]];return{type:s,props:O,slots:{[u]:T}}}const H={...C,gap:0,gapPhone:0,..._(0,0,0,0)},z={...C,gap:8,gapPhone:8,..._(16,20,16,20)},G={role:"heading",size:18,weight:500,case:"none",letterSpacing:-.015,lineHeight:1.2},B=24;function W(e){const t={frame:"full"};for(const o of["cardImage","showBadge"])e[o]!==void 0&&(t[o]=e[o]);const n={type:s,props:{...z,name:"Copy"},slots:{[u]:[{type:l,props:{fixedHeight:!1,_partStyles:{"@name":G}}},U,{type:p}]}};return{type:s,props:{...H,name:"Card"},slots:{[u]:[{type:g,props:t},n]}}}function V(e){if(e.template!==void 0)return e;const t=R(e);return{...e,gap:e.gap??B,gapPhone:e.gapPhone??B,template:y([W(e)],(n,o)=>`${t}~card-${o}-${n}`)}}function X(e,t={}){const n=R(e,t.section);return y([N(e,t)],(o,i)=>`${n}~card-${i}-${o}`)}function ee(e){return Y(e,{showRest:b,section:"AlloyWheelsListing"})}function Y(e,t={}){return e.template!==void 0?e:{...e,template:X(e,t)}}export{m as PRODUCT_BUY_BLOCK,Q as PRODUCT_CARD_FIELDS,J as PRODUCT_CARD_SLOT_BLOCKS,f as PRODUCT_COLOUR_BLOCK,h as PRODUCT_EYEBROW_BLOCK,l as PRODUCT_NAME_BLOCK,g as PRODUCT_PICTURE_BLOCK,p as PRODUCT_PRICE_BLOCK,k as PRODUCT_SIZE_BLOCK,P as PRODUCT_SPECS_BLOCK,W as kitCardSeed,N as productCardSeed,X as productCardTemplate,V as withKitCardTemplate,ee as withListingCardTemplate,Y as withProductCardTemplate};
1
+ import{BOX_TYPE as s,CONTAINER_BLOCKS_SLOT as u}from"efficient-web-builder/format/lib/document/container-blocks";import{DIM as D,INNER_BOX as l,boxPadding as C,seedNodes as O,token as x}from"efficient-web-builder/format/lib/document/seed-parts";import{CARD_ROW_FIELD_PROP as S}from"efficient-web-builder/format/lib/content/card-template";import{CARDS_BODY_LOOK as k}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{THEME_CARD_IMAGE_BG as w,resolveBoundCardImageBackground as E}from"efficient-web-builder/format/lib/content/card-image-background";import{SHARED_ROWS_KEY as I}from"efficient-web-builder/render/lib/content/box-shared-columns";import{GRID_CARD_SHOW as b,LISTING_CARD_SHOW as L}from"../sections/card-show-defaults.js";const _="ProductPicture",P="ProductSpecs",m="ProductBuy",g="ProductPrice",f="ProductColour",K="ProductSize",R="ProductEyebrow",p="ProductName",q=[_,R,p,P,g,f,K,m],J=[{key:"name",label:"Name"},{key:"eyebrow",label:"Eyebrow"},{key:"note",label:"Note"},{key:"href",label:"Product page",kind:"link"},{key:"colour",label:"Product colour",kind:"colour"},{key:"colourVaried",label:"Product colour, varied",kind:"colour"},{key:"colourRandom",label:"Random colour",kind:"colour"}],A={...l,gap:0,gapPhone:0,...C(32,32,32,32),[I]:"shared"},h=(e,t="ProductGrid")=>typeof e.id=="string"&&e.id.trim()?e.id:t,a=(e,t)=>typeof e=="boolean"?e:t,U={type:"Text",props:{...D,tag:"p",text:"",[S]:"note",_partStyles:{text:{...k,...x("body",14),lineHeight:1.375}}}};function N(e,t={}){const r=e.dynamic===!0,o={},i=r?t.legacyWellHonoured?e.imageBackground??w:E(e.imageBackground):e.imageBackground;i!==void 0&&(o.imageBackground=i);for(const d of["cardImage","coverIndex","indexBadge","showBadge"])e[d]!==void 0&&(o[d]=e[d]);const c=t.showRest??b,n={price:a(e.showCardPrice,!0),finishes:a(e.showCardFinishes,!0),sizes:a(e.showCardSizes,c.showCardSizes),buy:a(e.showCardBuy,c.showCardBuy),page:a(e.showCardPage,c.showCardPage)},y={...A,name:"Card"};e.outline==="hairline"&&(y.sectionBorder={width:1,style:"solid"});const T=[{type:_,props:o},{type:R},{type:p},{type:P,props:{sizes:n.sizes}},...n.price?[{type:g}]:[],...n.finishes?[{type:f}]:[],...n.buy||n.page?[{type:m,props:{buy:n.buy,page:n.page}}]:[]];return{type:s,props:y,slots:{[u]:T}}}const H={...l,gap:0,gapPhone:0,...C(0,0,0,0)},z={...l,gap:8,gapPhone:8,...C(16,20,16,20)},G={role:"heading",size:18,weight:500,case:"none",letterSpacing:-.015,lineHeight:1.2},B=24;function W(e){const t={frame:"full"};for(const o of["cardImage","showBadge"])e[o]!==void 0&&(t[o]=e[o]);const r={type:s,props:{...z,name:"Copy"},slots:{[u]:[{type:p,props:{fixedHeight:!1,_partStyles:{"@name":G}}},U,{type:g}]}};return{type:s,props:{...H,name:"Card"},slots:{[u]:[{type:_,props:t},r]}}}function Q(e){if(e.template!==void 0)return e;const t=h(e);return{...e,gap:e.gap??B,gapPhone:e.gapPhone??B,template:O([W(e)],(r,o)=>`${t}~card-${o}-${r}`)}}function X(e,t={}){const r=h(e,t.section);return O([N(e,t)],(o,i)=>`${r}~card-${i}-${o}`)}function ee(e){return Y(e,{showRest:L,section:"AlloyWheelsListing"})}function Y(e,t={}){return e.template!==void 0?e:{...e,template:X(e,t)}}export{m as PRODUCT_BUY_BLOCK,J as PRODUCT_CARD_FIELDS,q as PRODUCT_CARD_SLOT_BLOCKS,f as PRODUCT_COLOUR_BLOCK,R as PRODUCT_EYEBROW_BLOCK,p as PRODUCT_NAME_BLOCK,_ as PRODUCT_PICTURE_BLOCK,g as PRODUCT_PRICE_BLOCK,K as PRODUCT_SIZE_BLOCK,P as PRODUCT_SPECS_BLOCK,W as kitCardSeed,N as productCardSeed,X as productCardTemplate,Q as withKitCardTemplate,ee as withListingCardTemplate,Y as withProductCardTemplate};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import t from"../../../../../components/card-pieces/CardProductPicture.js";import a from"../../../../../components/card-pieces/HostPart.js";import{ProductPictureMeta as d}from"./meta.js";const n={...d,render:e=>r(a,{label:d.label??"",editing:!!e.editor?.isEditing,children:r(t,{imageBackground:e.imageBackground,cardImage:e.cardImage,coverIndex:e.coverIndex,indexBadge:e.indexBadge,showBadge:e.showBadge,frame:e.frame,setPicture:e.setPicture})})};export{n as ProductPictureRender};
1
+ import{jsx as a}from"react/jsx-runtime";import r from"../../../../../components/card-pieces/CardProductPicture.js";import t from"../../../../../components/card-pieces/HostPart.js";import{ProductPictureMeta as d}from"./meta.js";const n={...d,render:e=>a(t,{label:d.label??"",editing:!!e.editor?.isEditing,children:a(r,{imageBackground:e.imageBackground,cardImage:e.cardImage,coverIndex:e.coverIndex,indexBadge:e.indexBadge,showBadge:e.showBadge,frame:e.frame,setPicture:e.setPicture,swatch:e.swatch,shadow:e.shadow,shadowColor:e.shadowColor})})};export{n as ProductPictureRender};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import c from"../../../../../components/BoxHeaderBar.js";import h from"../../../../../components/SectionGroupBody.js";import{chromeOwnWidth as x}from"efficient-web-builder/format/lib/content/section-width";import{SiteHeaderMeta as f}from"./meta.js";const B={...f,render:({sections:i,navTextCase:n,menuRow:d,sticky:a,topTextColor:m,heightPx:p,sectionAccent:s,editor:e,...r})=>{const t=o(h,{place:"header",sections:i,widths:r,navTextCase:n,menuRow:d,editing:e?.isEditing});return e?.isEditing?o(c,{sticky:a,topTextColor:m,heightPx:p,theme:s,bandCapped:x(r).background==="content",children:t}):t}};export{B as SiteHeaderRender};
1
+ import{jsx as i}from"react/jsx-runtime";import h from"../../../../../components/BoxHeaderBar.js";import x from"../../../../../components/SectionGroupBody.js";import{headerBarFromProps as f}from"../../../published-header-bar.js";import{SiteHeaderMeta as g}from"./meta.js";const B={...g,render:({sections:a,navTextCase:n,menuRow:d,sticky:p,topTextColor:m,heightPx:s,sectionAccent:c,editor:r,...t})=>{const o=i(x,{place:"header",sections:a,widths:t,navTextCase:n,menuRow:d,editing:r?.isEditing});if(!r?.isEditing)return o;const e=f({sticky:p,topTextColor:m,heightPx:s,sectionAccent:c,...t});return i(h,{sticky:e.sticky,topTextColor:e.topTextColor,heightPx:e.heightPx,theme:e.theme,bandCapped:e.bandCapped,children:o})}};export{B as SiteHeaderRender};
@@ -0,0 +1,10 @@
1
+ import type { Data } from "efficient-easel/blocks";
2
+ export type HeaderBarSettings = {
3
+ readonly sticky: unknown;
4
+ readonly topTextColor: unknown;
5
+ readonly heightPx: unknown;
6
+ readonly theme: unknown;
7
+ readonly bandCapped: boolean;
8
+ };
9
+ export declare function headerBarFromProps(props: Readonly<Record<string, unknown>>): HeaderBarSettings;
10
+ export declare function headerBarOf(data: Data): HeaderBarSettings;
@@ -0,0 +1 @@
1
+ import{chromeOwnWidth as e}from"efficient-web-builder/format/lib/content/section-width";function o(t){return{sticky:t.sticky,topTextColor:t.topTextColor,heightPx:t.heightPx,theme:t.sectionAccent,bandCapped:e(t).background==="content"}}function r(t){return o(t.content[0]?.props??{})}export{o as headerBarFromProps,r as headerBarOf};
@@ -1 +1 @@
1
- import{SECTION_BOX_SLOT as f,SECTION_BOX_TYPE as O,convertTheme as C,headParts as _,registerSectionToBox as H}from"efficient-web-builder/render/lib/sections/section-to-box";import{BUTTON as I,DIM as a,DROP_COMMON as s,DROP_SIDE_PADDING as c,FOLLOW_THE_BOX as W,INNER_BOX as p,SAME_KEYS as E,SECTION_BOX as g,SH_LINK as D,TEXT as r,bandPage as R,smallText as m,wrapperPad as y,wrapperPadKeys as S}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-row-parts";import{boxPadding as F,token as o}from"efficient-web-builder/format/lib/document/seed-parts";import{surfacePresetIndex as K}from"efficient-web-builder/format/lib/theme";import{CARD_ROW_FIELD_PROP as L}from"efficient-web-builder/format/lib/content/card-template";import{phoneKey as b}from"efficient-easel/draw";import{REVIEWS_BAND_OWN as M}from"./section-to-box-rows-reviews.js";import{rowFieldTextSeed as d}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";const w=(e,t)=>{const n=C(t)?.themes,i=n?K(n,R(e,t)):-1;return i>=0?i:e},l=e=>[...E.filter(t=>t!=="sectionAccent"),["sectionAccent","sectionAccent",(t,n,i)=>w(t,i)],...S(e)],x=(e,t,n)=>(i,N)=>({...g,sectionAccent:w(i.sectionAccent??0,N),direction:"column",gap:t,gapPhone:n,sectionBorder:{top:1},...y(i,e)}),P=(e,t,n)=>({kind:"text",key:e,role:"heading",props:r,style:{textStyle:"heading-2",...o("headingMedium",44,32),weight:500,case:"upper",lineHeight:t,letterSpacing:n}}),u=(e,t,n={})=>({kind:"group",name:"Heading",props:{...p,gap:e,gapPhone:e,...n},parts:t}),k=(e={})=>({kind:"core",keep:"rest",props:W,...e}),h=M,[X]=_("ReviewForm"),G=()=>({name:"Review Form",boxProps:x(h,48,32),box:l(h),parts:[u(16,[{...X,props:r},P("title",1,-.02)]),k()],pressKeepsEmpty:["eyebrow","title"],drop:{...s,...c,headPlacement:"the head is the Text blocks above the form, which is always own-box here"}}),[V]=_("Reviews"),T=e=>({textStyle:"body-5",...o("label",12),case:"upper",letterSpacing:e}),j={type:O,props:{...p,name:"Card",gap:16,...F(40,40,32,32),sectionAccent:0},slots:{[f]:[{type:"RatingBlock",props:{[L]:"rating"}},d("title",r,{textStyle:"heading-1",...o("body",19),weight:500,case:"upper",lineHeight:1.2,letterSpacing:-.01}),d("quote",a,{textStyle:"body-1",...o("body",15),lineHeight:1.65}),{type:O,props:{...p,name:"Byline",direction:"row",justify:"between",align:"start",share:"content",phoneRow:2,[b("share")]:"content",gap:16,sectionPaddingTop:20,sectionPaddingTopPhone:20,sectionBorder:{top:1}},slots:{[f]:[d("name",r,T(.22)),d("dateLabel",{...a,align:"right"},{...T(.18),align:"right"}),d("role",{...a,align:"right"},{...T(.18),align:"right"})]}}]}},Y=()=>({name:"Reviews",boxProps:x(h,48,32),box:l(h),parts:[u(16,[{...V,props:r},P("title",1,-.02)]),k({slots:{template:[j]}})],pressKeepsEmpty:["eyebrow","title"],drop:{...s,...c,eyebrowLook:"the eyebrow Text wears the plain eyebrow's start look (Reviews' default); a stored `filled` look needs a filled Text look",headPlacement:"the head is the Text blocks above the reviews, which are always own-box here"}}),B={top:88,bottom:88,topTablet:88,bottomTablet:88,topPhone:64,bottomPhone:64},q=()=>({name:"Booking Form",boxProps:x(B,40,40),box:l(B),parts:[u(16,[m("eyebrow",{...o("label",12),weight:600,letterSpacing:.24,color:"accent"}),P("heading",.98,-.025),{kind:"text",key:"intro",props:{...a,maxWidth:660},style:{textStyle:"heading-1",...o("body",17),weight:400,case:"none",lineHeight:1.65,color:"muted"}}],{maxWidth:760}),k()],pressKeepsEmpty:["eyebrow","heading","intro"],drop:{...s,...c}}),A={top:88,bottom:88,topPhone:64,bottomPhone:64},U=()=>({name:"Ready-to-Order Banner",boxProps:e=>({...g,direction:"column",align:"center",gap:20,gapPhone:20,...y(e,A)}),box:[...E,...S(A)],parts:[{...m("eyebrow"),props:{...r,align:"center"}},{kind:"text",key:"title",role:"heading",props:{...r,align:"center",maxWidth:720},style:{textStyle:"heading-1",...o("headingMedium",44,30),weight:500,case:"none",lineHeight:1.05,letterSpacing:-.03,align:"center"}},{kind:"text",key:"body",props:{...r,align:"center",maxWidth:560},style:{textStyle:"body-1",...o("body",16),lineHeight:1.6,align:"center"}},{kind:"group",name:"Buttons",props:{...p,direction:"row",align:"center",justify:"center",share:"content",phoneRow:2,[b("share")]:"content",gap:24,gapPhone:24,sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:e=>({...I,align:"center",href:typeof e.ctaHref=="string"&&e.ctaHref?e.ctaHref:"/checkout"})},{kind:"button",key:"secondaryText",href:"secondaryHref",variant:"ghost",props:{...D,align:"center",icon:"none"},style:{...o("label",13),case:"upper",letterSpacing:.2,color:"muted"}}]}],pressKeepsEmpty:["eyebrow","title","body"],drop:{...s,...c}}),v={top:60,bottom:0,topPhone:60,bottomPhone:0},z=()=>({name:"Contact Form",boxProps:(e,t)=>({...g,sectionAccent:w(e.sectionAccent??0,t),direction:"column",gap:0,gapPhone:0,...y(e,v)}),box:l(v),parts:[{kind:"group",name:"Header",props:{...p,direction:"row",align:"center",share:"content",phoneRow:2,[b("share")]:"content",gap:24,gapPhone:24,sectionPaddingBottom:24,sectionPaddingBottomPhone:24,sectionBorder:{bottom:1}},parts:[m("routingNumber"),{kind:"text",key:"routingTagline",props:a,style:{textStyle:"heading-1",...o("body",14),weight:400,case:"upper",letterSpacing:.04,color:"muted"}}]},{kind:"core",keep:"rest",derive:{reads:["sectionAccent"],props:(e,t)=>({sectionAccent:R(e.sectionAccent??0,t)})}}],drop:{...s,...c}});H({ContactRouting:z(),ReviewForm:G(),AppointmentBooking:q(),Reviews:Y(),CheckoutCTA:U()});
1
+ import{SECTION_BOX_SLOT as O,SECTION_BOX_TYPE as f,headParts as _,registerSectionToBox as v}from"efficient-web-builder/render/lib/sections/section-to-box";import{BUTTON as C,DIM as i,DROP_COMMON as a,DROP_SIDE_PADDING as s,FOLLOW_THE_BOX as H,INNER_BOX as c,SAME_KEYS as E,SECTION_BOX as h,SH_LINK as W,TEXT as n,bandPage as I,smallText as m,surfaceAccent as y,wrapperPad as b,wrapperPadKeys as R}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-row-parts";import{boxPadding as D,token as o}from"efficient-web-builder/format/lib/document/seed-parts";import{CARD_ROW_FIELD_PROP as F}from"efficient-web-builder/format/lib/content/card-template";import{phoneKey as w}from"efficient-easel/draw";import{REVIEWS_BAND_OWN as K}from"./section-to-box-rows-reviews.js";import{rowFieldTextSeed as p}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";const l=e=>[...E.filter(t=>t!=="sectionAccent"),["sectionAccent","sectionAccent",(t,r,d)=>y(t,d)],...R(e)],x=(e,t,r)=>(d,N)=>({...h,sectionAccent:y(d.sectionAccent??0,N),direction:"column",gap:t,gapPhone:r,sectionBorder:{top:1},...b(d,e)}),P=(e,t,r)=>({kind:"text",key:e,role:"heading",props:n,style:{textStyle:"heading-2",...o("headingMedium",44,32),weight:500,case:"upper",lineHeight:t,letterSpacing:r}}),u=(e,t,r={})=>({kind:"group",name:"Heading",props:{...c,gap:e,gapPhone:e,...r},parts:t}),k=(e={})=>({kind:"core",keep:"rest",props:H,...e}),g=K,[L]=_("ReviewForm"),M=()=>({name:"Review Form",boxProps:x(g,48,32),box:l(g),parts:[u(16,[{...L,props:n},P("title",1,-.02)]),k()],pressKeepsEmpty:["eyebrow","title"],drop:{...a,...s,headPlacement:"the head is the Text blocks above the form, which is always own-box here"}}),[X]=_("Reviews"),T=e=>({textStyle:"body-5",...o("label",12),case:"upper",letterSpacing:e}),G={type:f,props:{...c,name:"Card",gap:16,...D(40,40,32,32),sectionAccent:0},slots:{[O]:[{type:"RatingBlock",props:{[F]:"rating"}},p("title",n,{textStyle:"heading-1",...o("body",19),weight:500,case:"upper",lineHeight:1.2,letterSpacing:-.01}),p("quote",i,{textStyle:"body-1",...o("body",15),lineHeight:1.65}),{type:f,props:{...c,name:"Byline",direction:"row",justify:"between",align:"start",share:"content",phoneRow:2,[w("share")]:"content",gap:16,sectionPaddingTop:20,sectionPaddingTopPhone:20,sectionBorder:{top:1}},slots:{[O]:[p("name",n,T(.22)),p("dateLabel",{...i,align:"right"},{...T(.18),align:"right"}),p("role",{...i,align:"right"},{...T(.18),align:"right"})]}}]}},V=()=>({name:"Reviews",boxProps:x(g,48,32),box:l(g),parts:[u(16,[{...X,props:n},P("title",1,-.02)]),k({slots:{template:[G]}})],pressKeepsEmpty:["eyebrow","title"],drop:{...a,...s,eyebrowLook:"the eyebrow Text wears the plain eyebrow's start look (Reviews' default); a stored `filled` look needs a filled Text look",headPlacement:"the head is the Text blocks above the reviews, which are always own-box here"}}),S={top:88,bottom:88,topTablet:88,bottomTablet:88,topPhone:64,bottomPhone:64},j=()=>({name:"Booking Form",boxProps:x(S,40,40),box:l(S),parts:[u(16,[m("eyebrow",{...o("label",12),weight:600,letterSpacing:.24,color:"accent"}),P("heading",.98,-.025),{kind:"text",key:"intro",props:{...i,maxWidth:660},style:{textStyle:"heading-1",...o("body",17),weight:400,case:"none",lineHeight:1.65,color:"muted"}}],{maxWidth:760}),k()],pressKeepsEmpty:["eyebrow","heading","intro"],drop:{...a,...s}}),B={top:88,bottom:88,topPhone:64,bottomPhone:64},Y=()=>({name:"Ready-to-Order Banner",boxProps:e=>({...h,direction:"column",align:"center",gap:20,gapPhone:20,...b(e,B)}),box:[...E,...R(B)],parts:[{...m("eyebrow"),props:{...n,align:"center"}},{kind:"text",key:"title",role:"heading",props:{...n,align:"center",maxWidth:720},style:{textStyle:"heading-1",...o("headingMedium",44,30),weight:500,case:"none",lineHeight:1.05,letterSpacing:-.03,align:"center"}},{kind:"text",key:"body",props:{...n,align:"center",maxWidth:560},style:{textStyle:"body-1",...o("body",16),lineHeight:1.6,align:"center"}},{kind:"group",name:"Buttons",props:{...c,direction:"row",align:"center",justify:"center",share:"content",phoneRow:2,[w("share")]:"content",gap:24,gapPhone:24,sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:e=>({...C,align:"center",href:typeof e.ctaHref=="string"&&e.ctaHref?e.ctaHref:"/checkout"})},{kind:"button",key:"secondaryText",href:"secondaryHref",variant:"ghost",props:{...W,align:"center",icon:"none"},style:{...o("label",13),case:"upper",letterSpacing:.2,color:"muted"}}]}],pressKeepsEmpty:["eyebrow","title","body"],drop:{...a,...s}}),A={top:60,bottom:0,topPhone:60,bottomPhone:0},q=()=>({name:"Contact Form",boxProps:(e,t)=>({...h,sectionAccent:y(e.sectionAccent??0,t),direction:"column",gap:0,gapPhone:0,...b(e,A)}),box:l(A),parts:[{kind:"group",name:"Header",props:{...c,direction:"row",align:"center",share:"content",phoneRow:2,[w("share")]:"content",gap:24,gapPhone:24,sectionPaddingBottom:24,sectionPaddingBottomPhone:24,sectionBorder:{bottom:1}},parts:[m("routingNumber"),{kind:"text",key:"routingTagline",props:i,style:{textStyle:"heading-1",...o("body",14),weight:400,case:"upper",letterSpacing:.04,color:"muted"}}]},{kind:"core",keep:"rest",derive:{reads:["sectionAccent"],props:(e,t)=>({sectionAccent:I(e.sectionAccent??0,t)})}}],drop:{...a,...s}});v({ContactRouting:q(),ReviewForm:M(),AppointmentBooking:j(),Reviews:V(),CheckoutCTA:Y()});
@@ -1 +1 @@
1
- import{accentInk as n,contrastRatio as o}from"efficient-web-builder/format/lib/theme";function u(r){const t=(r??"").trim();return o(t,"#000000")===null?null:n(t)==="#000000"}export{u as surfaceIsLight};
1
+ import{contrastRatio as o,fillIsDark as n}from"efficient-web-builder/format/lib/theme";function l(t){const r=(t??"").trim();return o(r,"#000000")===null?null:!n(r)}export{l as surfaceIsLight};
@@ -0,0 +1,9 @@
1
+ export declare const CARD_TONES: {
2
+ readonly light: readonly ["#dcdde0", "#e2e0db", "#d7dadd", "#dddbd8"];
3
+ readonly dark: readonly ["#35373b", "#3a3b38", "#33363b", "#3b393b"];
4
+ };
5
+ export declare const CARD_RANDOM_COLOURS: readonly ["#ccd5df", "#e2dace", "#d2dbd1", "#dbd3df"];
6
+ export declare function cardHash(key: string): number;
7
+ export declare function productTone(colour: unknown): string;
8
+ export declare function productToneVaried(colour: unknown, key: string): string;
9
+ export declare function randomCardColour(key: string): string;
@@ -0,0 +1 @@
1
+ import{hexToRgb as l,parseHexColor as c}from"efficient-shell/format";import{fillIsDark as u}from"efficient-web-builder/format/lib/theme";const d={light:["#dcdde0","#e2e0db","#d7dadd","#dddbd8"],dark:["#35373b","#3a3b38","#33363b","#3b393b"]},e=["#ccd5df","#e2dace","#d2dbd1","#dbd3df"];function o(t){let r=2166136261;for(let n=0;n<t.length;n++)r^=t.charCodeAt(n),r=Math.imul(r,16777619)>>>0;return r}const a=t=>typeof t=="string"&&l(t.trim())!==null?c(t):null;function i(t){const r=a(t);return r===null?null:u(r)?d.light:d.dark}function p(t){return i(t)?.[0]??""}function x(t,r){const n=i(t);return n?n[o(r)%n.length]:""}function b(t){return t?e[o(t)%e.length]:""}export{e as CARD_RANDOM_COLOURS,d as CARD_TONES,o as cardHash,p as productTone,x as productToneVaried,b as randomCardColour};
@@ -1,7 +1,10 @@
1
1
  import { type GalleryLayoutKey } from "efficient-web-builder/format/lib/content/gallery-layout";
2
+ import { type HoverMediaKind } from "efficient-web-builder/format/lib/animation/hover";
2
3
  import type { ProductSourceOptions } from "./product-source.js";
3
4
  export declare const PRODUCT_PICTURES_SOURCE = "product-pictures";
4
5
  export declare const EVERY_IMAGE_ZONE = "all";
6
+ export type ImageZone = Exclude<HoverMediaKind, "renderings">;
7
+ export declare const IMAGE_ZONES: readonly ImageZone[];
5
8
  export interface ProductPicturesOptions extends ProductSourceOptions {
6
9
  mediaZone?: string;
7
10
  }
@@ -1 +1 @@
1
- import{sourcedRows as E}from"efficient-web-builder/format/lib/content/block-sources";import{say as r}from"efficient-web-builder/format/lib/editor-words";import{resolveGalleryLayout as P}from"efficient-web-builder/format/lib/content/gallery-layout";import{servedListOf as T,servedRowLists as R,servedWords as _}from"../content/served-lists.js";const A="product-pictures",b="all",O="twoThenThreesPhoto";function I(t){const o=typeof t.layout=="string"&&t.layout?t.layout:void 0;return o&&P(o)||t.columns!=null&&t.columns!==""?o:O}const L=12,S=4,v=t=>Array.from({length:t},(o,n)=>({key:`sample-${n+1}`,process:r("Category"),eyebrow:r("Vehicle"),name:r("Product name"),meta:r("Finish")}));function M(t,o,n){const c=typeof n=="number"&&n>0?Math.floor(n):void 0,{rows:p,sample:f}=E(t,o,v(c??S)),y=f?null:R(t,e=>_(e.photos,L)),l=new Set,u=[];return p.forEach((e,m)=>{const s=e.cover??"";if(!f&&!s)return;const a=e.key||`row-${m+1}`;if(l.has(a))return;l.add(a);const i=T(y,e,m)??[],h=i[0]===s?i.slice(1):i.filter(d=>d!==s);u.push({image:s,photos:h.map(d=>({src:d})),href:e.href||void 0,process:e.process||void 0,eyebrow:e.eyebrow||void 0,name:e.name||void 0,meta:e.meta||void 0,tile:{id:a,tag:e.process??"",name:e.name??""}})}),c?u.slice(0,c):u}export{b as EVERY_IMAGE_ZONE,O as PRODUCT_PICTURES_LAYOUT,A as PRODUCT_PICTURES_SOURCE,M as productPictureTiles,I as productPicturesLayout};
1
+ import{sourcedRows as E}from"efficient-web-builder/format/lib/content/block-sources";import{say as s}from"efficient-web-builder/format/lib/editor-words";import{resolveGalleryLayout as _}from"efficient-web-builder/format/lib/content/gallery-layout";import{HOVER_MEDIA_KINDS as O}from"efficient-web-builder/format/lib/animation/hover";import{servedListOf as P,servedRowLists as R,servedWords as T}from"../content/served-lists.js";const U="product-pictures",b="all",D=O.filter(e=>e!=="renderings"),S="twoThenThreesPhoto";function G(e){const o=typeof e.layout=="string"&&e.layout?e.layout:void 0;return o&&_(o)||e.columns!=null&&e.columns!==""?o:S}const x=12,A=4,I=e=>Array.from({length:e},(o,n)=>({key:`sample-${n+1}`,process:s("Category"),eyebrow:s("Vehicle"),name:s("Product name"),meta:s("Finish")}));function N(e,o,n){const c=typeof n=="number"&&n>0?Math.floor(n):void 0,{rows:p,sample:f}=E(e,o,I(c??A)),y=f?null:R(e,t=>T(t.photos,x)),l=new Set,u=[];return p.forEach((t,m)=>{const r=t.cover??"";if(!f&&!r)return;const a=t.key||`row-${m+1}`;if(l.has(a))return;l.add(a);const i=P(y,t,m)??[],h=i[0]===r?i.slice(1):i.filter(d=>d!==r);u.push({image:r,photos:h.map(d=>({src:d})),href:t.href||void 0,process:t.process||void 0,eyebrow:t.eyebrow||void 0,name:t.name||void 0,meta:t.meta||void 0,tile:{id:a,tag:t.process??"",name:t.name??""}})}),c?u.slice(0,c):u}export{b as EVERY_IMAGE_ZONE,D as IMAGE_ZONES,S as PRODUCT_PICTURES_LAYOUT,U as PRODUCT_PICTURES_SOURCE,N as productPictureTiles,G as productPicturesLayout};
@@ -1 +1 @@
1
- import{resolvePlpKinds as E}from"../catalog/plp-item.js";import{gridPagingOf as I}from"../sections/product-grid-pages.js";import{gridKindsOf as L,gridRowsOf as W,isAllProductsSource as C,isLinkedSource as N}from"./grid-source.js";import{FILTER_BLOCK_TYPE as O,PRODUCT_GRID_TYPE as R,documentNodes as U,mapDocumentNodes as k}from"../document/document-nodes.js";import{selectedRangesOf as D,stripSelectedRanges as h}from"./selected-ranges.js";import{withShopperFirstPaint as Y,withoutShopperFirstPaint as B,withoutShopperFirstPaintNode as T}from"./shopper-first-paint.js";const p="AlloyWheelsListing",_="catalog",w="catalogTotal",K=12,H="CatalogFilterBar",c="fieldUsage",S="requestQuery";function f(t){return t.props?.source}function o(t){return t?.type===R&&N(f(t))}function l(t){return t?.type===H||t?.type===O}function A(t,e){if(e)return;const{limit:r,cap:n}=I(t.props??{});return n?Math.ceil(r)+K:void 0}function m(t){return t?.type===p||o(t)||l(t)}const u=t=>U(t);function Q(t){return t?u(t).some(e=>e?.type===p||o(e)):!1}function Z(t){return t?Q(t)||u(t).some(e=>T(e)!==e)||h(t)!==t:!1}function $(t){return t?u(t).some(m):!1}function tt(t,e){return e.length===0?t:g(t,m,r=>({...r,props:{...r.props??{},[c]:e}}))}function q(t){if(!t)return[];const e=new Set;for(const r of u(t)){if(r?.type!==p&&!o(r))continue;const n=r.props?.kinds;for(const s of o(r)?L(f(r),n):E(n))e.add(s)}return[...e]}function et(t){if(!t)return;const e=u(t);if(e.some(l))return;const r=q(t).length;let n;for(const s of e){if(s?.type===p)return;if(!o(s))continue;const i=A(s,!1),a=s.props??{},d=new Set(L(f(s),a.kinds)),G=["num","title","description","linkText"].some(x=>typeof a[x]=="string"&&a[x]!=="");if(i===void 0||!C(f(s))||d.size!==r||G)return;n=Math.max(n??0,i)}return n}function rt(t){return t.length===1&&t[0]==="alloy-wheel"}function nt(t,e){const r=D(t.root?.props),n=u(t).some(l);return Y(M(t,s=>o(s)?v(s,e,A(s,n)):{...s,props:{...y(s).props,products:e}}),r)}function v(t,e,r){const n=W(f(t),t.props?.kinds,e),s={...P(t).props};return r!==void 0&&n.length>r?(s[_]=n.slice(0,r),s[w]=n.length):s[_]=n,{...t,props:s}}function st(t,e){const r=e.replace(/^\?/,"");return r?g(t,n=>n?.type===p,n=>({...n,props:{...n.props??{},[S]:r}})):t}function ot(t){return B(g(h(t),m,e=>l(e)?F(e):o(e)?P(e):y(e)))}function F(t){if(!t.props||!(c in t.props))return t;const{[c]:e,...r}=t.props;return{...t,props:r}}function P(t){const{[_]:e,[w]:r,[c]:n,...s}=t.props??{},i=s.source;if(i&&"wheels"in i){const{wheels:a,...d}=i;s.source=d}return{...t,props:s}}function it(t){const e=h({content:[t]}).content[0],r=T(e);return o(r)?P(r):l(r)?F(r):r?.type===p?y(r):r}function y(t){const{wheels:e,products:r,[c]:n,[S]:s,...i}=t.props??{};return{...t,props:i}}function M(t,e){return g(t,r=>r?.type===p||o(r),e)}function g(t,e,r){return k(t,n=>e(n)?r(n):n)}export{p as ALLOY_WHEELS_LISTING_TYPE,H as CATALOG_FILTER_BAR_TYPE,c as FIELD_USAGE_PROP,O as FILTER_BLOCK_TYPE,_ as GRID_CATALOG_PROP,w as GRID_CATALOG_TOTAL_PROP,K as GRID_TOP_UP_SPARE,S as LISTING_QUERY_PROP,R as PRODUCT_GRID_TYPE,ot as dehydrateWheelsListing,it as dehydrateWheelsListingNode,tt as hydrateFieldUsage,nt as hydrateWheelsListing,et as listingCatalogBound,q as listingCatalogKinds,rt as listingWantsWheelsOnly,Z as pageHasHydratedValues,Q as pageHasWheelsListing,$ as pageReadsFieldUsage,st as stampListingQuery};
1
+ import{cardHoverOf as I}from"efficient-web-builder/format/lib/animation/hover";import{resolvePlpKinds as k}from"../catalog/plp-item.js";import{gridPagingOf as W}from"../sections/product-grid-pages.js";import{gridKindsOf as L,gridRowsOf as C,isAllProductsSource as N,isLinkedSource as U}from"./grid-source.js";import{FILTER_BLOCK_TYPE as O,PRODUCT_GRID_TYPE as R,documentNodes as v,mapDocumentNodes as D}from"../document/document-nodes.js";import{selectedRangesOf as H,stripSelectedRanges as h}from"./selected-ranges.js";import{withShopperFirstPaint as Y,withoutShopperFirstPaint as B,withoutShopperFirstPaintNode as T}from"./shopper-first-paint.js";const u="AlloyWheelsListing",m="catalog",w="catalogTotal",K=12,M="CatalogFilterBar",f="fieldUsage",S="requestQuery";function l(e){return e.props?.source}function i(e){return e?.type===R&&U(l(e))}function a(e){return e?.type===M||e?.type===O}function A(e,r){if(r)return;const{limit:t,cap:n}=W(e.props??{});return n?Math.ceil(t)+K:void 0}function _(e){return e?.type===u||i(e)||a(e)}const c=e=>v(e);function Q(e){return e?c(e).some(r=>r?.type===u||i(r)):!1}function te(e){return e?Q(e)||c(e).some(r=>T(r)!==r)||h(e)!==e:!1}function re(e){return e?c(e).some(_):!1}function ne(e,r){return r.length===0?e:g(e,_,t=>({...t,props:{...t.props??{},[f]:r}}))}function q(e){if(!e)return[];const r=new Set;for(const t of c(e)){if(t?.type!==u&&!i(t))continue;const n=t.props?.kinds;for(const o of i(t)?L(l(t),n):k(n))r.add(o)}return[...r]}function oe(e){if(!e)return;const r=c(e);if(r.some(a))return;const t=q(e).length;let n;for(const o of r){if(o?.type===u)return;if(!i(o))continue;const s=A(o,!1),p=o.props??{},d=new Set(L(l(o),p.kinds)),E=["num","title","description","linkText"].some(x=>typeof p[x]=="string"&&p[x]!=="");if(s===void 0||!N(l(o))||d.size!==t||E)return;n=Math.max(n??0,s)}return n}function se(e){return e.length===1&&e[0]==="alloy-wheel"}function ie(e,r){const t=H(e.root?.props),n=c(e).some(a);return Y(b(e,o=>i(o)?z(o,r,A(o,n)):{...o,props:{...y(o).props,products:F(o,r)}}),t)}function F(e,r){const t=I(e.props??{},e.type??""),n=t.kind==="nextImage"&&t.media&&t.media.kind!=="renderings"?t.media.kind:null;return r.map(o=>{const{hoverMedia:s,...p}=o;return s===void 0?o:n&&s?.[n]?{...p,hoverMedia:{[n]:s[n]}}:p})}function z(e,r,t){const n=F(e,C(l(e),e.props?.kinds,r)),o={...P(e).props};return t!==void 0&&n.length>t?(o[m]=n.slice(0,t),o[w]=n.length):o[m]=n,{...e,props:o}}function pe(e,r){const t=r.replace(/^\?/,"");return t?g(e,n=>n?.type===u,n=>({...n,props:{...n.props??{},[S]:t}})):e}function ue(e){return B(g(h(e),_,r=>a(r)?G(r):i(r)?P(r):y(r)))}function G(e){if(!e.props||!(f in e.props))return e;const{[f]:r,...t}=e.props;return{...e,props:t}}function P(e){const{[m]:r,[w]:t,[f]:n,...o}=e.props??{},s=o.source;if(s&&"wheels"in s){const{wheels:p,...d}=s;o.source=d}return{...e,props:o}}function ce(e){const r=h({content:[e]}).content[0],t=T(r);return i(t)?P(t):a(t)?G(t):t?.type===u?y(t):t}function y(e){const{wheels:r,products:t,[f]:n,[S]:o,...s}=e.props??{};return{...e,props:s}}function b(e,r){return g(e,t=>t?.type===u||i(t),r)}function g(e,r,t){return D(e,n=>r(n)?t(n):n)}export{u as ALLOY_WHEELS_LISTING_TYPE,M as CATALOG_FILTER_BAR_TYPE,f as FIELD_USAGE_PROP,O as FILTER_BLOCK_TYPE,m as GRID_CATALOG_PROP,w as GRID_CATALOG_TOTAL_PROP,K as GRID_TOP_UP_SPARE,S as LISTING_QUERY_PROP,R as PRODUCT_GRID_TYPE,ue as dehydrateWheelsListing,ce as dehydrateWheelsListingNode,ne as hydrateFieldUsage,ie as hydrateWheelsListing,oe as listingCatalogBound,q as listingCatalogKinds,se as listingWantsWheelsOnly,te as pageHasHydratedValues,Q as pageHasWheelsListing,re as pageReadsFieldUsage,pe as stampListingQuery};