efficient-web-builder 73.0.0 → 73.2.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 +48 -0
- package/dist/editor/components/SlotChildRows.js +1 -1
- package/dist/editor/components/StandaloneSectionEditor.js +1 -1
- package/dist/editor/components/StorefrontEditor.js +1 -1
- package/dist/editor/components/TickerSettingsPanel.js +1 -1
- package/dist/editor/components/storefront-editor.css +5 -4
- package/dist/editor/components/useHostDocumentBridge.js +1 -1
- package/dist/editor/lib/document/blocks/general/Footprint/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Hero/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
- package/dist/editor/lib/document/blocks/hero-shared-fields.d.ts +5 -0
- package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -1
- package/dist/editor/lib/document/controls.d.ts +1 -0
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/editor/lib/document/footer-blocks.js +1 -1
- package/dist/editor/lib/document/own-pad-fields.d.ts +5 -0
- package/dist/editor/lib/document/own-pad-fields.js +1 -0
- package/dist/editor/lib/document/passes/inspector.js +1 -1
- package/dist/editor/lib/editor-document-adapter.js +1 -1
- package/dist/format/lib/animation/hover.js +1 -1
- package/dist/format/lib/content/accordion-row-style.d.ts +3 -1
- package/dist/format/lib/content/accordion-row-style.js +1 -1
- package/dist/format/lib/content/box-layout.js +1 -1
- package/dist/format/lib/content/box-shape.d.ts +1 -1
- package/dist/format/lib/content/button-icon.d.ts +3 -1
- package/dist/format/lib/content/button-icon.js +1 -1
- package/dist/format/lib/content/card-place.d.ts +3 -1
- package/dist/format/lib/content/card-place.js +1 -1
- package/dist/format/lib/content/chat-launcher.js +1 -1
- package/dist/format/lib/content/container-direction.js +1 -1
- package/dist/format/lib/content/footprint.d.ts +22 -0
- package/dist/format/lib/content/footprint.js +1 -1
- package/dist/format/lib/content/image-fit.js +1 -1
- package/dist/format/lib/content/image-text-rows.d.ts +5 -2
- package/dist/format/lib/content/image-text-rows.js +1 -1
- package/dist/format/lib/content/list-number.js +1 -1
- package/dist/format/lib/content/list-position.js +1 -1
- package/dist/format/lib/content/part-names.d.ts +27 -0
- package/dist/format/lib/content/part-names.js +1 -0
- package/dist/format/lib/content/section-css.d.ts +3 -0
- package/dist/format/lib/content/section-css.js +1 -0
- package/dist/format/lib/content/text-tag.js +1 -1
- package/dist/format/lib/document/blocks/general/Footprint/card-seed.js +1 -1
- package/dist/format/lib/document/box-footer.js +1 -1
- package/dist/format/lib/document/left-view.js +1 -1
- package/dist/format/lib/document/mockup-variant-fields.js +1 -1
- package/dist/format/lib/document/passes/types.d.ts +2 -0
- package/dist/format/lib/document/section-groups.js +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +13 -0
- package/dist/format/lib/editor-words-catalogue.js +4 -4
- package/dist/format/lib/hero-arrows.js +1 -1
- package/dist/format/lib/hero-group-placement.js +1 -1
- package/dist/format/lib/hero-media-layout.js +1 -1
- package/dist/format/lib/hero-phone-stack.d.ts +12 -0
- package/dist/format/lib/hero-phone-stack.js +1 -1
- package/dist/format/lib/hero-video.js +1 -1
- package/dist/format/lib/reel.js +1 -1
- package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
- package/dist/format/lib/sections/section-head-placement.d.ts +3 -1
- package/dist/format/lib/sections/section-head-placement.js +1 -1
- package/dist/format/lib/source-rules/one-option-parser.d.ts +12 -0
- package/dist/format/lib/source-rules/one-option-parser.js +12 -0
- package/dist/format/lib/theme.d.ts +2 -1
- package/dist/format/lib/theme.js +4 -4
- package/dist/render/components/BlockFrame.d.ts +3 -1
- package/dist/render/components/BlockFrame.js +1 -1
- package/dist/render/components/BoxTabPaneContext.d.ts +2 -3
- package/dist/render/components/Btn.d.ts +3 -0
- package/dist/render/components/Btn.js +1 -1
- package/dist/render/components/ButtonBlock.d.ts +2 -0
- package/dist/render/components/ButtonBlock.js +1 -1
- package/dist/render/components/DealerFinder.d.ts +7 -1
- package/dist/render/components/DealerFinder.js +1 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/Footprint.d.ts +6 -2
- package/dist/render/components/Footprint.js +1 -1
- package/dist/render/components/Grid.js +1 -1
- package/dist/render/components/Heading.d.ts +1 -1
- package/dist/render/components/Heading.js +1 -1
- package/dist/render/components/HeroArrows.d.ts +4 -1
- package/dist/render/components/HeroArrows.js +1 -1
- package/dist/render/components/HeroPictures.js +1 -1
- package/dist/render/components/HeroPoster.js +1 -1
- package/dist/render/components/HeroSection.d.ts +4 -1
- package/dist/render/components/HeroSection.js +1 -1
- package/dist/render/components/HeroSingle.d.ts +4 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/HeroSlide.d.ts +3 -0
- package/dist/render/components/HeroSlide.js +1 -1
- package/dist/render/components/ImageBlock.js +1 -1
- package/dist/render/components/Logo.d.ts +3 -1
- package/dist/render/components/Logo.js +1 -1
- package/dist/render/components/LogoBlock.js +1 -1
- package/dist/render/components/SideListLayout.d.ts +8 -2
- package/dist/render/components/SideListLayout.js +1 -1
- package/dist/render/components/SiteGutterFrame.d.ts +3 -1
- package/dist/render/components/SiteGutterFrame.js +1 -1
- package/dist/render/components/Text.d.ts +1 -1
- package/dist/render/components/Text.js +1 -1
- package/dist/render/lib/content/section-padding.d.ts +36 -2
- package/dist/render/lib/content/section-padding.js +1 -1
- package/dist/render/lib/document/blocks/general/ButtonBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/CustomHTML/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Footprint/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Hero/render.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
- package/dist/render/lib/document/blocks/general/LocationMap/render.js +1 -1
- package/dist/render/lib/document/blocks/general/LogoBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -2
- 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.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.js +1 -1
- package/dist/render/lib/document/custom-css.d.ts +7 -3
- package/dist/render/lib/document/custom-css.js +2 -2
- package/dist/render/lib/document/header-clearance.js +1 -1
- package/dist/render/lib/document/header-ink.js +1 -1
- package/dist/render/lib/document/passes/index.js +1 -1
- package/dist/render/lib/document/passes/section-custom-css.d.ts +2 -0
- package/dist/render/lib/document/passes/section-custom-css.js +1 -0
- package/dist/render/lib/document/passes/section-padding.d.ts +4 -0
- package/dist/render/lib/document/passes/section-padding.js +1 -1
- package/dist/render/lib/document/sanitize.d.ts +4 -1
- package/dist/render/lib/document/sanitize.js +1 -1
- package/dist/render/lib/document/section-css-style.d.ts +4 -0
- package/dist/render/lib/document/section-css-style.js +1 -0
- package/dist/routine-index.json +1 -0
- package/dist/value-index.json +1 -0
- package/package.json +7 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{FRAME_BASE as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{FRAME_BASE as l,FRAME_GUTTER as e}from"./BlockFrame.js";import{SlotsStartAfresh as S,useFillsCell as h}from"./InBoxContext.js";import G from"./SiteGutterFrame.js";import{containerGapProps as A}from"../../format/lib/content/container-gap.js";import{resolveGridColumns as E,resolveGridMobileColumns as y}from"../../format/lib/content/grid-span.js";import{SECTION_FILL_CLASS as F}from"../../format/lib/content/section-min-height.js";import{partAttr as _}from"../../format/lib/content/part-names.js";function x({columns:s,mobileColumns:i,gap:n,gapPhone:m,gapTablet:a,contained:f=!0,fillHeight:p=!1,content:c}){const d=h(),r=p||d?` ${F}`:"",C=`${l} py-6 ${e}${r}`,u=`w-full py-6${r}`,$=E(s),g=y(i,s),t=A("Grid",n,"both",m,a);return o(G,{contained:f,framedClass:C,fillClass:u,columnClass:`${l} ${e}${r}`,box:!0,part:_("grid"),children:o(S,{children:o(c,{className:`sf-grid-zone grid${t.className}${r}`,style:{...t.style,"--sf-grid-cols":String($),"--sf-grid-cols-phone":String(g)},minEmptyHeight:120})})})}export{x as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type PadValues } from "../lib/content/section-padding.js";
|
|
2
2
|
import type { CSSProperties } from "react";
|
|
3
3
|
export type HeadingLevel = "1" | "2" | "3" | "4" | "5" | "6";
|
|
4
4
|
type Level = HeadingLevel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as l}from"react/jsx-runtime";import{resolveTypeSize as
|
|
1
|
+
import{jsx as l}from"react/jsx-runtime";import{BLOCK_PAD_FRAME as p,ownPadOf as m}from"../lib/content/section-padding.js";import{resolveTypeSize as o}from"../../format/lib/content/section-type-size.js";import f from"./BlockFrame.js";import{partAttr as g}from"../../format/lib/content/part-names.js";import{renderHeadline as r}from"./goldPhrases.js";const x={1:{size:"clamp(48px,7vw,96px)",role:"heading",step:"headingLarge",leading:"leading-[0.95]"},2:{size:"64px",sizeMobile:"36px",role:"heading",step:"headingMedium",rank:2,leading:"leading-none"},3:{size:"40px",sizeMobile:"28px",role:"heading",step:"headingSmall",rank:3,leading:"leading-[1.05]"},4:{size:"28px",role:"heading",step:"headingSmall",rank:3,leading:"leading-[1.1]"},5:{size:"22px",role:"body",step:"body",leading:"leading-[1.2]"},6:{size:"18px",role:"body",step:"body",leading:"leading-[1.3]"}},c="font-display font-medium leading-[0.92] tracking-[-0.04em] text-[length:min(var(--size-headingLarge,clamp(64px,9vw,144px)),var(--sf-heading-max,9999px))] max-view-wide:text-[length:min(var(--size-headingMedium,clamp(48px,12vw,76px)),var(--sf-heading-max,9999px))] max-view-wide:leading-[0.95]";function z(a,n="font-display"){const e=x[a],s=o(void 0,e.size,e.role,e.step),i=e.sizeMobile?o(void 0,e.sizeMobile,e.role,e.step):void 0,d={"--heading-size":s,...i?{"--heading-size-m":i}:{}},t=e.rank===2?"[font-weight:var(--sf-heading-2-weight,var(--sf-heading-weight,500))]":e.rank===3?"[font-weight:var(--sf-heading-3-weight,var(--sf-heading-weight,500))]":"[font-weight:var(--sf-heading-weight,500)]",h=["text-[length:var(--heading-size)]",e.leading,i?"max-view-wide:text-[length:var(--heading-size-m)]":""].filter(Boolean).join(" ");return{className:`${n} ${t} tracking-[-0.03em] text-fg ${h} text-left`,style:d}}function w({level:a,text:n,contained:e,hero:s=!1,pad:i}){if(s)return l("h1",{className:c,children:r(n,!1)});const d=`h${a}`,t=z(a);return l(f,{contained:e,...m(i,p.heading),part:g("heading-block"),children:l(d,{className:t.className,style:t.style,...g("heading"),children:r(n,!1)})})}export{w as default,z as headingLook};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { MouseEvent, Ref } from "react";
|
|
2
2
|
import { type HeroArrowDirection, type HeroArrowShape } from "../../format/lib/hero-arrows.js";
|
|
3
|
+
import type { PartAttr } from "../../format/lib/content/part-names.js";
|
|
3
4
|
export interface HeroArrowsProps {
|
|
4
5
|
shape?: HeroArrowShape | string;
|
|
5
6
|
placement?: string;
|
|
@@ -7,5 +8,7 @@ export interface HeroArrowsProps {
|
|
|
7
8
|
labels?: Readonly<Record<HeroArrowDirection, string>>;
|
|
8
9
|
onPress?: (direction: HeroArrowDirection, event: MouseEvent<HTMLButtonElement>) => void;
|
|
9
10
|
sides?: boolean;
|
|
11
|
+
part?: PartAttr;
|
|
12
|
+
buttonPart?: PartAttr;
|
|
10
13
|
}
|
|
11
|
-
export default function HeroArrows({ shape, placement, ref, labels, onPress, sides }: HeroArrowsProps): import("react").JSX.Element;
|
|
14
|
+
export default function HeroArrows({ shape, placement, ref, labels, onPress, sides, part, buttonPart }: HeroArrowsProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t}from"react/jsx-runtime";import{UiIcon as
|
|
1
|
+
"use client";import{jsx as t}from"react/jsx-runtime";import{UiIcon as i}from"efficient-easel/draw/client";import{arrowButtonClass as v,arrowsRailClass as d,HERO_ARROW_DIRECTIONS as R,HERO_ARROW_LABELS as c}from"../../format/lib/hero-arrows.js";const b={prev:"pointer-events-auto absolute left-3 top-1/2 -translate-y-1/2",next:"pointer-events-auto absolute right-3 top-1/2 -translate-y-1/2"};function h({shape:n,placement:l,ref:s,labels:u=c,onPress:a,sides:r=!1,part:f,buttonPart:p}){const o=v(n);return t("div",{ref:s,className:r?void 0:d(l),style:{color:"var(--overlay-fg)"},...f,children:R.map(e=>t("button",{type:"button","data-hero-nav":e,"aria-label":u[e],className:r?`${b[e]} ${o}`:o,onClick:a?m=>a(e,m):void 0,...p,children:t(i,{name:"chevron-right",size:18,rounded:!0,style:e==="prev"?{rotate:"180deg"}:void 0})},e))})}export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as n,Fragment as f,jsxs as d}from"react/jsx-runtime";import h from"./HeroPoster.js";import{PictureZoom as S}from"./PictureZoom.js";import{ScrollEffect as _}from"./ScrollEffect.js";import{SectionAnimation as H}from"./SectionAnimation.js";import{resolveMedia as g}from"../lib/media.js";import{HERO_MEDIA_PARTS as O,HERO_PART_ATTR as
|
|
1
|
+
"use client";import{jsx as n,Fragment as f,jsxs as d}from"react/jsx-runtime";import h from"./HeroPoster.js";import{PictureZoom as S}from"./PictureZoom.js";import{ScrollEffect as _}from"./ScrollEffect.js";import{SectionAnimation as H}from"./SectionAnimation.js";import{resolveMedia as g}from"../lib/media.js";import{HERO_MEDIA_PARTS as O,HERO_PART_ATTR as A}from"../lib/document/hero-media-parts.js";import{entranceDrawn as N}from"../lib/animation/entrance.js";import{scrollDrawn as E,scrollOrigins as R}from"../../format/lib/animation/scroll.js";import{readPartMotion as u}from"../lib/animation/part-motion.js";import{pictureHoverOf as k}from"../../format/lib/animation/hover.js";import{FILLS_ITS_FRAME as v}from"../../format/lib/content/image-aspect.js";import{PHOTO_HOST_ATTR as C,SITE_PHOTO_CSS as I,resolveImageTreatment as V}from"../../format/lib/content/image-treatment.js";import{heroPictureCount as L,normaliseMediaLayout as z,resolvePhoneLayout as D}from"../../format/lib/hero-media-layout.js";import{normaliseVideoPlayback as F,normaliseVideoSource as M,parseYouTubeId as $}from"../../format/lib/hero-video.js";import{hidableText as Y}from"efficient-easel/draw";import{viewHideClass as G}from"../../format/lib/content/view-hide-class.js";import{partAttr as U}from"../../format/lib/content/part-names.js";const B={one:"max-view-tablet:grid-cols-1 max-view-tablet:grid-rows-1",side:"max-view-tablet:grid-cols-2 max-view-tablet:grid-rows-1",stacked:"max-view-tablet:grid-cols-1 max-view-tablet:grid-rows-2"},K={one:"view-tablet:grid-cols-1 view-tablet:grid-rows-1",side:"view-tablet:grid-cols-2 view-tablet:grid-rows-1",stacked:"view-tablet:grid-cols-1 view-tablet:grid-rows-2"};function ue(e){const o=e.isVideo&&M(e.videoSource)==="youtube",a=e.isVideo&&F(e.videoPlayback)==="click",s=o?$(Y(e.youtubeUrl)):null,r=z(e.mediaLayout);return{fromYouTube:o,onClick:a,youTubeId:s,backgroundFile:e.isVideo&&!o&&!a,desktopLayout:r,phoneLayout:D(e.mediaLayoutPhone,r),twoPictures:!e.isVideo&&L(e)>1}}function b(e,o){return N(u({_partMotion:e},o))}function P(e,o){return E(u({_partMotion:e},o))}const x=e=>R({desktop:e.objectPosition,tablet:e.objectPositionTablet,phone:e.objectPositionPhone}),p=v.img;function w({entrance:e,scroll:o,origins:a,editing:s,className:r,attrs:i,style:t,zoomLayerClass:l,children:c}){return e?n(H,{views:e,editing:s,boxClass:r,boxAttrs:i,...t?{boxStyle:t}:{},children:c}):o?n(_,{views:o,...a?{origins:a}:{},boxClass:r,boxAttrs:i,...t?{boxStyle:t}:{},...l?{zoomLayerClass:l}:{},children:c}):n("div",{className:r,...i,...t?{style:t}:{},children:c})}function m(e,o){return V(void 0,void 0,k(u({_partMotion:e},o)))}function be(e){return O.some(a=>m(e,a).className)?{hostAttrs:{[C]:""},sheet:I}:{}}function T({treatment:e,children:o}){return e.className?n("div",{className:`absolute inset-0 ${e.className}`,...e.style?{style:e.style}:{},children:o}):n(f,{children:o})}function y({color:e,opacity:o,passClicks:a=!0}){return o>0?n("div",{className:a?"pointer-events-none absolute inset-0 z-[2]":"absolute inset-0 z-[2]",style:{background:e,opacity:Math.min(Math.max(o,0),100)/100},...U("tint")}):null}function j({part:e,editing:o,marked:a=!0,entrance:s,scroll:r=null,origins:i,className:t,children:l}){const c=o&&a?{[A]:e}:void 0;return n(w,{entrance:s,scroll:r,origins:i,editing:o,className:t,attrs:c,zoomLayerClass:p,children:l})}function Pe({partMotion:e,editing:o,children:a}){const s=b(e,"media"),r=P(e,"media"),i=m(e,"media"),t=n(S,{fill:v,children:a}),l=i.className?n("div",{className:`absolute inset-0 z-[1] ${i.className}`,...i.style?{style:i.style}:{},children:t}):t;return s||r?n(w,{entrance:s,scroll:r,editing:o,className:"absolute inset-0 z-[1]",zoomLayerClass:p,children:l}):n(f,{children:l})}function fe({desktopLayout:e,phoneLayout:o,editing:a,marked:s=!0,partMotion:r,first:i,second:t,laterSlide:l=!1}){return d("div",{className:`absolute inset-0 z-[1] grid ${B[o]} ${K[e]}`,"data-hero-layout":e,"data-hero-layout-phone":o,children:[n(j,{part:"image",editing:a,marked:s,entrance:b(r,"image"),scroll:P(r,"image"),origins:x(i),className:"relative overflow-hidden",children:d(T,{treatment:m(r,"image"),children:[n(h,{posterSrc:g(i.src),showVideo:!1,laterSlide:l,objectPosition:i.objectPosition,objectPositionPhone:i.objectPositionPhone,objectPositionTablet:i.objectPositionTablet}),n(y,{color:i.tintColor,opacity:i.tintOpacity})]})}),n(j,{part:"image2",editing:a,marked:s,entrance:b(r,"image2"),scroll:P(r,"image2"),origins:x(t),className:`relative overflow-hidden ${G({desktop:e==="one",tablet:e==="one",mobile:o==="one"},{atSectionLine:!0})}`.trimEnd(),children:d(T,{treatment:m(r,"image2"),children:[n(h,{posterSrc:g(t.src),showVideo:!1,laterSlide:l,objectPosition:t.objectPosition,objectPositionPhone:t.objectPositionPhone,objectPositionTablet:t.objectPositionTablet}),n(y,{color:t.tintColor,opacity:t.tintOpacity})]})})]})}export{Pe as HeroMediaLayer,w as HeroPartBox,j as HeroPickArea,T as HeroPictureHover,y as HeroTint,fe as HeroTwoPictures,ue as heroMediaReading,b as heroPartEntrance,m as heroPartHover,P as heroPartScroll,x as heroPictureOrigins,be as heroPicturesHover};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as a,jsxs as H}from"react/jsx-runtime";import{useEffect as l,useRef as R,useState as n}from"react";import{SiteImage as oe}from"../lib/site-runtime.js";import ae from"./HeroHeldFrame.js";import{isExternalMediaUrl as ne,videoForView as ie,videoSources as le}from"../lib/media.js";import{EDGE_PHONE_MEDIA as T}from"../lib/content/view-values.js";import{EDGE_WIDE_MEDIA as ce}from"../../format/lib/content/view-lines.js";import{useViewWidthRead as de}from"./SectionAnimation.js";import{sizedImage as W}from"../../format/lib/sized-image.js";import{phoneFocus as ue}from"../../format/lib/content/phone-focus.js";import{useFirstScreenPlace as me}from"../lib/first-screen.js";const
|
|
1
|
+
"use client";import{jsx as a,jsxs as H}from"react/jsx-runtime";import{useEffect as l,useRef as R,useState as n}from"react";import{SiteImage as oe}from"../lib/site-runtime.js";import ae from"./HeroHeldFrame.js";import{isExternalMediaUrl as ne,videoForView as ie,videoSources as le}from"../lib/media.js";import{EDGE_PHONE_MEDIA as T}from"../lib/content/view-values.js";import{EDGE_WIDE_MEDIA as ce}from"../../format/lib/content/view-lines.js";import{useViewWidthRead as de}from"./SectionAnimation.js";import{sizedImage as W}from"../../format/lib/sized-image.js";import{phoneFocus as ue}from"../../format/lib/content/phone-focus.js";import{useFirstScreenPlace as me}from"../lib/first-screen.js";import{partAttr as fe}from"../../format/lib/content/part-names.js";const pe=.5;function ve({videoSrc:$,videoAv1Src:M,videoSrcPhone:V,videoAv1SrcPhone:G,posterSrc:q,posterSrcPhone:B,showVideo:F=!0,playbackRate:z=pe,objectPosition:u="50% 50%",objectPositionPhone:K,objectPositionTablet:O,quiet:b=!1,slideShown:U,laterSlide:I=!1,laterOfLead:Y=!1}){const m=ue(K,O),v=me(),[h,J]=n(!1),w=v==="below"&&!h,Q=v==="first",t=q||"",r=B||"",L=R(null),N=de(L,!0,!0),y=N===void 0?void 0:N==="phone",k=ie({video:$,av1:M,videoPhone:V,av1Phone:G},y===!0),o=k.video||"",X=le(o,k.av1),[E,S]=n(!1),[x,_]=n(!1),[Z,A]=n(!1),[ee,C]=n(!1),f=U??!0,[g,te]=n(!1),i=v!=="first"&&!Y,[c,j]=n(!1),P=R(null);l(()=>{if(!i)return;if(document.readyState==="complete"){j(!0);return}const e=()=>j(!0);return window.addEventListener("load",e,{once:!0}),()=>window.removeEventListener("load",e)},[i]),l(()=>{S(!1),_(!1),A(!1),C(!1)},[o,t,r]),l(()=>{f&&te(!0)},[f]),l(()=>{const e=P.current;e&&(f?e.play()?.catch(()=>{}):e.pause())},[f,g,c]),l(()=>{if(!I||i&&!c)return;const e=()=>J(!0);if(typeof window.requestIdleCallback=="function"){const se=window.requestIdleCallback(e,{timeout:2e3});return()=>window.cancelIdleCallback(se)}const s=setTimeout(e,800);return()=>clearTimeout(s)},[I,i,c]),l(()=>{const e=P.current;if(!e)return;const s=()=>{e.playbackRate=z};return s(),e.addEventListener("loadedmetadata",s),()=>e.removeEventListener("loadedmetadata",s)},[o,z]);const D=ne(t),d=t&&(D||r)&&!x?W(t):{src:t},p=r&&!x?W(r):{src:r},re=r&&!w&&!h?[{sized:p,media:T},...t?[{sized:d,media:ce}]:[]]:[];return H("div",{ref:L,className:"absolute inset-0 z-[1]",...fe("hero-media"),children:[a("div",{className:"absolute inset-0",style:{background:"var(--site-surface)"}}),re.map(({sized:e,media:s})=>a("link",{rel:"preload",as:"image",href:e.src,media:s,fetchPriority:"high",...e.srcSet?{imageSrcSet:e.srcSet,imageSizes:"100vw"}:{}},s)),(t||r)&&(D||r?(()=>{const e=a("img",{...t?{src:d.src}:{},...d.srcSet?{srcSet:d.srcSet,sizes:"100vw"}:{},alt:"",...w?{loading:"lazy"}:{},...Q?{fetchPriority:"high"}:{},className:`absolute inset-0 z-[2] h-full w-full object-cover ${m.className}`.trim(),style:{display:E?"none":"block",objectPosition:u,...m.style},onError:s=>{s.currentTarget.currentSrc&&(d.srcSet||p.srcSet?_(!0):S(!0))}},r?void 0:t);return r?H("picture",{children:[a("source",{media:T,srcSet:p.srcSet||p.src,sizes:"100vw"}),e]},`${t} ${r}`):e})():a(oe,{src:t,alt:"",fill:!0,...w?{}:h?{loading:"eager"}:{priority:!0},sizes:"100vw",className:`z-[2] object-cover ${m.className}`.trim(),style:{display:E?"none":"block",objectPosition:u,...m.style},onError:()=>S(!0)},t)),F&&!b&&o&&y!==void 0&&g&&(!i||c)&&!Z&&a("video",{ref:P,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"metadata",className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:u},onError:()=>A(!0),children:X.map(e=>a("source",{src:e.src,type:e.type},e.src))},o),F&&b&&o&&y!==void 0&&g&&(!i||c)&&!ee&&(!t||E)&&a(ae,{src:o,objectPosition:u,onError:()=>C(!0)},o)]})}export{ve as default};
|
|
@@ -16,6 +16,9 @@ interface Props {
|
|
|
16
16
|
textureColor?: string;
|
|
17
17
|
phoneUpDown?: string;
|
|
18
18
|
phoneSideways?: string;
|
|
19
|
+
phoneWordsTop?: number;
|
|
20
|
+
phoneWordsBottom?: number;
|
|
21
|
+
phoneBoxGap?: number;
|
|
19
22
|
autoplay?: boolean;
|
|
20
23
|
autoplayInterval?: number;
|
|
21
24
|
showTicker?: boolean;
|
|
@@ -37,4 +40,4 @@ interface Props {
|
|
|
37
40
|
editing?: boolean;
|
|
38
41
|
partMotion?: Record<string, unknown>;
|
|
39
42
|
}
|
|
40
|
-
export default function HeroSection({ slides: Slides, strip: Strip, alignment, textureOpacity, showTexture, textureColor, phoneUpDown, phoneSideways, autoplay, autoplayInterval, showTicker, tickerItems, heightDesktop, heightTablet, heightMobile, heightFixed, heightFixedTablet, heightFixedMobile, showPicker, pickerShape, pickerPlacement, showArrows, arrowsShape, arrowsPlacement, editing, partMotion, }: Props): import("react").JSX.Element;
|
|
43
|
+
export default function HeroSection({ slides: Slides, strip: Strip, alignment, textureOpacity, showTexture, textureColor, phoneUpDown, phoneSideways, phoneWordsTop, phoneWordsBottom, phoneBoxGap, autoplay, autoplayInterval, showTicker, tickerItems, heightDesktop, heightTablet, heightMobile, heightFixed, heightFixedTablet, heightFixedMobile, showPicker, pickerShape, pickerPlacement, showArrows, arrowsShape, arrowsPlacement, editing, partMotion, }: Props): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as n,jsxs as
|
|
1
|
+
"use client";import{jsx as n,jsxs as $}from"react/jsx-runtime";import{HideTaker as ze}from"./ViewHideRoot.js";import{useCallback as v,useEffect as k,useId as Xe,useRef as u,useState as y}from"react";import{markOverlayPortal as oe}from"../../format/lib/document/overlay-portal.js";import Ge from"./Ticker.js";import{HeroSlideStyleContext as Ye}from"./HeroSlide.js";import je from"./HeroArrows.js";import qe from"./Reel.js";import{TICKER_PART_ATTR as Ke}from"./PreviewTickerContext.js";import{useReducedMotion as Fe}from"./useReducedMotion.js";import{heroHeightBox as Je,heroStoresRatio as Qe}from"../../format/lib/content/section-height.js";import{HEADER_HEIGHT_CSS as Ue}from"../lib/document/header-clearance.js";import{nextReel as We,normaliseHeroReelShape as Ze,reelShown as et}from"../../format/lib/reel.js";import{arrowsShown as tt,arrowStep as rt}from"../../format/lib/hero-arrows.js";import{swipeEnabled as ot,swipeStep as nt}from"../../format/lib/hero-swipe.js";import{videoControlShown as st,videoHeld as ct}from"../../format/lib/hero-video-control.js";import{HERO_SLIDER_GOTO_EVENT as B}from"efficient-easel/draw";import{say as ne}from"../../format/lib/editor-words.js";import{markedChildren as se}from"../../format/lib/marked-children.js";import{legacyTickerDrawn as at,TICKER_MOTION_PART as ce}from"../../format/lib/hero-ticker.js";import{ON_MEDIA_INK_STYLE as lt}from"../../format/lib/content/ink.js";import{HeroPartBox as it,heroPartScroll as ut}from"./HeroPictures.js";import{entranceDrawn as dt}from"../lib/animation/entrance.js";import{readPartMotion as mt}from"../lib/animation/part-motion.js";import{scrim as ae}from"../../format/lib/content/scrim.js";import{partAttr as b}from"../../format/lib/content/part-names.js";const ft="Play video",ht="Hold video",pt="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",vt=()=>ne("item"),le=new Map;function bt(m,l){const d=m?.ownerDocument?.defaultView;if(d)return d.addEventListener(B,l),()=>d.removeEventListener(B,l)}function xt({slides:m,strip:l,alignment:d,textureOpacity:T,showTexture:S,textureColor:O,phoneUpDown:ie,phoneSideways:ue,phoneWordsTop:de,phoneWordsBottom:me,phoneBoxGap:fe,autoplay:z,autoplayInterval:H,showTicker:he,tickerItems:X,heightDesktop:pe,heightTablet:ve,heightMobile:be,heightFixed:xe,heightFixedTablet:we,heightFixedMobile:ke,showPicker:ye,pickerShape:Ee,pickerPlacement:ge,showArrows:_e,arrowsShape:Re,arrowsPlacement:Te,editing:s,partMotion:G}){const Y=Je({heightDesktop:pe,heightTablet:ve,heightMobile:be,heightFixed:xe,heightFixedTablet:we,heightFixedMobile:ke}),{className:Se,style:Oe}=Y,N=Qe(Y),j=(l?.blockCount??0)>0,He=!j&&at({showTicker:he,tickerItems:X}),q=(X??[]).map(e=>e?.text?.trim()?e.text:s?vt():"").filter(Boolean),Ne=dt(mt({_partMotion:G},ce)),Ae=ut(G,ce),f=u(null),K=u(null),F=u(null),A=u(null),J=Xe(),L=u(J),[E,Le]=y([]),[Me,Q]=y(0),x=u(0),[U,W]=y(!1),[Pe,Z]=y(null),[g,Ce]=y(!1),M=Fe(),_=v(()=>f.current?.querySelector(".hero-track")??null,[]),i=v((e,t=!1)=>{Q(e),Z(o=>o===e?o:null),x.current=e,le.set(L.current,e);const r=f.current?.querySelector(".hero-track");if(r)if(t){const o=r.style.transition;r.style.transition="none",r.style.transform=`translateX(-${Math.max(0,e)*100}%)`,r.offsetHeight,r.style.transition=o}else r.style.transform=`translateX(-${Math.max(0,e)*100}%)`},[]);k(()=>{const e=f.current,t=e?.getAttribute("data-easel-block")||e?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||J;L.current=t;const r=le.get(t);typeof r=="number"&&(Q(r),x.current=r)},[]),k(()=>{const e=_();if(!e)return;const t=()=>{Le(o=>We(o,se(e,"data-slide-name")))};t();const r=new MutationObserver(t);return r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-slide-name","data-slide-process","data-slide-media"]}),()=>{r.disconnect()}},[_]),k(()=>{if(!s)return;const e=t=>{const r=t.detail;if(!r||typeof r.index!="number")return;const o=f.current,p=o?.getAttribute("data-easel-block")||o?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||L.current;r.id&&r.id!==p||i(r.index,!0)};return bt(f.current,e)},[s,i]);const c=E.length,a=Math.min(Math.max(Me,0),Math.max(0,c-1)),P=Pe===a,C=et({shown:ye,count:c}),ee=tt({shown:_e,count:c}),te=st({editing:s,shown:a,slides:E}),De=ct({editing:s,playing:g,controlShown:te}),R=ot({count:c,editing:s}),h=u(null),w=u(null),Ie=v(e=>{if(h.current=null,w.current=null,!R||e.touches.length!==1)return;const t=e.touches[0];h.current={x:t.clientX,y:t.clientY},w.current={x:t.clientX,y:t.clientY}},[R]),Ve=v(e=>{if(!h.current)return;if(e.touches.length!==1){h.current=null;return}const t=e.touches[0];w.current={x:t.clientX,y:t.clientY}},[]),$e=v(()=>{const e=h.current,t=w.current;if(h.current=null,w.current=null,!R||!e||!t)return;const r=nt(t.x-e.x,t.y-e.y,x.current,c);r!==x.current&&i(r)},[R,c,i]);k(()=>{if(s||!z||U||P||M||c<=1)return;const t=Math.max(1,typeof H=="number"?H:6)*1e3,r=window.setTimeout(()=>i((a+1)%c),t);return()=>window.clearTimeout(r)},[s,z,H,U,P,M,c,a,i]),k(()=>{const e=[K.current,F.current,A.current].filter(Boolean),t=e.map(o=>oe(o)),r=o=>{const p=o.target,D=p.closest("[data-hero-nav]");if(D&&!A.current?.contains(D))return;const I=D,re=I??p.closest("[data-idx]");if(!re)return;o.stopPropagation(),o.preventDefault();const V=I?rt(I.dataset.heroNav,x.current,c):Number(re.dataset.idx);Number.isNaN(V)||(i(V,s),se(_(),"data-slide-name")[V]?.click())};return e.forEach(o=>o.addEventListener("click",r,{capture:!0})),()=>{t.forEach(o=>o?.()),e.forEach(o=>o.removeEventListener("click",r,{capture:!0}))}},[c,i,_,s]);const Be=v(e=>{if(!e)return;const t=oe(e),r=o=>{o.stopPropagation(),o.preventDefault(),Ce(p=>!p)};return e.addEventListener("click",r,{capture:!0}),()=>{t?.(),e.removeEventListener("click",r,{capture:!0})}},[]);return n(Ye.Provider,{value:{alignment:d,textureOpacity:T,textureOn:S,textureColor:O,quietVideo:De,phoneUpDown:ie,phoneSideways:ue,phoneWordsTop:de,phoneWordsBottom:me,phoneBoxGap:fe,holdReel:()=>Z(a),reelHeld:P,shownSlide:a,ratioMin:N},children:$(ze,{ref:f,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${Se} max-w-[var(--sf-hero-cap,none)] ${N?"overflow-clip":"overflow-hidden"}`,style:Oe,onMouseEnter:()=>W(!0),onMouseLeave:()=>W(!1),onTouchStart:Ie,onTouchMove:Ve,onTouchEnd:$e,...b("hero"),children:[n(m,{className:N?"hero-track flex min-h-full [&>*]:min-h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full":"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:`translateX(-${a*100}%)`,transition:M?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),te&&n("div",{ref:Be,"data-hero-video-control":g?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${Ue} + 16px)`},children:$("button",{type:"button",className:pt,children:[n("span",{"aria-hidden":"true",children:g?"❚❚":"▶"}),ne(g?ht:ft)]})}),(C||ee)&&$("div",{className:"pointer-events-none absolute inset-y-0 left-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] right-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] z-[6] mx-auto max-w-[var(--sf-hero-chrome-cap,calc(var(--sf-site-width,1600px)_-_var(--sf-site-gutter,40px)*2))]",children:[C&&n(qe,{ref:K,slides:E,active:a,shape:Ze(Ee),placement:ge}),ee&&n(je,{ref:A,shape:Re,placement:Te,part:b("arrows"),buttonPart:b("arrow")})]}),C&&n("div",{ref:F,className:"sf-hero-phone-dots absolute bottom-[80px] left-1/2 z-[6] hidden -translate-x-1/2 items-center gap-2",...b("dots"),children:E.map((e,t)=>n("button",{type:"button","data-idx":t,"aria-label":`Go to slide ${t+1}`,className:`h-2 rounded-full transition-all motion-reduce:transition-none ${t===a?"w-5 bg-accent":"w-2 bg-white/45 hover:bg-white/70"}`,...b("dot")},t))}),j&&l&&n("div",{className:"sf-hero-strip absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10",style:{background:ae(.55),...lt},...b("strip"),children:n(l,{})}),He&&q.length>0&&n(wt,{editing:!!s,entrance:Ne,scroll:Ae,children:n(Ge,{items:q,backdrop:"dark-media"})})]})})}function wt({editing:m,entrance:l,scroll:d,children:T}){const S="sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5",O=m?{[Ke]:""}:void 0;return n(it,{entrance:l,scroll:d,editing:m,className:S,attrs:O,style:{background:ae(.55)},children:T})}export{B as HERO_SLIDER_GOTO_EVENT,ht as HERO_VIDEO_HOLD_LABEL,ft as HERO_VIDEO_PLAY_LABEL,xt as default,bt as subscribeSliderGoto};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { type SlotComponent } from "efficient-easel/blocks";
|
|
2
2
|
import { type HeroMediaType } from "../../format/lib/hero-media-layout.js";
|
|
3
3
|
export interface HeroSingleProps {
|
|
4
|
+
phoneWordsTop?: number;
|
|
5
|
+
phoneWordsBottom?: number;
|
|
6
|
+
phoneBoxGap?: number;
|
|
4
7
|
overlay?: number;
|
|
5
8
|
overlayColor?: string;
|
|
6
9
|
overlayPosition?: string;
|
|
@@ -32,4 +35,4 @@ export interface HeroSingleProps {
|
|
|
32
35
|
editing?: boolean;
|
|
33
36
|
partMotion?: Record<string, unknown>;
|
|
34
37
|
}
|
|
35
|
-
export default function HeroSingle({ overlay, overlayColor, overlayPosition, mediaType, mediaSrc, poster, objectPosition, objectPositionPhone, objectPositionTablet, tintColor, tintOpacity, heightDesktop, heightMobile, heightFixed, heightFixedTablet, heightFixedMobile, boxes: Boxes, videoSource, youtubeUrl, videoPlayback, mediaLayout, mediaLayoutPhone, mediaImage2, objectPosition2, objectPosition2Phone, objectPosition2Tablet, tintColor2, tintOpacity2, editing, partMotion, }: HeroSingleProps): import("react").JSX.Element;
|
|
38
|
+
export default function HeroSingle({ overlay, overlayColor, overlayPosition, mediaType, mediaSrc, poster, objectPosition, objectPositionPhone, objectPositionTablet, tintColor, tintOpacity, heightDesktop, heightMobile, heightFixed, heightFixedTablet, heightFixedMobile, phoneWordsTop, phoneWordsBottom, phoneBoxGap, boxes: Boxes, videoSource, youtubeUrl, videoPlayback, mediaLayout, mediaLayoutPhone, mediaImage2, objectPosition2, objectPosition2Phone, objectPosition2Tablet, 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 k}from"react/jsx-runtime";import{heroPhoneWordsStyle as ie}from"../../format/lib/hero-phone-stack.js";import{HideTaker as se}from"./ViewHideRoot.js";import{useRef as ae,useState as ne}from"react";import le from"./HeroPoster.js";import{HeroMediaLayer as ce,heroMediaReading as me,HeroPickArea as he,heroPartEntrance as ue,heroPartHover as de,heroPartScroll as fe,heroPictureOrigins as pe,HeroPictureHover as ge,heroPicturesHover as ve,HeroTint as ye,HeroTwoPictures as He}from"./HeroPictures.js";import{HeroVideoBackdrop as Pe,HeroVideoPlayer as xe}from"./HeroVideoPlay.js";import{resolveMedia as i}from"../lib/media.js";import{heroHeightBox as be,heroStoresRatio as we}from"../../format/lib/content/section-height.js";import{DEFAULT_OVERLAY_POSITION as Te,overlayGradient as Se}from"../../format/lib/sections/hero-overlay.js";import{ON_MEDIA_INK_STYLE as _e}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as h}from"../../format/lib/content/tint.js";import{HERO_ABSENT_MEDIA_TYPE as Ee}from"../../format/lib/hero-media-layout.js";import Ne from"./PhotoHoverSheet.js";import{partAttr as u}from"../../format/lib/content/part-names.js";function ke({overlay:A=100,overlayColor:I=h,overlayPosition:L=Te,mediaType:d=Ee.HeroSingle,mediaSrc:s,poster:f,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l,tintColor:p=h,tintOpacity:g=0,heightDesktop:O,heightMobile:R,heightFixed:V,heightFixedTablet:j,heightFixedMobile:z,phoneWordsTop:M,phoneWordsBottom:B,phoneBoxGap:D,boxes:v,videoSource:Y,youtubeUrl:F,videoPlayback:C,mediaLayout:U,mediaLayoutPhone:$,mediaImage2:G,objectPosition2:K,objectPosition2Phone:W,objectPosition2Tablet:q,tintColor2:J=h,tintOpacity2:Q=0,editing:o=!1,partMotion:r}){const y=be({heightDesktop:O,heightMobile:R,heightFixed:V,heightFixedTablet:j,heightFixedMobile:z}),{className:X,style:Z}=y,H=we(y),c=d==="video",P=c?i(s):void 0,x=c?i(f):i(s)??i(f),{fromYouTube:b,onClick:w,youTubeId:T,backgroundFile:S,desktopLayout:ee,phoneLayout:oe,twoPictures:_}=me({isVideo:c,videoSource:Y,videoPlayback:C,youtubeUrl:F,mediaLayout:U,mediaLayoutPhone:$}),[E,re]=ne(!1),m=!E,te=ae(null),t=d==="video"?"media":"image",N=ve(r);return k(se,{as:"section",ref:te,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${X} max-w-[var(--sf-hero-cap,none)] ${H?"overflow-clip":"overflow-hidden"}`,style:Z,...N.hostAttrs,...u("hero"),children:[e(Ne,{sheet:N.sheet}),e(ce,{partMotion:r,editing:o,children:_?e(He,{desktopLayout:ee,phoneLayout:oe,editing:o,partMotion:r,first:{src:s,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l,tintColor:p,tintOpacity:g},second:{src:G,objectPosition:K,objectPositionPhone:W,objectPositionTablet:q,tintColor:J,tintOpacity:Q}}):e(he,{part:t,editing:o,entrance:t==="image"?ue(r,"image"):null,scroll:t==="image"?fe(r,"image"):null,origins:pe({objectPosition:a,objectPositionTablet:l,objectPositionPhone:n}),className:"absolute inset-0 z-[1]",children:k(ge,{treatment:t==="image"?de(r,"image"):{},children:[e(le,{videoSrc:S?P:void 0,posterSrc:x,showVideo:S,objectPosition:a,objectPositionPhone:n,objectPositionTablet:l}),b&&e(Pe,{youTubeId:T,ownPoster:!!x,background:!w,editing:o})]})})}),w&&e(xe,{youTubeId:T,fileSrc:b?void 0:P,playing:E,onPlay:()=>re(!0),editing:o}),m&&!_&&e(ye,{color:p,opacity:g}),m&&e("div",{className:"pointer-events-none absolute inset-0 z-[2]",style:{background:Se(I,L),opacity:Math.min(Math.max(A,0),100)/100},...u("overlay")}),m&&v&&e("div",{className:[H?"sf-hero-group-layer relative min-h-full z-[3] mx-auto":"sf-hero-group-layer absolute inset-0 z-[3] mx-auto","max-w-[var(--sf-site-width,1600px)]","px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",o?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{..._e,...ie(M,B,D)},...u("hero-content"),children:e(v,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}export{ke as default};
|
|
@@ -9,6 +9,9 @@ export interface HeroSlideStyle {
|
|
|
9
9
|
textureColor?: string;
|
|
10
10
|
phoneUpDown?: string;
|
|
11
11
|
phoneSideways?: string;
|
|
12
|
+
phoneWordsTop?: number;
|
|
13
|
+
phoneWordsBottom?: number;
|
|
14
|
+
phoneBoxGap?: number;
|
|
12
15
|
quietVideo?: boolean;
|
|
13
16
|
holdReel?: () => void;
|
|
14
17
|
reelHeld?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as
|
|
1
|
+
"use client";import{jsx as e,jsxs as M}from"react/jsx-runtime";import{useTakeViewHide as Ee,withViewHide as Ae}from"./ViewHideRoot.js";import{createContext as _e,useContext as Le,useEffect as Oe,useRef as Ne,useState as W}from"react";import Ie from"./HeroPoster.js";import{HeroMediaLayer as Re,heroMediaReading as Ve,HeroPickArea as Ce,heroPartEntrance as Be,heroPartHover as De,heroPartScroll as je,heroPictureOrigins as ze,HeroPictureHover as Fe,heroPicturesHover as $e,HeroTint as Me,HeroTwoPictures as We}from"./HeroPictures.js";import{HeroVideoBackdrop as Ye,HeroVideoPlayer as qe}from"./HeroVideoPlay.js";import{BelowFirstScreen as Ge,useFirstScreenPlace as Ue}from"../lib/first-screen.js";import{markedChildren as Ke}from"../../format/lib/marked-children.js";import{resolveMedia as r}from"../lib/media.js";import{heroPhoneStackStyle as Je,heroPhoneWordsStyle as Qe}from"../../format/lib/hero-phone-stack.js";import{heroTextureGradient as Xe,heroTextureShown as Ze}from"../../format/lib/hero-texture.js";import{ON_MEDIA_INK_STYLE as eo}from"../../format/lib/content/ink.js";import{DEFAULT_TINT as Y}from"../../format/lib/content/tint.js";import{HERO_ABSENT_MEDIA_TYPE as oo}from"../../format/lib/hero-media-layout.js";import{overlayGradient as ro,slideOverlayState as to}from"../../format/lib/sections/hero-overlay.js";import io from"./PhotoHoverSheet.js";import{partAttr as w}from"../../format/lib/content/part-names.js";const no=_e({});function so({name:g,process:d,mediaType:q=oo.HeroSlide,mediaSrc:c,videoSpeed:H,poster:T,mediaAv1:G,mediaSrcPhone:U,mediaAv1Phone:K,posterPhone:J,objectPosition:f,objectPositionPhone:u,objectPositionTablet:p,tintColor:b=Y,tintOpacity:k=0,groups:E,editing:i=!1,themeClassName:A,themeStyle:Q,overlayColor:X,overlayPosition:Z,mediaLayout:ee,mediaLayoutPhone:oe,mediaImage2:re,objectPosition2:te,objectPosition2Phone:ie,objectPosition2Tablet:ne,tintColor2:se=Y,tintOpacity2:le=0,videoSource:ae,youtubeUrl:de,videoPlayback:ce,partMotion:n,laterSlide:h=!1}){const m=Ee(),{alignment:lo="left",textureOpacity:_,textureOn:fe,textureColor:ue,quietVideo:pe,phoneUpDown:he,phoneSideways:me,phoneWordsTop:ve,phoneWordsBottom:ye,phoneBoxGap:Se,holdReel:xe,reelHeld:Pe,shownSlide:v,ratioMin:L}=Le(no),we=Ue(),O=h&&we==="first",N=Ne(null),[ge,He]=W(v===void 0?void 0:!1);Oe(()=>{const P=N.current;He(v===void 0||!P?void 0:Ke(P.closest(".hero-track"),"data-slide-name")[v]===P)});const o=q==="video",y=o?r(c):void 0,I=o?r(T):r(c)??r(T),t=o?{av1:r(G),phone:r(U),av1Phone:r(K),poster:r(J)}:{},Te=typeof H=="number"?H/100:1,{fromYouTube:s,onClick:R,youTubeId:V,backgroundFile:l,desktopLayout:be,phoneLayout:ke,twoPictures:C}=Ve({isVideo:o,videoSource:ae,videoPlayback:ce,youtubeUrl:de,mediaLayout:ee,mediaLayoutPhone:oe}),[S,B]=W(!1);S&&Pe===!1&&B(!1);const x=!S,a=to({overlayColor:X,overlayPosition:Z},ue),D=o?null:Be(n,"image"),j=o?null:je(n,"image"),z=$e(n),F=e(Fe,{treatment:o?{}:De(n,"image"),children:e(Ie,{videoSrc:l?y:void 0,videoAv1Src:l?t.av1:void 0,videoSrcPhone:l?t.phone:void 0,videoAv1SrcPhone:l?t.av1Phone:void 0,posterSrc:I,posterSrcPhone:t.poster,showVideo:l,playbackRate:Te,objectPosition:f,objectPositionPhone:o?void 0:u,objectPositionTablet:o?void 0:p,quiet:pe,slideShown:ge,laterSlide:h,laterOfLead:O})}),$=M("section",{ref:N,className:Ae(`${L?"relative flex min-h-full w-full flex-col overflow-clip":"relative h-full w-full overflow-hidden"}${A?` ${A}`:""}`,m.className),...m.attrs,style:Q,"data-slide-name":g??"","data-slide-process":d??"","data-slide-media":l&&y?"video":"still",...z.hostAttrs,...w("slide"),children:[e(io,{sheet:z.sheet}),e(Re,{partMotion:n,editing:i,children:C?e(We,{laterSlide:h,desktopLayout:be,phoneLayout:ke,editing:i,partMotion:n,first:{src:c,objectPosition:f,objectPositionPhone:u,objectPositionTablet:p,tintColor:b,tintOpacity:k},second:{src:re,objectPosition:te,objectPositionPhone:ie,objectPositionTablet:ne,tintColor:se,tintOpacity:le}}):s||D||j?M(Ce,{part:o?"media":"image",editing:i,entrance:D,scroll:j,origins:ze({objectPosition:f,objectPositionTablet:p,objectPositionPhone:u}),className:"absolute inset-0 z-[1]",children:[F,s&&e(Ye,{youTubeId:V,ownPoster:!!I,background:!R,editing:i})]}):F}),R&&e(qe,{youTubeId:V,fileSrc:s?void 0:y,fileAv1Src:s?void 0:t.av1,fileSrcPhone:s?void 0:t.phone,fileAv1SrcPhone:s?void 0:t.av1Phone,playing:S,onPlay:()=>{B(!0),xe?.()},editing:i}),x&&!C&&e(Me,{color:b,opacity:k,passClicks:!1}),x&&Ze(fe)&&e("div",{className:"absolute inset-0 z-[2]",style:{background:a.own?ro(a.color,a.position??void 0):Xe(a.color),..._!==void 0?{opacity:_/100}:null},...w("overlay")}),x&&e("div",{className:[L?"sf-hero-group-layer relative z-[3] mx-auto w-full flex-1 max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14":"sf-hero-group-layer absolute inset-0 z-[3] mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",i?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{...eo,...Je(he,me),...Qe(ve,ye,Se)},...w("hero-content"),children:E&&e(E,{className:"sf-hero-group-zone",minEmptyHeight:160})})]});return m.scope(O?e(Ge,{children:$}):$)}const ko=Array.from({length:3},(g,d)=>({name:`Slide ${d+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));export{ko as HERO_SLIDE_SEEDS,no as HeroSlideStyleContext,so as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as le,jsxs as w}from"react/jsx-runtime";import{PagePicture as
|
|
1
|
+
import{jsx as e,Fragment as le,jsxs as w}from"react/jsx-runtime";import{PagePicture as ie}from"../lib/first-screen.js";import{SiteLink as me}from"../lib/site-runtime.js";import{siteLinkDraws as ae}from"../../format/lib/content/box-link.js";import ne from"./BlockFrame.js";import{partAttr as F}from"../../format/lib/content/part-names.js";import{useCellPictureSizes as ce}from"./BoxCellContext.js";import{useBoxCell as fe,useFillsCell as pe}from"./InBoxContext.js";import{useInsideSiteGutter as ue,useSectionEdge as de}from"./SiteGutterFrame.js";import{useSitePhotography as ge}from"./SitePhotographyContext.js";import{media as he}from"../lib/media.js";import{CONTENT_SIZES as j,sizedImage as Se}from"../../format/lib/sized-image.js";import{imageCornerStyle as ve}from"../../format/lib/content/image-corners.js";import{FILL_ROW as we,imageAspectClasses as Fe,pictureLayerClass as Ne,imageFillFrom as ye,imageAspectDrawn as Ce,imageAspectDrawsARatio as be,imageFocalPointActs as Ae,imageFocalPointActsIn as E,imageAspectPhoneOf as xe,imageFillRowClasses as ke,imageWidthFollowsBox as Ie,imageShapeStyle as $e}from"../../format/lib/content/image-aspect.js";import{drawsSiteGutter as _e}from"../../format/lib/content/site-gutter.js";import{imageFitClass as Pe,parseImageFit as Re}from"../../format/lib/content/image-fit.js";import{SECTION_FILL_CLASS as Oe}from"../../format/lib/content/section-min-height.js";import{PICTURE_WASH_CLASS as je,resolveImageTreatment as Ee}from"../../format/lib/content/image-treatment.js";import{boxDarkenStyle as He}from"../../format/lib/content/box-background.js";import{HOVER_LAYER_GROUND as ze}from"../../format/lib/content/hover-media.js";import{phoneFocus as Le}from"../../format/lib/content/phone-focus.js";import{say as Te}from"../../format/lib/editor-words.js";import{sectionEdgeAttrs as De}from"../lib/content/section-edge.js";import Ge from"./PhotoHoverSheet.js";import We from"./PictureWash.js";import Be from"./HoverMediaLayer.js";import{PictureHoverMoveSheet as Me,PictureHoverZoom as Ze,pictureHoverMoveOf as Ue}from"./PictureHoverMove.js";import{PictureZoom as Ve}from"./PictureZoom.js";function Ye({src:o,alt:H,aspect:z,aspectPhone:l,contained:N,grayscale:L,pictureHover:y,hoverLayer:s,darken:T,darkenStyle:C,href:D,fit:G,focal:b,focalPhone:W,focalTablet:B,corners:M,cornerSides:Z,cornersUnit:U,pad:A,ownSize:V=!1,editing:x=!1}){const n=Ee(L,ge(),y),u=fe(),Y=pe(),d=de(),q=ce(j),t=Ce(z,u?.picturesFillRow===!0),g=t===we,k=ye(u?.fillFrom,u?.phoneRowFills===!0,l),i=g?ke(k):null,h=xe(t,l),m=Re(G,"cover"),J=d||!Ie(t,h,m)?j:q,I=ve(M,Z,U),K=Ae(m,t,l),S=Le(E("mobile",m,t,l)?W:void 0,E("tablet",m,t,l)?B:void 0),$={...n.style??{},...b&&K?{objectPosition:b}:{},...S.style},c=o?Se(he(o)):null,r=Ue(y,C),Q=He(T,C),X=r?.washHover??null,_=$e(t,h),P=_?{...r?.style??{},..._}:r?.style??{},f=s&&o?e(Be,{media:s.media,name:s.name,cover:s.cover,ground:ze[s.cover]}):null,R=o&&c?e(ie,{src:c.src,...c.srcSet?{srcSet:c.srcSet,sizes:J}:{},alt:H,className:`${i?`${i.img} `:""}h-full w-full ${be(t,l)?Pe(m):""}${n.className?` ${n.className}`:""}${S.className?` ${S.className}`:""}`,...Object.keys($).length?{style:$}:{},...F("image")}):null,v=R?w(le,{children:[e(Ge,{sheet:n.sheet}),e(Me,{move:r}),e(Ze,{move:r,className:Ne(i),children:R}),e(We,{wash:Q,hover:X,className:`pointer-events-none ${je}`})]}):e("div",{className:"flex aspect-[16/9] items-center justify-center border border-dashed border-line font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim",children:Te("Image — set a path")}),p=(D??"").trim(),ee=p&&o?ae(p)?e(me,{href:p,className:"block h-full w-full",newTab:"auto",children:v}):e("a",{href:p,className:"block h-full w-full",children:v}):v,te=ue(),a=d&&!V?De(d):null,O=A?{values:A,frame:g?0:24}:void 0,oe=O!==void 0&&_e(a?!1:N,te),se=g?Y||x||oe?Oe:"":"py-6",re=o&&m==="contain"?"":"bg-surface ";return!o&&!x?null:w(ne,{contained:a?!1:N,className:se,pad:O,...a?{fillWidth:a.className,style:a.style}:{},part:F("image-block"),children:[e("figure",{...i?{className:i.figure}:{},children:w("div",{className:`relative w-full overflow-hidden ${re}${Fe(t,h,k)}${r?` ${r.className}`:""}`,...I||Object.keys(P).length?{style:{...I,...P}}:{},...F("image-frame"),children:[e(Ve,{fill:i,children:ee}),f&&s?.cover==="picture"?f:null]})}),f&&s?.cover==="card"?f:null]})}export{Ye as default};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { PartAttr } from "../../format/lib/content/part-names.js";
|
|
1
2
|
interface Props {
|
|
2
3
|
hideClass?: string;
|
|
3
4
|
hideAttrs?: Record<string, string>;
|
|
5
|
+
part?: PartAttr;
|
|
4
6
|
variant?: "header" | "footer";
|
|
5
7
|
scrolled?: boolean;
|
|
6
8
|
src?: string | null;
|
|
@@ -20,4 +22,4 @@ interface Props {
|
|
|
20
22
|
}
|
|
21
23
|
export { FOOTER_LOGO_PX, HEADER_LOGO_PX, HEADER_LOGO_PX_MAX, HEADER_LOGO_PX_MIN, LOGO_BLOCK_PX_MAX } from "../../format/lib/logo/logo-size.js";
|
|
22
24
|
export declare const WORDMARK_FIT_FLOOR_PX = 16;
|
|
23
|
-
export default function Logo({ variant, scrolled, src, reverse, color, onLightSurface, reversedSrc, inkIsDark, size, sizePx, sizeUnit, wordmark, siteName, fitToContainer, fitWordmarkToContainer, fitFloorPx, hideClass, hideAttrs }: Props): import("react").JSX.Element;
|
|
25
|
+
export default function Logo({ variant, scrolled, src, reverse, color, onLightSurface, reversedSrc, inkIsDark, size, sizePx, sizeUnit, wordmark, siteName, fitToContainer, fitWordmarkToContainer, fitFloorPx, hideClass, hideAttrs, part }: Props): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as a,jsxs as v}from"react/jsx-runtime";import{withViewHide as
|
|
1
|
+
"use client";import{jsx as a,jsxs as v}from"react/jsx-runtime";import{withViewHide as ut}from"./ViewHideRoot.js";import{useEffect as h,useId as dt,useRef as W,useState as p}from"react";import{NEUTRAL_SITE_NAME as mt}from"../../format/lib/content/site-name.js";import{useRootIsDark as ft}from"efficient-shell/theme";import{isSvgUrl as ht}from"../../format/lib/logo/reverse-svg.js";import{analyzeLogoViaServer as pt}from"../lib/logo/analyze-logo-client.js";import{siteLengthCss as _t}from"../../format/lib/content/css-length.js";import{FOOTER_LOGO_PX as Ot,HEADER_LOGO_GRID as gt,HEADER_LOGO_PX as Et}from"../../format/lib/logo/logo-size.js";import{FOOTER_LOGO_PX as Tt,HEADER_LOGO_PX as Mt,HEADER_LOGO_PX_MAX as Nt,HEADER_LOGO_PX_MIN as Wt,LOGO_BLOCK_PX_MAX as bt}from"../../format/lib/logo/logo-size.js";const Rt=202/22,It=.88,Gt=16,Lt="invert(1)";function At({variant:b="header",scrolled:C=!0,src:_,reverse:j=!1,color:O=null,onLightSurface:P,reversedSrc:D,inkIsDark:K,size:U="medium",sizePx:o,sizeUnit:V,wordmark:g,siteName:q=mt,fitToContainer:x=!1,fitWordmarkToContainer:B=!1,fitFloorPx:u,hideClass:Z,hideAttrs:z,part:J}){const d=g&&g.trim()?g.trim():q,[Q,Y]=p(null),S=W(null),tt=t=>{S.current=t};h(()=>{Y(S.current?.ownerDocument??null)},[]);const et=!ft({doc:Q,whenUnset:!0}),n=_&&_.trim()?_.trim():null,m=!!n&&ht(n),$=P??(et&&C),l=O&&O.trim()?O.trim():null,f=j&&!l,k=`logo-color-${dt().replace(/[^A-Za-z0-9_-]/g,"")}`,y=f&&m&&n&&D!=null?{reversed:D,inkIsDark:K??null}:null,w=y!==null,[nt,E]=p(null);h(()=>{if(!f||!n||!m||w){E(null);return}let t=!1;return E(null),pt(n).then(c=>{t||E(c)}),()=>{t=!0}},[f,n,m,w]);const s=y??nt,F=!!s&&s.inkIsDark!==null&&($?!s.inkIsDark:s.inkIsDark),lt=f&&!!n&&!m&&!$,R=F&&s?s.reversed:n,G=R?[R]:[],[X,I]=p(0);h(()=>{I(0)},[n,F]);const ot=b==="footer"?Ot:Et[U],i=o&&o>0?o:ot,r=(o&&o>0?_t(o,V,"size",gt):null)??`${i}px`,st=Math.round(i*Rt),e=X<G.length?G[X]:null,[rt,L]=p(R),H=e!==null&&e===rt,T=W(null);h(()=>{const t=T.current;if(!t||!t.complete)return;if(t.naturalWidth>0||t.naturalHeight>0){L(e);return}let c=!1;return t.decode().then(()=>!c&&L(e),()=>!c&&I(at=>at+1)),()=>{c=!0}},[e]);const M=x||B,N=`calc(100cqi / ${((d.length+1)*It).toFixed(2)})`,A=M&&u&&u>0?r===`${i}px`?`${Math.min(u,i)}px`:`min(${u}px, ${r})`:null,it=M?A===null?`min(${r}, ${N})`:`clamp(${A}, ${N}, ${r})`:r,ct=v("span",{className:`font-display font-bold tracking-[0.18em] ${A===null?"whitespace-nowrap":"whitespace-normal"}`,style:{fontSize:it,lineHeight:1,...l?{color:l}:{}},"aria-label":d,children:[d,a("span",{className:"text-accent",style:l?{color:l}:void 0,children:"."})]});return v("span",{ref:tt,className:ut("inline-flex items-center",Z??""),...z,...J,children:[!H&&ct,l&&e&&a("svg",{"aria-hidden":"true",focusable:"false",width:"0",height:"0",style:{position:"absolute"},children:v("filter",{id:k,colorInterpolationFilters:"sRGB",children:[a("feFlood",{style:{floodColor:l}}),a("feComposite",{in2:"SourceAlpha",operator:"in"})]})}),e&&a("img",{ref:T,src:e,alt:d,width:st,height:i,className:"shrink-0 object-contain",style:{...H?{height:r,width:"auto",...x?{maxWidth:"100cqi"}:{}}:{display:"none"},...lt?{filter:Lt}:{},...l?{filter:`url(#${k})`}:{}},onLoad:()=>L(e),onError:()=>I(t=>t+1)},e)]})}export{Tt as FOOTER_LOGO_PX,Mt as HEADER_LOGO_PX,Nt as HEADER_LOGO_PX_MAX,Wt as HEADER_LOGO_PX_MIN,bt as LOGO_BLOCK_PX_MAX,Gt as WORDMARK_FIT_FLOOR_PX,At as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e}from"react/jsx-runtime";import{HideTaker as W,NO_HIDE as H,useTakeViewHide as j,withViewHide as k}from"./ViewHideRoot.js";import{useContext as y}from"react";import{SiteLink as
|
|
1
|
+
"use client";import{jsx as e}from"react/jsx-runtime";import{HideTaker as W,NO_HIDE as H,useTakeViewHide as j,withViewHide as k}from"./ViewHideRoot.js";import{useContext as y}from"react";import{SiteLink as A}from"../lib/site-runtime.js";import F,{FOOTER_LOGO_PX as R,WORDMARK_FIT_FLOOR_PX as M}from"./Logo.js";import{media as P}from"../lib/media.js";import{BoxSurfaceContext as E}from"./BoxSurfaceContext.js";import{useBoxCellHasWidth as V}from"./BoxCellContext.js";import{useInSiteHeader as z}from"./PhoneMenuTools.js";import{useSiteLogo as G}from"./SiteLogoContext.js";import{useLogoWall as K}from"./LogoWallContext.js";import{LogoWallMark as X}from"./Logos.js";import{MarkZoom as I}from"./PictureZoom.js";import{useCardRow as J}from"./CardRowContext.js";import{alignViewClasses as v,BLOCK_ALIGN_JUSTIFY as U}from"../../format/lib/content/block-align.js";import{useDrawsAtEdge as Y}from"./InBoxContext.js";import{partAttr as Z}from"../../format/lib/content/part-names.js";function b(t){const o=K(),s=J();if(!o)return e(q,{...t});const m=(t.src??"").trim();return e(W,{className:"text-center",children:e(X,{src:m||void 0,alt:t.alt,look:o.look,logoHeight:o.logoHeight,grayscale:o.grayscale,kind:s?.row.kind})})}function q({src:t,alt:o,href:s,heightPx:m=R,reverse:D=!0,align:i,alignTablet:u,alignPhone:p,color:O=null}){const n=G(),w=(t??"").trim(),c=w?{src:P(w),reversedSrc:null,inkIsDark:null,wordmark:o?.trim()||null}:{src:n.src,reversedSrc:n.reversedSrc,inkIsDark:n.inkIsDark,wordmark:n.wordmark},_=y(E),x=z(),T=V(),r=!x&&T,a=j(),L={atSectionLine:!Y()},h=!!(i||r||v("justify",i,u,p,L)),l=h?H:a,d=s||r?H:l,N=e(F,{variant:"footer",sizePx:m,src:c.src,reverse:D,color:O,reversedSrc:c.reversedSrc,inkIsDark:c.inkIsDark,wordmark:c.wordmark,siteName:n.siteName,fitToContainer:x,fitWordmarkToContainer:r,fitFloorPx:r?M:void 0,..._?.dark?{onLightSurface:!1}:{},...d.className?{hideClass:d.className,hideAttrs:d.attrs}:{},part:Z("logo")}),g=r?"inline-flex max-w-full overflow-x-clip":"inline-flex",f=r?N:e(I,{children:N}),C=s?e(A,{href:s,newTab:"auto",className:k(g,l.className),...l.attrs,children:f}):r?e("span",{className:k(g,l.className),...l.attrs,children:f}):f,S=r?e(I,{inCell:!0,children:C}):C;if(!h)return a.scope(S);const B=["flex min-w-0",i?U[i]:"",v("justify",i,u,p,L),r?"[container-type:inline-size]":""].filter(Boolean).join(" ");return a.scope(e("div",{className:k(B,a.className),...a.attrs,children:S}))}export{b as default};
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import type { ReactNode, Ref } from "react";
|
|
2
2
|
import type { ListPosition } from "../../format/lib/content/list-position.js";
|
|
3
|
-
export declare function sideListGridClass(position: Exclude<ListPosition, "below"
|
|
3
|
+
export declare function sideListGridClass(position: Exclude<ListPosition, "below">, fullHeight?: boolean): string;
|
|
4
|
+
export declare const SIDE_LIST_CAP_CLASS = "max-h-[480px]";
|
|
4
5
|
export declare const SIDE_LIST_SCROLL_CLASS = "max-h-[480px] overflow-y-auto overscroll-contain max-view-wide:max-h-none";
|
|
5
6
|
export declare const SIDE_LIST_REACH_CLASS = "-mx-3 px-3";
|
|
6
7
|
export declare const SIDE_ROW_REACH_CLASS = "-mx-3";
|
|
8
|
+
export declare const SIDE_MAP_FIXED_HEIGHT_CLASS = "h-[480px]";
|
|
9
|
+
export declare const SIDE_MAP_STACKED_HEIGHT_CLASS = "max-view-wide:h-[320px]";
|
|
7
10
|
export declare const SIDE_MAP_CLASS = "h-[480px] max-view-wide:h-[320px]";
|
|
8
|
-
export
|
|
11
|
+
export declare const SIDE_MAP_FULL_CLASS = "h-full";
|
|
12
|
+
export declare function sideMapClass(fullHeight: boolean): string;
|
|
13
|
+
export default function SideListLayout({ position, attrs, head, list, listRef, listAttrs, map, rowsReachOut, fullHeight, }: {
|
|
9
14
|
position: Exclude<ListPosition, "below">;
|
|
10
15
|
attrs: Readonly<Record<string, string>>;
|
|
11
16
|
head?: ReactNode;
|
|
@@ -14,4 +19,5 @@ export default function SideListLayout({ position, attrs, head, list, listRef, l
|
|
|
14
19
|
listAttrs?: Readonly<Record<string, string>>;
|
|
15
20
|
map: ReactNode;
|
|
16
21
|
rowsReachOut?: boolean;
|
|
22
|
+
fullHeight?: boolean;
|
|
17
23
|
}): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r,jsxs as
|
|
1
|
+
import{jsx as r,jsxs as o}from"react/jsx-runtime";const l={left:"grid-cols-[minmax(260px,360px)_1fr]",right:"grid-cols-[1fr_minmax(260px,360px)]"};function m(e,i=!1){return[`grid ${i?"items-stretch":"items-start"} gap-6 max-view-wide:grid-cols-1`,l[e]].join(" ")}const L="max-h-[480px]",p=`${L} overflow-y-auto overscroll-contain max-view-wide:max-h-none`,A="-mx-3 px-3",h="-mx-3",C="h-[480px]",I="max-view-wide:h-[320px]",a=`${C} ${I}`,v="h-full",w="absolute inset-0";function D(e){return e?v:a}function E({position:e,attrs:i,head:n,list:d,listRef:x,listAttrs:S,map:t,rowsReachOut:c=!1,fullHeight:s=!1}){const _=[s?"":p,c?A:""].filter(Boolean).join(" ");return o("div",{...i,className:m(e,s),children:[o("div",{className:["min-w-0",e==="right"?"order-2":"","max-view-wide:order-2"].join(" "),children:[n,r("div",{ref:x,...S,className:_||void 0,children:d})]}),s?o("div",{className:["relative min-w-0",e==="right"?"order-1":"","max-view-wide:order-1"].join(" "),children:[r("div",{"data-side-map-floor":"","aria-hidden":"true",className:a}),r("div",{className:w,children:t})]}):r("div",{className:["min-w-0",e==="right"?"order-1":"","max-view-wide:order-1"].join(" "),children:t})]})}export{L as SIDE_LIST_CAP_CLASS,A as SIDE_LIST_REACH_CLASS,p as SIDE_LIST_SCROLL_CLASS,a as SIDE_MAP_CLASS,C as SIDE_MAP_FIXED_HEIGHT_CLASS,v as SIDE_MAP_FULL_CLASS,I as SIDE_MAP_STACKED_HEIGHT_CLASS,h as SIDE_ROW_REACH_CLASS,E as default,m as sideListGridClass,D as sideMapClass};
|
|
@@ -2,6 +2,7 @@ import type { WidthAnswer } from "../../format/lib/content/section-width.js";
|
|
|
2
2
|
import { type CSSProperties, type ReactNode } from "react";
|
|
3
3
|
import { type PadValues } from "../lib/content/section-padding.js";
|
|
4
4
|
import { type SectionEdge } from "../lib/content/section-edge.js";
|
|
5
|
+
import type { PartAttr } from "../../format/lib/content/part-names.js";
|
|
5
6
|
export declare function useInsideSiteGutter(): boolean;
|
|
6
7
|
export declare function InsideSiteColumn({ children }: {
|
|
7
8
|
children?: ReactNode;
|
|
@@ -38,7 +39,7 @@ export declare function SectionGroupChoice({ draw }: {
|
|
|
38
39
|
draw: (group: SectionGroupWidths | null) => ReactNode;
|
|
39
40
|
}): import("react").JSX.Element;
|
|
40
41
|
export declare function useSectionEdge(): SectionEdge | null;
|
|
41
|
-
export default function SiteGutterFrame({ contained, framedClass, fillClass, columnClass, style, tabLabel, pad, border, outerAttrs: outerAttrsIn, box, edge, outerStyle, outerClass: outerClassIn, bleed, siteSide, children, }: {
|
|
42
|
+
export default function SiteGutterFrame({ contained, framedClass, fillClass, columnClass, style, tabLabel, pad, border, outerAttrs: outerAttrsIn, box, edge, outerStyle, outerClass: outerClassIn, bleed, siteSide, part, children, }: {
|
|
42
43
|
contained: boolean;
|
|
43
44
|
framedClass: string;
|
|
44
45
|
fillClass: string;
|
|
@@ -57,5 +58,6 @@ export default function SiteGutterFrame({ contained, framedClass, fillClass, col
|
|
|
57
58
|
outerClass?: string;
|
|
58
59
|
bleed?: boolean;
|
|
59
60
|
siteSide?: boolean;
|
|
61
|
+
part?: PartAttr;
|
|
60
62
|
children?: ReactNode;
|
|
61
63
|
}): ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,Fragment as
|
|
1
|
+
"use client";import{jsx as t,Fragment as P}from"react/jsx-runtime";import{useTakeViewHide as Y,withViewHide as k}from"./ViewHideRoot.js";import{createContext as u,useContext as o}from"react";import{framePadAttrs as Z}from"../lib/content/section-padding.js";import{SECTION_BORDER_CLASS as b,SECTION_BORDER_SELF_CLASS as ee}from"../../format/lib/content/borders.js";import{BOX_HOLDS_NO_GUTTER_CLASS as te}from"../../format/lib/content/page-width.js";import{drawsSiteGutter as ne}from"../../format/lib/content/site-gutter.js";import{groundBeyond as oe}from"../lib/content/section-edge.js";const a=u(!1);function ve(){return o(a)}function Se({children:e}){return t(a.Provider,{value:!0,children:e})}const _=u(!1);function xe({children:e}){return t(_.Provider,{value:!0,children:e})}const V=u(null);function Ce({ground:e,children:n}){return t(V.Provider,{value:e,children:n})}const O=u(!1);function re(){return o(O)}function Ne({atTop:e,nested:n}){return t(P,{children:re()?n:e})}const f=u(void 0);function ge({children:e}){return t(f.Provider,{value:null,children:e})}function ie(){return o(f)===void 0&&!o(O)&&!o(a)}function Be({own:e,followed:n}){return t(P,{children:ie()?e():n()})}const W=u(null);function Ge({value:e,children:n}){return t(W.Provider,{value:e,children:n})}function Pe({draw:e}){return t(P,{children:e(o(W))})}function _e(){return o(f)??null}function se({contained:e,framedClass:n,fillClass:U,columnClass:R,style:A,tabLabel:X,pad:m,border:c,outerAttrs:E,box:h=!1,edge:q=!1,outerStyle:p,outerClass:w,bleed:v=!1,siteSide:z=!1,part:y,children:I}){const J=o(a),S=o(_),s=ne(e,J),i=s&&!S,l=Y(),L=!!(c&&i),d=L?w:k(w??"",l.className)||void 0,x=L||!l.className?E:{...E,...l.attrs},$=m?Z(m,i):null,C=$?.root??null,N=c&&!i?c:null,g=h&&!v?te:null,B=[i?n:U,i?g:null,C?.className,N?ee:null].filter(Boolean).join(" "),T=le(v&&i,C||N?{...A,...C?.style,...N}:A),K=o(f),M=o(V),Q=h&&q&&K===void 0?{gutter:s,...m?{pad:m.values}:{},beyond:s&&S?oe(M):"0px",...z&&s?{site:!0}:{}}:null,j=h?t(O.Provider,{value:!0,children:t(f.Provider,{value:Q,children:I})}):I,G=s?t(a.Provider,{value:!0,children:j}):j,r=$?.outer??null,F=x&&Object.keys(x).length>0?x:null,D=t("div",{...r?null:F,className:!r&&d?B?`${B} ${d}`:d:B,style:r||!p?T:{...T,...p},"data-tab-label":X,...r?null:y,children:S?t(_.Provider,{value:!1,children:s&&!v?t("div",{className:g?`${R} ${g}`:R,children:G}):G}):G}),H=r?t("div",{...F,className:d?`${r.className} ${d}`:r.className,style:p?{...r.style,...p}:r.style,...y,children:D}):D;return l.scope(c&&i?t("div",{className:k(b,l.className),style:{display:"contents",...c},...l.attrs,children:H}):H)}function le(e,n){return e?{...n,paddingLeft:0,paddingRight:0}:n}export{Ce as GroundStopsAt,Se as InsideSiteColumn,Ne as NestedBoxChoice,ge as NotASectionEdge,Pe as SectionGroupChoice,Ge as SectionGroupWidthsProvider,Be as SectionRootChoice,xe as SplitBandAndColumn,se as default,re as useInsideBox,ve as useInsideSiteGutter,_e as useSectionEdge,ie as useSectionRoot};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type PadValues } from "../lib/content/section-padding.js";
|
|
2
2
|
import { type HeadingLevel } from "./Heading.js";
|
|
3
3
|
import { type BlockAlign as Align } from "../../format/lib/content/block-align.js";
|
|
4
4
|
type Tone = "default" | "dim";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r,jsxs as
|
|
1
|
+
import{jsx as r,jsxs as w,Fragment as U}from"react/jsx-runtime";import{BLOCK_PAD_FRAME as p,ownPadOf as O}from"../lib/content/section-padding.js";import P from"./BlockFrame.js";import{partAttr as m}from"../../format/lib/content/part-names.js";import{renderGold as y,renderHeadline as X,renderPlain as K,splitParagraphs as V}from"./goldPhrases.js";import{headingLook as W}from"./Heading.js";import{alignViewClasses as Z,BLOCK_ALIGN_PLACE as $}from"../../format/lib/content/block-align.js";import{useDrawsAtEdge as q}from"./InBoxContext.js";import{textTagOf as J}from"../../format/lib/content/text-tag.js";import{KICKER_NUMBER_ATTR as Q,kickerLead as Y}from"../lib/content/page-contents.js";import{isTextStyleId as ee}from"../lib/document/part-styles.js";import{faceClassOf as R}from"../../format/lib/text-style-face.js";import{useMirroredCopy as te}from"./MirrorContext.js";import{mirroredTextClasses as j}from"../../format/lib/content/mirror-cards.js";import re from"./PartStyledKind.js";import z from"./PostDate.js";import{SiteLink as ne}from"../lib/site-runtime.js";import{markupHoldsLink as oe}from"../../format/lib/markup.js";const x={bodyUpTo800:"max-view-wide:text-[length:var(--size-body,14px)]",bodySmall:"text-[length:var(--size-body,15px)]",bodyLarge:"text-[length:var(--size-body,17px)]",label:"text-[length:var(--size-label,13px)]"},ie="underline underline-offset-2",o=e=>e?` ${e}`:"";function ae(e,l,c,i){const f=Z("place",e,l,c,{atSectionLine:!i});return f?` ${f}`:""}const se={left:`text-left${o($.left)}`,center:`text-left${o($.center)}`,right:`text-left${o($.right)}`},le=`max-w-[380px] ${x.bodySmall} leading-[1.5] opacity-80 ${x.bodyUpTo800}`,de={default:"text-fg",dim:"text-fg-dim"};function me(e){return String(Math.min(Number(e.slice(8)),6))}function ce({text:e,labelId:l,number:c,align:i,alignTablet:f,alignPhone:B,tone:L,contained:T,hero:F=!1,pad:b,tag:I,textStyle:k,ownWidth:M=!1,partAlign:_,onLine:N=!1,partKey:S,partDeclare:D=!1,plain:h=!1,href:C,date:d}){const G=t=>S?r(re,{kind:S,declare:D,children:t}):t,E=C&&!oe(e)?C:void 0,g=t=>G(E?r(ne,{href:E,className:ie,newTab:"auto",children:t}):t),A=te(),H=q();if(F)return r("p",{className:le,children:y(e)});const a=c?r("span",{[Q]:"",children:Y(c)}):void 0,s=ee(k)?k:void 0,v=`${s?`${R({id:s})} `:""}${M?"":"max-w-[680px] "}whitespace-pre-line ${s==="body-5"?x.label:x.bodyLarge} leading-[1.7]${o(i?se[i]:"")}${ae(i,f,B,H)}${o(L?de[L]:"")}${o(j(A,i,_))}`,u=J(I);if(s?.startsWith("heading-")){const t=me(s),n=W(t,R({id:s}));return r(P,{contained:T,...O(b,N?p.line:p.heading),part:m("text-block"),children:w(u,{id:l,className:`${n.className}${o(j(A,void 0,_))}`,style:n.style,...m("text"),children:[a,g(d?r(z,{at:d}):X(e.trim(),!1,h))]})})}return r(P,{contained:T,...O(b,N?p.line:p.text),part:m("text-block"),children:u==="p"&&!d?V(e).map((t,n)=>r("p",{id:n===0?l:void 0,className:v,...m("text"),children:g(h?K(t,n===0?a:void 0):y(t,!1,n===0?a:void 0))},n)):r(u,{id:l,className:v,...m("text"),children:g(d?w(U,{children:[a,r(z,{at:d})]}):h?K(e.trim(),a):y(e.trim(),!1,a))})})}export{ce as default,me as headingLevelOfStyle};
|
|
@@ -7,6 +7,8 @@ export declare const SECTION_PADDING: {
|
|
|
7
7
|
readonly step: 10;
|
|
8
8
|
};
|
|
9
9
|
export declare function sectionPadStyle(pt: unknown, pb: unknown, unit?: unknown, frame?: number): CSSProperties | undefined;
|
|
10
|
+
type SideFrames = (side: "top" | "bottom", tier: ViewTier) => number;
|
|
11
|
+
type TierFrames = Readonly<Record<ViewTier, number>>;
|
|
10
12
|
export declare const PAD_TOP_PHONE_CLASS = "sf-pad-top-phone";
|
|
11
13
|
export declare const PAD_BOTTOM_PHONE_CLASS = "sf-pad-bottom-phone";
|
|
12
14
|
export declare const PAD_TOP_PHONE_VAR = "--sf-pad-t-phone";
|
|
@@ -41,11 +43,11 @@ export type PadUnits = {
|
|
|
41
43
|
tablet?: unknown;
|
|
42
44
|
phone?: unknown;
|
|
43
45
|
};
|
|
44
|
-
export declare function sideViewLengths(desktop: number | SiteSide | undefined, tablet: number | SiteSide | undefined, phone: number | SiteSide | undefined, units?: PadUnits, frame?: number): {
|
|
46
|
+
export declare function sideViewLengths(desktop: number | SiteSide | undefined, tablet: number | SiteSide | undefined, phone: number | SiteSide | undefined, units?: PadUnits, frame?: number | TierFrames): {
|
|
45
47
|
tablet?: string;
|
|
46
48
|
phone?: string;
|
|
47
49
|
};
|
|
48
|
-
export declare function padSideAttrs(inline: PadSides, phone: PadSides, tablet?: PadSides, desktop?: PadSides, units?: PadUnits, frame?: number, sideSpace?: "box" | "site"): {
|
|
50
|
+
export declare function padSideAttrs(inline: PadSides, phone: PadSides, tablet?: PadSides, desktop?: PadSides, units?: PadUnits, frame?: number | SideFrames, sideSpace?: "box" | "site"): {
|
|
49
51
|
classes: string[];
|
|
50
52
|
style: CSSProperties;
|
|
51
53
|
};
|
|
@@ -98,6 +100,7 @@ export type PadValues = {
|
|
|
98
100
|
unitTablet?: unknown;
|
|
99
101
|
unitPhone?: unknown;
|
|
100
102
|
frame?: number;
|
|
103
|
+
totals?: readonly string[];
|
|
101
104
|
sideSpace?: "box" | "site";
|
|
102
105
|
};
|
|
103
106
|
export declare const SECTION_PAD_KEYS: {
|
|
@@ -108,6 +111,36 @@ export declare const SECTION_PAD_KEYS: {
|
|
|
108
111
|
};
|
|
109
112
|
export declare const BAND_TO_SECTION_PAD: ReadonlyArray<readonly [string, string]>;
|
|
110
113
|
export declare function padValuesOf(props: Record<string, unknown>, keys?: Record<"top" | "bottom" | "left" | "right", string>, sides?: boolean, unitKey?: string | undefined): PadValues;
|
|
114
|
+
export declare const PAD_TOTAL_KEY = "padTotal";
|
|
115
|
+
export declare function padTotalKeys(keys?: Record<"top" | "bottom", string>): string[];
|
|
116
|
+
export declare const TEXT_PAD_FRAME = 16;
|
|
117
|
+
export declare const HEADING_PAD_FRAME = 24;
|
|
118
|
+
export declare const BLOCK_PAD_FRAME: {
|
|
119
|
+
readonly text: 16;
|
|
120
|
+
readonly heading: 24;
|
|
121
|
+
readonly line: 0;
|
|
122
|
+
};
|
|
123
|
+
export declare const FRAME_CLASS: Readonly<Record<number, string>>;
|
|
124
|
+
export declare function ownPadOf(pad: PadValues | undefined, frame: number): {
|
|
125
|
+
className: string;
|
|
126
|
+
pad?: {
|
|
127
|
+
values: PadValues;
|
|
128
|
+
frame: number;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
export declare function framePadAttrs(pad: {
|
|
132
|
+
values: PadValues;
|
|
133
|
+
frame: number;
|
|
134
|
+
}, drawsGutter: boolean): {
|
|
135
|
+
root: {
|
|
136
|
+
className: string;
|
|
137
|
+
style: CSSProperties;
|
|
138
|
+
} | null;
|
|
139
|
+
outer: {
|
|
140
|
+
className: string;
|
|
141
|
+
style: CSSProperties;
|
|
142
|
+
} | null;
|
|
143
|
+
};
|
|
111
144
|
export declare function wrapperPadAttrs(v: PadValues): {
|
|
112
145
|
className: string;
|
|
113
146
|
style: CSSProperties;
|
|
@@ -116,3 +149,4 @@ export declare function rootPadAttrs(v: PadValues, frame: number): {
|
|
|
116
149
|
className: string;
|
|
117
150
|
style: CSSProperties;
|
|
118
151
|
} | null;
|
|
152
|
+
export {};
|