efficient-storefront-blocks 0.138.1 → 0.139.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 (45) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/chunks/{CustomHtmlCodeWindow-4OS3BLNS.js → CustomHtmlCodeWindow-FSTAOP3D.js} +1 -1
  3. package/dist/chunks/{EditorPreviewCheckout-RF2M6FBA.js → EditorPreviewCheckout-ZMKF3EFO.js} +1 -1
  4. package/dist/chunks/SiteEditorProvider-ESDRW5S4.js +1 -0
  5. package/dist/chunks/{chunk-LAUTWUIM.js → chunk-5KEEVCY6.js} +1 -1
  6. package/dist/chunks/{chunk-U54HRBBL.js → chunk-5NY7QUSW.js} +1 -1
  7. package/dist/chunks/{chunk-DXVVHVFA.js → chunk-A453E6SC.js} +1 -1
  8. package/dist/chunks/{chunk-OAHMFUHH.js → chunk-EN6NBFZO.js} +1 -1
  9. package/dist/chunks/chunk-EVIGYNEU.js +337 -0
  10. package/dist/chunks/{chunk-55HCCLM4.js → chunk-KDDW7HM7.js} +1 -1
  11. package/dist/chunks/{chunk-JZT76GOY.js → chunk-MQ7N2O34.js} +1 -1
  12. package/dist/chunks/{chunk-MCIZHB3Z.js → chunk-UA7ENMMT.js} +1 -1
  13. package/dist/chunks/{fitment-data-5CQLYPUS.js → fitment-data-RZDYZEJS.js} +1 -1
  14. package/dist/chunks/{section-css-style-GS3GFILD.js → section-css-style-UBORAPCW.js} +1 -1
  15. package/dist/editor/lib/document/blocks/service/SiteHeader/fields.js +1 -1
  16. package/dist/editor/lib/storefront-editor-words.d.ts +1 -0
  17. package/dist/editor/lib/storefront-editor-words.js +1 -1
  18. package/dist/index.js +25 -25
  19. package/dist/render/app/globals.css +11 -0
  20. package/dist/render/built-with.json +1 -1
  21. package/dist/render/components/BoxHeaderBar.d.ts +2 -1
  22. package/dist/render/components/BoxHeaderBar.js +1 -1
  23. package/dist/render/components/FooterMenu.js +1 -1
  24. package/dist/render/components/HeaderMarksCurrentContext.d.ts +1 -0
  25. package/dist/render/components/HeaderMarksCurrentContext.js +1 -0
  26. package/dist/render/components/MenuLinkBlock.d.ts +1 -0
  27. package/dist/render/components/MenuLinkBlock.js +1 -1
  28. package/dist/render/components/PublishedHeader.js +1 -1
  29. package/dist/render/lib/content/header-bar.d.ts +2 -0
  30. package/dist/render/lib/content/header-bar.js +1 -1
  31. package/dist/render/lib/document/blocks/service/SiteHeader/render.js +1 -1
  32. package/dist/render/lib/document/published-header-bar.d.ts +1 -0
  33. package/dist/render/lib/document/published-header-bar.js +1 -1
  34. package/dist/routine-index.json +1 -1
  35. package/dist/value-index.json +1 -1
  36. package/dist/words.d.ts +1 -0
  37. package/dist/words.js +1 -1
  38. package/package.json +3 -3
  39. package/dist/chunks/SiteEditorProvider-445QTFDY.js +0 -1
  40. package/dist/chunks/chunk-6VZXQPDK.js +0 -337
  41. /package/dist/chunks/{chunk-EWEX5KJD.js → chunk-3SSNRXHF.js} +0 -0
  42. /package/dist/chunks/{chunk-OAHMFUHH.js.LEGAL.txt → chunk-EN6NBFZO.js.LEGAL.txt} +0 -0
  43. /package/dist/chunks/{chunk-6VZXQPDK.js.LEGAL.txt → chunk-EVIGYNEU.js.LEGAL.txt} +0 -0
  44. /package/dist/chunks/{chunk-4BGF2KJJ.js → chunk-F24QIWKG.js} +0 -0
  45. /package/dist/chunks/{chunk-T3YKEXOD.js → chunk-MMTJNMVZ.js} +0 -0
