efficient-web-builder 19.1.0 → 21.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 (62) hide show
  1. package/CHANGELOG.md +163 -0
  2. package/dist/components/ChatSettingsPanel.js +1 -1
  3. package/dist/components/ContactLocations.js +3 -3
  4. package/dist/components/FAQ.js +1 -1
  5. package/dist/components/HeroPartPanel.d.ts +7 -0
  6. package/dist/components/HeroPartPanel.js +1 -0
  7. package/dist/components/HeroSingle.d.ts +10 -1
  8. package/dist/components/HeroSingle.js +11 -1
  9. package/dist/components/HeroVideoPlay.d.ts +13 -0
  10. package/dist/components/HeroVideoPlay.js +1 -0
  11. package/dist/components/PreviewChatContext.d.ts +8 -0
  12. package/dist/components/PreviewChatContext.js +1 -1
  13. package/dist/components/PreviewHeroPartContext.d.ts +3 -0
  14. package/dist/components/PreviewHeroPartContext.js +1 -0
  15. package/dist/components/PublishedPartStylesContext.js +1 -1
  16. package/dist/components/Reel.js +1 -1
  17. package/dist/components/SectionEditor.d.ts +10 -0
  18. package/dist/components/SectionEditor.js +1 -1
  19. package/dist/components/SectionIcon.js +1 -1
  20. package/dist/components/SiteFields.d.ts +3 -1
  21. package/dist/components/SiteFields.js +1 -1
  22. package/dist/components/StandaloneSectionEditor.js +1 -1
  23. package/dist/components/StorefrontEditor.js +1 -1
  24. package/dist/components/WebsiteScreenParts.js +1 -1
  25. package/dist/components/storefront-editor.css +7 -31
  26. package/dist/lib/content/chat-launcher.d.ts +9 -0
  27. package/dist/lib/content/chat-launcher.js +1 -0
  28. package/dist/lib/content/page-width.d.ts +1 -0
  29. package/dist/lib/content/page-width.js +1 -1
  30. package/dist/lib/editor-words-catalogue.d.ts +14 -2
  31. package/dist/lib/editor-words-catalogue.js +4 -4
  32. package/dist/lib/hero-arrows.d.ts +1 -1
  33. package/dist/lib/hero-media-layout.d.ts +11 -0
  34. package/dist/lib/hero-media-layout.js +1 -0
  35. package/dist/lib/hero-video.d.ts +15 -0
  36. package/dist/lib/hero-video.js +1 -0
  37. package/dist/lib/links/phone-href.d.ts +1 -0
  38. package/dist/lib/links/phone-href.js +1 -0
  39. package/dist/lib/markup.d.ts +5 -3
  40. package/dist/lib/markup.js +2 -2
  41. package/dist/lib/preview-header-settings.d.ts +1 -0
  42. package/dist/lib/puck/blocks/general/Hero/fields.js +1 -1
  43. package/dist/lib/puck/blocks/general/HeroSingle/fields.js +1 -1
  44. package/dist/lib/puck/blocks/general/HeroSingle/render.js +1 -1
  45. package/dist/lib/puck/blocks/general/HeroSlide/fields.js +1 -1
  46. package/dist/lib/puck/canvas-typing.d.ts +1 -2
  47. package/dist/lib/puck/controls.d.ts +44 -0
  48. package/dist/lib/puck/controls.js +1 -1
  49. package/dist/lib/puck/field-groups.js +1 -1
  50. package/dist/lib/puck/hero-media-parts.d.ts +42 -0
  51. package/dist/lib/puck/hero-media-parts.js +1 -0
  52. package/dist/lib/puck/media-manifest.json +3 -1
  53. package/dist/lib/puck/part-styles.js +2 -2
  54. package/dist/lib/puck/passes/settings-groups.js +1 -1
  55. package/dist/lib/reel.d.ts +3 -3
  56. package/dist/lib/reel.js +1 -1
  57. package/dist/lib/source-rules/one-markup-grammar.d.ts +5 -0
  58. package/dist/lib/source-rules/one-markup-grammar.js +4 -0
  59. package/dist/lib/source-rules/one-site-column.d.ts +6 -0
  60. package/dist/lib/source-rules/one-site-column.js +3 -0
  61. package/dist/lib/web-backend.d.ts +5 -0
  62. package/package.json +3 -3
