efficient-web-builder 21.0.0 → 22.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 (91) hide show
  1. package/CHANGELOG.md +138 -0
  2. package/dist/components/AnimatedStat.js +1 -1
  3. package/dist/components/Banner.js +1 -1
  4. package/dist/components/Cards.js +1 -1
  5. package/dist/components/CategoryBar.js +1 -1
  6. package/dist/components/ChartSection.js +1 -1
  7. package/dist/components/Countdown.js +1 -1
  8. package/dist/components/DealerFinder.d.ts +12 -0
  9. package/dist/components/DealerFinder.js +1 -0
  10. package/dist/components/DocMasthead.js +1 -1
  11. package/dist/components/DocMetaCards.js +1 -1
  12. package/dist/components/DocTabs.js +1 -1
  13. package/dist/components/FeaturedCover.js +1 -1
  14. package/dist/components/Footprint.d.ts +8 -1
  15. package/dist/components/Footprint.js +5 -5
  16. package/dist/components/HeroPoster.d.ts +2 -1
  17. package/dist/components/HeroPoster.js +1 -1
  18. package/dist/components/HeroSingle.d.ts +3 -1
  19. package/dist/components/HeroSingle.js +4 -4
  20. package/dist/components/HeroSlide.d.ts +2 -1
  21. package/dist/components/HeroSlide.js +1 -1
  22. package/dist/components/ImageBlock.d.ts +2 -1
  23. package/dist/components/ImageBlock.js +1 -1
  24. package/dist/components/KeyFeatures.js +1 -1
  25. package/dist/components/LocationGroupHeader.js +1 -1
  26. package/dist/components/Logos.js +1 -1
  27. package/dist/components/LongRead.js +1 -1
  28. package/dist/components/Manifesto.js +1 -1
  29. package/dist/components/Masthead.js +1 -1
  30. package/dist/components/MediaUploadField.d.ts +3 -1
  31. package/dist/components/MediaUploadField.js +1 -1
  32. package/dist/components/MockupSection.js +1 -1
  33. package/dist/components/OrderSummary.js +1 -1
  34. package/dist/components/PagesPanel.js +1 -1
  35. package/dist/components/ParagraphsA.js +1 -1
  36. package/dist/components/PostCard.js +1 -1
  37. package/dist/components/ProcessSteps.js +1 -1
  38. package/dist/components/Prose.js +1 -1
  39. package/dist/components/SectionEyebrow.js +1 -1
  40. package/dist/components/SectionHeader.js +1 -1
  41. package/dist/components/Series.js +1 -1
  42. package/dist/components/SiteTextStylesField.js +1 -1
  43. package/dist/components/Split.js +1 -1
  44. package/dist/components/Stats.js +1 -1
  45. package/dist/components/StatsParagraph.js +1 -1
  46. package/dist/components/Testimonials.js +1 -1
  47. package/dist/components/Text.js +1 -1
  48. package/dist/components/ThemeField.js +1 -1
  49. package/dist/components/Timeline.js +1 -1
  50. package/dist/components/TimelineTrack.js +1 -1
  51. package/dist/components/WebsiteScreenParts.js +1 -1
  52. package/dist/components/storefront-editor.css +96 -271
  53. package/dist/components/useLocationsTree.js +1 -1
  54. package/dist/lib/content/phone-focus.d.ts +7 -0
  55. package/dist/lib/content/phone-focus.js +1 -0
  56. package/dist/lib/dealer-source.d.ts +34 -0
  57. package/dist/lib/dealer-source.js +1 -0
  58. package/dist/lib/editor-words-catalogue.d.ts +9 -5
  59. package/dist/lib/editor-words-catalogue.js +4 -4
  60. package/dist/lib/puck/MarkupToolbar.d.ts +1 -1
  61. package/dist/lib/puck/MarkupToolbar.js +1 -1
  62. package/dist/lib/puck/blocks/general/Footprint/fields.js +1 -1
  63. package/dist/lib/puck/blocks/general/Footprint/render.js +2 -2
  64. package/dist/lib/puck/blocks/general/HeroSingle/fields.js +1 -1
  65. package/dist/lib/puck/blocks/general/HeroSingle/render.js +1 -1
  66. package/dist/lib/puck/blocks/general/HeroSlide/fields.js +1 -1
  67. package/dist/lib/puck/blocks/general/HeroSlide/render.js +1 -1
  68. package/dist/lib/puck/blocks/general/ImageBlock/fields.js +1 -1
  69. package/dist/lib/puck/blocks/general/ImageBlock/render.js +1 -1
  70. package/dist/lib/puck/controls.d.ts +5 -2
  71. package/dist/lib/puck/controls.js +1 -1
  72. package/dist/lib/puck/field-groups.js +1 -1
  73. package/dist/lib/sections/collection-card-text-regions.d.ts +9 -1
  74. package/dist/lib/sections/collection-card-text-regions.js +1 -1
  75. package/dist/lib/sections/text-regions.d.ts +1 -0
  76. package/dist/lib/sections/text-regions.js +1 -1
  77. package/dist/lib/site-text-styles.d.ts +1 -0
  78. package/dist/lib/site-text-styles.js +2 -2
  79. package/dist/lib/source-rules/heading-ceiling-sweep.js +3 -3
  80. package/dist/lib/source-rules/part-style-naming.js +2 -2
  81. package/dist/lib/source-rules/rule.d.ts +1 -0
  82. package/dist/lib/source-rules/rule.js +3 -1
  83. package/dist/lib/source-rules/size-token-paints.js +4 -4
  84. package/dist/lib/source-rules/style-face-matches-size.js +3 -3
  85. package/package.json +7 -5
  86. package/dist/components/ImageFocusRow.d.ts +0 -7
  87. package/dist/components/ImageFocusRow.js +0 -1
  88. package/dist/components/TemplateGlyph.d.ts +0 -6
  89. package/dist/components/TemplateGlyph.js +0 -1
  90. package/dist/components/TextStyleRow.d.ts +0 -13
  91. package/dist/components/TextStyleRow.js +0 -1
