efficient-web-builder 17.1.0 → 18.1.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 (60) hide show
  1. package/CHANGELOG.md +81 -17
  2. package/dist/components/Banner.js +1 -1
  3. package/dist/components/FAQ.js +1 -1
  4. package/dist/components/Flex.js +1 -1
  5. package/dist/components/HeroPoster.js +1 -1
  6. package/dist/components/HeroSection.js +1 -1
  7. package/dist/components/HeroSingle.js +1 -1
  8. package/dist/components/HeroSlide.js +1 -1
  9. package/dist/components/ImageBlock.js +1 -1
  10. package/dist/components/Logos.js +1 -1
  11. package/dist/components/PartSettingsPanel.js +1 -1
  12. package/dist/components/PaymentBadges.js +1 -1
  13. package/dist/components/Placeholder.js +1 -1
  14. package/dist/components/RMark.js +1 -1
  15. package/dist/components/SectionHeader.js +1 -1
  16. package/dist/components/SiteAccentField.d.ts +28 -0
  17. package/dist/components/SiteAccentField.js +1 -0
  18. package/dist/components/SiteTextStylesField.d.ts +17 -0
  19. package/dist/components/SiteTextStylesField.js +1 -0
  20. package/dist/components/SlotChildRows.js +1 -1
  21. package/dist/components/StorefrontEditor.js +1 -1
  22. package/dist/components/UpdateStyleDialog.d.ts +5 -0
  23. package/dist/components/UpdateStyleDialog.js +1 -0
  24. package/dist/components/WebsiteSettingsPanel.js +1 -1
  25. package/dist/components/storefront-editor.css +13 -3
  26. package/dist/lib/content/section-sticky.d.ts +34 -0
  27. package/dist/lib/content/section-sticky.js +1 -0
  28. package/dist/lib/editor-words-catalogue.d.ts +6 -28
  29. package/dist/lib/editor-words-catalogue.js +5 -5
  30. package/dist/lib/fit-words.js +6 -1
  31. package/dist/lib/puck/blocks/general/CategoryBar/fields.js +1 -1
  32. package/dist/lib/puck/blocks/general/IntroBleed/fields.js +1 -1
  33. package/dist/lib/puck/controls.d.ts +1 -0
  34. package/dist/lib/puck/controls.js +1 -1
  35. package/dist/lib/puck/field-groups.js +1 -1
  36. package/dist/lib/puck/overrides.js +1 -1
  37. package/dist/lib/puck/page-root.js +2 -1
  38. package/dist/lib/puck/part-inks.d.ts +2 -0
  39. package/dist/lib/puck/part-inks.js +1 -1
  40. package/dist/lib/puck/passes/corners.d.ts +1 -0
  41. package/dist/lib/puck/passes/corners.js +1 -1
  42. package/dist/lib/puck/passes/index.js +1 -1
  43. package/dist/lib/puck/passes/inspector.js +1 -1
  44. package/dist/lib/puck/passes/section-sticky.d.ts +3 -0
  45. package/dist/lib/puck/passes/section-sticky.js +1 -0
  46. package/dist/lib/puck/passes/types.d.ts +1 -0
  47. package/dist/lib/site-text-styles-writer.d.ts +21 -0
  48. package/dist/lib/site-text-styles-writer.js +1 -0
  49. package/dist/lib/site-text-styles.d.ts +43 -3
  50. package/dist/lib/site-text-styles.js +2 -2
  51. package/dist/lib/site-theme-row.d.ts +4 -0
  52. package/dist/lib/sized-image.d.ts +11 -0
  53. package/dist/lib/sized-image.js +1 -0
  54. package/dist/lib/source-rules/label-vocabulary.d.ts +3 -1
  55. package/dist/lib/source-rules/label-vocabulary.js +5 -4
  56. package/dist/lib/theme.d.ts +3 -0
  57. package/dist/lib/theme.js +1 -1
  58. package/package.json +5 -5
  59. package/dist/components/TextStylesField.d.ts +0 -17
  60. package/dist/components/TextStylesField.js +0 -1
