efficient-web-builder 13.1.0 → 13.2.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,23 @@
1
1
  # Changelog
2
2
 
3
+ ## 13.2.0 - 2026-10-15
4
+
5
+ **Every row in the Phone view wears its icon** (Lewis 2026-10-15, via GG: "why is the Button panel so messy?"; card [MERGE] Settings Tabs Into Design And Animation, row icon census). A minor: one optional and one required option on two field builders, and a new guard.
6
+
7
+ ### Changed for merchants
8
+
9
+ - **`Padding top` and `Padding bottom` in the Phone view now show the same icon as on Desktop**, on every section that has a phone padding (35 panels, 70 rows); the Box card's `Padding left` and `Padding right` too. Before, the Phone view drew these rows bare, so it looked like a different panel.
10
+
11
+ ### Changed for hosts
12
+
13
+ - **`phoneOverrideField` takes a required `icon`**: the desktop twin's glyph. A phone override row can no longer ship without one.
14
+ - **`pxField` takes an optional `icon`**, drawn through `iconOf`, so `noGlyph(reason)` still means "none, by ruling".
15
+ - A phone padding row takes its glyph from one side-to-icon table; `test-row-icons` §2 holds it equal to its desktop twin's.
16
+
17
+ ### Guards
18
+
19
+ - New `test-row-icons`: every row of every general-registry panel is drawn with easel's `InspectorField`, desktop and phone rows, and each title is read with the icon beside it. §1 a ratchet: per panel, the titles with no icon (minus a short exempt list, each entry with its reason) equal `scripts/fixtures/row-icons.baseline.json`; above the line fails, below the line fails until it is lowered. §2 a phone row wears its desktop twin's icon. §3 the exempt list is not stale. Baseline 119 on 13.0.0, 45 now (the rest: 31 list heads and 14 other rows, for later changes).
20
+
3
21
  ## 13.1.0 - 2026-10-15
4
22
 
5
23
  **A guard over every settings panel: rows in groups, groups in the one order** (Lewis 2026-10-14, looking at the Button panel: "are our other panels this scattered too, with no logic?"; step 0 of the layered rebuild, card [MERGE] Settings Tabs Into Design And Animation). A minor: a new guard and one row's new name. Nothing is cut and no stored key moves.
