efficient-web-builder 48.1.1 → 48.3.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 +26 -0
- package/dist/editor/components/HoverEffectField.js +1 -1
- package/dist/editor/lib/animation/AnimationDurationRow.d.ts +3 -0
- package/dist/editor/lib/animation/AnimationDurationRow.js +1 -1
- package/dist/editor/lib/animation/fields.d.ts +2 -2
- package/dist/editor/lib/animation/fields.js +1 -1
- package/dist/editor/lib/animation/hover-fields.d.ts +2 -0
- package/dist/editor/lib/animation/hover-fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroSlide/fields.js +1 -1
- package/dist/editor/lib/document/blocks/hero-shared-fields.d.ts +15 -0
- package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -0
- package/dist/editor/lib/document/controls.d.ts +1 -1
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/editor/lib/sections/city-presets.d.ts +1 -1
- package/dist/editor/lib/sections/city-presets.js +1 -1
- package/dist/editor/lib/sections/text-layouts.d.ts +1 -1
- package/dist/editor/lib/sections/text-layouts.js +1 -1
- package/dist/format/lib/animation/hover.d.ts +32 -2
- package/dist/format/lib/animation/hover.js +1 -1
- package/dist/format/lib/content/block-sources.js +1 -1
- package/dist/format/lib/content/box-separator.js +1 -1
- package/dist/format/lib/content/box-shape.d.ts +1 -1
- package/dist/format/lib/content/box-shape.js +1 -1
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/document/passes/types.d.ts +1 -1
- package/dist/format/lib/document/section-catalog.js +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +6 -1
- package/dist/format/lib/editor-words-catalogue.js +4 -4
- package/dist/format/lib/global-registry.d.ts +1 -0
- package/dist/format/lib/global-registry.js +1 -0
- package/dist/format/lib/links/link-href-rewrites.d.ts +10 -0
- package/dist/format/lib/links/link-href-rewrites.js +1 -0
- package/dist/format/lib/sections/hero-overlay.d.ts +8 -0
- package/dist/format/lib/sections/hero-overlay.js +1 -1
- package/dist/format/lib/sections/hero-single-to-hero.d.ts +7 -0
- package/dist/format/lib/sections/hero-single-to-hero.js +1 -0
- package/dist/render/components/Btn.d.ts +2 -0
- package/dist/render/components/Btn.js +1 -1
- package/dist/render/components/ButtonBlock.d.ts +1 -0
- package/dist/render/components/ButtonBlock.js +1 -1
- package/dist/render/components/CardRowContext.d.ts +2 -1
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/Flex.d.ts +2 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/HeroPictures.d.ts +63 -0
- package/dist/render/components/HeroPictures.js +1 -0
- package/dist/render/components/HeroSection.js +1 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/HeroSlide.d.ts +15 -1
- package/dist/render/components/HeroSlide.js +1 -1
- package/dist/render/components/InBoxContext.d.ts +2 -0
- package/dist/render/components/InBoxContext.js +1 -1
- package/dist/render/components/SiteGutterFrame.d.ts +3 -1
- package/dist/render/components/SiteGutterFrame.js +1 -1
- package/dist/render/lib/document/blocks/general/ButtonBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +10 -1
- 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-editorial.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-head.d.ts +8 -2
- package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/passes/section-animation.js +1 -1
- package/dist/render/lib/sections/section-to-box.d.ts +3 -1
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/dist/render/lib/site-runtime.d.ts +3 -1
- package/dist/render/lib/site-runtime.js +1 -1
- package/package.json +1 -1
|
@@ -8,3 +8,11 @@ export declare const OVERLAY_POSITION_OPTIONS: readonly {
|
|
|
8
8
|
}[];
|
|
9
9
|
export declare function parseOverlayPosition(value: unknown): OverlayPosition;
|
|
10
10
|
export declare function overlayGradient(color?: string, at?: unknown): string;
|
|
11
|
+
export declare function slideOverlayState(values: {
|
|
12
|
+
overlayColor?: unknown;
|
|
13
|
+
overlayPosition?: unknown;
|
|
14
|
+
}, textureColor?: unknown): {
|
|
15
|
+
own: boolean;
|
|
16
|
+
color: string;
|
|
17
|
+
position: OverlayPosition | null;
|
|
18
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hexToRgb as
|
|
1
|
+
import{hexToRgb as s}from"efficient-shell/format";import{parseOption as m}from"../parse-option.js";import{DEFAULT_TINT as e}from"../content/tint.js";import{nonEmptyString as l}from"../non-empty-string.js";const c="bottom",_=e,f=[{label:"Bottom",value:"bottom",cell:"bottom"},{label:"Top",value:"top",cell:"top"},{label:"Left",value:"left",cell:"left"},{label:"Right",value:"right",cell:"right"}],T={bottom:180,top:0,left:270,right:90},b=[[.55,0],[.15,18],[null,35],[null,55],[.85,100]],g=[[null,33],[.6,67],[.94,100]];function L(o,n){const{r:t,g:r,b:i}=s(o)??s(e);return`rgba(${t},${r},${i},${n})`}function a(o){return m(f,c,o)}function I(o=e,n=c){const t=a(n),u=(t==="top"||t==="bottom"?b:g).map(([p,O])=>`${p===null?"transparent":L(o,p)} ${O}%`);return`linear-gradient(${T[t]}deg, ${u.join(", ")})`}function R(o,n){const t=l(o.overlayColor),r=l(o.overlayPosition);return!t&&!r?{own:!1,color:l(n)??e,position:null}:{own:!0,color:t??e,position:a(r)}}export{_ as DEFAULT_OVERLAY_COLOR,c as DEFAULT_OVERLAY_POSITION,f as OVERLAY_POSITION_OPTIONS,I as overlayGradient,a as parseOverlayPosition,R as slideOverlayState};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Carried, Dropped, SectionNode } from "../../../render/lib/sections/section-to-box.js";
|
|
2
|
+
export type HeroConversion = {
|
|
3
|
+
node: SectionNode;
|
|
4
|
+
carried: Carried[];
|
|
5
|
+
dropped: Dropped[];
|
|
6
|
+
};
|
|
7
|
+
export declare function heroSingleToHero(old: SectionNode): HeroConversion;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DEFAULT_TINT as m}from"../content/tint.js";import{finiteNumber as u}from"../finite-number.js";import{nonEmptyString as s}from"../non-empty-string.js";import{DEFAULT_OVERLAY_POSITION as v}from"./hero-overlay.js";import{normaliseVideoSource as f}from"../hero-video.js";const g=50,l=["mediaImage","mediaVideo","poster","imageFocal","imageFocalPhone","tintColor","mediaLayout","mediaLayoutPhone","mediaImage2","imageFocal2","imageFocal2Phone","tintColor2","tintOpacity2","videoSource","youtubeUrl","videoPlayback","_partMotion"],p=["heightDesktop","heightMobile"],d={eyebrow:"the single Hero stopped drawing its own copy on 2026-09-09 (owner: delete the old text); the words are blocks in its boxes, which the slide keeps",titleTop:"the single Hero stopped drawing its own copy on 2026-09-09 (owner: delete the old text); the words are blocks in its boxes, which the slide keeps",titleLevel:"it set the level of the copy the single Hero stopped drawing on 2026-09-09; a Text block in a box sets its own level",alignment:"its row was deleted on 2026-09-09 with the copy it placed; a box places itself on nine anchors, and the value was drawn by nothing"};function x(y){const e=y.props,n=s(e.id)??"HeroSingle",i=[],a=[],t={id:`${n}~slide`},r={id:`${n}~hero`};t.mediaType=e.mediaType==="video"?"video":"image","mediaType"in e&&i.push({key:"mediaType",home:"HeroSlide.mediaType"}),t.mediaType==="video"&&f(e.videoSource)==="upload"&&(t.videoSpeed=g);for(const o of l)o in e&&(t[o]=e[o],i.push({key:o,home:`HeroSlide.${o}`}));"tintOpacity"in e&&(t.overlay=e.tintOpacity,i.push({key:"tintOpacity",home:"HeroSlide.overlay (Image tint)"})),t.overlayColor=s(e.overlayColor)??m,t.overlayPosition=s(e.overlayPosition)??v,"overlayColor"in e&&i.push({key:"overlayColor",home:"HeroSlide.overlayColor"}),"overlayPosition"in e&&i.push({key:"overlayPosition",home:"HeroSlide.overlayPosition"}),Array.isArray(e.boxes)?(t.groups=e.boxes,i.push({key:"boxes",home:"HeroSlide.groups (the same HeroGroup boxes)"})):"boxes"in e&&i.push({key:"boxes",home:"HeroSlide.groups (none stored)"}),r.textureOpacity=u(e.overlay)??100,"overlay"in e&&i.push({key:"overlay",home:"Hero.textureOpacity (the ramp's opacity)"}),r.showTicker=!1;for(const o of p)o in e&&(r[o]=e[o],i.push({key:o,home:`Hero.${o}`}));const h=new Set(["id","mediaType","tintOpacity","overlay","overlayColor","overlayPosition","boxes",...l,...p]);for(const[o,c]of Object.entries(e))if(!h.has(o)){if(o in d){a.push({key:o,why:d[o]});continue}r[o]=c,i.push({key:o,home:`Hero.${o} (section pass)`})}return r.slides=[{type:"HeroSlide",props:t}],{node:{type:"Hero",props:r},carried:i,dropped:a}}export{x as heroSingleToHero};
|
|
@@ -12,12 +12,14 @@ interface CommonProps {
|
|
|
12
12
|
interface LinkProps extends CommonProps {
|
|
13
13
|
href: string;
|
|
14
14
|
newTab?: boolean;
|
|
15
|
+
hrefRewrite?: string;
|
|
15
16
|
type?: never;
|
|
16
17
|
onClick?: never;
|
|
17
18
|
}
|
|
18
19
|
interface ButtonProps extends CommonProps, Omit<ComponentPropsWithoutRef<"button">, keyof CommonProps> {
|
|
19
20
|
href?: undefined;
|
|
20
21
|
newTab?: undefined;
|
|
22
|
+
hrefRewrite?: undefined;
|
|
21
23
|
}
|
|
22
24
|
type Props = LinkProps | ButtonProps;
|
|
23
25
|
export default function Btn(props: Props): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r,Fragment as
|
|
1
|
+
import{jsx as r,Fragment as l,jsxs as c}from"react/jsx-runtime";import{SiteLink as y}from"../lib/site-runtime.js";import{BUTTON_PAD_CLASSES as j}from"../lib/content/button-look.js";const p=`sf-button group inline-flex items-center justify-center gap-2.5 border ${j} font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.2em] transition-colors`,b={primary:"border-btn bg-btn text-btn-ink hover:border-btn-2 hover:bg-btn-2",ghost:"border-current bg-transparent hover:bg-white/10"};function N(h){const{variant:m="primary",arrow:e,glyphBefore:f,spread:u,className:d,style:t,children:n,href:a,newTab:g,hrefRewrite:s,...x}=h,i=`${u?p.replace("justify-center","justify-between").replace("gap-2.5","gap-6"):p} ${b[m]??b.primary} ${d??""}`,o=f?c(l,{children:[e!==null&&r("span",{"aria-hidden":!0,className:"inline-flex",children:e??"→"}),n]}):c(l,{children:[n,e!==null&&r("span",{"aria-hidden":!0,className:"transition-transform group-hover:translate-x-[3px]",children:e??"→"})]});return a?r(y,{href:a,className:i,style:t,...g?{target:"_blank",rel:"noopener noreferrer"}:{},...s?{hrefRewrite:s}:{},children:o}):r("button",{type:"button",className:i,style:t,...x,children:o})}export{N as default};
|
|
@@ -28,6 +28,7 @@ interface ButtonBlockProps {
|
|
|
28
28
|
buttonPaddingLeftPhone?: number;
|
|
29
29
|
buttonCorners?: number;
|
|
30
30
|
buttonCornerSides?: string[];
|
|
31
|
+
hrefRewrite?: string;
|
|
31
32
|
}
|
|
32
33
|
export default function ButtonBlock(props: ButtonBlockProps): import("react").JSX.Element;
|
|
33
34
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import{buttonArrowShown as
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{buttonArrowShown as L}from"../../format/lib/content/button-arrow.js";import{buttonIconAtEnd as N,buttonIconSide as T,buttonWidthClass as j,storedButtonIcon as _}from"../../format/lib/content/button-icon.js";import{buttonCornersStyle as v,buttonPadAttrs as O,buttonPaint as R}from"../lib/content/button-look.js";import{ArrowLongRightIcon as F,ArrowRightIcon as G,ArrowUpRightIcon as U,BagIcon as $,CarIcon as E,CartIcon as K,ChevronRightIcon as Y,DownloadIcon as z,EmailIcon as D,ExternalIcon as H,LocationIcon as J,PlayIcon as W,SearchIcon as q,TagIcon as M}from"efficient-shell/icons/efficient";import Q from"./BlockFrame.js";import V from"./Btn.js";import{renderGold as X}from"./goldPhrases.js";import{alignPhoneClass as b,BLOCK_ALIGN_JUSTIFY as Z}from"../../format/lib/content/block-align.js";const oo="sf-button-block",to={"arrow-right":G,"arrow-long-right":F,"arrow-up-right":U,"chevron-right":Y,external:H,cart:K,bag:$,tag:M,email:D,location:J,play:W,download:z,search:q,car:E};function no(o){const{label:p,href:c,variant:i,align:a,alignPhone:s,contained:I,arrow:C,icon:y,iconPosition:l,widthFit:d,widthFitPhone:B,buttonColor:t,buttonTextColor:h,hrefRewrite:m}=o,n=_(y),u=n&&n!=="none"?to[n]:void 0,P=n===void 0?L(C)?{}:{arrow:null}:u?{arrow:r(u,{size:16}),...T(l)==="before"?{glyphBefore:!0}:{}}:{arrow:null},f=O(o),g=[j(d,B),f?.className??""].filter(Boolean).join(" "),x=g?{className:g}:{},A=N(l,d)?{spread:!0}:{},e=R(o),S=e?e.background==="transparent"?"ghost":"primary":i,w={...e??(t?i==="ghost"?{borderColor:t}:{background:t,borderColor:t}:{}),...h?{color:h}:{},...f?.style??{},...v(o)??{}},k=Object.keys(w).length?{style:w}:{};return r(Q,{contained:I,className:`${oo} py-4`,children:r("div",{className:`flex ${Z[a]}${b("justify",a,s)?` ${b("justify",a,s)}`:""}`,children:r(V,{href:c||"#",variant:S,...x,...A,...P,...k,...c&&m?{hrefRewrite:m}:{},children:X(p)})})})}export{oo as BUTTON_BLOCK_CLASS,no as default};
|
|
@@ -21,7 +21,8 @@ type CardTemplateRowsProps = {
|
|
|
21
21
|
rows: readonly SourceRow[];
|
|
22
22
|
items?: readonly unknown[];
|
|
23
23
|
fallback: ReactNode;
|
|
24
|
+
wrapCopy?: (copy: ReactNode, row: CardRow) => ReactNode;
|
|
24
25
|
children: (cards: ReactNode) => ReactNode;
|
|
25
26
|
};
|
|
26
|
-
export declare function CardTemplateRows({ ownerId, ownerType, Template, rows, items, fallback, children }: CardTemplateRowsProps): import("react").JSX.Element;
|
|
27
|
+
export declare function CardTemplateRows({ ownerId, ownerType, Template, rows, items, fallback, wrapCopy, children }: CardTemplateRowsProps): import("react").JSX.Element;
|
|
27
28
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Fragment as i,jsx as r}from"react/jsx-runtime";import{createContext as p,useContext as
|
|
1
|
+
"use client";import{Fragment as i,jsx as r}from"react/jsx-runtime";import{createContext as p,useContext as m}from"react";import{REPEAT_ATTRIBUTE as C,REPEAT_INDEX_ATTRIBUTE as _}from"efficient-easel/draw";import{CARD_TEMPLATE_SLOT as w,rowFilledProps as x}from"../../format/lib/content/card-template.js";const s=p(null);function D(){return m(s)}function F({type:e,props:c,children:t}){const o=m(s);return r(i,{children:t(x(e,c,o?.row),o)})}function I({ownerId:e,ownerType:c,Template:t,rows:o,items:d,fallback:T,wrapCopy:u,children:E}){if(!t||(t.blockCount??0)<=0)return r(i,{children:T});const R=o.map((f,n)=>{const a={row:f,index:n,ownerType:c,item:d?.[n]},l=r("div",{[C]:`${e}:${w}`,[_]:n,children:r(t,{})});return r(s.Provider,{value:a,children:u?u(l,a):l},n)});return r(i,{children:E(R)})}export{s as CardRowContext,F as CardRowDrawn,I as CardTemplateRows,D as useCardRow};
|
|
@@ -48,7 +48,8 @@ interface FlexProps {
|
|
|
48
48
|
boxShapePhone?: unknown;
|
|
49
49
|
jumpHighlight?: unknown;
|
|
50
50
|
anchor?: unknown;
|
|
51
|
+
boxId?: string;
|
|
51
52
|
content: SlotComponent;
|
|
52
53
|
}
|
|
53
|
-
export default function Flex({ direction, label, tabShape, gap, gapPhone, gapTablet, justify, align, wrap, share, sharePhone, wrapPhone, phoneRow, columns, columnsTablet, separator, blockSpacing, bgImage, bgImagePhone, darken, darkenStyle, placement, padV2, border, borderPhone, pad, contained, fillHeight, shadow, loop, scrollDirection, loopSeconds, loopDelay, editing, fillColor, line, upcoming, link, boxShape, boxShapePhone, jumpHighlight, anchor, content: Content, }: FlexProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
|
|
54
|
+
export default function Flex({ direction, label, tabShape, gap, gapPhone, gapTablet, justify, align, wrap, share, sharePhone, wrapPhone, phoneRow, columns, columnsTablet, separator, blockSpacing, bgImage, bgImagePhone, darken, darkenStyle, placement, padV2, border, borderPhone, pad, contained, fillHeight, shadow, loop, scrollDirection, loopSeconds, loopDelay, editing, fillColor, line, upcoming, link, boxShape, boxShapePhone, jumpHighlight, anchor, boxId, content: Content, }: FlexProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
|
|
54
55
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as
|
|
1
|
+
import{Fragment as X,jsx as e,jsxs as Po}from"react/jsx-runtime";import{useId as fs}from"react";import{parseHexColor as ds}from"efficient-shell/format";import bs from"./BoxTabs.js";import{BoxTabPaneContext as ps,useIsTabPane as Ss}from"./BoxTabPaneContext.js";import{CellFillContext as xs,InBoxContext as Cs,useCellOfStretchedRow as $s,useFillsCell as hs}from"./InBoxContext.js";import _s,{InsideSiteColumn as Lo,useSectionRoot as Ps}from"./SiteGutterFrame.js";import{BoxSurfaceProvider as Ls}from"./BoxSurfaceContext.js";import{BoxCellWidthContext as ys}from"./BoxCellWidthContext.js";import{useInSiteHeader as As}from"./PhoneMenuTools.js";import{FRAME_BASE as j,FRAME_GUTTER as M}from"./BlockFrame.js";import{containerGapProps as Bs}from"../../format/lib/content/container-gap.js";import{boxLayoutClasses as Ts,boxBlockSpacingClass as Rs,boxFitContentClass as gs,boxRowColumnsClass as Os,boxRowTabletColumnsClass as Es,boxPhoneRowClasses as x,boxPhoneRowFits as Ns,boxShareClasses as z,boxWrapClass as vs}from"../../format/lib/content/box-layout.js";import{boxSeparatorClasses as ws,boxSeparatorSeamClass as Fs,boxSeparatorStyle as ks,isStripBox as Ds}from"../../format/lib/content/box-separator.js";import{DEFAULT_LOOP_DELAY as Is,DEFAULT_LOOP_DIRECTION as Us,DEFAULT_LOOP_SECONDS as Ws,isVerticalLoop as Xs}from"../../format/lib/animation/index.js";import{LoopTrack as js}from"../lib/animation/LoopTrack.js";import{BOX_CARD_PAD as r,BOX_OWNS_SIDES_CLASS as Ms,boxDarkenStyle as zs,boxPlacementClasses as Gs,CARD_SHADOW_CLASS as Hs,isBackgroundBox as yo}from"../../format/lib/content/box-background.js";import{boxShadowAttrs as Js}from"../../format/lib/content/box-shadow.js";import{boxRunsEdgeToEdge as Ks}from"../../format/lib/content/site-gutter.js";import{boxShapeClass as Ys,boxShapeClasses as Vs}from"../../format/lib/content/box-shape.js";import{BOX_JUMP_ATTR as qs,BOX_LINK_ATTR as Ao,BOX_LINK_CLASS as Bo,BOX_LINKED_CLASS as Qs,boxJumpBlocksClass as Zs,boxJumpCss as oe,boxJumpSlug as se,boxLinkOf as ee}from"../../format/lib/content/box-link.js";import{SiteLink as te}from"../lib/site-runtime.js";import{sectionBorderStyle as ne}from"../../format/lib/content/borders.js";import{finiteNumber as a}from"../../format/lib/finite-number.js";import{sectionPadAttrs as le}from"../lib/content/section-padding.js";import{SECTION_FILL_CLASS as T}from"../../format/lib/content/section-min-height.js";import{ON_MEDIA_INK_STYLE as re}from"../../format/lib/content/ink.js";import{sizedBackground as G}from"../../format/lib/sized-image.js";import{BoxRail as ae,BoxRailStop as ce,RAIL_STOPS_CLASS as me,useTimelineRail as ie}from"./TimelineRail.js";const H={"--sf-site-gutter":"0px"},ue="bg-cover bg-center bg-[image:var(--sf-box-bg)] max-[720px]:bg-[image:var(--sf-box-bg-p)]";function fe({children:s}){return e(X,{children:s(fs())})}function de({direction:s,label:To,tabShape:Ro,gap:go,gapPhone:Oo,gapTablet:Eo,justify:R,align:d,wrap:No,share:C,sharePhone:g,wrapPhone:vo,phoneRow:$,columns:J,columnsTablet:wo,separator:i,blockSpacing:Fo,bgImage:h,bgImagePhone:K,darken:ko,darkenStyle:Do,placement:Io,padV2:Uo=!1,border:Wo,borderPhone:Xo,pad:n={},contained:Y=!0,fillHeight:u=!1,shadow:jo,loop:_,scrollDirection:O=Us,loopSeconds:Mo=Ws,loopDelay:zo=Is,editing:V=!1,fillColor:q,line:E,upcoming:Go,link:Ho,boxShape:Q,boxShapePhone:Jo,jumpHighlight:Ko,anchor:Yo,boxId:Z,content:N}){const b=V?"":ee(Ho),c=u?"":Vs(Q,Jo),Vo=!u&&Ys(Q)!=="",f=se(Ko,Yo),oo=typeof q=="string"?ds(q.trim()):null,so=oo?{backgroundColor:oo}:void 0,eo=ie(),v=E===!0&&s!=="tabs",t=yo(h),P=As(),qo=Ps(),to=Ss(),w=hs(),Qo=$s(),L=Ds(s,i),m=_==="scroll"&&s!=="tabs",y=Os({direction:s,separator:i,loop:_,line:E,columns:J}),F=Es({direction:s,separator:i,loop:_,line:E,columnsTablet:wo}),no=[z(C),s==="row"?gs(C):"",y,F,Rs(Fo),ws(s,i)].filter(Boolean).join(" "),Zo=no?` ${no}`:"",lo=["flex",s==="row"?L||m?"flex-row":`flex-row ${x($,g,vo)}`:"flex-col",vs(m?!1:No),t?Gs(Io??"center",s):Ts(m?void 0:R,d)].join(" ")+Zo,p=u||t||c||w?` ${T}`:"",k=Vo?` ${c}`:c?`${p} ${c}`:p,ro=Qo&&s==="column"&&!t&&!m&&z(C)===""&&typeof R=="string"&&R!=="start",ao=p||(ro?` ${T}`:""),D=b?` ${Qs}`:"",I=t||P||Uo?"":" py-6",os=`${j}${I} ${M}${k}${D}`,ss=P?`${k}${D}`.trim():`w-full${I}${k}${D}`,S=Bs("Flex",go,s==="row"?"inline":"block",Oo,L||m?void 0:Eo),es=L?{...S.style,...ks(s,i)}:S.style,co=(o="")=>e(N,{className:`${lo}${S.className}${ao}${o?` ${o}`:""}${v?` ${me}`:""}${f?` ${Zs(f)}`:""}`,style:es,minEmptyHeight:120}),mo=Xs(O)?"":Fs(s,i),io=m?e(js,{direction:O,seconds:Mo,delay:zo,editing:V,copy:o=>co(o&&mo?`${o} ${mo}`:o)}):co(),uo=s==="tabs"?e(bs,{className:`${lo}${S.className}${w&&!u&&!t&&!c?"":p}`,style:S.style,shape:Ro,children:io}):io,ts=to?e(ps.Provider,{value:!1,children:uo}):uo,ns={stretchedRow:s==="row"&&!t&&(d===void 0||d==="stretch"),fillingColumn:s==="column"&&(w||ro),columnsRow:y!==""||F!=="",...Z?{id:Z}:null},fo=e(Cs.Provider,{value:ns,children:e(xs.Provider,{value:!1,children:ts})}),U=v?e(ae,{row:s==="row",stops:N.blockCount??0,children:fo}):fo,ls=To?.trim()||(to?"":void 0),rs={values:n,frame:I?24:0},as=o=>eo?e(ce,{on:eo,future:Go===!0,children:o}):o,cs=o=>b.startsWith("/")?e(te,{href:b,className:Bo,"aria-labelledby":o,[Ao]:""}):e("a",{href:b,className:Bo,"aria-labelledby":o,[Ao]:""}),bo=f?e("style",{dangerouslySetInnerHTML:{__html:oe(f)}}):null,ms=o=>({...t?null:Js(jo),...f?{[qs]:f}:null,...o?{id:o}:null}),po=y!==""?Number(J):0,is=x($,g)===x(void 0),us=(s==="column"||s==="row"&&!L&&!m&&(po===1&&is||po===0&&N.blockCount===1))&&!t&&!v&&!P,A=Ks({loop:_,direction:s,scrollDirection:O,bgImage:h}),So=t&&qo&&!P,xo=(o,l)=>as(e(_s,{contained:Y&&!A,style:A?H:void 0,framedClass:os,fillClass:ss,columnClass:`${j} ${M}${ao}`,tabLabel:ls,pad:t?void 0:rs,border:ne(Wo,Xo),outerAttrs:ms(l),box:!0,edge:us,outerStyle:t?void 0:so,bleed:So,children:bo||l?Po(X,{children:[bo,l?cs(l):null,A?e(Lo,{children:o}):o]}):A?e(Lo,{children:o}):o})),Co=o=>b?e(fe,{children:l=>xo(o,l)}):xo(o);if(!t){const o=d===void 0||d==="stretch",l=(z(C)!==""||y!==""||F!=="")&&!Ns($,g)&&(o||x($)!==x(void 0));return Co((s==="row"?l:s==="column"&&o)?e(ys.Provider,{value:!0,children:U}):U)}const B=zs(ko,Do),$o=yo(K),W=le({...n,top:a(n.top)??r.desktop,bottom:a(n.bottom)??r.desktop,topPhone:a(n.topPhone)??r.phone,bottomPhone:a(n.bottomPhone)??r.phone,left:a(n.left)??r.side,right:a(n.right)??r.side,leftPhone:a(n.leftPhone)??r.sidePhone,rightPhone:a(n.rightPhone)??r.sidePhone}),ho=e("div",{className:`relative z-[1] ${Ms} ${W?.className??""}${u||c?` ${T}`:""}`.trimEnd(),style:B?{...W?.style,...H,...re}:{...W?.style,...H},children:U}),_o=So&&Y?e("div",{className:`${j} ${M}${u||c?` ${T}`:""}`,children:ho}):ho;return Co(e(X,{children:Po("div",{className:`relative isolate overflow-hidden ${Hs}${p}${$o?` ${ue}`:""}`,style:{...so,...$o?{"--sf-box-bg":G(h??""),"--sf-box-bg-p":G(K??"")}:{backgroundImage:G(h??""),backgroundSize:"cover",backgroundPosition:"center"}},children:[B&&e("div",{className:"absolute inset-0 z-0",style:B,"aria-hidden":!0}),B?e(Ls,{children:_o}):_o]})}))}export{de as default};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type HeroMediaPart } from "../lib/document/hero-media-parts.js";
|
|
3
|
+
import { entranceDrawn } from "../lib/animation/entrance.js";
|
|
4
|
+
import { type MediaLayout } from "../../format/lib/hero-media-layout.js";
|
|
5
|
+
export declare function heroMediaReading(p: {
|
|
6
|
+
isVideo: boolean;
|
|
7
|
+
videoSource?: unknown;
|
|
8
|
+
videoPlayback?: unknown;
|
|
9
|
+
youtubeUrl?: unknown;
|
|
10
|
+
mediaLayout?: unknown;
|
|
11
|
+
mediaLayoutPhone?: unknown;
|
|
12
|
+
}): {
|
|
13
|
+
fromYouTube: boolean;
|
|
14
|
+
onClick: boolean;
|
|
15
|
+
youTubeId: string | null;
|
|
16
|
+
backgroundFile: boolean;
|
|
17
|
+
desktopLayout: "side" | "one" | "stacked";
|
|
18
|
+
phoneLayout: "side" | "one" | "stacked";
|
|
19
|
+
twoPictures: boolean;
|
|
20
|
+
};
|
|
21
|
+
export declare function heroPartEntrance(partMotion: Record<string, unknown> | undefined, part: HeroMediaPart): {
|
|
22
|
+
desktop: import("efficient-shell/ui").EntranceValue;
|
|
23
|
+
phone: import("efficient-shell/ui").EntranceValue;
|
|
24
|
+
} | null;
|
|
25
|
+
export declare function HeroTint({ color, opacity, passClicks }: {
|
|
26
|
+
color: string;
|
|
27
|
+
opacity: number;
|
|
28
|
+
passClicks?: boolean;
|
|
29
|
+
}): import("react").JSX.Element | null;
|
|
30
|
+
export declare function HeroPickArea({ part, editing, marked, entrance, className, children, }: {
|
|
31
|
+
part: HeroMediaPart;
|
|
32
|
+
editing: boolean;
|
|
33
|
+
marked?: boolean;
|
|
34
|
+
entrance: ReturnType<typeof entranceDrawn>;
|
|
35
|
+
className: string;
|
|
36
|
+
children: ReactNode;
|
|
37
|
+
}): import("react").JSX.Element;
|
|
38
|
+
export declare function HeroMediaLayer({ partMotion, editing, children, }: {
|
|
39
|
+
partMotion: Record<string, unknown> | undefined;
|
|
40
|
+
editing: boolean;
|
|
41
|
+
children: ReactNode;
|
|
42
|
+
}): import("react").JSX.Element;
|
|
43
|
+
export declare function HeroTwoPictures({ desktopLayout, phoneLayout, editing, marked, partMotion, first, second, }: {
|
|
44
|
+
desktopLayout: MediaLayout;
|
|
45
|
+
phoneLayout: MediaLayout;
|
|
46
|
+
editing: boolean;
|
|
47
|
+
marked?: boolean;
|
|
48
|
+
partMotion: Record<string, unknown> | undefined;
|
|
49
|
+
first: {
|
|
50
|
+
src?: string;
|
|
51
|
+
objectPosition?: string;
|
|
52
|
+
objectPositionPhone?: string;
|
|
53
|
+
tintColor: string;
|
|
54
|
+
tintOpacity: number;
|
|
55
|
+
};
|
|
56
|
+
second: {
|
|
57
|
+
src?: string;
|
|
58
|
+
objectPosition?: string;
|
|
59
|
+
objectPositionPhone?: string;
|
|
60
|
+
tintColor: string;
|
|
61
|
+
tintOpacity: number;
|
|
62
|
+
};
|
|
63
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as t,Fragment as h,jsxs as d}from"react/jsx-runtime";import m from"./HeroPoster.js";import{SectionAnimation as l}from"./SectionAnimation.js";import{resolveMedia as u}from"../lib/media.js";import{HERO_PART_ATTR as P}from"../lib/document/hero-media-parts.js";import{entranceDrawn as b}from"../lib/animation/entrance.js";import{readPartMotion as g}from"../lib/animation/part-motion.js";import{heroPictureCount as f,normaliseMediaLayout as y,resolvePhoneLayout as k}from"../../format/lib/hero-media-layout.js";import{normaliseVideoPlayback as w,normaliseVideoSource as j,parseYouTubeId as v}from"../../format/lib/hero-video.js";import{hidableText as T}from"efficient-easel/draw";const V={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"},_={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 E(o){const e=o.isVideo&&j(o.videoSource)==="youtube",i=o.isVideo&&w(o.videoPlayback)==="click",r=e?v(T(o.youtubeUrl)):null,n=y(o.mediaLayout);return{fromYouTube:e,onClick:i,youTubeId:r,backgroundFile:o.isVideo&&!e&&!i,desktopLayout:n,phoneLayout:k(o.mediaLayoutPhone,n),twoPictures:!o.isVideo&&f(o)>1}}function c(o,e){return b(g({_partMotion:o},e))}function p({color:o,opacity:e,passClicks:i=!0}){return e>0?t("div",{className:i?"pointer-events-none absolute inset-0 z-[2]":"absolute inset-0 z-[2]",style:{background:o,opacity:Math.min(Math.max(e,0),100)/100}}):null}function x({part:o,editing:e,marked:i=!0,entrance:r,className:n,children:a}){const s=e&&i?{[P]:o}:void 0;return r?t(l,{desktop:r.desktop,phone:r.phone,editing:e,boxClass:n,boxAttrs:s,children:a}):t("div",{className:n,...s,children:a})}function I({partMotion:o,editing:e,children:i}){const r=c(o,"media");return r?t(l,{desktop:r.desktop,phone:r.phone,editing:e,boxClass:"absolute inset-0 z-[1]",children:i}):t(h,{children:i})}function $({desktopLayout:o,phoneLayout:e,editing:i,marked:r=!0,partMotion:n,first:a,second:s}){return d("div",{className:`absolute inset-0 z-[1] grid ${V[e]} ${_[o]}`,"data-hero-layout":o,"data-hero-layout-phone":e,children:[d(x,{part:"image",editing:i,marked:r,entrance:c(n,"image"),className:"relative overflow-hidden",children:[t(m,{posterSrc:u(a.src),showVideo:!1,objectPosition:a.objectPosition,objectPositionPhone:a.objectPositionPhone}),t(p,{color:a.tintColor,opacity:a.tintOpacity})]}),d(x,{part:"image2",editing:i,marked:r,entrance:c(n,"image2"),className:`relative overflow-hidden${e==="one"?" max-[719px]:hidden":""}${o==="one"?" min-[720px]:hidden":""}`,children:[t(m,{posterSrc:u(s.src),showVideo:!1,objectPosition:s.objectPosition,objectPositionPhone:s.objectPositionPhone}),t(p,{color:s.tintColor,opacity:s.tintOpacity})]})]})}export{I as HeroMediaLayer,x as HeroPickArea,p as HeroTint,$ as HeroTwoPictures,E as heroMediaReading,c as heroPartEntrance};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as n,jsxs as C}from"react/jsx-runtime";import{useCallback as v,useEffect as w,useId as
|
|
1
|
+
"use client";import{jsx as n,jsxs as C}from"react/jsx-runtime";import{useCallback as v,useEffect as w,useId as Re,useRef as u,useState as k}from"react";import{markOverlayPortal as W}from"../../format/lib/document/overlay-portal.js";import Te from"./Ticker.js";import{HeroSlideStyleContext as Oe}from"./HeroSlide.js";import He from"./HeroArrows.js";import Ae from"./Reel.js";import{TICKER_PART_ATTR as Le}from"./PreviewTickerContext.js";import{useReducedMotion as Me}from"./useReducedMotion.js";import{hasSectionHeight as Ne,resolveSectionHeight as Z}from"../../format/lib/content/section-height.js";import{HEADER_HEIGHT_CSS as Ce}from"../lib/document/header-clearance.js";import{nextReel as Pe,normaliseHeroReelShape as Ie,reelShown as De}from"../../format/lib/reel.js";import{arrowsShown as Ve,arrowStep as $e}from"../../format/lib/hero-arrows.js";import{swipeEnabled as ze,swipeStep as Xe}from"../../format/lib/hero-swipe.js";import{videoControlShown as Ge,videoHeld as je}from"../../format/lib/hero-video-control.js";import{HERO_SLIDER_GOTO_EVENT as P}from"efficient-easel/draw";import{say as ee}from"../../format/lib/editor-words.js";import{markedChildren as te}from"../../format/lib/marked-children.js";import{DEFAULT_TICKER_ITEMS as Be,TICKER_MOTION_PART as Ye}from"../../format/lib/hero-ticker.js";import{SectionAnimation as qe}from"./SectionAnimation.js";import{entranceDrawn as Fe}from"../lib/animation/entrance.js";import{readPartMotion as Ke}from"../lib/animation/part-motion.js";import{scrim as Ue}from"../../format/lib/content/scrim.js";const Je="Play video",Qe="Hold video",We="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",Ze=()=>ee("item"),re=new Map;function et(d,a){const i=d?.ownerDocument?.defaultView;if(i)return i.addEventListener(P,a),()=>i.removeEventListener(P,a)}function tt({slides:d,alignment:a,textureOpacity:i,showTexture:y,textureColor:E,phoneUpDown:_,phoneSideways:oe,autoplay:I,autoplayInterval:O,showTicker:ne,tickerItems:se,heightDesktop:D,heightMobile:V,showPicker:ce,pickerShape:ae,pickerPlacement:ie,showArrows:le,arrowsShape:ue,arrowsPlacement:de,editing:s,partMotion:me}){const $=Ne(D,V),fe=$?"h-[var(--sf-hero-h-m)] min-[720px]:h-[var(--sf-hero-h-d)]":"h-screen min-h-[680px]",he=$?{"--sf-hero-h-d":Z(D),"--sf-hero-h-m":Z(V)}:void 0,z=(se??Be.map(e=>({text:e}))).map(e=>e?.text?.trim()?e.text:s?Ze():"").filter(Boolean),pe=ne!==!1,ve=Fe(Ke({_partMotion:me},Ye)),m=u(null),X=u(null),G=u(null),j=u(null),B=Re(),H=u(B),[g,xe]=k([]),[be,Y]=k(0),x=u(0),[q,F]=k(!1),[K,we]=k(!1),[S,ke]=k(!1),A=Me(),R=v(()=>m.current?.querySelector(".hero-track")??null,[]),l=v((e,t=!1)=>{Y(e),x.current=e,re.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=re.get(t);typeof r=="number"&&(Y(r),x.current=r)},[]),w(()=>{const e=R();if(!e)return;const t=()=>{xe(o=>Pe(o,te(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()}},[R]),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 et(m.current,e)},[s,l]);const c=g.length,f=Math.min(Math.max(be,0),Math.max(0,c-1)),L=De({shown:ce,count:c}),U=Ve({shown:le,count:c}),J=Ge({editing:s,shown:f,slides:g}),ye=je({editing:s,playing:S,controlShown:J}),T=ze({count:c,editing:s}),h=u(null),b=u(null),Ee=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]),_e=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}},[]),ge=v(()=>{const e=h.current,t=b.current;if(h.current=null,b.current=null,!T||!e||!t)return;const r=Xe(t.x-e.x,t.y-e.y,x.current,c);r!==x.current&&l(r)},[T,c,l]);w(()=>{if(s||!I||q||K||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,K,A,c,f,l]),w(()=>{const e=[X.current,G.current,j.current].filter(Boolean),t=e.map(o=>W(o)),r=o=>{const p=o.target,M=p.closest("[data-hero-nav]"),Q=M??p.closest("[data-idx]");if(!Q)return;o.stopPropagation(),o.preventDefault();const N=M?$e(M.dataset.heroNav,x.current,c):Number(Q.dataset.idx);Number.isNaN(N)||(l(N,s),te(R(),"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,R,s]);const Se=v(e=>{if(!e)return;const t=W(e),r=o=>{o.stopPropagation(),o.preventDefault(),ke(p=>!p)};return e.addEventListener("click",r,{capture:!0}),()=>{t?.(),e.removeEventListener("click",r,{capture:!0})}},[]);return n(Oe.Provider,{value:{alignment:a,textureOpacity:i,textureOn:y,textureColor:E,quietVideo:ye,phoneUpDown:_,phoneSideways:oe,holdReel:()=>we(!0)},children:C("div",{ref:m,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${fe} max-w-[var(--sf-hero-cap,none)] overflow-hidden`,style:he,onMouseEnter:()=>F(!0),onMouseLeave:()=>F(!1),onTouchStart:Ee,onTouchMove:_e,onTouchEnd:ge,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}),J&&n("div",{ref:Se,"data-hero-video-control":S?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${Ce} + 16px)`},children:C("button",{type:"button",className:We,children:[n("span",{"aria-hidden":"true",children:S?"❚❚":"▶"}),ee(S?Qe:Je)]})}),(L||U)&&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(Ae,{ref:X,slides:g,active:f,shape:Ie(ae),placement:ie}),U&&n(He,{ref:j,shape:ue,placement:de})]}),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:g.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))}),pe&&z.length>0&&n(rt,{editing:!!s,entrance:ve,children:n(Te,{items:z,backdrop:"dark-media"})})]})})}function rt({editing:d,entrance:a,children:i}){const y="sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5",E=d?{[Le]:""}:void 0,_={background:Ue(.55)};return a?n(qe,{desktop:a.desktop,phone:a.phone,editing:d,boxClass:y,boxAttrs:E,boxStyle:_,children:i}):n("div",{className:y,...E,style:_,children:i})}export{P as HERO_SLIDER_GOTO_EVENT,Qe as HERO_VIDEO_HOLD_LABEL,Je as HERO_VIDEO_PLAY_LABEL,tt as default,et as subscribeSliderGoto};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as
|
|
1
|
+
"use client";import{jsx as e,jsxs as N}from"react/jsx-runtime";import{useRef as q,useState as J}from"react";import Q from"./HeroPoster.js";import{HeroMediaLayer as W,heroMediaReading as X,HeroPickArea as Z,heroPartEntrance as ee,HeroTint as oe,HeroTwoPictures as re}from"./HeroPictures.js";import{HeroVideoBackdrop as te,HeroVideoPlayer as se}from"./HeroVideoPlay.js";import{resolveMedia as r}from"../lib/media.js";import{hasSectionHeight as ie,resolveSectionHeight as S}from"../../format/lib/content/section-height.js";import{DEFAULT_OVERLAY_POSITION as ne,overlayGradient as ae}from"../../format/lib/sections/hero-overlay.js";import{ON_MEDIA_INK_STYLE as ce}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as a}from"../../format/lib/content/tint.js";function de({overlay:I=100,overlayColor:j=a,overlayPosition:k=ne,mediaType:c="image",mediaSrc:t,poster:d,objectPosition:l,objectPositionPhone:m,tintColor:f=a,tintOpacity:u=0,heightDesktop:h,heightMobile:p,boxes:v,videoSource:E,youtubeUrl:V,videoPlayback:z,mediaLayout:A,mediaLayoutPhone:M,mediaImage2:O,objectPosition2:R,objectPosition2Phone:F,tintColor2:Y=a,tintOpacity2:C=0,editing:o=!1,partMotion:s}){const y=ie(h,p),D=y?"h-[var(--sf-hero-h-m)] min-[720px]:h-[var(--sf-hero-h-d)]":"h-screen min-h-[680px]",U=y?{"--sf-hero-h-d":S(h),"--sf-hero-h-m":S(p)}:void 0,i=c==="video",g=i?r(t):void 0,x=i?r(d):r(t)??r(d),{fromYouTube:b,onClick:w,youTubeId:P,backgroundFile:H,desktopLayout:B,phoneLayout:G,twoPictures:T}=X({isVideo:i,videoSource:E,videoPlayback:z,youtubeUrl:V,mediaLayout:A,mediaLayoutPhone:M}),[_,K]=J(!1),n=!_,$=q(null),L=c==="video"?"media":"image";return N("section",{ref:$,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${D} max-w-[var(--sf-hero-cap,none)] overflow-hidden`,style:U,children:[e(W,{partMotion:s,editing:o,children:T?e(re,{desktopLayout:B,phoneLayout:G,editing:o,partMotion:s,first:{src:t,objectPosition:l,objectPositionPhone:m,tintColor:f,tintOpacity:u},second:{src:O,objectPosition:R,objectPositionPhone:F,tintColor:Y,tintOpacity:C}}):N(Z,{part:L,editing:o,entrance:L==="image"?ee(s,"image"):null,className:"absolute inset-0 z-[1]",children:[e(Q,{videoSrc:H?g:void 0,posterSrc:x,showVideo:H,objectPosition:l,objectPositionPhone:m}),b&&e(te,{youTubeId:P,ownPoster:!!x,background:!w,editing:o})]})}),w&&e(se,{youTubeId:P,fileSrc:b?void 0:g,playing:_,onPlay:()=>K(!0),editing:o}),n&&!T&&e(oe,{color:f,opacity:u}),n&&e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:ae(j,k),opacity:Math.min(Math.max(I,0),100)/100}}),n&&v&&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",o?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:ce,children:e(v,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}export{de as default};
|
|
@@ -9,6 +9,7 @@ export interface HeroSlideStyle {
|
|
|
9
9
|
phoneUpDown?: string;
|
|
10
10
|
phoneSideways?: string;
|
|
11
11
|
quietVideo?: boolean;
|
|
12
|
+
holdReel?: () => void;
|
|
12
13
|
}
|
|
13
14
|
export declare const HeroSlideStyleContext: import("react").Context<HeroSlideStyle>;
|
|
14
15
|
export interface HeroSlideProps {
|
|
@@ -26,6 +27,19 @@ export interface HeroSlideProps {
|
|
|
26
27
|
themeStyle?: CSSProperties;
|
|
27
28
|
groups?: SlotComponent;
|
|
28
29
|
editing?: boolean;
|
|
30
|
+
overlayColor?: string;
|
|
31
|
+
overlayPosition?: string;
|
|
32
|
+
mediaLayout?: string;
|
|
33
|
+
mediaLayoutPhone?: string;
|
|
34
|
+
mediaImage2?: string;
|
|
35
|
+
objectPosition2?: string;
|
|
36
|
+
objectPosition2Phone?: string;
|
|
37
|
+
tintColor2?: string;
|
|
38
|
+
tintOpacity2?: number;
|
|
39
|
+
videoSource?: string;
|
|
40
|
+
youtubeUrl?: string;
|
|
41
|
+
videoPlayback?: string;
|
|
42
|
+
partMotion?: Record<string, unknown>;
|
|
29
43
|
}
|
|
30
|
-
export default function HeroSlide({ name, process, mediaType, mediaSrc, videoSpeed, poster, objectPosition, objectPositionPhone, tintColor, tintOpacity, groups: Groups, editing, themeClassName, themeStyle, }: HeroSlideProps): import("react").JSX.Element;
|
|
44
|
+
export default function HeroSlide({ name, process, mediaType, mediaSrc, videoSpeed, poster, objectPosition, objectPositionPhone, tintColor, tintOpacity, groups: Groups, editing, themeClassName, themeStyle, overlayColor, overlayPosition, mediaLayout, mediaLayoutPhone, mediaImage2, objectPosition2, objectPosition2Phone, tintColor2, tintOpacity2, videoSource, youtubeUrl, videoPlayback, partMotion, }: HeroSlideProps): import("react").JSX.Element;
|
|
31
45
|
export declare const HERO_SLIDE_SEEDS: Record<string, unknown>[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as
|
|
1
|
+
"use client";import{jsx as e,jsxs as _}from"react/jsx-runtime";import{createContext as oe,useContext as te,useState as re}from"react";import ie from"./HeroPoster.js";import{HeroMediaLayer as ae,heroMediaReading as se,HeroPickArea as ne,heroPartEntrance as le,HeroTint as de,HeroTwoPictures as ce}from"./HeroPictures.js";import{HeroVideoBackdrop as ue,HeroVideoPlayer as pe}from"./HeroVideoPlay.js";import{resolveMedia as i}from"../lib/media.js";import{heroPhoneStackStyle as fe}from"../../format/lib/hero-phone-stack.js";import{heroTextureGradient as me,heroTextureShown as ye}from"../../format/lib/hero-texture.js";import{ON_MEDIA_INK_STYLE as he}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as j}from"../../format/lib/content/tint.js";import{overlayGradient as xe,slideOverlayState as ge}from"../../format/lib/sections/hero-overlay.js";const ve=oe({});function be({name:p,process:a,mediaType:I="video",mediaSrc:s,videoSpeed:f,poster:m,objectPosition:y,objectPositionPhone:h,tintColor:x=j,tintOpacity:g=0,groups:v,editing:o=!1,themeClassName:b,themeStyle:N,overlayColor:C,overlayPosition:O,mediaLayout:V,mediaLayoutPhone:D,mediaImage2:R,objectPosition2:z,objectPosition2Phone:A,tintColor2:M=j,tintOpacity2:q=0,videoSource:B,youtubeUrl:F,videoPlayback:U,partMotion:n}){const{alignment:Se="left",textureOpacity:S,textureOn:Y,textureColor:$,quietVideo:G,phoneUpDown:K,phoneSideways:J,holdReel:Q}=te(ve),t=I==="video",l=t?i(s):void 0,w=t?i(m):i(s)??i(m),W=typeof f=="number"?f/100:1,{fromYouTube:d,onClick:k,youTubeId:P,backgroundFile:c,desktopLayout:X,phoneLayout:Z,twoPictures:T}=se({isVideo:t,videoSource:B,videoPlayback:U,youtubeUrl:F,mediaLayout:V,mediaLayoutPhone:D}),[H,ee]=re(!1),u=!H,r=ge({overlayColor:C,overlayPosition:O},$),E=t?null:le(n,"image"),L=e(ie,{videoSrc:c?l:void 0,posterSrc:w,showVideo:c,playbackRate:W,objectPosition:y,objectPositionPhone:t?void 0:h,quiet:G});return _("section",{className:b?`relative h-full w-full overflow-hidden ${b}`:"relative h-full w-full overflow-hidden",style:N,"data-slide-name":p??"","data-slide-process":a??"","data-slide-media":c&&l?"video":"still",children:[e(ae,{partMotion:n,editing:o,children:T?e(ce,{desktopLayout:X,phoneLayout:Z,editing:o,marked:!1,partMotion:n,first:{src:s,objectPosition:y,objectPositionPhone:h,tintColor:x,tintOpacity:g},second:{src:R,objectPosition:z,objectPositionPhone:A,tintColor:M,tintOpacity:q}}):d||E?_(ne,{part:t?"media":"image",editing:o,marked:!1,entrance:E,className:"absolute inset-0 z-[1]",children:[L,d&&e(ue,{youTubeId:P,ownPoster:!!w,background:!k,editing:o})]}):L}),k&&e(pe,{youTubeId:P,fileSrc:d?void 0:l,playing:H,onPlay:()=>{ee(!0),Q?.()},editing:o}),u&&!T&&e(de,{color:x,opacity:g,passClicks:!1}),u&&ye(Y)&&e("div",{className:"absolute inset-0 z-[2]",style:{background:r.own?xe(r.color,r.position??void 0):me(r.color),...S!==void 0?{opacity:S/100}:null}}),u&&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",o?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{...he,...fe(K,J)},children:v&&e(v,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}const Ce=Array.from({length:3},(p,a)=>({name:`Slide ${a+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));export{Ce as HERO_SLIDE_SEEDS,ve as HeroSlideStyleContext,be as default};
|
|
@@ -3,10 +3,12 @@ export type BoxCell = {
|
|
|
3
3
|
stretchedRow: boolean;
|
|
4
4
|
fillingColumn: boolean;
|
|
5
5
|
columnsRow?: boolean;
|
|
6
|
+
id?: string;
|
|
6
7
|
};
|
|
7
8
|
export declare const InBoxContext: import("react").Context<BoxCell | null>;
|
|
8
9
|
export declare const useInBox: () => boolean;
|
|
9
10
|
export declare const useBoxCell: () => BoxCell | null;
|
|
11
|
+
export declare const useBoxId: () => string | null;
|
|
10
12
|
export declare const CellFillContext: import("react").Context<boolean>;
|
|
11
13
|
export declare function useCellOfStretchedRow(): boolean;
|
|
12
14
|
export declare const useFillsCell: () => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as r}from"react/jsx-runtime";import{createContext as u,useContext as t}from"react";import{SECTION_FILL_CLASS as f}from"../../format/lib/content/section-min-height.js";const x={stretchedRow:!1,fillingColumn:!1},l=u(null),S=()=>t(l)!==null,w=()=>t(l),R=()=>t(l)?.id??null,c=u(!1);function a(){const o=t(l)?.stretchedRow===!0,e=t(c);return o&&!e}const p=()=>t(c);function C(){const o=t(l),e=a(),n=p();return{fill:n?` ${f}`:"",inner:s=>{const i=e||n?r(c.Provider,{value:!0,children:s}):s;return o?.columnsRow?r(l.Provider,{value:{...o,columnsRow:!1},children:i}):i}}}function I({className:o,style:e,attrs:n,children:s}){const{fill:i,inner:d}=C();return r("div",{className:`${o}${i}`,...e?{style:e}:{},...n,children:d(s)})}function B({children:o}){const e=t(l),n=e===null?null:e.id===void 0?x:{...x,id:e.id};return r(l.Provider,{value:n,children:r(c.Provider,{value:!1,children:o})})}export{c as CellFillContext,I as CellWrap,l as InBoxContext,B as SlotsStartAfresh,w as useBoxCell,R as useBoxId,C as useCellLayer,a as useCellOfStretchedRow,p as useFillsCell,S as useInBox};
|
|
@@ -14,8 +14,9 @@ export declare function NestedBoxChoice({ atTop, nested }: {
|
|
|
14
14
|
export declare function NotASectionEdge({ children }: {
|
|
15
15
|
children?: ReactNode;
|
|
16
16
|
}): import("react").JSX.Element;
|
|
17
|
+
export declare function useSectionRoot(): boolean;
|
|
17
18
|
export declare function useSectionEdge(): SectionEdge | null;
|
|
18
|
-
export default function SiteGutterFrame({ contained, framedClass, fillClass, columnClass, style, tabLabel, pad, border, outerAttrs, box, edge, outerStyle, children, }: {
|
|
19
|
+
export default function SiteGutterFrame({ contained, framedClass, fillClass, columnClass, style, tabLabel, pad, border, outerAttrs, box, edge, outerStyle, bleed, children, }: {
|
|
19
20
|
contained: boolean;
|
|
20
21
|
framedClass: string;
|
|
21
22
|
fillClass: string;
|
|
@@ -31,5 +32,6 @@ export default function SiteGutterFrame({ contained, framedClass, fillClass, col
|
|
|
31
32
|
box?: boolean;
|
|
32
33
|
edge?: boolean;
|
|
33
34
|
outerStyle?: CSSProperties;
|
|
35
|
+
bleed?: boolean;
|
|
34
36
|
children?: ReactNode;
|
|
35
37
|
}): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,Fragment as
|
|
1
|
+
"use client";import{jsx as e,Fragment as T}from"react/jsx-runtime";import{createContext as d,useContext as t}from"react";import{rootPadAttrs as k,wrapperPadAttrs as q}from"../lib/content/section-padding.js";import{SECTION_BORDER_CLASS as z,SECTION_BORDER_SELF_CLASS as H}from"../../format/lib/content/borders.js";import{drawsSiteGutter as J}from"../../format/lib/content/site-gutter.js";const f=d(!1);function Y({children:n}){return e(f.Provider,{value:!0,children:n})}const S=d(!1);function Z({children:n}){return e(S.Provider,{value:!0,children:n})}const x=d(!1);function $({atTop:n,nested:r}){return e(T,{children:t(x)?r:n})}const i=d(void 0);function b({children:n}){return e(i.Provider,{value:null,children:n})}function ee(){return t(i)===void 0&&!t(x)&&!t(f)}function ne(){return t(i)??null}function K({contained:n,framedClass:r,fillClass:j,columnClass:w,style:C,tabLabel:y,pad:o,border:c,outerAttrs:m,box:g=!1,edge:A=!1,outerStyle:a,bleed:N=!1,children:P}){const F=t(f),B=t(S),u=J(n,F),l=u&&!B,v=o&&!l?k(o.values,o.frame):null,h=c&&!l?c:null,L=[l?r:j,v?.className,h?H:null].filter(Boolean).join(" "),E=M(N&&l,v||h?{...C,...v?.style,...h}:C),G=t(i),D=g&&A&&G===void 0?{gutter:u,...o?{pad:o.values}:{}}:null,R=g?e(x.Provider,{value:!0,children:e(i.Provider,{value:D,children:P})}):P,p=u?e(f.Provider,{value:!0,children:R}):R,s=o&&l?q(o.values):null,O=m&&Object.keys(m).length>0?m:null,_=e("div",{...s?null:O,className:L,style:s||!a?E:{...E,...a},"data-tab-label":y,children:B?e(S.Provider,{value:!1,children:u&&!N?e("div",{className:w,children:p}):p}):p}),I=s?e("div",{...O,className:s.className,style:a?{...s.style,...a}:s.style,children:_}):_;return c&&l?e("div",{className:z,style:{display:"contents",...c},children:I}):I}function M(n,r){return n?{...r,paddingLeft:0,paddingRight:0}:r}export{Y as InsideSiteColumn,$ as NestedBoxChoice,b as NotASectionEdge,Z as SplitBandAndColumn,K as default,ne as useSectionEdge,ee as useSectionRoot};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{CardRowDrawn as O}from"../../../../../components/CardRowContext.js";import _ from"../../../../../components/ButtonBlock.js";import{CARD_ROW_LINK_PROP as j,namedRowField as e}from"../../../../../../format/lib/content/card-template.js";import{namedLinkHrefRewrite as p}from"../../../../../../format/lib/links/link-href-rewrites.js";import{CTA_PH as k}from"../../../../../../format/lib/document/blocks/placeholders.js";import{phPrev as v}from"../../scaffold.js";import{phoneKey as y}from"efficient-easel/draw";import{ButtonBlockMeta as T}from"../../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";const N={...T,render:o=>{const{label:l,href:a,variant:c,align:m,alignPhone:d,contained:f,arrow:h,icon:s,iconPosition:u,widthFit:b,buttonColor:w,buttonTextColor:P,editor:B}=o,C=Object.fromEntries(Object.entries(o).filter(([t])=>t==="buttonFillOpacity"||t==="buttonBorder"||t==="buttonCorners"||t==="buttonCornerSides"||t.startsWith("buttonPadding"))),r=p(o),R=r?{hrefRewrite:r}:{},n=(t,g)=>i(_,{label:v(t,k.text,B)??"",href:g,variant:c,align:m,alignPhone:d,contained:f,arrow:h,icon:s,iconPosition:u,widthFit:b,widthFitPhone:o[y("widthFit")],buttonColor:w,buttonTextColor:P,...C,...R}),x=e(o),F=e(o,j);return!x&&!F?n(l,a):i(O,{type:"ButtonBlock",props:o,children:t=>n(t.label,t.href)})}};export{N as ButtonBlockRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as a}from"react/jsx-runtime";import{phoneKey as o,tabletKey as l}from"efficient-easel/draw";import{CountRowsContext as c,NO_COUNTS as d}from"../../../../../components/CountRowsContext.js";import h from"../../../../../components/Flex.js";import{loopDelayOf as m,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 y}from"../../../../../../format/lib/content/section-min-height.js";import{FlexMeta as w}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";const F={...w,render:e=>{const i=a(h,{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:y(e),shadow:e.shadow,loop:r(e.loop),scrollDirection:u(e.scrollDirection),loopSeconds:g({loopDuration:e.loopDuration}),loopDelay:m({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,boxId:typeof e.id=="string"?e.id:void 0,content:e.content}),n=f(e),t=n?n===b?S(e):d:null;return a(c.Provider,{value:t,children:i})}};export{F as FlexRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as k}from"react/jsx-runtime";import E from"../../../../../components/HeroSlide.js";import{nestedAccentValue as I,sectionThemeWrap as R}from"../../../../../../format/lib/content/section-surface.js";import{phHide as U}from"../../scaffold.js";import{HeroSlideMeta as V}from"../../../../../../format/lib/document/blocks/general/HeroSlide/meta.js";import{loadingStill as W}from"../../../../../../format/lib/hero-video.js";const G={...V,render:({name:f,process:a,mediaType:e,mediaVideo:c,mediaImage:u,poster:p,loadingShows:l,videoFrame:g,mediaSrc:y,videoSpeed:t,imageFocal:b,imageFocalPhone:i,tintColor:S,overlay:h,groups:j,editor:n,overlayColor:o,overlayPosition:d,mediaLayout:P,mediaLayoutPhone:H,mediaImage2:x,imageFocal2:A,imageFocal2Phone:r,tintColor2:C,tintOpacity2:L,videoSource:v,youtubeUrl:M,videoPlayback:N,_partMotion:O,...s})=>{const m=R({...s,sectionAccent:I(s.sectionAccent)});return k(E,{themeClassName:m?.className,themeStyle:m?.style,name:f||void 0,process:U(a,"Label",n),mediaType:e,mediaSrc:(e==="image"?u:c||y)||void 0,videoSpeed:typeof t=="number"?t:void 0,poster:W({loadingShows:l,poster:p,videoFrame:g}),objectPosition:e==="image"&&b||void 0,objectPositionPhone:e==="image"&&typeof i=="string"?i:void 0,tintColor:S,tintOpacity:e==="image"?h:0,groups:j,editing:n?.isEditing,overlayColor:typeof o=="string"?o:void 0,overlayPosition:typeof d=="string"?d:void 0,mediaLayout:P,mediaLayoutPhone:H,mediaImage2:x||void 0,objectPosition2:A||void 0,objectPosition2Phone:typeof r=="string"?r:void 0,tintColor2:C,tintOpacity2:L,videoSource:v,youtubeUrl:M,videoPlayback:N,partMotion:O})}};export{G as HeroSlideRender};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SECTION_PAD_INNER_DEFAULTS } from "../../passes/section-padding.js";
|
|
2
|
-
import { type BoxEntry, type ConvertContext, type PartRow, type SiteWrite } from "../../../sections/section-to-box.js";
|
|
2
|
+
import { type BoxEntry, type ConvertContext, type OwnProps, type PartRow, type SiteWrite } from "../../../sections/section-to-box.js";
|
|
3
3
|
type Props = Record<string, unknown>;
|
|
4
4
|
export declare const TEXT: Props;
|
|
5
5
|
export declare const NUMBER_TEXT: Props;
|
|
@@ -41,4 +41,13 @@ export declare const bandProps: (p: Props, ctx: ConvertContext) => Props;
|
|
|
41
41
|
export declare const bandWrites: (node: {
|
|
42
42
|
props: Props;
|
|
43
43
|
}, ctx: ConvertContext) => SiteWrite[];
|
|
44
|
+
export declare const siteGutterOf: (ctx: ConvertContext) => number;
|
|
45
|
+
export declare const NO_PAD: Props;
|
|
46
|
+
export declare const lineSides: (sides: {
|
|
47
|
+
top?: number;
|
|
48
|
+
right?: number;
|
|
49
|
+
bottom?: number;
|
|
50
|
+
left?: number;
|
|
51
|
+
}) => Props;
|
|
52
|
+
export declare const pictureCell: (name: string, key: string, props: OwnProps, parts?: readonly PartRow[]) => PartRow;
|
|
44
53
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{phoneKey as
|
|
1
|
+
import{phoneKey as b}from"efficient-easel/draw";import{ENTRANCE_KEYS as f}from"../../../animation/entrance.js";import{COUNT_KEY_PROP as x}from"../../../../../format/lib/content/block-sources.js";import{NESTED_BOX_PADDING as T}from"../../../../../format/lib/content/box-layout.js";import{normalizeSiteGutter as B}from"../../../../../format/lib/content/page-width.js";import{resolveSectionPadding as _}from"../../../content/section-padding.js";import{ButtonBlockMeta as E}from"../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";import{TextMeta as S}from"../../../../../format/lib/document/blocks/general/Text/meta.js";import{SECTION_PAD_INNER_DEFAULTS as O}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 A}from"../../../../../format/lib/theme.js";const{text:z,tag:q,...D}=S.defaultProps,p=D,y={...p,[x]:""},Q={...p,tone:"dim"},{label:Z,href:tt,...I}=E.defaultProps,ot=I,et={buttonFillOpacity:0,buttonBorder:{width:0},buttonPaddingTop:0,buttonPaddingRight:0,buttonPaddingBottom:0,buttonPaddingLeft:0},h={justify:"start",align:"stretch",wrap:!1,blockSpacing:"gap",padV2:!0},R={...h,direction:"column",...T},nt={...h,sectionAccent:0},it=["gridSpan","sectionHeightMode","sectionHeightValue","sectionHeightUnit","sectionHeightModePhone","sectionHeightValuePhone","sectionHeightUnitPhone","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderPhone","sectionAccent","stickTop","stickTopDistance","stickTopPhone","stickTopDistancePhone","anchor","sectionAnimation","_hidden",...Object.values(f).flatMap(t=>[t,b(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",dt={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},st=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 k(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 rt=t=>["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopTablet","sectionPaddingBottomTablet","sectionPaddingTopPhone","sectionPaddingBottomPhone"].map(o=>[o,o,(e,n)=>k(n,typeof t=="function"?t(n):t)[o]]);function c(t,o){const e=_(t,O[o]);return{sectionPaddingTop:e.top,sectionPaddingBottom:e.bottom}}const ct=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]],v={kind:"heading-case-upper",styles:["heading-1","heading-2","heading-3"]},at=t=>o=>N(o.props[t])?[v]:[],pt=(t,o)=>({kind:"text",key:t,role:"eyebrow",props:p,...o?{style:o}:{}}),m=t=>t.background!=="transparent",w=(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},l={align:"right",alignPhone:"left"},C=(t,o,e)=>{const n=i=>w(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}},gt=(t,o,e,n={})=>C(t,o,{...y,...l,...n,_partStyles:{text:{textStyle:"body-5",color:"labels",...e,case:"upper",...l}}}),g=(t,o)=>typeof t=="number"&&Number.isInteger(t)&&t>=0?t:a(o)?.selected??0,u=(t,o)=>a(o)?.themes[g(t.sectionAccent??0,o)],M=t=>(o,e)=>{const n=u(o,e)?.[t];return n?{fillColor:n}:{}},Pt=(t,o)=>{const e=u(t,o)?.line;return e?{buttonBorder:{width:1,color:e}}:{}},P=(t,o)=>{const e=a(o)?.themes;return e&&m(t)?A(e,g(t.sectionAccent,o)):-1},ht=(t,o,e)=>{const n=P(o,e);return n>=0?n:t},mt=(t,o)=>{const e=P(t,o);return e>=0?{sectionAccent:e}:{}},lt=(t,o)=>m(t.props)&&P(t.props,o)<0?[{kind:"band-preset",page:g(t.props.sectionAccent,o)}]:[],ut=t=>B(t.site?.siteGutter),W=Object.fromEntries(["Top","Right","Bottom","Left","TopPhone","RightPhone","BottomPhone","LeftPhone"].map(t=>[`sectionPadding${t}`,0])),bt=t=>({top:0,right:0,bottom:0,left:0,...t}),ft=(t,o,e,n=[])=>({kind:"group",name:t,keepEmpty:!0,props:(i,d)=>({...R,...W,...M("surface")(i,d),...typeof e=="function"?e(i,d):e}),box:[[o,"bgImage"]],parts:n});export{h as BOX,ot as BUTTON,Q as DIM,dt as DROP_COMMON,st as DROP_SIDE_PADDING,v as HEADING_CASE_UPPER,R as INNER_BOX,W as NO_PAD,y as NUMBER_TEXT,l as RIGHT_WORDS,it as SAME_KEYS,nt as SECTION_BOX,et as SH_LINK,p as TEXT,ht as bandAccent,P as bandIndex,g as bandPage,mt as bandProps,lt as bandWrites,M as fillFrom,at as headingCaseOf,c as innerPad,ct as innerPadKeys,gt as leadLine,C as leadText,Pt as lineBorder,bt as lineSides,w as numberAndUnit,ft as pictureCell,u as sectionPage,ut as siteGutterOf,pt as smallText,k as wrapperPad,rt as wrapperPadKeys};
|