efficient-web-builder 73.0.0 → 73.1.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.
Files changed (45) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/editor/components/storefront-editor.css +5 -4
  3. package/dist/editor/lib/document/controls.d.ts +1 -0
  4. package/dist/editor/lib/document/controls.js +1 -1
  5. package/dist/editor/lib/document/field-groups.js +1 -1
  6. package/dist/editor/lib/document/passes/inspector.js +1 -1
  7. package/dist/format/lib/content/part-names.d.ts +27 -0
  8. package/dist/format/lib/content/part-names.js +1 -0
  9. package/dist/format/lib/content/section-css.d.ts +3 -0
  10. package/dist/format/lib/content/section-css.js +1 -0
  11. package/dist/format/lib/document/passes/types.d.ts +1 -0
  12. package/dist/format/lib/editor-words-catalogue.d.ts +2 -0
  13. package/dist/format/lib/editor-words-catalogue.js +1 -1
  14. package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
  15. package/dist/render/components/BlockFrame.d.ts +3 -1
  16. package/dist/render/components/BlockFrame.js +1 -1
  17. package/dist/render/components/Btn.d.ts +3 -0
  18. package/dist/render/components/Btn.js +1 -1
  19. package/dist/render/components/ButtonBlock.js +1 -1
  20. package/dist/render/components/Flex.js +1 -1
  21. package/dist/render/components/Grid.js +1 -1
  22. package/dist/render/components/Heading.js +1 -1
  23. package/dist/render/components/HeroArrows.d.ts +4 -1
  24. package/dist/render/components/HeroArrows.js +1 -1
  25. package/dist/render/components/HeroPictures.js +1 -1
  26. package/dist/render/components/HeroPoster.js +1 -1
  27. package/dist/render/components/HeroSection.js +1 -1
  28. package/dist/render/components/HeroSingle.js +1 -1
  29. package/dist/render/components/HeroSlide.js +1 -1
  30. package/dist/render/components/ImageBlock.js +1 -1
  31. package/dist/render/components/Logo.d.ts +3 -1
  32. package/dist/render/components/Logo.js +1 -1
  33. package/dist/render/components/LogoBlock.js +1 -1
  34. package/dist/render/components/SiteGutterFrame.d.ts +3 -1
  35. package/dist/render/components/SiteGutterFrame.js +1 -1
  36. package/dist/render/components/Text.js +1 -1
  37. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  38. package/dist/render/lib/document/custom-css.d.ts +4 -2
  39. package/dist/render/lib/document/custom-css.js +2 -2
  40. package/dist/render/lib/document/passes/index.js +1 -1
  41. package/dist/render/lib/document/passes/section-custom-css.d.ts +2 -0
  42. package/dist/render/lib/document/passes/section-custom-css.js +1 -0
  43. package/dist/render/lib/document/section-css-style.d.ts +4 -0
  44. package/dist/render/lib/document/section-css-style.js +1 -0
  45. package/package.json +4 -4
