efficient-web-builder 51.0.0 → 53.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +66 -0
- package/dist/editor/components/ChatSettingsPanel.js +1 -1
- package/dist/editor/components/MediaUploadField.d.ts +7 -7
- package/dist/editor/components/MediaUploadField.js +1 -1
- package/dist/editor/components/PartSettingsPanel.js +1 -1
- package/dist/editor/components/PartTextBox.js +1 -1
- package/dist/editor/components/PreviewPartAnchors.js +1 -1
- package/dist/editor/components/PreviewPartStyleContext.d.ts +2 -2
- package/dist/editor/components/SectionTextPartBridge.js +1 -1
- package/dist/editor/components/SiteAccentField.js +1 -1
- package/dist/editor/components/SiteTextStylesField.d.ts +3 -2
- package/dist/editor/components/SiteTextStylesField.js +1 -1
- package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
- package/dist/editor/components/storefront-editor.css +82 -64
- package/dist/editor/lib/animation/entrance-fields.js +1 -1
- package/dist/editor/lib/animation/hover-fields.js +1 -1
- package/dist/editor/lib/document/ColourControl.d.ts +11 -8
- package/dist/editor/lib/document/ColourControl.js +1 -1
- package/dist/editor/lib/document/blocks/general/Breadcrumb/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Cards/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Chart/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Contents/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Divider/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Hero/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroSlide/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ImageBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/IntroBleed/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Logos/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Mockup/fields.js +2 -2
- package/dist/editor/lib/document/blocks/general/PostCard/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/SectionHeader/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Series/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/StatsParagraph/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Timeline/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
- package/dist/editor/lib/document/blocks/shared-fields.d.ts +5 -0
- package/dist/editor/lib/document/blocks/shared-fields.js +1 -1
- package/dist/editor/lib/document/box-fields.d.ts +23 -2
- package/dist/editor/lib/document/box-fields.js +1 -1
- package/dist/editor/lib/document/card-row-fields.js +1 -1
- package/dist/editor/lib/document/choice-pictures.d.ts +21 -0
- package/dist/editor/lib/document/choice-pictures.js +1 -0
- package/dist/editor/lib/document/controls.d.ts +33 -9
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/hidable-rows-drawn.d.ts +1 -0
- package/dist/editor/lib/document/hidable-rows-drawn.js +1 -1
- package/dist/editor/lib/document/overrides.js +1 -1
- package/dist/editor/lib/document/part-panel-rows.d.ts +1 -0
- package/dist/editor/lib/document/part-panel-rows.js +1 -1
- package/dist/editor/lib/document/passes/inspector.js +1 -1
- package/dist/editor/lib/document/separator-field.d.ts +9 -1
- package/dist/editor/lib/document/separator-field.js +1 -1
- package/dist/editor/lib/document/shape-picker.d.ts +37 -0
- package/dist/editor/lib/document/shape-picker.js +1 -0
- package/dist/editor/lib/document/show-for-field.d.ts +6 -0
- package/dist/editor/lib/document/show-for-field.js +1 -0
- package/dist/format/lib/animation/hover.d.ts +0 -2
- package/dist/format/lib/animation/hover.js +1 -1
- package/dist/format/lib/content/borders.d.ts +4 -2
- package/dist/format/lib/content/borders.js +1 -1
- package/dist/format/lib/content/box-layout.d.ts +21 -6
- package/dist/format/lib/content/box-layout.js +1 -1
- package/dist/format/lib/content/box-shape.d.ts +1 -5
- package/dist/format/lib/content/box-shape.js +1 -1
- package/dist/format/lib/content/box-show-for-choices.d.ts +9 -0
- package/dist/format/lib/content/box-show-for-choices.js +1 -0
- package/dist/format/lib/content/button-icon.d.ts +1 -1
- package/dist/format/lib/content/button-icon.js +1 -1
- package/dist/format/lib/content/card-state.d.ts +8 -0
- package/dist/format/lib/content/card-state.js +1 -0
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/gallery-card-layout.d.ts +45 -1
- package/dist/format/lib/content/gallery-card-layout.js +1 -1
- package/dist/format/lib/content/image-aspect.d.ts +47 -0
- package/dist/format/lib/content/image-aspect.js +1 -0
- package/dist/format/lib/content/list-number.d.ts +11 -0
- package/dist/format/lib/content/list-number.js +1 -1
- package/dist/format/lib/content/phone-focus.d.ts +4 -1
- package/dist/format/lib/content/phone-focus.js +1 -1
- package/dist/format/lib/content/record-row.d.ts +14 -0
- package/dist/format/lib/content/record-row.js +1 -0
- package/dist/format/lib/content/record-types.d.ts +1 -1
- package/dist/format/lib/content/record-types.js +1 -1
- package/dist/format/lib/content/section-background.d.ts +10 -3
- package/dist/format/lib/content/section-background.js +1 -1
- package/dist/format/lib/content/section-height.d.ts +8 -0
- package/dist/format/lib/content/section-height.js +1 -1
- package/dist/format/lib/content/section-min-height.d.ts +17 -1
- package/dist/format/lib/content/section-min-height.js +1 -1
- package/dist/format/lib/content/section-sticky.d.ts +9 -0
- package/dist/format/lib/content/section-sticky.js +1 -1
- package/dist/format/lib/document/blocks/general/text-part-shapes.json +2 -2
- package/dist/format/lib/document/card-template-layers.d.ts +1 -1
- package/dist/format/lib/document/card-template-layers.js +1 -1
- package/dist/format/lib/document/media-manifest.json +5 -2
- package/dist/format/lib/document/mockup-variant-fields.d.ts +1 -0
- package/dist/format/lib/document/mockup-variant-fields.js +1 -1
- package/dist/format/lib/document/part-inks.d.ts +5 -10
- package/dist/format/lib/document/part-inks.js +1 -1
- package/dist/format/lib/document/passes/types.d.ts +1 -0
- package/dist/format/lib/document/section-catalog.js +2 -2
- package/dist/format/lib/document/section-descriptions.js +1 -1
- package/dist/format/lib/document/show-when-attach.d.ts +2 -1
- package/dist/format/lib/document/show-when-attach.js +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +25 -14
- package/dist/format/lib/editor-words-catalogue.js +4 -4
- package/dist/format/lib/fonts.js +1 -1
- package/dist/format/lib/sections/divider-style.d.ts +4 -0
- package/dist/format/lib/sections/divider-style.js +1 -1
- package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
- package/dist/format/lib/sections/section-presets.js +1 -1
- package/dist/format/lib/source-rules/editor-words.js +2 -2
- package/dist/format/lib/source-rules/mirrored-rows-agree.js +4 -4
- package/dist/format/lib/source-rules/panel-rows-use-the-shared-row.d.ts +4 -0
- package/dist/format/lib/source-rules/panel-rows-use-the-shared-row.js +37 -20
- package/dist/format/lib/source-rules/shape-rows-use-the-picker.d.ts +7 -0
- package/dist/format/lib/source-rules/shape-rows-use-the-picker.js +2 -0
- package/dist/format/lib/source-rules/support/part-slider-call-sites.d.ts +0 -1
- package/dist/format/lib/source-rules/support/part-slider-call-sites.js +6 -6
- package/dist/format/lib/text-styles/site-text-colours.d.ts +4 -0
- package/dist/format/lib/text-styles/site-text-colours.js +1 -0
- package/dist/format/lib/theme.d.ts +1 -0
- package/dist/format/lib/theme.js +3 -3
- package/dist/format/lib/word-styles.d.ts +0 -1
- package/dist/format/lib/word-styles.js +1 -1
- package/dist/render/components/Breadcrumb.d.ts +2 -1
- package/dist/render/components/Breadcrumb.js +1 -1
- package/dist/render/components/ButtonBlock.d.ts +1 -0
- package/dist/render/components/ButtonBlock.js +1 -1
- package/dist/render/components/CardRowContext.d.ts +6 -3
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/ContentsList.d.ts +4 -1
- package/dist/render/components/ContentsList.js +1 -1
- package/dist/render/components/CurrentRecord.d.ts +23 -0
- package/dist/render/components/CurrentRecord.js +1 -0
- package/dist/render/components/Flex.d.ts +3 -2
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/HeroPictures.d.ts +2 -0
- package/dist/render/components/HeroPictures.js +1 -1
- package/dist/render/components/HeroPoster.d.ts +2 -1
- package/dist/render/components/HeroPoster.js +1 -1
- package/dist/render/components/HeroSection.d.ts +2 -1
- package/dist/render/components/HeroSection.js +1 -1
- package/dist/render/components/HeroSingle.d.ts +3 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/HeroSlide.d.ts +3 -1
- package/dist/render/components/HeroSlide.js +1 -1
- package/dist/render/components/ImageBlock.d.ts +5 -3
- package/dist/render/components/ImageBlock.js +1 -1
- package/dist/render/components/InBoxContext.d.ts +3 -0
- package/dist/render/components/SiteGutterFrame.d.ts +1 -0
- package/dist/render/components/SiteGutterFrame.js +1 -1
- package/dist/render/components/goldPhrases.js +2 -2
- package/dist/render/lib/content/block-size.d.ts +3 -0
- package/dist/render/lib/content/block-size.js +1 -1
- package/dist/render/lib/content/box-shared-columns.js +1 -1
- package/dist/render/lib/content/box-show-for.d.ts +14 -0
- package/dist/render/lib/content/box-show-for.js +1 -0
- package/dist/render/lib/content/page-contents.d.ts +1 -0
- package/dist/render/lib/content/page-contents.js +1 -1
- package/dist/render/lib/content/picture-focus-rows.d.ts +13 -0
- package/dist/render/lib/content/picture-focus-rows.js +1 -0
- package/dist/render/lib/document/blocks/general/Breadcrumb/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Cards/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Contents/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Flex/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/HeroSlide/render.js +1 -1
- package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +2 -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-stats.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.js +2 -2
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/part-styles.d.ts +21 -7
- package/dist/render/lib/document/part-styles.js +2 -2
- package/dist/render/lib/document/passes/block-size.js +1 -1
- package/dist/render/lib/document/passes/borders.js +1 -1
- package/dist/render/lib/document/passes/index.js +1 -1
- package/dist/render/lib/document/passes/section-height.js +1 -1
- package/dist/render/lib/document/passes/section-sticky.js +1 -1
- package/dist/render/lib/document/passes/show-for.d.ts +2 -0
- package/dist/render/lib/document/passes/show-for.js +1 -0
- package/dist/render/lib/document/show-when.d.ts +1 -1
- package/dist/render/lib/document/show-when.js +1 -1
- package/dist/render/lib/text-styles/site-text-styles.js +2 -2
- package/package.json +3 -3
- package/dist/editor/components/PartInkControl.d.ts +0 -7
- package/dist/editor/components/PartInkControl.js +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface PictureFocusRow {
|
|
2
|
+
readonly block: string;
|
|
3
|
+
readonly upload: string;
|
|
4
|
+
readonly focus: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const PICTURE_DOTS: readonly PictureFocusRow[];
|
|
7
|
+
export declare const viewFocusKeys: (focus: string) => readonly [string, string, string];
|
|
8
|
+
export declare const PICTURE_FOCUS_KEYS: readonly string[];
|
|
9
|
+
export declare function viewFocusValues(props: Record<string, unknown>, focus: string): {
|
|
10
|
+
desktop?: string;
|
|
11
|
+
tablet?: string;
|
|
12
|
+
phone?: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{phoneKey as n,tabletKey as m}from"efficient-easel/draw";const s=[{block:"HeroSlide",upload:"mediaImage",focus:"imageFocal"},{block:"HeroSingle",upload:"mediaImage",focus:"imageFocal"},{block:"HeroSingle",upload:"mediaImage2",focus:"imageFocal2"},{block:"ImageBlock",upload:"src",focus:"focal"}],a=e=>[e,m(e),n(e)],d=[...new Set(s.flatMap(e=>a(e.focus)))].sort();function p(e,t){const[c,l,i]=a(t).map(o=>typeof e[o]=="string"&&e[o]?e[o]:void 0);return{desktop:c,tablet:l,phone:i}}export{s as PICTURE_DOTS,d as PICTURE_FOCUS_KEYS,a as viewFocusKeys,p as viewFocusValues};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import n from"../../../../../components/Breadcrumb.js";import{CardRowDrawn as f}from"../../../../../components/CardRowContext.js";import{namedRowField as c}from"../../../../../../format/lib/content/card-template.js";import{phRows as s,phHide as p}from"../../scaffold.js";import{say as i}from"../../../../../../format/lib/editor-words.js";import{BreadcrumbMeta as u,BREADCRUMB_PH as b}from"../../../../../../format/lib/document/blocks/general/Breadcrumb/meta.js";const l=()=>[{label:i("Home"),href:"/"},{label:i("Section"),href:""}],C={...u,render:e=>{const{items:a,meta:d,editor:t}=e,m=r=>o(n,{items:s(a,l(),t),current:typeof r=="string"?r:void 0,meta:p(d,b.meta,t),editing:t?.isEditing});return c(e)?o(f,{type:"Breadcrumb",props:e,children:r=>m(r.currentCrumb)}):m()}};export{C as BreadcrumbRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as m,Fragment as b}from"react/jsx-runtime";import{SECTION_GRID_COLUMN_CLASS as I}from"../../../../../../format/lib/content/section-min-height.js";import T,{cardGridCornerClasses as x}from"../../../../../components/Cards.js";import{CardTemplateRows as H}from"../../../../../components/CardRowContext.js";import{cardKeyOf as F,cardRow as L}from"../../../../../../format/lib/content/card-template.js";import D from"../../../../../components/KeyFeatures.js";import{hidableText as K}from"efficient-easel/draw";import{declaredBlockSource as u,sourceChoices as O,sourcedRows as C}from"../../../../../../format/lib/content/block-sources.js";import{KEY_FEATURES_PH as w,keyFeaturesScaffoldItems as B}from"../../../../../../format/lib/document/blocks/general/KeyFeatures/meta.js";import{parseSectionHeadPlacement as G}from"../../../../../../format/lib/sections/section-head-placement.js";import{parseSectionEyebrowLook as S}from"../../../../../../format/lib/sections/section-eyebrow-look.js";import{phRows as k,phHide as g}from"../../scaffold.js";import{say as h}from"../../../../../../format/lib/editor-words.js";import{SERVED_CARD_FIELDS as f}from"../../../../../../format/lib/document/blocks/general/Cards/card-seed.js";import{CardsMeta as N,CARDS_PH as E}from"../../../../../../format/lib/document/blocks/general/Cards/meta.js";const _=()=>[{title:h("Card title one"),body:h("A short line about this card.")},{title:h("Card title two"),body:h("A short line about this card.")},{title:h("Card title three"),body:h("A short line about this card.")}],R=()=>_().map(e=>({[f.title]:e.title??"",[f.body]:e.body??""}));function P(e){return u(e)?C(e,e.editor?.isEditing===!0,R()).rows.filter(i=>i[f.title]||i[f.body]).map(i=>({title:i[f.title]??"",body:i[f.body]??""})):null}const j=e=>typeof e.highlightedCard=="string"?e.highlightedCard.trim():"",A=e=>Object.entries(e).some(([i,o])=>i!=="key"&&i!=="badge"&&typeof o=="string"&&o.trim()!=="");function v(e){const i=e.editor?.isEditing===!0,o=u(e),d=j(e),n=typeof e.highlightBadge=="string"?e.highlightBadge:"",s=(t,r=[])=>t.map((a,c)=>({...a,key:a.key||r[c]?.key||F(a,c)})),l=t=>{const r=d?t.findIndex(a=>a.key===d):-1;return{rows:t.map((a,c)=>({...a,badge:c===r?n:""})),states:t.map((a,c)=>c===r?$:M)}};if(o){const t=C(e,i,R());return l(s(t.rows,t.sample?O(o):[]).filter(A))}const y=k(e.items,_(),e.editor).map(L);return l(s(y).filter(t=>i||A(t)))}const $={highlighted:!0},M={};function U(e,i,o){const d=o?`relative grid ${I} bg-bg`:"relative bg-bg";return m("div",{className:i?`${d} ${i}`:d,children:e})}const de={...N,render:e=>{const i=G(e.headPlacement)==="own-box",o=t=>i?void 0:t,d=(e.template?.blockCount??0)>0,n=P(e);if((!d||e.cardStyle==="label-only")&&n&&!n.length)return m(b,{});if(e.cardStyle==="label-only"){const t=n?n.map(r=>({label:r.title??"",href:void 0})):Array.isArray(e.items)?e.items.map(r=>({label:K(r.title)??"",href:typeof r.href=="string"?r.href:void 0})):[];return m(D,{look:S(e.eyebrowLook,"KeyFeatures"),eyebrow:o(g(e.eyebrow,w.eyebrow,e.editor)),title:o(g(e.title,w.title,e.editor)),items:n?t:k(t,B(),e.editor),columns:e.columns,editing:e.editor?.isEditing})}const s=t=>m(T,{look:S(e.eyebrowLook,"Cards"),eyebrow:o(g(e.eyebrow,E.eyebrow,e.editor)),title:o(g(e.title,E.title,e.editor)),omitHead:i,editing:e.editor?.isEditing,cards:t}),{rows:l,states:y}=d?v(e):{rows:[],states:[]};return d&&n&&!l.length?m(b,{}):m(H,{ownerId:String(e.id??""),ownerType:"Cards",Template:e.template,rows:l,states:y,fallback:s(),wrapCopy:(t,r)=>U(t,x(r.index,l.length,e.columns),r.state?.highlighted===!0),children:t=>l.length?s(t):s()})}};export{de as CardsRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as
|
|
1
|
+
import{Fragment as c,jsx as r}from"react/jsx-runtime";import l,{CONTENTS_STICKY_TOP as f}from"../../../../../components/ContentsList.js";import{ContentsEntriesDrawn as C}from"../../../../../components/PageContentsContext.js";import{readHidable as T}from"efficient-easel/draw";import{blockPhoneHideClass as _}from"../../../../content/block-size.js";import{readListNumberForm as h}from"../../../../../../format/lib/content/list-number.js";import{CONTENTS_ENTRIES_PROP as E,CONTENTS_NUMBER_FORM_KEY as N}from"../../../../content/page-contents.js";import{say as a}from"../../../../../../format/lib/editor-words.js";import{ContentsMeta as S}from"../../../../../../format/lib/document/blocks/general/Contents/meta.js";const g=()=>[{label:a("First section"),anchor:"first-section"},{label:a("Second section"),anchor:"second-section"}],P={...S,render:t=>{const e=t,i=T(t.title),n=!!t.editor?.isEditing,o=m=>{const d=m?.length?m:n?g():[];return!d.length&&!n?r(c,{}):r(l,{title:i.hidden?void 0:i.text,entries:d,stickyTop:f,sticky:t.sticky!==!1,editing:n,partStyles:e._partStyles,numberForm:h(e[N]),hideClass:_(e)})},s=e[E];return s?o(s):r(C,{id:t.id,children:o})}};export{P as ContentsRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as l}from"react/jsx-runtime";import{phoneKey as a,tabletKey as o}from"efficient-easel/draw";import{sharedColumnsDrawn as r}from"../../../../content/box-shared-columns.js";import{CountRowsContext as c,NO_COUNTS as d}from"../../../../../components/CountRowsContext.js";import m from"../../../../../components/Flex.js";import{loopDelayOf as h,loopSecondsOf as g,parseLoop as b,parseLoopDirection as u}from"../../../../../../format/lib/animation/index.js";import{COUNTS_SOURCE as f,declaredBlockSource as S,servedRows as x}from"../../../../../../format/lib/content/block-sources.js";import{padValuesOf as w}from"../../../../content/section-padding.js";import{sectionFillsHeight as y}from"../../../../../../format/lib/content/section-min-height.js";import{pictureHoverOf as C}from"../../../../../../format/lib/animation/hover.js";import{FlexMeta as D}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";const N={...D,render:e=>{const t=l(m,{direction:e.direction,label:e.label,tabShape:e.tabShape,gap:e.gap,gapPhone:e[a("gap")],gapTablet:e[o("gap")],justify:e.justify,align:e.align,wrap:e.wrap,share:e.share,sharePhone:e[a("share")],shareTablet:e[o("share")],wrapPhone:e[a("wrap")],phoneRow:e.phoneRow,columns:e.columns,columnsTablet:e[o("columns")],separator:e.separator,blockSpacing:e.blockSpacing,bgImage:e.bgImage,bgImagePhone:e.bgImagePhone,pictureHover:C(e),darken:e.darken,darkenStyle:e.darkenStyle,placement:e.placement,padV2:e.padV2===!0,border:e.sectionBorder,borderTablet:e.sectionBorderTablet,borderPhone:e.sectionBorderPhone,pad:w(e),contained:e.contained,fillHeight:y(e),shadow:e.shadow,loop:b(e.loop),scrollDirection:u(e.scrollDirection),loopSeconds:g({loopDuration:e.loopDuration}),loopDelay:h({loopDelay:e.loopDelay}),editing:!!e.editor?.isEditing,fillColor:e.fillColor,line:e.line,upcoming:e.upcoming,link:e.link,boxShape:e.boxShape,boxShapePhone:e[a("boxShape")],boxShapeTablet:e[o("boxShape")],jumpHighlight:e.jumpHighlight,anchor:e.anchor,sharedSides:r(e),boxId:typeof e.id=="string"?e.id:void 0,mirrorCards:e.mirrorCards,content:e.content}),n=S(e),i=n?n===f?x(e):d:null;return l(c.Provider,{value:i,children:t})}};export{N as FlexRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as M}from"react/jsx-runtime";import P from"../../../../../components/HeroSection.js";import{HeroMeta as T}from"../../../../../../format/lib/document/blocks/general/Hero/meta.js";const I={...T,render:({slides:e,strip:r,alignment:t,textureOpacity:o,showTexture:i,textureColor:a,phoneUpDown:s,phoneSideways:p,autoplay:n,autoplayInterval:h,showTicker:c,tickerItems:l,heightDesktop:m,heightTablet:w,heightMobile:d,showPicker:g,pickerShape:k,pickerPlacement:x,showArrows:u,arrowsShape:y,arrowsPlacement:S,_partMotion:f,editor:H})=>M(P,{slides:e,strip:r,alignment:t,textureOpacity:o,showTexture:i,textureColor:a,phoneUpDown:s,phoneSideways:p,autoplay:n,autoplayInterval:h,showTicker:c,tickerItems:l,heightDesktop:m,heightTablet:w,heightMobile:d,showPicker:g,pickerShape:k,pickerPlacement:x,showArrows:u,arrowsShape:y,arrowsPlacement:S,editing:H?.isEditing,partMotion:f})};export{I as HeroRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as M}from"react/jsx-runtime";import
|
|
1
|
+
import{jsx as M}from"react/jsx-runtime";import L from"../../../../../components/HeroSingle.js";import{HeroSingleMeta as O}from"../../../../../../format/lib/document/blocks/general/HeroSingle/meta.js";import{viewFocusValues as a}from"../../../../content/picture-focus-rows.js";const w={...O,render:o=>{const{mediaType:e,mediaImage:n,mediaVideo:r,poster:d,tintColor:m,tintOpacity:l,overlay:s,overlayColor:c,overlayPosition:y,heightDesktop:g,heightMobile:u,boxes:b,videoSource:p,youtubeUrl:h,videoPlayback:P,mediaLayout:v,mediaLayoutPhone:f,mediaImage2:j,tintColor2:k,tintOpacity2:C,_partMotion:S,editor:x}=o,i=a(o,"imageFocal"),t=a(o,"imageFocal2");return M(L,{mediaType:e,videoSource:p,youtubeUrl:h,videoPlayback:P,mediaLayout:v,mediaLayoutPhone:f,mediaImage2:j||void 0,objectPosition2:t.desktop,objectPosition2Phone:t.phone,objectPosition2Tablet:t.tablet,tintColor2:k,tintOpacity2:C,mediaSrc:(e==="image"?n:r)||void 0,poster:d||void 0,objectPosition:e==="image"?i.desktop:void 0,objectPositionPhone:e==="image"?i.phone:void 0,objectPositionTablet:e==="image"?i.tablet:void 0,tintColor:m,tintOpacity:e==="image"?l:0,overlay:s,overlayColor:c,overlayPosition:y,heightDesktop:g,heightMobile:u,boxes:b,editing:x?.isEditing,partMotion:S})}};export{w as HeroSingleRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as A}from"react/jsx-runtime";import I from"../../../../../components/HeroSlide.js";import{nestedAccentValue as M,sectionThemeWrap as O}from"../../../../../../format/lib/content/section-surface.js";import{phHide as V}from"../../scaffold.js";import{HeroSlideMeta as N}from"../../../../../../format/lib/document/blocks/general/HeroSlide/meta.js";import{loadingStill as U}from"../../../../../../format/lib/hero-video.js";import{viewFocusValues as c}from"../../../../content/picture-focus-rows.js";const D={...N,render:o=>{const{name:l,process:p,mediaType:e,mediaVideo:u,mediaImage:y,poster:f,loadingShows:g,videoFrame:b,mediaSrc:P,videoSpeed:n,tintColor:v,overlay:h,groups:S,editor:a,overlayColor:d,overlayPosition:r,mediaLayout:j,mediaLayoutPhone:C,mediaImage2:L,tintColor2:T,tintOpacity2:k,videoSource:F,youtubeUrl:H,videoPlayback:w,_partMotion:x,...m}=o,i=c(o,"imageFocal"),t=c(o,"imageFocal2"),s=O({...m,sectionAccent:M(m.sectionAccent)});return A(I,{themeClassName:s?.className,themeStyle:s?.style,name:l||void 0,process:V(p,"Label",a),mediaType:e,mediaSrc:(e==="image"?y:u||P)||void 0,videoSpeed:typeof n=="number"?n:void 0,poster:U({loadingShows:g,poster:f,videoFrame:b}),objectPosition:e==="image"?i.desktop:void 0,objectPositionPhone:e==="image"?i.phone:void 0,objectPositionTablet:e==="image"?i.tablet:void 0,tintColor:v,tintOpacity:e==="image"?h:0,groups:S,editing:a?.isEditing,overlayColor:typeof d=="string"?d:void 0,overlayPosition:typeof r=="string"?r:void 0,mediaLayout:j,mediaLayoutPhone:C,mediaImage2:L||void 0,objectPosition2:t.desktop,objectPosition2Phone:t.phone,objectPosition2Tablet:t.tablet,tintColor2:T,tintOpacity2:k,videoSource:F,youtubeUrl:H,videoPlayback:w,partMotion:x})}};export{D as HeroSlideRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as l}from"react/jsx-runtime";import{phoneKey as p}from"efficient-easel/draw";import{CardRowDrawn as h}from"../../../../../components/CardRowContext.js";import w from"../../../../../components/ImageBlock.js";import{recordPictureAlt as S}from"../../../../../../format/lib/content/record-row.js";import{cardTemplateField as x,namedRowField as B,rowFieldText as I,rowNextPicture as b}from"../../../../../../format/lib/content/card-template.js";import{blockSizeOf as F,blockSizeValuesOf as O}from"../../../../content/block-size.js";import{padValuesOf as P}from"../../../../content/section-padding.js";import{pictureHoverOf as T}from"../../../../../../format/lib/animation/hover.js";import{viewFocusValues as v}from"../../../../content/picture-focus-rows.js";import{ImageBlockMeta as z}from"../../../../../../format/lib/document/blocks/general/ImageBlock/meta.js";const _={...z,render:e=>{const t=B(e);return t?l(h,{type:"ImageBlock",props:e,children:(o,r,a)=>{const c=r?x(r.ownerType,t):null,i=r?c?.alt:S(t);return m(e,o.src,(i&&I(a,i))??e.alt,b(r?.item,c?.next,typeof o.src=="string"?o.src:""))}}):m(e,e.src,e.alt)}};function m(e,t,o,r=""){const{aspect:a,contained:c,grayscale:i,darken:f,darkenStyle:d,href:s,fit:u,corners:k,cornerSides:g,editor:y}=e,n=v(e,"focal");return l(w,{src:t,alt:o,aspect:a,aspectPhone:e[p("aspect")],contained:c,grayscale:i,darken:f,darkenStyle:d,pictureHover:T(e,"ImageBlock"),...r?{nextSrc:r}:{},href:s,fit:u,focal:n.desktop,focalPhone:n.phone,focalTablet:n.tablet,corners:k,cornerSides:g,pad:P(e),ownSize:F(O(e))!==null,editing:y?.isEditing===!0})}export{_ as ImageBlockRender};
|
|
@@ -31,6 +31,8 @@ export declare const leadLine: (lead: string, rest: string, run: Props, own?: Pr
|
|
|
31
31
|
export declare const bandPage: (stored: unknown, ctx: ConvertContext) => number;
|
|
32
32
|
export declare const sectionPage: (p: Props, ctx: ConvertContext) => import("../../../../../format/lib/theme.js").ThemeColors | undefined;
|
|
33
33
|
export declare const fillFrom: (colour: "surface" | "background") => (p: Props, ctx: ConvertContext) => Props;
|
|
34
|
+
export declare const ownFill: (painted: string | undefined, p: Props, ctx: ConvertContext) => Props;
|
|
35
|
+
export declare const fillNoBoxHolds: (painted: string | undefined) => string | undefined;
|
|
34
36
|
export declare const lineBorder: (p: Props, ctx: ConvertContext) => Props;
|
|
35
37
|
export declare const bandIndex: (p: Props, ctx: ConvertContext) => number;
|
|
36
38
|
export declare const bandAccent: (stored: unknown, p: Props, ctx: ConvertContext) => unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{phoneKey as
|
|
1
|
+
import{phoneKey as B}from"efficient-easel/draw";import{BOX as _,INNER_BOX as E,TEXT as P}from"../../../../../format/lib/document/seed-parts.js";import{ENTRANCE_KEYS as S}from"../../../animation/entrance.js";import{CARD_HOVER_KEYS as a}from"../../../../../format/lib/animation/hover.js";import{COUNT_KEY_PROP as O}from"../../../../../format/lib/content/block-sources.js";import{normalizeSiteGutter as N}from"../../../../../format/lib/content/page-width.js";import{resolveSectionPadding as R}from"../../../content/section-padding.js";import{ButtonBlockMeta as A}from"../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";import{SECTION_PAD_INNER_DEFAULTS as C}from"../../passes/section-padding.js";import{finiteNumber as r}from"../../../../../format/lib/finite-number.js";import{convertTheme as p,hasWords as I}from"../../../sections/section-to-box.js";import{THEME_SECTION_BG as H}from"../../../../../format/lib/content/section-background.js";import{parseHexColor as y}from"efficient-shell/format";import{bandPresetIndex as D,surfaceTwoTone as k}from"../../../../../format/lib/theme.js";import{BOX as Nt,DIM as Rt,INNER_BOX as At,TEXT as Ct}from"../../../../../format/lib/document/seed-parts.js";const w={...P,[O]:""},{label:et,href:nt,...W}=A.defaultProps,it=W,st={buttonFillOpacity:0,buttonBorder:{width:0},buttonPaddingTop:0,buttonPaddingRight:0,buttonPaddingBottom:0,buttonPaddingLeft:0},rt={..._,sectionAccent:0},dt=["gridSpan","sectionHeightMode","sectionHeightValue","sectionHeightUnit","sectionHeightModeTablet","sectionHeightValueTablet","sectionHeightUnitTablet","sectionHeightModePhone","sectionHeightValuePhone","sectionHeightUnitPhone","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderTablet","sectionBorderPhone","sectionAccent","stickTop","stickTopDistance","stickTopTablet","stickTopDistanceTablet","stickTopPhone","stickTopDistancePhone","anchor","sectionAnimation","_hidden",...Object.values(S).flatMap(t=>[t,B(t)]),"widthFit","widthFitTablet","widthFitPhone","width","widthTablet","widthPhone","minWidth","minWidthTablet","minWidthPhone","maxWidth","maxWidthTablet","maxWidthPhone"],d="a section width key, ignored since efficient-web-builder 45 (every section, and a section's root Box, follows Site styles only; Lewis 2026-10-29), so dropping it changes nothing",ct={sectionSurface:"read by nothing in src/ (searched 2026-10-24): a retired theme key that draws nothing today, so dropping it changes nothing",widthMode:d,fullWidth:d,pageWidth:d,backgroundWidth:d,contentWidth:d,contentMax:d},at=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 v(t,o){const e=r(t.sectionPaddingTop)??0,n=r(t.sectionPaddingBottom)??0,i=r(t.sectionPaddingTopTablet),s=r(t.sectionPaddingBottomTablet);return{sectionPaddingTop:e+o.top,sectionPaddingBottom:n+o.bottom,...i===void 0?{}:{sectionPaddingTopTablet:i+o.top},...s===void 0?{}:{sectionPaddingBottomTablet:s+o.bottom},sectionPaddingTopPhone:(r(t.sectionPaddingTopPhone)??i??e)+o.topPhone,sectionPaddingBottomPhone:(r(t.sectionPaddingBottomPhone)??s??n)+o.bottomPhone}}const pt=t=>["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopTablet","sectionPaddingBottomTablet","sectionPaddingTopPhone","sectionPaddingBottomPhone"].map(o=>[o,o,(e,n)=>v(n,typeof t=="function"?t(n):t)[o]]);function c(t,o){const e=R(t,C[o]);return{sectionPaddingTop:e.top,sectionPaddingBottom:e.bottom}}const lt=t=>[["padTop","sectionPaddingTop",(o,e)=>c(e,t).sectionPaddingTop],["padBottom","sectionPaddingBottom",(o,e)=>c(e,t).sectionPaddingBottom],["sectionPaddingTop","sectionPaddingTop",(o,e)=>c(e,t).sectionPaddingTop],["sectionPaddingBottom","sectionPaddingBottom",(o,e)=>c(e,t).sectionPaddingBottom]],M={kind:"heading-case-upper",styles:["heading-1","heading-2","heading-3"]},gt=t=>o=>I(o.props[t])?[M]:[],ht=(t,o)=>({kind:"text",key:t,role:"eyebrow",props:P,...o?{style:o}:{}}),m=t=>t.background!=="transparent",L=(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},T={align:"right",alignPhone:"left"},U=(t,o,e)=>{const n=i=>L(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}},Pt=(t,o,e,n={})=>U(t,o,{...w,...T,...n,_partStyles:{text:{textStyle:"body-5",color:"labels",...e,case:"upper",...T}}}),l=(t,o)=>typeof t=="number"&&Number.isInteger(t)&&t>=0?t:p(o)?.selected??0,u="var(--site-surface)",b="var(--site-surface-2)",g=(t,o)=>p(o)?.themes[l(t.sectionAccent??0,o)],f=t=>(o,e)=>{const n=g(o,e)?.[t];return n?{fillColor:n}:{}},x=t=>t.startsWith("#")&&y(t)!==null,mt=(t,o,e)=>{const n=t?.trim();if(n&&x(n))return{fillColor:n};if(n===u)return f("surface")(o,e);const i=n===b?g(o,e):void 0;return i?{fillColor:k(i)}:{}},Tt=t=>{const o=t?.trim();return!o||o==="transparent"||o===H||o===u||o===b||x(o)?void 0:"it paints a colour that no Box Fill can hold"},ut=(t,o)=>{const e=g(t,o)?.line;return e?{buttonBorder:{width:1,color:e}}:{}},h=(t,o)=>{const e=p(o)?.themes;return e&&m(t)?D(e,l(t.sectionAccent,o)):-1},bt=(t,o,e)=>{const n=h(o,e);return n>=0?n:t},ft=(t,o)=>{const e=h(t,o);return e>=0?{sectionAccent:e}:{}},xt=(t,o)=>m(t.props)&&h(t.props,o)<0?[{kind:"band-preset",page:l(t.props.sectionAccent,o)}]:[],Bt=t=>N(t.site?.siteGutter),F=Object.fromEntries(["Top","Right","Bottom","Left","TopPhone","RightPhone","BottomPhone","LeftPhone"].map(t=>[`sectionPadding${t}`,0])),_t=t=>({top:0,right:0,bottom:0,left:0,...t}),Et=(t,o,e,n=[])=>({kind:"group",name:t,keepEmpty:!0,props:(i,s)=>({...E,...F,...f("surface")(i,s),...typeof e=="function"?e(i,s):e}),box:[[o,"bgImage"],a.kind,a.duration,a.delay],parts:n});export{Nt as BOX,it as BUTTON,Rt as DIM,ct as DROP_COMMON,at as DROP_SIDE_PADDING,M as HEADING_CASE_UPPER,At as INNER_BOX,F as NO_PAD,w as NUMBER_TEXT,T as RIGHT_WORDS,dt as SAME_KEYS,rt as SECTION_BOX,st as SH_LINK,Ct as TEXT,bt as bandAccent,h as bandIndex,l as bandPage,ft as bandProps,xt as bandWrites,f as fillFrom,Tt as fillNoBoxHolds,gt as headingCaseOf,c as innerPad,lt as innerPadKeys,Pt as leadLine,U as leadText,ut as lineBorder,_t as lineSides,L as numberAndUnit,mt as ownFill,Et as pictureCell,g as sectionPage,Bt as siteGutterOf,ht as smallText,v as wrapperPad,pt as wrapperPadKeys};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{phoneKey as
|
|
1
|
+
import{phoneKey as W,readHidable as f}from"efficient-easel/draw";import{cardColumns as M}from"../../../../components/Cards.js";import{resolveSectionBackground as X,THEME_SECTION_BG as j}from"../../../../../format/lib/content/section-background.js";import{CardsMeta as G}from"../../../../../format/lib/document/blocks/general/Cards/meta.js";import{KeyFeaturesMeta as J}from"../../../../../format/lib/document/blocks/general/KeyFeatures/meta.js";import{finiteNumber as x}from"../../../../../format/lib/finite-number.js";import{nonEmptyString as q}from"../../../../../format/lib/non-empty-string.js";import{parseSectionHeadPlacement as U}from"../../../../../format/lib/sections/section-head-placement.js";import{hasWords as V}from"../../../sections/section-to-box.js";import{BOX_TYPE as d,CONTAINER_BLOCKS_SLOT as l}from"../../../../../format/lib/document/container-blocks.js";import{labelTextSeed as Y}from"../../../../../format/lib/document/text-seeds.js";import{CARDS_BODY_LOOK as z,CARDS_CARD as Q,CARDS_TITLE_LOOK as Z,rowFieldTextSeed as a}from"../../../../../format/lib/document/blocks/general/Cards/card-seed.js";import{bandAccent as $,bandProps as ee,bandWrites as oe,BUTTON as te,DIM as p,DROP_COMMON as c,DROP_SIDE_PADDING as h,INNER_BOX as t,SAME_KEYS as m,SECTION_BOX as g,fillFrom as w,fillNoBoxHolds as ne,ownFill as se,SH_LINK as ae,TEXT as n,smallText as re,wrapperPad as y,wrapperPadKeys as b}from"./section-to-box-row-parts.js";import{headTree as k,token as r}from"./section-head-looks.js";import{boxPadding as ie}from"../../../../../format/lib/document/seed-parts.js";import{SECTION_BG_BUILT_IN as de}from"../../../../../format/lib/document/blocks/general/section-bg-built-in.js";const i=(e,o,u,K)=>({sectionBorder:{top:e,right:o,bottom:u,left:K}}),O=e=>o=>M(x(o.columns)??x(e.columns)),_=e=>({kind:"group",name:"Grid",props:{...t,gap:0,...i(1,0,0,1)},parts:[e]}),C={...t,direction:"row",gap:0,share:"equal"},R="its head sits in a Box of its own above it (own-box): the row draws the head inline",T=e=>U(e.headPlacement)==="own-box",E="inline is the head the row draws; an own-box node is skipped (`skip`)",le=e=>({kind:"group",name:"Heading",props:e,parts:[re("eyebrow"),{kind:"text",key:"title",role:"heading",props:n,style:{textStyle:"heading-3",case:"upper"},was:{size:44}}]}),B={top:72,bottom:72,topPhone:72,bottomPhone:72},pe={...Q,...i(0,1,1,0)},ce={name:"Cards",boxProps:(e,o)=>({...g,direction:"column",gap:36,gapPhone:28,...w("surface")(e,o),...y(e,B)}),box:[...m,...b(B)],skip:e=>T(e)?R:typeof e.dataSource=="string"&&e.dataSource?"its cards come from a source: they are drawn from the card template on Cards":e.template!==void 0?"its cards are drawn from its own card template (an emptied one draws none): the shape the other rows land on":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:[k("Cards"),_({kind:"list",key:"items",name:"Card",perRow:O(G.defaultProps),rowName:"Row",rowProps:C,props:(e,o)=>({...pe,...w("background")(e,o)}),parts:[{kind:"text",key:"title",props:n,style:Z},{kind:"text",key:"body",props:p,style:z}]})],drop:{...c,...h,columns:"the rows of N: one Row Box per `columns` cards, which the Box draws as N equal blocks",cardStyle:"the standard card is what the row draws; a Label only node is skipped (0 live nodes)",dataSource:"an empty source is typed cards, what the row draws; a sourced node is skipped (0 live nodes)",dataSourceOptions:"read only with a source; a sourced node is skipped (0 live nodes)",template:"an empty card template is typed cards, what the row draws; a node with a template is skipped",highlightedCard:"read only with a card template; a node with a template is skipped",highlightBadge:"read only with a card template; a node with a template is skipped",headPlacement:E,eyebrowLook:"needs the eyebrow's Filled look on a Text block: Plain is the eyebrow start look the row draws; 2 of 62 live nodes store it (JJ's export, 2026-10-24)"}},N={top:76,bottom:76,topPhone:76,bottomPhone:76},he={...t,direction:"row",align:"center",gap:16,sectionPaddingTop:32,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,...i(0,1,1,0)},L={textStyle:"body-1",color:"text"},A=(e,o)=>typeof o?.href=="string"&&o.href.trim()!=="",me={name:"Key Features",boxProps:e=>({...g,direction:"column",gap:44,...i(1,0,1,0),...y(e,N)}),box:[...m,...b(N)],parts:[le({...t,direction:"row",align:"end",gap:20,wrap:!0,share:"content"}),_({kind:"list",key:"items",name:"Feature",perRow:O(J.defaultProps),rowName:"Row",rowProps:C,props:he,parts:[{kind:"button",key:"label",href:"href",when:A,variant:"ghost",props:{...te,...ae,icon:"none"},style:L},{kind:"text",key:"label",when:(e,o)=>!A(e,o),props:n,style:L,was:{size:17}}]})],drop:{...c,...h,columns:"the rows of N: one Row Box per `columns` cells, which the Box draws as N equal blocks",eyebrowLook:"needs the eyebrow's Filled look on a Text block: Filled is Key Features' own default (lib/sections/section-eyebrow-look), so 20 of 21 published nodes draw it with nothing stored; the row draws the Plain start look (JJ's export, 2026-10-24)"}},D={top:120,bottom:120,topPhone:80,bottomPhone:80},P=e=>{const o=X(typeof e.background=="string"?e.background:void 0,de.Series);return o&&o!=="transparent"?o:void 0},S=e=>P(e)===j,ge={...t,justify:"between",gap:16,gapPhone:16,sectionHeightMode:"fixed",sectionHeightValue:340,sectionHeightUnit:"px",sectionPaddingTop:36,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,sectionPaddingTopPhone:36,sectionPaddingRightPhone:28,sectionPaddingBottomPhone:32,sectionPaddingLeftPhone:28},F={...t,direction:"row",justify:"between",gap:12,share:"content",phoneRow:2,[W("share")]:"content"},I={textStyle:"body-5",...r("label",12),letterSpacing:.22,case:"upper",lineHeight:1.5},we=e=>V(e.viewLabel)&&!f(e.viewLabel).hidden,s=e=>f(e).text?.trim?.()??"",v=e=>Object.fromEntries(Object.entries(e).filter(([,o])=>q(o)!==void 0)),ye={name:"Recurring Columns",boxProps:(e,o)=>({...g,direction:"column",gap:60,gapPhone:60,...i(0,0,1,0),...S(e)?ee(e,o):{},...se(P(e),e,o),...y(e,D)}),box:[...m.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,o,u)=>S(o)?$(e,o,u):e],...b(D)],skip:e=>ne(P(e))??(T(e)?R:void 0),site:(e,o)=>S(e.props)?oe(e,o):[],parts:[k("Series"),{kind:"core",as:"Cards",keep:[],props:{columns:4},derive:{reads:["cards"],props:e=>({items:(Array.isArray(e.cards)?e.cards:[]).map(o=>v({num:s(o.num),since:s(o.since),title:s(o.title),body:s(o.desc),count:[s(o.entries),s(o.entriesLabel)].filter(Boolean).join(" ")}))})},slots:(e,o)=>({template:[{type:d,props:{...ge,...w("background")(e,o),name:"Card"},slots:{[l]:[{type:d,props:{...t,name:"Words",gap:16,gapPhone:16},slots:{[l]:[{type:d,props:{...F,name:"Top"},slots:{[l]:[a("num",n,r("label",13),!0),a("since",n,r("label",13),!0)]}},a("title",{...n,tag:"h3"},{textStyle:"heading-3",...r("headingSmall",28),weight:500,case:"upper",lineHeight:1.04,letterSpacing:-.02}),a("body",p,{textStyle:"body-5",fontRole:"heading",...r("body",14),lineHeight:1.6})]}},{type:d,props:{...F,name:"Footer",align:"center",gap:0,gapPhone:0,sectionPaddingTop:16,sectionPaddingTopPhone:16,...i(1,0,0,0)},slots:{[l]:[a("count",p,I),...we(e)?[{type:d,props:{...t,name:"View",maxWidthPhone:266},slots:{[l]:[{type:"Text",props:{...n,text:f(e.viewLabel).text,_partStyles:{text:{...Y()._partStyles.text,...I}}}}]}}]:[]]}}]}}]})}],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:{...c,...h,headPlacement:E}},H={top:60,bottom:60,topPhone:40,bottomPhone:40},be={...t,gap:8,gapPhone:8,...ie(24),...i(1,1,1,1)},ue={name:"Document Detail Cards",boxProps:e=>({...g,direction:"column",gap:40,gapPhone:16,...i(0,0,1,0),...y(e,H)}),box:[...m,...b(H)],parts:[{kind:"core",as:"Cards",keep:[],props:{columns:3},derive:{reads:["cards"],props:e=>({items:(Array.isArray(e.cards)?e.cards:[]).map(o=>v({label:s(o.label),value:s(o.value),body:s(o.desc)}))})},slots:(e,o)=>({template:[{type:d,props:{...be,...w("surface")(e,o),name:"Card"},slots:{[l]:[a("label",n,{...r("label",12),lineHeight:1.5},!0),{type:d,props:{...t,name:"Words",gap:14,gapPhone:14},slots:{[l]:[a("value",n,{textStyle:"heading-3",...r("headingSmall",20),weight:500,letterSpacing:-.015,lineHeight:1.5}),a("body",p,{textStyle:"body-5",fontRole:"accent",...r("body",14),italic:!0,lineHeight:1.5})]}}]}}]})}],drop:{...c,...h}},Fe={Cards:ce,KeyFeatures:me,Series:ye,DocMetaCards:ue};export{Fe as CARDS_SECTION_TO_BOX};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{phoneKey as
|
|
1
|
+
import{phoneKey as h}from"efficient-easel/draw";import{COUNT_KEY_PROP as g}from"../../../../../format/lib/content/block-sources.js";import{resolveSectionBackground as u,THEME_SECTION_BG as T}from"../../../../../format/lib/content/section-background.js";import{finiteNumber as B}from"../../../../../format/lib/finite-number.js";import{hasWords as s}from"../../../sections/section-to-box.js";import{DROP_COMMON as m,DROP_SIDE_PADDING as f,INNER_BOX as o,NUMBER_TEXT as w,SAME_KEYS as S,SECTION_BOX as b,TEXT as y,bandAccent as O,bandProps as A,bandWrites as E,fillFrom as N,innerPad as R,innerPadKeys as H,smallText as i,wrapperPad as I,wrapperPadKeys as v}from"./section-to-box-row-parts.js";import{fluidToken as M,headTree as F,token as n}from"./section-head-looks.js";import{SECTION_BG_BUILT_IN as P}from"../../../../../format/lib/document/blocks/general/section-bg-built-in.js";const p=e=>typeof e=="string"?e.trim():"";function k(e){const t=`${p(e.prefix)}${p(e.value)}`,a=p(e.suffix);return e.emphasizeAll===!0?t?`==_${t}_==`:"":`${t}${a?`==_${a}_==`:""}`}const d={kind:"block",type:"Text",props:{...w,_partStyles:{text:{textStyle:"heading-2",...M("headingMedium",56,7,96),weight:500,case:"none",lineHeight:.9,letterSpacing:-.04}}},box:[["value","text",(e,t)=>k(t)]],when:(e,t)=>t!==void 0&&typeof t.value=="string"&&k(t)!==""},x=e=>s(e?.supSuffix),c=e=>u(e.background,P.StatsParagraph),r=e=>c(e)===T,l=e=>({...e,sectionAccent:e.sectionAccent??0}),C=(e,t)=>r(e)?N("background")(e,t):{},D={name:"Stats with Text",skip:e=>c(e)&&c(e)!=="transparent"&&!r(e)?"it paints a colour of its own, not the section band":void 0,boxProps:(e,t)=>({...b,direction:"column",gap:60,gapPhone:60,sectionBorder:{bottom:1},...R(e,"StatsParagraph"),...r(e)?A(l(e),t):{}}),box:[...S.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,t,a)=>r(t)?O(e,l(t),a):e],...H("StatsParagraph")],site:(e,t)=>r(e.props)?E({props:l(e.props)},t):[],parts:[F("StatsParagraph"),{kind:"group",name:"Stats",props:{...o,gap:0},parts:[{kind:"list",key:"stats",name:"Stat",perRow:()=>4,rowName:"Stats row",rowProps:{...o,direction:"row",gap:0,share:"equal",phoneRow:2,[h("share")]:"content"},props:(e,t)=>({...o,justify:"between",gap:12,gapPhone:12,sectionHeightMode:"fixed",sectionHeightValue:242,sectionHeightUnit:"px",widthFitPhone:"fixed",widthPhone:800,sectionPaddingTop:48,sectionPaddingBottom:48,sectionPaddingLeft:32,sectionPaddingRight:32,sectionBorder:{top:1,right:1,bottom:1,left:1},...C(e,t)}),parts:[{...d,when:(e,t)=>!x(t)&&d.when(e,t)},{kind:"group",name:"Figure",props:{...o,direction:"row",align:"start",gap:32,gapPhone:32,share:"content",phoneRow:2,[h("share")]:"content"},when:(e,t)=>x(t),parts:[d,{kind:"text",key:"supSuffix",props:y,style:{textStyle:"body-5",...n("label",13),weight:500,color:"accent",letterSpacing:.18,lineHeight:1,padding:12}}]},{kind:"group",name:"Words",props:{...o,gap:4,gapPhone:4},parts:[{kind:"text",key:"label",props:y,style:{textStyle:"body-1",fontRole:"heading",...n("body",16),lineHeight:1.5,letterSpacing:-.01}},i("sub",{color:"labels",...n("label",12),lineHeight:1.5,letterSpacing:.24})]}]}]}],drop:{...m,...f,background:"the band is the Box's theme: the site's band preset (`sectionAccent`), or a declared band-preset write; none paints nothing, and any other colour is skipped",headPlacement:"needs a row per head placement: an own-box Stats with Text draws no head (its words sit in a Section Header above it), the row always draws the head"}},K=new Set(["value","label",g]),_={top:48,bottom:48,topPhone:48,bottomPhone:48},U=e=>{const t=u(typeof e.background=="string"?e.background:void 0,P.Stats);return!!t&&t!=="transparent"},$={name:"Stats",skip:e=>U(e)?"it paints a colour inside its padding, and a Box paints its Fill over the padding too":s(e.dataSource)?"its figures come from a source":Array.isArray(e.items)&&e.items.some(t=>s(t?.[g]))?"a figure names a count, and each figure Text here is typed by hand until it is linked":Array.isArray(e.items)&&e.items.some(t=>Object.keys(t??{}).some(a=>!K.has(a)))?"a figure has a key no part here reads":Object.keys(e._partStyles??{}).some(t=>t!=="heading")?"a figure or a name has a style of its own, kept by kind, which no part here reads":void 0,boxProps:e=>({...b,direction:"column",gap:24,gapPhone:24,...I(e,_)}),box:[...S,...v(_)],parts:[i("heading",{color:"labels",...n("label",12),letterSpacing:.2}),{kind:"group",name:"Stats",props:{...o,gap:32,gapPhone:32},parts:[{kind:"list",key:"items",name:"Stat",perRow:e=>B(e.columns)??4,rowName:"Stats row",rowProps:{...o,direction:"row",gap:32,gapPhone:32,share:"equal",phoneRow:2},props:{...o,gap:8,gapPhone:8,sectionBorder:{top:1},sectionPaddingTop:20},parts:[{kind:"text",key:"value",props:w,style:{textStyle:"heading-2",...n("headingMedium",48,36),weight:500,case:"none",lineHeight:1,letterSpacing:-.03}},i("label",{color:"labels",...n("label",12),letterSpacing:.2})]}]}],drop:{...m,...f,columns:"the rows of N: one row Box per `columns` figures, which the Box draws",dataSource:"an empty source is typed figures, what the row draws; a sourced node is skipped (0 Hartes nodes)",dataSourceOptions:"read only with a source; a sourced node is skipped (0 Hartes nodes)",contained:"the Box draws the site frame now; each figure fills the Box's column",background:"only no fill reaches here: a node that paints a colour is skipped"}},V={StatsParagraph:D,Stats:$};export{V as STATS_SECTION_TO_BOX,k as figureWords};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{BUTTON as
|
|
1
|
+
import{resolveSectionBackground as E,THEME_SECTION_BG as I}from"../../../../../format/lib/content/section-background.js";import{SECTION_BG_BUILT_IN as P}from"../../../../../format/lib/document/blocks/general/section-bg-built-in.js";import{BUTTON as m,DIM as s,bandAccent as B,bandIndex as N,bandWrites as O,fillNoBoxHolds as H,ownFill as M,DROP_COMMON as b,DROP_SIDE_PADDING as u,INNER_BOX as r,SAME_KEYS as y,SECTION_BOX as k,lineBorder as x,TEXT as l,innerPad as T,innerPadKeys as f}from"./section-to-box-row-parts.js";import{splitParagraphs as A}from"../../../../components/goldPhrases.js";import{TIMELINE_YEAR_BOX as C,TIMELINE_YEAR_HEAD as w}from"../../../../../format/lib/sections/timeline-year-shape.js";import{boxPadding as v}from"../../../../../format/lib/document/seed-parts.js";const D="jetbrains-mono",S="space-grotesk",i=(e,t,n={})=>({textStyle:"body-5",font:D,size:e,sizePhone:e,letterSpacing:t,lineHeight:1.5,weight:400,...n}),p=(e,t,n,d)=>({font:S,size:e,sizePhone:t,case:"upper",weight:500,letterSpacing:n,lineHeight:d}),a=(e,t,n,d={})=>({textStyle:"body-1",font:S,size:e,sizePhone:t,weight:400,case:"none",lineHeight:n,...d}),o=(e,t,n={})=>({kind:"text",key:e,props:l,style:t,...n}),_=(e,t)=>t?.future===!0,c=e=>A(typeof e?.body=="string"?e.body:""),g=e=>E(typeof e.background=="string"?e.background:void 0,P.TimelineTrack),h=e=>g(e)===I?e:{...e,background:"transparent"},R={name:"Milestone Timeline",skip:e=>H(g(e)),boxProps:(e,t)=>{const n=N(h(e),t);return{...k,direction:"column",gap:60,sectionBorder:{bottom:1},...T(e,"TimelineTrack"),...M(g(e),e,t),...n>=0?{sectionAccent:n}:{}}},box:[...y.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,t,n)=>B(e,h(t),n)],...f("TimelineTrack")],parts:[{kind:"group",name:"Heading",props:{...r,direction:"row",align:"end",justify:"between",gap:40,share:"content",sectionPaddingBottom:32,sectionBorder:{bottom:1}},parts:[{kind:"group",name:"Title",props:{...r,direction:"row",align:"end",gap:40,share:"content"},parts:[o("eyebrow",i(13,.3,{case:"upper",color:"accent",padding:8}),{role:"eyebrow"}),o("title",{textStyle:"heading-2",...p(79,40,-.03,1)},{role:"heading"})]},o("intro",a(14,14,1.5),{props:{...s,align:"right",maxWidth:360}})]},{kind:"group",name:"Years",props:{...r,direction:"row",share:"equal",gap:0,line:!0},parts:[{kind:"list",key:"entries",name:"Year",props:{...r,...C},item:e=>({props:e.future===!0?{upcoming:!0}:{}}),parts:[{kind:"group",name:w.name,props:{...r,...w},parts:[o("date",i(13,.22,{color:"accent"}),{when:(e,t)=>!_(e,t)}),o("date",i(13,.22,{color:"labels"}),{when:_}),o("title",{textStyle:"heading-3",...p(20,20,-.02,1.1)},{role:"heading"})]},o("blurb",a(13,13,1.55),{props:s})]}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"ghost",props:(e,t)=>({...m,align:"right",...x(e,t)}),style:i(13,.3,{case:"upper"})}],site:(e,t)=>O({props:h(e.props)},t),drop:{...b,...u,background:"another colour is the Box's Fill, or a skip if no Fill holds it; the band is the Box's theme: the site's band preset (`sectionAccent`), or a declared band-preset write (`lib/theme` `bandPresetIndex`)",headPlacement:"needs a row per head placement: an own-box Milestone Timeline draws no head (its words sit in a Section Header above it), the row always draws the head"}},Y={name:"Story Timeline",skip:e=>{const t=typeof e.layout=="string"?e.layout:"split";return t==="split"?void 0:`display "${t}": not converted (0 live pages; Spine and Alternating are not offered, a Track story is not stored anywhere)`},boxProps:e=>({...k,direction:"row",share:[40],gap:80,align:"start",...T(e,"Timeline")}),box:[...y,...f("Timeline")],parts:[{kind:"group",name:"Heading",props:{...r,gap:24},parts:[o("eyebrow",i(12,.3,{case:"upper",color:"accent"}),{role:"eyebrow"}),o("title",{textStyle:"heading-2",...p(72,40,-.03,.94)},{role:"heading"}),o("intro",a(14,14,1.6),{props:{...s,maxWidth:360}}),{kind:"group",name:"Picture",keepEmpty:!0,box:[["imageSrc","bgImage"]],props:{...r,sectionBorder:{top:1,right:1,bottom:1,left:1},darken:75,darkenStyle:"bottom",placement:"bottom-center",sectionHeightMode:"fixed",sectionHeightValue:667,sectionHeightUnit:"px",sectionHeightModePhone:"fixed",sectionHeightValuePhone:419,sectionHeightUnitPhone:"px",...v(12,16)},when:e=>typeof e.imageSrc=="string"&&e.imageSrc.trim()!=="",parts:[{kind:"group",name:"Caption",props:{...r,direction:"row",justify:"between",align:"center",gap:12,share:"content",phoneRow:2},parts:[o("imageCaption",i(11,.24,{case:"upper",color:"text"})),o("imageMeta",i(11,.24,{case:"upper",color:"accent"}),{props:{...l,align:"right"}})]}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"ghost",props:(e,t)=>({...m,...x(e,t)}),style:i(13,.3,{case:"upper"})}]},{kind:"group",name:"Chapters",props:{...r,gap:48,line:!1},parts:[{kind:"list",key:"entries",name:"Chapter",props:{...r,direction:"row",gap:24,share:[25],align:"start"},parts:[o("date",i(13,.24,{color:"accent"})),{kind:"group",name:"Words",props:{...r,gap:14},parts:[o("title",{textStyle:"heading-3",...p(24,20,-.02,1.5)},{role:"heading"}),{kind:"block",type:"Text",props:{...l,_partStyles:{text:a(17,16,1.6)}},box:[["body","text",(e,t)=>c(t)[0]??""]],when:(e,t)=>c(t).length>0},{kind:"block",type:"Text",props:{...s,_partStyles:{text:a(17,16,1.6,{paragraphSpacing:14})}},box:[["body","text",(e,t)=>c(t).slice(1).join(`
|
|
2
2
|
|
|
3
|
-
`)]],when:(e,t)=>c(t).length>1}]}]}]}],drop:{...
|
|
3
|
+
`)]],when:(e,t)=>c(t).length>1}]}]}]}],drop:{...b,...u,layout:"Split is the only display converted (see skip); the Box's own arrangement replaces it"}},G={TimelineTrack:R,Timeline:Y};export{G as TIMELINE_SECTION_TO_BOX};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hasWords as v,registerSectionToBox as o}from"../../../sections/section-to-box.js";import{BUTTON as g,DIM as m,DROP_COMMON as s,DROP_SIDE_PADDING as c,INNER_BOX as t,leadLine as A,SAME_KEYS as d,SECTION_BOX as p,lineBorder as H,TEXT as l,innerPad as
|
|
1
|
+
import{hasWords as v,registerSectionToBox as o}from"../../../sections/section-to-box.js";import{BUTTON as g,DIM as m,DROP_COMMON as s,DROP_SIDE_PADDING as c,INNER_BOX as t,leadLine as A,SAME_KEYS as d,SECTION_BOX as p,lineBorder as H,TEXT as l,innerPad as S,siteGutterOf as C,innerPadKeys as f,smallText as u,wrapperPad as P,wrapperPadKeys as b}from"./section-to-box-row-parts.js";import{CARDS_SECTION_TO_BOX as R}from"./section-to-box-rows-cards.js";import{normalizeSiteGutterPhone as D,siteGutterPhoneFollows as L}from"../../../../../format/lib/content/page-width.js";import{finiteNumber as W}from"../../../../../format/lib/finite-number.js";import{STATS_SECTION_TO_BOX as X}from"./section-to-box-rows-stats.js";import{LOGOS_SECTION_TO_BOX as G}from"./section-to-box-rows-logos.js";import{STRIP_SECTION_TO_BOX as M}from"./section-to-box-rows-strip.js";import{TIMELINE_SECTION_TO_BOX as F}from"./section-to-box-rows-timeline.js";import{LOCATIONS_SECTION_TO_BOX as z}from"./section-to-box-rows-locations.js";import{HEAD_ONLY_SECTION_TO_BOX as K}from"./section-to-box-rows-head.js";import{PAGE_HEADER_SECTION_TO_BOX as Y}from"./section-to-box-rows-pageheader.js";import{DOCBODY_SECTION_TO_BOX as j}from"./section-to-box-rows-docbody.js";import{EDITORIAL_SECTION_TO_BOX as U}from"./section-to-box-rows-editorial.js";import{fluidToken as q,headTree as O,token as r}from"./section-head-looks.js";import{boxPadding as J}from"../../../../../format/lib/document/seed-parts.js";const w={top:72,bottom:72,topPhone:72,bottomPhone:72},Q={name:"Editorial Text",boxProps:e=>({...p,direction:"column",gap:28,gapPhone:28,sectionBorder:{top:1},...P(e,w)}),box:[["topBorder","sectionBorder",e=>e===!1?void 0:{top:1}],...d,...b(w)],parts:[O("Prose"),{kind:"text",key:"body",props:m,style:{textStyle:"body-1",...r("body",16),lineHeight:1.7,paragraphSpacing:18}}],drop:{...s,...c,headPlacement:"needs a row per head placement: an own-box Prose draws no head (its words sit in a Section Header above it), the row always draws the head. 0 of 123 live nodes store it (the live export, 2026-10-24)"}},T={buttonPaddingTop:20,buttonPaddingBottom:20,buttonPaddingLeft:28,buttonPaddingRight:28},k=(e,n)=>n?.variant==="primary",_=(e,n)=>({kind:"list",key:"buttons",name:"Button",flat:!0,when:e,parts:[{kind:"button",key:"label",href:"href",when:k,variant:"primary",style:{letterSpacing:.3},props:{...g,...T,...n}},{kind:"button",key:"label",href:"href",when:(i,a)=>!k(i,a),variant:"ghost",style:{letterSpacing:.3},props:(i,a)=>({...g,...T,...n,...H(i,a)})}]}),h=e=>v(e.title),V={name:"Call-to-Action Heading",boxProps:e=>({...p,direction:"row",align:"center",justify:h(e)?"between":"end",gap:60,gapPhone:60,share:"content",sectionBorder:{bottom:1},...S(e,"TitleWithButtons")}),box:[...d,...f("TitleWithButtons")],parts:[{kind:"group",name:"Title",props:{...t,maxWidth:1e3,widthFitPhone:"fill"},parts:[{kind:"text",key:"title",role:"heading",props:l,style:{textStyle:"heading-1",...q("headingLarge",48,7,108),case:"upper",lineHeight:.94,letterSpacing:-.035}}]},{kind:"group",name:"Buttons",props:e=>({...t,gap:14,gapPhone:14,widthFitPhone:"fill",...h(e)?{minWidth:280,minWidthPhone:0}:{}}),parts:[_(h,{widthFit:"fill",iconPosition:"end"}),_(e=>!h(e),{})]}],drop:{...s,buttonsAlign:"moves the buttons only when there is no heading (4 of 128 live nodes), where the Box puts them at the end. 0 of 128 live nodes store it (the live export, 2026-10-24)",buttonsAlignPhone:"the phone's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Phone view's Block alignment row), so nothing moves"}};function Z(e){const{siteGutter:n,siteGutterPhone:i}=e.site??{},a=C(e),y=Math.min(20,D(i)??L(n));return{sectionPaddingLeft:a,sectionPaddingRight:a,sectionPaddingLeftPhone:y,sectionPaddingRightPhone:y}}const x={top:40,bottom:64,topPhone:24,bottomPhone:36},$={name:"Section Header",boxProps:(e,n)=>({...p,direction:"column",gap:0,...P(e,x),...Z(n)}),box:[...d,...b(x)],parts:[O("SectionHeader")],drop:{...s,...c,headStyle:"needs a row per head look: the row draws the standard look; the editorial, simple, statement, natural and essay looks are other layouts. 0 of 69 live nodes store it (the live export, 2026-10-24)",eyebrowLook:"read only by the simple, statement, natural and essay looks, which this row does not draw. 0 of 69 live nodes store it",rowGap:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",descriptionSize:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",numStyle:"Solid (the default; 4 of 69 live nodes store it) IS the eyebrow Text the row draws; Outlined (0 live) needs an outlined-number text look"}},B={...t,direction:"row",share:[67],gap:30},E={...t,sectionPaddingLeft:30,sectionPaddingLeftPhone:0},N=(e,n,i)=>({kind:"group",name:e,props:n,parts:[i]}),ee={name:"Lead Text",boxProps:e=>({...p,direction:"column",gap:40,gapPhone:40,sectionBorder:{bottom:1},...S(e,"ParagraphsA")}),box:[...d,...f("ParagraphsA")],parts:[{kind:"group",name:"Numbers",props:{...B,gapPhone:24,sectionBorder:{bottom:1},sectionPaddingBottom:40,sectionPaddingBottomPhone:40},parts:[{kind:"group",name:"Eyebrow",props:{...t,sectionPaddingTop:5,sectionPaddingBottom:1,sectionPaddingTopPhone:5,sectionPaddingBottomPhone:1},parts:[u("eyebrow",{color:"labels",...r("label",12),letterSpacing:.24})]},N("Stats column",t,{kind:"group",name:"Stats",props:{...E,gap:0,gapPhone:0},parts:[{kind:"list",key:"stats",name:"Stat",flat:!0,parts:[A("value","label",{...r("label",13),letterSpacing:.18,lineHeight:1.8})]}]})]},{kind:"group",name:"Words",props:{...B,gapPhone:28},parts:[{kind:"group",name:"Lead",props:t,parts:[{kind:"group",name:"Measure",props:{...t,maxWidth:780},parts:[{kind:"text",key:"lead",props:l,style:{textStyle:"heading-3",...r("headingSmall",22,20),weight:400,case:"none",lineHeight:1.45,letterSpacing:-.005}}]}]},N("Note column",{...t,justify:"end",widthFit:"fill"},{kind:"group",name:"Founders",props:{...E,gap:8,gapPhone:8},parts:[{kind:"group",name:"Note",props:{...t,gap:6,gapPhone:6},parts:[{kind:"text",key:"foundersHeading",props:l,style:{textStyle:"body-1",fontRole:"heading",...r("body",18,16),weight:500,letterSpacing:-.01,lineHeight:1.7}},{kind:"text",key:"foundersBody",props:m,style:{textStyle:"body-5",fontRole:"heading",...r("body",14,12),lineHeight:1.7}}]},u("attribution",{...r("label",12,10),letterSpacing:.24,lineHeight:1.7})]})]}],drop:{...s}},I={top:24,bottom:24,topPhone:24,bottomPhone:24},te={name:"Banner",boxProps:e=>({...p,direction:"column",gap:0,...P(e,I)}),box:[...d,"contained",...b(I)],parts:[{kind:"group",name:"Card",keepEmpty:!0,props:{...t,gap:28,placement:"top-left",darken:60,darkenStyle:"even",sectionBorder:{width:1},...J(64,40,40,24)},box:[["imageSrc","bgImage"],["overlay","darken",e=>Math.min(Math.max(W(e)??60,0),100)]],parts:[{kind:"group",name:"Words",props:{...t,gap:20},parts:[u("eyebrow"),{kind:"text",key:"title",role:"heading",props:{...l,maxWidth:680},style:{weight:500,lineHeight:1.05,letterSpacing:-.03,case:"none"}},{kind:"text",key:"body",props:{...m,maxWidth:680},style:{textStyle:"body-1",lineHeight:1.6},was:{size:16}}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:g}]}],drop:{...s,...c}},oe={Prose:Q,TitleWithButtons:V,SectionHeader:$,ParagraphsA:ee,Banner:te};function Se(){o(oe),o(X),o(G),o(R),o(M),o(F),o(z),o(K),o(Y),o(j),o(U)}export{oe as GENERAL_SECTION_TO_BOX,Se as registerGeneralSectionRows};
|
|
@@ -26,6 +26,11 @@ export declare const PART_MEASURED_TRACKS: {
|
|
|
26
26
|
readonly max: 1000;
|
|
27
27
|
readonly step: 1;
|
|
28
28
|
};
|
|
29
|
+
readonly sizeTablet: {
|
|
30
|
+
readonly min: 5;
|
|
31
|
+
readonly max: 1000;
|
|
32
|
+
readonly step: 1;
|
|
33
|
+
};
|
|
29
34
|
readonly sizePhone: {
|
|
30
35
|
readonly min: 5;
|
|
31
36
|
readonly max: 1000;
|
|
@@ -78,6 +83,7 @@ export type PartStyle = {
|
|
|
78
83
|
color?: string;
|
|
79
84
|
italic?: boolean;
|
|
80
85
|
sizePhone?: number;
|
|
86
|
+
sizeTablet?: number;
|
|
81
87
|
alignPhone?: PartAlign;
|
|
82
88
|
};
|
|
83
89
|
export type PartStyleBase = {
|
|
@@ -117,14 +123,21 @@ export declare function partSpacingOf(style: PartStyle): {
|
|
|
117
123
|
};
|
|
118
124
|
export declare const PART_PARAGRAPH_VAR = "--sf-part-para";
|
|
119
125
|
export declare function partPhoneDeclarations(style: PartStyle): Record<string, string>;
|
|
120
|
-
export declare function
|
|
121
|
-
export
|
|
122
|
-
export declare function
|
|
126
|
+
export declare function partTabletDeclarations(style: PartStyle): Record<string, string>;
|
|
127
|
+
export type PartScreen = "desktop" | "tablet" | "mobile";
|
|
128
|
+
export declare function partStyleForScreen(style: PartStyle, screen: PartScreen): PartStyle;
|
|
129
|
+
export declare function partCanvasDeclarations(style: PartStyle, screen: PartScreen, options?: PartDeclarationOptions): Record<string, string>;
|
|
130
|
+
export declare function partSizeBoxOf(screen: PartScreen): "size" | "sizeTablet" | "sizePhone";
|
|
131
|
+
export declare function partSizeFollowed(style: PartStyle, screen: PartScreen): {
|
|
132
|
+
px: number;
|
|
133
|
+
view: "desktop" | "tablet";
|
|
134
|
+
} | null;
|
|
135
|
+
export declare function partStyleWithoutSizeBox(style: PartStyle, screen: PartScreen): PartStyle;
|
|
123
136
|
export type ShownDeclarations = {
|
|
124
137
|
fontFamily?: string;
|
|
125
138
|
fontSize?: string;
|
|
126
139
|
};
|
|
127
|
-
export declare function partShownDeclarations(style: PartStyle,
|
|
140
|
+
export declare function partShownDeclarations(style: PartStyle, screen: PartScreen, options?: PartDeclarationOptions): ShownDeclarations;
|
|
128
141
|
export declare function partStyleDeclarations(style: PartStyle, base: PartStyleBase, options?: PartDeclarationOptions): Record<string, string>;
|
|
129
142
|
export type MeasuredPartStyle = {
|
|
130
143
|
fontSize: string;
|
|
@@ -141,14 +154,14 @@ export declare function partStyleSource<E extends {
|
|
|
141
154
|
getAttribute(name: string): string | null;
|
|
142
155
|
}>(nodeId: string, selectedPartId: string | null, selectedElements: readonly E[], declaresStyle: (className: string | null) => boolean): E | null;
|
|
143
156
|
export declare function storedPartStyle(styles: PartStyles, styleKey: string): PartStyle;
|
|
144
|
-
export declare function applyPartStyles(stamps: readonly StyledPartStamp[], styles: PartStyles, baseOf?: (element: StyledPartEl) => PartStyleBase, styleKeyOf?: (partKey: string) => string, isInline?: (element: StyledPartEl) => boolean,
|
|
157
|
+
export declare function applyPartStyles(stamps: readonly StyledPartStamp[], styles: PartStyles, baseOf?: (element: StyledPartEl) => PartStyleBase, styleKeyOf?: (partKey: string) => string, isInline?: (element: StyledPartEl) => boolean, screen?: PartScreen, drawsStyle?: (partKey: string) => boolean): number;
|
|
145
158
|
export declare function regionSheetStyle(style: PartStyle | undefined | null): PartStyle | null;
|
|
146
|
-
export declare function regionCanvasDeclarations(style: PartStyle | undefined | null,
|
|
159
|
+
export declare function regionCanvasDeclarations(style: PartStyle | undefined | null, screen: PartScreen): {
|
|
147
160
|
fontFamily?: string;
|
|
148
161
|
fontSize?: string;
|
|
149
162
|
};
|
|
150
163
|
export declare function regionHasOwnLook(style: PartStyle | undefined | null): boolean;
|
|
151
|
-
export declare function regionShownDeclarations(style: PartStyle | undefined | null, region: TextRegion,
|
|
164
|
+
export declare function regionShownDeclarations(style: PartStyle | undefined | null, region: TextRegion, screen: PartScreen): ShownDeclarations;
|
|
152
165
|
export declare function regionCanvasRestore(style: {
|
|
153
166
|
fontFamily: string;
|
|
154
167
|
fontSize: string;
|
|
@@ -166,6 +179,7 @@ export type PublishedPartRule = {
|
|
|
166
179
|
stamp: string;
|
|
167
180
|
textStyle?: string;
|
|
168
181
|
declarations: Record<string, string>;
|
|
182
|
+
tablet?: Record<string, string>;
|
|
169
183
|
phone?: Record<string, string>;
|
|
170
184
|
motion?: PublishedPartMotion;
|
|
171
185
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{textStyleCaseCss as J,textStyleCaseOfCss as Q}from"efficient-easel/draw";import{parseHexColor as tt}from"efficient-shell/format";import{FONT_OPTIONS as et,fontOption as nt,fontRoleOf as R,SIZE_STEP_OF_ROLE as z}from"../../../format/lib/fonts.js";import{encodePartKey as ot}from"../../../format/lib/document/part-key.js";import{decodePartId as L,normalizePartText as E}from"./text-parts.js";import{COLOUR_TOKEN as M}from"../../../format/lib/word-styles.js";import{regionStyle as rt}from"../../../format/lib/sections/text-regions.js";import{PHONE_MEDIA as it}from"../content/view-values.js";import{plainRecord as O,propsWithPartRecord as at,readPartRecord as st,readPartRecords as ft}from"../../../format/lib/document/part-records.js";const $="_partStyles",ct="data-sf-part-styled",H="data-sf-text-style",ut=/^(heading|body)-[1-7]$/;function g(t){return typeof t=="string"&&ut.test(t)}const j={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function lt(t){if(!t)return null;for(const[e,n]of Object.entries(j))if(n===t)return e;return null}function Se(t){if(g(t.textStyle))return t.textStyle;const e=R(t.role);return e?j[e]:void 0}const pt=[400,500,600,700],_=["left","center","right","justify"],D=5,C=1e3,dt=-5,xt=10,ht=0,St=64,gt=2,W={size:{min:D,max:C,step:1},sizePhone:{min:D,max:C,step:1},padding:{min:ht,max:St,step:gt}},mt=.05,Pt=.01,Tt=["line","letter"],bt=.5,Rt=2.5,_t=-1,At=1,zt=0,Et=400,Ot=[...new Set(Object.values(z))];function ge(t){return[`${t} { transition: translate var(--page-motion-hover-duration) var(--page-ease-media) var(--page-motion-hover-delay) }`,`${t}:hover, ${t}:active { translate: 0 calc(-1 * var(--page-hover-lift)) }`]}function me(t){return ft(t,$)}function K(t,e){return st(t,$,e)}function Pe(t,e){return Object.values(K(t,e)).filter(n=>n!==void 0).length}function G(t,e,n){return at(t,$,e,$t(n).length?n:null)}function $t(t){return Object.entries(t).filter(([,e])=>e!==void 0)}function yt(t){return Tt.includes(t)}const b=(t,e,n)=>Math.min(n,Math.max(e,t));function wt(t,e){if(yt(t)){const n=Math.round(Number(e));return!Number.isFinite(n)||n===0?null:b(n,dt,xt)}if(t==="lineHeight"){const n=Number(e);return Number.isFinite(n)?P(b(n,bt,Rt),3):null}if(t==="letterSpacing"){const n=Number(e);return Number.isFinite(n)?P(b(n,_t,At),4):null}if(t==="paragraphSpacing"){const n=Math.round(Number(e));return!Number.isFinite(n)||n<=0?null:b(n,zt,Et)}if(Object.hasOwn(W,t)){const{min:n,max:o}=W[t],r=Math.round(Number(e));return Number.isFinite(r)?b(r,n,o):null}return t==="italic"?typeof e=="boolean"?e:null:t==="role"||t==="fontRole"?R(e)?e:null:t==="sizeToken"?w(e)?e:null:t==="textStyle"?g(e)?e:null:t==="alignPhone"?_.includes(e)?e:null:e}const Nt=["weight","size","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding"];function y(t){let e=null;const n=o=>{e??={...t},delete e[o]};for(const o of Nt){const r=t[o];r!==void 0&&!(typeof r=="number"&&Number.isFinite(r))&&n(o)}return t.align!==void 0&&!_.includes(t.align)&&n("align"),t.alignPhone!==void 0&&!_.includes(t.alignPhone)&&n("alignPhone"),t.textStyle!==void 0&&!g(t.textStyle)&&n("textStyle"),t.sizeToken!==void 0&&!w(t.sizeToken)&&n("sizeToken"),t.fontRole!==void 0&&!R(t.fontRole)&&n("fontRole"),e??t}function w(t){if(!t||typeof t!="object")return!1;const{step:e,px:n,stepPhone:o,pxPhone:r,fluid:i}=t,a=f=>typeof f=="number"&&Number.isFinite(f)&&f>0,s=f=>typeof f=="string"&&Ot.includes(f);return s(e)&&a(n)&&(o===void 0||s(o))&&(r===void 0||a(r))&&(i===void 0||It(i,n))}function It(t,e){if(!t||typeof t!="object"||Array.isArray(t))return!1;const{minPx:n,vw:o,...r}=t;return Object.keys(r).length===0&&typeof n=="number"&&Number.isFinite(n)&&n>0&&n<e&&typeof o=="number"&&Number.isFinite(o)&&o>0&&o<=100}function v(t){return t?.pxPhone&&w(t)?{step:t.stepPhone??t.step,px:t.pxPhone}:null}function X({step:t,px:e,fluid:n}){const o=n?`clamp(${n.minPx}px, ${n.vw}vw, ${e}px)`:`${e}px`,r=`var(--size-${t}, ${o})`;return t.startsWith("heading")?`min(${r}, var(--sf-heading-max,9999px))`:r}const Ft=[["font","role"],["font","fontRole"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function kt(t){const e=[];for(const[n,o]of Ft)n===t?e.push(o):o===t&&e.push(n);return e}function Te(t,e,n,o){const r={...K(t,e)},i=o==null?null:wt(n,o);if(i===null)delete r[n];else{r[n]=i;for(const a of kt(n))delete r[a]}return G(t,e,r)}function be(t,e){return G(t,e,{})}function Lt(t){return Q(t)??"none"}function Mt(t){return J(t)??""}const B={heading:"--font-role-heading",heading2:"--font-role-heading2",heading3:"--font-role-heading3",body:"--font-role-body",accent:"--font-role-accent",label:"--font-role-label"};function Ht(t,e){const n=R(t.role);return n||(e?.blockDrawsStyle?null:lt(t.textStyle))}function Re(t,e){return t==="Text"&&e==="text"}const jt={headingLarge:"min(clamp(64px,9vw,144px), var(--sf-heading-max,9999px))",headingMedium:"min(32px, var(--sf-heading-max,9999px))",headingSmall:"min(24px, var(--sf-heading-max,9999px))",accent:"32px",body:"14px",label:"12px"};function Dt(t){const e=z[t],n=jt[e];return n?`var(--size-${e}, ${n})`:`var(--size-${e})`}function Ct(t){const e={};return typeof t.lineHeight=="number"?e.lineHeight=t.lineHeight:t.line&&(e.lineHeight=P(Wt+t.line*mt,3)),typeof t.letterSpacing=="number"?e.letterSpacingEm=t.letterSpacing:t.letter&&(e.letterSpacingEm=P(t.letter*Pt,4)),e}const Wt=1,m="--sf-part-para";function Kt(t){t=y(t);const e={};if(typeof t.sizePhone=="number"&&t.sizePhone>0)e.fontSize=`${t.sizePhone}px`;else{const n=v(t.sizeToken);n&&(e.fontSize=X(n))}return t.alignPhone&&(e.textAlign=t.alignPhone),e}function Gt(t,e){if(!e)return t;const n=y(t);let o=t;if(typeof n.sizePhone=="number"&&n.sizePhone>0)o={...o,size:n.sizePhone};else{const r=v(n.sizeToken);r&&(o={...o,size:void 0,sizeToken:r})}return n.alignPhone&&(o={...o,align:n.alignPhone}),o}function N(t,e,n){return I(Gt(t,e),A,n)}function U(t,e){const n=e?"sizePhone":"size";if(!Object.hasOwn(t,n))return t;const o={...t};return delete o[n],o}function _e(t,e,n){const o=N(U(t,e),e,n);return{fontFamily:o.fontFamily,fontSize:o.fontSize}}function I(t,e,n){t=y(t);const o=Ht(t,n),r=Ct(t),i=t.size?`${t.size}px`:t.sizeToken?X(t.sizeToken):o?Dt(o):"";return{fontFamily:t.font?Ut(t.font):t.fontRole?`var(${B[t.fontRole]})`:o?`var(${B[o]})`:"",fontWeight:t.weight?String(t.weight):"",fontSize:i,minWidth:i?"0":"",overflowWrap:i?"break-word":"",lineHeight:r.lineHeight!==void 0?String(r.lineHeight):"",letterSpacing:r.letterSpacingEm!==void 0?`${r.letterSpacingEm}em`:"",[m]:t.paragraphSpacing?`${t.paragraphSpacing}px`:"",textTransform:Mt(t.case),textAlign:t.align??"",paddingTop:V(t.padding),paddingBottom:V(t.padding),color:vt(t.color),fontStyle:t.italic===!0?"italic":t.italic===!1?"normal":""}}const vt=t=>t===void 0||t===""?"":Object.hasOwn(M,t)?M[t]:tt(t)===t.toLowerCase()?t:"",V=t=>t===void 0?"":`${t}px`,P=(t,e)=>Number(t.toFixed(e));function Ae(t,e){const n=Number.parseFloat(t.fontSize)||16,o=Number.parseFloat(t.lineHeight),r=Number.parseFloat(t.letterSpacing),i=Number.parseFloat(t.paddingTop);return{fontKey:e,sizePx:n,weight:Xt(Number.parseInt(t.fontWeight,10)),lineRatio:Number.isFinite(o)?P(o/n,3):1.2,letterEm:Number.isFinite(r)?P(r/n,4):0,align:Bt(t.textAlign),case:Lt(t.textTransform),paddingPx:Number.isFinite(i)?Math.round(i):0}}function Xt(t){return Number.isFinite(t)?pt.reduce((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e):400}function Bt(t){for(const e of _)if(e===t)return e;return t==="end"?"right":"left"}function ze(t,e){const n=Y(t);if(!n)return"";for(const o of et)if(Y(e(o.cssVar))===n)return o.key;return""}const Y=t=>(t.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function Ut(t){const e=nt(t);return e?`var(${e.cssVar})`:""}function Ee(t,e,n,o){return!e||L(e)?.nodeId!==t?null:n.find(i=>o(i.getAttribute("class")))??n[0]??null}function Vt(t,e){return Object.hasOwn(t,e)?O(t[e])??{}:{}}function Oe(t,e,n=()=>A,o=s=>s,r=qt,i=!1,a=()=>!1){let s=0;for(const{element:f,partId:p}of t){const c=L(p)?.propKey;if(!c)continue;const l=Vt(e,o(c)),d=N(l,i,{blockDrawsStyle:a(c)});g(l.textStyle)?f.setAttribute?.(H,l.textStyle):f.removeAttribute?.(H);const u=k.some(x=>f.style[x]);let h=!1;for(const[x,S]of Object.entries(d))te(f,x,S),S&&(h=!0);if(u||k.some(x=>d[x]))for(const x of Yt(f,r))for(const S of k)x.style[S]=d[S]??"";h&&(s+=1)}return s}function Yt(t,e){const n=E(t.textContent??""),o=[];let r=t;for(let i=0;i<Zt&&e(r);i+=1){const a=r.parentElement;if(!a||E(a.textContent??"")!==n)break;o.push(a),r=a}return o}const Zt=8;function qt(t){const e=t;return typeof window>"u"||!e?.ownerDocument?!1:window.getComputedStyle(e).display==="inline"}const A={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0};function Jt(t){if(!t||typeof t!="object")return null;const e={};return g(t.textStyle)&&(e.textStyle=t.textStyle),typeof t.size=="number"&&t.size>0&&(e.size=t.size),typeof t.sizePhone=="number"&&t.sizePhone>0&&(e.sizePhone=t.sizePhone),Object.keys(e).length?e:null}function Qt(t,e){const n=Jt(t);if(!n)return{};const o=N(n,e);return{...o.fontFamily?{fontFamily:o.fontFamily}:{},...o.fontSize?{fontSize:o.fontSize}:{}}}function $e(t){return g(t?.textStyle)||!!t?.role||typeof t?.size=="number"&&t.size>0}function ye(t,e,n){if(!t||typeof t!="object")return{};const o=rt(t.role,e,z)??{},r=e.sized?Qt(U(t,n),n):{};return{...o,...r}}function we(t,e,n){n.fontFamily&&t.fontFamily===n.fontFamily&&(t.fontFamily=e.fontFamily),n.fontSize&&t.fontSize===n.fontSize&&(t.fontSize=e.fontSize)}function te(t,e,n){if(!e.startsWith("--")){t.style[e]=n;return}const o=t.style;typeof o.setProperty=="function"?n?o.setProperty(e,n):o.removeProperty?.(e):o[e]=n;const r=t;e===m&&(n?r.setAttribute?.(Z,""):r.removeAttribute?.(Z))}const Z="data-sf-part-para",ee=Object.keys(I({},A)),F=new Set(["color","overflowWrap",m,"fontStyle"]),k=ee.filter(t=>!F.has(t));function Ne(t,e,n,o=s=>s,r=()=>!1,i=()=>null,a=[]){const s=new Map;for(const c of t){const l=ot(c.key,c.row);for(const d of c.texts){const u=s.get(d);u?(u.keys.add(c.key),u.partKeys.add(l)):s.set(d,{keys:new Set([c.key]),partKeys:new Set([l])})}}const f=new Map;for(const c of new Set([...Object.keys(e),...a])){if(!ne(c))continue;const l=q(n,c,O(e[c])??{},!1,i(c));l&&f.set(c,l)}const p=new Map;for(const[c,{keys:l,partKeys:d}]of s){const u=d.size===1?[...d][0]:l.size===1?[...l][0]:null;if(!u)continue;const h=o(u),T=i(h);if(!Object.hasOwn(e,h)&&!T)continue;const x=O(e[h])??{},S=q(n,u,x,r(u),T);S&&p.set(c,S)}return p.size||f.size?{rules:p,kindRules:f,drawn:new Set(s.keys())}:null}function q(t,e,n,o,r){const i=I(n,A,{blockDrawsStyle:o}),a=Kt(n),s=g(n.textStyle)?n.textStyle:void 0;return!Object.values(i).some(Boolean)&&!Object.keys(a).length&&!s&&!r?null:{stamp:oe(t,e),declarations:i,...Object.keys(a).length?{phone:a}:{},...s?{textStyle:s}:{},...r?{motion:r}:{}}}function ne(t){return t.startsWith("@")}function Ie(t,e){return t?.kindRules.get(e)??null}function oe(t,e){const n=o=>o.replace(/[^A-Za-z0-9_-]+/g,"-");return`${n(t)}~${n(e)}`}function Fe(t){const e=[],n=new Set,o=r=>{const{stamp:i,declarations:a}=r;if(n.has(i))return;n.add(i);const s=Object.entries(a).filter(([,u])=>u!==""),f=u=>u.map(([h,T])=>`${ie(h)}: ${T}`).join("; "),p=`[${ct}="${i}"]`,c=s.filter(([u])=>!F.has(u)),l=s.filter(([u])=>F.has(u));c.length&&e.push(`${p}, *:has(> ${p}) { ${f(c)} }`),l.length&&e.push(`${p} { ${f(l)} }`),a[m]&&(e.push(`*:has(> ${p}) { ${m}: ${a[m]} }`),e.push(...re(p,`*:has(> ${p})`)));const d=Object.entries(r.phone??{}).filter(([,u])=>u!=="");d.length&&e.push(`@media ${it} { ${p}, *:has(> ${p}) { ${f(d)} } }`)};for(const r of t.rules.values())o(r);for(const r of t.kindRules.values())o(r);return e.join(`
|
|
2
|
-
`)}function
|
|
1
|
+
import{textStyleCaseCss as J,textStyleCaseOfCss as Q}from"efficient-easel/draw";import{FONT_OPTIONS as tt,fontOption as et,fontRoleOf as z,SIZE_STEP_OF_ROLE as $}from"../../../format/lib/fonts.js";import{encodePartKey as nt}from"../../../format/lib/document/part-key.js";import{decodePartId as D,normalizePartText as O}from"./text-parts.js";import{partInkCss as ot}from"../../../format/lib/document/part-inks.js";import{regionStyle as rt}from"../../../format/lib/sections/text-regions.js";import{PHONE_MEDIA as it,TABLET_MEDIA as at,viewOverrides as st}from"../content/view-values.js";import{plainRecord as w,propsWithPartRecord as ft,readPartRecord as ct,readPartRecords as lt}from"../../../format/lib/document/part-records.js";const N="_partStyles",ut="data-sf-part-styled",v="data-sf-text-style",pt=/^(heading|body)-[1-7]$/;function m(t){return typeof t=="string"&&pt.test(t)}const C={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function dt(t){if(!t)return null;for(const[e,n]of Object.entries(C))if(n===t)return e;return null}function be(t){if(m(t.textStyle))return t.textStyle;const e=z(t.role);return e?C[e]:void 0}const xt=[400,500,600,700],_=["left","center","right","justify"],y=5,k=1e3,ht=-5,St=10,mt=0,gt=64,bt=2,W={size:{min:y,max:k,step:1},sizeTablet:{min:y,max:k,step:1},sizePhone:{min:y,max:k,step:1},padding:{min:mt,max:gt,step:bt}},Pt=.05,Tt=.01,Rt=["line","letter"],zt=.5,_t=2.5,At=-1,Et=1,$t=0,Ot=400,wt=[...new Set(Object.values($))];function Pe(t){return[`${t} { transition: translate var(--page-motion-hover-duration) var(--page-ease-media) var(--page-motion-hover-delay) }`,`${t}:hover, ${t}:active { translate: 0 calc(-1 * var(--page-hover-lift)) }`]}function Te(t){return lt(t,N)}function G(t,e){return ct(t,N,e)}function Re(t,e){return Object.values(G(t,e)).filter(n=>n!==void 0).length}function K(t,e,n){return ft(t,N,e,Nt(n).length?n:null)}function Nt(t){return Object.entries(t).filter(([,e])=>e!==void 0)}function yt(t){return Rt.includes(t)}const T=(t,e,n)=>Math.min(n,Math.max(e,t));function kt(t,e){if(yt(t)){const n=Math.round(Number(e));return!Number.isFinite(n)||n===0?null:T(n,ht,St)}if(t==="lineHeight"){const n=Number(e);return Number.isFinite(n)?b(T(n,zt,_t),3):null}if(t==="letterSpacing"){const n=Number(e);return Number.isFinite(n)?b(T(n,At,Et),4):null}if(t==="paragraphSpacing"){const n=Math.round(Number(e));return!Number.isFinite(n)||n<=0?null:T(n,$t,Ot)}if(Object.hasOwn(W,t)){const{min:n,max:o}=W[t],r=Math.round(Number(e));return Number.isFinite(r)?T(r,n,o):null}return t==="italic"?typeof e=="boolean"?e:null:t==="role"||t==="fontRole"?z(e)?e:null:t==="sizeToken"?I(e)?e:null:t==="textStyle"?m(e)?e:null:t==="alignPhone"?_.includes(e)?e:null:e}const It=["weight","size","sizeTablet","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding"];function R(t){let e=null;const n=o=>{e??={...t},delete e[o]};for(const o of It){const r=t[o];r!==void 0&&!(typeof r=="number"&&Number.isFinite(r))&&n(o)}return t.align!==void 0&&!_.includes(t.align)&&n("align"),t.alignPhone!==void 0&&!_.includes(t.alignPhone)&&n("alignPhone"),t.textStyle!==void 0&&!m(t.textStyle)&&n("textStyle"),t.sizeToken!==void 0&&!I(t.sizeToken)&&n("sizeToken"),t.fontRole!==void 0&&!z(t.fontRole)&&n("fontRole"),e??t}function I(t){if(!t||typeof t!="object")return!1;const{step:e,px:n,stepPhone:o,pxPhone:r,fluid:i}=t,s=a=>typeof a=="number"&&Number.isFinite(a)&&a>0,f=a=>typeof a=="string"&&wt.includes(a);return f(e)&&s(n)&&(o===void 0||f(o))&&(r===void 0||s(r))&&(i===void 0||Ft(i,n))}function Ft(t,e){if(!t||typeof t!="object"||Array.isArray(t))return!1;const{minPx:n,vw:o,...r}=t;return Object.keys(r).length===0&&typeof n=="number"&&Number.isFinite(n)&&n>0&&n<e&&typeof o=="number"&&Number.isFinite(o)&&o>0&&o<=100}function F(t){return t?.pxPhone&&I(t)?{step:t.stepPhone??t.step,px:t.pxPhone}:null}function B({step:t,px:e,fluid:n}){const o=n?`clamp(${n.minPx}px, ${n.vw}vw, ${e}px)`:`${e}px`,r=`var(--size-${t}, ${o})`;return t.startsWith("heading")?`min(${r}, var(--sf-heading-max,9999px))`:r}const Mt=[["font","role"],["font","fontRole"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function Lt(t){const e=[];for(const[n,o]of Mt)n===t?e.push(o):o===t&&e.push(n);return e}function ze(t,e,n,o){const r={...G(t,e)},i=o==null?null:kt(n,o);if(i===null)delete r[n];else{r[n]=i;for(const s of Lt(n))delete r[s]}return K(t,e,r)}function _e(t,e){return K(t,e,{})}function jt(t){return Q(t)??"none"}function Ht(t){return J(t)??""}const X={heading:"--font-role-heading",heading2:"--font-role-heading2",heading3:"--font-role-heading3",body:"--font-role-body",accent:"--font-role-accent",label:"--font-role-label"};function Dt(t,e){const n=z(t.role);return n||(e?.blockDrawsStyle?null:dt(t.textStyle))}function Ae(t,e){return t==="Text"&&e==="text"}const vt={headingLarge:"min(clamp(64px,9vw,144px), var(--sf-heading-max,9999px))",headingMedium:"min(32px, var(--sf-heading-max,9999px))",headingSmall:"min(24px, var(--sf-heading-max,9999px))",accent:"32px",body:"14px",label:"12px"};function Ct(t){const e=$[t],n=vt[e];return n?`var(--size-${e}, ${n})`:`var(--size-${e})`}function Wt(t){const e={};return typeof t.lineHeight=="number"?e.lineHeight=t.lineHeight:t.line&&(e.lineHeight=b(Gt+t.line*Pt,3)),typeof t.letterSpacing=="number"?e.letterSpacingEm=t.letterSpacing:t.letter&&(e.letterSpacingEm=b(t.letter*Tt,4)),e}const Gt=1,g="--sf-part-para";function Kt(t){t=R(t);const e={};if(typeof t.sizePhone=="number"&&t.sizePhone>0)e.fontSize=`${t.sizePhone}px`;else{const n=F(t.sizeToken);if(n)e.fontSize=B(n);else{const o=A(t);o!==void 0&&(e.fontSize=`${o}px`)}}return t.alignPhone&&(e.textAlign=t.alignPhone),e}function A(t){const e=st("textSize",t.size,t.sizeTablet,void 0).tablet;return e&&e>0?e:void 0}function Bt(t){const e=A(R(t));return e===void 0?{}:{fontSize:`${e}px`}}function Xt(t,e){if(e==="desktop")return t;const n=R(t),o=A(n);if(e==="tablet")return o===void 0?t:{...t,size:o};let r=t;if(typeof n.sizePhone=="number"&&n.sizePhone>0)r={...r,size:n.sizePhone};else{const i=F(n.sizeToken);i?r={...r,size:void 0,sizeToken:i}:o!==void 0&&(r={...r,size:o})}return n.alignPhone&&(r={...r,align:n.alignPhone}),r}function M(t,e,n){return L(Xt(t,e),E,n)}function Ut(t){return t==="mobile"?"sizePhone":t==="tablet"?"sizeTablet":"size"}function Ee(t,e){if(e==="desktop")return null;const n=R(t);if(e==="mobile"){if(F(n.sizeToken))return null;const o=A(n);if(o!==void 0)return{px:o,view:"tablet"}}return typeof n.size=="number"&&n.size>0?{px:n.size,view:"desktop"}:null}function U(t,e){const n=Ut(e);if(!Object.hasOwn(t,n))return t;const o={...t};return delete o[n],o}function $e(t,e,n){const o=M(U(t,e),e,n);return{fontFamily:o.fontFamily,fontSize:o.fontSize}}function L(t,e,n){t=R(t);const o=Dt(t,n),r=Wt(t),i=t.size?`${t.size}px`:t.sizeToken?B(t.sizeToken):o?Ct(o):"";return{fontFamily:t.font?qt(t.font):t.fontRole?`var(${X[t.fontRole]})`:o?`var(${X[o]})`:"",fontWeight:t.weight?String(t.weight):"",fontSize:i,minWidth:i?"0":"",overflowWrap:i?"break-word":"",lineHeight:r.lineHeight!==void 0?String(r.lineHeight):"",letterSpacing:r.letterSpacingEm!==void 0?`${r.letterSpacingEm}em`:"",[g]:t.paragraphSpacing?`${t.paragraphSpacing}px`:"",textTransform:Ht(t.case),textAlign:t.align??"",paddingTop:V(t.padding),paddingBottom:V(t.padding),color:Vt(t.color),fontStyle:t.italic===!0?"italic":t.italic===!1?"normal":""}}const Vt=t=>ot(t),V=t=>t===void 0?"":`${t}px`,b=(t,e)=>Number(t.toFixed(e));function Oe(t,e){const n=Number.parseFloat(t.fontSize)||16,o=Number.parseFloat(t.lineHeight),r=Number.parseFloat(t.letterSpacing),i=Number.parseFloat(t.paddingTop);return{fontKey:e,sizePx:n,weight:Yt(Number.parseInt(t.fontWeight,10)),lineRatio:Number.isFinite(o)?b(o/n,3):1.2,letterEm:Number.isFinite(r)?b(r/n,4):0,align:Zt(t.textAlign),case:jt(t.textTransform),paddingPx:Number.isFinite(i)?Math.round(i):0}}function Yt(t){return Number.isFinite(t)?xt.reduce((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e):400}function Zt(t){for(const e of _)if(e===t)return e;return t==="end"?"right":"left"}function we(t,e){const n=Y(t);if(!n)return"";for(const o of tt)if(Y(e(o.cssVar))===n)return o.key;return""}const Y=t=>(t.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function qt(t){const e=et(t);return e?`var(${e.cssVar})`:""}function Ne(t,e,n,o){return!e||D(e)?.nodeId!==t?null:n.find(i=>o(i.getAttribute("class")))??n[0]??null}function Jt(t,e){return Object.hasOwn(t,e)?w(t[e])??{}:{}}function ye(t,e,n=()=>E,o=f=>f,r=ee,i="desktop",s=()=>!1){let f=0;for(const{element:a,partId:u}of t){const c=D(u)?.propKey;if(!c)continue;const p=Jt(e,o(c)),x=M(p,i,{blockDrawsStyle:s(c)});m(p.textStyle)?a.setAttribute?.(v,p.textStyle):a.removeAttribute?.(v);const d=H.some(h=>a.style[h]);let l=!1;for(const[h,S]of Object.entries(x))re(a,h,S),S&&(l=!0);if(d||H.some(h=>x[h]))for(const h of Qt(a,r))for(const S of H)h.style[S]=x[S]??"";l&&(f+=1)}return f}function Qt(t,e){const n=O(t.textContent??""),o=[];let r=t;for(let i=0;i<te&&e(r);i+=1){const s=r.parentElement;if(!s||O(s.textContent??"")!==n)break;o.push(s),r=s}return o}const te=8;function ee(t){const e=t;return typeof window>"u"||!e?.ownerDocument?!1:window.getComputedStyle(e).display==="inline"}const E={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0};function ne(t){if(!t||typeof t!="object")return null;const e={};return m(t.textStyle)&&(e.textStyle=t.textStyle),typeof t.size=="number"&&t.size>0&&(e.size=t.size),typeof t.sizeTablet=="number"&&t.sizeTablet>0&&(e.sizeTablet=t.sizeTablet),typeof t.sizePhone=="number"&&t.sizePhone>0&&(e.sizePhone=t.sizePhone),Object.keys(e).length?e:null}function oe(t,e){const n=ne(t);if(!n)return{};const o=M(n,e);return{...o.fontFamily?{fontFamily:o.fontFamily}:{},...o.fontSize?{fontSize:o.fontSize}:{}}}function ke(t){return m(t?.textStyle)||!!t?.role||typeof t?.size=="number"&&t.size>0}function Ie(t,e,n){if(!t||typeof t!="object")return{};const o=rt(t.role,e,$)??{},r=e.sized?oe(U(t,n),n):{};return{...o,...r}}function Fe(t,e,n){n.fontFamily&&t.fontFamily===n.fontFamily&&(t.fontFamily=e.fontFamily),n.fontSize&&t.fontSize===n.fontSize&&(t.fontSize=e.fontSize)}function re(t,e,n){if(!e.startsWith("--")){t.style[e]=n;return}const o=t.style;typeof o.setProperty=="function"?n?o.setProperty(e,n):o.removeProperty?.(e):o[e]=n;const r=t;e===g&&(n?r.setAttribute?.(Z,""):r.removeAttribute?.(Z))}const Z="data-sf-part-para",ie=Object.keys(L({},E)),j=new Set(["color","overflowWrap",g,"fontStyle"]),H=ie.filter(t=>!j.has(t));function Me(t,e,n,o=f=>f,r=()=>!1,i=()=>null,s=[]){const f=new Map;for(const c of t){const p=nt(c.key,c.row);for(const x of c.texts){const d=f.get(x);d?(d.keys.add(c.key),d.partKeys.add(p)):f.set(x,{keys:new Set([c.key]),partKeys:new Set([p])})}}const a=new Map;for(const c of new Set([...Object.keys(e),...s])){if(!ae(c))continue;const p=q(n,c,w(e[c])??{},!1,i(c));p&&a.set(c,p)}const u=new Map;for(const[c,{keys:p,partKeys:x}]of f){const d=x.size===1?[...x][0]:p.size===1?[...p][0]:null;if(!d)continue;const l=o(d),P=i(l);if(!Object.hasOwn(e,l)&&!P)continue;const h=w(e[l])??{},S=q(n,d,h,r(d),P);S&&u.set(c,S)}return u.size||a.size?{rules:u,kindRules:a,drawn:new Set(f.keys())}:null}function q(t,e,n,o,r){const i=L(n,E,{blockDrawsStyle:o}),s=Bt(n),f=Kt(n),a=m(n.textStyle)?n.textStyle:void 0;return!Object.values(i).some(Boolean)&&!Object.keys(s).length&&!Object.keys(f).length&&!a&&!r?null:{stamp:se(t,e),declarations:i,...Object.keys(s).length?{tablet:s}:{},...Object.keys(f).length?{phone:f}:{},...a?{textStyle:a}:{},...r?{motion:r}:{}}}function ae(t){return t.startsWith("@")}function Le(t,e){return t?.kindRules.get(e)??null}function se(t,e){const n=o=>o.replace(/[^A-Za-z0-9_-]+/g,"-");return`${n(t)}~${n(e)}`}function je(t){const e=[],n=new Set,o=r=>{const{stamp:i,declarations:s}=r;if(n.has(i))return;n.add(i);const f=Object.entries(s).filter(([,l])=>l!==""),a=l=>l.map(([P,h])=>`${ce(P)}: ${h}`).join("; "),u=`[${ut}="${i}"]`,c=f.filter(([l])=>!j.has(l)),p=f.filter(([l])=>j.has(l));c.length&&e.push(`${u}, *:has(> ${u}) { ${a(c)} }`),p.length&&e.push(`${u} { ${a(p)} }`),s[g]&&(e.push(`*:has(> ${u}) { ${g}: ${s[g]} }`),e.push(...fe(u,`*:has(> ${u})`)));const x=Object.entries(r.tablet??{}).filter(([,l])=>l!=="");x.length&&e.push(`@media ${at} { ${u}, *:has(> ${u}) { ${a(x)} } }`);const d=Object.entries(r.phone??{}).filter(([,l])=>l!=="");d.length&&e.push(`@media ${it} { ${u}, *:has(> ${u}) { ${a(d)} } }`)};for(const r of t.rules.values())o(r);for(const r of t.kindRules.values())o(r);return e.join(`
|
|
2
|
+
`)}function fe(t,e){const n=`var(${g})`,o=":is([data-sf-bullet], [data-sf-number])";return[`${t} br:not(br + br) { display: block; content: ""; margin-top: ${n} }`,`${t} ${o}:not(:first-child) { margin-top: ${n} }`,`${t} ${o}:not(:last-child) { margin-bottom: ${n} }`,`:is(${e}) + :is(${e}) { margin-top: ${n} }`]}const ce=t=>t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`);function He(t,e){if(!t)return null;const n=O(e),o=t.rules.get(n);if(o)return o;if(n.length<le||t.drawn.has(n))return null;let r=null;for(const[i,s]of t.rules)if(i.includes(n)){if(r&&r.stamp!==s.stamp)return null;r=s}return r}const le=8;export{_ as PART_ALIGNS,Et as PART_LETTER_EM_MAX,At as PART_LETTER_EM_MIN,Tt as PART_LETTER_STEP,_t as PART_LINE_HEIGHT_MAX,zt as PART_LINE_HEIGHT_MIN,Pt as PART_LINE_STEP,W as PART_MEASURED_TRACKS,St as PART_NUDGE_MAX,ht as PART_NUDGE_MIN,gt as PART_PADDING_MAX,mt as PART_PADDING_MIN,bt as PART_PADDING_STEP,Z as PART_PARAGRAPH_ATTR,Ot as PART_PARAGRAPH_MAX,$t as PART_PARAGRAPH_MIN,g as PART_PARAGRAPH_VAR,Rt as PART_RELATIVE_PROPS,k as PART_SIZE_MAX,y as PART_SIZE_MIN,wt as PART_SIZE_STEPS,ut as PART_STYLED_ATTR,N as PART_STYLES_PROP,ie as PART_STYLE_PROPERTIES,xt as PART_WEIGHTS,H as SHARED_PART_PROPERTIES,C as STYLE_ID_OF_ROLE,v as TEXT_STYLE_ATTR,ye as applyPartStyles,Ae as blockDrawsTextStyle,be as followedStyleOf,ae as isPartKindKey,m as isTextStyleId,fe as paragraphRules,M as partCanvasDeclarations,jt as partCaseOfTransform,Ht as partCaseTransform,we as partFontKeyOf,Pe as partLiftRules,Kt as partPhoneDeclarations,Le as partRuleForKind,He as partRuleForText,$e as partShownDeclarations,Ut as partSizeBoxOf,Ee as partSizeFollowed,Wt as partSpacingOf,Oe as partStyleBase,Re as partStyleCount,je as partStyleCss,L as partStyleDeclarations,Xt as partStyleForScreen,Ne as partStyleSource,U as partStyleWithoutSizeBox,Bt as partTabletDeclarations,ze as propsWithPartStyleValue,_e as propsWithoutPartStyle,Me as publishedPartStyles,G as readPartStyle,Te as readPartStyles,oe as regionCanvasDeclarations,Fe as regionCanvasRestore,ke as regionHasOwnLook,ne as regionSheetStyle,Ie as regionShownDeclarations,Jt as storedPartStyle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as C}from"react/jsx-runtime";import{parseBlockWidthFit as D,phoneKey as o,tabletKey as l}from"efficient-easel/draw";import{blockPhoneHideClass as j,blockSizeOf as P,blockSizeValuesOf as K}from"../../content/block-size.js";import{CellWrap as A}from"../../../components/InBoxContext.js";import{boxPhoneRowFits as L,boxRowColumnsClass as W,boxShareClasses as g,boxShareTabletOf as G,boxTabletColumnsClass as X}from"../../../../format/lib/content/box-layout.js";import{resolveContainerDirection as Z}from"../../../../format/lib/content/container-direction.js";import{containerBlocksFor as v}from"../../../../format/lib/document/container-blocks.js";import{readPartStyle as U}from"../part-styles.js";import{addShowWhenFacts as $,withRowRules as p}from"../../../../format/lib/document/show-when-attach.js";import{BOX_BLOCK_KEYS as M}from"./cell-width.js";import{findParentNode as V}from"../../../../format/lib/document/passes/document-position.js";const Y=new Set(["Text","Heading"]),q=new Set(["h1","h2","h3","h4","h5","h6"]);function O(t,e){return t==="Heading"?!0:t!=="Text"?!1:typeof e.tag=="string"&&q.has(e.tag)?!0:U(e,"text").textStyle?.startsWith("heading-")===!0}const c={not:{context:"blockOutsideBox",is:!0}},T={all:[c,{not:{context:"boxSharesWidth",is:!0}}]},B={all:[c,{not:{context:"boxSharesWidthPhone",is:!0}}]},k={all:[c,{not:{context:"boxSharesWidthTablet",is:!0}}]};function J(t,e){return{any:[{field:l(t),is:e},{all:[{field:l(t),set:!1},{field:t,is:e}]}]}}function y(t,e,i){return{any:[{field:o(t),is:e},{all:[{field:o(t),set:!1},i??{field:t,is:e}]}]}}const H={any:[{field:"textFit",is:"shrink"},{all:[{field:"textFit",set:!1},{not:{context:"textWrapsByDefault",is:!0}}]}]},Q=[[["_gBlockSize","minWidth",l("minWidth"),o("minWidth"),"maxWidth",l("maxWidth"),o("maxWidth")],c],[["widthFit"],T],[[l("widthFit")],k],[[o("widthFit")],B],[["width"],{all:[T,{field:"widthFit",is:"fixed"}]}],[[l("width")],{all:[k,J("widthFit","fixed")]}],[[o("width")],{all:[B,y("widthFit","fixed")]}]],I=[[["_gText","textFit",o("textFit")],c],[["minFont"],{all:[c,H]}],[[o("minFont")],{all:[c,y("textFit","shrink",H)]}]],h=(t,e)=>V(e.appState,t.props?.id),f=t=>!!t&&typeof t.type=="string"&&v(t.type)!==null,S=t=>(t.type==="Flex"||t.type==="HeroGroup")&&Z(t.type,t.props?.direction)==="row",w=t=>{const e=D(t);return e!==void 0&&e!=="fit"},tt={blockOutsideBox:(t,e)=>!f(h(t,e)),boxSharesWidth:(t,e)=>{const i=h(t,e);return!f(i)||!S(i)?!1:W({...i.props,direction:"row"})!==""?!0:g(i.props?.share)!==""&&!w(t.props?.widthFit)},boxSharesWidthTablet:(t,e)=>{const i=h(t,e);if(!f(i)||!S(i))return!1;if(X(i.props?.[l("columns")])!==""||W({...i.props,direction:"row"})!=="")return!0;const n=G(i.props?.[l("share")])??i.props?.share;return g(n)!==""&&!w(t.props?.[l("widthFit")]??t.props?.widthFit)},boxSharesWidthPhone:(t,e)=>{const i=h(t,e);if(!f(i)||!S(i))return!1;const n=i.props?.phoneRow;return(Number(n)===2||Number(n)===3)&&!L(n,i.props?.[o("share")])&&!w(t.props?.[o("widthFit")]??t.props?.widthFit)}},et=t=>/^_[gds][A-Z]/.test(t);function it(t,e,i){const n=Object.entries(t),r=n.findIndex(([a])=>a===e);if(r===-1)return null;let s=r+1;for(;s<n.length&&!et(n[s][0]);)s++;return Object.fromEntries([...n.slice(0,s),...Object.entries(i),...n.slice(s)])}function N(t,e,i){const n=Object.entries(t);return Object.fromEntries([...n.slice(0,e),...Object.entries(i),...n.slice(e)])}function nt(t,e,i){const n=Object.keys(e);if(n.includes("_dSize")){const{_gBlockSize:r,...s}=i;return N(e,n.indexOf("_dSize")+1,s)}return rt.has(t)&&n.includes("_gSpacing")?N(e,n.indexOf("_gSpacing"),i):{...e,...i}}const rt=new Set(["Text","Heading"]);function st(t,e){const{_gText:i,...n}=e;return it(t,"_gText",n)??{...t,...e}}function ot(t){const e=new WeakMap;return i=>{if(!i||!("textFit"in i))return i;let n=e.get(i);if(!n){n={...i};for(const r of["textFit",o("textFit")])r in n&&(n[r]=t[r]);e.set(i,n)}return n}}const Ft={name:"blockSize",applies:(t,e,i)=>M.includes(t)&&!!i&&typeof i.render=="function",panel(t,e,i){const n=Y.has(e),{text:r}=i.blockSizeFields(n?{textFit:e==="Heading"?"shrink":"wrap"}:{}),{size:s}=i.blockSizeFields({tablet:!0});let a=nt(e,t.fields??{},p(s,Q));if(n){const d=p(r,I);if(a=st(a,d),e==="Text"){const z=p(i.blockSizeFields({textFit:"shrink"}).text,I),E=ot(z),b=t.resolveFields,R=(F,u)=>{const x=b?b(F,u):u.fields,m=_=>O(e,F?.props??{})?E(_??u.fields):_;return x instanceof Promise?x.then(m):m(x)};t.resolveFields=R}}t.fields=a,$(t,{...tt,textWrapsByDefault:d=>!O(e,d.props??{})})},draw(t){lt(t)}};function lt(t){const e=t.render;t.render=i=>{const n=P(K(i)),r=e(i);if(n===null)return r;const s=j(i);return C(A,{className:s?`${n.className} ${s}`:n.className,...Object.keys(n.style).length?{style:n.style}:{},attrs:n.attrs,children:r})}}export{Ft as blockSize,O as textShrinksByDefault};
|