efficient-web-builder 19.0.0 → 19.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 19.1.0 - 2026-10-17
4
+
5
+ **A Customer Photo Grid card's words stand on any of the nine anchors, and a repeated card has a template** (owner 2026-10-17, Panthera rebuild; approved mockup v3 https://claude.ai/artifact/4nGAU5Ge8uR4LaWbDbYrgc). A minor: every stored card draws exactly what it drew.
6
+
7
+ ### Added for hosts
8
+
9
+ - `lib/content/gallery-card-layout`: `GALLERY_CAPTION_ANCHOR_DEFAULT`, `galleryCaptionAnchorClass(anchor)`, `galleryCaptionWash(anchor)`. The anchors are the editor's one nine-square vocabulary (`lib/hero-group-placement`, what `placementField` writes). The band sets `justify-*`, the column sets `text-center` / `text-right`, and the dark wash follows the band (top fades down, middle is even, bottom fades up). Unset, junk and `bottom-left` answer the shipped `justify-end` and gradient exactly.
10
+ - `templateField(inner)` (`lib/puck/controls`), `lib/puck/template-field` (`planTemplateRow`, `templateWrite`), `components/TemplateFieldRow`: a row drawn on a repeated card that reads and writes its key on the card's PARENT, so one change reaches every card and cards added later. No parent: the card's own value.
11
+
12
+ ### Guards
13
+
14
+ - New `scripts/test-gallery-caption-anchor.ts` and `scripts/test-template-field.tsx`; both failed first (module not found).
15
+
3
16
  ## 19.0.0 - 2026-10-17
4
17
 
5
18
  **A settings row may carry the shell's one show-when rule, read in ONE place** (Lewis 2026-10-17: one rule, one place; efficient-shell #516). No field carries a rule yet, so every panel draws what it drew.
@@ -0,0 +1,11 @@
1
+ import type { ReactElement } from "react";
2
+ export type TemplateRender = (props: {
3
+ value: unknown;
4
+ onChange: (v: unknown) => void;
5
+ name?: string;
6
+ [key: string]: unknown;
7
+ }) => ReactElement;
8
+ export default function TemplateFieldRow({ render, props }: {
9
+ render: TemplateRender;
10
+ props: Parameters<TemplateRender>[0];
11
+ }): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
@@ -0,0 +1 @@
1
+ "use client";import{useEasel as c}from"efficient-easel/easel";import{planTemplateRow as p,templateWrite as u}from"../lib/puck/template-field.js";import{useSectionOps as r}from"../lib/puck/use-section-ops.js";function s({render:a,props:t}){const{appState:l,config:m}=c(o=>o),i=r(),e=t.name,n=e?p(m,l.data.content??[],l.ui.itemSelector,e):null;return a(!n||!e?t:{...t,value:n.value,onChange:o=>u(n,e,o,i.replaceComponent)})}export{s as default};
@@ -1,3 +1,4 @@
1
+ import { type HeroGroupPlacement } from "../hero-group-placement.js";
1
2
  export declare const GALLERY_CARD_RATIOS: readonly ["square", "tall", "wide", "landscape", "portrait", "auto"];
2
3
  export type GalleryCardRatio = (typeof GALLERY_CARD_RATIOS)[number];
3
4
  export declare const GALLERY_CARD_RATIO_DEFAULT: GalleryCardRatio;
@@ -5,3 +6,6 @@ export declare function galleryCardRatioClass(ratio?: string): string;
5
6
  export declare const GALLERY_CAPTION_PLACES: readonly ["overlay", "below"];
6
7
  export type GalleryCaptionPlace = (typeof GALLERY_CAPTION_PLACES)[number];
7
8
  export declare function galleryCaptionIsBelow(place?: string): boolean;
