efficient-web-builder 31.0.0 → 32.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/dist/editor/components/PreviewChatContext.d.ts +1 -1
- package/dist/editor/components/SectionThumbnail.js +1 -1
- package/dist/editor/components/StandaloneSectionEditor.js +1 -1
- package/dist/editor/components/StorefrontLinkField.d.ts +1 -1
- package/dist/editor/components/WebsitePreviewButton.d.ts +1 -1
- package/dist/editor/components/storefront-editor.css +13 -0
- package/dist/editor/components/usePinnedChromeSeed.js +1 -1
- package/dist/editor/components/useSocialSettings.js +1 -1
- package/dist/editor/components/useStorefrontBlogPosts.d.ts +1 -1
- package/dist/editor/lib/editor-document-adapter.d.ts +1 -1
- package/dist/editor/lib/page-live-state.d.ts +1 -1
- package/dist/editor/lib/puck/add-palette.d.ts +0 -1
- package/dist/editor/lib/puck/add-palette.js +1 -1
- package/dist/editor/lib/puck/add-target.d.ts +0 -1
- package/dist/editor/lib/puck/blocks/general/HeroGroup/fields.js +1 -1
- package/dist/editor/lib/puck/controls.d.ts +14 -1
- package/dist/editor/lib/puck/controls.js +1 -1
- package/dist/editor/lib/puck/field-groups.js +1 -1
- package/dist/editor/lib/puck/footer-blocks.d.ts +0 -1
- package/dist/editor/lib/puck/footer-blocks.js +1 -1
- package/dist/editor/lib/site-live-state.d.ts +1 -1
- package/dist/editor/lib/theme-row-persist.js +1 -1
- package/dist/editor/lib/website-session.d.ts +1 -1
- package/dist/format/lib/content/section-width.js +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +0 -1
- package/dist/format/lib/editor-words-catalogue.js +1 -1
- package/dist/format/lib/puck/container-blocks.d.ts +1 -1
- package/dist/format/lib/puck/neutralization-contracts.js +1 -1
- package/dist/format/lib/puck/passes/settings-groups.js +1 -1
- package/dist/{editor → format}/lib/puck/pinned-seed-gate.d.ts +0 -1
- package/dist/format/lib/puck/pinned-seed-gate.js +1 -0
- package/dist/format/lib/puck/section-catalog.js +1 -1
- package/dist/{editor → format}/lib/web-backend.d.ts +1 -3
- package/dist/format/lib/web-backend.js +0 -0
- package/dist/render/lib/puck/passes/section-width.js +1 -1
- package/dist/render/lib/puck/slot-specs.d.ts +0 -1
- package/package.json +3 -3
- package/dist/editor/lib/puck/pinned-seed-gate.js +0 -1
- package/dist/editor/lib/web-backend.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as r,jsxs as k,Fragment as T}from"react/jsx-runtime";import{cloneElement as pe,useId as ft,useRef as ne,useState as z}from"react";import{useEasel as W,useSelectedFields as fe}from"efficient-easel/easel";import{say as l,editorEaselWords as x}from"../../../format/lib/editor-words.js";import{readHidable as he,hidableText as me}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as V,LINK_FIELD_MARKER as ge,MEDIA_FIELD_MARKER as be,SCAFFOLD_FIELD_MARKER as xe,TEXT_FIELD_MARKER as I,foldMetaOf as Y,textFieldIdentifier as ht}from"efficient-easel/draw";import mt from"../../components/ApplyCornersToSiblings.js";import gt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as bt,CORNER_RADIUS_MAX as Se,CORNER_RADIUS_MIN as v}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as xt,IMAGE_CORNERS_LABEL as St}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as yt}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Ct,GALLERY_LAYOUTS as U,GALLERY_LAYOUT_KEYS as ye}from"../../../format/lib/content/gallery-layout.js";import{anchorSiblingsOf as _t,HERO_GROUP_PLACEMENTS as It,HERO_GROUP_PLACEMENT_DEFAULT as Et,normalisePlacement as Tt,placementPoints as Ce}from"../../../format/lib/hero-group-placement.js";import Rt from"../../components/KeepHint.js";import{AdjustIcon as Ot,AlignLeftIcon as wt,EyeIcon as Pt,AlignSeparateIcon as kt,AnimationIcon as _e,BackgroundIcon as Lt,BorderAllIcon as Nt,BlockSectionIcon as At,CartIcon as vt,ColumnWidthsIcon as Ie,ColumnsIcon as Ft,CornerIcon as Dt,DirectionDownIcon as Bt,DirectionLeftIcon as Ht,DirectionRightIcon as Gt,DirectionUpIcon as Mt,DollarIcon as Kt,FinishIcon as Wt,GapIcon as Ee,GridIcon as Ut,GroundIcon as Xt,HashIcon as Te,HeightIcon as $t,ImageIcon as jt,ListIcon as zt,LocationIcon as oe,PaddingAllIcon as Vt,PaddingBottomIcon as Re,PaddingLeftIcon as Oe,PaddingRightIcon as we,PaddingTopIcon as Pe,PageIcon as ke,PhoneIcon as Yt,PlacementIcon as qt,ProductSizeIcon as Jt,StickyIcon as Zt,RotateIcon as Qt,SquareIcon as en,TypeIcon as tn,WidthIcon as nn,WrapIcon as on}from"efficient-easel/icons";import{FieldGlyph as Le}from"../../components/FieldGlyph.js";import{resolvePageBackground as rn}from"../../../format/lib/content/page-background.js";import{CORNER_SIDES as Ne,CORNER_SIDE_POINTS as ln,hasOwnSectionCorners as an,normalizeCornerSides as Ae}from"../../../format/lib/content/section-corners.js";import{SECTION_MOTION_NONE as sn,SECTION_MOTION_OPTIONS as cn}from"../../../format/lib/content/section-animation.js";import{enclosingSectionProps as ve}from"./enclosing-section.js";import{SettingsDefaultReset as S,SettingsField as h,SettingsGroupHead as dn,SettingsGroupSub as un,SettingsBorder as pn,SettingsSegmented as fn,SettingsSides as hn,SettingsSidesEach as Fe,sidesStartEach as mn,SettingsSwitch as De,borderSides as gn,borderStartEach as bn}from"efficient-easel/panel";import{FieldSelect as xn,ListField as Sn}from"efficient-easel/fields";import{DisplayChips as yn}from"efficient-shell/ui";import{desktopDisplayChanged as Cn,partShownOnDesktop as _n,partShownOnPhone as In,phoneDisplayChanged as En,withDesktopPart as Tn,withPhonePart as Rn}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as On,Checkbox as wn,CornersInput as Pn,DateTimePicker as kn,FOCAL_DEFAULT as Ln,PictureTiles as Be,Slider as Nn,Tooltip as He}from"efficient-shell/ui";import{ColourControl as Ge,InheritedColourRow as An}from"./ColourControl.js";import Me from"./MarkupToolbar.js";import{deviceField as g}from"efficient-easel/screen/lib/puck/device-fields";import{NO_CONTROL_FIELD as vn,NoControlMark as re,noControlField as q}from"efficient-easel/screen/lib/puck/panel-no-control-mark";import{OWN_BOX_FIELD as Fn}from"../../../format/lib/puck/own-box.js";import{PHONE_CLEAR as Dn,phoneKey as F,resolvePhoneValue as ie}from"../../../format/lib/puck/phone-override.js";import{SuppressibleText as Bn}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Hn,CARD_OUTLINE_OPTIONS as Gn,DEFAULT_CARD_INDEX_FORMAT as Mn,DEFAULT_CARD_OUTLINE as Kn}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Wn,DEFAULT_COVER_INDEX as Un}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Xn}from"efficient-easel/draw";import $n from"../../components/MediaUploadField.js";import jn from"../../components/MultiSelectField.js";import zn from"../../components/SectionThemePicker.js";import Vn from"../../components/SearchSelectField.js";import Yn from"../../components/StorefrontLinkField.js";import{UiIcon as Ke}from"efficient-easel/draw/client";import{SECTION_PADDING as E}from"../../../format/lib/content/section-padding.js";import{hasPhoneHeight as qn,resolveSectionMinHeight as Jn}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as J,SECTION_STICK_LABEL as le,hasPhoneStick as Zn,resolveSectionStick as Qn}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as eo,SECTION_MIN_HEIGHT_GROUP_LABEL as X,SECTION_SCREEN_PCT as to}from"../../../format/lib/content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as no,containerDirectionPoints as oo,resolveContainerDirection as We}from"../../../format/lib/content/container-direction.js";import{BOX_ALIGN_POINTS as ro,BOX_BLOCK_SPACING_LABEL as io,BOX_BLOCK_SPACING_POINTS as Ue,BOX_JUSTIFY_POINTS as Xe,BOX_PHONE_ROW_LABEL as lo,BOX_PHONE_ROW_MAX as ao,BOX_PHONE_ROW_MIN as $e,BOX_SHARE_LABEL as je,BOX_SHARE_POINTS as ae,BOX_WRAP_LABEL as so,BOX_WRAP_POINTS as ze}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as D}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as co}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as uo,normalizeTheme as po,siteButtonPaint as fo}from"../../../format/lib/theme.js";import{CONTAINER_GAP as se,CONTAINER_GAP_BUILT_IN as ho,GAP_FIELD_CONTAINER as mo,hasOwnContainerGap as go,resolveContainerGap as bo}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as xo,CARD_IMAGE_BG_OFF as So,CARD_IMAGE_BG_SWATCH_NAMES as yo,CARD_IMAGE_BG_SWATCHES as Co,isCardImageBackgroundInheriting as _o,cardImageBackgroundChoice as Io,THEME_CARD_IMAGE_BG as Eo}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as To,SECTION_BG_SWATCHES as Ro,SECTION_BG_SWATCH_NAMES as Oo,THEME_SECTION_BG as wo,isSectionBackgroundInheriting as Po}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as ko}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Lo,TYPE_SIZE_INHERIT as No,isTypeSizeInheriting as Ao}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as vo,WIDTH_CHOICE_LABEL as Fo,WIDTH_INHERIT as Do,resolveWidth as Bo,sectionRunsFullWidth as Ve}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as Ye}from"./panel-heading-scope.js";import{withStyleKind as Ho}from"efficient-easel/style-clipboard";function B(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!Y(n)&&Ho(n,`section:${t}`);return e}function Yi({children:e}){return r("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function qe(){return null}function Go(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return r(qe,{},e)}function Mo(e){return e.type===qe}function w(e){return Mo(e)?void 0:e}function L(e,t){return l("{value} from {from}",{value:e,from:t})}function Ko(){const{appState:e}=W(i=>i),t=e.data.root?.props??{},{mode:n,pageWidth:o}=Bo(t,"full");return n==="page"?L(`${o}px`,l("the page")):n==="contained"?L(l("Contained"),l("the page")):L(l("Full"),l("the page"))}function Wo(){const{blockGap:e}=D();return e===null?l("this container's own spacing"):L(`${e}px`,l("Site styles"))}function Uo({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:Wo(),onReset:t})}function Xo({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:Ko(),onReset:t})}function H({value:e,onChange:t,label:n,placeholder:o,hint:i,multiline:a,hideable:c=!0,markup:s=!0}){const{text:d,hidden:u}=he(e),f=ne(null),p=ne(null),m=O=>t(c?{text:O,hidden:u}:O),b=()=>t({text:d,hidden:!u}),C=c&&u,R=ft(),_=i?qo(i)?r("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(i)}):r(Rt,{children:l(i)}):void 0,j=u?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return r(h,{label:l(n),icon:r(tn,{}),htmlFor:R,className:C?"is-hidden":void 0,hint:_,action:c?r(He,{content:j,children:r("button",{type:"button",className:"sf-field-eye","aria-pressed":u,"aria-label":j,onClick:b,children:u?r(Ke,{name:"eye-off",size:14}):r(Ke,{name:"eye",size:14})})}):void 0,children:k("div",{className:"sf-copybox",children:[s&&r(Me,{target:a?p:f,value:d,onChange:m}),a?r("textarea",{id:R,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>m(O.target.value)}):r("input",{id:R,ref:f,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>m(O.target.value)})]})})}function qi(e,t){return{...e,[xe]:t}}function Ji(e){const t=e[I];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[I]:{...t,offPage:!0}}}function Zi(e){return!e||typeof e!="object"?!1:e[I]?.offPage===!0}const Je="sfPanelOnly";function Qi(e){if(!e[I])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Je]:!0}}function el(e){return!!e&&typeof e=="object"&&e[Je]===!0}function tl(e){const t=e[I];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[I]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as xa,SCALAR_TEXT_CONTROLS as Sa}from"efficient-easel/draw";function nl(e,t){if(!e[I])throw new Error("inOwnBox: the field holds no authored text");const{[vn]:o,...i}=e;return{...i,[Fn]:!0,render:t}}const $o=new Set(Xn),G=(e,t)=>{const n={...t,[I]:e};if(!$o.has(e.control))return n;const o=t.render;return{...q(n,"authored-copy"),render:i=>r(Bn,{name:i.name,children:o(i)})}},ol="Everything else on this block comes from the linked post. Unlink it to edit by hand.",jo={field:"source.slug",set:!0},rl={not:jo},zo="Select a word, then press the highlighter.",Vo="A short name so a link can jump straight to this section, like yoursite.com/page#about.",Yo=new Set([zo]),qo=e=>Yo.has(e);function il(e,t,n){return G({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n})})}function ll(e,t,n){return G({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0})})}function Jo(e,t,n){return G({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function al(e,t,n){return G({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1})})}function sl(e){return{type:"custom",[ge]:{label:e},render:({value:t,onChange:n})=>r(Yn,{value:me(t),onChange:n,label:e})}}function cl(e,t,n){return G({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const dl={Design:Ot,Animation:_e};function ul(e,t){return e.includes("Design")?t!=="Design":null}function Zo({label:e}){return r(dn,{title:l(e),level:Ye(1)})}function Qo({level:e,label:t}){return e===1?r(Zo,{label:t}):r(nr,{label:t})}function Ze(e,t){return{type:"custom",[V]:{label:e,level:t},render:()=>r(Qo,{level:t,label:e})}}function y(e){return Ze(e,2)}function pl(e){return{type:"custom",render:()=>r(er,{text:e})}}function er({text:e}){return r("p",{className:"sf-note",children:l(e)})}function fl(e){return Ze(e,1)}function hl(e){return Y(e)!==null&&e?.tabs!==void 0}const Qe=new Map;function ml(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Qe.get(n)??{type:"custom",tabs:t,[V]:{label:e,level:1},bucket:e,marker:!0,render:()=>r(T,{})};return Qe.set(n,o),o}function gl(e){return Y(e)!==null&&e?.designGroup!==void 0}const et=new Map;function bl(e){const t=et.get(e)??{type:"custom",[V]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>r(T,{})};return et.set(e,t),t}function tr(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function xl(e,t){return tr(e)===t?e:{...e,marker:!0,fold:t,render:()=>r(T,{})}}function Sl(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 nr({label:e}){return r(un,{title:l(e),level:Ye(2)})}function tt({swatches:e,current:t,onPick:n,names:o}){const i=e.find(s=>s.toLowerCase()===t.toLowerCase()),a=i?o?.[i]:void 0,c=a?l(a):t;return k("div",{className:"sf-swatches",children:[e.map(s=>{const d=o?.[s]?l(o[s]):s;return r(He,{content:d,children:r("button",{type:"button","aria-pressed":t.toLowerCase()===s.toLowerCase(),className:`sf-swatch ${t.toLowerCase()===s.toLowerCase()?"is-active":""}`,style:{background:s},onClick:()=>n(s),"aria-label":d})},s)}),r("span",{className:"sf-swatch-hex",children:c})]})}function yl(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=Po(n,t);return r(h,{label:l(e),icon:r(Lt,{}),changed:!i,action:r(S,{words:x()?.panel,label:l(e),changed:!i,detail:l("the theme's section background"),onReset:()=>o(To)}),children:tt({swatches:Ro,current:i?wo:n??t??"",onPick:o,names:Oo})})}}}function or(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=n,a=_o(i,t);return r(h,{label:l(e),icon:r(Xt,{}),changed:!a,action:r(S,{words:x()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(xo)}),children:tt({swatches:Co,current:a?Eo:Io(i,t),onPick:o,names:yo})})}}}function Cl(e=n=>n,t){return B({_gSectionTheme:y(ko),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>r(zn,{value:e(n),onChange:o,followLabel:t})}})}function M({min:e,max:t,step:n,value:o,onChange:i,suffix:a="",readout:c=!0,notch:s,ariaLabel:d,disabled:u=!1}){const f=s!==void 0&&Number.isFinite(s)&&s>=e&&s<=t;return r("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(s-e)/(t-e)}:void 0,children:r(Nn,{min:e,max:t,step:n,value:o,suffix:a||void 0,showInput:c,label:d===void 0?void 0:l(d),disabled:u,size:"sm",className:"sf-slider-track",onChange:p=>{p!==null&&p!==o&&i(p)}})})}function K(e,t,n,o,i,a,c="",s){return{type:"custom",render:d=>r(h,{label:l(e),icon:w(t),action:s?s("storedValue"in d?d.storedValue:d.value,d.onChange):void 0,children:M({min:n,max:o,step:i,value:typeof d.value=="number"?d.value:a,suffix:c,ariaLabel:e,onChange:d.onChange})})}}function nt(e,t){const{min:n,max:o,step:i=1,unsetLabel:a,hint:c,restTrack:s,unsetMark:d,icon:u}=t;return{type:"custom",render:({value:f,onChange:p})=>{const m=typeof f=="number"?f:null,b=m===null;return r(h,{label:l(e),icon:u?w(u):void 0,value:b?d||a===void 0?void 0:l(a):`${m}px`,changed:!b,action:d?pe(d,{changed:!b,onReset:()=>p(null)}):r(S,{words:x()?.panel,label:l(e),changed:!b,onReset:()=>p(null)}),hint:typeof c=="string"?l(c):c,children:s?s({min:n,max:o,step:i,px:m,label:e,onChange:p}):M({min:n,max:o,step:i,value:m??n,readout:!1,ariaLabel:e,onChange:p})})}}}function _l(e){const t=K("Gap",r(Ee,{}),se.min,se.max,se.step,ho[e],"px",(n,o)=>r(Uo,{inherited:!go(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[mo]:e,render:n=>t.render({...n,value:bo(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}const Z="Corners";function ce(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,i=o!==null;return r(h,{label:l(Z),icon:r(Dt,{}),changed:i,action:pe(e.mark,{changed:i,onReset:()=>n(null)}),hint:e.hint,children:r(rr,{tier:e,px:o,onRadius:n})})}}}function ot(e){let t=null;try{t=fe()}catch{t=null}return[t?.values?.[e],n=>t?.onChange(e,n)]}function rr({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),i=e.useClosedReason?e.useClosedReason():null,[a,c]=ot(e.sidesKey),s=Ae(a)??[...Ne];return r(Pn,{label:l(Z),value:s,corners:ln,onChange:d=>{const u=Ae(d)??[];c(u.length===Ne.length?null:u)},radius:t,onRadiusChange:n,radiusMin:v,radiusMax:Se,radiusStep:e.step??1,radiusPlaceholder:String(o),disabled:i!==null,disabledReason:i??void 0})}function rt(){return q({type:"custom",render:()=>r(re,{})},"always")}function ir({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=D(),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"):L(i,l("Site styles")),onReset:n})}function lr(){const{cornerRadiusPx:e}=D();return typeof e=="number"?e:v}function ar(){return ce({sidesKey:"sectionCornerSides",useFollowed:lr,useClosedReason:()=>lt()?l(it):null,mark:r(ir,{label:Z}),hint:r(sr,{})})}const it="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function lt(){return Ve(N())}function sr(){return r(T,{children:lt()?it:"Follows Site styles ▸ Basics ▸ Corners until you set a number here."})}function Il(){return B({_gShape:y("Shape"),sectionCorners:ar(),sectionCornerSides:rt(),sectionBorder:at("desktop"),sectionBorderPhone:at("mobile")})}const cr=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function dr(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function ur(){let e;try{const t=po(D().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||uo.line}function pr({value:e,onChange:t,tier:n}){const[o]=ot("sectionBorder"),i=ur(),a=e&&typeof e=="object"?e:{},c=n==="mobile"?o&&typeof o=="object"?o:{}:{},[s,d]=z(()=>bn(a,c)),u=cr();return r(h,{label:l("Border"),icon:r(Nt,{}),action:r(Fe,{each:s,label:l("Each side"),onChange:d}),children:r(pn,{label:l("Border"),value:a,each:s,onChange:f=>t(dr(f)),placeholder:{sides:gn(c),style:c.style??"solid",color:c.color||i},presets:[i],words:u,max:co})})}function at(e){return g(e,{type:"custom",render:({value:t,onChange:n})=>r(pr,{value:t,onChange:n,tier:e})})}function El(){return{_gMotion:y("Motion"),sectionAnimation:ue("Entrance",r(_e,{}),[...cn],sn)}}function de(){let e=null;try{const{appState:t,selectedItem:n}=W(i=>i),o=n?.props?.id?String(n.props.id):void 0;e=o?ve(t?.data,o):null}catch{e=null}return e!==null&&Ve(e)}function st(e){const{cornerRadiusPx:t}=D(),n=de(),o=typeof t=="number"?t:e;let i=null;try{const{appState:c,selectedItem:s}=W(u=>u),d=s?.props?.id?String(s.props.id):void 0;i=d?ve(c?.data,d):null}catch{i=null}if(n||!i)return o;const a=i.sectionCorners;return an(a)?a:o}function fr({label:e,changed:t=!1,onReset:n=()=>{}}){const o=de(),i=st(v),a=o?"Site":"Section";return r(S,{words:x()?.panel,label:l(e),changed:t,detail:L(`${i}px`,o?l("Site styles"):l("the section")),onReset:n})}function hr(){return r(T,{children:de()?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 mr(){return ce({sidesKey:"cardCornerSides",useFollowed:()=>st(v),mark:r(fr,{label:Z}),hint:r(hr,{})})}function gr(){return{type:"custom",render:()=>r(mt,{})}}function Tl(e){return{...e,render:t=>r(gt,{render:e.render,props:t})}}function Rl(){return{_gShape:y("Shape"),cardCorners:mr(),cardCornerSides:rt(),cardCornersApplyAll:gr()}}function Ol(){return P("Justify",r(kt,{}),Xe,Xe[0].value)}function wl(){return P("Item alignment",r(wt,{}),ro,"stretch")}function Pl(){return P(so,r(on,{}),ze,ze[0].value)}function kl(){return{type:"custom",render:({value:e,onChange:t})=>{const n=ae.find(o=>o.value===e)??ae[0];return r(h,{label:l(je),icon:r(Ie,{}),value:l(n.label),children:r(Be,{className:"sf-gallery-layouts",label:l(je),value:n.value,onChange:t,options:ae.map(o=>({value:o.value,label:l(o.label),picture:r("span",{className:"sf-gallery-pic",children:br(o.weights).map((i,a)=>r("i",{style:{gridColumn:`span ${i}`}},a))})}))})})}}}function br(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 Ll(){return P(io,r(Ee,{}),Ue,Ue[0].value)}function Nl(){return K(lo,r(Yt,{}),$e,ao,1,$e)}function Al(e){const t=ue(no,Go("`Direction` names how a container's children run — a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; editor-shell's own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),oo(e),We(e,void 0));return{type:"custom",render:n=>t.render({...n,value:We(e,n.value),onChange:o=>n.onChange(o)})}}function vl(e,t,n,o,i,a){return{type:"custom",render:({value:c,onChange:s})=>r(h,{label:l(e),icon:r(Le,{noun:a}),action:r(S,{words:x()?.panel,label:l(e),changed:!Ao(c),detail:l("the Text style in Site styles"),onReset:()=>s(No),defaultAction:{onPress:()=>s(Lo),title:l("Keep this section's own built-in size"),icon:r(At,{})}}),children:M({min:t,max:n,step:o,value:typeof c=="number"?c:i,suffix:"px",ariaLabel:e,onChange:s})})}}function Fl(){return{_gCellWidth:y("Cell width"),gridSpan:P("Positions",r(Ie,{}),[{label:"Auto",value:""},...Array.from({length:yt},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function N(){let e=null;try{e=W(t=>t).selectedItem}catch{e=null}return e?.props??{}}function xr({min:e,max:t,step:n,px:o,label:i,onChange:a,desktopKey:c,fallback:s}){const d=N()[c],u=ie(void 0,d,s);return r(T,{children:M({min:e,max:t,step:n,value:ie(o,d,s),readout:!1,ariaLabel:i,notch:u,onChange:a})})}function Sr({label:e,desktopKey:t,fallback:n,changed:o=!1,onReset:i=()=>{}}){const a=N()[t],c=ie(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 yr(e){return nt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:r(Sr,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>r(xr,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}function Dl(e){return{type:"custom",render:({value:t,onChange:n})=>r(_r,{...e,value:t,onChange:n})}}function Cr({label:e,icon:t,options:n,value:o,resolved:i,restWord:a,onChange:c}){const s=n.some(d=>d.value===o);return r(h,{label:l(e),icon:w(t),action:r(S,{words:x()?.panel,label:l(e),changed:s,detail:l("{value} on desktop",{value:l(a)}),onReset:()=>c(void 0)}),children:ee({options:n,value:s?o:i,onChange:d=>c(d),ariaLabel:e})})}function _r({label:e,icon:t,options:n,desktopKey:o,resolve:i,value:a,onChange:c}){const s=N()[o],d=i(void 0,s),u=n.find(f=>f.value===d)?.label??"";return r(Cr,{label:e,icon:t,options:n,value:a,resolved:d,restWord:u,onChange:c})}const Ir={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Er={Top:Pe,Bottom:Re,Left:Oe,Right:we},Tr=e=>{const t=Er[e];return r(t,{})};function Bl(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,i=_=>Ir[_],a=_=>K(i("Top"),r(Pe,{}),E.min,E.max,E.step,_,"px"),c=(_,j,O,te=E)=>g("mobile",yr({label:i(_),icon:Tr(_),desktopKey:j,min:te.min,max:te.max,step:te.step,fallback:O})),s=e.top??E.min,d=e.bottom??E.min,u="sectionPaddingLeft",f="sectionPaddingRight",p=e.sideBounds??E,m=e.side??p.min,b=e.sidePhone??m,C=e.phone===!0,R=_=>C?g("desktop",_):_;return B({...o?{_gSpacing:y("Padding")}:{},[t]:R(a(s)),...C?{[F(t)]:c("Top",t,s)}:{},...e.only==="top"?{}:{[n]:R(K(i("Bottom"),r(Re,{}),E.min,E.max,E.step,d,"px")),...C?{[F(n)]:c("Bottom",n,d)}:{}},...e.sides?{[u]:R(K(i("Left"),r(Oe,{}),p.min,p.max,p.step,m,"px")),...C?{[F(u)]:c("Left",u,b,p)}:{},[f]:R(K(i("Right"),r(we,{}),p.min,p.max,p.step,m,"px")),...C?{[F(f)]:c("Right",f,b,p)}:{}}:{}})}const $=["top","right","bottom","left"],Rr={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},ct=e=>typeof e=="number"?e:null;function Or(e,t,n){const o={};for(const i of $)n[i]!==t[i]&&(o[e[i]]=n[i]??void 0);return o}function wr({tier:e,o:t}){let n=null;try{n=fe()}catch{n=null}const o=n?.values??{},i=e==="mobile"?t.phoneKeys:t.keys,a=Object.fromEntries($.map(u=>[u,ct(o[i[u]])])),c=Object.fromEntries($.map(u=>[u,String(e==="mobile"?ct(o[t.keys[u]])??t.fallback[u]:t.fallback[u])])),[s,d]=z(()=>mn(a,c));return r(h,{label:l("Padding"),icon:r(Vt,{}),action:r(Fe,{each:s,label:l("Each side"),onChange:d}),children:r(hn,{label:l("Padding"),each:s,value:a,placeholder:c,min:t.min,max:t.max,step:t.step,onChange:u=>{const f=Or(i,a,u);Object.keys(f).length&&n?.onChangeMany(f)},words:{sides:{top:l("Padding top"),right:l("Padding right"),bottom:l("Padding bottom"),left:l("Padding left")},vertical:l("Top and bottom"),horizontal:l("Left and right"),unit:"px"}})})}function Hl(e={}){const t={...Rr,...e.keys},n={keys:t,phoneKeys:Object.fromEntries($.map(s=>[s,F(t[s])])),fallback:{top:0,right:0,bottom:0,left:0,...e.fallback},min:e.min??0,max:e.max??200,step:e.step??4},o=e.phone!==!1,i=s=>{const d={type:"custom",render:()=>r(wr,{tier:s,o:n})};return o?g(s,d):d},a=()=>q({type:"custom",render:()=>r(re,{})},"always"),c=$.filter(s=>s!=="top");return B({...e.group===!1?{}:{_gSpacing:y("Padding")},[n.keys.top]:i("desktop"),...o?{[n.phoneKeys.top]:i("mobile")}:{},...Object.fromEntries(c.map(s=>[n.keys[s],{...a(),reachedBy:n.keys.top}])),...o?Object.fromEntries(c.map(s=>[n.phoneKeys[s],g("mobile",a())])):{}})}const Pr={contained:"Contained",page:"Page",full:"Full"},Q="Width";function Gl(e,t=vo,n=!0){const o=t.map(i=>({label:Fo[i]??Pr[i],value:i}));return B({...n?{_gWidth:y(Q)}:{},widthMode:{type:"custom",render:({onChange:i,field:a})=>r(h,{label:l(Q),icon:r(nn,{}),action:n?r(Xo,{inherited:a?.inherited??!1,onReset:()=>i(Do),label:Q}):void 0,children:ee({options:o,value:a?.currentValue||e,onChange:i,ariaLabel:Q})})}})}function Ml(){const e=o=>({type:"custom",render:({value:i,onChange:a})=>r(h,{label:X,icon:w(r($t,{})),action:o?o(a):void 0,children:ee({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(i)?i:"auto",onChange:a,ariaLabel:X})})}),t=()=>({type:"custom",render:({value:o,onChange:i,field:a})=>{const c=a?.unit==="%"?"%":"px",s=c==="%"?to:eo;return r("div",{className:"sf-field",children:M({min:s.min,max:s.max,step:s.step,value:typeof o=="number"?o:s.fallback,suffix:c,ariaLabel:X,onChange:i})})}}),n=()=>ue("Unit",r(Te,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return B({_gHeight:y(X),sectionHeightMode:g("desktop",e()),sectionHeightValue:g("desktop",t()),sectionHeightUnit:g("desktop",n()),sectionHeightModePhone:g("mobile",e(o=>r(kr,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:g("mobile",t()),sectionHeightUnitPhone:g("mobile",n())})}function kr({onClear:e}){const t=N(),n=qn(t),o=Jn(t),i=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return r(S,{words:x()?.panel,label:l(X),changed:n,detail:i,onReset:e})}function Kl(){const e=n=>({type:"custom",render:({value:o,onChange:i,id:a,name:c})=>r(Lr,{value:o,onChange:i,labelId:`${a??c??"stickTop"}-label`,phone:n})}),t=()=>({type:"custom",render:({value:n,onChange:o})=>r("div",{className:"sf-field",children:M({min:J.min,max:J.max,step:J.step,value:typeof n=="number"?n:J.fallback,suffix:"px",ariaLabel:l("Distance from top"),onChange:o})})});return{_gStick:y(le),stickTop:g("desktop",e(!1)),stickTopDistance:g("desktop",t()),stickTopPhone:g("mobile",e(!0)),stickTopDistancePhone:g("mobile",t())}}function Lr({value:e,onChange:t,labelId:n,phone:o}){const i=N(),a=Qn(i),c=o?a.phone:e===!0;return r(h,{label:l(le),labelId:n,icon:w(r(Zt,{})),action:k(T,{children:[o?r(S,{words:x()?.panel,label:l(le),changed:Zn(i),detail:l("{value} on desktop",{value:a.desktop?`${a.desktopDistance}px`:l("Off")}),onReset:()=>t(void 0)}):null,r(De,{checked:c,onChange:t,ariaLabelledBy:n})]})})}function Wl(){return{_gAnchor:y("Anchor"),anchor:Jo("Anchor name","e.g. about",Vo)}}function Ul(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=`${a??c??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return r(h,{label:l(e),icon:t,htmlFor:s,hint:n===void 0?void 0:l(n),children:r(kn,{id:s,value:Number.isFinite(d)?new Date(d):null,onChange:u=>i(u?u.toISOString():"")})})}}}function A(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=typeof o=="boolean"?o:t,d=`${a??c??e}-label`;return r(h,{label:l(e),labelId:d,icon:n,action:r(De,{checked:s,onChange:i,ariaLabelledBy:d})})}}}function Xl(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const i=`${String(n??o??"pageBackground")}-colour`;return r(h,{label:l("Background"),icon:r(ke,{}),htmlFor:i,action:r(Ge,{id:i,label:"Background",value:rn(e),onChange:t})})}}}function $l(e,t){return{type:"custom",render:({value:n,onChange:o,id:i})=>{const a=typeof n=="boolean"?n:t,c=`${i??e}-checkbox`;return r(h,{label:l(e),htmlFor:c,className:"sf-checkbox",action:r(wn,{id:c,checked:a,onChange:o})})}}}const jl={follows:"fill"},zl={follows:"ink"};function Vl(e,t,n){if(typeof t!="string"){const o=t.follows;return{type:"custom",render:({value:i,onChange:a})=>r(Nr,{label:e,part:o,icon:n,value:i,onChange:a})}}return{type:"custom",render:({value:o,onChange:i})=>r(h,{label:l(e),icon:n,action:Ge({value:o||t,onChange:i,label:e})})}}function Nr({label:e,part:t,icon:n,value:o,onChange:i}){const a=fo(D().theme),c=t==="fill"?a.fill:a.ink;return r(An,{label:l(e),icon:n,value:o||"",inherited:c,resetTo:L(c.toUpperCase(),l("Site styles")),onChange:i,onReset:()=>i("")})}const Ar=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function dt({label:e,value:t,onChange:n,points:o=Ar}){const i=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return r(On,{label:l(e),value:t,points:i,onChange:n})}function Yl(){return q({type:"custom",render:()=>r(re,{})},"always")}const vr=Ce([]);function ql(e,{stacking:t,fallback:n=Et}){return{type:"custom",render:({value:o,onChange:i})=>{const a=It.includes(o)?o:n;return t?r(Fr,{label:e,value:a,onChange:i}):ut({label:e,value:a,onChange:i,points:vr})}}}function Fr({label:e,value:t,onChange:n}){const{appState:o,selectedItem:i}=W(s=>s),a=i?.props?.id?String(i.props.id):void 0,c=a?_t(o?.data,a):[];return ut({label:e,value:t,onChange:n,points:Ce(c,a)})}function ut({label:e,value:t,onChange:n,points:o}){const i=o.find(a=>a.disabled);return r(h,{label:l(e),icon:r(qt,{}),hint:i?.title?l(i.title):void 0,children:dt({label:e,value:Tt(t),onChange:n,points:o})})}const Jl={top:r(Mt,{}),right:r(Gt,{}),bottom:r(Bt,{}),left:r(Ht,{})};function Zl(e,t,n,o,i,a){const c=f=>t.find(p=>p.value===f),s=f=>({value:f,label:"",disabled:!0,title:o}),d=f=>{const p=t.find(b=>b.cell===f);if(!p)return s(`missing-${f}`);const m=a?.[f];return m?{value:p.value,label:p.label,icon:m}:{value:p.value,label:p.label}},u=[s("corner-top-left"),d("top"),s("corner-top-right"),d("left"),s("centre"),d("right"),s("corner-bottom-left"),d("bottom"),s("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:p})=>{const m=t.some(b=>b.value===f)?f:n;return r(h,{label:l(e),icon:i,value:c(m)?.label?l(c(m).label):"",children:dt({label:e,value:m,onChange:p,points:u})})}}}const Dr="\0note";function P(e,t,n,o,i){return{type:"custom",options:n,fallback:o,...i?{note:i}:{},render:({value:a,onChange:c,field:s})=>{const d=s.options??n,u=s.fallback??o,f=d.some(p=>p.value===a)?a:u;return r(h,{label:l(e),icon:w(t),children:r(xn,{value:f,ariaLabel:l(e),onChange:c,options:[...i?[{label:l(i),value:Dr,disabled:!0}]:[],...d.map(p=>({label:l(p.label),value:p.value}))]})})}}}function Ql(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:i,field:a})=>r(jn,{label:e,options:(a.options??t).map(c=>({...c,label:l(c.label)})),value:Array.isArray(o)?o:[],onChange:i,...n?{emptyLabel:l(n)}:{}})}}function ea(e,t,n,o){return{type:"custom",options:t,fallback:n,render:({value:i,onChange:a,field:c})=>r(Vn,{label:e,options:(c.options??t).map(s=>({...s,label:l(s.label)})),fallback:c.fallback??n,value:i,onChange:a,placeholder:o===void 0?void 0:l(o)})}}function ta(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const i={value:n,onChange:o,...t};return r(e,{...i})}}}function ee({options:e,value:t,onChange:n,ariaLabel:o,disabled:i=!1}){return r(fn,{options:e.map(a=>a.picture?{id:a.value,label:a.picture,title:l(a.title??a.label)}:{id:a.value,label:l(a.label),title:a.title===void 0?void 0:l(a.title)}),value:t,onChange:n,ariaLabel:l(o),disabled:i})}const na=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function ue(e,t,n,o){const i=n.map(a=>typeof a=="string"?{label:a,value:a}:a);return{type:"custom",render:({value:a,onChange:c,field:s})=>r(h,{label:l(e),icon:w(t),children:ee({options:i,value:i.some(d=>d.value===a)?a:a||s?.currentValue||o,onChange:c,ariaLabel:e})})}}function oa(e,t,n,o={}){return{type:"custom",[be]:!0,render:({value:i,onChange:a})=>r($n,{value:i||"",onChange:a,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen})}}const ra={HeroSingle:["imageFocal"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function ia({value:e,onChange:t,label:n}){const o=e||{},i=!!o.pending,a=i?"var(--fg-dim, #888)":o.ok?"#1d9e75":"#d85a30",c=(s,d)=>t({...o,[s]:d===""?void 0:Number(d)});return k(h,{label:l(n),icon:r(oe,{}),children:[r("button",{type:"button",disabled:i,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"8px 10px",fontSize:13,cursor:i?"default":"pointer",opacity:i?.6:1,border:"1px solid var(--border-strong, #ccc)",borderRadius:6,background:"transparent",color:"inherit"},children:i?l("Finding…"):l("Find coordinates")}),o.status&&r("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:a},children:l(o.status)}),r("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:l("Coordinates from OpenStreetMap")}),r("button",{type:"button",onClick:()=>t({...o,manual:!o.manual}),style:{marginTop:8,padding:0,border:"none",background:"none",font:"inherit",fontSize:12,color:"var(--sf-accent, #2563eb)",cursor:"pointer",textDecoration:"underline"},children:o.manual?l("Hide manual coordinates"):l("Enter coordinates manually")}),o.manual&&k("div",{style:{marginTop:8,display:"grid",gap:8},children:[r(h,{label:l("Latitude"),icon:r(oe,{}),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(oe,{}),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 Br(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Hr(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 la(e,t){return e===null?null:t>e?e:null}function Gr(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 aa={label:"Ticker items",icon:r(zt,{})};function sa(e,t,n,o){return{type:"custom",[I]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},render:({value:i,onChange:a})=>r(Mr,{label:e,icon:w(t),items:Array.isArray(i)?i:[],placeholder:n,onChange:a,markup:o==="markup"})}}function Mr({label:e,icon:t,items:n,placeholder:o,onChange:i,markup:a=!1}){const c=ne(null),[s,d]=z(null),u=p=>p.map(m=>({text:m?.text??""})),f=p=>{const m=Gr(n,p,s);m===null&&(c.current=null),d(m),i(u(p))};return r(Sn,{label:l(e),icon:t,noun:l("item"),items:n,onChange:f,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?r(Me,{target:c,value:Br(n,s),onChange:p=>i(Hr(n,s??-1,p)),disabled:s===null,label:s===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:s+1})}):void 0,renderRow:(p,m,b)=>r("input",{type:"text",className:a&&s===m?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:m+1}),onChange:C=>b({text:C.target.value}),onFocus:C=>{c.current=C.currentTarget,d(m)}})})}function ca(e,t){const n=`${e.label} — row ${t+1}`;return G({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function da(e){return{_gCards:y("Cards"),coverIndex:P("Cover image",r(jt,{}),Wn,String(Un),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:or("Image background",So),cardImage:Wr(),spinOnHover:A("Rotate on hover",e?.spinDefault??!0,r(Qt,{}))}}function ua(){return{outline:P("Card outline",r(en,{}),Gn,Kn),indexBadge:P("Card number",r(Te,{}),Hn,Mn),showBadge:A("Product badge",!0,r(Le,{noun:"tag"}))}}function pa(e){const t=e&&"bottomDefault"in e?e.bottomDefault:!0,n=e&&"defaults"in e?e.defaults:{showCardSizes:t,showCardBuy:t,showCardPage:t};return{_gShowOnCard:y("Show on a card"),showCardPrice:A("Price",!0,r(Kt,{})),showCardFinishes:A("Finish swatches",!0,r(Wt,{})),showCardSizes:A("Sizes",n.showCardSizes,r(Jt,{})),showCardBuy:A("Buy button",n.showCardBuy,r(vt,{})),showCardPage:A("Page button",n.showCardPage,r(ke,{}))}}function fa(e,t="display"){const n=F(t);return{[t]:g("desktop",{type:"custom",render:({value:o,onChange:i})=>r(pt,{parts:e,changed:Cn(o),shown:a=>_n(o,a),onPress:(a,c)=>i(Tn(o,a,c)),onReset:()=>i(void 0)})}),[n]:g("mobile",{type:"custom",render:({value:o,onChange:i})=>r(Kr,{parts:e,desktopKey:t,value:o,onChange:i})})}}function pt({parts:e,changed:t,shown:n,onPress:o,onReset:i,detail:a}){const c=l("Display");return r(h,{label:c,icon:r(Pt,{}),changed:t,action:r(S,{words:x()?.panel,label:c,changed:t,detail:a,onReset:i}),children:r(yn,{label:c,items:e.map(s=>({id:s.id,label:l(s.label),shown:n(s.id)})),onChange:o})})}function Kr({parts:e,desktopKey:t,value:n,onChange:o}){const i=N()[t];return r(pt,{parts:e,changed:En(n),shown:a=>In(i,n,a),onPress:(a,c)=>o(Rn(n,a,c)),onReset:()=>o(Dn),detail:l("the same as Desktop")})}function Wr(){return nt("Card image",{min:v,max:Se,step:bt,hint:"Rounds the picture. The card's own corner is in Site styles."})}function ha(){return ce({sidesKey:"cornerSides",step:xt,useFollowed:()=>v,mark:r(Ur,{label:St}),hint:l("Rounds the picture. Left alone it stays square.")})}function Ur({label:e,changed:t=!1,onReset:n=()=>{}}){return r(S,{words:x()?.panel,label:l(e),changed:t,onReset:n})}function ma(){return{type:"custom",render:({value:e,onChange:t})=>r(Xr,{value:typeof e=="string"?e:"",onChange:t})}}function Xr({value:e,onChange:t}){const[n,o]=z(null),i=ye.filter(c=>n===null||U[c].across===n),a=e&&e in U?U[e]:null;return k(T,{children:[r(h,{label:l("Photos in a row"),icon:r(Ft,{}),children:k("div",{className:"sf-gallery-filter",children:[r("button",{type:"button","aria-pressed":n===null,onClick:()=>o(null),children:l("All")}),Ct.map(c=>r("button",{type:"button","aria-pressed":n===c,onClick:()=>o(c),children:c},c))]})}),r(h,{label:l("Layout"),icon:r(Ut,{}),value:a?l(a.label):l("Not chosen"),hint:l("{n} of {total} layouts",{n:i.length,total:ye.length}),children:r(Be,{className:"sf-gallery-layouts",label:l("Layout"),value:e,onChange:t,onClear:()=>t(""),options:i.map(c=>({value:c,label:l(U[c].label),picture:r("span",{className:"sf-gallery-pic",children:U[c].desktop.map(([s,d],u)=>r("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${d}`}},u))})}))})})]})}export{Vo as ANCHOR_HINT,jo as BOUND_TO_POST,ol as BOUND_TO_POST_NOTE,dl as BUCKET_ICONS,ra as CUSTOM_FIELD_MEDIA,ia as CoordsField,Jl as EDGE_ARROWS,Ln as FOCAL_DEFAULT,Ar as FOCAL_POINTS,V as FOLD_FIELD_MARKER,jl as FOLLOWS_SITE_BUTTON,zl as FOLLOWS_SITE_BUTTON_INK,dt as FocalPicker,nr as GroupLabel,zo as HIGHLIGHT_HINT,H as HidableTextField,ge as LINK_FIELD_MARKER,Yi as Label,be as MEDIA_FIELD_MARKER,na as MEDIA_TYPE_OPTIONS,rl as NOT_BOUND_TO_POST,er as PanelNoteLine,_r as PhoneChoiceRow,Cr as PhoneChoiceStrip,ut as PlacementGridView,xe as SCAFFOLD_FIELD_MARKER,Sa as SCALAR_TEXT_CONTROLS,it as SECTION_BLEEDS_HINT,Rr as SIDE_PAD_KEYS,Zo as SectionHeading,ee as Segmented,Uo as SiteGapDefaultReset,M as Slider,tt as Swatches,xa as TEXT_CONTROL_KINDS,I as TEXT_FIELD_MARKER,aa as TICKER_ITEMS_ROW,Mr as TextListField,Xo as WidthDefaultReset,Gr as aimAfterListChange,Wl as anchorFields,L as backTo,yl as backgroundField,wl as boxAlignField,Ll as boxBlockSpacingField,Ol as boxJustifyField,Nl as boxPhoneRowField,kl as boxShareField,Pl as boxWrapField,ml as bucketHeader,mr as cardCornersField,or as cardImageBackgroundField,Wr as cardImageField,da as cardMediaFields,Rl as cardShapeFields,pa as cardShowFields,ua as cardStyleFields,Fl as cellWidthFields,$l as checkbox,Vl as colorInput,al as copyText,rt as cornerSidesField,ce as cornersRowField,Ul as dateTime,bl as designGroupHeader,Al as directionField,fa as displayFields,Zl as edgePad,ul as entriesHiddenForTab,la as focusAfterRemove,Yl as focusKeptField,xl as foldMarker,Y as foldMetaOf,tr as foldTitleOf,ma as galleryLayoutField,_l as gapField,y as group,Ml as heightFields,me as hidableText,qo as hintIsWhileTyping,w as iconOf,ha as imageCornersField,nl as inOwnBox,hl as isBucketHeader,gl as isDesignGroupHeader,Mo as isNoGlyph,sl as linkField,Ql as multiSelect,Go as noGlyph,Xl as pageBackgroundField,pl as panelNote,Dl as phoneChoiceField,yr as phoneOverrideField,ql as placementField,Jo as plainText,cl as plainTextarea,nt as pxField,Sl as quietMarker,he as readHidable,Br as rowText,ea as searchSelect,fl as section,El as sectionAnimationFields,at as sectionBorderField,ar as sectionCornersField,Il as sectionShapeFields,Cl as sectionThemeFields,ue as segmented,P as select,Hr as setRowText,B as sharedStyleKinds,Hl as sidesPaddingFields,Or as sidesPaddingPatch,vl as sizeField,K as slider,ta as sourceField,Bl as spacingFields,Kl as stickFields,Tl as templateField,il as text,ht as textFieldIdentifier,Zi as textFieldOffPage,el as textFieldPanelOnly,sa as textList,ca as textListRowField,ll as textarea,A as toggle,oa as upload,Ko as usePageWidthDetail,N as useSelectedProps,ot as useSelectedSibling,Wo as useSiteGapDetail,Gl as widthField,tl as withIdentifier,Ji as withOffPage,Qi as withPanelOnly,qi as withScaffold};
|
|
1
|
+
"use client";import{jsx as r,jsxs as w,Fragment as T}from"react/jsx-runtime";import{cloneElement as fe,useId as ht,useRef as oe,useState as V}from"react";import{useEasel as W,useSelectedFields as re}from"efficient-easel/easel";import{say as l,editorEaselWords as x}from"../../../format/lib/editor-words.js";import{readHidable as he,hidableText as me}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as Y,LINK_FIELD_MARKER as ge,MEDIA_FIELD_MARKER as be,SCAFFOLD_FIELD_MARKER as xe,TEXT_FIELD_MARKER as I,foldMetaOf as q,textFieldIdentifier as mt}from"efficient-easel/draw";import gt from"../../components/ApplyCornersToSiblings.js";import bt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as xt,CORNER_RADIUS_MAX as ye,CORNER_RADIUS_MIN as A}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as yt,IMAGE_CORNERS_LABEL as St}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as Ct}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as _t,GALLERY_LAYOUTS as U,GALLERY_LAYOUT_KEYS as Se}from"../../../format/lib/content/gallery-layout.js";import{anchorSiblingsOf as It,HERO_GROUP_PLACEMENTS as Et,HERO_GROUP_PLACEMENT_DEFAULT as Tt,normalisePlacement as Rt,placementPoints as Ce}from"../../../format/lib/hero-group-placement.js";import Ot from"../../components/KeepHint.js";import{AdjustIcon as wt,AlignLeftIcon as Pt,EyeIcon as kt,AlignSeparateIcon as Nt,AnimationIcon as _e,BackgroundIcon as Lt,BorderAllIcon as vt,BlockSectionIcon as At,CartIcon as Ft,ColumnWidthsIcon as Ie,ColumnsIcon as Dt,CornerIcon as Bt,DirectionDownIcon as Ht,DirectionLeftIcon as Gt,DirectionRightIcon as Mt,DirectionUpIcon as Kt,DollarIcon as Wt,FinishIcon as Ut,GapIcon as Ee,GridIcon as Xt,GroundIcon as $t,HashIcon as Te,HeightIcon as jt,ImageIcon as zt,ListIcon as Vt,LocationIcon as ie,NudgeIcon as Yt,PaddingAllIcon as qt,PaddingBottomIcon as Re,PaddingLeftIcon as Oe,PaddingRightIcon as we,PaddingTopIcon as Pe,PageIcon as ke,PhoneIcon as Jt,PlacementIcon as Zt,ProductSizeIcon as Qt,StickyIcon as en,RotateIcon as tn,SquareIcon as nn,TypeIcon as on,WidthIcon as rn,WrapIcon as ln}from"efficient-easel/icons";import{FieldGlyph as Ne}from"../../components/FieldGlyph.js";import{resolvePageBackground as an}from"../../../format/lib/content/page-background.js";import{CORNER_SIDES as Le,CORNER_SIDE_POINTS as sn,hasOwnSectionCorners as cn,normalizeCornerSides as ve}from"../../../format/lib/content/section-corners.js";import{SECTION_MOTION_NONE as dn,SECTION_MOTION_OPTIONS as un}from"../../../format/lib/content/section-animation.js";import{enclosingSectionProps as Ae}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsField as h,SettingsGroupHead as pn,SettingsGroupSub as fn,SettingsBorder as hn,SettingsSegmented as mn,SettingsSides as gn,SettingsSidesEach as Fe,sidesStartEach as bn,SettingsSwitch as De,borderSides as xn,borderStartEach as yn}from"efficient-easel/panel";import{FieldSelect as Sn,ListField as Cn}from"efficient-easel/fields";import{DisplayChips as _n}from"efficient-shell/ui";import{desktopDisplayChanged as In,partShownOnDesktop as En,partShownOnPhone as Tn,phoneDisplayChanged as Rn,withDesktopPart as On,withPhonePart as wn}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as Pn,Checkbox as kn,CornersInput as Nn,DateTimePicker as Ln,FOCAL_DEFAULT as vn,PictureTiles as Be,PositionInput as An,Slider as Fn,Tooltip as He}from"efficient-shell/ui";import{ColourControl as Ge,InheritedColourRow as Dn}from"./ColourControl.js";import Me from"./MarkupToolbar.js";import{deviceField as g}from"efficient-easel/screen/lib/puck/device-fields";import{NO_CONTROL_FIELD as Bn,NoControlMark as J,noControlField as X}from"efficient-easel/screen/lib/puck/panel-no-control-mark";import{OWN_BOX_FIELD as Hn}from"../../../format/lib/puck/own-box.js";import{PHONE_CLEAR as Gn,phoneKey as F,resolvePhoneValue as le}from"../../../format/lib/puck/phone-override.js";import{SuppressibleText as Mn}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Kn,CARD_OUTLINE_OPTIONS as Wn,DEFAULT_CARD_INDEX_FORMAT as Un,DEFAULT_CARD_OUTLINE as Xn}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as $n,DEFAULT_COVER_INDEX as jn}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as zn}from"efficient-easel/draw";import Vn from"../../components/MediaUploadField.js";import Yn from"../../components/MultiSelectField.js";import qn from"../../components/SectionThemePicker.js";import Jn from"../../components/SearchSelectField.js";import Zn from"../../components/StorefrontLinkField.js";import{UiIcon as Ke}from"efficient-easel/draw/client";import{SECTION_PADDING as E}from"../../../format/lib/content/section-padding.js";import{hasPhoneHeight as Qn,resolveSectionMinHeight as eo}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as Z,SECTION_STICK_LABEL as ae,hasPhoneStick as to,resolveSectionStick as no}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as oo,SECTION_MIN_HEIGHT_GROUP_LABEL as $,SECTION_SCREEN_PCT as ro}from"../../../format/lib/content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as io,containerDirectionPoints as lo,resolveContainerDirection as We}from"../../../format/lib/content/container-direction.js";import{BOX_ALIGN_POINTS as ao,BOX_BLOCK_SPACING_LABEL as so,BOX_BLOCK_SPACING_POINTS as Ue,BOX_JUSTIFY_POINTS as Xe,BOX_PHONE_ROW_LABEL as co,BOX_PHONE_ROW_MAX as uo,BOX_PHONE_ROW_MIN as $e,BOX_SHARE_LABEL as je,BOX_SHARE_POINTS as se,BOX_WRAP_LABEL as po,BOX_WRAP_POINTS as ze}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as D}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as fo}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as ho,normalizeTheme as mo,siteButtonPaint as go}from"../../../format/lib/theme.js";import{CONTAINER_GAP as ce,CONTAINER_GAP_BUILT_IN as bo,GAP_FIELD_CONTAINER as xo,hasOwnContainerGap as yo,resolveContainerGap as So}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as Co,CARD_IMAGE_BG_OFF as _o,CARD_IMAGE_BG_SWATCH_NAMES as Io,CARD_IMAGE_BG_SWATCHES as Eo,isCardImageBackgroundInheriting as To,cardImageBackgroundChoice as Ro,THEME_CARD_IMAGE_BG as Oo}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as wo,SECTION_BG_SWATCHES as Po,SECTION_BG_SWATCH_NAMES as ko,THEME_SECTION_BG as No,isSectionBackgroundInheriting as Lo}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as vo}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Ao,TYPE_SIZE_INHERIT as Fo,isTypeSizeInheriting as Do}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Bo,WIDTH_CHOICE_LABEL as Ho,WIDTH_INHERIT as Go,resolveWidth as Mo,sectionRunsFullWidth as Ve}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as Ye}from"./panel-heading-scope.js";import{withStyleKind as Ko}from"efficient-easel/style-clipboard";function B(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!q(n)&&Ko(n,`section:${t}`);return e}function el({children:e}){return r("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function qe(){return null}function Wo(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return r(qe,{},e)}function Uo(e){return e.type===qe}function P(e){return Uo(e)?void 0:e}function N(e,t){return l("{value} from {from}",{value:e,from:t})}function Xo(){const{appState:e}=W(i=>i),t=e.data.root?.props??{},{mode:n,pageWidth:o}=Mo(t,"full");return n==="page"?N(`${o}px`,l("the page")):n==="contained"?N(l("Contained"),l("the page")):N(l("Full"),l("the page"))}function $o(){const{blockGap:e}=D();return e===null?l("this container's own spacing"):N(`${e}px`,l("Site styles"))}function jo({inherited:e,onReset:t,label:n}){return r(y,{words:x()?.panel,label:l(n),changed:!e,detail:$o(),onReset:t})}function zo({inherited:e,onReset:t,label:n}){return r(y,{words:x()?.panel,label:l(n),changed:!e,detail:Xo(),onReset:t})}function H({value:e,onChange:t,label:n,placeholder:o,hint:i,multiline:a,hideable:c=!0,markup:s=!0}){const{text:d,hidden:u}=he(e),f=oe(null),p=oe(null),m=O=>t(c?{text:O,hidden:u}:O),b=()=>t({text:d,hidden:!u}),C=c&&u,R=ht(),_=i?Qo(i)?r("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(i)}):r(Ot,{children:l(i)}):void 0,z=u?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return r(h,{label:l(n),icon:r(on,{}),htmlFor:R,className:C?"is-hidden":void 0,hint:_,action:c?r(He,{content:z,children:r("button",{type:"button",className:"sf-field-eye","aria-pressed":u,"aria-label":z,onClick:b,children:u?r(Ke,{name:"eye-off",size:14}):r(Ke,{name:"eye",size:14})})}):void 0,children:w("div",{className:"sf-copybox",children:[s&&r(Me,{target:a?p:f,value:d,onChange:m}),a?r("textarea",{id:R,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>m(O.target.value)}):r("input",{id:R,ref:f,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>m(O.target.value)})]})})}function tl(e,t){return{...e,[xe]:t}}function nl(e){const t=e[I];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[I]:{...t,offPage:!0}}}function ol(e){return!e||typeof e!="object"?!1:e[I]?.offPage===!0}const Je="sfPanelOnly";function rl(e){if(!e[I])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Je]:!0}}function il(e){return!!e&&typeof e=="object"&&e[Je]===!0}function ll(e){const t=e[I];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[I]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as Ea,SCALAR_TEXT_CONTROLS as Ta}from"efficient-easel/draw";function al(e,t){if(!e[I])throw new Error("inOwnBox: the field holds no authored text");const{[Bn]:o,...i}=e;return{...i,[Hn]:!0,render:t}}const Vo=new Set(zn),G=(e,t)=>{const n={...t,[I]:e};if(!Vo.has(e.control))return n;const o=t.render;return{...X(n,"authored-copy"),render:i=>r(Mn,{name:i.name,children:o(i)})}},sl="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Yo={field:"source.slug",set:!0},cl={not:Yo},qo="Select a word, then press the highlighter.",Jo="A short name so a link can jump straight to this section, like yoursite.com/page#about.",Zo=new Set([qo]),Qo=e=>Zo.has(e);function dl(e,t,n){return G({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n})})}function ul(e,t,n){return G({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0})})}function er(e,t,n){return G({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function pl(e,t,n){return G({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1})})}function fl(e){return{type:"custom",[ge]:{label:e},render:({value:t,onChange:n})=>r(Zn,{value:me(t),onChange:n,label:e})}}function hl(e,t,n){return G({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const ml={Design:wt,Animation:_e};function gl(e,t){return e.includes("Design")?t!=="Design":null}function tr({label:e}){return r(pn,{title:l(e),level:Ye(1)})}function nr({level:e,label:t}){return e===1?r(tr,{label:t}):r(ir,{label:t})}function Ze(e,t){return{type:"custom",[Y]:{label:e,level:t},render:()=>r(nr,{level:t,label:e})}}function S(e){return Ze(e,2)}function bl(e){return{type:"custom",render:()=>r(or,{text:e})}}function or({text:e}){return r("p",{className:"sf-note",children:l(e)})}function xl(e){return Ze(e,1)}function yl(e){return q(e)!==null&&e?.tabs!==void 0}const Qe=new Map;function Sl(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Qe.get(n)??{type:"custom",tabs:t,[Y]:{label:e,level:1},bucket:e,marker:!0,render:()=>r(T,{})};return Qe.set(n,o),o}function Cl(e){return q(e)!==null&&e?.designGroup!==void 0}const et=new Map;function _l(e){const t=et.get(e)??{type:"custom",[Y]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>r(T,{})};return et.set(e,t),t}function rr(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Il(e,t){return rr(e)===t?e:{...e,marker:!0,fold:t,render:()=>r(T,{})}}function El(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 ir({label:e}){return r(fn,{title:l(e),level:Ye(2)})}function tt({swatches:e,current:t,onPick:n,names:o}){const i=e.find(s=>s.toLowerCase()===t.toLowerCase()),a=i?o?.[i]:void 0,c=a?l(a):t;return w("div",{className:"sf-swatches",children:[e.map(s=>{const d=o?.[s]?l(o[s]):s;return r(He,{content:d,children:r("button",{type:"button","aria-pressed":t.toLowerCase()===s.toLowerCase(),className:`sf-swatch ${t.toLowerCase()===s.toLowerCase()?"is-active":""}`,style:{background:s},onClick:()=>n(s),"aria-label":d})},s)}),r("span",{className:"sf-swatch-hex",children:c})]})}function Tl(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=Lo(n,t);return r(h,{label:l(e),icon:r(Lt,{}),changed:!i,action:r(y,{words:x()?.panel,label:l(e),changed:!i,detail:l("the theme's section background"),onReset:()=>o(wo)}),children:tt({swatches:Po,current:i?No:n??t??"",onPick:o,names:ko})})}}}function lr(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=n,a=To(i,t);return r(h,{label:l(e),icon:r($t,{}),changed:!a,action:r(y,{words:x()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(Co)}),children:tt({swatches:Eo,current:a?Oo:Ro(i,t),onPick:o,names:Io})})}}}function Rl(e=n=>n,t){return B({_gSectionTheme:S(vo),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>r(qn,{value:e(n),onChange:o,followLabel:t})}})}function M({min:e,max:t,step:n,value:o,onChange:i,suffix:a="",readout:c=!0,notch:s,ariaLabel:d,disabled:u=!1}){const f=s!==void 0&&Number.isFinite(s)&&s>=e&&s<=t;return r("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(s-e)/(t-e)}:void 0,children:r(Fn,{min:e,max:t,step:n,value:o,suffix:a||void 0,showInput:c,label:d===void 0?void 0:l(d),disabled:u,size:"sm",className:"sf-slider-track",onChange:p=>{p!==null&&p!==o&&i(p)}})})}function K(e,t,n,o,i,a,c="",s){return{type:"custom",render:d=>r(h,{label:l(e),icon:P(t),action:s?s("storedValue"in d?d.storedValue:d.value,d.onChange):void 0,children:M({min:n,max:o,step:i,value:typeof d.value=="number"?d.value:a,suffix:c,ariaLabel:e,onChange:d.onChange})})}}function nt(e,t){const{min:n,max:o,step:i=1,unsetLabel:a,hint:c,restTrack:s,unsetMark:d,icon:u}=t;return{type:"custom",render:({value:f,onChange:p})=>{const m=typeof f=="number"?f:null,b=m===null;return r(h,{label:l(e),icon:u?P(u):void 0,value:b?d||a===void 0?void 0:l(a):`${m}px`,changed:!b,action:d?fe(d,{changed:!b,onReset:()=>p(null)}):r(y,{words:x()?.panel,label:l(e),changed:!b,onReset:()=>p(null)}),hint:typeof c=="string"?l(c):c,children:s?s({min:n,max:o,step:i,px:m,label:e,onChange:p}):M({min:n,max:o,step:i,value:m??n,readout:!1,ariaLabel:e,onChange:p})})}}}function Ol(e){const t=K("Gap",r(Ee,{}),ce.min,ce.max,ce.step,bo[e],"px",(n,o)=>r(jo,{inherited:!yo(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[xo]:e,render:n=>t.render({...n,value:So(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}const Q="Corners";function de(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(Q),icon:r(Bt,{}),changed:i,action:fe(e.mark,{changed:i,onReset:()=>n(null)}),hint:e.hint,children:r(ar,{tier:e,px:o,onRadius:n})})}}}function ot(e){let t=null;try{t=re()}catch{t=null}return[t?.values?.[e],n=>t?.onChange(e,n)]}function ar({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),i=e.useClosedReason?e.useClosedReason():null,[a,c]=ot(e.sidesKey),s=ve(a)??[...Le];return r(Nn,{label:l(Q),value:s,corners:sn,onChange:d=>{const u=ve(d)??[];c(u.length===Le.length?null:u)},radius:t,onRadiusChange:n,radiusMin:A,radiusMax:ye,radiusStep:e.step??1,radiusPlaceholder:String(o),disabled:i!==null,disabledReason:i??void 0})}function rt(){return X({type:"custom",render:()=>r(J,{})},"always")}function sr({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=D(),i=typeof o=="number"?`${o}px`:l("not set");return r(y,{words:x()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):N(i,l("Site styles")),onReset:n})}function cr(){const{cornerRadiusPx:e}=D();return typeof e=="number"?e:A}function dr(){return de({sidesKey:"sectionCornerSides",useFollowed:cr,useClosedReason:()=>lt()?l(it):null,mark:r(sr,{label:Q}),hint:r(ur,{})})}const it="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function lt(){return Ve(L())}function ur(){return r(T,{children:lt()?it:"Follows Site styles ▸ Basics ▸ Corners until you set a number here."})}function wl(){return B({_gShape:S("Shape"),sectionCorners:dr(),sectionCornerSides:rt(),sectionBorder:at("desktop"),sectionBorderPhone:at("mobile")})}const pr=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function fr(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function hr(){let e;try{const t=mo(D().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||ho.line}function mr({value:e,onChange:t,tier:n}){const[o]=ot("sectionBorder"),i=hr(),a=e&&typeof e=="object"?e:{},c=n==="mobile"?o&&typeof o=="object"?o:{}:{},[s,d]=V(()=>yn(a,c)),u=pr();return r(h,{label:l("Border"),icon:r(vt,{}),action:r(Fe,{each:s,label:l("Each side"),onChange:d}),children:r(hn,{label:l("Border"),value:a,each:s,onChange:f=>t(fr(f)),placeholder:{sides:xn(c),style:c.style??"solid",color:c.color||i},presets:[i],words:u,max:fo})})}function at(e){return g(e,{type:"custom",render:({value:t,onChange:n})=>r(mr,{value:t,onChange:n,tier:e})})}function Pl(){return{_gMotion:S("Motion"),sectionAnimation:pe("Entrance",r(_e,{}),[...un],dn)}}function ue(){let e=null;try{const{appState:t,selectedItem:n}=W(i=>i),o=n?.props?.id?String(n.props.id):void 0;e=o?Ae(t?.data,o):null}catch{e=null}return e!==null&&Ve(e)}function st(e){const{cornerRadiusPx:t}=D(),n=ue(),o=typeof t=="number"?t:e;let i=null;try{const{appState:c,selectedItem:s}=W(u=>u),d=s?.props?.id?String(s.props.id):void 0;i=d?Ae(c?.data,d):null}catch{i=null}if(n||!i)return o;const a=i.sectionCorners;return cn(a)?a:o}function gr({label:e,changed:t=!1,onReset:n=()=>{}}){const o=ue(),i=st(A),a=o?"Site":"Section";return r(y,{words:x()?.panel,label:l(e),changed:t,detail:N(`${i}px`,o?l("Site styles"):l("the section")),onReset:n})}function br(){return r(T,{children:ue()?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 xr(){return de({sidesKey:"cardCornerSides",useFollowed:()=>st(A),mark:r(gr,{label:Q}),hint:r(br,{})})}function yr(){return{type:"custom",render:()=>r(gt,{})}}function kl(e){return{...e,render:t=>r(bt,{render:e.render,props:t})}}function Nl(){return{_gShape:S("Shape"),cardCorners:xr(),cardCornerSides:rt(),cardCornersApplyAll:yr()}}function Ll(){return k("Justify",r(Nt,{}),Xe,Xe[0].value)}function vl(){return k("Item alignment",r(Pt,{}),ao,"stretch")}function Al(){return k(po,r(ln,{}),ze,ze[0].value)}function Fl(){return{type:"custom",render:({value:e,onChange:t})=>{const n=se.find(o=>o.value===e)??se[0];return r(h,{label:l(je),icon:r(Ie,{}),value:l(n.label),children:r(Be,{className:"sf-gallery-layouts",label:l(je),value:n.value,onChange:t,options:se.map(o=>({value:o.value,label:l(o.label),picture:r("span",{className:"sf-gallery-pic",children:Sr(o.weights).map((i,a)=>r("i",{style:{gridColumn:`span ${i}`}},a))})}))})})}}}function Sr(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function Dl(){return k(so,r(Ee,{}),Ue,Ue[0].value)}function Bl(){return K(co,r(Jt,{}),$e,uo,1,$e)}function Hl(e){const t=pe(io,Wo("`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)."),lo(e),We(e,void 0));return{type:"custom",render:n=>t.render({...n,value:We(e,n.value),onChange:o=>n.onChange(o)})}}function Gl(e,t,n,o,i,a){return{type:"custom",render:({value:c,onChange:s})=>r(h,{label:l(e),icon:r(Ne,{noun:a}),action:r(y,{words:x()?.panel,label:l(e),changed:!Do(c),detail:l("the Text style in Site styles"),onReset:()=>s(Fo),defaultAction:{onPress:()=>s(Ao),title:l("Keep this section's own built-in size"),icon:r(At,{})}}),children:M({min:t,max:n,step:o,value:typeof c=="number"?c:i,suffix:"px",ariaLabel:e,onChange:s})})}}function Ml(){return{_gCellWidth:S("Cell width"),gridSpan:k("Positions",r(Ie,{}),[{label:"Auto",value:""},...Array.from({length:Ct},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function L(){let e=null;try{e=W(t=>t).selectedItem}catch{e=null}return e?.props??{}}function Cr({min:e,max:t,step:n,px:o,label:i,onChange:a,desktopKey:c,fallback:s}){const d=L()[c],u=le(void 0,d,s);return r(T,{children:M({min:e,max:t,step:n,value:le(o,d,s),readout:!1,ariaLabel:i,notch:u,onChange:a})})}function _r({label:e,desktopKey:t,fallback:n,changed:o=!1,onReset:i=()=>{}}){const a=L()[t],c=le(void 0,a,n);return r(y,{words:x()?.panel,label:l(e),changed:o,detail:l("{value} on desktop",{value:`${c}px`}),onReset:i})}function Ir(e){return nt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:r(_r,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>r(Cr,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}function Kl(e){return{type:"custom",render:({value:t,onChange:n})=>r(Tr,{...e,value:t,onChange:n})}}function Er({label:e,icon:t,options:n,value:o,resolved:i,restWord:a,onChange:c}){const s=n.some(d=>d.value===o);return r(h,{label:l(e),icon:P(t),action:r(y,{words:x()?.panel,label:l(e),changed:s,detail:l("{value} on desktop",{value:l(a)}),onReset:()=>c(void 0)}),children:te({options:n,value:s?o:i,onChange:d=>c(d),ariaLabel:e})})}function Tr({label:e,icon:t,options:n,desktopKey:o,resolve:i,value:a,onChange:c}){const s=L()[o],d=i(void 0,s),u=n.find(f=>f.value===d)?.label??"";return r(Er,{label:e,icon:t,options:n,value:a,resolved:d,restWord:u,onChange:c})}const Rr={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Or={Top:Pe,Bottom:Re,Left:Oe,Right:we},wr=e=>{const t=Or[e];return r(t,{})};function Wl(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,i=_=>Rr[_],a=_=>K(i("Top"),r(Pe,{}),E.min,E.max,E.step,_,"px"),c=(_,z,O,ne=E)=>g("mobile",Ir({label:i(_),icon:wr(_),desktopKey:z,min:ne.min,max:ne.max,step:ne.step,fallback:O})),s=e.top??E.min,d=e.bottom??E.min,u="sectionPaddingLeft",f="sectionPaddingRight",p=e.sideBounds??E,m=e.side??p.min,b=e.sidePhone??m,C=e.phone===!0,R=_=>C?g("desktop",_):_;return B({...o?{_gSpacing:S("Padding")}:{},[t]:R(a(s)),...C?{[F(t)]:c("Top",t,s)}:{},...e.only==="top"?{}:{[n]:R(K(i("Bottom"),r(Re,{}),E.min,E.max,E.step,d,"px")),...C?{[F(n)]:c("Bottom",n,d)}:{}},...e.sides?{[u]:R(K(i("Left"),r(Oe,{}),p.min,p.max,p.step,m,"px")),...C?{[F(u)]:c("Left",u,b,p)}:{},[f]:R(K(i("Right"),r(we,{}),p.min,p.max,p.step,m,"px")),...C?{[F(f)]:c("Right",f,b,p)}:{}}:{}})}const j=["top","right","bottom","left"],Pr={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},ct=e=>typeof e=="number"?e:null;function kr(e,t,n){const o={};for(const i of j)n[i]!==t[i]&&(o[e[i]]=n[i]??void 0);return o}function Nr({tier:e,o:t}){let n=null;try{n=re()}catch{n=null}const o=n?.values??{},i=e==="mobile"?t.phoneKeys:t.keys,a=Object.fromEntries(j.map(u=>[u,ct(o[i[u]])])),c=Object.fromEntries(j.map(u=>[u,String(e==="mobile"?ct(o[t.keys[u]])??t.fallback[u]:t.fallback[u])])),[s,d]=V(()=>bn(a,c));return r(h,{label:l("Padding"),icon:r(qt,{}),action:r(Fe,{each:s,label:l("Each side"),onChange:d}),children:r(gn,{label:l("Padding"),each:s,value:a,placeholder:c,min:t.min,max:t.max,step:t.step,onChange:u=>{const f=kr(i,a,u);Object.keys(f).length&&n?.onChangeMany(f)},words:{sides:{top:l("Padding top"),right:l("Padding right"),bottom:l("Padding bottom"),left:l("Padding left")},vertical:l("Top and bottom"),horizontal:l("Left and right"),unit:"px"}})})}function Ul(e={}){const t={...Pr,...e.keys},n={keys:t,phoneKeys:Object.fromEntries(j.map(s=>[s,F(t[s])])),fallback:{top:0,right:0,bottom:0,left:0,...e.fallback},min:e.min??0,max:e.max??200,step:e.step??4},o=e.phone!==!1,i=s=>{const d={type:"custom",render:()=>r(Nr,{tier:s,o:n})};return o?g(s,d):d},a=()=>X({type:"custom",render:()=>r(J,{})},"always"),c=j.filter(s=>s!=="top");return B({...e.group===!1?{}:{_gSpacing:S("Padding")},[n.keys.top]:i("desktop"),...o?{[n.phoneKeys.top]:i("mobile")}:{},...Object.fromEntries(c.map(s=>[n.keys[s],{...a(),reachedBy:n.keys.top}])),...o?Object.fromEntries(c.map(s=>[n.phoneKeys[s],g("mobile",a())])):{}})}const dt=e=>typeof e=="number"?e:null;function Lr(e,t,n){const o={};for(const i of["x","y"])n[i]!==t[i]&&(o[e[i]]=n[i]??void 0);return o}function vr({o:e}){let t=null;try{t=re()}catch{t=null}const n=t?.values??{},o={x:dt(n[e.keys.x]),y:dt(n[e.keys.y])},i=l(e.label??"Position"),a=!!(o.x||o.y),c=u=>{const f=Lr(e.keys,o,u);Object.keys(f).length&&t?.onChangeMany(f)},s=r(An,{label:i,value:o,onChange:c,words:{x:l("Left and right"),y:l("Up and down"),unit:"px"},placeholder:{x:"0",y:"0"},min:e.min,max:e.max,step:e.step??1}),d=r(y,{words:x()?.panel,label:i,changed:a,detail:"0 px, 0 px",onReset:()=>c({x:null,y:null})});return e.label===null?w("div",{className:"sf-position-line",children:[s,d]}):r(h,{label:i,icon:r(Yt,{}),changed:a,action:d,children:s})}function Xl(e){return{[e.keys.x]:{type:"custom",render:()=>r(vr,{o:e})},[e.keys.y]:{...X({type:"custom",render:()=>r(J,{})},"always"),reachedBy:e.keys.x}}}const Ar={contained:"Contained",page:"Page",full:"Full"},ee="Width";function $l(e,t=Bo,n=!0){const o=t.map(i=>({label:Ho[i]??Ar[i],value:i}));return B({...n?{_gWidth:S(ee)}:{},widthMode:{type:"custom",render:({onChange:i,field:a})=>r(h,{label:l(ee),icon:r(rn,{}),action:n?r(zo,{inherited:a?.inherited??!1,onReset:()=>i(Go),label:ee}):void 0,children:te({options:o,value:a?.currentValue||e,onChange:i,ariaLabel:ee})})}})}function jl(){const e=o=>({type:"custom",render:({value:i,onChange:a})=>r(h,{label:$,icon:P(r(jt,{})),action:o?o(a):void 0,children:te({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(i)?i:"auto",onChange:a,ariaLabel:$})})}),t=()=>({type:"custom",render:({value:o,onChange:i,field:a})=>{const c=a?.unit==="%"?"%":"px",s=c==="%"?ro:oo;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:$,onChange:i})})}}),n=()=>pe("Unit",r(Te,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return B({_gHeight:S($),sectionHeightMode:g("desktop",e()),sectionHeightValue:g("desktop",t()),sectionHeightUnit:g("desktop",n()),sectionHeightModePhone:g("mobile",e(o=>r(Fr,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:g("mobile",t()),sectionHeightUnitPhone:g("mobile",n())})}function Fr({onClear:e}){const t=L(),n=Qn(t),o=eo(t),i=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return r(y,{words:x()?.panel,label:l($),changed:n,detail:i,onReset:e})}function zl(){const e=n=>({type:"custom",render:({value:o,onChange:i,id:a,name:c})=>r(Dr,{value:o,onChange:i,labelId:`${a??c??"stickTop"}-label`,phone:n})}),t=()=>({type:"custom",render:({value:n,onChange:o})=>r("div",{className:"sf-field",children:M({min:Z.min,max:Z.max,step:Z.step,value:typeof n=="number"?n:Z.fallback,suffix:"px",ariaLabel:l("Distance from top"),onChange:o})})});return{_gStick:S(ae),stickTop:g("desktop",e(!1)),stickTopDistance:g("desktop",t()),stickTopPhone:g("mobile",e(!0)),stickTopDistancePhone:g("mobile",t())}}function Dr({value:e,onChange:t,labelId:n,phone:o}){const i=L(),a=no(i),c=o?a.phone:e===!0;return r(h,{label:l(ae),labelId:n,icon:P(r(en,{})),action:w(T,{children:[o?r(y,{words:x()?.panel,label:l(ae),changed:to(i),detail:l("{value} on desktop",{value:a.desktop?`${a.desktopDistance}px`:l("Off")}),onReset:()=>t(void 0)}):null,r(De,{checked:c,onChange:t,ariaLabelledBy:n})]})})}function Vl(){return{_gAnchor:S("Anchor"),anchor:er("Anchor name","e.g. about",Jo)}}function Yl(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=`${a??c??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return r(h,{label:l(e),icon:t,htmlFor:s,hint:n===void 0?void 0:l(n),children:r(Ln,{id:s,value:Number.isFinite(d)?new Date(d):null,onChange:u=>i(u?u.toISOString():"")})})}}}function v(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=typeof o=="boolean"?o:t,d=`${a??c??e}-label`;return r(h,{label:l(e),labelId:d,icon:n,action:r(De,{checked:s,onChange:i,ariaLabelledBy:d})})}}}function ql(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const i=`${String(n??o??"pageBackground")}-colour`;return r(h,{label:l("Background"),icon:r(ke,{}),htmlFor:i,action:r(Ge,{id:i,label:"Background",value:an(e),onChange:t})})}}}function Jl(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(kn,{id:c,checked:a,onChange:o})})}}}const Zl={follows:"fill"},Ql={follows:"ink"};function ea(e,t,n){if(typeof t!="string"){const o=t.follows;return{type:"custom",render:({value:i,onChange:a})=>r(Br,{label:e,part:o,icon:n,value:i,onChange:a})}}return{type:"custom",render:({value:o,onChange:i})=>r(h,{label:l(e),icon:n,action:Ge({value:o||t,onChange:i,label:e})})}}function Br({label:e,part:t,icon:n,value:o,onChange:i}){const a=go(D().theme),c=t==="fill"?a.fill:a.ink;return r(Dn,{label:l(e),icon:n,value:o||"",inherited:c,resetTo:N(c.toUpperCase(),l("Site styles")),onChange:i,onReset:()=>i("")})}const Hr=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function ut({label:e,value:t,onChange:n,points:o=Hr}){const i=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return r(Pn,{label:l(e),value:t,points:i,onChange:n})}function ta(){return X({type:"custom",render:()=>r(J,{})},"always")}const Gr=Ce([]);function na(e,{stacking:t,fallback:n=Tt}){return{type:"custom",render:({value:o,onChange:i})=>{const a=Et.includes(o)?o:n;return t?r(Mr,{label:e,value:a,onChange:i}):pt({label:e,value:a,onChange:i,points:Gr})}}}function Mr({label:e,value:t,onChange:n}){const{appState:o,selectedItem:i}=W(s=>s),a=i?.props?.id?String(i.props.id):void 0,c=a?It(o?.data,a):[];return pt({label:e,value:t,onChange:n,points:Ce(c,a)})}function pt({label:e,value:t,onChange:n,points:o}){const i=o.find(a=>a.disabled);return r(h,{label:l(e),icon:r(Zt,{}),hint:i?.title?l(i.title):void 0,children:ut({label:e,value:Rt(t),onChange:n,points:o})})}const oa={top:r(Kt,{}),right:r(Mt,{}),bottom:r(Ht,{}),left:r(Gt,{})};function ra(e,t,n,o,i,a){const c=f=>t.find(p=>p.value===f),s=f=>({value:f,label:"",disabled:!0,title:o}),d=f=>{const p=t.find(b=>b.cell===f);if(!p)return s(`missing-${f}`);const m=a?.[f];return m?{value:p.value,label:p.label,icon:m}:{value:p.value,label:p.label}},u=[s("corner-top-left"),d("top"),s("corner-top-right"),d("left"),s("centre"),d("right"),s("corner-bottom-left"),d("bottom"),s("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:p})=>{const m=t.some(b=>b.value===f)?f:n;return r(h,{label:l(e),icon:i,value:c(m)?.label?l(c(m).label):"",children:ut({label:e,value:m,onChange:p,points:u})})}}}const Kr="\0note";function k(e,t,n,o,i){return{type:"custom",options:n,fallback:o,...i?{note:i}:{},render:({value:a,onChange:c,field:s})=>{const d=s.options??n,u=s.fallback??o,f=d.some(p=>p.value===a)?a:u;return r(h,{label:l(e),icon:P(t),children:r(Sn,{value:f,ariaLabel:l(e),onChange:c,options:[...i?[{label:l(i),value:Kr,disabled:!0}]:[],...d.map(p=>({label:l(p.label),value:p.value}))]})})}}}function ia(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:i,field:a})=>r(Yn,{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 la(e,t,n,o){return{type:"custom",options:t,fallback:n,render:({value:i,onChange:a,field:c})=>r(Jn,{label:e,options:(c.options??t).map(s=>({...s,label:l(s.label)})),fallback:c.fallback??n,value:i,onChange:a,placeholder:o===void 0?void 0:l(o)})}}function aa(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const i={value:n,onChange:o,...t};return r(e,{...i})}}}function te({options:e,value:t,onChange:n,ariaLabel:o,disabled:i=!1}){return r(mn,{options:e.map(a=>a.picture?{id:a.value,label:a.picture,title:l(a.title??a.label)}:{id:a.value,label:l(a.label),title:a.title===void 0?void 0:l(a.title)}),value:t,onChange:n,ariaLabel:l(o),disabled:i})}const sa=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function pe(e,t,n,o){const i=n.map(a=>typeof a=="string"?{label:a,value:a}:a);return{type:"custom",render:({value:a,onChange:c,field:s})=>r(h,{label:l(e),icon:P(t),children:te({options:i,value:i.some(d=>d.value===a)?a:a||s?.currentValue||o,onChange:c,ariaLabel:e})})}}function ca(e,t,n,o={}){return{type:"custom",[be]:!0,render:({value:i,onChange:a})=>r(Vn,{value:i||"",onChange:a,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen})}}const da={HeroSingle:["imageFocal"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function ua({value:e,onChange:t,label:n}){const o=e||{},i=!!o.pending,a=i?"var(--fg-dim, #888)":o.ok?"#1d9e75":"#d85a30",c=(s,d)=>t({...o,[s]:d===""?void 0:Number(d)});return w(h,{label:l(n),icon:r(ie,{}),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&&w("div",{style:{marginTop:8,display:"grid",gap:8},children:[r(h,{label:l("Latitude"),icon:r(ie,{}),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(ie,{}),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 Wr(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Ur(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 pa(e,t){return e===null?null:t>e?e:null}function Xr(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 fa={label:"Ticker items",icon:r(Vt,{})};function ha(e,t,n,o){return{type:"custom",[I]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},render:({value:i,onChange:a})=>r($r,{label:e,icon:P(t),items:Array.isArray(i)?i:[],placeholder:n,onChange:a,markup:o==="markup"})}}function $r({label:e,icon:t,items:n,placeholder:o,onChange:i,markup:a=!1}){const c=oe(null),[s,d]=V(null),u=p=>p.map(m=>({text:m?.text??""})),f=p=>{const m=Xr(n,p,s);m===null&&(c.current=null),d(m),i(u(p))};return r(Cn,{label:l(e),icon:t,noun:l("item"),items:n,onChange:f,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?r(Me,{target:c,value:Wr(n,s),onChange:p=>i(Ur(n,s??-1,p)),disabled:s===null,label:s===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:s+1})}):void 0,renderRow:(p,m,b)=>r("input",{type:"text",className:a&&s===m?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:m+1}),onChange:C=>b({text:C.target.value}),onFocus:C=>{c.current=C.currentTarget,d(m)}})})}function ma(e,t){const n=`${e.label} — row ${t+1}`;return G({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function ga(e){return{_gCards:S("Cards"),coverIndex:k("Cover image",r(zt,{}),$n,String(jn),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:lr("Image background",_o),cardImage:zr(),spinOnHover:v("Rotate on hover",e?.spinDefault??!0,r(tn,{}))}}function ba(){return{outline:k("Card outline",r(nn,{}),Wn,Xn),indexBadge:k("Card number",r(Te,{}),Kn,Un),showBadge:v("Product badge",!0,r(Ne,{noun:"tag"}))}}function xa(e){const t=e&&"bottomDefault"in e?e.bottomDefault:!0,n=e&&"defaults"in e?e.defaults:{showCardSizes:t,showCardBuy:t,showCardPage:t};return{_gShowOnCard:S("Show on a card"),showCardPrice:v("Price",!0,r(Wt,{})),showCardFinishes:v("Finish swatches",!0,r(Ut,{})),showCardSizes:v("Sizes",n.showCardSizes,r(Qt,{})),showCardBuy:v("Buy button",n.showCardBuy,r(Ft,{})),showCardPage:v("Page button",n.showCardPage,r(ke,{}))}}function ya(e,t="display"){const n=F(t);return{[t]:g("desktop",{type:"custom",render:({value:o,onChange:i})=>r(ft,{parts:e,changed:In(o),shown:a=>En(o,a),onPress:(a,c)=>i(On(o,a,c)),onReset:()=>i(void 0)})}),[n]:g("mobile",{type:"custom",render:({value:o,onChange:i})=>r(jr,{parts:e,desktopKey:t,value:o,onChange:i})})}}function ft({parts:e,changed:t,shown:n,onPress:o,onReset:i,detail:a}){const c=l("Display");return r(h,{label:c,icon:r(kt,{}),changed:t,action:r(y,{words:x()?.panel,label:c,changed:t,detail:a,onReset:i}),children:r(_n,{label:c,items:e.map(s=>({id:s.id,label:l(s.label),shown:n(s.id)})),onChange:o})})}function jr({parts:e,desktopKey:t,value:n,onChange:o}){const i=L()[t];return r(ft,{parts:e,changed:Rn(n),shown:a=>Tn(i,n,a),onPress:(a,c)=>o(wn(n,a,c)),onReset:()=>o(Gn),detail:l("the same as Desktop")})}function zr(){return nt("Card image",{min:A,max:ye,step:xt,hint:"Rounds the picture. The card's own corner is in Site styles."})}function Sa(){return de({sidesKey:"cornerSides",step:yt,useFollowed:()=>A,mark:r(Vr,{label:St}),hint:l("Rounds the picture. Left alone it stays square.")})}function Vr({label:e,changed:t=!1,onReset:n=()=>{}}){return r(y,{words:x()?.panel,label:l(e),changed:t,onReset:n})}function Ca(){return{type:"custom",render:({value:e,onChange:t})=>r(Yr,{value:typeof e=="string"?e:"",onChange:t})}}function Yr({value:e,onChange:t}){const[n,o]=V(null),i=Se.filter(c=>n===null||U[c].across===n),a=e&&e in U?U[e]:null;return w(T,{children:[r(h,{label:l("Photos in a row"),icon:r(Dt,{}),children:w("div",{className:"sf-gallery-filter",children:[r("button",{type:"button","aria-pressed":n===null,onClick:()=>o(null),children:l("All")}),_t.map(c=>r("button",{type:"button","aria-pressed":n===c,onClick:()=>o(c),children:c},c))]})}),r(h,{label:l("Layout"),icon:r(Xt,{}),value:a?l(a.label):l("Not chosen"),hint:l("{n} of {total} layouts",{n:i.length,total:Se.length}),children:r(Be,{className:"sf-gallery-layouts",label:l("Layout"),value:e,onChange:t,onClear:()=>t(""),options:i.map(c=>({value:c,label:l(U[c].label),picture:r("span",{className:"sf-gallery-pic",children:U[c].desktop.map(([s,d],u)=>r("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${d}`}},u))})}))})})]})}export{Jo as ANCHOR_HINT,Yo as BOUND_TO_POST,sl as BOUND_TO_POST_NOTE,ml as BUCKET_ICONS,da as CUSTOM_FIELD_MEDIA,ua as CoordsField,oa as EDGE_ARROWS,vn as FOCAL_DEFAULT,Hr as FOCAL_POINTS,Y as FOLD_FIELD_MARKER,Zl as FOLLOWS_SITE_BUTTON,Ql as FOLLOWS_SITE_BUTTON_INK,ut as FocalPicker,ir as GroupLabel,qo as HIGHLIGHT_HINT,H as HidableTextField,ge as LINK_FIELD_MARKER,el as Label,be as MEDIA_FIELD_MARKER,sa as MEDIA_TYPE_OPTIONS,cl as NOT_BOUND_TO_POST,or as PanelNoteLine,Tr as PhoneChoiceRow,Er as PhoneChoiceStrip,pt as PlacementGridView,xe as SCAFFOLD_FIELD_MARKER,Ta as SCALAR_TEXT_CONTROLS,it as SECTION_BLEEDS_HINT,Pr as SIDE_PAD_KEYS,tr as SectionHeading,te as Segmented,jo as SiteGapDefaultReset,M as Slider,tt as Swatches,Ea as TEXT_CONTROL_KINDS,I as TEXT_FIELD_MARKER,fa as TICKER_ITEMS_ROW,$r as TextListField,zo as WidthDefaultReset,Xr as aimAfterListChange,Vl as anchorFields,N as backTo,Tl as backgroundField,vl as boxAlignField,Dl as boxBlockSpacingField,Ll as boxJustifyField,Bl as boxPhoneRowField,Fl as boxShareField,Al as boxWrapField,Sl as bucketHeader,xr as cardCornersField,lr as cardImageBackgroundField,zr as cardImageField,ga as cardMediaFields,Nl as cardShapeFields,xa as cardShowFields,ba as cardStyleFields,Ml as cellWidthFields,Jl as checkbox,ea as colorInput,pl as copyText,rt as cornerSidesField,de as cornersRowField,Yl as dateTime,_l as designGroupHeader,Hl as directionField,ya as displayFields,ra as edgePad,gl as entriesHiddenForTab,pa as focusAfterRemove,ta as focusKeptField,Il as foldMarker,q as foldMetaOf,rr as foldTitleOf,Ca as galleryLayoutField,Ol as gapField,S as group,jl as heightFields,me as hidableText,Qo as hintIsWhileTyping,P as iconOf,Sa as imageCornersField,al as inOwnBox,yl as isBucketHeader,Cl as isDesignGroupHeader,Uo as isNoGlyph,fl as linkField,ia as multiSelect,Wo as noGlyph,ql as pageBackgroundField,bl as panelNote,Kl as phoneChoiceField,Ir as phoneOverrideField,na as placementField,er as plainText,hl as plainTextarea,Xl as positionFields,Lr as positionPatch,nt as pxField,El as quietMarker,he as readHidable,Wr as rowText,la as searchSelect,xl as section,Pl as sectionAnimationFields,at as sectionBorderField,dr as sectionCornersField,wl as sectionShapeFields,Rl as sectionThemeFields,pe as segmented,k as select,Ur as setRowText,B as sharedStyleKinds,Ul as sidesPaddingFields,kr as sidesPaddingPatch,Gl as sizeField,K as slider,aa as sourceField,Wl as spacingFields,zl as stickFields,kl as templateField,dl as text,mt as textFieldIdentifier,ol as textFieldOffPage,il as textFieldPanelOnly,ha as textList,ma as textListRowField,ul as textarea,v as toggle,ca as upload,Xo as usePageWidthDetail,L as useSelectedProps,ot as useSelectedSibling,$o as useSiteGapDetail,$l as widthField,ll as withIdentifier,nl as withOffPage,rl as withPanelOnly,tl as withScaffold};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SECTION_WIDTH_FIELD_KEYS as Y}from"./section-width-fields.js";import{anchorFields as m,bucketHeader as L,cardMediaFields as U,cardShowFields as W,cardStyleFields as z,designGroupHeader as R,foldMarker as q,foldMetaOf as h,group as J,quietMarker as Q,heightFields as E,sectionAnimationFields as w,sectionShapeFields as O,sectionThemeFields as D,sidesPaddingFields as B,stickFields as x,widthField as T}from"./controls.js";import{deviceField as V,deviceMetaOf as P}from"efficient-easel/screen/lib/puck/device-fields";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as X}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/puck/field-buckets";const A=X;function Z(e){return e==="Animation"?"Animation":"Design"}const ee="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"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",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Texture:"Design","Text style":"Design",Motion:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Controls:"Layout",Diagram:"Layout",[ee]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Height:"Size"},H={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},$={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,n){const a=`${e}.${t}`;return $[a]??H[a]??I[n]}function Ce(e,t,n){const a=_(e,t,n);return a?Z(a):void 0}function G(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const n of e)for(const a of Object.values(n)){const C=P(a),p=h(C?C.inner:a),u=p?I[p.label]:void 0;if(u)for(const g of G(u))t.includes(g)||t.push(g)}return t}const pe=[...S(B(),T("full"),E(),m(),x()),...Object.keys(B()),...Object.keys(T("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x()),...Y],ge=[...S(D()),...Object.keys(D())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],te=Object.keys(U()),oe=new Set(["cardImage","imageBackground"]),_e=[...G(_("ProductGrid","_gCards","Cards")??"Design"),...te.filter(e=>e.startsWith("_g")||oe.has(e))],Se=Object.keys(z()),ve=Object.keys(W({bottomDefault:!0})),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","EmailFormBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","BrandStrip._gContent":"duplicated the Content bucket header above it (66338)","BrandStrip._gStyle":"duplicated the Style bucket header above it (66338)","BrandStrip._gLayout":"duplicated the Layout bucket header above it (66338)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...B(),...T("full"),...E(),...m(),...D(),...O(),...w()};for(const t of Object.keys(M)){const n=h(e[t]),a=n?I[n.label]:void 0;if(!n||n.level!==2||!a||!K[a].includes(n.label))throw new Error(`INJECTED_RETIRED (lib/puck/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const ae=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ie=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function fe(e){const t=new Set([...Object.values(d),b.Content]);for(const[n,a]of Object.entries(e))if(!t.has(n)&&h(a)?.level===1)return 1;return 2}function re(e){const t=`${e}.`;return Object.keys(ne).filter(n=>n.startsWith(t)).map(n=>n.slice(t.length))}function de(e,t){const n=P(e),a=J(t);return n?V(n.tier,a):a}function ce(e,t){const n=h(t);return n?e==="Content"||e==="Animation"?q(t,n.label):Q(t):t}function j(e){return e==="Design"?k:["Animation"]}function me(e,t){const n=[],a=new Set(re(t)),C=new Set;let p=!1,u=null;for(const[o,r]of Object.entries(e)){const i=h(r);if(ae.has(o))throw new Error(`${t}.${o}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ie.get(o);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${o}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(o===d.Design||o===d.Animation)&&(p=!0),n.push(u={place:c,entries:[],adopted:!0});continue}if(!i){u||n.push(u={place:"Content",entries:[]}),u.entries.push([o,r]);continue}if(a.has(o)||o in M){const s=_(t,o,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${o}: ${a.has(o)?"RETIRED":"INJECTED_RETIRED"} (lib/puck/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(o)&&C.add(o),n.push(u={place:s,entries:[]});continue}const l=_(t,o,i.label);if(!l)throw new Error(`${t}.${o}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/puck/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);n.push(u={place:l,entries:[[o,i.level===2?r:de(r,i.label)]]})}const g=new Set(Object.entries(e).filter(([,o])=>h(o)).map(([o])=>o));for(const[o,r]of[["BLOCK_KEY_GROUP",$],["KEY_GROUP",H]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!g.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${o} (lib/puck/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=p?[]:[...a].filter(o=>!C.has(o));if(v.length)throw new Error(`${t}: RETIRED (lib/puck/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const F=new Set(n.filter(o=>o.entries.length>0).map(o=>o.place)),f=A.filter(o=>j(o).some(r=>F.has(r))),y={};for(const o of f){y[d[o]]=L(o,o===f[0]?f:null);for(const r of j(o)){if(!F.has(r))continue;const i=n.filter(l=>l.place===r),c=i.findIndex(l=>l.adopted);c>0&&i.unshift(...i.splice(c,1)),o==="Design"&&(y[b[r]]=R(r));for(const l of i)for(const[s,N]of l.entries)y[s]=ce(r,N)}}return y}function Le(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:R("Content"),...e}}function Ee(e){return A.some(t=>d[t]in e)}function we(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const n={...e};for(const a of t)n[d[a]]=L(a,a===t[0]?t:null);return n}export{$ as BLOCK_KEY_GROUP,_e as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,te as CARD_MEDIA_FIELD_KEYS,ve as CARD_SHOW_FIELD_KEYS,Se as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,ee as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,H as KEY_GROUP,I as LABEL_GROUP,pe as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,ke as SECTION_ANIM_FIELD_KEYS,ye as SECTION_SHAPE_FIELD_KEYS,ge as SECTION_THEME_FIELD_KEYS,me as assignSectionGroups,Ce as bucketOf,Z as bucketOfPlace,fe as foldTopTier,Ee as hasBucketTabs,S as headerKeysOf,G as headerKeysOfPlace,_ as placeOf,we as reseatBucketTabs,re as retiredHeadings,Le as seatDesignBucket};
|
|
1
|
+
import{SECTION_WIDTH_FIELD_KEYS as Y}from"./section-width-fields.js";import{anchorFields as m,bucketHeader as L,cardMediaFields as U,cardShowFields as W,cardStyleFields as z,designGroupHeader as R,foldMarker as q,foldMetaOf as h,group as J,quietMarker as Q,heightFields as E,sectionAnimationFields as w,sectionShapeFields as O,sectionThemeFields as D,sidesPaddingFields as T,stickFields as x,widthField as B}from"./controls.js";import{deviceField as V,deviceMetaOf as P}from"efficient-easel/screen/lib/puck/device-fields";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as X}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/puck/field-buckets";const A=X;function Z(e){return e==="Animation"?"Animation":"Design"}const ee="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"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",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Texture:"Design","Text style":"Design",Motion:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Controls:"Layout",Diagram:"Layout",[ee]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Height:"Size"},H={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},$={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,n){const a=`${e}.${t}`;return $[a]??H[a]??I[n]}function Ce(e,t,n){const a=_(e,t,n);return a?Z(a):void 0}function G(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const n of e)for(const a of Object.values(n)){const C=P(a),p=h(C?C.inner:a),l=p?I[p.label]:void 0;if(l)for(const g of G(l))t.includes(g)||t.push(g)}return t}const pe=[...S(T(),B("full"),E(),m(),x()),...Object.keys(T()),...Object.keys(B("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x()),...Y],ge=[...S(D()),...Object.keys(D())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],te=Object.keys(U()),oe=new Set(["cardImage","imageBackground"]),_e=[...G(_("ProductGrid","_gCards","Cards")??"Design"),...te.filter(e=>e.startsWith("_g")||oe.has(e))],Se=Object.keys(z()),ve=Object.keys(W({bottomDefault:!0})),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","EmailFormBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...T(),...B("full"),...E(),...m(),...D(),...O(),...w()};for(const t of Object.keys(M)){const n=h(e[t]),a=n?I[n.label]:void 0;if(!n||n.level!==2||!a||!K[a].includes(n.label))throw new Error(`INJECTED_RETIRED (lib/puck/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const ae=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ie=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function fe(e){const t=new Set([...Object.values(d),b.Content]);for(const[n,a]of Object.entries(e))if(!t.has(n)&&h(a)?.level===1)return 1;return 2}function re(e){const t=`${e}.`;return Object.keys(ne).filter(n=>n.startsWith(t)).map(n=>n.slice(t.length))}function de(e,t){const n=P(e),a=J(t);return n?V(n.tier,a):a}function ce(e,t){const n=h(t);return n?e==="Content"||e==="Animation"?q(t,n.label):Q(t):t}function j(e){return e==="Design"?k:["Animation"]}function me(e,t){const n=[],a=new Set(re(t)),C=new Set;let p=!1,l=null;for(const[o,r]of Object.entries(e)){const i=h(r);if(ae.has(o))throw new Error(`${t}.${o}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ie.get(o);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${o}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(o===d.Design||o===d.Animation)&&(p=!0),n.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||n.push(l={place:"Content",entries:[]}),l.entries.push([o,r]);continue}if(a.has(o)||o in M){const s=_(t,o,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${o}: ${a.has(o)?"RETIRED":"INJECTED_RETIRED"} (lib/puck/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(o)&&C.add(o),n.push(l={place:s,entries:[]});continue}const u=_(t,o,i.label);if(!u)throw new Error(`${t}.${o}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/puck/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);n.push(l={place:u,entries:[[o,i.level===2?r:de(r,i.label)]]})}const g=new Set(Object.entries(e).filter(([,o])=>h(o)).map(([o])=>o));for(const[o,r]of[["BLOCK_KEY_GROUP",$],["KEY_GROUP",H]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!g.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${o} (lib/puck/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=p?[]:[...a].filter(o=>!C.has(o));if(v.length)throw new Error(`${t}: RETIRED (lib/puck/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const F=new Set(n.filter(o=>o.entries.length>0).map(o=>o.place)),f=A.filter(o=>j(o).some(r=>F.has(r))),y={};for(const o of f){y[d[o]]=L(o,o===f[0]?f:null);for(const r of j(o)){if(!F.has(r))continue;const i=n.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),o==="Design"&&(y[b[r]]=R(r));for(const u of i)for(const[s,N]of u.entries)y[s]=ce(r,N)}}return y}function Le(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:R("Content"),...e}}function Ee(e){return A.some(t=>d[t]in e)}function we(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const n={...e};for(const a of t)n[d[a]]=L(a,a===t[0]?t:null);return n}export{$ as BLOCK_KEY_GROUP,_e as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,te as CARD_MEDIA_FIELD_KEYS,ve as CARD_SHOW_FIELD_KEYS,Se as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,ee as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,H as KEY_GROUP,I as LABEL_GROUP,pe as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,ke as SECTION_ANIM_FIELD_KEYS,ye as SECTION_SHAPE_FIELD_KEYS,ge as SECTION_THEME_FIELD_KEYS,me as assignSectionGroups,Ce as bucketOf,Z as bucketOfPlace,fe as foldTopTier,Ee as hasBucketTabs,S as headerKeysOf,G as headerKeysOfPlace,_ as placeOf,we as reseatBucketTabs,re as retiredHeadings,Le as seatDesignBucket};
|
|
@@ -2,7 +2,6 @@ import type { BlockChoice } from "efficient-easel/screen/lib/puck/block-choice";
|
|
|
2
2
|
import { HEADER_TYPE, FOOTER_TYPE, type TreeItem } from "efficient-easel/draw";
|
|
3
3
|
export { HEADER_TYPE, FOOTER_TYPE };
|
|
4
4
|
export declare function buildDefaultHeaderNode(): TreeItem;
|
|
5
|
-
export { blockRuns, type BlockChoice, type BlockChoiceRun } from "efficient-easel/screen/lib/puck/block-choice";
|
|
6
5
|
export declare const FOOTER_BLOCK_CHOICES: BlockChoice[];
|
|
7
6
|
export declare const GROUP_BLOCK_CHOICES: BlockChoice[];
|
|
8
7
|
export declare const FOOTER_GROUP_TYPE = "FooterGroup";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{HEADER_TYPE as e,FOOTER_TYPE as r,newNodeId as n}from"efficient-easel/draw";function
|
|
1
|
+
import{HEADER_TYPE as e,FOOTER_TYPE as r,newNodeId as n}from"efficient-easel/draw";function F(){return{type:e,props:{id:n(e)}}}const l=[{type:"FooterLogo",label:"Logo"},{type:"FooterMenu",label:"Menu"},{type:"FooterText",label:"Text"},{type:"FooterEmailSignup",label:"Email Form"},{type:"FooterSocial",label:"Social Logos"},{type:"FooterGroup",label:"Footer Box"},{type:"FooterDivider",label:"Divider"}],p=l.filter(o=>o.type!=="FooterLogo"&&o.type!=="FooterGroup"),a="FooterGroup",c="blocks";function d(o){return o===r?l:o===a?p:null}function s(){const o=(t,i)=>({type:t,props:{id:`${t}-${crypto.randomUUID()}`,...i}});return[o("FooterLogo",{widthPct:100,align:"left",tagline:""}),o("FooterGroup",{direction:"vertical",align:"start",blocks:[o("FooterText",{text:"Join our email list",size:"md",tone:"default"}),o("FooterEmailSignup",{heading:"",placeholder:"Email address",buttonLabel:"Subscribe"})]})]}export{c as FOOTER_BLOCKS_SLOT,l as FOOTER_BLOCK_CHOICES,a as FOOTER_GROUP_TYPE,r as FOOTER_TYPE,p as GROUP_BLOCK_CHOICES,e as HEADER_TYPE,d as blockChoicesFor,s as buildDefaultFooterBlocks,F as buildDefaultHeaderNode};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SiteLiveState } from "
|
|
1
|
+
import type { SiteLiveState } from "../../format/lib/web-backend.js";
|
|
2
2
|
export type { SiteLiveState };
|
|
3
3
|
export declare function readSiteLiveStateWith(read: (() => Promise<SiteLiveState>) | null): void;
|
|
4
4
|
export declare function noteSiteLiveState(state: SiteLiveState): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useCallback as m,useEffect as h,useRef as p}from"react";import{currentEaselSession as v}from"efficient-easel/screen/lib/session";import{backendOf as T}from"./website-session.js";import{useEaselSession as b}from"efficient-easel/screen/lib/session-context";import{refreshSiteLiveState as E}from"./site-live-state.js";import{holdSiteWrites as g}from"../../format/lib/site-writes.js";import{WebsiteBackendError as x}from"
|
|
1
|
+
import{useCallback as m,useEffect as h,useRef as p}from"react";import{currentEaselSession as v}from"efficient-easel/screen/lib/session";import{backendOf as T}from"./website-session.js";import{useEaselSession as b}from"efficient-easel/screen/lib/session-context";import{refreshSiteLiveState as E}from"./site-live-state.js";import{holdSiteWrites as g}from"../../format/lib/site-writes.js";import{WebsiteBackendError as x}from"efficient-easel/screen/lib/backend-error";function w(r=v()){return(u,c,o)=>{const e=T(r).theme;return e?e.update(u,o?{siteId:o}:void 0):Promise.reject(new x("invalid","This backend stores no site theme."))}}function S(r){return r.themeFromDocument?{status:"skipped",reason:"template"}:r.token?null:{status:"skipped",reason:"no-token"}}async function j(r,u=w()){const{themeFromDocument:c,token:o,siteId:e,patch:n}=r,a=S({themeFromDocument:c,token:o});if(a)return a;if(Object.keys(n).length===0)return{status:"skipped",reason:"empty"};try{return await u(n,o,e??void 0),{status:"saved"}}catch(f){return{status:"failed",error:f}}}function Q({themeFromDocument:r,tokenRef:u,siteId:c,onResult:o}){const e=p(null),n=p({}),a=b(),f=p(o);f.current=o;const d=p(null),l=m(t=>{if(t.status==="skipped"){const s=`skipped:${t.reason}`;if(d.current===s)return;d.current=s}else d.current=null;f.current?.(t)},[]),i=m(async()=>{e.current&&(clearTimeout(e.current),e.current=null);const t=n.current;n.current={};const s=await j({themeFromDocument:r,token:u?.current,siteId:c,patch:t},w(a));return l(s),s.status==="saved"&&E(),s.status==="failed"&&(n.current={...t,...n.current}),s},[r,u,c,l,a]),y=m((t,s=!1)=>{const k=S({themeFromDocument:r,token:u?.current});if(k){l(k);return}n.current={...n.current,...t},e.current&&clearTimeout(e.current),s?i():e.current=setTimeout(()=>{i()},500)},[r,u,i,l]);return h(()=>()=>{i()},[i]),h(()=>g(async()=>{if(!e.current&&Object.keys(n.current).length===0)return;const t=await i();if(t.status==="failed")throw t.error}),[i]),{persist:y,flush:i}}export{S as refusalToQueue,w as themeRowSender,Q as useThemeRowPersist,j as writeThemeRow};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type EaselSession as EditorSession } from "efficient-easel/screen/lib/session";
|
|
2
2
|
import type { EditorBlocks } from "./editor-blocks.js";
|
|
3
|
-
import type { WebsiteBackend } from "
|
|
3
|
+
import type { WebsiteBackend } from "../../format/lib/web-backend.js";
|
|
4
4
|
export declare const backendOf: (session?: EditorSession) => WebsiteBackend;
|
|
5
5
|
export declare const blocksOf: (session: EditorSession) => EditorBlocks | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{PAGE_WIDTH as p}from"./page-width.js";const b=["contained","page","full"],T=["full","page"],M={full:"Full width",page:"Content width"},h="inherit",k=
|
|
1
|
+
import{PAGE_WIDTH as p}from"./page-width.js";const b=["contained","page","full"],T=["full","page"],M={full:"Full width",page:"Content width"},h="inherit",k=e=>typeof e=="string"&&b.includes(e),i=e=>e===h;function c(e,n){const t=typeof e.pageWidth=="number"?e.pageWidth:p.default;return i(e.widthMode)?{mode:"full",pageWidth:t,inherited:!0}:e.widthMode==="contained"?{mode:"page",pageWidth:t,inherited:!1}:k(e.widthMode)?{mode:e.widthMode,pageWidth:t,inherited:!1}:e.contained===!0?{mode:"page",pageWidth:t,inherited:!1}:typeof e.fullWidth=="boolean"?{mode:e.fullWidth?"full":"page",pageWidth:t,inherited:!1}:e.contained===!1?{mode:"full",pageWidth:t,inherited:!1}:{mode:n,pageWidth:t,inherited:n==="full"}}function C(e){return c(e,"page").mode==="full"}const l="site",s={Hero:"hero",HeroSingle:"hero",IntroBleed:"scrollOver",SpecStrip:"background",Timeline:"background",Footprint:"background",Prose:"background",ParagraphsA:"background",Cards:"background",KeyFeatures:"background",Chart:"background",Mockup:"background",Testimonials:"background",TitleWithButtons:"background",Countdown:"background",DocMasthead:"background",DocBody:"background",DocMetaCards:"background",Gallery:"background",GalleryB:"background",Reviews:"background",ReviewForm:"background",Form:"background",AppointmentBooking:"background",FAQ:"background",Events:"background",Split:"both",Breadcrumb:"both",Collections:"both",CatalogFilterBar:"both",AlloyWheelsListing:"both",Banner:"contained",Stats:"contained",Logos:"contained",Divider:"contained",OrderSummary:"contained",DeliveryOptions:"contained",PaymentBadges:"contained",CheckoutCTA:"contained",Flex:"contained",Grid:"contained",Manifesto:"contentColumn",SectionHeader:"contentFull",ProductHero:"contentFull",ProductGrid:"productGrid",TimelineTrack:"capped",DetailRows:"capped",FitmentTable:"capped",TyreSizes:"capped",TyreFitment:"capped",EuTyreLabel:"capped",BundleOffer:"capped",CompatibleTyres:"capped",RelatedProducts:"capped",ProcessSteps:"capped",StatsParagraph:"capped",Masthead:"capped",FeaturedCover:"capped",LongRead:"capped",Series:"capped",ContactLocations:"capped",FitmentFinder:"capped",SpecTable:"capped",Subscribe:"capped",SubscribeBlogs:"capped",ContactRouting:"capped",SubmitBuild:"capped"};function m(e){return Object.prototype.hasOwnProperty.call(s,e)}const u=e=>e==="full"||e==="content",W=e=>typeof e=="number"&&Number.isFinite(e)&&e>0,g=({widthMode:e,fullWidth:n,pageWidth:t})=>({widthMode:e,fullWidth:n,pageWidth:t});function x(e,n){const t={background:null,content:null,contentMax:null};switch(e){case"hero":return i(n.widthMode)||n.widthMode!=="full"?t:{...t,background:"full"};case"scrollOver":return n.fullWidth===!1?t:{...t,content:"full"};case"background":return c(n,"full").mode==="full"?t:{...t,background:"content"};case"both":return c(n,"full").mode==="full"?{...t,content:"full"}:{...t,background:"content"};case"contained":return c(n,"page").mode==="full"?{...t,content:"full"}:{...t,background:"content"};case"contentColumn":return c(g(n),"page").mode==="full"?{...t,content:"full"}:t;case"contentFull":return c(g(n),"full").mode==="full"?{...t,content:"full"}:t;case"productGrid":{const o=c(n,"full");return o.mode==="full"?{...t,content:"full"}:{background:"content",content:"content",contentMax:o.pageWidth}}case"capped":return{...t,background:"content"}}}function y(e,n){if(!m(e))return{background:null,content:null,contentMax:null};const t=s[e],o=n,r=x(t,o),d=o.backgroundWidth===l?null:u(o.backgroundWidth)?o.backgroundWidth:r.background;return o.contentWidth===l?{background:d,content:null,contentMax:null}:u(o.contentWidth)?{background:d,content:o.contentWidth,contentMax:o.contentWidth==="content"&&W(o.contentMax)?o.contentMax:null}:{background:d,content:r.content,contentMax:r.contentMax}}const f="siteWidths";function a(e){return u(e)?e:null}function F(e,n){return{[f]:{background:a(e),content:a(n)}}}function w(e){const t=e.puck?.metadata?.[f];return{background:a(t?.background),content:a(t?.content)}}export{l as FOLLOW_SITE,T as SECTION_WIDTH_CHOICES,s as SECTION_WIDTH_FAMILY,f as SITE_WIDTHS_KEY,M as WIDTH_CHOICE_LABEL,h as WIDTH_INHERIT,b as WIDTH_MODES,i as isInheritValue,a as normalizeSiteBackground,y as resolveSectionWidth,c as resolveWidth,m as sectionHasWidthRows,C as sectionRunsFullWidth,F as siteWidthsMetadata,w as siteWidthsOf};
|
|
@@ -198,7 +198,6 @@ export declare const WEB_BUILDER_WORDS: {
|
|
|
198
198
|
readonly "Bottom right": "Bottom right";
|
|
199
199
|
readonly Box: "Box";
|
|
200
200
|
readonly "Box name": "Box name";
|
|
201
|
-
readonly "Brand Strip": "Brand Strip";
|
|
202
201
|
readonly "Brand Text": "Brand Text";
|
|
203
202
|
readonly "Brand name": "Brand name";
|
|
204
203
|
readonly Breadcrumb: "Breadcrumb";
|