efficient-web-builder 17.1.0 → 18.1.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.
Files changed (60) hide show
  1. package/CHANGELOG.md +81 -17
  2. package/dist/components/Banner.js +1 -1
  3. package/dist/components/FAQ.js +1 -1
  4. package/dist/components/Flex.js +1 -1
  5. package/dist/components/HeroPoster.js +1 -1
  6. package/dist/components/HeroSection.js +1 -1
  7. package/dist/components/HeroSingle.js +1 -1
  8. package/dist/components/HeroSlide.js +1 -1
  9. package/dist/components/ImageBlock.js +1 -1
  10. package/dist/components/Logos.js +1 -1
  11. package/dist/components/PartSettingsPanel.js +1 -1
  12. package/dist/components/PaymentBadges.js +1 -1
  13. package/dist/components/Placeholder.js +1 -1
  14. package/dist/components/RMark.js +1 -1
  15. package/dist/components/SectionHeader.js +1 -1
  16. package/dist/components/SiteAccentField.d.ts +28 -0
  17. package/dist/components/SiteAccentField.js +1 -0
  18. package/dist/components/SiteTextStylesField.d.ts +17 -0
  19. package/dist/components/SiteTextStylesField.js +1 -0
  20. package/dist/components/SlotChildRows.js +1 -1
  21. package/dist/components/StorefrontEditor.js +1 -1
  22. package/dist/components/UpdateStyleDialog.d.ts +5 -0
  23. package/dist/components/UpdateStyleDialog.js +1 -0
  24. package/dist/components/WebsiteSettingsPanel.js +1 -1
  25. package/dist/components/storefront-editor.css +13 -3
  26. package/dist/lib/content/section-sticky.d.ts +34 -0
  27. package/dist/lib/content/section-sticky.js +1 -0
  28. package/dist/lib/editor-words-catalogue.d.ts +6 -28
  29. package/dist/lib/editor-words-catalogue.js +5 -5
  30. package/dist/lib/fit-words.js +6 -1
  31. package/dist/lib/puck/blocks/general/CategoryBar/fields.js +1 -1
  32. package/dist/lib/puck/blocks/general/IntroBleed/fields.js +1 -1
  33. package/dist/lib/puck/controls.d.ts +1 -0
  34. package/dist/lib/puck/controls.js +1 -1
  35. package/dist/lib/puck/field-groups.js +1 -1
  36. package/dist/lib/puck/overrides.js +1 -1
  37. package/dist/lib/puck/page-root.js +2 -1
  38. package/dist/lib/puck/part-inks.d.ts +2 -0
  39. package/dist/lib/puck/part-inks.js +1 -1
  40. package/dist/lib/puck/passes/corners.d.ts +1 -0
  41. package/dist/lib/puck/passes/corners.js +1 -1
  42. package/dist/lib/puck/passes/index.js +1 -1
  43. package/dist/lib/puck/passes/inspector.js +1 -1
  44. package/dist/lib/puck/passes/section-sticky.d.ts +3 -0
  45. package/dist/lib/puck/passes/section-sticky.js +1 -0
  46. package/dist/lib/puck/passes/types.d.ts +1 -0
  47. package/dist/lib/site-text-styles-writer.d.ts +21 -0
  48. package/dist/lib/site-text-styles-writer.js +1 -0
  49. package/dist/lib/site-text-styles.d.ts +43 -3
  50. package/dist/lib/site-text-styles.js +2 -2
  51. package/dist/lib/site-theme-row.d.ts +4 -0
  52. package/dist/lib/sized-image.d.ts +11 -0
  53. package/dist/lib/sized-image.js +1 -0
  54. package/dist/lib/source-rules/label-vocabulary.d.ts +3 -1
  55. package/dist/lib/source-rules/label-vocabulary.js +5 -4
  56. package/dist/lib/theme.d.ts +3 -0
  57. package/dist/lib/theme.js +1 -1
  58. package/package.json +5 -5
  59. package/dist/components/TextStylesField.d.ts +0 -17
  60. package/dist/components/TextStylesField.js +0 -1
