efficient-web-builder 74.4.0 → 74.5.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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 74.5.0 - 2026-11-22
4
+
5
+ From main at `2a217a08`: #834.
6
+
7
+ A minor: the "Website" rows (Count side space once, Offices, Custom CSS, from 74.2.0) show on the in-place Footer of every page, where a merchant can reach them. New exports; no new peer, no removed path, no new stored field. The values stay stored on the site-footer root only; an untouched round trip is byte-same.
8
+
9
+ **For hosts:**
10
+ - No host step. admin-portal: the admin bump checks the rows in the real editor (preview admin, view only).
11
+
12
+ ### Fixed
13
+
14
+ - **The Website rows can be reached.** Before, they were only on the site-footer page's root, and the editor never opens that page. Now, while a page edits its header and footer in place, selecting the in-place Footer shows the same `WEBSITE_ROWS` on its Design tab (`withInPlaceFooterRows`, `resolveInPlaceFooterData`, `lib/document/page-root-fields`). `spliceChrome` puts the root's values on the footer node, and `splitChrome` writes them back to the chrome root and strips them from every node (`WEBSITE_KEYS`, `IN_PLACE_FOOTER_TYPES`, `lib/pinned-chrome-doc`). The canvas shows an edit before it is saved (`chromeRootWithFooter`, `inPlaceFooterProps`). "Duplicate to another page" drops the three values (`withoutWebsiteKeys`). The site-footer page's own root keeps its rows. (#834)
15
+
3
16
  ## 74.4.0 - 2026-11-22
4
17
 
5
18
  From main at `622db175`: #832.
