efficient-web-builder 19.0.0 → 21.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/CHANGELOG.md +176 -0
  2. package/dist/components/ChatSettingsPanel.js +1 -1
  3. package/dist/components/ContactLocations.js +3 -3
  4. package/dist/components/FAQ.js +1 -1
  5. package/dist/components/HeroPartPanel.d.ts +7 -0
  6. package/dist/components/HeroPartPanel.js +1 -0
  7. package/dist/components/HeroSingle.d.ts +10 -1
  8. package/dist/components/HeroSingle.js +11 -1
  9. package/dist/components/HeroVideoPlay.d.ts +13 -0
  10. package/dist/components/HeroVideoPlay.js +1 -0
  11. package/dist/components/PreviewChatContext.d.ts +8 -0
  12. package/dist/components/PreviewChatContext.js +1 -1
  13. package/dist/components/PreviewHeroPartContext.d.ts +3 -0
  14. package/dist/components/PreviewHeroPartContext.js +1 -0
  15. package/dist/components/PublishedPartStylesContext.js +1 -1
  16. package/dist/components/Reel.js +1 -1
  17. package/dist/components/SectionEditor.d.ts +10 -0
  18. package/dist/components/SectionEditor.js +1 -1
  19. package/dist/components/SectionIcon.js +1 -1
  20. package/dist/components/SiteFields.d.ts +3 -1
  21. package/dist/components/SiteFields.js +1 -1
  22. package/dist/components/StandaloneSectionEditor.js +1 -1
  23. package/dist/components/StorefrontEditor.js +1 -1
  24. package/dist/components/TemplateFieldRow.d.ts +11 -0
  25. package/dist/components/TemplateFieldRow.js +1 -0
  26. package/dist/components/WebsiteScreenParts.js +1 -1
  27. package/dist/components/storefront-editor.css +7 -31
  28. package/dist/lib/content/chat-launcher.d.ts +9 -0
  29. package/dist/lib/content/chat-launcher.js +1 -0
  30. package/dist/lib/content/gallery-card-layout.d.ts +4 -0
  31. package/dist/lib/content/gallery-card-layout.js +1 -1
  32. package/dist/lib/content/page-width.d.ts +1 -0
  33. package/dist/lib/content/page-width.js +1 -1
  34. package/dist/lib/editor-words-catalogue.d.ts +14 -2
  35. package/dist/lib/editor-words-catalogue.js +4 -4
  36. package/dist/lib/hero-arrows.d.ts +1 -1
  37. package/dist/lib/hero-media-layout.d.ts +11 -0
  38. package/dist/lib/hero-media-layout.js +1 -0
  39. package/dist/lib/hero-video.d.ts +15 -0
  40. package/dist/lib/hero-video.js +1 -0
  41. package/dist/lib/links/phone-href.d.ts +1 -0
  42. package/dist/lib/links/phone-href.js +1 -0
  43. package/dist/lib/markup.d.ts +5 -3
  44. package/dist/lib/markup.js +2 -2
  45. package/dist/lib/preview-header-settings.d.ts +1 -0
  46. package/dist/lib/puck/blocks/general/Hero/fields.js +1 -1
  47. package/dist/lib/puck/blocks/general/HeroSingle/fields.js +1 -1
  48. package/dist/lib/puck/blocks/general/HeroSingle/render.js +1 -1
  49. package/dist/lib/puck/blocks/general/HeroSlide/fields.js +1 -1
  50. package/dist/lib/puck/canvas-typing.d.ts +1 -2
  51. package/dist/lib/puck/controls.d.ts +45 -0
  52. package/dist/lib/puck/controls.js +1 -1
  53. package/dist/lib/puck/field-groups.js +1 -1
  54. package/dist/lib/puck/hero-media-parts.d.ts +42 -0
  55. package/dist/lib/puck/hero-media-parts.js +1 -0
  56. package/dist/lib/puck/media-manifest.json +3 -1
  57. package/dist/lib/puck/part-styles.js +2 -2
  58. package/dist/lib/puck/passes/settings-groups.js +1 -1
  59. package/dist/lib/puck/template-field.d.ts +13 -0
  60. package/dist/lib/puck/template-field.js +1 -0
  61. package/dist/lib/reel.d.ts +3 -3
  62. package/dist/lib/reel.js +1 -1
  63. package/dist/lib/source-rules/one-markup-grammar.d.ts +5 -0
  64. package/dist/lib/source-rules/one-markup-grammar.js +4 -0
  65. package/dist/lib/source-rules/one-site-column.d.ts +6 -0
  66. package/dist/lib/source-rules/one-site-column.js +3 -0
  67. package/dist/lib/web-backend.d.ts +5 -0
  68. package/package.json +3 -3
