efficient-web-builder 47.2.0 → 48.0.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 +33 -0
- package/dist/editor/components/HeroPartPanel.js +1 -1
- package/dist/editor/components/HoverEffectField.d.ts +1 -0
- package/dist/editor/components/HoverEffectField.js +1 -1
- package/dist/editor/components/MediaUploadField.d.ts +9 -0
- package/dist/editor/components/MediaUploadField.js +1 -1
- package/dist/editor/components/PartSettingsPanel.d.ts +2 -1
- package/dist/editor/components/PartSettingsPanel.js +1 -1
- package/dist/editor/components/PreviewPartAnchors.d.ts +3 -1
- package/dist/editor/components/PreviewPartAnchors.js +1 -1
- package/dist/editor/components/SameInEveryViewNote.d.ts +1 -0
- package/dist/editor/components/SameInEveryViewNote.js +1 -0
- package/dist/editor/components/SaveAsTemplateButton.d.ts +5 -0
- package/dist/editor/components/SaveAsTemplateButton.js +1 -0
- package/dist/editor/components/SiteFields.d.ts +4 -1
- package/dist/editor/components/SiteFields.js +1 -1
- package/dist/editor/components/SiteRestoreNotice.js +1 -1
- package/dist/editor/components/SiteTextStylesField.js +1 -1
- package/dist/editor/components/TickerSettingsPanel.js +1 -1
- package/dist/editor/components/VersionHistoryDrawer.js +1 -1
- package/dist/editor/components/WebsitePreviewButton.d.ts +2 -1
- package/dist/editor/components/WebsitePreviewButton.js +1 -1
- package/dist/editor/components/WebsiteScreenParts.js +1 -1
- package/dist/editor/components/usePartMotion.d.ts +10 -0
- package/dist/editor/components/usePartMotion.js +1 -0
- package/dist/editor/components/useSocialSettings.d.ts +2 -2
- package/dist/editor/lib/animation/AnimationDurationRow.js +1 -1
- package/dist/editor/lib/animation/fields.d.ts +1 -1
- package/dist/editor/lib/animation/fields.js +1 -1
- package/dist/editor/lib/animation/hover-fields.d.ts +1 -0
- package/dist/editor/lib/animation/hover-fields.js +1 -0
- package/dist/editor/lib/document/add-target.d.ts +2 -1
- package/dist/editor/lib/document/add-target.js +1 -1
- package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Divider/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroGroup/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
- package/dist/editor/lib/document/build-config.js +1 -1
- package/dist/editor/lib/document/card-display-chips.js +1 -1
- package/dist/editor/lib/document/controls.d.ts +7 -3
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/editor/lib/document/geocode-resolve.d.ts +1 -0
- package/dist/editor/lib/document/geocode-resolve.js +1 -1
- package/dist/editor/lib/document/part-motion-canvas.d.ts +10 -0
- package/dist/editor/lib/document/part-motion-canvas.js +2 -0
- package/dist/format/lib/animation/hover.d.ts +5 -0
- package/dist/format/lib/animation/hover.js +1 -0
- package/dist/format/lib/content/box-layout.d.ts +8 -0
- package/dist/format/lib/content/box-layout.js +1 -1
- package/dist/format/lib/content/box-separator.js +1 -1
- package/dist/format/lib/content/card-template.d.ts +8 -0
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/container-gap.d.ts +2 -1
- package/dist/format/lib/content/container-gap.js +1 -1
- package/dist/format/lib/document/easel-row-words.d.ts +1 -0
- package/dist/format/lib/document/easel-row-words.js +1 -1
- package/dist/format/lib/document/panel-tabs.d.ts +8 -0
- package/dist/format/lib/document/panel-tabs.js +1 -0
- package/dist/format/lib/document/part-records.d.ts +6 -0
- package/dist/format/lib/document/part-records.js +1 -0
- package/dist/format/lib/document/passes/registry-context.d.ts +1 -1
- package/dist/format/lib/document/passes/registry-context.js +1 -1
- package/dist/format/lib/document/passes/types.d.ts +2 -0
- package/dist/format/lib/document/section-groups.d.ts +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +6 -0
- package/dist/format/lib/editor-words-catalogue.js +3 -3
- package/dist/format/lib/hero-ticker.d.ts +1 -0
- package/dist/format/lib/hero-ticker.js +1 -1
- package/dist/format/lib/sections/strip-shape.js +1 -1
- package/dist/render/components/CardRowContext.d.ts +3 -1
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/Flex.d.ts +3 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/Grid.d.ts +2 -1
- package/dist/render/components/Grid.js +1 -1
- package/dist/render/components/HeroGroup.d.ts +2 -1
- package/dist/render/components/HeroGroup.js +1 -1
- package/dist/render/components/HeroSection.d.ts +2 -1
- package/dist/render/components/HeroSection.js +1 -1
- package/dist/render/components/HeroSingle.d.ts +2 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/PartStyledKind.js +1 -1
- package/dist/render/components/PartStyledText.js +1 -1
- package/dist/render/components/PublishedPartStylesContext.d.ts +4 -1
- package/dist/render/components/PublishedPartStylesContext.js +1 -1
- package/dist/render/components/SectionAnimation.d.ts +8 -2
- package/dist/render/components/SectionAnimation.js +1 -1
- package/dist/render/lib/animation/part-motion.d.ts +21 -0
- package/dist/render/lib/animation/part-motion.js +1 -0
- package/dist/render/lib/content/button-look.js +1 -1
- package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Grid/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Hero/render.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroGroup/render.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +3 -0
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-pageheader.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-pageheader.js +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/hero-media-parts.d.ts +2 -2
- package/dist/render/lib/document/part-styles.d.ts +10 -1
- package/dist/render/lib/document/part-styles.js +2 -2
- package/dist/render/lib/document/passes/clickable-parts.js +1 -1
- package/dist/render/lib/document/passes/section-padding.js +1 -1
- package/dist/render/lib/text-styles/site-text-styles.d.ts +16 -4
- package/dist/render/lib/text-styles/site-text-styles.js +2 -2
- package/package.json +3 -3
- package/dist/editor/lib/document/selected-host.d.ts +0 -2
- package/dist/editor/lib/document/selected-host.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as n,jsxs as C}from"react/jsx-runtime";import{useCallback as v,useEffect as w,useId as ge,useRef as u,useState as R}from"react";import{markOverlayPortal as Q}from"../../format/lib/document/overlay-portal.js";import Se from"./Ticker.js";import{HeroSlideStyleContext as Te}from"./HeroSlide.js";import Re from"./HeroArrows.js";import Oe from"./Reel.js";import{TICKER_PART_ATTR as He}from"./PreviewTickerContext.js";import{useReducedMotion as Ae}from"./useReducedMotion.js";import{hasSectionHeight as Le,resolveSectionHeight as W}from"../../format/lib/content/section-height.js";import{HEADER_HEIGHT_CSS as Me}from"../lib/document/header-clearance.js";import{nextReel as Ne,normaliseHeroReelShape as Ce,reelShown as Pe}from"../../format/lib/reel.js";import{arrowsShown as Ie,arrowStep as De}from"../../format/lib/hero-arrows.js";import{swipeEnabled as Ve,swipeStep as $e}from"../../format/lib/hero-swipe.js";import{videoControlShown as ze,videoHeld as Xe}from"../../format/lib/hero-video-control.js";import{HERO_SLIDER_GOTO_EVENT as P}from"efficient-easel/draw";import{say as Z}from"../../format/lib/editor-words.js";import{markedChildren as ee}from"../../format/lib/marked-children.js";import{DEFAULT_TICKER_ITEMS as Ge,TICKER_MOTION_PART as je}from"../../format/lib/hero-ticker.js";import{SectionAnimation as Be}from"./SectionAnimation.js";import{entranceDrawn as Ye}from"../lib/animation/entrance.js";import{readPartMotion as qe}from"../lib/animation/part-motion.js";import{scrim as Fe}from"../../format/lib/content/scrim.js";const Ke="Play video",Ue="Hold video",Je="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",Qe=()=>Z("item"),te=new Map;function We(d,a){const i=d?.ownerDocument?.defaultView;if(i)return i.addEventListener(P,a),()=>i.removeEventListener(P,a)}function Ze({slides:d,alignment:a,textureOpacity:i,showTexture:k,textureColor:y,phoneUpDown:E,phoneSideways:re,autoplay:I,autoplayInterval:O,showTicker:oe,tickerItems:ne,heightDesktop:D,heightMobile:V,showPicker:se,pickerShape:ce,pickerPlacement:ae,showArrows:ie,arrowsShape:le,arrowsPlacement:ue,editing:s,partMotion:de}){const $=Le(D,V),me=$?"h-[var(--sf-hero-h-m)] min-[720px]:h-[var(--sf-hero-h-d)]":"h-screen min-h-[680px]",fe=$?{"--sf-hero-h-d":W(D),"--sf-hero-h-m":W(V)}:void 0,z=(ne??Ge.map(e=>({text:e}))).map(e=>e?.text?.trim()?e.text:s?Qe():"").filter(Boolean),he=oe!==!1,pe=Ye(qe({_partMotion:de},je)),m=u(null),X=u(null),G=u(null),j=u(null),B=ge(),H=u(B),[_,ve]=R([]),[xe,Y]=R(0),x=u(0),[q,F]=R(!1),[g,be]=R(!1),A=Ae(),S=v(()=>m.current?.querySelector(".hero-track")??null,[]),l=v((e,t=!1)=>{Y(e),x.current=e,te.set(H.current,e);const r=m.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=m.current,t=e?.getAttribute("data-easel-block")||e?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||B;H.current=t;const r=te.get(t);typeof r=="number"&&(Y(r),x.current=r)},[]),w(()=>{const e=S();if(!e)return;const t=()=>{ve(o=>Ne(o,ee(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()}},[S]),w(()=>{if(!s)return;const e=t=>{const r=t.detail;if(!r||typeof r.index!="number")return;const o=m.current,p=o?.getAttribute("data-easel-block")||o?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||H.current;r.id&&r.id!==p||l(r.index,!0)};return We(m.current,e)},[s,l]);const c=_.length,f=Math.min(Math.max(xe,0),Math.max(0,c-1)),L=Pe({shown:se,count:c}),K=Ie({shown:ie,count:c}),U=ze({editing:s,shown:f,slides:_}),we=Xe({editing:s,playing:g,controlShown:U}),T=Ve({count:c,editing:s}),h=u(null),b=u(null),ke=v(e=>{if(h.current=null,b.current=null,!T||e.touches.length!==1)return;const t=e.touches[0];h.current={x:t.clientX,y:t.clientY},b.current={x:t.clientX,y:t.clientY}},[T]),ye=v(e=>{if(!h.current)return;if(e.touches.length!==1){h.current=null;return}const t=e.touches[0];b.current={x:t.clientX,y:t.clientY}},[]),Ee=v(()=>{const e=h.current,t=b.current;if(h.current=null,b.current=null,!T||!e||!t)return;const r=$e(t.x-e.x,t.y-e.y,x.current,c);r!==x.current&&l(r)},[T,c,l]);w(()=>{if(s||!I||q||A||c<=1)return;const t=Math.max(1,typeof O=="number"?O:6)*1e3,r=window.setTimeout(()=>l((f+1)%c),t);return()=>window.clearTimeout(r)},[s,I,O,q,A,c,f,l]),w(()=>{const e=[X.current,G.current,j.current].filter(Boolean),t=e.map(o=>Q(o)),r=o=>{const p=o.target,M=p.closest("[data-hero-nav]"),J=M??p.closest("[data-idx]");if(!J)return;o.stopPropagation(),o.preventDefault();const N=M?De(M.dataset.heroNav,x.current,c):Number(J.dataset.idx);Number.isNaN(N)||(l(N,s),ee(S(),"data-slide-name")[N]?.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,l,S,s]);const _e=v(e=>{if(!e)return;const t=Q(e),r=o=>{o.stopPropagation(),o.preventDefault(),be(p=>!p)};return e.addEventListener("click",r,{capture:!0}),()=>{t?.(),e.removeEventListener("click",r,{capture:!0})}},[]);return n(Te.Provider,{value:{alignment:a,textureOpacity:i,textureOn:k,textureColor:y,quietVideo:we,phoneUpDown:E,phoneSideways:re},children:C("div",{ref:m,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${me} max-w-[var(--sf-hero-cap,none)] overflow-hidden`,style:fe,onMouseEnter:()=>F(!0),onMouseLeave:()=>F(!1),onTouchStart:ke,onTouchMove:ye,onTouchEnd:Ee,children:[n(d,{className:"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:`translateX(-${f*100}%)`,transition:A?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),U&&n("div",{ref:_e,"data-hero-video-control":g?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${Me} + 16px)`},children:C("button",{type:"button",className:Je,children:[n("span",{"aria-hidden":"true",children:g?"❚❚":"▶"}),Z(g?Ue:Ke)]})}),(L||K)&&C("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:[L&&n(Oe,{ref:X,slides:_,active:f,shape:Ce(ce),placement:ae}),K&&n(Re,{ref:j,shape:le,placement:ue})]}),L&&n("div",{ref:G,className:"sf-hero-phone-dots absolute bottom-[80px] left-1/2 z-[6] hidden -translate-x-1/2 items-center gap-2",children:_.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===f?"w-5 bg-accent":"w-2 bg-white/45 hover:bg-white/70"}`},t))}),he&&z.length>0&&n(et,{editing:!!s,entrance:pe,children:n(Se,{items:z,backdrop:"dark-media"})})]})})}function et({editing:d,entrance:a,children:i}){const k="sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5",y=d?{[He]:""}:void 0,E={background:Fe(.55)};return a?n(Be,{desktop:a.desktop,phone:a.phone,editing:d,boxClass:k,boxAttrs:y,boxStyle:E,children:i}):n("div",{className:k,...y,style:E,children:i})}export{P as HERO_SLIDER_GOTO_EVENT,Ue as HERO_VIDEO_HOLD_LABEL,Ke as HERO_VIDEO_PLAY_LABEL,Ze as default,We as subscribeSliderGoto};
|
|
@@ -24,5 +24,6 @@ export interface HeroSingleProps {
|
|
|
24
24
|
youtubeUrl?: string;
|
|
25
25
|
videoPlayback?: string;
|
|
26
26
|
editing?: boolean;
|
|
27
|
+
partMotion?: Record<string, unknown>;
|
|
27
28
|
}
|
|
28
|
-
export default function HeroSingle({ overlay, overlayColor, overlayPosition, mediaType, mediaSrc, poster, objectPosition, objectPositionPhone, tintColor, tintOpacity, heightDesktop, heightMobile, boxes: Boxes, videoSource, youtubeUrl, videoPlayback, mediaLayout, mediaLayoutPhone, mediaImage2, objectPosition2, objectPosition2Phone, tintColor2, tintOpacity2, editing, }: HeroSingleProps): import("react").JSX.Element;
|
|
29
|
+
export default function HeroSingle({ overlay, overlayColor, overlayPosition, mediaType, mediaSrc, poster, objectPosition, objectPositionPhone, tintColor, tintOpacity, heightDesktop, heightMobile, boxes: Boxes, videoSource, youtubeUrl, videoPlayback, mediaLayout, mediaLayoutPhone, mediaImage2, objectPosition2, objectPosition2Phone, tintColor2, tintOpacity2, editing, partMotion, }: HeroSingleProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as
|
|
1
|
+
"use client";import{jsx as e,jsxs as l}from"react/jsx-runtime";import{useRef as re,useState as ie}from"react";import y from"./HeroPoster.js";import{HeroVideoBackdrop as se,HeroVideoPlayer as te}from"./HeroVideoPlay.js";import{resolveMedia as t}from"../lib/media.js";import{hasSectionHeight as ne,resolveSectionHeight as D}from"../../format/lib/content/section-height.js";import{DEFAULT_OVERLAY_POSITION as ae,overlayGradient as ce}from"../../format/lib/sections/hero-overlay.js";import{ON_MEDIA_INK_STYLE as de}from"../../format/lib/content/ink.js";import{HERO_PART_ATTR as le}from"../lib/document/hero-media-parts.js";import{hidableText as me}from"efficient-easel/draw";import{normaliseVideoPlayback as pe,normaliseVideoSource as ue,parseYouTubeId as he}from"../../format/lib/hero-video.js";import{heroPictureCount as fe,normaliseMediaLayout as xe,resolvePhoneLayout as ge}from"../../format/lib/hero-media-layout.js";import{DEFAULT_TINT as w}from"../../format/lib/content/tint.js";import{SectionAnimation as $}from"./SectionAnimation.js";import{entranceDrawn as ve}from"../lib/animation/entrance.js";import{readPartMotion as be}from"../lib/animation/part-motion.js";function ye({overlay:n=100,overlayColor:o=w,overlayPosition:a=ae,mediaType:c="image",mediaSrc:i,poster:d,objectPosition:k,objectPositionPhone:T,tintColor:N=w,tintOpacity:f=0,heightDesktop:_,heightMobile:S,boxes:H,videoSource:Y,youtubeUrl:F,videoPlayback:G,mediaLayout:I,mediaLayoutPhone:M,mediaImage2:K,objectPosition2:U,objectPosition2Phone:B,tintColor2:q=w,tintOpacity2:J=0,editing:r=!1,partMotion:Q}){const V=ne(_,S),W=V?"h-[var(--sf-hero-h-m)] min-[720px]:h-[var(--sf-hero-h-d)]":"h-screen min-h-[680px]",X=V?{"--sf-hero-h-d":D(_),"--sf-hero-h-m":D(S)}:void 0,s=c==="video",j=s?t(i):void 0,z=s?t(d):t(i)??t(d),m=s&&ue(Y)==="youtube",x=s&&pe(G)==="click",A=m?he(me(F)):null,E=s&&!m&&!x,[R,Z]=ie(!1),g=!R,ee=re(null),L=c==="video"?"media":"image",p=h=>ve(be({_partMotion:Q},h)),oe=h=>{const b=p("media");return b?e($,{desktop:b.desktop,phone:b.phone,editing:r,boxClass:"absolute inset-0 z-[1]",children:h}):h},u=xe(I),v=ge(M,u),O=!s&&fe({mediaLayout:I,mediaLayoutPhone:M})>1;return l("section",{ref:ee,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${W} max-w-[var(--sf-hero-cap,none)] overflow-hidden`,style:X,children:[oe(O?l("div",{className:`absolute inset-0 z-[1] grid ${we[v]} ${Pe[u]}`,"data-hero-layout":u,"data-hero-layout-phone":v,children:[l(P,{part:"image",editing:r,entrance:p("image"),className:"relative overflow-hidden",children:[e(y,{posterSrc:t(i),showVideo:!1,objectPosition:k,objectPositionPhone:T}),e(C,{color:N,opacity:f})]}),l(P,{part:"image2",editing:r,entrance:p("image2"),className:`relative overflow-hidden${v==="one"?" max-[719px]:hidden":""}${u==="one"?" min-[720px]:hidden":""}`,children:[e(y,{posterSrc:t(K),showVideo:!1,objectPosition:U,objectPositionPhone:B}),e(C,{color:q,opacity:J})]})]}):l(P,{part:L,editing:r,entrance:L==="image"?p("image"):null,className:"absolute inset-0 z-[1]",children:[e(y,{videoSrc:E?j:void 0,posterSrc:z,showVideo:E,objectPosition:k,objectPositionPhone:T}),m&&e(se,{youTubeId:A,ownPoster:!!z,background:!x,editing:r})]})),x&&e(te,{youTubeId:A,fileSrc:m?void 0:j,playing:R,onPlay:()=>Z(!0),editing:r}),g&&!O&&f>0&&e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:N,opacity:Math.min(Math.max(f,0),100)/100}}),g&&e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:ce(o,a),opacity:Math.min(Math.max(n,0),100)/100}}),g&&H&&e("div",{className:["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",r?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:de,children:e(H,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}const we={one:"max-[719px]:grid-cols-1 max-[719px]:grid-rows-1",side:"max-[719px]:grid-cols-2 max-[719px]:grid-rows-1",stacked:"max-[719px]:grid-cols-1 max-[719px]:grid-rows-2"},Pe={one:"min-[720px]:grid-cols-1 min-[720px]:grid-rows-1",side:"min-[720px]:grid-cols-2 min-[720px]:grid-rows-1",stacked:"min-[720px]:grid-cols-1 min-[720px]:grid-rows-2"};function C({color:n,opacity:o}){return o>0?e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:n,opacity:Math.min(Math.max(o,0),100)/100}}):null}function P({part:n,editing:o,entrance:a,className:c,children:i}){const d=o?{[le]:n}:void 0;return a?e($,{desktop:a.desktop,phone:a.phone,editing:o,boxClass:c,boxAttrs:d,children:i}):e("div",{className:c,...d,children:i})}export{ye as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Fragment as
|
|
1
|
+
"use client";import{Fragment as l,jsx as n}from"react/jsx-runtime";import{usePartEntrance as i,usePublishedPartKindRule as c,usePublishedSharedKindRule as f}from"./PublishedPartStylesContext.js";import{PART_STYLED_ATTR as m,TEXT_STYLE_ATTR as T}from"../lib/document/part-styles.js";function d({kind:t,shared:s=!1,children:r}){const a=c(t),o=f(t),e=s?o:a,u=i(e);return e?n("span",{ref:u,[m]:e.stamp,...e.textStyle?{[T]:e.textStyle}:{},children:r}):n(l,{children:r})}export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Fragment as
|
|
1
|
+
"use client";import{Fragment as s,jsx as e}from"react/jsx-runtime";import{ClaimedStamp as m,usePartEntrance as l,usePublishedPartRule as i}from"./PublishedPartStylesContext.js";import{PART_STYLED_ATTR as o,TEXT_STYLE_ATTR as u}from"../lib/document/part-styles.js";function T({value:a,children:r}){const t=i(a),n=l(t);return t?e(m,{stamp:t.stamp,children:e("span",{ref:n,[o]:t.stamp,...t.textStyle?{[u]:t.textStyle}:{},children:r})}):e(s,{children:r})}export{T as default};
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import { type PartStyles, type PublishedPartRule } from "../lib/document/part-styles.js";
|
|
3
|
+
import { type PartMotion } from "../lib/animation/part-motion.js";
|
|
3
4
|
import type { PartNeedle } from "../lib/document/text-parts.js";
|
|
4
|
-
export declare function PublishedPartStyles({ needles, styles, type, children, }: {
|
|
5
|
+
export declare function PublishedPartStyles({ needles, styles, motions, type, children, }: {
|
|
5
6
|
needles: PartNeedle[];
|
|
6
7
|
styles: PartStyles;
|
|
8
|
+
motions?: Readonly<Record<string, PartMotion>>;
|
|
7
9
|
type?: string;
|
|
8
10
|
children: ReactNode;
|
|
9
11
|
}): import("react").JSX.Element;
|
|
12
|
+
export declare function usePartEntrance(rule: PublishedPartRule | null): import("react").RefObject<HTMLSpanElement | null>;
|
|
10
13
|
export declare const PART_STYLES_PRECEDENCE = "sf-part-styles";
|
|
11
14
|
export declare function usePublishedPartRule(value: string): PublishedPartRule | null;
|
|
12
15
|
export declare function usePublishedPartKindRule(kind: string): PublishedPartRule | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Fragment as
|
|
1
|
+
"use client";import{Fragment as x,jsx as l,jsxs as _}from"react/jsx-runtime";import{createContext as h,useContext as a,useEffect as b,useId as v,useMemo as O,useRef as T}from"react";import{armEntrance as M}from"efficient-shell/format";import{blockDrawsTextStyle as k,partRuleForKind as P,partRuleForText as w,partStyleCss as S,publishedPartStyles as F}from"../lib/document/part-styles.js";import{usePhoneWidth as j}from"./SectionAnimation.js";import{styleKeyForPart as K}from"../../format/lib/sections/section-text-kinds.js";import{NO_MOTIONS as N,drawPartEntrance as H,firstOnPage as $,partMotionDrawn as A,partMoves as D}from"../lib/animation/part-motion.js";const p=h(null),g=h(null),E=h(null);function Q({needles:t,styles:e,motions:n=N,type:o,children:d}){const c=v(),u=JSON.stringify([c,t,e,n,o]),i=O(()=>{const s=Object.keys(n).filter(r=>D(n[r]));return F(t,e,c,r=>K(o,r),r=>k(o,r),r=>s.includes(r)?A(n[r]):null,s)},[u]);return i?_(x,{children:[l("style",{href:`${I}${c}-${L(S(i))}`,precedence:C,dangerouslySetInnerHTML:{__html:S(i).replace(/</g,"\\3c ")}}),l(p.Provider,{value:i,children:d})]}):l(x,{children:d})}const m=new WeakMap;function y(t){const e=$(t);for(const n of t)n===e||!n.undo||(n.undo(),n.undo=void 0);e&&!e.undo&&(e.undo=e.arm())}function U(t){const e=T(null),n=j(e),o=t?.motion?.entrance??null,d=JSON.stringify(o);return b(()=>{const c=e.current,u=c?.parentElement;if(!o||!c||!u)return;const i=()=>{const f=H(u,n?o.phone:o.desktop),R=M(u);return()=>{R?.(),f()}},s=m.get(u)??[];m.set(u,s);const r={element:c,arm:i};return s.push(r),y(s),()=>{const f=s.indexOf(r);f<0||(s.splice(f,1),r.undo?.(),r.undo=void 0,s.length?y(s):m.delete(u))}},[d,n]),e}const C="sf-part-styles",I=`${C}-`;function L(t){let e=2166136261;for(let n=0;n<t.length;n+=1)e^=t.charCodeAt(n),e=Math.imul(e,16777619);return(e>>>0).toString(36)}function V(t){const e=a(p),n=a(g),o=w(e,t);return o&&o.stamp!==n?o:null}function X(t){return P(a(p),t)}function Z({stamp:t,children:e}){return l(g.Provider,{value:t,children:e})}function ee({children:t}){const e=a(p);return l(E.Provider,{value:e,children:t})}function te(t){return P(a(E),t)}export{Z as ClaimedStamp,C as PART_STYLES_PRECEDENCE,Q as PublishedPartStyles,ee as SharedPartKinds,U as usePartEntrance,X as usePublishedPartKindRule,V as usePublishedPartRule,te as usePublishedSharedKindRule};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
1
|
+
import { type CSSProperties, type ReactNode } from "react";
|
|
2
2
|
import { type EntranceValue } from "efficient-shell/format";
|
|
3
3
|
export declare const ENTRANCE_WRAPPER_CLASS = "sf-entrance";
|
|
4
|
-
export declare function SectionAnimation({ desktop, phone, editing, children, }: {
|
|
4
|
+
export declare function SectionAnimation({ desktop, phone, editing, boxClass, boxAttrs, boxStyle, children, }: {
|
|
5
5
|
desktop: EntranceValue;
|
|
6
6
|
phone: EntranceValue;
|
|
7
7
|
editing: boolean;
|
|
8
|
+
boxClass?: string;
|
|
9
|
+
boxAttrs?: Readonly<Record<string, string>>;
|
|
10
|
+
boxStyle?: CSSProperties;
|
|
8
11
|
children: ReactNode;
|
|
9
12
|
}): import("react").JSX.Element;
|
|
10
13
|
export type SeenEntrance = {
|
|
@@ -18,3 +21,6 @@ export declare const entranceReplay: {
|
|
|
18
21
|
seen: SeenEntrance;
|
|
19
22
|
};
|
|
20
23
|
};
|
|
24
|
+
export declare function usePhoneWidth(ref: {
|
|
25
|
+
current: HTMLElement | null;
|
|
26
|
+
}): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as g}from"react/jsx-runtime";import{useEffect as y,useRef as d,useState as x}from"react";import{armEntrance as A,entranceAttrs as O,playEntrance as P}from"efficient-shell/format";import{PHONE_MEDIA as v}from"../lib/content/view-values.js";import{useCellLayer as R}from"./InBoxContext.js";const J="sf-entrance";function C({desktop:e,phone:n,editing:o,boxClass:r,boxAttrs:t,boxStyle:s,children:h}){const c=d(null),f=R(),i=L(c),E=i?n:e,{attrs:w,style:l}=O(E),p=d(u.seed(e,n)),N=JSON.stringify(e),S=JSON.stringify(n);return y(()=>{const a=c.current;if(a){if(o){const m=u.next(p.current,e,n,i);p.current=m.seen,m.play&&P(a);return}return A(a)}},[N,S,i,o]),g("div",{ref:c,className:`${J}${f.fill}${r?` ${r}`:""}`,...t,...w,...Object.keys(l).length||s?{style:{...s,...l}}:{},children:f.inner(h)})}const u={seed(e,n){return{desktop:JSON.stringify(e),phone:JSON.stringify(n)}},next(e,n,o,r){const t=u.seed(n,o);return{play:r?t.phone!==e.phone:t.desktop!==e.desktop,seen:t}}};function L(e){const[n,o]=x(!1);return y(()=>{const r=e.current?.ownerDocument?.defaultView??(typeof window>"u"?null:window);if(!r?.matchMedia)return;const t=r.matchMedia(v),s=()=>o(t.matches);return s(),t.addEventListener("change",s),()=>t.removeEventListener("change",s)},[e]),n}export{J as ENTRANCE_WRAPPER_CLASS,C as SectionAnimation,u as entranceReplay,L as usePhoneWidth};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type EntranceValue } from "efficient-shell/format";
|
|
2
|
+
import { entranceDrawn } from "./entrance.js";
|
|
3
|
+
import { type PartHover } from "../../../format/lib/animation/hover.js";
|
|
4
|
+
export declare const NO_MOTIONS: Readonly<Record<string, PartMotion>>;
|
|
5
|
+
export declare const PART_MOTION_PROP = "_partMotion";
|
|
6
|
+
type Props = Readonly<Record<string, unknown>>;
|
|
7
|
+
export type PartMotion = Readonly<Record<string, unknown>>;
|
|
8
|
+
export declare const PART_MOTION_KEYS: readonly string[];
|
|
9
|
+
export declare function readPartMotions(props: Props | undefined): Readonly<Record<string, PartMotion>>;
|
|
10
|
+
export declare function readPartMotion(props: Props | undefined, part: string): PartMotion;
|
|
11
|
+
export declare function propsWithPartMotion(props: Props, part: string, key: string, value: unknown): Record<string, unknown>;
|
|
12
|
+
export declare function partMotionDrawn(record: PartMotion): {
|
|
13
|
+
entrance: ReturnType<typeof entranceDrawn>;
|
|
14
|
+
hover: PartHover;
|
|
15
|
+
};
|
|
16
|
+
export declare function partMoves(record: PartMotion): boolean;
|
|
17
|
+
export declare function drawPartEntrance(box: HTMLElement, value: EntranceValue): () => void;
|
|
18
|
+
export declare function firstOnPage<T extends {
|
|
19
|
+
element: Element;
|
|
20
|
+
}>(parts: readonly T[]): T | undefined;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{phoneKey as m}from"efficient-easel/draw";import{ENTRANCE_STATE_ATTR as u,entranceAttrs as O}from"efficient-shell/format";import{ENTRANCE_KEYS as f,entranceDrawn as d}from"./entrance.js";import{HOVER_KEY as p,hoverOf as l}from"../../../format/lib/animation/hover.js";import{propsWithPartRecord as P,readPartRecord as _,readPartRecords as E}from"../../../format/lib/document/part-records.js";const j={},s="_partMotion",v=[...Object.values(f).flatMap(t=>[t,m(t)]),p];function w(t){return E(t,s)}function T(t,r){return _(t,s,r)}const N=new Set([f.kind,p]);function b(t,r,n,o){const{[n]:c,...e}=T(t,r),a=o==null||o===""||o==="none"&&N.has(n)?e:{...e,[n]:o};return P(t,s,r,Object.keys(a).length?a:null)}function A(t){return{entrance:d(t),hover:l(t)}}function g(t){const r=A(t);return r.entrance!==null||r.hover!=="none"}function I(t,r){const{attrs:n,style:o}=O(r),c=Object.keys(n).filter(e=>n[e]!==void 0);for(const e of c)t.setAttribute(e,String(n[e]));for(const[e,i]of Object.entries(o))t.style.setProperty(e,String(i));return()=>{for(const e of c)t.removeAttribute(e);for(const e of Object.keys(o))t.style.removeProperty(e);t.removeAttribute(u)}}const M=4;function K(t){let r;for(const n of t)(!r||n.element.compareDocumentPosition(r.element)&M)&&(r=n);return r}export{j as NO_MOTIONS,v as PART_MOTION_KEYS,s as PART_MOTION_PROP,I as drawPartEntrance,K as firstOnPage,A as partMotionDrawn,g as partMoves,b as propsWithPartMotion,T as readPartMotion,w as readPartMotions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BUTTON_PAD_KEYS as i,buttonBorderOf as S,buttonFillOpacityOf as T,buttonPadSidesOf as h}from"efficient-easel/draw";import{finiteNumber as y}from"../../../format/lib/finite-number.js";import{nonEmptyString as c}from"../../../format/lib/non-empty-string.js";import{padSideAttrs as _}from"./section-padding.js";import{cornerSidesShorthand as x,normalizeCornerSides as O}from"../../../format/lib/content/section-corners.js";const N="px-6 py-4",$=4,s=o=>{const t=new RegExp(`\\bp${o}-(?:\\[(\\d+)px\\]|(\\d+))`).exec(N);if(!t)throw new Error(`BUTTON_PAD_CLASSES has no p${o}`);return t[1]!==void 0?Number(t[1]):Number(t[2])*$},U={top:s("y"),right:s("x"),bottom:s("y"),left:s("x")},a="var(--btn)";function g(o){const t=o.variant==="ghost",n=T(o.buttonFillOpacity),r=S(o.buttonBorder),e=c(o.buttonColor);return{fillOpacity:n??(t?0:100),border:{width:r?.width??1,color:r?.color??e??(t?"currentColor":a)},changed:n!==void 0||r!==void 0}}function L(o){const t=g(o);if(!t.changed)return null;const n=c(o.buttonColor)??a;return{background:t.fillOpacity===0?"transparent":t.fillOpacity===100?n:`color-mix(in srgb, ${n} ${t.fillOpacity}%, transparent)`,borderWidth:t.border.width,borderStyle:"solid",borderColor:t.border.color}}const C="var(--sf-button-radius, 0)";function D(o){const t=y(o.buttonCorners),n=O(o.buttonCornerSides);if(t===void 0&&n===null)return null;const r=t===void 0?C:`${Math.max(0,t)}px`;return{borderRadius:n===null?r:x(r,n)}}function k(o){const t=e=>h({top:o[`${i.top}${e}`],right:o[`${i.right}${e}`],bottom:o[`${i.bottom}${e}`],left:o[`${i.left}${e}`]})??{},{classes:n,style:r}=_(t(""),t("Phone"));return Object.keys(r).length?{className:n.join(" "),style:r}:null}const b="upper";function w(o,t,n){const r=o&&typeof o=="object"?o:{},e=c(r.textStyle),
|
|
1
|
+
import{BUTTON_PAD_KEYS as i,buttonBorderOf as S,buttonFillOpacityOf as T,buttonPadSidesOf as h}from"efficient-easel/draw";import{finiteNumber as y}from"../../../format/lib/finite-number.js";import{nonEmptyString as c}from"../../../format/lib/non-empty-string.js";import{padSideAttrs as _}from"./section-padding.js";import{cornerSidesShorthand as x,normalizeCornerSides as O}from"../../../format/lib/content/section-corners.js";const N="px-6 py-4",$=4,s=o=>{const t=new RegExp(`\\bp${o}-(?:\\[(\\d+)px\\]|(\\d+))`).exec(N);if(!t)throw new Error(`BUTTON_PAD_CLASSES has no p${o}`);return t[1]!==void 0?Number(t[1]):Number(t[2])*$},U={top:s("y"),right:s("x"),bottom:s("y"),left:s("x")},a="var(--btn)";function g(o){const t=o.variant==="ghost",n=T(o.buttonFillOpacity),r=S(o.buttonBorder),e=c(o.buttonColor);return{fillOpacity:n??(t?0:100),border:{width:r?.width??1,color:r?.color??e??(t?"currentColor":a)},changed:n!==void 0||r!==void 0}}function L(o){const t=g(o);if(!t.changed)return null;const n=c(o.buttonColor)??a;return{background:t.fillOpacity===0?"transparent":t.fillOpacity===100?n:`color-mix(in srgb, ${n} ${t.fillOpacity}%, transparent)`,borderWidth:t.border.width,borderStyle:"solid",borderColor:t.border.color}}const C="var(--sf-button-radius, 0)";function D(o){const t=y(o.buttonCorners),n=O(o.buttonCornerSides);if(t===void 0&&n===null)return null;const r=t===void 0?C:`${Math.max(0,t)}px`;return{borderRadius:n===null?r:x(r,n)}}function k(o){const t=e=>h({top:o[`${i.top}${e}`],right:o[`${i.right}${e}`],bottom:o[`${i.bottom}${e}`],left:o[`${i.left}${e}`]})??{},{classes:n,style:r}=_(t(""),t("Phone"),t("Tablet"));return Object.keys(r).length?{className:n.join(" "),style:r}:null}const b="upper";function w(o,t,n){const r=o&&typeof o=="object"?o:{},e=c(r.textStyle),l=e?c(t?.find(f=>f?.id===e)?.name):void 0,d=e?/^(heading|body)-(\d+)$/.exec(e):null,p=e?l||(d?n.styleName({kind:d[1],n:Number(d[2])}):e):n.noStyle,{cases:u}=n,m=c(r.case)??b;return`${p} · ${u[m]??u[b]}`}export{U as BUTTON_PAD_BUILT_IN,N as BUTTON_PAD_CLASSES,i as BUTTON_PAD_KEYS,b as BUTTON_WORDS_BUILT_IN_CASE,a as SITE_BUTTON_FILL,D as buttonCornersStyle,g as buttonLook,k as buttonPadAttrs,L as buttonPaint,w as buttonWordsSummary};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import{phoneKey as o,tabletKey as l}from"efficient-easel/draw";import{CountRowsContext as c,NO_COUNTS as h}from"../../../../../components/CountRowsContext.js";import m from"../../../../../components/Flex.js";import{loopDelayOf as d,loopSecondsOf as g,parseLoop as r,parseLoopDirection as u}from"../../../../../../format/lib/animation/index.js";import{COUNTS_SOURCE as b,declaredBlockSource as f,servedRows as S}from"../../../../../../format/lib/content/block-sources.js";import{padValuesOf as x}from"../../../../content/section-padding.js";import{sectionFillsHeight as w}from"../../../../../../format/lib/content/section-min-height.js";import{FlexMeta as y}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";const H={...y,render:e=>{const t=n(m,{direction:e.direction,label:e.label,tabShape:e.tabShape,gap:e.gap,gapPhone:e[o("gap")],gapTablet:e[l("gap")],justify:e.justify,align:e.align,wrap:e.wrap,share:e.share,sharePhone:e[o("share")],wrapPhone:e[o("wrap")],phoneRow:e.phoneRow,columns:e.columns,columnsTablet:e[l("columns")],separator:e.separator,blockSpacing:e.blockSpacing,bgImage:e.bgImage,bgImagePhone:e.bgImagePhone,darken:e.darken,darkenStyle:e.darkenStyle,placement:e.placement,padV2:e.padV2===!0,border:e.sectionBorder,borderPhone:e.sectionBorderPhone,pad:x(e),contained:e.contained,fillHeight:w(e),shadow:e.shadow,loop:r(e.loop),scrollDirection:u(e.scrollDirection),loopSeconds:g({loopDuration:e.loopDuration}),loopDelay:d({loopDelay:e.loopDelay}),editing:!!e.editor?.isEditing,fillColor:e.fillColor,line:e.line,upcoming:e.upcoming,link:e.link,boxShape:e.boxShape,boxShapePhone:e[o("boxShape")],jumpHighlight:e.jumpHighlight,anchor:e.anchor,content:e.content}),a=f(e),i=a?a===b?S(e):h:null;return n(c.Provider,{value:i,children:t})}};export{H as FlexRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{phoneKey as n,tabletKey as o}from"efficient-easel/draw";import{sectionFillsHeight as i}from"../../../../../../format/lib/content/section-min-height.js";import m from"../../../../../components/Grid.js";import{GridMeta as a}from"../../../../../../format/lib/document/blocks/general/Grid/meta.js";const f={...a,render:e=>t(m,{columns:e.columns,mobileColumns:e.mobileColumns,gap:e.gap,gapPhone:e[n("gap")],gapTablet:e[o("gap")],contained:e.contained,fillHeight:i(e),content:e.content})};export{f as GridRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as f}from"react/jsx-runtime";import H from"../../../../../components/HeroSection.js";import{HeroMeta as M}from"../../../../../../format/lib/document/blocks/general/Hero/meta.js";const I={...M,render:({slides:e,alignment:o,textureOpacity:r,showTexture:t,textureColor:i,phoneUpDown:a,phoneSideways:s,autoplay:p,autoplayInterval:n,showTicker:h,tickerItems:c,heightDesktop:m,heightMobile:l,showPicker:w,pickerShape:d,pickerPlacement:k,showArrows:x,arrowsShape:g,arrowsPlacement:u,_partMotion:y,editor:S})=>f(H,{slides:e,alignment:o,textureOpacity:r,showTexture:t,textureColor:i,phoneUpDown:a,phoneSideways:s,autoplay:p,autoplayInterval:n,showTicker:h,tickerItems:c,heightDesktop:m,heightMobile:l,showPicker:w,pickerShape:d,pickerPlacement:k,showArrows:x,arrowsShape:g,arrowsPlacement:u,editing:S?.isEditing,partMotion:y})};export{I as HeroRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as f}from"react/jsx-runtime";import{phoneKey as c}from"efficient-easel/draw";import s from"../../../../../components/HeroGroup.js";import{padValuesOf as
|
|
1
|
+
import{jsx as f}from"react/jsx-runtime";import{phoneKey as c,tabletKey as l}from"efficient-easel/draw";import s from"../../../../../components/HeroGroup.js";import{padValuesOf as h}from"../../../../content/section-padding.js";import{HeroGroupMeta as j}from"../../../../../../format/lib/document/blocks/general/HeroGroup/meta.js";const R={...j,render:e=>{const{placement:t,nudgeX:r,nudgeY:o,width:n,gap:a,direction:i,justify:p,align:d,wrap:g,content:m,editor:u}=e;return f(s,{placement:t,nudgeX:r,nudgeY:o,width:n,gap:a,gapPhone:e[c("gap")],gapTablet:e[l("gap")],direction:i,justify:p,align:d,wrap:g,pad:h(e),content:m,dragRef:u?.dragRef})}};export{R as HeroGroupRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as M}from"react/jsx-runtime";import k from"../../../../../components/HeroSingle.js";import{HeroSingleMeta as L}from"../../../../../../format/lib/document/blocks/general/HeroSingle/meta.js";const I={...L,render:({mediaType:e,mediaImage:t,mediaVideo:n,poster:r,imageFocal:d,tintColor:s,tintOpacity:a,overlay:f,overlayColor:u,overlayPosition:g,heightDesktop:l,heightMobile:m,boxes:b,videoSource:c,youtubeUrl:p,videoPlayback:y,mediaLayout:P,mediaLayoutPhone:j,mediaImage2:h,imageFocal2:v,imageFocalPhone:o,imageFocal2Phone:i,tintColor2:S,tintOpacity2:x,_partMotion:C,editor:H})=>M(k,{mediaType:e,videoSource:c,youtubeUrl:p,videoPlayback:y,mediaLayout:P,mediaLayoutPhone:j,mediaImage2:h||void 0,objectPosition2:v||void 0,objectPosition2Phone:typeof i=="string"?i:void 0,tintColor2:S,tintOpacity2:x,mediaSrc:(e==="image"?t:n)||void 0,poster:r||void 0,objectPosition:e==="image"&&d||void 0,objectPositionPhone:e==="image"&&typeof o=="string"?o:void 0,tintColor:s,tintOpacity:e==="image"?a:0,overlay:f,overlayColor:u,overlayPosition:g,heightDesktop:l,heightMobile:m,boxes:b,editing:H?.isEditing,partMotion:C})};export{I as HeroSingleRender};
|
|
@@ -28,6 +28,9 @@ export declare const headingCaseOf: (key: string) => (node: {
|
|
|
28
28
|
}) => readonly SiteWrite[];
|
|
29
29
|
export declare const smallText: (key: string, style?: Props) => PartRow;
|
|
30
30
|
export declare const numberAndUnit: (number: unknown, unit: unknown) => string;
|
|
31
|
+
export declare const RIGHT_WORDS: Props;
|
|
32
|
+
export declare const leadText: (lead: string, rest: string, props: Props) => PartRow;
|
|
33
|
+
export declare const leadLine: (lead: string, rest: string, run: Props, own?: Props) => PartRow;
|
|
31
34
|
export declare const bandPage: (stored: unknown, ctx: ConvertContext) => number;
|
|
32
35
|
export declare const sectionPage: (p: Props, ctx: ConvertContext) => import("../../../../../format/lib/theme.js").ThemeColors | undefined;
|
|
33
36
|
export declare const fillFrom: (colour: "surface" | "background") => (p: Props, ctx: ConvertContext) => Props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{phoneKey as
|
|
1
|
+
import{phoneKey as T}from"efficient-easel/draw";import{ENTRANCE_KEYS as u}from"../../../animation/entrance.js";import{COUNT_KEY_PROP as x}from"../../../../../format/lib/content/block-sources.js";import{NESTED_BOX_PADDING as f}from"../../../../../format/lib/content/box-layout.js";import{resolveSectionPadding as _}from"../../../content/section-padding.js";import{ButtonBlockMeta as B}from"../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";import{TextMeta as E}from"../../../../../format/lib/document/blocks/general/Text/meta.js";import{SECTION_PAD_INNER_DEFAULTS as S}from"../../passes/section-padding.js";import{finiteNumber as s}from"../../../../../format/lib/finite-number.js";import{convertTheme as a,hasWords as N}from"../../../sections/section-to-box.js";import{bandPresetIndex as O}from"../../../../../format/lib/theme.js";const{text:j,tag:V,...A}=E.defaultProps,p=A,D={...p,[x]:""},Y={...p,tone:"dim"},{label:$,href:J,...I}=B.defaultProps,q=I,z={buttonFillOpacity:0,buttonBorder:{width:0},buttonPaddingTop:0,buttonPaddingRight:0,buttonPaddingBottom:0,buttonPaddingLeft:0},h={justify:"start",align:"stretch",wrap:!1,blockSpacing:"gap",padV2:!0},Q={...h,direction:"column",...f},Z={...h,sectionAccent:0},tt=["gridSpan","sectionHeightMode","sectionHeightValue","sectionHeightUnit","sectionHeightModePhone","sectionHeightValuePhone","sectionHeightUnitPhone","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderPhone","sectionAccent","stickTop","stickTopDistance","stickTopPhone","stickTopDistancePhone","anchor","sectionAnimation","_hidden",...Object.values(u).flatMap(t=>[t,T(t)]),"widthFit","widthFitPhone","width","widthPhone","minWidth","minWidthPhone","maxWidth","maxWidthPhone"],r="a section width key, ignored since efficient-web-builder 45 (every section, and a section's root Box, follows Site styles only; Lewis 2026-10-29), so dropping it changes nothing",ot={sectionSurface:"read by nothing in src/ (searched 2026-10-24): a retired theme key that draws nothing today, so dropping it changes nothing",widthMode:r,fullWidth:r,pageWidth:r,backgroundWidth:r,contentWidth:r,contentMax:r},et=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 y(t,o){const e=s(t.sectionPaddingTop)??0,n=s(t.sectionPaddingBottom)??0,i=s(t.sectionPaddingTopTablet),d=s(t.sectionPaddingBottomTablet);return{sectionPaddingTop:e+o.top,sectionPaddingBottom:n+o.bottom,...i===void 0?{}:{sectionPaddingTopTablet:i+o.top},...d===void 0?{}:{sectionPaddingBottomTablet:d+o.bottom},sectionPaddingTopPhone:(s(t.sectionPaddingTopPhone)??i??e)+o.topPhone,sectionPaddingBottomPhone:(s(t.sectionPaddingBottomPhone)??d??n)+o.bottomPhone}}const nt=t=>["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopTablet","sectionPaddingBottomTablet","sectionPaddingTopPhone","sectionPaddingBottomPhone"].map(o=>[o,o,(e,n)=>y(n,typeof t=="function"?t(n):t)[o]]);function c(t,o){const e=_(t,S[o]);return{sectionPaddingTop:e.top,sectionPaddingBottom:e.bottom}}const it=t=>[["padTop","sectionPaddingTop",(o,e)=>c(e,t).sectionPaddingTop],["padBottom","sectionPaddingBottom",(o,e)=>c(e,t).sectionPaddingBottom],["sectionPaddingTop","sectionPaddingTop",(o,e)=>c(e,t).sectionPaddingTop],["sectionPaddingBottom","sectionPaddingBottom",(o,e)=>c(e,t).sectionPaddingBottom]],R={kind:"heading-case-upper",styles:["heading-1","heading-2","heading-3"]},dt=t=>o=>N(o.props[t])?[R]:[],st=(t,o)=>({kind:"text",key:t,role:"eyebrow",props:p,...o?{style:o}:{}}),l=t=>t.background!=="transparent",k=(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},m={align:"right",alignPhone:"left"},v=(t,o,e)=>{const n=i=>k(i[t],i[o]);return{kind:"block",type:"Text",when:(i,d)=>d!==void 0&&n(d)!=="",box:[[t,"text",(i,d)=>n(d)],[o,"text",(i,d)=>n(d)]],props:e}},rt=(t,o,e,n={})=>v(t,o,{...D,...m,...n,_partStyles:{text:{textStyle:"body-5",color:"labels",...e,case:"upper",...m}}}),g=(t,o)=>typeof t=="number"&&Number.isInteger(t)&&t>=0?t:a(o)?.selected??0,b=(t,o)=>a(o)?.themes[g(t.sectionAccent??0,o)],ct=t=>(o,e)=>{const n=b(o,e)?.[t];return n?{fillColor:n}:{}},at=(t,o)=>{const e=b(t,o)?.line;return e?{buttonBorder:{width:1,color:e}}:{}},P=(t,o)=>{const e=a(o)?.themes;return e&&l(t)?O(e,g(t.sectionAccent,o)):-1},pt=(t,o,e)=>{const n=P(o,e);return n>=0?n:t},gt=(t,o)=>{const e=P(t,o);return e>=0?{sectionAccent:e}:{}},Pt=(t,o)=>l(t.props)&&P(t.props,o)<0?[{kind:"band-preset",page:g(t.props.sectionAccent,o)}]:[];export{h as BOX,q as BUTTON,Y as DIM,ot as DROP_COMMON,et as DROP_SIDE_PADDING,R as HEADING_CASE_UPPER,Q as INNER_BOX,D as NUMBER_TEXT,m as RIGHT_WORDS,tt as SAME_KEYS,Z as SECTION_BOX,z as SH_LINK,p as TEXT,pt as bandAccent,P as bandIndex,g as bandPage,gt as bandProps,Pt as bandWrites,ct as fillFrom,dt as headingCaseOf,c as innerPad,it as innerPadKeys,rt as leadLine,v as leadText,at as lineBorder,k as numberAndUnit,b as sectionPage,st as smallText,y as wrapperPad,nt as wrapperPadKeys};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{phoneKey as
|
|
1
|
+
import{phoneKey as W,readHidable as k}from"efficient-easel/draw";import{parseHexColor as M}from"efficient-shell/format";import{cardColumns as G}from"../../../../components/Cards.js";import{resolveSectionBackground as X,THEME_SECTION_BG as x}from"../../../../../format/lib/content/section-background.js";import{CardsMeta as J}from"../../../../../format/lib/document/blocks/general/Cards/meta.js";import{KeyFeaturesMeta as q}from"../../../../../format/lib/document/blocks/general/KeyFeatures/meta.js";import{finiteNumber as S}from"../../../../../format/lib/finite-number.js";import{parseSectionHeadPlacement as U}from"../../../../../format/lib/sections/section-head-placement.js";import{hasWords as d}from"../../../sections/section-to-box.js";import{labelTextSeed as V}from"../../../../../format/lib/document/text-seeds.js";import{bandAccent as j,bandProps as z,bandWrites as Y,BUTTON as Q,DIM as p,DROP_COMMON as l,DROP_SIDE_PADDING as c,INNER_BOX as t,leadText as Z,SAME_KEYS as h,SECTION_BOX as g,fillFrom as i,SH_LINK as $,TEXT as a,smallText as m,wrapperPad as w,wrapperPadKeys as u}from"./section-to-box-row-parts.js";import{headTree as _,token as s}from"./section-head-looks.js";import{SECTION_BG_BUILT_IN as ee}from"../../../../../format/lib/document/blocks/general/section-bg-built-in.js";const r=(e,o,n,y)=>({sectionBorder:{top:e,right:o,bottom:n,left:y}}),R=(e,o=e)=>({sectionPaddingTop:e,sectionPaddingRight:e,sectionPaddingBottom:e,sectionPaddingLeft:e,sectionPaddingTopPhone:o,sectionPaddingRightPhone:o,sectionPaddingBottomPhone:o,sectionPaddingLeftPhone:o}),O=e=>o=>G(S(o.columns)??S(e.columns)),T=e=>({kind:"group",name:"Grid",props:{...t,gap:0,...r(1,0,0,1)},parts:[e]}),b={...t,direction:"row",gap:0,share:"equal"},C="its head sits in a Box of its own above it (own-box): the row draws the head inline",N=e=>U(e.headPlacement)==="own-box",L="inline is the head the row draws; an own-box node is skipped (`skip`)",oe=e=>({kind:"group",name:"Heading",props:e,parts:[m("eyebrow"),{kind:"text",key:"title",role:"heading",props:a,style:{textStyle:"heading-3",case:"upper"},was:{size:44}}]}),B={top:72,bottom:72,topPhone:72,bottomPhone:72},te={...t,gap:12,gapPhone:12,...R(32,28),...r(0,1,1,0)},ne={name:"Cards",boxProps:(e,o)=>({...g,direction:"column",gap:36,gapPhone:28,...i("surface")(e,o),...w(e,B)}),box:[...h,...u(B)],skip:e=>N(e)?C:typeof e.dataSource=="string"&&e.dataSource?"its cards come from a source: a data list, which waits for the card template on Cards":e.cardStyle==="label-only"?"Label only is Key Features' look: no live node holds it, so it has no row of its own yet":void 0,parts:[_("Cards"),T({kind:"list",key:"items",name:"Card",perRow:O(J.defaultProps),rowName:"Row",rowProps:b,props:(e,o)=>({...te,...i("background")(e,o)}),parts:[{kind:"text",key:"title",props:a,style:{textStyle:"heading-3",...s("headingSmall",20),weight:500,case:"upper",lineHeight:1.5,letterSpacing:.02}},{kind:"text",key:"body",props:p,style:{textStyle:"body-1",...s("body",15),lineHeight:1.6}}]})],drop:{...l,...c,columns:"the rows of N: one Row Box per `columns` cards, which the Box draws as N equal blocks",cardStyle:"the standard card is what the row draws; a Label only node is skipped (0 live nodes)",dataSource:"an empty source is typed cards, what the row draws; a sourced node is skipped (0 live nodes)",dataSourceOptions:"read only with a source; a sourced node is skipped (0 live nodes)",headPlacement:L,eyebrowLook:"needs the eyebrow's Filled look on a Text block: Plain is the eyebrow start look the row draws; 2 of 62 live nodes store it (JJ's export, 2026-10-24)"}},E={top:76,bottom:76,topPhone:76,bottomPhone:76},se={...t,direction:"row",align:"center",gap:16,sectionPaddingTop:32,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,...r(0,1,1,0)},F={textStyle:"body-1",color:"text"},H=(e,o)=>typeof o?.href=="string"&&o.href.trim()!=="",re={name:"Key Features",boxProps:e=>({...g,direction:"column",gap:44,...r(1,0,1,0),...w(e,E)}),box:[...h,...u(E)],parts:[oe({...t,direction:"row",align:"end",gap:20,wrap:!0,share:"content"}),T({kind:"list",key:"items",name:"Feature",perRow:O(q.defaultProps),rowName:"Row",rowProps:b,props:se,parts:[{kind:"button",key:"label",href:"href",when:H,variant:"ghost",props:{...Q,...$,icon:"none"},style:F},{kind:"text",key:"label",when:(e,o)=>!H(e,o),props:a,style:F,was:{size:17}}]})],drop:{...l,...c,columns:"the rows of N: one Row Box per `columns` cells, which the Box draws as N equal blocks",eyebrowLook:"needs the eyebrow's Filled look on a Text block: Filled is Key Features' own default (lib/sections/section-eyebrow-look), so 20 of 21 published nodes draw it with nothing stored; the row draws the Plain start look (JJ's export, 2026-10-24)"}},D={top:120,bottom:120,topPhone:80,bottomPhone:80},P=e=>{const o=X(typeof e.background=="string"?e.background:void 0,ee.Series);return o&&o!=="transparent"?o:void 0},f=e=>P(e)===x,ie=(e,o)=>{const n=P(e);return!n||n===x?{}:n==="var(--site-surface)"?i("surface")(e,o):M(n.trim())?{fillColor:n.trim()}:{}},v=e=>{const o=P(e)?1:2;return{gap:o,gapPhone:o}},ae={...t,justify:"between",gap:16,gapPhone:16,sectionHeightMode:"fixed",sectionHeightValue:340,sectionHeightUnit:"px",sectionPaddingTop:36,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,sectionPaddingTopPhone:36,sectionPaddingRightPhone:28,sectionPaddingBottomPhone:32,sectionPaddingLeftPhone:28},I={...t,direction:"row",justify:"between",gap:12,share:"content",phoneRow:2,[W("share")]:"content"},A={textStyle:"body-5",...s("label",12),letterSpacing:.22,case:"upper",lineHeight:1.5},de=e=>d(e.viewLabel)&&!k(e.viewLabel).hidden,pe={name:"Recurring Columns",boxProps:(e,o)=>({...g,direction:"column",gap:60,gapPhone:60,...r(0,0,1,0),...f(e)?z(e,o):{},...ie(e,o),...w(e,D)}),box:[...h.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,o,n)=>f(o)?j(e,o,n):e],...u(D)],skip:e=>N(e)?C:void 0,site:(e,o)=>f(e.props)?Y(e,o):[],parts:[_("Series"),{kind:"group",name:"Grid",props:(e,o)=>({...t,...v(e),...P(e)?{}:i("background")(e,o)}),parts:[{kind:"list",key:"cards",name:"Column",perRow:()=>4,rowName:"Row",rowProps:e=>({...b,...v(e)}),rowFiller:t,props:(e,o)=>({...ae,...i("background")(e,o)}),parts:[{kind:"group",name:"Words",props:{...t,gap:16,gapPhone:16},parts:[{kind:"group",name:"Top",props:I,parts:[m("num",s("label",13)),m("since",s("label",13))]},{kind:"text",key:"title",props:{...a,tag:"h3"},style:{textStyle:"heading-3",...s("headingSmall",28),weight:500,case:"upper",lineHeight:1.04,letterSpacing:-.02}},{kind:"text",key:"desc",props:p,style:{textStyle:"body-5",fontRole:"heading",...s("body",14),lineHeight:1.6}}]},{kind:"group",name:"Footer",when:(e,o)=>d(o?.entries)||d(o?.entriesLabel)||de(e),props:{...I,align:"center",gap:0,gapPhone:0,sectionPaddingTop:16,sectionPaddingTopPhone:16,...r(1,0,0,0)},parts:[Z("entries","entriesLabel",{...p,_partStyles:{text:A}}),{kind:"group",name:"View",props:{...t,maxWidthPhone:266},parts:[{kind:"block",type:"Text",when:e=>d(e.viewLabel),props:e=>{const o=k(e.viewLabel),n=V()._partStyles,y=e._partStyles?.viewLabel;return{...a,text:o.text,_partStyles:{text:{...n.text,...A,...y}},...o.hidden?{_hidden:!0}:{}}}}]}]}]}]}],reads:{viewLabel:"a Text at the far end of every card's footer",background:"the Box's theme (the band preset) or its Fill; the grid's gap"},drop:{...l,...c,headPlacement:L}},K={top:60,bottom:60,topPhone:40,bottomPhone:40},le={...t,gap:8,gapPhone:8,...R(24),...r(1,1,1,1)},ce={name:"Document Detail Cards",boxProps:e=>({...g,direction:"column",gap:40,gapPhone:16,...r(0,0,1,0),...w(e,K)}),box:[...h,...u(K)],parts:[{kind:"list",key:"cards",name:"Card",perRow:()=>3,rowName:"Row",rowProps:{...b,gap:40,gapPhone:16},props:(e,o)=>({...le,...i("surface")(e,o)}),parts:[m("label",{...s("label",12),lineHeight:1.5}),{kind:"group",name:"Words",props:{...t,gap:14,gapPhone:14},parts:[{kind:"text",key:"value",props:a,style:{textStyle:"heading-3",...s("headingSmall",20),weight:500,letterSpacing:-.015,lineHeight:1.5}},{kind:"text",key:"desc",props:p,style:{textStyle:"body-5",fontRole:"accent",...s("body",14),italic:!0,lineHeight:1.5}}]}]}],drop:{...l,...c}},Re={Cards:ne,KeyFeatures:re,Series:pe,DocMetaCards:ce};export{Re as CARDS_SECTION_TO_BOX};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SECTION_BOX_SLOT as
|
|
1
|
+
import{tabletKey as I}from"efficient-easel/draw";import{SECTION_BOX_SLOT as G,SECTION_BOX_TYPE as W}from"../../../sections/section-to-box.js";import{BUTTON as k,DIM as r,DROP_COMMON as j,DROP_SIDE_PADDING as D,INNER_BOX as o,SAME_KEYS as X,SECTION_BOX as P,SH_LINK as f,TEXT as p,bandAccent as v,bandIndex as K,bandPage as $,bandProps as S,bandWrites as z,smallText as d,wrapperPad as l}from"./section-to-box-row-parts.js";import{editorialHeadTree as U,token as c}from"./section-head-looks.js";import{declaredBlockSource as B}from"../../../../../format/lib/content/block-sources.js";import{parseLocationTileShape as Y,splitLegacyRegion as T}from"../../../../../format/lib/content/contact.js";import{groupColumns as g}from"../../../../../format/lib/locations-grid.js";import{phoneHref as F}from"../../../../../format/lib/links/phone-href.js";import{hasMapCoords as q}from"../../../../../format/lib/map-styles.js";const a=e=>typeof e=="string"?e:e==null?"":String(e),m=e=>Array.isArray(e.locations)?e.locations.map(t=>t??{}):[],s=e=>a(e.group),w=e=>`loc-${e}`,x=e=>a(e.state).trim()||T(a(e.region)).state,O=e=>a(e.country).trim()||T(a(e.region)).country,_=e=>[x(e),O(e)].filter(Boolean).join(" · "),V=e=>m(e).some(t=>a(t.photo).trim()!==""),J=e=>m(e).some(t=>q(Number(t.lat),Number(t.lng))),Q=(e,t)=>m(e).filter(n=>s(n)===s(t)).length,Z=(e,t)=>Q(e,t)===1?"wide":Y(e.imageShape),h={top:100,bottom:100,topPhone:60,bottomPhone:60},N=48,i=(e,t={})=>({textStyle:"body-5",...c("label",e),case:"upper",...t}),y={top:1,right:1,bottom:1,left:1},u=(e,t)=>({sectionPaddingTop:e,sectionPaddingBottom:e,sectionPaddingLeft:t,sectionPaddingRight:t,sectionPaddingTopPhone:e,sectionPaddingBottomPhone:e,sectionPaddingLeftPhone:t,sectionPaddingRightPhone:t}),b={...o,direction:"row",share:"equal",gap:0},ee=e=>t=>t>g(t)?{...o,gap:0}:{...b,...t>1?{phoneRow:e}:{}},te={kind:"group",name:"Gallery",props:{...o,gap:20,_hidden:!0},when:V,parts:[{kind:"group",name:"Gallery head",props:{...o,direction:"row",justify:"between",align:"end",gap:24,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:16},parts:[d("galleryKicker",i(12,{color:"accent",letterSpacing:.3})),{kind:"text",key:"galleryHint",props:{...r,align:"right",alignPhone:"left"},style:i(11,{letterSpacing:.22,alignPhone:"left"})}]},{kind:"group",name:"Groups",props:{...o,gap:24},parts:[{kind:"list",key:"locations",name:"City picture",props:{...o,darken:85,darkenStyle:"bottom",placement:"bottom-left",sectionBorder:y,...u(12,12)},item:(e,t,n)=>({props:{...a(e.photo).trim()?{bgImage:a(e.photo)}:{},link:`#${w(t)}`,boxShape:Z(n,e)}}),parts:[{kind:"text",key:"name",props:p,style:i(11,{letterSpacing:.22,color:"text"})}],groups:{of:s,name:"Group",props:{...o,gap:10},head:e=>({label:s(e[0]??{})}),parts:[d("label",i(11,{color:"accent",letterSpacing:.3}))],itemsName:"Cities",itemsProps:ee(2),perRow:g,rowName:"Row",rowProps:{...b,phoneRow:2}}}]}]},oe={kind:"group",name:"Words",props:{...o,gap:12,gapPhone:12,...u(28,28),sectionHeightMode:"fixed",sectionHeightValue:280,sectionHeightUnit:"px",sectionHeightModePhone:"auto"},parts:[{kind:"group",name:"Name row",props:{...o,direction:"row",justify:"between",align:"start",gap:14,share:"content",phoneRow:2,sharePhone:"content",wrapPhone:"nowrap",sectionPaddingBottom:6,sectionPaddingBottomPhone:6},parts:[{kind:"group",name:"Name",props:{...o,gap:6,gapPhone:6,minWidth:0},parts:[{kind:"text",key:"name",role:"heading",props:p,style:{textStyle:"heading-3",...c("headingSmall",30),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02}},{kind:"block",type:"Text",props:{...p,_partStyles:{text:i(12,{color:"accent",letterSpacing:.24,lineHeight:1.5})}},box:["region","state","country"].map(e=>[e,"text",(t,n)=>_(n)]),when:(e,t)=>_(t??{})!==""}]},{kind:"group",name:"Time zone",props:{...o,sectionBorder:y,...u(6,10)},parts:[{kind:"text",key:"timezone",props:{...r,textFit:"line"},style:i(12,{letterSpacing:.22,lineHeight:1.5})}]}]},{kind:"text",key:"address",props:r,style:{textStyle:"body-5",fontRole:"heading",...c("body",14),lineHeight:1.5}},{kind:"block",type:"ButtonBlock",props:{...k,...f,variant:"ghost",arrow:!1,_partStyles:{label:i(13,{letterSpacing:.18,color:"text",lineHeight:24/13})}},box:[["phone","label"],["phone","href",e=>F(a(e))??"#"]],when:(e,t)=>a(t?.phone).trim()!==""},{kind:"text",key:"hours",props:r,style:i(12,{letterSpacing:.18,lineHeight:1.7})}]},ne={kind:"block",type:"LocationMap",props:e=>({mapTheme:typeof e.mapTheme=="string"?e.mapTheme:"auto"}),box:["name","lat","lng","mapsUrl","geocode",...["region","state"].map(e=>[e,"state",(t,n)=>x(n)]),...["region","country"].map(e=>[e,"country",(t,n)=>O(n)])]},ae={kind:"group",name:"Map",props:{...o,sectionBorder:{top:1,right:0,bottom:0,left:0}},parts:[ne]},ie={kind:"list",key:"locations",name:"City",props:(e,t)=>({...o,gap:0,justify:"between",sectionBorder:y,jumpHighlight:!0,sectionAccent:K(e,t)>=0?$(e.sectionAccent,t):-1}),item:(e,t)=>({props:{anchor:w(t)}}),parts:[oe,ae],groups:{of:s,name:"Group",props:{...o,gap:20},head:e=>{const t=e[0]??{};return{key:s(t),groupName:a(t.groupName),count:`${e.length} location${e.length===1?"":"s"}`}},parts:[{kind:"group",name:"Group head",props:{...o,direction:"row",justify:"between",align:"end",gap:16,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:16},when:(e,t)=>a(t?.key).trim()!=="",parts:[d("key",i(13,{color:"accent",letterSpacing:.3})),{kind:"text",key:"groupName",role:"heading",props:p,style:{textStyle:"heading-3",...c("headingSmall",24),case:"upper",weight:500,letterSpacing:-.01}},{kind:"text",key:"count",props:r,style:i(12,{letterSpacing:.22})}]}],itemsName:"Cities",itemsProps:e=>({...b,columns:g(e),[I("columns")]:1})}},C=i(10,{letterSpacing:.25}),re={kind:"block",type:W,props:{...o,name:"Credit",direction:"row",justify:"end",align:"center",gap:6,share:"content",wrap:!0},when:J,slot:G,keepEmpty:!0,parts:[{kind:"block",type:"Text",props:{...r,text:"Location coordinates ©",_partStyles:{text:C}}},{kind:"block",type:"ButtonBlock",props:{...k,...f,variant:"ghost",arrow:!1,label:"OpenStreetMap contributors",href:"https://www.openstreetmap.org/copyright",_partStyles:{label:{...C,color:"labels"}}}}]},M=(e,t)=>Object.fromEntries(t.filter(n=>e[n]!==void 0).map(n=>[n,e[n]])),E=["sectionPaddingTop","sectionPaddingTopTablet","sectionPaddingTopPhone"],H=["sectionPaddingBottom","sectionPaddingBottomTablet","sectionPaddingBottomPhone"],L=e=>e.map(t=>[t,t,(n,R)=>l(R,h)[t]]),A=["sectionAccent","sectionAccent",v],se=["gridSpan","_hidden"],pe={name:"City pictures",skip:e=>B(e)?`fed by the data source "${B(e)}": its cities are read as the page is served, not stored on the node`:void 0,boxProps:(e,t)=>({...P,direction:"column",gap:40,anchor:"studios",...M(l(e,h),E),sectionPaddingBottom:N,sectionPaddingBottomPhone:N,...S(e,t)}),box:[...X.filter(e=>e!=="sectionAccent"&&e!=="anchor"),A,["anchor","anchor",e=>a(e).trim()?e:"studios"],...L(E)],parts:[U("sectionNumber","heading","tagline"),te],also:[{name:"City maps",boxProps:(e,t)=>({...P,direction:"column",gap:40,sectionBorder:{bottom:1},sectionPaddingTop:0,sectionPaddingTopPhone:0,...M(l(e,h),H),...S(e,t)}),box:[...se,A,...L(H)],parts:[ie,re]}],reads:{mapTheme:"City maps Box: each Map block's Map theme",imageShape:"City pictures Box: each picture Box's Box shape"},site:z,drop:{...j,...D,apiKey:"a stored Google Maps key from before the map needed none: the website's one map (components/SiteMap) takes no key, and a key is a credential, never page content",mapId:"a Google Maps style id from the same retired map: nothing in src/ reads it",gallery:"the retired separate tile list: the wall is derived from the cities (`components/ContactLocations`), nothing in src/ reads it",dataSource:"always empty here: a node fed by a source is skipped (see skip)"}},ke={ContactLocations:pe};export{ke as LOCATIONS_SECTION_TO_BOX};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{hasWords as p}from"../../../sections/section-to-box.js";import{BLOCK_WIDTH_LIMIT as N}from"efficient-easel/draw";import{fluidToken as M,token as o}from"./section-head-looks.js";import{STRIP_BOX as R}from"../../../../../format/lib/sections/strip-shape.js";import{BUTTON as C,DIM as A,DROP_COMMON as l,DROP_SIDE_PADDING as d,INNER_BOX as n,leadLine as k,RIGHT_WORDS as P,SAME_KEYS as g,SECTION_BOX as c,SH_LINK as W,smallText as i,TEXT as a,wrapperPad as h,wrapperPadKeys as m}from"./section-to-box-row-parts.js";const r={textFit:"line",textFitPhone:"wrap"},f={minWidth:N.min},S=(e,t,s)=>({...i(e,{...t,...P}),props:{...a,align:"right",...r,...s}}),_={top:1,bottom:0},b=(e,t,s,H)=>({kind:"group",name:e,props:{...n,sectionPaddingBottom:t,sectionPaddingBottomPhone:s},parts:[H]}),T={widthFit:"fill",...f},w={top:100,bottom:60,topPhone:60,bottomPhone:40},U={...o("label",13),letterSpacing:.22,lineHeight:1.8},x={textStyle:"heading-1",...M("headingLarge",56,8,128),case:"upper",weight:500,lineHeight:.88,letterSpacing:-.04},E=e=>e.titleLevel===2,v=()=>({name:"Document Header",boxProps:e=>({...c,direction:"column",gap:0,sectionBorder:{bottom:1},...h(e,w)}),box:[...g,...m(w)],parts:[{kind:"group",name:"Header",props:{...n,direction:"row",align:"end",justify:"between",gap:40,gapPhone:16,share:"content",sectionPaddingBottom:32},parts:[b("Eyebrow",12,0,{...i("eyebrow",o("label",13)),props:{...a,...r}}),{kind:"text",key:"title",role:"heading",props:{...a,tag:"h1",...T},style:x,when:e=>!E(e)},{kind:"text",key:"title",role:"heading",props:{...a,tag:"h2",...T},style:x,when:E},{kind:"group",name:"Details",props:{...n,align:"stretch",gap:0,gapPhone:0,sectionPaddingBottom:12,sectionPaddingBottomPhone:0},parts:[{kind:"list",key:"meta",name:"Detail",flat:!0,parts:[k("label","value",U,r)]}]}]},{kind:"group",name:"Deck",props:{...n,sectionBorder:_,sectionPaddingTop:32},parts:[{kind:"text",key:"deck",props:{...A,maxWidth:760},style:{textStyle:"body-1",fontRole:"accent",...o("body",22,19),italic:!0,lineHeight:1.5}}]}],drop:{...l,...d,titleLevel:"read by the title part's `when`: 2 (set by lib/document/one-h1 on a later opener) makes the Text an h2, anything else an h1"}}),I={top:80,bottom:40,topPhone:60,bottomPhone:32},X={...o("label",13),letterSpacing:.18,lineHeight:1.8},O={...o("label",13),letterSpacing:.22,lineHeight:1.9},G=()=>({name:"Issue Header",boxProps:e=>({...c,direction:"column",gap:0,sectionBorder:{bottom:1},...h(e,I)}),box:[...g,...m(I)],parts:[{kind:"group",name:"Top",props:{...n,direction:"row",align:"end",justify:"between",gap:60,gapPhone:16,share:"content",sectionPaddingBottom:32},parts:[b("Eyebrow",14,14,i("eyebrow",o("label",14))),{kind:"group",name:"Issue",props:{...n,align:"end",gap:0,gapPhone:0,sectionPaddingBottom:14},parts:[{kind:"list",key:"issueMeta",name:"Issue line",flat:!0,parts:[k("lead","rest",X)]}]}]},{kind:"group",name:"Bottom",props:{...n,direction:"row",align:"start",justify:"between",gap:60,gapPhone:16,share:"content",sectionBorder:_,sectionPaddingTop:32},parts:[{kind:"text",key:"lead",props:{...a,maxWidth:720,...f},style:{textStyle:"body-1",fontRole:"heading3",...o("headingSmall",20),lineHeight:1.5,letterSpacing:-.005,paragraphSpacing:16}},{kind:"group",name:"In this issue",props:{...n,align:"stretch",gap:0},parts:[b("Heading",6,6,{kind:"text",key:"issueHeading",props:{...a,align:"right",...r},style:{textStyle:"body-1",fontRole:"heading",...o("body",18),weight:400,letterSpacing:-.01,lineHeight:1.9,...P}}),{kind:"group",name:"Lines",props:{...n,align:"stretch",gap:0},parts:[{kind:"list",key:"issueList",name:"Line",flat:!0,parts:[S("text",{color:"labels",...O})]}]},S("issueTotal",O)]}]}],drop:{...l,...d}}),B={top:24,bottom:24,topPhone:16,bottomPhone:16},u={color:"labels",...o("label",13),letterSpacing:.2},L=e=>(Array.isArray(e.items)?e.items:[]).filter(t=>t&&typeof t.label=="string"&&t.label.trim()!==""),y=(e,t)=>t!==void 0&&L(e).at(-1)===t,D=(e,t)=>t!==void 0&&L(e).includes(t),K=(e,t)=>D(e,t)&&!y(e,t)&&p(t?.href),j=()=>({name:"Breadcrumb",skip:e=>p(e.meta)?'a trailing note after "·" needs a second mark; none live':void 0,boxProps:e=>({...c,...R,gap:16,gapPhone:16,separator:"slash",sectionBorder:{bottom:1},...h(e,B)}),box:[...g,...m(B)],parts:[{kind:"list",key:"items",name:"Crumb",flat:!0,parts:[{kind:"button",key:"label",href:"href",variant:"ghost",when:K,props:{...C,...W,icon:"none"},style:u},{...i("label",u),when:(e,t)=>D(e,t)&&!y(e,t)&&!p(t?.href)},{...i("label",{...u,color:"text"}),when:y}]}],drop:{...l,...d,meta:"a node that stores a note is skipped (`skip`); an empty one draws nothing"}}),J={DocMasthead:v(),Masthead:G(),Breadcrumb:j()};export{J as PAGE_HEADER_SECTION_TO_BOX};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hasWords as
|
|
1
|
+
import{hasWords as I,registerSectionToBox as n}from"../../../sections/section-to-box.js";import{BUTTON as g,DIM as m,DROP_COMMON as s,DROP_SIDE_PADDING as c,INNER_BOX as t,leadLine as H,SAME_KEYS as d,SECTION_BOX as p,lineBorder as A,TEXT as l,innerPad as S,innerPadKeys as f,smallText as P,wrapperPad as u,wrapperPadKeys as b}from"./section-to-box-row-parts.js";import{CARDS_SECTION_TO_BOX as R}from"./section-to-box-rows-cards.js";import{normalizeSiteGutter as L,normalizeSiteGutterPhone as C,siteGutterPhoneFollows as W}from"../../../../../format/lib/content/page-width.js";import{finiteNumber as D}from"../../../../../format/lib/finite-number.js";import{STATS_SECTION_TO_BOX as G}from"./section-to-box-rows-stats.js";import{LOGOS_SECTION_TO_BOX as X}from"./section-to-box-rows-logos.js";import{STRIP_SECTION_TO_BOX as M}from"./section-to-box-rows-strip.js";import{TIMELINE_SECTION_TO_BOX as F}from"./section-to-box-rows-timeline.js";import{LOCATIONS_SECTION_TO_BOX as z}from"./section-to-box-rows-locations.js";import{HEAD_ONLY_SECTION_TO_BOX as K}from"./section-to-box-rows-head.js";import{PAGE_HEADER_SECTION_TO_BOX as j}from"./section-to-box-rows-pageheader.js";import{fluidToken as U,headTree as w,token as r}from"./section-head-looks.js";const k={top:72,bottom:72,topPhone:72,bottomPhone:72},Y={name:"Editorial Text",boxProps:e=>({...p,direction:"column",gap:28,gapPhone:28,sectionBorder:{top:1},...u(e,k)}),box:[["topBorder","sectionBorder",e=>e===!1?void 0:{top:1}],...d,...b(k)],parts:[w("Prose"),{kind:"text",key:"body",props:m,style:{textStyle:"body-1",...r("body",16),lineHeight:1.7,paragraphSpacing:18}}],drop:{...s,...c,headPlacement:"needs a row per head placement: an own-box Prose draws no head (its words sit in a Section Header above it), the row always draws the head. 0 of 123 live nodes store it (the live export, 2026-10-24)"}},T={buttonPaddingTop:20,buttonPaddingBottom:20,buttonPaddingLeft:28,buttonPaddingRight:28},O=(e,o)=>o?.variant==="primary",_=(e,o)=>({kind:"list",key:"buttons",name:"Button",flat:!0,when:e,parts:[{kind:"button",key:"label",href:"href",when:O,variant:"primary",style:{letterSpacing:.3},props:{...g,...T,...o}},{kind:"button",key:"label",href:"href",when:(i,a)=>!O(i,a),variant:"ghost",style:{letterSpacing:.3},props:(i,a)=>({...g,...T,...o,...A(i,a)})}]}),h=e=>I(e.title),q={name:"Call-to-Action Heading",boxProps:e=>({...p,direction:"row",align:"center",justify:h(e)?"between":"end",gap:60,gapPhone:60,share:"content",sectionBorder:{bottom:1},...S(e,"TitleWithButtons")}),box:[...d,...f("TitleWithButtons")],parts:[{kind:"group",name:"Title",props:{...t,maxWidth:1e3,widthFitPhone:"fill"},parts:[{kind:"text",key:"title",role:"heading",props:l,style:{textStyle:"heading-1",...U("headingLarge",48,7,108),case:"upper",lineHeight:.94,letterSpacing:-.035}}]},{kind:"group",name:"Buttons",props:e=>({...t,gap:14,gapPhone:14,widthFitPhone:"fill",...h(e)?{minWidth:280,minWidthPhone:0}:{}}),parts:[_(h,{widthFit:"fill",iconPosition:"end"}),_(e=>!h(e),{})]}],drop:{...s,buttonsAlign:"moves the buttons only when there is no heading (4 of 128 live nodes), where the Box puts them at the end. 0 of 128 live nodes store it (the live export, 2026-10-24)",buttonsAlignPhone:"the phone's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Phone view's Block alignment row), so nothing moves"}};function J(e){const{siteGutter:o,siteGutterPhone:i}=e.site??{},a=L(o),y=Math.min(20,C(i)??W(o));return{sectionPaddingLeft:a,sectionPaddingRight:a,sectionPaddingLeftPhone:y,sectionPaddingRightPhone:y}}const x={top:40,bottom:64,topPhone:24,bottomPhone:36},Q={name:"Section Header",boxProps:(e,o)=>({...p,direction:"column",gap:0,...u(e,x),...J(o)}),box:[...d,...b(x)],parts:[w("SectionHeader")],drop:{...s,...c,headStyle:"needs a row per head look: the row draws the standard look; the editorial, simple, statement, natural and essay looks are other layouts. 0 of 69 live nodes store it (the live export, 2026-10-24)",eyebrowLook:"read only by the simple, statement, natural and essay looks, which this row does not draw. 0 of 69 live nodes store it",rowGap:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",descriptionSize:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",numStyle:"Solid (the default; 4 of 69 live nodes store it) IS the eyebrow Text the row draws; Outlined (0 live) needs an outlined-number text look"}},B={...t,direction:"row",share:"bigLeft",gap:30},E={...t,sectionPaddingLeft:30,sectionPaddingLeftPhone:0},N=(e,o,i)=>({kind:"group",name:e,props:o,parts:[i]}),V={name:"Lead Text",boxProps:e=>({...p,direction:"column",gap:40,gapPhone:40,sectionBorder:{bottom:1},...S(e,"ParagraphsA")}),box:[...d,...f("ParagraphsA")],parts:[{kind:"group",name:"Numbers",props:{...B,gapPhone:24,sectionBorder:{bottom:1},sectionPaddingBottom:40,sectionPaddingBottomPhone:40},parts:[{kind:"group",name:"Eyebrow",props:{...t,sectionPaddingTop:5,sectionPaddingBottom:1,sectionPaddingTopPhone:5,sectionPaddingBottomPhone:1},parts:[P("eyebrow",{color:"labels",...r("label",12),letterSpacing:.24})]},N("Stats column",t,{kind:"group",name:"Stats",props:{...E,gap:0,gapPhone:0},parts:[{kind:"list",key:"stats",name:"Stat",flat:!0,parts:[H("value","label",{...r("label",13),letterSpacing:.18,lineHeight:1.8})]}]})]},{kind:"group",name:"Words",props:{...B,gapPhone:28},parts:[{kind:"group",name:"Lead",props:t,parts:[{kind:"group",name:"Measure",props:{...t,maxWidth:780},parts:[{kind:"text",key:"lead",props:l,style:{textStyle:"heading-3",...r("headingSmall",22,20),weight:400,case:"none",lineHeight:1.45,letterSpacing:-.005}}]}]},N("Note column",{...t,justify:"end",widthFit:"fill"},{kind:"group",name:"Founders",props:{...E,gap:8,gapPhone:8},parts:[{kind:"group",name:"Note",props:{...t,gap:6,gapPhone:6},parts:[{kind:"text",key:"foundersHeading",props:l,style:{textStyle:"body-1",fontRole:"heading",...r("body",18,16),weight:500,letterSpacing:-.01,lineHeight:1.7}},{kind:"text",key:"foundersBody",props:m,style:{textStyle:"body-5",fontRole:"heading",...r("body",14,12),lineHeight:1.7}}]},P("attribution",{...r("label",12,10),letterSpacing:.24,lineHeight:1.7})]})]}],drop:{...s}},v={top:24,bottom:24,topPhone:24,bottomPhone:24},Z={name:"Banner",boxProps:e=>({...p,direction:"column",gap:0,...u(e,v)}),box:[...d,"contained",...b(v)],parts:[{kind:"group",name:"Card",keepEmpty:!0,props:{...t,gap:28,placement:"top-left",darken:60,darkenStyle:"even",sectionBorder:{width:1},sectionPaddingTop:64,sectionPaddingBottom:64,sectionPaddingTopPhone:40,sectionPaddingBottomPhone:40,sectionPaddingLeft:40,sectionPaddingRight:40,sectionPaddingLeftPhone:24,sectionPaddingRightPhone:24},box:[["imageSrc","bgImage"],["overlay","darken",e=>Math.min(Math.max(D(e)??60,0),100)]],parts:[{kind:"group",name:"Words",props:{...t,gap:20},parts:[P("eyebrow"),{kind:"text",key:"title",role:"heading",props:{...l,maxWidth:680},style:{weight:500,lineHeight:1.05,letterSpacing:-.03,case:"none"}},{kind:"text",key:"body",props:{...m,maxWidth:680},style:{textStyle:"body-1",lineHeight:1.6},was:{size:16}}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:g}]}],drop:{...s,...c}},$={Prose:Y,TitleWithButtons:q,SectionHeader:Q,ParagraphsA:V,Banner:Z};function me(){n($),n(G),n(X),n(R),n(M),n(F),n(z),n(K),n(j)}export{$ as GENERAL_SECTION_TO_BOX,me as registerGeneralSectionRows};
|
|
@@ -12,8 +12,8 @@ export declare const VIDEO_FILE_LABEL = "Video file";
|
|
|
12
12
|
export declare const VIDEO_FILE_PROMPT = "Upload a video file";
|
|
13
13
|
export declare function forMediaType(type: "image" | "video", fallback: "image" | "video"): {
|
|
14
14
|
readonly field: "mediaType";
|
|
15
|
-
readonly is: "
|
|
16
|
-
readonly default: "
|
|
15
|
+
readonly is: "video" | "image";
|
|
16
|
+
readonly default: "video" | "image";
|
|
17
17
|
};
|
|
18
18
|
export declare const HERO_MEDIA_PART_TYPES: ReadonlySet<string>;
|
|
19
19
|
export declare function inPart<F extends object>(part: HeroMediaPart, field: F): F;
|
|
@@ -94,6 +94,7 @@ export type StyledPartEl = PartEl & {
|
|
|
94
94
|
style: Record<string, string>;
|
|
95
95
|
readonly parentElement: StyledPartEl | null;
|
|
96
96
|
};
|
|
97
|
+
export declare function partLiftRules(holder: string): string[];
|
|
97
98
|
export type StyledPartStamp = {
|
|
98
99
|
element: StyledPartEl;
|
|
99
100
|
partId: string;
|
|
@@ -140,13 +141,21 @@ export type PublishedPartRule = {
|
|
|
140
141
|
textStyle?: string;
|
|
141
142
|
declarations: Record<string, string>;
|
|
142
143
|
phone?: Record<string, string>;
|
|
144
|
+
motion?: PublishedPartMotion;
|
|
145
|
+
};
|
|
146
|
+
export type PublishedPartMotion = {
|
|
147
|
+
hover: string;
|
|
148
|
+
entrance: {
|
|
149
|
+
desktop: unknown;
|
|
150
|
+
phone: unknown;
|
|
151
|
+
} | null;
|
|
143
152
|
};
|
|
144
153
|
export type PublishedPartSheet = {
|
|
145
154
|
rules: ReadonlyMap<string, PublishedPartRule>;
|
|
146
155
|
kindRules: ReadonlyMap<string, PublishedPartRule>;
|
|
147
156
|
drawn: ReadonlySet<string>;
|
|
148
157
|
};
|
|
149
|
-
export declare function publishedPartStyles(needles: readonly PartNeedle[], styles: PartStyles, scope: string, styleKeyOf?: (partKey: string) => string, drawsStyle?: (partKey: string) => boolean): PublishedPartSheet | null;
|
|
158
|
+
export declare function publishedPartStyles(needles: readonly PartNeedle[], styles: PartStyles, scope: string, styleKeyOf?: (partKey: string) => string, drawsStyle?: (partKey: string) => boolean, motionOf?: (styleKey: string) => PublishedPartMotion | null, motionKeys?: readonly string[]): PublishedPartSheet | null;
|
|
150
159
|
export declare function isPartKindKey(key: string): boolean;
|
|
151
160
|
export declare function partRuleForKind(sheet: PublishedPartSheet | null, kind: string): PublishedPartRule | null;
|
|
152
161
|
export declare function partStyleCss(sheet: PublishedPartSheet): string;
|