@@ -1 +1 @@
1
- "use client";import{jsx as l,jsxs as ct}from"react/jsx-runtime";import{useCallback as a,useEffect as m,useMemo as R,useRef as p,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 st}from"../lib/puck/build-config.js";import{ChromeWrap as dt}from"../lib/editor-chrome.js";import{sessionRegistry as lt}from"../lib/editor-session.js";import{backendOf as A,blocksOf as ht}from"../lib/website-session.js";import{useEditorSession as ut}from"../lib/editor-session-context.js";import{withSiteBlockGapFields as mt}from"../lib/puck/site-gap-fields.js";import{withTemplateMediaPlaceholders as pt}from"../lib/puck/templateFields.js";import{setEditorPage as le}from"../lib/puck/editor-page-context.js";import{resolveSiteName as St}from"../lib/content/site-name.js";import{normalizeSiteGutter as ft,normalizeSiteWidth as gt}from"../lib/content/page-width.js";import{normalizeSiteBlockGap as _t}from"../lib/content/container-gap.js";import wt,{DocumentScreen as yt}from"./EditorScreenMount.js";import{useStorefrontDocument as Ct}from"./StorefrontDocumentContext.js";import{PreviewHeaderProvider as Tt}from"./PreviewHeaderContext.js";import{PreviewFooterProvider as Et}from"./PreviewFooterContext.js";import{PreviewChatProvider as Pt,DEFAULT_CHAT_PREVIEW as vt}from"./PreviewChatContext.js";import{PreviewSocialProvider as bt}from"./PreviewSocialContext.js";import{useSocialSettings as xt}from"./useSocialSettings.js";import{PreviewSurfaceProvider as Ht}from"./PreviewSurfaceContext.js";import{WEBSITE_ADDRESSING as Mt}from"../lib/website-document-addressing.js";import{PreviewTickerProvider as It}from"./PreviewTickerContext.js";import{PreviewPartsProvider as zt}from"./PreviewPartsContext.js";import{PreviewLocationPartProvider as Gt}from"./PreviewLocationPartContext.js";import{PreviewPartStyleProvider as Rt}from"./PreviewPartStyleContext.js";import{SiteMapsProvider as At,readSiteMapsKey as Ft,writeSiteMapsKey as he,readSiteMapId as kt,writeSiteMapId as Dt}from"../lib/maps-config.js";import{CORNER_STYLE_TO_PX as Wt,DEFAULT_HEADING_COMPRESSION as Nt,DEFAULT_HEADING_TYPOGRAPHY as Ot,DEFAULT_SWITCH_SHOWN as F,DEFAULT_SIZES as Bt,DEFAULT_THEME_MODE as y,normalizeCornerRadius as Kt,normalizeCornerStyle as Lt,normalizeCardShadow as Yt,normalizeCardGap as Ut,normalizeHoverEffect as jt,normalizeShadowColor as Vt,IDENTITY_CARD_GAP as ue,IDENTITY_CARD_SHADOW as Xt,IDENTITY_HOVER_EFFECT as Zt,headingTypographyFromRow as me,normalizeHeadingCompression as k,normalizeSizes as pe,THEME_MODE_KEY as Se,THEME_STORAGE_KEY as qt,THEME_SWITCH_HIDE as fe,THEME_SWITCH_KEY as D}from"../lib/theme.js";import{DEFAULT_FONTS as Jt,normalizeFonts as W}from"../lib/fonts.js";import{WEBSITE_SCREEN as Qt}from"./WebsiteScreenParts.js";import{routeWebsiteHostMessage as $t}from"../lib/website-host-inbound.js";import{resolveTextStyles as er,textStylesToOld as tr}from"../lib/site-text-styles.js";const rr=()=>{if(typeof window>"u")return y;try{const i=window.localStorage.getItem(Se);return i==="light"||i==="dark"||i==="auto"?i:y}catch{return y}},ge=i=>{if(!(typeof window>"u"))try{window.localStorage.setItem(Se,i)}catch{}},or=()=>{if(typeof window>"u")return F;try{return window.localStorage.getItem(D)!==fe}catch{return F}},nr=()=>{if(!(typeof window>"u"))try{window.localStorage.removeItem(qt)}catch{}},_e=i=>{if(!(typeof window>"u"))try{i?window.localStorage.removeItem(D):window.localStorage.setItem(D,fe)}catch{}};function ar(){const{adapter:i,capabilities:s,templateId:N,ready:f,token:u,siteId:c,currentSlug:O,currentKind:B}=Ct();m(()=>(le(O,B),()=>le(null,null)),[O,B]);const C=s.placeholderFrames,[we,K]=r(null),[ye,L]=r("");m(()=>{const e=i.templateName;if(!f||!N||!e){L("");return}let o=!1;return e().then(d=>!o&&L(d??"")).catch(()=>{}),()=>{o=!0}},[f,u,N,i]);const[Ce,T]=r(y),[Te,E]=r(F),[Ee,Y]=r({selected:0,themes:[]}),[Pe,P]=r(Jt),[ve,v]=r(Bt),[be,U]=r(null),[xe,b]=r(Nt),[He,j]=r(null),[Me,V]=r(null),[Ie,X]=r(ue),[ze,Z]=r(null),[Ge,q]=r(null),[Re,J]=r(null),[x,Q]=r(null),h=ut(),$=R(()=>st(lt(h),ht(h)),[h]),Ae=R(()=>mt(pt($,C),x),[$,C,x]),[Fe,H]=r(Ot),[ke,ee]=r(null),[De,te]=r(null),re=p(null),n=p(!1);m(()=>{T(rr()),E(or())},[]);const We=a(e=>{n.current=!0,nr(),ge(e),T(e)},[]),Ne=a(e=>{n.current=!0,_e(e),E(e)},[]),Oe=a(e=>{n.current=!0,Y(e)},[]),Be=a(e=>{n.current=!0,P(e)},[]),Ke=a(e=>{n.current=!0,v(e)},[]),Le=a(e=>{n.current=!0,U(e)},[]),Ye=a(e=>{n.current=!0,b(e)},[]),Ue=a(e=>{n.current=!0,j(e)},[]),je=a(e=>{n.current=!0,V(e)},[]),Ve=a(e=>{n.current=!0,X(e)},[]),Xe=a(e=>{n.current=!0,Z(e)},[]),Ze=a(e=>{n.current=!0,H(e)},[]),[qe,oe]=r(null),Je=a(e=>{n.current=!0,oe(e)},[]),Qe=a(e=>{n.current=!0,q(e)},[]),$e=a(e=>{n.current=!0,J(e)},[]),et=a(e=>{n.current=!0,Q(e)},[]),tt=a(e=>{n.current=!0,ee(e)},[]),rt=a(e=>{n.current=!0,te(e)},[]);m(()=>{const e=A(h).theme;if(!u||!s.hasSiteTheme||!e)return;const o=c??"";re.current!==o&&(re.current=o,n.current=!1);let d=!1;return e.get(c?{siteId:c}:void 0).then(t=>{if(!(d||n.current)){if(ge(t.default_mode),_e(t.show_theme_switch),T(t.default_mode),E(t.show_theme_switch),Y({selected:t.selected_preset,themes:t.theme_presets}),P(W({heading:t.heading_font,body:t.body_font,accent:t.accent_font,label:t.label_font})),v(pe({headingLarge:t.heading_size_large_px,headingMedium:t.heading_size_medium_px,headingSmall:t.heading_size_small_px,body:t.body_size_px,label:t.label_size_px})),U(t.corner_radius_px===void 0?Wt[Lt(t.corner_style)]:Kt(t.corner_radius_px)),b(k(t.heading_compression)),j(t.card_shadow==null?Xt:Yt(t.card_shadow)),X(t.card_gap==null?ue:Ut(t.card_gap)),Z(t.hover_effect==null?Zt:jt(t.hover_effect)),V(Vt(t.shadow_color)),q(gt(t.site_width)),J(ft(t.site_gutter)),Q(_t(t.block_gap)),H(me(t)),oe(t.text_styles??null),Array.isArray(t.text_styles)){const g={fonts:W({heading:t.heading_font,body:t.body_font,accent:t.accent_font,label:t.label_font}),sizes:pe({headingLarge:t.heading_size_large_px,headingMedium:t.heading_size_medium_px,headingSmall:t.heading_size_small_px,body:t.body_size_px,label:t.label_size_px}),compression:k(t.heading_compression),typography:me(t)},S=tr(er(t.text_styles,g),g);P(W(S.fonts)),v(S.sizes),b(k(S.compression)),H(S.typography)}ee(t.hero_background_follows_width===!0),te(t.photography_grayscale===!0)}}).catch(()=>{}),()=>{d=!0}},[u,c,s.hasSiteTheme,h]);const ot=xt({token:u,siteId:c,enabled:s.hasSiteSettings}),[nt,ne]=r(vt),ae=p(null),M=p(!1),I=p(null),_=p({}),at=a(e=>{M.current=!0,ne(o=>({...o,...e})),!(!s.hasSiteSettings||!u)&&(_.current={..._.current,...e},I.current&&clearTimeout(I.current),I.current=setTimeout(()=>{const o=_.current;_.current={},A(h).chat?.update(o,c?{siteId:c}:void 0).catch(()=>{})},500))},[s.hasSiteSettings,u,c,h]);m(()=>{if(!u||!s.hasSiteSettings)return;const e=c??"";ae.current!==e&&(ae.current=e,M.current=!1);let o=!1;const d=A(h).chat;if(d)return d.get(c?{siteId:c}:void 0).then(t=>{o||M.current||ne({enabled:t.enabled,title:t.title,subtitle:t.subtitle,greeting:t.greeting})}).catch(()=>{}),()=>{o=!0}},[u,c,s.hasSiteSettings,h]);const[w,z]=r(""),ie=p(null),G=p(!1);m(()=>z(Ft()),[]);const ce=a(e=>{const o=e.trim();if(o===w)return;G.current=!0,he(o),z(o);const d=i.updateSite;!s.canEditSiteRecord||!f||!d||d({mapsApiKey:o}).catch(()=>{})},[w,s.canEditSiteRecord,f,i]),[se,de]=r("");m(()=>de(kt()),[]),m(()=>{const e=i.site;if(!f||!s.hasSiteRecord||!e){K(null);return}const o=c??"";ie.current!==o&&(ie.current=o,G.current=!1);let d=!1;return e().then(t=>{if(d||(K(St(t.name)),G.current))return;const g=t.mapsApiKey??"";he(g),z(g);const S=t.mapsMapId??"";Dt(S),de(S)}).catch(()=>{}),()=>{d=!0}},[f,u,s.hasSiteRecord,c,i]);const it=R(()=>({apiKey:w,setApiKey:ce,mapId:se}),[w,ce,se]);return l(yt,{config:Ae,parts:Qt,wrap:(e,o)=>l(Tt,{websiteName:we,templateChrome:C,templateName:ye||null,themeMode:Ce,onThemeModeChange:We,themeSwitchShown:Te,onThemeSwitchShownChange:Ne,theme:Ee,onThemeChange:Oe,fonts:Pe,onFontsChange:Be,cornerRadiusPx:be,onCornerRadiusPxChange:Le,cardShadow:He,onCardShadowChange:Ue,shadowColor:Me,onShadowColorChange:je,cardGap:Ie,onCardGapChange:Ve,hoverEffect:ze,onHoverEffectChange:Xe,headingCompression:xe,onHeadingCompressionChange:Ye,headingTypography:Fe,onHeadingTypographyChange:Ze,textStyles:qe,onTextStylesChange:Je,sizes:ve,onSizesChange:Ke,siteWidth:Ge,onSiteWidthChange:Qe,siteGutter:Re,onSiteGutterChange:$e,blockGap:x,onBlockGapChange:et,heroBackgroundFollowsWidth:ke,onHeroBackgroundFollowsWidthChange:tt,photographyGrayscale:De,onPhotographyGrayscaleChange:rt,themeFromDocument:!s.hasSiteTheme,children:l(Et,{children:l(dt,{wrap:h.chrome?.wrap,surface:"page",children:l(It,{children:l(zt,{children:l(Gt,{children:l(Rt,{children:ct(At,{value:it,children:[l(Pt,{chat:nt,onChatChange:at,children:l(bt,{value:ot,children:l(Ht,{children:e})})}),o]})})})})})})})})})}function ir({target:i}){return l(wt,{target:i,addressing:Mt,onHostMessage:$t,children:l(ar,{})})}export{ir as default};
1
+ "use client";import{jsx as u,jsxs as ot}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 nt}from"../lib/puck/build-config.js";import{ChromeWrap as at}from"../lib/editor-chrome.js";import{sessionRegistry as it}from"../lib/editor-session.js";import{backendOf as G,blocksOf as ct}from"../lib/website-session.js";import{useEditorSession as st}from"../lib/editor-session-context.js";import{withSiteBlockGapFields as dt}from"../lib/puck/site-gap-fields.js";import{withTemplateMediaPlaceholders as ut}from"../lib/puck/templateFields.js";import{setEditorPage as se}from"../lib/puck/editor-page-context.js";import{resolveSiteName as ht}from"../lib/content/site-name.js";import{normalizeSiteGutter as lt,normalizeSiteWidth as mt}from"../lib/content/page-width.js";import{normalizeSiteBlockGap as pt}from"../lib/content/container-gap.js";import St,{DocumentScreen as ft}from"./EditorScreenMount.js";import{useStorefrontDocument as gt}from"./StorefrontDocumentContext.js";import{PreviewHeaderProvider as wt}from"./PreviewHeaderContext.js";import{PreviewFooterProvider as Ct}from"./PreviewFooterContext.js";import{PreviewChatProvider as Tt,DEFAULT_CHAT_PREVIEW as Et}from"./PreviewChatContext.js";import{PreviewSocialProvider as _t}from"./PreviewSocialContext.js";import{useSocialSettings as yt}from"./useSocialSettings.js";import{PreviewSurfaceProvider as Pt}from"./PreviewSurfaceContext.js";import{WEBSITE_ADDRESSING as vt}from"../lib/website-document-addressing.js";import{PreviewTickerProvider as Ht}from"./PreviewTickerContext.js";import{PreviewPartsProvider as It}from"./PreviewPartsContext.js";import{PreviewLocationPartProvider as Mt}from"./PreviewLocationPartContext.js";import{PreviewPartStyleProvider as Gt}from"./PreviewPartStyleContext.js";import{SiteMapsProvider as Rt,readSiteMapsKey as kt,writeSiteMapsKey as de,readSiteMapId as At,writeSiteMapId as Dt}from"../lib/maps-config.js";import{CORNER_STYLE_TO_PX as Ft,DEFAULT_HEADING_COMPRESSION as Wt,DEFAULT_HEADING_TYPOGRAPHY as xt,DEFAULT_SWITCH_SHOWN as R,DEFAULT_SIZES as Nt,DEFAULT_THEME_MODE as C,normalizeCornerRadius as bt,normalizeCornerStyle as zt,normalizeCardShadow as Bt,normalizeCardGap as Ot,normalizeHoverEffect as Kt,normalizeShadowColor as Lt,IDENTITY_CARD_GAP as ue,IDENTITY_CARD_SHADOW as Yt,IDENTITY_HOVER_EFFECT as Ut,THEME_MODE_KEY as he,THEME_STORAGE_KEY as jt,THEME_SWITCH_HIDE as le,THEME_SWITCH_KEY as k}from"../lib/theme.js";import{DEFAULT_FONTS as Vt}from"../lib/fonts.js";import{WEBSITE_SCREEN as Xt}from"./WebsiteScreenParts.js";import{routeWebsiteHostMessage as Zt}from"../lib/website-host-inbound.js";import{siteTextFromRow as qt}from"../lib/site-text-styles.js";const Jt=()=>{if(typeof window>"u")return C;try{const i=window.localStorage.getItem(he);return i==="light"||i==="dark"||i==="auto"?i:C}catch{return C}},me=i=>{if(!(typeof window>"u"))try{window.localStorage.setItem(he,i)}catch{}},Qt=()=>{if(typeof window>"u")return R;try{return window.localStorage.getItem(k)!==le}catch{return R}},$t=()=>{if(!(typeof window>"u"))try{window.localStorage.removeItem(jt)}catch{}},pe=i=>{if(!(typeof window>"u"))try{i?window.localStorage.removeItem(k):window.localStorage.setItem(k,le)}catch{}};function er(){const{adapter:i,capabilities:s,templateId:A,ready:f,token:l,siteId:c,currentSlug:D,currentKind:F}=gt();p(()=>(se(D,F),()=>se(null,null)),[D,F]);const T=s.placeholderFrames,[Se,W]=r(null),[fe,x]=r("");p(()=>{const e=i.templateName;if(!f||!A||!e){x("");return}let o=!1;return e().then(d=>!o&&x(d??"")).catch(()=>{}),()=>{o=!0}},[f,l,A,i]);const[ge,E]=r(C),[we,_]=r(R),[Ce,N]=r({selected:0,themes:[]}),[Te,b]=r(Vt),[Ee,z]=r(Nt),[_e,B]=r(null),[ye,O]=r(Wt),[Pe,K]=r(null),[ve,L]=r(null),[He,Y]=r(ue),[Ie,U]=r(null),[Me,j]=r(null),[Ge,V]=r(null),[y,X]=r(null),h=st(),Z=M(()=>nt(it(h),ct(h)),[h]),Re=M(()=>dt(ut(Z,T),y),[Z,T,y]),[ke,q]=r(xt),[Ae,J]=r(null),[De,Q]=r(null),$=S(null),n=S(!1);p(()=>{E(Jt()),_(Qt())},[]);const Fe=a(e=>{n.current=!0,$t(),me(e),E(e)},[]),We=a(e=>{n.current=!0,pe(e),_(e)},[]),xe=a(e=>{n.current=!0,N(e)},[]),Ne=a(e=>{n.current=!0,b(e)},[]),be=a(e=>{n.current=!0,z(e)},[]),ze=a(e=>{n.current=!0,B(e)},[]),Be=a(e=>{n.current=!0,O(e)},[]),Oe=a(e=>{n.current=!0,K(e)},[]),Ke=a(e=>{n.current=!0,L(e)},[]),Le=a(e=>{n.current=!0,Y(e)},[]),Ye=a(e=>{n.current=!0,U(e)},[]),Ue=a(e=>{n.current=!0,q(e)},[]),[je,ee]=r(null),Ve=a(e=>{n.current=!0,ee(e)},[]),Xe=a(e=>{n.current=!0,j(e)},[]),Ze=a(e=>{n.current=!0,V(e)},[]),qe=a(e=>{n.current=!0,X(e)},[]),Je=a(e=>{n.current=!0,J(e)},[]),Qe=a(e=>{n.current=!0,Q(e)},[]);p(()=>{const e=G(h).theme;if(!l||!s.hasSiteTheme||!e)return;const o=c??"";$.current!==o&&($.current=o,n.current=!1);let d=!1;return e.get(c?{siteId:c}:void 0).then(t=>{if(d||n.current)return;me(t.default_mode),pe(t.show_theme_switch),E(t.default_mode),_(t.show_theme_switch),N({selected:t.selected_preset,themes:t.theme_presets});const m=qt(t);b(m.fonts),z(m.sizes),B(t.corner_radius_px===void 0?Ft[zt(t.corner_style)]:bt(t.corner_radius_px)),O(m.compression),K(t.card_shadow==null?Yt:Bt(t.card_shadow)),Y(t.card_gap==null?ue:Ot(t.card_gap)),U(t.hover_effect==null?Ut:Kt(t.hover_effect)),L(Lt(t.shadow_color)),j(mt(t.site_width)),V(lt(t.site_gutter)),X(pt(t.block_gap)),q(m.typography),ee(m.textStyles),J(t.hero_background_follows_width===!0),Q(t.photography_grayscale===!0)}).catch(()=>{}),()=>{d=!0}},[l,c,s.hasSiteTheme,h]);const $e=yt({token:l,siteId:c,enabled:s.hasSiteSettings}),[et,te]=r(Et),re=S(null),P=S(!1),v=S(null),g=S({}),tt=a(e=>{P.current=!0,te(o=>({...o,...e})),!(!s.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))},[s.hasSiteSettings,l,c,h]);p(()=>{if(!l||!s.hasSiteSettings)return;const e=c??"";re.current!==e&&(re.current=e,P.current=!1);let o=!1;const d=G(h).chat;if(d)return d.get(c?{siteId:c}:void 0).then(t=>{o||P.current||te({enabled:t.enabled,title:t.title,subtitle:t.subtitle,greeting:t.greeting})}).catch(()=>{}),()=>{o=!0}},[l,c,s.hasSiteSettings,h]);const[w,H]=r(""),oe=S(null),I=S(!1);p(()=>H(kt()),[]);const ne=a(e=>{const o=e.trim();if(o===w)return;I.current=!0,de(o),H(o);const d=i.updateSite;!s.canEditSiteRecord||!f||!d||d({mapsApiKey:o}).catch(()=>{})},[w,s.canEditSiteRecord,f,i]),[ae,ie]=r("");p(()=>ie(At()),[]),p(()=>{const e=i.site;if(!f||!s.hasSiteRecord||!e){W(null);return}const o=c??"";oe.current!==o&&(oe.current=o,I.current=!1);let d=!1;return e().then(t=>{if(d||(W(ht(t.name)),I.current))return;const m=t.mapsApiKey??"";de(m),H(m);const ce=t.mapsMapId??"";Dt(ce),ie(ce)}).catch(()=>{}),()=>{d=!0}},[f,l,s.hasSiteRecord,c,i]);const rt=M(()=>({apiKey:w,setApiKey:ne,mapId:ae}),[w,ne,ae]);return u(ft,{config:Re,parts:Xt,wrap:(e,o)=>u(wt,{websiteName:Se,templateChrome:T,templateName:fe||null,themeMode:ge,onThemeModeChange:Fe,themeSwitchShown:we,onThemeSwitchShownChange:We,theme:Ce,onThemeChange:xe,fonts:Te,onFontsChange:Ne,cornerRadiusPx:_e,onCornerRadiusPxChange:ze,cardShadow:Pe,onCardShadowChange:Oe,shadowColor:ve,onShadowColorChange:Ke,cardGap:He,onCardGapChange:Le,hoverEffect:Ie,onHoverEffectChange:Ye,headingCompression:ye,onHeadingCompressionChange:Be,headingTypography:ke,onHeadingTypographyChange:Ue,textStyles:je,onTextStylesChange:Ve,sizes:Ee,onSizesChange:be,siteWidth:Me,onSiteWidthChange:Xe,siteGutter:Ge,onSiteGutterChange:Ze,blockGap:y,onBlockGapChange:qe,heroBackgroundFollowsWidth:Ae,onHeroBackgroundFollowsWidthChange:Je,photographyGrayscale:De,onPhotographyGrayscaleChange:Qe,themeFromDocument:!s.hasSiteTheme,children:u(Ct,{children:u(at,{wrap:h.chrome?.wrap,surface:"page",children:u(Ht,{children:u(It,{children:u(Mt,{children:u(Gt,{children:ot(Rt,{value:rt,children:[u(Tt,{chat:et,onChatChange:tt,children:u(_t,{value:$e,children:u(Pt,{children:e})})}),o]})})})})})})})})})}function tr({target:i}){return u(St,{target:i,addressing:vt,onHostMessage:Zt,children:u(er,{})})}export{tr as default};
@@ -0,0 +1,5 @@
1
+ export declare function UpdateStyleDialog({ styleName, onCancel, onConfirm, }: {
2
+ styleName: string;
3
+ onCancel: () => void;
4
+ onConfirm: () => void;
5
+ }): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e,Fragment as i,jsxs as n}from"react/jsx-runtime";import{Button as r,Dialog as a}from"efficient-shell/ui";import{say as t}from"../lib/editor-words.js";function p({styleName:o,onCancel:l,onConfirm:s}){return e(a,{open:!0,onClose:l,role:"alertdialog",size:"sm",title:t("Update {style}?",{style:o}),footer:n(i,{children:[e(r,{variant:"secondary",onClick:l,children:t("Cancel")}),e(r,{variant:"primary",onClick:s,children:t("Update style")})]}),children:e("p",{children:t("Every text on the site that follows {style} changes to look like this one. This text’s own changes are cleared, and it keeps following {style}.",{style:o})})})}export{p as UpdateStyleDialog};
@@ -1 +1 @@
1
- "use client";import{jsx as n,jsxs as y,Fragment as w}from"react/jsx-runtime";import{useEasel as E}from"efficient-easel/easel";import{useEffect as k,useRef as L,useState as b}from"react";import B from"./ThemeField.js";import W from"./CornersField.js";import v from"./CardShadowField.js";import A from"./ShadowColourField.js";import O from"./BlockGapField.js";import j from"./HoverEffectField.js";import Y from"./HeroImageField.js";import U from"./PhotographyField.js";import X from"./SideSpaceField.js";import M from"./SiteWidthField.js";import q from"./TextStylesField.js";import{usePreviewHeader as m}from"./PreviewHeaderContext.js";import{SettingsTabs as J}from"efficient-easel/panel";import{Tooltip as Z,tabButtonId as $,tabPanelId as K}from"efficient-shell/ui";import{ContrastIcon as Q,NoteIcon as V,SettingsIcon as D,TypeIcon as ee}from"efficient-easel/icons";import{useThemeRowPersist as oe}from"../lib/theme-row-persist.js";import{themeSaveNotice as te}from"../lib/theme-save-message.js";import{say as T}from"../lib/editor-words.js";import{NEUTRAL_SITE_NAME as ne}from"../lib/content/site-name.js";import{normalizeFonts as re}from"../lib/fonts.js";import{previewFrame as se}from"../lib/puck/preview-dom.js";import{CORNER_STYLE_TO_PX as ie,normalizeCornerRadius as ae,normalizeCornerStyle as ce,normalizeShadowColor as le,headingTypographyToRow as pe,normalizeHeadingCompression as de,normalizeHeadingTypography as he,DEFAULT_SIZES as ue}from"../lib/theme.js";const F="sf-site-styles",ge="sf-site-styles-tabpanel",fe=!1,me="Show hints";function Se({shown:e,onChange:o}){return n("div",{className:"sf-hints",children:y("button",{type:"button","aria-pressed":e,onClick:()=>o(!e),className:`sf-rung sf-hints-toggle${e?" is-active":""}`,children:[n(V,{size:13}),T(me)]})})}const So="text",R=[{id:"basics",label:"Basics",icon:n(D,{})},{id:"theme",label:"Theme",icon:n(Q,{})},{id:"text",label:"Text",icon:n(ee,{})}];function Ce({themeFromDocument:e,persist:o}){const{appState:s,dispatch:r}=E(u=>u),{theme:a,setTheme:t}=m(),c=s.data,h=c.root?.props??{},i=u=>{if(e){const f={...h,theme:u};r({type:"replaceRoot",root:{...c.root,props:f},recordHistory:!0})}else t(u);o({selected_preset:u.selected,theme_presets:u.themes})};return n(B,{value:e?h.theme:a,onChange:i})}function ye(e,o){const[s,r]=b(null),a=L(null),t=JSON.stringify(e),c=L(o);return c.current=o,k(()=>{if(a.current===null){a.current=t;return}if(a.current===t)return;a.current=t;const h=window.setTimeout(()=>r(c.current),700),i=window.setTimeout(()=>r(null),2200);return()=>{window.clearTimeout(h),window.clearTimeout(i)}},[t]),s}function _e({themeFromDocument:e,persist:o}){const{appState:s,dispatch:r}=E(p=>p),[a,t]=b(null),{fonts:c,setFonts:h,sizes:i,setSizes:u,headingCompression:f,setHeadingCompression:_,headingTypography:C,setHeadingTypography:l}=m(),x=s.data,g=x.root?.props??{},S=e?re(g.fonts):c,z=e?ue:i,I=e?de(g.headingCompression):f,N=e?he(g.headingTypography):C,H=p=>r({type:"replaceRoot",root:{...x.root,props:{...g,...p}},recordHistory:!0}),G=ye({curFonts:S,curCompression:I,curTypography:N},a);return n(q,{fonts:S,sizes:z,compression:I,headingTypography:N,openRole:a,onOpenRole:t,onFontChange:(p,P)=>{const d={...S,[p]:P};e?H({fonts:d}):h(d),o({heading_font:d.heading,body_font:d.body,accent_font:d.accent,label_font:d.label})},onSizeChange:e?void 0:(p,P)=>{const d={...z,[p]:P};u(d),o({heading_size_large_px:d.headingLarge,heading_size_medium_px:d.headingMedium,heading_size_small_px:d.headingSmall,accent_size_px:d.accent,body_size_px:d.body,label_size_px:d.label})},onCompressionChange:p=>{e?H({headingCompression:p}):_(p),o({heading_compression:p})},onHeadingTypographyChange:p=>{e?H({headingTypography:p}):l(p),o(pe(p))},livePx:Te,savedRole:G})}const we={heading:"main h1, main h2",heading2:"main h1, main h2",heading3:"main h1, main h2",accent:"main h1 em, main h2 em",body:"main p",label:"main .mono-eyebrow"};function Te(e){if(typeof document>"u")return null;const s=(se()?.contentDocument??document).querySelector(we[e]);if(!s)return null;const r=parseFloat(getComputedStyle(s).fontSize);return Number.isFinite(r)?r:null}function xe({themeFromDocument:e,persist:o,showHint:s}){const{appState:r,dispatch:a}=E(l=>l),{cornerRadiusPx:t,setCornerRadiusPx:c}=m(),h=r.data,i=h.root?.props??{},u=i.cornerRadiusPx===void 0?ie[ce(i.cornerStyle)]:ae(i.cornerRadiusPx),f=e?u:t,_=l=>a({type:"replaceRoot",root:{...h.root,props:{...i,...l}},recordHistory:!0});return n(W,{value:f,onChange:l=>{e?_({cornerRadiusPx:l}):c(l),o({corner_radius_px:l})},showHint:s})}function be(e){return{site_width:e}}function Re({persist:e,showHint:o}){const{siteWidth:s,setSiteWidth:r}=m();return n(M,{value:s,onChange:t=>{r(t),e(be(t),t===null)},showHint:o})}function He(e){return{block_gap:e}}function Pe(e){return{site_gutter:e}}function Ee({persist:e,showHint:o}){const{siteGutter:s,setSiteGutter:r}=m();return n(X,{value:s,onChange:t=>{r(t),e(Pe(t),t===null)},showHint:o})}function Fe({persist:e,showHint:o}){const{blockGap:s,setBlockGap:r}=m();return n(O,{value:s,onChange:t=>{r(t),e(He(t),t===null)},showHint:o})}function ze({persist:e,showHint:o}){const{heroBackgroundFollowsWidth:s,setHeroBackgroundFollowsWidth:r}=m();return n(Y,{value:s,onChange:t=>{r(t),e({hero_background_follows_width:t},!0)},showHint:o})}function Ie({persist:e,showHint:o=!0}){return y(w,{children:[n(Re,{persist:e,showHint:o}),n(Ee,{persist:e,showHint:o}),n(Fe,{persist:e,showHint:o}),n(ze,{persist:e,showHint:o})]})}function Ne(e){return{card_shadow:e}}function Le(e){return e===null?{shadow_color:null}:{shadow_color:le(e)}}function Ge(e){return{hover_effect:e}}function ke({persist:e,showHint:o=!0}){const{cardShadow:s,setCardShadow:r,shadowColor:a,setShadowColor:t,hoverEffect:c,setHoverEffect:h}=m();return y(w,{children:[n(v,{value:s,onChange:i=>{r(i),e(Ne(i),!0)},showHint:o}),n(A,{value:a,onChange:i=>{t(i),e(Le(i),i===null)},showHint:o}),n(j,{value:c,onChange:i=>{h(i),e(Ge(i),!0)},showHint:o})]})}function Be(e){return{photography_grayscale:e}}function We({persist:e,showHint:o}){const{photographyGrayscale:s,setPhotographyGrayscale:r}=m();return n(U,{value:s,onChange:t=>{r(t),e(Be(t),!0)},showHint:o})}function ve({persist:e,showHint:o=!0}){return n(w,{children:n(We,{persist:e,showHint:o})})}function Ae(){const{websiteName:e}=m();return e?.trim()||ne}function Co(){const e=Ae();return n(Z,{content:T("{name} — renamed in the Console: {place}.",{name:e,place:T("Storefront ▸ Sites ▸ Settings")}),className:"sf-name-tip",children:n("span",{className:"sf-panel-site",children:e})})}function Oe({themeFromDocument:e=!1,tokenRef:o,siteId:s,onNotify:r,tab:a,onTabChange:t}){const{persist:c}=oe({themeFromDocument:e,tokenRef:o,siteId:s,onResult:g=>{const S=te(g);S&&r?.(S.msg,S.tone)}}),[h,i]=b(R[0].id),u=a!==void 0,f=u?a:h,_=u?t??(()=>{}):i,C=R.find(g=>g.id===f)??R[0],[l,x]=b(fe);return y(w,{children:[n(J,{items:R.map(g=>({...g,label:T(g.label)})),activeId:C.id,onSelect:_,ariaLabel:T("Site styles"),idPrefix:F}),y("div",{id:K(F,C.id),className:ge,role:"tabpanel","aria-labelledby":$(F,C.id),children:[f==="basics"&&y(w,{children:[n(xe,{themeFromDocument:e,persist:c,showHint:l}),!e&&n(ke,{persist:c,showHint:l}),!e&&n(Ie,{persist:c,showHint:l}),!e&&n(ve,{persist:c,showHint:l}),n(Se,{shown:l,onChange:x})]}),f==="theme"&&n(Ce,{themeFromDocument:e,persist:c}),f==="text"&&n(_e,{themeFromDocument:e,persist:c})]})]})}export{ke as CardLookFields,Se as HintsToggle,Ie as PageGroupFields,ve as PhotographyGroupFields,fe as SHOW_HINTS_DEFAULT,F as SITE_STYLES_ID_PREFIX,R as SITE_STYLES_TABS,So as SITE_STYLES_TEXT_TAB,ge as TABPANEL_CLASS,Co as WebsiteNameReadonly,He as blockGapPatch,Ne as cardShadowPatch,Oe as default,Ge as hoverEffectPatch,Be as photographyPatch,Le as shadowColourPatch,Pe as siteGutterPatch,be as siteWidthPatch,Ae as useWebsiteName};
1
+ "use client";import{jsx as o,jsxs as _,Fragment as x}from"react/jsx-runtime";import{useEasel as E}from"efficient-easel/easel";import{useState as R}from"react";import k from"./ThemeField.js";import z from"./CornersField.js";import W from"./CardShadowField.js";import v from"./ShadowColourField.js";import O from"./BlockGapField.js";import B from"./HoverEffectField.js";import G from"./HeroImageField.js";import Y from"./PhotographyField.js";import j from"./SideSpaceField.js";import X from"./SiteWidthField.js";import U from"./SiteAccentField.js";import q from"./SiteTextStylesField.js";import{usePreviewHeader as f}from"./PreviewHeaderContext.js";import{SettingsTabs as K}from"efficient-easel/panel";import{Tooltip as M,tabButtonId as $,tabPanelId as J}from"efficient-shell/ui";import{ContrastIcon as Q,NoteIcon as V,SettingsIcon as Z,TypeIcon as D}from"efficient-easel/icons";import{useThemeRowPersist as ee}from"../lib/theme-row-persist.js";import{themeSaveNotice as te}from"../lib/theme-save-message.js";import{say as S}from"../lib/editor-words.js";import{NEUTRAL_SITE_NAME as oe}from"../lib/content/site-name.js";import{previewFrame as ne}from"../lib/puck/preview-dom.js";import{useSiteTextStylesWriter as re}from"../lib/site-text-styles-writer.js";import{CORNER_STYLE_TO_PX as ie,normalizeCornerRadius as se,normalizeCornerStyle as ae,normalizeShadowColor as ce,selectedThemeColors as le}from"../lib/theme.js";const P="sf-site-styles",he="sf-site-styles-tabpanel",de=!1,ue="Show hints";function pe({shown:e,onChange:t}){return o("div",{className:"sf-hints",children:_("button",{type:"button","aria-pressed":e,onClick:()=>t(!e),className:`sf-rung sf-hints-toggle${e?" is-active":""}`,children:[o(V,{size:13}),S(ue)]})})}const dt="text",b=[{id:"basics",label:"Basics",icon:o(Z,{})},{id:"theme",label:"Theme",icon:o(Q,{})},{id:"text",label:"Text",icon:o(D,{})}];function fe({themeFromDocument:e,persist:t}){const{appState:i,dispatch:a}=E(d=>d),{theme:l,setTheme:n}=f(),h=i.data,u=h.root?.props??{},s=d=>{if(e){const p={...u,theme:d};a({type:"replaceRoot",root:{...h.root,props:p},recordHistory:!0})}else n(d);t({selected_preset:d.selected,theme_presets:d.themes})};return o(k,{value:e?u.theme:l,onChange:s})}function ge({themeFromDocument:e,persist:t}){const[i,a]=R(null),{theme:l,setFonts:n,setSizes:h,setHeadingTypography:u}=f(),s=re({themeFromDocument:e,persist:t}),{old:d,saved:p,writeRoot:C}=s,w=s.fonts,c=s.sizes,y=s.typography,g=r=>r.values.size??ye(Se[r.id]??"body")??Ce[r.kind],T=r=>s.write(r),F=me(l),I=r=>{const m={...w,accent:r};e?C({fonts:m}):n(m),t({accent_font:r})},L=r=>{h({...c,accent:r}),t({accent_size_px:r})},A=r=>{const m={...y,weightStrong:r};e?C({headingTypography:m}):u(m),t({heading_weight_strong:r})},N=r=>{const m={...y,italicStrong:r};e?C({headingTypography:m}):u(m),t({accent_italic:r})};return _(x,{children:[o(q,{saved:p,old:d,colours:F,sizeOf:g,onChange:T,openId:i===H?null:i,onOpenChange:a,withoutSize:e}),o(U,{font:w.accent,size:c.accent,weight:y.weightStrong,italic:y.italicStrong,headingWeight:y.weight,open:i===H,onOpenChange:r=>a(r?H:null),onChange:r=>{r.key==="font"?I(r.value):r.key==="size"?L(r.value):r.key==="weight"?A(r.value):N(r.value)},withoutSize:e})]})}const H="accent";function me(e){const t=le(e);return[{key:"accent",name:S("Accent"),value:t.accent},{key:"text",name:S("Text"),value:t.text},{key:"labels",name:S("Labels"),value:t.muted??t.text}]}const Se={"heading-1":"heading","heading-2":"heading2","heading-3":"heading3","body-1":"body","body-5":"label"},Ce={heading:32,body:14},we={heading:"main h1, main h2",heading2:"main h1, main h2",heading3:"main h1, main h2",accent:"main h1 em, main h2 em",body:"main p",label:"main .mono-eyebrow"};function ye(e){if(typeof document>"u")return null;const i=(ne()?.contentDocument??document).querySelector(we[e]);if(!i)return null;const a=parseFloat(getComputedStyle(i).fontSize);return Number.isFinite(a)?a:null}function _e({themeFromDocument:e,persist:t,showHint:i}){const{appState:a,dispatch:l}=E(c=>c),{cornerRadiusPx:n,setCornerRadiusPx:h}=f(),u=a.data,s=u.root?.props??{},d=s.cornerRadiusPx===void 0?ie[ae(s.cornerStyle)]:se(s.cornerRadiusPx),p=e?d:n,C=c=>l({type:"replaceRoot",root:{...u.root,props:{...s,...c}},recordHistory:!0});return o(z,{value:p,onChange:c=>{e?C({cornerRadiusPx:c}):h(c),t({corner_radius_px:c})},showHint:i})}function xe(e){return{site_width:e}}function Te({persist:e,showHint:t}){const{siteWidth:i,setSiteWidth:a}=f();return o(X,{value:i,onChange:n=>{a(n),e(xe(n),n===null)},showHint:t})}function be(e){return{block_gap:e}}function Re(e){return{site_gutter:e}}function Pe({persist:e,showHint:t}){const{siteGutter:i,setSiteGutter:a}=f();return o(j,{value:i,onChange:n=>{a(n),e(Re(n),n===null)},showHint:t})}function He({persist:e,showHint:t}){const{blockGap:i,setBlockGap:a}=f();return o(O,{value:i,onChange:n=>{a(n),e(be(n),n===null)},showHint:t})}function Ee({persist:e,showHint:t}){const{heroBackgroundFollowsWidth:i,setHeroBackgroundFollowsWidth:a}=f();return o(G,{value:i,onChange:n=>{a(n),e({hero_background_follows_width:n},!0)},showHint:t})}function Fe({persist:e,showHint:t=!0}){return _(x,{children:[o(Te,{persist:e,showHint:t}),o(Pe,{persist:e,showHint:t}),o(He,{persist:e,showHint:t}),o(Ee,{persist:e,showHint:t})]})}function Ie(e){return{card_shadow:e}}function Le(e){return e===null?{shadow_color:null}:{shadow_color:ce(e)}}function Ae(e){return{hover_effect:e}}function Ne({persist:e,showHint:t=!0}){const{cardShadow:i,setCardShadow:a,shadowColor:l,setShadowColor:n,hoverEffect:h,setHoverEffect:u}=f();return _(x,{children:[o(W,{value:i,onChange:s=>{a(s),e(Ie(s),!0)},showHint:t}),o(v,{value:l,onChange:s=>{n(s),e(Le(s),s===null)},showHint:t}),o(B,{value:h,onChange:s=>{u(s),e(Ae(s),!0)},showHint:t})]})}function ke(e){return{photography_grayscale:e}}function ze({persist:e,showHint:t}){const{photographyGrayscale:i,setPhotographyGrayscale:a}=f();return o(Y,{value:i,onChange:n=>{a(n),e(ke(n),!0)},showHint:t})}function We({persist:e,showHint:t=!0}){return o(x,{children:o(ze,{persist:e,showHint:t})})}function ve(){const{websiteName:e}=f();return e?.trim()||oe}function ut(){const e=ve();return o(M,{content:S("{name} — renamed in the Console: {place}.",{name:e,place:S("Storefront ▸ Sites ▸ Settings")}),className:"sf-name-tip",children:o("span",{className:"sf-panel-site",children:e})})}function Oe({themeFromDocument:e=!1,tokenRef:t,siteId:i,onNotify:a,tab:l,onTabChange:n}){const{persist:h}=ee({themeFromDocument:e,tokenRef:t,siteId:i,onResult:g=>{const T=te(g);T&&a?.(T.msg,T.tone)}}),[u,s]=R(b[0].id),d=l!==void 0,p=d?l:u,C=d?n??(()=>{}):s,w=b.find(g=>g.id===p)??b[0],[c,y]=R(de);return _(x,{children:[o(K,{items:b.map(g=>({...g,label:S(g.label)})),activeId:w.id,onSelect:C,ariaLabel:S("Site styles"),idPrefix:P}),_("div",{id:J(P,w.id),className:he,role:"tabpanel","aria-labelledby":$(P,w.id),children:[p==="basics"&&_(x,{children:[o(_e,{themeFromDocument:e,persist:h,showHint:c}),!e&&o(Ne,{persist:h,showHint:c}),!e&&o(Fe,{persist:h,showHint:c}),!e&&o(We,{persist:h,showHint:c}),o(pe,{shown:c,onChange:y})]}),p==="theme"&&o(fe,{themeFromDocument:e,persist:h}),p==="text"&&o(ge,{themeFromDocument:e,persist:h})]})]})}export{Ne as CardLookFields,pe as HintsToggle,Fe as PageGroupFields,We as PhotographyGroupFields,de as SHOW_HINTS_DEFAULT,P as SITE_STYLES_ID_PREFIX,b as SITE_STYLES_TABS,dt as SITE_STYLES_TEXT_TAB,he as TABPANEL_CLASS,ut as WebsiteNameReadonly,be as blockGapPatch,Ie as cardShadowPatch,Oe as default,Ae as hoverEffectPatch,ke as photographyPatch,Le as shadowColourPatch,Re as siteGutterPatch,xe as siteWidthPatch,ve as useWebsiteName};
@@ -2402,9 +2402,10 @@
2402
2402
  /* The choice rungs: two or three buttons in a row, one of them held down.
2403
2403
 
2404
2404
  ⏳ LEAVING. Every pick-one row draws efficient-easel's SettingsSegmented since
2405
- [MERGE] One Pick-One Control (2026-10-06); only TextStylesField still draws
2406
- this strip, because the S2 card owns that file, and `.sf-rung` alone is the
2407
- hints switch's base. `test-segmented-controls` §8 stops a new strip. Delete
2405
+ [MERGE] One Pick-One Control (2026-10-06); no row draws this strip of its own
2406
+ any more (W1b-1, 2026-10-16, retired TextStylesField; the Accent row's B · I
2407
+ are the shell's IconButton, laid out in a `.sf-rungs` row), and `.sf-rung`
2408
+ alone is the hints switch's base. `test-segmented-controls` §8 stops a new strip. Delete
2408
2409
  these rules when the last of those two moves.
2409
2410
 
2410
2411
  `--sf-disabled` on the pressed border is not a disabled state -- it is the one
@@ -4297,3 +4298,12 @@ ul.sf-image-status {
4297
4298
  right: 8px;
4298
4299
  z-index: 1;
4299
4300
  }
4301
+
4302
+ /* Site styles › Text: the Accent group (SiteAccentField, GG ruling (b)
4303
+ 2026-10-16) is easel's `TextStylesGroup`, drawn AFTER the list rather than
4304
+ inside it, so easel's own `.es-ts-section + .es-ts-section` gap cannot
4305
+ reach it. The same gap, on the panel's rhythm token, so Accent sits under Body
4306
+ exactly as Body sits under Headings (--es-rhythm-group is 32px, easel's gap). */
4307
+ .es-ts + .es-ts-section {
4308
+ margin-top: var(--es-rhythm-group);
4309
+ }
@@ -0,0 +1,34 @@
1
+ import type { CSSProperties } from "react";
2
+ export declare const SECTION_STICK_LABEL = "Stick to top";
3
+ export declare const SECTION_STICK_DISTANCE: {
4
+ readonly min: 0;
5
+ readonly max: 200;
6
+ readonly step: 4;
7
+ readonly fallback: 0;
8
+ };
9
+ export declare const SECTION_STICK_CLASS = "sf-section-stick";
10
+ export declare const SECTION_STICK_PHONE_ON_CLASS = "sf-section-stick-phone-on";
11
+ export declare const SECTION_STICK_PHONE_OFF_CLASS = "sf-section-stick-phone-off";
12
+ export declare const SECTION_STICK_VARS: {
13
+ readonly desktop: "--sf-stick-distance";
14
+ readonly phone: "--sf-stick-distance-phone";
15
+ };
16
+ export declare const SECTION_STICK_EXCLUDED: ReadonlySet<string>;
17
+ export type SectionStickProps = {
18
+ stickTop?: unknown;
19
+ stickTopDistance?: unknown;
20
+ stickTopPhone?: unknown;
21
+ stickTopDistancePhone?: unknown;
22
+ };
23
+ export declare function hasPhoneStick(props: SectionStickProps): boolean;
24
+ export declare function resolveSectionStick(props: SectionStickProps): {
25
+ desktop: boolean;
26
+ desktopDistance: number;
27
+ phone: boolean;
28
+ phoneDistance: number;
29
+ ownPhone: boolean;
30
+ };
31
+ export declare function sectionStickAttrs(props: SectionStickProps): {
32
+ className: string;
33
+ style: CSSProperties;
34
+ } | null;
@@ -0,0 +1 @@
1
+ const T="Stick to top",s={min:0,max:200,step:4,fallback:0},a="sf-section-stick",k="sf-section-stick-phone-on",r="sf-section-stick-phone-off",c={desktop:"--sf-stick-distance",phone:"--sf-stick-distance-phone"},C=new Set(["CategoryBar","DocTabs","IntroBleed"]);function i(o){const t=typeof o=="number"&&Number.isFinite(o)?o:s.fallback;return Math.min(s.max,Math.max(s.min,Math.round(t)))}function f(o){return typeof o.stickTopPhone=="boolean"}function h(o){const t=o.stickTop===!0,n=i(o.stickTopDistance),e=f(o),p=e?o.stickTopPhone===!0:t,S=e?i(o.stickTopDistancePhone):n;return{desktop:t,desktopDistance:n,phone:p,phoneDistance:S,ownPhone:e}}function _(o){const t=h(o);if(!t.desktop&&!t.phone)return null;const n=[a],e={};return t.desktop&&(e[c.desktop]=`${t.desktopDistance}px`),(t.ownPhone||t.phone!==t.desktop)&&(n.push(t.phone?k:r),t.phone&&(e[c.phone]=`${t.phoneDistance}px`)),t.desktop||n.push("sf-section-stick-desktop-off"),{className:n.join(" "),style:e}}export{a as SECTION_STICK_CLASS,s as SECTION_STICK_DISTANCE,C as SECTION_STICK_EXCLUDED,T as SECTION_STICK_LABEL,r as SECTION_STICK_PHONE_OFF_CLASS,k as SECTION_STICK_PHONE_ON_CLASS,c as SECTION_STICK_VARS,f as hasPhoneStick,h as resolveSectionStick,_ as sectionStickAttrs};
@@ -135,16 +135,12 @@ export declare const WEB_BUILDER_WORDS: {
135
135
  readonly "Article Text": "Article Text";
136
136
  readonly "Article headline": "Article headline";
137
137
  readonly "Article title": "Article title";
138
- readonly "As designed": "As designed";
139
138
  readonly "As shot": "As shot";
140
- readonly "As typed": "As typed";
141
139
  readonly "As uploaded": "As uploaded";
142
140
  readonly "Aspect ratio": "Aspect ratio";
143
141
  readonly "At zero": "At zero";
144
142
  readonly Attribution: "Attribution";
145
143
  readonly Auto: "Auto";
146
- readonly "Auto = the accent phrase takes the heading's own weight.": "Auto = the accent phrase takes the heading's own weight.";
147
- readonly "Auto = this style states no size, and text following it keeps the size its section drew.": "Auto = this style states no size, and text following it keeps the size its section drew.";
148
144
  readonly "Auto contrast": "Auto contrast";
149
145
  readonly "Auto-advance slides": "Auto-advance slides";
150
146
  readonly "Auto-fills the cover image, headline, dek, date and link from this post each time you open the editor. Those fields are hidden while a post is linked; the remaining fields stay yours to set.": "Auto-fills the cover image, headline, dek, date and link from this post each time you open the editor. Those fields are hidden while a post is linked; the remaining fields stay yours to set.";
@@ -183,7 +179,6 @@ export declare const WEB_BUILDER_WORDS: {
183
179
  readonly "Blog post source": "Blog post source";
184
180
  readonly Body: "Body";
185
181
  readonly Bold: "Bold";
186
- readonly "Bold is the weight above \u2014 one value, two ways to set it.": "Bold is the weight above — one value, two ways to set it.";
187
182
  readonly "Bold word": "Bold word";
188
183
  readonly "Booking Form": "Booking Form";
189
184
  readonly Border: "Border";
@@ -222,8 +217,6 @@ export declare const WEB_BUILDER_WORDS: {
222
217
  readonly "By the numbers": "By the numbers";
223
218
  readonly "Call-to-Action Heading": "Call-to-Action Heading";
224
219
  readonly Cancel: "Cancel";
225
- readonly Capitals: "Capitals";
226
- readonly "Caps the biggest heading on the site. Auto = each section's own.": "Caps the biggest heading on the site. Auto = each section's own.";
227
220
  readonly Caption: "Caption";
228
221
  readonly Card: "Card";
229
222
  readonly "Card body": "Card body";
@@ -290,7 +283,6 @@ export declare const WEB_BUILDER_WORDS: {
290
283
  readonly "Column {n}": "Column {n}";
291
284
  readonly Columns: "Columns";
292
285
  readonly "Columns on phone": "Columns on phone";
293
- readonly Compressed: "Compressed";
294
286
  readonly "Contact / Locations": "Contact / Locations";
295
287
  readonly "Contact Form": "Contact Form";
296
288
  readonly "Contact, FAQ & forms": "Contact, FAQ & forms";
@@ -362,6 +354,7 @@ export declare const WEB_BUILDER_WORDS: {
362
354
  readonly "Directions link": "Directions link";
363
355
  readonly "Dismiss link": "Dismiss link";
364
356
  readonly Display: "Display";
357
+ readonly "Distance from top": "Distance from top";
365
358
  readonly Divider: "Divider";
366
359
  readonly "Document Detail Cards": "Document Detail Cards";
367
360
  readonly "Document Header": "Document Header";
@@ -414,6 +407,7 @@ export declare const WEB_BUILDER_WORDS: {
414
407
  readonly Essay: "Essay";
415
408
  readonly Even: "Even";
416
409
  readonly "Every page": "Every page";
410
+ readonly "Every text on the site that follows {style} changes to look like this one. This text\u2019s own changes are cleared, and it keeps following {style}.": "Every text on the site that follows {style} changes to look like this one. This text’s own changes are cleared, and it keeps following {style}.";
417
411
  readonly "Every {part} in this section follows it. The face and the size change; the letter case is the section\u2019s own and stays as it is.": "Every {part} in this section follows it. The face and the size change; the letter case is the section’s own and stays as it is.";
418
412
  readonly "Everything else on this block comes from the linked post. Unlink it to edit by hand.": "Everything else on this block comes from the linked post. Unlink it to edit by hand.";
419
413
  readonly "Everything is live": "Everything is live";
@@ -461,7 +455,6 @@ export declare const WEB_BUILDER_WORDS: {
461
455
  readonly "Follows the section's Corners until you set a number here.": "Follows the section's Corners until you set a number here.";
462
456
  readonly "Follows the site": "Follows the site";
463
457
  readonly "Follows the style": "Follows the style";
464
- readonly Font: "Font";
465
458
  readonly "Footer Box": "Footer Box";
466
459
  readonly "Footer \u00B7 on every page": "Footer · on every page";
467
460
  readonly "Footer \u00B7 on every page \u00B7 old style": "Footer · on every page · old style";
@@ -576,8 +569,6 @@ export declare const WEB_BUILDER_WORDS: {
576
569
  readonly "Issue Header": "Issue Header";
577
570
  readonly "Issue lines": "Issue lines";
578
571
  readonly "Issue meta lines": "Issue meta lines";
579
- readonly Italic: "Italic";
580
- readonly "Italic is not saved yet \u2014 the theme row has no column for it (card 66162.b).": "Italic is not saved yet — the theme row has no column for it (card 66162.b).";
581
572
  readonly Item: "Item";
582
573
  readonly "Item alignment": "Item alignment";
583
574
  readonly Items: "Items";
@@ -602,7 +593,6 @@ export declare const WEB_BUILDER_WORDS: {
602
593
  readonly Ladder: "Ladder";
603
594
  readonly Large: "Large";
604
595
  readonly "Large text only": "Large text only";
605
- readonly "Largest size": "Largest size";
606
596
  readonly "Latest Posts": "Latest Posts";
607
597
  readonly "Latest journal posts in a three-card row.": "Latest journal posts in a three-card row.";
608
598
  readonly Latitude: "Latitude";
@@ -626,9 +616,7 @@ export declare const WEB_BUILDER_WORDS: {
626
616
  readonly Lightbox: "Lightbox";
627
617
  readonly "Limited release": "Limited release";
628
618
  readonly Line: "Line";
629
- readonly "Line & text gap": "Line & text gap";
630
619
  readonly "Line (trend)": "Line (trend)";
631
- readonly "Line gap {line} \u00B7 text gap {letter}em.": "Line gap {line} · text gap {letter}em.";
632
620
  readonly Link: "Link";
633
621
  readonly "Linked to a blog post. This editor has no blog to pick another from; choose \u201CNone (manual)\u201D to author the section yourself.": "Linked to a blog post. This editor has no blog to pick another from; choose “None (manual)” to author the section yourself.";
634
622
  readonly "Linked to \u201C{name}\u201D": "Linked to “{name}”";
@@ -724,6 +712,7 @@ export declare const WEB_BUILDER_WORDS: {
724
712
  readonly "Number style": "Number style";
725
713
  readonly Numbers: "Numbers";
726
714
  readonly "N\u00B001, N\u00B002": "N°01, N°02";
715
+ readonly Off: "Off";
727
716
  readonly Office: "Office";
728
717
  readonly Offices: "Offices";
729
718
  readonly "Offset tall": "Offset tall";
@@ -860,7 +849,6 @@ export declare const WEB_BUILDER_WORDS: {
860
849
  readonly "Scroll direction": "Scroll direction";
861
850
  readonly "Scroll duration": "Scroll duration";
862
851
  readonly "Scroll-Over Text": "Scroll-Over Text";
863
- readonly "Scroll-over": "Scroll-over";
864
852
  readonly "Scrolling Bar": "Scrolling Bar";
865
853
  readonly Search: "Search";
866
854
  readonly "Search all pages": "Search all pages";
@@ -964,7 +952,7 @@ export declare const WEB_BUILDER_WORDS: {
964
952
  readonly "Step *one*": "Step *one*";
965
953
  readonly "Step *three*": "Step *three*";
966
954
  readonly "Step *two*": "Step *two*";
967
- readonly "Stick under header": "Stick under header";
955
+ readonly "Stick to top": "Stick to top";
968
956
  readonly "Still time per slide": "Still time per slide";
969
957
  readonly "Storefront \u2192 Blog": "Storefront → Blog";
970
958
  readonly "Storefront \u25B8 Sites \u25B8 Settings": "Storefront ▸ Sites ▸ Settings";
@@ -1026,7 +1014,6 @@ export declare const WEB_BUILDER_WORDS: {
1026
1014
  readonly "Texture color": "Texture color";
1027
1015
  readonly "Texture opacity": "Texture opacity";
1028
1016
  readonly "Thanks \u2014 we'll email you to confirm.": "Thanks — we'll email you to confirm.";
1029
- readonly "The built-in spacing.": "The built-in spacing.";
1030
1017
  readonly "The chat bubble is hidden across the whole site.": "The chat bubble is hidden across the whole site.";
1031
1018
  readonly "The current product's compatible tyres \u2014 image, size, key specs and price per tyre, with an inquiry link. Display only.": "The current product's compatible tyres — image, size, key specs and price per tyre, with an inquiry link. Display only.";
1032
1019
  readonly "The current product's related items in a tidy row \u2014 the product page's built-in 'Pair with' cross-sell.": "The current product's related items in a tidy row — the product page's built-in 'Pair with' cross-sell.";
@@ -1036,11 +1023,9 @@ export declare const WEB_BUILDER_WORDS: {
1036
1023
  readonly "The header and footer could not load. They are hidden for now and nothing in them is saved. Reload to try again.": "The header and footer could not load. They are hidden for now and nothing in them is saved. Reload to try again.";
1037
1024
  readonly "The header cannot take another one of these": "The header cannot take another one of these";
1038
1025
  readonly "The header holds at most 3 sections": "The header holds at most 3 sections";
1039
- readonly "The only setting that changes a heading's capitals.": "The only setting that changes a heading's capitals.";
1040
1026
  readonly "The room left at the left and right edge of every page.": "The room left at the left and right edge of every page.";
1041
1027
  readonly "The section is full width, so this card follows Site styles \u25B8 Basics \u25B8 Corners.": "The section is full width, so this card follows Site styles ▸ Basics ▸ Corners.";
1042
1028
  readonly "The section it belonged to has been changed or removed.": "The section it belonged to has been changed or removed.";
1043
- readonly "The size a text takes when you set it to follow this style. Sections keep their own sizes.": "The size a text takes when you set it to follow this style. Sections keep their own sizes.";
1044
1029
  readonly "The standard width every page on this site renders at.": "The standard width every page on this site renders at.";
1045
1030
  readonly "The words are still on your page and nothing has been lost. The editor could not work out which control belongs to them, which is a fault on our side. Go back and click the section to open its settings instead.": "The words are still on your page and nothing has been lost. The editor could not work out which control belongs to them, which is a fault on our side. Go back and click the section to open its settings instead.";
1046
1031
  readonly Theme: "Theme";
@@ -1054,7 +1039,6 @@ export declare const WEB_BUILDER_WORDS: {
1054
1039
  readonly "This color is hard to read on this theme's page. The buttons below are the same hue, darkened.": "This color is hard to read on this theme's page. The buttons below are the same hue, darkened.";
1055
1040
  readonly "This color is hard to read on your page background. Pick one further from it \u2014 lighter if your pages are dark, deeper if they are light.": "This color is hard to read on your page background. Pick one further from it — lighter if your pages are dark, deeper if they are light.";
1056
1041
  readonly "This color reads clearly on your pages.": "This color reads clearly on your pages.";
1057
- readonly "This face": "This face";
1058
1042
  readonly "This footer uses the old layout": "This footer uses the old layout";
1059
1043
  readonly "This is the only card in the section.": "This is the only card in the section.";
1060
1044
  readonly "This part is no longer here.": "This part is no longer here.";
@@ -1068,7 +1052,6 @@ export declare const WEB_BUILDER_WORDS: {
1068
1052
  readonly "Three stagger": "Three stagger";
1069
1053
  readonly Ticker: "Ticker";
1070
1054
  readonly "Ticker items": "Ticker items";
1071
- readonly Tight: "Tight";
1072
1055
  readonly TikTok: "TikTok";
1073
1056
  readonly "Timeline entries": "Timeline entries";
1074
1057
  readonly "Timezone chip": "Timezone chip";
@@ -1107,6 +1090,8 @@ export declare const WEB_BUILDER_WORDS: {
1107
1090
  readonly Up: "Up";
1108
1091
  readonly "Up and down": "Up and down";
1109
1092
  readonly Upcoming: "Upcoming";
1093
+ readonly "Update style": "Update style";
1094
+ readonly "Update {style}?": "Update {style}?";
1110
1095
  readonly "Upload a background image": "Upload a background image";
1111
1096
  readonly "Upload a background video": "Upload a background video";
1112
1097
  readonly "Upload a poster still": "Upload a poster still";
@@ -1123,7 +1108,6 @@ export declare const WEB_BUILDER_WORDS: {
1123
1108
  readonly Volume: "Volume";
1124
1109
  readonly "Ways to pay": "Ways to pay";
1125
1110
  readonly WeChat: "WeChat";
1126
- readonly Weight: "Weight";
1127
1111
  readonly "What people *say.*": "What people *say.*";
1128
1112
  readonly WhatsApp: "WhatsApp";
1129
1113
  readonly "Whether this page sits on the site's content column, or runs edge to edge.": "Whether this page sits on the site's content column, or runs edge to edge.";
@@ -1154,7 +1138,6 @@ export declare const WEB_BUILDER_WORDS: {
1154
1138
  readonly Zigzag: "Zigzag";
1155
1139
  readonly accent: "accent";
1156
1140
  readonly "all theme colors": "all theme colors";
1157
- readonly body: "body";
1158
1141
  readonly "body text": "body text";
1159
1142
  readonly button: "button";
1160
1143
  readonly card: "card";
@@ -1167,10 +1150,6 @@ export declare const WEB_BUILDER_WORDS: {
1167
1150
  readonly "each block's own spacing": "each block's own spacing";
1168
1151
  readonly entries: "entries";
1169
1152
  readonly group: "group";
1170
- readonly heading: "heading";
1171
- readonly headingLarge: "headingLarge";
1172
- readonly headingMedium: "headingMedium";
1173
- readonly headingSmall: "headingSmall";
1174
1153
  readonly "images only": "images only";
1175
1154
  readonly item: "item";
1176
1155
  readonly label: "label";
@@ -1189,7 +1168,6 @@ export declare const WEB_BUILDER_WORDS: {
1189
1168
  readonly "the theme's section background": "the theme's section background";
1190
1169
  readonly "this container's own spacing": "this container's own spacing";
1191
1170
  readonly "videos only": "videos only";
1192
- readonly "{face} is loaded without an italic, so it cannot be set in italic. Slanting it would deform the letters rather than style them.": "{face} is loaded without an italic, so it cannot be set in italic. Slanting it would deform the letters rather than style them.";
1193
1171
  readonly "{grade} on the button": "{grade} on the button";
1194
1172
  readonly "{label} hex code": "{label} hex code";
1195
1173
  readonly "{label} {n}": "{label} {n}";