@@ -1 +1 @@
1
- import{jsx as h,Fragment as t,jsxs as e}from"react/jsx-runtime";import{BlockBannerIcon as a,BlockBoxIcon as M,BlockButtonIcon as n,BlockDividerIcon as l,BlockFooterIcon as x,BlockHeadingIcon as g,BlockProductIcon as y,BlockSocialIcon as p,BlockTextIcon as w,ChatIcon as s,GridIcon as B,ImageIcon as k,PageIcon as u}from"efficient-easel/icons";import{CART_GLYPH as S}from"./cartGlyph.js";const L={header:e(t,{children:[h("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),h("path",{d:"M3 9.5h18"})]}),website:e(t,{children:[h("circle",{cx:"12",cy:"12",r:"9"}),h("path",{d:"M3 12h18M12 3c2.6 2.7 2.6 15.3 0 18M12 3c-2.6 2.7-2.6 15.3 0 18"})]}),social:e(t,{children:[h("circle",{cx:"6",cy:"12",r:"2.5"}),h("circle",{cx:"18",cy:"6",r:"2.5"}),h("circle",{cx:"18",cy:"18",r:"2.5"}),h("path",{d:"M8.2 10.8l7.6-3.6M8.2 13.2l7.6 3.6"})]}),ticker:e(t,{children:[h("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),h("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),FooterLogo:e(t,{children:[h("path",{d:"M4 15.5h6M4 18h4"}),h("path",{d:"M14 8.5l3 7 3-7"})]}),FooterMenu:h("path",{d:"M6 7h12M6 11h12M6 15h8M6 19h8"}),FooterGroup:e(t,{children:[h("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",strokeDasharray:"3 2.5"}),h("path",{d:"M8 9h8M8 13h8M8 16h5"})]}),FooterText:h("path",{d:"M5 7h14M5 12h14M5 17h9"}),FooterEmailSignup:e(t,{children:[h("rect",{x:"3",y:"6",width:"18",height:"12",rx:"2"}),h("path",{d:"M3.5 7l8.5 6 8.5-6"})]}),SearchBlock:e(t,{children:[h("circle",{cx:"11",cy:"11",r:"6"}),h("path",{d:"M20 20l-4.2-4.2"})]}),CartBlock:S,CountrySwitchBlock:e(t,{children:[h("circle",{cx:"12",cy:"12",r:"8.5"}),h("path",{d:"M3.5 12h17M12 3.5c2.6 2.4 3.6 5.2 3.6 8.5s-1 6.1-3.6 8.5M12 3.5c-2.6 2.4-3.6 5.2-3.6 8.5s1 6.1 3.6 8.5"})]}),LegalLineBlock:e(t,{children:[h("path",{d:"M3 9h18"}),h("path",{d:"M3 14h8M14 14h2M18 14h3"})]}),Hero:e(t,{children:[h("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),h("path",{d:"M7 13.5h7M7 16.5h10"})]}),HeroSlide:e(t,{children:[h("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),h("path",{d:"M7 15h6M16 9.5h.01M9.5 12l-2.5 3"})]}),HeroSingle:e(t,{children:[h("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),h("path",{d:"M10.5 8.5l4 2.5-4 2.5z"}),h("path",{d:"M7 17h7"})]}),Collections:e(t,{children:[h("rect",{x:"3",y:"5",width:"4.6",height:"14",rx:"1.3"}),h("rect",{x:"9.7",y:"5",width:"4.6",height:"14",rx:"1.3"}),h("rect",{x:"16.4",y:"5",width:"4.6",height:"14",rx:"1.3"})]}),CollectionCard:e(t,{children:[h("rect",{x:"6",y:"4",width:"12",height:"16",rx:"2"}),h("path",{d:"M9 15h6M9 17.5h4"})]}),AlloyWheelsListing:e(t,{children:[h("path",{d:"M3 5h5M3 9h5M3 13h5M3 17h5"}),h("rect",{x:"11.5",y:"5",width:"4.2",height:"5",rx:"1"}),h("rect",{x:"17.3",y:"5",width:"4.2",height:"5",rx:"1"}),h("rect",{x:"11.5",y:"12",width:"4.2",height:"5",rx:"1"}),h("rect",{x:"17.3",y:"12",width:"4.2",height:"5",rx:"1"})]}),CatalogFilterBar:e(t,{children:[h("path",{d:"M3 7h9M15.5 7H21"}),h("circle",{cx:"13.5",cy:"7",r:"1.7"}),h("path",{d:"M3 12h4M10.5 12H21"}),h("circle",{cx:"8.5",cy:"12",r:"1.7"}),h("path",{d:"M3 17h9M15.5 17H21"}),h("circle",{cx:"13.5",cy:"17",r:"1.7"})]}),ProductGrid:e(t,{children:[h("rect",{x:"3",y:"5",width:"4.8",height:"6",rx:"1"}),h("rect",{x:"9.6",y:"5",width:"4.8",height:"6",rx:"1"}),h("rect",{x:"16.2",y:"5",width:"4.8",height:"6",rx:"1"}),h("rect",{x:"3",y:"13",width:"4.8",height:"6",rx:"1"}),h("rect",{x:"9.6",y:"13",width:"4.8",height:"6",rx:"1"}),h("rect",{x:"16.2",y:"13",width:"4.8",height:"6",rx:"1"})]}),RelatedProducts:e(t,{children:[h("path",{d:"M3 5h10"}),h("rect",{x:"3",y:"9.5",width:"5",height:"9",rx:"1"}),h("rect",{x:"9.5",y:"9.5",width:"5",height:"9",rx:"1"}),h("rect",{x:"16",y:"9.5",width:"5",height:"9",rx:"1"})]}),Gallery:e(t,{children:[h("rect",{x:"3",y:"4",width:"11",height:"16",rx:"2"}),h("rect",{x:"15.5",y:"4",width:"5.5",height:"7.5",rx:"1.5"}),h("rect",{x:"15.5",y:"12.5",width:"5.5",height:"7.5",rx:"1.5"})]}),GalleryB:e(t,{children:[h("rect",{x:"3.5",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),h("rect",{x:"13",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),h("rect",{x:"3.5",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"}),h("rect",{x:"13",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"})]}),GalleryItem:e(t,{children:[h("rect",{x:"4",y:"5",width:"16",height:"14",rx:"2"}),h("circle",{cx:"9",cy:"10",r:"1.6"}),h("path",{d:"M20 15.5l-4.5-4L7 19"})]}),Events:e(t,{children:[h("rect",{x:"4",y:"5",width:"16",height:"15",rx:"2"}),h("path",{d:"M4 9.5h16M8.5 3v4M15.5 3v4M8 14h2M14 14h2"})]}),PostCard:e(t,{children:[h("rect",{x:"4",y:"3.5",width:"16",height:"17",rx:"2"}),h("rect",{x:"6.5",y:"6",width:"11",height:"6",rx:"1"}),h("path",{d:"M6.5 14.5h11M6.5 17.5h7"})]}),Manifesto:e(t,{children:[h("path",{d:"M7 8h3.2v4c0 1.6-1 2.6-3 3.2"}),h("path",{d:"M14 8h3.2v4c0 1.6-1 2.6-3 3.2"})]}),Stats:e(t,{children:[h("path",{d:"M3.5 20h17"}),h("path",{d:"M6 20v-7M11 20V7M16 20v-5M20.5 20v-9"})]}),Logos:e(t,{children:[h("circle",{cx:"6",cy:"12",r:"2.6"}),h("rect",{x:"10",y:"9.4",width:"5.2",height:"5.2",rx:"1.2"}),h("path",{d:"M19 9.2l2.4 5h-4.8z"})]}),Ticker:e(t,{children:[h("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),h("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),SectionHeader:e(t,{children:[h("rect",{x:"3.5",y:"6",width:"5",height:"5",rx:"1.2"}),h("path",{d:"M11 8.5h9M3.5 15.5h17"})]}),IntroBleed:e(t,{children:[h("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),h("path",{d:"M3 13.5h18M7 16.8h6"})]}),Split:e(t,{children:[h("rect",{x:"3",y:"5",width:"8",height:"14",rx:"1.5"}),h("path",{d:"M14 8.5h6M14 12h6M14 15.5h4"})]}),Eyebrow:e(t,{children:[h("path",{d:"M4 8.5h4.5M11 8.5h9"}),h("path",{d:"M4 14.5h16"})]}),HeroGroup:e(t,{children:[h("rect",{x:"3.5",y:"4.5",width:"17",height:"15",rx:"2"}),h("path",{d:"M7 9h8M7 12.5h10M7 16h6"})]}),Form:e(t,{children:[h("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),h("path",{d:"M6.5 9h11M6.5 12.5h11"}),h("rect",{x:"6.5",y:"15",width:"6.5",height:"2.6",rx:"1.3"})]}),LogoBlock:h(t,{children:h("path",{d:"M12 3.5l7.5 3.2v5.1c0 4.2-3.2 7.1-7.5 8.7-4.3-1.6-7.5-4.5-7.5-8.7V6.7z"})}),Spacer:e(t,{children:[h("path",{d:"M12 4v6M9.5 6.5L12 4l2.5 2.5M12 20v-6M9.5 17.5L12 20l2.5-2.5"}),h("path",{d:"M5 13h14",strokeDasharray:"2 2.5"})]}),ContactRouting:e(t,{children:[h("rect",{x:"3",y:"4",width:"5",height:"5",rx:"1"}),h("rect",{x:"9.5",y:"4",width:"5",height:"5",rx:"1"}),h("rect",{x:"16",y:"4",width:"5",height:"5",rx:"1"}),h("path",{d:"M4 13.5h11M4 17.5h7"}),h("path",{d:"M17 15l3 2-3 2"})]}),CustomHTML:h("path",{d:"M9 8l-4 4 4 4M15 8l4 4-4 4"})},F=h("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2.5"}),I={footer:x,Footer:x,Divider:l,FooterDivider:l,Banner:a,Flex:M,FooterSocial:p,page:u,chat:s,Heading:g,Text:w,ImageBlock:k,ButtonBlock:n,Grid:B,ProductRef:y},m={MenuBlock:"FooterMenu",EmailFormBlock:"FooterEmailSignup",SocialLogosBlock:"FooterSocial",SiteHeader:"header",SiteFooter:"footer"};function H({type:c,size:r=16,className:i}){const d=m[c]??c,o=I[d];return o?h(o,{size:r,className:i}):h("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",className:i,"aria-hidden":"true",children:L[d]??F})}export{H as default};
1
+ import{jsx as h,Fragment as t,jsxs as e}from"react/jsx-runtime";import{BlockBannerIcon as M,BlockBoxIcon as n,BlockButtonIcon as g,BlockDividerIcon as x,BlockFooterIcon as a,BlockHeadingIcon as y,BlockProductIcon as p,BlockSocialIcon as w,BlockTextIcon as s,ChatIcon as B,GridIcon as k,ImageIcon as c,MediaIcon as u,PageIcon as S}from"efficient-easel/icons";import{CART_GLYPH as I}from"./cartGlyph.js";const L={header:e(t,{children:[h("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),h("path",{d:"M3 9.5h18"})]}),website:e(t,{children:[h("circle",{cx:"12",cy:"12",r:"9"}),h("path",{d:"M3 12h18M12 3c2.6 2.7 2.6 15.3 0 18M12 3c-2.6 2.7-2.6 15.3 0 18"})]}),social:e(t,{children:[h("circle",{cx:"6",cy:"12",r:"2.5"}),h("circle",{cx:"18",cy:"6",r:"2.5"}),h("circle",{cx:"18",cy:"18",r:"2.5"}),h("path",{d:"M8.2 10.8l7.6-3.6M8.2 13.2l7.6 3.6"})]}),ticker:e(t,{children:[h("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),h("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),FooterLogo:e(t,{children:[h("path",{d:"M4 15.5h6M4 18h4"}),h("path",{d:"M14 8.5l3 7 3-7"})]}),FooterMenu:h("path",{d:"M6 7h12M6 11h12M6 15h8M6 19h8"}),FooterGroup:e(t,{children:[h("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",strokeDasharray:"3 2.5"}),h("path",{d:"M8 9h8M8 13h8M8 16h5"})]}),FooterText:h("path",{d:"M5 7h14M5 12h14M5 17h9"}),FooterEmailSignup:e(t,{children:[h("rect",{x:"3",y:"6",width:"18",height:"12",rx:"2"}),h("path",{d:"M3.5 7l8.5 6 8.5-6"})]}),SearchBlock:e(t,{children:[h("circle",{cx:"11",cy:"11",r:"6"}),h("path",{d:"M20 20l-4.2-4.2"})]}),CartBlock:I,CountrySwitchBlock:e(t,{children:[h("circle",{cx:"12",cy:"12",r:"8.5"}),h("path",{d:"M3.5 12h17M12 3.5c2.6 2.4 3.6 5.2 3.6 8.5s-1 6.1-3.6 8.5M12 3.5c-2.6 2.4-3.6 5.2-3.6 8.5s1 6.1 3.6 8.5"})]}),LegalLineBlock:e(t,{children:[h("path",{d:"M3 9h18"}),h("path",{d:"M3 14h8M14 14h2M18 14h3"})]}),Hero:e(t,{children:[h("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),h("path",{d:"M7 13.5h7M7 16.5h10"})]}),HeroSlide:e(t,{children:[h("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),h("path",{d:"M7 15h6M16 9.5h.01M9.5 12l-2.5 3"})]}),HeroSingle:e(t,{children:[h("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),h("path",{d:"M10.5 8.5l4 2.5-4 2.5z"}),h("path",{d:"M7 17h7"})]}),Collections:e(t,{children:[h("rect",{x:"3",y:"5",width:"4.6",height:"14",rx:"1.3"}),h("rect",{x:"9.7",y:"5",width:"4.6",height:"14",rx:"1.3"}),h("rect",{x:"16.4",y:"5",width:"4.6",height:"14",rx:"1.3"})]}),CollectionCard:e(t,{children:[h("rect",{x:"6",y:"4",width:"12",height:"16",rx:"2"}),h("path",{d:"M9 15h6M9 17.5h4"})]}),AlloyWheelsListing:e(t,{children:[h("path",{d:"M3 5h5M3 9h5M3 13h5M3 17h5"}),h("rect",{x:"11.5",y:"5",width:"4.2",height:"5",rx:"1"}),h("rect",{x:"17.3",y:"5",width:"4.2",height:"5",rx:"1"}),h("rect",{x:"11.5",y:"12",width:"4.2",height:"5",rx:"1"}),h("rect",{x:"17.3",y:"12",width:"4.2",height:"5",rx:"1"})]}),CatalogFilterBar:e(t,{children:[h("path",{d:"M3 7h9M15.5 7H21"}),h("circle",{cx:"13.5",cy:"7",r:"1.7"}),h("path",{d:"M3 12h4M10.5 12H21"}),h("circle",{cx:"8.5",cy:"12",r:"1.7"}),h("path",{d:"M3 17h9M15.5 17H21"}),h("circle",{cx:"13.5",cy:"17",r:"1.7"})]}),ProductGrid:e(t,{children:[h("rect",{x:"3",y:"5",width:"4.8",height:"6",rx:"1"}),h("rect",{x:"9.6",y:"5",width:"4.8",height:"6",rx:"1"}),h("rect",{x:"16.2",y:"5",width:"4.8",height:"6",rx:"1"}),h("rect",{x:"3",y:"13",width:"4.8",height:"6",rx:"1"}),h("rect",{x:"9.6",y:"13",width:"4.8",height:"6",rx:"1"}),h("rect",{x:"16.2",y:"13",width:"4.8",height:"6",rx:"1"})]}),RelatedProducts:e(t,{children:[h("path",{d:"M3 5h10"}),h("rect",{x:"3",y:"9.5",width:"5",height:"9",rx:"1"}),h("rect",{x:"9.5",y:"9.5",width:"5",height:"9",rx:"1"}),h("rect",{x:"16",y:"9.5",width:"5",height:"9",rx:"1"})]}),Gallery:e(t,{children:[h("rect",{x:"3",y:"4",width:"11",height:"16",rx:"2"}),h("rect",{x:"15.5",y:"4",width:"5.5",height:"7.5",rx:"1.5"}),h("rect",{x:"15.5",y:"12.5",width:"5.5",height:"7.5",rx:"1.5"})]}),GalleryB:e(t,{children:[h("rect",{x:"3.5",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),h("rect",{x:"13",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),h("rect",{x:"3.5",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"}),h("rect",{x:"13",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"})]}),GalleryItem:e(t,{children:[h("rect",{x:"4",y:"5",width:"16",height:"14",rx:"2"}),h("circle",{cx:"9",cy:"10",r:"1.6"}),h("path",{d:"M20 15.5l-4.5-4L7 19"})]}),Events:e(t,{children:[h("rect",{x:"4",y:"5",width:"16",height:"15",rx:"2"}),h("path",{d:"M4 9.5h16M8.5 3v4M15.5 3v4M8 14h2M14 14h2"})]}),PostCard:e(t,{children:[h("rect",{x:"4",y:"3.5",width:"16",height:"17",rx:"2"}),h("rect",{x:"6.5",y:"6",width:"11",height:"6",rx:"1"}),h("path",{d:"M6.5 14.5h11M6.5 17.5h7"})]}),Manifesto:e(t,{children:[h("path",{d:"M7 8h3.2v4c0 1.6-1 2.6-3 3.2"}),h("path",{d:"M14 8h3.2v4c0 1.6-1 2.6-3 3.2"})]}),Stats:e(t,{children:[h("path",{d:"M3.5 20h17"}),h("path",{d:"M6 20v-7M11 20V7M16 20v-5M20.5 20v-9"})]}),Logos:e(t,{children:[h("circle",{cx:"6",cy:"12",r:"2.6"}),h("rect",{x:"10",y:"9.4",width:"5.2",height:"5.2",rx:"1.2"}),h("path",{d:"M19 9.2l2.4 5h-4.8z"})]}),Ticker:e(t,{children:[h("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),h("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),SectionHeader:e(t,{children:[h("rect",{x:"3.5",y:"6",width:"5",height:"5",rx:"1.2"}),h("path",{d:"M11 8.5h9M3.5 15.5h17"})]}),IntroBleed:e(t,{children:[h("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),h("path",{d:"M3 13.5h18M7 16.8h6"})]}),Split:e(t,{children:[h("rect",{x:"3",y:"5",width:"8",height:"14",rx:"1.5"}),h("path",{d:"M14 8.5h6M14 12h6M14 15.5h4"})]}),Eyebrow:e(t,{children:[h("path",{d:"M4 8.5h4.5M11 8.5h9"}),h("path",{d:"M4 14.5h16"})]}),HeroGroup:e(t,{children:[h("rect",{x:"3.5",y:"4.5",width:"17",height:"15",rx:"2"}),h("path",{d:"M7 9h8M7 12.5h10M7 16h6"})]}),Form:e(t,{children:[h("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),h("path",{d:"M6.5 9h11M6.5 12.5h11"}),h("rect",{x:"6.5",y:"15",width:"6.5",height:"2.6",rx:"1.3"})]}),LogoBlock:h(t,{children:h("path",{d:"M12 3.5l7.5 3.2v5.1c0 4.2-3.2 7.1-7.5 8.7-4.3-1.6-7.5-4.5-7.5-8.7V6.7z"})}),Spacer:e(t,{children:[h("path",{d:"M12 4v6M9.5 6.5L12 4l2.5 2.5M12 20v-6M9.5 17.5L12 20l2.5-2.5"}),h("path",{d:"M5 13h14",strokeDasharray:"2 2.5"})]}),ContactRouting:e(t,{children:[h("rect",{x:"3",y:"4",width:"5",height:"5",rx:"1"}),h("rect",{x:"9.5",y:"4",width:"5",height:"5",rx:"1"}),h("rect",{x:"16",y:"4",width:"5",height:"5",rx:"1"}),h("path",{d:"M4 13.5h11M4 17.5h7"}),h("path",{d:"M17 15l3 2-3 2"})]}),CustomHTML:h("path",{d:"M9 8l-4 4 4 4M15 8l4 4-4 4"})},m=h("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2.5"}),F={footer:a,Footer:a,Divider:x,FooterDivider:x,Banner:M,Flex:n,FooterSocial:w,page:S,chat:B,Heading:y,Text:s,ImageBlock:c,ButtonBlock:g,Grid:k,ProductRef:p,heroMedia:u,heroImage:c,heroImage2:c},H={MenuBlock:"FooterMenu",EmailFormBlock:"FooterEmailSignup",SocialLogosBlock:"FooterSocial",SiteHeader:"header",SiteFooter:"footer"};function v({type:i,size:r=16,className:d}){const o=H[i]??i,l=F[o];return l?h(l,{size:r,className:d}):h("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",className:d,"aria-hidden":"true",children:L[o]??m})}export{v as default};
@@ -1,7 +1,9 @@
1
1
  import { type ReactNode } from "react";
2
2
  import { type SettingsBucket } from "efficient-easel/fields";
3
+ import { type HeroMediaPart } from "../lib/puck/hero-media-parts.js";
3
4
  export declare const TAB_ICONS: Record<SettingsBucket, ReactNode>;
4
- export declare function SiteFields({ entries, entryCount }: {
5
+ export declare function SiteFields({ entries, entryCount, part, }: {
5
6
  entries?: ReactNode;
6
7
  entryCount?: number;
8
+ part?: HeroMediaPart | null;
7
9
  }): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as E}from"react/jsx-runtime";import{useLayoutEffect as j,useMemo as C,useRef as L,useState as T}from"react";import{useEasel as q,useSelectedFields as P}from"efficient-easel/easel";import{Inspector as R,planFields as F}from"efficient-easel/fields";import{BUCKET_ICONS as U,entriesHiddenForTab as X}from"../lib/puck/controls.js";import{BUCKETS as G}from"../lib/puck/field-groups.js";import{say as H}from"../lib/editor-words.js";import{usePreviewDevice as W}from"./PreviewDeviceContext.js";import{showWhenContext as Y,visibleFields as z}from"../lib/puck/show-when.js";import{bandIsDropped as J,droppedBands as Q,sameKeys as V,TEXT_BAND_KEY as v,TEXT_BAND_TITLE as Z,withoutBands as $}from"../lib/puck/panel-bands.js";const g=new Map,f=new Set;function ee(o,r){const n=new Map;for(const s of o.querySelectorAll(".es-insp-row[data-field]"))n.set(s.getAttribute("data-field")??"",s);const a=[];for(const[s,m]of r)a.push({key:s,rows:m.map(p=>{const l=n.get(p),d=!!l&&[...l.children].some(b=>!b.hidden),w=l?.querySelector(".es-field-label, .es-list-label")?.textContent?.trim();return{shown:d,labelled:d&&!!w}})});return a}const te=Object.fromEntries(G.map(o=>{const r=U[o];return[o,E(r,{},o)]}));function fe({entries:o,entryCount:r=0}){const{id:n,fields:a,values:s,readOnly:m,onChange:p}=P(),l=W(),{appState:d,config:w}=q(e=>e),b=Y(l,w,d.data.content??[],d.ui.itemSelector),c=z(a,s,b),[_,A]=T(()=>new Set(f)),[x,I]=T(()=>new Set),B=L(null),M=C(()=>{const e=new Map;for(const t of F(c).rows){if(!t.fold)continue;const i=e.get(t.fold.key)??[];i.push(t.name),e.set(t.fold.key,i)}return e},[c]);j(()=>{const e=B.current?.parentElement;if(!e)return;const t=new Set(Q(ee(e,M)));I(i=>V(i,t)?i:t)});const D=C(()=>$(c,x),[c,x]),N={key:v,rows:Array.from({length:r},()=>({shown:!0,labelled:!0}))},O=J(N)?void 0:{key:v,title:Z},[h,k]=T(()=>g.get(n)),y=g.get(n),u=F(c).buckets,S=y&&u.includes(y)?y:h&&u.includes(h)?h:u[0],K=S===void 0||X(u,S)!==!0;return E(R,{fields:D,values:s,onChange:p,readOnly:m,tab:S,onTab:e=>{g.set(n,e),k(e)},tabIcons:te,idPrefix:n,ariaLabel:H("Section settings"),lead:K?o:null,leadFold:O,closedFolds:_,onFold:(e,t)=>{t?f.delete(e):f.add(e),A(new Set(f))},children:E("span",{ref:B,hidden:!0})})}export{fe as SiteFields,te as TAB_ICONS};
1
+ "use client";import{jsx as E}from"react/jsx-runtime";import{useLayoutEffect as P,useMemo as C,useRef as q,useState as T}from"react";import{useEasel as R,useSelectedFields as U}from"efficient-easel/easel";import{Inspector as X,planFields as F}from"efficient-easel/fields";import{BUCKET_ICONS as G,entriesHiddenForTab as H}from"../lib/puck/controls.js";import{BUCKETS as W}from"../lib/puck/field-groups.js";import{say as Y}from"../lib/editor-words.js";import{usePreviewDevice as z}from"./PreviewDeviceContext.js";import{showWhenContext as J,visibleFields as Q}from"../lib/puck/show-when.js";import{fieldsOfPart as V}from"../lib/puck/hero-media-parts.js";import{bandIsDropped as Z,droppedBands as $,sameKeys as ee,TEXT_BAND_KEY as v,TEXT_BAND_TITLE as te,withoutBands as oe}from"../lib/puck/panel-bands.js";const g=new Map,p=new Set;function ne(o,r){const c=new Map;for(const s of o.querySelectorAll(".es-insp-row[data-field]"))c.set(s.getAttribute("data-field")??"",s);const n=[];for(const[s,a]of r)n.push({key:s,rows:a.map(w=>{const l=c.get(w),f=!!l&&[...l.children].some(b=>!b.hidden),u=l?.querySelector(".es-field-label, .es-list-label")?.textContent?.trim();return{shown:f,labelled:f&&!!u}})});return n}const se=Object.fromEntries(W.map(o=>{const r=G[o];return[o,E(r,{},o)]}));function be({entries:o,entryCount:r=0,part:c=null}){const{id:n,fields:s,values:a,readOnly:w,onChange:l}=U(),f=z(),{appState:u,config:b}=R(e=>e),_=J(f,b,u.data.content??[],u.ui.itemSelector),A=V(s,c),d=Q(A,a,_),[I,M]=T(()=>new Set(p)),[x,O]=T(()=>new Set),B=q(null),D=C(()=>{const e=new Map;for(const t of F(d).rows){if(!t.fold)continue;const i=e.get(t.fold.key)??[];i.push(t.name),e.set(t.fold.key,i)}return e},[d]);P(()=>{const e=B.current?.parentElement;if(!e)return;const t=new Set($(ne(e,D)));O(i=>ee(i,t)?i:t)});const N=C(()=>oe(d,x),[d,x]),k={key:v,rows:Array.from({length:r},()=>({shown:!0,labelled:!0}))},K=Z(k)?void 0:{key:v,title:te},[h,j]=T(()=>g.get(n)),y=g.get(n),m=F(d).buckets,S=y&&m.includes(y)?y:h&&m.includes(h)?h:m[0],L=S===void 0||H(m,S)!==!0;return E(X,{fields:N,values:a,onChange:l,readOnly:w,tab:S,onTab:e=>{g.set(n,e),j(e)},tabIcons:se,idPrefix:n,ariaLabel:Y("Section settings"),lead:L?o:null,leadFold:K,closedFolds:I,onFold:(e,t)=>{t?p.delete(e):p.add(e),M(new Set(p))},children:E("span",{ref:B,hidden:!0})})}export{be as SiteFields,se as TAB_ICONS};
@@ -1 +1 @@
1
- "use client";import{jsx as o}from"react/jsx-runtime";import{useCallback as R,useEffect as S,useMemo as l,useRef as V,useState as u}from"react";import x from"next/dynamic";import"efficient-easel/easel.css";import"efficient-easel/shell.css";import"efficient-easel/rail.css";import"efficient-easel/panel.css";import"efficient-easel/fields.css";import"efficient-easel/pick.css";import"efficient-easel/copy.css";import"efficient-easel/gold.css";import"efficient-easel/text-styles.css";import"efficient-easel/menu.css";import"efficient-easel/chrome.css";import"efficient-easel/tree.css";import"efficient-easel/screen.css";import"./storefront-editor.css";import{buildConfig as X}from"../lib/puck/build-config.js";import{withTemplateMediaPlaceholders as Z}from"../lib/puck/templateFields.js";import{setEditorPageSlug as B}from"../lib/puck/editor-page-context.js";import{StorefrontDocumentContext as $}from"./StorefrontDocumentContext.js";import{PreviewHeaderProvider as ee}from"./PreviewHeaderContext.js";import{PreviewTickerProvider as te}from"./PreviewTickerContext.js";import{PreviewPartsProvider as re}from"./PreviewPartsContext.js";import{PreviewLocationPartProvider as oe}from"./PreviewLocationPartContext.js";import{PreviewPartStyleProvider as ie}from"./PreviewPartStyleContext.js";import{sectionTemplates as O}from"../lib/editor-section-templates.js";import{nodeToDoc as ne,docToNode as F}from"../lib/puck/section-doc.js";import{newNodeId as se}from"../lib/puck/content-tree.js";import{migrateRenamedProps as de}from"../lib/puck/renamed-props.js";import{buildSlotSeedChildren as ae}from"../lib/puck/slot-specs.js";import{FOOTER_TYPE as ce,buildDefaultFooterBlocks as me}from"../lib/puck/footer-blocks.js";import{NO_BRIDGED_CAPABILITIES as le,useAdminBridge as ue}from"../lib/editor-admin-bridge.js";import{useEditorHost as fe}from"../lib/editor-host.js";import{ChromeWrap as pe}from"../lib/editor-chrome.js";import{sessionRegistry as ve}from"../lib/editor-session.js";import{useEditorSession as ge}from"../lib/editor-session-context.js";import{say as H}from"../lib/editor-words.js";import{retargetWhenSaved as he}from"../lib/section-retarget.js";import{routeSharedHostMessage as Se}from"../lib/editor-host-inbound.js";import{routeWebsiteHostMessage as Pe}from"../lib/website-host-inbound.js";import{DEFAULT_THEME_MODE as P,THEME_MODE_KEY as Ee}from"../lib/theme.js";import{makeSitePageAdapter as L}from"../lib/editor-document-adapter.js";import{documentPermissions as ye}from"efficient-easel/edit-lock";import{useAutosave as Te}from"efficient-easel/autosave";import{saveStatusOf as we}from"../lib/puck/pinned-seed-gate.js";import{blocksOf as Ne}from"../lib/website-session.js";const ke=x(()=>import("./SiteEditorProvider.js"),{ssr:!1}),Ae=x(()=>import("./SectionEditorShell.js"),{ssr:!1}),U="HeroSingle",W="Untitled section";function Ce(i,E){const d=E.components,r=d[i]?i:U,y=d[r]?.defaultProps??{},n=ae(r,f=>d[f]?.defaultProps??{}),s=r===ce?{blocks:me()}:null;return{type:r,props:{id:se(r),...y,...n?{[n.slot]:n.children}:null,...s}}}function Ie(){if(typeof window>"u")return P;try{const i=window.localStorage.getItem(Ee);return i==="light"||i==="dark"||i==="auto"?i:P}catch{return P}}function Oe({id:i,initialType:E,initialName:d=W}){const[r,y]=u(i),n=V(r);S(()=>{n.current=r},[r]);const s=fe(),[f,Y]=u(E),[b,j]=u(d),[a,T]=u(void 0),[K,G]=u(P),{token:w,tokenRef:M}=ue({onMessage:e=>{if(Pe(e)||Se(e))return;const t=e;if(t?.type==="storefront-editor:navigate"&&t.target?.kind==="section"&&t.target.id){const I=t.target.id;if(I===n.current)return;const J=t.target.type,Q=t.target.name;he(k,()=>{Y(J),j(Q||W),y(I),s.address.show({kind:"section",id:I})},()=>s.send("storefront-editor:save-failed"))}}}),N=Te({save:e=>O.update(e.id,e.node).then(()=>{}),onFailure:(e,t)=>{t===0&&s.send("storefront-editor:save-failed")}}),{state:p,push:_,flush:k}=N;S(()=>G(Ie()),[]);const c=ge(),v=c.usesBridgedToken?!!w:!0,g=l(()=>X(ve(c),Ne(c)),[c]);S(()=>{if(!v)return;let e=!1;return T(void 0),O.ensure(r,b,Ce(f??U,g)).then(t=>!e&&T(t.node)).catch(()=>!e&&T(null)),()=>{e=!0}},[r,f,b,v,g]);const A=R(e=>{s.send("storefront-editor:dirty");const t=F(e);t&&_({id:n.current,node:t})},[_,s]),h=s.send,D=R(async e=>{try{return await e(M.current??""),!0}catch{return h("storefront-editor:save-failed"),!1}},[h]),q=l(()=>Z(g,!0),[g]);S(()=>(B(null),()=>B(null)),[]);const m=l(()=>a?de(ne(a)):null,[a]),C=l(()=>({target:{kind:"page",slug:""},adapter:L(void 0),capabilities:L(void 0).capabilities,templateId:null,currentSlug:"",currentKind:null,siteId:null,ready:v,token:w,tokenRef:M,notifyParent:h,runAuthed:D,docId:r,data:m,getLiveData:()=>m,footerOriginSlug:null,error:null,redirecting:!1,saveStatus:we(p),saveState:p,autoSaveEnabled:!0,autoSaveStoppedByConflict:!1,hasUnsavedEdits:p.pending,toggleAutoSave:()=>{},retrySave:()=>{N.retryNow()},onChange:A,flushSave:k,onPublish:async e=>{const t=F(e);t&&await O.update(n.current,t)},bridgeCapabilities:le,access:{kind:"editing"},readOnly:!1,takeOverEditing:()=>{},viewReadOnly:()=>{},saveConflict:null,reloadFromServer:()=>{},navigate:()=>{},pendingNav:null,cancelPendingNav:()=>{},discardAndNavigate:()=>{},saveAndNavigate:async()=>{}}),[r,v,w,h,D,m,p,A,k,N.retryNow]),z=l(()=>ye(!C.readOnly),[C.readOnly]);return a===void 0?o("div",{className:"sf-msg",children:H("Loading…")}):a===null||!m?o("div",{className:"sf-msg sf-msg--error",children:H("Couldn’t open this section.")}):o($.Provider,{value:C,children:o(ee,{themeMode:K,chromePlaceholder:!0,children:o(pe,{wrap:c.chrome?.wrap,surface:"section",children:o(te,{children:o(re,{children:o(oe,{children:o(ie,{children:o(ke,{config:q,data:m,onChange:A,permissions:z,children:o(Ae,{})},r)})})})})})})})}export{Oe as default};
1
+ "use client";import{jsx as o}from"react/jsx-runtime";import{useCallback as H,useEffect as P,useMemo as l,useRef as V,useState as u}from"react";import R from"next/dynamic";import"efficient-easel/easel.css";import"efficient-easel/shell.css";import"efficient-easel/rail.css";import"efficient-easel/panel.css";import"efficient-easel/fields.css";import"efficient-easel/pick.css";import"efficient-easel/copy.css";import"efficient-easel/gold.css";import"efficient-easel/text-styles.css";import"efficient-easel/menu.css";import"efficient-easel/chrome.css";import"efficient-easel/tree.css";import"efficient-easel/screen.css";import"./storefront-editor.css";import{buildConfig as X}from"../lib/puck/build-config.js";import{withTemplateMediaPlaceholders as Z}from"../lib/puck/templateFields.js";import{setEditorPageSlug as x}from"../lib/puck/editor-page-context.js";import{StorefrontDocumentContext as $}from"./StorefrontDocumentContext.js";import{PreviewHeaderProvider as ee}from"./PreviewHeaderContext.js";import{PreviewTickerProvider as te}from"./PreviewTickerContext.js";import{PreviewHeroPartProvider as re}from"./PreviewHeroPartContext.js";import{PreviewPartsProvider as oe}from"./PreviewPartsContext.js";import{PreviewLocationPartProvider as ie}from"./PreviewLocationPartContext.js";import{PreviewPartStyleProvider as ne}from"./PreviewPartStyleContext.js";import{sectionTemplates as O}from"../lib/editor-section-templates.js";import{nodeToDoc as se,docToNode as B}from"../lib/puck/section-doc.js";import{newNodeId as de}from"../lib/puck/content-tree.js";import{migrateRenamedProps as ae}from"../lib/puck/renamed-props.js";import{buildSlotSeedChildren as ce}from"../lib/puck/slot-specs.js";import{FOOTER_TYPE as me,buildDefaultFooterBlocks as le}from"../lib/puck/footer-blocks.js";import{NO_BRIDGED_CAPABILITIES as ue,useAdminBridge as fe}from"../lib/editor-admin-bridge.js";import{useEditorHost as pe}from"../lib/editor-host.js";import{ChromeWrap as ve}from"../lib/editor-chrome.js";import{sessionRegistry as ge}from"../lib/editor-session.js";import{useEditorSession as he}from"../lib/editor-session-context.js";import{say as F}from"../lib/editor-words.js";import{retargetWhenSaved as Pe}from"../lib/section-retarget.js";import{routeSharedHostMessage as Se}from"../lib/editor-host-inbound.js";import{routeWebsiteHostMessage as Ee}from"../lib/website-host-inbound.js";import{DEFAULT_THEME_MODE as S,THEME_MODE_KEY as ye}from"../lib/theme.js";import{makeSitePageAdapter as L}from"../lib/editor-document-adapter.js";import{documentPermissions as Te}from"efficient-easel/edit-lock";import{useAutosave as we}from"efficient-easel/autosave";import{saveStatusOf as Ne}from"../lib/puck/pinned-seed-gate.js";import{blocksOf as ke}from"../lib/website-session.js";const Ae=R(()=>import("./SiteEditorProvider.js"),{ssr:!1}),Ce=R(()=>import("./SectionEditorShell.js"),{ssr:!1}),U="HeroSingle",W="Untitled section";function Ie(i,E){const d=E.components,r=d[i]?i:U,y=d[r]?.defaultProps??{},n=ce(r,f=>d[f]?.defaultProps??{}),s=r===me?{blocks:le()}:null;return{type:r,props:{id:de(r),...y,...n?{[n.slot]:n.children}:null,...s}}}function Oe(){if(typeof window>"u")return S;try{const i=window.localStorage.getItem(ye);return i==="light"||i==="dark"||i==="auto"?i:S}catch{return S}}function be({id:i,initialType:E,initialName:d=W}){const[r,y]=u(i),n=V(r);P(()=>{n.current=r},[r]);const s=pe(),[f,Y]=u(E),[b,j]=u(d),[a,T]=u(void 0),[K,G]=u(S),{token:w,tokenRef:M}=fe({onMessage:e=>{if(Ee(e)||Se(e))return;const t=e;if(t?.type==="storefront-editor:navigate"&&t.target?.kind==="section"&&t.target.id){const I=t.target.id;if(I===n.current)return;const J=t.target.type,Q=t.target.name;Pe(k,()=>{Y(J),j(Q||W),y(I),s.address.show({kind:"section",id:I})},()=>s.send("storefront-editor:save-failed"))}}}),N=we({save:e=>O.update(e.id,e.node).then(()=>{}),onFailure:(e,t)=>{t===0&&s.send("storefront-editor:save-failed")}}),{state:p,push:_,flush:k}=N;P(()=>G(Oe()),[]);const c=he(),v=c.usesBridgedToken?!!w:!0,g=l(()=>X(ge(c),ke(c)),[c]);P(()=>{if(!v)return;let e=!1;return T(void 0),O.ensure(r,b,Ie(f??U,g)).then(t=>!e&&T(t.node)).catch(()=>!e&&T(null)),()=>{e=!0}},[r,f,b,v,g]);const A=H(e=>{s.send("storefront-editor:dirty");const t=B(e);t&&_({id:n.current,node:t})},[_,s]),h=s.send,D=H(async e=>{try{return await e(M.current??""),!0}catch{return h("storefront-editor:save-failed"),!1}},[h]),q=l(()=>Z(g,!0),[g]);P(()=>(x(null),()=>x(null)),[]);const m=l(()=>a?ae(se(a)):null,[a]),C=l(()=>({target:{kind:"page",slug:""},adapter:L(void 0),capabilities:L(void 0).capabilities,templateId:null,currentSlug:"",currentKind:null,siteId:null,ready:v,token:w,tokenRef:M,notifyParent:h,runAuthed:D,docId:r,data:m,getLiveData:()=>m,footerOriginSlug:null,error:null,redirecting:!1,saveStatus:Ne(p),saveState:p,autoSaveEnabled:!0,autoSaveStoppedByConflict:!1,hasUnsavedEdits:p.pending,toggleAutoSave:()=>{},retrySave:()=>{N.retryNow()},onChange:A,flushSave:k,onPublish:async e=>{const t=B(e);t&&await O.update(n.current,t)},bridgeCapabilities:ue,access:{kind:"editing"},readOnly:!1,takeOverEditing:()=>{},viewReadOnly:()=>{},saveConflict:null,reloadFromServer:()=>{},navigate:()=>{},pendingNav:null,cancelPendingNav:()=>{},discardAndNavigate:()=>{},saveAndNavigate:async()=>{}}),[r,v,w,h,D,m,p,A,k,N.retryNow]),z=l(()=>Te(!C.readOnly),[C.readOnly]);return a===void 0?o("div",{className:"sf-msg",children:F("Loading…")}):a===null||!m?o("div",{className:"sf-msg sf-msg--error",children:F("Couldn’t open this section.")}):o($.Provider,{value:C,children:o(ee,{themeMode:K,chromePlaceholder:!0,children:o(ve,{wrap:c.chrome?.wrap,surface:"section",children:o(te,{children:o(re,{children:o(oe,{children:o(ie,{children:o(ne,{children:o(Ae,{config:q,data:m,onChange:A,permissions:z,children:o(Ce,{})},r)})})})})})})})})}export{be as default};
@@ -1 +1 @@
1
- "use client";import{jsx as u,jsxs as it}from"react/jsx-runtime";import{useCallback as a,useEffect as p,useMemo as M,useRef as S,useState as r}from"react";import"efficient-easel/easel.css";import"efficient-easel/shell.css";import"efficient-easel/rail.css";import"efficient-easel/panel.css";import"efficient-easel/fields.css";import"efficient-easel/pick.css";import"efficient-easel/copy.css";import"efficient-easel/gold.css";import"efficient-easel/text-styles.css";import"efficient-easel/menu.css";import"efficient-easel/chrome.css";import"efficient-easel/tree.css";import"efficient-easel/drag.css";import"efficient-easel/screen.css";import"./storefront-editor.css";import{buildConfig as ct}from"../lib/puck/build-config.js";import{ChromeWrap as st}from"../lib/editor-chrome.js";import{sessionRegistry as dt}from"../lib/editor-session.js";import{backendOf as G,blocksOf as ut}from"../lib/website-session.js";import{useEditorSession as ht}from"../lib/editor-session-context.js";import{withSiteBlockGapFields as lt}from"../lib/puck/site-gap-fields.js";import{withTemplateMediaPlaceholders as mt}from"../lib/puck/templateFields.js";import{setEditorPage as de}from"../lib/puck/editor-page-context.js";import{resolveSiteName as pt}from"../lib/content/site-name.js";import{normalizeSiteGutter as St,normalizeSiteWidth as ft}from"../lib/content/page-width.js";import{normalizeSiteBlockGap as gt}from"../lib/content/container-gap.js";import wt,{DocumentScreen as Ct}from"./EditorScreenMount.js";import{useStorefrontDocument as Tt}from"./StorefrontDocumentContext.js";import{PreviewHeaderProvider as _t}from"./PreviewHeaderContext.js";import{PreviewFooterProvider as Et}from"./PreviewFooterContext.js";import{PreviewChatProvider as yt,DEFAULT_CHAT_PREVIEW as Pt}from"./PreviewChatContext.js";import{PreviewSocialProvider as vt}from"./PreviewSocialContext.js";import{useSocialSettings as Ht}from"./useSocialSettings.js";import{PreviewSurfaceProvider as It}from"./PreviewSurfaceContext.js";import{WEBSITE_ADDRESSING as Mt}from"../lib/website-document-addressing.js";import{PreviewTickerProvider as Gt}from"./PreviewTickerContext.js";import{PreviewPartsProvider as Rt}from"./PreviewPartsContext.js";import{PreviewLocationPartProvider as kt}from"./PreviewLocationPartContext.js";import{PreviewPartStyleProvider as At}from"./PreviewPartStyleContext.js";import{SiteMapsProvider as Dt,readSiteMapsKey as Ft,writeSiteMapsKey as ue,readSiteMapId as Wt,writeSiteMapId as xt}from"../lib/maps-config.js";import{CORNER_STYLE_TO_PX as Bt,DEFAULT_HEADING_COMPRESSION as Nt,DEFAULT_HEADING_TYPOGRAPHY as bt,DEFAULT_SWITCH_SHOWN as R,DEFAULT_SIZES as Ot,DEFAULT_THEME_MODE as C,normalizeCornerRadius as zt,normalizeCornerStyle as Kt,normalizeCardShadow as Lt,normalizeCardGap as Yt,normalizeHoverEffect as Ut,normalizeShadowColor as jt,IDENTITY_CARD_GAP as he,IDENTITY_CARD_SHADOW as Vt,IDENTITY_HOVER_EFFECT as Xt,THEME_MODE_KEY as le,THEME_STORAGE_KEY as Zt,THEME_SWITCH_HIDE as me,THEME_SWITCH_KEY as k}from"../lib/theme.js";import{DEFAULT_FONTS as qt}from"../lib/fonts.js";import{WEBSITE_SCREEN as Jt}from"./WebsiteScreenParts.js";import{routeWebsiteHostMessage as Qt}from"../lib/website-host-inbound.js";import{siteTextFromRow as $t}from"../lib/site-text-styles.js";const er=()=>{if(typeof window>"u")return C;try{const i=window.localStorage.getItem(le);return i==="light"||i==="dark"||i==="auto"?i:C}catch{return C}},pe=i=>{if(!(typeof window>"u"))try{window.localStorage.setItem(le,i)}catch{}},tr=()=>{if(typeof window>"u")return R;try{return window.localStorage.getItem(k)!==me}catch{return R}},rr=()=>{if(!(typeof window>"u"))try{window.localStorage.removeItem(Zt)}catch{}},Se=i=>{if(!(typeof window>"u"))try{i?window.localStorage.removeItem(k):window.localStorage.setItem(k,me)}catch{}};function or(){const{adapter:i,capabilities:s,templateId:A,ready:f,token:l,siteId:c,currentSlug:D,currentKind:F}=Tt();p(()=>(de(D,F),()=>de(null,null)),[D,F]);const T=s.placeholderFrames,[fe,W]=r(null),[ge,x]=r("");p(()=>{const e=i.templateName;if(!f||!A||!e){x("");return}let o=!1;return e().then(d=>!o&&x(d??"")).catch(()=>{}),()=>{o=!0}},[f,l,A,i]);const[we,_]=r(C),[Ce,E]=r(R),[Te,B]=r({selected:0,themes:[]}),[_e,N]=r(qt),[Ee,b]=r(Ot),[ye,O]=r(null),[Pe,z]=r(Nt),[ve,K]=r(null),[He,L]=r(null),[Ie,Y]=r(he),[Me,U]=r(null),[Ge,j]=r(null),[Re,V]=r(null),[y,X]=r(null),h=ht(),Z=M(()=>ct(dt(h),ut(h)),[h]),ke=M(()=>lt(mt(Z,T),y),[Z,T,y]),[Ae,q]=r(bt),[De,J]=r(null),[Fe,Q]=r(null),[We,$]=r(null),ee=S(null),n=S(!1);p(()=>{_(er()),E(tr())},[]);const xe=a(e=>{n.current=!0,rr(),pe(e),_(e)},[]),Be=a(e=>{n.current=!0,Se(e),E(e)},[]),Ne=a(e=>{n.current=!0,B(e)},[]),be=a(e=>{n.current=!0,N(e)},[]),Oe=a(e=>{n.current=!0,b(e)},[]),ze=a(e=>{n.current=!0,O(e)},[]),Ke=a(e=>{n.current=!0,z(e)},[]),Le=a(e=>{n.current=!0,K(e)},[]),Ye=a(e=>{n.current=!0,L(e)},[]),Ue=a(e=>{n.current=!0,Y(e)},[]),je=a(e=>{n.current=!0,U(e)},[]),Ve=a(e=>{n.current=!0,q(e)},[]),[Xe,te]=r(null),Ze=a(e=>{n.current=!0,te(e)},[]),qe=a(e=>{n.current=!0,j(e)},[]),Je=a(e=>{n.current=!0,V(e)},[]),Qe=a(e=>{n.current=!0,X(e)},[]),$e=a(e=>{n.current=!0,J(e)},[]),et=a(e=>{n.current=!0,Q(e)},[]),tt=a(e=>{n.current=!0,$(e)},[]);p(()=>{const e=G(h).theme;if(!l||!s.hasSiteTheme||!e)return;const o=c??"";ee.current!==o&&(ee.current=o,n.current=!1);let d=!1;return e.get(c?{siteId:c}:void 0).then(t=>{if(d||n.current)return;pe(t.default_mode),Se(t.show_theme_switch),_(t.default_mode),E(t.show_theme_switch),B({selected:t.selected_preset,themes:t.theme_presets});const m=$t(t);N(m.fonts),b(m.sizes),O(t.corner_radius_px===void 0?Bt[Kt(t.corner_style)]:zt(t.corner_radius_px)),z(m.compression),K(t.card_shadow==null?Vt:Lt(t.card_shadow)),Y(t.card_gap==null?he:Yt(t.card_gap)),U(t.hover_effect==null?Xt:Ut(t.hover_effect)),L(jt(t.shadow_color)),j(ft(t.site_width)),V(St(t.site_gutter)),X(gt(t.block_gap)),q(m.typography),te(m.textStyles),J(t.hero_background_follows_width===!0),Q(t.photography_grayscale===!0),$(t.share_button_on_posts===!0)}).catch(()=>{}),()=>{d=!0}},[l,c,s.hasSiteTheme,h]);const rt=Ht({token:l,siteId:c,enabled:s.hasSiteSettings}),[ot,re]=r(Pt),oe=S(null),P=S(!1),v=S(null),g=S({}),nt=a(e=>{P.current=!0,re(o=>({...o,...e})),!(!s.hasSiteSettings||!l)&&(g.current={...g.current,...e},v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{const o=g.current;g.current={},G(h).chat?.update(o,c?{siteId:c}:void 0).catch(()=>{})},500))},[s.hasSiteSettings,l,c,h]);p(()=>{if(!l||!s.hasSiteSettings)return;const e=c??"";oe.current!==e&&(oe.current=e,P.current=!1);let o=!1;const d=G(h).chat;if(d)return d.get(c?{siteId:c}:void 0).then(t=>{o||P.current||re({enabled:t.enabled,title:t.title,subtitle:t.subtitle,greeting:t.greeting})}).catch(()=>{}),()=>{o=!0}},[l,c,s.hasSiteSettings,h]);const[w,H]=r(""),ne=S(null),I=S(!1);p(()=>H(Ft()),[]);const ae=a(e=>{const o=e.trim();if(o===w)return;I.current=!0,ue(o),H(o);const d=i.updateSite;!s.canEditSiteRecord||!f||!d||d({mapsApiKey:o}).catch(()=>{})},[w,s.canEditSiteRecord,f,i]),[ie,ce]=r("");p(()=>ce(Wt()),[]),p(()=>{const e=i.site;if(!f||!s.hasSiteRecord||!e){W(null);return}const o=c??"";ne.current!==o&&(ne.current=o,I.current=!1);let d=!1;return e().then(t=>{if(d||(W(pt(t.name)),I.current))return;const m=t.mapsApiKey??"";ue(m),H(m);const se=t.mapsMapId??"";xt(se),ce(se)}).catch(()=>{}),()=>{d=!0}},[f,l,s.hasSiteRecord,c,i]);const at=M(()=>({apiKey:w,setApiKey:ae,mapId:ie}),[w,ae,ie]);return u(Ct,{config:ke,parts:Jt,wrap:(e,o)=>u(_t,{websiteName:fe,templateChrome:T,templateName:ge||null,themeMode:we,onThemeModeChange:xe,themeSwitchShown:Ce,onThemeSwitchShownChange:Be,theme:Te,onThemeChange:Ne,fonts:_e,onFontsChange:be,cornerRadiusPx:ye,onCornerRadiusPxChange:ze,cardShadow:ve,onCardShadowChange:Le,shadowColor:He,onShadowColorChange:Ye,cardGap:Ie,onCardGapChange:Ue,hoverEffect:Me,onHoverEffectChange:je,headingCompression:Pe,onHeadingCompressionChange:Ke,headingTypography:Ae,onHeadingTypographyChange:Ve,textStyles:Xe,onTextStylesChange:Ze,sizes:Ee,onSizesChange:Oe,siteWidth:Ge,onSiteWidthChange:qe,siteGutter:Re,onSiteGutterChange:Je,blockGap:y,onBlockGapChange:Qe,heroBackgroundFollowsWidth:De,onHeroBackgroundFollowsWidthChange:$e,photographyGrayscale:Fe,onPhotographyGrayscaleChange:et,shareButtonOnPosts:We,onShareButtonOnPostsChange:tt,themeFromDocument:!s.hasSiteTheme,children:u(Et,{children:u(st,{wrap:h.chrome?.wrap,surface:"page",children:u(Gt,{children:u(Rt,{children:u(kt,{children:u(At,{children:it(Dt,{value:at,children:[u(yt,{chat:ot,onChatChange:nt,children:u(vt,{value:rt,children:u(It,{children:e})})}),o]})})})})})})})})})}function nr({target:i}){return u(wt,{target:i,addressing:Mt,onHostMessage:Qt,children:u(or,{})})}export{nr as default};
1
+ "use client";import{jsx as s,jsxs as it}from"react/jsx-runtime";import{useCallback as a,useEffect as p,useMemo as M,useRef as S,useState as r}from"react";import"efficient-easel/easel.css";import"efficient-easel/shell.css";import"efficient-easel/rail.css";import"efficient-easel/panel.css";import"efficient-easel/fields.css";import"efficient-easel/pick.css";import"efficient-easel/copy.css";import"efficient-easel/gold.css";import"efficient-easel/text-styles.css";import"efficient-easel/menu.css";import"efficient-easel/chrome.css";import"efficient-easel/tree.css";import"efficient-easel/drag.css";import"efficient-easel/screen.css";import"./storefront-editor.css";import{buildConfig as ct}from"../lib/puck/build-config.js";import{ChromeWrap as st}from"../lib/editor-chrome.js";import{sessionRegistry as dt}from"../lib/editor-session.js";import{backendOf as G,blocksOf as ut}from"../lib/website-session.js";import{useEditorSession as ht}from"../lib/editor-session-context.js";import{withSiteBlockGapFields as lt}from"../lib/puck/site-gap-fields.js";import{withTemplateMediaPlaceholders as mt}from"../lib/puck/templateFields.js";import{setEditorPage as de}from"../lib/puck/editor-page-context.js";import{resolveSiteName as pt}from"../lib/content/site-name.js";import{normalizeSiteGutter as St,normalizeSiteWidth as ft}from"../lib/content/page-width.js";import{normalizeSiteBlockGap as gt}from"../lib/content/container-gap.js";import wt,{DocumentScreen as Ct}from"./EditorScreenMount.js";import{useStorefrontDocument as Tt}from"./StorefrontDocumentContext.js";import{PreviewHeaderProvider as _t}from"./PreviewHeaderContext.js";import{PreviewFooterProvider as Et}from"./PreviewFooterContext.js";import{PreviewChatProvider as yt,DEFAULT_CHAT_PREVIEW as Pt}from"./PreviewChatContext.js";import{PreviewSocialProvider as vt}from"./PreviewSocialContext.js";import{useSocialSettings as Ht}from"./useSocialSettings.js";import{PreviewSurfaceProvider as It}from"./PreviewSurfaceContext.js";import{WEBSITE_ADDRESSING as Mt}from"../lib/website-document-addressing.js";import{PreviewTickerProvider as Gt}from"./PreviewTickerContext.js";import{PreviewHeroPartProvider as Rt}from"./PreviewHeroPartContext.js";import{PreviewPartsProvider as Ft}from"./PreviewPartsContext.js";import{PreviewLocationPartProvider as kt}from"./PreviewLocationPartContext.js";import{PreviewPartStyleProvider as At}from"./PreviewPartStyleContext.js";import{SiteMapsProvider as Dt,readSiteMapsKey as Wt,writeSiteMapsKey as ue,readSiteMapId as xt,writeSiteMapId as Bt}from"../lib/maps-config.js";import{CORNER_STYLE_TO_PX as Nt,DEFAULT_HEADING_COMPRESSION as Ot,DEFAULT_HEADING_TYPOGRAPHY as bt,DEFAULT_SWITCH_SHOWN as R,DEFAULT_SIZES as zt,DEFAULT_THEME_MODE as C,normalizeCornerRadius as Kt,normalizeCornerStyle as Lt,normalizeCardShadow as Yt,normalizeCardGap as Ut,normalizeHoverEffect as jt,normalizeShadowColor as Vt,IDENTITY_CARD_GAP as he,IDENTITY_CARD_SHADOW as Xt,IDENTITY_HOVER_EFFECT as Zt,THEME_MODE_KEY as le,THEME_STORAGE_KEY as qt,THEME_SWITCH_HIDE as me,THEME_SWITCH_KEY as F}from"../lib/theme.js";import{DEFAULT_FONTS as Jt}from"../lib/fonts.js";import{WEBSITE_SCREEN as Qt}from"./WebsiteScreenParts.js";import{routeWebsiteHostMessage as $t}from"../lib/website-host-inbound.js";import{siteTextFromRow as er}from"../lib/site-text-styles.js";import{chatPreviewFrom as tr}from"./PreviewChatContext.js";const rr=()=>{if(typeof window>"u")return C;try{const i=window.localStorage.getItem(le);return i==="light"||i==="dark"||i==="auto"?i:C}catch{return C}},pe=i=>{if(!(typeof window>"u"))try{window.localStorage.setItem(le,i)}catch{}},or=()=>{if(typeof window>"u")return R;try{return window.localStorage.getItem(F)!==me}catch{return R}},nr=()=>{if(!(typeof window>"u"))try{window.localStorage.removeItem(qt)}catch{}},Se=i=>{if(!(typeof window>"u"))try{i?window.localStorage.removeItem(F):window.localStorage.setItem(F,me)}catch{}};function ar(){const{adapter:i,capabilities:d,templateId:k,ready:f,token:l,siteId:c,currentSlug:A,currentKind:D}=Tt();p(()=>(de(A,D),()=>de(null,null)),[A,D]);const T=d.placeholderFrames,[fe,W]=r(null),[ge,x]=r("");p(()=>{const e=i.templateName;if(!f||!k||!e){x("");return}let o=!1;return e().then(u=>!o&&x(u??"")).catch(()=>{}),()=>{o=!0}},[f,l,k,i]);const[we,_]=r(C),[Ce,E]=r(R),[Te,B]=r({selected:0,themes:[]}),[_e,N]=r(Jt),[Ee,O]=r(zt),[ye,b]=r(null),[Pe,z]=r(Ot),[ve,K]=r(null),[He,L]=r(null),[Ie,Y]=r(he),[Me,U]=r(null),[Ge,j]=r(null),[Re,V]=r(null),[y,X]=r(null),h=ht(),Z=M(()=>ct(dt(h),ut(h)),[h]),Fe=M(()=>lt(mt(Z,T),y),[Z,T,y]),[ke,q]=r(bt),[Ae,J]=r(null),[De,Q]=r(null),[We,$]=r(null),ee=S(null),n=S(!1);p(()=>{_(rr()),E(or())},[]);const xe=a(e=>{n.current=!0,nr(),pe(e),_(e)},[]),Be=a(e=>{n.current=!0,Se(e),E(e)},[]),Ne=a(e=>{n.current=!0,B(e)},[]),Oe=a(e=>{n.current=!0,N(e)},[]),be=a(e=>{n.current=!0,O(e)},[]),ze=a(e=>{n.current=!0,b(e)},[]),Ke=a(e=>{n.current=!0,z(e)},[]),Le=a(e=>{n.current=!0,K(e)},[]),Ye=a(e=>{n.current=!0,L(e)},[]),Ue=a(e=>{n.current=!0,Y(e)},[]),je=a(e=>{n.current=!0,U(e)},[]),Ve=a(e=>{n.current=!0,q(e)},[]),[Xe,te]=r(null),Ze=a(e=>{n.current=!0,te(e)},[]),qe=a(e=>{n.current=!0,j(e)},[]),Je=a(e=>{n.current=!0,V(e)},[]),Qe=a(e=>{n.current=!0,X(e)},[]),$e=a(e=>{n.current=!0,J(e)},[]),et=a(e=>{n.current=!0,Q(e)},[]),tt=a(e=>{n.current=!0,$(e)},[]);p(()=>{const e=G(h).theme;if(!l||!d.hasSiteTheme||!e)return;const o=c??"";ee.current!==o&&(ee.current=o,n.current=!1);let u=!1;return e.get(c?{siteId:c}:void 0).then(t=>{if(u||n.current)return;pe(t.default_mode),Se(t.show_theme_switch),_(t.default_mode),E(t.show_theme_switch),B({selected:t.selected_preset,themes:t.theme_presets});const m=er(t);N(m.fonts),O(m.sizes),b(t.corner_radius_px===void 0?Nt[Lt(t.corner_style)]:Kt(t.corner_radius_px)),z(m.compression),K(t.card_shadow==null?Xt:Yt(t.card_shadow)),Y(t.card_gap==null?he:Ut(t.card_gap)),U(t.hover_effect==null?Zt:jt(t.hover_effect)),L(Vt(t.shadow_color)),j(ft(t.site_width)),V(St(t.site_gutter)),X(gt(t.block_gap)),q(m.typography),te(m.textStyles),J(t.hero_background_follows_width===!0),Q(t.photography_grayscale===!0),$(t.share_button_on_posts===!0)}).catch(()=>{}),()=>{u=!0}},[l,c,d.hasSiteTheme,h]);const rt=Ht({token:l,siteId:c,enabled:d.hasSiteSettings}),[ot,re]=r(Pt),oe=S(null),P=S(!1),v=S(null),g=S({}),nt=a(e=>{P.current=!0,re(o=>({...o,...e})),!(!d.hasSiteSettings||!l)&&(g.current={...g.current,...e},v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{const o=g.current;g.current={},G(h).chat?.update(o,c?{siteId:c}:void 0).catch(()=>{})},500))},[d.hasSiteSettings,l,c,h]);p(()=>{if(!l||!d.hasSiteSettings)return;const e=c??"";oe.current!==e&&(oe.current=e,P.current=!1);let o=!1;const u=G(h).chat;if(u)return u.get(c?{siteId:c}:void 0).then(t=>{o||P.current||re(tr(t))}).catch(()=>{}),()=>{o=!0}},[l,c,d.hasSiteSettings,h]);const[w,H]=r(""),ne=S(null),I=S(!1);p(()=>H(Wt()),[]);const ae=a(e=>{const o=e.trim();if(o===w)return;I.current=!0,ue(o),H(o);const u=i.updateSite;!d.canEditSiteRecord||!f||!u||u({mapsApiKey:o}).catch(()=>{})},[w,d.canEditSiteRecord,f,i]),[ie,ce]=r("");p(()=>ce(xt()),[]),p(()=>{const e=i.site;if(!f||!d.hasSiteRecord||!e){W(null);return}const o=c??"";ne.current!==o&&(ne.current=o,I.current=!1);let u=!1;return e().then(t=>{if(u||(W(pt(t.name)),I.current))return;const m=t.mapsApiKey??"";ue(m),H(m);const se=t.mapsMapId??"";Bt(se),ce(se)}).catch(()=>{}),()=>{u=!0}},[f,l,d.hasSiteRecord,c,i]);const at=M(()=>({apiKey:w,setApiKey:ae,mapId:ie}),[w,ae,ie]);return s(Ct,{config:Fe,parts:Qt,wrap:(e,o)=>s(_t,{websiteName:fe,templateChrome:T,templateName:ge||null,themeMode:we,onThemeModeChange:xe,themeSwitchShown:Ce,onThemeSwitchShownChange:Be,theme:Te,onThemeChange:Ne,fonts:_e,onFontsChange:Oe,cornerRadiusPx:ye,onCornerRadiusPxChange:ze,cardShadow:ve,onCardShadowChange:Le,shadowColor:He,onShadowColorChange:Ye,cardGap:Ie,onCardGapChange:Ue,hoverEffect:Me,onHoverEffectChange:je,headingCompression:Pe,onHeadingCompressionChange:Ke,headingTypography:ke,onHeadingTypographyChange:Ve,textStyles:Xe,onTextStylesChange:Ze,sizes:Ee,onSizesChange:be,siteWidth:Ge,onSiteWidthChange:qe,siteGutter:Re,onSiteGutterChange:Je,blockGap:y,onBlockGapChange:Qe,heroBackgroundFollowsWidth:Ae,onHeroBackgroundFollowsWidthChange:$e,photographyGrayscale:De,onPhotographyGrayscaleChange:et,shareButtonOnPosts:We,onShareButtonOnPostsChange:tt,themeFromDocument:!d.hasSiteTheme,children:s(Et,{children:s(st,{wrap:h.chrome?.wrap,surface:"page",children:s(Gt,{children:s(Rt,{children:s(Ft,{children:s(kt,{children:s(At,{children:it(Dt,{value:at,children:[s(yt,{chat:ot,onChatChange:nt,children:s(vt,{value:rt,children:s(It,{children:e})})}),o]})})})})})})})})})})}function ir({target:i}){return s(wt,{target:i,addressing:Mt,onHostMessage:$t,children:s(ar,{})})}export{ir as default};
@@ -1 +1 @@
1
- "use client";import{jsx as r,jsxs as I}from"react/jsx-runtime";import{useCallback as k,useEffect as E,useState as j}from"react";import{Button as F,Tooltip as K}from"efficient-shell/ui";import{SettingsSwitch as z}from"efficient-easel/panel";import{PagesIcon as U,StylesIcon as Z}from"efficient-easel/rail";import{TreeRow as q}from"efficient-easel/tree";import{useEaselStrings as X}from"efficient-easel/strings";import{LocationsTreeContext as J}from"./LocationsTreeContext.js";import Q from"./PagesPanel.js";import{usePreviewChat as $}from"./PreviewChatContext.js";import{PREVIEW_DEVICES as ee}from"./preview-devices.js";import{PreviewDeviceContext as te}from"./PreviewDeviceContext.js";import{usePreviewHeader as oe}from"./PreviewHeaderContext.js";import{usePreviewSocial as re}from"./PreviewSocialContext.js";import{usePreviewSurface as ie}from"./PreviewSurfaceContext.js";import{TICKER_PART_LABEL as ne,usePreviewTicker as se}from"./PreviewTickerContext.js";import ae,{CHAT_MODE as ce,HEADER_MODE as A,SOCIAL_MODE as le,WEBSITE_MODE as B}from"./SectionEditor.js";import C from"./SectionIcon.js";import de from"./SectionThumbnail.js";import{useStorefrontDocument as L}from"./StorefrontDocumentContext.js";import pe from"./StylesPanel.js";import me from"./TemplateGlyph.js";import{LOCATIONS_TYPE as fe,useLocationsTree as ue}from"./useLocationsTree.js";import{usePinnedChromeSeed as Se}from"./usePinnedChromeSeed.js";import{usePreviewHref as Te}from"./usePreviewHref.js";import{WebsitePreviewButton as Ee}from"./WebsitePreviewButton.js";import{SITE_STYLES_TABS as we,SITE_STYLES_TEXT_TAB as be,useWebsiteName as he}from"./WebsiteSettingsPanel.js";import{useWebsiteMainAction as Pe}from"./useWebsiteMainAction.js";import{useEditorSession as ve}from"../lib/editor-session-context.js";import{useOpenPageName as ge}from"../lib/page-rows.js";import{HERO_GROUP_TYPE as ke,heroGroupNestDepth as Ie}from"../lib/hero-group-placement.js";import{stripMarkup as Ce}from"../lib/markup.js";import{categoryShortLabel as Le,PINNED_SECTION_TYPE as _e}from"../lib/puck/add-palette.js";import{canAddTo as Oe}from"../lib/puck/add-target.js";import{blockIsOffered as ye}from"../lib/puck/block-offer.js";import{sectionIdOfBoxZone as Ae,setBookingPreview as Be}from"../lib/puck/booking-preview.js";import{footerBlockRowName as Ne}from"../lib/puck/footer-block-row-name.js";import{FOOTER_TYPE as Re,HEADER_TYPE as N}from"../lib/puck/footer-blocks.js";import{leftViewForSelection as De,readLeftView as He,resolveLeftView as We,writeLeftView as xe}from"../lib/puck/left-view.js";import{websiteIsLockedBlock as Ve}from"../lib/puck/locked-blocks.js";import{everyPageBadge as Me,everyPageNotice as Ge,pinnedGroupTab as Ye,websiteDuplicateBlocked as je}from"../lib/puck/every-page.js";import{pinnedChromeInPlace as g}from"../lib/pinned-chrome-lock.js";import{scrollPreviewToSection as Fe,scrollPreviewToTop as R}from"../lib/puck/preview-dom.js";import{SiteCanvas as Ke}from"../lib/puck/overrides.js";import{labelAtLevel as ze}from"../lib/puck/section-catalog.js";import{editorWords as Ue,say as n}from"../lib/editor-words.js";import{SECTION_DESCRIPTIONS as Ze}from"../lib/puck/section-descriptions.js";import{groupAccepts as qe,isSectionGroupType as Xe,sectionGroupZone as Je,SITE_FOOTER_TYPE as Qe,SITE_HEADER_TYPE as $e}from"../lib/puck/section-groups.js";import{resolveSaveAsTemplateAction as et,SAVE_AS_TEMPLATE_EVENT as tt}from"../lib/save-as-template-action.js";import{newSectionNode as ot}from"../lib/sections/new-section-node.js";import{useHostProducts as rt}from"../lib/use-host-products.js";import{backendOf as it}from"../lib/website-session.js";function D({mode:e,open:t}){const{setSelectedHeroId:o,setSelectHandler:i}=se(),a=X().tree,c=e,d=c.kind==="ticker"?c.heroId:null,l=k(s=>{if(!s)return;t({kind:"ticker",heroId:s}),Fe(s)},[t]);return E(()=>{o(d)},[d,o]),E(()=>{i(l)},[i,l]),{partRows:(s,{rowClick:m})=>{const f=String(s.props.id);return s.type==="Hero"&&r(q,{icon:r(C,{type:"ticker",size:13}),name:n(ne),onSelect:()=>l(f),selected:d===f,rowProps:{onClick:m(()=>l(f))},words:a})}}}function nt(e){const{adapter:t,capabilities:o,currentSlug:i,siteId:a,docId:c,hasUnsavedEdits:d,bridgeCapabilities:l,notifyParent:s,token:m}=L(),{hasPreviewLink:f}=o,w=it(ve()).preview?.draftLink,P=Pe(e.data),u=et({hasTrustedConsole:!!m,canCreatePlatformTemplate:l.canCreatePlatformTemplate,capabilities:o,siteId:a,hasUnsavedEdits:d}),b=k(()=>{!a||!i||s(tt,{siteId:a,slug:i})},[s,a,i]),h=Te({pageSlug:i,siteId:a,token:m}),T=t.previewHref?.(i)??h;return{barLead:()=>u.visible&&r(K,{side:"bottom",content:u.enabled?n("Save this website as a platform template"):n(u.disabledReason),children:r("span",{className:"sf-tip-disabled",tabIndex:u.enabled?void 0:0,children:r(F,{variant:"secondary",disabled:!u.enabled,onClick:b,rightIcon:r(me,{}),children:n("Save as Template")})})}),barTrail:()=>f&&i&&r(Ee,{liveHref:T,pageId:c??null,draftLink:w}),mainAction:P}}function st(){return I("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[r("path",{d:"M12 3a9 9 0 0 0 0 18 2.3 2.3 0 0 0 2.3-2.3c0-.55-.22-1.05-.57-1.42-.34-.37-.56-.87-.56-1.43A2.35 2.35 0 0 1 15.6 13.5H18a3 3 0 0 0 3-3c0-4.14-4-7.5-9-7.5z"}),r("circle",{cx:"7.7",cy:"11.3",r:"1.05",fill:"currentColor",stroke:"none"}),r("circle",{cx:"12",cy:"8",r:"1.05",fill:"currentColor",stroke:"none"}),r("circle",{cx:"16",cy:"11",r:"1.05",fill:"currentColor",stroke:"none"})]})}function at(e,t){const{capabilities:o,templateId:i,siteId:a,tokenRef:c,navigate:d}=L(),{hasSiteTheme:l,explainsSiteSettings:s}=o,m=p=>t.setView(p),[f,w]=j(we[0].id),{surface:P,setSurface:u}=ie(),b=()=>{if(l){m("styles"),t.reveal(),R();return}e.show(B),e.reveal(),R()},h={id:"pages",label:n("Pages"),icon:r(U,{}),panel:({onHide:p})=>r(Q,{activeSurface:P,onPreviewSurface:u,onNavigate:S=>{u(null),d(i?{kind:"template",id:i,pageSlug:S}:{kind:"page",slug:S,siteId:a??void 0})},onClose:p})},T=[];return!l&&s&&T.push({id:"appearance",label:n("Appearance"),icon:r(st,{}),active:e.kind==="website",onSelect:b}),l&&T.push({id:"styles",label:n("Site styles"),icon:r(Z,{}),panel:({onHide:p,notify:S})=>r(pe,{tokenRef:c,siteId:a??void 0,onClose:p,onNotify:S,tab:f,onTabChange:w})}),{railLead:[h],railTrail:T,resolveLeftView:(p,S)=>We(p,l,S),openSettings:b,openStyles:()=>{w(be),m("styles")}}}function ct(e,t,o,i){const{kind:a,open:c}=e,{selected:d,zoneOf:l}=t;E(()=>{Be(d?.type==="BookingBox"&&d.props.region==="confirm"?Ae(l(String(d.props.id))):null)},[d?.props.id]);const s=ue(e,t),{capabilities:{hasSiteSettings:m}}=L(),{setSelected:f,setSelectHandler:w}=oe(),{chat:P,setChat:u,setSelected:b,setSelectHandler:h}=$(),T=a==="header";E(()=>{f(T)},[T,f]),E(()=>{w(()=>c(A))},[w,c]);const p=k(()=>c(ce),[c]),S=a==="chat";E(()=>{b(S)},[S,b]),E(()=>{h(p)},[h,p]);const{setOpenHandler:O}=re(),y=k(()=>c(le),[c]);E(()=>{O(y)},[O,y]);const x=D(e),V=nt(t),M=at(e,i),G=o.device;return{...x,...V,...M,hasOwnRows:v=>v.type===fe,ownRows:s.renderLocationTree,sectionPressed:s.sectionPressed,wrap:v=>r(J.Provider,{value:!0,children:r(te.Provider,{value:G,children:v})}),addPanelRow:v=>m?I("div",{className:"sf-addside-sitewide",children:[r("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:r(C,{type:"chat",size:16})}),I("button",{type:"button",className:"sf-addside-sitewide-name",onClick:()=>{v(),p()},children:[n("Live chat"),r("span",{className:"sf-addside-sitewide-desc",children:n("A chat bubble on every page")})]}),r(z,{checked:P.enabled,onChange:Y=>u({enabled:Y}),ariaLabel:n("Show the chat bubble on the whole site")})]}):void 0}}let H=null,_=new WeakMap;function lt(e){const t=Ue();if(!e||!t)return e;H!==t&&(H=t,_=new WeakMap);let o=_.get(e);return o||(o={...e,choices:e.choices?e.choices.map(i=>({...i,label:n(i.label)})):null,spec:e.spec?{...e.spec,addLabel:n(e.spec.addLabel)}:null},_.set(e,o)),o}const dt={isLockedBlock:Ve,duplicateBlocked:je,nestDepth:(e,t,o)=>t===ke?Ie(e,o):0,newSectionNode:ot,canAddTo:(e,t)=>lt(Oe(e,t)),blockIsOffered:ye},pt=new Proxy(Ze,{get:(e,t)=>{const o=Reflect.get(e,t);return typeof o=="string"?n(o):o}}),mt={labelAtLevel:(e,t,o)=>n(ze(e,t,o)),descriptions:pt,categoryLabel:e=>{const t=Le(e);return t===void 0?void 0:n(t)},firstSection:_e,blockRowName:Ne,plainText:Ce,Icon:C,Thumbnail:de,useProducts:rt},ft={desktop:2e3,tablet:800,mobile:390},W="desktop",ut={options:ee,initial:W,fluid:W,widths:ft},St={read:He,write:e=>xe(e),forSelection:(e,t)=>De(e,t)},Tt={first:N,last:Re,firstGroup:$e,lastGroup:Qe,isSectionGroup:Xe,sectionGroupZone:Je,panelOf:e=>e===N?A:null,get groupTab(){return g()?Ye:void 0},get groupBadge(){return g()?Me():void 0},get changeNotice(){return g()?Ge():void 0},get band(){return g()?Et:void 0},get groupAccepts(){return g()?qe:void 0}},Et={foldable:!0};function wt(e){return{...D(e),openSettings:()=>e.show(B)}}const wo={useOwnerName:he,useDocumentLabel:ge,useBridges:ct,useStandaloneBridges:wt,useDocumentPass:Se,blockRules:dt,blockLook:mt,devices:ut,leftView:St,pinned:Tt,Canvas:Ke,Inspector:ae};export{wo as WEBSITE_SCREEN};
1
+ "use client";import{jsx as r,Fragment as A,jsxs as k}from"react/jsx-runtime";import{useCallback as _,useEffect as b,useRef as X,useState as J}from"react";import{Button as Q,Tooltip as $}from"efficient-shell/ui";import{SettingsSwitch as ee}from"efficient-easel/panel";import{PagesIcon as te,StylesIcon as oe}from"efficient-easel/rail";import{Subtree as re,TreeRow as y}from"efficient-easel/tree";import{useEasel as ne}from"efficient-easel/easel";import{useEaselStrings as B}from"efficient-easel/strings";import{LocationsTreeContext as ie}from"./LocationsTreeContext.js";import se from"./PagesPanel.js";import{usePreviewChat as ae}from"./PreviewChatContext.js";import{PREVIEW_DEVICES as ce}from"./preview-devices.js";import{PreviewDeviceContext as le}from"./PreviewDeviceContext.js";import{usePreviewHeader as de}from"./PreviewHeaderContext.js";import{usePreviewSocial as pe}from"./PreviewSocialContext.js";import{usePreviewSurface as me}from"./PreviewSurfaceContext.js";import{TICKER_PART_LABEL as fe,usePreviewTicker as ue}from"./PreviewTickerContext.js";import{usePreviewHeroPart as Se}from"./PreviewHeroPartContext.js";import{HERO_MEDIA_PARTS as we,HERO_PART_MODE as H,heroMediaRows as he,heroPartId as N,readHeroPartId as Ee}from"../lib/puck/hero-media-parts.js";import Pe,{CHAT_MODE as Te,HEADER_MODE as D,SOCIAL_MODE as be,WEBSITE_MODE as W}from"./SectionEditor.js";import L from"./SectionIcon.js";import ge from"./SectionThumbnail.js";import{useStorefrontDocument as R}from"./StorefrontDocumentContext.js";import Ie from"./StylesPanel.js";import ve from"./TemplateGlyph.js";import{LOCATIONS_TYPE as ke,useLocationsTree as _e}from"./useLocationsTree.js";import{usePinnedChromeSeed as Ce}from"./usePinnedChromeSeed.js";import{usePreviewHref as Le}from"./usePreviewHref.js";import{WebsitePreviewButton as Re}from"./WebsitePreviewButton.js";import{SITE_STYLES_TABS as Oe,SITE_STYLES_TEXT_TAB as Ae,useWebsiteName as ye}from"./WebsiteSettingsPanel.js";import{useWebsiteMainAction as Be}from"./useWebsiteMainAction.js";import{useEditorSession as He}from"../lib/editor-session-context.js";import{useOpenPageName as Ne}from"../lib/page-rows.js";import{HERO_GROUP_TYPE as De,heroGroupNestDepth as We}from"../lib/hero-group-placement.js";import{stripMarkup as xe}from"../lib/markup.js";import{categoryShortLabel as Me,PINNED_SECTION_TYPE as Ve}from"../lib/puck/add-palette.js";import{canAddTo as Ge}from"../lib/puck/add-target.js";import{blockIsOffered as Ye}from"../lib/puck/block-offer.js";import{sectionIdOfBoxZone as Fe,setBookingPreview as je}from"../lib/puck/booking-preview.js";import{footerBlockRowName as ze}from"../lib/puck/footer-block-row-name.js";import{FOOTER_TYPE as Ke,HEADER_TYPE as x}from"../lib/puck/footer-blocks.js";import{leftViewForSelection as Ue,readLeftView as Ze,resolveLeftView as qe,writeLeftView as Xe}from"../lib/puck/left-view.js";import{websiteIsLockedBlock as Je}from"../lib/puck/locked-blocks.js";import{everyPageBadge as Qe,everyPageNotice as $e,pinnedGroupTab as et,websiteDuplicateBlocked as tt}from"../lib/puck/every-page.js";import{pinnedChromeInPlace as C}from"../lib/pinned-chrome-lock.js";import{scrollPreviewToSection as ot,scrollPreviewToTop as M}from"../lib/puck/preview-dom.js";import{SiteCanvas as rt}from"../lib/puck/overrides.js";import{labelAtLevel as nt}from"../lib/puck/section-catalog.js";import{editorWords as it,say as c}from"../lib/editor-words.js";import{SECTION_DESCRIPTIONS as st}from"../lib/puck/section-descriptions.js";import{groupAccepts as at,isSectionGroupType as ct,sectionGroupZone as lt,SITE_FOOTER_TYPE as dt,SITE_HEADER_TYPE as pt}from"../lib/puck/section-groups.js";import{resolveSaveAsTemplateAction as mt,SAVE_AS_TEMPLATE_EVENT as ft}from"../lib/save-as-template-action.js";import{newSectionNode as ut}from"../lib/sections/new-section-node.js";import{useHostProducts as St}from"../lib/use-host-products.js";import{backendOf as wt}from"../lib/website-session.js";function V({mode:e,open:t}){const{setSelectedHeroId:o,setSelectHandler:n}=ue(),l=B().tree,d=e,p=d.kind==="ticker"?d.heroId:null,a=_(i=>{if(!i)return;t({kind:"ticker",heroId:i}),ot(i)},[t]);return b(()=>{o(p)},[p,o]),b(()=>{n(a)},[n,a]),{partRows:(i,{rowClick:u})=>{const m=String(i.props.id);return i.type==="Hero"&&r(y,{icon:r(L,{type:"ticker",size:13}),name:c(fe),onSelect:()=>a(m),selected:p===m,rowProps:{onClick:u(()=>a(m))},words:l})}}}function G({mode:e,select:t}){const{setSelectedHeroPart:o,setSelectHandler:n}=Se(),l=B().tree,{appState:d}=ne(f=>f),p=d.data.content??[],a=X(p);a.current=p;const i=e,u=we.find(f=>H[f]===i.kind),m=u&&"nodeId"in i?N(String(i.nodeId),u):null,h=_(f=>{const s=Ee(f);if(!s)return;const E=a.current.findIndex(S=>String(S.props.id)===s.nodeId);if(E<0)return;const T={kind:H[s.part],nodeId:s.nodeId};t({index:E},T)},[t]);return b(()=>{o(m)},[m,o]),b(()=>{n(h)},[n,h]),{partRows:(f,{rowClick:s})=>{const E=String(f.props.id),T=he(f);if(T.length===0)return null;const S=I=>{const g=N(E,I.part);return r(y,{icon:r(L,{type:I.part==="media"?"heroMedia":"heroImage",size:13}),name:c(I.label),onSelect:()=>h(g),selected:m===g,rowProps:{onClick:s(()=>h(g))},words:l},g)},[w,...P]=T;return k(A,{children:[S(w),P.length>0&&r(re,{children:P.map(S)})]})}}}function Y(e,t){return{partRows:(o,n)=>k(A,{children:[e.partRows?.(o,n),t.partRows?.(o,n)]})}}function ht(e){const{adapter:t,capabilities:o,currentSlug:n,siteId:l,docId:d,hasUnsavedEdits:p,bridgeCapabilities:a,notifyParent:i,token:u}=R(),{hasPreviewLink:m}=o,h=wt(He()).preview?.draftLink,f=Be(e.data),s=mt({hasTrustedConsole:!!u,canCreatePlatformTemplate:a.canCreatePlatformTemplate,capabilities:o,siteId:l,hasUnsavedEdits:p}),E=_(()=>{!l||!n||i(ft,{siteId:l,slug:n})},[i,l,n]),T=Le({pageSlug:n,siteId:l,token:u}),S=t.previewHref?.(n)??T;return{barLead:()=>s.visible&&r($,{side:"bottom",content:s.enabled?c("Save this website as a platform template"):c(s.disabledReason),children:r("span",{className:"sf-tip-disabled",tabIndex:s.enabled?void 0:0,children:r(Q,{variant:"secondary",disabled:!s.enabled,onClick:E,rightIcon:r(ve,{}),children:c("Save as Template")})})}),barTrail:()=>m&&n&&r(Re,{liveHref:S,pageId:d??null,draftLink:h}),mainAction:f}}function Et(){return k("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[r("path",{d:"M12 3a9 9 0 0 0 0 18 2.3 2.3 0 0 0 2.3-2.3c0-.55-.22-1.05-.57-1.42-.34-.37-.56-.87-.56-1.43A2.35 2.35 0 0 1 15.6 13.5H18a3 3 0 0 0 3-3c0-4.14-4-7.5-9-7.5z"}),r("circle",{cx:"7.7",cy:"11.3",r:"1.05",fill:"currentColor",stroke:"none"}),r("circle",{cx:"12",cy:"8",r:"1.05",fill:"currentColor",stroke:"none"}),r("circle",{cx:"16",cy:"11",r:"1.05",fill:"currentColor",stroke:"none"})]})}function Pt(e,t){const{capabilities:o,templateId:n,siteId:l,tokenRef:d,navigate:p}=R(),{hasSiteTheme:a,explainsSiteSettings:i}=o,u=w=>t.setView(w),[m,h]=J(Oe[0].id),{surface:f,setSurface:s}=me(),E=()=>{if(a){u("styles"),t.reveal(),M();return}e.show(W),e.reveal(),M()},T={id:"pages",label:c("Pages"),icon:r(te,{}),panel:({onHide:w})=>r(se,{activeSurface:f,onPreviewSurface:s,onNavigate:P=>{s(null),p(n?{kind:"template",id:n,pageSlug:P}:{kind:"page",slug:P,siteId:l??void 0})},onClose:w})},S=[];return!a&&i&&S.push({id:"appearance",label:c("Appearance"),icon:r(Et,{}),active:e.kind==="website",onSelect:E}),a&&S.push({id:"styles",label:c("Site styles"),icon:r(oe,{}),panel:({onHide:w,notify:P})=>r(Ie,{tokenRef:d,siteId:l??void 0,onClose:w,onNotify:P,tab:m,onTabChange:h})}),{railLead:[T],railTrail:S,resolveLeftView:(w,P)=>qe(w,a,P),openSettings:E,openStyles:()=>{h(Ae),u("styles")}}}function Tt(e,t,o,n){const{kind:l,open:d}=e,{selected:p,zoneOf:a}=t;b(()=>{je(p?.type==="BookingBox"&&p.props.region==="confirm"?Fe(a(String(p.props.id))):null)},[p?.props.id]);const i=_e(e,t),{capabilities:{hasSiteSettings:u}}=R(),{setSelected:m,setSelectHandler:h}=de(),{chat:f,setChat:s,setSelected:E,setSelectHandler:T}=ae(),S=l==="header";b(()=>{m(S)},[S,m]),b(()=>{h(()=>d(D))},[h,d]);const w=_(()=>d(Te),[d]),P=l==="chat";b(()=>{E(P)},[P,E]),b(()=>{T(w)},[T,w]);const{setOpenHandler:I}=pe(),g=_(()=>d(be),[d]);b(()=>{I(g)},[I,g]);const z=Y(V(e),G(e)),K=ht(t),U=Pt(e,n),Z=o.device;return{...z,...K,...U,hasOwnRows:v=>v.type===ke,ownRows:i.renderLocationTree,sectionPressed:i.sectionPressed,wrap:v=>r(ie.Provider,{value:!0,children:r(le.Provider,{value:Z,children:v})}),addPanelRow:v=>u?k("div",{className:"sf-addside-sitewide",children:[r("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:r(L,{type:"chat",size:16})}),k("button",{type:"button",className:"sf-addside-sitewide-name",onClick:()=>{v(),w()},children:[c("Live chat"),r("span",{className:"sf-addside-sitewide-desc",children:c("A chat bubble on every page")})]}),r(ee,{checked:f.enabled,onChange:q=>s({enabled:q}),ariaLabel:c("Show the chat bubble on the whole site")})]}):void 0}}let F=null,O=new WeakMap;function bt(e){const t=it();if(!e||!t)return e;F!==t&&(F=t,O=new WeakMap);let o=O.get(e);return o||(o={...e,choices:e.choices?e.choices.map(n=>({...n,label:c(n.label)})):null,spec:e.spec?{...e.spec,addLabel:c(e.spec.addLabel)}:null},O.set(e,o)),o}const gt={isLockedBlock:Je,duplicateBlocked:tt,nestDepth:(e,t,o)=>t===De?We(e,o):0,newSectionNode:ut,canAddTo:(e,t)=>bt(Ge(e,t)),blockIsOffered:Ye},It=new Proxy(st,{get:(e,t)=>{const o=Reflect.get(e,t);return typeof o=="string"?c(o):o}}),vt={labelAtLevel:(e,t,o)=>c(nt(e,t,o)),descriptions:It,categoryLabel:e=>{const t=Me(e);return t===void 0?void 0:c(t)},firstSection:Ve,blockRowName:ze,plainText:xe,Icon:L,Thumbnail:ge,useProducts:St},kt={desktop:2e3,tablet:800,mobile:390},j="desktop",_t={options:ce,initial:j,fluid:j,widths:kt},Ct={read:Ze,write:e=>Xe(e),forSelection:(e,t)=>Ue(e,t)},Lt={first:x,last:Ke,firstGroup:pt,lastGroup:dt,isSectionGroup:ct,sectionGroupZone:lt,panelOf:e=>e===x?D:null,get groupTab(){return C()?et:void 0},get groupBadge(){return C()?Qe():void 0},get changeNotice(){return C()?$e():void 0},get band(){return C()?Rt:void 0},get groupAccepts(){return C()?at:void 0}},Rt={foldable:!0};function Ot(e){return{...Y(V(e),G(e)),openSettings:()=>e.show(W)}}const Bo={useOwnerName:ye,useDocumentLabel:Ne,useBridges:Tt,useStandaloneBridges:Ot,useDocumentPass:Ce,blockRules:gt,blockLook:vt,devices:_t,leftView:Ct,pinned:Lt,Canvas:rt,Inspector:Pe};export{Bo as WEBSITE_SCREEN};
@@ -4119,10 +4119,11 @@ ul.sf-image-status {
4119
4119
  color: var(--sf-on-accent);
4120
4120
  }