@@ -1066,6 +1066,17 @@ body .sf-site-header[data-header-ink="dark"] {
1066
1066
  .sf-site-header[data-header-link-opacity] .opacity-80:not(:hover) {
1067
1067
  opacity: var(--sf-header-link-opacity);
1068
1068
  }
1069
+ /* TEXT COLOR WHEN SOLID. The Box header's "Text color when solid" row, when
1070
+ set, inks the SOLID bar's words and icons in that colour at rest (inline on
1071
+ the bar, components/BoxHeaderBar) and marks the bar. A link or button on
1072
+ hover, on keyboard focus, or the page's own menu link (`aria-current`, which
1073
+ the header's Menu rows then mark with no accent line) goes back to the
1074
+ theme's ink at full opacity. Unset, the bar has no mark and nothing here
1075
+ applies; the see-through bar is never marked. */
1076
+ .sf-site-header[data-header-solid-ink] :is(a, button):is(:hover, :focus-visible, [aria-current="page"]) {
1077
+ color: var(--fg);
1078
+ opacity: 1;
1079
+ }
1069
1080
 
1070
1081
  /* ─── THE HEADER FOLDS WHEN ITS ROW DOES NOT FIT ──────────────────────
1071
1082
  Measured, never a fixed width (lib/header-fit): when a desktop band the
@@ -1,3 +1,3 @@
1
1
  {
2
- "efficient-web-builder": "80.1.0"
2
+ "efficient-web-builder": "81.0.0"
3
3
  }
@@ -1,11 +1,12 @@
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, topTextCustom, linkOpacity, heightPx, theme, bandCapped, children, }: {
4
+ export default function BoxHeaderBar({ sticky, topTextColor, topTextCustom, linkOpacity, solidInk, heightPx, theme, bandCapped, children, }: {
5
5
  sticky?: unknown;
6
6
  topTextColor?: unknown;
7
7
  topTextCustom?: unknown;
8
8
  linkOpacity?: unknown;
9
+ solidInk?: unknown;
9
10
  heightPx?: unknown;
10
11
  theme?: unknown;
11
12
  bandCapped?: boolean;
@@ -1 +1 @@
1
- "use client";import{jsx as d}from"react/jsx-runtime";import{parseOption as D}from"efficient-shell/format";import{useEffect as R,useState as S}from"react";import{useRootIsDark as O}from"efficient-shell/theme";import{usePathname as w}from"next/navigation";import{useHeaderBar as B}from"./useHeaderBar.js";import{HEADER_LINK_OPACITY_ATTR as C,HEADER_LINK_OPACITY_VAR as N,headerSolidBackground as j,isProductPage as K,readHeaderLinkOpacity as L,readHeaderTopInk as M,resolveHeaderHeightPx as Y}from"../lib/content/header-bar.js";import{headerThemeWrap as V}from"../lib/content/header-theme.js";import{HEADER_SET_HEIGHT_VAR as W}from"efficient-web-builder/render/lib/document/header-clearance";import{HEADER_INK_OVERRIDE_ATTR as $,resolveHeaderInkMode as z}from"efficient-web-builder/render/lib/document/header-ink";import{centredCap as G,SITE_WIDTH_CAP as U}from"efficient-web-builder/format/lib/content/page-width";import{HideTaker as q}from"efficient-web-builder/render/components/ViewHideRoot";import{HeaderTopInkContext as F}from"efficient-web-builder/render/components/HeaderTopInkContext";import{BoxSurfaceProvider as J}from"efficient-web-builder/render/components/BoxSurfaceContext";import{useHeaderAtTopIsDark as Q}from"./useHeaderAtTopIsDark.js";import{usePageOwnsTop as X}from"./usePageOwnsTop.js";import{blockParts as Z}from"../lib/block-parts.js";const ee=Z("SiteHeader"),re=["none","always","on_scroll_up"],oe=t=>D(re,"always",t);function te({sticky:t,topTextColor:i,topTextCustom:h,linkOpacity:H,heightPx:g,theme:k,bandCapped:T=!1,children:_}){const l=oe(t),c=Y(g),{headerRef:e,scrolled:u,navHidden:I}=B({stickyMode:l,heightPx:c}),n=z(i),v=n==="auto"?null:{[$]:n},a=M(i,h),s=L(H),E=s===void 0?null:{[C]:""},r=V(k),m=K(w()),[b,x]=S(null);R(()=>x(e.current?.ownerDocument??null),[e]);const A=!O({doc:b,whenUnset:!0}),y=X(e),o=u||m||y,P=Q(e,n),f=d(F.Provider,{value:o?null:a,children:_}),p=j(A,m);return d(q,{as:"header",ref:e,"data-scrolled":u||void 0,"data-box-header":"",...v,...E,className:["sf-site-header",...r?[r.className]:[],"flex flex-col justify-center",l==="none"?"absolute":"fixed","inset-x-0 top-0 z-50",o?"border-b border-line backdrop-blur-md":"border-b border-transparent","transition-[background,border-color,transform] duration-300 ease-out"].join(" "),style:{...r?r.style:null,minHeight:`var(${W}, ${c}px)`,...T?G(U):null,...I?{transform:"translateY(-100%)"}:null,...o?{background:p,color:"var(--fg)","--sf-header-ground":p}:{color:"var(--sf-header-overlay-fg)","--sf-header-ground":"var(--sf-header-overlay-ground)"},...a?{"--sf-header-overlay-fg":a}:null,...s===void 0?null:{[N]:String(s/100)}},...ee("header"),children:!o&&P?d(J,{children:f}):f})}export{te as default,oe as resolveStickyMode};
1
+ "use client";import{jsx as t}from"react/jsx-runtime";import{parseOption as C}from"efficient-shell/format";import{useEffect as w,useState as B}from"react";import{useRootIsDark as N}from"efficient-shell/theme";import{usePathname as K}from"next/navigation";import{useHeaderBar as L}from"./useHeaderBar.js";import{HEADER_LINK_OPACITY_ATTR as M,HEADER_LINK_OPACITY_VAR as j,HEADER_SOLID_INK_ATTR as Y,headerSolidBackground as V,isProductPage as W,readHeaderLinkOpacity as $,readHeaderSolidInk as z,readHeaderTopInk as G,resolveHeaderHeightPx as U}from"../lib/content/header-bar.js";import{headerThemeWrap as q}from"../lib/content/header-theme.js";import{HEADER_SET_HEIGHT_VAR as F}from"efficient-web-builder/render/lib/document/header-clearance";import{HEADER_INK_OVERRIDE_ATTR as J,resolveHeaderInkMode as Q}from"efficient-web-builder/render/lib/document/header-ink";import{centredCap as X,SITE_WIDTH_CAP as Z}from"efficient-web-builder/format/lib/content/page-width";import{HideTaker as ee}from"efficient-web-builder/render/components/ViewHideRoot";import{HeaderTopInkContext as re}from"efficient-web-builder/render/components/HeaderTopInkContext";import{BoxSurfaceProvider as oe}from"efficient-web-builder/render/components/BoxSurfaceContext";import{useHeaderAtTopIsDark as te}from"./useHeaderAtTopIsDark.js";import{usePageOwnsTop as ne}from"./usePageOwnsTop.js";import{blockParts as ae}from"../lib/block-parts.js";import{HeaderMarksCurrentContext as se}from"./HeaderMarksCurrentContext.js";const de=ae("SiteHeader"),ie=["none","always","on_scroll_up"],le=n=>C(ie,"always",n);function ce({sticky:n,topTextColor:l,topTextCustom:I,linkOpacity:H,solidInk:_,heightPx:T,theme:g,bandCapped:v=!1,children:A}){const c=le(n),u=U(T),{headerRef:e,scrolled:m,navHidden:E}=L({stickyMode:c,heightPx:u}),a=Q(l),x=a==="auto"?null:{[J]:a},s=G(l,I),d=$(H),b=d===void 0?null:{[M]:""},i=z(_),o=q(g),f=W(K()),[D,P]=B(null);w(()=>P(e.current?.ownerDocument??null),[e]);const R=!N({doc:D,whenUnset:!0}),y=ne(e),r=m||f||y,S=te(e,a),p=t(re.Provider,{value:r?null:s,children:A}),h=i?t(se.Provider,{value:!0,children:p}):p,O=r&&i?{[Y]:""}:null,k=V(R,f);return t(ee,{as:"header",ref:e,"data-scrolled":m||void 0,"data-box-header":"",...x,...b,...O,className:["sf-site-header",...o?[o.className]:[],"flex flex-col justify-center",c==="none"?"absolute":"fixed","inset-x-0 top-0 z-50",r?"border-b border-line backdrop-blur-md":"border-b border-transparent","transition-[background,border-color,transform] duration-300 ease-out"].join(" "),style:{...o?o.style:null,minHeight:`var(${F}, ${u}px)`,...v?X(Z):null,...E?{transform:"translateY(-100%)"}:null,...r?{background:k,color:i??"var(--fg)","--sf-header-ground":k}:{color:"var(--sf-header-overlay-fg)","--sf-header-ground":"var(--sf-header-overlay-ground)"},...s?{"--sf-header-overlay-fg":s}:null,...d===void 0?null:{[j]:String(d/100)}},...de("header"),children:!r&&S?t(oe,{children:h}):h})}export{ce as default,le as resolveStickyMode};
@@ -1 +1 @@
1
- "use client";import{jsx as e,Fragment as H,jsxs as p}from"react/jsx-runtime";import{createContext as Ne,useCallback as Ee,useContext as Te,useEffect as J,useRef as F,useState as P}from"react";import{createPortal as Ce}from"react-dom";import{CloseIcon as ee,MenuIcon as _e}from"efficient-shell/icons/efficient-glyphs";import ye from"./PopupFrame.js";import{POPUP_LOOK_DEFAULTS as ne}from"efficient-web-builder/format/lib/popup/look";import{REPEAT_ATTRIBUTE as Me,REPEAT_INDEX_ATTRIBUTE as ke}from"efficient-easel/draw";import{MenuPlaceContext as ve}from"./MenuLinkBlock.js";import{CardRowContext as Le,CardTemplateRows as Oe}from"efficient-web-builder/render/components/CardRowContext";import{renderChrome as $}from"efficient-web-builder/render/components/goldPhrases";import{UTIL_WORDS as te}from"./HeaderTools.js";import{usePhoneMenuTools as Ae}from"efficient-web-builder/render/components/PhoneMenuTools";import{useSearch as Re}from"./SearchContext.js";import{useModalDismiss as Se}from"./useModalDismiss.js";import{PhoneSheet as Pe}from"./PhoneSheet.js";import{useAccountInPhoneMenu as Ie}from"./PhoneMenuAccount.js";import{usePreviewMenus as Ue}from"./PreviewMenusContext.js";import{FOOTER_MENU_PLACEHOLDER_COUNT as De,FOOTER_MENU_PLACEHOLDER_HEADING as He,FOOTER_MENU_PLACEHOLDER_HINT as Fe}from"../lib/content/menu-placeholder.js";import{say as R}from"efficient-web-builder/format/lib/editor-words";import{isMenuOrphaned as $e}from"../lib/menu-source.js";import{legacyBlockAlignOf as Be}from"efficient-web-builder/format/lib/content/block-align";import{MENU_PANEL_TINT_OPACITY_DEFAULT as ze,MENU_PANEL_WIDTH_DEFAULT as Ve,MENU_STYLE_BUTTON as re,MENU_STYLE_TABS as We,menuLinkInRange as Ye,menuShowClasses as le,resolveMenuLinkRange as je}from"../lib/content/menu-row.js";import{MENU_ENTRY_SIZE_CLASS as oe}from"../lib/content/menu-entry-type.js";import{TAB_CELLS as ae,currentLinkIndex as Qe,marksCurrentLink as ie}from"../lib/content/tab-strip.js";import{useAddressQuery as qe}from"./wheels-plp/usePlpFiltersInUrl.js";import{useCurrentPagePath as Ge}from"efficient-web-builder/render/lib/site-runtime";import{HideTaker as k}from"efficient-web-builder/render/components/ViewHideRoot";import{blockParts as Ke}from"../lib/block-parts.js";import{MENU_BLOCK_TYPE as Xe}from"../lib/document/document-nodes.js";import{textKindVars as Ze}from"../lib/content/text-kind-vars.js";const l=Ke(Xe),Je=`flex list-none flex-col gap-3 ${oe}`,G="mb-4 font-mono text-[13px] uppercase tracking-[0.2em] text-fg-dim",en={font:"--sf-menu-panel-font",size:"--sf-menu-panel-size"},B="text-[12px] italic text-fg-dim/70",se=(n,t)=>n&&t>0?"border-t border-line pt-3":"",nn=n=>({label:n.label??"",url:n.href??"",served:n}),ce=n=>n.served?{...n.served,label:n.label??"",href:n.url??""}:{label:n.label??"",href:n.url??""},tn=Array.from({length:De},()=>({label:"",href:""}));function I({owner:n,items:t,place:c,wrap:h,markCurrent:E=!1}){const T=t?t.map(ce):tn,m=Ge(),w=Te(de),y=t&&E?Qe(t.map(g=>g.url??""),m,w):-1,b=y<0?null:{index:y,href:t[y].url??""};return e(ve.Provider,{value:t?b?{...c,current:b}:c:{...c,placeholder:!0},children:e(Oe,{ownerId:n.id,ownerType:n.type,Template:n.template,rows:T,items:t??void 0,fallback:null,wrapCopy:h,children:g=>g})})}const z=n=>(n.template?.blockCount??0)>0,rn="Nothing to show yet: this menu's entries come from its Menu content.",me="This menu draws no links: its card template is empty. Undo the delete, or delete this Menu and add it again.";function ue({owner:n,items:t,label:c,editing:h,linkAlign:E,linkRange:T,markCurrent:m,menuStyle:w,menuStylePhone:y,panelLook:b,panelTextStyle:g}){const U=Be(E),C=je(T),V=!!C&&t!==null&&C.to!==void 0&&C.to<t.length,[u,S]=P(!1),v=F(null),f=Ae(),W=Ie(),{open:Y}=Re(),x=c||"Menu",i=Ee(()=>S(!1),[]),r=w===re||y===re,M=le(w,y),D=Ze(g,en),L=Object.keys(D).length>0?D:void 0,[d,N]=P("sheet"),O=F(null),K=F(null),[pe,he]=P(void 0),[A,fe]=P(null),X=()=>{if(!u&&r){const s=v.current?.ownerDocument.defaultView;N(s?.matchMedia("(min-width: 720px)").matches?"side":"sheet");const o=O.current?.querySelector("span");if(o&&s){const a=s.getComputedStyle(o);he({fontFamily:a.fontFamily,fontSize:a.fontSize,letterSpacing:a.letterSpacing,textTransform:a.textTransform});const _=(O.current?.querySelector("svg")??O.current)?.getBoundingClientRect();fe(_?{left:_.left,top:_.top,height:_.height}:null)}}S(s=>!s)};J(()=>{if(!u||!r)return;const o=v.current?.ownerDocument.defaultView?.matchMedia("(min-width: 720px)");if(!o)return;const a=()=>S(!1);return o.addEventListener("change",a),()=>o.removeEventListener("change",a)},[u,r]);const j=F(null);Se({active:u&&!(u&&r&&d==="side"),onDismiss:i,scopeRef:v,focusRef:j,trapRef:j});const we=e(I,{owner:n,items:t,place:{place:"row"},markCurrent:m,wrap:(s,o)=>{const a=t!==null&&C&&!Ye(C,o.index+1)?{"data-menu-out":""}:null;return e("li",{className:"",...a,...l("menu-item"),children:s})}}),Q=(s,o,a)=>h?{[Me]:`${s}:${a<0?"panel":"dropdown"}`,[ke]:`${a+1}.${o.index}`}:null,be=e(I,{owner:n,items:t,place:{place:"panel",onNavigate:i},markCurrent:m,wrap:(s,o)=>p(H,{children:[e("li",{className:L?"flex min-h-12 items-center":"flex min-h-14 items-center border-b border-line",...Q(n.id,o,-1),...l("menu-item"),children:s}),t===null?null:(o.item?.dropdown_items??[]).map((a,_)=>e(Le.Provider,{value:{...o,row:ce(a),item:a},children:e("li",{className:"flex min-h-12 items-center border-b border-line pl-5 text-[14px]",...Q(n.id,o,_),...l("menu-item"),children:s})},_))]})}),ge=f&&(f.search||f.cart||f.region||f.account||f.theme)?f:null;if(!h&&t!==null&&!z(n)&&!ge)return null;const Z=e(Pe,{role:"dialog",panelRef:j,name:x,entries:be,tools:f,withAccount:!r||W,editing:h,onClose:i,onSearch:Y,phoneOnly:!r,marker:r?"sheet":void 0,listStyle:r&&A?{paddingLeft:A.left,paddingRight:A.left}:void 0,words:L});let q=null;if(r){const s=v.current?.ownerDocument,o={...ne,placement:"left",height:"full",closeButton:"none",width:typeof b?.width=="number"?b.width:Ve,tintColor:typeof b?.tintColor=="string"?b.tintColor:ne.tintColor,tintOpacity:typeof b?.tintOpacity=="number"?b.tintOpacity:ze},a=e(ye,{look:o,drawer:{closeRef:K},open:!0,onClose:i,label:x,children:p("div",{"data-menu-panel":"side",className:"flex h-full flex-col overflow-y-auto text-fg",children:[e("div",{className:"flex min-h-[var(--sf-header-h,88px)] shrink-0 items-center px-8",style:A?{paddingLeft:A.left}:void 0,children:p("button",{ref:K,type:"button",onClick:i,className:"inline-flex h-11 items-center gap-2",style:pe,children:[e(ee,{size:20,"aria-hidden":"true"}),e("span",{className:"whitespace-nowrap",children:te.close})]})}),e("ul",{className:"m-0 flex list-none flex-col px-8 pb-8",style:A?{paddingLeft:A.left}:void 0,...l("menu"),children:e(I,{owner:n,items:t,place:{place:"panel",onNavigate:i},markCurrent:m,wrap:(_,xe)=>e("li",{className:"flex min-h-12 items-center",...Q(n.id,xe,-1),...l("menu-item"),children:_})})})]})});q=p(H,{children:[p("button",{ref:O,type:"button",className:`mono-eyebrow-ctl ${M.button} h-11 min-w-11 items-center gap-2 opacity-80 transition-opacity hover:opacity-100 max-view-tablet:-mx-3 max-view-tablet:min-w-0 max-view-tablet:px-3`,"aria-expanded":u,"aria-label":u?"Close the menu":"Open the menu",onClick:X,...l("menu-button"),children:[L&&u&&d==="sheet"?e(ee,{size:20,"aria-hidden":"true"}):e(_e,{size:20,"aria-hidden":"true"}),e("span",{className:"whitespace-nowrap max-view-tablet:hidden",children:te.menu})]}),u&&s?Ce(d==="side"?a:Z,s.body):null]})}else M.drawsButton&&(q=p(H,{children:[e("button",{type:"button",className:`${M.buttonHead} h-11 w-11 items-center justify-center${M.buttonTail}`,"aria-expanded":u,"aria-label":u?"Close the menu":"Open the menu",onClick:X,...l("menu-button"),children:e("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round","aria-hidden":"true",children:u?e("path",{d:"M6 6l12 12M18 6L6 18"}):e("path",{d:"M4 7h16M4 12h16M4 17h16"})})}),u?Z:null]}));return p(k,{as:"nav",ref:v,"aria-label":x,"data-menu-row":"",...r?{"data-menu-show":"button"}:null,...!r&&U?{"data-menu-align":U}:null,...!r&&V?{"data-menu-part":"lead"}:null,className:"min-w-0",...l("menu-block"),children:[e("ul",{className:`m-0 ${M.listHead} list-none flex-wrap items-center gap-x-8 gap-y-2 p-0 font-mono ${oe} uppercase tracking-[0.18em]${M.listTail}`,...l("menu"),children:we}),q]})}function ln({owner:n,items:t,label:c,editing:h,markCurrent:E,strip:T=""}){return!h&&(t===null||t.length===0||!z(n))?null:e(k,{as:"nav","aria-label":c||"Menu","data-menu-tabs":"",className:T?`min-w-0 ${T}`:"min-w-0",...l("menu-block"),children:e("ul",{className:ae.list,...l("menu"),children:e(I,{owner:n,items:t,place:{place:"tab"},markCurrent:E,wrap:(m,w)=>e("li",{className:ae.item(w.index===0,h),...l("menu-item"),children:m})})})})}const de=Ne("");function on(n){const t=!n.editing&&ie(n.layout,n.currentPage),c=qe(n.pageQuery??"",t);return e(de.Provider,{value:c,children:e(an,{...n})})}function an({owner:n,menu:t,served:c,heading:h,accordionMobile:E=!1,showDividers:T=!1,editing:m=!1,layout:w="column",linkAlign:y,linkRange:b,menuStyle:g,currentPage:U,menuStylePhone:C,menuPanelWidth:V,menuPanelTintColor:u,menuPanelTintOpacity:S,menuPanelTextStyle:v}){const f=ie(w,U),{live:W,ready:Y}=Ue(),x=!c&&$e({id:t?.id,handle:t?.handle,editing:m,ready:Y,live:W}),i=c?c.map(nn):x?[]:t?.items??[],r=h||(c?"":t?.name)||"",[M,D]=P(!1);if(J(()=>{if(!E)return;const d=window.matchMedia("(max-width: 800px)"),N=()=>D(d.matches);return N(),d.addEventListener("change",N),()=>d.removeEventListener("change",N)},[E]),c&&i.length===0)return m?e(k,{as:"p",className:B,children:R(rn)}):null;if(w==="row"&&m&&!x&&i.length>0&&!z(n))return e(k,{as:"p",className:B,children:R(me)});if(w==="row"&&g===We){const{strip:d}=le(g,C),N=e(ln,{owner:n,items:x?null:i,label:r,editing:m,markCurrent:f,strip:d});return d?p(H,{children:[N,e(ue,{owner:n,items:x?null:i,label:r,editing:m,markCurrent:f,menuStyle:g,menuStylePhone:C})]}):N}if(w==="row")return e(ue,{owner:n,items:x?null:i,label:r,editing:m,linkAlign:y,linkRange:b,markCurrent:f,menuStyle:g,menuStylePhone:C,panelLook:{width:V,tintColor:u,tintOpacity:S},panelTextStyle:v});const L=d=>e("ul",{className:Je,...l("menu"),children:e(I,{owner:n,items:d,place:{place:"column"},wrap:(N,O)=>e("li",{className:d?se(T,O.index):`text-fg ${se(T,O.index)}`,...l("menu-item"),children:N})})});return x?p(k,{as:"div",className:"min-w-0",...l("menu-block"),children:[e("h4",{className:G,...l("heading"),children:h?$(h):R(He)}),L(null),e("p",{className:`mt-3 ${B}`,children:R(Fe)})]}):i.length===0||!z(n)?p(k,{as:"div",className:"min-w-0",...l("menu-block"),children:[r?e("h4",{className:G,...l("heading"),children:$(r)}):null,m?e("p",{className:B,children:i.length===0?R("This menu has no links yet — add them in {place}.",{place:R("Storefront → Menus")}):R(me)}):null]}):E&&M?p(k,{as:"details",className:"min-w-0 border-b border-line",...l("menu-block"),children:[p("summary",{className:"flex cursor-pointer list-none items-center justify-between py-3 font-mono text-[13px] uppercase tracking-[0.2em] text-fg-dim",children:[$(r),e("span",{"aria-hidden":!0,children:"+"})]}),e("div",{className:"pb-3",children:L(i)})]}):p(k,{as:"div",className:"min-w-0",...l("menu-block"),children:[r?e("h4",{className:G,...l("heading"),children:$(r)}):null,L(i)]})}export{on as default};
1
+ "use client";import{jsx as e,Fragment as H,jsxs as p}from"react/jsx-runtime";import{createContext as Ee,useCallback as Ce,useContext as J,useEffect as ee,useRef as F,useState as I}from"react";import{createPortal as Te}from"react-dom";import{CloseIcon as ne,MenuIcon as _e}from"efficient-shell/icons/efficient-glyphs";import ye from"./PopupFrame.js";import{POPUP_LOOK_DEFAULTS as te}from"efficient-web-builder/format/lib/popup/look";import{REPEAT_ATTRIBUTE as Me,REPEAT_INDEX_ATTRIBUTE as ke}from"efficient-easel/draw";import{MenuPlaceContext as ve}from"./MenuLinkBlock.js";import{CardRowContext as Le,CardTemplateRows as Oe}from"efficient-web-builder/render/components/CardRowContext";import{renderChrome as $}from"efficient-web-builder/render/components/goldPhrases";import{UTIL_WORDS as re}from"./HeaderTools.js";import{usePhoneMenuTools as Ae}from"efficient-web-builder/render/components/PhoneMenuTools";import{useSearch as Re}from"./SearchContext.js";import{useModalDismiss as Se}from"./useModalDismiss.js";import{PhoneSheet as Pe}from"./PhoneSheet.js";import{useAccountInPhoneMenu as Ie}from"./PhoneMenuAccount.js";import{usePreviewMenus as Ue}from"./PreviewMenusContext.js";import{FOOTER_MENU_PLACEHOLDER_COUNT as De,FOOTER_MENU_PLACEHOLDER_HEADING as He,FOOTER_MENU_PLACEHOLDER_HINT as Fe}from"../lib/content/menu-placeholder.js";import{say as S}from"efficient-web-builder/format/lib/editor-words";import{isMenuOrphaned as $e}from"../lib/menu-source.js";import{legacyBlockAlignOf as Be}from"efficient-web-builder/format/lib/content/block-align";import{MENU_PANEL_TINT_OPACITY_DEFAULT as ze,MENU_PANEL_WIDTH_DEFAULT as Ve,MENU_STYLE_BUTTON as le,MENU_STYLE_TABS as We,menuLinkInRange as Ye,menuShowClasses as oe,resolveMenuLinkRange as je}from"../lib/content/menu-row.js";import{MENU_ENTRY_SIZE_CLASS as ae}from"../lib/content/menu-entry-type.js";import{TAB_CELLS as ie,currentLinkIndex as Qe,marksCurrentLink as se}from"../lib/content/tab-strip.js";import{useAddressQuery as qe}from"./wheels-plp/usePlpFiltersInUrl.js";import{useCurrentPagePath as Ge}from"efficient-web-builder/render/lib/site-runtime";import{HideTaker as k}from"efficient-web-builder/render/components/ViewHideRoot";import{blockParts as Ke}from"../lib/block-parts.js";import{HeaderMarksCurrentContext as Xe}from"./HeaderMarksCurrentContext.js";import{MENU_BLOCK_TYPE as Ze}from"../lib/document/document-nodes.js";import{textKindVars as Je}from"../lib/content/text-kind-vars.js";const l=Ke(Ze),en=`flex list-none flex-col gap-3 ${ae}`,G="mb-4 font-mono text-[13px] uppercase tracking-[0.2em] text-fg-dim",nn={font:"--sf-menu-panel-font",size:"--sf-menu-panel-size"},B="text-[12px] italic text-fg-dim/70",ce=(n,t)=>n&&t>0?"border-t border-line pt-3":"",tn=n=>({label:n.label??"",url:n.href??"",served:n}),me=n=>n.served?{...n.served,label:n.label??"",href:n.url??""}:{label:n.label??"",href:n.url??""},rn=Array.from({length:De},()=>({label:"",href:""}));function U({owner:n,items:t,place:i,wrap:h,markCurrent:g=!1}){const E=t?t.map(me):rn,m=Ge(),b=J(pe),v=J(Xe)&&i.place==="row"&&!g,f=t&&(g||v)?Qe(t.map(y=>y.url??""),m,b):-1,C=f<0?null:{index:f,href:t[f].url??"",...v?{plain:!0}:null};return e(ve.Provider,{value:t?C?{...i,current:C}:i:{...i,placeholder:!0},children:e(Oe,{ownerId:n.id,ownerType:n.type,Template:n.template,rows:E,items:t??void 0,fallback:null,wrapCopy:h,children:y=>y})})}const z=n=>(n.template?.blockCount??0)>0,ln="Nothing to show yet: this menu's entries come from its Menu content.",ue="This menu draws no links: its card template is empty. Undo the delete, or delete this Menu and add it again.";function de({owner:n,items:t,label:i,editing:h,linkAlign:g,linkRange:E,markCurrent:m,menuStyle:b,menuStylePhone:v,panelLook:f,panelTextStyle:C}){const y=Be(g),T=je(E),V=!!T&&t!==null&&T.to!==void 0&&T.to<t.length,[u,P]=I(!1),L=F(null),w=Ae(),W=Ie(),{open:Y}=Re(),x=i||"Menu",s=Ce(()=>P(!1),[]),r=b===le||v===le,M=oe(b,v),D=Je(C,nn),O=Object.keys(D).length>0?D:void 0,[d,N]=I("sheet"),A=F(null),K=F(null),[he,fe]=I(void 0),[R,we]=I(null),X=()=>{if(!u&&r){const c=L.current?.ownerDocument.defaultView;N(c?.matchMedia("(min-width: 720px)").matches?"side":"sheet");const o=A.current?.querySelector("span");if(o&&c){const a=c.getComputedStyle(o);fe({fontFamily:a.fontFamily,fontSize:a.fontSize,letterSpacing:a.letterSpacing,textTransform:a.textTransform});const _=(A.current?.querySelector("svg")??A.current)?.getBoundingClientRect();we(_?{left:_.left,top:_.top,height:_.height}:null)}}P(c=>!c)};ee(()=>{if(!u||!r)return;const o=L.current?.ownerDocument.defaultView?.matchMedia("(min-width: 720px)");if(!o)return;const a=()=>P(!1);return o.addEventListener("change",a),()=>o.removeEventListener("change",a)},[u,r]);const j=F(null);Se({active:u&&!(u&&r&&d==="side"),onDismiss:s,scopeRef:L,focusRef:j,trapRef:j});const be=e(U,{owner:n,items:t,place:{place:"row"},markCurrent:m,wrap:(c,o)=>{const a=t!==null&&T&&!Ye(T,o.index+1)?{"data-menu-out":""}:null;return e("li",{className:"",...a,...l("menu-item"),children:c})}}),Q=(c,o,a)=>h?{[Me]:`${c}:${a<0?"panel":"dropdown"}`,[ke]:`${a+1}.${o.index}`}:null,ge=e(U,{owner:n,items:t,place:{place:"panel",onNavigate:s},markCurrent:m,wrap:(c,o)=>p(H,{children:[e("li",{className:O?"flex min-h-12 items-center":"flex min-h-14 items-center border-b border-line",...Q(n.id,o,-1),...l("menu-item"),children:c}),t===null?null:(o.item?.dropdown_items??[]).map((a,_)=>e(Le.Provider,{value:{...o,row:me(a),item:a},children:e("li",{className:"flex min-h-12 items-center border-b border-line pl-5 text-[14px]",...Q(n.id,o,_),...l("menu-item"),children:c})},_))]})}),xe=w&&(w.search||w.cart||w.region||w.account||w.theme)?w:null;if(!h&&t!==null&&!z(n)&&!xe)return null;const Z=e(Pe,{role:"dialog",panelRef:j,name:x,entries:ge,tools:w,withAccount:!r||W,editing:h,onClose:s,onSearch:Y,phoneOnly:!r,marker:r?"sheet":void 0,listStyle:r&&R?{paddingLeft:R.left,paddingRight:R.left}:void 0,words:O});let q=null;if(r){const c=L.current?.ownerDocument,o={...te,placement:"left",height:"full",closeButton:"none",width:typeof f?.width=="number"?f.width:Ve,tintColor:typeof f?.tintColor=="string"?f.tintColor:te.tintColor,tintOpacity:typeof f?.tintOpacity=="number"?f.tintOpacity:ze},a=e(ye,{look:o,drawer:{closeRef:K},open:!0,onClose:s,label:x,children:p("div",{"data-menu-panel":"side",className:"flex h-full flex-col overflow-y-auto text-fg",children:[e("div",{className:"flex min-h-[var(--sf-header-h,88px)] shrink-0 items-center px-8",style:R?{paddingLeft:R.left}:void 0,children:p("button",{ref:K,type:"button",onClick:s,className:"inline-flex h-11 items-center gap-2",style:he,children:[e(ne,{size:20,"aria-hidden":"true"}),e("span",{className:"whitespace-nowrap",children:re.close})]})}),e("ul",{className:"m-0 flex list-none flex-col px-8 pb-8",style:R?{paddingLeft:R.left}:void 0,...l("menu"),children:e(U,{owner:n,items:t,place:{place:"panel",onNavigate:s},markCurrent:m,wrap:(_,Ne)=>e("li",{className:"flex min-h-12 items-center",...Q(n.id,Ne,-1),...l("menu-item"),children:_})})})]})});q=p(H,{children:[p("button",{ref:A,type:"button",className:`mono-eyebrow-ctl ${M.button} h-11 min-w-11 items-center gap-2 opacity-80 transition-opacity hover:opacity-100 max-view-tablet:-mx-3 max-view-tablet:min-w-0 max-view-tablet:px-3`,"aria-expanded":u,"aria-label":u?"Close the menu":"Open the menu",onClick:X,...l("menu-button"),children:[O&&u&&d==="sheet"?e(ne,{size:20,"aria-hidden":"true"}):e(_e,{size:20,"aria-hidden":"true"}),e("span",{className:"whitespace-nowrap max-view-tablet:hidden",children:re.menu})]}),u&&c?Te(d==="side"?a:Z,c.body):null]})}else M.drawsButton&&(q=p(H,{children:[e("button",{type:"button",className:`${M.buttonHead} h-11 w-11 items-center justify-center${M.buttonTail}`,"aria-expanded":u,"aria-label":u?"Close the menu":"Open the menu",onClick:X,...l("menu-button"),children:e("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round","aria-hidden":"true",children:u?e("path",{d:"M6 6l12 12M18 6L6 18"}):e("path",{d:"M4 7h16M4 12h16M4 17h16"})})}),u?Z:null]}));return p(k,{as:"nav",ref:L,"aria-label":x,"data-menu-row":"",...r?{"data-menu-show":"button"}:null,...!r&&y?{"data-menu-align":y}:null,...!r&&V?{"data-menu-part":"lead"}:null,className:"min-w-0",...l("menu-block"),children:[e("ul",{className:`m-0 ${M.listHead} list-none flex-wrap items-center gap-x-8 gap-y-2 p-0 font-mono ${ae} uppercase tracking-[0.18em]${M.listTail}`,...l("menu"),children:be}),q]})}function on({owner:n,items:t,label:i,editing:h,markCurrent:g,strip:E=""}){return!h&&(t===null||t.length===0||!z(n))?null:e(k,{as:"nav","aria-label":i||"Menu","data-menu-tabs":"",className:E?`min-w-0 ${E}`:"min-w-0",...l("menu-block"),children:e("ul",{className:ie.list,...l("menu"),children:e(U,{owner:n,items:t,place:{place:"tab"},markCurrent:g,wrap:(m,b)=>e("li",{className:ie.item(b.index===0,h),...l("menu-item"),children:m})})})})}const pe=Ee("");function an(n){const t=!n.editing&&se(n.layout,n.currentPage),i=qe(n.pageQuery??"",t);return e(pe.Provider,{value:i,children:e(sn,{...n})})}function sn({owner:n,menu:t,served:i,heading:h,accordionMobile:g=!1,showDividers:E=!1,editing:m=!1,layout:b="column",linkAlign:v,linkRange:f,menuStyle:C,currentPage:y,menuStylePhone:T,menuPanelWidth:V,menuPanelTintColor:u,menuPanelTintOpacity:P,menuPanelTextStyle:L}){const w=se(b,y),{live:W,ready:Y}=Ue(),x=!i&&$e({id:t?.id,handle:t?.handle,editing:m,ready:Y,live:W}),s=i?i.map(tn):x?[]:t?.items??[],r=h||(i?"":t?.name)||"",[M,D]=I(!1);if(ee(()=>{if(!g)return;const d=window.matchMedia("(max-width: 800px)"),N=()=>D(d.matches);return N(),d.addEventListener("change",N),()=>d.removeEventListener("change",N)},[g]),i&&s.length===0)return m?e(k,{as:"p",className:B,children:S(ln)}):null;if(b==="row"&&m&&!x&&s.length>0&&!z(n))return e(k,{as:"p",className:B,children:S(ue)});if(b==="row"&&C===We){const{strip:d}=oe(C,T),N=e(on,{owner:n,items:x?null:s,label:r,editing:m,markCurrent:w,strip:d});return d?p(H,{children:[N,e(de,{owner:n,items:x?null:s,label:r,editing:m,markCurrent:w,menuStyle:C,menuStylePhone:T})]}):N}if(b==="row")return e(de,{owner:n,items:x?null:s,label:r,editing:m,linkAlign:v,linkRange:f,markCurrent:w,menuStyle:C,menuStylePhone:T,panelLook:{width:V,tintColor:u,tintOpacity:P},panelTextStyle:L});const O=d=>e("ul",{className:en,...l("menu"),children:e(U,{owner:n,items:d,place:{place:"column"},wrap:(N,A)=>e("li",{className:d?ce(E,A.index):`text-fg ${ce(E,A.index)}`,...l("menu-item"),children:N})})});return x?p(k,{as:"div",className:"min-w-0",...l("menu-block"),children:[e("h4",{className:G,...l("heading"),children:h?$(h):S(He)}),O(null),e("p",{className:`mt-3 ${B}`,children:S(Fe)})]}):s.length===0||!z(n)?p(k,{as:"div",className:"min-w-0",...l("menu-block"),children:[r?e("h4",{className:G,...l("heading"),children:$(r)}):null,m?e("p",{className:B,children:s.length===0?S("This menu has no links yet — add them in {place}.",{place:S("Storefront → Menus")}):S(ue)}):null]}):g&&M?p(k,{as:"details",className:"min-w-0 border-b border-line",...l("menu-block"),children:[p("summary",{className:"flex cursor-pointer list-none items-center justify-between py-3 font-mono text-[13px] uppercase tracking-[0.2em] text-fg-dim",children:[$(r),e("span",{"aria-hidden":!0,children:"+"})]}),e("div",{className:"pb-3",children:O(s)})]}):p(k,{as:"div",className:"min-w-0",...l("menu-block"),children:[r?e("h4",{className:G,...l("heading"),children:$(r)}):null,O(s)]})}export{an as default};
@@ -0,0 +1 @@
1
+ export declare const HeaderMarksCurrentContext: import("react").Context<boolean>;
@@ -0,0 +1 @@
1
+ "use client";import{createContext as e}from"react";const r=e(!1);export{r as HeaderMarksCurrentContext};
@@ -3,6 +3,7 @@ export interface MenuPlace {
3
3
  current?: {
4
4
  index: number;
5
5
  href: string;
6
+ plain?: boolean;
6
7
  } | null;
7
8
  placeholder?: boolean;
8
9
  onNavigate?: () => void;
@@ -1 +1 @@
1
- "use client";import{jsx as l,jsxs as f}from"react/jsx-runtime";import{createContext as L,useContext as k,useEffect as w,useRef as N}from"react";import x from"next/link";import C from"./HeaderNavItem.js";import _ from"./MenuPlaceholderLabel.js";import{useCardRow as g}from"efficient-web-builder/render/components/CardRowContext";import{renderGold as i}from"efficient-web-builder/render/components/goldPhrases";import{scrollBehavior as I}from"efficient-web-builder/render/components/useReducedMotion";import{useTakeViewHide as R,withViewHide as u}from"efficient-web-builder/render/components/ViewHideRoot";import{isLabelOnlyMenuUrl as T,menuDropdownAside as E,menuLinkKind as M}from"../lib/menu-link.js";import{CURRENT_LINE as d,TAB_CELLS as p,showCurrentTab as v}from"../lib/content/tab-strip.js";import{blockParts as y}from"../lib/block-parts.js";import{MENU_BLOCK_TYPE as P}from"../lib/document/document-nodes.js";const m=y(P)("menu-link"),j=L(null),b="opacity-80 transition-opacity hover:opacity-100";function s({item:r,label:t,link:n,onNavigate:a,current:c=!1,children:o}){const e=R();return T(r.url)?e.scope(l("span",{className:u(t,e.className),...e.attrs,...m,children:i(r.label)})):e.scope(M(r.url)==="off-site"?f("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",className:u(n,e.className),onClick:a,...e.attrs,...m,children:[i(r.label),o]}):f(x,{href:r.url,className:u(n,e.className),onClick:a,"aria-current":c?"page":void 0,...e.attrs,...m,children:[i(r.label),o]}))}const A="[data-menu-tabs] > ul, [data-menu-row] > ul";function h({className:r,hidden:t=!1}){const n=N(null);return w(()=>{v(n.current?.closest(A)??null,I())},[]),l("span",{ref:n,"aria-hidden":t?"true":void 0,className:r})}function B(){const r=g(),t=k(j);if(!r||!t)return null;if(t.placeholder)return l(_,{});const n={label:r.row.label??"",url:r.row.href??""},a=!!t.current&&t.current.index===r.index&&t.current.href===n.url;if(t.place==="tab"){const e=p.tab(a);return l(s,{item:n,label:e,link:e,current:a,children:a?l(h,{className:p.underline}):null})}if(t.place==="column")return l(s,{item:n,label:"text-fg",link:"text-fg transition-colors hover:text-accent",current:a});if(t.place==="panel")return l(s,{item:n,label:"",link:` ${b}`,onNavigate:t.onNavigate,current:a});const c=r.item,o=c?.dropdown_items??[];return o.length?l(C,{item:{href:n.url,label:i(n.label),plainLabel:n.label,dropdownItems:o.map(e=>({href:e.url,label:i(e.label),plainLabel:e.label,description:e.description,image:e.image,badge:e.badge})),dropdownAside:E(c?.dropdown_aside)}}):a?l(s,{item:n,label:"",link:d.rowLink,current:!0,children:l(h,{className:d.row,hidden:!0})}):l(s,{item:n,label:"",link:` ${b}`})}export{j as MenuPlaceContext,B as default};
1
+ "use client";import{jsx as l,jsxs as p}from"react/jsx-runtime";import{createContext as L,useContext as k,useEffect as w,useRef as N}from"react";import x from"next/link";import C from"./HeaderNavItem.js";import _ from"./MenuPlaceholderLabel.js";import{useCardRow as g}from"efficient-web-builder/render/components/CardRowContext";import{renderGold as s}from"efficient-web-builder/render/components/goldPhrases";import{scrollBehavior as I}from"efficient-web-builder/render/components/useReducedMotion";import{useTakeViewHide as R,withViewHide as u}from"efficient-web-builder/render/components/ViewHideRoot";import{isLabelOnlyMenuUrl as T,menuDropdownAside as E,menuLinkKind as M}from"../lib/menu-link.js";import{CURRENT_LINE as d,TAB_CELLS as b,showCurrentTab as v}from"../lib/content/tab-strip.js";import{blockParts as y}from"../lib/block-parts.js";import{MENU_BLOCK_TYPE as P}from"../lib/document/document-nodes.js";const m=y(P)("menu-link"),j=L(null),f="opacity-80 transition-opacity hover:opacity-100";function o({item:n,label:t,link:r,onNavigate:a,current:c=!1,children:i}){const e=R();return T(n.url)?e.scope(l("span",{className:u(t,e.className),...e.attrs,...m,children:s(n.label)})):e.scope(M(n.url)==="off-site"?p("a",{href:n.url,target:"_blank",rel:"noopener noreferrer",className:u(r,e.className),onClick:a,...e.attrs,...m,children:[s(n.label),i]}):p(x,{href:n.url,className:u(r,e.className),onClick:a,"aria-current":c?"page":void 0,...e.attrs,...m,children:[s(n.label),i]}))}const A="[data-menu-tabs] > ul, [data-menu-row] > ul";function h({className:n,hidden:t=!1}){const r=N(null);return w(()=>{v(r.current?.closest(A)??null,I())},[]),l("span",{ref:r,"aria-hidden":t?"true":void 0,className:n})}function B(){const n=g(),t=k(j);if(!n||!t)return null;if(t.placeholder)return l(_,{});const r={label:n.row.label??"",url:n.row.href??""},a=!!t.current&&t.current.index===n.index&&t.current.href===r.url;if(t.place==="tab"){const e=b.tab(a);return l(o,{item:r,label:e,link:e,current:a,children:a?l(h,{className:b.underline}):null})}if(t.place==="column")return l(o,{item:r,label:"text-fg",link:"text-fg transition-colors hover:text-accent",current:a});if(t.place==="panel")return l(o,{item:r,label:"",link:` ${f}`,onNavigate:t.onNavigate,current:a});const c=n.item,i=c?.dropdown_items??[];return i.length?l(C,{item:{href:r.url,label:s(r.label),plainLabel:r.label,dropdownItems:i.map(e=>({href:e.url,label:s(e.label),plainLabel:e.label,description:e.description,image:e.image,badge:e.badge})),dropdownAside:E(c?.dropdown_aside)}}):a&&t.current?.plain?l(o,{item:r,label:"",link:` ${f}`,current:!0}):a?l(o,{item:r,label:"",link:d.rowLink,current:!0,children:l(h,{className:d.row,hidden:!0})}):l(o,{item:r,label:"",link:` ${f}`})}export{j as MenuPlaceContext,B as default};
@@ -1 +1 @@
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};
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,solidInk:t.solidInk,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};
@@ -43,6 +43,8 @@ export declare const HEADER_LINK_OPACITY_MAX = 100;
43
43
  export declare const HEADER_LINK_OPACITY_ATTR = "data-header-link-opacity";
44
44
  export declare const HEADER_LINK_OPACITY_VAR = "--sf-header-link-opacity";
45
45
  export declare function readHeaderLinkOpacity(v: unknown): number | undefined;
46
+ export declare const HEADER_SOLID_INK_ATTR = "data-header-solid-ink";
47
+ export declare function readHeaderSolidInk(v: unknown): string | null;
46
48
  export declare const HEADER_ICON_SIZES: readonly [{
47
49
  readonly label: "Medium";
48
50
  readonly value: "medium";
@@ -1 +1 @@
1
- import{HEADER_CLEARANCE_CLASS as a,HEADER_HEIGHT_PX as r,TOP_SPACE_ATTR as n}from"efficient-web-builder/render/lib/document/header-clearance";import{parseOption as o}from"efficient-shell/format";function I(e){return typeof e=="number"&&Number.isInteger(e)&&e>=r.min&&e<=r.max?e:r.default}const d="fixed inset-x-0 bottom-0 top-[var(--sf-header-h,88px)]",m=e=>!!e&&e.startsWith("/wheels/")&&e!=="/wheels",l="data-site-main",E="shared";function D(e){if(!e)return!1;if(e.querySelector(`.${a}, [${n}="own"]`))return!0;const t=e.querySelector(`main[${l}]`);return t!=null&&t.querySelector(`[${n}="${E}"]`)==null}const N=(e,t)=>!e&&t?"var(--section-bg)":"var(--bg)",s=[{label:"Uppercase",value:"uppercase"},{label:"Capitalised",value:"capitalised"}],_="uppercase",O=e=>o(s,_,e),i=[{label:"Icon",value:"icon"},{label:"Text",value:"text"}],A="icon",b=e=>o(i,A,e),f=[{label:"Own row",value:"top"},{label:"Same row",value:"inline"}],P="top",g=e=>e==="inline"?"inline":e==="top"||e==="bottom"?"top":null,p="custom";function h(e,t){return e!==p||typeof t!="string"?null:t.trim()||null}const v=80,c=0,u=100,y="data-header-link-opacity",K="--sf-header-link-opacity";function M(e){if(!(typeof e!="number"||!Number.isFinite(e)))return Math.min(u,Math.max(c,Math.round(e)))}const x=[{label:"Medium",value:"medium"},{label:"Large",value:"large"}],T="medium",R={medium:{size:18,stroke:1.6},large:{size:20,stroke:1.4}},H=[{label:"Cart",value:"cart"},{label:"Bag",value:"bag"}],S="cart",U=e=>({cart:o(H,S,e.cartIcon),glyph:R[o(x,T,e.iconSize)]});export{H as HEADER_CART_ICONS,S as HEADER_CART_ICON_FALLBACK,x as HEADER_ICON_SIZES,T as HEADER_ICON_SIZE_FALLBACK,y as HEADER_LINK_OPACITY_ATTR,v as HEADER_LINK_OPACITY_DEFAULT,u as HEADER_LINK_OPACITY_MAX,c as HEADER_LINK_OPACITY_MIN,K as HEADER_LINK_OPACITY_VAR,f as HEADER_MENU_ROWS,P as HEADER_MENU_ROW_FALLBACK,s as HEADER_NAV_TEXT_CASES,_ as HEADER_NAV_TEXT_CASE_FALLBACK,p as HEADER_TOP_INK_CUSTOM,i as HEADER_UTIL_STYLES,A as HEADER_UTIL_STYLE_FALLBACK,l as SITE_MAIN_ATTR,E as TOP_SPACE_SHARED,d as UNDER_HEADER_SHEET_CLASS,N as headerSolidBackground,m as isProductPage,D as pageOwnsTop,M as readHeaderLinkOpacity,h as readHeaderTopInk,I as resolveHeaderHeightPx,U as resolveHeaderToolLook,g as resolveMenuRow,O as resolveNavTextCase,b as resolveUtilStyle};
1
+ import{HEADER_CLEARANCE_CLASS as a,HEADER_HEIGHT_PX as r,TOP_SPACE_ATTR as n}from"efficient-web-builder/render/lib/document/header-clearance";import{parseOption as o}from"efficient-shell/format";function L(e){return typeof e=="number"&&Number.isInteger(e)&&e>=r.min&&e<=r.max?e:r.default}const C="fixed inset-x-0 bottom-0 top-[var(--sf-header-h,88px)]",m=e=>!!e&&e.startsWith("/wheels/")&&e!=="/wheels",l="data-site-main",i="shared";function D(e){if(!e)return!1;if(e.querySelector(`.${a}, [${n}="own"]`))return!0;const t=e.querySelector(`main[${l}]`);return t!=null&&t.querySelector(`[${n}="${i}"]`)==null}const N=(e,t)=>!e&&t?"var(--section-bg)":"var(--bg)",s=[{label:"Uppercase",value:"uppercase"},{label:"Capitalised",value:"capitalised"}],E="uppercase",O=e=>o(s,E,e),_=[{label:"Icon",value:"icon"},{label:"Text",value:"text"}],p="icon",f=e=>o(_,p,e),b=[{label:"Own row",value:"top"},{label:"Same row",value:"inline"}],g="top",P=e=>e==="inline"?"inline":e==="top"||e==="bottom"?"top":null,A="custom";function h(e,t){return e!==A||typeof t!="string"?null:t.trim()||null}const y=80,c=0,u=100,K="data-header-link-opacity",M="--sf-header-link-opacity";function k(e){if(!(typeof e!="number"||!Number.isFinite(e)))return Math.min(u,Math.max(c,Math.round(e)))}const v="data-header-solid-ink";function U(e){return typeof e=="string"&&e.trim()||null}const x=[{label:"Medium",value:"medium"},{label:"Large",value:"large"}],T="medium",R={medium:{size:18,stroke:1.6},large:{size:20,stroke:1.4}},H=[{label:"Cart",value:"cart"},{label:"Bag",value:"bag"}],d="cart",w=e=>({cart:o(H,d,e.cartIcon),glyph:R[o(x,T,e.iconSize)]});export{H as HEADER_CART_ICONS,d as HEADER_CART_ICON_FALLBACK,x as HEADER_ICON_SIZES,T as HEADER_ICON_SIZE_FALLBACK,K as HEADER_LINK_OPACITY_ATTR,y as HEADER_LINK_OPACITY_DEFAULT,u as HEADER_LINK_OPACITY_MAX,c as HEADER_LINK_OPACITY_MIN,M as HEADER_LINK_OPACITY_VAR,b as HEADER_MENU_ROWS,g as HEADER_MENU_ROW_FALLBACK,s as HEADER_NAV_TEXT_CASES,E as HEADER_NAV_TEXT_CASE_FALLBACK,v as HEADER_SOLID_INK_ATTR,A as HEADER_TOP_INK_CUSTOM,_ as HEADER_UTIL_STYLES,p as HEADER_UTIL_STYLE_FALLBACK,l as SITE_MAIN_ATTR,i as TOP_SPACE_SHARED,C as UNDER_HEADER_SHEET_CLASS,N as headerSolidBackground,m as isProductPage,D as pageOwnsTop,k as readHeaderLinkOpacity,U as readHeaderSolidInk,h as readHeaderTopInk,L as resolveHeaderHeightPx,w as resolveHeaderToolLook,P as resolveMenuRow,O as resolveNavTextCase,f as resolveUtilStyle};
@@ -1 +1 @@
1
- import{jsx as i}from"react/jsx-runtime";import f from"../../../../../components/BoxHeaderBar.js";import u from"../../../../../components/SectionGroupBody.js";import{headerBarFromProps as T}from"../../../published-header-bar.js";import{SiteHeaderMeta as g}from"./meta.js";const P={...g,render:({sections:n,navTextCase:a,toolTextStyle:p,iconSize:d,cartIcon:m,menuRow:s,sticky:c,topTextColor:x,topTextCustom:h,linkOpacity:l,heightPx:y,sectionAccent:C,editor:t,...o})=>{const r=i(u,{place:"header",sections:n,widths:o,navTextCase:a,menuRow:s,toolTextStyle:p,iconSize:d,cartIcon:m,editing:t?.isEditing});if(!t?.isEditing)return r;const e=T({sticky:c,topTextColor:x,topTextCustom:h,linkOpacity:l,heightPx:y,sectionAccent:C,...o});return i(f,{sticky:e.sticky,topTextColor:e.topTextColor,topTextCustom:e.topTextCustom,linkOpacity:e.linkOpacity,heightPx:e.heightPx,theme:e.theme,bandCapped:e.bandCapped,children:r})}};export{P as SiteHeaderRender};
1
+ import{jsx as i}from"react/jsx-runtime";import k from"../../../../../components/BoxHeaderBar.js";import u from"../../../../../components/SectionGroupBody.js";import{headerBarFromProps as T}from"../../../published-header-bar.js";import{SiteHeaderMeta as g}from"./meta.js";const P={...g,render:({sections:n,navTextCase:a,toolTextStyle:p,iconSize:d,cartIcon:s,menuRow:m,sticky:c,topTextColor:x,topTextCustom:l,linkOpacity:h,solidInk:y,heightPx:C,sectionAccent:f,editor:t,...o})=>{const r=i(u,{place:"header",sections:n,widths:o,navTextCase:a,menuRow:m,toolTextStyle:p,iconSize:d,cartIcon:s,editing:t?.isEditing});if(!t?.isEditing)return r;const e=T({sticky:c,topTextColor:x,topTextCustom:l,linkOpacity:h,solidInk:y,heightPx:C,sectionAccent:f,...o});return i(k,{sticky:e.sticky,topTextColor:e.topTextColor,topTextCustom:e.topTextCustom,linkOpacity:e.linkOpacity,solidInk:e.solidInk,heightPx:e.heightPx,theme:e.theme,bandCapped:e.bandCapped,children:r})}};export{P as SiteHeaderRender};
@@ -4,6 +4,7 @@ export type HeaderBarSettings = {
4
4
  readonly topTextColor: unknown;
5
5
  readonly topTextCustom: unknown;
6
6
  readonly linkOpacity: unknown;
7
+ readonly solidInk: unknown;
7
8
  readonly heightPx: unknown;
8
9
  readonly theme: unknown;
9
10
  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,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};
1
+ import{chromeOwnWidth as e}from"efficient-web-builder/format/lib/content/section-width";function n(t){return{sticky:t.sticky,topTextColor:t.topTextColor,topTextCustom:t.topTextCustom,linkOpacity:t.linkOpacity,solidInk:t.solidInk,heightPx:t.heightPx,theme:t.sectionAccent,bandCapped:e(t).background==="content"}}function i(t){return n(t.content[0]?.props??{})}export{n as headerBarFromProps,i as headerBarOf};