efficient-storefront-blocks 0.127.0 → 0.128.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/dist/chunks/{CustomHtmlCodeWindow-KYIRVDW4.js → CustomHtmlCodeWindow-MSEPX5HA.js} +1 -1
- package/dist/chunks/{EditorPreviewCheckout-ZKCDEXJB.js → EditorPreviewCheckout-GQZSREXK.js} +1 -1
- package/dist/chunks/SiteEditorProvider-U4Y5HLNK.js +1 -0
- package/dist/chunks/{chunk-LFKRQYYH.js → chunk-4HYAKN2G.js} +1 -1
- package/dist/chunks/{chunk-KNFNQXH3.js → chunk-4TGKSUNO.js} +1 -1
- package/dist/chunks/{chunk-5LNWW4W3.js → chunk-AJHYWZA6.js} +1 -1
- package/dist/chunks/{chunk-WFSVFVZX.js → chunk-AZNXYX4W.js} +1 -1
- package/dist/chunks/{chunk-FP652PBZ.js → chunk-B22AOLEU.js} +1 -1
- package/dist/chunks/{chunk-INU4IUCT.js → chunk-EHNNMX2W.js} +2 -2
- package/dist/chunks/{chunk-IEGDV4YL.js → chunk-UJNY3ZUO.js} +1 -1
- package/dist/chunks/chunk-YZZMDZT2.js +9 -0
- package/dist/chunks/{fitment-data-GPEMPASJ.js → fitment-data-JRGRP6YG.js} +1 -1
- package/dist/chunks/{section-css-style-UICZZ7D5.js → section-css-style-GHS565I6.js} +1 -1
- package/dist/editor/lib/document/blocks/commerce/ProductPicture/fields.js +1 -1
- package/dist/editor/lib/storefront-editor-words.d.ts +1 -4
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/editor.css +1 -1
- package/dist/index.js +31 -29
- package/dist/render/app/globals.css +1 -1
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/GridCardTemplate.d.ts +1 -3
- package/dist/render/components/GridCardTemplate.js +1 -1
- package/dist/render/components/ProductCard.js +1 -1
- package/dist/render/components/ProductCardEyebrow.d.ts +0 -1
- package/dist/render/components/ProductCardEyebrow.js +1 -1
- package/dist/render/components/ProductGridSection.js +1 -1
- package/dist/render/components/WheelCardFrame.d.ts +2 -4
- package/dist/render/components/WheelCardFrame.js +1 -1
- package/dist/render/components/card-pieces/CardPicture.d.ts +1 -12
- package/dist/render/components/card-pieces/CardPicture.js +1 -1
- package/dist/render/components/card-pieces/CardPrice.d.ts +0 -1
- package/dist/render/components/card-pieces/CardPrice.js +1 -1
- package/dist/render/components/card-pieces/CardProductBadge.js +1 -1
- package/dist/render/components/card-pieces/CardProductPicture.d.ts +0 -1
- package/dist/render/components/card-pieces/CardProductPicture.js +1 -1
- package/dist/render/components/card-pieces/CardSurfaceFrame.d.ts +1 -2
- package/dist/render/components/card-pieces/CardSurfaceFrame.js +1 -1
- package/dist/render/components/card-pieces/ProductCardState.d.ts +0 -1
- package/dist/render/components/card-pieces/ProductCardState.js +1 -1
- package/dist/render/components/card-pieces/useHeldCardPicture.d.ts +1 -3
- package/dist/render/components/card-pieces/useHeldCardPicture.js +1 -1
- package/dist/render/components/wheels-plp/AlloyWheelsListing.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductPicture/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductPrice/render.js +1 -1
- package/dist/render/lib/sections/fill-row.d.ts +1 -9
- package/dist/render/lib/sections/fill-row.js +1 -1
- package/dist/render/lib/wheels/set-mode.d.ts +0 -15
- package/dist/render/lib/wheels/set-mode.js +1 -1
- package/dist/routine-index.json +1 -1
- package/dist/value-index.json +1 -1
- package/dist/words.d.ts +6 -4
- package/dist/words.js +4 -4
- package/package.json +2 -2
- package/dist/chunks/SiteEditorProvider-WQG3BNYV.js +0 -1
- package/dist/chunks/chunk-N64MDCTX.js +0 -9
- package/dist/render/lib/sections/grid-no-hole.d.ts +0 -17
- package/dist/render/lib/sections/grid-no-hole.js +0 -1
- /package/dist/chunks/{chunk-VRXNUWWF.js → chunk-AUQKCN7Q.js} +0 -0
- /package/dist/chunks/{chunk-FP652PBZ.js.LEGAL.txt → chunk-B22AOLEU.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{chunk-INU4IUCT.js.LEGAL.txt → chunk-EHNNMX2W.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{chunk-XSDGCHJH.js → chunk-PN7RMJTO.js} +0 -0
- /package/dist/chunks/{chunk-DIX2FLX7.js → chunk-POFTB7WN.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{breakpointOf as x}from"efficient-web-builder/format/lib/content/view-lines";function $(n){const o=/(?:^|\s)grid-cols-(\d+)(?=\s|$)/.exec(n);if(!o)throw new Error(`gridColumnsOf: no base grid-cols-N in "${n}"`);const
|
|
1
|
+
import{breakpointOf as x}from"efficient-web-builder/format/lib/content/view-lines";function $(n){const o=/(?:^|\s)grid-cols-(\d+)(?=\s|$)/.exec(n);if(!o)throw new Error(`gridColumnsOf: no base grid-cols-N in "${n}"`);const t=[...n.matchAll(/(?:^|\s)(max-[\w[\]-]+):grid-cols-(\d+)(?=\s|$)/g)].flatMap(e=>{const r=x(e[1]);return r?.max?[{below:r.px,columns:Number(e[2])}]:[]}).sort((e,r)=>r.below-e.below);return{base:Number(o[1]),steps:t}}function f(n,o){return Math.max(1,Math.min(n,Math.floor(o)))}function M(n,o){return{base:f(n.base,o),steps:n.steps.map(t=>({below:t.below,columns:f(t.columns,o)}))}}const h="sf-card-tracks",w=n=>n.split(/\s+/).includes(h),b=(n,o=!1)=>o?`--sf-cols:${n}`:`grid-template-columns:repeat(${n},minmax(0,1fr))`;function T(n,o,t={}){const e=w(o);return d(n,o,t,(r,u,i)=>[`${r}{${b(i,e)}}`])}function d(n,o,{limit:t,cards:e},r){const u=$(o),i=typeof t=="number"&&t>0?t:void 0,p=Math.max(u.base,...u.steps.map(s=>s.columns));if(e!==void 0&&Math.min(e,i??1/0)>=p)return"";const a=[];for(const s of R(u)){const m=i===void 0?s.columns:f(s.columns,i),l=[];m<s.columns&&l.push(...r(`.${n}.${n}`,s.columns,m));for(let c=m-1;c>=1;c--)l.push(...r(`.${n}:not(:has(> :nth-child(${c+1})))`,s.columns,c));a.push(k(s,l))}return a.join("")}function g(n,o,t){return[`${n}{grid-template-columns:repeat(${2*o},minmax(0,1fr))}`,`${n}>*{grid-column:span 2}`,`${n}>:first-child{grid-column:${o-t+1}/span 2}`]}function y(n,o,t={}){return d(n,o,t,g)}function R({base:n,steps:o}){return[{min:o[0]?.below,max:void 0,columns:n},...o.map((t,e)=>({min:o[e+1]?.below,max:t.below,columns:t.columns}))]}function k(n,o){if(o.length===0)return"";const t=n.min!==void 0&&n.max!==void 0?`(${n.min}px <= width < ${n.max}px)`:n.max!==void 0?`(width < ${n.max}px)`:n.min!==void 0?`(width >= ${n.min}px)`:void 0;return t?`@media ${t}{${o.join("")}}`:o.join("")}function A(n,o){return`.${n} > *:nth-child(n+${o}){display:none!important}`}export{h as CARD_TRACKS_CLASS,y as centerRowCss,M as fillRow,f as fillRowColumns,T as fillRowCss,$ as gridColumnsOf,A as hiddenCardsRule};
|
|
@@ -20,24 +20,9 @@ export declare function variantHasDistinctRear(variant: WheelVariant): boolean;
|
|
|
20
20
|
export declare function variantSetBuild(variant: WheelVariant): WheelSetBuild;
|
|
21
21
|
export declare function summarySetBuild(summary: WheelSummary): WheelSetBuild;
|
|
22
22
|
export declare function setBuildLabel(build: WheelSetBuild): string | null;
|
|
23
|
-
export declare function setIsWide(build: WheelSetBuild): boolean;
|
|
24
23
|
export declare function variantHasComposedRender(variant: WheelVariant): boolean;
|
|
25
24
|
export declare function productHasComposedRender(product: StoreProduct): boolean;
|
|
26
25
|
export declare function summaryIsDually(summary: WheelSummary): boolean;
|
|
27
26
|
export declare function setSuppressesRow(isTwoObjects: boolean, key: string): boolean;
|
|
28
|
-
export declare function setSecondSrc(finish: {
|
|
29
|
-
src?: string;
|
|
30
|
-
srcRight?: string;
|
|
31
|
-
} | null | undefined, painted: string | null): string | null;
|
|
32
27
|
export declare const PER_WHEEL_UNIT = "per wheel";
|
|
33
28
|
export declare function wheelCardPriceLine(label: string, priced: boolean): string;
|
|
34
|
-
export declare const SET_PICTURE_POINTS: readonly [{
|
|
35
|
-
readonly label: "Pair";
|
|
36
|
-
readonly value: "pair";
|
|
37
|
-
}, {
|
|
38
|
-
readonly label: "One wheel";
|
|
39
|
-
readonly value: "one";
|
|
40
|
-
}];
|
|
41
|
-
export type SetPicture = (typeof SET_PICTURE_POINTS)[number]["value"];
|
|
42
|
-
export declare const SET_PICTURE_DEFAULT: SetPicture;
|
|
43
|
-
export declare function parseSetPicture(raw: unknown): SetPicture;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{WHEELS_PER_SET as r}from"../commerce.js";function u(e){return(e.components??[]).reduce((o,s)=>o+s.wheels,0)>r}function w(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(u)}const a=150,i="Front + rear",h="Directional pair",_="Standard";function c(e){return e.et==null||e.rearEt==null?0:Math.abs(e.rearEt-e.et)}function n(e){return c(e)>=a}function m(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(n)}function l(e){return e.directional===!0}function p(e){return e.kind==="staggered"}function D(e){return e.rearWidth!=null||e.rearEt!=null&&e.rearEt!==e.et}function O(e){return{twoObjects:n(e),handed:l(e),staggered:p(e)}}function R(e){return{twoObjects:x(e),handed:e.handed??!1,staggered:!1}}function T(e){return e.twoObjects?i:null}function d(e){return new Set((e.components??[]).map(t=>t.partNumber)).size>1}function W(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(d)}function x(e){return(e.setWheelCount??0)>r}const E=new Set(["boltPattern"]);function b(e,t){return e&&E.has(t)}const f="per wheel";function g(e,t){return t?`${e} ${f}`:e}export{i as AXLE_WORDS,h as HAND_WORDS,_ as NOT_HANDED_WORDS,f as PER_WHEEL_UNIT,a as TWO_OBJECT_ET_SPREAD_MM,W as productHasComposedRender,w as productIsDually,m as productIsTwoObjects,T as setBuildLabel,b as setSuppressesRow,x as summaryIsDually,R as summarySetBuild,c as variantEtSpread,d as variantHasComposedRender,D as variantHasDistinctRear,u as variantIsDually,l as variantIsHanded,p as variantIsStaggered,n as variantIsTwoObjects,O as variantSetBuild,g as wheelCardPriceLine};
|