efficient-web-builder 10.0.0 → 11.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/CHANGELOG.md +159 -0
  2. package/dist/components/SectionEditor.js +1 -1
  3. package/dist/components/SectionTextEntries.d.ts +3 -1
  4. package/dist/components/SectionTextEntries.js +1 -1
  5. package/dist/components/SiteFields.d.ts +2 -1
  6. package/dist/components/SiteFields.js +1 -1
  7. package/dist/components/SlotChildRows.d.ts +4 -0
  8. package/dist/components/SlotChildRows.js +1 -1
  9. package/dist/components/storefront-editor.css +4 -3
  10. package/dist/lib/editor-words-catalogue.d.ts +13 -1
  11. package/dist/lib/editor-words-catalogue.js +4 -4
  12. package/dist/lib/puck/blocks/general/Flex/fields.js +1 -1
  13. package/dist/lib/puck/blocks/general/Footprint/fields.js +1 -1
  14. package/dist/lib/puck/blocks/general/Grid/fields.js +1 -1
  15. package/dist/lib/puck/blocks/general/Hero/fields.js +1 -1
  16. package/dist/lib/puck/blocks/general/HeroGroup/fields.js +1 -1
  17. package/dist/lib/puck/blocks/general/HeroSingle/fields.js +1 -1
  18. package/dist/lib/puck/blocks/general/HeroSlide/fields.js +1 -1
  19. package/dist/lib/puck/blocks/general/LongRead/fields.js +1 -1
  20. package/dist/lib/puck/blocks/general/ProcessSteps/fields.js +1 -1
  21. package/dist/lib/puck/blocks/general/Prose/fields.js +1 -1
  22. package/dist/lib/puck/blocks/general/Split/fields.js +1 -1
  23. package/dist/lib/puck/blocks/general/Timeline/fields.js +1 -1
  24. package/dist/lib/puck/blocks/general/TimelineTrack/fields.js +1 -1
  25. package/dist/lib/puck/blocks/shared-fields.d.ts +1 -0
  26. package/dist/lib/puck/blocks/shared-fields.js +1 -1
  27. package/dist/lib/puck/controls.d.ts +9 -1
  28. package/dist/lib/puck/controls.js +1 -1
  29. package/dist/lib/puck/field-buckets.d.ts +1 -1
  30. package/dist/lib/puck/field-buckets.js +1 -1
  31. package/dist/lib/puck/field-groups.d.ts +19 -8
  32. package/dist/lib/puck/field-groups.js +1 -1
  33. package/dist/lib/puck/panel-bands.d.ts +14 -0
  34. package/dist/lib/puck/panel-bands.js +1 -0
  35. package/dist/lib/puck/panel-drop-empty-headings.js +1 -1
  36. package/dist/lib/puck/passes/settings-groups.js +1 -1
  37. package/package.json +5 -5
