efficient-web-builder 21.0.0 → 22.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +196 -0
- package/dist/components/AnimatedStat.js +1 -1
- package/dist/components/Banner.js +1 -1
- package/dist/components/Cards.js +1 -1
- package/dist/components/CategoryBar.js +1 -1
- package/dist/components/ChartSection.js +1 -1
- package/dist/components/Countdown.js +1 -1
- package/dist/components/DealerFinder.d.ts +12 -0
- package/dist/components/DealerFinder.js +1 -0
- package/dist/components/DocMasthead.js +1 -1
- package/dist/components/DocMetaCards.js +1 -1
- package/dist/components/DocTabs.js +1 -1
- package/dist/components/FeaturedCover.js +1 -1
- package/dist/components/Footprint.d.ts +8 -1
- package/dist/components/Footprint.js +5 -5
- package/dist/components/HeroPoster.d.ts +2 -1
- package/dist/components/HeroPoster.js +1 -1
- package/dist/components/HeroSingle.d.ts +3 -1
- package/dist/components/HeroSingle.js +4 -4
- package/dist/components/HeroSlide.d.ts +2 -1
- package/dist/components/HeroSlide.js +1 -1
- package/dist/components/ImageBlock.d.ts +2 -1
- package/dist/components/ImageBlock.js +1 -1
- package/dist/components/KeyFeatures.js +1 -1
- package/dist/components/LocationGroupHeader.js +1 -1
- package/dist/components/Logos.js +1 -1
- package/dist/components/LongRead.js +1 -1
- package/dist/components/Manifesto.js +1 -1
- package/dist/components/Masthead.js +1 -1
- package/dist/components/MediaUploadField.d.ts +3 -1
- package/dist/components/MediaUploadField.js +1 -1
- package/dist/components/MockupSection.js +1 -1
- package/dist/components/OrderSummary.js +1 -1
- package/dist/components/PagesPanel.js +1 -1
- package/dist/components/ParagraphsA.js +1 -1
- package/dist/components/PartSettingsPanel.d.ts +2 -1
- package/dist/components/PartSettingsPanel.js +1 -1
- package/dist/components/PinnedChromeLoadNotice.d.ts +12 -2
- package/dist/components/PinnedChromeLoadNotice.js +1 -1
- package/dist/components/PostCard.js +1 -1
- package/dist/components/ProcessSteps.js +1 -1
- package/dist/components/Prose.js +1 -1
- package/dist/components/SectionEditor.js +1 -1
- package/dist/components/SectionEyebrow.js +1 -1
- package/dist/components/SectionHeader.js +1 -1
- package/dist/components/Series.js +1 -1
- package/dist/components/SiteTextStylesField.js +1 -1
- package/dist/components/Split.js +1 -1
- package/dist/components/Stats.js +1 -1
- package/dist/components/StatsParagraph.js +1 -1
- package/dist/components/Testimonials.js +1 -1
- package/dist/components/Text.js +1 -1
- package/dist/components/ThemeField.js +1 -1
- package/dist/components/Timeline.js +1 -1
- package/dist/components/TimelineTrack.js +1 -1
- package/dist/components/WebsiteScreenParts.js +1 -1
- package/dist/components/storefront-editor.css +96 -271
- package/dist/components/useLocationsTree.js +1 -1
- package/dist/components/usePinnedChromeState.d.ts +3 -0
- package/dist/components/usePinnedChromeState.js +1 -0
- package/dist/components/useWebsiteMainAction.js +1 -1
- package/dist/lib/content/phone-focus.d.ts +7 -0
- package/dist/lib/content/phone-focus.js +1 -0
- package/dist/lib/dealer-source.d.ts +34 -0
- package/dist/lib/dealer-source.js +1 -0
- package/dist/lib/editor-words-catalogue.d.ts +14 -5
- package/dist/lib/editor-words-catalogue.js +4 -4
- package/dist/lib/page-live-state.d.ts +2 -1
- package/dist/lib/page-live-state.js +1 -1
- package/dist/lib/puck/MarkupToolbar.d.ts +1 -1
- package/dist/lib/puck/MarkupToolbar.js +1 -1
- package/dist/lib/puck/blocks/general/Footprint/fields.js +1 -1
- package/dist/lib/puck/blocks/general/Footprint/render.js +2 -2
- package/dist/lib/puck/blocks/general/HeroSingle/fields.js +1 -1
- package/dist/lib/puck/blocks/general/HeroSingle/render.js +1 -1
- package/dist/lib/puck/blocks/general/HeroSlide/fields.js +1 -1
- package/dist/lib/puck/blocks/general/HeroSlide/render.js +1 -1
- package/dist/lib/puck/blocks/general/ImageBlock/fields.js +1 -1
- package/dist/lib/puck/blocks/general/ImageBlock/render.js +1 -1
- package/dist/lib/puck/blocks/general/text-part-shapes.json +2162 -0
- package/dist/lib/puck/controls.d.ts +5 -2
- package/dist/lib/puck/controls.js +1 -1
- package/dist/lib/puck/field-groups.js +1 -1
- package/dist/lib/puck/media-manifest.json +7 -2
- package/dist/lib/puck/passes/clickable-parts.js +1 -1
- package/dist/lib/puck/passes/inspector.js +1 -1
- package/dist/lib/puck/passes/section-width.js +1 -1
- package/dist/lib/puck/passes/types.d.ts +3 -1
- package/dist/lib/puck/registry.d.ts +1 -1
- package/dist/lib/puck/registry.js +1 -1
- package/dist/lib/puck/render-registry.d.ts +3 -0
- package/dist/lib/puck/render-registry.js +1 -0
- package/dist/lib/puck/source-bound-parts.d.ts +2 -0
- package/dist/lib/puck/source-bound-parts.js +1 -1
- package/dist/lib/puck/text-part-shape.d.ts +18 -0
- package/dist/lib/puck/text-part-shape.js +2 -0
- package/dist/lib/sections/collection-card-text-regions.d.ts +9 -1
- package/dist/lib/sections/collection-card-text-regions.js +1 -1
- package/dist/lib/sections/text-regions.d.ts +1 -0
- package/dist/lib/sections/text-regions.js +1 -1
- package/dist/lib/site-text-styles.d.ts +1 -0
- package/dist/lib/site-text-styles.js +2 -2
- package/dist/lib/source-rules/heading-ceiling-sweep.js +3 -3
- package/dist/lib/source-rules/part-style-naming.js +2 -2
- package/dist/lib/source-rules/rule.d.ts +1 -0
- package/dist/lib/source-rules/rule.js +3 -1
- package/dist/lib/source-rules/size-token-paints.js +4 -4
- package/dist/lib/source-rules/style-face-matches-size.js +3 -3
- package/dist/lib/source-rules/support/registry-source.d.ts +1 -1
- package/dist/lib/source-rules/support/registry-source.js +3 -3
- package/package.json +9 -6
- package/dist/components/ImageFocusRow.d.ts +0 -7
- package/dist/components/ImageFocusRow.js +0 -1
- package/dist/components/TemplateGlyph.d.ts +0 -6
- package/dist/components/TemplateGlyph.js +0 -1
- package/dist/components/TextStyleRow.d.ts +0 -13
- package/dist/components/TextStyleRow.js +0 -1
|
@@ -284,7 +284,7 @@ export declare function FocalPicker({ label, value, onChange, points, }: {
|
|
|
284
284
|
onChange: (next: string) => void;
|
|
285
285
|
points?: readonly AlignmentPoint[];
|
|
286
286
|
}): import("react").JSX.Element;
|
|
287
|
-
export declare function
|
|
287
|
+
export declare function focusKeptField(): CustomField<string>;
|
|
288
288
|
export interface PlacementFieldOptions {
|
|
289
289
|
stacking: boolean;
|
|
290
290
|
fallback?: HeroGroupPlacement;
|
|
@@ -349,7 +349,10 @@ export declare function segmented<V>(label: string, icon: ReactElement, options:
|
|
|
349
349
|
value: V;
|
|
350
350
|
picture?: ReactElement;
|
|
351
351
|
}[], fallback: V): CustomField<V>;
|
|
352
|
-
export declare function upload(label: string, accept: string, placeholder?: string
|
|
352
|
+
export declare function upload(label: string, accept: string, placeholder?: string, opts?: {
|
|
353
|
+
focus?: string;
|
|
354
|
+
focusWhen?: (props: Record<string, unknown>) => boolean;
|
|
355
|
+
}): CustomField<string>;
|
|
353
356
|
export declare const CUSTOM_FIELD_MEDIA: Record<string, string[]>;
|
|
354
357
|
export declare function CoordsField({ value, onChange, label, }: {
|
|
355
358
|
value: GeocodeState | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as r,jsxs as k,Fragment as R}from"react/jsx-runtime";import{cloneElement as ue,useId as mt,useRef as te,useState as z}from"react";import{useEasel as N,useSelectedFields as pe}from"efficient-easel/easel";import{say as l,editorEaselWords as x}from"../editor-words.js";import{readHidable as fe,hidableText as me}from"./hidable.js";import{FOLD_FIELD_MARKER as V,LINK_FIELD_MARKER as he,MEDIA_FIELD_MARKER as ge,SCAFFOLD_FIELD_MARKER as be,TEXT_FIELD_MARKER as I,foldMetaOf as Y,textFieldIdentifier as ht}from"./field-markers.js";import gt from"../../components/ApplyCornersToSiblings.js";import bt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as xt,CORNER_RADIUS_MAX as xe,CORNER_RADIUS_MIN as v}from"../content/card-image-shape.js";import{IMAGE_CORNER_STEP as St,IMAGE_CORNERS_LABEL as yt}from"../content/image-corners.js";import{GRID_MAX_COLUMNS as Ct}from"../content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as _t,GALLERY_LAYOUTS as W,GALLERY_LAYOUT_KEYS as Se}from"../content/gallery-layout.js";import{anchorSiblingsOf as It,HERO_GROUP_PLACEMENTS as Et,HERO_GROUP_PLACEMENT_DEFAULT as Rt,normalisePlacement as Tt,placementPoints as ye}from"../hero-group-placement.js";import wt from"../../components/KeepHint.js";import{AdjustIcon as Ot,AlignLeftIcon as Pt,EyeIcon as kt,AlignSeparateIcon as Lt,AnimationIcon as Ce,BackgroundIcon as At,BorderAllIcon as Nt,BlockSectionIcon as vt,CartIcon as Ft,ColumnWidthsIcon as _e,ColumnsIcon as Dt,CornerIcon as Bt,DirectionDownIcon as Ht,DirectionLeftIcon as Gt,DirectionRightIcon as Mt,DirectionUpIcon as Kt,DollarIcon as Wt,FinishIcon as Ut,GapIcon as Ie,GridIcon as Xt,GroundIcon as $t,HashIcon as Ee,HeightIcon as jt,ImageIcon as zt,ListIcon as Vt,LocationIcon as ne,PaddingAllIcon as Yt,PaddingBottomIcon as Re,PaddingLeftIcon as Te,PaddingRightIcon as we,PaddingTopIcon as Oe,PageIcon as Pe,PhoneIcon as qt,PlacementIcon as Jt,ProductSizeIcon as Zt,StickyIcon as Qt,RotateIcon as en,SquareIcon as tn,TypeIcon as nn,WidthIcon as on,WrapIcon as rn}from"efficient-easel/icons";import{FieldGlyph as ke}from"../../components/FieldGlyph.js";import{resolvePageBackground as ln}from"../content/page-background.js";import{CORNER_SIDES as Le,CORNER_SIDE_POINTS as an,hasOwnSectionCorners as sn,normalizeCornerSides as Ae}from"../content/section-corners.js";import{SECTION_MOTION_NONE as cn,SECTION_MOTION_OPTIONS as dn}from"../content/section-animation.js";import{enclosingSectionProps as Ne}from"./enclosing-section.js";import{SettingsDefaultReset as S,SettingsField as m,SettingsGroupHead as un,SettingsGroupSub as pn,SettingsBorder as fn,SettingsSegmented as mn,SettingsSides as hn,SettingsSidesEach as ve,sidesStartEach as gn,SettingsSwitch as Fe,borderSides as bn,borderStartEach as xn}from"efficient-easel/panel";import{FieldSelect as Sn,ListField as yn}from"efficient-easel/fields";import{DisplayChips as Cn}from"efficient-shell/ui";import{desktopDisplayChanged as _n,partShownOnDesktop as In,partShownOnPhone as En,phoneDisplayChanged as Rn,withDesktopPart as Tn,withPhonePart as wn}from"../content/part-display.js";import{AlignmentGrid as On,Checkbox as Pn,CornersInput as kn,DateTimePicker as Ln,FOCAL_DEFAULT as De,PictureTiles as Be,Slider as An,Tooltip as He}from"efficient-shell/ui";import{ColourControl as Ge}from"./ColourControl.js";import Me from"./MarkupToolbar.js";import{deviceField as g}from"./device-fields.js";import{NO_CONTROL_FIELD as Nn,NoControlMark as Ke,noControlField as oe}from"./panel-no-control-mark.js";import{OWN_BOX_FIELD as vn}from"./own-box.js";import{PHONE_CLEAR as Fn,phoneKey as F,resolvePhoneValue as re}from"./phone-override.js";import{SuppressibleText as Dn}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Bn,CARD_OUTLINE_OPTIONS as Hn,DEFAULT_CARD_INDEX_FORMAT as Gn,DEFAULT_CARD_OUTLINE as Mn}from"../sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Kn,DEFAULT_COVER_INDEX as Wn}from"../sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Un}from"./text-control-kinds.js";import Xn from"../../components/ImageFocusRow.js";import $n from"../../components/MediaUploadField.js";import jn from"../../components/MultiSelectField.js";import zn from"../../components/SectionThemePicker.js";import Vn from"../../components/SearchSelectField.js";import Yn from"../../components/StorefrontLinkField.js";import We from"../../components/UiIcon.js";import{SECTION_PADDING as E}from"../content/section-padding.js";import{hasPhoneHeight as qn,resolveSectionMinHeight as Jn}from"../content/section-min-height.js";import{SECTION_STICK_DISTANCE as q,SECTION_STICK_LABEL as ie,hasPhoneStick as Zn,resolveSectionStick as Qn}from"../content/section-sticky.js";import{SECTION_MIN_HEIGHT as eo,SECTION_MIN_HEIGHT_GROUP_LABEL as U,SECTION_SCREEN_PCT as to}from"../content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as no,containerDirectionPoints as oo,resolveContainerDirection as Ue}from"../content/container-direction.js";import{BOX_ALIGN_POINTS as ro,BOX_BLOCK_SPACING_LABEL as io,BOX_BLOCK_SPACING_POINTS as Xe,BOX_JUSTIFY_POINTS as $e,BOX_PHONE_ROW_LABEL as lo,BOX_PHONE_ROW_MAX as ao,BOX_PHONE_ROW_MIN as je,BOX_SHARE_LABEL as ze,BOX_SHARE_POINTS as le,BOX_WRAP_LABEL as so,BOX_WRAP_POINTS as Ve}from"../content/box-layout.js";import{usePreviewHeader as X}from"../../components/PreviewHeaderContext.js";import{BORDER_MAX as co}from"../content/borders.js";import{DEFAULT_SURFACES as uo,normalizeTheme as po}from"../theme.js";import{CONTAINER_GAP as ae,CONTAINER_GAP_BUILT_IN as fo,GAP_FIELD_CONTAINER as mo,hasOwnContainerGap as ho,resolveContainerGap as go}from"../content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as bo,CARD_IMAGE_BG_OFF as xo,CARD_IMAGE_BG_SWATCH_NAMES as So,CARD_IMAGE_BG_SWATCHES as yo,isCardImageBackgroundInheriting as Co,cardImageBackgroundChoice as _o,THEME_CARD_IMAGE_BG as Io}from"../content/card-image-background.js";import{SECTION_BG_INHERIT as Eo,SECTION_BG_SWATCHES as Ro,SECTION_BG_SWATCH_NAMES as To,THEME_SECTION_BG as wo,isSectionBackgroundInheriting as Oo}from"../content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Po}from"../content/section-surface.js";import{TYPE_SIZE_FIXED as ko,TYPE_SIZE_INHERIT as Lo,isTypeSizeInheriting as Ao}from"../content/section-type-size.js";import{SECTION_WIDTH_CHOICES as No,WIDTH_CHOICE_LABEL as vo,WIDTH_INHERIT as Fo,resolveWidth as Do,sectionRunsFullWidth as Ye}from"../content/section-width.js";import{useFoldHeadingLevel as qe}from"./panel-heading-scope.js";import{withStyleKind as Bo}from"efficient-easel/style-clipboard";function D(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!Y(n)&&Bo(n,`section:${t}`);return e}function Vi({children:e}){return r("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function Je(){return null}function Ho(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return r(Je,{},e)}function Go(e){return e.type===Je}function O(e){return Go(e)?void 0:e}function B(e,t){return l("{value} from {from}",{value:e,from:t})}function Mo(){const{appState:e}=N(i=>i),t=e.data.root?.props??{},{mode:n,pageWidth:o}=Do(t,"full");return n==="page"?B(`${o}px`,l("the page")):n==="contained"?B(l("Contained"),l("the page")):B(l("Full"),l("the page"))}function Ko(){const{blockGap:e}=X();return e===null?l("this container's own spacing"):B(`${e}px`,l("Site styles"))}function Wo({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:Ko(),onReset:t})}function Uo({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:Mo(),onReset:t})}function H({value:e,onChange:t,label:n,placeholder:o,hint:i,multiline:a,hideable:c=!0,markup:s=!0}){const{text:d,hidden:u}=fe(e),f=te(null),p=te(null),h=w=>t(c?{text:w,hidden:u}:w),b=()=>t({text:d,hidden:!u}),C=c&&u,T=mt(),_=i?Vo(i)?r("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(i)}):r(wt,{children:l(i)}):void 0,j=u?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return r(m,{label:l(n),icon:r(nn,{}),htmlFor:T,className:C?"is-hidden":void 0,hint:_,action:c?r(He,{content:j,children:r("button",{type:"button",className:"sf-field-eye","aria-pressed":u,"aria-label":j,onClick:b,children:u?r(We,{name:"eye-off",size:14}):r(We,{name:"eye",size:14})})}):void 0,children:k("div",{className:"sf-copybox",children:[s&&r(Me,{target:a?p:f,value:d,onChange:h}),a?r("textarea",{id:T,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:w=>h(w.target.value)}):r("input",{id:T,ref:f,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:w=>h(w.target.value)})]})})}function Yi(e,t){return{...e,[be]:t}}function qi(e){const t=e[I];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[I]:{...t,offPage:!0}}}function Ji(e){return!e||typeof e!="object"?!1:e[I]?.offPage===!0}const Ze="sfPanelOnly";function Zi(e){if(!e[I])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Ze]:!0}}function Qi(e){return!!e&&typeof e=="object"&&e[Ze]===!0}function el(e){const t=e[I];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[I]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as ma,SCALAR_TEXT_CONTROLS as ha}from"./text-control-kinds.js";function tl(e,t){if(!e[I])throw new Error("inOwnBox: the field holds no authored text");const{[Nn]:o,...i}=e;return{...i,[vn]:!0,render:t}}const Xo=new Set(Un),G=(e,t)=>{const n={...t,[I]:e};if(!Xo.has(e.control))return n;const o=t.render;return{...oe(n,"authored-copy"),render:i=>r(Dn,{name:i.name,children:o(i)})}},nl="Everything else on this block comes from the linked post. Unlink it to edit by hand.",$o="Select a word, then press the highlighter.",jo="A short name so a link can jump straight to this section, like yoursite.com/page#about.",zo=new Set([$o]),Vo=e=>zo.has(e);function ol(e,t,n){return G({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n})})}function rl(e,t,n){return G({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0})})}function Yo(e,t,n){return G({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function il(e,t,n){return G({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1})})}function ll(e){return{type:"custom",[he]:{label:e},render:({value:t,onChange:n})=>r(Yn,{value:me(t),onChange:n,label:e})}}function al(e,t,n){return G({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const sl={Design:Ot,Animation:Ce};function cl(e,t){return e.includes("Design")?t!=="Design":null}function qo({label:e}){return r(un,{title:l(e),level:qe(1)})}function Jo({level:e,label:t}){return e===1?r(qo,{label:t}):r(er,{label:t})}function Qe(e,t){return{type:"custom",[V]:{label:e,level:t},render:()=>r(Jo,{level:t,label:e})}}function y(e){return Qe(e,2)}function dl(e){return{type:"custom",render:()=>r(Zo,{text:e})}}function Zo({text:e}){return r("p",{className:"sf-note",children:l(e)})}function ul(e){return Qe(e,1)}function pl(e){return Y(e)!==null&&e?.tabs!==void 0}const et=new Map;function fl(e,t){const n=`${e}\0${t?t.join(""):""}`,o=et.get(n)??{type:"custom",tabs:t,[V]:{label:e,level:1},bucket:e,marker:!0,render:()=>r(R,{})};return et.set(n,o),o}function ml(e){return Y(e)!==null&&e?.designGroup!==void 0}const tt=new Map;function hl(e){const t=tt.get(e)??{type:"custom",[V]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>r(R,{})};return tt.set(e,t),t}function Qo(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function gl(e,t){return Qo(e)===t?e:{...e,marker:!0,fold:t,render:()=>r(R,{})}}function bl(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>r(R,{})}}function er({label:e}){return r(pn,{title:l(e),level:qe(2)})}function nt({swatches:e,current:t,onPick:n,names:o}){const i=e.find(s=>s.toLowerCase()===t.toLowerCase()),a=i?o?.[i]:void 0,c=a?l(a):t;return k("div",{className:"sf-swatches",children:[e.map(s=>{const d=o?.[s]?l(o[s]):s;return r(He,{content:d,children:r("button",{type:"button","aria-pressed":t.toLowerCase()===s.toLowerCase(),className:`sf-swatch ${t.toLowerCase()===s.toLowerCase()?"is-active":""}`,style:{background:s},onClick:()=>n(s),"aria-label":d})},s)}),r("span",{className:"sf-swatch-hex",children:c})]})}function xl(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=Oo(n,t);return r(m,{label:l(e),icon:r(At,{}),changed:!i,action:r(S,{words:x()?.panel,label:l(e),changed:!i,detail:l("the theme's section background"),onReset:()=>o(Eo)}),children:nt({swatches:Ro,current:i?wo:n??t??"",onPick:o,names:To})})}}}function tr(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=n,a=Co(i,t);return r(m,{label:l(e),icon:r($t,{}),changed:!a,action:r(S,{words:x()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(bo)}),children:nt({swatches:yo,current:a?Io:_o(i,t),onPick:o,names:So})})}}}function Sl(e=n=>n,t){return D({_gSectionTheme:y(Po),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>r(zn,{value:e(n),onChange:o,followLabel:t})}})}function M({min:e,max:t,step:n,value:o,onChange:i,suffix:a="",readout:c=!0,notch:s,ariaLabel:d,disabled:u=!1}){const f=s!==void 0&&Number.isFinite(s)&&s>=e&&s<=t;return r("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(s-e)/(t-e)}:void 0,children:r(An,{min:e,max:t,step:n,value:o,suffix:a||void 0,showInput:c,label:d===void 0?void 0:l(d),disabled:u,size:"sm",className:"sf-slider-track",onChange:p=>{p!==null&&p!==o&&i(p)}})})}function K(e,t,n,o,i,a,c="",s){return{type:"custom",render:d=>r(m,{label:l(e),icon:O(t),action:s?s("storedValue"in d?d.storedValue:d.value,d.onChange):void 0,children:M({min:n,max:o,step:i,value:typeof d.value=="number"?d.value:a,suffix:c,ariaLabel:e,onChange:d.onChange})})}}function ot(e,t){const{min:n,max:o,step:i=1,unsetLabel:a,hint:c,restTrack:s,unsetMark:d,icon:u}=t;return{type:"custom",render:({value:f,onChange:p})=>{const h=typeof f=="number"?f:null,b=h===null;return r(m,{label:l(e),icon:u?O(u):void 0,value:b?d||a===void 0?void 0:l(a):`${h}px`,changed:!b,action:d?ue(d,{changed:!b,onReset:()=>p(null)}):r(S,{words:x()?.panel,label:l(e),changed:!b,onReset:()=>p(null)}),hint:typeof c=="string"?l(c):c,children:s?s({min:n,max:o,step:i,px:h,label:e,onChange:p}):M({min:n,max:o,step:i,value:h??n,readout:!1,ariaLabel:e,onChange:p})})}}}function yl(e){const t=K("Gap",r(Ie,{}),ae.min,ae.max,ae.step,fo[e],"px",(n,o)=>r(Wo,{inherited:!ho(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[mo]:e,render:n=>t.render({...n,value:go(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}const J="Corners";function se(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,i=o!==null;return r(m,{label:l(J),icon:r(Bt,{}),changed:i,action:ue(e.mark,{changed:i,onReset:()=>n(null)}),hint:e.hint,children:r(nr,{tier:e,px:o,onRadius:n})})}}}function rt(e){let t=null;try{t=pe()}catch{t=null}return[t?.values?.[e],n=>t?.onChange(e,n)]}function nr({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),i=e.useClosedReason?e.useClosedReason():null,[a,c]=rt(e.sidesKey),s=Ae(a)??[...Le];return r(kn,{label:l(J),value:s,corners:an,onChange:d=>{const u=Ae(d)??[];c(u.length===Le.length?null:u)},radius:t,onRadiusChange:n,radiusMin:v,radiusMax:xe,radiusStep:e.step??1,radiusPlaceholder:String(o),disabled:i!==null,disabledReason:i??void 0})}function it(){return oe({type:"custom",render:()=>r(Ke,{})},"always")}function or({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=X(),i=typeof o=="number"?`${o}px`:l("not set");return r(S,{words:x()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):B(i,l("Site styles")),onReset:n})}function rr(){const{cornerRadiusPx:e}=X();return typeof e=="number"?e:v}function ir(){return se({sidesKey:"sectionCornerSides",useFollowed:rr,useClosedReason:()=>at()?l(lt):null,mark:r(or,{label:J}),hint:r(lr,{})})}const lt="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function at(){return Ye(L())}function lr(){return r(R,{children:at()?lt:"Follows Site styles ▸ Basics ▸ Corners until you set a number here."})}function Cl(){return D({_gShape:y("Shape"),sectionCorners:ir(),sectionCornerSides:it(),sectionBorder:st("desktop"),sectionBorderPhone:st("mobile")})}const ar=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function sr(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function cr(){let e;try{const t=po(X().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||uo.line}function dr({value:e,onChange:t,tier:n}){const[o]=rt("sectionBorder"),i=cr(),a=e&&typeof e=="object"?e:{},c=n==="mobile"?o&&typeof o=="object"?o:{}:{},[s,d]=z(()=>xn(a,c)),u=ar();return r(m,{label:l("Border"),icon:r(Nt,{}),action:r(ve,{each:s,label:l("Each side"),onChange:d}),children:r(fn,{label:l("Border"),value:a,each:s,onChange:f=>t(sr(f)),placeholder:{sides:bn(c),style:c.style??"solid",color:c.color||i},presets:[i],words:u,max:co})})}function st(e){return g(e,{type:"custom",render:({value:t,onChange:n})=>r(dr,{value:t,onChange:n,tier:e})})}function _l(){return{_gMotion:y("Motion"),sectionAnimation:de("Entrance",r(Ce,{}),[...dn],cn)}}function ce(){let e=null;try{const{appState:t,selectedItem:n}=N(i=>i),o=n?.props?.id?String(n.props.id):void 0;e=o?Ne(t?.data,o):null}catch{e=null}return e!==null&&Ye(e)}function ct(e){const{cornerRadiusPx:t}=X(),n=ce(),o=typeof t=="number"?t:e;let i=null;try{const{appState:c,selectedItem:s}=N(u=>u),d=s?.props?.id?String(s.props.id):void 0;i=d?Ne(c?.data,d):null}catch{i=null}if(n||!i)return o;const a=i.sectionCorners;return sn(a)?a:o}function ur({label:e,changed:t=!1,onReset:n=()=>{}}){const o=ce(),i=ct(v),a=o?"Site":"Section";return r(S,{words:x()?.panel,label:l(e),changed:t,detail:B(`${i}px`,o?l("Site styles"):l("the section")),onReset:n})}function pr(){return r(R,{children:ce()?l("The section is full width, so this card follows Site styles ▸ Basics ▸ Corners."):l("Follows the section's Corners until you set a number here.")})}function fr(){return se({sidesKey:"cardCornerSides",useFollowed:()=>ct(v),mark:r(ur,{label:J}),hint:r(pr,{})})}function mr(){return{type:"custom",render:()=>r(gt,{})}}function Il(e){return{...e,render:t=>r(bt,{render:e.render,props:t})}}function El(){return{_gShape:y("Shape"),cardCorners:fr(),cardCornerSides:it(),cardCornersApplyAll:mr()}}function Rl(){return P("Justify",r(Lt,{}),$e,$e[0].value)}function Tl(){return P("Item alignment",r(Pt,{}),ro,"stretch")}function wl(){return P(so,r(rn,{}),Ve,Ve[0].value)}function Ol(){return{type:"custom",render:({value:e,onChange:t})=>{const n=le.find(o=>o.value===e)??le[0];return r(m,{label:l(ze),icon:r(_e,{}),value:l(n.label),children:r(Be,{className:"sf-gallery-layouts",label:l(ze),value:n.value,onChange:t,options:le.map(o=>({value:o.value,label:l(o.label),picture:r("span",{className:"sf-gallery-pic",children:hr(o.weights).map((i,a)=>r("i",{style:{gridColumn:`span ${i}`}},a))})}))})})}}}function hr(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function Pl(){return P(io,r(Ie,{}),Xe,Xe[0].value)}function kl(){return K(lo,r(qt,{}),je,ao,1,je)}function Ll(e){const t=de(no,Ho("`Direction` names how a container's children run — a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; editor-shell's own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),oo(e),Ue(e,void 0));return{type:"custom",render:n=>t.render({...n,value:Ue(e,n.value),onChange:o=>n.onChange(o)})}}function Al(e,t,n,o,i,a){return{type:"custom",render:({value:c,onChange:s})=>r(m,{label:l(e),icon:r(ke,{noun:a}),action:r(S,{words:x()?.panel,label:l(e),changed:!Ao(c),detail:l("the Text style in Site styles"),onReset:()=>s(Lo),defaultAction:{onPress:()=>s(ko),title:l("Keep this section's own built-in size"),icon:r(vt,{})}}),children:M({min:t,max:n,step:o,value:typeof c=="number"?c:i,suffix:"px",ariaLabel:e,onChange:s})})}}function Nl(){return{_gCellWidth:y("Cell width"),gridSpan:P("Positions",r(_e,{}),[{label:"Auto",value:""},...Array.from({length:Ct},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function L(){let e=null;try{e=N(t=>t).selectedItem}catch{e=null}return e?.props??{}}function gr({min:e,max:t,step:n,px:o,label:i,onChange:a,desktopKey:c,fallback:s}){const d=L()[c],u=re(void 0,d,s);return r(R,{children:M({min:e,max:t,step:n,value:re(o,d,s),readout:!1,ariaLabel:i,notch:u,onChange:a})})}function br({label:e,desktopKey:t,fallback:n,changed:o=!1,onReset:i=()=>{}}){const a=L()[t],c=re(void 0,a,n);return r(S,{words:x()?.panel,label:l(e),changed:o,detail:l("{value} on desktop",{value:`${c}px`}),onReset:i})}function xr(e){return ot(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:r(br,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>r(gr,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}function vl(e){return{type:"custom",render:({value:t,onChange:n})=>r(yr,{...e,value:t,onChange:n})}}function Sr({label:e,icon:t,options:n,value:o,resolved:i,restWord:a,onChange:c}){const s=n.some(d=>d.value===o);return r(m,{label:l(e),icon:O(t),action:r(S,{words:x()?.panel,label:l(e),changed:s,detail:l("{value} on desktop",{value:l(a)}),onReset:()=>c(void 0)}),children:Q({options:n,value:s?o:i,onChange:d=>c(d),ariaLabel:e})})}function yr({label:e,icon:t,options:n,desktopKey:o,resolve:i,value:a,onChange:c}){const s=L()[o],d=i(void 0,s),u=n.find(f=>f.value===d)?.label??"";return r(Sr,{label:e,icon:t,options:n,value:a,resolved:d,restWord:u,onChange:c})}const Cr={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},_r={Top:Oe,Bottom:Re,Left:Te,Right:we},Ir=e=>{const t=_r[e];return r(t,{})};function Fl(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,i=_=>Cr[_],a=_=>K(i("Top"),r(Oe,{}),E.min,E.max,E.step,_,"px"),c=(_,j,w,ee=E)=>g("mobile",xr({label:i(_),icon:Ir(_),desktopKey:j,min:ee.min,max:ee.max,step:ee.step,fallback:w})),s=e.top??E.min,d=e.bottom??E.min,u="sectionPaddingLeft",f="sectionPaddingRight",p=e.sideBounds??E,h=e.side??p.min,b=e.sidePhone??h,C=e.phone===!0,T=_=>C?g("desktop",_):_;return D({...o?{_gSpacing:y("Padding")}:{},[t]:T(a(s)),...C?{[F(t)]:c("Top",t,s)}:{},...e.only==="top"?{}:{[n]:T(K(i("Bottom"),r(Re,{}),E.min,E.max,E.step,d,"px")),...C?{[F(n)]:c("Bottom",n,d)}:{}},...e.sides?{[u]:T(K(i("Left"),r(Te,{}),p.min,p.max,p.step,h,"px")),...C?{[F(u)]:c("Left",u,b,p)}:{},[f]:T(K(i("Right"),r(we,{}),p.min,p.max,p.step,h,"px")),...C?{[F(f)]:c("Right",f,b,p)}:{}}:{}})}const $=["top","right","bottom","left"],Er={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},dt=e=>typeof e=="number"?e:null;function Rr(e,t,n){const o={};for(const i of $)n[i]!==t[i]&&(o[e[i]]=n[i]??void 0);return o}function Tr({tier:e,o:t}){let n=null;try{n=pe()}catch{n=null}const o=n?.values??{},i=e==="mobile"?t.phoneKeys:t.keys,a=Object.fromEntries($.map(u=>[u,dt(o[i[u]])])),c=Object.fromEntries($.map(u=>[u,String(e==="mobile"?dt(o[t.keys[u]])??t.fallback[u]:t.fallback[u])])),[s,d]=z(()=>gn(a,c));return r(m,{label:l("Padding"),icon:r(Yt,{}),action:r(ve,{each:s,label:l("Each side"),onChange:d}),children:r(hn,{label:l("Padding"),each:s,value:a,placeholder:c,min:t.min,max:t.max,step:t.step,onChange:u=>{const f=Rr(i,a,u);Object.keys(f).length&&n?.onChangeMany(f)},words:{sides:{top:l("Padding top"),right:l("Padding right"),bottom:l("Padding bottom"),left:l("Padding left")},vertical:l("Top and bottom"),horizontal:l("Left and right"),unit:"px"}})})}function Dl(e={}){const t={...Er,...e.keys},n={keys:t,phoneKeys:Object.fromEntries($.map(s=>[s,F(t[s])])),fallback:{top:0,right:0,bottom:0,left:0,...e.fallback},min:e.min??0,max:e.max??200,step:e.step??4},o=e.phone!==!1,i=s=>{const d={type:"custom",render:()=>r(Tr,{tier:s,o:n})};return o?g(s,d):d},a=()=>oe({type:"custom",render:()=>r(Ke,{})},"always"),c=$.filter(s=>s!=="top");return D({...e.group===!1?{}:{_gSpacing:y("Padding")},[n.keys.top]:i("desktop"),...o?{[n.phoneKeys.top]:i("mobile")}:{},...Object.fromEntries(c.map(s=>[n.keys[s],{...a(),reachedBy:n.keys.top}])),...o?Object.fromEntries(c.map(s=>[n.phoneKeys[s],g("mobile",a())])):{}})}const wr={contained:"Contained",page:"Page",full:"Full"},Z="Width";function Bl(e,t=No,n=!0){const o=t.map(i=>({label:vo[i]??wr[i],value:i}));return D({...n?{_gWidth:y(Z)}:{},widthMode:{type:"custom",render:({onChange:i,field:a})=>r(m,{label:l(Z),icon:r(on,{}),action:n?r(Uo,{inherited:a?.inherited??!1,onReset:()=>i(Fo),label:Z}):void 0,children:Q({options:o,value:a?.currentValue||e,onChange:i,ariaLabel:Z})})}})}function Hl(){const e=o=>({type:"custom",render:({value:i,onChange:a})=>r(m,{label:U,icon:O(r(jt,{})),action:o?o(a):void 0,children:Q({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(i)?i:"auto",onChange:a,ariaLabel:U})})}),t=()=>({type:"custom",render:({value:o,onChange:i,field:a})=>{const c=a?.unit==="%"?"%":"px",s=c==="%"?to:eo;return r("div",{className:"sf-field",children:M({min:s.min,max:s.max,step:s.step,value:typeof o=="number"?o:s.fallback,suffix:c,ariaLabel:U,onChange:i})})}}),n=()=>de("Unit",r(Ee,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return D({_gHeight:y(U),sectionHeightMode:g("desktop",e()),sectionHeightValue:g("desktop",t()),sectionHeightUnit:g("desktop",n()),sectionHeightModePhone:g("mobile",e(o=>r(Or,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:g("mobile",t()),sectionHeightUnitPhone:g("mobile",n())})}function Or({onClear:e}){const t=L(),n=qn(t),o=Jn(t),i=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return r(S,{words:x()?.panel,label:l(U),changed:n,detail:i,onReset:e})}function Gl(){const e=n=>({type:"custom",render:({value:o,onChange:i,id:a,name:c})=>r(Pr,{value:o,onChange:i,labelId:`${a??c??"stickTop"}-label`,phone:n})}),t=()=>({type:"custom",render:({value:n,onChange:o})=>r("div",{className:"sf-field",children:M({min:q.min,max:q.max,step:q.step,value:typeof n=="number"?n:q.fallback,suffix:"px",ariaLabel:l("Distance from top"),onChange:o})})});return{_gStick:y(ie),stickTop:g("desktop",e(!1)),stickTopDistance:g("desktop",t()),stickTopPhone:g("mobile",e(!0)),stickTopDistancePhone:g("mobile",t())}}function Pr({value:e,onChange:t,labelId:n,phone:o}){const i=L(),a=Qn(i),c=o?a.phone:e===!0;return r(m,{label:l(ie),labelId:n,icon:O(r(Qt,{})),action:k(R,{children:[o?r(S,{words:x()?.panel,label:l(ie),changed:Zn(i),detail:l("{value} on desktop",{value:a.desktop?`${a.desktopDistance}px`:l("Off")}),onReset:()=>t(void 0)}):null,r(Fe,{checked:c,onChange:t,ariaLabelledBy:n})]})})}function Ml(){return{_gAnchor:y("Anchor"),anchor:Yo("Anchor name","e.g. about",jo)}}function Kl(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=`${a??c??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return r(m,{label:l(e),icon:t,htmlFor:s,hint:n===void 0?void 0:l(n),children:r(Ln,{id:s,value:Number.isFinite(d)?new Date(d):null,onChange:u=>i(u?u.toISOString():"")})})}}}function A(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=typeof o=="boolean"?o:t,d=`${a??c??e}-label`;return r(m,{label:l(e),labelId:d,icon:n,action:r(Fe,{checked:s,onChange:i,ariaLabelledBy:d})})}}}function Wl(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const i=`${String(n??o??"pageBackground")}-colour`;return r(m,{label:l("Background"),icon:r(Pe,{}),htmlFor:i,action:r(Ge,{id:i,label:"Background",value:ln(e),onChange:t})})}}}function Ul(e,t){return{type:"custom",render:({value:n,onChange:o,id:i})=>{const a=typeof n=="boolean"?n:t,c=`${i??e}-checkbox`;return r(m,{label:l(e),htmlFor:c,className:"sf-checkbox",action:r(Pn,{id:c,checked:a,onChange:o})})}}}function Xl(e,t){return{type:"custom",render:({value:n,onChange:o})=>r(m,{label:l(e),action:Ge({value:n||t,onChange:o,label:e})})}}const kr=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function ut({label:e,value:t,onChange:n,points:o=kr}){const i=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return r(On,{label:l(e),value:t,points:i,onChange:n})}function $l(e,t=De,n="mediaImage"){return{type:"custom",render:({value:o,onChange:i})=>r("div",{className:"sf-focal-row",children:r(Lr,{label:e,value:o||t,onChange:i,imageProp:n})})}}function Lr({label:e,value:t,onChange:n,imageProp:o}){const{selectedItem:i}=N(c=>c),a=i?.props?.[o];return r(Xn,{label:e,value:t,onChange:n,image:typeof a=="string"?a:void 0})}const Ar=ye([]);function jl(e,{stacking:t,fallback:n=Rt}){return{type:"custom",render:({value:o,onChange:i})=>{const a=Et.includes(o)?o:n;return t?r(Nr,{label:e,value:a,onChange:i}):pt({label:e,value:a,onChange:i,points:Ar})}}}function Nr({label:e,value:t,onChange:n}){const{appState:o,selectedItem:i}=N(s=>s),a=i?.props?.id?String(i.props.id):void 0,c=a?It(o?.data,a):[];return pt({label:e,value:t,onChange:n,points:ye(c,a)})}function pt({label:e,value:t,onChange:n,points:o}){const i=o.find(a=>a.disabled);return r(m,{label:l(e),icon:r(Jt,{}),hint:i?.title?l(i.title):void 0,children:ut({label:e,value:Tt(t),onChange:n,points:o})})}const zl={top:r(Kt,{}),right:r(Mt,{}),bottom:r(Ht,{}),left:r(Gt,{})};function Vl(e,t,n,o,i,a){const c=f=>t.find(p=>p.value===f),s=f=>({value:f,label:"",disabled:!0,title:o}),d=f=>{const p=t.find(b=>b.cell===f);if(!p)return s(`missing-${f}`);const h=a?.[f];return h?{value:p.value,label:p.label,icon:h}:{value:p.value,label:p.label}},u=[s("corner-top-left"),d("top"),s("corner-top-right"),d("left"),s("centre"),d("right"),s("corner-bottom-left"),d("bottom"),s("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:p})=>{const h=t.some(b=>b.value===f)?f:n;return r(m,{label:l(e),icon:i,value:c(h)?.label?l(c(h).label):"",children:ut({label:e,value:h,onChange:p,points:u})})}}}const vr="\0note";function P(e,t,n,o,i){return{type:"custom",options:n,fallback:o,...i?{note:i}:{},render:({value:a,onChange:c,field:s})=>{const d=s.options??n,u=s.fallback??o,f=d.some(p=>p.value===a)?a:u;return r(m,{label:l(e),icon:O(t),children:r(Sn,{value:f,ariaLabel:l(e),onChange:c,options:[...i?[{label:l(i),value:vr,disabled:!0}]:[],...d.map(p=>({label:l(p.label),value:p.value}))]})})}}}function Yl(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:i,field:a})=>r(jn,{label:e,options:(a.options??t).map(c=>({...c,label:l(c.label)})),value:Array.isArray(o)?o:[],onChange:i,...n?{emptyLabel:l(n)}:{}})}}function ql(e,t,n,o){return{type:"custom",options:t,fallback:n,render:({value:i,onChange:a,field:c})=>r(Vn,{label:e,options:(c.options??t).map(s=>({...s,label:l(s.label)})),fallback:c.fallback??n,value:i,onChange:a,placeholder:o===void 0?void 0:l(o)})}}function Jl(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const i={value:n,onChange:o,...t};return r(e,{...i})}}}function Q({options:e,value:t,onChange:n,ariaLabel:o,disabled:i=!1}){return r(mn,{options:e.map(a=>a.picture?{id:a.value,label:a.picture,title:l(a.title??a.label)}:{id:a.value,label:l(a.label),title:a.title===void 0?void 0:l(a.title)}),value:t,onChange:n,ariaLabel:l(o),disabled:i})}const Zl=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function de(e,t,n,o){const i=n.map(a=>typeof a=="string"?{label:a,value:a}:a);return{type:"custom",render:({value:a,onChange:c,field:s})=>r(m,{label:l(e),icon:O(t),children:Q({options:i,value:i.some(d=>d.value===a)?a:a||s?.currentValue||o,onChange:c,ariaLabel:e})})}}function Ql(e,t,n){return{type:"custom",[ge]:!0,render:({value:o,onChange:i})=>r($n,{value:o||"",onChange:i,label:e,accept:t,placeholder:n})}}const ea={HeroSingle:["imageFocal"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function ta({value:e,onChange:t,label:n}){const o=e||{},i=!!o.pending,a=i?"var(--fg-dim, #888)":o.ok?"#1d9e75":"#d85a30",c=(s,d)=>t({...o,[s]:d===""?void 0:Number(d)});return k(m,{label:l(n),icon:r(ne,{}),children:[r("button",{type:"button",disabled:i,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"8px 10px",fontSize:13,cursor:i?"default":"pointer",opacity:i?.6:1,border:"1px solid var(--border-strong, #ccc)",borderRadius:6,background:"transparent",color:"inherit"},children:i?l("Finding…"):l("Find coordinates")}),o.status&&r("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:a},children:l(o.status)}),r("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:l("Coordinates from OpenStreetMap")}),r("button",{type:"button",onClick:()=>t({...o,manual:!o.manual}),style:{marginTop:8,padding:0,border:"none",background:"none",font:"inherit",fontSize:12,color:"var(--sf-accent, #2563eb)",cursor:"pointer",textDecoration:"underline"},children:o.manual?l("Hide manual coordinates"):l("Enter coordinates manually")}),o.manual&&k("div",{style:{marginTop:8,display:"grid",gap:8},children:[r(m,{label:l("Latitude"),icon:r(ne,{}),children:r("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"34.0990198"}),value:typeof o.lat=="number"?o.lat:"",onChange:s=>c("lat",s.target.value)})}),r(m,{label:l("Longitude"),icon:r(ne,{}),children:r("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"-117.9842833"}),value:typeof o.lng=="number"?o.lng:"",onChange:s=>c("lng",s.target.value)})})]})]})}function Fr(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Dr(e,t,n){const o=e.map(i=>({text:i?.text??""}));return t===null||t<0||t>=e.length?o:o.map((i,a)=>a===t?{text:n}:i)}function na(e,t){return e===null?null:t>e?e:null}function Br(e,t,n){if(n===null||n>=t.length)return null;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return null;return e[n]!==t[n]&&t.includes(e[n])||e[n]!==t[n]&&t.length!==e.length?null:n}const oa={label:"Ticker items",icon:r(Vt,{})};function ra(e,t,n,o){return{type:"custom",[I]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},render:({value:i,onChange:a})=>r(Hr,{label:e,icon:O(t),items:Array.isArray(i)?i:[],placeholder:n,onChange:a,markup:o==="markup"})}}function Hr({label:e,icon:t,items:n,placeholder:o,onChange:i,markup:a=!1}){const c=te(null),[s,d]=z(null),u=p=>p.map(h=>({text:h?.text??""})),f=p=>{const h=Br(n,p,s);h===null&&(c.current=null),d(h),i(u(p))};return r(yn,{label:l(e),icon:t,noun:l("item"),items:n,onChange:f,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?r(Me,{target:c,value:Fr(n,s),onChange:p=>i(Dr(n,s??-1,p)),disabled:s===null,label:s===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:s+1})}):void 0,renderRow:(p,h,b)=>r("input",{type:"text",className:a&&s===h?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:h+1}),onChange:C=>b({text:C.target.value}),onFocus:C=>{c.current=C.currentTarget,d(h)}})})}function ia(e,t){const n=`${e.label} — row ${t+1}`;return G({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:i})=>r(H,{value:o,onChange:i,label:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function la(e){return{_gCards:y("Cards"),coverIndex:P("Cover image",r(zt,{}),Kn,String(Wn),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:tr("Image background",xo),cardImage:Mr(),spinOnHover:A("Rotate on hover",e?.spinDefault??!0,r(en,{}))}}function aa(){return{outline:P("Card outline",r(tn,{}),Hn,Mn),indexBadge:P("Card number",r(Ee,{}),Bn,Gn),showBadge:A("Product badge",!0,r(ke,{noun:"tag"}))}}function sa(e){const t=e&&"bottomDefault"in e?e.bottomDefault:!0,n=e&&"defaults"in e?e.defaults:{showCardSizes:t,showCardBuy:t,showCardPage:t};return{_gShowOnCard:y("Show on a card"),showCardPrice:A("Price",!0,r(Wt,{})),showCardFinishes:A("Finish swatches",!0,r(Ut,{})),showCardSizes:A("Sizes",n.showCardSizes,r(Zt,{})),showCardBuy:A("Buy button",n.showCardBuy,r(Ft,{})),showCardPage:A("Page button",n.showCardPage,r(Pe,{}))}}function ca(e,t="display"){const n=F(t);return{[t]:g("desktop",{type:"custom",render:({value:o,onChange:i})=>r(ft,{parts:e,changed:_n(o),shown:a=>In(o,a),onPress:(a,c)=>i(Tn(o,a,c)),onReset:()=>i(void 0)})}),[n]:g("mobile",{type:"custom",render:({value:o,onChange:i})=>r(Gr,{parts:e,desktopKey:t,value:o,onChange:i})})}}function ft({parts:e,changed:t,shown:n,onPress:o,onReset:i,detail:a}){const c=l("Display");return r(m,{label:c,icon:r(kt,{}),changed:t,action:r(S,{words:x()?.panel,label:c,changed:t,detail:a,onReset:i}),children:r(Cn,{label:c,items:e.map(s=>({id:s.id,label:l(s.label),shown:n(s.id)})),onChange:o})})}function Gr({parts:e,desktopKey:t,value:n,onChange:o}){const i=L()[t];return r(ft,{parts:e,changed:Rn(n),shown:a=>En(i,n,a),onPress:(a,c)=>o(wn(n,a,c)),onReset:()=>o(Fn),detail:l("the same as Desktop")})}function Mr(){return ot("Card image",{min:v,max:xe,step:xt,hint:"Rounds the picture. The card's own corner is in Site styles."})}function da(){return se({sidesKey:"cornerSides",step:St,useFollowed:()=>v,mark:r(Kr,{label:yt}),hint:l("Rounds the picture. Left alone it stays square.")})}function Kr({label:e,changed:t=!1,onReset:n=()=>{}}){return r(S,{words:x()?.panel,label:l(e),changed:t,onReset:n})}function ua(){return{type:"custom",render:({value:e,onChange:t})=>r(Wr,{value:typeof e=="string"?e:"",onChange:t})}}function Wr({value:e,onChange:t}){const[n,o]=z(null),i=Se.filter(c=>n===null||W[c].across===n),a=e&&e in W?W[e]:null;return k(R,{children:[r(m,{label:l("Photos in a row"),icon:r(Dt,{}),children:k("div",{className:"sf-gallery-filter",children:[r("button",{type:"button","aria-pressed":n===null,onClick:()=>o(null),children:l("All")}),_t.map(c=>r("button",{type:"button","aria-pressed":n===c,onClick:()=>o(c),children:c},c))]})}),r(m,{label:l("Layout"),icon:r(Xt,{}),value:a?l(a.label):l("Not chosen"),hint:l("{n} of {total} layouts",{n:i.length,total:Se.length}),children:r(Be,{className:"sf-gallery-layouts",label:l("Layout"),value:e,onChange:t,onClear:()=>t(""),options:i.map(c=>({value:c,label:l(W[c].label),picture:r("span",{className:"sf-gallery-pic",children:W[c].desktop.map(([s,d],u)=>r("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${d}`}},u))})}))})})]})}export{jo as ANCHOR_HINT,nl as BOUND_TO_POST_NOTE,sl as BUCKET_ICONS,ea as CUSTOM_FIELD_MEDIA,ta as CoordsField,zl as EDGE_ARROWS,De as FOCAL_DEFAULT,kr as FOCAL_POINTS,V as FOLD_FIELD_MARKER,ut as FocalPicker,er as GroupLabel,$o as HIGHLIGHT_HINT,H as HidableTextField,he as LINK_FIELD_MARKER,Vi as Label,ge as MEDIA_FIELD_MARKER,Zl as MEDIA_TYPE_OPTIONS,Zo as PanelNoteLine,yr as PhoneChoiceRow,Sr as PhoneChoiceStrip,pt as PlacementGridView,be as SCAFFOLD_FIELD_MARKER,ha as SCALAR_TEXT_CONTROLS,lt as SECTION_BLEEDS_HINT,Er as SIDE_PAD_KEYS,qo as SectionHeading,Q as Segmented,Wo as SiteGapDefaultReset,M as Slider,nt as Swatches,ma as TEXT_CONTROL_KINDS,I as TEXT_FIELD_MARKER,oa as TICKER_ITEMS_ROW,Hr as TextListField,Uo as WidthDefaultReset,Br as aimAfterListChange,Ml as anchorFields,B as backTo,xl as backgroundField,Tl as boxAlignField,Pl as boxBlockSpacingField,Rl as boxJustifyField,kl as boxPhoneRowField,Ol as boxShareField,wl as boxWrapField,fl as bucketHeader,fr as cardCornersField,tr as cardImageBackgroundField,Mr as cardImageField,la as cardMediaFields,El as cardShapeFields,sa as cardShowFields,aa as cardStyleFields,Nl as cellWidthFields,Ul as checkbox,Xl as colorInput,il as copyText,it as cornerSidesField,se as cornersRowField,Kl as dateTime,hl as designGroupHeader,Ll as directionField,ca as displayFields,Vl as edgePad,cl as entriesHiddenForTab,$l as focalPicker,na as focusAfterRemove,gl as foldMarker,Y as foldMetaOf,Qo as foldTitleOf,ua as galleryLayoutField,yl as gapField,y as group,Hl as heightFields,me as hidableText,Vo as hintIsWhileTyping,O as iconOf,da as imageCornersField,tl as inOwnBox,pl as isBucketHeader,ml as isDesignGroupHeader,Go as isNoGlyph,ll as linkField,Yl as multiSelect,Ho as noGlyph,Wl as pageBackgroundField,dl as panelNote,vl as phoneChoiceField,xr as phoneOverrideField,jl as placementField,Yo as plainText,al as plainTextarea,ot as pxField,bl as quietMarker,fe as readHidable,Fr as rowText,ql as searchSelect,ul as section,_l as sectionAnimationFields,st as sectionBorderField,ir as sectionCornersField,Cl as sectionShapeFields,Sl as sectionThemeFields,de as segmented,P as select,Dr as setRowText,Dl as sidesPaddingFields,Rr as sidesPaddingPatch,Al as sizeField,K as slider,Jl as sourceField,Fl as spacingFields,Gl as stickFields,Il as templateField,ol as text,ht as textFieldIdentifier,Ji as textFieldOffPage,Qi as textFieldPanelOnly,ra as textList,ia as textListRowField,rl as textarea,A as toggle,Ql as upload,Mo as usePageWidthDetail,Ko as useSiteGapDetail,Bl as widthField,el as withIdentifier,qi as withOffPage,Zi as withPanelOnly,Yi as withScaffold};
|
|
1
|
+
"use client";import{jsx as r,jsxs as k,Fragment as R}from"react/jsx-runtime";import{cloneElement as pe,useId as ft,useRef as ne,useState as z}from"react";import{useEasel as K,useSelectedFields as fe}from"efficient-easel/easel";import{say as l,editorEaselWords as x}from"../editor-words.js";import{readHidable as me,hidableText as he}from"./hidable.js";import{FOLD_FIELD_MARKER as V,LINK_FIELD_MARKER as ge,MEDIA_FIELD_MARKER as be,SCAFFOLD_FIELD_MARKER as xe,TEXT_FIELD_MARKER as I,foldMetaOf as Y,textFieldIdentifier as mt}from"./field-markers.js";import ht from"../../components/ApplyCornersToSiblings.js";import gt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as bt,CORNER_RADIUS_MAX as Se,CORNER_RADIUS_MIN as N}from"../content/card-image-shape.js";import{IMAGE_CORNER_STEP as xt,IMAGE_CORNERS_LABEL as St}from"../content/image-corners.js";import{GRID_MAX_COLUMNS as yt}from"../content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Ct,GALLERY_LAYOUTS as W,GALLERY_LAYOUT_KEYS as ye}from"../content/gallery-layout.js";import{anchorSiblingsOf as _t,HERO_GROUP_PLACEMENTS as It,HERO_GROUP_PLACEMENT_DEFAULT as Et,normalisePlacement as Rt,placementPoints as Ce}from"../hero-group-placement.js";import Tt from"../../components/KeepHint.js";import{AdjustIcon as wt,AlignLeftIcon as Ot,EyeIcon as Pt,AlignSeparateIcon as kt,AnimationIcon as _e,BackgroundIcon as Lt,BorderAllIcon as At,BlockSectionIcon as Nt,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 Re,HeightIcon as $t,ImageIcon as jt,ListIcon as zt,LocationIcon as oe,PaddingAllIcon as Vt,PaddingBottomIcon as Te,PaddingLeftIcon as we,PaddingRightIcon as Oe,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"../content/page-background.js";import{CORNER_SIDES as Ae,CORNER_SIDE_POINTS as ln,hasOwnSectionCorners as an,normalizeCornerSides as Ne}from"../content/section-corners.js";import{SECTION_MOTION_NONE as sn,SECTION_MOTION_OPTIONS as cn}from"../content/section-animation.js";import{enclosingSectionProps as ve}from"./enclosing-section.js";import{SettingsDefaultReset as S,SettingsField as m,SettingsGroupHead as dn,SettingsGroupSub as un,SettingsBorder as pn,SettingsSegmented as fn,SettingsSides as mn,SettingsSidesEach as Fe,sidesStartEach as hn,SettingsSwitch as De,borderSides as gn,borderStartEach as bn}from"efficient-easel/panel";import{FieldSelect as xn,ListField as Sn}from"efficient-easel/fields";import{DisplayChips as yn}from"efficient-shell/ui";import{desktopDisplayChanged as Cn,partShownOnDesktop as _n,partShownOnPhone as In,phoneDisplayChanged as En,withDesktopPart as Rn,withPhonePart as Tn}from"../content/part-display.js";import{AlignmentGrid as wn,Checkbox as On,CornersInput as Pn,DateTimePicker as kn,FOCAL_DEFAULT as Ln,PictureTiles as Be,Slider as An,Tooltip as He}from"efficient-shell/ui";import{ColourControl as Ge}from"./ColourControl.js";import Me from"./MarkupToolbar.js";import{deviceField as g}from"./device-fields.js";import{NO_CONTROL_FIELD as Nn,NoControlMark as re,noControlField as q}from"./panel-no-control-mark.js";import{OWN_BOX_FIELD as vn}from"./own-box.js";import{PHONE_CLEAR as Fn,phoneKey as v,resolvePhoneValue as ie}from"./phone-override.js";import{SuppressibleText as Dn}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Bn,CARD_OUTLINE_OPTIONS as Hn,DEFAULT_CARD_INDEX_FORMAT as Gn,DEFAULT_CARD_OUTLINE as Mn}from"../sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Kn,DEFAULT_COVER_INDEX as Wn}from"../sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Un}from"./text-control-kinds.js";import Xn from"../../components/MediaUploadField.js";import $n from"../../components/MultiSelectField.js";import jn from"../../components/SectionThemePicker.js";import zn from"../../components/SearchSelectField.js";import Vn from"../../components/StorefrontLinkField.js";import Ke from"../../components/UiIcon.js";import{SECTION_PADDING as E}from"../content/section-padding.js";import{hasPhoneHeight as Yn,resolveSectionMinHeight as qn}from"../content/section-min-height.js";import{SECTION_STICK_DISTANCE as J,SECTION_STICK_LABEL as le,hasPhoneStick as Jn,resolveSectionStick as Zn}from"../content/section-sticky.js";import{SECTION_MIN_HEIGHT as Qn,SECTION_MIN_HEIGHT_GROUP_LABEL as U,SECTION_SCREEN_PCT as eo}from"../content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as to,containerDirectionPoints as no,resolveContainerDirection as We}from"../content/container-direction.js";import{BOX_ALIGN_POINTS as oo,BOX_BLOCK_SPACING_LABEL as ro,BOX_BLOCK_SPACING_POINTS as Ue,BOX_JUSTIFY_POINTS as Xe,BOX_PHONE_ROW_LABEL as io,BOX_PHONE_ROW_MAX as lo,BOX_PHONE_ROW_MIN as $e,BOX_SHARE_LABEL as je,BOX_SHARE_POINTS as ae,BOX_WRAP_LABEL as ao,BOX_WRAP_POINTS as ze}from"../content/box-layout.js";import{usePreviewHeader as X}from"../../components/PreviewHeaderContext.js";import{BORDER_MAX as so}from"../content/borders.js";import{DEFAULT_SURFACES as co,normalizeTheme as uo}from"../theme.js";import{CONTAINER_GAP as se,CONTAINER_GAP_BUILT_IN as po,GAP_FIELD_CONTAINER as fo,hasOwnContainerGap as mo,resolveContainerGap as ho}from"../content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as go,CARD_IMAGE_BG_OFF as bo,CARD_IMAGE_BG_SWATCH_NAMES as xo,CARD_IMAGE_BG_SWATCHES as So,isCardImageBackgroundInheriting as yo,cardImageBackgroundChoice as Co,THEME_CARD_IMAGE_BG as _o}from"../content/card-image-background.js";import{SECTION_BG_INHERIT as Io,SECTION_BG_SWATCHES as Eo,SECTION_BG_SWATCH_NAMES as Ro,THEME_SECTION_BG as To,isSectionBackgroundInheriting as wo}from"../content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Oo}from"../content/section-surface.js";import{TYPE_SIZE_FIXED as Po,TYPE_SIZE_INHERIT as ko,isTypeSizeInheriting as Lo}from"../content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Ao,WIDTH_CHOICE_LABEL as No,WIDTH_INHERIT as vo,resolveWidth as Fo,sectionRunsFullWidth as Ve}from"../content/section-width.js";import{useFoldHeadingLevel as Ye}from"./panel-heading-scope.js";import{withStyleKind as Do}from"efficient-easel/style-clipboard";function F(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!Y(n)&&Do(n,`section:${t}`);return e}function $i({children:e}){return r("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function qe(){return null}function Bo(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return r(qe,{},e)}function Ho(e){return e.type===qe}function O(e){return Ho(e)?void 0:e}function D(e,t){return l("{value} from {from}",{value:e,from:t})}function Go(){const{appState:e}=K(i=>i),t=e.data.root?.props??{},{mode:n,pageWidth:o}=Fo(t,"full");return n==="page"?D(`${o}px`,l("the page")):n==="contained"?D(l("Contained"),l("the page")):D(l("Full"),l("the page"))}function Mo(){const{blockGap:e}=X();return e===null?l("this container's own spacing"):D(`${e}px`,l("Site styles"))}function Ko({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:Mo(),onReset:t})}function Wo({inherited:e,onReset:t,label:n}){return r(S,{words:x()?.panel,label:l(n),changed:!e,detail:Go(),onReset:t})}function B({value:e,onChange:t,label:n,placeholder:o,hint:i,multiline:a,hideable:c=!0,markup:s=!0}){const{text:d,hidden:u}=me(e),f=ne(null),p=ne(null),h=w=>t(c?{text:w,hidden:u}:w),b=()=>t({text:d,hidden:!u}),C=c&&u,T=ft(),_=i?zo(i)?r("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(i)}):r(Tt,{children:l(i)}):void 0,j=u?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return r(m,{label:l(n),icon:r(tn,{}),htmlFor:T,className:C?"is-hidden":void 0,hint:_,action:c?r(He,{content:j,children:r("button",{type:"button",className:"sf-field-eye","aria-pressed":u,"aria-label":j,onClick:b,children:u?r(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:h}),a?r("textarea",{id:T,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:w=>h(w.target.value)}):r("input",{id:T,ref:f,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:w=>h(w.target.value)})]})})}function ji(e,t){return{...e,[xe]:t}}function zi(e){const t=e[I];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[I]:{...t,offPage:!0}}}function Vi(e){return!e||typeof e!="object"?!1:e[I]?.offPage===!0}const Je="sfPanelOnly";function Yi(e){if(!e[I])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Je]:!0}}function qi(e){return!!e&&typeof e=="object"&&e[Je]===!0}function Ji(e){const t=e[I];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[I]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as ua,SCALAR_TEXT_CONTROLS as pa}from"./text-control-kinds.js";function Zi(e,t){if(!e[I])throw new Error("inOwnBox: the field holds no authored text");const{[Nn]:o,...i}=e;return{...i,[vn]:!0,render:t}}const Uo=new Set(Un),H=(e,t)=>{const n={...t,[I]:e};if(!Uo.has(e.control))return n;const o=t.render;return{...q(n,"authored-copy"),render:i=>r(Dn,{name:i.name,children:o(i)})}},Qi="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Xo="Select a word, then press the highlighter.",$o="A short name so a link can jump straight to this section, like yoursite.com/page#about.",jo=new Set([Xo]),zo=e=>jo.has(e);function el(e,t,n){return H({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(B,{value:o,onChange:i,label:e,placeholder:t,hint:n})})}function tl(e,t,n){return H({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(B,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0})})}function Vo(e,t,n){return H({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(B,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function nl(e,t,n){return H({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(B,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1})})}function ol(e){return{type:"custom",[ge]:{label:e},render:({value:t,onChange:n})=>r(Vn,{value:he(t),onChange:n,label:e})}}function rl(e,t,n){return H({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(B,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const il={Design:wt,Animation:_e};function ll(e,t){return e.includes("Design")?t!=="Design":null}function Yo({label:e}){return r(dn,{title:l(e),level:Ye(1)})}function qo({level:e,label:t}){return e===1?r(Yo,{label:t}):r(Qo,{label:t})}function Ze(e,t){return{type:"custom",[V]:{label:e,level:t},render:()=>r(qo,{level:t,label:e})}}function y(e){return Ze(e,2)}function al(e){return{type:"custom",render:()=>r(Jo,{text:e})}}function Jo({text:e}){return r("p",{className:"sf-note",children:l(e)})}function sl(e){return Ze(e,1)}function cl(e){return Y(e)!==null&&e?.tabs!==void 0}const Qe=new Map;function dl(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Qe.get(n)??{type:"custom",tabs:t,[V]:{label:e,level:1},bucket:e,marker:!0,render:()=>r(R,{})};return Qe.set(n,o),o}function ul(e){return Y(e)!==null&&e?.designGroup!==void 0}const et=new Map;function pl(e){const t=et.get(e)??{type:"custom",[V]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>r(R,{})};return et.set(e,t),t}function Zo(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function fl(e,t){return Zo(e)===t?e:{...e,marker:!0,fold:t,render:()=>r(R,{})}}function ml(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>r(R,{})}}function Qo({label:e}){return r(un,{title:l(e),level:Ye(2)})}function tt({swatches:e,current:t,onPick:n,names:o}){const i=e.find(s=>s.toLowerCase()===t.toLowerCase()),a=i?o?.[i]:void 0,c=a?l(a):t;return 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 hl(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=wo(n,t);return r(m,{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(Io)}),children:tt({swatches:Eo,current:i?To:n??t??"",onPick:o,names:Ro})})}}}function er(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=n,a=yo(i,t);return r(m,{label:l(e),icon:r(Xt,{}),changed:!a,action:r(S,{words:x()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(go)}),children:tt({swatches:So,current:a?_o:Co(i,t),onPick:o,names:xo})})}}}function gl(e=n=>n,t){return F({_gSectionTheme:y(Oo),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>r(jn,{value:e(n),onChange:o,followLabel:t})}})}function G({min:e,max:t,step:n,value:o,onChange:i,suffix:a="",readout:c=!0,notch:s,ariaLabel:d,disabled:u=!1}){const f=s!==void 0&&Number.isFinite(s)&&s>=e&&s<=t;return r("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(s-e)/(t-e)}:void 0,children:r(An,{min:e,max:t,step:n,value:o,suffix:a||void 0,showInput:c,label:d===void 0?void 0:l(d),disabled:u,size:"sm",className:"sf-slider-track",onChange:p=>{p!==null&&p!==o&&i(p)}})})}function M(e,t,n,o,i,a,c="",s){return{type:"custom",render:d=>r(m,{label:l(e),icon:O(t),action:s?s("storedValue"in d?d.storedValue:d.value,d.onChange):void 0,children:G({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 h=typeof f=="number"?f:null,b=h===null;return r(m,{label:l(e),icon:u?O(u):void 0,value:b?d||a===void 0?void 0:l(a):`${h}px`,changed:!b,action:d?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:h,label:e,onChange:p}):G({min:n,max:o,step:i,value:h??n,readout:!1,ariaLabel:e,onChange:p})})}}}function bl(e){const t=M("Gap",r(Ee,{}),se.min,se.max,se.step,po[e],"px",(n,o)=>r(Ko,{inherited:!mo(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[fo]:e,render:n=>t.render({...n,value:ho(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}const Z="Corners";function 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(m,{label:l(Z),icon:r(Dt,{}),changed:i,action:pe(e.mark,{changed:i,onReset:()=>n(null)}),hint:e.hint,children:r(tr,{tier:e,px:o,onRadius:n})})}}}function ot(e){let t=null;try{t=fe()}catch{t=null}return[t?.values?.[e],n=>t?.onChange(e,n)]}function tr({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),i=e.useClosedReason?e.useClosedReason():null,[a,c]=ot(e.sidesKey),s=Ne(a)??[...Ae];return r(Pn,{label:l(Z),value:s,corners:ln,onChange:d=>{const u=Ne(d)??[];c(u.length===Ae.length?null:u)},radius:t,onRadiusChange:n,radiusMin:N,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 nr({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=X(),i=typeof o=="number"?`${o}px`:l("not set");return r(S,{words:x()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):D(i,l("Site styles")),onReset:n})}function or(){const{cornerRadiusPx:e}=X();return typeof e=="number"?e:N}function rr(){return ce({sidesKey:"sectionCornerSides",useFollowed:or,useClosedReason:()=>lt()?l(it):null,mark:r(nr,{label:Z}),hint:r(ir,{})})}const it="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function lt(){return Ve(L())}function ir(){return r(R,{children:lt()?it:"Follows Site styles ▸ Basics ▸ Corners until you set a number here."})}function xl(){return F({_gShape:y("Shape"),sectionCorners:rr(),sectionCornerSides:rt(),sectionBorder:at("desktop"),sectionBorderPhone:at("mobile")})}const lr=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function ar(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function sr(){let e;try{const t=uo(X().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||co.line}function cr({value:e,onChange:t,tier:n}){const[o]=ot("sectionBorder"),i=sr(),a=e&&typeof e=="object"?e:{},c=n==="mobile"?o&&typeof o=="object"?o:{}:{},[s,d]=z(()=>bn(a,c)),u=lr();return r(m,{label:l("Border"),icon:r(At,{}),action:r(Fe,{each:s,label:l("Each side"),onChange:d}),children:r(pn,{label:l("Border"),value:a,each:s,onChange:f=>t(ar(f)),placeholder:{sides:gn(c),style:c.style??"solid",color:c.color||i},presets:[i],words:u,max:so})})}function at(e){return g(e,{type:"custom",render:({value:t,onChange:n})=>r(cr,{value:t,onChange:n,tier:e})})}function Sl(){return{_gMotion:y("Motion"),sectionAnimation:ue("Entrance",r(_e,{}),[...cn],sn)}}function de(){let e=null;try{const{appState:t,selectedItem:n}=K(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}=X(),n=de(),o=typeof t=="number"?t:e;let i=null;try{const{appState:c,selectedItem:s}=K(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 dr({label:e,changed:t=!1,onReset:n=()=>{}}){const o=de(),i=st(N),a=o?"Site":"Section";return r(S,{words:x()?.panel,label:l(e),changed:t,detail:D(`${i}px`,o?l("Site styles"):l("the section")),onReset:n})}function ur(){return r(R,{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 pr(){return ce({sidesKey:"cardCornerSides",useFollowed:()=>st(N),mark:r(dr,{label:Z}),hint:r(ur,{})})}function fr(){return{type:"custom",render:()=>r(ht,{})}}function yl(e){return{...e,render:t=>r(gt,{render:e.render,props:t})}}function Cl(){return{_gShape:y("Shape"),cardCorners:pr(),cardCornerSides:rt(),cardCornersApplyAll:fr()}}function _l(){return P("Justify",r(kt,{}),Xe,Xe[0].value)}function Il(){return P("Item alignment",r(Ot,{}),oo,"stretch")}function El(){return P(ao,r(on,{}),ze,ze[0].value)}function Rl(){return{type:"custom",render:({value:e,onChange:t})=>{const n=ae.find(o=>o.value===e)??ae[0];return r(m,{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:mr(o.weights).map((i,a)=>r("i",{style:{gridColumn:`span ${i}`}},a))})}))})})}}}function mr(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function Tl(){return P(ro,r(Ee,{}),Ue,Ue[0].value)}function wl(){return M(io,r(Yt,{}),$e,lo,1,$e)}function Ol(e){const t=ue(to,Bo("`Direction` names how a container's children run — a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; editor-shell's own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),no(e),We(e,void 0));return{type:"custom",render:n=>t.render({...n,value:We(e,n.value),onChange:o=>n.onChange(o)})}}function Pl(e,t,n,o,i,a){return{type:"custom",render:({value:c,onChange:s})=>r(m,{label:l(e),icon:r(Le,{noun:a}),action:r(S,{words:x()?.panel,label:l(e),changed:!Lo(c),detail:l("the Text style in Site styles"),onReset:()=>s(ko),defaultAction:{onPress:()=>s(Po),title:l("Keep this section's own built-in size"),icon:r(Nt,{})}}),children:G({min:t,max:n,step:o,value:typeof c=="number"?c:i,suffix:"px",ariaLabel:e,onChange:s})})}}function kl(){return{_gCellWidth:y("Cell width"),gridSpan: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 L(){let e=null;try{e=K(t=>t).selectedItem}catch{e=null}return e?.props??{}}function hr({min:e,max:t,step:n,px:o,label:i,onChange:a,desktopKey:c,fallback:s}){const d=L()[c],u=ie(void 0,d,s);return r(R,{children:G({min:e,max:t,step:n,value:ie(o,d,s),readout:!1,ariaLabel:i,notch:u,onChange:a})})}function gr({label:e,desktopKey:t,fallback:n,changed:o=!1,onReset:i=()=>{}}){const a=L()[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 br(e){return nt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:r(gr,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>r(hr,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}function Ll(e){return{type:"custom",render:({value:t,onChange:n})=>r(Sr,{...e,value:t,onChange:n})}}function xr({label:e,icon:t,options:n,value:o,resolved:i,restWord:a,onChange:c}){const s=n.some(d=>d.value===o);return r(m,{label:l(e),icon:O(t),action:r(S,{words:x()?.panel,label:l(e),changed:s,detail:l("{value} on desktop",{value:l(a)}),onReset:()=>c(void 0)}),children:ee({options:n,value:s?o:i,onChange:d=>c(d),ariaLabel:e})})}function Sr({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(xr,{label:e,icon:t,options:n,value:a,resolved:d,restWord:u,onChange:c})}const yr={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Cr={Top:Pe,Bottom:Te,Left:we,Right:Oe},_r=e=>{const t=Cr[e];return r(t,{})};function Al(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,i=_=>yr[_],a=_=>M(i("Top"),r(Pe,{}),E.min,E.max,E.step,_,"px"),c=(_,j,w,te=E)=>g("mobile",br({label:i(_),icon:_r(_),desktopKey:j,min:te.min,max:te.max,step:te.step,fallback:w})),s=e.top??E.min,d=e.bottom??E.min,u="sectionPaddingLeft",f="sectionPaddingRight",p=e.sideBounds??E,h=e.side??p.min,b=e.sidePhone??h,C=e.phone===!0,T=_=>C?g("desktop",_):_;return F({...o?{_gSpacing:y("Padding")}:{},[t]:T(a(s)),...C?{[v(t)]:c("Top",t,s)}:{},...e.only==="top"?{}:{[n]:T(M(i("Bottom"),r(Te,{}),E.min,E.max,E.step,d,"px")),...C?{[v(n)]:c("Bottom",n,d)}:{}},...e.sides?{[u]:T(M(i("Left"),r(we,{}),p.min,p.max,p.step,h,"px")),...C?{[v(u)]:c("Left",u,b,p)}:{},[f]:T(M(i("Right"),r(Oe,{}),p.min,p.max,p.step,h,"px")),...C?{[v(f)]:c("Right",f,b,p)}:{}}:{}})}const $=["top","right","bottom","left"],Ir={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},ct=e=>typeof e=="number"?e:null;function Er(e,t,n){const o={};for(const i of $)n[i]!==t[i]&&(o[e[i]]=n[i]??void 0);return o}function Rr({tier:e,o:t}){let n=null;try{n=fe()}catch{n=null}const o=n?.values??{},i=e==="mobile"?t.phoneKeys:t.keys,a=Object.fromEntries($.map(u=>[u,ct(o[i[u]])])),c=Object.fromEntries($.map(u=>[u,String(e==="mobile"?ct(o[t.keys[u]])??t.fallback[u]:t.fallback[u])])),[s,d]=z(()=>hn(a,c));return r(m,{label:l("Padding"),icon:r(Vt,{}),action:r(Fe,{each:s,label:l("Each side"),onChange:d}),children:r(mn,{label:l("Padding"),each:s,value:a,placeholder:c,min:t.min,max:t.max,step:t.step,onChange:u=>{const f=Er(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 Nl(e={}){const t={...Ir,...e.keys},n={keys:t,phoneKeys:Object.fromEntries($.map(s=>[s,v(t[s])])),fallback:{top:0,right:0,bottom:0,left:0,...e.fallback},min:e.min??0,max:e.max??200,step:e.step??4},o=e.phone!==!1,i=s=>{const d={type:"custom",render:()=>r(Rr,{tier:s,o:n})};return o?g(s,d):d},a=()=>q({type:"custom",render:()=>r(re,{})},"always"),c=$.filter(s=>s!=="top");return F({...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 Tr={contained:"Contained",page:"Page",full:"Full"},Q="Width";function vl(e,t=Ao,n=!0){const o=t.map(i=>({label:No[i]??Tr[i],value:i}));return F({...n?{_gWidth:y(Q)}:{},widthMode:{type:"custom",render:({onChange:i,field:a})=>r(m,{label:l(Q),icon:r(nn,{}),action:n?r(Wo,{inherited:a?.inherited??!1,onReset:()=>i(vo),label:Q}):void 0,children:ee({options:o,value:a?.currentValue||e,onChange:i,ariaLabel:Q})})}})}function Fl(){const e=o=>({type:"custom",render:({value:i,onChange:a})=>r(m,{label:U,icon:O(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:U})})}),t=()=>({type:"custom",render:({value:o,onChange:i,field:a})=>{const c=a?.unit==="%"?"%":"px",s=c==="%"?eo:Qn;return r("div",{className:"sf-field",children:G({min:s.min,max:s.max,step:s.step,value:typeof o=="number"?o:s.fallback,suffix:c,ariaLabel:U,onChange:i})})}}),n=()=>ue("Unit",r(Re,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return F({_gHeight:y(U),sectionHeightMode:g("desktop",e()),sectionHeightValue:g("desktop",t()),sectionHeightUnit:g("desktop",n()),sectionHeightModePhone:g("mobile",e(o=>r(wr,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:g("mobile",t()),sectionHeightUnitPhone:g("mobile",n())})}function wr({onClear:e}){const t=L(),n=Yn(t),o=qn(t),i=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return r(S,{words:x()?.panel,label:l(U),changed:n,detail:i,onReset:e})}function Dl(){const e=n=>({type:"custom",render:({value:o,onChange:i,id:a,name:c})=>r(Or,{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:G({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 Or({value:e,onChange:t,labelId:n,phone:o}){const i=L(),a=Zn(i),c=o?a.phone:e===!0;return r(m,{label:l(le),labelId:n,icon:O(r(Zt,{})),action:k(R,{children:[o?r(S,{words:x()?.panel,label:l(le),changed:Jn(i),detail:l("{value} on desktop",{value:a.desktop?`${a.desktopDistance}px`:l("Off")}),onReset:()=>t(void 0)}):null,r(De,{checked:c,onChange:t,ariaLabelledBy:n})]})})}function Bl(){return{_gAnchor:y("Anchor"),anchor:Vo("Anchor name","e.g. about",$o)}}function Hl(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=`${a??c??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return r(m,{label:l(e),icon:t,htmlFor:s,hint:n===void 0?void 0:l(n),children:r(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(m,{label:l(e),labelId:d,icon:n,action:r(De,{checked:s,onChange:i,ariaLabelledBy:d})})}}}function Gl(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const i=`${String(n??o??"pageBackground")}-colour`;return r(m,{label:l("Background"),icon:r(ke,{}),htmlFor:i,action:r(Ge,{id:i,label:"Background",value:rn(e),onChange:t})})}}}function Ml(e,t){return{type:"custom",render:({value:n,onChange:o,id:i})=>{const a=typeof n=="boolean"?n:t,c=`${i??e}-checkbox`;return r(m,{label:l(e),htmlFor:c,className:"sf-checkbox",action:r(On,{id:c,checked:a,onChange:o})})}}}function Kl(e,t){return{type:"custom",render:({value:n,onChange:o})=>r(m,{label:l(e),action:Ge({value:n||t,onChange:o,label:e})})}}const Pr=[{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=Pr}){const i=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return r(wn,{label:l(e),value:t,points:i,onChange:n})}function Wl(){return q({type:"custom",render:()=>r(re,{})},"always")}const kr=Ce([]);function Ul(e,{stacking:t,fallback:n=Et}){return{type:"custom",render:({value:o,onChange:i})=>{const a=It.includes(o)?o:n;return t?r(Lr,{label:e,value:a,onChange:i}):ut({label:e,value:a,onChange:i,points:kr})}}}function Lr({label:e,value:t,onChange:n}){const{appState:o,selectedItem:i}=K(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(m,{label:l(e),icon:r(qt,{}),hint:i?.title?l(i.title):void 0,children:dt({label:e,value:Rt(t),onChange:n,points:o})})}const Xl={top:r(Mt,{}),right:r(Gt,{}),bottom:r(Bt,{}),left:r(Ht,{})};function $l(e,t,n,o,i,a){const c=f=>t.find(p=>p.value===f),s=f=>({value:f,label:"",disabled:!0,title:o}),d=f=>{const p=t.find(b=>b.cell===f);if(!p)return s(`missing-${f}`);const h=a?.[f];return h?{value:p.value,label:p.label,icon:h}:{value:p.value,label:p.label}},u=[s("corner-top-left"),d("top"),s("corner-top-right"),d("left"),s("centre"),d("right"),s("corner-bottom-left"),d("bottom"),s("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:p})=>{const h=t.some(b=>b.value===f)?f:n;return r(m,{label:l(e),icon:i,value:c(h)?.label?l(c(h).label):"",children:dt({label:e,value:h,onChange:p,points:u})})}}}const Ar="\0note";function P(e,t,n,o,i){return{type:"custom",options:n,fallback:o,...i?{note:i}:{},render:({value:a,onChange:c,field:s})=>{const d=s.options??n,u=s.fallback??o,f=d.some(p=>p.value===a)?a:u;return r(m,{label:l(e),icon:O(t),children:r(xn,{value:f,ariaLabel:l(e),onChange:c,options:[...i?[{label:l(i),value:Ar,disabled:!0}]:[],...d.map(p=>({label:l(p.label),value:p.value}))]})})}}}function jl(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:i,field:a})=>r($n,{label:e,options:(a.options??t).map(c=>({...c,label:l(c.label)})),value:Array.isArray(o)?o:[],onChange:i,...n?{emptyLabel:l(n)}:{}})}}function zl(e,t,n,o){return{type:"custom",options:t,fallback:n,render:({value:i,onChange:a,field:c})=>r(zn,{label:e,options:(c.options??t).map(s=>({...s,label:l(s.label)})),fallback:c.fallback??n,value:i,onChange:a,placeholder:o===void 0?void 0:l(o)})}}function Vl(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 Yl=[{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(m,{label:l(e),icon:O(t),children:ee({options:i,value:i.some(d=>d.value===a)?a:a||s?.currentValue||o,onChange:c,ariaLabel:e})})}}function ql(e,t,n,o={}){return{type:"custom",[be]:!0,render:({value:i,onChange:a})=>r(Xn,{value:i||"",onChange:a,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen})}}const Jl={HeroSingle:["imageFocal"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Zl({value:e,onChange:t,label:n}){const o=e||{},i=!!o.pending,a=i?"var(--fg-dim, #888)":o.ok?"#1d9e75":"#d85a30",c=(s,d)=>t({...o,[s]:d===""?void 0:Number(d)});return k(m,{label:l(n),icon:r(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(m,{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(m,{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 Nr(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function vr(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 Ql(e,t){return e===null?null:t>e?e:null}function Fr(e,t,n){if(n===null||n>=t.length)return null;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return null;return e[n]!==t[n]&&t.includes(e[n])||e[n]!==t[n]&&t.length!==e.length?null:n}const ea={label:"Ticker items",icon:r(zt,{})};function ta(e,t,n,o){return{type:"custom",[I]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},render:({value:i,onChange:a})=>r(Dr,{label:e,icon:O(t),items:Array.isArray(i)?i:[],placeholder:n,onChange:a,markup:o==="markup"})}}function Dr({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(h=>({text:h?.text??""})),f=p=>{const h=Fr(n,p,s);h===null&&(c.current=null),d(h),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:Nr(n,s),onChange:p=>i(vr(n,s??-1,p)),disabled:s===null,label:s===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:s+1})}):void 0,renderRow:(p,h,b)=>r("input",{type:"text",className:a&&s===h?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:h+1}),onChange:C=>b({text:C.target.value}),onFocus:C=>{c.current=C.currentTarget,d(h)}})})}function na(e,t){const n=`${e.label} — row ${t+1}`;return H({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:i})=>r(B,{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 oa(e){return{_gCards:y("Cards"),coverIndex:P("Cover image",r(jt,{}),Kn,String(Wn),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:er("Image background",bo),cardImage:Hr(),spinOnHover:A("Rotate on hover",e?.spinDefault??!0,r(Qt,{}))}}function ra(){return{outline:P("Card outline",r(en,{}),Hn,Mn),indexBadge:P("Card number",r(Re,{}),Bn,Gn),showBadge:A("Product badge",!0,r(Le,{noun:"tag"}))}}function ia(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 la(e,t="display"){const n=v(t);return{[t]:g("desktop",{type:"custom",render:({value:o,onChange:i})=>r(pt,{parts:e,changed:Cn(o),shown:a=>_n(o,a),onPress:(a,c)=>i(Rn(o,a,c)),onReset:()=>i(void 0)})}),[n]:g("mobile",{type:"custom",render:({value:o,onChange:i})=>r(Br,{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(m,{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 Br({parts:e,desktopKey:t,value:n,onChange:o}){const i=L()[t];return r(pt,{parts:e,changed:En(n),shown:a=>In(i,n,a),onPress:(a,c)=>o(Tn(n,a,c)),onReset:()=>o(Fn),detail:l("the same as Desktop")})}function Hr(){return nt("Card image",{min:N,max:Se,step:bt,hint:"Rounds the picture. The card's own corner is in Site styles."})}function aa(){return ce({sidesKey:"cornerSides",step:xt,useFollowed:()=>N,mark:r(Gr,{label:St}),hint:l("Rounds the picture. Left alone it stays square.")})}function Gr({label:e,changed:t=!1,onReset:n=()=>{}}){return r(S,{words:x()?.panel,label:l(e),changed:t,onReset:n})}function sa(){return{type:"custom",render:({value:e,onChange:t})=>r(Mr,{value:typeof e=="string"?e:"",onChange:t})}}function Mr({value:e,onChange:t}){const[n,o]=z(null),i=ye.filter(c=>n===null||W[c].across===n),a=e&&e in W?W[e]:null;return k(R,{children:[r(m,{label:l("Photos in a row"),icon:r(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(m,{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(W[c].label),picture:r("span",{className:"sf-gallery-pic",children:W[c].desktop.map(([s,d],u)=>r("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${d}`}},u))})}))})})]})}export{$o as ANCHOR_HINT,Qi as BOUND_TO_POST_NOTE,il as BUCKET_ICONS,Jl as CUSTOM_FIELD_MEDIA,Zl as CoordsField,Xl as EDGE_ARROWS,Ln as FOCAL_DEFAULT,Pr as FOCAL_POINTS,V as FOLD_FIELD_MARKER,dt as FocalPicker,Qo as GroupLabel,Xo as HIGHLIGHT_HINT,B as HidableTextField,ge as LINK_FIELD_MARKER,$i as Label,be as MEDIA_FIELD_MARKER,Yl as MEDIA_TYPE_OPTIONS,Jo as PanelNoteLine,Sr as PhoneChoiceRow,xr as PhoneChoiceStrip,ut as PlacementGridView,xe as SCAFFOLD_FIELD_MARKER,pa as SCALAR_TEXT_CONTROLS,it as SECTION_BLEEDS_HINT,Ir as SIDE_PAD_KEYS,Yo as SectionHeading,ee as Segmented,Ko as SiteGapDefaultReset,G as Slider,tt as Swatches,ua as TEXT_CONTROL_KINDS,I as TEXT_FIELD_MARKER,ea as TICKER_ITEMS_ROW,Dr as TextListField,Wo as WidthDefaultReset,Fr as aimAfterListChange,Bl as anchorFields,D as backTo,hl as backgroundField,Il as boxAlignField,Tl as boxBlockSpacingField,_l as boxJustifyField,wl as boxPhoneRowField,Rl as boxShareField,El as boxWrapField,dl as bucketHeader,pr as cardCornersField,er as cardImageBackgroundField,Hr as cardImageField,oa as cardMediaFields,Cl as cardShapeFields,ia as cardShowFields,ra as cardStyleFields,kl as cellWidthFields,Ml as checkbox,Kl as colorInput,nl as copyText,rt as cornerSidesField,ce as cornersRowField,Hl as dateTime,pl as designGroupHeader,Ol as directionField,la as displayFields,$l as edgePad,ll as entriesHiddenForTab,Ql as focusAfterRemove,Wl as focusKeptField,fl as foldMarker,Y as foldMetaOf,Zo as foldTitleOf,sa as galleryLayoutField,bl as gapField,y as group,Fl as heightFields,he as hidableText,zo as hintIsWhileTyping,O as iconOf,aa as imageCornersField,Zi as inOwnBox,cl as isBucketHeader,ul as isDesignGroupHeader,Ho as isNoGlyph,ol as linkField,jl as multiSelect,Bo as noGlyph,Gl as pageBackgroundField,al as panelNote,Ll as phoneChoiceField,br as phoneOverrideField,Ul as placementField,Vo as plainText,rl as plainTextarea,nt as pxField,ml as quietMarker,me as readHidable,Nr as rowText,zl as searchSelect,sl as section,Sl as sectionAnimationFields,at as sectionBorderField,rr as sectionCornersField,xl as sectionShapeFields,gl as sectionThemeFields,ue as segmented,P as select,vr as setRowText,Nl as sidesPaddingFields,Er as sidesPaddingPatch,Pl as sizeField,M as slider,Vl as sourceField,Al as spacingFields,Dl as stickFields,yl as templateField,el as text,mt as textFieldIdentifier,Vi as textFieldOffPage,qi as textFieldPanelOnly,ta as textList,na as textListRowField,tl as textarea,A as toggle,ql as upload,Go as usePageWidthDetail,Mo as useSiteGapDetail,vl as widthField,Ji as withIdentifier,zi as withOffPage,Yi as withPanelOnly,ji as withScaffold};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,group as q,quietMarker as J,heightFields as E,sectionAnimationFields as w,sectionShapeFields as O,sectionThemeFields as D,sidesPaddingFields as B,stickFields as x,widthField as T}from"./controls.js";import{deviceField as Q,deviceMetaOf as P}from"./device-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"./field-buckets.js";const A=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Texture:"Design","Text style":"Design",Motion:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},G={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,n){const a=`${e}.${t}`;return G[a]??$[a]??I[n]}function he(e,t,n){const a=_(e,t,n);return a?X(a):void 0}function H(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const n of e)for(const a of Object.values(n)){const C=P(a),p=h(C?C.inner:a),u=p?I[p.label]:void 0;if(u)for(const g of H(u))t.includes(g)||t.push(g)}return t}const be=[...S(B(),T("full"),E(),m(),x()),...Object.keys(B()),...Object.keys(T("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],Ce=[...S(D()),...Object.keys(D())],pe=[...S(O()),...Object.keys(O())],ge=[...S(w()),...Object.keys(w())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),ye=[...H(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ke=Object.keys(W()),_e=Object.keys(U({bottomDefault:!0})),oe={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","EmailFormBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","BrandStrip._gContent":"duplicated the Content bucket header above it (66338)","BrandStrip._gStyle":"duplicated the Style bucket header above it (66338)","BrandStrip._gLayout":"duplicated the Layout bucket header above it (66338)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...B(),...T("full"),...E(),...m(),...D(),...O(),...w()};for(const t of Object.keys(M)){const n=h(e[t]),a=n?I[n.label]:void 0;if(!n||n.level!==2||!a||!K[a].includes(n.label))throw new Error(`INJECTED_RETIRED (lib/puck/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const ne=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function Se(e){const t=new Set([...Object.values(d),b.Content]);for(const[n,a]of Object.entries(e))if(!t.has(n)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(oe).filter(n=>n.startsWith(t)).map(n=>n.slice(t.length))}function re(e,t){const n=P(e),a=q(t);return n?Q(n.tier,a):a}function de(e,t){const n=h(t);return n?e==="Content"||e==="Animation"?z(t,n.label):J(t):t}function j(e){return e==="Design"?k:["Animation"]}function ve(e,t){const n=[],a=new Set(ie(t)),C=new Set;let p=!1,u=null;for(const[o,r]of Object.entries(e)){const i=h(r);if(ne.has(o))throw new Error(`${t}.${o}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(o);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${o}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(o===d.Design||o===d.Animation)&&(p=!0),n.push(u={place:c,entries:[],adopted:!0});continue}if(!i){u||n.push(u={place:"Content",entries:[]}),u.entries.push([o,r]);continue}if(a.has(o)||o in M){const s=_(t,o,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${o}: ${a.has(o)?"RETIRED":"INJECTED_RETIRED"} (lib/puck/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(o)&&C.add(o),n.push(u={place:s,entries:[]});continue}const l=_(t,o,i.label);if(!l)throw new Error(`${t}.${o}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/puck/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);n.push(u={place:l,entries:[[o,i.level===2?r:re(r,i.label)]]})}const g=new Set(Object.entries(e).filter(([,o])=>h(o)).map(([o])=>o));for(const[o,r]of[["BLOCK_KEY_GROUP",G],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!g.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${o} (lib/puck/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=p?[]:[...a].filter(o=>!C.has(o));if(v.length)throw new Error(`${t}: RETIRED (lib/puck/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(n.filter(o=>o.entries.length>0).map(o=>o.place)),f=A.filter(o=>j(o).some(r=>R.has(r))),y={};for(const o of f){y[d[o]]=L(o,o===f[0]?f:null);for(const r of j(o)){if(!R.has(r))continue;const i=n.filter(l=>l.place===r),c=i.findIndex(l=>l.adopted);c>0&&i.unshift(...i.splice(c,1)),o==="Design"&&(y[b[r]]=F(r));for(const l of i)for(const[s,N]of l.entries)y[s]=de(r,N)}}return y}function fe(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function me(e){return A.some(t=>d[t]in e)}function Le(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const n={...e};for(const a of t)n[d[a]]=L(a,a===t[0]?t:null);return n}export{G as BLOCK_KEY_GROUP,ye as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,_e as CARD_SHOW_FIELD_KEYS,ke as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,be as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,oe as RETIRED,ge as SECTION_ANIM_FIELD_KEYS,pe as SECTION_SHAPE_FIELD_KEYS,Ce as SECTION_THEME_FIELD_KEYS,ve as assignSectionGroups,he as bucketOf,X as bucketOfPlace,Se as foldTopTier,me as hasBucketTabs,S as headerKeysOf,H as headerKeysOfPlace,_ as placeOf,Le as reseatBucketTabs,ie as retiredHeadings,fe as seatDesignBucket};
|
|
1
|
+
import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,group as q,quietMarker as J,heightFields as E,sectionAnimationFields as w,sectionShapeFields as O,sectionThemeFields as D,sidesPaddingFields as B,stickFields as x,widthField as T}from"./controls.js";import{deviceField as Q,deviceMetaOf as P}from"./device-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"./field-buckets.js";const A=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",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",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},G={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return G[a]??$[a]??I[o]}function he(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function H(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=P(a),p=h(C?C.inner:a),u=p?I[p.label]:void 0;if(u)for(const g of H(u))t.includes(g)||t.push(g)}return t}const be=[...S(B(),T("full"),E(),m(),x()),...Object.keys(B()),...Object.keys(T("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],Ce=[...S(D()),...Object.keys(D())],pe=[...S(O()),...Object.keys(O())],ge=[...S(w()),...Object.keys(w())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),ye=[...H(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ke=Object.keys(W()),_e=Object.keys(U({bottomDefault:!0})),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","EmailFormBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","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 o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!K[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/puck/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function Se(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(ne).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function re(e,t){const o=P(e),a=q(t);return o?Q(o.tier,a):a}function de(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?z(t,o.label):J(t):t}function j(e){return e==="Design"?k:["Animation"]}function ve(e,t){const o=[],a=new Set(ie(t)),C=new Set;let p=!1,u=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(oe.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(p=!0),o.push(u={place:c,entries:[],adopted:!0});continue}if(!i){u||o.push(u={place:"Content",entries:[]}),u.entries.push([n,r]);continue}if(a.has(n)||n in M){const s=_(t,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/puck/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(u={place:s,entries:[]});continue}const l=_(t,n,i.label);if(!l)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/puck/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(u={place:l,entries:[[n,i.level===2?r:re(r,i.label)]]})}const g=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",G],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!g.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/puck/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=p?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/puck/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>j(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!R.has(r))continue;const i=o.filter(l=>l.place===r),c=i.findIndex(l=>l.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=F(r));for(const l of i)for(const[s,N]of l.entries)y[s]=de(r,N)}}return y}function fe(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function me(e){return A.some(t=>d[t]in e)}function Le(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{G as BLOCK_KEY_GROUP,ye as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,_e as CARD_SHOW_FIELD_KEYS,ke as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,be as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,ge as SECTION_ANIM_FIELD_KEYS,pe as SECTION_SHAPE_FIELD_KEYS,Ce as SECTION_THEME_FIELD_KEYS,ve as assignSectionGroups,he as bucketOf,X as bucketOfPlace,Se as foldTopTier,me as hasBucketTabs,S as headerKeysOf,H as headerKeysOfPlace,_ as placeOf,Le as reseatBucketTabs,ie as retiredHeadings,fe as seatDesignBucket};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"contentHash": "
|
|
2
|
+
"contentHash": "bff238ceb7836a0a",
|
|
3
3
|
"schema": 1,
|
|
4
4
|
"mediaFields": {
|
|
5
5
|
"ImageBlock": [
|
|
@@ -135,6 +135,11 @@
|
|
|
135
135
|
]
|
|
136
136
|
},
|
|
137
137
|
"technicalStateKeys": [
|
|
138
|
-
"
|
|
138
|
+
"focal",
|
|
139
|
+
"focalPhone",
|
|
140
|
+
"imageFocal",
|
|
141
|
+
"imageFocal2",
|
|
142
|
+
"imageFocal2Phone",
|
|
143
|
+
"imageFocalPhone"
|
|
139
144
|
]
|
|
140
145
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as c}from"react/jsx-runtime";import d from"../../../components/PreviewPartAnchors.js";import{PublishedPartStyles as o}from"../../../components/PublishedPartStylesContext.js";import{readPartStyles as m}from"../part-styles.js";import{partNeedles as a}from"../text-parts.js";const h={name:"clickableParts",applies:(i,r,t)=>typeof t?.render=="function",draw(i,r){const t=i,l=()=>t.textParts??t.fields,n=t.render;t.render=e=>{const s=m(e);return e.puck?.isEditing?c(d,{needles:a(l(),e),styles:s,type:r,children:n(e)}):Object.keys(s).length?c(o,{needles:a(l(),e),styles:s,type:r,children:n(e)}):n(e)}}};export{h as clickableParts};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BLOCK_THEME_FOLLOW_LABEL as
|
|
1
|
+
import{WidthIcon as i}from"efficient-easel/icons";import{BLOCK_THEME_FOLLOW_LABEL as e,SECTION_THEME_FOLLOW_LABEL as s}from"../../../components/SectionThemePicker.js";import{anchorFields as d,cardShapeFields as o,cellWidthFields as t,heightFields as r,sectionAnimationFields as l,sectionShapeFields as m,sectionThemeFields as n,slider as F,spacingFields as p,sidesPaddingFields as c,stickFields as a,widthField as h}from"../controls.js";import{assignSectionGroups as E}from"../field-groups.js";import{dropEmptyHeadings as L}from"../panel-drop-empty-headings.js";const T={spacingFields:p,sidesPaddingFields:c,sectionShapeFields:m,cardShapeFields:o,cellWidthFields:t,widthField:h,heightFields:r,anchorFields:d,stickFields:a,sectionThemeFields:n,sectionAnimationFields:l,slider:F,WidthIcon:i,assignSectionGroups:E,dropEmptyHeadings:L,SECTION_THEME_FOLLOW_LABEL:s,BLOCK_THEME_FOLLOW_LABEL:e};export{T as PASS_INSPECTOR};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as a}from"react/jsx-runtime";import{
|
|
1
|
+
import{jsx as a}from"react/jsx-runtime";import{resolveContainerDirection as w}from"../../content/container-direction.js";import{IMAGE_WIDTH as u}from"../../content/image-width.js";import{HERO_BACKGROUND_VAR as C,HERO_CHROME_CAP_VAR as I,HERO_CHROME_INSET_VAR as T,SITE_WIDTH_CAP as h,centredCap as B}from"../../content/page-width.js";import{resolveWidth as p}from"../../content/section-width.js";import{isInsideSiteGutter as g}from"../../content/site-gutter.js";import{parentCapsWidth as m}from"../../sections/section-head-placement.js";import{findParentNode as O,isNestedNode as S}from"./document-position.js";const W=new Set(["SectionHeader","ProductGrid","IntroBleed","RelatedProducts","Banner","Stats","Logos","Divider","OrderSummary","DeliveryOptions","PaymentBadges","CheckoutCTA","Ticker","CategoryBar","DocTabs","CustomHTML","Spacer","Flex","Grid"]),E=new Set(["Hero","HeroSingle","Manifesto","ProductHero"]),H=new Set(["ProductHero"]),G={name:"sectionWidth",applies:(e,n,t)=>n.isSection(e)&&!W.has(e)&&!!t&&typeof t.render=="function",panel(e,n,t){const r=t.widthField;e.fields={...e.fields,...r("full")};const d=e.resolveFields;e.resolveFields=(i,l)=>{const o=d?d(i,l):l.fields,s=p(i?.props??{},"full");return o&&typeof o.then=="function"?o.then(c=>f(c,s)):f(o,s)}},draw(e,n){const t=E.has(n),r=e.render;e.render=d=>{const{mode:i,inherited:l}=p(d,"full"),o=r(d);if(i==="full")return t&&!l&&!H.has(n)?a("div",{style:{[C]:"none",[T]:"initial",[I]:"initial"},children:o}):o;const s=B(h);return t?a("div",{style:{"--sf-page-cap":h},children:o}):a("div",{style:s,children:o})}}};function f(e,n){if(!e||!("widthMode"in e))return e;const t={...e},r=t.widthMode;return r&&(t.widthMode={...r,currentValue:n.mode,inherited:n.inherited}),t}const v=new Set(["Heading","Text","ImageBlock","ButtonBlock","Banner","Stats","Logos","Divider","Flex","Grid","OrderSummary","DeliveryOptions","PaymentBadges","CheckoutCTA"]),j={name:"containedWidth",applies:(e,n,t)=>v.has(e)&&!!t&&typeof t.render=="function",panel(e,n,t){const r=t.widthField;e.fields={...e.fields,...r("page")};const d=e.resolveFields;e.resolveFields=(i,l)=>{const o=d?d(i,l):l.fields,s=p(i?.props??{},"page"),c=_=>F(n,A(f(_,s),i,l));return o&&typeof o.then=="function"?o.then(c):c(o)}},draw(e){const n=e.render;e.render=t=>{const{mode:r}=p(t,"page");return n({...t,contained:r!=="full"})}}},L={name:"buttonAlignInRow",applies:e=>e==="ButtonBlock",panel(e){const n=e,t=n?.resolveFields;n.resolveFields=(r,d)=>{const i=t?t(r,d):d.fields,l=o=>{const s=O(d.appState,r.props?.id);if(!s||s.type!=="HeroGroup"||w("HeroGroup",s.props?.direction)!=="row")return o;const c={...o};return delete c.align,c};return i&&typeof i.then=="function"?i.then(l):l(i)}}};function y(e){return Object.values(e).some(n=>!!n&&typeof n=="object"&&n.type==="slot")}function F(e,n){if(e!=="ButtonBlock")return n;const t={...n};return delete t._gWidth,delete t.widthMode,delete t.pageWidth,t}function A(e,n,t){if(y(e)){const d=t.appState?.data?.content;if(g(d,n.props?.id)!==!0)return e;const i={...e};return delete i.widthMode,delete i.pageWidth,i}if("parent"in t){if(!m(t.parent))return e}else if(!S({props:n.props??{}},t))return e;const r={...e};return delete r.widthMode,delete r.pageWidth,r}const V={name:"imageWidth",applies:e=>e==="ImageBlock",panel(e,n,t){const{slider:r,WidthIcon:d}=t;if(e?.fields){const i=r("Image width",a(d,{}),u.min,u.max,u.step,u.fallback,u.unit),l="focal",o=Object.entries(e.fields),s=o.findIndex(([c])=>c===l);e.fields=Object.fromEntries(s===-1?[...o,["width",i]]:[...o.slice(0,s+1),["width",i],...o.slice(s+1)])}}};export{L as buttonAlignInRow,j as containedWidth,V as imageWidth,G as sectionWidth,f as widthModeFields};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ReactElement, ReactNode } from "react";
|
|
1
|
+
import type { ComponentType, ReactElement, ReactNode } from "react";
|
|
2
2
|
export type PassRenderProps = Record<string, unknown>;
|
|
3
3
|
export type PassResolveFields = (data: {
|
|
4
4
|
props?: Record<string, unknown>;
|
|
@@ -12,6 +12,7 @@ export type PassResolveFields = (data: {
|
|
|
12
12
|
export type PassBlock = {
|
|
13
13
|
label?: string;
|
|
14
14
|
fields?: Record<string, unknown>;
|
|
15
|
+
textParts?: Record<string, unknown>;
|
|
15
16
|
defaultProps?: Record<string, unknown>;
|
|
16
17
|
resolveFields?: PassResolveFields;
|
|
17
18
|
render: (props: PassRenderProps) => ReactNode;
|
|
@@ -36,6 +37,7 @@ export type PassInspector = {
|
|
|
36
37
|
sectionThemeFields: (readValue?: (v: unknown) => unknown, followLabel?: string) => FieldMap;
|
|
37
38
|
sectionAnimationFields: () => FieldMap;
|
|
38
39
|
slider: (label: string, icon: ReactElement, min: number, max: number, step: number, fallback: number, suffix?: string) => unknown;
|
|
40
|
+
WidthIcon: ComponentType;
|
|
39
41
|
assignSectionGroups: <T extends FieldMap>(fields: T, where: string) => T;
|
|
40
42
|
dropEmptyHeadings: <T extends FieldMap>(fields: T) => T;
|
|
41
43
|
SECTION_THEME_FOLLOW_LABEL: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{withRecordTypeRow as
|
|
1
|
+
import{withRecordTypeRow as c}from"./page-root-fields.js";import{dropEmptyHeadings as d}from"./panel-drop-empty-headings.js";import{PASS_INSPECTOR as l}from"./passes/inspector.js";import{finishRenderRegistry as m}from"./render-registry.js";function u(t){const f=m(t,l),s=t.root,n=s.resolveFields,r=(o,e)=>d(c(o,e?.props),"page");return s.resolveFields=n?(o,e)=>{const i=n(o,e);return i instanceof Promise?i.then(p=>r(p??e.fields,o)):r(i??e.fields,o)}:(o,e)=>r(e.fields,o),f}export{u as finishRegistry};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{applyBlockPasses as r,registryPassContext as c}from"./passes/index.js";function i(e,t){const o={...c(Object.keys(e.components),e.categories?.structure?.components??[]),...t?{inspector:t}:{}};for(const[s,n]of Object.entries(e.components))r(s,n,o);return o}export{i as finishRenderRegistry};
|
|
@@ -10,3 +10,5 @@ export declare const SOURCE_ACTIONS: Record<PartSource, {
|
|
|
10
10
|
}>;
|
|
11
11
|
export declare function sourceSlugOf(props: unknown): string | undefined;
|
|
12
12
|
export declare function partSourceOf(nodeType: string): PartSource | null;
|
|
13
|
+
export declare function partSourceNoteFor(nodeType: string, propKey: string): PartSource | null;
|
|
14
|
+
export declare function sourceMenuIdOf(props: unknown): string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CUSTOM_FIELD_VALUES as n}from"./neutralization-contracts.js";import{HYDRATED_LISTS as
|
|
1
|
+
import{CUSTOM_FIELD_VALUES as n}from"./neutralization-contracts.js";import{HYDRATED_LISTS as u,SNAPSHOT_OBJECTS as s}from"./snapshot-contracts.js";function S(){const e=new Set([...Object.keys(s),...Object.keys(u)]);for(const[t,o]of Object.entries(n))for(const r of Object.values(o))r.verb==="snapshot"&&e.add(t);return[...e].sort()}function c(e){const t=new Set([...Object.keys(s[e]??{}),...u[e]??[]]);for(const[o,r]of Object.entries(n[e]??{}))r.verb==="snapshot"&&t.add(o);return[...t].sort()}const p={CollectionCard:"product",FooterMenu:"menu",Gallery:"product",GalleryItem:"product",ProductGrid:"product",ProductHero:"product",SpecTable:"product",Events:"blog",FeaturedCover:"blog",LongRead:"blog",SubscribeBlogs:"blog"},i={product:"Synced from the product.",blog:"Synced from the blog post.",menu:"Synced from the site menu."},O="Open",g={product:{type:"storefront-editor:open-product",needsSlug:!0},blog:{type:"storefront-editor:open-post",needsSlug:!0},menu:{type:"storefront-editor:open-menus",needsSlug:!1}};function b(e){const o=e?.source?.slug;return typeof o=="string"&&o.length>0?o:void 0}function d(e){return p[e]??null}function m(e,t){const o=d(e);return o&&c(e).includes(t)?o:null}function a(e){const o=e?.menu?.id;return typeof o=="string"&&o.length>0?o:void 0}export{p as PART_SOURCES,g as SOURCE_ACTIONS,O as SOURCE_ACTION_LABEL,i as SOURCE_LINES,c as hydratedPropsOf,m as partSourceNoteFor,d as partSourceOf,S as sourceBoundBlocks,a as sourceMenuIdOf,b as sourceSlugOf};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { LINK_FIELD_MARKER, SCAFFOLD_FIELD_MARKER, TEXT_FIELD_MARKER, type TextFieldMeta } from "./field-markers.js";
|
|
2
|
+
export type TextPartShape = {
|
|
3
|
+
type?: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
[TEXT_FIELD_MARKER]?: Pick<TextFieldMeta, "control" | "label" | "placeholder" | "itemKey">;
|
|
6
|
+
[LINK_FIELD_MARKER]?: true;
|
|
7
|
+
[SCAFFOLD_FIELD_MARKER]?: unknown;
|
|
8
|
+
arrayFields?: Record<string, TextPartShape>;
|
|
9
|
+
objectFields?: Record<string, TextPartShape>;
|
|
10
|
+
};
|
|
11
|
+
export type TextPartShapes = Record<string, TextPartShape>;
|
|
12
|
+
export declare function textPartShape(fields: Record<string, unknown> | undefined): TextPartShapes;
|
|
13
|
+
export declare function textPartShapes(blocks: Record<string, {
|
|
14
|
+
fields?: Record<string, unknown>;
|
|
15
|
+
}>): Record<string, TextPartShapes>;
|
|
16
|
+
export declare function textPartShapesText(blocks: Record<string, {
|
|
17
|
+
fields?: Record<string, unknown>;
|
|
18
|
+
}>): string;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{LINK_FIELD_MARKER as p,SCAFFOLD_FIELD_MARKER as s,TEXT_FIELD_MARKER as a}from"./field-markers.js";import{isStructuralTextProp as y}from"./neutralization-contracts.js";const b=["control","label","placeholder","itemKey"];function l(e){if(!e||typeof e!="object")return null;const t={};for(const[n,i]of Object.entries(e)){const o=d(i);o&&(t[n]=o)}return Object.keys(t).length?t:null}function d(e){if(!e||typeof e!="object")return null;const t=e,n=t[a],i=t.type==="text"||t.type==="textarea",o=l(t.arrayFields),f=l(t.objectFields);if(!n&&!i&&!o&&!f)return null;const r={};if(typeof t.type=="string"&&(r.type=t.type),typeof t.label=="string"&&(r.label=t.label),n){const u={};for(const c of b)n[c]!==void 0&&(u[c]=n[c]);r[a]=u}return t[p]&&(r[p]=!0),t[s]!==void 0&&(r[s]=t[s]),o&&(r.arrayFields=o),f&&(r.objectFields=f),r}function h(e){const t=l(e)??{};for(const n of Object.keys(t))y(n)&&delete t[n];return t}function j(e){const t={};for(const[n,i]of Object.entries(e)){const o=h(i.fields);Object.keys(o).length&&(t[n]=o)}return t}function F(e){return`${JSON.stringify(j(e),null,2)}
|
|
2
|
+
`}export{h as textPartShape,j as textPartShapes,F as textPartShapesText};
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type TextRegions } from "./text-regions.js";
|
|
2
2
|
export type CollectionCardRegionKey = "tag" | "name" | "body" | "price" | "link";
|
|
3
|
+
export declare const COLLECTION_CARD_TEXT_SIZE: {
|
|
4
|
+
readonly tag: "text-[length:var(--size-label,13px)]";
|
|
5
|
+
readonly name: "text-[length:min(var(--size-headingMedium,48px),var(--sf-heading-max,9999px))]";
|
|
6
|
+
readonly namePhone: "max-[800px]:text-[length:min(var(--size-headingMedium,36px),var(--sf-heading-max,9999px))]";
|
|
7
|
+
readonly body: "text-[length:var(--size-body,14px)]";
|
|
8
|
+
readonly price: "text-[length:var(--size-label,15px)]";
|
|
9
|
+
readonly link: "text-[length:var(--size-label,14px)]";
|
|
10
|
+
};
|
|
3
11
|
export declare const COLLECTION_CARD_REGIONS: Readonly<Record<CollectionCardRegionKey, TextRegions[string]>>;
|
|
4
12
|
export declare const COLLECTION_CARD_TEXT_REGIONS: TextRegions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const l={tag:{label:"Tag",follows:"Labels",builtIn:
|
|
1
|
+
import{builtInOf as e}from"./text-regions.js";const l={tag:"text-[length:var(--size-label,13px)]",name:"text-[length:min(var(--size-headingMedium,48px),var(--sf-heading-max,9999px))]",namePhone:"max-[800px]:text-[length:min(var(--size-headingMedium,36px),var(--sf-heading-max,9999px))]",body:"text-[length:var(--size-body,14px)]",price:"text-[length:var(--size-label,15px)]",link:"text-[length:var(--size-label,14px)]"},t={tag:{label:"Tag",follows:"Labels",builtIn:e(l.tag),writable:!0},name:{label:"Name",follows:"Heading 2",builtIn:e(l.name),writable:!0},body:{label:"Body",follows:"Body",builtIn:e(l.body),writable:!0},price:{label:"Price",follows:"Labels",builtIn:e(l.price),writable:!0},link:{label:"Link",follows:"Labels",builtIn:e(l.link),writable:!0}},i=t;export{t as COLLECTION_CARD_REGIONS,i as COLLECTION_CARD_TEXT_REGIONS,l as COLLECTION_CARD_TEXT_SIZE};
|
|
@@ -11,6 +11,7 @@ export declare function regionStyle(role: string | null | undefined, region: Tex
|
|
|
11
11
|
fontSize: string;
|
|
12
12
|
} | undefined;
|
|
13
13
|
export type TextRegions = Readonly<Record<string, TextRegion>>;
|
|
14
|
+
export declare function builtInOf(sizeClass: string): string;
|
|
14
15
|
export declare function textRegionPartKey(key: string): string;
|
|
15
16
|
export declare function textRegionOfPartKey(regions: TextRegions, propKey: string): string | null;
|
|
16
17
|
export declare function textRegionOfAttr(regions: TextRegions, value: string | null): string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const i="data-sf-spec-region",u="@";function f(t,n,e){if(!t)return;const r=e[t];if(r)return{fontFamily:`var(--font-role-${t})`,fontSize:`var(--size-${r}, ${n.builtIn})`}}function
|
|
1
|
+
const i="data-sf-spec-region",u="@";function f(t,n,e){if(!t)return;const r=e[t];if(r)return{fontFamily:`var(--font-role-${t})`,fontSize:`var(--size-${r}, ${n.builtIn})`}}function c(t){const n=/var\(--size-[A-Za-z]+, ?([0-9.]+px)\)/.exec(t);if(!n)throw new Error(`builtInOf: no --size-* fallback in ${t}`);return n[1]}function l(t){return`@${t}`}function s(t,n){if(!n.startsWith("@"))return null;const e=n.slice(1);return e in t?e:null}function o(t,n){return n&&n in t?n:null}function E(t,n){const e=n?.closest(`[${i}]`)?.getAttribute(i);return o(t,e??null)}export{i as TEXT_REGION_ATTR,u as TEXT_REGION_PREFIX,c as builtInOf,f as regionStyle,E as textRegionForClick,o as textRegionOfAttr,s as textRegionOfPartKey,l as textRegionPartKey};
|