efficient-web-builder 72.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.
- package/CHANGELOG.md +49 -0
- package/dist/editor/components/AddPageWindow.js +1 -1
- package/dist/editor/components/MediaUploadField.d.ts +2 -1
- package/dist/editor/components/PageStarterCard.js +1 -1
- package/dist/editor/components/SideSpaceField.d.ts +3 -0
- package/dist/editor/components/SideSpaceField.js +1 -1
- package/dist/editor/components/storefront-editor.css +14 -23
- package/dist/editor/lib/content/site-length-rows.js +1 -1
- package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -1
- package/dist/editor/lib/document/controls.d.ts +5 -2
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/editor/lib/document/passes/inspector.js +1 -1
- package/dist/editor/lib/document/shape-picker.d.ts +16 -8
- package/dist/editor/lib/document/shape-picker.js +1 -1
- package/dist/editor/lib/document/show-when-resolve.js +1 -1
- package/dist/format/lib/content/box-shape.d.ts +2 -1
- package/dist/format/lib/content/box-shape.js +1 -1
- package/dist/format/lib/content/css-length.d.ts +2 -3
- package/dist/format/lib/content/css-length.js +1 -1
- package/dist/format/lib/content/gallery-card-layout.d.ts +22 -1
- package/dist/format/lib/content/gallery-card-layout.js +1 -1
- package/dist/format/lib/content/grid-span.d.ts +15 -2
- package/dist/format/lib/content/grid-span.js +1 -1
- package/dist/format/lib/content/image-aspect.d.ts +5 -3
- package/dist/format/lib/content/image-aspect.js +1 -1
- package/dist/format/lib/content/page-width.d.ts +3 -0
- package/dist/format/lib/content/page-width.js +1 -1
- package/dist/format/lib/content/part-names.d.ts +27 -0
- package/dist/format/lib/content/part-names.js +1 -0
- package/dist/format/lib/content/section-css.d.ts +3 -0
- package/dist/format/lib/content/section-css.js +1 -0
- package/dist/format/lib/content/section-min-height.js +1 -1
- package/dist/format/lib/content/view-hide-class.js +1 -1
- package/dist/format/lib/content/view-tier.d.ts +2 -2
- package/dist/format/lib/document/passes/types.d.ts +1 -0
- package/dist/format/lib/document/style-text.d.ts +1 -0
- package/dist/format/lib/document/style-text.js +1 -0
- package/dist/format/lib/editor-words-catalogue.d.ts +5 -0
- package/dist/format/lib/editor-words-catalogue.js +1 -1
- package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
- package/dist/format/lib/site-twin-row.d.ts +2 -1
- package/dist/render/components/BlockFrame.d.ts +3 -1
- package/dist/render/components/BlockFrame.js +1 -1
- package/dist/render/components/Btn.d.ts +3 -0
- package/dist/render/components/Btn.js +1 -1
- package/dist/render/components/ButtonBlock.js +1 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/Grid.js +1 -1
- package/dist/render/components/Heading.js +1 -1
- package/dist/render/components/HeroArrows.d.ts +4 -1
- package/dist/render/components/HeroArrows.js +1 -1
- package/dist/render/components/HeroPictures.js +1 -1
- package/dist/render/components/HeroPoster.js +1 -1
- package/dist/render/components/HeroSection.js +1 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/HeroSlide.js +1 -1
- package/dist/render/components/ImageBlock.js +1 -1
- package/dist/render/components/Logo.d.ts +3 -1
- package/dist/render/components/Logo.js +1 -1
- package/dist/render/components/LogoBlock.js +1 -1
- package/dist/render/components/PublishedPartStylesContext.js +1 -1
- package/dist/render/components/SiteGutterFrame.d.ts +3 -1
- package/dist/render/components/SiteGutterFrame.js +1 -1
- package/dist/render/components/Text.js +1 -1
- package/dist/render/lib/content/section-padding.d.ts +2 -1
- package/dist/render/lib/document/blocks/general/CustomHTML/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
- package/dist/render/lib/document/custom-css.d.ts +9 -0
- package/dist/render/lib/document/custom-css.js +2 -0
- package/dist/render/lib/document/part-styles.d.ts +2 -2
- package/dist/render/lib/document/passes/cell-width.js +1 -1
- package/dist/render/lib/document/passes/index.js +1 -1
- package/dist/render/lib/document/passes/section-custom-css.d.ts +2 -0
- package/dist/render/lib/document/passes/section-custom-css.js +1 -0
- package/dist/render/lib/document/render-registry.js +1 -1
- package/dist/render/lib/document/section-css-style.d.ts +4 -0
- package/dist/render/lib/document/section-css-style.js +1 -0
- package/package.json +10 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as a,jsxs as H}from"react/jsx-runtime";import{useEffect as l,useRef as R,useState as n}from"react";import{SiteImage as oe}from"../lib/site-runtime.js";import ae from"./HeroHeldFrame.js";import{isExternalMediaUrl as ne,videoForView as ie,videoSources as le}from"../lib/media.js";import{EDGE_PHONE_MEDIA as T}from"../lib/content/view-values.js";import{EDGE_WIDE_MEDIA as ce}from"../../format/lib/content/view-lines.js";import{useViewWidthRead as de}from"./SectionAnimation.js";import{sizedImage as W}from"../../format/lib/sized-image.js";import{phoneFocus as ue}from"../../format/lib/content/phone-focus.js";import{useFirstScreenPlace as me}from"../lib/first-screen.js";const
|
|
1
|
+
"use client";import{jsx as a,jsxs as H}from"react/jsx-runtime";import{useEffect as l,useRef as R,useState as n}from"react";import{SiteImage as oe}from"../lib/site-runtime.js";import ae from"./HeroHeldFrame.js";import{isExternalMediaUrl as ne,videoForView as ie,videoSources as le}from"../lib/media.js";import{EDGE_PHONE_MEDIA as T}from"../lib/content/view-values.js";import{EDGE_WIDE_MEDIA as ce}from"../../format/lib/content/view-lines.js";import{useViewWidthRead as de}from"./SectionAnimation.js";import{sizedImage as W}from"../../format/lib/sized-image.js";import{phoneFocus as ue}from"../../format/lib/content/phone-focus.js";import{useFirstScreenPlace as me}from"../lib/first-screen.js";import{partAttr as fe}from"../../format/lib/content/part-names.js";const pe=.5;function ve({videoSrc:$,videoAv1Src:M,videoSrcPhone:V,videoAv1SrcPhone:G,posterSrc:q,posterSrcPhone:B,showVideo:F=!0,playbackRate:z=pe,objectPosition:u="50% 50%",objectPositionPhone:K,objectPositionTablet:O,quiet:b=!1,slideShown:U,laterSlide:I=!1,laterOfLead:Y=!1}){const m=ue(K,O),v=me(),[h,J]=n(!1),w=v==="below"&&!h,Q=v==="first",t=q||"",r=B||"",L=R(null),N=de(L,!0,!0),y=N===void 0?void 0:N==="phone",k=ie({video:$,av1:M,videoPhone:V,av1Phone:G},y===!0),o=k.video||"",X=le(o,k.av1),[E,S]=n(!1),[x,_]=n(!1),[Z,A]=n(!1),[ee,C]=n(!1),f=U??!0,[g,te]=n(!1),i=v!=="first"&&!Y,[c,j]=n(!1),P=R(null);l(()=>{if(!i)return;if(document.readyState==="complete"){j(!0);return}const e=()=>j(!0);return window.addEventListener("load",e,{once:!0}),()=>window.removeEventListener("load",e)},[i]),l(()=>{S(!1),_(!1),A(!1),C(!1)},[o,t,r]),l(()=>{f&&te(!0)},[f]),l(()=>{const e=P.current;e&&(f?e.play()?.catch(()=>{}):e.pause())},[f,g,c]),l(()=>{if(!I||i&&!c)return;const e=()=>J(!0);if(typeof window.requestIdleCallback=="function"){const se=window.requestIdleCallback(e,{timeout:2e3});return()=>window.cancelIdleCallback(se)}const s=setTimeout(e,800);return()=>clearTimeout(s)},[I,i,c]),l(()=>{const e=P.current;if(!e)return;const s=()=>{e.playbackRate=z};return s(),e.addEventListener("loadedmetadata",s),()=>e.removeEventListener("loadedmetadata",s)},[o,z]);const D=ne(t),d=t&&(D||r)&&!x?W(t):{src:t},p=r&&!x?W(r):{src:r},re=r&&!w&&!h?[{sized:p,media:T},...t?[{sized:d,media:ce}]:[]]:[];return H("div",{ref:L,className:"absolute inset-0 z-[1]",...fe("hero-media"),children:[a("div",{className:"absolute inset-0",style:{background:"var(--site-surface)"}}),re.map(({sized:e,media:s})=>a("link",{rel:"preload",as:"image",href:e.src,media:s,fetchPriority:"high",...e.srcSet?{imageSrcSet:e.srcSet,imageSizes:"100vw"}:{}},s)),(t||r)&&(D||r?(()=>{const e=a("img",{...t?{src:d.src}:{},...d.srcSet?{srcSet:d.srcSet,sizes:"100vw"}:{},alt:"",...w?{loading:"lazy"}:{},...Q?{fetchPriority:"high"}:{},className:`absolute inset-0 z-[2] h-full w-full object-cover ${m.className}`.trim(),style:{display:E?"none":"block",objectPosition:u,...m.style},onError:s=>{s.currentTarget.currentSrc&&(d.srcSet||p.srcSet?_(!0):S(!0))}},r?void 0:t);return r?H("picture",{children:[a("source",{media:T,srcSet:p.srcSet||p.src,sizes:"100vw"}),e]},`${t} ${r}`):e})():a(oe,{src:t,alt:"",fill:!0,...w?{}:h?{loading:"eager"}:{priority:!0},sizes:"100vw",className:`z-[2] object-cover ${m.className}`.trim(),style:{display:E?"none":"block",objectPosition:u,...m.style},onError:()=>S(!0)},t)),F&&!b&&o&&y!==void 0&&g&&(!i||c)&&!Z&&a("video",{ref:P,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"metadata",className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:u},onError:()=>A(!0),children:X.map(e=>a("source",{src:e.src,type:e.type},e.src))},o),F&&b&&o&&y!==void 0&&g&&(!i||c)&&!ee&&(!t||E)&&a(ae,{src:o,objectPosition:u,onError:()=>C(!0)},o)]})}export{ve as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as n,jsxs as
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Fragment as E,jsx as f,jsxs as O}from"react/jsx-runtime";import{createContext as P,useContext as m,useEffect as A,useId as k,useMemo as F,useRef as M}from"react";import{armEntrance as j}from"efficient-shell/format";import{blockDrawsTextStyle as D,partRuleForKind as y,partRuleForText as K,partStyleCss as L,publishedPartStyles as N}from"../lib/document/part-styles.js";import{useViewWidth as I}from"./SectionAnimation.js";import{useDrawsAtEdge as $}from"./InBoxContext.js";import{styleKeyForPart as B}from"../../format/lib/sections/section-text-kinds.js";import{NO_MOTIONS as H,PART_LIFT_ATTR as
|
|
1
|
+
"use client";import{Fragment as E,jsx as f,jsxs as O}from"react/jsx-runtime";import{createContext as P,useContext as m,useEffect as A,useId as k,useMemo as F,useRef as M}from"react";import{armEntrance as j}from"efficient-shell/format";import{blockDrawsTextStyle as D,partRuleForKind as y,partRuleForText as K,partStyleCss as L,publishedPartStyles as N}from"../lib/document/part-styles.js";import{useViewWidth as I}from"./SectionAnimation.js";import{useDrawsAtEdge as $}from"./InBoxContext.js";import{styleKeyForPart as B}from"../../format/lib/sections/section-text-kinds.js";import{NO_MOTIONS as H,PART_LIFT_ATTR as T,drawPartEntrance as J,drawPartScroll as W,ensurePartLiftSheet as Y,firstOnPage as b,partBoxOf as V,partMotionDrawn as q,partMoves as z}from"../lib/animation/part-motion.js";import{styleElementText as G}from"../../format/lib/document/style-text.js";const S=P(null),R=P(null),_=P(null);function ue({needles:e,styles:t,motions:r=H,type:o,atEdge:n=!1,children:i}){const u=k(),d=$(n?"edge":"by-box"),x=JSON.stringify([u,e,t,r,o]),c=F(()=>{const p=Object.keys(r).filter(l=>z(r[l]));return N(e,t,u,l=>B(o,l),l=>D(o,l),l=>p.includes(l)?q(r[l]):null,p)},[x]);if(!c)return f(E,{children:i});const s=L(c,{inBox:d});return O(E,{children:[s&&f("style",{href:`${Q}${u}-${U(s)}`,precedence:w,dangerouslySetInnerHTML:{__html:G(s)}}),f(S.Provider,{value:c,children:i})]})}const g=new WeakMap;function v(e,t){const r=b(t.filter(n=>n.arm)),o=t.some(n=>n.entering)?void 0:b(t.filter(n=>n.scroll));for(const n of t)n!==r&&n.undo&&(n.undo(),n.undo=void 0),n!==o&&n.undoScroll&&(n.undoScroll(),n.undoScroll=void 0);r?.arm&&!r.undo&&(r.undo=r.arm()),o?.scroll&&!o.undoScroll&&(o.undoScroll=o.scroll()),t.some(n=>n.lift)?(Y(e.ownerDocument),e.setAttribute(T,"")):e.removeAttribute(T)}function ce(e){const t=M(null),r=e?.motion?.entrance??null,o=e?.motion?.scroll??null,n=e?.motion?.hover==="lift",i=I(t,r!==null||o!==null),u=r?r[i]:null,d=o&&o[i].effect!=="none"?o[i]:null,x=JSON.stringify([u,d]);return A(()=>{const c=t.current,s=V(c?.parentElement??null);if(!r&&!o&&!n||!c||!s)return;const p=u?()=>{const h=J(s,u),C=j(s);return()=>{C?.(),h()}}:null,l=g.get(s)??[];g.set(s,l);const a={element:c,arm:p,entering:u!==null&&u.kind!=="none",scroll:d?()=>W(s,d):null,lift:n};return l.push(a),v(s,l),()=>{const h=l.indexOf(a);h<0||(l.splice(h,1),a.undo?.(),a.undo=void 0,a.undoScroll?.(),a.undoScroll=void 0,v(s,l),l.length||g.delete(s))}},[x,n]),t}const w="sf-part-styles",Q=`${w}-`;function U(e){let t=2166136261;for(let r=0;r<e.length;r+=1)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function ie(e){const t=m(S),r=m(R),o=K(t,e);return o&&o.stamp!==r?o:null}function ae(e){return y(m(S),e)}function de({stamp:e,children:t}){return f(R.Provider,{value:e,children:t})}function fe({children:e}){const t=m(S);return f(_.Provider,{value:t,children:e})}function me(e){return y(m(_),e)}export{de as ClaimedStamp,w as PART_STYLES_PRECEDENCE,ue as PublishedPartStyles,fe as SharedPartKinds,ce as usePartEntrance,ae as usePublishedPartKindRule,ie as usePublishedPartRule,me as usePublishedSharedKindRule};
|
|
@@ -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
|
|
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
|
|
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,4 +1,5 @@
|
|
|
1
1
|
import type { CSSProperties } from "react";
|
|
2
|
+
import { type ViewTier } from "efficient-easel/draw";
|
|
2
3
|
import { type SiteSide } from "efficient-easel/screen/lib/content/length-units";
|
|
3
4
|
export declare const SECTION_PADDING: {
|
|
4
5
|
readonly min: 10;
|
|
@@ -34,7 +35,7 @@ export type PadSides = {
|
|
|
34
35
|
bottom?: unknown;
|
|
35
36
|
left?: unknown;
|
|
36
37
|
};
|
|
37
|
-
export declare function padDefaultIn(px: number, unit: unknown, tier:
|
|
38
|
+
export declare function padDefaultIn(px: number, unit: unknown, tier: ViewTier): number;
|
|
38
39
|
export type PadUnits = {
|
|
39
40
|
desktop?: unknown;
|
|
40
41
|
tablet?: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{HideTaker as m}from"../../../../../components/ViewHideRoot.js";import{CUSTOM_HTML_SCOPE_ATTR as p,scopeCustomCss as T,splitCustomHtml as l}from"../../../custom-css.js";import{CustomHTMLMeta as u}from"../../../../../../format/lib/document/blocks/general/CustomHTML/meta.js";const a={...u,render:({html:n,id:t})=>{const{css:r,markup:s}=l(n??""),o=r?T(r,String(t??"")):"";return o?e(m,{[p]:t,dangerouslySetInnerHTML:{__html:`<style>${o}</style>${s}`}}):e(m,{dangerouslySetInnerHTML:{__html:s}})}};export{a as CustomHTMLRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{siteLengthHeld as
|
|
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};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SECTION_CSS_SCOPE_ATTR } from "../../../format/lib/content/section-css.js";
|
|
2
|
+
export declare const CUSTOM_HTML_SCOPE_ATTR = "data-sf-custom-html";
|
|
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;
|
|
6
|
+
export declare function splitCustomHtml(html: string): {
|
|
7
|
+
css: string;
|
|
8
|
+
markup: string;
|
|
9
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import { type TextStyleCase } from "efficient-easel/draw";
|
|
1
|
+
import { type TextStyleCase, type ViewTier } from "efficient-easel/draw";
|
|
2
2
|
import { type FontRole } from "../../../format/lib/fonts.js";
|
|
3
3
|
import type { PartEl } from "../../../editor/lib/document/part-anchors.js";
|
|
4
4
|
import { type PartNeedle } from "./text-parts.js";
|
|
@@ -139,7 +139,7 @@ export declare const PART_PARAGRAPH_VAR = "--sf-part-para";
|
|
|
139
139
|
export declare function partPhoneDeclarations(style: PartStyle): Record<string, string>;
|
|
140
140
|
export declare function partTabletDeclarations(style: PartStyle): Record<string, string>;
|
|
141
141
|
export declare function partAlignFollowed(style: PartStyle, screen: PartScreen): PartAlign | undefined;
|
|
142
|
-
export type PartScreen =
|
|
142
|
+
export type PartScreen = ViewTier;
|
|
143
143
|
export declare function partStyleForScreen(style: PartStyle, screen: PartScreen): PartStyle;
|
|
144
144
|
export declare function partCanvasDeclarations(style: PartStyle, screen: PartScreen, options?: PartDeclarationOptions): Record<string, string>;
|
|
145
145
|
export declare function partSizeBoxOf(screen: PartScreen): "size" | "sizeTablet" | "sizePhone";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as E}from"react/jsx-runtime";import{HideTaker as u}from"../../../components/ViewHideRoot.js";import{phoneKey as s}from"efficient-easel/draw";import{GRID_ROW_SPAN_ATTR as I,GRID_ROW_SPAN_PHONE_ATTR as O,GRID_SPAN_ATTR as A,GRID_SPAN_PHONE_ATTR as W,GRID_TILE_AT_KEY as a,GRID_TILE_AT_VAR as m,resolveGridRowSpan as p,resolveGridRowSpanPhone as w,resolveGridSpan as h,resolveGridSpanPhone as L,resolveGridTileAt as N}from"../../../../format/lib/content/grid-span.js";import{withRowsShownWhen as f}from"../../../../format/lib/document/show-when-attach.js";import{CONTAINER_BLOCK_CHOICES as G}from"../../../../format/lib/document/container-blocks.js";import{RETIRED_NESTABLE_SECTIONS as g}from"../../../../format/lib/document/section-catalog.js";import{BOX_MAY_HOLD as H}from"../../../../format/lib/document/passes/slot-rules.js";const c=Array.from(new Set([...G.map(n=>n.type),...H]));function P(n,t){return c.includes(n)||t?.sitsInBox===!0}const x=Array.from(new Set([...c,...g,"GalleryItem"])),D={not:{context:"parentOffersPositions",is:!1}},y={not:{context:"parentTileSlot",is:!1}},R=[a,s("gridSpan"),s("gridRowSpan")],X={name:"cellWidth",applies:(n,t,e)=>(x.includes(n)||P(n,e))&&!!e&&typeof e.render=="function",panel(n,t,e){const r=e.cellWidthFields;n.fields={...n.fields,...r()};const i=Object.keys(r());n.fields=f(n.fields??{},i.filter(l=>!R.includes(l)),D),n.fields=f(n.fields??{},R,y)},draw(n){const t=n.render;n.render=e=>{const r=h(e.gridSpan),i=p(e.gridRowSpan),l=N(e[a]),_=L(e[s("gridSpan")]),d=w(e[s("gridRowSpan")]),S=t(e);if(r==null&&i==null&&l==null&&_==null&&d==null)return S;const o={};r!=null&&(o[A]=String(r)),i!=null&&(o[I]=String(i)),_!=null&&(o[W]=String(_)),d!=null&&(o[O]=String(d));const T=l!=null?{[m]:l}:void 0;return E(u,{className:"sf-grid-cell",style:T,...o,children:S})}}};export{D as CELL_WIDTH_SHOW_WHEN,X as cellWidth,P as sitsInBox};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{catalogueLabel as e}from"../../../../format/lib/document/passes/catalogue-labels.js";import{blockSize as
|
|
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 @@
|
|
|
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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{applyBlockPasses as
|
|
1
|
+
import{declarePositionSlots as c}from"../../../format/lib/content/grid-span.js";import{applyBlockPasses as i,registryPassContext as l}from"./passes/index.js";function a(t,o){const e={...l(Object.keys(t.components),t.categories?.structure?.components??[]),...o?{inspector:o}:{}};for(const[s,n]of Object.entries(t.components)){const r=n.positionSlots;r?.length&&c(s,r),i(s,n,e)}return e}export{a as finishRenderRegistry};
|
|
@@ -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": "
|
|
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,10 +54,12 @@
|
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@tabler/icons-react": "^3.46.0",
|
|
57
|
-
"efficient-easel": "^
|
|
58
|
-
"efficient-shell": "^13.
|
|
57
|
+
"efficient-easel": "^37.1.0",
|
|
58
|
+
"efficient-shell": "^13.24.1",
|
|
59
59
|
"isomorphic-dompurify": "^3.18.0",
|
|
60
60
|
"next": ">=16",
|
|
61
|
+
"postcss": "^8.5.33",
|
|
62
|
+
"postcss-selector-parser": "^7.2.1",
|
|
61
63
|
"react": ">=19",
|
|
62
64
|
"typescript": "^5"
|
|
63
65
|
},
|
|
@@ -73,15 +75,17 @@
|
|
|
73
75
|
"@types/node": "^20",
|
|
74
76
|
"@types/react": "^19",
|
|
75
77
|
"@types/react-dom": "^19",
|
|
76
|
-
"efficient-easel": "^
|
|
77
|
-
"efficient-shell": "^13.
|
|
78
|
-
"efficient-shell-checker": "npm:efficient-shell@13.
|
|
78
|
+
"efficient-easel": "^37.1.0",
|
|
79
|
+
"efficient-shell": "^13.24.1",
|
|
80
|
+
"efficient-shell-checker": "npm:efficient-shell@13.25.0",
|
|
79
81
|
"esbuild": "^0.28.0",
|
|
80
82
|
"happy-dom": "^20.14.5",
|
|
81
83
|
"isomorphic-dompurify": "^3.18.0",
|
|
82
84
|
"maplibre-gl": "6.11.2",
|
|
83
85
|
"next": "16.2.11",
|
|
84
86
|
"playwright": "^1.63.0",
|
|
87
|
+
"postcss": "8.5.33",
|
|
88
|
+
"postcss-selector-parser": "7.2.1",
|
|
85
89
|
"react": "19.2.4",
|
|
86
90
|
"react-dom": "19.2.4",
|
|
87
91
|
"tailwindcss": "^4.3.3",
|