9
+ export declare const GALLERY_CAPTION_ANCHOR_DEFAULT: HeroGroupPlacement;
10
+ export declare function galleryCaptionAnchorClass(anchor?: unknown): string;
11
+ export declare function galleryCaptionWash(anchor?: unknown): string;
@@ -1 +1 @@
1
- const t=["square","tall","wide","landscape","portrait","auto"],a="square";function r(e){switch(e){case"tall":return"aspect-[3/4]";case"wide":return"aspect-[2/1]";case"landscape":return"aspect-[4/3]";case"portrait":return"aspect-[4/5]";case"auto":return"";default:return"aspect-square"}}const s=["overlay","below"];function o(e){return e==="below"}export{s as GALLERY_CAPTION_PLACES,t as GALLERY_CARD_RATIOS,a as GALLERY_CARD_RATIO_DEFAULT,o as galleryCaptionIsBelow,r as galleryCardRatioClass};
1
+ import{normalisePlacement as r,placementParts as a}from"../hero-group-placement.js";const p=["square","tall","wide","landscape","portrait","auto"],A="square";function d(t){switch(t){case"tall":return"aspect-[3/4]";case"wide":return"aspect-[2/1]";case"landscape":return"aspect-[4/3]";case"portrait":return"aspect-[4/5]";case"auto":return"";default:return"aspect-square"}}const g=["overlay","below"];function _(t){return t==="below"}const f="bottom-left";function C(t){const{band:n,column:e}=a(r(t));return["justify-start","justify-center","justify-end"][n]+(e==="center"?" text-center":e==="end"?" text-right":"")}const s="linear-gradient(180deg, transparent 40%, rgba(10,10,10,.85) 100%)",o="linear-gradient(0deg, transparent 40%, rgba(10,10,10,.85) 100%)",c="rgba(10,10,10,.45)";function L(t){return[o,c,s][a(r(t)).band]}export{f as GALLERY_CAPTION_ANCHOR_DEFAULT,g as GALLERY_CAPTION_PLACES,p as GALLERY_CARD_RATIOS,A as GALLERY_CARD_RATIO_DEFAULT,C as galleryCaptionAnchorClass,_ as galleryCaptionIsBelow,L as galleryCaptionWash,d as galleryCardRatioClass};
@@ -175,6 +175,7 @@ export declare function sectionShapeFields(): Record<string, unknown>;
175
175
  export declare function sectionBorderField(tier: "desktop" | "mobile"): CustomField<SettingsBorderValue | undefined>;
176
176
  export declare function sectionAnimationFields(): Record<string, unknown>;
177
177
  export declare function cardCornersField(): CustomField<number | null>;
178
+ export declare function templateField<V>(inner: CustomField<V>): CustomField<V>;
178
179
  export declare function cardShapeFields(): Record<string, unknown>;
179
180
  export declare function boxJustifyField(): SelectField;
180
181
  export declare function boxAlignField(): SelectField;
