efficient-web-builder 73.1.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 +28 -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/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.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/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 +1 -0
- package/dist/format/lib/document/section-groups.js +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +11 -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/BoxTabPaneContext.d.ts +2 -3
- 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/Footprint.d.ts +6 -2
- package/dist/render/components/Footprint.js +1 -1
- package/dist/render/components/Heading.d.ts +1 -1
- package/dist/render/components/Heading.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/SideListLayout.d.ts +8 -2
- package/dist/render/components/SideListLayout.js +1 -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-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 +4 -2
- 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/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/routine-index.json +1 -0
- package/dist/value-index.json +1 -0
- package/package.json +5 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as M}from"react/jsx-runtime";import{useTakeViewHide 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,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};
|
|
@@ -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 {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{storedUnit as
|
|
1
|
+
import{storedUnit as X}from"../../../format/lib/content/css-length.js";import{VIEW_TIERS as R,phoneKey as I,resolveViewValue as q,tabletKey as y,viewKeyAt as b}from"efficient-easel/draw";import{ownEntry as z}from"../../../format/lib/own-entry.js";import{SECTION_PAD_UNIT_KEY as C,SITE_SIDE as J,convertLength as Q,isLengthUnit as Z,isSiteSide as V,sideLengthAt as v,sideValueAt as tt,withLength as S}from"efficient-easel/screen/lib/content/length-units";import{siteSideRoom as k}from"../../../format/lib/content/page-width.js";import{viewRules as ot}from"../../../format/lib/content/view-overrides.js";import{finiteNumber as l}from"../../../format/lib/finite-number.js";const et={min:10,max:200,step:10};function nt(t,o,e,s=0){const n=l(t),d=l(o);if(n===void 0&&d===void 0)return;const i=E(e),r=p=>p===void 0?void 0:i==="px"?p:S(p,i,s);return{paddingTop:r(n),paddingBottom:r(d)}}const E=t=>X(t),st={top:"top",bottom:"bottom"};function it(t,o,e,s){const n=l(t),d=l(o);if(n===void 0&&d===void 0)return;const i=E(e),r=(p,m)=>p===void 0?void 0:i==="px"?p:S(p,i,m);return{paddingTop:r(n,s("top","desktop")),paddingBottom:r(d,s("bottom","desktop"))}}const dt="sf-pad-top-phone",rt="sf-pad-bottom-phone",pt="--sf-pad-t-phone",at="--sf-pad-b-phone",lt="sf-pad-left-phone",ft="sf-pad-right-phone",ct="--sf-pad-l-phone",ut="--sf-pad-r-phone",bt="sf-pad-top-tablet",mt="sf-pad-bottom-tablet",Tt="sf-pad-left-tablet",At="sf-pad-right-tablet",_t="--sf-pad-t-tablet",Pt="--sf-pad-b-tablet",ht="--sf-pad-l-tablet",xt="--sf-pad-r-tablet",w="sf-section-pad";function N(t){const o={desktop:t.unit,tablet:t.unitTablet,phone:t.unitPhone},e=t.totals?.length?(d,i)=>t.totals.includes(b(d,i))?0:t.frame??0:t.frame,s=typeof e=="function"?it(t.top,t.bottom,t.unit,e):nt(t.top,t.bottom,t.unit,t.frame),n=Dt({left:t.left,right:t.right},{top:t.topPhone,bottom:t.bottomPhone,left:t.leftPhone,right:t.rightPhone},{top:t.topTablet,bottom:t.bottomTablet,left:t.leftTablet,right:t.rightTablet},{top:t.top,bottom:t.bottom,left:t.left,right:t.right},o,e,t.sideSpace);return s===void 0&&!n.classes.length&&!Object.keys(n.style).length?null:{className:[w,...n.classes].join(" "),style:{...s,...n.style}}}const gt=t=>V(t)?t:l(t),Et=[["top","paddingTop",[bt,_t],[dt,pt]],["bottom","paddingBottom",[mt,Pt],[rt,at]],["left","paddingLeft",[Tt,ht],[lt,ct]],["right","paddingRight",[At,xt],[ft,ut]]];function H(t,o,e){return!Z(o)||o==="px"?t:Q(t,"px",o,e,{min:0,max:et.max,step:1})}function St(t,o,e,s={},n=0){const d={desktop:!0,tablet:o!==void 0,mobile:e!==void 0},i={desktop:["desktop"],tablet:["tablet","desktop"],mobile:["mobile","tablet","desktop"]},r=a=>typeof n=="object"?n[a]:n,p=(a,u,h)=>{if(u==="px")return`${a}px`;const x=i[h].find(O=>d[O])??"desktop",g=S(a,u,r(x));return typeof g=="number"?`${g}px`:g},m={n:t,[y("n")]:o,[I("n")]:e,u:s.desktop,[y("u")]:s.tablet,[I("u")]:s.phone},A=q("spacing",l(t),l(o),l(e),ot()),T=(a,u,h)=>{if(tt(m,{side:"n"},a,"side",["side"])?.value===J)return k().value;const x=v(m,{side:"n"},"u",a,"side");if(!x)return;const g=u!==null&&!h&&x.unit==="px"&&typeof A[u]=="number";return p(g?A[u]:x.value,x.unit,a)},f=T("desktop",null,!0),_={},P=T("tablet","tablet",o!==void 0);P!==void 0&&(o!==void 0||P!==f)&&(_.tablet=P);const c=T("mobile","phone",e!==void 0);return c!==void 0&&(e!==void 0||c!==f)&&(_.phone=c),_}function Dt(t,o,e={},s=t,n={},d=0,i="box"){const r={},p={},m=[],A=k(i);let T=!1;for(const[f,_,...P]of Et){const c=f==="left"||f==="right"?gt:l,a=c(t[f]),u=z(st,f),h=u?typeof d=="function"?{desktop:d(u,"desktop"),tablet:d(u,"tablet"),mobile:d(u,"mobile")}:d:0,x=typeof h=="object"?h.desktop:h;V(a)?(r[_]=A.value,T=!0):a!==void 0&&(r[_]=E(n.desktop)==="px"?a:S(a,E(n.desktop),x));const g=St(c(s[f]),c(e[f]),c(o[f]),n,h);for(const[O,[$,W]]of[["tablet",P[0]],["phone",P[1]]]){const L=g[O];L!==void 0&&(m.push($),p[W]=L,L===A.value&&(T=!0))}}return T&&m.push(...A.className.split(" ")),{classes:m,style:{...r,...p}}}function M(t,o,e){const s=l(t)??e,n=l(o);return s===void 0?n:n===void 0?s:s+n}function Mt(t,o={}){return{top:M(t.padTop,t.sectionPaddingTop,o.top),bottom:M(t.padBottom,t.sectionPaddingBottom,o.bottom)}}const F={top:"padTop",bottom:"padBottom",left:"padLeft",right:"padRight"},B="padUnit";function Ot(t,o){const e=t[B],s=(n,d,i)=>{const r=l(n)??(i===void 0?void 0:H(i,e,"desktop")),p=l(d);return p===void 0?r:(r??0)+H(p,e,"desktop")};return{top:s(t.padTop,t.sectionPaddingTop,o.top),bottom:s(t.padBottom,t.sectionPaddingBottom,o.bottom)}}function Ft(t,o,e={}){const s=Ot(t,o),n={...Lt(t,F,!0,B),top:s.top,bottom:s.bottom};e.noTop&&Object.assign(n,{top:0,topTablet:void 0,topPhone:void 0});const d=N(n),i=d?d.className.split(" ").filter(r=>r!==w):[];return{...i.length?{className:i.join(" ")}:{},style:d?.style??{}}}const D={top:"sectionPaddingTop",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft",right:"sectionPaddingRight"},jt=[...["top","bottom","left","right"].map(t=>[F[t],D[t]]),[B,C]].flatMap(([t,o])=>[[t,o],...["tablet","mobile"].map(e=>[b(t,e),b(o,e)])]);function Lt(t,o=D,e=!0,s=o===D?C:void 0){const n={};if(s){t[s]!==void 0&&(n.unit=t[s]);for(const i of["tablet","mobile"])t[b(s,i)]!==void 0&&(n[b("unit",i)]=t[b(s,i)])}for(const i of e?["top","bottom","left","right"]:["top","bottom"]){n[i]=t[o[i]];for(const r of["tablet","mobile"])n[b(i,r)]=t[b(o[i],r)]}const d=t[Nt];if(Array.isArray(d)){const i=j.flatMap(r=>R.filter(p=>d.includes(b(o[r],p))).map(p=>b(r,p)));i.length&&(n.totals=i)}return n}const Nt="padTotal",j=["top","bottom"];function Gt(t=D){return j.flatMap(o=>R.map(e=>b(t[o],e)))}const G=16,K=24,Bt={text:G,heading:K,line:0},Rt={[G]:"py-4",[K]:"py-6",[Bt.line]:""};function Kt(t,o){return{className:Rt[o]??"",...t?{pad:{values:t,frame:o}}:{}}}function Ut(t,o){if(!o)return{root:Y(t.values,t.frame),outer:null};if(!t.values.totals?.length)return{root:null,outer:U(t.values)};const e=t.values,{top:s,bottom:n,topTablet:d,bottomTablet:i,topPhone:r,bottomPhone:p,left:m,right:A,leftTablet:T,rightTablet:f,leftPhone:_,rightPhone:P,...c}=e;return{root:Y({...c,top:s,bottom:n,topTablet:d,bottomTablet:i,topPhone:r,bottomPhone:p},t.frame),outer:U({...c,totals:void 0,left:m,right:A,leftTablet:T,rightTablet:f,leftPhone:_,rightPhone:P})}}function U(t){return N(t)}function Y(t,o){const e=(s,n,d)=>typeof s!="number"?void 0:E(n)==="px"&&!t.totals?.includes(d)?s+o:s;return N({...t,frame:o,top:e(t.top,t.unit,"top"),bottom:e(t.bottom,t.unit,"bottom"),topTablet:e(t.topTablet,t.unitTablet,"topTablet"),bottomTablet:e(t.bottomTablet,t.unitTablet,"bottomTablet"),topPhone:e(t.topPhone,t.unitPhone,"topPhone"),bottomPhone:e(t.bottomPhone,t.unitPhone,"bottomPhone")})}export{F as BAND_PAD_KEYS,B as BAND_PAD_UNIT_KEY,jt as BAND_TO_SECTION_PAD,Bt as BLOCK_PAD_FRAME,Rt as FRAME_CLASS,K as HEADING_PAD_FRAME,rt as PAD_BOTTOM_PHONE_CLASS,at as PAD_BOTTOM_PHONE_VAR,mt as PAD_BOTTOM_TABLET_CLASS,Pt as PAD_BOTTOM_TABLET_VAR,lt as PAD_LEFT_PHONE_CLASS,ct as PAD_LEFT_PHONE_VAR,Tt as PAD_LEFT_TABLET_CLASS,ht as PAD_LEFT_TABLET_VAR,ft as PAD_RIGHT_PHONE_CLASS,ut as PAD_RIGHT_PHONE_VAR,At as PAD_RIGHT_TABLET_CLASS,xt as PAD_RIGHT_TABLET_VAR,dt as PAD_TOP_PHONE_CLASS,pt as PAD_TOP_PHONE_VAR,bt as PAD_TOP_TABLET_CLASS,_t as PAD_TOP_TABLET_VAR,Nt as PAD_TOTAL_KEY,et as SECTION_PADDING,w as SECTION_PAD_CLASS,D as SECTION_PAD_KEYS,G as TEXT_PAD_FRAME,Ft as bandPadAttrs,Ot as bandTopBottom,Ut as framePadAttrs,Kt as ownPadOf,H as padDefaultIn,Dt as padSideAttrs,gt as padSideValue,Gt as padTotalKeys,Lt as padValuesOf,Mt as resolveSectionPadding,Y as rootPadAttrs,N as sectionPadAttrs,nt as sectionPadStyle,St as sideViewLengths,U as wrapperPadAttrs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as n,Fragment as
|
|
1
|
+
import{jsx as n,Fragment as p}from"react/jsx-runtime";import{CardRowDrawn as T}from"../../../../../components/CardRowContext.js";import j from"../../../../../components/ButtonBlock.js";import{CARD_ROW_LINK_PROP as k,namedRowField as l}from"../../../../../../format/lib/content/card-template.js";import{namedLinkHrefRewrite as y}from"../../../../../../format/lib/links/link-href-rewrites.js";import{CTA_PH as v}from"../../../../../../format/lib/document/blocks/placeholders.js";import{phPrev as A}from"../../scaffold.js";import{phoneKey as D}from"efficient-easel/draw";import{padValuesOf as E}from"../../../../content/section-padding.js";import{ButtonBlockMeta as H}from"../../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";const G={...H,render:o=>{const{label:m,href:c,variant:d,align:f,alignTablet:b,alignPhone:s,contained:u,arrow:h,icon:g,iconPosition:w,widthFit:P,buttonColor:B,buttonTextColor:C,editor:r}=o,F=Object.fromEntries(Object.entries(o).filter(([t])=>t==="buttonFillOpacity"||t==="buttonBorder"||t==="buttonCorners"||t==="buttonCornerSides"||t.startsWith("buttonPadding"))),i=y(o),R=i?{hrefRewrite:i}:{},e=(t,a)=>n(j,{label:A(t,v.text,r)??"",href:a,variant:d,align:f,alignTablet:b,alignPhone:s,contained:u,arrow:h,icon:g,iconPosition:w,widthFit:P,widthFitPhone:o[D("widthFit")],buttonColor:B,buttonTextColor:C,...F,...R,blockPad:E(o)}),_=l(o),x=l(o,k);return!_&&!x?e(m,c):n(T,{type:"ButtonBlock",props:o,children:(t,a,O)=>O&&!r?.isEditing&&!(typeof t.label=="string"&&t.label.trim())?n(p,{}):e(t.label,t.href)})}};export{G as ButtonBlockRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{HideTaker as m}from"../../../../../components/ViewHideRoot.js";import{CUSTOM_HTML_SCOPE_ATTR as u,scopeCustomCss as T,splitCustomHtml as i}from"../../../custom-css.js";import{CustomHTMLMeta as l}from"../../../../../../format/lib/document/blocks/general/CustomHTML/meta.js";const M={...l,render:({html:n,id:t})=>{const{css:r,markup:s,ids:p}=i(n??"",String(t??"")),e=r?T(r,String(t??""),void 0,p):"";return e?o(m,{[u]:t,dangerouslySetInnerHTML:{__html:`<style>${e}</style>${s}`}}):o(m,{dangerouslySetInnerHTML:{__html:s}})}};export{M as CustomHTMLRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as m}from"react/jsx-runtime";import{bandPadAttrs as l}from"../../../../content/section-padding.js";import{innerPaddingFallback as h}from"../../../passes/section-padding.js";import u from"../../../../../components/Footprint.js";import{FOOTPRINT_DEFAULTS as y,footprintHeadInList as g,footprintListColumns as T,footprintListPosition as S,footprintMapHeight as O,footprintOfficeOfRow as w,footprintShows as C}from"../../../../../../format/lib/content/footprint.js";import{DEALERS_SOURCE as s,declaredBlockSource as c,sourcedRows as P}from"../../../../../../format/lib/content/block-sources.js";import{hidableText as f}from"efficient-easel/draw";import{parseSectionHeadPlacement as H}from"../../../../../../format/lib/sections/section-head-placement.js";import{phRows as R,phHide as a}from"../../scaffold.js";import{say as e}from"../../../../../../format/lib/editor-words.js";import{CARD_TEMPLATE_SLOT as b}from"../../../../../../format/lib/content/card-template.js";import{cardPressTitlesOf as x}from"../../../card-press-titles.js";import{FootprintMeta as E,FOOTPRINT_PH as d}from"../../../../../../format/lib/document/blocks/general/Footprint/meta.js";const F=()=>[{role:e("Headquarters"),city:e("City"),country:e("Country"),address:e("Street address"),lat:0,lng:0,hq:!0},{role:e("Office"),city:e("City"),country:e("Country"),address:e("Street address"),lat:0,lng:0,hq:!1}],L=()=>[{role:e("Headquarters"),city:e("City"),country:e("Country"),address:e("Street address"),hq:"true"},{role:e("Office"),city:e("City"),country:e("Country"),address:e("Street address")}];function _(t){const i=()=>R(t.offices,F(),t.editor),o=c(t);if(!o||o===s)return i();const n=t.editor?.isEditing===!0,r=P(t,n,L());return!r.sample&&!r.rows.length?i():r.rows.map(w)}const J={...E,render:t=>{const i=H(t.headPlacement)==="own-box",o=r=>i?void 0:r,n=_(t);return m(u,{sectionNumber:o(a(t.sectionNumber,d.sectionNumber,t.editor)),heading:o(a(t.heading,d.heading,t.editor)),tagline:o(a(t.tagline,d.tagline,t.editor)),omitHead:i,offices:n,mapTheme:t.mapTheme??y.mapTheme,bandPad:l(t,h("Footprint"),{noTop:i}),editing:t.editor?.isEditing,dealers:c(t)===s,search:t.search===!0,searchHint:f(t.searchHint),noMatchText:f(t.noMatchText),listPosition:S(t),showDistance:t.showDistance!==!1,shows:C(t),listColumns:T(t),mapHeight:O(t),headInList:g(t),template:t.template,ownerId:String(t.id??""),pressTitles:x(t,b)})}};export{J as FootprintRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as B}from"react/jsx-runtime";import D from"../../../../../components/HeroSection.js";import{HeroMeta as I}from"../../../../../../format/lib/document/blocks/general/Hero/meta.js";const C={...I,render:({slides:e,strip:o,alignment:t,textureOpacity:r,showTexture:i,textureColor:h,phoneUpDown:p,phoneSideways:a,phoneWordsTop:s,phoneWordsBottom:n,phoneBoxGap:l,autoplay:d,autoplayInterval:m,showTicker:c,tickerItems:x,heightDesktop:g,heightTablet:w,heightMobile:k,heightFixed:u,heightFixedTablet:T,heightFixedMobile:b,showPicker:y,pickerShape:M,pickerPlacement:S,showArrows:f,arrowsShape:F,arrowsPlacement:H,_partMotion:P,editor:j})=>B(D,{slides:e,strip:o,alignment:t,textureOpacity:r,showTexture:i,textureColor:h,phoneUpDown:p,phoneSideways:a,phoneWordsTop:s,phoneWordsBottom:n,phoneBoxGap:l,autoplay:d,autoplayInterval:m,showTicker:c,tickerItems:x,heightDesktop:g,heightTablet:w,heightMobile:k,heightFixed:u,heightFixedTablet:T,heightFixedMobile:b,showPicker:y,pickerShape:M,pickerPlacement:S,showArrows:f,arrowsShape:F,arrowsPlacement:H,editing:j?.isEditing,partMotion:P})};export{C as HeroRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as U}from"react/jsx-runtime";import V from"../../../../../components/HeroSingle.js";import{HeroSingleMeta as _}from"../../../../../../format/lib/document/blocks/general/HeroSingle/meta.js";import{viewFocusValues as d}from"../../../../../../format/lib/content/picture-focus-rows.js";import{HERO_FOCUS as r}from"../../../../../../format/lib/hero-media-layout.js";import{editorVideoFrame as w}from"../../../../../../format/lib/hero-video.js";const A={..._,render:o=>{const{mediaType:e,mediaImage:m,mediaVideo:a,poster:h,tintColor:l,tintOpacity:p,overlay:s,overlayColor:g,overlayPosition:b,heightDesktop:c,heightMobile:u,heightFixed:y,heightFixedTablet:P,heightFixedMobile:f,phoneWordsTop:x,phoneWordsBottom:v,phoneBoxGap:F,boxes:j,videoSource:T,youtubeUrl:k,videoPlayback:C,mediaLayout:M,mediaLayoutPhone:S,mediaImage2:O,tintColor2:B,tintOpacity2:H,_partMotion:L,editor:n,id:W}=o,i=d(o,r.image),t=d(o,r.image2),I=e==="image"?void 0:w(W,a,n?.metadata);return U(V,{mediaType:e,videoSource:T,youtubeUrl:k,videoPlayback:C,mediaLayout:M,mediaLayoutPhone:S,mediaImage2:O||void 0,objectPosition2:t.desktop,objectPosition2Phone:t.phone,objectPosition2Tablet:t.tablet,tintColor2:B,tintOpacity2:H,mediaSrc:(e==="image"?m:a)||void 0,poster:h||I||void 0,objectPosition:e==="image"?i.desktop:void 0,objectPositionPhone:e==="image"?i.phone:void 0,objectPositionTablet:e==="image"?i.tablet:void 0,tintColor:l,tintOpacity:e==="image"?p:0,overlay:s,overlayColor:g,overlayPosition:b,heightDesktop:c,heightMobile:u,heightFixed:y,heightFixedTablet:P,heightFixedMobile:f,phoneWordsTop:x,phoneWordsBottom:v,phoneBoxGap:F,boxes:j,editing:n?.isEditing,partMotion:L})}};export{A as HeroSingleRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as a,Fragment as m}from"react/jsx-runtime";import{readHidable as s}from"efficient-easel/draw";import{useBoxCell as d}from"../../../../../components/InBoxContext.js";import l from"../../../../../components/LocationMap.js";import{hasMapCoords as u}from"../../../../../../format/lib/map-styles.js";import{LocationMapMeta as c}from"../../../../../../format/lib/document/blocks/general/LocationMap/meta.js";const h="relative overflow-hidden h-full min-h-[560px] max-view-desktop:h-auto max-view-desktop:min-h-0 max-view-desktop:aspect-square",
|
|
1
|
+
import{jsx as a,Fragment as m}from"react/jsx-runtime";import{readHidable as s}from"efficient-easel/draw";import{useBoxCell as d}from"../../../../../components/InBoxContext.js";import l from"../../../../../components/LocationMap.js";import{hasMapCoords as u}from"../../../../../../format/lib/map-styles.js";import{LocationMapMeta as c}from"../../../../../../format/lib/document/blocks/general/LocationMap/meta.js";import{parseOption as x}from"../../../../../../format/lib/parse-option.js";const h="relative overflow-hidden h-full min-h-[560px] max-view-desktop:h-auto max-view-desktop:min-h-0 max-view-desktop:aspect-square",p="relative overflow-hidden grow shrink-0 max-view-wide:shrink basis-0 min-h-[560px] max-view-desktop:basis-auto max-view-desktop:h-auto max-view-desktop:min-h-0 max-view-desktop:aspect-square",w=new Set(["auto","dark","light"]),t=e=>s(e).text.trim();function f(e){return a(l,{...e,takesViewHide:!0,boxClass:d()?.fillingColumn?p:h})}const L={...c,render:e=>{const o=Number(e.lat),i=Number(e.lng),n=e.editor?.isEditing===!0;if(!n&&!u(o,i))return a(m,{});const r=e.mapTheme;return a(f,{name:t(e.name),state:t(e.state),country:t(e.country),lat:o,lng:i,mapsUrl:t(e.mapsUrl),mapTheme:x([...w],"auto",r),editing:n})}};export{L as LocationMapRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import g from"../../../../../components/LogoBlock.js";import{CardRowDrawn as p}from"../../../../../components/CardRowContext.js";import{readHidable as s}from"efficient-easel/draw";import{readLogoColor as h}from"../../../../../../format/lib/logo/logo-color.js";import{blockAlignOf as k}from"../../../../../../format/lib/content/block-align.js";import{LogoBlockMeta as x}from"../../../../../../format/lib/document/blocks/general/LogoBlock/meta.js";const w={...x,render:e=>r(p,{type:"LogoBlock",props:e,children:({src:l,alt:n,href:t,heightPx:i,reverse:m,customColor:d,align:a,alignTablet:f,alignPhone:c})=>{const o=h(m,d);return r(g,{src:l||void 0,alt:s(n).text||void 0,href:t||void 0,heightPx:i,reverse:o.reverse,color:o.color,align:k(a),alignTablet:f,alignPhone:c})}})};export{w as LogoBlockRender};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{SPLITTABLE_SECTIONS as P}from"../../../../../format/lib/sections/section-head-placement.js";import{AUTO_COLUMN as A,BUTTON as M,DIM as W,INNER_BOX as r,SH_LINK as
|
|
2
|
-
one standard.`,k)]:[]]}]},{kind:"group",name:"Words",props:{...r,...s,gap:12,maxWidth:340,maxWidthPhone:f},parts:[...t.description?[T(t.description,14,void 0,{lineHeight:1.5})]:[],...t.link?[S(14)]:[],...g?[{kind:"block",type:"ButtonBlock",props:{...
|
|
1
|
+
import{SPLITTABLE_SECTIONS as P}from"../../../../../format/lib/sections/section-head-placement.js";import{AUTO_COLUMN as A,BUTTON as M,DIM as W,INNER_BOX as r,SH_LINK as R,TEXT as h,smallText as C}from"./section-to-box-row-parts.js";import{labelTextSeed as D}from"../../../../../format/lib/document/text-seeds.js";import{labelStyle as x,token as a}from"../../../../../format/lib/document/seed-parts.js";import{tabletKey as H}from"efficient-easel/draw";import{BOX_DESKTOP_LINE as w,STACK_BELOW_PROP as K}from"../../../content/box-stack-line.js";import{PHONE_EDGE as F}from"../../../../../format/lib/content/view-lines.js";import{ownEntry as u}from"../../../../../format/lib/own-entry.js";import{parseOption as z}from"../../../../../format/lib/parse-option.js";const U=["standard","editorial","simple","essay"];function E(e){if(e==="ProductGrid")return"shelf";const t=u(P,e)?.headStyle;return z(U,"standard",t)}const se={standard:64,editorial:60,simple:36,essay:28,shelf:20},j={SectionHeader:"accent",FAQ:"accent",FitmentFinder:"accent",FitmentTable:"accent",SpecTable:"accent",RelatedProducts:"accent",Collections:"accentNum"};function $(e){if(e==="SectionHeader")return{num:"num",title:"title",description:"description",link:!0};const t=u(P,e);if(!t)throw new Error(`section-head-looks: "${e}" has no head row in SPLITTABLE_SECTIONS`);return{num:t.num,title:t.title,description:t.description,link:t.headRows.includes("linkText")&&t.headRows.includes("linkHref")}}function le(e,t,n){const i=`editorial:${e}|${t}|${n}`,o=p.get(i);if(o)return o;const l=y({num:e,title:t,description:n,link:!1});return p.set(i,l),l}const O={[K]:w},m={top:0,right:0,bottom:1,left:0};import{token as he}from"../../../../../format/lib/document/seed-parts.js";const _=(e,t,n,i)=>({sizeToken:{step:e,px:i,fluid:{minPx:t,vw:n}}}),c=(e,t,n={})=>C(e,{...a("label",t),...n}),d=(e,t)=>({kind:"text",key:e,role:"heading",props:h,style:{textStyle:"heading-2",...t}}),f=F,v=w,T=(e,t,n,i,o={})=>({kind:"text",key:e,props:{...W,align:"right",alignPhone:"left",...n?{maxWidth:n,maxWidthPhone:f}:{},...o},style:{textStyle:"body-5",fontRole:"heading",alignPhone:"left",...a("body",t),...i,...o}}),b={...M,align:"right",alignPhone:"left",...R},S=e=>({kind:"button",key:"linkText",href:"linkHref",variant:"ghost",props:b,style:{...x(e),color:"labels"}}),N=(e,t,n)=>{const i=n.role==="heading"?{tag:"h2"}:{};return{kind:"block",type:"Text",when:o=>o[e]===void 0,props:{...h,...i,...n.props,text:t,_partStyles:{text:{...n.role==="eyebrow"?G(D()):{},...n.style}}}}},G=e=>e._partStyles.text??{},s={widthFitPhone:"fill"};function X(e){if(e.kind!=="group")return e;if(e.name==="Words"){const t=e.props;return{...e,props:typeof t=="function"?(n,i)=>({...t(n,i),...s}):{...t,...s}}}return{...e,parts:e.parts.map(X)}}function Q(e,t){const n=u(j,e),i=n==="accent",o=c(t.num,14,{color:i?"accent":"labels"}),l=n==="accentNum"&&o.kind==="text"?{...o,mark:"accentLead"}:o,k=d(t.title,i?{..._("headingMedium",36,5,64),case:"upper",lineHeight:.95,letterSpacing:-.025}:{...a("headingMedium",56,36),case:"none",lineHeight:1,letterSpacing:-.03}),g=e==="Collections";return{kind:"group",name:"Header",props:{...r,direction:"row",align:"end",justify:"between",gap:40,gapPhone:12,share:"content",sectionBorder:m,sectionPaddingBottom:24,sectionPaddingBottomPhone:20},parts:[{kind:"group",name:"Title",props:{...r,...s,direction:"row",align:"end",gap:40,gapPhone:12,share:"content"},parts:[{kind:"group",name:"Number",props:{...r,...s,align:"start",gap:12},parts:[{kind:"image",key:"logoSrc",alt:"logoAlt",props:{aspect:"auto",contained:!1}},l,...g?[N(t.num,"==01== / Collections",l)]:[]]},{kind:"group",name:"Heading",props:{...r,...s},parts:[k,...g?[N(t.title,`Three ranges,
|
|
2
|
+
one standard.`,k)]:[]]}]},{kind:"group",name:"Words",props:{...r,...s,gap:12,maxWidth:340,maxWidthPhone:f},parts:[...t.description?[T(t.description,14,void 0,{lineHeight:1.5})]:[],...t.link?[S(14)]:[],...g?[{kind:"block",type:"ButtonBlock",props:{...b,variant:"ghost",label:"View all",href:"/wheels",_partStyles:{label:S(14).style}}}]:[]]}]}}function L(e,t){return e.kind==="text"?t.includes(e.key)?{...e,mark:"accentItalic"}:e:e.kind==="group"?{...e,parts:e.parts.map(n=>L(n,t))}:e}function y(e){const t=d(e.title,{..._("headingMedium",40,5.5,80),case:"upper",weight:500,lineHeight:1,letterSpacing:-.03});return{kind:"group",name:"Header",props:{...r,direction:"row",align:"end",justify:"between",gap:40,gapPhone:14,share:"content",sectionBorder:m,sectionPaddingBottom:32,...O},parts:[{kind:"group",name:"Title",props:{...r,direction:"row",align:"end",gap:40,gapPhone:14,share:"content",...O},parts:[{kind:"group",name:"Number",props:{...r,sectionPaddingBottom:8},parts:[{...c(e.num,13),props:{...h,...A}}]},L(t,[e.title])]},{kind:"group",name:"Words",props:{...r,sectionPaddingBottom:4,maxWidth:360,[H("maxWidth")]:v,maxWidthPhone:f},parts:e.description?[T(e.description,14,void 0,{lineHeight:1.5},{[H("align")]:"left"})]:[]}]}}function B(e,t){return{kind:"group",name:"Header",props:{...r,gap:16,gapPhone:16},parts:[c(e.num,13),d(e.title,t)]}}const I=[["para",{...x(13),weight:400,lineHeight:1,letterSpacing:.22}],["sm",{...a("headingMedium",40,28),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["md",{...a("headingMedium",48,32),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["lg",{...a("headingMedium",56,36),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["xl",{...a("headingMedium",64,40),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}]],V=e=>I.some(([t])=>t===e.titleSize)?e.titleSize:"lg";function q(e){return{kind:"group",name:"Header",props:{...r,direction:"row",align:"center",justify:"between",gap:16,share:"content",stickTop:!0,sectionBorder:m,sectionPaddingTop:12,sectionPaddingBottom:12},parts:[{kind:"group",name:"Title",props:{...r,direction:"row",align:"end",gap:24,share:"content"},parts:[c(e.num,13,{color:"labels",letterSpacing:.22,lineHeight:1}),...I.map(([t,n])=>({...d(e.title,n),when:i=>V(i)===t}))]},{kind:"group",name:"Words",props:{...r,direction:"row",align:"center",justify:"end",gap:20,share:"content"},parts:[...e.description?[T(e.description,13,340,{lineHeight:1.4})]:[],...e.link?[S(13)]:[]]}]}}function ce(e){return E(e)==="shelf"?{titleSize:"the Header Box's title Text part: its size, as the old shelf title drew it (lib/document/blocks/general/section-head-looks)"}:{}}const p=new Map,J={...a("headingMedium",44,32),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02};function de(e){const t=p.get(e);if(t)return t;const n=$(e),i=E(e),o=i==="editorial"?y(n):i==="simple"?B(n,J):i==="essay"?B(n,{...a("headingMedium",38,28,"headingSmall"),case:"upper",lineHeight:1,letterSpacing:-.02}):i==="shelf"?q(n):Q(e,n);return p.set(e,o),o}export{O as EDITORIAL_LINE,se as HEAD_BELOW,J as SIMPLE_HEADING_LOOK,le as editorialHeadTree,_ as fluidToken,E as headLookOf,ce as headReads,de as headTree,X as headWordsOnPhoneLine,he as token,L as withAccentItalic};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{phoneKey as K}from"efficient-easel/draw";import{SITE_SIDE as Y}from"efficient-easel/screen/lib/content/length-units";import{finiteNumber as r}from"../../../../../format/lib/finite-number.js";import{BLOCK_ALIGN_BOX_WORD as X}from"../../../../../format/lib/content/block-align.js";import{splitImageOverlay as x}from"../../../../../format/lib/document/blocks/general/Split/meta.js";import{INTRO_SIZE_UNIT_KEYS as j,introSizeUnitsOf as T}from"../../../../../format/lib/content/section-type-size.js";import{PART_UNIT_KEY_OF as w}from"../../part-styles.js";import{parseIntroBleedLayout as G}from"../../../../../format/lib/sections/intro-bleed-layout.js";import{SECTION_PIN_STOP_KEY as q,SECTION_PIN_STOP_SCREEN as Z}from"../../../../../format/lib/content/section-sticky.js";import{fluidToken as $,token as n}from"./section-head-looks.js";import{labelStyle as J}from"../../../../../format/lib/document/seed-parts.js";import{BUTTON as c,DIM as B,DROP_COMMON as p,DROP_SIDE_PADDING as O,INNER_BOX as i,NO_PAD as u,NUMBER_TEXT as Q,SAME_KEYS as m,SECTION_BOX as y,TEXT as P,fillFrom as _,lineSides as a,pictureCell as H,siteGutterOf as A,smallText as s,wrapperPad as I,wrapperPadKeys as M}from"./section-to-box-row-parts.js";const v=(e,t,o)=>{const k=r(e),f=r(t),S=(V,g)=>g&&g!=="px"?{[V]:g}:{};return{...k===void 0?{}:{size:k,...S(w.size,o?.desktop)},...f===void 0?{}:{sizePhone:f,...S(w.sizePhone,o?.phone)}}},ee=e=>G(e.layout)==="stacked",E=e=>Math.min(Math.max(r(e.overlay)??60,0),100),d=e=>r(e)??100,te={textStyle:"heading-1",sizeToken:{...$("headingLarge",48,7,96).sizeToken,pxPhone:36},weight:500,lineHeight:.95,letterSpacing:-.03},oe=[s("eyebrow",n("label",14)),...[!0,!1].map(e=>({kind:"text",key:"title",role:"heading",props:P,style:{...te,case:e?"upper":"none"},styleFrom:t=>{const o=T(t);return v(t.titleSizeDesktop,t.titleSizeMobile,{desktop:o.titleDesktop,phone:o.titleMobile})},when:t=>t.uppercase===!0===e})),{kind:"text",key:"body",props:{...B,maxWidth:560},style:{textStyle:"body-1",...n("body",17,16),lineHeight:1.6,paragraphSpacing:24},styleFrom:e=>{const t=T(e);return v(e.bodySizeDesktop,e.bodySizeMobile,{desktop:t.bodyDesktop,phone:t.bodyMobile})}},{kind:"group",name:"Button",props:{...i,align:"start",sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:c}]}],N=e=>`${e}: a Button block has no colour of its own (it follows the site Button colour, as the old fallback did); 0 of 3 live US nodes store one (CLI read, 2026-11-03)`,ne=()=>({name:"Scroll-Over Text",skip:e=>ee(e)?"the stacked layout: its words row's height floor (`copyShare*`) and the header subtraction have no Box setting; 0 live US nodes":void 0,boxProps:e=>({...y,direction:"column",justify:"center",align:"start",gap:24,gapPhone:24,share:"content",...u,placement:"left",darken:E(e),darkenStyle:"even",sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:d(e.heightDesktop),sectionHeightModePhone:"fixed",sectionHeightUnitPhone:"%",sectionHeightValuePhone:d(e.heightMobile),[q]:Z}),box:[...m.filter(e=>!String(typeof e=="string"?e:e[0]).startsWith("sectionHeight")),["imageSrc","bgImage"],["imageSrcMobile","bgImagePhone"],["overlay","darken",(e,t)=>E(t)],["heightDesktop","sectionHeightValue",e=>d(e)],["heightMobile","sectionHeightValuePhone",e=>d(e)]],parts:oe,drop:{uppercase:"not a value of its own: it picks the heading part — Case Upper when on, None (as typed) when off",layout:"not a value of its own: the overlay layout is this tree; a stacked node is skipped (`skip`)",copyShareDesktop:"the stacked layout's words-row floor, read only there; a stacked node is skipped",copyShareMobile:"the stacked layout's words-row floor, read only there; a stacked node is skipped",sticky:"the old pin key, read as `stickTop` by the section pin's one reader (lib/content/section-sticky); the Box keeps a stored `stickTop` (SAME_KEYS), and this row is switched off until the stored pages hold `stickTop`",titleSizeDesktop:"read by the heading part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",titleSizeMobile:"read by the heading part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",bodySizeDesktop:"read by the words part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",bodySizeMobile:"read by the words part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",...Object.fromEntries(j.map(e=>[e,"read by its part's `styleFrom`: the unit of that view's Size"])),buttonColor:N("Button color"),buttonTextColor:N("Button text color"),...p}}),D={textStyle:"heading-2",...n("headingMedium",56,36),weight:400,lineHeight:1.05,letterSpacing:-.03},ie={textStyle:"body-1",...n("body",16),lineHeight:1.7},z=e=>({kind:"text",key:"body",props:{...B,maxWidth:520},style:{...ie,paragraphSpacing:e}}),l={top:0,bottom:0,topPhone:0,bottomPhone:0},b=(e,t)=>typeof e.sectionHeightMode=="string"&&e.sectionHeightMode!=="auto"?{}:{sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:t,sectionHeightModePhone:"auto"},re=(e,t)=>{const o=b(e,t);return Object.keys(o).length?o:{sectionHeightMode:e.sectionHeightMode,...e.sectionHeightValue===void 0?{}:{sectionHeightValue:e.sectionHeightValue},...e.sectionHeightUnit===void 0?{}:{sectionHeightUnit:e.sectionHeightUnit},sectionHeightModePhone:"auto"}},R={boxShapePhone:"landscape"},U="needs a black-and-white setting on a Box picture (the old photograph followed it, else the site's Photography); 0 live US nodes store it (CLI read, 2026-11-03)",ae=(e,t)=>({[e]:t,[K(e)]:t}),se={textStyle:"heading-2",...n("headingMedium",40),weight:500,case:"none",lineHeight:1,letterSpacing:-.02},C=e=>(Array.isArray(e.stats)?e.stats:[]).filter(t=>t&&(String(t.value??"").trim()!==""||String(t.label??"").trim()!=="")),de=()=>({name:"Brand Text",boxProps:(e,t)=>({...y,..._("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...I(e,l),...b(e,100)}),box:[...m,...M(l)],parts:[{kind:"group",name:"Words",props:()=>({...i,justify:"center",gap:28,gapPhone:28,sectionBorder:a({right:1}),sectionBorderPhone:a({}),...u,sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60,sectionPaddingRight:Y}),parts:[s("eyebrow",n("label",14)),{kind:"text",key:"heading",role:"heading",props:P,style:{...D,case:"none"},mark:"accentItalic"},z(28),{kind:"group",name:"Stats",props:{...i,sectionPaddingTop:16,sectionPaddingTopPhone:16},parts:[{kind:"group",name:"Figures",props:e=>({...i,direction:"row",share:"equal",gap:24,gapPhone:24,maxWidth:520,phoneRow:Math.min(Math.max(C(e).length,1),3),...ae("sectionBorder",a({top:1})),sectionPaddingTop:28,sectionPaddingTopPhone:28}),parts:[{kind:"list",key:"stats",name:"Stat",of:C,props:{...i,gap:4,gapPhone:4},parts:[{kind:"text",key:"value",props:Q,style:se},s("label",{...n("label",13),color:"labels",letterSpacing:.2})]}]}]}]},H("Picture","imageSrc",R)],drop:{...p,grayscale:U,...O}}),h=e=>{const t=e.textAlign==="center"||e.textAlign==="right"?{align:e.textAlign}:{},o=e.textAlignPhone==="left"||e.textAlignPhone==="center"||e.textAlignPhone==="right"?{alignPhone:e.textAlignPhone}:{};return{...t,...o}},le=e=>e.textAlign==="center"||e.textAlign==="right"?X[e.textAlign]:"stretch",he=e=>Math.min(Math.max(r(e.overlay)??60,0),100),F=e=>typeof e=="string"&&e.trim()!=="",ge={...c,align:"center",alignPhone:"center",buttonFillOpacity:0,buttonBorder:{width:1},buttonPaddingTop:16,buttonPaddingRight:28,buttonPaddingBottom:16,buttonPaddingLeft:28,buttonPaddingTopPhone:12,buttonPaddingRightPhone:20,buttonPaddingBottomPhone:12,buttonPaddingLeftPhone:20},L=e=>({...H("Picture","imageSrc",(t,o)=>({...F(t.imageSrc)&&x(t.imageOverlay)>0?{darken:x(t.imageOverlay),darkenStyle:"even"}:{},placement:"center",...R,sectionBorder:a(e?{left:1}:{right:1}),...W(e?"left":"right",A(o))}),[{kind:"button",key:"imageBtnText",href:"imageBtnHref",variant:"ghost",props:ge,style:{...J(13,12),letterSpacing:.18}}]),when:t=>t.reverse===!0===e}),W=(e,t)=>{const o=Math.max(60-t,0);return{sectionPaddingLeft:e==="left"?60:o,sectionPaddingRight:e==="right"?60:o}},ce={kind:"group",name:"Words",props:(e,t)=>{const o=e.reverse===!0;return{...i,justify:"center",align:le(e),placement:e.textAlign==="center"?"center":e.textAlign==="right"?"right":"left",...re(e,72),gap:24,gapPhone:24,...F(e.textBgSrc)?{darken:he(e),darkenStyle:"even"}:{},...u,sectionPaddingTop:100,sectionPaddingBottom:100,...W(o?"right":"left",A(t)),sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60}},box:[["textBgSrc","bgImage"]],parts:[{...s("eyebrow",n("label",14)),styleFrom:h},{kind:"text",key:"title",role:"heading",props:P,style:D,styleFrom:e=>({case:e.uppercase===!0?"upper":"none",...h(e)})},{...z(24),styleFrom:h},{kind:"group",name:"Button",props:{...i,sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:e=>{const t=h(e);return{...c,...t.align?{align:t.align}:{},...t.alignPhone?{alignPhone:t.alignPhone}:{}}}}]}]},pe=()=>({name:"Image & Text Split",boxProps:(e,t)=>({...y,..._("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...I(e,l),...b(e,72)}),box:[...m,...M(l)],parts:[L(!1),ce,L(!0)],drop:{reverse:"not a value of its own: it picks the order — the Picture Box first, or after the Words",uppercase:"not a value of its own: the heading part's Case — Upper when on, None (as typed) when off",textAlign:"read by each words part (its Align) and the Words Box (its Align); left writes nothing, as the old emitted no class",textAlignPhone:"read by each words part as its phone Align",textAlignTablet:"not carried to the words part's own tablet Align (`alignTablet`) yet: no old node stores it (new with the Tablet view's Text alignment row, 0 stored on the US sites 2026-11-06), so nothing moves",overlay:"read by the Words Box: its Darken over the words picture (60 when unset); no picture, no wash",imageOverlay:"read by the Picture Box: its Darken over the image column's picture (40 when unset, none at 0); no picture, no wash",grayscale:U,...p,...O}}),Oe={IntroBleed:ne(),Manifesto:de(),Split:pe()};export{Oe as EDITORIAL_SECTION_TO_BOX};
|
|
1
|
+
import{phoneKey as K}from"efficient-easel/draw";import{SITE_SIDE as Y}from"efficient-easel/screen/lib/content/length-units";import{finiteNumber as r}from"../../../../../format/lib/finite-number.js";import{BLOCK_ALIGN_BOX_WORD as X}from"../../../../../format/lib/content/block-align.js";import{splitImageOverlay as x}from"../../../../../format/lib/document/blocks/general/Split/meta.js";import{INTRO_SIZE_UNIT_KEYS as j,introSizeUnitsOf as T}from"../../../../../format/lib/content/section-type-size.js";import{PART_UNIT_KEY_OF as w}from"../../part-styles.js";import{parseIntroBleedLayout as G}from"../../../../../format/lib/sections/intro-bleed-layout.js";import{SECTION_PIN_STOP_KEY as q,SECTION_PIN_STOP_SCREEN as Z}from"../../../../../format/lib/content/section-sticky.js";import{fluidToken as $,token as n}from"./section-head-looks.js";import{labelStyle as J}from"../../../../../format/lib/document/seed-parts.js";import{BUTTON as c,DIM as B,DROP_COMMON as p,DROP_SIDE_PADDING as O,INNER_BOX as i,NO_PAD as u,NUMBER_TEXT as Q,SAME_KEYS as m,SECTION_BOX as y,TEXT as P,fillFrom as _,lineSides as a,pictureCell as H,siteGutterOf as I,smallText as s,wrapperPad as M,wrapperPadKeys as A}from"./section-to-box-row-parts.js";import{parseOption as ee}from"../../../../../format/lib/parse-option.js";const v=(e,t,o)=>{const f=r(e),k=r(t),S=(V,g)=>g&&g!=="px"?{[V]:g}:{};return{...f===void 0?{}:{size:f,...S(w.size,o?.desktop)},...k===void 0?{}:{sizePhone:k,...S(w.sizePhone,o?.phone)}}},te=e=>G(e.layout)==="stacked",E=e=>Math.min(Math.max(r(e.overlay)??60,0),100),d=e=>r(e)??100,oe={textStyle:"heading-1",sizeToken:{...$("headingLarge",48,7,96).sizeToken,pxPhone:36},weight:500,lineHeight:.95,letterSpacing:-.03},ne=[s("eyebrow",n("label",14)),...[!0,!1].map(e=>({kind:"text",key:"title",role:"heading",props:P,style:{...oe,case:e?"upper":"none"},styleFrom:t=>{const o=T(t);return v(t.titleSizeDesktop,t.titleSizeMobile,{desktop:o.titleDesktop,phone:o.titleMobile})},when:t=>t.uppercase===!0===e})),{kind:"text",key:"body",props:{...B,maxWidth:560},style:{textStyle:"body-1",...n("body",17,16),lineHeight:1.6,paragraphSpacing:24},styleFrom:e=>{const t=T(e);return v(e.bodySizeDesktop,e.bodySizeMobile,{desktop:t.bodyDesktop,phone:t.bodyMobile})}},{kind:"group",name:"Button",props:{...i,align:"start",sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:c}]}],N=e=>`${e}: a Button block has no colour of its own (it follows the site Button colour, as the old fallback did); 0 of 3 live US nodes store one (CLI read, 2026-11-03)`,ie=()=>({name:"Scroll-Over Text",skip:e=>te(e)?"the stacked layout: its words row's height floor (`copyShare*`) and the header subtraction have no Box setting; 0 live US nodes":void 0,boxProps:e=>({...y,direction:"column",justify:"center",align:"start",gap:24,gapPhone:24,share:"content",...u,placement:"left",darken:E(e),darkenStyle:"even",sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:d(e.heightDesktop),sectionHeightModePhone:"fixed",sectionHeightUnitPhone:"%",sectionHeightValuePhone:d(e.heightMobile),[q]:Z}),box:[...m.filter(e=>!String(typeof e=="string"?e:e[0]).startsWith("sectionHeight")),["imageSrc","bgImage"],["imageSrcMobile","bgImagePhone"],["overlay","darken",(e,t)=>E(t)],["heightDesktop","sectionHeightValue",e=>d(e)],["heightMobile","sectionHeightValuePhone",e=>d(e)]],parts:ne,drop:{uppercase:"not a value of its own: it picks the heading part — Case Upper when on, None (as typed) when off",layout:"not a value of its own: the overlay layout is this tree; a stacked node is skipped (`skip`)",copyShareDesktop:"the stacked layout's words-row floor, read only there; a stacked node is skipped",copyShareMobile:"the stacked layout's words-row floor, read only there; a stacked node is skipped",sticky:"the old pin key, read as `stickTop` by the section pin's one reader (lib/content/section-sticky); the Box keeps a stored `stickTop` (SAME_KEYS), and this row is switched off until the stored pages hold `stickTop`",titleSizeDesktop:"read by the heading part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",titleSizeMobile:"read by the heading part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",bodySizeDesktop:"read by the words part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",bodySizeMobile:"read by the words part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",...Object.fromEntries(j.map(e=>[e,"read by its part's `styleFrom`: the unit of that view's Size"])),buttonColor:N("Button color"),buttonTextColor:N("Button text color"),...p}}),D={textStyle:"heading-2",...n("headingMedium",56,36),weight:400,lineHeight:1.05,letterSpacing:-.03},re={textStyle:"body-1",...n("body",16),lineHeight:1.7},z=e=>({kind:"text",key:"body",props:{...B,maxWidth:520},style:{...re,paragraphSpacing:e}}),l={top:0,bottom:0,topPhone:0,bottomPhone:0},b=(e,t)=>typeof e.sectionHeightMode=="string"&&e.sectionHeightMode!=="auto"?{}:{sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:t,sectionHeightModePhone:"auto"},ae=(e,t)=>{const o=b(e,t);return Object.keys(o).length?o:{sectionHeightMode:e.sectionHeightMode,...e.sectionHeightValue===void 0?{}:{sectionHeightValue:e.sectionHeightValue},...e.sectionHeightUnit===void 0?{}:{sectionHeightUnit:e.sectionHeightUnit},sectionHeightModePhone:"auto"}},R={boxShapePhone:"landscape"},U="needs a black-and-white setting on a Box picture (the old photograph followed it, else the site's Photography); 0 live US nodes store it (CLI read, 2026-11-03)",se=(e,t)=>({[e]:t,[K(e)]:t}),de={textStyle:"heading-2",...n("headingMedium",40),weight:500,case:"none",lineHeight:1,letterSpacing:-.02},C=e=>(Array.isArray(e.stats)?e.stats:[]).filter(t=>t&&(String(t.value??"").trim()!==""||String(t.label??"").trim()!=="")),le=()=>({name:"Brand Text",boxProps:(e,t)=>({...y,..._("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...M(e,l),...b(e,100)}),box:[...m,...A(l)],parts:[{kind:"group",name:"Words",props:()=>({...i,justify:"center",gap:28,gapPhone:28,sectionBorder:a({right:1}),sectionBorderPhone:a({}),...u,sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60,sectionPaddingRight:Y}),parts:[s("eyebrow",n("label",14)),{kind:"text",key:"heading",role:"heading",props:P,style:{...D,case:"none"},mark:"accentItalic"},z(28),{kind:"group",name:"Stats",props:{...i,sectionPaddingTop:16,sectionPaddingTopPhone:16},parts:[{kind:"group",name:"Figures",props:e=>({...i,direction:"row",share:"equal",gap:24,gapPhone:24,maxWidth:520,phoneRow:Math.min(Math.max(C(e).length,1),3),...se("sectionBorder",a({top:1})),sectionPaddingTop:28,sectionPaddingTopPhone:28}),parts:[{kind:"list",key:"stats",name:"Stat",of:C,props:{...i,gap:4,gapPhone:4},parts:[{kind:"text",key:"value",props:Q,style:de},s("label",{...n("label",13),color:"labels",letterSpacing:.2})]}]}]}]},H("Picture","imageSrc",R)],drop:{...p,grayscale:U,...O}}),h=e=>{const t=e.textAlign==="center"||e.textAlign==="right"?{align:e.textAlign}:{},o=e.textAlignPhone==="left"||e.textAlignPhone==="center"||e.textAlignPhone==="right"?{alignPhone:e.textAlignPhone}:{};return{...t,...o}},he=e=>e.textAlign==="center"||e.textAlign==="right"?X[e.textAlign]:"stretch",ge=e=>Math.min(Math.max(r(e.overlay)??60,0),100),F=e=>typeof e=="string"&&e.trim()!=="",ce={...c,align:"center",alignPhone:"center",buttonFillOpacity:0,buttonBorder:{width:1},buttonPaddingTop:16,buttonPaddingRight:28,buttonPaddingBottom:16,buttonPaddingLeft:28,buttonPaddingTopPhone:12,buttonPaddingRightPhone:20,buttonPaddingBottomPhone:12,buttonPaddingLeftPhone:20},L=e=>({...H("Picture","imageSrc",(t,o)=>({...F(t.imageSrc)&&x(t.imageOverlay)>0?{darken:x(t.imageOverlay),darkenStyle:"even"}:{},placement:"center",...R,sectionBorder:a(e?{left:1}:{right:1}),...W(e?"left":"right",I(o))}),[{kind:"button",key:"imageBtnText",href:"imageBtnHref",variant:"ghost",props:ce,style:{...J(13,12),letterSpacing:.18}}]),when:t=>t.reverse===!0===e}),W=(e,t)=>{const o=Math.max(60-t,0);return{sectionPaddingLeft:e==="left"?60:o,sectionPaddingRight:e==="right"?60:o}},pe={kind:"group",name:"Words",props:(e,t)=>{const o=e.reverse===!0;return{...i,justify:"center",align:he(e),placement:ee(["left","center","right"],"left",e.textAlign),...ae(e,72),gap:24,gapPhone:24,...F(e.textBgSrc)?{darken:ge(e),darkenStyle:"even"}:{},...u,sectionPaddingTop:100,sectionPaddingBottom:100,...W(o?"right":"left",I(t)),sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60}},box:[["textBgSrc","bgImage"]],parts:[{...s("eyebrow",n("label",14)),styleFrom:h},{kind:"text",key:"title",role:"heading",props:P,style:D,styleFrom:e=>({case:e.uppercase===!0?"upper":"none",...h(e)})},{...z(24),styleFrom:h},{kind:"group",name:"Button",props:{...i,sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:e=>{const t=h(e);return{...c,...t.align?{align:t.align}:{},...t.alignPhone?{alignPhone:t.alignPhone}:{}}}}]}]},ue=()=>({name:"Image & Text Split",boxProps:(e,t)=>({...y,..._("background")(e,t),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...M(e,l),...b(e,72)}),box:[...m,...A(l)],parts:[L(!1),pe,L(!0)],drop:{reverse:"not a value of its own: it picks the order — the Picture Box first, or after the Words",uppercase:"not a value of its own: the heading part's Case — Upper when on, None (as typed) when off",textAlign:"read by each words part (its Align) and the Words Box (its Align); left writes nothing, as the old emitted no class",textAlignPhone:"read by each words part as its phone Align",textAlignTablet:"not carried to the words part's own tablet Align (`alignTablet`) yet: no old node stores it (new with the Tablet view's Text alignment row, 0 stored on the US sites 2026-11-06), so nothing moves",overlay:"read by the Words Box: its Darken over the words picture (60 when unset); no picture, no wash",imageOverlay:"read by the Picture Box: its Darken over the image column's picture (40 when unset, none at 0); no picture, no wash",grayscale:U,...p,...O}}),He={IntroBleed:ie(),Manifesto:le(),Split:ue()};export{He as EDITORIAL_SECTION_TO_BOX};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hasWords as
|
|
1
|
+
import{hasWords as n}from"../../../sections/section-to-box.js";import{DIM as L,DROP_COMMON as g,DROP_SIDE_PADDING as h,INNER_BOX as r,SAME_KEYS as P,SECTION_BOX as f,TEXT as a,smallText as O,wrapperPad as i,wrapperPadKeys as _}from"./section-to-box-row-parts.js";import{finiteNumber as x}from"../../../../../format/lib/finite-number.js";import{markBoxProps as w,token as A}from"../../../../../format/lib/document/seed-parts.js";import{LOGOS_PH as R,logosScaffoldItems as B}from"../../../../../format/lib/document/blocks/general/Logos/meta.js";import{logosCardSeed as b}from"../../../../../format/lib/document/blocks/general/Logos/card-seed.js";import{PAYMENT_PH as N,paymentScaffoldAssurances as C,paymentScaffoldBadges as I}from"../../../../../format/lib/document/blocks/general/PaymentBadges/meta.js";import{BLOCK_SOURCE_OPTIONS_PROP as s,BLOCK_SOURCE_PROP as t}from"../../../../../format/lib/content/block-sources.js";import{CARD_TEMPLATE_SLOT as k}from"../../../../../format/lib/content/card-template.js";import{BLOCK_ALIGN_BOX_WORD as M,legacyBlockAlignOf as D}from"../../../../../format/lib/content/block-align.js";import{FOOTER_PAYMENT_SEED as H}from"../../../../../format/lib/content/footer.js";import{CELL_SPAN_KEYS as K}from"../../../../../format/lib/content/grid-span.js";import{SECTION_ACCENT_INHERIT as X}from"../../../../../format/lib/content/section-surface.js";import{FOOTER_MARK_SIZES as v,FOOTER_TEXT_PX as z}from"../../../../../format/lib/document/box-footer.js";import{phoneKey as d,readHidable as F}from"efficient-easel/draw";import{parseOption as G}from"../../../../../format/lib/parse-option.js";const l={contained:!1},p=(o,e)=>({logos:[{kind:"list",key:o,name:"Logo",flat:!0,parts:[{kind:"block",type:"LogoBlock",box:["src",[e,"alt"]],when:(Z,m)=>n(m?.src)||n(m?.[e])}]}]}),c=o=>{const e=x(o.bandPadding)??40;return{top:e,bottom:e,topPhone:e,bottomPhone:e}},Y={...O("heading",{color:"labels",letterSpacing:.2}),props:{...a,align:"center"}},j={name:"Logos",boxProps:o=>({...f,direction:"column",gap:32,...i(o,c(o))}),box:[...P,..._(c),["bandPadding","sectionPaddingTop",(o,e)=>i(e,c(e)).sectionPaddingTop]],parts:[Y,{kind:"core",keep:["columns","logoHeight","grayscale"],rename:{logosPerRow:"columns"},props:l,slots:p("items","alt")}],drop:{...g,...h,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)",headPlacement:"a Logos band has no split head (not in SPLITTABLE_SECTIONS): no stored node can hold one, and the converted block stores own-box"}},W={kind:"group",name:"Mark",keepEmpty:!0,parts:[],props:w(4,"main",{sectionCorners:2})},E={top:24,bottom:24,topPhone:24,bottomPhone:24},U={name:"Payment Methods",boxProps:o=>({...f,direction:"column",...i(o,E)}),box:[...P,..._(E)],parts:[{kind:"group",name:"Methods",props:{...r,align:"center",gap:20,gapPhone:20,sectionBorder:{top:1,bottom:1},sectionPaddingTop:32,sectionPaddingBottom:32},parts:[{...O("heading",{color:"labels"}),props:{...a,align:"center"}},{kind:"core",keep:[],as:"Logos",derive:{reads:[t,s],props:o=>n(o[t])?{[t]:o[t],...o[s]!==void 0?{[s]:o[s]}:{}}:{}},props:{...l,look:"cards",grayscale:!1},slots:o=>({...p("badges","label"),...n(o[t])?{[k]:[b()]}:{}})},{kind:"group",name:"Reassurance",props:{...r,direction:"row",wrap:!0,justify:"center",gap:24,gapPhone:24,phoneRow:2,[d("share")]:"content"},parts:[{kind:"list",key:"assurances",name:"Line",of:o=>(Array.isArray(o.assurances)?o.assurances:[]).filter(e=>n(e?.text)),props:{...r,direction:"row",align:"center",gap:8,gapPhone:8,phoneRow:2,[d("share")]:"content"},item:o=>F(o.text).hidden?{props:{_hidden:!0}}:{},parts:[W,{kind:"text",key:"text",props:{...a,align:"center"},style:{...A("label",13),color:"labels",lineHeight:1.5}}]}]}]}],drop:{...g,...h,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)"}},S=o=>D(o.align)??"left",T=o=>G(["sm","md"],"sm",o.size),y=12,u={name:"Payment logos",boxProps:o=>({...r,direction:"row",wrap:!0,align:"center",justify:M[S(o)],gap:y,gapPhone:y,phoneRow:2,[d("share")]:"content"}),box:[...K],parts:[{kind:"text",key:"lead",props:L,styleFrom:o=>({size:z[T(o)],lineHeight:1.5})},{kind:"core",keep:[],as:"Logos",derive:{reads:[t,s],props:o=>({logoHeight:v[T(o)].mark,align:S(o),...n(o[t])?{[t]:o[t],...o[s]!==void 0?{[s]:o[s]}:{}}:{}})},props:{...l,look:"marks",grayscale:!1,sectionAccent:X},slots:o=>({...p("methods","label"),...n(o[t])?{[k]:[b()]}:{}})}],drop:{size:"read as the wall's Logo height (S 16, M 20) and the lead's size (the footer size table, 12 / 13)",align:"read as the Box's justify and the wall's own Alignment (start is left, end is right)",editing:"the editor's preview flag, never a stored setting: the editor tells every block it is editing"}},mo={Logos:j,PaymentBadges:U,FooterPayment:u,PaymentLogosBlock:u},go=()=>({heading:R.heading,items:B()}),ho=()=>({heading:N.heading,badges:I(),assurances:C()}),Po=()=>({...H,methods:[]});export{mo as LOGOS_SECTION_TO_BOX,Po as footerPaymentPressStarter,go as logosPressStarter,ho as paymentPressStarter};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { SECTION_CSS_SCOPE_ATTR } from "../../../format/lib/content/section-css.js";
|
|
2
2
|
export declare const CUSTOM_HTML_SCOPE_ATTR = "data-sf-custom-html";
|
|
3
3
|
export type CssScopeAttr = typeof CUSTOM_HTML_SCOPE_ATTR | typeof SECTION_CSS_SCOPE_ATTR;
|
|
4
|
+
export declare function customHtmlIdPrefix(id: string): string;
|
|
4
5
|
export declare function customHtmlScope(id: string, attr?: CssScopeAttr): string;
|
|
5
|
-
export declare function scopeCustomCss(css: string, id: string, attr?: CssScopeAttr): string;
|
|
6
|
-
export declare function splitCustomHtml(html: string): {
|
|
6
|
+
export declare function scopeCustomCss(css: string, id: string, attr?: CssScopeAttr, ownIds?: ReadonlySet<string>): string;
|
|
7
|
+
export declare function splitCustomHtml(html: string, id?: string): {
|
|
7
8
|
css: string;
|
|
8
9
|
markup: string;
|
|
10
|
+
ids: ReadonlySet<string>;
|
|
9
11
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
`),markup:
|
|
1
|
+
import O from"isomorphic-dompurify";import g from"postcss";import E from"postcss-selector-parser";import{sanitizeHtml as _,sectionIds as h}from"./sanitize.js";import{styleElementText as T}from"../../../format/lib/document/style-text.js";const v="data-sf-custom-html",w=/^[A-Za-z][\w-]*$/;function S(r){return w.test(r)?`${r}-`:""}function $(r,s=v){return`[${s}="${r}"]`}const d=new Set(["media","supports","container"]),A=new Set(["behavior","-moz-binding"]),x=/expression\s*\(|javascript:|vbscript:/i,N=/^[a-z][a-z0-9+.-]*:/i,R=new Set(["none","initial","inherit","unset","revert","revert-layer","default","auto","normal","ease","ease-in","ease-out","ease-in-out","linear","step-start","step-end","infinite","reverse","alternate","alternate-reverse","forwards","backwards","both","running","paused"]);function L(r){return r.replace(/\\([0-9a-f]{1,6})\s?|\\(.)/gi,(s,n,o)=>n?String.fromCodePoint(Math.min(+`0x${n}`,1114111)||65533):o??"")}function y(r){const s=r.trim();return s.startsWith("//")?!0:N.test(s)&&!/^https:\/\//i.test(s)}const C=/\/\*[\s\S]*?(?:\*\/|$)/g;function P(r,s){const n=L(s.replace(C,"")).replace(C,"");if(x.test(n))return!1;for(const o of n.matchAll(/url\(\s*(['"]?)(.*?)\1\s*\)/gi))if(y(o[2]))return!1;if(r.startsWith("--")||/(?:image-set|image|src)\(/i.test(n)){for(const o of n.matchAll(/(['"])(.*?)\1/g))if(y(o[2]))return!1}return!0}function D(r){const s=r.find(n=>n.type==="combinator");return s?s.value.trim()||" ":null}function z(r,s,n="",o=new Set){let i;try{i=E().astSync(r)}catch{return null}const c=[];for(const a of i.nodes){const f=a.nodes;if(f.length===0)return null;let p=!1;if(a.walkNesting(()=>{p=!0}),p)continue;n&&a.walkIds(u=>{o.has(u.value)&&(u.value=n+u.value)});const t=f[0],e=t.type==="tag"&&/^(html|body)$/i.test(t.value)||t.type==="pseudo"&&t.value.toLowerCase()===":root",l=t.type==="universal",m=D(f.slice(1));if((e||l)&&(m==="~"||m==="+"))l&&c.push(`${s} ${String(a).trim()}`);else if(e||l){const u=f.slice(1).map(String).join("").trimEnd();c.push(u?s+u:l?`${s} *`:s)}else{if(t.type==="combinator"&&/^[~+]$/.test(t.value.trim()))continue;c.push(`${s} ${String(a).trim()}`)}}return c.length?c.join(", "):null}function G(r,s,n=v,o=new Set){if(!w.test(s))return"";let i;try{i=g.parse(r)}catch{return""}const c=$(s,n),a=new Map;i.walkComments(t=>{t.remove()});const f=t=>{for(const e of[...t.nodes??[]])e.type==="atrule"?d.has(e.name.toLowerCase())&&e.nodes?f(e):e.remove():e.type==="rule"&&e.remove()},p=t=>{for(const e of[...t.nodes??[]])if(e.type==="atrule"){const l=e.name.toLowerCase();if(/^(-[a-z]+-)?keyframes$/.test(l)){const m=e.params.trim();if(!/^[A-Za-z_][\w-]*$/.test(m)||R.has(m.toLowerCase()))e.remove();else{const u=`${m}-${s}`;a.set(m,u),e.params=u}}else d.has(l)&&e.nodes?p(e):e.remove()}else if(e.type==="rule"){const l=z(e.selector,c,n===v?S(s):"",o);l===null?e.remove():(e.selector=l,f(e))}else e.type==="decl"&&e.remove()};return p(i),i.walkDecls(t=>{if(A.has(t.prop.toLowerCase())||!P(t.prop,t.raws.value?.raw??t.value)){t.remove();return}a.size>0&&/^(-[a-z]+-)?animation(-name)?$/i.test(t.prop)&&(t.value=t.value.replace(/(?<![\w-])[A-Za-z_][\w-]*(?![\w(-])/g,e=>a.get(e)??e))}),i.walkAtRules(t=>{t.nodes&&t.nodes.length===0&&t.remove()}),T(i.toString()).trim()}const M={ALLOWED_TAGS:["style","#text"],ALLOWED_ATTR:[],KEEP_CONTENT:!1,FORBID_CONTENTS:[],FORCE_BODY:!0,RETURN_DOM_FRAGMENT:!0};function W(r,s=""){const n=_(r,{idPrefix:S(s)});if(!/<style/i.test(r))return{css:"",markup:n,ids:new Set};const o=h(r),i=O.sanitize(r,M).querySelectorAll("style");return{css:Array.from(i,a=>a.textContent??"").join(`
|
|
2
|
+
`),markup:n,ids:o}}export{v as CUSTOM_HTML_SCOPE_ATTR,S as customHtmlIdPrefix,$ as customHtmlScope,G as scopeCustomCss,W as splitCustomHtml};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{HEADER_TYPE as o,FOOTER_TYPE as a}from"efficient-easel/draw";const
|
|
1
|
+
import{HEADER_TYPE as o,FOOTER_TYPE as a}from"efficient-easel/draw";import{parseOption as E}from"../../../format/lib/parse-option.js";const s=new Set(["Hero","HeroSingle","IntroBleed"]),n={min:56,max:140,default:88},d={min:0,max:120,step:2,default:32},l=`var(--sf-header-h, ${n.default}px)`,_="--sf-header-set-h",T="--sf-header-h",R=`var(${_}, ${n.default}px)`,D="sf-header-clearance",P="sf-sticky-underheader";function c(e){return e?.find(t=>t?.type&&t.type!==o)??null}function p(e){const t=c(e)?.type;return!t||!s.has(t)}function h(e){return!p(e)}function C(e){return!!e?.some(t=>t?.type===o)}function m(e){return!e||e.length===0?!1:!e.some(t=>t?.type===o||t?.type===a)}const u=["auto","shared","own"],S="auto",f="topSpace",O="data-top-space";function i(e){return E(u,S,e)}function x(e,t){const r=i(e?.props?.[f]);return r==="own"?!0:r==="shared"?!1:p(t)}function L(e,t){return x(e,t)?"own":null}export{S as DEFAULT_TOP_SPACE,s as FULLBLEED_LEAD_SECTIONS,D as HEADER_CLEARANCE_CLASS,T as HEADER_DRAWN_HEIGHT_VAR,l as HEADER_HEIGHT_CSS,n as HEADER_HEIGHT_PX,d as HEADER_MENU_GAP_PX,R as HEADER_SET_HEIGHT_CSS,_ as HEADER_SET_HEIGHT_VAR,P as STICKY_UNDERHEADER_CLASS,O as TOP_SPACE_ATTR,u as TOP_SPACE_MODES,f as TOP_SPACE_PROP,m as isStandaloneSectionDocument,c as leadSection,p as pageClearsHeader,C as pageHasHeaderSection,h as pageLeadsWithFullBleed,x as pageTakesTopSpace,i as resolveTopSpace,L as topSpaceMarker};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parseIntroBleedLayout as
|
|
1
|
+
import{parseIntroBleedLayout as r}from"../../../format/lib/sections/intro-bleed-layout.js";import{leadSection as n,pageLeadsWithFullBleed as a}from"./header-clearance.js";import{parseOption as l}from"../../../format/lib/parse-option.js";const _="data-lead-ink",f="data-header-ink",u=["auto","light","dark"],d="auto";function i(e){return e.type==="IntroBleed"?r(e.props?.layout)!=="stacked":!0}function p(e){const t=n(e);return t&&a(e)&&i(t)?"light":null}function s(e){return l(u,d,e)}function k(e,t){const o=s(e);return o==="auto"?p(t):o}export{d as DEFAULT_HEADER_INK,_ as HEADER_INK_ATTR,u as HEADER_INK_MODES,f as HEADER_INK_OVERRIDE_ATTR,p as leadSectionInk,k as resolveHeaderInk,s as resolveHeaderInkMode};
|
|
@@ -13,5 +13,9 @@ export declare const ownPairDefault: (key: string) => InnerPadding | undefined;
|
|
|
13
13
|
export declare const PAD_ON_ROOT: ReadonlySet<string>;
|
|
14
14
|
export declare const PADS_ITS_OWN_SPACE: ReadonlySet<string>;
|
|
15
15
|
export declare const sectionPadding: BlockPass;
|
|
16
|
+
export declare const OWN_PAD_FRAME: Readonly<Record<string, (props: Record<string, unknown>) => number>>;
|
|
17
|
+
export declare const OWN_PAD_LABEL: Readonly<Record<string, string>>;
|
|
18
|
+
export declare function withPadTotals(props: Record<string, unknown>, changed: Readonly<Record<string, unknown>> | undefined): Record<string, unknown>;
|
|
19
|
+
export declare function olderPadNote(props: Record<string, unknown>, frame: number): string | null;
|
|
16
20
|
export declare const blockPadding: BlockPass;
|
|
17
21
|
export {};
|