efficient-web-builder 51.0.0 → 52.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/editor/components/PartTextBox.js +1 -1
  3. package/dist/editor/components/PreviewPartStyleContext.d.ts +2 -2
  4. package/dist/editor/components/SiteTextStylesField.d.ts +2 -1
  5. package/dist/editor/components/SiteTextStylesField.js +1 -1
  6. package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
  7. package/dist/editor/components/storefront-editor.css +12 -44
  8. package/dist/editor/lib/document/ColourControl.d.ts +11 -8
  9. package/dist/editor/lib/document/ColourControl.js +1 -1
  10. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  11. package/dist/editor/lib/document/blocks/general/Series/fields.js +1 -1
  12. package/dist/editor/lib/document/blocks/general/StatsParagraph/fields.js +1 -1
  13. package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
  14. package/dist/editor/lib/document/controls.d.ts +14 -4
  15. package/dist/editor/lib/document/controls.js +1 -1
  16. package/dist/editor/lib/document/overrides.js +1 -1
  17. package/dist/editor/lib/document/passes/inspector.js +1 -1
  18. package/dist/format/lib/content/borders.d.ts +4 -2
  19. package/dist/format/lib/content/borders.js +1 -1
  20. package/dist/format/lib/content/button-icon.d.ts +1 -1
  21. package/dist/format/lib/content/button-icon.js +1 -1
  22. package/dist/format/lib/content/card-state.d.ts +8 -0
  23. package/dist/format/lib/content/card-state.js +1 -0
  24. package/dist/format/lib/content/section-background.d.ts +10 -3
  25. package/dist/format/lib/content/section-background.js +1 -1
  26. package/dist/format/lib/content/section-min-height.d.ts +17 -1
  27. package/dist/format/lib/content/section-min-height.js +1 -1
  28. package/dist/format/lib/content/section-sticky.d.ts +9 -0
  29. package/dist/format/lib/content/section-sticky.js +1 -1
  30. package/dist/format/lib/document/card-template-layers.d.ts +1 -1
  31. package/dist/format/lib/document/card-template-layers.js +1 -1
  32. package/dist/format/lib/document/part-inks.d.ts +5 -10
  33. package/dist/format/lib/document/part-inks.js +1 -1
  34. package/dist/format/lib/document/passes/types.d.ts +1 -0
  35. package/dist/format/lib/document/show-when-attach.d.ts +2 -1
  36. package/dist/format/lib/document/show-when-attach.js +1 -1
  37. package/dist/format/lib/editor-words-catalogue.d.ts +0 -3
  38. package/dist/format/lib/editor-words-catalogue.js +2 -2
  39. package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
  40. package/dist/format/lib/source-rules/panel-rows-use-the-shared-row.d.ts +4 -0
  41. package/dist/format/lib/source-rules/panel-rows-use-the-shared-row.js +37 -20
  42. package/dist/format/lib/source-rules/support/part-slider-call-sites.d.ts +0 -1
  43. package/dist/format/lib/source-rules/support/part-slider-call-sites.js +6 -6
  44. package/dist/format/lib/text-styles/site-text-colours.d.ts +11 -0
  45. package/dist/format/lib/text-styles/site-text-colours.js +1 -0
  46. package/dist/format/lib/theme.d.ts +1 -0
  47. package/dist/format/lib/theme.js +3 -3
  48. package/dist/format/lib/word-styles.d.ts +0 -1
  49. package/dist/format/lib/word-styles.js +1 -1
  50. package/dist/render/components/ButtonBlock.d.ts +1 -0
  51. package/dist/render/components/ButtonBlock.js +1 -1
  52. package/dist/render/components/CardRowContext.d.ts +5 -2
  53. package/dist/render/components/CardRowContext.js +1 -1
  54. package/dist/render/components/Flex.d.ts +2 -1
  55. package/dist/render/components/Flex.js +1 -1
  56. package/dist/render/components/goldPhrases.js +2 -2
  57. package/dist/render/lib/content/block-size.d.ts +1 -0
  58. package/dist/render/lib/content/block-size.js +1 -1
  59. package/dist/render/lib/content/box-shared-columns.js +1 -1
  60. package/dist/render/lib/document/blocks/general/Cards/render.js +1 -1
  61. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  62. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +2 -0
  63. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  64. package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -1
  65. package/dist/render/lib/document/blocks/general/section-to-box-rows-stats.js +1 -1
  66. package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.js +2 -2
  67. package/dist/render/lib/document/part-styles.js +2 -2
  68. package/dist/render/lib/document/passes/block-size.js +1 -1
  69. package/dist/render/lib/document/passes/borders.js +1 -1
  70. package/dist/render/lib/document/passes/section-height.js +1 -1
  71. package/dist/render/lib/document/passes/section-sticky.js +1 -1
  72. package/dist/render/lib/document/show-when.d.ts +1 -1
  73. package/dist/render/lib/document/show-when.js +1 -1
  74. package/dist/render/lib/text-styles/site-text-styles.js +2 -2
  75. package/package.json +1 -1
  76. package/dist/editor/components/PartInkControl.d.ts +0 -7
  77. package/dist/editor/components/PartInkControl.js +0 -1