4121
4121
 
4122
+ /* The strip itself — the grid, the tiles, the chosen tile's edge and ring, each
4123
+ tile's hover name — is efficient-shell's `PictureTiles` (one copy since the
4124
+ header's country picker became its third row). What stays here is where the
4125
+ strip sits in this panel: the line of space under the row's name. */
4122
4126
  .sf-gallery-layouts {
4123
- display: grid;
4124
- grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
4125
- gap: 6px;
4126
4127
  margin-top: 7px;
4127
4128
  }
4128
4129
  /* ⚠️ THE STRIP MUST BE TOLD TO FILL THE SHELL'S CONTROL SLOT, OR IT COLLAPSES.
@@ -4179,37 +4180,12 @@ ul.sf-image-status {
4179
4180
  flex: 1 1 auto;
4180
4181
  min-width: 0;
4181
4182
  }
4182
- /* Each tile sits in the shell's Tooltip (harness UI-24); its wrapper is the
4183
- grid item now, and the tile fills it. */
4184
- .sf-tile-tip {
4185
- position: relative;
4186
- display: flex;
4187
- min-width: 0;
4188
- }
4189
- .sf-tile-tip > button {
4190
- flex: 1;
4191
- min-width: 0;
4192
- }
4193
- .sf-gallery-layouts button {
4194
- border: 1px solid var(--sf-input-border);
4195
- background: var(--sf-field-bg);
4196
- border-radius: var(--radius-lg);
4197
- padding: 5px;
4198
- cursor: pointer;
4199
- transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
4200
- }
4201
- .sf-gallery-layouts button:hover {
4202
- background: var(--sf-hover);
4203
- }
4204
- .sf-gallery-layouts button[aria-pressed="true"] {
4205
- border-color: var(--sf-accent);
4206
- box-shadow: 0 0 0 2px var(--sf-accent-ring);
4207
- background: var(--sf-panel);
4208
- }
4209
-
4210
4183
  /* The little drawing of a wall. Same twelve positions the real wall uses, so the
4211
4184
  picture cannot disagree with what pressing it draws. */
