efficient-storefront-blocks 0.125.6 → 0.125.8
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 +27 -0
- package/dist/chunks/{CustomHtmlCodeWindow-KAHNIUZO.js → CustomHtmlCodeWindow-ZSVS5DI6.js} +1 -1
- package/dist/chunks/{EditorPreviewCheckout-M5LLO3H2.js → EditorPreviewCheckout-NDZUORUC.js} +1 -1
- package/dist/chunks/SiteEditorProvider-CIZSA67M.js +1 -0
- package/dist/chunks/{chunk-UREPZPIT.js → chunk-3LWDFU5Y.js} +1 -1
- package/dist/chunks/{chunk-FD3ICZTF.js → chunk-HOKKFWPX.js} +1 -1
- package/dist/chunks/{chunk-L6MXM22Q.js → chunk-ICWPUDN3.js} +1 -1
- package/dist/chunks/{chunk-SQ6D33WV.js → chunk-R3WKYZOZ.js} +1 -1
- package/dist/chunks/{chunk-7ARO3R4C.js → chunk-RCOLM57Z.js} +1 -1
- package/dist/chunks/chunk-SPLS5ZLA.js +337 -0
- package/dist/chunks/{chunk-COR5IL6E.js → chunk-Y7DFVCVM.js} +1 -1
- package/dist/chunks/{chunk-4SIPG47B.js → chunk-YU4MIT6K.js} +1 -1
- package/dist/chunks/{fitment-data-BQFU5HN3.js → fitment-data-ANJWNG4T.js} +1 -1
- package/dist/chunks/{section-css-style-VF2FOE3B.js → section-css-style-7ROA6NKG.js} +1 -1
- package/dist/editor/lib/document/blocks/service/SiteHeader/fields.js +1 -1
- package/dist/editor/lib/storefront-editor-words.d.ts +2 -0
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/index.js +26 -26
- package/dist/render/app/globals.css +12 -0
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/BoxHeaderBar.d.ts +3 -1
- package/dist/render/components/BoxHeaderBar.js +1 -1
- package/dist/render/components/PublishedHeader.js +1 -1
- package/dist/render/lib/content/header-bar.d.ts +8 -0
- package/dist/render/lib/content/header-bar.js +1 -1
- package/dist/render/lib/document/blocks/service/SiteHeader/render.js +1 -1
- package/dist/render/lib/document/published-header-bar.d.ts +2 -0
- package/dist/render/lib/document/published-header-bar.js +1 -1
- package/dist/routine-index.json +1 -1
- package/dist/value-index.json +1 -1
- package/dist/words.d.ts +2 -0
- package/dist/words.js +1 -1
- package/package.json +2 -2
- package/dist/chunks/SiteEditorProvider-6P7LYLL2.js +0 -1
- package/dist/chunks/chunk-7SLHEYYR.js +0 -337
- /package/dist/chunks/{chunk-ECMYL3O7.js → chunk-3DDOV7FZ.js} +0 -0
- /package/dist/chunks/{chunk-UREPZPIT.js.LEGAL.txt → chunk-3LWDFU5Y.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{chunk-SB3V6PTJ.js → chunk-RJM55KDO.js} +0 -0
- /package/dist/chunks/{chunk-7SLHEYYR.js.LEGAL.txt → chunk-SPLS5ZLA.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{chunk-VYXOE5FY.js → chunk-SRHU2S3G.js} +0 -0
|
@@ -1054,6 +1054,18 @@ body .sf-site-header[data-header-ink="dark"] {
|
|
|
1054
1054
|
--sf-header-overlay-fg: var(--overlay-fg-on-light);
|
|
1055
1055
|
--sf-header-overlay-ground: var(--overlay-fg);
|
|
1056
1056
|
}
|
|
1057
|
+
/* "Text color at the top = Custom" sets --sf-header-overlay-fg INLINE on the
|
|
1058
|
+
bar (components/BoxHeaderBar), so it beats the rules above in both
|
|
1059
|
+
directions; the ground stays theirs.
|
|
1060
|
+
|
|
1061
|
+
LINK OPACITY. The header's links and icons draw at 80% (`opacity-80`) and
|
|
1062
|
+
100% on hover. The Box header's "Link opacity" row, when set, marks the bar
|
|
1063
|
+
and sets --sf-header-link-opacity (lib/content/header-bar); this moves the 80
|
|
1064
|
+
and leaves the hover alone. Unset, the bar has no mark and nothing here
|
|
1065
|
+
applies. */
|
|
1066
|
+
.sf-site-header[data-header-link-opacity] .opacity-80:not(:hover) {
|
|
1067
|
+
opacity: var(--sf-header-link-opacity);
|
|
1068
|
+
}
|
|
1057
1069
|
|
|
1058
1070
|
/* ─── THE HEADER FOLDS WHEN ITS ROW DOES NOT FIT ──────────────────────
|
|
1059
1071
|
Measured, never a fixed width (lib/header-fit): when a desktop band the
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import { type HeaderStickyMode } from "./useHeaderBar.js";
|
|
3
3
|
export declare const resolveStickyMode: (v: unknown) => HeaderStickyMode;
|
|
4
|
-
export default function BoxHeaderBar({ sticky, topTextColor, heightPx, theme, bandCapped, children, }: {
|
|
4
|
+
export default function BoxHeaderBar({ sticky, topTextColor, topTextCustom, linkOpacity, heightPx, theme, bandCapped, children, }: {
|
|
5
5
|
sticky?: unknown;
|
|
6
6
|
topTextColor?: unknown;
|
|
7
|
+
topTextCustom?: unknown;
|
|
8
|
+
linkOpacity?: unknown;
|
|
7
9
|
heightPx?: unknown;
|
|
8
10
|
theme?: unknown;
|
|
9
11
|
bandCapped?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as T}from"react/jsx-runtime";import{parseOption as v}from"efficient-shell/format";import{useEffect as x,useState as R}from"react";import{useRootIsDark as D}from"efficient-shell/theme";import{usePathname as P}from"next/navigation";import{useHeaderBar as S}from"./useHeaderBar.js";import{HEADER_LINK_OPACITY_ATTR as O,HEADER_LINK_OPACITY_VAR as B,headerSolidBackground as N,isProductPage as j,readHeaderLinkOpacity as w,readHeaderTopInk as C,resolveHeaderHeightPx as K}from"../lib/content/header-bar.js";import{headerThemeWrap as L}from"../lib/content/header-theme.js";import{HEADER_SET_HEIGHT_VAR as M}from"efficient-web-builder/render/lib/document/header-clearance";import{HEADER_INK_OVERRIDE_ATTR as Y,resolveHeaderInkMode as V}from"efficient-web-builder/render/lib/document/header-ink";import{centredCap as W,SITE_WIDTH_CAP as $}from"efficient-web-builder/format/lib/content/page-width";import{HideTaker as z}from"efficient-web-builder/render/components/ViewHideRoot";import{blockParts as G}from"../lib/block-parts.js";const U=G("SiteHeader"),q=["none","always","on_scroll_up"],F=r=>v(q,"always",r);function J({sticky:r,topTextColor:a,topTextCustom:m,linkOpacity:p,heightPx:h,theme:g,bandCapped:H=!1,children:_}){const n=F(r),s=K(h),{headerRef:o,scrolled:d,navHidden:k}=S({stickyMode:n,heightPx:s}),i=V(a),E=i==="auto"?null:{[Y]:i},l=C(a,m),t=w(p),b=t===void 0?null:{[O]:""},e=L(g),c=j(P()),[I,y]=R(null);x(()=>y(o.current?.ownerDocument??null),[o]);const A=!D({doc:I,whenUnset:!0}),u=d||c,f=N(A,c);return T(z,{as:"header",ref:o,"data-scrolled":d||void 0,"data-box-header":"",...E,...b,className:["sf-site-header",...e?[e.className]:[],"flex flex-col justify-center",n==="none"?"absolute":"fixed","inset-x-0 top-0 z-50",u?"border-b border-line backdrop-blur-md":"border-b border-transparent","transition-[background,border-color,transform] duration-300 ease-out"].join(" "),style:{...e?e.style:null,minHeight:`var(${M}, ${s}px)`,...H?W($):null,...k?{transform:"translateY(-100%)"}:null,...u?{background:f,color:"var(--fg)","--sf-header-ground":f}:{color:"var(--sf-header-overlay-fg)","--sf-header-ground":"var(--sf-header-overlay-ground)"},...l?{"--sf-header-overlay-fg":l}:null,...t===void 0?null:{[B]:String(t/100)}},...U("header"),children:_})}export{J as default,F as resolveStickyMode};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as e}from"react/jsx-runtime";import{memo as p}from"react";import{Render as m}from"efficient-easel/render";import{useRenderKeep as a}from"efficient-web-builder/render/lib/document/render-keep";import n from"./PostListStartsProvider.js";import{postListStartsOf as d}from"../lib/content/post-list-continue.js";import f from"./BoxHeaderBar.js";import{headerRenderConfig as c}from"../lib/document/render-config.js";import{headerBarOf as h}from"../lib/document/published-header-bar.js";import{publishedChromeData as l}from"efficient-web-builder/render/lib/document/published-passes";function x({group:s}){const i=a(),o=l({root:{props:{}},content:[s],zones:{}}),t=h(o),r=d(o);return e(f,{sticky:t.sticky,topTextColor:t.topTextColor,topTextCustom:t.topTextCustom,linkOpacity:t.linkOpacity,heightPx:t.heightPx,theme:t.theme,bandCapped:t.bandCapped,children:e(n,{starts:r.starts,posts:r.posts,children:e(m,{config:c(),data:o,keep:i})})})}var R=p(x);export{R as default};
|
|
@@ -32,3 +32,11 @@ export declare const HEADER_MENU_ROWS: readonly [{
|
|
|
32
32
|
}];
|
|
33
33
|
export declare const HEADER_MENU_ROW_FALLBACK = "top";
|
|
34
34
|
export declare const resolveMenuRow: (v: unknown) => HeaderMenuRow | null;
|
|
35
|
+
export declare const HEADER_TOP_INK_CUSTOM = "custom";
|
|
36
|
+
export declare function readHeaderTopInk(mode: unknown, colour: unknown): string | null;
|
|
37
|
+
export declare const HEADER_LINK_OPACITY_DEFAULT = 80;
|
|
38
|
+
export declare const HEADER_LINK_OPACITY_MIN = 0;
|
|
39
|
+
export declare const HEADER_LINK_OPACITY_MAX = 100;
|
|
40
|
+
export declare const HEADER_LINK_OPACITY_ATTR = "data-header-link-opacity";
|
|
41
|
+
export declare const HEADER_LINK_OPACITY_VAR = "--sf-header-link-opacity";
|
|
42
|
+
export declare function readHeaderLinkOpacity(v: unknown): number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{HEADER_HEIGHT_PX as o}from"efficient-web-builder/render/lib/document/header-clearance";import{parseOption as
|
|
1
|
+
import{HEADER_HEIGHT_PX as o}from"efficient-web-builder/render/lib/document/header-clearance";import{parseOption as r}from"efficient-shell/format";function A(e){return typeof e=="number"&&Number.isInteger(e)&&e>=o.min&&e<=o.max?e:o.default}const x="fixed inset-x-0 bottom-0 top-[var(--sf-header-h,88px)]",u=e=>!!e&&e.startsWith("/wheels/")&&e!=="/wheels",T=(e,t)=>!e&&t?"var(--section-bg)":"var(--bg)",n=[{label:"Uppercase",value:"uppercase"},{label:"Capitalised",value:"capitalised"}],a="uppercase",H=e=>r(n,a,e),p=[{label:"Icon",value:"icon"},{label:"Text",value:"text"}],i="icon",d=e=>r(p,i,e),R=[{label:"Own row",value:"top"},{label:"Same row",value:"inline"}],I="top",L=e=>e==="inline"?"inline":e==="top"||e==="bottom"?"top":null,s="custom";function D(e,t){return e!==s||typeof t!="string"?null:t.trim()||null}const f=80,E=0,l=100,m="data-header-link-opacity",N="--sf-header-link-opacity";function b(e){if(!(typeof e!="number"||!Number.isFinite(e)))return Math.min(l,Math.max(E,Math.round(e)))}export{m as HEADER_LINK_OPACITY_ATTR,f as HEADER_LINK_OPACITY_DEFAULT,l as HEADER_LINK_OPACITY_MAX,E as HEADER_LINK_OPACITY_MIN,N as HEADER_LINK_OPACITY_VAR,R as HEADER_MENU_ROWS,I as HEADER_MENU_ROW_FALLBACK,n as HEADER_NAV_TEXT_CASES,a as HEADER_NAV_TEXT_CASE_FALLBACK,s as HEADER_TOP_INK_CUSTOM,p as HEADER_UTIL_STYLES,i as HEADER_UTIL_STYLE_FALLBACK,x as UNDER_HEADER_SHEET_CLASS,T as headerSolidBackground,u as isProductPage,b as readHeaderLinkOpacity,D as readHeaderTopInk,A as resolveHeaderHeightPx,L as resolveMenuRow,H as resolveNavTextCase,d as resolveUtilStyle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as i}from"react/jsx-runtime";import
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import y from"../../../../../components/BoxHeaderBar.js";import C from"../../../../../components/SectionGroupBody.js";import{headerBarFromProps as f}from"../../../published-header-bar.js";import{SiteHeaderMeta as u}from"./meta.js";const S={...u,render:({sections:a,navTextCase:n,toolTextStyle:p,menuRow:d,sticky:m,topTextColor:s,topTextCustom:x,linkOpacity:c,heightPx:h,sectionAccent:l,editor:t,...o})=>{const r=i(C,{place:"header",sections:a,widths:o,navTextCase:n,menuRow:d,toolTextStyle:p,editing:t?.isEditing});if(!t?.isEditing)return r;const e=f({sticky:m,topTextColor:s,topTextCustom:x,linkOpacity:c,heightPx:h,sectionAccent:l,...o});return i(y,{sticky:e.sticky,topTextColor:e.topTextColor,topTextCustom:e.topTextCustom,linkOpacity:e.linkOpacity,heightPx:e.heightPx,theme:e.theme,bandCapped:e.bandCapped,children:r})}};export{S as SiteHeaderRender};
|
|
@@ -2,6 +2,8 @@ import type { Data } from "efficient-easel/blocks";
|
|
|
2
2
|
export type HeaderBarSettings = {
|
|
3
3
|
readonly sticky: unknown;
|
|
4
4
|
readonly topTextColor: unknown;
|
|
5
|
+
readonly topTextCustom: unknown;
|
|
6
|
+
readonly linkOpacity: unknown;
|
|
5
7
|
readonly heightPx: unknown;
|
|
6
8
|
readonly theme: unknown;
|
|
7
9
|
readonly bandCapped: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{chromeOwnWidth as e}from"efficient-web-builder/format/lib/content/section-width";function o(t){return{sticky:t.sticky,topTextColor:t.topTextColor,heightPx:t.heightPx,theme:t.sectionAccent,bandCapped:e(t).background==="content"}}function
|
|
1
|
+
import{chromeOwnWidth as e}from"efficient-web-builder/format/lib/content/section-width";function o(t){return{sticky:t.sticky,topTextColor:t.topTextColor,topTextCustom:t.topTextCustom,linkOpacity:t.linkOpacity,heightPx:t.heightPx,theme:t.sectionAccent,bandCapped:e(t).background==="content"}}function c(t){return o(t.content[0]?.props??{})}export{o as headerBarFromProps,c as headerBarOf};
|