@@ -1 +1 @@
1
- "use client";import{jsxs as r,jsx as a,Fragment as w}from"react/jsx-runtime";import{sectionRunsFullWidth as k}from"../lib/content/section-width.js";import C from"./EditorialSectionHead.js";import{renderGold as h,renderHeadline as S}from"./goldPhrases.js";import{useCountUp as j}from"./useCountUp.js";import{say as b}from"../lib/editor-words.js";const v="font-normal italic text-accent";function z({value:x,prefix:m,suffix:i,supSuffix:c,emphasizeAll:l,label:t,sub:n}){const s=(x??"").trim(),d=/^\d+$/.test(s),{ref:g,value:u}=j(d?parseInt(s,10):0),p=d?String(u):s,o=m??"";return r("div",{className:"flex min-h-[240px] flex-col gap-3 bg-bg px-8 py-12",children:[r("div",{ref:g,className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(56px,7vw,96px)),var(--sf-heading-max,9999px))] font-medium leading-[0.9] tracking-[-0.04em] tabular-nums",children:[l?r("em",{className:v,children:[o,p]}):r(w,{children:[o,p,i?a("em",{className:v,children:i}):null]}),c?a("sup",{className:"ml-8 inline-block pt-[18px] align-top font-mono text-[length:var(--size-label,13px)] leading-none tracking-[0.18em] text-accent",children:c}):null]}),(t||n)&&r("div",{className:"mt-auto font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.24em] text-fg-dim",children:[t?a("strong",{className:"mb-1 block font-display text-[length:var(--size-body,16px)] font-normal normal-case tracking-[-0.01em] text-fg",children:t}):null,n?h(n):null]})]})}function _({eyebrow:x,title:m,desc:i,stats:c,background:l,padTop:t,padBottom:n,editing:s=!1,omitHead:d=!1,...g}={}){const u=typeof t=="number"?t:120,p=typeof n=="number"?n:120,o=(c??[]).filter(e=>(e.value??"").trim()!==""||(e.label??"").trim()!==""||(e.sub??"").trim()!==""||(e.suffix??"").trim()!==""||(e.supSuffix??"").trim()!==""),f=o.length>0?o:s?[{value:"0",label:b("Stat"),sub:b("Add your numbers.")}]:[],N=!!(l&&l!=="transparent");return r("section",{className:k(g)?"border-b border-line px-[var(--sf-site-gutter,40px)] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))]":"mx-auto max-w-[var(--sf-site-width,1600px)] border-b border-line px-[var(--sf-site-gutter,40px)] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))]",style:{paddingTop:u,paddingBottom:p,...N?{backgroundColor:l}:{}},children:[d?null:a(C,{num:x,title:m?S(m):void 0,desc:i?h(i):void 0}),f.length>0&&a("div",{className:"sf-card grid grid-cols-4 gap-[2px] border border-line bg-line max-[1100px]:grid-cols-2 max-[700px]:grid-cols-1",children:f.map((e,y)=>a(z,{...e},y))})]})}export{_ as default};
1
+ "use client";import{jsxs as r,jsx as a,Fragment as w}from"react/jsx-runtime";import{sectionRunsFullWidth as k}from"../lib/content/section-width.js";import C from"./EditorialSectionHead.js";import{renderGold as h,renderHeadline as E}from"./goldPhrases.js";import{useCountUp as _}from"./useCountUp.js";import{say as v}from"../lib/editor-words.js";const f={body:"text-[length:var(--size-body,16px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"},N="font-normal italic text-accent";function j({value:x,prefix:m,suffix:l,supSuffix:c,emphasizeAll:i,label:t,sub:n}){const s=(x??"").trim(),d=/^\d+$/.test(s),{ref:g,value:u}=_(d?parseInt(s,10):0),p=d?String(u):s,o=m??"";return r("div",{className:"flex min-h-[240px] flex-col gap-3 bg-bg px-8 py-12",children:[r("div",{ref:g,className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(56px,7vw,96px)),var(--sf-heading-max,9999px))] font-medium leading-[0.9] tracking-[-0.04em] tabular-nums",children:[i?r("em",{className:N,children:[o,p]}):r(w,{children:[o,p,l?a("em",{className:N,children:l}):null]}),c?a("sup",{className:`ml-8 inline-block pt-[18px] align-top font-mono ${f.labelLarge} leading-none tracking-[0.18em] text-accent`,children:c}):null]}),(t||n)&&r("div",{className:`mt-auto font-mono ${f.labelSmall} uppercase tracking-[0.24em] text-fg-dim`,children:[t?a("strong",{className:`mb-1 block font-display ${f.body} font-normal normal-case tracking-[-0.01em] text-fg`,children:t}):null,n?h(n):null]})]})}function z({eyebrow:x,title:m,desc:l,stats:c,background:i,padTop:t,padBottom:n,editing:s=!1,omitHead:d=!1,...g}={}){const u=typeof t=="number"?t:120,p=typeof n=="number"?n:120,o=(c??[]).filter(e=>(e.value??"").trim()!==""||(e.label??"").trim()!==""||(e.sub??"").trim()!==""||(e.suffix??"").trim()!==""||(e.supSuffix??"").trim()!==""),b=o.length>0?o:s?[{value:"0",label:v("Stat"),sub:v("Add your numbers.")}]:[],y=!!(i&&i!=="transparent");return r("section",{className:k(g)?"border-b border-line px-[var(--sf-site-gutter,40px)] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))]":"mx-auto max-w-[var(--sf-site-width,1600px)] border-b border-line px-[var(--sf-site-gutter,40px)] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))]",style:{paddingTop:u,paddingBottom:p,...y?{backgroundColor:i}:{}},children:[d?null:a(C,{num:x,title:m?E(m):void 0,desc:l?h(l):void 0}),b.length>0&&a("div",{className:"sf-card grid grid-cols-4 gap-[2px] border border-line bg-line max-[1100px]:grid-cols-2 max-[700px]:grid-cols-1",children:b.map((e,S)=>a(j,{...e},S))})]})}export{z as default};
@@ -1 +1 @@
1
- import{jsx as e,Fragment as f,jsxs as a}from"react/jsx-runtime";import u from"./SectionEyebrow.js";import{renderGold as v,renderHeadline as b,splitParagraphs as N}from"./goldPhrases.js";import{say as z}from"../lib/editor-words.js";const M="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] py-[84px] max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",y="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-0 pb-[84px] max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]";function _({look:x,eyebrow:r,title:i,items:o,columns:p,omitHead:n=!1,editing:m=!1}={}){const d=Math.min(3,Math.max(1,p??3)),s=(o??[]).filter(t=>m||(t.quote??"").trim()),c=!!(r??"").trim()||!!(i??"").trim();return!m&&!c&&s.length===0?null:e("section",{className:"relative z-[2] border-t border-line bg-surface",children:a("div",{className:n?y:M,children:[n?null:a(f,{children:[(r??"").trim()&&e(u,{text:r??"",look:x,className:"mb-4 block"}),(i??"").trim()&&e("h2",{className:"mb-11 font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.02em] text-fg max-[800px]:mb-8 max-[800px]:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:b(i??"",!1)})]}),s.length>0&&e("div",{className:"sf-card grid grid-cols-1 gap-px border border-line bg-line min-[700px]:[grid-template-columns:repeat(var(--tm-cols),minmax(0,1fr))]",style:{"--tm-cols":String(d)},children:s.map((t,g)=>a("figure",{className:"flex flex-col gap-5 bg-bg p-9 max-[800px]:p-7",children:[e("span",{"aria-hidden":!0,className:"font-heading2 text-[length:var(--size-headingMedium,46px)] leading-none text-accent",children:"“"}),e("blockquote",{className:"flex-1 text-[length:var(--size-body,16px)] leading-[1.6] text-fg-dim",children:N((t.quote??"").trim()||z("A short customer quote goes here.")).map((h,l)=>e("p",{className:l?"mt-3":"",children:v(h)},l))}),a("figcaption",{className:"border-t border-line pt-[18px]",children:[e("div",{className:"font-display text-[length:var(--size-body,15px)] font-medium uppercase tracking-[0.04em] text-fg",children:(t.name??"").trim()||"Customer name"}),(t.role??"").trim()&&e("div",{className:"mt-1 text-[length:var(--size-body,12px)] text-fg-dim",children:t.role})]})]},g))})]})})}export{_ as default};
1
+ import{jsx as e,Fragment as u,jsxs as i}from"react/jsx-runtime";import b from"./SectionEyebrow.js";import{renderGold as v,renderHeadline as N,splitParagraphs as M}from"./goldPhrases.js";import{say as y}from"../lib/editor-words.js";const t={headingMediumUpTo800:"max-[800px]:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",headingMedium1:"text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))]",bodySmall:"text-[length:var(--size-body,12px)]",body:"text-[length:var(--size-body,15px)]",bodyLarge:"text-[length:var(--size-body,16px)]",headingMedium2:"text-[length:var(--size-headingMedium,46px)]"},z="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] py-[84px] max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",_="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-0 pb-[84px] max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]";function E({look:o,eyebrow:r,title:s,items:x,columns:p,omitHead:m=!1,editing:d=!1}={}){const c=Math.min(3,Math.max(1,p??3)),n=(x??[]).filter(a=>d||(a.quote??"").trim()),g=!!(r??"").trim()||!!(s??"").trim();return!d&&!g&&n.length===0?null:e("section",{className:"relative z-[2] border-t border-line bg-surface",children:i("div",{className:m?_:z,children:[m?null:i(u,{children:[(r??"").trim()&&e(b,{text:r??"",look:o,className:"mb-4 block"}),(s??"").trim()&&e("h2",{className:`mb-11 font-heading2 ${t.headingMedium1} font-medium uppercase leading-none tracking-[-0.02em] text-fg max-[800px]:mb-8 ${t.headingMediumUpTo800}`,children:N(s??"",!1)})]}),n.length>0&&e("div",{className:"sf-card grid grid-cols-1 gap-px border border-line bg-line min-[700px]:[grid-template-columns:repeat(var(--tm-cols),minmax(0,1fr))]",style:{"--tm-cols":String(c)},children:n.map((a,h)=>i("figure",{className:"flex flex-col gap-5 bg-bg p-9 max-[800px]:p-7",children:[e("span",{"aria-hidden":!0,className:`font-heading2 ${t.headingMedium2} leading-none text-accent`,children:"“"}),e("blockquote",{className:`flex-1 ${t.bodyLarge} leading-[1.6] text-fg-dim`,children:M((a.quote??"").trim()||y("A short customer quote goes here.")).map((f,l)=>e("p",{className:l?"mt-3":"",children:v(f)},l))}),i("figcaption",{className:"border-t border-line pt-[18px]",children:[e("div",{className:`font-display ${t.body} font-medium uppercase tracking-[0.04em] text-fg`,children:(a.name??"").trim()||"Customer name"}),(a.role??"").trim()&&e("div",{className:`mt-1 ${t.bodySmall} text-fg-dim`,children:a.role})]})]},h))})]})})}export{E as default};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import m from"./BlockFrame.js";import{renderGold as r,splitParagraphs as c}from"./goldPhrases.js";const d={left:"text-left",center:"text-center mx-auto",right:"text-right ml-auto"},f="max-w-[380px] text-[length:var(--size-body,15px)] leading-[1.5] opacity-80 max-[800px]:text-[length:var(--size-body,14px)]",g={default:"text-fg",dim:"text-fg-dim"};function h({text:t,align:n,tone:i,contained:l,hero:s=!1,pad:a}){if(s)return e("p",{className:f,children:r(t)});const o=`max-w-[680px] whitespace-pre-line text-[length:var(--size-body,17px)] leading-[1.7] ${d[n]} ${g[i]}`;return e(m,{contained:l,className:"py-4",pad:a?{values:a,frame:16}:void 0,children:c(t).map((x,p)=>e("p",{className:o,children:r(x)},p))})}export{h as default};
1
+ import{jsx as e}from"react/jsx-runtime";import x from"./BlockFrame.js";import{renderGold as r,splitParagraphs as c}from"./goldPhrases.js";const t={bodyUpTo800:"max-[800px]:text-[length:var(--size-body,14px)]",bodySmall:"text-[length:var(--size-body,15px)]",bodyLarge:"text-[length:var(--size-body,17px)]"},f={left:"text-left",center:"text-center mx-auto",right:"text-right ml-auto"},g=`max-w-[380px] ${t.bodySmall} leading-[1.5] opacity-80 ${t.bodyUpTo800}`,y={default:"text-fg",dim:"text-fg-dim"};function h({text:a,align:l,tone:n,contained:s,hero:d=!1,pad:o}){if(d)return e("p",{className:g,children:r(a)});const i=`max-w-[680px] whitespace-pre-line ${t.bodyLarge} leading-[1.7] ${f[l]} ${y[n]}`;return e(x,{contained:s,className:"py-4",pad:o?{values:o,frame:16}:void 0,children:c(a).map((p,m)=>e("p",{className:i,children:r(p)},m))})}export{h as default};
@@ -1 +1 @@
1
- "use client";import{jsx as n,jsxs as d,Fragment as k}from"react/jsx-runtime";import{useState as f}from"react";import{SettingsDefaultReset as S,SettingsField as L}from"efficient-easel/panel";import{useEaselStrings as j}from"efficient-easel/strings";import{iconOf as v,noGlyph as A}from"../lib/puck/controls.js";import{ThemeCard as B}from"./ThemeCard.js";import{ClearColoursDialog as D}from"./ClearColoursDialog.js";import{say as m}from"../lib/editor-words.js";import{BRAND_INKS as F,brandTheme as G,normalizeTheme as I,normalizeThemeColors as N,selectedThemeColors as O}from"../lib/theme.js";const P=A("the row's whole content is an action; the gutter names a subject and this row has none — the button's label is the name GG, 2026-09-23");function y(){return n("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",children:n("path",{d:"M12 5v14M5 12h14"})})}const M="Reset color",z={selected:0,themes:[]};function H(l){l(z)}function W({value:l,onChange:o}){const a=l?.themes??[],u=a.length===0,t=I(l),[p,c]=f(!1),g=j(),[b,h]=f(null),T=(e,s)=>{o({...t,themes:t.themes.map((r,_)=>_===e?s:r)})},x=O(t).accent,E=new Set(t.themes.map(e=>e.brandInk).filter(Boolean)),C=F.filter(e=>!E.has(e)).map(e=>G(x,e)),i=[...t.themes,...C],w=e=>{if(e<t.themes.length)return o({...t,selected:e});const s=[...t.themes,i[e]];o({...t,themes:s,selected:s.length-1})},R=()=>{const e=[...t.themes,{...N(t.themes[t.selected])}];o({...t,themes:e,selected:e.length-1}),h(e.length-1)};return d(k,{children:[u?null:n(L,{label:m(M),icon:v(P),labelId:"sf-theme-reset",action:n(S,{label:m("all theme colors"),words:g.panel,changed:!0,onReset:()=>c(!0)})}),p&&n(D,{count:a.length,onCancel:()=>c(!1),onConfirm:()=>{c(!1),H(o)}}),n("div",{className:"sf-theme-list",role:"radiogroup","aria-label":m("Theme"),children:i.map((e,s)=>n(B,{index:s,colors:e,selected:s===t.selected,open:b===s&&s<t.themes.length,editable:s<t.themes.length,onPick:()=>w(s),onEdit:()=>h(r=>r===s?null:s),onChangeColors:r=>T(s,r)},s))}),d("button",{type:"button",onClick:R,className:"sf-theme-add",children:[n(y,{}),m("Add new theme")]})]})}export{z as CLEARED_THEME,M as RESET_COLOUR_LABEL,H as commitClearedTheme,W as default};
1
+ "use client";import{jsx as o,jsxs as d,Fragment as w}from"react/jsx-runtime";import{useState as f}from"react";import{SettingsDefaultReset as A,SettingsField as j}from"efficient-easel/panel";import{useEaselStrings as k}from"efficient-easel/strings";import{AddIcon as L}from"efficient-easel/icons";import{iconOf as D,noGlyph as F}from"../lib/puck/controls.js";import{ThemeCard as G}from"./ThemeCard.js";import{ClearColoursDialog as I}from"./ClearColoursDialog.js";import{say as m}from"../lib/editor-words.js";import{BRAND_INKS as N,brandTheme as O,normalizeTheme as y,normalizeThemeColors as z,selectedThemeColors as B}from"../lib/theme.js";const P=F("the row's whole content is an action; the gutter names a subject and this row has none — the button's label is the name GG, 2026-09-23"),v="Reset color",H={selected:0,themes:[]};function K(r){r(H)}function M({value:r,onChange:n}){const a=r?.themes??[],p=a.length===0,t=y(r),[u,c]=f(!1),g=k(),[b,h]=f(null),T=(e,s)=>{n({...t,themes:t.themes.map((l,S)=>S===e?s:l)})},E=B(t).accent,x=new Set(t.themes.map(e=>e.brandInk).filter(Boolean)),C=N.filter(e=>!x.has(e)).map(e=>O(E,e)),i=[...t.themes,...C],R=e=>{if(e<t.themes.length)return n({...t,selected:e});const s=[...t.themes,i[e]];n({...t,themes:s,selected:s.length-1})},_=()=>{const e=[...t.themes,{...z(t.themes[t.selected])}];n({...t,themes:e,selected:e.length-1}),h(e.length-1)};return d(w,{children:[p?null:o(j,{label:m(v),icon:D(P),labelId:"sf-theme-reset",action:o(A,{label:m("all theme colors"),words:g.panel,changed:!0,onReset:()=>c(!0)})}),u&&o(I,{count:a.length,onCancel:()=>c(!1),onConfirm:()=>{c(!1),K(n)}}),o("div",{className:"sf-theme-list",role:"radiogroup","aria-label":m("Theme"),children:i.map((e,s)=>o(G,{index:s,colors:e,selected:s===t.selected,open:b===s&&s<t.themes.length,editable:s<t.themes.length,onPick:()=>R(s),onEdit:()=>h(l=>l===s?null:s),onChangeColors:l=>T(s,l)},s))}),d("button",{type:"button",onClick:_,className:"sf-theme-add",children:[o(L,{size:12}),m("Add new theme")]})]})}export{H as CLEARED_THEME,v as RESET_COLOUR_LABEL,K as commitClearedTheme,M as default};
@@ -1 +1 @@
1
- import{jsx as e,Fragment as v,jsxs as n}from"react/jsx-runtime";import{SiteLink as T}from"../lib/site-runtime.js";import{stripMarkup as C}from"../lib/markup.js";import F from"./Placeholder.js";import H from"./SectionEyebrow.js";import{renderGold as s,renderHeadline as N,splitParagraphs as L}from"./goldPhrases.js";function w({eyebrow:t,title:a,intro:i,center:r=!1}){return n(v,{children:[t&&e(H,{text:t,size:12}),a&&e("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(40px,5vw,76px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.94] tracking-[-0.03em] text-fg",children:N(a)}),i&&e("p",{className:["font-display text-[length:var(--size-body,14px)] leading-[1.6] text-fg-dim",r?"max-w-[520px]":"max-w-[360px]"].join(" "),children:s(i,!0)})]})}function z({cta:t,className:a=""}){return t?.text?n(T,{href:t.href,className:["group inline-flex items-center gap-3.5 border border-line px-5 py-4","font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.3em] text-fg","transition-colors hover:border-accent hover:text-accent",a].join(" "),children:[s(t.text),e("span",{"aria-hidden":!0,className:"text-accent transition-transform group-hover:translate-x-[3px]",children:"→"})]}):null}function y({src:t,caption:a,meta:i,aspectClass:r,editing:p,sizes:m="100vw",className:c=""}){return!t&&!p?null:n("figure",{className:["relative overflow-hidden border border-line bg-surface",r,c].join(" "),children:[e(F,{label:a||"Image",src:t,alt:C(a??""),sizes:m}),e("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0",style:{background:"linear-gradient(180deg, transparent 55%, rgba(10,10,10,0.75) 100%)"}}),(a||i)&&n("figcaption",{className:"absolute inset-x-0 bottom-0 z-[1] flex items-center justify-between gap-3 px-4 py-3 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.24em] text-overlay-fg/85",children:[e("span",{children:a?s(a):""}),i&&e("span",{className:"text-accent",children:s(i)})]})]})}function d({entry:t}){const a=L(t.body??"");return n(v,{children:[t.title&&e("h3",{className:"mb-3.5 font-heading3 text-[length:var(--size-headingSmall,24px)] font-medium uppercase tracking-[-0.02em] text-fg max-[800px]:text-[length:var(--size-headingSmall,20px)]",children:N(t.title)}),a.length>0&&e("div",{className:"space-y-3.5 font-display text-[length:var(--size-body,17px)] leading-[1.6] max-[800px]:text-[length:var(--size-body,16px)]",children:a.map((i,r)=>e("p",{className:r===0?"text-fg":"text-fg-dim",children:s(i,!0)},r))})]})}const k={boxShadow:"0 0 0 4px var(--bg)"};function E({layout:t="split",eyebrow:a,title:i,intro:r,imageSrc:p,imageCaption:m,imageMeta:c,cta:g,entries:j,padTop:f,padBottom:h,editing:u}={}){const _=typeof f=="number"?f:120,S=typeof h=="number"?h:120,o=(j??[]).filter(l=>(l.date??"").trim()||(l.title??"").trim()||(l.body??"").trim());return e("section",{className:"relative z-[2] bg-bg",children:e("div",{className:"mx-auto max-w-[var(--sf-site-width,1600px)] border-b border-line px-[var(--sf-site-gutter,40px)] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]",style:{paddingTop:_,paddingBottom:S},children:t==="split"?n("div",{className:"grid grid-cols-[1fr_1.4fr] gap-20 max-[1100px]:grid-cols-1 max-[1100px]:gap-12",children:[n("aside",{className:"sticky top-[120px] flex flex-col gap-6 self-start max-[1100px]:static",children:[e(w,{eyebrow:a,title:i,intro:r}),e(y,{src:p,caption:m,meta:c,aspectClass:"mt-1 aspect-[4/5]",sizes:"(max-width: 1100px) 100vw, 420px",editing:u}),e(z,{cta:g,className:"mt-2 self-start"})]}),e("ol",{className:"flex flex-col gap-12",children:o.map((l,x)=>n("li",{className:"grid grid-cols-[80px_1fr] items-start gap-6 max-[700px]:grid-cols-1 max-[700px]:gap-2",children:[e("span",{className:"pt-1.5 font-mono text-[length:var(--size-label,13px)] tracking-[0.24em] text-accent",children:l.date?s(l.date):""}),e("div",{className:"max-w-[640px]",children:e(d,{entry:l})})]},x))})]}):n("div",{children:[n("header",{className:"mx-auto flex max-w-[760px] flex-col items-center gap-6 text-center",children:[e(w,{eyebrow:a,title:i,intro:r,center:!0}),e(z,{cta:g})]}),e(y,{src:p,caption:m,meta:c,aspectClass:"mx-auto mt-12 aspect-[16/9] w-full max-w-[900px]",sizes:"(max-width: 900px) 100vw, 900px",editing:u}),t==="spine"?e("ol",{className:"relative mx-auto mt-16 max-w-[760px]",children:o.map((l,x)=>n("li",{className:"relative border-l border-line pb-12 pl-10 last:pb-0 max-[700px]:pl-8",children:[e("span",{className:"absolute left-[-5px] top-1.5 h-2.5 w-2.5 rounded-full bg-accent",style:k}),e("div",{className:"mb-2 font-mono text-[length:var(--size-label,13px)] tracking-[0.24em] text-accent",children:l.date?s(l.date):""}),e("div",{className:"max-w-[640px]",children:e(d,{entry:l})})]},x))}):n("ol",{className:"relative mx-auto mt-16 max-w-[1000px]",children:[e("span",{"aria-hidden":!0,className:"pointer-events-none absolute top-0 h-full w-px bg-line left-[7px] min-[801px]:left-1/2 min-[801px]:-translate-x-1/2"}),o.map((l,x)=>{const b=x%2===0;return n("li",{className:"relative mb-14 pl-8 last:mb-0 min-[801px]:grid min-[801px]:grid-cols-2 min-[801px]:gap-16 min-[801px]:pl-0",children:[e("span",{className:"absolute top-1.5 h-2.5 w-2.5 rounded-full bg-accent left-[2px] min-[801px]:left-1/2 min-[801px]:-translate-x-1/2",style:k}),n("div",{className:b?"min-[801px]:col-start-1 min-[801px]:pr-8 min-[801px]:text-right":"min-[801px]:col-start-2 min-[801px]:pl-8",children:[e("div",{className:"mb-2 font-mono text-[length:var(--size-label,13px)] tracking-[0.24em] text-accent",children:l.date?s(l.date):""}),e("div",{className:["max-w-[520px] max-[800px]:max-w-none",b?"min-[801px]:ml-auto":""].join(" "),children:e(d,{entry:l})})]})]},x)})]})]})})})}export{E as default};
1
+ import{jsx as e,Fragment as N,jsxs as n}from"react/jsx-runtime";import{SiteLink as j}from"../lib/site-runtime.js";import{stripMarkup as _}from"../lib/markup.js";import E from"./Placeholder.js";import U from"./SectionEyebrow.js";import{renderGold as m,renderHeadline as w,splitParagraphs as C}from"./goldPhrases.js";const i={bodyUpTo800:"max-[800px]:text-[length:var(--size-body,16px)]",headingSmallUpTo800:"max-[800px]:text-[length:var(--size-headingSmall,20px)]",bodySmall:"text-[length:var(--size-body,14px)]",bodyLarge:"text-[length:var(--size-body,17px)]",headingSmall:"text-[length:var(--size-headingSmall,24px)]",labelSmall:"text-[length:var(--size-label,11px)]",labelLarge:"text-[length:var(--size-label,13px)]"};function y({eyebrow:a,title:t,intro:r,center:s=!1}){return n(N,{children:[a&&e(U,{text:a,size:12}),t&&e("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(40px,5vw,76px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.94] tracking-[-0.03em] text-fg",children:w(t)}),r&&e("p",{className:[`font-display ${i.bodySmall} leading-[1.6] text-fg-dim`,s?"max-w-[520px]":"max-w-[360px]"].join(" "),children:m(r,!0)})]})}function z({cta:a,className:t=""}){return a?.text?n(j,{href:a.href,className:["group inline-flex items-center gap-3.5 border border-line px-5 py-4",`font-mono ${i.labelLarge} uppercase tracking-[0.3em] text-fg`,"transition-colors hover:border-accent hover:text-accent",t].join(" "),children:[m(a.text),e("span",{"aria-hidden":!0,className:"text-accent transition-transform group-hover:translate-x-[3px]",children:"→"})]}):null}function k({src:a,caption:t,meta:r,aspectClass:s,editing:x,sizes:c="100vw",className:o=""}){return!a&&!x?null:n("figure",{className:["relative overflow-hidden border border-line bg-surface",s,o].join(" "),children:[e(E,{label:t||"Image",src:a,alt:_(t??""),sizes:c}),e("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0",style:{background:"linear-gradient(180deg, transparent 55%, rgba(10,10,10,0.75) 100%)"}}),(t||r)&&n("figcaption",{className:`absolute inset-x-0 bottom-0 z-[1] flex items-center justify-between gap-3 px-4 py-3 font-mono ${i.labelSmall} uppercase tracking-[0.24em] text-overlay-fg/85`,children:[e("span",{children:t?m(t):""}),r&&e("span",{className:"text-accent",children:m(r)})]})]})}function g({entry:a}){const t=C(a.body??"");return n(N,{children:[a.title&&e("h3",{className:`mb-3.5 font-heading3 ${i.headingSmall} font-medium uppercase tracking-[-0.02em] text-fg ${i.headingSmallUpTo800}`,children:w(a.title)}),t.length>0&&e("div",{className:`space-y-3.5 font-display ${i.bodyLarge} leading-[1.6] ${i.bodyUpTo800}`,children:t.map((r,s)=>e("p",{className:s===0?"text-fg":"text-fg-dim",children:m(r,!0)},s))})]})}const S={boxShadow:"0 0 0 4px var(--bg)"};function F({layout:a="split",eyebrow:t,title:r,intro:s,imageSrc:x,imageCaption:c,imageMeta:o,cta:h,entries:L,padTop:f,padBottom:b,editing:u}={}){const T=typeof f=="number"?f:120,$=typeof b=="number"?b:120,d=(L??[]).filter(l=>(l.date??"").trim()||(l.title??"").trim()||(l.body??"").trim());return e("section",{className:"relative z-[2] bg-bg",children:e("div",{className:"mx-auto max-w-[var(--sf-site-width,1600px)] border-b border-line px-[var(--sf-site-gutter,40px)] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]",style:{paddingTop:T,paddingBottom:$},children:a==="split"?n("div",{className:"grid grid-cols-[1fr_1.4fr] gap-20 max-[1100px]:grid-cols-1 max-[1100px]:gap-12",children:[n("aside",{className:"sticky top-[120px] flex flex-col gap-6 self-start max-[1100px]:static",children:[e(y,{eyebrow:t,title:r,intro:s}),e(k,{src:x,caption:c,meta:o,aspectClass:"mt-1 aspect-[4/5]",sizes:"(max-width: 1100px) 100vw, 420px",editing:u}),e(z,{cta:h,className:"mt-2 self-start"})]}),e("ol",{className:"flex flex-col gap-12",children:d.map((l,p)=>n("li",{className:"grid grid-cols-[80px_1fr] items-start gap-6 max-[700px]:grid-cols-1 max-[700px]:gap-2",children:[e("span",{className:`pt-1.5 font-mono ${i.labelLarge} tracking-[0.24em] text-accent`,children:l.date?m(l.date):""}),e("div",{className:"max-w-[640px]",children:e(g,{entry:l})})]},p))})]}):n("div",{children:[n("header",{className:"mx-auto flex max-w-[760px] flex-col items-center gap-6 text-center",children:[e(y,{eyebrow:t,title:r,intro:s,center:!0}),e(z,{cta:h})]}),e(k,{src:x,caption:c,meta:o,aspectClass:"mx-auto mt-12 aspect-[16/9] w-full max-w-[900px]",sizes:"(max-width: 900px) 100vw, 900px",editing:u}),a==="spine"?e("ol",{className:"relative mx-auto mt-16 max-w-[760px]",children:d.map((l,p)=>n("li",{className:"relative border-l border-line pb-12 pl-10 last:pb-0 max-[700px]:pl-8",children:[e("span",{className:"absolute left-[-5px] top-1.5 h-2.5 w-2.5 rounded-full bg-accent",style:S}),e("div",{className:`mb-2 font-mono ${i.labelLarge} tracking-[0.24em] text-accent`,children:l.date?m(l.date):""}),e("div",{className:"max-w-[640px]",children:e(g,{entry:l})})]},p))}):n("ol",{className:"relative mx-auto mt-16 max-w-[1000px]",children:[e("span",{"aria-hidden":!0,className:"pointer-events-none absolute top-0 h-full w-px bg-line left-[7px] min-[801px]:left-1/2 min-[801px]:-translate-x-1/2"}),d.map((l,p)=>{const v=p%2===0;return n("li",{className:"relative mb-14 pl-8 last:mb-0 min-[801px]:grid min-[801px]:grid-cols-2 min-[801px]:gap-16 min-[801px]:pl-0",children:[e("span",{className:"absolute top-1.5 h-2.5 w-2.5 rounded-full bg-accent left-[2px] min-[801px]:left-1/2 min-[801px]:-translate-x-1/2",style:S}),n("div",{className:v?"min-[801px]:col-start-1 min-[801px]:pr-8 min-[801px]:text-right":"min-[801px]:col-start-2 min-[801px]:pl-8",children:[e("div",{className:`mb-2 font-mono ${i.labelLarge} tracking-[0.24em] text-accent`,children:l.date?m(l.date):""}),e("div",{className:["max-w-[520px] max-[800px]:max-w-none",v?"min-[801px]:ml-auto":""].join(" "),children:e(g,{entry:l})})]})]},p)})]})]})})})}export{F as default};
@@ -1 +1 @@
1
- import{jsx as t,jsxs as a}from"react/jsx-runtime";import{SiteLink as w}from"../lib/site-runtime.js";import z from"./EditorialSectionHead.js";import c from"./PartStyledText.js";import{withRMark as l}from"./RMark.js";import{renderGold as f,renderHeadline as S}from"./goldPhrases.js";function B({eyebrow:g,title:o,intro:p,entries:u,cta:n,padTop:x,padBottom:s,background:b,editing:h,omitHead:d=!1}={}){const v=typeof x=="number"?x:120,N=typeof s=="number"?s:120,m=b??"var(--section-bg)",y=m!=="transparent",r=(u??[]).filter(e=>(e.date??"").trim()||(e.title??"").trim()||(e.blurb??"").trim());if(r.length===0&&!h)return null;const j=r.filter(e=>!e.future).length,k=r.length?j/r.length*100:0;return t("section",{className:"relative z-[2]",children:a("div",{className:"mx-auto max-w-[var(--sf-site-width,1600px)] border-b border-line px-[var(--sf-site-gutter,40px)] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]",style:{paddingTop:v,paddingBottom:N,...y?{backgroundColor:m}:{}},children:[d?null:t(z,{num:g,title:o?S(o):void 0,desc:p?f(p,!0):void 0,spaceBelow:"",className:"text-fg"}),a("div",{className:d?"relative mt-0 grid grid-cols-[repeat(var(--cols),minmax(0,1fr))] gap-0 border-t border-line pt-[60px] max-[1100px]:mt-0 max-[1100px]:grid-cols-1 max-[1100px]:gap-0 max-[1100px]:border-t-0 max-[1100px]:pt-0":"relative mt-[60px] grid grid-cols-[repeat(var(--cols),minmax(0,1fr))] gap-0 border-t border-line pt-[60px] max-[1100px]:mt-9 max-[1100px]:grid-cols-1 max-[1100px]:gap-0 max-[1100px]:border-t-0 max-[1100px]:pt-0",style:{"--cols":r.length},children:[t("div",{className:"pointer-events-none absolute inset-x-0 top-0 h-px bg-line max-[1100px]:hidden",children:t("div",{className:"absolute -top-px left-0 h-[3px] bg-gradient-to-r from-accent to-transparent",style:{width:`${k}%`}})}),r.map((e,i)=>a("div",{className:["relative flex min-h-[280px] flex-col gap-3.5 px-3.5","border-l",e.future?"border-line":"max-[1100px]:border-accent border-line",i===0?"min-[1101px]:border-l-0":"","max-[1100px]:min-h-0 max-[1100px]:border-t-0 max-[1100px]:py-6 max-[1100px]:pl-7 max-[1100px]:ml-1.5"].join(" "),children:[t("span",{className:["pointer-events-none absolute h-2.5 w-2.5 rounded-full border-2 border-bg",e.future?"border-line bg-surface-2":"bg-accent",i===0?"-top-[66px] left-[-1px]":"-top-[66px] left-[-5px]","max-[1100px]:left-[-5px] max-[1100px]:top-7"].join(" ")}),t("span",{className:["font-mono text-[length:var(--size-label,13px)] tracking-[0.22em]",e.future?"text-fg-dim":"text-accent"].join(" "),children:e.date?t(c,{value:e.date,children:l(e.date)}):""}),e.title&&t("h3",{className:"whitespace-pre-line font-heading3 text-[length:var(--size-headingSmall,20px)] font-medium uppercase leading-[1.1] tracking-[-0.02em] text-fg",children:t(c,{value:e.title,children:l(e.title)})}),e.blurb&&t("p",{className:"mt-auto font-display text-[length:var(--size-body,13px)] leading-[1.55] text-fg-dim",children:f(e.blurb,!0)})]},i))]}),n?.text&&t("div",{className:"mt-12 flex justify-end border-t border-line pt-8",children:a(w,{href:n.href,className:"group inline-flex items-center gap-3.5 border border-line px-6 py-4 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.3em] text-fg transition-colors hover:border-accent hover:text-accent",children:[l(n.text),t("span",{"aria-hidden":!0,className:"text-accent transition-transform group-hover:translate-x-[3px]",children:"→"})]})})]})})}export{B as default};
1
+ import{jsx as t,jsxs as a}from"react/jsx-runtime";import{SiteLink as S}from"../lib/site-runtime.js";import T from"./EditorialSectionHead.js";import f from"./PartStyledText.js";import{withRMark as o}from"./RMark.js";import{renderGold as b,renderHeadline as $}from"./goldPhrases.js";const n={body:"text-[length:var(--size-body,13px)]",headingSmall:"text-[length:var(--size-headingSmall,20px)]",label:"text-[length:var(--size-label,13px)]"};function z({eyebrow:g,title:p,intro:x,entries:u,cta:l,padTop:s,padBottom:d,background:h,editing:v,omitHead:m=!1}={}){const N=typeof s=="number"?s:120,y=typeof d=="number"?d:120,c=h??"var(--section-bg)",j=c!=="transparent",r=(u??[]).filter(e=>(e.date??"").trim()||(e.title??"").trim()||(e.blurb??"").trim());if(r.length===0&&!v)return null;const k=r.filter(e=>!e.future).length,w=r.length?k/r.length*100:0;return t("section",{className:"relative z-[2]",children:a("div",{className:"mx-auto max-w-[var(--sf-site-width,1600px)] border-b border-line px-[var(--sf-site-gutter,40px)] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]",style:{paddingTop:N,paddingBottom:y,...j?{backgroundColor:c}:{}},children:[m?null:t(T,{num:g,title:p?$(p):void 0,desc:x?b(x,!0):void 0,spaceBelow:"",className:"text-fg"}),a("div",{className:m?"relative mt-0 grid grid-cols-[repeat(var(--cols),minmax(0,1fr))] gap-0 border-t border-line pt-[60px] max-[1100px]:mt-0 max-[1100px]:grid-cols-1 max-[1100px]:gap-0 max-[1100px]:border-t-0 max-[1100px]:pt-0":"relative mt-[60px] grid grid-cols-[repeat(var(--cols),minmax(0,1fr))] gap-0 border-t border-line pt-[60px] max-[1100px]:mt-9 max-[1100px]:grid-cols-1 max-[1100px]:gap-0 max-[1100px]:border-t-0 max-[1100px]:pt-0",style:{"--cols":r.length},children:[t("div",{className:"pointer-events-none absolute inset-x-0 top-0 h-px bg-line max-[1100px]:hidden",children:t("div",{className:"absolute -top-px left-0 h-[3px] bg-gradient-to-r from-accent to-transparent",style:{width:`${w}%`}})}),r.map((e,i)=>a("div",{className:["relative flex min-h-[280px] flex-col gap-3.5 px-3.5","border-l",e.future?"border-line":"max-[1100px]:border-accent border-line",i===0?"min-[1101px]:border-l-0":"","max-[1100px]:min-h-0 max-[1100px]:border-t-0 max-[1100px]:py-6 max-[1100px]:pl-7 max-[1100px]:ml-1.5"].join(" "),children:[t("span",{className:["pointer-events-none absolute h-2.5 w-2.5 rounded-full border-2 border-bg",e.future?"border-line bg-surface-2":"bg-accent",i===0?"-top-[66px] left-[-1px]":"-top-[66px] left-[-5px]","max-[1100px]:left-[-5px] max-[1100px]:top-7"].join(" ")}),t("span",{className:[`font-mono ${n.label} tracking-[0.22em]`,e.future?"text-fg-dim":"text-accent"].join(" "),children:e.date?t(f,{value:e.date,children:o(e.date)}):""}),e.title&&t("h3",{className:`whitespace-pre-line font-heading3 ${n.headingSmall} font-medium uppercase leading-[1.1] tracking-[-0.02em] text-fg`,children:t(f,{value:e.title,children:o(e.title)})}),e.blurb&&t("p",{className:`mt-auto font-display ${n.body} leading-[1.55] text-fg-dim`,children:b(e.blurb,!0)})]},i))]}),l?.text&&t("div",{className:"mt-12 flex justify-end border-t border-line pt-8",children:a(S,{href:l.href,className:`group inline-flex items-center gap-3.5 border border-line px-6 py-4 font-mono ${n.label} uppercase tracking-[0.3em] text-fg transition-colors hover:border-accent hover:text-accent`,children:[o(l.text),t("span",{"aria-hidden":!0,className:"text-accent transition-transform group-hover:translate-x-[3px]",children:"→"})]})})]})})}export{z as default};
@@ -1 +1 @@
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};
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{TemplateIcon as re}from"efficient-easel/icons";import{Subtree as ne,TreeRow as y}from"efficient-easel/tree";import{useEasel as ie}from"efficient-easel/easel";import{useEaselStrings as B}from"efficient-easel/strings";import{LocationsTreeContext as se}from"./LocationsTreeContext.js";import ae from"./PagesPanel.js";import{usePreviewChat as ce}from"./PreviewChatContext.js";import{PREVIEW_DEVICES as le}from"./preview-devices.js";import{PreviewDeviceContext as de}from"./PreviewDeviceContext.js";import{usePreviewHeader as pe}from"./PreviewHeaderContext.js";import{usePreviewSocial as me}from"./PreviewSocialContext.js";import{usePreviewSurface as fe}from"./PreviewSurfaceContext.js";import{TICKER_PART_LABEL as ue,usePreviewTicker as Se}from"./PreviewTickerContext.js";import{usePreviewHeroPart as we}from"./PreviewHeroPartContext.js";import{HERO_MEDIA_PARTS as Ee,HERO_PART_MODE as H,heroMediaRows as he,heroPartId as N,readHeroPartId as Pe}from"../lib/puck/hero-media-parts.js";import Te,{CHAT_MODE as be,HEADER_MODE as D,SOCIAL_MODE as ge,WEBSITE_MODE as W}from"./SectionEditor.js";import L from"./SectionIcon.js";import Ie from"./SectionThumbnail.js";import{useStorefrontDocument as R}from"./StorefrontDocumentContext.js";import ve from"./StylesPanel.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 Ye}from"../lib/puck/add-target.js";import{blockIsOffered as Ge}from"../lib/puck/block-offer.js";import{sectionIdOfBoxZone as Fe,setBookingPreview as ze}from"../lib/puck/booking-preview.js";import{footerBlockRowName as je}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}=Se(),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(ue),onSelect:()=>a(m),selected:p===m,rowProps:{onClick:u(()=>a(m))},words:l})}}}function Y({mode:e,select:t}){const{setSelectedHeroPart:o,setSelectHandler:n}=we(),l=B().tree,{appState:d}=ie(f=>f),p=d.data.content??[],a=X(p);a.current=p;const i=e,u=Ee.find(f=>H[f]===i.kind),m=u&&"nodeId"in i?N(String(i.nodeId),u):null,E=_(f=>{const s=Pe(f);if(!s)return;const h=a.current.findIndex(S=>String(S.props.id)===s.nodeId);if(h<0)return;const T={kind:H[s.part],nodeId:s.nodeId};t({index:h},T)},[t]);return b(()=>{o(m)},[m,o]),b(()=>{n(E)},[n,E]),{partRows:(f,{rowClick:s})=>{const h=String(f.props.id),T=he(f);if(T.length===0)return null;const S=I=>{const g=N(h,I.part);return r(y,{icon:r(L,{type:I.part==="media"?"heroMedia":"heroImage",size:13}),name:c(I.label),onSelect:()=>E(g),selected:m===g,rowProps:{onClick:s(()=>E(g))},words:l},g)},[w,...P]=T;return k(A,{children:[S(w),P.length>0&&r(ne,{children:P.map(S)})]})}}}function G(e,t){return{partRows:(o,n)=>k(A,{children:[e.partRows?.(o,n),t.partRows?.(o,n)]})}}function Et(e){const{adapter:t,capabilities:o,currentSlug:n,siteId:l,docId:d,hasUnsavedEdits:p,bridgeCapabilities:a,notifyParent:i,token:u}=R(),{hasPreviewLink:m}=o,E=wt(He()).preview?.draftLink,f=Be(e.data),s=mt({hasTrustedConsole:!!u,canCreatePlatformTemplate:a.canCreatePlatformTemplate,capabilities:o,siteId:l,hasUnsavedEdits:p}),h=_(()=>{!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:h,rightIcon:r(re,{size:15}),children:c("Save as Template")})})}),barTrail:()=>m&&n&&r(Re,{liveHref:S,pageId:d??null,draftLink:E}),mainAction:f}}function ht(){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,E]=J(Oe[0].id),{surface:f,setSurface:s}=fe(),h=()=>{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(ae,{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(ht,{}),active:e.kind==="website",onSelect:h}),a&&S.push({id:"styles",label:c("Site styles"),icon:r(oe,{}),panel:({onHide:w,notify:P})=>r(ve,{tokenRef:d,siteId:l??void 0,onClose:w,onNotify:P,tab:m,onTabChange:E})}),{railLead:[T],railTrail:S,resolveLeftView:(w,P)=>qe(w,a,P),openSettings:h,openStyles:()=>{E(Ae),u("styles")}}}function Tt(e,t,o,n){const{kind:l,open:d}=e,{selected:p,zoneOf:a}=t;b(()=>{ze(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:E}=pe(),{chat:f,setChat:s,setSelected:h,setSelectHandler:T}=ce(),S=l==="header";b(()=>{m(S)},[S,m]),b(()=>{E(()=>d(D))},[E,d]);const w=_(()=>d(be),[d]),P=l==="chat";b(()=>{h(P)},[P,h]),b(()=>{T(w)},[T,w]);const{setOpenHandler:I}=me(),g=_(()=>d(ge),[d]);b(()=>{I(g)},[I,g]);const j=G(V(e),Y(e)),K=Et(t),U=Pt(e,n),Z=o.device;return{...j,...K,...U,hasOwnRows:v=>v.type===ke,ownRows:i.renderLocationTree,sectionPressed:i.sectionPressed,wrap:v=>r(se.Provider,{value:!0,children:r(de.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(Ye(e,t)),blockIsOffered:Ge},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:je,plainText:xe,Icon:L,Thumbnail:Ie,useProducts:St},kt={desktop:2e3,tablet:800,mobile:390},z="desktop",_t={options:le,initial:z,fluid:z,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{...G(V(e),Y(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:Te};export{Bo as WEBSITE_SCREEN};