@@ -137,6 +137,7 @@ export declare function pxField(label: string, opts: {
137
137
  max: number;
138
138
  step?: number;
139
139
  unsetLabel?: string;
140
+ icon?: ReactElement;
140
141
  hint?: ReactNode;
141
142
  unsetMark?: ReactElement<MarkProps>;
142
143
  restTrack?: (p: {
@@ -177,6 +178,7 @@ export declare function cellWidthFields(): Record<string, unknown>;
177
178
  export declare function phoneOverrideField(opts: {
178
179
  label: string;
179
180
  desktopKey: string;
181
+ icon: ReactElement;
180
182
  min: number;
181
183
  max: number;
182
184
  step: number;
@@ -1 +1 @@
1
- "use client";import{jsx as r,jsxs as v,Fragment as T}from"react/jsx-runtime";import{cloneElement as ae,useId as Je,useRef as Z,useState as se}from"react";import{useEasel as F,useSelectedFields as Ze}from"efficient-easel/easel";import{say as l,editorEaselWords as b}from"../editor-words.js";import{readHidable as ce,hidableText as ue}from"./hidable.js";import{FOLD_FIELD_MARKER as U,LINK_FIELD_MARKER as de,MEDIA_FIELD_MARKER as pe,SCAFFOLD_FIELD_MARKER as fe,TEXT_FIELD_MARKER as R,foldMetaOf as X,textFieldIdentifier as Qe}from"./field-markers.js";import et from"../../components/ApplyCornersToSiblings.js";import{CARD_IMAGE_RADIUS_STEP as tt,CORNER_RADIUS_MAX as me,CORNER_RADIUS_MIN as L}from"../content/card-image-shape.js";import{IMAGE_CORNER_STEP as nt,IMAGE_CORNERS_LABEL as ot}from"../content/image-corners.js";import{GRID_MAX_COLUMNS as rt}from"../content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as it,GALLERY_LAYOUTS as w,GALLERY_LAYOUT_KEYS as he}from"../content/gallery-layout.js";import{anchorSiblingsOf as lt,HERO_GROUP_PLACEMENTS as at,HERO_GROUP_PLACEMENT_DEFAULT as st,normalisePlacement as ct,placementPoints as ge}from"../hero-group-placement.js";import ut from"../../components/KeepHint.js";import{AdjustIcon as dt,AlignLeftIcon as pt,AlignSeparateIcon as ft,AnimationIcon as be,BackgroundIcon as mt,BlockSectionIcon as ht,CartIcon as gt,ColumnWidthsIcon as xe,ColumnsIcon as bt,CornerIcon as xt,DirectionDownIcon as St,DirectionLeftIcon as Ct,DirectionRightIcon as It,DirectionUpIcon as _t,DollarIcon as yt,FinishIcon as Et,GapIcon as Se,GridIcon as Tt,GroundIcon as Rt,HashIcon as Ce,HeightIcon as Nt,ImageIcon as Ot,ListIcon as At,LocationIcon as Q,PaddingBottomIcon as vt,PaddingLeftIcon as Ft,PaddingRightIcon as Lt,PaddingTopIcon as wt,PageIcon as Ie,PhoneIcon as Pt,PlacementIcon as kt,ProductSizeIcon as Dt,RotateIcon as Ht,SquareIcon as Bt,TypeIcon as Gt,WidthIcon as Mt,WrapIcon as Wt}from"efficient-easel/icons";import{FieldGlyph as _e}from"../../components/FieldGlyph.js";import{resolvePageBackground as Kt}from"../content/page-background.js";import{CORNER_SIDES as ye,CORNER_SIDE_POINTS as Ut,hasOwnSectionCorners as Xt,normalizeCornerSides as Ee}from"../content/section-corners.js";import{SECTION_MOTION_NONE as $t,SECTION_MOTION_OPTIONS as zt}from"../content/section-animation.js";import{enclosingSectionProps as Te}from"./enclosing-section.js";import{SettingsDefaultReset as x,SettingsField as h,SettingsGroupHead as Vt,SettingsGroupSub as jt,SettingsSegmented as Yt,SettingsSwitch as qt}from"efficient-easel/panel";import{FieldSelect as Jt,ListField as Zt}from"efficient-easel/fields";import{AlignmentGrid as Qt,Checkbox as en,CornersInput as tn,DateTimePicker as nn,FOCAL_DEFAULT as Re,Slider as on,Tooltip as $}from"efficient-shell/ui";import{ColourControl as Ne}from"./ColourControl.js";import Oe from"./MarkupToolbar.js";import{deviceField as N}from"./device-fields.js";import{NoControlMark as rn,noControlField as Ae}from"./panel-no-control-mark.js";import{phoneKey as z,resolvePhoneValue as ee}from"./phone-override.js";import{SuppressibleText as ln}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as an,CARD_OUTLINE_OPTIONS as sn,DEFAULT_CARD_INDEX_FORMAT as cn,DEFAULT_CARD_OUTLINE as un}from"../sections/product-card-style.js";import{COVER_INDEX_OPTIONS as dn,DEFAULT_COVER_INDEX as pn}from"../sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as fn}from"./text-control-kinds.js";import mn from"../../components/ImageFocusRow.js";import hn from"../../components/MediaUploadField.js";import gn from"../../components/MultiSelectField.js";import bn from"../../components/SectionThemePicker.js";import xn from"../../components/SearchSelectField.js";import Sn from"../../components/StorefrontLinkField.js";import ve from"../../components/UiIcon.js";import{SECTION_PADDING as _}from"../content/section-padding.js";import{hasPhoneHeight as Cn,resolveSectionMinHeight as In}from"../content/section-min-height.js";import{SECTION_MIN_HEIGHT as _n,SECTION_MIN_HEIGHT_GROUP_LABEL as B,SECTION_SCREEN_PCT as yn}from"../content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as En,containerDirectionPoints as Tn,resolveContainerDirection as Fe}from"../content/container-direction.js";import{BOX_ALIGN_POINTS as Rn,BOX_BLOCK_SPACING_LABEL as Nn,BOX_BLOCK_SPACING_POINTS as Le,BOX_JUSTIFY_POINTS as we,BOX_PHONE_ROW_LABEL as On,BOX_PHONE_ROW_MAX as An,BOX_PHONE_ROW_MIN as Pe,BOX_SHARE_LABEL as ke,BOX_SHARE_POINTS as te,BOX_WRAP_LABEL as vn,BOX_WRAP_POINTS as De}from"../content/box-layout.js";import{usePreviewHeader as V}from"../../components/PreviewHeaderContext.js";import{CONTAINER_GAP as ne,CONTAINER_GAP_BUILT_IN as Fn,GAP_FIELD_CONTAINER as Ln,hasOwnContainerGap as wn,resolveContainerGap as Pn}from"../content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as kn,CARD_IMAGE_BG_OFF as Dn,CARD_IMAGE_BG_SWATCH_NAMES as Hn,CARD_IMAGE_BG_SWATCHES as Bn,isCardImageBackgroundInheriting as Gn,cardImageBackgroundChoice as Mn,THEME_CARD_IMAGE_BG as Wn}from"../content/card-image-background.js";import{SECTION_BG_INHERIT as Kn,SECTION_BG_SWATCHES as Un,SECTION_BG_SWATCH_NAMES as Xn,THEME_SECTION_BG as $n,isSectionBackgroundInheriting as zn}from"../content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Vn}from"../content/section-surface.js";import{TYPE_SIZE_FIXED as jn,TYPE_SIZE_INHERIT as Yn,isTypeSizeInheriting as qn}from"../content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Jn,WIDTH_CHOICE_LABEL as Zn,WIDTH_INHERIT as Qn,resolveWidth as eo,sectionRunsFullWidth as He}from"../content/section-width.js";import{useFoldHeadingLevel as Be}from"./panel-heading-scope.js";import{withStyleKind as to}from"efficient-easel/style-clipboard";function G(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!X(n)&&to(n,`section:${t}`);return e}function jr({children:e}){return r("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function Ge(){return null}function no(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return r(Ge,{},e)}function oo(e){return e.type===Ge}function M(e){return oo(e)?void 0:e}function P(e,t){return l("{value} from {from}",{value:e,from:t})}function ro(){const{appState:e}=F(i=>i),t=e.data.root?.props??{},{mode:n,pageWidth:o}=eo(t,"full");return n==="page"?P(`${o}px`,l("the page")):n==="contained"?P(l("Contained"),l("the page")):P(l("Full"),l("the page"))}function io(){const{blockGap:e}=V();return e===null?l("this container's own spacing"):P(`${e}px`,l("Site styles"))}function lo({inherited:e,onReset:t,label:n}){return r(x,{words:b()?.panel,label:l(n),changed:!e,detail:io(),onReset:t})}function ao({inherited:e,onReset:t,label:n}){return r(x,{words:b()?.panel,label:l(n),changed:!e,detail:ro(),onReset:t})}function k({value:e,onChange:t,label:n,placeholder:o,hint:i,multiline:a,hideable:c=!0,markup:s=!0}){const{text:u,hidden:p}=ce(e),f=Z(null),d=Z(null),m=E=>t(c?{text:E,hidden:p}:E),C=()=>t({text:u,hidden:!p}),g=c&&p,y=Je(),I=i?fo(i)?r("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(i)}):r(ut,{children:l(i)}):void 0,K=p?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(Gt,{}),htmlFor:y,className:g?"is-hidden":void 0,hint:I,action:c?r($,{content:K,children:r("button",{type:"button",className:"sf-field-eye","aria-pressed":p,"aria-label":K,onClick:C,children:p?r(ve,{name:"eye-off",size:14}):r(ve,{name:"eye",size:14})})}):void 0,children:v("div",{className:"sf-copybox",children:[s&&r(Oe,{target:a?d:f,value:u,onChange:m}),a?r("textarea",{id:y,ref:d,value:u,placeholder:o===void 0?void 0:l(o),onChange:E=>m(E.target.value)}):r("input",{id:y,ref:f,type:"text",value:u,placeholder:o===void 0?void 0:l(o),onChange:E=>m(E.target.value)})]})})}function Yr(e,t){return{...e,[fe]:t}}function qr(e){const t=e[R];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[R]:{...t,offPage:!0}}}function Jr(e){return!e||typeof e!="object"?!1:e[R]?.offPage===!0}function Zr(e){const t=e[R];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[R]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as ll,SCALAR_TEXT_CONTROLS as al}from"./text-control-kinds.js";const so=new Set(fn),D=(e,t)=>{const n={...t,[R]:e};if(!so.has(e.control))return n;const o=t.render;return{...Ae(n,"authored-copy"),render:i=>r(ln,{name:i.name,children:o(i)})}},Qr="Everything else on this block comes from the linked post. Unlink it to edit by hand.",co="Select a word, then press the highlighter.",uo="A short name so a link can jump straight to this section, like yoursite.com/page#about.",po=new Set([co]),fo=e=>po.has(e);function ei(e,t,n){return D({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(k,{value:o,onChange:i,label:e,placeholder:t,hint:n})})}function ti(e,t,n){return D({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(k,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0})})}function mo(e,t,n){return D({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(k,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function ni(e,t,n){return D({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(k,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1})})}function oi(e){return{type:"custom",[de]:{label:e},render:({value:t,onChange:n})=>r(Sn,{value:ue(t),onChange:n,label:e})}}function ri(e,t,n){return D({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(k,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const ii={Design:dt,Animation:be};function li(e,t){return e.includes("Design")?t!=="Design":null}function ho({label:e}){return r(Vt,{title:l(e),level:Be(1)})}function go({level:e,label:t}){return e===1?r(ho,{label:t}):r(So,{label:t})}function Me(e,t){return{type:"custom",[U]:{label:e,level:t},render:()=>r(go,{level:t,label:e})}}function S(e){return Me(e,2)}function ai(e){return{type:"custom",render:()=>r(bo,{text:e})}}function bo({text:e}){return r("p",{className:"sf-note",children:l(e)})}function si(e){return Me(e,1)}function ci(e){return X(e)!==null&&e?.tabs!==void 0}const We=new Map;function ui(e,t){const n=`${e}\0${t?t.join(""):""}`,o=We.get(n)??{type:"custom",tabs:t,[U]:{label:e,level:1},bucket:e,marker:!0,render:()=>r(T,{})};return We.set(n,o),o}function di(e){return X(e)!==null&&e?.designGroup!==void 0}const Ke=new Map;function pi(e){const t=Ke.get(e)??{type:"custom",[U]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>r(T,{})};return Ke.set(e,t),t}function xo(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function fi(e,t){return xo(e)===t?e:{...e,marker:!0,fold:t,render:()=>r(T,{})}}function mi(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>r(T,{})}}function So({label:e}){return r(jt,{title:l(e),level:Be(2)})}function Ue({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 v("div",{className:"sf-swatches",children:[e.map(s=>{const u=o?.[s]?l(o[s]):s;return r($,{content:u,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":u})},s)}),r("span",{className:"sf-swatch-hex",children:c})]})}function hi(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=zn(n,t);return r(h,{label:l(e),icon:r(mt,{}),changed:!i,action:r(x,{words:b()?.panel,label:l(e),changed:!i,detail:l("the theme's section background"),onReset:()=>o(Kn)}),children:Ue({swatches:Un,current:i?$n:n??t??"",onPick:o,names:Xn})})}}}function Co(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=n,a=Gn(i,t);return r(h,{label:l(e),icon:r(Rt,{}),changed:!a,action:r(x,{words:b()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(kn)}),children:Ue({swatches:Bn,current:a?Wn:Mn(i,t),onPick:o,names:Hn})})}}}function gi(e=n=>n,t){return G({_gSectionTheme:S(Vn),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>r(bn,{value:e(n),onChange:o,followLabel:t})}})}function W({min:e,max:t,step:n,value:o,onChange:i,suffix:a="",readout:c=!0,notch:s,ariaLabel:u,disabled:p=!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(on,{min:e,max:t,step:n,value:o,suffix:a||void 0,showInput:c,label:u===void 0?void 0:l(u),disabled:p,size:"sm",className:"sf-slider-track",onChange:d=>{d!==null&&d!==o&&i(d)}})})}function H(e,t,n,o,i,a,c="",s){return{type:"custom",render:u=>r(h,{label:l(e),icon:M(t),action:s?s("storedValue"in u?u.storedValue:u.value,u.onChange):void 0,children:W({min:n,max:o,step:i,value:typeof u.value=="number"?u.value:a,suffix:c,ariaLabel:e,onChange:u.onChange})})}}function Xe(e,t){const{min:n,max:o,step:i=1,unsetLabel:a,hint:c,restTrack:s,unsetMark:u}=t;return{type:"custom",render:({value:p,onChange:f})=>{const d=typeof p=="number"?p:null,m=d===null;return r(h,{label:l(e),value:m?u||a===void 0?void 0:l(a):`${d}px`,changed:!m,action:u?ae(u,{changed:!m,onReset:()=>f(null)}):r(x,{words:b()?.panel,label:l(e),changed:!m,onReset:()=>f(null)}),hint:typeof c=="string"?l(c):c,children:s?s({min:n,max:o,step:i,px:d,label:e,onChange:f}):W({min:n,max:o,step:i,value:d??n,readout:!1,ariaLabel:e,onChange:f})})}}}function bi(e){const t=H("Gap",r(Se,{}),ne.min,ne.max,ne.step,Fn[e],"px",(n,o)=>r(lo,{inherited:!wn(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[Ln]:e,render:n=>t.render({...n,value:Pn(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}const j="Corners";function oe(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,i=o!==null;return r(h,{label:l(j),icon:r(xt,{}),changed:i,action:ae(e.mark,{changed:i,onReset:()=>n(null)}),hint:e.hint,children:r(_o,{tier:e,px:o,onRadius:n})})}}}function Io(e){let t=null;try{t=Ze()}catch{t=null}return[t?.values?.[e],n=>t?.onChange(e,n)]}function _o({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),i=e.useClosedReason?e.useClosedReason():null,[a,c]=Io(e.sidesKey),s=Ee(a)??[...ye];return r(tn,{className:"sf-corners",label:l(j),value:s,corners:Ut,onChange:u=>{const p=Ee(u)??[];c(p.length===ye.length?null:p)},radius:t,onRadiusChange:n,radiusMin:L,radiusMax:me,radiusStep:e.step??1,radiusPlaceholder:String(o),disabled:i!==null,disabledReason:i??void 0})}function $e(){return Ae({type:"custom",render:()=>r(rn,{})},"always")}function yo({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=V(),i=typeof o=="number"?`${o}px`:l("not set");return r(x,{words:b()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):P(i,l("Site styles")),onReset:n})}function Eo(){const{cornerRadiusPx:e}=V();return typeof e=="number"?e:L}function To(){return oe({sidesKey:"sectionCornerSides",useFollowed:Eo,useClosedReason:()=>Ve()?l(ze):null,mark:r(yo,{label:j}),hint:r(Ro,{})})}const ze="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function Ve(){return He(Y())}function Ro(){return r(T,{children:Ve()?ze:"Follows Site styles ▸ Basics ▸ Corners until you set a number here."})}function xi(){return G({_gShape:S("Shape"),sectionCorners:To(),sectionCornerSides:$e()})}function Si(){return{_gMotion:S("Motion"),sectionAnimation:le("Entrance",r(be,{}),[...zt],$t)}}function re(){let e=null;try{const{appState:t,selectedItem:n}=F(i=>i),o=n?.props?.id?String(n.props.id):void 0;e=o?Te(t?.data,o):null}catch{e=null}return e!==null&&He(e)}function je(e){const{cornerRadiusPx:t}=V(),n=re(),o=typeof t=="number"?t:e;let i=null;try{const{appState:c,selectedItem:s}=F(p=>p),u=s?.props?.id?String(s.props.id):void 0;i=u?Te(c?.data,u):null}catch{i=null}if(n||!i)return o;const a=i.sectionCorners;return Xt(a)?a:o}function No({label:e,changed:t=!1,onReset:n=()=>{}}){const o=re(),i=je(L),a=o?"Site":"Section";return r(x,{words:b()?.panel,label:l(e),changed:t,detail:P(`${i}px`,o?l("Site styles"):l("the section")),onReset:n})}function Oo(){return r(T,{children:re()?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 Ao(){return oe({sidesKey:"cardCornerSides",useFollowed:()=>je(L),mark:r(No,{label:j}),hint:r(Oo,{})})}function vo(){return{type:"custom",render:()=>r(et,{})}}function Ci(){return{_gShape:S("Shape"),cardCorners:Ao(),cardCornerSides:$e(),cardCornersApplyAll:vo()}}function Ii(){return O("Justify",r(ft,{}),we,we[0].value)}function _i(){return O("Item alignment",r(pt,{}),Rn,"stretch")}function yi(){return O(vn,r(Wt,{}),De,De[0].value)}function Ei(){return{type:"custom",render:({value:e,onChange:t})=>{const n=te.find(o=>o.value===e)??te[0];return r(h,{label:l(ke),icon:r(xe,{}),value:l(n.label),children:r("div",{className:"sf-gallery-layouts",role:"group","aria-label":l(ke),children:te.map(o=>r($,{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:Fo(o.weights).map((i,a)=>r("i",{style:{gridColumn:`span ${i}`}},a))})})},o.value))})})}}}function Fo(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 Ti(){return O(Nn,r(Se,{}),Le,Le[0].value)}function Ri(){return H(On,r(Pt,{}),Pe,An,1,Pe)}function Ni(e){const t=le(En,no("`Direction` names how a container's children run — a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; editor-shell's own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),Tn(e),Fe(e,void 0));return{type:"custom",render:n=>t.render({...n,value:Fe(e,n.value),onChange:o=>n.onChange(o)})}}function Oi(e,t,n,o,i,a){return{type:"custom",render:({value:c,onChange:s})=>r(h,{label:l(e),icon:r(_e,{noun:a}),action:r(x,{words:b()?.panel,label:l(e),changed:!qn(c),detail:l("the Text style in Site styles"),onReset:()=>s(Yn),defaultAction:{onPress:()=>s(jn),title:l("Keep this section's own built-in size"),icon:r(ht,{})}}),children:W({min:t,max:n,step:o,value:typeof c=="number"?c:i,suffix:"px",ariaLabel:e,onChange:s})})}}function Ai(){return{_gCellWidth:S("Cell width"),gridSpan:O("Positions",r(xe,{}),[{label:"Auto",value:""},...Array.from({length:rt},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function Y(){let e=null;try{e=F(t=>t).selectedItem}catch{e=null}return e?.props??{}}function Lo({min:e,max:t,step:n,px:o,label:i,onChange:a,desktopKey:c,fallback:s}){const u=Y()[c],p=ee(void 0,u,s);return r(T,{children:W({min:e,max:t,step:n,value:ee(o,u,s),readout:!1,ariaLabel:i,notch:p,onChange:a})})}function wo({label:e,desktopKey:t,fallback:n,changed:o=!1,onReset:i=()=>{}}){const a=Y()[t],c=ee(void 0,a,n);return r(x,{words:b()?.panel,label:l(e),changed:o,detail:l("{value} on desktop",{value:`${c}px`}),onReset:i})}function Po(e){return Xe(e.label,{min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:r(wo,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>r(Lo,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const ko={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"};function vi(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,i=I=>ko[I],a=I=>H(i("Top"),r(wt,{}),_.min,_.max,_.step,I,"px"),c=(I,K,E,J=_)=>N("mobile",Po({label:i(I),desktopKey:K,min:J.min,max:J.max,step:J.step,fallback:E})),s=e.top??_.min,u=e.bottom??_.min,p="sectionPaddingLeft",f="sectionPaddingRight",d=e.sideBounds??_,m=e.side??d.min,C=e.sidePhone??m,g=e.phone===!0,y=I=>g?N("desktop",I):I;return G({...o?{_gSpacing:S("Padding")}:{},[t]:y(a(s)),...g?{[z(t)]:c("Top",t,s)}:{},...e.only==="top"?{}:{[n]:y(H(i("Bottom"),r(vt,{}),_.min,_.max,_.step,u,"px")),...g?{[z(n)]:c("Bottom",n,u)}:{}},...e.sides?{[p]:y(H(i("Left"),r(Ft,{}),d.min,d.max,d.step,m,"px")),...g?{[z(p)]:c("Left",p,C,d)}:{},[f]:y(H(i("Right"),r(Lt,{}),d.min,d.max,d.step,m,"px")),...g?{[z(f)]:c("Right",f,C,d)}:{}}:{}})}const Do={contained:"Contained",page:"Page",full:"Full"},q="Width";function Fi(e,t=Jn,n=!0){const o=t.map(i=>({label:Zn[i]??Do[i],value:i}));return G({...n?{_gWidth:S(q)}:{},widthMode:{type:"custom",render:({onChange:i,field:a})=>r(h,{label:l(q),icon:r(Mt,{}),action:n?r(ao,{inherited:a?.inherited??!1,onReset:()=>i(Qn),label:q}):void 0,children:ie({options:o,value:a?.currentValue||e,onChange:i,ariaLabel:q})})}})}function Li(){const e=o=>({type:"custom",render:({value:i,onChange:a})=>r(h,{label:B,icon:M(r(Nt,{})),action:o?o(a):void 0,children:ie({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(i)?i:"auto",onChange:a,ariaLabel:B})})}),t=()=>({type:"custom",render:({value:o,onChange:i,field:a})=>{const c=a?.unit==="%"?"%":"px",s=c==="%"?yn:_n;return r("div",{className:"sf-field",children:W({min:s.min,max:s.max,step:s.step,value:typeof o=="number"?o:s.fallback,suffix:c,ariaLabel:B,onChange:i})})}}),n=()=>le("Unit",r(Ce,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return G({_gHeight:S(B),sectionHeightMode:N("desktop",e()),sectionHeightValue:N("desktop",t()),sectionHeightUnit:N("desktop",n()),sectionHeightModePhone:N("mobile",e(o=>r(Ho,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:N("mobile",t()),sectionHeightUnitPhone:N("mobile",n())})}function Ho({onClear:e}){const t=Y(),n=Cn(t),o=In(t),i=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return r(x,{words:b()?.panel,label:l(B),changed:n,detail:i,onReset:e})}function wi(){return{_gAnchor:S("Anchor"),anchor:mo("Anchor name","e.g. about",uo)}}function Pi(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=`${a??c??e}-datetime`,u=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(nn,{id:s,value:Number.isFinite(u)?new Date(u):null,onChange:p=>i(p?p.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,u=`${a??c??e}-label`;return r(h,{label:l(e),labelId:u,icon:n,action:r(qt,{checked:s,onChange:i,ariaLabelledBy:u})})}}}function ki(){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(Ie,{}),htmlFor:i,action:r(Ne,{id:i,label:"Background",value:Kt(e),onChange:t})})}}}function Di(e,t){return{type:"custom",render:({value:n,onChange:o,id:i})=>{const a=typeof n=="boolean"?n:t,c=`${i??e}-checkbox`;return r(h,{label:l(e),htmlFor:c,className:"sf-checkbox",action:r(en,{id:c,checked:a,onChange:o})})}}}function Hi(e,t){return{type:"custom",render:({value:n,onChange:o})=>r(h,{label:l(e),action:Ne({value:n||t,onChange:o,label:e})})}}const Bo=[{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 Ye({label:e,value:t,onChange:n,points:o=Bo}){const i=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return r(Qt,{label:l(e),value:t,points:i,onChange:n})}function Bi(e,t=Re,n="mediaImage"){return{type:"custom",render:({value:o,onChange:i})=>r("div",{className:"sf-focal-row",children:r(Go,{label:e,value:o||t,onChange:i,imageProp:n})})}}function Go({label:e,value:t,onChange:n,imageProp:o}){const{selectedItem:i}=F(c=>c),a=i?.props?.[o];return r(mn,{label:e,value:t,onChange:n,image:typeof a=="string"?a:void 0})}const Mo=ge([]);function Gi(e,{stacking:t,fallback:n=st}){return{type:"custom",render:({value:o,onChange:i})=>{const a=at.includes(o)?o:n;return t?r(Wo,{label:e,value:a,onChange:i}):qe({label:e,value:a,onChange:i,points:Mo})}}}function Wo({label:e,value:t,onChange:n}){const{appState:o,selectedItem:i}=F(s=>s),a=i?.props?.id?String(i.props.id):void 0,c=a?lt(o?.data,a):[];return qe({label:e,value:t,onChange:n,points:ge(c,a)})}function qe({label:e,value:t,onChange:n,points:o}){const i=o.find(a=>a.disabled);return r(h,{label:l(e),icon:r(kt,{}),hint:i?.title?l(i.title):void 0,children:Ye({label:e,value:ct(t),onChange:n,points:o})})}const Mi={top:r(_t,{}),right:r(It,{}),bottom:r(St,{}),left:r(Ct,{})};function Wi(e,t,n,o,i,a){const c=f=>t.find(d=>d.value===f),s=f=>({value:f,label:"",disabled:!0,title:o}),u=f=>{const d=t.find(C=>C.cell===f);if(!d)return s(`missing-${f}`);const m=a?.[f];return m?{value:d.value,label:d.label,icon:m}:{value:d.value,label:d.label}},p=[s("corner-top-left"),u("top"),s("corner-top-right"),u("left"),s("centre"),u("right"),s("corner-bottom-left"),u("bottom"),s("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:d})=>{const m=t.some(C=>C.value===f)?f:n;return r(h,{label:l(e),icon:i,value:c(m)?.label?l(c(m).label):"",children:Ye({label:e,value:m,onChange:d,points:p})})}}}const Ko="\0note";function O(e,t,n,o,i){return{type:"custom",options:n,fallback:o,...i?{note:i}:{},render:({value:a,onChange:c,field:s})=>{const u=s.options??n,p=s.fallback??o,f=u.some(d=>d.value===a)?a:p;return r(h,{label:l(e),icon:M(t),children:r(Jt,{value:f,ariaLabel:l(e),onChange:c,options:[...i?[{label:l(i),value:Ko,disabled:!0}]:[],...u.map(d=>({label:l(d.label),value:d.value}))]})})}}}function Ki(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:i,field:a})=>r(gn,{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 Ui(e,t,n,o){return{type:"custom",options:t,fallback:n,render:({value:i,onChange:a,field:c})=>r(xn,{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 Xi(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const i={value:n,onChange:o,...t};return r(e,{...i})}}}function ie({options:e,value:t,onChange:n,ariaLabel:o,disabled:i=!1}){return r(Yt,{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 $i=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function le(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:M(t),children:ie({options:i,value:i.some(u=>u.value===a)?a:a||s?.currentValue||o,onChange:c,ariaLabel:e})})}}function zi(e,t,n){return{type:"custom",[pe]:!0,render:({value:o,onChange:i})=>r(hn,{value:o||"",onChange:i,label:e,accept:t,placeholder:n})}}const Vi={HeroSingle:["imageFocal"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function ji({value:e,onChange:t,label:n}){const o=e||{},i=!!o.pending,a=i?"var(--fg-dim, #888)":o.ok?"#1d9e75":"#d85a30",c=(s,u)=>t({...o,[s]:u===""?void 0:Number(u)});return v(h,{label:l(n),icon:r(Q,{}),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&&v("div",{style:{marginTop:8,display:"grid",gap:8},children:[r(h,{label:l("Latitude"),icon:r(Q,{}),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(Q,{}),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 Uo(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Xo(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 Yi(e,t){return e===null?null:t>e?e:null}function $o(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 qi={label:"Ticker items",icon:r(At,{})};function Ji(e,t,n,o){return{type:"custom",[R]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},render:({value:i,onChange:a})=>r(zo,{label:e,icon:M(t),items:Array.isArray(i)?i:[],placeholder:n,onChange:a,markup:o==="markup"})}}function zo({label:e,icon:t,items:n,placeholder:o,onChange:i,markup:a=!1}){const c=Z(null),[s,u]=se(null),p=d=>d.map(m=>({text:m?.text??""})),f=d=>{const m=$o(n,d,s);m===null&&(c.current=null),u(m),i(p(d))};return r(Zt,{label:l(e),icon:t,noun:l("item"),items:n,onChange:f,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?r(Oe,{target:c,value:Uo(n,s),onChange:d=>i(Xo(n,s??-1,d)),disabled:s===null,label:s===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:s+1})}):void 0,renderRow:(d,m,C)=>r("input",{type:"text",className:a&&s===m?"sf-list-marking":void 0,value:d?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:m+1}),onChange:g=>C({text:g.target.value}),onFocus:g=>{c.current=g.currentTarget,u(m)}})})}function Zi(e,t){const n=`${e.label} — row ${t+1}`;return D({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:i})=>r(k,{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 Qi(e){return{_gCards:S("Cards"),coverIndex:O("Cover image",r(Ot,{}),dn,String(pn),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:Co("Image background",Dn),cardImage:Vo(),spinOnHover:A("Rotate on hover",e?.spinDefault??!0,r(Ht,{}))}}function el(){return{outline:O("Card outline",r(Bt,{}),sn,un),indexBadge:O("Card number",r(Ce,{}),an,cn),showBadge:A("Product badge",!0,r(_e,{noun:"tag"}))}}function tl(e){const t=e?.bottomDefault??!0;return{_gShowOnCard:S("Show on a card"),showCardPrice:A("Price",!0,r(yt,{})),showCardFinishes:A("Finish swatches",!0,r(Et,{})),showCardSizes:A("Sizes",t,r(Dt,{})),showCardBuy:A("Buy button",t,r(gt,{})),showCardPage:A("Page button",t,r(Ie,{}))}}function Vo(){return Xe("Card image",{min:L,max:me,step:tt,hint:"Rounds the picture. The card's own corner is in Site styles."})}function nl(){return oe({sidesKey:"cornerSides",step:nt,useFollowed:()=>L,mark:r(jo,{label:ot}),hint:l("Rounds the picture. Left alone it stays square.")})}function jo({label:e,changed:t=!1,onReset:n=()=>{}}){return r(x,{words:b()?.panel,label:l(e),changed:t,onReset:n})}function ol(){return{type:"custom",render:({value:e,onChange:t})=>r(Yo,{value:typeof e=="string"?e:"",onChange:t})}}function Yo({value:e,onChange:t}){const[n,o]=se(null),i=he.filter(c=>n===null||w[c].across===n),a=e&&e in w?w[e]:null;return v(T,{children:[r(h,{label:l("Photos in a row"),icon:r(bt,{}),children:v("div",{className:"sf-gallery-filter",children:[r("button",{type:"button","aria-pressed":n===null,onClick:()=>o(null),children:l("All")}),it.map(c=>r("button",{type:"button","aria-pressed":n===c,onClick:()=>o(c),children:c},c))]})}),r(h,{label:l("Layout"),icon:r(Tt,{}),value:a?l(a.label):l("Not chosen"),hint:l("{n} of {total} layouts",{n:i.length,total:he.length}),children:r("div",{className:"sf-gallery-layouts",children:i.map(c=>r($,{content:l(w[c].label),className:"sf-tile-tip",children:r("button",{type:"button","aria-pressed":e===c,"aria-label":l(w[c].label),onClick:()=>t(e===c?"":c),children:r("span",{className:"sf-gallery-pic",children:w[c].desktop.map(([s,u],p)=>r("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${u}`}},p))})})},c))})})]})}export{uo as ANCHOR_HINT,Qr as BOUND_TO_POST_NOTE,ii as BUCKET_ICONS,Vi as CUSTOM_FIELD_MEDIA,ji as CoordsField,Mi as EDGE_ARROWS,Re as FOCAL_DEFAULT,Bo as FOCAL_POINTS,U as FOLD_FIELD_MARKER,Ye as FocalPicker,So as GroupLabel,co as HIGHLIGHT_HINT,k as HidableTextField,de as LINK_FIELD_MARKER,jr as Label,pe as MEDIA_FIELD_MARKER,$i as MEDIA_TYPE_OPTIONS,bo as PanelNoteLine,qe as PlacementGridView,fe as SCAFFOLD_FIELD_MARKER,al as SCALAR_TEXT_CONTROLS,ze as SECTION_BLEEDS_HINT,ho as SectionHeading,ie as Segmented,lo as SiteGapDefaultReset,W as Slider,Ue as Swatches,ll as TEXT_CONTROL_KINDS,R as TEXT_FIELD_MARKER,qi as TICKER_ITEMS_ROW,zo as TextListField,ao as WidthDefaultReset,$o as aimAfterListChange,wi as anchorFields,P as backTo,hi as backgroundField,_i as boxAlignField,Ti as boxBlockSpacingField,Ii as boxJustifyField,Ri as boxPhoneRowField,Ei as boxShareField,yi as boxWrapField,ui as bucketHeader,Ao as cardCornersField,Co as cardImageBackgroundField,Vo as cardImageField,Qi as cardMediaFields,Ci as cardShapeFields,tl as cardShowFields,el as cardStyleFields,Ai as cellWidthFields,Di as checkbox,Hi as colorInput,ni as copyText,$e as cornerSidesField,oe as cornersRowField,Pi as dateTime,pi as designGroupHeader,Ni as directionField,Wi as edgePad,li as entriesHiddenForTab,Bi as focalPicker,Yi as focusAfterRemove,fi as foldMarker,X as foldMetaOf,xo as foldTitleOf,ol as galleryLayoutField,bi as gapField,S as group,Li as heightFields,ue as hidableText,fo as hintIsWhileTyping,M as iconOf,nl as imageCornersField,ci as isBucketHeader,di as isDesignGroupHeader,oo as isNoGlyph,oi as linkField,Ki as multiSelect,no as noGlyph,ki as pageBackgroundField,ai as panelNote,Po as phoneOverrideField,Gi as placementField,mo as plainText,ri as plainTextarea,Xe as pxField,mi as quietMarker,ce as readHidable,Uo as rowText,Ui as searchSelect,si as section,Si as sectionAnimationFields,To as sectionCornersField,xi as sectionShapeFields,gi as sectionThemeFields,le as segmented,O as select,Xo as setRowText,Oi as sizeField,H as slider,Xi as sourceField,vi as spacingFields,ei as text,Qe as textFieldIdentifier,Jr as textFieldOffPage,Ji as textList,Zi as textListRowField,ti as textarea,A as toggle,zi as upload,ro as usePageWidthDetail,io as useSiteGapDetail,Fi as widthField,Zr as withIdentifier,qr as withOffPage,Yr as withScaffold};
1
+ "use client";import{jsx as r,jsxs as v,Fragment as T}from"react/jsx-runtime";import{cloneElement as ae,useId as tt,useRef as Z,useState as se}from"react";import{useEasel as F,useSelectedFields as nt}from"efficient-easel/easel";import{say as l,editorEaselWords as S}from"../editor-words.js";import{readHidable as ce,hidableText as ue}from"./hidable.js";import{FOLD_FIELD_MARKER as U,LINK_FIELD_MARKER as de,MEDIA_FIELD_MARKER as pe,SCAFFOLD_FIELD_MARKER as fe,TEXT_FIELD_MARKER as R,foldMetaOf as X,textFieldIdentifier as ot}from"./field-markers.js";import rt from"../../components/ApplyCornersToSiblings.js";import{CARD_IMAGE_RADIUS_STEP as it,CORNER_RADIUS_MAX as me,CORNER_RADIUS_MIN as L}from"../content/card-image-shape.js";import{IMAGE_CORNER_STEP as lt,IMAGE_CORNERS_LABEL as at}from"../content/image-corners.js";import{GRID_MAX_COLUMNS as st}from"../content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as ct,GALLERY_LAYOUTS as w,GALLERY_LAYOUT_KEYS as he}from"../content/gallery-layout.js";import{anchorSiblingsOf as ut,HERO_GROUP_PLACEMENTS as dt,HERO_GROUP_PLACEMENT_DEFAULT as pt,normalisePlacement as ft,placementPoints as ge}from"../hero-group-placement.js";import mt from"../../components/KeepHint.js";import{AdjustIcon as ht,AlignLeftIcon as gt,AlignSeparateIcon as bt,AnimationIcon as be,BackgroundIcon as xt,BlockSectionIcon as St,CartIcon as Ct,ColumnWidthsIcon as xe,ColumnsIcon as It,CornerIcon as _t,DirectionDownIcon as yt,DirectionLeftIcon as Et,DirectionRightIcon as Tt,DirectionUpIcon as Rt,DollarIcon as Nt,FinishIcon as Ot,GapIcon as Se,GridIcon as At,GroundIcon as vt,HashIcon as Ce,HeightIcon as Ft,ImageIcon as Lt,ListIcon as wt,LocationIcon as Q,PaddingBottomIcon as Ie,PaddingLeftIcon as _e,PaddingRightIcon as ye,PaddingTopIcon as Ee,PageIcon as Te,PhoneIcon as Pt,PlacementIcon as kt,ProductSizeIcon as Dt,RotateIcon as Ht,SquareIcon as Bt,TypeIcon as Gt,WidthIcon as Mt,WrapIcon as Wt}from"efficient-easel/icons";import{FieldGlyph as Re}from"../../components/FieldGlyph.js";import{resolvePageBackground as Kt}from"../content/page-background.js";import{CORNER_SIDES as Ne,CORNER_SIDE_POINTS as Ut,hasOwnSectionCorners as Xt,normalizeCornerSides as Oe}from"../content/section-corners.js";import{SECTION_MOTION_NONE as $t,SECTION_MOTION_OPTIONS as zt}from"../content/section-animation.js";import{enclosingSectionProps as Ae}from"./enclosing-section.js";import{SettingsDefaultReset as C,SettingsField as h,SettingsGroupHead as Vt,SettingsGroupSub as jt,SettingsSegmented as Yt,SettingsSwitch as qt}from"efficient-easel/panel";import{FieldSelect as Jt,ListField as Zt}from"efficient-easel/fields";import{AlignmentGrid as Qt,Checkbox as en,CornersInput as tn,DateTimePicker as nn,FOCAL_DEFAULT as ve,Slider as on,Tooltip as $}from"efficient-shell/ui";import{ColourControl as Fe}from"./ColourControl.js";import Le from"./MarkupToolbar.js";import{deviceField as N}from"./device-fields.js";import{NoControlMark as rn,noControlField as we}from"./panel-no-control-mark.js";import{phoneKey as z,resolvePhoneValue as ee}from"./phone-override.js";import{SuppressibleText as ln}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as an,CARD_OUTLINE_OPTIONS as sn,DEFAULT_CARD_INDEX_FORMAT as cn,DEFAULT_CARD_OUTLINE as un}from"../sections/product-card-style.js";import{COVER_INDEX_OPTIONS as dn,DEFAULT_COVER_INDEX as pn}from"../sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as fn}from"./text-control-kinds.js";import mn from"../../components/ImageFocusRow.js";import hn from"../../components/MediaUploadField.js";import gn from"../../components/MultiSelectField.js";import bn from"../../components/SectionThemePicker.js";import xn from"../../components/SearchSelectField.js";import Sn from"../../components/StorefrontLinkField.js";import Pe from"../../components/UiIcon.js";import{SECTION_PADDING as _}from"../content/section-padding.js";import{hasPhoneHeight as Cn,resolveSectionMinHeight as In}from"../content/section-min-height.js";import{SECTION_MIN_HEIGHT as _n,SECTION_MIN_HEIGHT_GROUP_LABEL as G,SECTION_SCREEN_PCT as yn}from"../content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as En,containerDirectionPoints as Tn,resolveContainerDirection as ke}from"../content/container-direction.js";import{BOX_ALIGN_POINTS as Rn,BOX_BLOCK_SPACING_LABEL as Nn,BOX_BLOCK_SPACING_POINTS as De,BOX_JUSTIFY_POINTS as He,BOX_PHONE_ROW_LABEL as On,BOX_PHONE_ROW_MAX as An,BOX_PHONE_ROW_MIN as Be,BOX_SHARE_LABEL as Ge,BOX_SHARE_POINTS as te,BOX_WRAP_LABEL as vn,BOX_WRAP_POINTS as Me}from"../content/box-layout.js";import{usePreviewHeader as V}from"../../components/PreviewHeaderContext.js";import{CONTAINER_GAP as ne,CONTAINER_GAP_BUILT_IN as Fn,GAP_FIELD_CONTAINER as Ln,hasOwnContainerGap as wn,resolveContainerGap as Pn}from"../content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as kn,CARD_IMAGE_BG_OFF as Dn,CARD_IMAGE_BG_SWATCH_NAMES as Hn,CARD_IMAGE_BG_SWATCHES as Bn,isCardImageBackgroundInheriting as Gn,cardImageBackgroundChoice as Mn,THEME_CARD_IMAGE_BG as Wn}from"../content/card-image-background.js";import{SECTION_BG_INHERIT as Kn,SECTION_BG_SWATCHES as Un,SECTION_BG_SWATCH_NAMES as Xn,THEME_SECTION_BG as $n,isSectionBackgroundInheriting as zn}from"../content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Vn}from"../content/section-surface.js";import{TYPE_SIZE_FIXED as jn,TYPE_SIZE_INHERIT as Yn,isTypeSizeInheriting as qn}from"../content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Jn,WIDTH_CHOICE_LABEL as Zn,WIDTH_INHERIT as Qn,resolveWidth as eo,sectionRunsFullWidth as We}from"../content/section-width.js";import{useFoldHeadingLevel as Ke}from"./panel-heading-scope.js";import{withStyleKind as to}from"efficient-easel/style-clipboard";function M(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!X(n)&&to(n,`section:${t}`);return e}function qr({children:e}){return r("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function Ue(){return null}function no(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return r(Ue,{},e)}function oo(e){return e.type===Ue}function P(e){return oo(e)?void 0:e}function k(e,t){return l("{value} from {from}",{value:e,from:t})}function ro(){const{appState:e}=F(i=>i),t=e.data.root?.props??{},{mode:n,pageWidth:o}=eo(t,"full");return n==="page"?k(`${o}px`,l("the page")):n==="contained"?k(l("Contained"),l("the page")):k(l("Full"),l("the page"))}function io(){const{blockGap:e}=V();return e===null?l("this container's own spacing"):k(`${e}px`,l("Site styles"))}function lo({inherited:e,onReset:t,label:n}){return r(C,{words:S()?.panel,label:l(n),changed:!e,detail:io(),onReset:t})}function ao({inherited:e,onReset:t,label:n}){return r(C,{words:S()?.panel,label:l(n),changed:!e,detail:ro(),onReset:t})}function D({value:e,onChange:t,label:n,placeholder:o,hint:i,multiline:a,hideable:c=!0,markup:s=!0}){const{text:u,hidden:p}=ce(e),m=Z(null),d=Z(null),f=E=>t(c?{text:E,hidden:p}:E),g=()=>t({text:u,hidden:!p}),b=c&&p,y=tt(),x=i?fo(i)?r("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(i)}):r(mt,{children:l(i)}):void 0,K=p?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(Gt,{}),htmlFor:y,className:b?"is-hidden":void 0,hint:x,action:c?r($,{content:K,children:r("button",{type:"button",className:"sf-field-eye","aria-pressed":p,"aria-label":K,onClick:g,children:p?r(Pe,{name:"eye-off",size:14}):r(Pe,{name:"eye",size:14})})}):void 0,children:v("div",{className:"sf-copybox",children:[s&&r(Le,{target:a?d:m,value:u,onChange:f}),a?r("textarea",{id:y,ref:d,value:u,placeholder:o===void 0?void 0:l(o),onChange:E=>f(E.target.value)}):r("input",{id:y,ref:m,type:"text",value:u,placeholder:o===void 0?void 0:l(o),onChange:E=>f(E.target.value)})]})})}function Jr(e,t){return{...e,[fe]:t}}function Zr(e){const t=e[R];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[R]:{...t,offPage:!0}}}function Qr(e){return!e||typeof e!="object"?!1:e[R]?.offPage===!0}function ei(e){const t=e[R];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[R]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as sl,SCALAR_TEXT_CONTROLS as cl}from"./text-control-kinds.js";const so=new Set(fn),H=(e,t)=>{const n={...t,[R]:e};if(!so.has(e.control))return n;const o=t.render;return{...we(n,"authored-copy"),render:i=>r(ln,{name:i.name,children:o(i)})}},ti="Everything else on this block comes from the linked post. Unlink it to edit by hand.",co="Select a word, then press the highlighter.",uo="A short name so a link can jump straight to this section, like yoursite.com/page#about.",po=new Set([co]),fo=e=>po.has(e);function ni(e,t,n){return H({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(D,{value:o,onChange:i,label:e,placeholder:t,hint:n})})}function oi(e,t,n){return H({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(D,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0})})}function mo(e,t,n){return H({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(D,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function ri(e,t,n){return H({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(D,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1})})}function ii(e){return{type:"custom",[de]:{label:e},render:({value:t,onChange:n})=>r(Sn,{value:ue(t),onChange:n,label:e})}}function li(e,t,n){return H({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(D,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const ai={Design:ht,Animation:be};function si(e,t){return e.includes("Design")?t!=="Design":null}function ho({label:e}){return r(Vt,{title:l(e),level:Ke(1)})}function go({level:e,label:t}){return e===1?r(ho,{label:t}):r(So,{label:t})}function Xe(e,t){return{type:"custom",[U]:{label:e,level:t},render:()=>r(go,{level:t,label:e})}}function I(e){return Xe(e,2)}function ci(e){return{type:"custom",render:()=>r(bo,{text:e})}}function bo({text:e}){return r("p",{className:"sf-note",children:l(e)})}function ui(e){return Xe(e,1)}function di(e){return X(e)!==null&&e?.tabs!==void 0}const $e=new Map;function pi(e,t){const n=`${e}\0${t?t.join(""):""}`,o=$e.get(n)??{type:"custom",tabs:t,[U]:{label:e,level:1},bucket:e,marker:!0,render:()=>r(T,{})};return $e.set(n,o),o}function fi(e){return X(e)!==null&&e?.designGroup!==void 0}const ze=new Map;function mi(e){const t=ze.get(e)??{type:"custom",[U]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>r(T,{})};return ze.set(e,t),t}function xo(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function hi(e,t){return xo(e)===t?e:{...e,marker:!0,fold:t,render:()=>r(T,{})}}function gi(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>r(T,{})}}function So({label:e}){return r(jt,{title:l(e),level:Ke(2)})}function Ve({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 v("div",{className:"sf-swatches",children:[e.map(s=>{const u=o?.[s]?l(o[s]):s;return r($,{content:u,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":u})},s)}),r("span",{className:"sf-swatch-hex",children:c})]})}function bi(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=zn(n,t);return r(h,{label:l(e),icon:r(xt,{}),changed:!i,action:r(C,{words:S()?.panel,label:l(e),changed:!i,detail:l("the theme's section background"),onReset:()=>o(Kn)}),children:Ve({swatches:Un,current:i?$n:n??t??"",onPick:o,names:Xn})})}}}function Co(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=n,a=Gn(i,t);return r(h,{label:l(e),icon:r(vt,{}),changed:!a,action:r(C,{words:S()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(kn)}),children:Ve({swatches:Bn,current:a?Wn:Mn(i,t),onPick:o,names:Hn})})}}}function xi(e=n=>n,t){return M({_gSectionTheme:I(Vn),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>r(bn,{value:e(n),onChange:o,followLabel:t})}})}function W({min:e,max:t,step:n,value:o,onChange:i,suffix:a="",readout:c=!0,notch:s,ariaLabel:u,disabled:p=!1}){const m=s!==void 0&&Number.isFinite(s)&&s>=e&&s<=t;return r("div",{className:m?"sf-slider has-notch":"sf-slider",style:m?{"--sf-notch":(s-e)/(t-e)}:void 0,children:r(on,{min:e,max:t,step:n,value:o,suffix:a||void 0,showInput:c,label:u===void 0?void 0:l(u),disabled:p,size:"sm",className:"sf-slider-track",onChange:d=>{d!==null&&d!==o&&i(d)}})})}function B(e,t,n,o,i,a,c="",s){return{type:"custom",render:u=>r(h,{label:l(e),icon:P(t),action:s?s("storedValue"in u?u.storedValue:u.value,u.onChange):void 0,children:W({min:n,max:o,step:i,value:typeof u.value=="number"?u.value:a,suffix:c,ariaLabel:e,onChange:u.onChange})})}}function je(e,t){const{min:n,max:o,step:i=1,unsetLabel:a,hint:c,restTrack:s,unsetMark:u,icon:p}=t;return{type:"custom",render:({value:m,onChange:d})=>{const f=typeof m=="number"?m:null,g=f===null;return r(h,{label:l(e),icon:p?P(p):void 0,value:g?u||a===void 0?void 0:l(a):`${f}px`,changed:!g,action:u?ae(u,{changed:!g,onReset:()=>d(null)}):r(C,{words:S()?.panel,label:l(e),changed:!g,onReset:()=>d(null)}),hint:typeof c=="string"?l(c):c,children:s?s({min:n,max:o,step:i,px:f,label:e,onChange:d}):W({min:n,max:o,step:i,value:f??n,readout:!1,ariaLabel:e,onChange:d})})}}}function Si(e){const t=B("Gap",r(Se,{}),ne.min,ne.max,ne.step,Fn[e],"px",(n,o)=>r(lo,{inherited:!wn(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[Ln]:e,render:n=>t.render({...n,value:Pn(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}const j="Corners";function oe(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,i=o!==null;return r(h,{label:l(j),icon:r(_t,{}),changed:i,action:ae(e.mark,{changed:i,onReset:()=>n(null)}),hint:e.hint,children:r(_o,{tier:e,px:o,onRadius:n})})}}}function Io(e){let t=null;try{t=nt()}catch{t=null}return[t?.values?.[e],n=>t?.onChange(e,n)]}function _o({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),i=e.useClosedReason?e.useClosedReason():null,[a,c]=Io(e.sidesKey),s=Oe(a)??[...Ne];return r(tn,{className:"sf-corners",label:l(j),value:s,corners:Ut,onChange:u=>{const p=Oe(u)??[];c(p.length===Ne.length?null:p)},radius:t,onRadiusChange:n,radiusMin:L,radiusMax:me,radiusStep:e.step??1,radiusPlaceholder:String(o),disabled:i!==null,disabledReason:i??void 0})}function Ye(){return we({type:"custom",render:()=>r(rn,{})},"always")}function yo({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=V(),i=typeof o=="number"?`${o}px`:l("not set");return r(C,{words:S()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):k(i,l("Site styles")),onReset:n})}function Eo(){const{cornerRadiusPx:e}=V();return typeof e=="number"?e:L}function To(){return oe({sidesKey:"sectionCornerSides",useFollowed:Eo,useClosedReason:()=>Je()?l(qe):null,mark:r(yo,{label:j}),hint:r(Ro,{})})}const qe="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function Je(){return We(Y())}function Ro(){return r(T,{children:Je()?qe:"Follows Site styles ▸ Basics ▸ Corners until you set a number here."})}function Ci(){return M({_gShape:I("Shape"),sectionCorners:To(),sectionCornerSides:Ye()})}function Ii(){return{_gMotion:I("Motion"),sectionAnimation:le("Entrance",r(be,{}),[...zt],$t)}}function re(){let e=null;try{const{appState:t,selectedItem:n}=F(i=>i),o=n?.props?.id?String(n.props.id):void 0;e=o?Ae(t?.data,o):null}catch{e=null}return e!==null&&We(e)}function Ze(e){const{cornerRadiusPx:t}=V(),n=re(),o=typeof t=="number"?t:e;let i=null;try{const{appState:c,selectedItem:s}=F(p=>p),u=s?.props?.id?String(s.props.id):void 0;i=u?Ae(c?.data,u):null}catch{i=null}if(n||!i)return o;const a=i.sectionCorners;return Xt(a)?a:o}function No({label:e,changed:t=!1,onReset:n=()=>{}}){const o=re(),i=Ze(L),a=o?"Site":"Section";return r(C,{words:S()?.panel,label:l(e),changed:t,detail:k(`${i}px`,o?l("Site styles"):l("the section")),onReset:n})}function Oo(){return r(T,{children:re()?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 Ao(){return oe({sidesKey:"cardCornerSides",useFollowed:()=>Ze(L),mark:r(No,{label:j}),hint:r(Oo,{})})}function vo(){return{type:"custom",render:()=>r(rt,{})}}function _i(){return{_gShape:I("Shape"),cardCorners:Ao(),cardCornerSides:Ye(),cardCornersApplyAll:vo()}}function yi(){return O("Justify",r(bt,{}),He,He[0].value)}function Ei(){return O("Item alignment",r(gt,{}),Rn,"stretch")}function Ti(){return O(vn,r(Wt,{}),Me,Me[0].value)}function Ri(){return{type:"custom",render:({value:e,onChange:t})=>{const n=te.find(o=>o.value===e)??te[0];return r(h,{label:l(Ge),icon:r(xe,{}),value:l(n.label),children:r("div",{className:"sf-gallery-layouts",role:"group","aria-label":l(Ge),children:te.map(o=>r($,{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:Fo(o.weights).map((i,a)=>r("i",{style:{gridColumn:`span ${i}`}},a))})})},o.value))})})}}}function Fo(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 Ni(){return O(Nn,r(Se,{}),De,De[0].value)}function Oi(){return B(On,r(Pt,{}),Be,An,1,Be)}function Ai(e){const t=le(En,no("`Direction` names how a container's children run — a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; editor-shell's own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),Tn(e),ke(e,void 0));return{type:"custom",render:n=>t.render({...n,value:ke(e,n.value),onChange:o=>n.onChange(o)})}}function vi(e,t,n,o,i,a){return{type:"custom",render:({value:c,onChange:s})=>r(h,{label:l(e),icon:r(Re,{noun:a}),action:r(C,{words:S()?.panel,label:l(e),changed:!qn(c),detail:l("the Text style in Site styles"),onReset:()=>s(Yn),defaultAction:{onPress:()=>s(jn),title:l("Keep this section's own built-in size"),icon:r(St,{})}}),children:W({min:t,max:n,step:o,value:typeof c=="number"?c:i,suffix:"px",ariaLabel:e,onChange:s})})}}function Fi(){return{_gCellWidth:I("Cell width"),gridSpan:O("Positions",r(xe,{}),[{label:"Auto",value:""},...Array.from({length:st},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function Y(){let e=null;try{e=F(t=>t).selectedItem}catch{e=null}return e?.props??{}}function Lo({min:e,max:t,step:n,px:o,label:i,onChange:a,desktopKey:c,fallback:s}){const u=Y()[c],p=ee(void 0,u,s);return r(T,{children:W({min:e,max:t,step:n,value:ee(o,u,s),readout:!1,ariaLabel:i,notch:p,onChange:a})})}function wo({label:e,desktopKey:t,fallback:n,changed:o=!1,onReset:i=()=>{}}){const a=Y()[t],c=ee(void 0,a,n);return r(C,{words:S()?.panel,label:l(e),changed:o,detail:l("{value} on desktop",{value:`${c}px`}),onReset:i})}function Po(e){return je(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:r(wo,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>r(Lo,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const ko={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Do={Top:Ee,Bottom:Ie,Left:_e,Right:ye},Ho=e=>{const t=Do[e];return r(t,{})};function Li(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,i=x=>ko[x],a=x=>B(i("Top"),r(Ee,{}),_.min,_.max,_.step,x,"px"),c=(x,K,E,J=_)=>N("mobile",Po({label:i(x),icon:Ho(x),desktopKey:K,min:J.min,max:J.max,step:J.step,fallback:E})),s=e.top??_.min,u=e.bottom??_.min,p="sectionPaddingLeft",m="sectionPaddingRight",d=e.sideBounds??_,f=e.side??d.min,g=e.sidePhone??f,b=e.phone===!0,y=x=>b?N("desktop",x):x;return M({...o?{_gSpacing:I("Padding")}:{},[t]:y(a(s)),...b?{[z(t)]:c("Top",t,s)}:{},...e.only==="top"?{}:{[n]:y(B(i("Bottom"),r(Ie,{}),_.min,_.max,_.step,u,"px")),...b?{[z(n)]:c("Bottom",n,u)}:{}},...e.sides?{[p]:y(B(i("Left"),r(_e,{}),d.min,d.max,d.step,f,"px")),...b?{[z(p)]:c("Left",p,g,d)}:{},[m]:y(B(i("Right"),r(ye,{}),d.min,d.max,d.step,f,"px")),...b?{[z(m)]:c("Right",m,g,d)}:{}}:{}})}const Bo={contained:"Contained",page:"Page",full:"Full"},q="Width";function wi(e,t=Jn,n=!0){const o=t.map(i=>({label:Zn[i]??Bo[i],value:i}));return M({...n?{_gWidth:I(q)}:{},widthMode:{type:"custom",render:({onChange:i,field:a})=>r(h,{label:l(q),icon:r(Mt,{}),action:n?r(ao,{inherited:a?.inherited??!1,onReset:()=>i(Qn),label:q}):void 0,children:ie({options:o,value:a?.currentValue||e,onChange:i,ariaLabel:q})})}})}function Pi(){const e=o=>({type:"custom",render:({value:i,onChange:a})=>r(h,{label:G,icon:P(r(Ft,{})),action:o?o(a):void 0,children:ie({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(i)?i:"auto",onChange:a,ariaLabel:G})})}),t=()=>({type:"custom",render:({value:o,onChange:i,field:a})=>{const c=a?.unit==="%"?"%":"px",s=c==="%"?yn:_n;return r("div",{className:"sf-field",children:W({min:s.min,max:s.max,step:s.step,value:typeof o=="number"?o:s.fallback,suffix:c,ariaLabel:G,onChange:i})})}}),n=()=>le("Unit",r(Ce,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return M({_gHeight:I(G),sectionHeightMode:N("desktop",e()),sectionHeightValue:N("desktop",t()),sectionHeightUnit:N("desktop",n()),sectionHeightModePhone:N("mobile",e(o=>r(Go,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:N("mobile",t()),sectionHeightUnitPhone:N("mobile",n())})}function Go({onClear:e}){const t=Y(),n=Cn(t),o=In(t),i=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return r(C,{words:S()?.panel,label:l(G),changed:n,detail:i,onReset:e})}function ki(){return{_gAnchor:I("Anchor"),anchor:mo("Anchor name","e.g. about",uo)}}function Di(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=`${a??c??e}-datetime`,u=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(nn,{id:s,value:Number.isFinite(u)?new Date(u):null,onChange:p=>i(p?p.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,u=`${a??c??e}-label`;return r(h,{label:l(e),labelId:u,icon:n,action:r(qt,{checked:s,onChange:i,ariaLabelledBy:u})})}}}function Hi(){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(Te,{}),htmlFor:i,action:r(Fe,{id:i,label:"Background",value:Kt(e),onChange:t})})}}}function Bi(e,t){return{type:"custom",render:({value:n,onChange:o,id:i})=>{const a=typeof n=="boolean"?n:t,c=`${i??e}-checkbox`;return r(h,{label:l(e),htmlFor:c,className:"sf-checkbox",action:r(en,{id:c,checked:a,onChange:o})})}}}function Gi(e,t){return{type:"custom",render:({value:n,onChange:o})=>r(h,{label:l(e),action:Fe({value:n||t,onChange:o,label:e})})}}const Mo=[{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 Qe({label:e,value:t,onChange:n,points:o=Mo}){const i=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return r(Qt,{label:l(e),value:t,points:i,onChange:n})}function Mi(e,t=ve,n="mediaImage"){return{type:"custom",render:({value:o,onChange:i})=>r("div",{className:"sf-focal-row",children:r(Wo,{label:e,value:o||t,onChange:i,imageProp:n})})}}function Wo({label:e,value:t,onChange:n,imageProp:o}){const{selectedItem:i}=F(c=>c),a=i?.props?.[o];return r(mn,{label:e,value:t,onChange:n,image:typeof a=="string"?a:void 0})}const Ko=ge([]);function Wi(e,{stacking:t,fallback:n=pt}){return{type:"custom",render:({value:o,onChange:i})=>{const a=dt.includes(o)?o:n;return t?r(Uo,{label:e,value:a,onChange:i}):et({label:e,value:a,onChange:i,points:Ko})}}}function Uo({label:e,value:t,onChange:n}){const{appState:o,selectedItem:i}=F(s=>s),a=i?.props?.id?String(i.props.id):void 0,c=a?ut(o?.data,a):[];return et({label:e,value:t,onChange:n,points:ge(c,a)})}function et({label:e,value:t,onChange:n,points:o}){const i=o.find(a=>a.disabled);return r(h,{label:l(e),icon:r(kt,{}),hint:i?.title?l(i.title):void 0,children:Qe({label:e,value:ft(t),onChange:n,points:o})})}const Ki={top:r(Rt,{}),right:r(Tt,{}),bottom:r(yt,{}),left:r(Et,{})};function Ui(e,t,n,o,i,a){const c=m=>t.find(d=>d.value===m),s=m=>({value:m,label:"",disabled:!0,title:o}),u=m=>{const d=t.find(g=>g.cell===m);if(!d)return s(`missing-${m}`);const f=a?.[m];return f?{value:d.value,label:d.label,icon:f}:{value:d.value,label:d.label}},p=[s("corner-top-left"),u("top"),s("corner-top-right"),u("left"),s("centre"),u("right"),s("corner-bottom-left"),u("bottom"),s("corner-bottom-right")];return{type:"custom",render:({value:m,onChange:d})=>{const f=t.some(g=>g.value===m)?m:n;return r(h,{label:l(e),icon:i,value:c(f)?.label?l(c(f).label):"",children:Qe({label:e,value:f,onChange:d,points:p})})}}}const Xo="\0note";function O(e,t,n,o,i){return{type:"custom",options:n,fallback:o,...i?{note:i}:{},render:({value:a,onChange:c,field:s})=>{const u=s.options??n,p=s.fallback??o,m=u.some(d=>d.value===a)?a:p;return r(h,{label:l(e),icon:P(t),children:r(Jt,{value:m,ariaLabel:l(e),onChange:c,options:[...i?[{label:l(i),value:Xo,disabled:!0}]:[],...u.map(d=>({label:l(d.label),value:d.value}))]})})}}}function Xi(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:i,field:a})=>r(gn,{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 $i(e,t,n,o){return{type:"custom",options:t,fallback:n,render:({value:i,onChange:a,field:c})=>r(xn,{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 zi(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const i={value:n,onChange:o,...t};return r(e,{...i})}}}function ie({options:e,value:t,onChange:n,ariaLabel:o,disabled:i=!1}){return r(Yt,{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 Vi=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function le(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:P(t),children:ie({options:i,value:i.some(u=>u.value===a)?a:a||s?.currentValue||o,onChange:c,ariaLabel:e})})}}function ji(e,t,n){return{type:"custom",[pe]:!0,render:({value:o,onChange:i})=>r(hn,{value:o||"",onChange:i,label:e,accept:t,placeholder:n})}}const Yi={HeroSingle:["imageFocal"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function qi({value:e,onChange:t,label:n}){const o=e||{},i=!!o.pending,a=i?"var(--fg-dim, #888)":o.ok?"#1d9e75":"#d85a30",c=(s,u)=>t({...o,[s]:u===""?void 0:Number(u)});return v(h,{label:l(n),icon:r(Q,{}),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&&v("div",{style:{marginTop:8,display:"grid",gap:8},children:[r(h,{label:l("Latitude"),icon:r(Q,{}),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(Q,{}),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 $o(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function zo(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 Ji(e,t){return e===null?null:t>e?e:null}function Vo(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 Zi={label:"Ticker items",icon:r(wt,{})};function Qi(e,t,n,o){return{type:"custom",[R]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},render:({value:i,onChange:a})=>r(jo,{label:e,icon:P(t),items:Array.isArray(i)?i:[],placeholder:n,onChange:a,markup:o==="markup"})}}function jo({label:e,icon:t,items:n,placeholder:o,onChange:i,markup:a=!1}){const c=Z(null),[s,u]=se(null),p=d=>d.map(f=>({text:f?.text??""})),m=d=>{const f=Vo(n,d,s);f===null&&(c.current=null),u(f),i(p(d))};return r(Zt,{label:l(e),icon:t,noun:l("item"),items:n,onChange:m,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?r(Le,{target:c,value:$o(n,s),onChange:d=>i(zo(n,s??-1,d)),disabled:s===null,label:s===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:s+1})}):void 0,renderRow:(d,f,g)=>r("input",{type:"text",className:a&&s===f?"sf-list-marking":void 0,value:d?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:f+1}),onChange:b=>g({text:b.target.value}),onFocus:b=>{c.current=b.currentTarget,u(f)}})})}function el(e,t){const n=`${e.label} — row ${t+1}`;return H({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:i})=>r(D,{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 tl(e){return{_gCards:I("Cards"),coverIndex:O("Cover image",r(Lt,{}),dn,String(pn),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:Co("Image background",Dn),cardImage:Yo(),spinOnHover:A("Rotate on hover",e?.spinDefault??!0,r(Ht,{}))}}function nl(){return{outline:O("Card outline",r(Bt,{}),sn,un),indexBadge:O("Card number",r(Ce,{}),an,cn),showBadge:A("Product badge",!0,r(Re,{noun:"tag"}))}}function ol(e){const t=e?.bottomDefault??!0;return{_gShowOnCard:I("Show on a card"),showCardPrice:A("Price",!0,r(Nt,{})),showCardFinishes:A("Finish swatches",!0,r(Ot,{})),showCardSizes:A("Sizes",t,r(Dt,{})),showCardBuy:A("Buy button",t,r(Ct,{})),showCardPage:A("Page button",t,r(Te,{}))}}function Yo(){return je("Card image",{min:L,max:me,step:it,hint:"Rounds the picture. The card's own corner is in Site styles."})}function rl(){return oe({sidesKey:"cornerSides",step:lt,useFollowed:()=>L,mark:r(qo,{label:at}),hint:l("Rounds the picture. Left alone it stays square.")})}function qo({label:e,changed:t=!1,onReset:n=()=>{}}){return r(C,{words:S()?.panel,label:l(e),changed:t,onReset:n})}function il(){return{type:"custom",render:({value:e,onChange:t})=>r(Jo,{value:typeof e=="string"?e:"",onChange:t})}}function Jo({value:e,onChange:t}){const[n,o]=se(null),i=he.filter(c=>n===null||w[c].across===n),a=e&&e in w?w[e]:null;return v(T,{children:[r(h,{label:l("Photos in a row"),icon:r(It,{}),children:v("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(At,{}),value:a?l(a.label):l("Not chosen"),hint:l("{n} of {total} layouts",{n:i.length,total:he.length}),children:r("div",{className:"sf-gallery-layouts",children:i.map(c=>r($,{content:l(w[c].label),className:"sf-tile-tip",children:r("button",{type:"button","aria-pressed":e===c,"aria-label":l(w[c].label),onClick:()=>t(e===c?"":c),children:r("span",{className:"sf-gallery-pic",children:w[c].desktop.map(([s,u],p)=>r("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${u}`}},p))})})},c))})})]})}export{uo as ANCHOR_HINT,ti as BOUND_TO_POST_NOTE,ai as BUCKET_ICONS,Yi as CUSTOM_FIELD_MEDIA,qi as CoordsField,Ki as EDGE_ARROWS,ve as FOCAL_DEFAULT,Mo as FOCAL_POINTS,U as FOLD_FIELD_MARKER,Qe as FocalPicker,So as GroupLabel,co as HIGHLIGHT_HINT,D as HidableTextField,de as LINK_FIELD_MARKER,qr as Label,pe as MEDIA_FIELD_MARKER,Vi as MEDIA_TYPE_OPTIONS,bo as PanelNoteLine,et as PlacementGridView,fe as SCAFFOLD_FIELD_MARKER,cl as SCALAR_TEXT_CONTROLS,qe as SECTION_BLEEDS_HINT,ho as SectionHeading,ie as Segmented,lo as SiteGapDefaultReset,W as Slider,Ve as Swatches,sl as TEXT_CONTROL_KINDS,R as TEXT_FIELD_MARKER,Zi as TICKER_ITEMS_ROW,jo as TextListField,ao as WidthDefaultReset,Vo as aimAfterListChange,ki as anchorFields,k as backTo,bi as backgroundField,Ei as boxAlignField,Ni as boxBlockSpacingField,yi as boxJustifyField,Oi as boxPhoneRowField,Ri as boxShareField,Ti as boxWrapField,pi as bucketHeader,Ao as cardCornersField,Co as cardImageBackgroundField,Yo as cardImageField,tl as cardMediaFields,_i as cardShapeFields,ol as cardShowFields,nl as cardStyleFields,Fi as cellWidthFields,Bi as checkbox,Gi as colorInput,ri as copyText,Ye as cornerSidesField,oe as cornersRowField,Di as dateTime,mi as designGroupHeader,Ai as directionField,Ui as edgePad,si as entriesHiddenForTab,Mi as focalPicker,Ji as focusAfterRemove,hi as foldMarker,X as foldMetaOf,xo as foldTitleOf,il as galleryLayoutField,Si as gapField,I as group,Pi as heightFields,ue as hidableText,fo as hintIsWhileTyping,P as iconOf,rl as imageCornersField,di as isBucketHeader,fi as isDesignGroupHeader,oo as isNoGlyph,ii as linkField,Xi as multiSelect,no as noGlyph,Hi as pageBackgroundField,ci as panelNote,Po as phoneOverrideField,Wi as placementField,mo as plainText,li as plainTextarea,je as pxField,gi as quietMarker,ce as readHidable,$o as rowText,$i as searchSelect,ui as section,Ii as sectionAnimationFields,To as sectionCornersField,Ci as sectionShapeFields,xi as sectionThemeFields,le as segmented,O as select,zo as setRowText,vi as sizeField,B as slider,zi as sourceField,Li as spacingFields,ni as text,ot as textFieldIdentifier,Qr as textFieldOffPage,Qi as textList,el as textListRowField,oi as textarea,A as toggle,ji as upload,ro as usePageWidthDetail,io as useSiteGapDetail,wi as widthField,ei as withIdentifier,Zr as withOffPage,Jr as withScaffold};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-web-builder",
3
- "version": "13.1.0",
3
+ "version": "13.2.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",