4212
4185
  .sf-gallery-pic {
4186
+ /* The wall fills its tile. The shell's tile centres what it holds, so the
4187
+ drawing says its own width, or a grid of empty cells shrinks to nothing. */
4188
+ width: 100%;
4213
4189
  display: grid;
4214
4190
  grid-template-columns: repeat(12, minmax(0, 1fr));
4215
4191
  grid-auto-rows: 6px;
@@ -0,0 +1,9 @@
1
+ export declare const CHAT_LAUNCHER_ICONS: readonly ["chat-bubble-left-right", "chat-bubble-oval-left-ellipsis", "chat", "megaphone", "phone", "sparkles"];
2
+ export type ChatLauncherIcon = (typeof CHAT_LAUNCHER_ICONS)[number];
3
+ export declare const DEFAULT_CHAT_LAUNCHER_ICON: ChatLauncherIcon;
4
+ export declare const CHAT_LAUNCHER_POSITIONS: readonly ["right", "left"];
5
+ export type ChatLauncherPosition = (typeof CHAT_LAUNCHER_POSITIONS)[number];
6
+ export declare const DEFAULT_CHAT_LAUNCHER_POSITION: ChatLauncherPosition;
7
+ export declare function chatLauncherIcon(value?: string | null): ChatLauncherIcon;
8
+ export declare function chatLauncherPosition(value?: string | null): ChatLauncherPosition;
9
+ export declare function chatLauncherColor(value?: string | null): string;
@@ -0,0 +1 @@
1
+ const e=["chat-bubble-left-right","chat-bubble-oval-left-ellipsis","chat","megaphone","phone","sparkles"],o=e[0],n=["right","left"],r="right";function c(t){return e.includes(t??"")?t:o}function h(t){return t==="left"?"left":r}function a(t){return/^#[0-9a-fA-F]{6}$/.test(t??"")?t.toLowerCase():""}export{e as CHAT_LAUNCHER_ICONS,n as CHAT_LAUNCHER_POSITIONS,o as DEFAULT_CHAT_LAUNCHER_ICON,r as DEFAULT_CHAT_LAUNCHER_POSITION,a as chatLauncherColor,c as chatLauncherIcon,h as chatLauncherPosition};
@@ -31,6 +31,7 @@ export declare const SITE_GUTTER_NARROW: {
31
31
  };
32
32
  export declare const SITE_GUTTER_SUBSTITUTIONS: ReadonlyArray<readonly [string, string]>;
33
33
  export declare function asMainGutters(html: string): string;
34
+ export declare const SITE_COLUMN = "mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]";
34
35
  export declare function normalizeSiteGutter(v?: number | null): number;
35
36
  export declare function siteGutterTokens(v?: number | null): Record<string, string>;
36
37
  export declare function siteHalfColumnCap(dividerPx?: number): string;
@@ -1 +1 @@
1
- const n={min:1e3,max:2e3,step:50,default:1600};function m(t){return{maxWidth:t,marginInline:"auto",width:"100%"}}function D(t,x){if(t!==!1)return null;const a=typeof x=="number"?x:n.default;return m(a)}const i="--sf-site-width",p=`var(${i},${n.default}px)`,T=`max-w-[${p}]`,P=`max-w-[${n.default}px]`;function $(t){return typeof t!="number"||!Number.isFinite(t)?n.default:Math.round(Math.min(Math.max(t,n.min),n.max))}function W(t){const x=$(t);return x===n.default?{}:{[i]:`${x}px`}}const o={min:0,max:80,step:4,default:40},s="--sf-site-gutter",e=`var(${s},${o.default}px)`,A=`px-[${e}]`,G=["px-10","px-[60px]"],r={md:`min(24px,${e})`,sm:`min(20px,${e})`,frame:`min(24px,${e})`,tabs:`min(16px,${e})`},C=[[`max-[1100px]:px-[${r.md}]`,"max-[1100px]:px-6"],[`max-[1100px]:px-[${r.tabs}]`,"max-[1100px]:px-4"],[`max-[960px]:px-[${r.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${r.md}]`,"max-[900px]:px-6"],[`max-[800px]:px-[${r.md}]`,"max-[800px]:px-6"],[`max-[720px]:px-[${r.sm}]`,"max-[720px]:px-5"],[`max-[800px]:px-[${r.sm}]`,"max-[800px]:px-5"],[`max-[640px]:px-[${r.sm}]`,"max-[640px]:px-5"],[`min-[800px]:px-[${e}]`,"min-[800px]:px-10"],[`max-[720px]:px-[min(24px,${e})]`,"max-[720px]:px-6"],[`max-[800px]:-mx-[min(20px,${e})]`,"max-[800px]:-mx-5"],[`max-[720px]:-mx-[min(20px,${e})]`,"max-[720px]:-mx-5"],[`-mx-[${e}]`,"-mx-10"],[A,"px-10"]];function M(t){return C.reduce((x,[a,R])=>x.split(a).join(R),t)}function S(t){return typeof t!="number"||!Number.isFinite(t)?o.default:Math.round(Math.min(Math.max(t,o.min),o.max))}function w(t){const x=S(t);return x===o.default?{}:{[s]:`${x}px`}}function d(t=0){return`calc(${p}/2 - ${e}*2 - ${t}px)`}function L(t=0){return`max-w-[${d(t).replace(/ /g,"_")}]`}const f=`min(var(--sf-page-cap,${p}),${p})`,U=`max-w-[${f}]`,g=`max-w-[min(var(--sf-page-cap,${n.default}px),${n.default}px)]`,E="--sf-hero-cap",H=`var(${E},none)`,v=`max-w-[${H}]`,_="--sf-hero-bleed-m",u="--sf-hero-bleed-w",B=`var(${_},calc(50% - 50vw))`,N=`var(${u},100vw)`,b=`mx-[var(${_},calc(50%_-_50vw))]`,V=`w-[var(${u},100vw)]`,I="--sf-hero-chrome-x",h="--sf-hero-chrome-cap";function y(t){return t===!0?{[E]:f,[_]:"auto",[u]:"100%",[I]:"24px",[h]:"none"}:{}}const c=`calc(${p} - ${e}*2)`,k=`max-w-[${c.replace(/ /g,"_")}]`,K=T;function z(t){return t!==!1?null:m(l)}const O="--sf-chrome-cap",l=`var(${O},${c})`,F="data-page-width";function j(t){return t==="full"?"full":null}function q(t){return t==="full"?null:m(t==="content"?c:l)}function J(t){if(t==="full")return"full";if(t==="content")return"content"}export{l as CHROME_CAP_READ,O as CHROME_CAP_VAR,c as CHROME_WIDTH_CAP,k as CHROME_WIDTH_CAP_CLASS,H as HERO_BACKGROUND_CAP,v as HERO_BACKGROUND_CAP_CLASS,E as HERO_BACKGROUND_VAR,B as HERO_BLEED_MARGIN,b as HERO_BLEED_MARGIN_CLASS,_ as HERO_BLEED_MARGIN_VAR,N as HERO_BLEED_WIDTH,V as HERO_BLEED_WIDTH_CLASS,u as HERO_BLEED_WIDTH_VAR,f as HERO_CAP,U as HERO_CAP_CLASS,h as HERO_CHROME_CAP_VAR,I as HERO_CHROME_INSET_VAR,n as PAGE_WIDTH,F as PAGE_WIDTH_ATTR,K as PRE_CHROME_WIDTH_CAP_CLASS,g as PRE_HERO_CAP_CLASS,G as PRE_SITE_GUTTER_CLASSES,P as PRE_SITE_WIDTH_CAP_CLASS,o as SITE_GUTTER,e as SITE_GUTTER_CAP,A as SITE_GUTTER_CLASS,r as SITE_GUTTER_NARROW,C as SITE_GUTTER_SUBSTITUTIONS,s as SITE_GUTTER_VAR,p as SITE_WIDTH_CAP,T as SITE_WIDTH_CAP_CLASS,i as SITE_WIDTH_VAR,M as asMainGutters,m as centredCap,q as chromeWidthStyle,y as heroBackgroundTokens,S as normalizeSiteGutter,$ as normalizeSiteWidth,j as pageWidthMarker,D as pageWidthStyle,J as resolveChromeWidth,w as siteGutterTokens,d as siteHalfColumnCap,L as siteHalfColumnCapClass,z as siteWidthCapStyle,W as siteWidthTokens};
1
+ const n={min:1e3,max:2e3,step:50,default:1600};function m(t){return{maxWidth:t,marginInline:"auto",width:"100%"}}function D(t,e){if(t!==!1)return null;const a=typeof e=="number"?e:n.default;return m(a)}const s="--sf-site-width",r=`var(${s},${n.default}px)`,T=`max-w-[${r}]`,P=`max-w-[${n.default}px]`;function $(t){return typeof t!="number"||!Number.isFinite(t)?n.default:Math.round(Math.min(Math.max(t,n.min),n.max))}function w(t){const e=$(t);return e===n.default?{}:{[s]:`${e}px`}}const o={min:0,max:80,step:4,default:40},c="--sf-site-gutter",x=`var(${c},${o.default}px)`,A=`px-[${x}]`,M=["px-10","px-[60px]"],p={md:`min(24px,${x})`,sm:`min(20px,${x})`,frame:`min(24px,${x})`,tabs:`min(16px,${x})`},C=[[`max-[1100px]:px-[${p.md}]`,"max-[1100px]:px-6"],[`max-[1100px]:px-[${p.tabs}]`,"max-[1100px]:px-4"],[`max-[960px]:px-[${p.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${p.md}]`,"max-[900px]:px-6"],[`max-[800px]:px-[${p.md}]`,"max-[800px]:px-6"],[`max-[720px]:px-[${p.sm}]`,"max-[720px]:px-5"],[`max-[800px]:px-[${p.sm}]`,"max-[800px]:px-5"],[`max-[640px]:px-[${p.sm}]`,"max-[640px]:px-5"],[`min-[800px]:px-[${x}]`,"min-[800px]:px-10"],[`max-[720px]:px-[min(24px,${x})]`,"max-[720px]:px-6"],[`max-[800px]:-mx-[min(20px,${x})]`,"max-[800px]:-mx-5"],[`max-[720px]:-mx-[min(20px,${x})]`,"max-[720px]:-mx-5"],[`-mx-[${x}]`,"-mx-10"],[A,"px-10"]];function W(t){return C.reduce((e,[a,R])=>e.split(a).join(R),t)}const G="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]";function S(t){return typeof t!="number"||!Number.isFinite(t)?o.default:Math.round(Math.min(Math.max(t,o.min),o.max))}function L(t){const e=S(t);return e===o.default?{}:{[c]:`${e}px`}}function d(t=0){return`calc(${r}/2 - ${x}*2 - ${t}px)`}function v(t=0){return`max-w-[${d(t).replace(/ /g,"_")}]`}const f=`min(var(--sf-page-cap,${r}),${r})`,g=`max-w-[${f}]`,U=`max-w-[min(var(--sf-page-cap,${n.default}px),${n.default}px)]`,E="--sf-hero-cap",H=`var(${E},none)`,N=`max-w-[${H}]`,u="--sf-hero-bleed-m",_="--sf-hero-bleed-w",B=`var(${u},calc(50% - 50vw))`,b=`var(${_},100vw)`,V=`mx-[var(${u},calc(50%_-_50vw))]`,y=`w-[var(${_},100vw)]`,I="--sf-hero-chrome-x",h="--sf-hero-chrome-cap";function k(t){return t===!0?{[E]:f,[u]:"auto",[_]:"100%",[I]:"24px",[h]:"none"}:{}}const i=`calc(${r} - ${x}*2)`,K=`max-w-[${i.replace(/ /g,"_")}]`,z=T;function F(t){return t!==!1?null:m(l)}const O="--sf-chrome-cap",l=`var(${O},${i})`,j="data-page-width";function q(t){return t==="full"?"full":null}function J(t){return t==="full"?null:m(t==="content"?i:l)}function Q(t){if(t==="full")return"full";if(t==="content")return"content"}export{l as CHROME_CAP_READ,O as CHROME_CAP_VAR,i as CHROME_WIDTH_CAP,K as CHROME_WIDTH_CAP_CLASS,H as HERO_BACKGROUND_CAP,N as HERO_BACKGROUND_CAP_CLASS,E as HERO_BACKGROUND_VAR,B as HERO_BLEED_MARGIN,V as HERO_BLEED_MARGIN_CLASS,u as HERO_BLEED_MARGIN_VAR,b as HERO_BLEED_WIDTH,y as HERO_BLEED_WIDTH_CLASS,_ as HERO_BLEED_WIDTH_VAR,f as HERO_CAP,g as HERO_CAP_CLASS,h as HERO_CHROME_CAP_VAR,I as HERO_CHROME_INSET_VAR,n as PAGE_WIDTH,j as PAGE_WIDTH_ATTR,z as PRE_CHROME_WIDTH_CAP_CLASS,U as PRE_HERO_CAP_CLASS,M as PRE_SITE_GUTTER_CLASSES,P as PRE_SITE_WIDTH_CAP_CLASS,G as SITE_COLUMN,o as SITE_GUTTER,x as SITE_GUTTER_CAP,A as SITE_GUTTER_CLASS,p as SITE_GUTTER_NARROW,C as SITE_GUTTER_SUBSTITUTIONS,c as SITE_GUTTER_VAR,r as SITE_WIDTH_CAP,T as SITE_WIDTH_CAP_CLASS,s as SITE_WIDTH_VAR,W as asMainGutters,m as centredCap,J as chromeWidthStyle,k as heroBackgroundTokens,S as normalizeSiteGutter,$ as normalizeSiteWidth,q as pageWidthMarker,D as pageWidthStyle,Q as resolveChromeWidth,L as siteGutterTokens,d as siteHalfColumnCap,v as siteHalfColumnCapClass,F as siteWidthCapStyle,w as siteWidthTokens};
@@ -149,7 +149,6 @@ export declare const WEB_BUILDER_WORDS: {
149
149
  readonly Background: "Background";
150
150
  readonly "Background image": "Background image";
151
151
  readonly "Background images": "Background images";
152
- readonly "Background video": "Background video";
153
152
  readonly Badge: "Badge";
154
153
  readonly Banner: "Banner";
155
154
  readonly "Banner headline": "Banner headline";
@@ -269,6 +268,7 @@ export declare const WEB_BUILDER_WORDS: {
269
268
  readonly "Clear this site\u2019s colors?": "Clear this site’s colors?";
270
269
  readonly "Clear {what}": "Clear {what}";
271
270
  readonly "Clear {what}: {label}": "Clear {what}: {label}";
271
+ readonly "Click to play": "Click to play";
272
272
  readonly Collections: "Collections";
273
273
  readonly Color: "Color";
274
274
  readonly "Column *title.*": "Column *title.*";
@@ -535,11 +535,13 @@ export declare const WEB_BUILDER_WORDS: {
535
535
  readonly Icon: "Icon";
536
536
  readonly "Icon after text": "Icon after text";
537
537
  readonly "Icon before text": "Icon before text";
538
+ readonly "Icon only": "Icon only";
538
539
  readonly "Icon position": "Icon position";
539
540
  readonly "Illustrative example": "Illustrative example";
540
541
  readonly Image: "Image";
541
542
  readonly "Image & Text Columns": "Image & Text Columns";
542
543
  readonly "Image & Text Split": "Image & Text Split";
544
+ readonly "Image 2": "Image 2";
543
545
  readonly "Image background": "Image background";
544
546
  readonly "Image caption": "Image caption";
545
547
  readonly "Image column": "Image column";
@@ -720,6 +722,7 @@ export declare const WEB_BUILDER_WORDS: {
720
722
  readonly "On every blog post.": "On every blog post.";
721
723
  readonly "On picture": "On picture";
722
724
  readonly "On this page": "On this page";
725
+ readonly One: "One";
723
726
  readonly "One row": "One row";
724
727
  readonly "One then four": "One then four";
725
728
  readonly "Only the size follows a site style. This section sets its own font, weight and letter case.": "Only the size follows a site style. This section sets its own font, weight and letter case.";
@@ -769,6 +772,7 @@ export declare const WEB_BUILDER_WORDS: {
769
772
  readonly Placement: "Placement";
770
773
  readonly Plain: "Plain";
771
774
  readonly "Play video": "Play video";
775
+ readonly Playback: "Playback";
772
776
  readonly "Playback speed": "Playback speed";
773
777
  readonly "Plays well with\n*your favourite apps.*": "Plays well with\n*your favourite apps.*";
774
778
  readonly "Pop up - SubscribePopup": "Pop up - SubscribePopup";
@@ -896,6 +900,7 @@ export declare const WEB_BUILDER_WORDS: {
896
900
  readonly "Show cover image": "Show cover image";
897
901
  readonly "Show hints": "Show hints";
898
902
  readonly "Show on a card": "Show on a card";
903
+ readonly "Show on phones": "Show on phones";
899
904
  readonly "Show slide picker": "Show slide picker";
900
905
  readonly "Show texture": "Show texture";
901
906
  readonly "Show the chat bubble": "Show the chat bubble";
@@ -903,11 +908,13 @@ export declare const WEB_BUILDER_WORDS: {
903
908
  readonly "Show ticker": "Show ticker";
904
909
  readonly "Show {label} on the slide": "Show {label} on the slide";
905
910
  readonly "Shown beside the heading": "Shown beside the heading";
911
+ readonly "Shows when a visitor points at the button": "Shows when a visitor points at the button";
906
912
  readonly "Side space": "Side space";
907
913
  readonly "Side-by-side image and text in two columns.": "Side-by-side image and text in two columns.";
908
914
  readonly Sideways: "Sideways";
909
915
  readonly "Signup Form": "Signup Form";
910
916
  readonly Simple: "Simple";
917
+ readonly "Site button color": "Site button color";
911
918
  readonly "Site settings": "Site settings";
912
919
  readonly "Site styles": "Site styles";
913
920
  readonly "Six across": "Six across";
@@ -925,6 +932,7 @@ export declare const WEB_BUILDER_WORDS: {
925
932
  readonly "Social links": "Social links";
926
933
  readonly Soft: "Soft";
927
934
  readonly Solid: "Solid";
935
+ readonly Source: "Source";
928
936
  readonly "Space above and below": "Space above and below";
929
937
  readonly "Space between": "Space between";
930
938
  readonly Spacer: "Spacer";
@@ -936,6 +944,7 @@ export declare const WEB_BUILDER_WORDS: {
936
944
  readonly "Spine (single rail)": "Spine (single rail)";
937
945
  readonly "Split (editorial aside)": "Split (editorial aside)";
938
946
  readonly Square: "Square";
947
+ readonly Squares: "Squares";
939
948
  readonly Stacked: "Stacked";
940
949
  readonly Standard: "Standard";
941
950
  readonly Start: "Start";
@@ -1094,8 +1103,8 @@ export declare const WEB_BUILDER_WORDS: {
1094
1103
  readonly Upcoming: "Upcoming";
1095
1104
  readonly "Update style": "Update style";
1096
1105
  readonly "Update {style}?": "Update {style}?";
1106
+ readonly Upload: "Upload";
1097
1107
  readonly "Upload a background image": "Upload a background image";
1098
- readonly "Upload a background video": "Upload a background video";
1099
1108
  readonly "Upload a poster still": "Upload a poster still";
1100
1109
  readonly "Uppercase heading": "Uppercase heading";
1101
1110
  readonly "Use {colour}": "Use {colour}";
@@ -1103,6 +1112,7 @@ export declare const WEB_BUILDER_WORDS: {
1103
1112
  readonly "Value suffix": "Value suffix";
1104
1113
  readonly "Vertical breathing room between sections.": "Vertical breathing room between sections.";
1105
1114
  readonly Video: "Video";
1115
+ readonly "Video file": "Video file";
1106
1116
  readonly "Video poster": "Video poster";
1107
1117
  readonly "View all": "View all";
1108
1118
  readonly "View all questions": "View all questions";
@@ -1128,6 +1138,7 @@ export declare const WEB_BUILDER_WORDS: {
1128
1138
  readonly "Year \u2192": "Year →";
1129
1139
  readonly Years: "Years";
1130
1140
  readonly YouTube: "YouTube";
1141
+ readonly "YouTube link": "YouTube link";
1131
1142
  readonly "Your *first* section.": "Your *first* section.";
1132
1143
  readonly "Your *second* section.": "Your *second* section.";
1133
1144
  readonly "Your fifth question goes here?": "Your fifth question goes here?";
@@ -1152,6 +1163,7 @@ export declare const WEB_BUILDER_WORDS: {
1152
1163
  readonly "each block's own spacing": "each block's own spacing";
1153
1164
  readonly entries: "entries";
1154
1165
  readonly group: "group";
1166
+ readonly "https://youtu.be/\u2026": "https://youtu.be/…";
1155
1167
  readonly "images only": "images only";
1156
1168
  readonly item: "item";
1157
1169
  readonly label: "label";