efficient-web-builder 42.0.0 → 43.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 +164 -0
- package/dist/editor/components/AnchorField.js +1 -1
- package/dist/editor/components/DuplicatePageDialog.js +1 -1
- package/dist/editor/components/MediaUploadField.d.ts +3 -1
- package/dist/editor/components/MediaUploadField.js +1 -1
- package/dist/editor/components/PagesPanel.js +1 -1
- package/dist/editor/components/SectionEditor.d.ts +5 -1
- package/dist/editor/components/SectionEditor.js +1 -1
- package/dist/editor/components/SectionIcon.js +1 -1
- package/dist/editor/components/SectionThumbnail.js +1 -1
- package/dist/editor/components/SiteFields.d.ts +2 -1
- package/dist/editor/components/SiteFields.js +1 -1
- package/dist/editor/components/StorefrontEditor.js +1 -1
- package/dist/editor/components/StylesPanel.d.ts +3 -1
- package/dist/editor/components/StylesPanel.js +1 -1
- package/dist/editor/components/WebsiteScreenParts.js +1 -1
- package/dist/editor/components/WebsiteSettingsPanel.d.ts +6 -1
- package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
- package/dist/editor/components/useHostDocumentBridge.js +1 -1
- package/dist/editor/components/useLocationsTree.js +1 -1
- package/dist/editor/components/useSectionToBoxPass.js +1 -1
- package/dist/editor/components/useSocialSettings.d.ts +2 -2
- package/dist/editor/lib/document/ColourControl.d.ts +7 -2
- package/dist/editor/lib/document/ColourControl.js +1 -1
- package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroSlide/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Logos/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Text/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
- package/dist/editor/lib/document/canvas-typing.js +1 -1
- package/dist/editor/lib/document/consent-words-field.d.ts +6 -0
- package/dist/editor/lib/document/consent-words-field.js +1 -0
- package/dist/editor/lib/document/controls.d.ts +13 -2
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/editor/lib/document/footer-blocks.js +1 -1
- package/dist/editor/lib/document/locked-blocks.d.ts +3 -0
- package/dist/editor/lib/document/locked-blocks.js +1 -1
- package/dist/editor/lib/document/overrides.js +1 -1
- package/dist/editor/lib/document/page-root-fields.d.ts +1 -0
- package/dist/editor/lib/document/page-root-fields.js +1 -1
- package/dist/editor/lib/document/section-width-fields.js +1 -1
- package/dist/editor/lib/document/selected-host.d.ts +2 -0
- package/dist/editor/lib/document/selected-host.js +1 -0
- package/dist/editor/lib/page-copy.js +1 -1
- package/dist/editor/lib/sections/section-dry-run.d.ts +2 -9
- package/dist/editor/lib/sections/section-dry-run.js +2 -2
- package/dist/format/lib/content/authored-props.js +1 -1
- package/dist/format/lib/content/block-sources.js +1 -1
- package/dist/format/lib/content/box-layout.d.ts +1 -0
- package/dist/format/lib/content/box-layout.js +1 -1
- package/dist/format/lib/content/box-shadow.d.ts +3 -0
- package/dist/format/lib/content/box-shadow.js +1 -0
- package/dist/format/lib/content/button-icon.d.ts +2 -1
- package/dist/format/lib/content/button-icon.js +1 -1
- package/dist/format/lib/content/button-look.d.ts +46 -0
- package/dist/format/lib/content/button-look.js +1 -0
- package/dist/format/lib/content/consent-banner.d.ts +21 -0
- package/dist/format/lib/content/consent-banner.js +1 -1
- package/dist/format/lib/content/contact.js +1 -1
- package/dist/format/lib/content/footer.d.ts +10 -0
- package/dist/format/lib/content/footer.js +1 -1
- package/dist/format/lib/content/gallery-layout.d.ts +12 -0
- package/dist/format/lib/content/gallery-layout.js +1 -1
- package/dist/format/lib/content/section-padding.d.ts +10 -0
- package/dist/format/lib/content/section-padding.js +1 -1
- package/dist/format/lib/content/section-width.d.ts +0 -4
- package/dist/format/lib/content/section-width.js +1 -1
- package/dist/format/lib/document/blocks/general/Logos/meta.d.ts +6 -0
- package/dist/format/lib/document/blocks/general/Logos/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/SectionHeader/meta.js +1 -1
- package/dist/format/lib/document/box-footer.js +1 -1
- package/dist/format/lib/document/container-blocks.js +1 -1
- package/dist/format/lib/document/media-manifest.json +3 -2
- package/dist/format/lib/document/nestable-content-sections.js +1 -1
- package/dist/format/lib/document/passes/settings-groups.js +1 -1
- package/dist/format/lib/document/root-panel.d.ts +8 -0
- package/dist/format/lib/document/root-panel.js +1 -0
- package/dist/format/lib/document/section-catalog.js +1 -1
- package/dist/format/lib/document/source-bound-parts.js +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +23 -4
- package/dist/format/lib/editor-words-catalogue.js +4 -4
- package/dist/format/lib/editor-words.js +1 -1
- package/dist/format/lib/hero-texture.js +1 -1
- package/dist/format/lib/hero-video.d.ts +7 -0
- package/dist/format/lib/hero-video.js +1 -1
- package/dist/format/lib/links/page-link-rules.js +1 -1
- package/dist/format/lib/non-empty-string.d.ts +1 -0
- package/dist/format/lib/non-empty-string.js +1 -0
- package/dist/format/lib/popup/look.d.ts +1 -1
- package/dist/format/lib/popup/look.js +1 -1
- package/dist/format/lib/reel.d.ts +2 -1
- package/dist/format/lib/reel.js +1 -1
- package/dist/format/lib/sections/hero-overlay.js +1 -1
- package/dist/format/lib/sections/logo-look.d.ts +7 -0
- package/dist/format/lib/sections/logo-look.js +1 -0
- package/dist/format/lib/sections/section-head-placement.d.ts +1 -0
- package/dist/format/lib/sections/section-head-placement.js +1 -1
- package/dist/format/lib/site-theme-row.d.ts +0 -1
- package/dist/format/lib/slugify.d.ts +1 -1
- package/dist/format/lib/slugify.js +1 -1
- package/dist/format/lib/theme.d.ts +2 -1
- package/dist/format/lib/theme.js +4 -4
- package/dist/render/components/BoxTabs.d.ts +2 -1
- package/dist/render/components/BoxTabs.js +1 -1
- package/dist/render/components/Btn.d.ts +1 -0
- package/dist/render/components/Btn.js +1 -1
- package/dist/render/components/ButtonBlock.d.ts +12 -1
- package/dist/render/components/ButtonBlock.js +1 -1
- package/dist/render/components/DocBody.js +5 -5
- package/dist/render/components/Flex.d.ts +3 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/LogoBlock.d.ts +1 -1
- package/dist/render/components/LogoBlock.js +1 -1
- package/dist/render/components/LogoWallContext.d.ts +12 -0
- package/dist/render/components/LogoWallContext.js +1 -0
- package/dist/render/components/Logos.d.ts +16 -1
- package/dist/render/components/Logos.js +1 -1
- package/dist/render/components/PaymentBadges.d.ts +3 -1
- package/dist/render/components/PaymentBadges.js +1 -1
- package/dist/render/components/PreviewHeaderContext.d.ts +1 -3
- package/dist/render/components/PreviewHeaderContext.js +1 -1
- package/dist/render/components/Reel.js +1 -1
- package/dist/render/components/SiteGutterFrame.d.ts +2 -1
- package/dist/render/components/SiteGutterFrame.js +1 -1
- package/dist/render/lib/document/blocks/general/ButtonBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Logos/render.js +1 -1
- package/dist/render/lib/document/blocks/general/PaymentBadges/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +4 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.js +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-stats.d.ts +5 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-stats.js +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows.d.ts +0 -4
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/page-render.js +1 -1
- package/dist/render/lib/document/part-rows.js +1 -1
- package/dist/render/lib/document/passes/section-anchor.js +1 -1
- package/dist/render/lib/document/text-parts.js +1 -1
- package/dist/render/lib/sections/section-to-box.d.ts +2 -11
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/dist/render/lib/text-styles/site-text-styles.js +2 -2
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as U}from"react/jsx-runtime";import{createContext as jt,useCallback as e,useContext as zt,useMemo as bt,useState as W}from"react";import{EditorSiteLogoContext as Vt}from"./SiteLogoContext.js";import{useSelectHandler as Zt}from"efficient-easel/draw/client";import{IDENTITY_CARD_GAP as O,DEFAULT_HEADING_COMPRESSION as g,DEFAULT_HEADING_TYPOGRAPHY as B,DEFAULT_SIZES as M,DEFAULT_SWITCH_SHOWN as R,DEFAULT_THEME_MODE as N,DEFAULT_THEME_VALUE as Y}from"../../format/lib/theme.js";import{DEFAULT_FONTS as j}from"../../format/lib/fonts.js";const z=jt({settings:null,setSettings:()=>{},primeSettings:()=>{},websiteName:null,templateChrome:!1,templateName:null,chromePlaceholder:!1,themeMode:N,setThemeMode:()=>{},themeSwitchShown:R,setThemeSwitchShown:()=>{},theme:Y,setTheme:()=>{},fonts:j,setFonts:()=>{},sizes:M,setSizes:()=>{},cornerRadiusPx:null,setCornerRadiusPx:()=>{},cardShadow:null,setCardShadow:()=>{},shadowColor:null,setShadowColor:()=>{},cardGap:O,setCardGap:()=>{},hoverEffect:null,setHoverEffect:()=>{},headingCompression:g,setHeadingCompression:()=>{},siteWidth:null,setSiteWidth:()=>{},siteGutter:null,blockGap:null,setSiteGutter:()=>{},setBlockGap:()=>{},headingTypography:B,setHeadingTypography:()=>{},textStyles:null,setTextStyles:()=>{},wordStyles:null,heroBackgroundFollowsWidth:null,setHeroBackgroundFollowsWidth:()=>{},sectionBackgroundWidth:null,setSectionBackgroundWidth:()=>{},sectionContentWidth:null,setSectionContentWidth:()=>{},photographyGrayscale:null,setPhotographyGrayscale:()=>{},shareButtonOnPosts:null,setShareButtonOnPosts:()=>{},themeFromDocument:!1,selected:!1,setSelected:()=>{},select:()=>{},setSelectHandler:()=>{}});function Ct({children:b,websiteName:o=null,templateChrome:l=!1,templateName:n=null,chromePlaceholder:r=!1,themeMode:V=N,onThemeModeChange:c,themeSwitchShown:Z=R,onThemeSwitchShownChange:u,theme:q=Y,onThemeChange:i,fonts:J=j,onFontsChange:d,sizes:K=M,onSizesChange:S,cornerRadiusPx:Q=null,onCornerRadiusPxChange:a,cardShadow:X=null,onCardShadowChange:p,shadowColor:$=null,onShadowColorChange:E,cardGap:C=O,onCardGapChange:f,hoverEffect:tt=null,onHoverEffectChange:T,headingCompression:et=g,onHeadingCompressionChange:m,siteWidth:st=null,onSiteWidthChange:H,siteGutter:lt=null,blockGap:ot=null,onSiteGutterChange:D,onBlockGapChange:_,headingTypography:nt=B,onHeadingTypographyChange:h,textStyles:rt=null,onTextStylesChange:w,wordStyles:ct=null,heroBackgroundFollowsWidth:ut=null,onHeroBackgroundFollowsWidthChange:P,sectionBackgroundWidth:it=null,onSectionBackgroundWidthChange:x,sectionContentWidth:dt=null,onSectionContentWidthChange:A,photographyGrayscale:St=null,onPhotographyGrayscaleChange:k,shareButtonOnPosts:at=null,onShareButtonOnPostsChange:v,themeFromDocument:pt=!1}){const[s,F]=W(null),Et=e(t=>F(Yt=>Yt??t),[]),[ft,Tt]=W(!1),mt=e(t=>c?.(t),[c]),Ht=e(t=>u?.(t),[u]),Dt=e(t=>i?.(t),[i]),_t=e(t=>d?.(t),[d]),ht=e(t=>S?.(t),[S]),wt=e(t=>H?.(t),[H]),Pt=e(t=>D?.(t),[D]),xt=e(t=>_?.(t),[_]),At=e(t=>P?.(t),[P]),kt=e(t=>x?.(t),[x]),vt=e(t=>A?.(t),[A]),Ft=e(t=>k?.(t),[k]),Gt=e(t=>v?.(t),[v]),yt=e(t=>a?.(t),[a]),It=e(t=>p?.(t),[p]),Lt=e(t=>E?.(t),[E]),Ut=e(t=>f?.(t),[f]),Wt=e(t=>T?.(t),[T]),Ot=e(t=>m?.(t),[m]),gt=e(t=>h?.(t),[h]),Bt=e(t=>w?.(t),[w]),{select:Mt,setSelectHandler:Rt}=Zt(),G=s?.logoUrl,y=s?.logoReversed,I=s?.logoInkIsDark,L=s!==null,Nt=bt(()=>({logo:L?{logoUrl:G,logoReversed:y,logoInkIsDark:I}:null,placeholder:l||r,wordmark:l?n:o}),[L,G,y,I,l,r,n,o]);return U(Vt.Provider,{value:Nt,children:U(z.Provider,{value:{settings:s,setSettings:F,primeSettings:Et,websiteName:o,templateChrome:l,templateName:n,chromePlaceholder:r,themeMode:V,setThemeMode:mt,themeSwitchShown:Z,setThemeSwitchShown:Ht,theme:q,setTheme:Dt,fonts:J,setFonts:_t,sizes:K,setSizes:ht,cornerRadiusPx:Q,setCornerRadiusPx:yt,cardShadow:X,setCardShadow:It,shadowColor:$,setShadowColor:Lt,cardGap:C,setCardGap:Ut,hoverEffect:tt,setHoverEffect:Wt,headingCompression:et,setHeadingCompression:Ot,siteWidth:st,setSiteWidth:wt,siteGutter:lt,blockGap:ot,setSiteGutter:Pt,setBlockGap:xt,headingTypography:nt,setHeadingTypography:gt,textStyles:rt,setTextStyles:Bt,wordStyles:ct,heroBackgroundFollowsWidth:ut,setHeroBackgroundFollowsWidth:At,sectionBackgroundWidth:it,setSectionBackgroundWidth:kt,sectionContentWidth:dt,setSectionContentWidth:vt,photographyGrayscale:St,setPhotographyGrayscale:Ft,shareButtonOnPosts:at,setShareButtonOnPosts:Gt,themeFromDocument:pt,selected:ft,setSelected:Tt,select:Mt,setSelectHandler:Rt},children:b})})}const te=()=>zt(z);export{z as PreviewHeaderContext,Ct as PreviewHeaderProvider,te as usePreviewHeader};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as c,Fragment as s}from"react/jsx-runtime";import{normaliseReelShape as
|
|
1
|
+
"use client";import{jsx as t,jsxs as c,Fragment as s}from"react/jsx-runtime";import{normaliseReelShape as x,reelRailClass as g,reelSurfaceRailClass as u}from"../../format/lib/reel.js";function h({slides:a,active:r,shape:o,placement:e,ref:n,tone:i="media",label:m}){const l=x(o),p=i==="surface"?{"--overlay-fg":"var(--fg)","--overlay-chrome":"var(--fg)","--overlay-scrim":"var(--site-surface-2)"}:void 0;return c("aside",{ref:n,"aria-label":m??"Featured slides",className:i==="surface"?u(l):g(l,e),style:{color:"var(--overlay-fg)",...p},children:[l==="cards"&&t(b,{slides:a,active:r}),l==="dots"&&t(f,{count:a.length,active:r}),l==="numbers"&&t(v,{count:a.length,active:r}),l==="bar"&&t(N,{count:a.length,active:r}),l==="squares"&&t(y,{count:a.length,active:r}),l==="tabs"&&t($,{slides:a,active:r}),l==="largeTabs"&&t(k,{slides:a,active:r})]})}function b({slides:a,active:r}){return c(s,{children:[t("span",{className:"mb-1 font-mono text-[length:var(--size-label,10px)] uppercase tracking-[0.28em] text-overlay-chrome/55",children:"Reel · pick a slide"}),a.map((o,e)=>{const n=e===r;return c("button",{type:"button","data-idx":e,"aria-pressed":n,"aria-label":`Go to ${o.name||`slide ${e+1}`}`,className:["group flex w-[170px] cursor-pointer flex-col items-start gap-0.5 border bg-overlay-scrim/55 px-3 py-2.5 text-left transition-all motion-reduce:transition-none max-[1100px]:w-[140px]",n?"border-accent bg-overlay-scrim/70":"border-overlay-chrome/15 hover:border-overlay-chrome/45 hover:bg-overlay-scrim/70"].join(" "),children:[t("span",{className:["font-display text-[length:var(--size-body,13px)] font-medium uppercase leading-tight tracking-[-0.01em]",n?"text-accent":"text-overlay-fg"].join(" "),children:o.name||`Slide ${e+1}`}),t("span",{className:"font-mono text-[length:var(--size-label,9px)] uppercase tracking-[0.2em] text-overlay-chrome/55",children:n?"▶ Now playing":o.process||" "})]},e)})]})}function f({count:a,active:r}){return t(s,{children:Array.from({length:a},(o,e)=>t("button",{type:"button","data-idx":e,"aria-pressed":e===r,"aria-label":`Go to slide ${e+1}`,className:`h-2 cursor-pointer rounded-full transition-all motion-reduce:transition-none ${e===r?"w-5 bg-accent":"w-2 bg-overlay-chrome/45 hover:bg-overlay-chrome/70"}`},e))})}function v({count:a,active:r}){return t(s,{children:Array.from({length:a},(o,e)=>t("button",{type:"button","data-idx":e,"aria-pressed":e===r,"aria-label":`Go to slide ${e+1}`,className:`cursor-pointer font-mono text-[length:var(--size-label,11px)] leading-none tracking-[0.06em] transition-colors ${e===r?"text-overlay-fg":"text-overlay-chrome/45 hover:text-overlay-chrome/80"}`,children:String(e+1).padStart(2,"0")},e))})}function y({count:a,active:r}){return t(s,{children:Array.from({length:a},(o,e)=>t("button",{type:"button","data-idx":e,"aria-pressed":e===r,"aria-label":`Go to slide ${e+1}`,className:`grid h-8 w-8 cursor-pointer place-items-center border border-overlay-chrome/25 text-[length:var(--size-label,14px)] font-bold leading-none transition-colors motion-reduce:transition-none ${e===r?"bg-accent text-[color:var(--accent-ink)]":"bg-overlay-scrim/45 text-overlay-chrome/75 hover:text-overlay-chrome"}`,children:e+1},e))})}function N({count:a,active:r}){return t(s,{children:Array.from({length:a},(o,e)=>t("button",{type:"button","data-idx":e,"aria-pressed":e===r,"aria-label":`Go to slide ${e+1}`,className:`h-full flex-1 cursor-pointer transition-colors ${e<=r?"bg-overlay-fg":"bg-overlay-chrome/25"}`},e))})}function $({slides:a,active:r}){return t(s,{children:a.map((o,e)=>{const n=e===r;return t("button",{type:"button","data-idx":e,"aria-pressed":n,className:["flex min-w-[140px] flex-1 cursor-pointer items-end px-6 py-7 text-left transition-colors",e>0?"border-l border-overlay-chrome/15":"",n?"bg-overlay-scrim/70":"hover:bg-overlay-scrim/40"].join(" "),children:t("span",{className:["font-heading3 text-[length:var(--size-headingSmall,24px)] font-medium uppercase leading-tight tracking-[-0.02em]",n?"text-overlay-fg":"text-overlay-chrome/55"].join(" "),children:o.name})},e)})})}const d={label:"text-[length:var(--size-label,13px)]",labelUpTo720:"max-[720px]:text-[length:var(--size-label,11px)]",nameUpTo720:"max-[720px]:text-[length:var(--size-body,15px)]"};function k({slides:a,active:r}){return t(s,{children:a.map((o,e)=>{const n=e===r,i=o.name.trim().split(/\s+/),m=i.slice(0,-1).join(" "),l=i.slice(-1)[0]??"";return c("button",{type:"button","data-idx":e,"aria-pressed":n,className:["group relative grid flex-1 cursor-pointer grid-cols-[auto_1fr] items-end gap-5 px-6 py-8 text-left transition-colors",e<a.length-1?"border-r border-line":"","max-[720px]:grid-cols-[auto_1fr] max-[720px]:items-center max-[720px]:gap-2 max-[720px]:px-3 max-[720px]:py-3",n?"bg-surface":"hover:bg-fg/[0.04]"].join(" "),children:[t("span",{className:[`pb-2 font-mono ${d.label} tracking-[0.3em] max-[720px]:pb-0 ${d.labelUpTo720} max-[720px]:tracking-[0.24em]`,n?"text-accent":"text-fg-dim group-hover:text-accent"].join(" "),children:String.fromCharCode(65+e%26)}),c("span",{className:`font-heading2 text-[length:min(var(--size-headingMedium,clamp(28px,3.6vw,48px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.02em] ${d.nameUpTo720}`,children:[m?c(s,{children:[m," "]}):null,t("em",{className:"font-normal italic text-accent",children:l})]}),n&&t("span",{className:"pointer-events-none absolute inset-x-0 -bottom-px h-0.5 bg-accent"})]},e)})})}export{h as default};
|
|
@@ -3,7 +3,7 @@ import { type PadValues } from "../../format/lib/content/section-padding.js";
|
|
|
3
3
|
export declare function SplitBandAndColumn({ children }: {
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
}): import("react").JSX.Element;
|
|
6
|
-
export default function SiteGutterFrame({ contained, framedClass, fillClass, columnClass, style, tabLabel, pad, border, children, }: {
|
|
6
|
+
export default function SiteGutterFrame({ contained, framedClass, fillClass, columnClass, style, tabLabel, pad, border, outerAttrs, children, }: {
|
|
7
7
|
contained: boolean;
|
|
8
8
|
framedClass: string;
|
|
9
9
|
fillClass: string;
|
|
@@ -15,5 +15,6 @@ export default function SiteGutterFrame({ contained, framedClass, fillClass, col
|
|
|
15
15
|
frame: number;
|
|
16
16
|
};
|
|
17
17
|
border?: CSSProperties;
|
|
18
|
+
outerAttrs?: Record<string, string>;
|
|
18
19
|
children?: ReactNode;
|
|
19
20
|
}): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t}from"react/jsx-runtime";import{createContext as
|
|
1
|
+
"use client";import{jsx as t}from"react/jsx-runtime";import{createContext as h,useContext as N}from"react";import{rootPadAttrs as j,wrapperPadAttrs as I}from"../../format/lib/content/section-padding.js";import{SECTION_BORDER_CLASS as w,SECTION_BORDER_SELF_CLASS as A}from"../../format/lib/content/borders.js";import{drawsSiteGutter as G}from"../../format/lib/content/site-gutter.js";const y=h(!1),d=h(!1);function b({children:o}){return t(d.Provider,{value:!0,children:o})}function L({contained:o,framedClass:O,fillClass:x,columnClass:R,style:m,tabLabel:_,pad:e,border:s,outerAttrs:r,children:f}){const B=N(y),v=N(d),a=G(o,B),n=a&&!v,i=e&&!n?j(e.values,e.frame):null,c=s&&!n?s:null,E=[n?O:x,i?.className,c?A:null].filter(Boolean).join(" "),P=i||c?{...m,...i?.style,...c}:m,u=a?t(y.Provider,{value:!0,children:f}):f,l=e&&n?I(e.values):null,S=r&&Object.keys(r).length>0?r:null,p=t("div",{...l?null:S,className:E,style:P,"data-tab-label":_,children:v?t(d.Provider,{value:!1,children:a?t("div",{className:R,children:u}):u}):u}),C=l?t("div",{...S,className:l.className,style:l.style,children:p}):p;return s&&n?t("div",{className:w,style:{display:"contents",...s},children:C}):C}export{b as SplitBandAndColumn,L as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as c}from"react/jsx-runtime";import{CardRowValues as
|
|
1
|
+
import{jsx as c}from"react/jsx-runtime";import{CardRowValues as R}from"../../../../../components/CardRowContext.js";import O from"../../../../../components/ButtonBlock.js";import{CARD_ROW_LINK_PROP as _,namedRowField as d}from"../../../../../../format/lib/content/card-template.js";import{CTA_PH as j}from"../../../../../../format/lib/document/blocks/placeholders.js";import{phPrev as p}from"../../scaffold.js";import{ButtonBlockMeta as F}from"../../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";const D={...F,render:o=>{const{label:n,href:i,variant:m,align:s,contained:f,arrow:u,icon:b,iconPosition:w,widthFit:h,buttonColor:B,buttonTextColor:C,editor:P}=o,x=Object.fromEntries(Object.entries(o).filter(([t])=>t==="buttonFillOpacity"||t==="buttonBorder"||t.startsWith("buttonPadding"))),e=(t,r)=>c(O,{label:p(t,j.text,P)??"",href:r,variant:m,align:s,contained:f,arrow:u,icon:b,iconPosition:w,widthFit:h,buttonColor:B,buttonTextColor:C,...x}),l=d(o),a=d(o,_);return!l&&!a?e(n,i):c(R,{fields:[l,a],children:([t,r])=>e(t??n,r??i)})}};export{D as ButtonBlockRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as n}from"react/jsx-runtime";import t from"../../../../../components/Flex.js";import{sectionFillsHeight as a}from"../../../../../../format/lib/content/section-min-height.js";import{FlexMeta as i}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";const
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import t from"../../../../../components/Flex.js";import{sectionFillsHeight as a}from"../../../../../../format/lib/content/section-min-height.js";import{FlexMeta as i}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";const c={...i,render:e=>n(t,{direction:e.direction,label:e.label,tabShape:e.tabShape,gap:e.gap,justify:e.justify,align:e.align,wrap:e.wrap,share:e.share,phoneRow:e.phoneRow,blockSpacing:e.blockSpacing,bgImage:e.bgImage,bgImagePhone:e.bgImagePhone,darken:e.darken,darkenStyle:e.darkenStyle,placement:e.placement,padV2:e.padV2===!0,border:e.sectionBorder,borderPhone:e.sectionBorderPhone,padTop:e.sectionPaddingTop,padBottom:e.sectionPaddingBottom,padTopPhone:e.sectionPaddingTopPhone,padBottomPhone:e.sectionPaddingBottomPhone,padLeft:e.sectionPaddingLeft,padRight:e.sectionPaddingRight,padLeftPhone:e.sectionPaddingLeftPhone,padRightPhone:e.sectionPaddingRightPhone,contained:e.contained,fillHeight:a(e),shadow:e.shadow,content:e.content})};export{c as FlexRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as b}from"react/jsx-runtime";import j from"../../../../../components/HeroSlide.js";import{nestedAccentValue as H,sectionThemeWrap as x}from"../../../../../../format/lib/content/section-surface.js";import{phHide as A}from"../../scaffold.js";import{HeroSlideMeta as y}from"../../../../../../format/lib/document/blocks/general/HeroSlide/meta.js";import{loadingStill as C}from"../../../../../../format/lib/hero-video.js";const R={...y,render:({name:m,process:s,mediaType:e,mediaVideo:d,mediaImage:c,poster:f,loadingShows:a,videoFrame:l,mediaSrc:p,videoSpeed:t,imageFocal:u,imageFocalPhone:i,tintColor:g,overlay:S,groups:h,editor:n,...o})=>{const r=x({...o,sectionAccent:H(o.sectionAccent)});return b(j,{themeClassName:r?.className,themeStyle:r?.style,name:m||void 0,process:A(s,"Label",n),mediaType:e,mediaSrc:(e==="image"?c:d||p)||void 0,videoSpeed:typeof t=="number"?t:void 0,poster:C({loadingShows:a,poster:f,videoFrame:l}),objectPosition:e==="image"&&u||void 0,objectPositionPhone:e==="image"&&typeof i=="string"?i:void 0,tintColor:g,tintOpacity:e==="image"?S:0,groups:h,editing:n?.isEditing})}};export{R as HeroSlideRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as f}from"react/jsx-runtime";import p from"../../../../../components/Logos.js";import{phRows as L,phHide as u}from"../../scaffold.js";import{say as o}from"../../../../../../format/lib/editor-words.js";import{parseLogoLook as w}from"../../../../../../format/lib/sections/logo-look.js";import{parseSectionHeadPlacement as h}from"../../../../../../format/lib/sections/section-head-placement.js";import{LogosMeta as x}from"../../../../../../format/lib/document/blocks/general/Logos/meta.js";const y=()=>[{src:"",alt:o("Logo one")},{src:"",alt:o("Logo two")},{src:"",alt:o("Logo three")},{src:"",alt:o("Logo four")},{src:"",alt:o("Logo five")}],S={...x,render:({items:e,contained:s,heading:a,columns:n,logoHeight:m,bandPadding:d,grayscale:i,logos:g,look:c,headPlacement:l,editor:t})=>{const r=h(l)==="own-box";return f(p,{items:r?Array.isArray(e)?e:[]:L(e,y(),t),contained:s,heading:r?void 0:u(a,"Trusted by *teams worldwide*",t),columns:n,logoHeight:m,bandPadding:d,grayscale:i,logos:r?g:void 0,look:w(c),omitHead:r})}};export{S as LogosRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as
|
|
1
|
+
import{Fragment as b,jsx as t}from"react/jsx-runtime";import c from"../../../../../components/PaymentBadges.js";import{declaredBlockSource as h,sourcedRows as f}from"../../../../../../format/lib/content/block-sources.js";import{phRows as l,phHide as m}from"../../scaffold.js";import{say as a}from"../../../../../../format/lib/editor-words.js";import{PaymentBadgesMeta as y,PAYMENT_PH as u}from"../../../../../../format/lib/document/blocks/general/PaymentBadges/meta.js";const p=[{label:"Visa"},{label:"Mastercard"},{label:"Amex"},{label:"PayPal"}],k=()=>[{text:a("Secure encrypted checkout")},{text:a("30-day returns")}],A=()=>[{label:a("Cash"),kind:"cash"},{label:a("Card"),kind:"card"},{label:a("Bank transfer"),kind:"wire"}],M={...y,render:n=>{const{heading:d,badges:g,assurances:s,contained:o,editor:e}=n;if(h(n)!==""){const i=f(n,!!e?.isEditing,A()).rows.filter(r=>r.label).map(r=>({label:r.label,kind:r.kind}));return i.length?t(c,{heading:m(d,u.heading,e),badges:i,assurances:Array.isArray(s)?s:[],contained:o,sourced:!0}):t(b,{})}return t(c,{heading:m(d,u.heading,e),badges:l(g,p,e),assurances:l(s,k(),e),contained:o})}};export{M as PaymentBadgesRender};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SECTION_PAD_INNER_DEFAULTS } from "../../passes/section-padding.js";
|
|
1
2
|
import { type BoxEntry, type PartRow, type SiteWrite } from "../../../sections/section-to-box.js";
|
|
2
3
|
type Props = Record<string, unknown>;
|
|
3
4
|
export declare const TEXT: Props;
|
|
@@ -16,7 +17,9 @@ export type OwnPad = {
|
|
|
16
17
|
bottomPhone: number;
|
|
17
18
|
};
|
|
18
19
|
export declare function wrapperPad(p: Props, own: OwnPad): Props;
|
|
19
|
-
export declare const wrapperPadKeys: (own: OwnPad) => BoxEntry[];
|
|
20
|
+
export declare const wrapperPadKeys: (own: OwnPad | ((props: Props) => OwnPad)) => BoxEntry[];
|
|
21
|
+
export declare function innerPad(p: Props, type: keyof typeof SECTION_PAD_INNER_DEFAULTS): Props;
|
|
22
|
+
export declare const innerPadKeys: (type: keyof typeof SECTION_PAD_INNER_DEFAULTS) => BoxEntry[];
|
|
20
23
|
export declare const HEADING_CASE_UPPER: SiteWrite;
|
|
21
24
|
export declare const headingCaseOf: (key: string) => (node: {
|
|
22
25
|
props: Props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{NESTED_BOX_PADDING as
|
|
1
|
+
import{NESTED_BOX_PADDING as a}from"../../../../../format/lib/content/box-layout.js";import{resolveSectionPadding as r}from"../../../../../format/lib/content/section-padding.js";import{ButtonBlockMeta as p}from"../../../../../format/lib/document/blocks/general/ButtonBlock/meta.js";import{TextMeta as g}from"../../../../../format/lib/document/blocks/general/Text/meta.js";import{SECTION_PAD_INNER_DEFAULTS as P}from"../../passes/section-padding.js";import{finiteNumber as i}from"../../../../../format/lib/finite-number.js";import{hasWords as h}from"../../../sections/section-to-box.js";const{text:b,tag:N,...m}=g.defaultProps,s=m,O={...s,tone:"dim"},{label:A,href:M,...T}=p.defaultProps,I=T,c={justify:"start",align:"stretch",wrap:!1,blockSpacing:"gap",padV2:!0},k={...c,direction:"column",...a},v={...c,sectionAccent:0},C=["gridSpan","backgroundWidth","contentWidth","contentMax","widthMode","sectionHeightMode","sectionHeightValue","sectionHeightUnit","sectionHeightModePhone","sectionHeightValuePhone","sectionHeightUnitPhone","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderPhone","sectionAccent","stickTop","stickTopDistance","stickTopPhone","stickTopDistancePhone","anchor","sectionAnimation","_hidden"],H={sectionSurface:"read by nothing in src/ (searched 2026-10-24): a retired theme key that draws nothing today, so dropping it changes nothing"},R=Object.fromEntries(["sectionPaddingLeft","sectionPaddingRight","sectionPaddingLeftPhone","sectionPaddingRightPhone"].map(o=>[o,"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 x(o,t){const e=i(o.sectionPaddingTop)??0,n=i(o.sectionPaddingBottom)??0;return{sectionPaddingTop:e+t.top,sectionPaddingBottom:n+t.bottom,sectionPaddingTopPhone:(i(o.sectionPaddingTopPhone)??e)+t.topPhone,sectionPaddingBottomPhone:(i(o.sectionPaddingBottomPhone)??n)+t.bottomPhone}}const U=o=>["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopPhone","sectionPaddingBottomPhone"].map(t=>[t,t,(e,n)=>x(n,typeof o=="function"?o(n):o)[t]]);function d(o,t){const e=r(o,P[t]);return{sectionPaddingTop:e.top,sectionPaddingBottom:e.bottom}}const X=o=>[["padTop","sectionPaddingTop",(t,e)=>d(e,o).sectionPaddingTop],["padBottom","sectionPaddingBottom",(t,e)=>d(e,o).sectionPaddingBottom],["sectionPaddingTop","sectionPaddingTop",(t,e)=>d(e,o).sectionPaddingTop],["sectionPaddingBottom","sectionPaddingBottom",(t,e)=>d(e,o).sectionPaddingBottom]],f={kind:"heading-case-upper",styles:["heading-1","heading-2","heading-3"]},y=o=>t=>h(t.props[o])?[f]:[],G=(o,t)=>({kind:"text",key:o,role:"eyebrow",props:s,...t?{style:t}:{}});export{c as BOX,I as BUTTON,O as DIM,H as DROP_COMMON,R as DROP_SIDE_PADDING,f as HEADING_CASE_UPPER,k as INNER_BOX,C as SAME_KEYS,v as SECTION_BOX,s as TEXT,y as headingCaseOf,d as innerPad,X as innerPadKeys,G as smallText,x as wrapperPad,U as wrapperPadKeys};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{hasWords as t}from"../../../sections/section-to-box.js";import{DROP_COMMON as d,DROP_SIDE_PADDING as i,INNER_BOX as l,SAME_KEYS as c,SECTION_BOX as p,TEXT as n,smallText as g,wrapperPad as s,wrapperPadKeys as m}from"./section-to-box-row-parts.js";import{finiteNumber as P}from"../../../../../format/lib/finite-number.js";const h={contained:!1},b=(o,e)=>({logos:[{kind:"list",key:o,name:"Logo",flat:!0,parts:[{kind:"block",type:"LogoBlock",box:["src",[e,"alt"]],when:(S,r)=>t(r?.src)||t(r?.[e])}]}]}),a=o=>{const e=P(o.bandPadding)??40;return{top:e,bottom:e,topPhone:e,bottomPhone:e}},k={...g("heading",{color:"labels",letterSpacing:.2}),props:{...n,align:"center"}},f={name:"Logos",on:!1,boxProps:o=>({...p,direction:"column",gap:32,...s(o,a(o))}),box:[...c,...m(a),["bandPadding","sectionPaddingTop",(o,e)=>s(e,a(e)).sectionPaddingTop]],parts:[k,{kind:"core",keep:["columns","logoHeight","grayscale"],rename:{logosPerRow:"columns"},props:h,slots:b("items","alt")}],drop:{...d,...i,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)",headPlacement:"a Logos band has no split head (not in SPLITTABLE_SECTIONS): no stored node can hold one, and the converted block stores own-box"}},u={top:24,bottom:24,topPhone:24,bottomPhone:24},O={name:"Payment Methods",on:!1,boxProps:o=>({...p,direction:"column",...s(o,u)}),box:[...c,...m(u)],skip:o=>t(o.dataSource)?"its payment methods come from a data source (a venue's Setup): a sourced list needs the card template (plan §3.2), not built yet":void 0,parts:[{kind:"group",name:"Methods",props:{...l,align:"center",gap:20,sectionBorder:{top:1,bottom:1},sectionPaddingTop:32,sectionPaddingBottom:32},parts:[{...g("heading",{color:"labels"}),props:{...n,align:"center"}},{kind:"core",keep:[],as:"Logos",props:{...h,look:"cards",grayscale:!1},slots:b("badges","label")},{kind:"group",name:"Reassurance",props:{...l,direction:"row",wrap:!0,justify:"center",gap:24},parts:[{kind:"list",key:"assurances",name:"Line",flat:!0,parts:[{kind:"text",key:"text",props:{...n,align:"center"},style:{size:13,color:"labels"}}]}]}]}],drop:{...d,...i,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)",dataSource:"empty: no source, so the authored badges above are the list (a node that names a source is skipped, see `skip`)"}},L={Logos:f,PaymentBadges:O};export{L as LOGOS_SECTION_TO_BOX};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type SectionToBoxRow } from "../../../sections/section-to-box.js";
|
|
2
|
+
type Props = Record<string, unknown>;
|
|
3
|
+
export declare function figureWords(item: Props): string;
|
|
4
|
+
export declare const STATS_SECTION_TO_BOX: Readonly<Record<string, SectionToBoxRow>>;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{hasWords as l}from"../../../sections/section-to-box.js";import{DIM as g,DROP_COMMON as c,DROP_SIDE_PADDING as h,INNER_BOX as n,SAME_KEYS as u,SECTION_BOX as S,TEXT as o,headingCaseOf as w,innerPad as x,innerPadKeys as y,smallText as i}from"./section-to-box-row-parts.js";const a=e=>typeof e=="string"?e.trim():"";function p(e){const t=`${a(e.prefix)}${a(e.value)}`,s=a(e.suffix);return e.emphasizeAll===!0?t?`==_${t}_==`:"":`${t}${s?`==_${s}_==`:""}`}const r={kind:"block",type:"Text",props:{...o,_partStyles:{text:{textStyle:"heading-1",case:"none",lineHeight:.9,letterSpacing:-.04}}},box:[["value","text",(e,t)=>p(t)]],when:(e,t)=>t!==void 0&&typeof t.value=="string"&&p(t)!==""},d=e=>l(e?.supSuffix),b={name:"Stats with Text",on:!1,boxProps:e=>({...S,direction:"column",gap:60,sectionBorder:{bottom:1},...x(e,"StatsParagraph")}),box:[...u,...y("StatsParagraph")],parts:[{kind:"group",name:"Header",props:{...n,direction:"row",align:"end",justify:"between",gap:40,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:32},parts:[{kind:"group",name:"Title",props:{...n,direction:"row",align:"end",gap:40,share:"content"},parts:[i("eyebrow"),{kind:"text",key:"title",role:"heading",props:o,style:{lineHeight:1,letterSpacing:-.03}}]},{kind:"text",key:"desc",props:{...g,align:"right"},style:{textStyle:"body-1",lineHeight:1.5,width:360},was:{size:15}}]},{kind:"group",name:"Stats",props:{...n,gap:0},parts:[{kind:"list",key:"stats",name:"Stat",perRow:()=>4,rowName:"Stats row",rowProps:{...n,direction:"row",gap:0,share:"equal"},props:{...n,justify:"between",gap:12,sectionPaddingTop:48,sectionPaddingBottom:48,sectionPaddingLeft:32,sectionPaddingRight:32,sectionBorder:{top:1,right:1,bottom:1,left:1}},parts:[{...r,when:(e,t)=>!d(t)&&r.when(e,t)},{kind:"group",name:"Figure",props:{...n,direction:"row",align:"start",gap:32,share:"content"},when:(e,t)=>d(t),parts:[r,{kind:"text",key:"supSuffix",props:o,style:{textStyle:"body-5",color:"accent",letterSpacing:.18,lineHeight:1,padding:18}}]},{kind:"group",name:"Words",props:{...n,gap:4},parts:[{kind:"text",key:"label",props:o,style:{textStyle:"body-1",letterSpacing:-.01},was:{size:16}},i("sub",{color:"labels",letterSpacing:.24})]}]}]}],site:w("title"),drop:{...c,...h,background:"needs a Box fill: the old band painted this colour (the theme's section band, `var(--section-bg)`, or none) behind the head and round the cards, and a Box paints only its theme's page colour",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={StatsParagraph:b};export{k as STATS_SECTION_TO_BOX,p as figureWords};
|
|
@@ -1,7 +1,3 @@
|
|
|
1
1
|
import { type SectionToBoxRow } from "../../../sections/section-to-box.js";
|
|
2
|
-
export declare const XM_SITE: {
|
|
3
|
-
readonly schema: "xtreme_mudder";
|
|
4
|
-
readonly site: "xtreme-mudder";
|
|
5
|
-
};
|
|
6
2
|
export declare const GENERAL_SECTION_TO_BOX: Readonly<Record<string, SectionToBoxRow>>;
|
|
7
3
|
export declare function registerGeneralSectionRows(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{hasWords as f,headParts as x,registerSectionToBox as d}from"../../../sections/section-to-box.js";import{BUTTON as p,DIM as s,DROP_COMMON as i,DROP_SIDE_PADDING as l,INNER_BOX as t,SAME_KEYS as r,SECTION_BOX as a,TEXT as o,headingCaseOf as g,innerPad as y,innerPadKeys as b,smallText as n,wrapperPad as h,wrapperPadKeys as c}from"./section-to-box-row-parts.js";import{finiteNumber as B}from"../../../../../format/lib/finite-number.js";import{STATS_SECTION_TO_BOX as T}from"./section-to-box-rows-stats.js";import{LOGOS_SECTION_TO_BOX as O}from"./section-to-box-rows-logos.js";const u={top:72,bottom:72,topPhone:72,bottomPhone:72},[H,N]=x("Prose"),_={name:"Editorial Text",on:!1,boxProps:e=>({...a,direction:"column",gap:28,sectionBorder:{top:1},...h(e,u)}),box:[["topBorder","sectionBorder",e=>e===!1?void 0:{top:1}],...r,...c(u)],parts:[{kind:"group",name:"Heading",props:{...t,gap:16},parts:[{...H,props:o},{...N,props:o,style:{textStyle:"heading-3",lineHeight:1,letterSpacing:-.02}}]},{kind:"text",key:"body",props:s,style:{textStyle:"body-1",lineHeight:1.7,width:680,paragraphSpacing:18},was:{size:16}}],site:g("title"),drop:{...i,...l,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 (JJ's export, 2026-10-24)"}},E={buttonPaddingTop:20,buttonPaddingBottom:20,buttonPaddingLeft:28,buttonPaddingRight:28},k=(e,S)=>({kind:"list",key:"buttons",name:"Button",flat:!0,when:e,parts:[{kind:"button",key:"label",href:"href",variant:{key:"variant",map:{primary:"primary",outline:"ghost"},fallback:"ghost"},style:{letterSpacing:.3},props:{...p,...E,...S}}]}),m=e=>f(e.title),v={name:"Call-to-Action Heading",on:!1,boxProps:e=>({...a,direction:"row",align:"center",justify:m(e)?"between":"end",gap:60,share:"content",sectionBorder:{bottom:1},...y(e,"TitleWithButtons")}),box:[...r,...b("TitleWithButtons")],parts:[{kind:"group",name:"Title",props:t,parts:[{kind:"text",key:"title",role:"heading",props:o,style:{textStyle:"heading-1",lineHeight:.94,letterSpacing:-.035,width:1e3}}]},{kind:"group",name:"Buttons",props:{...t,gap:14},parts:[k(m,{widthFit:"fill",iconPosition:"end"}),k(e=>!m(e),{})]}],site:g("title"),drop:{...i,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 (JJ's export, 2026-10-24)"}},w={top:40,bottom:64,topPhone:24,bottomPhone:36},A={buttonFillOpacity:0,buttonBorder:{width:0},buttonPaddingTop:0,buttonPaddingRight:0,buttonPaddingBottom:0,buttonPaddingLeft:0},W={name:"Section Header",on:!1,boxProps:e=>({...a,direction:"column",gap:0,...h(e,w)}),box:[...r,"fullWidth","pageWidth",...c(w)],parts:[{kind:"group",name:"Header",props:{...t,direction:"row",align:"end",justify:"between",gap:40,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:24,sectionPaddingBottomPhone:20},parts:[{kind:"group",name:"Title",props:{...t,direction:"row",align:"end",gap:40,share:"content"},parts:[{kind:"group",name:"Number",props:{...t,align:"start",gap:12},parts:[{kind:"image",key:"logoSrc",alt:"logoAlt",props:{aspect:"auto",contained:!1}},n("num")]},{kind:"text",key:"title",role:"heading",props:o,style:{lineHeight:.95,letterSpacing:-.025}}]},{kind:"group",name:"Words",props:{...t,align:"end",gap:12},parts:[{kind:"text",key:"description",props:{...s,align:"right"},style:{textStyle:"body-5",lineHeight:1.5,width:340},was:{size:14}},{kind:"button",key:"linkText",href:"linkHref",variant:"ghost",props:{...p,align:"right",...A},style:{textStyle:"body-5",color:"labels"}}]}]}],site:g("title"),drop:{...i,...l,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 (JJ's 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"}},I={name:"Lead Text",on:!1,boxProps:e=>({...a,direction:"column",gap:40,sectionBorder:{bottom:1},...y(e,"ParagraphsA")}),box:[...r,...b("ParagraphsA")],parts:[{kind:"group",name:"Numbers",props:{...t,direction:"row",justify:"between",gap:60,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:40},parts:[n("eyebrow",{color:"labels",letterSpacing:.24}),{kind:"group",name:"Stats",props:{...t,align:"end"},parts:[{kind:"list",key:"stats",name:"Stat",props:{...t,direction:"row",share:"content",justify:"end",gap:8},parts:[n("value",{color:"text",letterSpacing:.18,lineHeight:1.8}),n("label",{color:"labels",letterSpacing:.18,lineHeight:1.8})]}]}]},{kind:"group",name:"Words",props:{...t,direction:"row",align:"end",gap:60,share:"bigLeft"},parts:[{kind:"text",key:"lead",props:o,style:{textStyle:"body-1",lineHeight:1.45,letterSpacing:-.005,width:780,paragraphSpacing:0},was:{size:22,sizePhone:20}},{kind:"group",name:"Founders",props:{...t,gap:8},parts:[{kind:"group",name:"Note",props:{...t,gap:6},parts:[{kind:"text",key:"foundersHeading",props:o,style:{textStyle:"body-1",weight:500,letterSpacing:-.01,lineHeight:1.7},was:{size:18,sizePhone:16}},{kind:"text",key:"foundersBody",props:s,style:{textStyle:"body-5",lineHeight:1.7},was:{size:14,sizePhone:12}}]},n("attribution",{letterSpacing:.24,lineHeight:1.7})]}]}],drop:{...i}},P={top:24,bottom:24,topPhone:24,bottomPhone:24},R={name:"Banner",on:!1,boxProps:e=>({...a,direction:"column",gap:0,...h(e,P)}),box:[...r,"contained",...c(P)],parts:[{kind:"group",name:"Card",keepEmpty:!0,props:{...t,gap:28,placement:"top-left",darken:60,darkenStyle:"even",sectionBorder:{width:1},sectionPaddingTop:64,sectionPaddingBottom:64,sectionPaddingTopPhone:40,sectionPaddingBottomPhone:40,sectionPaddingLeft:40,sectionPaddingRight:40,sectionPaddingLeftPhone:24,sectionPaddingRightPhone:24},box:[["imageSrc","bgImage"],["overlay","darken",e=>Math.min(Math.max(B(e)??60,0),100)]],parts:[{kind:"group",name:"Words",props:{...t,gap:20},parts:[n("eyebrow"),{kind:"text",key:"title",role:"heading",props:o,style:{weight:500,lineHeight:1.05,letterSpacing:-.03,case:"none",width:680}},{kind:"text",key:"body",props:s,style:{textStyle:"body-1",lineHeight:1.6,width:680},was:{size:16}}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:p}]}],drop:{...i,...l}},z={Prose:_,TitleWithButtons:v,SectionHeader:W,ParagraphsA:I,Banner:R};function X(){d(z),d(T),d(O)}export{z as GENERAL_SECTION_TO_BOX,X as registerGeneralSectionRows};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t}from"react/jsx-runtime";import{Render as m}from"efficient-easel/render";import{capHeroGroups as a}from"../../../format/lib/document/cap-hero-groups.js";import{oneH1 as i}from"../../../format/lib/document/one-h1.js";import{migrateLegacyPageData as n}from"./migrate-legacy.js";import{migrateRenamedProps as p}from"../../../format/lib/document/renamed-props.js";import{convertSectionsInPage as f
|
|
1
|
+
"use client";import{jsx as t}from"react/jsx-runtime";import{Render as m}from"efficient-easel/render";import{capHeroGroups as a}from"../../../format/lib/document/cap-hero-groups.js";import{oneH1 as i}from"../../../format/lib/document/one-h1.js";import{migrateLegacyPageData as n}from"./migrate-legacy.js";import{migrateRenamedProps as p}from"../../../format/lib/document/renamed-props.js";import{convertSectionsInPage as f}from"../sections/section-to-box.js";import{registerGeneralSectionRows as s}from"./blocks/general/section-to-box-rows.js";function c({config:r,data:e,metadata:o}){return s(),t(m,{config:r,metadata:o,data:i(a(f(p(n(e)))))})}export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{TEXT_FIELD_MARKER as x}from"efficient-easel/draw";import{partText as
|
|
1
|
+
import{TEXT_FIELD_MARKER as x}from"efficient-easel/draw";import{partText as p,partValueWithText as y,typeInPlaceKind as d}from"./part-text.js";import{nonEmptyString as l}from"../../../format/lib/non-empty-string.js";import{decodePartKey as L,encodePartKey as W}from"../../../format/lib/document/part-key.js";function s(t){if(!(!t||typeof t!="object"))return t[x]}function h(t){if(!t||typeof t!="object")return null;const r=t.arrayFields;return r&&typeof r=="object"?r:null}function T(t,r){if(!Array.isArray(r))return[];const e=s(t),i=[];if(e?.control==="textList"){const n=e.itemKey??"text";return r.forEach((u,a)=>{const c=l(u?.[n]);c&&i.push({row:{index:a,rowKey:n},text:c})}),i}const o=h(t);return o?(r.forEach((n,u)=>{for(const[a,c]of Object.entries(o)){if(!d(c))continue;const f=p(n?.[a])||s(c)?.placeholder||"";f&&i.push({row:{index:u,rowKey:a},text:f})}}),i):[]}function m(t,r){if(Array.isArray(t))return t[r.index]?.[r.rowKey]}function w(t,r,e,i){const o=t[r];return!Array.isArray(o)||e.index<0||e.index>=o.length?null:{...t,[r]:o.map((n,u)=>u===e.index?{...n,[e.rowKey]:i}:n)}}function F(t,r,e,i,o){const n=m(t[r],e);return p(n)===o?null:w(t,r,e,y(i,n,o))}function P(t,r){return r?`${t} · row ${r.index+1}`:t}export{h as arrayFieldsOf,L as decodePartKey,W as encodePartKey,F as partPropsWithRowText,w as partPropsWithRowValue,P as partRowHeadLabel,T as partRowTexts,m as partRowValue,s as textMeta};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as s,Fragment as
|
|
1
|
+
import{jsx as s,Fragment as o,jsxs as t}from"react/jsx-runtime";import{slugify as a}from"efficient-shell/format";function c({anchor:n}){const e=a(typeof n=="string"?n:"");return e?s("span",{id:e,className:"sf-section-anchor","aria-hidden":"true"}):null}const f={name:"sectionAnchor",applies:(n,e,r)=>e.isSection(n)&&!!r&&typeof r.render=="function",panel(n,e,r){const i=r.anchorFields;n.fields={...n.fields,...i()}},draw(n){n.defaultProps={...n.defaultProps,anchor:""};const e=n.render;n.render=r=>t(o,{children:[s(c,{anchor:r.anchor}),e(r)]})}};export{f as sectionAnchor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{decodePartId as m,encodePartId as P}from"efficient-easel/draw";import{stripMarkup as R}from"../../../format/lib/markup.js";import{LINK_FIELD_MARKER as A,SCAFFOLD_FIELD_MARKER as y,TEXT_FIELD_MARKER as u}from"efficient-easel/draw";import{readHidable as _}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as g}from"efficient-easel/draw";import{isStructuralTextProp as b}from"../../../format/lib/document/neutralization-contracts.js";import{fieldInOwnBox as L}from"../../../format/lib/document/own-box.js";import{partRowTexts as
|
|
1
|
+
import{decodePartId as m,encodePartId as P}from"efficient-easel/draw";import{stripMarkup as R}from"../../../format/lib/markup.js";import{LINK_FIELD_MARKER as A,SCAFFOLD_FIELD_MARKER as y,TEXT_FIELD_MARKER as u}from"efficient-easel/draw";import{readHidable as _}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as g}from"efficient-easel/draw";import{isStructuralTextProp as b}from"../../../format/lib/document/neutralization-contracts.js";import{fieldInOwnBox as L}from"../../../format/lib/document/own-box.js";import{partRowTexts as S}from"./part-rows.js";import{nonEmptyString as I}from"../../../format/lib/non-empty-string.js";const W="data-sf-part",$="data-sf-region-part",G="data-sf-part-row";function q(e,t){return`${e}[${t}]`}const J="data-sf-part-selected",Q="data-sf-part-kind",j="data-sf-part-style-owner",N="data-sf-part-style-kind";function U(e){for(let t=e;t;t=t.parentElement){const r=t.getAttribute(j),n=t.getAttribute(N);if(r&&n)return{owner:r,kind:n};if(t.getAttribute("data-easel-block"))return null}return null}const h=2;function V(e,t){if(!e)return!1;const r=m(e);return!!r?.propKey&&r.nodeId===t}function E(e){return R(e).replace(/\s+/gu,"")}function l(e,t,r){const n=e[u];if(n){if(n.control==="textList"){const o=n.itemKey??"text";if(!Array.isArray(t))return;for(const i of t){const c=i?.[o];typeof c=="string"&&r.push(c)}return}const{text:s}=_(t);s?r.push(s):n.placeholder&&r.push(n.placeholder);return}if(!e[A]){if(e.type==="text"||e.type==="textarea"){const s=I(t);s&&r.push(s);return}if(e.arrayFields&&Array.isArray(t)){for(const s of t)for(const[o,i]of Object.entries(e.arrayFields))l(i,s?.[o],r);return}if(e.objectFields&&t&&typeof t=="object")for(const[s,o]of Object.entries(e.objectFields))l(o,t[s],r)}}function Z(e){if(!e||typeof e!="object")return!1;const t=e;return t[A]?!1:!!t[u]||t.type==="text"||t.type==="textarea"}function w(e,t){const r=e[u];return r?.label?r.label:typeof e.label=="string"?e.label:t}function F(e){const t=e.indexOf(" (");return(t>0?e.slice(0,t):e).trim()}function v(e,t){if(!e)return[];const r=[];for(const[n,s]of Object.entries(e)){if(!s||typeof s!="object"||b(n))continue;const o=s,i=[];l(o,t?.[n],i),!i.length&&o[y]!==void 0&&l(o,o[y],i);const c=w(o,n),a=new Set;for(const{row:T,text:f}of S(o,t?.[n])){const d=E(f);d.length<h||(a.add(d),r.push({key:n,label:c,texts:[d],row:T}))}const p=new Set(a),x=[];for(const T of i){const f=E(T);f.length<h||p.has(f)||(p.add(f),x.push(f))}x.length&&r.push({key:n,label:c,texts:x})}return r}const K=g;function O(e,t){if(!t||typeof t!="object"||b(e)||L(t))return null;const r=t[u];return!r||!K.includes(r.control)?null:r}function tt(e,t){const r=O(e,t);return r!==null&&r.identifier!==!0}function et(e,t){if(!e)return[];const r=[];for(const[n,s]of Object.entries(e)){const o=O(n,s);if(!o)continue;const{text:i,hidden:c}=_(t?.[n]),a=i||o.placeholder||"",p=R(a).replace(/\s+/gu," ").trim();r.push({key:n,label:F(w(s,n)),preview:p,offPage:o.offPage===!0,identifier:o.identifier===!0,hidden:!!c})}return r}export{W as PART_ATTR,Q as PART_KIND_ATTR,G as PART_ROW_ATTR,J as PART_SELECTED_ATTR,N as PART_STYLE_KIND_ATTR,j as PART_STYLE_OWNER_ATTR,$ as REGION_PART_ATTR,m as decodePartId,P as encodePartId,q as encodePartRow,O as entryPartMetaOf,tt as fieldDrawsEntryRow,Z as holdsAuthoredText,E as normalizePartText,F as partHeadLabel,w as partLabel,v as partNeedles,V as partOpenOn,U as partStyleOwnerOf,et as sectionTextParts};
|
|
@@ -18,11 +18,6 @@ export type HeadingStyleId = "heading-1" | "heading-2" | "heading-3";
|
|
|
18
18
|
export type SiteWrite = {
|
|
19
19
|
kind: "heading-case-upper";
|
|
20
20
|
styles: readonly HeadingStyleId[];
|
|
21
|
-
} | {
|
|
22
|
-
kind: "add-theme-preset";
|
|
23
|
-
copyOf: number;
|
|
24
|
-
set: Readonly<Record<string, string>>;
|
|
25
|
-
reason: string;
|
|
26
21
|
};
|
|
27
22
|
export type SiteFacts = {
|
|
28
23
|
schema: string;
|
|
@@ -30,16 +25,12 @@ export type SiteFacts = {
|
|
|
30
25
|
headingCase: string | null;
|
|
31
26
|
textStyles: boolean | null;
|
|
32
27
|
textStylesList?: readonly StoredTextStyle[] | null;
|
|
33
|
-
themePresets: number | null;
|
|
34
28
|
ownThemeRow?: boolean | null;
|
|
35
29
|
deleted?: boolean;
|
|
36
30
|
};
|
|
37
31
|
export type ConvertContext = {
|
|
38
32
|
site?: SiteFacts;
|
|
39
|
-
cardTheme?: number;
|
|
40
33
|
};
|
|
41
|
-
export type PageConvertContext = Pick<ConvertContext, "cardTheme">;
|
|
42
|
-
export declare function pageConvertContextOf(metadata: Readonly<Record<string, unknown>> | undefined): PageConvertContext;
|
|
43
34
|
export type Restyled = {
|
|
44
35
|
key: string;
|
|
45
36
|
was: {
|
|
@@ -166,11 +157,11 @@ export declare const hasWords: (v: unknown) => boolean;
|
|
|
166
157
|
export declare function convertSection(node: SectionNode, row: SectionToBoxRow, ctx?: ConvertContext): SectionConversion;
|
|
167
158
|
export declare function convertSectionsInPage<D extends {
|
|
168
159
|
content?: unknown;
|
|
169
|
-
}>(data: D
|
|
160
|
+
}>(data: D): D;
|
|
170
161
|
export type SectionToBoxEdit = {
|
|
171
162
|
index: number;
|
|
172
163
|
node: SectionNode;
|
|
173
164
|
nodes: SectionNode[];
|
|
174
165
|
};
|
|
175
|
-
export declare function sectionToBoxEdits(content: unknown
|
|
166
|
+
export declare function sectionToBoxEdits(content: unknown): SectionToBoxEdit[];
|
|
176
167
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{readHidable as
|
|
1
|
+
import{readHidable as X}from"efficient-easel/draw";import{BOX_TYPE as K,CONTAINER_BLOCKS_SLOT as V}from"../../../format/lib/document/container-blocks.js";import{headingTextSeed as Y,labelTextSeed as D}from"../../../format/lib/document/text-seeds.js";import{SPLITTABLE_SECTIONS as F}from"../../../format/lib/sections/section-head-placement.js";import{finiteNumber as _}from"../../../format/lib/finite-number.js";const E=K,v=V;function G(e,r){return r===0?`${e}~box`:`${e}~box-${r+1}`}const P={Flex:"the Box itself",Hero:"its slides hold Boxes of real blocks (Hero › Slide › Box)",Divider:"one block with no text, picture or button",CustomHTML:"the HTML box is the whole section; it has no parts"};function st(e){for(const[r,i]of Object.entries(e)){if(r in P&&P[r]!==i)throw new Error(`lib/sections/section-to-box: "${r}" is already Box-native`);P[r]=i}}function rt(e){return P[e]}const q=new Set(["id"]),$={};function it(e){for(const[r,i]of Object.entries(e)){if(r in $&&$[r]!==i)throw new Error(`lib/sections/section-to-box: "${r}" already has a row`);$[r]=i}}function ct(e){return $[e]}function at(){return Object.keys($)}function ft(e){return $[e]?.on===!0}function dt(e){const r=F[e];if(!r)throw new Error(`lib/sections/section-to-box: "${e}" has no head row in SPLITTABLE_SECTIONS`);const i=[{kind:"text",key:r.num,role:"eyebrow"},{kind:"text",key:r.title,role:"heading"}];return r.description&&i.push({kind:"text",key:r.description,role:"body"}),r.headRows.includes("linkText")&&r.headRows.includes("linkHref")&&i.push({kind:"button",key:"linkText",href:"linkHref"}),i}const j=e=>X(e),pt=e=>j(e).text.trim()!=="",J=e=>e==="heading"?Y():e==="eyebrow"?D():{};function Q(e,r,i){const p={...e._partStyles?.text??{},...r??{},...i??{}};return Object.keys(p).length?{_partStyles:{text:p}}:{}}function U(e,r){if(e===void 0)return{};if(typeof e=="string")return{variant:e};const i=r[e.key];return{variant:typeof i=="string"&&Object.hasOwn(e.map,i)?e.map[i]:e.fallback}}function z(e,r,i,d){const p={...r};for(const h of e){const[b,S,O]=typeof h=="string"?[h,h,void 0]:h;if(i[b]===void 0)continue;const B=O?O(i[b],i):i[b];B===void 0?delete p[S]:p[S]=B,d(b,S,B===void 0)}return p}function C(e,r,i={}){const d=e.props,p=r.skip?.(d);if(p!==void 0)return{node:e,nodes:[e],carried:[],dropped:[],siteWrites:[],restyled:[],skipped:p};const h=String(d.id??e.type),b=[],S=[],O=[],B=new Set,I=(o,n)=>{b.push({key:o,home:n}),B.add(o)},H=d._partStyles??{};let M=0;const w=(o,n)=>({type:o,props:{...n,id:`${h}~${o}-${++M}`}}),N=(o,n,u,f,y,a,k)=>{if(y){for(const s of o??[]){const c=typeof s=="string"?s:s[0];u[c]!==void 0&&k(c,`nothing — the ${f} has no parts, so it is not drawn`)}return}const t=typeof n=="function"?n(d,i):n??{};return z(o??[],t,u,(s,c,l)=>k(s,l?`nothing — the old value draws nothing (${f}: no ${c})`:`${a}${f}: ${c}`))},A=o=>o.map(n=>{const u={...n.props??{}};for(const[f,y]of Object.entries(n.slots??{}))u[f]=A(y);return w(n.type,u)}),L=(o,n,u)=>{const f=Array.isArray(n[o.key])?n[o.key]:[],y=f.map((s,c)=>{const l=s??{},x=o.item?.(l,c,d)??{},m=T(x.reverse?[...o.parts].reverse():o.parts,l,!1,`item ${c+1}: `);return o.flat?x.props?m.map(g=>({...g,props:{...g.props,...x.props,id:g.props.id}})):m:[w(E,{name:`${o.name} ${c+1}`,...o.props??{},...x.props??{},[v]:m})]}),a=o.perRow?.(d),k=o.perRow?Number.isInteger(a)&&a>=1?a:1:0;if(u(o.key,(f.length?o.flat?`each item's parts (${f.length} items), in order`:`one Box per item (${f.length}), its parts inside`:"nothing — the list is empty")+(k&&f.length?`, in rows of ${k}`:"")),!k)return y.flat();const t=[];for(let s=0;s*k<y.length;s++)t.push(w(E,{name:`${o.rowName??`${o.name} row`} ${s+1}`,...o.rowProps??{},[v]:y.slice(s*k,(s+1)*k).flat()}));return t},T=(o,n,u,f)=>{const y=[],a=(t,s)=>u?I(t,s):void 0,k=t=>u?H[t]:void 0;for(const t of o)if(!(t.when&&!t.when(d,u?void 0:n)))switch(t.kind){case"text":{const s=j(n[t.key]);if(!s.text.trim()){a(t.key,"nothing — empty words draw nothing, so no block");break}const c=J(t.role??"body"),{_partStyles:l,...x}=c,m=Q(c,t.style,k(t.key));if(t.was&&u){const g=m._partStyles?.text??{};O.push({key:t.key,was:t.was,...typeof g.textStyle=="string"?{textStyle:g.textStyle}:{},..._(g.size)!==void 0?{size:_(g.size)}:{},..._(g.sizePhone)!==void 0?{sizePhone:_(g.sizePhone)}:{}})}y.push(w("Text",{text:s.text,...x,...t.props??{},...m,...s.hidden?{_hidden:!0}:{}})),a(t.key,`${f}Text block: its words${s.hidden?", hidden":""}`);break}case"button":{const s=j(n[t.key]);if(!s.text.trim()){a(t.key,"nothing — no words, no button"),a(t.href,"nothing — no button to link"),typeof t.variant=="object"&&a(t.variant.key,"nothing — no button to style");break}const c=typeof n[t.href]=="string"&&n[t.href]?n[t.href]:"#",l={...t.style??{},...k(t.key)??{}};y.push(w("ButtonBlock",{label:s.text,href:c,...t.props??{},...U(t.variant,n),...Object.keys(l).length?{_partStyles:{label:l}}:{},...s.hidden?{_hidden:!0}:{}})),a(t.key,`${f}Button block: its words`),a(t.href,`${f}Button block: its link`),typeof t.variant=="object"&&a(t.variant.key,`${f}Button block: its Style`);break}case"image":{const s=n[t.key];if(typeof s!="string"||!s){a(t.key,"nothing — no picture, no block"),t.alt&&a(t.alt,"nothing — no picture to describe");break}const c=t.alt&&typeof n[t.alt]=="string"?n[t.alt]:"";y.push(w("ImageBlock",{src:s,alt:c,...t.props??{}})),a(t.key,`${f}Image block: its picture`),t.alt&&a(t.alt,`${f}Image block: its alt text`);break}case"list":{y.push(...L(t,n,a));break}case"group":{const s=T(t.parts,n,u,f),c=N(t.box,t.props,n,`${t.name} Box`,!s.length&&!t.keepEmpty,f,a);c&&y.push(w(E,{name:t.name,...c,[v]:s}));break}case"block":{const s=t.parts?T(t.parts,n,u,f):[],c=N(t.box,t.props,n,`${t.type} block`,!!t.parts&&!s.length&&!t.keepEmpty,f,a);c&&y.push(w(t.type,{...c,...t.slot?{[t.slot]:s}:{}}));break}case"core":{const s=t.as??e.type,c={headPlacement:"own-box",...t.props??{}};for(const l of t.keep)n[l]!==void 0&&(c[l]=n[l],a(l,`the ${s} block inside the Box`));for(const[l,x]of Object.entries(t.rename??{}))n[l]!==void 0&&(c[x]=n[l],a(l,`the ${s} block inside the Box: ${x}`));for(const[l,x]of Object.entries(t.slots??{}))c[l]=x.flatMap(m=>"kind"in m?L(m,n,a):A([m]));y.push(w(s,c));break}}return y},W=(o,n)=>{const u=n===0?"Box":`${o.name} Box`,f=T(o.parts,d,!0,n===0?"":`${u}: `),y=typeof o.boxProps=="function"?o.boxProps(d,i):o.boxProps??{},a=z(o.box??[],y,d,(k,t,s)=>I(k,s?`nothing — the old value draws nothing (${u}: no ${t})`:`${u}: ${t}`));return{type:E,props:{name:o.name,...a,[v]:f,id:G(h,n)}}},R=[r,...r.also??[]].map(W);d._partStyles!==void 0&&I("_partStyles","each old part's style moved to its new part");for(const[o,n]of Object.entries(r.drop??{}))o in d&&(S.push({key:o,why:n}),B.add(o));for(const o of Object.keys(d))q.has(o)||B.has(o)||S.push({key:o,why:"not in the row — not carried"});return{node:R[0],nodes:R,carried:b,dropped:S,siteWrites:[...r.site?.(e,i)??[]],restyled:O}}function lt(e){const r=e.content;if(!Array.isArray(r))return e;let i=!1;const d=r.flatMap(p=>{const h=p&&typeof p.type=="string"?$[p.type]:void 0;if(!h?.on)return[p];const b=C(p,h);return b.skipped!==void 0?[p]:(i=!0,b.nodes)});return i?{...e,content:d}:e}function ut(e){if(!Array.isArray(e))return[];const r=[];return e.forEach((i,d)=>{const p=i&&typeof i.type=="string"?$[i.type]:void 0;if(!p?.on)return;const h=C(i,p);h.skipped===void 0&&r.push({index:d,node:h.node,nodes:h.nodes})}),r}export{v as SECTION_BOX_SLOT,E as SECTION_BOX_TYPE,rt as boxNativeReason,C as convertSection,lt as convertSectionsInPage,ft as convertsToBox,pt as hasWords,dt as headParts,st as registerBoxNativeSections,it as registerSectionToBox,G as sectionBoxIdOf,ut as sectionToBoxEdits,ct as sectionToBoxRow,at as sectionToBoxTypes};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{defaultTextStyles as
|
|
2
|
-
`)}const te={"heading-1":"headingLarge","heading-2":"headingMedium","heading-3":"headingSmall","body-1":"body","body-5":"label"};function
|
|
1
|
+
import{defaultTextStyles as N,textStyleCaseCss as X}from"efficient-easel/text-styles/model";import{FONT_OPTIONS as Y,normalizeFonts as I}from"../../../format/lib/fonts.js";import{PART_PHONE_MAX_CSS as G,STYLE_ID_OF_ROLE as U,TEXT_STYLE_ATTR as Z,partSpacingOf as q}from"../document/part-styles.js";import{faceClassOf as L}from"../../../format/lib/text-style-face.js";import{compressionMetrics as B,headingTypographyFromRow as K,normalizeHeadingCompression as k,normalizeSizes as j}from"../../../format/lib/theme.js";import{finiteNumber as m}from"../../../format/lib/finite-number.js";import{nonEmptyString as _}from"../../../format/lib/non-empty-string.js";const T=e=>e==="sentence"?"none":void 0,F=["font","color","size","sizePhone","weight","italic","lineHeight","letterSpacing","paragraphSpacing","letterCase","largestSize"];function p(e){const i={};for(const n of F)e[n]!==void 0&&(i[n]=e[n]);return i}function H(e,i){const{auto:n,...t}=e,o=new Set(i??[]),r=F.filter(a=>o.has(a)&&e.values[a]===void 0);return r.length?{...t,auto:r}:t}function R(e){const i=e.fonts,n=e.sizes,t=e.typography,o=B(e.compression),r={"heading-1":{font:_(i.heading),size:m(n.headingLarge),weight:m(t.weight),lineHeight:o.lineHeight,letterSpacing:o.letterSpacing,letterCase:T(t.case),largestSize:m(t.maxPx)},"heading-2":{font:_(i.heading2),size:m(n.headingMedium),weight:m(t.weight2),lineHeight:o.lineHeight,letterSpacing:o.letterSpacing,letterCase:T(t.case2)},"heading-3":{font:_(i.heading3),size:m(n.headingSmall),weight:m(t.weight3),lineHeight:o.lineHeight,letterSpacing:o.letterSpacing,letterCase:T(t.case3)},"body-1":{font:_(i.body),size:m(n.body)},"body-5":{font:_(i.label),size:m(n.label)}};return N().map(({id:a,kind:l,name:d})=>({id:a,kind:l,name:d,values:p(r[a]??{})}))}function C(e){return Array.isArray(e)&&e.every(n=>n&&typeof n=="object"&&typeof n.id=="string"&&(n.kind==="heading"||n.kind==="body")&&typeof n.name=="string")?e.map(n=>H({...n,values:p(n.values??{})},Array.isArray(n.auto)?n.auto:void 0)):null}function fe(e){return C(e)??[]}function M(e){return C(e)??N().map(({id:i,kind:n,name:t})=>({id:i,kind:n,name:t,values:{}}))}function O(e,i){const n=R(i),t=C(e);return t?t.map(o=>{const r={...w(n,o.id)};for(const a of o.auto??[])delete r[a];return{...o,values:p({...r,...o.values})}}):n}const w=(e,i)=>e.find(n=>n.id===i)?.values??{},V=["heading-1","heading-2","heading-3"];function ge({saved:e,old:i,cur:n,next:t,sizeOf:o}){const r=R(i),a=M(e),l=O(a,i),d=[],S=t.map(s=>{const c=n.find(f=>f.id===s.id),b=a.find(f=>f.id===s.id);if(!c||!b)return Q([s],o)[0];const u={...b.values},z=new Set(b.auto??[]),v=s.values,P=c.values,A=[...new Set([...Object.keys(v),...Object.keys(P)])].filter(f=>JSON.stringify(v[f])!==JSON.stringify(P[f]));A.sort((f,y)=>+(f==="letterSpacing")-+(y==="letterSpacing"));for(const f of A){const y=f==="lineSpacing"?"lineHeight":f,$=v[f];if($===void 0){delete u[y],w(r,s.id)[y]!==void 0&&(d.push([s.id,y]),z.add(y));continue}if(z.delete(y),f==="lineSpacing")u.lineHeight=x($/100,3);else if(f==="letterSpacing"){const J=l.find(W=>W.id===s.id),E=o({...s,values:p({...J?.values??{},...u})});u.letterSpacing=E?x($/E,4):0}else u[y]=$}return H({id:s.id,kind:s.kind,name:s.name,values:p(u)},z)});let g=i.compression;if(d.some(([s,c])=>(c==="lineHeight"||c==="letterSpacing")&&V.includes(s))&&k(g)!=="normal"){for(const s of V){const c=S.find(u=>u.id===s);if(!c)continue;const b={...c.values};for(const u of["lineHeight","letterSpacing"])d.some(([z,v])=>z===s&&v===u)||b[u]===void 0&&!(c.auto??[]).includes(u)&&(b[u]=w(r,s)[u]);c.values=p(b)}g="normal"}return{saved:S,old:{...i,compression:g}}}function pe(e,i){const n={text_styles:e.saved};return e.old.compression!==i.compression&&(n.heading_compression=k(e.old.compression)),n}const x=(e,i)=>Number(e.toFixed(i));function he(e,i){return e.map(n=>{const{lineHeight:t,letterSpacing:o,...r}=n.values,a={...r};return t!==void 0&&(a.lineSpacing=x(t*100,1)),o!==void 0&&(a.letterSpacing=x(o*i(n),2)),{id:n.id,kind:n.kind,name:n.name,values:a}})}function Q(e,i){return e.map(n=>{const{lineSpacing:t,letterSpacing:o,...r}=n.values,a={id:n.id,kind:n.kind,name:n.name,values:p({...r})},l={...a.values};if(t!==void 0&&(l.lineHeight=x(t/100,3)),o!==void 0){const d=i({...a,values:{...a.values}});l.letterSpacing=d?x(o/d,4):0}return{...a,values:p(l)}})}function me(e){const i={fonts:I({heading:e.heading_font??void 0,heading2:e.heading_2_font??void 0,heading3:e.heading_3_font??void 0,body:e.body_font??void 0,accent:e.accent_font??void 0,label:e.label_font??void 0}),sizes:j({headingLarge:e.heading_size_large_px,headingMedium:e.heading_size_medium_px,headingSmall:e.heading_size_small_px,accent:e.accent_size_px,body:e.body_size_px,label:e.label_size_px}),compression:k(e.heading_compression),typography:K(e)},n=e.text_styles??null,t=Array.isArray(n)?D(O(n,i),i):i;return{fonts:I(t.fonts),sizes:j(t.sizes),compression:k(t.compression),typography:t.typography,textStyles:n}}function D(e,i){const n=s=>e.find(c=>c.id===s)?.values??{},t=n("heading-1"),o=n("heading-2"),r=n("heading-3"),a=n("body-1"),l=n("body-5"),d=i.fonts,S=i.sizes,g=i.typography,h=s=>s==="none"?"sentence":"authored";return{fonts:{...d,heading:t.font??d.heading,heading2:o.font??t.font??d.heading2,heading3:r.font??t.font??d.heading3,body:a.font??d.body,label:l.font??d.label},sizes:{...S,headingLarge:t.size??null,headingMedium:o.size??null,headingSmall:r.size??null,body:a.size??null,label:l.size??null},compression:i.compression,typography:{...g,case:h(t.letterCase),weight:t.weight??null,maxPx:t.largestSize??null,weight2:o.weight??null,weight3:r.weight??null,case2:h(o.letterCase),case3:h(r.letterCase)}}}function ye(e){const i=C(e.textStyles);if(!i||i.every(o=>Object.keys(o.values).length===0&&!o.auto))return e;const n={fonts:e.fonts??{},sizes:e.sizes??{},compression:String(e.headingCompression??"normal"),typography:e.headingTypography??{}},t=D(O(i,n),n);return{...e,fonts:t.fonts,sizes:t.sizes,headingCompression:t.compression,headingTypography:t.typography}}function ee(e){return e==="accent"?"var(--accent)":e==="text"?"var(--fg)":e==="labels"?"var(--fg-dim)":/^#[0-9a-f]{6}$/i.test(e)?e:null}function ne(e){const i=":is([data-sf-bullet], [data-sf-number])";return[`${e} br:not(br + br) { display: block; content: ""; margin-top: var(--sf-part-para) }`,`${e} ${i}:not(:first-child) { margin-top: var(--sf-part-para) }`,`${e} ${i}:not(:last-child) { margin-bottom: var(--sf-part-para) }`]}function Se(e){const i=[];for(const n of e){const t=n.values,o=`.${L(n)}`,r=`[${Z}="${n.id}"]`,a=`${o}, ${r}`,l=[],d=t.font!==void 0?Y.find(s=>s.key===t.font)?.cssVar:void 0;if(d&&l.push(`font-family: var(${d})`),t.size!==void 0){const s=t.largestSize!==void 0?Math.min(t.size,t.largestSize):t.size;l.push(`font-size: ${s}px`)}const S=t.color!==void 0?ee(t.color):null;S&&l.push(`color: ${S}`),t.italic===!0&&l.push("font-style: italic"),t.weight!==void 0&&l.push(`font-weight: ${t.weight}`);const g=[];t.lineHeight!==void 0&&g.push(`line-height: ${t.lineHeight}`),t.letterSpacing!==void 0&&g.push(`letter-spacing: ${t.letterSpacing}em`),n.kind==="body"&&l.push(...g);const h=X(t.letterCase);if(h&&n.kind==="body"&&l.push(`text-transform: ${h}`),t.paragraphSpacing&&l.push(`--sf-part-para: ${t.paragraphSpacing}px`),l.length&&i.push(`${a} { ${l.join("; ")} }`),n.kind==="heading"&&g.length&&i.push(`${a}, ${o}:is(h1, h2, h3, h4), ${r}:is(h1, h2, h3, h4) { ${g.join("; ")} }`),n.kind==="heading"&&h&&i.push(`${r}, ${o}:is(h1, h2, h3, h4) { text-transform: ${h} }`),t.paragraphSpacing&&i.push(...ne(`:is(${a})`)),t.sizePhone!==void 0){const s=te[n.id],c=[`${a} { font-size: ${t.sizePhone}px }`];s&&c.push(`.sf-themed-content { --size-${s}: ${t.sizePhone}px !important }`),i.push(`@media ${G} { ${c.join(" ")} }`)}}return i.join(`
|
|
2
|
+
`)}const te={"heading-1":"headingLarge","heading-2":"headingMedium","heading-3":"headingSmall","body-1":"body","body-5":"label"};function be(e){return e!==!0&&e!==!1?"":`em.text-accent { font-style: ${e?"italic":"normal"} }`}function xe(e){return e?U[e]:void 0}function ie(e){const i=q(e);return p({font:e.font,color:e.color,size:e.size,weight:e.weight,italic:e.italic,lineHeight:i.lineHeight,letterSpacing:i.letterSpacingEm,paragraphSpacing:e.paragraphSpacing,letterCase:e.case})}function ze(e){return Object.keys(ie(e)).length>0}function ve({saved:e,old:i,styleId:n,values:t}){const o=M(e);return{saved:oe(o,n,t),old:i}}function oe(e,i,n){return e.map(t=>t.id===i?H({...t,values:p({...t.values,...n})},t.auto):t)}function _e(e){const i=e.filter(n=>n.kind==="body").map(n=>Number(/^body-(\d+)$/.exec(n.id)?.[1])).filter(n=>Number.isInteger(n)&&n>0);return i.length?`body-${Math.max(...i)}`:"body-1"}export{be as accentItalicCss,ge as applyListChange,_e as eyebrowStyleId,L as faceClassOf,Q as fromPanelStyles,ze as hasStyleChange,pe as listChangePatch,M as listToWrite,ie as partStyleToTextStyleValues,ve as pushIntoStyle,O as resolveTextStyles,oe as setStyleValues,me as siteTextFromRow,fe as storedTextStyles,xe as styleIdOfRole,Se as textStylesCss,R as textStylesFromOld,D as textStylesToOld,ye as themeWithTextStyles,he as toPanelStyles};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-web-builder",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "43.0.0",
|
|
4
4
|
"description": "The EFFICIENT website builder: the website editor, the general sections and the renderer that draws them, compiled. Hostable by any EFFICIENT product; nothing here imports a host.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Efficient Pty Ltd",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"@tabler/icons-react": "^3.46.0",
|
|
56
|
-
"efficient-easel": "^
|
|
57
|
-
"efficient-shell": "^10.
|
|
56
|
+
"efficient-easel": "^23.0.0",
|
|
57
|
+
"efficient-shell": "^10.13.0",
|
|
58
58
|
"isomorphic-dompurify": "^3.18.0",
|
|
59
59
|
"next": ">=16",
|
|
60
60
|
"react": ">=19",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"@types/node": "^20",
|
|
73
73
|
"@types/react": "^19",
|
|
74
74
|
"@types/react-dom": "^19",
|
|
75
|
-
"efficient-easel": "^
|
|
76
|
-
"efficient-shell": "^10.
|
|
75
|
+
"efficient-easel": "^23.0.0",
|
|
76
|
+
"efficient-shell": "^10.13.0",
|
|
77
77
|
"esbuild": "^0.28.0",
|
|
78
78
|
"happy-dom": "^20.14.5",
|
|
79
79
|
"isomorphic-dompurify": "^3.18.0",
|