efficient-web-builder 26.1.1 → 26.3.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 (46) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/dist/editor/components/ShadowColourField.js +1 -1
  3. package/dist/editor/components/SwitchToBoxFooter.js +1 -1
  4. package/dist/editor/components/usePinnedChromeSeed.js +1 -1
  5. package/dist/editor/lib/editor-document-adapter.js +1 -1
  6. package/dist/editor/lib/puck/ColourControl.d.ts +11 -1
  7. package/dist/editor/lib/puck/ColourControl.js +1 -1
  8. package/dist/editor/lib/puck/blocks/general/ButtonBlock/fields.js +1 -1
  9. package/dist/editor/lib/puck/blocks/general/Divider/fields.js +1 -1
  10. package/dist/editor/lib/puck/blocks/general/LogoBlock/fields.js +1 -1
  11. package/dist/editor/lib/puck/blocks/general/TitleWithButtons/fields.js +1 -1
  12. package/dist/editor/lib/puck/blocks/general/index.d.ts +2 -2
  13. package/dist/editor/lib/puck/box-footer.js +1 -0
  14. package/dist/editor/lib/puck/controls.d.ts +6 -1
  15. package/dist/editor/lib/puck/controls.js +1 -1
  16. package/dist/format/lib/content/block-align.d.ts +2 -0
  17. package/dist/format/lib/content/block-align.js +1 -0
  18. package/dist/format/lib/content/box-layout.d.ts +3 -0
  19. package/dist/format/lib/content/box-layout.js +1 -1
  20. package/dist/format/lib/editor-words-catalogue.d.ts +5 -1
  21. package/dist/format/lib/editor-words-catalogue.js +4 -4
  22. package/dist/format/lib/hero-arrows.d.ts +1 -1
  23. package/dist/format/lib/reel.d.ts +1 -1
  24. package/dist/format/lib/theme.d.ts +4 -0
  25. package/dist/format/lib/theme.js +2 -2
  26. package/dist/render/components/BoxCellWidthContext.d.ts +2 -0
  27. package/dist/render/components/BoxCellWidthContext.js +1 -0
  28. package/dist/render/components/ButtonBlock.d.ts +4 -2
  29. package/dist/render/components/ButtonBlock.js +1 -1
  30. package/dist/render/components/Divider.d.ts +4 -1
  31. package/dist/render/components/Divider.js +1 -1
  32. package/dist/render/components/Flex.d.ts +1 -1
  33. package/dist/render/components/Flex.js +1 -1
  34. package/dist/render/components/Heading.d.ts +1 -1
  35. package/dist/render/components/Logo.d.ts +1 -0
  36. package/dist/render/components/Logo.js +1 -1
  37. package/dist/render/components/LogoBlock.d.ts +3 -1
  38. package/dist/render/components/LogoBlock.js +1 -1
  39. package/dist/render/components/Text.d.ts +1 -1
  40. package/dist/render/lib/puck/blocks/general/ButtonBlock/render.js +1 -1
  41. package/dist/render/lib/puck/blocks/general/Divider/render.js +1 -1
  42. package/dist/render/lib/puck/blocks/general/LogoBlock/render.js +1 -1
  43. package/dist/render/lib/puck/passes/section-padding.js +1 -1
  44. package/package.json +1 -1
  45. package/dist/format/lib/puck/box-footer.js +0 -1
  46. /package/dist/{format → editor}/lib/puck/box-footer.d.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,81 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 26.3.0 - 2026-10-20
6
+
7
+ **The old footer's settings come with it to the Box footer** (box footer gaps). A minor: new optional rows on the Logo block, Divider and Box, none seeded, so every stored page draws what it drew.
8
+
9
+ - **"Switch to Box footer" carries every old footer setting it can.** Each one
10
+ lands on the block it becomes, as that block's own setting, and is drawn
11
+ (`scripts/test-box-footer-carries.tsx`, one case per setting):
12
+ - Footer Logo: Width 40-400% becomes the Logo block's Height (44px x %),
13
+ plus its Alignment, its four paddings, its link home, its Logo color
14
+ (a Custom color with its color), and the long-name fit. The tagline stays under the logo, with its own size, line height,
15
+ 280px cap and alignment.
16
+ - Footer Text: Size S / M / L becomes the text's own 12 / 13 / 15px.
17
+ - Footer Divider: Thickness, Length and Hide on phone.
18
+ - Footer Box: Gap in px on its own 8 / 16 / 32 scale (unset 16), and
19
+ Alignment, End included.
20
+ - Footer: Width Full becomes the footer group's `fullWidth` (the switch the
21
+ header group has, from efficient-storefront-blocks; it keeps the site's
22
+ side gutter, which a Box's own Full width does not). A Divider still
23
+ spans the whole row: the row is split around it.
24
+ - **New rows on existing blocks** (no new block):
25
+ - Logo block: Alignment; Padding on all four sides (the one four-side
26
+ Padding row Heading and Text have); its Height now runs to 176px
27
+ (`LOGO_BLOCK_PX_MAX`). The header's own logo slider keeps 140.
28
+ - Divider: Thickness, Length, Hide on phone. Thickness is hidden for the
29
+ stripe styles, which have a height of their own.
30
+ - Box: Item alignment gains End.
31
+ - **A Logo block fits a long store name to its cell**, as the old footer
32
+ logo did, but only where the cell has a width of its own (a row that shares
33
+ its width, or a stack that stretches; `BoxCellWidthContext`).
34
+ - **Unchanged for anything already published:** none of the new settings is
35
+ seeded, so an untouched Logo block, Divider or Box draws the same markup.
36
+ - **Not carried yet:** the old footer's columns per view and its two "Logo
37
+ fills" toggles. They wait on a per-view value field in efficient-easel.
38
+ - **One alignment map.** `lib/content/block-align` holds `BlockAlign` and
39
+ `BLOCK_ALIGN_JUSTIFY`; the Button block and the Logo block read it (the
40
+ Button block had its own copy), and Heading and Text take the type from it.
41
+
42
+ ## 26.2.0 - 2026-10-20
43
+
44
+ **A Button block has its own fill and text colour** (layered-rebuild plan item 10; Lewis approved it in the Layered Rebuild Samples). A minor: two new optional keys, and every stored button draws what it drew.
45
+
46
+ ### Added for merchants
47
+
48
+ - **Button > Design > Fill color and Text color.** The house colour row (the shell swatch and hex, the reset at the end), the same words and glyphs as the email designer's Button block (`ground`, `text-color`). Empty follows the site style Button colour (`var(--btn)` / `var(--btn-ink)`): the row shows that colour in grey and stores nothing. A set fill paints the background and border of a Filled button, and only the outline of an Outline button; a set text colour paints the words.
49
+
50
+ ### Added for hosts
51
+
52
+ - `colorInput(label, fallback, icon?)` takes `FOLLOWS_SITE_BUTTON` / `FOLLOWS_SITE_BUTTON_INK` in place of a hex, and an optional glyph. `siteButtonPaint(theme)` in `lib/theme` says what the site's button paints.
53
+ - `lib/puck/ColourControl` `InheritedColourRow`: the ONE colour row that follows something while empty (grey swatch, ↺ once set). The Button block's two rows and Site styles' `Shadow color` (`components/ShadowColourField`, which drew the same parts itself) are it. Nothing a merchant sees moves on `Shadow color`.
54
+
55
+ ### Guards
56
+
57
+ - New `scripts/test-button-block-colours.tsx` (3): both rows wear a glyph, show the site Button colour in grey while empty and offer the reset once set; an unset button draws the same bytes; every stored value reaches the drawn button through the block's render, Filled and Outline. Red before the change (no rows; no inline colour).
58
+ - `scripts/test-one-colour-control.tsx` §11: no file but `lib/puck/ColourControl` composes an inherited colour row. `scripts/test-site-style-reset-clears.tsx` opens `Shadow color` through `InheritedColourRow`.
59
+
60
+ **Title With Buttons calls the filled look "Filled", like the Button block** (one word per idea). A patch.
61
+
62
+ ### Changed for merchants
63
+
64
+ - **Title With Buttons > Style says "Filled" / "Outline".** It said "Primary (Theme Color)" for the look the Button block calls "Filled" (doc/naming.md N10.1), with a bracket tail (N10.5). Only the word changes: the stored `primary` / `outline` and the default `outline` stay.
65
+
66
+ ### Guards
67
+
68
+ - `scripts/test-button-style-one-word.tsx` (new): both blocks' look rows say Style, the filled look is Filled and the line look is Outline in both, no Ghost, no Primary, no bracket tail, stored values unchanged. Red before the change.
69
+
70
+ **A Publish stopped by a change that could not be saved says so in plain words** (GG 2026-10-20). A MINOR: one phrase is added.
71
+
72
+ ### Changed for merchants
73
+
74
+ - Where Publish is the whole site's, a waiting write that fails (the Site styles queue, the live chat) stops the Publish, as in 26.0.0. The press now fails with "A change waiting to go live could not be saved." instead of that write's own error. The screen shows it through easel's `publish-failed` (efficient-easel #301). The write's error stays as the `cause`.
75
+
76
+ ### Guards
77
+
78
+ - `scripts/test-site-publish.tsx` §6: the plain words, and the write's error as their cause.
79
+
5
80
  ## 26.1.1 - 2026-10-20
6
81
 
