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.
Files changed (63) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/chunks/{CustomHtmlCodeWindow-KYIRVDW4.js → CustomHtmlCodeWindow-MSEPX5HA.js} +1 -1
  3. package/dist/chunks/{EditorPreviewCheckout-ZKCDEXJB.js → EditorPreviewCheckout-GQZSREXK.js} +1 -1
  4. package/dist/chunks/SiteEditorProvider-U4Y5HLNK.js +1 -0
  5. package/dist/chunks/{chunk-LFKRQYYH.js → chunk-4HYAKN2G.js} +1 -1
  6. package/dist/chunks/{chunk-KNFNQXH3.js → chunk-4TGKSUNO.js} +1 -1
  7. package/dist/chunks/{chunk-5LNWW4W3.js → chunk-AJHYWZA6.js} +1 -1
  8. package/dist/chunks/{chunk-WFSVFVZX.js → chunk-AZNXYX4W.js} +1 -1
  9. package/dist/chunks/{chunk-FP652PBZ.js → chunk-B22AOLEU.js} +1 -1
  10. package/dist/chunks/{chunk-INU4IUCT.js → chunk-EHNNMX2W.js} +2 -2
  11. package/dist/chunks/{chunk-IEGDV4YL.js → chunk-UJNY3ZUO.js} +1 -1
  12. package/dist/chunks/chunk-YZZMDZT2.js +9 -0
  13. package/dist/chunks/{fitment-data-GPEMPASJ.js → fitment-data-JRGRP6YG.js} +1 -1
  14. package/dist/chunks/{section-css-style-UICZZ7D5.js → section-css-style-GHS565I6.js} +1 -1
  15. package/dist/editor/lib/document/blocks/commerce/ProductPicture/fields.js +1 -1
  16. package/dist/editor/lib/storefront-editor-words.d.ts +1 -4
  17. package/dist/editor/lib/storefront-editor-words.js +1 -1
  18. package/dist/editor.css +1 -1
  19. package/dist/index.js +31 -29
  20. package/dist/render/app/globals.css +1 -1
  21. package/dist/render/built-with.json +1 -1
  22. package/dist/render/components/GridCardTemplate.d.ts +1 -3
  23. package/dist/render/components/GridCardTemplate.js +1 -1
  24. package/dist/render/components/ProductCard.js +1 -1
  25. package/dist/render/components/ProductCardEyebrow.d.ts +0 -1
  26. package/dist/render/components/ProductCardEyebrow.js +1 -1
  27. package/dist/render/components/ProductGridSection.js +1 -1
  28. package/dist/render/components/WheelCardFrame.d.ts +2 -4
  29. package/dist/render/components/WheelCardFrame.js +1 -1
  30. package/dist/render/components/card-pieces/CardPicture.d.ts +1 -12
  31. package/dist/render/components/card-pieces/CardPicture.js +1 -1
  32. package/dist/render/components/card-pieces/CardPrice.d.ts +0 -1
  33. package/dist/render/components/card-pieces/CardPrice.js +1 -1
  34. package/dist/render/components/card-pieces/CardProductBadge.js +1 -1
  35. package/dist/render/components/card-pieces/CardProductPicture.d.ts +0 -1
  36. package/dist/render/components/card-pieces/CardProductPicture.js +1 -1
  37. package/dist/render/components/card-pieces/CardSurfaceFrame.d.ts +1 -2
  38. package/dist/render/components/card-pieces/CardSurfaceFrame.js +1 -1
  39. package/dist/render/components/card-pieces/ProductCardState.d.ts +0 -1
  40. package/dist/render/components/card-pieces/ProductCardState.js +1 -1
  41. package/dist/render/components/card-pieces/useHeldCardPicture.d.ts +1 -3
  42. package/dist/render/components/card-pieces/useHeldCardPicture.js +1 -1
  43. package/dist/render/components/wheels-plp/AlloyWheelsListing.js +1 -1
  44. package/dist/render/lib/document/blocks/commerce/ProductPicture/render.js +1 -1
  45. package/dist/render/lib/document/blocks/commerce/ProductPrice/render.js +1 -1
  46. package/dist/render/lib/sections/fill-row.d.ts +1 -9
  47. package/dist/render/lib/sections/fill-row.js +1 -1
  48. package/dist/render/lib/wheels/set-mode.d.ts +0 -15
  49. package/dist/render/lib/wheels/set-mode.js +1 -1
  50. package/dist/routine-index.json +1 -1
  51. package/dist/value-index.json +1 -1
  52. package/dist/words.d.ts +6 -4
  53. package/dist/words.js +4 -4
  54. package/package.json +2 -2
  55. package/dist/chunks/SiteEditorProvider-WQG3BNYV.js +0 -1
  56. package/dist/chunks/chunk-N64MDCTX.js +0 -9
  57. package/dist/render/lib/sections/grid-no-hole.d.ts +0 -17
  58. package/dist/render/lib/sections/grid-no-hole.js +0 -1
  59. /package/dist/chunks/{chunk-VRXNUWWF.js → chunk-AUQKCN7Q.js} +0 -0
  60. /package/dist/chunks/{chunk-FP652PBZ.js.LEGAL.txt → chunk-B22AOLEU.js.LEGAL.txt} +0 -0
  61. /package/dist/chunks/{chunk-INU4IUCT.js.LEGAL.txt → chunk-EHNNMX2W.js.LEGAL.txt} +0 -0
  62. /package/dist/chunks/{chunk-XSDGCHJH.js → chunk-PN7RMJTO.js} +0 -0
  63. /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 e=[...n.matchAll(/(?:^|\s)(max-[\w[\]-]+):grid-cols-(\d+)(?=\s|$)/g)].flatMap(t=>{const r=x(t[1]);return r?.max?[{below:r.px,columns:Number(t[2])}]:[]}).sort((t,r)=>r.below-t.below);return{base:Number(o[1]),steps:e}}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(e=>({below:e.below,columns:f(e.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,e={}){const t=w(o);return p(n,o,e,(r,i,u)=>[`${r}{${b(u,t)}}`])}function p(n,o,{limit:e,cards:t},r){const i=$(o),u=typeof e=="number"&&e>0?e:void 0,d=Math.max(i.base,...i.steps.map(s=>s.columns));if(t!==void 0&&Math.min(t,u??1/0)>=d)return"";const a=[];for(const s of R(i)){const m=u===void 0?s.columns:f(s.columns,u),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,e){return[`${n}{grid-template-columns:repeat(${2*o},minmax(0,1fr))}`,`${n}>*{grid-column:span 2}`,`${n}>:first-child{grid-column:${o-e+1}/span 2}`]}function A(n,o,e={}){return p(n,o,e,g)}function R({base:n,steps:o}){return[{min:o[0]?.below,max:void 0,columns:n},...o.map((e,t)=>({min:o[t+1]?.below,max:e.below,columns:e.columns}))]}function k(n,o){if(o.length===0)return"";const e=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 e?`@media ${e}{${o.join("")}}`:o.join("")}export{h as CARD_TRACKS_CLASS,A as centerRowCss,M as fillRow,f as fillRowColumns,T as fillRowCss,R as gridBands,$ as gridColumnsOf,b as gridTracks,w as hasCardTracks,k as inBand};
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{parseOption as s}from"efficient-shell/format";import{WHEELS_PER_SET as r}from"../commerce.js";function a(e){return(e.components??[]).reduce((o,u)=>o+u.wheels,0)>r}function m(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(a)}const c=150,i="Front + rear",O="Directional pair",T="Standard";function l(e){return e.et==null||e.rearEt==null?0:Math.abs(e.rearEt-e.et)}function n(e){return l(e)>=c}function D(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(n)}function p(e){return e.directional===!0}function d(e){return e.kind==="staggered"}function I(e){return e.rearWidth!=null||e.rearEt!=null&&e.rearEt!==e.et}function P(e){return{twoObjects:n(e),handed:p(e),staggered:d(e)}}function b(e){return{twoObjects:E(e),handed:e.handed??!1,staggered:!1}}function g(e){return e.twoObjects?i:null}function W(e){return e.handed}function x(e){return new Set((e.components??[]).map(t=>t.partNumber)).size>1}function H(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(x)}function E(e){return(e.setWheelCount??0)>r}const S=new Set(["boltPattern"]);function y(e,t){return e&&S.has(t)}function C(e,t){return!e?.srcRight||!t||t!==e.src?null:e.srcRight}const f="per wheel";function L(e,t){return t?`${e} ${f}`:e}const _=[{label:"Pair",value:"pair"},{label:"One wheel",value:"one"}],h="pair";function N(e){return s(_,h,e)}export{i as AXLE_WORDS,O as HAND_WORDS,T as NOT_HANDED_WORDS,f as PER_WHEEL_UNIT,h as SET_PICTURE_DEFAULT,_ as SET_PICTURE_POINTS,c as TWO_OBJECT_ET_SPREAD_MM,N as parseSetPicture,H as productHasComposedRender,m as productIsDually,D as productIsTwoObjects,g as setBuildLabel,W as setIsWide,C as setSecondSrc,y as setSuppressesRow,E as summaryIsDually,b as summarySetBuild,l as variantEtSpread,x as variantHasComposedRender,I as variantHasDistinctRear,a as variantIsDually,p as variantIsHanded,d as variantIsStaggered,n as variantIsTwoObjects,P as variantSetBuild,L as wheelCardPriceLine};
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};