efficient-storefront-blocks 0.126.3 → 0.126.5
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 +24 -0
- package/dist/chunks/{CustomHtmlCodeWindow-LBWGRQID.js → CustomHtmlCodeWindow-KYIRVDW4.js} +1 -1
- package/dist/chunks/{EditorPreviewCheckout-PWVUKVPS.js → EditorPreviewCheckout-LFT3ZXWA.js} +1 -1
- package/dist/chunks/SiteEditorProvider-WQG3BNYV.js +1 -0
- package/dist/chunks/{chunk-BLDYFJQ6.js → chunk-5LNWW4W3.js} +1 -1
- package/dist/chunks/{chunk-CKAOUQ5E.js → chunk-FP652PBZ.js} +1 -1
- package/dist/chunks/{chunk-JYZ42RYY.js → chunk-INU4IUCT.js} +3 -3
- package/dist/chunks/{chunk-3ZZ3Z6U5.js → chunk-KNFNQXH3.js} +1 -1
- package/dist/chunks/{chunk-SI2DLHOL.js → chunk-LFKRQYYH.js} +1 -1
- package/dist/chunks/{chunk-ADYUBBPE.js → chunk-N64MDCTX.js} +1 -1
- package/dist/chunks/{chunk-VUFE7ACW.js → chunk-WFSVFVZX.js} +1 -1
- package/dist/chunks/{chunk-WR3AVDA5.js → chunk-WZCQINHM.js} +1 -1
- package/dist/chunks/{fitment-data-VOATE5L5.js → fitment-data-GPEMPASJ.js} +1 -1
- package/dist/chunks/{section-css-style-42PP2TPA.js → section-css-style-UICZZ7D5.js} +1 -1
- package/dist/index.js +27 -27
- package/dist/render/app/globals.css +12 -10
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/GridCardTemplate.js +1 -1
- package/dist/render/lib/chat-socket.d.ts +1 -0
- package/dist/render/lib/chat-socket.js +1 -1
- package/dist/routine-index.json +1 -1
- package/dist/value-index.json +1 -1
- package/dist/words.d.ts +3 -2
- package/dist/words.js +1 -1
- package/package.json +2 -2
- package/dist/chunks/SiteEditorProvider-73GAIF7L.js +0 -1
- /package/dist/chunks/{chunk-D5HXXBSX.js → chunk-DIX2FLX7.js} +0 -0
- /package/dist/chunks/{chunk-CKAOUQ5E.js.LEGAL.txt → chunk-FP652PBZ.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{chunk-JYZ42RYY.js.LEGAL.txt → chunk-INU4IUCT.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{chunk-OHEU7JQW.js → chunk-VRXNUWWF.js} +0 -0
- /package/dist/chunks/{chunk-ZV2GXEDX.js → chunk-XSDGCHJH.js} +0 -0
|
@@ -4381,15 +4381,17 @@ em.text-accent {
|
|
|
4381
4381
|
isolation: isolate;
|
|
4382
4382
|
background-image: var(--sf-card-studio-ground);
|
|
4383
4383
|
}
|
|
4384
|
-
/* Show next image
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4384
|
+
/* Show next image of a RENDERING (`data-hover-fit="contain"`): the layer
|
|
4385
|
+
covers the whole picture box, so it paints the same ellipse (opaque, over
|
|
4386
|
+
the card's flat ground colour the layer is handed), holds the next
|
|
4387
|
+
rendering where the wheel sits, at its size (no zoom, no crop), and draws
|
|
4388
|
+
the same floor shadows on itself (below). A product PHOTO (fit cover) is
|
|
4389
|
+
left as the layer draws it: it covers the whole picture box. */
|
|
4390
|
+
.sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media][data-hover-fit="contain"] {
|
|
4389
4391
|
isolation: isolate;
|
|
4390
4392
|
background-image: var(--sf-card-studio-ground);
|
|
4391
4393
|
}
|
|
4392
|
-
.sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media] > img {
|
|
4394
|
+
.sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media][data-hover-fit="contain"] > img {
|
|
4393
4395
|
position: absolute;
|
|
4394
4396
|
left: 11.5cqw;
|
|
4395
4397
|
top: 28.6cqw;
|
|
@@ -4410,8 +4412,8 @@ em.text-accent {
|
|
|
4410
4412
|
}
|
|
4411
4413
|
.sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"])::before,
|
|
4412
4414
|
.sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"])::after,
|
|
4413
|
-
.sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media]::before,
|
|
4414
|
-
.sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media]::after {
|
|
4415
|
+
.sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media][data-hover-fit="contain"]::before,
|
|
4416
|
+
.sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media][data-hover-fit="contain"]::after {
|
|
4415
4417
|
content: "";
|
|
4416
4418
|
position: absolute;
|
|
4417
4419
|
z-index: -1;
|
|
@@ -4419,7 +4421,7 @@ em.text-accent {
|
|
|
4419
4421
|
}
|
|
4420
4422
|
/* The wide, faint shadow (`.s2`): 142% of the wheel wide, 1:5. */
|
|
4421
4423
|
.sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"])::before,
|
|
4422
|
-
.sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media]::before {
|
|
4424
|
+
.sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media][data-hover-fit="contain"]::before {
|
|
4423
4425
|
left: -2.36cqw;
|
|
4424
4426
|
top: 96.41cqw;
|
|
4425
4427
|
width: 109.34cqw;
|
|
@@ -4429,7 +4431,7 @@ em.text-accent {
|
|
|
4429
4431
|
}
|
|
4430
4432
|
/* The near, darker shadow (`.s1`): the wheel's width, 1:6. */
|
|
4431
4433
|
.sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"])::after,
|
|
4432
|
-
.sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media]::after {
|
|
4434
|
+
.sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-hover-media][data-hover-fit="contain"]::after {
|
|
4433
4435
|
left: 14.58cqw;
|
|
4434
4436
|
top: 95.85cqw;
|
|
4435
4437
|
width: 77cqw;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,Fragment as x,jsxs as P}from"react/jsx-runtime";import{createContext as D,useContext as E,useMemo as y}from"react";import{parseOption as
|
|
1
|
+
"use client";import{jsx as t,Fragment as x,jsxs as P}from"react/jsx-runtime";import{createContext as D,useContext as E,useMemo as y}from"react";import{parseOption as v}from"efficient-shell/format";import{CardRowContext as G,CardTemplateRows as p,useCardRow as L}from"efficient-web-builder/render/components/CardRowContext";import{InsideSiteColumn as k}from"efficient-web-builder/render/components/SiteGutterFrame";import{SECTION_FILL_PASS_CLASS as N}from"efficient-web-builder/format/lib/content/section-min-height";import{cardHoverOf as F}from"efficient-web-builder/format/lib/animation/hover";import{pickHoverMedia as U}from"efficient-web-builder/format/lib/content/hover-media";import W from"efficient-web-builder/render/components/HoverMediaLayer";import{NO_FIELD_ANSWERS as h}from"../lib/content/field-usage.js";import{CARD_IMAGE_SIZES as j}from"../lib/sections/card-image-sizes.js";import{productTone as $,productToneVaried as H,randomCardColour as R}from"../lib/sections/card-tone.js";import{CardLookContext as C}from"./card-pieces/card-row.js";import{CardBuyDialog as B}from"./card-pieces/CardBuyButton.js";import M from"./card-pieces/CardSurfaceFrame.js";import{BundleCardStateProvider as V,TyreCardStateProvider as z,useProductCardState as b,useWheelCardState as _,WheelCardStateProvider as q,tyreCardProduct as Y}from"./card-pieces/ProductCardState.js";import{tyrePagePath as K}from"../lib/tyres/tyre-page-path.js";import{say as X}from"efficient-web-builder/format/lib/editor-words";import{CARD_INDEX_OPTIONS as J,cardIndexCss as Q}from"efficient-web-builder/format/lib/sections/product-card-style";import{SHARED_ROWS_LIST_CLASS as Z}from"efficient-web-builder/render/lib/content/box-shared-columns";import{GAP_ZONE_CLASS as ee}from"efficient-web-builder/format/lib/content/container-gap";import{CARD_ROWS_GRID_CLASS as re,cardRowsGap as oe,cardRowsGridStyle as te}from"./WheelCardFrame.js";import{blockParts as ne}from"../lib/block-parts.js";const ae=ne("ProductCard");function Qe(e){return J.map(({value:r})=>r==="off"?"":Q(e,r).replace(".sf-card-index::before",`.sf-card-index[data-format="${r}"]::before`)).join("")}function Ze(e){return e.className.includes(ee)?{className:`${e.className} ${re} ${Z}`,style:{...e.style,...te(oe(e))}}:e}const se={sale:!1,axleSets:!0,setTotal:!1,wasFollowsSize:!1,quoteSets:!0,showSingle:!1,armOnContact:!1},er={sale:!0,axleSets:!1,setTotal:!0,wasFollowsSize:!0,quoteSets:!1,showSingle:!0,armOnContact:!0},de={kindLabel:null,brand:!1,process:!0,tyreBrand:!0},ie=[],le=[{label:"Flat",value:"flat"},{label:"Soft grey",value:"soft"},{label:"Studio",value:"studio"}],ce={flat:"",soft:"sf-card-ground-soft",studio:"sf-card-ground-studio"},rr=e=>v(le.map(r=>r.value),"flat",e),ue=[{label:"Under the picture",value:"under"},{label:"Over the picture",value:"over"}],or=e=>v(ue.map(r=>r.value),"under",e),fe="sf-card-words-over",T={ownerId:"",ownerType:"ProductGrid",Template:void 0,hover:F({},"ProductGrid"),imageSizes:j,fieldUsage:h,tyreFieldUsage:h,reserveEyebrow:!1,editing:!1,eyebrow:de,fit:null,colours:ie,rules:se,ground:"flat",words:"under"},O=D(T);function f(){return E(O)}function tr({value:e,children:r}){const o=y(()=>({...T,...me(e)}),[e]);return t(O.Provider,{value:o,children:r})}const me=e=>Object.fromEntries(Object.entries(e).filter(([,r])=>r!==void 0));function w(e,r){const o=e.designCode??e.slug??"";return{name:e.name??"",eyebrow:e.process??"",note:"",href:e.slug?`/wheels/${e.slug}`:"",colour:$(r),colourVaried:H(r,o),colourRandom:R(o)}}function pe(e){const r=e.designCode||e.slug||"";return{name:e.name??"",eyebrow:e.brand??"",note:"",href:K(e.slug)??"",colour:"",colourVaried:"",colourRandom:R(r)}}const I=e=>`/bundles/${e.slug}`;function Ce(e){return{name:e.name,eyebrow:"",note:e.subtitle??"",href:I(e),colour:"",colourVaried:"",colourRandom:""}}const we="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)]",Se="sf-card group relative flex flex-col border border-line bg-bg transition-colors hover:border-accent",ge="col-span-2 max-view-wide:col-span-1 @max-[720px]:col-span-1 [&:has([data-set-picture=one])]:col-span-1",xe=`relative flex-1 ${N}`;function S({copy:e,href:r,label:o,wide:n=!1,kit:a=!1,probes:s,arm:m,layer:c}){const{editing:i,ground:d,words:u}=f(),l=[ce[d],u==="over"?fe:""].filter(Boolean);return t(M,{surface:a?Se:[we,...l].join(" "),span:n?ge:void 0,href:r,label:o,linked:!i,probes:s,arm:m,layer:c,children:t("div",{className:xe,...ae("card-content"),children:t(k,{children:e})})})}const ye="var(--card-bg)";function ve(e,r=ye){const o=he();return!o||o.cover!==e||!o.media?null:t(W,{media:o.media,cover:e,ground:r})}function he(){const{hover:e}=f(),r=b();if(e.kind!=="nextImage"||!e.media||r.kind!=="wheel")return null;const o=r.sel.finish?.name,n=Re(r.wheel,o);return{cover:e.media.cover,media:U(n,e.media,o)}}function Re(e,r){const o=e.finishes?.find(a=>a.name===r),n=o?.angles?.length?o.angles:r&&r===e.defaultFinish?e.defaultFinishRenderings??[]:[];return{...e,finishes:r?[{name:r,angles:n.slice(1)}]:[]}}function be({children:e}){const r=L(),{wheel:o,sel:n}=_(),a=n.finish?.color,s=y(()=>r?{...r,row:w(o,a)}:null,[r,o,a]);return s?t(G.Provider,{value:s,children:e}):t(x,{children:e})}function _e({copy:e}){const{wheel:r,sel:o,isSet:n}=_(),{rules:a}=f(),s=ve("card");return P(x,{children:[t(S,{copy:t(be,{children:e}),href:r.slug?`/wheels/${r.slug}`:"",label:r.name,wide:n,probes:o.probes,arm:a.armOnContact?o.arm:void 0,layer:s}),t(B,{})]})}function A(e,r,o,n){const a=r.item;return t(q,{wheel:a,colours:o.colours,defaultFinish:n?.[r.index],editing:o.editing,children:t(C.Provider,{value:"catalog",children:t(_e,{copy:e})})})}function nr({wheels:e,finishes:r,children:o}){const n=f(),{ownerId:a,ownerType:s,Template:m,editing:c}=n;return t(p,{ownerId:a,ownerType:s,Template:m,rows:e.map(i=>w(i)),items:e,fallback:c?t(g,{}):null,wrapCopy:(i,d)=>A(i,d,n,r),children:o})}function ar({items:e,tyreOf:r,tyreFit:o}){const n=f(),{ownerId:a,ownerType:s,Template:m,editing:c}=n,i=e.map(d=>r(d));return t(p,{ownerId:a,ownerType:s,Template:m,rows:e.map((d,u)=>{const l=i[u];return l?pe(l):w(d)}),items:e,fallback:c?t(g,{}):null,wrapCopy:(d,u)=>{const l=i[u.index];return l?Oe(d,Y(l,o?.(l)??null),c):A(d,u,n)},children:d=>d})}function Te({copy:e}){const r=b();if(r.kind!=="tyre")throw new Error("A tyre card surface was drawn outside its tyre state.");return t(S,{copy:e,href:r.pagePath??"",label:r.tyre.name,arm:r.arm})}function Oe(e,r,o){return t(z,{tyre:r,editing:o,children:t(C.Provider,{value:"catalog",children:t(Te,{copy:e})})})}function Ie(e,r){const o=r.item;return t(V,{bundle:o,children:t(C.Provider,{value:"catalog",children:t(S,{copy:e,href:I(o),label:o.name,kit:!0})})})}function sr({bundles:e,children:r}){const{ownerId:o,ownerType:n,Template:a,editing:s}=f();return t(p,{ownerId:o,ownerType:n,Template:a,rows:e.map(Ce),items:e,fallback:s?t(g,{}):null,wrapCopy:Ie,children:r})}function g(){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:X("The card is empty. Add parts to its card template in Layers.")})}export{le as CARD_GROUNDS,ue as CARD_WORDS,fe as CARD_WORDS_OVER_CLASS,se as GRID_CARD_RULES,sr as GridBundleCards,tr as GridCardProvider,nr as GridCards,ar as GridMixedCards,er as LISTING_CARD_RULES,Ce as bundleCardRow,I as bundlePagePath,rr as cardGroundOf,Re as cardHoverRow,Ze as cardRowsGrid,or as cardWordsOf,Qe as gridIndexCss,w as productCardRow,pe as tyreCardRow,ve as useCardHoverLayer,f as useGridCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{API_URL as
|
|
1
|
+
import{API_URL as S}from"./api/index.js";function f(){return(S||(typeof window<"u"?window.location.origin:"")).replace(/^http/,"ws")}const m="efficient-access-token",_="efficient-chat-guest";function h(t,e){const n=`${f()}/ws/chat/?conversation=${encodeURIComponent(t)}`;return e.access?{url:n,protocols:[m,e.access]}:e.guest?{url:n,protocols:[_,e.guest]}:{url:n,protocols:[]}}function O(t,e){return`${f()}/ws/chat/?conversation=${t}&token=${encodeURIComponent(e)}`}const g=new Set(["employee","system"]);function k(t){if(typeof t!="string")return!1;try{const e=JSON.parse(t);return e.type==="chat_event"&&e.event==="message"&&typeof e.payload?.sender_role=="string"&&g.has(e.payload.sender_role)}catch{return!1}}function T({conversationId:t,credential:e,token:n,onFrame:u}){let s=!1,o=null,c,r=3e3;const a=()=>{if(s)return;const{url:l,protocols:p}=e?h(t,e()):{url:O(t,n?.()??""),protocols:[]};o=new WebSocket(l,p),o.onopen=()=>{r=3e3},o.onmessage=i=>u(i.data),o.onclose=()=>{s||(c=setTimeout(a,r),r=Math.min(r*2,3e4))},o.onerror=()=>o?.close()};return a(),()=>{s=!0,c&&clearTimeout(c),o?.close()}}export{m as ACCESS_TOKEN_SUBPROTOCOL,_ as GUEST_TOKEN_SUBPROTOCOL,h as chatSocketTarget,O as chatSocketUrl,k as isOffStreamMessage,T as openChatSocket};
|