efficient-storefront-blocks 0.86.0 → 0.87.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/chunks/{EditorPreviewCheckout-4LNXFNN7.js → EditorPreviewCheckout-GD4IJ4WK.js} +1 -1
- package/dist/chunks/{SiteEditorProvider-A2HMVDKS.js → SiteEditorProvider-2UVCJZXS.js} +1 -1
- package/dist/chunks/{chunk-TGBNREUJ.js → chunk-H4IHUSCU.js} +1 -1
- package/dist/chunks/chunk-QLR6IVWJ.js +369 -0
- package/dist/chunks/chunk-SYK5QPNV.js +1 -0
- package/dist/chunks/{chunk-SLRULFYY.js → chunk-XZ46W3NV.js} +1 -1
- package/dist/chunks/{fitment-data-TSYW6AFA.js → fitment-data-5GBUMO2O.js} +1 -1
- package/dist/contract.js +20 -2
- package/dist/editor/lib/document/blocks/commerce/ProductBuy/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/commerce/ProductBuy/fields.js +1 -0
- package/dist/editor/lib/document/blocks/commerce/ProductEyebrow/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/commerce/ProductEyebrow/fields.js +1 -0
- package/dist/editor/lib/document/blocks/commerce/ProductGrid/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/ProductName/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/commerce/ProductName/fields.js +1 -0
- package/dist/editor/lib/document/blocks/commerce/ProductPicture/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/commerce/ProductPicture/fields.js +1 -0
- package/dist/editor/lib/document/blocks/commerce/ProductSpecs/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/commerce/ProductSpecs/fields.js +1 -0
- package/dist/editor/lib/document/blocks/commerce/RelatedProducts/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/index.d.ts +1 -1
- package/dist/editor/lib/document/blocks/commerce/index.js +1 -1
- package/dist/editor/lib/document/config.js +1 -1
- package/dist/editor/lib/document/section-text-regions.js +1 -1
- package/dist/editor/lib/storefront-editor-words.d.ts +7 -8
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/fitment.js +1 -1
- package/dist/index.js +35 -35
- package/dist/links.js +1 -1
- package/dist/render/app/fonts/fallbacks.css +8 -0
- package/dist/render/app/fonts/jost/OFL.txt +93 -0
- package/dist/render/app/fonts/jost/cyrillic-italic.woff2 +0 -0
- package/dist/render/app/fonts/jost/cyrillic.woff2 +0 -0
- package/dist/render/app/fonts/jost/latin-ext-italic.woff2 +0 -0
- package/dist/render/app/fonts/jost/latin-ext.woff2 +0 -0
- package/dist/render/app/fonts/jost/latin-italic.woff2 +0 -0
- package/dist/render/app/fonts/jost/latin.woff2 +0 -0
- package/dist/render/app/globals.css +11 -11
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/Events.js +1 -1
- package/dist/render/components/FitmentTable.d.ts +1 -1
- package/dist/render/components/FitmentTable.js +1 -1
- package/dist/render/components/FooterMenu.d.ts +5 -1
- package/dist/render/components/FooterMenu.js +1 -1
- package/dist/render/components/GridCardTemplate.d.ts +34 -0
- package/dist/render/components/GridCardTemplate.js +1 -0
- package/dist/render/components/MenuLinkBlock.d.ts +5 -1
- package/dist/render/components/MenuLinkBlock.js +1 -1
- package/dist/render/components/ProductCardChrome.d.ts +1 -1
- package/dist/render/components/ProductCardChrome.js +1 -1
- package/dist/render/components/ProductGridSection.d.ts +5 -15
- package/dist/render/components/ProductGridSection.js +1 -1
- package/dist/render/components/ProductRef.js +1 -1
- package/dist/render/components/StorefrontProviders.d.ts +1 -1
- package/dist/render/components/StorefrontProviders.js +1 -1
- package/dist/render/components/TyreCard.js +1 -1
- package/dist/render/components/TyreFitVerdicts.d.ts +2 -1
- package/dist/render/components/TyreFitVerdicts.js +1 -1
- package/dist/render/components/TyrePlpCard.js +1 -1
- package/dist/render/components/card-pieces/CardEyebrow.d.ts +3 -1
- package/dist/render/components/card-pieces/CardEyebrow.js +1 -1
- package/dist/render/components/card-pieces/CardName.d.ts +3 -1
- package/dist/render/components/card-pieces/CardName.js +1 -1
- package/dist/render/components/card-pieces/CardPrice.d.ts +2 -6
- package/dist/render/components/card-pieces/CardPrice.js +1 -1
- package/dist/render/components/card-pieces/CardProductPicture.d.ts +8 -0
- package/dist/render/components/card-pieces/CardProductPicture.js +1 -0
- package/dist/render/components/card-pieces/card-text-region.d.ts +18 -0
- package/dist/render/components/card-pieces/card-text-region.js +1 -0
- package/dist/render/components/fitment/StockFitmentPart.d.ts +8 -1
- package/dist/render/components/fitment/StockFitmentPart.js +1 -1
- package/dist/render/components/fitment/fitment-answer-source.d.ts +12 -0
- package/dist/render/components/fitment/fitment-answer-source.js +1 -0
- package/dist/render/components/pdp-dynamic/DynamicFitmentTable.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicRelatedProducts.d.ts +10 -12
- package/dist/render/components/pdp-dynamic/DynamicRelatedProducts.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicSpecTable.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicTyreSizes.js +1 -1
- package/dist/render/components/wheels-plp/AlloyWheelsListing.js +1 -1
- package/dist/render/components/wheels-plp/PlpCard.d.ts +1 -1
- package/dist/render/components/wheels-plp/PlpCard.js +1 -1
- package/dist/render/lib/content/field-usage.d.ts +1 -0
- package/dist/render/lib/content/field-usage.js +1 -1
- package/dist/render/lib/content/product-card-seed.d.ts +29 -0
- package/dist/render/lib/content/product-card-seed.js +1 -0
- package/dist/render/lib/content/tab-strip.d.ts +17 -0
- package/dist/render/lib/content/tab-strip.js +1 -0
- package/dist/render/lib/document/blocks/commerce/ProductBuy/meta.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/ProductBuy/meta.js +1 -0
- package/dist/render/lib/document/blocks/commerce/ProductBuy/render.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/ProductBuy/render.js +1 -0
- package/dist/render/lib/document/blocks/commerce/ProductEyebrow/meta.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/ProductEyebrow/meta.js +1 -0
- package/dist/render/lib/document/blocks/commerce/ProductEyebrow/render.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/ProductEyebrow/render.js +1 -0
- package/dist/render/lib/document/blocks/commerce/ProductGrid/meta.d.ts +4 -0
- package/dist/render/lib/document/blocks/commerce/ProductGrid/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductGrid/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductName/meta.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/ProductName/meta.js +1 -0
- package/dist/render/lib/document/blocks/commerce/ProductName/render.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/ProductName/render.js +1 -0
- package/dist/render/lib/document/blocks/commerce/ProductPicture/meta.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/ProductPicture/meta.js +1 -0
- package/dist/render/lib/document/blocks/commerce/ProductPicture/render.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/ProductPicture/render.js +1 -0
- package/dist/render/lib/document/blocks/commerce/ProductPrice/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductSpecs/meta.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/ProductSpecs/meta.js +1 -0
- package/dist/render/lib/document/blocks/commerce/ProductSpecs/render.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/ProductSpecs/render.js +1 -0
- package/dist/render/lib/document/blocks/commerce/RelatedProducts/meta.d.ts +0 -4
- package/dist/render/lib/document/blocks/commerce/RelatedProducts/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/RelatedProducts/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/StockFitment/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/metas.d.ts +5 -0
- package/dist/render/lib/document/blocks/commerce/metas.js +1 -1
- package/dist/render/lib/document/blocks/commerce/renders.d.ts +5 -0
- package/dist/render/lib/document/blocks/commerce/renders.js +1 -1
- package/dist/render/lib/document/blocks/text-part-shapes.json +0 -16
- package/dist/render/lib/document/card-templates.js +1 -1
- package/dist/render/lib/document/footer-page-blocks.js +1 -1
- package/dist/render/lib/document/lazy-draws.js +1 -1
- package/dist/render/lib/font-table.json +209 -1
- package/dist/render/lib/menu-link.d.ts +2 -0
- package/dist/render/lib/menu-link.js +1 -1
- package/dist/render/lib/next-fonts.js +1 -1
- package/dist/render/lib/sections/grid-no-hole.d.ts +1 -0
- package/dist/render/lib/sections/grid-no-hole.js +1 -1
- package/dist/render/lib/sections/product-card-text-regions.d.ts +3 -0
- package/dist/render/lib/sections/product-card-text-regions.js +1 -0
- package/dist/render/lib/sections/product-grid-columns.d.ts +13 -1
- package/dist/render/lib/sections/product-grid-columns.js +1 -1
- package/dist/render/lib/sections/related-to-grid.d.ts +8 -0
- package/dist/render/lib/sections/related-to-grid.js +1 -0
- package/dist/render/lib/storefront-page-groups.d.ts +0 -4
- package/dist/render/lib/storefront-page-groups.js +1 -1
- package/dist/render/lib/tyres/tyre-vehicle-fitment.d.ts +1 -0
- package/dist/render/lib/tyres/tyre-vehicle-fitment.js +1 -1
- package/dist/render/lib/wheels/plp-filters.js +1 -1
- package/dist/words.d.ts +46 -9
- package/dist/words.js +6 -6
- package/package.json +2 -2
- package/dist/chunks/chunk-EUKK2IN6.js +0 -1
- package/dist/chunks/chunk-FJRKNPNN.js +0 -340
- /package/dist/chunks/{chunk-ALMIS7CK.js → chunk-DLWIDJS5.js} +0 -0
- /package/dist/chunks/{chunk-FJRKNPNN.js.LEGAL.txt → chunk-QLR6IVWJ.js.LEGAL.txt} +0 -0
package/dist/links.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var g={bold:{open:"**",close:"**",placeholder:"bold text"},italic:{open:"_",close:"_",placeholder:"italic text"},strike:{open:"~~",close:"~~",placeholder:"struck out"},code:{open:"`",close:"`",placeholder:"code"},highlight:{open:"==",close:"==",placeholder:"highlighted text"},quiet:{open:"^^",close:"^^",placeholder:"quiet text"},underline:{open:"[",close:"]{underline}",placeholder:"underlined text"},sup:{open:"[",close:"]{sup}",placeholder:"superscript"},sub:{open:"[",close:"]{sub}",placeholder:"subscript"}};var De={bold:g.bold.placeholder,italic:g.italic.placeholder,strike:g.strike.placeholder,code:g.code.placeholder,highlight:g.highlight.placeholder,quiet:g.quiet.placeholder,link:"link text",underline:g.underline.placeholder,sup:g.sup.placeholder,sub:g.sub.placeholder,color:"colored text",style:"styled text"};var J=[{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 x=[{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}],ee=["highlight","quiet"],ze=J.map(e=>e.style).filter(e=>x.some(n=>n.kind===e)).filter(e=>!ee.includes(e)),$e=[...x,{open:"*",close:"*",kind:"accent"}],Be=[...x,{open:"*",close:"*",kind:"accent"},{open:"#",close:"#",kind:"bold",notBefore:"0123456789"},{open:"[",close:"]",kind:"italic",notBefore:"(",notBeforeBlock:!0}];var We=["http","https","mailto","tel"];function v(e){if(e===""||/[\s\u0000-\u001f\u007f]/.test(e))return!1;let n=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(e);return!n||We.includes(n[1].toLowerCase())}var ne=["width","profile","rim"];var Ge=/^\s*(\d{2,3})\s*\/\s*(\d{2,3})\s*[A-Za-z]*\s*(\d{2}(?:\.\d+)?)\s*$/,Ye={width:[100,500],profile:[20,100],rim:[10,30]};function U(e){let n=Ge.exec(e??"");if(!n)return null;let t={width:Number(n[1]),profile:Number(n[2]),rim:Number(n[3])};return ne.every(i=>{let[a,u]=Ye[i];return t[i]>=a&&t[i]<=u})?t:null}function T(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 te(e){return[T({width:e.width}),T({width:e.width,profile:e.profile}),T(e)]}var S=["alloy-wheel","tyre"],re=["alloy-wheel"],L={"alloy-wheel":"Alloy wheels",tyre:"Tyres"};var Xn=S.map(e=>({value:e,label:L[e]}));function w(e){return e==null?[...re]:Array.isArray(e)?S.filter(n=>e.includes(n)):[...re]}var m=e=>e;function f(e){return m(e).kind==="tyre"?"tyre":"alloy-wheel"}function D(e){return m(e).brand??""}function ie(e){return m(e).prices??void 0}function oe(e){return m(e).inStock!==!1}function le(e){let n=m(e),t=f(e)==="tyre"?n.rimDiameters:n.sizes;return Array.isArray(t)?t.filter(r=>typeof r=="number"&&Number.isFinite(r)):[]}function z(e){return f(e)==="tyre"?[]:(m(e).finishes??[]).filter(n=>typeof n?.family=="string").map(n=>({family:n.family,color:n.color??null}))}function se(e){return z(e).map(n=>n.family)}function $(e){if(f(e)==="tyre")return[];let n=m(e);return Array.isArray(n.categories)?n.categories:n.process?[n.process]:[]}function ae(e){return f(e)==="tyre"?[]:m(e).spec?.pcds??[]}function ue(e){return f(e)!=="tyre"?[]:m(e).tyreTypes??[]}function ce(e){return f(e)!=="tyre"?[]:m(e).speedRatings??[]}function pe(e){if(f(e)!=="tyre")return[];let n=m(e).sizes;return Array.isArray(n)?n.map(t=>U(typeof t=="string"?t:null)).filter(t=>t!==null):[]}var B=e=>typeof e=="string"&&e?e:void 0;var de=null;function fe(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=de?de[e]:void 0;if(typeof t=="function"){try{let r=B(t(n??{}));if(r)return r}catch{}return fe(e,n)}return fe(B(t)??e,n)}function W(e){return(e??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function me(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}var he="homepage";var F=[{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 _(e){return e.offersCommerce&&e.offersService?F:F.filter(n=>!n.needs||(n.needs==="commerce"?e.offersCommerce:e.offersService))}var G="#popup:";function ge(e){return`${G}${e}`}function ye(e){return e.startsWith(G)&&e.slice(G.length).trim()||null}function P(e){return e===he?"/":`/${e}`}function A(e){return`/journal/${e}`}function R(e){return`/wheels/${e}`}function E(e,n){return`${P(e)}#${n}`}function I(...e){let n=new Set,t=[];for(let r of e)for(let i of r?.content??[]){let a=me(i?.props?.anchor);if(!a)continue;let u=W(a);!u||n.has(u)||(n.add(u),t.push({slug:u,name:a}))}return t}function Pe(e){return/^\/wheels\/[^/?#]+(?:[?#].*)?$/.test(e)}var He=()=>({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 O(e,n,t){if(!e)return"page";if(ye(e))return"popup";if(e.startsWith("/journal/"))return"blog";if(Pe(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 be(e,n){let t=He(),r=e.pages.map(l=>({value:P(l.slug),label:l.title})),i=n?.pageOptions?n.pageOptions(r):r,a=i.map(l=>l.value),u=e.pages.map(l=>({label:l.title,options:I(...l.docs).map(c=>({value:E(l.slug,c.slug),label:c.name}))})).filter(l=>l.options.length>0),p=l=>{switch(l){case"page":return{type:"select",options:i,placeholder:t.choosePage};case"anchor":return{type:"groups",groups:u,placeholder:u.length?t.chooseSection:t.noSections};case"blog":return{type:"select",options:e.posts.map(c=>({value:A(c.slug),label:c.title||c.slug})),placeholder:t.choosePost};case"product":return{type:"select",options:e.products.map(c=>({value:c.href,label:c.name||c.href})),placeholder:t.chooseProduct};case"popup":return{type:"select",options:(e.popups??[]).map(c=>({value:ge(c.slug),label:c.title||c.slug})),placeholder:t.choosePopup};case"custom":return{type:"text"}}},s=_(e.offers).map(l=>({value:l.value,label:y(l.label),target:p(l.value),...l.value==="anchor"?{hint:t.sectionHint}:{},...l.value==="blog"||l.value==="product"||l.value==="popup"?{hideWhenEmpty:!0}:{}}));if(!n)return{kinds:s,rules:{kindOf:l=>O(l,a),targetOf:l=>l,readFilter:()=>null,withFilter:l=>l}};let o=l=>{let c=n.withFilter(l,null);return n.listingPaths.includes(c)?c:l};return{kinds:s,rules:{kindOf:l=>O(l,a,{listingPaths:n.listingPaths,targetOf:o}),targetOf:o,readFilter:n.readFilter,withFilter:n.withFilter},filtersFor:l=>n.listingPaths.includes(l)?n.filtersFor(l):null}}function Y(e,n){return e.length===0?e:e.filter(t=>t.kind===void 0||t.kind===n)}function Se(e,n){let t=n==="filter"?"filterOrder":"cardOrder",r=new Map;for(let i of e){let a=i[t];if(typeof a!="number"||!Number.isFinite(a))continue;let u=r.get(i.fieldKey);(u===void 0||a<u)&&r.set(i.fieldKey,a)}return i=>i?r.get(i):void 0}function ke(e,n,t,r){let i=new Map;for(let s of t){let o=s[r];typeof o=="number"&&i.set(s.fieldKey,o)}if(i.size===0)return e;let a=[],u=[];e.forEach((s,o)=>{let l=n(s);l&&(a.push(o),u.push({item:s,index:o,order:i.get(l)}))}),u.sort((s,o)=>s.order!==void 0&&o.order!==void 0?s.order-o.order||s.index-o.index:s.order!==void 0?-1:o.order!==void 0?1:s.index-o.index);let p=[...e];return a.forEach((s,o)=>{p[s]=u[o].item}),p.every((s,o)=>s===e[o])?e:p}function xe(e){return je(e,"filter")}var qe="collection";function H(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":qe},pcds:{"alloy-wheel":"pcd"},tyreTypes:{tyre:"tire_type"},speedRatings:{tyre:"speed_rating"}}[e]?.[n]}function je(e,n){let t=new Set(e.filter(r=>r[n]===!1).map(r=>r.fieldKey));return r=>!r||!t.has(r)}function Ze(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function Te(e,n){let t=e?.[n];return Ze(t)?t:null}function Le(e,n,t,r){if(t==null&&r==null)return!0;let i=Te(e,n);return!(i===null||t!=null&&i<t||r!=null&&i>r)}var Ve={recommended:"Recommended","price-asc":"Price \xB7 low to high","price-desc":"Price \xB7 high to low",new:"Newest",name:"Name A\u2013Z"},Ut=Object.keys(Ve);var we=["tyreSizes","brands","finishes","diameters","collections","pcds","tyreTypes","speedRatings"],Qe={tyreSizes:["tyre"],brands:["alloy-wheel","tyre"],finishes:["alloy-wheel"],diameters:["alloy-wheel","tyre"],collections:["alloy-wheel"],pcds:["alloy-wheel"],tyreTypes:["tyre"],speedRatings:["tyre"]},Xe={diameters:"tyreSizes"};function Je(e){if(e.length===0)return[];let n=we.filter(t=>e.every(r=>Qe[t].includes(r)));return n.filter(t=>{let r=Xe[t];return!r||!n.includes(r)})}function en(e){let n=new Set;for(let t of e)n.add(f(t));return[...n]}var Fe={tyreSizes:[],brands:[],finishes:[],diameters:[],collections:[],pcds:[],tyreTypes:[],speedRatings:[],priceMax:null,inStockOnly:!1,kind:null,sort:"recommended",page:1};function nn(e,n,t,r=null){if(r!=="kind"&&n.kind&&f(e)!==n.kind)return!1;for(let i of we){if(r===i)continue;let a=n[i];if(a.length===0)continue;let u=a.map(String);if(!_e(e,i).some(p=>u.includes(p)))return!1}return!(r!=="price"&&!Le(ie(e),t,null,n.priceMax)||r!=="inStock"&&n.inStockOnly&&!oe(e))}var tn={tyreSizes:"Size",brands:"Brand",finishes:"Colour",diameters:"Size \xB7 diameter",collections:"Collection",pcds:"PCD \xB7 fitment",tyreTypes:"Tyre type",speedRatings:"Speed rating"};function _e(e,n){switch(n){case"tyreSizes":return[...new Set(pe(e).flatMap(te))];case"brands":return D(e)?[D(e)]:[];case"finishes":return se(e);case"diameters":return le(e).map(String);case"collections":return $(e);case"pcds":return ae(e);case"tyreTypes":return ue(e);case"speedRatings":return ce(e)}}function rn(e){let n=new Map;for(let t of e)for(let r of z(t))r.color&&!n.has(r.family)&&n.set(r.family,r.color);return n}function Ae(e,n,t,r=en(e),i=[]){let a=o=>ln(o,r,i),u=rn(e),p=Je(r).filter(o=>o!=="tyreSizes").filter(a).map(o=>{let l=n[o].map(String),c=new Set,M=new Map,k=new Map;for(let d of e){let b=_e(d,o);for(let h of b)c.add(h);for(let h of new Set(b))k.set(h,(k.get(h)??0)+1);if(nn(d,n,t,o))for(let h of new Set(b))M.set(h,(M.get(h)??0)+1)}let Ue=[...c].map(d=>({value:d,label:o==="diameters"?`${d}\u2033`:d,count:M.get(d)??0,checked:l.includes(d),swatch:o==="finishes"?u.get(d)??null:null})).sort((d,b)=>{if(o==="diameters")return Number(d.value)-Number(b.value);let h=(k.get(b.value)??0)-(k.get(d.value)??0);return h!==0?h:d.value.localeCompare(b.value)});return{key:o,label:tn[o],options:Ue}}).filter(o=>o.options.length>on),s=[];for(let o of p){let l=sn(o.key,r,i);l!==void 0&&s.push({fieldKey:o.key,filterOrder:l})}return[...ke(p,o=>o.key,s,"filterOrder")]}var on=1;function Re(e){return e.showCollection===!1?["collections"]:[]}function ln(e,n,t){return n.length===0||t.length===0?!0:n.some(r=>xe(Y(t,r))(H(e,r)))}function sn(e,n,t){if(t.length===0)return;let r;for(let i of n){let a=Se(Y(t,i),"filter")(H(e,i));a!==void 0&&(r===void 0||a<r)&&(r=a)}return r}var q={tyreSizes:"tyreSize",brands:"brand",finishes:"colour",diameters:"size",collections:"collection",pcds:"pcd",tyreTypes:"tyreType",speedRatings:"speed"},j="type";var Ee="AlloyWheelsListing";function Ie(e){return v(e.trim())}var C="/wheels",K="Products";function Oe(e,n){return n>1?`${K} \xB7 ${e}`:K}function Z(...e){for(let n of e){let t=(n?.content??[]).find(r=>r?.type===Ee);if(t)return t.props??{}}return null}function N(...e){return Z(...e)!==null}function Ce(e,n){let t=e.filter(r=>N(...r.docs)).map(r=>P(r.slug));return t.length===0&&n.fallback?[C]:t}var V=[j,...Object.entries(q).filter(([e])=>e!=="tyreSizes").map(([,e])=>e)];function Ke(e){let n=e.indexOf("#"),t=n===-1?"":e.slice(n),r=n===-1?e:e.slice(0,n),i=r.indexOf("?");return{path:i===-1?r:r.slice(0,i),query:i===-1?"":r.slice(i+1),hash:t}}function an(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return e}}function Ne(e){let n=new URLSearchParams(Ke(e).query);for(let t of V){let r=n.get(t);if(r)return{param:t,value:r}}return null}function Q(e,n){let{path:t,query:r,hash:i}=Ke(e),a=r.split("&").filter(u=>u&&!V.includes(an(u.split("=")[0])));return n?.value&&a.push(`${encodeURIComponent(n.param)}=${encodeURIComponent(n.value)}`),`${t}${a.length?`?${a.join("&")}`:""}${i}`}function Me(e,n){let t=Q(e,null);return n.includes(t)?t:e}function un(e,n,t=[]){return O(e,n,{listingPaths:t,targetOf:r=>Me(r,t)})}function cn(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 ve="Product type",pn="AUD";function X(e,n){let t=n.listing??{},r=w(t.kinds),i=e.filter(s=>r.includes(f(s))),a=Re(t),u=Ae(i,Fe,pn,r,n.fieldUsage).filter(s=>!a.includes(s.key)).map(s=>({param:q[s.key],label:s.label,values:s.options.filter(o=>!o.value.includes(",")).map(o=>({value:o.value,label:o.label}))})).filter(s=>s.values.length>0),p=S.filter(s=>r.includes(s)&&i.some(o=>f(o)===s));return p.length>1&&u.unshift({param:j,label:ve,values:p.map(s=>({value:s,label:L[s]}))}),u}function dn(e){return n=>{let t=Ce(n,{fallback:e.offersCommerce}),r=n.filter(i=>N(...i.docs)).length;return{listingPaths:t,pageOptions:i=>{let a=i.map(u=>{let p=n.find(s=>P(s.slug)===u.value);return p&&N(...p.docs)?{...u,label:Oe(p.title,r)}:u});return r===0&&e.offersCommerce&&!a.some(u=>u.value===C)&&a.push({value:C,label:K}),a},filtersFor:i=>{if(!t.includes(i))return null;let a=n.find(u=>P(u.slug)===i);return X(e.catalogue,{listing:a?Z(...a.docs):null,fieldUsage:e.fieldUsage})},readFilter:Ne,withFilter:Q}}}function fn(e){let n=dn({catalogue:e.catalogue,fieldUsage:e.fieldUsage,offersCommerce:e.offers.offersCommerce})(e.pages),t=be({pages:e.pages,posts:e.posts,products:e.products.map(r=>({href:R(r.slug),name:r.name||r.slug})),offers:e.offers},n);return{...t,rules:{...t.rules,isSafe:Ie},filtersFor:t.filtersFor??(()=>null)}}function or(e,n){return X(e,n)}export{C as BUILT_IN_LISTING_PATH,F as LINK_KINDS,V as LISTING_FILTER_PARAMS,K as LISTING_PAGE_LABEL,ve as PRODUCT_TYPE_FILTER_LABEL,E as anchorPath,cn as fieldUsageFromAdminRows,un as inferLinkKind,N as isProductListingPage,Ie as isSafeLink,_ as linkKindsFor,fn as linkPickerSetup,or as listingFilterFields,Z as listingNode,Oe as listingPageLabel,Me as listingTarget,I as pageAnchors,P as pagePath,A as postPath,Ce as productListingPaths,Ne as readListingFilter,R as wheelPath,Q as withListingFilter};
|
|
1
|
+
var g={bold:{open:"**",close:"**",placeholder:"bold text"},italic:{open:"_",close:"_",placeholder:"italic text"},strike:{open:"~~",close:"~~",placeholder:"struck out"},code:{open:"`",close:"`",placeholder:"code"},highlight:{open:"==",close:"==",placeholder:"highlighted text"},quiet:{open:"^^",close:"^^",placeholder:"quiet text"},underline:{open:"[",close:"]{underline}",placeholder:"underlined text"},sup:{open:"[",close:"]{sup}",placeholder:"superscript"},sub:{open:"[",close:"]{sub}",placeholder:"subscript"}};var ze={bold:g.bold.placeholder,italic:g.italic.placeholder,strike:g.strike.placeholder,code:g.code.placeholder,highlight:g.highlight.placeholder,quiet:g.quiet.placeholder,link:"link text",underline:g.underline.placeholder,sup:g.sup.placeholder,sub:g.sub.placeholder,color:"colored text",style:"styled text"};var J=[{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 x=[{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}],ee=["highlight","quiet"],$e=J.map(e=>e.style).filter(e=>x.some(n=>n.kind===e)).filter(e=>!ee.includes(e)),Be=[...x,{open:"*",close:"*",kind:"accent"}],We=[...x,{open:"*",close:"*",kind:"accent"},{open:"#",close:"#",kind:"bold",notBefore:"0123456789"},{open:"[",close:"]",kind:"italic",notBefore:"(",notBeforeBlock:!0}];var Ge=["http","https","mailto","tel"];function v(e){if(e===""||/[\s\u0000-\u001f\u007f]/.test(e))return!1;let n=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(e);return!n||Ge.includes(n[1].toLowerCase())}var ne=["width","profile","rim"];var Ye=/^\s*(\d{2,3})\s*\/\s*(\d{2,3})\s*[A-Za-z]*\s*(\d{2}(?:\.\d+)?)\s*$/,He={width:[100,500],profile:[20,100],rim:[10,30]};function U(e){let n=Ye.exec(e??"");if(!n)return null;let t={width:Number(n[1]),profile:Number(n[2]),rim:Number(n[3])};return ne.every(i=>{let[a,u]=He[i];return t[i]>=a&&t[i]<=u})?t:null}function T(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 te(e){return[T({width:e.width}),T({width:e.width,profile:e.profile}),T(e)]}var S=["alloy-wheel","tyre"],re=["alloy-wheel"],L={"alloy-wheel":"Alloy wheels",tyre:"Tyres"};var Jn=S.map(e=>({value:e,label:L[e]}));function w(e){return e==null?[...re]:Array.isArray(e)?S.filter(n=>e.includes(n)):[...re]}var m=e=>e;function f(e){return m(e).kind==="tyre"?"tyre":"alloy-wheel"}function D(e){return m(e).brand??""}function ie(e){return m(e).prices??void 0}function oe(e){return m(e).inStock!==!1}function le(e){let n=m(e),t=f(e)==="tyre"?n.rimDiameters:n.sizes;return Array.isArray(t)?t.filter(r=>typeof r=="number"&&Number.isFinite(r)):[]}function z(e){return f(e)==="tyre"?[]:(m(e).finishes??[]).filter(n=>typeof n?.family=="string").map(n=>({family:n.family,color:n.color??null}))}function se(e){return z(e).map(n=>n.family)}function $(e){if(f(e)==="tyre")return[];let n=m(e);return Array.isArray(n.categories)?n.categories:n.process?[n.process]:[]}function ae(e){return f(e)==="tyre"?[]:m(e).spec?.pcds??[]}function ue(e){return f(e)!=="tyre"?[]:m(e).tyreTypes??[]}function ce(e){return f(e)!=="tyre"?[]:m(e).speedRatings??[]}function pe(e){if(f(e)!=="tyre")return[];let n=m(e).sizes;return Array.isArray(n)?n.map(t=>U(typeof t=="string"?t:null)).filter(t=>t!==null):[]}var B=e=>typeof e=="string"&&e?e:void 0;var de=null;function fe(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=de?de[e]:void 0;if(typeof t=="function"){try{let r=B(t(n??{}));if(r)return r}catch{}return fe(e,n)}return fe(B(t)??e,n)}function W(e){return(e??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function me(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}var he="homepage";var F=[{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 _(e){return e.offersCommerce&&e.offersService?F:F.filter(n=>!n.needs||(n.needs==="commerce"?e.offersCommerce:e.offersService))}var G="#popup:";function ge(e){return`${G}${e}`}function ye(e){return e.startsWith(G)&&e.slice(G.length).trim()||null}function P(e){return e===he?"/":`/${e}`}function A(e){return`/journal/${e}`}function E(e){return`/wheels/${e}`}function R(e,n){return`${P(e)}#${n}`}function I(...e){let n=new Set,t=[];for(let r of e)for(let i of r?.content??[]){let a=me(i?.props?.anchor);if(!a)continue;let u=W(a);!u||n.has(u)||(n.add(u),t.push({slug:u,name:a}))}return t}function Pe(e){return/^\/wheels\/[^/?#]+(?:[?#].*)?$/.test(e)}var qe=()=>({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 O(e,n,t){if(!e)return"page";if(ye(e))return"popup";if(e.startsWith("/journal/"))return"blog";if(Pe(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 be(e,n){let t=qe(),r=e.pages.map(l=>({value:P(l.slug),label:l.title})),i=n?.pageOptions?n.pageOptions(r):r,a=i.map(l=>l.value),u=e.pages.map(l=>({label:l.title,options:I(...l.docs).map(c=>({value:R(l.slug,c.slug),label:c.name}))})).filter(l=>l.options.length>0),p=l=>{switch(l){case"page":return{type:"select",options:i,placeholder:t.choosePage};case"anchor":return{type:"groups",groups:u,placeholder:u.length?t.chooseSection:t.noSections};case"blog":return{type:"select",options:e.posts.map(c=>({value:A(c.slug),label:c.title||c.slug})),placeholder:t.choosePost};case"product":return{type:"select",options:e.products.map(c=>({value:c.href,label:c.name||c.href})),placeholder:t.chooseProduct};case"popup":return{type:"select",options:(e.popups??[]).map(c=>({value:ge(c.slug),label:c.title||c.slug})),placeholder:t.choosePopup};case"custom":return{type:"text"}}},s=_(e.offers).map(l=>({value:l.value,label:y(l.label),target:p(l.value),...l.value==="anchor"?{hint:t.sectionHint}:{},...l.value==="blog"||l.value==="product"||l.value==="popup"?{hideWhenEmpty:!0}:{}}));if(!n)return{kinds:s,rules:{kindOf:l=>O(l,a),targetOf:l=>l,readFilter:()=>null,withFilter:l=>l}};let o=l=>{let c=n.withFilter(l,null);return n.listingPaths.includes(c)?c:l};return{kinds:s,rules:{kindOf:l=>O(l,a,{listingPaths:n.listingPaths,targetOf:o}),targetOf:o,readFilter:n.readFilter,withFilter:n.withFilter},filtersFor:l=>n.listingPaths.includes(l)?n.filtersFor(l):null}}var Se=Object.freeze([]);function Y(e,n){return e.length===0?e:e.filter(t=>t.kind===void 0||t.kind===n)}function ke(e,n){let t=n==="filter"?"filterOrder":"cardOrder",r=new Map;for(let i of e){let a=i[t];if(typeof a!="number"||!Number.isFinite(a))continue;let u=r.get(i.fieldKey);(u===void 0||a<u)&&r.set(i.fieldKey,a)}return i=>i?r.get(i):void 0}function xe(e,n,t,r){let i=new Map;for(let s of t){let o=s[r];typeof o=="number"&&i.set(s.fieldKey,o)}if(i.size===0)return e;let a=[],u=[];e.forEach((s,o)=>{let l=n(s);l&&(a.push(o),u.push({item:s,index:o,order:i.get(l)}))}),u.sort((s,o)=>s.order!==void 0&&o.order!==void 0?s.order-o.order||s.index-o.index:s.order!==void 0?-1:o.order!==void 0?1:s.index-o.index);let p=[...e];return a.forEach((s,o)=>{p[s]=u[o].item}),p.every((s,o)=>s===e[o])?e:p}function Te(e){return Ze(e,"filter")}var je="collection";function H(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":je},pcds:{"alloy-wheel":"pcd"},tyreTypes:{tyre:"tire_type"},speedRatings:{tyre:"speed_rating"}}[e]?.[n]}function Ze(e,n){let t=new Set(e.filter(r=>r[n]===!1).map(r=>r.fieldKey));return r=>!r||!t.has(r)}function Ve(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function Le(e,n){let t=e?.[n];return Ve(t)?t:null}function we(e,n,t,r){if(t==null&&r==null)return!0;let i=Le(e,n);return!(i===null||t!=null&&i<t||r!=null&&i>r)}var Qe={recommended:"Recommended","price-asc":"Price \xB7 low to high","price-desc":"Price \xB7 high to low",new:"Newest",name:"Name A\u2013Z"},Dt=Object.keys(Qe);var Fe=["tyreSizes","brands","finishes","diameters","collections","pcds","tyreTypes","speedRatings"],Xe={tyreSizes:["tyre"],brands:["alloy-wheel","tyre"],finishes:["alloy-wheel"],diameters:["alloy-wheel","tyre"],collections:["alloy-wheel"],pcds:["alloy-wheel"],tyreTypes:["tyre"],speedRatings:["tyre"]},Je={diameters:"tyreSizes"};function en(e){if(e.length===0)return[];let n=Fe.filter(t=>e.every(r=>Xe[t].includes(r)));return n.filter(t=>{let r=Je[t];return!r||!n.includes(r)})}function nn(e){let n=new Set;for(let t of e)n.add(f(t));return[...n]}var _e={tyreSizes:[],brands:[],finishes:[],diameters:[],collections:[],pcds:[],tyreTypes:[],speedRatings:[],priceMax:null,inStockOnly:!1,kind:null,sort:"recommended",page:1};function tn(e,n,t,r=null){if(r!=="kind"&&n.kind&&f(e)!==n.kind)return!1;for(let i of Fe){if(r===i)continue;let a=n[i];if(a.length===0)continue;let u=a.map(String);if(!Ae(e,i).some(p=>u.includes(p)))return!1}return!(r!=="price"&&!we(ie(e),t,null,n.priceMax)||r!=="inStock"&&n.inStockOnly&&!oe(e))}var rn={tyreSizes:"Size",brands:"Brand",finishes:"Colour",diameters:"Size \xB7 diameter",collections:"Collection",pcds:"PCD \xB7 fitment",tyreTypes:"Tyre type",speedRatings:"Speed rating"};function Ae(e,n){switch(n){case"tyreSizes":return[...new Set(pe(e).flatMap(te))];case"brands":return D(e)?[D(e)]:[];case"finishes":return se(e);case"diameters":return le(e).map(String);case"collections":return $(e);case"pcds":return ae(e);case"tyreTypes":return ue(e);case"speedRatings":return ce(e)}}function on(e){let n=new Map;for(let t of e)for(let r of z(t))r.color&&!n.has(r.family)&&n.set(r.family,r.color);return n}function Ee(e,n,t,r=nn(e),i=Se){let a=o=>sn(o,r,i),u=on(e),p=en(r).filter(o=>o!=="tyreSizes").filter(a).map(o=>{let l=n[o].map(String),c=new Set,M=new Map,k=new Map;for(let d of e){let b=Ae(d,o);for(let h of b)c.add(h);for(let h of new Set(b))k.set(h,(k.get(h)??0)+1);if(tn(d,n,t,o))for(let h of new Set(b))M.set(h,(M.get(h)??0)+1)}let De=[...c].map(d=>({value:d,label:o==="diameters"?`${d}\u2033`:d,count:M.get(d)??0,checked:l.includes(d),swatch:o==="finishes"?u.get(d)??null:null})).sort((d,b)=>{if(o==="diameters")return Number(d.value)-Number(b.value);let h=(k.get(b.value)??0)-(k.get(d.value)??0);return h!==0?h:d.value.localeCompare(b.value)});return{key:o,label:rn[o],options:De}}).filter(o=>o.options.length>ln),s=[];for(let o of p){let l=an(o.key,r,i);l!==void 0&&s.push({fieldKey:o.key,filterOrder:l})}return[...xe(p,o=>o.key,s,"filterOrder")]}var ln=1;function Re(e){return e.showCollection===!1?["collections"]:[]}function sn(e,n,t){return n.length===0||t.length===0?!0:n.some(r=>Te(Y(t,r))(H(e,r)))}function an(e,n,t){if(t.length===0)return;let r;for(let i of n){let a=ke(Y(t,i),"filter")(H(e,i));a!==void 0&&(r===void 0||a<r)&&(r=a)}return r}var q={tyreSizes:"tyreSize",brands:"brand",finishes:"colour",diameters:"size",collections:"collection",pcds:"pcd",tyreTypes:"tyreType",speedRatings:"speed"},j="type";var Ie="AlloyWheelsListing";function Oe(e){return v(e.trim())}var C="/wheels",N="Products";function Ce(e,n){return n>1?`${N} \xB7 ${e}`:N}function Z(...e){for(let n of e){let t=(n?.content??[]).find(r=>r?.type===Ie);if(t)return t.props??{}}return null}function K(...e){return Z(...e)!==null}function Ne(e,n){let t=e.filter(r=>K(...r.docs)).map(r=>P(r.slug));return t.length===0&&n.fallback?[C]:t}var V=[j,...Object.entries(q).filter(([e])=>e!=="tyreSizes").map(([,e])=>e)];function Ke(e){let n=e.indexOf("#"),t=n===-1?"":e.slice(n),r=n===-1?e:e.slice(0,n),i=r.indexOf("?");return{path:i===-1?r:r.slice(0,i),query:i===-1?"":r.slice(i+1),hash:t}}function un(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return e}}function Me(e){let n=new URLSearchParams(Ke(e).query);for(let t of V){let r=n.get(t);if(r)return{param:t,value:r}}return null}function Q(e,n){let{path:t,query:r,hash:i}=Ke(e),a=r.split("&").filter(u=>u&&!V.includes(un(u.split("=")[0])));return n?.value&&a.push(`${encodeURIComponent(n.param)}=${encodeURIComponent(n.value)}`),`${t}${a.length?`?${a.join("&")}`:""}${i}`}function ve(e,n){let t=Q(e,null);return n.includes(t)?t:e}function cn(e,n,t=[]){return O(e,n,{listingPaths:t,targetOf:r=>ve(r,t)})}function pn(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 Ue="Product type",dn="AUD";function X(e,n){let t=n.listing??{},r=w(t.kinds),i=e.filter(s=>r.includes(f(s))),a=Re(t),u=Ee(i,_e,dn,r,n.fieldUsage).filter(s=>!a.includes(s.key)).map(s=>({param:q[s.key],label:s.label,values:s.options.filter(o=>!o.value.includes(",")).map(o=>({value:o.value,label:o.label}))})).filter(s=>s.values.length>0),p=S.filter(s=>r.includes(s)&&i.some(o=>f(o)===s));return p.length>1&&u.unshift({param:j,label:Ue,values:p.map(s=>({value:s,label:L[s]}))}),u}function fn(e){return n=>{let t=Ne(n,{fallback:e.offersCommerce}),r=n.filter(i=>K(...i.docs)).length;return{listingPaths:t,pageOptions:i=>{let a=i.map(u=>{let p=n.find(s=>P(s.slug)===u.value);return p&&K(...p.docs)?{...u,label:Ce(p.title,r)}:u});return r===0&&e.offersCommerce&&!a.some(u=>u.value===C)&&a.push({value:C,label:N}),a},filtersFor:i=>{if(!t.includes(i))return null;let a=n.find(u=>P(u.slug)===i);return X(e.catalogue,{listing:a?Z(...a.docs):null,fieldUsage:e.fieldUsage})},readFilter:Me,withFilter:Q}}}function mn(e){let n=fn({catalogue:e.catalogue,fieldUsage:e.fieldUsage,offersCommerce:e.offers.offersCommerce})(e.pages),t=be({pages:e.pages,posts:e.posts,products:e.products.map(r=>({href:E(r.slug),name:r.name||r.slug})),offers:e.offers},n);return{...t,rules:{...t.rules,isSafe:Oe},filtersFor:t.filtersFor??(()=>null)}}function lr(e,n){return X(e,n)}export{C as BUILT_IN_LISTING_PATH,F as LINK_KINDS,V as LISTING_FILTER_PARAMS,N as LISTING_PAGE_LABEL,Ue as PRODUCT_TYPE_FILTER_LABEL,R as anchorPath,pn as fieldUsageFromAdminRows,cn as inferLinkKind,K as isProductListingPage,Oe as isSafeLink,_ as linkKindsFor,mn as linkPickerSetup,lr as listingFilterFields,Z as listingNode,Ce as listingPageLabel,ve as listingTarget,I as pageAnchors,P as pagePath,A as postPath,Ne as productListingPaths,Me as readListingFilter,E as wheelPath,Q as withListingFilter};
|
|
@@ -131,3 +131,11 @@
|
|
|
131
131
|
line-gap-override: 0.00%;
|
|
132
132
|
size-adjust: 92.87%;
|
|
133
133
|
}
|
|
134
|
+
@font-face {
|
|
135
|
+
font-family: "Jost Fallback";
|
|
136
|
+
src: local("Arial");
|
|
137
|
+
ascent-override: 111.45%;
|
|
138
|
+
descent-override: 39.06%;
|
|
139
|
+
line-gap-override: 0.00%;
|
|
140
|
+
size-adjust: 96.01%;
|
|
141
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2020 The Jost Project Authors (https://github.com/indestructible-type)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -850,7 +850,7 @@
|
|
|
850
850
|
|
|
851
851
|
/* ─── End card look (card 66332) ─────────────────────────────────────── */
|
|
852
852
|
|
|
853
|
-
/* ─── Shadow steps
|
|
853
|
+
/* ─── Shadow steps ─────
|
|
854
854
|
ONE LIST OF SHADOW VALUES, for the site's card shadow (the card-look block
|
|
855
855
|
above reads `--sf-shadow-step`) and a Box's own Shadow row alike. A Box names
|
|
856
856
|
its step with `data-sf-box-shadow` (efficient-web-builder
|
|
@@ -859,7 +859,7 @@
|
|
|
859
859
|
[data-sf-card-shadow="soft"], [data-sf-box-shadow="soft"] { --sf-shadow-step: 0 1px 2px color-mix(in srgb, var(--sf-shadow-color, #141416) 7%, transparent), 0 4px 12px -4px color-mix(in srgb, var(--sf-shadow-color, #141416) 10%, transparent); }
|
|
860
860
|
[data-sf-card-shadow="lifted"], [data-sf-box-shadow="lifted"] { --sf-shadow-step: 0 2px 4px color-mix(in srgb, var(--sf-shadow-color, #141416) 6%, transparent), 0 14px 30px -10px color-mix(in srgb, var(--sf-shadow-color, #141416) 22%, transparent); }
|
|
861
861
|
[data-sf-box-shadow] { box-shadow: var(--sf-shadow-step); }
|
|
862
|
-
/* A Box's own Shadow per view
|
|
862
|
+
/* A Box's own Shadow per view: the builder writes
|
|
863
863
|
`data-sf-box-shadow-tablet` / `-phone` = `on` | `off` only where a view's
|
|
864
864
|
answer differs from the desktop's. Same widths as the Block spacing views. */
|
|
865
865
|
@media (min-width: 720px) and (max-width: 1099.98px) {
|
|
@@ -870,7 +870,7 @@
|
|
|
870
870
|
[data-sf-box-shadow-phone="on"] { box-shadow: var(--sf-shadow-step); }
|
|
871
871
|
[data-sf-box-shadow-phone="off"] { box-shadow: none; }
|
|
872
872
|
}
|
|
873
|
-
/* A Box's Fill colour and Darken per view
|
|
873
|
+
/* A Box's Fill colour and Darken per view. The
|
|
874
874
|
desktop answer stays INLINE (`background-color` on the Box or its card layer,
|
|
875
875
|
`background` on its Darken wash layer); the builder adds
|
|
876
876
|
`sf-fill-tablet` / `-phone` + `--sf-fill-tablet` / `-phone`, and
|
|
@@ -1157,7 +1157,7 @@ body .sf-site-header[data-header-ink="dark"] {
|
|
|
1157
1157
|
|
|
1158
1158
|
/* ─── THE BOX HEADER'S MENU ALIGNMENT ─────────────────────────────────
|
|
1159
1159
|
Where the old header put its menu, as the page Menu's `Link alignment` and
|
|
1160
|
-
`Show links` (lib/content/menu-row; Lewis 2026-10-12
|
|
1160
|
+
`Show links` (lib/content/menu-row; Lewis 2026-10-12).
|
|
1161
1161
|
The bar stays ONE FLAT ROW — Logo, Menu, tools — so the phone and mid-width
|
|
1162
1162
|
rules above keep working; these only place the menu where the bar is one
|
|
1163
1163
|
row, and step aside where it stacks.
|
|
@@ -1341,7 +1341,7 @@ body:has([data-page-width="full"]) footer {
|
|
|
1341
1341
|
from it the wide one (`view-wide:`). Under the v1 rules it is 800, the line
|
|
1342
1342
|
the hand-typed 800px classes drew before they took these names, and it compiles to
|
|
1343
1343
|
the same `width < 800px` / `width >= 800px`. The switch to the v2 rules
|
|
1344
|
-
|
|
1344
|
+
moves it to 720, the Tablet view's edge, in this
|
|
1345
1345
|
one line; the same guard holds it to the rules in force. */
|
|
1346
1346
|
--breakpoint-view-wide: 800px;
|
|
1347
1347
|
}
|
|
@@ -1556,7 +1556,7 @@ body:has([data-page-width="full"]) footer {
|
|
|
1556
1556
|
position: relative;
|
|
1557
1557
|
z-index: 2;
|
|
1558
1558
|
}
|
|
1559
|
-
/* The tablet's own answer
|
|
1559
|
+
/* The tablet's own answer: the Tablet
|
|
1560
1560
|
view's widths, efficient-easel's VIEW_TABLET_MIN (720) up to, not including,
|
|
1561
1561
|
VIEW_DESKTOP_MIN (1100), the builder's lib/content/view-values `TABLET_MEDIA`.
|
|
1562
1562
|
The builder adds `-tablet-on` / `-tablet-off` and `--sf-stick-distance-tablet`
|
|
@@ -2660,7 +2660,7 @@ em.text-accent {
|
|
|
2660
2660
|
gap: var(--sf-gap-len-phone, calc(var(--sf-gap-len) / 2));
|
|
2661
2661
|
}
|
|
2662
2662
|
}
|
|
2663
|
-
/* The Tablet view's own Gap
|
|
2663
|
+
/* The Tablet view's own Gap, on
|
|
2664
2664
|
`--sf-gap-len-tablet`, which efficient-web-builder's `containerGapProps`
|
|
2665
2665
|
writes only when a tablet value is drawn, as it does the phone's. The widths
|
|
2666
2666
|
are the Tablet view's: efficient-easel's VIEW_TABLET_MIN (720) up to, not
|
|
@@ -3080,7 +3080,7 @@ em.text-accent {
|
|
|
3080
3080
|
border-color: var(--sf-border-color, var(--site-line));
|
|
3081
3081
|
border-width: var(--sf-border-top-width, 0) var(--sf-border-right-width, 0) var(--sf-border-bottom-width, 0) var(--sf-border-left-width, 0);
|
|
3082
3082
|
}
|
|
3083
|
-
/* The tablet's own Border
|
|
3083
|
+
/* The tablet's own Border, in the Tablet
|
|
3084
3084
|
view's widths (720 up to, not including, 1100; the builder's `TABLET_MEDIA`).
|
|
3085
3085
|
The `-tablet` properties come first and the desktop ones are the fallback, one
|
|
3086
3086
|
property at a time, so a node with no tablet value draws as before.
|
|
@@ -3163,7 +3163,7 @@ em.text-accent {
|
|
|
3163
3163
|
.sf-section-corners > .sf-ticker-join { border-radius: 0; overflow: visible; }
|
|
3164
3164
|
.sf-section-corners > .sf-ticker-join > * { border-radius: var(--sf-section-radius, 0); overflow: clip; }
|
|
3165
3165
|
|
|
3166
|
-
/* ── A padding's TABLET value
|
|
3166
|
+
/* ── A padding's TABLET value ───────────
|
|
3167
3167
|
The same split as the phone block below: the desktop padding is INLINE, and
|
|
3168
3168
|
efficient-web-builder (lib/content/section-padding, `sectionPadAttrs`) adds
|
|
3169
3169
|
`.sf-pad-<side>-tablet` and its variable only for a side whose tablet value
|
|
@@ -3276,7 +3276,7 @@ em.text-accent {
|
|
|
3276
3276
|
padding-right: 0;
|
|
3277
3277
|
}
|
|
3278
3278
|
|
|
3279
|
-
/* The tablet's own Height
|
|
3279
|
+
/* The tablet's own Height: the same pair
|
|
3280
3280
|
as the phone's (next block), in the Tablet view's widths (720 up to, not including,
|
|
3281
3281
|
1100; the builder's `TABLET_MEDIA`). The builder adds the class only when the
|
|
3282
3282
|
tablet draws a height of its own. scripts/test-tablet-section-css.ts. */
|
|
@@ -3389,7 +3389,7 @@ em.text-accent {
|
|
|
3389
3389
|
padding-block: 0;
|
|
3390
3390
|
}
|
|
3391
3391
|
|
|
3392
|
-
/* A Box's own Block spacing per view
|
|
3392
|
+
/* A Box's own Block spacing per view. The
|
|
3393
3393
|
builder (efficient-web-builder Flex) writes the desktop answer as above and,
|
|
3394
3394
|
only where a view's answer differs from the desktop's, `sf-box-each-tablet` /
|
|
3395
3395
|
`sf-box-gap-only-tablet` (and `-phone`; a phone that follows the tablet
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as n,jsxs as l}from"react/jsx-runtime";import{useState as G}from"react";import{useScopeClass as xe}from"../lib/use-scope-class.js";import{containerGapProps as he}from"efficient-web-builder/format/lib/content/container-gap";import be from"efficient-web-builder/render/components/SectionHeader";import v from"efficient-web-builder/render/components/PostCard";import ve from"efficient-web-builder/render/components/Placeholder";import{SiteLink as F}from"efficient-web-builder/render/lib/site-runtime";import{renderGold as g,renderHeadline as N}from"efficient-web-builder/render/components/goldPhrases";import{say as w}from"efficient-web-builder/format/lib/editor-words";import{cardImageShapeTokens as Ne}from"efficient-web-builder/format/lib/content/card-image-shape";import{SITE_COLUMN as K}from"efficient-web-builder/format/lib/content/page-width";import{fillRowCss as we}from"../lib/sections/fill-row.js";import{headIsEmpty as ye,ownPadding as Ee}from"../lib/sections/own-padding.js";const Te=4;function st(t){if(!Array.isArray(t))return;const a=t.filter(e=>typeof e=="string"&&!!e.trim()).map(e=>e.trim()).slice(0,Te);return a.length?a:void 0}function ot(t){if(!t||typeof t!="object"||Array.isArray(t))return;const a={};for(const[e,r]of Object.entries(t))if(e.trim()){if(typeof r=="string")r.trim()&&(a[e]=r.trim());else if(Array.isArray(r)){const o=r.filter(c=>typeof c=="string"&&!!c.trim()).map(c=>c.trim());o.length&&(a[e]=o)}}return Object.keys(a).length?a:void 0}function H(t,a){const e=t.facets?.[a];return e===void 0?[]:typeof e=="string"?[e]:e}const Ae=new Intl.Collator("en",{numeric:!0,sensitivity:"base"});function _e(t){const a=[],e=new Map;for(const r of t)for(const o of Object.keys(r.facets??{})){e.has(o)||(a.push(o),e.set(o,new Set));for(const c of H(r,o))e.get(o).add(c)}return a.map(r=>({label:r,values:[...e.get(r)].sort(Ae.compare)}))}function Ce(t,a){return Object.entries(a).every(([e,r])=>r===""||H(t,e).includes(r))}const W=3,X="featured",J="tabs",q="portrait",x="spread",Q="count",lt=[{label:"Even grid",value:"even"},{label:"Featured first",value:X},{label:"Tabs",value:J},{label:"Photo cards",value:q},{label:"Staggered spread",value:x},{label:"Count",value:Q}],Le=[q,x],it="even",z={min:2,max:11,step:1,fallback:7,unit:"of 12"},Se="bottom-left",$e=55,Oe="bottom";function ke(t){const a=typeof t=="number"?t:Number.parseFloat(String(t??"")),e=Number.isFinite(a)?Math.min(z.max,Math.max(z.min,Math.round(a))):z.fallback;return`${e}fr ${12-e}fr`}const Z={1:"grid-cols-1",2:"grid-cols-2 max-view-wide:grid-cols-1",3:"grid-cols-3 max-view-wide:grid-cols-1",4:"grid-cols-4 max-view-desktop:grid-cols-2 max-view-wide:grid-cols-1"},ee={2:"grid-cols-2",3:"grid-cols-3 max-view-wide:grid-cols-2",4:"grid-cols-4 max-view-desktop:grid-cols-3 max-view-wide:grid-cols-2"},Fe="Find by name",ze="Nobody by that name.",Re="Nobody matches.",Me="Any";function Ue(t,a){const e=o=>o.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLocaleLowerCase().trim(),r=e(a);return r===""||e(t).includes(r)}function te({typed:t,onType:a,wide:e=!1}){return l("label",{className:`flex max-w-[360px] flex-col gap-1.5${e?" w-full":""}`,children:[n("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em] text-fg-dim",children:Fe}),n("input",{type:"search",value:t,onChange:r=>a(r.target.value),autoComplete:"off",className:"rounded-[var(--sf-button-radius,6px)] border border-line bg-bg px-4 py-2.5 text-[length:var(--size-body,15px)] text-fg outline-none focus:border-accent"})]})}function ne({tags:t}){return n("ul",{"aria-label":"Details",className:"flex gap-1.5 overflow-hidden",children:t.map((a,e)=>n("li",{className:"shrink-0 rounded-[var(--sf-button-radius,4px)] border border-line px-2 py-0.5 text-[length:var(--size-label,12px)] text-fg-dim",children:a},`${a}-${e}`))})}function De({card:t,scaffold:a,lower:e=!1}){return l(F,{href:t.href||"#",className:`sf-card group relative isolate flex aspect-[3/4] overflow-hidden bg-surface${e?" min-[801px]:mt-16":""}`,"aria-disabled":a||void 0,tabIndex:a?-1:void 0,children:[n("div",{className:"absolute inset-0 transition-transform duration-700 group-hover:scale-[1.03] motion-reduce:transition-none motion-reduce:group-hover:scale-100",children:n(ve,{label:`card-${t.slug}`,src:t.cover||void 0,sizes:"(max-width: 800px) 50vw, 25vw"})}),n("div",{"aria-hidden":!0,className:"absolute inset-0 z-0",style:{background:"linear-gradient(180deg, transparent 45%, color-mix(in srgb, var(--bg) 88%, transparent) 100%)"}}),t.meta&&n("span",{className:"absolute left-3 top-3 z-[1] rounded-[var(--sf-button-radius,999px)] bg-bg/85 px-2.5 py-1 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.16em] text-accent",children:g(t.meta)}),l("div",{className:"relative z-[1] mt-auto flex w-full flex-col gap-1 p-4 max-view-wide:p-3",children:[n("h3",{className:"font-heading3 text-[length:var(--size-headingSmall,24px)] leading-[1.1] tracking-[-0.01em] text-fg",children:N(t.title,!1)}),t.dateLabel&&n("p",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.16em] text-accent",children:g(t.dateLabel)}),t.tags&&t.tags.length>0&&n(ne,{tags:t.tags}),t.excerpt&&n("p",{className:"line-clamp-2 text-[length:var(--size-body,14px)] leading-[1.45] text-fg-dim",children:g(t.excerpt)})]})]})}function Ie({cards:t,scaffold:a}){return n("nav",{"aria-label":"Days",className:"-mx-1 [scrollbar-width:none] max-view-wide:overflow-x-auto [&::-webkit-scrollbar]:hidden",children:n("ul",{className:"flex flex-wrap gap-2 px-1 pb-1 max-view-wide:min-w-max max-view-wide:flex-nowrap",children:t.map((e,r)=>{const o=!!e.meta;return n("li",{children:l(F,{href:e.href||"#","aria-current":o?"page":void 0,"aria-disabled":a||void 0,tabIndex:a?-1:void 0,className:`flex flex-col gap-0.5 rounded-[var(--sf-button-radius,999px)] border px-5 py-2.5 transition-colors ${o?"border-accent bg-accent text-accent-ink":"border-line text-fg hover:border-accent hover:text-accent"}`,children:[n("span",{className:"font-heading3 text-[length:var(--size-body,15px)] leading-[1.2]",children:N(e.title,!1)}),e.excerpt&&n("span",{className:`font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.14em] ${o?"opacity-80":"text-fg-dim"}`,children:g(e.excerpt)})]})},`${e.slug}-${r}`)})})})}function Pe({count:t,words:a,href:e}){const r=l("span",{className:"inline-flex items-baseline gap-3",children:[n("span",{className:"font-heading text-[length:var(--size-headingLarge,64px)] leading-none text-accent",children:t}),a!==void 0&&n("span",{className:"font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg",children:a})]});return e?n(F,{href:e,className:"inline-flex hover:opacity-85",children:r}):r}const je="relative z-[2] bg-bg py-[120px] max-view-wide:py-[70px]",Ve="relative z-[2] bg-bg pt-0 pb-[120px] max-view-wide:pt-0 max-view-wide:pb-[70px]",Ye="relative z-[2] bg-bg py-[32px] max-view-wide:py-[24px]";function Be({num:t,title:a,link:e,posts:r,columns:o,limit:c,showAll:y=!1,editing:E=!1,cardImage:ae,gap:re,gapPhone:se,layout:p,featuredWidth:oe,listCover:le=!0,featuredDarken:ie,omitHead:h=!1,sample:T,nameFilter:ce=!1,padTop:de,padBottom:fe}){const[A,R]=G(""),[M,pe]=G({}),_=xe("ev"),U=r??[],D=y?U.length:typeof c=="number"&&c>0?c:W,C=U.slice(0,D),m=E&&C.length===0;if(C.length===0&&!E)return null;const I=y?W:D,d=m?T?.length?T.slice(0,y?T.length:I):Array.from({length:I},(s,i)=>({slug:`placeholder-${i}`,title:w("Blog post title"),excerpt:w("A short summary of the post appears here."),cover:"",meta:w("Journal"),dateLabel:w("Date")})):C,f=he("Events",re,"both",se),L=p===X&&d.length>1,me=ke(oe),S=p===J,P=p===Q,j=Le.includes(p??""),$=ce&&!S&&!P&&!L,O=$?_e(d):[],b=$?d.filter(s=>Ue(s.title,A)&&Ce(s,M)):d,k=Ee(de,fe),ge=!E&&ye(t,a,e?.text),V=p===x?"grid-cols-3 max-view-wide:grid-cols-2":ee[Math.min(4,Math.max(2,o??3))]??ee[3],Y=Z[Math.min(4,Math.max(1,o??3))]??Z[3],B=S||L||p===x?"":we(_,j?V:Y,{cards:b.length});return P?n("section",{className:Ye,style:Object.keys(k).length?k:void 0,children:n("div",{className:K,children:n(Pe,{count:d.length,words:h||a===void 0?void 0:N(a,!1),href:h?void 0:e?.href})})}):n("section",{className:h?Ve:je,style:{...Ne(ae),...k},children:l("div",{className:K,children:[h||ge?null:n(be,{num:t!==void 0?g(t):void 0,title:a!==void 0?N(a,!1):void 0,link:e?{text:g(e.text),href:e.href}:void 0}),$&&l("div",{className:"mb-6 flex flex-col gap-2",children:[O.length===0?n(te,{typed:A,onType:R}):l("div",{className:"flex flex-wrap items-end gap-3",children:[n(te,{typed:A,onType:R,wide:!0}),O.map(({label:s,values:i})=>l("label",{className:"flex min-w-[140px] flex-col gap-1.5 max-view-wide:flex-1",children:[n("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em] text-fg-dim",children:s}),l("select",{value:M[s]??"",onChange:u=>pe(ue=>({...ue,[s]:u.target.value})),className:"rounded-[var(--sf-button-radius,6px)] border border-line bg-bg px-4 py-2.5 text-[length:var(--size-body,15px)] text-fg outline-none focus:border-accent",children:[n("option",{value:"",children:Me}),i.map(u=>n("option",{value:u,children:u},u))]})]},s))]}),b.length===0&&n("p",{role:"status",className:"text-[length:var(--size-body,14px)] text-fg-dim",children:O.length===0?ze:Re})]}),B&&n("style",{children:B}),S?n(Ie,{cards:d,scaffold:m}):j?n("div",{className:`${_} sf-card-grid grid${f.className} ${V}`,style:f.style,children:b.map((s,i)=>n(De,{card:s,scaffold:m,lower:p===x&&i%3===1},`${s.slug}-${i}`))}):L?l("div",{className:`sf-card-grid grid grid-cols-[var(--sf-events-split)] max-view-wide:grid-cols-1${f.className}`,style:{...f.style,"--sf-events-split":me},children:[n(v,{post:d[0],href:d[0].href,scaffold:m,layout:"cover",darken:ie??$e,darkenStyle:Oe,placement:Se},`${d[0].slug}-0`),n("div",{className:`grid auto-rows-min${f.className}`,style:f.style,children:d.slice(1).map((s,i)=>n(v,{post:s,href:s.href,scaffold:m,showCover:le},`${s.slug}-${i+1}`))})]}):n("div",{className:`${_} sf-card-grid grid${f.className} ${Y}`,style:f.style,children:b.map((s,i)=>s.tags&&s.tags.length>0?l("div",{className:"flex flex-col gap-2",children:[n(v,{post:s,href:s.href,scaffold:m}),n(ne,{tags:s.tags})]},`${s.slug}-${i}`):n(v,{post:s,href:s.href,scaffold:m},`${s.slug}-${i}`))})]})})}export{z as EVENTS_FEATURED_WIDTH,lt as EVENTS_LAYOUTS,Q as EVENTS_LAYOUT_COUNT,it as EVENTS_LAYOUT_FALLBACK,X as EVENTS_LAYOUT_FEATURED,q as EVENTS_LAYOUT_PORTRAIT,x as EVENTS_LAYOUT_SPREAD,J as EVENTS_LAYOUT_TABS,Le as EVENTS_PHOTO_LAYOUTS,Te as MAX_CARD_TAGS,Be as default,_e as facetChoices,Ce as matchesFacets,Ue as matchesName,ot as readFacets,st as readTags};
|
|
1
|
+
import{jsx as n,jsxs as o}from"react/jsx-runtime";import{useState as K}from"react";import{TAB_PILLS as z}from"../lib/content/tab-strip.js";import{useScopeClass as xe}from"../lib/use-scope-class.js";import{containerGapProps as be}from"efficient-web-builder/format/lib/content/container-gap";import ve from"efficient-web-builder/render/components/SectionHeader";import v from"efficient-web-builder/render/components/PostCard";import Ne from"efficient-web-builder/render/components/Placeholder";import{SiteLink as k}from"efficient-web-builder/render/lib/site-runtime";import{renderGold as g,renderHeadline as N}from"efficient-web-builder/render/components/goldPhrases";import{say as y}from"efficient-web-builder/format/lib/editor-words";import{cardImageShapeTokens as ye}from"efficient-web-builder/format/lib/content/card-image-shape";import{SITE_COLUMN as H}from"efficient-web-builder/format/lib/content/page-width";import{fillRowCss as Ee}from"../lib/sections/fill-row.js";import{headIsEmpty as Te,ownPadding as we}from"../lib/sections/own-padding.js";const Ae=4;function ot(t){if(!Array.isArray(t))return;const a=t.filter(e=>typeof e=="string"&&!!e.trim()).map(e=>e.trim()).slice(0,Ae);return a.length?a:void 0}function it(t){if(!t||typeof t!="object"||Array.isArray(t))return;const a={};for(const[e,s]of Object.entries(t))if(e.trim()){if(typeof s=="string")s.trim()&&(a[e]=s.trim());else if(Array.isArray(s)){const l=s.filter(c=>typeof c=="string"&&!!c.trim()).map(c=>c.trim());l.length&&(a[e]=l)}}return Object.keys(a).length?a:void 0}function W(t,a){const e=t.facets?.[a];return e===void 0?[]:typeof e=="string"?[e]:e}const _e=new Intl.Collator("en",{numeric:!0,sensitivity:"base"});function Le(t){const a=[],e=new Map;for(const s of t)for(const l of Object.keys(s.facets??{})){e.has(l)||(a.push(l),e.set(l,new Set));for(const c of W(s,l))e.get(l).add(c)}return a.map(s=>({label:s,values:[...e.get(s)].sort(_e.compare)}))}function Ce(t,a){return Object.entries(a).every(([e,s])=>s===""||W(t,e).includes(s))}const X=3,J="featured",q="tabs",Q="portrait",h="spread",Z="count",ct=[{label:"Even grid",value:"even"},{label:"Featured first",value:J},{label:"Tabs",value:q},{label:"Photo cards",value:Q},{label:"Staggered spread",value:h},{label:"Count",value:Z}],Se=[Q,h],dt="even",R={min:2,max:11,step:1,fallback:7,unit:"of 12"},Oe="bottom-left",$e=55,Fe="bottom";function ze(t){const a=typeof t=="number"?t:Number.parseFloat(String(t??"")),e=Number.isFinite(a)?Math.min(R.max,Math.max(R.min,Math.round(a))):R.fallback;return`${e}fr ${12-e}fr`}const ee={1:"grid-cols-1",2:"grid-cols-2 max-view-wide:grid-cols-1",3:"grid-cols-3 max-view-wide:grid-cols-1",4:"grid-cols-4 max-view-desktop:grid-cols-2 max-view-wide:grid-cols-1"},te={2:"grid-cols-2",3:"grid-cols-3 max-view-wide:grid-cols-2",4:"grid-cols-4 max-view-desktop:grid-cols-3 max-view-wide:grid-cols-2"},ke="Find by name",Re="Nobody by that name.",Ie="Nobody matches.",Me="Any";function Ue(t,a){const e=l=>l.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLocaleLowerCase().trim(),s=e(a);return s===""||e(t).includes(s)}function ne({typed:t,onType:a,wide:e=!1}){return o("label",{className:`flex max-w-[360px] flex-col gap-1.5${e?" w-full":""}`,children:[n("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em] text-fg-dim",children:ke}),n("input",{type:"search",value:t,onChange:s=>a(s.target.value),autoComplete:"off",className:"rounded-[var(--sf-button-radius,6px)] border border-line bg-bg px-4 py-2.5 text-[length:var(--size-body,15px)] text-fg outline-none focus:border-accent"})]})}function ae({tags:t}){return n("ul",{"aria-label":"Details",className:"flex gap-1.5 overflow-hidden",children:t.map((a,e)=>n("li",{className:"shrink-0 rounded-[var(--sf-button-radius,4px)] border border-line px-2 py-0.5 text-[length:var(--size-label,12px)] text-fg-dim",children:a},`${a}-${e}`))})}function De({card:t,scaffold:a,lower:e=!1}){return o(k,{href:t.href||"#",className:`sf-card group relative isolate flex aspect-[3/4] overflow-hidden bg-surface${e?" min-[801px]:mt-16":""}`,"aria-disabled":a||void 0,tabIndex:a?-1:void 0,children:[n("div",{className:"absolute inset-0 transition-transform duration-700 group-hover:scale-[1.03] motion-reduce:transition-none motion-reduce:group-hover:scale-100",children:n(Ne,{label:`card-${t.slug}`,src:t.cover||void 0,sizes:"(max-width: 800px) 50vw, 25vw"})}),n("div",{"aria-hidden":!0,className:"absolute inset-0 z-0",style:{background:"linear-gradient(180deg, transparent 45%, color-mix(in srgb, var(--bg) 88%, transparent) 100%)"}}),t.meta&&n("span",{className:"absolute left-3 top-3 z-[1] rounded-[var(--sf-button-radius,999px)] bg-bg/85 px-2.5 py-1 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.16em] text-accent",children:g(t.meta)}),o("div",{className:"relative z-[1] mt-auto flex w-full flex-col gap-1 p-4 max-view-wide:p-3",children:[n("h3",{className:"font-heading3 text-[length:var(--size-headingSmall,24px)] leading-[1.1] tracking-[-0.01em] text-fg",children:N(t.title,!1)}),t.dateLabel&&n("p",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.16em] text-accent",children:g(t.dateLabel)}),t.tags&&t.tags.length>0&&n(ae,{tags:t.tags}),t.excerpt&&n("p",{className:"line-clamp-2 text-[length:var(--size-body,14px)] leading-[1.45] text-fg-dim",children:g(t.excerpt)})]})]})}function Pe({cards:t,scaffold:a}){return n("nav",{"aria-label":"Days",className:z.nav,children:n("ul",{className:z.list,children:t.map((e,s)=>{const l=!!e.meta;return n("li",{children:o(k,{href:e.href||"#","aria-current":l?"page":void 0,"aria-disabled":a||void 0,tabIndex:a?-1:void 0,className:z.tab(l),children:[n("span",{className:"font-heading3 text-[length:var(--size-body,15px)] leading-[1.2]",children:N(e.title,!1)}),e.excerpt&&n("span",{className:`font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.14em] ${l?"opacity-80":"text-fg-dim"}`,children:g(e.excerpt)})]})},`${e.slug}-${s}`)})})})}function je({count:t,words:a,href:e}){const s=o("span",{className:"inline-flex items-baseline gap-3",children:[n("span",{className:"font-heading text-[length:var(--size-headingLarge,64px)] leading-none text-accent",children:t}),a!==void 0&&n("span",{className:"font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg",children:a})]});return e?n(k,{href:e,className:"inline-flex hover:opacity-85",children:s}):s}const Be="relative z-[2] bg-bg py-[120px] max-view-wide:py-[70px]",Ve="relative z-[2] bg-bg pt-0 pb-[120px] max-view-wide:pt-0 max-view-wide:pb-[70px]",Ye="relative z-[2] bg-bg py-[32px] max-view-wide:py-[24px]";function Ge({num:t,title:a,link:e,posts:s,columns:l,limit:c,showAll:E=!1,editing:T=!1,cardImage:se,gap:re,gapPhone:le,layout:p,featuredWidth:oe,listCover:ie=!0,featuredDarken:ce,omitHead:x=!1,sample:w,nameFilter:de=!1,padTop:fe,padBottom:pe}){const[A,I]=K(""),[M,me]=K({}),_=xe("ev"),U=s??[],D=E?U.length:typeof c=="number"&&c>0?c:X,L=U.slice(0,D),m=T&&L.length===0;if(L.length===0&&!T)return null;const P=E?X:D,d=m?w?.length?w.slice(0,E?w.length:P):Array.from({length:P},(r,i)=>({slug:`placeholder-${i}`,title:y("Blog post title"),excerpt:y("A short summary of the post appears here."),cover:"",meta:y("Journal"),dateLabel:y("Date")})):L,f=be("Events",re,"both",le),C=p===J&&d.length>1,ge=ze(oe),S=p===q,j=p===Z,B=Se.includes(p??""),O=de&&!S&&!j&&!C,$=O?Le(d):[],b=O?d.filter(r=>Ue(r.title,A)&&Ce(r,M)):d,F=we(fe,pe),ue=!T&&Te(t,a,e?.text),V=p===h?"grid-cols-3 max-view-wide:grid-cols-2":te[Math.min(4,Math.max(2,l??3))]??te[3],Y=ee[Math.min(4,Math.max(1,l??3))]??ee[3],G=S||C||p===h?"":Ee(_,B?V:Y,{cards:b.length});return j?n("section",{className:Ye,style:Object.keys(F).length?F:void 0,children:n("div",{className:H,children:n(je,{count:d.length,words:x||a===void 0?void 0:N(a,!1),href:x?void 0:e?.href})})}):n("section",{className:x?Ve:Be,style:{...ye(se),...F},children:o("div",{className:H,children:[x||ue?null:n(ve,{num:t!==void 0?g(t):void 0,title:a!==void 0?N(a,!1):void 0,link:e?{text:g(e.text),href:e.href}:void 0}),O&&o("div",{className:"mb-6 flex flex-col gap-2",children:[$.length===0?n(ne,{typed:A,onType:I}):o("div",{className:"flex flex-wrap items-end gap-3",children:[n(ne,{typed:A,onType:I,wide:!0}),$.map(({label:r,values:i})=>o("label",{className:"flex min-w-[140px] flex-col gap-1.5 max-view-wide:flex-1",children:[n("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em] text-fg-dim",children:r}),o("select",{value:M[r]??"",onChange:u=>me(he=>({...he,[r]:u.target.value})),className:"rounded-[var(--sf-button-radius,6px)] border border-line bg-bg px-4 py-2.5 text-[length:var(--size-body,15px)] text-fg outline-none focus:border-accent",children:[n("option",{value:"",children:Me}),i.map(u=>n("option",{value:u,children:u},u))]})]},r))]}),b.length===0&&n("p",{role:"status",className:"text-[length:var(--size-body,14px)] text-fg-dim",children:$.length===0?Re:Ie})]}),G&&n("style",{children:G}),S?n(Pe,{cards:d,scaffold:m}):B?n("div",{className:`${_} sf-card-grid grid${f.className} ${V}`,style:f.style,children:b.map((r,i)=>n(De,{card:r,scaffold:m,lower:p===h&&i%3===1},`${r.slug}-${i}`))}):C?o("div",{className:`sf-card-grid grid grid-cols-[var(--sf-events-split)] max-view-wide:grid-cols-1${f.className}`,style:{...f.style,"--sf-events-split":ge},children:[n(v,{post:d[0],href:d[0].href,scaffold:m,layout:"cover",darken:ce??$e,darkenStyle:Fe,placement:Oe},`${d[0].slug}-0`),n("div",{className:`grid auto-rows-min${f.className}`,style:f.style,children:d.slice(1).map((r,i)=>n(v,{post:r,href:r.href,scaffold:m,showCover:ie},`${r.slug}-${i+1}`))})]}):n("div",{className:`${_} sf-card-grid grid${f.className} ${Y}`,style:f.style,children:b.map((r,i)=>r.tags&&r.tags.length>0?o("div",{className:"flex flex-col gap-2",children:[n(v,{post:r,href:r.href,scaffold:m}),n(ae,{tags:r.tags})]},`${r.slug}-${i}`):n(v,{post:r,href:r.href,scaffold:m},`${r.slug}-${i}`))})]})})}export{R as EVENTS_FEATURED_WIDTH,ct as EVENTS_LAYOUTS,Z as EVENTS_LAYOUT_COUNT,dt as EVENTS_LAYOUT_FALLBACK,J as EVENTS_LAYOUT_FEATURED,Q as EVENTS_LAYOUT_PORTRAIT,h as EVENTS_LAYOUT_SPREAD,q as EVENTS_LAYOUT_TABS,Se as EVENTS_PHOTO_LAYOUTS,Ae as MAX_CARD_TAGS,Ge as default,Le as facetChoices,Ce as matchesFacets,Ue as matchesName,it as readFacets,ot as readTags};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FitmentRow } from "../lib/wheels/fitments.js";
|
|
2
|
-
import type
|
|
2
|
+
import { type FieldUsageAnswer } from "../lib/content/field-usage.js";
|
|
3
3
|
export interface FitmentTableProps {
|
|
4
4
|
num?: string;
|
|
5
5
|
title?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as l,Fragment as
|
|
1
|
+
"use client";import{jsx as t,jsxs as l,Fragment as q}from"react/jsx-runtime";import C from"./SectionBand.js";import{useEffect as J,useState as E}from"react";import _ from"efficient-web-builder/render/components/SectionHeader";import M from"./SectionFootnote.js";import{renderGold as u,renderHeadline as A}from"efficient-web-builder/render/components/goldPhrases";import Q from"./fitment/FitmentRowFit.js";import{useVehicleFit as Y}from"./fitment/useVehicleFit.js";import{fitmentRowAnswer as ee}from"../lib/wheels/fitment-row-fit.js";import{fitmentColumns as te,loadUnitFor as ne}from"../lib/wheels/fitment-columns.js";import{useActiveCountry as le}from"./CurrencyContext.js";import{NO_FIELD_ANSWERS as re}from"../lib/content/field-usage.js";import{say as T}from"efficient-web-builder/format/lib/editor-words";import{useEnglish as oe}from"./EnglishVariant.js";const o={body:"text-[length:var(--size-body,12px)]",labelXs:"text-[length:var(--size-label,11px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]",labelXl:"text-[length:var(--size-label,14px)]"},ae="whitespace-nowrap border-b border-line px-4 py-4",L=`relative cursor-pointer border-2 px-4 py-2 font-mono ${o.labelSmall} font-semibold uppercase tracking-[0.18em] text-fg transition-colors`,X="border-b border-line py-[120px] max-view-desktop:py-20",j="border-b border-line pt-0 pb-[120px] max-view-desktop:pt-0 max-view-desktop:pb-20",I={background:"color-mix(in oklab, var(--accent) 14%, transparent)"},R=(a,i,s)=>i.map(f=>f.cell(a,s)).join("|");function ie({num:a,title:i,description:s,rows:f,showFilter:B=!0,tooltipDefaultOn:b=!0,footnote:H,footnoteLinkText:O,footnoteLinkHref:W,editing:y=!1,omitHead:p=!1,fieldUsage:G=re}){const N=f??[],c=te(G),K=oe(),h=ne(le()),[x,k]=E(null),[r,S]=E(b);J(()=>S(b),[b]);const P=Y({editing:y}),$=c.length===0;if(N.length===0||$)return y?l(C,{className:p?j:X,children:[p?null:t(_,{num:a!=null?u(a):void 0,title:i!=null?A(i,!1):void 0,description:s!=null?u(s):void 0,accent:!0}),t("p",{className:`border-t border-line py-6 font-mono ${o.labelLarge} uppercase tracking-[0.18em] text-fg-dim`,children:$?T("Every fitment column is hidden in Product Types — show one to draw this table."):T("No fitment data for this wheel — pick a wheel with fitment specs.")})]}):null;const F=new Set,g=N.filter(e=>{const n=R(e,c,h);return F.has(n)?!1:(F.add(n),!0)}),w=Array.from(new Set(g.map(e=>e.diameter))).sort((e,n)=>e-n),d=x!==null&&w.includes(x)?x:null,v=d===null?g:g.filter(e=>e.diameter===d),V=B&&w.length>1,D=e=>{if(e===0)return!1;const n=v[e-1],m=v[e];return n.diameter!==m.diameter||n.width!==m.width};return l(C,{className:p?j:X,children:[p?null:t(_,{num:a!=null?u(a):void 0,title:i!=null?A(i,!1):void 0,description:s!=null?u(s):void 0,accent:!0}),l("div",{className:"mb-6 flex flex-wrap items-center gap-x-2 gap-y-3",children:[V&&l(q,{children:[t("span",{className:`mr-2 font-mono ${o.labelSmall} uppercase tracking-[0.24em] text-fg-dim max-view-tablet:mr-0 max-view-tablet:mb-1 max-view-tablet:w-full`,children:"Filter by size:"}),l("button",{type:"button",onClick:()=>k(null),className:`${L} ${d===null?"border-accent outline outline-1 outline-accent -outline-offset-1":"border-fg-dim/50 hover:border-accent"}`,style:d===null?I:void 0,children:[d===null&&t("span",{"aria-hidden":!0,className:"absolute inset-y-0 left-0 w-[3px] bg-accent"}),"All"]}),w.map(e=>{const n=e===d;return l("button",{type:"button",onClick:()=>k(n?null:e),className:`${L} ${n?"border-accent outline outline-1 outline-accent -outline-offset-1":"border-fg-dim/50 hover:border-accent"}`,style:n?I:void 0,children:[n&&t("span",{"aria-hidden":!0,className:"absolute inset-y-0 left-0 w-[3px] bg-accent"}),e,'"']},e)})]}),l("button",{type:"button",onClick:()=>S(e=>!e),"aria-pressed":r,"aria-label":r?"Hide vehicle tooltip":"Show vehicle tooltip",className:`ml-auto inline-flex items-center gap-3 font-mono ${o.labelSmall} uppercase tracking-[0.24em] text-fg-dim transition-colors hover:text-fg max-view-tablet:hidden`,children:[t("span",{children:"Vehicle tooltip"}),t("span",{className:`relative inline-flex h-5 w-9 shrink-0 items-center rounded-full border-2 transition-colors ${r?"border-accent":"border-fg-dim/50"}`,style:r?{background:"color-mix(in oklab, var(--accent) 30%, transparent)"}:void 0,"aria-hidden":!0,children:t("span",{className:`block h-3 w-3 rounded-full transition-transform ${r?"translate-x-[18px] bg-accent":"translate-x-[2px] bg-fg-dim"}`})}),t("span",{className:r?"text-accent":"text-fg-dim",children:r?"On":"Off"})]})]}),t("div",{className:"-mx-1 overflow-x-auto",children:l("table",{className:`w-full border-collapse font-mono ${o.labelXl} tracking-[0.06em] text-fg`,children:[t("thead",{children:t("tr",{children:c.map(({header:e},n)=>t("th",{className:`whitespace-nowrap border-b border-line bg-surface px-4 py-4 text-left ${o.body} font-normal uppercase tracking-[0.22em] text-fg-dim`,children:K(e)},n))})}),t("tbody",{children:v.map((e,n)=>t("tr",{className:`group transition-colors hover:[&>td]:bg-surface ${D(n)?"[&>td]:border-t [&>td]:border-line":""}`,children:c.map((m,U)=>{const z=U===c.length-1,Z=m.fieldKey==="diameter";return l("td",{className:`${z?"relative ":""}${ae}${Z?" text-accent":""}`,children:[m.cell(e,h),z&&r&&t("span",{role:"tooltip",className:`pointer-events-none absolute top-1/2 right-0 z-20 hidden w-[520px] -translate-y-1/2 whitespace-normal bg-[var(--tooltip-bg)] px-3 py-2 text-right font-mono ${o.labelXs} normal-case tracking-[0.12em] text-fg shadow-lg group-hover:block max-view-tablet:!hidden`,children:t(Q,{answer:ee(e,P)})})]},m.fieldKey)})},R(e,c,h)))})]})}),t(M,{text:H,linkText:O,linkHref:W})]})}export{ie as default};
|
|
@@ -21,5 +21,9 @@ export interface FooterMenuProps {
|
|
|
21
21
|
layout?: "column" | "row";
|
|
22
22
|
linkAlign?: unknown;
|
|
23
23
|
linkRange?: unknown;
|
|
24
|
+
menuStyle?: unknown;
|
|
25
|
+
currentPage?: unknown;
|
|
24
26
|
}
|
|
25
|
-
export
|
|
27
|
+
export declare const MENU_STYLE_PLAIN = "plain";
|
|
28
|
+
export declare const MENU_STYLE_TABS = "tabs";
|
|
29
|
+
export default function FooterMenu({ owner, menu, heading, accordionMobile, showDividers, editing, layout, linkAlign, linkRange, menuStyle, currentPage, }: FooterMenuProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,Fragment as
|
|
1
|
+
"use client";import{jsx as e,Fragment as H,jsxs as a}from"react/jsx-runtime";import{useCallback as F,useEffect as j,useRef as B,useState as O}from"react";import $ from"next/link";import{REPEAT_ATTRIBUTE as W,REPEAT_INDEX_ATTRIBUTE as Y}from"efficient-easel/draw";import z from"./CountrySelect.js";import{MenuPlaceContext as G}from"./MenuLinkBlock.js";import q from"./ThemeToggle.js";import{CardRowContext as X,CardTemplateRows as J}from"efficient-web-builder/render/components/CardRowContext";import{renderChrome as k}from"efficient-web-builder/render/components/goldPhrases";import{UTIL_WORDS as K}from"./HeaderTools.js";import{usePhoneMenuTools as Q}from"efficient-web-builder/render/components/PhoneMenuTools";import{useSearch as V}from"./SearchContext.js";import{useModalDismiss as Z}from"./useModalDismiss.js";import ee from"efficient-easel/screen/components/UiIcon";import{usePreviewMenus as ne}from"./PreviewMenusContext.js";import{FOOTER_MENU_PLACEHOLDER_COUNT as re,FOOTER_MENU_PLACEHOLDER_HEADING as le,FOOTER_MENU_PLACEHOLDER_HINT as te}from"../lib/content/menu-placeholder.js";import{say as E}from"efficient-web-builder/format/lib/editor-words";import{UNDER_HEADER_SHEET_CLASS as ae}from"../lib/content/header-bar.js";import{isMenuOrphaned as oe}from"../lib/menu-source.js";import{legacyBlockAlignOf as se}from"../lib/content/legacy-block-align.js";import{menuLinkInRange as ie,resolveMenuLinkRange as ce}from"../lib/content/menu-row.js";import{TAB_CELLS as P,currentLinkIndex as me}from"../lib/content/tab-strip.js";import{useCurrentPagePath as de}from"efficient-web-builder/render/lib/site-runtime";const Be="plain",ue="tabs",pe="flex list-none flex-col gap-3 text-[13px]",A="mb-4 font-mono text-[13px] uppercase tracking-[0.2em] text-fg-dim",y="text-[12px] italic text-fg-dim/70",I=(r,n)=>r&&n>0?"border-t border-line pt-3":"",U=r=>({label:r.label??"",href:r.url??""}),fe=Array.from({length:re},()=>({label:"",href:""}));function L({owner:r,items:n,place:s,wrap:i,markCurrent:f=!1}){const c=n?n.map(U):fe,p=de(),h=n&&f?me(n.map(b=>b.url??""),p):-1,d=h<0?null:{index:h,href:n[h].url??""};return e(G.Provider,{value:n?d?{...s,current:d}:s:{...s,placeholder:!0},children:e(J,{ownerId:r.id,ownerType:r.type,Template:r.template,rows:c,items:n??void 0,fallback:null,wrapCopy:i,children:b=>b})})}const M=r=>(r.template?.blockCount??0)>0,D="This menu draws no links: its card template is empty. Undo the delete, or delete this Menu and add it again.";function he({owner:r,items:n,label:s,editing:i,linkAlign:f,linkRange:c,markCurrent:p}){const h=se(f),d=ce(c),b=!!d&&n!==null&&d.to!==void 0&&d.to<n.length,[N,T]=O(!1),_=B(null),x=Q(),{open:g}=V(),u=s||"Menu",o=F(()=>T(!1),[]);Z({active:N,onDismiss:o,scopeRef:_});const R=e(L,{owner:r,items:n,place:{place:"row"},markCurrent:p,wrap:(l,m)=>{const w=n!==null&&d&&!ie(d,m.index+1)?{"data-menu-out":""}:null;return e("li",{className:"",...w,children:l})}}),v=(l,m,w)=>i?{[W]:`${l}:${w<0?"panel":"dropdown"}`,[Y]:`${w+1}.${m.index}`}:null,C=e(L,{owner:r,items:n,place:{place:"panel",onNavigate:o},markCurrent:p,wrap:(l,m)=>a(H,{children:[e("li",{className:"flex min-h-14 items-center border-b border-line",...v(r.id,m,-1),children:l}),n===null?null:(m.item?.dropdown_items??[]).map((w,S)=>e(X.Provider,{value:{...m,row:U(w),item:w},children:e("li",{className:"flex min-h-12 items-center border-b border-line pl-5 text-[14px]",...v(r.id,m,S),children:l})},S))]})}),t=x&&(x.search||x.region||x.account||x.theme)?x:null;return!i&&n!==null&&!M(r)&&!t?null:a("nav",{ref:_,"aria-label":u,"data-menu-row":"",...h?{"data-menu-align":h}:null,...b?{"data-menu-part":"lead"}:null,className:"min-w-0",children:[e("ul",{className:"m-0 hidden list-none flex-wrap items-center gap-x-8 gap-y-2 p-0 font-mono text-[13px] uppercase tracking-[0.18em] view-tablet:flex",children:R}),e("button",{type:"button",className:"flex h-11 w-11 items-center justify-center view-tablet:hidden","aria-expanded":N,"aria-label":N?"Close the menu":"Open the menu",onClick:()=>T(l=>!l),children:e("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round","aria-hidden":"true",children:N?e("path",{d:"M6 6l12 12M18 6L6 18"}):e("path",{d:"M4 7h16M4 12h16M4 17h16"})})}),N?a("div",{role:"dialog","aria-label":u,className:`${ae} z-[60] flex flex-col overflow-y-auto bg-bg text-fg view-tablet:hidden`,children:[e("ul",{className:"m-0 flex list-none flex-col px-5 py-3 font-mono text-[16px] uppercase tracking-[0.18em]",children:C}),t?a("div",{className:"mt-auto flex flex-col gap-4 border-t border-line bg-surface p-5",children:[t.search?a("button",{type:"button",className:"flex h-12 items-center gap-3 border border-line bg-bg px-4 text-left text-[15px]",onClick:i?void 0:()=>{o(),g()},children:[e(ee,{name:"search",size:18,strokeWidth:1.6,rounded:!0}),K.search]}):null,t.account?a("div",{className:"flex items-center justify-between",children:[e("span",{className:"mono-eyebrow text-fg-dim",children:"Account"}),e($,{href:"/account",onClick:o,className:"mono-eyebrow underline",children:"Your account"})]}):null,t.region?a("div",{className:"flex items-center justify-between",children:[e("span",{className:"mono-eyebrow text-fg-dim",children:"Region"}),e(z,{})]}):null,t.theme?a("div",{className:"flex items-center justify-between",children:[e("span",{className:"mono-eyebrow text-fg-dim",children:"Theme"}),e(q,{})]}):null]}):null]}):null]})}function xe({owner:r,items:n,label:s,editing:i,markCurrent:f}){return!i&&(n===null||n.length===0||!M(r))?null:e("nav",{"aria-label":s||"Menu","data-menu-tabs":"",className:"min-w-0",children:e("ul",{className:P.list,children:e(L,{owner:r,items:n,place:{place:"tab"},markCurrent:f,wrap:c=>e("li",{className:P.item,children:c})})})})}function be({owner:r,menu:n,heading:s,accordionMobile:i=!1,showDividers:f=!1,editing:c=!1,layout:p="column",linkAlign:h,linkRange:d,menuStyle:b,currentPage:N}){const T=p==="row"&&N===!0,{live:_,ready:x}=ne(),g=oe({id:n?.id,handle:n?.handle,editing:c,ready:x,live:_}),u=g?[]:n?.items??[],o=s||n?.name||"",[R,v]=O(!1);if(j(()=>{if(!i)return;const t=window.matchMedia("(max-width: 800px)"),l=()=>v(t.matches);return l(),t.addEventListener("change",l),()=>t.removeEventListener("change",l)},[i]),p==="row"&&c&&!g&&u.length>0&&!M(r))return e("p",{className:y,children:E(D)});if(p==="row"&&b===ue)return e(xe,{owner:r,items:g?null:u,label:o,editing:c,markCurrent:T});if(p==="row")return e(he,{owner:r,items:g?null:u,label:o,editing:c,linkAlign:h,linkRange:d,markCurrent:T});const C=t=>e("ul",{className:pe,children:e(L,{owner:r,items:t,place:{place:"column"},wrap:(l,m)=>e("li",{className:t?I(f,m.index):`text-fg ${I(f,m.index)}`,children:l})})});return g?a("div",{className:"min-w-0",children:[e("h4",{className:A,children:s?k(s):E(le)}),C(null),e("p",{className:`mt-3 ${y}`,children:E(te)})]}):u.length===0||!M(r)?a("div",{className:"min-w-0",children:[o?e("h4",{className:A,children:k(o)}):null,c?e("p",{className:y,children:u.length===0?E("This menu has no links yet — add them in {place}.",{place:E("Storefront → Menus")}):E(D)}):null]}):i&&R?a("details",{className:"min-w-0 border-b border-line",children:[a("summary",{className:"flex cursor-pointer list-none items-center justify-between py-3 font-mono text-[13px] uppercase tracking-[0.2em] text-fg-dim",children:[k(o),e("span",{"aria-hidden":!0,children:"+"})]}),e("div",{className:"pb-3",children:C(u)})]}):a("div",{className:"min-w-0",children:[o?e("h4",{className:A,children:k(o)}):null,C(u)]})}export{Be as MENU_STYLE_PLAIN,ue as MENU_STYLE_TABS,be as default};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactNode } from "react";
|
|
2
|
+
import type { SlotComponent } from "efficient-easel/blocks";
|
|
3
|
+
import { type CardHoverDrawn } from "efficient-web-builder/format/lib/animation/hover";
|
|
4
|
+
import type { SourceRow } from "efficient-web-builder/format/lib/content/block-sources";
|
|
5
|
+
import type { WheelSummary } from "../lib/api/index.js";
|
|
6
|
+
import { type FieldUsageAnswer } from "../lib/content/field-usage.js";
|
|
7
|
+
export declare function gridIndexCss(cls: string): string;
|
|
8
|
+
export declare function cardRowsGrid(gapZone: {
|
|
9
|
+
className: string;
|
|
10
|
+
style: CSSProperties;
|
|
11
|
+
}): {
|
|
12
|
+
className: string;
|
|
13
|
+
style: CSSProperties;
|
|
14
|
+
};
|
|
15
|
+
export interface GridCardValues {
|
|
16
|
+
ownerId: string;
|
|
17
|
+
Template: SlotComponent | undefined;
|
|
18
|
+
hover: CardHoverDrawn;
|
|
19
|
+
imageSizes: string;
|
|
20
|
+
fieldUsage: readonly FieldUsageAnswer[];
|
|
21
|
+
reserveEyebrow: boolean;
|
|
22
|
+
editing: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare function useGridCard(): GridCardValues;
|
|
25
|
+
export declare function GridCardProvider({ value, children }: {
|
|
26
|
+
value: GridCardValues;
|
|
27
|
+
children: ReactNode;
|
|
28
|
+
}): import("react").JSX.Element;
|
|
29
|
+
export declare function productCardRow(wheel: WheelSummary): SourceRow;
|
|
30
|
+
export declare function GridCards({ wheels, finishes, children, }: {
|
|
31
|
+
wheels: readonly WheelSummary[];
|
|
32
|
+
finishes?: readonly (string | undefined)[];
|
|
33
|
+
children: (copies: ReactNode) => ReactNode;
|
|
34
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as t,jsxs as i,Fragment as p}from"react/jsx-runtime";import u from"next/link";import{createContext as x,useContext as C}from"react";import{CardTemplateRows as v}from"efficient-web-builder/render/components/CardRowContext";import{InsideSiteColumn as S}from"efficient-web-builder/render/components/SiteGutterFrame";import{cardHoverOf as _}from"efficient-web-builder/format/lib/animation/hover";import{NO_FIELD_ANSWERS as h}from"../lib/content/field-usage.js";import{CARD_IMAGE_SIZES as g}from"../lib/sections/card-image-sizes.js";import{CardLookContext as w}from"./card-pieces/card-row.js";import{CardBuyDialog as b}from"./card-pieces/CardBuyButton.js";import{useWheelCardState as I,WheelCardStateProvider as y}from"./card-pieces/ProductCardState.js";import{say as R}from"efficient-web-builder/format/lib/editor-words";import{CARD_INDEX_OPTIONS as E,cardIndexCss as N}from"efficient-web-builder/format/lib/sections/product-card-style";import{SHARED_ROWS_LIST_CLASS as A}from"efficient-web-builder/render/lib/content/box-shared-columns";import{GAP_ZONE_CLASS as G}from"efficient-web-builder/format/lib/content/container-gap";import{CARD_ROWS_GRID_CLASS as D,cardRowsGap as P,cardRowsGridStyle as T}from"./WheelCardFrame.js";function ae(e){return E.map(({value:r})=>r==="off"?"":N(e,r).replace(".sf-card-index::before",`.sf-card-index[data-format="${r}"]::before`)).join("")}function ne(e){return e.className.includes(G)?{className:`${e.className} ${D} ${A}`,style:{...e.style,...T(P(e))}}:e}const L={ownerId:"",Template:void 0,hover:_({},"ProductGrid"),imageSizes:g,fieldUsage:h,reserveEyebrow:!1,editing:!1},s=x(L);function d(){return C(s)}function ie({value:e,children:r}){return t(s.Provider,{value:e,children:r})}function O(e){return{name:e.name??"",eyebrow:e.process??"",href:e.slug?`/wheels/${e.slug}`:""}}const l="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)]",$="col-span-2 max-view-wide:col-span-1 @max-[720px]:col-span-1",W="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",j="relative flex flex-1 flex-col";function F({copy:e}){const{wheel:r,sel:o,isSet:a}=I(),{editing:n}=d();return i(p,{children:[i("article",{className:a?`${l} ${$}`:l,children:[o.probes,!n&&r.slug?t(u,{href:`/wheels/${r.slug}`,"aria-label":r.name,className:"absolute inset-0 z-[1]"}):null,t("div",{className:n?j:W,children:t(S,{children:e})})]}),t(b,{})]})}function k(e,r,o){const a=r.item;return t(y,{wheel:a,defaultFinish:o?.[r.index],children:t(w.Provider,{value:"catalog",children:t(F,{copy:e})})})}function se({wheels:e,finishes:r,children:o}){const{ownerId:a,Template:n,editing:c}=d();return t(v,{ownerId:a,ownerType:"ProductGrid",Template:n,rows:e.map(O),items:e,fallback:c?t(z,{}):null,wrapCopy:(m,f)=>k(m,f,r),children:o})}function z(){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:R("The card is empty. Add parts to its card template in Layers.")})}export{ie as GridCardProvider,se as GridCards,ne as cardRowsGrid,ae as gridIndexCss,O as productCardRow,d as useGridCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as n,jsxs as u}from"react/jsx-runtime";import{createContext as p,useContext as d}from"react";import b from"next/link";import h from"./HeaderNavItem.js";import x from"./MenuPlaceholderLabel.js";import{useCardRow as k}from"efficient-web-builder/render/components/CardRowContext";import{renderGold as o}from"efficient-web-builder/render/components/goldPhrases";import{isLabelOnlyMenuUrl as L,menuLinkKind as N}from"../lib/menu-link.js";import{CURRENT_LINE as s,TAB_CELLS as f}from"../lib/content/tab-strip.js";const w=p(null),m="opacity-80 transition-opacity hover:opacity-100";function i({item:e,label:l,link:r,onNavigate:t,current:c=!1,children:a}){return L(e.url)?n("span",{className:l,children:o(e.label)}):N(e.url)==="off-site"?u("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:r,onClick:t,children:[o(e.label),a]}):u(b,{href:e.url,className:r,onClick:t,"aria-current":c?"page":void 0,children:[o(e.label),a]})}function C(){const e=k(),l=d(w);if(!e||!l)return null;if(l.placeholder)return n(x,{});const r={label:e.row.label??"",url:e.row.href??""},t=!!l.current&&l.current.index===e.index&&l.current.href===r.url;if(l.place==="tab"){const a=f.tab(e.index===0,t);return n(i,{item:r,label:a,link:a,current:t,children:t?n("span",{className:f.underline}):null})}if(l.place==="column")return n(i,{item:r,label:"text-fg",link:"text-fg transition-colors hover:text-accent",current:t});if(l.place==="panel")return n(i,{item:r,label:"",link:` ${m}`,onNavigate:l.onNavigate,current:t});const c=e.item?.dropdown_items??[];return c.length?n(h,{item:{href:r.url,label:o(r.label),plainLabel:r.label,dropdownItems:c.map(a=>({href:a.url,label:o(a.label),plainLabel:a.label}))}}):t?n(i,{item:r,label:"",link:s.rowLink,current:!0,children:n("span",{"aria-hidden":"true",className:s.row})}):n(i,{item:r,label:"",link:` ${m}`})}export{w as MenuPlaceContext,C as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import { type CardIndexFormat, type CardOutline } from "efficient-web-builder/format/lib/sections/product-card-style";
|
|
3
3
|
import { type CardHoverDrawn } from "efficient-web-builder/format/lib/animation/hover";
|
|
4
|
-
import type
|
|
4
|
+
import { type FieldUsageAnswer } from "../lib/content/field-usage.js";
|
|
5
5
|
export interface ProductCardChrome {
|
|
6
6
|
imageBackgroundFill: string;
|
|
7
7
|
hover: CardHoverDrawn;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as l}from"react/jsx-runtime";import{GRID_CARD_SHOW as r}from"../lib/sections/card-show-defaults.js";import{createContext as
|
|
1
|
+
"use client";import{jsx as l}from"react/jsx-runtime";import{GRID_CARD_SHOW as r}from"../lib/sections/card-show-defaults.js";import{createContext as F,useContext as G,useMemo as L}from"react";import{DEFAULT_CARD_INDEX_FORMAT as A,DEFAULT_CARD_OUTLINE as d}from"efficient-web-builder/format/lib/sections/product-card-style";import{THEME_CARD_IMAGE_BG as M}from"efficient-web-builder/format/lib/content/card-image-background";import{cardHoverOf as P}from"efficient-web-builder/format/lib/animation/hover";import{NO_FIELD_ANSWERS as R}from"../lib/content/field-usage.js";import{DEFAULT_COVER_INDEX as p}from"../lib/wheels/cover-rendering.js";import{CARD_IMAGE_SIZES as a}from"../lib/sections/card-image-sizes.js";const I=P({},"ProductGrid"),S={imageBackgroundFill:M,hover:I,coverIndex:p,indexBadge:A,outline:d,showBadge:!0,fieldUsage:R,reserveEyebrow:!1,showCardPrice:!0,showCardFinishes:!0,...r,imageSizes:a},T=F(S);function V({imageBackgroundFill:o,hover:t=I,coverIndex:e=p,indexBadge:m=A,outline:u=d,showBadge:_=!0,fieldUsage:E=R,reserveEyebrow:i=!1,showCardPrice:C=!0,showCardFinishes:n=!0,showCardSizes:c=r.showCardSizes,showCardBuy:f=r.showCardBuy,showCardPage:D=r.showCardPage,imageSizes:s=a,children:x}){const O=L(()=>({imageBackgroundFill:o,hover:t,coverIndex:e,indexBadge:m,outline:u,showBadge:_,fieldUsage:E,reserveEyebrow:i,showCardPrice:C,showCardFinishes:n,showCardSizes:c,showCardBuy:f,showCardPage:D,imageSizes:s}),[o,t,e,m,u,_,E,i,C,n,c,f,D,s]);return l(T.Provider,{value:O,children:x})}function Z(){return G(T)}export{V as ProductCardChromeProvider,Z as useProductCardChrome};
|