efficient-storefront-blocks 0.133.10 → 0.133.11
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 +7 -0
- package/dist/editor/lib/document/blocks/service/SiteFooter/fields.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 +24 -24
- package/dist/render/app/globals.css +17 -0
- package/dist/render/components/SectionGroupBody.d.ts +2 -1
- package/dist/render/components/SectionGroupBody.js +1 -1
- package/dist/render/lib/content/footer-reveal.d.ts +5 -0
- package/dist/render/lib/content/footer-reveal.js +1 -1
- package/dist/render/lib/document/blocks/service/SiteFooter/render.js +1 -1
- package/dist/routine-index.json +1 -1
- package/dist/value-index.json +1 -1
- package/dist/words.d.ts +1 -0
- package/dist/words.js +1 -1
- package/package.json +1 -1
|
@@ -4811,3 +4811,20 @@ main.sf-themed-content ~ :has([data-footer-reveal="on"]) {
|
|
|
4811
4811
|
bottom: 0;
|
|
4812
4812
|
z-index: 0;
|
|
4813
4813
|
}
|
|
4814
|
+
|
|
4815
|
+
/* The reveal's `Page shadow` (lib/content/footer-reveal): a shadow from the
|
|
4816
|
+
page's bottom edge down over the footer's words, 160 px deep. It is drawn by
|
|
4817
|
+
<main>, which sits above the footer, so it falls ON the words. Its strength
|
|
4818
|
+
is set on the page root from how much page is left, so it fades out over
|
|
4819
|
+
the last 160 px and the footer's top row is clear at the end. */
|
|
4820
|
+
body:has([data-footer-shadow="on"]) main.sf-themed-content::after {
|
|
4821
|
+
content: "";
|
|
4822
|
+
position: absolute;
|
|
4823
|
+
left: 0;
|
|
4824
|
+
right: 0;
|
|
4825
|
+
top: 100%;
|
|
4826
|
+
height: 160px;
|
|
4827
|
+
pointer-events: none;
|
|
4828
|
+
background: linear-gradient(180deg, color-mix(in srgb, var(--overlay-scrim) 85%, transparent) 0, transparent 100%);
|
|
4829
|
+
opacity: var(--sf-footer-shadow, 1);
|
|
4830
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SlotComponent } from "efficient-easel/blocks";
|
|
2
|
-
export default function SectionGroupBody({ place, sections: Sections, editing, widths, navTextCase, menuRow, toolTextStyle, iconSize, cartIcon, revealOnScroll, }: {
|
|
2
|
+
export default function SectionGroupBody({ place, sections: Sections, editing, widths, navTextCase, menuRow, toolTextStyle, iconSize, cartIcon, revealOnScroll, revealShadow, }: {
|
|
3
3
|
place: "header" | "footer";
|
|
4
4
|
sections: SlotComponent;
|
|
5
5
|
editing?: boolean;
|
|
@@ -10,4 +10,5 @@ export default function SectionGroupBody({ place, sections: Sections, editing, w
|
|
|
10
10
|
iconSize?: unknown;
|
|
11
11
|
cartIcon?: unknown;
|
|
12
12
|
revealOnScroll?: unknown;
|
|
13
|
+
revealShadow?: unknown;
|
|
13
14
|
}): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as s}from"react/jsx-runtime";import{useEffect as w,useState as y}from"react";import{PhoneMenuToolsProvider as _}from"efficient-web-builder/render/components/PhoneMenuTools";import{AccountInPhoneMenuProvider as b}from"./PhoneMenuAccount.js";import{SectionGroupWidthsProvider as A}from"efficient-web-builder/render/components/SiteGutterFrame";import{chromeOwnWidth as H}from"efficient-web-builder/format/lib/content/section-width";import{centredCap as P,SITE_WIDTH_CAP as L}from"efficient-web-builder/format/lib/content/page-width";import{resolveHeaderToolLook as x,resolveMenuRow as k,resolveNavTextCase as z}from"../lib/content/header-bar.js";import{HeaderToolLookContext as F}from"./HeaderTools.js";import{HideTaker as W}from"efficient-web-builder/render/components/ViewHideRoot";import{textKindVars as C}from"../lib/content/text-kind-vars.js";import{blockParts as p}from"../lib/block-parts.js";import{FOOTER_REVEAL_ATTR as M,FOOTER_SHADOW_ATTR as V,FOOTER_SHADOW_VAR as E,footerRevealOn as D,footerRevealWanted as j,footerShadowStrength as I,footerShadowWanted as B}from"../lib/content/footer-reveal.js";const G=p("SiteHeader")("header-content"),N=p("SiteFooter")("footer"),Y={font:"--sf-header-tool-font",size:"--sf-header-tool-size"};function q(e){const o=C(e,Y);return Object.keys(o).length?o:null}function K(e,o){const t=j(e)&&!o,[a,d]=y(!1);return w(()=>{if(!t){d(!1);return}const i=document.querySelector('[data-section-group="footer"]');if(!i)return;const n=()=>d(D(e,i.getBoundingClientRect().height,window.innerHeight,o));n(),window.addEventListener("resize",n);const l=typeof ResizeObserver>"u"?null:new ResizeObserver(n);return l?.observe(i),()=>{window.removeEventListener("resize",n),l?.disconnect()}},[t,e,o]),a}function $(e){w(()=>{if(!e)return;const o=document.documentElement,t=()=>o.style.setProperty(E,String(I(o.scrollHeight-(window.scrollY+window.innerHeight))));return t(),window.addEventListener("scroll",t,{passive:!0}),window.addEventListener("resize",t),()=>{window.removeEventListener("scroll",t),window.removeEventListener("resize",t),o.style.removeProperty(E)}},[e])}function J({place:e,sections:o,editing:t=!1,widths:a,navTextCase:d,menuRow:i,toolTextStyle:n,iconSize:l,cartIcon:R,revealOnScroll:T,revealShadow:O}){const g=e==="footer"?"footer":"div",r=H(a),c=r.content==="full"?"100vw":r.contentMax===null?null:`${r.contentMax}px`,f=e==="footer"&&r.background==="content"?P(L):null,u=e==="header"?q(n):null,m=K(e==="footer"?T:void 0,t),h=m&&B(O);$(h);const S=c===null&&f===null&&u===null?void 0:{...f,...c===null?null:{"--sf-site-width":c},...u},v=s(W,{as:g,"data-section-group":e,...e==="header"?{"data-header-nav-case":z(d),"data-header-menu-row":k(i)??"top",...u?{"data-header-tool-style":String(n)}:null}:null,...m?{[M]:"on"}:null,...h?{[V]:"on"}:null,className:t&&e==="footer"?"sf-theme-surfaces bg-bg text-fg":void 0,style:S,...e==="header"?G:N,children:s(A,{value:{background:r.background,content:r.content==="content"?"content":null},children:s(o,{minEmptyHeight:120})})});return e==="header"?s(_,{children:s(b,{children:s(F.Provider,{value:x({cartIcon:R,iconSize:l}),children:v})})}):v}export{J as default};
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
export declare const FOOTER_REVEAL_ATTR = "data-footer-reveal";
|
|
2
2
|
export declare function footerRevealWanted(stored: unknown): boolean;
|
|
3
3
|
export declare function footerRevealOn(stored: unknown, footerHeight: number, windowHeight: number, editing: boolean): boolean;
|
|
4
|
+
export declare const FOOTER_SHADOW_ATTR = "data-footer-shadow";
|
|
5
|
+
export declare const FOOTER_SHADOW_VAR = "--sf-footer-shadow";
|
|
6
|
+
export declare const FOOTER_SHADOW_PX = 160;
|
|
7
|
+
export declare function footerShadowWanted(stored: unknown): boolean;
|
|
8
|
+
export declare function footerShadowStrength(left: number): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const f="data-footer-reveal";function n(t){return t===!0}function u(t,r,e,o){return!n(t)||o||!(r>0)||!(e>0)?!1:r<=e}const O="data-footer-shadow",s="--sf-footer-shadow",a=160;function R(t){return t===!0}function x(t){return Number.isNaN(t)?1:Math.min(1,Math.max(0,t/a))}export{f as FOOTER_REVEAL_ATTR,O as FOOTER_SHADOW_ATTR,a as FOOTER_SHADOW_PX,s as FOOTER_SHADOW_VAR,u as footerRevealOn,n as footerRevealWanted,x as footerShadowStrength,R as footerShadowWanted};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import s from"../../../../../components/SectionGroupBody.js";import{SiteFooterMeta as d}from"./meta.js";const c={...d,render:({sections:o,editor:e,revealOnScroll:r,revealShadow:t,...i})=>n(s,{place:"footer",sections:o,widths:i,editing:e?.isEditing,revealOnScroll:r,revealShadow:t})};export{c as SiteFooterRender};
|