@@ -1 +1 @@
1
- "use client";import{jsx as r,jsxs as T,Fragment as B}from"react/jsx-runtime";import{cloneElement as ae,useId as Je,useRef as J,useState as se}from"react";import{useEasel as v,useSelectedFields as qe}from"efficient-easel/easel";import{say as l,editorEaselWords as x}from"../editor-words.js";import{readHidable as ce,hidableText as ue}from"./hidable.js";import{FOLD_FIELD_MARKER as q,LINK_FIELD_MARKER as de,MEDIA_FIELD_MARKER as pe,SCAFFOLD_FIELD_MARKER as fe,TEXT_FIELD_MARKER as R,foldMetaOf as Z,textFieldIdentifier as Ze}from"./field-markers.js";import Qe from"../../components/ApplyCornersToSiblings.js";import{CARD_IMAGE_RADIUS_STEP as et,CORNER_RADIUS_MAX as me,CORNER_RADIUS_MIN as A}from"../content/card-image-shape.js";import{IMAGE_CORNER_STEP as tt,IMAGE_CORNERS_LABEL as nt}from"../content/image-corners.js";import{GRID_MAX_COLUMNS as ot}from"../content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as rt,GALLERY_LAYOUTS as F,GALLERY_LAYOUT_KEYS as he}from"../content/gallery-layout.js";import{anchorSiblingsOf as it,HERO_GROUP_PLACEMENTS as lt,HERO_GROUP_PLACEMENT_DEFAULT as at,normalisePlacement as st,placementPoints as ge}from"../hero-group-placement.js";import ct from"../../components/KeepHint.js";import{AlignLeftIcon as ut,AlignSeparateIcon as dt,AnimationIcon as be,BackgroundIcon as pt,BlockSectionIcon as ft,CartIcon as mt,ColumnWidthsIcon as xe,ColumnsIcon as ht,CornerIcon as gt,DirectionDownIcon as bt,DirectionLeftIcon as xt,DirectionRightIcon as St,DirectionUpIcon as Ct,DollarIcon as It,FinishIcon as _t,GapIcon as Se,GridIcon as yt,GroundIcon as Et,HashIcon as Ce,ImageIcon as Tt,LayoutIcon as Rt,ListIcon as Nt,LocationIcon as Q,PaddingBottomIcon as Ot,PaddingLeftIcon as Lt,PaddingRightIcon as vt,PaddingTopIcon as At,PageIcon as Ie,PhoneIcon as Ft,PlacementIcon as wt,ProductSizeIcon as Pt,RotateIcon as kt,SquareIcon as Dt,StylesIcon as Bt,TextLinesIcon as Ht,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 S,SettingsField as h,SettingsGroupHead as Vt,SettingsGroupSub as Yt,SettingsSegmented as jt,SettingsSwitch as Jt}from"efficient-easel/panel";import{FieldSelect as qt,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 K}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 Le}from"./panel-no-control-mark.js";import{phoneKey as U,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 H,SECTION_SCREEN_PCT as yn}from"../content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as En,containerDirectionPoints as Tn,resolveContainerDirection as Ae}from"../content/container-direction.js";import{BOX_ALIGN_POINTS as Rn,BOX_BLOCK_SPACING_LABEL as Nn,BOX_BLOCK_SPACING_POINTS as Fe,BOX_JUSTIFY_POINTS as we,BOX_PHONE_ROW_LABEL as On,BOX_PHONE_ROW_MAX as Ln,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 X}from"../../components/PreviewHeaderContext.js";import{CONTAINER_GAP as ne,CONTAINER_GAP_BUILT_IN as An,GAP_FIELD_CONTAINER as Fn,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 Bn,CARD_IMAGE_BG_SWATCHES as Hn,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 Yn,TYPE_SIZE_INHERIT as jn,isTypeSizeInheriting as Jn}from"../content/section-type-size.js";import{SECTION_WIDTH_CHOICES as qn,WIDTH_CHOICE_LABEL as Zn,WIDTH_INHERIT as Qn,resolveWidth as eo,sectionRunsFullWidth as Be}from"../content/section-width.js";import{useFoldHeadingLevel as He}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"&&!Z(n)&&to(n,`section:${t}`);return e}function Vr({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 $(e){return oo(e)?void 0:e}function w(e,t){return l("{value} from {from}",{value:e,from:t})}function ro(){const{appState:e}=v(i=>i),t=e.data.root?.props??{},{mode:n,pageWidth:o}=eo(t,"full");return n==="page"?w(`${o}px`,l("the page")):n==="contained"?w(l("Contained"),l("the page")):w(l("Full"),l("the page"))}function io(){const{blockGap:e}=X();return e===null?l("this container's own spacing"):w(`${e}px`,l("Site styles"))}function lo({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:io(),onReset:t})}function ao({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:ro(),onReset:t})}function P({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=J(null),d=J(null),m=E=>t(c?{text:E,hidden:p}:E),I=()=>t({text:u,hidden:!p}),g=c&&p,y=Je(),b=i?fo(i)?r("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(i)}):r(ct,{children:l(i)}):void 0,W=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:b,action:c?r(K,{content:W,children:r("button",{type:"button",className:"sf-field-eye","aria-pressed":p,"aria-label":W,onClick:I,children:p?r(ve,{name:"eye-off",size:14}):r(ve,{name:"eye",size:14})})}):void 0,children:T("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 jr(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 qr(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 tl,SCALAR_TEXT_CONTROLS as nl}from"./text-control-kinds.js";const so=new Set(fn),k=(e,t)=>{const n={...t,[R]:e};if(!so.has(e.control))return n;const o=t.render;return{...Le(n,"authored-copy"),render:i=>r(ln,{name:i.name,children:o(i)})}},Zr="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 Qr(e,t,n){return k({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(P,{value:o,onChange:i,label:e,placeholder:t,hint:n})})}function ei(e,t,n){return k({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(P,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0})})}function mo(e,t,n){return k({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(P,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function ti(e,t,n){return k({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(P,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1})})}function ni(e){return{type:"custom",[de]:{label:e},render:({value:t,onChange:n})=>r(Sn,{value:ue(t),onChange:n,label:e})}}function oi(e,t,n){return k({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(P,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const ri={Content:Ht,Style:Bt,Layout:Rt,Animation:be};function ii(e,t){return e.includes("Content")?t!=="Content":null}function ho({label:e}){return r(Vt,{title:l(e),level:He(1)})}function go({level:e,label:t}){return e===1?r(ho,{label:t}):r(xo,{label:t})}function Me(e,t){return{type:"custom",[q]:{label:e,level:t},render:()=>r(go,{level:t,label:e})}}function C(e){return Me(e,2)}function li(e){return{type:"custom",render:()=>r(bo,{text:e})}}function bo({text:e}){return r("p",{className:"sf-note",children:l(e)})}function ai(e){return Me(e,1)}function si(e){return Z(e)!==null&&e?.tabs!==void 0}const We=new Map;function ci(e,t){const n=`${e}\0${t?t.join(""):""}`,o=We.get(n)??{type:"custom",tabs:t,[q]:{label:e,level:1},bucket:e,marker:!0,render:()=>r(B,{})};return We.set(n,o),o}function xo({label:e}){return r(Yt,{title:l(e),level:He(2)})}function Ke({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 T("div",{className:"sf-swatches",children:[e.map(s=>{const u=o?.[s]?l(o[s]):s;return r(K,{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 ui(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=zn(n,t);return r(h,{label:l(e),icon:r(pt,{}),changed:!i,action:r(S,{words:x()?.panel,label:l(e),changed:!i,detail:l("the theme's section background"),onReset:()=>o(Kn)}),children:Ke({swatches:Un,current:i?$n:n??t??"",onPick:o,names:Xn})})}}}function So(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(Et,{}),changed:!a,action:r(S,{words:x()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(kn)}),children:Ke({swatches:Hn,current:a?Wn:Mn(i,t),onPick:o,names:Bn})})}}}function di(e=n=>n,t){return G({_gSectionTheme:C(Vn),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>r(bn,{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: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 D(e,t,n,o,i,a,c="",s){return{type:"custom",render:u=>r(h,{label:l(e),icon:$(t),action:s?s("storedValue"in u?u.storedValue:u.value,u.onChange):void 0,children:M({min:n,max:o,step:i,value:typeof u.value=="number"?u.value:a,suffix:c,ariaLabel:e,onChange:u.onChange})})}}function Ue(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(S,{words:x()?.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}):M({min:n,max:o,step:i,value:d??n,readout:!1,ariaLabel:e,onChange:f})})}}}function pi(e){const t=D("Gap",r(Se,{}),ne.min,ne.max,ne.step,An[e],"px",(n,o)=>r(lo,{inherited:!wn(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[Fn]:e,render:n=>t.render({...n,value:Pn(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}const z="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(z),icon:r(gt,{}),changed:i,action:ae(e.mark,{changed:i,onReset:()=>n(null)}),hint:e.hint,children:r(Io,{tier:e,px:o,onRadius:n})})}}}function Co(e){let t=null;try{t=qe()}catch{t=null}return[t?.values?.[e],n=>t?.onChange(e,n)]}function Io({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),i=e.useClosedReason?e.useClosedReason():null,[a,c]=Co(e.sidesKey),s=Ee(a)??[...ye];return r(tn,{className:"sf-corners",label:l(z),value:s,corners:Ut,onChange:u=>{const p=Ee(u)??[];c(p.length===ye.length?null:p)},radius:t,onRadiusChange:n,radiusMin:A,radiusMax:me,radiusStep:e.step??1,radiusPlaceholder:String(o),disabled:i!==null,disabledReason:i??void 0})}function Xe(){return Le({type:"custom",render:()=>r(rn,{})},"always")}function _o({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"):w(i,l("Site styles")),onReset:n})}function yo(){const{cornerRadiusPx:e}=X();return typeof e=="number"?e:A}function Eo(){return oe({sidesKey:"sectionCornerSides",useFollowed:yo,useClosedReason:()=>ze()?l($e):null,mark:r(_o,{label:z}),hint:r(To,{})})}const $e="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function ze(){return Be(V())}function To(){return r(B,{children:ze()?$e:"Follows Site styles ▸ Basics ▸ Corners until you set a number here."})}function fi(){return G({_gShape:C("Shape"),sectionCorners:Eo(),sectionCornerSides:Xe()})}function mi(){return{_gMotion:C("Motion"),sectionAnimation:le("Entrance",r(be,{}),[...zt],$t)}}function re(){let e=null;try{const{appState:t,selectedItem:n}=v(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&&Be(e)}function Ve(e){const{cornerRadiusPx:t}=X(),n=re(),o=typeof t=="number"?t:e;let i=null;try{const{appState:c,selectedItem:s}=v(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 Ro({label:e,changed:t=!1,onReset:n=()=>{}}){const o=re(),i=Ve(A),a=o?"Site":"Section";return r(S,{words:x()?.panel,label:l(e),changed:t,detail:w(`${i}px`,o?l("Site styles"):l("the section")),onReset:n})}function No(){return r(B,{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 Oo(){return oe({sidesKey:"cardCornerSides",useFollowed:()=>Ve(A),mark:r(Ro,{label:z}),hint:r(No,{})})}function Lo(){return{type:"custom",render:()=>r(Qe,{})}}function hi(){return{_gShape:C("Shape"),cardCorners:Oo(),cardCornerSides:Xe(),cardCornersApplyAll:Lo()}}function gi(){return O("Justify",r(dt,{}),we,we[0].value)}function bi(){return O("Item alignment",r(ut,{}),Rn,"stretch")}function xi(){return O(vn,r(Wt,{}),De,De[0].value)}function Si(){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(K,{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:vo(o.weights).map((i,a)=>r("i",{style:{gridColumn:`span ${i}`}},a))})})},o.value))})})}}}function vo(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 Ci(){return O(Nn,r(Se,{}),Fe,Fe[0].value)}function Ii(){return D(On,r(Ft,{}),Pe,Ln,1,Pe)}function _i(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),Ae(e,void 0));return{type:"custom",render:n=>t.render({...n,value:Ae(e,n.value),onChange:o=>n.onChange(o)})}}function yi(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(S,{words:x()?.panel,label:l(e),changed:!Jn(c),detail:l("the Text style in Site styles"),onReset:()=>s(jn),defaultAction:{onPress:()=>s(Yn),title:l("Keep this section's own built-in size"),icon:r(ft,{})}}),children:M({min:t,max:n,step:o,value:typeof c=="number"?c:i,suffix:"px",ariaLabel:e,onChange:s})})}}function Ei(){return{_gCellWidth:C("Cell width"),gridSpan:O("Positions",r(xe,{}),[{label:"Auto",value:""},...Array.from({length:ot},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function V(){let e=null;try{e=v(t=>t).selectedItem}catch{e=null}return e?.props??{}}function Ao({min:e,max:t,step:n,px:o,label:i,onChange:a,desktopKey:c,fallback:s}){const u=V()[c],p=ee(void 0,u,s);return r(B,{children:M({min:e,max:t,step:n,value:ee(o,u,s),readout:!1,ariaLabel:i,notch:p,onChange:a})})}function Fo({label:e,desktopKey:t,fallback:n,changed:o=!1,onReset:i=()=>{}}){const a=V()[t],c=ee(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 wo(e){return Ue(e.label,{min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:r(Fo,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>r(Ao,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Po={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"};function Ti(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,i=b=>o?b:Po[b],a=b=>D(i("Top"),r(At,{}),_.min,_.max,_.step,b,"px"),c=(b,W,E,j=_)=>N("mobile",wo({label:i(b),desktopKey:W,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,I=e.sidePhone??m,g=e.phone===!0,y=b=>g?N("desktop",b):b;return G({...o?{_gSpacing:C("Padding")}:{},[t]:y(a(s)),...g?{[U(t)]:c("Top",t,s)}:{},...e.only==="top"?{}:{[n]:y(D(i("Bottom"),r(Ot,{}),_.min,_.max,_.step,u,"px")),...g?{[U(n)]:c("Bottom",n,u)}:{}},...e.sides?{[p]:y(D(i("Left"),r(Lt,{}),d.min,d.max,d.step,m,"px")),...g?{[U(p)]:c("Left",p,I,d)}:{},[f]:y(D(i("Right"),r(vt,{}),d.min,d.max,d.step,m,"px")),...g?{[U(f)]:c("Right",f,I,d)}:{}}:{}})}const ko={contained:"Contained",page:"Page",full:"Full"},Y="Width";function Ri(e,t=qn,n=!0){const o=t.map(i=>({label:Zn[i]??ko[i],value:i}));return G({...n?{_gWidth:C(Y)}:{},widthMode:{type:"custom",render:({onChange:i,field:a})=>r(h,{label:l(Y),icon:r(Mt,{}),action:n?r(ao,{inherited:a?.inherited??!1,onReset:()=>i(Qn),label:Y}):void 0,children:ie({options:o,value:a?.currentValue||e,onChange:i,ariaLabel:Y})})}})}function Ni(){const e=o=>({type:"custom",render:({value:i,onChange:a})=>T("div",{className:"sf-field",children:[o?T("div",{className:"sf-field-head",children:[r("span",{className:"sf-field-label sf-field-label--inline",children:H}),o(a)]}):null,r("div",{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:H})})]})}),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:M({min:s.min,max:s.max,step:s.step,value:typeof o=="number"?o:s.fallback,suffix:c,ariaLabel:H,onChange:i})})}}),n=()=>le("Unit",r(Ce,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return G({_gHeight:C(H),sectionHeightMode:N("desktop",e()),sectionHeightValue:N("desktop",t()),sectionHeightUnit:N("desktop",n()),sectionHeightModePhone:N("mobile",e(o=>r(Do,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:N("mobile",t()),sectionHeightUnitPhone:N("mobile",n())})}function Do({onClear:e}){const t=V(),n=Cn(t),o=In(t),i=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return r(S,{words:x()?.panel,label:l(H),changed:n,detail:i,onReset:e})}function Oi(){return{_gAnchor:C("Anchor"),anchor:mo("Anchor name","e.g. about",uo)}}function Li(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 L(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(Jt,{checked:s,onChange:i,ariaLabelledBy:u})})}}}function vi(){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 Ai(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 Fi(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 wi(e,t=Re,n="mediaImage"){return{type:"custom",render:({value:o,onChange:i})=>r("div",{className:"sf-focal-row",children:r(Ho,{label:e,value:o||t,onChange:i,imageProp:n})})}}function Ho({label:e,value:t,onChange:n,imageProp:o}){const{selectedItem:i}=v(c=>c),a=i?.props?.[o];return r(mn,{label:e,value:t,onChange:n,image:typeof a=="string"?a:void 0})}const Go=ge([]);function Pi(e,{stacking:t,fallback:n=at}){return{type:"custom",render:({value:o,onChange:i})=>{const a=lt.includes(o)?o:n;return t?r(Mo,{label:e,value:a,onChange:i}):je({label:e,value:a,onChange:i,points:Go})}}}function Mo({label:e,value:t,onChange:n}){const{appState:o,selectedItem:i}=v(s=>s),a=i?.props?.id?String(i.props.id):void 0,c=a?it(o?.data,a):[];return je({label:e,value:t,onChange:n,points:ge(c,a)})}function je({label:e,value:t,onChange:n,points:o}){const i=o.find(a=>a.disabled);return r(h,{label:l(e),icon:r(wt,{}),hint:i?.title?l(i.title):void 0,children:Ye({label:e,value:st(t),onChange:n,points:o})})}const ki={top:r(Ct,{}),right:r(St,{}),bottom:r(bt,{}),left:r(xt,{})};function Di(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(I=>I.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(I=>I.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 Wo="\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:$(t),children:r(qt,{value:f,ariaLabel:l(e),onChange:c,options:[...i?[{label:l(i),value:Wo,disabled:!0}]:[],...u.map(d=>({label:l(d.label),value:d.value}))]})})}}}function Bi(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 Hi(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 Gi(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(jt,{options:e.map(a=>({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 Mi=[{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:$(t),children:ie({options:i,value:i.some(u=>u.value===a)?a:a||s?.currentValue||o,onChange:c,ariaLabel:e})})}}function Wi(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 Ki={HeroSingle:["imageFocal"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Ui({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 T(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&&T("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 Ko(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Uo(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 Xi(e,t){return e===null?null:t>e?e:null}function Xo(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 $i={label:"Ticker items",icon:r(Nt,{})};function zi(e,t,n,o){return{type:"custom",[R]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},render:({value:i,onChange:a})=>r($o,{label:e,icon:$(t),items:Array.isArray(i)?i:[],placeholder:n,onChange:a,markup:o==="markup"})}}function $o({label:e,icon:t,items:n,placeholder:o,onChange:i,markup:a=!1}){const c=J(null),[s,u]=se(null),p=d=>d.map(m=>({text:m?.text??""})),f=d=>{const m=Xo(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:Ko(n,s),onChange:d=>i(Uo(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,I)=>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=>I({text:g.target.value}),onFocus:g=>{c.current=g.currentTarget,u(m)}})})}function Vi(e,t){const n=`${e.label} — row ${t+1}`;return k({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:i})=>r(P,{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 Yi(e){return{_gCards:C("Cards"),coverIndex:O("Cover image",r(Tt,{}),dn,String(pn),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:So("Image background",Dn),cardImage:zo(),spinOnHover:L("Rotate on hover",e?.spinDefault??!0,r(kt,{}))}}function ji(){return{outline:O("Card outline",r(Dt,{}),sn,un),indexBadge:O("Card number",r(Ce,{}),an,cn),showBadge:L("Product badge",!0,r(_e,{noun:"tag"}))}}function Ji(e){const t=e?.bottomDefault??!0;return{_gShowOnCard:C("Show on a card"),showCardPrice:L("Price",!0,r(It,{})),showCardFinishes:L("Finish swatches",!0,r(_t,{})),showCardSizes:L("Sizes",t,r(Pt,{})),showCardBuy:L("Buy button",t,r(mt,{})),showCardPage:L("Page button",t,r(Ie,{}))}}function zo(){return Ue("Card image",{min:A,max:me,step:et,hint:"Rounds the picture. The card's own corner is in Site styles."})}function qi(){return oe({sidesKey:"cornerSides",step:tt,useFollowed:()=>A,mark:r(Vo,{label:nt}),hint:l("Rounds the picture. Left alone it stays square.")})}function Vo({label:e,changed:t=!1,onReset:n=()=>{}}){return r(S,{words:x()?.panel,label:l(e),changed:t,onReset:n})}function Zi(){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||F[c].across===n),a=e&&e in F?F[e]:null;return T(B,{children:[r(h,{label:l("Photos in a row"),icon:r(ht,{}),children:T("div",{className:"sf-gallery-filter",children:[r("button",{type:"button","aria-pressed":n===null,onClick:()=>o(null),children:l("All")}),rt.map(c=>r("button",{type:"button","aria-pressed":n===c,onClick:()=>o(c),children:c},c))]})}),r(h,{label:l("Layout"),icon:r(yt,{}),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(K,{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,u],p)=>r("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${u}`}},p))})})},c))})})]})}export{uo as ANCHOR_HINT,Zr as BOUND_TO_POST_NOTE,ri as BUCKET_ICONS,Ki as CUSTOM_FIELD_MEDIA,Ui as CoordsField,ki as EDGE_ARROWS,Re as FOCAL_DEFAULT,Bo as FOCAL_POINTS,q as FOLD_FIELD_MARKER,Ye as FocalPicker,xo as GroupLabel,co as HIGHLIGHT_HINT,P as HidableTextField,de as LINK_FIELD_MARKER,Vr as Label,pe as MEDIA_FIELD_MARKER,Mi as MEDIA_TYPE_OPTIONS,bo as PanelNoteLine,je as PlacementGridView,fe as SCAFFOLD_FIELD_MARKER,nl as SCALAR_TEXT_CONTROLS,$e as SECTION_BLEEDS_HINT,ho as SectionHeading,ie as Segmented,lo as SiteGapDefaultReset,M as Slider,Ke as Swatches,tl as TEXT_CONTROL_KINDS,R as TEXT_FIELD_MARKER,$i as TICKER_ITEMS_ROW,$o as TextListField,ao as WidthDefaultReset,Xo as aimAfterListChange,Oi as anchorFields,w as backTo,ui as backgroundField,bi as boxAlignField,Ci as boxBlockSpacingField,gi as boxJustifyField,Ii as boxPhoneRowField,Si as boxShareField,xi as boxWrapField,ci as bucketHeader,Oo as cardCornersField,So as cardImageBackgroundField,zo as cardImageField,Yi as cardMediaFields,hi as cardShapeFields,Ji as cardShowFields,ji as cardStyleFields,Ei as cellWidthFields,Ai as checkbox,Fi as colorInput,ti as copyText,Xe as cornerSidesField,oe as cornersRowField,Li as dateTime,_i as directionField,Di as edgePad,ii as entriesHiddenForTab,wi as focalPicker,Xi as focusAfterRemove,Z as foldMetaOf,Zi as galleryLayoutField,pi as gapField,C as group,Ni as heightFields,ue as hidableText,fo as hintIsWhileTyping,$ as iconOf,qi as imageCornersField,si as isBucketHeader,oo as isNoGlyph,ni as linkField,Bi as multiSelect,no as noGlyph,vi as pageBackgroundField,li as panelNote,wo as phoneOverrideField,Pi as placementField,mo as plainText,oi as plainTextarea,Ue as pxField,ce as readHidable,Ko as rowText,Hi as searchSelect,ai as section,mi as sectionAnimationFields,Eo as sectionCornersField,fi as sectionShapeFields,di as sectionThemeFields,le as segmented,O as select,Uo as setRowText,yi as sizeField,D as slider,Gi as sourceField,Ti as spacingFields,Qr as text,Ze as textFieldIdentifier,Jr as textFieldOffPage,zi as textList,Vi as textListRowField,ei as textarea,L as toggle,Wi as upload,ro as usePageWidthDetail,io as useSiteGapDetail,Ri as widthField,qr as withIdentifier,jr 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 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,2 +1,2 @@
1
- export { BUCKET_KEY } from "efficient-easel/screen/lib/puck/field-buckets";
1
+ export { BUCKET_KEY, DESIGN_GROUP_KEY } from "efficient-easel/screen/lib/puck/field-buckets";
2
2
  export type { Bucket } from "efficient-easel/screen/lib/puck/field-buckets";
@@ -1 +1 @@
1
- import{BUCKET_KEY as E}from"efficient-easel/screen/lib/puck/field-buckets";export{E as BUCKET_KEY};
1
+ import{BUCKET_KEY as _,DESIGN_GROUP_KEY as o}from"efficient-easel/screen/lib/puck/field-buckets";export{_ as BUCKET_KEY,o as DESIGN_GROUP_KEY};
@@ -1,7 +1,20 @@
1
- import { BUCKET_KEY, type Bucket } from "./field-buckets.js";
2
- export declare const BUCKETS: readonly ["Content", "Style", "Layout", "Animation"];
1
+ import { DESIGN_GROUPS, type DesignGroup } from "efficient-easel/panel";
2
+ import { BUCKET_KEY, DESIGN_GROUP_KEY, type Bucket } from "./field-buckets.js";
3
+ export declare const BUCKETS: readonly ["Design", "Animation"];
3
4
  export type { Bucket };
4
- export { BUCKET_KEY };
5
+ export { DESIGN_GROUPS };
6
+ export type { DesignGroup };
7
+ export type Place = DesignGroup | "Animation";
8
+ export declare function bucketOfPlace(place: Place): Bucket;
9
+ export { BUCKET_KEY, DESIGN_GROUP_KEY };
10
+ export declare const EDITOR_ONLY_GROUP = "Editor only \u2014 not shown live";
11
+ export declare const LABEL_GROUP: Readonly<Record<string, Place>>;
12
+ export declare const KEY_GROUP: Readonly<Record<string, Place>>;
13
+ export declare const BLOCK_KEY_GROUP: Readonly<Record<string, Place>>;
14
+ export declare function placeOf(where: string, key: string, label: string): Place | undefined;
15
+ export declare function bucketOf(where: string, key: string, label: string): Bucket | undefined;
16
+ export declare function headerKeysOfPlace(place: Place): string[];
17
+ export declare function headerKeysOf(...builders: Record<string, unknown>[]): string[];
5
18
  export declare const LAYOUT_FIELD_KEYS: readonly string[];
6
19
  export declare const SECTION_THEME_FIELD_KEYS: readonly string[];
7
20
  export declare const SECTION_SHAPE_FIELD_KEYS: readonly string[];
@@ -10,14 +23,12 @@ export declare const CARD_MEDIA_FIELD_KEYS: readonly string[];
10
23
  export declare const BOUND_CARD_MEDIA_FIELD_KEYS: readonly string[];
11
24
  export declare const CARD_STYLE_FIELD_KEYS: readonly string[];
12
25
  export declare const CARD_SHOW_FIELD_KEYS: readonly string[];
13
- export declare const EDITOR_ONLY_GROUP = "Editor only \u2014 not shown live";
14
- export declare const LABEL_BUCKET: Record<string, Bucket>;
15
- export declare const KEY_BUCKET: Readonly<Record<string, Bucket>>;
16
- export declare function bucketOf(where: string, key: string, label: string): Bucket | undefined;
17
26
  export declare const RETIRED: Readonly<Record<string, string>>;
27
+ export declare const PLACE_WORDS: Readonly<Record<Place, readonly string[]>>;
28
+ export declare const INJECTED_RETIRED: Readonly<Record<string, string>>;
18
29
  export declare function foldTopTier(fields: Record<string, unknown>): 1 | 2;
19
30
  export declare function retiredHeadings(where: string): string[];
20
31
  export declare function assignSectionGroups<T extends Record<string, unknown>>(fields: T, where: string): T;
21
- export declare function seatContentBucket<T extends Record<string, unknown>>(fields: T): T;
32
+ export declare function seatDesignBucket<T extends Record<string, unknown>>(fields: T): T;
22
33
  export declare function hasBucketTabs(fields: Record<string, unknown>): boolean;
23
34
  export declare function reseatBucketTabs<T extends Record<string, unknown>>(fields: T): T;
@@ -1 +1 @@
1
- import{anchorFields as m,bucketHeader as p,cardMediaFields as B,cardShowFields as E,cardStyleFields as w,foldMetaOf as y,group as T,heightFields as O,sectionAnimationFields as F,sectionShapeFields as I,sectionThemeFields as x,spacingFields as A,widthField as H}from"./controls.js";import{deviceField as R,deviceMetaOf as D}from"./device-fields.js";import{SETTINGS_BUCKETS as $}from"efficient-easel/panel";import{BUCKET_KEY as i}from"./field-buckets.js";const s=$,V=[i.Layout,...Object.keys(A({phone:!0})),...Object.keys(H("full")),...Object.keys(O()),...Object.keys(m())],z=[i.Style,...Object.keys(x())],X=[i.Style,...Object.keys(I())],Z=[i.Animation,...Object.keys(F())],K=Object.keys(B()),M=new Set(["cardImage","imageBackground"]),ee=[i.Style,...K.filter(o=>o.startsWith("_g")||M.has(o))],te=Object.keys(w()),oe=Object.keys(E({bottomDefault:!0})),P="Editor only — not shown live",v={"Archive link":"Content",Article:"Content",Boxes:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Style",Gallery:"Style",Image:"Style","Image column":"Style",Images:"Style",Logo:"Style",Media:"Style","Background image":"Style",Color:"Style","Image tint":"Style",Style:"Style",Shape:"Style",Texture:"Style","Text style":"Style",Motion:"Animation",Animation:"Animation",Anchor:"Layout",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Layout",Behavior:"Layout",Controls:"Layout",Diagram:"Layout",[P]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Nudge:"Layout","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Layout",Height:"Layout"},_={"AlloyWheelsListing._gCards":"Style","ProductGrid._gCards":"Style"};function j(o,t,n){return _[`${o}.${t}`]??v[n]}const G={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","EmailFormBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","BrandStrip._gContent":"duplicated the Content bucket header above it (66338)","BrandStrip._gStyle":"duplicated the Style bucket header above it (66338)","BrandStrip._gLayout":"duplicated the Layout bucket header above it (66338)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"};function ne(o){const t=new Set(Object.values(i));for(const[n,d]of Object.entries(o))if(!t.has(n)&&y(d)?.level===1)return 1;return 2}function Y(o){const t=`${o}.`;return Object.keys(G).filter(n=>n.startsWith(t)).map(n=>n.slice(t.length))}function N(o,t){const n=D(o),d=T(t);return n?R(n.tier,d):d}function ae(o,t){const n=[],d=new Set(Y(t)),g=new Set;let h=null;for(const[e,r]of Object.entries(o)){const a=y(r);if(!a){h||n.push(h={bucket:"Content",entries:[]}),h.entries.push([e,r]);continue}if(d.has(e)){const l=v[a.label];if(a.level!==2||!l||a.label!==l)throw new Error(`${t}.${e}: RETIRED (lib/puck/field-groups.ts) lists this sub-heading as one whose name duplicates its bucket, but it is a level-${a.level} "${a.label}" header in the ${l??"(unclassified)"} bucket. Only a level-2 header whose label IS its bucket's name may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);g.add(e),n.push(h={bucket:l,entries:[]});continue}const c=j(t,e,a.label);if(!c)throw new Error(`${t}.${e}: the inspector group "${a.label}" is not classified in LABEL_BUCKET (lib/puck/field-groups.ts), so there is no way to say which of ${s.join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);const u=e===i[c]&&a.level===1;if(!u&&e===i[c])throw new Error(`${t}.${e}: that key is reserved for the ${c} bucket header, but this field is a level-${a.level} "${a.label}" header, so it cannot serve as one. Rename the section's own field.`);n.push(h={bucket:c,entries:[[e,u||a.level===2?r:N(r,a.label)]],isBucketHeader:u})}const f=new Set(Object.entries(o).filter(([,e])=>y(e)).map(([e])=>e)),k=Object.keys(_).filter(e=>e.startsWith(`${t}.`)).filter(e=>!f.has(e.slice(t.length+1)));if(k.length)throw new Error(`${t}: KEY_BUCKET (lib/puck/field-groups.ts) lists ${JSON.stringify(k)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`);const b=n.some(e=>e.isBucketHeader)?[]:[...d].filter(e=>!g.has(e));if(b.length)throw new Error(`${t}: RETIRED (lib/puck/field-groups.ts) lists ${JSON.stringify(b)}, but this section has no such fold header${b.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);for(const e of s){const r=i[e];if(r in o&&!n.some(a=>a.isBucketHeader&&a.entries[0]?.[0]===r))throw new Error(`${t}.${r} is reserved for the ${e} bucket header but is not a level-1 "${e}" fold header. Rename the section's own field.`)}const S=s.filter(e=>n.some(r=>r.bucket===e)),C={};for(const e of s){const r=n.filter(u=>u.bucket===e);if(!r.length)continue;const a=r.findIndex(u=>u.isBucketHeader);a>0&&r.unshift(...r.splice(a,1));const c=p(e,e===S[0]?S:null);a<0&&(C[i[e]]=c);for(const u of r)for(const[l,L]of u.entries)C[l]=u.isBucketHeader&&l===i[e]?c:L}return C}function ie(o){return i.Content in o?o:{[i.Content]:p("Content",null),...o}}function re(o){return s.some(t=>i[t]in o)}function de(o){const t=s.filter(d=>i[d]in o);if(t.length===0)return o;const n={...o};for(const d of t)n[i[d]]=p(d,d===t[0]?t:null);return n}export{ee as BOUND_CARD_MEDIA_FIELD_KEYS,s as BUCKETS,i as BUCKET_KEY,K as CARD_MEDIA_FIELD_KEYS,oe as CARD_SHOW_FIELD_KEYS,te as CARD_STYLE_FIELD_KEYS,P as EDITOR_ONLY_GROUP,_ as KEY_BUCKET,v as LABEL_BUCKET,V as LAYOUT_FIELD_KEYS,G as RETIRED,Z as SECTION_ANIM_FIELD_KEYS,X as SECTION_SHAPE_FIELD_KEYS,z as SECTION_THEME_FIELD_KEYS,ae as assignSectionGroups,j as bucketOf,ne as foldTopTier,re as hasBucketTabs,de as reseatBucketTabs,Y as retiredHeadings,ie as seatContentBucket};
1
+ import{anchorFields as m,bucketHeader as L,cardMediaFields as N,cardShowFields as Y,cardStyleFields as U,designGroupHeader as x,foldMarker as W,foldMetaOf as h,group as z,quietMarker as q,heightFields as E,sectionAnimationFields as w,sectionShapeFields as O,sectionThemeFields as D,spacingFields as B,widthField as T}from"./controls.js";import{deviceField as J,deviceMetaOf as F}from"./device-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as Q}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"./field-buckets.js";const A=Q;function V(e){return e==="Animation"?"Animation":"Design"}const X="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Boxes:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Texture:"Design","Text style":"Design",Motion:"Animation",Animation:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Controls:"Layout",Diagram:"Layout",[X]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Nudge:"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Height:"Size"},P={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},$={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return $[a]??P[a]??I[o]}function se(e,t,o){const a=_(e,t,o);return a?V(a):void 0}function G(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=F(a),p=h(C?C.inner:a),u=p?I[p.label]:void 0;if(u)for(const g of G(u))t.includes(g)||t.push(g)}return t}const he=[...S(B({phone:!0}),T("full"),E(),m()),...Object.keys(B({phone:!0})),...Object.keys(T("full")),...Object.keys(E()),...Object.keys(m())],be=[...S(D()),...Object.keys(D())],Ce=[...S(O()),...Object.keys(O())],pe=[...S(w()),...Object.keys(w())],Z=Object.keys(N()),ee=new Set(["cardImage","imageBackground"]),ge=[...G(_("ProductGrid","_gCards","Cards")??"Design"),...Z.filter(e=>e.startsWith("_g")||ee.has(e))],ye=Object.keys(U()),ke=Object.keys(Y({bottomDefault:!0})),te={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","EmailFormBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","BrandStrip._gContent":"duplicated the Content bucket header above it (66338)","BrandStrip._gStyle":"duplicated the Style bucket header above it (66338)","BrandStrip._gLayout":"duplicated the Layout bucket header above it (66338)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},H={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},K={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...B({phone:!0}),...T("full"),...E(),...m(),...D(),...O(),...w()};for(const t of Object.keys(K)){const o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!H[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/puck/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const ne=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),oe=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function _e(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ae(e){const t=`${e}.`;return Object.keys(te).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function ie(e,t){const o=F(e),a=z(t);return o?J(o.tier,a):a}function re(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?W(t,o.label):q(t):t}function M(e){return e==="Design"?k:["Animation"]}function Se(e,t){const o=[],a=new Set(ae(t)),C=new Set;let p=!1,u=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(ne.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=oe.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(p=!0),o.push(u={place:c,entries:[],adopted:!0});continue}if(!i){u||o.push(u={place:"Content",entries:[]}),u.entries.push([n,r]);continue}if(a.has(n)||n in K){const s=_(t,n,i.label);if(i.level!==2||!s||!H[s].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/puck/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(u={place:s,entries:[]});continue}const l=_(t,n,i.label);if(!l)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/puck/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(u={place:l,entries:[[n,i.level===2?r:ie(r,i.label)]]})}const g=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",$],["KEY_GROUP",P]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!g.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/puck/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=p?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/puck/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>M(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of M(n)){if(!R.has(r))continue;const i=o.filter(l=>l.place===r),c=i.findIndex(l=>l.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=x(r));for(const l of i)for(const[s,j]of l.entries)y[s]=re(r,j)}}return y}function ve(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:x("Content"),...e}}function fe(e){return A.some(t=>d[t]in e)}function me(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{$ as BLOCK_KEY_GROUP,ge as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,Z as CARD_MEDIA_FIELD_KEYS,ke as CARD_SHOW_FIELD_KEYS,ye as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,X as EDITOR_ONLY_GROUP,K as INJECTED_RETIRED,P as KEY_GROUP,I as LABEL_GROUP,he as LAYOUT_FIELD_KEYS,H as PLACE_WORDS,te as RETIRED,pe as SECTION_ANIM_FIELD_KEYS,Ce as SECTION_SHAPE_FIELD_KEYS,be as SECTION_THEME_FIELD_KEYS,Se as assignSectionGroups,se as bucketOf,V as bucketOfPlace,_e as foldTopTier,fe as hasBucketTabs,S as headerKeysOf,G as headerKeysOfPlace,_ as placeOf,me as reseatBucketTabs,ae as retiredHeadings,ve as seatDesignBucket};
@@ -0,0 +1,14 @@
1
+ export interface BandRow {
2
+ shown: boolean;
3
+ labelled: boolean;
4
+ }
5
+ export interface DrawnBand {
6
+ key: string;
7
+ rows: readonly BandRow[];
8
+ }
9
+ export declare const TEXT_BAND_KEY = " text";
10
+ export declare const TEXT_BAND_TITLE = "Text";
11
+ export declare function bandIsDropped(band: DrawnBand): boolean;
12
+ export declare function droppedBands(bands: readonly DrawnBand[]): string[];
13
+ export declare function withoutBands<T extends Record<string, unknown>>(fields: T, keys: ReadonlySet<string>): T;
14
+ export declare function sameKeys(a: ReadonlySet<string>, b: ReadonlySet<string>): boolean;
@@ -0,0 +1 @@
1
+ const f=" text",u="Text";function s(t){const e=t.rows.filter(o=>o.shown);return e.length===1&&e[0].labelled}function i(t){return t.filter(s).map(e=>e.key)}function l(t,e){let o=null;for(const r of e){const n=t[r];!n||n.marker!==!0||typeof n.fold!="string"||(o??={...t},o[r]={...n,fold:!1})}return o??t}function p(t,e){if(t.size!==e.size)return!1;for(const o of t)if(!e.has(o))return!1;return!0}export{f as TEXT_BAND_KEY,u as TEXT_BAND_TITLE,s as bandIsDropped,i as droppedBands,p as sameKeys,l as withoutBands};
@@ -1 +1 @@
1
- import{foldMetaOf as g,isBucketHeader as d}from"./controls.js";import{deviceMetaOf as k}from"./device-fields.js";import{BUCKET_KEY as h,hasBucketTabs as M,reseatBucketTabs as x,seatContentBucket as B}from"./field-groups.js";import{isStructuralTextProp as O}from"./neutralization-contracts.js";import{noControlMetaOf as T}from"./panel-no-control-mark.js";import{fieldDrawsEntryRow as y}from"./text-parts.js";function b(e,o){const r=k(o),s=r?r.inner:o;if(g(s))return!1;if(s?.type==="slot")return!0;const n=T(s);return n==="always"?!1:n==="authored-copy"?O(e):!0}function v(e){const o=k(e),r=o?o.inner:e,s=g(r);return s?d(r)?0:s.level:null}function E(e,o,r){return r&&o===0&&e===h.Content}const S=new WeakMap,R=new WeakMap;function F(e,o="section"){const r=o==="page"?R:S,s=r.get(e);if(s)return s;const n=Object.entries(e).map(([t,a])=>({key:t,field:a,level:v(a),draws:b(t,a)||o==="page"&&v(a)===null&&y(t,a)})),l=o==="section"&&n.some(t=>y(t.key,t.field)),i=new Set;for(let t=0;t<n.length;t++){const a=n[t].level;if(a===null)continue;let m=0;for(let c=t+1;c<n.length;c++){const w=n[c].level;if(w!==null&&w<=a)break;n[c].draws&&(m+=1)}m===0&&!E(n[t].key,a,l)&&i.add(n[t].key)}const f=l&&M(e),C=f&&!(h.Content in e);if(!i.size&&!C)return r.set(e,e),e;const u={};for(const t of n)i.has(t.key)||(u[t.key]=t.field);const p=x(f?B(u):u);return r.set(e,p),p}export{b as drawsControlOnSectionScreen,F as dropEmptyHeadings};
1
+ import{foldMetaOf as w,isBucketHeader as E}from"./controls.js";import{deviceMetaOf as k}from"./device-fields.js";import{BUCKET_KEY as h,DESIGN_GROUP_KEY as M,hasBucketTabs as O,reseatBucketTabs as x,seatDesignBucket as B}from"./field-groups.js";import{isStructuralTextProp as C}from"./neutralization-contracts.js";import{noControlMetaOf as D}from"./panel-no-control-mark.js";import{fieldDrawsEntryRow as y}from"./text-parts.js";function S(e,n){const r=k(n),s=r?r.inner:n;if(w(s))return!1;if(s?.type==="slot")return!0;const o=D(s);return o==="always"?!1:o==="authored-copy"?C(e):!0}function d(e){const n=k(e),r=n?n.inner:e,s=w(r);return s?E(r)?0:s.level:null}function T(e,n,r){return r?n===0&&e===h.Design||n===1&&e===M.Content:!1}const b=new WeakMap,R=new WeakMap;function U(e,n="section"){const r=n==="page"?R:b,s=r.get(e);if(s)return s;const o=Object.entries(e).map(([t,a])=>({key:t,field:a,level:d(a),draws:S(t,a)||n==="page"&&d(a)===null&&y(t,a)})),f=n==="section"&&o.some(t=>y(t.key,t.field)),i=new Set;for(let t=0;t<o.length;t++){const a=o[t].level;if(a===null)continue;let m=0;for(let c=t+1;c<o.length;c++){const g=o[c].level;if(g!==null&&g<=a)break;o[c].draws&&(m+=1)}m===0&&!T(o[t].key,a,f)&&i.add(o[t].key)}const l=f&&O(e),v=l&&!(h.Design in e);if(!i.size&&!v)return r.set(e,e),e;const u={};for(const t of o)i.has(t.key)||(u[t.key]=t.field);const p=x(l?B(u):u);return r.set(e,p),p}export{S as drawsControlOnSectionScreen,U as dropEmptyHeadings};
@@ -1 +1 @@
1
- const i=new Set(["Reviews","Cards","FAQ","Prose","ProductHero","SpecTable","ProductGrid","ParagraphsA","KeyFeatures","Stats","StatsParagraph","Chart","Mockup","Testimonials","Logos","ContactRouting","ContactLocations","SubmitBuild","ReviewForm","Form","AppointmentBooking","OrderSummary","DeliveryOptions","PaymentBadges","CheckoutCTA","Collections","AlloyWheelsListing","CatalogFilterBar","FitmentFinder","GalleryB","BrandStrip","DocMasthead","DocBody","DocMetaCards","Masthead","FeaturedCover","LongRead","Series","Events","SectionHeader","Grid","Flex","Spacer","Divider","CustomHTML","Breadcrumb","CategoryBar","DocTabs","Hero","HeroSingle","IntroBleed","Manifesto","Timeline","TimelineTrack","Footprint","Banner","TitleWithButtons","Ticker","SubscribeBlogs","TyreSizes","TyreFitment","EuTyreLabel","SpecStrip","ProcessSteps","DetailRows","FitmentTable","CompatibleTyres","RelatedProducts","BundleOffer","Split","Gallery","Subscribe"]),a={name:"sectionGroups",applies:(e,o)=>o.isSection(e)&&(i.has(e)||o.isHostBlock(e)),panel(e,o,t){const r=t.assignSectionGroups;e?.fields&&(e.fields=r(e.fields,o))}},s=new Set(["HeroSlide","Heading","Text","ImageBlock","ButtonBlock","HeroGroup","GalleryItem","Footer","FooterLogo","FooterMenu","FooterGroup","FooterText","PostCard","LogoBlock","CollectionCard","Eyebrow","BookingBox","SubmitBox","FooterSocial","MenuBlock","SocialLogosBlock","EmailFormBlock","SearchBlock","CartBlock"]),n={name:"blockGroups",applies:e=>s.has(e),panel(e,o,t){const r=t.assignSectionGroups;e?.fields&&(e.fields=r(e.fields,o))}};export{n as blockGroups,a as sectionGroups};
1
+ const i=new Set(["Reviews","Cards","FAQ","Prose","ProductHero","SpecTable","ProductGrid","ParagraphsA","KeyFeatures","Stats","StatsParagraph","Chart","Mockup","Testimonials","Logos","ContactRouting","ContactLocations","SubmitBuild","ReviewForm","Form","AppointmentBooking","OrderSummary","DeliveryOptions","PaymentBadges","CheckoutCTA","Collections","AlloyWheelsListing","CatalogFilterBar","FitmentFinder","GalleryB","BrandStrip","DocMasthead","DocBody","DocMetaCards","Masthead","FeaturedCover","LongRead","Series","Events","SectionHeader","Grid","Flex","Spacer","Divider","CustomHTML","Breadcrumb","CategoryBar","DocTabs","Hero","HeroSingle","IntroBleed","Manifesto","Timeline","TimelineTrack","Footprint","Banner","TitleWithButtons","Ticker","SubscribeBlogs","TyreSizes","TyreFitment","EuTyreLabel","SpecStrip","ProcessSteps","DetailRows","FitmentTable","CompatibleTyres","RelatedProducts","BundleOffer","Split","Gallery","Subscribe","Countdown"]),a={name:"sectionGroups",applies:(e,o)=>o.isSection(e)&&(i.has(e)||o.isHostBlock(e)),panel(e,o,t){const r=t.assignSectionGroups;e?.fields&&(e.fields=r(e.fields,o))}},s=new Set(["HeroSlide","Heading","Text","ImageBlock","ButtonBlock","HeroGroup","GalleryItem","Footer","FooterLogo","FooterMenu","FooterGroup","FooterText","PostCard","LogoBlock","CollectionCard","Eyebrow","BookingBox","SubmitBox","FooterSocial","MenuBlock","SocialLogosBlock","EmailFormBlock","SearchBlock","CartBlock"]),n={name:"blockGroups",applies:e=>s.has(e),panel(e,o,t){const r=t.assignSectionGroups;e?.fields&&(e.fields=r(e.fields,o))}};export{n as blockGroups,a as sectionGroups};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-web-builder",
3
- "version": "10.0.0",
3
+ "version": "11.0.1",
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",
@@ -40,8 +40,8 @@
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@tabler/icons-react": "^3.46.0",
43
- "efficient-easel": "^4.0.0",
44
- "efficient-shell": "^7.21.0",
43
+ "efficient-easel": "^6.2.0",
44
+ "efficient-shell": "^7.22.1",
45
45
  "isomorphic-dompurify": "^3.18.0",
46
46
  "next": ">=16",
47
47
  "react": ">=19",
@@ -59,8 +59,8 @@
59
59
  "@types/node": "^20",
60
60
  "@types/react": "^19",
61
61
  "@types/react-dom": "^19",
62
- "efficient-easel": "^4.0.0",
63
- "efficient-shell": "^7.21.0",
62
+ "efficient-easel": "^6.2.0",
63
+ "efficient-shell": "^7.23.1",
64
64
  "esbuild": "^0.28.0",
65
65
  "happy-dom": "^20.14.5",
66
66
  "isomorphic-dompurify": "^3.18.0",