efficient-web-builder 22.1.0 → 22.1.1

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,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 22.1.1 - 2026-10-19
4
+
5
+ A patch of 22.1.0, from `release/22.1.x`: two fixes from main (#183 and #184), without the 23.0.0 major that main holds. No stored value moves.
6
+
7
+ **The editor draws a Highlight word in the site's Highlight style** (#183; inovit.com, 2026-10-19: a `@@` word on a Collection Card drew dark grey in the editor and light gold Fraunces italic on the live site).
8
+
9
+ ### Fixed for merchants
10
+
11
+ - **The canvas publishes the site's word styles** (Highlight, Bold, Quiet), as the live page does. Before, the editor never read them. A `@@` word drew the built-in look in the editor only: the sentence's own face, no italic, and the accent of its section. In a section on a dark-accent preset that is dark grey. Every section had this fault in the editor, not only a photo card (Hero, Banner and the other on-photo copy too). The live site was correct.
12
+ - **The Header panel's logo-to-menu gap starts at the 32px the header draws** (#184; spacing scale, Lewis 2026-10-12). It showed **28** at rest, while the header draws **32** since efficient-storefront-blocks #89 put the header's gaps on the spacing scale (`gap-7` → `gap-8`). A header that never set the gap still writes no gap of its own; only the number the panel shows moves.
13
+
14
+ ### Changed for hosts
15
+
16
+ - `PreviewHeaderProvider` takes `wordStyles` (read-only, from the theme row's `word_styles`). `StorefrontEditor` passes it. A host that mounts its own provider and passes nothing keeps today's canvas.
17
+ - `lib/puck/header-clearance`: `HEADER_MENU_GAP_PX.default` is 32 (was 28).
18
+
3
19
  ## 22.1.0 - 2026-10-19
4
20
 
5
21
  **A template no longer carries a picture's focus point, on any picture or in either view** (phone focus plan, step 7; Lewis 2026-10-19: "one picture, one dot"). A patch: no stored value moves.
@@ -2,6 +2,7 @@ import { type ReactNode } from "react";
2
2
  import { type CardGap, type CardShadow, type HoverEffect, type HeadingCompression, type ResolvedHeadingTypography, type SizesValue, type ThemeMode, type ThemeValue } from "../lib/theme.js";
3
3
  import { type FontsValue } from "../lib/fonts.js";
4
4
  import type { PreviewHeaderSettings } from "../lib/preview-header-settings.js";
5
+ import type { ResolvedWordStyle, WordStyleName } from "../lib/word-styles.js";
5
6
  export type { PreviewHeaderSettings };
6
7
  type Ctx = {
7
8
  settings: PreviewHeaderSettings | null;
@@ -37,6 +38,7 @@ type Ctx = {
37
38
  setHeadingTypography: (v: ResolvedHeadingTypography) => void;
38
39
  textStyles: unknown;
39
40
  setTextStyles: (v: unknown) => void;
41
+ wordStyles: Record<WordStyleName, ResolvedWordStyle> | null;
40
42
  siteWidth: number | null;
41
43
  setSiteWidth: (v: number | null) => void;
42
44
  siteGutter: number | null;
@@ -56,7 +58,7 @@ type Ctx = {
56
58
  setSelectHandler: (fn: () => void) => void;
57
59
  };
58
60
  export declare const PreviewHeaderContext: import("react").Context<Ctx>;
59
- export declare function PreviewHeaderProvider({ children, websiteName, templateChrome, templateName, chromePlaceholder, themeMode, onThemeModeChange, themeSwitchShown, onThemeSwitchShownChange, theme, onThemeChange, fonts, onFontsChange, sizes, onSizesChange, cornerRadiusPx, onCornerRadiusPxChange, cardShadow, onCardShadowChange, shadowColor, onShadowColorChange, cardGap, onCardGapChange, hoverEffect, onHoverEffectChange, headingCompression, onHeadingCompressionChange, siteWidth, onSiteWidthChange, siteGutter, blockGap, onSiteGutterChange, onBlockGapChange, headingTypography, onHeadingTypographyChange, textStyles, onTextStylesChange, heroBackgroundFollowsWidth, onHeroBackgroundFollowsWidthChange, photographyGrayscale, onPhotographyGrayscaleChange, shareButtonOnPosts, onShareButtonOnPostsChange, themeFromDocument, }: {
61
+ export declare function PreviewHeaderProvider({ children, websiteName, templateChrome, templateName, chromePlaceholder, themeMode, onThemeModeChange, themeSwitchShown, onThemeSwitchShownChange, theme, onThemeChange, fonts, onFontsChange, sizes, onSizesChange, cornerRadiusPx, onCornerRadiusPxChange, cardShadow, onCardShadowChange, shadowColor, onShadowColorChange, cardGap, onCardGapChange, hoverEffect, onHoverEffectChange, headingCompression, onHeadingCompressionChange, siteWidth, onSiteWidthChange, siteGutter, blockGap, onSiteGutterChange, onBlockGapChange, headingTypography, onHeadingTypographyChange, textStyles, onTextStylesChange, wordStyles, heroBackgroundFollowsWidth, onHeroBackgroundFollowsWidthChange, photographyGrayscale, onPhotographyGrayscaleChange, shareButtonOnPosts, onShareButtonOnPostsChange, themeFromDocument, }: {
60
62
  children: ReactNode;
61
63
  websiteName?: string | null;
62
64
  templateChrome?: boolean;
@@ -92,6 +94,7 @@ export declare function PreviewHeaderProvider({ children, websiteName, templateC
92
94
  onSiteWidthChange?: (v: number | null) => void;
93
95
  textStyles?: unknown;
94
96
  onTextStylesChange?: (v: unknown) => void;
97
+ wordStyles?: Record<WordStyleName, ResolvedWordStyle> | null;
95
98
  headingTypography?: ResolvedHeadingTypography;
96
99
  onHeadingTypographyChange?: (v: ResolvedHeadingTypography) => void;
97
100
  heroBackgroundFollowsWidth?: boolean | null;
@@ -1 +1 @@
1
- "use client";import{jsx as y}from"react/jsx-runtime";import{createContext as gt,useCallback as e,useContext as Mt,useMemo as Rt,useState as L}from"react";import{EditorSiteLogoContext as Wt}from"./SiteLogoContext.js";import{useSelectHandler as Bt}from"../lib/puck/preview-selection-context.js";import{IDENTITY_CARD_GAP as U,DEFAULT_HEADING_COMPRESSION as O,DEFAULT_HEADING_TYPOGRAPHY as g,DEFAULT_SIZES as M,DEFAULT_SWITCH_SHOWN as R,DEFAULT_THEME_MODE as W,DEFAULT_THEME_VALUE as B}from"../lib/theme.js";import{DEFAULT_FONTS as N}from"../lib/fonts.js";const Y=gt({settings:null,setSettings:()=>{},primeSettings:()=>{},websiteName:null,templateChrome:!1,templateName:null,chromePlaceholder:!1,themeMode:W,setThemeMode:()=>{},themeSwitchShown:R,setThemeSwitchShown:()=>{},theme:B,setTheme:()=>{},fonts:N,setFonts:()=>{},sizes:M,setSizes:()=>{},cornerRadiusPx:null,setCornerRadiusPx:()=>{},cardShadow:null,setCardShadow:()=>{},shadowColor:null,setShadowColor:()=>{},cardGap:U,setCardGap:()=>{},hoverEffect:null,setHoverEffect:()=>{},headingCompression:O,setHeadingCompression:()=>{},siteWidth:null,setSiteWidth:()=>{},siteGutter:null,blockGap:null,setSiteGutter:()=>{},setBlockGap:()=>{},headingTypography:g,setHeadingTypography:()=>{},textStyles:null,setTextStyles:()=>{},heroBackgroundFollowsWidth:null,setHeroBackgroundFollowsWidth:()=>{},photographyGrayscale:null,setPhotographyGrayscale:()=>{},shareButtonOnPosts:null,setShareButtonOnPosts:()=>{},themeFromDocument:!1,selected:!1,setSelected:()=>{},select:()=>{},setSelectHandler:()=>{}});function Zt({children:j,websiteName:o=null,templateChrome:l=!1,templateName:r=null,chromePlaceholder:n=!1,themeMode:z=W,onThemeModeChange:c,themeSwitchShown:b=R,onThemeSwitchShownChange:u,theme:V=B,onThemeChange:i,fonts:Z=N,onFontsChange:d,sizes:q=M,onSizesChange:S,cornerRadiusPx:J=null,onCornerRadiusPxChange:a,cardShadow:K=null,onCardShadowChange:p,shadowColor:Q=null,onShadowColorChange:E,cardGap:X=U,onCardGapChange:f,hoverEffect:$=null,onHoverEffectChange:T,headingCompression:C=O,onHeadingCompressionChange:m,siteWidth:tt=null,onSiteWidthChange:H,siteGutter:et=null,blockGap:st=null,onSiteGutterChange:D,onBlockGapChange:_,headingTypography:lt=g,onHeadingTypographyChange:P,textStyles:ot=null,onTextStylesChange:w,heroBackgroundFollowsWidth:rt=null,onHeroBackgroundFollowsWidthChange:x,photographyGrayscale:nt=null,onPhotographyGrayscaleChange:A,shareButtonOnPosts:ct=null,onShareButtonOnPostsChange:h,themeFromDocument:ut=!1}){const[s,v]=L(null),it=e(t=>v(Ot=>Ot??t),[]),[dt,St]=L(!1),at=e(t=>c?.(t),[c]),pt=e(t=>u?.(t),[u]),Et=e(t=>i?.(t),[i]),ft=e(t=>d?.(t),[d]),Tt=e(t=>S?.(t),[S]),mt=e(t=>H?.(t),[H]),Ht=e(t=>D?.(t),[D]),Dt=e(t=>_?.(t),[_]),_t=e(t=>x?.(t),[x]),Pt=e(t=>A?.(t),[A]),wt=e(t=>h?.(t),[h]),xt=e(t=>a?.(t),[a]),At=e(t=>p?.(t),[p]),ht=e(t=>E?.(t),[E]),vt=e(t=>f?.(t),[f]),Ft=e(t=>T?.(t),[T]),Gt=e(t=>m?.(t),[m]),It=e(t=>P?.(t),[P]),kt=e(t=>w?.(t),[w]),{select:yt,setSelectHandler:Lt}=Bt(),F=s?.logoUrl,G=s?.logoReversed,I=s?.logoInkIsDark,k=s!==null,Ut=Rt(()=>({logo:k?{logoUrl:F,logoReversed:G,logoInkIsDark:I}:null,placeholder:l||n,wordmark:l?r:o}),[k,F,G,I,l,n,r,o]);return y(Wt.Provider,{value:Ut,children:y(Y.Provider,{value:{settings:s,setSettings:v,primeSettings:it,websiteName:o,templateChrome:l,templateName:r,chromePlaceholder:n,themeMode:z,setThemeMode:at,themeSwitchShown:b,setThemeSwitchShown:pt,theme:V,setTheme:Et,fonts:Z,setFonts:ft,sizes:q,setSizes:Tt,cornerRadiusPx:J,setCornerRadiusPx:xt,cardShadow:K,setCardShadow:At,shadowColor:Q,setShadowColor:ht,cardGap:X,setCardGap:vt,hoverEffect:$,setHoverEffect:Ft,headingCompression:C,setHeadingCompression:Gt,siteWidth:tt,setSiteWidth:mt,siteGutter:et,blockGap:st,setSiteGutter:Ht,setBlockGap:Dt,headingTypography:lt,setHeadingTypography:It,textStyles:ot,setTextStyles:kt,heroBackgroundFollowsWidth:rt,setHeroBackgroundFollowsWidth:_t,photographyGrayscale:nt,setPhotographyGrayscale:Pt,shareButtonOnPosts:ct,setShareButtonOnPosts:wt,themeFromDocument:ut,selected:dt,setSelected:St,select:yt,setSelectHandler:Lt},children:j})})}const qt=()=>Mt(Y);export{Y as PreviewHeaderContext,Zt as PreviewHeaderProvider,qt as usePreviewHeader};
1
+ "use client";import{jsx as k}from"react/jsx-runtime";import{createContext as Mt,useCallback as e,useContext as Rt,useMemo as Wt,useState as L}from"react";import{EditorSiteLogoContext as Bt}from"./SiteLogoContext.js";import{useSelectHandler as Nt}from"../lib/puck/preview-selection-context.js";import{IDENTITY_CARD_GAP as U,DEFAULT_HEADING_COMPRESSION as O,DEFAULT_HEADING_TYPOGRAPHY as g,DEFAULT_SIZES as M,DEFAULT_SWITCH_SHOWN as R,DEFAULT_THEME_MODE as W,DEFAULT_THEME_VALUE as B}from"../lib/theme.js";import{DEFAULT_FONTS as N}from"../lib/fonts.js";const Y=Mt({settings:null,setSettings:()=>{},primeSettings:()=>{},websiteName:null,templateChrome:!1,templateName:null,chromePlaceholder:!1,themeMode:W,setThemeMode:()=>{},themeSwitchShown:R,setThemeSwitchShown:()=>{},theme:B,setTheme:()=>{},fonts:N,setFonts:()=>{},sizes:M,setSizes:()=>{},cornerRadiusPx:null,setCornerRadiusPx:()=>{},cardShadow:null,setCardShadow:()=>{},shadowColor:null,setShadowColor:()=>{},cardGap:U,setCardGap:()=>{},hoverEffect:null,setHoverEffect:()=>{},headingCompression:O,setHeadingCompression:()=>{},siteWidth:null,setSiteWidth:()=>{},siteGutter:null,blockGap:null,setSiteGutter:()=>{},setBlockGap:()=>{},headingTypography:g,setHeadingTypography:()=>{},textStyles:null,setTextStyles:()=>{},wordStyles:null,heroBackgroundFollowsWidth:null,setHeroBackgroundFollowsWidth:()=>{},photographyGrayscale:null,setPhotographyGrayscale:()=>{},shareButtonOnPosts:null,setShareButtonOnPosts:()=>{},themeFromDocument:!1,selected:!1,setSelected:()=>{},select:()=>{},setSelectHandler:()=>{}});function qt({children:j,websiteName:o=null,templateChrome:l=!1,templateName:r=null,chromePlaceholder:n=!1,themeMode:z=W,onThemeModeChange:c,themeSwitchShown:b=R,onThemeSwitchShownChange:u,theme:V=B,onThemeChange:i,fonts:Z=N,onFontsChange:d,sizes:q=M,onSizesChange:S,cornerRadiusPx:J=null,onCornerRadiusPxChange:a,cardShadow:K=null,onCardShadowChange:p,shadowColor:Q=null,onShadowColorChange:E,cardGap:X=U,onCardGapChange:f,hoverEffect:$=null,onHoverEffectChange:T,headingCompression:C=O,onHeadingCompressionChange:m,siteWidth:tt=null,onSiteWidthChange:H,siteGutter:et=null,blockGap:st=null,onSiteGutterChange:D,onBlockGapChange:_,headingTypography:lt=g,onHeadingTypographyChange:w,textStyles:ot=null,onTextStylesChange:P,wordStyles:rt=null,heroBackgroundFollowsWidth:nt=null,onHeroBackgroundFollowsWidthChange:x,photographyGrayscale:ct=null,onPhotographyGrayscaleChange:A,shareButtonOnPosts:ut=null,onShareButtonOnPostsChange:h,themeFromDocument:it=!1}){const[s,v]=L(null),dt=e(t=>v(gt=>gt??t),[]),[St,at]=L(!1),pt=e(t=>c?.(t),[c]),Et=e(t=>u?.(t),[u]),ft=e(t=>i?.(t),[i]),Tt=e(t=>d?.(t),[d]),mt=e(t=>S?.(t),[S]),Ht=e(t=>H?.(t),[H]),Dt=e(t=>D?.(t),[D]),_t=e(t=>_?.(t),[_]),wt=e(t=>x?.(t),[x]),Pt=e(t=>A?.(t),[A]),xt=e(t=>h?.(t),[h]),At=e(t=>a?.(t),[a]),ht=e(t=>p?.(t),[p]),vt=e(t=>E?.(t),[E]),Ft=e(t=>f?.(t),[f]),Gt=e(t=>T?.(t),[T]),yt=e(t=>m?.(t),[m]),It=e(t=>w?.(t),[w]),kt=e(t=>P?.(t),[P]),{select:Lt,setSelectHandler:Ut}=Nt(),F=s?.logoUrl,G=s?.logoReversed,y=s?.logoInkIsDark,I=s!==null,Ot=Wt(()=>({logo:I?{logoUrl:F,logoReversed:G,logoInkIsDark:y}:null,placeholder:l||n,wordmark:l?r:o}),[I,F,G,y,l,n,r,o]);return k(Bt.Provider,{value:Ot,children:k(Y.Provider,{value:{settings:s,setSettings:v,primeSettings:dt,websiteName:o,templateChrome:l,templateName:r,chromePlaceholder:n,themeMode:z,setThemeMode:pt,themeSwitchShown:b,setThemeSwitchShown:Et,theme:V,setTheme:ft,fonts:Z,setFonts:Tt,sizes:q,setSizes:mt,cornerRadiusPx:J,setCornerRadiusPx:At,cardShadow:K,setCardShadow:ht,shadowColor:Q,setShadowColor:vt,cardGap:X,setCardGap:Ft,hoverEffect:$,setHoverEffect:Gt,headingCompression:C,setHeadingCompression:yt,siteWidth:tt,setSiteWidth:Ht,siteGutter:et,blockGap:st,setSiteGutter:Dt,setBlockGap:_t,headingTypography:lt,setHeadingTypography:It,textStyles:ot,setTextStyles:kt,wordStyles:rt,heroBackgroundFollowsWidth:nt,setHeroBackgroundFollowsWidth:wt,photographyGrayscale:ct,setPhotographyGrayscale:Pt,shareButtonOnPosts:ut,setShareButtonOnPosts:xt,themeFromDocument:it,selected:St,setSelected:at,select:Lt,setSelectHandler:Ut},children:j})})}const Jt=()=>Rt(Y);export{Y as PreviewHeaderContext,qt as PreviewHeaderProvider,Jt as usePreviewHeader};
@@ -1 +1 @@
1
- "use client";import{jsx as s,jsxs as it}from"react/jsx-runtime";import{useCallback as a,useEffect as p,useMemo as M,useRef as S,useState as r}from"react";import"efficient-easel/easel.css";import"efficient-easel/shell.css";import"efficient-easel/rail.css";import"efficient-easel/panel.css";import"efficient-easel/fields.css";import"efficient-easel/pick.css";import"efficient-easel/copy.css";import"efficient-easel/gold.css";import"efficient-easel/text-styles.css";import"efficient-easel/menu.css";import"efficient-easel/chrome.css";import"efficient-easel/tree.css";import"efficient-easel/drag.css";import"efficient-easel/screen.css";import"./storefront-editor.css";import{buildConfig as ct}from"../lib/puck/build-config.js";import{ChromeWrap as st}from"../lib/editor-chrome.js";import{sessionRegistry as dt}from"../lib/editor-session.js";import{backendOf as G,blocksOf as ut}from"../lib/website-session.js";import{useEditorSession as ht}from"../lib/editor-session-context.js";import{withSiteBlockGapFields as lt}from"../lib/puck/site-gap-fields.js";import{withTemplateMediaPlaceholders as mt}from"../lib/puck/templateFields.js";import{setEditorPage as de}from"../lib/puck/editor-page-context.js";import{resolveSiteName as pt}from"../lib/content/site-name.js";import{normalizeSiteGutter as St,normalizeSiteWidth as ft}from"../lib/content/page-width.js";import{normalizeSiteBlockGap as gt}from"../lib/content/container-gap.js";import wt,{DocumentScreen as Ct}from"./EditorScreenMount.js";import{useStorefrontDocument as Tt}from"./StorefrontDocumentContext.js";import{PreviewHeaderProvider as _t}from"./PreviewHeaderContext.js";import{PreviewFooterProvider as Et}from"./PreviewFooterContext.js";import{PreviewChatProvider as yt,DEFAULT_CHAT_PREVIEW as Pt}from"./PreviewChatContext.js";import{PreviewSocialProvider as vt}from"./PreviewSocialContext.js";import{useSocialSettings as Ht}from"./useSocialSettings.js";import{PreviewSurfaceProvider as It}from"./PreviewSurfaceContext.js";import{WEBSITE_ADDRESSING as Mt}from"../lib/website-document-addressing.js";import{PreviewTickerProvider as Gt}from"./PreviewTickerContext.js";import{PreviewHeroPartProvider as Rt}from"./PreviewHeroPartContext.js";import{PreviewPartsProvider as Ft}from"./PreviewPartsContext.js";import{PreviewLocationPartProvider as kt}from"./PreviewLocationPartContext.js";import{PreviewPartStyleProvider as At}from"./PreviewPartStyleContext.js";import{SiteMapsProvider as Dt,readSiteMapsKey as Wt,writeSiteMapsKey as ue,readSiteMapId as xt,writeSiteMapId as Bt}from"../lib/maps-config.js";import{CORNER_STYLE_TO_PX as Nt,DEFAULT_HEADING_COMPRESSION as Ot,DEFAULT_HEADING_TYPOGRAPHY as bt,DEFAULT_SWITCH_SHOWN as R,DEFAULT_SIZES as zt,DEFAULT_THEME_MODE as C,normalizeCornerRadius as Kt,normalizeCornerStyle as Lt,normalizeCardShadow as Yt,normalizeCardGap as Ut,normalizeHoverEffect as jt,normalizeShadowColor as Vt,IDENTITY_CARD_GAP as he,IDENTITY_CARD_SHADOW as Xt,IDENTITY_HOVER_EFFECT as Zt,THEME_MODE_KEY as le,THEME_STORAGE_KEY as qt,THEME_SWITCH_HIDE as me,THEME_SWITCH_KEY as F}from"../lib/theme.js";import{DEFAULT_FONTS as Jt}from"../lib/fonts.js";import{WEBSITE_SCREEN as Qt}from"./WebsiteScreenParts.js";import{routeWebsiteHostMessage as $t}from"../lib/website-host-inbound.js";import{siteTextFromRow as er}from"../lib/site-text-styles.js";import{chatPreviewFrom as tr}from"./PreviewChatContext.js";const rr=()=>{if(typeof window>"u")return C;try{const i=window.localStorage.getItem(le);return i==="light"||i==="dark"||i==="auto"?i:C}catch{return C}},pe=i=>{if(!(typeof window>"u"))try{window.localStorage.setItem(le,i)}catch{}},or=()=>{if(typeof window>"u")return R;try{return window.localStorage.getItem(F)!==me}catch{return R}},nr=()=>{if(!(typeof window>"u"))try{window.localStorage.removeItem(qt)}catch{}},Se=i=>{if(!(typeof window>"u"))try{i?window.localStorage.removeItem(F):window.localStorage.setItem(F,me)}catch{}};function ar(){const{adapter:i,capabilities:d,templateId:k,ready:f,token:l,siteId:c,currentSlug:A,currentKind:D}=Tt();p(()=>(de(A,D),()=>de(null,null)),[A,D]);const T=d.placeholderFrames,[fe,W]=r(null),[ge,x]=r("");p(()=>{const e=i.templateName;if(!f||!k||!e){x("");return}let o=!1;return e().then(u=>!o&&x(u??"")).catch(()=>{}),()=>{o=!0}},[f,l,k,i]);const[we,_]=r(C),[Ce,E]=r(R),[Te,B]=r({selected:0,themes:[]}),[_e,N]=r(Jt),[Ee,O]=r(zt),[ye,b]=r(null),[Pe,z]=r(Ot),[ve,K]=r(null),[He,L]=r(null),[Ie,Y]=r(he),[Me,U]=r(null),[Ge,j]=r(null),[Re,V]=r(null),[y,X]=r(null),h=ht(),Z=M(()=>ct(dt(h),ut(h)),[h]),Fe=M(()=>lt(mt(Z,T),y),[Z,T,y]),[ke,q]=r(bt),[Ae,J]=r(null),[De,Q]=r(null),[We,$]=r(null),ee=S(null),n=S(!1);p(()=>{_(rr()),E(or())},[]);const xe=a(e=>{n.current=!0,nr(),pe(e),_(e)},[]),Be=a(e=>{n.current=!0,Se(e),E(e)},[]),Ne=a(e=>{n.current=!0,B(e)},[]),Oe=a(e=>{n.current=!0,N(e)},[]),be=a(e=>{n.current=!0,O(e)},[]),ze=a(e=>{n.current=!0,b(e)},[]),Ke=a(e=>{n.current=!0,z(e)},[]),Le=a(e=>{n.current=!0,K(e)},[]),Ye=a(e=>{n.current=!0,L(e)},[]),Ue=a(e=>{n.current=!0,Y(e)},[]),je=a(e=>{n.current=!0,U(e)},[]),Ve=a(e=>{n.current=!0,q(e)},[]),[Xe,te]=r(null),Ze=a(e=>{n.current=!0,te(e)},[]),qe=a(e=>{n.current=!0,j(e)},[]),Je=a(e=>{n.current=!0,V(e)},[]),Qe=a(e=>{n.current=!0,X(e)},[]),$e=a(e=>{n.current=!0,J(e)},[]),et=a(e=>{n.current=!0,Q(e)},[]),tt=a(e=>{n.current=!0,$(e)},[]);p(()=>{const e=G(h).theme;if(!l||!d.hasSiteTheme||!e)return;const o=c??"";ee.current!==o&&(ee.current=o,n.current=!1);let u=!1;return e.get(c?{siteId:c}:void 0).then(t=>{if(u||n.current)return;pe(t.default_mode),Se(t.show_theme_switch),_(t.default_mode),E(t.show_theme_switch),B({selected:t.selected_preset,themes:t.theme_presets});const m=er(t);N(m.fonts),O(m.sizes),b(t.corner_radius_px===void 0?Nt[Lt(t.corner_style)]:Kt(t.corner_radius_px)),z(m.compression),K(t.card_shadow==null?Xt:Yt(t.card_shadow)),Y(t.card_gap==null?he:Ut(t.card_gap)),U(t.hover_effect==null?Zt:jt(t.hover_effect)),L(Vt(t.shadow_color)),j(ft(t.site_width)),V(St(t.site_gutter)),X(gt(t.block_gap)),q(m.typography),te(m.textStyles),J(t.hero_background_follows_width===!0),Q(t.photography_grayscale===!0),$(t.share_button_on_posts===!0)}).catch(()=>{}),()=>{u=!0}},[l,c,d.hasSiteTheme,h]);const rt=Ht({token:l,siteId:c,enabled:d.hasSiteSettings}),[ot,re]=r(Pt),oe=S(null),P=S(!1),v=S(null),g=S({}),nt=a(e=>{P.current=!0,re(o=>({...o,...e})),!(!d.hasSiteSettings||!l)&&(g.current={...g.current,...e},v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{const o=g.current;g.current={},G(h).chat?.update(o,c?{siteId:c}:void 0).catch(()=>{})},500))},[d.hasSiteSettings,l,c,h]);p(()=>{if(!l||!d.hasSiteSettings)return;const e=c??"";oe.current!==e&&(oe.current=e,P.current=!1);let o=!1;const u=G(h).chat;if(u)return u.get(c?{siteId:c}:void 0).then(t=>{o||P.current||re(tr(t))}).catch(()=>{}),()=>{o=!0}},[l,c,d.hasSiteSettings,h]);const[w,H]=r(""),ne=S(null),I=S(!1);p(()=>H(Wt()),[]);const ae=a(e=>{const o=e.trim();if(o===w)return;I.current=!0,ue(o),H(o);const u=i.updateSite;!d.canEditSiteRecord||!f||!u||u({mapsApiKey:o}).catch(()=>{})},[w,d.canEditSiteRecord,f,i]),[ie,ce]=r("");p(()=>ce(xt()),[]),p(()=>{const e=i.site;if(!f||!d.hasSiteRecord||!e){W(null);return}const o=c??"";ne.current!==o&&(ne.current=o,I.current=!1);let u=!1;return e().then(t=>{if(u||(W(pt(t.name)),I.current))return;const m=t.mapsApiKey??"";ue(m),H(m);const se=t.mapsMapId??"";Bt(se),ce(se)}).catch(()=>{}),()=>{u=!0}},[f,l,d.hasSiteRecord,c,i]);const at=M(()=>({apiKey:w,setApiKey:ae,mapId:ie}),[w,ae,ie]);return s(Ct,{config:Fe,parts:Qt,wrap:(e,o)=>s(_t,{websiteName:fe,templateChrome:T,templateName:ge||null,themeMode:we,onThemeModeChange:xe,themeSwitchShown:Ce,onThemeSwitchShownChange:Be,theme:Te,onThemeChange:Ne,fonts:_e,onFontsChange:Oe,cornerRadiusPx:ye,onCornerRadiusPxChange:ze,cardShadow:ve,onCardShadowChange:Le,shadowColor:He,onShadowColorChange:Ye,cardGap:Ie,onCardGapChange:Ue,hoverEffect:Me,onHoverEffectChange:je,headingCompression:Pe,onHeadingCompressionChange:Ke,headingTypography:ke,onHeadingTypographyChange:Ve,textStyles:Xe,onTextStylesChange:Ze,sizes:Ee,onSizesChange:be,siteWidth:Ge,onSiteWidthChange:qe,siteGutter:Re,onSiteGutterChange:Je,blockGap:y,onBlockGapChange:Qe,heroBackgroundFollowsWidth:Ae,onHeroBackgroundFollowsWidthChange:$e,photographyGrayscale:De,onPhotographyGrayscaleChange:et,shareButtonOnPosts:We,onShareButtonOnPostsChange:tt,themeFromDocument:!d.hasSiteTheme,children:s(Et,{children:s(st,{wrap:h.chrome?.wrap,surface:"page",children:s(Gt,{children:s(Rt,{children:s(Ft,{children:s(kt,{children:s(At,{children:it(Dt,{value:at,children:[s(yt,{chat:ot,onChatChange:nt,children:s(vt,{value:rt,children:s(It,{children:e})})}),o]})})})})})})})})})})}function ir({target:i}){return s(wt,{target:i,addressing:Mt,onHostMessage:$t,children:s(ar,{})})}export{ir as default};
1
+ "use client";import{jsx as c,jsxs as ct}from"react/jsx-runtime";import{useCallback as a,useEffect as p,useMemo as M,useRef as S,useState as r}from"react";import"efficient-easel/easel.css";import"efficient-easel/shell.css";import"efficient-easel/rail.css";import"efficient-easel/panel.css";import"efficient-easel/fields.css";import"efficient-easel/pick.css";import"efficient-easel/copy.css";import"efficient-easel/gold.css";import"efficient-easel/text-styles.css";import"efficient-easel/menu.css";import"efficient-easel/chrome.css";import"efficient-easel/tree.css";import"efficient-easel/drag.css";import"efficient-easel/screen.css";import"./storefront-editor.css";import{buildConfig as dt}from"../lib/puck/build-config.js";import{ChromeWrap as ut}from"../lib/editor-chrome.js";import{sessionRegistry as ht}from"../lib/editor-session.js";import{backendOf as R,blocksOf as lt}from"../lib/website-session.js";import{useEditorSession as mt}from"../lib/editor-session-context.js";import{withSiteBlockGapFields as pt}from"../lib/puck/site-gap-fields.js";import{withTemplateMediaPlaceholders as St}from"../lib/puck/templateFields.js";import{setEditorPage as de}from"../lib/puck/editor-page-context.js";import{resolveSiteName as ft}from"../lib/content/site-name.js";import{normalizeSiteGutter as gt,normalizeSiteWidth as wt}from"../lib/content/page-width.js";import{normalizeSiteBlockGap as Ct}from"../lib/content/container-gap.js";import Tt,{DocumentScreen as _t}from"./EditorScreenMount.js";import{useStorefrontDocument as Et}from"./StorefrontDocumentContext.js";import{PreviewHeaderProvider as yt}from"./PreviewHeaderContext.js";import{PreviewFooterProvider as Pt}from"./PreviewFooterContext.js";import{PreviewChatProvider as vt,DEFAULT_CHAT_PREVIEW as Ht}from"./PreviewChatContext.js";import{PreviewSocialProvider as It}from"./PreviewSocialContext.js";import{useSocialSettings as Mt}from"./useSocialSettings.js";import{PreviewSurfaceProvider as Rt}from"./PreviewSurfaceContext.js";import{WEBSITE_ADDRESSING as Gt}from"../lib/website-document-addressing.js";import{PreviewTickerProvider as Ft}from"./PreviewTickerContext.js";import{PreviewHeroPartProvider as Wt}from"./PreviewHeroPartContext.js";import{PreviewPartsProvider as kt}from"./PreviewPartsContext.js";import{PreviewLocationPartProvider as At}from"./PreviewLocationPartContext.js";import{PreviewPartStyleProvider as Dt}from"./PreviewPartStyleContext.js";import{SiteMapsProvider as xt,readSiteMapsKey as Bt,writeSiteMapsKey as ue,readSiteMapId as Nt,writeSiteMapId as Ot}from"../lib/maps-config.js";import{CORNER_STYLE_TO_PX as bt,DEFAULT_HEADING_COMPRESSION as zt,DEFAULT_HEADING_TYPOGRAPHY as Kt,DEFAULT_SWITCH_SHOWN as G,DEFAULT_SIZES as Lt,DEFAULT_THEME_MODE as C,normalizeCornerRadius as Yt,normalizeCornerStyle as Ut,normalizeCardShadow as jt,normalizeCardGap as Vt,normalizeHoverEffect as Xt,normalizeShadowColor as Zt,IDENTITY_CARD_GAP as he,IDENTITY_CARD_SHADOW as qt,IDENTITY_HOVER_EFFECT as Jt,THEME_MODE_KEY as le,THEME_STORAGE_KEY as Qt,THEME_SWITCH_HIDE as me,THEME_SWITCH_KEY as F}from"../lib/theme.js";import{DEFAULT_FONTS as $t}from"../lib/fonts.js";import{WEBSITE_SCREEN as er}from"./WebsiteScreenParts.js";import{routeWebsiteHostMessage as tr}from"../lib/website-host-inbound.js";import{siteTextFromRow as rr}from"../lib/site-text-styles.js";import{wordStylesFromRow as or}from"../lib/word-styles.js";import{chatPreviewFrom as nr}from"./PreviewChatContext.js";const ar=()=>{if(typeof window>"u")return C;try{const i=window.localStorage.getItem(le);return i==="light"||i==="dark"||i==="auto"?i:C}catch{return C}},pe=i=>{if(!(typeof window>"u"))try{window.localStorage.setItem(le,i)}catch{}},ir=()=>{if(typeof window>"u")return G;try{return window.localStorage.getItem(F)!==me}catch{return G}},sr=()=>{if(!(typeof window>"u"))try{window.localStorage.removeItem(Qt)}catch{}},Se=i=>{if(!(typeof window>"u"))try{i?window.localStorage.removeItem(F):window.localStorage.setItem(F,me)}catch{}};function cr(){const{adapter:i,capabilities:d,templateId:W,ready:f,token:l,siteId:s,currentSlug:k,currentKind:A}=Et();p(()=>(de(k,A),()=>de(null,null)),[k,A]);const T=d.placeholderFrames,[fe,D]=r(null),[ge,x]=r("");p(()=>{const e=i.templateName;if(!f||!W||!e){x("");return}let o=!1;return e().then(u=>!o&&x(u??"")).catch(()=>{}),()=>{o=!0}},[f,l,W,i]);const[we,_]=r(C),[Ce,E]=r(G),[Te,B]=r({selected:0,themes:[]}),[_e,N]=r($t),[Ee,O]=r(Lt),[ye,b]=r(null),[Pe,z]=r(zt),[ve,K]=r(null),[He,L]=r(null),[Ie,Y]=r(he),[Me,U]=r(null),[Re,j]=r(null),[Ge,V]=r(null),[y,X]=r(null),h=mt(),Z=M(()=>dt(ht(h),lt(h)),[h]),Fe=M(()=>pt(St(Z,T),y),[Z,T,y]),[We,q]=r(Kt),[ke,J]=r(null),[Ae,Q]=r(null),[De,$]=r(null),ee=S(null),n=S(!1);p(()=>{_(ar()),E(ir())},[]);const xe=a(e=>{n.current=!0,sr(),pe(e),_(e)},[]),Be=a(e=>{n.current=!0,Se(e),E(e)},[]),Ne=a(e=>{n.current=!0,B(e)},[]),Oe=a(e=>{n.current=!0,N(e)},[]),be=a(e=>{n.current=!0,O(e)},[]),ze=a(e=>{n.current=!0,b(e)},[]),Ke=a(e=>{n.current=!0,z(e)},[]),Le=a(e=>{n.current=!0,K(e)},[]),Ye=a(e=>{n.current=!0,L(e)},[]),Ue=a(e=>{n.current=!0,Y(e)},[]),je=a(e=>{n.current=!0,U(e)},[]),Ve=a(e=>{n.current=!0,q(e)},[]),[Xe,te]=r(null),[Ze,qe]=r(null),Je=a(e=>{n.current=!0,te(e)},[]),Qe=a(e=>{n.current=!0,j(e)},[]),$e=a(e=>{n.current=!0,V(e)},[]),et=a(e=>{n.current=!0,X(e)},[]),tt=a(e=>{n.current=!0,J(e)},[]),rt=a(e=>{n.current=!0,Q(e)},[]),ot=a(e=>{n.current=!0,$(e)},[]);p(()=>{const e=R(h).theme;if(!l||!d.hasSiteTheme||!e)return;const o=s??"";ee.current!==o&&(ee.current=o,n.current=!1);let u=!1;return e.get(s?{siteId:s}:void 0).then(t=>{if(u||n.current)return;pe(t.default_mode),Se(t.show_theme_switch),_(t.default_mode),E(t.show_theme_switch),B({selected:t.selected_preset,themes:t.theme_presets});const m=rr(t);N(m.fonts),O(m.sizes),b(t.corner_radius_px===void 0?bt[Ut(t.corner_style)]:Yt(t.corner_radius_px)),z(m.compression),K(t.card_shadow==null?qt:jt(t.card_shadow)),Y(t.card_gap==null?he:Vt(t.card_gap)),U(t.hover_effect==null?Jt:Xt(t.hover_effect)),L(Zt(t.shadow_color)),j(wt(t.site_width)),V(gt(t.site_gutter)),X(Ct(t.block_gap)),q(m.typography),te(m.textStyles),qe(or(t)),J(t.hero_background_follows_width===!0),Q(t.photography_grayscale===!0),$(t.share_button_on_posts===!0)}).catch(()=>{}),()=>{u=!0}},[l,s,d.hasSiteTheme,h]);const nt=Mt({token:l,siteId:s,enabled:d.hasSiteSettings}),[at,re]=r(Ht),oe=S(null),P=S(!1),v=S(null),g=S({}),it=a(e=>{P.current=!0,re(o=>({...o,...e})),!(!d.hasSiteSettings||!l)&&(g.current={...g.current,...e},v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{const o=g.current;g.current={},R(h).chat?.update(o,s?{siteId:s}:void 0).catch(()=>{})},500))},[d.hasSiteSettings,l,s,h]);p(()=>{if(!l||!d.hasSiteSettings)return;const e=s??"";oe.current!==e&&(oe.current=e,P.current=!1);let o=!1;const u=R(h).chat;if(u)return u.get(s?{siteId:s}:void 0).then(t=>{o||P.current||re(nr(t))}).catch(()=>{}),()=>{o=!0}},[l,s,d.hasSiteSettings,h]);const[w,H]=r(""),ne=S(null),I=S(!1);p(()=>H(Bt()),[]);const ae=a(e=>{const o=e.trim();if(o===w)return;I.current=!0,ue(o),H(o);const u=i.updateSite;!d.canEditSiteRecord||!f||!u||u({mapsApiKey:o}).catch(()=>{})},[w,d.canEditSiteRecord,f,i]),[ie,se]=r("");p(()=>se(Nt()),[]),p(()=>{const e=i.site;if(!f||!d.hasSiteRecord||!e){D(null);return}const o=s??"";ne.current!==o&&(ne.current=o,I.current=!1);let u=!1;return e().then(t=>{if(u||(D(ft(t.name)),I.current))return;const m=t.mapsApiKey??"";ue(m),H(m);const ce=t.mapsMapId??"";Ot(ce),se(ce)}).catch(()=>{}),()=>{u=!0}},[f,l,d.hasSiteRecord,s,i]);const st=M(()=>({apiKey:w,setApiKey:ae,mapId:ie}),[w,ae,ie]);return c(_t,{config:Fe,parts:er,wrap:(e,o)=>c(yt,{websiteName:fe,templateChrome:T,templateName:ge||null,themeMode:we,onThemeModeChange:xe,themeSwitchShown:Ce,onThemeSwitchShownChange:Be,theme:Te,onThemeChange:Ne,fonts:_e,onFontsChange:Oe,cornerRadiusPx:ye,onCornerRadiusPxChange:ze,cardShadow:ve,onCardShadowChange:Le,shadowColor:He,onShadowColorChange:Ye,cardGap:Ie,onCardGapChange:Ue,hoverEffect:Me,onHoverEffectChange:je,headingCompression:Pe,onHeadingCompressionChange:Ke,headingTypography:We,onHeadingTypographyChange:Ve,textStyles:Xe,onTextStylesChange:Je,wordStyles:Ze,sizes:Ee,onSizesChange:be,siteWidth:Re,onSiteWidthChange:Qe,siteGutter:Ge,onSiteGutterChange:$e,blockGap:y,onBlockGapChange:et,heroBackgroundFollowsWidth:ke,onHeroBackgroundFollowsWidthChange:tt,photographyGrayscale:Ae,onPhotographyGrayscaleChange:rt,shareButtonOnPosts:De,onShareButtonOnPostsChange:ot,themeFromDocument:!d.hasSiteTheme,children:c(Pt,{children:c(ut,{wrap:h.chrome?.wrap,surface:"page",children:c(Ft,{children:c(Wt,{children:c(kt,{children:c(At,{children:c(Dt,{children:ct(xt,{value:st,children:[c(vt,{chat:at,onChatChange:it,children:c(It,{value:nt,children:c(Rt,{children:e})})}),o]})})})})})})})})})})}function dr({target:i}){return c(Tt,{target:i,addressing:Gt,onHostMessage:tr,children:c(cr,{})})}export{dr as default};
@@ -8,7 +8,7 @@ export declare const HEADER_MENU_GAP_PX: {
8
8
  readonly min: 0;
9
9
  readonly max: 120;
10
10
  readonly step: 2;
11
- readonly default: 28;
11
+ readonly default: 32;
12
12
  };
13
13
  export declare const HEADER_HEIGHT_CSS: string;
14
14
  export declare const HEADER_SET_HEIGHT_VAR = "--sf-header-set-h";
@@ -1 +1 @@
1
- import{HEADER_TYPE as o,FOOTER_TYPE as a}from"./content-tree.js";const E=new Set(["Hero","HeroSingle","IntroBleed"]),n={min:56,max:140,default:88},A={min:0,max:120,step:2,default:28},H=`var(--sf-header-h, ${n.default}px)`,s="--sf-header-set-h",d="--sf-header-h",l=`var(${s}, ${n.default}px)`,T="sf-header-clearance",R="sf-sticky-underheader";function c(e){return e?.find(t=>t?.type&&t.type!==o)??null}function p(e){const t=c(e)?.type;return!t||!E.has(t)}function D(e){return!p(e)}function P(e){return!!e?.some(t=>t?.type===o)}function h(e){return!e||e.length===0?!1:!e.some(t=>t?.type===o||t?.type===a)}const u=["auto","shared","own"],_="auto",S="topSpace",C="data-top-space";function f(e){return u.includes(e)?e:_}function x(e,t){const r=f(e?.props?.[S]);return r==="own"?!0:r==="shared"?!1:p(t)}function m(e,t){return x(e,t)?"own":null}export{_ as DEFAULT_TOP_SPACE,E as FULLBLEED_LEAD_SECTIONS,T as HEADER_CLEARANCE_CLASS,d as HEADER_DRAWN_HEIGHT_VAR,H as HEADER_HEIGHT_CSS,n as HEADER_HEIGHT_PX,A as HEADER_MENU_GAP_PX,l as HEADER_SET_HEIGHT_CSS,s as HEADER_SET_HEIGHT_VAR,R as STICKY_UNDERHEADER_CLASS,C as TOP_SPACE_ATTR,u as TOP_SPACE_MODES,S as TOP_SPACE_PROP,h as isStandaloneSectionDocument,c as leadSection,p as pageClearsHeader,P as pageHasHeaderSection,D as pageLeadsWithFullBleed,x as pageTakesTopSpace,f as resolveTopSpace,m as topSpaceMarker};
1
+ import{HEADER_TYPE as o,FOOTER_TYPE as a}from"./content-tree.js";const E=new Set(["Hero","HeroSingle","IntroBleed"]),n={min:56,max:140,default:88},A={min:0,max:120,step:2,default:32},H=`var(--sf-header-h, ${n.default}px)`,s="--sf-header-set-h",d="--sf-header-h",l=`var(${s}, ${n.default}px)`,T="sf-header-clearance",R="sf-sticky-underheader";function c(e){return e?.find(t=>t?.type&&t.type!==o)??null}function p(e){const t=c(e)?.type;return!t||!E.has(t)}function D(e){return!p(e)}function P(e){return!!e?.some(t=>t?.type===o)}function h(e){return!e||e.length===0?!1:!e.some(t=>t?.type===o||t?.type===a)}const u=["auto","shared","own"],_="auto",S="topSpace",C="data-top-space";function f(e){return u.includes(e)?e:_}function x(e,t){const r=f(e?.props?.[S]);return r==="own"?!0:r==="shared"?!1:p(t)}function m(e,t){return x(e,t)?"own":null}export{_ as DEFAULT_TOP_SPACE,E as FULLBLEED_LEAD_SECTIONS,T as HEADER_CLEARANCE_CLASS,d as HEADER_DRAWN_HEIGHT_VAR,H as HEADER_HEIGHT_CSS,n as HEADER_HEIGHT_PX,A as HEADER_MENU_GAP_PX,l as HEADER_SET_HEIGHT_CSS,s as HEADER_SET_HEIGHT_VAR,R as STICKY_UNDERHEADER_CLASS,C as TOP_SPACE_ATTR,u as TOP_SPACE_MODES,S as TOP_SPACE_PROP,h as isStandaloneSectionDocument,c as leadSection,p as pageClearsHeader,P as pageHasHeaderSection,D as pageLeadsWithFullBleed,x as pageTakesTopSpace,f as resolveTopSpace,m as topSpaceMarker};
@@ -1,2 +1,2 @@
1
- import{jsx as r,jsxs as A}from"react/jsx-runtime";import{accentItalicCss as K,storedTextStyles as Y,textStylesCss as q}from"../site-text-styles.js";import{pageWidthMarker as J,PAGE_WIDTH_ATTR as Q,SITE_WIDTH_CAP as U,siteWidthTokens as Z,siteGutterTokens as ee,heroBackgroundTokens as te}from"../content/page-width.js";import{siteBlockGapTokens as oe}from"../content/container-gap.js";import{siteCardRadiusTokens as ne}from"../content/card-corners.js";import{usePreviewHeader as re}from"../../components/PreviewHeaderContext.js";import{SitePhotographyProvider as ae}from"../../components/SitePhotographyContext.js";import{CORNER_STYLE_TO_PX as se,normalizeCornerStyle as ie,normalizeCornerRadius as de,themeColorStyle as ce,typeSizesStyle as le,headingTypographyStyle as he,normalizeHeadingTypography as pe,themeAccentStyle as fe,themeButtonStyle as me,themePresetAccentVars as ue,themeSurfaceStyle as ge,siteCornerRadiusTokens as v,shadowColorTokens as ye,headingCompressionAttr as Se,cardShadowAttr as xe,cardGapAttr as Te,hoverEffectAttr as Ce}from"../theme.js";import{fontRoleStyle as ke}from"../fonts.js";import{isStandaloneSectionDocument as Ae,pageHasHeaderSection as E,pageTakesTopSpace as ve,topSpaceMarker as Ee,TOP_SPACE_ATTR as _e,HEADER_CLEARANCE_CLASS as Pe}from"./header-clearance.js";import{leadSectionInk as we,HEADER_INK_ATTR as Re}from"./header-ink.js";import{useEasel as He}from"efficient-easel/easel";import{pageBackgroundVars as _}from"../content/page-background.js";const Ie="color-mix(in oklab, var(--bg) 40%, #ffffff)",We="12vh";function Ge({style:t,frameClass:o,children:a}){const{appState:n}=He(g=>g),s=n.data.content,i=n.data.root;if(Ae(s))return r("div",{className:`sf-themed-content${o?` ${o}`:""}`,style:{...t,background:Ie,minHeight:"100vh",paddingBottom:We},children:r("div",{style:{background:"var(--bg)"},children:a})});const c=E(s)&&ve(i,s),l=E(s)?Ee(i,s):null,f=l?{[_e]:l}:null,h=J(i?.widthChoice),m=h?{[Q]:h}:null,p=c?null:we(s),u=p?{[Re]:p}:null;return r("div",{className:`sf-themed-content${c?` ${Pe}`:""}${o?` ${o}`:""}`,style:t,...u,...f,...m,children:r("div",{style:{background:"var(--bg)",minHeight:"100%"},children:a})})}function P(t){return{frameClass:void 0,style:{"--sf-page-width":U}}}function Ne({w:t,children:o}){const{frameClass:a,style:n}=P(t);return r("div",{className:a,style:n,children:o})}function Ye({propsTheme:t,propsFonts:o,propsCornerStyle:a,propsCornerRadiusPx:n,propsHeadingCompression:s,propsHeadingTypography:i,widthMode:c,fullWidth:l,pageWidth:f,pageBackground:h,chromeInheritsSiteBackground:m,suppressPreviewNav:p,footer:u,overlay:g,children:w}){const{theme:R,fonts:H,sizes:I,cornerRadiusPx:W,cardShadow:y,shadowColor:G,cardGap:N,hoverEffect:S,headingCompression:b,siteWidth:B,siteGutter:z,blockGap:D,headingTypography:V,heroBackgroundFollowsWidth:$,photographyGrayscale:j,textStyles:F,themeFromDocument:e}=re(),d=e?t:R,L=e?o:H,O=e?void 0:I,x=e?n===void 0?se[ie(a)]:de(n):W,M=e?s:b,T=e?i:V,C=[q(Y(e?void 0:F)),K(pe(T).italicStrong)].filter(Boolean).join(`
2
- `),k=P({widthMode:c,fullWidth:l,pageWidth:f}),X={...ce(d),...le(O),...he(T),...k.style,...m?{}:_(h)};return A("div",{className:"sf-theme-surfaces sf-theme-accent",style:{...ke(L),...fe(d),...me(d),...ue(d),...ge(d),...v(x),...ne(v(x)),...ye(e?void 0:y,e?void 0:G,e?void 0:S),...Z(e?void 0:B),...ee(e?void 0:z),...oe(e?void 0:D),...te(e?void 0:$)},"data-sf-headings":Se(M),"data-sf-card-shadow":e?void 0:xe(y),"data-sf-card-gap":e?void 0:Te(N),"data-sf-card-hover":e?void 0:Ce(S),onClickCapture:p,children:[C?r("style",{"data-sf-text-styles":"",dangerouslySetInnerHTML:{__html:C}}):null,A(ae,{grayscale:e?void 0:j,children:[r(Ge,{style:X,frameClass:k.frameClass,children:w}),u,g]})]})}const qe=t=>{t.target?.closest?.("a")&&t.preventDefault()};function Je({pageBackground:t,inheritBackground:o=!1,w:a,children:n}){return r("div",{style:{...o?{}:_(t),background:"var(--bg)",minHeight:"100%",overflowX:"clip"},children:r(Ne,{w:a,children:n})})}export{Ge as EditorPageBody,Ye as EditorThemedBody,Ne as PageWidthWrapper,Je as PublishedPageFrame,Ie as SECTION_PREVIEW_CANVAS,We as SECTION_PREVIEW_CANVAS_TAIL,P as pageWidthTokens,qe as suppressPreviewNav};
1
+ import{jsx as r,jsxs as A}from"react/jsx-runtime";import{accentItalicCss as Y,storedTextStyles as q,textStylesCss as J}from"../site-text-styles.js";import{pageWidthMarker as Q,PAGE_WIDTH_ATTR as U,SITE_WIDTH_CAP as Z,siteWidthTokens as ee,siteGutterTokens as te,heroBackgroundTokens as oe}from"../content/page-width.js";import{siteBlockGapTokens as ne}from"../content/container-gap.js";import{siteCardRadiusTokens as re}from"../content/card-corners.js";import{usePreviewHeader as se}from"../../components/PreviewHeaderContext.js";import{SitePhotographyProvider as ae}from"../../components/SitePhotographyContext.js";import{CORNER_STYLE_TO_PX as de,normalizeCornerStyle as ie,normalizeCornerRadius as ce,themeColorStyle as le,typeSizesStyle as he,headingTypographyStyle as pe,normalizeHeadingTypography as fe,themeAccentStyle as me,themeButtonStyle as ue,themePresetAccentVars as ge,themeSurfaceStyle as ye,siteCornerRadiusTokens as v,shadowColorTokens as Se,headingCompressionAttr as xe,cardShadowAttr as Te,cardGapAttr as Ce,hoverEffectAttr as ke}from"../theme.js";import{fontRoleStyle as Ae}from"../fonts.js";import{wordStyleTokens as ve}from"../word-styles.js";import{isStandaloneSectionDocument as Ee,pageHasHeaderSection as E,pageTakesTopSpace as _e,topSpaceMarker as Pe,TOP_SPACE_ATTR as we,HEADER_CLEARANCE_CLASS as Re}from"./header-clearance.js";import{leadSectionInk as He,HEADER_INK_ATTR as We}from"./header-ink.js";import{useEasel as Ie}from"efficient-easel/easel";import{pageBackgroundVars as _}from"../content/page-background.js";const Ge="color-mix(in oklab, var(--bg) 40%, #ffffff)",Ne="12vh";function be({style:t,frameClass:o,children:s}){const{appState:n}=Ie(g=>g),a=n.data.content,d=n.data.root;if(Ee(a))return r("div",{className:`sf-themed-content${o?` ${o}`:""}`,style:{...t,background:Ge,minHeight:"100vh",paddingBottom:Ne},children:r("div",{style:{background:"var(--bg)"},children:s})});const c=E(a)&&_e(d,a),l=E(a)?Pe(d,a):null,f=l?{[we]:l}:null,h=Q(d?.widthChoice),m=h?{[U]:h}:null,p=c?null:He(a),u=p?{[We]:p}:null;return r("div",{className:`sf-themed-content${c?` ${Re}`:""}${o?` ${o}`:""}`,style:t,...u,...f,...m,children:r("div",{style:{background:"var(--bg)",minHeight:"100%"},children:s})})}function P(t){return{frameClass:void 0,style:{"--sf-page-width":Z}}}function Be({w:t,children:o}){const{frameClass:s,style:n}=P(t);return r("div",{className:s,style:n,children:o})}function Qe({propsTheme:t,propsFonts:o,propsCornerStyle:s,propsCornerRadiusPx:n,propsHeadingCompression:a,propsHeadingTypography:d,widthMode:c,fullWidth:l,pageWidth:f,pageBackground:h,chromeInheritsSiteBackground:m,suppressPreviewNav:p,footer:u,overlay:g,children:w}){const{theme:R,fonts:H,sizes:W,cornerRadiusPx:I,cardShadow:y,shadowColor:G,cardGap:N,hoverEffect:S,headingCompression:b,siteWidth:B,siteGutter:z,blockGap:D,headingTypography:V,heroBackgroundFollowsWidth:$,photographyGrayscale:j,textStyles:F,wordStyles:L,themeFromDocument:e}=se(),i=e?t:R,O=e?o:H,M=e?void 0:W,x=e?n===void 0?de[ie(s)]:ce(n):I,X=e?a:b,T=e?d:V,C=[J(q(e?void 0:F)),Y(fe(T).italicStrong)].filter(Boolean).join(`
2
+ `),k=P({widthMode:c,fullWidth:l,pageWidth:f}),K={...le(i),...he(M),...pe(T),...k.style,...m?{}:_(h)};return A("div",{className:"sf-theme-surfaces sf-theme-accent",style:{...Ae(O),...ve(e?null:L),...me(i),...ue(i),...ge(i),...ye(i),...v(x),...re(v(x)),...Se(e?void 0:y,e?void 0:G,e?void 0:S),...ee(e?void 0:B),...te(e?void 0:z),...ne(e?void 0:D),...oe(e?void 0:$)},"data-sf-headings":xe(X),"data-sf-card-shadow":e?void 0:Te(y),"data-sf-card-gap":e?void 0:Ce(N),"data-sf-card-hover":e?void 0:ke(S),onClickCapture:p,children:[C?r("style",{"data-sf-text-styles":"",dangerouslySetInnerHTML:{__html:C}}):null,A(ae,{grayscale:e?void 0:j,children:[r(be,{style:K,frameClass:k.frameClass,children:w}),u,g]})]})}const Ue=t=>{t.target?.closest?.("a")&&t.preventDefault()};function Ze({pageBackground:t,inheritBackground:o=!1,w:s,children:n}){return r("div",{style:{...o?{}:_(t),background:"var(--bg)",minHeight:"100%",overflowX:"clip"},children:r(Be,{w:s,children:n})})}export{be as EditorPageBody,Qe as EditorThemedBody,Be as PageWidthWrapper,Ze as PublishedPageFrame,Ge as SECTION_PREVIEW_CANVAS,Ne as SECTION_PREVIEW_CANVAS_TAIL,P as pageWidthTokens,Ue as suppressPreviewNav};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-web-builder",
3
- "version": "22.1.0",
3
+ "version": "22.1.1",
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",