efficient-web-builder 59.0.0 → 59.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 +31 -0
- package/dist/editor/components/HoverEffectField.js +1 -1
- package/dist/editor/components/SwitchToBoxFooter.js +1 -1
- package/dist/editor/components/useCardContentSwitchPass.d.ts +1 -0
- package/dist/editor/components/useCardContentSwitchPass.js +1 -0
- package/dist/editor/components/usePinnedChromeSeed.js +1 -1
- package/dist/editor/lib/animation/fields.js +1 -1
- package/dist/editor/lib/animation/hover-fields.d.ts +10 -1
- package/dist/editor/lib/animation/hover-fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/CardList/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Cards/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Logos/fields.js +1 -1
- package/dist/editor/lib/document/box-footer-rows.d.ts +3 -0
- package/dist/editor/lib/document/box-footer-rows.js +1 -0
- package/dist/editor/lib/document/box-side-space-field.d.ts +11 -0
- package/dist/editor/lib/document/box-side-space-field.js +1 -0
- package/dist/editor/lib/document/choice-pictures.d.ts +2 -1
- package/dist/editor/lib/document/choice-pictures.js +1 -1
- package/dist/editor/lib/document/page-root.js +2 -2
- package/dist/editor/lib/sections/text-layouts.js +1 -1
- package/dist/format/lib/animation/hover.d.ts +8 -0
- package/dist/format/lib/animation/hover.js +1 -1
- package/dist/format/lib/content/block-align.d.ts +1 -0
- package/dist/format/lib/content/block-align.js +1 -1
- package/dist/format/lib/content/block-sources.d.ts +1 -0
- package/dist/format/lib/content/block-sources.js +1 -1
- package/dist/format/lib/content/box-shape.d.ts +1 -1
- package/dist/format/lib/content/box-side-space.d.ts +13 -0
- package/dist/format/lib/content/box-side-space.js +1 -0
- package/dist/format/lib/content/page-width.d.ts +3 -0
- package/dist/format/lib/content/page-width.js +1 -1
- package/dist/format/lib/document/blocks/general/Cards/card-list-seed.d.ts +18 -0
- package/dist/format/lib/document/blocks/general/Cards/card-list-seed.js +1 -0
- package/dist/format/lib/document/blocks/general/Cards/card-seed.d.ts +9 -0
- package/dist/format/lib/document/blocks/general/Cards/card-seed.js +1 -1
- package/dist/format/lib/document/blocks/general/FAQ/card-seed.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/FAQ/card-seed.js +1 -1
- package/dist/format/lib/document/box-footer.d.ts +13 -2
- package/dist/format/lib/document/box-footer.js +1 -1
- package/dist/format/lib/document/card-content-switch.d.ts +22 -0
- package/dist/format/lib/document/card-content-switch.js +1 -0
- package/dist/format/lib/document/cards-template-on-read.js +1 -1
- package/dist/format/lib/document/container-blocks.js +1 -1
- package/dist/format/lib/document/section-catalog.d.ts +1 -0
- package/dist/format/lib/document/section-catalog.js +4 -12
- package/dist/format/lib/document/seed-parts.d.ts +3 -0
- package/dist/format/lib/document/seed-parts.js +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +4 -0
- package/dist/format/lib/editor-words-catalogue.js +3 -3
- package/dist/format/lib/sections/logo-look.d.ts +1 -1
- package/dist/format/lib/sections/logo-look.js +1 -1
- package/dist/format/lib/source-rules/one-section-edge-inset.d.ts +6 -0
- package/dist/format/lib/source-rules/one-section-edge-inset.js +2 -0
- package/dist/format/lib/source-rules/one-site-column.js +3 -3
- package/dist/render/components/BlockFrame.d.ts +2 -0
- package/dist/render/components/BlockFrame.js +1 -1
- package/dist/render/components/Flex.d.ts +5 -2
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/Logos.d.ts +5 -1
- package/dist/render/components/Logos.js +1 -1
- package/dist/render/components/SiteGutterFrame.d.ts +7 -2
- package/dist/render/components/SiteGutterFrame.js +1 -1
- package/dist/render/components/Text.d.ts +2 -1
- package/dist/render/components/Text.js +1 -1
- package/dist/render/lib/content/box-stack-line.d.ts +3 -1
- package/dist/render/lib/content/box-stack-line.js +1 -1
- package/dist/render/lib/content/section-edge.d.ts +12 -0
- package/dist/render/lib/content/section-edge.js +1 -1
- package/dist/render/lib/document/blocks/general/Cards/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Logos/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Logos/wall-rows.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/Logos/wall-rows.js +1 -0
- package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-head-looks.d.ts +1 -0
- 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.d.ts +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-head.d.ts +3 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.d.ts +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-proof.js +1 -1
- package/dist/render/lib/document/head-core-boxes.d.ts +1 -0
- package/dist/render/lib/document/head-core-boxes.js +1 -1
- package/dist/render/lib/document/hero-media-parts.d.ts +2 -2
- package/dist/render/lib/document/page-render.js +1 -1
- package/dist/render/lib/document/passes/section-width.js +1 -1
- package/dist/render/lib/document/wall-labels.d.ts +3 -0
- package/dist/render/lib/document/wall-labels.js +1 -0
- package/dist/render/lib/sections/section-to-box.d.ts +1 -0
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/package.json +1 -1
|
@@ -15,10 +15,14 @@ interface LogosProps {
|
|
|
15
15
|
bandPadding?: number;
|
|
16
16
|
logos?: SlotComponent;
|
|
17
17
|
look?: LogoLook;
|
|
18
|
+
align?: unknown;
|
|
19
|
+
alignTablet?: unknown;
|
|
20
|
+
alignPhone?: unknown;
|
|
21
|
+
labelledBy?: string;
|
|
18
22
|
omitHead?: boolean;
|
|
19
23
|
cards?: ReactNode;
|
|
20
24
|
}
|
|
21
|
-
export default function Logos({ items, contained, heading, columns, grayscale, logoHeight, bandPadding, logos: LogoBlocks, look, omitHead, cards, }: LogosProps): import("react").JSX.Element;
|
|
25
|
+
export default function Logos({ items, contained, heading, columns, grayscale, logoHeight, bandPadding, logos: LogoBlocks, look, omitHead, cards, align, alignTablet, alignPhone, labelledBy, }: LogosProps): import("react").JSX.Element;
|
|
22
26
|
export declare const CARD_WORDS_CLASS = "font-mono text-[12px] uppercase tracking-[0.18em]";
|
|
23
27
|
export declare function LogoWallMark({ src, alt, look, logoHeight, grayscale, kind, mark, }: {
|
|
24
28
|
src?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as n,jsxs as d,Fragment as K}from"react/jsx-runtime";import{PagePicture as h}from"../lib/first-screen.js";import{PaymentMark as y,paymentMarkItems as P}from"efficient-shell/icons/payment";import D from"./BlockFrame.js";import{renderChrome as Y,renderGold as A,renderHeadline as Z}from"./goldPhrases.js";import{LogoWallProvider as M}from"./LogoWallContext.js";import{EMPTY_ELSE_CLASS as U,EMPTY_HIDES_CLASS as J,EmptyHidesStyle as V}from"../lib/content/empty-hides.js";import{media as S}from"../lib/media.js";import{sizedImage as v}from"../../format/lib/sized-image.js";import{stripMarkup as _}from"../../format/lib/markup.js";import{DEFAULT_LOGO_LOOK as X}from"../../format/lib/sections/logo-look.js";import{paymentRowMark as W}from"../lib/sections/payment-rows.js";import{alignViewClasses as q,BLOCK_ALIGN_JUSTIFY as H,blockAlignOf as Q}from"../../format/lib/content/block-align.js";import{FOOTER_MARK_SIZES as C}from"../../format/lib/document/box-footer.js";import{say as ee}from"../../format/lib/editor-words.js";const R={label:"text-[length:var(--size-label,13px)]"},f="sf-logo-wall",te="sf-logo-items",ne="flex flex-wrap items-center",re=(t,e,s)=>{const r=Q(t)??"center";return[ne,H[r],q("justify",r,e,s)].filter(Boolean).join(" ")},$="plain",g={plain:{x:3.5,y:2},cards:{x:.75,y:.75},marks:{x:.75,y:.5}},w=t=>({columnGap:`${g[t].x}rem`,rowGap:`${g[t].y}rem`}),E=(t,e)=>`calc((100% - ${(t-1)*g[e].x}rem) / ${t})`;function se({items:t,contained:e,heading:s,columns:r,grayscale:c,logoHeight:o,bandPadding:a,logos:i,look:l=X,omitHead:m=!1,cards:p,align:u,alignTablet:j,alignPhone:k,labelledBy:G}){const x=re(u,j,k),N=l==="marks",B=r!=null?{flex:`0 0 ${E(r,$)}`}:void 0,O=!m;return d(D,{contained:e,fillWidth:N&&m?"w-auto max-w-full":void 0,className:O&&a==null?"py-10":"",style:!O||a==null?void 0:{paddingTop:`${a}px`,paddingBottom:`${a}px`},children:[!m&&s!=null&&s!==""?n("h2",{className:`mb-8 text-center font-mono ${R.label} uppercase tracking-[0.2em] text-fg-dim`,children:Z(s,!1)}):null,d(le,{listed:N,labelledBy:G,children:[p!==void 0?d(M,{value:{look:l,logoHeight:o,grayscale:c},children:[r!=null?n("style",{children:`.${f}-c${r}>*{flex:0 0 ${E(r,l)}}`}):null,n("div",{className:[f,r!=null?`${f}-c${r}`:"",x].filter(Boolean).join(" "),style:w(l),children:p})]}):i?d(M,{value:{look:l,logoHeight:o,grayscale:c},children:[n(V,{}),r!=null?n("style",{children:`.${f}-c${r}>*{flex:0 0 ${E(r,l)}}`}):null,n(i,{className:[f,J,r!=null?`${f}-c${r}`:"",x].filter(Boolean).join(" "),style:w(l),minEmptyHeight:80})]}):null,p!==void 0?null:n("div",{className:`${te} ${U} ${x}`,style:w($),children:(t??[]).map((b,F)=>n("div",{className:"text-center",style:B,children:n(ce,{src:b.src,alt:b.alt,look:$,logoHeight:o,grayscale:c})},F))})]})]})}function le({listed:t,labelledBy:e,children:s}){return t?n("div",{className:"contents",role:"list",...e?{"aria-labelledby":e}:{"aria-label":ee("Ways to pay")},children:s}):n(K,{children:s})}const L="font-mono text-[12px] uppercase tracking-[0.18em]";function z(t){const e=P({name:_(t)});return!e.length||e.length===1&&e[0].kind==="words"&&!e[0].glyph?[]:e}function I(t){const e=z(t);return e.length?n("span",{className:"flex items-center gap-3",children:e.map((s,r)=>n(y,{item:s,size:20,className:L},r))}):null}const ae=C.sm.mark,ie=Object.values(C),oe=t=>ie.reduce((e,s)=>Math.abs(s.mark-t)<Math.abs(e.mark-t)?s:e).words;function ce({src:t,alt:e,look:s,logoHeight:r,grayscale:c,kind:o,mark:a}){if(s==="marks"){const i=r??ae,l=!t&&o!==void 0?W({label:e,kind:o}):null,m=l?[l]:!t&&e?z(e):[];return n("span",{role:"listitem",className:"flex items-center gap-3",style:{fontSize:`${oe(i)}px`},children:a||(m.length?m.map((p,u)=>n(y,{item:p,size:i},u)):t?n(h,{...T(S(t)),alt:_(e||""),className:"w-auto",style:{height:`${i}px`}}):e&&n("span",{children:A(e)}))})}if(s==="cards"){const i=!t&&o!==void 0?W({label:e,kind:o}):null;return n("div",{className:"sf-card flex h-10 items-center border border-line bg-surface px-4",children:a||(i?n(y,{item:i,size:20,className:L}):!t&&e&&I(e)?I(e):t?n(h,{...T(S(t)),alt:_(e||""),className:c===!1?"max-h-5 w-auto opacity-90":"max-h-5 w-auto opacity-90 grayscale"}):e&&n("span",{className:L,children:A(e)}))})}return t?n(h,{...me(S(t)),alt:e,className:["mx-auto w-auto opacity-60 transition-opacity hover:opacity-100",r==null?"h-7":"",c===!1?"":"grayscale"].filter(Boolean).join(" "),style:r==null?void 0:{height:`${r}px`}}):n("span",{className:`font-mono ${R.label} uppercase tracking-[0.2em] text-fg-dim`,children:Y(e||"Logo")})}function T(t){const e=v(t,{fallbackWidth:320,maxWidth:640});return e.srcSet?{src:e.src,srcSet:e.srcSet,sizes:"120px"}:{src:t}}function me(t){const e=v(t,{fallbackWidth:640,maxWidth:960});return e.srcSet?{src:e.src,srcSet:e.srcSet,sizes:"240px"}:{src:t}}export{L as CARD_WORDS_CLASS,ce as LogoWallMark,se as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
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
|
-
import type
|
|
4
|
+
import { type SectionEdge } from "../lib/content/section-edge.js";
|
|
5
5
|
export declare function useInsideSiteGutter(): boolean;
|
|
6
6
|
export declare function InsideSiteColumn({ children }: {
|
|
7
7
|
children?: ReactNode;
|
|
@@ -9,6 +9,10 @@ export declare function InsideSiteColumn({ children }: {
|
|
|
9
9
|
export declare function SplitBandAndColumn({ children }: {
|
|
10
10
|
children?: ReactNode;
|
|
11
11
|
}): import("react").JSX.Element;
|
|
12
|
+
export declare function GroundStopsAt({ ground, children }: {
|
|
13
|
+
ground: string;
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
12
16
|
export declare function useInsideBox(): boolean;
|
|
13
17
|
export declare function NestedBoxChoice({ atTop, nested }: {
|
|
14
18
|
atTop: ReactNode;
|
|
@@ -34,7 +38,7 @@ export declare function SectionGroupChoice({ draw }: {
|
|
|
34
38
|
draw: (group: SectionGroupWidths | null) => ReactNode;
|
|
35
39
|
}): import("react").JSX.Element;
|
|
36
40
|
export declare function useSectionEdge(): SectionEdge | null;
|
|
37
|
-
export default function SiteGutterFrame({ contained, framedClass, fillClass, columnClass, style, tabLabel, pad, border, outerAttrs: outerAttrsIn, box, edge, outerStyle, outerClass: outerClassIn, bleed, children, }: {
|
|
41
|
+
export default function SiteGutterFrame({ contained, framedClass, fillClass, columnClass, style, tabLabel, pad, border, outerAttrs: outerAttrsIn, box, edge, outerStyle, outerClass: outerClassIn, bleed, siteSide, children, }: {
|
|
38
42
|
contained: boolean;
|
|
39
43
|
framedClass: string;
|
|
40
44
|
fillClass: string;
|
|
@@ -52,5 +56,6 @@ export default function SiteGutterFrame({ contained, framedClass, fillClass, col
|
|
|
52
56
|
outerStyle?: CSSProperties;
|
|
53
57
|
outerClass?: string;
|
|
54
58
|
bleed?: boolean;
|
|
59
|
+
siteSide?: boolean;
|
|
55
60
|
children?: ReactNode;
|
|
56
61
|
}): ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,Fragment as
|
|
1
|
+
"use client";import{jsx as t,Fragment as G}from"react/jsx-runtime";import{useTakeViewHide as M,withViewHide as D}from"./ViewHideRoot.js";import{createContext as c,useContext as o}from"react";import{rootPadAttrs as Q,wrapperPadAttrs as Y}from"../lib/content/section-padding.js";import{SECTION_BORDER_CLASS as Z,SECTION_BORDER_SELF_CLASS as b}from"../../format/lib/content/borders.js";import{BOX_HOLDS_NO_GUTTER_CLASS as ee}from"../../format/lib/content/page-width.js";import{drawsSiteGutter as te}from"../../format/lib/content/site-gutter.js";import{groundBeyond as ne}from"../lib/content/section-edge.js";const f=c(!1);function he(){return o(f)}function ve({children:e}){return t(f.Provider,{value:!0,children:e})}const _=c(!1);function Se({children:e}){return t(_.Provider,{value:!0,children:e})}const H=c(null);function xe({ground:e,children:n}){return t(H.Provider,{value:e,children:n})}const O=c(!1);function oe(){return o(O)}function Ce({atTop:e,nested:n}){return t(G,{children:oe()?n:e})}const m=c(void 0);function Ne({children:e}){return t(m.Provider,{value:null,children:e})}function re(){return o(m)===void 0&&!o(O)&&!o(f)}function ge({own:e,followed:n}){return t(G,{children:re()?e():n()})}const k=c(null);function Be({value:e,children:n}){return t(k.Provider,{value:e,children:n})}function Pe({draw:e}){return t(G,{children:e(o(k))})}function Ge(){return o(m)??null}function se({contained:e,framedClass:n,fillClass:V,columnClass:R,style:A,tabLabel:W,pad:i,border:a,outerAttrs:E,box:h=!1,edge:U=!1,outerStyle:p,outerClass:w,bleed:v=!1,siteSide:X=!1,children:y}){const q=o(f),S=o(_),l=te(e,q),r=l&&!S,u=M(),I=!!(a&&r),d=I?w:D(w??"",u.className)||void 0,x=I||!u.className?E:{...E,...u.attrs},C=i&&!r?Q(i.values,i.frame):null,N=a&&!r?a:null,g=h&&!v?ee:null,B=[r?n:V,r?g:null,C?.className,N?b:null].filter(Boolean).join(" "),L=ie(v&&r,C||N?{...A,...C?.style,...N}:A),z=o(m),J=o(H),K=h&&U&&z===void 0?{gutter:l,...i?{pad:i.values}:{},beyond:l&&S?ne(J):"0px",...X&&l?{site:!0}:{}}:null,$=h?t(O.Provider,{value:!0,children:t(m.Provider,{value:K,children:y})}):y,P=l?t(f.Provider,{value:!0,children:$}):$,s=i&&r?Y(i.values):null,T=x&&Object.keys(x).length>0?x:null,j=t("div",{...s?null:T,className:!s&&d?B?`${B} ${d}`:d:B,style:s||!p?L:{...L,...p},"data-tab-label":W,children:S?t(_.Provider,{value:!1,children:l&&!v?t("div",{className:g?`${R} ${g}`:R,children:P}):P}):P}),F=s?t("div",{...T,className:d?`${s.className} ${d}`:s.className,style:p?{...s.style,...p}:s.style,children:j}):j;return u.scope(a&&r?t("div",{className:D(Z,u.className),style:{display:"contents",...a},...u.attrs,children:F}):F)}function ie(e,n){return e?{...n,paddingLeft:0,paddingRight:0}:n}export{xe as GroundStopsAt,ve as InsideSiteColumn,Ce as NestedBoxChoice,Ne as NotASectionEdge,Pe as SectionGroupChoice,Be as SectionGroupWidthsProvider,ge as SectionRootChoice,Se as SplitBandAndColumn,se as default,oe as useInsideBox,he as useInsideSiteGutter,Ge as useSectionEdge,re as useSectionRoot};
|
|
@@ -6,6 +6,7 @@ interface TextProps {
|
|
|
6
6
|
pad?: PadValues;
|
|
7
7
|
ownWidth?: boolean;
|
|
8
8
|
text: string;
|
|
9
|
+
labelId?: string;
|
|
9
10
|
number?: string;
|
|
10
11
|
align?: Align;
|
|
11
12
|
alignTablet?: unknown;
|
|
@@ -21,5 +22,5 @@ interface TextProps {
|
|
|
21
22
|
partDeclare?: boolean;
|
|
22
23
|
}
|
|
23
24
|
export declare function headingLevelOfStyle(id: string): HeadingLevel;
|
|
24
|
-
export default function Text({ text, number, align, alignTablet, alignPhone, tone, contained, hero, pad, tag, textStyle, ownWidth, partAlign, onLine, partKey, partDeclare }: TextProps): import("react").JSX.Element;
|
|
25
|
+
export default function Text({ text, labelId, number, align, alignTablet, alignPhone, tone, contained, hero, pad, tag, textStyle, ownWidth, partAlign, onLine, partKey, partDeclare }: TextProps): import("react").JSX.Element;
|
|
25
26
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as r,jsxs as z}from"react/jsx-runtime";import v from"./BlockFrame.js";import{renderGold as h,renderHeadline as L,splitParagraphs as R}from"./goldPhrases.js";import{headingLook as A}from"./Heading.js";import{alignViewClasses as M}from"../../format/lib/content/block-align.js";import{textTagOf as U}from"../../format/lib/content/text-tag.js";import{KICKER_NUMBER_ATTR as B,kickerLead as G}from"../lib/content/page-contents.js";import{isTextStyleId as H}from"../lib/document/part-styles.js";import{faceClassOf as S}from"../../format/lib/text-style-face.js";import{useMirroredCopy as I}from"./MirrorContext.js";import{mirroredTextClasses as C}from"../../format/lib/content/mirror-cards.js";import K from"./PartStyledKind.js";const c={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)]"},m=e=>e?` ${e}`:"";function P(e,o,l){const t=M("place",e,o,l);return t?` ${t}`:""}const F={left:"text-left",center:"text-left mx-auto",right:"text-left ml-auto"},V=`max-w-[380px] ${c.bodySmall} leading-[1.5] opacity-80 ${c.bodyUpTo800}`,W={default:"text-fg",dim:"text-fg-dim"};function X(e){return String(Math.min(Number(e.slice(8)),6))}function Z({text:e,labelId:o,number:l,align:t,alignTablet:k,alignPhone:w,tone:u,contained:g,hero:E=!1,pad:n,tag:_,textStyle:y,ownWidth:O=!1,partAlign:$,onLine:d=!1,partKey:T,partDeclare:j=!1}){const f=s=>T?r(K,{kind:T,declare:j,children:s}):s,b=I();if(E)return r("p",{className:V,children:h(e)});const p=l?r("span",{[B]:"",children:G(l)}):void 0,a=H(y)?y:void 0,N=`${a?`${S({id:a})} `:""}${O?"":"max-w-[680px] "}whitespace-pre-line ${a==="body-5"?c.label:c.bodyLarge} leading-[1.7]${m(t?F[t]:"")}${P(t,k,w)}${m(u?W[u]:"")}${m(C(b,t,$))}`,x=U(_);if(a?.startsWith("heading-")){const s=X(a),i=A(s,S({id:a}));return r(v,{contained:g,className:d?"":"py-6",pad:n?{values:n,frame:d?0:24}:void 0,children:z(x,{id:o,className:`${i.className}${m(C(b,void 0,$))}`,style:i.style,children:[p,f(L(e.trim(),!1))]})})}return r(v,{contained:g,className:d?"":"py-4",pad:n?{values:n,frame:d?0:16}:void 0,children:x==="p"?R(e).map((s,i)=>r("p",{id:i===0?o:void 0,className:N,children:f(h(s,!1,i===0?p:void 0))},i)):r(x,{id:o,className:N,children:f(h(e.trim(),!1,p))})})}export{Z as default,X as headingLevelOfStyle};
|
|
@@ -12,4 +12,6 @@ export declare function boxStackLine(value: unknown): number;
|
|
|
12
12
|
export declare const stackRowClass: (line: number) => string;
|
|
13
13
|
export declare const stackGutterClass: (line: number) => string;
|
|
14
14
|
export declare const stackOuterClass: (line: number) => string;
|
|
15
|
-
export declare function stackLineCss(line: number
|
|
15
|
+
export declare function stackLineCss(line: number, opts?: {
|
|
16
|
+
gutter?: boolean;
|
|
17
|
+
}): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{VIEW_DESKTOP_MIN as r,VIEW_TABLET_MIN as
|
|
1
|
+
import{VIEW_DESKTOP_MIN as r,VIEW_TABLET_MIN as x}from"efficient-easel/draw";import{VIEW_LINE_PX as h}from"../../../format/lib/content/view-lines.js";const e=h["view-wide"],f=960,u=x,d={min:e,max:1600,step:10},b="stackBelow";function g(t){if(!(typeof t!="number"||!Number.isFinite(t))&&!(t<d.min||t>d.max))return Math.round(t)}function v(t){return g(t)??e}const w=t=>`sf-stack-${t}`,_=t=>`sf-stack-${t}-gutter`,k=t=>`sf-stack-${t}-outer`,n=t=>`${t-.02}px`;function I(t,$={}){const i=$.gutter!==!1,a=`.${w(t)}`,p=`.${_(t)}`,c=`.${k(t)}`,s=[];if(t>e){const o=`${a}>.sf-block-size,${a}>[data-easel-block]>[data-sf-part-host]>.sf-block-size`,m=Math.min(t,r);s.push(`@media (min-width:${e}px) and (max-width:${n(t)}){${a}${a}{flex-direction:column}.sf-gap-overlap${a}{--sf-gap-overlap-eff:calc(var(--sf-gap-overlap) / 2)}${o}{width:min(var(--sf-bw-p,100%),100%);flex-grow:0}}`,`@media (min-width:${e}px) and (max-width:${n(m)}){.sf-gap-zone${a}{gap:var(--sf-gap-len-tablet,var(--sf-gap-len-phone,calc(var(--sf-gap-len) / 2)))}}`),t>r&&s.push(`@media (min-width:${r}px) and (max-width:${n(t)}){.sf-gap-zone${a}{gap:var(--sf-gap-len-phone,calc(var(--sf-gap-len) / 2))}}`)}return i&&s.push(`@media (max-width:${n(t)}){${p}${p}{padding-inline:min(24px,var(--sf-site-gutter,40px))}}`),i&&t<f&&s.push(`@media (min-width:${t}px) and (max-width:${n(f)}){${p}${p}{padding-inline:var(--sf-site-gutter,40px)}}`),s.push(`@media (min-width:${u}px) and (max-width:${n(t)}){`+["top","bottom","left","right"].map(o=>`.sf-pad-${o}-phone:has(>${c}),.sf-pad-${o}-phone${c}{padding-${o}:var(--sf-pad-${o[0]}-phone)!important}`).join("")+"}"),s.join("")}export{f as BOX_GUTTER_LINE,u as BOX_PHONE_PAD_LINE,e as BOX_STACK_LINE,d as BOX_STACK_RANGE,b as STACK_BELOW_PROP,v as boxStackLine,_ as stackGutterClass,I as stackLineCss,k as stackOuterClass,w as stackRowClass,g as storedStackLine};
|
|
@@ -3,8 +3,20 @@ import { type PadValues } from "./section-padding.js";
|
|
|
3
3
|
export type SectionEdge = {
|
|
4
4
|
gutter: boolean;
|
|
5
5
|
pad?: PadValues;
|
|
6
|
+
site?: boolean;
|
|
7
|
+
beyond?: string;
|
|
6
8
|
};
|
|
7
9
|
export declare function sectionEdgeAttrs(edge: SectionEdge): {
|
|
8
10
|
className: string;
|
|
9
11
|
style?: CSSProperties;
|
|
10
12
|
};
|
|
13
|
+
export declare const EDGE_BEYOND_VAR = "--sf-edge-beyond";
|
|
14
|
+
export declare function groundBeyond(ground: string | null): string;
|
|
15
|
+
export declare function sectionEdgeBeyondAttrs(edge: SectionEdge): {
|
|
16
|
+
className: string;
|
|
17
|
+
style: CSSProperties;
|
|
18
|
+
} | null;
|
|
19
|
+
export declare function sectionEdgeBandAttrs(edge: SectionEdge): {
|
|
20
|
+
className: string;
|
|
21
|
+
style: CSSProperties;
|
|
22
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isLengthUnit as
|
|
1
|
+
import{isLengthUnit as m}from"efficient-easel/screen/lib/content/length-units";import{FULL_SECTION_WIDTH as o,SITE_COLUMN_EDGE_NARROW as b,SITE_WIDTH_CAP as u}from"../../../format/lib/content/page-width.js";import{sideViewLengths as E}from"./section-padding.js";import{finiteNumber as n}from"../../../format/lib/finite-number.js";const l="[--sf-edge-g:var(--sf-box-g,var(--sf-site-gutter,40px))] max-[960px]:[--sf-edge-g:min(24px,var(--sf-box-g,var(--sf-site-gutter,40px)))] [--sf-edge-t:max(0px,calc(var(--sf-site-width,1600px)_-_100%_-_2_*_var(--sf-edge-g)))] [--sf-edge-al:min(var(--sf-edge-l),max(calc(var(--sf-edge-t)_/_2),calc(var(--sf-edge-t)_-_var(--sf-edge-r))))] [--sf-edge-ar:min(var(--sf-edge-r),max(calc(var(--sf-edge-t)_/_2),calc(var(--sf-edge-t)_-_var(--sf-edge-l))))]",$=`[--sf-edge-g:var(--sf-box-g,var(--sf-site-gutter,40px))] ${b}`+l.slice(l.indexOf(" [--sf-edge-t:")),y="[--sf-edge-g:0px] [--sf-edge-al:var(--sf-edge-l)] [--sf-edge-ar:var(--sf-edge-r)]",T="[--sf-edge-l:var(--sf-edge-ld,0px)] [--sf-edge-r:var(--sf-edge-rd,0px)] max-view-desktop:[--sf-edge-l:var(--sf-edge-lt,var(--sf-edge-ld,0px))] max-view-desktop:[--sf-edge-r:var(--sf-edge-rt,var(--sf-edge-rd,0px))] max-view-tablet:[--sf-edge-l:var(--sf-edge-lp,var(--sf-edge-lt,var(--sf-edge-ld,0px)))] max-view-tablet:[--sf-edge-r:var(--sf-edge-rp,var(--sf-edge-rt,var(--sf-edge-rd,0px)))]",v="max-w-[100vw]",h=`ml-[calc(-1_*_(var(--sf-edge-g)_+_var(--sf-edge-al)))] mr-[calc(-1_*_(var(--sf-edge-g)_+_var(--sf-edge-ar)))] w-[calc(100%_+_2_*_var(--sf-edge-g)_+_var(--sf-edge-al)_+_var(--sf-edge-ar))] ${v}`;function c(r){const s={},e=r.pad??{};for(const[f,_,a,d]of[["l",e.left,e.leftTablet,e.leftPhone],["r",e.right,e.rightTablet,e.rightPhone]]){const t=n(_),x={desktop:e.unit,tablet:e.unitTablet,phone:e.unitPhone};t!==void 0&&(s[`--sf-edge-${f}d`]=`${t}${m(e.unit)?e.unit:"px"}`);const g=E(t,n(a),n(d),x);g.tablet!==void 0&&(s[`--sf-edge-${f}t`]=g.tablet),g.phone!==void 0&&(s[`--sf-edge-${f}p`]=g.phone)}return{className:`${r.gutter?r.site?$:l:y} ${T}`,style:s}}function I(r){const{className:s,style:e}=c(r);return{className:`${s} ${h}`,...Object.keys(e).length?{style:e}:{}}}const i="[--sf-edge-bl:max(0px,min(calc(var(--sf-edge-beyond)_+_(var(--sf-edge-l)_-_var(--sf-edge-r))_/_2),calc(2_*_var(--sf-edge-beyond))))] [--sf-edge-br:max(0px,min(calc(var(--sf-edge-beyond)_+_(var(--sf-edge-r)_-_var(--sf-edge-l))_/_2),calc(2_*_var(--sf-edge-beyond))))]";function N(r){const s=c(r).style,e=a=>{const d=s[`--sf-edge-${a}d`]??"0px",t=s[`--sf-edge-${a}t`]??d;return[d,t,s[`--sf-edge-${a}p`]??t]},[f,_]=[e("l"),e("r")];return f.every((a,d)=>a===_[d])}const p="--sf-edge-beyond";function O(r){return`max(0px,calc((${r===null?o:`min(${o},${r})`} - ${u}) / 2))`}function B(r){const s=r.beyond;return s===void 0||s==="0px"?null:{className:N(r)?"mx-[calc(-1_*_var(--sf-edge-beyond))] px-[var(--sf-edge-beyond)]":`${i} ml-[calc(-1_*_var(--sf-edge-bl))] mr-[calc(-1_*_var(--sf-edge-br))] pl-[var(--sf-edge-bl)] pr-[var(--sf-edge-br)]`,style:{[p]:s}}}const w=`${i} ml-[calc(-1_*_(var(--sf-edge-g)_+_var(--sf-edge-al)_+_var(--sf-edge-bl)))] mr-[calc(-1_*_(var(--sf-edge-g)_+_var(--sf-edge-ar)_+_var(--sf-edge-br)))] w-[calc(100%_+_2_*_var(--sf-edge-g)_+_var(--sf-edge-al)_+_var(--sf-edge-ar)_+_var(--sf-edge-bl)_+_var(--sf-edge-br))] pl-[calc(var(--sf-edge-g)_+_var(--sf-edge-al)_+_var(--sf-edge-bl))] pr-[calc(var(--sf-edge-g)_+_var(--sf-edge-ar)_+_var(--sf-edge-br))] ${v}`;function U(r){const{className:s,style:e}=c(r);return{className:`${s} ${w}`,style:{...e,[p]:r.beyond??"0px"}}}export{p as EDGE_BEYOND_VAR,O as groundBeyond,I as sectionEdgeAttrs,U as sectionEdgeBandAttrs,B as sectionEdgeBeyondAttrs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as s,Fragment as u}from"react/jsx-runtime";import{SECTION_GRID_COLUMN_CLASS as E}from"../../../../../../format/lib/content/section-min-height.js";import _,{cardGridCornerClasses as x}from"../../../../../components/Cards.js";import{CardTemplateRows as A}from"../../../../../components/CardRowContext.js";import{cardRow as D}from"../../../../../../format/lib/content/card-template.js";import{highlightOf as H,keyedRows as f,markedRows as h,rowHoldsContent as b}from"../../../../../../format/lib/content/card-state.js";import{declaredBlockSource as g,sourceChoices as I,sourcedRows as w}from"../../../../../../format/lib/content/block-sources.js";import{parseSectionHeadPlacement as L}from"../../../../../../format/lib/sections/section-head-placement.js";import{parseSectionEyebrowLook as v}from"../../../../../../format/lib/sections/section-eyebrow-look.js";import{phRows as F,phHide as y}from"../../scaffold.js";import{say as n}from"../../../../../../format/lib/editor-words.js";import{SERVED_CARD_FIELDS as a}from"../../../../../../format/lib/document/blocks/general/Cards/card-seed.js";import{CardsMeta as T,CARDS_PH as C}from"../../../../../../format/lib/document/blocks/general/Cards/meta.js";const S=()=>[{title:n("Card title one"),body:n("A short line about this card.")},{title:n("Card title two"),body:n("A short line about this card.")},{title:n("Card title three"),body:n("A short line about this card.")}],R=()=>S().map(t=>({[a.title]:t.title??"",[a.body]:t.body??""}));function N(t){return g(t)?w(t,t.editor?.isEditing===!0,R()).rows.filter(e=>e[a.title]||e[a.body]).map(e=>({title:e[a.title]??"",body:e[a.body]??""})):null}function O(t){const e=t.editor?.isEditing===!0,i=g(t),o=H(t);if(i){const r=w(t,e,R());return h(f(r.rows,r.sample?I(i):[]).filter(b),o)}const l=F(t.items,S(),t.editor).map(D);return h(f(l).filter(r=>e||b(r)),o)}function P(t,e,i){const o=i?`relative grid ${E} bg-bg`:"relative bg-bg";return s("div",{className:e?`${o} ${e}`:o,children:t})}const X={...T,render:t=>{const e=L(t.headPlacement)==="own-box",i=d=>e?void 0:d,o=(t.template?.blockCount??0)>0,l=N(t);if(!o&&l&&!l.length)return s(u,{});const r=d=>s(_,{look:v(t.eyebrowLook,t.cardStyle==="label-only"?"KeyFeatures":"Cards"),eyebrow:i(y(t.eyebrow,C.eyebrow,t.editor)),title:i(y(t.title,C.title,t.editor)),columns:t.columns,omitHead:e,editing:t.editor?.isEditing,cards:d}),{rows:c,states:k}=o?O(t):{rows:[],states:[]};return o&&l&&!c.length?s(u,{}):s(A,{ownerId:String(t.id??""),ownerType:"Cards",Template:t.template,rows:c,states:k,fallback:r(),wrapCopy:(d,m)=>P(d,x(m.index,c.length,t.columns),m.state?.highlighted===!0),children:d=>c.length?r(d):r()})}};export{X as CardsRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import{BOX_ANGLE_PROP as c}from"../../../../../../format/lib/content/box-angle.js";import{BOX_SIDE_SPACE_PROP as m}from"../../../../../../format/lib/content/box-side-space.js";import{phoneKey as a,tabletKey as t}from"efficient-easel/draw";import{BOX_SWATCH_PROP as g,boxPaintOf as b}from"../../../../../../format/lib/content/box-background.js";import{sharedColumnsDrawn as f,sharedRowsDrawn as S}from"../../../../content/box-shared-columns.js";import{CountRowsContext as u,NO_COUNTS as w}from"../../../../../components/CountRowsContext.js";import{RowEmptyGate as P}from"../../../../../components/CardRowContext.js";import{BOX_HIDE_WHEN_ROW_EMPTY as k,CARD_ROW_LINK_PROP as y,namedRowField as O}from"../../../../../../format/lib/content/card-template.js";import T from"../../../../../components/Flex.js";import{loopDelayOf as C,loopSecondsOf as x,parseLoop as R,parseLoopDirection as _}from"../../../../../../format/lib/animation/index.js";import{COUNTS_SOURCE as D,declaredBlockSource as B,servedRows as j}from"../../../../../../format/lib/content/block-sources.js";import{padValuesOf as H}from"../../../../content/section-padding.js";import{sectionFillsHeight as E}from"../../../../../../format/lib/content/section-min-height.js";import{boxHighlightStyle as I,pictureHoverOf as N}from"../../../../../../format/lib/animation/hover.js";import{slotCountOf as v}from"../../../slot-counts.js";import{FlexMeta as F}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";const p={...F,render:e=>{const l=!!e.editor?.isEditing,d=n(T,{direction:e.direction,label:e.label,tabShape:e.tabShape,gap:e.gap,gapPhone:e[a("gap")],gapTablet:e[t("gap")],justify:e.justify,justifyTablet:e[t("justify")],justifyPhone:e[a("justify")],align:e.align,alignTablet:e[t("align")],alignPhone:e[a("align")],wrap:e.wrap,wrapTablet:e[t("wrap")],share:e.share,sharePhone:e[a("share")],shareTablet:e[t("share")],wrapPhone:e[a("wrap")],orderPhone:e[a("order")],phoneRow:e.phoneRow,columns:e.columns,columnsTablet:e[t("columns")],separator:e.separator,stackBelow:e.stackBelow,blockSpacing:e.blockSpacing,blockSpacingTablet:e[t("blockSpacing")],blockSpacingPhone:e[a("blockSpacing")],bgImage:e.bgImage,bgImagePhone:e.bgImagePhone,pictureHover:N(e),darken:e.darken,darkenStyle:e.darkenStyle,darkenTablet:e[t("darken")],darkenPhone:e[a("darken")],darkenStyleTablet:e[t("darkenStyle")],darkenStylePhone:e[a("darkenStyle")],placement:e.placement,padV2:e.padV2===!0,border:e.sectionBorder,borderTablet:e.sectionBorderTablet,borderPhone:e.sectionBorderPhone,pad:H(e),contained:e.contained,fillHeight:E(e),shadow:e.shadow,shadowTablet:e[t("shadow")],shadowPhone:e[a("shadow")],loop:R(e.loop),scrollDirection:_(e.scrollDirection),loopSeconds:x({loopDuration:e.loopDuration}),loopDelay:C({loopDelay:e.loopDelay}),editing:l,fillColor:e.fillColor,fillColorTablet:e[t("fillColor")],fillColorPhone:e[a("fillColor")],swatch:e[g],line:e.line,upcoming:e.upcoming,link:e.link,rowLink:O(e,y),highlight:I(e,h=>b(h)??""),boxShape:e.boxShape,boxShapePhone:e[a("boxShape")],boxShapeTablet:e[t("boxShape")],angle:e[c],jumpHighlight:e.jumpHighlight,anchor:e.anchor,sharedSides:f(e),sharedRows:S(e),boxId:typeof e.id=="string"?e.id:void 0,slotCount:v(e),mirrorCards:e.mirrorCards,content:e.content,rowTitle:e.rowTitle,startsOpen:e.startsOpen,rowStyle:e.rowStyle,sideSpace:e[m]}),o=B(e),r=o?o===D?j(e):w:null,i=n(u.Provider,{value:r,children:d});return e[k]===void 0?i:n(P,{props:e,editing:l,children:i})}};export{p as FlexRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as i,Fragment as k}from"react/jsx-runtime";import B from"../../../../../components/Logos.js";import{CardTemplateRows as H}from"../../../../../components/CardRowContext.js";import{declaredBlockSource as _}from"../../../../../../format/lib/content/block-sources.js";import{phRows as x,phHide as R}from"../../scaffold.js";import{parseLogoLook as S}from"../../../../../../format/lib/sections/logo-look.js";import{parseSectionHeadPlacement as T}from"../../../../../../format/lib/sections/section-head-placement.js";import{LOGOS_PH as A,LogosMeta as E,logosScaffoldItems as O}from"../../../../../../format/lib/document/blocks/general/Logos/meta.js";import{wallRows as j}from"./wall-rows.js";import{WALL_LABELLED_BY_PROP as C}from"../../../wall-labels.js";const K={...E,render:o=>{const{items:t,contained:g,heading:s,columns:c,logoHeight:f,bandPadding:h,grayscale:L,logos:p,look:u,headPlacement:w,editor:n,align:b,alignTablet:P,alignPhone:y}=o,l=o[C],e=T(w)==="own-box",a=r=>i(B,{items:e?Array.isArray(t)?t:[]:x(t,O(),n),contained:g,heading:e?void 0:R(s,A.heading,n),columns:c,logoHeight:f,bandPadding:h,grayscale:L,logos:e?p:void 0,look:S(u),omitHead:e,cards:r,align:b,alignTablet:P,alignPhone:y,labelledBy:typeof l=="string"?l:void 0});if(_(o)==="")return a();const d=n?.isEditing===!0,m=(o.template?.blockCount??0)>0?j(o,d):[];return!d&&!m.length?i(k,{}):i(H,{ownerId:String(o.id??""),ownerType:"Logos",Template:o.template,rows:m,fallback:a([]),children:r=>a(r)})}};export{K as LogosRender};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{declaredBlockSource as t,sourcedRows as a}from"../../../../../../format/lib/content/block-sources.js";import{isPaymentMethodSource as m,paymentMarkRows as s}from"../../../../sections/payment-rows.js";import{logosScaffoldItems as c}from"../../../../../../format/lib/document/blocks/general/Logos/meta.js";const f=()=>c().map(o=>({label:o.alt}));function u(o,r){const e=a(o,r,f()).rows.filter(l=>l.label);return m(t(o))?s(e):e}export{u as wallRows};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as c,jsx as r}from"react/jsx-runtime";import{CardRowDrawn as
|
|
1
|
+
import{Fragment as c,jsx as r}from"react/jsx-runtime";import{CardRowDrawn as T}from"../../../../../components/CardRowContext.js";import{CountDrawn as b}from"../../../../../components/CountRowsContext.js";import{KickerNumberDrawn as N}from"../../../../../components/PageContentsContext.js";import{KICKER_NUMBER_PROP as k}from"../../../../content/page-contents.js";import{WALL_LABEL_ID_PROP as D}from"../../../wall-labels.js";import{namedRowField as B,rowPartByKey as F}from"../../../../../../format/lib/content/card-template.js";import{TOP_LINE_ATTRIBUTE as W,TOP_LINE_CLASS as j,cardPlaceOf as v,framesItsCards as H}from"../../../../../../format/lib/content/card-place.js";import{blockSetsItsWidth as M,blockSizeValuesOf as U}from"../../../../content/block-size.js";import{linkedCount as w}from"../../../../../../format/lib/content/count-numbers.js";import{padValuesOf as V}from"../../../../content/section-padding.js";import z from"../../../../../components/Text.js";import{hidableText as d,readHidable as q}from"efficient-easel/draw";import{PH as P}from"../../../../../../format/lib/document/blocks/placeholders.js";import{phPrev as G}from"../../scaffold.js";import{readPartStyle as J}from"../../../part-styles.js";import{TextMeta as Q}from"../../../../../../format/lib/document/blocks/general/Text/meta.js";const gt={...Q,render:t=>{const{text:a,align:_,alignTablet:p,alignPhone:I,tone:K,tag:L,contained:E,editor:m}=t;if(q(a).hidden)return r(c,{});const{textStyle:f,align:R}=J(t,"text"),C=f?.startsWith("heading-")?P.heading:P.body,O=F("Text",t,"text")?{partKey:"text",partDeclare:!!m?.isEditing}:{},s=t[D],S=typeof s=="string"?s:void 0,o=(e,n,i)=>r(z,{...O,labelId:S,text:G(e,C,m)??"",number:n,align:_,alignTablet:p,alignPhone:I,tone:K,tag:L,textStyle:f,partAlign:R,ownWidth:M(U(t)),contained:E,pad:V(t),onLine:i}),u=e=>!e?.trim()&&!m?.isEditing,g=B(t),h=w(t);if(h)return r(b,{countKey:h,children:e=>o(e??d(a))});const x=()=>{if(!g){const e=t[k];return typeof e=="string"?o(d(a),e):r(N,{id:t.id,children:n=>o(d(a),n)})}return r(T,{type:"Text",props:t,children:(e,n,i)=>{const l=d(e.text),y=w(t,i);return y?r(b,{countKey:y,children:A=>o(A??l)}):i&&u(l)?r(c,{}):o(l)}})};return v(t)!=="top-line"?x():r(T,{type:"Text",props:t,children:(e,n)=>{if(!n||!H(n.ownerType))return x();const i=d(g?e.text:a);return u(i)?r(c,{}):r("div",{className:j,[W]:"",children:o(i,void 0,!0)})}})}};export{gt as TextRender};
|
|
@@ -8,4 +8,5 @@ export { token } from "../../../../../format/lib/document/seed-parts.js";
|
|
|
8
8
|
export declare const fluidToken: (step: string, minPx: number, vw: number, px: number) => Props;
|
|
9
9
|
export declare function headWordsOnPhoneLine(part: PartRow): PartRow;
|
|
10
10
|
export declare function headReads(type: string): Readonly<Record<string, string>>;
|
|
11
|
+
export declare const SIMPLE_HEADING_LOOK: Readonly<Record<string, unknown>>;
|
|
11
12
|
export declare function headTree(type: string): PartRow;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{SPLITTABLE_SECTIONS as k}from"../../../../../format/lib/sections/section-head-placement.js";import{AUTO_COLUMN as
|
|
2
|
-
one standard.`,S)]:[]]}]},{kind:"group",name:"Words",props:{...o,...s,gap:12,maxWidth:340,maxWidthPhone:m},parts:[...t.description?[f(t.description,14,void 0,{lineHeight:1.5})]:[],...t.link?[T(14)]:[],...g?[{kind:"block",type:"ButtonBlock",props:{...x,variant:"ghost",label:"View all",href:"/wheels",_partStyles:{label:T(14).style}}}]:[]]}]}}function y(e){return{kind:"group",name:"Header",props:{...o,direction:"row",align:"end",justify:"between",gap:40,gapPhone:14,share:"content",sectionBorder:u,sectionPaddingBottom:32},parts:[{kind:"group",name:"Title",props:{...o,direction:"row",align:"end",gap:40,gapPhone:14,share:"content"},parts:[{kind:"group",name:"Number",props:{...o,sectionPaddingBottom:8},parts:[{...
|
|
1
|
+
import{SPLITTABLE_SECTIONS as k}from"../../../../../format/lib/sections/section-head-placement.js";import{AUTO_COLUMN as O,BUTTON as B,DIM as L,INNER_BOX as o,SH_LINK as _,TEXT as h,smallText as I}from"./section-to-box-row-parts.js";import{labelTextSeed as M}from"../../../../../format/lib/document/text-seeds.js";import{labelStyle as P,token as a}from"../../../../../format/lib/document/seed-parts.js";function w(e){if(e==="ProductGrid")return"shelf";const t=k[e]?.headStyle;return t==="editorial"||t==="simple"||t==="essay"?t:"standard"}const G={standard:64,editorial:60,simple:36,essay:28,shelf:20},A={SectionHeader:"accent",FAQ:"accent",FitmentFinder:"accent",FitmentTable:"accent",SpecTable:"accent",RelatedProducts:"accent",Collections:"accentNum"};function W(e){if(e==="SectionHeader")return{num:"num",title:"title",description:"description",link:!0};const t=k[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 X(e,t,n){const i=`editorial:${e}|${t}|${n}`,r=p.get(i);if(r)return r;const l=y({num:e,title:t,description:n,link:!1});return p.set(i,l),l}const u={top:0,right:0,bottom:1,left:0};import{token as Y}from"../../../../../format/lib/document/seed-parts.js";const H=(e,t,n,i)=>({sizeToken:{step:e,px:i,fluid:{minPx:t,vw:n}}}),c=(e,t,n={})=>I(e,{...a("label",t),...n}),d=(e,t)=>({kind:"text",key:e,role:"heading",props:h,style:{textStyle:"heading-2",...t}}),m=800,f=(e,t,n,i)=>({kind:"text",key:e,props:{...L,align:"right",alignPhone:"left",...n?{maxWidth:n,maxWidthPhone:m}:{}},style:{textStyle:"body-5",fontRole:"heading",alignPhone:"left",...a("body",t),...i}}),x={...B,align:"right",alignPhone:"left",..._,icon:"arrow-right",iconPosition:"after"},T=e=>({kind:"button",key:"linkText",href:"linkHref",variant:"ghost",props:x,style:{...P(e),color:"labels"}}),b=(e,t,n)=>{const i=n.role==="heading"?{tag:"h2"}:{};return{kind:"block",type:"Text",when:r=>r[e]===void 0,props:{...h,...i,...n.props,text:t,_partStyles:{text:{...n.role==="eyebrow"?C(M()):{},...n.style}}}}},C=e=>e._partStyles.text??{},s={widthFitPhone:"fill"};function R(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(R)}}function F(e,t){const n=A[e],i=n==="accent",r=c(t.num,14,{color:i?"accent":"labels"}),l=n==="accentNum"&&r.kind==="text"?{...r,mark:"accentLead"}:r,S=d(t.title,i?{...H("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:{...o,direction:"row",align:"end",justify:"between",gap:40,gapPhone:12,share:"content",sectionBorder:u,sectionPaddingBottom:24,sectionPaddingBottomPhone:20},parts:[{kind:"group",name:"Title",props:{...o,...s,direction:"row",align:"end",gap:40,gapPhone:12,share:"content"},parts:[{kind:"group",name:"Number",props:{...o,...s,align:"start",gap:12},parts:[{kind:"image",key:"logoSrc",alt:"logoAlt",props:{aspect:"auto",contained:!1}},l,...g?[b(t.num,"==01== / Collections",l)]:[]]},{kind:"group",name:"Heading",props:{...o,...s},parts:[S,...g?[b(t.title,`Three ranges,
|
|
2
|
+
one standard.`,S)]:[]]}]},{kind:"group",name:"Words",props:{...o,...s,gap:12,maxWidth:340,maxWidthPhone:m},parts:[...t.description?[f(t.description,14,void 0,{lineHeight:1.5})]:[],...t.link?[T(14)]:[],...g?[{kind:"block",type:"ButtonBlock",props:{...x,variant:"ghost",label:"View all",href:"/wheels",_partStyles:{label:T(14).style}}}]:[]]}]}}function y(e){return{kind:"group",name:"Header",props:{...o,direction:"row",align:"end",justify:"between",gap:40,gapPhone:14,share:"content",sectionBorder:u,sectionPaddingBottom:32},parts:[{kind:"group",name:"Title",props:{...o,direction:"row",align:"end",gap:40,gapPhone:14,share:"content"},parts:[{kind:"group",name:"Number",props:{...o,sectionPaddingBottom:8},parts:[{...c(e.num,13),props:{...h,...O}}]},d(e.title,{...H("headingMedium",40,5.5,80),case:"upper",weight:500,lineHeight:1,letterSpacing:-.03})]},{kind:"group",name:"Words",props:{...o,sectionPaddingBottom:4,maxWidth:360,maxWidthPhone:m},parts:e.description?[f(e.description,14,void 0,{lineHeight:1.5})]:[]}]}}function N(e,t){return{kind:"group",name:"Header",props:{...o,gap:16,gapPhone:16},parts:[c(e.num,13),d(e.title,t)]}}const E=[["para",{...P(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}]],z=e=>E.some(([t])=>t===e.titleSize)?e.titleSize:"lg";function D(e){return{kind:"group",name:"Header",props:{...o,direction:"row",align:"center",justify:"between",gap:16,share:"content",stickTop:!0,sectionBorder:u,sectionPaddingTop:12,sectionPaddingBottom:12},parts:[{kind:"group",name:"Title",props:{...o,direction:"row",align:"end",gap:24,share:"content"},parts:[c(e.num,13,{color:"labels",letterSpacing:.22,lineHeight:1}),...E.map(([t,n])=>({...d(e.title,n),when:i=>z(i)===t}))]},{kind:"group",name:"Words",props:{...o,direction:"row",align:"center",justify:"end",gap:20,share:"content"},parts:[...e.description?[f(e.description,13,340,{lineHeight:1.4})]:[],...e.link?[T(13)]:[]]}]}}function Q(e){return w(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,U={...a("headingMedium",44,32),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02};function V(e){const t=p.get(e);if(t)return t;const n=W(e),i=w(e),r=i==="editorial"?y(n):i==="simple"?N(n,U):i==="essay"?N(n,{...a("headingMedium",38,28,"headingSmall"),case:"upper",lineHeight:1,letterSpacing:-.02}):i==="shelf"?D(n):F(e,n);return p.set(e,r),r}export{G as HEAD_BELOW,U as SIMPLE_HEADING_LOOK,X as editorialHeadTree,H as fluidToken,w as headLookOf,Q as headReads,V as headTree,R as headWordsOnPhoneLine,Y as token};
|
|
@@ -28,6 +28,7 @@ export declare const headingCaseOf: (key: string) => (node: {
|
|
|
28
28
|
props: Props;
|
|
29
29
|
}) => readonly SiteWrite[];
|
|
30
30
|
export declare const smallText: (key: string, style?: Props) => PartRow;
|
|
31
|
+
export declare const filledChip: (key: string) => PartRow;
|
|
31
32
|
export declare const numberAndUnit: (number: unknown, unit: unknown) => string;
|
|
32
33
|
export declare const RIGHT_WORDS: Props;
|
|
33
34
|
export declare const leadText: (lead: string, rest: string, props: Props) => PartRow;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SECTION_WIDTH_KEYS as
|
|
1
|
+
import{SECTION_WIDTH_KEYS as L}from"../../../../../format/lib/content/section-width.js";import{phoneKey as v}from"efficient-easel/draw";import{BOX as w,INNER_BOX as I,LABEL_FACE as N,TEXT as k,boxPadding as M,fillSlot as T,token as y}from"../../../../../format/lib/document/seed-parts.js";import{ENTRANCE_KEYS as F}from"../../../animation/entrance.js";import{CARD_HOVER_KEYS as x}from"../../../../../format/lib/animation/hover.js";import{COUNT_KEY_PROP as K}from"../../../../../format/lib/content/block-sources.js";import{normalizeSiteGutter as X}from"../../../../../format/lib/content/page-width.js";import{resolveSectionPadding as G}from"../../../content/section-padding.js";import{ButtonBlockMeta as Y}from"../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";import{SECTION_PAD_INNER_DEFAULTS as V}from"../../passes/section-padding.js";import{finiteNumber as p}from"../../../../../format/lib/finite-number.js";import{convertTheme as _,hasWords as j}from"../../../sections/section-to-box.js";import{THEME_SECTION_BG as $}from"../../../../../format/lib/content/section-background.js";import{fillSlotOfInk as C}from"../../../../../format/lib/document/part-inks.js";import{parseHexColor as J}from"efficient-shell/format";import{convertLength as z,isLengthUnit as q}from"efficient-easel/screen/lib/content/length-units";import{bandPresetIndex as Q,surfaceTwoTone as Z}from"../../../../../format/lib/theme.js";import{VIEW_HIDE_KEYS as tt}from"../../../../../format/lib/content/view-hide-class.js";const B=t=>q(t)?t:"px",d=(t,o,e,n)=>o===e?t:z(t,o,e,n,{min:0,max:200,step:4});import{BOX as to,DIM as oo,INNER_BOX as eo,TEXT as no}from"../../../../../format/lib/document/seed-parts.js";const Nt={textFit:"line",textFitPhone:"wrap"},ot={...k,[K]:""},{label:kt,href:Ct,...et}=Y.defaultProps,At=et,Ht={buttonFillOpacity:0,buttonBorder:{width:0},buttonPaddingTop:0,buttonPaddingRight:0,buttonPaddingBottom:0,buttonPaddingLeft:0},Rt={...w,sectionAccent:0},Dt={sectionAccent:-1},Wt=["gridSpan","sectionHeightMode","sectionHeightValue","sectionHeightUnit","sectionHeightModeTablet","sectionHeightValueTablet","sectionHeightUnitTablet","sectionHeightModePhone","sectionHeightValuePhone","sectionHeightUnitPhone","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderTablet","sectionBorderPhone","sectionAccent","stickTop","stickTopDistance","stickTopTablet","stickTopDistanceTablet","stickTopPhone","stickTopDistancePhone","anchor","sectionAnimation",...tt,...Object.values(F).flatMap(t=>[t,v(t)]),"widthFit","widthFitTablet","widthFitPhone","width","widthTablet","widthPhone","minWidth","minWidthTablet","minWidthPhone","maxWidth","maxWidthTablet","maxWidthPhone",...Object.values(L)],c="a section width key, ignored since efficient-web-builder 45 (an old key; a section's own width has new keys, lib/content/section-width), so dropping it changes nothing",Lt={sectionSurface:"read by nothing in src/ (searched 2026-10-24): a retired theme key that draws nothing today, so dropping it changes nothing",widthMode:c,fullWidth:c,pageWidth:c,backgroundWidth:c,contentWidth:c,contentMax:c},vt=Object.fromEntries(["sectionPaddingLeft","sectionPaddingRight","sectionPaddingLeftTablet","sectionPaddingRightTablet","sectionPaddingLeftPhone","sectionPaddingRightPhone"].map(t=>[t,"needs Box side padding outside its gutter: the old section added it outside its frame, a Box's side padding replaces the gutter. 0 live nodes store it (JJ's read-only export, 2026-10-24)"]));function nt(t,o){const e=p(t.sectionPaddingTop)??0,n=p(t.sectionPaddingBottom)??0,i=p(t.sectionPaddingTopTablet),s=p(t.sectionPaddingBottomTablet),l=B(t.sectionPaddingUnit),g=B(t.sectionPaddingUnitTablet),f=B(t.sectionPaddingUnitPhone),O=(h,a,u,m)=>{const r=p(h);if(r!==void 0)return r+d(m,"px",f,"mobile");const U=a===void 0?{n:u,unit:l}:{n:a,unit:g};return d(U.n,U.unit,f,"mobile")+d(m,"px",f,"mobile")},S=(h,a,u,m,r)=>a!==void 0?{[h]:a+d(r??m,"px",g,"tablet")}:r===void 0?{}:{[h]:d(u,l,g,"tablet")+d(r,"px",g,"tablet")};return{sectionPaddingTop:e+d(o.top,"px",l,"desktop"),sectionPaddingBottom:n+d(o.bottom,"px",l,"desktop"),...S("sectionPaddingTopTablet",i,e,o.top,o.topTablet),...S("sectionPaddingBottomTablet",s,n,o.bottom,o.bottomTablet),sectionPaddingTopPhone:O(t.sectionPaddingTopPhone,i,e,o.topPhone),sectionPaddingBottomPhone:O(t.sectionPaddingBottomPhone,s,n,o.bottomPhone)}}const wt=t=>[...["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopTablet","sectionPaddingBottomTablet","sectionPaddingTopPhone","sectionPaddingBottomPhone"].map(o=>[o,o,(e,n)=>nt(n,typeof t=="function"?t(n):t)[o]]),["sectionPaddingUnit","sectionPaddingUnit"],["sectionPaddingUnitTablet","sectionPaddingUnitTablet"],["sectionPaddingUnitPhone","sectionPaddingUnitPhone"]];function P(t,o){const e=G(t,V[o]);return{sectionPaddingTop:e.top,sectionPaddingBottom:e.bottom}}const Mt=t=>[["padTop","sectionPaddingTop",(o,e)=>P(e,t).sectionPaddingTop],["padBottom","sectionPaddingBottom",(o,e)=>P(e,t).sectionPaddingBottom],["sectionPaddingTop","sectionPaddingTop",(o,e)=>P(e,t).sectionPaddingTop],["sectionPaddingBottom","sectionPaddingBottom",(o,e)=>P(e,t).sectionPaddingBottom]],it={kind:"heading-case-upper",styles:["heading-1","heading-2","heading-3"]},yt=t=>o=>j(o.props[t])?[it]:[],st=(t,o)=>({kind:"text",key:t,role:"eyebrow",props:k,...o?{style:o}:{}}),Ft=t=>({kind:"group",name:"Chip",props:{...I,...T("main"),...M(6,14)},parts:[st(t,{color:"background",...y("label",12),weight:600,letterSpacing:.16})]}),A=t=>t.background!=="transparent",dt=(t,o)=>{const[e,n]=[t,o].map(i=>typeof i=="string"?i.trim():"");return e?n?`[${e} ]{color=text}${n}`:`[${e}]{color=text}`:n},H={align:"right",alignPhone:"left"},rt=(t,o,e)=>{const n=i=>dt(i[t],i[o]);return{kind:"block",type:"Text",when:(i,s)=>s!==void 0&&n(s)!=="",box:[[t,"text",(i,s)=>n(s)],[o,"text",(i,s)=>n(s)]],props:e}},Kt=(t,o,e,n={})=>rt(t,o,{...ot,...H,...n,_partStyles:{text:{...N,color:"labels",...e,case:N.case,...H}}}),E=(t,o)=>typeof t=="number"&&Number.isInteger(t)&&t>=0?t:_(o)?.selected??0,R="var(--site-surface-2)",D=(t,o)=>_(o)?.themes[E(t.sectionAccent??0,o)],ct=(t,o)=>(e,n)=>{if(!o?.(e,n))return T(t);const i=D(e,n)?.[t];return i?{fillColor:i}:{}},Xt=(t,o)=>b(t,o)>=0,W=t=>t.startsWith("#")&&J(t)!==null,Gt=(t,o,e)=>{const n=t?.trim();if(n&&W(n))return{fillColor:n};const i=C(n);if(i)return T(i);const s=n===R?D(o,e):void 0;return s?{fillColor:Z(s)}:{}},Yt=t=>{const o=t?.trim();return!o||o==="transparent"||o===$||C(o)||o===R||W(o)?void 0:"it paints a colour that no Box Fill can hold"},b=(t,o)=>{const e=_(o)?.themes;return e&&A(t)?Q(e,E(t.sectionAccent,o)):-1},Vt=(t,o,e)=>{const n=b(o,e);return n>=0?n:t},jt=(t,o)=>{const e=b(t,o);return e>=0?{sectionAccent:e}:{}},$t=(t,o)=>A(t.props)&&b(t.props,o)<0?[{kind:"band-preset",page:E(t.props.sectionAccent,o)}]:[],Jt=t=>X(t.site?.siteGutter),at=Object.fromEntries(["Top","Right","Bottom","Left","TopPhone","RightPhone","BottomPhone","LeftPhone"].map(t=>[`sectionPadding${t}`,0])),zt=t=>({top:0,right:0,bottom:0,left:0,...t}),qt=(t,o,e,n=[])=>({kind:"group",name:t,keepEmpty:!0,props:(i,s)=>({...I,...at,...ct("surface")(i,s),...typeof e=="function"?e(i,s):e}),box:[[o,"bgImage"],x.kind,x.duration,x.delay],parts:n});export{Nt as AUTO_COLUMN,to as BOX,At as BUTTON,oo as DIM,Lt as DROP_COMMON,vt as DROP_SIDE_PADDING,Dt as FOLLOW_THE_BOX,it as HEADING_CASE_UPPER,eo as INNER_BOX,at as NO_PAD,ot as NUMBER_TEXT,H as RIGHT_WORDS,Wt as SAME_KEYS,Rt as SECTION_BOX,Ht as SH_LINK,no as TEXT,Vt as bandAccent,b as bandIndex,E as bandPage,jt as bandProps,$t as bandWrites,ct as fillFrom,Yt as fillNoBoxHolds,Ft as filledChip,yt as headingCaseOf,P as innerPad,Mt as innerPadKeys,Kt as leadLine,rt as leadText,zt as lineSides,dt as numberAndUnit,Xt as onBandPreset,Gt as ownFill,qt as pictureCell,D as sectionPage,Jt as siteGutterOf,st as smallText,nt as wrapperPad,wt as wrapperPadKeys};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{phoneKey as L,readHidable as O}from"efficient-easel/draw";import{isNodeList as z,newId as J}from"efficient-easel/data";import{say as m}from"../../../../../format/lib/editor-words.js";import{cardColumns as Q}from"../../../../../format/lib/content/card-columns.js";import{resolveSectionBackground as Z,THEME_SECTION_BG as $}from"../../../../../format/lib/content/section-background.js";import{CardsMeta as ee}from"../../../../../format/lib/document/blocks/general/Cards/meta.js";import{KeyFeaturesMeta as te}from"../../../../../format/lib/document/blocks/general/KeyFeatures/meta.js";import{finiteNumber as R}from"../../../../../format/lib/finite-number.js";import{nonEmptyString as oe}from"../../../../../format/lib/non-empty-string.js";import{parseSectionHeadPlacement as ne}from"../../../../../format/lib/sections/section-head-placement.js";import{hasWords as re}from"../../../sections/section-to-box.js";import{BOX_TYPE as i,CONTAINER_BLOCKS_SLOT as s}from"../../../../../format/lib/document/container-blocks.js";import{labelTextSeed as se}from"../../../../../format/lib/document/text-seeds.js";import{cardsCardSeed as ae,rowFieldTextSeed as d}from"../../../../../format/lib/document/blocks/general/Cards/card-seed.js";import{CARD_PLACE_PROP as ie}from"../../../../../format/lib/content/card-place.js";import{CARD_BADGE_FIELD as de}from"../../../../../format/lib/content/card-state.js";import{BOX_HIDE_WHEN_ROW_EMPTY as le,CARD_LIST_TYPE as ce,CARD_TEMPLATE_SLOT as pe,cardKeyOf as he,cardListProps as me,cardRow as ge}from"../../../../../format/lib/content/card-template.js";import{bandAccent as ue,bandProps as be,onBandPreset as ye,bandWrites as we,BUTTON as fe,DIM as x,DROP_COMMON as g,DROP_SIDE_PADDING as u,INNER_BOX as r,SAME_KEYS as b,SECTION_BOX as y,fillFrom as w,fillNoBoxHolds as Pe,ownFill as Se,SH_LINK as Ce,TEXT as l,smallText as _e,wrapperPad as f,wrapperPadKeys as P}from"./section-to-box-row-parts.js";import{headTree as A,token as p}from"./section-head-looks.js";import{boxPadding as Oe,labelStyle as xe}from"../../../../../format/lib/document/seed-parts.js";import{SECTION_BG_BUILT_IN as Ee}from"../../../../../format/lib/document/blocks/general/section-bg-built-in.js";const c=(e,t,o,n)=>({sectionBorder:{top:e,right:t,bottom:o,left:n}}),D=e=>t=>Q(R(t.columns)??R(e.columns)),ke=e=>({kind:"group",name:"Grid",props:{...r,gap:0,...c(1,0,0,1)},parts:[e]}),Te={...r,direction:"row",gap:0,share:"equal"},Le="its head sits in a Box of its own above it (own-box): the row draws the head inline",B=e=>ne(e.headPlacement)==="own-box",Re="inline is the head the row draws; an own-box node is skipped (`skip`)",Ae=e=>({kind:"group",name:"Heading",props:e,parts:[_e("eyebrow"),{kind:"text",key:"title",role:"heading",props:l,style:{textStyle:"heading-3",case:"upper"},was:{size:44}}]}),I={top:76,bottom:76,topPhone:76,bottomPhone:76},De={...r,direction:"row",align:"center",gap:16,sectionPaddingTop:32,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,...c(0,1,1,0)},N={textStyle:"body-1",color:"text"},F=(e,t)=>typeof t?.href=="string"&&t.href.trim()!=="",Be={name:"Key Features",boxProps:e=>({...y,direction:"column",gap:44,...c(1,0,1,0),...f(e,I)}),box:[...b,...P(I)],parts:[Ae({...r,direction:"row",align:"end",gap:20,wrap:!0,share:"content"}),ke({kind:"list",key:"items",name:"Feature",perRow:D(te.defaultProps),rowName:"Row",rowProps:Te,props:De,parts:[{kind:"button",key:"label",href:"href",when:F,variant:"ghost",props:{...fe,...Ce,icon:"none"},style:N},{kind:"text",key:"label",when:(e,t)=>!F(e,t),props:l,style:N,was:{size:17}}]})],drop:{...g,...u,columns:"the rows of N: one Row Box per `columns` cells, which the Box draws as N equal blocks",eyebrowLook:"needs the eyebrow's Filled look on a Text block: Filled is Key Features' own default (lib/sections/section-eyebrow-look), so 20 of 21 published nodes draw it with nothing stored; the row draws the Plain start look (the stored-node export, 2026-10-24)"}},H={top:120,bottom:120,topPhone:80,bottomPhone:80,topTablet:80,bottomTablet:80},S=e=>{const t=Z(typeof e.background=="string"?e.background:void 0,Ee.Series);return t&&t!=="transparent"?t:void 0},C=e=>S(e)===$,Ie={...r,justify:"between",gap:16,gapPhone:16,sectionHeightMode:"fixed",sectionHeightValue:340,sectionHeightUnit:"px",sectionPaddingTop:36,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,sectionPaddingTopPhone:36,sectionPaddingRightPhone:28,sectionPaddingBottomPhone:32,sectionPaddingLeftPhone:28},K={...r,direction:"row",justify:"between",gap:12,share:"content",phoneRow:2,[L("share")]:"content"},Ne=e=>{const t=S(e)?1:2;return{...r,direction:"row",columns:4,columnsTablet:2,gap:t,gapPhone:t}},E={...xe(12),letterSpacing:.22,lineHeight:1.5},W=e=>re(e.viewLabel)&&!O(e.viewLabel).hidden,a=e=>O(e).text?.trim?.()??"",v=e=>Object.fromEntries(Object.entries(e).filter(([,t])=>oe(t)!==void 0)),k=e=>e.map(([t,o,n])=>({key:t,label:o,...n?{multiline:!0}:{}})),Fe=k([["num","Number"],["since","Corner note"],["title","Card title"],["body","Card body",!0],["count","Count"],["countLabel","Count word"]]),He=k([["label","Label"],["value","Value"],["body","Card body",!0]]),T=(e,t,o,n,h,{reads:Y=["cards"],keep:U=[]}={})=>({kind:"group",name:e,props:t,parts:[{kind:"core",as:ce,headless:!0,keep:U,derive:{reads:Y,props:_=>me(n(_),o)},slots:(_,q)=>({[pe]:[h(_,q)]})}]}),M=e=>Array.isArray(e.cards)?e.cards:[],G={top:72,bottom:72,topPhone:72,bottomPhone:72},X=(e,t)=>({...c(0,1,1,0),...w("background")(e,t)}),Ke=e=>{const t=D(ee.defaultProps)(e);return{...r,direction:"row",columns:t,columnsTablet:t,gap:0,gapPhone:0,...c(1,0,0,1),shadow:!0}},We=k([["title","Card title"],["body","Card body",!0]]),ve=e=>(Array.isArray(e.items)?e.items:[]).map((t,o)=>({key:typeof t?.key=="string"&&t.key?t.key:he(ge(t),o),title:a(t?.title),body:a(t?.body)})),j=e=>{const t={},o={};for(const[n,h]of Object.entries(e.props??{}))n!=="id"&&(z(h)?o[n]=h.map(j):t[n]=h);return{type:String(e.type),props:t,...Object.keys(o).length?{slots:o}:{}}},Me=e=>({...e,slots:{...e.slots,[s]:[...e.slots?.[s]??[],d(de,{...l,tag:"p",[ie]:"top-line"},{},!0)]}}),Ge=(e,t)=>{const o=Array.isArray(e.template)?e.template.map(j):[Me(ae())],[n]=o;return o.length===1&&n.type===i?{...n,props:{...X(e,t),...n.props}}:{type:i,props:{...r,...X(e,t),name:"Card"},slots:{[s]:o}}},Xe=e=>Array.isArray(e.template)&&e.template.length===0,je=["dataSource","dataSourceOptions","highlightedCard","highlightBadge"];function yt(){const e=o=>({key:J("card"),title:m(o),body:m("A short line about this card.")}),t=[e("Card title one"),e("Card title two"),e("Card title three")];return{eyebrow:m("Label"),title:m("Section *heading.*"),items:t}}const Ve={name:"Cards",boxProps:(e,t)=>({...y,direction:"column",gap:36,gapPhone:28,...w("surface")(e,t),...f(e,G)}),box:[...b,...P(G)],skip:e=>e.cardStyle==="label-only"?"Label only is Key Features' look: no live node holds it, so it has no row of its own yet":void 0,parts:[{...A("Cards"),when:e=>!B(e)},{...T("Cards",Ke,We,ve,Ge,{reads:["items"],keep:je}),when:e=>!Xe(e)}],drop:{...g,...u,columns:'Box "Cards": its Columns and tablet Columns',cardStyle:"the standard card is what the row draws; a Label only node is skipped (0 live nodes)",template:"the Card list's template (the card Box takes the old cell's ground and lines)",headPlacement:"an own-box node lands without its head; inline is the head the row draws",eyebrowLook:"needs the eyebrow's Filled look on a Text block: Plain is the eyebrow start look the row draws; 2 of 62 live nodes store it (the stored-node export, 2026-10-24)"}},Ye={name:"Recurring Columns",boxProps:(e,t)=>({...y,direction:"column",gap:60,gapPhone:60,...c(0,0,1,0),...C(e)?be(e,t):{},...Se(S(e),e,t),...f(e,H)}),box:[...b.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,t,o)=>C(t)?ue(e,t,o):e],...P(H)],skip:e=>Pe(S(e))??(B(e)?Le:void 0),site:(e,t)=>C(e.props)?we(e,t):[],parts:[A("Series"),T("Cards",Ne,Fe,e=>M(e).map(t=>v({num:a(t.num),since:a(t.since),title:a(t.title),body:a(t.desc),count:a(t.entries),countLabel:a(t.entriesLabel)})),(e,t)=>({type:i,props:{...Ie,...w("background",(o,n)=>C(o)&&ye(o,n))(e,t),name:"Card"},slots:{[s]:[{type:i,props:{...r,name:"Words",gap:16,gapPhone:16},slots:{[s]:[{type:i,props:{...K,name:"Top"},slots:{[s]:[d("num",l,p("label",13),!0),d("since",l,p("label",13),!0)]}},d("title",{...l,tag:"h3"},{textStyle:"heading-3",...p("headingSmall",28),weight:500,case:"upper",lineHeight:1.04,letterSpacing:-.02}),d("body",x,{textStyle:"body-5",fontRole:"heading",...p("body",14),lineHeight:1.6})]}},{type:i,props:{...K,name:"Footer",align:"center",gap:0,gapPhone:0,sectionPaddingTop:16,sectionPaddingTopPhone:16,...c(1,0,0,0),...W(e)?{}:{[le]:["count","countLabel"]}},slots:{[s]:[{type:i,props:{...r,name:"Count",direction:"row",align:"center",gap:12,gapPhone:12,share:"content",[L("share")]:"content"},slots:{[s]:[d("count",l,E),d("countLabel",x,E)]}},...W(e)?[{type:i,props:{...r,name:"View",maxWidthPhone:266},slots:{[s]:[{type:"Text",props:{...l,text:O(e.viewLabel).text,_partStyles:{text:{...se()._partStyles.text,...E}}}}]}}]:[]]}}]}}))],reads:{viewLabel:"a Text typed once in the card template: the far end of every card's footer",background:"the Box's theme (the band preset) or its Fill"},drop:{...g,...u,headPlacement:Re}},V={top:60,bottom:60,topPhone:40,bottomPhone:40},Ue={...r,direction:"row",columns:3,gap:40,gapPhone:16},qe={...r,gap:8,gapPhone:8,...Oe(24),...c(1,1,1,1)},ze={name:"Document Detail Cards",boxProps:e=>({...y,direction:"column",gap:40,gapPhone:16,...c(0,0,1,0),...f(e,V)}),box:[...b,...P(V)],parts:[T("Cards",Ue,He,e=>M(e).map(t=>v({label:a(t.label),value:a(t.value),body:a(t.desc)})),(e,t)=>({type:i,props:{...qe,...w("surface")(e,t),name:"Card"},slots:{[s]:[d("label",l,{...p("label",12),lineHeight:1.5},!0),{type:i,props:{...r,name:"Words",gap:14,gapPhone:14},slots:{[s]:[d("value",l,{textStyle:"heading-3",...p("headingSmall",20),weight:500,letterSpacing:-.015,lineHeight:1.5}),d("body",x,{textStyle:"body-5",fontRole:"accent",...p("body",14),italic:!0,lineHeight:1.5})]}}]}}))],drop:{...g,...u}},wt={Cards:Ve,KeyFeatures:Be,Series:Ye,DocMetaCards:ze};export{wt as CARDS_SECTION_TO_BOX,yt as cardsPressStarter};
|
|
1
|
+
import{phoneKey as k,readHidable as E}from"efficient-easel/draw";import{isNodeList as de,newId as ce}from"efficient-easel/data";import{say as u}from"../../../../../format/lib/editor-words.js";import{cardColumns as pe}from"../../../../../format/lib/content/card-columns.js";import{resolveSectionBackground as me,THEME_SECTION_BG as he}from"../../../../../format/lib/content/section-background.js";import{CardsMeta as be}from"../../../../../format/lib/document/blocks/general/Cards/meta.js";import{KeyFeaturesMeta as ue}from"../../../../../format/lib/document/blocks/general/KeyFeatures/meta.js";import{finiteNumber as I}from"../../../../../format/lib/finite-number.js";import{nonEmptyString as x}from"../../../../../format/lib/non-empty-string.js";import{parseSectionHeadPlacement as ye}from"../../../../../format/lib/sections/section-head-placement.js";import{parseSectionEyebrowLook as ge}from"../../../../../format/lib/sections/section-eyebrow-look.js";import{hasWords as fe}from"../../../sections/section-to-box.js";import{BOX_TYPE as a,CONTAINER_BLOCKS_SLOT as l}from"../../../../../format/lib/document/container-blocks.js";import{labelTextSeed as Se}from"../../../../../format/lib/document/text-seeds.js";import{LABEL_ONLY_CARD_FIELDS as B,rowFieldTextSeed as d}from"../../../../../format/lib/document/blocks/general/Cards/card-seed.js";import{CARDS_CELL as Ce,cardListCardSeed as Pe,cardsGridLook as N,labelOnlyListCardSeed as F}from"../../../../../format/lib/document/blocks/general/Cards/card-list-seed.js";import{BOX_HIDE_WHEN_ROW_EMPTY as we,CARD_LIST_TYPE as _e,CARD_TEMPLATE_SLOT as Oe,cardKeyOf as H,cardListProps as Le,cardRow as W}from"../../../../../format/lib/content/card-template.js";import{bandAccent as ke,bandProps as Ee,onBandPreset as xe,bandWrites as Te,DIM as T,DROP_COMMON as y,DROP_SIDE_PADDING as g,INNER_BOX as r,SAME_KEYS as f,SECTION_BOX as S,fillFrom as m,filledChip as Re,fillNoBoxHolds as Ae,ownFill as De,TEXT as c,smallText as Ie,wrapperPad as C,wrapperPadKeys as P}from"./section-to-box-row-parts.js";import{headTree as M,SIMPLE_HEADING_LOOK as Be,token as p}from"./section-head-looks.js";import{boxPadding as Ne,labelStyle as Fe}from"../../../../../format/lib/document/seed-parts.js";import{SECTION_BG_BUILT_IN as He}from"../../../../../format/lib/document/blocks/general/section-bg-built-in.js";const h=(e,t,o,n)=>({sectionBorder:{top:e,right:t,bottom:o,left:n}}),v=e=>t=>pe(I(t.columns)??I(e.columns)),We="its head sits in a Box of its own above it (own-box): the row draws the head inline",K=e=>ye(e.headPlacement)==="own-box",Me="inline is the head the row draws; an own-box node is skipped (`skip`)",ve={kind:"text",key:"title",role:"heading",props:c,style:{textStyle:"heading-3",...Be}},G={top:120,bottom:120,topPhone:80,bottomPhone:80,topTablet:80,bottomTablet:80},w=e=>{const t=me(typeof e.background=="string"?e.background:void 0,He.Series);return t&&t!=="transparent"?t:void 0},_=e=>w(e)===he,Ke={...r,justify:"between",gap:16,gapPhone:16,sectionHeightMode:"fixed",sectionHeightValue:340,sectionHeightUnit:"px",sectionPaddingTop:36,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,sectionPaddingTopPhone:36,sectionPaddingRightPhone:28,sectionPaddingBottomPhone:32,sectionPaddingLeftPhone:28},X={...r,direction:"row",justify:"between",gap:12,share:"content",phoneRow:2,[k("share")]:"content"},Ge=e=>{const t=w(e)?1:2;return{...r,direction:"row",columns:4,columnsTablet:2,gap:t,gapPhone:t}},R={...Fe(12),letterSpacing:.22,lineHeight:1.5},j=e=>fe(e.viewLabel)&&!E(e.viewLabel).hidden,s=e=>E(e).text?.trim?.()??"",O=e=>Object.fromEntries(Object.entries(e).filter(([,t])=>x(t)!==void 0)),A=e=>e.map(([t,o,n])=>({key:t,label:o,...n?{multiline:!0}:{}})),Xe=A([["num","Number"],["since","Corner note"],["title","Card title"],["body","Card body",!0],["count","Count"],["countLabel","Count word"]]),je=A([["label","Label"],["value","Value"],["body","Card body",!0]]),b=(e,t,o,n,i,{reads:ae=["cards"],keep:ie=[]}={})=>({kind:"group",name:e,props:t,parts:[{kind:"core",as:_e,headless:!0,keep:ie,derive:{reads:ae,props:L=>Le(n(L),o)},slots:(L,le)=>({[Oe]:[i(L,le)]})}]}),Y=e=>Array.isArray(e.cards)?e.cards:[],V={top:76,bottom:76,topPhone:76,bottomPhone:76},U=e=>(Array.isArray(e.items)?e.items:[]).map(t=>O({title:s(t?.label),href:typeof t?.href=="string"?t.href.trim():""})).filter(t=>t.title!==void 0).map((t,o)=>({key:H(W(t),o),...t})),Ye=e=>U(e).some(t=>x(t.href)!==void 0),q=[{key:B.label,label:"Feature label"},{key:B.href,label:"Link",kind:"link"}],z=e=>ge(e.eyebrowLook,"KeyFeatures")==="filled",Ve={name:"Key Features",boxProps:(e,t)=>({...S,direction:"column",gap:44,gapPhone:32,...m("surface")(e,t),...h(1,0,1,0),...C(e,V)}),box:[...f,...P(V)],parts:[{kind:"group",name:"Heading",props:{...r,direction:"row",align:"end",gap:20,wrap:!0,share:"content",phoneRow:2,[k("share")]:"content"},parts:[{...Re("eyebrow"),when:z},{...Ie("eyebrow"),when:e=>!z(e)},ve]},b("Cards",e=>({...r,...N(v(ue.defaultProps)(e))}),q,U,e=>F(Ye(e)),{reads:["items"]})],drop:{...y,...g,columns:'Box "Cards": its Columns and tablet Columns',eyebrowLook:"the Filled look is a Box in the main colour round the eyebrow Text; the plain look is the eyebrow Text"}},J={top:72,bottom:72,topPhone:72,bottomPhone:72},Q=(e,t)=>({...Ce,...m("background")(e,t)}),Z=e=>{const t=v(be.defaultProps)(e);return{...r,...N(t)}},Ue=A([["title","Card title"],["body","Card body",!0]]),$=e=>(Array.isArray(e.items)?e.items:[]).map((t,o)=>({key:typeof t?.key=="string"&&t.key?t.key:H(W(t),o),title:s(t?.title),body:s(t?.body)})),ee=e=>{const t={},o={};for(const[n,i]of Object.entries(e.props??{}))n!=="id"&&(de(i)?o[n]=i.map(ee):t[n]=i);return{type:String(e.type),props:t,...Object.keys(o).length?{slots:o}:{}}},te=(e,t)=>{const o=D(e)?F(qe(e)):Pe(),n=Array.isArray(e.template)?e.template.map(ee):[o],[i]=n;return n.length===1&&i.type===a?{...i,props:{...Q(e,t),...i.props}}:{type:a,props:{...r,...Q(e,t),name:"Card"},slots:{[l]:n}}},D=e=>e.cardStyle==="label-only",oe=e=>$(e).map((t,o)=>{const n=e.items[o]?.href;return O({key:t.key,title:t.title,href:typeof n=="string"?n.trim():""})}),qe=e=>oe(e).some(t=>x(t.href)!==void 0),ne=e=>Array.isArray(e.template)&&e.template.length===0,re=["dataSource","dataSourceOptions","highlightedCard","highlightBadge"];function Pt(){const e=o=>({key:ce("card"),title:u(o),body:u("A short line about this card.")}),t=[e("Card title one"),e("Card title two"),e("Card title three")];return{eyebrow:u("Label"),title:u("Section *heading.*"),items:t}}const ze={name:"Cards",boxProps:(e,t)=>({...S,direction:"column",gap:36,gapPhone:28,...m("surface")(e,t),...C(e,J)}),box:[...f,...P(J)],parts:[{...M("Cards"),when:e=>!K(e)},{...b("Cards",Z,Ue,$,te,{reads:["items"],keep:re}),when:e=>!ne(e)&&!D(e)},{...b("Cards",Z,q,oe,te,{reads:["items"],keep:re}),when:e=>!ne(e)&&D(e)}],drop:{...y,...g,columns:'Box "Cards": its Columns and tablet Columns',cardStyle:"the Card list's template: the Cards card, or under Label only the Label only card (a cell Box, a Mark Box, the label Text)",template:"the Card list's template (the card Box takes the old cell's ground and lines)",headPlacement:"an own-box node lands without its head; inline is the head the row draws",eyebrowLook:"needs the eyebrow's Filled look on a Text block: Plain is the eyebrow start look the row draws; 2 of 62 live nodes store it (the stored-node export, 2026-10-24)"}},Je={name:"Recurring Columns",boxProps:(e,t)=>({...S,direction:"column",gap:60,gapPhone:60,...h(0,0,1,0),..._(e)?Ee(e,t):{},...De(w(e),e,t),...C(e,G)}),box:[...f.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,t,o)=>_(t)?ke(e,t,o):e],...P(G)],skip:e=>Ae(w(e))??(K(e)?We:void 0),site:(e,t)=>_(e.props)?Te(e,t):[],parts:[M("Series"),b("Cards",Ge,Xe,e=>Y(e).map(t=>O({num:s(t.num),since:s(t.since),title:s(t.title),body:s(t.desc),count:s(t.entries),countLabel:s(t.entriesLabel)})),(e,t)=>({type:a,props:{...Ke,...m("background",(o,n)=>_(o)&&xe(o,n))(e,t),name:"Card"},slots:{[l]:[{type:a,props:{...r,name:"Words",gap:16,gapPhone:16},slots:{[l]:[{type:a,props:{...X,name:"Top"},slots:{[l]:[d("num",c,p("label",13),!0),d("since",c,p("label",13),!0)]}},d("title",{...c,tag:"h3"},{textStyle:"heading-3",...p("headingSmall",28),weight:500,case:"upper",lineHeight:1.04,letterSpacing:-.02}),d("body",T,{textStyle:"body-5",fontRole:"heading",...p("body",14),lineHeight:1.6})]}},{type:a,props:{...X,name:"Footer",align:"center",gap:0,gapPhone:0,sectionPaddingTop:16,sectionPaddingTopPhone:16,...h(1,0,0,0),...j(e)?{}:{[we]:["count","countLabel"]}},slots:{[l]:[{type:a,props:{...r,name:"Count",direction:"row",align:"center",gap:12,gapPhone:12,share:"content",phoneRow:2,[k("share")]:"content"},slots:{[l]:[d("count",c,R),d("countLabel",T,R)]}},...j(e)?[{type:a,props:{...r,name:"View",maxWidthPhone:266},slots:{[l]:[{type:"Text",props:{...c,text:E(e.viewLabel).text,_partStyles:{text:{...Se()._partStyles.text,...R}}}}]}}]:[]]}}]}}))],reads:{viewLabel:"a Text typed once in the card template: the far end of every card's footer",background:"the Box's theme (the band preset) or its Fill"},drop:{...y,...g,headPlacement:Me}},se={top:60,bottom:60,topPhone:40,bottomPhone:40},Qe={...r,direction:"row",columns:3,gap:40,gapPhone:16},Ze={...r,gap:8,gapPhone:8,...Ne(24),...h(1,1,1,1)},$e={name:"Document Detail Cards",boxProps:e=>({...S,direction:"column",gap:40,gapPhone:16,...h(0,0,1,0),...C(e,se)}),box:[...f,...P(se)],parts:[b("Cards",Qe,je,e=>Y(e).map(t=>O({label:s(t.label),value:s(t.value),body:s(t.desc)})),(e,t)=>({type:a,props:{...Ze,...m("surface")(e,t),name:"Card"},slots:{[l]:[d("label",c,{...p("label",12),lineHeight:1.5},!0),{type:a,props:{...r,name:"Words",gap:14,gapPhone:14},slots:{[l]:[d("value",c,{textStyle:"heading-3",...p("headingSmall",20),weight:500,letterSpacing:-.015,lineHeight:1.5}),d("body",T,{textStyle:"body-5",fontRole:"accent",...p("body",14),italic:!0,lineHeight:1.5})]}}]}}))],drop:{...y,...g}},wt={Cards:ze,KeyFeatures:Ve,Series:Je,DocMetaCards:$e};export{wt as CARDS_SECTION_TO_BOX,Pt as cardsPressStarter};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PartRow, SectionToBoxRow, SlotFill } from "../../../sections/section-to-box.js";
|
|
1
|
+
import type { OwnProps, PartRow, SectionToBoxRow, SlotFill } from "../../../sections/section-to-box.js";
|
|
2
2
|
type Props = Record<string, unknown>;
|
|
3
3
|
export declare const HEAD_ONLY_TYPES: readonly string[];
|
|
4
4
|
export declare const HOST_ROW_HEAD_TYPES: readonly string[];
|
|
@@ -16,6 +16,8 @@ export type HeadOnlyRowExtension = {
|
|
|
16
16
|
bottom: number;
|
|
17
17
|
bottomPhone: number;
|
|
18
18
|
};
|
|
19
|
+
boxProps?: OwnProps;
|
|
20
|
+
skip?: SectionToBoxRow["skip"];
|
|
19
21
|
};
|
|
20
22
|
export declare function headOnlyRow(type: string, ext?: HeadOnlyRowExtension): SectionToBoxRow;
|
|
21
23
|
export declare const FAQ_ROWS_BOX: Props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SPLITTABLE_SECTIONS as
|
|
1
|
+
import{SPLITTABLE_SECTIONS as f}from"../../../../../format/lib/sections/section-head-placement.js";import{SECTION_LABELS as S}from"../../../../../format/lib/document/section-catalog.js";import{SAME_KEYS as O,SECTION_BOX as T,innerPad as u}from"./section-to-box-row-parts.js";import{HEAD_BELOW as b,headLookOf as B,headReads as g,headTree as A}from"./section-head-looks.js";import{finiteNumber as w}from"../../../../../format/lib/finite-number.js";import{CARD_TEMPLATE_SLOT as m}from"../../../../../format/lib/content/card-template.js";import{footprintCardSeed as R}from"../../../../../format/lib/document/blocks/general/Footprint/card-seed.js";import{faqCardSeed as k,faqRunStyleKeys as C}from"../../../../../format/lib/document/blocks/general/FAQ/card-seed.js";import{BOX_SIDE_SPACE_PROP as H}from"../../../../../format/lib/content/box-side-space.js";import{INNER_BOX as L}from"../../../../../format/lib/document/seed-parts.js";import{SECTION_ACCENT_INHERIT as N}from"../../../../../format/lib/content/section-surface.js";const D=["Collections","FAQ","Footprint","GalleryB","LongRead","ProcessSteps","RelatedProducts"],z=["Events","FitmentTable","ProductGrid","SpecTable"],n=(e,o)=>()=>({top:e,topPhone:o}),l=e=>o=>{const t=u(o,e).sectionPaddingTop;return{top:t,topPhone:t}},F={Collections:n(120,70),Events:n(120,70),FAQ:n(120,70),GalleryB:n(120,70),FitmentTable:n(120,80),SpecTable:n(120,80),LongRead:n(120,80),RelatedProducts:n(0,0),Footprint:l("Footprint"),ProcessSteps:l("ProcessSteps"),ProductGrid:e=>({top:w(e.padTop)??120,topPhone:0})};function I(e,o={}){const t=f[e],s=F[e];if(!t||!s)throw new Error(`section-to-box-rows-head: "${e}" has no head row or no head room`);const p=t.padKey,P=A(e),c=g(e),E=t.headRows.filter(r=>![t.num,t.title,t.description,"linkText","linkHref"].includes(r)),d={...Object.fromEntries(E.filter(r=>!(r in c)).map(r=>[r,"a head setting no Header Box part reads (lib/document/blocks/general/section-head-looks `headReads`)"])),...o.drop};return{name:S[e]??e,boxProps:(r,i)=>{const a=s(r),h=o.roomBelow?{sectionPaddingBottom:o.roomBelow.bottom,sectionPaddingBottomPhone:o.roomBelow.bottomPhone}:{},_=typeof o.boxProps=="function"?o.boxProps(r,i):o.boxProps??{};return{...T,direction:"column",gap:b[B(e)],sectionPaddingTop:a.top,sectionPaddingTopPhone:a.topPhone,...h,..._}},box:[...O,...p?[[p,"sectionPaddingTop",(r,i)=>s(i).top]]:[]],parts:[P,...(()=>{const r={...p?{[p]:0}:{},...o.coreProps},i={kind:"core",keep:"rest",...Object.keys(r).length?{props:r}:{},...o.slots?{slots:o.slots}:{}};return[o.coreBox?{kind:"group",name:o.coreBox.name,props:o.coreBox.props,parts:[i]}:i]})(),...o.partsAfter??[]],...Object.keys(c).length?{reads:c}:{},...Object.keys(d).length?{drop:d}:{},...o.pressHeading?{pressKeepsEmpty:[t.title]}:{},...o.skip?{skip:o.skip}:{}}}const y={...L,direction:"accordion",rowStyle:"numbered"},j={Footprint:{slots:{[m]:[R()]},pressHeading:!0},FAQ:{slots:{[m]:[k()]},pressHeading:!0,coreBox:{name:"Questions",props:y},coreProps:{sectionAccent:N},roomBelow:{bottom:120,bottomPhone:70},boxProps:(e,o)=>o.press?{}:{[H]:"site"},skip:e=>{const o=e._partStyles??{},t=C().filter(s=>o[s]!==void 0);return t.length?`held: its rows carry their own run style (_partStyles ${t.map(s=>`"${s}"`).join(", ")}), which the Box path does not draw the same`:void 0}}},J=Object.fromEntries(D.map(e=>[e,I(e,j[e])]));export{y as FAQ_ROWS_BOX,j as HEAD_ONLY_CARD_SEEDS,J as HEAD_ONLY_SECTION_TO_BOX,D as HEAD_ONLY_TYPES,z as HOST_ROW_HEAD_TYPES,I as headOnlyRow};
|
|
@@ -2,3 +2,4 @@ import { type SectionToBoxRow } from "../../../sections/section-to-box.js";
|
|
|
2
2
|
export declare const LOGOS_SECTION_TO_BOX: Readonly<Record<string, SectionToBoxRow>>;
|
|
3
3
|
export declare const logosPressStarter: () => Readonly<Record<string, unknown>>;
|
|
4
4
|
export declare const paymentPressStarter: () => Readonly<Record<string, unknown>>;
|
|
5
|
+
export declare const footerPaymentPressStarter: () => Readonly<Record<string, unknown>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hasWords as
|
|
1
|
+
import{hasWords as s}from"../../../sections/section-to-box.js";import{DIM as x,DROP_COMMON as m,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 w}from"../../../../../format/lib/finite-number.js";import{markBoxProps as R,token as L}from"../../../../../format/lib/document/seed-parts.js";import{LOGOS_PH as A,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 n,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{legacyBlockAlignOf as M}from"../../../../../format/lib/content/block-align.js";import{FOOTER_PAYMENT_SEED as H}from"../../../../../format/lib/content/footer.js";import{SECTION_ACCENT_INHERIT as D}from"../../../../../format/lib/content/section-surface.js";import{FOOTER_MARK_SIZES as F,FOOTER_TEXT_PX as v}from"../../../../../format/lib/document/box-footer.js";import{phoneKey as d,readHidable as K}from"efficient-easel/draw";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:(U,g)=>s(g?.src)||s(g?.[e])}]}]}),c=o=>{const e=w(o.bandPadding)??40;return{top:e,bottom:e,topPhone:e,bottomPhone:e}},X={...O("heading",{color:"labels",letterSpacing:.2}),props:{...a,align:"center"}},z={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:[X,{kind:"core",keep:["columns","logoHeight","grayscale"],rename:{logosPerRow:"columns"},props:l,slots:p("items","alt")}],drop:{...m,...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"}},Y={kind:"group",name:"Mark",keepEmpty:!0,parts:[],props:R(4,"main",{sectionCorners:2})},E={top:24,bottom:24,topPhone:24,bottomPhone:24},G={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,n],props:o=>s(o[t])?{[t]:o[t],...o[n]!==void 0?{[n]:o[n]}:{}}:{}},props:{...l,look:"cards",grayscale:!1},slots:o=>({...p("badges","label"),...s(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=>s(e?.text)),props:{...r,direction:"row",align:"center",gap:8,gapPhone:8,phoneRow:2,[d("share")]:"content"},item:o=>K(o.text).hidden?{props:{_hidden:!0}}:{},parts:[Y,{kind:"text",key:"text",props:{...a,align:"center"},style:{...L("label",13),color:"labels",lineHeight:1.5}}]}]}]}],drop:{...m,...h,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)"}},j={left:"start",center:"center",right:"end"},S=o=>M(o.align)??"left",T=o=>o.size==="md"?"md":"sm",y=12,u={name:"Payment logos",boxProps:o=>({...r,direction:"row",wrap:!0,align:"center",justify:j[S(o)],gap:y,gapPhone:y,phoneRow:2,[d("share")]:"content"}),parts:[{kind:"text",key:"lead",props:x,styleFrom:o=>({size:v[T(o)],lineHeight:1.5})},{kind:"core",keep:[],as:"Logos",derive:{reads:[t,n],props:o=>({logoHeight:F[T(o)].mark,align:S(o),...s(o[t])?{[t]:o[t],...o[n]!==void 0?{[n]:o[n]}:{}}:{}})},props:{...l,look:"marks",grayscale:!1,sectionAccent:D},slots:o=>({...p("methods","label"),...s(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"}},io={Logos:z,PaymentBadges:G,FooterPayment:u,PaymentLogosBlock:u},lo=()=>({heading:A.heading,items:B()}),po=()=>({heading:N.heading,badges:I(),assurances:C()}),co=()=>({...H,methods:[]});export{io as LOGOS_SECTION_TO_BOX,co as footerPaymentPressStarter,lo as logosPressStarter,po as paymentPressStarter};
|