@@ -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 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 gt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as bt,CORNER_RADIUS_MAX as Se,CORNER_RADIUS_MIN as L}from"../content/card-image-shape.js";import{IMAGE_CORNER_STEP as xt,IMAGE_CORNERS_LABEL as St}from"../content/image-corners.js";import{GRID_MAX_COLUMNS as yt}from"../content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Ct,GALLERY_LAYOUTS as F,GALLERY_LAYOUT_KEYS as ye}from"../content/gallery-layout.js";import{anchorSiblingsOf as _t,HERO_GROUP_PLACEMENTS as It,HERO_GROUP_PLACEMENT_DEFAULT as Et,normalisePlacement as Rt,placementPoints as Ce}from"../hero-group-placement.js";import Tt from"../../components/KeepHint.js";import{AdjustIcon as Ot,AlignLeftIcon as wt,EyeIcon as Pt,AlignSeparateIcon as kt,AnimationIcon as _e,BackgroundIcon as Nt,BorderAllIcon as At,BlockSectionIcon as Lt,CartIcon as Ft,ColumnWidthsIcon as Ie,ColumnsIcon as vt,CornerIcon as Dt,DirectionDownIcon as Bt,DirectionLeftIcon as Ht,DirectionRightIcon as Gt,DirectionUpIcon as Mt,DollarIcon as Kt,FinishIcon as Wt,GapIcon as Ee,GridIcon as Ut,GroundIcon as Xt,HashIcon as Re,HeightIcon as $t,ImageIcon as jt,ListIcon as zt,LocationIcon as ne,PaddingAllIcon as Vt,PaddingBottomIcon as Te,PaddingLeftIcon as Oe,PaddingRightIcon as we,PaddingTopIcon as Pe,PageIcon as ke,PhoneIcon as Yt,PlacementIcon as qt,ProductSizeIcon as Jt,StickyIcon as Zt,RotateIcon as Qt,SquareIcon as en,TypeIcon as tn,WidthIcon as nn,WrapIcon as on}from"efficient-easel/icons";import{FieldGlyph as Ne}from"../../components/FieldGlyph.js";import{resolvePageBackground as rn}from"../content/page-background.js";import{CORNER_SIDES as Ae,CORNER_SIDE_POINTS as ln,hasOwnSectionCorners as an,normalizeCornerSides as Le}from"../content/section-corners.js";import{SECTION_MOTION_NONE as sn,SECTION_MOTION_OPTIONS as cn}from"../content/section-animation.js";import{enclosingSectionProps as Fe}from"./enclosing-section.js";import{SettingsDefaultReset as S,SettingsField as h,SettingsGroupHead as dn,SettingsGroupSub as un,SettingsBorder as pn,SettingsSegmented as fn,SettingsSides as mn,SettingsSidesEach as ve,sidesStartEach as hn,SettingsSwitch as De,borderSides as gn,borderStartEach as bn}from"efficient-easel/panel";import{FieldSelect as xn,ListField as Sn}from"efficient-easel/fields";import{DisplayChips as yn}from"efficient-shell/ui";import{desktopDisplayChanged as Cn,partShownOnDesktop as _n,partShownOnPhone as In,phoneDisplayChanged as En,withDesktopPart as Rn,withPhonePart as Tn}from"../content/part-display.js";import{AlignmentGrid as On,Checkbox as wn,CornersInput as Pn,DateTimePicker as kn,FOCAL_DEFAULT as Be,Slider as Nn,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 An,NoControlMark as Me,noControlField as oe}from"./panel-no-control-mark.js";import{OWN_BOX_FIELD as Ln}from"./own-box.js";import{PHONE_CLEAR as Fn,phoneKey as v,resolvePhoneValue as re}from"./phone-override.js";import{SuppressibleText as vn}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Dn,CARD_OUTLINE_OPTIONS as Bn,DEFAULT_CARD_INDEX_FORMAT as Hn,DEFAULT_CARD_OUTLINE as Gn}from"../sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Mn,DEFAULT_COVER_INDEX as Kn}from"../sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Wn}from"./text-control-kinds.js";import Un from"../../components/ImageFocusRow.js";import Xn from"../../components/MediaUploadField.js";import $n from"../../components/MultiSelectField.js";import jn from"../../components/SectionThemePicker.js";import zn from"../../components/SearchSelectField.js";import Vn from"../../components/StorefrontLinkField.js";import Ke from"../../components/UiIcon.js";import{SECTION_PADDING as E}from"../content/section-padding.js";import{hasPhoneHeight as Yn,resolveSectionMinHeight as qn}from"../content/section-min-height.js";import{SECTION_STICK_DISTANCE as J,SECTION_STICK_LABEL as ie,hasPhoneStick as Jn,resolveSectionStick as Zn}from"../content/section-sticky.js";import{SECTION_MIN_HEIGHT as Qn,SECTION_MIN_HEIGHT_GROUP_LABEL as U,SECTION_SCREEN_PCT as eo}from"../content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as to,containerDirectionPoints as no,resolveContainerDirection as We}from"../content/container-direction.js";import{BOX_ALIGN_POINTS as oo,BOX_BLOCK_SPACING_LABEL as ro,BOX_BLOCK_SPACING_POINTS as Ue,BOX_JUSTIFY_POINTS as Xe,BOX_PHONE_ROW_LABEL as io,BOX_PHONE_ROW_MAX as lo,BOX_PHONE_ROW_MIN as $e,BOX_SHARE_LABEL as je,BOX_SHARE_POINTS as le,BOX_WRAP_LABEL as ao,BOX_WRAP_POINTS as ze}from"../content/box-layout.js";import{usePreviewHeader as X}from"../../components/PreviewHeaderContext.js";import{BORDER_MAX as so}from"../content/borders.js";import{DEFAULT_SURFACES as co,normalizeTheme as uo}from"../theme.js";import{CONTAINER_GAP as ae,CONTAINER_GAP_BUILT_IN as po,GAP_FIELD_CONTAINER as fo,hasOwnContainerGap as mo,resolveContainerGap as ho}from"../content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as go,CARD_IMAGE_BG_OFF as bo,CARD_IMAGE_BG_SWATCH_NAMES as xo,CARD_IMAGE_BG_SWATCHES as So,isCardImageBackgroundInheriting as yo,cardImageBackgroundChoice as Co,THEME_CARD_IMAGE_BG as _o}from"../content/card-image-background.js";import{SECTION_BG_INHERIT as Io,SECTION_BG_SWATCHES as Eo,SECTION_BG_SWATCH_NAMES as Ro,THEME_SECTION_BG as To,isSectionBackgroundInheriting as Oo}from"../content/section-background.js";import{SECTION_THEME_GROUP_LABEL as wo}from"../content/section-surface.js";import{TYPE_SIZE_FIXED as Po,TYPE_SIZE_INHERIT as ko,isTypeSizeInheriting as No}from"../content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Ao,WIDTH_CHOICE_LABEL as Lo,WIDTH_INHERIT as Fo,resolveWidth as vo,sectionRunsFullWidth as Ve}from"../content/section-width.js";import{useFoldHeadingLevel as Ye}from"./panel-heading-scope.js";import{withStyleKind as Do}from"efficient-easel/style-clipboard";function D(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!Y(n)&&Do(n,`section:${t}`);return e}function $i({children:e}){return r("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function qe(){return null}function Bo(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return r(qe,{},e)}function Ho(e){return e.type===qe}function k(e){return Ho(e)?void 0:e}function B(e,t){return l("{value} from {from}",{value:e,from:t})}function Go(){const{appState:e}=A(i=>i),t=e.data.root?.props??{},{mode:n,pageWidth:o}=vo(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 Mo(){const{blockGap:e}=X();return e===null?l("this container's own spacing"):B(`${e}px`,l("Site styles"))}function Ko({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:Mo(),onReset:t})}function Wo({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:Go(),onReset:t})}function 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?zo(i)?r("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(i)}):r(Tt,{children:l(i)}):void 0,j=u?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return r(h,{label:l(n),icon:r(tn,{}),htmlFor: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 ji(e,t){return{...e,[xe]:t}}function zi(e){const t=e[I];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[I]:{...t,offPage:!0}}}function Vi(e){return!e||typeof e!="object"?!1:e[I]?.offPage===!0}const Je="sfPanelOnly";function Yi(e){if(!e[I])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Je]:!0}}function qi(e){return!!e&&typeof e=="object"&&e[Je]===!0}function Ji(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 da,SCALAR_TEXT_CONTROLS as ua}from"./text-control-kinds.js";function Zi(e,t){if(!e[I])throw new Error("inOwnBox: the field holds no authored text");const{[An]:o,...i}=e;return{...i,[Ln]:!0,render:t}}const Uo=new Set(Wn),G=(e,t)=>{const n={...t,[I]:e};if(!Uo.has(e.control))return n;const o=t.render;return{...oe(n,"authored-copy"),render:i=>r(vn,{name:i.name,children:o(i)})}},Qi="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Xo="Select a word, then press the highlighter.",$o="A short name so a link can jump straight to this section, like yoursite.com/page#about.",jo=new Set([Xo]),zo=e=>jo.has(e);function el(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 tl(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 Vo(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 nl(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 ol(e){return{type:"custom",[ge]:{label:e},render:({value:t,onChange:n})=>r(Vn,{value:he(t),onChange:n,label:e})}}function rl(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 il={Design:Ot,Animation:_e};function ll(e,t){return e.includes("Design")?t!=="Design":null}function Yo({label:e}){return r(dn,{title:l(e),level:Ye(1)})}function qo({level:e,label:t}){return e===1?r(Yo,{label:t}):r(Qo,{label:t})}function Ze(e,t){return{type:"custom",[V]:{label:e,level:t},render:()=>r(qo,{level:t,label:e})}}function y(e){return Ze(e,2)}function al(e){return{type:"custom",render:()=>r(Jo,{text:e})}}function Jo({text:e}){return r("p",{className:"sf-note",children:l(e)})}function sl(e){return Ze(e,1)}function cl(e){return Y(e)!==null&&e?.tabs!==void 0}const Qe=new Map;function dl(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 ul(e){return Y(e)!==null&&e?.designGroup!==void 0}const et=new Map;function pl(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 Zo(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function fl(e,t){return Zo(e)===t?e:{...e,marker:!0,fold:t,render:()=>r(R,{})}}function ml(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 Qo({label:e}){return r(un,{title:l(e),level:Ye(2)})}function tt({swatches:e,current:t,onPick:n,names:o}){const i=e.find(s=>s.toLowerCase()===t.toLowerCase()),a=i?o?.[i]:void 0,c=a?l(a):t;return 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 hl(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=Oo(n,t);return r(h,{label:l(e),icon:r(Nt,{}),changed:!i,action:r(S,{words:x()?.panel,label:l(e),changed:!i,detail:l("the theme's section background"),onReset:()=>o(Io)}),children:tt({swatches:Eo,current:i?To:n??t??"",onPick:o,names:Ro})})}}}function er(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=n,a=yo(i,t);return r(h,{label:l(e),icon:r(Xt,{}),changed:!a,action:r(S,{words:x()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(go)}),children:tt({swatches:So,current:a?_o:Co(i,t),onPick:o,names:xo})})}}}function gl(e=n=>n,t){return D({_gSectionTheme:y(wo),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>r(jn,{value:e(n),onChange:o,followLabel:t})}})}function M({min:e,max:t,step:n,value:o,onChange:i,suffix:a="",readout:c=!0,notch:s,ariaLabel:d,disabled:u=!1}){const f=s!==void 0&&Number.isFinite(s)&&s>=e&&s<=t;return r("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(s-e)/(t-e)}:void 0,children:r(Nn,{min:e,max:t,step:n,value:o,suffix:a||void 0,showInput:c,label:d===void 0?void 0:l(d),disabled:u,size:"sm",className:"sf-slider-track",onChange:p=>{p!==null&&p!==o&&i(p)}})})}function K(e,t,n,o,i,a,c="",s){return{type:"custom",render:d=>r(h,{label:l(e),icon: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 bl(e){const t=K("Gap",r(Ee,{}),ae.min,ae.max,ae.step,po[e],"px",(n,o)=>r(Ko,{inherited:!mo(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[fo]:e,render:n=>t.render({...n,value:ho(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}const Z="Corners";function 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(Dt,{}),changed:i,action:pe(e.mark,{changed:i,onReset:()=>n(null)}),hint:e.hint,children:r(tr,{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 tr({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(Pn,{label:l(Z),value:s,corners:ln,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 nr({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 or(){const{cornerRadiusPx:e}=X();return typeof e=="number"?e:L}function rr(){return se({sidesKey:"sectionCornerSides",useFollowed:or,useClosedReason:()=>lt()?l(it):null,mark:r(nr,{label:Z}),hint:r(ir,{})})}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 ir(){return r(R,{children:lt()?it:"Follows Site styles ▸ Basics ▸ Corners until you set a number here."})}function xl(){return D({_gShape:y("Shape"),sectionCorners:rr(),sectionCornerSides:rt(),sectionBorder:at("desktop"),sectionBorderPhone:at("mobile")})}const lr=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function ar(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function sr(){let e;try{const t=uo(X().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||co.line}function cr({value:e,onChange:t,tier:n}){const[o]=ot("sectionBorder"),i=sr(),a=e&&typeof e=="object"?e:{},c=n==="mobile"?o&&typeof o=="object"?o:{}:{},[s,d]=z(()=>bn(a,c)),u=lr();return r(h,{label:l("Border"),icon:r(At,{}),action:r(ve,{each:s,label:l("Each side"),onChange:d}),children:r(pn,{label:l("Border"),value:a,each:s,onChange:f=>t(ar(f)),placeholder:{sides:gn(c),style:c.style??"solid",color:c.color||i},presets:[i],words:u,max:so})})}function at(e){return g(e,{type:"custom",render:({value:t,onChange:n})=>r(cr,{value:t,onChange:n,tier:e})})}function Sl(){return{_gMotion:y("Motion"),sectionAnimation:ue("Entrance",r(_e,{}),[...cn],sn)}}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 an(a)?a:o}function dr({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 ur(){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 pr(){return se({sidesKey:"cardCornerSides",useFollowed:()=>st(L),mark:r(dr,{label:Z}),hint:r(ur,{})})}function fr(){return{type:"custom",render:()=>r(ht,{})}}function yl(e){return{...e,render:t=>r(gt,{render:e.render,props:t})}}function Cl(){return{_gShape:y("Shape"),cardCorners:pr(),cardCornerSides:rt(),cardCornersApplyAll:fr()}}function _l(){return w("Justify",r(kt,{}),Xe,Xe[0].value)}function Il(){return w("Item alignment",r(wt,{}),oo,"stretch")}function El(){return w(ao,r(on,{}),ze,ze[0].value)}function Rl(){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:mr(o.weights).map((i,a)=>r("i",{style:{gridColumn:`span ${i}`}},a))})})},o.value))})})}}}function mr(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 Tl(){return w(ro,r(Ee,{}),Ue,Ue[0].value)}function Ol(){return K(io,r(Yt,{}),$e,lo,1,$e)}function wl(e){const t=ue(to,Bo("`Direction` names how a container's children run — a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; editor-shell's own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),no(e),We(e,void 0));return{type:"custom",render:n=>t.render({...n,value:We(e,n.value),onChange:o=>n.onChange(o)})}}function Pl(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:!No(c),detail:l("the Text style in Site styles"),onReset:()=>s(ko),defaultAction:{onPress:()=>s(Po),title:l("Keep this section's own built-in size"),icon:r(Lt,{})}}),children:M({min:t,max:n,step:o,value:typeof c=="number"?c:i,suffix:"px",ariaLabel:e,onChange:s})})}}function kl(){return{_gCellWidth:y("Cell width"),gridSpan:w("Positions",r(Ie,{}),[{label:"Auto",value:""},...Array.from({length:yt},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function W(){let e=null;try{e=A(t=>t).selectedItem}catch{e=null}return e?.props??{}}function hr({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 gr({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 br(e){return nt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:r(gr,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>r(hr,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const xr={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Sr={Top:Pe,Bottom:Te,Left:Oe,Right:we},yr=e=>{const t=Sr[e];return r(t,{})};function Nl(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,i=_=>xr[_],a=_=>K(i("Top"),r(Pe,{}),E.min,E.max,E.step,_,"px"),c=(_,j,O,ee=E)=>g("mobile",br({label:i(_),icon:yr(_),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"],Cr={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},ct=e=>typeof e=="number"?e:null;function _r(e,t,n){const o={};for(const i of $)n[i]!==t[i]&&(o[e[i]]=n[i]??void 0);return o}function Ir({tier:e,o:t}){let n=null;try{n=fe()}catch{n=null}const o=n?.values??{},i=e==="mobile"?t.phoneKeys:t.keys,a=Object.fromEntries($.map(u=>[u,ct(o[i[u]])])),c=Object.fromEntries($.map(u=>[u,String(e==="mobile"?ct(o[t.keys[u]])??t.fallback[u]:t.fallback[u])])),[s,d]=z(()=>hn(a,c));return r(h,{label:l("Padding"),icon:r(Vt,{}),action:r(ve,{each:s,label:l("Each side"),onChange:d}),children:r(mn,{label:l("Padding"),each:s,value:a,placeholder:c,min:t.min,max:t.max,step:t.step,onChange:u=>{const f=_r(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 Al(e={}){const t={...Cr,...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(Ir,{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 Er={contained:"Contained",page:"Page",full:"Full"},Q="Width";function Ll(e,t=Ao,n=!0){const o=t.map(i=>({label:Lo[i]??Er[i],value:i}));return D({...n?{_gWidth:y(Q)}:{},widthMode:{type:"custom",render:({onChange:i,field:a})=>r(h,{label:l(Q),icon:r(nn,{}),action:n?r(Wo,{inherited:a?.inherited??!1,onReset:()=>i(Fo),label:Q}):void 0,children:de({options:o,value:a?.currentValue||e,onChange:i,ariaLabel:Q})})}})}function Fl(){const e=o=>({type:"custom",render:({value:i,onChange:a})=>r(h,{label:U,icon:k(r($t,{})),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==="%"?eo:Qn;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(Rr,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:g("mobile",t()),sectionHeightUnitPhone:g("mobile",n())})}function Rr({onClear:e}){const t=W(),n=Yn(t),o=qn(t),i=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return r(S,{words:x()?.panel,label:l(U),changed:n,detail:i,onReset:e})}function vl(){const e=n=>({type:"custom",render:({value:o,onChange:i,id:a,name:c})=>r(Tr,{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 Tr({value:e,onChange:t,labelId:n,phone:o}){const i=W(),a=Zn(i),c=o?a.phone:e===!0;return r(h,{label:l(ie),labelId:n,icon:k(r(Zt,{})),action:P(R,{children:[o?r(S,{words:x()?.panel,label:l(ie),changed:Jn(i),detail:l("{value} on desktop",{value:a.desktop?`${a.desktopDistance}px`:l("Off")}),onReset:()=>t(void 0)}):null,r(De,{checked:c,onChange:t,ariaLabelledBy:n})]})})}function Dl(){return{_gAnchor:y("Anchor"),anchor:Vo("Anchor name","e.g. about",$o)}}function Bl(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=`${a??c??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return r(h,{label:l(e),icon:t,htmlFor:s,hint:n===void 0?void 0:l(n),children:r(kn,{id:s,value:Number.isFinite(d)?new Date(d):null,onChange:u=>i(u?u.toISOString():"")})})}}}function 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 Hl(){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:rn(e),onChange:t})})}}}function Gl(e,t){return{type:"custom",render:({value:n,onChange:o,id:i})=>{const a=typeof n=="boolean"?n:t,c=`${i??e}-checkbox`;return r(h,{label:l(e),htmlFor:c,className:"sf-checkbox",action:r(wn,{id:c,checked:a,onChange:o})})}}}function Ml(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 Or=[{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=Or}){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 Kl(e,t=Be,n="mediaImage"){return{type:"custom",render:({value:o,onChange:i})=>r("div",{className:"sf-focal-row",children:r(wr,{label:e,value:o||t,onChange:i,imageProp:n})})}}function wr({label:e,value:t,onChange:n,imageProp:o}){const{selectedItem:i}=A(c=>c),a=i?.props?.[o];return r(Un,{label:e,value:t,onChange:n,image:typeof a=="string"?a:void 0})}const Pr=Ce([]);function Wl(e,{stacking:t,fallback:n=Et}){return{type:"custom",render:({value:o,onChange:i})=>{const a=It.includes(o)?o:n;return t?r(kr,{label:e,value:a,onChange:i}):ut({label:e,value:a,onChange:i,points:Pr})}}}function kr({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?_t(o?.data,a):[];return ut({label:e,value:t,onChange:n,points:Ce(c,a)})}function ut({label:e,value:t,onChange:n,points:o}){const i=o.find(a=>a.disabled);return r(h,{label:l(e),icon:r(qt,{}),hint:i?.title?l(i.title):void 0,children:dt({label:e,value:Rt(t),onChange:n,points:o})})}const Ul={top:r(Mt,{}),right:r(Gt,{}),bottom:r(Bt,{}),left:r(Ht,{})};function Xl(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 Nr="\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(xn,{value:f,ariaLabel:l(e),onChange:c,options:[...i?[{label:l(i),value:Nr,disabled:!0}]:[],...d.map(p=>({label:l(p.label),value:p.value}))]})})}}}function $l(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:i,field:a})=>r($n,{label:e,options:(a.options??t).map(c=>({...c,label:l(c.label)})),value:Array.isArray(o)?o:[],onChange:i,...n?{emptyLabel:l(n)}:{}})}}function jl(e,t,n,o){return{type:"custom",options:t,fallback:n,render:({value:i,onChange:a,field:c})=>r(zn,{label:e,options:(c.options??t).map(s=>({...s,label:l(s.label)})),fallback:c.fallback??n,value:i,onChange:a,placeholder:o===void 0?void 0:l(o)})}}function zl(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(fn,{options:e.map(a=>a.picture?{id:a.value,label:a.picture,title:l(a.title??a.label)}:{id:a.value,label:l(a.label),title:a.title===void 0?void 0:l(a.title)}),value:t,onChange:n,ariaLabel:l(o),disabled:i})}const Vl=[{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 Yl(e,t,n){return{type:"custom",[be]:!0,render:({value:o,onChange:i})=>r(Xn,{value:o||"",onChange:i,label:e,accept:t,placeholder:n})}}const ql={HeroSingle:["imageFocal"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Jl({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 Ar(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Lr(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 Zl(e,t){return e===null?null:t>e?e:null}function Fr(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(zt,{})};function ea(e,t,n,o){return{type:"custom",[I]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},render:({value:i,onChange:a})=>r(vr,{label:e,icon:k(t),items:Array.isArray(i)?i:[],placeholder:n,onChange:a,markup:o==="markup"})}}function vr({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=Fr(n,p,s);m===null&&(c.current=null),d(m),i(u(p))};return r(Sn,{label:l(e),icon:t,noun:l("item"),items:n,onChange:f,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?r(Ge,{target:c,value:Ar(n,s),onChange:p=>i(Lr(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 ta(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 na(e){return{_gCards:y("Cards"),coverIndex:w("Cover image",r(jt,{}),Mn,String(Kn),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:er("Image background",bo),cardImage:Br(),spinOnHover:N("Rotate on hover",e?.spinDefault??!0,r(Qt,{}))}}function oa(){return{outline:w("Card outline",r(en,{}),Bn,Gn),indexBadge:w("Card number",r(Re,{}),Dn,Hn),showBadge:N("Product badge",!0,r(Ne,{noun:"tag"}))}}function ra(e){const t=e?.bottomDefault??!0;return{_gShowOnCard:y("Show on a card"),showCardPrice:N("Price",!0,r(Kt,{})),showCardFinishes:N("Finish swatches",!0,r(Wt,{})),showCardSizes:N("Sizes",t,r(Jt,{})),showCardBuy:N("Buy button",t,r(Ft,{})),showCardPage:N("Page button",t,r(ke,{}))}}function ia(e,t="display"){const n=v(t);return{[t]:g("desktop",{type:"custom",render:({value:o,onChange:i})=>r(pt,{parts:e,changed:Cn(o),shown:a=>_n(o,a),onPress:(a,c)=>i(Rn(o,a,c)),onReset:()=>i(void 0)})}),[n]:g("mobile",{type:"custom",render:({value:o,onChange:i})=>r(Dr,{parts:e,desktopKey:t,value:o,onChange:i})})}}function pt({parts:e,changed:t,shown:n,onPress:o,onReset:i,detail:a}){const c=l("Display");return r(h,{label:c,icon:r(Pt,{}),changed:t,action:r(S,{words:x()?.panel,label:c,changed:t,detail:a,onReset:i}),children:r(yn,{label:c,items:e.map(s=>({id:s.id,label:l(s.label),shown:n(s.id)})),onChange:o})})}function Dr({parts:e,desktopKey:t,value:n,onChange:o}){const i=W()[t];return r(pt,{parts:e,changed:En(n),shown:a=>In(i,n,a),onPress:(a,c)=>o(Tn(n,a,c)),onReset:()=>o(Fn),detail:l("the same as Desktop")})}function Br(){return nt("Card image",{min:L,max:Se,step:bt,hint:"Rounds the picture. The card's own corner is in Site styles."})}function la(){return se({sidesKey:"cornerSides",step:xt,useFollowed:()=>L,mark:r(Hr,{label:St}),hint:l("Rounds the picture. Left alone it stays square.")})}function Hr({label:e,changed:t=!1,onReset:n=()=>{}}){return r(S,{words:x()?.panel,label:l(e),changed:t,onReset:n})}function aa(){return{type:"custom",render:({value:e,onChange:t})=>r(Gr,{value:typeof e=="string"?e:"",onChange:t})}}function Gr({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(vt,{}),children:P("div",{className:"sf-gallery-filter",children:[r("button",{type:"button","aria-pressed":n===null,onClick:()=>o(null),children:l("All")}),Ct.map(c=>r("button",{type:"button","aria-pressed":n===c,onClick:()=>o(c),children:c},c))]})}),r(h,{label:l("Layout"),icon:r(Ut,{}),value:a?l(a.label):l("Not chosen"),hint:l("{n} of {total} layouts",{n:i.length,total:ye.length}),children:r("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{$o as ANCHOR_HINT,Qi as BOUND_TO_POST_NOTE,il as BUCKET_ICONS,ql as CUSTOM_FIELD_MEDIA,Jl as CoordsField,Ul as EDGE_ARROWS,Be as FOCAL_DEFAULT,Or as FOCAL_POINTS,V as FOLD_FIELD_MARKER,dt as FocalPicker,Qo as GroupLabel,Xo as HIGHLIGHT_HINT,H as HidableTextField,ge as LINK_FIELD_MARKER,$i as Label,be as MEDIA_FIELD_MARKER,Vl as MEDIA_TYPE_OPTIONS,Jo as PanelNoteLine,ut as PlacementGridView,xe as SCAFFOLD_FIELD_MARKER,ua as SCALAR_TEXT_CONTROLS,it as SECTION_BLEEDS_HINT,Cr as SIDE_PAD_KEYS,Yo as SectionHeading,de as Segmented,Ko as SiteGapDefaultReset,M as Slider,tt as Swatches,da as TEXT_CONTROL_KINDS,I as TEXT_FIELD_MARKER,Ql as TICKER_ITEMS_ROW,vr as TextListField,Wo as WidthDefaultReset,Fr as aimAfterListChange,Dl as anchorFields,B as backTo,hl as backgroundField,Il as boxAlignField,Tl as boxBlockSpacingField,_l as boxJustifyField,Ol as boxPhoneRowField,Rl as boxShareField,El as boxWrapField,dl as bucketHeader,pr as cardCornersField,er as cardImageBackgroundField,Br as cardImageField,na as cardMediaFields,Cl as cardShapeFields,ra as cardShowFields,oa as cardStyleFields,kl as cellWidthFields,Gl as checkbox,Ml as colorInput,nl as copyText,rt as cornerSidesField,se as cornersRowField,Bl as dateTime,pl as designGroupHeader,wl as directionField,ia as displayFields,Xl as edgePad,ll as entriesHiddenForTab,Kl as focalPicker,Zl as focusAfterRemove,fl as foldMarker,Y as foldMetaOf,Zo as foldTitleOf,aa as galleryLayoutField,bl as gapField,y as group,Fl as heightFields,he as hidableText,zo as hintIsWhileTyping,k as iconOf,la as imageCornersField,Zi as inOwnBox,cl as isBucketHeader,ul as isDesignGroupHeader,Ho as isNoGlyph,ol as linkField,$l as multiSelect,Bo as noGlyph,Hl as pageBackgroundField,al as panelNote,br as phoneOverrideField,Wl as placementField,Vo as plainText,rl as plainTextarea,nt as pxField,ml as quietMarker,me as readHidable,Ar as rowText,jl as searchSelect,sl as section,Sl as sectionAnimationFields,at as sectionBorderField,rr as sectionCornersField,xl as sectionShapeFields,gl as sectionThemeFields,ue as segmented,w as select,Lr as setRowText,Al as sidesPaddingFields,_r as sidesPaddingPatch,Pl as sizeField,K as slider,zl as sourceField,Nl as spacingFields,vl as stickFields,yl as templateField,el as text,mt as textFieldIdentifier,Vi as textFieldOffPage,qi as textFieldPanelOnly,ea as textList,ta as textListRowField,tl as textarea,N as toggle,Yl as upload,Go as usePageWidthDetail,Mo as useSiteGapDetail,Ll as widthField,Ji as withIdentifier,zi as withOffPage,Yi as withPanelOnly,ji as withScaffold};
@@ -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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-web-builder",
3
- "version": "19.0.0",
3
+ "version": "19.1.0",
4
4
  "description": "The EFFICIENT website builder: the website editor, the general sections and the renderer that draws them, compiled. Hostable by any EFFICIENT product; nothing here imports a host.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Efficient Pty Ltd",