@@ -1 +1 @@
1
- "use client";import{jsx as i,jsxs as N,Fragment as T}from"react/jsx-runtime";import{cloneElement as _e,createContext as It,useContext as Rt,useEffect as Et,useId as we,useRef as Y,useState as H}from"react";import{useEasel as ie,useSelectedHost as V}from"efficient-easel/easel";import{toDateKey as Ot,fromDateKey as Tt}from"efficient-shell/format";import{say as l,editorEaselWords as S}from"../../../format/lib/editor-words.js";import{mediaValueSrc as Ie}from"../../../format/lib/media-value.js";import{LOADING_SHOWS_LABELS as Re,loadingShowsOf as Pt}from"../../../format/lib/hero-video.js";import{readHidable as Ee,hidableText as Oe}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as le,LINK_FIELD_MARKER as Te,MEDIA_FIELD_MARKER as Pe,SCAFFOLD_FIELD_MARKER as Ae,TEXT_FIELD_MARKER as w,foldMetaOf as ae,textFieldIdentifier as At}from"efficient-easel/draw";import Ft from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as Fe}from"../../../render/lib/document/show-when.js";import Lt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as Nt,CORNER_RADIUS_MAX as Le,CORNER_RADIUS_MIN as k}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as kt,IMAGE_CORNERS_LABEL as vt}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as Bt}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Dt,GALLERY_LAYOUTS as q,GALLERY_LAYOUT_KEYS as Gt,galleryChoices as Ne,galleryPictureCells as Ht}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as Mt}from"./shell-glyph.js";import{anchorSiblingsOf as Kt,placementPoints as Wt}from"../../../format/lib/hero-group-placement.js";import Ut,{KEEP_HINT_CLASS as $t}from"../../components/KeepHint.js";import Xt from"../../components/AnchorField.js";import{AdjustIcon as jt,EyeIcon as zt,AnimationIcon as Yt,BackgroundIcon as Vt,BorderAllIcon as qt,BlockSectionIcon as Zt,ColumnWidthsIcon as ke,ColumnsIcon as ve,CornerIcon as Jt,DirectionDownIcon as Qt,DirectionLeftIcon as en,DirectionRightIcon as tn,DirectionUpIcon as nn,EditIcon as on,GapIcon as rn,GridIcon as ln,GroundIcon as Be,HashIcon as De,HeightIcon as an,ImageIcon as sn,ListIcon as cn,LocationIcon as Ge,PaddingBottomIcon as He,PaddingLeftIcon as Me,PaddingRightIcon as Ke,PaddingTopIcon as We,PageIcon as dn,StickyIcon as un,SearchIcon as pn,SquareIcon as fn,TypeIcon as mn,WidthIcon as hn}from"efficient-easel/icons";import{FieldGlyph as Ue}from"../../components/FieldGlyph.js";import{resolvePageBackground as gn}from"../../../format/lib/content/page-background.js";import{CORNER_SIDES as $e,CORNER_SIDE_POINTS as bn,hasOwnSectionCorners as xn,normalizeCornerSides as Xe}from"../../../format/lib/content/section-corners.js";import{enclosingPath as Sn,enclosingSection as yn}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsDrill as Cn,SettingsField as b,SettingsGroup as _n,SettingsGroupSub as wn,SettingsSegmented as In,SettingsBorder as Rn,SettingsSidesEach as En,SettingsSwitch as se,borderSides as On,borderStartEach as Tn}from"efficient-easel/panel";import{ListField as Pn}from"efficient-easel/fields";import{DisplayChips as An}from"efficient-shell/ui";import{desktopDisplayChanged as Fn,partShownOnDesktop as Ln,partShownOnPhone as Nn,phoneDisplayChanged as kn,withDesktopPart as vn,withPhonePart as Bn}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as Dn,Checkbox as Gn,ColorSwatch as Hn,CornersInput as Mn,DatePicker as Kn,DateTimePicker as Wn,FOCAL_DEFAULT as Un,PictureTiles as $n,IconPicker as Xn,IconButton as je,InputNumber as ze,Slider as jn,Tooltip as Z}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as zn}from"./geocode-resolve.js";import{ColourRow as Ye,InheritedColourRow as Yn}from"./ColourControl.js";import{keptByRow as Vn}from"efficient-easel/screen/lib/document/style-fields";import Ve from"./MarkupToolbar.js";import{deviceField as x}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as qn,NoControlMark as Zn,noControlField as qe}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as Jn}from"../../../format/lib/document/own-box.js";import{PHONE_CLEAR as Qn,resolvePhoneValue as ce}from"../../../format/lib/document/phone-override.js";import{phoneKey as v,tabletKey as Ze}from"efficient-easel/draw";import{SuppressibleText as eo}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as to,CARD_OUTLINE_OPTIONS as no,DEFAULT_CARD_INDEX_FORMAT as oo,DEFAULT_CARD_OUTLINE as ro}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as io,DEFAULT_COVER_INDEX as lo}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as ao}from"efficient-easel/draw";import so from"../../components/MediaUploadField.js";import co from"../../components/MultiSelectField.js";import uo from"../../components/SectionThemePicker.js";import po from"../../components/SearchSelectField.js";import fo from"../../components/StorefrontLinkField.js";import{UiIcon as Je}from"efficient-easel/draw/client";import{SECTION_PADDING as I}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as mo}from"../../../render/lib/content/button-look.js";import{usePreviewParts as ho}from"efficient-easel/draw/client";import{encodePartId as go}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as bo,useEaselStrings as xo}from"efficient-easel/strings";import{hasPhoneHeight as So,resolveSectionMinHeight as yo}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as J,SECTION_STICK_LABEL as de,hasPhoneStick as Co,resolveSectionStick as _o}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as wo,SECTION_MIN_HEIGHT_GROUP_LABEL as M,SECTION_SCREEN_PCT as Io}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as Ro,resolveContainerDirection as Qe}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as Eo,BOX_BLOCK_SPACING_POINTS as et,BOX_PHONE_ROW_LABEL as tt,BOX_COLUMNS_MAX as Oo,BOX_COLUMNS_MIN as nt,BOX_PHONE_ROW_MAX as To,BOX_PHONE_ROW_MIN as ue,BOX_SHARE_LABEL as Q,BOX_SHARE_PHONE_DEFAULT as Po,BOX_SHARE_PHONE_POINTS as Ao,BOX_SHARE_POINTS as Fo}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as P}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Lo}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as ot,normalizeTheme as rt}from"../../../format/lib/theme.js";import{CONTAINER_GAP as it,CONTAINER_GAP_BUILT_IN as No,CONTAINER_GAP_PHONE as pe,GAP_FIELD_CONTAINER as fe,followsSitePhoneGap as ko,hasOwnContainerGap as vo,hasOwnPhoneGap as me,resolveContainerGap as lt,resolvePhoneContainerGap as at}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as Bo,CARD_IMAGE_BG_OFF as Do,CARD_IMAGE_BG_SWATCH_NAMES as Go,CARD_IMAGE_BG_SWATCHES as Ho,isCardImageBackgroundInheriting as Mo,cardImageBackgroundChoice as Ko,THEME_CARD_IMAGE_BG as Wo}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as Uo,SECTION_BG_SWATCHES as $o,SECTION_BG_SWATCH_NAMES as Xo,THEME_SECTION_BG as jo,isSectionBackgroundInheriting as zo}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Yo,nestedAccentValue as st,resolveSectionAccent as ee}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Vo,TYPE_SIZE_INHERIT as qo,isTypeSizeInheriting as Zo}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Jo,WIDTH_CHOICE_LABEL as Qo,WIDTH_INHERIT as er}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as tr}from"./panel-heading-scope.js";import{useEaselSession as nr}from"efficient-easel/screen/lib/session-context";import{backendOf as or}from"../website-session.js";import{BOX_GAP as rr,describedAs as R,group as _,iconOf as K,sharedStyleKinds as W}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as ct,onDesktopWords as U,phoneTwinFields as he}from"efficient-easel/screen/lib/document/box-fields";import{directionField as ir,gapField as ge,Segmented as be,segmented as lr,select as $,slider as B}from"./box-fields.js";function Bl({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function D(e,t){return l("{value} from {from}",{value:e,from:t})}function ar(){const{blockGap:e}=P();return e===null?l("this container's own spacing"):D(`${e}px`,l("Styles"))}function sr({inherited:e,onReset:t,label:n}){return i(y,{words:S()?.panel,label:l(n),changed:!e,detail:ar(),onReset:t})}function cr(e){return ge({...rr,builtIn:No[e],resolve:(t,n)=>lt(e,t,n?.siteGap),action:(t,n)=>i(sr,{inherited:!vo(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[fe]:e}})}function dr(e){return Fe(x("mobile",{[fe]:e,type:"custom",render:t=>i(fr,{container:e,...t})}),dt)}function ur(e){return Fe(x("tablet",{[fe]:e,type:"custom",render:t=>i(pr,{container:e,...t})}),dt)}const dt={not:{field:"gap",in:Array.from({length:-it.min},(e,t)=>it.min+t)}};function Dl(e){return{gap:x("desktop",cr(e)),[Ze("gap")]:ur(e),[v("gap")]:dr(e)}}function pr({container:e,...t}){const[n]=L("gap"),{siteGap:o}=t.field??{},r=Math.max(pe.min,lt(e,n,o));return ge({...pe,builtIn:r,resolve:s=>me(s)?s:r,action:(s,c)=>i(y,{words:S()?.panel,label:l("Gap"),changed:me(s),detail:U(d=>l(d),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function fr({container:e,...t}){const[n]=L("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},a=at(e,void 0,n,o,r);return ge({...pe,builtIn:a,resolve:c=>at(e,c,n,o,r),action:(c,d)=>i(y,{words:S()?.panel,label:l("Gap"),changed:me(c),detail:D(`${a}px`,ko(e,n,r)?l("Styles"):l("Desktop")),onReset:()=>d(void 0)})}).render(t)}function Gl(e){return ir({offered:Ro(e),fallback:Qe(e,void 0),resolve:t=>Qe(e,t)})}function Hl(e,t){return Wt(t?Kt(e,t):[],t)}function mr({inherited:e,onReset:t,label:n}){return i(y,{words:S()?.panel,label:l(n),changed:!e,detail:D(l("Full"),l("the page")),onReset:t})}function A({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:a,hideable:s=!0,markup:c=!0}){const{text:d,hidden:f}=Ee(e),h=Y(null),p=Y(null),u=O=>t(s?{text:O,hidden:f}:O),m=()=>t({text:d,hidden:!f}),g=s&&f,E=we(),C=r?Sr(r)?i("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(r)}):i(Ut,{children:l(r)}):void 0,z=f?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return i(b,{label:l(n),icon:i(mn,{}),htmlFor:E,className:g?"is-hidden":void 0,hint:C,action:s?i(Z,{content:z,children:i(je,{"aria-pressed":f,"aria-label":z,onClick:m,children:f?i(Je,{name:"eye-off",size:14}):i(Je,{name:"eye",size:14})})}):void 0,children:N("div",{className:"sf-copybox",children:[c&&i(Ve,{target:a?p:h,value:d,onChange:u}),a?i("textarea",{id:E,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>u(O.target.value)}):i("input",{id:E,ref:h,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>u(O.target.value)})]})})}function Ml(e,t){return{...e,[Ae]:t}}function Kl(e){const t=e[w];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[w]:{...t,offPage:!0}}}function Wl(e){return!e||typeof e!="object"?!1:e[w]?.offPage===!0}const ut="sfPanelOnly";function Ul(e){if(!e[w])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[ut]:!0}}function $l(e){return!!e&&typeof e=="object"&&e[ut]===!0}function Xl(e){const t=e[w];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[w]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as os,SCALAR_TEXT_CONTROLS as rs}from"efficient-easel/draw";function jl(e,t){if(!e[w])throw new Error("inOwnBox: the field holds no authored text");const{[qn]:o,...r}=e;return{...r,[Jn]:!0,render:t}}const hr=new Set(ao),X={type:"radio",options:[{value:!0},{value:!1}]},pt={text:{type:"object",objectFields:{text:{type:"text"},hidden:X}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:X}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},F=(e,t)=>{const n=R({...t,[w]:e},{...pt[e.control],label:e.label});if(!hr.has(e.control))return n;const o=t.render;return{...qe(n,"authored-copy"),render:r=>i(eo,{name:r.name,children:o(r)})}},zl="Everything else on this block comes from the linked post. Unlink it to edit by hand.",gr={field:"source.slug",set:!0},Yl={not:gr},br="Select a word, then press the highlighter.",xr=new Set([br]),Sr=e=>xr.has(e);function Vl(e,t,n){return F({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function ql(e,t,n){return F({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function Zl(e,t,n){return F({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function Jl(e,t,n){return F({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Ql(e){return{type:"custom",[Te]:{label:e},...R({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(fo,{value:Oe(t),onChange:n,label:e})}}function ea(e,t,n){return F({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const ta={Design:jt,Animation:Yt};function na(e){return{type:"custom",render:()=>i(yr,{text:e})}}function yr({text:e}){return i("p",{className:"sf-note",children:l(e)})}function oa(e){return ae(e)!==null&&e?.tabs!==void 0}const ft=new Map;function ra(e,t){const n=`${e}\0${t?t.join(""):""}`,o=ft.get(n)??{type:"custom",tabs:t,[le]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(T,{})};return ft.set(n,o),o}const mt=new Map;function ia(e){const t=mt.get(e)??{type:"custom",[le]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(T,{})};return mt.set(e,t),t}function Cr(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function la(e,t){return Cr(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(T,{})}}function aa(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(T,{})}}function sa({title:e,children:t}){const[n,o]=H(()=>!xe.has(e));return i(_n,{title:e,open:n,onToggle:r=>{o(r),r?xe.delete(e):xe.add(e)},children:t})}const xe=new Set;function ca({label:e}){return i(wn,{title:l(e),level:tr(2)})}function ht({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),a=r?o?.[r]:void 0,s=a?l(a):t;return N("div",{className:"sf-swatches",children:[e.map(c=>{const d=o?.[c]?l(o[c]):c;return i(Z,{content:d,children:i(Hn,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":d})},c)}),i("span",{className:"sf-swatch-hex",children:s})]})}function da(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=zo(n,t);return i(b,{label:l(e),icon:i(Vt,{}),changed:!r,action:i(y,{words:S()?.panel,label:l(e),changed:!r,detail:l("the theme's section background"),onReset:()=>o(Uo)}),children:ht({swatches:$o,current:r?jo:n??t??"",onPick:o,names:Xo})})}}}function _r(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,a=Mo(r,t);return i(b,{label:l(e),icon:i(Be,{}),changed:!a,action:i(y,{words:S()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(Bo)}),children:ht({swatches:Ho,current:a?Wo:Ko(r,t),onPick:o,names:Go})})}}}function ua(e=n=>n,t){return W({_gSectionTheme:_(Yo),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(uo,{value:e(n),onChange:o,followLabel:t})}})}function j({min:e,max:t,step:n,value:o,onChange:r,suffix:a="",readout:s=!0,notch:c,ariaLabel:d,disabled:f=!1}){const h=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:h?"sf-slider has-notch":"sf-slider",style:h?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(jn,{min:e,max:t,step:n,value:o,suffix:a||void 0,showInput:s,label:d===void 0?void 0:l(d),disabled:f,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:p=>{p!==null&&p!==o&&r(p)}})})}function gt(e,t){const{min:n,max:o,step:r=1,unsetLabel:a,hint:s,restTrack:c,unsetMark:d,icon:f,unit:h="px"}=t;return{type:"custom",render:({value:p,onChange:u})=>{const m=typeof p=="number"?p:null,g=m===null;return i(b,{label:l(e),icon:f?K(f):void 0,value:g?d||a===void 0?void 0:l(a):`${m}${h}`,changed:!g,action:d?_e(d,{changed:!g,onReset:()=>u(null)}):i(y,{words:S()?.panel,label:l(e),changed:!g,onReset:()=>u(null)}),hint:typeof s=="string"?l(s):s,children:c?c({min:n,max:o,step:r,px:m,label:e,onChange:u}):j({min:n,max:o,step:r,value:m??n,readout:!1,ariaLabel:e,onChange:u})})}}}const te="Corners";function Se(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,r=o!==null;return i(b,{label:l(te),icon:i(Jt,{}),changed:r,action:_e(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:i(Ir,{tier:e,px:o,onRadius:n})})}}}function L(e){const t=V();return[t?.values?.[e],n=>t?.onChange(e,n)]}function bt(){return qe({type:"custom",render:()=>i(Zn,{})},"always")}function wr(){const e=V();return t=>e?.onChangeMany(t)}function Ir({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,a]=L(e.sidesKey),s=Xe(r)??[...$e];return i(Mn,{label:l(te),value:s,corners:bn,onChange:c=>{const d=Xe(c)??[];a(d.length===$e.length?null:d)},radius:t,onRadiusChange:n,radiusMin:k,radiusMax:Le,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function xt(){return bt()}function Rr({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=P(),r=typeof o=="number"?`${o}px`:l("not set");return i(y,{words:S()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):D(r,l("Styles")),onReset:n})}function Er(){const{cornerRadiusPx:e}=P();return typeof e=="number"?e:k}function Or(){return Se({sidesKey:"sectionCornerSides",useFollowed:Er,mark:i(Rr,{label:te}),hint:Tr})}const Tr="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function pa(){return W({_gShape:_("Shape"),sectionCorners:Or(),sectionCornerSides:xt(),sectionBorder:St("desktop"),sectionBorderPhone:St("mobile")})}const Pr=()=>({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 Ar(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Fr(){let e;try{const t=rt(P().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||ot.line}function Lr({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:a=!0,above:s={}}){const c=e&&typeof e=="object"?e:{},[d,f]=H(()=>r?Tn(c,s):!1),h=Pr(),p=u=>Ar(r&&a?u:{width:u.width,color:u.color,...a?{style:u.style}:{}});return i(b,{label:l("Border"),icon:i(qt,{}),action:r?i(En,{each:d,label:l("Each side"),onChange:f}):void 0,children:i(Rn,{label:l("Border"),value:c,each:d,onChange:u=>t(p(u)),placeholder:n,presets:o,words:h,styles:a,max:Lo})})}function Nr({value:e,onChange:t,tier:n}){const[o]=L("sectionBorder"),r=Fr(),a=n==="mobile"?o&&typeof o=="object"?o:{}:{};return i(Lr,{value:e,onChange:t,placeholder:{sides:On(a),style:a.style??"solid",color:a.color||r},presets:[r],above:a})}function St(e){return x(e,{type:"custom",render:({value:t,onChange:n})=>i(Nr,{value:t,onChange:n,tier:e})})}function fa(e){return{type:"custom",render:()=>i(kr,{partKey:e})}}function kr({partKey:e}){const[t]=L("id"),[n]=L("_partStyles"),{textStyles:o}=P(),r=xo();let a=null;try{a=ho().select}catch{a=null}const s=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(Cn,{name:l("Text"),preview:mo(s,c,{noStyle:l("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??bo.copy.panel).cases}),onOpen:()=>{a&&typeof t=="string"&&a(go(t,e))}})}function yt(e){const{cornerRadiusPx:t}=P(),n=typeof t=="number"?t:e;let o=null;try{const{appState:a,selectedItem:s}=ie(d=>d),c=s?.props?.id?String(s.props.id):void 0;o=c?yn(a?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return xn(r)?r:n}function vr({label:e,changed:t=!1,onReset:n=()=>{}}){const o=yt(k);return i(y,{words:S()?.panel,label:l(e),changed:t,detail:D(`${o}px`,l("the section")),onReset:n})}function Br(){return i(T,{children:l("Follows the section's Corners until you set a number here.")})}function Dr(){return Se({sidesKey:"cardCornerSides",useFollowed:()=>yt(k),mark:i(vr,{label:te}),hint:i(Br,{})})}function Gr(){return{type:"custom",render:()=>i(Ft,{})}}function ma(e){return{...e,render:t=>i(Lt,{render:e.render,props:t})}}function ha(){return{_gShape:_("Shape"),cardCorners:Dr(),cardCornerSides:xt(),cardCornersApplyAll:Gr()}}function Ct(e=Fo,t=e[0].value){return R({type:"custom",render:n=>{const{value:o,onChange:r}=n,a="follows"in n,s=n.follows,c=o!=null,d=c?o:a?s??t:o,f=e.find(p=>p.value===d)??e.find(p=>p.value===t)??e[0],h=e.find(p=>p.value===(s??t))??e[0];return i(b,{label:l(Q),icon:i(ke,{}),value:l(f.label),action:a?i(y,{words:S()?.panel,label:l(Q),changed:c,detail:U(p=>l(p),l(h.label),n.followsView),onReset:()=>r(void 0)}):void 0,children:i($n,{className:"sf-gallery-layouts",label:l(Q),value:f.value,onChange:r,options:e.map(p=>({value:p.value,label:l(p.label),picture:i("span",{className:"sf-gallery-pic",children:Hr(p.weights).map((u,m)=>i("i",{style:{gridColumn:`span ${u}`}},m))})}))})})}},{type:"select",label:Q,options:e.map(n=>({value:n.value,label:n.label}))})}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 ga(){return $(Eo,i(rn,{}),et,et[0].value)}function ba(){return x("mobile",Ct(Ao,Po))}function xa(){return he("share",Ct(),ct)[Ze("share")]}function Mr(){return x("mobile",B(tt,i(ve,{}),ue,To,1,ue,"",{clear:{phoneFollows:!1,hint:ue}}))}const _t={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Sa(){const e=B(tt,i(ve,{}),nt,Oo,1,nt,"",{clear:{emptyLabel:"Auto"}}),t=he("columns",e,{..._t,tablet:ct.tablet}),n=he("columns",e,_t,{phoneRow:Mr()});return{...t,phoneRow:n.phoneRow}}function ya(e,t,n,o,r,a){return{type:"custom",render:({value:s,onChange:c})=>i(b,{label:l(e),icon:i(Ue,{noun:a}),action:i(y,{words:S()?.panel,label:l(e),changed:!Zo(s),detail:l("the Text style in Styles"),onReset:()=>c(qo),defaultAction:{onPress:()=>c(Vo),title:l("Keep this section's own built-in size"),icon:i(Zt,{})}}),children:j({min:t,max:n,step:o,value:typeof s=="number"?s:r,suffix:"px",ariaLabel:e,onChange:c})})}}function Ca(){return{_gCellWidth:_("Cell width"),gridSpan:$("Positions",i(ke,{}),[{label:"Auto",value:""},...Array.from({length:Bt},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function G(){let e=null,t=null;try{e=Rt(Kr),t=ie(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Kr=It(null);function Wr({min:e,max:t,step:n,px:o,label:r,onChange:a,desktopKey:s,fallback:c}){const d=G()[s],f=ce(void 0,d,c);return i(T,{children:j({min:e,max:t,step:n,value:ce(o,d,c),readout:!1,ariaLabel:r,notch:f,onChange:a})})}function Ur({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:a=()=>{}}){const s=G()[t],c=ce(void 0,s,n);return i(y,{words:S()?.panel,label:l(e),changed:r,detail:U(d=>l(d),`${c}${o}`),onReset:a})}function $r(e){return gt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(Ur,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Wr,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Xr={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},jr={Top:We,Bottom:He,Left:Me,Right:Ke},zr=e=>{const t=jr[e];return i(t,{})};function _a(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=C=>Xr[C],a=C=>B(r("Top"),i(We,{}),I.min,I.max,I.step,C,"px"),s=(C,z,O,re=I)=>x("mobile",$r({label:r(C),icon:zr(C),desktopKey:z,min:re.min,max:re.max,step:re.step,fallback:O})),c=e.top??I.min,d=e.bottom??I.min,f="sectionPaddingLeft",h="sectionPaddingRight",p=e.sideBounds??I,u=e.side??p.min,m=e.sidePhone??u,g=e.phone===!0,E=C=>g?x("desktop",C):C;return W({...o?{_gSpacing:_("Padding")}:{},[t]:E(a(c)),...g?{[v(t)]:s("Top",t,c)}:{},...e.only==="top"?{}:{[n]:E(B(r("Bottom"),i(He,{}),I.min,I.max,I.step,d,"px")),...g?{[v(n)]:s("Bottom",n,d)}:{}},...e.sides?{[f]:E(B(r("Left"),i(Me,{}),p.min,p.max,p.step,u,"px")),...g?{[v(f)]:s("Left",f,m,p)}:{},[h]:E(B(r("Right"),i(Ke,{}),p.min,p.max,p.step,u,"px")),...g?{[v(h)]:s("Right",h,m,p)}:{}}:{}})}function wa(e,t){const n=Object.fromEntries(Object.entries(t).map(([a,s])=>[a,a in e&&ae(s)?e[a]:s])),o={};let r=!1;for(const[a,s]of Object.entries(e)){if(a in t){r||Object.assign(o,n),r=!0;continue}o[a]=s}return r||Object.assign(o,n),o}const ne="Width";function Ia(e,t=Jo,n=!0){const o=t.map(r=>({label:Qo[r],value:r}));return W({...n?{_gWidth:_(ne)}:{},widthMode:{type:"custom",render:({onChange:r,field:a})=>i(b,{label:l(ne),icon:i(hn,{}),action:n?i(mr,{inherited:a?.inherited??!1,onReset:()=>r(er),label:ne}):void 0,children:be({options:o,value:a?.currentValue||e,onChange:r,ariaLabel:ne})})}})}function Ra(){const e=o=>({type:"custom",render:({value:r,onChange:a})=>i(b,{label:M,icon:K(i(an,{})),action:o?o(a):void 0,children:be({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(r)?r:"auto",onChange:a,ariaLabel:M})})}),t=()=>({type:"custom",render:({value:o,onChange:r,field:a})=>{const s=a?.unit==="%"?"%":"px",c=s==="%"?Io:wo;return i("div",{className:"sf-field",children:j({min:c.min,max:c.max,step:c.step,value:typeof o=="number"?o:c.fallback,suffix:s,ariaLabel:M,onChange:r})})}}),n=()=>lr("Unit",i(De,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return W({_gHeight:_(M),sectionHeightMode:x("desktop",e()),sectionHeightValue:x("desktop",t()),sectionHeightUnit:x("desktop",n()),sectionHeightModePhone:x("mobile",e(o=>i(Yr,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:x("mobile",t()),sectionHeightUnitPhone:x("mobile",n())})}function Yr({onClear:e}){const t=G(),n=So(t),o=yo(t),r=U(a=>l(a),o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`);return i(y,{words:S()?.panel,label:l(M),changed:n,detail:r,onReset:e})}function Ea(){const e=n=>({type:"custom",render:({value:o,onChange:r,id:a,name:s})=>i(Vr,{value:o,onChange:r,labelId:`${a??s??"stickTop"}-label`,phone:n})}),t=()=>({type:"custom",render:({value:n,onChange:o})=>i("div",{className:"sf-field",children:j({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:_(de),stickTop:x("desktop",e(!1)),stickTopDistance:x("desktop",t()),stickTopPhone:x("mobile",e(!0)),stickTopDistancePhone:x("mobile",t())}}function Vr({value:e,onChange:t,labelId:n,phone:o}){const r=G(),a=_o(r),s=o?a.phone:e===!0;return i(b,{label:l(de),labelId:n,icon:K(i(un,{})),action:N(T,{children:[o?i(y,{words:S()?.panel,label:l(de),changed:Co(r),detail:U(c=>l(c),a.desktop?`${a.desktopDistance}px`:l("Off")),onReset:()=>t(void 0)}):null,i(se,{checked:s,onChange:t,ariaLabelledBy:n})]})})}const wt="e.g. about";function Oa(){return{_gAnchor:_("Anchor"),anchor:F({control:"plainText",label:"Name",placeholder:wt},{type:"custom",render:({value:e,onChange:t})=>i(Xt,{value:e,onChange:t,nameBox:(n,o)=>i(A,{value:n,onChange:o,label:"Name",placeholder:wt,hideable:!1,markup:!1})})})}}function Ta(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:a,name:s})=>{const c=`${a??s??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return i(b,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(Wn,{id:c,value:Number.isFinite(d)?new Date(d):null,onChange:f=>r(f?f.toISOString():"")})})}}}function Pa(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:a,name:s})=>{const c=`${a??s??e}-date`;return i(b,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(Kn,{id:c,value:Tt(typeof o=="string"?o:null),onChange:d=>r(d?Ot(d):"")})})}}}function qr(e,t,n,o){return{type:"custom",...R({},{...X,label:e}),render:({value:r,onChange:a,id:s,name:c})=>{const d=typeof r=="boolean"?r:t,f=`${s??c??e}-label`;return i(b,{label:l(e),labelId:f,icon:n,hint:o===void 0?void 0:l(o),action:i(se,{checked:d,onChange:a,ariaLabelledBy:f})})}}}function Aa(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(Ye,{label:l("Background"),icon:i(dn,{}),id:r,value:gn(e),onChange:t})}}}function Fa(e,t){return{type:"custom",...R({},{...X,label:e}),render:({value:n,onChange:o,id:r})=>{const a=typeof n=="boolean"?n:t,s=`${r??e}-checkbox`;return i(b,{label:l(e),htmlFor:s,className:"sf-checkbox",action:i(Gn,{id:s,checked:a,onChange:o})})}}}function La(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(Ye,{label:l(e),icon:n,value:o||t,onChange:r})}}function Na(){return{type:"custom",render:({value:e,onChange:t})=>i(Zr,{value:typeof e=="string"?e:"",onChange:t})}}function Zr({value:e,onChange:t}){const{hex:n,n:o}=Qr();return i(Yn,{label:l("Fill"),icon:i(Be,{}),value:e,inherited:n,resetTo:D(n.toUpperCase(),l("Theme {n} background",{n:o})),onChange:t,onReset:()=>t("")})}function Jr(e,t,n){if((e?.content??[]).some(s=>s?.props?.id===t))return ee(n);const r=Sn(e,t);if(r.length===0)return null;const a=ee(st(n));if(a!==null)return a;for(let s=r.length-1;s>0;s-=1){const c=ee(st(r[s].sectionAccent));if(c!==null)return c}return ee(r[0].sectionAccent)}function Qr(){const e=rt(P().theme),[t]=L("sectionAccent");let n=null;try{const{appState:r,selectedItem:a}=ie(c=>c),s=a?.props?.id?String(a.props.id):void 0;n=s?Jr(r?.data,s,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{hex:e.themes[o].background??ot.background,n:o+1}}const ei=[{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 ti({label:e,value:t,onChange:n,points:o=ei}){const r=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return i(Dn,{label:l(e),value:t,points:r,onChange:n})}function ka(){return bt()}const va={top:i(nn,{}),right:i(tn,{}),bottom:i(Qt,{}),left:i(en,{})};function Ba(e,t,n,o,r,a,s){const c=p=>t.find(u=>u.value===p),d=p=>({value:p,label:"",disabled:!0,title:o}),f=p=>{const u=t.find(g=>g.cell===p);if(!u)return d(`missing-${p}`);const m=a?.[p];return m?{value:u.value,label:u.label,icon:m}:{value:u.value,label:u.label}},h=[d("corner-top-left"),f("top"),d("corner-top-right"),f("left"),d("centre"),f("right"),d("corner-bottom-left"),f("bottom"),d("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:u})=>{const m=t.some(g=>g.value===p)?p:n;return i(b,{label:l(e),icon:r,value:c(m)?.label?l(c(m).label):s?l(s):"",children:ti({label:e,value:m,onChange:u,points:h})})}}}function Da(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:a})=>i(co,{label:e,options:(a.options??t).map(s=>({...s,label:l(s.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:l(n)}:{}})}}function Ga(e,t,n,o){return{type:"custom",options:t,fallback:n,...R({},{type:"select",label:e}),render:({value:r,onChange:a,field:s})=>i(po,{label:e,options:(s.options??t).map(c=>({...c,label:l(c.label)})),fallback:s.fallback??n,value:r,onChange:a,placeholder:o===void 0?void 0:l(o)})}}function Ha(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const Ma=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Ka(e,t,n){const o=Object.keys(Re).map(r=>({label:Re[r],value:r,picture:n[r]}));return{type:"custom",...R({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(ni,{label:e,icon:t,options:o,onChange:r})}}function ni({label:e,icon:t,options:n,onChange:o}){const r=V()?.values??{},a=Pt(r),s=a==="frame"&&!!Ie(r.mediaVideo)&&!Ie(r.videoFrame);return i(b,{label:l(e),icon:K(t),hint:s?l("This video has no frame yet. The slide shows its background colour until one is made."):void 0,children:be({options:n,value:a,onChange:o,ariaLabel:e})})}function Wa(e,t,n,o={}){return{type:"custom",[Pe]:!0,render:({value:r,onChange:a,name:s})=>i(so,{value:r||"",onChange:a,fieldKey:s,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame})}}const Ua={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function oi(e){const t=l(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function $a({value:e,onChange:t,label:n}){const o=e||{},r=V(),a=r?r.values!==r.node.props:!0,s=!!o.pending&&a,c=!!o.pending&&!a,d=s?"var(--ink-faint)":o.ok&&!c?"var(--status-success-soft-ink)":"var(--status-danger-soft-ink)",f=!!or(nr()).geocode,h=we(),p=(u,m)=>t({...o,[u]:m??void 0});return N(T,{children:[i(b,{label:l(n),icon:i(Ge,{}),action:f?i(Z,{content:l("Find from the address (OpenStreetMap)"),children:i(je,{"aria-label":l("Find from the address"),"aria-busy":s||void 0,disabled:s,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(pn,{})})}):void 0,children:f&&o.status?i(Z,{content:oi(o),className:"sf-name-tip",children:i("div",{className:`es-field-hint ${$t}`,style:{margin:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0,color:d},children:s?l("Finding…"):c?l(zn):l(o.status)})}):null}),i(b,{label:l("Enter by hand"),labelId:h,icon:i(on,{}),action:i(se,{checked:!!o.manual,onChange:u=>t({...o,manual:u}),ariaLabelledBy:h})}),o.manual&&i(b,{label:l("Latitude, longitude"),icon:i(Ge,{}),children:N("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(ze,{value:typeof o.lat=="number"?o.lat:null,onChange:u=>p("lat",u),min:-90,max:90,step:1e-4,placeholder:l("Latitude")}),i(ze,{value:typeof o.lng=="number"?o.lng:null,onChange:u=>p("lng",u),min:-180,max:180,step:1e-4,placeholder:l("Longitude")})]})})]})}function ri(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function ii(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,a)=>a===t?{text:n}:r)}function Xa(e,t){return e===null?null:t>e?e:null}function li(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 ja={label:"Ticker items",icon:i(cn,{})};function za(e,t,n,o){return{type:"custom",[w]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...R({},{...pt.textList,label:e}),render:({value:r,onChange:a})=>i(ai,{label:e,icon:K(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:a,markup:o==="markup"})}}function ai({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:a=!1}){const s=Y(null),[c,d]=H(null),f=p=>p.map(u=>({text:u?.text??""})),h=p=>{const u=li(n,p,c);u===null&&(s.current=null),d(u),r(f(p))};return i(Pn,{label:l(e),icon:t,noun:l("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?i(Ve,{target:s,value:ri(n,c),onChange:p=>r(ii(n,c??-1,p)),disabled:c===null,label:c===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,u,m)=>i("input",{type:"text",className:a&&c===u?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:u+1}),onChange:g=>m({text:g.target.value}),onFocus:g=>{s.current=g.currentTarget,d(u)}})})}function Ya(e,t){const n=`${e.label} — row ${t+1}`;return F({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function Va(e){return{_gCards:_("Cards"),coverIndex:$("Cover image",i(sn,{}),io,String(lo),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:_r("Image background",Do),cardImage:di()}}function qa(){return{outline:$("Card outline",i(fn,{}),no,ro),indexBadge:$("Card number",i(De,{}),to,oo),showBadge:qr("Product badge",!0,i(Ue,{noun:"tag"}))}}function Za(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...X,label:oe.find(a=>a.id===r).label}),o=r=>R(Vn(ye),n(r));return{_gShowOnCard:_("Show on a card"),[ye]:R({type:"custom",render:()=>i(si,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(ye)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const ye="showCardPrice",oe=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function si({rest:e}){const t=G(),n=wr(),o=s=>typeof t[s]=="boolean"?t[s]:void 0,r=s=>o(s)??e[s],a=oe.some(({id:s})=>o(s)!==void 0&&o(s)!==e[s]);return i(Ce,{parts:oe,changed:a,shown:r,onPress:(s,c)=>n({[s]:c}),onReset:()=>n(Object.fromEntries(oe.map(({id:s})=>[s,void 0])))})}function Ja(e,t="display"){const n=v(t);return{[t]:x("desktop",{type:"custom",render:({value:o,onChange:r})=>i(Ce,{parts:e,changed:Fn(o),shown:a=>Ln(o,a),onPress:(a,s)=>r(vn(o,a,s)),onReset:()=>r(void 0)})}),[n]:x("mobile",{type:"custom",render:({value:o,onChange:r})=>i(ci,{parts:e,desktopKey:t,value:o,onChange:r})})}}function Ce({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:a,disabledReason:s}){const c=l("Display");return i(b,{label:c,icon:i(zt,{}),changed:t,action:i(y,{words:S()?.panel,label:c,changed:t,detail:a,onReset:r}),children:i(An,{label:c,items:e.map(d=>({id:d.id,label:l(d.label),shown:n(d.id),...s?{disabled:!0,disabledReason:l(s)}:{}})),onChange:o})})}function ci({parts:e,desktopKey:t,value:n,onChange:o}){const r=G()[t];return i(Ce,{parts:e,changed:kn(n),shown:a=>Nn(r,n,a),onPress:(a,s)=>o(Bn(n,a,s)),onReset:()=>o(Qn),detail:l("the same as Desktop")})}function di(){return gt("Card image",{min:k,max:Le,step:Nt,hint:"Rounds the picture. The card's own corner is in Styles."})}function Qa(){return Se({sidesKey:"cornerSides",step:kt,useFollowed:()=>k,mark:i(ui,{label:vt}),hint:l("Rounds the picture. Left alone it stays square.")})}function ui({label:e,changed:t=!1,onReset:n=()=>{}}){return i(y,{words:S()?.panel,label:l(e),changed:t,onReset:n})}function es(){return{type:"custom",render:({value:e,onChange:t})=>i(hi,{value:typeof e=="string"?e:"",onChange:t})}}function pi({layout:e,width:t}){return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:6,gridAutoFlow:"row dense",gap:2},children:Ht(e).map(([n,o],r)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${n}`,gridRow:`span ${o}`}},r))})}const fi={width:"3.5rem",height:"2.5rem"},mi=200;function hi({value:e,onChange:t}){const[n,o]=H(null),[r,a]=H(4),s=Y(null);Et(()=>{const u=s.current;if(!u||typeof ResizeObserver!="function")return;const m=()=>a(u.getBoundingClientRect().width>=mi?4:3);m();const g=new ResizeObserver(m);return g.observe(u),()=>g.disconnect()},[]);const c=e&&e in q?e:"",d=Ne(n,c),f=Ne(n,"").length,h=Mt("no-symbol"),p=[{value:"",label:l("Not chosen"),icon:h},...d.map(u=>({value:u,label:l(q[u].label),icon:i(pi,{layout:q[u],width:40})}))];return i(b,{label:l("Layout"),icon:i(ln,{}),value:c?l(q[c].label):void 0,children:i("div",{ref:s,style:{flex:"1 1 auto",minWidth:0},children:i(Xn,{label:l("Layout"),value:c,emptyValue:"",options:p,onChange:t,columns:r,cell:fi,header:N("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:l("Photos in a row")}),i(In,{options:[{id:"all",label:l("All")},...Dt.map(u=>({id:String(u),label:String(u)}))],value:n===null?"all":String(n),ariaLabel:l("Photos in a row"),onChange:u=>o(u==="all"?null:Number(u))}),i("span",{className:"text-2xs text-ink-faint",children:l("{n} of {total} layouts",{n:f,total:Gt.length})})]})})})})}export{gr as BOUND_TO_POST,zl as BOUND_TO_POST_NOTE,ta as BUCKET_ICONS,Ua as CUSTOM_FIELD_MEDIA,$a as CoordsField,dt as DESKTOP_GAP_NOT_OVERLAP,Ce as DisplayRow,va as EDGE_ARROWS,Un as FOCAL_DEFAULT,ei as FOCAL_POINTS,le as FOLD_FIELD_MARKER,ti as FocalPicker,ca as GroupLabel,br as HIGHLIGHT_HINT,A as HidableTextField,Te as LINK_FIELD_MARKER,Bl as Label,Pe as MEDIA_FIELD_MARKER,Ma as MEDIA_TYPE_OPTIONS,Yl as NOT_BOUND_TO_POST,sa as PanelBand,yr as PanelNoteLine,Kr as RowPropsContext,Ae as SCAFFOLD_FIELD_MARKER,rs as SCALAR_TEXT_CONTROLS,sr as SiteGapDefaultReset,j as Slider,ht as Swatches,os as TEXT_CONTROL_KINDS,w as TEXT_FIELD_MARKER,ja as TICKER_ITEMS_ROW,ai as TextListField,ne as WIDTH_LABEL,mr as WidthDefaultReset,li as aimAfterListChange,Oa as anchorFields,D as backTo,da as backgroundField,ga as boxBlockSpacingField,Sa as boxColumnsFields,Na as boxFillField,Mr as boxPhoneRowField,Ct as boxShareField,ba as boxSharePhoneField,xa as boxShareTabletField,Jr as boxThemeIndexOf,ra as bucketHeader,fa as buttonWordsEntryField,Dr as cardCornersField,_r as cardImageBackgroundField,di as cardImageField,Va as cardMediaFields,ha as cardShapeFields,Za as cardShowFields,qa as cardStyleFields,Ca as cellWidthFields,Fa as checkbox,La as colorInput,Gl as containerDirectionField,cr as containerGapField,dr as containerGapPhoneField,Dl as containerGapRows,ur as containerGapTabletField,oi as coordsResultTip,Jl as copyText,xt as cornerSidesField,Se as cornersRowField,Pa as date,Ta as dateTime,ia as designGroupHeader,Ja as displayFields,Ba as edgePad,Xa as focusAfterRemove,ka as focusKeptField,la as foldMarker,ae as foldMetaOf,Cr as foldTitleOf,es as galleryLayoutField,Ra as heightFields,Hl as heroGroupPlacementPoints,Oe as hidableText,Sr as hintIsWhileTyping,Qa as imageCornersField,jl as inOwnBox,oa as isBucketHeader,bt as keptBy,Ql as linkField,Ka as loadingShowsField,Da as multiSelect,Aa as pageBackgroundField,na as panelNote,$r as phoneOverrideField,Zl as plainText,ea as plainTextarea,gt as pxField,aa as quietMarker,Ee as readHidable,ri as rowText,Ga as searchSelect,St as sectionBorderField,Or as sectionCornersField,pa as sectionShapeFields,ua as sectionThemeFields,ii as setRowText,ya as sizeField,Ha as sourceField,_a as spacingFields,Ea as stickFields,wa as swapPadding,ma as templateField,Vl as text,At as textFieldIdentifier,Wl as textFieldOffPage,$l as textFieldPanelOnly,za as textList,Ya as textListRowField,ql as textarea,qr as toggle,Wa as upload,wr as useSelectedPatch,G as useSelectedProps,L as useSelectedSibling,ar as useSiteGapDetail,Ia as widthField,Xl as withIdentifier,Kl as withOffPage,Ul as withPanelOnly,Ml as withScaffold};
1
+ "use client";import{jsx as i,jsxs as v,Fragment as F}from"react/jsx-runtime";import{cloneElement as Fe,createContext as Dt,useContext as vt,useEffect as Ht,useId as Pe,useRef as J,useState as W}from"react";import{useEasel as de,useSelectedHost as H}from"efficient-easel/easel";import{toDateKey as Gt,fromDateKey as Mt}from"efficient-shell/format";import{say as l,editorEaselWords as x}from"../../../format/lib/editor-words.js";import{mediaValueSrc as Ae}from"../../../format/lib/media-value.js";import{LOADING_SHOWS_LABELS as Le,loadingShowsOf as Kt}from"../../../format/lib/hero-video.js";import{readHidable as Ne,hidableText as Be}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as ue,LINK_FIELD_MARKER as De,MEDIA_FIELD_MARKER as ve,SCAFFOLD_FIELD_MARKER as He,TEXT_FIELD_MARKER as w,foldMetaOf as pe,textFieldIdentifier as Ut}from"efficient-easel/draw";import Wt from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as Ge}from"../../../render/lib/document/show-when.js";import $t from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as Xt,CORNER_RADIUS_MAX as Me,CORNER_RADIUS_MIN as G}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as jt,IMAGE_CORNERS_LABEL as Vt}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as zt}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Yt,GALLERY_LAYOUTS as Q,GALLERY_LAYOUT_KEYS as qt,galleryChoices as Ke,galleryPictureCells as Zt}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as Jt}from"./shell-glyph.js";import{anchorSiblingsOf as Qt,placementPoints as en}from"../../../format/lib/hero-group-placement.js";import tn,{KEEP_HINT_CLASS as nn}from"../../components/KeepHint.js";import on from"../../components/AnchorField.js";import{AdjustIcon as rn,EyeIcon as ln,AnimationIcon as an,BackgroundIcon as sn,BorderAllIcon as cn,BlockSectionIcon as dn,ColumnWidthsIcon as Ue,ColumnsIcon as We,CornerIcon as un,DirectionDownIcon as pn,DirectionLeftIcon as fn,DirectionRightIcon as hn,DirectionUpIcon as mn,EditIcon as gn,GapIcon as bn,GridIcon as xn,GroundIcon as $e,HashIcon as Xe,HeightIcon as Sn,ImageIcon as yn,ListIcon as Cn,LocationIcon as je,PaddingBottomIcon as Ve,PaddingLeftIcon as ze,PaddingRightIcon as Ye,PaddingTopIcon as qe,PageIcon as wn,StickyIcon as _n,SearchIcon as Rn,SquareIcon as Tn,TypeIcon as In,WidthIcon as En}from"efficient-easel/icons";import{FieldGlyph as Ze}from"../../components/FieldGlyph.js";import{resolvePageBackground as On}from"../../../format/lib/content/page-background.js";import{CORNER_SIDES as Je,CORNER_SIDE_POINTS as kn,hasOwnSectionCorners as Fn,normalizeCornerSides as Qe}from"../../../format/lib/content/section-corners.js";import{enclosingPath as Pn,enclosingSection as An}from"./enclosing-section.js";import{SettingsDefaultReset as S,SettingsDrill as Ln,SettingsField as b,SettingsGroup as Nn,SettingsGroupSub as Bn,SettingsSegmented as Dn,SettingsBorder as vn,SettingsSidesEach as Hn,SettingsSwitch as fe,borderSides as Gn,borderStartEach as Mn}from"efficient-easel/panel";import{ListField as Kn}from"efficient-easel/fields";import{DisplayChips as Un}from"efficient-shell/ui";import{desktopDisplayChanged as Wn,partShownOnDesktop as $n,partShownOnPhone as Xn,phoneDisplayChanged as jn,withDesktopPart as Vn,withPhonePart as zn}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as Yn,Checkbox as qn,ColorSwatch as Zn,CornersInput as Jn,DatePicker as Qn,DateTimePicker as eo,FOCAL_DEFAULT as to,PictureTiles as no,IconPicker as oo,IconButton as et,InputNumber as tt,Slider as ro,Tooltip as ee}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as io}from"./geocode-resolve.js";import{ColourRow as nt,InheritedColourRow as ot}from"./ColourControl.js";import{keptByRow as lo}from"efficient-easel/screen/lib/document/style-fields";import rt from"./MarkupToolbar.js";import{deviceField as _}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as ao,NoControlMark as so,noControlField as it}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as co}from"../../../format/lib/document/own-box.js";import{PHONE_CLEAR as uo,resolvePhoneValue as he}from"../../../format/lib/document/phone-override.js";import{phoneKey as I,tabletKey as M}from"efficient-easel/draw";import{SuppressibleText as po}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as fo,CARD_OUTLINE_OPTIONS as ho,DEFAULT_CARD_INDEX_FORMAT as mo,DEFAULT_CARD_OUTLINE as go}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as bo,DEFAULT_COVER_INDEX as xo}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as So}from"efficient-easel/draw";import yo from"../../components/MediaUploadField.js";import Co from"../../components/MultiSelectField.js";import wo from"../../components/SectionThemePicker.js";import _o from"../../components/SearchSelectField.js";import Ro from"../../components/StorefrontLinkField.js";import{UiIcon as lt}from"efficient-easel/draw/client";import{SECTION_PADDING as R}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as To}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Io}from"efficient-easel/draw/client";import{encodePartId as Eo}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as Oo,useEaselStrings as ko}from"efficient-easel/strings";import{hasPhoneHeight as Fo,hasTabletHeight as me,resolveSectionMinHeight as Po,resolveTabletHeight as Ao}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as te,SECTION_STICK_LABEL as ge,hasPhoneStick as Lo,hasTabletStick as No,resolveSectionStick as at}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as Bo,SECTION_MIN_HEIGHT_GROUP_LABEL as $,SECTION_SCREEN_PCT as Do}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as vo,resolveContainerDirection as st}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as Ho,BOX_BLOCK_SPACING_POINTS as ct,BOX_PHONE_ROW_LABEL as dt,BOX_COLUMNS_MAX as Go,BOX_COLUMNS_MIN as ut,BOX_PHONE_ROW_MAX as Mo,BOX_PHONE_ROW_MIN as be,BOX_SHARE_LABEL as ne,BOX_SHARE_PHONE_DEFAULT as Ko,BOX_SHARE_PHONE_POINTS as Uo,BOX_SHARE_POINTS as Wo}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as L}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as $o,borderBySide as pt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as Xo,normalizeTheme as ft,normalizeThemeColors as jo,sectionBandTone as Vo,surfaceTwoTone as zo}from"../../../format/lib/theme.js";import{CONTAINER_GAP as ht,CONTAINER_GAP_BUILT_IN as Yo,CONTAINER_GAP_PHONE as xe,GAP_FIELD_CONTAINER as Se,followsSitePhoneGap as qo,hasOwnContainerGap as Zo,hasOwnPhoneGap as ye,resolveContainerGap as mt,resolvePhoneContainerGap as gt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as Jo,CARD_IMAGE_BG_OFF as Qo,CARD_IMAGE_BG_SWATCH_NAMES as er,CARD_IMAGE_BG_SWATCHES as tr,isCardImageBackgroundInheriting as nr,cardImageBackgroundChoice as or,THEME_CARD_IMAGE_BG as rr}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as ir,SECTION_BG_NO_FILL as lr,sectionBackgroundChoice as ar,THEME_SECTION_BG as Ce,isSectionBackgroundEmpty as sr,sectionBackgroundHex as bt}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as cr,nestedAccentValue as xt,resolveSectionAccent as oe}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as dr,TYPE_SIZE_INHERIT as ur,isTypeSizeInheriting as pr}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as fr,WIDTH_CHOICE_LABEL as hr,WIDTH_INHERIT as mr}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as gr}from"./panel-heading-scope.js";import{useEaselSession as br}from"efficient-easel/screen/lib/session-context";import{backendOf as xr}from"../website-session.js";import{BOX_GAP as Sr,describedAs as T,group as C,iconOf as X,sharedStyleKinds as j}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as we,onDesktopWords as V,phoneTwinFields as re}from"efficient-easel/screen/lib/document/box-fields";import{directionField as yr,gapField as _e,Segmented as Re,segmented as Cr,select as z,slider as K}from"./box-fields.js";function ia({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function N(e,t){return l("{value} from {from}",{value:e,from:t})}function wr(){const{blockGap:e}=L();return e===null?l("this container's own spacing"):N(`${e}px`,l("Styles"))}function _r({inherited:e,onReset:t,label:n}){return i(S,{words:x()?.panel,label:l(n),changed:!e,detail:wr(),onReset:t})}function Rr(e){return _e({...Sr,builtIn:Yo[e],resolve:(t,n)=>mt(e,t,n?.siteGap),action:(t,n)=>i(_r,{inherited:!Zo(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[Se]:e}})}function Tr(e){return Ge(_("mobile",{[Se]:e,type:"custom",render:t=>i(Or,{container:e,...t})}),St)}function Ir(e){return Ge(_("tablet",{[Se]:e,type:"custom",render:t=>i(Er,{container:e,...t})}),St)}const St={not:{field:"gap",in:Array.from({length:-ht.min},(e,t)=>ht.min+t)}};function la(e){return{gap:_("desktop",Rr(e)),[M("gap")]:Ir(e),[I("gap")]:Tr(e)}}function Er({container:e,...t}){const[n]=P("gap"),{siteGap:o}=t.field??{},r=Math.max(xe.min,mt(e,n,o));return _e({...xe,builtIn:r,resolve:s=>ye(s)?s:r,action:(s,c)=>i(S,{words:x()?.panel,label:l("Gap"),changed:ye(s),detail:V(d=>l(d),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function Or({container:e,...t}){const[n]=P("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},a=gt(e,void 0,n,o,r);return _e({...xe,builtIn:a,resolve:c=>gt(e,c,n,o,r),action:(c,d)=>i(S,{words:x()?.panel,label:l("Gap"),changed:ye(c),detail:N(`${a}px`,qo(e,n,r)?l("Styles"):l("Desktop")),onReset:()=>d(void 0)})}).render(t)}function aa(e){return yr({offered:vo(e),fallback:st(e,void 0),resolve:t=>st(e,t)})}function sa(e,t){return en(t?Qt(e,t):[],t)}function kr({inherited:e,onReset:t,label:n}){return i(S,{words:x()?.panel,label:l(n),changed:!e,detail:N(l("Full"),l("the page")),onReset:t})}function B({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:a,hideable:s=!0,markup:c=!0}){const{text:d,hidden:f}=Ne(e),h=J(null),p=J(null),u=k=>t(s?{text:k,hidden:f}:k),m=()=>t({text:d,hidden:!f}),g=s&&f,O=Pe(),y=r?Nr(r)?i("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(r)}):i(tn,{children:l(r)}):void 0,Z=f?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return i(b,{label:l(n),icon:i(In,{}),htmlFor:O,className:g?"is-hidden":void 0,hint:y,action:s?i(ee,{content:Z,children:i(et,{"aria-pressed":f,"aria-label":Z,onClick:m,children:f?i(lt,{name:"eye-off",size:14}):i(lt,{name:"eye",size:14})})}):void 0,children:v("div",{className:"sf-copybox",children:[c&&i(rt,{target:a?p:h,value:d,onChange:u}),a?i("textarea",{id:O,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:k=>u(k.target.value)}):i("input",{id:O,ref:h,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:k=>u(k.target.value)})]})})}function ca(e,t){return{...e,[He]:t}}function da(e){const t=e[w];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[w]:{...t,offPage:!0}}}function ua(e){return!e||typeof e!="object"?!1:e[w]?.offPage===!0}const yt="sfPanelOnly";function pa(e){if(!e[w])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[yt]:!0}}function fa(e){return!!e&&typeof e=="object"&&e[yt]===!0}function ha(e){const t=e[w];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[w]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as Es,SCALAR_TEXT_CONTROLS as Os}from"efficient-easel/draw";function ma(e,t){if(!e[w])throw new Error("inOwnBox: the field holds no authored text");const{[ao]:o,...r}=e;return{...r,[co]:!0,render:t}}const Fr=new Set(So),Y={type:"radio",options:[{value:!0},{value:!1}]},Ct={text:{type:"object",objectFields:{text:{type:"text"},hidden:Y}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:Y}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},D=(e,t)=>{const n=T({...t,[w]:e},{...Ct[e.control],label:e.label});if(!Fr.has(e.control))return n;const o=t.render;return{...it(n,"authored-copy"),render:r=>i(po,{name:r.name,children:o(r)})}},ga="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Pr={field:"source.slug",set:!0},ba={not:Pr},Ar="Select a word, then press the highlighter.",Lr=new Set([Ar]),Nr=e=>Lr.has(e);function xa(e,t,n){return D({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(B,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function Sa(e,t,n){return D({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(B,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function ya(e,t,n){return D({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(B,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function Ca(e,t,n){return D({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(B,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function wa(e){return{type:"custom",[De]:{label:e},...T({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(Ro,{value:Be(t),onChange:n,label:e})}}function _a(e,t,n){return D({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(B,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const Ra={Design:rn,Animation:an};function Ta(e){return{type:"custom",render:()=>i(Br,{text:e})}}function Br({text:e}){return i("p",{className:"sf-note",children:l(e)})}function Ia(e){return pe(e)!==null&&e?.tabs!==void 0}const wt=new Map;function Ea(e,t){const n=`${e}\0${t?t.join(""):""}`,o=wt.get(n)??{type:"custom",tabs:t,[ue]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(F,{})};return wt.set(n,o),o}const _t=new Map;function Oa(e){const t=_t.get(e)??{type:"custom",[ue]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(F,{})};return _t.set(e,t),t}function Dr(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function ka(e,t){return Dr(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(F,{})}}function Fa(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(F,{})}}function Pa({title:e,children:t}){const[n,o]=W(()=>!Te.has(e));return i(Nn,{title:e,open:n,onToggle:r=>{o(r),r?Te.delete(e):Te.add(e)},children:t})}const Te=new Set;function Aa({label:e}){return i(Bn,{title:l(e),level:gr(2)})}function vr({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),a=r?o?.[r]:void 0,s=a?l(a):t;return v("div",{className:"sf-swatches",children:[e.map(c=>{const d=o?.[c]?l(o[c]):c;return i(ee,{content:d,children:i(Zn,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":d})},c)}),i("span",{className:"sf-swatch-hex",children:s})]})}function La(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(Hr,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function Hr({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const a=typeof o=="string"?o:void 0,{colors:s,n:c}=Bt(),d={background:s.background,surface:s.surface,surface2:zo(s),band:Vo(s)},f=n?Ce:t,h=sr(a,t,f),p=bt(void 0,f,d),u=n?ir:void 0,m=ar(a,t),g=f===Ce?l("the theme's section background"):l("Theme {n} background",{n:c});return i(ot,{label:l(e),icon:i(sn,{}),value:h?"":bt(a,t,d),inherited:p,resetTo:N(p.toUpperCase(),g),onChange:r,onReset:()=>r(u),choices:[{label:l("No fill"),color:"",selected:m==="none",onPick:()=>r(lr)},{label:`${l("Section band")} · ${d.band.toUpperCase()}`,color:d.band,selected:m==="band",onPick:()=>r(Ce)}]})}function Gr(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,a=nr(r,t);return i(b,{label:l(e),icon:i($e,{}),changed:!a,action:i(S,{words:x()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(Jo)}),children:vr({swatches:tr,current:a?rr:or(r,t),onPick:o,names:er})})}}}function Na(e=n=>n,t){return j({_gSectionTheme:C(cr),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(wo,{value:e(n),onChange:o,followLabel:t})}})}function q({min:e,max:t,step:n,value:o,onChange:r,suffix:a="",readout:s=!0,notch:c,ariaLabel:d,disabled:f=!1,placeholder:h}){const p=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:p?"sf-slider has-notch":"sf-slider",style:p?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(ro,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},suffix:a||void 0,showInput:s,label:d===void 0?void 0:l(d),disabled:f,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:u=>{u!==null&&u!==o&&r(u)}})})}function Rt(e,t){const{min:n,max:o,step:r=1,unsetLabel:a,hint:s,restTrack:c,unsetMark:d,icon:f,unit:h="px"}=t;return{type:"custom",render:({value:p,onChange:u})=>{const m=typeof p=="number"?p:null,g=m===null;return i(b,{label:l(e),icon:f?X(f):void 0,value:g?d||a===void 0?void 0:l(a):`${m}${h}`,changed:!g,action:d?Fe(d,{changed:!g,onReset:()=>u(null)}):i(S,{words:x()?.panel,label:l(e),changed:!g,onReset:()=>u(null)}),hint:typeof s=="string"?l(s):s,children:c?c({min:n,max:o,step:r,px:m,label:e,onChange:u}):q({min:n,max:o,step:r,value:m??n,readout:!1,ariaLabel:e,onChange:u})})}}}const ie="Corners";function Ie(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,r=o!==null;return i(b,{label:l(ie),icon:i(un,{}),changed:r,action:Fe(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:i(Kr,{tier:e,px:o,onRadius:n})})}}}function P(e){const t=H();return[t?.values?.[e],n=>t?.onChange(e,n)]}function Tt(){return it({type:"custom",render:()=>i(so,{})},"always")}function Mr(){const e=H();return t=>e?.onChangeMany(t)}function Kr({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,a]=P(e.sidesKey),s=Qe(r)??[...Je];return i(Jn,{label:l(ie),value:s,corners:kn,onChange:c=>{const d=Qe(c)??[];a(d.length===Je.length?null:d)},radius:t,onRadiusChange:n,radiusMin:G,radiusMax:Me,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function It(){return Tt()}function Ur({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=L(),r=typeof o=="number"?`${o}px`:l("not set");return i(S,{words:x()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):N(r,l("Styles")),onReset:n})}function Wr(){const{cornerRadiusPx:e}=L();return typeof e=="number"?e:G}function $r(){return Ie({sidesKey:"sectionCornerSides",useFollowed:Wr,mark:i(Ur,{label:ie}),hint:Xr})}const Xr="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function Ba(){return j({_gShape:C("Shape"),sectionCorners:$r(),sectionCornerSides:It(),...U("sectionBorder",Et)})}const jr=()=>({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 Vr(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function zr(){let e;try{const t=ft(L().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Xo.line}function Yr({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:a=!0,above:s={}}){const c=e&&typeof e=="object"?e:{},[d,f]=W(()=>r?Mn(c,s):!1),h=jr(),p=u=>Vr(r&&a?u:{width:u.width,color:u.color,...a?{style:u.style}:{}});return i(b,{label:l("Border"),icon:i(cn,{}),action:r?i(Hn,{each:d,label:l("Each side"),onChange:f}):void 0,children:i(vn,{label:l("Border"),value:c,each:d,onChange:u=>t(p(u)),placeholder:n,presets:o,words:h,styles:a,max:$o})})}function qr({value:e,onChange:t,view:n}){const[o]=P("sectionBorder"),[r]=P(M("sectionBorder")),a=zr(),s=d=>d&&typeof d=="object"?d:{},c=n==="phone"?{...pt(s(o)),...pt(s(r))}:n==="tablet"?s(o):{};return i(Yr,{value:e,onChange:t,placeholder:{sides:Gn(c),style:c.style??"solid",color:c.color||a},presets:[a],above:c})}function Da(e){return _(e,Et(e==="mobile"?"phone":e))}function Et(e){return{type:"custom",render:({value:t,onChange:n})=>i(qr,{value:t,onChange:n,view:e})}}function U(e,t){const n=(o,r)=>re(e,t(o),we)[r];return{[e]:n("desktop",e),[M(e)]:n("tablet",M(e)),[I(e)]:n("phone",I(e))}}function va(e){return{type:"custom",render:()=>i(Zr,{partKey:e})}}function Zr({partKey:e}){const[t]=P("id"),[n]=P("_partStyles"),{textStyles:o}=L(),r=ko();let a=null;try{a=Io().select}catch{a=null}const s=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(Ln,{name:l("Text"),preview:To(s,c,{noStyle:l("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??Oo.copy.panel).cases}),onOpen:()=>{a&&typeof t=="string"&&a(Eo(t,e))}})}function Ot(e){const{cornerRadiusPx:t}=L(),n=typeof t=="number"?t:e;let o=null;try{const{appState:a,selectedItem:s}=de(d=>d),c=s?.props?.id?String(s.props.id):void 0;o=c?An(a?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Fn(r)?r:n}function Jr({label:e,changed:t=!1,onReset:n=()=>{}}){const o=Ot(G);return i(S,{words:x()?.panel,label:l(e),changed:t,detail:N(`${o}px`,l("the section")),onReset:n})}function Qr(){return i(F,{children:l("Follows the section's Corners until you set a number here.")})}function ei(){return Ie({sidesKey:"cardCornerSides",useFollowed:()=>Ot(G),mark:i(Jr,{label:ie}),hint:i(Qr,{})})}function ti(){return{type:"custom",render:()=>i(Wt,{})}}function Ha(e){return{...e,render:t=>i($t,{render:e.render,props:t})}}function Ga(){return{_gShape:C("Shape"),cardCorners:ei(),cardCornerSides:It(),cardCornersApplyAll:ti()}}function kt(e=Wo,t=e[0].value){return T({type:"custom",render:n=>{const{value:o,onChange:r}=n,a="follows"in n,s=n.follows,c=o!=null,d=c?o:a?s??t:o,f=e.find(p=>p.value===d)??e.find(p=>p.value===t)??e[0],h=e.find(p=>p.value===(s??t))??e[0];return i(b,{label:l(ne),icon:i(Ue,{}),value:l(f.label),action:a?i(S,{words:x()?.panel,label:l(ne),changed:c,detail:V(p=>l(p),l(h.label),n.followsView),onReset:()=>r(void 0)}):void 0,children:i(no,{className:"sf-gallery-layouts",label:l(ne),value:f.value,onChange:r,options:e.map(p=>({value:p.value,label:l(p.label),picture:i("span",{className:"sf-gallery-pic",children:ni(p.weights).map((u,m)=>i("i",{style:{gridColumn:`span ${u}`}},m))})}))})})}},{type:"select",label:ne,options:e.map(n=>({value:n.value,label:n.label}))})}function ni(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 Ma(){return z(Ho,i(bn,{}),ct,ct[0].value)}function Ka(){return _("mobile",kt(Uo,Ko))}function Ua(){return re("share",kt(),we)[M("share")]}function oi(){return _("mobile",K(dt,i(We,{}),be,Mo,1,be,"",{clear:{phoneFollows:!1,hint:be}}))}const Ft={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Wa(){const e=K(dt,i(We,{}),ut,Go,1,ut,"",{clear:{emptyLabel:"Auto"}}),t=re("columns",e,{...Ft,tablet:we.tablet}),n=re("columns",e,Ft,{phoneRow:oi()});return{...t,phoneRow:n.phoneRow}}function $a(e,t,n,o,r,a){return{type:"custom",render:({value:s,onChange:c})=>i(b,{label:l(e),icon:i(Ze,{noun:a}),action:i(S,{words:x()?.panel,label:l(e),changed:!pr(s),detail:l("the Text style in Styles"),onReset:()=>c(ur),defaultAction:{onPress:()=>c(dr),title:l("Keep this section's own built-in size"),icon:i(dn,{})}}),children:q({min:t,max:n,step:o,value:typeof s=="number"?s:r,suffix:"px",ariaLabel:e,onChange:c})})}}function Xa(){return{_gCellWidth:C("Cell width"),gridSpan:z("Positions",i(Ue,{}),[{label:"Auto",value:""},...Array.from({length:zt},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function E(){let e=null,t=null;try{e=vt(ri),t=de(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const ri=Dt(null);function ii({min:e,max:t,step:n,px:o,label:r,onChange:a,desktopKey:s,fallback:c}){const d=E()[s],f=he(void 0,d,c);return i(F,{children:q({min:e,max:t,step:n,value:he(o,d,c),readout:!1,ariaLabel:r,notch:f,onChange:a})})}function li({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:a=()=>{}}){const s=E()[t],c=he(void 0,s,n);return i(S,{words:x()?.panel,label:l(e),changed:r,detail:V(d=>l(d),`${c}${o}`),onReset:a})}function ai(e){return Rt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(li,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(ii,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const si={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},ci={Top:qe,Bottom:Ve,Left:ze,Right:Ye},di=e=>{const t=ci[e];return i(t,{})};function ja(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=y=>si[y],a=y=>K(r("Top"),i(qe,{}),R.min,R.max,R.step,y,"px"),s=(y,Z,k,ce=R)=>_("mobile",ai({label:r(y),icon:di(y),desktopKey:Z,min:ce.min,max:ce.max,step:ce.step,fallback:k})),c=e.top??R.min,d=e.bottom??R.min,f="sectionPaddingLeft",h="sectionPaddingRight",p=e.sideBounds??R,u=e.side??p.min,m=e.sidePhone??u,g=e.phone===!0,O=y=>g?_("desktop",y):y;return j({...o?{_gSpacing:C("Padding")}:{},[t]:O(a(c)),...g?{[I(t)]:s("Top",t,c)}:{},...e.only==="top"?{}:{[n]:O(K(r("Bottom"),i(Ve,{}),R.min,R.max,R.step,d,"px")),...g?{[I(n)]:s("Bottom",n,d)}:{}},...e.sides?{[f]:O(K(r("Left"),i(ze,{}),p.min,p.max,p.step,u,"px")),...g?{[I(f)]:s("Left",f,m,p)}:{},[h]:O(K(r("Right"),i(Ye,{}),p.min,p.max,p.step,u,"px")),...g?{[I(h)]:s("Right",h,m,p)}:{}}:{}})}function Va(e,t){const n=Object.fromEntries(Object.entries(t).map(([a,s])=>[a,a in e&&pe(s)?e[a]:s])),o={};let r=!1;for(const[a,s]of Object.entries(e)){if(a in t){r||Object.assign(o,n),r=!0;continue}o[a]=s}return r||Object.assign(o,n),o}const le="Width";function za(e,t=fr,n=!0){const o=t.map(r=>({label:hr[r],value:r}));return j({...n?{_gWidth:C(le)}:{},widthMode:{type:"custom",render:({onChange:r,field:a})=>i(b,{label:l(le),icon:i(En,{}),action:n?i(kr,{inherited:a?.inherited??!1,onReset:()=>r(mr),label:le}):void 0,children:Re({options:o,value:a?.currentValue||e,onChange:r,ariaLabel:le})})}})}function Ya(){const e=(o,r)=>({type:"custom",render:({value:a,onChange:s})=>i(ui,{value:a,onChange:s,view:o,badge:r})}),t=o=>({type:"custom",render:({value:r,onChange:a,field:s})=>i(fi,{value:r,onChange:a,unit:s?.unit,view:o})}),n=o=>{const r=Cr("Unit",i(Xe,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");if(o==="desktop")return r;const a=r.render;return{...r,render:s=>i(hi,{props:s,draw:a,view:o})}};return j({_gHeight:C($),...U("sectionHeightMode",o=>o==="desktop"?e(o):e(o,r=>i(mi,{view:o,onClear:()=>r(void 0)}))),...U("sectionHeightValue",t),...U("sectionHeightUnit",n)})}function ui({value:e,onChange:t,view:n,badge:o}){const r=E(),a=c=>["auto","fixed","screen"].includes(c),s=ae(n,r)?.mode??"auto";return i(b,{label:$,icon:X(i(Sn,{})),action:o?o(t):void 0,children:Re({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:a(e)?e:s,onChange:t,ariaLabel:$})})}function Pt(e,t){return e==="phone"&&me(t)?Ao(t):Po(t)}function ae(e,t){return e==="desktop"||(e==="tablet"?me(t):Fo(t))?null:Pt(e,t)}const A=(e,t)=>e==="tablet"?M(t):I(t);function pi(e,t,n,o){const r=ae(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[A(e,"sectionHeightMode")]:r.mode,...r.mode==="fixed"?{[A(e,"sectionHeightUnit")]:r.unit}:{},...n==="sectionHeightUnit"?{[A(e,"sectionHeightValue")]:r.value}:{},[A(e,n)]:o}}function At(e,t,n){const o=H(),r=ae(e,E());return!o||!r?{followed:null,write:n}:{followed:r,write:s=>o.onChangeMany(c=>{const d=pi(e,c,t,s);return d===null?{[e==="desktop"?t:A(e,t)]:s}:Object.keys(d).length?d:null})}}function fi({value:e,onChange:t,unit:n,view:o}){const{followed:r,write:a}=At(o,"sectionHeightValue",t),s=(r?r.unit:n)==="%"?"%":"px",c=s==="%"?Do:Bo;return i("div",{className:"sf-field",children:q({min:c.min,max:c.max,step:c.step,value:r?null:typeof e=="number"?e:c.fallback,...r?{placeholder:r.value}:{},suffix:s,ariaLabel:$,onChange:a})})}function hi({props:e,draw:t,view:n}){const{followed:o,write:r}=At(n,"sectionHeightUnit",e.onChange);return t({...e,...o?{value:void 0,storedValue:void 0,follows:o.unit}:{},onChange:r})}function mi({view:e,onClear:t}){const n=E(),o=ae(e,n)===null,r=e==="phone"&&me(n),a=Pt(e,n),s=V(c=>l(c),a.mode==="auto"?l("Auto"):`${a.value}${a.unit}`,r?"tablet":"desktop");return i(S,{words:x()?.panel,label:l($),changed:o,detail:s,onReset:t})}function qa(){const e=n=>({type:"custom",render:({value:o,onChange:r,id:a,name:s})=>i(xi,{value:o,onChange:r,labelId:`${a??s??"stickTop"}-label`,view:n})}),t=n=>({type:"custom",render:({value:o,onChange:r})=>i(gi,{value:o,onChange:r,view:n})});return{_gStick:C(ge),...U("stickTop",e),...U("stickTopDistance",t)}}function gi({value:e,onChange:t,view:n}){const o=H(),r=E(),a=n==="desktop"||Ee(n,r)?null:Lt(n,at(r)),s=a&&o?c=>o.onChangeMany(d=>{const f=bi(n,d,c);return f===null?{[A(n,"stickTopDistance")]:c}:Object.keys(f).length?f:null}):t;return i("div",{className:"sf-field",children:q({min:te.min,max:te.max,step:te.step,value:a?null:typeof e=="number"?e:te.fallback,...a?{placeholder:a.distance}:{},suffix:"px",ariaLabel:l("Distance from top"),onChange:s})})}function Ee(e,t){return e==="tablet"?No(t):Lo(t)}function Lt(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance}:{on:t.desktop,distance:t.desktopDistance}}function bi(e,t,n){return e==="desktop"||Ee(e,t)?null:n===void 0?{}:{[A(e,"stickTop")]:!0,[A(e,"stickTopDistance")]:n}}function xi({value:e,onChange:t,labelId:n,view:o}){const r=E(),a=at(r),s=o==="phone"?a.phone:o==="tablet"?a.tablet:e===!0,c=o==="phone"&&a.ownTablet,d=o==="desktop"?null:Lt(o,a),f=d?.on?`${d.distance}px`:l("Off");return i(b,{label:l(ge),labelId:n,icon:X(i(_n,{})),action:v(F,{children:[o!=="desktop"?i(S,{words:x()?.panel,label:l(ge),changed:Ee(o,r),detail:V(h=>l(h),f,c?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(fe,{checked:s,onChange:t,ariaLabelledBy:n})]})})}const Nt="e.g. about";function Za(){return{_gAnchor:C("Anchor"),anchor:D({control:"plainText",label:"Name",placeholder:Nt},{type:"custom",render:({value:e,onChange:t})=>i(on,{value:e,onChange:t,nameBox:(n,o)=>i(B,{value:n,onChange:o,label:"Name",placeholder:Nt,hideable:!1,markup:!1})})})}}function Ja(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:a,name:s})=>{const c=`${a??s??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return i(b,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(eo,{id:c,value:Number.isFinite(d)?new Date(d):null,onChange:f=>r(f?f.toISOString():"")})})}}}function Qa(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:a,name:s})=>{const c=`${a??s??e}-date`;return i(b,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(Qn,{id:c,value:Mt(typeof o=="string"?o:null),onChange:d=>r(d?Gt(d):"")})})}}}function Si(e,t,n,o){return{type:"custom",...T({},{...Y,label:e}),render:({value:r,onChange:a,id:s,name:c})=>{const d=typeof r=="boolean"?r:t,f=`${s??c??e}-label`;return i(b,{label:l(e),labelId:f,icon:n,hint:o===void 0?void 0:l(o),action:i(fe,{checked:d,onChange:a,ariaLabelledBy:f})})}}}function es(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(nt,{label:l("Background"),icon:i(wn,{}),id:r,value:On(e),onChange:t})}}}function ts(e,t){return{type:"custom",...T({},{...Y,label:e}),render:({value:n,onChange:o,id:r})=>{const a=typeof n=="boolean"?n:t,s=`${r??e}-checkbox`;return i(b,{label:l(e),htmlFor:s,className:"sf-checkbox",action:i(qn,{id:s,checked:a,onChange:o})})}}}function ns(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(nt,{label:l(e),icon:n,value:o||t,onChange:r})}}function os(){return{type:"custom",render:({value:e,onChange:t})=>i(yi,{value:typeof e=="string"?e:"",onChange:t})}}function yi({value:e,onChange:t}){const{hex:n,n:o}=wi();return i(ot,{label:l("Fill"),icon:i($e,{}),value:e,inherited:n,resetTo:N(n.toUpperCase(),l("Theme {n} background",{n:o})),onChange:t,onReset:()=>t("")})}function Ci(e,t,n){if((e?.content??[]).some(s=>s?.props?.id===t))return oe(n);const r=Pn(e,t);if(r.length===0)return null;const a=oe(xt(n));if(a!==null)return a;for(let s=r.length-1;s>0;s-=1){const c=oe(xt(r[s].sectionAccent));if(c!==null)return c}return oe(r[0].sectionAccent)}function wi(){const{colors:e,n:t}=Bt();return{hex:e.background,n:t}}function Bt(){const e=ft(L().theme),[t]=P("sectionAccent");let n=null;try{const{appState:r,selectedItem:a}=de(c=>c),s=a?.props?.id?String(a.props.id):void 0;n=s?Ci(r?.data,s,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:jo(e.themes[o]),n:o+1}}const _i=[{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 Ri({label:e,value:t,onChange:n,points:o=_i}){const r=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return i(Yn,{label:l(e),value:t,points:r,onChange:n})}function rs(){return Tt()}const is={top:i(mn,{}),right:i(hn,{}),bottom:i(pn,{}),left:i(fn,{})};function ls(e,t,n,o,r,a,s){const c=p=>t.find(u=>u.value===p),d=p=>({value:p,label:"",disabled:!0,title:o}),f=p=>{const u=t.find(g=>g.cell===p);if(!u)return d(`missing-${p}`);const m=a?.[p];return m?{value:u.value,label:u.label,icon:m}:{value:u.value,label:u.label}},h=[d("corner-top-left"),f("top"),d("corner-top-right"),f("left"),d("centre"),f("right"),d("corner-bottom-left"),f("bottom"),d("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:u})=>{const m=t.some(g=>g.value===p)?p:n;return i(b,{label:l(e),icon:r,value:c(m)?.label?l(c(m).label):s?l(s):"",children:Ri({label:e,value:m,onChange:u,points:h})})}}}function as(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:a})=>i(Co,{label:e,options:(a.options??t).map(s=>({...s,label:l(s.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:l(n)}:{}})}}function ss(e,t,n,o){return{type:"custom",options:t,fallback:n,...T({},{type:"select",label:e}),render:({value:r,onChange:a,field:s})=>i(_o,{label:e,options:(s.options??t).map(c=>({...c,label:l(c.label)})),fallback:s.fallback??n,value:r,onChange:a,placeholder:o===void 0?void 0:l(o)})}}function cs(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const ds=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function us(e,t,n){const o=Object.keys(Le).map(r=>({label:Le[r],value:r,picture:n[r]}));return{type:"custom",...T({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(Ti,{label:e,icon:t,options:o,onChange:r})}}function Ti({label:e,icon:t,options:n,onChange:o}){const r=H()?.values??{},a=Kt(r),s=a==="frame"&&!!Ae(r.mediaVideo)&&!Ae(r.videoFrame);return i(b,{label:l(e),icon:X(t),hint:s?l("This video has no frame yet. The slide shows its background colour until one is made."):void 0,children:Re({options:n,value:a,onChange:o,ariaLabel:e})})}function ps(e,t,n,o={}){return{type:"custom",[ve]:!0,render:({value:r,onChange:a,name:s})=>i(yo,{value:r||"",onChange:a,fieldKey:s,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame})}}const fs={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Ii(e){const t=l(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function hs({value:e,onChange:t,label:n}){const o=e||{},r=H(),a=r?r.values!==r.node.props:!0,s=!!o.pending&&a,c=!!o.pending&&!a,d=s?"var(--ink-faint)":o.ok&&!c?"var(--status-success-soft-ink)":"var(--status-danger-soft-ink)",f=!!xr(br()).geocode,h=Pe(),p=(u,m)=>t({...o,[u]:m??void 0});return v(F,{children:[i(b,{label:l(n),icon:i(je,{}),action:f?i(ee,{content:l("Find from the address (OpenStreetMap)"),children:i(et,{"aria-label":l("Find from the address"),"aria-busy":s||void 0,disabled:s,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(Rn,{})})}):void 0,children:f&&o.status?i(ee,{content:Ii(o),className:"sf-name-tip",children:i("div",{className:`es-field-hint ${nn}`,style:{margin:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0,color:d},children:s?l("Finding…"):c?l(io):l(o.status)})}):null}),i(b,{label:l("Enter by hand"),labelId:h,icon:i(gn,{}),action:i(fe,{checked:!!o.manual,onChange:u=>t({...o,manual:u}),ariaLabelledBy:h})}),o.manual&&i(b,{label:l("Latitude, longitude"),icon:i(je,{}),children:v("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(tt,{value:typeof o.lat=="number"?o.lat:null,onChange:u=>p("lat",u),min:-90,max:90,step:1e-4,placeholder:l("Latitude")}),i(tt,{value:typeof o.lng=="number"?o.lng:null,onChange:u=>p("lng",u),min:-180,max:180,step:1e-4,placeholder:l("Longitude")})]})})]})}function Ei(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Oi(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,a)=>a===t?{text:n}:r)}function ms(e,t){return e===null?null:t>e?e:null}function ki(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 gs={label:"Ticker items",icon:i(Cn,{})};function bs(e,t,n,o){return{type:"custom",[w]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...T({},{...Ct.textList,label:e}),render:({value:r,onChange:a})=>i(Fi,{label:e,icon:X(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:a,markup:o==="markup"})}}function Fi({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:a=!1}){const s=J(null),[c,d]=W(null),f=p=>p.map(u=>({text:u?.text??""})),h=p=>{const u=ki(n,p,c);u===null&&(s.current=null),d(u),r(f(p))};return i(Kn,{label:l(e),icon:t,noun:l("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?i(rt,{target:s,value:Ei(n,c),onChange:p=>r(Oi(n,c??-1,p)),disabled:c===null,label:c===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,u,m)=>i("input",{type:"text",className:a&&c===u?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:u+1}),onChange:g=>m({text:g.target.value}),onFocus:g=>{s.current=g.currentTarget,d(u)}})})}function xs(e,t){const n=`${e.label} — row ${t+1}`;return D({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(B,{value:o,onChange:r,label:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function Ss(e){return{_gCards:C("Cards"),coverIndex:z("Cover image",i(yn,{}),bo,String(xo),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:Gr("Image background",Qo),cardImage:Li()}}function ys(){return{outline:z("Card outline",i(Tn,{}),ho,go),indexBadge:z("Card number",i(Xe,{}),fo,mo),showBadge:Si("Product badge",!0,i(Ze,{noun:"tag"}))}}function Cs(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...Y,label:se.find(a=>a.id===r).label}),o=r=>T(lo(Oe),n(r));return{_gShowOnCard:C("Show on a card"),[Oe]:T({type:"custom",render:()=>i(Pi,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(Oe)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const Oe="showCardPrice",se=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function Pi({rest:e}){const t=E(),n=Mr(),o=s=>typeof t[s]=="boolean"?t[s]:void 0,r=s=>o(s)??e[s],a=se.some(({id:s})=>o(s)!==void 0&&o(s)!==e[s]);return i(ke,{parts:se,changed:a,shown:r,onPress:(s,c)=>n({[s]:c}),onReset:()=>n(Object.fromEntries(se.map(({id:s})=>[s,void 0])))})}function ws(e,t="display"){const n=I(t);return{[t]:_("desktop",{type:"custom",render:({value:o,onChange:r})=>i(ke,{parts:e,changed:Wn(o),shown:a=>$n(o,a),onPress:(a,s)=>r(Vn(o,a,s)),onReset:()=>r(void 0)})}),[n]:_("mobile",{type:"custom",render:({value:o,onChange:r})=>i(Ai,{parts:e,desktopKey:t,value:o,onChange:r})})}}function ke({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:a,disabledReason:s}){const c=l("Display");return i(b,{label:c,icon:i(ln,{}),changed:t,action:i(S,{words:x()?.panel,label:c,changed:t,detail:a,onReset:r}),children:i(Un,{label:c,items:e.map(d=>({id:d.id,label:l(d.label),shown:n(d.id),...s?{disabled:!0,disabledReason:l(s)}:{}})),onChange:o})})}function Ai({parts:e,desktopKey:t,value:n,onChange:o}){const r=E()[t];return i(ke,{parts:e,changed:jn(n),shown:a=>Xn(r,n,a),onPress:(a,s)=>o(zn(n,a,s)),onReset:()=>o(uo),detail:l("the same as Desktop")})}function Li(){return Rt("Card image",{min:G,max:Me,step:Xt,hint:"Rounds the picture. The card's own corner is in Styles."})}function _s(){return Ie({sidesKey:"cornerSides",step:jt,useFollowed:()=>G,mark:i(Ni,{label:Vt}),hint:l("Rounds the picture. Left alone it stays square.")})}function Ni({label:e,changed:t=!1,onReset:n=()=>{}}){return i(S,{words:x()?.panel,label:l(e),changed:t,onReset:n})}function Rs(){return{type:"custom",render:({value:e,onChange:t})=>i(Hi,{value:typeof e=="string"?e:"",onChange:t})}}function Bi({layout:e,width:t}){return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:6,gridAutoFlow:"row dense",gap:2},children:Zt(e).map(([n,o],r)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${n}`,gridRow:`span ${o}`}},r))})}const Di={width:"3.5rem",height:"2.5rem"},vi=200;function Hi({value:e,onChange:t}){const[n,o]=W(null),[r,a]=W(4),s=J(null);Ht(()=>{const u=s.current;if(!u||typeof ResizeObserver!="function")return;const m=()=>a(u.getBoundingClientRect().width>=vi?4:3);m();const g=new ResizeObserver(m);return g.observe(u),()=>g.disconnect()},[]);const c=e&&e in Q?e:"",d=Ke(n,c),f=Ke(n,"").length,h=Jt("no-symbol"),p=[{value:"",label:l("Not chosen"),icon:h},...d.map(u=>({value:u,label:l(Q[u].label),icon:i(Bi,{layout:Q[u],width:40})}))];return i(b,{label:l("Layout"),icon:i(xn,{}),value:c?l(Q[c].label):void 0,children:i("div",{ref:s,style:{flex:"1 1 auto",minWidth:0},children:i(oo,{label:l("Layout"),value:c,emptyValue:"",options:p,onChange:t,columns:r,cell:Di,header:v("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:l("Photos in a row")}),i(Dn,{options:[{id:"all",label:l("All")},...Yt.map(u=>({id:String(u),label:String(u)}))],value:n===null?"all":String(n),ariaLabel:l("Photos in a row"),onChange:u=>o(u==="all"?null:Number(u))}),i("span",{className:"text-2xs text-ink-faint",children:l("{n} of {total} layouts",{n:f,total:qt.length})})]})})})})}export{Pr as BOUND_TO_POST,ga as BOUND_TO_POST_NOTE,Ra as BUCKET_ICONS,fs as CUSTOM_FIELD_MEDIA,hs as CoordsField,St as DESKTOP_GAP_NOT_OVERLAP,ke as DisplayRow,is as EDGE_ARROWS,to as FOCAL_DEFAULT,_i as FOCAL_POINTS,ue as FOLD_FIELD_MARKER,Ri as FocalPicker,Aa as GroupLabel,Ar as HIGHLIGHT_HINT,B as HidableTextField,De as LINK_FIELD_MARKER,ia as Label,ve as MEDIA_FIELD_MARKER,ds as MEDIA_TYPE_OPTIONS,ba as NOT_BOUND_TO_POST,Pa as PanelBand,Br as PanelNoteLine,ri as RowPropsContext,He as SCAFFOLD_FIELD_MARKER,Os as SCALAR_TEXT_CONTROLS,_r as SiteGapDefaultReset,q as Slider,vr as Swatches,Es as TEXT_CONTROL_KINDS,w as TEXT_FIELD_MARKER,gs as TICKER_ITEMS_ROW,Fi as TextListField,le as WIDTH_LABEL,kr as WidthDefaultReset,ki as aimAfterListChange,Za as anchorFields,N as backTo,La as backgroundField,Ma as boxBlockSpacingField,Wa as boxColumnsFields,os as boxFillField,oi as boxPhoneRowField,kt as boxShareField,Ka as boxSharePhoneField,Ua as boxShareTabletField,Ci as boxThemeIndexOf,Ea as bucketHeader,va as buttonWordsEntryField,ei as cardCornersField,Gr as cardImageBackgroundField,Li as cardImageField,Ss as cardMediaFields,Ga as cardShapeFields,Cs as cardShowFields,ys as cardStyleFields,Xa as cellWidthFields,ts as checkbox,ns as colorInput,aa as containerDirectionField,Rr as containerGapField,Tr as containerGapPhoneField,la as containerGapRows,Ir as containerGapTabletField,Ii as coordsResultTip,Ca as copyText,It as cornerSidesField,Ie as cornersRowField,Qa as date,Ja as dateTime,Oa as designGroupHeader,ws as displayFields,ls as edgePad,ms as focusAfterRemove,rs as focusKeptField,ka as foldMarker,pe as foldMetaOf,Dr as foldTitleOf,pi as followedHeightPatch,bi as followedStickPatch,Rs as galleryLayoutField,Ya as heightFields,ae as heightFollowedBy,sa as heroGroupPlacementPoints,Be as hidableText,Nr as hintIsWhileTyping,_s as imageCornersField,ma as inOwnBox,Ia as isBucketHeader,Tt as keptBy,wa as linkField,us as loadingShowsField,as as multiSelect,es as pageBackgroundField,Ta as panelNote,ai as phoneOverrideField,ya as plainText,_a as plainTextarea,Rt as pxField,Fa as quietMarker,Ne as readHidable,Ei as rowText,ss as searchSelect,Da as sectionBorderField,$r as sectionCornersField,Ba as sectionShapeFields,Na as sectionThemeFields,Oi as setRowText,$a as sizeField,cs as sourceField,ja as spacingFields,qa as stickFields,Va as swapPadding,Ha as templateField,xa as text,Ut as textFieldIdentifier,ua as textFieldOffPage,fa as textFieldPanelOnly,bs as textList,xs as textListRowField,Sa as textarea,Si as toggle,ps as upload,Mr as useSelectedPatch,E as useSelectedProps,P as useSelectedSibling,wr as useSiteGapDetail,za as widthField,ha as withIdentifier,da as withOffPage,pa as withPanelOnly,ca as withScaffold};
@@ -1 +1 @@
1
- "use client";import{jsx as y,Fragment as $,jsxs as k}from"react/jsx-runtime";import{useEffect as x,useMemo as w,useRef as E}from"react";import{EaselCanvas as D,repeatCopyAt as _}from"efficient-easel/easel";import W from"../../components/PreviewThemeFrame.js";import{OpenDocumentChromeLoadNotice as b}from"../../components/PinnedChromeLoadNotice.js";import{SiteRestoreNotice as F}from"../../components/SiteRestoreNotice.js";import{decodePartId as j,REPEAT_ATTRIBUTE as g,REPEAT_INDEX_ATTRIBUTE as T}from"efficient-easel/draw";import{usePreviewParts as B}from"efficient-easel/draw/client";import{cssString as v,partElement as A,partTypingTarget as M,setCanvasTypingPart as S}from"./canvas-typing.js";import{usePartTypingDeps as N}from"../../components/usePartTypingDeps.js";import{copyRowTarget as K,copyRowValue as H,writeCopyText as L}from"./card-copy-rows.js";import{partThemeColors as U,readInks as V}from"../../../format/lib/document/part-inks.js";import{PART_ATTR as f}from"../../../render/lib/document/text-parts.js";import{useBlockMetadata as q}from"../editor-block-metadata.js";import{usePreviewHeader as O,useSiteContentWidth as X}from"../../../render/components/PreviewHeaderContext.js";import{setEditorSiteContentWidth as R}from"../../../format/lib/document/editor-site-widths.js";import{siteWidthsMetadata as z}from"../../../format/lib/content/section-width.js";import{useEditorCanvasStyles as G}from"../editor-canvas-styles.js";function yt(o){const{mirrorHostStyles:s}=G(),a=q(),{sectionBackgroundWidth:i,themeFromDocument:u}=O(),t=X(),r=w(()=>({...o.metadata??a??{},...z(u?null:i,t)}),[o.metadata,a,i,t,u]);x(()=>(R(t),()=>R(null)),[t]);const e=E(null),m=J(e),{onDocument:c}=o,n=l=>{e.current=l,c?.(l)};return k($,{children:[y(F,{}),y(b,{}),y(D,{...o,onDocument:n,typing:m,metadata:r,height:"fill",mirrorStyles:s,frameWrapper:W})]})}function J(o){const s=N(),a=B(),i=E({parts:a});return i.current={parts:a},w(()=>{const u=(t,r)=>{let e=M(t,s),m,c=null;const n=r??(e?null:A(null,o.current,t)),l=!e&&n?_(n):null,p=l?j(t):null;if(l&&n&&p?.propKey){e=K({...l,nodeId:p.nodeId,key:p.propKey},s),m=p.propKey;const P=n.closest(`[${g}][${T}]`),I=`[${g}="${v(P?.getAttribute(g)??"")}"][${T}="${v(P?.getAttribute(T)??"")}"]`;c=()=>(n.ownerDocument??o.current)?.querySelector(I)??null}if(!e)return null;let d=n;const h=()=>(d=A(d,c?c():d?.ownerDocument??o.current,t),d),C=h();return C?{element:h,value:e.value,rules:e.rules,multiline:e.multiline,skip:e.skip,write:e.write,key:m,toolbar:{offered:e.offered,colors:e.offered.length>0?U(V(C)):void 0}}:null};return{at:t=>{const r=t.closest(`[${f}]`),e=r?.getAttribute(f);return r&&e?u(e,r):null},atSelection:()=>{const t=i.current.parts.selectedPartId;return t?u(t,null):null},onCopyText:t=>L(t,s),copyValue:t=>H(t,s),onChange:t=>{if(!t.typing){S(null);return}const r=t.element.closest(`[${f}]`)?.getAttribute(f)??null;S(r),r&&i.current.parts.selectedPartId!==r&&i.current.parts.select(r)}}},[s,o])}export{yt as SiteCanvas};
1
+ "use client";import{jsx as y,Fragment as $,jsxs as k}from"react/jsx-runtime";import{useEffect as x,useMemo as w,useRef as E}from"react";import{EaselCanvas as D,repeatCopyAt as _}from"efficient-easel/easel";import N from"../../components/PreviewThemeFrame.js";import{OpenDocumentChromeLoadNotice as W}from"../../components/PinnedChromeLoadNotice.js";import{SiteRestoreNotice as b}from"../../components/SiteRestoreNotice.js";import{decodePartId as F,REPEAT_ATTRIBUTE as g,REPEAT_INDEX_ATTRIBUTE as T}from"efficient-easel/draw";import{usePreviewParts as j}from"efficient-easel/draw/client";import{cssString as v,partElement as A,partTypingTarget as B,setCanvasTypingPart as S}from"./canvas-typing.js";import{usePartTypingDeps as M}from"../../components/usePartTypingDeps.js";import{copyRowTarget as K,copyRowValue as H,writeCopyText as L}from"./card-copy-rows.js";import{partColourName as O,partThemeColors as U,readInks as V}from"../../../format/lib/document/part-inks.js";import{PART_ATTR as f}from"../../../render/lib/document/text-parts.js";import{useBlockMetadata as q}from"../editor-block-metadata.js";import{usePreviewHeader as X,useSiteContentWidth as z}from"../../../render/components/PreviewHeaderContext.js";import{setEditorSiteContentWidth as R}from"../../../format/lib/document/editor-site-widths.js";import{siteWidthsMetadata as G}from"../../../format/lib/content/section-width.js";import{useEditorCanvasStyles as J}from"../editor-canvas-styles.js";function gt(o){const{mirrorHostStyles:s}=J(),l=q(),{sectionBackgroundWidth:i,themeFromDocument:u}=X(),t=z(),r=w(()=>({...o.metadata??l??{},...G(u?null:i,t)}),[o.metadata,l,i,t,u]);x(()=>(R(t),()=>R(null)),[t]);const e=E(null),c=Q(e),{onDocument:m}=o,n=a=>{e.current=a,m?.(a)};return k($,{children:[y(b,{}),y(W,{}),y(D,{...o,onDocument:n,typing:c,metadata:r,height:"fill",mirrorStyles:s,frameWrapper:N})]})}function Q(o){const s=M(),l=j(),i=E({parts:l});return i.current={parts:l},w(()=>{const u=(t,r)=>{let e=B(t,s),c,m=null;const n=r??(e?null:A(null,o.current,t)),a=!e&&n?_(n):null,p=a?F(t):null;if(a&&n&&p?.propKey){e=K({...a,nodeId:p.nodeId,key:p.propKey},s),c=p.propKey;const P=n.closest(`[${g}][${T}]`),I=`[${g}="${v(P?.getAttribute(g)??"")}"][${T}="${v(P?.getAttribute(T)??"")}"]`;m=()=>(n.ownerDocument??o.current)?.querySelector(I)??null}if(!e)return null;let d=n;const C=()=>(d=A(d,m?m():d?.ownerDocument??o.current,t),d),h=C();return h?{element:C,value:e.value,rules:e.rules,multiline:e.multiline,skip:e.skip,write:e.write,key:c,toolbar:{offered:e.offered,colors:e.offered.length>0?U(V(h)):void 0,colorNameOf:O}}:null};return{at:t=>{const r=t.closest(`[${f}]`),e=r?.getAttribute(f);return r&&e?u(e,r):null},atSelection:()=>{const t=i.current.parts.selectedPartId;return t?u(t,null):null},onCopyText:t=>L(t,s),copyValue:t=>H(t,s),onChange:t=>{if(!t.typing){S(null);return}const r=t.element.closest(`[${f}]`)?.getAttribute(f)??null;S(r),r&&i.current.parts.selectedPartId!==r&&i.current.parts.select(r)}}},[s,o])}export{gt as SiteCanvas};
@@ -1 +1 @@
1
- import o from"../../../components/PreviewPartAnchors.js";import{animationTabFields as r}from"../../animation/fields.js";import{BLOCK_THEME_FOLLOW_LABEL as e,SECTION_THEME_FOLLOW_LABEL as s}from"../../../components/SectionThemePicker.js";import{anchorFields as t,cardShapeFields as d,cellWidthFields as m,heightFields as l,sectionShapeFields as p,sectionThemeFields as F,spacingFields as a,stickFields as n,widthField as c}from"../controls.js";import{blockSizeFieldSet as S}from"efficient-easel/screen/lib/document/block-size-fields";import{rowSay as h,sidesPaddingFields as f}from"../box-fields.js";import{assignSectionGroups as E}from"../field-groups.js";import{boxGutterFields as L}from"../box-gutter-field.js";import{dropEmptyHeadings as O}from"../panel-drop-empty-headings.js";import{rowsShownForNode as _}from"../show-when-resolve.js";const H={spacingFields:a,sidesPaddingFields:f,sectionShapeFields:p,cardShapeFields:d,cellWidthFields:m,widthField:c,boxGutterFields:L,heightFields:l,anchorFields:t,stickFields:n,sectionThemeFields:F,animationTabFields:r,blockSizeFields:i=>S({...i,say:h}),assignSectionGroups:E,dropEmptyHeadings:O,rowsShownForNode:_,SECTION_THEME_FOLLOW_LABEL:s,BLOCK_THEME_FOLLOW_LABEL:e,PartAnchors:o};export{H as PASS_INSPECTOR};
1
+ import r from"../../../components/PreviewPartAnchors.js";import{animationTabFields as e}from"../../animation/fields.js";import{BLOCK_THEME_FOLLOW_LABEL as s,SECTION_THEME_FOLLOW_LABEL as t}from"../../../components/SectionThemePicker.js";import{anchorFields as m,cardShapeFields as d,cellWidthFields as p,heightFields as l,sectionShapeFields as F,sectionThemeFields as a,spacingFields as n,stickFields as S,widthField as c}from"../controls.js";import{blockSizeFieldSet as h}from"efficient-easel/screen/lib/document/block-size-fields";import{VIEW_KEY_ACCESS as E}from"efficient-easel/screen/lib/document/box-fields";import{rowSay as f,sidesPaddingFields as L}from"../box-fields.js";import{assignSectionGroups as _}from"../field-groups.js";import{boxGutterFields as O}from"../box-gutter-field.js";import{dropEmptyHeadings as A}from"../panel-drop-empty-headings.js";import{rowsShownForNode as P}from"../show-when-resolve.js";const N={spacingFields:n,sidesPaddingFields:L,sectionShapeFields:F,cardShapeFields:d,cellWidthFields:p,widthField:c,boxGutterFields:O,heightFields:l,anchorFields:m,stickFields:S,sectionThemeFields:a,animationTabFields:e,blockSizeFields:({tablet:i,...o}={})=>h({...o,say:f,...i?{phone:E}:{}}),assignSectionGroups:_,dropEmptyHeadings:A,rowsShownForNode:P,SECTION_THEME_FOLLOW_LABEL:t,BLOCK_THEME_FOLLOW_LABEL:s,PartAnchors:r};export{N as PASS_INSPECTOR};
@@ -15,7 +15,9 @@ export type BorderValue = {
15
15
  };
16
16
  export declare const SECTION_BORDER_CLASS = "sf-section-border";
17
17
  export declare const SECTION_BORDER_SELF_CLASS = "sf-section-border-self";
18
- export declare function borderVars(value: BorderValue | null | undefined, { phone }?: {
18
+ export declare function borderVars(value: BorderValue | null | undefined, { phone, tablet }?: {
19
19
  phone?: boolean;
20
+ tablet?: boolean;
20
21
  }): Record<string, string> | undefined;
21
- export declare function sectionBorderStyle(desktop: BorderValue | null | undefined, phone: BorderValue | null | undefined): CSSProperties | undefined;
22
+ export declare function borderBySide(value: BorderValue): BorderValue;
23
+ export declare function sectionBorderStyle(desktop: BorderValue | null | undefined, phone: BorderValue | null | undefined, tablet?: BorderValue | null): CSSProperties | undefined;
@@ -1 +1 @@
1
- const E=20,i=["solid","dashed","dotted"],c=["top","right","bottom","left"],R="sf-section-border",S="sf-section-border-self",p=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,d=t=>typeof t=="number"&&Number.isFinite(t)?`${Math.min(20,Math.max(0,Math.round(t)))}px`:void 0;function f(t,{phone:n=!1}={}){if(!t||typeof t!="object")return;const e=n?"-phone":"",o={};for(const r of c){const s=d(t[r])??d(t.width);s!==void 0&&(o[`--sf-border-${r}-width${e}`]=s)}return typeof t.style=="string"&&i.includes(t.style)&&(o[`--sf-border-style${e}`]=t.style),typeof t.color=="string"&&p.test(t.color)&&(o[`--sf-border-color${e}`]=t.color.toLowerCase()),Object.keys(o).length?o:void 0}function b(t,n){const e=f(t),o=f(n,{phone:!0});return e||o?{...e,...o}:void 0}export{E as BORDER_MAX,c as BORDER_SIDES,i as BORDER_STYLES,R as SECTION_BORDER_CLASS,S as SECTION_BORDER_SELF_CLASS,f as borderVars,b as sectionBorderStyle};
1
+ const b=20,p=["solid","dashed","dotted"],i=["top","right","bottom","left"],h="sf-section-border",E="sf-section-border-self",u=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,c=t=>typeof t=="number"&&Number.isFinite(t)?`${Math.min(20,Math.max(0,Math.round(t)))}px`:void 0;function s(t,{phone:n=!1,tablet:o=!1}={}){if(!t||typeof t!="object")return;const e=n?"-phone":o?"-tablet":"",r={};for(const f of i){const d=c(t[f])??c(t.width);d!==void 0&&(r[`--sf-border-${f}-width${e}`]=d)}return typeof t.style=="string"&&p.includes(t.style)&&(r[`--sf-border-style${e}`]=t.style),typeof t.color=="string"&&u.test(t.color)&&(r[`--sf-border-color${e}`]=t.color.toLowerCase()),Object.keys(r).length?r:void 0}function S(t){const{width:n,...o}=t;return typeof n!="number"?t:{...o,...Object.fromEntries(i.map(e=>[e,o[e]??n]))}}function y(t,n,o){const e=s(t),r=s(o,{tablet:!0}),f=s(o,{phone:!0})||s(n,{phone:!0})?{...s(o,{phone:!0}),...s(n,{phone:!0})}:void 0;return e||r||f?{...e,...r,...f}:void 0}export{b as BORDER_MAX,i as BORDER_SIDES,p as BORDER_STYLES,h as SECTION_BORDER_CLASS,E as SECTION_BORDER_SELF_CLASS,S as borderBySide,s as borderVars,y as sectionBorderStyle};
@@ -8,4 +8,4 @@ export declare function buttonIconChoice(icon: unknown, arrow: unknown): ButtonI
8
8
  export declare function buttonIconSide(value: unknown): ButtonIconSide;
9
9
  export declare function buttonIconAtEnd(side: unknown, width: unknown): boolean;
10
10
  export declare function buttonWidth(value: unknown): ButtonWidth;
11
- export declare function buttonWidthClass(desktop: unknown, phone: unknown): string;
11
+ export declare function buttonWidthClass(desktop: unknown, phone: unknown, tablet?: unknown): string;
@@ -1 +1 @@
1
- import{buttonArrowShown as f}from"./button-arrow.js";import{nonEmptyString as u}from"../non-empty-string.js";const c=["none","arrow-right","arrow-long-right","arrow-up-right","chevron-right","external","cart","bag","tag","email","location","play","download","search","car"];function l(t){return typeof t=="string"&&c.includes(t)?t:void 0}function w(t,o){return l(t)??(f(o)?"arrow-right":"none")}function d(t){return t==="before"?"before":t==="end"?"end":"after"}function h(t,o){return d(t)==="end"&&n(o)==="fill"}function n(t){return t==="fill"||t==="fixed"?"fill":"fit"}function s(t,o){const r=n(t),e=r==="fill"?["w-full"]:[];if(u(o)){const i=n(o);i!==r&&e.push(i==="fill"?"max-view-wide:w-full":"max-view-wide:w-auto")}return e.join(" ")}export{c as BUTTON_ICONS,h as buttonIconAtEnd,w as buttonIconChoice,d as buttonIconSide,n as buttonWidth,s as buttonWidthClass,l as storedButtonIcon};
1
+ import{buttonArrowShown as w}from"./button-arrow.js";import{nonEmptyString as i}from"../non-empty-string.js";const a=["none","arrow-right","arrow-long-right","arrow-up-right","chevron-right","external","cart","bag","tag","email","location","play","download","search","car"];function c(t){return typeof t=="string"&&a.includes(t)?t:void 0}function x(t,o){return c(t)??(w(o)?"arrow-right":"none")}function d(t){return t==="before"?"before":t==="end"?"end":"after"}function b(t,o){return d(t)==="end"&&e(o)==="fill"}function e(t){return t==="fill"||t==="fixed"?"fill":"fit"}function m(t,o,l){const r=e(t);if(i(l)){const n=e(l),u=i(o)?e(o):n;return[r==="fill"?"view-desktop:w-full":"view-desktop:w-auto",n==="fill"?"view-tablet:max-view-desktop:w-full":"view-tablet:max-view-desktop:w-auto",u==="fill"?"max-view-tablet:w-full":"max-view-tablet:w-auto"].join(" ")}const f=r==="fill"?["w-full"]:[];if(i(o)){const n=e(o);n!==r&&f.push(n==="fill"?"max-view-wide:w-full":"max-view-wide:w-auto")}return f.join(" ")}export{a as BUTTON_ICONS,b as buttonIconAtEnd,x as buttonIconChoice,d as buttonIconSide,e as buttonWidth,m as buttonWidthClass,c as storedButtonIcon};
@@ -0,0 +1,8 @@
1
+ declare const CARD_ROW_STATES: readonly ["selected", "highlighted"];
2
+ type CardRowStateName = (typeof CARD_ROW_STATES)[number];
3
+ export type CardRowState = Readonly<Partial<Record<CardRowStateName, boolean>>>;
4
+ export declare const CARD_STATE_ATTR = "data-sf-card-state";
5
+ export declare const CARD_STATE_LINE_CLASS = "pointer-events-none absolute inset-0 border border-accent";
6
+ export declare function cardStateValue(state: CardRowState | undefined | null): string;
7
+ export declare function cardStateAttrs(state: CardRowState | undefined | null): Record<string, string>;
8
+ export {};
@@ -0,0 +1 @@
1
+ const r=["selected","highlighted"],n="data-sf-card-state",a="pointer-events-none absolute inset-0 border border-accent";function o(t){return t?r.filter(e=>t[e]===!0).join(" "):""}function c(t){const e=o(t);return e?{[n]:e,className:"relative"}:{}}export{n as CARD_STATE_ATTR,a as CARD_STATE_LINE_CLASS,c as cardStateAttrs,o as cardStateValue};
@@ -1,8 +1,15 @@
1
- export declare const SECTION_BG_SWATCHES: readonly ["transparent", "var(--section-bg)", "var(--surface)", "var(--surface-2)"];
2
- export declare const SECTION_BG_SWATCH_NAMES: Readonly<Record<string, string>>;
3
1
  export declare const THEME_SECTION_BG = "var(--section-bg)";
4
2
  export declare const SECTION_BG_INHERIT: "inherit";
5
3
  export type SectionBackground = string | undefined;
6
4
  export declare function resolveSectionBackground(stored: SectionBackground, builtIn: SectionBackground): SectionBackground;
7
5
  export declare function paintedFill(stored: string): string;
8
- export declare function isSectionBackgroundInheriting(stored: SectionBackground, builtIn: SectionBackground): boolean;
6
+ export interface SectionBandColours {
7
+ background: string;
8
+ surface: string;
9
+ surface2: string;
10
+ band: string;
11
+ }
12
+ export declare function sectionBackgroundHex(stored: SectionBackground, builtIn: SectionBackground, colours: SectionBandColours): string;
13
+ export declare const SECTION_BG_NO_FILL: "transparent";
14
+ export declare function sectionBackgroundChoice(stored: SectionBackground, builtIn: SectionBackground): "none" | "band" | null;
15
+ export declare function isSectionBackgroundEmpty(stored: SectionBackground, builtIn: SectionBackground, follows?: SectionBackground): boolean;
@@ -1 +1 @@
1
- const i=["transparent","var(--section-bg)","var(--surface)","var(--surface-2)"],o={transparent:"No fill","var(--section-bg)":"Section band","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},e="var(--section-bg)",t="inherit";function s(r,n){return r===t?e:r===void 0?n:c(r)}const a=/var\(\s*--(surface-2|surface|line)\s*(?=[,)])/g;function c(r){return r.replace(a,"var(--site-$1")}function u(r,n){return r===t?!0:r===void 0&&n===e}export{t as SECTION_BG_INHERIT,i as SECTION_BG_SWATCHES,o as SECTION_BG_SWATCH_NAMES,e as THEME_SECTION_BG,u as isSectionBackgroundInheriting,c as paintedFill,s as resolveSectionBackground};
1
+ import{parseHexColor as u}from"efficient-shell/format";const i="var(--section-bg)",f="inherit";function c(n,t){return n===f?i:n===void 0?t:E(n)}const p=/var\(\s*--(surface-2|surface|line)\s*(?=[,)])/g;function E(n){return n.replace(p,"var(--site-$1")}const d={"var(--section-bg)":"band","var(--site-surface)":"surface","var(--site-surface-2)":"surface2"};function _(n,t,r){const e=c(n,t);if(!e||e==="transparent")return r.background.toLowerCase();const o=e.trim(),a=o.startsWith("#")?u(o):null;if(a)return a.toLowerCase();const s=d[o.replace(/\s+/g,"")];return(s?r[s]:r.background).toLowerCase()}const x="transparent";function l(n,t){const r=c(n,t);return!r||r===x?"none":r===i?"band":null}function C(n,t,r=t){const e=a=>!a||a==="transparent",o=c(n,t);return o===r||e(o)&&e(r)}export{f as SECTION_BG_INHERIT,x as SECTION_BG_NO_FILL,i as THEME_SECTION_BG,C as isSectionBackgroundEmpty,E as paintedFill,c as resolveSectionBackground,l as sectionBackgroundChoice,_ as sectionBackgroundHex};
@@ -54,7 +54,23 @@ export declare function resolvePhoneHeight(props: SectionMinHeightPhoneProps): {
54
54
  value: number;
55
55
  unit: SectionHeightUnit;
56
56
  };
57
- export declare function sectionMinHeightAttrs(props: SectionMinHeightProps & SectionMinHeightPhoneProps): {
57
+ export declare const SECTION_MIN_HEIGHT_TABLET_CLASS = "sf-section-minh-tablet";
58
+ export declare const SECTION_MIN_HEIGHT_TABLET_VARS: {
59
+ readonly base: "--sf-section-minh-t";
60
+ readonly small: "--sf-section-minh-ts";
61
+ };
62
+ export interface SectionMinHeightTabletProps {
63
+ sectionHeightModeTablet?: unknown;
64
+ sectionHeightValueTablet?: unknown;
65
+ sectionHeightUnitTablet?: unknown;
66
+ }
67
+ export declare function hasTabletHeight(props: SectionMinHeightTabletProps): boolean;
68
+ export declare function resolveTabletHeight(props: SectionMinHeightTabletProps): {
69
+ mode: SectionHeightMode;
70
+ value: number;
71
+ unit: SectionHeightUnit;
72
+ };
73
+ export declare function sectionMinHeightAttrs(props: SectionMinHeightProps & SectionMinHeightTabletProps & SectionMinHeightPhoneProps): {
58
74
  className: string;
59
75
  style: CSSProperties;
60
76
  } | null;
@@ -1 +1 @@
1
- const I=["auto","fixed","screen"],f=["px","%"],M="svh",P="vh",E="var(--sf-header-h, 88px)",S={min:40,max:2e3,step:10,fallback:600},g={min:10,max:200,step:5,fallback:100},x="sf-section-minh",s="grid-cols-[minmax(0,1fr)]",l={base:"--sf-section-minh",small:"--sf-section-minh-s"},h=e=>typeof e=="string"&&I.includes(e),T=e=>typeof e=="string"&&f.includes(e);function H(e){const t=h(e.sectionHeightMode)?e.sectionHeightMode:"auto",n=t==="screen"?"%":T(e.sectionHeightUnit)?e.sectionHeightUnit:"px",o=t==="screen"?g.fallback:S.fallback,i=typeof e.sectionHeightValue=="number"?e.sectionHeightValue:o;return{mode:t,value:i,unit:n}}function a(e){const{mode:t,value:n,unit:o}=H(e);if(t==="auto")return;if(t==="fixed"&&o==="px")return[`${n}px`,null];const i=n/100,c=r=>t==="screen"?`(100${r} - ${E})`:`100${r}`;return[`calc(${c("vh")} * ${i})`,`calc(${c("svh")} * ${i})`]}function _(e){const t=a(e);if(!t)return;const[n,o]=t;return{display:"grid",[l.base]:n,...o?{[l.small]:o}:{}}}const p=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),A="Height",N="sf-section-minh-phone",u={base:"--sf-section-minh-p",small:"--sf-section-minh-ps"};function d(e){return h(e.sectionHeightModePhone)}function U(e){return H({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})}function C(e){const t=_(e),n=d(e)?a({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})??(t?["auto",null]:void 0):void 0;if(!t&&!n)return null;const o=[x,s],i={...t??{}};return n&&(o.push(N),i[u.base]=n[0],n[1]&&(i[u.small]=n[1])),{className:o.join(" "),style:i}}function O(e){return C(e)!==null}const m=`grid ${s}`,b="h-full",L=`max-view-tablet:grid ${s}`;function V(e){return O(e)?_(e)?m:L:""}export{E as HEADER_HEIGHT_VAR,b as SECTION_FILL_CLASS,m as SECTION_FILL_PASS_CLASS,L as SECTION_FILL_PASS_PHONE_CLASS,s as SECTION_GRID_COLUMN_CLASS,I as SECTION_HEIGHT_MODES,f as SECTION_HEIGHT_UNITS,S as SECTION_MIN_HEIGHT,x as SECTION_MIN_HEIGHT_CLASS,p as SECTION_MIN_HEIGHT_EXCLUDED,A as SECTION_MIN_HEIGHT_GROUP_LABEL,N as SECTION_MIN_HEIGHT_PHONE_CLASS,u as SECTION_MIN_HEIGHT_PHONE_VARS,l as SECTION_MIN_HEIGHT_VARS,g as SECTION_SCREEN_PCT,M as VIEWPORT_UNIT,P as VIEWPORT_UNIT_FALLBACK,d as hasPhoneHeight,U as resolvePhoneHeight,H as resolveSectionMinHeight,V as sectionFillPassClass,O as sectionFillsHeight,C as sectionMinHeightAttrs,a as sectionMinHeightLengths,_ as sectionMinHeightStyle};
1
+ const N=["auto","fixed","screen"],C=["px","%"],p="svh",R="vh",b="var(--sf-header-h, 88px)",m={min:40,max:2e3,step:10,fallback:600},L={min:10,max:200,step:5,fallback:100},M="sf-section-minh",l="grid-cols-[minmax(0,1fr)]",h={base:"--sf-section-minh",small:"--sf-section-minh-s"},a=e=>typeof e=="string"&&N.includes(e),O=e=>typeof e=="string"&&C.includes(e);function r(e){const t=a(e.sectionHeightMode)?e.sectionHeightMode:"auto",i=t==="screen"?"%":O(e.sectionHeightUnit)?e.sectionHeightUnit:"px",n=t==="screen"?L.fallback:m.fallback,o=typeof e.sectionHeightValue=="number"?e.sectionHeightValue:n;return{mode:t,value:o,unit:i}}function H(e){const{mode:t,value:i,unit:n}=r(e);if(t==="auto")return;if(t==="fixed"&&n==="px")return[`${i}px`,null];const o=i/100,c=s=>t==="screen"?`(100${s} - ${b})`:`100${s}`;return[`calc(${c("vh")} * ${o})`,`calc(${c("svh")} * ${o})`]}function _(e){const t=H(e);if(!t)return;const[i,n]=t;return{display:"grid",[h.base]:i,...n?{[h.small]:n}:{}}}const $=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),v="Height",u="sf-section-minh-phone",I={base:"--sf-section-minh-p",small:"--sf-section-minh-ps"};function A(e){return a(e.sectionHeightModePhone)}function B(e){return r({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})}const T="sf-section-minh-tablet",f={base:"--sf-section-minh-t",small:"--sf-section-minh-ts"};function P(e){return a(e.sectionHeightModeTablet)}function F(e){return r({sectionHeightMode:e.sectionHeightModeTablet,sectionHeightValue:e.sectionHeightValueTablet,sectionHeightUnit:e.sectionHeightUnitTablet})}function g(e){const t=_(e),i=(E,x,d)=>H({sectionHeightMode:E,sectionHeightValue:x,sectionHeightUnit:d})??(t?["auto",null]:void 0),n=P(e)?i(e.sectionHeightModeTablet,e.sectionHeightValueTablet,e.sectionHeightUnitTablet):void 0,o=A(e)?i(e.sectionHeightModePhone,e.sectionHeightValuePhone,e.sectionHeightUnitPhone):n;if(!t&&!n&&!o)return null;const c=[M,l],s={...t??{}};return n&&(c.push(T),s[f.base]=n[0],n[1]&&(s[f.small]=n[1])),o&&(c.push(u),s[I.base]=o[0],o[1]&&(s[I.small]=o[1])),{className:c.join(" "),style:s}}function y(e){return g(e)!==null}const U=`grid ${l}`,D="h-full",V="view-tablet:max-view-desktop:grid",S="max-view-tablet:grid",G=`${S} ${l}`;function k(e){const t=g(e);if(!t)return"";if(_(e))return U;const i=t.className.split(" ");if(!i.includes(T))return G;const o=i.includes(u);return[V,o?S:"",l].filter(Boolean).join(" ")}export{b as HEADER_HEIGHT_VAR,D as SECTION_FILL_CLASS,U as SECTION_FILL_PASS_CLASS,G as SECTION_FILL_PASS_PHONE_CLASS,l as SECTION_GRID_COLUMN_CLASS,N as SECTION_HEIGHT_MODES,C as SECTION_HEIGHT_UNITS,m as SECTION_MIN_HEIGHT,M as SECTION_MIN_HEIGHT_CLASS,$ as SECTION_MIN_HEIGHT_EXCLUDED,v as SECTION_MIN_HEIGHT_GROUP_LABEL,u as SECTION_MIN_HEIGHT_PHONE_CLASS,I as SECTION_MIN_HEIGHT_PHONE_VARS,T as SECTION_MIN_HEIGHT_TABLET_CLASS,f as SECTION_MIN_HEIGHT_TABLET_VARS,h as SECTION_MIN_HEIGHT_VARS,L as SECTION_SCREEN_PCT,p as VIEWPORT_UNIT,R as VIEWPORT_UNIT_FALLBACK,A as hasPhoneHeight,P as hasTabletHeight,B as resolvePhoneHeight,r as resolveSectionMinHeight,F as resolveTabletHeight,k as sectionFillPassClass,y as sectionFillsHeight,g as sectionMinHeightAttrs,H as sectionMinHeightLengths,_ as sectionMinHeightStyle};
@@ -8,23 +8,32 @@ export declare const SECTION_STICK_DISTANCE: {
8
8
  };
9
9
  export declare const SECTION_STICK_CLASS = "sf-section-stick";
10
10
  export declare const SCROLL_OVER_CLASS = "sf-scroll-over";
11
+ export declare const SECTION_STICK_TABLET_ON_CLASS = "sf-section-stick-tablet-on";
12
+ export declare const SECTION_STICK_TABLET_OFF_CLASS = "sf-section-stick-tablet-off";
11
13
  export declare const SECTION_STICK_PHONE_ON_CLASS = "sf-section-stick-phone-on";
12
14
  export declare const SECTION_STICK_PHONE_OFF_CLASS = "sf-section-stick-phone-off";
13
15
  export declare const SECTION_STICK_VARS: {
14
16
  readonly desktop: "--sf-stick-distance";
17
+ readonly tablet: "--sf-stick-distance-tablet";
15
18
  readonly phone: "--sf-stick-distance-phone";
16
19
  };
17
20
  export declare const SECTION_STICK_EXCLUDED: ReadonlySet<string>;
18
21
  export type SectionStickProps = {
19
22
  stickTop?: unknown;
20
23
  stickTopDistance?: unknown;
24
+ stickTopTablet?: unknown;
25
+ stickTopDistanceTablet?: unknown;
21
26
  stickTopPhone?: unknown;
22
27
  stickTopDistancePhone?: unknown;
23
28
  };
29
+ export declare function hasTabletStick(props: SectionStickProps): boolean;
24
30
  export declare function hasPhoneStick(props: SectionStickProps): boolean;
25
31
  export declare function resolveSectionStick(props: SectionStickProps): {
26
32
  desktop: boolean;
27
33
  desktopDistance: number;
34
+ tablet: boolean;
35
+ tabletDistance: number;
36
+ ownTablet: boolean;
28
37
  phone: boolean;
29
38
  phoneDistance: number;
30
39
  ownPhone: boolean;
@@ -1 +1 @@
1
- import{finiteNumber as r}from"../finite-number.js";const _="Stick to top",s={min:0,max:200,step:4,fallback:0},a="sf-section-stick",u="sf-scroll-over",k="sf-section-stick-phone-on",f="sf-section-stick-phone-off",c={desktop:"--sf-stick-distance",phone:"--sf-stick-distance-phone"},x=new Set(["CategoryBar","DocTabs","IntroBleed","Contents"]);function i(o){const t=r(o)??s.fallback;return Math.min(s.max,Math.max(s.min,Math.round(t)))}function h(o){return typeof o.stickTopPhone=="boolean"}function C(o){const t=o.stickTop===!0,n=i(o.stickTopDistance),e=h(o),p=e?o.stickTopPhone===!0:t,S=e?i(o.stickTopDistancePhone):n;return{desktop:t,desktopDistance:n,phone:p,phoneDistance:S,ownPhone:e}}function I(o){const t=C(o);if(!t.desktop&&!t.phone)return null;const n=[a],e={};return t.desktop&&(e[c.desktop]=`${t.desktopDistance}px`),(t.ownPhone||t.phone!==t.desktop)&&(n.push(t.phone?k:f),t.phone&&(e[c.phone]=`${t.phoneDistance}px`)),t.desktop||n.push("sf-section-stick-desktop-off"),{className:n.join(" "),style:e}}export{u as SCROLL_OVER_CLASS,a as SECTION_STICK_CLASS,s as SECTION_STICK_DISTANCE,x as SECTION_STICK_EXCLUDED,_ as SECTION_STICK_LABEL,f as SECTION_STICK_PHONE_OFF_CLASS,k as SECTION_STICK_PHONE_ON_CLASS,c as SECTION_STICK_VARS,h as hasPhoneStick,C as resolveSectionStick,I as sectionStickAttrs};
1
+ import{finiteNumber as k}from"../finite-number.js";const E="Stick to top",c={min:0,max:200,step:4,fallback:0},l="sf-section-stick",O="sf-scroll-over",r="sf-section-stick-tablet-on",C="sf-section-stick-tablet-off",_="sf-section-stick-phone-on",h="sf-section-stick-phone-off",i={desktop:"--sf-stick-distance",tablet:"--sf-stick-distance-tablet",phone:"--sf-stick-distance-phone"},d=new Set(["CategoryBar","DocTabs","IntroBleed","Contents"]);function a(e){const t=k(e)??c.fallback;return Math.min(c.max,Math.max(c.min,Math.round(t)))}function b(e){return typeof e.stickTopTablet=="boolean"}function u(e){return typeof e.stickTopPhone=="boolean"}function x(e){const t=e.stickTop===!0,n=a(e.stickTopDistance),o=b(e),p=o?e.stickTopTablet===!0:t,S=o?a(e.stickTopDistanceTablet):n,s=u(e),T=s?e.stickTopPhone===!0:p,f=s?a(e.stickTopDistancePhone):S;return{desktop:t,desktopDistance:n,tablet:p,tabletDistance:S,ownTablet:o,phone:T,phoneDistance:f,ownPhone:s}}function N(e){const t=x(e);if(!t.desktop&&!t.tablet&&!t.phone)return null;const n=[l],o={};return t.desktop&&(o[i.desktop]=`${t.desktopDistance}px`),t.ownTablet&&(n.push(t.tablet?r:C),t.tablet&&(o[i.tablet]=`${t.tabletDistance}px`)),(t.ownPhone||t.ownTablet||t.phone!==t.desktop)&&(n.push(t.phone?_:h),t.phone&&(o[i.phone]=`${t.phoneDistance}px`)),t.desktop||n.push("sf-section-stick-desktop-off"),{className:n.join(" "),style:o}}export{O as SCROLL_OVER_CLASS,l as SECTION_STICK_CLASS,c as SECTION_STICK_DISTANCE,d as SECTION_STICK_EXCLUDED,E as SECTION_STICK_LABEL,h as SECTION_STICK_PHONE_OFF_CLASS,_ as SECTION_STICK_PHONE_ON_CLASS,C as SECTION_STICK_TABLET_OFF_CLASS,r as SECTION_STICK_TABLET_ON_CLASS,i as SECTION_STICK_VARS,u as hasPhoneStick,b as hasTabletStick,x as resolveSectionStick,N as sectionStickAttrs};
@@ -1,4 +1,4 @@
1
1
  import type { ScreenSlot } from "efficient-easel/screen/lib/screen-parts";
2
2
  export declare function cardTemplateSlotsOf(node: {
3
3
  type: string;
4
- }): ReadonlyArray<ScreenSlot> | null;
4
+ }, shown?: readonly string[]): ReadonlyArray<ScreenSlot> | null;
@@ -1 +1 @@
1
- import{CARD_TEMPLATE_LABEL as t,CARD_TEMPLATE_SLOT as e,hasCardTemplate as l}from"../content/card-template.js";import{say as o}from"../editor-words.js";function m(r){return l(r.type)?[{slot:e,label:o(t),rung:!0}]:null}export{m as cardTemplateSlotsOf};
1
+ import{CARD_TEMPLATE_LABEL as l,CARD_TEMPLATE_SLOT as e,hasCardTemplate as m}from"../content/card-template.js";import{say as n}from"../editor-words.js";function T(a,t=[e]){return m(a.type)?t.map(r=>r===e?{slot:r,label:n(l),rung:!0}:{slot:r,label:r,rung:!1}):null}export{T as cardTemplateSlotsOf};
@@ -1,11 +1,6 @@
1
1
  import type { CopyThemeColor } from "efficient-easel/copy";
2
- import { type WordStyleColour } from "../word-styles.js";
3
- export type PartInk = {
4
- key: WordStyleColour;
5
- name: string;
6
- value: string;
7
- };
8
- export declare function partInks(read?: Partial<Record<WordStyleColour, string>> | null): PartInk[];
9
- export declare function partThemeColors(read?: Partial<Record<WordStyleColour, string>> | null): CopyThemeColor[];
10
- export declare function readInks(element: HTMLElement): Partial<Record<WordStyleColour, string>>;
11
- export declare function toHex(css: string): string | null;
2
+ import { type ColorSlot } from "efficient-shell/markup";
3
+ export declare function partColourName(value: string): string;
4
+ export declare function partInkCss(value: string | undefined): string;
5
+ export declare function partThemeColors(read?: Partial<Record<ColorSlot, string>> | null): CopyThemeColor[];
6
+ export declare function readInks(element: HTMLElement): Partial<Record<ColorSlot, string>>;
@@ -1 +1 @@
1
- import{parseHexColor as f}from"efficient-shell/format";import{say as p}from"../editor-words.js";import{COLOUR_TOKEN as S,WORD_STYLE_COLOURS as c,WORD_STYLE_COLOUR_LABELS as d}from"../word-styles.js";const x="#9ca3af";function O(e){return c.map(t=>({key:t,name:d[t],value:e?.[t]||x}))}function g(e){return O(e).map(t=>({name:t.key,label:p(t.name),value:t.value}))}function v(e){const t={},r=e.ownerDocument,o=r?.defaultView;if(!r||!o)return t;const m=o.getComputedStyle(e),n=r.createElement("canvas").getContext("2d");for(const s of c){const u=S[s].replace(/^var\((--[\w-]+)\)$/,"$1"),i=m.getPropertyValue(u).trim();if(!i)continue;let a=l(i);!a&&n&&(n.fillStyle="#000000",n.fillStyle=i,a=l(String(n.fillStyle))),a&&(t[s]=a)}return t}function l(e){const t=e.trim().toLowerCase();if(t.startsWith("#"))return f(t);const r=t.match(/^rgba?\(\s*(\d+)[\s,]+(\d+)[\s,]+(\d+)/);return r?`#${r.slice(1,4).map(o=>Math.min(255,Number(o)).toString(16).padStart(2,"0")).join("")}`:null}export{O as partInks,g as partThemeColors,v as readInks,l as toHex};
1
+ import{parseHexColor as m}from"efficient-shell/format";import{COLOR_SLOTS as u,colorRole as S}from"efficient-shell/markup";import{say as g}from"../editor-words.js";import{COLOUR_TOKEN as i}from"../word-styles.js";const l={main:i.accent,text:i.text,background:"var(--bg)",muted:i.labels},C={main:"Main",text:"Text",background:"Background",muted:"Muted"},f={accent:"main",labels:"muted"};function N(t){return Object.hasOwn(f,t)?f[t]:t}function h(t){if(!t)return"";if(t.startsWith("#"))return m(t)===t.toLowerCase()?t:"";const o=S(N(t));return o?.kind==="slot"?l[o.slot]:""}const O="#9ca3af";function k(t){return u.map(o=>({name:o,label:g(C[o]),value:t?.[o]||O}))}function y(t){const o={},r=t.ownerDocument,e=r?.defaultView;if(!r||!e)return o;const d=e.getComputedStyle(t),n=r.createElement("canvas").getContext("2d");for(const a of u){const x=l[a].replace(/^var\((--[\w-]+)\)$/,"$1"),s=d.getPropertyValue(x).trim();if(!s)continue;let c=p(s);!c&&n&&(n.fillStyle="#000000",n.fillStyle=s,c=p(String(n.fillStyle))),c&&(o[a]=c)}return o}function p(t){const o=t.trim().toLowerCase();if(o.startsWith("#"))return m(o);const r=o.match(/^rgba?\(\s*(\d+)[\s,]+(\d+)[\s,]+(\d+)/);return r?`#${r.slice(1,4).map(e=>Math.min(255,Number(e)).toString(16).padStart(2,"0")).join("")}`:null}export{N as partColourName,h as partInkCss,k as partThemeColors,y as readInks};
@@ -48,6 +48,7 @@ export type PassInspector = {
48
48
  animationTabFields: (kind: AnimationTabKind, blockKey?: string) => FieldMap;
49
49
  blockSizeFields: (opts?: {
50
50
  textFit?: TextFit;
51
+ tablet?: boolean;
51
52
  }) => {
52
53
  size: FieldMap;
53
54
  text: FieldMap;
@@ -1,4 +1,4 @@
1
- import { type ShowWhenFacts } from "efficient-shell/format";
1
+ import { type ShowWhenFacts, type ShowWhenRule } from "efficient-shell/format";
2
2
  export { showWhenOf, shownForOption, truthy, withRowRules, withRowsShownWhen, withShowWhen, } from "efficient-shell/format";
3
3
  export type { RowRule, ShowWhenFactData, ShowWhenRule, WithShowWhen } from "efficient-shell/format";
4
4
  export type ShowWhenFactParams = {
@@ -10,3 +10,4 @@ export type ShowWhenFactParams = {
10
10
  };
11
11
  export type BlockShowWhenFacts = ShowWhenFacts<ShowWhenFactParams>;
12
12
  export declare const addShowWhenFacts: (block: object, facts: BlockShowWhenFacts) => void;
13
+ export declare function shownByUsedValue(keys: readonly string[], stores: (key: string) => ShowWhenRule, shown: (key: string) => ShowWhenRule): ShowWhenRule;
@@ -1 +1 @@
1
- import{addShowWhenFacts as o}from"efficient-shell/format";import{showWhenOf as s,shownForOption as e,truthy as a,withRowRules as r,withRowsShownWhen as d,withShowWhen as i}from"efficient-shell/format";const t=o;export{t as addShowWhenFacts,s as showWhenOf,e as shownForOption,a as truthy,r as withRowRules,d as withRowsShownWhen,i as withShowWhen};
1
+ import{addShowWhenFacts as e}from"efficient-shell/format";import{showWhenOf as c,shownForOption as s,truthy as u,withRowRules as p,withRowsShownWhen as W,withShowWhen as f}from"efficient-shell/format";const r=e;function d(o,h,n){return o.slice(0,-1).reduceRight((a,t)=>({any:[{all:[h(t),n(t)]},{all:[{not:h(t)},a]}]}),n(o[o.length-1]))}export{r as addShowWhenFacts,c as showWhenOf,d as shownByUsedValue,s as shownForOption,u as truthy,p as withRowRules,W as withRowsShownWhen,f as withShowWhen};
@@ -124,7 +124,6 @@ export declare const WEB_BUILDER_WORDS: {
124
124
  readonly Animation: "Animation";
125
125
  readonly "Another group already uses this heading \u2014 pick a different one.": "Another group already uses this heading — pick a different one.";
126
126
  readonly Answer: "Answer";
127
- readonly "Any color": "Any color";
128
127
  readonly App: "App";
129
128
  readonly "App chips": "App chips";
130
129
  readonly "App name": "App name";
@@ -489,7 +488,6 @@ export declare const WEB_BUILDER_WORDS: {
489
488
  readonly "Follows Styles \u25B8 Basics \u25B8 Corners until you set a number here.": "Follows Styles ▸ Basics ▸ Corners until you set a number here.";
490
489
  readonly "Follows the section's Corners until you set a number here.": "Follows the section's Corners until you set a number here.";
491
490
  readonly "Follows the site": "Follows the site";
492
- readonly "Follows the style": "Follows the style";
493
491
  readonly "Footer Box": "Footer Box";
494
492
  readonly Footnote: "Footnote";
495
493
  readonly Form: "Form";
@@ -726,7 +724,6 @@ export declare const WEB_BUILDER_WORDS: {
726
724
  readonly "Milestone title.": "Milestone title.";
727
725
  readonly Milestones: "Milestones";
728
726
  readonly "Mirror cards": "Mirror cards";
729
- readonly Mixed: "Mixed";
730
727
  readonly "Mockup Card": "Mockup Card";
731
728
  readonly "Mockup card": "Mockup card";
732
729
  readonly "Mockup position": "Mockup position";