@@ -1 +1 @@
1
- "use client";import{jsx as n,jsxs as V}from"react/jsx-runtime";import{HideTaker as Ie}from"./ViewHideRoot.js";import{useCallback as v,useEffect as w,useId as Ve,useRef as u,useState as k}from"react";import{markOverlayPortal as re}from"../../format/lib/document/overlay-portal.js";import $e from"./Ticker.js";import{HeroSlideStyleContext as Be}from"./HeroSlide.js";import ze from"./HeroArrows.js";import Xe from"./Reel.js";import{TICKER_PART_ATTR as Ge}from"./PreviewTickerContext.js";import{useReducedMotion as Ye}from"./useReducedMotion.js";import{heroHeightBox as je,heroStoresRatio as qe}from"../../format/lib/content/section-height.js";import{HEADER_HEIGHT_CSS as Ke}from"../lib/document/header-clearance.js";import{nextReel as Fe,normaliseHeroReelShape as Je,reelShown as Qe}from"../../format/lib/reel.js";import{arrowsShown as Ue,arrowStep as We}from"../../format/lib/hero-arrows.js";import{swipeEnabled as Ze,swipeStep as et}from"../../format/lib/hero-swipe.js";import{videoControlShown as tt,videoHeld as rt}from"../../format/lib/hero-video-control.js";import{HERO_SLIDER_GOTO_EVENT as $}from"efficient-easel/draw";import{say as oe}from"../../format/lib/editor-words.js";import{markedChildren as ne}from"../../format/lib/marked-children.js";import{legacyTickerDrawn as ot,TICKER_MOTION_PART as se}from"../../format/lib/hero-ticker.js";import{ON_MEDIA_INK_STYLE as nt}from"../../format/lib/content/ink.js";import{HeroPartBox as st,heroPartScroll as ct}from"./HeroPictures.js";import{entranceDrawn as at}from"../lib/animation/entrance.js";import{readPartMotion as lt}from"../lib/animation/part-motion.js";import{scrim as ce}from"../../format/lib/content/scrim.js";const it="Play video",ut="Hold video",dt="flex h-7 cursor-pointer items-center gap-1.5 rounded-full border border-overlay-chrome/25 bg-overlay-scrim/80 px-[11px] font-mono text-[11px] leading-none tracking-[0.05em] text-overlay-fg",mt=()=>oe("item"),ae=new Map;function ft(m,l){const d=m?.ownerDocument?.defaultView;if(d)return d.addEventListener($,l),()=>d.removeEventListener($,l)}function ht({slides:m,strip:l,alignment:d,textureOpacity:R,showTexture:T,textureColor:S,phoneUpDown:le,phoneSideways:ie,autoplay:B,autoplayInterval:O,showTicker:ue,tickerItems:z,heightDesktop:de,heightTablet:me,heightMobile:fe,heightFixed:he,heightFixedTablet:pe,heightFixedMobile:ve,showPicker:be,pickerShape:xe,pickerPlacement:we,showArrows:ke,arrowsShape:ye,arrowsPlacement:Ee,editing:s,partMotion:X}){const G=je({heightDesktop:de,heightTablet:me,heightMobile:fe,heightFixed:he,heightFixedTablet:pe,heightFixedMobile:ve}),{className:ge,style:_e}=G,H=qe(G),Y=(l?.blockCount??0)>0,Re=!Y&&ot({showTicker:ue,tickerItems:z}),j=(z??[]).map(e=>e?.text?.trim()?e.text:s?mt():"").filter(Boolean),Te=at(lt({_partMotion:X},se)),Se=ct(X,se),f=u(null),q=u(null),K=u(null),N=u(null),F=Ve(),A=u(F),[y,Oe]=k([]),[He,J]=k(0),b=u(0),[Q,U]=k(!1),[Ne,W]=k(null),[E,Ae]=k(!1),L=Ye(),g=v(()=>f.current?.querySelector(".hero-track")??null,[]),i=v((e,t=!1)=>{J(e),W(o=>o===e?o:null),b.current=e,ae.set(A.current,e);const r=f.current?.querySelector(".hero-track");if(r)if(t){const o=r.style.transition;r.style.transition="none",r.style.transform=`translateX(-${Math.max(0,e)*100}%)`,r.offsetHeight,r.style.transition=o}else r.style.transform=`translateX(-${Math.max(0,e)*100}%)`},[]);w(()=>{const e=f.current,t=e?.getAttribute("data-easel-block")||e?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||F;A.current=t;const r=ae.get(t);typeof r=="number"&&(J(r),b.current=r)},[]),w(()=>{const e=g();if(!e)return;const t=()=>{Oe(o=>Fe(o,ne(e,"data-slide-name")))};t();const r=new MutationObserver(t);return r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-slide-name","data-slide-process","data-slide-media"]}),()=>{r.disconnect()}},[g]),w(()=>{if(!s)return;const e=t=>{const r=t.detail;if(!r||typeof r.index!="number")return;const o=f.current,p=o?.getAttribute("data-easel-block")||o?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||A.current;r.id&&r.id!==p||i(r.index,!0)};return ft(f.current,e)},[s,i]);const c=y.length,a=Math.min(Math.max(He,0),Math.max(0,c-1)),M=Ne===a,C=Qe({shown:be,count:c}),Z=Ue({shown:ke,count:c}),ee=tt({editing:s,shown:a,slides:y}),Le=rt({editing:s,playing:E,controlShown:ee}),_=Ze({count:c,editing:s}),h=u(null),x=u(null),Me=v(e=>{if(h.current=null,x.current=null,!_||e.touches.length!==1)return;const t=e.touches[0];h.current={x:t.clientX,y:t.clientY},x.current={x:t.clientX,y:t.clientY}},[_]),Ce=v(e=>{if(!h.current)return;if(e.touches.length!==1){h.current=null;return}const t=e.touches[0];x.current={x:t.clientX,y:t.clientY}},[]),Pe=v(()=>{const e=h.current,t=x.current;if(h.current=null,x.current=null,!_||!e||!t)return;const r=et(t.x-e.x,t.y-e.y,b.current,c);r!==b.current&&i(r)},[_,c,i]);w(()=>{if(s||!B||Q||M||L||c<=1)return;const t=Math.max(1,typeof O=="number"?O:6)*1e3,r=window.setTimeout(()=>i((a+1)%c),t);return()=>window.clearTimeout(r)},[s,B,O,Q,M,L,c,a,i]),w(()=>{const e=[q.current,K.current,N.current].filter(Boolean),t=e.map(o=>re(o)),r=o=>{const p=o.target,P=p.closest("[data-hero-nav]");if(P&&!N.current?.contains(P))return;const D=P,te=D??p.closest("[data-idx]");if(!te)return;o.stopPropagation(),o.preventDefault();const I=D?We(D.dataset.heroNav,b.current,c):Number(te.dataset.idx);Number.isNaN(I)||(i(I,s),ne(g(),"data-slide-name")[I]?.click())};return e.forEach(o=>o.addEventListener("click",r,{capture:!0})),()=>{t.forEach(o=>o?.()),e.forEach(o=>o.removeEventListener("click",r,{capture:!0}))}},[c,i,g,s]);const De=v(e=>{if(!e)return;const t=re(e),r=o=>{o.stopPropagation(),o.preventDefault(),Ae(p=>!p)};return e.addEventListener("click",r,{capture:!0}),()=>{t?.(),e.removeEventListener("click",r,{capture:!0})}},[]);return n(Be.Provider,{value:{alignment:d,textureOpacity:R,textureOn:T,textureColor:S,quietVideo:Le,phoneUpDown:le,phoneSideways:ie,holdReel:()=>W(a),reelHeld:M,shownSlide:a,ratioMin:H},children:V(Ie,{ref:f,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${ge} max-w-[var(--sf-hero-cap,none)] ${H?"overflow-clip":"overflow-hidden"}`,style:_e,onMouseEnter:()=>U(!0),onMouseLeave:()=>U(!1),onTouchStart:Me,onTouchMove:Ce,onTouchEnd:Pe,children:[n(m,{className:H?"hero-track flex min-h-full [&>*]:min-h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full":"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:`translateX(-${a*100}%)`,transition:L?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),ee&&n("div",{ref:De,"data-hero-video-control":E?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${Ke} + 16px)`},children:V("button",{type:"button",className:dt,children:[n("span",{"aria-hidden":"true",children:E?"❚❚":"▶"}),oe(E?ut:it)]})}),(C||Z)&&V("div",{className:"pointer-events-none absolute inset-y-0 left-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] right-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] z-[6] mx-auto max-w-[var(--sf-hero-chrome-cap,calc(var(--sf-site-width,1600px)_-_var(--sf-site-gutter,40px)*2))]",children:[C&&n(Xe,{ref:q,slides:y,active:a,shape:Je(xe),placement:we}),Z&&n(ze,{ref:N,shape:ye,placement:Ee})]}),C&&n("div",{ref:K,className:"sf-hero-phone-dots absolute bottom-[80px] left-1/2 z-[6] hidden -translate-x-1/2 items-center gap-2",children:y.map((e,t)=>n("button",{type:"button","data-idx":t,"aria-label":`Go to slide ${t+1}`,className:`h-2 rounded-full transition-all motion-reduce:transition-none ${t===a?"w-5 bg-accent":"w-2 bg-white/45 hover:bg-white/70"}`},t))}),Y&&l&&n("div",{className:"sf-hero-strip absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10",style:{background:ce(.55),...nt},children:n(l,{})}),Re&&j.length>0&&n(pt,{editing:!!s,entrance:Te,scroll:Se,children:n($e,{items:j,backdrop:"dark-media"})})]})})}function pt({editing:m,entrance:l,scroll:d,children:R}){const T="sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5",S=m?{[Ge]:""}:void 0;return n(st,{entrance:l,scroll:d,editing:m,className:T,attrs:S,style:{background:ce(.55)},children:R})}export{$ as HERO_SLIDER_GOTO_EVENT,ut as HERO_VIDEO_HOLD_LABEL,it as HERO_VIDEO_PLAY_LABEL,ht as default,ft as subscribeSliderGoto};
1
+ "use client";import{jsx as n,jsxs as $}from"react/jsx-runtime";import{HideTaker as Ve}from"./ViewHideRoot.js";import{useCallback as v,useEffect as k,useId as $e,useRef as u,useState as y}from"react";import{markOverlayPortal as oe}from"../../format/lib/document/overlay-portal.js";import Be from"./Ticker.js";import{HeroSlideStyleContext as ze}from"./HeroSlide.js";import Xe from"./HeroArrows.js";import Ge from"./Reel.js";import{TICKER_PART_ATTR as Ye}from"./PreviewTickerContext.js";import{useReducedMotion as je}from"./useReducedMotion.js";import{heroHeightBox as qe,heroStoresRatio as Ke}from"../../format/lib/content/section-height.js";import{HEADER_HEIGHT_CSS as Fe}from"../lib/document/header-clearance.js";import{nextReel as Je,normaliseHeroReelShape as Qe,reelShown as Ue}from"../../format/lib/reel.js";import{arrowsShown as We,arrowStep as Ze}from"../../format/lib/hero-arrows.js";import{swipeEnabled as et,swipeStep as tt}from"../../format/lib/hero-swipe.js";import{videoControlShown as rt,videoHeld as ot}from"../../format/lib/hero-video-control.js";import{HERO_SLIDER_GOTO_EVENT as B}from"efficient-easel/draw";import{say as ne}from"../../format/lib/editor-words.js";import{markedChildren as se}from"../../format/lib/marked-children.js";import{legacyTickerDrawn as nt,TICKER_MOTION_PART as ce}from"../../format/lib/hero-ticker.js";import{ON_MEDIA_INK_STYLE as st}from"../../format/lib/content/ink.js";import{HeroPartBox as ct,heroPartScroll as at}from"./HeroPictures.js";import{entranceDrawn as lt}from"../lib/animation/entrance.js";import{readPartMotion as it}from"../lib/animation/part-motion.js";import{scrim as ae}from"../../format/lib/content/scrim.js";import{partAttr as b}from"../../format/lib/content/part-names.js";const ut="Play video",dt="Hold video",mt="flex h-7 cursor-pointer items-center gap-1.5 rounded-full border border-overlay-chrome/25 bg-overlay-scrim/80 px-[11px] font-mono text-[11px] leading-none tracking-[0.05em] text-overlay-fg",ft=()=>ne("item"),le=new Map;function ht(m,l){const d=m?.ownerDocument?.defaultView;if(d)return d.addEventListener(B,l),()=>d.removeEventListener(B,l)}function pt({slides:m,strip:l,alignment:d,textureOpacity:T,showTexture:S,textureColor:O,phoneUpDown:ie,phoneSideways:ue,autoplay:z,autoplayInterval:H,showTicker:de,tickerItems:X,heightDesktop:me,heightTablet:fe,heightMobile:he,heightFixed:pe,heightFixedTablet:ve,heightFixedMobile:be,showPicker:xe,pickerShape:we,pickerPlacement:ke,showArrows:ye,arrowsShape:Ee,arrowsPlacement:ge,editing:s,partMotion:G}){const Y=qe({heightDesktop:me,heightTablet:fe,heightMobile:he,heightFixed:pe,heightFixedTablet:ve,heightFixedMobile:be}),{className:_e,style:Re}=Y,N=Ke(Y),j=(l?.blockCount??0)>0,Te=!j&&nt({showTicker:de,tickerItems:X}),q=(X??[]).map(e=>e?.text?.trim()?e.text:s?ft():"").filter(Boolean),Se=lt(it({_partMotion:G},ce)),Oe=at(G,ce),f=u(null),K=u(null),F=u(null),A=u(null),J=$e(),L=u(J),[E,He]=y([]),[Ne,Q]=y(0),x=u(0),[U,W]=y(!1),[Ae,Z]=y(null),[g,Le]=y(!1),M=je(),_=v(()=>f.current?.querySelector(".hero-track")??null,[]),i=v((e,t=!1)=>{Q(e),Z(o=>o===e?o:null),x.current=e,le.set(L.current,e);const r=f.current?.querySelector(".hero-track");if(r)if(t){const o=r.style.transition;r.style.transition="none",r.style.transform=`translateX(-${Math.max(0,e)*100}%)`,r.offsetHeight,r.style.transition=o}else r.style.transform=`translateX(-${Math.max(0,e)*100}%)`},[]);k(()=>{const e=f.current,t=e?.getAttribute("data-easel-block")||e?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||J;L.current=t;const r=le.get(t);typeof r=="number"&&(Q(r),x.current=r)},[]),k(()=>{const e=_();if(!e)return;const t=()=>{He(o=>Je(o,se(e,"data-slide-name")))};t();const r=new MutationObserver(t);return r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-slide-name","data-slide-process","data-slide-media"]}),()=>{r.disconnect()}},[_]),k(()=>{if(!s)return;const e=t=>{const r=t.detail;if(!r||typeof r.index!="number")return;const o=f.current,p=o?.getAttribute("data-easel-block")||o?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||L.current;r.id&&r.id!==p||i(r.index,!0)};return ht(f.current,e)},[s,i]);const c=E.length,a=Math.min(Math.max(Ne,0),Math.max(0,c-1)),P=Ae===a,C=Ue({shown:xe,count:c}),ee=We({shown:ye,count:c}),te=rt({editing:s,shown:a,slides:E}),Me=ot({editing:s,playing:g,controlShown:te}),R=et({count:c,editing:s}),h=u(null),w=u(null),Pe=v(e=>{if(h.current=null,w.current=null,!R||e.touches.length!==1)return;const t=e.touches[0];h.current={x:t.clientX,y:t.clientY},w.current={x:t.clientX,y:t.clientY}},[R]),Ce=v(e=>{if(!h.current)return;if(e.touches.length!==1){h.current=null;return}const t=e.touches[0];w.current={x:t.clientX,y:t.clientY}},[]),De=v(()=>{const e=h.current,t=w.current;if(h.current=null,w.current=null,!R||!e||!t)return;const r=tt(t.x-e.x,t.y-e.y,x.current,c);r!==x.current&&i(r)},[R,c,i]);k(()=>{if(s||!z||U||P||M||c<=1)return;const t=Math.max(1,typeof H=="number"?H:6)*1e3,r=window.setTimeout(()=>i((a+1)%c),t);return()=>window.clearTimeout(r)},[s,z,H,U,P,M,c,a,i]),k(()=>{const e=[K.current,F.current,A.current].filter(Boolean),t=e.map(o=>oe(o)),r=o=>{const p=o.target,D=p.closest("[data-hero-nav]");if(D&&!A.current?.contains(D))return;const I=D,re=I??p.closest("[data-idx]");if(!re)return;o.stopPropagation(),o.preventDefault();const V=I?Ze(I.dataset.heroNav,x.current,c):Number(re.dataset.idx);Number.isNaN(V)||(i(V,s),se(_(),"data-slide-name")[V]?.click())};return e.forEach(o=>o.addEventListener("click",r,{capture:!0})),()=>{t.forEach(o=>o?.()),e.forEach(o=>o.removeEventListener("click",r,{capture:!0}))}},[c,i,_,s]);const Ie=v(e=>{if(!e)return;const t=oe(e),r=o=>{o.stopPropagation(),o.preventDefault(),Le(p=>!p)};return e.addEventListener("click",r,{capture:!0}),()=>{t?.(),e.removeEventListener("click",r,{capture:!0})}},[]);return n(ze.Provider,{value:{alignment:d,textureOpacity:T,textureOn:S,textureColor:O,quietVideo:Me,phoneUpDown:ie,phoneSideways:ue,holdReel:()=>Z(a),reelHeld:P,shownSlide:a,ratioMin:N},children:$(Ve,{ref:f,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${_e} max-w-[var(--sf-hero-cap,none)] ${N?"overflow-clip":"overflow-hidden"}`,style:Re,onMouseEnter:()=>W(!0),onMouseLeave:()=>W(!1),onTouchStart:Pe,onTouchMove:Ce,onTouchEnd:De,...b("hero"),children:[n(m,{className:N?"hero-track flex min-h-full [&>*]:min-h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full":"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:`translateX(-${a*100}%)`,transition:M?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),te&&n("div",{ref:Ie,"data-hero-video-control":g?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${Fe} + 16px)`},children:$("button",{type:"button",className:mt,children:[n("span",{"aria-hidden":"true",children:g?"❚❚":"▶"}),ne(g?dt:ut)]})}),(C||ee)&&$("div",{className:"pointer-events-none absolute inset-y-0 left-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] right-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] z-[6] mx-auto max-w-[var(--sf-hero-chrome-cap,calc(var(--sf-site-width,1600px)_-_var(--sf-site-gutter,40px)*2))]",children:[C&&n(Ge,{ref:K,slides:E,active:a,shape:Qe(we),placement:ke}),ee&&n(Xe,{ref:A,shape:Ee,placement:ge,part:b("arrows"),buttonPart:b("arrow")})]}),C&&n("div",{ref:F,className:"sf-hero-phone-dots absolute bottom-[80px] left-1/2 z-[6] hidden -translate-x-1/2 items-center gap-2",...b("dots"),children:E.map((e,t)=>n("button",{type:"button","data-idx":t,"aria-label":`Go to slide ${t+1}`,className:`h-2 rounded-full transition-all motion-reduce:transition-none ${t===a?"w-5 bg-accent":"w-2 bg-white/45 hover:bg-white/70"}`,...b("dot")},t))}),j&&l&&n("div",{className:"sf-hero-strip absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10",style:{background:ae(.55),...st},...b("strip"),children:n(l,{})}),Te&&q.length>0&&n(vt,{editing:!!s,entrance:Se,scroll:Oe,children:n(Be,{items:q,backdrop:"dark-media"})})]})})}function vt({editing:m,entrance:l,scroll:d,children:T}){const S="sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5",O=m?{[Ye]:""}:void 0;return n(ct,{entrance:l,scroll:d,editing:m,className:S,attrs:O,style:{background:ae(.55)},children:T})}export{B as HERO_SLIDER_GOTO_EVENT,dt as HERO_VIDEO_HOLD_LABEL,ut as HERO_VIDEO_PLAY_LABEL,pt as default,ht as subscribeSliderGoto};
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as N}from"react/jsx-runtime";import{HideTaker as ee}from"./ViewHideRoot.js";import{useRef as oe,useState as re}from"react";import te from"./HeroPoster.js";import{HeroMediaLayer as ie,heroMediaReading as se,HeroPickArea as ae,heroPartEntrance as ne,heroPartHover as le,heroPartScroll as ce,heroPictureOrigins as me,HeroPictureHover as ue,heroPicturesHover as de,HeroTint as he,HeroTwoPictures as fe}from"./HeroPictures.js";import{HeroVideoBackdrop as pe,HeroVideoPlayer as ge}from"./HeroVideoPlay.js";import{resolveMedia as i}from"../lib/media.js";import{heroHeightBox as ve,heroStoresRatio as ye}from"../../format/lib/content/section-height.js";import{DEFAULT_OVERLAY_POSITION as He,overlayGradient as xe}from"../../format/lib/sections/hero-overlay.js";import{ON_MEDIA_INK_STYLE as Pe}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as u}from"../../format/lib/content/tint.js";import{HERO_ABSENT_MEDIA_TYPE as be}from"../../format/lib/hero-media-layout.js";import we from"./PhotoHoverSheet.js";function Te({overlay:k=100,overlayColor:I=u,overlayPosition:L=He,mediaType:d=be.HeroSingle,mediaSrc:s,poster:h,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l,tintColor:f=u,tintOpacity:p=0,heightDesktop:A,heightMobile:O,heightFixed:R,heightFixedTablet:V,heightFixedMobile:j,boxes:g,videoSource:z,youtubeUrl:M,videoPlayback:B,mediaLayout:D,mediaLayoutPhone:Y,mediaImage2:F,objectPosition2:C,objectPosition2Phone:U,objectPosition2Tablet:$,tintColor2:G=u,tintOpacity2:K=0,editing:o=!1,partMotion:r}){const v=ve({heightDesktop:A,heightMobile:O,heightFixed:R,heightFixedTablet:V,heightFixedMobile:j}),{className:q,style:J}=v,y=ye(v),c=d==="video",H=c?i(s):void 0,x=c?i(h):i(s)??i(h),{fromYouTube:P,onClick:b,youTubeId:w,backgroundFile:T,desktopLayout:Q,phoneLayout:W,twoPictures:_}=se({isVideo:c,videoSource:z,videoPlayback:B,youtubeUrl:M,mediaLayout:D,mediaLayoutPhone:Y}),[S,X]=re(!1),m=!S,Z=oe(null),t=d==="video"?"media":"image",E=de(r);return N(ee,{as:"section",ref:Z,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${q} max-w-[var(--sf-hero-cap,none)] ${y?"overflow-clip":"overflow-hidden"}`,style:J,...E.hostAttrs,children:[e(we,{sheet:E.sheet}),e(ie,{partMotion:r,editing:o,children:_?e(fe,{desktopLayout:Q,phoneLayout:W,editing:o,partMotion:r,first:{src:s,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l,tintColor:f,tintOpacity:p},second:{src:F,objectPosition:C,objectPositionPhone:U,objectPositionTablet:$,tintColor:G,tintOpacity:K}}):e(ae,{part:t,editing:o,entrance:t==="image"?ne(r,"image"):null,scroll:t==="image"?ce(r,"image"):null,origins:me({objectPosition:a,objectPositionTablet:l,objectPositionPhone:n}),className:"absolute inset-0 z-[1]",children:N(ue,{treatment:t==="image"?le(r,"image"):{},children:[e(te,{videoSrc:T?H:void 0,posterSrc:x,showVideo:T,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l}),P&&e(pe,{youTubeId:w,ownPoster:!!x,background:!b,editing:o})]})})}),b&&e(ge,{youTubeId:w,fileSrc:P?void 0:H,playing:S,onPlay:()=>X(!0),editing:o}),m&&!_&&e(he,{color:f,opacity:p}),m&&e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:xe(I,L),opacity:Math.min(Math.max(k,0),100)/100}}),m&&g&&e("div",{className:[y?"sf-hero-group-layer relative min-h-full z-[3] mx-auto":"sf-hero-group-layer absolute inset-0 z-[3] mx-auto","max-w-[var(--sf-site-width,1600px)]","px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",o?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:Pe,children:e(g,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}export{Te as default};
1
+ "use client";import{jsx as e,jsxs as k}from"react/jsx-runtime";import{HideTaker as oe}from"./ViewHideRoot.js";import{useRef as re,useState as te}from"react";import ie from"./HeroPoster.js";import{HeroMediaLayer as se,heroMediaReading as ae,HeroPickArea as ne,heroPartEntrance as le,heroPartHover as ce,heroPartScroll as me,heroPictureOrigins as ue,HeroPictureHover as he,heroPicturesHover as de,HeroTint as fe,HeroTwoPictures as pe}from"./HeroPictures.js";import{HeroVideoBackdrop as ge,HeroVideoPlayer as ve}from"./HeroVideoPlay.js";import{resolveMedia as i}from"../lib/media.js";import{heroHeightBox as ye,heroStoresRatio as He}from"../../format/lib/content/section-height.js";import{DEFAULT_OVERLAY_POSITION as xe,overlayGradient as Pe}from"../../format/lib/sections/hero-overlay.js";import{ON_MEDIA_INK_STYLE as be}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as u}from"../../format/lib/content/tint.js";import{HERO_ABSENT_MEDIA_TYPE as we}from"../../format/lib/hero-media-layout.js";import Te from"./PhotoHoverSheet.js";import{partAttr as h}from"../../format/lib/content/part-names.js";function _e({overlay:A=100,overlayColor:I=u,overlayPosition:L=xe,mediaType:d=we.HeroSingle,mediaSrc:s,poster:f,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l,tintColor:p=u,tintOpacity:g=0,heightDesktop:O,heightMobile:R,heightFixed:V,heightFixedTablet:j,heightFixedMobile:z,boxes:v,videoSource:M,youtubeUrl:B,videoPlayback:D,mediaLayout:Y,mediaLayoutPhone:F,mediaImage2:C,objectPosition2:U,objectPosition2Phone:$,objectPosition2Tablet:G,tintColor2:K=u,tintOpacity2:q=0,editing:o=!1,partMotion:r}){const y=ye({heightDesktop:O,heightMobile:R,heightFixed:V,heightFixedTablet:j,heightFixedMobile:z}),{className:J,style:Q}=y,H=He(y),c=d==="video",x=c?i(s):void 0,P=c?i(f):i(s)??i(f),{fromYouTube:b,onClick:w,youTubeId:T,backgroundFile:_,desktopLayout:W,phoneLayout:X,twoPictures:S}=ae({isVideo:c,videoSource:M,videoPlayback:D,youtubeUrl:B,mediaLayout:Y,mediaLayoutPhone:F}),[E,Z]=te(!1),m=!E,ee=re(null),t=d==="video"?"media":"image",N=de(r);return k(oe,{as:"section",ref:ee,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${J} max-w-[var(--sf-hero-cap,none)] ${H?"overflow-clip":"overflow-hidden"}`,style:Q,...N.hostAttrs,...h("hero"),children:[e(Te,{sheet:N.sheet}),e(se,{partMotion:r,editing:o,children:S?e(pe,{desktopLayout:W,phoneLayout:X,editing:o,partMotion:r,first:{src:s,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l,tintColor:p,tintOpacity:g},second:{src:C,objectPosition:U,objectPositionPhone:$,objectPositionTablet:G,tintColor:K,tintOpacity:q}}):e(ne,{part:t,editing:o,entrance:t==="image"?le(r,"image"):null,scroll:t==="image"?me(r,"image"):null,origins:ue({objectPosition:a,objectPositionTablet:l,objectPositionPhone:n}),className:"absolute inset-0 z-[1]",children:k(he,{treatment:t==="image"?ce(r,"image"):{},children:[e(ie,{videoSrc:_?x:void 0,posterSrc:P,showVideo:_,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l}),b&&e(ge,{youTubeId:T,ownPoster:!!P,background:!w,editing:o})]})})}),w&&e(ve,{youTubeId:T,fileSrc:b?void 0:x,playing:E,onPlay:()=>Z(!0),editing:o}),m&&!S&&e(fe,{color:p,opacity:g}),m&&e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:Pe(I,L),opacity:Math.min(Math.max(A,0),100)/100},...h("overlay")}),m&&v&&e("div",{className:[H?"sf-hero-group-layer relative min-h-full z-[3] mx-auto":"sf-hero-group-layer absolute inset-0 z-[3] mx-auto","max-w-[var(--sf-site-width,1600px)]","px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",o?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:be,...h("hero-content"),children:e(v,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}export{_e as default};
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as $}from"react/jsx-runtime";import{useTakeViewHide as He,withViewHide as Te}from"./ViewHideRoot.js";import{createContext as be,useContext as ke,useEffect as Ee,useRef as _e,useState as M}from"react";import Ae from"./HeroPoster.js";import{HeroMediaLayer as Le,heroMediaReading as Oe,HeroPickArea as Ne,heroPartEntrance as Ie,heroPartHover as Re,heroPartScroll as Ve,heroPictureOrigins as Ce,HeroPictureHover as De,heroPicturesHover as je,HeroTint as ze,HeroTwoPictures as Fe}from"./HeroPictures.js";import{HeroVideoBackdrop as Be,HeroVideoPlayer as $e}from"./HeroVideoPlay.js";import{BelowFirstScreen as Me,useFirstScreenPlace as Ye}from"../lib/first-screen.js";import{markedChildren as qe}from"../../format/lib/marked-children.js";import{resolveMedia as r}from"../lib/media.js";import{heroPhoneStackStyle as Ue}from"../../format/lib/hero-phone-stack.js";import{heroTextureGradient as Ge,heroTextureShown as Ke}from"../../format/lib/hero-texture.js";import{ON_MEDIA_INK_STYLE as Je}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as Y}from"../../format/lib/content/tint.js";import{HERO_ABSENT_MEDIA_TYPE as Qe}from"../../format/lib/hero-media-layout.js";import{overlayGradient as We,slideOverlayState as Xe}from"../../format/lib/sections/hero-overlay.js";import Ze from"./PhotoHoverSheet.js";const eo=be({});function oo({name:g,process:d,mediaType:q=Qe.HeroSlide,mediaSrc:c,videoSpeed:w,poster:H,mediaAv1:U,mediaSrcPhone:G,mediaAv1Phone:K,posterPhone:J,objectPosition:u,objectPositionPhone:f,objectPositionTablet:p,tintColor:T=Y,tintOpacity:b=0,groups:k,editing:i=!1,themeClassName:E,themeStyle:Q,overlayColor:W,overlayPosition:X,mediaLayout:Z,mediaLayoutPhone:ee,mediaImage2:oe,objectPosition2:re,objectPosition2Phone:te,objectPosition2Tablet:ie,tintColor2:ne=Y,tintOpacity2:se=0,videoSource:ae,youtubeUrl:le,videoPlayback:de,partMotion:n,laterSlide:m=!1}){const h=He(),{alignment:ro="left",textureOpacity:_,textureOn:ce,textureColor:ue,quietVideo:fe,phoneUpDown:pe,phoneSideways:me,holdReel:he,reelHeld:ve,shownSlide:v,ratioMin:A}=ke(eo),ye=Ye(),L=m&&ye==="first",O=_e(null),[Se,xe]=M(v===void 0?void 0:!1);Ee(()=>{const P=O.current;xe(v===void 0||!P?void 0:qe(P.closest(".hero-track"),"data-slide-name")[v]===P)});const o=q==="video",y=o?r(c):void 0,N=o?r(H):r(c)??r(H),t=o?{av1:r(U),phone:r(G),av1Phone:r(K),poster:r(J)}:{},Pe=typeof w=="number"?w/100:1,{fromYouTube:s,onClick:I,youTubeId:R,backgroundFile:a,desktopLayout:ge,phoneLayout:we,twoPictures:V}=Oe({isVideo:o,videoSource:ae,videoPlayback:de,youtubeUrl:le,mediaLayout:Z,mediaLayoutPhone:ee}),[S,C]=M(!1);S&&ve===!1&&C(!1);const x=!S,l=Xe({overlayColor:W,overlayPosition:X},ue),D=o?null:Ie(n,"image"),j=o?null:Ve(n,"image"),z=je(n),F=e(De,{treatment:o?{}:Re(n,"image"),children:e(Ae,{videoSrc:a?y:void 0,videoAv1Src:a?t.av1:void 0,videoSrcPhone:a?t.phone:void 0,videoAv1SrcPhone:a?t.av1Phone:void 0,posterSrc:N,posterSrcPhone:t.poster,showVideo:a,playbackRate:Pe,objectPosition:u,objectPositionPhone:o?void 0:f,objectPositionTablet:o?void 0:p,quiet:fe,slideShown:Se,laterSlide:m,laterOfLead:L})}),B=$("section",{ref:O,className:Te(`${A?"relative min-h-full w-full overflow-clip":"relative h-full w-full overflow-hidden"}${E?` ${E}`:""}`,h.className),...h.attrs,style:Q,"data-slide-name":g??"","data-slide-process":d??"","data-slide-media":a&&y?"video":"still",...z.hostAttrs,children:[e(Ze,{sheet:z.sheet}),e(Le,{partMotion:n,editing:i,children:V?e(Fe,{laterSlide:m,desktopLayout:ge,phoneLayout:we,editing:i,partMotion:n,first:{src:c,objectPosition:u,objectPositionPhone:f,objectPositionTablet:p,tintColor:T,tintOpacity:b},second:{src:oe,objectPosition:re,objectPositionPhone:te,objectPositionTablet:ie,tintColor:ne,tintOpacity:se}}):s||D||j?$(Ne,{part:o?"media":"image",editing:i,entrance:D,scroll:j,origins:Ce({objectPosition:u,objectPositionTablet:p,objectPositionPhone:f}),className:"absolute inset-0 z-[1]",children:[F,s&&e(Be,{youTubeId:R,ownPoster:!!N,background:!I,editing:i})]}):F}),I&&e($e,{youTubeId:R,fileSrc:s?void 0:y,fileAv1Src:s?void 0:t.av1,fileSrcPhone:s?void 0:t.phone,fileAv1SrcPhone:s?void 0:t.av1Phone,playing:S,onPlay:()=>{C(!0),he?.()},editing:i}),x&&!V&&e(ze,{color:T,opacity:b,passClicks:!1}),x&&Ke(ce)&&e("div",{className:"absolute inset-0 z-[2]",style:{background:l.own?We(l.color,l.position??void 0):Ge(l.color),..._!==void 0?{opacity:_/100}:null}}),x&&e("div",{className:[A?"sf-hero-group-layer relative min-h-full z-[3] mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14":"sf-hero-group-layer absolute inset-0 z-[3] mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",i?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{...Je,...Ue(pe,me)},children:k&&e(k,{className:"sf-hero-group-zone",minEmptyHeight:160})})]});return h.scope(L?e(Me,{children:B}):B)}const Po=Array.from({length:3},(g,d)=>({name:`Slide ${d+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));export{Po as HERO_SLIDE_SEEDS,eo as HeroSlideStyleContext,oo as default};
1
+ "use client";import{jsx as e,jsxs as M}from"react/jsx-runtime";import{useTakeViewHide as Te,withViewHide as be}from"./ViewHideRoot.js";import{createContext as ke,useContext as Ee,useEffect as Ae,useRef as _e,useState as Y}from"react";import Le from"./HeroPoster.js";import{HeroMediaLayer as Oe,heroMediaReading as Ne,HeroPickArea as Ie,heroPartEntrance as Re,heroPartHover as Ve,heroPartScroll as Ce,heroPictureOrigins as De,HeroPictureHover as je,heroPicturesHover as ze,HeroTint as Fe,HeroTwoPictures as Be}from"./HeroPictures.js";import{HeroVideoBackdrop as $e,HeroVideoPlayer as Me}from"./HeroVideoPlay.js";import{BelowFirstScreen as Ye,useFirstScreenPlace as qe}from"../lib/first-screen.js";import{markedChildren as Ue}from"../../format/lib/marked-children.js";import{resolveMedia as r}from"../lib/media.js";import{heroPhoneStackStyle as Ge}from"../../format/lib/hero-phone-stack.js";import{heroTextureGradient as Ke,heroTextureShown as Je}from"../../format/lib/hero-texture.js";import{ON_MEDIA_INK_STYLE as Qe}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as q}from"../../format/lib/content/tint.js";import{HERO_ABSENT_MEDIA_TYPE as We}from"../../format/lib/hero-media-layout.js";import{overlayGradient as Xe,slideOverlayState as Ze}from"../../format/lib/sections/hero-overlay.js";import eo from"./PhotoHoverSheet.js";import{partAttr as g}from"../../format/lib/content/part-names.js";const oo=ke({});function ro({name:w,process:d,mediaType:U=We.HeroSlide,mediaSrc:c,videoSpeed:H,poster:T,mediaAv1:G,mediaSrcPhone:K,mediaAv1Phone:J,posterPhone:Q,objectPosition:u,objectPositionPhone:f,objectPositionTablet:p,tintColor:b=q,tintOpacity:k=0,groups:E,editing:i=!1,themeClassName:A,themeStyle:W,overlayColor:X,overlayPosition:Z,mediaLayout:ee,mediaLayoutPhone:oe,mediaImage2:re,objectPosition2:te,objectPosition2Phone:ie,objectPosition2Tablet:ne,tintColor2:se=q,tintOpacity2:ae=0,videoSource:le,youtubeUrl:de,videoPlayback:ce,partMotion:n,laterSlide:m=!1}){const h=Te(),{alignment:to="left",textureOpacity:_,textureOn:ue,textureColor:fe,quietVideo:pe,phoneUpDown:me,phoneSideways:he,holdReel:ve,reelHeld:ye,shownSlide:v,ratioMin:L}=Ee(oo),Se=qe(),O=m&&Se==="first",N=_e(null),[xe,Pe]=Y(v===void 0?void 0:!1);Ae(()=>{const P=N.current;Pe(v===void 0||!P?void 0:Ue(P.closest(".hero-track"),"data-slide-name")[v]===P)});const o=U==="video",y=o?r(c):void 0,I=o?r(T):r(c)??r(T),t=o?{av1:r(G),phone:r(K),av1Phone:r(J),poster:r(Q)}:{},ge=typeof H=="number"?H/100:1,{fromYouTube:s,onClick:R,youTubeId:V,backgroundFile:a,desktopLayout:we,phoneLayout:He,twoPictures:C}=Ne({isVideo:o,videoSource:le,videoPlayback:ce,youtubeUrl:de,mediaLayout:ee,mediaLayoutPhone:oe}),[S,D]=Y(!1);S&&ye===!1&&D(!1);const x=!S,l=Ze({overlayColor:X,overlayPosition:Z},fe),j=o?null:Re(n,"image"),z=o?null:Ce(n,"image"),F=ze(n),B=e(je,{treatment:o?{}:Ve(n,"image"),children:e(Le,{videoSrc:a?y:void 0,videoAv1Src:a?t.av1:void 0,videoSrcPhone:a?t.phone:void 0,videoAv1SrcPhone:a?t.av1Phone:void 0,posterSrc:I,posterSrcPhone:t.poster,showVideo:a,playbackRate:ge,objectPosition:u,objectPositionPhone:o?void 0:f,objectPositionTablet:o?void 0:p,quiet:pe,slideShown:xe,laterSlide:m,laterOfLead:O})}),$=M("section",{ref:N,className:be(`${L?"relative min-h-full w-full overflow-clip":"relative h-full w-full overflow-hidden"}${A?` ${A}`:""}`,h.className),...h.attrs,style:W,"data-slide-name":w??"","data-slide-process":d??"","data-slide-media":a&&y?"video":"still",...F.hostAttrs,...g("slide"),children:[e(eo,{sheet:F.sheet}),e(Oe,{partMotion:n,editing:i,children:C?e(Be,{laterSlide:m,desktopLayout:we,phoneLayout:He,editing:i,partMotion:n,first:{src:c,objectPosition:u,objectPositionPhone:f,objectPositionTablet:p,tintColor:b,tintOpacity:k},second:{src:re,objectPosition:te,objectPositionPhone:ie,objectPositionTablet:ne,tintColor:se,tintOpacity:ae}}):s||j||z?M(Ie,{part:o?"media":"image",editing:i,entrance:j,scroll:z,origins:De({objectPosition:u,objectPositionTablet:p,objectPositionPhone:f}),className:"absolute inset-0 z-[1]",children:[B,s&&e($e,{youTubeId:V,ownPoster:!!I,background:!R,editing:i})]}):B}),R&&e(Me,{youTubeId:V,fileSrc:s?void 0:y,fileAv1Src:s?void 0:t.av1,fileSrcPhone:s?void 0:t.phone,fileAv1SrcPhone:s?void 0:t.av1Phone,playing:S,onPlay:()=>{D(!0),ve?.()},editing:i}),x&&!C&&e(Fe,{color:b,opacity:k,passClicks:!1}),x&&Je(ue)&&e("div",{className:"absolute inset-0 z-[2]",style:{background:l.own?Xe(l.color,l.position??void 0):Ke(l.color),..._!==void 0?{opacity:_/100}:null},...g("overlay")}),x&&e("div",{className:[L?"sf-hero-group-layer relative min-h-full z-[3] mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14":"sf-hero-group-layer absolute inset-0 z-[3] mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",i?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{...Qe,...Ge(me,he)},...g("hero-content"),children:E&&e(E,{className:"sf-hero-group-zone",minEmptyHeight:160})})]});return h.scope(O?e(Ye,{children:$}):$)}const wo=Array.from({length:3},(w,d)=>({name:`Slide ${d+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));export{wo as HERO_SLIDE_SEEDS,oo as HeroSlideStyleContext,ro as default};
@@ -1 +1 @@
1
- import{jsx as e,Fragment as le,jsxs as w}from"react/jsx-runtime";import{PagePicture as re}from"../lib/first-screen.js";import{SiteLink as ie}from"../lib/site-runtime.js";import{siteLinkDraws as me}from"../../format/lib/content/box-link.js";import ae from"./BlockFrame.js";import{useCellPictureSizes as ne}from"./BoxCellContext.js";import{useBoxCell as ce,useFillsCell as fe}from"./InBoxContext.js";import{useInsideSiteGutter as ue,useSectionEdge as pe}from"./SiteGutterFrame.js";import{useSitePhotography as de}from"./SitePhotographyContext.js";import{media as ge}from"../lib/media.js";import{CONTENT_SIZES as O,sizedImage as he}from"../../format/lib/sized-image.js";import{imageCornerStyle as Se}from"../../format/lib/content/image-corners.js";import{FILL_ROW as ve,imageAspectClasses as we,pictureLayerClass as Fe,imageFillFrom as Ne,imageAspectDrawn as ye,imageAspectDrawsARatio as Ce,imageFocalPointActs as be,imageFocalPointActsIn as j,imageAspectPhoneOf as xe,imageFillRowClasses as Ae,imageWidthFollowsBox as Ie,imageShapeStyle as $e}from"../../format/lib/content/image-aspect.js";import{drawsSiteGutter as ke}from"../../format/lib/content/site-gutter.js";import{imageFitClass as _e,parseImageFit as Pe}from"../../format/lib/content/image-fit.js";import{SECTION_FILL_CLASS as Re}from"../../format/lib/content/section-min-height.js";import{PICTURE_WASH_CLASS as Oe,resolveImageTreatment as je}from"../../format/lib/content/image-treatment.js";import{boxDarkenStyle as Ee}from"../../format/lib/content/box-background.js";import{HOVER_LAYER_GROUND as He}from"../../format/lib/content/hover-media.js";import{phoneFocus as ze}from"../../format/lib/content/phone-focus.js";import{say as Le}from"../../format/lib/editor-words.js";import{sectionEdgeAttrs as Te}from"../lib/content/section-edge.js";import De from"./PhotoHoverSheet.js";import Ge from"./PictureWash.js";import We from"./HoverMediaLayer.js";import{PictureHoverMoveSheet as Be,PictureHoverZoom as Me,pictureHoverMoveOf as Ze}from"./PictureHoverMove.js";import{PictureZoom as Ue}from"./PictureZoom.js";function Ve({src:o,alt:E,aspect:H,aspectPhone:r,contained:F,grayscale:z,pictureHover:N,hoverLayer:s,darken:L,darkenStyle:y,href:T,fit:D,focal:C,focalPhone:G,focalTablet:W,corners:B,cornerSides:M,cornersUnit:Z,pad:b,ownSize:U=!1,editing:x=!1}){const n=je(z,de(),N),p=ce(),V=fe(),d=pe(),Y=ne(O),t=ye(H,p?.picturesFillRow===!0),g=t===ve,A=Ne(p?.fillFrom,p?.phoneRowFills===!0,r),i=g?Ae(A):null,h=xe(t,r),m=Pe(D,"cover"),q=d||!Ie(t,h,m)?O:Y,I=Se(B,M,Z),J=be(m,t,r),S=ze(j("mobile",m,t,r)?G:void 0,j("tablet",m,t,r)?W:void 0),$={...n.style??{},...C&&J?{objectPosition:C}:{},...S.style},c=o?he(ge(o)):null,l=Ze(N,y),K=Ee(L,y),Q=l?.washHover??null,k=$e(t,h),_=k?{...l?.style??{},...k}:l?.style??{},f=s&&o?e(We,{media:s.media,name:s.name,cover:s.cover,ground:He[s.cover]}):null,P=o&&c?e(re,{src:c.src,...c.srcSet?{srcSet:c.srcSet,sizes:q}:{},alt:E,className:`${i?`${i.img} `:""}h-full w-full ${Ce(t,r)?_e(m):""}${n.className?` ${n.className}`:""}${S.className?` ${S.className}`:""}`,...Object.keys($).length?{style:$}:{}}):null,v=P?w(le,{children:[e(De,{sheet:n.sheet}),e(Be,{move:l}),e(Me,{move:l,className:Fe(i),children:P}),e(Ge,{wash:K,hover:Q,className:`pointer-events-none ${Oe}`})]}):e("div",{className:"flex aspect-[16/9] items-center justify-center border border-dashed border-line font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim",children:Le("Image — set a path")}),u=(T??"").trim(),X=u&&o?me(u)?e(ie,{href:u,className:"block h-full w-full",newTab:"auto",children:v}):e("a",{href:u,className:"block h-full w-full",children:v}):v,ee=ue(),a=d&&!U?Te(d):null,R=b?{values:b,frame:g?0:24}:void 0,te=R!==void 0&&ke(a?!1:F,ee),oe=g?V||x||te?Re:"":"py-6",se=o&&m==="contain"?"":"bg-surface ";return!o&&!x?null:w(ae,{contained:a?!1:F,className:oe,pad:R,...a?{fillWidth:a.className,style:a.style}:{},children:[e("figure",{...i?{className:i.figure}:{},children:w("div",{className:`relative w-full overflow-hidden ${se}${we(t,h,A)}${l?` ${l.className}`:""}`,...I||Object.keys(_).length?{style:{...I,..._}}:{},children:[e(Ue,{fill:i,children:X}),f&&s?.cover==="picture"?f:null]})}),f&&s?.cover==="card"?f:null]})}export{Ve as default};
1
+ import{jsx as e,Fragment as le,jsxs as w}from"react/jsx-runtime";import{PagePicture as ie}from"../lib/first-screen.js";import{SiteLink as me}from"../lib/site-runtime.js";import{siteLinkDraws as ae}from"../../format/lib/content/box-link.js";import ne from"./BlockFrame.js";import{partAttr as F}from"../../format/lib/content/part-names.js";import{useCellPictureSizes as ce}from"./BoxCellContext.js";import{useBoxCell as fe,useFillsCell as pe}from"./InBoxContext.js";import{useInsideSiteGutter as ue,useSectionEdge as de}from"./SiteGutterFrame.js";import{useSitePhotography as ge}from"./SitePhotographyContext.js";import{media as he}from"../lib/media.js";import{CONTENT_SIZES as j,sizedImage as Se}from"../../format/lib/sized-image.js";import{imageCornerStyle as ve}from"../../format/lib/content/image-corners.js";import{FILL_ROW as we,imageAspectClasses as Fe,pictureLayerClass as Ne,imageFillFrom as ye,imageAspectDrawn as Ce,imageAspectDrawsARatio as be,imageFocalPointActs as Ae,imageFocalPointActsIn as E,imageAspectPhoneOf as xe,imageFillRowClasses as ke,imageWidthFollowsBox as Ie,imageShapeStyle as $e}from"../../format/lib/content/image-aspect.js";import{drawsSiteGutter as _e}from"../../format/lib/content/site-gutter.js";import{imageFitClass as Pe,parseImageFit as Re}from"../../format/lib/content/image-fit.js";import{SECTION_FILL_CLASS as Oe}from"../../format/lib/content/section-min-height.js";import{PICTURE_WASH_CLASS as je,resolveImageTreatment as Ee}from"../../format/lib/content/image-treatment.js";import{boxDarkenStyle as He}from"../../format/lib/content/box-background.js";import{HOVER_LAYER_GROUND as ze}from"../../format/lib/content/hover-media.js";import{phoneFocus as Le}from"../../format/lib/content/phone-focus.js";import{say as Te}from"../../format/lib/editor-words.js";import{sectionEdgeAttrs as De}from"../lib/content/section-edge.js";import Ge from"./PhotoHoverSheet.js";import We from"./PictureWash.js";import Be from"./HoverMediaLayer.js";import{PictureHoverMoveSheet as Me,PictureHoverZoom as Ze,pictureHoverMoveOf as Ue}from"./PictureHoverMove.js";import{PictureZoom as Ve}from"./PictureZoom.js";function Ye({src:o,alt:H,aspect:z,aspectPhone:l,contained:N,grayscale:L,pictureHover:y,hoverLayer:s,darken:T,darkenStyle:C,href:D,fit:G,focal:b,focalPhone:W,focalTablet:B,corners:M,cornerSides:Z,cornersUnit:U,pad:A,ownSize:V=!1,editing:x=!1}){const n=Ee(L,ge(),y),u=fe(),Y=pe(),d=de(),q=ce(j),t=Ce(z,u?.picturesFillRow===!0),g=t===we,k=ye(u?.fillFrom,u?.phoneRowFills===!0,l),i=g?ke(k):null,h=xe(t,l),m=Re(G,"cover"),J=d||!Ie(t,h,m)?j:q,I=ve(M,Z,U),K=Ae(m,t,l),S=Le(E("mobile",m,t,l)?W:void 0,E("tablet",m,t,l)?B:void 0),$={...n.style??{},...b&&K?{objectPosition:b}:{},...S.style},c=o?Se(he(o)):null,r=Ue(y,C),Q=He(T,C),X=r?.washHover??null,_=$e(t,h),P=_?{...r?.style??{},..._}:r?.style??{},f=s&&o?e(Be,{media:s.media,name:s.name,cover:s.cover,ground:ze[s.cover]}):null,R=o&&c?e(ie,{src:c.src,...c.srcSet?{srcSet:c.srcSet,sizes:J}:{},alt:H,className:`${i?`${i.img} `:""}h-full w-full ${be(t,l)?Pe(m):""}${n.className?` ${n.className}`:""}${S.className?` ${S.className}`:""}`,...Object.keys($).length?{style:$}:{},...F("image")}):null,v=R?w(le,{children:[e(Ge,{sheet:n.sheet}),e(Me,{move:r}),e(Ze,{move:r,className:Ne(i),children:R}),e(We,{wash:Q,hover:X,className:`pointer-events-none ${je}`})]}):e("div",{className:"flex aspect-[16/9] items-center justify-center border border-dashed border-line font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim",children:Te("Image — set a path")}),p=(D??"").trim(),ee=p&&o?ae(p)?e(me,{href:p,className:"block h-full w-full",newTab:"auto",children:v}):e("a",{href:p,className:"block h-full w-full",children:v}):v,te=ue(),a=d&&!V?De(d):null,O=A?{values:A,frame:g?0:24}:void 0,oe=O!==void 0&&_e(a?!1:N,te),se=g?Y||x||oe?Oe:"":"py-6",re=o&&m==="contain"?"":"bg-surface ";return!o&&!x?null:w(ne,{contained:a?!1:N,className:se,pad:O,...a?{fillWidth:a.className,style:a.style}:{},part:F("image-block"),children:[e("figure",{...i?{className:i.figure}:{},children:w("div",{className:`relative w-full overflow-hidden ${re}${Fe(t,h,k)}${r?` ${r.className}`:""}`,...I||Object.keys(P).length?{style:{...I,...P}}:{},...F("image-frame"),children:[e(Ve,{fill:i,children:ee}),f&&s?.cover==="picture"?f:null]})}),f&&s?.cover==="card"?f:null]})}export{Ye as default};
@@ -1,6 +1,8 @@
1
+ import type { PartAttr } from "../../format/lib/content/part-names.js";
1
2
  interface Props {
2
3
  hideClass?: string;
3
4
  hideAttrs?: Record<string, string>;
5
+ part?: PartAttr;
4
6
  variant?: "header" | "footer";
5
7
  scrolled?: boolean;
6
8
  src?: string | null;
@@ -20,4 +22,4 @@ interface Props {
20
22
  }
21
23
  export { FOOTER_LOGO_PX, HEADER_LOGO_PX, HEADER_LOGO_PX_MAX, HEADER_LOGO_PX_MIN, LOGO_BLOCK_PX_MAX } from "../../format/lib/logo/logo-size.js";
22
24
  export declare const WORDMARK_FIT_FLOOR_PX = 16;
23
- export default function Logo({ variant, scrolled, src, reverse, color, onLightSurface, reversedSrc, inkIsDark, size, sizePx, sizeUnit, wordmark, siteName, fitToContainer, fitWordmarkToContainer, fitFloorPx, hideClass, hideAttrs }: Props): import("react").JSX.Element;
25
+ export default function Logo({ variant, scrolled, src, reverse, color, onLightSurface, reversedSrc, inkIsDark, size, sizePx, sizeUnit, wordmark, siteName, fitToContainer, fitWordmarkToContainer, fitFloorPx, hideClass, hideAttrs, part }: Props): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as a,jsxs as v}from"react/jsx-runtime";import{withViewHide as at}from"./ViewHideRoot.js";import{useEffect as h,useId as ut,useRef as W,useState as p}from"react";import{NEUTRAL_SITE_NAME as dt}from"../../format/lib/content/site-name.js";import{useRootIsDark as mt}from"efficient-shell/theme";import{isSvgUrl as ft}from"../../format/lib/logo/reverse-svg.js";import{analyzeLogoViaServer as ht}from"../lib/logo/analyze-logo-client.js";import{siteLengthCss as pt}from"../../format/lib/content/css-length.js";import{FOOTER_LOGO_PX as _t,HEADER_LOGO_GRID as Ot,HEADER_LOGO_PX as gt}from"../../format/lib/logo/logo-size.js";import{FOOTER_LOGO_PX as Ht,HEADER_LOGO_PX as Tt,HEADER_LOGO_PX_MAX as Mt,HEADER_LOGO_PX_MIN as Nt,LOGO_BLOCK_PX_MAX as Wt}from"../../format/lib/logo/logo-size.js";const Et=202/22,Rt=.88,Ft=16,It="invert(1)";function Lt({variant:b="header",scrolled:C=!0,src:_,reverse:j=!1,color:O=null,onLightSurface:P,reversedSrc:D,inkIsDark:K,size:U="medium",sizePx:o,sizeUnit:V,wordmark:g,siteName:q=dt,fitToContainer:x=!1,fitWordmarkToContainer:B=!1,fitFloorPx:u,hideClass:Z,hideAttrs:z}){const d=g&&g.trim()?g.trim():q,[J,Q]=p(null),S=W(null),Y=t=>{S.current=t};h(()=>{Q(S.current?.ownerDocument??null)},[]);const tt=!mt({doc:J,whenUnset:!0}),n=_&&_.trim()?_.trim():null,m=!!n&&ft(n),$=P??(tt&&C),l=O&&O.trim()?O.trim():null,f=j&&!l,k=`logo-color-${ut().replace(/[^A-Za-z0-9_-]/g,"")}`,y=f&&m&&n&&D!=null?{reversed:D,inkIsDark:K??null}:null,w=y!==null,[et,E]=p(null);h(()=>{if(!f||!n||!m||w){E(null);return}let t=!1;return E(null),ht(n).then(c=>{t||E(c)}),()=>{t=!0}},[f,n,m,w]);const s=y??et,F=!!s&&s.inkIsDark!==null&&($?!s.inkIsDark:s.inkIsDark),nt=f&&!!n&&!m&&!$,R=F&&s?s.reversed:n,G=R?[R]:[],[X,I]=p(0);h(()=>{I(0)},[n,F]);const lt=b==="footer"?_t:gt[U],i=o&&o>0?o:lt,r=(o&&o>0?pt(o,V,"size",Ot):null)??`${i}px`,ot=Math.round(i*Et),e=X<G.length?G[X]:null,[st,L]=p(R),H=e!==null&&e===st,T=W(null);h(()=>{const t=T.current;if(!t||!t.complete)return;if(t.naturalWidth>0||t.naturalHeight>0){L(e);return}let c=!1;return t.decode().then(()=>!c&&L(e),()=>!c&&I(ct=>ct+1)),()=>{c=!0}},[e]);const M=x||B,N=`calc(100cqi / ${((d.length+1)*Rt).toFixed(2)})`,A=M&&u&&u>0?r===`${i}px`?`${Math.min(u,i)}px`:`min(${u}px, ${r})`:null,rt=M?A===null?`min(${r}, ${N})`:`clamp(${A}, ${N}, ${r})`:r,it=v("span",{className:`font-display font-bold tracking-[0.18em] ${A===null?"whitespace-nowrap":"whitespace-normal"}`,style:{fontSize:rt,lineHeight:1,...l?{color:l}:{}},"aria-label":d,children:[d,a("span",{className:"text-accent",style:l?{color:l}:void 0,children:"."})]});return v("span",{ref:Y,className:at("inline-flex items-center",Z??""),...z,children:[!H&&it,l&&e&&a("svg",{"aria-hidden":"true",focusable:"false",width:"0",height:"0",style:{position:"absolute"},children:v("filter",{id:k,colorInterpolationFilters:"sRGB",children:[a("feFlood",{style:{floodColor:l}}),a("feComposite",{in2:"SourceAlpha",operator:"in"})]})}),e&&a("img",{ref:T,src:e,alt:d,width:ot,height:i,className:"shrink-0 object-contain",style:{...H?{height:r,width:"auto",...x?{maxWidth:"100cqi"}:{}}:{display:"none"},...nt?{filter:It}:{},...l?{filter:`url(#${k})`}:{}},onLoad:()=>L(e),onError:()=>I(t=>t+1)},e)]})}export{Ht as FOOTER_LOGO_PX,Tt as HEADER_LOGO_PX,Mt as HEADER_LOGO_PX_MAX,Nt as HEADER_LOGO_PX_MIN,Wt as LOGO_BLOCK_PX_MAX,Ft as WORDMARK_FIT_FLOOR_PX,Lt as default};
1
+ "use client";import{jsx as a,jsxs as v}from"react/jsx-runtime";import{withViewHide as ut}from"./ViewHideRoot.js";import{useEffect as h,useId as dt,useRef as W,useState as p}from"react";import{NEUTRAL_SITE_NAME as mt}from"../../format/lib/content/site-name.js";import{useRootIsDark as ft}from"efficient-shell/theme";import{isSvgUrl as ht}from"../../format/lib/logo/reverse-svg.js";import{analyzeLogoViaServer as pt}from"../lib/logo/analyze-logo-client.js";import{siteLengthCss as _t}from"../../format/lib/content/css-length.js";import{FOOTER_LOGO_PX as Ot,HEADER_LOGO_GRID as gt,HEADER_LOGO_PX as Et}from"../../format/lib/logo/logo-size.js";import{FOOTER_LOGO_PX as Tt,HEADER_LOGO_PX as Mt,HEADER_LOGO_PX_MAX as Nt,HEADER_LOGO_PX_MIN as Wt,LOGO_BLOCK_PX_MAX as bt}from"../../format/lib/logo/logo-size.js";const Rt=202/22,It=.88,Gt=16,Lt="invert(1)";function At({variant:b="header",scrolled:C=!0,src:_,reverse:j=!1,color:O=null,onLightSurface:P,reversedSrc:D,inkIsDark:K,size:U="medium",sizePx:o,sizeUnit:V,wordmark:g,siteName:q=mt,fitToContainer:x=!1,fitWordmarkToContainer:B=!1,fitFloorPx:u,hideClass:Z,hideAttrs:z,part:J}){const d=g&&g.trim()?g.trim():q,[Q,Y]=p(null),S=W(null),tt=t=>{S.current=t};h(()=>{Y(S.current?.ownerDocument??null)},[]);const et=!ft({doc:Q,whenUnset:!0}),n=_&&_.trim()?_.trim():null,m=!!n&&ht(n),$=P??(et&&C),l=O&&O.trim()?O.trim():null,f=j&&!l,k=`logo-color-${dt().replace(/[^A-Za-z0-9_-]/g,"")}`,y=f&&m&&n&&D!=null?{reversed:D,inkIsDark:K??null}:null,w=y!==null,[nt,E]=p(null);h(()=>{if(!f||!n||!m||w){E(null);return}let t=!1;return E(null),pt(n).then(c=>{t||E(c)}),()=>{t=!0}},[f,n,m,w]);const s=y??nt,F=!!s&&s.inkIsDark!==null&&($?!s.inkIsDark:s.inkIsDark),lt=f&&!!n&&!m&&!$,R=F&&s?s.reversed:n,G=R?[R]:[],[X,I]=p(0);h(()=>{I(0)},[n,F]);const ot=b==="footer"?Ot:Et[U],i=o&&o>0?o:ot,r=(o&&o>0?_t(o,V,"size",gt):null)??`${i}px`,st=Math.round(i*Rt),e=X<G.length?G[X]:null,[rt,L]=p(R),H=e!==null&&e===rt,T=W(null);h(()=>{const t=T.current;if(!t||!t.complete)return;if(t.naturalWidth>0||t.naturalHeight>0){L(e);return}let c=!1;return t.decode().then(()=>!c&&L(e),()=>!c&&I(at=>at+1)),()=>{c=!0}},[e]);const M=x||B,N=`calc(100cqi / ${((d.length+1)*It).toFixed(2)})`,A=M&&u&&u>0?r===`${i}px`?`${Math.min(u,i)}px`:`min(${u}px, ${r})`:null,it=M?A===null?`min(${r}, ${N})`:`clamp(${A}, ${N}, ${r})`:r,ct=v("span",{className:`font-display font-bold tracking-[0.18em] ${A===null?"whitespace-nowrap":"whitespace-normal"}`,style:{fontSize:it,lineHeight:1,...l?{color:l}:{}},"aria-label":d,children:[d,a("span",{className:"text-accent",style:l?{color:l}:void 0,children:"."})]});return v("span",{ref:tt,className:ut("inline-flex items-center",Z??""),...z,...J,children:[!H&&ct,l&&e&&a("svg",{"aria-hidden":"true",focusable:"false",width:"0",height:"0",style:{position:"absolute"},children:v("filter",{id:k,colorInterpolationFilters:"sRGB",children:[a("feFlood",{style:{floodColor:l}}),a("feComposite",{in2:"SourceAlpha",operator:"in"})]})}),e&&a("img",{ref:T,src:e,alt:d,width:st,height:i,className:"shrink-0 object-contain",style:{...H?{height:r,width:"auto",...x?{maxWidth:"100cqi"}:{}}:{display:"none"},...lt?{filter:Lt}:{},...l?{filter:`url(#${k})`}:{}},onLoad:()=>L(e),onError:()=>I(t=>t+1)},e)]})}export{Tt as FOOTER_LOGO_PX,Mt as HEADER_LOGO_PX,Nt as HEADER_LOGO_PX_MAX,Wt as HEADER_LOGO_PX_MIN,bt as LOGO_BLOCK_PX_MAX,Gt as WORDMARK_FIT_FLOOR_PX,At as default};
@@ -1 +1 @@
1
- "use client";import{jsx as e}from"react/jsx-runtime";import{HideTaker as W,NO_HIDE as H,useTakeViewHide as j,withViewHide as k}from"./ViewHideRoot.js";import{useContext as y}from"react";import{SiteLink as F}from"../lib/site-runtime.js";import R,{FOOTER_LOGO_PX as A,WORDMARK_FIT_FLOOR_PX as M}from"./Logo.js";import{media as P}from"../lib/media.js";import{BoxSurfaceContext as E}from"./BoxSurfaceContext.js";import{useBoxCellHasWidth as V}from"./BoxCellContext.js";import{useInSiteHeader as z}from"./PhoneMenuTools.js";import{useSiteLogo as G}from"./SiteLogoContext.js";import{useLogoWall as K}from"./LogoWallContext.js";import{LogoWallMark as X}from"./Logos.js";import{MarkZoom as I}from"./PictureZoom.js";import{useCardRow as J}from"./CardRowContext.js";import{alignViewClasses as v,BLOCK_ALIGN_JUSTIFY as U}from"../../format/lib/content/block-align.js";import{useDrawsAtEdge as Y}from"./InBoxContext.js";function Z(s){const o=K(),t=J();if(!o)return e(b,{...s});const m=(s.src??"").trim();return e(W,{className:"text-center",children:e(X,{src:m||void 0,alt:s.alt,look:o.look,logoHeight:o.logoHeight,grayscale:o.grayscale,kind:t?.row.kind})})}function b({src:s,alt:o,href:t,heightPx:m=A,reverse:D=!0,align:i,alignTablet:u,alignPhone:w,color:O=null}){const n=G(),p=(s??"").trim(),l=p?{src:P(p),reversedSrc:null,inkIsDark:null,wordmark:o?.trim()||null}:{src:n.src,reversedSrc:n.reversedSrc,inkIsDark:n.inkIsDark,wordmark:n.wordmark},_=y(E),x=z(),T=V(),r=!x&&T,a=j(),L={atSectionLine:!Y()},h=!!(i||r||v("justify",i,u,w,L)),c=h?H:a,d=t||r?H:c,N=e(R,{variant:"footer",sizePx:m,src:l.src,reverse:D,color:O,reversedSrc:l.reversedSrc,inkIsDark:l.inkIsDark,wordmark:l.wordmark,siteName:n.siteName,fitToContainer:x,fitWordmarkToContainer:r,fitFloorPx:r?M:void 0,..._?.dark?{onLightSurface:!1}:{},...d.className?{hideClass:d.className,hideAttrs:d.attrs}:{}}),C=r?"inline-flex max-w-full overflow-x-clip":"inline-flex",f=r?N:e(I,{children:N}),S=t?e(F,{href:t,newTab:"auto",className:k(C,c.className),...c.attrs,children:f}):r?e("span",{className:k(C,c.className),...c.attrs,children:f}):f,g=r?e(I,{inCell:!0,children:S}):S;if(!h)return a.scope(g);const B=["flex min-w-0",i?U[i]:"",v("justify",i,u,w,L),r?"[container-type:inline-size]":""].filter(Boolean).join(" ");return a.scope(e("div",{className:k(B,a.className),...a.attrs,children:g}))}export{Z as default};
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import{HideTaker as W,NO_HIDE as H,useTakeViewHide as j,withViewHide as k}from"./ViewHideRoot.js";import{useContext as y}from"react";import{SiteLink as A}from"../lib/site-runtime.js";import F,{FOOTER_LOGO_PX as R,WORDMARK_FIT_FLOOR_PX as M}from"./Logo.js";import{media as P}from"../lib/media.js";import{BoxSurfaceContext as E}from"./BoxSurfaceContext.js";import{useBoxCellHasWidth as V}from"./BoxCellContext.js";import{useInSiteHeader as z}from"./PhoneMenuTools.js";import{useSiteLogo as G}from"./SiteLogoContext.js";import{useLogoWall as K}from"./LogoWallContext.js";import{LogoWallMark as X}from"./Logos.js";import{MarkZoom as I}from"./PictureZoom.js";import{useCardRow as J}from"./CardRowContext.js";import{alignViewClasses as v,BLOCK_ALIGN_JUSTIFY as U}from"../../format/lib/content/block-align.js";import{useDrawsAtEdge as Y}from"./InBoxContext.js";import{partAttr as Z}from"../../format/lib/content/part-names.js";function b(t){const o=K(),s=J();if(!o)return e(q,{...t});const m=(t.src??"").trim();return e(W,{className:"text-center",children:e(X,{src:m||void 0,alt:t.alt,look:o.look,logoHeight:o.logoHeight,grayscale:o.grayscale,kind:s?.row.kind})})}function q({src:t,alt:o,href:s,heightPx:m=R,reverse:D=!0,align:i,alignTablet:u,alignPhone:p,color:O=null}){const n=G(),w=(t??"").trim(),c=w?{src:P(w),reversedSrc:null,inkIsDark:null,wordmark:o?.trim()||null}:{src:n.src,reversedSrc:n.reversedSrc,inkIsDark:n.inkIsDark,wordmark:n.wordmark},_=y(E),x=z(),T=V(),r=!x&&T,a=j(),L={atSectionLine:!Y()},h=!!(i||r||v("justify",i,u,p,L)),l=h?H:a,d=s||r?H:l,N=e(F,{variant:"footer",sizePx:m,src:c.src,reverse:D,color:O,reversedSrc:c.reversedSrc,inkIsDark:c.inkIsDark,wordmark:c.wordmark,siteName:n.siteName,fitToContainer:x,fitWordmarkToContainer:r,fitFloorPx:r?M:void 0,..._?.dark?{onLightSurface:!1}:{},...d.className?{hideClass:d.className,hideAttrs:d.attrs}:{},part:Z("logo")}),g=r?"inline-flex max-w-full overflow-x-clip":"inline-flex",f=r?N:e(I,{children:N}),C=s?e(A,{href:s,newTab:"auto",className:k(g,l.className),...l.attrs,children:f}):r?e("span",{className:k(g,l.className),...l.attrs,children:f}):f,S=r?e(I,{inCell:!0,children:C}):C;if(!h)return a.scope(S);const B=["flex min-w-0",i?U[i]:"",v("justify",i,u,p,L),r?"[container-type:inline-size]":""].filter(Boolean).join(" ");return a.scope(e("div",{className:k(B,a.className),...a.attrs,children:S}))}export{b as default};
@@ -2,6 +2,7 @@ import type { WidthAnswer } from "../../format/lib/content/section-width.js";
2
2
  import { type CSSProperties, type ReactNode } from "react";
3
3
  import { type PadValues } from "../lib/content/section-padding.js";
4
4
  import { type SectionEdge } from "../lib/content/section-edge.js";
5
+ import type { PartAttr } from "../../format/lib/content/part-names.js";
5
6
  export declare function useInsideSiteGutter(): boolean;
6
7
  export declare function InsideSiteColumn({ children }: {
7
8
  children?: ReactNode;
@@ -38,7 +39,7 @@ export declare function SectionGroupChoice({ draw }: {
38
39
  draw: (group: SectionGroupWidths | null) => ReactNode;
39
40
  }): import("react").JSX.Element;
40
41
  export declare function useSectionEdge(): SectionEdge | null;
41
- export default function SiteGutterFrame({ contained, framedClass, fillClass, columnClass, style, tabLabel, pad, border, outerAttrs: outerAttrsIn, box, edge, outerStyle, outerClass: outerClassIn, bleed, siteSide, children, }: {
42
+ export default function SiteGutterFrame({ contained, framedClass, fillClass, columnClass, style, tabLabel, pad, border, outerAttrs: outerAttrsIn, box, edge, outerStyle, outerClass: outerClassIn, bleed, siteSide, part, children, }: {
42
43
  contained: boolean;
43
44
  framedClass: string;
44
45
  fillClass: string;
@@ -57,5 +58,6 @@ export default function SiteGutterFrame({ contained, framedClass, fillClass, col
57
58
  outerClass?: string;
58
59
  bleed?: boolean;
59
60
  siteSide?: boolean;
61
+ part?: PartAttr;
60
62
  children?: ReactNode;
61
63
  }): ReactNode;
@@ -1 +1 @@
1
- "use client";import{jsx as t,Fragment as G}from"react/jsx-runtime";import{useTakeViewHide as M,withViewHide as D}from"./ViewHideRoot.js";import{createContext as c,useContext as o}from"react";import{rootPadAttrs as Q,wrapperPadAttrs as Y}from"../lib/content/section-padding.js";import{SECTION_BORDER_CLASS as Z,SECTION_BORDER_SELF_CLASS as b}from"../../format/lib/content/borders.js";import{BOX_HOLDS_NO_GUTTER_CLASS as ee}from"../../format/lib/content/page-width.js";import{drawsSiteGutter as te}from"../../format/lib/content/site-gutter.js";import{groundBeyond as ne}from"../lib/content/section-edge.js";const f=c(!1);function he(){return o(f)}function ve({children:e}){return t(f.Provider,{value:!0,children:e})}const _=c(!1);function Se({children:e}){return t(_.Provider,{value:!0,children:e})}const H=c(null);function xe({ground:e,children:n}){return t(H.Provider,{value:e,children:n})}const O=c(!1);function oe(){return o(O)}function Ce({atTop:e,nested:n}){return t(G,{children:oe()?n:e})}const m=c(void 0);function Ne({children:e}){return t(m.Provider,{value:null,children:e})}function re(){return o(m)===void 0&&!o(O)&&!o(f)}function ge({own:e,followed:n}){return t(G,{children:re()?e():n()})}const k=c(null);function Be({value:e,children:n}){return t(k.Provider,{value:e,children:n})}function Pe({draw:e}){return t(G,{children:e(o(k))})}function Ge(){return o(m)??null}function se({contained:e,framedClass:n,fillClass:V,columnClass:R,style:A,tabLabel:W,pad:i,border:a,outerAttrs:E,box:h=!1,edge:U=!1,outerStyle:p,outerClass:w,bleed:v=!1,siteSide:X=!1,children:y}){const q=o(f),S=o(_),l=te(e,q),r=l&&!S,u=M(),I=!!(a&&r),d=I?w:D(w??"",u.className)||void 0,x=I||!u.className?E:{...E,...u.attrs},C=i&&!r?Q(i.values,i.frame):null,N=a&&!r?a:null,g=h&&!v?ee:null,B=[r?n:V,r?g:null,C?.className,N?b:null].filter(Boolean).join(" "),L=ie(v&&r,C||N?{...A,...C?.style,...N}:A),z=o(m),J=o(H),K=h&&U&&z===void 0?{gutter:l,...i?{pad:i.values}:{},beyond:l&&S?ne(J):"0px",...X&&l?{site:!0}:{}}:null,$=h?t(O.Provider,{value:!0,children:t(m.Provider,{value:K,children:y})}):y,P=l?t(f.Provider,{value:!0,children:$}):$,s=i&&r?Y(i.values):null,T=x&&Object.keys(x).length>0?x:null,j=t("div",{...s?null:T,className:!s&&d?B?`${B} ${d}`:d:B,style:s||!p?L:{...L,...p},"data-tab-label":W,children:S?t(_.Provider,{value:!1,children:l&&!v?t("div",{className:g?`${R} ${g}`:R,children:P}):P}):P}),F=s?t("div",{...T,className:d?`${s.className} ${d}`:s.className,style:p?{...s.style,...p}:s.style,children:j}):j;return u.scope(a&&r?t("div",{className:D(Z,u.className),style:{display:"contents",...a},...u.attrs,children:F}):F)}function ie(e,n){return e?{...n,paddingLeft:0,paddingRight:0}:n}export{xe as GroundStopsAt,ve as InsideSiteColumn,Ce as NestedBoxChoice,Ne as NotASectionEdge,Pe as SectionGroupChoice,Be as SectionGroupWidthsProvider,ge as SectionRootChoice,Se as SplitBandAndColumn,se as default,oe as useInsideBox,he as useInsideSiteGutter,Ge as useSectionEdge,re as useSectionRoot};
1
+ "use client";import{jsx as t,Fragment as G}from"react/jsx-runtime";import{useTakeViewHide as Q,withViewHide as H}from"./ViewHideRoot.js";import{createContext as c,useContext as o}from"react";import{rootPadAttrs as Y,wrapperPadAttrs as Z}from"../lib/content/section-padding.js";import{SECTION_BORDER_CLASS as b,SECTION_BORDER_SELF_CLASS as ee}from"../../format/lib/content/borders.js";import{BOX_HOLDS_NO_GUTTER_CLASS as te}from"../../format/lib/content/page-width.js";import{drawsSiteGutter as ne}from"../../format/lib/content/site-gutter.js";import{groundBeyond as oe}from"../lib/content/section-edge.js";const f=c(!1);function ve(){return o(f)}function Se({children:e}){return t(f.Provider,{value:!0,children:e})}const _=c(!1);function xe({children:e}){return t(_.Provider,{value:!0,children:e})}const k=c(null);function Ce({ground:e,children:n}){return t(k.Provider,{value:e,children:n})}const O=c(!1);function re(){return o(O)}function Ne({atTop:e,nested:n}){return t(G,{children:re()?n:e})}const m=c(void 0);function ge({children:e}){return t(m.Provider,{value:null,children:e})}function se(){return o(m)===void 0&&!o(O)&&!o(f)}function Be({own:e,followed:n}){return t(G,{children:se()?e():n()})}const V=c(null);function Pe({value:e,children:n}){return t(V.Provider,{value:e,children:n})}function Ge({draw:e}){return t(G,{children:e(o(V))})}function _e(){return o(m)??null}function ie({contained:e,framedClass:n,fillClass:W,columnClass:R,style:A,tabLabel:U,pad:i,border:a,outerAttrs:E,box:h=!1,edge:X=!1,outerStyle:p,outerClass:w,bleed:v=!1,siteSide:q=!1,part:y,children:I}){const z=o(f),S=o(_),l=ne(e,z),s=l&&!S,u=Q(),L=!!(a&&s),d=L?w:H(w??"",u.className)||void 0,x=L||!u.className?E:{...E,...u.attrs},C=i&&!s?Y(i.values,i.frame):null,N=a&&!s?a:null,g=h&&!v?te:null,B=[s?n:W,s?g:null,C?.className,N?ee:null].filter(Boolean).join(" "),$=le(v&&s,C||N?{...A,...C?.style,...N}:A),J=o(m),K=o(k),M=h&&X&&J===void 0?{gutter:l,...i?{pad:i.values}:{},beyond:l&&S?oe(K):"0px",...q&&l?{site:!0}:{}}:null,T=h?t(O.Provider,{value:!0,children:t(m.Provider,{value:M,children:I})}):I,P=l?t(f.Provider,{value:!0,children:T}):T,r=i&&s?Z(i.values):null,j=x&&Object.keys(x).length>0?x:null,F=t("div",{...r?null:j,className:!r&&d?B?`${B} ${d}`:d:B,style:r||!p?$:{...$,...p},"data-tab-label":U,...r?null:y,children:S?t(_.Provider,{value:!1,children:l&&!v?t("div",{className:g?`${R} ${g}`:R,children:P}):P}):P}),D=r?t("div",{...j,className:d?`${r.className} ${d}`:r.className,style:p?{...r.style,...p}:r.style,...y,children:F}):F;return u.scope(a&&s?t("div",{className:H(b,u.className),style:{display:"contents",...a},...u.attrs,children:D}):D)}function le(e,n){return e?{...n,paddingLeft:0,paddingRight:0}:n}export{Ce as GroundStopsAt,Se as InsideSiteColumn,Ne as NestedBoxChoice,ge as NotASectionEdge,Ge as SectionGroupChoice,Pe as SectionGroupWidthsProvider,Be as SectionRootChoice,xe as SplitBandAndColumn,ie as default,re as useInsideBox,ve as useInsideSiteGutter,_e as useSectionEdge,se as useSectionRoot};
@@ -1 +1 @@
1
- import{jsx as r,jsxs as E,Fragment as H}from"react/jsx-runtime";import w from"./BlockFrame.js";import{renderGold as y,renderHeadline as M,renderPlain as A,splitParagraphs as U}from"./goldPhrases.js";import{headingLook as D}from"./Heading.js";import{alignViewClasses as X,BLOCK_ALIGN_PLACE as $}from"../../format/lib/content/block-align.js";import{useDrawsAtEdge as V}from"./InBoxContext.js";import{textTagOf as W}from"../../format/lib/content/text-tag.js";import{KICKER_NUMBER_ATTR as Z,kickerLead as q}from"../lib/content/page-contents.js";import{isTextStyleId as J}from"../lib/document/part-styles.js";import{faceClassOf as O}from"../../format/lib/text-style-face.js";import{useMirroredCopy as Q}from"./MirrorContext.js";import{mirroredTextClasses as P}from"../../format/lib/content/mirror-cards.js";import Y from"./PartStyledKind.js";import j from"./PostDate.js";import{SiteLink as ee}from"../lib/site-runtime.js";import{markupHoldsLink as te}from"../../format/lib/markup.js";const u={bodyUpTo800:"max-view-wide:text-[length:var(--size-body,14px)]",bodySmall:"text-[length:var(--size-body,15px)]",bodyLarge:"text-[length:var(--size-body,17px)]",label:"text-[length:var(--size-label,13px)]"},re="underline underline-offset-2",s=e=>e?` ${e}`:"";function ne(e,l,m,a){const c=X("place",e,l,m,{atSectionLine:!a});return c?` ${c}`:""}const se={left:`text-left${s($.left)}`,center:`text-left${s($.center)}`,right:`text-left${s($.right)}`},ae=`max-w-[380px] ${u.bodySmall} leading-[1.5] opacity-80 ${u.bodyUpTo800}`,ie={default:"text-fg",dim:"text-fg-dim"};function oe(e){return String(Math.min(Number(e.slice(8)),6))}function le({text:e,labelId:l,number:m,align:a,alignTablet:c,alignPhone:z,tone:T,contained:N,hero:I=!1,pad:f,tag:K,textStyle:b,ownWidth:R=!1,partAlign:L,onLine:p=!1,partKey:S,partDeclare:B=!1,plain:h=!1,href:k,date:d}){const F=t=>S?r(Y,{kind:S,declare:B,children:t}):t,_=k&&!te(e)?k:void 0,g=t=>F(_?r(ee,{href:_,className:re,newTab:"auto",children:t}):t),v=Q(),G=V();if(I)return r("p",{className:ae,children:y(e)});const i=m?r("span",{[Z]:"",children:q(m)}):void 0,o=J(b)?b:void 0,C=`${o?`${O({id:o})} `:""}${R?"":"max-w-[680px] "}whitespace-pre-line ${o==="body-5"?u.label:u.bodyLarge} leading-[1.7]${s(a?se[a]:"")}${ne(a,c,z,G)}${s(T?ie[T]:"")}${s(P(v,a,L))}`,x=W(K);if(o?.startsWith("heading-")){const t=oe(o),n=D(t,O({id:o}));return r(w,{contained:N,className:p?"":"py-6",pad:f?{values:f,frame:p?0:24}:void 0,children:E(x,{id:l,className:`${n.className}${s(P(v,void 0,L))}`,style:n.style,children:[i,g(d?r(j,{at:d}):M(e.trim(),!1,h))]})})}return r(w,{contained:N,className:p?"":"py-4",pad:f?{values:f,frame:p?0:16}:void 0,children:x==="p"&&!d?U(e).map((t,n)=>r("p",{id:n===0?l:void 0,className:C,children:g(h?A(t,n===0?i:void 0):y(t,!1,n===0?i:void 0))},n)):r(x,{id:l,className:C,children:g(d?E(H,{children:[i,r(j,{at:d})]}):h?A(e.trim(),i):y(e.trim(),!1,i))})})}export{le as default,oe as headingLevelOfStyle};
1
+ import{jsx as r,jsxs as A,Fragment as M}from"react/jsx-runtime";import w from"./BlockFrame.js";import{partAttr as m}from"../../format/lib/content/part-names.js";import{renderGold as $,renderHeadline as U,renderPlain as O,splitParagraphs as D}from"./goldPhrases.js";import{headingLook as X}from"./Heading.js";import{alignViewClasses as V,BLOCK_ALIGN_PLACE as T}from"../../format/lib/content/block-align.js";import{useDrawsAtEdge as W}from"./InBoxContext.js";import{textTagOf as Z}from"../../format/lib/content/text-tag.js";import{KICKER_NUMBER_ATTR as q,kickerLead as J}from"../lib/content/page-contents.js";import{isTextStyleId as Q}from"../lib/document/part-styles.js";import{faceClassOf as P}from"../../format/lib/text-style-face.js";import{useMirroredCopy as Y}from"./MirrorContext.js";import{mirroredTextClasses as j}from"../../format/lib/content/mirror-cards.js";import ee from"./PartStyledKind.js";import z from"./PostDate.js";import{SiteLink as te}from"../lib/site-runtime.js";import{markupHoldsLink as re}from"../../format/lib/markup.js";const x={bodyUpTo800:"max-view-wide:text-[length:var(--size-body,14px)]",bodySmall:"text-[length:var(--size-body,15px)]",bodyLarge:"text-[length:var(--size-body,17px)]",label:"text-[length:var(--size-label,13px)]"},ae="underline underline-offset-2",n=e=>e?` ${e}`:"";function ne(e,l,c,s){const f=V("place",e,l,c,{atSectionLine:!s});return f?` ${f}`:""}const se={left:`text-left${n(T.left)}`,center:`text-left${n(T.center)}`,right:`text-left${n(T.right)}`},oe=`max-w-[380px] ${x.bodySmall} leading-[1.5] opacity-80 ${x.bodyUpTo800}`,ie={default:"text-fg",dim:"text-fg-dim"};function le(e){return String(Math.min(Number(e.slice(8)),6))}function de({text:e,labelId:l,number:c,align:s,alignTablet:f,alignPhone:I,tone:b,contained:N,hero:K=!1,pad:p,tag:R,textStyle:k,ownWidth:B=!1,partAlign:L,onLine:u=!1,partKey:S,partDeclare:F=!1,plain:h=!1,href:_,date:d}){const G=t=>S?r(ee,{kind:S,declare:F,children:t}):t,v=_&&!re(e)?_:void 0,g=t=>G(v?r(te,{href:v,className:ae,newTab:"auto",children:t}):t),C=Y(),H=W();if(K)return r("p",{className:oe,children:$(e)});const o=c?r("span",{[q]:"",children:J(c)}):void 0,i=Q(k)?k:void 0,E=`${i?`${P({id:i})} `:""}${B?"":"max-w-[680px] "}whitespace-pre-line ${i==="body-5"?x.label:x.bodyLarge} leading-[1.7]${n(s?se[s]:"")}${ne(s,f,I,H)}${n(b?ie[b]:"")}${n(j(C,s,L))}`,y=Z(R);if(i?.startsWith("heading-")){const t=le(i),a=X(t,P({id:i}));return r(w,{contained:N,className:u?"":"py-6",pad:p?{values:p,frame:u?0:24}:void 0,part:m("text-block"),children:A(y,{id:l,className:`${a.className}${n(j(C,void 0,L))}`,style:a.style,...m("text"),children:[o,g(d?r(z,{at:d}):U(e.trim(),!1,h))]})})}return r(w,{contained:N,className:u?"":"py-4",pad:p?{values:p,frame:u?0:16}:void 0,part:m("text-block"),children:y==="p"&&!d?D(e).map((t,a)=>r("p",{id:a===0?l:void 0,className:E,...m("text"),children:g(h?O(t,a===0?o:void 0):$(t,!1,a===0?o:void 0))},a)):r(y,{id:l,className:E,...m("text"),children:g(d?A(M,{children:[o,r(z,{at:d})]}):h?O(e.trim(),o):$(e.trim(),!1,o))})})}export{de as default,le as headingLevelOfStyle};
@@ -1 +1 @@
1
- import{siteLengthHeld as G,storedUnit as b}from"../../../../../format/lib/content/css-length.js";import{SECTION_WIDTH_KEYS as M}from"../../../../../format/lib/content/section-width.js";import{CELL_SPAN_KEYS as W}from"../../../../../format/lib/content/grid-span.js";import{BLOCK_LENGTH_KEYS as C,blockLengthUnitKey as Y}from"../../../content/block-size.js";import{viewStoreKeys as F}from"../../../../../format/lib/animation/views.js";import{BOX as v,INNER_BOX as I,LABEL_FACE as U,TEXT as R,boxPadding as w,fillSlot as O,token as X}from"../../../../../format/lib/document/seed-parts.js";import{ENTRANCE_STORE_KEYS as V,LEGACY_ENTRANCE_KEY as $}from"../../../animation/entrance.js";import{SCROLL_STORE_KEYS as j}from"../../../../../format/lib/animation/scroll.js";import{SECTION_PIN_KEYS as z}from"../../../../../format/lib/content/section-sticky.js";import{SECTION_CORNERS_ROW as J}from"../../../../../format/lib/content/section-corners.js";import{SECTION_BORDER_UNIT_KEYS as q}from"../../../../../format/lib/content/borders.js";import{CARD_HOVER_KEYS as S}from"../../../../../format/lib/animation/hover.js";import{COUNT_KEY_PROP as Q}from"../../../../../format/lib/content/block-sources.js";import{SITE_GUTTER as Z,SITE_GUTTER_PHONE as tt,normalizeSiteGutter as ot,normalizeSiteGutterPhone as et,siteGutterPhoneFollows as nt}from"../../../../../format/lib/content/page-width.js";import{BAND_TO_SECTION_PAD as A,bandTopBottom as it}from"../../../content/section-padding.js";import{ButtonBlockMeta as rt}from"../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";import{innerPaddingFallback as st}from"../../passes/section-padding.js";import{finiteNumber as u}from"../../../../../format/lib/finite-number.js";import{convertTheme as x,hasWords as dt}from"../../../sections/section-to-box.js";import{THEME_SECTION_BG as ct}from"../../../../../format/lib/content/section-background.js";import{fillSlotOfInk as H}from"../../../../../format/lib/document/part-inks.js";import{parseHexColor as at}from"efficient-shell/format";import{convertLength as pt}from"efficient-easel/screen/lib/content/length-units";import{bandPresetIndex as lt,surfacePresetIndex as mt,surfaceTwoTone as gt}from"../../../../../format/lib/theme.js";import{VIEW_HIDE_KEYS as Pt}from"../../../../../format/lib/content/view-hide-class.js";import{tierOfView as ft}from"../../../../../format/lib/content/view-tier.js";const s=(t,o,e,n)=>o===e?t:pt(t,o,e,n,{min:0,max:200,step:4});import{BOX as Bo,DIM as No,INNER_BOX as Co,TEXT as Io}from"../../../../../format/lib/document/seed-parts.js";const qt={textFit:"line",textFitPhone:"wrap"},ht={...R,[Q]:""},{label:Qt,href:Zt,...ut}=rt.defaultProps,to=ut,oo={buttonFillOpacity:0,buttonBorder:{width:0},buttonPaddingTop:0,buttonPaddingRight:0,buttonPaddingBottom:0,buttonPaddingLeft:0},eo={...v,sectionAccent:0},no={sectionAccent:-1},io=[...W,"sectionHeightMode","sectionHeightValue","sectionHeightUnit","sectionHeightModeTablet","sectionHeightValueTablet","sectionHeightUnitTablet","sectionHeightModePhone","sectionHeightValuePhone","sectionHeightUnitPhone","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderTablet","sectionBorderPhone","sectionAccent",J.unitKey,...q,...z,"anchor",$,...Pt,...V,...j,...F(["widthFit",...C,...C.map(Y)]),...Object.values(M)],P="a section width key, ignored since efficient-web-builder 45 (an old key; a section's own width has new keys, lib/content/section-width), so dropping it changes nothing",ro={sectionSurface:"read by nothing in src/ (searched 2026-10-24): a retired theme key that draws nothing today, so dropping it changes nothing",widthMode:P,fullWidth:P,pageWidth:P,backgroundWidth:P,contentWidth:P,contentMax:P},so=Object.fromEntries(["sectionPaddingLeft","sectionPaddingRight","sectionPaddingLeftTablet","sectionPaddingRightTablet","sectionPaddingLeftPhone","sectionPaddingRightPhone"].map(t=>[t,"needs Box side padding outside its gutter: the old section added it outside its frame, a Box's side padding replaces the gutter. 0 live nodes store it (JJ's read-only export, 2026-10-24)"]));function Tt(t,o){const e=u(t.sectionPaddingTop)??0,n=u(t.sectionPaddingBottom)??0,i=u(t.sectionPaddingTopTablet),r=u(t.sectionPaddingBottomTablet),c=b(t.sectionPaddingUnit),l=b(t.sectionPaddingUnitTablet),m=b(t.sectionPaddingUnitPhone),f=(g,a,h,p)=>{const d=u(g);if(d!==void 0)return d+s(p,"px",m,"mobile");const N=a===void 0?{n:h,unit:c}:{n:a,unit:l};return s(N.n,N.unit,m,"mobile")+s(p,"px",m,"mobile")},T=(g,a,h,p,d)=>a!==void 0?{[g]:a+s(d??p,"px",l,"tablet")}:d===void 0?{}:{[g]:s(h,c,l,"tablet")+s(d,"px",l,"tablet")};return{sectionPaddingTop:e+s(o.top,"px",c,"desktop"),sectionPaddingBottom:n+s(o.bottom,"px",c,"desktop"),...T("sectionPaddingTopTablet",i,e,o.top,o.topTablet),...T("sectionPaddingBottomTablet",r,n,o.bottom,o.bottomTablet),sectionPaddingTopPhone:f(t.sectionPaddingTopPhone,i,e,o.topPhone),sectionPaddingBottomPhone:f(t.sectionPaddingBottomPhone,r,n,o.bottomPhone)}}const co=t=>[...["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopTablet","sectionPaddingBottomTablet","sectionPaddingTopPhone","sectionPaddingBottomPhone"].map(o=>[o,o,(e,n)=>Tt(n,typeof t=="function"?t(n):t)[o]]),["sectionPaddingUnit","sectionPaddingUnit"],["sectionPaddingUnitTablet","sectionPaddingUnitTablet"],["sectionPaddingUnitPhone","sectionPaddingUnitPhone"]];function B(t,o){const e={};for(const[i,r]of A)t[i]!==void 0&&(e[r]=t[i]);const n=it(t,st(o));return{...e,sectionPaddingTop:n.top,sectionPaddingBottom:n.bottom}}const ao=t=>[...A.map(([o,e])=>[o,e,(n,i)=>B(i,t)[e]]),["sectionPaddingTop","sectionPaddingTop",(o,e)=>B(e,t).sectionPaddingTop],["sectionPaddingBottom","sectionPaddingBottom",(o,e)=>B(e,t).sectionPaddingBottom]],bt={kind:"heading-case-upper",styles:["heading-1","heading-2","heading-3"]},po=t=>o=>dt(o.props[t])?[bt]:[],xt=(t,o)=>({kind:"text",key:t,role:"eyebrow",props:R,...o?{style:o}:{}}),lo=t=>({kind:"group",name:"Chip",props:{...I,...O("main"),...w(6,14)},parts:[xt(t,{color:"background",...X("label",12),weight:600,letterSpacing:.16})]}),L=t=>t.background!=="transparent",_t=(t,o)=>{const[e,n]=[t,o].map(i=>typeof i=="string"?i.trim():"");return e?n?`[${e} ]{color=text}${n}`:`[${e}]{color=text}`:n},k={align:"right",alignPhone:"left"},Et=(t,o,e)=>{const n=i=>_t(i[t],i[o]);return{kind:"block",type:"Text",when:(i,r)=>r!==void 0&&n(r)!=="",box:[[t,"text",(i,r)=>n(r)],[o,"text",(i,r)=>n(r)]],props:e}},mo=(t,o,e,n={})=>Et(t,o,{...ht,...k,...n,_partStyles:{text:{...U,color:"labels",...e,case:U.case,...k}}}),_=(t,o)=>typeof t=="number"&&Number.isInteger(t)&&t>=0?t:x(o)?.selected??0,K="var(--site-surface-2)",y=(t,o)=>x(o)?.themes[_(t.sectionAccent??0,o)],Ot=(t,o)=>(e,n)=>{if(!o?.(e,n))return O(t);const i=y(e,n)?.[t];return i?{fillColor:i}:{}},go=(t,o)=>E(t,o)>=0,D=t=>t.startsWith("#")&&at(t)!==null,Po=(t,o,e)=>{const n=t?.trim();if(n&&D(n))return{fillColor:n};const i=H(n);if(i)return O(i);const r=n===K?y(o,e):void 0;return r?{fillColor:gt(r)}:{}},fo=t=>{const o=t?.trim();return!o||o==="transparent"||o===ct||H(o)||o===K||D(o)?void 0:"it paints a colour that no Box Fill can hold"},E=(t,o)=>{const e=x(o)?.themes;return e&&L(t)?lt(e,_(t.sectionAccent,o)):-1},ho=(t,o,e)=>{const n=E(o,e);return n>=0?n:t},uo=(t,o)=>{const e=x(o)?.themes,n=e?mt(e,_(t,o)):-1;return n>=0?n:t},To=(t,o)=>{const e=E(t,o);return e>=0?{sectionAccent:e}:{}},bo=(t,o)=>L(t.props)&&E(t.props,o)<0?[{kind:"band-preset",page:_(t.props.sectionAccent,o)}]:[],xo=(t,{view:o="desktop",to:e="px",maxPx:n=1/0}={})=>{const{siteGutter:i,siteGutterUnit:r,siteGutterPhone:c,siteGutterPhoneUnit:l}=t.site??{},m=ft(o),f=(g,a,h)=>{const p=b(a),d=G(g,p,"spacing",h);return d===null?null:s(d,p,"px",m)},T=o==="desktop"?f(i,r,Z)??ot(i):f(c,l,tt)??et(c)??nt(i,r);return s(Math.min(n,T),"px",e,m)},St=Object.fromEntries(["Top","Right","Bottom","Left","TopPhone","RightPhone","BottomPhone","LeftPhone"].map(t=>[`sectionPadding${t}`,0])),_o=t=>({top:0,right:0,bottom:0,left:0,...t}),Eo=(t,o,e,n=[])=>({kind:"group",name:t,keepEmpty:!0,props:(i,r)=>({...I,...St,...Ot("surface")(i,r),...typeof e=="function"?e(i,r):e}),box:[[o,"bgImage"],S.kind,S.duration,S.delay],parts:n});export{qt as AUTO_COLUMN,Bo as BOX,to as BUTTON,No as DIM,ro as DROP_COMMON,so as DROP_SIDE_PADDING,no as FOLLOW_THE_BOX,bt as HEADING_CASE_UPPER,Co as INNER_BOX,St as NO_PAD,ht as NUMBER_TEXT,k as RIGHT_WORDS,io as SAME_KEYS,eo as SECTION_BOX,oo as SH_LINK,Io as TEXT,ho as bandAccent,E as bandIndex,_ as bandPage,To as bandProps,bo as bandWrites,Ot as fillFrom,fo as fillNoBoxHolds,lo as filledChip,po as headingCaseOf,B as innerPad,ao as innerPadKeys,mo as leadLine,Et as leadText,_o as lineSides,_t as numberAndUnit,go as onBandPreset,Po as ownFill,Eo as pictureCell,y as sectionPage,xo as siteGutterOf,xt as smallText,uo as surfaceAccent,Tt as wrapperPad,co as wrapperPadKeys};
1
+ import{SECTION_CSS_KEY as G}from"../../../../../format/lib/content/section-css.js";import{siteLengthHeld as M,storedUnit as b}from"../../../../../format/lib/content/css-length.js";import{SECTION_WIDTH_KEYS as Y}from"../../../../../format/lib/content/section-width.js";import{CELL_SPAN_KEYS as W}from"../../../../../format/lib/content/grid-span.js";import{BLOCK_LENGTH_KEYS as C,blockLengthUnitKey as F}from"../../../content/block-size.js";import{viewStoreKeys as v}from"../../../../../format/lib/animation/views.js";import{BOX as w,INNER_BOX as I,LABEL_FACE as U,TEXT as R,boxPadding as X,fillSlot as O,token as V}from"../../../../../format/lib/document/seed-parts.js";import{ENTRANCE_STORE_KEYS as $,LEGACY_ENTRANCE_KEY as j}from"../../../animation/entrance.js";import{SCROLL_STORE_KEYS as z}from"../../../../../format/lib/animation/scroll.js";import{SECTION_PIN_KEYS as J}from"../../../../../format/lib/content/section-sticky.js";import{SECTION_CORNERS_ROW as q}from"../../../../../format/lib/content/section-corners.js";import{SECTION_BORDER_UNIT_KEYS as Q}from"../../../../../format/lib/content/borders.js";import{CARD_HOVER_KEYS as S}from"../../../../../format/lib/animation/hover.js";import{COUNT_KEY_PROP as Z}from"../../../../../format/lib/content/block-sources.js";import{SITE_GUTTER as tt,SITE_GUTTER_PHONE as ot,normalizeSiteGutter as et,normalizeSiteGutterPhone as nt,siteGutterPhoneFollows as it}from"../../../../../format/lib/content/page-width.js";import{BAND_TO_SECTION_PAD as A,bandTopBottom as rt}from"../../../content/section-padding.js";import{ButtonBlockMeta as st}from"../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";import{innerPaddingFallback as dt}from"../../passes/section-padding.js";import{finiteNumber as u}from"../../../../../format/lib/finite-number.js";import{convertTheme as _,hasWords as ct}from"../../../sections/section-to-box.js";import{THEME_SECTION_BG as at}from"../../../../../format/lib/content/section-background.js";import{fillSlotOfInk as H}from"../../../../../format/lib/document/part-inks.js";import{parseHexColor as pt}from"efficient-shell/format";import{convertLength as lt}from"efficient-easel/screen/lib/content/length-units";import{bandPresetIndex as mt,surfacePresetIndex as gt,surfaceTwoTone as Pt}from"../../../../../format/lib/theme.js";import{VIEW_HIDE_KEYS as ft}from"../../../../../format/lib/content/view-hide-class.js";import{tierOfView as ht}from"../../../../../format/lib/content/view-tier.js";const s=(t,o,e,n)=>o===e?t:lt(t,o,e,n,{min:0,max:200,step:4});import{BOX as Co,DIM as Io,INNER_BOX as Uo,TEXT as Ro}from"../../../../../format/lib/document/seed-parts.js";const Zt={textFit:"line",textFitPhone:"wrap"},ut={...R,[Z]:""},{label:to,href:oo,...Tt}=st.defaultProps,eo=Tt,no={buttonFillOpacity:0,buttonBorder:{width:0},buttonPaddingTop:0,buttonPaddingRight:0,buttonPaddingBottom:0,buttonPaddingLeft:0},io={...w,sectionAccent:0},ro={sectionAccent:-1},so=[...W,"sectionHeightMode","sectionHeightValue","sectionHeightUnit","sectionHeightModeTablet","sectionHeightValueTablet","sectionHeightUnitTablet","sectionHeightModePhone","sectionHeightValuePhone","sectionHeightUnitPhone","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderTablet","sectionBorderPhone","sectionAccent",q.unitKey,...Q,...J,"anchor",j,...ft,G,...$,...z,...v(["widthFit",...C,...C.map(F)]),...Object.values(Y)],P="a section width key, ignored since efficient-web-builder 45 (an old key; a section's own width has new keys, lib/content/section-width), so dropping it changes nothing",co={sectionSurface:"read by nothing in src/ (searched 2026-10-24): a retired theme key that draws nothing today, so dropping it changes nothing",widthMode:P,fullWidth:P,pageWidth:P,backgroundWidth:P,contentWidth:P,contentMax:P},ao=Object.fromEntries(["sectionPaddingLeft","sectionPaddingRight","sectionPaddingLeftTablet","sectionPaddingRightTablet","sectionPaddingLeftPhone","sectionPaddingRightPhone"].map(t=>[t,"needs Box side padding outside its gutter: the old section added it outside its frame, a Box's side padding replaces the gutter. 0 live nodes store it (JJ's read-only export, 2026-10-24)"]));function bt(t,o){const e=u(t.sectionPaddingTop)??0,n=u(t.sectionPaddingBottom)??0,i=u(t.sectionPaddingTopTablet),r=u(t.sectionPaddingBottomTablet),c=b(t.sectionPaddingUnit),l=b(t.sectionPaddingUnitTablet),m=b(t.sectionPaddingUnitPhone),f=(g,a,h,p)=>{const d=u(g);if(d!==void 0)return d+s(p,"px",m,"mobile");const N=a===void 0?{n:h,unit:c}:{n:a,unit:l};return s(N.n,N.unit,m,"mobile")+s(p,"px",m,"mobile")},T=(g,a,h,p,d)=>a!==void 0?{[g]:a+s(d??p,"px",l,"tablet")}:d===void 0?{}:{[g]:s(h,c,l,"tablet")+s(d,"px",l,"tablet")};return{sectionPaddingTop:e+s(o.top,"px",c,"desktop"),sectionPaddingBottom:n+s(o.bottom,"px",c,"desktop"),...T("sectionPaddingTopTablet",i,e,o.top,o.topTablet),...T("sectionPaddingBottomTablet",r,n,o.bottom,o.bottomTablet),sectionPaddingTopPhone:f(t.sectionPaddingTopPhone,i,e,o.topPhone),sectionPaddingBottomPhone:f(t.sectionPaddingBottomPhone,r,n,o.bottomPhone)}}const po=t=>[...["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopTablet","sectionPaddingBottomTablet","sectionPaddingTopPhone","sectionPaddingBottomPhone"].map(o=>[o,o,(e,n)=>bt(n,typeof t=="function"?t(n):t)[o]]),["sectionPaddingUnit","sectionPaddingUnit"],["sectionPaddingUnitTablet","sectionPaddingUnitTablet"],["sectionPaddingUnitPhone","sectionPaddingUnitPhone"]];function B(t,o){const e={};for(const[i,r]of A)t[i]!==void 0&&(e[r]=t[i]);const n=rt(t,dt(o));return{...e,sectionPaddingTop:n.top,sectionPaddingBottom:n.bottom}}const lo=t=>[...A.map(([o,e])=>[o,e,(n,i)=>B(i,t)[e]]),["sectionPaddingTop","sectionPaddingTop",(o,e)=>B(e,t).sectionPaddingTop],["sectionPaddingBottom","sectionPaddingBottom",(o,e)=>B(e,t).sectionPaddingBottom]],_t={kind:"heading-case-upper",styles:["heading-1","heading-2","heading-3"]},mo=t=>o=>ct(o.props[t])?[_t]:[],xt=(t,o)=>({kind:"text",key:t,role:"eyebrow",props:R,...o?{style:o}:{}}),go=t=>({kind:"group",name:"Chip",props:{...I,...O("main"),...X(6,14)},parts:[xt(t,{color:"background",...V("label",12),weight:600,letterSpacing:.16})]}),L=t=>t.background!=="transparent",Et=(t,o)=>{const[e,n]=[t,o].map(i=>typeof i=="string"?i.trim():"");return e?n?`[${e} ]{color=text}${n}`:`[${e}]{color=text}`:n},k={align:"right",alignPhone:"left"},Ot=(t,o,e)=>{const n=i=>Et(i[t],i[o]);return{kind:"block",type:"Text",when:(i,r)=>r!==void 0&&n(r)!=="",box:[[t,"text",(i,r)=>n(r)],[o,"text",(i,r)=>n(r)]],props:e}},Po=(t,o,e,n={})=>Ot(t,o,{...ut,...k,...n,_partStyles:{text:{...U,color:"labels",...e,case:U.case,...k}}}),x=(t,o)=>typeof t=="number"&&Number.isInteger(t)&&t>=0?t:_(o)?.selected??0,K="var(--site-surface-2)",y=(t,o)=>_(o)?.themes[x(t.sectionAccent??0,o)],St=(t,o)=>(e,n)=>{if(!o?.(e,n))return O(t);const i=y(e,n)?.[t];return i?{fillColor:i}:{}},fo=(t,o)=>E(t,o)>=0,D=t=>t.startsWith("#")&&pt(t)!==null,ho=(t,o,e)=>{const n=t?.trim();if(n&&D(n))return{fillColor:n};const i=H(n);if(i)return O(i);const r=n===K?y(o,e):void 0;return r?{fillColor:Pt(r)}:{}},uo=t=>{const o=t?.trim();return!o||o==="transparent"||o===at||H(o)||o===K||D(o)?void 0:"it paints a colour that no Box Fill can hold"},E=(t,o)=>{const e=_(o)?.themes;return e&&L(t)?mt(e,x(t.sectionAccent,o)):-1},To=(t,o,e)=>{const n=E(o,e);return n>=0?n:t},bo=(t,o)=>{const e=_(o)?.themes,n=e?gt(e,x(t,o)):-1;return n>=0?n:t},_o=(t,o)=>{const e=E(t,o);return e>=0?{sectionAccent:e}:{}},xo=(t,o)=>L(t.props)&&E(t.props,o)<0?[{kind:"band-preset",page:x(t.props.sectionAccent,o)}]:[],Eo=(t,{view:o="desktop",to:e="px",maxPx:n=1/0}={})=>{const{siteGutter:i,siteGutterUnit:r,siteGutterPhone:c,siteGutterPhoneUnit:l}=t.site??{},m=ht(o),f=(g,a,h)=>{const p=b(a),d=M(g,p,"spacing",h);return d===null?null:s(d,p,"px",m)},T=o==="desktop"?f(i,r,tt)??et(i):f(c,l,ot)??nt(c)??it(i,r);return s(Math.min(n,T),"px",e,m)},Bt=Object.fromEntries(["Top","Right","Bottom","Left","TopPhone","RightPhone","BottomPhone","LeftPhone"].map(t=>[`sectionPadding${t}`,0])),Oo=t=>({top:0,right:0,bottom:0,left:0,...t}),So=(t,o,e,n=[])=>({kind:"group",name:t,keepEmpty:!0,props:(i,r)=>({...I,...Bt,...St("surface")(i,r),...typeof e=="function"?e(i,r):e}),box:[[o,"bgImage"],S.kind,S.duration,S.delay],parts:n});export{Zt as AUTO_COLUMN,Co as BOX,eo as BUTTON,Io as DIM,co as DROP_COMMON,ao as DROP_SIDE_PADDING,ro as FOLLOW_THE_BOX,_t as HEADING_CASE_UPPER,Uo as INNER_BOX,Bt as NO_PAD,ut as NUMBER_TEXT,k as RIGHT_WORDS,so as SAME_KEYS,io as SECTION_BOX,no as SH_LINK,Ro as TEXT,To as bandAccent,E as bandIndex,x as bandPage,_o as bandProps,xo as bandWrites,St as fillFrom,uo as fillNoBoxHolds,go as filledChip,mo as headingCaseOf,B as innerPad,lo as innerPadKeys,Po as leadLine,Ot as leadText,Oo as lineSides,Et as numberAndUnit,fo as onBandPreset,ho as ownFill,So as pictureCell,y as sectionPage,Eo as siteGutterOf,xt as smallText,bo as surfaceAccent,bt as wrapperPad,po as wrapperPadKeys};
@@ -1,6 +1,8 @@
1
+ import { SECTION_CSS_SCOPE_ATTR } from "../../../format/lib/content/section-css.js";
1
2
  export declare const CUSTOM_HTML_SCOPE_ATTR = "data-sf-custom-html";
2
- export declare function customHtmlScope(id: string): string;
3
- export declare function scopeCustomCss(css: string, id: string): string;
3
+ export type CssScopeAttr = typeof CUSTOM_HTML_SCOPE_ATTR | typeof SECTION_CSS_SCOPE_ATTR;
4
+ export declare function customHtmlScope(id: string, attr?: CssScopeAttr): string;
5
+ export declare function scopeCustomCss(css: string, id: string, attr?: CssScopeAttr): string;
4
6
  export declare function splitCustomHtml(html: string): {
5
7
  css: string;
6
8
  markup: string;
@@ -1,2 +1,2 @@
1
- import y from"isomorphic-dompurify";import S from"postcss";import w from"postcss-selector-parser";import{sanitizeHtml as C}from"./sanitize.js";import{styleElementText as d}from"../../../format/lib/document/style-text.js";const O="data-sf-custom-html",g=/^[A-Za-z][\w-]*$/;function E(n){return`[${O}="${n}"]`}const m=new Set(["media","supports","container"]),_=new Set(["behavior","-moz-binding"]),h=/expression\s*\(|javascript:|vbscript:/i,T=/^[a-z][a-z0-9+.-]*:/i,A=new Set(["none","initial","inherit","unset","revert","revert-layer","default","auto","normal","ease","ease-in","ease-out","ease-in-out","linear","step-start","step-end","infinite","reverse","alternate","alternate-reverse","forwards","backwards","both","running","paused"]);function $(n){return n.replace(/\\([0-9a-f]{1,6})\s?|\\(.)/gi,(s,r,o)=>r?String.fromCodePoint(Math.min(+`0x${r}`,1114111)||65533):o??"")}function p(n){const s=n.trim();return s.startsWith("//")?!0:T.test(s)&&!/^https:\/\//i.test(s)}const v=/\/\*[\s\S]*?(?:\*\/|$)/g;function N(n,s){const r=$(s.replace(v,"")).replace(v,"");if(h.test(r))return!1;for(const o of r.matchAll(/url\(\s*(['"]?)(.*?)\1\s*\)/gi))if(p(o[2]))return!1;if(n.startsWith("--")||/(?:image-set|image|src)\(/i.test(r)){for(const o of r.matchAll(/(['"])(.*?)\1/g))if(p(o[2]))return!1}return!0}function R(n){const s=n.find(r=>r.type==="combinator");return s?s.value.trim()||" ":null}function L(n,s){let r;try{r=w().astSync(n)}catch{return null}const o=[];for(const i of r.nodes){const l=i.nodes;if(l.length===0)return null;let c=!1;if(i.walkNesting(()=>{c=!0}),c)continue;const t=l[0],e=t.type==="tag"&&/^(html|body)$/i.test(t.value)||t.type==="pseudo"&&t.value.toLowerCase()===":root",a=t.type==="universal",u=R(l.slice(1));if((e||a)&&(u==="~"||u==="+"))a&&o.push(`${s} ${String(i).trim()}`);else if(e||a){const f=l.slice(1).map(String).join("").trimEnd();o.push(f?s+f:a?`${s} *`:s)}else{if(t.type==="combinator"&&/^[~+]$/.test(t.value.trim()))continue;o.push(`${s} ${String(i).trim()}`)}}return o.length?o.join(", "):null}function k(n,s){if(!g.test(s))return"";let r;try{r=S.parse(n)}catch{return""}const o=E(s),i=new Map;r.walkComments(t=>{t.remove()});const l=t=>{for(const e of[...t.nodes??[]])e.type==="atrule"?m.has(e.name.toLowerCase())&&e.nodes?l(e):e.remove():e.type==="rule"&&e.remove()},c=t=>{for(const e of[...t.nodes??[]])if(e.type==="atrule"){const a=e.name.toLowerCase();if(/^(-[a-z]+-)?keyframes$/.test(a)){const u=e.params.trim();if(!/^[A-Za-z_][\w-]*$/.test(u)||A.has(u.toLowerCase()))e.remove();else{const f=`${u}-${s}`;i.set(u,f),e.params=f}}else m.has(a)&&e.nodes?c(e):e.remove()}else if(e.type==="rule"){const a=L(e.selector,o);a===null?e.remove():(e.selector=a,l(e))}else e.type==="decl"&&e.remove()};return c(r),r.walkDecls(t=>{if(_.has(t.prop.toLowerCase())||!N(t.prop,t.raws.value?.raw??t.value)){t.remove();return}i.size>0&&/^(-[a-z]+-)?animation(-name)?$/i.test(t.prop)&&(t.value=t.value.replace(/(?<![\w-])[A-Za-z_][\w-]*(?![\w(-])/g,e=>i.get(e)??e))}),r.walkAtRules(t=>{t.nodes&&t.nodes.length===0&&t.remove()}),d(r.toString()).trim()}const x={ALLOWED_TAGS:["style","#text"],ALLOWED_ATTR:[],KEEP_CONTENT:!1,FORBID_CONTENTS:[],FORCE_BODY:!0,RETURN_DOM_FRAGMENT:!0};function I(n){const s=C(n);if(!/<style/i.test(n))return{css:"",markup:s};const r=y.sanitize(n,x).querySelectorAll("style");return{css:Array.from(r,i=>i.textContent??"").join(`
2
- `),markup:s}}export{O as CUSTOM_HTML_SCOPE_ATTR,E as customHtmlScope,k as scopeCustomCss,I as splitCustomHtml};
1
+ import w from"isomorphic-dompurify";import C from"postcss";import d from"postcss-selector-parser";import{sanitizeHtml as O}from"./sanitize.js";import{styleElementText as g}from"../../../format/lib/document/style-text.js";const p="data-sf-custom-html",E=/^[A-Za-z][\w-]*$/;function _(n,t=p){return`[${t}="${n}"]`}const v=new Set(["media","supports","container"]),h=new Set(["behavior","-moz-binding"]),T=/expression\s*\(|javascript:|vbscript:/i,A=/^[a-z][a-z0-9+.-]*:/i,$=new Set(["none","initial","inherit","unset","revert","revert-layer","default","auto","normal","ease","ease-in","ease-out","ease-in-out","linear","step-start","step-end","infinite","reverse","alternate","alternate-reverse","forwards","backwards","both","running","paused"]);function N(n){return n.replace(/\\([0-9a-f]{1,6})\s?|\\(.)/gi,(t,o,r)=>o?String.fromCodePoint(Math.min(+`0x${o}`,1114111)||65533):r??"")}function y(n){const t=n.trim();return t.startsWith("//")?!0:A.test(t)&&!/^https:\/\//i.test(t)}const S=/\/\*[\s\S]*?(?:\*\/|$)/g;function R(n,t){const o=N(t.replace(S,"")).replace(S,"");if(T.test(o))return!1;for(const r of o.matchAll(/url\(\s*(['"]?)(.*?)\1\s*\)/gi))if(y(r[2]))return!1;if(n.startsWith("--")||/(?:image-set|image|src)\(/i.test(o)){for(const r of o.matchAll(/(['"])(.*?)\1/g))if(y(r[2]))return!1}return!0}function L(n){const t=n.find(o=>o.type==="combinator");return t?t.value.trim()||" ":null}function x(n,t){let o;try{o=d().astSync(n)}catch{return null}const r=[];for(const a of o.nodes){const l=a.nodes;if(l.length===0)return null;let f=!1;if(a.walkNesting(()=>{f=!0}),f)continue;const i=l[0],s=i.type==="tag"&&/^(html|body)$/i.test(i.value)||i.type==="pseudo"&&i.value.toLowerCase()===":root",e=i.type==="universal",u=L(l.slice(1));if((s||e)&&(u==="~"||u==="+"))e&&r.push(`${t} ${String(a).trim()}`);else if(s||e){const c=l.slice(1).map(String).join("").trimEnd();r.push(c?t+c:e?`${t} *`:t)}else{if(i.type==="combinator"&&/^[~+]$/.test(i.value.trim()))continue;r.push(`${t} ${String(a).trim()}`)}}return r.length?r.join(", "):null}function I(n,t,o=p){if(!E.test(t))return"";let r;try{r=C.parse(n)}catch{return""}const a=_(t,o),l=new Map;r.walkComments(s=>{s.remove()});const f=s=>{for(const e of[...s.nodes??[]])e.type==="atrule"?v.has(e.name.toLowerCase())&&e.nodes?f(e):e.remove():e.type==="rule"&&e.remove()},i=s=>{for(const e of[...s.nodes??[]])if(e.type==="atrule"){const u=e.name.toLowerCase();if(/^(-[a-z]+-)?keyframes$/.test(u)){const c=e.params.trim();if(!/^[A-Za-z_][\w-]*$/.test(c)||$.has(c.toLowerCase()))e.remove();else{const m=`${c}-${t}`;l.set(c,m),e.params=m}}else v.has(u)&&e.nodes?i(e):e.remove()}else if(e.type==="rule"){const u=x(e.selector,a);u===null?e.remove():(e.selector=u,f(e))}else e.type==="decl"&&e.remove()};return i(r),r.walkDecls(s=>{if(h.has(s.prop.toLowerCase())||!R(s.prop,s.raws.value?.raw??s.value)){s.remove();return}l.size>0&&/^(-[a-z]+-)?animation(-name)?$/i.test(s.prop)&&(s.value=s.value.replace(/(?<![\w-])[A-Za-z_][\w-]*(?![\w(-])/g,e=>l.get(e)??e))}),r.walkAtRules(s=>{s.nodes&&s.nodes.length===0&&s.remove()}),g(r.toString()).trim()}const D={ALLOWED_TAGS:["style","#text"],ALLOWED_ATTR:[],KEEP_CONTENT:!1,FORBID_CONTENTS:[],FORCE_BODY:!0,RETURN_DOM_FRAGMENT:!0};function F(n){const t=O(n);if(!/<style/i.test(n))return{css:"",markup:t};const o=w.sanitize(n,D).querySelectorAll("style");return{css:Array.from(o,a=>a.textContent??"").join(`
2
+ `),markup:t}}export{p as CUSTOM_HTML_SCOPE_ATTR,_ as customHtmlScope,I as scopeCustomCss,F as splitCustomHtml};
@@ -1 +1 @@
1
- import{catalogueLabel as e}from"../../../../format/lib/document/passes/catalogue-labels.js";import{blockSize as n}from"./block-size.js";import{boxJoin as s}from"./box-join.js";import{cardTemplateOnInsert as p}from"../../../../format/lib/document/passes/card-template-on-insert.js";import{cellWidth as c}from"./cell-width.js";import{clickableParts as f}from"./clickable-parts.js";import{cardCorners as l,sectionCorners as a}from"./corners.js";import{emptyHeadings as d}from"../../../../format/lib/document/passes/empty-headings.js";import{showWhenRows as h}from"../../../../format/lib/document/passes/show-when-rows.js";import{headBox as S,headCore as u}from"./head-core.js";import{hiddenNodes as b}from"./hidden-nodes.js";import{showFor as g}from"./show-for.js";import{mediaValues as w}from"../../../../format/lib/document/passes/media-values.js";import{sectionAnchor as k}from"./section-anchor.js";import{blockEntrance as A,sectionAnimation as P}from"./section-animation.js";import{blockScroll as C,sectionScroll as B}from"./scroll-effect.js";import{sectionHeight as W,sectionHeightFillRoot as y}from"./section-height.js";import{cardSticky as G,sectionSticky as H}from"./section-sticky.js";import{sectionBorder as R}from"./borders.js";import{blockPadding as T,sectionPadding as x}from"./section-padding.js";import{sectionTheme as E,slideTheme as F}from"./section-theme.js";import{buttonAlignInRow as I,containedWidth as L,sectionWidth as O}from"./section-width.js";import{blockGroups as z,sectionGroups as D}from"../../../../format/lib/document/passes/settings-groups.js";import{slotsStartAfresh as J}from"./slots-start-afresh.js";import{openSlotDisallow as K,sectionGroupAllow as N}from"../../../../format/lib/document/passes/slot-rules.js";import{registryPassContext as go}from"../../../../format/lib/document/passes/registry-context.js";const V=[J,w,u,N,K,x,a,R,l,T,A,C,c,O,L,I,W,k,E,P,B,H,G,s,F,n,D,z,h,d,f,S,g,y,b,e,p];function So(r,m,o){const t=m;for(const i of V)i.applies(r,o,t)&&(o.inspector&&i.panel?.(t,r,o.inspector,o),i.draw?.(t,r,o));return m}export{V as BLOCK_PASSES,So as applyBlockPasses,go as registryPassContext};
1
+ import{catalogueLabel as e}from"../../../../format/lib/document/passes/catalogue-labels.js";import{blockSize as s}from"./block-size.js";import{boxJoin as n}from"./box-join.js";import{cardTemplateOnInsert as p}from"../../../../format/lib/document/passes/card-template-on-insert.js";import{cellWidth as c}from"./cell-width.js";import{clickableParts as f}from"./clickable-parts.js";import{cardCorners as l,sectionCorners as a}from"./corners.js";import{emptyHeadings as d}from"../../../../format/lib/document/passes/empty-headings.js";import{showWhenRows as h}from"../../../../format/lib/document/passes/show-when-rows.js";import{headBox as u,headCore as S}from"./head-core.js";import{hiddenNodes as b}from"./hidden-nodes.js";import{showFor as g}from"./show-for.js";import{mediaValues as w}from"../../../../format/lib/document/passes/media-values.js";import{sectionAnchor as C}from"./section-anchor.js";import{sectionCustomCss as k}from"./section-custom-css.js";import{blockEntrance as A,sectionAnimation as P}from"./section-animation.js";import{blockScroll as B,sectionScroll as W}from"./scroll-effect.js";import{sectionHeight as y,sectionHeightFillRoot as G}from"./section-height.js";import{cardSticky as H,sectionSticky as R}from"./section-sticky.js";import{sectionBorder as T}from"./borders.js";import{blockPadding as x,sectionPadding as E}from"./section-padding.js";import{sectionTheme as F,slideTheme as I}from"./section-theme.js";import{buttonAlignInRow as L,containedWidth as O,sectionWidth as z}from"./section-width.js";import{blockGroups as D,sectionGroups as J}from"../../../../format/lib/document/passes/settings-groups.js";import{slotsStartAfresh as K}from"./slots-start-afresh.js";import{openSlotDisallow as N,sectionGroupAllow as V}from"../../../../format/lib/document/passes/slot-rules.js";import{registryPassContext as Co}from"../../../../format/lib/document/passes/registry-context.js";const _=[K,w,S,V,N,E,a,T,l,x,A,B,c,z,O,L,y,k,C,F,P,W,R,H,n,I,s,J,D,h,d,f,u,g,G,b,e,p];function bo(r,m,o){const t=m;for(const i of _)i.applies(r,o,t)&&(o.inspector&&i.panel?.(t,r,o.inspector,o),i.draw?.(t,r,o));return m}export{_ as BLOCK_PASSES,bo as applyBlockPasses,Co as registryPassContext};
@@ -0,0 +1,2 @@
1
+ import type { BlockPass } from "../../../../format/lib/document/passes/types.js";
2
+ export declare const sectionCustomCss: BlockPass;
@@ -0,0 +1 @@
1
+ import{jsx as r,jsxs as o}from"react/jsx-runtime";import{lazy as a}from"react";import{CellWrap as d}from"../../../components/InBoxContext.js";import{SECTION_CSS_KEY as f,SECTION_CSS_SCOPE_ATTR as l,sectionCssOf as c}from"../../../../format/lib/content/section-css.js";const C=a(()=>import("../section-css-style.js")),x={name:"sectionCustomCss",applies:(e,t,s)=>t.isSection(e)&&!!s&&typeof s.render=="function",panel(e,t,s){e.fields={...e.fields,...s.customCssFields()}},draw(e){e.defaultProps={...e.defaultProps,[f]:""};const t=e.render;e.render=s=>{const n=c(s),i=typeof s.id=="string"?s.id:"";return!n||!i?t(s):o(d,{className:"sf-section-css",attrs:{[l]:i},children:[r(C,{css:n,id:i}),t(s)]})}}};export{x as sectionCustomCss};
@@ -0,0 +1,4 @@
1
+ export default function SectionCssStyle({ css, id }: {
2
+ css: string;
3
+ id: string;
4
+ }): import("react").JSX.Element | null;
@@ -0,0 +1 @@
1
+ import{jsx as e}from"react/jsx-runtime";import{SECTION_CSS_SCOPE_ATTR as r}from"../../../format/lib/content/section-css.js";import{scopeCustomCss as n}from"./custom-css.js";function m({css:t,id:s}){const o=n(t,s,r);return o?e("style",{dangerouslySetInnerHTML:{__html:o}}):null}export{m as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-web-builder",
3
- "version": "73.0.0",
3
+ "version": "73.1.0",
4
4
  "description": "The EFFICIENT website builder: the website editor, the general sections and the renderer that draws them, compiled. Hostable by any EFFICIENT product; nothing here imports a host.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Efficient Pty Ltd",
@@ -54,7 +54,7 @@
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@tabler/icons-react": "^3.46.0",
57
- "efficient-easel": "^37.0.0",
57
+ "efficient-easel": "^37.1.0",
58
58
  "efficient-shell": "^13.24.1",
59
59
  "isomorphic-dompurify": "^3.18.0",
60
60
  "next": ">=16",
@@ -75,9 +75,9 @@
75
75
  "@types/node": "^20",
76
76
  "@types/react": "^19",
77
77
  "@types/react-dom": "^19",
78
- "efficient-easel": "^37.0.0",
78
+ "efficient-easel": "^37.1.0",
79
79
  "efficient-shell": "^13.24.1",
80
- "efficient-shell-checker": "npm:efficient-shell@13.17.0",
80
+ "efficient-shell-checker": "npm:efficient-shell@13.25.0",
81
81
  "esbuild": "^0.28.0",
82
82
  "happy-dom": "^20.14.5",
83
83
  "isomorphic-dompurify": "^3.18.0",