efficient-web-builder 42.0.0 → 44.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +212 -0
- package/dist/editor/components/AnchorField.js +1 -1
- package/dist/editor/components/CanvasPartsBridge.d.ts +1 -0
- package/dist/editor/components/CanvasPartsBridge.js +1 -1
- package/dist/editor/components/DuplicatePageDialog.js +1 -1
- package/dist/editor/components/MediaUploadField.d.ts +3 -1
- package/dist/editor/components/MediaUploadField.js +1 -1
- package/dist/editor/components/PagesPanel.js +1 -1
- package/dist/editor/components/PreviewPartAnchors.js +1 -1
- package/dist/editor/components/PreviewThemeFrame.d.ts +1 -1
- package/dist/editor/components/PreviewThemeFrame.js +3 -19
- package/dist/editor/components/SectionEditor.d.ts +5 -1
- package/dist/editor/components/SectionEditor.js +1 -1
- package/dist/editor/components/SectionIcon.js +1 -1
- package/dist/editor/components/SectionTextPartBridge.js +1 -1
- package/dist/editor/components/SectionThumbnail.js +1 -1
- package/dist/editor/components/SiteFields.d.ts +2 -1
- package/dist/editor/components/SiteFields.js +1 -1
- package/dist/editor/components/StandaloneSectionEditor.js +1 -1
- package/dist/editor/components/StorefrontEditor.js +1 -1
- package/dist/editor/components/StylesPanel.d.ts +3 -1
- package/dist/editor/components/StylesPanel.js +1 -1
- package/dist/editor/components/WebsiteScreenParts.js +1 -1
- package/dist/editor/components/WebsiteSettingsPanel.d.ts +6 -1
- package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
- package/dist/editor/components/storefront-editor.css +16 -77
- package/dist/editor/components/useHostDocumentBridge.js +1 -1
- package/dist/editor/components/useLocationsTree.js +1 -1
- package/dist/editor/components/useSectionToBoxPass.js +1 -1
- package/dist/editor/components/useSocialSettings.d.ts +2 -2
- package/dist/editor/lib/document/ColourControl.d.ts +7 -2
- package/dist/editor/lib/document/ColourControl.js +1 -1
- package/dist/editor/lib/document/MarkupToolbar.d.ts +6 -2
- package/dist/editor/lib/document/MarkupToolbar.js +1 -1
- package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroSlide/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Logos/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Text/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
- package/dist/editor/lib/document/canvas-typing.js +1 -1
- package/dist/editor/lib/document/consent-words-field.d.ts +6 -0
- package/dist/editor/lib/document/consent-words-field.js +1 -0
- package/dist/editor/lib/document/controls.d.ts +14 -2
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/editor/lib/document/footer-blocks.js +1 -1
- package/dist/editor/lib/document/locked-blocks.d.ts +3 -0
- package/dist/editor/lib/document/locked-blocks.js +1 -1
- package/dist/editor/lib/document/overrides.js +1 -1
- package/dist/editor/lib/document/page-root-fields.d.ts +1 -0
- package/dist/editor/lib/document/page-root-fields.js +1 -1
- package/dist/editor/lib/document/part-anchors.d.ts +7 -0
- package/dist/editor/lib/document/part-anchors.js +1 -1
- package/dist/editor/lib/document/section-width-fields.js +1 -1
- package/dist/editor/lib/document/selected-host.d.ts +2 -0
- package/dist/editor/lib/document/selected-host.js +1 -0
- package/dist/editor/lib/page-copy.js +1 -1
- package/dist/editor/lib/sections/section-dry-run.d.ts +2 -9
- package/dist/editor/lib/sections/section-dry-run.js +2 -2
- package/dist/format/lib/content/authored-props.js +1 -1
- package/dist/format/lib/content/block-sources.js +1 -1
- package/dist/format/lib/content/box-layout.d.ts +1 -0
- package/dist/format/lib/content/box-layout.js +1 -1
- package/dist/format/lib/content/box-shadow.d.ts +3 -0
- package/dist/format/lib/content/box-shadow.js +1 -0
- package/dist/format/lib/content/button-icon.d.ts +2 -1
- package/dist/format/lib/content/button-icon.js +1 -1
- package/dist/format/lib/content/consent-banner.d.ts +21 -0
- package/dist/format/lib/content/consent-banner.js +1 -1
- package/dist/format/lib/content/contact.js +1 -1
- package/dist/format/lib/content/footer.d.ts +10 -0
- package/dist/format/lib/content/footer.js +1 -1
- package/dist/format/lib/content/gallery-layout.d.ts +12 -0
- package/dist/format/lib/content/gallery-layout.js +1 -1
- package/dist/format/lib/content/section-width.d.ts +0 -4
- package/dist/format/lib/content/section-width.js +1 -1
- package/dist/format/lib/document/blocks/general/Logos/meta.d.ts +6 -0
- package/dist/format/lib/document/blocks/general/Logos/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/SectionHeader/meta.js +1 -1
- package/dist/format/lib/document/box-footer.js +1 -1
- package/dist/format/lib/document/container-blocks.js +1 -1
- package/dist/format/lib/document/media-manifest.json +3 -2
- package/dist/format/lib/document/nestable-content-sections.js +1 -1
- package/dist/format/lib/document/passes/settings-groups.js +1 -1
- package/dist/format/lib/document/root-panel.d.ts +8 -0
- package/dist/format/lib/document/root-panel.js +1 -0
- package/dist/format/lib/document/section-catalog.js +1 -1
- package/dist/format/lib/document/source-bound-parts.js +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +23 -5
- package/dist/format/lib/editor-words-catalogue.js +4 -4
- package/dist/format/lib/editor-words.js +1 -1
- package/dist/format/lib/hero-texture.js +1 -1
- package/dist/format/lib/hero-video.d.ts +7 -0
- package/dist/format/lib/hero-video.js +1 -1
- package/dist/format/lib/links/page-link-rules.js +1 -1
- package/dist/format/lib/markup.d.ts +1 -0
- package/dist/format/lib/markup.js +2 -2
- package/dist/format/lib/non-empty-string.d.ts +1 -0
- package/dist/format/lib/non-empty-string.js +1 -0
- package/dist/format/lib/popup/look.d.ts +1 -1
- package/dist/format/lib/popup/look.js +1 -1
- package/dist/format/lib/popup/rules.d.ts +1 -1
- package/dist/format/lib/popup/rules.js +1 -1
- package/dist/format/lib/reel.d.ts +2 -1
- package/dist/format/lib/reel.js +1 -1
- package/dist/format/lib/sections/hero-overlay.js +1 -1
- package/dist/format/lib/sections/logo-look.d.ts +7 -0
- package/dist/format/lib/sections/logo-look.js +1 -0
- package/dist/format/lib/sections/section-head-placement.d.ts +1 -0
- package/dist/format/lib/sections/section-head-placement.js +1 -1
- package/dist/format/lib/site-theme-row.d.ts +0 -1
- package/dist/format/lib/slugify.d.ts +1 -1
- package/dist/format/lib/slugify.js +1 -1
- package/dist/format/lib/theme.d.ts +2 -1
- package/dist/format/lib/theme.js +4 -4
- package/dist/render/components/BlockFrame.d.ts +1 -1
- package/dist/render/components/BoxTabs.d.ts +2 -1
- package/dist/render/components/BoxTabs.js +1 -1
- package/dist/render/components/Btn.d.ts +1 -0
- package/dist/render/components/Btn.js +1 -1
- package/dist/render/components/ButtonBlock.d.ts +12 -1
- package/dist/render/components/ButtonBlock.js +1 -1
- package/dist/render/components/ContactLocations.js +3 -45
- package/dist/render/components/Divider.d.ts +1 -1
- package/dist/render/components/Divider.js +1 -1
- package/dist/render/components/DocBody.js +5 -5
- package/dist/render/components/Flex.d.ts +5 -9
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/Heading.d.ts +1 -1
- package/dist/render/components/HeroGroup.d.ts +3 -9
- package/dist/render/components/HeroGroup.js +1 -1
- package/dist/render/components/HeroSection.js +1 -11
- package/dist/render/components/HeroSingle.js +1 -11
- package/dist/render/components/LogoBlock.d.ts +1 -1
- package/dist/render/components/LogoBlock.js +1 -1
- package/dist/render/components/LogoWallContext.d.ts +12 -0
- package/dist/render/components/LogoWallContext.js +1 -0
- package/dist/render/components/Logos.d.ts +16 -1
- package/dist/render/components/Logos.js +1 -1
- package/dist/render/components/PaymentBadges.d.ts +3 -1
- package/dist/render/components/PaymentBadges.js +1 -1
- package/dist/render/components/PreviewHeaderContext.d.ts +1 -3
- package/dist/render/components/PreviewHeaderContext.js +1 -1
- package/dist/render/components/PreviewTickerContext.d.ts +3 -0
- package/dist/render/components/PreviewTickerContext.js +1 -1
- package/dist/render/components/Reel.js +1 -1
- package/dist/render/components/SiteGutterFrame.d.ts +3 -2
- package/dist/render/components/SiteGutterFrame.js +1 -1
- package/dist/render/components/Text.d.ts +1 -1
- package/dist/render/lib/content/button-look.d.ts +46 -0
- package/dist/render/lib/content/button-look.js +1 -0
- package/dist/{format → render}/lib/content/section-padding.d.ts +32 -4
- package/dist/render/lib/content/section-padding.js +1 -0
- package/dist/render/lib/content/view-values.d.ts +10 -0
- package/dist/render/lib/content/view-values.js +1 -0
- package/dist/render/lib/document/blocks/general/ButtonBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Divider/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Heading/render.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroGroup/render.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Logos/render.js +1 -1
- package/dist/render/lib/document/blocks/general/PaymentBadges/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +4 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.js +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-stats.d.ts +5 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-stats.js +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows.d.ts +0 -4
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/hero-media-parts.d.ts +2 -2
- package/dist/render/lib/document/page-render.js +1 -1
- package/dist/render/lib/document/part-rows.js +1 -1
- package/dist/render/lib/document/part-styles.d.ts +0 -1
- package/dist/render/lib/document/part-styles.js +2 -2
- package/dist/render/lib/document/passes/section-anchor.js +1 -1
- package/dist/render/lib/document/passes/section-padding.js +1 -1
- package/dist/render/lib/document/text-parts.d.ts +0 -2
- package/dist/render/lib/document/text-parts.js +1 -1
- package/dist/render/lib/sections/section-to-box.d.ts +2 -11
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/dist/render/lib/text-styles/site-text-styles.js +2 -2
- package/package.json +5 -5
- package/dist/format/lib/content/section-padding.js +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ReactElement, type ReactNode } from "react";
|
|
2
|
-
import type
|
|
2
|
+
import { type MediaValue } from "../../../format/lib/media-value.js";
|
|
3
|
+
import { type LoadingShows } from "../../../format/lib/hero-video.js";
|
|
3
4
|
import { readHidable, hidableText, type HidableValue } from "efficient-easel/draw";
|
|
4
5
|
import { FOLD_FIELD_MARKER, LINK_FIELD_MARKER, MEDIA_FIELD_MARKER, SCAFFOLD_FIELD_MARKER, TEXT_FIELD_MARKER, foldMetaOf, textFieldIdentifier, type EdgeCell, type FoldFieldMeta, type TextFieldMeta, type TextListRendering } from "efficient-easel/draw";
|
|
5
6
|
import type { ShowWhenRule } from "../../../render/lib/document/show-when.js";
|
|
@@ -172,11 +173,14 @@ interface CornersRowTier {
|
|
|
172
173
|
}
|
|
173
174
|
export declare function cornersRowField(tier: CornersRowTier): CustomField<number | null>;
|
|
174
175
|
export declare function useSelectedSibling(key: string): [unknown, (next: unknown) => void];
|
|
176
|
+
export declare function useSelectedPatch(): (patch: Record<string, unknown>) => void;
|
|
175
177
|
export declare function cornerSidesField(): CustomField<string[] | null>;
|
|
176
178
|
export declare function sectionCornersField(): CustomField<number | null>;
|
|
177
179
|
export declare const SECTION_BLEEDS_HINT = "This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";
|
|
178
180
|
export declare function sectionShapeFields(): Record<string, unknown>;
|
|
179
181
|
export declare function sectionBorderField(tier: "desktop" | "mobile"): CustomField<SettingsBorderValue | undefined>;
|
|
182
|
+
export declare function buttonWordsEntryField(partKey: string): CustomField<undefined>;
|
|
183
|
+
export declare function buttonBorderField(): CustomField<SettingsBorderValue | undefined>;
|
|
180
184
|
export declare function sectionAnimationFields(): Record<string, unknown>;
|
|
181
185
|
export declare function cardCornersField(): CustomField<number | null>;
|
|
182
186
|
export declare function templateField<V>(inner: CustomField<V>): CustomField<V>;
|
|
@@ -288,6 +292,7 @@ export declare function heightFields(): Record<string, CustomField<undefined> |
|
|
|
288
292
|
export declare function stickFields(): Record<string, CustomField<undefined> | CustomField<boolean> | CustomField<number>>;
|
|
289
293
|
export declare function anchorFields(): Record<string, CustomField<undefined> | CustomField<HidableValue>>;
|
|
290
294
|
export declare function dateTime(label: string, icon?: ReactNode, hint?: string): CustomField<string>;
|
|
295
|
+
export declare function date(label: string, icon?: ReactNode, hint?: string): CustomField<string>;
|
|
291
296
|
export declare function toggle(label: string, fallback: boolean, icon?: ReactNode): CustomField<boolean>;
|
|
292
297
|
export declare function pageBackgroundField(): CustomField<string>;
|
|
293
298
|
export declare function checkbox(label: string, fallback: boolean): CustomField<boolean>;
|
|
@@ -296,7 +301,12 @@ export type FollowsSiteButton = {
|
|
|
296
301
|
};
|
|
297
302
|
export declare const FOLLOWS_SITE_BUTTON: FollowsSiteButton;
|
|
298
303
|
export declare const FOLLOWS_SITE_BUTTON_INK: FollowsSiteButton;
|
|
299
|
-
export
|
|
304
|
+
export type ColourOpacity = {
|
|
305
|
+
key: string;
|
|
306
|
+
unsetFrom: string;
|
|
307
|
+
unset: (from: unknown) => number;
|
|
308
|
+
};
|
|
309
|
+
export declare function colorInput(label: string, fallback: string | FollowsSiteButton, icon?: ReactElement, opacity?: ColourOpacity): CustomField<string>;
|
|
300
310
|
export declare const FOCAL_POINTS: {
|
|
301
311
|
value: string;
|
|
302
312
|
label: string;
|
|
@@ -373,9 +383,11 @@ export declare function segmented<V>(label: string, icon: ReactElement, options:
|
|
|
373
383
|
value: V;
|
|
374
384
|
picture?: ReactElement;
|
|
375
385
|
}[], fallback: V): CustomField<V>;
|
|
386
|
+
export declare function loadingShowsField(label: string, icon: ReactElement, pictures: Readonly<Record<LoadingShows, ReactElement>>): CustomField<LoadingShows>;
|
|
376
387
|
export declare function upload(label: string, accept: string, placeholder?: string, opts?: {
|
|
377
388
|
focus?: string;
|
|
378
389
|
focusWhen?: (props: Record<string, unknown>) => boolean;
|
|
390
|
+
frame?: string;
|
|
379
391
|
}): CustomField<MediaValue>;
|
|
380
392
|
export declare const CUSTOM_FIELD_MEDIA: Record<string, string[]>;
|
|
381
393
|
export declare function CoordsField({ value, onChange, label, }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as r,jsxs as O,Fragment as I}from"react/jsx-runtime";import{cloneElement as ge,useId as yt,useRef as ie,useState as U}from"react";import{useEasel as j,useSelectedFields as le}from"efficient-easel/easel";import{say as l,editorEaselWords as x}from"../../../format/lib/editor-words.js";import{readHidable as be,hidableText as xe}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as q,LINK_FIELD_MARKER as ye,MEDIA_FIELD_MARKER as Se,SCAFFOLD_FIELD_MARKER as Ce,TEXT_FIELD_MARKER as E,foldMetaOf as J,textFieldIdentifier as St}from"efficient-easel/draw";import Ct from"../../components/ApplyCornersToSiblings.js";import _t from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as It,CORNER_RADIUS_MAX as _e,CORNER_RADIUS_MIN as B}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Et,IMAGE_CORNERS_LABEL as Tt}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as Ot}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Rt,GALLERY_LAYOUTS as X,GALLERY_LAYOUT_KEYS as Ie}from"../../../format/lib/content/gallery-layout.js";import{anchorSiblingsOf as wt,HERO_GROUP_PLACEMENTS as Pt,HERO_GROUP_PLACEMENT_DEFAULT as kt,normalisePlacement as Lt,placementPoints as Ee}from"../../../format/lib/hero-group-placement.js";import Nt from"../../components/KeepHint.js";import vt from"../../components/AnchorField.js";import{AdjustIcon as At,AlignLeftIcon as Ft,EyeIcon as Dt,AlignSeparateIcon as Bt,AnimationIcon as Te,BackgroundIcon as Ht,BorderAllIcon as Gt,BlockSectionIcon as Mt,CartIcon as Kt,ColumnWidthsIcon as Oe,ColumnsIcon as Re,CornerIcon as Wt,DirectionDownIcon as Ut,DirectionLeftIcon as jt,DirectionRightIcon as Xt,DirectionUpIcon as $t,DollarIcon as zt,FinishIcon as Vt,GapIcon as we,GridIcon as Yt,GroundIcon as qt,HashIcon as Pe,HeightIcon as Jt,ImageIcon as Zt,ListIcon as Qt,LocationIcon as ae,NudgeIcon as en,PaddingAllIcon as tn,PaddingBottomIcon as ke,PaddingLeftIcon as Le,PaddingRightIcon as Ne,PaddingTopIcon as ve,PageIcon as Ae,PlacementIcon as nn,ProductSizeIcon as on,StickyIcon as rn,RotateIcon as ln,SquareIcon as an,TypeIcon as sn,WidthIcon as cn,WrapIcon as dn}from"efficient-easel/icons";import{FieldGlyph as Fe}from"../../components/FieldGlyph.js";import{resolvePageBackground as un}from"../../../format/lib/content/page-background.js";import{CORNER_SIDES as De,CORNER_SIDE_POINTS as pn,hasOwnSectionCorners as fn,normalizeCornerSides as Be}from"../../../format/lib/content/section-corners.js";import{SECTION_MOTION_NONE as hn,SECTION_MOTION_OPTIONS as mn}from"../../../format/lib/content/section-animation.js";import{enclosingSectionProps as He}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsField as m,SettingsGroup as gn,SettingsGroupSub as bn,SettingsBorder as xn,SettingsSegmented as yn,SettingsSides as Sn,SettingsSidesEach as Ge,sidesStartEach as Cn,SettingsSwitch as Me,borderSides as _n,borderStartEach as In}from"efficient-easel/panel";import{FieldSelect as En,ListField as Tn}from"efficient-easel/fields";import{DisplayChips as On}from"efficient-shell/ui";import{desktopDisplayChanged as Rn,partShownOnDesktop as wn,partShownOnPhone as Pn,phoneDisplayChanged as kn,withDesktopPart as Ln,withPhonePart as Nn}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as vn,Checkbox as An,CornersInput as Fn,DateTimePicker as Dn,FOCAL_DEFAULT as Bn,PictureTiles as Ke,PositionInput as Hn,Slider as Gn,Tooltip as We}from"efficient-shell/ui";import{ColourRow as Ue,InheritedColourRow as Mn}from"./ColourControl.js";import je from"./MarkupToolbar.js";import{deviceField as g}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as Kn,NoControlMark as Z,noControlField as $}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as Wn}from"../../../format/lib/document/own-box.js";import{PHONE_CLEAR as Un,resolvePhoneValue as se}from"../../../format/lib/document/phone-override.js";import{phoneKey as H}from"efficient-easel/draw";import{SuppressibleText as jn}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Xn,CARD_OUTLINE_OPTIONS as $n,DEFAULT_CARD_INDEX_FORMAT as zn,DEFAULT_CARD_OUTLINE as Vn}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Yn,DEFAULT_COVER_INDEX as qn}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Jn}from"efficient-easel/draw";import Zn from"../../components/MediaUploadField.js";import Qn from"../../components/MultiSelectField.js";import eo from"../../components/SectionThemePicker.js";import to from"../../components/SearchSelectField.js";import no from"../../components/StorefrontLinkField.js";import{UiIcon as Xe}from"efficient-easel/draw/client";import{SECTION_PADDING as T}from"../../../format/lib/content/section-padding.js";import{hasPhoneHeight as oo,resolveSectionMinHeight as ro}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as Q,SECTION_STICK_LABEL as ce,hasPhoneStick as io,resolveSectionStick as lo}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as ao,SECTION_MIN_HEIGHT_GROUP_LABEL as z,SECTION_SCREEN_PCT as so}from"../../../format/lib/content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as co,containerDirectionPoints as uo,resolveContainerDirection as $e}from"../../../format/lib/content/container-direction.js";import{BOX_ALIGN_POINTS as po,BOX_BLOCK_SPACING_LABEL as fo,BOX_BLOCK_SPACING_POINTS as ze,BOX_JUSTIFY_POINTS as Ve,BOX_PHONE_ROW_LABEL as ho,BOX_PHONE_ROW_MAX as mo,BOX_PHONE_ROW_MIN as Ye,BOX_SHARE_LABEL as qe,BOX_SHARE_POINTS as de,BOX_WRAP_LABEL as go,BOX_WRAP_POINTS as Je}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as G}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as bo}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as xo,normalizeTheme as yo,siteButtonPaint as So}from"../../../format/lib/theme.js";import{CONTAINER_GAP as ue,CONTAINER_GAP_BUILT_IN as Co,GAP_FIELD_CONTAINER as _o,hasOwnContainerGap as Io,resolveContainerGap as Eo}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as To,CARD_IMAGE_BG_OFF as Oo,CARD_IMAGE_BG_SWATCH_NAMES as Ro,CARD_IMAGE_BG_SWATCHES as wo,isCardImageBackgroundInheriting as Po,cardImageBackgroundChoice as ko,THEME_CARD_IMAGE_BG as Lo}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as No,SECTION_BG_SWATCHES as vo,SECTION_BG_SWATCH_NAMES as Ao,THEME_SECTION_BG as Fo,isSectionBackgroundInheriting as Do}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Bo}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Ho,TYPE_SIZE_INHERIT as Go,isTypeSizeInheriting as Mo}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Ko,WIDTH_CHOICE_LABEL as Wo,WIDTH_INHERIT as Uo,resolveWidth as jo,sectionRunsFullWidth as Ze}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as Xo}from"./panel-heading-scope.js";import{withStyleKind as $o}from"efficient-easel/style-clipboard";import{useEaselSession as zo}from"efficient-easel/screen/lib/session-context";import{backendOf as Vo}from"../website-session.js";import{describedAs as R}from"../../../format/lib/host-document-bridge.js";function M(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!J(n)&&$o(n,`section:${t}`);return e}function al({children:e}){return r("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function Qe(){return null}function Yo(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return r(Qe,{},e)}function qo(e){return e.type===Qe}function k(e){return qo(e)?void 0:e}function N(e,t){return l("{value} from {from}",{value:e,from:t})}function Jo(){const{appState:e}=j(i=>i),t=e.data.root?.props??{},{mode:n,pageWidth:o}=jo(t,"full");return n==="page"?N(`${o}px`,l("the page")):n==="contained"?N(l("Contained"),l("the page")):N(l("Full"),l("the page"))}function Zo(){const{blockGap:e}=G();return e===null?l("this container's own spacing"):N(`${e}px`,l("Styles"))}function Qo({inherited:e,onReset:t,label:n}){return r(y,{words:x()?.panel,label:l(n),changed:!e,detail:Zo(),onReset:t})}function er({inherited:e,onReset:t,label:n}){return r(y,{words:x()?.panel,label:l(n),changed:!e,detail:Jo(),onReset:t})}function v({value:e,onChange:t,label:n,placeholder:o,hint:i,multiline:a,hideable:s=!0,markup:c=!0}){const{text:d,hidden:u}=be(e),f=ie(null),p=ie(null),h=P=>t(s?{text:P,hidden:u}:P),b=()=>t({text:d,hidden:!u}),C=s&&u,w=yt(),_=i?ir(i)?r("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(i)}):r(Nt,{children:l(i)}):void 0,Y=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(sn,{}),htmlFor:w,className:C?"is-hidden":void 0,hint:_,action:s?r(We,{content:Y,children:r("button",{type:"button",className:"sf-field-eye","aria-pressed":u,"aria-label":Y,onClick:b,children:u?r(Xe,{name:"eye-off",size:14}):r(Xe,{name:"eye",size:14})})}):void 0,children:O("div",{className:"sf-copybox",children:[c&&r(je,{target:a?p:f,value:d,onChange:h}),a?r("textarea",{id:w,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:P=>h(P.target.value)}):r("input",{id:w,ref:f,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:P=>h(P.target.value)})]})})}function sl(e,t){return{...e,[Ce]:t}}function cl(e){const t=e[E];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[E]:{...t,offPage:!0}}}function dl(e){return!e||typeof e!="object"?!1:e[E]?.offPage===!0}const et="sfPanelOnly";function ul(e){if(!e[E])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[et]:!0}}function pl(e){return!!e&&typeof e=="object"&&e[et]===!0}function fl(e){const t=e[E];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[E]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as Aa,SCALAR_TEXT_CONTROLS as Fa}from"efficient-easel/draw";function hl(e,t){if(!e[E])throw new Error("inOwnBox: the field holds no authored text");const{[Kn]:o,...i}=e;return{...i,[Wn]:!0,render:t}}const tr=new Set(Jn),ee={type:"radio",options:[{value:!0},{value:!1}]},tt={text:{type:"object",objectFields:{text:{type:"text"},hidden:ee}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:ee}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},A=(e,t)=>{const n=R({...t,[E]:e},{...tt[e.control],label:e.label});if(!tr.has(e.control))return n;const o=t.render;return{...$(n,"authored-copy"),render:i=>r(jn,{name:i.name,children:o(i)})}},ml="Everything else on this block comes from the linked post. Unlink it to edit by hand.",nr={field:"source.slug",set:!0},gl={not:nr},or="Select a word, then press the highlighter.",rr=new Set([or]),ir=e=>rr.has(e);function bl(e,t,n){return A({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(v,{value:o,onChange:i,label:e,placeholder:t,hint:n})})}function xl(e,t,n){return A({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(v,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0})})}function yl(e,t,n){return A({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(v,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function Sl(e,t,n){return A({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(v,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1})})}function Cl(e){return{type:"custom",[ye]:{label:e},...R({},{type:"text",label:e}),render:({value:t,onChange:n})=>r(no,{value:xe(t),onChange:n,label:e})}}function _l(e,t,n){return A({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(v,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const Il={Design:At,Animation:Te};function El(e,t){return e.includes("Design")?t!=="Design":null}function nt(e,t){return{type:"custom",[q]:{label:e,level:t},marker:!0,fold:e,render:()=>r(I,{})}}function S(e){return nt(e,2)}function Tl(e){return{type:"custom",render:()=>r(lr,{text:e})}}function lr({text:e}){return r("p",{className:"sf-note",children:l(e)})}function Ol(e){return nt(e,1)}function Rl(e){return J(e)!==null&&e?.tabs!==void 0}const ot=new Map;function wl(e,t){const n=`${e}\0${t?t.join(""):""}`,o=ot.get(n)??{type:"custom",tabs:t,[q]:{label:e,level:1},bucket:e,marker:!0,render:()=>r(I,{})};return ot.set(n,o),o}const rt=new Map;function Pl(e){const t=rt.get(e)??{type:"custom",[q]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>r(I,{})};return rt.set(e,t),t}function ar(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function kl(e,t){return ar(e)===t?e:{...e,marker:!0,fold:t,render:()=>r(I,{})}}function Ll(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(I,{})}}function Nl({title:e,children:t}){const[n,o]=U(()=>!pe.has(e));return r(gn,{title:e,open:n,onToggle:i=>{o(i),i?pe.delete(e):pe.add(e)},children:t})}const pe=new Set;function vl({label:e}){return r(bn,{title:l(e),level:Xo(2)})}function it({swatches:e,current:t,onPick:n,names:o}){const i=e.find(c=>c.toLowerCase()===t.toLowerCase()),a=i?o?.[i]:void 0,s=a?l(a):t;return O("div",{className:"sf-swatches",children:[e.map(c=>{const d=o?.[c]?l(o[c]):c;return r(We,{content:d,children:r("button",{type:"button","aria-pressed":t.toLowerCase()===c.toLowerCase(),className:`sf-swatch ${t.toLowerCase()===c.toLowerCase()?"is-active":""}`,style:{background:c},onClick:()=>n(c),"aria-label":d})},c)}),r("span",{className:"sf-swatch-hex",children:s})]})}function Al(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=Do(n,t);return r(m,{label:l(e),icon:r(Ht,{}),changed:!i,action:r(y,{words:x()?.panel,label:l(e),changed:!i,detail:l("the theme's section background"),onReset:()=>o(No)}),children:it({swatches:vo,current:i?Fo:n??t??"",onPick:o,names:Ao})})}}}function sr(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=n,a=Po(i,t);return r(m,{label:l(e),icon:r(qt,{}),changed:!a,action:r(y,{words:x()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(To)}),children:it({swatches:wo,current:a?Lo:ko(i,t),onPick:o,names:Ro})})}}}function Fl(e=n=>n,t){return M({_gSectionTheme:S(Bo),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>r(eo,{value:e(n),onChange:o,followLabel:t})}})}function K({min:e,max:t,step:n,value:o,onChange:i,suffix:a="",readout:s=!0,notch:c,ariaLabel:d,disabled:u=!1}){const f=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return r("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(c-e)/(t-e)}:void 0,children:r(Gn,{min:e,max:t,step:n,value:o,suffix:a||void 0,showInput:s,label:d===void 0?void 0:l(d),disabled:u,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:p=>{p!==null&&p!==o&&i(p)}})})}function W(e,t,n,o,i,a,s="",c){return{type:"custom",...R({},{type:"number",label:e}),render:d=>r(m,{label:l(e),icon:k(t),action:c?c("storedValue"in d?d.storedValue:d.value,d.onChange):void 0,children:K({min:n,max:o,step:i,value:typeof d.value=="number"?d.value:a,suffix:s,ariaLabel:e,onChange:d.onChange})})}}function lt(e,t){const{min:n,max:o,step:i=1,unsetLabel:a,hint:s,restTrack:c,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?k(u):void 0,value:b?d||a===void 0?void 0:l(a):`${h}px`,changed:!b,action:d?ge(d,{changed:!b,onReset:()=>p(null)}):r(y,{words:x()?.panel,label:l(e),changed:!b,onReset:()=>p(null)}),hint:typeof s=="string"?l(s):s,children:c?c({min:n,max:o,step:i,px:h,label:e,onChange:p}):K({min:n,max:o,step:i,value:h??n,readout:!1,ariaLabel:e,onChange:p})})}}}function Dl(e){const t=W("Gap",r(we,{}),ue.min,ue.max,ue.step,Co[e],"px",(n,o)=>r(Qo,{inherited:!Io(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[_o]:e,render:n=>t.render({...n,value:Eo(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}const te="Corners";function fe(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(te),icon:r(Wt,{}),changed:i,action:ge(e.mark,{changed:i,onReset:()=>n(null)}),hint:e.hint,children:r(cr,{tier:e,px:o,onRadius:n})})}}}function at(e){let t=null;try{t=le()}catch{t=null}return[t?.values?.[e],n=>t?.onChange(e,n)]}function cr({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),i=e.useClosedReason?e.useClosedReason():null,[a,s]=at(e.sidesKey),c=Be(a)??[...De];return r(Fn,{label:l(te),value:c,corners:pn,onChange:d=>{const u=Be(d)??[];s(u.length===De.length?null:u)},radius:t,onRadiusChange:n,radiusMin:B,radiusMax:_e,radiusStep:e.step??1,radiusPlaceholder:String(o),disabled:i!==null,disabledReason:i??void 0})}function st(){return $({type:"custom",render:()=>r(Z,{})},"always")}function dr({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=G(),i=typeof o=="number"?`${o}px`:l("not set");return r(y,{words:x()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):N(i,l("Styles")),onReset:n})}function ur(){const{cornerRadiusPx:e}=G();return typeof e=="number"?e:B}function pr(){return fe({sidesKey:"sectionCornerSides",useFollowed:ur,useClosedReason:()=>dt()?l(ct):null,mark:r(dr,{label:te}),hint:r(fr,{})})}const ct="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function dt(){return Ze(F())}function fr(){return r(I,{children:dt()?ct:"Follows Styles ▸ Basics ▸ Corners until you set a number here."})}function Bl(){return M({_gShape:S("Shape"),sectionCorners:pr(),sectionCornerSides:st(),sectionBorder:ut("desktop"),sectionBorderPhone:ut("mobile")})}const hr=()=>({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 mr(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function gr(){let e;try{const t=yo(G().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||xo.line}function br({value:e,onChange:t,tier:n}){const[o]=at("sectionBorder"),i=gr(),a=e&&typeof e=="object"?e:{},s=n==="mobile"?o&&typeof o=="object"?o:{}:{},[c,d]=U(()=>In(a,s)),u=hr();return r(m,{label:l("Border"),icon:r(Gt,{}),action:r(Ge,{each:c,label:l("Each side"),onChange:d}),children:r(xn,{label:l("Border"),value:a,each:c,onChange:f=>t(mr(f)),placeholder:{sides:_n(s),style:s.style??"solid",color:s.color||i},presets:[i],words:u,max:bo})})}function ut(e){return g(e,{type:"custom",render:({value:t,onChange:n})=>r(br,{value:t,onChange:n,tier:e})})}function Hl(){return{_gMotion:S("Motion"),sectionAnimation:me("Entrance",r(Te,{}),[...mn],hn)}}function he(){let e=null;try{const{appState:t,selectedItem:n}=j(i=>i),o=n?.props?.id?String(n.props.id):void 0;e=o?He(t?.data,o):null}catch{e=null}return e!==null&&Ze(e)}function pt(e){const{cornerRadiusPx:t}=G(),n=he(),o=typeof t=="number"?t:e;let i=null;try{const{appState:s,selectedItem:c}=j(u=>u),d=c?.props?.id?String(c.props.id):void 0;i=d?He(s?.data,d):null}catch{i=null}if(n||!i)return o;const a=i.sectionCorners;return fn(a)?a:o}function xr({label:e,changed:t=!1,onReset:n=()=>{}}){const o=he(),i=pt(B),a=o?"Site":"Section";return r(y,{words:x()?.panel,label:l(e),changed:t,detail:N(`${i}px`,o?l("Styles"):l("the section")),onReset:n})}function yr(){return r(I,{children:he()?l("The section is full width, so this card follows Styles ▸ Basics ▸ Corners."):l("Follows the section's Corners until you set a number here.")})}function Sr(){return fe({sidesKey:"cardCornerSides",useFollowed:()=>pt(B),mark:r(xr,{label:te}),hint:r(yr,{})})}function Cr(){return{type:"custom",render:()=>r(Ct,{})}}function Gl(e){return{...e,render:t=>r(_t,{render:e.render,props:t})}}function Ml(){return{_gShape:S("Shape"),cardCorners:Sr(),cardCornerSides:st(),cardCornersApplyAll:Cr()}}function Kl(){return L("Justify",r(Bt,{}),Ve,Ve[0].value)}function Wl(){return L("Item alignment",r(Ft,{}),po,"stretch")}function Ul(){return L(go,r(dn,{}),Je,Je[0].value)}function jl(){return{type:"custom",render:({value:e,onChange:t})=>{const n=de.find(o=>o.value===e)??de[0];return r(m,{label:l(qe),icon:r(Oe,{}),value:l(n.label),children:r(Ke,{className:"sf-gallery-layouts",label:l(qe),value:n.value,onChange:t,options:de.map(o=>({value:o.value,label:l(o.label),picture:r("span",{className:"sf-gallery-pic",children:_r(o.weights).map((i,a)=>r("i",{style:{gridColumn:`span ${i}`}},a))})}))})})}}}function _r(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 Xl(){return L(fo,r(we,{}),ze,ze[0].value)}function $l(){return g("mobile",W(ho,r(Re,{}),Ye,mo,1,Ye))}function zl(e){const t=me(co,Yo("`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)."),uo(e),$e(e,void 0));return{type:"custom",render:n=>t.render({...n,value:$e(e,n.value),onChange:o=>n.onChange(o)})}}function Vl(e,t,n,o,i,a){return{type:"custom",render:({value:s,onChange:c})=>r(m,{label:l(e),icon:r(Fe,{noun:a}),action:r(y,{words:x()?.panel,label:l(e),changed:!Mo(s),detail:l("the Text style in Styles"),onReset:()=>c(Go),defaultAction:{onPress:()=>c(Ho),title:l("Keep this section's own built-in size"),icon:r(Mt,{})}}),children:K({min:t,max:n,step:o,value:typeof s=="number"?s:i,suffix:"px",ariaLabel:e,onChange:c})})}}function Yl(){return{_gCellWidth:S("Cell width"),gridSpan:L("Positions",r(Oe,{}),[{label:"Auto",value:""},...Array.from({length:Ot},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function F(){let e=null;try{e=j(t=>t).selectedItem}catch{e=null}return e?.props??{}}function Ir({min:e,max:t,step:n,px:o,label:i,onChange:a,desktopKey:s,fallback:c}){const d=F()[s],u=se(void 0,d,c);return r(I,{children:K({min:e,max:t,step:n,value:se(o,d,c),readout:!1,ariaLabel:i,notch:u,onChange:a})})}function Er({label:e,desktopKey:t,fallback:n,changed:o=!1,onReset:i=()=>{}}){const a=F()[t],s=se(void 0,a,n);return r(y,{words:x()?.panel,label:l(e),changed:o,detail:l("{value} on desktop",{value:`${s}px`}),onReset:i})}function Tr(e){return lt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:r(Er,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>r(Ir,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}function ql(e){return{type:"custom",render:({value:t,onChange:n})=>r(Rr,{...e,value:t,onChange:n})}}function Or({label:e,icon:t,options:n,value:o,resolved:i,restWord:a,onChange:s}){const c=n.some(d=>d.value===o);return r(m,{label:l(e),icon:k(t),action:r(y,{words:x()?.panel,label:l(e),changed:c,detail:l("{value} on desktop",{value:l(a)}),onReset:()=>s(void 0)}),children:oe({options:n,value:c?o:i,onChange:d=>s(d),ariaLabel:e})})}function Rr({label:e,icon:t,options:n,desktopKey:o,resolve:i,value:a,onChange:s}){const c=F()[o],d=i(void 0,c),u=n.find(f=>f.value===d)?.label??"";return r(Or,{label:e,icon:t,options:n,value:a,resolved:d,restWord:u,onChange:s})}const wr={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Pr={Top:ve,Bottom:ke,Left:Le,Right:Ne},kr=e=>{const t=Pr[e];return r(t,{})};function Jl(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,i=_=>wr[_],a=_=>W(i("Top"),r(ve,{}),T.min,T.max,T.step,_,"px"),s=(_,Y,P,re=T)=>g("mobile",Tr({label:i(_),icon:kr(_),desktopKey:Y,min:re.min,max:re.max,step:re.step,fallback:P})),c=e.top??T.min,d=e.bottom??T.min,u="sectionPaddingLeft",f="sectionPaddingRight",p=e.sideBounds??T,h=e.side??p.min,b=e.sidePhone??h,C=e.phone===!0,w=_=>C?g("desktop",_):_;return M({...o?{_gSpacing:S("Padding")}:{},[t]:w(a(c)),...C?{[H(t)]:s("Top",t,c)}:{},...e.only==="top"?{}:{[n]:w(W(i("Bottom"),r(ke,{}),T.min,T.max,T.step,d,"px")),...C?{[H(n)]:s("Bottom",n,d)}:{}},...e.sides?{[u]:w(W(i("Left"),r(Le,{}),p.min,p.max,p.step,h,"px")),...C?{[H(u)]:s("Left",u,b,p)}:{},[f]:w(W(i("Right"),r(Ne,{}),p.min,p.max,p.step,h,"px")),...C?{[H(f)]:s("Right",f,b,p)}:{}}:{}})}const V=["top","right","bottom","left"],Lr={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},ft=e=>typeof e=="number"?e:null;function Nr(e,t,n){const o={};for(const i of V)n[i]!==t[i]&&(o[e[i]]=n[i]??void 0);return o}function vr({tier:e,o:t}){let n=null;try{n=le()}catch{n=null}const o=n?.values??{},i=e==="mobile"?t.phoneKeys:t.keys,a=Object.fromEntries(V.map(u=>[u,ft(o[i[u]])])),s=Object.fromEntries(V.map(u=>[u,String(e==="mobile"?ft(o[t.keys[u]])??t.fallback[u]:t.fallback[u])])),[c,d]=U(()=>Cn(a,s));return r(m,{label:l("Padding"),icon:r(tn,{}),action:r(Ge,{each:c,label:l("Each side"),onChange:d}),children:r(Sn,{label:l("Padding"),each:c,value:a,placeholder:s,min:t.min,max:t.max,step:t.step,onChange:u=>{const f=Nr(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 Zl(e={}){const t={...Lr,...e.keys},n={keys:t,phoneKeys:Object.fromEntries(V.map(c=>[c,H(t[c])])),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=c=>{const d={type:"custom",render:()=>r(vr,{tier:c,o:n})};return o?g(c,d):d},a=()=>$({type:"custom",render:()=>r(Z,{})},"always"),s=V.filter(c=>c!=="top");return M({...e.group===!1?{}:{_gSpacing:S("Padding")},[n.keys.top]:i("desktop"),...o?{[n.phoneKeys.top]:i("mobile")}:{},...Object.fromEntries(s.map(c=>[n.keys[c],{...a(),reachedBy:n.keys.top}])),...o?Object.fromEntries(s.map(c=>[n.phoneKeys[c],g("mobile",a())])):{}})}function Ql(e,t){const n=Object.fromEntries(Object.entries(t).map(([a,s])=>[a,a in e&&J(s)?e[a]:s])),o={};let i=!1;for(const[a,s]of Object.entries(e)){if(a in t){i||Object.assign(o,n),i=!0;continue}o[a]=s}return i||Object.assign(o,n),o}const ht=e=>typeof e=="number"?e:null;function Ar(e,t,n){const o={};for(const i of["x","y"])n[i]!==t[i]&&(o[e[i]]=n[i]??void 0);return o}function Fr({o:e}){let t=null;try{t=le()}catch{t=null}const n=t?.values??{},o={x:ht(n[e.keys.x]),y:ht(n[e.keys.y])},i=l(e.label??"Position"),a=!!(o.x||o.y),s=u=>{const f=Ar(e.keys,o,u);Object.keys(f).length&&t?.onChangeMany(f)},c=r(Hn,{label:i,value:o,onChange:s,words:{x:l("Left and right"),y:l("Up and down"),unit:"px"},placeholder:{x:"0",y:"0"},min:e.min,max:e.max,step:e.step??1}),d=r(y,{words:x()?.panel,label:i,changed:a,detail:"0 px, 0 px",onReset:()=>s({x:null,y:null})});return e.label===null?O("div",{className:"sf-position-line",children:[c,d]}):r(m,{label:i,icon:r(en,{}),changed:a,action:d,children:c})}function ea(e){return{[e.keys.x]:{type:"custom",render:()=>r(Fr,{o:e})},[e.keys.y]:{...$({type:"custom",render:()=>r(Z,{})},"always"),reachedBy:e.keys.x}}}const Dr={contained:"Contained",page:"Page",full:"Full"},ne="Width";function ta(e,t=Ko,n=!0){const o=t.map(i=>({label:Wo[i]??Dr[i],value:i}));return M({...n?{_gWidth:S(ne)}:{},widthMode:{type:"custom",render:({onChange:i,field:a})=>r(m,{label:l(ne),icon:r(cn,{}),action:n?r(er,{inherited:a?.inherited??!1,onReset:()=>i(Uo),label:ne}):void 0,children:oe({options:o,value:a?.currentValue||e,onChange:i,ariaLabel:ne})})}})}function na(){const e=o=>({type:"custom",render:({value:i,onChange:a})=>r(m,{label:z,icon:k(r(Jt,{})),action:o?o(a):void 0,children:oe({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(i)?i:"auto",onChange:a,ariaLabel:z})})}),t=()=>({type:"custom",render:({value:o,onChange:i,field:a})=>{const s=a?.unit==="%"?"%":"px",c=s==="%"?so:ao;return r("div",{className:"sf-field",children:K({min:c.min,max:c.max,step:c.step,value:typeof o=="number"?o:c.fallback,suffix:s,ariaLabel:z,onChange:i})})}}),n=()=>me("Unit",r(Pe,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return M({_gHeight:S(z),sectionHeightMode:g("desktop",e()),sectionHeightValue:g("desktop",t()),sectionHeightUnit:g("desktop",n()),sectionHeightModePhone:g("mobile",e(o=>r(Br,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:g("mobile",t()),sectionHeightUnitPhone:g("mobile",n())})}function Br({onClear:e}){const t=F(),n=oo(t),o=ro(t),i=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return r(y,{words:x()?.panel,label:l(z),changed:n,detail:i,onReset:e})}function oa(){const e=n=>({type:"custom",render:({value:o,onChange:i,id:a,name:s})=>r(Hr,{value:o,onChange:i,labelId:`${a??s??"stickTop"}-label`,phone:n})}),t=()=>({type:"custom",render:({value:n,onChange:o})=>r("div",{className:"sf-field",children:K({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:S(ce),stickTop:g("desktop",e(!1)),stickTopDistance:g("desktop",t()),stickTopPhone:g("mobile",e(!0)),stickTopDistancePhone:g("mobile",t())}}function Hr({value:e,onChange:t,labelId:n,phone:o}){const i=F(),a=lo(i),s=o?a.phone:e===!0;return r(m,{label:l(ce),labelId:n,icon:k(r(rn,{})),action:O(I,{children:[o?r(y,{words:x()?.panel,label:l(ce),changed:io(i),detail:l("{value} on desktop",{value:a.desktop?`${a.desktopDistance}px`:l("Off")}),onReset:()=>t(void 0)}):null,r(Me,{checked:s,onChange:t,ariaLabelledBy:n})]})})}const mt="e.g. about";function ra(){return{_gAnchor:S("Anchor"),anchor:A({control:"plainText",label:"Name",placeholder:mt},{type:"custom",render:({value:e,onChange:t})=>r(vt,{value:e,onChange:t,nameBox:(n,o)=>r(v,{value:n,onChange:o,label:"Name",placeholder:mt,hideable:!1,markup:!1})})})}}function ia(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:s})=>{const c=`${a??s??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return r(m,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:r(Dn,{id:c,value:Number.isFinite(d)?new Date(d):null,onChange:u=>i(u?u.toISOString():"")})})}}}function D(e,t,n){return{type:"custom",...R({},{...ee,label:e}),render:({value:o,onChange:i,id:a,name:s})=>{const c=typeof o=="boolean"?o:t,d=`${a??s??e}-label`;return r(m,{label:l(e),labelId:d,icon:n,action:r(Me,{checked:c,onChange:i,ariaLabelledBy:d})})}}}function la(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const i=`${String(n??o??"pageBackground")}-colour`;return r(Ue,{label:l("Background"),icon:r(Ae,{}),id:i,value:un(e),onChange:t})}}}function aa(e,t){return{type:"custom",...R({},{...ee,label:e}),render:({value:n,onChange:o,id:i})=>{const a=typeof n=="boolean"?n:t,s=`${i??e}-checkbox`;return r(m,{label:l(e),htmlFor:s,className:"sf-checkbox",action:r(An,{id:s,checked:a,onChange:o})})}}}const sa={follows:"fill"},ca={follows:"ink"};function da(e,t,n){if(typeof t!="string"){const o=t.follows;return{type:"custom",render:({value:i,onChange:a})=>r(Gr,{label:e,part:o,icon:n,value:i,onChange:a})}}return{type:"custom",render:({value:o,onChange:i})=>r(Ue,{label:l(e),icon:n,value:o||t,onChange:i})}}function Gr({label:e,part:t,icon:n,value:o,onChange:i}){const a=So(G().theme),s=t==="fill"?a.fill:a.ink;return r(Mn,{label:l(e),icon:n,value:o||"",inherited:s,resetTo:N(s.toUpperCase(),l("Styles")),onChange:i,onReset:()=>i("")})}const Mr=[{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 gt({label:e,value:t,onChange:n,points:o=Mr}){const i=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return r(vn,{label:l(e),value:t,points:i,onChange:n})}function ua(){return $({type:"custom",render:()=>r(Z,{})},"always")}const Kr=Ee([]);function pa(e,{stacking:t,fallback:n=kt}){return{type:"custom",render:({value:o,onChange:i})=>{const a=Pt.includes(o)?o:n;return t?r(Wr,{label:e,value:a,onChange:i}):bt({label:e,value:a,onChange:i,points:Kr})}}}function Wr({label:e,value:t,onChange:n}){const{appState:o,selectedItem:i}=j(c=>c),a=i?.props?.id?String(i.props.id):void 0,s=a?wt(o?.data,a):[];return bt({label:e,value:t,onChange:n,points:Ee(s,a)})}function bt({label:e,value:t,onChange:n,points:o}){const i=o.find(a=>a.disabled);return r(m,{label:l(e),icon:r(nn,{}),hint:i?.title?l(i.title):void 0,children:gt({label:e,value:Lt(t),onChange:n,points:o})})}const fa={top:r($t,{}),right:r(Xt,{}),bottom:r(Ut,{}),left:r(jt,{})};function ha(e,t,n,o,i,a){const s=f=>t.find(p=>p.value===f),c=f=>({value:f,label:"",disabled:!0,title:o}),d=f=>{const p=t.find(b=>b.cell===f);if(!p)return c(`missing-${f}`);const h=a?.[f];return h?{value:p.value,label:p.label,icon:h}:{value:p.value,label:p.label}},u=[c("corner-top-left"),d("top"),c("corner-top-right"),d("left"),c("centre"),d("right"),c("corner-bottom-left"),d("bottom"),c("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:s(h)?.label?l(s(h).label):"",children:gt({label:e,value:h,onChange:p,points:u})})}}}const Ur="\0note";function L(e,t,n,o,i){return{type:"custom",options:n,fallback:o,...i?{note:i}:{},...R({},{type:"select",label:e}),render:({value:a,onChange:s,field:c})=>{const d=c.options??n,u=c.fallback??o,f=d.some(p=>p.value===a)?a:u;return r(m,{label:l(e),icon:k(t),children:r(En,{value:f,ariaLabel:l(e),onChange:s,options:[...i?[{label:l(i),value:Ur,disabled:!0}]:[],...d.map(p=>({label:l(p.label),value:p.value}))]})})}}}function ma(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:i,field:a})=>r(Qn,{label:e,options:(a.options??t).map(s=>({...s,label:l(s.label)})),value:Array.isArray(o)?o:[],onChange:i,...n?{emptyLabel:l(n)}:{}})}}function ga(e,t,n,o){return{type:"custom",options:t,fallback:n,...R({},{type:"select",label:e}),render:({value:i,onChange:a,field:s})=>r(to,{label:e,options:(s.options??t).map(c=>({...c,label:l(c.label)})),fallback:s.fallback??n,value:i,onChange:a,placeholder:o===void 0?void 0:l(o)})}}function ba(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const i={value:n,onChange:o,...t};return r(e,{...i})}}}function oe({options:e,value:t,onChange:n,ariaLabel:o,disabled:i=!1}){return r(yn,{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 xa=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function me(e,t,n,o){const i=n.map(a=>typeof a=="string"?{label:a,value:a}:a);return{type:"custom",...R({},{type:"radio",label:e,options:i.map(a=>({value:a.value,label:a.label}))}),render:({value:a,onChange:s,field:c})=>r(m,{label:l(e),icon:k(t),children:oe({options:i,value:i.some(d=>d.value===a)?a:a||c?.currentValue||o,onChange:s,ariaLabel:e})})}}function ya(e,t,n,o={}){return{type:"custom",[Se]:!0,render:({value:i,onChange:a})=>r(Zn,{value:i||"",onChange:a,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen})}}const Sa={HeroSingle:["imageFocal"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Ca({value:e,onChange:t,label:n}){const o=e||{},i=!!o.pending,a=i?"var(--fg-dim, #888)":o.ok?"#1d9e75":"#d85a30",s=!!Vo(zo()).geocode,c=(d,u)=>t({...o,[d]:u===""?void 0:Number(u)});return O(m,{label:l(n),icon:r(ae,{}),children:[s&&O(I,{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&&O("div",{style:{marginTop:8,display:"grid",gap:8},children:[r(m,{label:l("Latitude"),icon:r(ae,{}),children:r("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"34.0990198"}),value:typeof o.lat=="number"?o.lat:"",onChange:d=>c("lat",d.target.value)})}),r(m,{label:l("Longitude"),icon:r(ae,{}),children:r("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"-117.9842833"}),value:typeof o.lng=="number"?o.lng:"",onChange:d=>c("lng",d.target.value)})})]})]})}function jr(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Xr(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 _a(e,t){return e===null?null:t>e?e:null}function $r(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 Ia={label:"Ticker items",icon:r(Qt,{})};function Ea(e,t,n,o){return{type:"custom",[E]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...R({},{...tt.textList,label:e}),render:({value:i,onChange:a})=>r(zr,{label:e,icon:k(t),items:Array.isArray(i)?i:[],placeholder:n,onChange:a,markup:o==="markup"})}}function zr({label:e,icon:t,items:n,placeholder:o,onChange:i,markup:a=!1}){const s=ie(null),[c,d]=U(null),u=p=>p.map(h=>({text:h?.text??""})),f=p=>{const h=$r(n,p,c);h===null&&(s.current=null),d(h),i(u(p))};return r(Tn,{label:l(e),icon:t,noun:l("item"),items:n,onChange:f,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?r(je,{target:s,value:jr(n,c),onChange:p=>i(Xr(n,c??-1,p)),disabled:c===null,label:c===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,h,b)=>r("input",{type:"text",className:a&&c===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=>{s.current=C.currentTarget,d(h)}})})}function Ta(e,t){const n=`${e.label} — row ${t+1}`;return A({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:i})=>r(v,{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:S("Cards"),coverIndex:L("Cover image",r(Zt,{}),Yn,String(qn),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:sr("Image background",Oo),cardImage:Yr(),spinOnHover:D("Rotate on hover",e?.spinDefault??!0,r(ln,{}))}}function Ra(){return{outline:L("Card outline",r(an,{}),$n,Vn),indexBadge:L("Card number",r(Pe,{}),Xn,zn),showBadge:D("Product badge",!0,r(Fe,{noun:"tag"}))}}function wa(e){const t=e&&"bottomDefault"in e?e.bottomDefault:!0,n=e&&"defaults"in e?e.defaults:{showCardSizes:t,showCardBuy:t,showCardPage:t};return{_gShowOnCard:S("Show on a card"),showCardPrice:D("Price",!0,r(zt,{})),showCardFinishes:D("Finish swatches",!0,r(Vt,{})),showCardSizes:D("Sizes",n.showCardSizes,r(on,{})),showCardBuy:D("Buy button",n.showCardBuy,r(Kt,{})),showCardPage:D("Page button",n.showCardPage,r(Ae,{}))}}function Pa(e,t="display"){const n=H(t);return{[t]:g("desktop",{type:"custom",render:({value:o,onChange:i})=>r(xt,{parts:e,changed:Rn(o),shown:a=>wn(o,a),onPress:(a,s)=>i(Ln(o,a,s)),onReset:()=>i(void 0)})}),[n]:g("mobile",{type:"custom",render:({value:o,onChange:i})=>r(Vr,{parts:e,desktopKey:t,value:o,onChange:i})})}}function xt({parts:e,changed:t,shown:n,onPress:o,onReset:i,detail:a}){const s=l("Display");return r(m,{label:s,icon:r(Dt,{}),changed:t,action:r(y,{words:x()?.panel,label:s,changed:t,detail:a,onReset:i}),children:r(On,{label:s,items:e.map(c=>({id:c.id,label:l(c.label),shown:n(c.id)})),onChange:o})})}function Vr({parts:e,desktopKey:t,value:n,onChange:o}){const i=F()[t];return r(xt,{parts:e,changed:kn(n),shown:a=>Pn(i,n,a),onPress:(a,s)=>o(Nn(n,a,s)),onReset:()=>o(Un),detail:l("the same as Desktop")})}function Yr(){return lt("Card image",{min:B,max:_e,step:It,hint:"Rounds the picture. The card's own corner is in Styles."})}function ka(){return fe({sidesKey:"cornerSides",step:Et,useFollowed:()=>B,mark:r(qr,{label:Tt}),hint:l("Rounds the picture. Left alone it stays square.")})}function qr({label:e,changed:t=!1,onReset:n=()=>{}}){return r(y,{words:x()?.panel,label:l(e),changed:t,onReset:n})}function La(){return{type:"custom",render:({value:e,onChange:t})=>r(Jr,{value:typeof e=="string"?e:"",onChange:t})}}function Jr({value:e,onChange:t}){const[n,o]=U(null),i=Ie.filter(s=>n===null||X[s].across===n),a=e&&e in X?X[e]:null;return O(I,{children:[r(m,{label:l("Photos in a row"),icon:r(Re,{}),children:O("div",{className:"sf-gallery-filter",children:[r("button",{type:"button","aria-pressed":n===null,onClick:()=>o(null),children:l("All")}),Rt.map(s=>r("button",{type:"button","aria-pressed":n===s,onClick:()=>o(s),children:s},s))]})}),r(m,{label:l("Layout"),icon:r(Yt,{}),value:a?l(a.label):l("Not chosen"),hint:l("{n} of {total} layouts",{n:i.length,total:Ie.length}),children:r(Ke,{className:"sf-gallery-layouts",label:l("Layout"),value:e,onChange:t,onClear:()=>t(""),options:i.map(s=>({value:s,label:l(X[s].label),picture:r("span",{className:"sf-gallery-pic",children:X[s].desktop.map(([c,d],u)=>r("i",{style:{gridColumn:`span ${c}`,gridRow:`span ${d}`}},u))})}))})})]})}export{nr as BOUND_TO_POST,ml as BOUND_TO_POST_NOTE,Il as BUCKET_ICONS,Sa as CUSTOM_FIELD_MEDIA,Ca as CoordsField,fa as EDGE_ARROWS,Bn as FOCAL_DEFAULT,Mr as FOCAL_POINTS,q as FOLD_FIELD_MARKER,sa as FOLLOWS_SITE_BUTTON,ca as FOLLOWS_SITE_BUTTON_INK,gt as FocalPicker,vl as GroupLabel,or as HIGHLIGHT_HINT,v as HidableTextField,ye as LINK_FIELD_MARKER,al as Label,Se as MEDIA_FIELD_MARKER,xa as MEDIA_TYPE_OPTIONS,gl as NOT_BOUND_TO_POST,Nl as PanelBand,lr as PanelNoteLine,Rr as PhoneChoiceRow,Or as PhoneChoiceStrip,bt as PlacementGridView,Ce as SCAFFOLD_FIELD_MARKER,Fa as SCALAR_TEXT_CONTROLS,ct as SECTION_BLEEDS_HINT,Lr as SIDE_PAD_KEYS,oe as Segmented,Qo as SiteGapDefaultReset,K as Slider,it as Swatches,Aa as TEXT_CONTROL_KINDS,E as TEXT_FIELD_MARKER,Ia as TICKER_ITEMS_ROW,zr as TextListField,er as WidthDefaultReset,$r as aimAfterListChange,ra as anchorFields,N as backTo,Al as backgroundField,Wl as boxAlignField,Xl as boxBlockSpacingField,Kl as boxJustifyField,$l as boxPhoneRowField,jl as boxShareField,Ul as boxWrapField,wl as bucketHeader,Sr as cardCornersField,sr as cardImageBackgroundField,Yr as cardImageField,Oa as cardMediaFields,Ml as cardShapeFields,wa as cardShowFields,Ra as cardStyleFields,Yl as cellWidthFields,aa as checkbox,da as colorInput,Sl as copyText,st as cornerSidesField,fe as cornersRowField,ia as dateTime,Pl as designGroupHeader,zl as directionField,Pa as displayFields,ha as edgePad,El as entriesHiddenForTab,_a as focusAfterRemove,ua as focusKeptField,kl as foldMarker,J as foldMetaOf,ar as foldTitleOf,La as galleryLayoutField,Dl as gapField,S as group,na as heightFields,xe as hidableText,ir as hintIsWhileTyping,k as iconOf,ka as imageCornersField,hl as inOwnBox,Rl as isBucketHeader,qo as isNoGlyph,Cl as linkField,ma as multiSelect,Yo as noGlyph,la as pageBackgroundField,Tl as panelNote,ql as phoneChoiceField,Tr as phoneOverrideField,pa as placementField,yl as plainText,_l as plainTextarea,ea as positionFields,Ar as positionPatch,lt as pxField,Ll as quietMarker,be as readHidable,jr as rowText,ga as searchSelect,Ol as section,Hl as sectionAnimationFields,ut as sectionBorderField,pr as sectionCornersField,Bl as sectionShapeFields,Fl as sectionThemeFields,me as segmented,L as select,Xr as setRowText,M as sharedStyleKinds,Zl as sidesPaddingFields,Nr as sidesPaddingPatch,Vl as sizeField,W as slider,ba as sourceField,Jl as spacingFields,oa as stickFields,Ql as swapPadding,Gl as templateField,bl as text,St as textFieldIdentifier,dl as textFieldOffPage,pl as textFieldPanelOnly,Ea as textList,Ta as textListRowField,xl as textarea,D as toggle,ya as upload,Jo as usePageWidthDetail,F as useSelectedProps,at as useSelectedSibling,Zo as useSiteGapDetail,ta as widthField,fl as withIdentifier,cl as withOffPage,ul as withPanelOnly,sl as withScaffold};
|
|
1
|
+
"use client";import{jsx as i,jsxs as O,Fragment as I}from"react/jsx-runtime";import{cloneElement as be,useId as It,useRef as ae,useState as j}from"react";import{useEasel as X}from"efficient-easel/easel";import{toDateKey as Et,fromDateKey as Tt}from"efficient-shell/format";import{say as a,editorEaselWords as y}from"../../../format/lib/editor-words.js";import{mediaValueSrc as ye}from"../../../format/lib/media-value.js";import{LOADING_SHOWS_LABELS as xe,loadingShowsOf as wt}from"../../../format/lib/hero-video.js";import{readHidable as Se,hidableText as Ce}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as Q,LINK_FIELD_MARKER as _e,MEDIA_FIELD_MARKER as Ie,SCAFFOLD_FIELD_MARKER as Ee,TEXT_FIELD_MARKER as E,foldMetaOf as ee,textFieldIdentifier as Ot}from"efficient-easel/draw";import Rt from"../../components/ApplyCornersToSiblings.js";import Pt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as vt,CORNER_RADIUS_MAX as Te,CORNER_RADIUS_MIN as G}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as kt,IMAGE_CORNERS_LABEL as Lt}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as Nt}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Ft,GALLERY_LAYOUTS as $,GALLERY_LAYOUT_KEYS as we,galleryPictureCells as At}from"../../../format/lib/content/gallery-layout.js";import{anchorSiblingsOf as Dt,HERO_GROUP_PLACEMENTS as Bt,HERO_GROUP_PLACEMENT_DEFAULT as Ht,normalisePlacement as Gt,placementPoints as Oe}from"../../../format/lib/hero-group-placement.js";import Mt from"../../components/KeepHint.js";import Kt from"../../components/AnchorField.js";import{AdjustIcon as Wt,AlignLeftIcon as Ut,EyeIcon as jt,AlignSeparateIcon as Xt,AnimationIcon as Re,BackgroundIcon as $t,BorderAllIcon as zt,BlockSectionIcon as Vt,CartIcon as Yt,ColumnWidthsIcon as Pe,ColumnsIcon as ve,CornerIcon as qt,DirectionDownIcon as Jt,DirectionLeftIcon as Zt,DirectionRightIcon as Qt,DirectionUpIcon as en,DollarIcon as tn,FinishIcon as nn,GapIcon as ke,GridIcon as on,GroundIcon as rn,HashIcon as Le,HeightIcon as ln,ImageIcon as an,ListIcon as sn,LocationIcon as se,NudgeIcon as cn,PaddingAllIcon as dn,PaddingBottomIcon as Ne,PaddingLeftIcon as Fe,PaddingRightIcon as Ae,PaddingTopIcon as De,PageIcon as Be,PlacementIcon as un,ProductSizeIcon as pn,StickyIcon as fn,RotateIcon as mn,SquareIcon as hn,TypeIcon as gn,WidthIcon as bn,WrapIcon as yn}from"efficient-easel/icons";import{FieldGlyph as He}from"../../components/FieldGlyph.js";import{resolvePageBackground as xn}from"../../../format/lib/content/page-background.js";import{CORNER_SIDES as Ge,CORNER_SIDE_POINTS as Sn,hasOwnSectionCorners as Cn,normalizeCornerSides as Me}from"../../../format/lib/content/section-corners.js";import{SECTION_MOTION_NONE as _n,SECTION_MOTION_OPTIONS as In}from"../../../format/lib/content/section-animation.js";import{enclosingSectionProps as Ke}from"./enclosing-section.js";import{SettingsDefaultReset as x,SettingsDrill as En,SettingsField as h,SettingsGroup as Tn,SettingsGroupSub as wn,SettingsBorder as On,SettingsSegmented as Rn,SettingsSides as Pn,SettingsSidesEach as We,sidesStartEach as vn,SettingsSwitch as Ue,borderSides as kn,borderStartEach as Ln}from"efficient-easel/panel";import{FieldSelect as Nn,ListField as Fn}from"efficient-easel/fields";import{DisplayChips as An}from"efficient-shell/ui";import{desktopDisplayChanged as Dn,partShownOnDesktop as Bn,partShownOnPhone as Hn,phoneDisplayChanged as Gn,withDesktopPart as Mn,withPhonePart as Kn}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as Wn,Checkbox as Un,CornersInput as jn,DatePicker as Xn,DateTimePicker as $n,FOCAL_DEFAULT as zn,PictureTiles as je,PositionInput as Vn,Slider as Yn,Tooltip as Xe}from"efficient-shell/ui";import{ColourRow as $e,InheritedColourRow as qn}from"./ColourControl.js";import ze from"./MarkupToolbar.js";import{deviceField as g}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as Jn,NoControlMark as te,noControlField as z}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as Zn}from"../../../format/lib/document/own-box.js";import{PHONE_CLEAR as Qn,resolvePhoneValue as ce}from"../../../format/lib/document/phone-override.js";import{phoneKey as M}from"efficient-easel/draw";import{SuppressibleText as eo}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as to,CARD_OUTLINE_OPTIONS as no,DEFAULT_CARD_INDEX_FORMAT as oo,DEFAULT_CARD_OUTLINE as ro}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as io,DEFAULT_COVER_INDEX as lo}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as ao}from"efficient-easel/draw";import so from"../../components/MediaUploadField.js";import{useSelectedHost as V}from"./selected-host.js";import co from"../../components/MultiSelectField.js";import uo from"../../components/SectionThemePicker.js";import po from"../../components/SearchSelectField.js";import fo from"../../components/StorefrontLinkField.js";import{UiIcon as Ve}from"efficient-easel/draw/client";import{SECTION_PADDING as T}from"../../../render/lib/content/section-padding.js";import{buttonLook as mo,buttonWordsSummary as ho}from"../../../render/lib/content/button-look.js";import{nonEmptyString as go}from"../../../format/lib/non-empty-string.js";import{usePreviewParts as bo}from"efficient-easel/draw/client";import{encodePartId as yo}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as xo,useEaselStrings as So}from"efficient-easel/strings";import{hasPhoneHeight as Co,resolveSectionMinHeight as _o}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as ne,SECTION_STICK_LABEL as de,hasPhoneStick as Io,resolveSectionStick as Eo}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as To,SECTION_MIN_HEIGHT_GROUP_LABEL as Y,SECTION_SCREEN_PCT as wo}from"../../../format/lib/content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as Oo,containerDirectionPoints as Ro,resolveContainerDirection as Ye}from"../../../format/lib/content/container-direction.js";import{BOX_ALIGN_POINTS as Po,BOX_BLOCK_SPACING_LABEL as vo,BOX_BLOCK_SPACING_POINTS as qe,BOX_JUSTIFY_POINTS as Je,BOX_PHONE_ROW_LABEL as ko,BOX_PHONE_ROW_MAX as Lo,BOX_PHONE_ROW_MIN as Ze,BOX_SHARE_LABEL as Qe,BOX_SHARE_POINTS as ue,BOX_WRAP_LABEL as No,BOX_WRAP_POINTS as et}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as k}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Fo}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as Ao,normalizeTheme as Do,selectedThemeColors as Bo,siteButtonPaint as tt}from"../../../format/lib/theme.js";import{CONTAINER_GAP as pe,CONTAINER_GAP_BUILT_IN as Ho,GAP_FIELD_CONTAINER as Go,hasOwnContainerGap as Mo,resolveContainerGap as Ko}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as Wo,CARD_IMAGE_BG_OFF as Uo,CARD_IMAGE_BG_SWATCH_NAMES as jo,CARD_IMAGE_BG_SWATCHES as Xo,isCardImageBackgroundInheriting as $o,cardImageBackgroundChoice as zo,THEME_CARD_IMAGE_BG as Vo}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as Yo,SECTION_BG_SWATCHES as qo,SECTION_BG_SWATCH_NAMES as Jo,THEME_SECTION_BG as Zo,isSectionBackgroundInheriting as Qo}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as er}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as tr,TYPE_SIZE_INHERIT as nr,isTypeSizeInheriting as or}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as rr,WIDTH_CHOICE_LABEL as ir,WIDTH_INHERIT as lr,resolveWidth as ar,sectionRunsFullWidth as nt}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as sr}from"./panel-heading-scope.js";import{withStyleKind as cr}from"efficient-easel/style-clipboard";import{useEaselSession as dr}from"efficient-easel/screen/lib/session-context";import{backendOf as ur}from"../website-session.js";import{describedAs as w}from"../../../format/lib/host-document-bridge.js";function K(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!ee(n)&&cr(n,`section:${t}`);return e}function Dl({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?a(e):e})}function ot(){return null}function pr(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return i(ot,{},e)}function fr(e){return e.type===ot}function R(e){return fr(e)?void 0:e}function F(e,t){return a("{value} from {from}",{value:e,from:t})}function mr(){const{appState:e}=X(r=>r),t=e.data.root?.props??{},{mode:n,pageWidth:o}=ar(t,"full");return n==="page"?F(`${o}px`,a("the page")):n==="contained"?F(a("Contained"),a("the page")):F(a("Full"),a("the page"))}function hr(){const{blockGap:e}=k();return e===null?a("this container's own spacing"):F(`${e}px`,a("Styles"))}function gr({inherited:e,onReset:t,label:n}){return i(x,{words:y()?.panel,label:a(n),changed:!e,detail:hr(),onReset:t})}function br({inherited:e,onReset:t,label:n}){return i(x,{words:y()?.panel,label:a(n),changed:!e,detail:mr(),onReset:t})}function A({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:l,hideable:s=!0,markup:c=!0}){const{text:d,hidden:u}=Se(e),f=ae(null),p=ae(null),m=v=>t(s?{text:v,hidden:u}:v),b=()=>t({text:d,hidden:!u}),C=s&&u,P=It(),_=r?_r(r)?i("span",{className:"sf-hint-keep sf-hint-while-typing",children:a(r)}):i(Mt,{children:a(r)}):void 0,Z=u?a("Show {label} on the slide",{label:a(n)}):a("Hide {label} on the slide",{label:a(n)});return i(h,{label:a(n),icon:i(gn,{}),htmlFor:P,className:C?"is-hidden":void 0,hint:_,action:s?i(Xe,{content:Z,children:i("button",{type:"button",className:"sf-field-eye","aria-pressed":u,"aria-label":Z,onClick:b,children:u?i(Ve,{name:"eye-off",size:14}):i(Ve,{name:"eye",size:14})})}):void 0,children:O("div",{className:"sf-copybox",children:[c&&i(ze,{target:l?p:f,value:d,onChange:m}),l?i("textarea",{id:P,ref:p,value:d,placeholder:o===void 0?void 0:a(o),onChange:v=>m(v.target.value)}):i("input",{id:P,ref:f,type:"text",value:d,placeholder:o===void 0?void 0:a(o),onChange:v=>m(v.target.value)})]})})}function Bl(e,t){return{...e,[Ee]:t}}function Hl(e){const t=e[E];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[E]:{...t,offPage:!0}}}function Gl(e){return!e||typeof e!="object"?!1:e[E]?.offPage===!0}const rt="sfPanelOnly";function Ml(e){if(!e[E])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[rt]:!0}}function Kl(e){return!!e&&typeof e=="object"&&e[rt]===!0}function Wl(e){const t=e[E];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[E]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as ms,SCALAR_TEXT_CONTROLS as hs}from"efficient-easel/draw";function Ul(e,t){if(!e[E])throw new Error("inOwnBox: the field holds no authored text");const{[Jn]:o,...r}=e;return{...r,[Zn]:!0,render:t}}const yr=new Set(ao),oe={type:"radio",options:[{value:!0},{value:!1}]},it={text:{type:"object",objectFields:{text:{type:"text"},hidden:oe}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:oe}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},D=(e,t)=>{const n=w({...t,[E]:e},{...it[e.control],label:e.label});if(!yr.has(e.control))return n;const o=t.render;return{...z(n,"authored-copy"),render:r=>i(eo,{name:r.name,children:o(r)})}},jl="Everything else on this block comes from the linked post. Unlink it to edit by hand.",xr={field:"source.slug",set:!0},Xl={not:xr},Sr="Select a word, then press the highlighter.",Cr=new Set([Sr]),_r=e=>Cr.has(e);function $l(e,t,n){return D({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function zl(e,t,n){return D({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function Vl(e,t,n){return D({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function Yl(e,t,n){return D({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function ql(e){return{type:"custom",[_e]:{label:e},...w({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(fo,{value:Ce(t),onChange:n,label:e})}}function Jl(e,t,n){return D({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const Zl={Design:Wt,Animation:Re};function Ql(e,t){return e.includes("Design")?t!=="Design":null}function lt(e,t){return{type:"custom",[Q]:{label:e,level:t},marker:!0,fold:e,render:()=>i(I,{})}}function S(e){return lt(e,2)}function ea(e){return{type:"custom",render:()=>i(Ir,{text:e})}}function Ir({text:e}){return i("p",{className:"sf-note",children:a(e)})}function ta(e){return lt(e,1)}function na(e){return ee(e)!==null&&e?.tabs!==void 0}const at=new Map;function oa(e,t){const n=`${e}\0${t?t.join(""):""}`,o=at.get(n)??{type:"custom",tabs:t,[Q]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(I,{})};return at.set(n,o),o}const st=new Map;function ra(e){const t=st.get(e)??{type:"custom",[Q]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(I,{})};return st.set(e,t),t}function Er(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function ia(e,t){return Er(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(I,{})}}function la(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(I,{})}}function aa({title:e,children:t}){const[n,o]=j(()=>!fe.has(e));return i(Tn,{title:e,open:n,onToggle:r=>{o(r),r?fe.delete(e):fe.add(e)},children:t})}const fe=new Set;function sa({label:e}){return i(wn,{title:a(e),level:sr(2)})}function ct({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),l=r?o?.[r]:void 0,s=l?a(l):t;return O("div",{className:"sf-swatches",children:[e.map(c=>{const d=o?.[c]?a(o[c]):c;return i(Xe,{content:d,children:i("button",{type:"button","aria-pressed":t.toLowerCase()===c.toLowerCase(),className:`sf-swatch ${t.toLowerCase()===c.toLowerCase()?"is-active":""}`,style:{background:c},onClick:()=>n(c),"aria-label":d})},c)}),i("span",{className:"sf-swatch-hex",children:s})]})}function ca(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=Qo(n,t);return i(h,{label:a(e),icon:i($t,{}),changed:!r,action:i(x,{words:y()?.panel,label:a(e),changed:!r,detail:a("the theme's section background"),onReset:()=>o(Yo)}),children:ct({swatches:qo,current:r?Zo:n??t??"",onPick:o,names:Jo})})}}}function Tr(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,l=$o(r,t);return i(h,{label:a(e),icon:i(rn,{}),changed:!l,action:i(x,{words:y()?.panel,label:a(e),changed:!l,detail:a("the theme's image stage"),onReset:()=>o(Wo)}),children:ct({swatches:Xo,current:l?Vo:zo(r,t),onPick:o,names:jo})})}}}function da(e=n=>n,t){return K({_gSectionTheme:S(er),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(uo,{value:e(n),onChange:o,followLabel:t})}})}function W({min:e,max:t,step:n,value:o,onChange:r,suffix:l="",readout:s=!0,notch:c,ariaLabel:d,disabled:u=!1}){const f=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(Yn,{min:e,max:t,step:n,value:o,suffix:l||void 0,showInput:s,label:d===void 0?void 0:a(d),disabled:u,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:p=>{p!==null&&p!==o&&r(p)}})})}function U(e,t,n,o,r,l,s="",c){return{type:"custom",...w({},{type:"number",label:e}),render:d=>i(h,{label:a(e),icon:R(t),action:c?c("storedValue"in d?d.storedValue:d.value,d.onChange):void 0,children:W({min:n,max:o,step:r,value:typeof d.value=="number"?d.value:l,suffix:s,ariaLabel:e,onChange:d.onChange})})}}function dt(e,t){const{min:n,max:o,step:r=1,unsetLabel:l,hint:s,restTrack:c,unsetMark:d,icon:u}=t;return{type:"custom",render:({value:f,onChange:p})=>{const m=typeof f=="number"?f:null,b=m===null;return i(h,{label:a(e),icon:u?R(u):void 0,value:b?d||l===void 0?void 0:a(l):`${m}px`,changed:!b,action:d?be(d,{changed:!b,onReset:()=>p(null)}):i(x,{words:y()?.panel,label:a(e),changed:!b,onReset:()=>p(null)}),hint:typeof s=="string"?a(s):s,children:c?c({min:n,max:o,step:r,px:m,label:e,onChange:p}):W({min:n,max:o,step:r,value:m??n,readout:!1,ariaLabel:e,onChange:p})})}}}function ua(e){const t=U("Gap",i(ke,{}),pe.min,pe.max,pe.step,Ho[e],"px",(n,o)=>i(gr,{inherited:!Mo(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[Go]:e,render:n=>t.render({...n,value:Ko(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}const re="Corners";function me(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,r=o!==null;return i(h,{label:a(re),icon:i(qt,{}),changed:r,action:be(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:i(wr,{tier:e,px:o,onRadius:n})})}}}function L(e){const t=V();return[t?.values?.[e],n=>t?.onChange(e,n)]}function pa(){const e=V();return t=>e?.onChangeMany(t)}function wr({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),r=e.useClosedReason?e.useClosedReason():null,[l,s]=L(e.sidesKey),c=Me(l)??[...Ge];return i(jn,{label:a(re),value:c,corners:Sn,onChange:d=>{const u=Me(d)??[];s(u.length===Ge.length?null:u)},radius:t,onRadiusChange:n,radiusMin:G,radiusMax:Te,radiusStep:e.step??1,radiusPlaceholder:String(o),disabled:r!==null,disabledReason:r??void 0})}function ut(){return z({type:"custom",render:()=>i(te,{})},"always")}function Or({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=k(),r=typeof o=="number"?`${o}px`:a("not set");return i(x,{words:y()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):F(r,a("Styles")),onReset:n})}function Rr(){const{cornerRadiusPx:e}=k();return typeof e=="number"?e:G}function Pr(){return me({sidesKey:"sectionCornerSides",useFollowed:Rr,useClosedReason:()=>ft()?a(pt):null,mark:i(Or,{label:re}),hint:i(vr,{})})}const pt="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function ft(){return nt(B())}function vr(){return i(I,{children:ft()?pt:"Follows Styles ▸ Basics ▸ Corners until you set a number here."})}function fa(){return K({_gShape:S("Shape"),sectionCorners:Pr(),sectionCornerSides:ut(),sectionBorder:ht("desktop"),sectionBorderPhone:ht("mobile")})}const kr=()=>({width:a("Border width"),sides:{top:a("Border top"),right:a("Border right"),bottom:a("Border bottom"),left:a("Border left")},style:a("Border style"),styles:{solid:a("Solid"),dashed:a("Dashed"),dotted:a("Dotted")},color:a("Border color"),unit:"px"});function Lr(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Nr(){let e;try{const t=Do(k().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Ao.line}function mt({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:l=!0,above:s={}}){const c=e&&typeof e=="object"?e:{},[d,u]=j(()=>r?Ln(c,s):!1),f=kr(),p=m=>Lr(r&&l?m:{width:m.width,color:m.color,...l?{style:m.style}:{}});return i(h,{label:a("Border"),icon:i(zt,{}),action:r?i(We,{each:d,label:a("Each side"),onChange:u}):void 0,children:i(On,{label:a("Border"),value:c,each:d,onChange:m=>t(p(m)),placeholder:n,presets:o,words:f,styles:l,max:Fo})})}function Fr({value:e,onChange:t,tier:n}){const[o]=L("sectionBorder"),r=Nr(),l=n==="mobile"?o&&typeof o=="object"?o:{}:{};return i(mt,{value:e,onChange:t,placeholder:{sides:kn(l),style:l.style??"solid",color:l.color||r},presets:[r],above:l})}function ht(e){return g(e,{type:"custom",render:({value:t,onChange:n})=>i(Fr,{value:t,onChange:n,tier:e})})}function ma(e){return{type:"custom",render:()=>i(Ar,{partKey:e})}}function Ar({partKey:e}){const[t]=L("id"),[n]=L("_partStyles"),{textStyles:o}=k(),r=So();let l=null;try{l=bo().select}catch{l=null}const s=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(En,{name:a("Text"),preview:ho(s,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??xo.copy.panel).cases}),onOpen:()=>{l&&typeof t=="string"&&l(yo(t,e))}})}function ha(){return{type:"custom",render:({value:e,onChange:t})=>i(Dr,{value:e,onChange:t})}}function Dr({value:e,onChange:t}){const[n]=L("variant"),[o]=L("buttonColor"),{theme:r}=k(),s=mo({variant:n,buttonColor:o,buttonBorder:e&&typeof e=="object"?e:{}}).border.width,c=go(o)??(n==="ghost"?Bo(r).text:tt(r).fill);return i(mt,{value:e,onChange:t,placeholder:{sides:{top:s,right:s,bottom:s,left:s},style:"solid",color:c},presets:[c],sides:!1,styles:!1})}function ga(){return{_gMotion:S("Motion"),sectionAnimation:ge("Entrance",i(Re,{}),[...In],_n)}}function he(){let e=null;try{const{appState:t,selectedItem:n}=X(r=>r),o=n?.props?.id?String(n.props.id):void 0;e=o?Ke(t?.data,o):null}catch{e=null}return e!==null&&nt(e)}function gt(e){const{cornerRadiusPx:t}=k(),n=he(),o=typeof t=="number"?t:e;let r=null;try{const{appState:s,selectedItem:c}=X(u=>u),d=c?.props?.id?String(c.props.id):void 0;r=d?Ke(s?.data,d):null}catch{r=null}if(n||!r)return o;const l=r.sectionCorners;return Cn(l)?l:o}function Br({label:e,changed:t=!1,onReset:n=()=>{}}){const o=he(),r=gt(G),l=o?"Site":"Section";return i(x,{words:y()?.panel,label:a(e),changed:t,detail:F(`${r}px`,o?a("Styles"):a("the section")),onReset:n})}function Hr(){return i(I,{children:he()?a("The section is full width, so this card follows Styles ▸ Basics ▸ Corners."):a("Follows the section's Corners until you set a number here.")})}function Gr(){return me({sidesKey:"cardCornerSides",useFollowed:()=>gt(G),mark:i(Br,{label:re}),hint:i(Hr,{})})}function Mr(){return{type:"custom",render:()=>i(Rt,{})}}function ba(e){return{...e,render:t=>i(Pt,{render:e.render,props:t})}}function ya(){return{_gShape:S("Shape"),cardCorners:Gr(),cardCornerSides:ut(),cardCornersApplyAll:Mr()}}function xa(){return N("Justify",i(Xt,{}),Je,Je[0].value)}function Sa(){return N("Item alignment",i(Ut,{}),Po,"stretch")}function Ca(){return N(No,i(yn,{}),et,et[0].value)}function _a(){return{type:"custom",render:({value:e,onChange:t})=>{const n=ue.find(o=>o.value===e)??ue[0];return i(h,{label:a(Qe),icon:i(Pe,{}),value:a(n.label),children:i(je,{className:"sf-gallery-layouts",label:a(Qe),value:n.value,onChange:t,options:ue.map(o=>({value:o.value,label:a(o.label),picture:i("span",{className:"sf-gallery-pic",children:Kr(o.weights).map((r,l)=>i("i",{style:{gridColumn:`span ${r}`}},l))})}))})})}}}function Kr(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 Ia(){return N(vo,i(ke,{}),qe,qe[0].value)}function Ea(){return g("mobile",U(ko,i(ve,{}),Ze,Lo,1,Ze))}function Ta(e){const t=ge(Oo,pr("`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)."),Ro(e),Ye(e,void 0));return{type:"custom",render:n=>t.render({...n,value:Ye(e,n.value),onChange:o=>n.onChange(o)})}}function wa(e,t,n,o,r,l){return{type:"custom",render:({value:s,onChange:c})=>i(h,{label:a(e),icon:i(He,{noun:l}),action:i(x,{words:y()?.panel,label:a(e),changed:!or(s),detail:a("the Text style in Styles"),onReset:()=>c(nr),defaultAction:{onPress:()=>c(tr),title:a("Keep this section's own built-in size"),icon:i(Vt,{})}}),children:W({min:t,max:n,step:o,value:typeof s=="number"?s:r,suffix:"px",ariaLabel:e,onChange:c})})}}function Oa(){return{_gCellWidth:S("Cell width"),gridSpan:N("Positions",i(Pe,{}),[{label:"Auto",value:""},...Array.from({length:Nt},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function B(){let e=null;try{e=X(t=>t).selectedItem}catch{e=null}return e?.props??{}}function Wr({min:e,max:t,step:n,px:o,label:r,onChange:l,desktopKey:s,fallback:c}){const d=B()[s],u=ce(void 0,d,c);return i(I,{children:W({min:e,max:t,step:n,value:ce(o,d,c),readout:!1,ariaLabel:r,notch:u,onChange:l})})}function Ur({label:e,desktopKey:t,fallback:n,changed:o=!1,onReset:r=()=>{}}){const l=B()[t],s=ce(void 0,l,n);return i(x,{words:y()?.panel,label:a(e),changed:o,detail:a("{value} on desktop",{value:`${s}px`}),onReset:r})}function jr(e){return dt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:i(Ur,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>i(Wr,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}function Ra(e){return{type:"custom",render:({value:t,onChange:n})=>i($r,{...e,value:t,onChange:n})}}function Xr({label:e,icon:t,options:n,value:o,resolved:r,restWord:l,onChange:s}){const c=n.some(d=>d.value===o);return i(h,{label:a(e),icon:R(t),action:i(x,{words:y()?.panel,label:a(e),changed:c,detail:a("{value} on desktop",{value:a(l)}),onReset:()=>s(void 0)}),children:J({options:n,value:c?o:r,onChange:d=>s(d),ariaLabel:e})})}function $r({label:e,icon:t,options:n,desktopKey:o,resolve:r,value:l,onChange:s}){const c=B()[o],d=r(void 0,c),u=n.find(f=>f.value===d)?.label??"";return i(Xr,{label:e,icon:t,options:n,value:l,resolved:d,restWord:u,onChange:s})}const zr={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Vr={Top:De,Bottom:Ne,Left:Fe,Right:Ae},Yr=e=>{const t=Vr[e];return i(t,{})};function Pa(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=_=>zr[_],l=_=>U(r("Top"),i(De,{}),T.min,T.max,T.step,_,"px"),s=(_,Z,v,le=T)=>g("mobile",jr({label:r(_),icon:Yr(_),desktopKey:Z,min:le.min,max:le.max,step:le.step,fallback:v})),c=e.top??T.min,d=e.bottom??T.min,u="sectionPaddingLeft",f="sectionPaddingRight",p=e.sideBounds??T,m=e.side??p.min,b=e.sidePhone??m,C=e.phone===!0,P=_=>C?g("desktop",_):_;return K({...o?{_gSpacing:S("Padding")}:{},[t]:P(l(c)),...C?{[M(t)]:s("Top",t,c)}:{},...e.only==="top"?{}:{[n]:P(U(r("Bottom"),i(Ne,{}),T.min,T.max,T.step,d,"px")),...C?{[M(n)]:s("Bottom",n,d)}:{}},...e.sides?{[u]:P(U(r("Left"),i(Fe,{}),p.min,p.max,p.step,m,"px")),...C?{[M(u)]:s("Left",u,b,p)}:{},[f]:P(U(r("Right"),i(Ae,{}),p.min,p.max,p.step,m,"px")),...C?{[M(f)]:s("Right",f,b,p)}:{}}:{}})}const q=["top","right","bottom","left"],qr={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},bt=e=>typeof e=="number"?e:null;function Jr(e,t,n){const o={};for(const r of q)n[r]!==t[r]&&(o[e[r]]=n[r]??void 0);return o}function Zr({tier:e,o:t}){const n=V(),o=n?.values??{},r=e==="mobile"?t.phoneKeys:t.keys,l=Object.fromEntries(q.map(u=>[u,bt(o[r[u]])])),s=Object.fromEntries(q.map(u=>[u,String(e==="mobile"?bt(o[t.keys[u]])??t.fallback[u]:t.fallback[u])])),[c,d]=j(()=>vn(l,s));return i(h,{label:a("Padding"),icon:i(dn,{}),action:i(We,{each:c,label:a("Each side"),onChange:d}),children:i(Pn,{label:a("Padding"),each:c,value:l,placeholder:s,min:t.min,max:t.max,step:t.step,onChange:u=>{const f=Jr(r,l,u);Object.keys(f).length&&n?.onChangeMany(f)},words:{sides:{top:a("Padding top"),right:a("Padding right"),bottom:a("Padding bottom"),left:a("Padding left")},vertical:a("Top and bottom"),horizontal:a("Left and right"),unit:"px"}})})}function va(e={}){const t={...qr,...e.keys},n={keys:t,phoneKeys:Object.fromEntries(q.map(c=>[c,M(t[c])])),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,r=c=>{const d={type:"custom",render:()=>i(Zr,{tier:c,o:n})};return o?g(c,d):d},l=()=>z({type:"custom",render:()=>i(te,{})},"always"),s=q.filter(c=>c!=="top");return K({...e.group===!1?{}:{_gSpacing:S("Padding")},[n.keys.top]:r("desktop"),...o?{[n.phoneKeys.top]:r("mobile")}:{},...Object.fromEntries(s.map(c=>[n.keys[c],{...l(),reachedBy:n.keys.top}])),...o?Object.fromEntries(s.map(c=>[n.phoneKeys[c],g("mobile",l())])):{}})}function ka(e,t){const n=Object.fromEntries(Object.entries(t).map(([l,s])=>[l,l in e&&ee(s)?e[l]:s])),o={};let r=!1;for(const[l,s]of Object.entries(e)){if(l in t){r||Object.assign(o,n),r=!0;continue}o[l]=s}return r||Object.assign(o,n),o}const yt=e=>typeof e=="number"?e:null;function Qr(e,t,n){const o={};for(const r of["x","y"])n[r]!==t[r]&&(o[e[r]]=n[r]??void 0);return o}function ei({o:e}){const t=V(),n=t?.values??{},o={x:yt(n[e.keys.x]),y:yt(n[e.keys.y])},r=a(e.label??"Position"),l=!!(o.x||o.y),s=u=>{const f=Qr(e.keys,o,u);Object.keys(f).length&&t?.onChangeMany(f)},c=i(Vn,{label:r,value:o,onChange:s,words:{x:a("Left and right"),y:a("Up and down"),unit:"px"},placeholder:{x:"0",y:"0"},min:e.min,max:e.max,step:e.step??1}),d=i(x,{words:y()?.panel,label:r,changed:l,detail:"0 px, 0 px",onReset:()=>s({x:null,y:null})});return e.label===null?O("div",{className:"sf-position-line",children:[c,d]}):i(h,{label:r,icon:i(cn,{}),changed:l,action:d,children:c})}function La(e){return{[e.keys.x]:{type:"custom",render:()=>i(ei,{o:e})},[e.keys.y]:{...z({type:"custom",render:()=>i(te,{})},"always"),reachedBy:e.keys.x}}}const ti={contained:"Contained",page:"Page",full:"Full"},ie="Width";function Na(e,t=rr,n=!0){const o=t.map(r=>({label:ir[r]??ti[r],value:r}));return K({...n?{_gWidth:S(ie)}:{},widthMode:{type:"custom",render:({onChange:r,field:l})=>i(h,{label:a(ie),icon:i(bn,{}),action:n?i(br,{inherited:l?.inherited??!1,onReset:()=>r(lr),label:ie}):void 0,children:J({options:o,value:l?.currentValue||e,onChange:r,ariaLabel:ie})})}})}function Fa(){const e=o=>({type:"custom",render:({value:r,onChange:l})=>i(h,{label:Y,icon:R(i(ln,{})),action:o?o(l):void 0,children:J({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(r)?r:"auto",onChange:l,ariaLabel:Y})})}),t=()=>({type:"custom",render:({value:o,onChange:r,field:l})=>{const s=l?.unit==="%"?"%":"px",c=s==="%"?wo:To;return i("div",{className:"sf-field",children:W({min:c.min,max:c.max,step:c.step,value:typeof o=="number"?o:c.fallback,suffix:s,ariaLabel:Y,onChange:r})})}}),n=()=>ge("Unit",i(Le,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return K({_gHeight:S(Y),sectionHeightMode:g("desktop",e()),sectionHeightValue:g("desktop",t()),sectionHeightUnit:g("desktop",n()),sectionHeightModePhone:g("mobile",e(o=>i(ni,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:g("mobile",t()),sectionHeightUnitPhone:g("mobile",n())})}function ni({onClear:e}){const t=B(),n=Co(t),o=_o(t),r=a("{value} on desktop",{value:o.mode==="auto"?a("Auto"):`${o.value}${o.unit}`});return i(x,{words:y()?.panel,label:a(Y),changed:n,detail:r,onReset:e})}function Aa(){const e=n=>({type:"custom",render:({value:o,onChange:r,id:l,name:s})=>i(oi,{value:o,onChange:r,labelId:`${l??s??"stickTop"}-label`,phone:n})}),t=()=>({type:"custom",render:({value:n,onChange:o})=>i("div",{className:"sf-field",children:W({min:ne.min,max:ne.max,step:ne.step,value:typeof n=="number"?n:ne.fallback,suffix:"px",ariaLabel:a("Distance from top"),onChange:o})})});return{_gStick:S(de),stickTop:g("desktop",e(!1)),stickTopDistance:g("desktop",t()),stickTopPhone:g("mobile",e(!0)),stickTopDistancePhone:g("mobile",t())}}function oi({value:e,onChange:t,labelId:n,phone:o}){const r=B(),l=Eo(r),s=o?l.phone:e===!0;return i(h,{label:a(de),labelId:n,icon:R(i(fn,{})),action:O(I,{children:[o?i(x,{words:y()?.panel,label:a(de),changed:Io(r),detail:a("{value} on desktop",{value:l.desktop?`${l.desktopDistance}px`:a("Off")}),onReset:()=>t(void 0)}):null,i(Ue,{checked:s,onChange:t,ariaLabelledBy:n})]})})}const xt="e.g. about";function Da(){return{_gAnchor:S("Anchor"),anchor:D({control:"plainText",label:"Name",placeholder:xt},{type:"custom",render:({value:e,onChange:t})=>i(Kt,{value:e,onChange:t,nameBox:(n,o)=>i(A,{value:n,onChange:o,label:"Name",placeholder:xt,hideable:!1,markup:!1})})})}}function Ba(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:s})=>{const c=`${l??s??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return i(h,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i($n,{id:c,value:Number.isFinite(d)?new Date(d):null,onChange:u=>r(u?u.toISOString():"")})})}}}function Ha(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:s})=>{const c=`${l??s??e}-date`;return i(h,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(Xn,{id:c,value:Tt(typeof o=="string"?o:null),onChange:d=>r(d?Et(d):"")})})}}}function H(e,t,n){return{type:"custom",...w({},{...oe,label:e}),render:({value:o,onChange:r,id:l,name:s})=>{const c=typeof o=="boolean"?o:t,d=`${l??s??e}-label`;return i(h,{label:a(e),labelId:d,icon:n,action:i(Ue,{checked:c,onChange:r,ariaLabelledBy:d})})}}}function Ga(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i($e,{label:a("Background"),icon:i(Be,{}),id:r,value:xn(e),onChange:t})}}}function Ma(e,t){return{type:"custom",...w({},{...oe,label:e}),render:({value:n,onChange:o,id:r})=>{const l=typeof n=="boolean"?n:t,s=`${r??e}-checkbox`;return i(h,{label:a(e),htmlFor:s,className:"sf-checkbox",action:i(Un,{id:s,checked:l,onChange:o})})}}}const Ka={follows:"fill"},Wa={follows:"ink"};function Ua(e,t,n,o){if(typeof t!="string"){const r=t.follows;return{type:"custom",render:({value:l,onChange:s})=>i(ri,{label:e,part:r,icon:n,value:l,onChange:s,opacity:o})}}return{type:"custom",render:({value:r,onChange:l})=>i($e,{label:a(e),icon:n,value:r||t,onChange:l})}}function ri({label:e,part:t,icon:n,value:o,onChange:r,opacity:l}){const s=tt(k().theme),c=t==="fill"?s.fill:s.ink,[d,u]=L(l?.key??""),[f]=L(l?.unsetFrom??""),p=typeof d=="number";return i(qn,{label:a(e),icon:n,value:o||"",inherited:c,resetTo:F(c.toUpperCase(),a("Styles")),onChange:r,onReset:()=>{r(""),l&&p&&u(void 0)},...l?{opacity:p?d:l.unset(f),onOpacityChange:m=>u(m),changed:!!o||p}:{}})}const ii=[{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 St({label:e,value:t,onChange:n,points:o=ii}){const r=o.map(l=>({...l,label:a(l.label),...l.title?{title:a(l.title)}:null}));return i(Wn,{label:a(e),value:t,points:r,onChange:n})}function ja(){return z({type:"custom",render:()=>i(te,{})},"always")}const li=Oe([]);function Xa(e,{stacking:t,fallback:n=Ht}){return{type:"custom",render:({value:o,onChange:r})=>{const l=Bt.includes(o)?o:n;return t?i(ai,{label:e,value:l,onChange:r}):Ct({label:e,value:l,onChange:r,points:li})}}}function ai({label:e,value:t,onChange:n}){const{appState:o,selectedItem:r}=X(c=>c),l=r?.props?.id?String(r.props.id):void 0,s=l?Dt(o?.data,l):[];return Ct({label:e,value:t,onChange:n,points:Oe(s,l)})}function Ct({label:e,value:t,onChange:n,points:o}){const r=o.find(l=>l.disabled);return i(h,{label:a(e),icon:i(un,{}),hint:r?.title?a(r.title):void 0,children:St({label:e,value:Gt(t),onChange:n,points:o})})}const $a={top:i(en,{}),right:i(Qt,{}),bottom:i(Jt,{}),left:i(Zt,{})};function za(e,t,n,o,r,l){const s=f=>t.find(p=>p.value===f),c=f=>({value:f,label:"",disabled:!0,title:o}),d=f=>{const p=t.find(b=>b.cell===f);if(!p)return c(`missing-${f}`);const m=l?.[f];return m?{value:p.value,label:p.label,icon:m}:{value:p.value,label:p.label}},u=[c("corner-top-left"),d("top"),c("corner-top-right"),d("left"),c("centre"),d("right"),c("corner-bottom-left"),d("bottom"),c("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:p})=>{const m=t.some(b=>b.value===f)?f:n;return i(h,{label:a(e),icon:r,value:s(m)?.label?a(s(m).label):"",children:St({label:e,value:m,onChange:p,points:u})})}}}const si="\0note";function N(e,t,n,o,r){return{type:"custom",options:n,fallback:o,...r?{note:r}:{},...w({},{type:"select",label:e}),render:({value:l,onChange:s,field:c})=>{const d=c.options??n,u=c.fallback??o,f=d.some(p=>p.value===l)?l:u;return i(h,{label:a(e),icon:R(t),children:i(Nn,{value:f,ariaLabel:a(e),onChange:s,options:[...r?[{label:a(r),value:si,disabled:!0}]:[],...d.map(p=>({label:a(p.label),value:p.value}))]})})}}}function Va(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:l})=>i(co,{label:e,options:(l.options??t).map(s=>({...s,label:a(s.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:a(n)}:{}})}}function Ya(e,t,n,o){return{type:"custom",options:t,fallback:n,...w({},{type:"select",label:e}),render:({value:r,onChange:l,field:s})=>i(po,{label:e,options:(s.options??t).map(c=>({...c,label:a(c.label)})),fallback:s.fallback??n,value:r,onChange:l,placeholder:o===void 0?void 0:a(o)})}}function qa(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}function J({options:e,value:t,onChange:n,ariaLabel:o,disabled:r=!1}){return i(Rn,{options:e.map(l=>l.picture?{id:l.value,label:l.picture,title:a(l.title??l.label)}:{id:l.value,label:a(l.label),title:l.title===void 0?void 0:a(l.title)}),value:t,onChange:n,ariaLabel:a(o),disabled:r})}const Ja=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function ge(e,t,n,o){const r=n.map(l=>typeof l=="string"?{label:l,value:l}:l);return{type:"custom",...w({},{type:"radio",label:e,options:r.map(l=>({value:l.value,label:l.label}))}),render:({value:l,onChange:s,field:c})=>i(h,{label:a(e),icon:R(t),children:J({options:r,value:r.some(d=>d.value===l)?l:l||c?.currentValue||o,onChange:s,ariaLabel:e})})}}function Za(e,t,n){const o=Object.keys(xe).map(r=>({label:xe[r],value:r,picture:n[r]}));return{type:"custom",...w({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(ci,{label:e,icon:t,options:o,onChange:r})}}function ci({label:e,icon:t,options:n,onChange:o}){const r=V()?.values??{},l=wt(r),s=l==="frame"&&!!ye(r.mediaVideo)&&!ye(r.videoFrame);return i(h,{label:a(e),icon:R(t),hint:s?a("This video has no frame yet. The slide shows its background colour until one is made."):void 0,children:J({options:n,value:l,onChange:o,ariaLabel:e})})}function Qa(e,t,n,o={}){return{type:"custom",[Ie]:!0,render:({value:r,onChange:l,name:s})=>i(so,{value:r||"",onChange:l,fieldKey:s,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame})}}const es={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function ts({value:e,onChange:t,label:n}){const o=e||{},r=!!o.pending,l=r?"var(--fg-dim, #888)":o.ok?"#1d9e75":"#d85a30",s=!!ur(dr()).geocode,c=(d,u)=>t({...o,[d]:u===""?void 0:Number(u)});return O(h,{label:a(n),icon:i(se,{}),children:[s&&O(I,{children:[i("button",{type:"button",disabled:r,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:r?"default":"pointer",opacity:r?.6:1,border:"1px solid var(--border-strong, #ccc)",borderRadius:6,background:"transparent",color:"inherit"},children:r?a("Finding…"):a("Find coordinates")}),o.status&&i("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:l},children:a(o.status)}),i("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:a("Coordinates from OpenStreetMap")})]}),i("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?a("Hide manual coordinates"):a("Enter coordinates manually")}),o.manual&&O("div",{style:{marginTop:8,display:"grid",gap:8},children:[i(h,{label:a("Latitude"),icon:i(se,{}),children:i("input",{type:"number",step:"any",placeholder:a("e.g. {example}",{example:"34.0990198"}),value:typeof o.lat=="number"?o.lat:"",onChange:d=>c("lat",d.target.value)})}),i(h,{label:a("Longitude"),icon:i(se,{}),children:i("input",{type:"number",step:"any",placeholder:a("e.g. {example}",{example:"-117.9842833"}),value:typeof o.lng=="number"?o.lng:"",onChange:d=>c("lng",d.target.value)})})]})]})}function di(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function ui(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,l)=>l===t?{text:n}:r)}function ns(e,t){return e===null?null:t>e?e:null}function pi(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 os={label:"Ticker items",icon:i(sn,{})};function rs(e,t,n,o){return{type:"custom",[E]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...w({},{...it.textList,label:e}),render:({value:r,onChange:l})=>i(fi,{label:e,icon:R(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:l,markup:o==="markup"})}}function fi({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:l=!1}){const s=ae(null),[c,d]=j(null),u=p=>p.map(m=>({text:m?.text??""})),f=p=>{const m=pi(n,p,c);m===null&&(s.current=null),d(m),r(u(p))};return i(Fn,{label:a(e),icon:t,noun:a("item"),items:n,onChange:f,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:l?i(ze,{target:s,value:di(n,c),onChange:p=>r(ui(n,c??-1,p)),disabled:c===null,label:c===null?a("Formatting — click a row first"):a("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,m,b)=>i("input",{type:"text",className:l&&c===m?"sf-list-marking":void 0,value:p?.text??"",placeholder:a(o),"aria-label":a("{label} {n}",{label:a(e),n:m+1}),onChange:C=>b({text:C.target.value}),onFocus:C=>{s.current=C.currentTarget,d(m)}})})}function is(e,t){const n=`${e.label} — row ${t+1}`;return D({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:a("{label} — row {n}",{label:a(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function ls(e){return{_gCards:S("Cards"),coverIndex:N("Cover image",i(an,{}),io,String(lo),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:Tr("Image background",Uo),cardImage:hi(),spinOnHover:H("Rotate on hover",e?.spinDefault??!0,i(mn,{}))}}function as(){return{outline:N("Card outline",i(hn,{}),no,ro),indexBadge:N("Card number",i(Le,{}),to,oo),showBadge:H("Product badge",!0,i(He,{noun:"tag"}))}}function ss(e){const t=e&&"bottomDefault"in e?e.bottomDefault:!0,n=e&&"defaults"in e?e.defaults:{showCardSizes:t,showCardBuy:t,showCardPage:t};return{_gShowOnCard:S("Show on a card"),showCardPrice:H("Price",!0,i(tn,{})),showCardFinishes:H("Finish swatches",!0,i(nn,{})),showCardSizes:H("Sizes",n.showCardSizes,i(pn,{})),showCardBuy:H("Buy button",n.showCardBuy,i(Yt,{})),showCardPage:H("Page button",n.showCardPage,i(Be,{}))}}function cs(e,t="display"){const n=M(t);return{[t]:g("desktop",{type:"custom",render:({value:o,onChange:r})=>i(_t,{parts:e,changed:Dn(o),shown:l=>Bn(o,l),onPress:(l,s)=>r(Mn(o,l,s)),onReset:()=>r(void 0)})}),[n]:g("mobile",{type:"custom",render:({value:o,onChange:r})=>i(mi,{parts:e,desktopKey:t,value:o,onChange:r})})}}function _t({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:l}){const s=a("Display");return i(h,{label:s,icon:i(jt,{}),changed:t,action:i(x,{words:y()?.panel,label:s,changed:t,detail:l,onReset:r}),children:i(An,{label:s,items:e.map(c=>({id:c.id,label:a(c.label),shown:n(c.id)})),onChange:o})})}function mi({parts:e,desktopKey:t,value:n,onChange:o}){const r=B()[t];return i(_t,{parts:e,changed:Gn(n),shown:l=>Hn(r,n,l),onPress:(l,s)=>o(Kn(n,l,s)),onReset:()=>o(Qn),detail:a("the same as Desktop")})}function hi(){return dt("Card image",{min:G,max:Te,step:vt,hint:"Rounds the picture. The card's own corner is in Styles."})}function ds(){return me({sidesKey:"cornerSides",step:kt,useFollowed:()=>G,mark:i(gi,{label:Lt}),hint:a("Rounds the picture. Left alone it stays square.")})}function gi({label:e,changed:t=!1,onReset:n=()=>{}}){return i(x,{words:y()?.panel,label:a(e),changed:t,onReset:n})}function us(){return{type:"custom",render:({value:e,onChange:t})=>i(bi,{value:typeof e=="string"?e:"",onChange:t})}}function bi({value:e,onChange:t}){const[n,o]=j(null),r=we.filter(s=>n===null||$[s].across===n),l=e&&e in $?$[e]:null;return O(I,{children:[i(h,{label:a("Photos in a row"),icon:i(ve,{}),children:O("div",{className:"sf-gallery-filter",children:[i("button",{type:"button","aria-pressed":n===null,onClick:()=>o(null),children:a("All")}),Ft.map(s=>i("button",{type:"button","aria-pressed":n===s,onClick:()=>o(s),children:s},s))]})}),i(h,{label:a("Layout"),icon:i(on,{}),value:l?a(l.label):a("Not chosen"),hint:a("{n} of {total} layouts",{n:r.length,total:we.length}),children:i(je,{className:"sf-gallery-layouts",label:a("Layout"),value:e,onChange:t,onClear:()=>t(""),options:r.map(s=>({value:s,label:a($[s].label),picture:i("span",{className:"sf-gallery-pic",children:At($[s]).map(([c,d],u)=>i("i",{style:{gridColumn:`span ${c}`,gridRow:`span ${d}`}},u))})}))})})]})}export{xr as BOUND_TO_POST,jl as BOUND_TO_POST_NOTE,Zl as BUCKET_ICONS,es as CUSTOM_FIELD_MEDIA,ts as CoordsField,$a as EDGE_ARROWS,zn as FOCAL_DEFAULT,ii as FOCAL_POINTS,Q as FOLD_FIELD_MARKER,Ka as FOLLOWS_SITE_BUTTON,Wa as FOLLOWS_SITE_BUTTON_INK,St as FocalPicker,sa as GroupLabel,Sr as HIGHLIGHT_HINT,A as HidableTextField,_e as LINK_FIELD_MARKER,Dl as Label,Ie as MEDIA_FIELD_MARKER,Ja as MEDIA_TYPE_OPTIONS,Xl as NOT_BOUND_TO_POST,aa as PanelBand,Ir as PanelNoteLine,$r as PhoneChoiceRow,Xr as PhoneChoiceStrip,Ct as PlacementGridView,Ee as SCAFFOLD_FIELD_MARKER,hs as SCALAR_TEXT_CONTROLS,pt as SECTION_BLEEDS_HINT,qr as SIDE_PAD_KEYS,J as Segmented,gr as SiteGapDefaultReset,W as Slider,ct as Swatches,ms as TEXT_CONTROL_KINDS,E as TEXT_FIELD_MARKER,os as TICKER_ITEMS_ROW,fi as TextListField,br as WidthDefaultReset,pi as aimAfterListChange,Da as anchorFields,F as backTo,ca as backgroundField,Sa as boxAlignField,Ia as boxBlockSpacingField,xa as boxJustifyField,Ea as boxPhoneRowField,_a as boxShareField,Ca as boxWrapField,oa as bucketHeader,ha as buttonBorderField,ma as buttonWordsEntryField,Gr as cardCornersField,Tr as cardImageBackgroundField,hi as cardImageField,ls as cardMediaFields,ya as cardShapeFields,ss as cardShowFields,as as cardStyleFields,Oa as cellWidthFields,Ma as checkbox,Ua as colorInput,Yl as copyText,ut as cornerSidesField,me as cornersRowField,Ha as date,Ba as dateTime,ra as designGroupHeader,Ta as directionField,cs as displayFields,za as edgePad,Ql as entriesHiddenForTab,ns as focusAfterRemove,ja as focusKeptField,ia as foldMarker,ee as foldMetaOf,Er as foldTitleOf,us as galleryLayoutField,ua as gapField,S as group,Fa as heightFields,Ce as hidableText,_r as hintIsWhileTyping,R as iconOf,ds as imageCornersField,Ul as inOwnBox,na as isBucketHeader,fr as isNoGlyph,ql as linkField,Za as loadingShowsField,Va as multiSelect,pr as noGlyph,Ga as pageBackgroundField,ea as panelNote,Ra as phoneChoiceField,jr as phoneOverrideField,Xa as placementField,Vl as plainText,Jl as plainTextarea,La as positionFields,Qr as positionPatch,dt as pxField,la as quietMarker,Se as readHidable,di as rowText,Ya as searchSelect,ta as section,ga as sectionAnimationFields,ht as sectionBorderField,Pr as sectionCornersField,fa as sectionShapeFields,da as sectionThemeFields,ge as segmented,N as select,ui as setRowText,K as sharedStyleKinds,va as sidesPaddingFields,Jr as sidesPaddingPatch,wa as sizeField,U as slider,qa as sourceField,Pa as spacingFields,Aa as stickFields,ka as swapPadding,ba as templateField,$l as text,Ot as textFieldIdentifier,Gl as textFieldOffPage,Kl as textFieldPanelOnly,rs as textList,is as textListRowField,zl as textarea,H as toggle,Qa as upload,mr as usePageWidthDetail,pa as useSelectedPatch,B as useSelectedProps,L as useSelectedSibling,hr as useSiteGapDetail,Na as widthField,Wl as withIdentifier,Hl as withOffPage,Ml as withPanelOnly,Bl as withScaffold};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SECTION_WIDTH_FIELD_KEYS as Y}from"./section-width-fields.js";import{anchorFields as m,bucketHeader as L,cardMediaFields as U,cardShowFields as W,cardStyleFields as z,designGroupHeader as R,foldMarker as q,foldMetaOf as h,group as J,quietMarker as Q,heightFields as E,sectionAnimationFields as w,sectionShapeFields as O,sectionThemeFields as D,sidesPaddingFields as T,stickFields as x,widthField as B}from"./controls.js";import{deviceField as V,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as X}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/document/field-buckets";const A=X;function Z(e){return e==="Animation"?"Animation":"Design"}const ee="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Texture:"Design","Text style":"Design",Motion:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Controls:"Layout",Diagram:"Layout",[ee]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Height:"Size"},H={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},$={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,n){const a=`${e}.${t}`;return $[a]??H[a]??I[n]}function Ce(e,t,n){const a=_(e,t,n);return a?Z(a):void 0}function G(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const n of e)for(const a of Object.values(n)){const C=P(a),g=h(C?C.inner:a),l=g?I[g.label]:void 0;if(l)for(const p of G(l))t.includes(p)||t.push(p)}return t}const ge=[...S(T(),B("full"),E(),m(),x()),...Object.keys(T()),...Object.keys(B("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x()),...Y],pe=[...S(D()),...Object.keys(D())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],te=Object.keys(U()),oe=new Set(["cardImage","imageBackground"]),_e=[...G(_("ProductGrid","_gCards","Cards")??"Design"),...te.filter(e=>e.startsWith("_g")||oe.has(e))],Se=Object.keys(z()),ve=Object.keys(W({bottomDefault:!0})),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","EmailFormBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...T(),...B("full"),...E(),...m(),...D(),...O(),...w()};for(const t of Object.keys(M)){const n=h(e[t]),a=n?I[n.label]:void 0;if(!n||n.level!==2||!a||!K[a].includes(n.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const ae=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ie=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function fe(e){const t=new Set([...Object.values(d),b.Content]);for(const[n,a]of Object.entries(e))if(!t.has(n)&&h(a)?.level===1)return 1;return 2}function re(e){const t=`${e}.`;return Object.keys(ne).filter(n=>n.startsWith(t)).map(n=>n.slice(t.length))}function de(e,t){const n=P(e),a=J(t);return n?V(n.tier,a):a}function ce(e,t){const n=h(t);return n?e==="Content"||e==="Animation"?q(t,n.label):Q(t):t}function j(e){return e==="Design"?k:["Animation"]}function me(e,t){const n=[],a=new Set(re(t)),C=new Set;let g=!1,l=null;for(const[o,r]of Object.entries(e)){const i=h(r);if(ae.has(o))throw new Error(`${t}.${o}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ie.get(o);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${o}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(o===d.Design||o===d.Animation)&&(g=!0),n.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||n.push(l={place:"Content",entries:[]}),l.entries.push([o,r]);continue}if(a.has(o)||o in M){const s=_(t,o,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${o}: ${a.has(o)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(o)&&C.add(o),n.push(l={place:s,entries:[]});continue}const u=_(t,o,i.label);if(!u)throw new Error(`${t}.${o}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);n.push(l={place:u,entries:[[o,i.level===2?r:de(r,i.label)]]})}const p=new Set(Object.entries(e).filter(([,o])=>h(o)).map(([o])=>o));for(const[o,r]of[["BLOCK_KEY_GROUP",$],["KEY_GROUP",H]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!p.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${o} (lib/document/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=g?[]:[...a].filter(o=>!C.has(o));if(v.length)throw new Error(`${t}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const F=new Set(n.filter(o=>o.entries.length>0).map(o=>o.place)),f=A.filter(o=>j(o).some(r=>F.has(r))),y={};for(const o of f){y[d[o]]=L(o,o===f[0]?f:null);for(const r of j(o)){if(!F.has(r))continue;const i=n.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),o==="Design"&&(y[b[r]]=R(r));for(const u of i)for(const[s,N]of u.entries)y[s]=ce(r,N)}}return y}function Le(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:R("Content"),...e}}function Ee(e){return A.some(t=>d[t]in e)}function we(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const n={...e};for(const a of t)n[d[a]]=L(a,a===t[0]?t:null);return n}export{$ as BLOCK_KEY_GROUP,_e as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,te as CARD_MEDIA_FIELD_KEYS,ve as CARD_SHOW_FIELD_KEYS,Se as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,ee as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,H as KEY_GROUP,I as LABEL_GROUP,ge as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,ke as SECTION_ANIM_FIELD_KEYS,ye as SECTION_SHAPE_FIELD_KEYS,pe as SECTION_THEME_FIELD_KEYS,me as assignSectionGroups,Ce as bucketOf,Z as bucketOfPlace,fe as foldTopTier,Ee as hasBucketTabs,S as headerKeysOf,G as headerKeysOfPlace,_ as placeOf,we as reseatBucketTabs,re as retiredHeadings,Le as seatDesignBucket};
|
|
1
|
+
import{SECTION_WIDTH_FIELD_KEYS as Y}from"./section-width-fields.js";import{anchorFields as m,bucketHeader as L,cardMediaFields as U,cardShowFields as W,cardStyleFields as z,designGroupHeader as R,foldMarker as q,foldMetaOf as h,group as J,quietMarker as Q,heightFields as E,sectionAnimationFields as w,sectionShapeFields as O,sectionThemeFields as D,sidesPaddingFields as T,stickFields as x,widthField as B}from"./controls.js";import{deviceField as V,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as X}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/document/field-buckets";const A=X;function Z(e){return e==="Animation"?"Animation":"Design"}const ee="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design","Text style":"Design",Motion:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[ee]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Height:"Size"},H={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},$={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,n){const a=`${e}.${t}`;return $[a]??H[a]??I[n]}function Ce(e,t,n){const a=_(e,t,n);return a?Z(a):void 0}function G(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const n of e)for(const a of Object.values(n)){const C=P(a),g=h(C?C.inner:a),l=g?I[g.label]:void 0;if(l)for(const p of G(l))t.includes(p)||t.push(p)}return t}const ge=[...S(T(),B("full"),E(),m(),x()),...Object.keys(T()),...Object.keys(B("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x()),...Y],pe=[...S(D()),...Object.keys(D())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],te=Object.keys(U()),oe=new Set(["cardImage","imageBackground"]),_e=[...G(_("ProductGrid","_gCards","Cards")??"Design"),...te.filter(e=>e.startsWith("_g")||oe.has(e))],Se=Object.keys(z()),ve=Object.keys(W({bottomDefault:!0})),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","EmailFormBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...T(),...B("full"),...E(),...m(),...D(),...O(),...w()};for(const t of Object.keys(M)){const n=h(e[t]),a=n?I[n.label]:void 0;if(!n||n.level!==2||!a||!K[a].includes(n.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const ae=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ie=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function fe(e){const t=new Set([...Object.values(d),b.Content]);for(const[n,a]of Object.entries(e))if(!t.has(n)&&h(a)?.level===1)return 1;return 2}function re(e){const t=`${e}.`;return Object.keys(ne).filter(n=>n.startsWith(t)).map(n=>n.slice(t.length))}function de(e,t){const n=P(e),a=J(t);return n?V(n.tier,a):a}function ce(e,t){const n=h(t);return n?e==="Content"||e==="Animation"?q(t,n.label):Q(t):t}function j(e){return e==="Design"?k:["Animation"]}function me(e,t){const n=[],a=new Set(re(t)),C=new Set;let g=!1,l=null;for(const[o,r]of Object.entries(e)){const i=h(r);if(ae.has(o))throw new Error(`${t}.${o}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ie.get(o);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${o}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(o===d.Design||o===d.Animation)&&(g=!0),n.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||n.push(l={place:"Content",entries:[]}),l.entries.push([o,r]);continue}if(a.has(o)||o in M){const s=_(t,o,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${o}: ${a.has(o)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(o)&&C.add(o),n.push(l={place:s,entries:[]});continue}const u=_(t,o,i.label);if(!u)throw new Error(`${t}.${o}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);n.push(l={place:u,entries:[[o,i.level===2?r:de(r,i.label)]]})}const p=new Set(Object.entries(e).filter(([,o])=>h(o)).map(([o])=>o));for(const[o,r]of[["BLOCK_KEY_GROUP",$],["KEY_GROUP",H]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!p.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${o} (lib/document/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=g?[]:[...a].filter(o=>!C.has(o));if(v.length)throw new Error(`${t}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const F=new Set(n.filter(o=>o.entries.length>0).map(o=>o.place)),f=A.filter(o=>j(o).some(r=>F.has(r))),y={};for(const o of f){y[d[o]]=L(o,o===f[0]?f:null);for(const r of j(o)){if(!F.has(r))continue;const i=n.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),o==="Design"&&(y[b[r]]=R(r));for(const u of i)for(const[s,N]of u.entries)y[s]=ce(r,N)}}return y}function Le(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:R("Content"),...e}}function Ee(e){return A.some(t=>d[t]in e)}function we(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const n={...e};for(const a of t)n[d[a]]=L(a,a===t[0]?t:null);return n}export{$ as BLOCK_KEY_GROUP,_e as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,te as CARD_MEDIA_FIELD_KEYS,ve as CARD_SHOW_FIELD_KEYS,Se as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,ee as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,H as KEY_GROUP,I as LABEL_GROUP,ge as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,ke as SECTION_ANIM_FIELD_KEYS,ye as SECTION_SHAPE_FIELD_KEYS,pe as SECTION_THEME_FIELD_KEYS,me as assignSectionGroups,Ce as bucketOf,Z as bucketOfPlace,fe as foldTopTier,Ee as hasBucketTabs,S as headerKeysOf,G as headerKeysOfPlace,_ as placeOf,we as reseatBucketTabs,re as retiredHeadings,Le as seatDesignBucket};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{HEADER_TYPE as e,FOOTER_TYPE as r,newNodeId as
|
|
1
|
+
import{HEADER_TYPE as e,FOOTER_TYPE as r,newNodeId as p}from"efficient-easel/draw";import{EMAIL_SIGNUP_PH as i,FOOTER_PAYMENT_SEED as F}from"../../../format/lib/content/footer.js";function c(){return{type:e,props:{id:p(e)}}}const l=[{type:"FooterLogo",label:"Logo"},{type:"FooterMenu",label:"Menu"},{type:"FooterText",label:"Text"},{type:"FooterEmailSignup",label:"Email Form"},{type:"FooterSocial",label:"Social Logos"},{type:"FooterPayment",label:"Payment Logos"},{type:"FooterGroup",label:"Footer Box"}],a=l.filter(o=>o.type!=="FooterLogo"&&o.type!=="FooterGroup"),u="FooterGroup",_="blocks";function b(o){return o===r?l:o===u?a:null}function m(){const o=(t,n)=>({type:t,props:{id:`${t}-${crypto.randomUUID()}`,...n}});return[o("FooterLogo",{widthPct:100,align:"left",tagline:""}),o("FooterEmailSignup",{...i}),o("FooterPayment",{...F})]}export{_ as FOOTER_BLOCKS_SLOT,l as FOOTER_BLOCK_CHOICES,u as FOOTER_GROUP_TYPE,r as FOOTER_TYPE,a as GROUP_BLOCK_CHOICES,e as HEADER_TYPE,b as blockChoicesFor,m as buildDefaultFooterBlocks,c as buildDefaultHeaderNode};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export declare const LOCKED_BLOCK_TYPES: ReadonlySet<string>;
|
|
2
2
|
export declare function isLockedBlock(type: string | undefined): boolean;
|
|
3
3
|
export declare const websiteIsLockedBlock: (type: string | undefined) => boolean;
|
|
4
|
+
export declare function websiteNodeIsLocked(type: string | undefined, node?: {
|
|
5
|
+
props?: Record<string, unknown>;
|
|
6
|
+
}): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{lockedWhileHeld as
|
|
1
|
+
import{isConsentLocked as t}from"../../../format/lib/content/consent-banner.js";import{lockedWhileHeld as r}from"../pinned-chrome-doc.js";import{pinnedChromeHeldElsewhere as n}from"../../../format/lib/pinned-chrome-lock.js";const i=new Set(["BookingBox","SubmitBox"]);function s(o){return typeof o=="string"&&i.has(o)}const c=r(s,n);function p(o,e){return c(o)||t(e)}export{i as LOCKED_BLOCK_TYPES,s as isLockedBlock,c as websiteIsLockedBlock,p as websiteNodeIsLocked};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{jsx as d,Fragment as v,jsxs as y}from"react/jsx-runtime";import{useMemo as g,useRef as h}from"react";import{EaselCanvas as C,useEaselApi as I}from"efficient-easel/easel";import P from"../../components/PreviewThemeFrame.js";import{OpenDocumentChromeLoadNotice as T}from"../../components/PinnedChromeLoadNotice.js";import{SiteRestoreNotice as w}from"../../components/SiteRestoreNotice.js";import{usePreviewParts as F}from"efficient-easel/draw/client";import{partElement as D,partTypingTarget as x,setCanvasTypingPart as S}from"./canvas-typing.js";import{partThemeColors as A,readInks as j}from"../../../format/lib/document/part-inks.js";import{PART_ATTR as p}from"../../../render/lib/document/text-parts.js";import{useSectionOps as B}from"efficient-easel/screen/lib/document/use-section-ops";import{useBlockMetadata as E}from"../editor-block-metadata.js";import{usePreviewHeader as M}from"../../../render/components/PreviewHeaderContext.js";import{siteWidthsMetadata as R}from"../../../format/lib/content/section-width.js";import{useEditorCanvasStyles as W}from"../editor-canvas-styles.js";function X(n){const{mirrorHostStyles:s}=W(),i=E(),{sectionBackgroundWidth:m,sectionContentWidth:o,themeFromDocument:c}=M(),u=g(()=>({...n.metadata??i??{},...R(c?null:m,c?null:o)}),[n.metadata,i,m,o,c]),t=h(null),e=_(t),{onDocument:r}=n,a=l=>{t.current=l,r?.(l)};return y(v,{children:[d(w,{}),d(T,{}),d(C,{...n,onDocument:a,typing:e,metadata:u,height:"fill",mirrorStyles:s,frameWrapper:P})]})}function _(n){const s=I(),i=B(),m=F(),o=h({ops:i,parts:m});return o.current={ops:i,parts:m},g(()=>{const c={getItemById:t=>s.getState().getItemById(t),getSelectorForId:t=>s.getState().getSelectorForId(t),get components(){return s.getState().config.components},replace:(t,e,r)=>o.current.ops.replaceComponent(t,e,r)},u=(t,e)=>{const r=x(t,c);if(!r)return null;let a=e;const l=()=>(a=D(a,a?.ownerDocument??n.current,t),a),f=l();return f?{element:l,value:r.value,rules:r.rules,multiline:r.multiline,write:r.write,toolbar:{offered:r.offered,colors:r.offered.length>0?A(j(f)):void 0}}:null};return{at:t=>{const e=t.closest(`[${p}]`),r=e?.getAttribute(p);return e&&r?u(r,e):null},atSelection:()=>{const t=o.current.parts.selectedPartId;return t?u(t,null):null},onChange:t=>{if(!t.typing){S(null);return}const e=t.element.closest(`[${p}]`)?.getAttribute(p)??null;S(e),e&&o.current.parts.selectedPartId!==e&&o.current.parts.select(e)}}},[s,n])}export{X as SiteCanvas};
|
|
@@ -27,5 +27,6 @@ export declare const GENERAL_ROOT_FIELDS: {
|
|
|
27
27
|
}) => import("react").JSX.Element;
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
|
+
export declare const PAGE_STYLE_FIELDS: readonly ["pageBackground", "topSpace", "widthChoice"];
|
|
30
31
|
export declare const RECORD_TYPE_LABEL = "Record type";
|
|
31
32
|
export declare function withRecordTypeRow(fields: Record<string, unknown>, rootProps?: Record<string, unknown> | null): Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as i}from"react/jsx-runtime";import{ListIcon as w,PaddingTopIcon as
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{ListIcon as w,PaddingTopIcon as T}from"efficient-easel/icons";import h from"../../components/WidthFollowField.js";import{say as a}from"../../../format/lib/editor-words.js";import{PRODUCT_RECORD_TYPE as E,TEMPLATE_RECORD_TYPE_PROP as p,declaredRecordType as R,recordTypes as s,recordTypesRevision as l}from"../../../format/lib/content/record-types.js";import{pageBackgroundField as f,select as u}from"./controls.js";import{isEditorOnDynamicPage as g}from"../../../format/lib/document/editor-page-context.js";import{DEFAULT_TOP_SPACE as P}from"../../../render/lib/document/header-clearance.js";function _(){return{type:"custom",render:({value:e,onChange:n})=>i(h,{value:e==="full"?"full":e==="content"?"content":void 0,resolved:"content",label:"Page width",followsLabel:a("Follows the site"),hint:a("Whether this page sits on the site's content column, or runs edge to edge."),onChange:o=>n(o)})}}const y=[{label:"Auto",value:"auto"},{label:"Shared",value:"shared"},{label:"Its own",value:"own"}],F={pageBackground:f(),topSpace:u("Top space",i(T,{}),y,P),widthChoice:_()},I=["pageBackground","topSpace","widthChoice"],O="Record type",c=new Map;let d=-1;function L(e){d!==l()&&(c.clear(),d=l());const n=s(),o=n.some(r=>r.key===e)?"":e;let t=c.get(o);return t||(t=u(O,i(w,{}),[...n.map(r=>({label:r.label,value:r.key})),...o?[{label:o,value:o}]:[]],E),c.set(o,t)),t}const m=new WeakMap;function B(e,n){if(!g()||s().length<2||p in e)return e;const o=L(R(n)),t=m.get(e);if(t&&t.row===o)return t.fields;const r={[p]:o,...e};return m.set(e,{row:o,fields:r}),r}export{F as GENERAL_ROOT_FIELDS,I as PAGE_STYLE_FIELDS,O as RECORD_TYPE_LABEL,y as TOP_SPACE_OPTIONS,_ as pageWidthField,B as withRecordTypeRow};
|
|
@@ -14,7 +14,9 @@ export type PartHost = {
|
|
|
14
14
|
export type PartStamp = {
|
|
15
15
|
element: PartEl;
|
|
16
16
|
partId: string;
|
|
17
|
+
label?: string;
|
|
17
18
|
};
|
|
19
|
+
export declare const PART_LABEL_ATTR = "data-sf-part-label";
|
|
18
20
|
export declare function resolvePartStamps(host: PartHost, nodeId: string, needles: readonly PartNeedle[]): PartStamp[];
|
|
19
21
|
export declare function applyPartStamps(host: PartHost, nodeId: string, stamps: readonly PartStamp[]): PartEl[];
|
|
20
22
|
export type PartAnchorHost = PartHost;
|
|
@@ -22,4 +24,9 @@ export declare function engagePartAnchors(host: PartAnchorHost, needles: readonl
|
|
|
22
24
|
export declare function partOfBlockAt(target: Element | null | undefined, ownerId: string): {
|
|
23
25
|
id: string;
|
|
24
26
|
element: Element;
|
|
27
|
+
whole: boolean;
|
|
28
|
+
label?: string;
|
|
25
29
|
} | null;
|
|
30
|
+
export declare function partLabelOf(element: Element, partId: string): string | undefined;
|
|
31
|
+
export declare const LOCATION_PICK_ATTR = "data-loc-pick";
|
|
32
|
+
export declare function isOnlyPart(element: Element, partId: string): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{encodePartKey as
|
|
1
|
+
import{encodePartKey as L}from"../../../format/lib/document/part-key.js";import{HERO_MEDIA_PART_LABELS as J,HERO_PART_ATTR as C,heroPartId as Q,readHeroPartId as U}from"../../../render/lib/document/hero-media-parts.js";import{TICKER_PART_ATTR as z,TICKER_PART_LABEL as V,readTickerPartId as X,tickerPartId as Y}from"../../../render/components/PreviewTickerContext.js";import{decodeLocationPartId as Z,encodeLocationPartId as tt}from"../../../render/components/PreviewLocationPartContext.js";import{PART_ATTR as R,PART_KIND_ATTR as et,PART_ROW_ATTR as N,REGION_PART_ATTR as _,decodePartId as nt,encodePartId as O,encodePartRow as ot,normalizePartText as rt,partHeadLabel as st}from"../../../render/lib/document/text-parts.js";const y="data-easel-block",E="data-sf-part-label";function M(c,n){return c.closest(`[${y}]`)?.getAttribute(y)===n}function v(c,n,o){const s=c.querySelectorAll("*"),i=[],a=new Set;for(let t=0;t<s.length;t+=1){const e=s[t];if(!M(e,n))continue;const l=e.getAttribute(et);l&&(i.push({element:e,partId:O(n,l)}),a.add(e))}const u=[],f=new Set;for(let t=0;t<s.length;t+=1){const e=s[t];if(!M(e,n)||a.has(e))continue;const l=rt(e.textContent??"");if(!l)continue;const r=e.closest(`[${N}]`)?.getAttribute(N)||null;r&&f.add(r.replace(/\[\d+\]$/u,"")),u.push({element:e,text:l,row:r})}const x=t=>u.filter(e=>e.row===ot(t.key,t.row.index)),P=u.filter(t=>t.row===null),g=t=>t.row&&f.has(t.key)?x(t):f.size?P:u,d=new Map,T=[],w=t=>t.row?`${t.key}.${t.row.rowKey}`:null,I=new Map;for(const t of o){const e=w(t);if(!e||f.has(t.key))continue;const l=I.get(e);l?l.push(t):I.set(e,[t])}const S=new Set;for(const[t,e]of I){if(e.length<2)continue;const l=e.flatMap(m=>m.texts);if(new Set(l).size===l.length)continue;const r=g(e[0]).filter(m=>l.includes(m.text));if(r.length!==e.length)continue;const A=[...e].sort((m,b)=>(m.row?.index??0)-(b.row?.index??0));for(let m=0;m<A.length;m+=1){const b=A[m],p=r[m].element,h={key:b.key,partKey:L(b.key,b.row),exact:!0},k=d.get(p);k?k.push(h):(d.set(p,[h]),T.push(p))}S.add(t)}const K=new Map;for(const t of o){if(S.has(w(t)??""))continue;const e=L(t.key,t.row);for(const l of t.texts)for(const r of g(t)){if(r.text!==l)continue;const A=K.get(r.element);A?A.add(e):K.set(r.element,new Set([e]))}}const F=(t,e)=>[...K].some(([l,r])=>l!==t&&!r.has(e)&&l.contains(t));for(const t of o){if(S.has(w(t)??""))continue;const e=L(t.key,t.row);for(const l of t.texts){const r=[];let A=null;for(const p of g(t))p.text===l?F(p.element,e)||r.push(p.element):!r.length&&p.text.includes(l)&&(!A||p.text.length<=A.length)&&(A={element:p.element,length:p.text.length});const m=r.length?r:A?[A.element]:[],b=m.filter(p=>!m.some(h=>h!==p&&p.contains(h)));for(const p of b){const h={key:t.key,partKey:e,exact:r.length>0},k=d.get(p);k?k.push(h):(d.set(p,[h]),T.push(p))}}}const G=new Map(o.map(t=>[t.key,st(t.label)])),$=[...i];for(const t of T){const e=d.get(t)??[],l=e.some(r=>r.exact)?e.filter(r=>r.exact):e;if(new Set(l.map(r=>r.partKey)).size===1){const r=G.get(l[0].key);$.push({element:t,partId:O(n,l[0].partKey),...r?{label:r}:{}});continue}new Set(l.map(r=>r.key)).size===1&&$.push({element:t,partId:O(n,l[0].key)})}return $}function B(c,n,o){const s=c.querySelectorAll(`[${R}]`);for(let a=0;a<s.length;a+=1){const u=s[a];M(u,n)&&(u.removeAttribute(R),u.removeAttribute(E))}const i=[];for(const{element:a,partId:u,label:f}of o)a.setAttribute(R,u),f&&a.setAttribute(E,f),i.push(a);return i}function pt(c,n,o,s,i,a=()=>null){let u=null,f=null,x=null;const P=()=>{const g=o(),d=g?.getAttribute(y)??null;if(!g||!d)return!1;u=d;let T=v(c,d,n);return i(g,d,B(c,d,T)),x=a(()=>{const w=v(c,d,n);ct(T,w)||(T=w,i(g,d,B(c,d,w)))}),!0};return P()||(f=s(()=>{(u||P())&&(f?.(),f=null)})),()=>{f?.(),f=null,x?.(),x=null,u&&B(c,u,[])}}function ct(c,n){return c.length===n.length&&c.every((o,s)=>o.element===n[s].element&&o.partId===n[s].partId)}function dt(c,n){const o=c?.closest?.(`[${R}],[${_}]`),s=o?.getAttribute(R)??o?.getAttribute(_),i=s?nt(s):null;if(o&&s&&i?.nodeId===n&&i.propKey)return{id:s,element:o,whole:D(o,s),label:H(o,s)};const a=c?.closest?.(q.slice(2).map(x=>`[${x}]`).join(","));if(!a)return null;const f=a.closest?.(`[${y}]`)?.getAttribute(y)===n?j(a,n):null;return f?{id:f,element:a,whole:D(a,f),label:H(a,f)}:null}function H(c,n){const o=Z(n);if(o)return o.part==="map"?"Map":"Image";const s=U(n);return s?J[s.part]:X(n)?V:c.getAttribute(E)??void 0}const W="data-loc-pick",q=[R,_,C,z,W];function j(c,n){const o=c.getAttribute(R)??c.getAttribute(_);if(o)return o;const s=c.getAttribute(C);if(s)return Q(n,s);if(c.getAttribute(z)!==null)return Y(n);const i=c.getAttribute(W)?.split(":");return i&&(i[1]==="image"||i[1]==="map")&&/^\d+$/.test(i[0])?tt(n,Number(i[0]),i[1]):null}function D(c,n){const o=c.closest?.(`[${y}]`),s=o?.getAttribute(y);if(!o||!s)return!1;const i=new Set;for(const a of o.querySelectorAll(q.map(u=>`[${u}]`).join(","))){if(a.closest?.(`[${y}]`)!==o)continue;const u=j(a,s);u&&i.add(u)}return i.size===1&&i.has(n)}export{y as BLOCK_ATTR,W as LOCATION_PICK_ATTR,E as PART_LABEL_ATTR,B as applyPartStamps,pt as engagePartAnchors,D as isOnlyPart,H as partLabelOf,dt as partOfBlockAt,v as resolvePartStamps};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as r}from"react/jsx-runtime";import{usePreviewDevice as y}from"efficient-easel/draw/client";import{usePreviewHeader as w}from"../../../render/components/PreviewHeaderContext.js";import{BackgroundWidthRow as I,CONTENT_INSIDE_BACKGROUND_HINT as S,ContentWidthRow as C,WIDTH_GROUP_LABEL as E,WIDTH_PHONE_HINT as T}from"../../components/SectionWidthRows.js";import{PAGE_WIDTH as p}from"../../../format/lib/content/page-width.js";import{FOLLOW_SITE as h,WIDTH_CHOICE_LABEL as H,resolveSectionWidth as m}from"../../../format/lib/content/section-width.js";import{say as f}from"../../../format/lib/editor-words.js";import{group as D,sharedStyleKinds as N,useSelectedPatch as O,useSelectedProps as W}from"./controls.js";import{NoControlMark as g,noControlField as x}from"efficient-easel/screen/lib/document/panel-no-control-mark";const u=t=>f(H[t==="content"?"page":"full"]),_=t=>`${t} ${f("from Styles")}`;function b(){const{siteWidth:t,sectionBackgroundWidth:o,sectionContentWidth:e}=w();return{px:typeof t=="number"?t:p.default,background:o??"full",content:e??"content"}}function k(){try{return y()==="mobile"}catch{return!1}}function P({type:t,onChange:o}){const e=W(),n=b(),i=k(),c=m(t,e).background;return r(I,{value:c??n.background,changed:c!==null,detail:_(u(n.background)),onChange:a=>o(a),onReset:()=>o(h),disabled:i})}function B({type:t}){const o=W(),e=O(),n=b(),i=k(),c=m(t,o),s=(c.background??n.background)==="content",l=c.content??n.content;return r(C,{mode:s&&l==="full"?"content":l,px:c.contentMax??n.px,max:s?n.px:p.max,changed:c.content!==null,detail:_(n.content==="full"?u("full"):`${u("content")} ${n.px}px`),fullClosed:s,disabled:i,hint:i?T:s?S:void 0,onMode:d=>e(d==="full"?{contentWidth:d,contentMax:null}:{contentWidth:d}),onPx:d=>e({contentWidth:"content",contentMax:d}),onReset:()=>e({contentWidth:h,contentMax:null})})}function M(t){return N({_gWidth:D(E),backgroundWidth:{type:"custom",render:({onChange:o})=>r(P,{type:t,onChange:o})},contentWidth:{type:"custom",render:()=>r(B,{type:t})},contentMax:{...x({type:"custom",render:()=>r(g,{})},"always"),reachedBy:"contentWidth"},widthMode:{...x({type:"custom",render:()=>r(g,{})},"always"),reachedBy:"backgroundWidth"}})}const U=Object.keys(M(""));export{U as SECTION_WIDTH_FIELD_KEYS,M as sectionWidthFields};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useSelectedFields as e}from"efficient-easel/easel";function r(){try{return e()}catch{return null}}export{r as useSelectedHost};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useEaselSession as i}from"efficient-easel/screen/lib/session-context";import{useScreenDocument as r}from"efficient-easel/screen/components/ScreenDocumentContext";import{slugify as c}from"
|
|
1
|
+
"use client";import{useEaselSession as i}from"efficient-easel/screen/lib/session-context";import{useScreenDocument as r}from"efficient-easel/screen/components/ScreenDocumentContext";import{slugify as c}from"efficient-shell/format";import{backendOf as a}from"./website-session.js";const l=new Set(["normal","dynamic"]);function S(e){return!e.kind||l.has(e.kind)}function p(e,t){const n=c(e)||"page";if(!t.has(n))return n;let s=2;for(;t.has(`${n}-${s}`);)s+=1;return`${n}-${s}`}function D(e,t){return t.has(e)}function $(e,t){return{title:`${e.label||e.slug} copy`,slug:p(`${e.slug}-copy`,t)}}function h(){const e=i(),{siteId:t,templateId:n}=r(),s=a(e).pages;if(!(!s.duplicate||n))return(u,o)=>s.duplicate(u.id,{...o,...t?{siteId:t}:{}})}export{S as canDuplicatePage,$ as copySuggestion,p as uniqueSlug,D as urlHandleTaken,h as usePageDuplicate};
|