@@ -1 +1 @@
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
+ "use client";import{jsx as r,jsxs as k,Fragment as R}from"react/jsx-runtime";import{cloneElement as ue,useId as mt,useRef as te,useState as z}from"react";import{useEasel as N,useSelectedFields as pe}from"efficient-easel/easel";import{say as l,editorEaselWords as x}from"../editor-words.js";import{readHidable as fe,hidableText as me}from"./hidable.js";import{FOLD_FIELD_MARKER as V,LINK_FIELD_MARKER as he,MEDIA_FIELD_MARKER as ge,SCAFFOLD_FIELD_MARKER as be,TEXT_FIELD_MARKER as I,foldMetaOf as Y,textFieldIdentifier as ht}from"./field-markers.js";import gt from"../../components/ApplyCornersToSiblings.js";import bt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as xt,CORNER_RADIUS_MAX as xe,CORNER_RADIUS_MIN as v}from"../content/card-image-shape.js";import{IMAGE_CORNER_STEP as St,IMAGE_CORNERS_LABEL as yt}from"../content/image-corners.js";import{GRID_MAX_COLUMNS as Ct}from"../content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as _t,GALLERY_LAYOUTS as W,GALLERY_LAYOUT_KEYS as Se}from"../content/gallery-layout.js";import{anchorSiblingsOf as It,HERO_GROUP_PLACEMENTS as Et,HERO_GROUP_PLACEMENT_DEFAULT as Rt,normalisePlacement as Tt,placementPoints as ye}from"../hero-group-placement.js";import wt from"../../components/KeepHint.js";import{AdjustIcon as Ot,AlignLeftIcon as Pt,EyeIcon as kt,AlignSeparateIcon as Lt,AnimationIcon as Ce,BackgroundIcon as At,BorderAllIcon as Nt,BlockSectionIcon as vt,CartIcon as Ft,ColumnWidthsIcon as _e,ColumnsIcon as Dt,CornerIcon as Bt,DirectionDownIcon as Ht,DirectionLeftIcon as Gt,DirectionRightIcon as Mt,DirectionUpIcon as Kt,DollarIcon as Wt,FinishIcon as Ut,GapIcon as Ie,GridIcon as Xt,GroundIcon as $t,HashIcon as Ee,HeightIcon as jt,ImageIcon as zt,ListIcon as Vt,LocationIcon as ne,PaddingAllIcon as Yt,PaddingBottomIcon as Re,PaddingLeftIcon as Te,PaddingRightIcon as we,PaddingTopIcon as Oe,PageIcon as Pe,PhoneIcon as qt,PlacementIcon as Jt,ProductSizeIcon as Zt,StickyIcon as Qt,RotateIcon as en,SquareIcon as tn,TypeIcon as nn,WidthIcon as on,WrapIcon as rn}from"efficient-easel/icons";import{FieldGlyph as ke}from"../../components/FieldGlyph.js";import{resolvePageBackground as ln}from"../content/page-background.js";import{CORNER_SIDES as Le,CORNER_SIDE_POINTS as an,hasOwnSectionCorners as sn,normalizeCornerSides as Ae}from"../content/section-corners.js";import{SECTION_MOTION_NONE as cn,SECTION_MOTION_OPTIONS as dn}from"../content/section-animation.js";import{enclosingSectionProps as Ne}from"./enclosing-section.js";import{SettingsDefaultReset as S,SettingsField as m,SettingsGroupHead as un,SettingsGroupSub as pn,SettingsBorder as fn,SettingsSegmented as mn,SettingsSides as hn,SettingsSidesEach as ve,sidesStartEach as gn,SettingsSwitch as Fe,borderSides as bn,borderStartEach as xn}from"efficient-easel/panel";import{FieldSelect as Sn,ListField as yn}from"efficient-easel/fields";import{DisplayChips as Cn}from"efficient-shell/ui";import{desktopDisplayChanged as _n,partShownOnDesktop as In,partShownOnPhone as En,phoneDisplayChanged as Rn,withDesktopPart as Tn,withPhonePart as wn}from"../content/part-display.js";import{AlignmentGrid as On,Checkbox as Pn,CornersInput as kn,DateTimePicker as Ln,FOCAL_DEFAULT as De,PictureTiles as Be,Slider as An,Tooltip as He}from"efficient-shell/ui";import{ColourControl as Ge}from"./ColourControl.js";import Me from"./MarkupToolbar.js";import{deviceField as g}from"./device-fields.js";import{NO_CONTROL_FIELD as Nn,NoControlMark as Ke,noControlField as oe}from"./panel-no-control-mark.js";import{OWN_BOX_FIELD as vn}from"./own-box.js";import{PHONE_CLEAR as Fn,phoneKey as F,resolvePhoneValue as re}from"./phone-override.js";import{SuppressibleText as Dn}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Bn,CARD_OUTLINE_OPTIONS as Hn,DEFAULT_CARD_INDEX_FORMAT as Gn,DEFAULT_CARD_OUTLINE as Mn}from"../sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Kn,DEFAULT_COVER_INDEX as Wn}from"../sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Un}from"./text-control-kinds.js";import Xn from"../../components/ImageFocusRow.js";import $n from"../../components/MediaUploadField.js";import jn from"../../components/MultiSelectField.js";import zn from"../../components/SectionThemePicker.js";import Vn from"../../components/SearchSelectField.js";import Yn from"../../components/StorefrontLinkField.js";import We from"../../components/UiIcon.js";import{SECTION_PADDING as E}from"../content/section-padding.js";import{hasPhoneHeight as qn,resolveSectionMinHeight as Jn}from"../content/section-min-height.js";import{SECTION_STICK_DISTANCE as q,SECTION_STICK_LABEL as ie,hasPhoneStick as Zn,resolveSectionStick as Qn}from"../content/section-sticky.js";import{SECTION_MIN_HEIGHT as eo,SECTION_MIN_HEIGHT_GROUP_LABEL as U,SECTION_SCREEN_PCT as to}from"../content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as no,containerDirectionPoints as oo,resolveContainerDirection as Ue}from"../content/container-direction.js";import{BOX_ALIGN_POINTS as ro,BOX_BLOCK_SPACING_LABEL as io,BOX_BLOCK_SPACING_POINTS as Xe,BOX_JUSTIFY_POINTS as $e,BOX_PHONE_ROW_LABEL as lo,BOX_PHONE_ROW_MAX as ao,BOX_PHONE_ROW_MIN as je,BOX_SHARE_LABEL as ze,BOX_SHARE_POINTS as le,BOX_WRAP_LABEL as so,BOX_WRAP_POINTS as Ve}from"../content/box-layout.js";import{usePreviewHeader as X}from"../../components/PreviewHeaderContext.js";import{BORDER_MAX as co}from"../content/borders.js";import{DEFAULT_SURFACES as uo,normalizeTheme as po}from"../theme.js";import{CONTAINER_GAP as ae,CONTAINER_GAP_BUILT_IN as fo,GAP_FIELD_CONTAINER as mo,hasOwnContainerGap as ho,resolveContainerGap as go}from"../content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as bo,CARD_IMAGE_BG_OFF as xo,CARD_IMAGE_BG_SWATCH_NAMES as So,CARD_IMAGE_BG_SWATCHES as yo,isCardImageBackgroundInheriting as Co,cardImageBackgroundChoice as _o,THEME_CARD_IMAGE_BG as Io}from"../content/card-image-background.js";import{SECTION_BG_INHERIT as Eo,SECTION_BG_SWATCHES as Ro,SECTION_BG_SWATCH_NAMES as To,THEME_SECTION_BG as wo,isSectionBackgroundInheriting as Oo}from"../content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Po}from"../content/section-surface.js";import{TYPE_SIZE_FIXED as ko,TYPE_SIZE_INHERIT as Lo,isTypeSizeInheriting as Ao}from"../content/section-type-size.js";import{SECTION_WIDTH_CHOICES as No,WIDTH_CHOICE_LABEL as vo,WIDTH_INHERIT as Fo,resolveWidth as Do,sectionRunsFullWidth as Ye}from"../content/section-width.js";import{useFoldHeadingLevel as qe}from"./panel-heading-scope.js";import{withStyleKind as Bo}from"efficient-easel/style-clipboard";function D(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!Y(n)&&Bo(n,`section:${t}`);return e}function Vi({children:e}){return r("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function Je(){return null}function Ho(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return r(Je,{},e)}function Go(e){return e.type===Je}function O(e){return Go(e)?void 0:e}function B(e,t){return l("{value} from {from}",{value:e,from:t})}function Mo(){const{appState:e}=N(i=>i),t=e.data.root?.props??{},{mode:n,pageWidth:o}=Do(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}=X();return e===null?l("this container's own spacing"):B(`${e}px`,l("Site styles"))}function Wo({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:Ko(),onReset:t})}function Uo({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:Mo(),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}=fe(e),f=te(null),p=te(null),h=w=>t(c?{text:w,hidden:u}:w),b=()=>t({text:d,hidden:!u}),C=c&&u,T=mt(),_=i?Vo(i)?r("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(i)}):r(wt,{children:l(i)}):void 0,j=u?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return r(m,{label:l(n),icon:r(nn,{}),htmlFor:T,className:C?"is-hidden":void 0,hint:_,action:c?r(He,{content:j,children:r("button",{type:"button",className:"sf-field-eye","aria-pressed":u,"aria-label":j,onClick:b,children:u?r(We,{name:"eye-off",size:14}):r(We,{name:"eye",size:14})})}):void 0,children:k("div",{className:"sf-copybox",children:[s&&r(Me,{target:a?p:f,value:d,onChange:h}),a?r("textarea",{id:T,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:w=>h(w.target.value)}):r("input",{id:T,ref:f,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:w=>h(w.target.value)})]})})}function Yi(e,t){return{...e,[be]:t}}function qi(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 Ze="sfPanelOnly";function Zi(e){if(!e[I])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Ze]:!0}}function Qi(e){return!!e&&typeof e=="object"&&e[Ze]===!0}function el(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 ma,SCALAR_TEXT_CONTROLS as ha}from"./text-control-kinds.js";function tl(e,t){if(!e[I])throw new Error("inOwnBox: the field holds no authored text");const{[Nn]:o,...i}=e;return{...i,[vn]:!0,render:t}}const Xo=new Set(Un),G=(e,t)=>{const n={...t,[I]:e};if(!Xo.has(e.control))return n;const o=t.render;return{...oe(n,"authored-copy"),render:i=>r(Dn,{name:i.name,children:o(i)})}},nl="Everything else on this block comes from the linked post. Unlink it to edit by hand.",$o="Select a word, then press the highlighter.",jo="A short name so a link can jump straight to this section, like yoursite.com/page#about.",zo=new Set([$o]),Vo=e=>zo.has(e);function ol(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 rl(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 Yo(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 il(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 ll(e){return{type:"custom",[he]:{label:e},render:({value:t,onChange:n})=>r(Yn,{value:me(t),onChange:n,label:e})}}function al(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 sl={Design:Ot,Animation:Ce};function cl(e,t){return e.includes("Design")?t!=="Design":null}function qo({label:e}){return r(un,{title:l(e),level:qe(1)})}function Jo({level:e,label:t}){return e===1?r(qo,{label:t}):r(er,{label:t})}function Qe(e,t){return{type:"custom",[V]:{label:e,level:t},render:()=>r(Jo,{level:t,label:e})}}function y(e){return Qe(e,2)}function dl(e){return{type:"custom",render:()=>r(Zo,{text:e})}}function Zo({text:e}){return r("p",{className:"sf-note",children:l(e)})}function ul(e){return Qe(e,1)}function pl(e){return Y(e)!==null&&e?.tabs!==void 0}const et=new Map;function fl(e,t){const n=`${e}\0${t?t.join(""):""}`,o=et.get(n)??{type:"custom",tabs:t,[V]:{label:e,level:1},bucket:e,marker:!0,render:()=>r(R,{})};return et.set(n,o),o}function ml(e){return Y(e)!==null&&e?.designGroup!==void 0}const tt=new Map;function hl(e){const t=tt.get(e)??{type:"custom",[V]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>r(R,{})};return tt.set(e,t),t}function Qo(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function gl(e,t){return Qo(e)===t?e:{...e,marker:!0,fold:t,render:()=>r(R,{})}}function bl(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 er({label:e}){return r(pn,{title:l(e),level:qe(2)})}function nt({swatches:e,current:t,onPick:n,names:o}){const i=e.find(s=>s.toLowerCase()===t.toLowerCase()),a=i?o?.[i]:void 0,c=a?l(a):t;return k("div",{className:"sf-swatches",children:[e.map(s=>{const d=o?.[s]?l(o[s]):s;return r(He,{content:d,children:r("button",{type:"button","aria-pressed":t.toLowerCase()===s.toLowerCase(),className:`sf-swatch ${t.toLowerCase()===s.toLowerCase()?"is-active":""}`,style:{background:s},onClick:()=>n(s),"aria-label":d})},s)}),r("span",{className:"sf-swatch-hex",children:c})]})}function xl(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=Oo(n,t);return r(m,{label:l(e),icon:r(At,{}),changed:!i,action:r(S,{words:x()?.panel,label:l(e),changed:!i,detail:l("the theme's section background"),onReset:()=>o(Eo)}),children:nt({swatches:Ro,current:i?wo:n??t??"",onPick:o,names:To})})}}}function tr(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=n,a=Co(i,t);return r(m,{label:l(e),icon:r($t,{}),changed:!a,action:r(S,{words:x()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(bo)}),children:nt({swatches:yo,current:a?Io:_o(i,t),onPick:o,names:So})})}}}function Sl(e=n=>n,t){return D({_gSectionTheme:y(Po),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>r(zn,{value:e(n),onChange:o,followLabel:t})}})}function M({min:e,max:t,step:n,value:o,onChange:i,suffix:a="",readout:c=!0,notch:s,ariaLabel:d,disabled:u=!1}){const f=s!==void 0&&Number.isFinite(s)&&s>=e&&s<=t;return r("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(s-e)/(t-e)}:void 0,children:r(An,{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(m,{label:l(e),icon:O(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 ot(e,t){const{min:n,max:o,step:i=1,unsetLabel:a,hint:c,restTrack:s,unsetMark:d,icon:u}=t;return{type:"custom",render:({value:f,onChange:p})=>{const h=typeof f=="number"?f:null,b=h===null;return r(m,{label:l(e),icon:u?O(u):void 0,value:b?d||a===void 0?void 0:l(a):`${h}px`,changed:!b,action:d?ue(d,{changed:!b,onReset:()=>p(null)}):r(S,{words:x()?.panel,label:l(e),changed:!b,onReset:()=>p(null)}),hint:typeof c=="string"?l(c):c,children:s?s({min:n,max:o,step:i,px:h,label:e,onChange:p}):M({min:n,max:o,step:i,value:h??n,readout:!1,ariaLabel:e,onChange:p})})}}}function yl(e){const t=K("Gap",r(Ie,{}),ae.min,ae.max,ae.step,fo[e],"px",(n,o)=>r(Wo,{inherited:!ho(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[mo]:e,render:n=>t.render({...n,value:go(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}const J="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(m,{label:l(J),icon:r(Bt,{}),changed:i,action:ue(e.mark,{changed:i,onReset:()=>n(null)}),hint:e.hint,children:r(nr,{tier:e,px:o,onRadius:n})})}}}function rt(e){let t=null;try{t=pe()}catch{t=null}return[t?.values?.[e],n=>t?.onChange(e,n)]}function nr({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),i=e.useClosedReason?e.useClosedReason():null,[a,c]=rt(e.sidesKey),s=Ae(a)??[...Le];return r(kn,{label:l(J),value:s,corners:an,onChange:d=>{const u=Ae(d)??[];c(u.length===Le.length?null:u)},radius:t,onRadiusChange:n,radiusMin:v,radiusMax:xe,radiusStep:e.step??1,radiusPlaceholder:String(o),disabled:i!==null,disabledReason:i??void 0})}function it(){return oe({type:"custom",render:()=>r(Ke,{})},"always")}function or({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=X(),i=typeof o=="number"?`${o}px`:l("not set");return r(S,{words:x()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):B(i,l("Site styles")),onReset:n})}function rr(){const{cornerRadiusPx:e}=X();return typeof e=="number"?e:v}function ir(){return se({sidesKey:"sectionCornerSides",useFollowed:rr,useClosedReason:()=>at()?l(lt):null,mark:r(or,{label:J}),hint:r(lr,{})})}const lt="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function at(){return Ye(L())}function lr(){return r(R,{children:at()?lt:"Follows Site styles ▸ Basics ▸ Corners until you set a number here."})}function Cl(){return D({_gShape:y("Shape"),sectionCorners:ir(),sectionCornerSides:it(),sectionBorder:st("desktop"),sectionBorderPhone:st("mobile")})}const ar=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function sr(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function cr(){let e;try{const t=po(X().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||uo.line}function dr({value:e,onChange:t,tier:n}){const[o]=rt("sectionBorder"),i=cr(),a=e&&typeof e=="object"?e:{},c=n==="mobile"?o&&typeof o=="object"?o:{}:{},[s,d]=z(()=>xn(a,c)),u=ar();return r(m,{label:l("Border"),icon:r(Nt,{}),action:r(ve,{each:s,label:l("Each side"),onChange:d}),children:r(fn,{label:l("Border"),value:a,each:s,onChange:f=>t(sr(f)),placeholder:{sides:bn(c),style:c.style??"solid",color:c.color||i},presets:[i],words:u,max:co})})}function st(e){return g(e,{type:"custom",render:({value:t,onChange:n})=>r(dr,{value:t,onChange:n,tier:e})})}function _l(){return{_gMotion:y("Motion"),sectionAnimation:de("Entrance",r(Ce,{}),[...dn],cn)}}function ce(){let e=null;try{const{appState:t,selectedItem:n}=N(i=>i),o=n?.props?.id?String(n.props.id):void 0;e=o?Ne(t?.data,o):null}catch{e=null}return e!==null&&Ye(e)}function ct(e){const{cornerRadiusPx:t}=X(),n=ce(),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?Ne(c?.data,d):null}catch{i=null}if(n||!i)return o;const a=i.sectionCorners;return sn(a)?a:o}function ur({label:e,changed:t=!1,onReset:n=()=>{}}){const o=ce(),i=ct(v),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 pr(){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 fr(){return se({sidesKey:"cardCornerSides",useFollowed:()=>ct(v),mark:r(ur,{label:J}),hint:r(pr,{})})}function mr(){return{type:"custom",render:()=>r(gt,{})}}function Il(e){return{...e,render:t=>r(bt,{render:e.render,props:t})}}function El(){return{_gShape:y("Shape"),cardCorners:fr(),cardCornerSides:it(),cardCornersApplyAll:mr()}}function Rl(){return P("Justify",r(Lt,{}),$e,$e[0].value)}function Tl(){return P("Item alignment",r(Pt,{}),ro,"stretch")}function wl(){return P(so,r(rn,{}),Ve,Ve[0].value)}function Ol(){return{type:"custom",render:({value:e,onChange:t})=>{const n=le.find(o=>o.value===e)??le[0];return r(m,{label:l(ze),icon:r(_e,{}),value:l(n.label),children:r(Be,{className:"sf-gallery-layouts",label:l(ze),value:n.value,onChange:t,options:le.map(o=>({value:o.value,label:l(o.label),picture:r("span",{className:"sf-gallery-pic",children:hr(o.weights).map((i,a)=>r("i",{style:{gridColumn:`span ${i}`}},a))})}))})})}}}function hr(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function Pl(){return P(io,r(Ie,{}),Xe,Xe[0].value)}function kl(){return K(lo,r(qt,{}),je,ao,1,je)}function Ll(e){const t=de(no,Ho("`Direction` names how a container's children run — a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; editor-shell's own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),oo(e),Ue(e,void 0));return{type:"custom",render:n=>t.render({...n,value:Ue(e,n.value),onChange:o=>n.onChange(o)})}}function Al(e,t,n,o,i,a){return{type:"custom",render:({value:c,onChange:s})=>r(m,{label:l(e),icon:r(ke,{noun:a}),action:r(S,{words:x()?.panel,label:l(e),changed:!Ao(c),detail:l("the Text style in Site styles"),onReset:()=>s(Lo),defaultAction:{onPress:()=>s(ko),title:l("Keep this section's own built-in size"),icon:r(vt,{})}}),children:M({min:t,max:n,step:o,value:typeof c=="number"?c:i,suffix:"px",ariaLabel:e,onChange:s})})}}function Nl(){return{_gCellWidth:y("Cell width"),gridSpan:P("Positions",r(_e,{}),[{label:"Auto",value:""},...Array.from({length:Ct},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function L(){let e=null;try{e=N(t=>t).selectedItem}catch{e=null}return e?.props??{}}function gr({min:e,max:t,step:n,px:o,label:i,onChange:a,desktopKey:c,fallback:s}){const d=L()[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 br({label:e,desktopKey:t,fallback:n,changed:o=!1,onReset:i=()=>{}}){const a=L()[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 xr(e){return ot(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:r(br,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>r(gr,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}function vl(e){return{type:"custom",render:({value:t,onChange:n})=>r(yr,{...e,value:t,onChange:n})}}function Sr({label:e,icon:t,options:n,value:o,resolved:i,restWord:a,onChange:c}){const s=n.some(d=>d.value===o);return r(m,{label:l(e),icon:O(t),action:r(S,{words:x()?.panel,label:l(e),changed:s,detail:l("{value} on desktop",{value:l(a)}),onReset:()=>c(void 0)}),children:Q({options:n,value:s?o:i,onChange:d=>c(d),ariaLabel:e})})}function yr({label:e,icon:t,options:n,desktopKey:o,resolve:i,value:a,onChange:c}){const s=L()[o],d=i(void 0,s),u=n.find(f=>f.value===d)?.label??"";return r(Sr,{label:e,icon:t,options:n,value:a,resolved:d,restWord:u,onChange:c})}const Cr={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},_r={Top:Oe,Bottom:Re,Left:Te,Right:we},Ir=e=>{const t=_r[e];return r(t,{})};function Fl(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,i=_=>Cr[_],a=_=>K(i("Top"),r(Oe,{}),E.min,E.max,E.step,_,"px"),c=(_,j,w,ee=E)=>g("mobile",xr({label:i(_),icon:Ir(_),desktopKey:j,min:ee.min,max:ee.max,step:ee.step,fallback:w})),s=e.top??E.min,d=e.bottom??E.min,u="sectionPaddingLeft",f="sectionPaddingRight",p=e.sideBounds??E,h=e.side??p.min,b=e.sidePhone??h,C=e.phone===!0,T=_=>C?g("desktop",_):_;return D({...o?{_gSpacing:y("Padding")}:{},[t]:T(a(s)),...C?{[F(t)]:c("Top",t,s)}:{},...e.only==="top"?{}:{[n]:T(K(i("Bottom"),r(Re,{}),E.min,E.max,E.step,d,"px")),...C?{[F(n)]:c("Bottom",n,d)}:{}},...e.sides?{[u]:T(K(i("Left"),r(Te,{}),p.min,p.max,p.step,h,"px")),...C?{[F(u)]:c("Left",u,b,p)}:{},[f]:T(K(i("Right"),r(we,{}),p.min,p.max,p.step,h,"px")),...C?{[F(f)]:c("Right",f,b,p)}:{}}:{}})}const $=["top","right","bottom","left"],Er={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},dt=e=>typeof e=="number"?e:null;function Rr(e,t,n){const o={};for(const i of $)n[i]!==t[i]&&(o[e[i]]=n[i]??void 0);return o}function Tr({tier:e,o:t}){let n=null;try{n=pe()}catch{n=null}const o=n?.values??{},i=e==="mobile"?t.phoneKeys:t.keys,a=Object.fromEntries($.map(u=>[u,dt(o[i[u]])])),c=Object.fromEntries($.map(u=>[u,String(e==="mobile"?dt(o[t.keys[u]])??t.fallback[u]:t.fallback[u])])),[s,d]=z(()=>gn(a,c));return r(m,{label:l("Padding"),icon:r(Yt,{}),action:r(ve,{each:s,label:l("Each side"),onChange:d}),children:r(hn,{label:l("Padding"),each:s,value:a,placeholder:c,min:t.min,max:t.max,step:t.step,onChange:u=>{const f=Rr(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 Dl(e={}){const t={...Er,...e.keys},n={keys:t,phoneKeys:Object.fromEntries($.map(s=>[s,F(t[s])])),fallback:{top:0,right:0,bottom:0,left:0,...e.fallback},min:e.min??0,max:e.max??200,step:e.step??4},o=e.phone!==!1,i=s=>{const d={type:"custom",render:()=>r(Tr,{tier:s,o:n})};return o?g(s,d):d},a=()=>oe({type:"custom",render:()=>r(Ke,{})},"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 wr={contained:"Contained",page:"Page",full:"Full"},Z="Width";function Bl(e,t=No,n=!0){const o=t.map(i=>({label:vo[i]??wr[i],value:i}));return D({...n?{_gWidth:y(Z)}:{},widthMode:{type:"custom",render:({onChange:i,field:a})=>r(m,{label:l(Z),icon:r(on,{}),action:n?r(Uo,{inherited:a?.inherited??!1,onReset:()=>i(Fo),label:Z}):void 0,children:Q({options:o,value:a?.currentValue||e,onChange:i,ariaLabel:Z})})}})}function Hl(){const e=o=>({type:"custom",render:({value:i,onChange:a})=>r(m,{label:U,icon:O(r(jt,{})),action:o?o(a):void 0,children:Q({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==="%"?to:eo;return r("div",{className:"sf-field",children:M({min:s.min,max:s.max,step:s.step,value:typeof o=="number"?o:s.fallback,suffix:c,ariaLabel:U,onChange:i})})}}),n=()=>de("Unit",r(Ee,{}),[{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(Or,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:g("mobile",t()),sectionHeightUnitPhone:g("mobile",n())})}function Or({onClear:e}){const t=L(),n=qn(t),o=Jn(t),i=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return r(S,{words:x()?.panel,label:l(U),changed:n,detail:i,onReset:e})}function Gl(){const e=n=>({type:"custom",render:({value:o,onChange:i,id:a,name:c})=>r(Pr,{value:o,onChange:i,labelId:`${a??c??"stickTop"}-label`,phone:n})}),t=()=>({type:"custom",render:({value:n,onChange:o})=>r("div",{className:"sf-field",children:M({min:q.min,max:q.max,step:q.step,value:typeof n=="number"?n:q.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 Pr({value:e,onChange:t,labelId:n,phone:o}){const i=L(),a=Qn(i),c=o?a.phone:e===!0;return r(m,{label:l(ie),labelId:n,icon:O(r(Qt,{})),action:k(R,{children:[o?r(S,{words:x()?.panel,label:l(ie),changed:Zn(i),detail:l("{value} on desktop",{value:a.desktop?`${a.desktopDistance}px`:l("Off")}),onReset:()=>t(void 0)}):null,r(Fe,{checked:c,onChange:t,ariaLabelledBy:n})]})})}function Ml(){return{_gAnchor:y("Anchor"),anchor:Yo("Anchor name","e.g. about",jo)}}function Kl(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=`${a??c??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return r(m,{label:l(e),icon:t,htmlFor:s,hint:n===void 0?void 0:l(n),children:r(Ln,{id:s,value:Number.isFinite(d)?new Date(d):null,onChange:u=>i(u?u.toISOString():"")})})}}}function A(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=typeof o=="boolean"?o:t,d=`${a??c??e}-label`;return r(m,{label:l(e),labelId:d,icon:n,action:r(Fe,{checked:s,onChange:i,ariaLabelledBy:d})})}}}function Wl(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const i=`${String(n??o??"pageBackground")}-colour`;return r(m,{label:l("Background"),icon:r(Pe,{}),htmlFor:i,action:r(Ge,{id:i,label:"Background",value:ln(e),onChange:t})})}}}function Ul(e,t){return{type:"custom",render:({value:n,onChange:o,id:i})=>{const a=typeof n=="boolean"?n:t,c=`${i??e}-checkbox`;return r(m,{label:l(e),htmlFor:c,className:"sf-checkbox",action:r(Pn,{id:c,checked:a,onChange:o})})}}}function Xl(e,t){return{type:"custom",render:({value:n,onChange:o})=>r(m,{label:l(e),action:Ge({value:n||t,onChange:o,label:e})})}}const kr=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function ut({label:e,value:t,onChange:n,points:o=kr}){const i=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return r(On,{label:l(e),value:t,points:i,onChange:n})}function $l(e,t=De,n="mediaImage"){return{type:"custom",render:({value:o,onChange:i})=>r("div",{className:"sf-focal-row",children:r(Lr,{label:e,value:o||t,onChange:i,imageProp:n})})}}function Lr({label:e,value:t,onChange:n,imageProp:o}){const{selectedItem:i}=N(c=>c),a=i?.props?.[o];return r(Xn,{label:e,value:t,onChange:n,image:typeof a=="string"?a:void 0})}const Ar=ye([]);function jl(e,{stacking:t,fallback:n=Rt}){return{type:"custom",render:({value:o,onChange:i})=>{const a=Et.includes(o)?o:n;return t?r(Nr,{label:e,value:a,onChange:i}):pt({label:e,value:a,onChange:i,points:Ar})}}}function Nr({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?It(o?.data,a):[];return pt({label:e,value:t,onChange:n,points:ye(c,a)})}function pt({label:e,value:t,onChange:n,points:o}){const i=o.find(a=>a.disabled);return r(m,{label:l(e),icon:r(Jt,{}),hint:i?.title?l(i.title):void 0,children:ut({label:e,value:Tt(t),onChange:n,points:o})})}const zl={top:r(Kt,{}),right:r(Mt,{}),bottom:r(Ht,{}),left:r(Gt,{})};function Vl(e,t,n,o,i,a){const c=f=>t.find(p=>p.value===f),s=f=>({value:f,label:"",disabled:!0,title:o}),d=f=>{const p=t.find(b=>b.cell===f);if(!p)return s(`missing-${f}`);const h=a?.[f];return h?{value:p.value,label:p.label,icon:h}:{value:p.value,label:p.label}},u=[s("corner-top-left"),d("top"),s("corner-top-right"),d("left"),s("centre"),d("right"),s("corner-bottom-left"),d("bottom"),s("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:p})=>{const h=t.some(b=>b.value===f)?f:n;return r(m,{label:l(e),icon:i,value:c(h)?.label?l(c(h).label):"",children:ut({label:e,value:h,onChange:p,points:u})})}}}const vr="\0note";function P(e,t,n,o,i){return{type:"custom",options:n,fallback:o,...i?{note:i}:{},render:({value:a,onChange:c,field:s})=>{const d=s.options??n,u=s.fallback??o,f=d.some(p=>p.value===a)?a:u;return r(m,{label:l(e),icon:O(t),children:r(Sn,{value:f,ariaLabel:l(e),onChange:c,options:[...i?[{label:l(i),value:vr,disabled:!0}]:[],...d.map(p=>({label:l(p.label),value:p.value}))]})})}}}function Yl(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:i,field:a})=>r(jn,{label:e,options:(a.options??t).map(c=>({...c,label:l(c.label)})),value:Array.isArray(o)?o:[],onChange:i,...n?{emptyLabel:l(n)}:{}})}}function ql(e,t,n,o){return{type:"custom",options:t,fallback:n,render:({value:i,onChange:a,field:c})=>r(Vn,{label:e,options:(c.options??t).map(s=>({...s,label:l(s.label)})),fallback:c.fallback??n,value:i,onChange:a,placeholder:o===void 0?void 0:l(o)})}}function Jl(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const i={value:n,onChange:o,...t};return r(e,{...i})}}}function Q({options:e,value:t,onChange:n,ariaLabel:o,disabled:i=!1}){return r(mn,{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 Zl=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function de(e,t,n,o){const i=n.map(a=>typeof a=="string"?{label:a,value:a}:a);return{type:"custom",render:({value:a,onChange:c,field:s})=>r(m,{label:l(e),icon:O(t),children:Q({options:i,value:i.some(d=>d.value===a)?a:a||s?.currentValue||o,onChange:c,ariaLabel:e})})}}function Ql(e,t,n){return{type:"custom",[ge]:!0,render:({value:o,onChange:i})=>r($n,{value:o||"",onChange:i,label:e,accept:t,placeholder:n})}}const ea={HeroSingle:["imageFocal"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function ta({value:e,onChange:t,label:n}){const o=e||{},i=!!o.pending,a=i?"var(--fg-dim, #888)":o.ok?"#1d9e75":"#d85a30",c=(s,d)=>t({...o,[s]:d===""?void 0:Number(d)});return k(m,{label:l(n),icon:r(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&&k("div",{style:{marginTop:8,display:"grid",gap:8},children:[r(m,{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(m,{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 Fr(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Dr(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 na(e,t){return e===null?null:t>e?e:null}function Br(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 oa={label:"Ticker items",icon:r(Vt,{})};function ra(e,t,n,o){return{type:"custom",[I]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},render:({value:i,onChange:a})=>r(Hr,{label:e,icon:O(t),items:Array.isArray(i)?i:[],placeholder:n,onChange:a,markup:o==="markup"})}}function Hr({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(h=>({text:h?.text??""})),f=p=>{const h=Br(n,p,s);h===null&&(c.current=null),d(h),i(u(p))};return r(yn,{label:l(e),icon:t,noun:l("item"),items:n,onChange:f,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?r(Me,{target:c,value:Fr(n,s),onChange:p=>i(Dr(n,s??-1,p)),disabled:s===null,label:s===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:s+1})}):void 0,renderRow:(p,h,b)=>r("input",{type:"text",className:a&&s===h?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:h+1}),onChange:C=>b({text:C.target.value}),onFocus:C=>{c.current=C.currentTarget,d(h)}})})}function ia(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 la(e){return{_gCards:y("Cards"),coverIndex:P("Cover image",r(zt,{}),Kn,String(Wn),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:tr("Image background",xo),cardImage:Mr(),spinOnHover:A("Rotate on hover",e?.spinDefault??!0,r(en,{}))}}function aa(){return{outline:P("Card outline",r(tn,{}),Hn,Mn),indexBadge:P("Card number",r(Ee,{}),Bn,Gn),showBadge:A("Product badge",!0,r(ke,{noun:"tag"}))}}function sa(e){const t=e&&"bottomDefault"in e?e.bottomDefault:!0,n=e&&"defaults"in e?e.defaults:{showCardSizes:t,showCardBuy:t,showCardPage:t};return{_gShowOnCard:y("Show on a card"),showCardPrice:A("Price",!0,r(Wt,{})),showCardFinishes:A("Finish swatches",!0,r(Ut,{})),showCardSizes:A("Sizes",n.showCardSizes,r(Zt,{})),showCardBuy:A("Buy button",n.showCardBuy,r(Ft,{})),showCardPage:A("Page button",n.showCardPage,r(Pe,{}))}}function ca(e,t="display"){const n=F(t);return{[t]:g("desktop",{type:"custom",render:({value:o,onChange:i})=>r(ft,{parts:e,changed:_n(o),shown:a=>In(o,a),onPress:(a,c)=>i(Tn(o,a,c)),onReset:()=>i(void 0)})}),[n]:g("mobile",{type:"custom",render:({value:o,onChange:i})=>r(Gr,{parts:e,desktopKey:t,value:o,onChange:i})})}}function ft({parts:e,changed:t,shown:n,onPress:o,onReset:i,detail:a}){const c=l("Display");return r(m,{label:c,icon:r(kt,{}),changed:t,action:r(S,{words:x()?.panel,label:c,changed:t,detail:a,onReset:i}),children:r(Cn,{label:c,items:e.map(s=>({id:s.id,label:l(s.label),shown:n(s.id)})),onChange:o})})}function Gr({parts:e,desktopKey:t,value:n,onChange:o}){const i=L()[t];return r(ft,{parts:e,changed:Rn(n),shown:a=>En(i,n,a),onPress:(a,c)=>o(wn(n,a,c)),onReset:()=>o(Fn),detail:l("the same as Desktop")})}function Mr(){return ot("Card image",{min:v,max:xe,step:xt,hint:"Rounds the picture. The card's own corner is in Site styles."})}function da(){return se({sidesKey:"cornerSides",step:St,useFollowed:()=>v,mark:r(Kr,{label:yt}),hint:l("Rounds the picture. Left alone it stays square.")})}function Kr({label:e,changed:t=!1,onReset:n=()=>{}}){return r(S,{words:x()?.panel,label:l(e),changed:t,onReset:n})}function ua(){return{type:"custom",render:({value:e,onChange:t})=>r(Wr,{value:typeof e=="string"?e:"",onChange:t})}}function Wr({value:e,onChange:t}){const[n,o]=z(null),i=Se.filter(c=>n===null||W[c].across===n),a=e&&e in W?W[e]:null;return k(R,{children:[r(m,{label:l("Photos in a row"),icon:r(Dt,{}),children:k("div",{className:"sf-gallery-filter",children:[r("button",{type:"button","aria-pressed":n===null,onClick:()=>o(null),children:l("All")}),_t.map(c=>r("button",{type:"button","aria-pressed":n===c,onClick:()=>o(c),children:c},c))]})}),r(m,{label:l("Layout"),icon:r(Xt,{}),value:a?l(a.label):l("Not chosen"),hint:l("{n} of {total} layouts",{n:i.length,total:Se.length}),children:r(Be,{className:"sf-gallery-layouts",label:l("Layout"),value:e,onChange:t,onClear:()=>t(""),options:i.map(c=>({value:c,label:l(W[c].label),picture:r("span",{className:"sf-gallery-pic",children:W[c].desktop.map(([s,d],u)=>r("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${d}`}},u))})}))})})]})}export{jo as ANCHOR_HINT,nl as BOUND_TO_POST_NOTE,sl as BUCKET_ICONS,ea as CUSTOM_FIELD_MEDIA,ta as CoordsField,zl as EDGE_ARROWS,De as FOCAL_DEFAULT,kr as FOCAL_POINTS,V as FOLD_FIELD_MARKER,ut as FocalPicker,er as GroupLabel,$o as HIGHLIGHT_HINT,H as HidableTextField,he as LINK_FIELD_MARKER,Vi as Label,ge as MEDIA_FIELD_MARKER,Zl as MEDIA_TYPE_OPTIONS,Zo as PanelNoteLine,yr as PhoneChoiceRow,Sr as PhoneChoiceStrip,pt as PlacementGridView,be as SCAFFOLD_FIELD_MARKER,ha as SCALAR_TEXT_CONTROLS,lt as SECTION_BLEEDS_HINT,Er as SIDE_PAD_KEYS,qo as SectionHeading,Q as Segmented,Wo as SiteGapDefaultReset,M as Slider,nt as Swatches,ma as TEXT_CONTROL_KINDS,I as TEXT_FIELD_MARKER,oa as TICKER_ITEMS_ROW,Hr as TextListField,Uo as WidthDefaultReset,Br as aimAfterListChange,Ml as anchorFields,B as backTo,xl as backgroundField,Tl as boxAlignField,Pl as boxBlockSpacingField,Rl as boxJustifyField,kl as boxPhoneRowField,Ol as boxShareField,wl as boxWrapField,fl as bucketHeader,fr as cardCornersField,tr as cardImageBackgroundField,Mr as cardImageField,la as cardMediaFields,El as cardShapeFields,sa as cardShowFields,aa as cardStyleFields,Nl as cellWidthFields,Ul as checkbox,Xl as colorInput,il as copyText,it as cornerSidesField,se as cornersRowField,Kl as dateTime,hl as designGroupHeader,Ll as directionField,ca as displayFields,Vl as edgePad,cl as entriesHiddenForTab,$l as focalPicker,na as focusAfterRemove,gl as foldMarker,Y as foldMetaOf,Qo as foldTitleOf,ua as galleryLayoutField,yl as gapField,y as group,Hl as heightFields,me as hidableText,Vo as hintIsWhileTyping,O as iconOf,da as imageCornersField,tl as inOwnBox,pl as isBucketHeader,ml as isDesignGroupHeader,Go as isNoGlyph,ll as linkField,Yl as multiSelect,Ho as noGlyph,Wl as pageBackgroundField,dl as panelNote,vl as phoneChoiceField,xr as phoneOverrideField,jl as placementField,Yo as plainText,al as plainTextarea,ot as pxField,bl as quietMarker,fe as readHidable,Fr as rowText,ql as searchSelect,ul as section,_l as sectionAnimationFields,st as sectionBorderField,ir as sectionCornersField,Cl as sectionShapeFields,Sl as sectionThemeFields,de as segmented,P as select,Dr as setRowText,Dl as sidesPaddingFields,Rr as sidesPaddingPatch,Al as sizeField,K as slider,Jl as sourceField,Fl as spacingFields,Gl as stickFields,Il as templateField,ol as text,ht as textFieldIdentifier,Ji as textFieldOffPage,Qi as textFieldPanelOnly,ra as textList,ia as textListRowField,rl as textarea,A as toggle,Ql as upload,Mo as usePageWidthDetail,Ko as useSiteGapDetail,Bl as widthField,el as withIdentifier,qi as withOffPage,Zi as withPanelOnly,Yi as withScaffold};
@@ -1 +1 @@
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
+ 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,n){const a=`${e}.${t}`;return G[a]??$[a]??I[n]}function he(e,t,n){const a=_(e,t,n);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 n of e)for(const a of Object.values(n)){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})),oe={"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)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","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 n=h(e[t]),a=n?I[n.label]:void 0;if(!n||n.level!==2||!a||!K[a].includes(n.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"]),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[n,a]of Object.entries(e))if(!t.has(n)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(oe).filter(n=>n.startsWith(t)).map(n=>n.slice(t.length))}function re(e,t){const n=P(e),a=q(t);return n?Q(n.tier,a):a}function de(e,t){const n=h(t);return n?e==="Content"||e==="Animation"?z(t,n.label):J(t):t}function j(e){return e==="Design"?k:["Animation"]}function ve(e,t){const n=[],a=new Set(ie(t)),C=new Set;let p=!1,u=null;for(const[o,r]of Object.entries(e)){const i=h(r);if(ne.has(o))throw new Error(`${t}.${o}: 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(o);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${o}: 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.`);(o===d.Design||o===d.Animation)&&(p=!0),n.push(u={place:c,entries:[],adopted:!0});continue}if(!i){u||n.push(u={place:"Content",entries:[]}),u.entries.push([o,r]);continue}if(a.has(o)||o in M){const s=_(t,o,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${o}: ${a.has(o)?"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(o)&&C.add(o),n.push(u={place:s,entries:[]});continue}const l=_(t,o,i.label);if(!l)throw new Error(`${t}.${o}: 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.`);n.push(u={place:l,entries:[[o,i.level===2?r:re(r,i.label)]]})}const g=new Set(Object.entries(e).filter(([,o])=>h(o)).map(([o])=>o));for(const[o,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}: ${o} (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(o=>!C.has(o));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(n.filter(o=>o.entries.length>0).map(o=>o.place)),f=A.filter(o=>j(o).some(r=>R.has(r))),y={};for(const o of f){y[d[o]]=L(o,o===f[0]?f:null);for(const r of j(o)){if(!R.has(r))continue;const i=n.filter(l=>l.place===r),c=i.findIndex(l=>l.adopted);c>0&&i.unshift(...i.splice(c,1)),o==="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 n={...e};for(const a of t)n[d[a]]=L(a,a===t[0]?t:null);return n}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,oe 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};
@@ -0,0 +1,42 @@
1
+ import { type ShowWhenRule } from "./show-when.js";
2
+ export declare const HERO_MEDIA_PARTS: readonly ["media", "image", "image2"];
3
+ export type HeroMediaPart = (typeof HERO_MEDIA_PARTS)[number];
4
+ export declare const HERO_MEDIA_PART_LABELS: Readonly<Record<HeroMediaPart, string>>;
5
+ export declare const HERO_PART_MODE: {
6
+ readonly media: "heroMedia";
7
+ readonly image: "heroImage";
8
+ readonly image2: "heroImage2";
9
+ };
10
+ export declare function heroPartLabel(part: HeroMediaPart, props: Record<string, unknown>): string;
11
+ export declare const VIDEO_FILE_LABEL = "Video file";
12
+ export declare const VIDEO_FILE_PROMPT = "Upload a video file";
13
+ export declare function forMediaType(type: "image" | "video", fallback: "image" | "video"): {
14
+ readonly field: "mediaType";
15
+ readonly is: "video" | "image";
16
+ readonly default: "video" | "image";
17
+ };
18
+ export declare const HERO_MEDIA_PART_TYPES: ReadonlySet<string>;
19
+ export declare function inPart<F extends object>(part: HeroMediaPart, field: F): F;
20
+ export declare function heroMediaFields<F extends Record<string, unknown>>(fields: F, { parts, onlyFor, fallback, rules, }: {
21
+ parts?: Partial<Record<HeroMediaPart, readonly (keyof F & string)[]>>;
22
+ onlyFor: Record<"image" | "video", readonly (keyof F & string)[]>;
23
+ fallback: "image" | "video";
24
+ rules?: Partial<Record<keyof F & string, ShowWhenRule>>;
25
+ }): F;
26
+ export declare function fieldPartOf(field: unknown): HeroMediaPart | null;
27
+ export declare function fieldsOfPart<F extends Record<string, unknown>>(fields: F, part: HeroMediaPart | null): F;
28
+ export type HeroMediaRow = {
29
+ part: HeroMediaPart;
30
+ label: string;
31
+ depth: 0 | 1;
32
+ };
33
+ export declare function heroMediaRows(node: {
34
+ type: string;
35
+ props: Record<string, unknown>;
36
+ }): HeroMediaRow[];
37
+ export declare function heroPartId(nodeId: string, part: HeroMediaPart): string;
38
+ export declare function readHeroPartId(id: string | null | undefined): {
39
+ nodeId: string;
40
+ part: HeroMediaPart;
41
+ } | null;
42
+ export declare const HERO_PART_ATTR = "data-sf-hero-part";
@@ -0,0 +1 @@
1
+ import{withShowWhen as s}from"./show-when.js";import{heroPictureCount as c}from"../hero-media-layout.js";const f=["media","image","image2"],u={media:"Media",image:"Image",image2:"Image 2"},P={media:"heroMedia",image:"heroImage",image2:"heroImage2"};function l(e,t){return e==="image"&&c(t)>1?"Image 1":u[e]}const I="Video file",O="Upload a video file";function d(e,t){return{field:"mediaType",is:e,default:t}}const g=new Set(["HeroSingle"]),m="heroPart";function h(e,t){return{...t,[m]:e}}function R(e,{parts:t={},onlyFor:i,fallback:p,rules:a}){const n={...e};for(const r of["image","video"])for(const o of i[r])n[o]=s(n[o],d(r,p));for(const[r,o]of Object.entries(a??{}))o&&(n[r]=s(n[r],o));for(const r of f)for(const o of t[r]??[])n[o]=h(r,n[o]);return n}function E(e){const t=e?.[m];return f.includes(t)?t:null}function T(e,t){const i={};for(const[p,a]of Object.entries(e))E(a)===t&&(i[p]=a);return i}function A(e){if(!g.has(e.type))return[];const t=[{part:"media",label:u.media,depth:0}];return(e.props.mediaType??"image")!=="video"&&(t.push({part:"image",label:l("image",e.props),depth:1}),c(e.props)>1&&t.push({part:"image2",label:l("image2",e.props),depth:1})),t}function M(e,t){return`${e}::${t}`}function y(e){if(!e)return null;const t=e.lastIndexOf("::");if(t<=0)return null;const i=e.slice(t+2);return f.includes(i)?{nodeId:e.slice(0,t),part:i}:null}const H="data-sf-hero-part";export{f as HERO_MEDIA_PARTS,u as HERO_MEDIA_PART_LABELS,g as HERO_MEDIA_PART_TYPES,H as HERO_PART_ATTR,P as HERO_PART_MODE,I as VIDEO_FILE_LABEL,O as VIDEO_FILE_PROMPT,E as fieldPartOf,T as fieldsOfPart,d as forMediaType,R as heroMediaFields,A as heroMediaRows,M as heroPartId,l as heroPartLabel,h as inPart,y as readHeroPartId};
@@ -1,5 +1,5 @@
1
1
  {
2
- "contentHash": "db2b679aad5380c6",
2
+ "contentHash": "d674ba52a1cf8456",
3
3
  "schema": 1,
4
4
  "mediaFields": {
5
5
  "ImageBlock": [
@@ -32,6 +32,7 @@
32
32
  "HeroSingle": [
33
33
  "imageFocal",
34
34
  "mediaImage",
35
+ "mediaImage2",
35
36
  "mediaVideo",
36
37
  "poster"
37
38
  ],
@@ -87,6 +88,7 @@
87
88
  "imageSrcMobile",
88
89
  "logoSrc",
89
90
  "mediaImage",
91
+ "mediaImage2",
90
92
  "mediaVideo",
91
93
  "photo",
92
94
  "poster",
@@ -1,2 +1,2 @@
1
- import{FONT_OPTIONS as U,FONT_ROLES as $,fontOption as V,SIZE_STEP_OF_ROLE as B}from"../fonts.js";import{encodePartKey as Y}from"./part-key.js";import{decodePartId as M,normalizePartText as b}from"./text-parts.js";import{COLOUR_TOKEN as H}from"../word-styles.js";const E="_partStyles",Z="data-sf-part-styled",q=["none","upper","capitalize","lower"],J=[400,500,600,700],Q=["left","center","right","justify"],F=5,z=1e3,v=-5,tt=10,et=0,nt=64,rt=2,ot=120,T=1280,it=10,L={size:{min:F,max:z,step:1},sizePhone:{min:F,max:z,step:1},padding:{min:et,max:nt,step:rt},width:{min:ot,max:T,step:it}},st=.05,ct=.01,at=["line","letter"],lt=.5,ft=2.5,ut=-1,pt=1,dt=0,xt=400,O={none:"none",upper:"uppercase",capitalize:"capitalize",lower:"lowercase"};function g(t){return!t||typeof t!="object"||Array.isArray(t)?null:t}function j(t){return g(t?.[E])??{}}function k(t,e){const n=j(t);return Object.hasOwn(n,e)?g(n[e])??{}:{}}function Bt(t,e){return Object.values(k(t,e)).filter(n=>n!==void 0).length}function W(t,e,n){const r={...j(t)};if(ht(n).length?r[e]=n:delete r[e],!Object.keys(r).length){const{[E]:o,...s}=t;return s}return{...t,[E]:r}}function ht(t){return Object.entries(t).filter(([,e])=>e!==void 0)}function mt(t){return at.includes(t)}const _=(t,e,n)=>Math.min(n,Math.max(e,t));function Pt(t,e){if(mt(t)){const n=Math.round(Number(e));return!Number.isFinite(n)||n===0?null:_(n,v,tt)}if(t==="lineHeight"){const n=Number(e);return Number.isFinite(n)?m(_(n,lt,ft),3):null}if(t==="letterSpacing"){const n=Number(e);return Number.isFinite(n)?m(_(n,ut,pt),4):null}if(t==="paragraphSpacing"){const n=Math.round(Number(e));return!Number.isFinite(n)||n<=0?null:_(n,dt,xt)}if(Object.hasOwn(L,t)){const{min:n,max:r}=L[t],o=Math.round(Number(e));return Number.isFinite(o)?_(o,n,r):null}return t==="italic"?typeof e=="boolean"?e:null:t==="role"?$.includes(String(e))?e:null:e}const gt=[["font","role"],["line","lineHeight"],["letter","letterSpacing"]];function _t(t){const e=[];for(const[n,r]of gt)n===t?e.push(r):r===t&&e.push(n);return e}function Yt(t,e,n,r){const o={...k(t,e)},s=r==null?null:Pt(n,r);if(s===null)delete o[n];else{o[n]=s;for(const i of _t(n))delete o[i]}return W(t,e,o)}function Zt(t,e){return W(t,e,{})}function At(t){for(const e of q)if(O[e]===t)return e;return"none"}function St(t){return!t||!Object.hasOwn(O,t)?"":O[t]}const Tt={heading:"--font-role-heading",heading2:"--font-role-heading2",heading3:"--font-role-heading3",body:"--font-role-body",accent:"--font-role-accent",label:"--font-role-label"};function Rt(t){const e=t.role;return e&&$.includes(e)?e:null}const bt={headingLarge:"min(clamp(64px,9vw,144px), var(--sf-heading-max,9999px))",headingMedium:"min(32px, var(--sf-heading-max,9999px))",headingSmall:"min(24px, var(--sf-heading-max,9999px))",accent:"32px",body:"14px",label:"12px"};function Et(t){const e=B[t],n=bt[e];return n?`var(--size-${e}, ${n})`:`var(--size-${e})`}function Ot(t){const e={};return typeof t.lineHeight=="number"?e.lineHeight=t.lineHeight:t.line&&(e.lineHeight=m(Nt+t.line*st,3)),typeof t.letterSpacing=="number"?e.letterSpacingEm=t.letterSpacing:t.letter&&(e.letterSpacingEm=m(t.letter*ct,4)),e}const Nt=1,A="--sf-part-para",wt="(max-width: 719.98px)";function D(t){return typeof t.sizePhone=="number"&&t.sizePhone>0?{fontSize:`${t.sizePhone}px`}:{}}function yt(t,e){return e&&typeof t.sizePhone=="number"&&t.sizePhone>0?{...t,size:t.sizePhone}:t}function R(t,e){const n=Rt(t),r=Ot(t),o=t.size?`${t.size}px`:n?Et(n):"";return{fontFamily:t.font?Ht(t.font):n?`var(${Tt[n]})`:"",fontWeight:t.weight?String(t.weight):"",fontSize:o,minWidth:o?"0":"",overflowWrap:o?"break-word":"",lineHeight:r.lineHeight!==void 0?String(r.lineHeight):"",letterSpacing:r.letterSpacingEm!==void 0?`${r.letterSpacingEm}em`:"",[A]:t.paragraphSpacing?`${t.paragraphSpacing}px`:"",textTransform:St(t.case),textAlign:t.align??"",paddingTop:N(t.padding),paddingBottom:N(t.padding),maxWidth:N(t.width),color:It(t.color),fontStyle:t.italic===!0?"italic":t.italic===!1?"normal":""}}const It=t=>t===void 0||t===""?"":Object.hasOwn(H,t)?H[t]:C.test(t)?t:"",C=/^#[0-9a-fA-F]{6}$/;function qt(t){return C.test(t)}const N=t=>t===void 0?"":`${t}px`,m=(t,e)=>Number(t.toFixed(e));function Jt(t,e){const n=Number.parseFloat(t.fontSize)||16,r=Number.parseFloat(t.lineHeight),o=Number.parseFloat(t.letterSpacing),s=Number.parseFloat(t.paddingTop),i=Number.parseFloat(t.maxWidth);return{fontKey:e,sizePx:n,weight:$t(Number.parseInt(t.fontWeight,10)),lineRatio:Number.isFinite(r)?m(r/n,3):1.2,letterEm:Number.isFinite(o)?m(o/n,4):0,align:Mt(t.textAlign),case:At(t.textTransform),paddingPx:Number.isFinite(s)?Math.round(s):0,widthPx:Number.isFinite(i)&&i<T?Math.round(i):T}}function $t(t){return Number.isFinite(t)?J.reduce((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e):400}function Mt(t){for(const e of Q)if(e===t)return e;return t==="end"?"right":"left"}function Qt(t,e){const n=K(t);if(!n)return"";for(const r of U)if(K(e(r.cssVar))===n)return r.key;return""}const K=t=>(t.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function Ht(t){const e=V(t);return e?`var(${e.cssVar})`:""}function vt(t,e,n,r){return!e||M(e)?.nodeId!==t?null:n.find(s=>r(s.getAttribute("class")))??n[0]??null}function te(t,e,n=()=>S,r=i=>i,o=Lt,s=!1){let i=0;for(const{element:c,partId:f}of t){const a=M(f)?.propKey;if(!a)continue;const l=r(a),x=Object.hasOwn(e,l)?g(e[l])??{}:{},p=R(yt(x,s),S),u=y.some(h=>c.style[h]);let d=!1;for(const[h,P]of Object.entries(p))jt(c,h,P),P&&(d=!0);if(u||y.some(h=>p[h]))for(const h of Ft(c,o))for(const P of y)h.style[P]=p[P]??"";d&&(i+=1)}return i}function Ft(t,e){const n=b(t.textContent??""),r=[];let o=t;for(let s=0;s<zt&&e(o);s+=1){const i=o.parentElement;if(!i||b(i.textContent??"")!==n)break;r.push(i),o=i}return r}const zt=8;function Lt(t){const e=t;return typeof window>"u"||!e?.ownerDocument?!1:window.getComputedStyle(e).display==="inline"}const S={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:T};function jt(t,e,n){if(!e.startsWith("--")){t.style[e]=n;return}const r=t.style;typeof r.setProperty=="function"?n?r.setProperty(e,n):r.removeProperty?.(e):r[e]=n;const o=t;e===A&&(n?o.setAttribute?.(G,""):o.removeAttribute?.(G))}const G="data-sf-part-para",kt=Object.keys(R({},S)),w=new Set(["color","overflowWrap",A,"fontStyle"]),y=kt.filter(t=>!w.has(t));function ee(t,e,n,r=o=>o){const o=new Map;for(const c of t){const f=Y(c.key,c.row);for(const a of c.texts){const l=o.get(a);l?(l.keys.add(c.key),l.partKeys.add(f)):o.set(a,{keys:new Set([c.key]),partKeys:new Set([f])})}}const s=new Map;for(const c of Object.keys(e)){if(!Wt(c))continue;const f=g(e[c])??{},a=R(f,S),l=D(f);!Object.values(a).some(Boolean)&&!Object.keys(l).length||s.set(c,{stamp:X(n,c),declarations:a,...Object.keys(l).length?{phone:l}:{}})}const i=new Map;for(const[c,{keys:f,partKeys:a}]of o){const l=a.size===1?[...a][0]:f.size===1?[...f][0]:null;if(!l)continue;const x=r(l);if(!Object.hasOwn(e,x))continue;const p=g(e[x])??{},u=R(p,S),d=D(p);!Object.values(u).some(Boolean)&&!Object.keys(d).length||i.set(c,{stamp:X(n,l),declarations:u,...Object.keys(d).length?{phone:d}:{}})}return i.size||s.size?{rules:i,kindRules:s,drawn:new Set(o.keys())}:null}function Wt(t){return t.startsWith("@")}function ne(t,e){return t?.kindRules.get(e)??null}function X(t,e){const n=r=>r.replace(/[^A-Za-z0-9_-]+/g,"-");return`${n(t)}~${n(e)}`}function re(t){const e=[],n=new Set,r=o=>{const{stamp:s,declarations:i}=o;if(n.has(s))return;n.add(s);const c=Object.entries(i).filter(([,u])=>u!==""),f=u=>u.map(([d,I])=>`${Ct(d)}: ${I}`).join("; "),a=`[${Z}="${s}"]`,l=c.filter(([u])=>!w.has(u)),x=c.filter(([u])=>w.has(u));l.length&&e.push(`${a}, *:has(> ${a}) { ${f(l)} }`),x.length&&e.push(`${a} { ${f(x)} }`),i[A]&&e.push(...Dt(a));const p=Object.entries(o.phone??{}).filter(([,u])=>u!=="");p.length&&e.push(`@media ${wt} { ${a}, *:has(> ${a}) { ${f(p)} } }`)};for(const o of t.rules.values())r(o);for(const o of t.kindRules.values())r(o);return e.join(`
2
- `)}function Dt(t){const e=`var(${A})`,n=":is([data-sf-bullet], [data-sf-number])";return[`${t} br:not(br + br) { display: block; content: ""; margin-top: ${e} }`,`${t} ${n}:not(:first-child) { margin-top: ${e} }`,`${t} ${n}:not(:last-child) { margin-bottom: ${e} }`]}const Ct=t=>t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`);function oe(t,e){if(!t)return null;const n=b(e),r=t.rules.get(n);if(r)return r;if(n.length<Kt||t.drawn.has(n))return null;let o=null;for(const[s,i]of t.rules)if(s.includes(n)){if(o&&o.stamp!==i.stamp)return null;o=i}return o}const Kt=8;export{Q as PART_ALIGNS,q as PART_CASES,pt as PART_LETTER_EM_MAX,ut as PART_LETTER_EM_MIN,ct as PART_LETTER_STEP,ft as PART_LINE_HEIGHT_MAX,lt as PART_LINE_HEIGHT_MIN,st as PART_LINE_STEP,L as PART_MEASURED_TRACKS,tt as PART_NUDGE_MAX,v as PART_NUDGE_MIN,nt as PART_PADDING_MAX,et as PART_PADDING_MIN,rt as PART_PADDING_STEP,G as PART_PARAGRAPH_ATTR,xt as PART_PARAGRAPH_MAX,dt as PART_PARAGRAPH_MIN,A as PART_PARAGRAPH_VAR,wt as PART_PHONE_MAX_CSS,at as PART_RELATIVE_PROPS,z as PART_SIZE_MAX,F as PART_SIZE_MIN,Z as PART_STYLED_ATTR,E as PART_STYLES_PROP,kt as PART_STYLE_PROPERTIES,J as PART_WEIGHTS,T as PART_WIDTH_MAX,ot as PART_WIDTH_MIN,it as PART_WIDTH_STEP,y as SHARED_PART_PROPERTIES,te as applyPartStyles,qt as isHexColour,Wt as isPartKindKey,Dt as paragraphRules,At as partCaseOfTransform,St as partCaseTransform,Qt as partFontKeyOf,D as partPhoneDeclarations,ne as partRuleForKind,oe as partRuleForText,Ot as partSpacingOf,Jt as partStyleBase,Bt as partStyleCount,re as partStyleCss,R as partStyleDeclarations,yt as partStyleForScreen,vt as partStyleSource,Yt as propsWithPartStyleValue,Zt as propsWithoutPartStyle,ee as publishedPartStyles,k as readPartStyle,j as readPartStyles};
1
+ import{FONT_OPTIONS as V,FONT_ROLES as M,fontOption as Y,SIZE_STEP_OF_ROLE as Z}from"../fonts.js";import{encodePartKey as q}from"./part-key.js";import{decodePartId as $,normalizePartText as b}from"./text-parts.js";import{COLOUR_TOKEN as H}from"../word-styles.js";const E="_partStyles",v="data-sf-part-styled",J=["none","upper","capitalize","lower"],Q=[400,500,600,700],z=["left","center","right","justify"],F=5,L=1e3,tt=-5,et=10,nt=0,rt=64,ot=2,it=120,T=1280,st=10,j={size:{min:F,max:L,step:1},sizePhone:{min:F,max:L,step:1},padding:{min:nt,max:rt,step:ot},width:{min:it,max:T,step:st}},at=.05,ct=.01,lt=["line","letter"],ft=.5,ut=2.5,pt=-1,dt=1,ht=0,xt=400,O={none:"none",upper:"uppercase",capitalize:"capitalize",lower:"lowercase"};function m(t){return!t||typeof t!="object"||Array.isArray(t)?null:t}function k(t){return m(t?.[E])??{}}function W(t,e){const n=k(t);return Object.hasOwn(n,e)?m(n[e])??{}:{}}function Zt(t,e){return Object.values(W(t,e)).filter(n=>n!==void 0).length}function D(t,e,n){const r={...k(t)};if(Pt(n).length?r[e]=n:delete r[e],!Object.keys(r).length){const{[E]:o,...s}=t;return s}return{...t,[E]:r}}function Pt(t){return Object.entries(t).filter(([,e])=>e!==void 0)}function gt(t){return lt.includes(t)}const _=(t,e,n)=>Math.min(n,Math.max(e,t));function mt(t,e){if(gt(t)){const n=Math.round(Number(e));return!Number.isFinite(n)||n===0?null:_(n,tt,et)}if(t==="lineHeight"){const n=Number(e);return Number.isFinite(n)?P(_(n,ft,ut),3):null}if(t==="letterSpacing"){const n=Number(e);return Number.isFinite(n)?P(_(n,pt,dt),4):null}if(t==="paragraphSpacing"){const n=Math.round(Number(e));return!Number.isFinite(n)||n<=0?null:_(n,ht,xt)}if(Object.hasOwn(j,t)){const{min:n,max:r}=j[t],o=Math.round(Number(e));return Number.isFinite(o)?_(o,n,r):null}return t==="italic"?typeof e=="boolean"?e:null:t==="role"?M.includes(String(e))?e:null:e}const _t=["weight","size","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding","width"];function C(t){let e=null;const n=r=>{e??={...t},delete e[r]};for(const r of _t){const o=t[r];o!==void 0&&!(typeof o=="number"&&Number.isFinite(o))&&n(r)}return t.align!==void 0&&!z.includes(t.align)&&n("align"),e??t}const St=[["font","role"],["line","lineHeight"],["letter","letterSpacing"]];function At(t){const e=[];for(const[n,r]of St)n===t?e.push(r):r===t&&e.push(n);return e}function qt(t,e,n,r){const o={...W(t,e)},s=r==null?null:mt(n,r);if(s===null)delete o[n];else{o[n]=s;for(const i of At(n))delete o[i]}return D(t,e,o)}function vt(t,e){return D(t,e,{})}function Tt(t){for(const e of J)if(O[e]===t)return e;return"none"}function Rt(t){return!t||!Object.hasOwn(O,t)?"":O[t]}const bt={heading:"--font-role-heading",heading2:"--font-role-heading2",heading3:"--font-role-heading3",body:"--font-role-body",accent:"--font-role-accent",label:"--font-role-label"};function Et(t){const e=t.role;return e&&M.includes(e)?e:null}const Ot={headingLarge:"min(clamp(64px,9vw,144px), var(--sf-heading-max,9999px))",headingMedium:"min(32px, var(--sf-heading-max,9999px))",headingSmall:"min(24px, var(--sf-heading-max,9999px))",accent:"32px",body:"14px",label:"12px"};function Nt(t){const e=Z[t],n=Ot[e];return n?`var(--size-${e}, ${n})`:`var(--size-${e})`}function wt(t){const e={};return typeof t.lineHeight=="number"?e.lineHeight=t.lineHeight:t.line&&(e.lineHeight=P(It+t.line*at,3)),typeof t.letterSpacing=="number"?e.letterSpacingEm=t.letterSpacing:t.letter&&(e.letterSpacingEm=P(t.letter*ct,4)),e}const It=1,S="--sf-part-para",yt="(max-width: 719.98px)";function K(t){return t=C(t),typeof t.sizePhone=="number"&&t.sizePhone>0?{fontSize:`${t.sizePhone}px`}:{}}function Mt(t,e){return e&&typeof t.sizePhone=="number"&&t.sizePhone>0?{...t,size:t.sizePhone}:t}function R(t,e){t=C(t);const n=Et(t),r=wt(t),o=t.size?`${t.size}px`:n?Nt(n):"";return{fontFamily:t.font?Ft(t.font):n?`var(${bt[n]})`:"",fontWeight:t.weight?String(t.weight):"",fontSize:o,minWidth:o?"0":"",overflowWrap:o?"break-word":"",lineHeight:r.lineHeight!==void 0?String(r.lineHeight):"",letterSpacing:r.letterSpacingEm!==void 0?`${r.letterSpacingEm}em`:"",[S]:t.paragraphSpacing?`${t.paragraphSpacing}px`:"",textTransform:Rt(t.case),textAlign:t.align??"",paddingTop:N(t.padding),paddingBottom:N(t.padding),maxWidth:N(t.width),color:$t(t.color),fontStyle:t.italic===!0?"italic":t.italic===!1?"normal":""}}const $t=t=>t===void 0||t===""?"":Object.hasOwn(H,t)?H[t]:G.test(t)?t:"",G=/^#[0-9a-fA-F]{6}$/;function Jt(t){return G.test(t)}const N=t=>t===void 0?"":`${t}px`,P=(t,e)=>Number(t.toFixed(e));function Qt(t,e){const n=Number.parseFloat(t.fontSize)||16,r=Number.parseFloat(t.lineHeight),o=Number.parseFloat(t.letterSpacing),s=Number.parseFloat(t.paddingTop),i=Number.parseFloat(t.maxWidth);return{fontKey:e,sizePx:n,weight:Ht(Number.parseInt(t.fontWeight,10)),lineRatio:Number.isFinite(r)?P(r/n,3):1.2,letterEm:Number.isFinite(o)?P(o/n,4):0,align:zt(t.textAlign),case:Tt(t.textTransform),paddingPx:Number.isFinite(s)?Math.round(s):0,widthPx:Number.isFinite(i)&&i<T?Math.round(i):T}}function Ht(t){return Number.isFinite(t)?Q.reduce((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e):400}function zt(t){for(const e of z)if(e===t)return e;return t==="end"?"right":"left"}function te(t,e){const n=X(t);if(!n)return"";for(const r of V)if(X(e(r.cssVar))===n)return r.key;return""}const X=t=>(t.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function Ft(t){const e=Y(t);return e?`var(${e.cssVar})`:""}function ee(t,e,n,r){return!e||$(e)?.nodeId!==t?null:n.find(s=>r(s.getAttribute("class")))??n[0]??null}function ne(t,e,n=()=>A,r=i=>i,o=kt,s=!1){let i=0;for(const{element:a,partId:f}of t){const c=$(f)?.propKey;if(!c)continue;const l=r(c),h=Object.hasOwn(e,l)?m(e[l])??{}:{},p=R(Mt(h,s),A),u=I.some(x=>a.style[x]);let d=!1;for(const[x,g]of Object.entries(p))Wt(a,x,g),g&&(d=!0);if(u||I.some(x=>p[x]))for(const x of Lt(a,o))for(const g of I)x.style[g]=p[g]??"";d&&(i+=1)}return i}function Lt(t,e){const n=b(t.textContent??""),r=[];let o=t;for(let s=0;s<jt&&e(o);s+=1){const i=o.parentElement;if(!i||b(i.textContent??"")!==n)break;r.push(i),o=i}return r}const jt=8;function kt(t){const e=t;return typeof window>"u"||!e?.ownerDocument?!1:window.getComputedStyle(e).display==="inline"}const A={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:T};function Wt(t,e,n){if(!e.startsWith("--")){t.style[e]=n;return}const r=t.style;typeof r.setProperty=="function"?n?r.setProperty(e,n):r.removeProperty?.(e):r[e]=n;const o=t;e===S&&(n?o.setAttribute?.(U,""):o.removeAttribute?.(U))}const U="data-sf-part-para",Dt=Object.keys(R({},A)),w=new Set(["color","overflowWrap",S,"fontStyle"]),I=Dt.filter(t=>!w.has(t));function re(t,e,n,r=o=>o){const o=new Map;for(const a of t){const f=q(a.key,a.row);for(const c of a.texts){const l=o.get(c);l?(l.keys.add(a.key),l.partKeys.add(f)):o.set(c,{keys:new Set([a.key]),partKeys:new Set([f])})}}const s=new Map;for(const a of Object.keys(e)){if(!Ct(a))continue;const f=m(e[a])??{},c=R(f,A),l=K(f);!Object.values(c).some(Boolean)&&!Object.keys(l).length||s.set(a,{stamp:B(n,a),declarations:c,...Object.keys(l).length?{phone:l}:{}})}const i=new Map;for(const[a,{keys:f,partKeys:c}]of o){const l=c.size===1?[...c][0]:f.size===1?[...f][0]:null;if(!l)continue;const h=r(l);if(!Object.hasOwn(e,h))continue;const p=m(e[h])??{},u=R(p,A),d=K(p);!Object.values(u).some(Boolean)&&!Object.keys(d).length||i.set(a,{stamp:B(n,l),declarations:u,...Object.keys(d).length?{phone:d}:{}})}return i.size||s.size?{rules:i,kindRules:s,drawn:new Set(o.keys())}:null}function Ct(t){return t.startsWith("@")}function oe(t,e){return t?.kindRules.get(e)??null}function B(t,e){const n=r=>r.replace(/[^A-Za-z0-9_-]+/g,"-");return`${n(t)}~${n(e)}`}function ie(t){const e=[],n=new Set,r=o=>{const{stamp:s,declarations:i}=o;if(n.has(s))return;n.add(s);const a=Object.entries(i).filter(([,u])=>u!==""),f=u=>u.map(([d,y])=>`${Gt(d)}: ${y}`).join("; "),c=`[${v}="${s}"]`,l=a.filter(([u])=>!w.has(u)),h=a.filter(([u])=>w.has(u));l.length&&e.push(`${c}, *:has(> ${c}) { ${f(l)} }`),h.length&&e.push(`${c} { ${f(h)} }`),i[S]&&e.push(...Kt(c));const p=Object.entries(o.phone??{}).filter(([,u])=>u!=="");p.length&&e.push(`@media ${yt} { ${c}, *:has(> ${c}) { ${f(p)} } }`)};for(const o of t.rules.values())r(o);for(const o of t.kindRules.values())r(o);return e.join(`
2
+ `)}function Kt(t){const e=`var(${S})`,n=":is([data-sf-bullet], [data-sf-number])";return[`${t} br:not(br + br) { display: block; content: ""; margin-top: ${e} }`,`${t} ${n}:not(:first-child) { margin-top: ${e} }`,`${t} ${n}:not(:last-child) { margin-bottom: ${e} }`]}const Gt=t=>t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`);function se(t,e){if(!t)return null;const n=b(e),r=t.rules.get(n);if(r)return r;if(n.length<Xt||t.drawn.has(n))return null;let o=null;for(const[s,i]of t.rules)if(s.includes(n)){if(o&&o.stamp!==i.stamp)return null;o=i}return o}const Xt=8;export{z as PART_ALIGNS,J as PART_CASES,dt as PART_LETTER_EM_MAX,pt as PART_LETTER_EM_MIN,ct as PART_LETTER_STEP,ut as PART_LINE_HEIGHT_MAX,ft as PART_LINE_HEIGHT_MIN,at as PART_LINE_STEP,j as PART_MEASURED_TRACKS,et as PART_NUDGE_MAX,tt as PART_NUDGE_MIN,rt as PART_PADDING_MAX,nt as PART_PADDING_MIN,ot as PART_PADDING_STEP,U as PART_PARAGRAPH_ATTR,xt as PART_PARAGRAPH_MAX,ht as PART_PARAGRAPH_MIN,S as PART_PARAGRAPH_VAR,yt as PART_PHONE_MAX_CSS,lt as PART_RELATIVE_PROPS,L as PART_SIZE_MAX,F as PART_SIZE_MIN,v as PART_STYLED_ATTR,E as PART_STYLES_PROP,Dt as PART_STYLE_PROPERTIES,Q as PART_WEIGHTS,T as PART_WIDTH_MAX,it as PART_WIDTH_MIN,st as PART_WIDTH_STEP,I as SHARED_PART_PROPERTIES,ne as applyPartStyles,Jt as isHexColour,Ct as isPartKindKey,Kt as paragraphRules,Tt as partCaseOfTransform,Rt as partCaseTransform,te as partFontKeyOf,K as partPhoneDeclarations,oe as partRuleForKind,se as partRuleForText,wt as partSpacingOf,Qt as partStyleBase,Zt as partStyleCount,ie as partStyleCss,R as partStyleDeclarations,Mt as partStyleForScreen,ee as partStyleSource,qt as propsWithPartStyleValue,vt as propsWithoutPartStyle,re as publishedPartStyles,W as readPartStyle,k as readPartStyles};
@@ -1 +1 @@
1
- const i=new Set(["Reviews","Cards","FAQ","Prose","ProductHero","SpecTable","ProductGrid","ParagraphsA","KeyFeatures","Stats","StatsParagraph","Chart","Mockup","Testimonials","Logos","ContactRouting","ContactLocations","SubmitBuild","ReviewForm","Form","AppointmentBooking","OrderSummary","DeliveryOptions","PaymentBadges","CheckoutCTA","Collections","AlloyWheelsListing","CatalogFilterBar","FitmentFinder","GalleryB","BrandStrip","DocMasthead","DocBody","DocMetaCards","Masthead","FeaturedCover","LongRead","Series","Events","SectionHeader","Grid","Flex","Spacer","Divider","CustomHTML","Breadcrumb","CategoryBar","DocTabs","Hero","HeroSingle","IntroBleed","Manifesto","Timeline","TimelineTrack","Footprint","Banner","TitleWithButtons","Ticker","SubscribeBlogs","TyreSizes","TyreFitment","EuTyreLabel","SpecStrip","ProcessSteps","DetailRows","FitmentTable","CompatibleTyres","RelatedProducts","BundleOffer","Split","Gallery","Subscribe","Countdown"]),a={name:"sectionGroups",applies:(e,o)=>o.isSection(e)&&(i.has(e)||o.isHostBlock(e)),panel(e,o,t){const r=t.assignSectionGroups;e?.fields&&(e.fields=r(e.fields,o))}},s=new Set(["HeroSlide","Heading","Text","ImageBlock","ButtonBlock","HeroGroup","GalleryItem","Footer","FooterLogo","FooterMenu","FooterGroup","FooterText","PostCard","LogoBlock","CollectionCard","Eyebrow","BookingBox","SubmitBox","FooterSocial","MenuBlock","SocialLogosBlock","EmailFormBlock","SearchBlock","CartBlock"]),n={name:"blockGroups",applies:e=>s.has(e),panel(e,o,t){const r=t.assignSectionGroups;e?.fields&&(e.fields=r(e.fields,o))}};export{n as blockGroups,a as sectionGroups};
1
+ const i=new Set(["Reviews","Cards","FAQ","Prose","ProductHero","SpecTable","ProductGrid","ParagraphsA","KeyFeatures","Stats","StatsParagraph","Chart","Mockup","Testimonials","Logos","ContactRouting","ContactLocations","SubmitBuild","ReviewForm","Form","AppointmentBooking","OrderSummary","DeliveryOptions","PaymentBadges","CheckoutCTA","Collections","AlloyWheelsListing","CatalogFilterBar","FitmentFinder","GalleryB","BrandStrip","DocMasthead","DocBody","DocMetaCards","Masthead","FeaturedCover","LongRead","Series","Events","SectionHeader","Grid","Flex","Spacer","Divider","CustomHTML","Breadcrumb","CategoryBar","DocTabs","Hero","HeroSingle","IntroBleed","Manifesto","Timeline","TimelineTrack","Footprint","Banner","TitleWithButtons","Ticker","SubscribeBlogs","TyreSizes","TyreFitment","EuTyreLabel","SpecStrip","ProcessSteps","DetailRows","FitmentTable","CompatibleTyres","RelatedProducts","BundleOffer","Split","Gallery","Subscribe","Countdown"]),a={name:"sectionGroups",applies:(e,o)=>o.isSection(e)&&(i.has(e)||o.isHostBlock(e)),panel(e,o,t){const r=t.assignSectionGroups;e?.fields&&(e.fields=r(e.fields,o))}},s=new Set(["HeroSlide","Heading","Text","ImageBlock","ButtonBlock","HeroGroup","GalleryItem","Footer","FooterLogo","FooterMenu","FooterGroup","FooterText","PostCard","LogoBlock","CollectionCard","Eyebrow","BookingBox","SubmitBox","FooterSocial","MenuBlock","SocialLogosBlock","EmailFormBlock","SearchBlock","CartBlock","CountrySwitchBlock"]),n={name:"blockGroups",applies:e=>s.has(e),panel(e,o,t){const r=t.assignSectionGroups;e?.fields&&(e.fields=r(e.fields,o))}};export{n as blockGroups,a as sectionGroups};
@@ -0,0 +1,13 @@
1
+ import type { SlotConfigView, TreeItem } from "./content-tree.js";
2
+ export type TemplateSelector = {
3
+ index: number;
4
+ zone?: string;
5
+ } | null | undefined;
6
+ export type TemplatePlan = {
7
+ owner: TreeItem;
8
+ zone: string;
9
+ index: number;
10
+ value: unknown;
11
+ };
12
+ export declare function planTemplateRow(config: SlotConfigView, content: ReadonlyArray<TreeItem>, selector: TemplateSelector, key: string): TemplatePlan | null;
13
+ export declare function templateWrite(plan: TemplatePlan, key: string, value: unknown, replaceComponent: (zone: string, index: number, item: TreeItem) => void): void;
@@ -0,0 +1 @@
1
+ import{parentOfSelection as i}from"./selection-parent.js";function m(e,o,r,t){const n=i(e,o,r);return n?{owner:n.item,zone:n.zone,index:n.index,value:n.item.props[t]}:null}function u(e,o,r,t){t(e.zone,e.index,{...e.owner,props:{...e.owner.props,[o]:r}})}export{m as planTemplateRow,u as templateWrite};
@@ -1,11 +1,11 @@
1
1
  import { type HeroGroupPlacement } from "./hero-group-placement.js";
2
2
  export declare const REEL_PLACEMENTS: readonly ["top-left", "top-center", "top-right", "left", "center", "right", "bottom-left", "bottom-center", "bottom-right"];
3
3
  export type ReelPlacement = HeroGroupPlacement;
4
- export declare const REEL_PLACEMENT_LABELS: Readonly<Record<"center" | "left" | "top-left" | "top-center" | "top-right" | "right" | "bottom-left" | "bottom-center" | "bottom-right", string>>;
4
+ export declare const REEL_PLACEMENT_LABELS: Readonly<Record<"center" | "left" | "right" | "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right", string>>;
5
5
  export declare const REEL_PLACEMENT_DEFAULT: ReelPlacement;
6
- export declare const REEL_SHAPES: readonly ["cards", "dots", "numbers", "bar", "tabs"];
6
+ export declare const REEL_SHAPES: readonly ["cards", "dots", "numbers", "bar", "squares", "tabs"];
7
7
  export type ReelShape = (typeof REEL_SHAPES)[number];
8
- export declare const HERO_REEL_SHAPES: readonly ["cards", "dots", "numbers", "bar"];
8
+ export declare const HERO_REEL_SHAPES: readonly ["cards", "dots", "numbers", "bar", "squares"];
9
9
  export type HeroReelShape = (typeof HERO_REEL_SHAPES)[number];
10
10
  export declare const REEL_SHAPE_DEFAULT: HeroReelShape;
11
11
  export declare const REEL_SHAPE_LABELS: Readonly<Record<ReelShape, string>>;
package/dist/lib/reel.js CHANGED
@@ -1 +1 @@
1
- import{HERO_GROUP_PLACEMENTS as E,HERO_GROUP_PLACEMENT_LABELS as c}from"./hero-group-placement.js";import{heroOverlayRailClass as l}from"./hero-overlay-anchor.js";const u=E,_=c,i="top-right",d=["cards","dots","numbers","bar","tabs"],p=["cards","dots","numbers","bar"],s="cards",A={cards:"Cards",dots:"Dots",numbers:"Numbers",bar:"Bar",tabs:"Tabs"},S=!0;function n(e){return d.includes(e)?e:s}function P(e){return p.includes(e)?e:s}function f(e){return u.includes(e)?e:i}const a={cards:"flex-col gap-2.5",dots:"flex-row items-center gap-2",numbers:"flex-col gap-2",bar:"h-0.5 w-[34%] max-w-[420px] gap-px overflow-hidden rounded-full",tabs:"flex-row items-stretch w-full overflow-x-auto"};function h(e,r){return l(f(r),a[n(e)])}function H(e){return`flex ${a[n(e)]}`}function b(e){return e.shown!==!1&&(e.count??0)>1}function x(e){return{name:e.dataset.slideName||"",process:e.dataset.slideProcess||"",video:e.dataset.slideMedia==="video"}}function m(e,r){return e===r?!0:e.length!==r.length?!1:e.every((t,o)=>t.name===r[o].name&&t.process===r[o].process&&t.video===r[o].video)}function w(e,r){const t=Array.from(r,x);return m(e,t)?e:t}export{p as HERO_REEL_SHAPES,u as REEL_PLACEMENTS,i as REEL_PLACEMENT_DEFAULT,_ as REEL_PLACEMENT_LABELS,d as REEL_SHAPES,s as REEL_SHAPE_DEFAULT,A as REEL_SHAPE_LABELS,S as REEL_SHOWN_DEFAULT,w as nextReel,P as normaliseHeroReelShape,f as normaliseReelPlacement,n as normaliseReelShape,h as reelRailClass,b as reelShown,H as reelSurfaceRailClass,m as sameReel};
1
+ import{HERO_GROUP_PLACEMENTS as l,HERO_GROUP_PLACEMENT_LABELS as E}from"./hero-group-placement.js";import{heroOverlayRailClass as c}from"./hero-overlay-anchor.js";const u=l,_=E,i="top-right",d=["cards","dots","numbers","bar","squares","tabs"],p=["cards","dots","numbers","bar","squares"],s="cards",S={cards:"Cards",dots:"Dots",numbers:"Numbers",bar:"Bar",squares:"Squares",tabs:"Tabs"},A=!0;function n(e){return d.includes(e)?e:s}function P(e){return p.includes(e)?e:s}function f(e){return u.includes(e)?e:i}const a={cards:"flex-col gap-2.5",dots:"flex-row items-center gap-2",numbers:"flex-col gap-2",bar:"h-0.5 w-[34%] max-w-[420px] gap-px overflow-hidden rounded-full",squares:"flex-col gap-0",tabs:"flex-row items-stretch w-full overflow-x-auto"};function h(e,r){return c(f(r),a[n(e)])}function H(e){return`flex ${a[n(e)]}`}function b(e){return e.shown!==!1&&(e.count??0)>1}function x(e){return{name:e.dataset.slideName||"",process:e.dataset.slideProcess||"",video:e.dataset.slideMedia==="video"}}function m(e,r){return e===r?!0:e.length!==r.length?!1:e.every((t,o)=>t.name===r[o].name&&t.process===r[o].process&&t.video===r[o].video)}function w(e,r){const t=Array.from(r,x);return m(e,t)?e:t}export{p as HERO_REEL_SHAPES,u as REEL_PLACEMENTS,i as REEL_PLACEMENT_DEFAULT,_ as REEL_PLACEMENT_LABELS,d as REEL_SHAPES,s as REEL_SHAPE_DEFAULT,S as REEL_SHAPE_LABELS,A as REEL_SHOWN_DEFAULT,w as nextReel,P as normaliseHeroReelShape,f as normaliseReelPlacement,n as normaliseReelShape,h as reelRailClass,b as reelShown,H as reelSurfaceRailClass,m as sameReel};
@@ -0,0 +1,5 @@
1
+ import { type RuleReport, type SourceFile } from "./rule.js";
2
+ export type OneMarkupGrammarOptions = {
3
+ readonly minFiles: number;
4
+ };
5
+ export declare function oneMarkupGrammar(files: readonly SourceFile[], options: OneMarkupGrammarOptions): RuleReport;
@@ -0,0 +1,4 @@
1
+ import{ruleChecks as h}from"./rule.js";const r=o=>JSON.stringify(o),u=/\.(ts|tsx|js|jsx|mjs|cjs)$/,k=/(?:from\s*|import\s*\(\s*|require\s*\(\s*|import\s+)["']([^"']+)["']/g,t=["efficient-easel","markup"].join("/"),p=o=>[...o.matchAll(k)].some(s=>s[1]===t);function d(o,s){const{check:a,report:c}=h("one markup grammar");{const e=[["a named import",`import { parseMarkup } from ${r(t)};`,!0],["a type import",`import type { MarkStyle } from ${r(t)};`,!0],["a re-export",`export { applyMark } from ${r(t)};`,!0],["a dynamic import()",`const m = await import(${r(t)});`,!0],["a require()",`const m = require(${r(t)});`,!0],["the shell's grammar",`import { parseMarkup } from ${r(["efficient-shell","markup"].join("/"))};`,!1],["another easel subpath",`import { CopyBox } from ${r(["efficient-easel","copy"].join("/"))};`,!1]];for(const[l,f,n]of e)a(`the reader ${n?"finds":"leaves alone"} ${l}`,p(f)===n)}const i=o.filter(e=>u.test(e.path));a(`read the source (${i.length} JS/TS files, at least ${s.minFiles})`,i.length>=s.minFiles,"fewer means the walk broke, and every check below is vacuous");const m=i.filter(e=>p(e.text)).map(e=>e.path);return a(`no file imports ${t}`,m.length===0,`the retired copy of the grammar is imported:
2
+ ${m.join(`
3
+ `)}
4
+ Read the one grammar from efficient-shell/markup instead (decision D1, 2026-10-12).`),c()}export{d as oneMarkupGrammar};
@@ -0,0 +1,6 @@
1
+ import { type RuleReport, type SourceFile } from "./rule.js";
2
+ export type OneSiteColumnOptions = {
3
+ readonly home?: string;
4
+ readonly minFiles: number;
5
+ };
6
+ export declare function oneSiteColumn(files: readonly SourceFile[], options: OneSiteColumnOptions): RuleReport;
@@ -0,0 +1,3 @@
1
+ import{SITE_COLUMN as h}from"../content/page-width.js";import{ruleChecks as a}from"./rule.js";function n(r){return r.includes(h)}function u(r,t){const{check:o,report:l}=a("one site column");o("the reader finds a copy, and passes an import",n(`const SITE_COLUMN =
2
+ "${h}";`)&&!n(`import { SITE_COLUMN } from "x";
3
+ <div className={SITE_COLUMN} />`));const s=r.filter(e=>/\.tsx?$/.test(e.path));o(`read the source (${s.length} TS/TSX files, at least ${t.minFiles})`,s.length>=t.minFiles,"fewer means the walk broke, and the check below is vacuous");const i=s.filter(e=>e.path!==t.home&&n(e.text)).map(e=>e.path);return o("no file spells the site column out; each imports SITE_COLUMN",i.length===0,`a copy in: ${i.join(", ")}`),t.home&&o(`${t.home} defines it`,s.some(e=>e.path===t.home&&n(e.text)),"the home file has no SITE_COLUMN"),l()}export{u as oneSiteColumn};
@@ -116,6 +116,11 @@ export interface ChatSettings {
116
116
  title: string;
117
117
  subtitle: string;
118
118
  greeting: string;
119
+ launcherColor?: string;
120
+ launcherIcon?: string;
121
+ launcherPosition?: "right" | "left";
122
+ launcherLabel?: string;
123
+ showOnPhones?: boolean;
119
124
  }
120
125
  export interface WebsiteChat {
121
126
  get(scope?: SiteScope): Promise<ChatSettings>;