efficient-storefront-blocks 0.125.22 → 0.126.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 +11 -0
- package/dist/chunks/{CustomHtmlCodeWindow-LITJEQFG.js → CustomHtmlCodeWindow-LBWGRQID.js} +1 -1
- package/dist/chunks/{EditorPreviewCheckout-LRPANZRI.js → EditorPreviewCheckout-PWVUKVPS.js} +1 -1
- package/dist/chunks/SiteEditorProvider-73GAIF7L.js +1 -0
- package/dist/chunks/{chunk-PVRWP47B.js → chunk-3ZZ3Z6U5.js} +1 -1
- package/dist/chunks/{chunk-YOF4KT5H.js → chunk-ADYUBBPE.js} +1 -1
- package/dist/chunks/{chunk-ZHEHF42C.js → chunk-BLDYFJQ6.js} +1 -1
- package/dist/chunks/{chunk-TT3AZYTK.js → chunk-CKAOUQ5E.js} +1 -1
- package/dist/chunks/chunk-JYZ42RYY.js +337 -0
- package/dist/chunks/{chunk-ESKHLPB5.js → chunk-SI2DLHOL.js} +1 -1
- package/dist/chunks/{chunk-TMSNT2CP.js → chunk-VUFE7ACW.js} +1 -1
- package/dist/chunks/{chunk-DQ2TQC5H.js → chunk-WR3AVDA5.js} +1 -1
- package/dist/chunks/{fitment-data-FJ3MIJXK.js → fitment-data-VOATE5L5.js} +1 -1
- package/dist/chunks/{section-css-style-JQZMV74P.js → section-css-style-42PP2TPA.js} +1 -1
- package/dist/editor/lib/storefront-editor-words.d.ts +1 -0
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/index.js +26 -26
- package/dist/render/app/globals.css +76 -0
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/GridCardTemplate.d.ts +3 -0
- package/dist/render/components/GridCardTemplate.js +1 -1
- package/dist/routine-index.json +1 -1
- package/dist/value-index.json +1 -1
- package/dist/words.d.ts +4 -0
- package/dist/words.js +3 -3
- package/package.json +2 -2
- package/dist/chunks/SiteEditorProvider-FT3P5QZM.js +0 -1
- package/dist/chunks/chunk-EEHSAQWF.js +0 -337
- /package/dist/chunks/{chunk-TT3AZYTK.js.LEGAL.txt → chunk-CKAOUQ5E.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{chunk-LY7GZJ6M.js → chunk-D5HXXBSX.js} +0 -0
- /package/dist/chunks/{chunk-EEHSAQWF.js.LEGAL.txt → chunk-JYZ42RYY.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{chunk-G5LEO2F2.js → chunk-OHEU7JQW.js} +0 -0
- /package/dist/chunks/{chunk-DFYWYSOT.js → chunk-ZV2GXEDX.js} +0 -0
|
@@ -4340,6 +4340,82 @@ em.text-accent {
|
|
|
4340
4340
|
);
|
|
4341
4341
|
}
|
|
4342
4342
|
|
|
4343
|
+
/* ─── "Card ground: Studio" (Product Grid; INOVIT home design 2026-11-18) ───
|
|
4344
|
+
The card's picture as the approved home design draws it: a 10:13 picture
|
|
4345
|
+
on a soft grey ellipse, the wheel a little below its middle, and a shadow
|
|
4346
|
+
on the floor under the wheel (not round it); the card itself has no
|
|
4347
|
+
surface, so its words stand on the page under the picture. A choice of
|
|
4348
|
+
the grid (GridCardTemplate `CARD_GROUNDS`); Flat (the default) and Soft
|
|
4349
|
+
grey never draw this class, so no card that exists moves.
|
|
4350
|
+
The ground is on the PICTURE's box (the box that holds the Picture part,
|
|
4351
|
+
found by what it holds, as "Words: Over the picture" finds it), and the
|
|
4352
|
+
wheel is placed in that box: the well between them steps aside
|
|
4353
|
+
(`position: static`), so a Show next image layer covers the whole picture.
|
|
4354
|
+
The numbers are the design file's own (mockups/inovit-home-top-2026-11-18,
|
|
4355
|
+
`.pph`, `.st`, `.s1`, `.s2`), written in the box's width (`cqw`): the
|
|
4356
|
+
wheel is 77% of the box wide, 11.5% in from the left and 22% of the box's
|
|
4357
|
+
height down. The two floor shadows sit at the wheel's foot; their blur is
|
|
4358
|
+
the design's px. The box's Padding row stays the merchant's: at 0 the
|
|
4359
|
+
picture is edge to edge, as designed.
|
|
4360
|
+
The greys are the ground with a little of the text mixed in (3.6%, 8.5%,
|
|
4361
|
+
11.5%: on a white page with near-black text, the design's #f6, #eb, #e4),
|
|
4362
|
+
and the shadows are the text colour, faded. They are mixed on the card,
|
|
4363
|
+
so a card in a themed section mixes that section's colours, and no colour
|
|
4364
|
+
is typed. The shadows sit under the box's children (`isolation` and
|
|
4365
|
+
z-index -1). */
|
|
4366
|
+
.sf-card-ground-studio,
|
|
4367
|
+
.sf-card-ground-studio:hover {
|
|
4368
|
+
background-color: transparent;
|
|
4369
|
+
}
|
|
4370
|
+
.sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) {
|
|
4371
|
+
position: relative;
|
|
4372
|
+
aspect-ratio: 10 / 13;
|
|
4373
|
+
container-type: inline-size;
|
|
4374
|
+
isolation: isolate;
|
|
4375
|
+
background-image: radial-gradient(
|
|
4376
|
+
ellipse at 50% 42%,
|
|
4377
|
+
color-mix(in oklab, var(--bg) 96.4%, var(--fg)) 0%,
|
|
4378
|
+
color-mix(in oklab, var(--bg) 91.5%, var(--fg)) 75%,
|
|
4379
|
+
color-mix(in oklab, var(--bg) 88.5%, var(--fg)) 100%
|
|
4380
|
+
);
|
|
4381
|
+
}
|
|
4382
|
+
.sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-part="image-frame"] {
|
|
4383
|
+
position: static;
|
|
4384
|
+
margin: 0;
|
|
4385
|
+
}
|
|
4386
|
+
.sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"]) [data-part="image-frame"] > [data-part="image"] {
|
|
4387
|
+
position: absolute;
|
|
4388
|
+
left: 11.5cqw;
|
|
4389
|
+
top: 28.6cqw;
|
|
4390
|
+
width: 77cqw;
|
|
4391
|
+
height: 77cqw;
|
|
4392
|
+
}
|
|
4393
|
+
.sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"])::before,
|
|
4394
|
+
.sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"])::after {
|
|
4395
|
+
content: "";
|
|
4396
|
+
position: absolute;
|
|
4397
|
+
z-index: -1;
|
|
4398
|
+
pointer-events: none;
|
|
4399
|
+
}
|
|
4400
|
+
/* The wide, faint shadow (`.s2`): 142% of the wheel wide, 1:5. */
|
|
4401
|
+
.sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"])::before {
|
|
4402
|
+
left: -2.36cqw;
|
|
4403
|
+
top: 96.41cqw;
|
|
4404
|
+
width: 109.34cqw;
|
|
4405
|
+
height: 21.87cqw;
|
|
4406
|
+
background: radial-gradient(closest-side, color-mix(in srgb, var(--fg) 17%, transparent), transparent);
|
|
4407
|
+
filter: blur(16px);
|
|
4408
|
+
}
|
|
4409
|
+
/* The near, darker shadow (`.s1`): the wheel's width, 1:6. */
|
|
4410
|
+
.sf-card-ground-studio [data-part="box"]:has(> * > [data-part="image-block"])::after {
|
|
4411
|
+
left: 14.58cqw;
|
|
4412
|
+
top: 95.85cqw;
|
|
4413
|
+
width: 77cqw;
|
|
4414
|
+
height: 12.83cqw;
|
|
4415
|
+
background: radial-gradient(closest-side, color-mix(in srgb, var(--fg) 40%, transparent), transparent);
|
|
4416
|
+
filter: blur(9px);
|
|
4417
|
+
}
|
|
4418
|
+
|
|
4343
4419
|
/* ─── "Words: Over the picture" (Product Grid; INOVIT /wheels design 2026-11-18) ───
|
|
4344
4420
|
The card's words sit at the foot of the card, on the picture's ground,
|
|
4345
4421
|
and the wheel sits in the space above them. A choice of the grid
|
|
@@ -55,6 +55,9 @@ export declare const CARD_GROUNDS: readonly [{
|
|
|
55
55
|
}, {
|
|
56
56
|
readonly label: "Soft grey";
|
|
57
57
|
readonly value: "soft";
|
|
58
|
+
}, {
|
|
59
|
+
readonly label: "Studio";
|
|
60
|
+
readonly value: "studio";
|
|
58
61
|
}];
|
|
59
62
|
export type CardGround = (typeof CARD_GROUNDS)[number]["value"];
|
|
60
63
|
export declare const cardGroundOf: (v: unknown) => CardGround;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,Fragment as x,jsxs 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 h}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 v}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=>h(le.map(r=>r.value),"flat",e),ue=[{label:"Under the picture",value:"under"},{label:"Over the picture",value:"over"}],or=e=>h(ue.map(r=>r.value),"under",e),me="sf-card-words-over",T={ownerId:"",ownerType:"ProductGrid",Template:void 0,hover:F({},"ProductGrid"),imageSizes:j,fieldUsage:v,tyreFieldUsage:v,reserveEyebrow:!1,editing:!1,eyebrow:de,fit:null,colours:ie,rules:se,ground:"flat",words:"under"},O=D(T);function m(){return E(O)}function tr({value:e,children:r}){const o=y(()=>({...T,...fe(e)}),[e]);return t(O.Provider,{value:o,children:r})}const fe=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:f,layer:c}){const{editing:i,ground:d,words:u}=m(),l=[ce[d],u==="over"?me:""].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:f,layer:c,children:t("div",{className:xe,...ae("card-content"),children:t(k,{children:e})})})}const ye="var(--card-bg)";function he(e,r=ye){const o=ve();return!o||o.cover!==e||!o.media?null:t(W,{media:o.media,name:o.name,cover:e,ground:r})}function ve(){const{hover:e}=m(),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,name:r.wheel.name,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}=m(),s=he("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=m(),{ownerId:a,ownerType:s,Template:f,editing:c}=n;return t(p,{ownerId:a,ownerType:s,Template:f,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=m(),{ownerId:a,ownerType:s,Template:f,editing:c}=n,i=e.map(d=>r(d));return t(p,{ownerId:a,ownerType:s,Template:f,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}=m();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,me 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,he as useCardHoverLayer,m as useGridCard};
|