@@ -1 +1 @@
1
- "use client";import{jsx as r,jsxs as A,Fragment as T}from"react/jsx-runtime";import{cloneElement as de,useId as dt,useRef as ee,useState as z}from"react";import{useEasel as N,useSelectedFields as ue}from"efficient-easel/easel";import{say as l,editorEaselWords as x}from"../editor-words.js";import{readHidable as pe,hidableText as fe}from"./hidable.js";import{FOLD_FIELD_MARKER as V,LINK_FIELD_MARKER as me,MEDIA_FIELD_MARKER as he,SCAFFOLD_FIELD_MARKER as ge,TEXT_FIELD_MARKER as I,foldMetaOf as Y,textFieldIdentifier as ut}from"./field-markers.js";import pt from"../../components/ApplyCornersToSiblings.js";import{CARD_IMAGE_RADIUS_STEP as ft,CORNER_RADIUS_MAX as be,CORNER_RADIUS_MIN as L}from"../content/card-image-shape.js";import{IMAGE_CORNER_STEP as mt,IMAGE_CORNERS_LABEL as ht}from"../content/image-corners.js";import{GRID_MAX_COLUMNS as gt}from"../content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as bt,GALLERY_LAYOUTS as F,GALLERY_LAYOUT_KEYS as xe}from"../content/gallery-layout.js";import{anchorSiblingsOf as xt,HERO_GROUP_PLACEMENTS as yt,HERO_GROUP_PLACEMENT_DEFAULT as St,normalisePlacement as Ct,placementPoints as ye}from"../hero-group-placement.js";import _t from"../../components/KeepHint.js";import{AdjustIcon as It,AlignLeftIcon as Et,EyeIcon as Rt,AlignSeparateIcon as Ot,AnimationIcon as Se,BackgroundIcon as Tt,BorderAllIcon as wt,BlockSectionIcon as Pt,CartIcon as At,ColumnWidthsIcon as Ce,ColumnsIcon as Nt,CornerIcon as Lt,DirectionDownIcon as Ft,DirectionLeftIcon as kt,DirectionRightIcon as vt,DirectionUpIcon as Dt,DollarIcon as Bt,FinishIcon as Ht,GapIcon as _e,GridIcon as Gt,GroundIcon as Mt,HashIcon as Ie,HeightIcon as Kt,ImageIcon as Wt,ListIcon as Ut,LocationIcon as te,PaddingAllIcon as Xt,PaddingBottomIcon as Ee,PaddingLeftIcon as Re,PaddingRightIcon as Oe,PaddingTopIcon as Te,PageIcon as we,PhoneIcon as jt,PlacementIcon as $t,ProductSizeIcon as zt,RotateIcon as Vt,SquareIcon as Yt,TypeIcon as qt,WidthIcon as Jt,WrapIcon as Zt}from"efficient-easel/icons";import{FieldGlyph as Pe}from"../../components/FieldGlyph.js";import{resolvePageBackground as Qt}from"../content/page-background.js";import{CORNER_SIDES as Ae,CORNER_SIDE_POINTS as en,hasOwnSectionCorners as tn,normalizeCornerSides as Ne}from"../content/section-corners.js";import{SECTION_MOTION_NONE as nn,SECTION_MOTION_OPTIONS as on}from"../content/section-animation.js";import{enclosingSectionProps as Le}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsField as h,SettingsGroupHead as rn,SettingsGroupSub as ln,SettingsBorder as an,SettingsSegmented as sn,SettingsSides as cn,SettingsSidesEach as Fe,sidesStartEach as dn,SettingsSwitch as un,borderSides as pn,borderStartEach as fn}from"efficient-easel/panel";import{FieldSelect as mn,ListField as hn}from"efficient-easel/fields";import{DisplayChips as gn}from"efficient-shell/ui";import{desktopDisplayChanged as bn,partShownOnDesktop as xn,partShownOnPhone as yn,phoneDisplayChanged as Sn,withDesktopPart as Cn,withPhonePart as _n}from"../content/part-display.js";import{AlignmentGrid as In,Checkbox as En,CornersInput as Rn,DateTimePicker as On,FOCAL_DEFAULT as ke,Slider as Tn,Tooltip as q}from"efficient-shell/ui";import{ColourControl as ve}from"./ColourControl.js";import De from"./MarkupToolbar.js";import{deviceField as b}from"./device-fields.js";import{NO_CONTROL_FIELD as wn,NoControlMark as Be,noControlField as ne}from"./panel-no-control-mark.js";import{OWN_BOX_FIELD as Pn}from"./own-box.js";import{PHONE_CLEAR as An,phoneKey as k,resolvePhoneValue as oe}from"./phone-override.js";import{SuppressibleText as Nn}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Ln,CARD_OUTLINE_OPTIONS as Fn,DEFAULT_CARD_INDEX_FORMAT as kn,DEFAULT_CARD_OUTLINE as vn}from"../sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Dn,DEFAULT_COVER_INDEX as Bn}from"../sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Hn}from"./text-control-kinds.js";import Gn from"../../components/ImageFocusRow.js";import Mn from"../../components/MediaUploadField.js";import Kn from"../../components/MultiSelectField.js";import Wn from"../../components/SectionThemePicker.js";import Un from"../../components/SearchSelectField.js";import Xn from"../../components/StorefrontLinkField.js";import He from"../../components/UiIcon.js";import{SECTION_PADDING as E}from"../content/section-padding.js";import{hasPhoneHeight as jn,resolveSectionMinHeight as $n}from"../content/section-min-height.js";import{SECTION_MIN_HEIGHT as zn,SECTION_MIN_HEIGHT_GROUP_LABEL as K,SECTION_SCREEN_PCT as Vn}from"../content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as Yn,containerDirectionPoints as qn,resolveContainerDirection as Ge}from"../content/container-direction.js";import{BOX_ALIGN_POINTS as Jn,BOX_BLOCK_SPACING_LABEL as Zn,BOX_BLOCK_SPACING_POINTS as Me,BOX_JUSTIFY_POINTS as Ke,BOX_PHONE_ROW_LABEL as Qn,BOX_PHONE_ROW_MAX as eo,BOX_PHONE_ROW_MIN as We,BOX_SHARE_LABEL as Ue,BOX_SHARE_POINTS as re,BOX_WRAP_LABEL as to,BOX_WRAP_POINTS as Xe}from"../content/box-layout.js";import{usePreviewHeader as W}from"../../components/PreviewHeaderContext.js";import{BORDER_MAX as no}from"../content/borders.js";import{DEFAULT_SURFACES as oo,normalizeTheme as ro}from"../theme.js";import{CONTAINER_GAP as ie,CONTAINER_GAP_BUILT_IN as io,GAP_FIELD_CONTAINER as lo,hasOwnContainerGap as ao,resolveContainerGap as so}from"../content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as co,CARD_IMAGE_BG_OFF as uo,CARD_IMAGE_BG_SWATCH_NAMES as po,CARD_IMAGE_BG_SWATCHES as fo,isCardImageBackgroundInheriting as mo,cardImageBackgroundChoice as ho,THEME_CARD_IMAGE_BG as go}from"../content/card-image-background.js";import{SECTION_BG_INHERIT as bo,SECTION_BG_SWATCHES as xo,SECTION_BG_SWATCH_NAMES as yo,THEME_SECTION_BG as So,isSectionBackgroundInheriting as Co}from"../content/section-background.js";import{SECTION_THEME_GROUP_LABEL as _o}from"../content/section-surface.js";import{TYPE_SIZE_FIXED as Io,TYPE_SIZE_INHERIT as Eo,isTypeSizeInheriting as Ro}from"../content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Oo,WIDTH_CHOICE_LABEL as To,WIDTH_INHERIT as wo,resolveWidth as Po,sectionRunsFullWidth as je}from"../content/section-width.js";import{useFoldHeadingLevel as $e}from"./panel-heading-scope.js";import{withStyleKind as Ao}from"efficient-easel/style-clipboard";function v(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!Y(n)&&Ao(n,`section:${t}`);return e}function Di({children:e}){return r("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function ze(){return null}function No(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return r(ze,{},e)}function Lo(e){return e.type===ze}function D(e){return Lo(e)?void 0:e}function B(e,t){return l("{value} from {from}",{value:e,from:t})}function Fo(){const{appState:e}=N(i=>i),t=e.data.root?.props??{},{mode:n,pageWidth:o}=Po(t,"full");return n==="page"?B(`${o}px`,l("the page")):n==="contained"?B(l("Contained"),l("the page")):B(l("Full"),l("the page"))}function ko(){const{blockGap:e}=W();return e===null?l("this container's own spacing"):B(`${e}px`,l("Site styles"))}function vo({inherited:e,onReset:t,label:n}){return r(y,{words:x()?.panel,label:l(n),changed:!e,detail:ko(),onReset:t})}function Do({inherited:e,onReset:t,label:n}){return r(y,{words:x()?.panel,label:l(n),changed:!e,detail:Fo(),onReset:t})}function H({value:e,onChange:t,label:n,placeholder:o,hint:i,multiline:a,hideable:c=!0,markup:s=!0}){const{text:d,hidden:u}=pe(e),f=ee(null),p=ee(null),m=O=>t(c?{text:O,hidden:u}:O),g=()=>t({text:d,hidden:!u}),C=c&&u,R=dt(),_=i?Ko(i)?r("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(i)}):r(_t,{children:l(i)}):void 0,$=u?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return r(h,{label:l(n),icon:r(qt,{}),htmlFor:R,className:C?"is-hidden":void 0,hint:_,action:c?r(q,{content:$,children:r("button",{type:"button",className:"sf-field-eye","aria-pressed":u,"aria-label":$,onClick:g,children:u?r(He,{name:"eye-off",size:14}):r(He,{name:"eye",size:14})})}):void 0,children:A("div",{className:"sf-copybox",children:[s&&r(De,{target:a?p:f,value:d,onChange:m}),a?r("textarea",{id:R,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>m(O.target.value)}):r("input",{id:R,ref:f,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>m(O.target.value)})]})})}function Bi(e,t){return{...e,[ge]:t}}function Hi(e){const t=e[I];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[I]:{...t,offPage:!0}}}function Gi(e){return!e||typeof e!="object"?!1:e[I]?.offPage===!0}const Ve="sfPanelOnly";function Mi(e){if(!e[I])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Ve]:!0}}function Ki(e){return!!e&&typeof e=="object"&&e[Ve]===!0}function Wi(e){const t=e[I];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[I]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as Ql,SCALAR_TEXT_CONTROLS as ea}from"./text-control-kinds.js";function Ui(e,t){if(!e[I])throw new Error("inOwnBox: the field holds no authored text");const{[wn]:o,...i}=e;return{...i,[Pn]:!0,render:t}}const Bo=new Set(Hn),G=(e,t)=>{const n={...t,[I]:e};if(!Bo.has(e.control))return n;const o=t.render;return{...ne(n,"authored-copy"),render:i=>r(Nn,{name:i.name,children:o(i)})}},Xi="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Ho="Select a word, then press the highlighter.",Go="A short name so a link can jump straight to this section, like yoursite.com/page#about.",Mo=new Set([Ho]),Ko=e=>Mo.has(e);function ji(e,t,n){return G({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n})})}function $i(e,t,n){return G({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0})})}function Wo(e,t,n){return G({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function zi(e,t,n){return G({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1})})}function Vi(e){return{type:"custom",[me]:{label:e},render:({value:t,onChange:n})=>r(Xn,{value:fe(t),onChange:n,label:e})}}function Yi(e,t,n){return G({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const qi={Design:It,Animation:Se};function Ji(e,t){return e.includes("Design")?t!=="Design":null}function Uo({label:e}){return r(rn,{title:l(e),level:$e(1)})}function Xo({level:e,label:t}){return e===1?r(Uo,{label:t}):r(zo,{label:t})}function Ye(e,t){return{type:"custom",[V]:{label:e,level:t},render:()=>r(Xo,{level:t,label:e})}}function S(e){return Ye(e,2)}function Zi(e){return{type:"custom",render:()=>r(jo,{text:e})}}function jo({text:e}){return r("p",{className:"sf-note",children:l(e)})}function Qi(e){return Ye(e,1)}function el(e){return Y(e)!==null&&e?.tabs!==void 0}const qe=new Map;function tl(e,t){const n=`${e}\0${t?t.join(""):""}`,o=qe.get(n)??{type:"custom",tabs:t,[V]:{label:e,level:1},bucket:e,marker:!0,render:()=>r(T,{})};return qe.set(n,o),o}function nl(e){return Y(e)!==null&&e?.designGroup!==void 0}const Je=new Map;function ol(e){const t=Je.get(e)??{type:"custom",[V]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>r(T,{})};return Je.set(e,t),t}function $o(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function rl(e,t){return $o(e)===t?e:{...e,marker:!0,fold:t,render:()=>r(T,{})}}function il(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>r(T,{})}}function zo({label:e}){return r(ln,{title:l(e),level:$e(2)})}function Ze({swatches:e,current:t,onPick:n,names:o}){const i=e.find(s=>s.toLowerCase()===t.toLowerCase()),a=i?o?.[i]:void 0,c=a?l(a):t;return A("div",{className:"sf-swatches",children:[e.map(s=>{const d=o?.[s]?l(o[s]):s;return r(q,{content:d,children:r("button",{type:"button","aria-pressed":t.toLowerCase()===s.toLowerCase(),className:`sf-swatch ${t.toLowerCase()===s.toLowerCase()?"is-active":""}`,style:{background:s},onClick:()=>n(s),"aria-label":d})},s)}),r("span",{className:"sf-swatch-hex",children:c})]})}function ll(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=Co(n,t);return r(h,{label:l(e),icon:r(Tt,{}),changed:!i,action:r(y,{words:x()?.panel,label:l(e),changed:!i,detail:l("the theme's section background"),onReset:()=>o(bo)}),children:Ze({swatches:xo,current:i?So:n??t??"",onPick:o,names:yo})})}}}function Vo(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=n,a=mo(i,t);return r(h,{label:l(e),icon:r(Mt,{}),changed:!a,action:r(y,{words:x()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(co)}),children:Ze({swatches:fo,current:a?go:ho(i,t),onPick:o,names:po})})}}}function al(e=n=>n,t){return v({_gSectionTheme:S(_o),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>r(Wn,{value:e(n),onChange:o,followLabel:t})}})}function U({min:e,max:t,step:n,value:o,onChange:i,suffix:a="",readout:c=!0,notch:s,ariaLabel:d,disabled:u=!1}){const f=s!==void 0&&Number.isFinite(s)&&s>=e&&s<=t;return r("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(s-e)/(t-e)}:void 0,children:r(Tn,{min:e,max:t,step:n,value:o,suffix:a||void 0,showInput:c,label:d===void 0?void 0:l(d),disabled:u,size:"sm",className:"sf-slider-track",onChange:p=>{p!==null&&p!==o&&i(p)}})})}function M(e,t,n,o,i,a,c="",s){return{type:"custom",render:d=>r(h,{label:l(e),icon:D(t),action:s?s("storedValue"in d?d.storedValue:d.value,d.onChange):void 0,children:U({min:n,max:o,step:i,value:typeof d.value=="number"?d.value:a,suffix:c,ariaLabel:e,onChange:d.onChange})})}}function Qe(e,t){const{min:n,max:o,step:i=1,unsetLabel:a,hint:c,restTrack:s,unsetMark:d,icon:u}=t;return{type:"custom",render:({value:f,onChange:p})=>{const m=typeof f=="number"?f:null,g=m===null;return r(h,{label:l(e),icon:u?D(u):void 0,value:g?d||a===void 0?void 0:l(a):`${m}px`,changed:!g,action:d?de(d,{changed:!g,onReset:()=>p(null)}):r(y,{words:x()?.panel,label:l(e),changed:!g,onReset:()=>p(null)}),hint:typeof c=="string"?l(c):c,children:s?s({min:n,max:o,step:i,px:m,label:e,onChange:p}):U({min:n,max:o,step:i,value:m??n,readout:!1,ariaLabel:e,onChange:p})})}}}function sl(e){const t=M("Gap",r(_e,{}),ie.min,ie.max,ie.step,io[e],"px",(n,o)=>r(vo,{inherited:!ao(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[lo]:e,render:n=>t.render({...n,value:so(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}const J="Corners";function le(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,i=o!==null;return r(h,{label:l(J),icon:r(Lt,{}),changed:i,action:de(e.mark,{changed:i,onReset:()=>n(null)}),hint:e.hint,children:r(Yo,{tier:e,px:o,onRadius:n})})}}}function et(e){let t=null;try{t=ue()}catch{t=null}return[t?.values?.[e],n=>t?.onChange(e,n)]}function Yo({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),i=e.useClosedReason?e.useClosedReason():null,[a,c]=et(e.sidesKey),s=Ne(a)??[...Ae];return r(Rn,{label:l(J),value:s,corners:en,onChange:d=>{const u=Ne(d)??[];c(u.length===Ae.length?null:u)},radius:t,onRadiusChange:n,radiusMin:L,radiusMax:be,radiusStep:e.step??1,radiusPlaceholder:String(o),disabled:i!==null,disabledReason:i??void 0})}function tt(){return ne({type:"custom",render:()=>r(Be,{})},"always")}function qo({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=W(),i=typeof o=="number"?`${o}px`:l("not set");return r(y,{words:x()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):B(i,l("Site styles")),onReset:n})}function Jo(){const{cornerRadiusPx:e}=W();return typeof e=="number"?e:L}function Zo(){return le({sidesKey:"sectionCornerSides",useFollowed:Jo,useClosedReason:()=>ot()?l(nt):null,mark:r(qo,{label:J}),hint:r(Qo,{})})}const nt="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function ot(){return je(X())}function Qo(){return r(T,{children:ot()?nt:"Follows Site styles ▸ Basics ▸ Corners until you set a number here."})}function cl(){return v({_gShape:S("Shape"),sectionCorners:Zo(),sectionCornerSides:tt(),sectionBorder:rt("desktop"),sectionBorderPhone:rt("mobile")})}const er=()=>({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 tr(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function nr(){let e;try{const t=ro(W().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||oo.line}function or({value:e,onChange:t,tier:n}){const[o]=et("sectionBorder"),i=nr(),a=e&&typeof e=="object"?e:{},c=n==="mobile"?o&&typeof o=="object"?o:{}:{},[s,d]=z(()=>fn(a,c)),u=er();return r(h,{label:l("Border"),icon:r(wt,{}),action:r(Fe,{each:s,label:l("Each side"),onChange:d}),children:r(an,{label:l("Border"),value:a,each:s,onChange:f=>t(tr(f)),placeholder:{sides:pn(c),style:c.style??"solid",color:c.color||i},presets:[i],words:u,max:no})})}function rt(e){return b(e,{type:"custom",render:({value:t,onChange:n})=>r(or,{value:t,onChange:n,tier:e})})}function dl(){return{_gMotion:S("Motion"),sectionAnimation:ce("Entrance",r(Se,{}),[...on],nn)}}function ae(){let e=null;try{const{appState:t,selectedItem:n}=N(i=>i),o=n?.props?.id?String(n.props.id):void 0;e=o?Le(t?.data,o):null}catch{e=null}return e!==null&&je(e)}function it(e){const{cornerRadiusPx:t}=W(),n=ae(),o=typeof t=="number"?t:e;let i=null;try{const{appState:c,selectedItem:s}=N(u=>u),d=s?.props?.id?String(s.props.id):void 0;i=d?Le(c?.data,d):null}catch{i=null}if(n||!i)return o;const a=i.sectionCorners;return tn(a)?a:o}function rr({label:e,changed:t=!1,onReset:n=()=>{}}){const o=ae(),i=it(L),a=o?"Site":"Section";return r(y,{words:x()?.panel,label:l(e),changed:t,detail:B(`${i}px`,o?l("Site styles"):l("the section")),onReset:n})}function ir(){return r(T,{children:ae()?l("The section is full width, so this card follows Site styles ▸ Basics ▸ Corners."):l("Follows the section's Corners until you set a number here.")})}function lr(){return le({sidesKey:"cardCornerSides",useFollowed:()=>it(L),mark:r(rr,{label:J}),hint:r(ir,{})})}function ar(){return{type:"custom",render:()=>r(pt,{})}}function ul(){return{_gShape:S("Shape"),cardCorners:lr(),cardCornerSides:tt(),cardCornersApplyAll:ar()}}function pl(){return w("Justify",r(Ot,{}),Ke,Ke[0].value)}function fl(){return w("Item alignment",r(Et,{}),Jn,"stretch")}function ml(){return w(to,r(Zt,{}),Xe,Xe[0].value)}function hl(){return{type:"custom",render:({value:e,onChange:t})=>{const n=re.find(o=>o.value===e)??re[0];return r(h,{label:l(Ue),icon:r(Ce,{}),value:l(n.label),children:r("div",{className:"sf-gallery-layouts",role:"group","aria-label":l(Ue),children:re.map(o=>r(q,{content:l(o.label),className:"sf-tile-tip",children:r("button",{type:"button","aria-pressed":n.value===o.value,"aria-label":l(o.label),onClick:()=>t(o.value),children:r("span",{className:"sf-gallery-pic",children:sr(o.weights).map((i,a)=>r("i",{style:{gridColumn:`span ${i}`}},a))})})},o.value))})})}}}function sr(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 gl(){return w(Zn,r(_e,{}),Me,Me[0].value)}function bl(){return M(Qn,r(jt,{}),We,eo,1,We)}function xl(e){const t=ce(Yn,No("`Direction` names how a container's children run — a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; editor-shell's own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),qn(e),Ge(e,void 0));return{type:"custom",render:n=>t.render({...n,value:Ge(e,n.value),onChange:o=>n.onChange(o)})}}function yl(e,t,n,o,i,a){return{type:"custom",render:({value:c,onChange:s})=>r(h,{label:l(e),icon:r(Pe,{noun:a}),action:r(y,{words:x()?.panel,label:l(e),changed:!Ro(c),detail:l("the Text style in Site styles"),onReset:()=>s(Eo),defaultAction:{onPress:()=>s(Io),title:l("Keep this section's own built-in size"),icon:r(Pt,{})}}),children:U({min:t,max:n,step:o,value:typeof c=="number"?c:i,suffix:"px",ariaLabel:e,onChange:s})})}}function Sl(){return{_gCellWidth:S("Cell width"),gridSpan:w("Positions",r(Ce,{}),[{label:"Auto",value:""},...Array.from({length:gt},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function X(){let e=null;try{e=N(t=>t).selectedItem}catch{e=null}return e?.props??{}}function cr({min:e,max:t,step:n,px:o,label:i,onChange:a,desktopKey:c,fallback:s}){const d=X()[c],u=oe(void 0,d,s);return r(T,{children:U({min:e,max:t,step:n,value:oe(o,d,s),readout:!1,ariaLabel:i,notch:u,onChange:a})})}function dr({label:e,desktopKey:t,fallback:n,changed:o=!1,onReset:i=()=>{}}){const a=X()[t],c=oe(void 0,a,n);return r(y,{words:x()?.panel,label:l(e),changed:o,detail:l("{value} on desktop",{value:`${c}px`}),onReset:i})}function ur(e){return Qe(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:r(dr,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>r(cr,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const pr={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},fr={Top:Te,Bottom:Ee,Left:Re,Right:Oe},mr=e=>{const t=fr[e];return r(t,{})};function Cl(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,i=_=>pr[_],a=_=>M(i("Top"),r(Te,{}),E.min,E.max,E.step,_,"px"),c=(_,$,O,Q=E)=>b("mobile",ur({label:i(_),icon:mr(_),desktopKey:$,min:Q.min,max:Q.max,step:Q.step,fallback:O})),s=e.top??E.min,d=e.bottom??E.min,u="sectionPaddingLeft",f="sectionPaddingRight",p=e.sideBounds??E,m=e.side??p.min,g=e.sidePhone??m,C=e.phone===!0,R=_=>C?b("desktop",_):_;return v({...o?{_gSpacing:S("Padding")}:{},[t]:R(a(s)),...C?{[k(t)]:c("Top",t,s)}:{},...e.only==="top"?{}:{[n]:R(M(i("Bottom"),r(Ee,{}),E.min,E.max,E.step,d,"px")),...C?{[k(n)]:c("Bottom",n,d)}:{}},...e.sides?{[u]:R(M(i("Left"),r(Re,{}),p.min,p.max,p.step,m,"px")),...C?{[k(u)]:c("Left",u,g,p)}:{},[f]:R(M(i("Right"),r(Oe,{}),p.min,p.max,p.step,m,"px")),...C?{[k(f)]:c("Right",f,g,p)}:{}}:{}})}const j=["top","right","bottom","left"],hr={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},lt=e=>typeof e=="number"?e:null;function gr(e,t,n){const o={};for(const i of j)n[i]!==t[i]&&(o[e[i]]=n[i]??void 0);return o}function br({tier:e,o:t}){let n=null;try{n=ue()}catch{n=null}const o=n?.values??{},i=e==="mobile"?t.phoneKeys:t.keys,a=Object.fromEntries(j.map(u=>[u,lt(o[i[u]])])),c=Object.fromEntries(j.map(u=>[u,String(e==="mobile"?lt(o[t.keys[u]])??t.fallback[u]:t.fallback[u])])),[s,d]=z(()=>dn(a,c));return r(h,{label:l("Padding"),icon:r(Xt,{}),action:r(Fe,{each:s,label:l("Each side"),onChange:d}),children:r(cn,{label:l("Padding"),each:s,value:a,placeholder:c,min:t.min,max:t.max,step:t.step,onChange:u=>{const f=gr(i,a,u);Object.keys(f).length&&n?.onChangeMany(f)},words:{sides:{top:l("Padding top"),right:l("Padding right"),bottom:l("Padding bottom"),left:l("Padding left")},vertical:l("Top and bottom"),horizontal:l("Left and right"),unit:"px"}})})}function _l(e={}){const t={...hr,...e.keys},n={keys:t,phoneKeys:Object.fromEntries(j.map(s=>[s,k(t[s])])),fallback:{top:0,right:0,bottom:0,left:0,...e.fallback},min:e.min??0,max:e.max??200,step:e.step??4},o=e.phone!==!1,i=s=>{const d={type:"custom",render:()=>r(br,{tier:s,o:n})};return o?b(s,d):d},a=()=>ne({type:"custom",render:()=>r(Be,{})},"always"),c=j.filter(s=>s!=="top");return v({...e.group===!1?{}:{_gSpacing:S("Padding")},[n.keys.top]:i("desktop"),...o?{[n.phoneKeys.top]:i("mobile")}:{},...Object.fromEntries(c.map(s=>[n.keys[s],{...a(),reachedBy:n.keys.top}])),...o?Object.fromEntries(c.map(s=>[n.phoneKeys[s],b("mobile",a())])):{}})}const xr={contained:"Contained",page:"Page",full:"Full"},Z="Width";function Il(e,t=Oo,n=!0){const o=t.map(i=>({label:To[i]??xr[i],value:i}));return v({...n?{_gWidth:S(Z)}:{},widthMode:{type:"custom",render:({onChange:i,field:a})=>r(h,{label:l(Z),icon:r(Jt,{}),action:n?r(Do,{inherited:a?.inherited??!1,onReset:()=>i(wo),label:Z}):void 0,children:se({options:o,value:a?.currentValue||e,onChange:i,ariaLabel:Z})})}})}function El(){const e=o=>({type:"custom",render:({value:i,onChange:a})=>r(h,{label:K,icon:D(r(Kt,{})),action:o?o(a):void 0,children:se({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(i)?i:"auto",onChange:a,ariaLabel:K})})}),t=()=>({type:"custom",render:({value:o,onChange:i,field:a})=>{const c=a?.unit==="%"?"%":"px",s=c==="%"?Vn:zn;return r("div",{className:"sf-field",children:U({min:s.min,max:s.max,step:s.step,value:typeof o=="number"?o:s.fallback,suffix:c,ariaLabel:K,onChange:i})})}}),n=()=>ce("Unit",r(Ie,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return v({_gHeight:S(K),sectionHeightMode:b("desktop",e()),sectionHeightValue:b("desktop",t()),sectionHeightUnit:b("desktop",n()),sectionHeightModePhone:b("mobile",e(o=>r(yr,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:b("mobile",t()),sectionHeightUnitPhone:b("mobile",n())})}function yr({onClear:e}){const t=X(),n=jn(t),o=$n(t),i=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return r(y,{words:x()?.panel,label:l(K),changed:n,detail:i,onReset:e})}function Rl(){return{_gAnchor:S("Anchor"),anchor:Wo("Anchor name","e.g. about",Go)}}function Ol(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=`${a??c??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return r(h,{label:l(e),icon:t,htmlFor:s,hint:n===void 0?void 0:l(n),children:r(On,{id:s,value:Number.isFinite(d)?new Date(d):null,onChange:u=>i(u?u.toISOString():"")})})}}}function P(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=typeof o=="boolean"?o:t,d=`${a??c??e}-label`;return r(h,{label:l(e),labelId:d,icon:n,action:r(un,{checked:s,onChange:i,ariaLabelledBy:d})})}}}function Tl(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const i=`${String(n??o??"pageBackground")}-colour`;return r(h,{label:l("Background"),icon:r(we,{}),htmlFor:i,action:r(ve,{id:i,label:"Background",value:Qt(e),onChange:t})})}}}function wl(e,t){return{type:"custom",render:({value:n,onChange:o,id:i})=>{const a=typeof n=="boolean"?n:t,c=`${i??e}-checkbox`;return r(h,{label:l(e),htmlFor:c,className:"sf-checkbox",action:r(En,{id:c,checked:a,onChange:o})})}}}function Pl(e,t){return{type:"custom",render:({value:n,onChange:o})=>r(h,{label:l(e),action:ve({value:n||t,onChange:o,label:e})})}}const Sr=[{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 at({label:e,value:t,onChange:n,points:o=Sr}){const i=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return r(In,{label:l(e),value:t,points:i,onChange:n})}function Al(e,t=ke,n="mediaImage"){return{type:"custom",render:({value:o,onChange:i})=>r("div",{className:"sf-focal-row",children:r(Cr,{label:e,value:o||t,onChange:i,imageProp:n})})}}function Cr({label:e,value:t,onChange:n,imageProp:o}){const{selectedItem:i}=N(c=>c),a=i?.props?.[o];return r(Gn,{label:e,value:t,onChange:n,image:typeof a=="string"?a:void 0})}const _r=ye([]);function Nl(e,{stacking:t,fallback:n=St}){return{type:"custom",render:({value:o,onChange:i})=>{const a=yt.includes(o)?o:n;return t?r(Ir,{label:e,value:a,onChange:i}):st({label:e,value:a,onChange:i,points:_r})}}}function Ir({label:e,value:t,onChange:n}){const{appState:o,selectedItem:i}=N(s=>s),a=i?.props?.id?String(i.props.id):void 0,c=a?xt(o?.data,a):[];return st({label:e,value:t,onChange:n,points:ye(c,a)})}function st({label:e,value:t,onChange:n,points:o}){const i=o.find(a=>a.disabled);return r(h,{label:l(e),icon:r($t,{}),hint:i?.title?l(i.title):void 0,children:at({label:e,value:Ct(t),onChange:n,points:o})})}const Ll={top:r(Dt,{}),right:r(vt,{}),bottom:r(Ft,{}),left:r(kt,{})};function Fl(e,t,n,o,i,a){const c=f=>t.find(p=>p.value===f),s=f=>({value:f,label:"",disabled:!0,title:o}),d=f=>{const p=t.find(g=>g.cell===f);if(!p)return s(`missing-${f}`);const m=a?.[f];return m?{value:p.value,label:p.label,icon:m}:{value:p.value,label:p.label}},u=[s("corner-top-left"),d("top"),s("corner-top-right"),d("left"),s("centre"),d("right"),s("corner-bottom-left"),d("bottom"),s("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:p})=>{const m=t.some(g=>g.value===f)?f:n;return r(h,{label:l(e),icon:i,value:c(m)?.label?l(c(m).label):"",children:at({label:e,value:m,onChange:p,points:u})})}}}const Er="\0note";function w(e,t,n,o,i){return{type:"custom",options:n,fallback:o,...i?{note:i}:{},render:({value:a,onChange:c,field:s})=>{const d=s.options??n,u=s.fallback??o,f=d.some(p=>p.value===a)?a:u;return r(h,{label:l(e),icon:D(t),children:r(mn,{value:f,ariaLabel:l(e),onChange:c,options:[...i?[{label:l(i),value:Er,disabled:!0}]:[],...d.map(p=>({label:l(p.label),value:p.value}))]})})}}}function kl(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:i,field:a})=>r(Kn,{label:e,options:(a.options??t).map(c=>({...c,label:l(c.label)})),value:Array.isArray(o)?o:[],onChange:i,...n?{emptyLabel:l(n)}:{}})}}function vl(e,t,n,o){return{type:"custom",options:t,fallback:n,render:({value:i,onChange:a,field:c})=>r(Un,{label:e,options:(c.options??t).map(s=>({...s,label:l(s.label)})),fallback:c.fallback??n,value:i,onChange:a,placeholder:o===void 0?void 0:l(o)})}}function Dl(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const i={value:n,onChange:o,...t};return r(e,{...i})}}}function se({options:e,value:t,onChange:n,ariaLabel:o,disabled:i=!1}){return r(sn,{options:e.map(a=>a.picture?{id:a.value,label:a.picture,title:l(a.title??a.label)}:{id:a.value,label:l(a.label),title:a.title===void 0?void 0:l(a.title)}),value:t,onChange:n,ariaLabel:l(o),disabled:i})}const Bl=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function ce(e,t,n,o){const i=n.map(a=>typeof a=="string"?{label:a,value:a}:a);return{type:"custom",render:({value:a,onChange:c,field:s})=>r(h,{label:l(e),icon:D(t),children:se({options:i,value:i.some(d=>d.value===a)?a:a||s?.currentValue||o,onChange:c,ariaLabel:e})})}}function Hl(e,t,n){return{type:"custom",[he]:!0,render:({value:o,onChange:i})=>r(Mn,{value:o||"",onChange:i,label:e,accept:t,placeholder:n})}}const Gl={HeroSingle:["imageFocal"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Ml({value:e,onChange:t,label:n}){const o=e||{},i=!!o.pending,a=i?"var(--fg-dim, #888)":o.ok?"#1d9e75":"#d85a30",c=(s,d)=>t({...o,[s]:d===""?void 0:Number(d)});return A(h,{label:l(n),icon:r(te,{}),children:[r("button",{type:"button",disabled:i,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"8px 10px",fontSize:13,cursor:i?"default":"pointer",opacity:i?.6:1,border:"1px solid var(--border-strong, #ccc)",borderRadius:6,background:"transparent",color:"inherit"},children:i?l("Finding…"):l("Find coordinates")}),o.status&&r("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:a},children:l(o.status)}),r("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:l("Coordinates from OpenStreetMap")}),r("button",{type:"button",onClick:()=>t({...o,manual:!o.manual}),style:{marginTop:8,padding:0,border:"none",background:"none",font:"inherit",fontSize:12,color:"var(--sf-accent, #2563eb)",cursor:"pointer",textDecoration:"underline"},children:o.manual?l("Hide manual coordinates"):l("Enter coordinates manually")}),o.manual&&A("div",{style:{marginTop:8,display:"grid",gap:8},children:[r(h,{label:l("Latitude"),icon:r(te,{}),children:r("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"34.0990198"}),value:typeof o.lat=="number"?o.lat:"",onChange:s=>c("lat",s.target.value)})}),r(h,{label:l("Longitude"),icon:r(te,{}),children:r("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"-117.9842833"}),value:typeof o.lng=="number"?o.lng:"",onChange:s=>c("lng",s.target.value)})})]})]})}function Rr(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Or(e,t,n){const o=e.map(i=>({text:i?.text??""}));return t===null||t<0||t>=e.length?o:o.map((i,a)=>a===t?{text:n}:i)}function Kl(e,t){return e===null?null:t>e?e:null}function Tr(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 Wl={label:"Ticker items",icon:r(Ut,{})};function Ul(e,t,n,o){return{type:"custom",[I]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},render:({value:i,onChange:a})=>r(wr,{label:e,icon:D(t),items:Array.isArray(i)?i:[],placeholder:n,onChange:a,markup:o==="markup"})}}function wr({label:e,icon:t,items:n,placeholder:o,onChange:i,markup:a=!1}){const c=ee(null),[s,d]=z(null),u=p=>p.map(m=>({text:m?.text??""})),f=p=>{const m=Tr(n,p,s);m===null&&(c.current=null),d(m),i(u(p))};return r(hn,{label:l(e),icon:t,noun:l("item"),items:n,onChange:f,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?r(De,{target:c,value:Rr(n,s),onChange:p=>i(Or(n,s??-1,p)),disabled:s===null,label:s===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:s+1})}):void 0,renderRow:(p,m,g)=>r("input",{type:"text",className:a&&s===m?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:m+1}),onChange:C=>g({text:C.target.value}),onFocus:C=>{c.current=C.currentTarget,d(m)}})})}function Xl(e,t){const n=`${e.label} — row ${t+1}`;return G({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function jl(e){return{_gCards:S("Cards"),coverIndex:w("Cover image",r(Wt,{}),Dn,String(Bn),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:Vo("Image background",uo),cardImage:Ar(),spinOnHover:P("Rotate on hover",e?.spinDefault??!0,r(Vt,{}))}}function $l(){return{outline:w("Card outline",r(Yt,{}),Fn,vn),indexBadge:w("Card number",r(Ie,{}),Ln,kn),showBadge:P("Product badge",!0,r(Pe,{noun:"tag"}))}}function zl(e){const t=e?.bottomDefault??!0;return{_gShowOnCard:S("Show on a card"),showCardPrice:P("Price",!0,r(Bt,{})),showCardFinishes:P("Finish swatches",!0,r(Ht,{})),showCardSizes:P("Sizes",t,r(zt,{})),showCardBuy:P("Buy button",t,r(At,{})),showCardPage:P("Page button",t,r(we,{}))}}function Vl(e,t="display"){const n=k(t);return{[t]:b("desktop",{type:"custom",render:({value:o,onChange:i})=>r(ct,{parts:e,changed:bn(o),shown:a=>xn(o,a),onPress:(a,c)=>i(Cn(o,a,c)),onReset:()=>i(void 0)})}),[n]:b("mobile",{type:"custom",render:({value:o,onChange:i})=>r(Pr,{parts:e,desktopKey:t,value:o,onChange:i})})}}function ct({parts:e,changed:t,shown:n,onPress:o,onReset:i,detail:a}){const c=l("Display");return r(h,{label:c,icon:r(Rt,{}),changed:t,action:r(y,{words:x()?.panel,label:c,changed:t,detail:a,onReset:i}),children:r(gn,{label:c,items:e.map(s=>({id:s.id,label:l(s.label),shown:n(s.id)})),onChange:o})})}function Pr({parts:e,desktopKey:t,value:n,onChange:o}){const i=X()[t];return r(ct,{parts:e,changed:Sn(n),shown:a=>yn(i,n,a),onPress:(a,c)=>o(_n(n,a,c)),onReset:()=>o(An),detail:l("the same as Desktop")})}function Ar(){return Qe("Card image",{min:L,max:be,step:ft,hint:"Rounds the picture. The card's own corner is in Site styles."})}function Yl(){return le({sidesKey:"cornerSides",step:mt,useFollowed:()=>L,mark:r(Nr,{label:ht}),hint:l("Rounds the picture. Left alone it stays square.")})}function Nr({label:e,changed:t=!1,onReset:n=()=>{}}){return r(y,{words:x()?.panel,label:l(e),changed:t,onReset:n})}function ql(){return{type:"custom",render:({value:e,onChange:t})=>r(Lr,{value:typeof e=="string"?e:"",onChange:t})}}function Lr({value:e,onChange:t}){const[n,o]=z(null),i=xe.filter(c=>n===null||F[c].across===n),a=e&&e in F?F[e]:null;return A(T,{children:[r(h,{label:l("Photos in a row"),icon:r(Nt,{}),children:A("div",{className:"sf-gallery-filter",children:[r("button",{type:"button","aria-pressed":n===null,onClick:()=>o(null),children:l("All")}),bt.map(c=>r("button",{type:"button","aria-pressed":n===c,onClick:()=>o(c),children:c},c))]})}),r(h,{label:l("Layout"),icon:r(Gt,{}),value:a?l(a.label):l("Not chosen"),hint:l("{n} of {total} layouts",{n:i.length,total:xe.length}),children:r("div",{className:"sf-gallery-layouts",children:i.map(c=>r(q,{content:l(F[c].label),className:"sf-tile-tip",children:r("button",{type:"button","aria-pressed":e===c,"aria-label":l(F[c].label),onClick:()=>t(e===c?"":c),children:r("span",{className:"sf-gallery-pic",children:F[c].desktop.map(([s,d],u)=>r("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${d}`}},u))})})},c))})})]})}export{Go as ANCHOR_HINT,Xi as BOUND_TO_POST_NOTE,qi as BUCKET_ICONS,Gl as CUSTOM_FIELD_MEDIA,Ml as CoordsField,Ll as EDGE_ARROWS,ke as FOCAL_DEFAULT,Sr as FOCAL_POINTS,V as FOLD_FIELD_MARKER,at as FocalPicker,zo as GroupLabel,Ho as HIGHLIGHT_HINT,H as HidableTextField,me as LINK_FIELD_MARKER,Di as Label,he as MEDIA_FIELD_MARKER,Bl as MEDIA_TYPE_OPTIONS,jo as PanelNoteLine,st as PlacementGridView,ge as SCAFFOLD_FIELD_MARKER,ea as SCALAR_TEXT_CONTROLS,nt as SECTION_BLEEDS_HINT,hr as SIDE_PAD_KEYS,Uo as SectionHeading,se as Segmented,vo as SiteGapDefaultReset,U as Slider,Ze as Swatches,Ql as TEXT_CONTROL_KINDS,I as TEXT_FIELD_MARKER,Wl as TICKER_ITEMS_ROW,wr as TextListField,Do as WidthDefaultReset,Tr as aimAfterListChange,Rl as anchorFields,B as backTo,ll as backgroundField,fl as boxAlignField,gl as boxBlockSpacingField,pl as boxJustifyField,bl as boxPhoneRowField,hl as boxShareField,ml as boxWrapField,tl as bucketHeader,lr as cardCornersField,Vo as cardImageBackgroundField,Ar as cardImageField,jl as cardMediaFields,ul as cardShapeFields,zl as cardShowFields,$l as cardStyleFields,Sl as cellWidthFields,wl as checkbox,Pl as colorInput,zi as copyText,tt as cornerSidesField,le as cornersRowField,Ol as dateTime,ol as designGroupHeader,xl as directionField,Vl as displayFields,Fl as edgePad,Ji as entriesHiddenForTab,Al as focalPicker,Kl as focusAfterRemove,rl as foldMarker,Y as foldMetaOf,$o as foldTitleOf,ql as galleryLayoutField,sl as gapField,S as group,El as heightFields,fe as hidableText,Ko as hintIsWhileTyping,D as iconOf,Yl as imageCornersField,Ui as inOwnBox,el as isBucketHeader,nl as isDesignGroupHeader,Lo as isNoGlyph,Vi as linkField,kl as multiSelect,No as noGlyph,Tl as pageBackgroundField,Zi as panelNote,ur as phoneOverrideField,Nl as placementField,Wo as plainText,Yi as plainTextarea,Qe as pxField,il as quietMarker,pe as readHidable,Rr as rowText,vl as searchSelect,Qi as section,dl as sectionAnimationFields,rt as sectionBorderField,Zo as sectionCornersField,cl as sectionShapeFields,al as sectionThemeFields,ce as segmented,w as select,Or as setRowText,_l as sidesPaddingFields,gr as sidesPaddingPatch,yl as sizeField,M as slider,Dl as sourceField,Cl as spacingFields,ji as text,ut as textFieldIdentifier,Gi as textFieldOffPage,Ki as textFieldPanelOnly,Ul as textList,Xl as textListRowField,$i as textarea,P as toggle,Hl as upload,Fo as usePageWidthDetail,ko as useSiteGapDetail,Il as widthField,Wi as withIdentifier,Hi as withOffPage,Mi as withPanelOnly,Bi as withScaffold};
1
+ "use client";import{jsx as r,jsxs as P,Fragment as R}from"react/jsx-runtime";import{cloneElement as pe,useId as ft,useRef as te,useState as z}from"react";import{useEasel as A,useSelectedFields as fe}from"efficient-easel/easel";import{say as l,editorEaselWords as x}from"../editor-words.js";import{readHidable as me,hidableText as he}from"./hidable.js";import{FOLD_FIELD_MARKER as V,LINK_FIELD_MARKER as ge,MEDIA_FIELD_MARKER as be,SCAFFOLD_FIELD_MARKER as xe,TEXT_FIELD_MARKER as I,foldMetaOf as Y,textFieldIdentifier as mt}from"./field-markers.js";import ht from"../../components/ApplyCornersToSiblings.js";import{CARD_IMAGE_RADIUS_STEP as gt,CORNER_RADIUS_MAX as Se,CORNER_RADIUS_MIN as L}from"../content/card-image-shape.js";import{IMAGE_CORNER_STEP as bt,IMAGE_CORNERS_LABEL as xt}from"../content/image-corners.js";import{GRID_MAX_COLUMNS as St}from"../content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as yt,GALLERY_LAYOUTS as F,GALLERY_LAYOUT_KEYS as ye}from"../content/gallery-layout.js";import{anchorSiblingsOf as Ct,HERO_GROUP_PLACEMENTS as _t,HERO_GROUP_PLACEMENT_DEFAULT as It,normalisePlacement as Et,placementPoints as Ce}from"../hero-group-placement.js";import Rt from"../../components/KeepHint.js";import{AdjustIcon as Tt,AlignLeftIcon as Ot,EyeIcon as wt,AlignSeparateIcon as Pt,AnimationIcon as _e,BackgroundIcon as kt,BorderAllIcon as Nt,BlockSectionIcon as At,CartIcon as Lt,ColumnWidthsIcon as Ie,ColumnsIcon as Ft,CornerIcon as vt,DirectionDownIcon as Dt,DirectionLeftIcon as Bt,DirectionRightIcon as Ht,DirectionUpIcon as Gt,DollarIcon as Mt,FinishIcon as Kt,GapIcon as Ee,GridIcon as Wt,GroundIcon as Ut,HashIcon as Re,HeightIcon as Xt,ImageIcon as $t,ListIcon as jt,LocationIcon as ne,PaddingAllIcon as zt,PaddingBottomIcon as Te,PaddingLeftIcon as Oe,PaddingRightIcon as we,PaddingTopIcon as Pe,PageIcon as ke,PhoneIcon as Vt,PlacementIcon as Yt,ProductSizeIcon as qt,StickyIcon as Jt,RotateIcon as Zt,SquareIcon as Qt,TypeIcon as en,WidthIcon as tn,WrapIcon as nn}from"efficient-easel/icons";import{FieldGlyph as Ne}from"../../components/FieldGlyph.js";import{resolvePageBackground as on}from"../content/page-background.js";import{CORNER_SIDES as Ae,CORNER_SIDE_POINTS as rn,hasOwnSectionCorners as ln,normalizeCornerSides as Le}from"../content/section-corners.js";import{SECTION_MOTION_NONE as an,SECTION_MOTION_OPTIONS as sn}from"../content/section-animation.js";import{enclosingSectionProps as Fe}from"./enclosing-section.js";import{SettingsDefaultReset as S,SettingsField as h,SettingsGroupHead as cn,SettingsGroupSub as dn,SettingsBorder as un,SettingsSegmented as pn,SettingsSides as fn,SettingsSidesEach as ve,sidesStartEach as mn,SettingsSwitch as De,borderSides as hn,borderStartEach as gn}from"efficient-easel/panel";import{FieldSelect as bn,ListField as xn}from"efficient-easel/fields";import{DisplayChips as Sn}from"efficient-shell/ui";import{desktopDisplayChanged as yn,partShownOnDesktop as Cn,partShownOnPhone as _n,phoneDisplayChanged as In,withDesktopPart as En,withPhonePart as Rn}from"../content/part-display.js";import{AlignmentGrid as Tn,Checkbox as On,CornersInput as wn,DateTimePicker as Pn,FOCAL_DEFAULT as Be,Slider as kn,Tooltip as q}from"efficient-shell/ui";import{ColourControl as He}from"./ColourControl.js";import Ge from"./MarkupToolbar.js";import{deviceField as g}from"./device-fields.js";import{NO_CONTROL_FIELD as Nn,NoControlMark as Me,noControlField as oe}from"./panel-no-control-mark.js";import{OWN_BOX_FIELD as An}from"./own-box.js";import{PHONE_CLEAR as Ln,phoneKey as v,resolvePhoneValue as re}from"./phone-override.js";import{SuppressibleText as Fn}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as vn,CARD_OUTLINE_OPTIONS as Dn,DEFAULT_CARD_INDEX_FORMAT as Bn,DEFAULT_CARD_OUTLINE as Hn}from"../sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Gn,DEFAULT_COVER_INDEX as Mn}from"../sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Kn}from"./text-control-kinds.js";import Wn from"../../components/ImageFocusRow.js";import Un from"../../components/MediaUploadField.js";import Xn from"../../components/MultiSelectField.js";import $n from"../../components/SectionThemePicker.js";import jn from"../../components/SearchSelectField.js";import zn from"../../components/StorefrontLinkField.js";import Ke from"../../components/UiIcon.js";import{SECTION_PADDING as E}from"../content/section-padding.js";import{hasPhoneHeight as Vn,resolveSectionMinHeight as Yn}from"../content/section-min-height.js";import{SECTION_STICK_DISTANCE as J,SECTION_STICK_LABEL as ie,hasPhoneStick as qn,resolveSectionStick as Jn}from"../content/section-sticky.js";import{SECTION_MIN_HEIGHT as Zn,SECTION_MIN_HEIGHT_GROUP_LABEL as U,SECTION_SCREEN_PCT as Qn}from"../content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as eo,containerDirectionPoints as to,resolveContainerDirection as We}from"../content/container-direction.js";import{BOX_ALIGN_POINTS as no,BOX_BLOCK_SPACING_LABEL as oo,BOX_BLOCK_SPACING_POINTS as Ue,BOX_JUSTIFY_POINTS as Xe,BOX_PHONE_ROW_LABEL as ro,BOX_PHONE_ROW_MAX as io,BOX_PHONE_ROW_MIN as $e,BOX_SHARE_LABEL as je,BOX_SHARE_POINTS as le,BOX_WRAP_LABEL as lo,BOX_WRAP_POINTS as ze}from"../content/box-layout.js";import{usePreviewHeader as X}from"../../components/PreviewHeaderContext.js";import{BORDER_MAX as ao}from"../content/borders.js";import{DEFAULT_SURFACES as so,normalizeTheme as co}from"../theme.js";import{CONTAINER_GAP as ae,CONTAINER_GAP_BUILT_IN as uo,GAP_FIELD_CONTAINER as po,hasOwnContainerGap as fo,resolveContainerGap as mo}from"../content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as ho,CARD_IMAGE_BG_OFF as go,CARD_IMAGE_BG_SWATCH_NAMES as bo,CARD_IMAGE_BG_SWATCHES as xo,isCardImageBackgroundInheriting as So,cardImageBackgroundChoice as yo,THEME_CARD_IMAGE_BG as Co}from"../content/card-image-background.js";import{SECTION_BG_INHERIT as _o,SECTION_BG_SWATCHES as Io,SECTION_BG_SWATCH_NAMES as Eo,THEME_SECTION_BG as Ro,isSectionBackgroundInheriting as To}from"../content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Oo}from"../content/section-surface.js";import{TYPE_SIZE_FIXED as wo,TYPE_SIZE_INHERIT as Po,isTypeSizeInheriting as ko}from"../content/section-type-size.js";import{SECTION_WIDTH_CHOICES as No,WIDTH_CHOICE_LABEL as Ao,WIDTH_INHERIT as Lo,resolveWidth as Fo,sectionRunsFullWidth as Ve}from"../content/section-width.js";import{useFoldHeadingLevel as Ye}from"./panel-heading-scope.js";import{withStyleKind as vo}from"efficient-easel/style-clipboard";function D(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!Y(n)&&vo(n,`section:${t}`);return e}function Ui({children:e}){return r("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function qe(){return null}function Do(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return r(qe,{},e)}function Bo(e){return e.type===qe}function k(e){return Bo(e)?void 0:e}function B(e,t){return l("{value} from {from}",{value:e,from:t})}function Ho(){const{appState:e}=A(i=>i),t=e.data.root?.props??{},{mode:n,pageWidth:o}=Fo(t,"full");return n==="page"?B(`${o}px`,l("the page")):n==="contained"?B(l("Contained"),l("the page")):B(l("Full"),l("the page"))}function Go(){const{blockGap:e}=X();return e===null?l("this container's own spacing"):B(`${e}px`,l("Site styles"))}function Mo({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:Go(),onReset:t})}function Ko({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:Ho(),onReset:t})}function H({value:e,onChange:t,label:n,placeholder:o,hint:i,multiline:a,hideable:c=!0,markup:s=!0}){const{text:d,hidden:u}=me(e),f=te(null),p=te(null),m=O=>t(c?{text:O,hidden:u}:O),b=()=>t({text:d,hidden:!u}),C=c&&u,T=ft(),_=i?jo(i)?r("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(i)}):r(Rt,{children:l(i)}):void 0,j=u?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return r(h,{label:l(n),icon:r(en,{}),htmlFor:T,className:C?"is-hidden":void 0,hint:_,action:c?r(q,{content:j,children:r("button",{type:"button",className:"sf-field-eye","aria-pressed":u,"aria-label":j,onClick:b,children:u?r(Ke,{name:"eye-off",size:14}):r(Ke,{name:"eye",size:14})})}):void 0,children:P("div",{className:"sf-copybox",children:[s&&r(Ge,{target:a?p:f,value:d,onChange:m}),a?r("textarea",{id:T,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>m(O.target.value)}):r("input",{id:T,ref:f,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>m(O.target.value)})]})})}function Xi(e,t){return{...e,[xe]:t}}function $i(e){const t=e[I];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[I]:{...t,offPage:!0}}}function ji(e){return!e||typeof e!="object"?!1:e[I]?.offPage===!0}const Je="sfPanelOnly";function zi(e){if(!e[I])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Je]:!0}}function Vi(e){return!!e&&typeof e=="object"&&e[Je]===!0}function Yi(e){const t=e[I];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[I]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as aa,SCALAR_TEXT_CONTROLS as sa}from"./text-control-kinds.js";function qi(e,t){if(!e[I])throw new Error("inOwnBox: the field holds no authored text");const{[Nn]:o,...i}=e;return{...i,[An]:!0,render:t}}const Wo=new Set(Kn),G=(e,t)=>{const n={...t,[I]:e};if(!Wo.has(e.control))return n;const o=t.render;return{...oe(n,"authored-copy"),render:i=>r(Fn,{name:i.name,children:o(i)})}},Ji="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Uo="Select a word, then press the highlighter.",Xo="A short name so a link can jump straight to this section, like yoursite.com/page#about.",$o=new Set([Uo]),jo=e=>$o.has(e);function Zi(e,t,n){return G({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n})})}function Qi(e,t,n){return G({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0})})}function zo(e,t,n){return G({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function el(e,t,n){return G({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1})})}function tl(e){return{type:"custom",[ge]:{label:e},render:({value:t,onChange:n})=>r(zn,{value:he(t),onChange:n,label:e})}}function nl(e,t,n){return G({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const ol={Design:Tt,Animation:_e};function rl(e,t){return e.includes("Design")?t!=="Design":null}function Vo({label:e}){return r(cn,{title:l(e),level:Ye(1)})}function Yo({level:e,label:t}){return e===1?r(Vo,{label:t}):r(Zo,{label:t})}function Ze(e,t){return{type:"custom",[V]:{label:e,level:t},render:()=>r(Yo,{level:t,label:e})}}function y(e){return Ze(e,2)}function il(e){return{type:"custom",render:()=>r(qo,{text:e})}}function qo({text:e}){return r("p",{className:"sf-note",children:l(e)})}function ll(e){return Ze(e,1)}function al(e){return Y(e)!==null&&e?.tabs!==void 0}const Qe=new Map;function sl(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Qe.get(n)??{type:"custom",tabs:t,[V]:{label:e,level:1},bucket:e,marker:!0,render:()=>r(R,{})};return Qe.set(n,o),o}function cl(e){return Y(e)!==null&&e?.designGroup!==void 0}const et=new Map;function dl(e){const t=et.get(e)??{type:"custom",[V]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>r(R,{})};return et.set(e,t),t}function Jo(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function ul(e,t){return Jo(e)===t?e:{...e,marker:!0,fold:t,render:()=>r(R,{})}}function pl(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>r(R,{})}}function Zo({label:e}){return r(dn,{title:l(e),level:Ye(2)})}function tt({swatches:e,current:t,onPick:n,names:o}){const i=e.find(s=>s.toLowerCase()===t.toLowerCase()),a=i?o?.[i]:void 0,c=a?l(a):t;return P("div",{className:"sf-swatches",children:[e.map(s=>{const d=o?.[s]?l(o[s]):s;return r(q,{content:d,children:r("button",{type:"button","aria-pressed":t.toLowerCase()===s.toLowerCase(),className:`sf-swatch ${t.toLowerCase()===s.toLowerCase()?"is-active":""}`,style:{background:s},onClick:()=>n(s),"aria-label":d})},s)}),r("span",{className:"sf-swatch-hex",children:c})]})}function fl(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=To(n,t);return r(h,{label:l(e),icon:r(kt,{}),changed:!i,action:r(S,{words:x()?.panel,label:l(e),changed:!i,detail:l("the theme's section background"),onReset:()=>o(_o)}),children:tt({swatches:Io,current:i?Ro:n??t??"",onPick:o,names:Eo})})}}}function Qo(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=n,a=So(i,t);return r(h,{label:l(e),icon:r(Ut,{}),changed:!a,action:r(S,{words:x()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(ho)}),children:tt({swatches:xo,current:a?Co:yo(i,t),onPick:o,names:bo})})}}}function ml(e=n=>n,t){return D({_gSectionTheme:y(Oo),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>r($n,{value:e(n),onChange:o,followLabel:t})}})}function M({min:e,max:t,step:n,value:o,onChange:i,suffix:a="",readout:c=!0,notch:s,ariaLabel:d,disabled:u=!1}){const f=s!==void 0&&Number.isFinite(s)&&s>=e&&s<=t;return r("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(s-e)/(t-e)}:void 0,children:r(kn,{min:e,max:t,step:n,value:o,suffix:a||void 0,showInput:c,label:d===void 0?void 0:l(d),disabled:u,size:"sm",className:"sf-slider-track",onChange:p=>{p!==null&&p!==o&&i(p)}})})}function K(e,t,n,o,i,a,c="",s){return{type:"custom",render:d=>r(h,{label:l(e),icon:k(t),action:s?s("storedValue"in d?d.storedValue:d.value,d.onChange):void 0,children:M({min:n,max:o,step:i,value:typeof d.value=="number"?d.value:a,suffix:c,ariaLabel:e,onChange:d.onChange})})}}function nt(e,t){const{min:n,max:o,step:i=1,unsetLabel:a,hint:c,restTrack:s,unsetMark:d,icon:u}=t;return{type:"custom",render:({value:f,onChange:p})=>{const m=typeof f=="number"?f:null,b=m===null;return r(h,{label:l(e),icon:u?k(u):void 0,value:b?d||a===void 0?void 0:l(a):`${m}px`,changed:!b,action:d?pe(d,{changed:!b,onReset:()=>p(null)}):r(S,{words:x()?.panel,label:l(e),changed:!b,onReset:()=>p(null)}),hint:typeof c=="string"?l(c):c,children:s?s({min:n,max:o,step:i,px:m,label:e,onChange:p}):M({min:n,max:o,step:i,value:m??n,readout:!1,ariaLabel:e,onChange:p})})}}}function hl(e){const t=K("Gap",r(Ee,{}),ae.min,ae.max,ae.step,uo[e],"px",(n,o)=>r(Mo,{inherited:!fo(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[po]:e,render:n=>t.render({...n,value:mo(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}const Z="Corners";function se(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,i=o!==null;return r(h,{label:l(Z),icon:r(vt,{}),changed:i,action:pe(e.mark,{changed:i,onReset:()=>n(null)}),hint:e.hint,children:r(er,{tier:e,px:o,onRadius:n})})}}}function ot(e){let t=null;try{t=fe()}catch{t=null}return[t?.values?.[e],n=>t?.onChange(e,n)]}function er({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),i=e.useClosedReason?e.useClosedReason():null,[a,c]=ot(e.sidesKey),s=Le(a)??[...Ae];return r(wn,{label:l(Z),value:s,corners:rn,onChange:d=>{const u=Le(d)??[];c(u.length===Ae.length?null:u)},radius:t,onRadiusChange:n,radiusMin:L,radiusMax:Se,radiusStep:e.step??1,radiusPlaceholder:String(o),disabled:i!==null,disabledReason:i??void 0})}function rt(){return oe({type:"custom",render:()=>r(Me,{})},"always")}function tr({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=X(),i=typeof o=="number"?`${o}px`:l("not set");return r(S,{words:x()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):B(i,l("Site styles")),onReset:n})}function nr(){const{cornerRadiusPx:e}=X();return typeof e=="number"?e:L}function or(){return se({sidesKey:"sectionCornerSides",useFollowed:nr,useClosedReason:()=>lt()?l(it):null,mark:r(tr,{label:Z}),hint:r(rr,{})})}const it="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function lt(){return Ve(W())}function rr(){return r(R,{children:lt()?it:"Follows Site styles ▸ Basics ▸ Corners until you set a number here."})}function gl(){return D({_gShape:y("Shape"),sectionCorners:or(),sectionCornerSides:rt(),sectionBorder:at("desktop"),sectionBorderPhone:at("mobile")})}const ir=()=>({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 lr(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function ar(){let e;try{const t=co(X().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||so.line}function sr({value:e,onChange:t,tier:n}){const[o]=ot("sectionBorder"),i=ar(),a=e&&typeof e=="object"?e:{},c=n==="mobile"?o&&typeof o=="object"?o:{}:{},[s,d]=z(()=>gn(a,c)),u=ir();return r(h,{label:l("Border"),icon:r(Nt,{}),action:r(ve,{each:s,label:l("Each side"),onChange:d}),children:r(un,{label:l("Border"),value:a,each:s,onChange:f=>t(lr(f)),placeholder:{sides:hn(c),style:c.style??"solid",color:c.color||i},presets:[i],words:u,max:ao})})}function at(e){return g(e,{type:"custom",render:({value:t,onChange:n})=>r(sr,{value:t,onChange:n,tier:e})})}function bl(){return{_gMotion:y("Motion"),sectionAnimation:ue("Entrance",r(_e,{}),[...sn],an)}}function ce(){let e=null;try{const{appState:t,selectedItem:n}=A(i=>i),o=n?.props?.id?String(n.props.id):void 0;e=o?Fe(t?.data,o):null}catch{e=null}return e!==null&&Ve(e)}function st(e){const{cornerRadiusPx:t}=X(),n=ce(),o=typeof t=="number"?t:e;let i=null;try{const{appState:c,selectedItem:s}=A(u=>u),d=s?.props?.id?String(s.props.id):void 0;i=d?Fe(c?.data,d):null}catch{i=null}if(n||!i)return o;const a=i.sectionCorners;return ln(a)?a:o}function cr({label:e,changed:t=!1,onReset:n=()=>{}}){const o=ce(),i=st(L),a=o?"Site":"Section";return r(S,{words:x()?.panel,label:l(e),changed:t,detail:B(`${i}px`,o?l("Site styles"):l("the section")),onReset:n})}function dr(){return r(R,{children:ce()?l("The section is full width, so this card follows Site styles ▸ Basics ▸ Corners."):l("Follows the section's Corners until you set a number here.")})}function ur(){return se({sidesKey:"cardCornerSides",useFollowed:()=>st(L),mark:r(cr,{label:Z}),hint:r(dr,{})})}function pr(){return{type:"custom",render:()=>r(ht,{})}}function xl(){return{_gShape:y("Shape"),cardCorners:ur(),cardCornerSides:rt(),cardCornersApplyAll:pr()}}function Sl(){return w("Justify",r(Pt,{}),Xe,Xe[0].value)}function yl(){return w("Item alignment",r(Ot,{}),no,"stretch")}function Cl(){return w(lo,r(nn,{}),ze,ze[0].value)}function _l(){return{type:"custom",render:({value:e,onChange:t})=>{const n=le.find(o=>o.value===e)??le[0];return r(h,{label:l(je),icon:r(Ie,{}),value:l(n.label),children:r("div",{className:"sf-gallery-layouts",role:"group","aria-label":l(je),children:le.map(o=>r(q,{content:l(o.label),className:"sf-tile-tip",children:r("button",{type:"button","aria-pressed":n.value===o.value,"aria-label":l(o.label),onClick:()=>t(o.value),children:r("span",{className:"sf-gallery-pic",children:fr(o.weights).map((i,a)=>r("i",{style:{gridColumn:`span ${i}`}},a))})})},o.value))})})}}}function fr(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 Il(){return w(oo,r(Ee,{}),Ue,Ue[0].value)}function El(){return K(ro,r(Vt,{}),$e,io,1,$e)}function Rl(e){const t=ue(eo,Do("`Direction` names how a container's children run — a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; editor-shell's own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),to(e),We(e,void 0));return{type:"custom",render:n=>t.render({...n,value:We(e,n.value),onChange:o=>n.onChange(o)})}}function Tl(e,t,n,o,i,a){return{type:"custom",render:({value:c,onChange:s})=>r(h,{label:l(e),icon:r(Ne,{noun:a}),action:r(S,{words:x()?.panel,label:l(e),changed:!ko(c),detail:l("the Text style in Site styles"),onReset:()=>s(Po),defaultAction:{onPress:()=>s(wo),title:l("Keep this section's own built-in size"),icon:r(At,{})}}),children:M({min:t,max:n,step:o,value:typeof c=="number"?c:i,suffix:"px",ariaLabel:e,onChange:s})})}}function Ol(){return{_gCellWidth:y("Cell width"),gridSpan:w("Positions",r(Ie,{}),[{label:"Auto",value:""},...Array.from({length:St},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function W(){let e=null;try{e=A(t=>t).selectedItem}catch{e=null}return e?.props??{}}function mr({min:e,max:t,step:n,px:o,label:i,onChange:a,desktopKey:c,fallback:s}){const d=W()[c],u=re(void 0,d,s);return r(R,{children:M({min:e,max:t,step:n,value:re(o,d,s),readout:!1,ariaLabel:i,notch:u,onChange:a})})}function hr({label:e,desktopKey:t,fallback:n,changed:o=!1,onReset:i=()=>{}}){const a=W()[t],c=re(void 0,a,n);return r(S,{words:x()?.panel,label:l(e),changed:o,detail:l("{value} on desktop",{value:`${c}px`}),onReset:i})}function gr(e){return nt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:r(hr,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>r(mr,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const br={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},xr={Top:Pe,Bottom:Te,Left:Oe,Right:we},Sr=e=>{const t=xr[e];return r(t,{})};function wl(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,i=_=>br[_],a=_=>K(i("Top"),r(Pe,{}),E.min,E.max,E.step,_,"px"),c=(_,j,O,ee=E)=>g("mobile",gr({label:i(_),icon:Sr(_),desktopKey:j,min:ee.min,max:ee.max,step:ee.step,fallback:O})),s=e.top??E.min,d=e.bottom??E.min,u="sectionPaddingLeft",f="sectionPaddingRight",p=e.sideBounds??E,m=e.side??p.min,b=e.sidePhone??m,C=e.phone===!0,T=_=>C?g("desktop",_):_;return D({...o?{_gSpacing:y("Padding")}:{},[t]:T(a(s)),...C?{[v(t)]:c("Top",t,s)}:{},...e.only==="top"?{}:{[n]:T(K(i("Bottom"),r(Te,{}),E.min,E.max,E.step,d,"px")),...C?{[v(n)]:c("Bottom",n,d)}:{}},...e.sides?{[u]:T(K(i("Left"),r(Oe,{}),p.min,p.max,p.step,m,"px")),...C?{[v(u)]:c("Left",u,b,p)}:{},[f]:T(K(i("Right"),r(we,{}),p.min,p.max,p.step,m,"px")),...C?{[v(f)]:c("Right",f,b,p)}:{}}:{}})}const $=["top","right","bottom","left"],yr={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},ct=e=>typeof e=="number"?e:null;function Cr(e,t,n){const o={};for(const i of $)n[i]!==t[i]&&(o[e[i]]=n[i]??void 0);return o}function _r({tier:e,o:t}){let n=null;try{n=fe()}catch{n=null}const o=n?.values??{},i=e==="mobile"?t.phoneKeys:t.keys,a=Object.fromEntries($.map(u=>[u,ct(o[i[u]])])),c=Object.fromEntries($.map(u=>[u,String(e==="mobile"?ct(o[t.keys[u]])??t.fallback[u]:t.fallback[u])])),[s,d]=z(()=>mn(a,c));return r(h,{label:l("Padding"),icon:r(zt,{}),action:r(ve,{each:s,label:l("Each side"),onChange:d}),children:r(fn,{label:l("Padding"),each:s,value:a,placeholder:c,min:t.min,max:t.max,step:t.step,onChange:u=>{const f=Cr(i,a,u);Object.keys(f).length&&n?.onChangeMany(f)},words:{sides:{top:l("Padding top"),right:l("Padding right"),bottom:l("Padding bottom"),left:l("Padding left")},vertical:l("Top and bottom"),horizontal:l("Left and right"),unit:"px"}})})}function Pl(e={}){const t={...yr,...e.keys},n={keys:t,phoneKeys:Object.fromEntries($.map(s=>[s,v(t[s])])),fallback:{top:0,right:0,bottom:0,left:0,...e.fallback},min:e.min??0,max:e.max??200,step:e.step??4},o=e.phone!==!1,i=s=>{const d={type:"custom",render:()=>r(_r,{tier:s,o:n})};return o?g(s,d):d},a=()=>oe({type:"custom",render:()=>r(Me,{})},"always"),c=$.filter(s=>s!=="top");return D({...e.group===!1?{}:{_gSpacing:y("Padding")},[n.keys.top]:i("desktop"),...o?{[n.phoneKeys.top]:i("mobile")}:{},...Object.fromEntries(c.map(s=>[n.keys[s],{...a(),reachedBy:n.keys.top}])),...o?Object.fromEntries(c.map(s=>[n.phoneKeys[s],g("mobile",a())])):{}})}const Ir={contained:"Contained",page:"Page",full:"Full"},Q="Width";function kl(e,t=No,n=!0){const o=t.map(i=>({label:Ao[i]??Ir[i],value:i}));return D({...n?{_gWidth:y(Q)}:{},widthMode:{type:"custom",render:({onChange:i,field:a})=>r(h,{label:l(Q),icon:r(tn,{}),action:n?r(Ko,{inherited:a?.inherited??!1,onReset:()=>i(Lo),label:Q}):void 0,children:de({options:o,value:a?.currentValue||e,onChange:i,ariaLabel:Q})})}})}function Nl(){const e=o=>({type:"custom",render:({value:i,onChange:a})=>r(h,{label:U,icon:k(r(Xt,{})),action:o?o(a):void 0,children:de({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(i)?i:"auto",onChange:a,ariaLabel:U})})}),t=()=>({type:"custom",render:({value:o,onChange:i,field:a})=>{const c=a?.unit==="%"?"%":"px",s=c==="%"?Qn:Zn;return r("div",{className:"sf-field",children:M({min:s.min,max:s.max,step:s.step,value:typeof o=="number"?o:s.fallback,suffix:c,ariaLabel:U,onChange:i})})}}),n=()=>ue("Unit",r(Re,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return D({_gHeight:y(U),sectionHeightMode:g("desktop",e()),sectionHeightValue:g("desktop",t()),sectionHeightUnit:g("desktop",n()),sectionHeightModePhone:g("mobile",e(o=>r(Er,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:g("mobile",t()),sectionHeightUnitPhone:g("mobile",n())})}function Er({onClear:e}){const t=W(),n=Vn(t),o=Yn(t),i=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return r(S,{words:x()?.panel,label:l(U),changed:n,detail:i,onReset:e})}function Al(){const e=n=>({type:"custom",render:({value:o,onChange:i,id:a,name:c})=>r(Rr,{value:o,onChange:i,labelId:`${a??c??"stickTop"}-label`,phone:n})}),t=()=>({type:"custom",render:({value:n,onChange:o})=>r("div",{className:"sf-field",children:M({min:J.min,max:J.max,step:J.step,value:typeof n=="number"?n:J.fallback,suffix:"px",ariaLabel:l("Distance from top"),onChange:o})})});return{_gStick:y(ie),stickTop:g("desktop",e(!1)),stickTopDistance:g("desktop",t()),stickTopPhone:g("mobile",e(!0)),stickTopDistancePhone:g("mobile",t())}}function Rr({value:e,onChange:t,labelId:n,phone:o}){const i=W(),a=Jn(i),c=o?a.phone:e===!0;return r(h,{label:l(ie),labelId:n,icon:k(r(Jt,{})),action:P(R,{children:[o?r(S,{words:x()?.panel,label:l(ie),changed:qn(i),detail:l("{value} on desktop",{value:a.desktop?`${a.desktopDistance}px`:l("Off")}),onReset:()=>t(void 0)}):null,r(De,{checked:c,onChange:t,ariaLabelledBy:n})]})})}function Ll(){return{_gAnchor:y("Anchor"),anchor:zo("Anchor name","e.g. about",Xo)}}function Fl(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=`${a??c??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return r(h,{label:l(e),icon:t,htmlFor:s,hint:n===void 0?void 0:l(n),children:r(Pn,{id:s,value:Number.isFinite(d)?new Date(d):null,onChange:u=>i(u?u.toISOString():"")})})}}}function N(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=typeof o=="boolean"?o:t,d=`${a??c??e}-label`;return r(h,{label:l(e),labelId:d,icon:n,action:r(De,{checked:s,onChange:i,ariaLabelledBy:d})})}}}function vl(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const i=`${String(n??o??"pageBackground")}-colour`;return r(h,{label:l("Background"),icon:r(ke,{}),htmlFor:i,action:r(He,{id:i,label:"Background",value:on(e),onChange:t})})}}}function Dl(e,t){return{type:"custom",render:({value:n,onChange:o,id:i})=>{const a=typeof n=="boolean"?n:t,c=`${i??e}-checkbox`;return r(h,{label:l(e),htmlFor:c,className:"sf-checkbox",action:r(On,{id:c,checked:a,onChange:o})})}}}function Bl(e,t){return{type:"custom",render:({value:n,onChange:o})=>r(h,{label:l(e),action:He({value:n||t,onChange:o,label:e})})}}const Tr=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function dt({label:e,value:t,onChange:n,points:o=Tr}){const i=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return r(Tn,{label:l(e),value:t,points:i,onChange:n})}function Hl(e,t=Be,n="mediaImage"){return{type:"custom",render:({value:o,onChange:i})=>r("div",{className:"sf-focal-row",children:r(Or,{label:e,value:o||t,onChange:i,imageProp:n})})}}function Or({label:e,value:t,onChange:n,imageProp:o}){const{selectedItem:i}=A(c=>c),a=i?.props?.[o];return r(Wn,{label:e,value:t,onChange:n,image:typeof a=="string"?a:void 0})}const wr=Ce([]);function Gl(e,{stacking:t,fallback:n=It}){return{type:"custom",render:({value:o,onChange:i})=>{const a=_t.includes(o)?o:n;return t?r(Pr,{label:e,value:a,onChange:i}):ut({label:e,value:a,onChange:i,points:wr})}}}function Pr({label:e,value:t,onChange:n}){const{appState:o,selectedItem:i}=A(s=>s),a=i?.props?.id?String(i.props.id):void 0,c=a?Ct(o?.data,a):[];return ut({label:e,value:t,onChange:n,points:Ce(c,a)})}function ut({label:e,value:t,onChange:n,points:o}){const i=o.find(a=>a.disabled);return r(h,{label:l(e),icon:r(Yt,{}),hint:i?.title?l(i.title):void 0,children:dt({label:e,value:Et(t),onChange:n,points:o})})}const Ml={top:r(Gt,{}),right:r(Ht,{}),bottom:r(Dt,{}),left:r(Bt,{})};function Kl(e,t,n,o,i,a){const c=f=>t.find(p=>p.value===f),s=f=>({value:f,label:"",disabled:!0,title:o}),d=f=>{const p=t.find(b=>b.cell===f);if(!p)return s(`missing-${f}`);const m=a?.[f];return m?{value:p.value,label:p.label,icon:m}:{value:p.value,label:p.label}},u=[s("corner-top-left"),d("top"),s("corner-top-right"),d("left"),s("centre"),d("right"),s("corner-bottom-left"),d("bottom"),s("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:p})=>{const m=t.some(b=>b.value===f)?f:n;return r(h,{label:l(e),icon:i,value:c(m)?.label?l(c(m).label):"",children:dt({label:e,value:m,onChange:p,points:u})})}}}const kr="\0note";function w(e,t,n,o,i){return{type:"custom",options:n,fallback:o,...i?{note:i}:{},render:({value:a,onChange:c,field:s})=>{const d=s.options??n,u=s.fallback??o,f=d.some(p=>p.value===a)?a:u;return r(h,{label:l(e),icon:k(t),children:r(bn,{value:f,ariaLabel:l(e),onChange:c,options:[...i?[{label:l(i),value:kr,disabled:!0}]:[],...d.map(p=>({label:l(p.label),value:p.value}))]})})}}}function Wl(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:i,field:a})=>r(Xn,{label:e,options:(a.options??t).map(c=>({...c,label:l(c.label)})),value:Array.isArray(o)?o:[],onChange:i,...n?{emptyLabel:l(n)}:{}})}}function Ul(e,t,n,o){return{type:"custom",options:t,fallback:n,render:({value:i,onChange:a,field:c})=>r(jn,{label:e,options:(c.options??t).map(s=>({...s,label:l(s.label)})),fallback:c.fallback??n,value:i,onChange:a,placeholder:o===void 0?void 0:l(o)})}}function Xl(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const i={value:n,onChange:o,...t};return r(e,{...i})}}}function de({options:e,value:t,onChange:n,ariaLabel:o,disabled:i=!1}){return r(pn,{options:e.map(a=>a.picture?{id:a.value,label:a.picture,title:l(a.title??a.label)}:{id:a.value,label:l(a.label),title:a.title===void 0?void 0:l(a.title)}),value:t,onChange:n,ariaLabel:l(o),disabled:i})}const $l=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function ue(e,t,n,o){const i=n.map(a=>typeof a=="string"?{label:a,value:a}:a);return{type:"custom",render:({value:a,onChange:c,field:s})=>r(h,{label:l(e),icon:k(t),children:de({options:i,value:i.some(d=>d.value===a)?a:a||s?.currentValue||o,onChange:c,ariaLabel:e})})}}function jl(e,t,n){return{type:"custom",[be]:!0,render:({value:o,onChange:i})=>r(Un,{value:o||"",onChange:i,label:e,accept:t,placeholder:n})}}const zl={HeroSingle:["imageFocal"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Vl({value:e,onChange:t,label:n}){const o=e||{},i=!!o.pending,a=i?"var(--fg-dim, #888)":o.ok?"#1d9e75":"#d85a30",c=(s,d)=>t({...o,[s]:d===""?void 0:Number(d)});return P(h,{label:l(n),icon:r(ne,{}),children:[r("button",{type:"button",disabled:i,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"8px 10px",fontSize:13,cursor:i?"default":"pointer",opacity:i?.6:1,border:"1px solid var(--border-strong, #ccc)",borderRadius:6,background:"transparent",color:"inherit"},children:i?l("Finding…"):l("Find coordinates")}),o.status&&r("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:a},children:l(o.status)}),r("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:l("Coordinates from OpenStreetMap")}),r("button",{type:"button",onClick:()=>t({...o,manual:!o.manual}),style:{marginTop:8,padding:0,border:"none",background:"none",font:"inherit",fontSize:12,color:"var(--sf-accent, #2563eb)",cursor:"pointer",textDecoration:"underline"},children:o.manual?l("Hide manual coordinates"):l("Enter coordinates manually")}),o.manual&&P("div",{style:{marginTop:8,display:"grid",gap:8},children:[r(h,{label:l("Latitude"),icon:r(ne,{}),children:r("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"34.0990198"}),value:typeof o.lat=="number"?o.lat:"",onChange:s=>c("lat",s.target.value)})}),r(h,{label:l("Longitude"),icon:r(ne,{}),children:r("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"-117.9842833"}),value:typeof o.lng=="number"?o.lng:"",onChange:s=>c("lng",s.target.value)})})]})]})}function Nr(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Ar(e,t,n){const o=e.map(i=>({text:i?.text??""}));return t===null||t<0||t>=e.length?o:o.map((i,a)=>a===t?{text:n}:i)}function Yl(e,t){return e===null?null:t>e?e:null}function Lr(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 ql={label:"Ticker items",icon:r(jt,{})};function Jl(e,t,n,o){return{type:"custom",[I]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},render:({value:i,onChange:a})=>r(Fr,{label:e,icon:k(t),items:Array.isArray(i)?i:[],placeholder:n,onChange:a,markup:o==="markup"})}}function Fr({label:e,icon:t,items:n,placeholder:o,onChange:i,markup:a=!1}){const c=te(null),[s,d]=z(null),u=p=>p.map(m=>({text:m?.text??""})),f=p=>{const m=Lr(n,p,s);m===null&&(c.current=null),d(m),i(u(p))};return r(xn,{label:l(e),icon:t,noun:l("item"),items:n,onChange:f,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?r(Ge,{target:c,value:Nr(n,s),onChange:p=>i(Ar(n,s??-1,p)),disabled:s===null,label:s===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:s+1})}):void 0,renderRow:(p,m,b)=>r("input",{type:"text",className:a&&s===m?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:m+1}),onChange:C=>b({text:C.target.value}),onFocus:C=>{c.current=C.currentTarget,d(m)}})})}function Zl(e,t){const n=`${e.label} — row ${t+1}`;return G({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function Ql(e){return{_gCards:y("Cards"),coverIndex:w("Cover image",r($t,{}),Gn,String(Mn),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:Qo("Image background",go),cardImage:Dr(),spinOnHover:N("Rotate on hover",e?.spinDefault??!0,r(Zt,{}))}}function ea(){return{outline:w("Card outline",r(Qt,{}),Dn,Hn),indexBadge:w("Card number",r(Re,{}),vn,Bn),showBadge:N("Product badge",!0,r(Ne,{noun:"tag"}))}}function ta(e){const t=e?.bottomDefault??!0;return{_gShowOnCard:y("Show on a card"),showCardPrice:N("Price",!0,r(Mt,{})),showCardFinishes:N("Finish swatches",!0,r(Kt,{})),showCardSizes:N("Sizes",t,r(qt,{})),showCardBuy:N("Buy button",t,r(Lt,{})),showCardPage:N("Page button",t,r(ke,{}))}}function na(e,t="display"){const n=v(t);return{[t]:g("desktop",{type:"custom",render:({value:o,onChange:i})=>r(pt,{parts:e,changed:yn(o),shown:a=>Cn(o,a),onPress:(a,c)=>i(En(o,a,c)),onReset:()=>i(void 0)})}),[n]:g("mobile",{type:"custom",render:({value:o,onChange:i})=>r(vr,{parts:e,desktopKey:t,value:o,onChange:i})})}}function pt({parts:e,changed:t,shown:n,onPress:o,onReset:i,detail:a}){const c=l("Display");return r(h,{label:c,icon:r(wt,{}),changed:t,action:r(S,{words:x()?.panel,label:c,changed:t,detail:a,onReset:i}),children:r(Sn,{label:c,items:e.map(s=>({id:s.id,label:l(s.label),shown:n(s.id)})),onChange:o})})}function vr({parts:e,desktopKey:t,value:n,onChange:o}){const i=W()[t];return r(pt,{parts:e,changed:In(n),shown:a=>_n(i,n,a),onPress:(a,c)=>o(Rn(n,a,c)),onReset:()=>o(Ln),detail:l("the same as Desktop")})}function Dr(){return nt("Card image",{min:L,max:Se,step:gt,hint:"Rounds the picture. The card's own corner is in Site styles."})}function oa(){return se({sidesKey:"cornerSides",step:bt,useFollowed:()=>L,mark:r(Br,{label:xt}),hint:l("Rounds the picture. Left alone it stays square.")})}function Br({label:e,changed:t=!1,onReset:n=()=>{}}){return r(S,{words:x()?.panel,label:l(e),changed:t,onReset:n})}function ra(){return{type:"custom",render:({value:e,onChange:t})=>r(Hr,{value:typeof e=="string"?e:"",onChange:t})}}function Hr({value:e,onChange:t}){const[n,o]=z(null),i=ye.filter(c=>n===null||F[c].across===n),a=e&&e in F?F[e]:null;return P(R,{children:[r(h,{label:l("Photos in a row"),icon:r(Ft,{}),children:P("div",{className:"sf-gallery-filter",children:[r("button",{type:"button","aria-pressed":n===null,onClick:()=>o(null),children:l("All")}),yt.map(c=>r("button",{type:"button","aria-pressed":n===c,onClick:()=>o(c),children:c},c))]})}),r(h,{label:l("Layout"),icon:r(Wt,{}),value:a?l(a.label):l("Not chosen"),hint:l("{n} of {total} layouts",{n:i.length,total:ye.length}),children:r("div",{className:"sf-gallery-layouts",children:i.map(c=>r(q,{content:l(F[c].label),className:"sf-tile-tip",children:r("button",{type:"button","aria-pressed":e===c,"aria-label":l(F[c].label),onClick:()=>t(e===c?"":c),children:r("span",{className:"sf-gallery-pic",children:F[c].desktop.map(([s,d],u)=>r("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${d}`}},u))})})},c))})})]})}export{Xo as ANCHOR_HINT,Ji as BOUND_TO_POST_NOTE,ol as BUCKET_ICONS,zl as CUSTOM_FIELD_MEDIA,Vl as CoordsField,Ml as EDGE_ARROWS,Be as FOCAL_DEFAULT,Tr as FOCAL_POINTS,V as FOLD_FIELD_MARKER,dt as FocalPicker,Zo as GroupLabel,Uo as HIGHLIGHT_HINT,H as HidableTextField,ge as LINK_FIELD_MARKER,Ui as Label,be as MEDIA_FIELD_MARKER,$l as MEDIA_TYPE_OPTIONS,qo as PanelNoteLine,ut as PlacementGridView,xe as SCAFFOLD_FIELD_MARKER,sa as SCALAR_TEXT_CONTROLS,it as SECTION_BLEEDS_HINT,yr as SIDE_PAD_KEYS,Vo as SectionHeading,de as Segmented,Mo as SiteGapDefaultReset,M as Slider,tt as Swatches,aa as TEXT_CONTROL_KINDS,I as TEXT_FIELD_MARKER,ql as TICKER_ITEMS_ROW,Fr as TextListField,Ko as WidthDefaultReset,Lr as aimAfterListChange,Ll as anchorFields,B as backTo,fl as backgroundField,yl as boxAlignField,Il as boxBlockSpacingField,Sl as boxJustifyField,El as boxPhoneRowField,_l as boxShareField,Cl as boxWrapField,sl as bucketHeader,ur as cardCornersField,Qo as cardImageBackgroundField,Dr as cardImageField,Ql as cardMediaFields,xl as cardShapeFields,ta as cardShowFields,ea as cardStyleFields,Ol as cellWidthFields,Dl as checkbox,Bl as colorInput,el as copyText,rt as cornerSidesField,se as cornersRowField,Fl as dateTime,dl as designGroupHeader,Rl as directionField,na as displayFields,Kl as edgePad,rl as entriesHiddenForTab,Hl as focalPicker,Yl as focusAfterRemove,ul as foldMarker,Y as foldMetaOf,Jo as foldTitleOf,ra as galleryLayoutField,hl as gapField,y as group,Nl as heightFields,he as hidableText,jo as hintIsWhileTyping,k as iconOf,oa as imageCornersField,qi as inOwnBox,al as isBucketHeader,cl as isDesignGroupHeader,Bo as isNoGlyph,tl as linkField,Wl as multiSelect,Do as noGlyph,vl as pageBackgroundField,il as panelNote,gr as phoneOverrideField,Gl as placementField,zo as plainText,nl as plainTextarea,nt as pxField,pl as quietMarker,me as readHidable,Nr as rowText,Ul as searchSelect,ll as section,bl as sectionAnimationFields,at as sectionBorderField,or as sectionCornersField,gl as sectionShapeFields,ml as sectionThemeFields,ue as segmented,w as select,Ar as setRowText,Pl as sidesPaddingFields,Cr as sidesPaddingPatch,Tl as sizeField,K as slider,Xl as sourceField,wl as spacingFields,Al as stickFields,Zi as text,mt as textFieldIdentifier,ji as textFieldOffPage,Vi as textFieldPanelOnly,Jl as textList,Zl as textListRowField,Qi as textarea,N as toggle,jl as upload,Ho as usePageWidthDetail,Go as useSiteGapDetail,kl as widthField,Yi as withIdentifier,$i as withOffPage,zi as withPanelOnly,Xi as withScaffold};
@@ -1 +1 @@
1
- import{anchorFields as m,bucketHeader as L,cardMediaFields as N,cardShowFields as Y,cardStyleFields as U,designGroupHeader as F,foldMarker as W,foldMetaOf as h,group as z,quietMarker as q,heightFields as E,sectionAnimationFields as w,sectionShapeFields as O,sectionThemeFields as D,sidesPaddingFields as B,widthField as T}from"./controls.js";import{deviceField as J,deviceMetaOf as x}from"./device-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as Q}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"./field-buckets.js";const A=Q;function V(e){return e==="Animation"?"Animation":"Design"}const X="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Texture:"Design","Text style":"Design",Motion:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Controls:"Layout",Diagram:"Layout",[X]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Nudge:"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Height:"Size"},P={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},$={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return $[a]??P[a]??I[o]}function se(e,t,o){const a=_(e,t,o);return a?V(a):void 0}function G(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=x(a),p=h(C?C.inner:a),u=p?I[p.label]:void 0;if(u)for(const g of G(u))t.includes(g)||t.push(g)}return t}const he=[...S(B(),T("full"),E(),m()),...Object.keys(B()),...Object.keys(T("full")),...Object.keys(E()),...Object.keys(m())],be=[...S(D()),...Object.keys(D())],Ce=[...S(O()),...Object.keys(O())],pe=[...S(w()),...Object.keys(w())],Z=Object.keys(N()),ee=new Set(["cardImage","imageBackground"]),ge=[...G(_("ProductGrid","_gCards","Cards")??"Design"),...Z.filter(e=>e.startsWith("_g")||ee.has(e))],ye=Object.keys(U()),ke=Object.keys(Y({bottomDefault:!0})),te={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","EmailFormBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","BrandStrip._gContent":"duplicated the Content bucket header above it (66338)","BrandStrip._gStyle":"duplicated the Style bucket header above it (66338)","BrandStrip._gLayout":"duplicated the Layout bucket header above it (66338)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},H={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},K={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...B(),...T("full"),...E(),...m(),...D(),...O(),...w()};for(const t of Object.keys(K)){const o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!H[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/puck/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const ne=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),oe=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function _e(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ae(e){const t=`${e}.`;return Object.keys(te).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function ie(e,t){const o=x(e),a=z(t);return o?J(o.tier,a):a}function re(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?W(t,o.label):q(t):t}function M(e){return e==="Design"?k:["Animation"]}function Se(e,t){const o=[],a=new Set(ae(t)),C=new Set;let p=!1,u=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(ne.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=oe.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(p=!0),o.push(u={place:c,entries:[],adopted:!0});continue}if(!i){u||o.push(u={place:"Content",entries:[]}),u.entries.push([n,r]);continue}if(a.has(n)||n in K){const s=_(t,n,i.label);if(i.level!==2||!s||!H[s].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/puck/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(u={place:s,entries:[]});continue}const l=_(t,n,i.label);if(!l)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/puck/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(u={place:l,entries:[[n,i.level===2?r:ie(r,i.label)]]})}const g=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",$],["KEY_GROUP",P]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!g.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/puck/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=p?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/puck/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>M(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of M(n)){if(!R.has(r))continue;const i=o.filter(l=>l.place===r),c=i.findIndex(l=>l.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=F(r));for(const l of i)for(const[s,j]of l.entries)y[s]=re(r,j)}}return y}function ve(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function fe(e){return A.some(t=>d[t]in e)}function me(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{$ as BLOCK_KEY_GROUP,ge as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,Z as CARD_MEDIA_FIELD_KEYS,ke as CARD_SHOW_FIELD_KEYS,ye as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,X as EDITOR_ONLY_GROUP,K as INJECTED_RETIRED,P as KEY_GROUP,I as LABEL_GROUP,he as LAYOUT_FIELD_KEYS,H as PLACE_WORDS,te as RETIRED,pe as SECTION_ANIM_FIELD_KEYS,Ce as SECTION_SHAPE_FIELD_KEYS,be as SECTION_THEME_FIELD_KEYS,Se as assignSectionGroups,se as bucketOf,V as bucketOfPlace,_e as foldTopTier,fe as hasBucketTabs,S as headerKeysOf,G as headerKeysOfPlace,_ as placeOf,me as reseatBucketTabs,ae as retiredHeadings,ve as seatDesignBucket};
1
+ import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,group as q,quietMarker as J,heightFields as E,sectionAnimationFields as w,sectionShapeFields as O,sectionThemeFields as D,sidesPaddingFields as B,stickFields as x,widthField as T}from"./controls.js";import{deviceField as Q,deviceMetaOf as P}from"./device-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"./field-buckets.js";const A=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Texture:"Design","Text style":"Design",Motion:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},G={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return G[a]??$[a]??I[o]}function he(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function H(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=P(a),p=h(C?C.inner:a),u=p?I[p.label]:void 0;if(u)for(const g of H(u))t.includes(g)||t.push(g)}return t}const be=[...S(B(),T("full"),E(),m(),x()),...Object.keys(B()),...Object.keys(T("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],Ce=[...S(D()),...Object.keys(D())],pe=[...S(O()),...Object.keys(O())],ge=[...S(w()),...Object.keys(w())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),ye=[...H(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ke=Object.keys(W()),_e=Object.keys(U({bottomDefault:!0})),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","EmailFormBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","BrandStrip._gContent":"duplicated the Content bucket header above it (66338)","BrandStrip._gStyle":"duplicated the Style bucket header above it (66338)","BrandStrip._gLayout":"duplicated the Layout bucket header above it (66338)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...B(),...T("full"),...E(),...m(),...D(),...O(),...w()};for(const t of Object.keys(M)){const o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!K[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/puck/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function Se(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(ne).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function re(e,t){const o=P(e),a=q(t);return o?Q(o.tier,a):a}function de(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?z(t,o.label):J(t):t}function j(e){return e==="Design"?k:["Animation"]}function ve(e,t){const o=[],a=new Set(ie(t)),C=new Set;let p=!1,u=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(oe.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(p=!0),o.push(u={place:c,entries:[],adopted:!0});continue}if(!i){u||o.push(u={place:"Content",entries:[]}),u.entries.push([n,r]);continue}if(a.has(n)||n in M){const s=_(t,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/puck/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(u={place:s,entries:[]});continue}const l=_(t,n,i.label);if(!l)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/puck/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(u={place:l,entries:[[n,i.level===2?r:re(r,i.label)]]})}const g=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",G],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!g.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/puck/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=p?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/puck/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>j(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!R.has(r))continue;const i=o.filter(l=>l.place===r),c=i.findIndex(l=>l.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=F(r));for(const l of i)for(const[s,N]of l.entries)y[s]=de(r,N)}}return y}function fe(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function me(e){return A.some(t=>d[t]in e)}function Le(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{G as BLOCK_KEY_GROUP,ye as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,_e as CARD_SHOW_FIELD_KEYS,ke as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,be as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,ge as SECTION_ANIM_FIELD_KEYS,pe as SECTION_SHAPE_FIELD_KEYS,Ce as SECTION_THEME_FIELD_KEYS,ve as assignSectionGroups,he as bucketOf,X as bucketOfPlace,Se as foldTopTier,me as hasBucketTabs,S as headerKeysOf,H as headerKeysOfPlace,_ as placeOf,Le as reseatBucketTabs,ie as retiredHeadings,fe as seatDesignBucket};
@@ -1 +1 @@
1
- "use client";import{Fragment as f,jsx as u,jsxs as S}from"react/jsx-runtime";import{useMemo as I,useRef as g}from"react";import{EaselCanvas as C,useEaselApi as P}from"efficient-easel/easel";import h from"../../components/PreviewThemeFrame.js";import{OpenDocumentChromeLoadNotice as T}from"../../components/PinnedChromeLoadNotice.js";import{usePreviewParts as y}from"../../components/PreviewPartsContext.js";import{partElement as w,partTypingTarget as A,setCanvasTypingPart as v}from"./canvas-typing.js";import{partOpenOn as F,PART_ATTR as m}from"./text-parts.js";import{useSectionOps as x}from"./use-section-ops.js";import{useBlockMetadata as D}from"../editor-block-metadata.js";import{useEditorCanvasStyles as O}from"../editor-canvas-styles.js";function j({children:n,componentId:o}){const{selectedPartId:a}=y();return F(a,o)?u(f,{}):u(f,{children:n})}function q(n){const{mirrorHostStyles:o}=O(),a=D(),l=g(null),s=E(l),{onDocument:p}=n,c=t=>{l.current=t,p?.(t)};return S(f,{children:[u(T,{}),u(C,{...n,onDocument:c,typing:s,metadata:n.metadata??a,height:"fill",mirrorStyles:o,frameWrapper:h,overlay:j})]})}function E(n){const o=P(),a=x(),l=y(),s=g({ops:a,parts:l});return s.current={ops:a,parts:l},I(()=>{const p={getItemById:t=>o.getState().getItemById(t),getSelectorForId:t=>o.getState().getSelectorForId(t),get components(){return o.getState().config.components},replace:(t,e,r)=>s.current.ops.replaceComponent(t,e,r)},c=(t,e)=>{const r=A(t,p);if(!r)return null;let i=e;const d=()=>(i=w(i,i?.ownerDocument??n.current,t),i);return d()?{element:d,value:r.value,rules:r.rules,multiline:r.multiline,write:r.write,toolbar:{offered:r.offered}}:null};return{at:t=>{const e=t.closest(`[${m}]`),r=e?.getAttribute(m);return e&&r?c(r,e):null},atSelection:()=>{const t=s.current.parts.selectedPartId;return t?c(t,null):null},onChange:t=>{if(!t.typing){v(null);return}const e=t.element.closest(`[${m}]`)?.getAttribute(m)??null;v(e),e&&s.current.parts.selectedPartId!==e&&s.current.parts.select(e)}}},[o,n])}export{q as SiteCanvas};
1
+ "use client";import{Fragment as f,jsx as m,jsxs as S}from"react/jsx-runtime";import{useMemo as h,useRef as y}from"react";import{EaselCanvas as C,useEaselApi as P}from"efficient-easel/easel";import T from"../../components/PreviewThemeFrame.js";import{OpenDocumentChromeLoadNotice as w}from"../../components/PinnedChromeLoadNotice.js";import{usePreviewParts as v}from"../../components/PreviewPartsContext.js";import{partElement as A,partTypingTarget as F,setCanvasTypingPart as I}from"./canvas-typing.js";import{partThemeColors as x,readInks as D}from"./part-inks.js";import{partOpenOn as O,PART_ATTR as u}from"./text-parts.js";import{useSectionOps as j}from"./use-section-ops.js";import{useBlockMetadata as E}from"../editor-block-metadata.js";import{useEditorCanvasStyles as _}from"../editor-canvas-styles.js";function b({children:n,componentId:o}){const{selectedPartId:a}=v();return O(a,o)?m(f,{}):m(f,{children:n})}function K(n){const{mirrorHostStyles:o}=_(),a=E(),l=y(null),s=B(l),{onDocument:p}=n,c=e=>{l.current=e,p?.(e)};return S(f,{children:[m(w,{}),m(C,{...n,onDocument:c,typing:s,metadata:n.metadata??a,height:"fill",mirrorStyles:o,frameWrapper:T,overlay:b})]})}function B(n){const o=P(),a=j(),l=v(),s=y({ops:a,parts:l});return s.current={ops:a,parts:l},h(()=>{const p={getItemById:e=>o.getState().getItemById(e),getSelectorForId:e=>o.getState().getSelectorForId(e),get components(){return o.getState().config.components},replace:(e,t,r)=>s.current.ops.replaceComponent(e,t,r)},c=(e,t)=>{const r=F(e,p);if(!r)return null;let i=t;const d=()=>(i=A(i,i?.ownerDocument??n.current,e),i),g=d();return g?{element:d,value:r.value,rules:r.rules,multiline:r.multiline,write:r.write,toolbar:{offered:r.offered,colors:r.offered.length>0?x(D(g)):void 0}}:null};return{at:e=>{const t=e.closest(`[${u}]`),r=t?.getAttribute(u);return t&&r?c(r,t):null},atSelection:()=>{const e=s.current.parts.selectedPartId;return e?c(e,null):null},onChange:e=>{if(!e.typing){I(null);return}const t=e.element.closest(`[${u}]`)?.getAttribute(u)??null;I(t),t&&s.current.parts.selectedPartId!==t&&s.current.parts.select(t)}}},[o,n])}export{K as SiteCanvas};
@@ -1 +1,2 @@
1
- import{jsx as r,jsxs as k}from"react/jsx-runtime";import{storedTextStyles as K,textStylesCss as Y}from"../site-text-styles.js";import{pageWidthMarker as q,PAGE_WIDTH_ATTR as J,SITE_WIDTH_CAP as Q,siteWidthTokens as U,siteGutterTokens as Z,heroBackgroundTokens as ee}from"../content/page-width.js";import{siteBlockGapTokens as te}from"../content/container-gap.js";import{siteCardRadiusTokens as oe}from"../content/card-corners.js";import{usePreviewHeader as ne}from"../../components/PreviewHeaderContext.js";import{SitePhotographyProvider as re}from"../../components/SitePhotographyContext.js";import{CORNER_STYLE_TO_PX as se,normalizeCornerStyle as ae,normalizeCornerRadius as de,themeColorStyle as ie,typeSizesStyle as ce,headingTypographyStyle as le,themeAccentStyle as he,themeButtonStyle as pe,themePresetAccentVars as fe,themeSurfaceStyle as me,siteCornerRadiusTokens as A,shadowColorTokens as ue,headingCompressionAttr as ge,cardShadowAttr as ye,cardGapAttr as Se,hoverEffectAttr as xe}from"../theme.js";import{fontRoleStyle as Te}from"../fonts.js";import{isStandaloneSectionDocument as Ce,pageHasHeaderSection as v,pageTakesTopSpace as ke,topSpaceMarker as Ae,TOP_SPACE_ATTR as ve,HEADER_CLEARANCE_CLASS as Ee}from"./header-clearance.js";import{leadSectionInk as _e,HEADER_INK_ATTR as Pe}from"./header-ink.js";import{useEasel as we}from"efficient-easel/easel";import{pageBackgroundVars as E}from"../content/page-background.js";const Re="color-mix(in oklab, var(--bg) 40%, #ffffff)",He="12vh";function We({style:t,frameClass:o,children:s}){const{appState:n}=we(g=>g),a=n.data.content,d=n.data.root;if(Ce(a))return r("div",{className:`sf-themed-content${o?` ${o}`:""}`,style:{...t,background:Re,minHeight:"100vh",paddingBottom:He},children:r("div",{style:{background:"var(--bg)"},children:s})});const c=v(a)&&ke(d,a),l=v(a)?Ae(d,a):null,f=l?{[ve]:l}:null,h=q(d?.widthChoice),m=h?{[J]:h}:null,p=c?null:_e(a),u=p?{[Pe]:p}:null;return r("div",{className:`sf-themed-content${c?` ${Ee}`:""}${o?` ${o}`:""}`,style:t,...u,...f,...m,children:r("div",{style:{background:"var(--bg)",minHeight:"100%"},children:s})})}function _(t){return{frameClass:void 0,style:{"--sf-page-width":Q}}}function Ie({w:t,children:o}){const{frameClass:s,style:n}=_(t);return r("div",{className:s,style:n,children:o})}function Xe({propsTheme:t,propsFonts:o,propsCornerStyle:s,propsCornerRadiusPx:n,propsHeadingCompression:a,propsHeadingTypography:d,widthMode:c,fullWidth:l,pageWidth:f,pageBackground:h,chromeInheritsSiteBackground:m,suppressPreviewNav:p,footer:u,overlay:g,children:P}){const{theme:w,fonts:R,sizes:H,cornerRadiusPx:W,cardShadow:y,shadowColor:I,cardGap:G,hoverEffect:S,headingCompression:N,siteWidth:b,siteGutter:B,blockGap:D,headingTypography:z,heroBackgroundFollowsWidth:V,photographyGrayscale:$,textStyles:F,themeFromDocument:e}=ne(),i=e?t:w,L=e?o:R,O=e?void 0:H,x=e?n===void 0?se[ae(s)]:de(n):W,j=e?a:N,T=Y(K(e?void 0:F)),M=e?d:z,C=_({widthMode:c,fullWidth:l,pageWidth:f}),X={...ie(i),...ce(O),...le(M),...C.style,...m?{}:E(h)};return k("div",{className:"sf-theme-surfaces sf-theme-accent",style:{...Te(L),...he(i),...pe(i),...fe(i),...me(i),...A(x),...oe(A(x)),...ue(e?void 0:y,e?void 0:I,e?void 0:S),...U(e?void 0:b),...Z(e?void 0:B),...te(e?void 0:D),...ee(e?void 0:V)},"data-sf-headings":ge(j),"data-sf-card-shadow":e?void 0:ye(y),"data-sf-card-gap":e?void 0:Se(G),"data-sf-card-hover":e?void 0:xe(S),onClickCapture:p,children:[T?r("style",{"data-sf-text-styles":"",dangerouslySetInnerHTML:{__html:T}}):null,k(re,{grayscale:e?void 0:$,children:[r(We,{style:X,frameClass:C.frameClass,children:P}),u,g]})]})}const Ke=t=>{t.target?.closest?.("a")&&t.preventDefault()};function Ye({pageBackground:t,inheritBackground:o=!1,w:s,children:n}){return r("div",{style:{...o?{}:E(t),background:"var(--bg)",minHeight:"100%",overflowX:"clip"},children:r(Ie,{w:s,children:n})})}export{We as EditorPageBody,Xe as EditorThemedBody,Ie as PageWidthWrapper,Ye as PublishedPageFrame,Re as SECTION_PREVIEW_CANVAS,He as SECTION_PREVIEW_CANVAS_TAIL,_ as pageWidthTokens,Ke as suppressPreviewNav};
1
+ import{jsx as r,jsxs as A}from"react/jsx-runtime";import{accentItalicCss as K,storedTextStyles as Y,textStylesCss as q}from"../site-text-styles.js";import{pageWidthMarker as J,PAGE_WIDTH_ATTR as Q,SITE_WIDTH_CAP as U,siteWidthTokens as Z,siteGutterTokens as ee,heroBackgroundTokens as te}from"../content/page-width.js";import{siteBlockGapTokens as oe}from"../content/container-gap.js";import{siteCardRadiusTokens as ne}from"../content/card-corners.js";import{usePreviewHeader as re}from"../../components/PreviewHeaderContext.js";import{SitePhotographyProvider as ae}from"../../components/SitePhotographyContext.js";import{CORNER_STYLE_TO_PX as se,normalizeCornerStyle as ie,normalizeCornerRadius as de,themeColorStyle as ce,typeSizesStyle as le,headingTypographyStyle as he,normalizeHeadingTypography as pe,themeAccentStyle as fe,themeButtonStyle as me,themePresetAccentVars as ue,themeSurfaceStyle as ge,siteCornerRadiusTokens as v,shadowColorTokens as ye,headingCompressionAttr as Se,cardShadowAttr as xe,cardGapAttr as Te,hoverEffectAttr as Ce}from"../theme.js";import{fontRoleStyle as ke}from"../fonts.js";import{isStandaloneSectionDocument as Ae,pageHasHeaderSection as E,pageTakesTopSpace as ve,topSpaceMarker as Ee,TOP_SPACE_ATTR as _e,HEADER_CLEARANCE_CLASS as Pe}from"./header-clearance.js";import{leadSectionInk as we,HEADER_INK_ATTR as Re}from"./header-ink.js";import{useEasel as He}from"efficient-easel/easel";import{pageBackgroundVars as _}from"../content/page-background.js";const Ie="color-mix(in oklab, var(--bg) 40%, #ffffff)",We="12vh";function Ge({style:t,frameClass:o,children:a}){const{appState:n}=He(g=>g),s=n.data.content,i=n.data.root;if(Ae(s))return r("div",{className:`sf-themed-content${o?` ${o}`:""}`,style:{...t,background:Ie,minHeight:"100vh",paddingBottom:We},children:r("div",{style:{background:"var(--bg)"},children:a})});const c=E(s)&&ve(i,s),l=E(s)?Ee(i,s):null,f=l?{[_e]:l}:null,h=J(i?.widthChoice),m=h?{[Q]:h}:null,p=c?null:we(s),u=p?{[Re]:p}:null;return r("div",{className:`sf-themed-content${c?` ${Pe}`:""}${o?` ${o}`:""}`,style:t,...u,...f,...m,children:r("div",{style:{background:"var(--bg)",minHeight:"100%"},children:a})})}function P(t){return{frameClass:void 0,style:{"--sf-page-width":U}}}function Ne({w:t,children:o}){const{frameClass:a,style:n}=P(t);return r("div",{className:a,style:n,children:o})}function Ye({propsTheme:t,propsFonts:o,propsCornerStyle:a,propsCornerRadiusPx:n,propsHeadingCompression:s,propsHeadingTypography:i,widthMode:c,fullWidth:l,pageWidth:f,pageBackground:h,chromeInheritsSiteBackground:m,suppressPreviewNav:p,footer:u,overlay:g,children:w}){const{theme:R,fonts:H,sizes:I,cornerRadiusPx:W,cardShadow:y,shadowColor:G,cardGap:N,hoverEffect:S,headingCompression:b,siteWidth:B,siteGutter:z,blockGap:D,headingTypography:V,heroBackgroundFollowsWidth:$,photographyGrayscale:j,textStyles:F,themeFromDocument:e}=re(),d=e?t:R,L=e?o:H,O=e?void 0:I,x=e?n===void 0?se[ie(a)]:de(n):W,M=e?s:b,T=e?i:V,C=[q(Y(e?void 0:F)),K(pe(T).italicStrong)].filter(Boolean).join(`
2
+ `),k=P({widthMode:c,fullWidth:l,pageWidth:f}),X={...ce(d),...le(O),...he(T),...k.style,...m?{}:_(h)};return A("div",{className:"sf-theme-surfaces sf-theme-accent",style:{...ke(L),...fe(d),...me(d),...ue(d),...ge(d),...v(x),...ne(v(x)),...ye(e?void 0:y,e?void 0:G,e?void 0:S),...Z(e?void 0:B),...ee(e?void 0:z),...oe(e?void 0:D),...te(e?void 0:$)},"data-sf-headings":Se(M),"data-sf-card-shadow":e?void 0:xe(y),"data-sf-card-gap":e?void 0:Te(N),"data-sf-card-hover":e?void 0:Ce(S),onClickCapture:p,children:[C?r("style",{"data-sf-text-styles":"",dangerouslySetInnerHTML:{__html:C}}):null,A(ae,{grayscale:e?void 0:j,children:[r(Ge,{style:X,frameClass:k.frameClass,children:w}),u,g]})]})}const qe=t=>{t.target?.closest?.("a")&&t.preventDefault()};function Je({pageBackground:t,inheritBackground:o=!1,w:a,children:n}){return r("div",{style:{...o?{}:_(t),background:"var(--bg)",minHeight:"100%",overflowX:"clip"},children:r(Ne,{w:a,children:n})})}export{Ge as EditorPageBody,Ye as EditorThemedBody,Ne as PageWidthWrapper,Je as PublishedPageFrame,Ie as SECTION_PREVIEW_CANVAS,We as SECTION_PREVIEW_CANVAS_TAIL,P as pageWidthTokens,qe as suppressPreviewNav};
@@ -1,3 +1,4 @@
1
+ import type { CopyThemeColor } from "efficient-easel/copy";
1
2
  import { type WordStyleColour } from "../word-styles.js";
2
3
  export type PartInk = {
3
4
  key: WordStyleColour;
@@ -5,5 +6,6 @@ export type PartInk = {
5
6
  value: string;
6
7
  };
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[];
8
10
  export declare function readInks(element: HTMLElement): Partial<Record<WordStyleColour, string>>;
9
11
  export declare function toHex(css: string): string | null;
@@ -1 +1 @@
1
- import{COLOUR_TOKEN as m,WORD_STYLE_COLOURS as s,WORD_STYLE_COLOUR_LABELS as p}from"../word-styles.js";const S="#9ca3af";function O(n){return s.map(t=>({key:t,name:p[t],value:n?.[t]||S}))}function L(n){const t={},r=n.ownerDocument,e=r?.defaultView;if(!r||!e)return t;const u=e.getComputedStyle(n),o=r.createElement("canvas").getContext("2d");for(const c of s){const l=m[c].replace(/^var\((--[\w-]+)\)$/,"$1"),i=u.getPropertyValue(l).trim();if(!i)continue;let a=f(i);!a&&o&&(o.fillStyle="#000000",o.fillStyle=i,a=f(String(o.fillStyle))),a&&(t[c]=a)}return t}function f(n){const t=n.trim().toLowerCase();if(/^#[0-9a-f]{6}$/.test(t))return t;if(/^#[0-9a-f]{3}$/.test(t))return`#${[...t.slice(1)].map(e=>e+e).join("")}`;const r=t.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{O as partInks,L as readInks,f as toHex};
1
+ import{say as m}from"../editor-words.js";import{COLOUR_TOKEN as p,WORD_STYLE_COLOURS as c,WORD_STYLE_COLOUR_LABELS as S}from"../word-styles.js";const d="#9ca3af";function O(e){return c.map(t=>({key:t,name:S[t],value:e?.[t]||d}))}function C(e){return O(e).map(t=>({name:t.key,label:m(t.name),value:t.value}))}function _(e){const t={},r=e.ownerDocument,n=r?.defaultView;if(!r||!n)return t;const u=n.getComputedStyle(e),o=r.createElement("canvas").getContext("2d");for(const s of c){const f=p[s].replace(/^var\((--[\w-]+)\)$/,"$1"),i=u.getPropertyValue(f).trim();if(!i)continue;let a=l(i);!a&&o&&(o.fillStyle="#000000",o.fillStyle=i,a=l(String(o.fillStyle))),a&&(t[s]=a)}return t}function l(e){const t=e.trim().toLowerCase();if(/^#[0-9a-f]{6}$/.test(t))return t;if(/^#[0-9a-f]{3}$/.test(t))return`#${[...t.slice(1)].map(n=>n+n).join("")}`;const r=t.match(/^rgba?\(\s*(\d+)[\s,]+(\d+)[\s,]+(\d+)/);return r?`#${r.slice(1,4).map(n=>Math.min(255,Number(n)).toString(16).padStart(2,"0")).join("")}`:null}export{O as partInks,C as partThemeColors,_ as readInks,l as toHex};
@@ -1,3 +1,4 @@
1
1
  import type { BlockPass } from "./types.js";
2
2
  export declare const sectionCorners: BlockPass;
3
+ export declare const CARD_BLOCK_KEYS: readonly string[];
3
4
  export declare const cardCorners: BlockPass;
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{CARD_FOLLOWS_SITE_CLASS as c,cardCornerStyle as d}from"../../content/card-corners.js";import{sectionCornerStyle as l}from"../../content/section-corners.js";import{sectionRunsFullWidth as a}from"../../content/section-width.js";const u={name:"sectionCorners",applies:(n,r,e)=>r.isSection(n)&&!!e&&typeof e.render=="function",panel(n,r,e){n.fields={...n.fields,...e.sectionShapeFields()}},draw(n){const r=n.render;n.render=e=>{const s=l(e.sectionCorners,e.sectionCornerSides),t=r(e),i=a(e)?`sf-section-corners ${c}`:"sf-section-corners";return s?o("div",{className:i,style:{display:"contents",...s},children:t}):t}}},C=["CollectionCard"],m={name:"cardCorners",applies:(n,r,e)=>C.includes(n)&&!!e&&typeof e.render=="function",panel(n,r,e){n.fields={...n.fields,...e.cardShapeFields()}},draw(n){const r=n.render;n.render=e=>{const s=d(e.cardCorners,e.cardCornerSides),t=r(e);return s?o("div",{className:"sf-card-corners",style:{display:"contents",...s},children:t}):t}}};export{m as cardCorners,u as sectionCorners};
1
+ import{jsx as o}from"react/jsx-runtime";import{CARD_FOLLOWS_SITE_CLASS as c,cardCornerStyle as d}from"../../content/card-corners.js";import{sectionCornerStyle as l}from"../../content/section-corners.js";import{sectionRunsFullWidth as a}from"../../content/section-width.js";const u={name:"sectionCorners",applies:(n,r,e)=>r.isSection(n)&&!!e&&typeof e.render=="function",panel(n,r,e){n.fields={...n.fields,...e.sectionShapeFields()}},draw(n){const r=n.render;n.render=e=>{const s=l(e.sectionCorners,e.sectionCornerSides),t=r(e),i=a(e)?`sf-section-corners ${c}`:"sf-section-corners";return s?o("div",{className:i,style:{display:"contents",...s},children:t}):t}}},C=["CollectionCard"],m={name:"cardCorners",applies:(n,r,e)=>C.includes(n)&&!!e&&typeof e.render=="function",panel(n,r,e){n.fields={...n.fields,...e.cardShapeFields()}},draw(n){const r=n.render;n.render=e=>{const s=d(e.cardCorners,e.cardCornerSides),t=r(e);return s?o("div",{className:"sf-card-corners",style:{display:"contents",...s},children:t}):t}}};export{C as CARD_BLOCK_KEYS,m as cardCorners,u as sectionCorners};
@@ -1 +1 @@
1
- import{catalogueLabel as m}from"./catalogue-labels.js";import{cellWidth as n}from"./cell-width.js";import{clickableParts as s}from"./clickable-parts.js";import{cardCorners as p,sectionCorners as c}from"./corners.js";import{emptyHeadings as f}from"./empty-headings.js";import{hiddenNodes as a}from"./hidden-nodes.js";import{sectionAnchor as l}from"./section-anchor.js";import{sectionAnimation as d}from"./section-animation.js";import{sectionHeight as h}from"./section-height.js";import{sectionBorder as g}from"./borders.js";import{blockPadding as u,sectionPadding as P}from"./section-padding.js";import{sectionTheme as A,slideTheme as b}from"./section-theme.js";import{buttonAlignInRow as w,containedWidth as C,imageWidth as S,sectionWidth as W}from"./section-width.js";import{blockGroups as B,sectionGroups as G}from"./settings-groups.js";import{openSlotDisallow as H,sectionGroupAllow as L}from"./slot-rules.js";import{registryPassContext as Q}from"./registry-context.js";const T=[L,H,P,c,g,p,u,n,W,C,w,S,h,l,A,d,b,G,B,f,s,a,m];function F(r,e,o){const i=e;for(const t of T)t.applies(r,o,i)&&(o.inspector&&t.panel?.(i,r,o.inspector,o),t.draw?.(i,r,o));return e}export{T as BLOCK_PASSES,F as applyBlockPasses,Q as registryPassContext};
1
+ import{catalogueLabel as m}from"./catalogue-labels.js";import{cellWidth as n}from"./cell-width.js";import{clickableParts as s}from"./clickable-parts.js";import{cardCorners as p,sectionCorners as c}from"./corners.js";import{emptyHeadings as f}from"./empty-headings.js";import{hiddenNodes as a}from"./hidden-nodes.js";import{sectionAnchor as d}from"./section-anchor.js";import{sectionAnimation as l}from"./section-animation.js";import{sectionHeight as h}from"./section-height.js";import{cardSticky as g,sectionSticky as u}from"./section-sticky.js";import{sectionBorder as P}from"./borders.js";import{blockPadding as S,sectionPadding as A}from"./section-padding.js";import{sectionTheme as b,slideTheme as w}from"./section-theme.js";import{buttonAlignInRow as C,containedWidth as W,imageWidth as k,sectionWidth as y}from"./section-width.js";import{blockGroups as B,sectionGroups as G}from"./settings-groups.js";import{openSlotDisallow as H,sectionGroupAllow as L}from"./slot-rules.js";import{registryPassContext as X}from"./registry-context.js";const T=[L,H,A,c,P,p,S,n,y,W,C,k,h,d,b,l,u,g,w,G,B,f,s,a,m];function Q(r,e,o){const i=e;for(const t of T)t.applies(r,o,i)&&(o.inspector&&t.panel?.(i,r,o.inspector,o),t.draw?.(i,r,o));return e}export{T as BLOCK_PASSES,Q as applyBlockPasses,X as registryPassContext};
@@ -1 +1 @@
1
- import{BLOCK_THEME_FOLLOW_LABEL as i,SECTION_THEME_FOLLOW_LABEL as e}from"../../../components/SectionThemePicker.js";import{anchorFields as s,cardShapeFields as d,cellWidthFields as o,heightFields as t,sectionAnimationFields as r,sectionShapeFields as l,sectionThemeFields as n,slider as F,spacingFields as m,sidesPaddingFields as p,widthField as a}from"../controls.js";import{assignSectionGroups as c}from"../field-groups.js";import{dropEmptyHeadings as E}from"../panel-drop-empty-headings.js";const _={spacingFields:m,sidesPaddingFields:p,sectionShapeFields:l,cardShapeFields:d,cellWidthFields:o,widthField:a,heightFields:t,anchorFields:s,sectionThemeFields:n,sectionAnimationFields:r,slider:F,assignSectionGroups:c,dropEmptyHeadings:E,SECTION_THEME_FOLLOW_LABEL:e,BLOCK_THEME_FOLLOW_LABEL:i};export{_ as PASS_INSPECTOR};
1
+ import{BLOCK_THEME_FOLLOW_LABEL as i,SECTION_THEME_FOLLOW_LABEL as e}from"../../../components/SectionThemePicker.js";import{anchorFields as s,cardShapeFields as d,cellWidthFields as o,heightFields as t,sectionAnimationFields as l,sectionShapeFields as r,sectionThemeFields as F,slider as n,spacingFields as m,sidesPaddingFields as p,stickFields as c,widthField as a}from"../controls.js";import{assignSectionGroups as E}from"../field-groups.js";import{dropEmptyHeadings as L}from"../panel-drop-empty-headings.js";const g={spacingFields:m,sidesPaddingFields:p,sectionShapeFields:r,cardShapeFields:d,cellWidthFields:o,widthField:a,heightFields:t,anchorFields:s,stickFields:c,sectionThemeFields:F,sectionAnimationFields:l,slider:n,assignSectionGroups:E,dropEmptyHeadings:L,SECTION_THEME_FOLLOW_LABEL:e,BLOCK_THEME_FOLLOW_LABEL:i};export{g as PASS_INSPECTOR};
@@ -0,0 +1,3 @@
1
+ import type { BlockPass } from "./types.js";
2
+ export declare const sectionSticky: BlockPass;
3
+ export declare const cardSticky: BlockPass;
@@ -0,0 +1 @@
1
+ import{jsx as k}from"react/jsx-runtime";import{SECTION_STICK_EXCLUDED as S,hasPhoneStick as y,resolveSectionStick as h,sectionStickAttrs as _}from"../../content/section-sticky.js";import{CARD_BLOCK_KEYS as x}from"./corners.js";const T=f("sectionSticky",(t,n,e)=>n.isSection(t)&&!S.has(t)&&!!e&&typeof e.render=="function"),E=f("cardSticky",(t,n,e)=>x.includes(t)&&!!e&&typeof e.render=="function");function f(t,n){return{name:t,applies:n,panel(e,s,o){e.fields={...e.fields,...o.stickFields()};const i=e.resolveFields;e.resolveFields=(c,l)=>{const r=i?i(c,l):l.fields,u=c?.props??{},d=a=>C(a,u);return r&&typeof r.then=="function"?r.then(d):d(r)}},draw(e){const s=e.render;e.render=o=>{const i=_(o);return i?k("div",{className:i.className,style:i.style,children:s(o)}):s(o)}}}}function C(t,n){if(!t||!("stickTop"in t))return t;const e=h(n),s={...t};return e.desktop||delete s.stickTopDistance,(!y(n)||!e.phone)&&delete s.stickTopDistancePhone,s}export{E as cardSticky,T as sectionSticky};
@@ -32,6 +32,7 @@ export type PassInspector = {
32
32
  widthField: (defaultMode: "full" | "page") => FieldMap;
33
33
  heightFields: () => FieldMap;
34
34
  anchorFields: () => FieldMap;
35
+ stickFields: () => FieldMap;
35
36
  sectionThemeFields: (readValue?: (v: unknown) => unknown, followLabel?: string) => FieldMap;
36
37
  sectionAnimationFields: () => FieldMap;
37
38
  slider: (label: string, icon: ReactElement, min: number, max: number, step: number, fallback: number, suffix?: string) => unknown;
@@ -0,0 +1,21 @@
1
+ import { type FontsValue } from "./fonts.js";
2
+ import type { SiteThemeRowPatch } from "./site-theme-row.js";
3
+ import { type OldSiteText, type StoredTextStyle } from "./site-text-styles.js";
4
+ import { type HeadingCompression, type ResolvedHeadingTypography, type SizesValue } from "./theme.js";
5
+ export type SiteTextStylesWriter = {
6
+ fonts: FontsValue;
7
+ sizes: SizesValue;
8
+ compression: HeadingCompression;
9
+ typography: ResolvedHeadingTypography;
10
+ old: OldSiteText;
11
+ saved: unknown;
12
+ write: (next: {
13
+ saved: StoredTextStyle[];
14
+ old: OldSiteText;
15
+ }, immediate?: boolean) => void;
16
+ writeRoot: (next: Record<string, unknown>) => void;
17
+ };
18
+ export declare function useSiteTextStylesWriter({ themeFromDocument, persist, }: {
19
+ themeFromDocument: boolean;
20
+ persist: (patch: SiteThemeRowPatch, immediate?: boolean) => void;
21
+ }): SiteTextStylesWriter;
@@ -0,0 +1 @@
1
+ "use client";import{useEasel as E}from"efficient-easel/easel";import{usePreviewHeader as P}from"../components/PreviewHeaderContext.js";import{normalizeFonts as R}from"./fonts.js";import{listChangePatch as A,resolveTextStyles as I,textStylesToOld as L}from"./site-text-styles.js";import{DEFAULT_SIZES as O,normalizeHeadingCompression as U,normalizeHeadingTypography as W}from"./theme.js";function B({themeFromDocument:t,persist:c}){const{appState:g,dispatch:l}=E(s=>s),{fonts:f,setFonts:h,sizes:S,setSizes:T,headingCompression:z,setHeadingCompression:m,headingTypography:C,setHeadingTypography:u,textStyles:v,setTextStyles:H}=P(),r=g.data,e=r.root?.props??{},i=t?R(e.fonts):f,p=t?O:S,n=t?U(e.headingCompression):z,a=t?W(e.headingTypography):C,y={fonts:i,sizes:p,compression:n,typography:a},w=t?e.textStyles:v,d=s=>l({type:"replaceRoot",root:{...r.root,props:{...e,...s}},recordHistory:!0});return{fonts:i,sizes:p,compression:n,typography:a,old:y,saved:w,write:(s,x)=>{const o=L(I(s.saved,s.old),s.old);t?d({textStyles:s.saved,fonts:o.fonts,headingCompression:o.compression,headingTypography:o.typography}):(H(s.saved),h(o.fonts),T(o.sizes),m(o.compression),u(o.typography)),c(A(s,y),x)},writeRoot:d}}export{B as useSiteTextStylesWriter};
@@ -1,6 +1,8 @@
1
- import type { TextStyleCase } from "efficient-easel/text-styles";
2
- import { type FontsValue } from "./fonts.js";
3
- import { type ResolvedHeadingTypography, type SizesValue } from "./theme.js";
1
+ import type { TextStyle, TextStyleCase } from "efficient-easel/text-styles";
2
+ import { type FontRole, type FontsValue } from "./fonts.js";
3
+ import { type PartStyle } from "./puck/part-styles.js";
4
+ import type { SiteThemeRow, SiteThemeRowPatch } from "./site-theme-row.js";
5
+ import { type HeadingCompression, type ResolvedHeadingTypography, type SizesValue } from "./theme.js";
4
6
  export type StoredTextStyleValues = {
5
7
  font?: string;
6
8
  color?: string;
@@ -18,6 +20,7 @@ export type StoredTextStyle = {
18
20
  kind: "heading" | "body";
19
21
  name: string;
20
22
  values: StoredTextStyleValues;
23
+ auto?: (keyof StoredTextStyleValues)[];
21
24
  };
22
25
  export type OldSiteText = {
23
26
  fonts: Partial<FontsValue> | Record<string, string>;
@@ -28,6 +31,30 @@ export type OldSiteText = {
28
31
  export declare function textStylesFromOld(old: OldSiteText): StoredTextStyle[];
29
32
  export declare function storedTextStyles(value: unknown): StoredTextStyle[];
30
33
  export declare function resolveTextStyles(saved: unknown, old: OldSiteText): StoredTextStyle[];
34
+ export declare function applyListChange({ saved, old, cur, next, sizeOf, }: {
35
+ saved: unknown;
36
+ old: OldSiteText;
37
+ cur: readonly TextStyle[];
38
+ next: readonly TextStyle[];
39
+ sizeOf: (style: StoredTextStyle) => number;
40
+ }): {
41
+ saved: StoredTextStyle[];
42
+ old: OldSiteText;
43
+ };
44
+ export declare function listChangePatch(next: {
45
+ saved: StoredTextStyle[];
46
+ old: OldSiteText;
47
+ }, prev: OldSiteText): SiteThemeRowPatch;
48
+ export declare function toPanelStyles(stored: readonly StoredTextStyle[], sizeOf: (s: StoredTextStyle) => number): TextStyle[];
49
+ export declare function fromPanelStyles(list: readonly TextStyle[], sizeOf: (s: StoredTextStyle) => number): StoredTextStyle[];
50
+ export type SiteTextSeed = {
51
+ fonts: FontsValue;
52
+ sizes: SizesValue;
53
+ compression: HeadingCompression;
54
+ typography: ResolvedHeadingTypography;
55
+ textStyles: unknown;
56
+ };
57
+ export declare function siteTextFromRow(row: Partial<SiteThemeRow>): SiteTextSeed;
31
58
  export declare function textStylesToOld(list: readonly StoredTextStyle[], prev: OldSiteText): OldSiteText;
32
59
  export declare function themeWithTextStyles<T extends {
33
60
  fonts?: unknown;
@@ -38,4 +65,17 @@ export declare function themeWithTextStyles<T extends {
38
65
  }>(theme: T): T;
39
66
  export declare function faceClassOf(style: Pick<StoredTextStyle, "id">): string;
40
67
  export declare function textStylesCss(list: readonly StoredTextStyle[]): string;
68
+ export declare function accentItalicCss(italic: boolean | null | undefined): string;
69
+ export declare function styleIdOfRole(role: FontRole | null | undefined): string | undefined;
70
+ export declare function partStyleToTextStyleValues(style: PartStyle): StoredTextStyleValues;
71
+ export declare function hasStyleChange(style: PartStyle): boolean;
72
+ export declare function pushIntoStyle({ saved, old, styleId, values, }: {
73
+ saved: unknown;
74
+ old: OldSiteText;
75
+ styleId: string;
76
+ values: StoredTextStyleValues;
77
+ }): {
78
+ saved: StoredTextStyle[];
79
+ old: OldSiteText;
80
+ };
41
81
  export declare function eyebrowStyleId(list: readonly Pick<StoredTextStyle, "id" | "kind">[]): string;