efficient-web-builder 42.0.0 → 44.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/CHANGELOG.md +212 -0
  2. package/dist/editor/components/AnchorField.js +1 -1
  3. package/dist/editor/components/CanvasPartsBridge.d.ts +1 -0
  4. package/dist/editor/components/CanvasPartsBridge.js +1 -1
  5. package/dist/editor/components/DuplicatePageDialog.js +1 -1
  6. package/dist/editor/components/MediaUploadField.d.ts +3 -1
  7. package/dist/editor/components/MediaUploadField.js +1 -1
  8. package/dist/editor/components/PagesPanel.js +1 -1
  9. package/dist/editor/components/PreviewPartAnchors.js +1 -1
  10. package/dist/editor/components/PreviewThemeFrame.d.ts +1 -1
  11. package/dist/editor/components/PreviewThemeFrame.js +3 -19
  12. package/dist/editor/components/SectionEditor.d.ts +5 -1
  13. package/dist/editor/components/SectionEditor.js +1 -1
  14. package/dist/editor/components/SectionIcon.js +1 -1
  15. package/dist/editor/components/SectionTextPartBridge.js +1 -1
  16. package/dist/editor/components/SectionThumbnail.js +1 -1
  17. package/dist/editor/components/SiteFields.d.ts +2 -1
  18. package/dist/editor/components/SiteFields.js +1 -1
  19. package/dist/editor/components/StandaloneSectionEditor.js +1 -1
  20. package/dist/editor/components/StorefrontEditor.js +1 -1
  21. package/dist/editor/components/StylesPanel.d.ts +3 -1
  22. package/dist/editor/components/StylesPanel.js +1 -1
  23. package/dist/editor/components/WebsiteScreenParts.js +1 -1
  24. package/dist/editor/components/WebsiteSettingsPanel.d.ts +6 -1
  25. package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
  26. package/dist/editor/components/storefront-editor.css +16 -77
  27. package/dist/editor/components/useHostDocumentBridge.js +1 -1
  28. package/dist/editor/components/useLocationsTree.js +1 -1
  29. package/dist/editor/components/useSectionToBoxPass.js +1 -1
  30. package/dist/editor/components/useSocialSettings.d.ts +2 -2
  31. package/dist/editor/lib/document/ColourControl.d.ts +7 -2
  32. package/dist/editor/lib/document/ColourControl.js +1 -1
  33. package/dist/editor/lib/document/MarkupToolbar.d.ts +6 -2
  34. package/dist/editor/lib/document/MarkupToolbar.js +1 -1
  35. package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
  36. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  37. package/dist/editor/lib/document/blocks/general/HeroSlide/fields.js +1 -1
  38. package/dist/editor/lib/document/blocks/general/Logos/fields.js +1 -1
  39. package/dist/editor/lib/document/blocks/general/Text/fields.js +1 -1
  40. package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
  41. package/dist/editor/lib/document/canvas-typing.js +1 -1
  42. package/dist/editor/lib/document/consent-words-field.d.ts +6 -0
  43. package/dist/editor/lib/document/consent-words-field.js +1 -0
  44. package/dist/editor/lib/document/controls.d.ts +14 -2
  45. package/dist/editor/lib/document/controls.js +1 -1
  46. package/dist/editor/lib/document/field-groups.js +1 -1
  47. package/dist/editor/lib/document/footer-blocks.js +1 -1
  48. package/dist/editor/lib/document/locked-blocks.d.ts +3 -0
  49. package/dist/editor/lib/document/locked-blocks.js +1 -1
  50. package/dist/editor/lib/document/overrides.js +1 -1
  51. package/dist/editor/lib/document/page-root-fields.d.ts +1 -0
  52. package/dist/editor/lib/document/page-root-fields.js +1 -1
  53. package/dist/editor/lib/document/part-anchors.d.ts +7 -0
  54. package/dist/editor/lib/document/part-anchors.js +1 -1
  55. package/dist/editor/lib/document/section-width-fields.js +1 -1
  56. package/dist/editor/lib/document/selected-host.d.ts +2 -0
  57. package/dist/editor/lib/document/selected-host.js +1 -0
  58. package/dist/editor/lib/page-copy.js +1 -1
  59. package/dist/editor/lib/sections/section-dry-run.d.ts +2 -9
  60. package/dist/editor/lib/sections/section-dry-run.js +2 -2
  61. package/dist/format/lib/content/authored-props.js +1 -1
  62. package/dist/format/lib/content/block-sources.js +1 -1
  63. package/dist/format/lib/content/box-layout.d.ts +1 -0
  64. package/dist/format/lib/content/box-layout.js +1 -1
  65. package/dist/format/lib/content/box-shadow.d.ts +3 -0
  66. package/dist/format/lib/content/box-shadow.js +1 -0
  67. package/dist/format/lib/content/button-icon.d.ts +2 -1
  68. package/dist/format/lib/content/button-icon.js +1 -1
  69. package/dist/format/lib/content/consent-banner.d.ts +21 -0
  70. package/dist/format/lib/content/consent-banner.js +1 -1
  71. package/dist/format/lib/content/contact.js +1 -1
  72. package/dist/format/lib/content/footer.d.ts +10 -0
  73. package/dist/format/lib/content/footer.js +1 -1
  74. package/dist/format/lib/content/gallery-layout.d.ts +12 -0
  75. package/dist/format/lib/content/gallery-layout.js +1 -1
  76. package/dist/format/lib/content/section-width.d.ts +0 -4
  77. package/dist/format/lib/content/section-width.js +1 -1
  78. package/dist/format/lib/document/blocks/general/Logos/meta.d.ts +6 -0
  79. package/dist/format/lib/document/blocks/general/Logos/meta.js +1 -1
  80. package/dist/format/lib/document/blocks/general/SectionHeader/meta.js +1 -1
  81. package/dist/format/lib/document/box-footer.js +1 -1
  82. package/dist/format/lib/document/container-blocks.js +1 -1
  83. package/dist/format/lib/document/media-manifest.json +3 -2
  84. package/dist/format/lib/document/nestable-content-sections.js +1 -1
  85. package/dist/format/lib/document/passes/settings-groups.js +1 -1
  86. package/dist/format/lib/document/root-panel.d.ts +8 -0
  87. package/dist/format/lib/document/root-panel.js +1 -0
  88. package/dist/format/lib/document/section-catalog.js +1 -1
  89. package/dist/format/lib/document/source-bound-parts.js +1 -1
  90. package/dist/format/lib/editor-words-catalogue.d.ts +23 -5
  91. package/dist/format/lib/editor-words-catalogue.js +4 -4
  92. package/dist/format/lib/editor-words.js +1 -1
  93. package/dist/format/lib/hero-texture.js +1 -1
  94. package/dist/format/lib/hero-video.d.ts +7 -0
  95. package/dist/format/lib/hero-video.js +1 -1
  96. package/dist/format/lib/links/page-link-rules.js +1 -1
  97. package/dist/format/lib/markup.d.ts +1 -0
  98. package/dist/format/lib/markup.js +2 -2
  99. package/dist/format/lib/non-empty-string.d.ts +1 -0
  100. package/dist/format/lib/non-empty-string.js +1 -0
  101. package/dist/format/lib/popup/look.d.ts +1 -1
  102. package/dist/format/lib/popup/look.js +1 -1
  103. package/dist/format/lib/popup/rules.d.ts +1 -1
  104. package/dist/format/lib/popup/rules.js +1 -1
  105. package/dist/format/lib/reel.d.ts +2 -1
  106. package/dist/format/lib/reel.js +1 -1
  107. package/dist/format/lib/sections/hero-overlay.js +1 -1
  108. package/dist/format/lib/sections/logo-look.d.ts +7 -0
  109. package/dist/format/lib/sections/logo-look.js +1 -0
  110. package/dist/format/lib/sections/section-head-placement.d.ts +1 -0
  111. package/dist/format/lib/sections/section-head-placement.js +1 -1
  112. package/dist/format/lib/site-theme-row.d.ts +0 -1
  113. package/dist/format/lib/slugify.d.ts +1 -1
  114. package/dist/format/lib/slugify.js +1 -1
  115. package/dist/format/lib/theme.d.ts +2 -1
  116. package/dist/format/lib/theme.js +4 -4
  117. package/dist/render/components/BlockFrame.d.ts +1 -1
  118. package/dist/render/components/BoxTabs.d.ts +2 -1
  119. package/dist/render/components/BoxTabs.js +1 -1
  120. package/dist/render/components/Btn.d.ts +1 -0
  121. package/dist/render/components/Btn.js +1 -1
  122. package/dist/render/components/ButtonBlock.d.ts +12 -1
  123. package/dist/render/components/ButtonBlock.js +1 -1
  124. package/dist/render/components/ContactLocations.js +3 -45
  125. package/dist/render/components/Divider.d.ts +1 -1
  126. package/dist/render/components/Divider.js +1 -1
  127. package/dist/render/components/DocBody.js +5 -5
  128. package/dist/render/components/Flex.d.ts +5 -9
  129. package/dist/render/components/Flex.js +1 -1
  130. package/dist/render/components/Heading.d.ts +1 -1
  131. package/dist/render/components/HeroGroup.d.ts +3 -9
  132. package/dist/render/components/HeroGroup.js +1 -1
  133. package/dist/render/components/HeroSection.js +1 -11
  134. package/dist/render/components/HeroSingle.js +1 -11
  135. package/dist/render/components/LogoBlock.d.ts +1 -1
  136. package/dist/render/components/LogoBlock.js +1 -1
  137. package/dist/render/components/LogoWallContext.d.ts +12 -0
  138. package/dist/render/components/LogoWallContext.js +1 -0
  139. package/dist/render/components/Logos.d.ts +16 -1
  140. package/dist/render/components/Logos.js +1 -1
  141. package/dist/render/components/PaymentBadges.d.ts +3 -1
  142. package/dist/render/components/PaymentBadges.js +1 -1
  143. package/dist/render/components/PreviewHeaderContext.d.ts +1 -3
  144. package/dist/render/components/PreviewHeaderContext.js +1 -1
  145. package/dist/render/components/PreviewTickerContext.d.ts +3 -0
  146. package/dist/render/components/PreviewTickerContext.js +1 -1
  147. package/dist/render/components/Reel.js +1 -1
  148. package/dist/render/components/SiteGutterFrame.d.ts +3 -2
  149. package/dist/render/components/SiteGutterFrame.js +1 -1
  150. package/dist/render/components/Text.d.ts +1 -1
  151. package/dist/render/lib/content/button-look.d.ts +46 -0
  152. package/dist/render/lib/content/button-look.js +1 -0
  153. package/dist/{format → render}/lib/content/section-padding.d.ts +32 -4
  154. package/dist/render/lib/content/section-padding.js +1 -0
  155. package/dist/render/lib/content/view-values.d.ts +10 -0
  156. package/dist/render/lib/content/view-values.js +1 -0
  157. package/dist/render/lib/document/blocks/general/ButtonBlock/render.js +1 -1
  158. package/dist/render/lib/document/blocks/general/Divider/render.js +1 -1
  159. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  160. package/dist/render/lib/document/blocks/general/Heading/render.js +1 -1
  161. package/dist/render/lib/document/blocks/general/HeroGroup/render.js +1 -1
  162. package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
  163. package/dist/render/lib/document/blocks/general/Logos/render.js +1 -1
  164. package/dist/render/lib/document/blocks/general/PaymentBadges/render.js +1 -1
  165. package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
  166. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +4 -1
  167. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  168. package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.d.ts +2 -0
  169. package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.js +1 -0
  170. package/dist/render/lib/document/blocks/general/section-to-box-rows-stats.d.ts +5 -0
  171. package/dist/render/lib/document/blocks/general/section-to-box-rows-stats.js +1 -0
  172. package/dist/render/lib/document/blocks/general/section-to-box-rows.d.ts +0 -4
  173. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  174. package/dist/render/lib/document/hero-media-parts.d.ts +2 -2
  175. package/dist/render/lib/document/page-render.js +1 -1
  176. package/dist/render/lib/document/part-rows.js +1 -1
  177. package/dist/render/lib/document/part-styles.d.ts +0 -1
  178. package/dist/render/lib/document/part-styles.js +2 -2
  179. package/dist/render/lib/document/passes/section-anchor.js +1 -1
  180. package/dist/render/lib/document/passes/section-padding.js +1 -1
  181. package/dist/render/lib/document/text-parts.d.ts +0 -2
  182. package/dist/render/lib/document/text-parts.js +1 -1
  183. package/dist/render/lib/sections/section-to-box.d.ts +2 -11
  184. package/dist/render/lib/sections/section-to-box.js +1 -1
  185. package/dist/render/lib/text-styles/site-text-styles.js +2 -2
  186. package/package.json +5 -5
  187. package/dist/format/lib/content/section-padding.js +0 -1