7
82
  **Site styles rows line up with the panel again, and an unset row says Default** (Lewis's screenshot of the INOVIT editor, 2026-10-20). A PATCH: no export changes.
@@ -1 +1 @@
1
- "use client";import{jsx as e}from"react/jsx-runtime";import{SettingsDefaultReset as d,SettingsField as i}from"efficient-easel/panel";import{ShadowIcon as s}from"efficient-easel/icons";import{say as t,editorEaselWords as f}from"../../format/lib/editor-words.js";import{ColourControl as h}from"../lib/puck/ColourControl.js";import{DEFAULT_SHADOW_COLOR as l}from"../../format/lib/theme.js";const u="Most useful on a dark theme, where a black shadow cannot be seen. Also used by the Lift hover, even with the card shadow off.";function c({value:r,onChange:n,showHint:a=!0}){const o=r===null;return e(i,{label:t("Shadow color"),icon:e(s,{}),changed:!o,action:h({value:r??"",inherited:o?l:void 0,onChange:n,label:"Shadow color",after:e(d,{words:f()?.panel,label:t("Shadow color"),changed:!o,detail:l,onReset:()=>n(null)})}),hint:a?t(u):void 0})}export{c as default};
1
+ "use client";import{jsx as t}from"react/jsx-runtime";import{ShadowIcon as i}from"efficient-easel/icons";import{say as r}from"../../format/lib/editor-words.js";import{InheritedColourRow as a}from"../lib/puck/ColourControl.js";import{DEFAULT_SHADOW_COLOR as n}from"../../format/lib/theme.js";const l="Most useful on a dark theme, where a black shadow cannot be seen. Also used by the Lift hover, even with the card shadow off.";function d({value:o,onChange:e,showHint:s=!0}){const h=o===null;return t(a,{label:r("Shadow color"),icon:t(i,{}),value:o??"",inherited:n,resetTo:n,onChange:e,onReset:()=>e(null),hint:s?r(l):void 0})}export{d as default};
@@ -1 +1 @@
1
- "use client";import{jsx as r,Fragment as g,jsxs as y}from"react/jsx-runtime";import{useState as k}from"react";import{createNode as w,newId as x}from"efficient-easel/data";import{useEasel as F}from"efficient-easel/easel";import{Banner as S,Button as s}from"efficient-shell/ui";import{useStorefrontDocument as T}from"./StorefrontDocumentContext.js";import{boxFooterFromFooter as B}from"../../format/lib/puck/box-footer.js";import{FOOTER_TYPE as E}from"../lib/puck/footer-blocks.js";import{SITE_FOOTER_TYPE as a,withSectionGroup as _}from"../../format/lib/puck/section-groups.js";import{say as t}from"../../format/lib/editor-words.js";function O(){const{appState:c,dispatch:m,config:l}=F(o=>o),{readOnly:f}=T(),[u,n]=k(!1),i=c.data.content;if(f||i.some(o=>o.type===a))return null;const p=i.find(o=>o.type===E)??null,d=(o,e)=>w(l,o,e),h=()=>{const o=B(p,d,x(a));m({type:"setData",data:e=>({...e,content:[..._(e.content,o)]}),recordHistory:!0}),n(!1)};return r(S,{tone:"info",title:t("This footer uses the old layout"),action:u?y(g,{children:[r(s,{variant:"primary",size:"sm",onClick:h,children:t("Switch now")}),r(s,{variant:"secondary",size:"sm",onClick:()=>n(!1),children:t("Cancel")})]}):r(s,{variant:"secondary",size:"sm",onClick:()=>n(!0),children:t("Switch to Box footer")}),children:t("Build this footer out of Boxes and blocks, like a page: the same menus, signup, social links and logo, with the copyright as a Legal Line. Your current footer is kept.")})}export{O as default};
1
+ "use client";import{jsx as r,Fragment as g,jsxs as y}from"react/jsx-runtime";import{useState as k}from"react";import{createNode as w,newId as x}from"efficient-easel/data";import{useEasel as F}from"efficient-easel/easel";import{Banner as S,Button as s}from"efficient-shell/ui";import{useStorefrontDocument as T}from"./StorefrontDocumentContext.js";import{boxFooterFromFooter as B}from"../lib/puck/box-footer.js";import{FOOTER_TYPE as E}from"../lib/puck/footer-blocks.js";import{SITE_FOOTER_TYPE as a,withSectionGroup as _}from"../../format/lib/puck/section-groups.js";import{say as t}from"../../format/lib/editor-words.js";function O(){const{appState:c,dispatch:m,config:l}=F(o=>o),{readOnly:f}=T(),[u,n]=k(!1),i=c.data.content;if(f||i.some(o=>o.type===a))return null;const p=i.find(o=>o.type===E)??null,d=(o,e)=>w(l,o,e),h=()=>{const o=B(p,d,x(a));m({type:"setData",data:e=>({...e,content:[..._(e.content,o)]}),recordHistory:!0}),n(!1)};return r(S,{tone:"info",title:t("This footer uses the old layout"),action:u?y(g,{children:[r(s,{variant:"primary",size:"sm",onClick:h,children:t("Switch now")}),r(s,{variant:"secondary",size:"sm",onClick:()=>n(!1),children:t("Cancel")})]}):r(s,{variant:"secondary",size:"sm",onClick:()=>n(!0),children:t("Switch to Box footer")}),children:t("Build this footer out of Boxes and blocks, like a page: the same menus, signup, social links and logo, with the copyright as a Legal Line. Your current footer is kept.")})}export{O as default};
@@ -1 +1 @@
1
- "use client";import{useEffect as G,useRef as L}from"react";import{createNode as x,newId as z}from"efficient-easel/data";import{useEaselApi as U}from"efficient-easel/easel";import{useStorefrontDocument as Z}from"./StorefrontDocumentContext.js";import{SITE_FOOTER_SLUG as H}from"../../format/lib/content/footer.js";import{boxFooterFromFooter as B}from"../../format/lib/puck/box-footer.js";import{ROOT_ZONE as l,missingPinnedTypes as j,pinnedDuplicateIds as P}from"efficient-easel/draw";import{FOOTER_TYPE as c,HEADER_TYPE as p,buildDefaultFooterBlocks as D,buildDefaultHeaderNode as E}from"../lib/puck/footer-blocks.js";import{canSeedPinnedChrome as q}from"../lib/puck/pinned-seed-gate.js";import{siteFooterDocChrome as J,SITE_FOOTER_TYPE as f}from"../../format/lib/puck/section-groups.js";import{inPlaceSeedPlan as K}from"../lib/puck/pinned-in-place-seed.js";function se(t,F){const{adapter:k,capabilities:T,currentSlug:O,docId:u,data:y,saveStatus:I}=Z(),{hasSiteSettings:N,hasPinnedChrome:b}=T,C=!!T.editsPinnedInPlace&&O!==H,R=O===H,_=U().getState,v=L(null);G(()=>{if(!q({docId:u,saveStatus:I,seededDocId:v.current})||(v.current=u,!b))return;const m=_().appState.data,o=m.content,a=y?.content??[],d=(e,n)=>e.some(r=>r?.type===n);if(!N){const e=new Set(P(o)),n=e.size?o.filter(s=>!e.has(s.props.id)):o;e.size&&t.setDocument({...m,content:n});const r=j(n,a);if(r.includes(c)){const s=n.length,i=t.insertSection(c,s);t.replaceComponent(l,s,{type:c,props:{id:i,blocks:D()}})}r.includes(p)&&t.insertNode(l,0,E());return}if(R){const e=J(o);if(e!==o&&t.setDocument({...m,content:[...e]}),!e.find(r=>r.type===c)&&!d(a,c)&&!d(e,f)&&!d(a,f)){const r=(i,g)=>x(F,i,g),s={type:c,props:{blocks:D()}};t.insertNode(l,e.length,B(s,r,z(f)))}return}if(C){const e=!!k?.pinnedChrome?.state().docId,n=K(o,{hasChromeDoc:e}),r=new Set([...n.remove,...P(o.filter(i=>!n.remove.includes(String(i.props.id))))]),s=r.size?o.filter(i=>!r.has(String(i.props.id))):o;if(s.length!==o.length&&t.setDocument({...m,content:s}),n.seedFooter&&!d(a,c)&&!d(a,f)){const i=(Y,A)=>x(F,Y,A),g={type:c,props:{blocks:D()}};t.insertNode(l,s.length,B(g,i,z(f)))}if(n.seedHeader&&!d(a,p)){const i=s[0]?.type==="SiteHeader"?1:0;t.insertNode(l,i,E())}return}const h=o.filter(e=>e.type!==c),w=new Set(P(h)),S=w.size?h.filter(e=>!w.has(e.props.id)):h;S.length!==o.length&&t.setDocument({...m,content:S}),!d(S,p)&&!d(a,p)&&t.insertNode(l,0,E())},[u,I,y,_,t,N,b,R,C,k])}export{se as usePinnedChromeSeed};
1
+ "use client";import{useEffect as G,useRef as L}from"react";import{createNode as x,newId as z}from"efficient-easel/data";import{useEaselApi as U}from"efficient-easel/easel";import{useStorefrontDocument as Z}from"./StorefrontDocumentContext.js";import{SITE_FOOTER_SLUG as H}from"../../format/lib/content/footer.js";import{boxFooterFromFooter as B}from"../lib/puck/box-footer.js";import{ROOT_ZONE as l,missingPinnedTypes as j,pinnedDuplicateIds as P}from"efficient-easel/draw";import{FOOTER_TYPE as c,HEADER_TYPE as p,buildDefaultFooterBlocks as D,buildDefaultHeaderNode as E}from"../lib/puck/footer-blocks.js";import{canSeedPinnedChrome as q}from"../lib/puck/pinned-seed-gate.js";import{siteFooterDocChrome as J,SITE_FOOTER_TYPE as f}from"../../format/lib/puck/section-groups.js";import{inPlaceSeedPlan as K}from"../lib/puck/pinned-in-place-seed.js";function se(t,F){const{adapter:k,capabilities:T,currentSlug:O,docId:u,data:y,saveStatus:I}=Z(),{hasSiteSettings:N,hasPinnedChrome:b}=T,C=!!T.editsPinnedInPlace&&O!==H,R=O===H,_=U().getState,v=L(null);G(()=>{if(!q({docId:u,saveStatus:I,seededDocId:v.current})||(v.current=u,!b))return;const m=_().appState.data,o=m.content,a=y?.content??[],d=(e,n)=>e.some(r=>r?.type===n);if(!N){const e=new Set(P(o)),n=e.size?o.filter(s=>!e.has(s.props.id)):o;e.size&&t.setDocument({...m,content:n});const r=j(n,a);if(r.includes(c)){const s=n.length,i=t.insertSection(c,s);t.replaceComponent(l,s,{type:c,props:{id:i,blocks:D()}})}r.includes(p)&&t.insertNode(l,0,E());return}if(R){const e=J(o);if(e!==o&&t.setDocument({...m,content:[...e]}),!e.find(r=>r.type===c)&&!d(a,c)&&!d(e,f)&&!d(a,f)){const r=(i,g)=>x(F,i,g),s={type:c,props:{blocks:D()}};t.insertNode(l,e.length,B(s,r,z(f)))}return}if(C){const e=!!k?.pinnedChrome?.state().docId,n=K(o,{hasChromeDoc:e}),r=new Set([...n.remove,...P(o.filter(i=>!n.remove.includes(String(i.props.id))))]),s=r.size?o.filter(i=>!r.has(String(i.props.id))):o;if(s.length!==o.length&&t.setDocument({...m,content:s}),n.seedFooter&&!d(a,c)&&!d(a,f)){const i=(Y,A)=>x(F,Y,A),g={type:c,props:{blocks:D()}};t.insertNode(l,s.length,B(g,i,z(f)))}if(n.seedHeader&&!d(a,p)){const i=s[0]?.type==="SiteHeader"?1:0;t.insertNode(l,i,E())}return}const h=o.filter(e=>e.type!==c),w=new Set(P(h)),S=w.size?h.filter(e=>!w.has(e.props.id)):h;S.length!==o.length&&t.setDocument({...m,content:S}),!d(S,p)&&!d(a,p)&&t.insertNode(l,0,E())},[u,I,y,_,t,N,b,R,C,k])}export{se as usePinnedChromeSeed};
@@ -1 +1 @@
1
- "use client";import{SITE_FOOTER_SLUG as g}from"../../format/lib/content/footer.js";import{offeredSetsOf as T}from"./editor-blocks.js";import{isBackendError as B}from"./editor-backend-error.js";import{isEfficientBackend as b}from"../../render/lib/editor-session.js";import{noteLoaded as O,notePublished as J,noteSaved as j,pageLiveState as _}from"./page-live-state.js";import{noteSiteLiveState as D,refreshSiteLiveState as E}from"./site-live-state.js";import{sendSiteWrites as G}from"../../format/lib/site-writes.js";import{spliceChrome as M,splitChrome as k}from"./pinned-chrome-doc.js";import{setActivePinnedChrome as N}from"../../format/lib/pinned-chrome-lock.js";import{backendOf as R}from"./website-session.js";function x(t){return!!(t?.publish&&t.liveState)}function U(t,o){return async(i,r)=>(await G(),(await t.publish(o)).state==="live"?D({state:"live",changes:[]}):E(0),{version:r??null})}function F(t,o,i){const r=o?{siteId:o}:void 0;return{resolve:s=>t.load({slug:s,...r}).then(e=>(e&&O(e.id,e.live),e)),saveLayout:(s,e,u,m)=>t.save(s,{layout:e},{version:u,clientId:m??""}).then(f=>(j(s,f.live),E(),f)),rereadVersion:t.version?s=>t.version(s):void 0,publish:x(i)?U(i,r):t.publish?(s,e)=>t.publish(s,e?{version:e}:void 0).then(u=>(J(s,u.live),u)):void 0,listPages:()=>t.list(r),createPage:t.create?s=>t.create({...s,...r}):void 0,deletePage:t.remove?(s,e)=>t.remove(s,e):void 0}}function V(t,o,i,r,s=!1){let e=null;const u=new Set;let m=!1,f={docId:null,lockHolder:null,conflict:null,saveFailed:!1,unpublished:!1,loadFailed:!1};const P=new Set,p=()=>{if(!e)return!1;const n=_(e.id);return n==="changed"||n==="never"||n===void 0&&m},h=n=>{f={...f,...n,docId:e?.id??null,unpublished:p()};for(const c of P)c()},y=n=>n&&typeof n=="object"&&!Array.isArray(n)?n:{},S=n=>!!e&&u.has(n),C={state:()=>f,subscribe:n=>(P.add(n),()=>{P.delete(n)})};return{resolve:async n=>{if(N(n===g?null:C),n===g)return i.resolve(n);let c=!1;const[d,a]=await Promise.all([i.resolve(n),t.load({slug:g,...o}).catch(()=>(c=!0,null))]);if(a){O(a.id,a.live);const v=y(a.layout);e={id:a.id,layout:v,version:a.version,savedJson:""}}else e=null;if(m=!1,!d||!e)return h({conflict:null,saveFailed:!1,loadFailed:c}),d;const l=M(y(d.layout),e.layout);return e.savedJson=JSON.stringify(k(l,e.layout).chrome),u.add(d.id),h({conflict:null,saveFailed:!1,loadFailed:!1}),{...d,layout:l}},saveLayout:async(n,c,d,a)=>{if(!e||!S(n))return i.saveLayout(n,c,d,a);const l=e,v=k(c,l.layout),H=await i.saveLayout(n,v.page,d,a),A=JSON.stringify(v.chrome);if(!v.chrome||A===l.savedJson||f.lockHolder)return H;try{const w=await t.save(l.id,{layout:v.chrome},{version:l.version,clientId:a??""});j(l.id,w.live),E(),l.layout=v.chrome,l.version=w.version,l.savedJson=A,m=!0,h({conflict:null,saveFailed:!1})}catch(w){B(w,"changed-elsewhere")?h({conflict:w.conflict??{savedBy:"",savedByYou:!1,secondsAgo:0}}):B(w,"lock-taken")?h({lockHolder:w.holder??{name:"",secondsSinceSeen:0,secondsSinceHeld:0}}):h({saveFailed:!0})}return H},publish:i.publish?async(n,c)=>{const d=await i.publish(n,c),a=e;if(a&&S(n)&&!s&&t.publish&&p()&&!f.lockHolder){const l=await t.publish(a.id,a.version?{version:a.version}:void 0);J(a.id,l.live),l.version!==null&&(a.version=l.version),m=!1,h({})}return d}:void 0,lock:r?{claim:async(n,c,d)=>{const a=await r.claim(n,c,d),l=e;if(l&&S(n))try{await r.claim(l.id,c,!1),f.lockHolder&&h({lockHolder:null})}catch(v){B(v,"lock-taken")&&h({lockHolder:v.holder??{name:"",secondsSinceSeen:0,secondsSinceHeld:0}})}return a},release:async(n,c)=>{await r.release(n,c);const d=e;d&&S(n)&&!f.lockHolder&&await r.release(d.id,c).catch(()=>{})}}:void 0,pinnedChrome:C}}function ne(t,o=R(),i=T(),r={}){const s=b(o),e=t?{siteId:t}:void 0,u=s?!!t:!0,m=o.site.update,f=s&&i.commerce&&i.service,P=!!r.editsPinnedInPlace&&f,p=x(o.site)?o.site:void 0,h=F(o.pages,t,p),y=P?V(o.pages,e,h,o.lock,!!p):null;return{capabilities:{canPublish:!!p||!!o.pages.publish,hasSiteSettings:s,hasSiteTheme:!!o.theme,placeholderFrames:!1,mediaEditing:!0,pageCreationInAdminForm:!o.pages.create,canDeletePagesInline:!!o.pages.remove,hasEditLock:!!o.lock,hasEditGuard:!0,hasPinnedChrome:f,editsPinnedInPlace:P,explainsSiteSettings:!1,hasSiteRecord:u,canEditSiteRecord:u&&!!m,hasPreviewLink:s||!!o.preview,hasCatalog:s&&i.commerce,hasForms:s&&i.service,hasBlog:!!o.blog&&i.service,offersCommerce:i.commerce,offersService:i.service},...h,...I(h.resolve),lock:o.lock,...y,site:u?()=>o.site.get(e):void 0,siteLiveState:p?()=>p.liveState(e):void 0,updateSite:u&&m?S=>m(S,e):void 0,previewHref:o.preview?S=>o.preview.href(S):void 0}}function te(t,o=R(),i=T()){const r=b(o),s=o.templates,e=s?s.pages(t):{list:()=>Promise.reject(new Error(L)),load:()=>Promise.reject(new Error(L)),save:()=>Promise.reject(new Error(L))};return{capabilities:{canPublish:!1,hasSiteSettings:!1,hasSiteTheme:!1,placeholderFrames:!0,mediaEditing:!1,pageCreationInAdminForm:!e.create,canDeletePagesInline:!!e.remove,hasEditLock:!1,hasEditGuard:!1,hasPinnedChrome:r&&i.commerce&&i.service,editsPinnedInPlace:!1,explainsSiteSettings:r,hasSiteRecord:!1,canEditSiteRecord:!1,hasPreviewLink:!1,hasCatalog:r&&i.commerce,hasForms:r&&i.service,hasBlog:!!o.blog&&i.service,offersCommerce:i.commerce,offersService:i.service},...F(e,void 0),...I(F(e,void 0).resolve),publish:void 0,templateName:s?()=>s.get(t).then(u=>u.name):void 0}}function I(t){return{resolve:o=>(N(null),t(o))}}const L="This editor's backend has no website templates.";export{ne as makeSitePageAdapter,te as makeTemplatePageAdapter};
1
+ "use client";import{SITE_FOOTER_SLUG as g}from"../../format/lib/content/footer.js";import{offeredSetsOf as b}from"./editor-blocks.js";import{isBackendError as B}from"./editor-backend-error.js";import{isEfficientBackend as T}from"../../render/lib/editor-session.js";import{noteLoaded as O,notePublished as J,noteSaved as j,pageLiveState as _}from"./page-live-state.js";import{noteSiteLiveState as D,refreshSiteLiveState as E}from"./site-live-state.js";import{say as G}from"../../format/lib/editor-words.js";import{sendSiteWrites as M}from"../../format/lib/site-writes.js";import{spliceChrome as U,splitChrome as k}from"./pinned-chrome-doc.js";import{setActivePinnedChrome as N}from"../../format/lib/pinned-chrome-lock.js";import{backendOf as R}from"./website-session.js";function x(t){return!!(t?.publish&&t.liveState)}function V(t,o){return async(s,r)=>{try{await M()}catch(e){throw new Error(G("A change waiting to go live could not be saved."),{cause:e})}return(await t.publish(o)).state==="live"?D({state:"live",changes:[]}):E(0),{version:r??null}}}function F(t,o,s){const r=o?{siteId:o}:void 0;return{resolve:i=>t.load({slug:i,...r}).then(e=>(e&&O(e.id,e.live),e)),saveLayout:(i,e,u,m)=>t.save(i,{layout:e},{version:u,clientId:m??""}).then(f=>(j(i,f.live),E(),f)),rereadVersion:t.version?i=>t.version(i):void 0,publish:x(s)?V(s,r):t.publish?(i,e)=>t.publish(i,e?{version:e}:void 0).then(u=>(J(i,u.live),u)):void 0,listPages:()=>t.list(r),createPage:t.create?i=>t.create({...i,...r}):void 0,deletePage:t.remove?(i,e)=>t.remove(i,e):void 0}}function W(t,o,s,r,i=!1){let e=null;const u=new Set;let m=!1,f={docId:null,lockHolder:null,conflict:null,saveFailed:!1,unpublished:!1,loadFailed:!1};const P=new Set,p=()=>{if(!e)return!1;const n=_(e.id);return n==="changed"||n==="never"||n===void 0&&m},h=n=>{f={...f,...n,docId:e?.id??null,unpublished:p()};for(const c of P)c()},y=n=>n&&typeof n=="object"&&!Array.isArray(n)?n:{},S=n=>!!e&&u.has(n),C={state:()=>f,subscribe:n=>(P.add(n),()=>{P.delete(n)})};return{resolve:async n=>{if(N(n===g?null:C),n===g)return s.resolve(n);let c=!1;const[d,a]=await Promise.all([s.resolve(n),t.load({slug:g,...o}).catch(()=>(c=!0,null))]);if(a){O(a.id,a.live);const v=y(a.layout);e={id:a.id,layout:v,version:a.version,savedJson:""}}else e=null;if(m=!1,!d||!e)return h({conflict:null,saveFailed:!1,loadFailed:c}),d;const l=U(y(d.layout),e.layout);return e.savedJson=JSON.stringify(k(l,e.layout).chrome),u.add(d.id),h({conflict:null,saveFailed:!1,loadFailed:!1}),{...d,layout:l}},saveLayout:async(n,c,d,a)=>{if(!e||!S(n))return s.saveLayout(n,c,d,a);const l=e,v=k(c,l.layout),H=await s.saveLayout(n,v.page,d,a),A=JSON.stringify(v.chrome);if(!v.chrome||A===l.savedJson||f.lockHolder)return H;try{const w=await t.save(l.id,{layout:v.chrome},{version:l.version,clientId:a??""});j(l.id,w.live),E(),l.layout=v.chrome,l.version=w.version,l.savedJson=A,m=!0,h({conflict:null,saveFailed:!1})}catch(w){B(w,"changed-elsewhere")?h({conflict:w.conflict??{savedBy:"",savedByYou:!1,secondsAgo:0}}):B(w,"lock-taken")?h({lockHolder:w.holder??{name:"",secondsSinceSeen:0,secondsSinceHeld:0}}):h({saveFailed:!0})}return H},publish:s.publish?async(n,c)=>{const d=await s.publish(n,c),a=e;if(a&&S(n)&&!i&&t.publish&&p()&&!f.lockHolder){const l=await t.publish(a.id,a.version?{version:a.version}:void 0);J(a.id,l.live),l.version!==null&&(a.version=l.version),m=!1,h({})}return d}:void 0,lock:r?{claim:async(n,c,d)=>{const a=await r.claim(n,c,d),l=e;if(l&&S(n))try{await r.claim(l.id,c,!1),f.lockHolder&&h({lockHolder:null})}catch(v){B(v,"lock-taken")&&h({lockHolder:v.holder??{name:"",secondsSinceSeen:0,secondsSinceHeld:0}})}return a},release:async(n,c)=>{await r.release(n,c);const d=e;d&&S(n)&&!f.lockHolder&&await r.release(d.id,c).catch(()=>{})}}:void 0,pinnedChrome:C}}function oe(t,o=R(),s=b(),r={}){const i=T(o),e=t?{siteId:t}:void 0,u=i?!!t:!0,m=o.site.update,f=i&&s.commerce&&s.service,P=!!r.editsPinnedInPlace&&f,p=x(o.site)?o.site:void 0,h=F(o.pages,t,p),y=P?W(o.pages,e,h,o.lock,!!p):null;return{capabilities:{canPublish:!!p||!!o.pages.publish,hasSiteSettings:i,hasSiteTheme:!!o.theme,placeholderFrames:!1,mediaEditing:!0,pageCreationInAdminForm:!o.pages.create,canDeletePagesInline:!!o.pages.remove,hasEditLock:!!o.lock,hasEditGuard:!0,hasPinnedChrome:f,editsPinnedInPlace:P,explainsSiteSettings:!1,hasSiteRecord:u,canEditSiteRecord:u&&!!m,hasPreviewLink:i||!!o.preview,hasCatalog:i&&s.commerce,hasForms:i&&s.service,hasBlog:!!o.blog&&s.service,offersCommerce:s.commerce,offersService:s.service},...h,...I(h.resolve),lock:o.lock,...y,site:u?()=>o.site.get(e):void 0,siteLiveState:p?()=>p.liveState(e):void 0,updateSite:u&&m?S=>m(S,e):void 0,previewHref:o.preview?S=>o.preview.href(S):void 0}}function ie(t,o=R(),s=b()){const r=T(o),i=o.templates,e=i?i.pages(t):{list:()=>Promise.reject(new Error(L)),load:()=>Promise.reject(new Error(L)),save:()=>Promise.reject(new Error(L))};return{capabilities:{canPublish:!1,hasSiteSettings:!1,hasSiteTheme:!1,placeholderFrames:!0,mediaEditing:!1,pageCreationInAdminForm:!e.create,canDeletePagesInline:!!e.remove,hasEditLock:!1,hasEditGuard:!1,hasPinnedChrome:r&&s.commerce&&s.service,editsPinnedInPlace:!1,explainsSiteSettings:r,hasSiteRecord:!1,canEditSiteRecord:!1,hasPreviewLink:!1,hasCatalog:r&&s.commerce,hasForms:r&&s.service,hasBlog:!!o.blog&&s.service,offersCommerce:s.commerce,offersService:s.service},...F(e,void 0),...I(F(e,void 0).resolve),publish:void 0,templateName:i?()=>i.get(t).then(u=>u.name):void 0}}function I(t){return{resolve:o=>(N(null),t(o))}}const L="This editor's backend has no website templates.";export{oe as makeSitePageAdapter,ie as makeTemplatePageAdapter};
@@ -1,4 +1,4 @@
1
- import type { ReactNode } from "react";
1
+ import type { ReactElement, ReactNode } from "react";
2
2
  export declare function ColourControl({ value, onChange, label, id, caption, inherited, after, ariaLabel, }: {
3
3
  value: string;
4
4
  onChange: (next: string) => void;
@@ -14,3 +14,13 @@ export declare function AnyColourSwatch({ value, onChange, label, }: {
14
14
  onChange: (next: string) => void;
15
15
  label: string;
16
16
  }): import("react").JSX.Element;
17
+ export declare function InheritedColourRow({ label, icon, value, inherited, resetTo, onChange, onReset, hint, }: {
18
+ label: string;
19
+ icon?: ReactElement;
20
+ value: string;
21
+ inherited: string;
22
+ resetTo: string;
23
+ onChange: (hex: string) => void;
24
+ onReset: () => void;
25
+ hint?: ReactNode;
26
+ }): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as n,jsxs as x}from"react/jsx-runtime";import{ColorPicker as p,HexInput as C}from"efficient-shell/ui";import{typedHex as m}from"efficient-easel/pick";import{usePreviewHeader as w}from"../../../render/components/PreviewHeaderContext.js";import{say as t}from"../../../format/lib/editor-words.js";import{themeSwatches as b}from"./theme-swatches.js";function S({value:e,onChange:o,label:s,id:r,caption:l,inherited:a,after:c,ariaLabel:u}){return n(N,{value:e,onChange:o,label:t(u??s),id:r,caption:l,inherited:a,after:c})}function g(){const{theme:e}=w();return b(e).map(o=>({value:o.value,label:o.name}))}function N({value:e,onChange:o,label:s,id:r,caption:l,inherited:a,after:c}){const u=g(),i=e?null:m(a??""),f=l!==void 0&&(!e||m(l)!==m(e))?l:null,d=h=>{h!==e&&o(h)};return x("div",{className:"sf-colour",children:[n(p,{id:r,value:e,onChange:d,label:s,presets:u,fallback:i??void 0,size:"sm",align:"end"}),f!==null?n("span",{className:"sf-colour-caption",children:f}):n("span",{className:"sf-colour-hexwrap",children:n(C,{value:e||i||"",onChange:d,label:t("{label} hex code",{label:s}),placeholder:e||i?void 0:t("Not set"),className:i?"sf-colour-hex is-inherited":"sf-colour-hex",size:"sm"})}),c]})}function _({value:e,onChange:o,label:s}){return n(p,{value:e,onChange:r=>{r&&r!==e&&o(r)},label:t(s),size:"sm",align:"end"})}export{_ as AnyColourSwatch,S as ColourControl};
1
+ "use client";import{jsx as t,jsxs as g}from"react/jsx-runtime";import{ColorPicker as p,HexInput as x}from"efficient-shell/ui";import{SettingsDefaultReset as C,SettingsField as w}from"efficient-easel/panel";import{typedHex as u}from"efficient-easel/pick";import{usePreviewHeader as b}from"../../../render/components/PreviewHeaderContext.js";import{editorEaselWords as N,say as d}from"../../../format/lib/editor-words.js";import{themeSwatches as S}from"./theme-swatches.js";function j({value:e,onChange:o,label:n,id:r,caption:i,inherited:l,after:a,ariaLabel:c}){return t(k,{value:e,onChange:o,label:d(c??n),id:r,caption:i,inherited:l,after:a})}function P(){const{theme:e}=b();return S(e).map(o=>({value:o.value,label:o.name}))}function k({value:e,onChange:o,label:n,id:r,caption:i,inherited:l,after:a}){const c=P(),s=e?null:u(l??""),f=i!==void 0&&(!e||u(i)!==u(e))?i:null,m=h=>{h!==e&&o(h)};return g("div",{className:"sf-colour",children:[t(p,{id:r,value:e,onChange:m,label:n,presets:c,fallback:s??void 0,size:"sm",align:"end"}),f!==null?t("span",{className:"sf-colour-caption",children:f}):t("span",{className:"sf-colour-hexwrap",children:t(x,{value:e||s||"",onChange:m,label:d("{label} hex code",{label:n}),placeholder:e||s?void 0:d("Not set"),className:s?"sf-colour-hex is-inherited":"sf-colour-hex",size:"sm"})}),a]})}function B({value:e,onChange:o,label:n}){return t(p,{value:e,onChange:r=>{r&&r!==e&&o(r)},label:d(n),size:"sm",align:"end"})}function D({label:e,icon:o,value:n,inherited:r,resetTo:i,onChange:l,onReset:a,hint:c}){const s=!!n;return t(w,{label:e,icon:o,changed:s,action:j({value:n,inherited:s?void 0:r,onChange:l,label:e,after:t(C,{words:N()?.panel,label:e,changed:s,detail:i,onReset:a})}),hint:c})}export{B as AnyColourSwatch,j as ColourControl,D as InheritedColourRow};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as u}from"react/jsx-runtime";import{ButtonIcon as d,ButtonIconIcon as h,IconAfterTextIcon as g,IconBeforeTextIcon as I,StylesIcon as y,WidthIcon as x}from"efficient-easel/icons";import*as b from"efficient-easel/icons";import{SettingsField as C}from"efficient-easel/panel";import{useSelectedFields as c}from"efficient-easel/easel";import{IconPicker as S,Segmented as B}from"efficient-shell/ui";import{StorefrontTextLinkField as v}from"../../../../../components/StorefrontLinkField.js";import{BUTTON_ICONS as F,buttonIconChoice as k,buttonIconSide as _}from"../../../../../../format/lib/content/button-icon.js";import{say as i}from"../../../../../../format/lib/editor-words.js";import{group as T,inOwnBox as z,linkField as N,plainText as O,section as m,segmented as f}from"../../../controls.js";import{NoControlMark as w,noControlField as j}from"../../../panel-no-control-mark.js";import{alignField as L}from"../../shared-fields.js";const s=o=>({...j({type:"custom",render:()=>e(w,{})},"always"),reachedBy:o});function P(o){const n=(o==="none"?"no-symbol":o).replace(/(^|-)([a-z])/g,(r,a,p)=>p.toUpperCase()),t=b[`${n}Icon`];return t?e(t,{size:16}):null}const A=F.map(o=>({value:o,icon:P(o)}));function U({value:o,onChange:l}){const n=c(),t=n.values.href,r=typeof o=="string"?o:o&&typeof o=="object"&&"text"in o?String(o.text??""):"";return e(v,{label:"Button",icon:e(d,{size:18}),text:r,onTextChange:l,link:typeof t=="string"?t:"",onLinkChange:a=>n.onChange("href",a)})}function W({value:o,onChange:l}){const n=c(),t=k(o,n.values.arrow),r=_(n.values.iconPosition);return e(C,{label:i("Icon"),icon:e(h,{size:18}),children:u("div",{className:"flex items-center gap-2",children:[e(S,{label:i("Icon"),value:t,emptyValue:"none",options:A,onChange:l}),t!=="none"&&e(B,{label:i("Icon position"),value:r,onChange:a=>n.onChange("iconPosition",a),options:[{value:"before",icon:e(I,{size:16}),label:e("span",{className:"sr-only",children:i("Icon before text")}),title:i("Icon before text")},{value:"after",icon:e(g,{size:16}),label:e("span",{className:"sr-only",children:i("Icon after text")}),title:i("Icon after text")}]})]})})}const Q={fields:{label:z(O("Button"),o=>e(U,{value:o.value,onChange:o.onChange})),href:{...N("Button link"),...s("label")},_dSize:m("Size"),widthFit:f("Width",e(x,{}),[{label:"Fit content",value:"fit"},{label:"Fill",value:"fill"}],"fit"),_gStyle:T("Style"),variant:f("Style",e(y,{}),[{label:"Filled",value:"primary"},{label:"Outline",value:"ghost"}],"primary"),icon:{type:"custom",render:o=>e(W,{value:o.value,onChange:o.onChange})},iconPosition:s("icon"),arrow:s("icon"),_dLayout:m("Layout"),align:L()}};export{Q as ButtonBlockFields};
1
+ import{jsx as e,jsxs as I}from"react/jsx-runtime";import{ButtonIcon as d,ButtonIconIcon as h,GroundIcon as g,IconAfterTextIcon as x,IconBeforeTextIcon as y,StylesIcon as b,TextColorIcon as C,WidthIcon as S}from"efficient-easel/icons";import*as T from"efficient-easel/icons";import{SettingsField as _}from"efficient-easel/panel";import{useSelectedFields as s}from"efficient-easel/easel";import{IconPicker as B,Segmented as F}from"efficient-shell/ui";import{StorefrontTextLinkField as O}from"../../../../../components/StorefrontLinkField.js";import{BUTTON_ICONS as v,buttonIconChoice as N,buttonIconSide as k}from"../../../../../../format/lib/content/button-icon.js";import{say as l}from"../../../../../../format/lib/editor-words.js";import{FOLLOWS_SITE_BUTTON as L,FOLLOWS_SITE_BUTTON_INK as z,colorInput as m,group as w,inOwnBox as j,linkField as P,plainText as U,section as u,segmented as f}from"../../../controls.js";import{NoControlMark as W,noControlField as A}from"../../../panel-no-control-mark.js";import{alignField as E}from"../../shared-fields.js";const a=o=>({...A({type:"custom",render:()=>e(W,{})},"always"),reachedBy:o});function G(o){const n=(o==="none"?"no-symbol":o).replace(/(^|-)([a-z])/g,(r,c,p)=>p.toUpperCase()),t=T[`${n}Icon`];return t?e(t,{size:16}):null}const K=v.map(o=>({value:o,icon:G(o)}));function M({value:o,onChange:i}){const n=s(),t=n.values.href,r=typeof o=="string"?o:o&&typeof o=="object"&&"text"in o?String(o.text??""):"";return e(O,{label:"Button",icon:e(d,{size:18}),text:r,onTextChange:i,link:typeof t=="string"?t:"",onLinkChange:c=>n.onChange("href",c)})}function R({value:o,onChange:i}){const n=s(),t=N(o,n.values.arrow),r=k(n.values.iconPosition);return e(_,{label:l("Icon"),icon:e(h,{size:18}),children:I("div",{className:"flex items-center gap-2",children:[e(B,{label:l("Icon"),value:t,emptyValue:"none",options:K,onChange:i}),t!=="none"&&e(F,{label:l("Icon position"),value:r,onChange:c=>n.onChange("iconPosition",c),options:[{value:"before",icon:e(y,{size:16}),label:e("span",{className:"sr-only",children:l("Icon before text")}),title:l("Icon before text")},{value:"after",icon:e(x,{size:16}),label:e("span",{className:"sr-only",children:l("Icon after text")}),title:l("Icon after text")}]})]})})}const eo={fields:{label:j(U("Button"),o=>e(M,{value:o.value,onChange:o.onChange})),href:{...P("Button link"),...a("label")},_dSize:u("Size"),widthFit:f("Width",e(S,{}),[{label:"Fit content",value:"fit"},{label:"Fill",value:"fill"}],"fit"),_gStyle:w("Style"),variant:f("Style",e(b,{}),[{label:"Filled",value:"primary"},{label:"Outline",value:"ghost"}],"primary"),icon:{type:"custom",render:o=>e(R,{value:o.value,onChange:o.onChange})},iconPosition:a("icon"),arrow:a("icon"),buttonColor:m("Fill color",L,e(g,{})),buttonTextColor:m("Text color",z,e(C,{})),_dLayout:u("Layout"),align:E()}};export{eo as ButtonBlockFields};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{StylesIcon as l}from"efficient-easel/icons";import{select as o}from"../../../controls.js";import{DEFAULT_DIVIDER_STYLE as s,DIVIDER_STYLE_OPTIONS as t}from"../../../../../../format/lib/sections/divider-style.js";const p={fields:{style:o("Style",e(l,{}),t,s),spacing:{type:"select",options:[{label:"Small",value:"sm"},{label:"Medium",value:"md"},{label:"Large",value:"lg"}]}}};export{p as DividerFields};
1
+ import{jsx as e}from"react/jsx-runtime";import{PhoneIcon as t,StylesIcon as i,WeightIcon as o,WidthIcon as n}from"efficient-easel/icons";import{select as m,slider as l,toggle as r}from"../../../controls.js";import{DEFAULT_DIVIDER_STYLE as s,DIVIDER_STYLE_OPTIONS as a}from"../../../../../../format/lib/sections/divider-style.js";import{withRowRules as c}from"../../../../../../render/lib/puck/show-when.js";const d={any:[{field:"style",set:!1},{field:"style",is:s}]},y={fields:c({style:m("Style",e(i,{}),a,s),spacing:{type:"select",options:[{label:"Small",value:"sm"},{label:"Medium",value:"md"},{label:"Large",value:"lg"}]},thickness:l("Thickness",e(o,{}),1,8,1,1,"px"),lengthPct:l("Length",e(n,{}),10,100,1,100,"%"),hideOnMobile:r("Hide on phone",!1,e(t,{}))},[[["thickness"],d]])};export{y as DividerFields};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{FOOTER_LOGO_PX as t,HEADER_LOGO_PX_MAX as i,HEADER_LOGO_PX_MIN as e}from"../../../../../../render/components/Logo.js";import{HeightIcon as r}from"efficient-easel/icons";import{linkField as l,plainText as a,slider as m,upload as n,withPanelOnly as O}from"../../../controls.js";import{withRowRules as p}from"../../../../../../render/lib/puck/show-when.js";import{LOGO_COLOR_FIELDS as s}from"../../../logo-color-fields.js";const g={fields:p({src:n("Logo image","image/*"),alt:O(a("Alt text","Brand name","Read out in place of the picture, and shown if it can’t load.")),href:l("Link"),heightPx:m("Height",o(r,{}),e,i,1,t,"px"),...s},[[["alt"],{field:"src",set:!0}]])};export{g as LogoBlockFields};
1
+ import{jsx as i}from"react/jsx-runtime";import{FOOTER_LOGO_PX as o,HEADER_LOGO_PX_MIN as t,LOGO_BLOCK_PX_MAX as e}from"../../../../../../render/components/Logo.js";import{HeightIcon as r}from"efficient-easel/icons";import{linkField as l,plainText as a,slider as m,upload as n,withPanelOnly as O}from"../../../controls.js";import{alignField as p}from"../../shared-fields.js";import{withRowRules as f}from"../../../../../../render/lib/puck/show-when.js";import{LOGO_COLOR_FIELDS as s}from"../../../logo-color-fields.js";const R={fields:f({src:n("Logo image","image/*"),alt:O(a("Alt text","Brand name","Read out in place of the picture, and shown if it can’t load.")),href:l("Link"),heightPx:m("Height",i(r,{}),t,e,1,o,"px"),align:p(),...s},[[["alt"],{field:"src",set:!0}]])};export{R as LogoBlockFields};
@@ -1 +1 @@
1
- import{jsx as i}from"react/jsx-runtime";import{AlignLeftIcon as a,StylesIcon as s}from"efficient-easel/icons";import{group as n,plainText as r,readHidable as u,segmented as m,select as d,textarea as g,withOffPage as f}from"../../../controls.js";import{innerSpacingFields as p}from"../../shared-fields.js";import{TITLE_WITH_BUTTONS_PH as b}from"../../../../../../render/lib/puck/blocks/general/TitleWithButtons/render.js";const _={fields:{_gContent:n("Content"),title:g("Heading",b.title),buttons:{type:"array",label:"Buttons",arrayFields:{label:r("Button"),href:f(r("Button link")),variant:d("Style",i(s,{}),[{label:"Primary (Theme Color)",value:"primary"},{label:"Outline",value:"outline"}],"outline")},defaultItemProps:{label:"",href:"#",variant:"outline"},getItemSummary:t=>t?.label||"Button"},_gStyle:n("Style"),buttonsAlign:m("Alignment",i(a,{}),[{label:"Left",value:"left"},{label:"Center",value:"center"},{label:"Right",value:"right"}],"right"),...p("TitleWithButtons")},resolveFields:(t,{fields:e})=>{const l=u(t.props.title);if(!(!l.hidden&&!!l.text.trim()))return e;const{buttonsAlign:y,...o}=e;return o}};export{_ as TitleWithButtonsFields};
1
+ import{jsx as i}from"react/jsx-runtime";import{AlignLeftIcon as a,StylesIcon as s}from"efficient-easel/icons";import{group as n,plainText as r,readHidable as u,segmented as m,select as d,textarea as g,withOffPage as f}from"../../../controls.js";import{innerSpacingFields as p}from"../../shared-fields.js";import{TITLE_WITH_BUTTONS_PH as b}from"../../../../../../render/lib/puck/blocks/general/TitleWithButtons/render.js";const _={fields:{_gContent:n("Content"),title:g("Heading",b.title),buttons:{type:"array",label:"Buttons",arrayFields:{label:r("Button"),href:f(r("Button link")),variant:d("Style",i(s,{}),[{label:"Filled",value:"primary"},{label:"Outline",value:"outline"}],"outline")},defaultItemProps:{label:"",href:"#",variant:"outline"},getItemSummary:t=>t?.label||"Button"},_gStyle:n("Style"),buttonsAlign:m("Alignment",i(a,{}),[{label:"Left",value:"left"},{label:"Center",value:"center"},{label:"Right",value:"right"}],"right"),...p("TitleWithButtons")},resolveFields:(t,{fields:e})=>{const l=u(t.props.title);if(!(!l.hidden&&!!l.text.trim()))return e;const{buttonsAlign:c,...o}=e;return o}};export{_ as TitleWithButtonsFields};
@@ -1,2 +1,2 @@
1
- export declare const generalBlocks: Record<"Flex" | "Ticker" | "Prose" | "Logos" | "Divider" | "LogoBlock" | "Text" | "Hero" | "HeroSingle" | "IntroBleed" | "SpecStrip" | "ProcessSteps" | "OrderSummary" | "PaymentBadges" | "Manifesto" | "Timeline" | "TimelineTrack" | "Footprint" | "ParagraphsA" | "Split" | "Cards" | "KeyFeatures" | "Stats" | "StatsParagraph" | "Chart" | "Mockup" | "Testimonials" | "Banner" | "TitleWithButtons" | "Countdown" | "Masthead" | "FeaturedCover" | "LongRead" | "Series" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocMasthead" | "DocBody" | "DocMetaCards" | "FAQ" | "ContactLocations" | "SectionHeader" | "Spacer" | "CustomHTML" | "Grid" | "Heading" | "Eyebrow" | "ImageBlock" | "ButtonBlock" | "PostCard" | "HeroSlide" | "HeroGroup" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
2
- export declare const assembleGeneralBlocks: () => Record<"Flex" | "Ticker" | "Prose" | "Logos" | "Divider" | "LogoBlock" | "Text" | "Hero" | "HeroSingle" | "IntroBleed" | "SpecStrip" | "ProcessSteps" | "OrderSummary" | "PaymentBadges" | "Manifesto" | "Timeline" | "TimelineTrack" | "Footprint" | "ParagraphsA" | "Split" | "Cards" | "KeyFeatures" | "Stats" | "StatsParagraph" | "Chart" | "Mockup" | "Testimonials" | "Banner" | "TitleWithButtons" | "Countdown" | "Masthead" | "FeaturedCover" | "LongRead" | "Series" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocMasthead" | "DocBody" | "DocMetaCards" | "FAQ" | "ContactLocations" | "SectionHeader" | "Spacer" | "CustomHTML" | "Grid" | "Heading" | "Eyebrow" | "ImageBlock" | "ButtonBlock" | "PostCard" | "HeroSlide" | "HeroGroup" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
1
+ export declare const generalBlocks: Record<"Grid" | "Flex" | "HeroGroup" | "Ticker" | "Prose" | "Logos" | "Divider" | "LogoBlock" | "Text" | "Hero" | "HeroSingle" | "IntroBleed" | "SpecStrip" | "ProcessSteps" | "OrderSummary" | "PaymentBadges" | "Manifesto" | "Timeline" | "TimelineTrack" | "Footprint" | "ParagraphsA" | "Split" | "Cards" | "KeyFeatures" | "Stats" | "StatsParagraph" | "Chart" | "Mockup" | "Testimonials" | "Banner" | "TitleWithButtons" | "Countdown" | "Masthead" | "FeaturedCover" | "LongRead" | "Series" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocMasthead" | "DocBody" | "DocMetaCards" | "FAQ" | "ContactLocations" | "SectionHeader" | "Spacer" | "CustomHTML" | "Heading" | "Eyebrow" | "ImageBlock" | "ButtonBlock" | "PostCard" | "HeroSlide" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
2
+ export declare const assembleGeneralBlocks: () => Record<"Grid" | "Flex" | "HeroGroup" | "Ticker" | "Prose" | "Logos" | "Divider" | "LogoBlock" | "Text" | "Hero" | "HeroSingle" | "IntroBleed" | "SpecStrip" | "ProcessSteps" | "OrderSummary" | "PaymentBadges" | "Manifesto" | "Timeline" | "TimelineTrack" | "Footprint" | "ParagraphsA" | "Split" | "Cards" | "KeyFeatures" | "Stats" | "StatsParagraph" | "Chart" | "Mockup" | "Testimonials" | "Banner" | "TitleWithButtons" | "Countdown" | "Masthead" | "FeaturedCover" | "LongRead" | "Series" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocMasthead" | "DocBody" | "DocMetaCards" | "FAQ" | "ContactLocations" | "SectionHeader" | "Spacer" | "CustomHTML" | "Heading" | "Eyebrow" | "ImageBlock" | "ButtonBlock" | "PostCard" | "HeroSlide" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
@@ -0,0 +1 @@
1
+ import{FOOTER_LOGO_PX as T}from"../../../render/components/Logo.js";import{resolveContainerGap as E}from"../../../format/lib/content/container-gap.js";import{buildSectionGroup as _,SITE_FOOTER_TYPE as m}from"../../../format/lib/puck/section-groups.js";const p="Flex",O={FooterMenu:"MenuBlock",FooterEmailSignup:"EmailFormBlock",FooterSocial:"SocialLogosBlock"},P=o=>{const{id:e,...t}=o;return t},d=o=>typeof o=="string"?o:"",u=o=>typeof o=="number"&&Number.isFinite(o)?o:void 0,a={sm:12,md:13,lg:15},x="md",f=1.5,y={size:13,lineHeight:f,width:280},L=14,b=40,A=o=>o==="center"||o==="right"?o:"left";function w(o){const e={},t=[["padTop","sectionPaddingTop"],["padRight","sectionPaddingRight"],["padBottom","sectionPaddingBottom"],["padLeft","sectionPaddingLeft"]];for(const[s,r]of t){const n=u(o[s]);n&&(e[r]=n)}return e}function h(o,e){const t=o.props??{},s=O[o.type];if(s)return[e(s,P(t))];switch(o.type){case"FooterLogo":{const r=A(t.align),n=e("LogoBlock",{...t.reverse?{reverse:t.reverse}:{},...typeof t.customColor=="string"&&t.customColor?{customColor:t.customColor}:{},heightPx:Math.round(T*((u(t.widthPct)??100)/100)),href:"/",align:r,...w(t)}),i=d(t.tagline).trim();return i?[n,e("Text",{text:i,tone:"dim",align:r,_partStyles:{text:{...y}}})]:[n]}case"FooterText":{const r=typeof t.size=="string"&&t.size in a?t.size:x;return[e("Text",{text:d(t.text),tone:typeof t.tone=="string"?t.tone:"default",_partStyles:{text:{size:a[r],lineHeight:f}}})]}case"FooterDivider":{const r=u(t.thickness),n=u(t.lengthPct);return[e("Divider",{...r!==void 0?{thickness:r}:{},...n!==void 0?{lengthPct:n}:{},...t.hideOnMobile===!0?{hideOnMobile:!0}:{}})]}case"FooterGroup":{const r=Array.isArray(t.blocks)?t.blocks:[];return[e(p,{direction:t.direction==="horizontal"?"row":"column",gap:E("FooterGroup",t.gap),align:t.align==="center"||t.align==="end"?t.align:"start",content:r.flatMap(n=>h(n,e))})]}default:return[]}}function I(o,e,t){const s=o&&Array.isArray(o.props?.blocks)?o.props.blocks:[],r=c=>e(p,{direction:"row",wrap:!0,share:"equal",gap:b,content:c}),n=[];let i=[];for(const c of s){const l=h(c,e);if(c.type==="FooterDivider"){i.length&&n.push(r(i)),i=[],n.push(...l);continue}l.length<=1?i.push(...l):i.push(e(p,{direction:"column",gap:L,align:"stretch",content:l}))}(i.length||!n.length)&&n.push(r(i));const F=e(p,{direction:"column",content:[e("LegalLineBlock")]}),g=_(m,t,[...n,F]);return{...g,props:{...g.props,...o?.props?.width==="full"?{fullWidth:!0}:{}}}}export{I as boxFooterFromFooter,h as pageBlocksFromFooterBlock};
@@ -274,7 +274,12 @@ export declare function dateTime(label: string, icon?: ReactNode, hint?: string)
274
274
  export declare function toggle(label: string, fallback: boolean, icon?: ReactNode): CustomField<boolean>;
275
275
  export declare function pageBackgroundField(): CustomField<string>;
276
276
  export declare function checkbox(label: string, fallback: boolean): CustomField<boolean>;
277
- export declare function colorInput(label: string, fallback: string): CustomField<string>;
277
+ export type FollowsSiteButton = {
278
+ follows: "fill" | "ink";
279
+ };
280
+ export declare const FOLLOWS_SITE_BUTTON: FollowsSiteButton;
281
+ export declare const FOLLOWS_SITE_BUTTON_INK: FollowsSiteButton;
282
+ export declare function colorInput(label: string, fallback: string | FollowsSiteButton, icon?: ReactElement): CustomField<string>;
278
283
  export declare const FOCAL_POINTS: {
279
284
  value: string;
280
285
  label: string;
@@ -1 +1 @@
1
- "use client";import{jsx as r,jsxs as k,Fragment as T}from"react/jsx-runtime";import{cloneElement as pe,useId as ft,useRef as ne,useState as z}from"react";import{useEasel as K,useSelectedFields as fe}from"efficient-easel/easel";import{say as l,editorEaselWords as x}from"../../../format/lib/editor-words.js";import{readHidable as me,hidableText as he}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as V,LINK_FIELD_MARKER as ge,MEDIA_FIELD_MARKER as be,SCAFFOLD_FIELD_MARKER as xe,TEXT_FIELD_MARKER as I,foldMetaOf as Y,textFieldIdentifier as mt}from"efficient-easel/draw";import ht from"../../components/ApplyCornersToSiblings.js";import gt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as bt,CORNER_RADIUS_MAX as Se,CORNER_RADIUS_MIN as A}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as xt,IMAGE_CORNERS_LABEL as St}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as yt}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Ct,GALLERY_LAYOUTS as W,GALLERY_LAYOUT_KEYS as ye}from"../../../format/lib/content/gallery-layout.js";import{anchorSiblingsOf as _t,HERO_GROUP_PLACEMENTS as It,HERO_GROUP_PLACEMENT_DEFAULT as Et,normalisePlacement as Tt,placementPoints as Ce}from"../../../format/lib/hero-group-placement.js";import Rt from"../../components/KeepHint.js";import{AdjustIcon as Ot,AlignLeftIcon as wt,EyeIcon as Pt,AlignSeparateIcon as kt,AnimationIcon as _e,BackgroundIcon as Nt,BorderAllIcon as Lt,BlockSectionIcon as At,CartIcon as vt,ColumnWidthsIcon as Ie,ColumnsIcon as Ft,CornerIcon as Dt,DirectionDownIcon as Bt,DirectionLeftIcon as Ht,DirectionRightIcon as Gt,DirectionUpIcon as Mt,DollarIcon as Kt,FinishIcon as Wt,GapIcon as Ee,GridIcon as Ut,GroundIcon as Xt,HashIcon as Te,HeightIcon as $t,ImageIcon as jt,ListIcon as zt,LocationIcon as oe,PaddingAllIcon as Vt,PaddingBottomIcon as Re,PaddingLeftIcon as Oe,PaddingRightIcon as we,PaddingTopIcon as Pe,PageIcon as ke,PhoneIcon as Yt,PlacementIcon as qt,ProductSizeIcon as Jt,StickyIcon as Zt,RotateIcon as Qt,SquareIcon as en,TypeIcon as tn,WidthIcon as nn,WrapIcon as on}from"efficient-easel/icons";import{FieldGlyph as Ne}from"../../components/FieldGlyph.js";import{resolvePageBackground as rn}from"../../../format/lib/content/page-background.js";import{CORNER_SIDES as Le,CORNER_SIDE_POINTS as ln,hasOwnSectionCorners as an,normalizeCornerSides as Ae}from"../../../format/lib/content/section-corners.js";import{SECTION_MOTION_NONE as sn,SECTION_MOTION_OPTIONS as cn}from"../../../format/lib/content/section-animation.js";import{enclosingSectionProps as ve}from"./enclosing-section.js";import{SettingsDefaultReset as S,SettingsField as m,SettingsGroupHead as dn,SettingsGroupSub as un,SettingsBorder as pn,SettingsSegmented as fn,SettingsSides as mn,SettingsSidesEach as Fe,sidesStartEach as hn,SettingsSwitch as De,borderSides as gn,borderStartEach as bn}from"efficient-easel/panel";import{FieldSelect as xn,ListField as Sn}from"efficient-easel/fields";import{DisplayChips as yn}from"efficient-shell/ui";import{desktopDisplayChanged as Cn,partShownOnDesktop as _n,partShownOnPhone as In,phoneDisplayChanged as En,withDesktopPart as Tn,withPhonePart as Rn}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as On,Checkbox as wn,CornersInput as Pn,DateTimePicker as kn,FOCAL_DEFAULT as Nn,PictureTiles as Be,Slider as Ln,Tooltip as He}from"efficient-shell/ui";import{ColourControl as Ge}from"./ColourControl.js";import Me from"./MarkupToolbar.js";import{deviceField as g}from"./device-fields.js";import{NO_CONTROL_FIELD as An,NoControlMark as re,noControlField as q}from"./panel-no-control-mark.js";import{OWN_BOX_FIELD as vn}from"../../../format/lib/puck/own-box.js";import{PHONE_CLEAR as Fn,phoneKey as v,resolvePhoneValue as ie}from"../../../format/lib/puck/phone-override.js";import{SuppressibleText as Dn}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Bn,CARD_OUTLINE_OPTIONS as Hn,DEFAULT_CARD_INDEX_FORMAT as Gn,DEFAULT_CARD_OUTLINE as Mn}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Kn,DEFAULT_COVER_INDEX as Wn}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Un}from"efficient-easel/draw";import Xn from"../../components/MediaUploadField.js";import $n from"../../components/MultiSelectField.js";import jn from"../../components/SectionThemePicker.js";import zn from"../../components/SearchSelectField.js";import Vn from"../../components/StorefrontLinkField.js";import{UiIcon as Ke}from"efficient-easel/draw/client";import{SECTION_PADDING as E}from"../../../format/lib/content/section-padding.js";import{hasPhoneHeight as Yn,resolveSectionMinHeight as qn}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as J,SECTION_STICK_LABEL as le,hasPhoneStick as Jn,resolveSectionStick as Zn}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as Qn,SECTION_MIN_HEIGHT_GROUP_LABEL as U,SECTION_SCREEN_PCT as eo}from"../../../format/lib/content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as to,containerDirectionPoints as no,resolveContainerDirection as We}from"../../../format/lib/content/container-direction.js";import{BOX_ALIGN_POINTS as oo,BOX_BLOCK_SPACING_LABEL as ro,BOX_BLOCK_SPACING_POINTS as Ue,BOX_JUSTIFY_POINTS as Xe,BOX_PHONE_ROW_LABEL as io,BOX_PHONE_ROW_MAX as lo,BOX_PHONE_ROW_MIN as $e,BOX_SHARE_LABEL as je,BOX_SHARE_POINTS as ae,BOX_WRAP_LABEL as ao,BOX_WRAP_POINTS as ze}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as X}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as so}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as co,normalizeTheme as uo}from"../../../format/lib/theme.js";import{CONTAINER_GAP as se,CONTAINER_GAP_BUILT_IN as po,GAP_FIELD_CONTAINER as fo,hasOwnContainerGap as mo,resolveContainerGap as ho}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as go,CARD_IMAGE_BG_OFF as bo,CARD_IMAGE_BG_SWATCH_NAMES as xo,CARD_IMAGE_BG_SWATCHES as So,isCardImageBackgroundInheriting as yo,cardImageBackgroundChoice as Co,THEME_CARD_IMAGE_BG as _o}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as Io,SECTION_BG_SWATCHES as Eo,SECTION_BG_SWATCH_NAMES as To,THEME_SECTION_BG as Ro,isSectionBackgroundInheriting as Oo}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as wo}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Po,TYPE_SIZE_INHERIT as ko,isTypeSizeInheriting as No}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Lo,WIDTH_CHOICE_LABEL as Ao,WIDTH_INHERIT as vo,resolveWidth as Fo,sectionRunsFullWidth as Ve}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as Ye}from"./panel-heading-scope.js";import{withStyleKind as Do}from"efficient-easel/style-clipboard";function F(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!Y(n)&&Do(n,`section:${t}`);return e}function ji({children:e}){return r("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function qe(){return null}function Bo(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return r(qe,{},e)}function Ho(e){return e.type===qe}function w(e){return Ho(e)?void 0:e}function D(e,t){return l("{value} from {from}",{value:e,from:t})}function Go(){const{appState:e}=K(i=>i),t=e.data.root?.props??{},{mode:n,pageWidth:o}=Fo(t,"full");return n==="page"?D(`${o}px`,l("the page")):n==="contained"?D(l("Contained"),l("the page")):D(l("Full"),l("the page"))}function Mo(){const{blockGap:e}=X();return e===null?l("this container's own spacing"):D(`${e}px`,l("Site styles"))}function Ko({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:Mo(),onReset:t})}function Wo({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:Go(),onReset:t})}function B({value:e,onChange:t,label:n,placeholder:o,hint:i,multiline:a,hideable:c=!0,markup:s=!0}){const{text:d,hidden:u}=me(e),f=ne(null),p=ne(null),h=O=>t(c?{text:O,hidden:u}:O),b=()=>t({text:d,hidden:!u}),C=c&&u,R=ft(),_=i?Vo(i)?r("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(i)}):r(Rt,{children:l(i)}):void 0,j=u?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return r(m,{label:l(n),icon:r(tn,{}),htmlFor:R,className:C?"is-hidden":void 0,hint:_,action:c?r(He,{content:j,children:r("button",{type:"button",className:"sf-field-eye","aria-pressed":u,"aria-label":j,onClick:b,children:u?r(Ke,{name:"eye-off",size:14}):r(Ke,{name:"eye",size:14})})}):void 0,children:k("div",{className:"sf-copybox",children:[s&&r(Me,{target:a?p:f,value:d,onChange:h}),a?r("textarea",{id:R,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>h(O.target.value)}):r("input",{id:R,ref:f,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>h(O.target.value)})]})})}function zi(e,t){return{...e,[xe]:t}}function Vi(e){const t=e[I];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[I]:{...t,offPage:!0}}}function Yi(e){return!e||typeof e!="object"?!1:e[I]?.offPage===!0}const Je="sfPanelOnly";function qi(e){if(!e[I])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Je]:!0}}function Ji(e){return!!e&&typeof e=="object"&&e[Je]===!0}function Zi(e){const t=e[I];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[I]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as fa,SCALAR_TEXT_CONTROLS as ma}from"efficient-easel/draw";function Qi(e,t){if(!e[I])throw new Error("inOwnBox: the field holds no authored text");const{[An]:o,...i}=e;return{...i,[vn]:!0,render:t}}const Uo=new Set(Un),H=(e,t)=>{const n={...t,[I]:e};if(!Uo.has(e.control))return n;const o=t.render;return{...q(n,"authored-copy"),render:i=>r(Dn,{name:i.name,children:o(i)})}},el="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Xo={field:"source.slug",set:!0},tl={not:Xo},$o="Select a word, then press the highlighter.",jo="A short name so a link can jump straight to this section, like yoursite.com/page#about.",zo=new Set([$o]),Vo=e=>zo.has(e);function nl(e,t,n){return H({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(B,{value:o,onChange:i,label:e,placeholder:t,hint:n})})}function ol(e,t,n){return H({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(B,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0})})}function Yo(e,t,n){return H({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(B,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function rl(e,t,n){return H({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(B,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1})})}function il(e){return{type:"custom",[ge]:{label:e},render:({value:t,onChange:n})=>r(Vn,{value:he(t),onChange:n,label:e})}}function ll(e,t,n){return H({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(B,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const al={Design:Ot,Animation:_e};function sl(e,t){return e.includes("Design")?t!=="Design":null}function qo({label:e}){return r(dn,{title:l(e),level:Ye(1)})}function Jo({level:e,label:t}){return e===1?r(qo,{label:t}):r(er,{label:t})}function Ze(e,t){return{type:"custom",[V]:{label:e,level:t},render:()=>r(Jo,{level:t,label:e})}}function y(e){return Ze(e,2)}function cl(e){return{type:"custom",render:()=>r(Zo,{text:e})}}function Zo({text:e}){return r("p",{className:"sf-note",children:l(e)})}function dl(e){return Ze(e,1)}function ul(e){return Y(e)!==null&&e?.tabs!==void 0}const Qe=new Map;function pl(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Qe.get(n)??{type:"custom",tabs:t,[V]:{label:e,level:1},bucket:e,marker:!0,render:()=>r(T,{})};return Qe.set(n,o),o}function fl(e){return Y(e)!==null&&e?.designGroup!==void 0}const et=new Map;function ml(e){const t=et.get(e)??{type:"custom",[V]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>r(T,{})};return et.set(e,t),t}function Qo(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function hl(e,t){return Qo(e)===t?e:{...e,marker:!0,fold:t,render:()=>r(T,{})}}function gl(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>r(T,{})}}function er({label:e}){return r(un,{title:l(e),level:Ye(2)})}function tt({swatches:e,current:t,onPick:n,names:o}){const i=e.find(s=>s.toLowerCase()===t.toLowerCase()),a=i?o?.[i]:void 0,c=a?l(a):t;return k("div",{className:"sf-swatches",children:[e.map(s=>{const d=o?.[s]?l(o[s]):s;return r(He,{content:d,children:r("button",{type:"button","aria-pressed":t.toLowerCase()===s.toLowerCase(),className:`sf-swatch ${t.toLowerCase()===s.toLowerCase()?"is-active":""}`,style:{background:s},onClick:()=>n(s),"aria-label":d})},s)}),r("span",{className:"sf-swatch-hex",children:c})]})}function bl(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=Oo(n,t);return r(m,{label:l(e),icon:r(Nt,{}),changed:!i,action:r(S,{words:x()?.panel,label:l(e),changed:!i,detail:l("the theme's section background"),onReset:()=>o(Io)}),children:tt({swatches:Eo,current:i?Ro:n??t??"",onPick:o,names:To})})}}}function tr(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=n,a=yo(i,t);return r(m,{label:l(e),icon:r(Xt,{}),changed:!a,action:r(S,{words:x()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(go)}),children:tt({swatches:So,current:a?_o:Co(i,t),onPick:o,names:xo})})}}}function xl(e=n=>n,t){return F({_gSectionTheme:y(wo),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>r(jn,{value:e(n),onChange:o,followLabel:t})}})}function G({min:e,max:t,step:n,value:o,onChange:i,suffix:a="",readout:c=!0,notch:s,ariaLabel:d,disabled:u=!1}){const f=s!==void 0&&Number.isFinite(s)&&s>=e&&s<=t;return r("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(s-e)/(t-e)}:void 0,children:r(Ln,{min:e,max:t,step:n,value:o,suffix:a||void 0,showInput:c,label:d===void 0?void 0:l(d),disabled:u,size:"sm",className:"sf-slider-track",onChange:p=>{p!==null&&p!==o&&i(p)}})})}function M(e,t,n,o,i,a,c="",s){return{type:"custom",render:d=>r(m,{label:l(e),icon:w(t),action:s?s("storedValue"in d?d.storedValue:d.value,d.onChange):void 0,children:G({min:n,max:o,step:i,value:typeof d.value=="number"?d.value:a,suffix:c,ariaLabel:e,onChange:d.onChange})})}}function nt(e,t){const{min:n,max:o,step:i=1,unsetLabel:a,hint:c,restTrack:s,unsetMark:d,icon:u}=t;return{type:"custom",render:({value:f,onChange:p})=>{const h=typeof f=="number"?f:null,b=h===null;return r(m,{label:l(e),icon:u?w(u):void 0,value:b?d||a===void 0?void 0:l(a):`${h}px`,changed:!b,action:d?pe(d,{changed:!b,onReset:()=>p(null)}):r(S,{words:x()?.panel,label:l(e),changed:!b,onReset:()=>p(null)}),hint:typeof c=="string"?l(c):c,children:s?s({min:n,max:o,step:i,px:h,label:e,onChange:p}):G({min:n,max:o,step:i,value:h??n,readout:!1,ariaLabel:e,onChange:p})})}}}function Sl(e){const t=M("Gap",r(Ee,{}),se.min,se.max,se.step,po[e],"px",(n,o)=>r(Ko,{inherited:!mo(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[fo]:e,render:n=>t.render({...n,value:ho(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}const Z="Corners";function ce(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,i=o!==null;return r(m,{label:l(Z),icon:r(Dt,{}),changed:i,action:pe(e.mark,{changed:i,onReset:()=>n(null)}),hint:e.hint,children:r(nr,{tier:e,px:o,onRadius:n})})}}}function ot(e){let t=null;try{t=fe()}catch{t=null}return[t?.values?.[e],n=>t?.onChange(e,n)]}function nr({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),i=e.useClosedReason?e.useClosedReason():null,[a,c]=ot(e.sidesKey),s=Ae(a)??[...Le];return r(Pn,{label:l(Z),value:s,corners:ln,onChange:d=>{const u=Ae(d)??[];c(u.length===Le.length?null:u)},radius:t,onRadiusChange:n,radiusMin:A,radiusMax:Se,radiusStep:e.step??1,radiusPlaceholder:String(o),disabled:i!==null,disabledReason:i??void 0})}function rt(){return q({type:"custom",render:()=>r(re,{})},"always")}function or({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=X(),i=typeof o=="number"?`${o}px`:l("not set");return r(S,{words:x()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):D(i,l("Site styles")),onReset:n})}function rr(){const{cornerRadiusPx:e}=X();return typeof e=="number"?e:A}function ir(){return ce({sidesKey:"sectionCornerSides",useFollowed:rr,useClosedReason:()=>lt()?l(it):null,mark:r(or,{label:Z}),hint:r(lr,{})})}const it="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function lt(){return Ve(N())}function lr(){return r(T,{children:lt()?it:"Follows Site styles ▸ Basics ▸ Corners until you set a number here."})}function yl(){return F({_gShape:y("Shape"),sectionCorners:ir(),sectionCornerSides:rt(),sectionBorder:at("desktop"),sectionBorderPhone:at("mobile")})}const ar=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function sr(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function cr(){let e;try{const t=uo(X().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||co.line}function dr({value:e,onChange:t,tier:n}){const[o]=ot("sectionBorder"),i=cr(),a=e&&typeof e=="object"?e:{},c=n==="mobile"?o&&typeof o=="object"?o:{}:{},[s,d]=z(()=>bn(a,c)),u=ar();return r(m,{label:l("Border"),icon:r(Lt,{}),action:r(Fe,{each:s,label:l("Each side"),onChange:d}),children:r(pn,{label:l("Border"),value:a,each:s,onChange:f=>t(sr(f)),placeholder:{sides:gn(c),style:c.style??"solid",color:c.color||i},presets:[i],words:u,max:so})})}function at(e){return g(e,{type:"custom",render:({value:t,onChange:n})=>r(dr,{value:t,onChange:n,tier:e})})}function Cl(){return{_gMotion:y("Motion"),sectionAnimation:ue("Entrance",r(_e,{}),[...cn],sn)}}function de(){let e=null;try{const{appState:t,selectedItem:n}=K(i=>i),o=n?.props?.id?String(n.props.id):void 0;e=o?ve(t?.data,o):null}catch{e=null}return e!==null&&Ve(e)}function st(e){const{cornerRadiusPx:t}=X(),n=de(),o=typeof t=="number"?t:e;let i=null;try{const{appState:c,selectedItem:s}=K(u=>u),d=s?.props?.id?String(s.props.id):void 0;i=d?ve(c?.data,d):null}catch{i=null}if(n||!i)return o;const a=i.sectionCorners;return an(a)?a:o}function ur({label:e,changed:t=!1,onReset:n=()=>{}}){const o=de(),i=st(A),a=o?"Site":"Section";return r(S,{words:x()?.panel,label:l(e),changed:t,detail:D(`${i}px`,o?l("Site styles"):l("the section")),onReset:n})}function pr(){return r(T,{children:de()?l("The section is full width, so this card follows Site styles ▸ Basics ▸ Corners."):l("Follows the section's Corners until you set a number here.")})}function fr(){return ce({sidesKey:"cardCornerSides",useFollowed:()=>st(A),mark:r(ur,{label:Z}),hint:r(pr,{})})}function mr(){return{type:"custom",render:()=>r(ht,{})}}function _l(e){return{...e,render:t=>r(gt,{render:e.render,props:t})}}function Il(){return{_gShape:y("Shape"),cardCorners:fr(),cardCornerSides:rt(),cardCornersApplyAll:mr()}}function El(){return P("Justify",r(kt,{}),Xe,Xe[0].value)}function Tl(){return P("Item alignment",r(wt,{}),oo,"stretch")}function Rl(){return P(ao,r(on,{}),ze,ze[0].value)}function Ol(){return{type:"custom",render:({value:e,onChange:t})=>{const n=ae.find(o=>o.value===e)??ae[0];return r(m,{label:l(je),icon:r(Ie,{}),value:l(n.label),children:r(Be,{className:"sf-gallery-layouts",label:l(je),value:n.value,onChange:t,options:ae.map(o=>({value:o.value,label:l(o.label),picture:r("span",{className:"sf-gallery-pic",children:hr(o.weights).map((i,a)=>r("i",{style:{gridColumn:`span ${i}`}},a))})}))})})}}}function hr(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function wl(){return P(ro,r(Ee,{}),Ue,Ue[0].value)}function Pl(){return M(io,r(Yt,{}),$e,lo,1,$e)}function kl(e){const t=ue(to,Bo("`Direction` names how a container's children run — a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; editor-shell's own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),no(e),We(e,void 0));return{type:"custom",render:n=>t.render({...n,value:We(e,n.value),onChange:o=>n.onChange(o)})}}function Nl(e,t,n,o,i,a){return{type:"custom",render:({value:c,onChange:s})=>r(m,{label:l(e),icon:r(Ne,{noun:a}),action:r(S,{words:x()?.panel,label:l(e),changed:!No(c),detail:l("the Text style in Site styles"),onReset:()=>s(ko),defaultAction:{onPress:()=>s(Po),title:l("Keep this section's own built-in size"),icon:r(At,{})}}),children:G({min:t,max:n,step:o,value:typeof c=="number"?c:i,suffix:"px",ariaLabel:e,onChange:s})})}}function Ll(){return{_gCellWidth:y("Cell width"),gridSpan:P("Positions",r(Ie,{}),[{label:"Auto",value:""},...Array.from({length:yt},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function N(){let e=null;try{e=K(t=>t).selectedItem}catch{e=null}return e?.props??{}}function gr({min:e,max:t,step:n,px:o,label:i,onChange:a,desktopKey:c,fallback:s}){const d=N()[c],u=ie(void 0,d,s);return r(T,{children:G({min:e,max:t,step:n,value:ie(o,d,s),readout:!1,ariaLabel:i,notch:u,onChange:a})})}function br({label:e,desktopKey:t,fallback:n,changed:o=!1,onReset:i=()=>{}}){const a=N()[t],c=ie(void 0,a,n);return r(S,{words:x()?.panel,label:l(e),changed:o,detail:l("{value} on desktop",{value:`${c}px`}),onReset:i})}function xr(e){return nt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:r(br,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>r(gr,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}function Al(e){return{type:"custom",render:({value:t,onChange:n})=>r(yr,{...e,value:t,onChange:n})}}function Sr({label:e,icon:t,options:n,value:o,resolved:i,restWord:a,onChange:c}){const s=n.some(d=>d.value===o);return r(m,{label:l(e),icon:w(t),action:r(S,{words:x()?.panel,label:l(e),changed:s,detail:l("{value} on desktop",{value:l(a)}),onReset:()=>c(void 0)}),children:ee({options:n,value:s?o:i,onChange:d=>c(d),ariaLabel:e})})}function yr({label:e,icon:t,options:n,desktopKey:o,resolve:i,value:a,onChange:c}){const s=N()[o],d=i(void 0,s),u=n.find(f=>f.value===d)?.label??"";return r(Sr,{label:e,icon:t,options:n,value:a,resolved:d,restWord:u,onChange:c})}const Cr={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},_r={Top:Pe,Bottom:Re,Left:Oe,Right:we},Ir=e=>{const t=_r[e];return r(t,{})};function vl(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,i=_=>Cr[_],a=_=>M(i("Top"),r(Pe,{}),E.min,E.max,E.step,_,"px"),c=(_,j,O,te=E)=>g("mobile",xr({label:i(_),icon:Ir(_),desktopKey:j,min:te.min,max:te.max,step:te.step,fallback:O})),s=e.top??E.min,d=e.bottom??E.min,u="sectionPaddingLeft",f="sectionPaddingRight",p=e.sideBounds??E,h=e.side??p.min,b=e.sidePhone??h,C=e.phone===!0,R=_=>C?g("desktop",_):_;return F({...o?{_gSpacing:y("Padding")}:{},[t]:R(a(s)),...C?{[v(t)]:c("Top",t,s)}:{},...e.only==="top"?{}:{[n]:R(M(i("Bottom"),r(Re,{}),E.min,E.max,E.step,d,"px")),...C?{[v(n)]:c("Bottom",n,d)}:{}},...e.sides?{[u]:R(M(i("Left"),r(Oe,{}),p.min,p.max,p.step,h,"px")),...C?{[v(u)]:c("Left",u,b,p)}:{},[f]:R(M(i("Right"),r(we,{}),p.min,p.max,p.step,h,"px")),...C?{[v(f)]:c("Right",f,b,p)}:{}}:{}})}const $=["top","right","bottom","left"],Er={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},ct=e=>typeof e=="number"?e:null;function Tr(e,t,n){const o={};for(const i of $)n[i]!==t[i]&&(o[e[i]]=n[i]??void 0);return o}function Rr({tier:e,o:t}){let n=null;try{n=fe()}catch{n=null}const o=n?.values??{},i=e==="mobile"?t.phoneKeys:t.keys,a=Object.fromEntries($.map(u=>[u,ct(o[i[u]])])),c=Object.fromEntries($.map(u=>[u,String(e==="mobile"?ct(o[t.keys[u]])??t.fallback[u]:t.fallback[u])])),[s,d]=z(()=>hn(a,c));return r(m,{label:l("Padding"),icon:r(Vt,{}),action:r(Fe,{each:s,label:l("Each side"),onChange:d}),children:r(mn,{label:l("Padding"),each:s,value:a,placeholder:c,min:t.min,max:t.max,step:t.step,onChange:u=>{const f=Tr(i,a,u);Object.keys(f).length&&n?.onChangeMany(f)},words:{sides:{top:l("Padding top"),right:l("Padding right"),bottom:l("Padding bottom"),left:l("Padding left")},vertical:l("Top and bottom"),horizontal:l("Left and right"),unit:"px"}})})}function Fl(e={}){const t={...Er,...e.keys},n={keys:t,phoneKeys:Object.fromEntries($.map(s=>[s,v(t[s])])),fallback:{top:0,right:0,bottom:0,left:0,...e.fallback},min:e.min??0,max:e.max??200,step:e.step??4},o=e.phone!==!1,i=s=>{const d={type:"custom",render:()=>r(Rr,{tier:s,o:n})};return o?g(s,d):d},a=()=>q({type:"custom",render:()=>r(re,{})},"always"),c=$.filter(s=>s!=="top");return F({...e.group===!1?{}:{_gSpacing:y("Padding")},[n.keys.top]:i("desktop"),...o?{[n.phoneKeys.top]:i("mobile")}:{},...Object.fromEntries(c.map(s=>[n.keys[s],{...a(),reachedBy:n.keys.top}])),...o?Object.fromEntries(c.map(s=>[n.phoneKeys[s],g("mobile",a())])):{}})}const Or={contained:"Contained",page:"Page",full:"Full"},Q="Width";function Dl(e,t=Lo,n=!0){const o=t.map(i=>({label:Ao[i]??Or[i],value:i}));return F({...n?{_gWidth:y(Q)}:{},widthMode:{type:"custom",render:({onChange:i,field:a})=>r(m,{label:l(Q),icon:r(nn,{}),action:n?r(Wo,{inherited:a?.inherited??!1,onReset:()=>i(vo),label:Q}):void 0,children:ee({options:o,value:a?.currentValue||e,onChange:i,ariaLabel:Q})})}})}function Bl(){const e=o=>({type:"custom",render:({value:i,onChange:a})=>r(m,{label:U,icon:w(r($t,{})),action:o?o(a):void 0,children:ee({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(i)?i:"auto",onChange:a,ariaLabel:U})})}),t=()=>({type:"custom",render:({value:o,onChange:i,field:a})=>{const c=a?.unit==="%"?"%":"px",s=c==="%"?eo:Qn;return r("div",{className:"sf-field",children:G({min:s.min,max:s.max,step:s.step,value:typeof o=="number"?o:s.fallback,suffix:c,ariaLabel:U,onChange:i})})}}),n=()=>ue("Unit",r(Te,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return F({_gHeight:y(U),sectionHeightMode:g("desktop",e()),sectionHeightValue:g("desktop",t()),sectionHeightUnit:g("desktop",n()),sectionHeightModePhone:g("mobile",e(o=>r(wr,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:g("mobile",t()),sectionHeightUnitPhone:g("mobile",n())})}function wr({onClear:e}){const t=N(),n=Yn(t),o=qn(t),i=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return r(S,{words:x()?.panel,label:l(U),changed:n,detail:i,onReset:e})}function Hl(){const e=n=>({type:"custom",render:({value:o,onChange:i,id:a,name:c})=>r(Pr,{value:o,onChange:i,labelId:`${a??c??"stickTop"}-label`,phone:n})}),t=()=>({type:"custom",render:({value:n,onChange:o})=>r("div",{className:"sf-field",children:G({min:J.min,max:J.max,step:J.step,value:typeof n=="number"?n:J.fallback,suffix:"px",ariaLabel:l("Distance from top"),onChange:o})})});return{_gStick:y(le),stickTop:g("desktop",e(!1)),stickTopDistance:g("desktop",t()),stickTopPhone:g("mobile",e(!0)),stickTopDistancePhone:g("mobile",t())}}function Pr({value:e,onChange:t,labelId:n,phone:o}){const i=N(),a=Zn(i),c=o?a.phone:e===!0;return r(m,{label:l(le),labelId:n,icon:w(r(Zt,{})),action:k(T,{children:[o?r(S,{words:x()?.panel,label:l(le),changed:Jn(i),detail:l("{value} on desktop",{value:a.desktop?`${a.desktopDistance}px`:l("Off")}),onReset:()=>t(void 0)}):null,r(De,{checked:c,onChange:t,ariaLabelledBy:n})]})})}function Gl(){return{_gAnchor:y("Anchor"),anchor:Yo("Anchor name","e.g. about",jo)}}function Ml(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=`${a??c??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return r(m,{label:l(e),icon:t,htmlFor:s,hint:n===void 0?void 0:l(n),children:r(kn,{id:s,value:Number.isFinite(d)?new Date(d):null,onChange:u=>i(u?u.toISOString():"")})})}}}function L(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=typeof o=="boolean"?o:t,d=`${a??c??e}-label`;return r(m,{label:l(e),labelId:d,icon:n,action:r(De,{checked:s,onChange:i,ariaLabelledBy:d})})}}}function Kl(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const i=`${String(n??o??"pageBackground")}-colour`;return r(m,{label:l("Background"),icon:r(ke,{}),htmlFor:i,action:r(Ge,{id:i,label:"Background",value:rn(e),onChange:t})})}}}function Wl(e,t){return{type:"custom",render:({value:n,onChange:o,id:i})=>{const a=typeof n=="boolean"?n:t,c=`${i??e}-checkbox`;return r(m,{label:l(e),htmlFor:c,className:"sf-checkbox",action:r(wn,{id:c,checked:a,onChange:o})})}}}function Ul(e,t){return{type:"custom",render:({value:n,onChange:o})=>r(m,{label:l(e),action:Ge({value:n||t,onChange:o,label:e})})}}const kr=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function dt({label:e,value:t,onChange:n,points:o=kr}){const i=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return r(On,{label:l(e),value:t,points:i,onChange:n})}function Xl(){return q({type:"custom",render:()=>r(re,{})},"always")}const Nr=Ce([]);function $l(e,{stacking:t,fallback:n=Et}){return{type:"custom",render:({value:o,onChange:i})=>{const a=It.includes(o)?o:n;return t?r(Lr,{label:e,value:a,onChange:i}):ut({label:e,value:a,onChange:i,points:Nr})}}}function Lr({label:e,value:t,onChange:n}){const{appState:o,selectedItem:i}=K(s=>s),a=i?.props?.id?String(i.props.id):void 0,c=a?_t(o?.data,a):[];return ut({label:e,value:t,onChange:n,points:Ce(c,a)})}function ut({label:e,value:t,onChange:n,points:o}){const i=o.find(a=>a.disabled);return r(m,{label:l(e),icon:r(qt,{}),hint:i?.title?l(i.title):void 0,children:dt({label:e,value:Tt(t),onChange:n,points:o})})}const jl={top:r(Mt,{}),right:r(Gt,{}),bottom:r(Bt,{}),left:r(Ht,{})};function zl(e,t,n,o,i,a){const c=f=>t.find(p=>p.value===f),s=f=>({value:f,label:"",disabled:!0,title:o}),d=f=>{const p=t.find(b=>b.cell===f);if(!p)return s(`missing-${f}`);const h=a?.[f];return h?{value:p.value,label:p.label,icon:h}:{value:p.value,label:p.label}},u=[s("corner-top-left"),d("top"),s("corner-top-right"),d("left"),s("centre"),d("right"),s("corner-bottom-left"),d("bottom"),s("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:p})=>{const h=t.some(b=>b.value===f)?f:n;return r(m,{label:l(e),icon:i,value:c(h)?.label?l(c(h).label):"",children:dt({label:e,value:h,onChange:p,points:u})})}}}const Ar="\0note";function P(e,t,n,o,i){return{type:"custom",options:n,fallback:o,...i?{note:i}:{},render:({value:a,onChange:c,field:s})=>{const d=s.options??n,u=s.fallback??o,f=d.some(p=>p.value===a)?a:u;return r(m,{label:l(e),icon:w(t),children:r(xn,{value:f,ariaLabel:l(e),onChange:c,options:[...i?[{label:l(i),value:Ar,disabled:!0}]:[],...d.map(p=>({label:l(p.label),value:p.value}))]})})}}}function Vl(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:i,field:a})=>r($n,{label:e,options:(a.options??t).map(c=>({...c,label:l(c.label)})),value:Array.isArray(o)?o:[],onChange:i,...n?{emptyLabel:l(n)}:{}})}}function Yl(e,t,n,o){return{type:"custom",options:t,fallback:n,render:({value:i,onChange:a,field:c})=>r(zn,{label:e,options:(c.options??t).map(s=>({...s,label:l(s.label)})),fallback:c.fallback??n,value:i,onChange:a,placeholder:o===void 0?void 0:l(o)})}}function ql(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const i={value:n,onChange:o,...t};return r(e,{...i})}}}function ee({options:e,value:t,onChange:n,ariaLabel:o,disabled:i=!1}){return r(fn,{options:e.map(a=>a.picture?{id:a.value,label:a.picture,title:l(a.title??a.label)}:{id:a.value,label:l(a.label),title:a.title===void 0?void 0:l(a.title)}),value:t,onChange:n,ariaLabel:l(o),disabled:i})}const Jl=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function ue(e,t,n,o){const i=n.map(a=>typeof a=="string"?{label:a,value:a}:a);return{type:"custom",render:({value:a,onChange:c,field:s})=>r(m,{label:l(e),icon:w(t),children:ee({options:i,value:i.some(d=>d.value===a)?a:a||s?.currentValue||o,onChange:c,ariaLabel:e})})}}function Zl(e,t,n,o={}){return{type:"custom",[be]:!0,render:({value:i,onChange:a})=>r(Xn,{value:i||"",onChange:a,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen})}}const Ql={HeroSingle:["imageFocal"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function ea({value:e,onChange:t,label:n}){const o=e||{},i=!!o.pending,a=i?"var(--fg-dim, #888)":o.ok?"#1d9e75":"#d85a30",c=(s,d)=>t({...o,[s]:d===""?void 0:Number(d)});return k(m,{label:l(n),icon:r(oe,{}),children:[r("button",{type:"button",disabled:i,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"8px 10px",fontSize:13,cursor:i?"default":"pointer",opacity:i?.6:1,border:"1px solid var(--border-strong, #ccc)",borderRadius:6,background:"transparent",color:"inherit"},children:i?l("Finding…"):l("Find coordinates")}),o.status&&r("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:a},children:l(o.status)}),r("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:l("Coordinates from OpenStreetMap")}),r("button",{type:"button",onClick:()=>t({...o,manual:!o.manual}),style:{marginTop:8,padding:0,border:"none",background:"none",font:"inherit",fontSize:12,color:"var(--sf-accent, #2563eb)",cursor:"pointer",textDecoration:"underline"},children:o.manual?l("Hide manual coordinates"):l("Enter coordinates manually")}),o.manual&&k("div",{style:{marginTop:8,display:"grid",gap:8},children:[r(m,{label:l("Latitude"),icon:r(oe,{}),children:r("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"34.0990198"}),value:typeof o.lat=="number"?o.lat:"",onChange:s=>c("lat",s.target.value)})}),r(m,{label:l("Longitude"),icon:r(oe,{}),children:r("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"-117.9842833"}),value:typeof o.lng=="number"?o.lng:"",onChange:s=>c("lng",s.target.value)})})]})]})}function vr(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Fr(e,t,n){const o=e.map(i=>({text:i?.text??""}));return t===null||t<0||t>=e.length?o:o.map((i,a)=>a===t?{text:n}:i)}function ta(e,t){return e===null?null:t>e?e:null}function Dr(e,t,n){if(n===null||n>=t.length)return null;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return null;return e[n]!==t[n]&&t.includes(e[n])||e[n]!==t[n]&&t.length!==e.length?null:n}const na={label:"Ticker items",icon:r(zt,{})};function oa(e,t,n,o){return{type:"custom",[I]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},render:({value:i,onChange:a})=>r(Br,{label:e,icon:w(t),items:Array.isArray(i)?i:[],placeholder:n,onChange:a,markup:o==="markup"})}}function Br({label:e,icon:t,items:n,placeholder:o,onChange:i,markup:a=!1}){const c=ne(null),[s,d]=z(null),u=p=>p.map(h=>({text:h?.text??""})),f=p=>{const h=Dr(n,p,s);h===null&&(c.current=null),d(h),i(u(p))};return r(Sn,{label:l(e),icon:t,noun:l("item"),items:n,onChange:f,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?r(Me,{target:c,value:vr(n,s),onChange:p=>i(Fr(n,s??-1,p)),disabled:s===null,label:s===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:s+1})}):void 0,renderRow:(p,h,b)=>r("input",{type:"text",className:a&&s===h?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:h+1}),onChange:C=>b({text:C.target.value}),onFocus:C=>{c.current=C.currentTarget,d(h)}})})}function ra(e,t){const n=`${e.label} — row ${t+1}`;return H({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:i})=>r(B,{value:o,onChange:i,label:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function ia(e){return{_gCards:y("Cards"),coverIndex:P("Cover image",r(jt,{}),Kn,String(Wn),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:tr("Image background",bo),cardImage:Gr(),spinOnHover:L("Rotate on hover",e?.spinDefault??!0,r(Qt,{}))}}function la(){return{outline:P("Card outline",r(en,{}),Hn,Mn),indexBadge:P("Card number",r(Te,{}),Bn,Gn),showBadge:L("Product badge",!0,r(Ne,{noun:"tag"}))}}function aa(e){const t=e&&"bottomDefault"in e?e.bottomDefault:!0,n=e&&"defaults"in e?e.defaults:{showCardSizes:t,showCardBuy:t,showCardPage:t};return{_gShowOnCard:y("Show on a card"),showCardPrice:L("Price",!0,r(Kt,{})),showCardFinishes:L("Finish swatches",!0,r(Wt,{})),showCardSizes:L("Sizes",n.showCardSizes,r(Jt,{})),showCardBuy:L("Buy button",n.showCardBuy,r(vt,{})),showCardPage:L("Page button",n.showCardPage,r(ke,{}))}}function sa(e,t="display"){const n=v(t);return{[t]:g("desktop",{type:"custom",render:({value:o,onChange:i})=>r(pt,{parts:e,changed:Cn(o),shown:a=>_n(o,a),onPress:(a,c)=>i(Tn(o,a,c)),onReset:()=>i(void 0)})}),[n]:g("mobile",{type:"custom",render:({value:o,onChange:i})=>r(Hr,{parts:e,desktopKey:t,value:o,onChange:i})})}}function pt({parts:e,changed:t,shown:n,onPress:o,onReset:i,detail:a}){const c=l("Display");return r(m,{label:c,icon:r(Pt,{}),changed:t,action:r(S,{words:x()?.panel,label:c,changed:t,detail:a,onReset:i}),children:r(yn,{label:c,items:e.map(s=>({id:s.id,label:l(s.label),shown:n(s.id)})),onChange:o})})}function Hr({parts:e,desktopKey:t,value:n,onChange:o}){const i=N()[t];return r(pt,{parts:e,changed:En(n),shown:a=>In(i,n,a),onPress:(a,c)=>o(Rn(n,a,c)),onReset:()=>o(Fn),detail:l("the same as Desktop")})}function Gr(){return nt("Card image",{min:A,max:Se,step:bt,hint:"Rounds the picture. The card's own corner is in Site styles."})}function ca(){return ce({sidesKey:"cornerSides",step:xt,useFollowed:()=>A,mark:r(Mr,{label:St}),hint:l("Rounds the picture. Left alone it stays square.")})}function Mr({label:e,changed:t=!1,onReset:n=()=>{}}){return r(S,{words:x()?.panel,label:l(e),changed:t,onReset:n})}function da(){return{type:"custom",render:({value:e,onChange:t})=>r(Kr,{value:typeof e=="string"?e:"",onChange:t})}}function Kr({value:e,onChange:t}){const[n,o]=z(null),i=ye.filter(c=>n===null||W[c].across===n),a=e&&e in W?W[e]:null;return k(T,{children:[r(m,{label:l("Photos in a row"),icon:r(Ft,{}),children:k("div",{className:"sf-gallery-filter",children:[r("button",{type:"button","aria-pressed":n===null,onClick:()=>o(null),children:l("All")}),Ct.map(c=>r("button",{type:"button","aria-pressed":n===c,onClick:()=>o(c),children:c},c))]})}),r(m,{label:l("Layout"),icon:r(Ut,{}),value:a?l(a.label):l("Not chosen"),hint:l("{n} of {total} layouts",{n:i.length,total:ye.length}),children:r(Be,{className:"sf-gallery-layouts",label:l("Layout"),value:e,onChange:t,onClear:()=>t(""),options:i.map(c=>({value:c,label:l(W[c].label),picture:r("span",{className:"sf-gallery-pic",children:W[c].desktop.map(([s,d],u)=>r("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${d}`}},u))})}))})})]})}export{jo as ANCHOR_HINT,Xo as BOUND_TO_POST,el as BOUND_TO_POST_NOTE,al as BUCKET_ICONS,Ql as CUSTOM_FIELD_MEDIA,ea as CoordsField,jl as EDGE_ARROWS,Nn as FOCAL_DEFAULT,kr as FOCAL_POINTS,V as FOLD_FIELD_MARKER,dt as FocalPicker,er as GroupLabel,$o as HIGHLIGHT_HINT,B as HidableTextField,ge as LINK_FIELD_MARKER,ji as Label,be as MEDIA_FIELD_MARKER,Jl as MEDIA_TYPE_OPTIONS,tl as NOT_BOUND_TO_POST,Zo as PanelNoteLine,yr as PhoneChoiceRow,Sr as PhoneChoiceStrip,ut as PlacementGridView,xe as SCAFFOLD_FIELD_MARKER,ma as SCALAR_TEXT_CONTROLS,it as SECTION_BLEEDS_HINT,Er as SIDE_PAD_KEYS,qo as SectionHeading,ee as Segmented,Ko as SiteGapDefaultReset,G as Slider,tt as Swatches,fa as TEXT_CONTROL_KINDS,I as TEXT_FIELD_MARKER,na as TICKER_ITEMS_ROW,Br as TextListField,Wo as WidthDefaultReset,Dr as aimAfterListChange,Gl as anchorFields,D as backTo,bl as backgroundField,Tl as boxAlignField,wl as boxBlockSpacingField,El as boxJustifyField,Pl as boxPhoneRowField,Ol as boxShareField,Rl as boxWrapField,pl as bucketHeader,fr as cardCornersField,tr as cardImageBackgroundField,Gr as cardImageField,ia as cardMediaFields,Il as cardShapeFields,aa as cardShowFields,la as cardStyleFields,Ll as cellWidthFields,Wl as checkbox,Ul as colorInput,rl as copyText,rt as cornerSidesField,ce as cornersRowField,Ml as dateTime,ml as designGroupHeader,kl as directionField,sa as displayFields,zl as edgePad,sl as entriesHiddenForTab,ta as focusAfterRemove,Xl as focusKeptField,hl as foldMarker,Y as foldMetaOf,Qo as foldTitleOf,da as galleryLayoutField,Sl as gapField,y as group,Bl as heightFields,he as hidableText,Vo as hintIsWhileTyping,w as iconOf,ca as imageCornersField,Qi as inOwnBox,ul as isBucketHeader,fl as isDesignGroupHeader,Ho as isNoGlyph,il as linkField,Vl as multiSelect,Bo as noGlyph,Kl as pageBackgroundField,cl as panelNote,Al as phoneChoiceField,xr as phoneOverrideField,$l as placementField,Yo as plainText,ll as plainTextarea,nt as pxField,gl as quietMarker,me as readHidable,vr as rowText,Yl as searchSelect,dl as section,Cl as sectionAnimationFields,at as sectionBorderField,ir as sectionCornersField,yl as sectionShapeFields,xl as sectionThemeFields,ue as segmented,P as select,Fr as setRowText,Fl as sidesPaddingFields,Tr as sidesPaddingPatch,Nl as sizeField,M as slider,ql as sourceField,vl as spacingFields,Hl as stickFields,_l as templateField,nl as text,mt as textFieldIdentifier,Yi as textFieldOffPage,Ji as textFieldPanelOnly,oa as textList,ra as textListRowField,ol as textarea,L as toggle,Zl as upload,Go as usePageWidthDetail,Mo as useSiteGapDetail,Dl as widthField,Zi as withIdentifier,Vi as withOffPage,qi as withPanelOnly,zi as withScaffold};
1
+ "use client";import{jsx as r,jsxs as k,Fragment as T}from"react/jsx-runtime";import{cloneElement as pe,useId as ft,useRef as ne,useState as z}from"react";import{useEasel as W,useSelectedFields as fe}from"efficient-easel/easel";import{say as l,editorEaselWords as x}from"../../../format/lib/editor-words.js";import{readHidable as he,hidableText as me}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as V,LINK_FIELD_MARKER as ge,MEDIA_FIELD_MARKER as be,SCAFFOLD_FIELD_MARKER as xe,TEXT_FIELD_MARKER as I,foldMetaOf as Y,textFieldIdentifier as ht}from"efficient-easel/draw";import mt from"../../components/ApplyCornersToSiblings.js";import gt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as bt,CORNER_RADIUS_MAX as Se,CORNER_RADIUS_MIN as v}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as xt,IMAGE_CORNERS_LABEL as St}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as yt}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Ct,GALLERY_LAYOUTS as U,GALLERY_LAYOUT_KEYS as ye}from"../../../format/lib/content/gallery-layout.js";import{anchorSiblingsOf as _t,HERO_GROUP_PLACEMENTS as It,HERO_GROUP_PLACEMENT_DEFAULT as Et,normalisePlacement as Tt,placementPoints as Ce}from"../../../format/lib/hero-group-placement.js";import Rt from"../../components/KeepHint.js";import{AdjustIcon as Ot,AlignLeftIcon as wt,EyeIcon as Pt,AlignSeparateIcon as kt,AnimationIcon as _e,BackgroundIcon as Lt,BorderAllIcon as Nt,BlockSectionIcon as At,CartIcon as vt,ColumnWidthsIcon as Ie,ColumnsIcon as Ft,CornerIcon as Dt,DirectionDownIcon as Bt,DirectionLeftIcon as Ht,DirectionRightIcon as Gt,DirectionUpIcon as Mt,DollarIcon as Kt,FinishIcon as Wt,GapIcon as Ee,GridIcon as Ut,GroundIcon as Xt,HashIcon as Te,HeightIcon as $t,ImageIcon as jt,ListIcon as zt,LocationIcon as oe,PaddingAllIcon as Vt,PaddingBottomIcon as Re,PaddingLeftIcon as Oe,PaddingRightIcon as we,PaddingTopIcon as Pe,PageIcon as ke,PhoneIcon as Yt,PlacementIcon as qt,ProductSizeIcon as Jt,StickyIcon as Zt,RotateIcon as Qt,SquareIcon as en,TypeIcon as tn,WidthIcon as nn,WrapIcon as on}from"efficient-easel/icons";import{FieldGlyph as Le}from"../../components/FieldGlyph.js";import{resolvePageBackground as rn}from"../../../format/lib/content/page-background.js";import{CORNER_SIDES as Ne,CORNER_SIDE_POINTS as ln,hasOwnSectionCorners as an,normalizeCornerSides as Ae}from"../../../format/lib/content/section-corners.js";import{SECTION_MOTION_NONE as sn,SECTION_MOTION_OPTIONS as cn}from"../../../format/lib/content/section-animation.js";import{enclosingSectionProps as ve}from"./enclosing-section.js";import{SettingsDefaultReset as S,SettingsField as h,SettingsGroupHead as dn,SettingsGroupSub as un,SettingsBorder as pn,SettingsSegmented as fn,SettingsSides as hn,SettingsSidesEach as Fe,sidesStartEach as mn,SettingsSwitch as De,borderSides as gn,borderStartEach as bn}from"efficient-easel/panel";import{FieldSelect as xn,ListField as Sn}from"efficient-easel/fields";import{DisplayChips as yn}from"efficient-shell/ui";import{desktopDisplayChanged as Cn,partShownOnDesktop as _n,partShownOnPhone as In,phoneDisplayChanged as En,withDesktopPart as Tn,withPhonePart as Rn}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as On,Checkbox as wn,CornersInput as Pn,DateTimePicker as kn,FOCAL_DEFAULT as Ln,PictureTiles as Be,Slider as Nn,Tooltip as He}from"efficient-shell/ui";import{ColourControl as Ge,InheritedColourRow as An}from"./ColourControl.js";import Me from"./MarkupToolbar.js";import{deviceField as g}from"./device-fields.js";import{NO_CONTROL_FIELD as vn,NoControlMark as re,noControlField as q}from"./panel-no-control-mark.js";import{OWN_BOX_FIELD as Fn}from"../../../format/lib/puck/own-box.js";import{PHONE_CLEAR as Dn,phoneKey as F,resolvePhoneValue as ie}from"../../../format/lib/puck/phone-override.js";import{SuppressibleText as Bn}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Hn,CARD_OUTLINE_OPTIONS as Gn,DEFAULT_CARD_INDEX_FORMAT as Mn,DEFAULT_CARD_OUTLINE as Kn}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Wn,DEFAULT_COVER_INDEX as Un}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Xn}from"efficient-easel/draw";import $n from"../../components/MediaUploadField.js";import jn from"../../components/MultiSelectField.js";import zn from"../../components/SectionThemePicker.js";import Vn from"../../components/SearchSelectField.js";import Yn from"../../components/StorefrontLinkField.js";import{UiIcon as Ke}from"efficient-easel/draw/client";import{SECTION_PADDING as E}from"../../../format/lib/content/section-padding.js";import{hasPhoneHeight as qn,resolveSectionMinHeight as Jn}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as J,SECTION_STICK_LABEL as le,hasPhoneStick as Zn,resolveSectionStick as Qn}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as eo,SECTION_MIN_HEIGHT_GROUP_LABEL as X,SECTION_SCREEN_PCT as to}from"../../../format/lib/content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as no,containerDirectionPoints as oo,resolveContainerDirection as We}from"../../../format/lib/content/container-direction.js";import{BOX_ALIGN_POINTS as ro,BOX_BLOCK_SPACING_LABEL as io,BOX_BLOCK_SPACING_POINTS as Ue,BOX_JUSTIFY_POINTS as Xe,BOX_PHONE_ROW_LABEL as lo,BOX_PHONE_ROW_MAX as ao,BOX_PHONE_ROW_MIN as $e,BOX_SHARE_LABEL as je,BOX_SHARE_POINTS as ae,BOX_WRAP_LABEL as so,BOX_WRAP_POINTS as ze}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as D}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as co}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as uo,normalizeTheme as po,siteButtonPaint as fo}from"../../../format/lib/theme.js";import{CONTAINER_GAP as se,CONTAINER_GAP_BUILT_IN as ho,GAP_FIELD_CONTAINER as mo,hasOwnContainerGap as go,resolveContainerGap as bo}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as xo,CARD_IMAGE_BG_OFF as So,CARD_IMAGE_BG_SWATCH_NAMES as yo,CARD_IMAGE_BG_SWATCHES as Co,isCardImageBackgroundInheriting as _o,cardImageBackgroundChoice as Io,THEME_CARD_IMAGE_BG as Eo}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as To,SECTION_BG_SWATCHES as Ro,SECTION_BG_SWATCH_NAMES as Oo,THEME_SECTION_BG as wo,isSectionBackgroundInheriting as Po}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as ko}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Lo,TYPE_SIZE_INHERIT as No,isTypeSizeInheriting as Ao}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as vo,WIDTH_CHOICE_LABEL as Fo,WIDTH_INHERIT as Do,resolveWidth as Bo,sectionRunsFullWidth as Ve}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as Ye}from"./panel-heading-scope.js";import{withStyleKind as Ho}from"efficient-easel/style-clipboard";function B(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!Y(n)&&Ho(n,`section:${t}`);return e}function Yi({children:e}){return r("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function qe(){return null}function Go(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return r(qe,{},e)}function Mo(e){return e.type===qe}function w(e){return Mo(e)?void 0:e}function L(e,t){return l("{value} from {from}",{value:e,from:t})}function Ko(){const{appState:e}=W(i=>i),t=e.data.root?.props??{},{mode:n,pageWidth:o}=Bo(t,"full");return n==="page"?L(`${o}px`,l("the page")):n==="contained"?L(l("Contained"),l("the page")):L(l("Full"),l("the page"))}function Wo(){const{blockGap:e}=D();return e===null?l("this container's own spacing"):L(`${e}px`,l("Site styles"))}function Uo({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:Wo(),onReset:t})}function Xo({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:Ko(),onReset:t})}function H({value:e,onChange:t,label:n,placeholder:o,hint:i,multiline:a,hideable:c=!0,markup:s=!0}){const{text:d,hidden:u}=he(e),f=ne(null),p=ne(null),m=O=>t(c?{text:O,hidden:u}:O),b=()=>t({text:d,hidden:!u}),C=c&&u,R=ft(),_=i?qo(i)?r("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(i)}):r(Rt,{children:l(i)}):void 0,j=u?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return r(h,{label:l(n),icon:r(tn,{}),htmlFor:R,className:C?"is-hidden":void 0,hint:_,action:c?r(He,{content:j,children:r("button",{type:"button",className:"sf-field-eye","aria-pressed":u,"aria-label":j,onClick:b,children:u?r(Ke,{name:"eye-off",size:14}):r(Ke,{name:"eye",size:14})})}):void 0,children:k("div",{className:"sf-copybox",children:[s&&r(Me,{target:a?p:f,value:d,onChange:m}),a?r("textarea",{id:R,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>m(O.target.value)}):r("input",{id:R,ref:f,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>m(O.target.value)})]})})}function qi(e,t){return{...e,[xe]:t}}function Ji(e){const t=e[I];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[I]:{...t,offPage:!0}}}function Zi(e){return!e||typeof e!="object"?!1:e[I]?.offPage===!0}const Je="sfPanelOnly";function Qi(e){if(!e[I])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Je]:!0}}function el(e){return!!e&&typeof e=="object"&&e[Je]===!0}function tl(e){const t=e[I];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[I]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as xa,SCALAR_TEXT_CONTROLS as Sa}from"efficient-easel/draw";function nl(e,t){if(!e[I])throw new Error("inOwnBox: the field holds no authored text");const{[vn]:o,...i}=e;return{...i,[Fn]:!0,render:t}}const $o=new Set(Xn),G=(e,t)=>{const n={...t,[I]:e};if(!$o.has(e.control))return n;const o=t.render;return{...q(n,"authored-copy"),render:i=>r(Bn,{name:i.name,children:o(i)})}},ol="Everything else on this block comes from the linked post. Unlink it to edit by hand.",jo={field:"source.slug",set:!0},rl={not:jo},zo="Select a word, then press the highlighter.",Vo="A short name so a link can jump straight to this section, like yoursite.com/page#about.",Yo=new Set([zo]),qo=e=>Yo.has(e);function il(e,t,n){return G({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n})})}function ll(e,t,n){return G({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0})})}function Jo(e,t,n){return G({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function al(e,t,n){return G({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1})})}function sl(e){return{type:"custom",[ge]:{label:e},render:({value:t,onChange:n})=>r(Yn,{value:me(t),onChange:n,label:e})}}function cl(e,t,n){return G({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const dl={Design:Ot,Animation:_e};function ul(e,t){return e.includes("Design")?t!=="Design":null}function Zo({label:e}){return r(dn,{title:l(e),level:Ye(1)})}function Qo({level:e,label:t}){return e===1?r(Zo,{label:t}):r(nr,{label:t})}function Ze(e,t){return{type:"custom",[V]:{label:e,level:t},render:()=>r(Qo,{level:t,label:e})}}function y(e){return Ze(e,2)}function pl(e){return{type:"custom",render:()=>r(er,{text:e})}}function er({text:e}){return r("p",{className:"sf-note",children:l(e)})}function fl(e){return Ze(e,1)}function hl(e){return Y(e)!==null&&e?.tabs!==void 0}const Qe=new Map;function ml(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Qe.get(n)??{type:"custom",tabs:t,[V]:{label:e,level:1},bucket:e,marker:!0,render:()=>r(T,{})};return Qe.set(n,o),o}function gl(e){return Y(e)!==null&&e?.designGroup!==void 0}const et=new Map;function bl(e){const t=et.get(e)??{type:"custom",[V]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>r(T,{})};return et.set(e,t),t}function tr(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function xl(e,t){return tr(e)===t?e:{...e,marker:!0,fold:t,render:()=>r(T,{})}}function Sl(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>r(T,{})}}function nr({label:e}){return r(un,{title:l(e),level:Ye(2)})}function tt({swatches:e,current:t,onPick:n,names:o}){const i=e.find(s=>s.toLowerCase()===t.toLowerCase()),a=i?o?.[i]:void 0,c=a?l(a):t;return k("div",{className:"sf-swatches",children:[e.map(s=>{const d=o?.[s]?l(o[s]):s;return r(He,{content:d,children:r("button",{type:"button","aria-pressed":t.toLowerCase()===s.toLowerCase(),className:`sf-swatch ${t.toLowerCase()===s.toLowerCase()?"is-active":""}`,style:{background:s},onClick:()=>n(s),"aria-label":d})},s)}),r("span",{className:"sf-swatch-hex",children:c})]})}function yl(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=Po(n,t);return r(h,{label:l(e),icon:r(Lt,{}),changed:!i,action:r(S,{words:x()?.panel,label:l(e),changed:!i,detail:l("the theme's section background"),onReset:()=>o(To)}),children:tt({swatches:Ro,current:i?wo:n??t??"",onPick:o,names:Oo})})}}}function or(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=n,a=_o(i,t);return r(h,{label:l(e),icon:r(Xt,{}),changed:!a,action:r(S,{words:x()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(xo)}),children:tt({swatches:Co,current:a?Eo:Io(i,t),onPick:o,names:yo})})}}}function Cl(e=n=>n,t){return B({_gSectionTheme:y(ko),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>r(zn,{value:e(n),onChange:o,followLabel:t})}})}function M({min:e,max:t,step:n,value:o,onChange:i,suffix:a="",readout:c=!0,notch:s,ariaLabel:d,disabled:u=!1}){const f=s!==void 0&&Number.isFinite(s)&&s>=e&&s<=t;return r("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(s-e)/(t-e)}:void 0,children:r(Nn,{min:e,max:t,step:n,value:o,suffix:a||void 0,showInput:c,label:d===void 0?void 0:l(d),disabled:u,size:"sm",className:"sf-slider-track",onChange:p=>{p!==null&&p!==o&&i(p)}})})}function K(e,t,n,o,i,a,c="",s){return{type:"custom",render:d=>r(h,{label:l(e),icon:w(t),action:s?s("storedValue"in d?d.storedValue:d.value,d.onChange):void 0,children:M({min:n,max:o,step:i,value:typeof d.value=="number"?d.value:a,suffix:c,ariaLabel:e,onChange:d.onChange})})}}function nt(e,t){const{min:n,max:o,step:i=1,unsetLabel:a,hint:c,restTrack:s,unsetMark:d,icon:u}=t;return{type:"custom",render:({value:f,onChange:p})=>{const m=typeof f=="number"?f:null,b=m===null;return r(h,{label:l(e),icon:u?w(u):void 0,value:b?d||a===void 0?void 0:l(a):`${m}px`,changed:!b,action:d?pe(d,{changed:!b,onReset:()=>p(null)}):r(S,{words:x()?.panel,label:l(e),changed:!b,onReset:()=>p(null)}),hint:typeof c=="string"?l(c):c,children:s?s({min:n,max:o,step:i,px:m,label:e,onChange:p}):M({min:n,max:o,step:i,value:m??n,readout:!1,ariaLabel:e,onChange:p})})}}}function _l(e){const t=K("Gap",r(Ee,{}),se.min,se.max,se.step,ho[e],"px",(n,o)=>r(Uo,{inherited:!go(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[mo]:e,render:n=>t.render({...n,value:bo(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}const Z="Corners";function ce(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,i=o!==null;return r(h,{label:l(Z),icon:r(Dt,{}),changed:i,action:pe(e.mark,{changed:i,onReset:()=>n(null)}),hint:e.hint,children:r(rr,{tier:e,px:o,onRadius:n})})}}}function ot(e){let t=null;try{t=fe()}catch{t=null}return[t?.values?.[e],n=>t?.onChange(e,n)]}function rr({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),i=e.useClosedReason?e.useClosedReason():null,[a,c]=ot(e.sidesKey),s=Ae(a)??[...Ne];return r(Pn,{label:l(Z),value:s,corners:ln,onChange:d=>{const u=Ae(d)??[];c(u.length===Ne.length?null:u)},radius:t,onRadiusChange:n,radiusMin:v,radiusMax:Se,radiusStep:e.step??1,radiusPlaceholder:String(o),disabled:i!==null,disabledReason:i??void 0})}function rt(){return q({type:"custom",render:()=>r(re,{})},"always")}function ir({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=D(),i=typeof o=="number"?`${o}px`:l("not set");return r(S,{words:x()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):L(i,l("Site styles")),onReset:n})}function lr(){const{cornerRadiusPx:e}=D();return typeof e=="number"?e:v}function ar(){return ce({sidesKey:"sectionCornerSides",useFollowed:lr,useClosedReason:()=>lt()?l(it):null,mark:r(ir,{label:Z}),hint:r(sr,{})})}const it="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function lt(){return Ve(N())}function sr(){return r(T,{children:lt()?it:"Follows Site styles ▸ Basics ▸ Corners until you set a number here."})}function Il(){return B({_gShape:y("Shape"),sectionCorners:ar(),sectionCornerSides:rt(),sectionBorder:at("desktop"),sectionBorderPhone:at("mobile")})}const cr=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function dr(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function ur(){let e;try{const t=po(D().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||uo.line}function pr({value:e,onChange:t,tier:n}){const[o]=ot("sectionBorder"),i=ur(),a=e&&typeof e=="object"?e:{},c=n==="mobile"?o&&typeof o=="object"?o:{}:{},[s,d]=z(()=>bn(a,c)),u=cr();return r(h,{label:l("Border"),icon:r(Nt,{}),action:r(Fe,{each:s,label:l("Each side"),onChange:d}),children:r(pn,{label:l("Border"),value:a,each:s,onChange:f=>t(dr(f)),placeholder:{sides:gn(c),style:c.style??"solid",color:c.color||i},presets:[i],words:u,max:co})})}function at(e){return g(e,{type:"custom",render:({value:t,onChange:n})=>r(pr,{value:t,onChange:n,tier:e})})}function El(){return{_gMotion:y("Motion"),sectionAnimation:ue("Entrance",r(_e,{}),[...cn],sn)}}function de(){let e=null;try{const{appState:t,selectedItem:n}=W(i=>i),o=n?.props?.id?String(n.props.id):void 0;e=o?ve(t?.data,o):null}catch{e=null}return e!==null&&Ve(e)}function st(e){const{cornerRadiusPx:t}=D(),n=de(),o=typeof t=="number"?t:e;let i=null;try{const{appState:c,selectedItem:s}=W(u=>u),d=s?.props?.id?String(s.props.id):void 0;i=d?ve(c?.data,d):null}catch{i=null}if(n||!i)return o;const a=i.sectionCorners;return an(a)?a:o}function fr({label:e,changed:t=!1,onReset:n=()=>{}}){const o=de(),i=st(v),a=o?"Site":"Section";return r(S,{words:x()?.panel,label:l(e),changed:t,detail:L(`${i}px`,o?l("Site styles"):l("the section")),onReset:n})}function hr(){return r(T,{children:de()?l("The section is full width, so this card follows Site styles ▸ Basics ▸ Corners."):l("Follows the section's Corners until you set a number here.")})}function mr(){return ce({sidesKey:"cardCornerSides",useFollowed:()=>st(v),mark:r(fr,{label:Z}),hint:r(hr,{})})}function gr(){return{type:"custom",render:()=>r(mt,{})}}function Tl(e){return{...e,render:t=>r(gt,{render:e.render,props:t})}}function Rl(){return{_gShape:y("Shape"),cardCorners:mr(),cardCornerSides:rt(),cardCornersApplyAll:gr()}}function Ol(){return P("Justify",r(kt,{}),Xe,Xe[0].value)}function wl(){return P("Item alignment",r(wt,{}),ro,"stretch")}function Pl(){return P(so,r(on,{}),ze,ze[0].value)}function kl(){return{type:"custom",render:({value:e,onChange:t})=>{const n=ae.find(o=>o.value===e)??ae[0];return r(h,{label:l(je),icon:r(Ie,{}),value:l(n.label),children:r(Be,{className:"sf-gallery-layouts",label:l(je),value:n.value,onChange:t,options:ae.map(o=>({value:o.value,label:l(o.label),picture:r("span",{className:"sf-gallery-pic",children:br(o.weights).map((i,a)=>r("i",{style:{gridColumn:`span ${i}`}},a))})}))})})}}}function br(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function Ll(){return P(io,r(Ee,{}),Ue,Ue[0].value)}function Nl(){return K(lo,r(Yt,{}),$e,ao,1,$e)}function Al(e){const t=ue(no,Go("`Direction` names how a container's children run — a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; editor-shell's own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),oo(e),We(e,void 0));return{type:"custom",render:n=>t.render({...n,value:We(e,n.value),onChange:o=>n.onChange(o)})}}function vl(e,t,n,o,i,a){return{type:"custom",render:({value:c,onChange:s})=>r(h,{label:l(e),icon:r(Le,{noun:a}),action:r(S,{words:x()?.panel,label:l(e),changed:!Ao(c),detail:l("the Text style in Site styles"),onReset:()=>s(No),defaultAction:{onPress:()=>s(Lo),title:l("Keep this section's own built-in size"),icon:r(At,{})}}),children:M({min:t,max:n,step:o,value:typeof c=="number"?c:i,suffix:"px",ariaLabel:e,onChange:s})})}}function Fl(){return{_gCellWidth:y("Cell width"),gridSpan:P("Positions",r(Ie,{}),[{label:"Auto",value:""},...Array.from({length:yt},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function N(){let e=null;try{e=W(t=>t).selectedItem}catch{e=null}return e?.props??{}}function xr({min:e,max:t,step:n,px:o,label:i,onChange:a,desktopKey:c,fallback:s}){const d=N()[c],u=ie(void 0,d,s);return r(T,{children:M({min:e,max:t,step:n,value:ie(o,d,s),readout:!1,ariaLabel:i,notch:u,onChange:a})})}function Sr({label:e,desktopKey:t,fallback:n,changed:o=!1,onReset:i=()=>{}}){const a=N()[t],c=ie(void 0,a,n);return r(S,{words:x()?.panel,label:l(e),changed:o,detail:l("{value} on desktop",{value:`${c}px`}),onReset:i})}function yr(e){return nt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:r(Sr,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>r(xr,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}function Dl(e){return{type:"custom",render:({value:t,onChange:n})=>r(_r,{...e,value:t,onChange:n})}}function Cr({label:e,icon:t,options:n,value:o,resolved:i,restWord:a,onChange:c}){const s=n.some(d=>d.value===o);return r(h,{label:l(e),icon:w(t),action:r(S,{words:x()?.panel,label:l(e),changed:s,detail:l("{value} on desktop",{value:l(a)}),onReset:()=>c(void 0)}),children:ee({options:n,value:s?o:i,onChange:d=>c(d),ariaLabel:e})})}function _r({label:e,icon:t,options:n,desktopKey:o,resolve:i,value:a,onChange:c}){const s=N()[o],d=i(void 0,s),u=n.find(f=>f.value===d)?.label??"";return r(Cr,{label:e,icon:t,options:n,value:a,resolved:d,restWord:u,onChange:c})}const Ir={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Er={Top:Pe,Bottom:Re,Left:Oe,Right:we},Tr=e=>{const t=Er[e];return r(t,{})};function Bl(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,i=_=>Ir[_],a=_=>K(i("Top"),r(Pe,{}),E.min,E.max,E.step,_,"px"),c=(_,j,O,te=E)=>g("mobile",yr({label:i(_),icon:Tr(_),desktopKey:j,min:te.min,max:te.max,step:te.step,fallback:O})),s=e.top??E.min,d=e.bottom??E.min,u="sectionPaddingLeft",f="sectionPaddingRight",p=e.sideBounds??E,m=e.side??p.min,b=e.sidePhone??m,C=e.phone===!0,R=_=>C?g("desktop",_):_;return B({...o?{_gSpacing:y("Padding")}:{},[t]:R(a(s)),...C?{[F(t)]:c("Top",t,s)}:{},...e.only==="top"?{}:{[n]:R(K(i("Bottom"),r(Re,{}),E.min,E.max,E.step,d,"px")),...C?{[F(n)]:c("Bottom",n,d)}:{}},...e.sides?{[u]:R(K(i("Left"),r(Oe,{}),p.min,p.max,p.step,m,"px")),...C?{[F(u)]:c("Left",u,b,p)}:{},[f]:R(K(i("Right"),r(we,{}),p.min,p.max,p.step,m,"px")),...C?{[F(f)]:c("Right",f,b,p)}:{}}:{}})}const $=["top","right","bottom","left"],Rr={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},ct=e=>typeof e=="number"?e:null;function Or(e,t,n){const o={};for(const i of $)n[i]!==t[i]&&(o[e[i]]=n[i]??void 0);return o}function wr({tier:e,o:t}){let n=null;try{n=fe()}catch{n=null}const o=n?.values??{},i=e==="mobile"?t.phoneKeys:t.keys,a=Object.fromEntries($.map(u=>[u,ct(o[i[u]])])),c=Object.fromEntries($.map(u=>[u,String(e==="mobile"?ct(o[t.keys[u]])??t.fallback[u]:t.fallback[u])])),[s,d]=z(()=>mn(a,c));return r(h,{label:l("Padding"),icon:r(Vt,{}),action:r(Fe,{each:s,label:l("Each side"),onChange:d}),children:r(hn,{label:l("Padding"),each:s,value:a,placeholder:c,min:t.min,max:t.max,step:t.step,onChange:u=>{const f=Or(i,a,u);Object.keys(f).length&&n?.onChangeMany(f)},words:{sides:{top:l("Padding top"),right:l("Padding right"),bottom:l("Padding bottom"),left:l("Padding left")},vertical:l("Top and bottom"),horizontal:l("Left and right"),unit:"px"}})})}function Hl(e={}){const t={...Rr,...e.keys},n={keys:t,phoneKeys:Object.fromEntries($.map(s=>[s,F(t[s])])),fallback:{top:0,right:0,bottom:0,left:0,...e.fallback},min:e.min??0,max:e.max??200,step:e.step??4},o=e.phone!==!1,i=s=>{const d={type:"custom",render:()=>r(wr,{tier:s,o:n})};return o?g(s,d):d},a=()=>q({type:"custom",render:()=>r(re,{})},"always"),c=$.filter(s=>s!=="top");return B({...e.group===!1?{}:{_gSpacing:y("Padding")},[n.keys.top]:i("desktop"),...o?{[n.phoneKeys.top]:i("mobile")}:{},...Object.fromEntries(c.map(s=>[n.keys[s],{...a(),reachedBy:n.keys.top}])),...o?Object.fromEntries(c.map(s=>[n.phoneKeys[s],g("mobile",a())])):{}})}const Pr={contained:"Contained",page:"Page",full:"Full"},Q="Width";function Gl(e,t=vo,n=!0){const o=t.map(i=>({label:Fo[i]??Pr[i],value:i}));return B({...n?{_gWidth:y(Q)}:{},widthMode:{type:"custom",render:({onChange:i,field:a})=>r(h,{label:l(Q),icon:r(nn,{}),action:n?r(Xo,{inherited:a?.inherited??!1,onReset:()=>i(Do),label:Q}):void 0,children:ee({options:o,value:a?.currentValue||e,onChange:i,ariaLabel:Q})})}})}function Ml(){const e=o=>({type:"custom",render:({value:i,onChange:a})=>r(h,{label:X,icon:w(r($t,{})),action:o?o(a):void 0,children:ee({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(i)?i:"auto",onChange:a,ariaLabel:X})})}),t=()=>({type:"custom",render:({value:o,onChange:i,field:a})=>{const c=a?.unit==="%"?"%":"px",s=c==="%"?to:eo;return r("div",{className:"sf-field",children:M({min:s.min,max:s.max,step:s.step,value:typeof o=="number"?o:s.fallback,suffix:c,ariaLabel:X,onChange:i})})}}),n=()=>ue("Unit",r(Te,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return B({_gHeight:y(X),sectionHeightMode:g("desktop",e()),sectionHeightValue:g("desktop",t()),sectionHeightUnit:g("desktop",n()),sectionHeightModePhone:g("mobile",e(o=>r(kr,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:g("mobile",t()),sectionHeightUnitPhone:g("mobile",n())})}function kr({onClear:e}){const t=N(),n=qn(t),o=Jn(t),i=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return r(S,{words:x()?.panel,label:l(X),changed:n,detail:i,onReset:e})}function Kl(){const e=n=>({type:"custom",render:({value:o,onChange:i,id:a,name:c})=>r(Lr,{value:o,onChange:i,labelId:`${a??c??"stickTop"}-label`,phone:n})}),t=()=>({type:"custom",render:({value:n,onChange:o})=>r("div",{className:"sf-field",children:M({min:J.min,max:J.max,step:J.step,value:typeof n=="number"?n:J.fallback,suffix:"px",ariaLabel:l("Distance from top"),onChange:o})})});return{_gStick:y(le),stickTop:g("desktop",e(!1)),stickTopDistance:g("desktop",t()),stickTopPhone:g("mobile",e(!0)),stickTopDistancePhone:g("mobile",t())}}function Lr({value:e,onChange:t,labelId:n,phone:o}){const i=N(),a=Qn(i),c=o?a.phone:e===!0;return r(h,{label:l(le),labelId:n,icon:w(r(Zt,{})),action:k(T,{children:[o?r(S,{words:x()?.panel,label:l(le),changed:Zn(i),detail:l("{value} on desktop",{value:a.desktop?`${a.desktopDistance}px`:l("Off")}),onReset:()=>t(void 0)}):null,r(De,{checked:c,onChange:t,ariaLabelledBy:n})]})})}function Wl(){return{_gAnchor:y("Anchor"),anchor:Jo("Anchor name","e.g. about",Vo)}}function Ul(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=`${a??c??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return r(h,{label:l(e),icon:t,htmlFor:s,hint:n===void 0?void 0:l(n),children:r(kn,{id:s,value:Number.isFinite(d)?new Date(d):null,onChange:u=>i(u?u.toISOString():"")})})}}}function A(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=typeof o=="boolean"?o:t,d=`${a??c??e}-label`;return r(h,{label:l(e),labelId:d,icon:n,action:r(De,{checked:s,onChange:i,ariaLabelledBy:d})})}}}function Xl(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const i=`${String(n??o??"pageBackground")}-colour`;return r(h,{label:l("Background"),icon:r(ke,{}),htmlFor:i,action:r(Ge,{id:i,label:"Background",value:rn(e),onChange:t})})}}}function $l(e,t){return{type:"custom",render:({value:n,onChange:o,id:i})=>{const a=typeof n=="boolean"?n:t,c=`${i??e}-checkbox`;return r(h,{label:l(e),htmlFor:c,className:"sf-checkbox",action:r(wn,{id:c,checked:a,onChange:o})})}}}const jl={follows:"fill"},zl={follows:"ink"};function Vl(e,t,n){if(typeof t!="string"){const o=t.follows;return{type:"custom",render:({value:i,onChange:a})=>r(Nr,{label:e,part:o,icon:n,value:i,onChange:a})}}return{type:"custom",render:({value:o,onChange:i})=>r(h,{label:l(e),icon:n,action:Ge({value:o||t,onChange:i,label:e})})}}function Nr({label:e,part:t,icon:n,value:o,onChange:i}){const a=fo(D().theme),c=t==="fill"?a.fill:a.ink;return r(An,{label:l(e),icon:n,value:o||"",inherited:c,resetTo:L(c.toUpperCase(),l("Site styles")),onChange:i,onReset:()=>i("")})}const Ar=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function dt({label:e,value:t,onChange:n,points:o=Ar}){const i=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return r(On,{label:l(e),value:t,points:i,onChange:n})}function Yl(){return q({type:"custom",render:()=>r(re,{})},"always")}const vr=Ce([]);function ql(e,{stacking:t,fallback:n=Et}){return{type:"custom",render:({value:o,onChange:i})=>{const a=It.includes(o)?o:n;return t?r(Fr,{label:e,value:a,onChange:i}):ut({label:e,value:a,onChange:i,points:vr})}}}function Fr({label:e,value:t,onChange:n}){const{appState:o,selectedItem:i}=W(s=>s),a=i?.props?.id?String(i.props.id):void 0,c=a?_t(o?.data,a):[];return ut({label:e,value:t,onChange:n,points:Ce(c,a)})}function ut({label:e,value:t,onChange:n,points:o}){const i=o.find(a=>a.disabled);return r(h,{label:l(e),icon:r(qt,{}),hint:i?.title?l(i.title):void 0,children:dt({label:e,value:Tt(t),onChange:n,points:o})})}const Jl={top:r(Mt,{}),right:r(Gt,{}),bottom:r(Bt,{}),left:r(Ht,{})};function Zl(e,t,n,o,i,a){const c=f=>t.find(p=>p.value===f),s=f=>({value:f,label:"",disabled:!0,title:o}),d=f=>{const p=t.find(b=>b.cell===f);if(!p)return s(`missing-${f}`);const m=a?.[f];return m?{value:p.value,label:p.label,icon:m}:{value:p.value,label:p.label}},u=[s("corner-top-left"),d("top"),s("corner-top-right"),d("left"),s("centre"),d("right"),s("corner-bottom-left"),d("bottom"),s("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:p})=>{const m=t.some(b=>b.value===f)?f:n;return r(h,{label:l(e),icon:i,value:c(m)?.label?l(c(m).label):"",children:dt({label:e,value:m,onChange:p,points:u})})}}}const Dr="\0note";function P(e,t,n,o,i){return{type:"custom",options:n,fallback:o,...i?{note:i}:{},render:({value:a,onChange:c,field:s})=>{const d=s.options??n,u=s.fallback??o,f=d.some(p=>p.value===a)?a:u;return r(h,{label:l(e),icon:w(t),children:r(xn,{value:f,ariaLabel:l(e),onChange:c,options:[...i?[{label:l(i),value:Dr,disabled:!0}]:[],...d.map(p=>({label:l(p.label),value:p.value}))]})})}}}function Ql(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:i,field:a})=>r(jn,{label:e,options:(a.options??t).map(c=>({...c,label:l(c.label)})),value:Array.isArray(o)?o:[],onChange:i,...n?{emptyLabel:l(n)}:{}})}}function ea(e,t,n,o){return{type:"custom",options:t,fallback:n,render:({value:i,onChange:a,field:c})=>r(Vn,{label:e,options:(c.options??t).map(s=>({...s,label:l(s.label)})),fallback:c.fallback??n,value:i,onChange:a,placeholder:o===void 0?void 0:l(o)})}}function ta(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const i={value:n,onChange:o,...t};return r(e,{...i})}}}function ee({options:e,value:t,onChange:n,ariaLabel:o,disabled:i=!1}){return r(fn,{options:e.map(a=>a.picture?{id:a.value,label:a.picture,title:l(a.title??a.label)}:{id:a.value,label:l(a.label),title:a.title===void 0?void 0:l(a.title)}),value:t,onChange:n,ariaLabel:l(o),disabled:i})}const na=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function ue(e,t,n,o){const i=n.map(a=>typeof a=="string"?{label:a,value:a}:a);return{type:"custom",render:({value:a,onChange:c,field:s})=>r(h,{label:l(e),icon:w(t),children:ee({options:i,value:i.some(d=>d.value===a)?a:a||s?.currentValue||o,onChange:c,ariaLabel:e})})}}function oa(e,t,n,o={}){return{type:"custom",[be]:!0,render:({value:i,onChange:a})=>r($n,{value:i||"",onChange:a,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen})}}const ra={HeroSingle:["imageFocal"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function ia({value:e,onChange:t,label:n}){const o=e||{},i=!!o.pending,a=i?"var(--fg-dim, #888)":o.ok?"#1d9e75":"#d85a30",c=(s,d)=>t({...o,[s]:d===""?void 0:Number(d)});return k(h,{label:l(n),icon:r(oe,{}),children:[r("button",{type:"button",disabled:i,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"8px 10px",fontSize:13,cursor:i?"default":"pointer",opacity:i?.6:1,border:"1px solid var(--border-strong, #ccc)",borderRadius:6,background:"transparent",color:"inherit"},children:i?l("Finding…"):l("Find coordinates")}),o.status&&r("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:a},children:l(o.status)}),r("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:l("Coordinates from OpenStreetMap")}),r("button",{type:"button",onClick:()=>t({...o,manual:!o.manual}),style:{marginTop:8,padding:0,border:"none",background:"none",font:"inherit",fontSize:12,color:"var(--sf-accent, #2563eb)",cursor:"pointer",textDecoration:"underline"},children:o.manual?l("Hide manual coordinates"):l("Enter coordinates manually")}),o.manual&&k("div",{style:{marginTop:8,display:"grid",gap:8},children:[r(h,{label:l("Latitude"),icon:r(oe,{}),children:r("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"34.0990198"}),value:typeof o.lat=="number"?o.lat:"",onChange:s=>c("lat",s.target.value)})}),r(h,{label:l("Longitude"),icon:r(oe,{}),children:r("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"-117.9842833"}),value:typeof o.lng=="number"?o.lng:"",onChange:s=>c("lng",s.target.value)})})]})]})}function Br(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Hr(e,t,n){const o=e.map(i=>({text:i?.text??""}));return t===null||t<0||t>=e.length?o:o.map((i,a)=>a===t?{text:n}:i)}function la(e,t){return e===null?null:t>e?e:null}function Gr(e,t,n){if(n===null||n>=t.length)return null;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return null;return e[n]!==t[n]&&t.includes(e[n])||e[n]!==t[n]&&t.length!==e.length?null:n}const aa={label:"Ticker items",icon:r(zt,{})};function sa(e,t,n,o){return{type:"custom",[I]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},render:({value:i,onChange:a})=>r(Mr,{label:e,icon:w(t),items:Array.isArray(i)?i:[],placeholder:n,onChange:a,markup:o==="markup"})}}function Mr({label:e,icon:t,items:n,placeholder:o,onChange:i,markup:a=!1}){const c=ne(null),[s,d]=z(null),u=p=>p.map(m=>({text:m?.text??""})),f=p=>{const m=Gr(n,p,s);m===null&&(c.current=null),d(m),i(u(p))};return r(Sn,{label:l(e),icon:t,noun:l("item"),items:n,onChange:f,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?r(Me,{target:c,value:Br(n,s),onChange:p=>i(Hr(n,s??-1,p)),disabled:s===null,label:s===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:s+1})}):void 0,renderRow:(p,m,b)=>r("input",{type:"text",className:a&&s===m?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:m+1}),onChange:C=>b({text:C.target.value}),onFocus:C=>{c.current=C.currentTarget,d(m)}})})}function ca(e,t){const n=`${e.label} — row ${t+1}`;return G({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function da(e){return{_gCards:y("Cards"),coverIndex:P("Cover image",r(jt,{}),Wn,String(Un),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:or("Image background",So),cardImage:Wr(),spinOnHover:A("Rotate on hover",e?.spinDefault??!0,r(Qt,{}))}}function ua(){return{outline:P("Card outline",r(en,{}),Gn,Kn),indexBadge:P("Card number",r(Te,{}),Hn,Mn),showBadge:A("Product badge",!0,r(Le,{noun:"tag"}))}}function pa(e){const t=e&&"bottomDefault"in e?e.bottomDefault:!0,n=e&&"defaults"in e?e.defaults:{showCardSizes:t,showCardBuy:t,showCardPage:t};return{_gShowOnCard:y("Show on a card"),showCardPrice:A("Price",!0,r(Kt,{})),showCardFinishes:A("Finish swatches",!0,r(Wt,{})),showCardSizes:A("Sizes",n.showCardSizes,r(Jt,{})),showCardBuy:A("Buy button",n.showCardBuy,r(vt,{})),showCardPage:A("Page button",n.showCardPage,r(ke,{}))}}function fa(e,t="display"){const n=F(t);return{[t]:g("desktop",{type:"custom",render:({value:o,onChange:i})=>r(pt,{parts:e,changed:Cn(o),shown:a=>_n(o,a),onPress:(a,c)=>i(Tn(o,a,c)),onReset:()=>i(void 0)})}),[n]:g("mobile",{type:"custom",render:({value:o,onChange:i})=>r(Kr,{parts:e,desktopKey:t,value:o,onChange:i})})}}function pt({parts:e,changed:t,shown:n,onPress:o,onReset:i,detail:a}){const c=l("Display");return r(h,{label:c,icon:r(Pt,{}),changed:t,action:r(S,{words:x()?.panel,label:c,changed:t,detail:a,onReset:i}),children:r(yn,{label:c,items:e.map(s=>({id:s.id,label:l(s.label),shown:n(s.id)})),onChange:o})})}function Kr({parts:e,desktopKey:t,value:n,onChange:o}){const i=N()[t];return r(pt,{parts:e,changed:En(n),shown:a=>In(i,n,a),onPress:(a,c)=>o(Rn(n,a,c)),onReset:()=>o(Dn),detail:l("the same as Desktop")})}function Wr(){return nt("Card image",{min:v,max:Se,step:bt,hint:"Rounds the picture. The card's own corner is in Site styles."})}function ha(){return ce({sidesKey:"cornerSides",step:xt,useFollowed:()=>v,mark:r(Ur,{label:St}),hint:l("Rounds the picture. Left alone it stays square.")})}function Ur({label:e,changed:t=!1,onReset:n=()=>{}}){return r(S,{words:x()?.panel,label:l(e),changed:t,onReset:n})}function ma(){return{type:"custom",render:({value:e,onChange:t})=>r(Xr,{value:typeof e=="string"?e:"",onChange:t})}}function Xr({value:e,onChange:t}){const[n,o]=z(null),i=ye.filter(c=>n===null||U[c].across===n),a=e&&e in U?U[e]:null;return k(T,{children:[r(h,{label:l("Photos in a row"),icon:r(Ft,{}),children:k("div",{className:"sf-gallery-filter",children:[r("button",{type:"button","aria-pressed":n===null,onClick:()=>o(null),children:l("All")}),Ct.map(c=>r("button",{type:"button","aria-pressed":n===c,onClick:()=>o(c),children:c},c))]})}),r(h,{label:l("Layout"),icon:r(Ut,{}),value:a?l(a.label):l("Not chosen"),hint:l("{n} of {total} layouts",{n:i.length,total:ye.length}),children:r(Be,{className:"sf-gallery-layouts",label:l("Layout"),value:e,onChange:t,onClear:()=>t(""),options:i.map(c=>({value:c,label:l(U[c].label),picture:r("span",{className:"sf-gallery-pic",children:U[c].desktop.map(([s,d],u)=>r("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${d}`}},u))})}))})})]})}export{Vo as ANCHOR_HINT,jo as BOUND_TO_POST,ol as BOUND_TO_POST_NOTE,dl as BUCKET_ICONS,ra as CUSTOM_FIELD_MEDIA,ia as CoordsField,Jl as EDGE_ARROWS,Ln as FOCAL_DEFAULT,Ar as FOCAL_POINTS,V as FOLD_FIELD_MARKER,jl as FOLLOWS_SITE_BUTTON,zl as FOLLOWS_SITE_BUTTON_INK,dt as FocalPicker,nr as GroupLabel,zo as HIGHLIGHT_HINT,H as HidableTextField,ge as LINK_FIELD_MARKER,Yi as Label,be as MEDIA_FIELD_MARKER,na as MEDIA_TYPE_OPTIONS,rl as NOT_BOUND_TO_POST,er as PanelNoteLine,_r as PhoneChoiceRow,Cr as PhoneChoiceStrip,ut as PlacementGridView,xe as SCAFFOLD_FIELD_MARKER,Sa as SCALAR_TEXT_CONTROLS,it as SECTION_BLEEDS_HINT,Rr as SIDE_PAD_KEYS,Zo as SectionHeading,ee as Segmented,Uo as SiteGapDefaultReset,M as Slider,tt as Swatches,xa as TEXT_CONTROL_KINDS,I as TEXT_FIELD_MARKER,aa as TICKER_ITEMS_ROW,Mr as TextListField,Xo as WidthDefaultReset,Gr as aimAfterListChange,Wl as anchorFields,L as backTo,yl as backgroundField,wl as boxAlignField,Ll as boxBlockSpacingField,Ol as boxJustifyField,Nl as boxPhoneRowField,kl as boxShareField,Pl as boxWrapField,ml as bucketHeader,mr as cardCornersField,or as cardImageBackgroundField,Wr as cardImageField,da as cardMediaFields,Rl as cardShapeFields,pa as cardShowFields,ua as cardStyleFields,Fl as cellWidthFields,$l as checkbox,Vl as colorInput,al as copyText,rt as cornerSidesField,ce as cornersRowField,Ul as dateTime,bl as designGroupHeader,Al as directionField,fa as displayFields,Zl as edgePad,ul as entriesHiddenForTab,la as focusAfterRemove,Yl as focusKeptField,xl as foldMarker,Y as foldMetaOf,tr as foldTitleOf,ma as galleryLayoutField,_l as gapField,y as group,Ml as heightFields,me as hidableText,qo as hintIsWhileTyping,w as iconOf,ha as imageCornersField,nl as inOwnBox,hl as isBucketHeader,gl as isDesignGroupHeader,Mo as isNoGlyph,sl as linkField,Ql as multiSelect,Go as noGlyph,Xl as pageBackgroundField,pl as panelNote,Dl as phoneChoiceField,yr as phoneOverrideField,ql as placementField,Jo as plainText,cl as plainTextarea,nt as pxField,Sl as quietMarker,he as readHidable,Br as rowText,ea as searchSelect,fl as section,El as sectionAnimationFields,at as sectionBorderField,ar as sectionCornersField,Il as sectionShapeFields,Cl as sectionThemeFields,ue as segmented,P as select,Hr as setRowText,Hl as sidesPaddingFields,Or as sidesPaddingPatch,vl as sizeField,K as slider,ta as sourceField,Bl as spacingFields,Kl as stickFields,Tl as templateField,il as text,ht as textFieldIdentifier,Zi as textFieldOffPage,el as textFieldPanelOnly,sa as textList,ca as textListRowField,ll as textarea,A as toggle,oa as upload,Ko as usePageWidthDetail,Wo as useSiteGapDetail,Gl as widthField,tl as withIdentifier,Ji as withOffPage,Qi as withPanelOnly,qi as withScaffold};
@@ -0,0 +1,2 @@
1
+ export type BlockAlign = "left" | "center" | "right";
2
+ export declare const BLOCK_ALIGN_JUSTIFY: Record<BlockAlign, string>;
@@ -0,0 +1 @@
1
+ const t={left:"justify-start",center:"justify-center",right:"justify-end"};export{t as BLOCK_ALIGN_JUSTIFY};
@@ -17,6 +17,9 @@ export declare const BOX_ALIGN_POINTS: readonly [{
17
17
  }, {
18
18
  readonly label: "Center";
19
19
  readonly value: "center";
20
+ }, {
21
+ readonly label: "End";
22
+ readonly value: "end";
20
23
  }, {
21
24
  readonly label: "Stretch";
22
25
  readonly value: "stretch";
@@ -1 +1 @@
1
- const p=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"Space between",value:"between"},{label:"End",value:"end"}],x=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"Stretch",value:"stretch"}],g="Wrap",_=[{label:"Wrap",value:"wrap"},{label:"No wrap",value:"nowrap"}],l={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},n={start:"items-start",center:"items-center",stretch:"items-stretch"};function b(e,t){const r=typeof e=="string"&&e in l?l[e]:"",o=typeof t=="string"&&t in n?n[t]:"";return[r,o].filter(Boolean).join(" ")}function u(e){return e===!0||e==="wrap"?"flex-wrap":""}const S="Block widths",f=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Big left",value:"bigLeft",weights:[2,1]},{label:"Big right",value:"bigRight",weights:[1,2]},{label:"Bigger left",value:"biggerLeft",weights:[3,1]},{label:"Bigger right",value:"biggerRight",weights:[1,3]}],a="[&>*]:min-w-0 [&>*]:flex-1 [&>*]:basis-0",s={equal:a,bigLeft:`${a} [&>*:first-child]:min-[800px]:grow-[2]`,bigRight:`${a} [&>*:last-child]:min-[800px]:grow-[2]`,biggerLeft:`${a} [&>*:first-child]:min-[800px]:grow-[3]`,biggerRight:`${a} [&>*:last-child]:min-[800px]:grow-[3]`};function O(e){return typeof e=="string"?s[e]??"":""}const B="Columns on phone",h=1,w=3,i={2:"max-[800px]:flex-wrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]",3:"max-[800px]:flex-wrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]"};function L(e){const t=Number(e);return i[t]??"max-[800px]:flex-col"}const A="Block spacing",m=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],c="sf-box-gap-only";function v(e){return e==="gap"?c:""}export{x as BOX_ALIGN_POINTS,A as BOX_BLOCK_SPACING_LABEL,m as BOX_BLOCK_SPACING_POINTS,c as BOX_GAP_ONLY_CLASS,p as BOX_JUSTIFY_POINTS,B as BOX_PHONE_ROW_LABEL,w as BOX_PHONE_ROW_MAX,h as BOX_PHONE_ROW_MIN,S as BOX_SHARE_LABEL,f as BOX_SHARE_POINTS,g as BOX_WRAP_LABEL,_ as BOX_WRAP_POINTS,v as boxBlockSpacingClass,b as boxLayoutClasses,L as boxPhoneRowClasses,O as boxShareClasses,u as boxWrapClass};
1
+ const p=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"Space between",value:"between"},{label:"End",value:"end"}],x=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"End",value:"end"},{label:"Stretch",value:"stretch"}],g="Wrap",_=[{label:"Wrap",value:"wrap"},{label:"No wrap",value:"nowrap"}],l={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},n={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function b(e,t){const r=typeof e=="string"&&e in l?l[e]:"",o=typeof t=="string"&&t in n?n[t]:"";return[r,o].filter(Boolean).join(" ")}function u(e){return e===!0||e==="wrap"?"flex-wrap":""}const S="Block widths",f=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Big left",value:"bigLeft",weights:[2,1]},{label:"Big right",value:"bigRight",weights:[1,2]},{label:"Bigger left",value:"biggerLeft",weights:[3,1]},{label:"Bigger right",value:"biggerRight",weights:[1,3]}],a="[&>*]:min-w-0 [&>*]:flex-1 [&>*]:basis-0",s={equal:a,bigLeft:`${a} [&>*:first-child]:min-[800px]:grow-[2]`,bigRight:`${a} [&>*:last-child]:min-[800px]:grow-[2]`,biggerLeft:`${a} [&>*:first-child]:min-[800px]:grow-[3]`,biggerRight:`${a} [&>*:last-child]:min-[800px]:grow-[3]`};function O(e){return typeof e=="string"?s[e]??"":""}const B="Columns on phone",h=1,w=3,i={2:"max-[800px]:flex-wrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]",3:"max-[800px]:flex-wrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]"};function L(e){const t=Number(e);return i[t]??"max-[800px]:flex-col"}const A="Block spacing",m=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],c="sf-box-gap-only";function v(e){return e==="gap"?c:""}export{x as BOX_ALIGN_POINTS,A as BOX_BLOCK_SPACING_LABEL,m as BOX_BLOCK_SPACING_POINTS,c as BOX_GAP_ONLY_CLASS,p as BOX_JUSTIFY_POINTS,B as BOX_PHONE_ROW_LABEL,w as BOX_PHONE_ROW_MAX,h as BOX_PHONE_ROW_MIN,S as BOX_SHARE_LABEL,f as BOX_SHARE_POINTS,g as BOX_WRAP_LABEL,_ as BOX_WRAP_POINTS,v as boxBlockSpacingClass,b as boxLayoutClasses,L as boxPhoneRowClasses,O as boxShareClasses,u as boxWrapClass};