@@ -1 +1 @@
1
- "use client";import{jsx as t,jsxs as x,Fragment as S}from"react/jsx-runtime";import{useCallback as j,useRef as A,useState as p}from"react";import{InspectorIconButton as B}from"efficient-easel/chrome";import{useEasel as O}from"efficient-easel/easel";import{PopupMenu as R,PopupMenuItem as _,PopupMenuLabel as f}from"efficient-shell/ui";import{CopyToPageIcon as L}from"efficient-easel/icons";import{backendOf as E}from"../lib/website-session.js";import{useEaselSession as z}from"efficient-easel/screen/lib/session-context";import{say as o}from"../../format/lib/editor-words.js";import{cloneNodeWithFreshIds as W}from"efficient-easel/screen/lib/document/section-doc";import{FOOTER_TYPE as H}from"efficient-easel/draw";import{settlingPages as Y}from"../lib/editor-document-adapter.js";function $(i,r,l){const n=W(i,void 0,r);return l?.(n)??n}function q({node:i,currentSlug:r,siteId:l,tokenRef:n,runAuthed:c,onNotify:u}){const[s,a]=p(!1),[m,P]=p(null),d=z(),N=O(e=>e.config.components),[T,g]=p(!1),[h,b]=p(null),k=A(null),[y,v]=p(null),M=j(async()=>{if(d.usesBridgedToken&&!n.current){g(!0);return}try{P(await E(d).pages.list(l?{siteId:l}:void 0))}catch{g(!0)}},[n,l,d]),D=()=>{if(s){a(!1);return}const e=k.current?.getBoundingClientRect();e&&v({top:e.bottom+6,right:Math.max(8,window.innerWidth-e.right)}),P(null),g(!1),M(),a(!0)},w=(m??[]).filter(e=>e.slug!==r),F=async e=>{if(h)return;b(e.slug);const I=$(i,N,d.documentHooks?.storedNode),C=await c(()=>G(E(d).pages,e,I));b(null),a(!1),u?.(C?o("Duplicated to “{name}”",{name:e.label}):o("Couldn’t duplicate the section — please retry"),C?"success":"error")};return x(S,{children:[t("span",{"data-menu-toggle":!0,style:{display:"contents"},children:t(B,{buttonRef:k,label:o("Duplicate to another page"),hasPopup:"menu",expanded:s,onClick:D,children:t(L,{size:15})})}),s&&y&&t(R,{portal:!0,style:{top:y.top,right:y.right},onClose:()=>a(!1),children:x("div",{role:"menu","aria-label":o("Duplicate to page"),children:[t(f,{children:o("Duplicate to page")}),T?t(f,{children:o("Couldn’t load pages")}):m===null?t(f,{children:o("Loading…")}):w.length===0?t(f,{children:o("No other pages")}):w.map(e=>x(_,{role:"menuitem",disabled:h!==null,onClick:()=>{F(e)},children:[t("span",{className:"min-w-0 flex-1 truncate",children:e.label}),h===e.slug?t("span",{className:"shrink-0 text-xs",children:o("Copying…")}):e.draft&&t("span",{className:"shrink-0 text-xs",children:o("draft")})]},e.id))]})})]})}async function G(i,r,l){const n=Y(i),c=await n.load({id:r.id});if(!c)throw new Error(`Page "${r.slug}" no longer exists.`);const u=c.layout??{},s=Array.isArray(u.content)?[...u.content]:[],a=s.findIndex(m=>m?.type===H);s.splice(a===-1?s.length:a,0,l),await n.save(r.id,{layout:{root:{},zones:{},...u,content:s}},{version:c.version,clientId:""})}export{$ as copyForAnotherPage,G as copyNodeToPage,q as default};
1
+ "use client";import{jsx as t,jsxs as x,Fragment as S}from"react/jsx-runtime";import{useCallback as j,useRef as A,useState as p}from"react";import{InspectorIconButton as B}from"efficient-easel/chrome";import{useEasel as O}from"efficient-easel/easel";import{PopupMenu as R,PopupMenuItem as _,PopupMenuLabel as f}from"efficient-shell/ui";import{CopyToPageIcon as L}from"efficient-easel/icons";import{backendOf as E}from"../lib/website-session.js";import{useEaselSession as W}from"efficient-easel/screen/lib/session-context";import{say as o}from"../../format/lib/editor-words.js";import{cloneNodeWithFreshIds as z}from"efficient-easel/screen/lib/document/section-doc";import{FOOTER_TYPE as H}from"efficient-easel/draw";import{settlingPages as K}from"../lib/editor-document-adapter.js";import{withoutWebsiteKeys as Y}from"../lib/pinned-chrome-doc.js";function $(i,r,l){const n=z(i,void 0,r);return l?.(n)??n}function q({node:i,currentSlug:r,siteId:l,tokenRef:n,runAuthed:c,onNotify:u}){const[s,a]=p(!1),[m,b]=p(null),d=W(),N=O(e=>e.config.components),[T,g]=p(!1),[h,P]=p(null),w=A(null),[y,v]=p(null),M=j(async()=>{if(d.usesBridgedToken&&!n.current){g(!0);return}try{b(await E(d).pages.list(l?{siteId:l}:void 0))}catch{g(!0)}},[n,l,d]),D=()=>{if(s){a(!1);return}const e=w.current?.getBoundingClientRect();e&&v({top:e.bottom+6,right:Math.max(8,window.innerWidth-e.right)}),b(null),g(!1),M(),a(!0)},k=(m??[]).filter(e=>e.slug!==r),F=async e=>{if(h)return;P(e.slug);const I=$(i,N,d.documentHooks?.storedNode),C=await c(()=>G(E(d).pages,e,I));P(null),a(!1),u?.(C?o("Duplicated to “{name}”",{name:e.label}):o("Couldn’t duplicate the section — please retry"),C?"success":"error")};return x(S,{children:[t("span",{"data-menu-toggle":!0,style:{display:"contents"},children:t(B,{buttonRef:w,label:o("Duplicate to another page"),hasPopup:"menu",expanded:s,onClick:D,children:t(L,{size:15})})}),s&&y&&t(R,{portal:!0,style:{top:y.top,right:y.right},onClose:()=>a(!1),children:x("div",{role:"menu","aria-label":o("Duplicate to page"),children:[t(f,{children:o("Duplicate to page")}),T?t(f,{children:o("Couldn’t load pages")}):m===null?t(f,{children:o("Loading…")}):k.length===0?t(f,{children:o("No other pages")}):k.map(e=>x(_,{role:"menuitem",disabled:h!==null,onClick:()=>{F(e)},children:[t("span",{className:"min-w-0 flex-1 truncate",children:e.label}),h===e.slug?t("span",{className:"shrink-0 text-xs",children:o("Copying…")}):e.draft&&t("span",{className:"shrink-0 text-xs",children:o("draft")})]},e.id))]})})]})}async function G(i,r,l){const n=K(i),c=await n.load({id:r.id});if(!c)throw new Error(`Page "${r.slug}" no longer exists.`);const u=c.layout??{},s=Array.isArray(u.content)?[...u.content]:[],a=s.findIndex(m=>m?.type===H);s.splice(a===-1?s.length:a,0,Y(l)),await n.save(r.id,{layout:{root:{},zones:{},...u,content:s}},{version:c.version,clientId:""})}export{$ as copyForAnotherPage,G as copyNodeToPage,q as default};
@@ -31,6 +31,10 @@ export declare const PAGE_STYLE_FIELDS: readonly ["pageBackground", "topSpace",
31
31
  export declare const RECORD_TYPE_LABEL = "Record type";
32
32
  export declare function withRecordTypeRow(fields: Record<string, unknown>, rootProps?: Record<string, unknown> | null): Record<string, unknown>;
33
33
  export declare function withSiteFooterRows(fields: Record<string, unknown>, rootProps?: Record<string, unknown> | null): Record<string, unknown>;
34
+ export declare function withInPlaceFooterRows(fields: Record<string, unknown>): Record<string, unknown>;
35
+ export declare function resolveInPlaceFooterData<D extends {
36
+ props?: Record<string, unknown> | null;
37
+ }>(data: D): D | Promise<D>;
34
38
  export declare function resolveSiteFooterData<D extends {
35
39
  props?: Record<string, unknown> | null;
36
40
  }>(data: D): D | Promise<D>;
@@ -1 +1 @@
1
- import{jsx as i}from"react/jsx-runtime";import{ListIcon as d,PaddingTopIcon as T,PaddingXIcon as R}from"efficient-easel/icons";import g from"../../components/WidthFollowField.js";import{say as c}from"../../../format/lib/editor-words.js";import{PRODUCT_RECORD_TYPE as w,TEMPLATE_RECORD_TYPE_PROP as a,declaredRecordType as P,recordTypes as u,recordTypesRevision as E}from"../../../format/lib/content/record-types.js";import{CUSTOM_CSS_ROW as h,pageBackgroundField as C,toggle as I}from"./controls.js";import{SITE_FOOTER_KIND as m}from"../../../format/lib/content/footer.js";import{SIDE_SPACE_ONCE_PROP as _}from"../../../format/lib/content/page-width.js";import{SITE_OFFICES_PROP as s}from"../../../format/lib/content/site-offices.js";import{SITE_CSS_KEY as F}from"../../../format/lib/content/site-css.js";import{needsGeocodeWork as y}from"./geocode-resolve.js";import{group as D}from"efficient-easel/screen/lib/document/box-fields";import{FOOTPRINT_OFFICES_FIELD as A,resolveOfficeCoords as k}from"./blocks/general/Footprint/fields.js";import{select as l}from"./box-fields.js";import{isEditorOnDynamicPage as x}from"../../../format/lib/document/editor-page-context.js";import{DEFAULT_TOP_SPACE as W}from"../../../render/lib/document/header-clearance.js";function b(){return{type:"custom",render:({value:e,onChange:t})=>i(g,{value:e==="full"?"full":e==="content"?"content":void 0,resolved:"content",label:"Page width",followsLabel:c("Follows the site"),hint:c("Whether this page sits on the site's content column, or runs edge to edge."),onChange:o=>t(o)})}}const v=[{label:"Auto",value:"auto"},{label:"Shared",value:"shared"},{label:"Its own",value:"own"}],re={pageBackground:C(),topSpace:l("Top space",i(T,{}),v,W),widthChoice:b()},ne=["pageBackground","topSpace","widthChoice"],L="Record type",p=new Map;let f=-1;function N(e){f!==E()&&(p.clear(),f=E());const t=u(),o=t.some(n=>n.key===e)?"":e;let r=p.get(o);return r||(r=l(L,i(d,{}),[...t.map(n=>({label:n.label,value:n.key})),...o?[{label:o,value:o}]:[]],w),p.set(o,r)),r}const S=new WeakMap;function ie(e,t){if(!x()||u().length<2||a in e)return e;const o=N(P(t)),r=S.get(e);if(r&&r.row===o)return r.fields;const n={[a]:o,...e};return S.set(e,{row:o,fields:n}),n}const B="On: the site's Side space is counted once at each edge of every page. Off: as before.",M=I("Count side space once",!1,i(R,{}),B),Y={_gWebsite:D("Website"),[_]:M,[s]:A,[F]:h},O=new WeakMap;function se(e,t){if(t?.kind!==m||_ in e)return e;let o=O.get(e);return o||(o={...e,...Y},O.set(e,o)),o}function pe(e){const t=e?.props;if(t?.kind!==m||!Array.isArray(t[s]))return e;const o=t[s];return y(o)?k(o).then(r=>({...e,props:{...t,[s]:[...r]}})):e}export{re as GENERAL_ROOT_FIELDS,ne as PAGE_STYLE_FIELDS,L as RECORD_TYPE_LABEL,v as TOP_SPACE_OPTIONS,b as pageWidthField,pe as resolveSiteFooterData,ie as withRecordTypeRow,se as withSiteFooterRows};
1
+ import{jsx as i}from"react/jsx-runtime";import{ListIcon as g,PaddingTopIcon as h,PaddingXIcon as I}from"efficient-easel/icons";import d from"../../components/WidthFollowField.js";import{say as u}from"../../../format/lib/editor-words.js";import{PRODUCT_RECORD_TYPE as C,TEMPLATE_RECORD_TYPE_PROP as f,declaredRecordType as F,recordTypes as m,recordTypesRevision as l}from"../../../format/lib/content/record-types.js";import{CUSTOM_CSS_ROW as A,pageBackgroundField as y,toggle as x}from"./controls.js";import{SITE_FOOTER_KIND as E}from"../../../format/lib/content/footer.js";import{SIDE_SPACE_ONCE_PROP as s}from"../../../format/lib/content/page-width.js";import{SITE_OFFICES_PROP as c}from"../../../format/lib/content/site-offices.js";import{SITE_CSS_KEY as D}from"../../../format/lib/content/site-css.js";import{needsGeocodeWork as b}from"./geocode-resolve.js";import{group as k}from"efficient-easel/screen/lib/document/box-fields";import{FOOTPRINT_OFFICES_FIELD as v,resolveOfficeCoords as W}from"./blocks/general/Footprint/fields.js";import{select as _}from"./box-fields.js";import{isEditorOnDynamicPage as L}from"../../../format/lib/document/editor-page-context.js";import{pinnedChromeInPlace as O}from"../../../format/lib/pinned-chrome-lock.js";import{BUCKET_KEY as N}from"efficient-easel/screen/lib/document/field-buckets";import{DEFAULT_TOP_SPACE as B}from"../../../render/lib/document/header-clearance.js";function M(){return{type:"custom",render:({value:e,onChange:t})=>i(d,{value:e==="full"?"full":e==="content"?"content":void 0,resolved:"content",label:"Page width",followsLabel:u("Follows the site"),hint:u("Whether this page sits on the site's content column, or runs edge to edge."),onChange:o=>t(o)})}}const Y=[{label:"Auto",value:"auto"},{label:"Shared",value:"shared"},{label:"Its own",value:"own"}],ue={pageBackground:y(),topSpace:_("Top space",i(h,{}),Y,B),widthChoice:M()},fe=["pageBackground","topSpace","widthChoice"],j="Record type",p=new Map;let T=-1;function K(e){T!==l()&&(p.clear(),T=l());const t=m(),o=t.some(n=>n.key===e)?"":e;let r=p.get(o);return r||(r=_(j,i(g,{}),[...t.map(n=>({label:n.label,value:n.key})),...o?[{label:o,value:o}]:[]],C),p.set(o,r)),r}const S=new WeakMap;function me(e,t){if(!L()||m().length<2||f in e)return e;const o=K(F(t)),r=S.get(e);if(r&&r.row===o)return r.fields;const n={[f]:o,...e};return S.set(e,{row:o,fields:n}),n}const U="On: the site's Side space is counted once at each edge of every page. Off: as before.",G=x("Count side space once",!1,i(I,{}),U),a={_gWebsite:k("Website"),[s]:G,[c]:v,[D]:A},w=new WeakMap;function le(e,t){if(t?.kind!==E||s in e)return e;let o=w.get(e);return o||(o={...e,...a},w.set(e,o)),o}function Ee(e){if(!O()||s in e)return e;let t=P.get(e);if(!t){t={};let o=!1;for(const[r,n]of Object.entries(e))r===H&&!o&&(Object.assign(t,a),o=!0),t[r]=n;o||Object.assign(t,a),P.set(e,t)}return t}const H=N.Animation,P=new WeakMap;function _e(e){return O()?R(e):e}function R(e){const t=e?.props;if(!t||!Array.isArray(t[c]))return e;const o=t[c];return b(o)?W(o).then(r=>({...e,props:{...t,[c]:[...r]}})):e}function Oe(e){return e?.props?.kind===E?R(e):e}export{ue as GENERAL_ROOT_FIELDS,fe as PAGE_STYLE_FIELDS,j as RECORD_TYPE_LABEL,Y as TOP_SPACE_OPTIONS,M as pageWidthField,_e as resolveInPlaceFooterData,Oe as resolveSiteFooterData,Ee as withInPlaceFooterRows,me as withRecordTypeRow,le as withSiteFooterRows};
@@ -24,7 +24,7 @@ export declare function EditorThemedBody({ propsTheme, propsFonts, propsCornerSt
24
24
  overlay?: ReactNode;
25
25
  children?: ReactNode;
26
26
  }): import("react").JSX.Element;
27
- export declare function SiteThemeCarrier({ propsTheme, propsFonts, propsCornerStyle, propsCornerRadiusPx, propsHeadingCompression, propsHeadingTypography, pageBackground, chromeInheritsSiteBackground, onClickCapture, siteFooterRootProps, body, }: {
27
+ export declare function SiteThemeCarrier({ propsTheme, propsFonts, propsCornerStyle, propsCornerRadiusPx, propsHeadingCompression, propsHeadingTypography, pageBackground, chromeInheritsSiteBackground, onClickCapture, siteFooterRootProps, inPlaceFooterProps: footerProps, body, }: {
28
28
  propsTheme?: ThemeValue;
29
29
  propsFonts?: FontsValue;
30
30
  propsCornerStyle?: string;
@@ -35,6 +35,7 @@ export declare function SiteThemeCarrier({ propsTheme, propsFonts, propsCornerSt
35
35
  chromeInheritsSiteBackground?: boolean;
36
36
  onClickCapture?: (e: MouseEvent<HTMLDivElement>) => void;
37
37
  siteFooterRootProps?: Record<string, unknown>;
38
+ inPlaceFooterProps?: Record<string, unknown> | null;
38
39
  body: (contentStyle: CSSProperties) => ReactNode;
39
40
  }): import("react").JSX.Element;
40
41
  export declare const suppressPreviewNav: (e: MouseEvent<HTMLDivElement>) => void;
@@ -1,2 +1,2 @@
1
- import{jsx as t,Fragment as X,jsxs as E}from"react/jsx-runtime";import{Suspense as Y}from"react";import{accentItalicCss as q,storedTextStyles as J,textStylesCss as Q}from"../../../render/lib/text-styles/site-text-styles.js";import{pageWidthMarker as Z,PAGE_WIDTH_ATTR as ee,siteWidthTokens as te,siteGutterTokens as oe,siteGutterPhoneClass as re,siteGutterPhoneTokens as ne,heroBackgroundTokens as ie,SIDE_ONCE_ATTR as se,sideSpaceOnceAttr as ae}from"../../../format/lib/content/page-width.js";import{SITE_FOOTER_KIND as de}from"../../../format/lib/content/footer.js";import{siteBlockGapPhoneClass as ce,siteBlockGapPhoneTokens as pe,siteBlockGapTokens as le}from"../../../format/lib/content/container-gap.js";import{usePreviewHeader as he}from"../../../render/components/PreviewHeaderContext.js";import{usePreviewFooter as me}from"../../components/PreviewFooterContext.js";import{SiteRootPropsProvider as fe}from"../../../render/components/SiteRootProps.js";import{SITE_CSS_SCOPE_ATTR as ue,siteCssScopeAttr as Se}from"../../../format/lib/content/site-css.js";import{SitePhotographyProvider as ge}from"../../../render/components/SitePhotographyContext.js";import{ThemeLightInkProvider as Te}from"../../../render/components/ThemeLightInkContext.js";import{CORNER_STYLE_TO_PX as ye,normalizeCornerStyle as xe,normalizeCornerRadius as ke,themeColorStyle as Ce,themeLightInk as Pe,typeSizesStyle as Ee,headingTypographyStyle as _e,normalizeHeadingTypography as Ae,themeAccentStyle as Ge,themeButtonStyle as ve,themePresetAccentVars as Re,themeSurfaceStyle as Ie,siteCornerRadiusTokens as Be,shadowColorTokens as we,headingCompressionAttr as He,cardShadowAttr as We,cardGapAttr as be,hoverEffectAttr as Ne}from"../../../format/lib/theme.js";import{fontRoleStyle as De}from"../../../format/lib/fonts.js";import{wordStyleTokens as Fe}from"../../../format/lib/word-styles.js";import{isStandaloneSectionDocument as Oe,pageHasHeaderSection as _,pageTakesTopSpace as Le,topSpaceMarker as Ue,TOP_SPACE_ATTR as ze,HEADER_CLEARANCE_CLASS as je}from"../../../render/lib/document/header-clearance.js";import{leadSectionInk as Ve,HEADER_INK_ATTR as Me}from"../../../render/lib/document/header-ink.js";import{useEasel as A}from"efficient-easel/easel";import{useCardContentSwitchPass as $e}from"../../components/useCardContentSwitchPass.js";import{pageBackgroundVars as Ke}from"../../../format/lib/content/page-background.js";import{pageWidthTokens as Xe}from"../../../render/lib/document/page-frame.js";import{EditingBridgesProvider as Ye}from"../../../render/lib/document/editing-bridges.js";import qe from"../../components/SectionTextPartBridge.js";import{PageContentsFromDocument as G}from"../../../render/components/PageContentsContext.js";const Je={SectionTextParts:qe};import{PageWidthWrapper as It,PublishedPageFrame as Bt,pageWidthTokens as wt}from"../../../render/lib/document/page-frame.js";const Qe="color-mix(in oklab, var(--bg) 40%, #ffffff)",Ze="12vh";function et({style:r,children:a}){const{appState:d}=A(m=>m),o=d.data.content,n=d.data.root;if(Oe(o))return t("div",{className:"sf-themed-content",style:{...r,background:Qe,minHeight:"100vh",paddingBottom:Ze},children:t("div",{style:{background:"var(--bg)"},children:t(G,{content:o,children:a})})});const c=_(o)&&Le(n,o),p=_(o)?Ue(n,o):null,S=p?{[ze]:p}:null,l=Z(n?.widthChoice),i=l?{[ee]:l}:null,h=c?null:Ve(o),s=h?{[Me]:h}:null;return t("div",{className:`sf-themed-content${c?` ${je}`:""}`,style:r,...s,...S,...i,children:t("div",{style:{background:"var(--bg)",minHeight:"100%"},children:t(G,{content:o,children:a})})})}function At({propsTheme:r,propsFonts:a,propsCornerStyle:d,propsCornerRadiusPx:o,propsHeadingCompression:n,propsHeadingTypography:c,pageBackground:p,chromeInheritsSiteBackground:S,suppressPreviewNav:l,footer:i,overlay:h,children:s}){$e();const m=A(g=>g.appState.data.root?.props);return t(tt,{siteFooterRootProps:m?.kind===de?m:void 0,propsTheme:r,propsFonts:a,propsCornerStyle:d,propsCornerRadiusPx:o,propsHeadingCompression:n,propsHeadingTypography:c,pageBackground:p,chromeInheritsSiteBackground:S,onClickCapture:l,body:g=>E(X,{children:[t(et,{style:g,children:s}),i,h]})})}function tt({propsTheme:r,propsFonts:a,propsCornerStyle:d,propsCornerRadiusPx:o,propsHeadingCompression:n,propsHeadingTypography:c,pageBackground:p,chromeInheritsSiteBackground:S,onClickCapture:l,siteFooterRootProps:i,body:h}){const{chromeRootProps:s}=me(),{theme:m,fonts:g,sizes:v,cornerRadiusPx:R,cardShadow:T,shadowColor:I,cardGap:B,hoverEffect:y,headingCompression:w,siteWidth:H,siteGutter:W,siteGutterPhone:x,blockGap:b,blockGapPhone:k,siteLengthUnits:N,headingTypography:D,heroBackgroundFollowsWidth:F,photographyGrayscale:O,textStyles:L,wordStyles:U,themeFromDocument:e}=he(),f=e?r:m,z=e?a:g,j=e?void 0:v,V=e?o===void 0?ye[xe(d)]:ke(o):R,u=e?{}:N,M=e?n:w,C=e?c:D,P=[Q(J(e?void 0:L)),q(Ae(C).italicStrong)].filter(Boolean).join(`
2
- `),$=Xe(),K={...Ce(f),...Ee(j),..._e(C),...$.style,...S?{}:Ke(p)};return E("div",{className:`sf-theme-surfaces sf-theme-accent ${[re(e?void 0:x),ce(e?void 0:k)].filter(Boolean).join(" ")}`.trim(),style:{...De(z),...Fe(e?null:U),...Ge(f),...ve(f),...Re(f),...Ie(f),...Be(V,u.cornerRadiusUnit),...we(e?void 0:T,e?void 0:I,e?void 0:y),...te(e?void 0:H,u.siteWidthUnit),...oe(e?void 0:W,u.siteGutterUnit),...ne(e?void 0:x,u.siteGutterPhoneUnit),...le(e?void 0:b,u.blockGapUnit),...pe(e?void 0:k,u.blockGapPhoneUnit),...ie(e?void 0:F)},"data-sf-headings":He(M),[se]:ae(i??s),[ue]:Se(i??s),"data-sf-card-shadow":e?void 0:We(T),"data-sf-card-gap":e?void 0:be(B),"data-sf-card-hover":e?void 0:Ne(y),onClickCapture:l,children:[P?t("style",{"data-sf-text-styles":"",dangerouslySetInnerHTML:{__html:P}}):null,t(ge,{grayscale:e?void 0:O,children:t(Ye,{value:Je,children:t(Te,{ink:Pe(f),children:t(Y,{fallback:null,children:t(fe,{rootProps:i??s,children:h(K)})})})})})]})}const Gt=r=>{r.target?.closest?.("a")&&r.preventDefault()};export{Je as EDITING_BRIDGES,et as EditorPageBody,At as EditorThemedBody,It as PageWidthWrapper,Bt as PublishedPageFrame,Qe as SECTION_PREVIEW_CANVAS,Ze as SECTION_PREVIEW_CANVAS_TAIL,tt as SiteThemeCarrier,wt as pageWidthTokens,Gt as suppressPreviewNav};
1
+ import{jsx as t,Fragment as q,jsxs as A}from"react/jsx-runtime";import{Suspense as J,useMemo as Q}from"react";import{accentItalicCss as Z,storedTextStyles as ee,textStylesCss as te}from"../../../render/lib/text-styles/site-text-styles.js";import{pageWidthMarker as oe,PAGE_WIDTH_ATTR as re,siteWidthTokens as ne,siteGutterTokens as ie,siteGutterPhoneClass as se,siteGutterPhoneTokens as ae,heroBackgroundTokens as de,SIDE_ONCE_ATTR as ce,sideSpaceOnceAttr as pe}from"../../../format/lib/content/page-width.js";import{SITE_FOOTER_KIND as le}from"../../../format/lib/content/footer.js";import{siteBlockGapPhoneClass as he,siteBlockGapPhoneTokens as me,siteBlockGapTokens as fe}from"../../../format/lib/content/container-gap.js";import{usePreviewHeader as ue}from"../../../render/components/PreviewHeaderContext.js";import{usePreviewFooter as Se}from"../../components/PreviewFooterContext.js";import{SiteRootPropsProvider as ge}from"../../../render/components/SiteRootProps.js";import{SITE_CSS_SCOPE_ATTR as Te,siteCssScopeAttr as ye}from"../../../format/lib/content/site-css.js";import{SitePhotographyProvider as Pe}from"../../../render/components/SitePhotographyContext.js";import{ThemeLightInkProvider as xe}from"../../../render/components/ThemeLightInkContext.js";import{CORNER_STYLE_TO_PX as ke,normalizeCornerStyle as Ce,normalizeCornerRadius as Ee,themeColorStyle as _e,themeLightInk as Ae,typeSizesStyle as Re,headingTypographyStyle as Ge,normalizeHeadingTypography as ve,themeAccentStyle as Ie,themeButtonStyle as Be,themePresetAccentVars as we,themeSurfaceStyle as We,siteCornerRadiusTokens as He,shadowColorTokens as Fe,headingCompressionAttr as be,cardShadowAttr as Ne,cardGapAttr as De,hoverEffectAttr as Oe}from"../../../format/lib/theme.js";import{fontRoleStyle as Le}from"../../../format/lib/fonts.js";import{wordStyleTokens as Ue}from"../../../format/lib/word-styles.js";import{isStandaloneSectionDocument as ze,pageHasHeaderSection as R,pageTakesTopSpace as je,topSpaceMarker as Ve,TOP_SPACE_ATTR as Me,HEADER_CLEARANCE_CLASS as $e}from"../../../render/lib/document/header-clearance.js";import{leadSectionInk as Ke,HEADER_INK_ATTR as Xe}from"../../../render/lib/document/header-ink.js";import{useEasel as y}from"efficient-easel/easel";import{chromeRootWithFooter as Ye,inPlaceFooterProps as qe}from"../pinned-chrome-doc.js";import{useCardContentSwitchPass as Je}from"../../components/useCardContentSwitchPass.js";import{pageBackgroundVars as Qe}from"../../../format/lib/content/page-background.js";import{pageWidthTokens as Ze}from"../../../render/lib/document/page-frame.js";import{EditingBridgesProvider as et}from"../../../render/lib/document/editing-bridges.js";import tt from"../../components/SectionTextPartBridge.js";import{PageContentsFromDocument as G}from"../../../render/components/PageContentsContext.js";const ot={SectionTextParts:tt};import{PageWidthWrapper as bt,PublishedPageFrame as Nt,pageWidthTokens as Dt}from"../../../render/lib/document/page-frame.js";const rt="color-mix(in oklab, var(--bg) 40%, #ffffff)",nt="12vh";function it({style:r,children:c}){const{appState:p}=y(a=>a),o=p.data.content,n=p.data.root;if(ze(o))return t("div",{className:"sf-themed-content",style:{...r,background:rt,minHeight:"100vh",paddingBottom:nt},children:t("div",{style:{background:"var(--bg)"},children:t(G,{content:o,children:c})})});const l=R(o)&&je(n,o),h=R(o)?Ve(n,o):null,S=h?{[Me]:h}:null,m=oe(n?.widthChoice),i=m?{[re]:m}:null,s=l?null:Ke(o),g=s?{[Xe]:s}:null;return t("div",{className:`sf-themed-content${l?` ${$e}`:""}`,style:r,...g,...S,...i,children:t("div",{style:{background:"var(--bg)",minHeight:"100%"},children:t(G,{content:o,children:c})})})}function wt({propsTheme:r,propsFonts:c,propsCornerStyle:p,propsCornerRadiusPx:o,propsHeadingCompression:n,propsHeadingTypography:l,pageBackground:h,chromeInheritsSiteBackground:S,suppressPreviewNav:m,footer:i,overlay:s,children:g}){Je();const a=y(d=>d.appState.data.root?.props),T=y(d=>qe(d.appState.data.content));return t(st,{siteFooterRootProps:a?.kind===le?a:void 0,inPlaceFooterProps:T,propsTheme:r,propsFonts:c,propsCornerStyle:p,propsCornerRadiusPx:o,propsHeadingCompression:n,propsHeadingTypography:l,pageBackground:h,chromeInheritsSiteBackground:S,onClickCapture:m,body:d=>A(q,{children:[t(it,{style:d,children:g}),i,s]})})}function st({propsTheme:r,propsFonts:c,propsCornerStyle:p,propsCornerRadiusPx:o,propsHeadingCompression:n,propsHeadingTypography:l,pageBackground:h,chromeInheritsSiteBackground:S,onClickCapture:m,siteFooterRootProps:i,inPlaceFooterProps:s,body:g}){const{chromeRootProps:a}=Se(),T=Q(()=>Ye(a,s),[a,s]),{theme:d,fonts:v,sizes:I,cornerRadiusPx:B,cardShadow:P,shadowColor:w,cardGap:W,hoverEffect:x,headingCompression:H,siteWidth:F,siteGutter:b,siteGutterPhone:k,blockGap:N,blockGapPhone:C,siteLengthUnits:D,headingTypography:O,heroBackgroundFollowsWidth:L,photographyGrayscale:U,textStyles:z,wordStyles:j,themeFromDocument:e}=ue(),f=e?r:d,V=e?c:v,M=e?void 0:I,$=e?o===void 0?ke[Ce(p)]:Ee(o):B,u=e?{}:D,K=e?n:H,E=e?l:O,_=[te(ee(e?void 0:z)),Z(ve(E).italicStrong)].filter(Boolean).join(`
2
+ `),X=Ze(),Y={..._e(f),...Re(M),...Ge(E),...X.style,...S?{}:Qe(h)};return A("div",{className:`sf-theme-surfaces sf-theme-accent ${[se(e?void 0:k),he(e?void 0:C)].filter(Boolean).join(" ")}`.trim(),style:{...Le(V),...Ue(e?null:j),...Ie(f),...Be(f),...we(f),...We(f),...He($,u.cornerRadiusUnit),...Fe(e?void 0:P,e?void 0:w,e?void 0:x),...ne(e?void 0:F,u.siteWidthUnit),...ie(e?void 0:b,u.siteGutterUnit),...ae(e?void 0:k,u.siteGutterPhoneUnit),...fe(e?void 0:N,u.blockGapUnit),...me(e?void 0:C,u.blockGapPhoneUnit),...de(e?void 0:L)},"data-sf-headings":be(K),[ce]:pe(i??T),[Te]:ye(i??T),"data-sf-card-shadow":e?void 0:Ne(P),"data-sf-card-gap":e?void 0:De(W),"data-sf-card-hover":e?void 0:Oe(x),onClickCapture:m,children:[_?t("style",{"data-sf-text-styles":"",dangerouslySetInnerHTML:{__html:_}}):null,t(Pe,{grayscale:e?void 0:U,children:t(et,{value:ot,children:t(xe,{ink:Ae(f),children:t(J,{fallback:null,children:t(ge,{rootProps:i??T,children:g(Y)})})})})})]})}const Wt=r=>{r.target?.closest?.("a")&&r.preventDefault()};export{ot as EDITING_BRIDGES,it as EditorPageBody,wt as EditorThemedBody,bt as PageWidthWrapper,Nt as PublishedPageFrame,rt as SECTION_PREVIEW_CANVAS,nt as SECTION_PREVIEW_CANVAS_TAIL,st as SiteThemeCarrier,Dt as pageWidthTokens,Wt as suppressPreviewNav};
@@ -1 +1 @@
1
- import{resolveSiteFooterData as i,withRecordTypeRow as w,withSiteFooterRows as m}from"./page-root-fields.js";import{dropEmptyHeadings as v}from"./panel-drop-empty-headings.js";import{PASS_INSPECTOR as h}from"./passes/inspector.js";import{finishRenderRegistry as F}from"../../../render/lib/document/render-registry.js";function P(n){const p=F(n,h),c=n.root,f=c.resolveFields,R=n.root?.showWhenFacts??{},s=(e,o,t)=>{const r=o?.props;return v(h.rowsShownForNode(m(w(e,r),r),{props:r},t,R),"page")};c.resolveFields=f?(e,o)=>{const t=f(e,o);return t instanceof Promise?t.then(r=>s(r??o.fields,e,o)):s(t??o.fields,e,o)}:(e,o)=>s(o.fields,e,o);const l=n.root,d=l.resolveData;return l.resolveData=d?(e,o)=>{const t=d(e,o);return t instanceof Promise?t.then(r=>i(r)):i(t)}:e=>i(e),p}export{P as finishRegistry};
1
+ import{resolveInPlaceFooterData as F,resolveSiteFooterData as h,withInPlaceFooterRows as P,withRecordTypeRow as R,withSiteFooterRows as u}from"./page-root-fields.js";import{dropEmptyHeadings as D}from"./panel-drop-empty-headings.js";import{PASS_INSPECTOR as w}from"./passes/inspector.js";import{finishRenderRegistry as a}from"../../../render/lib/document/render-registry.js";import{IN_PLACE_FOOTER_TYPES as S}from"../pinned-chrome-doc.js";function _(n){const d=a(n,w);for(const o of S){const e=n.components[o];e&&m(e)}const f=n.root,i=f.resolveFields,s=n.root?.showWhenFacts??{},t=(o,e,r)=>{const l=e?.props;return D(w.rowsShownForNode(u(R(o,l),l),{props:l},r,s),"page")};f.resolveFields=i?(o,e)=>{const r=i(o,e);return r instanceof Promise?r.then(l=>t(l??e.fields,o,e)):t(r??e.fields,o,e)}:(o,e)=>t(e.fields,o,e);const c=n.root,v=c.resolveData;return c.resolveData=v?(o,e)=>{const r=v(o,e);return r instanceof Promise?r.then(l=>h(l)):h(r)}:o=>h(o),d}function m(n){const d=n.resolveFields;n.resolveFields=(i,s)=>{const t=d?d(i,s):s.fields;return t instanceof Promise?t.then(c=>P(c??s.fields)):P(t??s.fields)};const f=n.resolveData;n.resolveData=(i,s)=>{const t=f?f(i,s):i;return t instanceof Promise?t.then(c=>F(c)):F(t)}}export{_ as finishRegistry};
@@ -1,5 +1,12 @@
1
1
  export type ChromeLayout = Record<string, unknown>;
2
2
  export declare const PINNED_CHROME_TYPES: readonly string[];
3
+ export declare const WEBSITE_KEYS: readonly string[];
4
+ export declare const IN_PLACE_FOOTER_TYPES: readonly string[];
5
+ export declare function withoutWebsiteKeys<T extends {
6
+ props?: Record<string, unknown>;
7
+ }>(n: T): T;
8
+ export declare function inPlaceFooterProps(content: unknown): Record<string, unknown> | null;
9
+ export declare function chromeRootWithFooter(rootProps: Record<string, unknown> | null, footerProps: Record<string, unknown> | null | undefined): Record<string, unknown> | null;
3
10
  export declare function idsNotThePagesOwn(working: ChromeLayout | null | undefined, isShared: (id: string) => boolean): Set<string>;
4
11
  export declare function chromeRootProps(chrome: ChromeLayout | null | undefined): Record<string, unknown> | null;
5
12
  export declare function spliceChrome(page: ChromeLayout, chrome: ChromeLayout | null): ChromeLayout;
@@ -1 +1 @@
1
- import{isSectionGroupType as C,SITE_FOOTER_TYPE as z,SITE_HEADER_TYPE as h,siteFooterDocChrome as k}from"../../format/lib/document/section-groups.js";import{zoneOwner as F}from"../../render/lib/document/selection-parent.js";import{isNode as R}from"efficient-easel/data";const m="Footer",P=[h,m,z],y=e=>{const t=e?.content;return Array.isArray(t)?t:[]},u=e=>{const t=e?.zones;return t&&typeof t=="object"&&!Array.isArray(t)?t:null},a=e=>{const t=e?.props?.id;return typeof t=="string"?t:void 0},_=e=>F(e)?.ownerId??"";function I(e){const t=k(y(e)),n=t.some(r=>r?.type===z);return t.filter(r=>r?.type===h||r?.type===z||r?.type===m&&!n)}function g(e,t){const n=new Set,r=o=>{if(Array.isArray(o)){for(const c of o)r(c);return}if(!(!o||typeof o!="object")){if(R(o)){const c=a(o);c&&n.add(c)}for(const c of Object.values(o))r(c)}};if(r(e),t){let o=!0;const c=new Set;for(;o;){o=!1;for(const[d,p]of Object.entries(t))c.has(d)||!n.has(_(d))||(c.add(d),r(p),o=!0)}}return n}function M(e,t){const n=y(e).filter(r=>{const o=a(r);return typeof r?.type=="string"&&P.includes(r.type)||o!==void 0&&t(o)});return n.length?g(n,u(e)):new Set}function T(e,t){const n={},r={};for(const[o,c]of Object.entries(e??{}))(t.has(_(o))?n:r)[o]=c;return{owned:n,rest:r}}function v(e){const t=e?.root,n=t&&typeof t=="object"?t.props:void 0;return n&&typeof n=="object"&&!Array.isArray(n)?n:null}function G(e,t){if(!t)return e;const n=I(t);if(!n.length)return e;const r=n.filter(p=>p.type===h),o=n.filter(p=>p.type!==h),c={...e,content:[...r,...y(e),...o]},{owned:d}=T(u(t),g(n,u(t)));return Object.keys(d).length&&(c.zones={...u(e)??{},...d}),c}function W(e,t){if(!t)return{page:e,chrome:null};const n=I(t),r=new Set(n.map(a).filter(s=>!!s)),o=[],c=[];for(const s of y(e)){const i=a(s);i&&r.has(i)||C(s?.type)?c.push(s):o.push(s)}const d=new Map(c.map(s=>[a(s),s])),p=new Set;let f=k(y(t)).flatMap(s=>{const i=a(s);if(!i||!r.has(i))return[s];const l=d.get(i);return l?(p.add(l),[l]):[]});for(const s of c)p.has(s)||f.some(i=>i?.type===s.type)||(f=s.type===h?[s,...f]:[...f,s]);f=k(f);const N=f.length===y(t).length&&f.every((s,i)=>s===y(t)[i]),j=u(e),x=g(f,j),{owned:w,rest:A}=T(j,x),S=T(u(t),g(n,u(t))).owned,b={...t,content:N?t.content:[...f]},O=u(t);if(O||Object.keys(w).length){const s={};for(const[i,l]of Object.entries(O??{}))i in S?i in w&&(s[i]=w[i]):s[i]=l;for(const[i,l]of Object.entries(w))i in s||(s[i]=l);b.zones=s,O&&D(b.zones,O)&&(b.zones=O)}const E={...e,content:o};return j&&(Object.keys(A).length||!Object.keys(S).length?E.zones=A:delete E.zones),{page:E,chrome:b}}function D(e,t){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((o,c)=>o===r[c]&&e[o]===t[o])}function B(e,t){return n=>e(n)||n!==void 0&&P.includes(n)&&t()}export{P as PINNED_CHROME_TYPES,v as chromeRootProps,M as idsNotThePagesOwn,B as lockedWhileHeld,G as spliceChrome,W as splitChrome};
1
+ import{isSectionGroupType as Z,SITE_FOOTER_TYPE as h,SITE_HEADER_TYPE as S,siteFooterDocChrome as N}from"../../format/lib/document/section-groups.js";import{zoneOwner as v}from"../../render/lib/document/selection-parent.js";import{isNode as H}from"efficient-easel/data";import{SIDE_SPACE_ONCE_PROP as K}from"../../format/lib/content/page-width.js";import{SITE_CSS_KEY as M}from"../../format/lib/content/site-css.js";import{SITE_OFFICES_PROP as B}from"../../format/lib/content/site-offices.js";const x="Footer",R=[S,x,h],b=[K,B,M],G=[h,x],A=n=>G.includes(n?.type??"");function L(n){const t=n?.props;if(!t||!b.some(s=>s in t))return n;const e={};for(const[s,o]of Object.entries(t))b.includes(s)||(e[s]=o);return{...n,props:e}}function V(n,t){const e=b.filter(o=>t&&o in t);if(!e.length)return n;const s={...n.props??{}};for(const o of e)s[o]=t[o];return{...n,props:s}}function st(n){return Array.isArray(n)?n.find(e=>A(e))?.props??null:null}function q(n,t){if(!t)return n;const e=b.filter(o=>o in t&&(!n||JSON.stringify(n[o])!==JSON.stringify(t[o])));if(!e.length)return n;const s={...n??{}};for(const o of e)s[o]=t[o];return s}const d=n=>{const t=n?.content;return Array.isArray(t)?t:[]},y=n=>{const t=n?.zones;return t&&typeof t=="object"&&!Array.isArray(t)?t:null},O=n=>{const t=n?.props?.id;return typeof t=="string"?t:void 0},m=n=>v(n)?.ownerId??"";function Y(n){const t=N(d(n)),e=t.some(s=>s?.type===h);return t.filter(s=>s?.type===S||s?.type===h||s?.type===x&&!e)}function _(n,t){const e=new Set,s=o=>{if(Array.isArray(o)){for(const c of o)s(c);return}if(!(!o||typeof o!="object")){if(H(o)){const c=O(o);c&&e.add(c)}for(const c of Object.values(o))s(c)}};if(s(n),t){let o=!0;const c=new Set;for(;o;){o=!1;for(const[f,a]of Object.entries(t))c.has(f)||!e.has(m(f))||(c.add(f),s(a),o=!0)}}return e}function rt(n,t){const e=d(n).filter(s=>{const o=O(s);return typeof s?.type=="string"&&R.includes(s.type)||o!==void 0&&t(o)});return e.length?_(e,y(n)):new Set}function k(n,t){const e={},s={};for(const[o,c]of Object.entries(n??{}))(t.has(m(o))?e:s)[o]=c;return{owned:e,rest:s}}function W(n){const t=n?.root,e=t&&typeof t=="object"?t.props:void 0;return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function it(n,t){if(!t)return n;const e=Y(t);if(!e.length)return n;const s=e.filter(p=>p.type===S),o=W(t),c=e.filter(p=>p.type!==S).map(p=>A(p)?V(p,o):p),f={...n,content:[...s,...d(n),...c]},{owned:a}=k(y(t),_(e,y(t)));return Object.keys(a).length&&(f.zones={...y(n)??{},...a}),f}function ct(n,t){if(!t)return{page:n,chrome:null};const e=Y(t),s=new Set(e.map(O).filter(r=>!!r)),o=[],c=[];let f=null;for(const r of d(n)){const i=O(r),l=i&&s.has(i)||Z(r?.type);if(l&&A(r)&&!f){f={};for(const I of b)r.props&&I in r.props&&(f[I]=r.props[I])}const P=L(r);l?c.push(P):o.push(P)}const a=new Map(c.map(r=>[O(r),r])),p=new Set;let u=N(d(t)).flatMap(r=>{const i=O(r);if(!i||!s.has(i))return[r];const l=a.get(i);return l?(p.add(l),[l]):[]});for(const r of c)p.has(r)||u.some(i=>i?.type===r.type)||(u=r.type===S?[r,...u]:[...u,r]);u=N(u);const D=u.length===d(t).length&&u.every((r,i)=>r===d(t)[i]||JSON.stringify(r)===JSON.stringify(d(t)[i])),j=y(n),J=_(u,j),{owned:g,rest:z}=k(j,J),F=k(y(t),_(e,y(t))).owned,E={...t,content:D?t.content:[...u]},C=Q(t,f);C!==t.root&&(E.root=C);const w=y(t);if(w||Object.keys(g).length){const r={};for(const[i,l]of Object.entries(w??{}))i in F?i in g&&(r[i]=g[i]):r[i]=l;for(const[i,l]of Object.entries(g))i in r||(r[i]=l);E.zones=r,w&&U(E.zones,w)&&(E.zones=w)}const T={...n,content:o};return j&&(Object.keys(z).length||!Object.keys(F).length?T.zones=z:delete T.zones),{page:T,chrome:E}}function Q(n,t){const e=W(n),s=q(e,t);return s===e?n.root:{...n.root&&typeof n.root=="object"?n.root:{},props:s}}function U(n,t){const e=Object.keys(n),s=Object.keys(t);return e.length===s.length&&e.every((o,c)=>o===s[c]&&n[o]===t[o])}function ft(n,t){return e=>n(e)||e!==void 0&&R.includes(e)&&t()}export{G as IN_PLACE_FOOTER_TYPES,R as PINNED_CHROME_TYPES,b as WEBSITE_KEYS,W as chromeRootProps,q as chromeRootWithFooter,rt as idsNotThePagesOwn,st as inPlaceFooterProps,ft as lockedWhileHeld,it as spliceChrome,ct as splitChrome,L as withoutWebsiteKeys};