@@ -1 +1 @@
1
- "use client";import{jsx as i,Fragment as B,jsxs as _}from"react/jsx-runtime";import{useCallback as R,useEffect as P,useRef as oe,useState as re}from"react";import{Button as ne,Tooltip as ie}from"efficient-shell/ui";import{SettingsSwitch as se}from"efficient-easel/panel";import{PagesIcon as ae,StylesIcon as ce}from"efficient-easel/rail";import{PaletteIcon as de}from"efficient-shell/icons/efficient";import{TemplateIcon as le}from"efficient-easel/icons";import{Subtree as pe,TreeRow as D}from"efficient-easel/tree";import{useEasel as N}from"efficient-easel/easel";import{useEaselStrings as y}from"efficient-easel/strings";import{LocationsTreeContext as me}from"./LocationsTreeContext.js";import fe from"./PagesPanel.js";import{usePreviewChat as ue}from"./PreviewChatContext.js";import{PREVIEW_DEVICES as Se}from"./preview-devices.js";import{PreviewDeviceContext as Ee}from"efficient-easel/draw/client";import{usePreviewHeader as he}from"../../render/components/PreviewHeaderContext.js";import{usePreviewSocial as we}from"../../render/components/PreviewSocialContext.js";import{usePreviewSurface as Pe}from"./PreviewSurfaceContext.js";import{TICKER_PART_LABEL as Te,usePreviewTicker as be}from"../../render/components/PreviewTickerContext.js";import{usePreviewHeroPart as ge}from"../../render/components/PreviewHeroPartContext.js";import{HERO_MEDIA_PARTS as Ie,HERO_PART_MODE as H,heroMediaRows as ve,heroPartId as W,readHeroPartId as ke}from"../../render/lib/document/hero-media-parts.js";import _e,{CHAT_MODE as Re,HEADER_MODE as V,SOCIAL_MODE as Ce,WEBSITE_MODE as M}from"./SectionEditor.js";import C from"./SectionIcon.js";import Oe from"./SectionThumbnail.js";import{useScreenDocument as O}from"efficient-easel/screen/components/ScreenDocumentContext";import Le from"./StylesPanel.js";import{LOCATIONS_TYPE as Ae,useLocationsTree as Be}from"./useLocationsTree.js";import{usePinnedChromeSeed as De}from"./usePinnedChromeSeed.js";import{useHostDocumentBridge as Ne}from"./useHostDocumentBridge.js";import{usePreviewHref as ye}from"./usePreviewHref.js";import{WebsitePreviewButton as He}from"./WebsitePreviewButton.js";import{SITE_STYLES_TABS as We,SITE_STYLES_TEXT_TAB as Ve,useWebsiteName as Me}from"./WebsiteSettingsPanel.js";import{useWebsiteMainAction as xe}from"./useWebsiteMainAction.js";import{VersionHistory as Ye}from"./VersionHistoryDrawer.js";import{useEaselSession as x}from"efficient-easel/screen/lib/session-context";import{useOpenPageName as Fe}from"../lib/page-rows.js";import{HERO_GROUP_TYPE as Ge,heroGroupNestDepth as ze}from"../../format/lib/hero-group-placement.js";import{stripMarkup as Ke}from"../../format/lib/markup.js";import{categoryShortLabel as je,PINNED_SECTION_TYPE as Ue}from"../lib/document/add-palette.js";import{canAddTo as Ze}from"../lib/document/add-target.js";import{cardTemplateSlotsOf as qe}from"../../format/lib/document/card-template-layers.js";import{blockIsOffered as Xe}from"../lib/document/block-offer.js";import{sectionIdOfBoxZone as Je,setBookingPreview as Qe}from"../../render/lib/document/booking-preview.js";import{footerBlockRowName as $e}from"../../format/lib/document/footer-block-row-name.js";import{sourceRowName as et}from"../../format/lib/document/source-row-name.js";import{FOOTER_TYPE as tt,HEADER_TYPE as Y}from"../lib/document/footer-blocks.js";import{leftViewForSelection as ot,readLeftView as rt,resolveLeftView as nt,writeLeftView as it}from"../../format/lib/document/left-view.js";import{websiteIsLockedBlock as st}from"../lib/document/locked-blocks.js";import{everyPageNotice as at,noOwnTab as ct,pinnedReach as F,websiteDuplicateBlocked as dt}from"../lib/document/every-page.js";import{sharedSectionReach as lt,WEBSITE_SHARED_SECTIONS as pt}from"../lib/shared-sections-layer.js";import{activeSharedSections as L,setSharedEditor as G}from"../../format/lib/shared-sections-active.js";import{sharedSectionsOf as mt}from"efficient-easel/screen/lib/shared-sections";import{pinnedChromeInPlace as v}from"../../format/lib/pinned-chrome-lock.js";import{scrollPreviewToSection as ft,scrollPreviewToTop as z}from"efficient-easel/screen/lib/document/preview-dom";import{SiteCanvas as ut}from"../lib/document/overrides.js";import{labelAtLevel as St}from"../../format/lib/document/section-catalog.js";import{WEBSITE_MEDIA_DROP as Et}from"../../format/lib/document/media-drop.js";import{editorWords as ht,say as p}from"../../format/lib/editor-words.js";import{SECTION_DESCRIPTIONS as wt}from"../../format/lib/document/section-descriptions.js";import{groupAccepts as Pt,isSectionGroupType as Tt,sectionGroupZone as bt,SITE_FOOTER_TYPE as K,SITE_HEADER_TYPE as gt}from"../../format/lib/document/section-groups.js";import{resolveSaveAsTemplateAction as It,SAVE_AS_TEMPLATE_EVENT as vt}from"../../format/lib/save-as-template-action.js";import{newSectionNode as kt}from"../lib/sections/new-section-node.js";import{useHostProducts as _t}from"../lib/use-host-products.js";import{backendOf as Rt}from"../lib/website-session.js";function j({mode:e,open:t}){const{setSelectedHeroId:o,setSelectHandler:r}=be(),c=y().tree,d=e,n=d.kind==="ticker"?d.heroId:null,a=R(s=>{if(!s)return;t({kind:"ticker",heroId:s}),ft(s)},[t]);return P(()=>{o(n)},[n,o]),P(()=>{r(a)},[r,a]),{partRows:(s,{rowClick:u})=>{const m=String(s.props.id);return s.type==="Hero"&&i(D,{icon:i(C,{type:"ticker",size:13}),name:p(Te),onSelect:()=>a(m),selected:n===m,rowProps:{onClick:u(()=>a(m))},words:c})}}}function U({mode:e,select:t}){const{setSelectedHeroPart:o,setSelectHandler:r}=ge(),c=y().tree,{appState:d}=N(f=>f),n=d.data.content??[],a=oe(n);a.current=n;const s=e,u=Ie.find(f=>H[f]===s.kind),m=u&&"nodeId"in s?W(String(s.nodeId),u):null,h=R(f=>{const l=ke(f);if(!l)return;const w=a.current.findIndex(S=>String(S.props.id)===l.nodeId);if(w<0)return;const T={kind:H[l.part],nodeId:l.nodeId};t({index:w},T)},[t]);return P(()=>{o(m)},[m,o]),P(()=>{r(h)},[r,h]),{partRows:(f,{rowClick:l})=>{const w=String(f.props.id),T=ve(f);if(T.length===0)return null;const S=I=>{const g=W(w,I.part);return i(D,{icon:i(C,{type:I.part==="media"?"heroMedia":"heroImage",size:13}),name:p(I.label),onSelect:()=>h(g),selected:m===g,rowProps:{onClick:l(()=>h(g))},words:c},g)},[E,...b]=T;return _(B,{children:[S(E),b.length>0&&i(pe,{children:b.map(S)})]})}}}function Z(e,t){return{partRows:(o,r)=>_(B,{children:[e.partRows?.(o,r),t.partRows?.(o,r)]})}}function Ct(e){const{adapter:t,capabilities:o,currentSlug:r,siteId:c,docId:d,hasUnsavedEdits:n,bridgeCapabilities:a,notifyParent:s,token:u}=O(),{hasPreviewLink:m}=o,h=Rt(x()).preview?.draftLink,f=xe(e.data),l=It({hasTrustedConsole:!!u,canCreatePlatformTemplate:a.canCreatePlatformTemplate,capabilities:o,siteId:c,hasUnsavedEdits:n}),w=R(()=>{!c||!r||s(vt,{siteId:c,slug:r})},[s,c,r]),T=ye({pageSlug:r,siteId:c,token:u}),S=t.previewHref?.(r)??T;return{barLead:()=>l.visible&&i(ie,{side:"bottom",content:l.enabled?p("Save this website as a platform template"):p(l.disabledReason),children:i("span",{className:"sf-tip-disabled",tabIndex:l.enabled?void 0:0,children:i(ne,{variant:"secondary",disabled:!l.enabled,onClick:w,rightIcon:i(le,{size:15}),children:p("Save as Template")})})}),barView:()=>m&&r&&i(He,{liveHref:S,pageId:d??null,draftLink:h}),mainAction:f}}function Ot(e,t){const{capabilities:o,templateId:r,siteId:c,tokenRef:d,navigate:n}=O(),{hasSiteTheme:a,explainsSiteSettings:s}=o,u=E=>t.setView(E),[m,h]=re(We[0].id),{surface:f,setSurface:l}=Pe(),w=()=>{if(a){u("styles"),t.reveal(),z();return}e.show(M),e.reveal(),z()},T={id:"pages",label:p("Pages"),icon:i(ae,{}),panel:({onHide:E})=>i(fe,{activeSurface:f,onPreviewSurface:l,onNavigate:b=>{l(null),n(r?{kind:"template",id:r,pageSlug:b}:{kind:"page",slug:b,siteId:c??void 0})},onClose:E})},S=[];return!a&&s&&S.push({id:"appearance",label:p("Appearance"),icon:i(de,{}),active:e.kind==="website",onSelect:w}),a&&S.push({id:"styles",label:p("Styles"),icon:i(ce,{}),panel:({onHide:E,notify:b})=>i(Le,{tokenRef:d,siteId:c??void 0,onClose:E,onNotify:b,tab:m,onTabChange:h})}),{railLead:[T],railTrail:S,resolveLeftView:E=>nt(E,a),openSettings:w,openStyles:()=>{h(Ve),u("styles")}}}function Lt(){const{navigate:e,siteId:t,reloadFromServer:o,docId:r}=O(),c=N(n=>n.config),d=x();P(()=>(G({openPage:n=>e({kind:"page",slug:n.slug,siteId:t??void 0}),reload:()=>{o()},config:c}),()=>G(null)),[e,t,o,c]),P(()=>{const n=L();if(!n||!r)return;let a=!1;return mt(d).list().then(s=>{a||n.learn(s)}).catch(()=>{}),()=>{a=!0}},[r,d])}function At(e,t,o,r){const{kind:c,open:d}=e,{selected:n,zoneOf:a}=t;P(()=>{Qe(n?.type==="BookingBox"&&n.props.region==="confirm"?Je(a(String(n.props.id))):null)},[n?.props.id]);const s=Be(e,t),{capabilities:{hasSiteSettings:u}}=O();Lt();const{setSelected:m,setSelectHandler:h}=he(),{chat:f,setChat:l,setSelected:w,setSelectHandler:T}=ue(),S=c==="header";P(()=>{m(S)},[S,m]),P(()=>{h(()=>d(V))},[h,d]);const E=R(()=>d(Re),[d]),b=c==="chat";P(()=>{w(b)},[b,w]),P(()=>{T(E)},[T,E]);const{setOpenHandler:I}=we(),g=R(()=>d(Ce),[d]);P(()=>{I(g)},[I,g]);const J=Z(j(e),U(e)),Q=Ct(t),$=Ot(e,r),ee=o.device;return{...J,...Q,...$,hasOwnRows:k=>k.type===Ae,ownRows:s.renderLocationTree,sectionPressed:s.sectionPressed,wrap:k=>i(me.Provider,{value:!0,children:_(Ee.Provider,{value:ee,children:[k,i(Ye,{})]})}),addPanelRow:k=>u?_("div",{className:"sf-addside-sitewide",children:[i("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:i(C,{type:"chat",size:16})}),_("button",{type:"button",className:"sf-addside-sitewide-name",onClick:()=>{k(),E()},children:[p("Live chat"),i("span",{className:"sf-addside-sitewide-desc",children:p("A chat bubble on every page")})]}),i(se,{checked:f.enabled,onChange:te=>l({enabled:te}),ariaLabel:p("Show the chat bubble on the whole site")})]}):void 0}}let q=null,A=new WeakMap;function Bt(e){const t=ht();if(!e||!t)return e;q!==t&&(q=t,A=new WeakMap);let o=A.get(e);return o||(o={...e,choices:e.choices?e.choices.map(r=>({...r,label:p(r.label)})):null,spec:e.spec?{...e.spec,addLabel:p(e.spec.addLabel)}:null},A.set(e,o)),o}const Dt={isLockedBlock:(e,t)=>st(e)||!!(t&&L()?.heldElsewhere(t.props.id)),duplicateBlocked:dt,nestDepth:(e,t,o)=>t===Ge?ze(e,o):0,newSectionNode:kt,canAddTo:(e,t)=>Bt(Ze(e,t)),blockIsOffered:Xe,slotsOf:qe},Nt=new Proxy(wt,{get:(e,t)=>{const o=Reflect.get(e,t);return typeof o=="string"?p(o):o}}),yt={labelAtLevel:(e,t,o)=>p(St(e,t,o)),descriptions:Nt,categoryLabel:e=>{const t=je(e);return t===void 0?void 0:p(t)},firstSection:Ue,blockRowName:$e,rowName:et,plainText:Ke,Icon:C,Thumbnail:Oe,useProducts:_t},Ht={desktop:2e3,tablet:800,mobile:390},X="desktop",Wt={options:Se,initial:X,fluid:X,widths:Ht},Vt={read:rt,write:e=>it(e),forSelection:(e,t)=>ot(e,t)},Mt={first:Y,last:tt,firstGroup:gt,lastGroup:K,isSectionGroup:Tt,sectionGroupZone:bt,panelOf:e=>e===Y?V:null,get sharedReach(){return v()?Yt:void 0},get shared(){return L()?pt:void 0},get groupTab(){return v()?ct:void 0},get groupBadge(){return v()?F({type:K})??void 0:void 0},get changeNotice(){return v()?at():void 0},get band(){return v()?xt:void 0},get groupAccepts(){return v()?Pt:void 0}},xt={foldable:!0},Yt=e=>F(e)??lt(e);function Ft(e){return{...Z(j(e),U(e)),openSettings:()=>e.show(M)}}function Gt(e,t){De(e,t),Ne()}const tr={useOwnerName:Me,useDocumentLabel:Fe,useBridges:At,useStandaloneBridges:Ft,useDocumentPass:Gt,blockRules:Dt,blockLook:yt,devices:Wt,leftView:Vt,pinned:Mt,Canvas:ut,canvasDrag:{media:Et},Inspector:_e};export{tr as WEBSITE_SCREEN};
1
+ "use client";import{jsx as s,Fragment as B,jsxs as k}from"react/jsx-runtime";import{useCallback as R,useEffect as T,useRef as re,useState as D}from"react";import{Button as ne,Tooltip as ie}from"efficient-shell/ui";import{SettingsSwitch as se}from"efficient-easel/panel";import{PagesIcon as ae,StylesIcon as ce}from"efficient-easel/rail";import{PaletteIcon as de}from"efficient-shell/icons/efficient";import{TemplateIcon as le}from"efficient-easel/icons";import{Subtree as pe,TreeRow as y}from"efficient-easel/tree";import{useEasel as N}from"efficient-easel/easel";import{useEaselStrings as H}from"efficient-easel/strings";import{LocationsTreeContext as me}from"./LocationsTreeContext.js";import fe from"./PagesPanel.js";import{usePreviewChat as ue}from"./PreviewChatContext.js";import{PREVIEW_DEVICES as Se}from"./preview-devices.js";import{PreviewDeviceContext as Ee}from"efficient-easel/draw/client";import{usePreviewHeader as he}from"../../render/components/PreviewHeaderContext.js";import{usePreviewSocial as Pe}from"../../render/components/PreviewSocialContext.js";import{usePreviewSurface as we}from"./PreviewSurfaceContext.js";import{TICKER_PART_LABEL as Te,usePreviewTicker as ge}from"../../render/components/PreviewTickerContext.js";import{usePreviewHeroPart as Ie}from"../../render/components/PreviewHeroPartContext.js";import{HERO_MEDIA_PARTS as be,HERO_PART_MODE as W,heroMediaRows as ve,heroPartId as M,readHeroPartId as _e}from"../../render/lib/document/hero-media-parts.js";import ke,{CHAT_MODE as Re,HEADER_MODE as V,SOCIAL_MODE as Ce,WEBSITE_MODE as x,WEBSITE_PAGE_MODE as Oe}from"./SectionEditor.js";import C from"./SectionIcon.js";import Le from"./SectionThumbnail.js";import{useScreenDocument as O}from"efficient-easel/screen/components/ScreenDocumentContext";import Ae from"./StylesPanel.js";import{LOCATIONS_TYPE as Be,useLocationsTree as De}from"./useLocationsTree.js";import{usePinnedChromeSeed as ye}from"./usePinnedChromeSeed.js";import{useHostDocumentBridge as Ne}from"./useHostDocumentBridge.js";import{usePreviewHref as He}from"./usePreviewHref.js";import{WebsitePreviewButton as We}from"./WebsitePreviewButton.js";import{SITE_STYLES_BASICS_TAB as Me,SITE_STYLES_TABS as Ve,SITE_STYLES_TEXT_TAB as xe,useWebsiteName as Ge}from"./WebsiteSettingsPanel.js";import{useWebsiteMainAction as Ye}from"./useWebsiteMainAction.js";import{VersionHistory as Fe}from"./VersionHistoryDrawer.js";import{useEaselSession as G}from"efficient-easel/screen/lib/session-context";import{useOpenPageName as ze}from"../lib/page-rows.js";import{HERO_GROUP_TYPE as Ke,heroGroupNestDepth as je}from"../../format/lib/hero-group-placement.js";import{stripMarkup as Ue}from"../../format/lib/markup.js";import{categoryShortLabel as Ze,PINNED_SECTION_TYPE as qe}from"../lib/document/add-palette.js";import{canAddTo as Xe}from"../lib/document/add-target.js";import{cardTemplateSlotsOf as Je}from"../../format/lib/document/card-template-layers.js";import{blockIsOffered as Qe}from"../lib/document/block-offer.js";import{sectionIdOfBoxZone as $e,setBookingPreview as et}from"../../render/lib/document/booking-preview.js";import{footerBlockRowName as tt}from"../../format/lib/document/footer-block-row-name.js";import{sourceRowName as ot}from"../../format/lib/document/source-row-name.js";import{FOOTER_TYPE as rt,HEADER_TYPE as Y}from"../lib/document/footer-blocks.js";import{leftViewForSelection as nt,readLeftView as it,resolveLeftView as st,writeLeftView as at}from"../../format/lib/document/left-view.js";import{websiteNodeIsLocked as ct}from"../lib/document/locked-blocks.js";import{everyPageNotice as dt,noOwnTab as lt,pinnedReach as F,websiteDuplicateBlocked as pt}from"../lib/document/every-page.js";import{sharedSectionReach as mt,WEBSITE_SHARED_SECTIONS as ft}from"../lib/shared-sections-layer.js";import{activeSharedSections as L,setSharedEditor as z}from"../../format/lib/shared-sections-active.js";import{sharedSectionsOf as ut}from"efficient-easel/screen/lib/shared-sections";import{pinnedChromeInPlace as v}from"../../format/lib/pinned-chrome-lock.js";import{scrollPreviewToSection as St,scrollPreviewToTop as K}from"efficient-easel/screen/lib/document/preview-dom";import{SiteCanvas as Et}from"../lib/document/overrides.js";import{labelAtLevel as ht}from"../../format/lib/document/section-catalog.js";import{WEBSITE_MEDIA_DROP as Pt}from"../../format/lib/document/media-drop.js";import{editorWords as wt,say as p}from"../../format/lib/editor-words.js";import{SECTION_DESCRIPTIONS as Tt}from"../../format/lib/document/section-descriptions.js";import{groupAccepts as gt,isSectionGroupType as It,sectionGroupZone as bt,SITE_FOOTER_TYPE as j,SITE_HEADER_TYPE as vt}from"../../format/lib/document/section-groups.js";import{resolveSaveAsTemplateAction as _t,SAVE_AS_TEMPLATE_EVENT as kt}from"../../format/lib/save-as-template-action.js";import{newSectionNode as Rt}from"../lib/sections/new-section-node.js";import{useHostProducts as Ct}from"../lib/use-host-products.js";import{backendOf as Ot}from"../lib/website-session.js";function U({mode:e,open:t}){const{setSelectedHeroId:o,setSelectHandler:r}=ge(),c=H().tree,d=e,n=d.kind==="ticker"?d.heroId:null,a=R(i=>{if(!i)return;t({kind:"ticker",heroId:i}),St(i)},[t]);return T(()=>{o(n)},[n,o]),T(()=>{r(a)},[r,a]),{partRows:(i,{rowClick:m})=>{const f=String(i.props.id);return i.type==="Hero"&&s(y,{icon:s(C,{type:"ticker",size:13}),name:p(Te),onSelect:()=>a(f),selected:n===f,rowProps:{onClick:m(()=>a(f))},words:c})}}}function Z({mode:e,select:t}){const{setSelectedHeroPart:o,setSelectHandler:r}=Ie(),c=H().tree,{appState:d}=N(u=>u),n=d.data.content??[],a=re(n);a.current=n;const i=e,m=be.find(u=>W[u]===i.kind),f=m&&"nodeId"in i?M(String(i.nodeId),m):null,E=R(u=>{const l=_e(u);if(!l)return;const g=a.current.findIndex(P=>String(P.props.id)===l.nodeId);if(g<0)return;const h={kind:W[l.part],nodeId:l.nodeId};t({index:g},h)},[t]);return T(()=>{o(f)},[f,o]),T(()=>{r(E)},[r,E]),{partRows:(u,{rowClick:l})=>{const g=String(u.props.id),h=ve(u);if(h.length===0)return null;const P=S=>{const w=M(g,S.part);return s(y,{icon:s(C,{type:S.part==="media"?"heroMedia":"heroImage",size:13}),name:p(S.label),onSelect:()=>E(w),selected:f===w,rowProps:{onClick:l(()=>E(w))},words:c},w)},[b,...I]=h;return k(B,{children:[P(b),I.length>0&&s(pe,{children:I.map(P)})]})}}}function q(e,t){return{partRows:(o,r)=>k(B,{children:[e.partRows?.(o,r),t.partRows?.(o,r)]})}}function Lt(e){const{adapter:t,capabilities:o,currentSlug:r,siteId:c,docId:d,hasUnsavedEdits:n,bridgeCapabilities:a,notifyParent:i,token:m}=O(),{hasPreviewLink:f}=o,E=Ot(G()).preview?.draftLink,u=Ye(e.data),l=_t({hasTrustedConsole:!!m,canCreatePlatformTemplate:a.canCreatePlatformTemplate,capabilities:o,siteId:c,hasUnsavedEdits:n}),g=R(()=>{!c||!r||i(kt,{siteId:c,slug:r})},[i,c,r]),h=He({pageSlug:r,siteId:c,token:m}),P=t.previewHref?.(r)??h;return{barLead:()=>l.visible&&s(ie,{side:"bottom",content:l.enabled?p("Save this website as a platform template"):p(l.disabledReason),children:s("span",{className:"sf-tip-disabled",tabIndex:l.enabled?void 0:0,children:s(ne,{variant:"secondary",disabled:!l.enabled,onClick:g,rightIcon:s(le,{size:15}),children:p("Save as Template")})})}),barView:()=>f&&r&&s(We,{liveHref:P,pageId:d??null,draftLink:E}),mainAction:u}}function At(e,t){const{capabilities:o,templateId:r,siteId:c,tokenRef:d,navigate:n}=O(),{hasSiteTheme:a,explainsSiteSettings:i}=o,m=S=>t.setView(S),[f,E]=D(Ve[0].id),[u,l]=D(!1),{surface:g,setSurface:h}=we(),P=()=>{if(a){m("styles"),t.reveal(),K();return}e.show(x),e.reveal(),K()},b={id:"pages",label:p("Pages"),icon:s(ae,{}),panel:({onHide:S})=>s(fe,{activeSurface:g,onPreviewSurface:h,onNavigate:w=>{h(null),n(r?{kind:"template",id:r,pageSlug:w}:{kind:"page",slug:w,siteId:c??void 0})},onClose:S})},I=[];return!a&&i&&I.push({id:"appearance",label:p("Appearance"),icon:s(de,{}),active:e.kind==="website",onSelect:P}),a&&I.push({id:"styles",label:p("Styles"),icon:s(ce,{}),panel:({onHide:S,notify:w})=>s(Ae,{tokenRef:d,siteId:c??void 0,onClose:S,onNotify:w,tab:f,onTabChange:E,revealPageGroup:u,onPageGroupRevealed:()=>l(!1)})}),{railLead:[b],railTrail:I,resolveLeftView:S=>st(S,a),openSettings:P,openStyles:()=>{E(xe),m("styles")},openPageStyles:a?()=>{E(Me),l(!0),m("styles"),t.reveal()}:i?()=>{e.show(Oe),e.reveal()}:void 0}}function Bt(){const{navigate:e,siteId:t,reloadFromServer:o,docId:r}=O(),c=N(n=>n.config),d=G();T(()=>(z({openPage:n=>e({kind:"page",slug:n.slug,siteId:t??void 0}),reload:()=>{o()},config:c}),()=>z(null)),[e,t,o,c]),T(()=>{const n=L();if(!n||!r)return;let a=!1;return ut(d).list().then(i=>{a||n.learn(i)}).catch(()=>{}),()=>{a=!0}},[r,d])}function Dt(e,t,o,r){const{kind:c,open:d}=e,{selected:n,zoneOf:a}=t;T(()=>{et(n?.type==="BookingBox"&&n.props.region==="confirm"?$e(a(String(n.props.id))):null)},[n?.props.id]);const i=De(e,t),{capabilities:{hasSiteSettings:m}}=O();Bt();const{setSelected:f,setSelectHandler:E}=he(),{chat:u,setChat:l,setSelected:g,setSelectHandler:h}=ue(),P=c==="header";T(()=>{f(P)},[P,f]),T(()=>{E(()=>d(V))},[E,d]);const b=R(()=>d(Re),[d]),I=c==="chat";T(()=>{g(I)},[I,g]),T(()=>{h(b)},[h,b]);const{setOpenHandler:S}=Pe(),w=R(()=>d(Ce),[d]);T(()=>{S(w)},[S,w]);const Q=q(U(e),Z(e)),$=Lt(t),ee=At(e,r),te=o.device;return{...Q,...$,...ee,hasOwnRows:_=>_.type===Be,ownRows:i.renderLocationTree,sectionPressed:i.sectionPressed,wrap:_=>s(me.Provider,{value:!0,children:k(Ee.Provider,{value:te,children:[_,s(Fe,{})]})}),addPanelRow:_=>m?k("div",{className:"sf-addside-sitewide",children:[s("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:s(C,{type:"chat",size:16})}),k("button",{type:"button",className:"sf-addside-sitewide-name",onClick:()=>{_(),b()},children:[p("Live chat"),s("span",{className:"sf-addside-sitewide-desc",children:p("A chat bubble on every page")})]}),s(se,{checked:u.enabled,onChange:oe=>l({enabled:oe}),ariaLabel:p("Show the chat bubble on the whole site")})]}):void 0}}let X=null,A=new WeakMap;function yt(e){const t=wt();if(!e||!t)return e;X!==t&&(X=t,A=new WeakMap);let o=A.get(e);return o||(o={...e,choices:e.choices?e.choices.map(r=>({...r,label:p(r.label)})):null,spec:e.spec?{...e.spec,addLabel:p(e.spec.addLabel)}:null},A.set(e,o)),o}const Nt={isLockedBlock:(e,t)=>ct(e,t)||!!(t&&L()?.heldElsewhere(t.props.id)),duplicateBlocked:pt,nestDepth:(e,t,o)=>t===Ke?je(e,o):0,newSectionNode:Rt,canAddTo:(e,t)=>yt(Xe(e,t)),blockIsOffered:Qe,slotsOf:Je},Ht=new Proxy(Tt,{get:(e,t)=>{const o=Reflect.get(e,t);return typeof o=="string"?p(o):o}}),Wt={labelAtLevel:(e,t,o)=>p(ht(e,t,o)),descriptions:Ht,categoryLabel:e=>{const t=Ze(e);return t===void 0?void 0:p(t)},firstSection:qe,blockRowName:tt,rowName:ot,plainText:Ue,Icon:C,Thumbnail:Le,useProducts:Ct},Mt={desktop:2e3,tablet:800,mobile:390},J="desktop",Vt={options:Se,initial:J,fluid:J,widths:Mt},xt={read:it,write:e=>at(e),forSelection:(e,t)=>nt(e,t)},Gt={first:Y,last:rt,firstGroup:vt,lastGroup:j,isSectionGroup:It,sectionGroupZone:bt,panelOf:e=>e===Y?V:null,get sharedReach(){return v()?Ft:void 0},get shared(){return L()?ft:void 0},get groupTab(){return v()?lt:void 0},get groupBadge(){return v()?F({type:j})??void 0:void 0},get changeNotice(){return v()?dt():void 0},get band(){return v()?Yt:void 0},get groupAccepts(){return v()?gt:void 0}},Yt={foldable:!0},Ft=e=>F(e)??mt(e);function zt(e){return{...q(U(e),Z(e)),openSettings:()=>e.show(x)}}function Kt(e,t){ye(e,t),Ne()}const rr={useOwnerName:Ge,useDocumentLabel:ze,useBridges:Dt,useStandaloneBridges:zt,useDocumentPass:Kt,blockRules:Nt,blockLook:Wt,devices:Vt,leftView:xt,pinned:Gt,Canvas:Et,canvasDrag:{media:Pt},Inspector:ke};export{rr as WEBSITE_SCREEN};
@@ -9,6 +9,8 @@ export declare function HintsToggle({ shown, onChange, }: {
9
9
  onChange: (v: boolean) => void;
10
10
  }): import("react").JSX.Element;
11
11
  export declare const SITE_STYLES_TEXT_TAB = "text";
12
+ export declare const SITE_STYLES_BASICS_TAB = "basics";
13
+ export declare const THIS_PAGE_GROUP_ID = "this-page-group";
12
14
  export type SiteStylesTabItem = {
13
15
  id: string;
14
16
  label: string;
@@ -41,11 +43,14 @@ export declare function ShareButtonRootField({ persist, showHint, }: {
41
43
  }): import("react").JSX.Element;
42
44
  export declare function useWebsiteName(): string;
43
45
  export declare function WebsiteNameReadonly(): import("react").JSX.Element;
44
- export default function WebsiteSettingsPanel({ themeFromDocument, tokenRef, siteId, onNotify, tab: tabFromHost, onTabChange, }: {
46
+ export default function WebsiteSettingsPanel({ themeFromDocument, tokenRef, siteId, onNotify, tab: tabFromHost, onTabChange, initialTab, revealPageGroup, onPageGroupRevealed, }: {
45
47
  themeFromDocument?: boolean;
46
48
  tokenRef?: RefObject<string | null>;
47
49
  siteId?: string | null;
48
50
  tab?: string;
51
+ initialTab?: string;
52
+ revealPageGroup?: boolean;
53
+ onPageGroupRevealed?: () => void;
49
54
  onTabChange?: (id: string) => void;
50
55
  onNotify?: (msg: string, tone?: "success" | "error") => void;
51
56
  }): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as n,jsxs as _,Fragment as w}from"react/jsx-runtime";import{useEasel as N}from"efficient-easel/easel";import{useState as R}from"react";import W from"./ThemeField.js";import O from"./CornersField.js";import L from"./CardShadowField.js";import z from"./ShadowColourField.js";import v from"./BlockGapField.js";import G from"./HoverEffectField.js";import Y from"./PhotographyField.js";import j from"./ShareButtonField.js";import X from"./SideSpaceField.js";import{BackgroundWidthRow as U,ContentWidthRow as $,SITE_BACKGROUND_HINT as K,SITE_CONTENT_HINT as M}from"./SectionWidthRows.js";import q from"./SiteAccentField.js";import J from"./SiteTextStylesField.js";import{usePreviewHeader as m}from"../../render/components/PreviewHeaderContext.js";import{Tabs as Q,Tooltip as V,tabButtonId as Z,tabPanelId as D}from"efficient-shell/ui";import{ContrastIcon as ee,NoteIcon as te,SettingsIcon as ne,TypeIcon as oe}from"efficient-easel/icons";import{useThemeRowPersist as ie}from"../lib/theme-row-persist.js";import{themeSaveNotice as re}from"../../format/lib/theme-save-message.js";import{say as S}from"../../format/lib/editor-words.js";import{NEUTRAL_SITE_NAME as se}from"../../format/lib/content/site-name.js";import{PAGE_WIDTH as b}from"../../format/lib/content/page-width.js";import{previewFrame as ae}from"efficient-easel/screen/lib/document/preview-dom";import{useSiteTextStylesWriter as ce}from"../lib/site-text-styles-writer.js";import{CORNER_STYLE_TO_PX as le,normalizeCornerRadius as de,normalizeCornerStyle as he,normalizeShadowColor as ue,selectedThemeColors as pe}from"../../format/lib/theme.js";const E="sf-site-styles",fe="sf-site-styles-tabpanel",ge=!1,me="Show hints";function Se({shown:e,onChange:t}){return n("div",{className:"sf-hints",children:_("button",{type:"button","aria-pressed":e,onClick:()=>t(!e),className:`sf-rung sf-hints-toggle${e?" is-active":""}`,children:[n(te,{size:13}),S(me)]})})}const St="text",P=[{id:"basics",label:"Basics",icon:n(ne,{})},{id:"theme",label:"Theme",icon:n(ee,{})},{id:"text",label:"Text",icon:n(oe,{})}];function Ce({themeFromDocument:e,persist:t}){const{appState:o,dispatch:s}=N(u=>u),{theme:d,setTheme:a}=m(),c=o.data,p=c.root?.props??{},r=u=>{if(e){const f={...p,theme:u};s({type:"replaceRoot",root:{...c.root,props:f},recordHistory:!0})}else a(u);t({selected_preset:u.selected,theme_presets:u.themes})};return n(W,{value:e?p.theme:d,onChange:r})}function _e({themeFromDocument:e,persist:t}){const[o,s]=R(null),{theme:d,setFonts:a,setSizes:c,setHeadingTypography:p}=m(),r=ce({themeFromDocument:e,persist:t}),{old:u,saved:f,writeRoot:g}=r,l=r.fonts,h=r.sizes,x=r.typography,y=i=>i.values.size??be(we[i.id]??"body")??ye[i.kind],T=i=>r.write(i),F=xe(d),I=i=>{const C={...l,accent:i};e?g({fonts:C}):a(C),t({accent_font:i})},B=i=>{c({...h,accent:i}),t({accent_size_px:i})},k=i=>{const C={...x,weightStrong:i};e?g({headingTypography:C}):p(C),t({heading_weight_strong:i})},A=i=>{const C={...x,italicStrong:i};e?g({headingTypography:C}):p(C),t({accent_italic:i})};return _(w,{children:[n(J,{saved:f,old:u,colours:F,sizeOf:y,onChange:T,openId:o===H?null:o,onOpenChange:s,withoutSize:e}),n(q,{font:l.accent,size:h.accent,weight:x.weightStrong,italic:x.italicStrong,headingWeight:x.weight,open:o===H,onOpenChange:i=>s(i?H:null),onChange:i=>{i.key==="font"?I(i.value):i.key==="size"?B(i.value):i.key==="weight"?k(i.value):A(i.value)},withoutSize:e})]})}const H="accent";function xe(e){const t=pe(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 we={"heading-1":"heading","heading-2":"heading2","heading-3":"heading3","body-1":"body","body-5":"label"},ye={heading:32,body:14},Te={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 be(e){if(typeof document>"u")return null;const o=(ae()?.contentDocument??document).querySelector(Te[e]);if(!o)return null;const s=parseFloat(getComputedStyle(o).fontSize);return Number.isFinite(s)?s:null}function Pe({themeFromDocument:e,persist:t,showHint:o}){const{appState:s,dispatch:d}=N(h=>h),{cornerRadiusPx:a,setCornerRadiusPx:c}=m(),p=s.data,r=p.root?.props??{},u=r.cornerRadiusPx===void 0?le[he(r.cornerStyle)]:de(r.cornerRadiusPx),f=e?u:a,g=h=>d({type:"replaceRoot",root:{...p.root,props:{...r,...h}},recordHistory:!0});return n(O,{value:f,onChange:h=>{e?g({cornerRadiusPx:h}):c(h),t({corner_radius_px:h})},showHint:o})}function Re(e){return{site_width:e}}function Ee({persist:e,showHint:t}){const{siteWidth:o,setSiteWidth:s,sectionBackgroundWidth:d,setSectionBackgroundWidth:a,sectionContentWidth:c,setSectionContentWidth:p}=m(),r=typeof o=="number"?o:b.default,u=l=>{s(l),e(Re(l),l===null)},f=l=>{a(l),e({section_background_width:l},!0)},g=l=>{p(l),e({section_content_width:l},!0)};return _(w,{children:[n(U,{value:d??"full",changed:d!==null,detail:S("Full width"),onChange:f,onReset:()=>f(null),hint:t?K:void 0}),n($,{mode:c??"content",px:r,min:b.min,max:b.max,changed:typeof o=="number"||c!==null,detail:`${S("Content width")} ${b.default}px`,onMode:g,onPx:l=>u(l),onReset:()=>{g(null),u(null)},hint:t?M:void 0})]})}function He(e){return{block_gap:e}}function Ne(e){return{site_gutter:e}}function Fe({persist:e,showHint:t}){const{siteGutter:o,setSiteGutter:s}=m();return n(X,{value:o,onChange:a=>{s(a),e(Ne(a),a===null)},showHint:t})}function Ie({persist:e,showHint:t}){const{blockGap:o,setBlockGap:s}=m();return n(v,{value:o,onChange:a=>{s(a),e(He(a),a===null)},showHint:t})}function Be({persist:e,showHint:t=!0}){return _(w,{children:[n(Ee,{persist:e,showHint:t}),n(Fe,{persist:e,showHint:t}),n(Ie,{persist:e,showHint:t})]})}function ke(e){return{card_shadow:e}}function Ae(e){return e===null?{shadow_color:null}:{shadow_color:ue(e)}}function We(e){return{hover_effect:e}}function Oe({persist:e,showHint:t=!0}){const{cardShadow:o,setCardShadow:s,shadowColor:d,setShadowColor:a,hoverEffect:c,setHoverEffect:p}=m();return _(w,{children:[n(L,{value:o,onChange:r=>{s(r),e(ke(r),!0)},showHint:t}),n(z,{value:d,onChange:r=>{a(r),e(Ae(r),r===null)},showHint:t}),n(G,{value:c,onChange:r=>{p(r),e(We(r),!0)},showHint:t})]})}function Le(e){return{photography_grayscale:e}}function ze({persist:e,showHint:t}){const{photographyGrayscale:o,setPhotographyGrayscale:s}=m();return n(Y,{value:o,onChange:a=>{s(a),e(Le(a),!0)},showHint:t})}function ve({persist:e,showHint:t=!0}){return n(w,{children:n(ze,{persist:e,showHint:t})})}function Ge(e){return{share_button_on_posts:e}}function Ye({persist:e,showHint:t=!0}){const{shareButtonOnPosts:o,setShareButtonOnPosts:s}=m();return n(j,{value:o,onChange:a=>{s(a),e(Ge(a),!0)},showHint:t})}function je(){const{websiteName:e}=m();return e?.trim()||se}function Ct(){const e=je();return n(V,{content:S("{name} — renamed in the Console: {place}.",{name:e,place:S("Storefront ▸ Sites ▸ Settings")}),className:"sf-name-tip",children:n("span",{className:"sf-panel-site",children:e})})}function Xe({themeFromDocument:e=!1,tokenRef:t,siteId:o,onNotify:s,tab:d,onTabChange:a}){const{persist:c}=ie({themeFromDocument:e,tokenRef:t,siteId:o,onResult:y=>{const T=re(y);T&&s?.(T.msg,T.tone)}}),[p,r]=R(P[0].id),u=d!==void 0,f=u?d:p,g=u?a??(()=>{}):r,l=P.find(y=>y.id===f)??P[0],[h,x]=R(ge);return _(w,{children:[n(Ue,{activeId:l.id,onSelect:g}),_("div",{id:D(E,l.id),className:fe,role:"tabpanel","aria-labelledby":Z(E,l.id),children:[f==="basics"&&_(w,{children:[n(Pe,{themeFromDocument:e,persist:c,showHint:h}),!e&&n(Oe,{persist:c,showHint:h}),!e&&n(Be,{persist:c,showHint:h}),!e&&n(ve,{persist:c,showHint:h}),!e&&n(Ye,{persist:c,showHint:h}),n(Se,{shown:h,onChange:x})]}),f==="theme"&&n(Ce,{themeFromDocument:e,persist:c}),f==="text"&&n(_e,{themeFromDocument:e,persist:c})]})]})}function Ue({activeId:e,onSelect:t}){return n("div",{className:"es-insp-tabs",children:n(Q,{variant:"underline",block:!0,labelsFit:!0,"aria-label":S("Styles"),idPrefix:E,value:e,onChange:t,items:P.map(o=>{const s=S(o.label);return{id:o.id,icon:o.icon,label:s}})})})}export{Oe as CardLookFields,Se as HintsToggle,Be as PageGroupFields,ve as PhotographyGroupFields,ge as SHOW_HINTS_DEFAULT,E as SITE_STYLES_ID_PREFIX,P as SITE_STYLES_TABS,St as SITE_STYLES_TEXT_TAB,Ye as ShareButtonRootField,Ue as SiteStylesTabStrip,fe as TABPANEL_CLASS,Ct as WebsiteNameReadonly,He as blockGapPatch,ke as cardShadowPatch,Xe as default,We as hoverEffectPatch,Le as photographyPatch,Ae as shadowColourPatch,Ge as shareButtonPatch,Ne as siteGutterPatch,Re as siteWidthPatch,je as useWebsiteName};
1
+ "use client";import{jsx as n,jsxs as T,Fragment as y}from"react/jsx-runtime";import{useEasel as O,useRootFields as G}from"efficient-easel/easel";import{Inspector as W}from"efficient-easel/fields";import{SettingsGroup as v}from"efficient-easel/panel";import{useEffect as z,useRef as Y,useState as E}from"react";import j from"./ThemeField.js";import U from"./CornersField.js";import X from"./CardShadowField.js";import $ from"./ShadowColourField.js";import q from"./BlockGapField.js";import K from"./HoverEffectField.js";import M from"./PhotographyField.js";import V from"./ShareButtonField.js";import J from"./SideSpaceField.js";import{BackgroundWidthRow as Q,ContentWidthRow as Z,SITE_BACKGROUND_HINT as D,SITE_CONTENT_HINT as ee}from"./SectionWidthRows.js";import te from"./SiteAccentField.js";import ne from"./SiteTextStylesField.js";import{usePreviewHeader as S}from"../../render/components/PreviewHeaderContext.js";import{EmptyState as oe,Tabs as re,Tooltip as ie,tabButtonId as se,tabPanelId as ae}from"efficient-shell/ui";import{ContrastIcon as ce,NoteIcon as le,SettingsIcon as ue,TypeIcon as de}from"efficient-easel/icons";import{useThemeRowPersist as he}from"../lib/theme-row-persist.js";import{themeSaveNotice as pe}from"../../format/lib/theme-save-message.js";import{say as f}from"../../format/lib/editor-words.js";import{NEUTRAL_SITE_NAME as fe}from"../../format/lib/content/site-name.js";import{PAGE_WIDTH as R}from"../../format/lib/content/page-width.js";import{PAGE_STYLE_FIELDS as ge}from"../lib/document/page-root-fields.js";import{previewFrame as me}from"efficient-easel/screen/lib/document/preview-dom";import{useSiteTextStylesWriter as Se}from"../lib/site-text-styles-writer.js";import{CORNER_STYLE_TO_PX as Ce,normalizeCornerRadius as _e,normalizeCornerStyle as Te,normalizeShadowColor as xe,selectedThemeColors as ye}from"../../format/lib/theme.js";const H="sf-site-styles",we="sf-site-styles-tabpanel",be=!1,Pe="Show hints";function Ee({shown:e,onChange:t}){return n("div",{className:"sf-hints",children:T("button",{type:"button","aria-pressed":e,onClick:()=>t(!e),className:`sf-rung sf-hints-toggle${e?" is-active":""}`,children:[n(le,{size:13}),f(Pe)]})})}const At="text",B="basics",N="this-page-group",I=[{id:B,label:"Basics",icon:n(ue,{})},{id:"theme",label:"Theme",icon:n(ce,{})},{id:"text",label:"Text",icon:n(de,{})}];function Re({themeFromDocument:e,persist:t}){const{appState:o,dispatch:i}=O(l=>l),{theme:c,setTheme:r}=S(),p=o.data,h=p.root?.props??{},a=l=>{if(e){const g={...h,theme:l};i({type:"replaceRoot",root:{...p.root,props:g},recordHistory:!0})}else r(l);t({selected_preset:l.selected,theme_presets:l.themes})};return n(j,{value:e?h.theme:c,onChange:a})}function Ie({themeFromDocument:e,persist:t}){const[o,i]=E(null),{theme:c,setFonts:r,setSizes:p,setHeadingTypography:h}=S(),a=Se({themeFromDocument:e,persist:t}),{old:l,saved:g,writeRoot:m}=a,u=a.fonts,d=a.sizes,x=a.typography,w=s=>s.values.size??Be(He[s.id]??"body")??Ae[s.kind],C=s=>a.write(s),F=Fe(c),b=s=>{const _={...u,accent:s};e?m({fonts:_}):r(_),t({accent_font:s})},P=s=>{p({...d,accent:s}),t({accent_size_px:s})},k=s=>{const _={...x,weightStrong:s};e?m({headingTypography:_}):h(_),t({heading_weight_strong:s})},L=s=>{const _={...x,italicStrong:s};e?m({headingTypography:_}):h(_),t({accent_italic:s})};return T(y,{children:[n(ne,{saved:g,old:l,colours:F,sizeOf:w,onChange:C,openId:o===A?null:o,onOpenChange:i,withoutSize:e}),n(te,{font:u.accent,size:d.accent,weight:x.weightStrong,italic:x.italicStrong,headingWeight:x.weight,open:o===A,onOpenChange:s=>i(s?A:null),onChange:s=>{s.key==="font"?b(s.value):s.key==="size"?P(s.value):s.key==="weight"?k(s.value):L(s.value)},withoutSize:e})]})}const A="accent";function Fe(e){const t=ye(e);return[{key:"accent",name:f("Accent"),value:t.accent},{key:"text",name:f("Text"),value:t.text},{key:"labels",name:f("Labels"),value:t.muted??t.text}]}const He={"heading-1":"heading","heading-2":"heading2","heading-3":"heading3","body-1":"body","body-5":"label"},Ae={heading:32,body:14},Oe={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 Be(e){if(typeof document>"u")return null;const o=(me()?.contentDocument??document).querySelector(Oe[e]);if(!o)return null;const i=parseFloat(getComputedStyle(o).fontSize);return Number.isFinite(i)?i:null}function Ne({themeFromDocument:e,persist:t,showHint:o}){const{appState:i,dispatch:c}=O(d=>d),{cornerRadiusPx:r,setCornerRadiusPx:p}=S(),h=i.data,a=h.root?.props??{},l=a.cornerRadiusPx===void 0?Ce[Te(a.cornerStyle)]:_e(a.cornerRadiusPx),g=e?l:r,m=d=>c({type:"replaceRoot",root:{...h.root,props:{...a,...d}},recordHistory:!0});return n(U,{value:g,onChange:d=>{e?m({cornerRadiusPx:d}):p(d),t({corner_radius_px:d})},showHint:o})}function ke(e){return{site_width:e}}function Le({persist:e,showHint:t}){const{siteWidth:o,setSiteWidth:i,sectionBackgroundWidth:c,setSectionBackgroundWidth:r,sectionContentWidth:p,setSectionContentWidth:h}=S(),a=typeof o=="number"?o:R.default,l=u=>{i(u),e(ke(u),u===null)},g=u=>{r(u),e({section_background_width:u},!0)},m=u=>{h(u),e({section_content_width:u},!0)};return T(y,{children:[n(Q,{value:c??"full",changed:c!==null,detail:f("Full width"),onChange:g,onReset:()=>g(null),hint:t?D:void 0}),n(Z,{mode:p??"content",px:a,min:R.min,max:R.max,changed:typeof o=="number"||p!==null,detail:`${f("Content width")} ${R.default}px`,onMode:m,onPx:u=>l(u),onReset:()=>{m(null),l(null)},hint:t?ee:void 0})]})}function Ge(e){return{block_gap:e}}function We(e){return{site_gutter:e}}function ve({persist:e,showHint:t}){const{siteGutter:o,setSiteGutter:i}=S();return n(J,{value:o,onChange:r=>{i(r),e(We(r),r===null)},showHint:t})}function ze({persist:e,showHint:t}){const{blockGap:o,setBlockGap:i}=S();return n(q,{value:o,onChange:r=>{i(r),e(Ge(r),r===null)},showHint:t})}function Ye({persist:e,showHint:t=!0}){return T(y,{children:[n(Le,{persist:e,showHint:t}),n(ve,{persist:e,showHint:t}),n(ze,{persist:e,showHint:t})]})}function je(e){return{card_shadow:e}}function Ue(e){return e===null?{shadow_color:null}:{shadow_color:xe(e)}}function Xe(e){return{hover_effect:e}}function $e({persist:e,showHint:t=!0}){const{cardShadow:o,setCardShadow:i,shadowColor:c,setShadowColor:r,hoverEffect:p,setHoverEffect:h}=S();return T(y,{children:[n(X,{value:o,onChange:a=>{i(a),e(je(a),!0)},showHint:t}),n($,{value:c,onChange:a=>{r(a),e(Ue(a),a===null)},showHint:t}),n(K,{value:p,onChange:a=>{h(a),e(Xe(a),!0)},showHint:t})]})}function qe(e){return{photography_grayscale:e}}function Ke({persist:e,showHint:t}){const{photographyGrayscale:o,setPhotographyGrayscale:i}=S();return n(M,{value:o,onChange:r=>{i(r),e(qe(r),!0)},showHint:t})}function Me({persist:e,showHint:t=!0}){return n(y,{children:n(Ke,{persist:e,showHint:t})})}function Ve(e){return{share_button_on_posts:e}}function Je({persist:e,showHint:t=!0}){const{shareButtonOnPosts:o,setShareButtonOnPosts:i}=S();return n(V,{value:o,onChange:r=>{i(r),e(Ve(r),!0)},showHint:t})}function Qe(){const{websiteName:e}=S();return e?.trim()||fe}function Ot(){const e=Qe();return n(ie,{content:f("{name} — renamed in the Console: {place}.",{name:e,place:f("Storefront ▸ Sites ▸ Settings")}),className:"sf-name-tip",children:n("span",{className:"sf-panel-site",children:e})})}function Ze({themeFromDocument:e=!1,tokenRef:t,siteId:o,onNotify:i,tab:c,onTabChange:r,initialTab:p,revealPageGroup:h=!1,onPageGroupRevealed:a}){const{persist:l}=he({themeFromDocument:e,tokenRef:t,siteId:o,onResult:b=>{const P=pe(b);P&&i?.(P.msg,P.tone)}}),[g,m]=E(p??I[0].id),u=c!==void 0,d=u?c:g,x=u?r??(()=>{}):m,w=I.find(b=>b.id===d)??I[0],[C,F]=E(be);return T(y,{children:[n(tt,{activeId:w.id,onSelect:x}),T("div",{id:ae(H,w.id),className:we,role:"tabpanel","aria-labelledby":se(H,w.id),children:[d===B&&T(y,{children:[n(Ne,{themeFromDocument:e,persist:l,showHint:C}),!e&&n($e,{persist:l,showHint:C}),!e&&n(Ye,{persist:l,showHint:C}),!e&&n(Me,{persist:l,showHint:C}),!e&&n(Je,{persist:l,showHint:C}),n(De,{reveal:h,onRevealed:a}),n(Ee,{shown:C,onChange:F})]}),d==="theme"&&n(Re,{themeFromDocument:e,persist:l}),d==="text"&&n(Ie,{themeFromDocument:e,persist:l})]})]})}function De({reveal:e,onRevealed:t}){const[o,i]=E(!0),c=Y(t);return c.current=t,z(()=>{if(!e)return;i(!0);const r=requestAnimationFrame(()=>{document.getElementById(N)?.scrollIntoView({block:"start"}),c.current?.()});return()=>cancelAnimationFrame(r)},[e]),n(v,{title:f("This page"),open:o,onToggle:i,id:N,children:n(et,{})})}function et(){const{fields:e,values:t,readOnly:o,onChange:i}=G(),c=Object.fromEntries(ge.filter(r=>r in e).map(r=>[r,e[r]]));return Object.keys(c).length===0?n(oe,{variant:"none",icon:!1,message:f("This page has no look of its own to set.")}):n(W,{fields:c,values:t,onChange:i,readOnly:o,tabs:!1,idPrefix:"this-page",ariaLabel:f("This page")})}function tt({activeId:e,onSelect:t}){return n("div",{className:"es-insp-tabs",children:n(re,{variant:"underline",block:!0,labelsFit:!0,"aria-label":f("Styles"),idPrefix:H,value:e,onChange:t,items:I.map(o=>{const i=f(o.label);return{id:o.id,icon:o.icon,label:i}})})})}export{$e as CardLookFields,Ee as HintsToggle,Ye as PageGroupFields,Me as PhotographyGroupFields,be as SHOW_HINTS_DEFAULT,B as SITE_STYLES_BASICS_TAB,H as SITE_STYLES_ID_PREFIX,I as SITE_STYLES_TABS,At as SITE_STYLES_TEXT_TAB,Je as ShareButtonRootField,tt as SiteStylesTabStrip,we as TABPANEL_CLASS,N as THIS_PAGE_GROUP_ID,Ot as WebsiteNameReadonly,Ge as blockGapPatch,je as cardShadowPatch,Ze as default,Xe as hoverEffectPatch,qe as photographyPatch,Ue as shadowColourPatch,Ve as shareButtonPatch,We as siteGutterPatch,ke as siteWidthPatch,Qe as useWebsiteName};
@@ -659,7 +659,7 @@
659
659
 
660
660
  the zone whose owner you CLICKED --isAreaSelected_
661
661
  the deepest zone you are INSIDE --hoveringOverArea_:not(--isRootZone_)
662
- the block you are POINTING AT [data-easel-overlay-portal]:hover
662
+ the block you are POINTING AT [data-easel-overlay-portal]:hover (C, retired 2026-10-26)
663
663
 
664
664
  MEASURED, not inferred, by scripts/probe-hover-outline-count.mjs (retired
665
665
  with the old editor library in blueprint 6.3) against both stylesheets in the app's own import
@@ -732,86 +732,25 @@
732
732
  outline: 1px solid var(--es-accent-line, #bfdbfe);
733
733
  }
734
734
 
735
- /* C · the block you are pointing at: one line, solid, 1px, 2px off the words.
736
- the old editor library's own overlay-portal sheet drew it 2px dashed and this file narrowed it;
737
- since that sheet left with 5.5 the whole line is declared here.
738
- ITS COLOUR IS THE ENGINE'S HOVER COLOUR (2026-10-16): the accent at 60%, as
739
- `.es-canvas-outline.is-hover` draws it in efficient-easel easel.css, so a
740
- pointed-at word and a pointed-at block look the same. It was the old editor library's azure-09
741
- (#dbeafe), a tint of white: next to the engine's box it read as a second,
742
- lighter box, and once E below took that box away it was all but invisible
743
- on a light page. */
744
- [data-easel-overlay-portal]:hover {
745
- outline: 1px solid color-mix(in srgb, var(--es-accent, #2563eb) 60%, transparent);
746
- outline-offset: 2px;
747
- }
748
-
749
- /* …and the rest of what the old editor library's overlay-portal sheet (lib/overlay-portal/
750
- styles.css) gave a text-part anchor, carried here for the same reason: the
751
- anchor takes the pointer, and draws a ring while the caret is in it. The
752
- OPEN part's own hairline (PART_PICK_CSS, (0,3,0)) still outranks the ring
753
- (0,2,0) — one line, card 11103. */
735
+ /* C, D, E · RETIRED 2026-10-26: no line on the words, ever, and the engine's
736
+ box is never hidden. Lewis, on one Text block: "look how many boxes the text
737
+ has now; is this reasonable?" These rules drew a line on the part anchor itself (C), kept
738
+ only the innermost of those (D), and hid the engine's hover box while one
739
+ was hovered (E). An anchor is often an INLINE run, and an outline on an
740
+ inline run follows each line, so two lines of different length drew an
741
+ irregular shape; with E the engine's box was gone and its "⋮⋮ Text" handle
742
+ was left floating away from any line. The engine draws every box now, a
743
+ regular rectangle: the block, or the part the next click picks
744
+ (efficient-easel `PartHover`), or the open part (`selectedPart`, handed
745
+ by components/CanvasPartsBridge). `scripts/test-part-outline-hairline.tsx`
746
+ resolves the sheets and fails if a page element draws a line again.
747
+
748
+ The anchor still takes the pointer (the old editor library's overlay-portal sheet gave it
749
+ that, and the click on a part depends on it). */
754
750
  [data-easel-overlay-portal],
755
751
  [data-easel-overlay-portal] * {
756
752
  pointer-events: auto !important;
757
753
  }
758
- [data-easel-overlay-portal]:focus-within {
759
- outline: 2px solid var(--es-accent-line, #bfdbfe);
760
- outline-offset: 2px;
761
- }
762
-
763
- /* D · …and ONLY the innermost one.
764
- ⚠️ FOUND IN THE REAL EDITOR, NOT ON THE BOARD, AND IT IS THE HALF THE BOARD
765
- COULD NOT SEE. The old editor library nests an overlay per component, and `:hover` matches
766
- every ancestor in that chain — so pointing at the heading of a section put
767
- FOUR overlays in `:hover` at once. Measured at /edit/preview-footer with a
768
- real pointer: 4 hovered overlays, 4 painted lines. Rules A-C removed every
769
- dashed line and still left him four thin ones.
770
-
771
- The board modelled ONE overlay because that is what a nesting sketch needs;
772
- the editor stacks them because that is what a component tree does. Same
773
- family as measuring a component outside the container it ships in — the
774
- experiment was honest and the population was wrong.
775
-
776
- `:has()` reads "an overlay that contains another hovered overlay stands
777
- aside", which leaves exactly the deepest one — the thing under the cursor,
778
- which is the one you are actually reaching for. Re-measured with this rule
779
- live in the same editor: 4 hovered, 1 painted, 225x46, the heading itself.
780
-
781
- ⚠️ SETTLED BY THE OWNER, 2026-09-02: keep the innermost. He was shown the
782
- alternative and the reason the choice is not obvious — on a heading the
783
- innermost box hugs the text, which is right, but on the Subscribe button the
784
- innermost is the button's LABEL (63x16) rather than the button (97x38). He
785
- picked innermost anyway. DO NOT re-open this as "the button's box looks
786
- small": that is the known cost of the rule he chose.
787
-
788
- ⚠️ AND THIS ONLY HIDES THE LINE. The duplicate overlays are still in the DOM.
789
- Measured on /edit/preview-footer: TWELVE overlays carrying only FOUR distinct
790
- `data-sf-part` ids, and all EIGHT nested pairs share their ancestor's id — so
791
- the extra boxes were never separate things to select and never had settings
792
- of their own. Marking one element per part is a separate card touching
793
- several components; it is not this one. */
794
- [data-easel-overlay-portal]:hover:has([data-easel-overlay-portal]:hover) {
795
- outline: none;
796
- }
797
-
798
- /* E · …and the engine's hover box stands aside for it.
799
- Lewis, 2026-10-16, on the Hartes homepage hero: pointing at the "Ranger II"
800
- heading drew TWO lines again, the words' own (C) and a wider box round the
801
- Heading block. That box is the engine's (`.es-canvas-outline.is-hover`,
802
- efficient-easel easel.css), drawn on its outline layer over the block the
803
- next click would pick. It came with the engine in blueprint 5.5, after A-D
804
- were written, so nothing here answered it. But a click on a marked element
805
- never reaches the engine (PreviewPartAnchors and the hero / ticker / location
806
- bridges stop it and open their own thing), so over one the engine's box
807
- names the wrong target, and the innermost line D keeps is the true one.
808
- Off a marked element the engine's box is the only line, and stays. Led by
809
- `[data-easel-entry]`, the frame's root, as A is; (0,5,0) against the
810
- engine's (0,2,0). `scripts/test-part-outline-hairline.tsx` §3
811
- resolves both sheets. */
812
- [data-easel-entry]:has([data-easel-overlay-portal]:hover) .es-canvas-outline.is-hover {
813
- outline: none;
814
- }
815
754
 
816
755
  /* @tokens canvas-end */
817
756
 
@@ -1 +1 @@
1
- "use client";import{useEffect as k,useMemo as E,useRef as I}from"react";import{useEasel as O}from"efficient-easel/easel";import{useEaselHost as B}from"efficient-easel/screen/lib/host";import{applyPageEdits as D,describeBlocks as H,describeSelection as J}from"../../format/lib/host-document-bridge.js";const p=e=>typeof e.requestId=="string"&&e.requestId?e.requestId:null;function C(){const e=B(),{appState:n,selectedItem:m,dispatch:l,history:f,config:q}=O(s=>s),i=q,g=I({appState:n,dispatch:l,history:f,blockConfig:i});g.current={appState:n,dispatch:l,history:f,blockConfig:i};const c=I(new Map),h=m?.props?.id,a=E(()=>J(i,n.data,h),[i,n.data,h]),S=a?JSON.stringify(a):"";k(()=>{e.connected&&e.send("storefront-editor:selection",{selection:a})},[e,S]),k(()=>e.subscribe(s=>{const{appState:d,dispatch:y,history:u,blockConfig:b}=g.current;switch(s.type){case"storefront-editor:request-document":{const t=p(s);if(!t)return;e.send("storefront-editor:document",{requestId:t,document:d.data,blocks:H(b)});return}case"storefront-editor:apply-page-edits":{const t=p(s);if(!t)return;const r=Array.isArray(s.ops)?s.ops:[],o=r.length?D(b,d.data,r,w=>`${w}-${crypto.randomUUID()}`):{ok:!1,reason:"no changes"};o.ok&&(y({type:"setData",data:o.document,recordHistory:!0}),c.current.set(t,JSON.stringify(o.document.content??[]))),e.send("storefront-editor:page-edits-result",{requestId:t,applied:o.ok,reason:o.ok?null:o.reason});return}case"storefront-editor:undo-page-edits":{const t=p(s);if(!t)return;const r=c.current.get(t),o=r!==void 0&&r===JSON.stringify(d.data.content??[]);o&&u.hasPast&&(u.back(),c.current.delete(t)),e.send("storefront-editor:page-edits-result",{requestId:t,applied:o&&u.hasPast,reason:o?null:"the page has changed since"});return}case"storefront-editor:set-right-panel":typeof s.shown=="boolean"&&y({type:"setUi",ui:{rightSideBarVisible:s.shown}});return;default:return}}),[e])}export{C as useHostDocumentBridge};
1
+ "use client";import{useEffect as b,useMemo as w,useRef as k}from"react";import{useEasel as O}from"efficient-easel/easel";import{useEaselHost as B}from"efficient-easel/screen/lib/host";import{applyPageEdits as D,describeBlocks as H,describeSelection as J}from"../../format/lib/host-document-bridge.js";import{nonEmptyString as N}from"../../format/lib/non-empty-string.js";const p=t=>N(t.requestId)??null;function $(){const t=B(),{appState:n,selectedItem:I,dispatch:l,history:f,config:S}=O(s=>s),i=S,g=k({appState:n,dispatch:l,history:f,blockConfig:i});g.current={appState:n,dispatch:l,history:f,blockConfig:i};const c=k(new Map),h=I?.props?.id,a=w(()=>J(i,n.data,h),[i,n.data,h]),q=a?JSON.stringify(a):"";b(()=>{t.connected&&t.send("storefront-editor:selection",{selection:a})},[t,q]),b(()=>t.subscribe(s=>{const{appState:d,dispatch:y,history:u,blockConfig:m}=g.current;switch(s.type){case"storefront-editor:request-document":{const e=p(s);if(!e)return;t.send("storefront-editor:document",{requestId:e,document:d.data,blocks:H(m)});return}case"storefront-editor:apply-page-edits":{const e=p(s);if(!e)return;const r=Array.isArray(s.ops)?s.ops:[],o=r.length?D(m,d.data,r,E=>`${E}-${crypto.randomUUID()}`):{ok:!1,reason:"no changes"};o.ok&&(y({type:"setData",data:o.document,recordHistory:!0}),c.current.set(e,JSON.stringify(o.document.content??[]))),t.send("storefront-editor:page-edits-result",{requestId:e,applied:o.ok,reason:o.ok?null:o.reason});return}case"storefront-editor:undo-page-edits":{const e=p(s);if(!e)return;const r=c.current.get(e),o=r!==void 0&&r===JSON.stringify(d.data.content??[]);o&&u.hasPast&&(u.back(),c.current.delete(e)),t.send("storefront-editor:page-edits-result",{requestId:e,applied:o&&u.hasPast,reason:o?null:"the page has changed since"});return}case"storefront-editor:set-right-panel":typeof s.shown=="boolean"&&y({type:"setUi",ui:{rightSideBarVisible:s.shown}});return;default:return}}),[t])}export{$ as useHostDocumentBridge};
@@ -1 +1 @@
1
- "use client";import{jsx as r,jsxs as m,Fragment as me}from"react/jsx-runtime";import{Fragment as Q,useEffect as V,useRef as z}from"react";import{useTreeDrag as X}from"efficient-easel/drag";import{GlobeIcon as xe,ImageIcon as ve,LocationIcon as fe,MapIcon as ke,TextLinesIcon as Le,TrashIcon as Z}from"efficient-easel/icons";import{Subtree as b,TreeRow as P,TreeRowAction as ee,TreeSeam as oe}from"efficient-easel/tree";import{useEaselStrings as Ie}from"efficient-easel/strings";import{decodeLocationPartId as Se,encodeLocationPartId as Pe,usePreviewLocationPart as he}from"../../render/components/PreviewLocationPartContext.js";import{isSelectionMode as we}from"efficient-easel/screen/lib/screen-parts";import{say as p,sayCount as Ce}from"../../format/lib/editor-words.js";import{useLocationsFocus as $e,setLocationsFocus as i}from"../lib/document/locations-focus.js";import{bucketsOf as ne,moveGroup as te,moveCity as re,addCity as Te,addGroup as De,deleteGroup as Fe,deleteCity as Ge,absCityIndex as ce,groupLabelOf as Oe,cardKey as se}from"../../format/lib/document/locations-tree.js";const le="ContactLocations",T=x=>({parentId:`locations-${x}`,slot:"groups"}),A=(x,y)=>({parentId:`locations-${x}`,slot:`cities:${y}`});function We(x,y){const{readOnly:h,selected:w}=y,k=Ie().tree,v=y.data?.content??[],ae=we(x),D=z(null);V(()=>{const o=w?.type===le?String(w.props.id):null;o&&o!==D.current&&i({level:"groups"}),D.current=o},[w?.props.id]);const{selectedLocationPartId:ie,setSelectedLocationPartId:N,setSelectHandler:R}=he(),c=$e(),u=(o,e)=>{const t=v[o];t&&y.replace(o,{type:t.type,props:{...t.props,locations:e}})},L=o=>{const e=v[o]?.props?.locations;return Array.isArray(e)?e:[]},_=X({keyOf:o=>`group:${o.si}:${o.index}`,readOnly:!!h,canDrop:(o,e)=>e.parentId===T(o.si).parentId&&e.slot==="groups",onDrop:(o,e)=>{u(o.si,te(L(o.si),o.index,e.index)),c.level==="city"&&i({level:"groups"})},onStep:(o,e)=>{u(o.si,te(L(o.si),o.index,e<0?o.index-1:o.index+2)),c.level==="city"&&i({level:"groups"})}}),F=X({keyOf:o=>`city:${o.si}:${o.group}:${o.index}`,readOnly:!!h,canDrop:(o,e)=>e.parentId===T(o.si).parentId&&e.slot.startsWith("cities:"),onDrop:(o,e)=>{const t=e.slot.slice(7);u(o.si,re(L(o.si),o.group,o.index,t,e.index)),i({level:"group",key:t})},onStep:(o,e)=>{u(o.si,re(L(o.si),o.group,o.index,o.group,e<0?o.index-1:o.index+2)),c.level==="city"&&i({level:"group",key:o.group})}}),j=z(v);j.current=v;const E=z(()=>{});V(()=>{R(o=>{const e=Se(o);if(!e)return;const t=j.current.findIndex(C=>C.props?.id===e.nodeId);t<0||E.current(t,{level:e.part,index:e.index})})},[R]);const s=(o,e)=>{D.current=v[o]?.props?.id??null,y.select(o),i(e),x.reveal();const t=v[o]?.props?.id;typeof t=="string"&&(e.level==="image"||e.level==="map")?N(Pe(t,e.index,e.level)):N(null),typeof t=="string"&&y.scrollTo(t)};return E.current=s,{renderLocationTree:(o,e,{rowClick:t,isCollapsed:C,toggleCollapse:M})=>{const f=L(e),de=ne(f),I=String(o.props.id),S=ae&&w?.props.id===I,B=n=>r(oe,{...h?{}:_.seam({place:{...T(e),index:n}})},`seam:${I}:groups:${n}`),H=(n,d)=>r(oe,{...h?{}:F.seam({place:{...A(e,n),index:d}})},`seam:${I}:cities:${n}:${d}`);return m(me,{children:[r(P,{icon:r(Le,{size:13}),name:p("Texts"),words:k,onSelect:()=>s(e,{level:"texts"}),selected:S&&c.level==="texts",rowProps:{onClick:t(()=>s(e,{level:"texts"}))}}),de.map((n,d)=>{const G=`${I}::grp::${n.key}`,K=C(G),pe=S&&c.level==="group"&&c.key===n.key,U=n.name||n.key?Oe(n.key,n.name):p("Ungrouped"),W={...A(e,n.key),index:n.cards.length},Y=F.row({item:{si:e,group:n.key,index:-1},place:W,into:W,canDrag:!1},{onClick:t(()=>s(e,{level:"group",key:n.key}))}),$=_.row({item:{si:e,index:d},place:{...T(e),index:d}},Y.rowProps);return m(Q,{children:[d===0&&B(0),r(P,{icon:r(xe,{size:13}),name:U,words:k,onSelect:()=>s(e,{level:"group",key:n.key}),selected:pe,draggable:$.draggable,dragging:$.dragging,drop:$.drop??Y.drop,fold:{open:!K,label:p("group"),onToggle:()=>M(G)},actions:r(ee,{kind:"delete",label:Ce("Delete {label} group ({n} city)","Delete {label} group ({n} cities)",n.cards.length,{label:U}),onClick:()=>{u(e,Fe(f,n.key)),i({level:"groups"})},children:r(Z,{size:15})}),rowProps:$.rowProps,children:r("span",{className:"es-group-count",children:n.cards.length})}),!K&&m(b,{children:[n.cards.map((g,a)=>{const l=ce(f,n.key,a),ue=S&&c.level==="city"&&c.index===l,O=String(g?.name??"")||p("City"),q=`${I}::city::${se(g)}`,J=C(q),{rowProps:ye,...ge}=F.row({item:{si:e,group:n.key,index:a},place:{...A(e,n.key),index:a}},{onClick:t(()=>s(e,{level:"city",index:l}))});return m(Q,{children:[a===0&&H(n.key,0),r(P,{icon:r(fe,{size:13}),name:O,words:k,onSelect:()=>s(e,{level:"city",index:l}),selected:ue,...ge,fold:{open:!J,label:O,onToggle:()=>M(q)},actions:r(ee,{kind:"delete",label:p("Delete {name}",{name:O}),onClick:()=>{u(e,Ge(f,n.key,a)),i({level:"group",key:n.key})},children:r(Z,{size:15})}),rowProps:ye}),!J&&m(b,{children:[r(P,{icon:r(ve,{size:13}),name:p("Image"),words:k,onSelect:()=>s(e,{level:"image",index:l}),selected:S&&c.level==="image"&&c.index===l,rowProps:{onClick:t(()=>s(e,{level:"image",index:l}))}}),r(P,{icon:r(ke,{size:13}),name:p("Map"),words:k,onSelect:()=>s(e,{level:"map",index:l}),selected:S&&c.level==="map"&&c.index===l,rowProps:{onClick:t(()=>s(e,{level:"map",index:l}))}})]}),H(n.key,a+1)]},se(g))}),m("button",{type:"button",className:"sf-add-card",onClick:()=>{const g=Te(f,n.key);u(e,g);const a=ne(g).find(l=>l.key===n.key);i(a&&a.cards.length?{level:"city",index:ce(g,n.key,a.cards.length-1)}:{level:"group",key:n.key})},children:[r("span",{className:"sf-plus sf-plus--sm",children:"+"}),p("Add city")]})]}),B(d+1)]},G)}),m("button",{type:"button",className:"sf-add-card",onClick:()=>{const{cards:n,key:d}=De(f);u(e,n),s(e,{level:"group",key:d})},children:[r("span",{className:"sf-plus sf-plus--sm",children:"+"}),p("Add group")]})]})},sectionPressed:o=>{o?.type===le&&i({level:"groups"})}}}export{le as LOCATIONS_TYPE,We as useLocationsTree};
1
+ "use client";import{jsx as r,jsxs as m,Fragment as xe}from"react/jsx-runtime";import{Fragment as Q,useEffect as V,useRef as z}from"react";import{useTreeDrag as X}from"efficient-easel/drag";import{GlobeIcon as ve,ImageIcon as fe,LocationIcon as ke,MapIcon as Le,TextLinesIcon as Ie,TrashIcon as Z}from"efficient-easel/icons";import{Subtree as b,TreeRow as P,TreeRowAction as ee,TreeSeam as oe}from"efficient-easel/tree";import{useEaselStrings as Se}from"efficient-easel/strings";import{decodeLocationPartId as Pe,encodeLocationPartId as he,usePreviewLocationPart as we}from"../../render/components/PreviewLocationPartContext.js";import{isSelectionMode as Ce}from"efficient-easel/screen/lib/screen-parts";import{say as p,sayCount as ne}from"../../format/lib/editor-words.js";import{useLocationsFocus as $e,setLocationsFocus as i}from"../lib/document/locations-focus.js";import{bucketsOf as te,moveGroup as re,moveCity as ce,addCity as Te,addGroup as De,deleteGroup as Fe,deleteCity as Ge,absCityIndex as le,groupLabelOf as Oe,cardKey as se}from"../../format/lib/document/locations-tree.js";const ae="ContactLocations",T=x=>({parentId:`locations-${x}`,slot:"groups"}),A=(x,y)=>({parentId:`locations-${x}`,slot:`cities:${y}`});function We(x,y){const{readOnly:h,selected:w}=y,k=Se().tree,v=y.data?.content??[],ie=Ce(x),D=z(null);V(()=>{const o=w?.type===ae?String(w.props.id):null;o&&o!==D.current&&i({level:"groups"}),D.current=o},[w?.props.id]);const{selectedLocationPartId:de,setSelectedLocationPartId:R,setSelectHandler:N}=we(),c=$e(),u=(o,e)=>{const t=v[o];t&&y.replace(o,{type:t.type,props:{...t.props,locations:e}})},L=o=>{const e=v[o]?.props?.locations;return Array.isArray(e)?e:[]},_=X({keyOf:o=>`group:${o.si}:${o.index}`,readOnly:!!h,canDrop:(o,e)=>e.parentId===T(o.si).parentId&&e.slot==="groups",onDrop:(o,e)=>{u(o.si,re(L(o.si),o.index,e.index)),c.level==="city"&&i({level:"groups"})},onStep:(o,e)=>{u(o.si,re(L(o.si),o.index,e<0?o.index-1:o.index+2)),c.level==="city"&&i({level:"groups"})}}),F=X({keyOf:o=>`city:${o.si}:${o.group}:${o.index}`,readOnly:!!h,canDrop:(o,e)=>e.parentId===T(o.si).parentId&&e.slot.startsWith("cities:"),onDrop:(o,e)=>{const t=e.slot.slice(7);u(o.si,ce(L(o.si),o.group,o.index,t,e.index)),i({level:"group",key:t})},onStep:(o,e)=>{u(o.si,ce(L(o.si),o.group,o.index,o.group,e<0?o.index-1:o.index+2)),c.level==="city"&&i({level:"group",key:o.group})}}),j=z(v);j.current=v;const E=z(()=>{});V(()=>{N(o=>{const e=Pe(o);if(!e)return;const t=j.current.findIndex(C=>C.props?.id===e.nodeId);t<0||E.current(t,{level:e.part,index:e.index})})},[N]);const l=(o,e)=>{D.current=v[o]?.props?.id??null,y.select(o),i(e),x.reveal();const t=v[o]?.props?.id;typeof t=="string"&&(e.level==="image"||e.level==="map")?R(he(t,e.index,e.level)):R(null),typeof t=="string"&&y.scrollTo(t)};return E.current=l,{renderLocationTree:(o,e,{rowClick:t,isCollapsed:C,toggleCollapse:M})=>{const f=L(e),pe=te(f),I=String(o.props.id),S=ie&&w?.props.id===I,B=n=>r(oe,{...h?{}:_.seam({place:{...T(e),index:n}})},`seam:${I}:groups:${n}`),H=(n,d)=>r(oe,{...h?{}:F.seam({place:{...A(e,n),index:d}})},`seam:${I}:cities:${n}:${d}`);return m(xe,{children:[r(P,{icon:r(Ie,{size:13}),name:p("Texts"),words:k,onSelect:()=>l(e,{level:"texts"}),selected:S&&c.level==="texts",rowProps:{onClick:t(()=>l(e,{level:"texts"}))}}),pe.map((n,d)=>{const G=`${I}::grp::${n.key}`,K=C(G),ue=S&&c.level==="group"&&c.key===n.key,U=n.name||n.key?Oe(n.key,n.name):p("Ungrouped"),W={...A(e,n.key),index:n.cards.length},Y=F.row({item:{si:e,group:n.key,index:-1},place:W,into:W,canDrag:!1},{onClick:t(()=>l(e,{level:"group",key:n.key}))}),$=_.row({item:{si:e,index:d},place:{...T(e),index:d}},Y.rowProps);return m(Q,{children:[d===0&&B(0),r(P,{icon:r(ve,{size:13}),name:U,words:k,onSelect:()=>l(e,{level:"group",key:n.key}),selected:ue,draggable:$.draggable,dragging:$.dragging,drop:$.drop??Y.drop,fold:{open:!K,label:p("group"),onToggle:()=>M(G)},actions:r(ee,{kind:"delete",label:ne("Delete {label} group ({n} city)","Delete {label} group ({n} cities)",n.cards.length,{label:U}),onClick:()=>{u(e,Fe(f,n.key)),i({level:"groups"})},children:r(Z,{size:15})}),rowProps:$.rowProps,count:n.cards.length,countLabel:ne("{n} city","{n} cities",n.cards.length)}),!K&&m(b,{children:[n.cards.map((g,a)=>{const s=le(f,n.key,a),ye=S&&c.level==="city"&&c.index===s,O=String(g?.name??"")||p("City"),q=`${I}::city::${se(g)}`,J=C(q),{rowProps:ge,...me}=F.row({item:{si:e,group:n.key,index:a},place:{...A(e,n.key),index:a}},{onClick:t(()=>l(e,{level:"city",index:s}))});return m(Q,{children:[a===0&&H(n.key,0),r(P,{icon:r(ke,{size:13}),name:O,words:k,onSelect:()=>l(e,{level:"city",index:s}),selected:ye,...me,fold:{open:!J,label:O,onToggle:()=>M(q)},actions:r(ee,{kind:"delete",label:p("Delete {name}",{name:O}),onClick:()=>{u(e,Ge(f,n.key,a)),i({level:"group",key:n.key})},children:r(Z,{size:15})}),rowProps:ge}),!J&&m(b,{children:[r(P,{icon:r(fe,{size:13}),name:p("Image"),words:k,onSelect:()=>l(e,{level:"image",index:s}),selected:S&&c.level==="image"&&c.index===s,rowProps:{onClick:t(()=>l(e,{level:"image",index:s}))}}),r(P,{icon:r(Le,{size:13}),name:p("Map"),words:k,onSelect:()=>l(e,{level:"map",index:s}),selected:S&&c.level==="map"&&c.index===s,rowProps:{onClick:t(()=>l(e,{level:"map",index:s}))}})]}),H(n.key,a+1)]},se(g))}),m("button",{type:"button",className:"sf-add-card",onClick:()=>{const g=Te(f,n.key);u(e,g);const a=te(g).find(s=>s.key===n.key);i(a&&a.cards.length?{level:"city",index:le(g,n.key,a.cards.length-1)}:{level:"group",key:n.key})},children:[r("span",{className:"sf-plus sf-plus--sm",children:"+"}),p("Add city")]})]}),B(d+1)]},G)}),m("button",{type:"button",className:"sf-add-card",onClick:()=>{const{cards:n,key:d}=De(f);u(e,n),l(e,{level:"group",key:d})},children:[r("span",{className:"sf-plus sf-plus--sm",children:"+"}),p("Add group")]})]})},sectionPressed:o=>{o?.type===ae&&i({level:"groups"})}}}export{ae as LOCATIONS_TYPE,We as useLocationsTree};
@@ -1 +1 @@
1
- "use client";import{useEffect as p,useRef as d}from"react";import{useEasel as f}from"efficient-easel/easel";import{ROOT_ZONE as s}from"efficient-easel/draw";import{usePreviewHeader as m}from"../../render/components/PreviewHeaderContext.js";import{siteCardThemeMetadata as u}from"../../format/lib/content/section-width.js";import{pageConvertContextOf as x,sectionToBoxEdits as l}from"../../render/lib/sections/section-to-box.js";function B(n){const o=f(e=>e.appState.data.content),r=d(new Set),{cardThemeIndex:t}=m();p(()=>{const e=x(u(t));E(l(o,e),n,r.current)},[o,n,t])}function E(n,o,r){for(const{index:t,nodes:e}of[...n].sort((i,c)=>c.index-i.index)){const i=String(e[0].props.id);r.has(i)||(r.add(i),o.replaceComponent(s,t,e[0]),e.slice(1).forEach((c,a)=>{o.insertNode(s,t+1+a,c),o.replaceComponent(s,t+1+a,c)}))}}export{E as applySectionToBoxEdits,B as useSectionToBoxPass};
1
+ "use client";import{useEffect as p,useRef as a}from"react";import{useEasel as d}from"efficient-easel/easel";import{ROOT_ZONE as s}from"efficient-easel/draw";import{sectionToBoxEdits as m}from"../../render/lib/sections/section-to-box.js";function T(t){const o=d(e=>e.appState.data.content),n=a(new Set);p(()=>{u(m(o),t,n.current)},[o,t])}function u(t,o,n){for(const{index:e,nodes:c}of[...t].sort((i,r)=>r.index-i.index)){const i=String(c[0].props.id);n.has(i)||(n.add(i),o.replaceComponent(s,e,c[0]),c.slice(1).forEach((r,f)=>{o.insertNode(s,e+1+f,r),o.replaceComponent(s,e+1+f,r)}))}}export{u as applySectionToBoxEdits,T as useSectionToBoxPass};
@@ -7,8 +7,8 @@ export declare function useSocialSettings({ token, siteId, enabled, }: {
7
7
  siteId: string | null;
8
8
  enabled: boolean;
9
9
  }): {
10
- links: Partial<Record<"facebook" | "instagram" | "pinterest" | "telegram" | "tiktok" | "whatsapp" | "youtube" | "x" | "linkedin" | "line" | "wechat", string>>;
11
- rows: Record<"facebook" | "instagram" | "pinterest" | "telegram" | "tiktok" | "whatsapp" | "youtube" | "x" | "linkedin" | "line" | "wechat", SocialRowState>;
10
+ links: Partial<Record<"facebook" | "instagram" | "pinterest" | "telegram" | "tiktok" | "whatsapp" | "youtube" | "line" | "x" | "linkedin" | "wechat", string>>;
11
+ rows: Record<"facebook" | "instagram" | "pinterest" | "telegram" | "tiktok" | "whatsapp" | "youtube" | "line" | "x" | "linkedin" | "wechat", SocialRowState>;
12
12
  canSave: boolean;
13
13
  saveLink: (platform: SocialPlatform, value: string) => Promise<SocialSaveOutcome>;
14
14
  };
@@ -1,5 +1,5 @@
1
1
  import type { ReactElement, ReactNode } from "react";
2
- export declare function ColourControl({ value, onChange, label, id, caption, inherited, ariaLabel, }: {
2
+ export declare function ColourControl({ value, onChange, label, id, caption, inherited, ariaLabel, opacity, onOpacityChange, }: {
3
3
  value: string;
4
4
  onChange: (next: string) => void;
5
5
  label: string;
@@ -7,6 +7,8 @@ export declare function ColourControl({ value, onChange, label, id, caption, inh
7
7
  caption?: string;
8
8
  inherited?: string;
9
9
  ariaLabel?: string;
10
+ opacity?: number;
11
+ onOpacityChange?: (opacity: number) => void;
10
12
  }): import("react").JSX.Element;
11
13
  export declare function AnyColourSwatch({ value, onChange, label, }: {
12
14
  value: string;
@@ -21,7 +23,7 @@ export declare function ColourRow({ label, icon, changed, hint, onReset, resetTo
21
23
  resetTo?: string;
22
24
  children?: ReactNode;
23
25
  }): import("react").JSX.Element;
24
- export declare function InheritedColourRow({ label, icon, value, inherited, resetTo, onChange, onReset, hint, }: {
26
+ export declare function InheritedColourRow({ label, icon, value, inherited, resetTo, onChange, onReset, hint, opacity, onOpacityChange, changed, }: {
25
27
  label: string;
26
28
  icon?: ReactElement;
27
29
  value: string;
@@ -30,4 +32,7 @@ export declare function InheritedColourRow({ label, icon, value, inherited, rese
30
32
  onChange: (hex: string) => void;
31
33
  onReset: () => void;
32
34
  hint?: ReactNode;
35
+ opacity?: number;
36
+ onOpacityChange?: (opacity: number) => void;
37
+ changed?: boolean;
33
38
  }): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as s,jsxs as m}from"react/jsx-runtime";import{ColorPicker as p,HexInput as C}from"efficient-shell/ui";import{SettingsDefaultReset as g,SettingsField as x}from"efficient-easel/panel";import{typedHex as u}from"efficient-easel/pick";import{usePreviewHeader as w}from"../../../render/components/PreviewHeaderContext.js";import{editorEaselWords as b,say as c}from"../../../format/lib/editor-words.js";import{themeSwatches as N}from"./theme-swatches.js";function S({value:e,onChange:o,label:n,id:r,caption:t,inherited:l,ariaLabel:a}){return s(P,{value:e,onChange:o,label:c(a??n),id:r,caption:t,inherited:l})}function j(){const{theme:e}=w();return N(e).map(o=>({value:o.value,label:o.name}))}function P({value:e,onChange:o,label:n,id:r,caption:t,inherited:l}){const a=j(),i=e?null:u(l??""),d=t!==void 0&&(!e||u(t)!==u(e))?t:null,f=h=>{h!==e&&o(h)};return m("div",{className:"sf-colour",children:[s(p,{id:r,value:e,onChange:f,label:n,presets:a,fallback:i??void 0,size:"md",align:"start"}),d!==null?s("span",{className:"sf-colour-caption",children:d}):s("span",{className:"sf-colour-hexwrap",children:s(C,{value:e||i||"",onChange:f,label:c("{label} hex code",{label:n}),placeholder:e||i?void 0:c("Not set"),className:i?"sf-colour-hex is-inherited":"sf-colour-hex",size:"md"})})]})}function T({value:e,onChange:o,label:n}){return s(p,{value:e,onChange:r=>{r&&r!==e&&o(r)},label:c(n),size:"sm",align:"end"})}function R({label:e,icon:o,changed:n,hint:r,onReset:t,resetTo:l,children:a,...i}){return m(x,{label:e,icon:o,htmlFor:i.id,changed:n,hint:r,action:t?s(g,{words:b()?.panel,label:e,changed:!!n,detail:l,onReset:t}):void 0,children:[S({...i,label:e}),a]})}function _({label:e,icon:o,value:n,inherited:r,resetTo:t,onChange:l,onReset:a,hint:i}){const d=!!n;return s(R,{label:e,icon:o,value:n,inherited:d?void 0:r,onChange:l,changed:d,onReset:a,resetTo:t,hint:i})}export{T as AnyColourSwatch,S as ColourControl,R as ColourRow,_ as InheritedColourRow};
1
+ "use client";import{jsx as s,jsxs as g}from"react/jsx-runtime";import{ColorPicker as m,HexInput as w}from"efficient-shell/ui";import{SettingsDefaultReset as C,SettingsField as b}from"efficient-easel/panel";import{typedHex as p}from"efficient-easel/pick";import{usePreviewHeader as N}from"../../../render/components/PreviewHeaderContext.js";import{editorEaselWords as S,say as h}from"../../../format/lib/editor-words.js";import{themeSwatches as j}from"./theme-swatches.js";function k({value:e,onChange:n,label:o,id:r,caption:t,inherited:a,ariaLabel:d,opacity:i,onOpacityChange:c}){return s(H,{value:e,onChange:n,label:h(d??o),id:r,caption:t,inherited:a,...c?{opacity:i,onOpacityChange:c}:{}})}function z(){const{theme:e}=N();return j(e).map(n=>({value:n.value,label:n.name}))}function H({value:e,onChange:n,label:o,id:r,caption:t,inherited:a,opacity:d,onOpacityChange:i}){const c=z(),l=e?null:p(a??""),f=t!==void 0&&(!e||p(t)!==p(e))?t:null,u=x=>{x!==e&&n(x)};return i?s("div",{className:"sf-colour",children:s(m,{id:r,value:e,onChange:u,label:o,presets:c,fallback:l??void 0,size:"md",align:"start",showHexInput:!0,opacity:d,onOpacityChange:i})}):g("div",{className:"sf-colour",children:[s(m,{id:r,value:e,onChange:u,label:o,presets:c,fallback:l??void 0,size:"md",align:"start"}),f!==null?s("span",{className:"sf-colour-caption",children:f}):s("span",{className:"sf-colour-hexwrap",children:s(w,{value:e||l||"",onChange:u,label:h("{label} hex code",{label:o}),placeholder:e||l?void 0:h("Not set"),className:l?"sf-colour-hex is-inherited":"sf-colour-hex",size:"md"})})]})}function _({value:e,onChange:n,label:o}){return s(m,{value:e,onChange:r=>{r&&r!==e&&n(r)},label:h(o),size:"sm",align:"end"})}function P({label:e,icon:n,changed:o,hint:r,onReset:t,resetTo:a,children:d,...i}){return g(b,{label:e,icon:n,htmlFor:i.id,changed:o,hint:r,action:t?s(C,{words:S()?.panel,label:e,changed:!!o,detail:a,onReset:t}):void 0,children:[k({...i,label:e}),d]})}function A({label:e,icon:n,value:o,inherited:r,resetTo:t,onChange:a,onReset:d,hint:i,opacity:c,onOpacityChange:l,changed:f}){const u=!!o;return s(P,{label:e,icon:n,value:o,inherited:u?void 0:r,onChange:a,changed:f??u,onReset:d,resetTo:t,hint:i,...l?{opacity:c,onOpacityChange:l}:{}})}export{_ as AnyColourSwatch,k as ColourControl,P as ColourRow,A as InheritedColourRow};
@@ -1,8 +1,12 @@
1
1
  import { type RefObject } from "react";
2
2
  import { type SelectionSource } from "efficient-easel/copy";
3
- import { type MarkStyle } from "../../../format/lib/markup.js";
3
+ import { type MarkStyle, type WrapResult } from "../../../format/lib/markup.js";
4
4
  export type Selectable = SelectionSource;
5
- export declare function markSelection(value: string, style: MarkStyle, el: Selectable): import("efficient-shell/markup").WrapResult;
5
+ export declare function markSelection(value: string, style: MarkStyle, el: Selectable): WrapResult;
6
+ export declare function clearFormatting(value: string, sel: {
7
+ start: number;
8
+ end: number;
9
+ } | null): WrapResult | null;
6
10
  export declare function MarkupToolbar({ target, value, onChange, disabled, label, }: {
7
11
  target: RefObject<HTMLInputElement | HTMLTextAreaElement | null>;
8
12
  value: string;
@@ -1 +1 @@
1
- import{jsx as l}from"react/jsx-runtime";import{useEffect as E,useState as T}from"react";import{markSelection as x,useCaretEdit as y}from"efficient-easel/copy";import{RevertIcon as M}from"efficient-easel/icons";import{IconButton as b,TextToolbar as v,Tooltip as L}from"efficient-shell/ui";import{say as u}from"../../../format/lib/editor-words.js";import{applyShopMark as C,shopMarkedAt as D,shopMarkupTools as I,stripMarkup as g}from"../../../format/lib/markup.js";const S="Clear formatting";function j(t,n,o){return x(t,n,o,C)}function z(t){const[n,o]=T(null);return E(()=>{const r=t.current?.ownerDocument??(typeof document>"u"?null:document);if(!r)return;const i=()=>{const s=t.current;if(!s||r.activeElement!==s)return;const c=s.selectionStart??s.value.length,m=s.selectionEnd??c;o(a=>a&&a.start===c&&a.end===m?a:{start:c,end:m})};return r.addEventListener("selectionchange",i),()=>r.removeEventListener("selectionchange",i)},[t]),[n,o]}function A({target:t,value:n,onChange:o,disabled:r=!1,label:i="Formatting"}){const s=y({target:t,onChange:o}),[c,m]=z(t),a=e=>s(h=>{const p=j(n,e,h);return m({start:p.selectionStart,end:p.selectionEnd}),p}),d=I(),f={};if(c)for(const e of d)f[e.style]=D(n,c.start,c.end,e.style);const k=g(n);return l(v,{offered:new Set(d.map(e=>e.style)),onMark:e=>a(e),pressed:f,disabled:r,"aria-label":u(i),className:"sf-markup-bar",last:l("span",{className:"sf-markup-clear",children:l(L,{content:u(S),children:l(b,{size:"sm",onMouseDown:e=>e.preventDefault(),onClick:()=>o(k),disabled:r||k===n,"aria-label":u(S),children:l(M,{size:14})})})})})}var w=A;export{A as MarkupToolbar,w as default,j as markSelection};
1
+ import{jsx as x}from"react/jsx-runtime";import{useEffect as E,useState as h}from"react";import{clearRangeOf as k,markSelection as y,useCaretEdit as g}from"efficient-easel/copy";import{TextToolbar as M}from"efficient-shell/ui";import{say as T}from"../../../format/lib/editor-words.js";import{applyShopMark as b,clearShopStyle as j,shopMarkedAt as C,shopMarkupTools as D}from"../../../format/lib/markup.js";function F(e,n,r){return y(e,n,r,b)}function p(e,n){const r=k(n,e.length),o=j(e,r.start,r.end);return o.text===e?null:o}function L(e){const[n,r]=h(null);return E(()=>{const o=e.current?.ownerDocument??(typeof document>"u"?null:document);if(!o)return;const u=()=>{const s=e.current;if(!s||o.activeElement!==s)return;const c=s.selectionStart??s.value.length,i=s.selectionEnd??c;r(a=>a&&a.start===c&&a.end===i?a:{start:c,end:i})};return o.addEventListener("selectionchange",u),()=>o.removeEventListener("selectionchange",u)},[e]),[n,r]}function A({target:e,value:n,onChange:r,disabled:o=!1,label:u="Formatting"}){const s=g({target:e,onChange:r}),[c,i]=L(e),a=t=>s(d=>{const l=F(n,t,d);return i({start:l.selectionStart,end:l.selectionEnd}),l}),f=D(),m={};if(c)for(const t of f)m[t.style]=C(n,c.start,c.end,t.style);const S=o?null:p(n,c);return x(M,{offered:new Set(f.map(t=>t.style)),onMark:t=>a(t),pressed:m,disabled:o,"aria-label":T(u),className:"sf-markup-bar",clear:S?{onClear:()=>s(()=>{const t=e.current,d=t&&t.ownerDocument.activeElement===t?{start:t.selectionStart??0,end:t.selectionEnd??0}:null,l=p(n,d)??{text:n,selectionStart:d?.start??0,selectionEnd:d?.end??0};return i({start:l.selectionStart,end:l.selectionEnd}),l})}:void 0})}var v=A;export{A as MarkupToolbar,p as clearFormatting,v as default,F as markSelection};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as I}from"react/jsx-runtime";import{ButtonIcon as g,ButtonIconIcon as x,GroundIcon as b,IconAfterTextIcon as y,IconBeforeTextIcon as C,StylesIcon as F,TextColorIcon as S,WidthIcon as T}from"efficient-easel/icons";import*as _ from"efficient-easel/icons";import{SettingsField as B}from"efficient-easel/panel";import{useSelectedFields as a}from"efficient-easel/easel";import{IconPicker as O,Segmented as k}from"efficient-shell/ui";import{StorefrontTextLinkField as v}from"../../../../../components/StorefrontLinkField.js";import{BUTTON_ICONS as w,buttonIconChoice as L,buttonIconSide as N}from"../../../../../../format/lib/content/button-icon.js";import{say as l}from"../../../../../../format/lib/editor-words.js";import{FOLLOWS_SITE_BUTTON as z,FOLLOWS_SITE_BUTTON_INK as W,colorInput as m,group as u,inOwnBox as j,linkField as P,plainText as R,section as f,segmented as p}from"../../../controls.js";import{NoControlMark as A,noControlField as U}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{alignField as E}from"../../shared-fields.js";import{CARD_ROW_FACTS as G,cardRowField as d,cardRowFields as D}from"../../../card-row-fields.js";const c=o=>({...U({type:"custom",render:()=>e(A,{})},"always"),reachedBy:o});function K(o){const n=(o==="none"?"no-symbol":o).replace(/(^|-)([a-z])/g,(r,s,h)=>h.toUpperCase()),t=_[`${n}Icon`];return t?e(t,{size:16}):null}const M=w.map(o=>({value:o,icon:K(o)}));function V({value:o,onChange:i}){const n=a(),t=n.values.href,r=typeof o=="string"?o:o&&typeof o=="object"&&"text"in o?String(o.text??""):"";return e(v,{label:"Button",icon:e(g,{size:18}),text:r,onTextChange:i,link:typeof t=="string"?t:"",onLinkChange:s=>n.onChange("href",s)})}function $({value:o,onChange:i}){const n=a(),t=L(o,n.values.arrow),r=N(n.values.iconPosition);return e(B,{label:l("Icon"),icon:e(x,{size:18}),children:I("div",{className:"flex items-center gap-2",children:[e(O,{label:l("Icon"),value:t,emptyValue:"none",options:M,onChange:i}),t!=="none"&&e(k,{size:"sm",block:!0,label:l("Icon position"),value:r,onChange:s=>n.onChange("iconPosition",s),options:[{value:"before",icon:e(C,{size:16}),label:e("span",{className:"sr-only",children:l("Icon before text")}),title:l("Icon before text")},{value:"after",icon:e(y,{size:16}),label:e("span",{className:"sr-only",children:l("Icon after text")}),title:l("Icon after text")}]})]})})}const lo={fields:{label:j(R("Button"),o=>e(V,{value:o.value,onChange:o.onChange})),href:{...P("Button link"),...c("label")},_gButton:u("Button"),rowField:d("Shows","text"),rowLinkField:d("Link from","link"),_dSize:f("Size"),widthFit:p("Width",e(T,{}),[{label:"Fit content",value:"fit"},{label:"Fill",value:"fill"}],"fit"),_gStyle:u("Style"),variant:p("Style",e(F,{}),[{label:"Filled",value:"primary"},{label:"Outline",value:"ghost"}],"primary"),icon:{type:"custom",render:o=>e($,{value:o.value,onChange:o.onChange})},iconPosition:c("icon"),arrow:c("icon"),buttonColor:m("Fill color",z,e(b,{})),buttonTextColor:m("Text color",W,e(S,{})),_dLayout:f("Layout"),align:E()},resolveFields:(o,i)=>D(i.fields,o,i),showWhenFacts:G};export{lo as ButtonBlockFields};
1
+ import{jsx as t,jsxs as I}from"react/jsx-runtime";import{ButtonIcon as F,ButtonIconIcon as g,GroundIcon as x,IconAfterTextIcon as T,IconBeforeTextIcon as y,TextColorIcon as C,WidthIcon as _}from"efficient-easel/icons";import*as B from"efficient-easel/icons";import{SettingsField as O}from"efficient-easel/panel";import{useSelectedFields as d}from"efficient-easel/easel";import{IconPicker as S,Segmented as k}from"efficient-shell/ui";import{StorefrontTextLinkField as w}from"../../../../../components/StorefrontLinkField.js";import{BUTTON_ICONS as L,buttonIconChoice as N,buttonIconSide as v,buttonWidth as W}from"../../../../../../format/lib/content/button-icon.js";import{BUTTON_PAD_BUILT_IN as z,BUTTON_PAD_KEYS as P,buttonLook as A}from"../../../../../../render/lib/content/button-look.js";import{say as n}from"../../../../../../format/lib/editor-words.js";import{FOLLOWS_SITE_BUTTON as U,FOLLOWS_SITE_BUTTON_INK as R,buttonBorderField as j,buttonWordsEntryField as E,colorInput as u,group as f,inOwnBox as D,linkField as K,plainText as G,section as m,segmented as Y,sidesPaddingFields as M}from"../../../controls.js";import{NoControlMark as V,noControlField as $}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{alignField as q}from"../../shared-fields.js";import{CARD_ROW_FACTS as H,cardRowField as p,cardRowFields as J}from"../../../card-row-fields.js";import{consentWordsKept as Q,withConsentWordsRow as X}from"../../../consent-words-field.js";const c=o=>({...$({type:"custom",render:()=>t(V,{})},"always"),reachedBy:o});function h(o){const e=(o==="none"?"no-symbol":o).replace(/(^|-)([a-z])/g,(r,s,a)=>a.toUpperCase()),l=B[`${e}Icon`];return l?t(l,{size:16}):null}const Z=L.map(o=>({value:o,icon:h(o)}));function oo({value:o,onChange:i}){const e=d(),l=e.values.href,r=typeof o=="string"?o:o&&typeof o=="object"&&"text"in o?String(o.text??""):"";return t(w,{label:"Button",icon:t(F,{size:18}),text:r,onTextChange:i,link:typeof l=="string"?l:"",onLinkChange:s=>e.onChange("href",s)})}function to({value:o,onChange:i}){const e=d(),l=N(o,e.values.arrow),r=v(e.values.iconPosition),s=W(e.values.widthFit)==="fill",a=h("icon-at-end");return t(O,{label:n("Icon"),icon:t(g,{size:18}),children:I("div",{className:"flex items-center gap-2",children:[t(S,{label:n("Icon"),value:l,emptyValue:"none",options:Z,onChange:i}),l!=="none"&&t(k,{size:"sm",block:!0,label:n("Icon position"),value:r==="end"&&!s?"after":r,onChange:b=>e.onChange("iconPosition",b),options:[{value:"before",icon:t(y,{size:16}),label:t("span",{className:"sr-only",children:n("Icon before text")}),title:n("Icon before text")},{value:"after",icon:t(T,{size:16}),label:t("span",{className:"sr-only",children:n("Icon after text")}),title:n("Icon after text")},...s?[{value:"end",icon:a,label:t("span",{className:"sr-only",children:n("Icon at the far end")}),title:n("Icon at the far end")}]:[]]})]})})}const eo={key:"buttonFillOpacity",unsetFrom:"variant",unset:o=>A({variant:o}).fillOpacity},Fo={fields:{label:D(G("Button"),o=>t(oo,{value:o.value,onChange:o.onChange})),labelText:E("label"),href:{...K("Button link"),...c("label")},consentWords:Q("label"),_gButton:f("Button"),rowField:p("Shows","text"),rowLinkField:p("Link from","link"),_dSize:m("Size"),widthFit:Y("Width",t(_,{}),[{label:"Fit content",value:"fit"},{label:"Fill",value:"fill"}],"fit"),...M({keys:P,fallback:z,group:!1}),_gStyle:f("Style"),variant:c("buttonColor"),icon:{type:"custom",render:o=>t(to,{value:o.value,onChange:o.onChange})},iconPosition:c("icon"),arrow:c("icon"),buttonColor:u("Fill color",U,t(x,{}),eo),buttonFillOpacity:c("buttonColor"),buttonBorder:j(),buttonTextColor:u("Text color",R,t(C,{})),_dLayout:m("Layout"),align:q()},resolveFields:(o,i)=>X(J(i.fields,o,i),o.props,"label",["href"]),showWhenFacts:H};export{Fo as ButtonBlockFields};
@@ -1 +1 @@
1
- import{jsx as n}from"react/jsx-runtime";import{BOX_CARD_PAD as o,BOX_DARKEN as e,BOX_DARKEN_STYLES as l,isBackgroundBox as c}from"../../../../../../format/lib/content/box-background.js";import{containerDirectionPoints as b}from"../../../../../../format/lib/content/container-direction.js";import{deviceField as r}from"efficient-easel/screen/lib/document/device-fields";import{OpacityIcon as k,StylesIcon as f}from"efficient-easel/icons";import{boxAlignField as u,boxBlockSpacingField as x,boxJustifyField as F,boxPhoneRowField as y,boxShareField as S,boxWrapField as _,gapField as B,group as i,placementField as h,plainText as D,select as I,sidesPaddingFields as p,slider as R,swapPadding as s,upload as d,withPanelOnly as w}from"../../../controls.js";import{withRowRules as A}from"../../../../../../render/lib/document/show-when.js";import{FlexSlots as P}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";const O={field:"bgImage",set:!0},G={fields:A({_gContent:i("Content"),content:P.content,_gLayout:i("Layout"),direction:{type:"radio",options:b("Flex")},label:w(D("Tab name")),gap:B("Flex"),justify:F(),align:u(),wrap:_(),share:S(),phoneRow:y(),blockSpacing:x(),_gBackground:i("Background image"),bgImage:r("desktop",d("Image","image/*")),bgImagePhone:r("mobile",d("Image","image/*")),darken:R("Darken",n(k,{}),e.min,e.max,e.step,e.fallback,e.unit),darkenStyle:I("Darken style",n(f,{}),l,l[0].value),placement:h("Content position",{stacking:!1})},[[["darken","darkenStyle","placement"],O]]),resolveFields:(a,{fields:t})=>{const m=a.props;if(c(m.bgImage)){const g=p({fallback:{top:o.desktop,bottom:o.desktop,left:o.side,right:o.side}});return s(t,g)}return a.props.padV2!==!0?s(t,p({fallback:{top:24,bottom:24}})):t}};export{G as FlexFields};
1
+ import{jsx as t}from"react/jsx-runtime";import{BOX_CARD_PAD as a,BOX_DARKEN as o,BOX_DARKEN_STYLES as l,isBackgroundBox as S}from"../../../../../../format/lib/content/box-background.js";import{containerDirectionPoints as f}from"../../../../../../format/lib/content/container-direction.js";import{BOX_TAB_SHAPES as k,REEL_SHAPE_LABELS as h}from"../../../../../../format/lib/reel.js";import{deviceField as r}from"efficient-easel/screen/lib/document/device-fields";import{OpacityIcon as x,ShadowIcon as F,StylesIcon as p}from"efficient-easel/icons";import{boxAlignField as _,boxBlockSpacingField as u,boxJustifyField as y,boxPhoneRowField as B,boxShareField as w,boxWrapField as A,gapField as I,group as i,placementField as P,plainText as R,select as s,sidesPaddingFields as d,slider as D,swapPadding as m,toggle as E,upload as g,withPanelOnly as O}from"../../../controls.js";import{withRowRules as L}from"../../../../../../render/lib/document/show-when.js";import{FlexSlots as T}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";const C={field:"bgImage",set:!0},X={field:"direction",is:"tabs"},Y={fields:L({_gContent:i("Content"),content:T.content,_gLayout:i("Layout"),direction:{type:"radio",options:f("Flex")},tabShape:s("Tab shape",t(p,{}),k.map(e=>({label:h[e],value:e})),"tabs"),label:O(R("Tab name")),gap:I("Flex"),justify:y(),align:_(),wrap:A(),share:w(),phoneRow:B(),blockSpacing:u(),_gShadow:i("Shadow"),shadow:E("Shadow",!1,t(F,{})),_gBackground:i("Background image"),bgImage:r("desktop",g("Image","image/*")),bgImagePhone:r("mobile",g("Image","image/*")),darken:D("Darken",t(x,{}),o.min,o.max,o.step,o.fallback,o.unit),darkenStyle:s("Darken style",t(p,{}),l,l[0].value),placement:P("Content position",{stacking:!1})},[[["darken","darkenStyle","placement"],C],[["tabShape"],X]]),resolveFields:(e,{fields:n})=>{const c=e.props;if(S(c.bgImage)){const b=d({fallback:{top:a.desktop,bottom:a.desktop,left:a.side,right:a.side}});return m(n,b)}return e.props.padV2!==!0?m(n,d({fallback:{top:24,bottom:24}})):n}};export{Y as FlexFields};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{MediaIcon as r,OpacityIcon as d,PlayIcon as m}from"efficient-easel/icons";import{colorInput as p,focusKeptField as a,group as o,MEDIA_TYPE_OPTIONS as n,plainText as g,segmented as s,slider as l,text as c,upload as i,withIdentifier as I,withPanelOnly as t}from"../../../controls.js";import{PH as f}from"../../../../../../format/lib/document/blocks/placeholders.js";import{slotNoticeField as F}from"../../shared-fields.js";import{heroMediaFields as _,VIDEO_FILE_LABEL as u,VIDEO_FILE_PROMPT as y}from"../../../../../../render/lib/document/hero-media-parts.js";import{HeroSlideSlots as P}from"../../../../../../format/lib/document/blocks/general/HeroSlide/meta.js";const h={fields:_({_gContent:o("Content"),name:t(I(g("Slide name",f.slideName))),process:t(c("Reel label","Label")),groupNotice:F("HeroSlide"),groups:P.groups,_gMedia:o("Media"),mediaType:s("Type",e(r,{}),n,"video"),mediaVideo:i(u,"video/*",y),videoSpeed:l("Playback speed",e(m,{}),25,100,5,100,"%"),mediaImage:i("Background image","image/*","Upload a background image",{focus:"imageFocal"}),imageFocal:a(),imageFocalPhone:a(),poster:i("Video poster","image/*","Upload a poster still"),_gTint:o("Image tint"),tintColor:p("Tint color","#000000"),overlay:l("Overlay",e(d,{}),0,100,5,0,"%")},{onlyFor:{image:["mediaImage","imageFocal","imageFocalPhone","_gTint","tintColor","overlay"],video:["mediaVideo","videoSpeed","poster"]},fallback:"video"})};export{h as HeroSlideFields};
1
+ import{jsx as e}from"react/jsx-runtime";import{BlockVideoIcon as m,ClockIcon as r,ImageIcon as t,MediaIcon as n,OpacityIcon as g,PlayIcon as p}from"efficient-easel/icons";import{colorInput as s,focusKeptField as o,group as i,loadingShowsField as c,MEDIA_TYPE_OPTIONS as I,plainText as f,segmented as F,slider as l,text as v,upload as a,withIdentifier as S,withPanelOnly as d}from"../../../controls.js";import{LOADING_SHOWS_IMAGE as _}from"../../../../../../format/lib/hero-video.js";import{PH as u}from"../../../../../../format/lib/document/blocks/placeholders.js";import{slotNoticeField as h}from"../../shared-fields.js";import{heroMediaFields as y,VIDEO_FILE_LABEL as O,VIDEO_FILE_PROMPT as P}from"../../../../../../render/lib/document/hero-media-parts.js";import{HeroSlideSlots as T}from"../../../../../../format/lib/document/blocks/general/HeroSlide/meta.js";const H={fields:y({_gContent:i("Content"),name:d(S(f("Slide name",u.slideName))),process:d(v("Reel label","Label")),groupNotice:h("HeroSlide"),groups:T.groups,_gMedia:i("Media"),mediaType:F("Type",e(n,{}),I,"video"),mediaVideo:a(O,"video/*",P,{frame:"videoFrame"}),videoSpeed:l("Playback speed",e(p,{}),25,100,5,100,"%"),loadingShows:c("Show while loading",e(r,{}),{frame:e(m,{}),image:e(t,{})}),videoFrame:o(),mediaImage:a("Background image","image/*","Upload a background image",{focus:"imageFocal"}),imageFocal:o(),imageFocalPhone:o(),poster:a("Image","image/*","Choose an image"),_gTint:i("Image tint"),tintColor:s("Tint color","#000000"),overlay:l("Overlay",e(g,{}),0,100,5,0,"%")},{onlyFor:{image:["mediaImage","imageFocal","imageFocalPhone","_gTint","tintColor","overlay"],video:["mediaVideo","videoSpeed","loadingShows","videoFrame"]},fallback:"video",rules:{poster:{all:[{field:"mediaType",is:"video",default:"video"},_]}}})};export{H as HeroSlideFields};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{BlackAndWhiteIcon as l,ColumnsIcon as n,HeightIcon as g,PaddingYIcon as r}from"efficient-easel/icons";import{group as t,plainText as i,slider as o,textarea as s,toggle as d,upload as m,withPanelOnly as c}from"../../../controls.js";const u={fields:{_gContent:t("Content"),heading:s("Heading","Trusted by *teams worldwide*"),items:{type:"array",label:"Logos",arrayFields:{src:m("Image","image/*"),alt:c(i("Name / alt"))},getItemSummary:a=>a.alt||a.src||"logo"},_gStyle:t("Style"),columns:o("Columns",e(n,{}),3,6,1,5),logoHeight:o("Logo height",e(g,{}),20,72,2,28,"px"),bandPadding:o("Space above and below",e(r,{}),16,120,4,40,"px"),grayscale:d("Black and white logos",!0,e(l,{}))}};export{u as LogosFields};
1
+ import{jsx as o}from"react/jsx-runtime";import{BlackAndWhiteIcon as a,ColumnsIcon as s,HeightIcon as n,PaddingYIcon as r,StylesIcon as g}from"efficient-easel/icons";import{group as l,plainText as i,select as m,slider as e,textarea as d,toggle as O,upload as _,withPanelOnly as c}from"../../../controls.js";import{DEFAULT_LOGO_LOOK as p,LOGO_LOOK_OPTIONS as S}from"../../../../../../format/lib/sections/logo-look.js";import{HEAD_ROWS_SHOW_WHEN as y,OWN_BOX_ROWS_SHOW_WHEN as L}from"../../../../../../format/lib/sections/section-head-placement.js";import{withRowRules as h}from"../../../../../../render/lib/document/show-when.js";import{LogosSlots as W}from"../../../../../../format/lib/document/blocks/general/Logos/meta.js";const u=["items","heading","bandPadding"],H=["look"],E={fields:h({_gContent:l("Content"),heading:d("Heading","Trusted by *teams worldwide*"),items:{type:"array",label:"Logos",arrayFields:{src:_("Image","image/*"),alt:c(i("Name / alt"))},getItemSummary:t=>t.alt||t.src||"logo"},logos:W.logos,_gStyle:l("Style"),columns:e("Columns",o(s,{}),3,6,1,5),logoHeight:e("Logo height",o(n,{}),20,72,2,28,"px"),bandPadding:e("Space above and below",o(r,{}),16,120,4,40,"px"),grayscale:O("Black and white logos",!0,o(a,{})),look:m("Logo style",o(g,{}),S,p)},[[u,y],[H,L]])};export{E as LogosFields};
@@ -1 +1 @@
1
- import{jsx as a}from"react/jsx-runtime";import{FieldGlyph as o}from"../../../../../components/FieldGlyph.js";import{CARD_ROW_FACTS as t,cardRowField as r,cardRowFields as i}from"../../../card-row-fields.js";import{group as d,select as s,textarea as h}from"../../../controls.js";import{PH as m}from"../../../../../../format/lib/document/blocks/placeholders.js";import{alignField as p,toneField as F}from"../../shared-fields.js";const v={fields:{text:h("Body",m.body),align:p(),tone:F(),_gText:d("Text"),rowField:r("Shows","text"),tag:s("HTML tag",a(o,{noun:"heading"}),[{label:"Paragraph",value:"p"},{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"}],"p")},resolveFields:(l,e)=>i(e.fields,l,e),showWhenFacts:t};export{v as TextFields};
1
+ import{jsx as o}from"react/jsx-runtime";import{FieldGlyph as t}from"../../../../../components/FieldGlyph.js";import{CARD_ROW_FACTS as r,cardRowField as a,cardRowFields as i}from"../../../card-row-fields.js";import{group as s,select as d,textarea as n}from"../../../controls.js";import{PH as p}from"../../../../../../format/lib/document/blocks/placeholders.js";import{alignField as h,toneField as m}from"../../shared-fields.js";import{consentWordsKept as x,withConsentWordsRow as F}from"../../../consent-words-field.js";const w={fields:{text:n("Body",p.body),consentWords:x("text"),align:h(),tone:m(),_gText:s("Text"),rowField:a("Shows","text"),tag:d("HTML tag",o(t,{noun:"heading"}),[{label:"Paragraph",value:"p"},{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"}],"p")},resolveFields:(e,l)=>F(i(l.fields,e,l),e.props,"text"),showWhenFacts:r};export{w as TextFields};
@@ -1,2 +1,2 @@
1
- export declare const assembleGeneralBlocks: () => Record<"Grid" | "Flex" | "HeroGroup" | "Ticker" | "Prose" | "Logos" | "Divider" | "LogoBlock" | "Text" | "Hero" | "HeroSingle" | "IntroBleed" | "SpecStrip" | "Timeline" | "Footprint" | "ParagraphsA" | "Cards" | "KeyFeatures" | "Chart" | "Mockup" | "Testimonials" | "TitleWithButtons" | "Countdown" | "DocMasthead" | "DocBody" | "DocMetaCards" | "FAQ" | "Split" | "Breadcrumb" | "Banner" | "Stats" | "OrderSummary" | "PaymentBadges" | "Manifesto" | "SectionHeader" | "TimelineTrack" | "ProcessSteps" | "StatsParagraph" | "Masthead" | "FeaturedCover" | "LongRead" | "Series" | "ContactLocations" | "CategoryBar" | "DocTabs" | "CustomHTML" | "Spacer" | "Heading" | "Eyebrow" | "ImageBlock" | "ButtonBlock" | "PostCard" | "HeroSlide" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
2
- export declare const generalBlocks: Record<"Grid" | "Flex" | "HeroGroup" | "Ticker" | "Prose" | "Logos" | "Divider" | "LogoBlock" | "Text" | "Hero" | "HeroSingle" | "IntroBleed" | "SpecStrip" | "Timeline" | "Footprint" | "ParagraphsA" | "Cards" | "KeyFeatures" | "Chart" | "Mockup" | "Testimonials" | "TitleWithButtons" | "Countdown" | "DocMasthead" | "DocBody" | "DocMetaCards" | "FAQ" | "Split" | "Breadcrumb" | "Banner" | "Stats" | "OrderSummary" | "PaymentBadges" | "Manifesto" | "SectionHeader" | "TimelineTrack" | "ProcessSteps" | "StatsParagraph" | "Masthead" | "FeaturedCover" | "LongRead" | "Series" | "ContactLocations" | "CategoryBar" | "DocTabs" | "CustomHTML" | "Spacer" | "Heading" | "Eyebrow" | "ImageBlock" | "ButtonBlock" | "PostCard" | "HeroSlide" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
1
+ export declare const assembleGeneralBlocks: () => Record<"Grid" | "Flex" | "HeroGroup" | "Ticker" | "Prose" | "Logos" | "Divider" | "LogoBlock" | "Text" | "Hero" | "HeroSingle" | "IntroBleed" | "SpecStrip" | "ProcessSteps" | "OrderSummary" | "PaymentBadges" | "Manifesto" | "Timeline" | "Footprint" | "ParagraphsA" | "Split" | "Cards" | "Stats" | "StatsParagraph" | "Chart" | "Mockup" | "Testimonials" | "Banner" | "TitleWithButtons" | "Countdown" | "Masthead" | "FeaturedCover" | "LongRead" | "Series" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocMasthead" | "DocBody" | "DocMetaCards" | "FAQ" | "ContactLocations" | "SectionHeader" | "CustomHTML" | "TimelineTrack" | "Spacer" | "KeyFeatures" | "Heading" | "Eyebrow" | "ImageBlock" | "ButtonBlock" | "PostCard" | "HeroSlide" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
2
+ export declare const generalBlocks: Record<"Grid" | "Flex" | "HeroGroup" | "Ticker" | "Prose" | "Logos" | "Divider" | "LogoBlock" | "Text" | "Hero" | "HeroSingle" | "IntroBleed" | "SpecStrip" | "ProcessSteps" | "OrderSummary" | "PaymentBadges" | "Manifesto" | "Timeline" | "Footprint" | "ParagraphsA" | "Split" | "Cards" | "Stats" | "StatsParagraph" | "Chart" | "Mockup" | "Testimonials" | "Banner" | "TitleWithButtons" | "Countdown" | "Masthead" | "FeaturedCover" | "LongRead" | "Series" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocMasthead" | "DocBody" | "DocMetaCards" | "FAQ" | "ContactLocations" | "SectionHeader" | "CustomHTML" | "TimelineTrack" | "Spacer" | "KeyFeatures" | "Heading" | "Eyebrow" | "ImageBlock" | "ButtonBlock" | "PostCard" | "HeroSlide" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
@@ -1 +1 @@
1
- import{useSyncExternalStore as T}from"react";import{rowBound as P}from"../../../format/lib/content/card-template.js";import{SHOP_MARKUP as S}from"../../../format/lib/markup.js";import{readHidable as k,textFieldOffPage as v}from"./controls.js";import{decodePartId as b}from"efficient-easel/draw";import{PART_ATTR as y}from"../../../render/lib/document/text-parts.js";import{partRowField as K}from"./part-row-field.js";import{decodePartKey as O,partRowValue as w}from"../../../render/lib/document/part-rows.js";import{isMultilineKind as A,typeInPlaceKind as R}from"../../../render/lib/document/part-text.js";import{commitPartText as C}from"./part-typing.js";const F=["bold","italic","underline","strike","link","sup","sub"],E=["bullet","number"];function I(e,t){return e?[...F,...t?E:[]]:[]}function g(e,t){const r=b(e);if(!r?.propKey)return null;const{nodeId:u,propKey:s}=r,o=t.getItemById(u),c=t.getSelectorForId(u);if(!o||!c)return null;const{key:n,row:i}=O(s),p=t.components[o.type]?.fields?.[n],d=i?K(p,i):p,m=R(d);if(!m)return null;const l=o.props??{};if(!i&&P(o.type,l,n)||i&&!(Array.isArray(l[n])&&i.index<l[n].length))return null;const x=i?w(l[n],i):l[n];return{node:o,selector:c,propKey:s,kind:m,stored:x,offPage:v(d)}}function W(e,t){const r=g(e,t);if(!r||r.offPage)return null;const{text:u,hidden:s}=k(r.stored);if(s)return null;const o=A(r.kind);return{partId:e,value:u,rules:S,multiline:o,offered:I(r.kind!=="plainText",o),write:c=>{const n=g(e,t);n&&C({node:n.node,propKey:n.propKey,kind:n.kind,zone:n.selector.zone,index:n.selector.index},c,t.replace)}}}function j(e,t,r){return e?.isConnected&&e.getAttribute(y)===r?e:t?.querySelector(`[${y}="${_(r)}"]`)??null}function _(e){return e.replace(/["\\]/g,"\\$&")}function G(e){const t=e.activeElement;return t?t.tagName==="IFRAME"||!!t.closest(".es-canvas"):!1}let f=null;const a=new Set;function B(){return f}function J(e){if(e!==f){f=e;for(const t of a)t()}}function L(e){return a.add(e),()=>{a.delete(e)}}function Q(){return T(L,B,()=>null)}export{B as canvasTypingPart,G as keysOnCanvas,j as partElement,I as partTextTools,W as partTypingTarget,J as setCanvasTypingPart,L as subscribeCanvasTypingPart,Q as useCanvasTypingPart};
1
+ import{useSyncExternalStore as T}from"react";import{rowBound as P}from"../../../format/lib/content/card-template.js";import{SHOP_MARKUP as S}from"../../../format/lib/markup.js";import{readHidable as k,textFieldOffPage as v}from"./controls.js";import{decodePartId as O}from"efficient-easel/draw";import{PART_ATTR as y}from"../../../render/lib/document/text-parts.js";import{partRowField as b}from"./part-row-field.js";import{decodePartKey as K,partRowValue as w}from"../../../render/lib/document/part-rows.js";import{isMultilineKind as A,typeInPlaceKind as R}from"../../../render/lib/document/part-text.js";import{commitPartText as C}from"./part-typing.js";import{consentWordsOf as F}from"../../../format/lib/content/consent-banner.js";const E=["bold","italic","underline","strike","link","sup","sub"],I=["bullet","number"];function _(e,t){return e?[...E,...t?I:[]]:[]}function g(e,t){const r=O(e);if(!r?.propKey)return null;const{nodeId:u,propKey:s}=r,o=t.getItemById(u),c=t.getSelectorForId(u);if(!o||!c)return null;const{key:n,row:i}=K(s),p=t.components[o.type]?.fields?.[n],d=i?b(p,i):p,m=R(d);if(!m)return null;const l=o.props??{};if(F(l)!==null||!i&&P(o.type,l,n)||i&&!(Array.isArray(l[n])&&i.index<l[n].length))return null;const x=i?w(l[n],i):l[n];return{node:o,selector:c,propKey:s,kind:m,stored:x,offPage:v(d)}}function G(e,t){const r=g(e,t);if(!r||r.offPage)return null;const{text:u,hidden:s}=k(r.stored);if(s)return null;const o=A(r.kind);return{partId:e,value:u,rules:S,multiline:o,offered:_(r.kind!=="plainText",o),write:c=>{const n=g(e,t);n&&C({node:n.node,propKey:n.propKey,kind:n.kind,zone:n.selector.zone,index:n.selector.index},c,t.replace)}}}function J(e,t,r){return e?.isConnected&&e.getAttribute(y)===r?e:t?.querySelector(`[${y}="${B(r)}"]`)??null}function B(e){return e.replace(/["\\]/g,"\\$&")}function Q(e){const t=e.activeElement;return t?t.tagName==="IFRAME"||!!t.closest(".es-canvas"):!1}let f=null;const a=new Set;function L(){return f}function X(e){if(e!==f){f=e;for(const t of a)t()}}function M(e){return a.add(e),()=>{a.delete(e)}}function Y(){return T(M,L,()=>null)}export{L as canvasTypingPart,Q as keysOnCanvas,J as partElement,_ as partTextTools,G as partTypingTarget,X as setCanvasTypingPart,M as subscribeCanvasTypingPart,Y as useCanvasTypingPart};
@@ -0,0 +1,6 @@
1
+ export declare function consentWordsKept(wordsRow: string): {
2
+ reachedBy: string;
3
+ type: "custom";
4
+ render: () => import("react").JSX.Element;
5
+ };
6
+ export declare function withConsentWordsRow<F extends Record<string, unknown>>(fields: F, props: Record<string, unknown> | undefined, wordsRow: string, dropped?: readonly string[]): F;
@@ -0,0 +1 @@
1
+ import{jsx as e}from"react/jsx-runtime";import{LockIcon as c}from"efficient-easel/icons";import{FieldText as u}from"efficient-easel/fields";import{SettingsField as d}from"efficient-easel/panel";import{NoControlMark as l,noControlField as p}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{CONSENT_WORDS_PROP as f,consentWordsOf as a}from"../../../format/lib/content/consent-banner.js";import{say as i}from"../../../format/lib/editor-words.js";function y(){return{type:"custom",render:({id:r,name:n})=>{const o=`${r??n??f}-words`;return e(d,{label:i("Words"),icon:e(c,{}),htmlFor:o,children:e(u,{id:o,value:i("Set by country"),onChange:()=>{},readOnly:!0})})}}}function b(r){return{...p({type:"custom",render:()=>e(l,{})},"always"),reachedBy:r}}function j(r,n,o,s=[]){return a(n)===null?r:Object.fromEntries(Object.entries(r).filter(([t])=>!s.includes(t)).map(([t,m])=>[t,t===o?y():m]))}export{b as consentWordsKept,j as withConsentWordsRow};